Blender V4.5
wm_window.cc File Reference
#include <algorithm>
#include <chrono>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <thread>
#include <fmt/format.h>
#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_listbase.h"
#include "BLI_math_vector.h"
#include "BLI_path_utils.hh"
#include "BLI_rect.h"
#include "BLI_string.h"
#include "BLI_string_utf8.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_wm_runtime.hh"
#include "BKE_workspace.hh"
#include "RNA_access.hh"
#include "RNA_enum_types.hh"
#include "WM_api.hh"
#include "WM_keymap.hh"
#include "WM_types.hh"
#include "wm.hh"
#include "wm_draw.hh"
#include "wm_event_system.hh"
#include "wm_files.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_context.hh"
#include "GPU_framebuffer.hh"
#include "GPU_init_exit.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)
Window Decoration Style
eWM_WindowDecorationStyleFlag WM_window_decoration_style_flags_get (const wmWindow *win)
void WM_window_decoration_style_flags_set (const wmWindow *win, eWM_WindowDecorationStyleFlag style_flags)
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)
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
wmOperatorStatus wm_window_close_exec (bContext *C, wmOperator *)
wmOperatorStatus wm_window_new_exec (bContext *C, wmOperator *op)
wmOperatorStatus wm_window_new_main_exec (bContext *C, wmOperator *op)
wmOperatorStatus 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 wmEventType 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_byte_buffer (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)
uint WM_cursor_preferred_logical_size ()
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)
bool WM_window_is_main_top_level (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 107 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 101 of file wm_window.cc.

◆ ModSide

enum ModSide
Enumerator
MOD_SIDE_LEFT 
MOD_SIDE_RIGHT 

Definition at line 160 of file wm_window.cc.

Function Documentation

◆ block_create_gpu_backend_fallback()

◆ block_create_opengl_usage_warning()

◆ find_free_winid()

int find_free_winid ( wmWindowManager * wm)
static

Definition at line 301 of file wm_window.cc.

References LISTBASE_FOREACH, wmWindowManager::windows, and winid.

Referenced by wm_window_new().

◆ ghost_event_proc()

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 1505 of file wm_window.cc.

References wmWindow::active, wmWindow::addmousemove, BKE_icon_changed(), BLF_cache_clear(), C, 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(), EVENT_NONE, 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, ID::icon_id, bScreen::id, 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, U, 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.

◆ ghost_event_proc_timestamp_warning()

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 1427 of file wm_window.cc.

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

Referenced by ghost_event_proc().

◆ WM_capabilities_flag()

eWM_CapabilitiesFlag WM_capabilities_flag ( )

Return the capabilities of the windowing system.

Note
Some callers need to check G.background == false before this function. See inline code-comments for details.

Definition at line 2258 of file wm_window.cc.

References flag, GHOST_GetCapabilities(), GHOST_kCapabilityClipboardImages, GHOST_kCapabilityCursorWarp, GHOST_kCapabilityDesktopSample, GHOST_kCapabilityGPUReadFrontBuffer, GHOST_kCapabilityInputIME, GHOST_kCapabilityKeyboardHyperKey, GHOST_kCapabilityPrimaryClipboard, GHOST_kCapabilityTrackpadPhysicalDirection, GHOST_kCapabilityWindowDecorationStyles, GHOST_kCapabilityWindowPosition, WM_CAPABILITY_CLIPBOARD_IMAGES, WM_CAPABILITY_CURSOR_WARP, WM_CAPABILITY_DESKTOP_SAMPLE, WM_CAPABILITY_GPU_FRONT_BUFFER_READ, WM_CAPABILITY_INITIALIZED, WM_CAPABILITY_INPUT_IME, WM_CAPABILITY_KEYBOARD_HYPER_KEY, WM_CAPABILITY_PRIMARY_CLIPBOARD, WM_CAPABILITY_TRACKPAD_PHYSICAL_DIRECTION, WM_CAPABILITY_WINDOW_DECORATION_STYLES, and WM_CAPABILITY_WINDOW_POSITION.

Referenced by bpy_wm_capabilities(), console_select_update_primary_clipboard(), ED_area_newspace(), ED_screen_do_listen(), eyedropper_color_sample_fl(), font_select_update_primary_clipboard(), text_select_update_primary_clipboard(), wm_event_add_ghostevent(), wm_event_cursor_other_windows(), wm_paintcursor_draw(), wm_software_cursor_needed(), WM_window_decoration_style_apply(), WM_window_decoration_style_flags_set(), WM_window_find_under_cursor(), wm_window_ghostwindow_add(), wm_window_ghostwindow_ensure(), WM_window_pixels_read(), WM_window_pixels_read_sample(), WM_window_pixels_read_sample_from_frontbuffer(), and wm_window_update_size_position().

◆ wm_clipboard_free()

void wm_clipboard_free ( )

Definition at line 2453 of file wm_window.cc.

References ARRAY_SIZE, g_wm_clipboard_text_simulate, i, 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 2616 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 2624 of file wm_window.cc.

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

Referenced by image_clipboard_paste_exec().

◆ WM_clipboard_image_set_byte_buffer()

bool WM_clipboard_image_set_byte_buffer ( ImBuf * ibuf)

Put image data to the clipboard.

Parameters
ibufthe image to set the clipboard to.

Definition at line 2643 of file wm_window.cc.

References ImBuf::byte_buffer, ImBufByteBuffer::data, G, GHOST_putClipboardImage(), 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 2567 of file wm_window.cc.

References wm_clipboard_text_get_ex().

Referenced by console_paste_exec(), paste_text_exec(), pyrna_WindowManager_clipboard_get(), blender::ed::vse::sequencer_text_edit_paste_exec(), and text_paste_exec().

◆ wm_clipboard_text_get_ex()

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 2572 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()

char * wm_clipboard_text_get_impl ( bool selection)
static

◆ WM_clipboard_text_set()

◆ wm_clipboard_text_set_impl()

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

◆ wm_confirm_quit()

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 394 of file wm_window.cc.

References C, 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_preferred_logical_size()

uint WM_cursor_preferred_logical_size ( )
Returns
the preferred logical size for the cursor (before DPI/Hi-DPI scaling is applied).

Definition at line 2870 of file wm_window.cc.

References g_system, and GHOST_GetCursorPreferredLogicalSize().

Referenced by window_size_calc(), and wm_software_cursor_draw_crosshair().

◆ 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 2850 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 )

