77 lines
1.8 KiB
C
77 lines
1.8 KiB
C
#pragma once
|
|
|
|
#include <stdint.h>
|
|
#include <xcb/xcb_keysyms.h>
|
|
#include <xcb/xcb_xrm.h>
|
|
#include <xkbcommon/xkbcommon.h>
|
|
|
|
#include "base.h"
|
|
#include "status.h"
|
|
#include "types.h"
|
|
#include "wallpaper.h"
|
|
|
|
typedef struct config_t config_t;
|
|
|
|
typedef struct wm_t {
|
|
padding_t padding;
|
|
uint16_t border_width;
|
|
uint16_t bar_height;
|
|
uint16_t layout_count;
|
|
|
|
bool need_restart;
|
|
GMainLoop *loop;
|
|
status_t *status;
|
|
const config_t *config;
|
|
|
|
client_t *client_list;
|
|
client_t *client_stack_list;
|
|
client_t *client_focused;
|
|
monitor_t *monitor_list;
|
|
monitor_t *current_monitor;
|
|
bool ignore_enter_notify;
|
|
point_t ignored_enter_notify_point;
|
|
guint clear_ignore_enter_notify_source;
|
|
const layout_t *layout_list;
|
|
|
|
char *font_family;
|
|
uint32_t font_size;
|
|
uint32_t dpi;
|
|
const rule_t *rules;
|
|
uint32_t rules_count;
|
|
|
|
xcb_connection_t *xcb_conn;
|
|
xcb_screen_t *screen;
|
|
xcb_xrm_database_t *xrm;
|
|
xcb_key_symbols_t *key_symbols;
|
|
xcb_window_t wm_check_window;
|
|
int default_screen;
|
|
bool have_xfixes;
|
|
bool have_xinerama;
|
|
bool have_randr;
|
|
bool have_xkb;
|
|
|
|
uint8_t event_base_xkb;
|
|
bool xkb_reload_keymap;
|
|
bool xkb_update_pending;
|
|
struct xkb_context *xkb_ctx;
|
|
struct xkb_state *xkb_state;
|
|
|
|
wallpaper_context_t *wallpaper;
|
|
|
|
color_set_t color_set;
|
|
} wm_t;
|
|
|
|
extern wm_t wm;
|
|
|
|
void wm_restart(void);
|
|
void wm_quit(void);
|
|
void wm_restack_clients(void);
|
|
void wm_ignore_enter_notify_at_point(point_t point);
|
|
bool wm_should_ignore_enter_notify(const xcb_enter_notify_event_t *ev);
|
|
void wm_set_current_monitor(monitor_t *monitor, bool restore_cursor);
|
|
monitor_t *__attribute__((returns_nonnull)) wm_get_monitor_by_area(area_t area);
|
|
monitor_t *__attribute__((returns_nonnull)) wm_get_monitor_by_point(
|
|
point_t point);
|
|
monitor_t *wm_get_monitor_by_window(xcb_window_t window);
|
|
monitor_t *wm_get_next_monitor(monitor_t *monitor);
|