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_32bppdriver_resources.h"
7 #include "alphamap_32bppdriver_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 GX_BOOL            alpha = GX_FALSE;
18 GX_BOOL            compressed = GX_FALSE;
19 INT                xshift;
20 INT                yshift;
21 INT                horizontal_slider = 0;
22 INT                vertical_slider = 0;
23 
24 /* Define prototypes.   */
25 VOID  demo_thread_entry(ULONG thread_input);
26 extern UINT win32_graphics_driver_setup_24xrgb(GX_DISPLAY *display);
27 
28 
main(int argc,char ** argv)29 int main(int argc, char ** argv)
30 {
31   tx_kernel_enter();
32   return(0);
33 }
34 
35 
tx_application_define(void * first_unused_memory)36 VOID tx_application_define(void *first_unused_memory)
37 {
38 
39     /* Create the main demo thread.  */
40     tx_thread_create(&demo_thread, "GUIX Demo Thread", demo_thread_entry,
41                      0,  demo_thread_stack, sizeof(demo_thread_stack),
42                      1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
43 }
44 
45 
demo_thread_entry(ULONG thread_input)46 VOID  demo_thread_entry(ULONG thread_input)
47 {
48     /* Initialize GUIX.  */
49     gx_system_initialize();
50 
51 
52     gx_studio_display_configure(DISPLAY_1, win32_graphics_driver_setup_24xrgb,
53                                 LANGUAGE_ENGLISH, DISPLAY_1_THEME_1, &root);
54 
55     /* create the main screen */
56     gx_studio_named_widget_create("window", (GX_WIDGET *) root, (GX_WIDGET **) &pMainWin);
57 
58     /* Show the root window to make it and patients screen visible.  */
59     gx_widget_show(root);
60 
61     /* let GUIX run */
62     gx_system_start();
63 }
64 
65 
pic_win_draw(GX_WINDOW * window)66 VOID pic_win_draw(GX_WINDOW *window)
67 {
68     gx_window_draw((GX_WINDOW*)window);
69 
70 }