Definition at line 2433 of file wm_window.cc.

References timer, and WM_event_timer_remove().

Referenced by file_draw_list(), file_exit(), file_refresh(), and WM_event_add().

◆ 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 2316 of file wm_window.cc.

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

Referenced by screen_change_prepare(), screen_refresh_if_needed(), and WM_event_add().

◆ 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 2395 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(), and WM_event_add().

◆ 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 186 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 175 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 2060 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 2052 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()

uint8_t wm_ghost_modifier_query ( const enum ModSide side)
static

Check if specified modifier key type is pressed.

Definition at line 1353 of file wm_window.cc.

References ARRAY_SIZE, g_modifier_table, g_system, GHOST_GetModifierKeyState(), ghost_mask_pair, i, 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 3248 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 2817 of file wm_window.cc.

References 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 2794 of file wm_window.cc.

References GHOST_kWindowStateFullScreen, WIN_OVERRIDE_WINSTATE, 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 ( )

Definition at line 2800 of file wm_window.cc.

References GHOST_kWindowStateNormal, WIN_OVERRIDE_WINSTATE, and wm_init_state.

Referenced by arg_handle_with_borders().

◆ 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 2787 of file wm_window.cc.

References 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 2812 of file wm_window.cc.

References wm_init_state.

Referenced by arg_handle_no_window_focus().

◆ WM_progress_clear()

void WM_progress_clear ( wmWindow * win)

Definition at line 2671 of file wm_window.cc.

