4 * ***** BEGIN GPL LICENSE BLOCK *****
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software Foundation,
18 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 * The Original Code is Copyright (C) 2007 Blender Foundation.
21 * All rights reserved.
24 * Contributor(s): Blender Foundation
26 * ***** END GPL LICENSE BLOCK *****
31 /* dna-savable wmStructs here */
32 #include "DNA_windowmanager_types.h"
36 struct wmEventHandler;
39 void WM_setprefsize (int stax, int stay, int sizx, int sizy);
41 void WM_init (struct bContext *C);
42 void WM_exit (struct bContext *C);
43 void WM_main (struct bContext *C);
46 int WM_read_homefile (struct bContext *C, int from_memory);
47 int WM_write_homefile (struct bContext *C, struct wmOperator *op);
48 void WM_read_file (struct bContext *C, char *name);
49 void WM_write_file (struct bContext *C, char *target);
50 void WM_read_autosavefile(struct bContext *C);
51 void WM_write_autosave (struct bContext *C);
54 void WM_init_cursor_data (void);
55 void WM_set_cursor (struct bContext *C, int curs);
56 void WM_waitcursor (struct bContext *C, int val);
57 void WM_timecursor (struct bContext *C, int nr);
59 /* keymap and handlers */
60 void WM_keymap_set_item (ListBase *lb, char *idname, short type,
61 short val, int modifier, short keymodifier);
62 void WM_keymap_verify_item(ListBase *lb, char *idname, short type,
63 short val, int modifier, short keymodifier);
64 struct wmEventHandler *WM_event_add_keymap_handler(ListBase *keymap, ListBase *handlers);
65 struct wmEventHandler *WM_event_add_modal_keymap_handler(ListBase *keymap, ListBase *handlers, wmOperator *op);
67 void WM_event_add_notifier(wmWindowManager *wm, wmWindow *window, int swinid, int type, int value);
70 /* operator api, default callbacks */
71 /* confirm menu + exec */
72 int WM_operator_confirm (struct bContext *C, struct wmOperator *op, struct wmEvent *event);
74 int WM_operator_winactive (struct bContext *C);
77 wmOperatorType *WM_operatortype_find(const char *idname);
78 void WM_operatortypelist_append(ListBase *lb);
80 /* OpenGL wrappers, mimicing opengl syntax */
81 void wmLoadMatrix (wmWindow *win, float mat[][4]);
82 void wmGetMatrix (wmWindow *win, float mat[][4]);
83 void wmMultMatrix (wmWindow *win, float mat[][4]);
84 void wmGetSingleMatrix (wmWindow *win, float mat[][4]);
85 void wmScale (wmWindow *win, float x, float y, float z);
86 void wmLoadIdentity (wmWindow *win); /* note: old name clear_view_mat */
88 void wmFrustum (wmWindow *win, float x1, float x2, float y1, float y2, float n, float f);
89 void wmOrtho (wmWindow *win, float x1, float x2, float y1, float y2, float n, float f);
90 void wmOrtho2 (wmWindow *win, float x1, float x2, float y1, float y2);