Blender V4.3
wm_window.cc File Reference
#include <chrono>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <thread>
#include "CLG_log.h"
#include "DNA_listBase.h"
#include "DNA_screen_types.h"
#include "DNA_windowmanager_types.h"
#include "DNA_workspace_types.h"
#include "MEM_guardedalloc.h"
#include "GHOST_C-api.h"
#include "BLI_blenlib.h"
#include "BLI_system.h"
#include "BLI_time.h"
#include "BLI_utildefines.h"
#include "BLT_translation.hh"
#include "BKE_blender_version.h"
#include "BKE_context.hh"
#include "BKE_global.hh"
#include "BKE_icons.h"
#include "BKE_layer.hh"
#include "BKE_main.hh"
#include "BKE_report.hh"
#include "BKE_screen.hh"
#include "BKE_workspace.hh"
#include "RNA_access.hh"
#include "RNA_define.hh"
#include "RNA_enum_types.hh"
#include "RNA_prototypes.hh"
#include "WM_api.hh"
#include "WM_types.hh"
#include "wm.hh"
#include "wm_draw.hh"
#include "wm_event_system.hh"
#include "wm_files.hh"
#include "wm_platform_support.hh"
#include "wm_window.hh"
#include "wm_window_private.hh"
#include "ED_anim_api.hh"
#include "ED_fileselect.hh"
#include "ED_render.hh"
#include "ED_scene.hh"
#include "ED_screen.hh"
#include "IMB_imbuf.hh"
#include "IMB_imbuf_types.hh"
#include "UI_interface.hh"
#include "UI_interface_icons.hh"
#include "BLF_api.hh"
#include "GPU_batch.hh"
#include "GPU_batch_presets.hh"
#include "GPU_context.hh"
#include "GPU_framebuffer.hh"
#include "GPU_immediate.hh"
#include "GPU_init_exit.hh"
#include "GPU_platform.hh"
#include "GPU_state.hh"
#include "GPU_texture.hh"
#include "UI_resources.hh"
#include "BLI_threads.h"

Go to the source code of this file.

Classes

struct  WMInitStruct
 

Macros

#define GHOST_WINDOW_STATE_DEFAULT   GHOST_kWindowStateMaximized
 

Enumerations

enum  eWinOverrideFlag { WIN_OVERRIDE_GEOM = (1 << 0) , WIN_OVERRIDE_WINSTATE = (1 << 1) }
 

Functions

Window Open
static void wm_window_set_drawable (wmWindowManager *wm, wmWindow *win, bool activate)
 
static bool wm_window_timers_process (const bContext *C, int *sleep_us_p)
 
static uint8_t wm_ghost_modifier_query (const enum ModSide side)
 
bool wm_get_screensize (int r_size[2])
 
bool wm_get_desktopsize (int r_size[2])
 
static void wm_window_check_size (rcti *rect)
 
static void wm_ghostwindow_destroy (wmWindowManager *wm, wmWindow *win)
 
void wm_window_free (bContext *C, wmWindowManager *wm, wmWindow *win)
 
static int find_free_winid (wmWindowManager *wm)
 
wmWindowwm_window_new (const Main *bmain, wmWindowManager *wm, wmWindow *parent, bool dialog)
 
wmWindowwm_window_copy (Main *bmain, wmWindowManager *wm, wmWindow *win_src, const bool duplicate_layout, const bool child)
 
wmWindowwm_window_copy_test (bContext *C, wmWindow *win_src, const bool duplicate_layout, const bool child)
 
Window Quit Confirmation Dialog
static void wm_save_file_on_quit_dialog_callback (bContext *C, void *)
 
static void wm_confirm_quit (bContext *C)
 
void wm_quit_with_optional_confirmation_prompt (bContext *C, wmWindow *win)
 
Window Close
void wm_window_close (bContext *C, wmWindowManager *wm, wmWindow *win)
 
void WM_window_title (wmWindowManager *wm, wmWindow *win, const char *title)
 
void WM_window_set_dpi (const wmWindow *win)
 
static void wm_window_update_eventstate_modifiers (wmWindowManager *wm, wmWindow *win, const uint64_t event_time_ms)
 
static void wm_window_update_eventstate_modifiers_clear (wmWindowManager *wm, wmWindow *win, const uint64_t event_time_ms)
 
static void wm_window_update_eventstate (wmWindow *win)
 
static void wm_window_ensure_eventstate (wmWindow *win)
 
static bool wm_window_update_size_position (wmWindow *win)
 
static void wm_window_ghostwindow_add (wmWindowManager *wm, const char *title, wmWindow *win, bool is_dialog)
 
static void wm_window_ghostwindow_ensure (wmWindowManager *wm, wmWindow *win, bool is_dialog)
 
void wm_window_ghostwindows_ensure (wmWindowManager *wm)
 
void wm_window_ghostwindows_remove_invalid (bContext *C, wmWindowManager *wm)
 
wmWindowWM_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)
 
Operators
int wm_window_close_exec (bContext *C, wmOperator *)
 
int wm_window_new_exec (bContext *C, wmOperator *op)
 
int wm_window_new_main_exec (bContext *C, wmOperator *op)
 
int wm_window_fullscreen_toggle_exec (bContext *C, wmOperator *)
 
Events
void wm_cursor_position_from_ghost_client_coords (wmWindow *win, int *x, int *y)
 
void wm_cursor_position_to_ghost_client_coords (wmWindow *win, int *x, int *y)
 
void wm_cursor_position_from_ghost_screen_coords (wmWindow *win, int *x, int *y)
 
void wm_cursor_position_to_ghost_screen_coords (wmWindow *win, int *x, int *y)
 
bool wm_cursor_position_get (wmWindow *win, int *r_x, int *r_y)
 
void wm_window_clear_drawable (wmWindowManager *wm)
 
void wm_window_make_drawable (wmWindowManager *wm, wmWindow *win)
 
void wm_window_reset_drawable ()
 
static void ghost_event_proc_timestamp_warning (GHOST_EventHandle ghost_event)
 
static bool ghost_event_proc (GHOST_EventHandle ghost_event, GHOST_TUserDataPtr C_void_ptr)
 
void wm_window_events_process (const bContext *C)
 
Ghost Init/Exit
void wm_ghost_init (bContext *C)
 
void wm_ghost_init_background ()
 
void wm_ghost_exit ()
 
const char * WM_ghost_backend ()
 
GHOST_TDrawingContextType wm_ghost_drawing_context_type (const eGPUBackendType gpu_backend)
 
static uiBlockblock_create_opengl_usage_warning (bContext *C, ARegion *region, void *)
 
void wm_test_opengl_deprecation_warning (bContext *C)
 
static uiBlockblock_create_gpu_backend_fallback (bContext *C, ARegion *region, void *)
 
void wm_test_gpu_backend_fallback (bContext *C)
 
eWM_CapabilitiesFlag WM_capabilities_flag ()
 
Event Timer
void WM_event_timer_sleep (wmWindowManager *wm, wmWindow *, wmTimer *timer, bool do_sleep)
 
wmTimerWM_event_timer_add (wmWindowManager *wm, wmWindow *win, const int event_type, const double time_step)
 
wmTimerWM_event_timer_add_notifier (wmWindowManager *wm, wmWindow *win, const uint type, const double time_step)
 
void wm_window_timers_delete_removed (wmWindowManager *wm)
 
void WM_event_timer_free_data (wmTimer *timer)
 
void WM_event_timers_free_all (wmWindowManager *wm)
 
void WM_event_timer_remove (wmWindowManager *wm, wmWindow *, wmTimer *timer)
 
void WM_event_timer_remove_notifier (wmWindowManager *wm, wmWindow *win, wmTimer *timer)
 
Clipboard
static char * wm_clipboard_text_get_ex (bool selection, int *r_len, const bool ensure_utf8, const bool firstline)
 
char * WM_clipboard_text_get (bool selection, bool ensure_utf8, int *r_len)
 
char * WM_clipboard_text_get_firstline (bool selection, bool ensure_utf8, int *r_len)
 
void WM_clipboard_text_set (const char *buf, bool selection)
 
bool WM_clipboard_image_available ()
 
ImBufWM_clipboard_image_get ()
 
bool WM_clipboard_image_set (ImBuf *ibuf)
 
Progress Bar
void WM_progress_set (wmWindow *win, float progress)
 
void WM_progress_clear (wmWindow *win)
 
Window Position/Size (internal)
void wm_window_set_size (wmWindow *win, int width, int height)
 
Window Depth (Raise/Lower)
void wm_window_lower (wmWindow *win)
 
void wm_window_raise (wmWindow *win)
 
Window Buffers
void wm_window_swap_buffers (wmWindow *win)
 Push rendered buffer to the screen.
 
void wm_window_set_swap_interval (wmWindow *win, int interval)
 
bool wm_window_get_swap_interval (wmWindow *win, int *r_interval)
 
Find Window Utility
wmWindowWM_window_find_under_cursor (wmWindow *win, const int event_xy[2], int r_event_xy_other[2])
 
wmWindowWM_window_find_by_area (wmWindowManager *wm, const ScrArea *area)
 
Initial Window State API
void WM_init_state_size_set (int stax, int stay, int sizx, int sizy)
 
void WM_init_state_fullscreen_set ()
 
void WM_init_state_normal_set ()
 
void WM_init_state_maximized_set ()
 
void WM_init_window_focus_set (bool do_it)
 
void WM_init_native_pixels (bool do_it)
 
Cursor API
void WM_init_input_devices ()
 
void WM_cursor_warp (wmWindow *win, int x, int y)
 
Window Size (public)
int WM_window_native_pixel_x (const wmWindow *win)
 
int WM_window_native_pixel_y (const wmWindow *win)
 
blender::int2 WM_window_native_pixel_size (const wmWindow *win)
 
void WM_window_native_pixel_coords (const wmWindow *win, int *x, int *y)
 
