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