Blender  V2.59
wm.h
Go to the documentation of this file.
00001 /*
00002  * $Id: wm.h 36736 2011-05-18 06:27:32Z campbellbarton $
00003  *
00004  * ***** BEGIN GPL LICENSE BLOCK *****
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU General Public License
00008  * as published by the Free Software Foundation; either version 2
00009  * of the License, or (at your option) any later version. 
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software Foundation,
00018  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00019  *
00020  * The Original Code is Copyright (C) 2007 Blender Foundation.
00021  * All rights reserved.
00022  *
00023  * 
00024  * Contributor(s): Blender Foundation
00025  *
00026  * ***** END GPL LICENSE BLOCK *****
00027  */
00028 
00033 #ifndef WM_H
00034 #define WM_H
00035 
00036 struct wmWindow;
00037 struct ReportList;
00038 
00039 typedef struct wmPaintCursor {
00040         struct wmPaintCursor *next, *prev;
00041 
00042         void *customdata;
00043         
00044         int (*poll)(struct bContext *C);
00045         void (*draw)(bContext *C, int, int, void *customdata);
00046 } wmPaintCursor;
00047 
00048 extern void wm_close_and_free(bContext *C, wmWindowManager *);
00049 extern void wm_close_and_free_all(bContext *C, ListBase *);
00050 
00051 extern void wm_add_default(bContext *C);
00052 extern void wm_clear_default_size(bContext *C);
00053                         
00054                         /* register to windowmanager for redo or macro */
00055 void            wm_operator_register(bContext *C, wmOperator *op);
00056 
00057 extern void wm_report_free(wmReport *report);
00058 
00059 /* wm_operator.c, for init/exit */
00060 void wm_operatortype_free(void);
00061 void wm_operatortype_init(void);
00062 void wm_window_keymap(wmKeyConfig *keyconf);
00063 
00064 void wm_tweakevent_test(bContext *C, wmEvent *event, int action);
00065 
00066 /* wm_gesture.c */
00067 #define WM_LASSO_MIN_POINTS             1024
00068 void wm_gesture_draw(struct wmWindow *win);
00069 int wm_gesture_evaluate(wmGesture *gesture);
00070 void wm_gesture_tag_redraw(bContext *C);
00071 
00072 /* wm_jobs.c */
00073 void wm_jobs_timer(const bContext *C, wmWindowManager *wm, wmTimer *wt);
00074 void wm_jobs_timer_ended(wmWindowManager *wm, wmTimer *wt);
00075 
00076 /* wm_files.c */
00077 void wm_autosave_timer(const bContext *C, wmWindowManager *wm, wmTimer *wt);
00078 void wm_autosave_timer_ended(wmWindowManager *wm);
00079 void wm_autosave_delete(void);
00080 void wm_autosave_read(bContext *C, struct ReportList *reports);
00081 void wm_autosave_location(char *filepath);
00082 
00083 /* hack to store circle select size - campbell, must replace with nice operator memory */
00084 #define GESTURE_MEMORY
00085 
00086 #ifdef GESTURE_MEMORY
00087 extern int circle_select_size;
00088 #endif
00089 
00090 #endif /* WM_H */
00091