]> icculus.org git repositories - divverent/darkplaces.git/blob - cl_gecko.h
the formula for fog was right... note that it uses the unsimplified formula, as preca...
[divverent/darkplaces.git] / cl_gecko.h
1 // Andreas Kirsch 07\r
2 \r
3 #ifdef SUPPORT_GECKO\r
4 \r
5 #ifndef CL_GECKO_H\r
6 #define CL_GECKO_H\r
7 \r
8 #include "cl_dyntexture.h"\r
9 \r
10 #define CLGECKOPREFIX                   CLDYNTEXTUREPREFIX "gecko/"\r
11 #define MAX_GECKO_INSTANCES     16\r
12 \r
13 typedef enum clgecko_buttoneventtype_e {\r
14         CLG_BET_DOWN,\r
15         CLG_BET_UP,\r
16         CLG_BET_DOUBLECLICK,\r
17         // use for up + down (but dont use both)\r
18         CLG_BET_PRESS\r
19 } clgecko_buttoneventtype_t;\r
20 \r
21 typedef struct clgecko_s clgecko_t;\r
22 \r
23 void CL_Gecko_Frame( void );\r
24 void CL_Gecko_Init( void );\r
25 void CL_Gecko_Shutdown( void );\r
26 \r
27 clgecko_t * CL_Gecko_CreateBrowser( const char *name );\r
28 clgecko_t * CL_Gecko_FindBrowser( const char *name );\r
29 void CL_Gecko_DestroyBrowser( clgecko_t *instance );\r
30 \r
31 void CL_Gecko_NavigateToURI( clgecko_t *instance, const char *URI );\r
32 // x and y between 0.0 and 1.0 (0.0 is top-left?)\r
33 void CL_Gecko_Event_CursorMove( clgecko_t *instance, float x, float y );\r
34 \r
35 // returns whether the key/button event was handled or not\r
36 qboolean CL_Gecko_Event_Key( clgecko_t *instance, int key, clgecko_buttoneventtype_t eventtype );\r
37 \r
38 void CL_Gecko_Resize( clgecko_t *instance, int width, int height );\r
39 // get the ratio between gecko instance's size in the texture and the actual texture size..\r
40 void CL_Gecko_GetTextureExtent( clgecko_t *instance, float* pwidth, float* pheight );\r
41 #endif\r
42 \r
43 #endif\r
44 \r