PatchworkOS  966e257
A non-POSIX operating system.
Loading...
Searching...
No Matches
client.c File Reference
#include "client.h"
#include "compositor.h"
#include "dwm.h"
#include "screen.h"
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Include dependency graph for client.c:

Go to the source code of this file.

Macros

#define __STDC_WANT_LIB_EXT1__   1
 

Functions

static surface_tclient_surface_find (client_t *client, surface_id_t id)
 
client_tclient_new (fd_t fd)
 
void client_free (client_t *client)
 
static uint64_t client_action_screen_info (client_t *client, const cmd_header_t *header)
 
static uint64_t client_action_surface_new (client_t *client, const cmd_header_t *header)
 
static uint64_t client_action_surface_free (client_t *client, const cmd_header_t *header)
 
static uint64_t client_action_surface_move (client_t *client, const cmd_header_t *header)
 
static uint64_t client_action_surface_timer_set (client_t *client, const cmd_header_t *header)
 
static uint64_t client_action_surface_invalidate (client_t *client, const cmd_header_t *header)
 
static uint64_t client_action_surface_focus_set (client_t *client, const cmd_header_t *header)
 
static uint64_t client_action_surface_visible_set (client_t *client, const cmd_header_t *header)
 
static uint64_t client_action_surface_report (client_t *client, const cmd_header_t *header)
 
static uint64_t client_action_subscribe (client_t *client, const cmd_header_t *header)
 
static uint64_t client_action_unsubscribe (client_t *client, const cmd_header_t *header)
 
static uint64_t client_process_cmds (client_t *client, cmd_buffer_t *cmds)
 
uint64_t client_receive_cmds (client_t *client)
 
static uint64_t client_send_all (fd_t fd, const void *data, size_t size)
 
uint64_t client_send_event (client_t *client, surface_id_t target, event_type_t type, void *data, uint64_t size)
 

Variables

static uint64_t(* actions [])(client_t *, const cmd_header_t *)
 

Macro Definition Documentation

◆ __STDC_WANT_LIB_EXT1__

#define __STDC_WANT_LIB_EXT1__   1

Definition at line 1 of file client.c.

Function Documentation

◆ client_surface_find()

static surface_t * client_surface_find ( client_t client,
surface_id_t  id 
)
static

Definition at line 13 of file client.c.

Here is the caller graph for this function:

◆ client_new()

client_t * client_new ( fd_t  fd)

Definition at line 32 of file client.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ client_free()

void client_free ( client_t client)

Definition at line 52 of file client.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ client_action_screen_info()

static uint64_t client_action_screen_info ( client_t client,
const cmd_header_t header 
)
static

Definition at line 70 of file client.c.

Here is the call graph for this function:

◆ client_action_surface_new()

static uint64_t client_action_surface_new ( client_t client,
const cmd_header_t header 
)
static

Definition at line 96 of file client.c.

Here is the call graph for this function:

◆ client_action_surface_free()

static uint64_t client_action_surface_free ( client_t client,
const cmd_header_t header 
)
static

Definition at line 151 of file client.c.

Here is the call graph for this function:

◆ client_action_surface_move()

static uint64_t client_action_surface_move ( client_t client,
const cmd_header_t header 
)
static

Definition at line 176 of file client.c.

Here is the call graph for this function:

◆ client_action_surface_timer_set()

static uint64_t client_action_surface_timer_set ( client_t client,
const cmd_header_t header 
)
static

Definition at line 212 of file client.c.

Here is the call graph for this function:

◆ client_action_surface_invalidate()

static uint64_t client_action_surface_invalidate ( client_t client,
const cmd_header_t header 
)
static

Definition at line 234 of file client.c.

Here is the call graph for this function:

◆ client_action_surface_focus_set()

static uint64_t client_action_surface_focus_set ( client_t client,
const cmd_header_t header 
)
static

Definition at line 266 of file client.c.

Here is the call graph for this function:

◆ client_action_surface_visible_set()

static uint64_t client_action_surface_visible_set ( client_t client,
const cmd_header_t header 
)
static

Definition at line 288 of file client.c.

Here is the call graph for this function:

◆ client_action_surface_report()

static uint64_t client_action_surface_report ( client_t client,
const cmd_header_t header 
)
static

Definition at line 314 of file client.c.

Here is the call graph for this function:

◆ client_action_subscribe()

static uint64_t client_action_subscribe ( client_t client,
const cmd_header_t header 
)
static

Definition at line 332 of file client.c.

◆ client_action_unsubscribe()

static uint64_t client_action_unsubscribe ( client_t client,
const cmd_header_t header 
)
static

Definition at line 351 of file client.c.

◆ client_process_cmds()

static uint64_t client_process_cmds ( client_t client,
cmd_buffer_t cmds 
)
static

Definition at line 384 of file client.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ client_receive_cmds()

uint64_t client_receive_cmds ( client_t client)

Definition at line 427 of file client.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ client_send_all()

static uint64_t client_send_all ( fd_t  fd,
const void *  data,
size_t  size 
)
static

Definition at line 486 of file client.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ client_send_event()

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.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ actions

uint64_t(* actions[])(client_t *, const cmd_header_t *) ( client_t ,
const cmd_header_t  
)
static
Initial value:
= {
}
static uint64_t client_action_surface_timer_set(client_t *client, const cmd_header_t *header)
Definition client.c:212
static uint64_t client_action_surface_report(client_t *client, const cmd_header_t *header)
Definition client.c:314
static uint64_t client_action_surface_new(client_t *client, const cmd_header_t *header)
Definition client.c:96
static uint64_t client_action_surface_free(client_t *client, const cmd_header_t *header)
Definition client.c:151
static uint64_t client_action_surface_invalidate(client_t *client, const cmd_header_t *header)
Definition client.c:234
static uint64_t client_action_subscribe(client_t *client, const cmd_header_t *header)
Definition client.c:332
static uint64_t client_action_surface_move(client_t *client, const cmd_header_t *header)
Definition client.c:176
static uint64_t client_action_screen_info(client_t *client, const cmd_header_t *header)
Definition client.c:70
static uint64_t client_action_surface_focus_set(client_t *client, const cmd_header_t *header)
Definition client.c:266
static uint64_t client_action_unsubscribe(client_t *client, const cmd_header_t *header)
Definition client.c:351
static uint64_t client_action_surface_visible_set(client_t *client, const cmd_header_t *header)
Definition client.c:288
@ CMD_SUBSCRIBE
Definition cmd.h:33
@ CMD_UNSUBSCRIBE
Definition cmd.h:34
@ CMD_SURFACE_TIMER_SET
Definition cmd.h:28
@ CMD_SURFACE_MOVE
Definition cmd.h:27
@ CMD_SURFACE_NEW
Definition cmd.h:25
@ CMD_SURFACE_REPORT
Definition cmd.h:32
@ CMD_SURFACE_VISIBLE_SET
Definition cmd.h:31
@ CMD_SURFACE_FREE
Definition cmd.h:26
@ CMD_SURFACE_FOCUS_SET
Definition cmd.h:30
@ CMD_SURFACE_INVALIDATE
Definition cmd.h:29
@ CMD_SCREEN_INFO
Definition cmd.h:24

Definition at line 370 of file client.c.