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 "gx_validation_utility.h" 7 8 TEST_PARAM test_parameter = { 9 "guix_extended_unicode", /* Test name */ 10 0, 0, 640, 480 /* Define the coordinates of the capture area. 11 In this test. */ 12 }; 13 14 static VOID control_thread_entry(ULONG); main(int argc,char ** argv)15int main(int argc, char ** argv) 16 { 17 /* Parse the command line argument. */ 18 gx_validation_setup(argc, argv); 19 20 /* Start ThreadX system */ 21 tx_kernel_enter(); 22 return(0); 23 } 24 tx_application_define(void * first_unused_memory)25VOID tx_application_define(void *first_unused_memory) 26 { 27 28 /* Create a dedicated thread to perform various operations 29 on the prompt drawing example. These operations simulate 30 user input. */ 31 gx_validation_control_thread_create(control_thread_entry); 32 33 /* Termiante the test if it runs for more than 100 ticks */ 34 /* This function is not implemented yet. */ 35 gx_validation_watchdog_create(100); 36 37 /* Call the actual prompt routine. */ 38 gx_validation_application_define(first_unused_memory); 39 40 } 41 42 43 /* Replace the default graphics driver with the validation driver. */ 44 #ifdef win32_graphics_driver_setup_24xrgb 45 #undef win32_graphics_driver_setup_24xrgb 46 #endif 47 #define win32_graphics_driver_setup_24xrgb gx_validation_graphics_driver_setup_24xrgb 48 49 50 #ifdef WIN32 51 #undef WIN32 52 #endif 53 54 #include "gx_validation_wrapper.h" 55 56 #include "extended_unicode.c" 57 58 char test_comment[256]; 59 control_thread_entry(ULONG input)60static VOID control_thread_entry(ULONG input) 61 { 62 INT frame_id = 1; 63 64 gx_validation_set_frame_id(frame_id); 65 66 sprintf(test_comment, "Screen shot of extended unicode draw demo."); 67 68 gx_validation_set_frame_comment(test_comment); 69 70 /* Mark the window "dirty". */ 71 gx_system_dirty_mark((GX_WIDGET *)&screen_base); 72 73 /* Force a screen refresh. */ 74 gx_validation_screen_refresh(); 75 76 /* Signal the end of the test case. Verify the output. */ 77 gx_validation_end(); 78 79 exit(0); 80 } 81