5 * ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version. The Blender
11 * Foundation also sells licenses for use in proprietary software under
12 * the Blender License. See http://www.blender.org/BL/ for information
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software Foundation,
22 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
25 * All rights reserved.
27 * The Original Code is: all of this file.
29 * Contributor(s): none yet.
31 * ***** END GPL/BL DUAL LICENSE BLOCK *****
32 * These are the protos for mywindow.c -- an emulation of the
33 * (obsolete) IrisGL command set
36 #ifndef BIF_MYWINDOW_H
37 #define BIF_MYWINDOW_H
43 typedef struct BWinEvent {
52 void mywinclose(int winid);
53 void mywinposition(int winid,
58 /** Test if there are events available on a BWin queue.
60 * @param winid The ID of the window to query.
61 * @return True if there is an event available for _qread'ing.
63 int bwin_qtest(int winid);
65 /** Read an event off of the BWin queue (if available).
67 * @param winid The ID of the window to read from.
68 * @param event_r A pointer to return the event in.
69 * @return True if an event was read and @a event_r filled.
71 int bwin_qread(int winid, BWinEvent *event_r);
73 /** Add an event to the BWin queue.
75 * @param winid The ID of the window to add to.
76 * @param event A pointer to copy the event from.
78 void bwin_qadd(int winid, BWinEvent *event);
82 void bwin_load_viewmatrix(int winid, float mat[][4]);
83 void bwin_load_winmatrix(int winid, float mat[][4]);
85 void bwin_get_viewmatrix(int winid, float mat[][4]);
86 void bwin_get_winmatrix(int winid, float mat[][4]);
88 void bwin_ortho(int winid, float x1, float x2, float y1, float y2, float n, float f);
89 void bwin_ortho2(int win, float x1, float x2, float y1, float y2);
90 void bwin_frustum(int winid, float x1, float x2, float y1, float y2, float n, float f);
92 void bwin_getsize(int winid, int *x, int *y);
93 void bwin_getsuborigin(int winid, int *x, int *y);
94 void bwin_get_rect(int winid, struct rcti *rect_r);
95 void bwin_getsinglematrix(int winid, float mat[][4]);
96 void bwin_clear_viewmat(int winid);
98 int myswinopen(int parentid, int xmin, int xmax, int ymin, int ymax);
99 void myswapbuffers(void);
101 void mygetmatrix(float mat[][4]);
102 void mymultmatrix(float [][4]);
103 void myloadmatrix(float mat[][4]);
104 void mywinset(int wid);
105 void myortho(float x1, float x2, float y1, float y2, float n, float f);
106 void myortho2(float x1, float x2, float y1, float y2);
107 void mywindow(float x1, float x2, float y1, float y2, float n, float f);
108 void mygetsingmatrix(float (*)[4]);
110 void setlinestyle(int nr);
112 void BIF_wait_for_statechange(void);
117 short get_mbut(void);
118 short get_qual(void);
119 void getmouse(short *mval);
121 void warp_pointer(int x, int y);
123 int framebuffer_to_index(unsigned int col);
124 unsigned int index_to_framebuffer(int index);
126 int mywin_inmenu(void);
127 void mywin_getmenu_rect(int *x, int *y, int *sx, int *sy);
129 void my_put_frontbuffer_image(void);
130 void my_get_frontbuffer_image(int x, int y, int sx, int sy);