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
37 typedef struct wmPaintCursor {
38 struct wmPaintCursor *next, *prev;
42 int (*poll)(struct bContext *C);
43 void (*draw)(bContext *C, int, int, void *customdata);
46 extern void wm_close_and_free(bContext *C, wmWindowManager *);
47 extern void wm_close_and_free_all(bContext *C, ListBase *);
49 extern void wm_add_default(bContext *C);
50 extern void wm_clear_default_size(bContext *C);
52 /* register to windowmanager for redo or macro */
53 void wm_operator_register(bContext *C, wmOperator *op);
55 /* wm_operator.c, for init/exit */
56 void wm_operatortype_free(void);
57 void wm_operatortype_init(void);
58 void wm_window_keymap(wmKeyConfig *keyconf);
60 void wm_tweakevent_test(bContext *C, wmEvent *event, int action);
63 #define WM_LASSO_MIN_POINTS 1024
64 void wm_gesture_draw(struct wmWindow *win);
65 int wm_gesture_evaluate(wmGesture *gesture);
66 void wm_gesture_tag_redraw(bContext *C);
69 void wm_jobs_timer(const bContext *C, wmWindowManager *wm, wmTimer *wt);
70 void wm_jobs_timer_ended(wmWindowManager *wm, wmTimer *wt);
73 void wm_autosave_timer(const bContext *C, wmWindowManager *wm, wmTimer *wt);
74 void wm_autosave_timer_ended(wmWindowManager *wm);
75 void wm_autosave_delete(void);
76 void wm_autosave_read(bContext *C, struct ReportList *reports);
77 void wm_autosave_location(char *filepath);
79 /* init operator properties */
80 void wm_open_init_load_ui(wmOperator *op, bool use_prefs);
81 void wm_open_init_use_scripts(wmOperator *op, bool use_prefs);
83 /* hack to store circle select size - campbell, must replace with nice operator memory */
84 #define GESTURE_MEMORY
87 extern int circle_select_size;