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 #include "glyph_draw_resources.h"
7 #include "glyph_draw_specifications.h"
8 
9 /* Define the ThreadX demo thread control block and stack.  */
10 
11 TX_THREAD          demo_thread;
12 UCHAR              demo_thread_stack[4096];
13 GX_WINDOW_ROOT    *root;
14 
15 /* Define prototypes.   */
16 VOID  demo_thread_entry(ULONG thread_input);
17 extern UINT win32_graphics_driver_setup_565rgb(GX_DISPLAY *display);
18 
main(int argc,char ** argv)19 int main(int argc, char ** argv)
20 {
21   tx_kernel_enter();
22   return(0);
23 }
24 
tx_application_define(void * first_unused_memory)25 VOID tx_application_define(void *first_unused_memory)
26 {
27     /* Create the main demo thread.  */
28     tx_thread_create(&demo_thread, "GUIX Demo Thread", demo_thread_entry,
29                      0,  demo_thread_stack, sizeof(demo_thread_stack),
30                      1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
31 }
32 
33 
demo_thread_entry(ULONG thread_input)34 VOID  demo_thread_entry(ULONG thread_input)
35 {
36     /* Initialize GUIX.  */
37     gx_system_initialize();
38 
39     gx_studio_display_configure(DISPLAY_1, win32_graphics_driver_setup_565rgb,
40                                 LANGUAGE_ENGLISH, DISPLAY_1_THEME_1, &root);
41 
42     /* Sreate the main screen */
43     gx_studio_named_widget_create("main_screen", (GX_WIDGET *) root, GX_NULL);
44 
45     /* Show the root window to make it and patients screen visible.  */
46     gx_widget_show(root);
47 
48     /* Let GUIX run */
49     gx_system_start();
50 }
51