PatchworkOS  c9fea19
A non-POSIX operating system.
Loading...
Searching...
No Matches
surface.h
Go to the documentation of this file.
1#ifndef PATCHWORK_SURFACE_H
2#define PATCHWORK_SURFACE_H 1
3
4#include "rect.h"
5
6#include <assert.h>
7#include <stdbool.h>
8#include <stdint.h>
9#include <sys/io.h>
10
11#if defined(__cplusplus)
12extern "C"
13{
14#endif
15
16/**
17 * @brief Desktop Window Manager Surface.
18 * @defgroup libpatchwork_surface Surface
19 * @ingroup libpatchwork
20 *
21 * A surface represents a rectangular area on the screen that can display content and receive user input, this includes
22 * panels, cursors, wallpapers and normal application windows. It can be considered to be the server side implementation
23 * of the client side windows.
24 *
25 * @{
26 */
27
28/**
29 * @brief Surface types.
30 * @enum surface_type_t
31 */
42
43/**
44 * @brief Surface flags.
45 * @enum surface_flags_t
46 */
47typedef enum
48{
52
54#define SURFACE_ID_NONE (UINT64_MAX)
55
65
66#ifdef static_assert
67static_assert(sizeof(surface_info_t) == 104, "invalid surface_info_t size");
68#endif
69
70/** @} */
71
72#if defined(__cplusplus)
73}
74#endif
75
76#endif
#define MAX_NAME
Maximum length of names.
Definition MAX_NAME.h:11
surface_type_t
Surface types.
Definition surface.h:33
uint64_t surface_id_t
Definition surface.h:53
surface_flags_t
Surface flags.
Definition surface.h:48
@ SURFACE_WALL
Definition surface.h:38
@ SURFACE_WINDOW
Definition surface.h:35
@ SURFACE_NONE
Definition surface.h:34
@ SURFACE_PANEL
Definition surface.h:36
@ SURFACE_CURSOR
Definition surface.h:37
@ SURFACE_FULLSCREEN
Definition surface.h:39
@ SURFACE_TYPE_AMOUNT
Definition surface.h:40
@ SURFACE_VISIBLE
Definition surface.h:49
@ SURFACE_FOCUSED
Definition surface.h:50
__UINT64_TYPE__ uint64_t
Definition stdint.h:17
__UINT8_TYPE__ uint8_t
Definition stdint.h:11
Definition rect.h:13
surface_flags_t flags
Definition surface.h:61
surface_id_t id
Definition surface.h:59
rect_t rect
Definition surface.h:60
surface_type_t type
Definition surface.h:58