X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=cl_gecko.h;h=fd12e801ec8d085f5938453e568393ef59effdef;hb=1f38eee898a31c94cd3b9931ea3af6e83d51c2c4;hp=d73f70592012097cb8cacb28add4ef9f9808ea34;hpb=d5892a29c4f1e6954eb59ffc790d29d3f9925fe2;p=xonotic%2Fdarkplaces.git diff --git a/cl_gecko.h b/cl_gecko.h index d73f7059..fd12e801 100644 --- a/cl_gecko.h +++ b/cl_gecko.h @@ -1,12 +1,9 @@ // Andreas Kirsch 07 -#ifdef SUPPORT_GECKO - #ifndef CL_GECKO_H #define CL_GECKO_H -#define DEFAULT_GECKO_WIDTH 512 -#define DEFAULT_GECKO_HEIGHT DEFAULT_GECKO_WIDTH +#include "cl_dyntexture.h" #define CLGECKOPREFIX CLDYNTEXTUREPREFIX "gecko/" #define MAX_GECKO_INSTANCES 16 @@ -25,16 +22,19 @@ void CL_Gecko_Frame( void ); void CL_Gecko_Init( void ); void CL_Gecko_Shutdown( void ); -clgecko_t * CL_Gecko_CreateBrowser( const char *name ); +clgecko_t * CL_Gecko_CreateBrowser( const char *name, int ownerProg ); clgecko_t * CL_Gecko_FindBrowser( const char *name ); void CL_Gecko_DestroyBrowser( clgecko_t *instance ); void CL_Gecko_NavigateToURI( clgecko_t *instance, const char *URI ); +// x and y between 0.0 and 1.0 (0.0 is top-left?) void CL_Gecko_Event_CursorMove( clgecko_t *instance, float x, float y ); // returns whether the key/button event was handled or not -qboolean CL_Gecko_Event_Key( clgecko_t *instance, int key, clgecko_buttoneventtype_t eventtype ); +qboolean CL_Gecko_Event_Key( clgecko_t *instance, keynum_t key, clgecko_buttoneventtype_t eventtype ); +void CL_Gecko_Resize( clgecko_t *instance, int width, int height ); +// get the ratio between gecko instance's size in the texture and the actual texture size.. +void CL_Gecko_GetTextureExtent( clgecko_t *instance, float* pwidth, float* pheight ); #endif -#endif \ No newline at end of file