PatchworkOS
Loading...
Searching...
No Matches
display.c File Reference
#include "internal.h"
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/list.h>

Go to the source code of this file.

Functions

static uint64_t display_events_pipe_read (display_t *disp, event_t *event)
 
static uint64_t display_events_pipe_write (display_t *disp, const event_t *event)
 
display_tdisplay_new (void)
 Create a new display connection.
 
void display_free (display_t *disp)
 Free a display connection.
 
bool display_is_connected (display_t *disp)
 Check if the display connection is still connected.
 
void display_disconnect (display_t *disp)
 Disconnect the display connection.
 
void * display_cmd_alloc (display_t *disp, cmd_type_t type, uint64_t size)
 Allocate a section of the displays command buffer.
 
void display_cmds_flush (display_t *disp)
 Flush the display's command buffer.
 
uint64_t display_next (display_t *disp, event_t *event, clock_t timeout)
 Retrieve the next event from the display connection.
 
uint64_t display_poll (display_t *disp, pollfd_t *fds, uint64_t nfds, clock_t timeout)
 Poll the display connection for events together with other file descriptors.
 
void display_push (display_t *disp, surface_id_t target, event_type_t type, void *data, uint64_t size)
 Push an event to the display's internal event queue.
 
uint64_t display_wait (display_t *disp, event_t *event, event_type_t expected)
 Wait for the display to receive an event of the expected type.
 
uint64_t display_emit (display_t *disp, surface_id_t target, event_type_t type, void *data, uint64_t size)
 Emit an event to a target surface.
 
uint64_t display_dispatch (display_t *disp, const event_t *event)
 Dispatch an event to the appropriate surface.
 
uint64_t display_dispatch_pending (display_t *disp, event_type_t type, surface_id_t target)
 Dispatch all events currently in the display's internal event queue of a specific type and target.
 
uint64_t display_subscribe (display_t *disp, event_type_t type)
 Subscribe to events of a specific type.
 
uint64_t display_unsubscribe (display_t *disp, event_type_t type)
 Unsubscribe from events of a specific type.
 
uint64_t display_get_surface_info (display_t *disp, surface_id_t id, surface_info_t *info)
 Get information about a surface.
 
uint64_t display_set_focus (display_t *disp, surface_id_t id)
 Set the focus to a surface.
 
uint64_t display_set_is_visible (display_t *disp, surface_id_t id, bool isVisible)
 Set the visibility of a surface.
 
uint64_t display_get_screen (display_t *disp, rect_t *rect, uint64_t index)
 Get the rectangle of a screen.
 

Function Documentation

◆ display_events_pipe_read()

static uint64_t display_events_pipe_read ( display_t disp,
event_t event 
)
inlinestatic

◆ display_events_pipe_write()

static uint64_t display_events_pipe_write ( display_t disp,
const event_t event 
)
inlinestatic