File: XCB_util.inc

package info (click to toggle)
libx11-xcb-perl 0.18-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 488 kB
  • sloc: perl: 2,913; makefile: 5; ansic: 4
file content (91 lines) | stat: -rw-r--r-- 2,105 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# vim:ft=xs

MODULE = X11::XCB PACKAGE = X11::XCB::ICCCM::WMHints

PROTOTYPES: ENABLE

X11_XCB_ICCCM_WMHints *
new(self)
    char *self
  PREINIT:
    X11_XCB_ICCCM_WMHints *buf;
  CODE:
    Newxz(buf, 1, X11_XCB_ICCCM_WMHints);
    RETVAL = buf;
  OUTPUT:
    RETVAL

MODULE = X11::XCB PACKAGE = X11_XCB_ICCCM_WMHintsPtr

void
set_urgency(self)
    X11_XCB_ICCCM_WMHints * self
  CODE:
    #define XCB_ICCCM_WM_HINT_X_URGENCY (1L << 8)
    self->flags |= XCB_ICCCM_WM_HINT_X_URGENCY;

void
set_input(self, value)
    X11_XCB_ICCCM_WMHints * self
    uint32_t value
  CODE:
    #define XCB_ICCCM_WM_HINT_INPUT (1L << 0)
    self->flags |= XCB_ICCCM_WM_HINT_INPUT;
    self->input = value;

MODULE = X11::XCB PACKAGE = X11::XCB::ICCCM

void
set_wm_hints(conn, window, hints)
    XCBConnection * conn
    int window
    X11_XCB_ICCCM_WMHints * hints
  CODE:
    xcb_change_property(conn, XCB_PROP_MODE_REPLACE, window,
        XCB_ATOM_WM_HINTS, XCB_ATOM_WM_HINTS, 32,
	sizeof(*hints) >> 2, hints);

void
set_wm_size_hints(conn, window, property, hints)
    XCBConnection * conn
    int window
    int property
    X11_XCB_ICCCM_SizeHints * hints
  CODE:
    xcb_change_property(conn, XCB_PROP_MODE_REPLACE, window,
        property, XCB_ATOM_WM_SIZE_HINTS, 32, sizeof(*hints) >> 2, hints);




MODULE = X11::XCB PACKAGE = X11::XCB::ICCCM::SizeHints

PROTOTYPES: ENABLE

X11_XCB_ICCCM_SizeHints *
new(self)
    char *self
  PREINIT:
    X11_XCB_ICCCM_SizeHints *buf;
  CODE:
    Newxz(buf, 1, X11_XCB_ICCCM_SizeHints);
    RETVAL = buf;
  OUTPUT:
    RETVAL

MODULE = X11::XCB PACKAGE = X11_XCB_ICCCM_SizeHintsPtr

void
set_aspect(self, min_aspect_num, min_aspect_den, max_aspect_num, max_aspect_den)
    X11_XCB_ICCCM_SizeHints * self
    int min_aspect_num
    int min_aspect_den
    int max_aspect_num
    int max_aspect_den
  CODE:
    #define XCB_ICCCM_SIZE_HINT_P_ASPECT (1 << 7)
    self->flags |= XCB_ICCCM_SIZE_HINT_P_ASPECT;
    self->min_aspect_num = min_aspect_num;
    self->min_aspect_den = min_aspect_den;
    self->max_aspect_num = max_aspect_num;
    self->max_aspect_den = max_aspect_den;