27 #ifndef __LIBFREEWRL_API_H__
28 #define __LIBFREEWRL_API_H__
34 #if defined(_MSC_VER) || defined(_ANDROID)
35 #ifndef _MIMIC_X11_SCREEN_BUTTONS
36 #define _MIMIC_X11_SCREEN_BUTTONS
40 #define ButtonRelease 5
41 #define MotionNotify 6
49 #ifdef COMPILING_IPHONE_FRONT_END
54 void fwl_initializeRenderSceneUpdateScene(
void);
62 const char *libFreeWRL_get_version();
65 const char *fwl_libFreeWRL_get_version();
66 const char *fwl_freewrl_get_version();
80 long int winToEmbedInto;
86 bool frontend_handles_display_thread;
108 void *fwl_init_instance();
113 void terminateFreeWRL();
115 int fwl_parse_geometry_string(
const char *geometry,
int *out_width,
int *out_height,
116 int *out_xpos,
int *out_ypos);
121 int ConsoleMessage(
const char *fmt, ...);
125 bool Anchor_ReplaceWorld();
127 #define VIEWER_NONE 0
128 #define VIEWER_EXAMINE 1
129 #define VIEWER_WALK 2
130 #define VIEWER_EXFLY 3
132 #define VIEWER_SPHERICAL 5
133 #define VIEWER_FLY2 6
134 #define VIEWER_TILT 7
135 #define VIEWER_TPLANE 8
136 #define VIEWER_RPLANE 9
137 #define VIEWER_TURNTABLE 10
138 #define VIEWER_LOOKAT 11
139 #define VIEWER_EXPLORE 12
140 #define VIEWER_YAWZ 13
142 #define VIEWER_YAWPITCH 15
143 #define VIEWER_ROLL 16
144 #define VIEWER_DIST 17
147 #define CHORD_YAWPITCH 1
151 void setStereoBufferStyle(
int);
158 #define INT_ID_UNDEFINED -1
161 #define RUNNINGASPLUGIN (isBrowserPlugin)
163 extern char *BrowserFullPath;
165 extern int _fw_pipe, _fw_FD;
166 extern int _fw_browser_plugin;
167 extern int isBrowserPlugin;
169 extern uintptr_t _fw_instance;
173 extern int with_libcurl;
180 void fwl_set_strictParsing(
bool flag);
181 void fwl_set_plugin_print(
bool flag);
182 void fwl_set_occlusion_disable(
bool flag);
183 void fwl_set_print_opengl_errors(
bool flag);
184 void fwl_set_trace_threads(
bool flag);
185 void fwl_set_texture_size(
unsigned int texture_size);
186 void fwl_set_glClearColor (
float red ,
float green ,
float blue ,
float alpha);
187 void fwl_thread_dump(
void);
188 int fwg_get_unread_message_count(
void);
189 char *fwg_get_last_message();
190 void fwl_set_logfile(
char *);
191 void fwl_set_nameTest(
char *);
193 #if defined(_ANDROID)
194 int DROIDDEBUG(
const char*pFmtStr, ...);
195 void PRINTF_ALL(
const char*pFmtStr, ...);
214 OLDCODE#ifdef HAVE_MOTIF
215 OLDCODE #define MC_HAVE_MOTIF 1
217 OLDCODE #define MC_HAVE_MOTIF 0
220 OLDCODE#ifdef TARGET_MOTIF
221 OLDCODE #define MC_TARGET_MOTIF 1
223 OLDCODE #define MC_TARGET_MOTIF 0
226 OLDCODE#ifdef _MSC_VER
227 OLDCODE #define MC_MSC_HAVE_VER 1
229 OLDCODE #define MC_MSC_HAVE_VER 0
235 int fwl_StringConsoleMessage(
char* message);
237 void fwl_init_SnapGif(
void);
238 void fwl_init_PrintShot();
239 void fwl_set_SnapFile(
const char* file);
240 void fwl_set_SnapTmp(
const char* file);
241 void fwl_init_SnapSeq();
242 void fwl_toggleSnapshot();
243 void fwl_set_LineWidth(
float lwidth);
244 void fwl_set_KeyString(
const char *str);
245 void fwl_set_SeqFile(
const char* file);
246 void fwl_set_MaxImages(
int max);
247 void fwl_setCurXY(
int x,
int y);
248 void fwl_do_keyPress(
char kp,
int type);
249 void fwl_doQuit(
char *,
int);
250 void fwl_doQuitInstance(
void *instance);
251 void fwl_updateScreenDim(
int wi,
int he);
252 void fwl_doQuitAndWait();
253 void fwl_set_viewer_type(
const int type);
254 void fwl_set_modeRecord();
255 void fwl_set_modeFixture();
256 void fwl_set_modePlayback();
258 #define CHANNEL_EAI 0
263 #define RxTx_REFRESH 2
265 #define RxTx_MOREVERBOSE 8
266 #define RxTx_SILENT 16
268 #define RxTx_PENDING 64
269 #define RxTx_STOP_IF_DISCONNECT 128
270 #define RxTx_STATE 32768
271 #define RxTx_GET_VERBOSITY 65536
274 int fwlio_RxTx_control(
int channel,
int action);
275 char * fwlio_RxTx_getbuffer(
int channel) ;
276 void fwlio_RxTx_sendbuffer(
char *fromFile,
int fromLine,
int channel,
char *str);
277 char * fwlio_RxTx_waitfor(
int channel,
char *str);
279 void fwl_init_EaiVerbose();
280 char * fwl_EAI_handleBuffer(
char *tempEAIdata);
281 int fwl_EAI_allDone();
282 char * fwl_EAI_handleRest();
285 void fwl_set_ScreenDist(
const char *optArg);
286 void fwl_init_StereoDefaults(
void);
287 void fwl_set_EyeDist(
const char *optArg);
288 void fwl_init_Shutter(
void);
289 void fwl_init_SideBySide(
void);
290 void fwl_init_UpDown(
void);
291 void fwl_set_AnaglyphParameter(
const char *optArg);
292 void fwl_set_StereoParameter(
const char *optArg);
297 void fwl_initializeDisplayThread();
298 bool checkNetworkFile(
const char *fn);
299 #define fwl_checkNetworkFile(a) checkNetworkFile(a)
302 void fwl_initialize_parser();
303 void fwl_initializeInputParseThread();
304 int fwl_isinputThreadParsing();
305 int fwl_isInputThreadInitialized();
308 void fwl_initializeTextureThread();
309 int fwl_isTextureinitialized();
312 int fwl_isTextureParsing();
314 void fwl_Next_ViewPoint(
void);
315 void fwl_Prev_ViewPoint(
void);
316 void fwl_First_ViewPoint(
void);
317 void fwl_Last_ViewPoint(
void);
318 void fwl_gotoViewpoint (
char *findThisOne);
320 void fwl_startFreeWRL(
const char *url);
322 int fwl_setCurrentHandle(
void *handle,
char*,
int);
323 void fwl_clearCurrentHandle();
324 void *fwl_getCurrentHandle(
char *,
int);
326 void fwl_resource_push_single_request(
const char *request);
327 void fwl_OSX_initializeParameters(
const char* initialURL);
328 void fwl_resource_push_single_request_IE_main_scene(
const char *request);
330 void fwg_frontEndReturningData(
char* fileData,
int length,
int width,
int height,
bool hasAlpha);
333 void fwg_setConsoleParam_maxLines(
int);
334 void fwg_setConsoleParam_maxLineLength(
int);
335 void fwg_setConsoleParam_replaceTabs(
int);
337 void fwg_setFrontEndOnX3DFileLoadedListener(
void (*frontEndOnX3DFileLoadedListener)(
char *));
340 void fwg_frontEndReturningLocalFile(
char *localfile,
int iret);
341 void fwl_RenderSceneUpdateScene(
void);
342 void fwl_gotoCurrentViewPoint();
343 void fwl_setScreenDim(
int wi,
int he);
344 void fwl_setScreenDim0(
int wi,
int he);
345 void fwl_setDensityFactor(
float density_factor);
346 float fwl_getDensityFactor();
347 int fwl_hwnd_to_windex(
void *hWnd);
348 void fwl_setScreenDim1(
int wi,
int he,
int windex);
349 bool fwl_initialize_GL(
void);
351 int fwl_handle_aqua(
const int mev,
const unsigned int button,
int x,
int y);
353 int fwl_handle_mouse(
int mev,
int button,
int x,
int y,
int windex);
354 int fwl_handle_touch(
int mev,
unsigned int ID,
int x,
int y,
int windex);
355 void fwl_handle_gyro(
float rx,
float ry,
float rz);
356 void fwl_handle_accelerometer(
float ax,
float ay,
float az);
357 void fwl_handle_magnetic(
float azimuth,
float pitch,
float roll);
361 void fwl_replaceWorldNeeded(
char* str);
362 int fwl_pollPromptForURL();
363 int fwl_pollPromptForFile();
364 void fwl_setPromptForURL(
int state);
365 void fwl_setPromptForFile(
int state);
367 char *fwg_frontEndWantsFileName(
void);
368 int fv_display_initialize(
void);
369 void fwl_initializeRenderSceneUpdateScene(
void);
370 void fwl_setButDown(
int button,
int value);
374 int fwl_get_headlight();
375 char* fwl_getNavModeStr();
376 int fwl_getNavMode();
377 int fwl_getLookatMode();
378 int fwl_getCollision();
379 void fwl_setCollision(
int state);
380 int fwl_getAnaglyphSide(
int whichSide);
382 void fwl_tmpFileLocation(
char *tmpFileLocation);
383 void fwl_fontFileLocation(
char *fontFileLocation);
384 int fwl_set_ui_colorscheme(
char *colorschemename);
385 void fwl_set_ui_colors(
char *fourhtmlcolors);
386 void fwl_get_ui_color(
char *use,
float *rgb);
387 char *fwl_get_ui_colorschemename();
388 void fwl_next_ui_colorscheme();
389 int fwl_get_ui_color_changed();
390 int fwl_set_sbh_pin_option(
char *optarg);
391 int fwl_set_sbh_want_option(
char *optarg);
392 void fwl_setShadingStyle(
int style);
393 void fwl_set_sbh_pin(
int sb,
int mb);
394 void fwl_get_sbh_pin(
int *sb,
int *mb);
395 void fwl_set_target_fps(
int target_fps);
396 int fwl_get_target_fps();
397 void fwl_set_sbh_wantMenubar(
int want);
398 int fwl_get_sbh_wantMenubar();
399 void fwl_set_sbh_wantStatusbar(
int want);
400 int fwl_get_sbh_wantStatusbar();
402 int fwl_commandline(
char *cmdline);
404 void fwl_setShift(
int ishift);
406 void fwl_setHover(
int hover);
408 void fwl_setPedal(
int pedal);
410 void fwl_set_emulate_multitouch(
int ion);
411 int fwl_get_emulate_multitouch();
414 void fwl_setConsole_writePrimitive(
int ibool);
415 void statusbar_set_window_size(
int width,
int height);
416 int statusbar_handle_mouse(
int mev,
int butnum,
int mouseX,
int mouseY);
417 int getCursorStyle();
418 void *fwl_frontenditem_dequeue();
419 char* fwl_resitem_getURL(
void *res);
420 char* fwl_resitem_getTempDir(
void *res);
421 void fwl_resitem_setActualFile(
void *res,
char *fname);
422 int fwl_resitem_getStatus(
void *res);
423 int fwl_resitem_getType(
void *res);
424 int fwl_resitem_getMediaType(
void *res);
425 void fwl_resitem_enqueuNextMulti(
void *res);
426 void fwl_resitem_setLocalPath(
void *res,
char* path);
427 void fwl_resitem_enqueue(
void *res);
428 void fwl_resitem_setDownloadThread(
void *res,
void *thread);
429 void *fwl_resitem_getDownloadThread(
void *res);
430 void *fwl_resitem_getGlobal(
void *res);
432 int file2blob(
void *res);
435 void SSRserver_enqueue_request_and_wait(
void *fwctx,
void *request);