Blender V4.3
wmWindow Struct Reference

#include <DNA_windowmanager_types.h>

Public Attributes

struct wmWindownext
 
struct wmWindowprev
 
void * ghostwin
 
void * gpuctx
 
struct wmWindowparent
 
struct Scenescene
 
struct Scenenew_scene
 
char view_layer_name [64]
 
struct Sceneunpinned_scene
 
struct WorkSpaceInstanceHookworkspace_hook
 
ScrAreaMap global_areas
 
struct bScreen *screen DNA_DEPRECATED
 
int winid
 
short posx
 
short posy
 
short sizex
 
short sizey
 
char windowstate
 
char active
 
short cursor
 
short lastcursor
 
short modalcursor
 
short grabcursor
 
short pie_event_type_lock
 
short pie_event_type_last
 
char addmousemove
 
char tag_cursor_refresh
 
char event_queue_check_click
 
char event_queue_check_drag
 
char event_queue_check_drag_handled
 
char event_queue_consecutive_gesture_type
 
int event_queue_consecutive_gesture_xy [2]
 
struct wmEvent_ConsecutiveDataevent_queue_consecutive_gesture_data
 
struct wmEventeventstate
 
struct wmEventevent_last_handled
 
const struct wmIMEData * ime_data
 
char ime_data_is_composing
 
char _pad1 [7]
 
ListBase event_queue
 
ListBase handlers
 
ListBase modalhandlers
 
ListBase gesture
 
struct Stereo3dFormatstereo3d_format
 
ListBase drawcalls
 
void * cursor_keymap_status
 
uint64_t eventstate_prev_press_time_ms
 

Detailed Description

The saveable part, the rest of the data is local in GHOST.

Definition at line 275 of file DNA_windowmanager_types.h.

Member Data Documentation

◆ _pad1

char wmWindow::_pad1[7]

Definition at line 396 of file DNA_windowmanager_types.h.

◆ active

char wmWindow::active

Set to 1 if an active window, for quick rejects.

Definition at line 322 of file DNA_windowmanager_types.h.

Referenced by current_screen_compat(), ghost_event_proc(), gizmo_mesh_spin_redo_setup(), and wm_file_read_setup_wm_substitute_old_window().

◆ addmousemove

◆ cursor

◆ cursor_keymap_status

void* wmWindow::cursor_keymap_status

Private runtime info to show text in the status bar.

Definition at line 415 of file DNA_windowmanager_types.h.

Referenced by WM_window_cursor_keymap_status_get(), WM_window_cursor_keymap_status_refresh(), and wm_window_free().

◆ DNA_DEPRECATED

struct bScreen* screen wmWindow::DNA_DEPRECATED

Definition at line 302 of file DNA_windowmanager_types.h.

◆ drawcalls

ListBase wmWindow::drawcalls

Custom drawing callbacks.

Definition at line 412 of file DNA_windowmanager_types.h.

Referenced by wm_draw_callbacks(), WM_draw_cb_activate(), and WM_draw_cb_exit().

◆ event_last_handled

struct wmEvent* wmWindow::event_last_handled

Keep the last handled event in event_queue here (owned and must be freed).

