rofi 2.0.0
xcb.h
Go to the documentation of this file.
1/*
2 * rofi
3 *
4 * MIT/X11 License
5 * Copyright © 2013-2023 Qball Cow <qball@gmpclient.org>
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining
8 * a copy of this software and associated documentation files (the
9 * "Software"), to deal in the Software without restriction, including
10 * without limitation the rights to use, copy, modify, merge, publish,
11 * distribute, sublicense, and/or sell copies of the Software, and to
12 * permit persons to whom the Software is furnished to do so, subject to
13 * the following conditions:
14 *
15 * The above copyright notice and this permission notice shall be
16 * included in all copies or substantial portions of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
21 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
22 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 *
26 */
27
28#ifndef ROFI_XCB_H
29#define ROFI_XCB_H
30
31#include <cairo.h>
32#ifdef XCB_IMDKIT
33#include <xcb-imdkit/imclient.h>
34#endif
35#include <xcb/xcb.h>
36
40typedef struct _xcb_stuff xcb_stuff;
41
45extern xcb_stuff *xcb;
46
52void xcb_stuff_set_clipboard(char *data);
53
60
70char *window_get_text_prop(xcb_window_t w, xcb_atom_t atom);
71
80void window_set_atom_prop(xcb_window_t w, xcb_atom_t prop, xcb_atom_t *atoms,
81 int count);
82
84#define ATOM_ENUM(x) x
86#define ATOM_CHAR(x) #x
87
89#define EWMH_ATOMS(X) \
90 X(_NET_WM_WINDOW_OPACITY), X(I3_SOCKET_PATH), X(TARGETS), X(UTF8_STRING), \
91 X(STRING), X(CLIPBOARD), X(WM_WINDOW_ROLE), X(_XROOTPMAP_ID), \
92 X(_MOTIF_WM_HINTS), X(WM_TAKE_FOCUS), X(ESETROOT_PMAP_ID)
93
97extern const char *netatom_names[];
99extern xcb_atom_t netatoms[NUM_NETATOMS];
100
104extern xcb_depth_t *depth;
108extern xcb_visualtype_t *visual;
112extern xcb_colormap_t map;
113
119cairo_surface_t *x11_helper_get_bg_surface(void);
127cairo_surface_t *x11_helper_get_screenshot_surface(void);
128
136
149
156void x11_set_cursor(xcb_window_t window, X11CursorType type);
157
169
175
185
187 int size);
188
196void cairo_image_surface_blur(cairo_surface_t *surface, int radius,
197 double deviation);
198
199#ifdef XCB_IMDKIT
203void x11_event_handler_fowarding(xcb_xim_t *im, xcb_xic_t ic,
204 xcb_key_press_event_t *event, void *user_data);
205#endif
206
213#endif
unsigned long long count
Definition view.c:76
int xcb_window_t
Definition xcb-dummy.h:9
xcb_colormap_t map
Definition display.c:110
xcb_stuff * xcb
Definition display.c:103
xcb_depth_t * depth
Definition display.c:108
const char * netatom_names[]
Definition display.c:116
WindowManagerQuirk current_window_manager
Definition display.c:87
xcb_atom_t netatoms[NUM_NETATOMS]
Definition display.c:115
xcb_visualtype_t * visual
Definition display.c:109
struct _xcb_stuff xcb_stuff
Definition xcb.h:40
cairo_surface_t * x11_helper_get_screenshot_surface(void)
Definition display.c:348
char * window_get_text_prop(xcb_window_t w, xcb_atom_t atom)
Definition display.c:388
#define EWMH_ATOMS(X)
Definition xcb.h:89
cairo_surface_t * x11_helper_get_bg_surface(void)
Definition display.c:374
WindowManagerQuirk
Definition xcb.h:161
@ WM_PANGO_WORKSPACE_NAMES
Definition xcb.h:167
@ WM_DO_NOT_CHANGE_CURRENT_DESKTOP
Definition xcb.h:165
@ WM_EWHM
Definition xcb.h:163
void x11_set_cursor(xcb_window_t window, X11CursorType type)
Definition display.c:1977
X11CursorType
Definition xcb.h:140
@ CURSOR_POINTER
Definition xcb.h:144
@ CURSOR_DEFAULT
Definition xcb.h:142
@ NUM_CURSORS
Definition xcb.h:147
@ CURSOR_TEXT
Definition xcb.h:146
char * x11_helper_get_window_manager(void)
Definition display.c:1592
void cairo_image_surface_blur(cairo_surface_t *surface, int radius, double deviation)
Definition display.c:178
#define ATOM_ENUM(x)
Definition xcb.h:84
xcb_window_t xcb_stuff_get_root_window(void)
Definition display.c:1911
void window_set_atom_prop(xcb_window_t w, xcb_atom_t prop, xcb_atom_t *atoms, int count)
Definition display.c:414
@ NUM_NETATOMS
Definition xcb.h:95
void xcb_stuff_set_clipboard(char *data)
Definition display.c:1989
void x11_disable_decoration(xcb_window_t window)
Definition display.c:1953
cairo_surface_t * x11_helper_get_screenshot_surface_window(xcb_window_t window, int size)
Definition display.c:287