2 * ***** BEGIN GPL LICENSE BLOCK *****
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software Foundation,
16 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 * The Original Code is Copyright (C) 2007 Blender Foundation.
19 * All rights reserved.
22 * Contributor(s): Blender Foundation
24 * ***** END GPL LICENSE BLOCK *****
27 /** \file blender/windowmanager/wm.h
38 #include "manipulators/wm_manipulator_wmapi.h"
40 typedef struct wmPaintCursor {
41 struct wmPaintCursor *next, *prev;
45 int (*poll)(struct bContext *C);
46 void (*draw)(bContext *C, int, int, void *customdata);
50 void wm_exit_schedule_delayed(const bContext *C);
52 extern void wm_close_and_free(bContext *C, wmWindowManager *);
53 extern void wm_close_and_free_all(bContext *C, ListBase *);
55 extern void wm_add_default(struct Main *bmain, bContext *C);
56 extern void wm_clear_default_size(bContext *C);
58 /* register to windowmanager for redo or macro */
59 void wm_operator_register(bContext *C, wmOperator *op);
61 /* wm_operator.c, for init/exit */
62 void wm_operatortype_free(void);
63 void wm_operatortype_init(void);
64 void wm_window_keymap(wmKeyConfig *keyconf);
67 void wm_gesture_draw(struct wmWindow *win);
68 int wm_gesture_evaluate(wmGesture *gesture);
69 void wm_gesture_tag_redraw(bContext *C);
71 /* wm_gesture_ops.c */
72 void wm_tweakevent_test(bContext *C, const wmEvent *event, int action);
75 void wm_jobs_timer(const bContext *C, wmWindowManager *wm, wmTimer *wt);
76 void wm_jobs_timer_ended(wmWindowManager *wm, wmTimer *wt);
79 void wm_autosave_timer(const bContext *C, wmWindowManager *wm, wmTimer *wt);
80 void wm_autosave_timer_ended(wmWindowManager *wm);
81 void wm_autosave_delete(void);
82 void wm_autosave_read(bContext *C, struct ReportList *reports);
83 void wm_autosave_location(char *filepath);
86 void wm_stereo3d_draw_interlace(wmWindow *win, struct ARegion *ar);
87 void wm_stereo3d_draw_anaglyph(wmWindow *win, struct ARegion *ar);
88 void wm_stereo3d_draw_sidebyside(wmWindow *win, int view);
89 void wm_stereo3d_draw_topbottom(wmWindow *win, int view);
91 void wm_stereo3d_mouse_offset_apply(wmWindow *win, int *r_mouse_xy);
92 int wm_stereo3d_set_exec(bContext *C, wmOperator *op);
93 int wm_stereo3d_set_invoke(bContext *C, wmOperator *op, const wmEvent *event);
94 void wm_stereo3d_set_draw(bContext *C, wmOperator *op);
95 bool wm_stereo3d_set_check(bContext *C, wmOperator *op);
96 void wm_stereo3d_set_cancel(bContext *C, wmOperator *op);
98 /* init operator properties */
99 void wm_open_init_load_ui(wmOperator *op, bool use_prefs);
100 void wm_open_init_use_scripts(wmOperator *op, bool use_prefs);
102 #endif /* __WM_H__ */