void WM_window_rect_calc (const wmWindow *win, rcti *r_rect)
 
void WM_window_screen_rect_calc (const wmWindow *win, rcti *r_rect)
 
bool WM_window_is_fullscreen (const wmWindow *win)
 
bool WM_window_is_maximized (const wmWindow *win)
 
Window Screen/Scene/WorkSpaceViewLayer API
void WM_windows_scene_data_sync (const ListBase *win_lb, Scene *scene)
 
SceneWM_windows_scene_get_from_screen (const wmWindowManager *wm, const bScreen *screen)
 
ViewLayerWM_windows_view_layer_get_from_screen (const wmWindowManager *wm, const bScreen *screen)
 
WorkSpaceWM_windows_workspace_get_from_screen (const wmWindowManager *wm, const bScreen *screen)
 
SceneWM_window_get_active_scene (const wmWindow *win)
 
void WM_window_set_active_scene (Main *bmain, bContext *C, wmWindow *win, Scene *scene)
 
ViewLayerWM_window_get_active_view_layer (const wmWindow *win)
 
void WM_window_set_active_view_layer (wmWindow *win, ViewLayer *view_layer)
 
void WM_window_ensure_active_view_layer (wmWindow *win)
 
WorkSpaceWM_window_get_active_workspace (const wmWindow *win)
 
void WM_window_set_active_workspace (bContext *C, wmWindow *win, WorkSpace *workspace)
 
WorkSpaceLayoutWM_window_get_active_layout (const wmWindow *win)
 
void WM_window_set_active_layout (wmWindow *win, WorkSpace *workspace, WorkSpaceLayout *layout)
 
bScreenWM_window_get_active_screen (const wmWindow *win)
 
void WM_window_set_active_screen (wmWindow *win, WorkSpace *workspace, bScreen *screen)
 
bool WM_window_is_temp_screen (const wmWindow *win)
 
Direct GPU Context Management
void * WM_system_gpu_context_create ()
 
void WM_system_gpu_context_dispose (void *context)
 
void WM_system_gpu_context_activate (void *context)
 
void WM_system_gpu_context_release (void *context)
 
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)
 

Variables

static GHOST_SystemHandle g_system = nullptr
 
static const char * g_system_backend_id = nullptr
 
static struct WMInitStruct wm_init_state
 

Modifier Constants

enum  ModSide { MOD_SIDE_LEFT = 0 , MOD_SIDE_RIGHT = 1 }
 
struct { 
 
   uint8_t   flag 
 
   GHOST_TKey   ghost_key_pair [2] 
 
   GHOST_TModifierKey   ghost_mask_pair [2] 
 
g_modifier_table [] 
 

Clipboard Wrappers

GHOST function wrappers that support a "fake" clipboard used when simulating events. This is useful user actions can be simulated while the system is in use without the system's clipboard getting overwritten.

struct { 
 
   char *   buffers [2] 
 
} * g_wm_clipboard_text_simulate = nullptr 
 
void wm_clipboard_free ()
 
static char * wm_clipboard_text_get_impl (bool selection)
 
static void wm_clipboard_text_set_impl (const char *buf, bool selection)
 

Detailed Description

Window management, wrap GHOST.

Definition in file wm_window.cc.

Macro Definition Documentation

◆ GHOST_WINDOW_STATE_DEFAULT

#define GHOST_WINDOW_STATE_DEFAULT   GHOST_kWindowStateMaximized

Definition at line 106 of file wm_window.cc.

Referenced by wm_window_ghostwindow_ensure().

Enumeration Type Documentation

◆ eWinOverrideFlag

Enumerator
WIN_OVERRIDE_GEOM 
WIN_OVERRIDE_WINSTATE 

Definition at line 100 of file wm_window.cc.

◆ ModSide

enum ModSide
Enumerator
MOD_SIDE_LEFT 
MOD_SIDE_RIGHT 

Definition at line 156 of file wm_window.cc.

Function Documentation

◆ block_create_gpu_backend_fallback()

◆ block_create_opengl_usage_warning()

◆ find_free_winid()

static int find_free_winid ( wmWindowManager * wm)
static

Definition at line 296 of file wm_window.cc.

References LISTBASE_FOREACH, wmWindowManager::windows, and winid.

Referenced by wm_window_new().

◆ ghost_event_proc()

static bool ghost_event_proc ( GHOST_EventHandle ghost_event,
GHOST_TUserDataPtr C_void_ptr )
static

Called by ghost, here we handle events for windows themselves or send to event system.

Mouse coordinate conversion happens here.

Definition at line 1393 of file wm_window.cc.

References wmWindow::active, wmWindow::addmousemove, BKE_icon_changed(), BLF_cache_clear(), CLOG_INFO, copy_v2_v2_int(), GHOST_TStringArray::count, CTX_wm_manager(), CTX_wm_window_set(), data, GHOST_TEventDragnDropData::data, GHOST_TEventDragnDropData::dataType, wmWindowManager::drags, ED_file_extension_icon(), wmWindow::eventstate, EVT_DATA_DRAGDROP, EVT_DROP, G, G_DEBUG_EVENTS, g_system, ghost_event_proc_timestamp_warning(), GHOST_GetEventData(), GHOST_GetEventTime(), GHOST_GetEventType(), GHOST_GetEventWindow(), GHOST_GetWindowState(), GHOST_GetWindowUserData(), GHOST_kDragnDropTypeFilenames, GHOST_kDragnDropTypeString, GHOST_kEventButtonDown, GHOST_kEventButtonUp, GHOST_kEventDraggingDropDone, GHOST_kEventNativeResolutionChange, GHOST_kEventOpenMainFile, GHOST_kEventQuitRequest, GHOST_kEventWindowActivate, GHOST_kEventWindowClose, GHOST_kEventWindowDeactivate, GHOST_kEventWindowDPIHintChanged, GHOST_kEventWindowMove, GHOST_kEventWindowSize, GHOST_kEventWindowUpdate, GHOST_kEventWindowUpdateDecor, GHOST_kWindowStateFullScreen, GHOST_kWindowStateMaximized, GHOST_kWindowStateMinimized, GHOST_kWindowStateNormal, GHOST_ValidWindow(), wmWindow::ghostwin, wmWindowManager::init_flag, wmEvent::keymodifier, KM_NOTHING, KM_RELEASE, wmWindow::modalhandlers, MOUSEMOVE, NA_EDITED, NC_SCREEN, NC_WINDOW, ot, wmWindow::posx, wmWindow::posy, wmEvent::prev_xy, printf, RNA_boolean_set(), RNA_string_set(), wmWindow::sizex, wmWindow::sizey, state, str, GHOST_TStringArray::strings, UI_popup_handlers_remove_all(), wmWindowManager::winactive, wmWindow::windowstate, wmWindow::winid, wm_cursor_position_from_ghost_screen_coords(), WM_drag_create_path_data(), WM_DRAG_FREE_DATA, WM_DRAG_NOP, WM_DRAG_PATH, WM_DRAG_STRING, wm_draw_update(), wm_event_add(), wm_event_add_ghostevent(), WM_event_add_notifier_ex(), wm_event_do_handlers(), wm_event_do_notifiers(), wm_event_init_from_window(), WM_event_start_drag(), wm_exit_schedule_delayed(), WM_INIT_FLAG_WINDOW, WM_LOG_EVENTS, WM_main_add_notifier(), WM_OP_INVOKE_DEFAULT, WM_operator_name_call_ptr(), WM_operator_properties_create_ptr(), WM_operator_properties_free(), WM_operatortype_find(), wm_quit_with_optional_confirmation_prompt(), wm_window_close(), WM_window_get_active_screen(), wm_window_make_drawable(), WM_window_set_dpi(), wm_window_swap_buffers(), wm_window_timers_process(), wm_window_update_eventstate(), wm_window_update_eventstate_modifiers(), wm_window_update_eventstate_modifiers_clear(), wm_window_update_size_position(), GHOST_TEventDragnDropData::x, and wmEvent::xy.

Referenced by wm_ghost_init().

◆ ghost_event_proc_timestamp_warning()

static void ghost_event_proc_timestamp_warning ( GHOST_EventHandle ghost_event)
static

Time-stamp validation that uses basic heuristics to warn about bad time-stamps. Issues here should be resolved in GHOST.

Definition at line 1315 of file wm_window.cc.

References ARRAY_SIZE, double(), g_system, GHOST_GetEventTime(), GHOST_GetEventType(), GHOST_GetMilliSeconds(), int, and PRIu64.

Referenced by ghost_event_proc().

◆ WM_capabilities_flag()

◆ wm_clipboard_free()

void wm_clipboard_free ( )

Definition at line 2298 of file wm_window.cc.

References ARRAY_SIZE, g_wm_clipboard_text_simulate, and MEM_freeN().

Referenced by WM_exit_ex().

◆ WM_clipboard_image_available()

bool WM_clipboard_image_available ( )

Returns true if the clipboard contains an image.

Definition at line 2461 of file wm_window.cc.

References G, and GHOST_hasClipboardImage().

Referenced by image_clipboard_paste_poll().

◆ WM_clipboard_image_get()

ImBuf * WM_clipboard_image_get ( )

Get image data from the clipboard.

Returns
The image or null when not found. Caller must free.

Definition at line 2469 of file wm_window.cc.

References free(), G, GHOST_getClipboardImage(), and IMB_allocFromBuffer().

Referenced by image_clipboard_paste_exec().

◆ WM_clipboard_image_set()

bool WM_clipboard_image_set ( ImBuf * ibuf)

Put image data to the clipboard.

Parameters
ibufthe image to set the clipboard to.

Definition at line 2488 of file wm_window.cc.

References ImBuf::byte_buffer, ImBufByteBuffer::data, G, GHOST_putClipboardImage(), imb_freerectImBuf(), IMB_rect_from_float(), ImBuf::x, and ImBuf::y.

Referenced by image_clipboard_copy_exec().

◆ WM_clipboard_text_get()

char * WM_clipboard_text_get ( bool selection,
bool ensure_utf8,
int * r_len )

Return text from the clipboard.

Parameters
selectionUse the "primary" clipboard, see: WM_CAPABILITY_PRIMARY_CLIPBOARD.
ensure_utf8Ensure the resulting string does not contain invalid UTF8 encoding.

Definition at line 2412 of file wm_window.cc.

References wm_clipboard_text_get_ex().

Referenced by console_paste_exec(), paste_text_exec(), pyrna_WindowManager_clipboard_get(), and text_paste_exec().

◆ wm_clipboard_text_get_ex()

static char * wm_clipboard_text_get_ex ( bool selection,
int * r_len,
const bool ensure_utf8,
const bool firstline )
static

◆ WM_clipboard_text_get_firstline()

char * WM_clipboard_text_get_firstline ( bool selection,
bool ensure_utf8,
int * r_len )

Convenience function for pasting to areas of Blender which don't support newlines.

Definition at line 2417 of file wm_window.cc.

References wm_clipboard_text_get_ex().

Referenced by handleNumInput(), ui_but_get_pasted_text_from_clipboard(), and ui_textedit_copypaste().

◆ wm_clipboard_text_get_impl()

static char * wm_clipboard_text_get_impl ( bool selection)
static

◆ WM_clipboard_text_set()

◆ wm_clipboard_text_set_impl()

static void wm_clipboard_text_set_impl ( const char * buf,
bool selection )
static

◆ wm_confirm_quit()

static void wm_confirm_quit ( bContext * C)
static

Call the confirm dialog on quitting. It's displayed in the context window so caller should set it as desired.

Definition at line 389 of file wm_window.cc.

References wmGenericCallback::exec, MEM_callocN, wm_close_file_dialog(), and wm_save_file_on_quit_dialog_callback().

Referenced by wm_quit_with_optional_confirmation_prompt().

◆ wm_cursor_position_from_ghost_client_coords()

void wm_cursor_position_from_ghost_client_coords ( wmWindow * win,
int * x,
int * y )

◆ wm_cursor_position_from_ghost_screen_coords()

void wm_cursor_position_from_ghost_screen_coords ( wmWindow * win,
int * x,
int * y )

◆ wm_cursor_position_get()

◆ wm_cursor_position_to_ghost_client_coords()

void wm_cursor_position_to_ghost_client_coords ( wmWindow * win,
int * x,
int * y )

◆ wm_cursor_position_to_ghost_screen_coords()

void wm_cursor_position_to_ghost_screen_coords ( wmWindow * win,
int * x,
int * y )

◆ WM_cursor_warp()

void WM_cursor_warp ( wmWindow * win,
int x,
int y )

Set the cursor location in window coordinates (compatible with wmEvent.xy).

Note
Some platforms don't support this, check: WM_CAPABILITY_WINDOW_POSITION before relying on this functionality.

Definition at line 2692 of file wm_window.cc.

References wmWindow::eventstate, g_system, GHOST_SetCursorPosition(), wmWindow::ghostwin, wmEvent::prev_xy, wm_cursor_position_to_ghost_client_coords(), x, wmEvent::xy, and y.

Referenced by initFlyInfo(), wm_cursor_warp_relative(), and wm_gizmomap_modal_set().

◆ WM_event_timer_add()

◆ WM_event_timer_add_notifier()

◆ WM_event_timer_free_data()

void WM_event_timer_free_data ( wmTimer * timer)

◆ WM_event_timer_remove()

void WM_event_timer_remove ( wmWindowManager * wm,
wmWindow * win,
wmTimer * timer )

◆ WM_event_timer_remove_notifier()

void WM_event_timer_remove_notifier ( wmWindowManager * wm,
wmWindow * win,
wmTimer * timer )

◆ WM_event_timer_sleep()

void WM_event_timer_sleep ( wmWindowManager * wm,
wmWindow * win,
wmTimer * timer,
bool do_sleep )

To (de)activate running timers temporary.

Definition at line 2161 of file wm_window.cc.

References BLI_findindex(), wmTimer::flags, wmTimer::sleep, timer, wmWindowManager::timers, and WM_TIMER_TAGGED_FOR_REMOVAL.

Referenced by screen_change_prepare(), and screen_refresh().

◆ WM_event_timers_free_all()

void WM_event_timers_free_all ( wmWindowManager * wm)

Free all timers immediately.

Note
This should only be used on-exit, in all other cases timers should be tagged for removal by WM_event_timer_remove.

Definition at line 2240 of file wm_window.cc.

References BLI_assert_msg, BLI_listbase_is_empty(), BLI_pophead(), MEM_freeN(), timer, wmWindowManager::timers, wmWindowManager::windows, and WM_event_timer_free_data().

Referenced by wm_close_and_free().

◆ wm_get_desktopsize()

bool wm_get_desktopsize ( int r_size[2])

Size of all screens (desktop), useful since the mouse is bound by this.

Returns
true on success.

Definition at line 182 of file wm_window.cc.

References g_system, GHOST_GetAllDisplayDimensions(), and GHOST_kFailure.

Referenced by wm_window_ghostwindow_add(), and wm_window_update_size_position().

◆ wm_get_screensize()

bool wm_get_screensize ( int r_size[2])

This one should correctly check for apple top header... done for Cocoa: returns window contents (and not frame) max size.

Returns
true on success.

Definition at line 171 of file wm_window.cc.

References g_system, GHOST_GetMainDisplayDimensions(), and GHOST_kFailure.

Referenced by wm_window_check_size(), and wm_window_ghostwindows_ensure().

◆ WM_ghost_backend()

const char * WM_ghost_backend ( )

Return an identifier for the underlying GHOST implementation.

Warning
Use of this function should be limited & never for compatibility checks. see: GHOST_ISystem::getSystemBackend for details.

Definition at line 1950 of file wm_window.cc.

References g_system, and g_system_backend_id.

Referenced by bpy_ghost_backend().

◆ wm_ghost_drawing_context_type()

◆ wm_ghost_exit()

void wm_ghost_exit ( )

Definition at line 1942 of file wm_window.cc.

References g_system, and GHOST_DisposeSystem().

Referenced by WM_exit_ex().

◆ wm_ghost_init()

◆ wm_ghost_init_background()

◆ wm_ghost_modifier_query()

static uint8_t wm_ghost_modifier_query ( const enum ModSide side)
static

Check if specified modifier key type is pressed.

Definition at line 1241 of file wm_window.cc.

References ARRAY_SIZE, g_modifier_table, g_system, GHOST_GetModifierKeyState(), ghost_mask_pair, and result.

Referenced by wm_window_update_eventstate_modifiers(), and wm_window_update_eventstate_modifiers_clear().

◆ WM_ghost_show_message_box()

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 )

