Blender V5.0
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 tag_cursor_refresh
char event_queue_check_click
char event_queue_check_drag
char event_queue_check_drag_handled
short 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
char addmousemove
char _pad1 [7]
ListBase handlers
ListBase modalhandlers
ListBase gesture
struct Stereo3dFormatstereo3d_format
ListBase drawcalls
void * cursor_keymap_status
void * _pad2
uint64_t eventstate_prev_press_time_ms
WindowRuntimeHandleruntime
void * _pad3

Detailed Description

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

Definition at line 164 of file DNA_windowmanager_types.h.

Member Data Documentation

◆ _pad1

char wmWindow::_pad1[7]

Definition at line 288 of file DNA_windowmanager_types.h.

◆ _pad2

void* wmWindow::_pad2

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

Definition at line 311 of file DNA_windowmanager_types.h.

◆ _pad3

void* wmWindow::_pad3

Definition at line 315 of file DNA_windowmanager_types.h.

◆ active

char wmWindow::active

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

Definition at line 215 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

char wmWindow::addmousemove

Internal: tag this for extra mouse-move event, makes cursors/buttons active on UI switching.

Definition at line 287 of file DNA_windowmanager_types.h.

Referenced by ghost_event_proc(), WM_event_add_mousemove(), wm_event_do_handlers(), and WM_toolsystem_ref_set_from_runtime().

◆ cursor

◆ cursor_keymap_status

void* wmWindow::cursor_keymap_status

Private runtime info to show text in the status bar.

Definition at line 305 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 191 of file DNA_windowmanager_types.h.

◆ drawcalls

ListBase wmWindow::drawcalls

Custom drawing callbacks.

Definition at line 302 of file DNA_windowmanager_types.h.

Referenced by ED_screen_draw_edges(), 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 281 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_check_click

char wmWindow::event_queue_check_click

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

Definition at line 238 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 240 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 246 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 256 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

short wmWindow::event_queue_consecutive_gesture_type

The last event type (that passed WM_event_consecutive_gesture_test check). A wmEventType is assigned to this value.

Definition at line 252 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 254 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->Object 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 274 of file DNA_windowmanager_types.h.

Referenced by actionzone_area_poll(), blender::ed::outliner::collection_drop_tooltip(), console_cursor(), 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(), 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(), blender::ed::vse::load_data_init_from_operator(), 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(), screen_ctx_ui_list(), screen_draw_join_highlight(), scroller_activate_poll(), blender::ed::vse::sequencer_drop_copy(), blender::ed::vse::sequencer_main_cursor(), snap_gizmo_test_select(), blender::ed::spreadsheet::spreadsheet_cursor(), text_cursor(), blender::ed::transform::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(), uiTemplateInputStatusBorder(), 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_tooltip_timer_init_ex(), WM_window_cursor_keymap_status_refresh(), wm_window_ensure_eventstate(), wm_window_free(), WM_window_open_temp(), 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

Definition at line 312 of file DNA_windowmanager_types.h.

Referenced by wm_event_add_ghostevent().

◆ gesture

◆ ghostwin

void* wmWindow::ghostwin

Don't want to include ghost.h stuff.

Definition at line 168 of file DNA_windowmanager_types.h.

Referenced by ghost_event_proc(), screen_refresh_if_needed(), window_set_custom_cursor_generator(), window_set_custom_cursor_pixmap(), wm_cursor_arrow_move(), WM_cursor_grab_disable(), WM_cursor_grab_enable(), wm_cursor_position_from_ghost_client_coords(), wm_cursor_position_from_ghost_screen_coords(), wm_cursor_position_get(), wm_cursor_position_to_ghost_client_coords(), wm_cursor_position_to_ghost_screen_coords(), WM_cursor_set(), wm_cursor_text_generator(), wm_cursor_text_pixmap(), wm_cursor_time_large(), wm_cursor_time_small(), WM_cursor_warp(), wm_draw_update(), wm_file_read_setup_wm_substitute_old_window(), wm_ghostwindow_destroy(), WM_progress_clear(), WM_progress_set(), wm_software_cursor_draw(), wm_software_cursor_needed_for_window(), WM_stereo3d_enabled(), wm_window_close(), wm_window_copy(), wm_window_copy_test(), WM_window_decoration_style_apply(), WM_window_decoration_style_flags_get(), WM_window_decoration_style_flags_set(), wm_window_decoration_style_set_from_theme(), WM_window_dpi_get_scale(), WM_window_dpi_set_userdef(), wm_window_fullscreen_toggle_exec(), wm_window_get_swap_interval(), wm_window_ghostwindow_add(), wm_window_ghostwindow_ensure(), wm_window_grab_warp_region_is_set(), wm_window_lower(), wm_window_make_drawable(), WM_window_native_pixel_coords(), WM_window_native_pixel_size(), WM_window_native_pixel_x(), WM_window_native_pixel_y(), WM_window_open(), WM_window_pixels_read_from_frontbuffer(), WM_window_pixels_read_sample_from_frontbuffer(), wm_window_raise(), wm_window_reset_drawable(), wm_window_set_drawable(), wm_window_set_size(), wm_window_set_swap_interval(), WM_window_support_hdr_color(), wm_window_swap_buffer_acquire(), wm_window_swap_buffer_release(), WM_window_title(), and wm_window_update_size_position().

◆ global_areas

◆ gpuctx

◆ grabcursor

◆ handlers

◆ lastcursor

short wmWindow::lastcursor

Previous cursor when setting modal one.

Definition at line 219 of file DNA_windowmanager_types.h.

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

◆ modalcursor

◆ modalhandlers

◆ new_scene

struct Scene* wmWindow::new_scene

Temporary when switching.

Definition at line 178 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 231 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, lock pie creation from this event until released.

Definition at line 226 of file DNA_windowmanager_types.h.

Referenced by ui_pie_handler(), UI_pie_menu_begin(), and wm_event_pie_filter().

◆ posx

◆ posy

◆ prev

struct wmWindow * wmWindow::prev

Definition at line 165 of file DNA_windowmanager_types.h.

◆ runtime

◆ 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.
Warning
Using these values directly can result in errors on macOS due to HiDPI displays influencing the window native pixel size. See WM_window_native_pixel_size for a general use alternative.

Definition at line 211 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_close(), 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 183 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: