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