90 #define USE_GIZMO_MOUSE_PRIORITY_HACK
108 const bool is_keyboard,
109 const bool check_double_click);
117 const wmEvent *event_to_add_after)
119 wmEvent *
event = MEM_new<wmEvent>(__func__);
121 *
event = *event_to_add;
123 if (event_to_add_after ==
nullptr) {
180 event->customdata =
nullptr;
181 event->customdata_free =
false;
190 printf(
"%s: 'is_repeat=true' for non-keyboard event, this should not happen.\n", __func__);
194 printf(
"%s: 'val != NOTHING' for a cursor motion event, this should not happen.\n", __func__);
231 if (event !=
nullptr) {
258 if ((note->category | note->data | note->subtype | note->action) ==
type &&
259 note->reference == reference) {
273 wmNotifier *note = MEM_cnew<wmNotifier>(__func__);
302 wmNotifier *note = MEM_cnew<wmNotifier>(__func__);
321 if (note->reference == reference) {
345 if (new_id !=
nullptr) {
376 memset(((
char *)note) +
sizeof(
Link), 0,
sizeof(*note) -
sizeof(
Link));
410 if (is_after_open_file) {
429 if (
area->do_refresh) {
471 bool do_anim =
false;
472 bool clear_info_stats =
false;
477 if (note->category ==
NC_WM) {
485 else if (note->data ==
ND_UNDO) {
489 if (note->window == win) {
498 printf(
"%s: Workspace set %p\n", __func__, note->reference);
507 printf(
"%s: Workspace delete %p\n", __func__, workspace);
519 printf(
"%s: screen set %p\n", __func__, note->reference);
528 printf(
"%s: screen delete %p\n", __func__, note->reference);
534 if (note->window == win ||
535 (note->window ==
nullptr && (
ELEM(note->reference,
nullptr,
scene)))) {
543 clear_info_stats =
true;
547 if (clear_info_stats) {
559 if (
G.is_rendering ==
false) {
588 printf(
"notifier win %d screen %s cat %x\n",
590 win->screen->id.name + 2,
597 region_params.
window = win;
598 region_params.area =
nullptr;
599 region_params.region = region;
601 region_params.notifier = note;
616 area_params.area =
area;
617 area_params.notifier = note;
618 area_params.scene =
scene;
622 region_params.
window = win;
623 region_params.area =
area;
624 region_params.region = region;
625 region_params.scene =
scene;
626 region_params.notifier = note;
683 "Return value for events that should always pass should never be BREAK.");
703 static bool do_wheel_ui =
true;
715 if (do_wheel_ui ==
false) {
771 bool reactivate_button)
784 event.val = reactivate_button ? 0 : 1;
828 #ifdef WITH_INPUT_NDOF
829 void WM_ndof_deadzone_set(
float deadzone)
831 GHOST_setNDOFDeadZone(deadzone);
957 if (
G.background == 0 && caller_owns_reports ==
false) {
964 if (win_prev ==
nullptr) {
979 if (caller_owns_reports ==
false) {
984 if (
G.background == 0) {
1069 if (hud_status != NOP) {
1070 if (hud_status ==
SET) {
1076 else if (hud_status == CLEAR) {
1095 if (op ==
nullptr || op->
type ==
nullptr) {
1126 else if (repeat == 0) {
1143 if (op ==
nullptr || op->
type ==
nullptr || op->
type->
exec ==
nullptr) {
1171 op->
flag |= op_flag;
1173 op->
flag &= ~op_flag;
1179 op->
flag |= op_flag;
1181 op->
flag &= ~op_flag;
1193 if (otm && otm->
exec ==
nullptr) {
1207 if (op->
prev ==
nullptr && op->
next ==
nullptr) {
1214 return (op_prev && (op->
type == op_prev->
type));
1230 op->
ptr = MEM_cnew<PointerRNA>(
"wmOperatorPtrRNA");
1231 if (properties && properties->
data) {
1245 op->
reports = MEM_cnew<ReportList>(
"wmOperatorReportList");
1255 if (motherop ==
nullptr) {
1266 if (otmacro ==
nullptr) {
1279 opm->
opm = motherop;
1281 otmacro = otmacro->
next;
1292 opm->
opm = motherop;
1320 if (region->gizmo_map !=
nullptr) {
1334 event->mval[0] =
event->xy[0] - region->
winrct.
xmin;
1335 event->mval[1] =
event->xy[1] - region->
winrct.
ymin;
1339 event->mval[0] = -1;
1340 event->mval[1] = -1;
1352 const bool poll_only,
1353 bool use_last_properties)
1371 if (event !=
nullptr) {
1376 if (!is_nested_call && use_last_properties) {
1383 "handle evt %d win %p op %s",
1384 event ? event->
type : 0,
1433 const bool store = !is_nested_call && use_last_properties;
1443 int bounds[4] = {-1, -1, -1, -1};
1462 const rcti *winrect =
nullptr;
1473 winrect = ®ion->
winrct;
1476 winrect = &
area->totrct;
1514 const bool poll_only,
1525 if (event ==
nullptr) {
1534 if (window ==
nullptr) {
1654 const char *opstring,
1678 const char *opstring,
1711 if (!is_undo && wm) {
1753 if (opwait->
area !=
nullptr) {
1766 enum { CONTINUE = 0, EXECUTE, CANCEL }
state = CONTINUE;
1769 switch (event->
type) {
1799 if (
state != CONTINUE) {
1803 if (
state == EXECUTE) {
1832 const char *drawstr)
1838 if (otm !=
nullptr) {
1858 IFACE_(
"Input pending "),
1860 if (
area !=
nullptr) {
1880 if (properties->
data !=
nullptr) {
1930 *r_region =
nullptr;
1932 if (screen ==
nullptr || handler->
op ==
nullptr) {
1949 if (
area ==
nullptr) {
1952 if (handler->
op ==
nullptr) {
1954 "internal error: handler (%s) has invalid area",
2120 if (winevent->
type != kmitype) {
2127 if (winevent->
val != kmi->
val) {
2143 if ((shift != (
bool)kmi->
shift) &&
2230 const wmEvent *event_match =
nullptr;
2234 event_match = event;
2237 event_no_dbl_click = *event;
2240 event_match = &event_no_dbl_click;
2244 if (event_match !=
nullptr) {
2245 event_backup->
prev_type =
event->prev_type;
2246 event_backup->
prev_val =
event->prev_val;
2248 event->prev_type = event_match->
type;
2249 event->prev_val = event_match->
val;
2282 event->type =
event->prev_type;
2283 event->val =
event->prev_val;
2285 event->prev_type = event_backup->
prev_type;
2286 event->prev_val = event_backup->
prev_val;
2302 const char *kmi_idname)
2366 handler->
op =
nullptr;
2370 handler->
op =
nullptr;
2407 bool use_last_properties =
true;
2422 const bool is_tool = (keymap_tool !=
nullptr);
2423 const bool use_tool_properties = is_tool;
2425 if (use_tool_properties) {
2427 keymap_tool, &tool_properties, properties,
ot);
2428 properties = &tool_properties;
2429 use_last_properties =
false;
2434 if (use_tool_properties) {
2445 if (gzgt !=
nullptr) {
2448 if (region !=
nullptr) {
2452 gzmap_type, gzgt, region);
2489 if (sfile->
op == file_operator) {
2490 sfile->
op =
nullptr;
2517 IFACE_(
"Blender File View"),
2523 U.filebrowser_display_type,
2535 sfile->
op = handler->
op;
2577 if (file_area->
full) {
2603 else if (file_area->
full) {
2614 if (!temp_win && ctx_area->
full) {
2669 if (win_prev ==
nullptr) {
2754 return "handled (and pass on)";
2756 return "un-handled";
2776 char *kmi_props =
nullptr;
2787 if (kmi_props !=
nullptr) {
2794 if (do_debug_handler) \
2805 const bool do_debug_handler)
2809 if (keymap ==
nullptr) {
2814 PRINT(
"%s: checking '%s' ...", __func__, keymap->
idname);
2825 C, handlers, &handler->
head, event, kmi->ptr, kmi->idname);
2831 "keymap '%s', %s, %s, event: %s",
2839 if (keymap_post.
post_fn !=
nullptr) {
2864 const bool do_debug_handler,
2865 bool *r_keymap_poll)
2868 bool keymap_poll =
false;
2870 PRINT(
"%s: checking '%s' ...", __func__, keymap->
idname);
2877 PRINT(
"%s: item matched '%s'\n", __func__, kmi->idname);
2883 C, handlers, &handler->
head, event, kmi->ptr, kmi->idname);
2889 printf(
"%s: handled - and pass on! '%s'\n", __func__, kmi->idname);
2895 printf(
"%s: handled - and pass on! '%s'\n", __func__, kmi->idname);
2899 PRINT(
"%s: un-handled '%s'\n", __func__, kmi->idname);
2908 if (r_keymap_poll) {
2909 *r_keymap_poll = keymap_poll;
2920 const bool do_debug_handler)
2929 const bool restore_highlight_unless_activated = is_event_drag;
2944 if (restore_highlight_unless_activated ==
false) {
2953 struct PrevGizmoData {
2958 PrevGizmoData
prev{};
2970 bool handle_highlight =
false;
2971 bool handle_keymap =
false;
2974 if ((
prev.gz_modal ==
nullptr) &&
2975 ((event->
type ==
MOUSEMOVE) || is_event_modifier || is_event_drag)) {
2976 handle_highlight =
true;
2977 if (is_event_modifier || is_event_drag) {
2978 handle_keymap =
true;
2982 handle_keymap =
true;
2987 if (restore_highlight_unless_activated) {
2988 if ((handle_highlight ==
true) && (handle_keymap ==
false)) {
2993 if (handle_highlight) {
2998 if (gz ||
prev.gz) {
2999 if ((
prev.gz != gz) || (
prev.part != part)) {
3005 if (gz !=
nullptr) {
3016 if (handle_keymap) {
3019 bool keymap_poll =
false;
3023 C, event, handlers, handler, gzgroup, keymap, do_debug_handler, &keymap_poll);
3025 #ifdef USE_GIZMO_MOUSE_PRIORITY_HACK
3026 if (((action &
WM_HANDLER_BREAK) == 0) && !is_event_handle_all && keymap_poll) {
3029 wmEvent event_test_click = *event;
3032 wmEvent event_test_click_drag = *event;
3041 is_event_handle_all =
true;
3063 C, event, handlers, handler, gzgroup, keymap, do_debug_handler,
nullptr);
3073 if (handle_highlight) {
3074 if (restore_highlight_unless_activated) {
3077 if (!(gz_modal && (gz_modal !=
prev.gz_modal))) {
3083 if (is_event_handle_all) {
3104 const bool do_debug_handler =
3112 if (handlers ==
nullptr) {
3125 handler_base && handlers->
first;
3126 handler_base = handler_base_next) {
3127 handler_base_next = handler_base->next;
3133 else if (handler_base->poll ==
nullptr || handler_base->poll(
CTX_wm_region(
C), event)) {
3148 for (
int km_index = 0; km_index < km_result.
keymaps_len; km_index++) {
3151 C, event, handlers, handler, keymap, do_debug_handler);
3156 action |= action_iter;
3182 if (drop->poll(
C, drag, event)) {
3189 event->customdata = &single_lb;
3193 C, drop->ot, drop->ptr,
nullptr, opcontext,
false, event);
3292 if (win ==
nullptr) {
3313 const short prev_val =
event->val;
3314 const short prev_type =
event->type;
3315 const uint8_t prev_modifier =
event->modifier;
3316 const short prev_keymodifier =
event->keymodifier;
3319 event->type =
event->prev_press_type;
3320 event->modifier =
event->prev_press_modifier;
3321 event->keymodifier =
event->prev_press_keymodifier;
3322 event->direction = direction;
3328 event->direction = 0;
3329 event->keymodifier = prev_keymodifier;
3330 event->modifier = prev_modifier;
3331 event->val = prev_val;
3332 event->type = prev_type;
3376 WM_LOG_HANDLERS, 3,
"CLICK_DRAG: canceling (release event didn't match press)");
3391 "CLICK_DRAG: canceling (key-release exceeds drag threshold)");
3431 "CLICK_DRAG: canceling (button event was handled: value=%d)",
3493 if (screen &&
area) {
3506 for (; pc; pc = pc->
next) {
3507 if (pc->
poll ==
nullptr || pc->
poll(
C)) {
3574 event->customdata = &wm->
drags;
3575 event->customdata_free =
true;
3629 #ifdef WITH_XR_OPENXR
3636 static void wm_event_handle_xrevent(
bContext *
C,
3660 wmXrActionData *actiondata =
static_cast<wmXrActionData *
>(
event->customdata);
3666 properties.
type = actiondata->ot->srna;
3667 properties.data = actiondata->op_properties;
3668 if (actiondata->ot->invoke) {
3674 actiondata->op_properties ? &properties :
nullptr,
3682 wm, actiondata->ot, actiondata->op_properties ? &properties :
nullptr,
nullptr);
3737 if (!region_hovered) {
3761 if (screen ==
nullptr) {
3770 if (scene_eval !=
nullptr) {
3777 else if (is_playing_sound != -1) {
3778 bool is_playing_screen;
3782 if (((is_playing_sound == 1) && (is_playing_screen == 0)) ||
3783 ((is_playing_sound == 0) && (is_playing_screen == 1))) {
3799 if (is_playing_sound == 0) {
3802 int ncfra = round(
time *
FPS);
3836 printf(
"\n%s: Handling event\n", __func__);
3852 #ifdef WITH_XR_OPENXR
3854 wm_event_handle_xrevent(
C, wm, win, event);
3913 #ifdef WITH_INPUT_NDOF
4035 event.val = eventval;
4037 event.customdata = ophandle;
4065 for (
wmWindow *ctx_win_or_parent = ctx_win; ctx_win_or_parent;
4066 ctx_win_or_parent = ctx_win_or_parent->
parent) {
4070 return ctx_win_or_parent;
4073 if (file_area->
full) {
4074 return ctx_win_or_parent;
4098 ARegion *root_region =
nullptr;
4105 if (ctx_win != root_win) {
4119 C, handler, ctx_win->
eventstate, &root_area, &root_region);
4138 if (!root_area && ctx_win == root_win) {
4162 if (ctx_win != root_win) {
4175 static void WM_event_set_handler_flag(
wmEventHandler *handler,
int flag)
4177 handler->
flag = flag;
4190 handler->
op = op->
opm;
4192 handler->
op->
opm = op;
4254 if (handler->
keymap == keymap) {
4263 handler->
keymap = keymap;
4285 const bool with_gizmos)
4287 memset(km_result, 0x0,
sizeof(*km_result));
4290 int keymap_id_list_len = 0;
4296 BLI_assert_msg(win !=
nullptr,
"The window should always be set for tool interactions!");
4303 if (tref_rt && tref_rt->
keymap[0]) {
4304 keymap_id_list[keymap_id_list_len++] = tref_rt->
keymap;
4307 bool is_gizmo_visible =
false;
4308 bool is_gizmo_highlight =
false;
4312 bool add_keymap =
false;
4319 if (with_gizmos && (tref_rt->
gizmo_group[0] !=
'\0')) {
4326 if (gzgroup !=
nullptr) {
4331 if (gzgroup !=
nullptr) {
4334 is_gizmo_visible =
true;
4337 is_gizmo_highlight =
true;
4349 if (is_gizmo_visible && !is_gizmo_highlight) {
4350 if (keymap_id_list_len == 2) {
4351 SWAP(
const char *, keymap_id_list[0], keymap_id_list[1]);
4355 for (
int i = 0; i < keymap_id_list_len; i++) {
4356 const char *keymap_id = keymap_id_list[i];
4362 if (km ==
nullptr) {
4363 printf(
"Key-map: '%s' not found for tool '%s'\n", keymap_id,
area->runtime.tool->idname);
4426 handler->
keymap = keymap;
4454 if (handler ==
nullptr) {
4472 if (handler->
keymap == keymap) {
4526 const bool postpone)
4608 if (handler->
op && handler->
op->
type ==
ot) {
4774 #if defined(__GNUC__) || defined(__clang__)
4817 event->modifier &= ~mod_test;
4829 event->modifier &= ~mod_test;
4841 switch (event->
type) {
4889 tablet_data.pressure = 1.0f;
4890 tablet_data.x_tilt = 0.0f;
4891 tablet_data.y_tilt = 0.0f;
4892 tablet_data.is_motion_absolute =
false;
4918 #ifdef WITH_INPUT_NDOF
4920 static void attach_ndof_data(
wmEvent *event,
const GHOST_TEventNDOFMotionData *ghost)
4922 wmNDOFMotionData *
data = MEM_cnew<wmNDOFMotionData>(
"Custom-data NDOF");
4924 const float ts =
U.ndof_sensitivity;
4925 const float rs =
U.ndof_orbit_sensitivity;
4937 data->dt = ghost->dt;
4952 if (!supports_window_position) {
4976 if (win_other && win_other != win) {
5006 event->prev_val = event_state->
prev_val = event_state->
val;
5007 event->prev_type = event_state->
prev_type = event_state->
type;
5033 if (event_last ==
nullptr) {
5050 tevent = *event_last;
5058 memset(&tevent, 0x0,
sizeof(tevent));
5078 if (event_last && event_last->
type == event->
type) {
5079 deltax += event_last->
xy[0] - event_last->
prev_xy[0];
5080 deltay += event_last->
xy[1] - event_last->
prev_xy[1];
5087 event_new->
prev_xy[0] = event_new->
xy[0] - deltax;
5088 event_new->
prev_xy[1] = event_new->
xy[1] - deltay;
5101 const bool is_keyboard,
5102 const bool check_double_click)
5113 event_state->
val =
event->val;
5114 event_state->
type =
event->type;
5119 event_state->
modifier =
event->modifier;
5121 event_state->
flag = (
event->flag & event_state_flag_mask);
5142 const bool check_double_click =
true;
5212 event = *event_state;
5225 event.prev_type =
event.type;
5226 event.prev_val =
event.val;
5233 if ((event_state->
type || event_state->
val) &&
5236 "Non-keyboard/mouse button found in 'win->eventstate->type = %d'",
5242 "Non-keyboard/mouse button found in 'win->eventstate->prev_type = %d'",
5306 event.xy[0] = event_state->
xy[0] = pd->
x;
5307 event.xy[1] = event_state->
xy[1] = pd->
y;
5365 event_other.
type =
event.type;
5366 event_other.
val =
event.val;
5367 event_other.
tablet =
event.tablet;
5400 "ghost on your platform is misbehaving, utf8 events on key up!");
5402 event.utf8_buf[0] =
'\0';
5406 event.utf8_buf[0] =
'\0';
5419 "ghost detected non-ASCII single byte character '%u', converting to utf8 "
5420 "('%.*s', length=%d)",
5429 "ghost detected an invalid unicode character '%d'",
5430 (
int)(
unsigned char)event.
utf8_buf[0]);
5431 event.utf8_buf[0] =
'\0';
5435 switch (event.
type) {
5472 event.keymodifier = 0;
5509 if (wheelData->
z > 0) {
5524 event.customdata = customdata;
5526 event.keymodifier = 0;
5532 #ifdef WITH_INPUT_NDOF
5533 case GHOST_kEventNDOFMotion: {
5536 attach_ndof_data(&event,
static_cast<const GHOST_TEventNDOFMotionData *
>(customdata));
5543 case GHOST_kEventNDOFButton: {
5544 GHOST_TEventNDOFButtonData *
e =
static_cast<GHOST_TEventNDOFButtonData *
>(customdata);
5548 switch (
e->action) {
5552 case GHOST_kRelease:
5560 event.customdata =
nullptr;
5581 #ifdef WITH_INPUT_IME
5584 win->
ime_data =
static_cast<wmIMEData *
>(customdata);
5585 win->
ime_data->is_ime_composing =
true;
5599 win->
ime_data->is_ime_composing =
false;
5613 #ifdef WITH_XR_OPENXR
5614 void wm_event_add_xrevent(
wmWindow *win, wmXrActionData *actiondata,
short val)
5623 event.customdata = actiondata;
5624 event.customdata_free =
true;
5690 memset(km_result, 0x0,
sizeof(*km_result));
5693 if (keymap !=
nullptr) {
5720 else if (handler_base->poll ==
nullptr || handler_base->poll(
CTX_wm_region(
C), event)) {
5725 for (
int km_index = 0; km_index < km_result.
keymaps_len; km_index++) {
5729 if (kmi !=
nullptr) {
5776 state->modifier =
event->modifier;
5777 state->space_type = space_type;
5778 state->region_type = region_type;
5788 const char *msg = cd->
text[button_index][type_index];
5801 ScrArea *area_statusbar =
nullptr;
5804 area_statusbar =
area;
5808 return area_statusbar;
5815 if (
area !=
nullptr) {
5824 if (area_statusbar ==
nullptr) {
5847 if (region ==
nullptr) {
5858 if (
area ==
nullptr) {
5917 for (
int button_index = 0; button_index < 3; button_index++) {
5918 cd->
text[button_index][0][0] =
'\0';
5919 cd->
text[button_index][1][0] =
'\0';
5933 for (
int data_index = 0; data_index <
ARRAY_SIZE(event_data); data_index++) {
5934 const int button_index = event_data[data_index].button_index;
5935 const int type_index = event_data[data_index].type_index;
5936 if (cd->
text[button_index][type_index][0] != 0) {
5940 test_event.
type = event_data[data_index].event_type;
5941 test_event.
val = event_data[data_index].event_value;
5945 for (
int handler_index = 0; handler_index <
ARRAY_SIZE(handlers); handler_index++) {
5947 C, wm, win, handlers[handler_index], &test_event);
5955 STRNCPY(cd->
text[button_index][type_index], name);
5959 if (memcmp(&cd_prev.
text, &cd->
text,
sizeof(cd_prev.
text)) != 0) {
5980 if (handler->
op !=
nullptr) {
5984 keymap = keymap_test;
5991 if (keymap ==
nullptr || keymap->
modal_items ==
nullptr) {
5998 if (!items[i].identifier[0]) {
6006 bool show_text =
true;
6016 if (kmi !=
nullptr) {
6028 int available_len =
sizeof(buf);
struct ScrArea * CTX_wm_area(const bContext *C)
struct Scene * CTX_data_scene(const bContext *C)
void CTX_store_set(bContext *C, bContextStore *store)
void CTX_wm_region_set(bContext *C, struct ARegion *region)
struct ARegion * CTX_wm_menu(const bContext *C)
void CTX_data_scene_set(bContext *C, struct Scene *scene)
void CTX_wm_menu_set(bContext *C, struct ARegion *menu)
void CTX_wm_gizmo_group_set(bContext *C, struct wmGizmoGroup *gzgroup)
struct wmWindowManager * CTX_wm_manager(const bContext *C)
bContextStore * CTX_store_copy(bContextStore *store)
void CTX_store_free(bContextStore *store)
struct ViewLayer * CTX_data_view_layer(const bContext *C)
struct bScreen * CTX_wm_screen(const bContext *C)
void CTX_wm_screen_set(bContext *C, struct bScreen *screen)
void CTX_wm_window_set(bContext *C, struct wmWindow *win)
struct ReportList * CTX_wm_reports(const bContext *C)
void CTX_wm_operator_poll_msg_clear(struct bContext *C)
struct ARegion * CTX_wm_region(const bContext *C)
struct Depsgraph * CTX_data_depsgraph_pointer(const bContext *C)
void CTX_wm_area_set(bContext *C, struct ScrArea *area)
void CTX_wm_operator_poll_msg_set(struct bContext *C, const char *msg)
struct Main * CTX_data_main(const bContext *C)
struct wmWindow * CTX_wm_window(const bContext *C)
bContextStore * CTX_store_get(bContext *C)
CustomData interface, see also DNA_customdata_types.h.
void CustomData_MeshMasks_update(CustomData_MeshMasks *mask_dst, const CustomData_MeshMasks *mask_src)
char * IDP_reprN(const struct IDProperty *prop, uint *r_len)
struct IDProperty * IDP_New(char type, const IDPropertyTemplate *val, const char *name) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
void IDP_ReplaceGroupInGroup(struct IDProperty *dest, const struct IDProperty *src) ATTR_NONNULL()
void IDP_FreeProperty(struct IDProperty *prop)
struct IDProperty * IDP_CopyProperty(const struct IDProperty *prop) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
void BKE_id_remapper_iter(const struct IDRemapper *id_remapper, IDRemapperIterFunction func, void *user_data)
void BKE_report_print_level_set(ReportList *reports, eReportType level)
void BKE_reports_clear(ReportList *reports)
void BKE_report(ReportList *reports, eReportType type, const char *message)
void BKE_reports_init(ReportList *reports, int flag)
void BKE_reports_print(ReportList *reports, eReportType level)
struct Depsgraph * BKE_scene_get_depsgraph(const struct Scene *scene, const struct ViewLayer *view_layer)
void BKE_scene_graph_update_tagged(struct Depsgraph *depsgraph, struct Main *bmain)
struct Depsgraph * BKE_scene_ensure_depsgraph(struct Main *bmain, struct Scene *scene, struct ViewLayer *view_layer)
struct ARegion * BKE_area_find_region_type(const struct ScrArea *area, int type)
void BKE_spacedata_draw_locks(bool set)
struct ARegion * BKE_area_find_region_active_win(struct ScrArea *area)
struct ARegion * BKE_area_find_region_xy(struct ScrArea *area, int regiontype, const int xy[2]) ATTR_NONNULL(3)
double BKE_sound_sync_scene(struct Scene *scene)
int BKE_sound_scene_playing(struct Scene *scene)
struct bScreen * BKE_workspace_layout_screen_get(const struct WorkSpaceLayout *layout) GETTER_ATTRS
#define BLI_assert_unreachable()
#define BLI_assert_msg(a, msg)
A dynamically sized string ADT.
DynStr * BLI_dynstr_new(void) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
char * BLI_dynstr_get_cstring(const DynStr *ds) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
void BLI_dynstr_vappendf(DynStr *__restrict ds, const char *__restrict format, va_list args) ATTR_PRINTF_FORMAT(2
void BLI_dynstr_free(DynStr *ds) ATTR_NONNULL()
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
void * BLI_pophead(ListBase *listbase) ATTR_NONNULL(1)
void BLI_addhead(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
#define LISTBASE_FOREACH(type, var, list)
#define LISTBASE_FOREACH_MUTABLE(type, var, list)
void BLI_insertlinkafter(struct ListBase *listbase, void *vprevlink, void *vnewlink) ATTR_NONNULL(1)
void void void BLI_movelisttolist(struct ListBase *dst, struct ListBase *src) ATTR_NONNULL(1
bool BLI_remlink_safe(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void void BLI_INLINE bool BLI_listbase_is_single(const struct ListBase *lb)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_remlink(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void * BLI_poptail(ListBase *listbase) ATTR_NONNULL(1)
int BLI_findindex(const struct ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE void copy_v2_v2_int(int r[2], const int a[2])
MINLINE int len_manhattan_v2v2_int(const int a[2], const int b[2]) ATTR_WARN_UNUSED_RESULT
MINLINE void mul_v3_v3fl(float r[3], const float a[3], float f)
bool BLI_rcti_isect_pt_v(const struct rcti *rect, const int xy[2])
void BLI_rcti_translate(struct rcti *rect, int x, int y)
#define STRNCPY(dst, src)
#define SNPRINTF(dst, format,...)
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL()
size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
int BLI_str_utf8_size(const char *p) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
size_t BLI_str_utf8_from_unicode(unsigned int c, char *outbuf, size_t outbuf_len) ATTR_NONNULL(2)
void BLI_timer_execute(void)
#define UNUSED_VARS_NDEBUG(...)
#define SET_FLAG_FROM_TEST(value, test, flag)
#define CTX_IFACE_(context, msgid)
#define CLOG_ERROR(clg_ref,...)
#define CLOG_WARN(clg_ref,...)
#define CLOG_INFO(clg_ref, level,...)
#define CLOG_STR_INFO_N(clg_ref, level, str)
struct Depsgraph Depsgraph
void DEG_graph_tag_on_visible_update(Depsgraph *depsgraph, bool do_time)
void DEG_make_active(struct Depsgraph *depsgraph)
struct Scene * DEG_get_evaluated_scene(const struct Depsgraph *graph)
These structs are the foundation for all linked lists in the library system.
@ SCE_WORKSPACE_TOOL_FALLBACK
@ AREA_FLAG_ACTIONZONES_UPDATE
#define RGN_TYPE_IS_HEADER_ANY(regiontype)
@ OP_IS_MODAL_CURSOR_REGION
@ OP_IS_MODAL_GRAB_CURSOR
#define OPERATOR_RETVAL_CHECK(ret)
@ TOOLREF_FLAG_FALLBACK_KEYMAP
void ED_assetlist_storage_id_remap(struct ID *id_old, struct ID *id_new)
struct ScrArea * ED_fileselect_handler_area_find(const struct wmWindow *win, const struct wmOperator *file_operator)
void ED_fileselect_set_params_from_userdef(struct SpaceFile *sfile)
void ED_fileselect_params_to_userdef(struct SpaceFile *sfile, const int temp_win_size[2], bool is_maximized)
void ED_fileselect_window_params_get(const struct wmWindow *win, int win_size[2], bool *is_maximized)
struct ScrArea * ED_fileselect_handler_area_find_any_with_op(const struct wmWindow *win)
void ED_info_stats_clear(struct wmWindowManager *wm, struct ViewLayer *view_layer)
void ED_preview_restart_queue_work(const struct bContext *C)
ARegion * ED_area_find_region_xy_visual(const ScrArea *area, int regiontype, const int event_xy[2])
void ED_area_tag_redraw(ScrArea *area)
void ED_screen_do_listen(struct bContext *C, struct wmNotifier *note)
void ED_screen_full_prevspace(struct bContext *C, ScrArea *area)
ScrArea * ED_screen_temp_space_open(struct bContext *C, const char *title, int x, int y, int sizex, int sizey, eSpace_Type space_type, int display_type, bool dialog)
#define ED_screen_areas_iter(win, screen, area_name)
void ED_area_status_text(ScrArea *area, const char *str)
void ED_area_prevspace(struct bContext *C, ScrArea *area)
void ED_region_do_listen(struct wmRegionListenerParams *params)
int ED_screen_animation_play(struct bContext *C, int sync, int mode)
void ED_update_for_newframe(struct Main *bmain, struct Depsgraph *depsgraph)
void ED_area_exit(struct bContext *C, struct ScrArea *area)
struct AZone * ED_area_azones_update(ScrArea *area, const int mouse_xy[2])
bool ED_workspace_layout_delete(struct WorkSpace *workspace, struct WorkSpaceLayout *layout_old, struct bContext *C) ATTR_NONNULL()
bScreen * ED_screen_animation_playing(const struct wmWindowManager *wm)
void ED_screen_set_active_region(struct bContext *C, struct wmWindow *win, const int xy[2])
void ED_region_tag_redraw(struct ARegion *region)
void ED_area_do_listen(struct wmSpaceTypeListenerParams *params)
void ED_area_type_hud_clear(struct wmWindowManager *wm, ScrArea *area_keep)
void ED_area_do_refresh(struct bContext *C, ScrArea *area)
bool ED_workspace_delete(struct WorkSpace *workspace, struct Main *bmain, struct bContext *C, struct wmWindowManager *wm) ATTR_NONNULL()
void ED_area_type_hud_ensure(struct bContext *C, struct ScrArea *area)
void ED_workspace_status_text(struct bContext *C, const char *str)
bool ED_screen_change(struct bContext *C, struct bScreen *screen)
Change the active screen.
bool ED_undo_is_state_valid(struct bContext *C)
void ED_undo_grouped_push_op(struct bContext *C, struct wmOperator *op)
void ED_undo_push_op(struct bContext *C, struct wmOperator *op)
void ED_spacedata_id_remap(struct ScrArea *area, struct SpaceLink *sl, const struct IDRemapper *mappings)
void ED_view3d_screen_datamask(const struct bContext *C, const struct Scene *scene, const struct bScreen *screen, struct CustomData_MeshMasks *r_cddata_masks)
GHOST C-API function and type declarations.
bool GHOST_SupportsWindowPosition(void)
@ GHOST_kTrackpadEventMagnify
@ GHOST_kTrackpadEventSmartMagnify
@ GHOST_kTrackpadEventRotate
@ GHOST_kTrackpadEventScroll
@ GHOST_kEventImeComposition
@ GHOST_kEventWindowDeactivate
@ GHOST_kEventImeCompositionStart
@ GHOST_kEventImeCompositionEnd
@ GHOST_kKeyNumpadAsterisk
@ GHOST_kButtonMaskButton4
@ GHOST_kButtonMaskButton7
@ GHOST_kButtonMaskButton6
@ GHOST_kButtonMaskButton5
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble t
Read Guarded memory(de)allocation.
Platform independent time functions.
#define RNA_STRUCT_BEGIN(sptr, prop)
uiBlock * UI_region_block_find_mouse_over(const struct ARegion *region, const int xy[2], bool only_clip)
void UI_popup_handlers_remove_all(struct bContext *C, struct ListBase *handlers)
void uiItemL(uiLayout *layout, const char *name, int icon)
void UI_popup_menu_reports(struct bContext *C, struct ReportList *reports) ATTR_NONNULL()
uiLayout * uiLayoutRow(uiLayout *layout, bool align)
#define UI_MAX_SHORTCUT_STR
bool uiTemplateEventFromKeymapItem(struct uiLayout *layout, const char *text, const struct wmKeyMapItem *kmi, bool text_fallback)
void() wmEventHandler_KeymapDynamicFn(wmWindowManager *wm, struct wmWindow *win, struct wmEventHandler_Keymap *handler, struct wmEventHandler_KeymapResult *km_result)
void(* wmUIHandlerRemoveFunc)(struct bContext *C, void *userdata)
@ WM_HANDLER_ACCEPT_DBL_CLICK
bool(* EventHandlerPoll)(const ARegion *region, const struct wmEvent *event)
int(* wmUIHandlerFunc)(struct bContext *C, const struct wmEvent *event, void *userdata)
@ WM_GIZMO_EVENT_HANDLE_ALL
@ WM_GIZMO_OPERATOR_TOOL_INIT
@ WM_GIZMOGROUPTYPE_TOOL_INIT
@ WM_GIZMOGROUPTYPE_TOOL_FALLBACK_KEYMAP
@ OPTYPE_DEPENDS_ON_CURSOR
#define WM_UI_HANDLER_CONTINUE
struct CLG_LogRef * WM_LOG_EVENTS
@ WM_EVENT_FORCE_DRAG_THRESHOLD
struct CLG_LogRef * WM_LOG_HANDLERS
#define WM_OP_CONTEXT_HAS_AREA(type)
#define ND_WORKSPACE_DELETE
#define ND_SPACE_INFO_REPORT
#define WM_EVENT_CURSOR_MOTION_THRESHOLD
@ WM_OP_INVOKE_REGION_WIN
@ WM_OP_EXEC_REGION_PREVIEW
@ WM_OP_INVOKE_REGION_PREVIEW
@ WM_OP_EXEC_REGION_CHANNELS
@ WM_OP_INVOKE_REGION_CHANNELS
struct CLG_LogRef * WM_LOG_OPERATORS
#define WM_UI_HANDLER_BREAK
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
static btDbvtVolume bounds(btDbvtNode **leaves, int count)
const Depsgraph * depsgraph
void(* MEM_freeN)(void *vmemh)
void *(* MEM_dupallocN)(const void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
#define SET(a, b, c, d, k, s, Ti)
static struct PartialUpdateUser * wrap(PartialUpdateUserImpl *user)
static void area(int d1, int d2, int e1, int e2, float weights[2])
SymEdge< T > * prev(const SymEdge< T > *se)
void RNA_pointer_create(ID *id, StructRNA *type, void *data, PointerRNA *r_ptr)
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
const char * RNA_property_identifier(const PropertyRNA *prop)
char * RNA_pointer_as_string_keywords(bContext *C, PointerRNA *ptr, const bool as_function, const bool all_args, const bool nested_args, const int max_prop_length)
PointerRNA RNA_property_pointer_get(PointerRNA *ptr, PropertyRNA *prop)
int RNA_property_flag(PropertyRNA *prop)
bool clip_gizmo_events_by_ui
struct wmGizmoMap * gizmo_map
struct ARegionType * type
CursorKeymapInfo_State state
GHOST_TTrackpadEventSubTypes subtype
struct wmTimer * reporttimer
struct CustomData_MeshMasks customdata_mask
struct ToolSettings * toolsettings
struct CustomData_MeshMasks customdata_mask_modal
struct wmTooltipState * tool_tip
struct ARegion * active_region
struct wmGizmoMap * gizmo_map
wmEventHandler_KeymapDynamicFn * keymap_fn
void(* post_fn)(wmKeyMap *keymap, wmKeyMapItem *kmi, void *user_data)
struct wmEventHandler_KeymapPost post
struct wmEventHandler_KeymapDynamic dynamic
struct bToolRef * keymap_tool
struct wmEventHandler_Op::@1207 context
wmUIHandlerRemoveFunc remove_fn
struct wmEventHandler_UI::@1206 context
wmUIHandlerFunc handle_fn
enum eWM_EventHandlerType type
short prev_press_keymodifier
uint8_t prev_press_modifier
eWM_GizmoFlagGroupTypeFlag flag
struct wmGizmoMapType_Params gzmap_params
struct wmGizmoGroupType * type
struct wmGizmoGroup * parent_gzgroup
struct wmKeyMapItem * next
bool(* poll_modal_item)(const struct wmOperator *op, int value)
const struct wmWindow * window
struct wmOperatorType * optype
struct PointerRNA * opptr
wmOperatorCallContext opcontext
struct wmOperatorTypeMacro * next
struct IDProperty * properties
int(* invoke)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
struct wmKeyMap * modalkeymap
int(* modal)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
bool(* poll)(struct bContext *) ATTR_WARN_UNUSED_RESULT
void(* cancel)(struct bContext *, struct wmOperator *)
const char * translation_context
void(* ui)(struct bContext *, struct wmOperator *)
bool(* check)(struct bContext *, struct wmOperator *)
bool(* pyop_poll)(struct bContext *, struct wmOperatorType *ot) ATTR_WARN_UNUSED_RESULT
int(* exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports
struct wmOperatorType * type
struct wmPaintCursor * next
bool(* poll)(struct bContext *C)
struct wmMsgBus * message_bus
struct ReportList reports
struct wmWindow * winactive
struct wmKeyConfig * userconf
short pie_event_type_lock
struct wmEvent * eventstate
struct wmEvent * event_last_handled
char event_queue_check_click
struct wmIMEData * ime_data
char event_queue_check_drag_handled
void * cursor_keymap_status
char event_queue_check_drag
double PIL_check_seconds_timer(void)
void wm_operator_register(bContext *C, wmOperator *op)
void WM_operator_free(wmOperator *op)
void WM_cursor_modal_set(wmWindow *win, int val)
bool wm_cursor_arrow_move(wmWindow *win, const wmEvent *event)
void WM_cursor_grab_enable(wmWindow *win, int wrap, bool hide, int bounds[4])
void WM_cursor_modal_restore(wmWindow *win)
void WM_cursor_grab_disable(wmWindow *win, const int mouse_ungrab_xy[2])
void wm_drop_prepare(bContext *C, wmDrag *drag, wmDropBox *drop)
void wm_drop_end(bContext *C, wmDrag *UNUSED(drag), wmDropBox *UNUSED(drop))
wmOperatorCallContext wm_drop_operator_context_get(const wmDropBox *UNUSED(drop))
void wm_drags_check_ops(bContext *C, const wmEvent *event)
void wm_drags_exit(wmWindowManager *wm, wmWindow *win)
void WM_drag_free_list(ListBase *lb)
static ListBase dropboxes
bool WM_region_use_viewport(ScrArea *area, ARegion *region)
void WM_paint_cursor_tag_redraw(wmWindow *win, ARegion *UNUSED(region))
int WM_event_drag_direction(const wmEvent *event)
void WM_event_print(const wmEvent *event)
bool WM_event_drag_test(const wmEvent *event, const int prev_xy[2])
int WM_userdef_event_map(int kmitype)
float wm_pressure_curve(float pressure)
int WM_operator_repeat_last(bContext *C, wmOperator *op)
bool WM_operator_poll_context(bContext *C, wmOperatorType *ot, short context)
bool WM_window_modal_keymap_status_draw(bContext *C, wmWindow *win, uiLayout *layout)
constexpr wmTabletData wm_event_tablet_data_default()
wmEventHandler_UI * WM_event_add_ui_handler(const bContext *C, ListBase *handlers, wmUIHandlerFunc handle_fn, wmUIHandlerRemoveFunc remove_fn, void *user_data, const char flag)
static int wm_operator_exec(bContext *C, wmOperator *op, const bool repeat, const bool store)
static void wm_event_custom_free(wmEvent *event)
static int wm_handler_fileselect_call(bContext *C, ListBase *handlers, wmEventHandler_Op *handler, const wmEvent *event)
wmEventHandler_Op * WM_event_add_modal_handler(bContext *C, wmOperator *op)
static ScrArea * area_event_inside(bContext *C, const int xy[2])
static void wm_handler_op_context_get_if_valid(bContext *C, wmEventHandler_Op *handler, const wmEvent *event, ScrArea **r_area, ARegion **r_region)
wmEventHandler_Dropbox * WM_event_add_dropbox_handler(ListBase *handlers, ListBase *dropboxes)
static const char * keymap_handler_log_kmi_event_str(const wmKeyMapItem *kmi, char *buf, size_t buf_maxlen)
void WM_menu_name_call(bContext *C, const char *menu_name, short context)
static wmKeyMapItem * wm_eventmatch_modal_keymap_items(const wmKeyMap *keymap, wmOperator *op, const wmEvent *event)
static void wm_eventemulation(wmEvent *event, bool test_only)
static bool wm_operator_register_check(wmWindowManager *wm, wmOperatorType *ot)
static wmEvent * wm_event_add_mousemove_to_head(wmWindow *win)
wmKeyMapItem * WM_event_match_keymap_item_from_handlers(bContext *C, wmWindowManager *wm, wmWindow *win, ListBase *handlers, const wmEvent *event)
void WM_event_remove_keymap_handler(ListBase *handlers, wmKeyMap *keymap)
void wm_event_do_handlers(bContext *C)
static void wm_main_remap_msgbus_notify(ID *old_id, ID *new_id, void *user_data)
bool WM_operator_poll(bContext *C, wmOperatorType *ot)
wmOperator * WM_operator_find_modal_by_type(wmWindow *win, const wmOperatorType *ot)
static void wm_event_state_update_and_click_set(wmEvent *event, wmEvent *event_state, const GHOST_TEventType type)
void WM_window_status_area_tag_redraw(wmWindow *win)
void WM_main_add_notifier(unsigned int type, void *reference)
void WM_event_add_fileselect(bContext *C, wmOperator *op)
ScrArea * WM_window_status_area_find(wmWindow *win, bScreen *screen)
static void wm_event_state_update_and_click_set_ex(wmEvent *event, wmEvent *event_state, const bool is_keyboard, const bool check_double_click)
static void wm_event_modalkeymap_end(wmEvent *event, const wmEvent_ModalMapStore *event_backup)
static wmEvent * wm_event_add_mousemove(wmWindow *win, const wmEvent *event)
static int convert_key(GHOST_TKey key)
wmEvent * wm_event_add(wmWindow *win, const wmEvent *event_to_add)
static wmWindow * wm_event_find_fileselect_root_window_from_context(const bContext *C)
static bool wm_event_is_ignorable_key_press(const wmWindow *win, const wmEvent &event)
void wm_event_do_refresh_wm_and_depsgraph(bContext *C)
static int wm_handlers_do_keymap_with_gizmo_handler(bContext *C, wmEvent *event, ListBase *handlers, wmEventHandler_Gizmo *handler, wmGizmoGroup *gzgroup, wmKeyMap *keymap, const bool do_debug_handler, bool *r_keymap_poll)
void WM_report_banners_cancel(Main *bmain)
bool WM_operator_name_poll(bContext *C, const char *opstring)
static int wm_handlers_do_intern(bContext *C, wmWindow *win, wmEvent *event, ListBase *handlers)
static void ui_handler_wait_for_input_remove(bContext *C, void *userdata)
void WM_event_remove_area_handler(ListBase *handlers, void *area)
static const char * keymap_handler_log_kmi_op_str(bContext *C, const wmKeyMapItem *kmi, char *buf, size_t buf_maxlen)
static bool handler_region_v2d_mask_test(const ARegion *region, const wmEvent *event)
static int wm_handlers_do(bContext *C, wmEvent *event, ListBase *handlers)
static void wm_region_tag_draw_on_gizmo_delay_refresh_for_tweak(wmWindow *win)
static int wm_action_not_handled(int action)
void wm_event_do_depsgraph(bContext *C, bool is_after_open_file)
void WM_event_add_notifier_ex(wmWindowManager *wm, const wmWindow *win, uint type, void *reference)
const char * WM_window_cursor_keymap_status_get(const wmWindow *win, int button_index, int type_index)
void WM_window_cursor_keymap_status_refresh(bContext *C, wmWindow *win)
static void wm_event_get_keymap_from_toolsystem_ex(wmWindowManager *wm, wmWindow *win, wmEventHandler_Keymap *handler, wmEventHandler_KeymapResult *km_result, const bool with_gizmos)
wmKeyMapItem * WM_event_match_keymap_item(bContext *C, wmKeyMap *keymap, const wmEvent *event)
void WM_report(eReportType type, const char *message)
static void wm_event_prev_values_set(wmEvent *event, wmEvent *event_state)
void wm_tablet_data_from_ghost(const GHOST_TabletData *tablet_data, wmTabletData *wmtab)
void WM_report_banner_show(void)
static int ui_handler_wait_for_input(bContext *C, const wmEvent *event, void *userdata)
void WM_event_get_keymaps_from_handler(wmWindowManager *wm, wmWindow *win, wmEventHandler_Keymap *handler, wmEventHandler_KeymapResult *km_result)
static wmOperator * wm_operator_create(wmWindowManager *wm, wmOperatorType *ot, PointerRNA *properties, ReportList *reports)
void WM_event_free_ui_handler_all(bContext *C, ListBase *handlers, wmUIHandlerFunc handle_fn, wmUIHandlerRemoveFunc remove_fn)
static int wm_handlers_do_keymap_with_keymap_handler(bContext *C, wmEvent *event, ListBase *handlers, wmEventHandler_Keymap *handler, wmKeyMap *keymap, const bool do_debug_handler)
static int wm_event_do_region_handlers(bContext *C, wmEvent *event, ARegion *region)
int WM_operator_repeat(bContext *C, wmOperator *op)
void wm_event_free_all(wmWindow *win)
void WM_event_get_keymap_from_toolsystem(wmWindowManager *wm, wmWindow *win, wmEventHandler_Keymap *handler, wmEventHandler_KeymapResult *km_result)
void WM_event_tablet_data_default_set(wmTabletData *tablet_data)
static void wm_event_cursor_store(CursorKeymapInfo_State *state, const wmEvent *event, short space_type, short region_type, const bToolRef *tref)
static void wm_region_mouse_co(bContext *C, wmEvent *event)
int WM_operator_call_notest(bContext *C, wmOperator *op)
static int wm_event_drag_and_drop_test(wmWindowManager *wm, wmWindow *win, wmEvent *event)
bool WM_operator_check_ui_empty(wmOperatorType *ot)
int WM_operator_name_call_ptr(bContext *C, wmOperatorType *ot, wmOperatorCallContext context, PointerRNA *properties, const wmEvent *event)
void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, void *customdata)
wmEvent * WM_event_add_simulate(wmWindow *win, const wmEvent *event_to_add)
static void wm_handler_op_context(bContext *C, wmEventHandler_Op *handler, const wmEvent *event)
void WM_event_modal_handler_region_replace(wmWindow *win, const ARegion *old_region, ARegion *new_region)
static bool wm_event_pie_filter(wmWindow *win, const wmEvent *event)
wmEvent * wm_event_add_ex(wmWindow *win, const wmEvent *event_to_add, const wmEvent *event_to_add_after)
static int wm_event_do_handlers_area_regions(bContext *C, wmEvent *event, ScrArea *area)
static bool wm_event_is_double_click(const wmEvent *event)
static wmWindow * wm_event_cursor_other_windows(wmWindowManager *wm, wmWindow *win, wmEvent *event)
static void wm_event_free_last(wmWindow *win)
void WM_operator_region_active_win_set(bContext *C)
void WM_reportf(eReportType type, const char *format,...)
static ARegion * region_event_inside(bContext *C, const int xy[2])
wmEventHandler_Keymap * WM_event_add_keymap_handler_dynamic(ListBase *handlers, wmEventHandler_KeymapDynamicFn *keymap_fn, void *user_data)
wmEventHandler_Keymap * WM_event_add_keymap_handler_v2d_mask(ListBase *handlers, wmKeyMap *keymap)
static bool wm_operator_check_locked_interface(bContext *C, wmOperatorType *ot)
static void wm_operator_finished(bContext *C, wmOperator *op, const bool repeat, const bool store)
static bool wm_event_is_same_key_press(const wmEvent &event_a, const wmEvent &event_b)
static void wm_paintcursor_tag(bContext *C, wmPaintCursor *pc, ARegion *region)
void WM_main_remap_editor_id_reference(const IDRemapper *mappings)
static void wm_event_handler_ui_cancel(bContext *C)
static int wm_operator_exec_notest(bContext *C, wmOperator *op)
void WM_operator_name_call_ptr_with_depends_on_cursor(bContext *C, wmOperatorType *ot, wmOperatorCallContext opcontext, PointerRNA *properties, const wmEvent *event, const char *drawstr)
static const char * keymap_handler_log_action_str(const int action)
static void wm_add_reports(ReportList *reports)
void WM_event_remove_ui_handler(ListBase *handlers, wmUIHandlerFunc handle_fn, wmUIHandlerRemoveFunc remove_fn, void *user_data, const bool postpone)
int WM_operator_call(bContext *C, wmOperator *op)
static int wm_operator_invoke(bContext *C, wmOperatorType *ot, const wmEvent *event, PointerRNA *properties, ReportList *reports, const bool poll_only, bool use_last_properties)
bool WM_operator_repeat_check(const bContext *UNUSED(C), wmOperator *op)
wmEventHandler_Keymap * WM_event_add_keymap_handler_priority(ListBase *handlers, wmKeyMap *keymap, int UNUSED(priority))
static void wm_notifier_clear(wmNotifier *note)
int WM_operator_name_call_with_properties(bContext *C, const char *opstring, wmOperatorCallContext context, IDProperty *properties, const wmEvent *event)
BLI_INLINE void wm_event_handler_return_value_check(const bContext *C, const wmEvent *event, const int action)
void WM_event_modal_handler_area_replace(wmWindow *win, const ScrArea *old_area, ScrArea *new_area)
bool WM_operator_is_repeat(const bContext *C, const wmOperator *op)
static void wm_operator_reports(bContext *C, wmOperator *op, int retval, bool caller_owns_reports)
static void wm_event_free_last_handled(wmWindow *win, wmEvent *event)
wmEventHandler_Keymap * WM_event_add_keymap_handler_poll(ListBase *handlers, wmKeyMap *keymap, EventHandlerPoll poll)
static int wm_handler_fileselect_do(bContext *C, ListBase *handlers, wmEventHandler_Op *handler, int val)
static bool wm_test_duplicate_notifier(const wmWindowManager *wm, uint type, void *reference)
void WM_main_remove_notifier_reference(const void *reference)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
int WM_operator_name_call(bContext *C, const char *opstring, wmOperatorCallContext context, PointerRNA *properties, const wmEvent *event)
static void wm_event_execute_timers(bContext *C)
void wm_event_handler_ui_cancel_ex(bContext *C, wmWindow *win, ARegion *region, bool reactivate_button)
static int wm_handler_ui_call(bContext *C, wmEventHandler_UI *handler, const wmEvent *event, int always_pass)
static void wm_paintcursor_test(bContext *C, const wmEvent *event)
void wm_event_free(wmEvent *event)
static bool event_or_prev_in_rect(const wmEvent *event, const rcti *rect)
static int wm_handlers_do_gizmo_handler(bContext *C, wmWindowManager *wm, wmEventHandler_Gizmo *handler, wmEvent *event, ListBase *handlers, const bool do_debug_handler)
void WM_event_set_keymap_handler_post_callback(wmEventHandler_Keymap *handler, void(keymap_tag)(wmKeyMap *keymap, wmKeyMapItem *kmi, void *user_data), void *user_data)
static bool wm_eventmatch(const wmEvent *winevent, const wmKeyMapItem *kmi)
static int wm_operator_call_internal(bContext *C, wmOperatorType *ot, PointerRNA *properties, ReportList *reports, const wmOperatorCallContext context, const bool poll_only, const wmEvent *event)
static void wm_operator_free_for_fileselect(wmOperator *file_operator)
static void wm_event_prev_click_set(wmEvent *event_state)
wmEventHandler_Keymap * WM_event_add_keymap_handler(ListBase *handlers, wmKeyMap *keymap)
void WM_event_fileselect_event(wmWindowManager *wm, void *ophandle, int eventval)
void wm_event_free_handler(wmEventHandler *handler)
static void wm_event_modalkeymap_begin(const bContext *C, wmOperator *op, wmEvent *event, wmEvent_ModalMapStore *event_backup)
void wm_event_do_notifiers(bContext *C)
int WM_operator_call_py(bContext *C, wmOperatorType *ot, wmOperatorCallContext context, PointerRNA *properties, ReportList *reports, const bool is_undo)
static int wm_handler_operator_call(bContext *C, ListBase *handlers, wmEventHandler *handler_base, wmEvent *event, PointerRNA *properties, const char *kmi_idname)
static void wm_main_remap_assetlist(ID *old_id, ID *new_id, void *UNUSED(user_data))
static void wm_event_free_and_remove_from_queue_if_valid(wmEvent *event)
static void wm_event_custom_clear(wmEvent *event)
void WM_event_get_keymap_from_toolsystem_with_gizmos(wmWindowManager *wm, wmWindow *win, wmEventHandler_Keymap *handler, wmEventHandler_KeymapResult *km_result)
void WM_set_locked_interface(wmWindowManager *wm, bool lock)
int WM_operator_call_ex(bContext *C, wmOperator *op, const bool store)
static int wm_event_always_pass(const wmEvent *event)
static wmEvent * wm_event_add_trackpad(wmWindow *win, const wmEvent *event, int deltax, int deltay)
void wm_event_init_from_window(wmWindow *win, wmEvent *event)
void WM_event_remove_handlers(bContext *C, ListBase *handlers)
void WM_event_add_mousemove(wmWindow *win)
static bool wm_event_inside_rect(const wmEvent *event, const rcti *rect)
#define WM_HANDLER_HANDLED
@ WM_HANDLER_TYPE_DROPBOX
#define WM_HANDLER_CONTINUE
#define ISMOUSE_BUTTON(event_type)
#define ISKEYBOARD_OR_BUTTON(event_type)
#define ISMOUSE_MOTION(event_type)
#define ISMOUSE_WHEEL(event_type)
#define ISKEYMODIFIER(event_type)
@ EVT_FILESELECT_FULL_OPEN
@ EVT_FILESELECT_EXTERNAL_CANCEL
#define ISTIMER(event_type)
#define ISMOUSE_GESTURE(event_type)
#define ISKEYBOARD(event_type)
void wm_test_autorun_warning(bContext *C)
void WM_gizmogroup_ensure_init(const bContext *C, wmGizmoGroup *gzgroup)
bool WM_gizmo_group_type_ensure_ptr_ex(wmGizmoGroupType *gzgt, wmGizmoMapType *gzmap_type)
bool wm_gizmogroup_is_any_selected(const wmGizmoGroup *gzgroup)
wmGizmoGroup * WM_gizmomaptype_group_init_runtime_with_region(wmGizmoMapType *gzmap_type, wmGizmoGroupType *gzgt, ARegion *region)
wmGizmoGroupType * WM_gizmogrouptype_find(const char *idname, bool quiet)
wmGizmoMapType * WM_gizmomaptype_ensure(const struct wmGizmoMapType_Params *gzmap_params)
bool WM_gizmomap_is_any_selected(const wmGizmoMap *gzmap)
wmGizmo * wm_gizmomap_highlight_get(wmGizmoMap *gzmap)
void wm_gizmomaps_handled_modal_update(bContext *C, wmEvent *event, wmEventHandler_Op *handler)
bool wm_gizmomap_highlight_set(wmGizmoMap *gzmap, const bContext *C, wmGizmo *gz, int part)
struct ARegion * WM_gizmomap_tooltip_init(struct bContext *C, struct ARegion *region, int *UNUSED(r_pass), double *UNUSED(pass_delay), bool *r_exit_on_event)
bool WM_gizmomap_tag_delay_refresh_for_tweak_check(wmGizmoMap *gzmap)
void WM_gizmomap_tag_refresh(wmGizmoMap *gzmap)
wmGizmoGroup * WM_gizmomap_group_find(struct wmGizmoMap *gzmap, const char *idname)
wmGizmo * wm_gizmomap_highlight_find(wmGizmoMap *gzmap, bContext *C, const wmEvent *event, int *r_part)
void WM_gizmoconfig_update(struct Main *bmain)
const ListBase * WM_gizmomap_group_list(wmGizmoMap *gzmap)
wmGizmo * wm_gizmomap_modal_get(wmGizmoMap *gzmap)
void wm_gizmomap_handler_context_gizmo(bContext *UNUSED(C), wmEventHandler_Gizmo *UNUSED(handler))
void WM_keyconfig_update(wmWindowManager *wm)
int WM_keymap_item_to_string(const wmKeyMapItem *kmi, const bool compact, char *result, const int result_len)
wmKeyMap * WM_keymap_active(const wmWindowManager *wm, wmKeyMap *keymap)
bool WM_keymap_poll(bContext *C, wmKeyMap *keymap)
wmKeyMap * WM_keymap_list_find_spaceid_or_empty(ListBase *lb, const char *idname, int spaceid, int regionid)
char * WM_modalkeymap_operator_items_to_string_buf(wmOperatorType *ot, const int propvalue, const bool compact, const int max_len, int *r_available_len, char **r_result)
void WM_msg_id_update(struct wmMsgBus *mbus, struct ID *id_src, struct ID *id_dst)
void WM_msg_id_remove(struct wmMsgBus *mbus, const struct ID *id)
void WM_msgbus_handle(struct wmMsgBus *mbus, struct bContext *C)
wmOperatorType * WM_operatortype_find(const char *idname, bool quiet)
const char * WM_operatortype_name(struct wmOperatorType *ot, struct PointerRNA *properties)
char * WM_operator_pystring(bContext *C, wmOperator *op, const bool all_args, const bool macro_args)
bool WM_operator_last_properties_store(wmOperator *op)
bool WM_operator_last_properties_init(wmOperator *op)
void WM_operator_properties_create_ptr(PointerRNA *ptr, wmOperatorType *ot)
void WM_operator_properties_free(PointerRNA *ptr)
void WM_operator_properties_sanitize(PointerRNA *ptr, const bool no_context)
wmOperator * WM_operator_last_redo(const bContext *C)
void wm_stereo3d_mouse_offset_apply(wmWindow *win, int r_mouse_xy[2])
void wm_surfaces_do_depsgraph(bContext *C)
wmWindow * WM_window_find_under_cursor(wmWindow *win, const int mval[2], int r_mval[2])
void WM_event_remove_timer(wmWindowManager *wm, wmWindow *UNUSED(win), wmTimer *timer)
int WM_window_pixels_y(const wmWindow *win)
void WM_window_set_active_workspace(bContext *C, wmWindow *win, WorkSpace *workspace)
void wm_window_title(wmWindowManager *wm, wmWindow *win)
WorkSpaceLayout * WM_window_get_active_layout(const wmWindow *win)
void wm_window_close(bContext *C, wmWindowManager *wm, wmWindow *win)
bScreen * WM_window_get_active_screen(const wmWindow *win)
void wm_window_make_drawable(wmWindowManager *wm, wmWindow *win)
ViewLayer * WM_window_get_active_view_layer(const wmWindow *win)
WorkSpace * WM_window_get_active_workspace(const wmWindow *win)
bool WM_window_is_temp_screen(const wmWindow *win)
int WM_window_pixels_x(const wmWindow *win)
Scene * WM_window_get_active_scene(const wmWindow *win)
wmTimer * WM_event_add_timer(wmWindowManager *wm, wmWindow *win, int event_type, double timestep)
void wm_cursor_position_get(wmWindow *win, int *r_x, int *r_y)
ScrArea * WM_xr_session_area_get(const wmXrData *xr)