Definition at line 3071 of file wm_window.cc.

References BLI_assert, g_system, and GHOST_ShowMessageBox().

Referenced by WM_platform_support_perform_checks().

◆ wm_ghostwindow_destroy()

◆ WM_init_input_devices()

◆ WM_init_native_pixels()

void WM_init_native_pixels ( bool do_it)

Definition at line 2659 of file wm_window.cc.

References WMInitStruct::native_pixels, and wm_init_state.

Referenced by arg_handle_native_pixels_set().

◆ WM_init_state_fullscreen_set()

void WM_init_state_fullscreen_set ( )

For border-less and border windows set from command-line.

Definition at line 2636 of file wm_window.cc.

References GHOST_kWindowStateFullScreen, WMInitStruct::override_flag, WIN_OVERRIDE_WINSTATE, WMInitStruct::windowstate, and wm_init_state.

Referenced by arg_handle_without_borders().

◆ WM_init_state_maximized_set()

void WM_init_state_maximized_set ( )

◆ WM_init_state_normal_set()

void WM_init_state_normal_set ( )

◆ WM_init_state_size_set()

void WM_init_state_size_set ( int stax,
int stay,
int sizx,
int sizy )

Called when no ghost system was initialized.

Definition at line 2629 of file wm_window.cc.

References WMInitStruct::override_flag, WMInitStruct::size, WMInitStruct::start, WIN_OVERRIDE_GEOM, and wm_init_state.

Referenced by arg_handle_window_geometry().

◆ WM_init_window_focus_set()

void WM_init_window_focus_set ( bool do_it)

Definition at line 2654 of file wm_window.cc.

References WMInitStruct::window_focus, and wm_init_state.

Referenced by arg_handle_no_window_focus().

◆ WM_progress_clear()

void WM_progress_clear ( wmWindow * win)

Definition at line 2525 of file wm_window.cc.

References GHOST_EndProgressBar(), and wmWindow::ghostwin.

Referenced by wm_jobs_update_progress_bars().

◆ WM_progress_set()

void WM_progress_set ( wmWindow * win,
float progress )

Definition at line 2517 of file wm_window.cc.

References GHOST_SetProgressBar(), and wmWindow::ghostwin.

Referenced by wm_jobs_update_progress_bars().

◆ wm_quit_with_optional_confirmation_prompt()

void wm_quit_with_optional_confirmation_prompt ( bContext * C,
wmWindow * win )

Call the quit confirmation prompt or exit directly if needed. The use can still cancel via the confirmation popup. Also, this may not quit Blender immediately, but rather schedule the closing.

Parameters
winThe window to show the confirmation popup/window in.

Definition at line 397 of file wm_window.cc.

References CTX_data_main(), CTX_wm_manager(), CTX_wm_window(), CTX_wm_window_set(), G, USER_SAVE_PROMPT, wm_confirm_quit(), wm_exit_schedule_delayed(), wm_file_or_session_data_has_unsaved_changes(), and wm_window_raise().

Referenced by ghost_event_proc(), wm_exit_blender_invoke(), and wm_window_close().

◆ wm_save_file_on_quit_dialog_callback()