Warning
This must only to be used for event queue logic. User interactions should use eventstate instead (if the event isn't passed to the function).

Definition at line 388 of file DNA_windowmanager_types.h.

Referenced by ui_popup_block_refresh(), wm_event_add_mousemove_to_head(), wm_event_free_last_handled(), wm_file_read_setup_wm_substitute_old_window(), and wm_window_free().

◆ event_queue

◆ event_queue_check_click

char wmWindow::event_queue_check_click

Enable when KM_PRESS events are not handled (keyboard/mouse-buttons only).

Definition at line 348 of file DNA_windowmanager_types.h.

Referenced by wm_event_do_handlers(), and wm_handlers_do().

◆ event_queue_check_drag

char wmWindow::event_queue_check_drag

Enable when KM_PRESS events are not handled (keyboard/mouse-buttons only).

Definition at line 350 of file DNA_windowmanager_types.h.

Referenced by wm_event_do_handlers(), WM_gizmo_group_refresh(), and wm_handlers_do().

◆ event_queue_check_drag_handled

char wmWindow::event_queue_check_drag_handled

Enable when the drag was handled, to avoid mouse-motion continually triggering drag events which are not handled but add overhead to gizmo handling (for example), see #87511.

Definition at line 356 of file DNA_windowmanager_types.h.

Referenced by wm_event_do_handlers(), and wm_handlers_do().

◆ event_queue_consecutive_gesture_data

struct wmEvent_ConsecutiveData* wmWindow::event_queue_consecutive_gesture_data

See WM_event_consecutive_data_get and related API. Freed when consecutive events end.

Definition at line 363 of file DNA_windowmanager_types.h.

Referenced by WM_event_consecutive_data_free(), WM_event_consecutive_data_get(), WM_event_consecutive_data_set(), and wm_window_free().

◆ event_queue_consecutive_gesture_type

char wmWindow::event_queue_consecutive_gesture_type

The last event type (that passed WM_event_consecutive_gesture_test check).

Definition at line 359 of file DNA_windowmanager_types.h.

Referenced by wm_event_do_handlers().

◆ event_queue_consecutive_gesture_xy

int wmWindow::event_queue_consecutive_gesture_xy[2]

The cursor location when event_queue_consecutive_gesture_type was set.

Definition at line 361 of file DNA_windowmanager_types.h.

Referenced by WM_event_consecutive_gesture_test_break(), and wm_event_do_handlers().

◆ eventstate

struct wmEvent* wmWindow::eventstate

Storage for event system.

For the most part this is storage for wmEvent.xy & wmEvent.modifiers. newly added key/button events copy the cursor location and modifier state stored here.

It's also convenient at times to be able to pass this as if it's a regular event.

  • This is not simply the current event being handled. The type and value is always set to the last press/release events otherwise cursor motion would always clear these values.
  • The value of eventstate->modifiers is set from the last pressed/released modifier key. This has the down side that the modifier value will be incorrect if users hold both left/right modifiers then release one. See note in wm_event_add_ghostevent for details.

Definition at line 381 of file DNA_windowmanager_types.h.

Referenced by actionzone_area_poll(), blender::ed::outliner::collection_drop_tooltip(), console_cursor(), drivers_editor_show_exec(), ED_area_update_region_sizes(), ED_gizmotypes_snap_3d_data_get(), ED_imbuf_sample_draw(), ED_region_draw_mouse_line_cb(), ED_screen_area_active(), ED_screen_draw_edges(), ED_view3d_cursor_snap_data_update(), eyedropper_draw_cursor_text_window(), file_main_region_draw(), get_view_focused(), ghost_event_proc(), gizmo_mesh_placement_modal_from_setup(), gizmo_mesh_spin_redo_modal_from_setup(), gizmo_mesh_spin_redo_setup(), gizmo_preselect_elem_test_select(), handle_layer_buttons(), info_log_show_exec(), menu_types_add_from_keymap_items(), blender::ed::space_node::node_cursor(), blender::ed::space_node::node_draw_space(), blender::ed::outliner::outliner_collection_set_flag_recursive_fn(), blender::ed::outliner::outliner_mode_toggle_fn(), blender::ed::outliner::outliner_object_set_flag_recursive_fn(), panel_handle_data_ensure(), blender::ed::outliner::restrictbutton_bone_select_fn(), blender::ed::outliner::restrictbutton_bone_visibility_fn(), blender::ed::outliner::restrictbutton_ebone_select_fn(), blender::ed::outliner::restrictbutton_ebone_visibility_fn(), screen_ctx_ui_list(), screen_draw_join_highlight(), scroller_activate_poll(), sequencer_drop_copy(), sequencer_main_cursor(), snap_gizmo_test_select(), text_cursor(), transform_mode_snap_source_init(), ui_apply_but(), UI_block_end(), ui_but_tooltip_init(), ui_item_enum_expand_handle(), ui_layer_but_cb(), ui_list_focused_poll(), ui_panel_drag_collapse_handler_add(), ui_pie_menu_level_invoke(), ui_popover_panel_create(), ui_popup_block_create(), ui_popup_block_refresh(), ui_popup_menu_create_impl(), UI_popup_menu_end(), ui_search_menu_create_tooltip(), ui_selectcontext_apply(), ui_textedit_begin(), UI_tooltip_create_from_button_or_extra_icon(), UI_tooltip_create_from_gizmo(), UI_tooltip_create_from_search_item_generic(), ui_view_drop_poll(), ui_view_drop_tooltip(), uiTemplateInputStatus(), userpref_show_exec(), v3d_cursor_snap_draw_fn(), v3d_cursor_snap_poll_fn(), view_scrolldown_exec(), view_scrollup_exec(), WM_cursor_grab_enable(), wm_cursor_position_get(), WM_cursor_warp(), wm_drags_draw(), wm_drags_exit(), WM_event_add_fileselect(), wm_event_add_ghostevent(), wm_event_add_mousemove(), WM_event_add_simulate(), wm_event_do_handlers(), WM_event_fileselect_event(), wm_event_init_from_window(), WM_event_remove_handlers(), wm_file_read_setup_wm_substitute_old_window(), WM_gizmo_group_refresh(), wm_handler_fileselect_do(), wm_operator_call_internal(), wm_paintcursor_draw(), wm_software_cursor_draw(), wm_software_cursor_motion_test(), wm_software_cursor_motion_update(), WM_tooltip_init(), WM_window_cursor_keymap_status_refresh(), wm_window_ensure_eventstate(), wm_window_free(), wm_window_update_eventstate(), wm_window_update_eventstate_modifiers(), and wm_window_update_eventstate_modifiers_clear().

◆ eventstate_prev_press_time_ms

uint64_t wmWindow::eventstate_prev_press_time_ms

The time when the key is pressed in milliseconds (see GHOST_GetEventTime). Used to detect double-click events.

Definition at line 421 of file DNA_windowmanager_types.h.

Referenced by wm_event_add_ghostevent().

◆ gesture

◆ ghostwin

◆ global_areas

◆ gpuctx

◆ grabcursor

◆ handlers

◆ ime_data

const struct wmIMEData* wmWindow::ime_data

Input Method Editor data - complex character input (especially for Asian character input) Currently WIN32 and APPLE, runtime-only data.

Definition at line 394 of file DNA_windowmanager_types.h.

Referenced by ui_do_but_textedit(), ui_textedit_end(), and wm_event_add_ghostevent().

◆ ime_data_is_composing

char wmWindow::ime_data_is_composing

Definition at line 395 of file DNA_windowmanager_types.h.

Referenced by ui_do_but_textedit(), and wm_event_add_ghostevent().

◆ lastcursor

short wmWindow::lastcursor

Previous cursor when setting modal one.

Definition at line 326 of file DNA_windowmanager_types.h.

Referenced by WM_cursor_modal_restore(), WM_cursor_modal_set(), and WM_cursor_time().

◆ modalcursor

short wmWindow::modalcursor

◆ modalhandlers

◆ new_scene

struct Scene* wmWindow::new_scene

Temporary when switching.

Definition at line 289 of file DNA_windowmanager_types.h.

◆ next

◆ parent

◆ pie_event_type_last

short wmWindow::pie_event_type_last

Exception to the above rule for nested pies, store last pie event for operators that spawn a new pie right after destruction of last pie.

Definition at line 340 of file DNA_windowmanager_types.h.

Referenced by UI_pie_menu_begin(), and ui_popup_handler().

◆ pie_event_type_lock

short wmWindow::pie_event_type_lock

Internal: tag this for extra mouse-move event, makes cursors/buttons active on UI switching. Internal, lock pie creation from this event until released.

Definition at line 335 of file DNA_windowmanager_types.h.

Referenced by UI_pie_menu_begin(), and wm_event_pie_filter().

◆ posx

◆ posy

◆ prev

struct wmWindow * wmWindow::prev

Definition at line 276 of file DNA_windowmanager_types.h.

◆ scene

◆ sizex

short wmWindow::sizex

Window size (in pixels).

Note
Loading a window typically uses the size & position saved in the blend-file, there is an exception for startup files which works as follows: Setting the window size to zero before ghostwin has been set has a special meaning, it causes the window size to be initialized to wm_init_state.size. These default to the main screen size but can be overridden by the --window-geometry command line argument.

Definition at line 318 of file DNA_windowmanager_types.h.

Referenced by area_join_cursor(), area_join_modal(), ghost_event_proc(), wm_file_read_setup_wm_substitute_old_window(), wm_window_copy(), wm_window_ghostwindow_add(), wm_window_ghostwindow_ensure(), WM_window_native_pixel_size(), WM_window_native_pixel_x(), wm_window_new_exec(), WM_window_open(), and wm_window_update_size_position().

◆ sizey

◆ stereo3d_format

◆ tag_cursor_refresh

char wmWindow::tag_cursor_refresh

◆ unpinned_scene

struct Scene* wmWindow::unpinned_scene

The workspace may temporarily override the window's scene with scene pinning. This is the "overridden" or "default" scene to restore when entering a workspace with no scene pinned.

Definition at line 294 of file DNA_windowmanager_types.h.

Referenced by workspace_exit(), and workspace_scene_pinning_update().

◆ view_layer_name

char wmWindow::view_layer_name[64]

◆ windowstate

◆ winid

◆ workspace_hook


The documentation for this struct was generated from the following file: