|
PatchworkOS
|
#include "dwm.h"#include "client.h"#include "compositor.h"#include "kbd.h"#include "screen.h"#include "surface.h"#include <errno.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <sys/fb.h>#include <sys/io.h>#include <sys/list.h>#include <sys/math.h>#include <sys/proc.h>#include <threads.h>Go to the source code of this file.
Functions | |
| static client_t * | dwm_client_accept (void) |
| static void | dwm_client_disconnect (client_t *client) |
| static void | dwm_send_event_to_all (surface_id_t target, event_type_t type, void *data, uint64_t size) |
| void | dwm_init (void) |
| void | dwm_deinit (void) |
| void | dwm_report_produce (surface_t *surface, client_t *client, report_flags_t flags) |
| surface_t * | dwm_surface_find (surface_id_t id) |
| uint64_t | dwm_attach (surface_t *surface) |
| void | dwm_detach (surface_t *surface) |
| void | dwm_focus_set (surface_t *surface) |
| static surface_t * | dwm_surface_under_point (const point_t *point) |
| static surface_t * | dwm_next_timer (void) |
| static void | dwm_kbd_read (void) |
| static void | dwm_handle_mouse_event (const mouse_event_t *mouseEvent) |
| static void | dwm_mouse_read (void) |
| static void | dwm_poll_ctx_update (void) |
| static void | dwm_poll (void) |
| static void | dwm_update (void) |
| void | dwm_loop (void) |
Variables | |
| static char | id [MAX_NAME] |
| static fd_t | data |
| static fd_t | kbd |
| static fd_t | mouse |
| static list_t | clients |
| static uint64_t | clientAmount |
| static list_t | windows |
| static list_t | panels |
| static surface_t * | wall |
| static surface_t * | cursor |
| static surface_t * | fullscreen |
| static surface_t * | prevCursorTarget |
| static surface_t * | focus |
| static poll_ctx_t * | pollCtx |
|
static |
Definition at line 40 of file dwm.c.
References client_new(), clientAmount, clients, close(), client_t::entry, ERR, errno, client_t::fd, list_push(), NULL, openf(), printf(), and strerror().
Referenced by dwm_update().
|
static |
Definition at line 63 of file dwm.c.
References client_free(), clientAmount, clients, client_t::entry, list_remove(), and printf().
Referenced by dwm_send_event_to_all(), and dwm_update().
|
static |
Definition at line 484 of file dwm.c.
References mouse_event_t::buttons, CLAMP, surface_t::client, client_send_event(), compositor_invalidate(), cursor, mouse_event_t::deltaX, mouse_event_t::deltaY, dwm_focus_set(), dwm_send_event_to_all(), dwm_surface_under_point(), EVENT_CURSOR_ENTER, EVENT_CURSOR_LEAVE, EVENT_MOUSE, focus, GEVENT_MOUSE, event_mouse_t::held, surface_t::id, MOUSE_NONE, NULL, event_mouse_t::pos, surface_t::pos, prevCursorTarget, screen_height(), screen_width(), event_mouse_t::screenPos, SURFACE_ID_NONE, SURFACE_SCREEN_RECT, point_t::x, and point_t::y.
Referenced by dwm_mouse_read().
|
static |
Definition at line 455 of file dwm.c.
References surface_t::client, client_send_event(), event_kbd_t::code, kbd_event_t::code, dwm_send_event_to_all(), EVENT_KBD, focus, GEVENT_KBD, surface_t::id, kbd, kbd_ascii(), event_kbd_t::mods, kbd_event_t::mods, NULL, poll1(), POLLIN, printf(), read(), SURFACE_ID_NONE, event_kbd_t::type, and kbd_event_t::type.
Referenced by dwm_update().
|
static |
Definition at line 574 of file dwm.c.
References mouse_event_t::buttons, mouse_event_t::deltaX, mouse_event_t::deltaY, dwm_handle_mouse_event(), mouse, MOUSE_NONE, poll1(), POLLIN, printf(), and read().
Referenced by dwm_update().
|
static |
Definition at line 409 of file dwm.c.
References CLOCKS_NEVER, cursor, timer_t::deadline, fullscreen, LIST_FOR_EACH, NULL, panels, surface_t::timer, wall, and windows.
Referenced by dwm_poll().
|
static |
Definition at line 641 of file dwm.c.
References abort(), surface_t::client, client_send_event(), clientAmount, CLOCKS_NEVER, timer_t::deadline, dwm_next_timer(), dwm_poll_ctx_update(), ERR, errno, EVENT_TIMER, timer_t::flags, surface_t::id, NULL, poll(), pollCtx, printf(), strerror(), time(), timer_t::timeout, surface_t::timer, TIMER_REPEAT, and uptime().
Referenced by dwm_update().
|
static |
Definition at line 608 of file dwm.c.
References abort(), clientAmount, clients, poll_ctx_t::clients, data, poll_ctx_t::data, pollfd_t::events, pollfd_t::fd, client_t::fd, kbd, poll_ctx_t::kbd, LIST_FOR_EACH, mouse, poll_ctx_t::mouse, NULL, pollCtx, POLLIN, printf(), realloc(), and pollfd_t::revents.
Referenced by dwm_poll().
|
static |
Definition at line 71 of file dwm.c.
References client_send_event(), clients, data, dwm_client_disconnect(), ERR, and LIST_FOR_EACH_SAFE.
Referenced by dwm_attach(), dwm_detach(), dwm_handle_mouse_event(), dwm_kbd_read(), and dwm_report_produce().
Definition at line 367 of file dwm.c.
References fullscreen, LIST_FOR_EACH_REVERSE, NULL, panels, RECT_CONTAINS_POINT, SURFACE_SCREEN_RECT, wall, and windows.
Referenced by dwm_handle_mouse_event().
|
static |
Definition at line 675 of file dwm.c.
References client_receive_cmds(), clients, poll_ctx_t::clients, compositor_draw(), cursor, poll_ctx_t::data, dwm_client_accept(), dwm_client_disconnect(), dwm_kbd_read(), dwm_mouse_read(), dwm_poll(), ERR, errno, client_t::fd, fullscreen, poll_ctx_t::kbd, LIST_FOR_EACH_SAFE, poll_ctx_t::mouse, panels, pollCtx, POLLERR, POLLHUP, POLLIN, printf(), pollfd_t::revents, strerror(), wall, compositor_ctx_t::windows, and windows.
Referenced by dwm_loop().
|
static |
Definition at line 27 of file dwm.c.
Referenced by dwm_client_accept(), dwm_client_disconnect(), dwm_init(), dwm_poll(), and dwm_poll_ctx_update().
|
static |
Definition at line 26 of file dwm.c.
Referenced by dwm_client_accept(), dwm_client_disconnect(), dwm_init(), dwm_poll_ctx_update(), dwm_send_event_to_all(), and dwm_update().
|
static |
Definition at line 32 of file dwm.c.
Referenced by dwm_attach(), dwm_detach(), dwm_handle_mouse_event(), dwm_init(), dwm_next_timer(), and dwm_update().
|
static |
Definition at line 21 of file dwm.c.
Referenced by aml_def_index_field_read(), aml_field_unit_access(), aml_field_unit_index_field_set(), aml_object_set_bits_at(), client_send_all(), client_send_event(), config_get_array(), display_cmds_flush(), display_emit(), display_new(), display_push(), dwm_deinit(), dwm_init(), dwm_poll_ctx_update(), dwm_send_event_to_all(), element_emit(), free(), irq_install(), local_socket_accept(), local_socket_bind(), local_socket_connect(), local_socket_data_get_conn(), local_socket_data_get_listen(), local_socket_deinit(), local_socket_init(), local_socket_listen(), local_socket_poll(), local_socket_recv(), local_socket_send(), ps2_kbd_irq(), ps2_mouse_irq(), ramfs_mount(), and realloc().
|
static |
Definition at line 36 of file dwm.c.
Referenced by dwm_attach(), dwm_detach(), dwm_focus_set(), dwm_handle_mouse_event(), dwm_init(), and dwm_kbd_read().
|
static |
Definition at line 33 of file dwm.c.
Referenced by dwm_attach(), dwm_detach(), dwm_focus_set(), dwm_init(), dwm_next_timer(), dwm_surface_find(), dwm_surface_under_point(), and dwm_update().
|
static |
Definition at line 20 of file dwm.c.
Referenced by aml_mutex_stack_push(), cpu_init(), display_get_surface_info(), display_set_focus(), display_set_is_visible(), element_new_raw(), procedure(), and smp_cpu().
|
static |
Definition at line 23 of file dwm.c.
Referenced by dwm_deinit(), dwm_init(), dwm_kbd_read(), and dwm_poll_ctx_update().
|
static |
Definition at line 24 of file dwm.c.
Referenced by dwm_deinit(), dwm_init(), dwm_mouse_read(), and dwm_poll_ctx_update().
|
static |
Definition at line 30 of file dwm.c.
Referenced by dwm_attach(), dwm_detach(), dwm_init(), dwm_next_timer(), dwm_surface_find(), dwm_surface_under_point(), and dwm_update().
|
static |
Definition at line 38 of file dwm.c.
Referenced by dwm_deinit(), dwm_init(), dwm_poll(), dwm_poll_ctx_update(), and dwm_update().
|
static |
Definition at line 34 of file dwm.c.
Referenced by dwm_detach(), dwm_handle_mouse_event(), and dwm_init().
|
static |
Definition at line 31 of file dwm.c.
Referenced by dwm_attach(), dwm_detach(), dwm_init(), dwm_next_timer(), dwm_surface_find(), dwm_surface_under_point(), and dwm_update().
|
static |
Definition at line 29 of file dwm.c.
Referenced by dwm_attach(), dwm_detach(), dwm_focus_set(), dwm_init(), dwm_next_timer(), dwm_surface_find(), dwm_surface_under_point(), and dwm_update().