PatchworkOS  c9fea19
A non-POSIX operating system.
Loading...
Searching...
No Matches
dwm.c File Reference
#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>
Include dependency graph for dwm.c:

Go to the source code of this file.

Functions

static client_tdwm_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_tdwm_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_tdwm_surface_under_point (const point_t *point)
 
static surface_tdwm_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
 
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_twall
 
static surface_tcursor
 
static surface_tfullscreen
 
static surface_tprevCursorTarget
 
static surface_tfocus
 
static poll_ctx_tpollCtx
 

Function Documentation

◆ dwm_client_accept()

static client_t * dwm_client_accept ( void  )
static

Definition at line 40 of file dwm.c.

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

◆ dwm_client_disconnect()

static void dwm_client_disconnect ( client_t client)
static

Definition at line 63 of file dwm.c.

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

◆ dwm_send_event_to_all()

static void dwm_send_event_to_all ( surface_id_t  target,
event_type_t  type,
void *  data,
uint64_t  size 
)
static

Definition at line 71 of file dwm.c.

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

◆ dwm_surface_under_point()

static surface_t * dwm_surface_under_point ( const point_t point)
static

Definition at line 358 of file dwm.c.

Here is the caller graph for this function:

◆ dwm_next_timer()

static surface_t * dwm_next_timer ( void  )
static
Todo:
Optimize this function to avoid iterating over all surfaces every time.

Definition at line 400 of file dwm.c.

Here is the caller graph for this function:

◆ dwm_kbd_read()

static void dwm_kbd_read ( void  )
static

Definition at line 446 of file dwm.c.

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

◆ dwm_handle_mouse_event()

static void dwm_handle_mouse_event ( const mouse_event_t mouseEvent)
static

Definition at line 475 of file dwm.c.

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

◆ dwm_mouse_read()

static void dwm_mouse_read ( void  )
static

Definition at line 565 of file dwm.c.

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

◆ dwm_poll_ctx_update()

static void dwm_poll_ctx_update ( void  )
static

Definition at line 599 of file dwm.c.

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

◆ dwm_poll()

static void dwm_poll ( void  )
static

Definition at line 632 of file dwm.c.

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

◆ dwm_update()

static void dwm_update ( void  )
static

Definition at line 666 of file dwm.c.

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

Variable Documentation

◆ id

char* id
static

Definition at line 20 of file dwm.c.

◆ data

fd_t data
static

Definition at line 21 of file dwm.c.

◆ kbd

fd_t kbd
static

Definition at line 23 of file dwm.c.

◆ mouse

fd_t mouse
static

Definition at line 24 of file dwm.c.

◆ clients

list_t clients
static

Definition at line 26 of file dwm.c.

◆ clientAmount

uint64_t clientAmount
static

Definition at line 27 of file dwm.c.

◆ windows

list_t windows
static

Definition at line 29 of file dwm.c.

◆ panels

list_t panels
static

Definition at line 30 of file dwm.c.

◆ wall

surface_t* wall
static

Definition at line 31 of file dwm.c.

◆ cursor

surface_t* cursor
static

Definition at line 32 of file dwm.c.

◆ fullscreen

surface_t* fullscreen
static

Definition at line 33 of file dwm.c.

◆ prevCursorTarget

surface_t* prevCursorTarget
static

Definition at line 34 of file dwm.c.

◆ focus

surface_t* focus
static

Definition at line 36 of file dwm.c.

◆ pollCtx

poll_ctx_t* pollCtx
static

Definition at line 38 of file dwm.c.