1 /* This is a small demo of the high-performance GUIX graphics framework. */
2
3 #include <stdio.h>
4 #include "tx_api.h"
5 #include "gx_api.h"
6
7 #include "farsi_glyph_shaping_resources.h"
8 #include "farsi_glyph_shaping_specifications.h"
9
10 /* Define the ThreadX demo thread control block and stack. */
11
12 TX_THREAD demo_thread;
13 UCHAR demo_thread_stack[4096];
14
15 GX_WINDOW_ROOT *root;
16
17 /* Define prototypes. */
18 VOID demo_thread_entry(ULONG thread_input);
19 extern UINT win32_graphics_driver_setup_24xrgb(GX_DISPLAY *display);
20
main(int argc,char ** argv)21 int main(int argc, char ** argv)
22 {
23 tx_kernel_enter();
24 return(0);
25 }
26
tx_application_define(void * first_unused_memory)27 VOID tx_application_define(void *first_unused_memory)
28 {
29 /* Create the main demo thread. */
30 tx_thread_create(&demo_thread, "GUIX Demo Thread", demo_thread_entry,
31 0, demo_thread_stack, sizeof(demo_thread_stack),
32 1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
33 }
34
demo_thread_entry(ULONG thread_input)35 VOID demo_thread_entry(ULONG thread_input)
36 {
37 /* Initialize GUIX. */
38 gx_system_initialize();
39
40 gx_studio_display_configure(DISPLAY_1, win32_graphics_driver_setup_24xrgb,
41 0, 0, &root);
42
43 /* create the main screen */
44 gx_studio_named_widget_create("main_screen", (GX_WIDGET *) root, GX_NULL);
45
46 /* Show the root window to make it and patients screen visible. */
47 gx_widget_show(root);
48
49 /* let GUIX run */
50 gx_system_start();
51 }