References GHOST_EndProgressBar(), and wmWindow::ghostwin.

Referenced by redraw_timer_exec(), and wm_jobs_update_progress_bars().

◆ WM_progress_set()

void WM_progress_set ( wmWindow * win,
float progress )

◆ 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 401 of file wm_window.cc.

References C, CTX_data_main(), CTX_wm_manager(), CTX_wm_window(), CTX_wm_window_set(), G, U, 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()

void wm_save_file_on_quit_dialog_callback ( bContext * C,
void *  )
static

Definition at line 385 of file wm_window.cc.

References C, and 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()

void wm_window_check_size ( rcti * rect)
static

Keeps size within monitor bounds.

Definition at line 198 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()

wmOperatorStatus wm_window_close_exec ( bContext * C,
wmOperator * op )

Definition at line 1227 of file wm_window.cc.

References C, 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 359 of file wm_window.cc.

References C, 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_decoration_style_apply()

void WM_window_decoration_style_apply ( const wmWindow * win,
const bScreen * screen = nullptr )

Apply the window decoration style using the current style flags and by parsing style settings from the current Blender theme. The screen parameter is optional, and can be passed for enhanced theme parsing.

Note
Avoid calling this function directly, prefer sending an NC_WINDOW notification when WM_CAPABILITY_WINDOW_DECORATION_STYLES is supported instead.

Definition at line 687 of file wm_window.cc.

References BLI_assert, GHOST_ApplyWindowDecorationStyle(), wmWindow::ghostwin, WM_capabilities_flag(), WM_CAPABILITY_WINDOW_DECORATION_STYLES, and wm_window_decoration_style_set_from_theme().

Referenced by ED_screen_do_listen(), and wm_window_ghostwindow_ensure().

◆ WM_window_decoration_style_flags_get()

eWM_WindowDecorationStyleFlag WM_window_decoration_style_flags_get ( const wmWindow * win)

◆ WM_window_decoration_style_flags_set()

◆ wm_window_decoration_style_set_from_theme()

◆ WM_window_ensure_active_view_layer()

void WM_window_ensure_active_view_layer ( wmWindow * win)

◆ wm_window_ensure_eventstate()

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 2770 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()

◆ WM_window_get_active_layout()

◆ WM_window_get_active_scene()

Scene * WM_window_get_active_scene ( const wmWindow * win)

Definition at line 3017 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(), ED_view3d_gizmo_ruler_remove_by_gpencil_layer(), 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_active_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_editable_strips(), screen_ctx_selected_objects(), screen_ctx_selected_pose_bones(), screen_ctx_selected_pose_bones_from_active_object(), screen_ctx_selected_sequences(), screen_ctx_selected_strips(), screen_ctx_sequences(), screen_ctx_strips(), 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_brush_clear_paint_reference(), toolsystem_refresh_screen_from_active_tool(), blender::ed::outliner::tree_element_viewlayer_activate(), view3d_main_region_cursor(), wm_draw_area_offscreen(), 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_event_handler_region_marker_poll(), WM_event_handler_region_v2d_mask_no_marker_poll(), 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 3135 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(), bpy_rna_context_temp_override_enter(), bpy_rna_context_temp_override_enter_ok_or_error(), bpy_rna_context_temp_override_exit(), bpy_rna_context_temp_set_screen_for_window(), button_activate_init(), button_tooltip_timer_reset(), blender::ed::space_node::compo_get_recalc_flags(), blender::ed::space_node::compositor_is_in_use(), context_find_graph_editor(), ED_area_find_under_cursor(), ED_area_type_hud_clear(), ED_area_update_region_sizes(), ED_areas_do_frame_follow(), 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_refresh(), 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(), ED_view3d_gizmo_ruler_remove_by_gpencil_layer(), blender::ed::animrig::ensure_asset_ui_visible(), eyedropper_color_sample_fl(), eyedropper_cryptomatte_sample_fl(), eyedropper_win_area_find(), find_area_showing_render_result(), blender::ed::sculpt_paint::flush_update_done(), blender::ed::asset::list::foreach_visible_asset_browser_showing_library(), get_compositor_needed_outputs(), ghost_event_proc(), gizmo_mesh_spin_redo_setup(), menu_items_from_ui_create(), RE_FreeUnusedGPUResources(), 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_if_needed(), screen_state_to_nonnormal(), blender::ed::asset::shelf::show_catalog_in_visible_shelves(), 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 3051 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_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 2727 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 989 of file wm_window.cc.

References BLI_assert, G, LISTBASE_FOREACH, 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 1014 of file wm_window.cc.

References BLI_assert, C, 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 2947 of file wm_window.cc.

References GHOST_kWindowStateFullScreen, and wmWindow::windowstate.

Referenced by area_azone_init(), and wm_stereo3d_set_exec().

◆ WM_window_is_main_top_level()

bool WM_window_is_main_top_level ( const wmWindow * win)

Return whether the window is a main/top-level window. In which case it is expected to contain global areas (top-bar/status-bar).

Definition at line 2957 of file wm_window.cc.

References BKE_workspace_active_screen_get(), wmWindow::parent, bScreen::temp, and wmWindow::workspace_hook.

Referenced by ED_screen_global_areas_refresh(), and wm_window_decoration_style_set_from_theme().

◆ WM_window_is_maximized()

bool WM_window_is_maximized ( const wmWindow * win)

Definition at line 2952 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 2901 of file wm_window.cc.

References GHOST_GetNativePixelSize(), wmWindow::ghostwin, x, and y.

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 2881 of file wm_window.cc.

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

Referenced by area_azone_init(), blender::ed::asset::shelf::layout_width_units_clamped(), screen_draw_area_drag_tip(), ui_def_but_rna__menu(), ui_searchbox_region_layout_fn(), wm_block_splash_create(), 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()

◆ 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()

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

◆ wm_window_reset_drawable()

◆ WM_window_screen_rect_calc()

◆ 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 2684 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 2722 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 2717 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 2374 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()

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 1854 of file wm_window.cc.

References BLI_time_now_seconds(), C, ceil, CTX_data_main(), CTX_wm_manager(), EVENT_NONE, EVT_DATA_TIMER, KM_NOTHING, LISTBASE_FOREACH_MUTABLE, POINTER_AS_UINT, 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()

void wm_window_update_eventstate ( wmWindow * win)
static

◆ wm_window_update_eventstate_modifiers()

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 704 of file wm_window.cc.

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

Referenced by ghost_event_proc().

◆ wm_window_update_eventstate_modifiers_clear()

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 759 of file wm_window.cc.

References ARRAY_SIZE, wmWindow::eventstate, flag, g_modifier_table, GHOST_kEventKeyUp, GHOST_kKeyUnknown, i, GHOST_TEventKeyData::is_repeat, GHOST_TEventKeyData::key, MOD_SIDE_LEFT, MOD_SIDE_RIGHT, wmEvent::modifier, GHOST_TEventKeyData::utf8_buf, 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 2976 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.5.5/source/blender/blenkernel/BKE_grease_pencil.hh.

