core: 窗口分层类型与接口草案
This commit is contained in:
50
src/core/window.h
Normal file
50
src/core/window.h
Normal file
@@ -0,0 +1,50 @@
|
||||
#pragma once
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include "core/types.h"
|
||||
|
||||
/* Internal semantic window types mapped from backend-specific protocols. */
|
||||
typedef enum window_type_t {
|
||||
ZDWM_WINDOW_TYPE_NORMAL = 0,
|
||||
ZDWM_WINDOW_TYPE_DESKTOP,
|
||||
ZDWM_WINDOW_TYPE_DOCK,
|
||||
ZDWM_WINDOW_TYPE_TOOLBAR,
|
||||
ZDWM_WINDOW_TYPE_DIALOG,
|
||||
ZDWM_WINDOW_TYPE_UTILITY,
|
||||
ZDWM_WINDOW_TYPE_SPLASH,
|
||||
ZDWM_WINDOW_TYPE_MENU,
|
||||
ZDWM_WINDOW_TYPE_DROPDOWN_MENU,
|
||||
ZDWM_WINDOW_TYPE_POPUP_MENU,
|
||||
ZDWM_WINDOW_TYPE_TOOLTIP,
|
||||
ZDWM_WINDOW_TYPE_COMBO,
|
||||
ZDWM_WINDOW_TYPE_DND,
|
||||
ZDWM_WINDOW_TYPE_NOTIFICATION,
|
||||
} window_type_t;
|
||||
|
||||
/* Internal semantic window states mapped from backend-specific protocols. */
|
||||
typedef enum window_state_t {
|
||||
ZDWM_WINDOW_STATE_ABOVE = 0,
|
||||
ZDWM_WINDOW_STATE_FULLSCREEN,
|
||||
ZDWM_WINDOW_STATE_MODAL,
|
||||
ZDWM_WINDOW_STATE_STICKY,
|
||||
} window_state_t;
|
||||
|
||||
typedef struct window_props_t {
|
||||
window_id_t transient_for;
|
||||
|
||||
bool override_redirect;
|
||||
|
||||
window_type_t *types;
|
||||
size_t type_count;
|
||||
|
||||
window_state_t *states;
|
||||
size_t state_count;
|
||||
} window_props_t;
|
||||
|
||||
typedef struct window_metadata_t {
|
||||
const char *title;
|
||||
const char *app_id;
|
||||
const char *class_name;
|
||||
const char *instance_name;
|
||||
} window_metadata_t;
|
||||
Reference in New Issue
Block a user