创建每个屏幕对应的信息条窗口
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <X11/cursorfont.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <xcb/xproto.h>
|
||||
@@ -7,6 +8,28 @@
|
||||
bool has_other_wm_running(void);
|
||||
int get_xcb_connection_fd(void);
|
||||
|
||||
typedef enum cursor_t {
|
||||
cursor_normal = XC_left_ptr,
|
||||
cursor_resize = XC_bottom_right_corner,
|
||||
cursor_move = XC_fleur,
|
||||
} cursor_t;
|
||||
void change_window_cursor(xcb_window_t window, cursor_t cursor);
|
||||
void set_root_cursor(cursor_t cursor);
|
||||
|
||||
typedef struct bar_cairo_params_t {
|
||||
xcb_connection_t *conn;
|
||||
xcb_window_t window;
|
||||
xcb_visualtype_t *visual;
|
||||
} bar_cairo_params_t;
|
||||
/**
|
||||
* @brief 创建每个屏幕的 bar 窗口
|
||||
* @returns 返回创建 cairo surface 需要的参数,使用完记得使用 free 释放内存
|
||||
*/
|
||||
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);
|
||||
|
||||
typedef struct monitor_rect_t monitor_rect_t;
|
||||
struct monitor_rect_t {
|
||||
int32_t x;
|
||||
|
||||
Reference in New Issue
Block a user