2 * This program is free software; you can redistribute it and/or
3 * modify it under the terms of the GNU General Public License
4 * as published by the Free Software Foundation; either version 2
5 * of the License, or (at your option) any later version.
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software Foundation,
14 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 * The Original Code is Copyright (C) 2007 Blender Foundation.
17 * All rights reserved.
24 #ifndef __WM_TYPES_H__
25 #define __WM_TYPES_H__
28 * Overview of WM structs
29 * ======================
32 * > wmWindowManager (window manager stores a list of windows)
33 * > > wmWindow (window has an active screen)
34 * > > > bScreen (link to ScrAreas via 'areabase')
35 * > > > > ScrArea (stores multiple spaces via space links via 'spacedata')
36 * > > > > > SpaceLink (base struct for space data for all different space types)
37 * > > > > ScrArea (stores multiple regions via 'regionbase')
46 * +----------------------------------------------------------+
47 * |+-----------------------------------------+-------------+ |
48 * ||ScrArea (links to 3D view) |ScrArea | |
49 * ||+-------++----------+-------------------+|(links to | |
50 * |||ARegion|| |ARegion (quad view)|| properties) | |
51 * |||(tools)|| | || | |
55 * ||| |+----------+-------------------+| | |
61 * ||+-------++----------+-------------------+| | |
62 * |+-----------------------------------------+-------------+ |
63 * +----------------------------------------------------------+
70 * ScrArea's store a list of space data (SpaceLinks), each of unique type.
71 * The first one is the displayed in the UI, others are added as needed.
73 * +----------------------------+ <-- sa->spacedata.first;
75 * | |---+ <-- other inactive SpaceLink's stored.
82 * +----------------------------+ | |
84 * +-----------------------------+ |
86 * +------------------------------+
89 * A common way to get the space from the ScrArea:
91 * if (sa->spacetype == SPACE_VIEW3D) {
92 * View3D *v3d = sa->spacedata.first;
108 struct wmWindowManager;
110 #include "RNA_types.h"
111 #include "DNA_listBase.h"
112 #include "DNA_vec_types.h"
113 #include "BLI_compiler_attrs.h"
115 /* exported types for WM */
116 #include "wm_cursors.h"
117 #include "wm_event_types.h"
118 #include "gizmo/WM_gizmo_types.h"
120 /* Include external gizmo API's */
121 #include "gizmo/WM_gizmo_api.h"
123 /* ************** wmOperatorType ************************ */
127 OPTYPE_REGISTER = (1 << 0), /* register operators in stack after finishing */
128 OPTYPE_UNDO = (1 << 1), /* do undo push after after */
129 OPTYPE_BLOCKING = (1 << 2), /* let blender grab all input from the WM (X11) */
130 OPTYPE_MACRO = (1 << 3),
131 OPTYPE_GRAB_CURSOR = (1 << 4), /* grabs the cursor and optionally enables continuous cursor wrapping */
132 OPTYPE_PRESET = (1 << 5), /* show preset menu */
134 /* some operators are mainly for internal use
135 * and don't make sense to be accessed from the
136 * search menu, even if poll() returns true.
137 * currently only used for the search toolbox */
138 OPTYPE_INTERNAL = (1 << 6),
140 OPTYPE_LOCK_BYPASS = (1 << 7), /* Allow operator to run when interface is locked */
141 OPTYPE_UNDO_GROUPED = (1 << 8), /* Special type of undo which doesn't store itself multiple times */
142 OPTYPE_USE_EVAL_DATA = (1 << 9), /* Need evaluated data (i.e. a valid, up-to-date depsgraph for current context) */
145 /* context to call operator in for WM_operator_name_call */
146 /* rna_ui.c contains EnumPropertyItem's of these, keep in sync */
148 /* if there's invoke, call it, otherwise exec */
149 WM_OP_INVOKE_DEFAULT,
150 WM_OP_INVOKE_REGION_WIN,
151 WM_OP_INVOKE_REGION_CHANNELS,
152 WM_OP_INVOKE_REGION_PREVIEW,
157 WM_OP_EXEC_REGION_WIN,
158 WM_OP_EXEC_REGION_CHANNELS,
159 WM_OP_EXEC_REGION_PREVIEW,
164 /* property tags for RNA_OperatorProperties */
165 typedef enum eOperatorPropTags {
166 OP_PROP_TAG_ADVANCED = (1 << 0),
168 #define OP_PROP_TAG_ADVANCED ((eOperatorPropTags)OP_PROP_TAG_ADVANCED)
170 /* ************** wmKeyMap ************************ */
177 /* means modifier should be pressed 2nd */
181 #define KM_OSKEY2 128
183 /* KM_MOD_ flags for wmKeyMapItem and wmEvent.alt/shift/oskey/ctrl */
184 /* note that KM_ANY and KM_NOTHING are used with these defines too */
185 #define KM_MOD_FIRST 1
186 #define KM_MOD_SECOND 2
188 /* type: defined in wm_event_types.c */
189 #define KM_TEXTINPUT -2
197 #define KM_DBL_CLICK 4
198 #define KM_CLICK_DRAG 5
201 /* ************** UI Handler ***************** */
203 #define WM_UI_HANDLER_CONTINUE 0
204 #define WM_UI_HANDLER_BREAK 1
206 /* ************** Notifiers ****************** */
208 typedef struct wmNotifier {
209 struct wmNotifier *next, *prev;
211 struct wmWindowManager *wm;
212 struct wmWindow *window;
214 unsigned int category, data, subtype, action;
223 * 0xFF000000; category
225 * 0x0000FF00; data subtype (unused?)
230 #define NOTE_CATEGORY 0xFF000000
231 #define NC_WM (1<<24)
232 #define NC_WINDOW (2<<24)
233 #define NC_SCREEN (3<<24)
234 #define NC_SCENE (4<<24)
235 #define NC_OBJECT (5<<24)
236 #define NC_MATERIAL (6<<24)
237 #define NC_TEXTURE (7<<24)
238 #define NC_LAMP (8<<24)
239 #define NC_GROUP (9<<24)
240 #define NC_IMAGE (10<<24)
241 #define NC_BRUSH (11<<24)
242 #define NC_TEXT (12<<24)
243 #define NC_WORLD (13<<24)
244 #define NC_ANIMATION (14<<24)
245 #define NC_SPACE (15<<24)
246 #define NC_GEOM (16<<24)
247 #define NC_NODE (17<<24)
248 #define NC_ID (18<<24)
249 #define NC_PAINTCURVE (19<<24)
250 #define NC_MOVIECLIP (20<<24)
251 #define NC_MASK (21<<24)
252 #define NC_GPENCIL (22<<24)
253 #define NC_LINESTYLE (23<<24)
254 #define NC_CAMERA (24<<24)
255 #define NC_LIGHTPROBE (25<<24)
257 /* data type, 256 entries is enough, it can overlap */
258 #define NOTE_DATA 0x00FF0000
260 /* NC_WM windowmanager */
261 #define ND_FILEREAD (1<<16)
262 #define ND_FILESAVE (2<<16)
263 #define ND_DATACHANGED (3<<16)
264 #define ND_HISTORY (4<<16)
265 #define ND_JOB (5<<16)
266 #define ND_UNDO (6<<16)
269 #define ND_LAYOUTBROWSE (1<<16)
270 #define ND_LAYOUTDELETE (2<<16)
271 #define ND_ANIMPLAY (4<<16)
272 #define ND_GPENCIL (5<<16)
273 #define ND_EDITOR_CHANGED (6<<16) /*sent to new editors after switching to them*/
274 #define ND_LAYOUTSET (7<<16)
275 #define ND_SKETCH (8<<16)
276 #define ND_WORKSPACE_SET (9<<16)
277 #define ND_WORKSPACE_DELETE (10<<16)
280 #define ND_SCENEBROWSE (1<<16)
281 #define ND_MARKERS (2<<16)
282 #define ND_FRAME (3<<16)
283 #define ND_RENDER_OPTIONS (4<<16)
284 #define ND_NODES (5<<16)
285 #define ND_SEQUENCER (6<<16)
286 #define ND_OB_ACTIVE (7<<16)
287 #define ND_OB_SELECT (8<<16)
288 #define ND_OB_VISIBLE (9<<16)
289 #define ND_OB_RENDER (10<<16)
290 #define ND_MODE (11<<16)
291 #define ND_RENDER_RESULT (12<<16)
292 #define ND_COMPO_RESULT (13<<16)
293 #define ND_KEYINGSET (14<<16)
294 #define ND_TOOLSETTINGS (15<<16)
295 #define ND_LAYER (16<<16)
296 #define ND_FRAME_RANGE (17<<16)
297 #define ND_TRANSFORM_DONE (18<<16)
298 #define ND_WORLD (92<<16)
299 #define ND_LAYER_CONTENT (101<<16)
301 /* NC_OBJECT Object */
302 #define ND_TRANSFORM (18<<16)
303 #define ND_OB_SHADING (19<<16)
304 #define ND_POSE (20<<16)
305 #define ND_BONE_ACTIVE (21<<16)
306 #define ND_BONE_SELECT (22<<16)
307 #define ND_DRAW (23<<16)
308 #define ND_MODIFIER (24<<16)
309 #define ND_KEYS (25<<16)
310 #define ND_CONSTRAINT (26<<16)
311 #define ND_PARTICLE (27<<16)
312 #define ND_POINTCACHE (28<<16)
313 #define ND_PARENT (29<<16)
314 #define ND_LOD (30<<16)
315 #define ND_DRAW_RENDER_VIEWPORT (31<<16) /* for camera & sequencer viewport update, also /w NC_SCENE */
317 /* NC_MATERIAL Material */
318 #define ND_SHADING (30<<16)
319 #define ND_SHADING_DRAW (31<<16)
320 #define ND_SHADING_LINKS (32<<16)
321 #define ND_SHADING_PREVIEW (33<<16)
324 #define ND_LIGHTING (40<<16)
325 #define ND_LIGHTING_DRAW (41<<16)
326 #define ND_SKY (42<<16)
329 #define ND_WORLD_DRAW (45<<16)
332 #define ND_CURSOR (50<<16)
333 #define ND_DISPLAY (51<<16)
335 /* NC_ANIMATION Animato */
336 #define ND_KEYFRAME (70<<16)
337 #define ND_KEYFRAME_PROP (71<<16)
338 #define ND_ANIMCHAN (72<<16)
339 #define ND_NLA (73<<16)
340 #define ND_NLA_ACTCHANGE (74<<16)
341 #define ND_FCURVES_ORDER (75<<16)
344 #define ND_GPENCIL_EDITMODE (85<<16)
346 /* NC_GEOM Geometry */
347 /* Mesh, Curve, MetaBall, Armature, .. */
348 #define ND_SELECT (90<<16)
349 #define ND_DATA (91<<16)
350 #define ND_VERTEX_GROUP (92<<16)
355 #define ND_SPACE_CONSOLE (1<<16) /* general redraw */
356 #define ND_SPACE_INFO_REPORT (2<<16) /* update for reports, could specify type */
357 #define ND_SPACE_INFO (3<<16)
358 #define ND_SPACE_IMAGE (4<<16)
359 #define ND_SPACE_FILE_PARAMS (5<<16)
360 #define ND_SPACE_FILE_LIST (6<<16)
361 #define ND_SPACE_NODE (7<<16)
362 #define ND_SPACE_OUTLINER (8<<16)
363 #define ND_SPACE_VIEW3D (9<<16)
364 #define ND_SPACE_PROPERTIES (10<<16)
365 #define ND_SPACE_TEXT (11<<16)
366 #define ND_SPACE_TIME (12<<16)
367 #define ND_SPACE_GRAPH (13<<16)
368 #define ND_SPACE_DOPESHEET (14<<16)
369 #define ND_SPACE_NLA (15<<16)
370 #define ND_SPACE_SEQUENCER (16<<16)
371 #define ND_SPACE_NODE_VIEW (17<<16)
372 #define ND_SPACE_CHANGED (18<<16) /*sent to a new editor type after it's replaced an old one*/
373 #define ND_SPACE_CLIP (19<<16)
374 #define ND_SPACE_FILE_PREVIEW (20<<16)
376 /* subtype, 256 entries too */
377 #define NOTE_SUBTYPE 0x0000FF00
379 /* subtype scene mode */
380 #define NS_MODE_OBJECT (1<<8)
382 #define NS_EDITMODE_MESH (2<<8)
383 #define NS_EDITMODE_CURVE (3<<8)
384 #define NS_EDITMODE_SURFACE (4<<8)
385 #define NS_EDITMODE_TEXT (5<<8)
386 #define NS_EDITMODE_MBALL (6<<8)
387 #define NS_EDITMODE_LATTICE (7<<8)
388 #define NS_EDITMODE_ARMATURE (8<<8)
389 #define NS_MODE_POSE (9<<8)
390 #define NS_MODE_PARTICLE (10<<8)
392 /* subtype 3d view editing */
393 #define NS_VIEW3D_GPU (16<<8)
395 /* action classification */
396 #define NOTE_ACTION (0x000000FF)
398 #define NA_EVALUATED 2
402 #define NA_SELECTED 6
403 #define NA_PAINTING 7
405 /* ************** Gesture Manager data ************** */
407 /* wmGesture->type */
408 #define WM_GESTURE_TWEAK 0
409 #define WM_GESTURE_LINES 1
410 #define WM_GESTURE_RECT 2
411 #define WM_GESTURE_CROSS_RECT 3
412 #define WM_GESTURE_LASSO 4
413 #define WM_GESTURE_CIRCLE 5
414 #define WM_GESTURE_STRAIGHTLINE 6
416 /* wmGesture is registered to window listbase, handled by operator callbacks */
417 /* tweak gesture is builtin feature */
418 typedef struct wmGesture {
419 struct wmGesture *next, *prev;
420 int event_type; /* event->type */
421 int type; /* gesture type define */
422 rcti winrct; /* bounds of region to draw gesture within */
423 int points; /* optional, amount of points stored */
424 int points_alloc; /* optional, maximum amount of points stored */
427 /* For modal operators which may be running idle, waiting for an event to activate the gesture.
428 * Typically this is set when the user is click-dragging the gesture (border and circle select for eg). */
430 /* Previous value of is-active (use to detect first run & edge cases). */
431 uint is_active_prev : 1;
432 /* Use for gestures that support both immediate or delayed activation. */
433 uint wait_for_input : 1;
436 /* customdata for border is a recti */
437 /* customdata for circle is recti, (xmin, ymin) is center, xmax radius */
438 /* customdata for lasso is short array */
439 /* customdata for straight line is a recti: (xmin,ymin) is start, (xmax, ymax) is end */
441 /* free pointer to use for operator allocs (if set, its freed on exit)*/
446 /* ************** wmEvent ************************ */
448 /* each event should have full modifier state */
449 /* event comes from eventmanager and from keymap */
450 typedef struct wmEvent {
451 struct wmEvent *next, *prev;
453 short type; /* event code itself (short, is also in keymap) */
454 short val; /* press, release, scrollvalue */
455 int x, y; /* mouse pointer position, screen coord */
456 int mval[2]; /* region mouse position, name convention pre 2.5 :) */
457 char utf8_buf[6]; /* from, ghost if utf8 is enabled for the platform,
458 * BLI_str_utf8_size() must _always_ be valid, check
459 * when assigning s we don't need to check on every access after */
460 char ascii; /* from ghost, fallback if utf8 isn't set */
463 /* previous state, used for double click and the 'click' */
467 double prevclicktime;
468 int prevclickx, prevclicky;
470 /* modifier states */
471 short shift, ctrl, alt, oskey; /* oskey is apple or windowskey, value denotes order of pressed */
472 short keymodifier; /* rawkey modifier */
474 /* set in case a KM_PRESS went by unhandled */
477 char is_motion_absolute;
479 /* keymap item, set by handler (weak?) */
480 const char *keymap_idname;
482 /* tablet info, only use when the tablet is active */
483 const struct wmTabletData *tablet_data;
486 short custom; /* custom data type, stylus, 6dof, see wm_event_types.h */
487 short customdatafree;
489 void *customdata; /* ascii, unicode, mouse coords, angles, vectors, dragdrop info */
494 * Values below are considered a click, above are considered a drag.
496 #define WM_EVENT_CURSOR_CLICK_DRAG_THRESHOLD (U.tweak_threshold * U.dpi_fac)
499 * Values below are ignored when detecting if the user interntionally moved the cursor.
500 * Keep this very small since it's used for selection cycling for eg,
501 * where we want intended adjustments to pass this threshold and select new items.
503 * Always check for <= this value since it may be zero.
505 #define WM_EVENT_CURSOR_MOTION_THRESHOLD ((float)U.move_threshold * U.dpi_fac)
507 /* ************** custom wmEvent data ************** */
508 typedef struct wmTabletData {
509 int Active; /* 0=EVT_TABLET_NONE, 1=EVT_TABLET_STYLUS, 2=EVT_TABLET_ERASER */
510 float Pressure; /* range 0.0 (not touching) to 1.0 (full pressure) */
511 float Xtilt; /* range 0.0 (upright) to 1.0 (tilted fully against the tablet surface) */
512 float Ytilt; /* as above */
515 typedef enum { /* motion progress, for modal handlers */
517 P_STARTING, /* <-- */
518 P_IN_PROGRESS, /* <-- only these are sent for NDOF motion*/
519 P_FINISHING, /* <-- */
523 #ifdef WITH_INPUT_NDOF
524 typedef struct wmNDOFMotionData {
525 /* awfully similar to GHOST_TEventNDOFMotionData... */
526 /* Each component normally ranges from -1 to +1, but can exceed that.
527 * These use blender standard view coordinates, with positive rotations being CCW about the axis. */
528 float tvec[3]; /* translation */
529 float rvec[3]; /* rotation: */
530 /* axis = (rx,ry,rz).normalized */
531 /* amount = (rx,ry,rz).magnitude [in revolutions, 1.0 = 360 deg] */
532 float dt; /* time since previous NDOF Motion event */
533 wmProgress progress; /* is this the first event, the last, or one of many in between? */
535 #endif /* WITH_INPUT_NDOF */
537 typedef enum { /* Timer flags */
538 WM_TIMER_NO_FREE_CUSTOM_DATA = 1 << 0, /* Do not attempt to free customdata pointer even if non-NULL. */
541 typedef struct wmTimer {
542 struct wmTimer *next, *prev;
544 struct wmWindow *win; /* window this timer is attached to (optional) */
546 double timestep; /* set by timer user */
547 int event_type; /* set by timer user, goes to event system */
548 wmTimerFlags flags; /* Various flags controlling timer options, see below. */
549 void *customdata; /* set by timer user, to allow custom values */
551 double duration; /* total running time in seconds */
552 double delta; /* time since previous step in seconds */
554 double ltime; /* internal, last time timer was activated */
555 double ntime; /* internal, next time we want to activate the timer */
556 double stime; /* internal, when the timer started */
557 bool sleep; /* internal, put timers to sleep when needed */
560 typedef struct wmOperatorType {
561 const char *name; /* text for ui, undo */
562 const char *idname; /* unique identifier */
563 const char *translation_context;
564 const char *description; /* tooltips and python docs */
565 const char *undo_group; /* identifier to group operators together */
567 /* this callback executes the operator without any interactive input,
568 * parameters may be provided through operator properties. cannot use
569 * any interface code or input device state.
570 * - see defines below for return values */
571 int (*exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT;
573 /* this callback executes on a running operator whenever as property
574 * is changed. It can correct its own properties or report errors for
575 * invalid settings in exceptional cases.
576 * Boolean return value, True denotes a change has been made and to redraw */
577 bool (*check)(struct bContext *, struct wmOperator *);
579 /* for modal temporary operators, initially invoke is called. then
580 * any further events are handled in modal. if the operation is
581 * canceled due to some external reason, cancel is called
582 * - see defines below for return values */
583 int (*invoke)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT;
585 /* Called when a modal operator is canceled (not used often).
586 * Internal cleanup can be done here if needed. */
587 void (*cancel)(struct bContext *, struct wmOperator *);
589 /* Modal is used for operators which continuously run, eg:
590 * fly mode, knife tool, circle select are all examples of modal operators.
591 * Modal operators can handle events which would normally access other operators,
592 * they keep running until they don't return `OPERATOR_RUNNING_MODAL`. */
593 int (*modal)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT;
595 /* verify if the operator can be executed in the current context, note
596 * that the operator might still fail to execute even if this return true */
597 bool (*poll)(struct bContext *) ATTR_WARN_UNUSED_RESULT;
599 /* Use to check of properties should be displayed in auto-generated UI.
600 * Use 'check' callback to enforce refreshing. */
601 bool (*poll_property)(
602 const struct bContext *C, struct wmOperator *op,
603 const PropertyRNA *prop) ATTR_WARN_UNUSED_RESULT;
605 /* optional panel for redo and repeat, autogenerated if not set */
606 void (*ui)(struct bContext *, struct wmOperator *);
608 /* rna for properties */
609 struct StructRNA *srna;
611 /* previous settings - for initializing on re-use */
612 struct IDProperty *last_properties;
615 * Default rna property to use for generic invoke functions.
616 * menus, enum search... etc. Example: Enum 'type' for a Delete menu.
618 * When assigned a string/number property,
619 * immediately edit the value when used in a popup. see: #UI_BUT_ACTIVATE_ON_INIT.
623 /* struct wmOperatorTypeMacro */
626 /* pointer to modal keymap, do not free! */
627 struct wmKeyMap *modalkeymap;
629 /* python needs the operator type as well */
630 bool (*pyop_poll)(struct bContext *, struct wmOperatorType *ot) ATTR_WARN_UNUSED_RESULT;
632 /* RNA integration */
635 /* Flag last for padding */
640 #ifdef WITH_INPUT_IME
641 /* *********** Input Method Editor (IME) *********** */
643 /* similar to GHOST_TEventImeData */
644 typedef struct wmIMEData {
645 size_t result_len, composite_len;
647 char *str_result; /* utf8 encoding */
648 char *str_composite; /* utf8 encoding */
650 int cursor_pos; /* cursor position in the IME composition. */
651 int sel_start; /* beginning of the selection */
652 int sel_end; /* end of the selection */
654 bool is_ime_composing;
658 /* **************** Paint Cursor ******************* */
660 typedef void (*wmPaintCursorDraw)(struct bContext *C, int, int, void *customdata);
662 /* *************** Drag and drop *************** */
665 #define WM_DRAG_RNA 1
666 #define WM_DRAG_PATH 2
667 #define WM_DRAG_NAME 3
668 #define WM_DRAG_VALUE 4
669 #define WM_DRAG_COLOR 5
671 typedef enum wmDragFlags {
673 WM_DRAG_FREE_DATA = 1,
676 /* note: structs need not exported? */
678 typedef struct wmDragID {
679 struct wmDragID *next, *prev;
681 struct ID *from_parent;
684 typedef struct wmDrag {
685 struct wmDrag *next, *prev;
687 int icon, type; /* type, see WM_DRAG defines above */
689 char path[1024]; /* FILE_MAX */
692 struct ImBuf *imb; /* if no icon but imbuf should be drawn around cursor */
696 char opname[200]; /* if set, draws operator name*/
699 ListBase ids; /* List of wmDragIDs, all are guaranteed to have the same ID type. */
702 /* dropboxes are like keymaps, part of the screen/area/region definition */
703 /* allocation and free is on startup and exit */
704 typedef struct wmDropBox {
705 struct wmDropBox *next, *prev;
707 /* test if the dropbox is active, then can print optype name */
708 bool (*poll)(struct bContext *, struct wmDrag *, const wmEvent *, const char **);
710 /* before exec, this copies drag info to wmDrop properties */
711 void (*copy)(struct wmDrag *, struct wmDropBox *);
713 /* if poll survives, operator is called */
714 wmOperatorType *ot; /* not saved in file, so can be pointer */
716 struct IDProperty *properties; /* operator properties, assigned to ptr->data and can be written to a file */
717 struct PointerRNA *ptr; /* rna pointer to access properties */
719 short opcontext; /* default invoke */
724 * Struct to store tool-tip timer and possible creation if the time is reached.
725 * Allows UI code to call #WM_tooltip_timer_init without each user having to handle the timer.
727 typedef struct wmTooltipState {
728 /** Create tooltip on this event. */
729 struct wmTimer *timer;
730 /** The region the tooltip is created in. */
731 struct ARegion *region_from;
732 /** The tooltip region. */
733 struct ARegion *region;
734 /** Create the tooltip region (assign to 'region'). */
735 struct ARegion *(*init)(
736 struct bContext *C, struct ARegion *ar,
737 int *pass, double *pass_delay, bool *r_exit_on_event);
738 /** Exit on any event, not needed for buttons since their highlight state is used. */
740 /** Pass, use when we want multiple tips, count down to zero. */
744 /* *************** migrated stuff, clean later? ************** */
746 typedef struct RecentFile {
747 struct RecentFile *next, *prev;
754 extern struct CLG_LogRef *WM_LOG_OPERATORS;
755 extern struct CLG_LogRef *WM_LOG_HANDLERS;
756 extern struct CLG_LogRef *WM_LOG_EVENTS;
757 extern struct CLG_LogRef *WM_LOG_KEYMAPS;
758 extern struct CLG_LogRef *WM_LOG_TOOLS;
759 extern struct CLG_LogRef *WM_LOG_MSGBUS_PUB;
760 extern struct CLG_LogRef *WM_LOG_MSGBUS_SUB;
767 #endif /* __WM_TYPES_H__ */