static void wm_save_file_on_quit_dialog_callback ( bContext * C,
void *  )
static

Definition at line 380 of file wm_window.cc.

References wm_exit_schedule_delayed().

Referenced by wm_confirm_quit().

◆ WM_system_gpu_context_activate()

◆ WM_system_gpu_context_create()

◆ WM_system_gpu_context_dispose()

◆ WM_system_gpu_context_release()

◆ wm_test_gpu_backend_fallback()

◆ wm_test_opengl_deprecation_warning()

◆ wm_window_check_size()

static void wm_window_check_size ( rcti * rect)
static

Keeps size within monitor bounds.

Definition at line 194 of file wm_window.cc.

References BLI_rcti_resize_x(), BLI_rcti_resize_y(), BLI_rcti_size_x(), BLI_rcti_size_y(), and wm_get_screensize().

Referenced by WM_window_open().

◆ wm_window_clear_drawable()

◆ wm_window_close()

◆ wm_window_close_exec()

int wm_window_close_exec ( bContext * C,
wmOperator * op )

Definition at line 1115 of file wm_window.cc.

References CTX_wm_manager(), CTX_wm_window(), OPERATOR_FINISHED, and wm_window_close().

Referenced by WM_OT_window_close().

◆ wm_window_copy()

◆ wm_window_copy_test()

wmWindow * wm_window_copy_test ( bContext * C,
wmWindow * win_src,
bool duplicate_layout,
bool child )

A higher level version of copy that tests the new window can be added. (called from the operator directly).

Definition at line 354 of file wm_window.cc.

References CTX_data_main(), CTX_wm_manager(), CTX_wm_window(), wmWindow::ghostwin, NA_ADDED, NC_WINDOW, WM_check(), WM_event_add_notifier_ex(), wm_window_close(), and wm_window_copy().

Referenced by wm_stereo3d_set_exec(), and wm_window_new_main_exec().

◆ WM_window_ensure_active_view_layer()

void WM_window_ensure_active_view_layer ( wmWindow * win)

◆ wm_window_ensure_eventstate()

static void wm_window_ensure_eventstate ( wmWindow * win)
static

◆ wm_window_events_process()

◆ WM_window_find_by_area()

wmWindow * WM_window_find_by_area ( wmWindowManager * wm,
const ScrArea * area )

Knowing the area, return its screen.

Note
This should typically be avoided, only use when the context is not available.

Definition at line 2612 of file wm_window.cc.

References bScreen::areabase, BLI_findindex(), LISTBASE_FOREACH, wmWindowManager::windows, and WM_window_get_active_screen().

Referenced by area_join_init(), area_join_update_data(), graph_init(), and nla_init().

◆ WM_window_find_under_cursor()

◆ wm_window_free()

◆ wm_window_fullscreen_toggle_exec()

int wm_window_fullscreen_toggle_exec ( bContext * C,
wmOperator * op )

◆ WM_window_get_active_layout()

◆ WM_window_get_active_scene()

Scene * WM_window_get_active_scene ( const wmWindow * win)

Definition at line 2841 of file wm_window.cc.

References wmWindow::scene.

Referenced by buttons_context_path(), buttons_shading_context(), buttons_shading_new_context(), ED_area_init(), ED_area_newspace(), ED_area_offscreen_create(), ED_editors_init_for_undo(), ED_scene_add(), ED_screen_exit(), ED_screen_scene_find_with_window(), find_area_showing_render_result(), graph_init(), image_listener(), nla_init(), blender::ed::object::object_delete_exec(), RE_FreeUnusedGPUResources(), screen_change_update(), screen_ctx_active_annotation_layer(), screen_ctx_active_bone(), screen_ctx_active_object(), screen_ctx_active_pose_bone(), screen_ctx_active_sequence_strip(), screen_ctx_annotation_data(), screen_ctx_annotation_data_owner(), screen_ctx_edit_object(), screen_ctx_editable_objects(), screen_ctx_grease_pencil_data(), screen_ctx_image_paint_object(), screen_ctx_object(), screen_ctx_objects_in_mode(), screen_ctx_objects_in_mode_unique_data(), screen_ctx_particle_edit_object(), screen_ctx_pose_object(), screen_ctx_scene(), screen_ctx_sculpt_object(), screen_ctx_selectable_objects(), screen_ctx_selected_bones_(), screen_ctx_selected_editable_objects(), screen_ctx_selected_editable_sequences(), screen_ctx_selected_objects(), screen_ctx_selected_pose_bones(), screen_ctx_selected_pose_bones_from_active_object(), screen_ctx_selected_sequences(), screen_ctx_sequences(), screen_ctx_vertex_paint_object(), screen_ctx_visible_objects(), screen_ctx_visible_or_editable_bones_(), screen_ctx_visible_pose_bones(), screen_ctx_weight_paint_object(), screen_global_area_refresh(), sound_jack_sync_callback(), toolsystem_brush_activate_from_toolref_for_object_paint(), toolsystem_brush_activate_from_toolref_for_object_particle(), toolsystem_refresh_screen_from_active_tool(), blender::ed::outliner::tree_element_viewlayer_activate(), view3d_main_region_cursor(), wm_draw_region_test(), wm_draw_update_test_window(), wm_draw_window(), wm_draw_window_offscreen(), wm_event_do_depsgraph(), wm_event_do_handlers(), wm_event_do_notifiers(), WM_stereo3d_enabled(), WM_toolsystem_do_msg_notify_tag_refresh(), WM_toolsystem_ref_sync_from_context(), WM_toolsystem_refresh_active(), WM_toolsystem_refresh_screen_window(), WM_toolsystem_reinit_all(), WM_window_cursor_keymap_status_refresh(), WM_window_ensure_active_view_layer(), WM_window_get_active_view_layer(), WM_window_open(), WM_window_pixels_read_from_offscreen(), WM_window_set_active_view_layer(), WM_windows_scene_data_sync(), WM_windows_scene_get_from_screen(), wm_xr_session_scene_and_depsgraph_get(), workspace_exit(), and workspace_scene_pinning_update().

◆ WM_window_get_active_screen()

bScreen * WM_window_get_active_screen ( const wmWindow * win)

Get the active screen of the active workspace in win.

Definition at line 2959 of file wm_window.cc.

References BKE_workspace_active_screen_get(), LIKELY, WM_window_get_active_workspace(), and wmWindow::workspace_hook.

Referenced by actionzone_area_poll(), area_docking_apply(), area_join_dock_cb_window(), area_join_modal(), areas_do_frame_follow(), bpy_rna_context_temp_override_enter(), bpy_rna_context_temp_override_exit(), bpy_rna_context_temp_set_screen_for_window(), button_activate_init(), button_tooltip_timer_reset(), blender::ed::asset::list::clear(), blender::ed::space_node::compo_get_recalc_flags(), context_find_graph_editor(), ED_area_find_under_cursor(), ED_area_type_hud_clear(), ED_area_update_region_sizes(), ED_clip_update_frame(), ED_editors_init(), ED_fileselect_handler_area_find(), ED_fileselect_handler_area_find_any_with_op(), ED_info_stats_clear(), ED_region_do_draw(), ED_render_scene_update(), ED_render_view3d_update(), ED_screen_animation_no_scrub(), ED_screen_animation_playing(), ED_screen_draw_edges(), ED_screen_scene_change(), ED_screen_scene_find_with_window(), ED_screen_set_active_region(), ED_screen_state_toggle(), ED_screen_window_find(), ED_space_image_paint_update(), ED_space_image_sync(), eyedropper_color_sample_fl(), eyedropper_cryptomatte_sample_fl(), eyedropper_win_area_find(), find_area_showing_render_result(), blender::ed::sculpt_paint::flush_update_done(), ghost_event_proc(), gizmo_mesh_spin_redo_setup(), blender::ed::space_node::is_compositor_viewer_image_visible(), menu_items_from_ui_create(), need_extra_redraw_after_scrubbing_ends(), RE_FreeUnusedGPUResources(), blender::ed::space_node::realtime_compositor_is_in_use(), redraw_timer_step(), region_cursor_set(), region_cursor_set_ex(), render_image_restore_layer(), render_image_update_pass_and_layer(), render_view_show_invoke(), screen_animation_step_invoke(), screen_cursor_set(), screen_geom_select_connected_edge(), screen_refresh(), screen_state_to_nonnormal(), blender::ed::sculpt_paint::show_catalog_in_asset_shelf(), toolsystem_refresh_screen_from_active_tool(), UI_but_tooltip_refresh(), UI_popup_block_close(), ui_popup_block_remove(), wm_drags_exit(), wm_draw_region_clear(), wm_draw_update_clear_window(), wm_draw_update_test_window(), wm_draw_window(), wm_draw_window_offscreen(), wm_draw_window_onscreen(), wm_dropbox_active(), wm_dropbox_invoke(), wm_event_do_depsgraph(), wm_event_do_handlers(), wm_event_do_notifiers(), wm_event_do_refresh_wm_and_depsgraph(), wm_event_drag_and_drop_test(), WM_exit_ex(), wm_file_read_setup_wm_init(), wm_file_read_setup_wm_keep_old(), wm_gesture_tag_redraw(), wm_handler_fileselect_do(), wm_handler_op_context_get_if_valid(), WM_keyconfig_update_ex(), WM_operator_handlers_clear(), wm_operator_winactive_normal(), wm_operator_winactive_not_full(), WM_paint_cursor_tag_redraw(), wm_paintcursor_draw(), wm_region_tag_draw_on_gizmo_delay_refresh_for_tweak(), WM_stereo3d_enabled(), wm_stereo3d_set_exec(), WM_toolsystem_do_msg_notify_tag_refresh(), WM_toolsystem_refresh_active(), WM_toolsystem_refresh_screen_window(), WM_toolsystem_reinit_all(), WM_tooltip_clear(), WM_tooltip_immediate_init(), WM_tooltip_init(), WM_tooltip_refresh(), WM_tooltip_timer_clear(), WM_tooltip_timer_init_ex(), wm_window_close(), WM_window_cursor_keymap_status_refresh(), WM_window_find_by_area(), WM_window_is_temp_screen(), WM_window_open(), WM_window_set_active_workspace(), WM_window_status_area_tag_redraw(), WM_window_title(), WM_windows_scene_get_from_screen(), WM_windows_view_layer_get_from_screen(), and WM_windows_workspace_get_from_screen().

◆ WM_window_get_active_view_layer()

ViewLayer * WM_window_get_active_view_layer ( const wmWindow * win)

Definition at line 2875 of file wm_window.cc.

References BKE_view_layer_default_view(), BKE_view_layer_find(), wmWindow::view_layer_name, WM_window_get_active_scene(), and WM_window_set_active_view_layer().

Referenced by buttons_context_path(), buttons_context_path_brush(), buttons_context_path_view_layer(), buttons_shading_context(), buttons_shading_new_context(), buttons_texture_users_from_context(), clean_viewport_memory(), ED_area_init(), ED_editors_init_for_undo(), ED_info_stats_clear(), ED_screen_scene_change(), ED_undo_object_editmode_validate_scene_from_windows(), image_listener(), screen_animation_step_invoke(), screen_ctx_active_bone(), screen_ctx_active_object(), screen_ctx_active_pose_bone(), screen_ctx_edit_object(), screen_ctx_editable_objects(), screen_ctx_grease_pencil_data(), screen_ctx_image_paint_object(), screen_ctx_object(), screen_ctx_objects_in_mode(), screen_ctx_objects_in_mode_unique_data(), screen_ctx_particle_edit_object(), screen_ctx_pose_object(), screen_ctx_sculpt_object(), screen_ctx_selectable_objects(), screen_ctx_selected_bones_(), screen_ctx_selected_editable_objects(), screen_ctx_selected_objects(), screen_ctx_selected_pose_bones(), screen_ctx_selected_pose_bones_from_active_object(), screen_ctx_vertex_paint_object(), screen_ctx_visible_objects(), screen_ctx_visible_or_editable_bones_(), screen_ctx_visible_pose_bones(), screen_ctx_weight_paint_object(), sound_jack_sync_callback(), toolsystem_refresh_screen_from_active_tool(), blender::ed::outliner::tree_element_object_activate(), view3d_main_region_cursor(), view3d_main_region_listener(), view_layer_add_exec(), wm_draw_update_test_window(), wm_event_do_depsgraph(), wm_event_do_handlers(), WM_toolsystem_do_msg_notify_tag_refresh(), WM_toolsystem_ref_sync_from_context(), WM_toolsystem_refresh_active(), WM_toolsystem_refresh_screen_window(), WM_toolsystem_reinit_all(), WM_window_cursor_keymap_status_refresh(), WM_window_set_active_scene(), WM_windows_view_layer_get_from_screen(), and wm_xr_session_scene_and_depsgraph_get().

◆ WM_window_get_active_workspace()

◆ wm_window_get_swap_interval()

bool wm_window_get_swap_interval ( wmWindow * win,
int * r_interval )

Definition at line 2581 of file wm_window.cc.

References GHOST_GetSwapInterval(), and wmWindow::ghostwin.

◆ wm_window_ghostwindow_add()

◆ wm_window_ghostwindow_ensure()

◆ wm_window_ghostwindows_ensure()

void wm_window_ghostwindows_ensure ( wmWindowManager * wm)

Initialize wmWindow without ghostwin, open these and clear.

Window size is read from window, if 0 it uses prefsize called in WM_check, also initialize stuff after file read.

Warning
After running, win->ghostwin can be NULL in rare cases (where OpenGL driver fails to create a context for eg). We could remove them with wm_window_ghostwindows_remove_invalid but better not since caller may continue to use. Instead, caller needs to handle the error case and cleanup.

Definition at line 880 of file wm_window.cc.

References BLI_assert, G, LISTBASE_FOREACH, WMInitStruct::size, WMInitStruct::start, UNLIKELY, wmWindowManager::windows, wm_get_screensize(), wm_init_state, and wm_window_ghostwindow_ensure().

Referenced by WM_check().

◆ wm_window_ghostwindows_remove_invalid()

void wm_window_ghostwindows_remove_invalid ( bContext * C,
wmWindowManager * wm )

Call after wm_window_ghostwindows_ensure or WM_check (after loading a new file) in the unlikely event a window couldn't be created.

Definition at line 905 of file wm_window.cc.

References BLI_assert, G, LISTBASE_FOREACH_MUTABLE, wmWindowManager::windows, and wm_window_close().

Referenced by wm_file_read_post().

◆ WM_window_is_fullscreen()

bool WM_window_is_fullscreen ( const wmWindow * win)

Definition at line 2784 of file wm_window.cc.

References GHOST_kWindowStateFullScreen, and wmWindow::windowstate.

Referenced by area_azone_init(), and wm_stereo3d_set_exec().

◆ WM_window_is_maximized()

bool WM_window_is_maximized ( const wmWindow * win)

Definition at line 2789 of file wm_window.cc.

References GHOST_kWindowStateMaximized, and wmWindow::windowstate.

Referenced by ED_fileselect_window_params_get().

◆ WM_window_is_temp_screen()

◆ wm_window_lower()

void wm_window_lower ( wmWindow * win)

◆ wm_window_make_drawable()

◆ WM_window_native_pixel_coords()

void WM_window_native_pixel_coords ( const wmWindow * win,
int * x,
int * y )

Definition at line 2738 of file wm_window.cc.

References GHOST_GetNativePixelSize(), and wmWindow::ghostwin.

Referenced by area_docking_target().

◆ WM_window_native_pixel_size()

◆ WM_window_native_pixel_x()

int WM_window_native_pixel_x ( const wmWindow * win)

Support for native pixel size

Note
macOS retina opens window in size X, but it has up to 2 x more pixels.

Definition at line 2718 of file wm_window.cc.

References GHOST_GetNativePixelSize(), wmWindow::ghostwin, int, and wmWindow::sizex.

Referenced by area_azone_init(), blender::ed::asset::shelf::layout_width_units_clamped(), ui_def_but_rna__menu(), ui_searchbox_region_layout_fn(), and wm_stereo3d_mouse_offset_apply().

◆ WM_window_native_pixel_y()

int WM_window_native_pixel_y ( const wmWindow * win)

◆ wm_window_new()

◆ wm_window_new_exec()

◆ wm_window_new_main_exec()

int wm_window_new_main_exec ( bContext * C,
wmOperator * op )

◆ WM_window_open()

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 )

◆ wm_window_raise()

◆ WM_window_rect_calc()

◆ wm_window_reset_drawable()

◆ WM_window_screen_rect_calc()

void WM_window_screen_rect_calc ( const wmWindow * win,
rcti * r_rect )

◆ WM_window_set_active_layout()

void WM_window_set_active_layout ( wmWindow * win,
WorkSpace * workspace,
WorkSpaceLayout * layout )

◆ WM_window_set_active_scene()

◆ WM_window_set_active_screen()

void WM_window_set_active_screen ( wmWindow * win,
WorkSpace * workspace,
bScreen * screen )

◆ WM_window_set_active_view_layer()

◆ WM_window_set_active_workspace()

◆ WM_window_set_dpi()

◆ wm_window_set_drawable()

◆ wm_window_set_size()

void wm_window_set_size ( wmWindow * win,
int width,
int height )

Definition at line 2538 of file wm_window.cc.

References GHOST_SetClientSize(), and wmWindow::ghostwin.

Referenced by WM_window_open().

◆ wm_window_set_swap_interval()

void wm_window_set_swap_interval ( wmWindow * win,
int interval )

Definition at line 2576 of file wm_window.cc.

References GHOST_SetSwapInterval(), and wmWindow::ghostwin.

◆ wm_window_swap_buffers()

void wm_window_swap_buffers ( wmWindow * win)

Push rendered buffer to the screen.

Definition at line 2571 of file wm_window.cc.

References GHOST_SwapWindowBuffers(), and wmWindow::ghostwin.

Referenced by ghost_event_proc(), wm_draw_update(), and wm_window_ghostwindow_add().

◆ wm_window_timers_delete_removed()

void wm_window_timers_delete_removed ( wmWindowManager * wm)

Effectively remove timers from the list and delete them. Calling this should only be done by internal WM management code, from specific, safe places.

Definition at line 2219 of file wm_window.cc.

References BLI_remlink(), LISTBASE_FOREACH_MUTABLE, MEM_freeN(), wmWindowManager::timers, and WM_TIMER_TAGGED_FOR_REMOVAL.

Referenced by wm_window_free(), and wm_window_timers_process().

◆ wm_window_timers_process()

static bool wm_window_timers_process ( const bContext * C,
int * sleep_us_p )
static

This timer system only gives maximum 1 timer event per redraw cycle, to prevent queues to get overloaded.

  • Timer handlers should check for delta to decide if they just update, or follow real time.
  • Timer handlers can also set duration to match frames passed.
Parameters
sleep_us_pThe number of microseconds to sleep which may be reduced by this function to account for timers that would run during the anticipated sleep period.

Definition at line 1742 of file wm_window.cc.

References BLI_time_now_seconds(), ceil(), CTX_data_main(), CTX_wm_manager(), double(), EVT_DATA_TIMER, int, KM_NOTHING, LISTBASE_FOREACH_MUTABLE, POINTER_AS_UINT, time, TIMERAUTOSAVE, TIMERJOBS, TIMERNOTIFIER, wmWindowManager::timers, wm_autosave_timer(), wm_event_add(), wm_event_init_from_window(), wm_jobs_timer(), WM_main_add_notifier(), WM_TIMER_TAGGED_FOR_REMOVAL, and wm_window_timers_delete_removed().

