2#define PATCHWORK_WIN_H 1
9#if defined(__cplusplus)
43typedef enum window_flags
211#if defined(__cplusplus)
surface_type_t
Surface types.
uint64_t window_set_visible(window_t *win, bool isVisible)
Set the visibility of the window.
rect_t window_get_rect(window_t *win)
Get the window's rectangle in screen coordinates.
uint64_t window_move(window_t *win, const rect_t *rect)
Move and/or resize the window.
uint64_t window_set_focus(window_t *win)
Set the focus to the window.
surface_id_t window_get_id(window_t *win)
Get the surface ID of the window.
rect_t window_content_rect(window_t *win)
Get the window's rectangle in local coordinates.
window_flags_t
Window flags.
uint64_t window_invalidate_flush(window_t *win)
Flush invalidated rectangles to the DWM.
surface_type_t window_get_type(window_t *win)
Get the surface type of the window.
uint64_t window_set_timer(window_t *win, timer_flags_t flags, clock_t timeout)
Set the window timer.
uint64_t window_dispatch(window_t *win, const event_t *event)
Dispatch an event to the window's elements.
window_t * window_new(display_t *disp, const char *name, const rect_t *rect, surface_type_t type, window_flags_t flags, procedure_t procedure, void *private)
Allocate and initialize a new window.
element_t * window_get_client_element(window_t *win)
Get the client element of the window.
void window_free(window_t *win)
Free a window.
display_t * window_get_display(window_t *win)
Get the display associated with the window.
void window_invalidate(window_t *win, const rect_t *rect)
Invalidate a rectangle of the window.
@ WINDOW_RESIZABLE
Allows window_move() to resize the window. TODO: Implement resize handles.
@ WINDOW_NO_CONTROLS
Disable controls (close/minimize buttons), only applies if WINDOW_DECO is set.
@ WINDOW_DECO
Enable decorations (titlebar, close/minimize buttons, etc).
__UINT64_TYPE__ clock_t
A nanosecond time.
uint64_t(* procedure_t)(window_t *, element_t *, const event_t *)
static uint64_t procedure(window_t *win, element_t *elem, const event_t *event)
Opaque display structure.
Opaque element structure.