1 /* This is a small demo of the high-performance GUIX graphics framework. */
2
3 #include <stdio.h>
4 #include "gx_api.h"
5 #include "demo_display_resolution_MAIN_DISPLAY_resources.h"
6 #include "demo_display_resolution_SECONDARY_resources.h"
7 #include "demo_display_resolution_specifications.h"
8
9 #define DROP_LIST_VISIBLE_ROWS 5
10
11 GX_WINDOW *pTextScreen;
12 GX_WINDOW *pWindowScreen;
13 GX_WINDOW *pButtonScreen;
14 GX_WINDOW *pIndicatorScreen;
15 GX_SCROLLBAR list_scroll;
16
17 /* Define the ThreadX demo thread control block and stack. */
18
19 GX_WINDOW_ROOT *root_1;
20 GX_WINDOW_ROOT *root_2;
21
22 typedef struct {
23 GX_PROMPT prompt;
24 CHAR text[80];
25 } DROP_LIST_WIDGET;
26
27
28 /* Define prototypes. */
29 VOID start_guix(VOID);
30 extern UINT win32_graphics_driver_setup_565rgb(GX_DISPLAY *display);
31 extern UINT win32_graphics_driver_setup_8bit_palette(GX_DISPLAY *display);
32
main(int argc,char ** argv)33 int main(int argc, char ** argv)
34 {
35 tx_kernel_enter();
36 return(0);
37 }
38
39
tx_application_define(void * first_unused_memory)40 VOID tx_application_define(void *first_unused_memory)
41 {
42 /* Create the main demo thread. */
43
44 start_guix();
45 }
46
start_guix(void)47 VOID start_guix(void)
48 {
49 /* Initialize GUIX. */
50 gx_system_initialize();
51
52 gx_studio_display_configure(MAIN_DISPLAY, win32_graphics_driver_setup_565rgb,
53 MAIN_DISPLAY_LANGUAGE_ENGLISH, MAIN_DISPLAY_THEME_1, &root_1);
54
55 /* create the windows screen */
56 gx_studio_named_widget_create("MAIN_DISPLAY_main_window", (GX_WIDGET *) root_1, (GX_WIDGET **) &pWindowScreen);
57
58 gx_studio_display_configure(SECONDARY, win32_graphics_driver_setup_8bit_palette,
59 SECONDARY_LANGUAGE_ENGLISH, SECONDARY_THEME_1, &root_2);
60
61 /* create the windows screen */
62 gx_studio_named_widget_create("SECONDARY_window", (GX_WIDGET *)root_2, GX_NULL);
63
64
65 /* Show the root window to make it and patients screen visible. */
66 gx_widget_show(root_1);
67 gx_widget_show(root_2);
68
69 /* start the GUIX thread */
70 gx_system_start();
71 }
72
73
74