Referenced by ghost_event_proc(), and wm_window_events_process().

◆ WM_window_title()

◆ wm_window_update_eventstate()

static void wm_window_update_eventstate ( wmWindow * win)
static

◆ wm_window_update_eventstate_modifiers()

static void wm_window_update_eventstate_modifiers ( wmWindowManager * wm,
wmWindow * win,
const uint64_t event_time_ms )
static

When windows are activated, simulate modifier press/release to match the current state of held modifier keys, see #40317.

NOTE(@ideasman42): There is a bug in Windows11 where Alt-Tab sends an Alt-press event to the window after it's deactivated, this means window de-activation is not a fool-proof way of ensuring modifier keys are cleared for inactive windows. So any event added to an inactive window must run wm_window_update_eventstate_modifiers first to ensure no modifier keys are held. See: #105277.

Definition at line 608 of file wm_window.cc.

References ARRAY_SIZE, wmWindow::eventstate, flag, g_modifier_table, GHOST_kEventKeyDown, GHOST_kEventKeyUp, GHOST_kKeyUnknown, GHOST_TEventKeyData::key, MOD_SIDE_LEFT, MOD_SIDE_RIGHT, wmEvent::modifier, wm_event_add_ghostevent(), and wm_ghost_modifier_query().

Referenced by ghost_event_proc().

◆ wm_window_update_eventstate_modifiers_clear()

static void wm_window_update_eventstate_modifiers_clear ( wmWindowManager * wm,
wmWindow * win,
const uint64_t event_time_ms )
static

When the window is de-activated, release all held modifiers.

Needed so events generated over unfocused (non-active) windows don't have modifiers held. Since modifier press/release events aren't send to unfocused windows it's best to assume modifiers are not pressed. This means when modifiers are held, events will incorrectly reported as not being held. Since this is standard behavior for Linux/MS-Window, opt to use this.

NOTE(@ideasman42): Events generated for non-active windows are rare, this happens when using the mouse-wheel over an unfocused window, see: #103722.

Definition at line 663 of file wm_window.cc.

References ARRAY_SIZE, wmWindow::eventstate, flag, g_modifier_table, GHOST_kEventKeyUp, GHOST_kKeyUnknown, GHOST_TEventKeyData::key, MOD_SIDE_LEFT, MOD_SIDE_RIGHT, wmEvent::modifier, wm_event_add_ghostevent(), and wm_ghost_modifier_query().

Referenced by ghost_event_proc().

◆ wm_window_update_size_position()

◆ WM_windows_scene_data_sync()

void WM_windows_scene_data_sync ( const ListBase * win_lb,
Scene * scene )

Some editor data may need to be synced with scene data (3D View camera and layers). This function ensures data is synced for editors in visible work-spaces and their visible layouts.

Definition at line 2800 of file wm_window.cc.

References ED_workspace_scene_data_sync(), LISTBASE_FOREACH, and WM_window_get_active_scene().

Referenced by blender::ed::outliner::tree_element_camera_activate().

◆ WM_windows_scene_get_from_screen()

Scene * WM_windows_scene_get_from_screen ( const wmWindowManager * wm,
const bScreen * screen )

◆ WM_windows_view_layer_get_from_screen()

ViewLayer * WM_windows_view_layer_get_from_screen ( const wmWindowManager * wm,
const bScreen * screen )

◆ WM_windows_workspace_get_from_screen()

WorkSpace * WM_windows_workspace_get_from_screen ( const wmWindowManager * wm,
const bScreen * screen )

Variable Documentation

◆ buffers

◆ flag

uint8_t flag
Examples
/usr/src/RPM/BUILD/blender-4.3.0/source/blender/blenkernel/BKE_grease_pencil.hh.

Definition at line 138 of file wm_window.cc.

