FreeWRL / FreeX3D 4.3.0
cdllFreeWRL.h
1// The following ifdef block is the standard way of creating macros which make exporting
2// from a DLL simpler. All files within this DLL are compiled with the DLLFREEWRL_EXPORTS
3// symbol defined on the command line. this symbol should not be defined on any project
4// that uses this DLL. This way any other project whose source files include this file see
5// DLLFREEWRL_API functions as being imported from a DLL, whereas this DLL sees symbols
6// defined with this macro as being exported.
7
8#ifdef __cplusplus
9extern "C" {
10#endif
11
12#ifdef _MSC_VER
13#ifdef DLLFREEWRL_EXPORTS
14#define DLLFREEWRL_API __declspec(dllexport)
15#else
16#define DLLFREEWRL_API __declspec(dllimport)
17#endif
18#else
19#define DLLFREEWRL_API
20#endif
21
22
23DLLFREEWRL_API void * dllFreeWRL_dllFreeWRL();
24DLLFREEWRL_API void * dllFreeWRL_dllFreeWRL1(int width, int height, void* windowhandle, int bEai);
25DLLFREEWRL_API void * dllFreeWRL_dllFreeWRL2(char *scene_url, int width, int height, void* windowhandle, int bEai);
26// TODO: add your methods here.
27enum KeyAction {KEYDOWN=2,KEYUP=3,KEYPRESS=1};
28//#define KeyChar 1 //KeyPress
29//#define KeyPress 2 //KeyDown
30//#define KeyRelease 3 //KeyUp
31
32enum MouseAction {MOUSEMOVE=6,MOUSEDOWN=4,MOUSEUP=5};
33// mev = ButtonPress; //4 down
34// mev = ButtonRelease; //3 up
35// mev = MotionNotify; //6 move
36enum MouseButton {LEFT=1,MIDDLE=2,RIGHT=3,NONE=0};
37/* butnum=1 left butnum=3 right (butnum=2 middle, not used by freewrl) */
38
39DLLFREEWRL_API void dllFreeWRL_setDensityFactor(void *fwctx, float density_factor);
40DLLFREEWRL_API void dllFreeWRL_onInit(void *fwctx, int width, int height, void* windowhandle, int bEai, int frontend_handles_display_thread);
41DLLFREEWRL_API void dllFreeWRL_onInitArgv(void *fwctx, int argc, char **argv, int frontend_handles_display_thread);
42DLLFREEWRL_API void dllFreeWRL_onLoad(void *fwctx, char* scene_url);
43DLLFREEWRL_API void dllFreeWRL_onResize(void *fwctx, int width, int height);
44DLLFREEWRL_API int dllFreeWRL_onMouse(void *fwctx, int mouseAction,int mouseButton,int x, int y);
45DLLFREEWRL_API int dllFreeWRL_onTouch(void *fwctx, int touchAction, unsigned int ID, int x, int y);
46DLLFREEWRL_API void dllFreeWRL_onGyro(void *fwctx, float rx, float ry, float rz);
47DLLFREEWRL_API void dllFreeWRL_onAccelerometer(void *fwctx, float ax, float ay, float az);
48DLLFREEWRL_API void dllFreeWRL_onMagnetic(void *fwctx, float azimuth, float pitch, float roll);
49DLLFREEWRL_API void dllFreeWRL_onKey(void *fwctx, int keyAction,int keyValue);
50DLLFREEWRL_API void dllFreeWRL_onDraw(void *fwctx); //use when FRONTEND_HANDLES_DISPLAY_THREAD
51DLLFREEWRL_API void dllFreeWRL_onClose(void *fwctx);
52DLLFREEWRL_API void dllFreeWRL_print(void *fwctx, char *str);
53DLLFREEWRL_API void dllFreeWRL_setTempFolder(void *fwctx, char *tmpFolder);
54DLLFREEWRL_API void dllFreeWRL_setFontFolder(void *fwctx, char *fontFolder);
55DLLFREEWRL_API int dllFreeWRL_getUpdatedCursorStyle(void *fwctx);
56DLLFREEWRL_API void* dllFreeWRL_frontenditem_dequeue(void *fwctx);
57DLLFREEWRL_API char* dllFreeWRL_resitem_getURL(void *fwctx, void *res);
58DLLFREEWRL_API int dllFreeWRL_resitem_getStatus(void *fwctx, void *res);
59DLLFREEWRL_API void dllFreeWRL_resitem_setStatus(void *fwctx, void *res, int status);
60DLLFREEWRL_API int dllFreeWRL_resitem_getType(void *fwctx, void *res);
61DLLFREEWRL_API int dllFreeWRL_resitem_getMediaType(void *fwctx, void *res);
62DLLFREEWRL_API void dllFreeWRL_resitem_enqueuNextMulti(void *fwctx, void *res);
63DLLFREEWRL_API void dllFreeWRL_resitem_setLocalPath(void *fwctx, void *res, char* path);
64DLLFREEWRL_API void dllFreeWRL_resitem_enqueue(void *fwctx, void *res);
65DLLFREEWRL_API void dllFreeWRL_resitem_load(void *fwctx, void *res);
66#ifdef SSR_SERVER
67DLLFREEWRL_API void dllFreeWRL_SSRserver_enqueue_request_and_wait(void *fwctx, void *request);
68#endif //SSR_SERVER
69DLLFREEWRL_API void dllFreeWRL_commandline(void *fwctx, char *cmdline);
70
71#ifdef __cplusplus
72}
73#endif