Definition at line 139 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(), blender::ed::space_node::add_node_group_interface_from_declaration_recursive(), 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(), animsys_evaluate_action_group(), 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(), blender::ed::transform::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(), BKE_bmbvh_new_ex(), 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_camera_background_image_copy(), BKE_constraint_duplicate_ex(), BKE_constraints_copy_ex(), BKE_constraints_copy_ex(), BKE_constraints_id_loop(), BKE_copy_time_markers(), BKE_copybuffer_paste(), BKE_copybuffer_read(), BKE_curve_deform_coords(), BKE_curve_deform_coords_with_editmesh(), BKE_curve_nurbs_vert_coords_apply(), BKE_curvemap_remove(), BKE_curvemapping_changed(), BKE_curveprofile_copy(), BKE_curveprofile_remove_by_flag(), BKE_fluid_modifier_copy(), BKE_fluid_modifier_copy(), BKE_freestyle_config_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_lattice_vert_coords_apply(), 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_is_any_selected_multi(), 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_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_pose_channels_remove(), BKE_pose_copy_data_ex(), BKE_ptcache_copy_list(), BKE_ptcache_copy_list(), BKE_reports_init(), BKE_rigidbody_object_copy(), BKE_rigidbody_object_copy(), BKE_rigidbody_world_copy(), BKE_scene_orientation_get_index_from_flag(), BKE_scene_orientation_slot_get_from_flag(), BKE_shaderfx_copydata_ex(), BKE_shaderfx_copydata_generic(), BKE_shaderfx_free_ex(), BKE_studiolight_ensure_flag(), BKE_studiolight_find(), BKE_studiolight_find_default(), BKE_studiolight_findindex(), BKE_texture_pointdensity_copy(), BKE_toolsettings_copy(), BKE_tracking_copy(), BKE_tracking_copy(), BKE_tracking_count_selected_tracks_in_list(), BKE_tracking_track_flag_clear(), 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_clear(), BLI_ghash_flag_set(), BLI_gset_flag_clear(), BLI_gset_flag_set(), BLI_mempool_create(), BLI_scanfill_calc(), BLI_scanfill_calc_ex(), blo_do_versions_300(), blo_do_versions_400(), blo_do_versions_420(), 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(), bone_autoside_name(), 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(), blender::ed::object::clear_images_poly(), blender::ed::object::clear_single_image(), HullDesc::ClearHullFlag(), 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(), blender::seq::copy_text_effect(), CreateSegment(), cuboid_do(), curve_copy_data(), curve_deform_coords_impl(), curve_foreach_id(), curve_pick_vert__do_closest(), 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_free(), 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(), 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_text_cache_add(), dynamicPaint_Modifier_copy(), 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_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_angle_threshold(), 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_browse_operator_relative_paths_supported(), file_select_deselect_all(), filelist_entries_select_index_range_set(), filelist_entry_parent_select_set(), filelist_entry_select_index_set(), filelist_entry_select_set(), filelist_setdir(), 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(), blender::geometry::fit_poly_to_bezier_curves(), for_mouse_hit_keys(), fsmenu_insert_entry(), blender::animrig::get_autokey_flags(), blender::ed::greasepencil::get_flag(), get_imbuf_cache(), blender::animrig::get_keyframing_flags(), blender::io::obj::OBJCurve::get_knots_u(), get_panel_expand_flag(), get_postprocessed_cached_frame(), get_timecode(), blender::ed::outliner::TreeElementOverridesBase::get_warning(), blender::ed::transform::getTransformOrientation_ex(), ghash_new(), GPU_material_flag_get(), GPU_material_flag_set(), guiding_record_background(), guiding_record_bssrdf_bounce(), guiding_record_bssrdf_segment(), guiding_record_bssrdf_weight(), guiding_record_continuation_probability(), guiding_record_light_surface_segment(), guiding_record_surface_bounce(), guiding_record_surface_emission(), guiding_record_surface_segment(), guiding_record_volume_bounce(), guiding_record_volume_emission(), guiding_record_volume_segment(), guiding_record_volume_transmission(), 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_InsertToGroup(), IDP_MergeGroup_ex(), IDP_ReplaceInGroup_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(), blender::ed::transform::mesh_partial_ensure(), metaball_foreach_id(), blender::gpu::shader::ShaderCreateInfo::metal_backend_only(), mnee_path_contribution(), 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(), uiLayout::op(), uiLayout::op(), 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::ed::outliner::outliner_item_drag_drop_invoke(), blender::fn::multi_function::SignatureBuilder::output(), 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(), postprocess_frame(), prefetch_task_func(), project_bucket_clip_face(), project_paint_face_init(), blender::ed::transform::projectFloatViewEx(), blender::ed::transform::projectIntViewEx(), uiLayout::prop(), uiLayout::prop(), 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(), rigidbody_copy_object(), 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_clear_flag(), RNA_def_property_override_flag(), RNA_def_struct_clear_flag(), RNA_def_struct_flag(), rna_def_struct_function_prototype_cpp(), rna_function_register_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_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(), selectend_nurb(), blender::seq::seq_render_image_strip_view(), blender::seq::seqbase_dupli_recursive(), blender::seq::seqbase_duplicate_recursive(), blender::ed::transform::SeqToTransData(), blender::ed::transform::SeqToTransData_build(), blender::ed::transform::SeqTransCount(), blender::ed::vse::sequencer_generic_invoke_xy__internal(), blender::ed::vse::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(), blender::bke::node_interface::socket_types::socket_data_copy(), blender::bke::node_interface::socket_types::socket_data_copy_ptr(), sort_bmelem_flag(), sound_foreach_id(), sphere_do(), SplitTest(), blender::seq::strip_duplicate(), strip_foreach_member_id_cb(), 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(), test_float_state(), test_vec2f_state(), Freestyle::testEdgeMark(), texture_copy_data(), texture_foreach_id(), blender::TimeMapping::TimeMapping(), tracking_object_copy(), tracking_objects_copy(), tracking_plane_tracks_copy(), tracking_tracks_copy(), blender::ed::transform::transform_convert_mesh_mirrordata_calc(), blender::ed::outliner::tree_element_to_path(), triangulate_mesh(), UI_block_flag_disable(), 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_disable(), UI_but_dragflag_enable(), UI_but_drawflag_disable(), UI_but_drawflag_enable(), UI_but_flag2_enable(), UI_but_flag_disable(), UI_but_flag_enable(), UI_but_flag_is_set(), ui_but_string_get_ex(), 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_ptr_ex(), uiItemFullOMenuHold_ptr(), uiItemFullR_with_menu(), uiItemFullR_with_popover(), uiItemsFullEnumO(), uiItemsFullEnumO_items(), uiTemplateAction(), uiTemplateGpencilModifier(), uiTemplateOperatorPropertyButs(), blender::ed::geometry::unassigned_local_poll(), 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_id_linked_relocate_exec(), 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(), world_foreach_id(), blender::bke::forward_compat::write_compositor_legacy_properties(), GeometryManager::~GeometryManager(), Integrator::~Integrator(), and ObjectManager::~ObjectManager().

