显示窗口
This commit is contained in:
@@ -5,8 +5,11 @@
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <xcb/xproto.h>
|
||||
|
||||
#include "types.h"
|
||||
|
||||
#define WINDOW_NONE XCB_WINDOW_NONE
|
||||
|
||||
bool has_other_wm_running(void);
|
||||
int get_xcb_connection_fd(void);
|
||||
void flush_xcb_connection(void);
|
||||
@@ -17,7 +20,27 @@ typedef enum cursor_t {
|
||||
cursor_move = XC_fleur,
|
||||
} cursor_t;
|
||||
void change_window_cursor(xcb_window_t window, cursor_t cursor);
|
||||
void set_root_cursor(cursor_t cursor);
|
||||
xcb_window_t get_root_window(void);
|
||||
bool get_window_visible(xcb_window_t window);
|
||||
xcb_window_t get_transient_window_for(xcb_window_t window);
|
||||
|
||||
typedef struct window_geometry_t {
|
||||
int32_t x, y;
|
||||
uint32_t width, height, border_width;
|
||||
} window_geometry_t;
|
||||
/**
|
||||
* @brief 获取窗口的几何信息
|
||||
* @returns 返回几何信息指针,使用完后记得使用 free 释放内存
|
||||
*/
|
||||
window_geometry_t *get_window_geometry(xcb_window_t window);
|
||||
void map_window(xcb_window_t window);
|
||||
/**
|
||||
* @brief 获取窗口名
|
||||
* @returns 返回窗口名字符串指针,使用完后记得使用 free 释放内存
|
||||
*/
|
||||
char *get_window_name(xcb_window_t window);
|
||||
void init_window_event_mask(xcb_window_t window);
|
||||
void change_window_border_color(xcb_window_t window, uint32_t argb);
|
||||
|
||||
typedef struct bar_cairo_params_t {
|
||||
xcb_connection_t *conn;
|
||||
@@ -32,6 +55,8 @@ bar_cairo_params_t *create_bar_window(int16_t x, int16_t y, uint16_t width,
|
||||
uint16_t height, uint32_t background_argb,
|
||||
cursor_t cursor);
|
||||
void destroy_window(xcb_window_t window);
|
||||
void configure_window(xcb_window_t window, int32_t x, int32_t y, uint32_t width,
|
||||
uint32_t height, uint32_t border_width);
|
||||
|
||||
typedef struct monitor_rect_t monitor_rect_t;
|
||||
struct monitor_rect_t {
|
||||
|
||||
Reference in New Issue
Block a user