|
PatchworkOS
|
#include "client.h"#include "compositor.h"#include "dwm.h"#include "screen.h"#include <errno.h>#include <stdio.h>#include <stdlib.h>#include <string.h>Go to the source code of this file.
Macros | |
| #define | __STDC_WANT_LIB_EXT1__ 1 |
Variables | |
| static uint64_t(* | actions [])(client_t *, const cmd_header_t *) |
|
static |
Definition at line 70 of file client.c.
References client_send_event(), EINVAL, ERR, errno, EVENT_SCREEN_INFO, cmd_screen_info_t::index, screen_height(), screen_width(), cmd_header_t::size, SURFACE_ID_NONE, and event_screen_info_t::width.
|
static |
Definition at line 332 of file client.c.
References client_t::bitmask, DWM_MAX_EVENT, EINVAL, ERR, errno, cmd_subscribe_t::event, and cmd_header_t::size.
|
static |
Definition at line 266 of file client.c.
References client_surface_find(), compositor_invalidate(), dwm_focus_set(), dwm_surface_find(), ERR, cmd_surface_focus_set_t::isGlobal, NULL, screenRect, cmd_header_t::size, SURFACE_SCREEN_RECT, and cmd_surface_focus_set_t::target.
|
static |
Definition at line 151 of file client.c.
References client_surface_find(), surface_t::clientEntry, compositor_invalidate(), dwm_detach(), EINVAL, ENOENT, ERR, errno, list_remove(), NULL, screenRect, cmd_header_t::size, surface_free(), SURFACE_SCREEN_RECT, client_t::surfaces, and cmd_surface_free_t::target.
|
static |
Definition at line 234 of file client.c.
References client_surface_find(), compositor_invalidate(), EINVAL, ENOENT, ERR, errno, cmd_surface_invalidate_t::invalidRect, rect_t::left, NULL, surface_t::pos, RECT_FIT, RECT_HAS_NEGATIVE_DIMS, RECT_HEIGHT, RECT_INIT_DIM, RECT_WIDTH, cmd_header_t::size, SURFACE_CONTENT_RECT, cmd_surface_invalidate_t::target, rect_t::top, point_t::x, and point_t::y.
|
static |
Definition at line 176 of file client.c.
References surface_t::client, client_surface_find(), compositor_invalidate(), dwm_report_produce(), EINVAL, ENOENT, ENOSYS, ERR, errno, surface_t::height, rect_t::left, NULL, surface_t::pos, cmd_surface_move_t::rect, RECT_HEIGHT, RECT_WIDTH, REPORT_RECT, cmd_header_t::size, SURFACE_SCREEN_RECT, cmd_surface_move_t::target, rect_t::top, surface_t::width, and point_t::x.
|
static |
Definition at line 96 of file client.c.
References client_send_event(), surface_t::clientEntry, CLOCKS_NEVER, dwm_attach(), EINVAL, ENAMETOOLONG, ERR, errno, EVENT_SURFACE_NEW, surface_t::id, rect_t::left, list_push(), MAX_NAME, cmd_surface_new_t::name, NULL, cmd_surface_new_t::rect, RECT_HEIGHT, RECT_WIDTH, share(), surface_t::shmem, event_surface_new_t::shmemKey, cmd_header_t::size, strnlen_s(), surface_free(), surface_new(), SURFACE_TYPE_AMOUNT, client_t::surfaces, rect_t::top, cmd_surface_new_t::type, and point_t::x.
|
static |
Definition at line 314 of file client.c.
References client_surface_find(), dwm_report_produce(), dwm_surface_find(), ERR, cmd_surface_report_t::isGlobal, NULL, REPORT_NONE, cmd_header_t::size, and cmd_surface_report_t::target.
|
static |
Definition at line 212 of file client.c.
References client_surface_find(), CLOCKS_NEVER, timer_t::deadline, EINVAL, ENOENT, ERR, errno, cmd_surface_timer_set_t::flags, timer_t::flags, NULL, cmd_header_t::size, cmd_surface_timer_set_t::target, cmd_surface_timer_set_t::timeout, timer_t::timeout, surface_t::timer, and uptime().
|
static |
Definition at line 288 of file client.c.
References surface_t::client, client_surface_find(), compositor_invalidate(), dwm_focus_set(), dwm_report_produce(), dwm_surface_find(), ERR, surface_t::flags, cmd_surface_visible_set_t::isGlobal, cmd_surface_visible_set_t::isVisible, NULL, REPORT_IS_VISIBLE, screenRect, cmd_header_t::size, SURFACE_SCREEN_RECT, SURFACE_VISIBLE, and cmd_surface_visible_set_t::target.
|
static |
Definition at line 351 of file client.c.
References client_t::bitmask, DWM_MAX_EVENT, EINVAL, ERR, errno, cmd_unsubscribe_t::event, and cmd_header_t::size.
| void client_free | ( | client_t * | client | ) |
Definition at line 52 of file client.c.
References surface_t::clientEntry, close(), compositor_invalidate(), dwm_detach(), client_t::fd, free(), LIST_FOR_EACH_SAFE, list_remove(), screenRect, surface_free(), SURFACE_SCREEN_RECT, and client_t::surfaces.
Referenced by dwm_client_disconnect().
Definition at line 32 of file client.c.
References client_t::bitmask, ENOMEM, client_t::entry, errno, client_t::fd, list_entry_init(), list_init(), malloc(), NULL, client_t::surfaces, and UINT64_MAX.
Referenced by dwm_client_accept().
|
static |
Definition at line 384 of file client.c.
References actions, cmd_buffer_t::amount, CMD_BUFFER_FOR_EACH, CMD_BUFFER_MAX_DATA, CMD_MAGIC, CMD_TYPE_AMOUNT, EPROTO, ERR, errno, cmd_header_t::magic, printf(), cmd_header_t::size, cmd_buffer_t::size, and cmd_header_t::type.
Referenced by client_receive_cmds().
Definition at line 427 of file client.c.
References client_process_cmds(), CLIENT_RECV_BUFFER_SIZE, EMSGSIZE, EOK, EPIPE, ERR, errno, EWOULDBLOCK, client_t::fd, memmove(), perror(), printf(), read(), client_t::recvBuffer, client_t::recvLen, and cmd_buffer_t::size.
Referenced by dwm_update().
| uint64_t client_send_event | ( | client_t * | client, |
| surface_id_t | target, | ||
| event_type_t | type, | ||
| void * | data, | ||
| uint64_t | size | ||
| ) |
Definition at line 516 of file client.c.
References client_t::bitmask, client_send_all(), data, ERR, client_t::fd, memcpy(), and event_t::type.
Referenced by client_action_screen_info(), client_action_surface_new(), dwm_handle_mouse_event(), dwm_kbd_read(), dwm_poll(), dwm_report_produce(), and dwm_send_event_to_all().
|
static |
Definition at line 13 of file client.c.
References surface_t::id, LIST_FOR_EACH, NULL, and client_t::surfaces.
Referenced by client_action_surface_focus_set(), client_action_surface_free(), client_action_surface_invalidate(), client_action_surface_move(), client_action_surface_report(), client_action_surface_timer_set(), and client_action_surface_visible_set().
|
static |
Definition at line 370 of file client.c.
Referenced by client_process_cmds().