◆ [struct]

const struct { ... } g_modifier_table[]
Initial value:
= {
}
@ GHOST_kKeyLeftOS
@ GHOST_kKeyLeftAlt
@ GHOST_kKeyRightShift
@ GHOST_kKeyRightOS
@ GHOST_kKeyLeftControl
@ GHOST_kKeyLeftHyper
@ GHOST_kKeyRightAlt
@ GHOST_kKeyRightControl
@ GHOST_kKeyRightHyper
@ GHOST_kKeyLeftShift
@ GHOST_kModifierKeyRightControl
@ GHOST_kModifierKeyLeftControl
@ GHOST_kModifierKeyRightHyper
@ GHOST_kModifierKeyRightAlt
@ GHOST_kModifierKeyRightShift
@ GHOST_kModifierKeyLeftAlt
@ GHOST_kModifierKeyLeftShift
@ GHOST_kModifierKeyLeftOS
@ GHOST_kModifierKeyRightOS
@ GHOST_kModifierKeyLeftHyper
@ KM_CTRL
Definition WM_types.hh:276
@ KM_ALT
Definition WM_types.hh:277
@ KM_HYPER
Definition WM_types.hh:289
@ KM_OSKEY
Definition WM_types.hh:279
@ KM_SHIFT
Definition WM_types.hh:275

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 98 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 140 of file wm_window.cc.

◆ ghost_mask_pair

GHOST_TModifierKey ghost_mask_pair[2]

Definition at line 141 of file wm_window.cc.

Referenced by wm_ghost_modifier_query().

◆ wm_init_state