#include <cx/buffer.h>
#include <cx/array_list.h>
+#include <ui/ui.h>
+
static XtAppContext app;
static Display *display;
static Widget toplevel_window;
}
}
+XtAppContext ui_motif_get_app(void);
+Display* ui_motif_get_display(void);
+
int main(int argc, char** argv) {
// disable stdout buffering, because the netbeans's internal terminal
// has a bug on freebsd and doesn't flush the output after a newline
perror("pipe");
return 2;
}
-
+
// initialize toolkit
- XtToolkitInitialize();
- XtSetLanguageProc(NULL, langProc, NULL);
- app = XtCreateApplicationContext();
- XtAppSetFallbackResources(app, fallback);
+ //XtToolkitInitialize();
+ //XtSetLanguageProc(NULL, langProc, NULL);
+ ui_init("uwplayer", argc, argv);
+ //app = XtCreateApplicationContext();
+ app = ui_motif_get_app();
+ // TODO: add tooltip API for fallback resources
+ //XtAppSetFallbackResources(app, fallback);
- display = XtOpenDisplay(app, NULL, APP_NAME, APP_CLASS, NULL, 0, &argc, argv);
+ //display = XtOpenDisplay(app, NULL, APP_NAME, APP_CLASS, NULL, 0, &argc, argv);
+ display = ui_motif_get_display();
PlaybackMode playback = PLAYBACK_STOP;
bool fullscreen = FALSE;
}
WindowShow(window);
+
+#ifndef UI_MOTIF
+ ui_main();
+#else
AppMainLoop(app);
+#endif
+
return 0;
}