acme
Foundational cross-platform layer of the ca2 framework
Toggle main menu visibility
Loading...
Searching...
No Matches
_x11.h
1
//
2
// Created by camilo on 2024-10-03 04:51 <3ThomasBorregaardSorensen!!
3
//
4
#pragma once
5
6
7
#include "acme/operating_system/x11/_.h"
8
#define pointer X11_pointer
9
#include <X11/Xlib.h>
10
#include <X11/extensions/Xrandr.h>
11
#undef pointer
12
13
14
inline
Display * as_x11_display(
::x11::display_t
* px11display)
15
{
16
17
return
(Display *) px11display;
18
19
}
20
21
22
23
inline
Window as_x11_window(::x11::window_t x11window)
24
{
25
26
return
(Window) x11window;
27
28
}
29
30
31
inline
Visual * as_x11_visual(
::x11::visual_t
* px11visual)
32
{
33
34
return
(Visual *) px11visual;
35
36
}
37
38
39
inline
Display * as_x11_display(const ::x11::handle_t & handle)
40
{
41
42
return
as_x11_display(handle.m_pdisplay);
43
44
}
45
46
47
inline
Window as_x11_window(const ::x11::handle_t & handle)
48
{
49
50
return
as_x11_window(handle.m_window);
51
52
}
53
54
55
inline
Visual * as_x11_visual(const ::x11::handle_t & handle)
56
{
57
58
return
as_x11_visual(handle.m_pvisual);
59
60
}
61
62
63
inline
XEvent * as_x11_event(const ::x11::event_t * pevent)
64
{
65
66
return
(XEvent *) pevent;
67
68
}
69
70
71
inline ::x11::handle_t as_x11_handle(Display * pdisplay, Window
window
, Visual * pvisual)
72
{
73
74
return
{(
::x11::display_t
*) pdisplay, (::x11::window_t)
window
, (
::x11::visual_t
*) pvisual};
75
76
}
77
78
79
#define __x11_handle(handle) as_x11_display(handle), as_x11_window(handle)
80
81
#define __x11_handle_with_visual(handle) as_x11_display(handle), as_x11_window(handle), as_x11_visual(handle)
82
83
84
window
Definition
___serialization_draft.h:150
x11::display_t
Definition
_.h:12
x11::visual_t
Definition
_.h:22
operating_system
x11
_x11.h
Generated by
1.17.0