Blender  V2.93
WM_api.h
Go to the documentation of this file.
1 /*
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.
6  *
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.
11  *
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.
15  *
16  * The Original Code is Copyright (C) 2007 Blender Foundation.
17  * All rights reserved.
18  */
19 #pragma once
20 
32 /* dna-savable wmStructs here */
33 #include "BLI_compiler_attrs.h"
35 #include "WM_keymap.h"
36 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40 
41 struct ARegion;
42 struct GHashIterator;
43 struct GPUViewport;
44 struct ID;
45 struct IDProperty;
46 struct ImBuf;
47 struct ImageFormatData;
48 struct Main;
49 struct MenuType;
50 struct PointerRNA;
51 struct PropertyRNA;
52 struct ScrArea;
53 struct View3D;
54 struct ViewLayer;
55 struct bContext;
56 struct rcti;
57 struct wmDrag;
58 struct wmDropBox;
59 struct wmEvent;
61 struct wmEventHandler_UI;
62 struct wmGenericUserData;
63 struct wmGesture;
64 struct wmJob;
65 struct wmOperator;
66 struct wmOperatorType;
67 struct wmPaintCursor;
68 struct wmTabletData;
69 
70 #ifdef WITH_INPUT_NDOF
71 struct wmNDOFMotionData;
72 #endif
73 
74 typedef struct wmGizmo wmGizmo;
75 typedef struct wmGizmoMap wmGizmoMap;
76 typedef struct wmGizmoMapType wmGizmoMapType;
77 typedef struct wmJob wmJob;
78 
79 /* general API */
81 const char *WM_init_state_app_template_get(void);
82 
83 void WM_init_state_size_set(int stax, int stay, int sizx, int sizy);
85 void WM_init_state_normal_set(void);
88 void WM_init_window_focus_set(bool do_it);
89 void WM_init_native_pixels(bool do_it);
90 void WM_init_tablet_api(void);
91 
92 void WM_init(struct bContext *C, int argc, const char **argv);
93 void WM_exit_ex(struct bContext *C, const bool do_python);
94 
95 void WM_exit(struct bContext *C) ATTR_NORETURN;
96 
97 void WM_main(struct bContext *C) ATTR_NORETURN;
98 
99 void WM_init_splash(struct bContext *C);
100 
101 void WM_init_opengl(void);
102 
103 void WM_check(struct bContext *C);
104 void WM_reinit_gizmomap_all(struct Main *bmain);
105 
106 void WM_script_tag_reload(void);
107 
109  const wmWindow *win_ignore,
110  const wmWindow *win,
111  const int mval[2],
112  wmWindow **r_win,
113  int r_mval[2]);
115  const wmWindow *win,
116  const int pos[2],
117  float r_col[3]);
118 
119 uint *WM_window_pixels_read(struct wmWindowManager *wm, struct wmWindow *win, int r_size[2]);
120 
121 int WM_window_pixels_x(const struct wmWindow *win);
122 int WM_window_pixels_y(const struct wmWindow *win);
123 void WM_window_rect_calc(const struct wmWindow *win, struct rcti *r_rect);
124 void WM_window_screen_rect_calc(const struct wmWindow *win, struct rcti *r_rect);
126 bool WM_window_is_maximized(const struct wmWindow *win);
127 
128 void WM_windows_scene_data_sync(const ListBase *win_lb, struct Scene *scene) ATTR_NONNULL();
130  const struct bScreen *screen)
133  const struct bScreen *screen)
136  const struct bScreen *screen)
138 
139 struct Scene *WM_window_get_active_scene(const struct wmWindow *win)
141 void WM_window_set_active_scene(struct Main *bmain,
142  struct bContext *C,
143  struct wmWindow *win,
144  struct Scene *scene_new) ATTR_NONNULL();
148  struct wmWindow *win,
149  struct WorkSpace *workspace) ATTR_NONNULL(1);
152 void WM_window_set_active_layout(struct wmWindow *win,
153  struct WorkSpace *workspace,
154  struct WorkSpaceLayout *layout) ATTR_NONNULL(1);
155 struct bScreen *WM_window_get_active_screen(const struct wmWindow *win)
157 void WM_window_set_active_screen(struct wmWindow *win,
158  struct WorkSpace *workspace,
159  struct bScreen *screen) ATTR_NONNULL(1);
160 
163 void WM_window_set_active_view_layer(struct wmWindow *win, struct ViewLayer *view_layer)
164  ATTR_NONNULL(1);
166 
168 
169 void *WM_opengl_context_create(void);
173 
174 /* WM_window_open alignment */
175 typedef enum WindowAlignment {
180 
181 struct wmWindow *WM_window_open(struct bContext *C,
182  const char *title,
183  int x,
184  int y,
185  int sizex,
186  int sizey,
187  int space_type,
188  bool dialog,
189  bool temp,
190  WindowAlignment alignment);
191 
192 void WM_window_set_dpi(const wmWindow *win);
193 
194 bool WM_stereo3d_enabled(struct wmWindow *win, bool only_fullscreen_test);
195 
196 /* files */
197 void WM_file_autoexec_init(const char *filepath);
198 bool WM_file_read(struct bContext *C, const char *filepath, struct ReportList *reports);
199 void WM_autosave_init(struct wmWindowManager *wm);
200 bool WM_recover_last_session(struct bContext *C, struct ReportList *reports);
201 void WM_file_tag_modified(void);
202 
203 struct ID *WM_file_append_datablock(struct Main *bmain,
204  struct Scene *scene,
205  struct ViewLayer *view_layer,
206  struct View3D *v3d,
207  const char *filepath,
208  const short id_code,
209  const char *id_name);
210 void WM_lib_reload(struct Library *lib, struct bContext *C, struct ReportList *reports);
211 
212 /* mouse cursors */
213 void WM_cursor_set(struct wmWindow *win, int curs);
214 bool WM_cursor_set_from_tool(struct wmWindow *win, const ScrArea *area, const ARegion *region);
215 void WM_cursor_modal_set(struct wmWindow *win, int val);
216 void WM_cursor_modal_restore(struct wmWindow *win);
217 void WM_cursor_wait(bool val);
218 void WM_cursor_grab_enable(struct wmWindow *win, int wrap, bool hide, int bounds[4]);
219 void WM_cursor_grab_disable(struct wmWindow *win, const int mouse_ungrab_xy[2]);
220 void WM_cursor_time(struct wmWindow *win, int nr);
221 
223  short space_type,
224  short region_type,
225  bool (*poll)(struct bContext *C),
226  void (*draw)(struct bContext *C, int, int, void *customdata),
227  void *customdata);
228 
229 bool WM_paint_cursor_end(struct wmPaintCursor *handle);
231  void *draw_fn,
232  void (*free)(void *));
233 void WM_paint_cursor_tag_redraw(struct wmWindow *win, struct ARegion *region);
234 
235 void WM_cursor_warp(struct wmWindow *win, int x, int y);
236 void WM_cursor_compatible_xy(wmWindow *win, int *x, int *y);
237 
238 /* handlers */
239 
240 typedef bool (*EventHandlerPoll)(const ARegion *region, const struct wmEvent *event);
243  wmKeyMap *keymap,
244  EventHandlerPoll poll);
246  wmKeyMap *keymap);
247 /* priority not implemented, it adds in begin */
249  wmKeyMap *keymap,
250  int priority);
251 
252 typedef struct wmKeyMap *(wmEventHandler_KeymapDynamicFn)(
254 
256  struct wmWindowManager *wm, struct wmEventHandler_Keymap *handler);
258  struct wmEventHandler_Keymap *handler);
259 
261  ListBase *handlers, wmEventHandler_KeymapDynamicFn *keymap_fn, void *user_data);
262 
264 
266  void(keymap_tag)(wmKeyMap *keymap,
267  wmKeyMapItem *kmi,
268  void *user_data),
269  void *user_data);
271  struct wmEventHandler_Keymap *handler);
272 
274  wmKeyMap *keymap,
275  const struct wmEvent *event);
276 
278  struct wmWindowManager *wm,
279  struct ListBase *handlers,
280  const struct wmEvent *event);
281 
282 typedef int (*wmUIHandlerFunc)(struct bContext *C, const struct wmEvent *event, void *userdata);
283 typedef void (*wmUIHandlerRemoveFunc)(struct bContext *C, void *userdata);
284 
286  ListBase *handlers,
289  void *user_data,
290  const char flag);
291 void WM_event_remove_ui_handler(ListBase *handlers,
294  void *user_data,
295  const bool postpone);
296 void WM_event_remove_area_handler(struct ListBase *handlers, void *area);
298  ListBase *handlers,
301 
304  const struct ScrArea *old_area,
305  struct ScrArea *new_area);
307  const struct ARegion *old_region,
308  struct ARegion *new_region);
309 
310 void WM_event_remove_handlers(struct bContext *C, ListBase *handlers);
311 
312 /* handler flag */
313 enum {
314  WM_HANDLER_BLOCKING = (1 << 0), /* after this handler all others are ignored */
315  WM_HANDLER_ACCEPT_DBL_CLICK = (1 << 1), /* handler accepts double key press events */
316 
317  /* internal */
318  WM_HANDLER_DO_FREE = (1 << 7), /* handler tagged to be freed in wm_handlers_do() */
319 };
320 
323 
324 /* mouse */
326 
327 #ifdef WITH_INPUT_NDOF
328 /* 3D mouse */
329 void WM_ndof_deadzone_set(float deadzone);
330 #endif
331 /* notifiers */
333  const struct wmWindow *win,
334  unsigned int type,
335  void *reference);
336 void WM_event_add_notifier(const struct bContext *C, unsigned int type, void *reference);
337 void WM_main_add_notifier(unsigned int type, void *reference);
338 void WM_main_remove_notifier_reference(const void *reference);
339 void WM_main_remap_editor_id_reference(struct ID *old_id, struct ID *new_id);
340 
341 /* reports */
342 void WM_report_banner_show(void);
343 void WM_report_banners_cancel(struct Main *bmain);
344 void WM_report(ReportType type, const char *message);
345 void WM_reportf(ReportType type, const char *format, ...) ATTR_PRINTF_FORMAT(2, 3);
346 
347 struct wmEvent *wm_event_add_ex(struct wmWindow *win,
348  const struct wmEvent *event_to_add,
349  const struct wmEvent *event_to_add_after) ATTR_NONNULL(1, 2);
350 struct wmEvent *wm_event_add(struct wmWindow *win, const struct wmEvent *event_to_add)
351  ATTR_NONNULL(1, 2);
352 
353 void wm_event_init_from_window(struct wmWindow *win, struct wmEvent *event);
354 
355 /* at maximum, every timestep seconds it triggers event_type events */
356 struct wmTimer *WM_event_add_timer(struct wmWindowManager *wm,
357  struct wmWindow *win,
358  int event_type,
359  double timestep);
361  struct wmWindow *win,
362  unsigned int type,
363  double timestep);
365  struct wmWindow *win,
366  struct wmTimer *timer);
368  struct wmWindow *win,
369  struct wmTimer *timer);
371  struct wmWindow *win,
372  struct wmTimer *timer,
373  bool do_sleep);
374 
375 /* operator api, default callbacks */
376 /* invoke callback, uses enum property named "type" */
378  struct wmOperator *op,
379  const struct wmEvent *event);
381  struct wmOperator *op,
382  const struct wmEvent *event);
383 void WM_operator_view3d_unit_defaults(struct bContext *C, struct wmOperator *op);
385 int WM_menu_invoke_ex(struct bContext *C, struct wmOperator *op, int opcontext);
386 int WM_menu_invoke(struct bContext *C, struct wmOperator *op, const struct wmEvent *event);
387 void WM_menu_name_call(struct bContext *C, const char *menu_name, short context);
389  struct wmOperator *op,
390  short prv_cols,
391  short prv_rows);
392 int WM_enum_search_invoke(struct bContext *C, struct wmOperator *op, const struct wmEvent *event);
393 /* invoke callback, confirm menu + exec */
394 int WM_operator_confirm(struct bContext *C, struct wmOperator *op, const struct wmEvent *event);
396  struct wmOperator *op,
397  const struct wmEvent *event);
398 /* invoke callback, file selector "filepath" unset + exec */
399 int WM_operator_filesel(struct bContext *C, struct wmOperator *op, const struct wmEvent *event);
401  const struct ImageFormatData *im_format);
402 /* poll callback, context checks */
403 bool WM_operator_winactive(struct bContext *C);
404 /* invoke callback, exec + redo popup */
406  struct wmOperator *op,
407  const struct wmEvent *event);
409  struct wmOperator *op,
410  const struct wmEvent *event);
412  struct wmOperator *op,
413  const struct wmEvent *event);
414 int WM_operator_props_dialog_popup(struct bContext *C, struct wmOperator *op, int width);
415 int WM_operator_redo_popup(struct bContext *C, struct wmOperator *op);
416 int WM_operator_ui_popup(struct bContext *C, struct wmOperator *op, int width);
417 
419  struct wmOperator *op,
420  const char *title,
421  const int icon,
422  const char *message,
423  const short opcontext);
424 int WM_operator_confirm_message(struct bContext *C, struct wmOperator *op, const char *message);
425 
426 /* operator api */
427 void WM_operator_free(struct wmOperator *op);
429 void WM_operator_type_set(struct wmOperator *op, struct wmOperatorType *ot);
432 
433 bool WM_operator_poll(struct bContext *C, struct wmOperatorType *ot);
434 bool WM_operator_poll_context(struct bContext *C, struct wmOperatorType *ot, short context);
435 int WM_operator_call_ex(struct bContext *C, struct wmOperator *op, const bool store);
436 int WM_operator_call(struct bContext *C, struct wmOperator *op);
437 int WM_operator_call_notest(struct bContext *C, struct wmOperator *op);
438 int WM_operator_repeat(struct bContext *C, struct wmOperator *op);
439 int WM_operator_repeat_last(struct bContext *C, struct wmOperator *op);
440 bool WM_operator_repeat_check(const struct bContext *C, struct wmOperator *op);
441 bool WM_operator_is_repeat(const struct bContext *C, const struct wmOperator *op);
443  struct wmOperatorType *ot,
444  short context,
445  struct PointerRNA *properties);
446 int WM_operator_name_call(struct bContext *C,
447  const char *opstring,
448  short context,
449  struct PointerRNA *properties);
451  const char *opstring,
452  short context,
453  struct IDProperty *properties);
454 int WM_operator_call_py(struct bContext *C,
455  struct wmOperatorType *ot,
456  short context,
457  struct PointerRNA *properties,
458  struct ReportList *reports,
459  const bool is_undo);
460 
461 /* Used for keymap and macro items. */
463  struct IDProperty **properties,
464  const char *opstring);
465 
466 /* Make props context sensitive or not. */
467 void WM_operator_properties_sanitize(struct PointerRNA *ptr, const bool no_context);
468 
469 bool WM_operator_properties_default(struct PointerRNA *ptr, const bool do_update);
471 void WM_operator_properties_create(struct PointerRNA *ptr, const char *opstring);
475 
477 bool WM_operator_check_ui_enabled(const struct bContext *C, const char *idname);
478 
482 ID *WM_operator_drop_load_path(struct bContext *C, struct wmOperator *op, const short idcode);
483 
486 
487 /* wm_operator_props.c */
490  int filter,
491  short type,
492  short action,
493  short flag,
494  short display,
495  short sort);
498 void WM_operator_properties_border_to_rcti(struct wmOperator *op, struct rcti *rect);
500 void WM_operator_properties_gesture_box_ex(struct wmOperatorType *ot, bool deselect, bool extend);
510  int default_action,
511  bool hide_gui);
513  int default_action,
514  bool hide_gui);
522  int nth; /* bypass when set to zero */
523  int skip;
524  int offset;
525 };
526 void WM_operator_properties_checker_interval(struct wmOperatorType *ot, bool nth_can_disable);
528  struct CheckerIntervalParams *op_params);
530  int depth);
531 
532 /* flags for WM_operator_properties_filesel */
533 #define WM_FILESEL_RELPATH (1 << 0)
534 
535 #define WM_FILESEL_DIRECTORY (1 << 1)
536 #define WM_FILESEL_FILENAME (1 << 2)
537 #define WM_FILESEL_FILEPATH (1 << 3)
538 #define WM_FILESEL_FILES (1 << 4)
539 /* Show the properties sidebar by default. */
540 #define WM_FILESEL_SHOW_PROPS (1 << 5)
541 
542 /* operator as a python command (resultuing string must be freed) */
543 char *WM_operator_pystring_ex(struct bContext *C,
544  struct wmOperator *op,
545  const bool all_args,
546  const bool macro_args,
547  struct wmOperatorType *ot,
548  struct PointerRNA *opptr);
549 char *WM_operator_pystring(struct bContext *C,
550  struct wmOperator *op,
551  const bool all_args,
552  const bool macro_args);
553 bool WM_operator_pystring_abbreviate(char *str, int str_len_max);
554 char *WM_prop_pystring_assign(struct bContext *C,
555  struct PointerRNA *ptr,
556  struct PropertyRNA *prop,
557  int index);
558 void WM_operator_bl_idname(char *to, const char *from);
559 void WM_operator_py_idname(char *to, const char *from);
561  const char *classname,
562  const char *idname);
563 const char *WM_context_member_from_ptr(struct bContext *C, const struct PointerRNA *ptr);
564 
565 /* wm_operator_type.c */
566 struct wmOperatorType *WM_operatortype_find(const char *idname, bool quiet);
567 void WM_operatortype_iter(struct GHashIterator *ghi);
568 void WM_operatortype_append(void (*opfunc)(struct wmOperatorType *));
569 void WM_operatortype_append_ptr(void (*opfunc)(struct wmOperatorType *, void *), void *userdata);
570 void WM_operatortype_append_macro_ptr(void (*opfunc)(struct wmOperatorType *, void *),
571  void *userdata);
573 bool WM_operatortype_remove(const char *idname);
577 
578 #define WM_operatortype_prop_tag(property, tags) \
579  { \
580  CHECK_TYPE(tags, eOperatorPropTags); \
581  RNA_def_property_tags(prop, tags); \
582  } \
583  (void)0
584 
586  const char *name,
587  const char *description,
588  int flag);
590  const char *idname);
591 
592 const char *WM_operatortype_name(struct wmOperatorType *ot, struct PointerRNA *properties);
594  struct wmOperatorType *ot,
595  struct PointerRNA *properties);
597  struct wmOperatorType *ot,
598  struct PointerRNA *properties);
599 
600 /* wm_operator_utils.c */
602 
603 /* wm_uilist_type.c */
604 void WM_uilisttype_init(void);
605 struct uiListType *WM_uilisttype_find(const char *idname, bool quiet);
606 bool WM_uilisttype_add(struct uiListType *ult);
607 void WM_uilisttype_freelink(struct uiListType *ult);
608 void WM_uilisttype_free(void);
609 
610 /* wm_menu_type.c */
611 void WM_menutype_init(void);
612 struct MenuType *WM_menutype_find(const char *idname, bool quiet);
613 void WM_menutype_iter(struct GHashIterator *ghi);
614 bool WM_menutype_add(struct MenuType *mt);
615 void WM_menutype_freelink(struct MenuType *mt);
616 void WM_menutype_free(void);
617 bool WM_menutype_poll(struct bContext *C, struct MenuType *mt);
618 
619 /* wm_panel_type.c */
620 void WM_paneltype_init(void);
621 void WM_paneltype_clear(void);
622 struct PanelType *WM_paneltype_find(const char *idname, bool quiet);
623 bool WM_paneltype_add(struct PanelType *pt);
624 void WM_paneltype_remove(struct PanelType *pt);
625 
626 /* wm_gesture_ops.c */
627 int WM_gesture_box_invoke(struct bContext *C, struct wmOperator *op, const struct wmEvent *event);
628 int WM_gesture_box_modal(struct bContext *C, struct wmOperator *op, const struct wmEvent *event);
629 void WM_gesture_box_cancel(struct bContext *C, struct wmOperator *op);
631  struct wmOperator *op,
632  const struct wmEvent *event);
634  struct wmOperator *op,
635  const struct wmEvent *event);
636 void WM_gesture_circle_cancel(struct bContext *C, struct wmOperator *op);
638  struct wmOperator *op,
639  const struct wmEvent *event);
640 int WM_gesture_lines_modal(struct bContext *C, struct wmOperator *op, const struct wmEvent *event);
641 void WM_gesture_lines_cancel(struct bContext *C, struct wmOperator *op);
643  struct wmOperator *op,
644  const struct wmEvent *event);
645 int WM_gesture_lasso_modal(struct bContext *C, struct wmOperator *op, const struct wmEvent *event);
646 void WM_gesture_lasso_cancel(struct bContext *C, struct wmOperator *op);
648  struct wmOperator *op,
649  int *mcoords_len))[2];
650 
652  struct wmOperator *op,
653  const struct wmEvent *event);
655  struct wmOperator *op,
656  const struct wmEvent *event);
658  struct wmOperator *op,
659  const struct wmEvent *event);
661  struct wmOperator *op,
662  const struct wmEvent *event);
663 void WM_gesture_straightline_cancel(struct bContext *C, struct wmOperator *op);
664 
665 /* Gesture manager API */
666 struct wmGesture *WM_gesture_new(struct wmWindow *window,
667  const struct ARegion *region,
668  const struct wmEvent *event,
669  int type);
670 void WM_gesture_end(struct wmWindow *win, struct wmGesture *gesture);
671 void WM_gestures_remove(struct wmWindow *win);
672 void WM_gestures_free_all(struct wmWindow *win);
673 bool WM_gesture_is_modal_first(const struct wmGesture *gesture);
674 
675 /* fileselecting support */
676 void WM_event_add_fileselect(struct bContext *C, struct wmOperator *op);
677 void WM_event_fileselect_event(struct wmWindowManager *wm, void *ophandle, int eventval);
678 
680 
681 /* drag and drop */
683  struct bContext *C, int icon, int type, void *poin, double value, unsigned int flags);
684 void WM_event_drag_image(struct wmDrag *, struct ImBuf *, float scale, int sx, int sy);
685 void WM_drag_free(struct wmDrag *drag);
686 void WM_drag_data_free(int dragtype, void *poin);
687 void WM_drag_free_list(struct ListBase *lb);
688 
690  ListBase *lb,
691  const char *idname,
692  bool (*poll)(struct bContext *, struct wmDrag *, const struct wmEvent *event, const char **),
693  void (*copy)(struct wmDrag *, struct wmDropBox *),
694  void (*cancel)(struct Main *, struct wmDrag *, struct wmDropBox *));
695 ListBase *WM_dropboxmap_find(const char *idname, int spaceid, int regionid);
696 
697 /* ID drag and drop */
698 void WM_drag_add_local_ID(struct wmDrag *drag, struct ID *id, struct ID *from_parent);
699 struct ID *WM_drag_get_local_ID(const struct wmDrag *drag, short idcode);
700 struct ID *WM_drag_get_local_ID_from_event(const struct wmEvent *event, short idcode);
701 bool WM_drag_is_ID_type(const struct wmDrag *drag, int idcode);
702 
703 struct wmDragAsset *WM_drag_get_asset_data(const struct wmDrag *drag, int idcode);
704 struct ID *WM_drag_get_local_ID_or_import_from_asset(const struct wmDrag *drag, int idcode);
705 
706 void WM_drag_free_imported_drag_ID(struct Main *bmain,
707  struct wmDrag *drag,
708  struct wmDropBox *drop);
709 
710 /* Set OpenGL viewport and scissor */
711 void wmViewport(const struct rcti *winrct);
712 void wmPartialViewport(rcti *drawrct, const rcti *winrct, const rcti *partialrct);
713 void wmWindowViewport(struct wmWindow *win);
714 
715 /* OpenGL utilities with safety check */
716 void wmOrtho2(float x1, float x2, float y1, float y2);
717 /* use for conventions (avoid hard-coded offsets all over) */
718 void wmOrtho2_region_pixelspace(const struct ARegion *region);
719 void wmOrtho2_pixelspace(const float x, const float y);
720 void wmGetProjectionMatrix(float mat[4][4], const struct rcti *winrct);
721 
722 /* threaded Jobs Manager */
723 enum {
724  WM_JOB_PRIORITY = (1 << 0),
725  WM_JOB_EXCL_RENDER = (1 << 1),
726  WM_JOB_PROGRESS = (1 << 2),
727 };
728 
733 enum {
737  WM_JOB_TYPE_RENDER_PREVIEW, /* UI preview */
759  /* add as needed, bake, seq proxy build
760  * if having hard coded values is a problem */
761 };
762 
763 struct wmJob *WM_jobs_get(struct wmWindowManager *wm,
764  struct wmWindow *win,
765  void *owner,
766  const char *name,
767  int flag,
768  int job_type);
769 
770 bool WM_jobs_test(struct wmWindowManager *wm, void *owner, int job_type);
771 float WM_jobs_progress(struct wmWindowManager *wm, void *owner);
772 char *WM_jobs_name(struct wmWindowManager *wm, void *owner);
773 double WM_jobs_starttime(struct wmWindowManager *wm, void *owner);
774 void *WM_jobs_customdata(struct wmWindowManager *wm, void *owner);
776 
777 bool WM_jobs_is_running(struct wmJob *);
778 bool WM_jobs_is_stopped(wmWindowManager *wm, void *owner);
779 void *WM_jobs_customdata_get(struct wmJob *);
780 void WM_jobs_customdata_set(struct wmJob *, void *customdata, void (*free)(void *));
781 void WM_jobs_timer(struct wmJob *, double timestep, unsigned int note, unsigned int endnote);
782 void WM_jobs_delay_start(struct wmJob *, double delay_time);
783 
784 typedef void (*wm_jobs_start_callback)(void *custom_data,
785  short *stop,
786  short *do_update,
787  float *progress);
788 void WM_jobs_callbacks(struct wmJob *,
790  void (*initjob)(void *),
791  void (*update)(void *),
792  void (*endjob)(void *));
793 
794 void WM_jobs_start(struct wmWindowManager *wm, struct wmJob *);
795 void WM_jobs_stop(struct wmWindowManager *wm, void *owner, void *startjob);
796 void WM_jobs_kill(struct wmWindowManager *wm,
797  void *owner,
798  void (*)(void *, short int *, short int *, float *));
799 void WM_jobs_kill_all(struct wmWindowManager *wm);
800 void WM_jobs_kill_all_except(struct wmWindowManager *wm, void *owner);
801 void WM_jobs_kill_type(struct wmWindowManager *wm, void *owner, int job_type);
802 
803 bool WM_jobs_has_running(struct wmWindowManager *wm);
804 
805 void WM_job_main_thread_lock_acquire(struct wmJob *job);
806 void WM_job_main_thread_lock_release(struct wmJob *job);
807 
808 /* clipboard */
809 char *WM_clipboard_text_get(bool selection, int *r_len);
810 char *WM_clipboard_text_get_firstline(bool selection, int *r_len);
811 void WM_clipboard_text_set(const char *buf, bool selection);
812 
813 /* progress */
814 void WM_progress_set(struct wmWindow *win, float progress);
815 void WM_progress_clear(struct wmWindow *win);
816 
817 /* Draw (for screenshot) */
818 void *WM_draw_cb_activate(struct wmWindow *win,
819  void (*draw)(const struct wmWindow *, void *),
820  void *customdata);
821 void WM_draw_cb_exit(struct wmWindow *win, void *handle);
822 void WM_redraw_windows(struct bContext *C);
823 
824 void WM_draw_region_viewport_ensure(struct ARegion *region, short space_type);
825 void WM_draw_region_viewport_bind(struct ARegion *region);
826 void WM_draw_region_viewport_unbind(struct ARegion *region);
827 
828 /* Region drawing */
829 void WM_draw_region_free(struct ARegion *region, bool hide);
830 struct GPUViewport *WM_draw_region_get_viewport(struct ARegion *region);
832 
833 void WM_main_playanim(int argc, const char **argv);
834 
835 /* debugging only, convenience function to write on crash */
836 bool write_crash_blend(void);
837 
838 /* Lock the interface for any communication */
839 void WM_set_locked_interface(struct wmWindowManager *wm, bool lock);
840 
841 void WM_event_tablet_data_default_set(struct wmTabletData *tablet_data);
842 
843 /* For testing only 'G_FLAG_EVENT_SIMULATE' */
844 struct wmEvent *WM_event_add_simulate(struct wmWindow *win, const struct wmEvent *event_to_add);
845 
846 const char *WM_window_cursor_keymap_status_get(const struct wmWindow *win,
847  int button_index,
848  int type_index);
849 void WM_window_cursor_keymap_status_refresh(struct bContext *C, struct wmWindow *win);
850 
852 struct ScrArea *WM_window_status_area_find(struct wmWindow *win, struct bScreen *screen);
854  struct wmWindow *win,
855  struct uiLayout *layout);
856 
857 /* wm_event_query.c */
858 void WM_event_print(const struct wmEvent *event);
859 
860 int WM_event_modifier_flag(const struct wmEvent *event);
861 
862 bool WM_event_is_modal_tweak_exit(const struct wmEvent *event, int tweak_event);
863 bool WM_event_is_last_mousemove(const struct wmEvent *event);
864 bool WM_event_is_mouse_drag(const struct wmEvent *event);
865 
866 int WM_event_drag_threshold(const struct wmEvent *event);
867 bool WM_event_drag_test(const struct wmEvent *event, const int prev_xy[2]);
868 bool WM_event_drag_test_with_delta(const struct wmEvent *event, const int delta[2]);
869 
870 /* event map */
871 int WM_userdef_event_map(int kmitype);
873 
874 #ifdef WITH_INPUT_NDOF
875 void WM_event_ndof_pan_get(const struct wmNDOFMotionData *ndof,
876  float r_pan[3],
877  const bool use_zoom);
878 void WM_event_ndof_rotate_get(const struct wmNDOFMotionData *ndof, float r_rot[3]);
879 
880 float WM_event_ndof_to_axis_angle(const struct wmNDOFMotionData *ndof, float axis[3]);
881 void WM_event_ndof_to_quat(const struct wmNDOFMotionData *ndof, float q[4]);
882 #endif /* WITH_INPUT_NDOF */
883 
884 float WM_event_tablet_data(const struct wmEvent *event, int *pen_flip, float tilt[2]);
885 bool WM_event_is_tablet(const struct wmEvent *event);
886 
887 int WM_event_absolute_delta_x(const struct wmEvent *event);
888 int WM_event_absolute_delta_y(const struct wmEvent *event);
889 
890 #ifdef WITH_INPUT_IME
891 bool WM_event_is_ime_switch(const struct wmEvent *event);
892 #endif
893 
894 /* wm_tooltip.c */
895 typedef struct ARegion *(*wmTooltipInitFn)(struct bContext *C,
896  struct ARegion *region,
897  int *pass,
898  double *r_pass_delay,
899  bool *r_exit_on_event);
900 
902  struct wmWindow *win,
903  struct ScrArea *area,
904  struct ARegion *region,
906 void WM_tooltip_timer_init_ex(struct bContext *C,
907  struct wmWindow *win,
908  struct ScrArea *area,
909  struct ARegion *region,
911  double delay);
912 void WM_tooltip_timer_init(struct bContext *C,
913  struct wmWindow *win,
914  struct ScrArea *area,
915  struct ARegion *region,
917 void WM_tooltip_timer_clear(struct bContext *C, struct wmWindow *win);
918 void WM_tooltip_clear(struct bContext *C, struct wmWindow *win);
919 void WM_tooltip_init(struct bContext *C, struct wmWindow *win);
920 void WM_tooltip_refresh(struct bContext *C, struct wmWindow *win);
921 double WM_tooltip_time_closed(void);
922 
923 /* wm_utils.c */
926 
927 void WM_generic_user_data_free(struct wmGenericUserData *wm_userdata);
928 
929 bool WM_region_use_viewport(struct ScrArea *area, struct ARegion *region);
930 
931 #ifdef WITH_XR_OPENXR
932 /* wm_xr.c */
933 bool WM_xr_session_exists(const wmXrData *xr);
934 bool WM_xr_session_is_ready(const wmXrData *xr);
937 bool WM_xr_session_state_viewer_pose_location_get(const wmXrData *xr, float r_location[3]);
938 bool WM_xr_session_state_viewer_pose_rotation_get(const wmXrData *xr, float r_rotation[4]);
940  float r_viewmat[4][4],
941  float *r_focal_len);
942 #endif
943 
944 #ifdef __cplusplus
945 }
946 #endif
#define ATTR_NORETURN
#define ATTR_NONNULL(...)
void BLI_kdtree_nd_() int BLI_kdtree_nd_() int BLI_kdtree_nd_() int BLI_kdtree_nd_() ATTR_WARN_UNUSED_RESULT
void BLI_kdtree_nd_() free(KDTree *tree)
Definition: kdtree_impl.h:116
size_t ATTR_PRINTF_FORMAT(3, 4)
unsigned int uint
Definition: BLI_sys_types.h:83
_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 y1
_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 width
_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 x2
_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 y
#define C
Definition: RandGen.cpp:39
void WM_menutype_freelink(struct MenuType *mt)
Definition: wm_menu_type.c:72
void WM_job_main_thread_lock_acquire(struct wmJob *job)
Definition: wm_jobs.c:140
struct MenuType * WM_menutype_find(const char *idname, bool quiet)
Definition: wm_menu_type.c:44
bool WM_operator_check_ui_enabled(const struct bContext *C, const char *idname)
void WM_gesture_end(struct wmWindow *win, struct wmGesture *gesture)
Definition: wm_gesture.c:99
void WM_operator_properties_gesture_box_ex(struct wmOperatorType *ot, bool deselect, bool extend)
struct uiListType * WM_uilisttype_find(const char *idname, bool quiet)
bool WM_jobs_has_running(struct wmWindowManager *wm)
Definition: wm_jobs.c:705
void WM_operator_properties_mouse_select(struct wmOperatorType *ot)
void WM_drag_add_local_ID(struct wmDrag *drag, struct ID *id, struct ID *from_parent)
Definition: wm_dragdrop.c:312
struct wmEventHandler_Keymap * WM_event_add_keymap_handler_priority(ListBase *handlers, wmKeyMap *keymap, int priority)
void WM_operator_properties_reset(struct wmOperator *op)
Definition: wm_operators.c:685
bool WM_event_is_tablet(const struct wmEvent *event)
struct WorkSpaceLayout * WM_window_get_active_layout(const struct wmWindow *win) ATTR_NONNULL() ATTR_WARN_UNUSED_RESULT
void WM_operator_properties_clear(struct PointerRNA *ptr)
Definition: wm_operators.c:702
void WM_generic_user_data_free(struct wmGenericUserData *wm_userdata)
Definition: wm_utils.c:59
bool WM_window_is_temp_screen(const struct wmWindow *win) ATTR_WARN_UNUSED_RESULT
void WM_operatortype_last_properties_clear_all(void)
int WM_menu_invoke(struct bContext *C, struct wmOperator *op, const struct wmEvent *event)
void WM_cursor_modal_set(struct wmWindow *win, int val)
Definition: wm_cursors.c:207
void WM_window_set_active_screen(struct wmWindow *win, struct WorkSpace *workspace, struct bScreen *screen) ATTR_NONNULL(1)
Definition: wm_window.c:2378
bool write_crash_blend(void)
Definition: wm_files.c:1458
void WM_drag_free_imported_drag_ID(struct Main *bmain, struct wmDrag *drag, struct wmDropBox *drop)
Free asset ID imported for cancelled drop.
Definition: wm_dragdrop.c:419
bool WM_operator_py_idname_ok_or_report(struct ReportList *reports, const char *classname, const char *idname)
Definition: wm_operators.c:171
void WM_draw_cb_exit(struct wmWindow *win, void *handle)
Definition: wm_draw.c:375
bool WM_operator_pystring_abbreviate(char *str, int str_len_max)
Definition: wm_operators.c:311
void WM_main_playanim(int argc, const char **argv)
Definition: wm_playanim.c:1841
int WM_event_drag_threshold(const struct wmEvent *event)
struct wmDragAsset * WM_drag_get_asset_data(const struct wmDrag *drag, int idcode)
void WM_init(struct bContext *C, int argc, const char **argv)
Definition: wm_init_exit.c:225
struct ViewLayer * WM_windows_view_layer_get_from_screen(const struct wmWindowManager *wm, const struct bScreen *screen) ATTR_NONNULL() ATTR_WARN_UNUSED_RESULT
int WM_operator_call_notest(struct bContext *C, struct wmOperator *op)
int WM_gesture_straightline_invoke(struct bContext *C, struct wmOperator *op, const struct wmEvent *event)
void WM_window_set_active_workspace(struct bContext *C, struct wmWindow *win, struct WorkSpace *workspace) ATTR_NONNULL(1)
Definition: wm_window.c:2340
void WM_operatortype_props_advanced_end(struct wmOperatorType *ot)
void WM_operator_properties_gesture_box(struct wmOperatorType *ot)
int WM_operator_confirm_message(struct bContext *C, struct wmOperator *op, const char *message)
int WM_gesture_lines_modal(struct bContext *C, struct wmOperator *op, const struct wmEvent *event)
int WM_gesture_circle_invoke(struct bContext *C, struct wmOperator *op, const struct wmEvent *event)
int WM_operator_props_popup(struct bContext *C, struct wmOperator *op, const struct wmEvent *event)
void * WM_jobs_customdata_get(struct wmJob *)
Definition: wm_jobs.c:336
void WM_menu_name_call(struct bContext *C, const char *menu_name, short context)
bool WM_operator_last_properties_init(struct wmOperator *op)
Definition: wm_operators.c:767
void * WM_opengl_context_create(void)
Definition: wm_window.c:2421
void WM_clipboard_text_set(const char *buf, bool selection)
Definition: wm_window.c:1778
char * WM_operatortype_description(struct bContext *C, struct wmOperatorType *ot, struct PointerRNA *properties)
void WM_gesture_circle_cancel(struct bContext *C, struct wmOperator *op)
@ WM_HANDLER_BLOCKING
Definition: WM_api.h:314
@ WM_HANDLER_DO_FREE
Definition: WM_api.h:318
@ WM_HANDLER_ACCEPT_DBL_CLICK
Definition: WM_api.h:315
void * WM_jobs_customdata(struct wmWindowManager *wm, void *owner)
Definition: wm_jobs.c:303
@ WM_JOB_TYPE_DPAINT_BAKE
Definition: WM_api.h:750
@ WM_JOB_TYPE_SEQ_BUILD_PROXY
Definition: WM_api.h:747
@ WM_JOB_TYPE_COMPOSITE
Definition: WM_api.h:735
@ WM_JOB_TYPE_OBJECT_BAKE
Definition: WM_api.h:741
@ WM_JOB_TYPE_LIGHT_BAKE
Definition: WM_api.h:754
@ WM_JOB_TYPE_QUADRIFLOW_REMESH
Definition: WM_api.h:756
@ WM_JOB_TYPE_RENDER_PREVIEW
Definition: WM_api.h:737
@ WM_JOB_TYPE_POINTCACHE
Definition: WM_api.h:749
@ WM_JOB_TYPE_FSMENU_BOOKMARK_VALIDATE
Definition: WM_api.h:755
@ WM_JOB_TYPE_CLIP_BUILD_PROXY
Definition: WM_api.h:743
@ WM_JOB_TYPE_TRACE_IMAGE
Definition: WM_api.h:757
@ WM_JOB_TYPE_CLIP_PREFETCH
Definition: WM_api.h:746
@ WM_JOB_TYPE_SEQ_BUILD_PREVIEW
Definition: WM_api.h:748
@ WM_JOB_TYPE_RENDER
Definition: WM_api.h:736
@ WM_JOB_TYPE_LINEART
Definition: WM_api.h:758
@ WM_JOB_TYPE_ANY
Definition: WM_api.h:734
@ WM_JOB_TYPE_OBJECT_SIM_OCEAN
Definition: WM_api.h:738
@ WM_JOB_TYPE_STUDIOLIGHT
Definition: WM_api.h:753
@ WM_JOB_TYPE_CLIP_SOLVE_CAMERA
Definition: WM_api.h:745
@ WM_JOB_TYPE_FILESEL_READDIR
Definition: WM_api.h:742
@ WM_JOB_TYPE_CLIP_TRACK_MARKERS
Definition: WM_api.h:744
@ WM_JOB_TYPE_SHADER_COMPILATION
Definition: WM_api.h:752
@ WM_JOB_TYPE_ALEMBIC
Definition: WM_api.h:751
@ WM_JOB_TYPE_OBJECT_SIM_FLUID
Definition: WM_api.h:739
@ WM_JOB_TYPE_OBJECT_BAKE_TEXTURE
Definition: WM_api.h:740
void WM_report_banners_cancel(struct Main *bmain)
wmKeyMap * WM_event_get_keymap_from_handler(wmWindowManager *wm, struct wmEventHandler_Keymap *handler)
struct ARegion *(* wmTooltipInitFn)(struct bContext *C, struct ARegion *region, int *pass, double *r_pass_delay, bool *r_exit_on_event)
Definition: WM_api.h:895
void WM_event_remove_keymap_handler(ListBase *handlers, wmKeyMap *keymap)
void WM_operatortype_iter(struct GHashIterator *ghi)
void WM_set_locked_interface(struct wmWindowManager *wm, bool lock)
void WM_window_set_active_layout(struct wmWindow *win, struct WorkSpace *workspace, struct WorkSpaceLayout *layout) ATTR_NONNULL(1)
Definition: wm_window.c:2364
bool WM_window_is_fullscreen(const struct wmWindow *win)
void WM_jobs_kill_all_except(struct wmWindowManager *wm, void *owner)
Definition: wm_jobs.c:563
int WM_operator_confirm(struct bContext *C, struct wmOperator *op, const struct wmEvent *event)
void WM_jobs_timer(struct wmJob *, double timestep, unsigned int note, unsigned int endnote)
Definition: wm_jobs.c:360
void WM_operator_type_modal_from_exec_for_object_edit_coords(struct wmOperatorType *ot)
bool WM_paint_cursor_end(struct wmPaintCursor *handle)
ID * WM_operator_drop_load_path(struct bContext *C, struct wmOperator *op, const short idcode)
bool WM_jobs_test(struct wmWindowManager *wm, void *owner, int job_type)
Definition: wm_jobs.c:223
int WM_operator_properties_select_random_seed_increment_get(wmOperator *op)
void WM_operator_last_properties_ensure(struct wmOperatorType *ot, struct PointerRNA *ptr)
bool WM_operator_properties_checker_interval_test(const struct CheckerIntervalParams *op_params, int depth)
void WM_cursor_set(struct wmWindow *win, int curs)
Definition: wm_cursors.c:142
void WM_init_state_normal_set(void)
Definition: wm_window.c:2044
int WM_operator_name_call(struct bContext *C, const char *opstring, short context, struct PointerRNA *properties)
int WM_operator_call_py(struct bContext *C, struct wmOperatorType *ot, short context, struct PointerRNA *properties, struct ReportList *reports, const bool is_undo)
void WM_main_add_notifier(unsigned int type, void *reference)
int WM_userdef_event_map(int kmitype)
int WM_operator_name_call_with_properties(struct bContext *C, const char *opstring, short context, struct IDProperty *properties)
bool WM_operator_is_repeat(const struct bContext *C, const struct wmOperator *op)
void WM_jobs_delay_start(struct wmJob *, double delay_time)
Definition: wm_jobs.c:367
bool WM_window_modal_keymap_status_draw(struct bContext *C, struct wmWindow *win, struct uiLayout *layout)
void WM_autosave_init(struct wmWindowManager *wm)
Definition: wm_files.c:1700
void WM_operator_handlers_clear(wmWindowManager *wm, struct wmOperatorType *ot)
Definition: wm.c:416
void WM_paneltype_init(void)
Definition: wm_panel_type.c:73
char * WM_clipboard_text_get_firstline(bool selection, int *r_len)
Definition: wm_window.c:1773
uint * WM_window_pixels_read(struct wmWindowManager *wm, struct wmWindow *win, int r_size[2])
Definition: wm_window.c:1989
int WM_operator_ui_popup(struct bContext *C, struct wmOperator *op, int width)
void WM_opengl_context_activate(void *context)
Definition: wm_window.c:2443
char * WM_operatortype_description_or_name(struct bContext *C, struct wmOperatorType *ot, struct PointerRNA *properties)
void WM_event_drag_image(struct wmDrag *, struct ImBuf *, float scale, int sx, int sy)
Definition: wm_dragdrop.c:180
int WM_gesture_box_modal(struct bContext *C, struct wmOperator *op, const struct wmEvent *event)
void WM_operator_properties_use_cursor_init(struct wmOperatorType *ot)
void WM_main(struct bContext *C) ATTR_NORETURN
Definition: wm.c:636
int WM_operator_filesel(struct bContext *C, struct wmOperator *op, const struct wmEvent *event)
void WM_event_print(const struct wmEvent *event)
void WM_cursor_time(struct wmWindow *win, int nr)
Definition: wm_cursors.c:338
const char * WM_init_state_app_template_get(void)
Definition: wm_files.c:875
bool WM_paneltype_add(struct PanelType *pt)
Definition: wm_panel_type.c:58
bool WM_operator_poll_context(struct bContext *C, struct wmOperatorType *ot, short context)
void WM_event_add_fileselect(struct bContext *C, struct wmOperator *op)
void WM_cursor_compatible_xy(wmWindow *win, int *x, int *y)
Definition: wm_window.c:2110
void WM_window_rect_calc(const struct wmWindow *win, struct rcti *r_rect)
struct wmEventHandler_Keymap * WM_event_add_keymap_handler_dynamic(ListBase *handlers, wmEventHandler_KeymapDynamicFn *keymap_fn, void *user_data)
struct WorkSpace * WM_window_get_active_workspace(const struct wmWindow *win) ATTR_NONNULL() ATTR_WARN_UNUSED_RESULT
void WM_progress_set(struct wmWindow *win, float progress)
Definition: wm_window.c:1823
void WM_windows_scene_data_sync(const ListBase *win_lb, struct Scene *scene) ATTR_NONNULL()
Definition: wm_window.c:2208
bool WM_operator_poll(struct bContext *C, struct wmOperatorType *ot)
void WM_event_add_notifier(const struct bContext *C, unsigned int type, void *reference)
void WM_operatortype_append_macro_ptr(void(*opfunc)(struct wmOperatorType *, void *), void *userdata)
void * WM_jobs_customdata_from_type(struct wmWindowManager *wm, int job_type)
Definition: wm_jobs.c:314
void WM_operator_region_active_win_set(struct bContext *C)
void WM_operator_free_all_after(wmWindowManager *wm, struct wmOperator *op)
Definition: wm.c:327
void WM_operator_properties_select_action(struct wmOperatorType *ot, int default_action, bool hide_gui)
void WM_operator_properties_select_all(struct wmOperatorType *ot)
bool WM_event_is_mouse_drag(const struct wmEvent *event)
bool WM_jobs_is_running(struct wmJob *)
Definition: wm_jobs.c:325
void WM_operator_properties_select_action_simple(struct wmOperatorType *ot, int default_action, bool hide_gui)
void WM_window_status_area_tag_redraw(struct wmWindow *win)
void WM_report_banner_show(void)
void WM_uilisttype_freelink(struct uiListType *ult)
bool WM_operator_check_ui_empty(struct wmOperatorType *ot)
const char * WM_window_cursor_keymap_status_get(const struct wmWindow *win, int button_index, int type_index)
void(* wm_jobs_start_callback)(void *custom_data, short *stop, short *do_update, float *progress)
Definition: WM_api.h:784
bool WM_event_is_modal_tweak_exit(const struct wmEvent *event, int tweak_event)
void wmGetProjectionMatrix(float mat[4][4], const struct rcti *winrct)
void WM_gesture_straightline_cancel(struct bContext *C, struct wmOperator *op)
int WM_operator_call(struct bContext *C, struct wmOperator *op)
struct wmTimer * WM_event_add_timer_notifier(struct wmWindowManager *wm, struct wmWindow *win, unsigned int type, double timestep)
Definition: wm_window.c:1648
void WM_operator_properties_create(struct PointerRNA *ptr, const char *opstring)
Definition: wm_operators.c:590
void WM_event_remove_timer(struct wmWindowManager *wm, struct wmWindow *win, struct wmTimer *timer)
void(* wmUIHandlerRemoveFunc)(struct bContext *C, void *userdata)
Definition: WM_api.h:283
void WM_operator_properties_select_operation_simple(struct wmOperatorType *ot)
void WM_operatortype_append(void(*opfunc)(struct wmOperatorType *))
void WM_menutype_iter(struct GHashIterator *ghi)
Definition: wm_menu_type.c:60
bool WM_event_drag_test(const struct wmEvent *event, const int prev_xy[2])
struct wmKeyMap *() wmEventHandler_KeymapDynamicFn(wmWindowManager *wm, struct wmEventHandler_Keymap *handler) ATTR_WARN_UNUSED_RESULT
Definition: WM_api.h:252
void wmOrtho2(float x1, float x2, float y1, float y2)
Definition: wm_subwindow.c:100
int WM_event_absolute_delta_y(const struct wmEvent *event)
void WM_paint_cursor_tag_redraw(struct wmWindow *win, struct ARegion *region)
void WM_jobs_kill_all(struct wmWindowManager *wm)
Definition: wm_jobs.c:550
void WM_operator_properties_select_walk_direction(struct wmOperatorType *ot)
char * WM_prop_pystring_assign(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, int index)
Definition: wm_operators.c:559
void WM_event_tablet_data_default_set(struct wmTabletData *tablet_data)
void WM_opengl_context_release(void *context)
Definition: wm_window.c:2449
int WM_enum_search_invoke(struct bContext *C, struct wmOperator *op, const struct wmEvent *event)
void WM_exit_ex(struct bContext *C, const bool do_python)
Definition: wm_init_exit.c:473
bool WM_gesture_is_modal_first(const struct wmGesture *gesture)
void WM_event_set_keymap_handler_post_callback(struct wmEventHandler_Keymap *handler, void(keymap_tag)(wmKeyMap *keymap, wmKeyMapItem *kmi, void *user_data), void *user_data)
void WM_init_splash(struct bContext *C)
Definition: wm_init_exit.c:398
void WM_operator_properties_filesel(struct wmOperatorType *ot, int filter, short type, short action, short flag, short display, short sort)
int WM_gesture_circle_modal(struct bContext *C, struct wmOperator *op, const struct wmEvent *event)
char * WM_operator_pystring_ex(struct bContext *C, struct wmOperator *op, const bool all_args, const bool macro_args, struct wmOperatorType *ot, struct PointerRNA *opptr)
Definition: wm_operators.c:228
bool WM_cursor_set_from_tool(struct wmWindow *win, const ScrArea *area, const ARegion *region)
Definition: wm_cursors.c:190
void WM_report(ReportType type, const char *message)
int WM_gesture_straightline_active_side_invoke(struct bContext *C, struct wmOperator *op, const struct wmEvent *event)
bool WM_operator_properties_default(struct PointerRNA *ptr, const bool do_update)
Definition: wm_operators.c:657
int WM_operator_smooth_viewtx_get(const struct wmOperator *op)
bool WM_recover_last_session(struct bContext *C, struct ReportList *reports)
Definition: wm_files.c:2613
int WM_operator_repeat_last(struct bContext *C, struct wmOperator *op)
void wmPartialViewport(rcti *drawrct, const rcti *winrct, const rcti *partialrct)
Definition: wm_subwindow.c:49
bool WM_operator_filesel_ensure_ext_imtype(wmOperator *op, const struct ImageFormatData *im_format)
void WM_init_state_app_template_set(const char *app_template)
Definition: wm_files.c:863
struct ID * WM_drag_get_local_ID_from_event(const struct wmEvent *event, short idcode)
void WM_operator_properties_gesture_straightline(struct wmOperatorType *ot, int cursor)
void WM_lib_reload(struct Library *lib, struct bContext *C, struct ReportList *reports)
void WM_event_add_notifier_ex(struct wmWindowManager *wm, const struct wmWindow *win, unsigned int type, void *reference)
void WM_operator_properties_generic_select(struct wmOperatorType *ot)
void WM_gesture_lines_cancel(struct bContext *C, struct wmOperator *op)
struct wmOperatorType * WM_operatortype_find(const char *idname, bool quiet)
void WM_event_remove_area_handler(struct ListBase *handlers, void *area)
struct ID * WM_drag_get_local_ID(const struct wmDrag *drag, short idcode)
int WM_operator_redo_popup(struct bContext *C, struct wmOperator *op)
void WM_tooltip_timer_init(struct bContext *C, struct wmWindow *win, struct ScrArea *area, struct ARegion *region, wmTooltipInitFn init)
Definition: wm_tooltip.c:76
void WM_init_native_pixels(bool do_it)
Definition: wm_window.c:2061
void WM_init_state_maximized_set(void)
Definition: wm_window.c:2050
void WM_operatortype_remove_ptr(struct wmOperatorType *ot)
void WM_window_set_dpi(const wmWindow *win)
Definition: wm_window.c:469
bool WM_event_is_last_mousemove(const struct wmEvent *event)
struct Scene * WM_window_get_active_scene(const struct wmWindow *win) ATTR_NONNULL() ATTR_WARN_UNUSED_RESULT
void WM_jobs_customdata_set(struct wmJob *, void *customdata, void(*free)(void *))
Definition: wm_jobs.c:344
double WM_tooltip_time_closed(void)
Definition: wm_tooltip.c:40
struct wmEventHandler_Op * WM_event_add_modal_handler(struct bContext *C, struct wmOperator *op)
void wmOrtho2_pixelspace(const float x, const float y)
Definition: wm_subwindow.c:125
void WM_operator_properties_free(struct PointerRNA *ptr)
Definition: wm_operators.c:711
void WM_redraw_windows(struct bContext *C)
Definition: wm_draw.c:1105
void WM_menutype_free(void)
Definition: wm_menu_type.c:87
void WM_cursor_wait(bool val)
Definition: wm_cursors.c:226
struct ID * WM_file_append_datablock(struct Main *bmain, struct Scene *scene, struct ViewLayer *view_layer, struct View3D *v3d, const char *filepath, const short id_code, const char *id_name)
void WM_window_set_active_view_layer(struct wmWindow *win, struct ViewLayer *view_layer) ATTR_NONNULL(1)
Definition: wm_window.c:2306
bool WM_uilisttype_add(struct uiListType *ult)
void WM_operator_properties_select_operation(struct wmOperatorType *ot)
void WM_cursor_modal_restore(struct wmWindow *win)
Definition: wm_cursors.c:216
void WM_tooltip_init(struct bContext *C, struct wmWindow *win)
Definition: wm_tooltip.c:109
struct ID * WM_drag_get_local_ID_or_import_from_asset(const struct wmDrag *drag, int idcode)
void WM_draw_region_viewport_bind(struct ARegion *region)
Definition: wm_draw.c:1136
void WM_script_tag_reload(void)
Definition: wm_init_exit.c:700
int WM_gesture_box_invoke(struct bContext *C, struct wmOperator *op, const struct wmEvent *event)
void WM_cursor_grab_disable(struct wmWindow *win, const int mouse_ungrab_xy[2])
Definition: wm_cursors.c:283
struct wmDropBox * WM_dropbox_add(ListBase *lb, const char *idname, bool(*poll)(struct bContext *, struct wmDrag *, const struct wmEvent *event, const char **), void(*copy)(struct wmDrag *, struct wmDropBox *), void(*cancel)(struct Main *, struct wmDrag *, struct wmDropBox *))
void WM_tooltip_timer_init_ex(struct bContext *C, struct wmWindow *win, struct ScrArea *area, struct ARegion *region, wmTooltipInitFn init, double delay)
Definition: wm_tooltip.c:60
void struct wmEvent struct wmEvent * wm_event_add(struct wmWindow *win, const struct wmEvent *event_to_add) ATTR_NONNULL(1
void WM_drag_data_free(int dragtype, void *poin)
Definition: wm_dragdrop.c:188
void * WM_draw_cb_activate(struct wmWindow *win, void(*draw)(const struct wmWindow *, void *), void *customdata)
Definition: wm_draw.c:362
char * WM_clipboard_text_get(bool selection, int *r_len)
Definition: wm_window.c:1765
struct wmGenericCallback * WM_generic_callback_steal(struct wmGenericCallback *callback)
Definition: wm_utils.c:44
int WM_gesture_lasso_modal(struct bContext *C, struct wmOperator *op, const struct wmEvent *event)
struct wmDrag * WM_event_start_drag(struct bContext *C, int icon, int type, void *poin, double value, unsigned int flags)
Definition: wm_dragdrop.c:140
void WM_generic_callback_free(struct wmGenericCallback *callback)
Definition: wm_utils.c:32
void WM_drag_free_list(struct ListBase *lb)
Definition: wm_dragdrop.c:212
char * WM_operator_pystring(struct bContext *C, struct wmOperator *op, const bool all_args, const bool macro_args)
Definition: wm_operators.c:303
void WM_window_cursor_keymap_status_refresh(struct bContext *C, struct wmWindow *win)
void WM_event_remove_timer_notifier(struct wmWindowManager *wm, struct wmWindow *win, struct wmTimer *timer)
Definition: wm_window.c:1703
struct wmKeyMap * WM_event_get_keymap_from_toolsystem(struct wmWindowManager *wm, struct wmEventHandler_Keymap *handler)
struct WorkSpace * WM_windows_workspace_get_from_screen(const wmWindowManager *wm, const struct bScreen *screen) ATTR_NONNULL() ATTR_WARN_UNUSED_RESULT
struct Scene * WM_windows_scene_get_from_screen(const struct wmWindowManager *wm, const struct bScreen *screen) ATTR_NONNULL() ATTR_WARN_UNUSED_RESULT
void WM_jobs_kill_type(struct wmWindowManager *wm, void *owner, int job_type)
Definition: wm_jobs.c:572
bool WM_stereo3d_enabled(struct wmWindow *win, bool only_fullscreen_test)
Definition: wm_stereo.c:156
void WM_operatortype_append_ptr(void(*opfunc)(struct wmOperatorType *, void *), void *userdata)
void WM_gestures_remove(struct wmWindow *win)
Definition: wm_gesture.c:117
struct wmEventHandler_UI * WM_event_add_ui_handler(const struct bContext *C, ListBase *handlers, wmUIHandlerFunc handle_fn, wmUIHandlerRemoveFunc remove_fn, void *user_data, const char flag)
void WM_file_tag_modified(void)
Definition: wm_files.c:158
char * WM_jobs_name(struct wmWindowManager *wm, void *owner)
Definition: wm_jobs.c:292
double WM_jobs_starttime(struct wmWindowManager *wm, void *owner)
Definition: wm_jobs.c:281
void WM_file_autoexec_init(const char *filepath)
Definition: wm_files.c:536
struct wmPaintCursor * WM_paint_cursor_activate(short space_type, short region_type, bool(*poll)(struct bContext *C), void(*draw)(struct bContext *C, int, int, void *customdata), void *customdata)
int WM_operator_props_popup_call(struct bContext *C, struct wmOperator *op, const struct wmEvent *event)
void WM_draw_region_free(struct ARegion *region, bool hide)
Definition: wm_draw.c:1086
ListBase * WM_dropboxmap_find(const char *idname, int spaceid, int regionid)
Definition: wm_dragdrop.c:77
void WM_operator_free(struct wmOperator *op)
Definition: wm.c:292
float WM_jobs_progress(struct wmWindowManager *wm, void *owner)
Definition: wm_jobs.c:239
void WM_operator_bl_idname(char *to, const char *from)
Definition: wm_operators.c:144
void WM_operator_type_set(struct wmOperator *op, struct wmOperatorType *ot)
Definition: wm.c:345
void WM_drag_free(struct wmDrag *drag)
Definition: wm_dragdrop.c:203
struct PanelType * WM_paneltype_find(const char *idname, bool quiet)
Definition: wm_panel_type.c:42
int WM_event_modifier_flag(const struct wmEvent *event)
int WM_menu_invoke_ex(struct bContext *C, struct wmOperator *op, int opcontext)
Definition: wm_operators.c:950
struct ViewLayer * WM_window_get_active_view_layer(const struct wmWindow *win) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT
void WM_operator_properties_create_ptr(struct PointerRNA *ptr, struct wmOperatorType *ot)
Definition: wm_operators.c:584
int WM_window_pixels_x(const struct wmWindow *win)
bool(* EventHandlerPoll)(const ARegion *region, const struct wmEvent *event)
Definition: WM_api.h:240
void WM_operatortype_props_advanced_begin(struct wmOperatorType *ot)
void WM_init_opengl(void)
Definition: wm_init_exit.c:178
void WM_window_set_active_scene(struct Main *bmain, struct bContext *C, struct wmWindow *win, struct Scene *scene_new) ATTR_NONNULL()
Definition: wm_window.c:2257
void WM_event_timer_sleep(struct wmWindowManager *wm, struct wmWindow *win, struct wmTimer *timer, bool do_sleep)
void WM_reportf(ReportType type, const char *format,...) ATTR_PRINTF_FORMAT(2
bool WM_window_is_maximized(const struct wmWindow *win)
void WM_init_state_size_set(int stax, int stay, int sizx, int sizy)
Definition: wm_window.c:2028
void WM_opengl_context_dispose(void *context)
Definition: wm_window.c:2437
int WM_gesture_straightline_modal(struct bContext *C, struct wmOperator *op, const struct wmEvent *event)
void WM_gesture_lasso_cancel(struct bContext *C, struct wmOperator *op)
void WM_operator_properties_border_to_rcti(struct wmOperator *op, struct rcti *rect)
struct wmEventHandler_Keymap * WM_event_add_keymap_handler_poll(ListBase *handlers, wmKeyMap *keymap, EventHandlerPoll poll)
void WM_main_remap_editor_id_reference(struct ID *old_id, struct ID *new_id)
bool WM_window_find_under_cursor(const wmWindowManager *wm, const wmWindow *win_ignore, const wmWindow *win, const int mval[2], wmWindow **r_win, int r_mval[2])
Definition: wm_window.c:1922
bool WM_jobs_is_stopped(wmWindowManager *wm, void *owner)
Definition: wm_jobs.c:330
void WM_operator_properties_gesture_box_zoom(struct wmOperatorType *ot)
int WM_gesture_lines_invoke(struct bContext *C, struct wmOperator *op, const struct wmEvent *event)
void WM_jobs_stop(struct wmWindowManager *wm, void *owner, void *startjob)
Definition: wm_jobs.c:584
void WM_event_remove_ui_handler(ListBase *handlers, wmUIHandlerFunc handle_fn, wmUIHandlerRemoveFunc remove_fn, void *user_data, const bool postpone)
void WM_tooltip_clear(struct bContext *C, struct wmWindow *win)
Definition: wm_tooltip.c:94
bool WM_event_drag_test_with_delta(const struct wmEvent *event, const int delta[2])
void WM_init_tablet_api(void)
Definition: wm_window.c:2072
int(* wmUIHandlerFunc)(struct bContext *C, const struct wmEvent *event, void *userdata)
Definition: WM_api.h:282
void WM_menutype_init(void)
Definition: wm_menu_type.c:81
void WM_event_modal_handler_area_replace(wmWindow *win, const struct ScrArea *old_area, struct ScrArea *new_area)
void WM_jobs_callbacks(struct wmJob *, wm_jobs_start_callback startjob, void(*initjob)(void *), void(*update)(void *), void(*endjob)(void *))
Definition: wm_jobs.c:372
struct wmWindow * WM_window_open(struct bContext *C, const char *title, int x, int y, int sizex, int sizey, int space_type, bool dialog, bool temp, WindowAlignment alignment)
Definition: wm_window.c:764
int WM_operator_props_popup_confirm(struct bContext *C, struct wmOperator *op, const struct wmEvent *event)
void WM_exit(struct bContext *C) ATTR_NORETURN
Main exit function to close Blender ordinarily.
Definition: wm_init_exit.c:679
void WM_event_remove_handlers(struct bContext *C, ListBase *handlers)
void WM_operator_stack_clear(struct wmWindowManager *wm)
Definition: wm.c:401
void wmOrtho2_region_pixelspace(const struct ARegion *region)
bool WM_region_use_viewport(struct ScrArea *area, struct ARegion *region)
Definition: wm_draw.c:310
int WM_enum_search_invoke_previews(struct bContext *C, struct wmOperator *op, short prv_cols, short prv_rows)
void WM_operator_properties_gesture_circle(struct wmOperatorType *ot)
const int(* WM_gesture_lasso_path_to_array(struct bContext *C, struct wmOperator *op, int *mcoords_len))[2]
void WM_main_remove_notifier_reference(const void *reference)
void WM_cursor_grab_enable(struct wmWindow *win, int wrap, bool hide, int bounds[4])
Definition: wm_cursors.c:246
struct bScreen * WM_window_get_active_screen(const struct wmWindow *win) ATTR_NONNULL() ATTR_WARN_UNUSED_RESULT
int WM_operator_repeat(struct bContext *C, struct wmOperator *op)
void WM_operator_properties_confirm_or_exec(struct wmOperatorType *ot)
bool WM_file_read(struct bContext *C, const char *filepath, struct ReportList *reports)
Definition: wm_files.c:736
void WM_operator_properties_border_to_rctf(struct wmOperator *op, rctf *rect)
void WM_window_pixel_sample_read(const wmWindowManager *wm, const wmWindow *win, const int pos[2], float r_col[3])
Definition: wm_window.c:1958
int WM_gesture_straightline_oneshot_modal(struct bContext *C, struct wmOperator *op, const struct wmEvent *event)
void WM_operator_properties_gesture_lasso(struct wmOperatorType *ot)
void struct wmEvent * wm_event_add_ex(struct wmWindow *win, const struct wmEvent *event_to_add, const struct wmEvent *event_to_add_after) ATTR_NONNULL(1
void WM_operator_properties_checker_interval(struct wmOperatorType *ot, bool nth_can_disable)
void WM_uilisttype_free(void)
void WM_paneltype_remove(struct PanelType *pt)
Definition: wm_panel_type.c:64
void WM_cursor_warp(struct wmWindow *win, int x, int y)
Definition: wm_window.c:2091
void WM_window_ensure_active_view_layer(struct wmWindow *win) ATTR_NONNULL(1)
Definition: wm_window.c:2324
bool WM_menutype_add(struct MenuType *mt)
Definition: wm_menu_type.c:65
struct wmEventHandler_Keymap * WM_event_add_keymap_handler_v2d_mask(ListBase *handlers, wmKeyMap *keymap)
void WM_check(struct bContext *C)
Definition: wm.c:487
void wmWindowViewport(struct wmWindow *win)
Definition: wm_subwindow.c:88
struct wmEventHandler_Dropbox * WM_event_add_dropbox_handler(ListBase *handlers, ListBase *dropboxes)
void wmViewport(const struct rcti *winrct)
int WM_operator_name_call_ptr(struct bContext *C, struct wmOperatorType *ot, short context, struct PointerRNA *properties)
void WM_window_screen_rect_calc(const struct wmWindow *win, struct rcti *r_rect)
const char * WM_operatortype_name(struct wmOperatorType *ot, struct PointerRNA *properties)
void WM_paint_cursor_remove_by_type(struct wmWindowManager *wm, void *draw_fn, void(*free)(void *))
IDProperty * WM_operator_last_properties_ensure_idprops(struct wmOperatorType *ot)
void WM_operator_properties_checker_interval_from_op(struct wmOperator *op, struct CheckerIntervalParams *op_params)
const char * WM_context_member_from_ptr(struct bContext *C, const struct PointerRNA *ptr)
struct wmOperatorType * WM_operatortype_append_macro(const char *idname, const char *name, const char *description, int flag)
float WM_event_tablet_data(const struct wmEvent *event, int *pen_flip, float tilt[2])
bool WM_menutype_poll(struct bContext *C, struct MenuType *mt)
Definition: wm_menu_type.c:102
void WM_operator_py_idname(char *to, const char *from)
Definition: wm_operators.c:123
void WM_tooltip_timer_clear(struct bContext *C, struct wmWindow *win)
Definition: wm_tooltip.c:82
void WM_tooltip_immediate_init(struct bContext *C, struct wmWindow *win, struct ScrArea *area, struct ARegion *region, wmTooltipInitFn init)
Definition: wm_tooltip.c:45
int WM_generic_select_invoke(struct bContext *C, struct wmOperator *op, const struct wmEvent *event)
void WM_operator_properties_alloc(struct PointerRNA **ptr, struct IDProperty **properties, const char *opstring)
Definition: wm_operators.c:605
void WM_init_state_start_with_console_set(bool value)
Definition: wm_init_exit.c:164
bool WM_operator_repeat_check(const struct bContext *C, struct wmOperator *op)
void WM_progress_clear(struct wmWindow *win)
Definition: wm_window.c:1831
void WM_event_modal_handler_region_replace(wmWindow *win, const struct ARegion *old_region, struct ARegion *new_region)
void struct wmEvent struct wmEvent void wm_event_init_from_window(struct wmWindow *win, struct wmEvent *event)
int WM_userdef_event_type_from_keymap_type(int kmitype)
struct wmEventHandler_Keymap * WM_event_add_keymap_handler(ListBase *handlers, wmKeyMap *keymap)
void WM_gesture_box_cancel(struct bContext *C, struct wmOperator *op)
void WM_job_main_thread_lock_release(struct wmJob *job)
Definition: wm_jobs.c:145
struct wmKeyMap * WM_event_get_keymap_from_toolsystem_fallback(struct wmWindowManager *wm, struct wmEventHandler_Keymap *handler)
void WM_operator_properties_border(struct wmOperatorType *ot)
bool WM_operator_last_properties_store(struct wmOperator *op)
Definition: wm_operators.c:782
void WM_jobs_start(struct wmWindowManager *wm, struct wmJob *)
Definition: wm_jobs.c:450
int WM_operator_confirm_or_exec(struct bContext *C, struct wmOperator *op, const struct wmEvent *event)
struct GPUViewport * WM_draw_region_get_bound_viewport(struct ARegion *region)
Definition: wm_draw.c:644
int WM_operator_props_dialog_popup(struct bContext *C, struct wmOperator *op, int width)
struct wmOperatorTypeMacro * WM_operatortype_macro_define(struct wmOperatorType *ot, const char *idname)
wmKeyMapItem * WM_event_match_keymap_item(struct bContext *C, wmKeyMap *keymap, const struct wmEvent *event)
struct wmGesture * WM_gesture_new(struct wmWindow *window, const struct ARegion *region, const struct wmEvent *event, int type)
void WM_event_free_ui_handler_all(struct bContext *C, ListBase *handlers, wmUIHandlerFunc handle_fn, wmUIHandlerRemoveFunc remove_fn)
wmOperator * WM_operator_last_redo(const struct bContext *C)
void WM_init_state_fullscreen_set(void)
Definition: wm_window.c:2038
void WM_jobs_kill(struct wmWindowManager *wm, void *owner, void(*)(void *, short int *, short int *, float *))
Definition: wm_jobs.c:596
void WM_operator_properties_gesture_box_select(struct wmOperatorType *ot)
struct wmEvent * WM_event_add_simulate(struct wmWindow *win, const struct wmEvent *event_to_add)
void WM_init_window_focus_set(bool do_it)
Definition: wm_window.c:2056
void WM_reinit_gizmomap_all(struct Main *bmain)
void WM_draw_region_viewport_ensure(struct ARegion *region, short space_type)
Definition: wm_draw.c:1130
void WM_operator_properties_select_random(struct wmOperatorType *ot)
void WM_gestures_free_all(struct wmWindow *win)
Definition: wm_gesture.c:110
int WM_window_pixels_y(const struct wmWindow *win)
@ WM_JOB_EXCL_RENDER
Definition: WM_api.h:725
@ WM_JOB_PROGRESS
Definition: WM_api.h:726
@ WM_JOB_PRIORITY
Definition: WM_api.h:724
struct wmTimer * WM_event_add_timer(struct wmWindowManager *wm, struct wmWindow *win, int event_type, double timestep)
Definition: wm_window.c:1632
int WM_gesture_lasso_invoke(struct bContext *C, struct wmOperator *op, const struct wmEvent *event)
struct ScrArea * WM_window_status_area_find(struct wmWindow *win, struct bScreen *screen)
struct GPUViewport * WM_draw_region_get_viewport(struct ARegion *region)
Definition: wm_draw.c:634
int WM_event_absolute_delta_x(const struct wmEvent *event)
void WM_draw_region_viewport_unbind(struct ARegion *region)
Definition: wm_draw.c:1141
bool WM_operator_winactive(struct bContext *C)
bool WM_drag_is_ID_type(const struct wmDrag *drag, int idcode)
int WM_operator_call_ex(struct bContext *C, struct wmOperator *op, const bool store)
struct wmJob * WM_jobs_get(struct wmWindowManager *wm, struct wmWindow *win, void *owner, const char *name, int flag, int job_type)
Definition: wm_jobs.c:196
void WM_operator_view3d_unit_defaults(struct bContext *C, struct wmOperator *op)
Definition: wm_operators.c:915
void WM_uilisttype_init(void)
void WM_operator_properties_sanitize(struct PointerRNA *ptr, const bool no_context)
Definition: wm_operators.c:620
bool WM_operatortype_remove(const char *idname)
void WM_tooltip_refresh(struct bContext *C, struct wmWindow *win)
Definition: wm_tooltip.c:145
int WM_operator_confirm_message_ex(struct bContext *C, struct wmOperator *op, const char *title, const int icon, const char *message, const short opcontext)
void WM_event_fileselect_event(struct wmWindowManager *wm, void *ophandle, int eventval)
void WM_paneltype_clear(void)
Definition: wm_panel_type.c:79
WindowAlignment
Definition: WM_api.h:175
@ WIN_ALIGN_LOCATION_CENTER
Definition: WM_api.h:177
@ WIN_ALIGN_ABSOLUTE
Definition: WM_api.h:176
@ WIN_ALIGN_PARENT_CENTER
Definition: WM_api.h:178
void WM_event_add_mousemove(wmWindow *win)
wmKeyMapItem * WM_event_match_keymap_item_from_handlers(struct bContext *C, struct wmWindowManager *wm, struct ListBase *handlers, const struct wmEvent *event)
int WM_generic_select_modal(struct bContext *C, struct wmOperator *op, const struct wmEvent *event)
static btDbvtVolume bounds(btDbvtNode **leaves, int count)
Definition: btDbvt.cpp:299
void sort(btMatrix3x3 &U, btVector3 &sigma, btMatrix3x3 &V, int t)
Helper function of 3X3 SVD for sorting singular values.
std::string id_name(void *id)
StackEntry * from
Scene scene
void * user_data
DEGForeachIDComponentCallback callback
DRWShaderLibrary * lib
#define str(s)
uint pos
DO_INLINE void filter(lfVector *V, fmatrix3x3 *S)
format
Definition: logImageCore.h:47
static void area(int d1, int d2, int e1, int e2, float weights[2])
static GPUContext * wrap(Context *ctx)
static void update(bNodeTree *ntree)
static void copy(bNodeTree *dest_ntree, bNode *dest_node, const bNode *src_node)
struct SELECTID_Context context
Definition: select_engine.c:47
Definition: DNA_ID.h:273
Definition: BKE_main.h:116
char idname[BKE_ST_MAXNAME]
Definition: BKE_screen.h:375
char idname[BKE_ST_MAXNAME]
Definition: BKE_screen.h:241
Wrapper for bScreen.
char idname[BKE_ST_MAXNAME]
Definition: BKE_screen.h:338
unsigned int flags
Definition: WM_types.h:919
void * poin
Definition: WM_types.h:908
int icon
Definition: WM_types.h:905
double value
Definition: WM_types.h:910
float scale
Definition: WM_types.h:914
int sx
Definition: WM_types.h:915
int sy
Definition: WM_types.h:915
bool(* poll)(struct bContext *, struct wmDrag *, const wmEvent *, const char **)
Definition: WM_types.h:933
void(* cancel)(struct Main *, struct wmDrag *, struct wmDropBox *)
Definition: WM_types.h:942
struct wmWindow * win
wmUIHandlerRemoveFunc remove_fn
wmUIHandlerFunc handle_fn
Definition: wm_jobs.c:73
double timestep
Definition: wm_jobs.c:108
int flag
Definition: wm_jobs.c:117
short job_type
Definition: wm_jobs.c:118
wm_jobs_start_callback startjob
Definition: wm_jobs.c:90
void(* initjob)(void *)
Definition: wm_jobs.c:85
short do_update
Definition: wm_jobs.c:118
unsigned int note
Definition: wm_jobs.c:113
void * customdata
Definition: wm_jobs.c:80
void * owner
Definition: wm_jobs.c:116
char name[128]
Definition: wm_jobs.c:122
unsigned int endnote
Definition: wm_jobs.c:113
short stop
Definition: wm_jobs.c:118
void(* endjob)(void *)
Definition: wm_jobs.c:105
float progress
Definition: wm_jobs.c:119
wmWindow * win
Definition: wm_jobs.c:77
struct IDProperty * properties
const char * name
Definition: WM_types.h:721
const char * idname
Definition: WM_types.h:723
const char * description
Definition: WM_types.h:726
void(* draw)(bContext *C, int, int, void *customdata)
Definition: wm.h:40
void * customdata
Definition: wm.h:37
bool(* poll)(struct bContext *C)
Definition: wm.h:39
short region_type
Definition: wm.h:43
short space_type
Definition: wm.h:42
static ListBase dropboxes
Definition: wm_dragdrop.c:61
PointerRNA * ptr
Definition: wm_files.c:3157
char app_template[64]
Definition: wm_files.c:853
wmOperatorType * ot
Definition: wm_files.c:3156
wmXrSessionState * WM_xr_session_state_handle_get(const wmXrData *xr)
void WM_xr_session_base_pose_reset(wmXrData *xr)
bool WM_xr_session_state_viewer_pose_matrix_info_get(const wmXrData *xr, float r_viewmat[4][4], float *r_focal_len)
bool WM_xr_session_is_ready(const wmXrData *xr)
bool WM_xr_session_state_viewer_pose_location_get(const wmXrData *xr, float r_location[3])
bool WM_xr_session_exists(const wmXrData *xr)
Definition: wm_xr_session.c:99
bool WM_xr_session_state_viewer_pose_rotation_get(const wmXrData *xr, float r_rotation[4])