19#include <fmt/format.h>
100#if !(defined(WIN32) || defined(__APPLE__))
112#define GHOST_WINDOW_STATE_DEFAULT GHOST_kWindowStateMaximized
183 uint32_t uiwidth, uiheight;
188 r_size[1] = uiheight;
194 uint32_t uiwidth, uiheight;
199 r_size[1] = uiheight;
229 if (win == wm->
runtime->winactive) {
230 wm->
runtime->winactive =
nullptr;
264 if (wt->win == win && wt->event_type ==
TIMERJOBS) {
274 if (wt->win == win) {
312 if (id <= win->
winid) {
330 win->
runtime = MEM_new<blender::bke::WindowRuntime>(__func__);
338 const bool duplicate_layout,
356 bmain, workspace, layout_old, win_dst) :
367 const bool duplicate_layout,
442 return &
U.stored_bounds.image;
445 return &
U.stored_bounds.userpref;
448 return &
U.stored_bounds.graph;
451 return &
U.stored_bounds.info;
454 return &
U.stored_bounds.outliner;
457 return &
U.stored_bounds.file;
480 U.runtime.is_dirty =
true;
488 win_other = win_other->
next)
495 if (win->
parent ==
nullptr && win_other ==
nullptr) {
502 if (iter_win->parent == win) {
530 if ((screen && screen->
temp) || is_single_editor) {
547 GHOST_WindowHandle handle =
static_cast<GHOST_WindowHandle
>(win->
ghostwin);
559 const char *
name =
"Blender";
579 strlen(filepath_as_bytes),
582 sizeof(_filepath_utf8_buf));
585 const bool has_filepath = filepath[0] !=
'\0';
587 const bool include_filepath = has_filepath && (filepath != filename) && !native_filepath_display;
590 std::string win_title = wm->
file_saved ?
"" :
"* ";
593 if (include_filepath) {
595 win_title.append(filename, filename_no_ext_len);
597 else if (has_filepath) {
598 win_title.append(filename);
603 win_title.append(
IFACE_(
"Untitled"));
605 win_title.append(
IFACE_(
"(Unsaved)"));
610 win_title.append(
IFACE_(
" (Recovered)"));
613 if (include_filepath) {
614 bool add_filepath =
true;
626 size_t home_dir_len = strlen(home_dir);
628 while (home_dir_len && home_dir[home_dir_len - 1] ==
SEP) {
631 if ((home_dir_len > 0) &&
BLI_path_ncmp(home_dir, filepath_as_bytes, home_dir_len) == 0) {
632 if (filepath_as_bytes[home_dir_len] ==
SEP) {
633 win_title.append(fmt::format(
" [~{}]", filepath + home_dir_len));
634 add_filepath =
false;
640 win_title.append(fmt::format(
" [{}]", filepath));
661 auto_dpi =
max_ff(auto_dpi, 96.0f);
665 if (
U.ui_scale == 0) {
669 U.ui_scale = virtual_pixel;
672 U.ui_scale = (virtual_pixel *
U.dpi * 96.0f) / (auto_dpi * 72.0f);
675 CLAMP(
U.ui_scale, 0.25f, 4.0f);
682 U.dpi = auto_dpi *
U.ui_scale * (72.0 / 96.0f);
685 int pixelsize =
max_ii(1, (
U.dpi / 64));
687 pixelsize =
max_ii(1, pixelsize +
U.ui_line_width);
690 U.pixelsize = pixelsize;
692 U.scale_factor =
U.dpi / 72.0f;
693 U.inv_scale_factor = 1.0f /
U.scale_factor;
697 U.widget_unit = int(
roundf(18.0f *
U.scale_factor)) + (2 * pixelsize);
702 GHOST_WindowHandle win_handle =
static_cast<GHOST_WindowHandle
>(win->
ghostwin);
703 const uint16_t dpi_base = 96;
704 const uint16_t dpi_fixed = std::max<uint16_t>(dpi_base,
GHOST_GetDPIHint(win_handle));
705 float dpi =
float(dpi_fixed);
709 return dpi /
float(dpi_base);
721 static_cast<GHOST_WindowHandle
>(win->
ghostwin));
729 return wm_style_flags;
743 static_cast<GHOST_WindowHandle
>(win->
ghostwin),
768 float titlebar_bg_color[3];
773 decoration_settings);
797 const uint8_t keymodifier_sided[2] = {
801 const uint8_t keymodifier = keymodifier_sided[0] | keymodifier_sided[1];
803 if (keymodifier != keymodifier_eventstate) {
811 for (
int side = 0; side < 2; side++) {
824 for (
int side = 0; side < 2; side++) {
862 const uint8_t keymodifier_unhandled = keymodifier_eventstate &
863 ~(keymodifier_l | keymodifier_r);
864 const uint8_t keymodifier_sided[2] = {
865 uint8_t(keymodifier_l | keymodifier_unhandled),
874 for (
int side = 0; side < 2; side++) {
939 posy = (scr_size[1] - win->
posy - win->
sizey);
992 float window_bg_color[3];
998 GPU_clear_color(window_bg_color[0], window_bg_color[1], window_bg_color[2], 1.0f);
1006 GPU_clear_color(window_bg_color[0], window_bg_color[1], window_bg_color[2], 1.0f);
1115 if (win->ghostwin ==
nullptr) {
1125 static_cast<GHOST_WindowHandle
>(win->
ghostwin));
1141 posy = scr_size[1] - t - win->
sizey;
1145 if (win->
sizex != sizex || win->
sizey != sizey || win->
posx != posx || win->
posy != posy) {
1157 const rcti *rect_unscaled,
1163 void (*area_setup_fn)(
bScreen *screen,
ScrArea *area,
void *user_data),
1164 void *area_setup_user_data)
1171 int x = rect_unscaled->
xmin;
1172 int y = rect_unscaled->
ymin;
1181 static_cast<GHOST_WindowHandle
>(win_prev->
ghostwin));
1183 rect.
xmin =
x / native_pixel_size;
1184 rect.
ymin =
y / native_pixel_size;
1185 sizex /= native_pixel_size;
1186 sizey /= native_pixel_size;
1190 rect.
xmin += win_prev->
posx - (sizex / 2);
1191 rect.
ymin += win_prev->
posy - (sizey / 2);
1195 rect.
xmin += win_prev->
posx + ((win_prev->
sizex - sizex) / 2);
1196 rect.
ymin += win_prev->
posy + ((win_prev->
sizey - sizey) / 2);
1224 if (win ==
nullptr) {
1225 win =
wm_window_new(bmain, wm, toplevel ?
nullptr : win_prev, dialog);
1240 if (screen ==
nullptr) {
1256 screen->
temp = temp;
1260 const bool new_window = (win->
ghostwin ==
nullptr);
1272 if (area_setup_fn) {
1282 area_setup_fn(screen, area, area_setup_user_data);
1323 const bool bounds_valid = (stored_bounds && (
BLI_rctf_size_x(stored_bounds) > 150.0f) &&
1327 if (bounds_valid && mm_placement) {
1337 const int height = int((bounds_valid ?
BLI_rctf_size_y(stored_bounds) : 600.0f) *
1341 rect.
xmin =
event->xy[0];
1342 rect.
ymin =
event->xy[1];
1343 rect.
xmax =
event->xy[0] + width;
1344 rect.
ymax =
event->xy[1] + height;
1349 C, title, &rect, space_type,
false, dialog,
true, align,
nullptr,
nullptr);
1372 const rcti window_rect = {
1374 int(win_src->
sizex * 0.95f),
1376 int(win_src->
sizey * 0.9f),
1388 nullptr) !=
nullptr);
1418 static_cast<GHOST_WindowHandle
>(window->
ghostwin));
1503 wm->
runtime->windrawable = win;
1512 if (wm->
runtime->windrawable) {
1513 wm->
runtime->windrawable =
nullptr;
1526 printf(
"%s: set drawable %d\n", __func__, win->
winid);
1544 if (wm ==
nullptr) {
1565 constexpr uint64_t event_time_ok_ms = 1000;
1567 constexpr uint64_t event_time_error_ms = 5000;
1569 static uint64_t event_ms_ref_last = std::numeric_limits<uint64_t>::max();
1571 const uint64_t event_ms_ref = event_ms_ref_last;
1574 event_ms_ref_last = event_ms;
1576 if (event_ms_ref == std::numeric_limits<uint64_t>::max()) {
1583 if (event_ms_ref < event_time_error_ms || (event_ms_ref < (now_ms - event_time_ok_ms)) ||
1584 (event_ms_ref > (now_ms + event_time_ok_ms)))
1594 double time_delta = 0.0;
1595 if (event_ms < (event_ms_ref - event_time_error_ms)) {
1597 time_delta = double(now_ms - event_ms) / -1000.0;
1599 else if (event_ms > (event_ms_ref + event_time_error_ms)) {
1601 time_delta = double(event_ms - now_ms) / 1000.0;
1608 const char *time_unit =
"seconds";
1612 } unit_table[] = {{
"minutes", 60}, {
"hours", 60}, {
"days", 24}, {
"weeks", 7}, {
"years", 52}};
1614 if (std::abs(time_delta) <= unit_table[
i].scale) {
1617 time_delta /= unit_table[
i].scale;
1618 time_unit = unit_table[
i].unit;
1622 "GHOST: suspicious time-stamp from far in the %s: %.2f %s, "
1623 "absolute value is %" PRIu64 ", current time is %" PRIu64 ", for type %d\n",
1624 time_delta < 0.0f ?
"past" :
"future",
1625 std::abs(time_delta),
1681 puts(
"<!> event has no window");
1686 puts(
"<!> event has invalid window");
1744 printf(
"%s: ghost redraw %d\n", __func__, win->
winid);
1754 printf(
"%s: ghost redraw decor %d\n", __func__, win->
winid);
1771 static_cast<GHOST_WindowHandle
>(win->
ghostwin));
1790 const char *state_str;
1794 state_str =
"normal";
1797 state_str =
"minimized";
1800 state_str =
"maximized";
1803 state_str =
"full-screen";
1806 state_str =
"<unknown>";
1809 printf(
"%s: window %d state = %s\n", __func__, win->
winid, state_str);
1812 printf(
"win move event pos %d %d size %d %d\n",
1825#if defined(__APPLE__) || defined(WIN32)
1827 int dummy_sleep_ms = 0;
1849 const char *path =
static_cast<const char *
>(
data);
1903 event.customdata = &wm->
runtime->drags;
1904 event.customdata_free =
true;
1930 std::string *
str = MEM_new<std::string>(__func__,
static_cast<const char *
>(ddd->
data));
1938 float prev_pixelsize =
U.pixelsize;
1941 if (
U.pixelsize != prev_pixelsize) {
1993 bool has_event =
false;
1995 const int sleep_us = *sleep_us_p;
1997 double ntime_min = DBL_MAX;
2004 if (wt->sleep ==
true) {
2009 if (wt->time_next >= time) {
2010 if ((has_event ==
false) && (sleep_us != 0)) {
2012 ntime_min = std::min(wt->time_next, ntime_min);
2017 wt->time_delta = time - wt->time_last;
2018 wt->time_duration += wt->time_delta;
2019 wt->time_last = time;
2021 wt->time_next = wt->time_start;
2022 if (wt->time_step != 0.0f) {
2023 wt->time_next += wt->time_step *
ceil(wt->time_duration / wt->time_step);
2035 else if (
wmWindow *win = wt->win) {
2039 event.type = wt->event_type;
2044 event.customdata = wt;
2051 if ((has_event ==
false) && (sleep_us != 0) && (ntime_min != DBL_MAX)) {
2056 const double microseconds = 1000000.0;
2057 const double sleep_sec = double(sleep_us) / microseconds;
2058 const double sleep_sec_next = ntime_min - time;
2060 if (sleep_sec_next < sleep_sec) {
2061 *sleep_us_p = int(std::ceil(sleep_sec_next * microseconds));
2083 const int sleep_us_default = 5000;
2084 int sleep_us = has_event ? 0 : sleep_us_default;
2086#ifdef WITH_XR_OPENXR
2113 BLI_assert_msg(!
G.background,
"Use wm_ghost_init_background instead");
2115 GHOST_EventConsumerHandle consumer;
2131#if !(defined(WIN32) || defined(__APPLE__))
2183#if !(defined(WIN32) || defined(__APPLE__))
2189 return g_system ?
"DEFAULT" :
"NONE";
2195 switch (gpu_backend) {
2200#ifdef WITH_OPENGL_BACKEND
2201 return GHOST_kDrawingContextTypeOpenGL;
2206#ifdef WITH_VULKAN_BACKEND
2207 return GHOST_kDrawingContextTypeVulkan;
2212#ifdef WITH_METAL_BACKEND
2213 return GHOST_kDrawingContextTypeMetal;
2249 std::string message =
RPT_(
"Updating GPU drivers may solve this issue.");
2251 "The graphics backend can be changed in the System section of the Preferences.");
2253 RPT_(
"Failed to load using Vulkan, using OpenGL instead."),
2339 timer->sleep = do_sleep;
2345 const double time_step)
2367 const double time_step)
2403 timer->customdata =
nullptr;
2418 wm->
runtime->reports.reporttimer =
nullptr;
2423 if (event->customdata ==
timer) {
2424 event->customdata =
nullptr;
2437 timer->customdata =
nullptr;
2477 if (buf_src ==
nullptr) {
2480 size_t size = strlen(buf_src) + 1;
2481 char *buf =
static_cast<char *
>(malloc(
size));
2482 memcpy(buf, buf_src,
size);
2513 const bool ensure_utf8,
2514 const bool firstline)
2527 int buf_len = strlen(buf);
2543 for (
char *p = buf; *p; p++) {
2544 if (!
ELEM(*p,
'\n',
'\r')) {
2553 for (
char *p = buf; *p; p++) {
2564 *r_len = (p2 - newbuf);
2581 if (!
G.background) {
2588 for (p = buf; *p; p++) {
2599 for (p = buf, p2 = newbuf; *p; p++, p2++) {
2746 const int event_xy[2],
2747 int r_event_xy_other[2])
2853 switch (
U.tablet_api) {
2875 int oldx =
x, oldy =
y;
2902 return int(fac *
float(win->
sizex));
2908 return int(fac *
float(win->
sizey));
2933 rcti window_rect, screen_rect;
2936 screen_rect = window_rect;
2946 switch (global_area->global->align) {
2948 screen_rect.
ymax -= height;
2951 screen_rect.
ymin += height;
2961 *r_rect = screen_rect;
2981 if ((win->
parent !=
nullptr) || screen->
temp) {
3049 bool changed =
false;
3052 if (win_parent->
scene != scene) {
3058 if (win_child->parent == win_parent && win_child->
scene != scene) {
3077 if (scene ==
nullptr) {
3104 if ((win_iter == win_parent) || (win_iter->parent == win_parent)) {
3136 if (win_child->parent == win_parent) {
3173 return (screen && screen->
temp != 0);
3182#ifdef WITH_INPUT_IME
3183void wm_window_IME_begin(
wmWindow *win,
int x,
int y,
int w,
int h,
bool complete)
3197 static_cast<GHOST_WindowHandle
>(win->
ghostwin),
x, win->
sizey -
y,
w, h, complete);
3200void wm_window_IME_end(
wmWindow *win)
3214 MEM_delete(win->
runtime->ime_data);
3215 win->
runtime->ime_data =
nullptr;
3216 win->
runtime->ime_data_is_composing =
false;
3276 const char *message,
3277 const char *help_label,
3278 const char *continue_label,
const char * BKE_blender_version_string(void)
bScreen * CTX_wm_screen(const bContext *C)
wmWindow * CTX_wm_window(const bContext *C)
Scene * CTX_data_scene(const bContext *C)
void CTX_wm_window_set(bContext *C, wmWindow *win)
Main * CTX_data_main(const bContext *C)
void CTX_wm_area_set(bContext *C, ScrArea *area)
wmWindowManager * CTX_wm_manager(const bContext *C)
ViewLayer * CTX_data_view_layer(const bContext *C)
@ G_FLAG_GPU_BACKEND_FALLBACK_QUIET
@ G_FLAG_GPU_BACKEND_FALLBACK
void BKE_icon_changed(int icon_id)
ViewLayer * BKE_view_layer_default_view(const Scene *scene)
ViewLayer * BKE_view_layer_find(const Scene *scene, const char *layer_name)
const char * BKE_main_blendfile_path_from_global()
void BKE_report(ReportList *reports, eReportType type, const char *message)
void BKE_screen_area_map_free(ScrAreaMap *area_map) ATTR_NONNULL()
ScrArea * BKE_screen_find_big_area(const bScreen *screen, int spacetype, short min)
WorkSpaceInstanceHook * BKE_workspace_instance_hook_create(const Main *bmain, int winid)
void BKE_workspace_instance_hook_free(const Main *bmain, WorkSpaceInstanceHook *hook)
bScreen * BKE_workspace_layout_screen_get(const WorkSpaceLayout *layout) GETTER_ATTRS
void BKE_workspace_active_screen_set(WorkSpaceInstanceHook *hook, int winid, WorkSpace *workspace, bScreen *screen) SETTER_ATTRS
void BKE_workspace_layout_remove(Main *bmain, WorkSpace *workspace, WorkSpaceLayout *layout) ATTR_NONNULL()
void BKE_workspace_active_layout_set(WorkSpaceInstanceHook *hook, int winid, WorkSpace *workspace, WorkSpaceLayout *layout) SETTER_ATTRS
Activate a layout.
bScreen * BKE_workspace_active_screen_get(const WorkSpaceInstanceHook *hook) GETTER_ATTRS
WorkSpace * BKE_workspace_active_get(WorkSpaceInstanceHook *hook) GETTER_ATTRS
void BKE_workspace_active_set(WorkSpaceInstanceHook *hook, WorkSpace *workspace) SETTER_ATTRS
WorkSpaceLayout * BKE_workspace_active_layout_get(const WorkSpaceInstanceHook *hook) GETTER_ATTRS
#define BLI_assert_unreachable()
#define BLI_assert_msg(a, msg)
File and directory operations.
const char * BLI_dir_home(void)
void BLI_kdtree_nd_ free(KDTree *tree)
int BLI_findindex(const ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
#define LISTBASE_FOREACH(type, var, list)
#define LISTBASE_FOREACH_MUTABLE(type, var, list)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_remlink(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void void BLI_INLINE bool BLI_listbase_is_single(const ListBase *lb)
MINLINE float max_ff(float a, float b)
MINLINE int max_ii(int a, int b)
MINLINE void copy_v2_v2_int(int r[2], const int a[2])
MINLINE void copy_v3_v3(float r[3], const float a[3])
void void void const char * BLI_path_basename(const char *path) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT
const char * BLI_path_extension_or_end(const char *filepath) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL
bool BLI_rcti_isect_pt_v(const struct rcti *rect, const int xy[2])
BLI_INLINE int BLI_rcti_size_y(const struct rcti *rct)
bool BLI_rcti_is_valid(const struct rcti *rect)
void BLI_rcti_init(struct rcti *rect, int xmin, int xmax, int ymin, int ymax)
void BLI_rcti_resize_y(struct rcti *rect, int y)
BLI_INLINE int BLI_rcti_size_x(const struct rcti *rct)
void BLI_rcti_resize_x(struct rcti *rect, int x)
BLI_INLINE float BLI_rctf_size_x(const struct rctf *rct)
BLI_INLINE float BLI_rctf_size_y(const struct rctf *rct)
char * BLI_strdup(const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC
const char * BLI_str_utf8_invalid_substitute_if_needed(const char *str, size_t str_len, const char substitute, char *buf, const size_t buf_maxncpy) ATTR_NONNULL(1
int BLI_str_utf8_invalid_strip(char *str, size_t str_len) ATTR_NONNULL(1)
#define STRNCPY_UTF8(dst, src)
void BLI_system_backtrace(FILE *fp)
int BLI_thread_is_main(void)
Platform independent time functions.
double BLI_time_now_seconds(void)
void BLI_time_sleep_precise_us(int us)
#define ENUM_OPERATORS(_type, _max)
#define POINTER_AS_UINT(i)
#define POINTER_FROM_UINT(i)
#define CLOG_STR_ERROR(clg_ref, str)
#define CLOG_INFO_NOCHECK(clg_ref, format,...)
#define CLOG_INFO(clg_ref,...)
These structs are the foundation for all linked lists in the library system.
@ GLOBAL_AREA_ALIGN_BOTTOM
@ USER_NO_MULTITOUCH_GESTURES
int ED_file_extension_icon(const char *path)
void ED_render_view_layer_changed(Main *bmain, bScreen *screen)
void ED_scene_change_update(Main *bmain, Scene *scene, ViewLayer *layer) ATTR_NONNULL()
void ED_area_newspace(bContext *C, ScrArea *area, int type, bool skip_region_exit)
WorkSpaceLayout * ED_workspace_layout_add(Main *bmain, WorkSpace *workspace, wmWindow *win, const char *name) ATTR_NONNULL()
int ED_area_global_size_y(const ScrArea *area)
void ED_screen_scene_change(bContext *C, wmWindow *win, Scene *scene, bool refresh_toolsystem)
void ED_screen_refresh(bContext *C, wmWindowManager *wm, wmWindow *win)
void ED_screen_global_areas_refresh(wmWindow *win)
bool ED_screen_change(bContext *C, bScreen *screen)
Change the active screen.
void ED_screen_exit(bContext *C, wmWindow *window, bScreen *screen)
blender::StringRefNull ED_area_name(const ScrArea *area)
void ED_workspace_scene_data_sync(WorkSpaceInstanceHook *hook, Scene *scene) ATTR_NONNULL()
WorkSpaceLayout * ED_workspace_layout_duplicate(Main *bmain, WorkSpace *workspace, const WorkSpaceLayout *layout_old, wmWindow *win) ATTR_NONNULL()
bool ED_workspace_change(WorkSpace *workspace_new, bContext *C, wmWindowManager *wm, wmWindow *win) ATTR_NONNULL()
Change the active workspace.
GHOST C-API function and type declarations.
GHOST_TWindowState GHOST_GetWindowState(GHOST_WindowHandle windowhandle)
GHOST_TSuccess GHOST_putClipboardImage(uint *rgba, int width, int height)
GHOST_TSuccess GHOST_GetCursorPosition(const GHOST_SystemHandle systemhandle, const GHOST_WindowHandle windowhandle, int32_t *x, int32_t *y)
GHOST_ContextHandle GHOST_CreateGPUContext(GHOST_SystemHandle systemhandle, GHOST_GPUSettings gpu_settings)
GHOST_TSuccess GHOST_SetWindowOrder(GHOST_WindowHandle windowhandle, GHOST_TWindowOrder order)
GHOST_TUserDataPtr GHOST_GetWindowUserData(GHOST_WindowHandle windowhandle)
GHOST_TSuccess GHOST_SwapWindowBufferRelease(GHOST_WindowHandle windowhandle)
GHOST_TSuccess GHOST_SetClientSize(GHOST_WindowHandle windowhandle, uint32_t width, uint32_t height)
GHOST_TSuccess GHOST_hasClipboardImage(void)
GHOST_TSuccess GHOST_SetCursorPosition(GHOST_SystemHandle systemhandle, GHOST_WindowHandle windowhandle, int32_t x, int32_t y)
void GHOST_ShowMessageBox(GHOST_SystemHandle systemhandle, const char *title, const char *message, const char *help_label, const char *continue_label, const char *link, GHOST_DialogOptions dialog_options)
void GHOST_SetWindowDecorationStyleSettings(GHOST_WindowHandle windowhandle, GHOST_WindowDecorationStyleSettings decoration_settings)
void GHOST_ClientToScreen(GHOST_WindowHandle windowhandle, int32_t inX, int32_t inY, int32_t *outX, int32_t *outY)
GHOST_TCapabilityFlag GHOST_GetCapabilities(void)
GHOST_WindowHandle GHOST_GetWindowUnderCursor(GHOST_SystemHandle systemhandle, int32_t x, int32_t y)
GHOST_EventConsumerHandle GHOST_CreateEventConsumer(GHOST_EventCallbackProcPtr eventCallback, GHOST_TUserDataPtr user_data)
GHOST_SystemHandle GHOST_CreateSystem(void)
GHOST_TSuccess GHOST_AddEventConsumer(GHOST_SystemHandle systemhandle, GHOST_EventConsumerHandle consumerhandle)
GHOST_SystemHandle GHOST_CreateSystemBackground(void)
GHOST_TSuccess GHOST_GetAllDisplayDimensions(GHOST_SystemHandle systemhandle, uint32_t *r_width, uint32_t *r_height)
uint16_t GHOST_GetDPIHint(GHOST_WindowHandle windowhandle)
uint32_t GHOST_GetCursorPreferredLogicalSize(const GHOST_SystemHandle systemhandle)
GHOST_TSuccess GHOST_SwapWindowBufferAcquire(GHOST_WindowHandle windowhandle)
void GHOST_DisposeRectangle(GHOST_RectangleHandle rectanglehandle)
GHOST_TSuccess GHOST_SetPath(GHOST_WindowHandle windowhandle, const char *filepath)
void GHOST_UseWindowFocus(bool use_focus)
bool GHOST_ProcessEvents(GHOST_SystemHandle systemhandle, bool waitForEvent)
void GHOST_SetTitle(GHOST_WindowHandle windowhandle, const char *title)
void GHOST_SetWindowDecorationStyleFlags(GHOST_WindowHandle windowhandle, GHOST_TWindowDecorationStyleFlags style_flags)
void GHOST_BeginIME(GHOST_WindowHandle windowhandle, int32_t x, int32_t y, int32_t w, int32_t h, bool complete)
GHOST_TSuccess GHOST_ReleaseGPUContext(GHOST_ContextHandle contexthandle)
void GHOST_ScreenToClient(GHOST_WindowHandle windowhandle, int32_t inX, int32_t inY, int32_t *outX, int32_t *outY)
char * GHOST_getClipboard(bool selection)
uint64_t GHOST_GetEventTime(GHOST_EventHandle eventhandle)
GHOST_TSuccess GHOST_SetProgressBar(GHOST_WindowHandle windowhandle, float progress)
GHOST_TSuccess GHOST_DisposeWindow(GHOST_SystemHandle systemhandle, GHOST_WindowHandle windowhandle)
GHOST_TSuccess GHOST_ActivateGPUContext(GHOST_ContextHandle contexthandle)
GHOST_TSuccess GHOST_SetWindowState(GHOST_WindowHandle windowhandle, GHOST_TWindowState state)
void GHOST_SetBacktraceHandler(GHOST_TBacktraceFn backtrace_fn)
GHOST_TSuccess GHOST_SetWindowModifiedState(GHOST_WindowHandle windowhandle, bool is_unsaved_changes)
void GHOST_SetTabletAPI(GHOST_SystemHandle systemhandle, GHOST_TTabletAPI api)
void GHOST_SetMultitouchGestures(GHOST_SystemHandle systemhandle, const bool use)
GHOST_TEventDataPtr GHOST_GetEventData(GHOST_EventHandle eventhandle)
GHOST_WindowHDRInfo GHOST_WindowGetHDRInfo(GHOST_WindowHandle windowhandle)
uint * GHOST_getClipboardImage(int *r_width, int *r_height)
GHOST_TSuccess GHOST_ActivateWindowDrawingContext(GHOST_WindowHandle windowhandle)
GHOST_TSuccess GHOST_GetModifierKeyState(GHOST_SystemHandle systemhandle, GHOST_TModifierKey mask, bool *r_is_down)
bool GHOST_ValidWindow(GHOST_SystemHandle systemhandle, GHOST_WindowHandle windowhandle)
float GHOST_GetNativePixelSize(GHOST_WindowHandle windowhandle)
GHOST_TEventType GHOST_GetEventType(GHOST_EventHandle eventhandle)
bool GHOST_IsDialogWindow(GHOST_WindowHandle windowhandle)
void GHOST_SystemInitDebug(GHOST_SystemHandle systemhandle, GHOST_Debug debug)
GHOST_TSuccess GHOST_ApplyWindowDecorationStyle(GHOST_WindowHandle windowhandle)
void GHOST_putClipboard(const char *buffer, bool selection)
void GHOST_SetWindowUserData(GHOST_WindowHandle windowhandle, GHOST_TUserDataPtr user_data)
const char * GHOST_SystemBackend(void)
GHOST_WindowHandle GHOST_GetEventWindow(GHOST_EventHandle eventhandle)
void GHOST_GetRectangle(GHOST_RectangleHandle rectanglehandle, int32_t *l, int32_t *t, int32_t *r, int32_t *b)
GHOST_TWindowDecorationStyleFlags GHOST_GetWindowDecorationStyleFlags(GHOST_WindowHandle windowhandle)
void GHOST_EndIME(GHOST_WindowHandle windowhandle)
bool GHOST_UseNativePixels(void)
GHOST_WindowHandle GHOST_CreateWindow(GHOST_SystemHandle systemhandle, GHOST_WindowHandle parent_windowhandle, const char *title, int32_t left, int32_t top, uint32_t width, uint32_t height, GHOST_TWindowState state, bool is_dialog, GHOST_GPUSettings gpu_settings)
void GHOST_DispatchEvents(GHOST_SystemHandle systemhandle)
GHOST_TSuccess GHOST_DisposeGPUContext(GHOST_SystemHandle systemhandle, GHOST_ContextHandle contexthandle)
GHOST_TSuccess GHOST_EndProgressBar(GHOST_WindowHandle windowhandle)
void GHOST_UseWindowFrame(bool use_window_frame)
GHOST_TSuccess GHOST_SetSwapInterval(GHOST_WindowHandle windowhandle, int interval)
GHOST_RectangleHandle GHOST_GetClientBounds(GHOST_WindowHandle windowhandle)
GHOST_TSuccess GHOST_DisposeSystem(GHOST_SystemHandle systemhandle)
uint64_t GHOST_GetMilliSeconds(GHOST_SystemHandle systemhandle)
GHOST_TSuccess GHOST_GetSwapInterval(GHOST_WindowHandle windowhandle, int *r_interval)
GHOST_TSuccess GHOST_GetMainDisplayDimensions(GHOST_SystemHandle systemhandle, uint32_t *r_width, uint32_t *r_height)
@ GHOST_kWindowStateMinimized
@ GHOST_kWindowStateMaximized
@ GHOST_kWindowStateNormal
@ GHOST_kWindowStateFullScreen
void * GHOST_TUserDataPtr
@ GHOST_kEventWindowClose
@ GHOST_kEventDraggingDropDone
@ GHOST_kEventNativeResolutionChange
@ GHOST_kEventOpenMainFile
@ GHOST_kEventWindowActivate
@ GHOST_kEventWindowUpdateDecor
@ GHOST_kEventWindowUpdate
@ GHOST_kEventWindowDeactivate
@ GHOST_kEventWindowDPIHintChanged
@ GHOST_kEventQuitRequest
@ GHOST_kCapabilityWindowPosition
@ GHOST_kCapabilityClipboardPrimary
@ GHOST_kCapabilityKeyboardHyperKey
@ GHOST_kCapabilityCursorRGBA
@ GHOST_kCapabilityGPUReadFrontBuffer
@ GHOST_kCapabilityCursorWarp
@ GHOST_kCapabilityInputIME
@ GHOST_kCapabilityCursorGenerator
@ GHOST_kCapabilityTrackpadPhysicalDirection
@ GHOST_kCapabilityMultiMonitorPlacement
@ GHOST_kCapabilityClipboardImage
@ GHOST_kCapabilityWindowDecorationStyles
@ GHOST_kCapabilityDesktopSample
const void * GHOST_TEventDataPtr
GHOST_TDrawingContextType
@ GHOST_kDrawingContextTypeNone
@ GHOST_kWindowOrderBottom
@ GHOST_kModifierKeyRightControl
@ GHOST_kModifierKeyLeftControl
@ GHOST_kModifierKeyRightHyper
@ GHOST_kModifierKeyRightAlt
@ GHOST_kModifierKeyRightShift
@ GHOST_kModifierKeyLeftAlt
@ GHOST_kModifierKeyLeftShift
@ GHOST_kModifierKeyLeftOS
@ GHOST_kModifierKeyRightOS
@ GHOST_kModifierKeyLeftHyper
@ GHOST_gpuVSyncIsOverridden
void(* GHOST_TBacktraceFn)(void *file_handle)
@ GHOST_kDragnDropTypeFilenames
@ GHOST_kDragnDropTypeString
@ GHOST_kTabletWinPointer
GHOST_TWindowDecorationStyleFlags
@ GHOST_kDecorationColoredTitleBar
bool GPU_backend_vsync_is_overridden()
int GPU_backend_vsync_get()
GPUContext * GPU_context_create(void *ghost_window, void *ghost_context)
void GPU_context_discard(GPUContext *)
void GPU_context_active_set(GPUContext *)
void GPU_backend_ghost_system_set(void *ghost_system_handle)
GPUBackendType GPU_backend_type_selection_get()
blender::gpu::FrameBuffer * GPU_framebuffer_back_get()
void GPU_clear_color(float red, float green, float blue, float alpha)
blender::gpu::FrameBuffer * GPU_framebuffer_active_get()
ImBuf * IMB_allocFromBuffer(const uint8_t *byte_buffer, const float *float_buffer, unsigned int w, unsigned int h, unsigned int channels)
Read Guarded memory(de)allocation.
void UI_alert(bContext *C, blender::StringRef title, blender::StringRef message, eAlertIcon icon, bool compact)
void UI_popup_handlers_remove_all(bContext *C, ListBase *handlers)
void UI_GetThemeColor3fv(int colorid, float col[3])
void UI_SetTheme(int spacetype, int regionid)
@ WIN_ALIGN_LOCATION_CENTER
@ WIN_ALIGN_PARENT_CENTER
@ WM_CAPABILITY_WINDOW_POSITION
@ WM_CAPABILITY_CURSOR_WARP
@ WM_CAPABILITY_INITIALIZED
@ WM_CAPABILITY_TRACKPAD_PHYSICAL_DIRECTION
@ WM_CAPABILITY_CURSOR_RGBA
@ WM_CAPABILITY_WINDOW_DECORATION_STYLES
@ WM_CAPABILITY_GPU_FRONT_BUFFER_READ
@ WM_CAPABILITY_CURSOR_GENERATOR
@ WM_CAPABILITY_MULTIMONITOR_PLACEMENT
@ WM_CAPABILITY_CLIPBOARD_PRIMARY
@ WM_CAPABILITY_KEYBOARD_HYPER_KEY
@ WM_CAPABILITY_CLIPBOARD_IMAGE
@ WM_CAPABILITY_DESKTOP_SAMPLE
@ WM_CAPABILITY_INPUT_IME
eWM_WindowDecorationStyleFlag
@ WM_WINDOW_DECORATION_STYLE_COLORED_TITLEBAR
@ WM_WINDOW_DECORATION_STYLE_NONE
CLG_LogRef * WM_LOG_EVENTS
@ WM_TIMER_TAGGED_FOR_REMOVAL
@ WM_TIMER_NO_FREE_CUSTOM_DATA
BMesh const char void * data
ATTR_WARN_UNUSED_RESULT const BMLoop * l
void activate(bool forceActivation=false) const
unsigned long long int uint64_t
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
void * MEM_calloc_arrayN(size_t len, size_t size, const char *str)
void * MEM_callocN(size_t len, const char *str)
void * MEM_malloc_arrayN(size_t len, size_t size, const char *str)
void MEM_freeN(void *vmemh)
VecBase< int32_t, 2 > int2
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
void RNA_boolean_set(PointerRNA *ptr, const char *name, bool value)
GHOST_TDrawingContextType context_type
GHOST_GPUDevice preferred_device
GHOST_TDragnDropTypes dataType
GHOST_TDragnDropDataPtr data
float colored_titlebar_bg_color[3]
ImBufByteBuffer byte_buffer
GHOST_TWindowState windowstate
eWinOverrideFlag override_flag
wmEventModifierFlag modifier
struct ReportList * reports
WindowManagerRuntimeHandle * runtime
WindowRuntimeHandle * runtime
struct wmEvent * eventstate
struct wmEvent * event_last_handled
struct wmEvent_ConsecutiveData * event_queue_consecutive_gesture_data
struct WorkSpaceInstanceHook * workspace_hook
void * cursor_keymap_status
struct Stereo3dFormat * stereo3d_format
void WM_check(bContext *C)
wmDragPath * WM_drag_create_path_data(blender::Span< const char * > paths)
void WM_event_start_drag(bContext *C, int icon, eWM_DragDataType type, void *poin, uint flags)
ListBase * WM_dropboxmap_find(const char *idname, int spaceid, int regionid)
void wm_draw_update(bContext *C)
wmEventHandler_Dropbox * WM_event_add_dropbox_handler(ListBase *handlers, ListBase *dropboxes)
wmEventHandler_Keymap * WM_event_add_keymap_handler(ListBase *handlers, wmKeyMap *keymap)
wmOperatorStatus WM_operator_name_call_ptr(bContext *C, wmOperatorType *ot, blender::wm::OpCallContext context, PointerRNA *properties, const wmEvent *event)
void wm_event_do_handlers(bContext *C)
void WM_event_add_notifier_ex(wmWindowManager *wm, const wmWindow *win, uint type, void *reference)
void WM_event_consecutive_data_free(wmWindow *win)
void WM_main_add_notifier(uint type, void *reference)
void wm_event_free_all(wmWindow *win)
wmEvent * WM_event_add(wmWindow *win, const wmEvent *event_to_add)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
void wm_event_do_notifiers(bContext *C)
void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, const int type, const void *customdata, const uint64_t event_time_ms)
void wm_event_init_from_window(wmWindow *win, wmEvent *event)
void WM_event_remove_handlers(bContext *C, ListBase *handlers)
#define ISTIMER(event_type)
bool wm_file_or_session_data_has_unsaved_changes(const Main *bmain, const wmWindowManager *wm)
void wm_autosave_timer(Main *bmain, wmWindowManager *wm, wmTimer *)
void wm_close_file_dialog(bContext *C, wmGenericCallback *post_action)
void WM_gestures_free_all(wmWindow *win)
void wm_exit_schedule_delayed(const bContext *C)
void wm_jobs_timer_end(wmWindowManager *wm, wmTimer *wt)
void wm_jobs_timer(wmWindowManager *wm, wmTimer *wt)
wmKeyMap * WM_keymap_ensure(wmKeyConfig *keyconf, const char *idname, int spaceid, int regionid)
wmOperatorType * WM_operatortype_find(const char *idname, bool quiet)
void WM_operator_properties_create_ptr(PointerRNA *ptr, wmOperatorType *ot)
void WM_operator_properties_free(PointerRNA *ptr)
static bool ghost_event_proc(GHOST_EventHandle ghost_event, GHOST_TUserDataPtr ps_void_ptr)
static void ghost_event_proc_timestamp_warning(GHOST_EventHandle ghost_event)
ViewLayer * WM_windows_view_layer_get_from_screen(const wmWindowManager *wm, const bScreen *screen)
blender::int2 WM_window_native_pixel_size(const wmWindow *win)
wmWindow * wm_window_copy(Main *bmain, wmWindowManager *wm, wmWindow *win_src, const bool duplicate_layout, const bool child)
void wm_window_swap_buffer_release(wmWindow *win)
static void wm_window_ghostwindow_ensure(wmWindowManager *wm, wmWindow *win, bool is_dialog)
void WM_window_set_active_scene(Main *bmain, bContext *C, wmWindow *win, Scene *scene)
wmOperatorStatus wm_window_new_exec(bContext *C, wmOperator *op)
eWM_WindowDecorationStyleFlag WM_window_decoration_style_flags_get(const wmWindow *win)
void wm_cursor_position_from_ghost_screen_coords(wmWindow *win, int *x, int *y)
GHOST_TKey ghost_key_pair[2]
static GHOST_SystemHandle g_system
wmWindow * wm_window_new(const Main *bmain, wmWindowManager *wm, wmWindow *parent, bool dialog)
static void wm_clipboard_text_set_impl(const char *buf, bool selection)
void WM_clipboard_text_set(const char *buf, bool selection)
void wm_window_raise(wmWindow *win)
void WM_window_ensure_active_view_layer(wmWindow *win)
static char * wm_clipboard_text_get_impl(bool selection)
static void wm_window_check_size(rcti *rect)
ImBuf * WM_clipboard_image_get()
Scene * WM_windows_scene_get_from_screen(const wmWindowManager *wm, const bScreen *screen)
void WM_init_input_devices()
#define GHOST_WINDOW_STATE_DEFAULT
void WM_init_state_maximized_set()
void WM_window_set_active_workspace(bContext *C, wmWindow *win, WorkSpace *workspace)
bool WM_window_is_main_top_level(const wmWindow *win)
void wm_cursor_position_to_ghost_client_coords(wmWindow *win, int *x, int *y)
char * WM_clipboard_text_get(bool selection, bool ensure_utf8, int *r_len)
void wm_cursor_position_from_ghost_client_coords(wmWindow *win, int *x, int *y)
void wm_test_gpu_backend_fallback(bContext *C)
void wm_cursor_position_to_ghost_screen_coords(wmWindow *win, int *x, int *y)
wmWindow * WM_window_open_temp(bContext *C, const char *title, int space_type, bool dialog)
char * WM_clipboard_text_get_firstline(bool selection, bool ensure_utf8, int *r_len)
static char * wm_clipboard_text_get_ex(bool selection, int *r_len, const bool ensure_utf8, const bool firstline)
GHOST_TModifierKey ghost_mask_pair[2]
static struct WMInitStruct wm_init_state
static void wm_window_ensure_eventstate(wmWindow *win)
void wm_quit_with_optional_confirmation_prompt(bContext *C, wmWindow *win)
void * WM_system_gpu_context_create()
static uint8_t wm_ghost_modifier_query(const enum ModSide side)
void WM_cursor_warp(wmWindow *win, int x, int y)
void wm_window_reset_drawable()
void wm_window_swap_buffer_acquire(wmWindow *win)
Push rendered buffer to the screen.
static bool ghost_event_proc(GHOST_EventHandle ghost_event, GHOST_TUserDataPtr C_void_ptr)
bool wm_get_screensize(int r_size[2])
static void wm_window_ghostwindow_add(wmWindowManager *wm, const char *title, wmWindow *win, bool is_dialog)
void wm_window_events_process(const bContext *C)
WorkSpaceLayout * WM_window_get_active_layout(const wmWindow *win)
void WM_system_gpu_context_dispose(void *context)
void WM_event_timer_free_data(wmTimer *timer)
void WM_event_timer_sleep(wmWindowManager *wm, wmWindow *, wmTimer *timer, bool do_sleep)
void WM_window_native_pixel_coords(const wmWindow *win, int *x, int *y)
static void wm_ghostwindow_destroy(wmWindowManager *wm, wmWindow *win)
bool wm_cursor_position_get(wmWindow *win, int *r_x, int *r_y)
bool WM_window_is_fullscreen(const wmWindow *win)
void wm_window_close(bContext *C, wmWindowManager *wm, wmWindow *win)
void WM_window_dpi_set_userdef(const wmWindow *win)
void wm_window_set_swap_interval(wmWindow *win, int interval)
static void wm_window_update_eventstate_modifiers(wmWindowManager *wm, wmWindow *win, const uint64_t event_time_ms)
void WM_window_set_active_screen(wmWindow *win, WorkSpace *workspace, bScreen *screen)
static bool wm_window_timers_process(const bContext *C, int *sleep_us_p)
static void wm_confirm_quit(bContext *C)
static rctf * stored_window_bounds(eSpace_Type space_type)
wmOperatorStatus wm_window_close_exec(bContext *C, wmOperator *)
void WM_init_native_pixels(bool do_it)
void wm_window_set_size(wmWindow *win, int width, int height)
void wm_ghost_init_background()
GHOST_TDrawingContextType wm_ghost_drawing_context_type(const GPUBackendType gpu_backend)
WorkSpace * WM_windows_workspace_get_from_screen(const wmWindowManager *wm, const bScreen *screen)
int WM_window_native_pixel_y(const wmWindow *win)
int WM_window_native_pixel_x(const wmWindow *win)
bool wm_window_get_swap_interval(wmWindow *win, int *r_interval)
wmTimer * WM_event_timer_add_notifier(wmWindowManager *wm, wmWindow *win, const uint type, const double time_step)
void wm_window_ghostwindows_remove_invalid(bContext *C, wmWindowManager *wm)
wmWindow * WM_window_open(bContext *C, const char *title, const rcti *rect_unscaled, int space_type, bool toplevel, bool dialog, bool temp, eWindowAlignment alignment, void(*area_setup_fn)(bScreen *screen, ScrArea *area, void *user_data), void *area_setup_user_data)
void WM_system_gpu_context_activate(void *context)
void WM_event_timer_remove_notifier(wmWindowManager *wm, wmWindow *win, wmTimer *timer)
bool WM_init_window_frame_get()
void wm_window_clear_drawable(wmWindowManager *wm)
wmOperatorStatus wm_window_new_main_exec(bContext *C, wmOperator *op)
wmTimer * WM_event_timer_add(wmWindowManager *wm, wmWindow *win, const wmEventType event_type, const double time_step)
static int find_free_winid(wmWindowManager *wm)
static const struct @150025203143042230227166104104012277325007046263 g_modifier_table[]
void WM_progress_clear(wmWindow *win)
void WM_init_state_size_set(int stax, int stay, int sizx, int sizy)
static void wm_window_decoration_style_set_from_theme(const wmWindow *win, const bScreen *screen)
float WM_window_dpi_get_scale(const wmWindow *win)
void WM_progress_set(wmWindow *win, float progress)
void wm_window_make_drawable(wmWindowManager *wm, wmWindow *win)
wmWindow * wm_window_copy_test(bContext *C, wmWindow *win_src, const bool duplicate_layout, const bool child)
static bool wm_window_update_size_position(wmWindow *win)
bool WM_clipboard_image_available()
const char * WM_ghost_backend()
void WM_init_window_frame_set(bool do_it)
bool WM_window_is_temp_screen(const wmWindow *win)
wmWindow * WM_window_find_under_cursor(wmWindow *win, const int event_xy[2], int r_event_xy_other[2])
void WM_window_rect_calc(const wmWindow *win, rcti *r_rect)
eWM_CapabilitiesFlag WM_capabilities_flag()
bool WM_window_is_maximized(const wmWindow *win)
uint WM_cursor_preferred_logical_size()
void WM_window_set_active_layout(wmWindow *win, WorkSpace *workspace, WorkSpaceLayout *layout)
wmWindow * WM_window_find_by_area(wmWindowManager *wm, const ScrArea *area)
void WM_window_screen_rect_calc(const wmWindow *win, rcti *r_rect)
void WM_window_set_active_view_layer(wmWindow *win, ViewLayer *view_layer)
ViewLayer * WM_window_get_active_view_layer(const wmWindow *win)
void WM_init_state_fullscreen_set()
static void wm_window_update_eventstate(wmWindow *win)
void WM_init_state_normal_set()
Scene * WM_window_get_active_scene(const wmWindow *win)
static void wm_save_file_on_quit_dialog_callback(bContext *C, void *)
static const char * g_system_backend_id
static void wm_window_update_eventstate_modifiers_clear(wmWindowManager *wm, wmWindow *win, const uint64_t event_time_ms)
static void wm_window_set_drawable(wmWindowManager *wm, wmWindow *win, bool activate)
void wm_window_free(bContext *C, wmWindowManager *wm, wmWindow *win)
static CLG_LogRef LOG_GHOST_SYSTEM
void WM_event_timer_remove(wmWindowManager *wm, wmWindow *, wmTimer *timer)
void WM_window_title(wmWindowManager *wm, wmWindow *win, const char *title)
void wm_ghost_init(bContext *C)
bool WM_clipboard_image_set_byte_buffer(ImBuf *ibuf)
void WM_windows_scene_data_sync(const ListBase *win_lb, Scene *scene)
void wm_window_ghostwindows_ensure(wmWindowManager *wm)
void WM_init_window_focus_set(bool do_it)
void WM_window_decoration_style_flags_set(const wmWindow *win, eWM_WindowDecorationStyleFlag style_flags)
WorkSpace * WM_window_get_active_workspace(const wmWindow *win)
bool wm_get_desktopsize(int r_size[2])
struct @354111224104140165023025046303365234103251255123 * g_wm_clipboard_text_simulate
bool WM_window_support_hdr_color(const wmWindow *win)
void wm_window_timers_delete_removed(wmWindowManager *wm)
wmOperatorStatus wm_window_fullscreen_toggle_exec(bContext *C, wmOperator *)
void wm_window_lower(wmWindow *win)
void WM_ghost_show_message_box(const char *title, const char *message, const char *help_label, const char *continue_label, const char *link, GHOST_DialogOptions dialog_options)
void WM_system_gpu_context_release(void *context)
bScreen * WM_window_get_active_screen(const wmWindow *win)
void WM_window_decoration_style_apply(const wmWindow *win, const bScreen *screen)
bool wm_xr_events_handle(wmWindowManager *wm)