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