19#include <fmt/format.h>
102#ifdef WITH_GHOST_WAYLAND
117#if !(defined(WIN32) || defined(__APPLE__))
122static bool g_system_use_csd =
false;
133#define GHOST_WINDOW_STATE_DEFAULT GHOST_kWindowStateMaximized
208 if (uiwidth == 0 && uiheight == 0) {
213 r_size[1] = uiheight;
223 if (uiwidth == 0 && uiheight == 0) {
228 r_size[1] = uiheight;
258 if (win ==
wm->runtime->winactive) {
259 wm->runtime->winactive =
nullptr;
291 for (
wmTimer &wt :
wm->runtime->timers.items_mutable()) {
295 if (wt.win == win && wt.event_type ==
TIMERJOBS) {
301 for (
wmTimer &wt :
wm->runtime->timers.items_mutable()) {
341 if (
id <= win.
winid) {
350 wmWindow *win = MEM_new<wmWindow>(
"window");
357 win->
stereo3d_format = MEM_new<Stereo3dFormat>(
"Stereo 3D Format (window)");
359 win->
runtime = MEM_new<bke::WindowRuntime>(__func__);
367 const bool duplicate_layout,
385 bmain, workspace, layout_old, win_dst) :
396 const bool duplicate_layout,
474 for (win_other =
wm->windows.first(); win_other; win_other = win_other->
next) {
522 for (
wmWindow &iter_win :
wm->windows.items_mutable()) {
523 if (iter_win.parent == win) {
551 if ((screen && screen->
temp) || is_single_editor) {
567 win_title.append(
project->get_name());
583 std::optional<
FunctionRef<
void(
const char *)>> window_filepath_fn,
584 fmt::memory_buffer &win_title)
617 strlen(filepath_as_bytes),
620 sizeof(_filepath_utf8_buf));
623 const bool has_filepath = filepath[0] !=
'\0';
624 const bool native_filepath_display = (window_filepath_fn != std::nullopt);
625 if (native_filepath_display) {
626 (*window_filepath_fn)(filepath_as_bytes);
628 const bool include_filepath = has_filepath && (filepath !=
filename) && !native_filepath_display;
631 if (!
wm->file_saved) {
636 if (include_filepath) {
638 win_title.append(
filename, filename_no_ext_end);
640 else if (has_filepath) {
656 if (include_filepath) {
657 bool add_filepath =
true;
669 size_t home_dir_len = strlen(home_dir);
671 while (home_dir_len && home_dir[home_dir_len - 1] ==
SEP) {
674 if ((home_dir_len > 0) &&
BLI_path_ncmp(home_dir, filepath_as_bytes, home_dir_len) == 0) {
675 if (filepath_as_bytes[home_dir_len] ==
SEP) {
677 win_title.append(
StringRef(filepath + home_dir_len));
678 win_title.push_back(
']');
679 add_filepath =
false;
687 win_title.push_back(
']');
694 win_title.append(
StringRef(
" — Blender "));
726 std::optional([&ghost_window](
const char *filepath) {
727 ghost_window->
setPath(filepath);
730 fmt::memory_buffer win_title;
732 win_title.push_back(
'\0');
733 ghost_window->
setTitle(win_title.data());
745 auto_dpi =
max_ff(auto_dpi, 96.0f);
749 if (
U.ui_scale == 0) {
753 U.ui_scale = virtual_pixel;
756 U.ui_scale = (virtual_pixel *
U.dpi * 96.0f) / (auto_dpi * 72.0f);
759 CLAMP(
U.ui_scale, 0.25f, 4.0f);
766 U.dpi = auto_dpi *
U.ui_scale * (72.0 / 96.0f);
769 int pixelsize =
max_ii(1, (
U.dpi / 64));
771 pixelsize =
max_ii(1, pixelsize +
U.ui_line_width);
774 U.pixelsize = pixelsize;
776 U.scale_factor =
U.dpi / 72.0f;
777 U.inv_scale_factor = 1.0f /
U.scale_factor;
781 U.widget_unit = int(
roundf(18.0f *
U.scale_factor)) + (2 * pixelsize);
791 float dpi =
float(dpi_fixed);
796 return dpi /
float(dpi_base);
817 return wm_style_flags;
862 float titlebar_bg_color[3];
893 const uint8_t keymodifier_sided[2] = {
897 const uint8_t keymodifier = keymodifier_sided[0] | keymodifier_sided[1];
899 if (keymodifier != keymodifier_eventstate) {
907 for (
int side = 0; side < 2; side++) {
920 for (
int side = 0; side < 2; side++) {
958 const uint8_t keymodifier_unhandled = keymodifier_eventstate &
959 ~(keymodifier_l | keymodifier_r);
960 const uint8_t keymodifier_sided[2] = {
961 uint8_t(keymodifier_l | keymodifier_unhandled),
970 for (
int side = 0; side < 2; side++) {
1036 posy = (scr_size[1] - win->
posy - win->
sizey);
1041 wmWindow *prev_windrawable =
wm->runtime->windrawable;
1086 float window_bg_color[3];
1092 GPU_clear_color(window_bg_color[0], window_bg_color[1], window_bg_color[2], 1.0f);
1097#ifdef WITH_GHOST_CSD
1109 GPU_clear_color(window_bg_color[0], window_bg_color[1], window_bg_color[2], 1.0f);
1110#ifdef WITH_GHOST_CSD
1119 if (prev_windrawable !=
nullptr) {
1127 bool new_window =
false;
1129 win_filepath[0] =
'\0';
1162 std::optional([&win_filepath](
const char *filepath) {
1163 STRNCPY(win_filepath, filepath);
1166 fmt::memory_buffer win_title;
1168 win_title.push_back(
'\0');
1208 if (win_filepath[0]) {
1210 ghost_window->
setPath(win_filepath);
1252 for (
wmWindow &win :
wm->windows.items_mutable()) {
1267 int sizex = client_rect.
getWidth();
1276 posx = client_rect.
l_;
1277 posy = scr_size[1] - client_rect.
t_ - win->
sizey;
1281 if (win->
sizex != sizex || win->
sizey != sizey || win->
posx != posx || win->
posy != posy) {
1293 const rcti *rect_unscaled,
1299 void (*area_setup_fn)(
bScreen *screen,
ScrArea *area,
void *user_data),
1300 void *area_setup_user_data)
1307 int x = rect_unscaled->
xmin;
1308 int y = rect_unscaled->
ymin;
1317 const float native_pixel_size = ghost_window ? ghost_window->
getNativePixelSize() : 1.0f;
1319 rect.
xmin =
x / native_pixel_size;
1320 rect.
ymin =
y / native_pixel_size;
1321 sizex /= native_pixel_size;
1322 sizey /= native_pixel_size;
1326 rect.
xmin += win_prev->
posx - (sizex / 2);
1327 rect.
ymin += win_prev->
posy - (sizey / 2);
1331 rect.
xmin += win_prev->
posx + ((win_prev->
sizex - sizex) / 2);
1332 rect.
ymin += win_prev->
posy + ((win_prev->
sizey - sizey) / 2);
1359 if (win !=
nullptr) {
1369 if (win ==
nullptr) {
1370 win =
wm_window_new(bmain,
wm, toplevel ?
nullptr : win_prev, dialog);
1385 if (screen ==
nullptr) {
1401 screen->
temp = temp;
1407 if (area_setup_fn) {
1417 area_setup_fn(screen, area, area_setup_user_data);
1483 if (bounds_valid && mm_placement) {
1496 rect.
xmin =
event->xy[0];
1497 rect.
ymin =
event->xy[1];
1498 rect.
xmax =
event->xy[0] + width;
1499 rect.
ymax =
event->xy[1] + height;
1504 C, title, &rect, space_type,
false, dialog,
true, align,
nullptr,
nullptr);
1529 const rcti window_rect = {
1531 int(win_src->
sizex * 0.95f),
1533 int(win_src->
sizey * 0.9f),
1545 nullptr) !=
nullptr);
1662 wm->runtime->windrawable = win;
1672 if (
wm->runtime->windrawable) {
1673 wm->runtime->windrawable =
nullptr;
1687 printf(
"%s: set drawable %d\n", __func__, win->
winid);
1705 if (
wm ==
nullptr) {
1726 constexpr uint64_t event_time_ok_ms = 1000;
1728 constexpr uint64_t event_time_error_ms = 5000;
1730 static uint64_t event_ms_ref_last = std::numeric_limits<uint64_t>::max();
1732 const uint64_t event_ms_ref = event_ms_ref_last;
1735 event_ms_ref_last = event_ms;
1737 if (event_ms_ref == std::numeric_limits<uint64_t>::max()) {
1744 if (event_ms_ref < event_time_error_ms || (event_ms_ref < (now_ms - event_time_ok_ms)) ||
1745 (event_ms_ref > (now_ms + event_time_ok_ms)))
1755 double time_delta = 0.0;
1756 if (event_ms < (event_ms_ref - event_time_error_ms)) {
1758 time_delta = double(now_ms - event_ms) / -1000.0;
1760 else if (event_ms > (event_ms_ref + event_time_error_ms)) {
1762 time_delta = double(event_ms - now_ms) / 1000.0;
1769 const char *time_unit =
"seconds";
1773 } unit_table[] = {{
"minutes", 60}, {
"hours", 60}, {
"days", 24}, {
"weeks", 7}, {
"years", 52}};
1774 for (
int i = 0; i <
ARRAY_SIZE(unit_table); i++) {
1775 if (std::abs(time_delta) <= unit_table[i].
scale) {
1778 time_delta /= unit_table[i].scale;
1779 time_unit = unit_table[i].unit;
1783 "GHOST: suspicious time-stamp from far in the %s: %.2f %s, "
1784 "absolute value is %" PRIu64 ", current time is %" PRIu64 ", for type %d",
1785 time_delta < 0.0f ?
"past" :
"future",
1786 std::abs(time_delta),
1818 win =
wm->runtime->winactive;
1840 if (!ghost_window) {
1842 puts(
"<!> event has no window");
1847 puts(
"<!> event has invalid window");
1870 wm->runtime->winactive = win;
1907 printf(
"%s: ghost redraw %d\n", __func__, win->
winid);
1917 printf(
"%s: ghost redraw decor %d\n", __func__, win->
winid);
1953 const char *state_str;
1957 state_str =
"normal";
1960 state_str =
"minimized";
1963 state_str =
"maximized";
1966 state_str =
"full-screen";
1969 state_str =
"<unknown>";
1972 printf(
"%s: window %d state = %s\n", __func__, win->
winid, state_str);
1975 printf(
"win move event pos %d %d size %d %d\n",
1988#if defined(__APPLE__) || defined(WIN32)
1990 int dummy_sleep_ms = 0;
2012 const char *path =
static_cast<const char *
>(
data);
2014 if (path && path[0] !=
'\0') {
2027 .skip_overrides =
false,
2028 .canonicalize =
true,
2029 .strip_filename =
true,
2064 wm->runtime->winactive = win;
2074 event.customdata = &
wm->runtime->drags;
2075 event.customdata_free =
true;
2088 for (
const char *path :
Span(
reinterpret_cast<char **
>(stra->
strings), stra->
count)) {
2101 std::string *
str = MEM_new<std::string>(__func__,
static_cast<const char *
>(ddd->
data));
2109 float prev_pixelsize =
U.pixelsize;
2112 if (
U.pixelsize != prev_pixelsize) {
2164 bool has_event =
false;
2166 const int sleep_us = *sleep_us_p;
2168 double ntime_min = DBL_MAX;
2171 for (
wmTimer &wt :
wm->runtime->timers.items_mutable()) {
2175 if (wt.sleep ==
true) {
2180 if (wt.time_next >= time) {
2181 if ((has_event ==
false) && (sleep_us != 0)) {
2183 ntime_min = std::min(wt.time_next, ntime_min);
2188 wt.time_delta = time - wt.time_last;
2189 wt.time_duration += wt.time_delta;
2190 wt.time_last = time;
2192 wt.time_next = wt.time_start;
2193 if (wt.time_step != 0.0f) {
2194 wt.time_next += wt.time_step *
ceil(wt.time_duration / wt.time_step);
2210 event.type = wt.event_type;
2215 event.customdata = &wt;
2222 if ((has_event ==
false) && (sleep_us != 0) && (ntime_min != DBL_MAX)) {
2227 const double microseconds = 1000000.0;
2228 const double sleep_sec = double(sleep_us) / microseconds;
2229 const double sleep_sec_next = ntime_min - time;
2231 if (sleep_sec_next < sleep_sec) {
2232 *sleep_us_p = int(std::ceil(sleep_sec_next * microseconds));
2257 const int sleep_us_default = 5000;
2258 int sleep_us = has_event ? 0 : sleep_us_default;
2260#ifdef WITH_XR_OPENXR
2280#ifdef WITH_GHOST_CSD
2281static int32_t wm_window_csd_layout_callback(
const int32_t window_size[2],
2282 const int32_t fractional_scale[2],
2288 window_size, fractional_scale,
char(window_state), csd_layout, csd_elems);
2293 if (g_system_use_csd ==
false) {
2297 GHOST_CSD_Params csd_params = {
2298 wm_window_csd_layout_callback,
2300 U.drag_threshold_mouse,
2322 BLI_assert_msg(!
G.background,
"Use wm_ghost_init_background instead");
2333 if (
g_system ==
nullptr) [[unlikely]] {
2339#if !(defined(WIN32) || defined(__APPLE__))
2360#ifdef WITH_GHOST_WAYLAND
2364#ifdef WITH_GHOST_CSD
2368 g_system_use_csd =
true;
2405#if !(defined(WIN32) || defined(__APPLE__))
2411 return g_system ?
"DEFAULT" :
"NONE";
2417 switch (gpu_backend) {
2422#ifdef WITH_OPENGL_BACKEND
2423 return GHOST_kDrawingContextTypeOpenGL;
2428#ifdef WITH_VULKAN_BACKEND
2429 return GHOST_kDrawingContextTypeVulkan;
2434#ifdef WITH_METAL_BACKEND
2435 return GHOST_kDrawingContextTypeMetal;
2461 wm->windows.first());
2471 std::string message =
RPT_(
"Updating GPU drivers may solve this issue.");
2473 "The graphics backend can be changed in the System section of the Preferences.");
2475 RPT_(
"Failed to load using Vulkan, using OpenGL instead."),
2566 timer->
sleep = do_sleep;
2572 const double time_step)
2594 const double time_step)
2615 for (
wmTimer &wt :
wm->runtime->timers.items_mutable()) {
2644 if (
wm->runtime->reports.reporttimer == timer) {
2645 wm->runtime->reports.reporttimer =
nullptr;
2651 event.customdata =
nullptr;
2704 if (buf_src ==
nullptr) {
2707 size_t size = strlen(buf_src) + 1;
2708 char *buf =
static_cast<char *
>(malloc(size));
2709 memcpy(buf, buf_src, size);
2724 MEM_SAFE_DELETE(*buf_src_p);
2740 const bool ensure_utf8,
2741 const bool firstline)
2754 int buf_len = strlen(buf);
2770 for (
char *p = buf; *p; p++) {
2771 if (!
ELEM(*p,
'\n',
'\r')) {
2780 for (
char *p = buf; *p; p++) {
2791 *r_len = (p2 - newbuf);
2808 if (!
G.background) {
2815 for (p = buf; *p; p++) {
2826 for (p = buf, p2 = newbuf; *p; p++, p2++) {
2981 const int event_xy[2],
2982 int r_event_xy_other[2])
3002 if (!ghost_window) {
3088 switch (
U.tablet_api) {
3109 int oldx =
x, oldy =
y;
3126 if (hardware_cursor) {
3149 return int(fac *
float(win->
sizex));
3156 return int(fac *
float(win->
sizey));
3164 return int2(
int(fac *
float(win->
sizex)),
int(fac *
float(win->
sizey)));
3179#ifdef WITH_GHOST_CSD
3190#ifdef WITH_GHOST_CSD
3191 return g_system_use_csd;
3199#ifdef WITH_GHOST_CSD
3211#ifdef WITH_GHOST_CSD
3227 rcti window_rect, screen_rect;
3230 screen_rect = window_rect;
3242 screen_rect.
ymax -= height;
3245 screen_rect.
ymin += height;
3255 *r_rect = screen_rect;
3275 if ((win->
parent !=
nullptr) || screen->
temp) {
3347 bool changed =
false;
3350 if (win_parent->
scene != scene) {
3356 if (win_child.
parent == win_parent && win_child.
scene != scene) {
3375 if (scene ==
nullptr) {
3402 if ((&win_iter == win_parent) || (win_iter.
parent == win_parent)) {
3434 if (win_child.
parent == win_parent) {
3471 return (screen && screen->
temp != 0);
3480#ifdef WITH_INPUT_IME
3482static void wm_window_ime_position_set(
3483 wmWindow *win,
int x,
int y,
int w,
int h,
const bool complete)
3494 ghost_window->beginIME(
x, win->sizey -
y,
w, h, complete);
3497void WM_window_IME_begin(
3503 win->runtime->ime_owner = owner;
3504 wm_window_ime_position_set(win,
x,
y,
w, h,
true);
3507void WM_window_IME_reposition(
wmWindow *win,
int x,
int y,
int w,
int h)
3513 BLI_assert(win->runtime->ime_owner.has_value());
3515 wm_window_ime_position_set(win,
x,
y,
w, h,
false);
3518void WM_window_IME_end(
wmWindow *win)
3526 if (win->runtime->ime_data_is_composing) {
3534 win->runtime->ime_owner = std::nullopt;
3542 if (win->runtime->ime_data ==
nullptr) {
3547 GHOST_IWindow *ghost_window =
static_cast<GHOST_IWindow *
>(win->runtime->ghostwin);
3548 ghost_window->endIME();
3550 MEM_delete(win->runtime->ime_data);
3551 win->runtime->ime_data =
nullptr;
3552 win->runtime->ime_data_is_composing =
false;
3555bool WM_window_IME_region_refresh(
wmWindow *win,
3558 const bool keep_composing,
3572 const ARegion *tooltip_region = screen->tool_tip ? screen->tool_tip->region :
nullptr;
3573 for (
const ARegion ®ion_iter : screen->regionbase) {
3574 if ((region_iter.regiontype ==
RGN_TYPE_TEMPORARY) && (®ion_iter != tooltip_region)) {
3585 const bool composing = keep_composing && win->
runtime->ime_data_is_composing &&
3590 WM_window_IME_end(win);
3592 if (!region || !region->runtime->type->cursor_ime) {
3598 const std::optional<ARegionIMECursorState> cursor_state = region->runtime->type->cursor_ime(
3599 win, area, region, &cursor);
3600 if (!cursor_state) {
3604 WM_window_IME_end(win);
3618 const int x = region->winrct.xmin +
3620 const int y = region->winrct.ymin +
3629 WM_window_IME_reposition(win,
x,
y,
w, h);
3638const wmIMEData *WM_window_IME_data_get(
const wmWindow *win,
const ARegion *region)
3640 if (!win->runtime->ime_data_is_composing) {
3651 if (!screen || region != screen->active_region) {
3654 const wmIMEData *ime_data = win->runtime->ime_data;
3655 if (ime_data ==
nullptr || ime_data->composite.empty()) {
3661std::optional<IndexRange> WM_window_IME_composite_select_range(
const wmIMEData *ime_data)
3664 if ((ime_data->sel_start == -1) || (ime_data->sel_end == -1)) {
3665 return std::nullopt;
3667 const int composite_len = int(ime_data->composite.size());
3668 const int sel_start = std::clamp(ime_data->sel_start, 0, composite_len);
3669 const int sel_end = std::clamp(ime_data->sel_end, 0, composite_len);
3670 if (sel_start >= sel_end) {
3671 return std::nullopt;
3724 context->activateDrawingContext();
3730 context->releaseDrawingContext();
3734 const char *message,
3735 const char *help_label,
3736 const char *continue_label,
#define ENUM_OPERATORS(_enum_type)
File and directory operations.
#define STRNCPY_UTF8(dst, src)
Platform independent time functions.
#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.
void * GHOST_TUserDataPtr
const void * GHOST_TEventDataPtr
@ GHOST_kWindowStateMinimized
@ GHOST_kWindowStateMaximized
@ GHOST_kWindowStateNormal
@ GHOST_kWindowStateFullScreen
@ GHOST_kEventWindowClose
@ GHOST_kEventDraggingDropDone
@ GHOST_kEventNativeResolutionChange
@ GHOST_kEventOpenMainFile
@ GHOST_kEventWindowActivate
@ GHOST_kEventWindowUpdateDecor
@ GHOST_kEventWindowUpdate
@ GHOST_kEventWindowDeactivate
@ GHOST_kEventWindowDPIHintChanged
@ GHOST_kEventQuitRequest
@ GHOST_kCapabilityWindowDecorationServerSide
@ GHOST_kCapabilityWindowPosition
@ GHOST_kCapabilityClipboardPrimary
@ GHOST_kCapabilityKeyboardHyperKey
@ GHOST_kCapabilityCursorRGBA
@ GHOST_kCapabilityGPUReadFrontBuffer
@ GHOST_kCapabilityCursorWarp
@ GHOST_kCapabilityInputIME
@ GHOST_kCapabilityCursorGenerator
@ GHOST_kCapabilityWindowPath
@ GHOST_kCapabilityTrackpadPhysicalDirection
@ GHOST_kCapabilityMultiMonitorPlacement
@ GHOST_kCapabilityClipboardImage
@ GHOST_kCapabilityWindowDecorationStyles
@ GHOST_kCapabilityDesktopSample
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
@ GHOST_gpuNoHWRaytracing
@ GHOST_kDragnDropTypeFilenames
@ GHOST_kDragnDropTypeString
@ GHOST_kTabletWinPointer
GHOST_TWindowDecorationStyleFlags
@ GHOST_kDecorationColoredTitleBar
Read Blender memory allocation and freeing.
#define PRF_scope(category)
#define BLI_assert_unreachable()
#define POINTER_AS_UINT(i)
#define POINTER_FROM_UINT(i)
#define BLI_assert_msg(a, msg)
void activate(bool forceActivation=false) const
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
GHOST_CallbackEventConsumer(GHOST_EventCallbackProcPtr eventCallback, GHOST_TUserDataPtr user_data)
virtual GHOST_TEventType getType() const =0
virtual GHOST_TEventDataPtr getData() const =0
virtual GHOST_IWindow * getWindow() const =0
virtual uint64_t getTime() const =0
static GHOST_ISystem * getSystem()
virtual void putClipboard(const char *buffer, bool selection) const =0
static GHOST_TSuccess createSystem(bool verbose=true, bool background=false)
virtual GHOST_TSuccess getModifierKeyState(GHOST_TModifierKey mask, bool &is_down) const =0
static void setUseWindowFrame(bool use_window_frame)
static void setBacktraceFn(GHOST_TBacktraceFn backtrace_fn)
virtual GHOST_TSuccess showMessageBox(const char *, const char *, const char *, const char *, const char *, GHOST_DialogOptions) const =0
virtual void initDebug(GHOST_Debug debug)=0
virtual void setTabletAPI(GHOST_TTabletAPI api)=0
virtual char * getClipboard(bool selection) const =0
virtual GHOST_TSuccess setCursorPositionClientRelative(GHOST_IWindow *window, int32_t x, int32_t y)=0
virtual void getMainDisplayDimensions(uint32_t &width, uint32_t &height) const =0
virtual GHOST_TSuccess hasClipboardImage() const =0
virtual bool validWindow(GHOST_IWindow *window)=0
virtual GHOST_IWindow * createWindow(const char *title, int32_t left, int32_t top, uint32_t width, uint32_t height, GHOST_TWindowState state, GHOST_GPUSettings gpu_settings, const bool exclusive=false, const bool is_dialog=false, const GHOST_IWindow *parent_window=nullptr)=0
virtual void getAllDisplayDimensions(uint32_t &width, uint32_t &height) const =0
virtual uint * getClipboardImage(int *r_width, int *r_height) const =0
virtual GHOST_IContext * createOffscreenContext(GHOST_GPUSettings gpu_settings)=0
virtual GHOST_TSuccess addEventConsumer(GHOST_IEventConsumer *consumer)=0
virtual void useWindowFocus(const bool use_focus)=0
virtual GHOST_TSuccess disposeContext(GHOST_IContext *context)=0
virtual bool useNativePixel()=0
static GHOST_TSuccess disposeSystem()
virtual void setMultitouchGestures(const bool use)=0
virtual void dispatchEvents()=0
virtual void setIconGenerator(const GHOST_IconGenerator *icon_generator)=0
static const char * getSystemBackend()
virtual const GHOST_CSD_Layout & getWindowCSD_Layout() const =0
virtual GHOST_TCapabilityFlag getCapabilities() const =0
virtual uint32_t getCursorPreferredLogicalSize() const =0
virtual GHOST_TSuccess putClipboardImage(uint *rgba, int width, int height) const =0
virtual void setWindowCSD(const GHOST_CSD_Params ¶ms)=0
virtual GHOST_TSuccess getCursorPositionClientRelative(const GHOST_IWindow *window, int32_t &x, int32_t &y) const =0
virtual uint64_t getMilliSeconds() const =0
virtual GHOST_TSuccess disposeWindow(GHOST_IWindow *window)=0
virtual GHOST_IWindow * getWindowUnderCursor(int32_t x, int32_t y)=0
virtual bool processEvents(bool waitForEvent)=0
static GHOST_TSuccess createSystemBackground()
virtual void setTitle(const char *title)=0
virtual void getClientBounds(GHOST_Rect &bounds) const =0
virtual GHOST_TSuccess activateDrawingContext()=0
virtual GHOST_TSuccess endProgressBar()=0
virtual void setWindowDecorationStyleSettings(GHOST_WindowDecorationStyleSettings decoration_settings)=0
virtual GHOST_TSuccess setOrder(GHOST_TWindowOrder order)=0
virtual void clientToScreen(int32_t inX, int32_t inY, int32_t &outX, int32_t &outY) const =0
virtual GHOST_TSuccess setProgressBar(float progress)=0
virtual GHOST_TSuccess swapBufferRelease()=0
virtual bool isDialog() const =0
virtual GHOST_WindowHDRInfo getHDRInfo()=0
virtual GHOST_TSuccess setClientSize(uint32_t width, uint32_t height)=0
virtual GHOST_TSuccess applyWindowDecorationStyle()=0
virtual GHOST_TSuccess setState(GHOST_TWindowState state)=0
virtual float getNativePixelSize()=0
virtual GHOST_IContext * getDrawingContext()=0
virtual GHOST_TSuccess getSwapInterval(int &interval_out)=0
virtual void setPath(const char *filepath)=0
virtual void screenToClient(int32_t inX, int32_t inY, int32_t &outX, int32_t &outY) const =0
virtual GHOST_TSuccess swapBufferAcquire()=0
virtual void setUserData(const GHOST_TUserDataPtr user_data)=0
virtual GHOST_TWindowDecorationStyleFlags getWindowDecorationStyleFlags()=0
virtual GHOST_TSuccess setSwapInterval(int interval)=0
virtual GHOST_TUserDataPtr getUserData() const =0
virtual void setWindowDecorationStyleFlags(GHOST_TWindowDecorationStyleFlags style_flags)=0
virtual uint16_t getDPIHint()=0
virtual GHOST_TWindowState getState() const =0
virtual GHOST_TSuccess setModifiedState(bool is_unsaved_changes)=0
virtual int32_t getHeight() const
virtual int32_t getWidth() const
static constexpr IndexRange from_begin_end(const int64_t begin, const int64_t end)
T get(const std::string &item_key) const
void set(const std::string &item_key, const T &value)
float3x3 scale(float3x3 mat, float2 scale)
void free(Subdiv *subdiv)
std::string filename(const std::string_view &str, size_t pos)
void get_color_3fv(int colorid, float col[3])
void theme_set(int spacetype, int regionid)
void popup_handlers_remove_all(bContext *C, ListBaseT< wmEventHandler > *handlers)
void WM_main_add_notifier(uint type, void *reference)
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
WorkSpaceLayout * ED_workspace_layout_duplicate(Main *bmain, WorkSpace *workspace, const WorkSpaceLayout *layout_old, wmWindow *win) ATTR_NONNULL()
bool BLI_rcti_is_valid(const struct rcti *rect)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
bool wm_get_screensize(int r_size[2])
void WM_window_set_active_scene(Main *bmain, bContext *C, wmWindow *win, Scene *scene)
void WM_gestures_free_all(wmWindow *win)
unsigned __int64 uint64_t
const char * BLI_path_extension_or_end(const char *filepath) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL
gpu::FrameBuffer * GPU_framebuffer_active_get()
void wm_cursor_position_to_ghost_client_coords(wmWindow *win, int *x, int *y)
wmWindow * wm_window_new(const Main *bmain, wmWindowManager *wm, wmWindow *parent, bool dialog)
eWM_WindowDecorationStyleFlag WM_window_decoration_style_flags_get(const wmWindow *win)
void WM_event_timer_free_data(wmTimer *timer)
MINLINE void copy_v2_v2_int(int r[2], const int a[2])
ImBuf * WM_clipboard_image_get()
void BKE_workspace_active_set(WorkSpaceInstanceHook *hook, WorkSpace *workspace) SETTER_ATTRS
char * STRNCPY(char(&dst)[N], const char *src)
ViewLayer * WM_windows_view_layer_get_from_screen(const wmWindowManager *wm, const bScreen *screen)
void WM_event_add_notifier_ex(wmWindowManager *wm, const wmWindow *win, uint type, void *reference)
void WM_event_timer_sleep(wmWindowManager *wm, wmWindow *, wmTimer *timer, bool do_sleep)
void ED_screen_scene_change(bContext *C, wmWindow *win, Scene *scene, bool refresh_toolsystem)
const char * WM_ghost_backend()
void BLI_rcti_resize_y(struct rcti *rect, int y)
wmOperatorStatus wm_window_new_exec(bContext *C, wmOperator *op)
void wm_window_set_swap_interval(wmWindow *win, int interval)
void ED_render_view_layer_changed(Main *bmain, bScreen *screen)
const EnumPropertyItem rna_enum_space_type_items[]
void WM_window_decoration_style_flags_set(const wmWindow *win, eWM_WindowDecorationStyleFlag style_flags)
void wm_window_events_process(const bContext *C)
MINLINE void copy_v3_v3(float r[3], const float a[3])
static CLG_LogRef LOG_GHOST_SYSTEM
void wm_window_lower(wmWindow *win)
void * MEM_new_array_uninitialized(size_t len, size_t size, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1
void WM_event_start_drag(bContext *C, int icon, eWM_DragDataType type, void *poin, uint flags)
void GPU_clear_color(float red, float green, float blue, float alpha)
int WM_window_csd_layout_callback(const int window_size[2], const int fractional_scale[2], const char window_state, const GHOST_CSD_Layout *csd_layout, GHOST_CSD_Elem *csd_elems)
static char * wm_clipboard_text_get_impl(bool selection)
GPUContext * GPU_context_create(GHOST_IWindow *ghost_window, GHOST_IContext *ghost_context)
int WM_window_native_pixel_y(const wmWindow *win)
void WM_operator_properties_free(PointerRNA *ptr)
void WM_init_window_frame_set(bool do_it)
@ GLOBAL_AREA_ALIGN_BOTTOM
bool WM_clipboard_image_available()
void WM_event_timer_remove_notifier(wmWindowManager *wm, wmWindow *win, wmTimer *timer)
static void wm_window_ensure_eventstate(wmWindow *win)
void WM_init_state_maximized_set()
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
bke::BlenderProject * BKE_blender_project_get(const Main *bmain)
void BKE_workspace_active_screen_set(WorkSpaceInstanceHook *hook, int winid, WorkSpace *workspace, bScreen *screen) SETTER_ATTRS
void wm_cursor_position_from_ghost_client_coords(wmWindow *win, int *x, int *y)
void wm_window_ghostwindows_remove_invalid(bContext *C, wmWindowManager *wm)
void BKE_screen_area_map_free(ScrAreaMap *area_map) ATTR_NONNULL()
void CTX_wm_window_set(bContext *C, wmWindow *win)
WorkSpaceLayout * WM_window_get_active_layout(const wmWindow *win)
void WM_init_window_focus_set(bool do_it)
wmWindow * WM_window_find_under_cursor(wmWindow *win, const int event_xy[2], int r_event_xy_other[2])
void wm_window_timers_delete_removed(wmWindowManager *wm)
uint WM_cursor_preferred_logical_size(const bool hardware_cursor)
void wm_ghost_init(bContext *C)
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)
static void wm_window_decoration_style_set_from_theme(const wmWindow *win, const bScreen *screen)
void WM_window_decoration_style_apply(const wmWindow *win, const bScreen *screen)
void WM_init_native_pixels(bool do_it)
StringRefNull ED_area_name(const ScrArea *area)
wmWindow * wm_window_copy_test(bContext *C, wmWindow *win_src, const bool duplicate_layout, const bool child)
PointerRNA WM_operator_properties_create_ptr(wmOperatorType *ot)
static void wm_window_update_eventstate_modifiers_clear(wmWindowManager *wm, wmWindow *win, const uint64_t event_time_ms)
wmOperatorStatus wm_window_fullscreen_toggle_exec(bContext *C, wmOperator *)
static void wm_window_ghostwindow_ensure(wmWindowManager *wm, wmWindow *win, bool is_dialog)
void WM_window_title_set(wmWindow *win, const char *title)
void WM_window_set_active_layout(wmWindow *win, WorkSpace *workspace, WorkSpaceLayout *layout)
CLG_LogRef * WM_LOG_EVENTS
void BLI_rcti_resize_x(struct rcti *rect, int x)
void WM_system_gpu_context_release(GHOST_IContext *context)
void ED_area_newspace(bContext *C, ScrArea *area, int type, bool skip_region_exit)
void wm_cursor_position_to_ghost_screen_coords(wmWindow *win, int *x, int *y)
wmWindow * CTX_wm_window(const bContext *C)
void WM_window_set_active_workspace(bContext *C, wmWindow *win, WorkSpace *workspace)
const char * BKE_main_blendfile_path_from_global()
MINLINE int max_ii(int a, int b)
int ED_file_extension_icon(const char *path)
int GPU_backend_vsync_get()
int WM_window_native_pixel_x(const wmWindow *win)
void WM_progress_clear(wmWindow *win)
void GPU_context_active_set(GPUContext *)
bScreen * BKE_workspace_active_screen_get(const WorkSpaceInstanceHook *hook) GETTER_ATTRS
void wm_event_do_notifiers(bContext *C)
GHOST_IContext * WM_system_gpu_context_create()
static bool wm_window_is_last_main_window(wmWindowManager *wm, wmWindow *win)
ViewLayer * WM_window_get_active_view_layer(const wmWindow *win)
void ED_screen_global_areas_refresh(wmWindow *win)
@ WIN_ALIGN_PARENT_CENTER
@ WIN_ALIGN_LOCATION_CENTER
int RNA_enum_from_value(const EnumPropertyItem *item, const int value)
void MEM_delete_void(void *vmemh)
static GHOST_ISystem * g_system
void WM_init_state_normal_set()
ViewLayer * BKE_view_layer_default_view(const Scene *scene)
ViewLayer * CTX_data_view_layer(const bContext *C)
wmTimer * WM_event_timer_add_notifier(wmWindowManager *wm, wmWindow *win, const uint type, const double time_step)
void ED_screen_exit(bContext *C, wmWindow *window, bScreen *screen)
WorkSpace * BKE_workspace_active_get(WorkSpaceInstanceHook *hook) GETTER_ATTRS
bool wm_file_or_session_data_has_unsaved_changes(const Main *bmain, const wmWindowManager *wm)
void wm_event_free_all(wmWindow *win)
void wm_window_reset_drawable()
void wm_cursor_position_from_ghost_screen_coords(wmWindow *win, int *x, int *y)
eWM_WindowDecorationStyleFlag
@ WM_WINDOW_DECORATION_STYLE_COLORED_TITLEBAR
@ WM_WINDOW_DECORATION_STYLE_NONE
@ G_DEBUG_GPU_NO_HW_RAYTRACING
const char * BLI_dir_home()
void wm_window_make_drawable(wmWindowManager *wm, wmWindow *win)
void WM_window_set_active_screen(wmWindow *win, WorkSpace *workspace, bScreen *screen)
static uint8_t wm_ghost_modifier_query(const enum ModSide side)
void BKE_workspace_instance_hook_free(const Main *bmain, WorkSpaceInstanceHook *hook)
static void wm_window_check_size(rcti *rect)
void void void const char * BLI_path_basename(const char *path) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT
int BLI_findindex(const ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void WM_system_gpu_context_dispose(GHOST_IContext *context)
wmWindow * WM_window_find_by_area(wmWindowManager *wm, const ScrArea *area)
BLI_INLINE int BLI_rcti_size_y(const struct rcti *rct)
void WM_event_remove_handlers(bContext *C, ListBaseT< wmEventHandler > *handlers)
wmOperatorStatus wm_window_close_exec(bContext *C, wmOperator *)
void WM_window_rect_calc(const wmWindow *win, rcti *r_rect)
static void wm_window_set_drawable(wmWindowManager *wm, wmWindow *win, bool activate)
bool WM_window_support_hdr_color(const wmWindow *win)
void WM_window_native_pixel_coords(const wmWindow *win, int *x, int *y)
wmEventHandler_Dropbox * WM_event_add_dropbox_handler(ListBaseT< wmEventHandler > *handlers, ListBaseT< wmDropBox > *dropboxes)
bool wm_cursor_position_get(wmWindow *win, int *r_x, int *r_y)
void BKE_icon_changed(int icon_id)
VecBase< int32_t, 2 > int2
Scene * WM_window_get_active_scene(const wmWindow *win)
void WM_init_state_size_set(int stax, int stay, int sizx, int sizy)
void WM_window_ensure_active_view_layer(wmWindow *win)
void * MEM_new_zeroed(size_t len, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2)
void wm_window_ghostwindows_ensure(wmWindowManager *wm)
void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, const int type, const void *customdata, const uint64_t event_time_ms)
GPUBackendType GPU_backend_type_selection_get()
char * WM_clipboard_text_get_firstline(bool selection, bool ensure_utf8, int *r_len)
void BLI_remlink(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BKE_report(ReportList *reports, eReportType type, const char *message)
static void wm_window_title_project_append(fmt::memory_buffer &win_title)
BMesh const char void * data
void wm_window_swap_buffer_acquire(wmWindow *win)
Push rendered buffer to the screen.
bool WM_window_is_maximized(const wmWindow *win)
static struct blender::wmInitStruct wm_init_state
void WM_progress_set(wmWindow *win, float progress)
void BKE_workspace_active_layout_set(WorkSpaceInstanceHook *hook, int winid, WorkSpace *workspace, WorkSpaceLayout *layout) SETTER_ATTRS
Activate a layout.
wmWindowManager * CTX_wm_manager(const bContext *C)
bool wm_window_get_swap_interval(wmWindow *win, int *r_interval)
gpu::FrameBuffer * GPU_framebuffer_back_get()
const GHOST_CSD_Layout * WM_window_csd_layout_get()
void wm_window_set_size(wmWindow *win, int width, int height)
static void wm_window_title_state_refresh(wmWindowManager *wm, wmWindow *win)
void wm_window_close_request(bContext *C, wmWindowManager *wm, wmWindow *win)
static void wm_confirm_quit(bContext *C)
void wm_quit_with_optional_confirmation_prompt(bContext *C, wmWindow *win)
WorkSpaceLayout * ED_workspace_layout_add(Main *bmain, WorkSpace *workspace, wmWindow *win, const char *name) ATTR_NONNULL()
void WM_init_input_devices()
void WM_window_cursor_keymap_status_free(wmWindow *win)
bool WM_clipboard_image_set_byte_buffer(ImBuf *ibuf)
static void wm_window_ghostwindow_add(wmWindowManager *wm, const char *title, wmWindow *win, bool is_dialog)
constexpr size_t ARRAY_SIZE(const T(&arg)[N]) noexcept
WorkSpace * WM_window_get_active_workspace(const wmWindow *win)
@ WM_TIMER_NO_FREE_CUSTOM_DATA
@ WM_TIMER_TAGGED_FOR_REMOVAL
wmKeyMap * WM_keymap_ensure(wmKeyConfig *keyconf, const char *idname, int spaceid, int regionid)
void WM_window_csd_draw_corner_mask(const wmWindow *win)
void wm_window_raise(wmWindow *win)
void wm_autosave_timer(Main *bmain, wmWindowManager *wm, wmTimer *)
void wm_window_clear_drawable(wmWindowManager *wm)
void wm_window_close(bContext *C, wmWindowManager *wm, wmWindow *win)
bool ED_workspace_change(WorkSpace *workspace_new, bContext *C, wmWindowManager *wm, wmWindow *win) ATTR_NONNULL()
Change the active workspace.
static void wm_save_file_on_quit_dialog_callback(bContext *C, void *)
static void wm_window_csd_title_redraw_tag(wmWindowManager *wm, wmWindow *win)
int ED_area_global_size_y(const ScrArea *area)
bool WM_window_is_main_top_level(const wmWindow *win)
bool WM_window_csd_is_active()
wmOperatorStatus wm_window_new_main_exec(bContext *C, wmOperator *op)
wmEventHandler_Keymap * WM_event_add_keymap_handler(ListBaseT< wmEventHandler > *handlers, wmKeyMap *keymap)
void wm_window_titlebar_theme_context_set(const wmWindow *win, const bScreen *screen)
void WM_system_gpu_context_activate(GHOST_IContext *context)
BLI_INLINE int BLI_rcti_size_x(const struct rcti *rct)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
bool WM_init_window_frame_get()
void RNA_boolean_set(PointerRNA *ptr, const char *name, bool value)
bool wm_get_desktopsize(int r_size[2])
static void wm_window_update_eventstate_modifiers(wmWindowManager *wm, wmWindow *win, const uint64_t event_time_ms)
static void ghost_event_proc_timestamp_warning(const GHOST_IEvent *ghost_event)
void wm_exit_schedule_delayed(const bContext *C)
static void wm_window_title_text(wmWindowManager *wm, wmWindow *win, std::optional< FunctionRef< void(const char *)> > window_filepath_fn, fmt::memory_buffer &win_title)
static bool ghost_event_proc(const GHOST_IEvent *ghost_event, GHOST_TUserDataPtr ps_void_ptr)
wmWindow * WM_window_open_temp(bContext *C, const char *title, int space_type, bool dialog)
void wm_jobs_timer(wmWindowManager *wm, wmTimer *wt)
void BLI_rcti_init(struct rcti *rect, int xmin, int xmax, int ymin, int ymax)
void WM_windows_scene_data_sync(const ListBaseT< wmWindow > *win_lb, Scene *scene)
@ WM_CAPABILITY_CURSOR_RGBA
@ WM_CAPABILITY_WINDOW_DECORATION_SERVER_SIDE
@ WM_CAPABILITY_GPU_FRONT_BUFFER_READ
@ WM_CAPABILITY_MULTIMONITOR_PLACEMENT
@ WM_CAPABILITY_CLIPBOARD_IMAGE
@ WM_CAPABILITY_CURSOR_GENERATOR
@ WM_CAPABILITY_TRACKPAD_PHYSICAL_DIRECTION
@ WM_CAPABILITY_KEYBOARD_HYPER_KEY
@ WM_CAPABILITY_WINDOW_DECORATION_STYLES
@ WM_CAPABILITY_WINDOW_POSITION
@ WM_CAPABILITY_DESKTOP_SAMPLE
@ WM_CAPABILITY_INITIALIZED
@ WM_CAPABILITY_WINDOW_PATH
@ WM_CAPABILITY_INPUT_IME
@ WM_CAPABILITY_CLIPBOARD_PRIMARY
@ WM_CAPABILITY_CURSOR_WARP
void wm_window_swap_buffer_release(wmWindow *win)
wmEvent * WM_event_add(wmWindow *win, const wmEvent *event_to_add)
WorkSpaceInstanceHook * BKE_workspace_instance_hook_create(const Main *bmain, int winid)
ViewLayer * BKE_view_layer_find(const Scene *scene, const char *layer_name)
wmOperatorType * WM_operatortype_find(const char *idname, bool quiet)
WorkSpace * WM_windows_workspace_get_from_screen(const wmWindowManager *wm, const bScreen *screen)
void BLI_system_backtrace(FILE *fp)
bool WM_window_is_csd(const wmWindow *win)
static const char * g_system_backend_id
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
@ G_FLAG_GPU_BACKEND_FALLBACK_QUIET
@ G_FLAG_GPU_BACKEND_FALLBACK
Main * CTX_data_main(const bContext *C)
char * BLI_strdup(const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC
void WM_event_consecutive_data_free(wmWindow *win)
char * WM_clipboard_text_get(bool selection, bool ensure_utf8, int *r_len)
void wm_test_gpu_backend_fallback(bContext *C)
void BLI_time_sleep_precise_us(int us)
int2 WM_window_native_pixel_size(const wmWindow *win)
bool BKE_autoexec_default_trust_source(const char *path, const AutoExec_Params ¶ms)
GHOST_TDrawingContextType wm_ghost_drawing_context_type(const GPUBackendType gpu_backend)
eWM_CapabilitiesFlag WM_capabilities_flag()
bScreen * BKE_workspace_layout_screen_get(const WorkSpaceLayout *layout) GETTER_ATTRS
MINLINE float max_ff(float a, float b)
@ USER_NO_MULTITOUCH_GESTURES
void WM_window_title_refresh(wmWindowManager *wm, wmWindow *win)
Scene * WM_windows_scene_get_from_screen(const wmWindowManager *wm, const bScreen *screen)
ImBuf * IMB_allocFromBuffer(const uint8_t *byte_buffer, const float *float_buffer, unsigned int w, unsigned int h, unsigned int channels)
void WM_clipboard_text_set(const char *buf, bool selection)
static bool wm_window_update_size_position(wmWindow *win)
void BKE_workspace_layout_remove(Main *bmain, WorkSpace *workspace, WorkSpaceLayout *layout) ATTR_NONNULL()
wmOperatorStatus WM_operator_name_call_ptr(bContext *C, wmOperatorType *ot, wm::OpCallContext context, PointerRNA *properties, const wmEvent *event)
bool GPU_backend_vsync_is_overridden()
void wm_window_free(bContext *C, wmWindowManager *wm, wmWindow *win)
static void wm_ghostwindow_destroy(wmWindowManager *wm, wmWindow *win)
ScrArea * BKE_screen_find_big_area(const bScreen *screen, int spacetype, short min)
struct blender::@256065377070330042333064353146222061270000364150 * g_wm_clipboard_text_simulate
void WM_init_state_fullscreen_set()
static void wm_clipboard_text_set_impl(const char *buf, bool selection)
static char * wm_clipboard_text_get_ex(bool selection, int *r_len, const bool ensure_utf8, const bool firstline)
void WM_window_csd_params_update()
double BLI_time_now_seconds()
static int find_free_winid(wmWindowManager *wm)
WorkSpaceLayout * BKE_workspace_active_layout_get(const WorkSpaceInstanceHook *hook) GETTER_ATTRS
void GPU_backend_ghost_system_set(GHOST_ISystem *ghost_system_handle)
bool ED_screen_change(bContext *C, bScreen *screen)
Change the active screen.
void ED_scene_change_update(Main *bmain, Scene *scene, ViewLayer *layer) ATTR_NONNULL()
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)
Scene * CTX_data_scene(const bContext *C)
void ED_screen_refresh(bContext *C, wmWindowManager *wm, wmWindow *win)
bScreen * CTX_wm_screen(const bContext *C)
bool BLI_rcti_isect_pt_v(const struct rcti *rect, const int xy[2])
void WM_event_timer_remove(wmWindowManager *wm, wmWindow *, wmTimer *timer)
GHOST_GPUDevice GPU_backend_preferred_device_get()
bool wm_xr_events_handle(wmWindowManager *wm)
void wm_draw_update(bContext *C)
wmTimer * WM_event_timer_add(wmWindowManager *wm, wmWindow *win, const wmEventType event_type, const double time_step)
wmDragPath * WM_drag_create_path_data(Span< const char * > paths)
void wm_close_file_dialog(bContext *C, wmGenericCallback *post_action)
ListBaseT< wmDropBox > * WM_dropboxmap_find(const char *idname, int spaceid, int regionid)
float WM_window_dpi_get_scale(const wmWindow *win)
void WM_check(bContext *C)
void WM_window_csd_rect_calc(const wmWindow *win, rcti *r_rect)
void WM_cursor_warp(wmWindow *win, int x, int y)
void wm_jobs_timer_end(wmWindowManager *wm, wmTimer *wt)
void WM_window_screen_rect_calc(const wmWindow *win, rcti *r_rect)
static void wm_window_update_eventstate(wmWindow *win)
bScreen * WM_window_get_active_screen(const wmWindow *win)
void ED_workspace_scene_data_sync(WorkSpaceInstanceHook *hook, Scene *scene) ATTR_NONNULL()
void WM_window_dpi_set_userdef(const wmWindow *win)
static bool wm_window_timers_process(const bContext *C, int *sleep_us_p)
wmWindow * wm_window_copy(Main *bmain, wmWindowManager *wm, wmWindow *win_src, const bool duplicate_layout, const bool child)
int BLI_str_utf8_invalid_strip(char *str, size_t str_len) ATTR_NONNULL(1)
const char * BKE_blender_version_string()
void wm_event_do_handlers(bContext *C)
void wm_event_init_from_window(wmWindow *win, wmEvent *event)
bool WM_window_is_temp_screen(const wmWindow *win)
bool WM_window_is_fullscreen(const wmWindow *win)
void WM_window_set_active_view_layer(wmWindow *win, ViewLayer *view_layer)
void GPU_context_discard(GPUContext *)
void wm_ghost_init_background()
void * MEM_new_array_zeroed(size_t len, size_t size, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1
static const struct blender::@150207350170167056111015034026075334247243372331 g_modifier_table[]
void wm_jobs_handle_finished(const bContext *C)
void void BLI_INLINE bool BLI_listbase_is_single(const ListBase *lb)
void CTX_wm_area_set(bContext *C, ScrArea *area)
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
GHOST_TDrawingContextType context_type
GHOST_GPUDevice preferred_device
GHOST_TDragnDropTypes dataType
GHOST_TDragnDropDataPtr data
float colored_titlebar_bg_color[3]
std::optional< ARegionIMECursorState >(*) cursor_ime(wmWindow *win, const ScrArea *area, const ARegion *region, ARegionIMECursor *r_cursor)
bke::ARegionRuntime * runtime
const uint8_t * byte_data() const
uint8_t * byte_data_for_write()
ListBaseT< wmWindowManager > wm
ListBaseT< ScrArea > areabase
ScrGlobalAreaData * global
GHOST_TModifierKey ghost_mask_pair[2]
GHOST_TKey ghost_key_pair[2]
ListBaseT< struct ScrArea > areabase
struct ARegionType * type
ListBaseT< wmEventHandler > handlers
ListBaseT< wmEvent > event_queue
std::string recents_storage_key
ListBaseT< wmEventHandler > modalhandlers
wmEvent * event_last_handled
wmEventModifierFlag modifier
eWinOverrideFlag override_flag
GHOST_TWindowState windowstate
struct ReportList * reports
bke::WindowRuntime * runtime
struct wmEvent_ConsecutiveData * event_queue_consecutive_gesture_data
struct WorkSpaceInstanceHook * workspace_hook
struct Stereo3dFormat * stereo3d_format
#define ISTIMER(event_type)
#define GHOST_WINDOW_STATE_DEFAULT
const GHOST_IconGenerator wm_ghost_icon_generator
#define WM_WINDOW_CSD_CORNER_RADIUS
#define WM_WINDOW_CSD_RESIZE_MARGIN_SIZE