56 lines
1.3 KiB
C
56 lines
1.3 KiB
C
/* SPDX-License-Identifier: MIT OR X11
|
|
*
|
|
* Copyright © 2024 Enrico Weigelt, metux IT consult <info@metux.net>
|
|
*/
|
|
#ifndef __XNEST__XCB_H
|
|
#define __XNEST__XCB_H
|
|
|
|
#include <xcb/xcb.h>
|
|
|
|
typedef struct {
|
|
xcb_connection_t *conn;
|
|
uint32_t screenId;
|
|
const xcb_screen_t *screenInfo;
|
|
const xcb_setup_t *setup;
|
|
} xnestUpstreamInfoRec;
|
|
|
|
extern xnestUpstreamInfoRec xnestUpstreamInfo;
|
|
|
|
/* fetch upstream connection's xcb setup data */
|
|
void xnest_upstream_setup(void);
|
|
|
|
/* retrieve upstream GC XID for our xserver GC */
|
|
uint32_t xnestUpstreamGC(GCPtr pGC);
|
|
|
|
typedef struct {
|
|
uint32_t background_pixmap;
|
|
uint32_t background_pixel;
|
|
uint32_t border_pixmap;
|
|
uint32_t border_pixel;
|
|
uint16_t bit_gravity;
|
|
uint16_t win_gravity;
|
|
uint16_t backing_store;
|
|
uint32_t backing_planes;
|
|
uint32_t backing_pixel;
|
|
Bool save_under;
|
|
uint32_t event_mask;
|
|
uint32_t do_not_propagate_mask;
|
|
Bool override_redirect;
|
|
uint32_t colormap;
|
|
uint32_t cursor;
|
|
} XnSetWindowAttr;
|
|
|
|
void xnest_encode_window_attr(XnSetWindowAttr attr, uint32_t mask, uint32_t *values);
|
|
|
|
typedef struct {
|
|
int x, y;
|
|
int width, height;
|
|
int border_width;
|
|
uint32_t sibling;
|
|
int stack_mode;
|
|
} XnWindowChanges;
|
|
|
|
void xnest_configure_window(xcb_connection_t *conn, uint32_t window, uint32_t mask, XnWindowChanges values);
|
|
|
|
#endif /* __XNEST__XCB_H */
|