Blender  V3.3
WM_types.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2007 Blender Foundation. All rights reserved. */
3 
93 #pragma once
94 
95 struct ID;
96 struct ImBuf;
97 struct bContext;
98 struct wmDrag;
99 struct wmDropBox;
100 struct wmEvent;
101 struct wmOperator;
102 struct wmWindowManager;
103 
104 #include "BLI_compiler_attrs.h"
105 #include "BLI_utildefines.h"
106 #include "DNA_listBase.h"
107 #include "DNA_uuid_types.h"
108 #include "DNA_vec_types.h"
109 #include "DNA_xr_types.h"
110 #include "RNA_types.h"
111 
112 /* exported types for WM */
113 #include "gizmo/WM_gizmo_types.h"
114 #include "wm_cursors.h"
115 #include "wm_event_types.h"
116 
117 /* Include external gizmo API's */
118 #include "gizmo/WM_gizmo_api.h"
119 
120 #ifdef __cplusplus
121 extern "C" {
122 #endif
123 
125 
126 typedef struct wmGenericUserData {
127  void *data;
130  bool use_free;
132 
133 typedef void (*wmGenericCallbackFn)(struct bContext *C, void *user_data);
134 
135 typedef struct wmGenericCallback {
137  void *user_data;
140 
141 /* ************** wmOperatorType ************************ */
142 
144 enum {
146  OPTYPE_REGISTER = (1 << 0),
148  OPTYPE_UNDO = (1 << 1),
150  OPTYPE_BLOCKING = (1 << 2),
151  OPTYPE_MACRO = (1 << 3),
152 
159 
161  OPTYPE_PRESET = (1 << 7),
162 
168  OPTYPE_INTERNAL = (1 << 8),
169 
171  OPTYPE_LOCK_BYPASS = (1 << 9),
173  OPTYPE_UNDO_GROUPED = (1 << 10),
174 
185 };
186 
188 enum {
193 };
194 
199 typedef enum wmOperatorCallContext {
200  /* if there's invoke, call it, otherwise exec */
207  /* only call exec */
215 
216 #define WM_OP_CONTEXT_HAS_AREA(type) \
217  (CHECK_TYPE_INLINE(type, wmOperatorCallContext), \
218  !ELEM(type, WM_OP_INVOKE_SCREEN, WM_OP_EXEC_SCREEN))
219 #define WM_OP_CONTEXT_HAS_REGION(type) \
220  (WM_OP_CONTEXT_HAS_AREA(type) && !ELEM(type, WM_OP_INVOKE_AREA, WM_OP_EXEC_AREA))
221 
222 /* property tags for RNA_OperatorProperties */
223 typedef enum eOperatorPropTags {
226 #define OP_PROP_TAG_ADVANCED ((eOperatorPropTags)OP_PROP_TAG_ADVANCED)
227 
228 /* -------------------------------------------------------------------- */
237 enum {
238  KM_SHIFT = (1 << 0),
239  KM_CTRL = (1 << 1),
240  KM_ALT = (1 << 2),
242  KM_OSKEY = (1 << 3),
243 
244  /* Used for key-map item creation function arguments. */
245  KM_SHIFT_ANY = (1 << 4),
246  KM_CTRL_ANY = (1 << 5),
247  KM_ALT_ANY = (1 << 6),
248  KM_OSKEY_ANY = (1 << 7),
249 };
250 
251 /* `KM_MOD_*` flags for #wmKeyMapItem and `wmEvent.alt/shift/oskey/ctrl`. */
252 /* Note that #KM_ANY and #KM_NOTHING are used with these defines too. */
253 #define KM_MOD_HELD 1
254 
259 enum {
261 };
262 
264 enum {
265  KM_ANY = -1,
267  KM_PRESS = 1,
269  KM_CLICK = 3,
276 };
277 
283 enum {
292 };
293 
296 /* ************** UI Handler ***************** */
297 
298 #define WM_UI_HANDLER_CONTINUE 0
299 #define WM_UI_HANDLER_BREAK 1
300 
301 /* ************** Notifiers ****************** */
302 
303 typedef struct wmNotifier {
304  struct wmNotifier *next, *prev;
305 
306  const struct wmWindow *window;
307 
308  unsigned int category, data, subtype, action;
309 
310  void *reference;
311 
313 
314 /* 4 levels
315  *
316  * 0xFF000000; category
317  * 0x00FF0000; data
318  * 0x0000FF00; data subtype (unused?)
319  * 0x000000FF; action
320  */
321 
322 /* category */
323 #define NOTE_CATEGORY 0xFF000000
324 #define NC_WM (1 << 24)
325 #define NC_WINDOW (2 << 24)
326 #define NC_WORKSPACE (3 << 24)
327 #define NC_SCREEN (4 << 24)
328 #define NC_SCENE (5 << 24)
329 #define NC_OBJECT (6 << 24)
330 #define NC_MATERIAL (7 << 24)
331 #define NC_TEXTURE (8 << 24)
332 #define NC_LAMP (9 << 24)
333 #define NC_GROUP (10 << 24)
334 #define NC_IMAGE (11 << 24)
335 #define NC_BRUSH (12 << 24)
336 #define NC_TEXT (13 << 24)
337 #define NC_WORLD (14 << 24)
338 #define NC_ANIMATION (15 << 24)
339 /* When passing a space as reference data with this (e.g. `WM_event_add_notifier(..., space)`),
340  * the notifier will only be sent to this space. That avoids unnecessary updates for unrelated
341  * spaces. */
342 #define NC_SPACE (16 << 24)
343 #define NC_GEOM (17 << 24)
344 #define NC_NODE (18 << 24)
345 #define NC_ID (19 << 24)
346 #define NC_PAINTCURVE (20 << 24)
347 #define NC_MOVIECLIP (21 << 24)
348 #define NC_MASK (22 << 24)
349 #define NC_GPENCIL (23 << 24)
350 #define NC_LINESTYLE (24 << 24)
351 #define NC_CAMERA (25 << 24)
352 #define NC_LIGHTPROBE (26 << 24)
353 /* Changes to asset data in the current .blend. */
354 #define NC_ASSET (27 << 24)
355 
356 /* data type, 256 entries is enough, it can overlap */
357 #define NOTE_DATA 0x00FF0000
358 
359 /* NC_WM windowmanager */
360 #define ND_FILEREAD (1 << 16)
361 #define ND_FILESAVE (2 << 16)
362 #define ND_DATACHANGED (3 << 16)
363 #define ND_HISTORY (4 << 16)
364 #define ND_JOB (5 << 16)
365 #define ND_UNDO (6 << 16)
366 #define ND_XR_DATA_CHANGED (7 << 16)
367 #define ND_LIB_OVERRIDE_CHANGED (8 << 16)
368 
369 /* NC_SCREEN */
370 #define ND_LAYOUTBROWSE (1 << 16)
371 #define ND_LAYOUTDELETE (2 << 16)
372 #define ND_ANIMPLAY (4 << 16)
373 #define ND_GPENCIL (5 << 16)
374 #define ND_LAYOUTSET (6 << 16)
375 #define ND_SKETCH (7 << 16)
376 #define ND_WORKSPACE_SET (8 << 16)
377 #define ND_WORKSPACE_DELETE (9 << 16)
378 
379 /* NC_SCENE Scene */
380 #define ND_SCENEBROWSE (1 << 16)
381 #define ND_MARKERS (2 << 16)
382 #define ND_FRAME (3 << 16)
383 #define ND_RENDER_OPTIONS (4 << 16)
384 #define ND_NODES (5 << 16)
385 #define ND_SEQUENCER (6 << 16)
386 /* NOTE: If an object was added, removed, merged/joined, ..., it is not enough to notify with
387  * this. This affects the layer so also send a layer change notifier (e.g. ND_LAYER_CONTENT)! */
388 #define ND_OB_ACTIVE (7 << 16)
389 /* See comment on ND_OB_ACTIVE. */
390 #define ND_OB_SELECT (8 << 16)
391 #define ND_OB_VISIBLE (9 << 16)
392 #define ND_OB_RENDER (10 << 16)
393 #define ND_MODE (11 << 16)
394 #define ND_RENDER_RESULT (12 << 16)
395 #define ND_COMPO_RESULT (13 << 16)
396 #define ND_KEYINGSET (14 << 16)
397 #define ND_TOOLSETTINGS (15 << 16)
398 #define ND_LAYER (16 << 16)
399 #define ND_FRAME_RANGE (17 << 16)
400 #define ND_TRANSFORM_DONE (18 << 16)
401 #define ND_WORLD (92 << 16)
402 #define ND_LAYER_CONTENT (101 << 16)
403 
404 /* NC_OBJECT Object */
405 #define ND_TRANSFORM (18 << 16)
406 #define ND_OB_SHADING (19 << 16)
407 #define ND_POSE (20 << 16)
408 #define ND_BONE_ACTIVE (21 << 16)
409 #define ND_BONE_SELECT (22 << 16)
410 #define ND_DRAW (23 << 16)
411 #define ND_MODIFIER (24 << 16)
412 #define ND_KEYS (25 << 16)
413 #define ND_CONSTRAINT (26 << 16)
414 #define ND_PARTICLE (27 << 16)
415 #define ND_POINTCACHE (28 << 16)
416 #define ND_PARENT (29 << 16)
417 #define ND_LOD (30 << 16)
418 #define ND_DRAW_RENDER_VIEWPORT \
419  (31 << 16) /* for camera & sequencer viewport update, also /w NC_SCENE */
420 #define ND_SHADERFX (32 << 16)
421 /* For updating motion paths in 3dview. */
422 #define ND_DRAW_ANIMVIZ (33 << 16)
423 
424 /* NC_MATERIAL Material */
425 #define ND_SHADING (30 << 16)
426 #define ND_SHADING_DRAW (31 << 16)
427 #define ND_SHADING_LINKS (32 << 16)
428 #define ND_SHADING_PREVIEW (33 << 16)
429 
430 /* NC_LAMP Light */
431 #define ND_LIGHTING (40 << 16)
432 #define ND_LIGHTING_DRAW (41 << 16)
433 
434 /* NC_WORLD World */
435 #define ND_WORLD_DRAW (45 << 16)
436 
437 /* NC_TEXT Text */
438 #define ND_CURSOR (50 << 16)
439 #define ND_DISPLAY (51 << 16)
440 
441 /* NC_ANIMATION Animato */
442 #define ND_KEYFRAME (70 << 16)
443 #define ND_KEYFRAME_PROP (71 << 16)
444 #define ND_ANIMCHAN (72 << 16)
445 #define ND_NLA (73 << 16)
446 #define ND_NLA_ACTCHANGE (74 << 16)
447 #define ND_FCURVES_ORDER (75 << 16)
448 #define ND_NLA_ORDER (76 << 16)
449 
450 /* NC_GPENCIL */
451 #define ND_GPENCIL_EDITMODE (85 << 16)
452 
453 /* NC_GEOM Geometry */
454 /* Mesh, Curve, MetaBall, Armature, etc. */
455 #define ND_SELECT (90 << 16)
456 #define ND_DATA (91 << 16)
457 #define ND_VERTEX_GROUP (92 << 16)
458 
459 /* NC_NODE Nodes */
460 
461 /* NC_SPACE */
462 #define ND_SPACE_CONSOLE (1 << 16) /* general redraw */
463 #define ND_SPACE_INFO_REPORT (2 << 16) /* update for reports, could specify type */
464 #define ND_SPACE_INFO (3 << 16)
465 #define ND_SPACE_IMAGE (4 << 16)
466 #define ND_SPACE_FILE_PARAMS (5 << 16)
467 #define ND_SPACE_FILE_LIST (6 << 16)
468 #define ND_SPACE_ASSET_PARAMS (7 << 16)
469 #define ND_SPACE_NODE (8 << 16)
470 #define ND_SPACE_OUTLINER (9 << 16)
471 #define ND_SPACE_VIEW3D (10 << 16)
472 #define ND_SPACE_PROPERTIES (11 << 16)
473 #define ND_SPACE_TEXT (12 << 16)
474 #define ND_SPACE_TIME (13 << 16)
475 #define ND_SPACE_GRAPH (14 << 16)
476 #define ND_SPACE_DOPESHEET (15 << 16)
477 #define ND_SPACE_NLA (16 << 16)
478 #define ND_SPACE_SEQUENCER (17 << 16)
479 #define ND_SPACE_NODE_VIEW (18 << 16)
480 /* Sent to a new editor type after it's replaced an old one. */
481 #define ND_SPACE_CHANGED (19 << 16)
482 #define ND_SPACE_CLIP (20 << 16)
483 #define ND_SPACE_FILE_PREVIEW (21 << 16)
484 #define ND_SPACE_SPREADSHEET (22 << 16)
485 
486 /* NC_ASSET */
487 /* Denotes that the AssetList is done reading some previews. NOT that the preview generation of
488  * assets is done. */
489 #define ND_ASSET_LIST (1 << 16)
490 #define ND_ASSET_LIST_PREVIEW (2 << 16)
491 #define ND_ASSET_LIST_READING (3 << 16)
492 /* Catalog data changed, requiring a redraw of catalog UIs. Note that this doesn't denote a
493  * reloading of asset libraries & their catalogs should happen. That only happens on explicit user
494  * action. */
495 #define ND_ASSET_CATALOGS (4 << 16)
496 
497 /* subtype, 256 entries too */
498 #define NOTE_SUBTYPE 0x0000FF00
499 
500 /* subtype scene mode */
501 #define NS_MODE_OBJECT (1 << 8)
502 
503 #define NS_EDITMODE_MESH (2 << 8)
504 #define NS_EDITMODE_CURVE (3 << 8)
505 #define NS_EDITMODE_SURFACE (4 << 8)
506 #define NS_EDITMODE_TEXT (5 << 8)
507 #define NS_EDITMODE_MBALL (6 << 8)
508 #define NS_EDITMODE_LATTICE (7 << 8)
509 #define NS_EDITMODE_ARMATURE (8 << 8)
510 #define NS_MODE_POSE (9 << 8)
511 #define NS_MODE_PARTICLE (10 << 8)
512 #define NS_EDITMODE_CURVES (11 << 8)
513 
514 /* subtype 3d view editing */
515 #define NS_VIEW3D_GPU (16 << 8)
516 #define NS_VIEW3D_SHADING (17 << 8)
517 
518 /* subtype layer editing */
519 #define NS_LAYER_COLLECTION (24 << 8)
520 
521 /* action classification */
522 #define NOTE_ACTION (0x000000FF)
523 #define NA_EDITED 1
524 #define NA_EVALUATED 2
525 #define NA_ADDED 3
526 #define NA_REMOVED 4
527 #define NA_RENAME 5
528 #define NA_SELECTED 6
529 #define NA_ACTIVATED 7
530 #define NA_PAINTING 8
531 #define NA_JOB_FINISHED 9
532 
533 /* ************** Gesture Manager data ************** */
534 
535 /* wmGesture->type */
536 #define WM_GESTURE_LINES 1
537 #define WM_GESTURE_RECT 2
538 #define WM_GESTURE_CROSS_RECT 3
539 #define WM_GESTURE_LASSO 4
540 #define WM_GESTURE_CIRCLE 5
541 #define WM_GESTURE_STRAIGHTLINE 6
542 
546 typedef struct wmGesture {
547  struct wmGesture *next, *prev;
555  int type;
559  int points;
565 
577  uint move : 1;
584 
592  void *customdata;
593 
597 
598 /* ************** wmEvent ************************ */
599 
600 typedef enum eWM_EventFlag {
613  WM_EVENT_IS_REPEAT = (1 << 1),
621 
622 typedef struct wmTabletData {
624  int active;
626  float pressure;
628  float x_tilt;
630  float y_tilt;
634 
674 typedef struct wmEvent {
675  struct wmEvent *next, *prev;
676 
678  short type;
680  short val;
682  int xy[2];
684  int mval[2];
690  char utf8_buf[6];
691 
694 
697 
702  short keymodifier;
703 
706 
708 
709  /* Custom data. */
710 
712  short custom;
715  void *customdata;
716 
717  /* Previous State. */
718 
720  short prev_type;
722  short prev_val;
728  int prev_xy[2];
729 
730  /* Previous Press State (when `val == KM_PRESS`). */
731 
749 
757 #define WM_EVENT_CURSOR_MOTION_THRESHOLD ((float)U.move_threshold * U.dpi_fac)
758 
760 typedef enum {
762  P_STARTING, /* <-- */
763  P_IN_PROGRESS, /* <-- only these are sent for NDOF motion. */
764  P_FINISHING, /* <-- */
766 } wmProgress;
767 
768 #ifdef WITH_INPUT_NDOF
769 typedef struct wmNDOFMotionData {
770  /* awfully similar to GHOST_TEventNDOFMotionData... */
777  float tvec[3];
784  float rvec[3];
786  float dt;
788  wmProgress progress;
789 } wmNDOFMotionData;
790 #endif /* WITH_INPUT_NDOF */
791 
792 #ifdef WITH_XR_OPENXR
793 /* Similar to GHOST_XrPose. */
794 typedef struct wmXrPose {
795  float position[3];
796  /* Blender convention (w, x, y, z) */
797  float orientation_quat[4];
798 } wmXrPose;
799 
800 typedef struct wmXrActionState {
801  union {
802  bool state_boolean;
803  float state_float;
804  float state_vector2f[2];
805  wmXrPose state_pose;
806  };
807  int type; /* eXrActionType */
808 } wmXrActionState;
809 
810 typedef struct wmXrActionData {
812  char action_set[64];
814  char action[64];
816  char user_path[64];
818  char user_path_other[64];
822  float state[2];
824  float state_other[2];
825 
827  float float_threshold;
828 
830  float controller_loc[3];
831  float controller_rot[4];
833  float controller_loc_other[3];
834  float controller_rot_other[4];
835 
837  struct wmOperatorType *ot;
838  struct IDProperty *op_properties;
839 
841  bool bimanual;
842 } wmXrActionData;
843 #endif
844 
846 typedef enum {
849 
850  /* Internal falgs, should not be used outside of WM code. */
854 } wmTimerFlags;
855 
856 typedef struct wmTimer {
857  struct wmTimer *next, *prev;
858 
860  struct wmWindow *win;
861 
863  double timestep;
869  void *customdata;
870 
872  double duration;
874  double delta;
875 
877  double ltime;
879  double ntime;
881  double stime;
883  bool sleep;
885 
886 typedef struct wmOperatorType {
888  const char *name;
890  const char *idname;
891  const char *translation_context;
893  const char *description;
895  const char *undo_group;
896 
903  int (*exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT;
904 
911  bool (*check)(struct bContext *, struct wmOperator *);
912 
919  int (*invoke)(struct bContext *,
920  struct wmOperator *,
921  const struct wmEvent *) ATTR_WARN_UNUSED_RESULT;
922 
927  void (*cancel)(struct bContext *, struct wmOperator *);
928 
935  int (*modal)(struct bContext *,
936  struct wmOperator *,
937  const struct wmEvent *) ATTR_WARN_UNUSED_RESULT;
938 
944 
949  bool (*poll_property)(const struct bContext *C,
950  struct wmOperator *op,
952 
954  void (*ui)(struct bContext *, struct wmOperator *);
955 
960  const char *(*get_name)(struct wmOperatorType *, struct PointerRNA *);
961 
966  char *(*get_description)(struct bContext *C, struct wmOperatorType *, struct PointerRNA *);
967 
969  struct StructRNA *srna;
970 
973 
982 
985 
988 
991 
994 
997 
999  short flag;
1000 
1002 
1007 typedef struct wmOperatorCallParams {
1012 
1013 #ifdef WITH_INPUT_IME
1014 /* *********** Input Method Editor (IME) *********** */
1018 typedef struct wmIMEData {
1019  size_t result_len, composite_len;
1020 
1022  char *str_result;
1024  char *str_composite;
1025 
1027  int cursor_pos;
1029  int sel_start;
1031  int sel_end;
1032 
1033  bool is_ime_composing;
1034 } wmIMEData;
1035 #endif
1036 
1037 /* **************** Paint Cursor ******************* */
1038 
1039 typedef void (*wmPaintCursorDraw)(struct bContext *C, int, int, void *customdata);
1040 
1041 /* *************** Drag and drop *************** */
1042 
1043 #define WM_DRAG_ID 0
1044 #define WM_DRAG_ASSET 1
1048 #define WM_DRAG_ASSET_LIST 2
1049 #define WM_DRAG_RNA 3
1050 #define WM_DRAG_PATH 4
1051 #define WM_DRAG_NAME 5
1052 #define WM_DRAG_VALUE 6
1053 #define WM_DRAG_COLOR 7
1054 #define WM_DRAG_DATASTACK 8
1055 #define WM_DRAG_ASSET_CATALOG 9
1056 
1057 typedef enum eWM_DragFlags {
1062 
1063 /* NOTE: structs need not exported? */
1064 
1065 typedef struct wmDragID {
1066  struct wmDragID *next, *prev;
1067  struct ID *id;
1068  struct ID *from_parent;
1070 
1071 typedef struct wmDragAsset {
1072  /* NOTE: Can't store the #AssetHandle here, since the #FileDirEntry it wraps may be freed while
1073  * dragging. So store necessary data here directly. */
1074 
1075  char name[64]; /* MAX_NAME */
1076  /* Always freed. */
1077  const char *path;
1078  int id_type;
1080  int import_type; /* eFileAssetImportType */
1081 
1082  /* FIXME: This is temporary evil solution to get scene/view-layer/etc in the copy callback of the
1083  * #wmDropBox.
1084  * TODO: Handle link/append in operator called at the end of the drop process, and NOT in its
1085  * copy callback.
1086  * */
1087  struct bContext *evil_C;
1089 
1090 typedef struct wmDragAssetCatalog {
1093 
1102 typedef struct wmDragAssetListItem {
1104 
1105  union {
1106  struct ID *local_id;
1109 
1112 
1113 typedef char *(*WMDropboxTooltipFunc)(struct bContext *,
1114  struct wmDrag *,
1115  const int xy[2],
1116  struct wmDropBox *drop);
1117 
1118 typedef struct wmDragActiveDropState {
1124 
1131 
1135 
1139  const char *disabled_info;
1142 
1143 typedef struct wmDrag {
1144  struct wmDrag *next, *prev;
1145 
1146  int icon;
1148  int type;
1149  void *poin;
1150  char path[1024]; /* FILE_MAX */
1151  double value;
1152 
1154  struct ImBuf *imb;
1156 
1158 
1160 
1166 
1175 typedef struct wmDropBox {
1176  struct wmDropBox *next, *prev;
1177 
1179  bool (*poll)(struct bContext *C, struct wmDrag *drag, const wmEvent *event);
1180 
1184  void (*on_drag_start)(struct bContext *C, struct wmDrag *drag);
1185 
1187  void (*copy)(struct bContext *C, struct wmDrag *drag, struct wmDropBox *drop);
1188 
1193  void (*cancel)(struct Main *bmain, struct wmDrag *drag, struct wmDropBox *drop);
1194 
1201  struct wmWindow *win,
1202  struct wmDrag *drag,
1203  const int xy[2]);
1204 
1212  struct wmWindow *win,
1213  struct wmDrag *drag,
1214  const int xy[2]);
1215 
1217  void (*draw_activate)(struct wmDropBox *drop, struct wmDrag *drag);
1218 
1220  void (*draw_deactivate)(struct wmDropBox *drop, struct wmDrag *drag);
1221 
1223  void *draw_data;
1224 
1227 
1233 
1237  struct PointerRNA *ptr;
1239 
1244 typedef struct wmTooltipState {
1246  struct wmTimer *timer;
1252  struct ARegion *region;
1254  struct ARegion *(*init)(struct bContext *C,
1255  struct ARegion *region,
1256  int *pass,
1257  double *pass_delay,
1258  bool *r_exit_on_event);
1262  int event_xy[2];
1264  int pass;
1266 
1267 /* *************** migrated stuff, clean later? ************** */
1268 
1269 typedef struct RecentFile {
1270  struct RecentFile *next, *prev;
1271  char *filepath;
1273 
1274 /* Logging */
1275 struct CLG_LogRef;
1276 /* wm_init_exit.c */
1277 
1278 extern struct CLG_LogRef *WM_LOG_OPERATORS;
1279 extern struct CLG_LogRef *WM_LOG_HANDLERS;
1280 extern struct CLG_LogRef *WM_LOG_EVENTS;
1281 extern struct CLG_LogRef *WM_LOG_KEYMAPS;
1282 extern struct CLG_LogRef *WM_LOG_TOOLS;
1283 extern struct CLG_LogRef *WM_LOG_MSGBUS_PUB;
1284 extern struct CLG_LogRef *WM_LOG_MSGBUS_SUB;
1285 
1286 #ifdef __cplusplus
1287 }
1288 #endif
#define ATTR_WARN_UNUSED_RESULT
unsigned int uint
Definition: BLI_sys_types.h:67
These structs are the foundation for all linked lists in the library system.
eXrActionType
Definition: DNA_xr_types.h:64
_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
#define C
Definition: RandGen.cpp:25
@ KM_NOTHING
Definition: WM_types.h:266
@ KM_ANY
Definition: WM_types.h:265
@ KM_PRESS
Definition: WM_types.h:267
@ KM_CLICK_DRAG
Definition: WM_types.h:275
@ KM_DBL_CLICK
Definition: WM_types.h:270
@ KM_RELEASE
Definition: WM_types.h:268
@ KM_CLICK
Definition: WM_types.h:269
struct CLG_LogRef * WM_LOG_TOOLS
@ OPTYPE_PRESET
Definition: WM_types.h:161
@ OPTYPE_INTERNAL
Definition: WM_types.h:168
@ OPTYPE_MACRO
Definition: WM_types.h:151
@ OPTYPE_BLOCKING
Definition: WM_types.h:150
@ OPTYPE_LOCK_BYPASS
Definition: WM_types.h:171
@ OPTYPE_UNDO_GROUPED
Definition: WM_types.h:173
@ OPTYPE_DEPENDS_ON_CURSOR
Definition: WM_types.h:184
@ OPTYPE_UNDO
Definition: WM_types.h:148
@ OPTYPE_GRAB_CURSOR_XY
Definition: WM_types.h:154
@ OPTYPE_REGISTER
Definition: WM_types.h:146
@ OPTYPE_GRAB_CURSOR_X
Definition: WM_types.h:156
@ OPTYPE_GRAB_CURSOR_Y
Definition: WM_types.h:158
struct CLG_LogRef * WM_LOG_MSGBUS_SUB
ENUM_OPERATORS(eWM_EventFlag, WM_EVENT_FORCE_DRAG_THRESHOLD)
struct wmTabletData wmTabletData
struct CLG_LogRef * WM_LOG_EVENTS
eWM_EventFlag
Definition: WM_types.h:600
@ WM_EVENT_FORCE_DRAG_THRESHOLD
Definition: WM_types.h:618
@ WM_EVENT_SCROLL_INVERT
Definition: WM_types.h:606
@ WM_EVENT_IS_REPEAT
Definition: WM_types.h:613
struct wmDragActiveDropState wmDragActiveDropState
struct CLG_LogRef * WM_LOG_HANDLERS
struct wmDrag wmDrag
struct wmOperatorType wmOperatorType
void(* wmPaintCursorDraw)(struct bContext *C, int, int, void *customdata)
Definition: WM_types.h:1039
struct wmOperatorCallParams wmOperatorCallParams
@ WM_CURSOR_WRAP_X
Definition: WM_types.h:190
@ WM_CURSOR_WRAP_XY
Definition: WM_types.h:192
@ WM_CURSOR_WRAP_Y
Definition: WM_types.h:191
@ WM_CURSOR_WRAP_NONE
Definition: WM_types.h:189
eWM_DragFlags
Definition: WM_types.h:1057
@ WM_DRAG_NOP
Definition: WM_types.h:1058
@ WM_DRAG_FREE_DATA
Definition: WM_types.h:1059
struct RecentFile RecentFile
struct wmGesture wmGesture
struct wmEvent wmEvent
char *(* WMDropboxTooltipFunc)(struct bContext *, struct wmDrag *, const int xy[2], struct wmDropBox *drop)
Definition: WM_types.h:1113
struct wmNotifier wmNotifier
struct CLG_LogRef * WM_LOG_KEYMAPS
void(* wmGenericCallbackFn)(struct bContext *C, void *user_data)
Definition: WM_types.h:133
struct wmGenericCallback wmGenericCallback
struct wmTooltipState wmTooltipState
#define OP_PROP_TAG_ADVANCED
Definition: WM_types.h:226
void(* wmGenericUserDataFreeFn)(void *data)
Definition: WM_types.h:124
struct wmGenericUserData wmGenericUserData
struct CLG_LogRef * WM_LOG_MSGBUS_PUB
wmOperatorCallContext
Definition: WM_types.h:199
@ WM_OP_INVOKE_REGION_WIN
Definition: WM_types.h:202
@ WM_OP_EXEC_REGION_WIN
Definition: WM_types.h:209
@ WM_OP_INVOKE_SCREEN
Definition: WM_types.h:206
@ WM_OP_INVOKE_AREA
Definition: WM_types.h:205
@ WM_OP_EXEC_REGION_PREVIEW
Definition: WM_types.h:211
@ WM_OP_EXEC_SCREEN
Definition: WM_types.h:213
@ WM_OP_INVOKE_REGION_PREVIEW
Definition: WM_types.h:204
@ WM_OP_INVOKE_DEFAULT
Definition: WM_types.h:201
@ WM_OP_EXEC_REGION_CHANNELS
Definition: WM_types.h:210
@ WM_OP_INVOKE_REGION_CHANNELS
Definition: WM_types.h:203
@ WM_OP_EXEC_DEFAULT
Definition: WM_types.h:208
@ WM_OP_EXEC_AREA
Definition: WM_types.h:212
@ KM_CTRL
Definition: WM_types.h:239
@ KM_ALT
Definition: WM_types.h:240
@ KM_ALT_ANY
Definition: WM_types.h:247
@ KM_OSKEY_ANY
Definition: WM_types.h:248
@ KM_SHIFT_ANY
Definition: WM_types.h:245
@ KM_OSKEY
Definition: WM_types.h:242
@ KM_CTRL_ANY
Definition: WM_types.h:246
@ KM_SHIFT
Definition: WM_types.h:238
struct wmDragAsset wmDragAsset
@ KM_DIRECTION_NW
Definition: WM_types.h:291
@ KM_DIRECTION_N
Definition: WM_types.h:284
@ KM_DIRECTION_SW
Definition: WM_types.h:289
@ KM_DIRECTION_NE
Definition: WM_types.h:285
@ KM_DIRECTION_E
Definition: WM_types.h:286
@ KM_DIRECTION_W
Definition: WM_types.h:290
@ KM_DIRECTION_SE
Definition: WM_types.h:287
@ KM_DIRECTION_S
Definition: WM_types.h:288
struct wmDragID wmDragID
eOperatorPropTags
Definition: WM_types.h:223
wmTimerFlags
Definition: WM_types.h:846
@ WM_TIMER_TAGGED_FOR_REMOVAL
Definition: WM_types.h:853
@ WM_TIMER_NO_FREE_CUSTOM_DATA
Definition: WM_types.h:848
struct wmDragAssetListItem wmDragAssetListItem
struct CLG_LogRef * WM_LOG_OPERATORS
wmProgress
Definition: WM_types.h:760
@ P_IN_PROGRESS
Definition: WM_types.h:763
@ P_STARTING
Definition: WM_types.h:762
@ P_FINISHED
Definition: WM_types.h:765
@ P_NOT_STARTED
Definition: WM_types.h:761
@ P_FINISHING
Definition: WM_types.h:764
@ KM_TEXTINPUT
Definition: WM_types.h:260
struct wmDropBox wmDropBox
struct wmTimer wmTimer
struct wmDragAssetCatalog wmDragAssetCatalog
void * user_data
SyclQueue void void size_t num_bytes void
const int state
SymEdge< T > * prev(const SymEdge< T > *se)
Definition: delaunay_2d.cc:105
unsigned char uint8_t
Definition: stdint.h:78
signed char int8_t
Definition: stdint.h:75
The meta-data of an asset. By creating and giving this for a data-block (ID.asset_data),...
Definition: DNA_ID.h:368
Definition: BKE_main.h:121
struct RecentFile * next
Definition: WM_types.h:1270
char * filepath
Definition: WM_types.h:1271
struct RecentFile * prev
Definition: WM_types.h:1270
Universally Unique Identifier according to RFC4122.
struct bContextStore * ui_context
Definition: WM_types.h:1134
const char * disabled_info
Definition: WM_types.h:1139
struct ScrArea * area_from
Definition: WM_types.h:1127
struct wmDropBox * active_dropbox
Definition: WM_types.h:1123
struct ARegion * region_from
Definition: WM_types.h:1130
wmDragAsset * external_info
Definition: WM_types.h:1107
union wmDragAssetListItem::@1219 asset_data
struct wmDragAssetListItem * prev
Definition: WM_types.h:1103
struct ID * local_id
Definition: WM_types.h:1106
struct wmDragAssetListItem * next
Definition: WM_types.h:1103
struct bContext * evil_C
Definition: WM_types.h:1087
const char * path
Definition: WM_types.h:1077
int import_type
Definition: WM_types.h:1080
struct AssetMetaData * metadata
Definition: WM_types.h:1079
char name[64]
Definition: WM_types.h:1075
struct ID * id
Definition: WM_types.h:1067
struct ID * from_parent
Definition: WM_types.h:1068
struct wmDragID * next
Definition: WM_types.h:1066
struct wmDrag * prev
Definition: WM_types.h:1144
float imbuf_scale
Definition: WM_types.h:1155
char path[1024]
Definition: WM_types.h:1150
void * poin
Definition: WM_types.h:1149
int icon
Definition: WM_types.h:1146
double value
Definition: WM_types.h:1151
ListBase ids
Definition: WM_types.h:1162
struct ImBuf * imb
Definition: WM_types.h:1154
ListBase asset_items
Definition: WM_types.h:1164
struct wmDrag * next
Definition: WM_types.h:1144
wmDragActiveDropState drop_state
Definition: WM_types.h:1157
int type
Definition: WM_types.h:1148
eWM_DragFlags flags
Definition: WM_types.h:1159
WMDropboxTooltipFunc tooltip
Definition: WM_types.h:1226
void(* draw_deactivate)(struct wmDropBox *drop, struct wmDrag *drag)
Definition: WM_types.h:1220
void * draw_data
Definition: WM_types.h:1223
struct wmDropBox * next
Definition: WM_types.h:1176
void(* on_drag_start)(struct bContext *C, struct wmDrag *drag)
Definition: WM_types.h:1184
void(* copy)(struct bContext *C, struct wmDrag *drag, struct wmDropBox *drop)
Definition: WM_types.h:1187
void(* draw_droptip)(struct bContext *C, struct wmWindow *win, struct wmDrag *drag, const int xy[2])
Definition: WM_types.h:1200
wmOperatorType * ot
Definition: WM_types.h:1232
bool(* poll)(struct bContext *C, struct wmDrag *drag, const wmEvent *event)
Definition: WM_types.h:1179
void(* draw_activate)(struct wmDropBox *drop, struct wmDrag *drag)
Definition: WM_types.h:1217
struct wmDropBox * prev
Definition: WM_types.h:1176
struct IDProperty * properties
Definition: WM_types.h:1235
void(* draw_in_view)(struct bContext *C, struct wmWindow *win, struct wmDrag *drag, const int xy[2])
Definition: WM_types.h:1211
void(* cancel)(struct Main *bmain, struct wmDrag *drag, struct wmDropBox *drop)
Definition: WM_types.h:1193
struct PointerRNA * ptr
Definition: WM_types.h:1237
short customdata_free
Definition: WM_types.h:713
short custom
Definition: WM_types.h:712
short prev_press_keymodifier
Definition: WM_types.h:742
short val
Definition: WM_types.h:680
double prev_press_time
Definition: WM_types.h:747
short prev_type
Definition: WM_types.h:720
struct wmEvent * next
Definition: WM_types.h:675
int xy[2]
Definition: WM_types.h:682
uint8_t prev_press_modifier
Definition: WM_types.h:740
char utf8_buf[6]
Definition: WM_types.h:690
int mval[2]
Definition: WM_types.h:684
int prev_xy[2]
Definition: WM_types.h:728
short keymodifier
Definition: WM_types.h:702
uint8_t modifier
Definition: WM_types.h:693
wmTabletData tablet
Definition: WM_types.h:705
eWM_EventFlag flag
Definition: WM_types.h:707
short prev_val
Definition: WM_types.h:722
struct wmEvent * prev
Definition: WM_types.h:675
int prev_press_xy[2]
Definition: WM_types.h:738
short type
Definition: WM_types.h:678
int8_t direction
Definition: WM_types.h:696
short prev_press_type
Definition: WM_types.h:733
void * customdata
Definition: WM_types.h:715
wmGenericCallbackFn exec
Definition: WM_types.h:136
void * user_data
Definition: WM_types.h:137
wmGenericUserDataFreeFn free_user_data
Definition: WM_types.h:138
wmGenericUserDataFreeFn free_fn
Definition: WM_types.h:129
uint wait_for_input
Definition: WM_types.h:575
uint use_snap
Definition: WM_types.h:580
int event_type
Definition: WM_types.h:549
uint is_active_prev
Definition: WM_types.h:573
int modal_state
Definition: WM_types.h:562
void * customdata
Definition: WM_types.h:592
int points_alloc
Definition: WM_types.h:561
wmGenericUserData user_data
Definition: WM_types.h:595
uint move
Definition: WM_types.h:577
struct wmGesture * next
Definition: WM_types.h:547
int type
Definition: WM_types.h:555
bool draw_active_side
Definition: WM_types.h:564
uint use_flip
Definition: WM_types.h:583
uint is_active
Definition: WM_types.h:571
short event_keymodifier
Definition: WM_types.h:553
uint8_t event_modifier
Definition: WM_types.h:551
rcti winrct
Definition: WM_types.h:557
struct wmGesture * prev
Definition: WM_types.h:547
int points
Definition: WM_types.h:559
unsigned int data
Definition: WM_types.h:308
unsigned int action
Definition: WM_types.h:308
struct wmNotifier * prev
Definition: WM_types.h:304
unsigned int category
Definition: WM_types.h:308
const struct wmWindow * window
Definition: WM_types.h:306
unsigned int subtype
Definition: WM_types.h:308
void * reference
Definition: WM_types.h:310
struct wmNotifier * next
Definition: WM_types.h:304
struct wmOperatorType * optype
Definition: WM_types.h:1008
struct PointerRNA * opptr
Definition: WM_types.h:1009
wmOperatorCallContext opcontext
Definition: WM_types.h:1010
int(* invoke)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
Definition: WM_types.h:919
const char * name
Definition: WM_types.h:888
struct wmKeyMap * modalkeymap
Definition: WM_types.h:987
int(* modal)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
Definition: WM_types.h:935
struct IDProperty * last_properties
Definition: WM_types.h:972
const char * idname
Definition: WM_types.h:890
int cursor_pending
Definition: WM_types.h:996
bool(* poll)(struct bContext *) ATTR_WARN_UNUSED_RESULT
Definition: WM_types.h:943
bool(* poll_property)(const struct bContext *C, struct wmOperator *op, const PropertyRNA *prop) ATTR_WARN_UNUSED_RESULT
Definition: WM_types.h:949
void(* cancel)(struct bContext *, struct wmOperator *)
Definition: WM_types.h:927
struct StructRNA * srna
Definition: WM_types.h:969
ExtensionRNA rna_ext
Definition: WM_types.h:993
const char * translation_context
Definition: WM_types.h:891
const char * description
Definition: WM_types.h:893
void(* ui)(struct bContext *, struct wmOperator *)
Definition: WM_types.h:954
bool(* check)(struct bContext *, struct wmOperator *)
Definition: WM_types.h:911
bool(* pyop_poll)(struct bContext *, struct wmOperatorType *ot) ATTR_WARN_UNUSED_RESULT
Definition: WM_types.h:990
int(* exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT
Definition: WM_types.h:903
PropertyRNA * prop
Definition: WM_types.h:981
const char * undo_group
Definition: WM_types.h:895
ListBase macro
Definition: WM_types.h:984
char is_motion_absolute
Definition: WM_types.h:632
float pressure
Definition: WM_types.h:626
float x_tilt
Definition: WM_types.h:628
float y_tilt
Definition: WM_types.h:630
double timestep
Definition: WM_types.h:863
double stime
Definition: WM_types.h:881
int event_type
Definition: WM_types.h:865
double ltime
Definition: WM_types.h:877
wmTimerFlags flags
Definition: WM_types.h:867
bool sleep
Definition: WM_types.h:883
void * customdata
Definition: WM_types.h:869
struct wmTimer * prev
Definition: WM_types.h:857
struct wmTimer * next
Definition: WM_types.h:857
struct wmWindow * win
Definition: WM_types.h:860
double delta
Definition: WM_types.h:874
double ntime
Definition: WM_types.h:879
double duration
Definition: WM_types.h:872
bool exit_on_event
Definition: WM_types.h:1260
struct ScrArea * area_from
Definition: WM_types.h:1248
struct ARegion * region_from
Definition: WM_types.h:1250
struct wmTimer * timer
Definition: WM_types.h:1246
int event_xy[2]
Definition: WM_types.h:1262
struct ARegion * region
Definition: WM_types.h:1252
int xy[2]
Definition: wm_draw.c:135
wmOperatorType * ot
Definition: wm_files.c:3479