Referenced by achannel_setting_slider_cb(), achannel_setting_slider_nla_curve_cb(), achannel_setting_slider_shapekey_cb(), blender::bke::action_copy_data(), blender::bke::action_foreach_id(), add_default_keyingset_exec(), add_driver_with_target(), blender::ed::space_node::add_existing_group_input_fn(), blender::bke::node_interface::add_interface_socket_from_node(), add_keyingset_button_exec(), add_node_tag(), add_socket_tag(), blender::deg::DepsgraphRelationBuilder::add_special_eval_flag(), add_tree_tag(), adduplicateflagNurb(), ANIM_add_driver(), ANIM_add_driver_with_target(), ANIM_channel_setting_get(), ANIM_channel_setting_set(), ANIM_draw_cfra(), ANIM_unit_mapping_get_factor(), blender::draw::overlay::append_line_loop(), armature_copy_data(), armature_dissolve_selected_exec(), armature_select_mirror_exec(), armature_select_mirrored_ex(), blender::animrig::autokeyframe_object(), blender::animrig::autokeyframe_pose_channel(), blender::animrig::autokeyframe_property(), bevel_extend_edge_data_ex(), bezt_select_to_transform_triple_flag(), blender::draw::beztriple_vflag_get(), blender::gpu::GLBatch::bind(), BKE_animdata_copy(), BKE_animdata_copy_id(), BKE_animdata_copy_in_lib(), BKE_armature_bone_flag_test_recursive(), BKE_blendfile_link_append_context_flag_set(), BKE_blendfile_link_append_context_item_foreach(), BKE_bmbvh_new(), BKE_bmbvh_new_ex(), BKE_bmbvh_new_from_editmesh(), BKE_bpath_foreach_path_id(), BKE_bpath_list_backup(), BKE_bpath_list_restore(), BKE_bpath_missing_files_find(), BKE_bpath_relative_rebase(), BKE_brush_weight_get(), BKE_camera_background_image_copy(), BKE_constraint_duplicate_ex(), BKE_constraints_copy_ex(), BKE_constraints_id_loop(), BKE_copybuffer_paste(), BKE_copybuffer_read(), BKE_curve_deform_coords(), BKE_curve_deform_coords_with_editmesh(), BKE_curvemap_remove(), BKE_curvemapping_changed(), BKE_curveprofile_remove_by_flag(), BKE_fluid_modifier_copy(), BKE_freestyle_config_copy(), BKE_gpencil_modifier_free_ex(), BKE_id_copy_ex(), BKE_id_copy_in_lib(), BKE_keyingset_add(), BKE_keyingset_add_path(), BKE_lattice_bitmap_from_flag(), BKE_lattice_deform_coords(), BKE_lattice_deform_coords_with_editmesh(), BKE_lattice_deform_coords_with_mesh(), BKE_layer_collection_set_flag(), BKE_lib_query_foreachid_process(), BKE_libblock_alloc(), BKE_libblock_alloc_in_lib(), BKE_libblock_copy_in_lib(), BKE_library_foreach_ID_embedded(), BKE_library_foreach_ID_link(), BKE_library_foreach_subdata_id(), BKE_linestyle_color_modifier_copy(), BKE_linestyle_thickness_modifier_copy(), BKE_main_id_flag_all(), BKE_main_id_flag_listbase(), BKE_main_relations_create(), BKE_mball_minmax_ex(), BKE_mesh_foreach_mapped_face_center(), BKE_mesh_foreach_mapped_loop(), BKE_mesh_foreach_mapped_subdiv_face_center(), BKE_mesh_foreach_mapped_vert(), BKE_modifier_copy_ex(), BKE_modifier_copydata_ex(), BKE_modifier_free_ex(), BKE_movieclip_get_ibuf_flag(), BKE_nla_tracks_copy(), BKE_nla_tracks_copy_from_adt(), BKE_nlastrip_copy(), BKE_nlatrack_copy(), BKE_nurb_bezt_handle_test(), BKE_nurb_bezt_handle_test_calc_flag(), BKE_nurb_handles_autocalc(), BKE_nurb_valid_message(), BKE_nurbList_flag_set(), BKE_nurbList_flag_set_from_flag(), BKE_nurbList_handles_autocalc(), BKE_nurbList_handles_recalculate(), BKE_nurbList_handles_set(), BKE_object_copy_particlesystem(), BKE_object_copy_particlesystems(), BKE_object_copy_softbody(), BKE_object_flag_test_recursive(), BKE_object_free_modifiers(), BKE_object_free_shaderfx(), BKE_object_is_deform_modified(), BKE_object_is_modified(), BKE_paint_copy(), BKE_paint_reset_overlay_invalid(), BKE_pbvh_draw_debug_cb(), BKE_pose_copy_data_ex(), BKE_ptcache_copy_list(), BKE_reports_init(), BKE_scene_orientation_get_index_from_flag(), BKE_scene_orientation_slot_get_from_flag(), BKE_shaderfx_copydata_ex(), BKE_shaderfx_free_ex(), BKE_studiolight_ensure_flag(), BKE_studiolight_find(), BKE_studiolight_find_default(), BKE_studiolight_findindex(), BKE_toolsettings_copy(), BKE_tracking_copy(), BKE_tracking_track_flag_set(), BKE_view_layer_copy_data(), BKE_viewer_path_elem_equal(), BKE_viewer_path_equal(), BLI_bvhtree_find_nearest_ex(), BLI_bvhtree_overlap_ex(), BLI_bvhtree_ray_cast_all_ex(), BLI_bvhtree_ray_cast_ex(), BLI_ghash_flag_set(), BLI_gset_flag_set(), BLI_mempool_create(), BLI_scanfill_calc(), BLI_scanfill_calc_ex(), blo_do_versions_300(), BLO_expand_main(), BLO_library_link_params_init(), BLO_library_link_params_init_with_context(), bm_edge_calc_rotate_beauty(), bm_edge_update_beauty_cost(), bm_edge_update_beauty_cost_single(), BM_mesh_beautify_fill(), bm_mesh_edge_collapse_flagged(), BM_mesh_intersect(), BM_verts_calc_rotate_beauty(), bmesh_edit_end(), bmo_beautify_fill_exec(), bmo_offset_edgeloops_exec(), BMO_op_callf(), BMO_op_init(), BMO_op_initf(), BMO_op_vinitf(), BMW_init(), box_clip_bounds_m4(), box_select_cb(), bpath_absolute_relative_convert(), blender::draw::bpoint_vflag_get(), bpy_app_debug_get(), bpy_app_debug_set(), bpy_app_global_flag_get(), bpy_app_global_flag_set(), bpy_blend_paths(), bpy_bm_elem_hflag_get(), bpy_bm_elem_hflag_set(), BPy_BMesh_CreatePyObject(), bpy_bmesh_select_mode_set(), bpy_bmlayeraccess_collection_get(), bpy_bmvertskin_flag_get(), bpy_bmvertskin_flag_set(), bpy_class_call(), bpy_class_validate_recursive(), bpy_prop_assign_flag(), bpy_slot_from_py(), bpy_wm_capabilities(), brush_comb(), brush_copy_data(), brush_defaults(), brush_smooth_do(), bssrdf_setup(), blender::ed::geometry::build_catalog_tree(), build_edge_mats(), build_emats_stack(), buttons_context_compute(), buttons_context_path(), buttons_shading_new_context(), bvhtree_ray_cast_data_precalc(), calc_edge_subdivisions(), calc_lat_fudu(), calcknots(), camera_copy_data(), camera_foreach_id(), blender::ed::geometry::catalog_assets_draw_unassigned(), blender::ed::sculpt_paint::dyntopo::check_attribute_warning(), check_bit_flag(), check_edge_data_seam_sharp_edges(), circle_dashed_verts(), circle_verts(), blender::ed::object::clear_images_poly(), blender::ed::object::clear_single_image(), collection_copy_data(), blender::ed::outliner::collection_flag_exec(), blender::ed::outliner::collection_flag_poll(), blender::ed::outliner::collection_view_layer_exec(), blender::ed::outliner::collections_view_layer_poll(), blender::draw::compute_coarse_face_flag_bm(), con_invoke_id_looper(), constraint_copy_data_ex(), constraint_target_to_mat4(), convert_channels(), copy_bit_flag(), copy_bonechildren(), blender::copy_data(), blender::copy_data(), copy_data(), copy_data(), copy_data(), copy_data(), copy_data(), copy_data(), copy_data(), copy_data(), copy_data(), copy_data(), copy_data(), copy_data(), copy_data(), copy_data(), copy_data(), copy_data(), copy_data(), copy_data(), copy_data(), copy_data(), copy_lineset(), copy_object_pose(), copy_text_effect(), CreateSegment(), cuboid_do(), curve_copy_data(), curve_deform_coords_impl(), curve_foreach_id(), curvemap_make_table(), customData_add_layer__internal(), CustomData_set_layer_flag(), DEG_add_special_eval_flag(), blender::deg::deg_graph_build_finalize(), DEG_update_tag_as_string(), ShaderManager::device_update_common(), ObjectManager::device_update_object_transform(), distribute_grid(), do_curve_key(), do_latt_key(), do_mesh_key(), blender::ed::outliner::do_outliner_drivers_editop(), blender::ed::outliner::do_outliner_keyingset_editop(), blender::gpu::MTLBatch::draw(), blender::gpu::MTLBatch::draw_indirect(), draw_marker(), draw_setting_widget(), blender::draw::draw_subdiv_cache_extra_coarse_face_data_bm(), blender::draw::draw_subdiv_cache_extra_coarse_face_data_mapped(), blender::draw::draw_subdiv_cache_extra_coarse_face_data_mesh(), driverdropper_sample(), DRW_cache_bone_arrows_get(), DRW_cache_bone_stick_get(), DRW_cache_camera_volume_get(), DRW_cache_camera_volume_wire_get(), DRW_cache_empty_cone_get(), DRW_cache_empty_cylinder_get(), DRW_cache_field_cone_limit_get(), DRW_cache_field_curve_get(), DRW_cache_field_force_get(), DRW_cache_field_sphere_limit_get(), DRW_cache_field_tube_limit_get(), DRW_cache_field_vortex_get(), DRW_cache_field_wind_get(), DRW_cache_light_area_square_lines_get(), DRW_cache_light_point_lines_get(), DRW_cache_light_spot_lines_get(), DRW_cache_light_spot_volume_get(), DRW_cache_lightprobe_cube_get(), DRW_cache_lightprobe_grid_get(), DRW_cache_particles_get_prim(), DRW_cache_plain_axes_get(), DRW_cache_quad_get(), DRW_cache_quad_wires_get(), DRW_cache_single_arrow_get(), DRW_sculpt_debug_cb(), DRW_text_cache_add(), dynamicPaint_Modifier_copy(), blender::ed::sculpt_paint::dyntopo::dyntopo_warning_popup(), ED_armature_ebone_select_set(), ED_armature_ebone_selectflag_disable(), ED_armature_ebone_selectflag_enable(), ED_armature_ebone_selectflag_set(), ED_curve_pick_vert__do_closest(), ed_default_handlers(), ed_editnurb_extrude_flag(), ed_editnurb_translate_flag(), ED_gizmotypes_snap_3d_flag_set(), ED_lattice_flags_set(), ED_markers_draw(), ED_view3d_depth_override(), ed_view3d_project__internal(), ED_view3d_project_float_ex(), ED_view3d_project_float_global(), ED_view3d_project_float_object(), ED_view3d_project_int_ex(), ED_view3d_project_int_global(), ED_view3d_project_int_object(), ED_view3d_project_short_ex(), ED_view3d_project_short_global(), ED_view3d_project_short_object(), ED_wpaint_ensure_data(), edbm_dissolve_prop__use_verts(), blender::ed::object::editmode_enter(), blender::ed::object::editmode_enter_ex(), blender::ed::object::editmode_exit(), blender::ed::object::editmode_exit_ex(), blender::ed::object::editmode_exit_multi(), blender::ed::object::editmode_exit_multi_ex(), event_ids_from_flag(), execute_posetree(), blender::draw::extract_loose_positions_subdiv(), blender::draw::extract_vertex_flags(), file_select_deselect_all(), filelist_entries_select_index_range_set(), filelist_entry_parent_select_set(), filelist_entry_select_index_set(), filelist_entry_select_set(), film_write_background(), film_write_data_passes(), film_write_data_passes_background(), film_write_direct_light(), film_write_emission_or_background_pass(), film_write_surface_emission(), film_write_volume_emission(), for_mouse_hit_keys(), fsmenu_insert_entry(), blender::animrig::get_autokey_flags(), get_bezt_sel_triple_flag(), blender::ed::greasepencil::get_flag(), get_imbuf_cache(), blender::animrig::get_keyframing_flags(), get_panel_expand_flag(), get_postprocessed_cached_frame(), get_stored_types_flag(), blender::nodes::node_geo_string_to_curves_cc::get_text_layout(), get_timecode(), blender::ed::outliner::TreeElementOverridesBase::get_warning(), getTransformOrientation_ex(), ghash_new(), GPU_material_flag_get(), GPU_material_flag_set(), blender::ed::asset::has_external_files(), has_imbuf_cache(), HullDesc::HasHullFlag(), HullDesc::HullDesc(), id_free(), id_search_allows_id(), id_search_cb(), id_search_cb_tagged(), IDP_AssignID(), IDP_CopyArray(), IDP_CopyGroup(), IDP_CopyID(), IDP_CopyIDPArray(), IDP_CopyProperty_ex(), IDP_CopyString(), IDP_MergeGroup_ex(), IK_CreateSegment(), image_copy_data(), image_foreach_path(), imb_load_openexr(), insert_action_keys(), blender::animrig::insert_bezt_fcurve(), insert_fcurve_key(), insert_graph_keys(), insert_key_button_exec(), blender::animrig::insert_keyframe_direct(), blender::animrig::insert_keyframe_fcurve_value(), blender::animrig::insert_keyframe_value(), blender::animrig::insert_vert_fcurve(), Freestyle::BlenderFileLoader::insertShapeNode(), integrate_background(), integrate_distant_lights(), integrate_intersect_shadow_visibility(), integrate_light(), integrate_surface(), integrate_surface_bsdf_bssrdf_bounce(), integrate_surface_direct_light(), integrate_surface_emission(), integrate_surface_holdout(), integrator_eval_background_shader(), integrator_intersect_closest(), integrator_intersect_terminate(), integrator_intersect_volume_stack(), integrator_shade_background(), integrator_shade_surface_next_kernel(), integrator_volume_stack_update_for_subsurface(), ipo_foreach_id(), is_disabled(), is_disabled(), is_disabled(), blender::animrig::is_keying_flag(), is_track_clean(), isNurbselU(), isNurbselV(), blender::bke::node_interface::item_types::item_copy(), kernel_shadow_catcher_is_path_split_bounce(), kernel_shadow_catcher_path_can_split(), blender::bke::knots_mode_from_legacy(), lattice_copy_data(), lattice_deform_coords_impl(), lattice_foreach_id(), layer_collection_flag_recursive_set(), layer_collection_flag_set_recursive(), layer_collection_flag_unset_recursive(), lib_link_all(), library_foreach_ID_link(), library_link_end(), light_copy_data(), light_foreach_id(), lineart_triangle_set_cull_flag(), linestyle_copy_data(), link_named_part(), load_image_single(), loop_find_region(), loose_data_instantiate_object_base_instance_init(), blender::bke::node_interface::make_panel(), blender::ed::object::make_single_user_exec(), blender::bke::node_interface::make_socket(), marker_get_icon_id(), material_copy_data(), material_foreach_id(), mathutils_array_parse(), mesh_copy_data(), mesh_foreach_id(), mesh_partial_ensure(), metaball_foreach_id(), blender::gpu::shader::ShaderCreateInfo::metal_backend_only(), blender::ed::object::modifier_skin_armature_create(), movie_clip_copy_data(), movieclip_get_postprocessed_ibuf(), movieclip_load_movie_file(), movieclip_load_sequence_file(), blender::bke::node_copy(), blender::bke::node_copy_with_mapping(), blender::nodes::node_shader_bsdf_principled_cc::node_shader_gpu_bsdf_principled(), blender::nodes::node_shader_eevee_specular_cc::node_shader_gpu_eevee_specular(), blender::bke::node_socket_copy(), blender::bke::node_tree_add_tree_do(), blender::bke::node_tree_copy_tree_ex(), blender::bke::node_tree_node_flag_set(), normalization_factor_get(), blender::bke::ntree_copy_data(), nurb_check_valid(), object_bases_iterator_begin(), object_bases_iterator_is_valid(), object_bases_iterator_next(), object_copy_data(), object_foreach_id(), object_ray_visibility(), blender::ed::sculpt_paint::object_sculpt_mode_enter(), objects_iterator_begin(), objects_iterator_next(), orthogonalize_m3_zero_axes_impl(), blender::ed::outliner::outliner_dropzone_element(), blender::ed::outliner::outliner_find_element_with_flag(), blender::ed::outliner::outliner_flag_flip(), blender::ed::outliner::outliner_flag_flip(), blender::ed::outliner::outliner_flag_is_any_test(), blender::ed::outliner::outliner_flag_set(), blender::ed::outliner::outliner_flag_set(), blender::ed::outliner::outliner_id_paste_exec(), blender::fn::multi_function::SignatureBuilder::output(), OVERLAY_edit_mesh_cache_init(), blender::bke::node_interface::item_types::panel_init(), panel_set_expand_from_list_data_recursive(), panel_set_flag_recursive(), panel_set_runtime_flag_recursive(), particle_settings_foreach_id(), paste_material_exec(), path_state_init_integrator(), path_state_next(), path_state_ray_visibility(), PlaneTest(), point_init(), pose_select_mirror_exec(), postprocess_frame(), prefetch_task_func(), project_bucket_clip_face(), project_paint_face_init(), projectFloatViewEx(), projectIntViewEx(), psys_cache_edit_paths_iter(), put_imbuf_cache(), put_postprocessed_frame_to_cache(), py_to_array(), PyC_FlagSet_FromBitfield(), PyC_FlagSet_ToBitfield(), pyrna_enum_bitfield_from_set(), pyrna_math_object_from_array(), pyrna_param_to_py(), pyrna_py_to_prop(), pyrna_subtype_set_rna(), rendersize_to_proxy(), blender::ed::outliner::restrictbutton_recursive_bone(), blender::ed::outliner::restrictbutton_recursive_ebone(), rna_def_fileselect_idfilter(), RNA_def_function_flag(), rna_def_function_funcs(), RNA_def_property_clear_flag(), RNA_def_property_flag(), RNA_def_property_override_flag(), RNA_def_struct_flag(), rna_def_struct_function_prototype_cpp(), rna_function_arg_count(), rna_generate_static_parameter_prototypes(), rna_generic_op_invoke(), RNA_pointer_as_string_keywords_ex(), RNA_property_collection_clear(), RNA_property_collection_move(), RNA_property_collection_remove(), rna_property_editable_do(), RNA_property_editable_flag(), RNA_property_is_unlink(), rna_property_sync_flag(), RNA_struct_override_apply(), rotateflagNurb(), blender::ed::geometry::run_node_ui_poll(), scanfill(), scene_copy_data(), scene_copy_markers(), scene_foreach_id(), screen_foreach_id(), blender::ed::sculpt_paint::dyntopo::sculpt_dynamic_topology_toggle_invoke(), sel_to_copy_ints(), select_beztriple(), select_bpoint(), select_bpoints(), select_less_keys(), select_more_keys(), select_random_exec(), seq_dupli(), seq_foreach_member_id_cb(), seq_render_image_strip_view(), SEQ_sequence_base_dupli_recursive(), SeqToTransData(), SeqToTransData_build(), SeqTransCount(), sequencer_generic_invoke_xy__internal(), sequencer_generic_props__internal(), set_element_flag(), blender::ed::greasepencil::set_flag(), blender::io::usd::USDPrimReader::set_is_in_instancer_proto(), blender::io::usd::USDXformReader::set_use_parent_xform(), HullDesc::SetHullFlag(), blender::draw::overlay::ShapeCache::ShapeCache(), shapekey_foreach_id(), blender::ed::object::single_mat_users(), blender::ed::object::single_obdata_users(), blender::ed::object::single_object_action_users(), blender::ed::object::single_object_users(), blender::ed::object::single_object_users_collection(), blender::ed::object::single_objectdata_action_users(), blender::fn::multi_function::SignatureBuilder::single_output(), blender::fn::multi_function::SignatureBuilder::single_output(), smoothModifier_do(), snapNodeBorder(), blender::bke::node_interface::socket_types::socket_data_copy_ptr(), sort_bmelem_flag(), sound_foreach_id(), sphere_do(), sphere_wire_vbo(), SplitTest(), studiolight_add_file(), studiolight_add_files_from_datafolder(), studiolight_create(), KDL::svd_eigen_HH(), GeometryManager::tag_update(), Integrator::tag_update(), LightManager::tag_update(), ObjectManager::tag_update(), template_ID(), template_ID_tabs(), blender::gpu::tests::TEST(), test_float_state(), test_vec2f_state(), Freestyle::testEdgeMark(), texture_copy_data(), texture_foreach_id(), tracking_object_copy(), tracking_objects_copy(), tracking_plane_tracks_copy(), tracking_tracks_copy(), transform_convert_mesh_mirrordata_calc(), blender::ed::outliner::tree_element_to_path(), blender::bke::greasepencil::TreeNode::TreeNode(), triangulate_mesh(), UI_block_flag_enable(), ui_block_new_button_group(), ui_but_anim_decorate_update_from_flag(), ui_but_context_poll_operator_ex(), UI_but_dragflag_enable(), UI_but_drawflag_enable(), UI_but_flag2_enable(), UI_but_flag_enable(), UI_but_flag_is_set(), ui_def_but_icon(), ui_draw_but_CURVE(), ui_draw_but_CURVEPROFILE(), ui_item_flag(), ui_item_with_label(), ui_litem_layout_row(), ui_numedit_but_CURVE(), ui_numedit_but_CURVEPROFILE(), ui_pie_menu_level_create(), UI_popup_handlers_add(), ui_rna_collection_search_update_fn(), ui_template_id(), UI_view2d_sync(), uiDefAutoButsRNA(), uiItemEnumR_string_prop(), uiItemFullO(), uiItemFullO_ptr(), uiItemFullO_ptr_ex(), uiItemFullOMenuHold_ptr(), uiItemFullR(), uiItemFullR_with_menu(), uiItemFullR_with_popover(), uiItemR(), uiItemsFullEnumO(), uiItemsFullEnumO_items(), uiTemplateAction(), uiTemplateOperatorPropertyButs(), blender::ed::geometry::unassigned_local_poll(), update_cache_alloc(), uv_select_linked_multi(), validate_solution(), blender::fn::multi_function::SignatureBuilder::vector_output(), blender::fn::multi_function::SignatureBuilder::vector_output(), vfont_copy_data(), vfont_to_curve(), view3d_boundbox_clip_m4(), view3d_operator_properties_common(), view3d_pastebuffer_exec(), viewops_flag_from_prefs(), volume_preservation(), weight_paint_set(), weightflagNurb(), WIDGETGROUP_light_area_refresh(), window_manager_foreach_id(), WM_capabilities_flag(), WM_drag_asset_id_import(), WM_event_add_ui_handler(), WM_file_append_datablock(), wm_file_link_append_datablock_ex(), WM_file_link_datablock(), WM_gizmo_set_flag(), WM_jobs_get(), wm_lib_relocate_exec_do(), wm_link_append_exec(), wm_link_append_flag(), WM_operator_properties_filesel(), WM_operator_ui_poll(), WM_operatortype_append_macro(), wm_window_update_eventstate_modifiers(), wm_window_update_eventstate_modifiers_clear(), world_copy_data(), and world_foreach_id().

◆ [struct]

const struct { ... } g_modifier_table[]
Initial value:
= {
}
@ GHOST_kKeyLeftOS
@ GHOST_kKeyLeftAlt
@ GHOST_kKeyRightShift
@ GHOST_kKeyRightOS
@ GHOST_kKeyLeftControl
@ GHOST_kKeyRightAlt
@ GHOST_kKeyRightControl
@ GHOST_kKeyLeftShift
@ GHOST_kModifierKeyRightControl
@ GHOST_kModifierKeyLeftControl
@ GHOST_kModifierKeyRightAlt
@ GHOST_kModifierKeyRightShift
@ GHOST_kModifierKeyLeftAlt
@ GHOST_kModifierKeyLeftShift
@ GHOST_kModifierKeyLeftOS
@ GHOST_kModifierKeyRightOS
@ KM_CTRL
Definition WM_types.hh:256
@ KM_ALT
Definition WM_types.hh:257
@ KM_OSKEY
Definition WM_types.hh:259
@ KM_SHIFT
Definition WM_types.hh:255

Referenced by wm_ghost_modifier_query(), wm_window_update_eventstate_modifiers(), and wm_window_update_eventstate_modifiers_clear().

◆ g_system

◆ g_system_backend_id

const char* g_system_backend_id = nullptr
static

Definition at line 97 of file wm_window.cc.

Referenced by WM_ghost_backend(), and wm_ghost_init().

◆ [struct]

struct { ... } * g_wm_clipboard_text_simulate

◆ ghost_key_pair

GHOST_TKey ghost_key_pair[2]

Definition at line 139 of file wm_window.cc.

◆ ghost_mask_pair

GHOST_TModifierKey ghost_mask_pair[2]

Definition at line 140 of file wm_window.cc.

Referenced by wm_ghost_modifier_query().

◆ wm_init_state