Home

GUIX User`s Manual - Renesas Electronics

image

Contents

1. 10 Chapter 3 Functional Overview of GUIX 11 Execution Overview d IRI DHEDCNEEDEC EE IM DD T 13 ZATION aD 13 Application Interface ae ab aede de eld dodo 14 Internal GUT Thread ier tL o e DIA M a At M Me M E E 14 Event 558 15 15 User Input Soroan M 17 Modal Dialog Execution otis pedet tud de reed 17 Periodic Processing tara ue Sit 18 Display 18 Display Memory Architectures 19 Memory saga atanan ola a aes A 21 Static Memory 5 ash uit qute qupd bande 21 Dynamic Memory DUSage i EAS EAM M UA MEM M SERE 22 22 GUIX System s s cinco i n E HR d tetas ive 23 RTOS BNMANG tactu Scias Ac hcm A IND AD IN A ID A EIL SALE 23 Initialization EE 23 String Table 24 Thread PEOGOSSIDEG 25 M ltithread idi ecc dade idee ince d x edd te cde da eid ede 25 Periodic PIOGOSSIT uu testes cobi td necu te eMe aqu ct So bd tpud aed da 25 System Error Elandlifig Jodi cia cadet handel
2. 378 _widget_child_detect 380 gx_widget_children_drawW eae oa UD ERU 382 9 _ 1 NT 384 qx 386 gx widget ALC I ia Aa 388 widget created test cine tod idit idit dv 390 GUIX User Guide xii i em 391 9 _ 1 NECS 392 aat eR Ui UR MEA DR RE M AME MEE 393 RAW SSE ands oats tana ads tc ats Uoc ds Dor eae ca ends Coca nee ks 394 gx widget event 395 gx widget everit DIOGBSS 25 eot bla ME ad M pads 397 gx widget event process 56 399 qx widdet event TO d Cee d Cave us Cove cere cave cee 401 gx Widder colo een Doe Yn Doce DOC Doce e VP Doce 402 gX Widget eh ei 404 gX widget NeXt Ur Ur ur US 406 gX Widget TOCUS preViOUS soot puero urea 407 WIGGEIATONE se deme A AUI 408 gx widget front 409 qx widget helgliE gel oninia 411 Me 412 gx widget pixelmap gel
3. GUIX User Guide 122 gx context brush pattern set Set brush pattern of current drawing context Prototype UINT gx context brush pattern set ULONG pattern Description This service sets the brush pattern of the current screen context The brush pattern is used for drawing dashed lines or dashed outlines Parameters pattern Pattern to be used for the brush This is a simple hexidecimal on off pattern to be used for pattern line drawing Return Values GX SUCCESS 0x00 Successful context brush set GX INVALID CONTEXT 0x06 Invalid drawing context GX CALLER ERROR 0x11 X Invalid caller of this function Allowed From Initialization and threads Example Set the brush of the current context status gx context brush pattern set my brush If status SUCCESS the brush of the current context has been set to the specified pattern See Also gx context brush default gx context brush define gx context brush get gx context brush style set gx context brush width set gx context fill color set gx context font set gx context line color set gx context pixelmap set gx context raw brush define gx context raw fill color set gx context raw line color set GUIX User Guide 123 gx context brush style set Set brush style of current drawing context Prototype UINT gx context brush style set UINT style Description This service sets t
4. RD ND DD 63 gx_animation_start eee ee deste ined once ined nett uocant Lov buds Uoc dU Lor Eod lY 64 cx animati 2S ueniat M ain ds adea en das aule 66 pr sh d fatlt 23s 67 68 gx_button_background_drawW 70 rap DUHOM PTT TI MM 71 qx Dutton desBlg GE uoc aote ei ea i a a ap dp i aii 7 DUODECIM Saxo adu 74 gx button event Processi R 75 21610 11 76 Ox Canvas alplia Sel 77 OX CANVAS uie 78 gx_canvas_block_MOVe sc 79 qx ocanyas cirole dE SW 81 gx canvas diee d e Re de EE RR UAR ERR BUR UAE XR 82 qx canvas deleten morrir aea ace ai acetate 84 gx canvas drawing complete 85 gx canvas drawing 86 gx Canvas ellipSesCIESW xs rc e Ae AE rc ere re AE ru bue P VAR 89 0 _ De CI WS os dao dee n d PU Bed dee
5. GUIX User Guide 260 gx single line text input event process Text input widget event processing function Prototype UINT gx single line text input event process GX SINGLE LINE TEXT INPUT text input GX EVENT event ptr Description This is the default event processing function of a 9x single line text input widget Parameters text input Single line text input widget control block event ptr Pointer to GX EVENT structure Return Values GX SUCCESS 0x00 Successful single line text input create GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 Invalid pointer Allowed From Initialization and threads Example invoke backspace handler status gx single line text input event process amp my text input amp event If status is SUCCESS the text input widget has processed the event See Also 9x single line text input backspace gx single line text input buffer clear gx single line text input buffer get gx single line text input create gx single line text input character delete gx single line text input character insert gx single line text input draw gx single line text input end gx single line text input home gx single line text input left arrow gx single line text input position get gx single line text input right arrow 9x single line text input style add gx single line text input style remove gx single line te
6. DROP LIST my drop list VOID create list widget GX VERTICAL LIST list GX WIDGET row INT index GX RECTANGLE size 9x utility rectangle define amp size 10 10 80 40 9x drop list create amp my drop list my drop list GX NULL 10 100 create list widget GX STYLE BORDER RECESSED GX STYLE ENABLED ID DROP LIST amp size See Also gx drop list close gx drop list event process gx drop list open gx drop list pixelmap set gx drop list popup get GUIX User Guide 150 gx drop list event process Process drop list event Prototype UINT gx drop list event process GX DROP LIST list GX EVENT event Description This service processes an event for the drop list Parameters drop list Drop list widget control block event Pointer to event to process Return Values GX SUCCESS 0x00 Successfully processed horizontal list event GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 X Widget not valid Allowed From Initialization and threads Example Process event for drop list my list status gx drop list event process amp my list amp my event If status is GX SUCCESS the event for drop list list has been processed See Also gx drop list close gx drop list create gx drop list open gx drop list pixelmap set gx drop list popup get GUIX User Guide 151
7. Create my radio button status gx radio button create amp my radio button my radio button amp my parent RADIO BUTTON TEXT RESOURCE 10 STYLE BORDER RAISED MY RADIO BUTTON 10 amp size If status is SUCCESS the radio button radio button has been created See Also gx button background draw gx button create gx button deselect gx button draw gx button event process gx button select gx icon button create gx pixelmap button create gx pixelmap button draw gx text button create gx text button color set gx text button draw gx radio button draw GUIX User Guide 238 gx radio button draw Draw radio button Prototype UINT gx radio button draw GX RADIO BUTTON button Description This service draws a radio button widget This service is called internally by the GUIX canvas refresh but can also be called by overridden drawing functions Parameters button Pointer to radio button widget control block Return Values GX SUCCESS 0x00 Successful radio button draw GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 _ Widget not valid Allowed From Initialization and threads Example Draw my radio button status gx radio button draw amp my radio button If status is SUCCESS the radio button radio button has been drawn See Also gx button background
8. LEER EUR ene anaes 413 Qx widget ee Uo on ae Ev UU pU e a pd NER EO UU 414 NE INV SOT iota Ales A RU Actu A E ADIRI AD LEA AE DG 415 GX Widget usta ui os as ect d al te to ddr 417 dx _widget_status_add eeseosxtren rk erben eren eser bo erben eren poer bo erben 418 STA US 420 gx_widget_status_remMOVe s aeo ine cde edad ec are cia PL c ard Eel PU nes nh Gane 422 gx widget 514115 165 eoim chit ev kee ioe ei ai eee 424 Ox WIdGGl Style addi coute ud olde oie Madea adele detest 426 gx widget style 428 OX IST eret tec en C A A eu D LA 430 gX Widget Style SO oiii uic e Een e o a Po DA e 432 widget WEIN GOL suede seeded e qase dedico cde nde dene mete andate dede dedos deanna 434 pec Window height Sb oa UM X OE UD Uo v Ea UD X XO E URS 435 dx window lt CIIEME Seloll i este e rex Or rnex kb OH bw x EC OH prenEP EH brexEL OH prkxEP OH FrexF DE annann EH EYEXES 436 ax WINDOW client widili Oel P UE 437 gx_window_create Nain etd nacer d 438 window deditos e ck eet oe RE EIE FR Ru ERIS 440 GUIX User Guide xiii WINDOW EVENT
9. GUIX User Guide 254 gx single line text input character delete Delete the character at the current cursor position Prototype UINT gx single line text input character delete GX SINGLE LINE TEXT INPUT text input Description This service delete the character after the text input cursor position This service is called internally when a delete character event is received but can also be invoked by the application Parameters text input Single line text input widget control block Return Values GX SUCCESS 0x00 Successful single line text input create GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 Invalid pointer Allowed From Initialization and threads Example delete character status gx single line text input character delete amp my text input If status is SUCCESS the text input widget has processed backspace input character See Also gx single line text input backspace gx single line text input buffer clear single line text input buffer get gx single line text input create gx single line text input character insert gx single line text input draw gx single line text input end gx single line text input event process gx single line text input home gx single line text input left arrow gx single line text input position get gx single line text input right arrow gx single line text input style add gx single line text inp
10. RTT T T RT 293 axsstudiovWIdgeb reales eser reete cee cae Ono cae Gor PT DOO OEC UR UD UU 294 gx studio named widget 295 gx st dio display oer cett Race one ete it redemit dee 296 GUIX User Guide X gx system active language 5 298 system canvas 299 gx gt system 300 _ lt _ _ pont Coca bt bor imt vorn ev 301 gx systeim draw gel ace dd iad taii tette aid 302 gX system event usati vo EHE Uo ten UU ERU Uc Een CU BU C Uc Bop Mp BUE C Uc Br M SU up 303 gx system event 5 304 gx system focus UU 305 Ox initialize occae 306 gx system language table 307 gx system Tanguage table set 308 gx_system_memory_allocator_Set s anra guo re e uo git AR TEMPE 309 gx system scroll appearance 0 310 gx system scroll appearance 56 311 aic A E quic pota 313 gx5system string dela i pad Sie ed iE 314 system string Table Gel oso RE EID XR EXE XR ERU 315 q
11. sprite status gx sprite start amp my sprite 0 If status is SUCCESS the sprite sprite will start running See Also gx sprite current frame set gx sprite stop gx sprite create 9x sprite frame list set GUIX User Guide 292 gx sprite stop Stop a sprite run sequence Prototype UINT gx sprite stop GX SPRITE sprite Description This service stops a sprite auto run sequence Parameters sprite Sprite widget control block Return Values GX SUCCESS 0x00 Successful GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 Invalid pointer Allowed From Initialization and threads Example Stop the sprite sequence status gx sprite stop amp my sprite If status is SUCCESS the sprite my sprite is stopped See Also gx sprite current frame set gx sprite start gx sprite create 9x sprite frame list set GUIX User Guide 293 gx studio widget create Create widget defined in Studio generated specifications file Prototype WIDGET studio widget create CONST STUDIO WIDGET definition WIDGET parent Description This service creates a widget and the widget s children using a widget specification defined within the GUIX Studio generated specifications file The definition structure is always named according to this convention screen name widget name define where the widget name fie
12. gx widget attach gx widget back move gx widget background set gx widget border draw 9 widget border style set gx widget border width get 9 9 widget canvas get gx widget child detect gx widget children draw widget client get gx widget create gx widget created test 9 widget delete gx widget detach gx widget draw gx widget draw set gx widget event generate gx widget event process gx widget event process set gx widget event to parent gx widget find gx widget front move gx widget height get gx widget hide gx widget resize widget shift gx widget show gx widget status add gx widget status get gx widget status remove gx widget status test gx widget style add gx widget style get gx widget style remove gx widget style set gx widget width get GUIX User Guide 365 gx widget back attach Attach widget to its parent Prototype UINT gx widget back attach GX WIDGET parent GX WIDGET widget Description This service attaches the widget to the specified parent If the widget is already attached to another parent it is first detached If the widget is already attached to the same parent the function does nothing The widget becomes the back most child of its parent in terms of z ordering If sibling widgets overlap this widget is drawn behind those siblings To put the new widget in the front of the z order use
13. Description This service finds the root window for the specified widget Parameters widget Pointer to widget control block return root window Pointer to destination for found root window Return Values GX SUCCESS 0x00 Successful root window find GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 Widget not valid Allowed From Initialization and threads Example Find root window associated with window my window status gx window root find amp my window amp root window If status is SUCCESS the root window contains the root window for window my window See Also gx window canvas set gx window client height get gx window client scroll gx window client width get gx window create gx window draw gx window event process gx window root create gx window root delete gx window root event process gx window scroll info get gx window scrollbar find gx window wallpaper get gx window wallpaper set GUIX User Guide 446 gx window scroll info get Get window scroll info Prototype UINT gx window scroll info get GX WINDOW window ULONG type GX SCROLL INFO return scroll info Description This service gets the window scroll information Parameters window Pointer to window type GX SCROLLBAR HORIZONTAL or GX SCROLLBAR VERTICAL Pointer to destination for scroll info The parent window in
14. Draw all of a string of unknown length on the current canvas status gx canvas text draw 10 40 string ptr 1 If status is SUCCESS the text example has been drawn on my canvas GUIX User Guide 102 See Also gx canvas arc draw gx canvas block move gx canvas circle draw gx display create gx canvas ellipse draw gx canvas line draw gx canvas pie draw gx canvas pixelmap draw gx canvas pixelmap tile gx canvas polygon draw gx canvas rectangle draw GUIX User Guide 103 gx checkbox create Create checkbox Prototype UINT gx checkbox create GX CHECKBOX checkbox GX CONST GX CHAR name GX WIDGET parent GX RESOURCE ID text id ULONG style USHORT checkbox id GX CONST GX RECTANGLE size Description This service creates a checkbox widget with the specified properties Parameters checkbox Pointer to checkbox control block name Logical name of checkbox widget parent Pointer to the parent widget text id Resource ID of checkbox text style Style of checkbox Appendix D contains pre defined general styles for all widgets as well as widget specific styles checkbox id Application defined ID of checkbox size Dimensions of checkbox Return Values GX SUCCESS 0x00 Successful checkbox create GX CALLER ERROR 0x11 X Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX ALREADY CREATED 0x13 Widget already created GX INVALID
15. Draw widget widget status gx widget draw amp my widget If status is SUCCESS the widget widget has been drawn See Also gx widget attach gx widget back move gx widget background set gx widget border draw gx widget border style set gx widget border width get gx widget canvas get gx widget child detect gx widget children draw gx widget client get gx widget created gx widget created test gx widget delete gx widget detach gx widget draw set gx widget event generate gx widget event process gx widget event process set gx widget event to parent gx widget find gx widget front move gx widget height get gx widget hide gx widget resize 9x widget shift gx widget show gx widget status add gx widget status get gx widget status remove gx widget status test gx widget style add gx widget style get gx widget style remove gx widget style set gx widget width get GUIX User Guide 393 gx widget draw set Assign the widget drawing function Prototype UINT gx widget draw set GX WIDGET widget VOID drawing function GX WIDGET Description This service overrides the default drawing function of the widget Parameters widget Pointer to widget drawing function Pointer to drawing function Return Values GX SUCCESS 0x00 Successful widget drawing function override GX CALLER ERROR 0x11 Invalid caller of this function
16. GUIX User Guide 182 gx multi line text input create Create multi line text input Prototype UINT gx multi line text input create GX MULTI LINE TEXT INPUT GX CONST GX C GX CHAR inpu ULONG style CONST RI t buffe USHORT text input HAR name GX WINDOW parent r UINT buffer size text input id ECTANGLE size Description This service creates a multi line text input widget Parameters text input Multi line text input widget control block name Name of text input widget parent Pointer to parent widget input buffer Pointer to text input buffer buffer size Size of text input buffer style Style of text input widget Appendix D contains pre defined general styles for all widgets as well as widget specific styles text input id Application defined ID of text input size Dimensions of text input widget Return Values GX SUCCESS 0x00 GX CALLER ERROR GX PTR ERROR Successful multi line text input create Invalid caller of this function Invalid pointer 0x07 GX ALREADY CREATED 0x13 Widget already created 0x14 GX INVALID WIDGET SIZE Invalid widget control block size GX INVALID WIDGET 0x12 Parent widget not valid GX INVALID STYLE 0x18 Invalid style GX INVALID SIZE 0x19 Invalid size GUIX User Guide 183 Allowed From Initialization and threads Example Create multi line text input widget my text input status g
17. GX CONST GX CHAR name GX WIDGET parent GX RESOURCE ID text id ULONG style USHORT text button id GX CONST GX RECTANGLE size Description This service creates a multi line text button widget A multi line text button displays the button text over 1 n lines The maximum number of lines is defined by the constant GX MULTI LINE TEXT BUTTON MAX LINES which defaults to 4 The line breaks are set by carriage return and or carriage return line feed pairs within the text string assigned to the multi line text button GX MULTI LINE TEXT BUTTONS is derived from TEXT BUTTON and all BUTTON services can therefore be used with a multi line text button Parameters text button name parent text id style text button id size Return Values GX SUCCESS GX CALLER ERROR GX PTR ERROR GUIX User Guide Pointer to text button control block Logical name of text button Pointer to parent widget of the button Resource ID of text Text button style Appendix D contains pre defined general styles for all widgets as well as widget specific styles Application defined ID of the text button Size of the button 0x00 Successful text button create 0x11 Invalid caller of this function 0x07 Invalid pointer 177 GX ALREADY CREATED 0x13 Widget already created GX INVALID WIDGET SIZE 0x14 Invalid widget control block size GX INVALID WIDGET Parent widget not va
18. If status is GX SUCCESS my appearance now contains the scroll appearance See Also gx display scroll appearance set GUIX User Guide 310 gx system scroll appearance set Set scroll appearance Prototype UINT gx display scroll appearance set GX DISPLAY display ULONG style GX SCROLLBAR APPEARANCE appearance Description This service sets the default scroll appearance When a scroll is created this appearance structure is used unless the application provides a custom version Parameters style Scroll style GX SCROLLBAR HORIZONTAL Or GX SCROLLBAR VERTICAL appearance Pointer to appearance structure initialized with various scrollbar appearance attributes Return Values GX SUCCESS 0x00 Successfully set scroll appearance set GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID STYLE 0x18 Invalid style Allowed From Initialization and threads GUIX User Guide 311 Set the scroll appearance status gx display scroll appearance set display style amp my appearance If status is SUCCESS the scroll appearance has been set See Also gx display scroll appearance get GUIX User Guide 312 gx system start Prototype UINT gx system start VOID Description Start GUIX This service starts GUIX processing Under normal circumstances this function never returns but instead begins processing
19. See Also gx button background draw gx button create gx button deselect gx button draw gx button event process gx button select gx icon button create gx pixelmap button create gx pixelmap button draw gx text button color set gx text button draw gx text button font set gx text button text get gx text button text set gx text button text id set GUIX User Guide 325 gx text button draw Draw text button Prototype UINT gx text button draw GX TEXT BUTTON button Description This service draws the text button Parameters button Pointer to text button control block Return Values GX SUCCESS 0x00 Successful text button draw GX CALLER ERROR 0x11 X Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 _ Widget not valid Allowed From Initialization and threads Example Draw the text button my text button status gx text button draw amp my text button If status SUCCESS the text button my text button was drawn See Also gx button background draw gx button create gx button deselect gx button draw gx button event process gx button select gx icon button create gx pixelmap button create gx pixelmap button draw gx text button create gx text button color set gx text button font set gx text button text get gx text button text set gx text button text id set GUIX User Guide 326 gx text button font set
20. gauge to 30 and 1 the needle of gauge will rotate from current angle to target angle by 30 steps with 1 tick delay between every step status gx circular gauge animation set amp my gauge 30 1 If status is SUCCESS the steps and delay time of my gauge has been set See Also gx circular gauge angle get gx circular gauge angle set 9x circular gauge create GUIX User Guide 113 gx circular gauge create Create circular gauge Prototype UINT gx circular gauge create GX CIRCULAR GAUGE gauge GX CONST GX CHAR name GX WIDGET parent GX CIRCULAR GAUGE INFO info GX RESOURCE ID background id ULONG style USHORT circular gauge id GX VALUE xpos GX VALUE ypos Description This service creates a circular gauge widget with the specified properties Parameters gauge Pointer to circular gauge control block name Logical name of circular gauge widget parent Pointer to the parent widget info Pointer to circular gauge info control block background id Resource ID of circular gauge background pixelmap style Style of circular gauge Appendix D contains pre defined general styles for all widgets as well as widget specific styles circular gauge id Application defined ID of circular gauge xpos Starting x coordinate position ypos Starting y coordinate position Return Values GX SUCCESS 0x00 Successful checkbox select GX CALLER ERROR 0x11 X Inv
21. Color Format Description 1 bit monochrome 1 bit per pixel packed format 2 bit grayscale 4 gray levels packed four pixels per byte 4 bit grayscale 16 gray levels packed two pixels per byte 4 bit color A format planar memory organization 8 bit grayscale 256 gray levels 8 bit palette mode 1 byte per pixel used as palette index 8 bit r g b mode A less commonly used 2 3 2 r g b format 16 bit Each pixel requires two bytes Can be r g b or b g r byte order Normally 5 6 5 structure but can also be 5 5 5 structure GUIX User Guide 28 24 bit Each pixel requires 3 packed format or 4 unpacked format bytes Can be in r g b or b g r byte order as required by hardware 32 bit Each pixel requires 4 bytes with an alpha channel Can be a r g b or b g r a byte order and determined by hardware GUIX Display Component The display component is fundamental in GUIX since it manages the processing of all display objects which in themselves contain one or more canvases widgets and windows The display component also interacts with the underlying hardware screen driver associated with each display through a series of function pointers Display Creation A display object can be created during initialization or anytime during the execution of application threads Typically an application creates one display object to manage each physical screen If you have used GUIX Studio to define your application an
22. SUCCESS the pixelmap slider slider has been drawn See Also gx pixelmap button create gx pixelmap button draw gx pixelmap button pixelmap set gx pixelmap prompt create gx pixelmap prompt draw gx pixelmap prompt pixelmap set pixelmap slider create gx pixelmap slider event process gx pixelmap slider pixelmap set gx slider create gx slider draw gx slider event process gx slider needle draw gx slider needle position get gx slider needle position get gx slider tickmarks draw gx slider travel get gx slider value calculate gx slider value set GUIX User Guide 214 gx pixelmap slider event process Process pixelmap slider event Prototype UINT gx pixelmap slider event process GX PIXELMAP SLIDER slider GX EVENT event Description This service processes an event for the specified pixelmap slider widget Parameters slider Pointer to pixelmap slider control block event Pointer to event to process Return Values GX SUCCESS 0x00 Successful pixelmap slider event process GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 Invalid pointer INVALID WIDGET 0x12 Widget not valid Allowed From Initialization and threads Example Process event for the pixelmap slider pixelmap slider status gx pixelmap slider event process amp my slider amp my event If status is SUCCESS the event has been
23. status gx text button text set amp my text button my string Successfully set the text to the button Invalid caller of this function Invalid pointer If status is SUCCESS the string my text button was set See Also gx button background draw gx button create gx button deselect gx button draw gx button event process gx button select gx icon button create x pixelmap button create gx pixelmap button draw gx text button create gx text button draw gx text button font set gx text button text color set gx text button text get gx text button text id set GUIX User Guide 332 gx utility Convert long integer to ASCII Prototype VOID gx utility itoa LONG value GX CHAR return buffer UINT seturn buffer size Description This service converts a long integer value into an ASCII string Parameters value Long integer value to convert return buffer Destination buffer for ASCII string return buffer size Size of destination buffer Return Values None Allowed From All Example Convert value into an ASCII string gx utility Itoa my value my value string sizeof my value string value string contains the ASCII representation of value See Also gx utility math cos gx utility math sin gx utility math sqrt gx utility pixelmap rotate gx utility pixelmap simple rotate gx utility rectangle center gx utility rectang
24. GUIX implements the concept of dirty areas for each widget and canvas A widget can only draw to areas that have previously been marked as dirty When a widget drawing function is called all drawing operations are internally clipped to the previously defined dirty rectangle Attempts to draw outside of this area are ignored Widgets and windows mark themselves as dirty by calling the API function 9x system dirty mark This function marks the entire widget or window as needing to be redrawn A second function gx system dirty partial add can be invoked as an alternative to mark only a portion of a window or widget as dirty This model of marking widgets as dirty or needing to be re drawn and then redrawing those widgets only when all input events have been processed is referred to as deferred drawing The GUIX deferred drawing algorithm and dirty list maintenance is designed to improve drawing efficiency Since drawing operations are typically expensive GUIX works hard to prevent unnecessary drawing Drawing is done to a GUIX canvas A canvas is a memory area reserved to hold graphics data A canvas may or may not be directly linked to the hardware frame buffer GUIX User Guide 15 depending the system architecture and memory constraints Before any drawing can occur a canvas must first be opened for drawing by calling the gx canvas drawing initiate function This prepares a canvas for drawing and established the c
25. GUIX support pixel color formats ranging from 1 bpp monochrome to 32 bpp a r g b format GUIX also supports many variations within each broad color depth category such as r g b versus b g r byte order packed pixel versus word aligned pixel formats and alpha channels There are currently 25 distinct color formats supported but this list grows as hardware vendors deliver new variations GUIX User Guide 18 Display Memory Architectures Various hardware targets and displays utilize a variety of different display memory architectures depending on the memory constraints of the target and the functionality requirements of the application We will outline some of the common memory architectures here with a brief description of each Model 1 No frame buffer graphics data held in external GRAM Display Display Driver Serial Parallel In the model above no memory for a frame buffer exists in memory local to the CPU All graphics data is stored in an external GRAM which is incorporated into the display itself The interface to the external GRAM can be parallel or serial This type of architecture is very low cost however it can exhibit unwanted tearing effect when the graphics data is updated Model 2 One local frame buffer Kd Display Frame Displa Driver Buffer In this model memory for the graphics data is allocated from a random access memory that is directly accessible the CPU Dedicated hardware must be
26. See Also gx pixelmap slider create gx pixelmap slider draw gx pixelmap slider event process gx pixelmap slider pixelmap set slider create gx slider draw gx slider event process gx slider needle draw gx slider needle position get 9x slider needle position get gx slider travel get gx slider value calculate gx slider value set GUIX User Guide 281 gx slider travel get Get slider travel Prototype UINT gx slider travel get GX SLIDER widget GX SLIDER INFO info INT return min travel INT return max travel Description This service gets the slider travel Parameters slider Slider widget control block info Pointer to slider info structure return min travel Pointer to destination for minimum travel value return max travel Pointer to destination for maximum travel value Return Values GX SUCCESS 0x00 Successful slider travel get GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 Widget not valid GX INVALID VALUE 0x22 X Slider info not valid Allowed From Initialization and threads GUIX User Guide 282 Get travel information for for slider my slider status gx slider travel get amp my slider amp info amp min travel amp my max travel If status is SUCCESS the travel max min values for slider slider have been retrieved See Also gx pixelmap slider
27. gx window root event process gx window root find gx window scroll info get gx window scrollbar find gx window wallpaper get gx window wallpaper set GUIX User Guide 444 gx window root event process Process event for the root window Prototype UINT gx window root create GX WINDOW ROOT root window GX EVENT event Description This service processes events for the specified root window Parameters root window Pointer to root window control block event Pointer to the event to be processed Return Values GX SUCCESS 0x00 Successful root window find GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer Allowed From Initialization and threads Example status gx window root event process amp root window amp my event If status is SUCCESS the event event is processed by the roont window See Also gx window canvas set gx window client height get gx window client scroll gx window client width get gx window create gx window draw gx window event process gx window root create gx window root delete gx window root find gx window scroll info get gx window scrollbar find gx window wallpaper get gx window wallpaper set GUIX User Guide 445 gx window root find Find root window Prototype UINT gx window root find GX WIDGET widget GX WINDOW ROOT return root window
28. GX PTR ERROR 0x07 Invalid pointer INVALID WIDGET 0x12 Widget not valid Allowed From Initialization and threads Example Set the drawing function of widget widget to my drawing function status gx widget draw set amp my widget my drawing function If status is SUCCESS the widget widget has the drawning function drawing function See Also gx_widget_attach gx_widget_back_move gx_widget_background_set gx_widget_border_draw gx_widget_border_style_set gx_widget_border_width_get gx_widget_canvas_get gx_widget_child_detect gx_widget_children_draw gx_widget_client_get gx_widget_created gx_widget_created_test gx_widget_delete gx_widget_detach gx_widget_draw gx_widget_event_generate gx_widget_event_process gx widget event process set gx widget event to parent gx widget find gx widget front move gx widget height get gx widget hide gx widget resize 9x widget shift gx widget show gx widget status add gx widget status get gx widget status remove gx widget status test gx widget style add gx widget style get gx widget style remove gx widget style set gx widget width get GUIX User Guide 394 gx widget event generate Generate widget event Prototype UINT gx widget event generate GX WIDGET widget ULONG event type LONG value Description This service generates an event and sends it to the parent widget
29. None Return Values None Allowed From Initialization and threads Example Force immediate redraw operation gx system canvas refresh See Also 9x system dirty partial add gx system draw context get system event send gx system focus claim gx system initialize gx system start gx system string get gx system string table get gx system string table set gx system string width get system timer start gx system timer stop gx system widget find GUIX User Guide 299 gx system dirty mark Mark area dirty Prototype UINT gx system dirty mark GX WIDGET widget Description This service marks the area of this widget as dirty This effectively queues the widget for re drawing when the system event processing has been completed Parameters widget Pointer to widget control block Return Values GX SUCCESS 0x00 Successful dirty mark GX CALLER ERROR 0x11 X Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 X Widget not valid Allowed From Initialization and threads Example Mark widget my widget as dirty status gx system dirty mark amp my widget If status is SUCCESS the area associated with widget has been marked as dirty See Also system dirty partial add gx system draw context get system event send gx system focus claim gx system initialize gx system start
30. gx canvas block move gx canvas pixelmap tile gx canvas pixelmap draw GUIX User Guide 94 gx canvas pixel draw Draw pixel Prototype UINT gx canvas pixel draw GX POINT position Description This service draws a pixel on the canvas using the line color of the current drawing context brush Parameters point position of pixel to draw Return Values GX SUCCESS 0x00 Successful pixelmap draw GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID CONTEXT 0x06 open drawing context GX INVALID COORDINATE 0x21 Invalid coordinate Allowed From Initialization and threads Example GX POINT point the x y position you want to draw to GX_RECTANGLE drawto the rectangle bounding your drawing GX_CANVAS mycanvas the canvas you want to draw to calculate 1x1 pixel drawing area gx_utility_rectangle_define amp drawto point gx_point_x point gx_point_y point gx_point_x point gx_point_y get my canvas gx_widget_canvas_get win amp mycanvas open my canvas for drawing gx canvas drawing initiate mycanvas win amp drawto setup my brush colors Use any color ID in your resources 9x context line color set GX COLOR ID WINDOW BORDER draw a pixel canvas pixel draw point close the canvas gx canvas drawing complete canvas TRUE GUIX User Guide 95 See Also gx canvas b
31. gx widget width get GUIX User Guide 383 gx widget client get Get widget client area Prototype UINT gx widget client get GX WIDGET widget GX VALUE border width GX RECTANGLE return client area Description This service computes the client area of widget by subtracting the widget border width from the overall widget size Parameters widget Pointer to widget border width Width of widget border return client area Destination for returning client area Return Values GX SUCCESS 0x00 Successful widget client area get GX CALLER ERROR Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 X Widget not valid GX INVALID VALUE Widget border not valid Allowed From Initialization and threads GUIX User Guide 384 Get client area of widget widget status gx widget client get amp my widget my widget width amp client area If status is SUCCESS the client area is the client area of widget See Also gx widget attach gx widget back move gx widget background set gx widget border draw gx widget border style set gx widget border width get gx widget canvas get gx widget child detect gx widget children draw gx widget create gx widget created test widget delete gx widget detach gx widget draw gx widget draw set gx widget event generate gx widget event process gx widge
32. service Events are passed through the GUIX event queue and each event is an instance of the GX EVENT Gata structure The GX EVENT data structure is defined in gx api h however the most important fields of the structure are the gx event type 9x event sender gx event target and gx event payload The gx event type field is used to identify the particular event class The event type indicates if this is for example a GX EVENT PEN DOWN event or a GX EVENT TIMER event The gx event payload is a union of various data fields and they are not all valid for every event type You use the event type field first before examining the other event data fields The gx event sender field contains the ID of the widget that generated the event if the event is a child widget notification The gx event target field can be used to route user defined events to a particular window or widget If you want to send an event to a particular window you should give the window a unique Id value so that it can be positively identified and when building the event place the window value in the gx event target field If you don t know the target Id or if you just want the event to be routed to the widget that has input focus make sure to set the gx event target field to O Finally the gx event payload field is a union of various data types For GX EVENT PEN DOWN and GX EVENT PEN UP events the gx event pointdata field contains the x y pixel coordinate th
33. status gx widget height get amp my widget amp widget height If status is SUCCESS the height of the widget is contained in widget height See Also gx widget attach gx widget back move gx widget background set gx widget border draw gx widget border style set gx widget border width get gx widget canvas get gx widget child detect gx widget children draw gx widget client get gx widget created gx widget created test gx widget delete gx widget detach gx widget draw gx widget draw set gx widget event generate gx widget event process gx widget event process set gx widget event to parent gx widget find gx widget front move gx widget hide gx widget resize gx widget shift gx widget show gx widget status add gx widget status get gx widget status remove gx widget status test gx widget style add gx widget style get gx widget style remove gx widget style set gx widget width get GUIX User Guide 411 gx widget hide Hide widget Prototype UINT gx widget hide GX WIDGET widget Description This service hides the widget This widget is still attached to it s parent but it is not allowed to draw on the canvas Parameters widget Pointer to widget Return Values GX SUCCESS 0x00 Successful widget hide GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 _ Widget not valid A
34. widget attach or gx widget front move Parameters parent Pointer to parent widget widget Pointer to child widget Return Values GX SUCCESS 0x00 Successful widget attach GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 Parent or widget not valid Allowed From Initialization and threads Example Attach widget to parent status gx widget attach amp my parent amp my widget If status is SUCCESS the widget my widget is attached to parent See Also gx widget back attach gx widget back move gx widget background set gx widget border draw GUIX User Guide 366 gx widget border style set gx widget border width get gx widget canvas get gx widget child detect gx widget children draw gx widget client get gx widget create gx widget created test 9x widget delete gx widget detach gx widget draw gx widget draw set gx widget event generate gx widget event process gx widget event process set gx widget event to parent gx widget find gx widget front move gx widget height get gx widget hide gx widget resize widget shift gx widget show gx widget status add gx widget status get gx widget status remove gx widget status test gx widget style add gx widget style get gx widget style remove gx widget style set gx widget width get GUIX User Guide 367 gx w
35. 0x00010000 0x00020000 0x00040000 0x01000000 467 SCROLLBAR HORIZONTAL 0x02000000 GUIX User Guide 468 Appendix E GUIX Events Event GX EVENT TERMINATE GX EVENT REDRAW GX EVENT SHOW GX EVENT HIDE GX EVENT RESIZE GX EVENT SLIDE GX EVENT FOCUS GAINED GX EVENT FOCUS LOST GX EVENT HORIZONTAL SCROLL GX EVENT VERTICAL SCROLL GX EVENT TIMER GX EVENT PEN DOWN GX EVENT PEN UP GX EVENT PEN DRAG GX EVENT KEY DOWN GX EVENT KEY UP GX EVENT CLOSE EVENT DESTROY GX EVENT SLIDER VALUE GX EVENT TOGGLE ON GX EVENT TOGGLE OFF GX EVENT RADIO SELECT GX EVENT RADIO DESELECT GX EVENT CLICKED GX EVENT LIST SELECT GX EVENT VERTICAL FLICK GX EVENT HORIZONTAL FLICK GX EVENT MOVE GX EVENT PARENT SIZED GX EVENT CLOSE POPUP GX EVENT ZOOM IN GX EVENT ZOOM OUT GX EVENT LANGUAGE CHANGE GX EVENT RESOURCE CHANGE GX EVENT ANIMATION COMPLETE GX EVENT SPRITE COMPLETE GX EVENT TEXT EDITED GX EVENT TX TIMER GX EVENT FOCUS NEXT GX EVENT FOCUS PREVIOUS GX EVENT FOCUS GAIN NOTIFY GX EVENT SELECT GX EVENT DESELECT GUIX User Guide ONDUBWNP Value 469 Appendix GUIX RTOS Binding Services GUIX requires thread or tasking services mutex event queue and timing services providing by the underlying RTOS By default GUIX is configured to utilize the ThreadX real time operating system to provide these services To port GUIX to another operating system the developer should define the pre processor directive GX DISABLE THREADX BIN
36. 0x07 X Invalid pointer GX INVALID SIZE 0x19 Invalid fill size GX INVALID WIDGET 0x12 widget not valid Allowed From Initialization and threads Example Tile pixelmap on screen my canvas status gx canvas pixelmap tile amp tile area amp my pixelmap If status is SUCCESS the pixelmap pixelmap has been tiled on canvas See Also gx canvas block move gx canvas pixelmap blend gx canvas pixelmap draw GUIX User Guide 98 gx canvas polygon draw Draw polygon Prototype UINT gx canvas polygon draw GX POINT point array INT number of points Description This service draws a polygon on the canvas Parameters point array Array of points of the polygon number of points Number of points of polygon Return Values GX SUCCESS Successful polygon draw GX CALLER ERROR 0x11 X Invalid caller of this function GX PTR ERROR Invalid pointer Invalid coordinate s Allowed From Initialization and threads Example Draw polygon polygon on canvas canvas status gx canvas polygon draw amp my polygon 4 If status is SUCCESS the polygon polygon has been drawn on canvas See Also gx canvas arc draw gx canvas block move gx canvas circle draw gx display create gx canvas ellipse draw gx canvas line draw gx canvas pie draw gx canvas pixelmap draw gx canvas pixelmap tile gx canvas rectangle dr
37. 264 gxssingle hne text POSTION gels un nore 265 gx single line text input right 267 gx single line text input style 268 9x single line text input style 269 gx single line text style 56 iie c ERR EXER MEER bus 270 gx SSSR Create cose ER ERE EREMO ERU EXR ERR EO ER EX EIN OU ERR ERN ON ERU 272 SIGS Ol AW as uicit Uto Od eU UO UD ULO UD LUUD 274 Slider event PIOCESS cance day ace aoa acero aco ace oio inde obs 275 PARES METERS MNT 276 dx slider iore eren emer reor er eren erben Prep eer 278 gx_slider_needle_position_get x ascen rrr AE rap P AE re AE TENERA YA 279 gx side Uckmisrks dh ioca i ecdesiae ec are eia PL c are ied PU Red e eL me 281 travel geb us chee di eee eee ait 282 Valle mNC Ii 284 dx SIGS VAIS SOL iocccscdcccsededeacnebedeeenedadvnenebedencdededebenebedencdededebenebebsaunedadeaunhadenanedesd 286 gx sprite Sec e eee ete Meee ean ee Ar nC aD Tate eee CO Rae ean Met ae OPE Seen 288 gX sprit current frame 290 frame TIS ES CF zs nl iri el iri lev alain i al a 291 OX SDM SIAN DO Lo US CMM UN LUAM 292 EPEA gt
38. INT ycenter a INT b Pointer to function to draw ellipse VOID gx display driver ellipse DRAW CONTEXT context INT xcenter INT ycenter INT a INT b Pointer to a function to draw a filled ellipse VOID gx display driver 8bit draw GK DRAW CONTEXT context RECTANGLE draw area POINT offset const GX GLYPH glyph Pointer to function to draw one 8 bit aliased text glyph to the canvas using the brush of the current drawing context VOID gx display driver 4bit draw GK DRAW CONTEXT context RECTANGLE draw area POINT offset const GX GLYPH glyph Pointer to function to draw one 4 bit aliased text glyph to the canvas using the brush of the current drawing context VOID gx display driver 1bit draw GX DRAW CONTEXT context RECTANGLE draw area POINT offset const GX GLYPH glyph Pointer to function to draw one 1 bit monochrome text glyph to the canvas using the brush of the current drawing context GUIX User Guide 458 GUIX Example The GUIX demonstration system is delivered with a small example defined in examples helloworld helloworld c This example illustrates the steps needed to take to initialize the GUIX system to set up display drivers The source code is listed on the following pages GUIX User Guide 459 This is a small demonstration of the high performance GUIX embedded UI run
39. Resource IDs Note that the application may add custom color Resource IDs as well selected color id Resource ID of the selected color Appendix B contains pre defined color Resource IDs Note that the application may add custom color Resource IDs as well Return Values GX SUCCESS 0x00 Successful widget background set GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 Invalid pointer GX INVALID WIDGET 0x12 Widget not valid INVALID RESOURCE ID 0x22 Invalid resource ID Allowed From Initialization and threads GUIX User Guide 402 Set background widget status gx widget fill color set amp my widget GX COLOR BLACK ID GX COLOR GREEN ID If status is SUCCESS the widget my widget background has been set See Also gx widget attach gx widget back move gx widget border draw gx widget border style set gx widget border width get gx widget canvas get gx widget child detect gx widget children draw gx widget client get gx widget create gx widget created test 9x widget delete gx widget detach gx widget draw gx widget draw set gx widget event generate gx widget event process gx widget event process set gx widget event to parent gx widget find gx widget front move gx widget height get gx widget hide gx widget resize gx widget shift gx widget show gx widget status add gx widget status get gx widget status re
40. Set alpha blend value for canvas gx canvas arc draw Draw circle arc gx canvas block move Move block gx canvas circle draw Draw circle gx canvas create Create a canvas gx canvas delete Delete a canvas gx canvas drawing complete Complete canvas drawing gx canvas drawing initiate Initiate drawing on canvas gx canvas line draw Draw line gx canvas offset set Assign canvas display offset gx canvas pixel draw Draw a single pixel gx canvas pixelmap blend Blend a pixelmap with background gx canvas pixelmap draw Draw pixelmap gx canvas pixelmap tile Tile pixelmap gx canvas polygon draw Draw polygon gx canvas rectangle draw Draw rectangle gx canvas shift Shift canvas by x y gx canvas text draw Draw text gx checkbox create Create a checkbox GUIX User Guide 53 gx checkbox draw Draw a checkbox gx checkbox event process Checkbox event process function gx checkbox pixelmap set Assign checkbox pixelmap gx checkbox select Select checkbox gx context brush default Set the brush of current context gx context brush define Define brush of current context gx context brush get Get brush of current context gx context brush pattern set Set pattern of the brush of current context gx context brush set Set brus
41. Set the font to text button Prototype UINT gx text button font set GX TEXT BUTTON button GX RESOURCE ID font id Description This service assigns a font to the specified button Parameters button Pointer to text button control block font id Resource ID fo the font Return Values GX SUCCESS 0x00 Successfully set the font GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 Invalid pointer GX INVALID RESOURCE ID 0x22 Invalid font id Allowed From Initialization and threads Example Set the text button with the font ID MY FONT status gx text button font set amp my text button MY FONT If status SUCCESS the font to the text button my text button was set to FONT See Also gx button background draw gx button create gx button deselect gx button draw gx button event process gx button select gx icon button create gx pixelmap button create gx pixelmap button draw gx text button create gx text button draw gx text button color set gx text button text get gx text button text set gx text button text id set GUIX User Guide 327 gx text button text color set Set text button color Prototype UINT gx text button text color set GX TEXT BUTTON text button GX RESOURCE ID normal text color id GX RESOURCE ID selected text color id Description This service sets the color of the text button Parame
42. and gx port h files of your distribution These strings will provide us valuable Information regarding your run time environment 4 The contents in RAM of the following ULONG variables build options 9x system build options These variables will give us information on how your ThreadX and GUIX libraries were built 5 The contents in RAM of the following ULONG variables 9x system last error system error count These variables keep track of internal system errors in GUIX If the system error count is greater than one please set a breakpoint on the function return the gx system error process function and provide the value of _9 system last error at this point This will yield the first internal GUIX system error 6 Atrace buffer captured immediately after the problem was detected This is accomplished by building the ThreadX and GUIX libraries with TX ENABLE EVENT TRACE and calling tx trace enable with the trace buffer information Refer to the TraceX User Guide for details GUIX User Guide xviii Where to Send Comments About This Guide The staff at Express Logic is always striving to provide you with better products To help us achieve this goal email any comments and suggestions to the Customer Support Center at support expresslogic com Please enter GUIX User Guide in the subject line GUIX User Guide Chapter 1 Introduction to GUIX GUIX is a high performance real ti
43. and the initial and reschedule timeout values If the reschedule timeout value is 0 the timer will only run one time and will delete itself from the active timer list once it expires GUIX User Guide 25 Once started the GUIX timer will send EVENT TIMEOUT events to the timer owner either once or periodically depending on the timer reschedule value A GUIX timer can be stopped by calling the API function gx system timer stop System Error Handling The GUIX system error handler is intended to assist the application in finding internal system errors in GUIX that might be more difficult to determine from the API perspective Whenever a system error occurs inside of GUIX the internal 9x system error process function is called This function saves the error code provided and increments the total number of system errors detected The system error variables are defined as follows UINT gx system last error ULONG gx system error count If the GUIX application is behaving strangely it is useful to look at the error count variable in the debugger If it is set a good way to troubleshoot the problem is to set a breakpoint in the gx system error process function and see when where it is being called from GUIX Canvas Component The canvas component is responsible for all canvas related processing A canvas is effectively a virtual frame buffer Your application must create at least one canvas in order to produce graphical output Typ
44. dest This is a pointer to a function to copy canvas data from one canvas to another The source canvas invalid rectangle is used to define the copy area VOID gx display driver canvas blend struct CANVAS STRUCT source struct CANVAS STRUCT dest This is a pointer to a function to alpha blend canvas data from the source canvas with the existing data in the destination canvas The source canvas invalid rectangle is used to define the blend area VOID gx display driver blend GX DRAW CONTEXT context INT xpos INT ypos GX PIXELMAP pmp GX UBYTE alpha This is a pointer to a function to blend a pixelmap on the background canvas defined by the draw context The supplied alpha value may be in addition to an alpha channel contained in the pixelmap data VOID gx display driver pixelmap draw GX DRAW CONTEXT context INT xpos INT ypos PIXELMAP pmp This is a pointer to a function to draw a pixelmap into the canvas defined by the draw context VOID display driver pixel write GX DRAW CONTEXT context INT x INT y GX COLOR oolor This is a pointer to a function to write one pixel into the canvas memory VOID gx display driver block move GX DRAW CONTEXT RECTANGLE block INT xshift INT yshift This is a pointer to a function to move or shift a block of pixels within a canvas This function is primarily used for rapidly scrolling a window contents VOID gx display
45. gx widget background set gx widget border draw GUIX User Guide 363 gx widget border style set gx widget border width get gx widget canvas get gx widget child detect gx widget children draw gx widget client get gx widget create gx widget created test 9x widget delete gx widget detach gx widget draw gx widget draw set gx widget event generate gx widget event process gx widget event process set gx widget event to parent gx widget find gx widget front move gx widget height get gx widget hide gx widget resize gx widget shift gx widget show gx widget status add gx widget status get gx widget status remove gx widget status test gx widget style add gx widget style get gx widget style remove gx widget style set gx widget width get GUIX User Guide 364 gx widget background draw Prototype Draw a widget background UINT gx widget background draw GX WIDGI Description This service performs a solid color fill Parameters widget Return Values GX SUCCESS 0x00 GX CALLER ERROR 0x11 GX PTR ERROR 0x07 Allowed From Initialization and threads Example Draw the widget background status gx widget background draw widget If status is SUCCESS the widget background has See Also ET widget of a widget background Pointer to widget to be drawn Successful widget allocate Invalid caller of this function Invalid pointer been drawn
46. gx widget border draw gx widget border style set gx widget border width get gx widget canvas get gx widget child detect gx widget children draw gx widget client get gx widget created gx widget created test gx widget delete gx widget detach gx widget draw gx widget draw set gx widget event generate gx widget event process gx widget event process set gx widget event to parent gx widget find gx widget front move gx widget height get gx widget hide gx widget resize gx widget shift gx widget show gx widget status add gx widget status get gx widget status remove gx widget status test gx widget style remove gx widget style add gx widget style set gx widget width get GUIX User Guide 429 gx widget style remove Prototype Remove widget style UINT gx widget style remove GX WIDGET widget ULONG style Description This service removes a style from the widget Parameters widget Pointer to widget style Style to remove Appendix D contains pre defined general styles for all widgets as well as widget specific styles Return Values GX SUCCESS 0x00 CALLER ERROR 0x11 GX PTR ERROR 0x07 GX INVALID WIDGET 0x12 Allowed From Initialization and threads GUIX User Guide Successful widget style remove Invalid caller of this function Invalid pointer Widget not valid 430 Remove style from widget widget statu
47. main_menu_item 0 break default pass all other events to base processing function status gx _window_event_process main_screen event ptr note 1 break return status In the example above it is important to notice that for system events like GX_EVENT_SHOW events generated internally to notify a widget of a status change the application must pass those events to the base widget event processing function to insure that the normal processing occurs The application can then add additional logic as desired All events that are not handled by the application the default case above should also be passed to the base event processing function Since this example was for a top level screen based on GX_WINDOW the default event processing function is gx_window_event_process Drawing Function All widget drawing is performed separately from the event handling This is more efficient because drawing is usually expensive in terms of CPU cycles By implementing a deferred drawing algorithm all of the outstanding events and associated display changes can be completed before any drawing is done thus eliminating wasted drawing Similar to event processing there is a default widget drawing function for most widgets named gx_xxx_draw where xxx is the widget type In most cases the application won t need to worry about the drawing function of any given widget However in situations where the application requires custom o
48. shi Style uus ccna wena icin inane le rine ie Cin a ne aa nn 124 px confe xrF DrHSD WIG SOEUR UE SEL V ME e Lor ut ed uer uen 125 P SECUS EUST TITO TOTEM 126 Gy COMO SOL eee deiade eeu de uet de que de Gta deuote 128 gx context gelo cd c 129 gx context TOME 131 gx_context_line_color_Set 132 gx context plxelmap gel oo co x EOM REDE 133 OX COMTEX Seb ex uv bo do EUR E UR UD ERU 135 qx context Taw A ee 136 gx context raw fill color 58 138 gx context raw line color 5 139 ax display SOL Caes cree Ep PESE t PEE BEER tus 141 color Table Sel ace n ah e acer ine c ardt in da ace ue dt nes 142 OX display Cre Alera bs ie dees abd eot eo dae eden dad sut te ds 143 display xdelele laedere edhe tbid mut cd 145 9x display font table 5 146 dx displayepielmapstable S6l eese ee ur DU tu LE CN tUe CE Count D uM E 147 NIST CIOS Oe Lee LED AEQUO LEE LUDERE QUE LED ams 148 era aaa n d 149 gx_drop_list_event_procesS Jc UD E UD ERU UD
49. status gx context brush define GX COLOR BLACK ID GX COLOR BLACK ID GX STYLE BORDER NONE If status is SUCCESS the brush of the current context has been defined See Also gx context brush default gx context brush get gx context brush set gx context brush pattern set gx context brush style set gx context brush width set gx context fill color set gx context font set gx context line color set gx context pixelmap set gx context raw brush define gx context raw fill color set gx context raw line color set GUIX User Guide 120 gx context brush get Get brush of current drawing context Prototype UINT gx context brush get GX BRUSH return brush Description This service returns a pointer to the active brush in the current drawing context If there is no active drawing context the service fails and returns a NULL pointer Parameters return brush Pointer to destination for brush Return Values GX SUCCESS 0x00 Successful context brush get GX INVALID CONTEXT 0x06 No active drawing context GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer Allowed From Initialization and threads Example GX BRUSH my brush Get the brush of the current context status gx context brush get amp my brush If status is SUCCESS the brush of the current context has been retrieved See Also gx con
50. 0x00 Successful prompt draw GX CALLER ERROR 0x11 X Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 X Widget not valid Allowed From Initialization and threads Example Draw prompt status gx prompt draw amp my prompt If status is SUCCESS the prompt prompt has been drawn See Also gx pixelmap prompt create gx pixelmap prompt draw gx pixelmap prompt pixelmap set gx prompt create gx prompt font set gx prompt text color set gx prompt text get gx prompt text id set gx prompt text set GUIX User Guide 230 gx prompt font set Set prompt font Prototype UINT gx prompt font set GX PROMPT prompt GX RESOURCE ID font id Description This service sets the font of a prompt widget Parameters prompt Pointer to prompt widget control block font id Resource ID of font Return Values GX SUCCESS 0x00 Successful prompt font set GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 Invalid pointer GX INVALID WIDGET 0x12 Widget not valid GX INVALID RESOURCE ID 0x22 Invalid resource ID Allowed From Initialization and threads Example Set the font of prompt status gx prompt font set amp my prompt MY PROMPT FONT 10 If status is SUCCESS the font for prompt my prompt has been set See Also gx pixelmap prompt create gx pixelmap prompt draw gx
51. 0x00 Successful widget width get GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 Widget not valid Allowed From Initialization and threads Example Get width of widget widget status gx widget width get amp my widget widget width If status is SUCCESS the width of widget widget is widget width See Also gx widget attach gx widget back move gx widget background set gx widget border draw gx widget border style set gx widget border width get gx widget canvas get gx widget child detect gx widget children draw gx widget client get gx widget created gx widget created test gx widget delete gx widget detach gx widget draw gx widget draw set gx widget event generate gx widget event process gx widget event process set gx widget event to parent gx widget find gx widget front move gx widget height get gx widget hide gx widget resize gx widget shift gx widget show gx widget status add gx widget status get gx widget status remove gx widget status test gx widget style add gx widget style get gx widget style remove gx widget style set GUIX User Guide 434 gx window client height get Get window client height Prototype UINT gx window client height get GX WINDOW window GX VALUE return height Description This service gets
52. 0x07 X Invalid pointer Allowed From Initialization and threads Example GX CHAR language table UINT language count UINT string count Retrieve the language table status gx system language table get amp language table amp language count amp string count See Also gx system dirty partial add gx system draw context get gx system event send gx system focus claim gx system initialize gx system start gx system string get system string table get gx system string table set gx system string width get system timer start gx system timer stop gx system widget find GUIX User Guide 309 gx system scroll appearance get Get scroll appearance Prototype UINT gx display scroll appearance get GX DISPLAY display ULONG style GX SCROLLBAR APPEARANCE return appearance Description This service gets the scrollbar appearance Parameters style Scrollbar style GX SCROLLBAR HORIZONTAL or GX_SCROLLBAR_VERTICAL return_appearance Pointer to destination for appearance Return Values GX SUCCESS 0x00 Successfull get scrollbar appearance GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID STYLE 0x18 Invalid style Allowed From Initialization and threads Example GX SCROLLBAR APPEARACE my appearance Get the scrollbar appearance status gx display scroll appearance get display style amp my appearance
53. CUOI X ERO UD XM ULL URS 151 EE EE RT 152 aqx dropelsrEspbxelimnabSebau 153 qx drop list DODUD ea kana eae 154 9x horizontal list children position 155 GUIX User Guide vii gx_horizontal_list_create 156 9x horizontal list event 55 158 gx horizontal list selected index 160 horzorital Iist selected WidGel Gel toca tations 161 horzontal Tist selected SQL us ce dbi texte ii edt tee ite 163 ax TiorzontalAist total COMMAS SSeL uius sepu ten V BUE U vb DUE b BEI Uc DUC 164 9x horizontal scrollbar 165 NOM OPI ERE KI RT 168 e ICOM buton T N 170 gx icon button pixelmap 58 171 159 sche dle nono odas E 172 ARMS SEN 174 gx icon event DOCS SS die 175 56105 ia Da aL LL 176 gx multi line text button 177 gx_multi_line_text_button_drawW os 179 gx multi line text button event 55 180 dire Lb taa 181 gx mult Set
54. Combine two rectangles into first gx utility rectangle compare Compare two rectangles gx utility rectangle define Define rectangle gx utility rectangle resize Resize rectangle gx utility rectangle overlap detect Detect overlap of rectangles gx utility rectangle point detect Detect if point resides in rectangle gx utility rectangle shift Shift rectangle GUIX User Guide 57 gx vertical list children position Position children in vertical list gx vertical list create Create vertical list gx vertical list event process Process vertical list event gx vertical list selected index get Get selected item index gx vertical list selected widget get Get selected widget gx vertical list selected set Set entry in vertical list gx vertical list total rows set Change number of list rows after creation gx vertical scrollbar create Create vertical scrollbar gx widget allocate Dynamically allocate a widget gx widget attach Attach widget to parent gx widget background draw Draw widget background gx widget back attach Attach widget in back gx widget back move Move widget to back gx widget block move Move block of pixels gx widget border draw Draw widget border gx widget border style set Set widget border style gx widget border width get Set widget
55. Example Switch event event type case GX_EVENT_SHOW Do default handling status gx icon event process icon event_ptr add my own handling here break See Also gx icon button create gx icon create gx icon pixelmap set GUIX User Guide 175 gx icon pixelmap set Set pixelmap for icon Prototype UINT gx icon pixelmap set GX ICON icon GX RESOURCE ID normal id GX RESOURCE ID selected id Description This service sets the pixelmap for the specified icon widget Parameters icon Pointer to icon widget control block normal id Normal state Resource ID selected id Selected state Resource ID Return Values GX SUCCESS 0x00 Successful icon pixelmap set 0x11 Invalid caller of this function 0x07 Invalid pointer 0x12 Widget not valid 0x22 Invalid resource ID GX CALLER ERROR GX PTR ERROR GX INVALID WIDGET GX INVALID RESOURCE ID po Allowed From Initialization and threads Example Set pixelmap for icon status gx icon pixelmap set amp my icon MY NOT SELECTED RESOURCE 10 MY SELECTED 10 If status is SUCCESS the icon icon has a pixelmap set See Also gx icon button create gx icon create gx icon draw GUIX User Guide 176 gx multi line text button create Prototype Create multi line text button UINT gx multi line text button create GX MULTI LINE TEXT BUTTON text button
56. GUIX User Guide 33 GUIX User Guide 34 Drawing APIs There are several principal drawing primitives that are required by GUIX to draw all the visual elements on the screen These drawing APIs can also be invoked by application software usually as part of a custom widget drawing function These top level drawing APIs perform parameter validation and clipping and then pass the clipped drawing coordinates down to the display driver for hardware and color format specific drawing implementations These primitives are defined as follows Hardware Initialization Draw basic line Draw horizontal line Draw vertical line Draw Rectangle Draw Quadragon Draw Polygon Draw Text Draw pixelmap Tile pixelmap Draw pixel Blend pixel Buffer Toggle Canvas copy Canvas blend Block Move The above application level drawing APIs don t do actual drawing to the canvas but instead verify the caller s parameters before invoking the driver level drawing function The driver level drawing function actually writes pixel data into the canvas memory GUIX provides stock driver level drawing functions for various color depths including 1 2 4 8 16 24 and 32 bits per pixel bpp Alternatively the underlying hardware driver can utilize its own drawing functions which is useful in cases where the hardware has the needed drawing primitive The following are the stock driver level drawing functions provided by GUIX VOID gx display driver XXBPP can
57. GX FONT structure The GX FONT structure defines global font parameters such as the character included within the font and the line height of the font The GX FONT structure points at an array of GLYPH structures Each GLYPH structure defines the width height and baseline offset of one specific character glyph The GX GLYPH structure also points to the actual glyph bitmap data which may be NULL for whitespace characters The GX FONT structure contained in gx api h is declared as follows typedef struct GX FONT STRUCT GX UBYTE gx font format GX UBYTE gx font prespace GX UBYTE gx font postspace GX UBYTE gx font line height GX UBYTE gx font baseline USHORT gx font first glyph USHORT gx font last glyph GX CONST GX GLYPH gx font glyphs const struct GX FONT STRUCT gx font next page FONT The gx font format field defines the font bits per pixel and other flags as defined in the gx api h header file The gx font prespace defines the pixel space to skip above each line of text in a multi line text display The gx font postspace field defines the pixel space to skip below each line of text in a multi line text display The gx font line height field defines the height of the tallest glyph in the font The gx font baseline field defines the distance in pixels from the top row of glyph pixels to the font baseline GUIX User Guide 473 The gx font first glyph field defines the first Unicode character encod
58. GX SUCCESS 0x00 Successfully set slider information GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR Allowed From 0x07 Invalid pointer Initialization and threads Example Process event for slider slider status gx slider info set amp my slider amp slider info If status is SUCCESS the slider is configured with my slider info GUIX User Guide 276 See Also gx pixelmap slider create gx pixelmap slider draw gx pixelmap slider event process gx pixelmap slider pixelmap set gx slider create gx slider draw gx slider needle draw gx slider needle position get gx slider needle position get gx slider tickmarks draw gx slider travel get gx slider value calculate gx slider value set GUIX User Guide 277 gx slider needle draw Draw slider needle Prototype UINT gx slider needle draw GX SLIDER slider Description This service draws a slider needle This service is automatically called by the gx slider draw function but may also be invoked by the application as part of a customized slider drawing function Parameters slider Slider widget control block Return Values GX SUCCESS 0x00 Successful slider needle draw GX_CALLER_ERROR 0x11 Invalid caller of this function GX_PTR_ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 X Widget not valid Allowed From Initialization and threads Example Draw needle fo
59. INVALID CONTEXT active drawing context GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDTH Ox1E Invalid width Allowed From Initialization and threads Example Set the brush width of the current context to 10 pixels status gx context brush width set 10 If status is SUCCESS the brush width of the current context has been set to 10 See Also gx context brush default gx context brush define gx context brush get gx context brush set gx context brush pattern set gx context brush style set gx context fill color set gx context font set gx context line color set gx context pixelmap set gx context raw brush define gx context raw fill color set gx context raw line color set GUIX User Guide 125 gx context color get Get color value associated with color ID in current draw context Prototype UINT gx context color get GX RESOURCE ID color id GX COLOR return color Description This service retrieves the color value associated with the indicated color ID The color value is returned in the color format of the active context display Parameters color id Resource ID of color requested return color Address of variable to hold returned color value Return Values GX SUCCESS 0x00 Successful context fill color set GX INVALID CONTEXT 0x06 No active drawing context GX CALLER ERR
60. Pointer to display control block Name of the display Pointer to display driver setup function Pointer to optional driver information Color format as defined in Appendix C Number of pixels on the x axis Number of pixels on the y axis Successful screen create Invalid caller of this function 0x07 Invalid pointer Widget already created Invalid screen control block size 0x24 Invalid screen format 143 Create screen display status gx display create amp my display my display NULL GX COLOR FORMAT 16BIT RGB 320 480 If status is SUCCESS the screen my display has been created See Also gx display destroy GUIX User Guide 144 gx display delete Destroy display Prototype UINT gx display delete GX DISPLAY display VOID display driver cleanup GX DISPLAY Description This service shutdown a display and cleans up allocated resources Parameters display Pointer to display control block display driver cleanup Pointer to display driver cleanup function Return Values GX SUCCESS 0x00 Successful screen create GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer Allowed From Initialization and threads Example Delete a display my display status gx display delete amp my display GX NULL If status is SUCCESS the screen my display has been destroyed
61. See Also gx button background draw gx button create gx button deselect gx button draw gx button event process gx button select gx pixelmap button create gx pixelmap button draw gx pixelmap prompt create gx pixelmap prompt draw gx pixelmap prompt pixelmap set gx pixelmap slider create gx pixelmap slider draw gx slider event process gx radio button create gx radio button draw gx icon button create gx text button create gx text button color set gx text button draw GUIX User Guide 205 gx pixelmap prompt create Prototype Create pixelmap prompt UINT gx pixelmap prompt create GX PIXELMAP PROMPT prompt Description GX CONST GX CHAR name GX WIDGET parent GX RESOURCE ID text id GX RESOURCE ID fill pixelmap id ULONG style USHORT pixelmap prompt id GX CONST GX RECTANGLE size This service creates a pixelmap prompt widget A pixelmap prompt differs from a standard GX PROMPT in that it paints the background of the prompt using pixelmaps The create function accepts one pixelmap id the normal state fill pixelmap Up to six pixelmaps may be assigned to the pixelmap prompt Parameters prompt name parent text id fill id style pixelmap prompt id size Return Values GX SUCCESS GX CALLER ERROR GX PTR ERROR ALREADY CREATED GX INVALID RESOURCE ID GUIX User Guide Pointer to pixelmap prompt control block Logical name of pixelma
62. User Guide 464 Appendix C GUIX Color Formats Color Value GX COLOR FORMAT MONOCHROME 1 GX COLOR FORMAT MONOCHROME INVERTED 2 GX COLOR FORMAT 2BIT 4GRAY 3 GX COLOR FORMAT 2BIT GRAY INVERTED 4 COLOR FORMAT 4 GRAY 5 COLOR FORMAT 4 GRAY INVERTED 6 COLOR FORMAT 4 VGA 7 GX COLOR FORMAT 8BIT GRAY 8 GX COLOR FORMAT 8BIT GRAY INVERTED 9 GX COLOR FORMAT 8BIT PALETTE 10 GX COLOR FORMAT 8BIT PACKED PIXEL 11 GX COLOR FORMAT 15BIT BGR 12 GX COLOR FORMAT 15BIT RGB 13 GX COLOR FORMAT 16BIT RGB 14 GX COLOR FORMAT 16BIT ARGB 15 GX COLOR FORMAT 16BIT BGRA 16 GX COLOR FORMAT 16BIT BGR 17 GX COLOR FORMAT 24BIT RGB 18 GX COLOR FORMAT 24BIT BGR 19 GX COLOR FORMAT 24BIT XRGB 20 GX COLOR FORMAT 24BIT BGRX 21 GX COLOR FORMAT 32BIT ARGB 22 GX COLOR FORMAT 32BIT RGBA 23 GX COLOR FORMAT 32BIT ABGR 24 GX COLOR FORMAT 32BIT BGRA 25 GUIX User Guide 465 Appendix D GUIX Widget Styles Style General Styles GX STYLE BORDER NONE GX STYLE BORDER RAISED GX STYLE BORDER RECESSED GX STYLE BORDER THIN GX STYLE BORDER THICK GX STYLE BORDER MASK GX STYLE TRANSPARENT GX STYLE DRAW SELECTED GX STYLE ENABLED Additional Button Styles GX STYLE BUTTON PUSHED GX STYLE BUTTON TOGGLE GX STYLE BUTTON RADIO GX STYLE BUTTON EVENT ON PUSH GX STYLE BUTTON REPEAT Additional List Styles GX STYLE CENTER SELECTED GX STYLE WRAP GX STYLE FLICKABLE Additional Pixelmap Button and Icon Button Styles GX STYLE HALIGN CENTER G
63. User Guide 63 gx animation start Start an animation Prototype UINT gx animation start GX ANIMATION animation GX ANIMATION INFO params Description This service initiates an animation sequence using a previously created animation controller and a new set of animation parameters The animation controller makes a local copy of the parameters meaning the parameter structure does not need to be statically defined Parameters animation Pointer to animation control block params Pointer to parameter structure Return Values GX SUCCESS 0x00 Successful GX PTR ERROR 0x07 X Invalid pointer GX INVALID VALUE 0x22 Invalid parameter Allowed From Initialization and threads Example GX ANIMATION INFO params define a slide down and to the right params gx animation start position gx point 0 params gx animation start position gx point y 0 params gx animation end position gx point x 100 params gx animation end position gx point y 200 params gx animation type ANIMATION SLIDE OUT params gx animation target amp my window params gx animation parent root window params gx animation start alpha 255 params gx animation steps 10 params gx animation delay 2 gx animation start amp animation amp params If status is GX SUCCESS the animation is initiated GUIX User Guide 64 See Also gx animation canvas define gx animation create gx animation stop GUIX User Gu
64. WIDGET SIZE 0x14 Invalid widget control block size INVALID RESOURCE ID 0x22 Invalid resource ID GX INVALID STYLE 0x18 Invalid style GX INVALID SIZE 0x19 Invalid size Allowed From Initialization and threads GUIX User Guide 104 Create my checkbox status gx checkbox create amp my checkbox checkbox parent CHECKBOX TEXT RESOURCE 10 STYLE BORDER RAISED CHECKBOX ID amp size If status is GX SUCCESS the checkbox my_checkbox has been created See Also gx_checkbox_draw gx_checkbox_event_process gx_checkbox_select GUIX User Guide 105 gx checkbox draw Draw checkbox Prototype UINT gx checkbox draw GX CHECKBOX checkbox Description This service draws the specified checkbox This function is normally called internally by the GUIX canvas refresh mechanism but is exposed to the application to assist with implementing custom drawing functions for custom checkbox widgets Parameters checkbox Pointer to checkbox control block Return Values GX SUCCESS 0x00 Successful checkbox draw GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 Widget not valid Allowed From Initialization and threads Example Draw checkbox status gx checkbox draw amp my checkbox If status is SUCCESS the checkbox checkbox has been drawn S
65. add drawing a small green LED ON bitmap in the middle right portion of the button when the button is pressed and small LED OFF bitmap when the button is not pressed We want to create a button that looks like this button button custom button button button custom button off GUIX User Guide 45 In this case we would write a button drawing function that looks something like this UINT my button draw GX TEXT BUTTON button GX_PIXELMAP map ULONG button_style INT xpos INT ypos first do the normal text button drawing gx_text_button_draw button now add our extra pixelmap gx widget style get button amp button style if button style amp GX STYLE BUTTON PUSHED use the ON pixelmap gx context pixelmap get GX PIXELMAP ID LED ON amp map else use the OFF pixelmap gx context pixelmap get GX PIXELMAP ID LED OFF amp map if map draw it 20 pixels in from right edge xpos button gx widget size gx rectangle right xpos map gx pixelmap width 20 and draw 10 pixels from the top edge ypos button gx widget size gx rectangle top 10 draw the extra pixelmap on top of the button gx canvas pixelmap draw xpos ypos map GUIX Drawing Context Component The drawing context is created dynamically at runtime as GUIX performs each canvas refresh operation The drawing context ties together the canvas screen
66. brush width set gx context fill color set gx context font set gx context line color set gx context pixelmap set gx context raw brush define gx context raw fill color set gx context raw line color set GUIX User Guide 116 gx context brush define Define brush of current drawing context E ID line color id E ID fill color id Prototype UINT gx context brush define GX RESOURC GX RESOURC UINT style Description This service defines the brush of the current screen context Parameters line color id Resource ID of line color Appendix B contains pre defined color Resource IDs Note that the application may add custom color Resource IDs as well fill color id Resource ID of fill color Appendix B contains pre defined color Resource IDs Note that the application may add custom color Resource IDs as well style Style of brush The supported brush styles include GX BRUSH OUTLINE This brush style applies to shape drawing functions such as canvas rectangle draw or 9 canvas polygon draw This style indicates the shape should be outlined in addtional to optionally being fill If the GX BRUSH OUTLINE style is set and the GX BRUSH SOLID FILL flag is clear the shape is only outlined GX BRUSH SOLID FILL This brush style also applies to shape drawing functions and indicates that the requested shape should be filled with a solid color using
67. button pxielmap set gx pixelmap prompt create gx pixelmap prompt draw gx pixelmap prompt pixelmap set gx pixelmap slider create pixelmap slider draw gx slider event process gx radio button create gx radio button draw gx icon button create gx text button create gx text button color set gx text button draw GUIX User Guide 201 gx pixelmap button event process Pixelmap button event processing Prototype UINT gx pixelmap button event process GX PIXELMAP BUTTON button GX EVENT event ptr Description This service provides default event handling for the pixelmap button widget type Parameters button Pointer to pixelmap button control block event ptr Pointer to GX EVENT structure Return Values GX SUCCESS 0x00 Successful pixelmap button draw GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 Widget not valid Allowed From Initialization and threads Example Switch event event type case GX EVENT SHOW Do default handling status gx pixelmap button event process icon event ptr add my own handling here break See Also gx button background draw gx button create gx button deselect gx button draw gx button event process gx button select gx pixelmap button create gx pixelmap button pxielmap set gx pixelmap prompt create gx pixelmap prompt draw G
68. button text get GX TEXT BUTTON text button GX CHAR return text Description This service sets the specified string to the text button Parameters text button Pointer to text button control block return text Pointer to the string retrieved from the text button Return Values GX SUCCESS 0x00 GX CALLER ERROR 0x11 GX_PTR_ERROR 0x07 Allowed From Initialization and threads Example Get the string from the text button my_text_button Successfully get the text from the button Invalid caller of this function Invalid pointer status gx_text_button_text_color_get amp my_text_button amp string If status is SUCCESS the string pointer from my text button is retrieved and stored in string See Also gx button background draw gx button create gx button deselect gx button draw gx button event process gx button select gx icon button create x pixelmap button create gx pixelmap button draw gx text button create gx text button draw gx text button font set gx text button text color set gx text button text set gx text button text id set GUIX User Guide 330 gx text button text id set Set text resource ID to the thext button Prototype UINT gx text button text id set GX TEXT BUTTON text button RESOURCE ID string id Description This service sets the specified string resource ID to the text button Parameters text button P
69. by the application program Parameters display Index into the display table which corresponds to the display definitions in the Studio project file driver pointer to display driver initialization function This function is invoked to initialize the indirect function pointers of the GX DISPLAY control block as well as perform any required hardware setup language initial language table index language initial theme index root pointer to variable in which to return root window address or GX NULL GUIX User Guide 296 Return Values GX SUCCESS 0x00 Successful GX FAILURE 0x11 Display could not be initialized Allowed From Initialization and threads Example Create the widget named child popup which is a child of the top level screen screen GX WIDGET menu screen status gx studio display configure MAIN DISPLAY my driver setup LANGUAGE ENGLISH DEFAULT THEME GX NULL If status SUCCESS the display was initialized a canvas was created for the display a root window was created for the canvas and the requested language and theme have been installed See Also gx display create gx display color table set gx display font table set gx display pixelmap table set gx system language table set gx system active language set gx system scroll appearance set gx canvas create gx window root create GUIX User Guide 297 gx system active language set Set a
70. color GX COLOR fill color UINT style This service defines a brush with the specified line color fill color Pointer to brush control block Color of brush line Appendix A contains pre defined colors Note that the application may add custom colors as Color of brush fill Appendix A contains pre defined colors Note that the application may add custom colors as and style Parameters brush line color well fill color well style Brush style Appendix D describes the supported brush styles Brush styles can be combined into one variable using bitwise OR operation Return Values GX SUCCESS 0x00 GX CALLER ERROR 0x11 GX PTR ERROR 0x07 Allowed From Initialization and threads GUIX User Guide Successful brush definition Invalid caller of this function Invalid brush pointer 68 Define a brush status gx brush define amp my brush GX COLOR BLACK GX COLOR BLACK GX STYLE BORDER NONE If status is SUCCESS the brush was successfully created See Also gx brush default GUIX User Guide 69 gx button background draw Draw button background Prototype UINT gx button background draw GX BUTTON button Description This service draws the button background This service is normally called internally by the gx button draw function but is exposed to the application to assist in writing custom drawing functions Parameters button Pointer to butto
71. color set gx context line color set gx context pixelmap set gx context raw brush define gx context raw fill color set gx context raw line color set GUIX User Guide 131 gx context line color set Prototype Set line color of current drawing context UINT gx context line color set GX RESOURCE ID line color id Description This service sets the line color of the active brush in the current drawing context Parameters line color id Line color of current context Appendix Return Values B contains pre defined color Resource IDs Note that the application may add custom color Resource IDs as well GX SUCCESS 0x00 Successful context line color set GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 Invalid pointer INVALID RESOURCE ID 0x22 Invalid resource ID Allowed From Initialization and threads Example Set the line color of the current context to black status gx context line color set GX COLOR BLACK ID If status is SUCCESS the line color of the current context has been set to black See Also 9 context brush default gx context brush define gx context brush get 9 brush set gx context brush pattern set gx context brush style set gx context brush width set gx context gx context fill color set gx context font set gx context
72. coordinate s Allowed From Initialization and threads Example Draw a pie from 0 degree to 90 degree in clockwise status gx canvas pie draw 100 100 50 0 90 If status is SUCCESS the pie has been drawn on canvas See Also gx canvas arc draw gx canvas block move gx canvas circle draw gx display create gx canvas ellipse draw gx canvas line draw gx canvas pixelmap draw gx canvas pixelmap tile gx canvas polygon draw gx canvas rectangle draw gx canvas text draw GUIX User Guide 91 gx canvas offset set Prototype Assign canvas x y display offset UINT gx canvas offset set GX CANVAS canvas GX VALUE x GX VALUE y Description This service assigns an x y display offset for the specified canvas This controls the position at which the canvas is composited into the visible frame buffer and is often used when the canvas is smaller than the physical display Parameters canvas X y Return Values GX SUCCESS offset GX CALLER ERROR GX PTR ERROR GX INVALID CANVAS Allowed From Initialization and threads Example Set display offset for my canvas Pointer to canvas control block X coordinate of offset Y coordinate of offset 0x00 0x11 0x07 0x20 status gx canvas offset set amp my canvas 20 30 Successful assignment of Invalid caller of this function Invalid pointer Invalid canvas If status is SUCCESS th
73. create GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 Invalid pointer Allowed From Initialization and threads Example UINT status gx progress bar draw progress bar if status SUCCESS the bar was successfully drawn See Also gx progress bar draw gx progress bar event process gx progress bar fill color set gx progress bar font set gx progress bar info set gx progress bar pielmap set gx progress bar range set gx progress bar text color set gx progress bar value set GUIX User Guide 220 gx progress bar event process Progress bar event process function Prototype UINT progress bar event process PROGRESS BAR progress bar GX EVENT event ptr Description This service handles progress bar events Parameters progress bar Progress bar control block event ptr Pointer to GX EVENT structure Return Values GX SUCCESS 0x00 Successful prompt create GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 Invalid pointer Allowed From Initialization and threads Example UINT status gx progress bar event process progress bar event ptr if status SUCCESS the event was successfully processed See Also gx progress bar draw gx progress bar event process gx progress bar fill color set gx progress bar font set gx progress bar info set gx progress bar pielmap set gx progress bar range set gx progress ba
74. create gx pixelmap slider draw gx pixelmap slider event process gx pixelmap slider pixelmap set gx slider create gx slider draw gx slider event process gx slider needle draw gx slider needle position get gx slider needle position get gx slider tickmarks draw gx slider value calculate gx slider value set GUIX User Guide 283 gx slider value calculate Calculate slider value Prototype UINT gx slider value calculate GX SLIDER slider GX SLIDER INFO info INT new position Description This service calculates the slider value based on the slider needle position This function is called internally by GUIX when the user moves the slider needle but can also be invoked by the application when implementing a custom slider widget Parameters slider Slider widget control block info Pointer to slider info The GX SLIDER INFO structure has the following integer members 9x slider info min value 9x slider info max value 9x slider info current value 9x slider info increment 9x slider info min travel 9x slider info max travel 9x slider info needle pos 9x slider info needle width 9x slider info needle height 9x slider info needle inset 9x slider info needle hotspot offset new position New slider position Return Values GX SUCCESS 0x00 Successful slider value calculate GX CALLER ERROR Invalid caller of this function GX PTR ERROR Invalid pointer GX INVALID WIDGET 0x12 Widget
75. draw Draw slider tickmarks gx slider travel get Get slider travel gx slider value calculate Calculate slider value gx slider value set Set slider value gx sprite create Create SPRITE widget gx sprite current frame set Assign current display frame for sprite widget gx sprite frame list set Assign or modify a sprite frame list gx sprite start Start a sprite sequence gx sprite stop Stop a sprite sequence gx studio widget create Create widget defined within Studio gx studio named widget create Create screen defined within Studio GUIX User Guide 56 gx studio display configure Create and initialize GX DISPLAY GX CANVAS and GX WINDOW ROOT gx system active language set Assign active language ID system canvas refresh Force refresh drawing of dirty canvases gx system dirty mark Mark area dirty gx system dirty partial add Mark partial area dirty gx system draw context get Get drawing context gx system event fold Foldevent gx system event send Send event gx system focus claim Claim focus gx system initialize Initialize GUIX gx_system_language_table_get Retrieve language table gx_system_language_table_set Assign language table gx_system_memory_allocator_set Assign memory allocator de allocator gx_system_scroll_appea
76. driver and brush being used to perform the current drawing operations The drawing context is defined by the GX DRAW CONTEXT structure This structure contains variables that define the clipping and view of the current drawing operation define the current canvas and define the current screen driver in use The GX DRAW CONTEXT structure also holds the brush being used for drawing The draw context brush is the member that you will work directly with in your custom drawing functions The brush structure is defined as typedef struct GX BRUSH STRUCT PIXELMAP gx brush pixelmap GX FONT gx brush font ULONG gx brush line pattern GUIX User Guide 46 UINT gx brush style UINT gx brush width GX COLOR gx brush fill color GX COLOR gx brush line color GX BRUSH The gx brush pixelmap defines a pixelmap to use for rectangle and polygon fills This member is not used unless the gx brush style is includes the GX BRUSH PIXELMAP style The gx brush font member defines the font used for text drawing The brush line pattern member defines the pattern used for dashed lines The gx brush style member is a set of style flags that can be OR d together to fully define the brush attributes The available brush style flags include GX BRUSH OUTLINE GX BRUSH SOLID FILL GX BRUSH PIXELMAP GX BRUSH ALIAS GX BRUSH UNDERLINE GX BRUSH ROUND GX BRUSH PATTERN The gx brush width member defines the line with for li
77. driver pixel blend GX DRAW CONTEXT context INT x INT y GX COLOR color GX UBYTE alpha This function is used to alpha blend the incoming pixel color value with the existing color value in the canvas memory at position x y COLOR gx display driver native color get GX COLOR rawcolor This function converts a color from the 32 bit A R G B color format used internally by GUIX to the native color format of the canvas and display Some loss of color information is expected for display drivers running at lower color depths USHORT gx display driver row pitch get USHORT width Returns the byte count or stride of one row of graphics data given the requested canvas width This function is used to calculate the size of the memory area GUIX User Guide 456 needed to create canvas The row pitch and width are always the same due to hardware scan line alignment constraints VOID gx display driver buffer toggle struct GX CANVAS STRUCT canvas RECTANGLE dirty area This is a pointer to a function to toggle between the working and visible frame buffers for double buffered memory systems This function must first instruct the hardware to begin using the new frame buffer then copy the modified portion of the new visible buffer to the companion buffer to insure the two buffers stay in synch VOID gx display driver polygon draw GX DRAW CONTEXT context INT num points POINT vertices Pointer to a function t
78. eiu 214 9x pixelmap slider event 8 215 216 progress Dal aenean aen 218 progress Dal 220 ux prodgress Dar eveht DfOGOSS b oec e 221 gx progress Dar font IRL SAM 222 Qx progress Dak IMO SI eae e e ce ed cate ck Qu a deducto 223 gx progress bar pixelmap Set a nra onde 224 gx progress Dal range 2 chil qute ad miden 225 Ox progress Dar color 56l EUER EUER 226 dgx progress ar value Sel inei ERU ER EX 227 gx prompt Create ssec eiie ideae ot ed a EE D e ER ERR ES AX EU SEU LER ELK 228 eise enviadas cA D Act n AMAT D A 230 Qx prompLb TOM tat aet usd ua cup abl quil quta eb a 231 gx prompt text color 828 232 gx prompt text Ql avast eese rr rip HE VERE MARRE EIE AE EE APPENA 234 gX prompt text id SO roi acis uo da bU ida PU e ardt iba P da PU D cL EI Los 235 Prompt TS ta dete itr a diei Ra ee 236 Dutton ccreale uode dui eiui 237 gx_radio_button_drawW e eco p
79. frame buffer swap or refresh operation when the draw nesting level returns to 0 This service should only be called by the application to close a drawing sequence begun with gx canvas drawing initiate Parameters canvas Pointer to canvas control block flush If GX TRUE canvas changes are flushed to the display Return Values GX SUCCESS 0x00 Successful drawing completion GX CALLER ERROR 0x11 X Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID CANVAS 0x20 Invalid canvas Allowed From Initialization and threads Example Complete drawing on canvas and flush to display status gx canvas drawing complete amp my canvas GX TRUE If status is SUCCESS the canvas drawing was successfully completed See Also gx canvas alpha set gx canvas create gx canvas drawing initiate gx canvas offset set gx canvas shift GUIX User Guide 85 gx canvas drawing initiate Initiate canvas drawing Prototype UINT gx canvas drawing initiate GX CANVAS canvas GX WIDGET who GX RECTANGLE dirty area Description This service initiates drawing on the specified canvas This service is called internally as part of the deferred drawing operation performed automatically by GUIX when a canvas needs to be update However the application is allowed bypass the GUIX deferred drawing algorithm and perform immediate and direct drawing on a canvas by first calling
80. gx context brush style set gx context brush width set context fill color set gx context font set gx context line color set gx context set gx context raw brush define gx context raw line color set GUIX User Guide 138 gx context raw line color set Set raw line color of current drawing context Prototype UINT gx context raw line color set GX COLOR line color Description This service sets the line color of the active brush in the current drawing context The line color parameter is a 32 bit ARGB format raw color value rather than a color ID value Raw color definitions are useful when the desired color is not present in the current system color table or when the RGB color value is computed at runtime Parameters line color Color of line value Appendix A contains pre defined colors Note that the application may add custom colors as well Return Values GX SUCCESS 0x00 Successful context raw line color set GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID COLOR 0x15 Invalid color Allowed From Initialization and threads Example Set the raw line color of the current context status gx context raw line color set GX COLOR BLACK If status is SUCCESS the raw line color of the current context has been set See Also gx context brush default gx context brush define gx contex
81. gx drop list open Prototype UINT Description Open a drop list gx drop list open GX DROP LIST drop list This service opens a previously created drop list Parameters drop list Return Values GX SUCCESS 0x00 GX CALLER ERROR 0x11 ERROR 0x07 Allowed From Initialization and threads Example DROP LIST mylist 9x drop list open amp mylist See Also Pointer to the drop list control block Successful screen create Invalid caller of this function Invalid pointer gx drop list close gx drop list create gx drop list event process gx drop list pixelmap set gx drop list popup get GUIX User Guide 152 gx drop list pixelmap set Set pixelmap to the drop list Prototype UINT gx drop list pixelmap set GX DROP LIST drop list GX RESOURCE ID id Description Assign a pixelmap to the icon button displayed on a previously created drop list Parameters drop list Pointer to the drop list control block id Resource ID to the pixlemap Return Values GX SUCCESS 0x00 Successful screen create GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 Invalid pointer GX INVALID RESOURCE ID 0x22 Invalid pixlemap ID Allowed From Initialization and threads Example DROP LIST mylist create the drop list here Assign a pixelmap id which will turn on the list button gx drop list pixelmap set amp mylist GX PIXELMAP ID DOWN A
82. gx system string get gx system string table get gx system string table set gx system string width get system timer start gx system timer stop gx system widget find GUIX User Guide 300 gx system dirty partial add Mark partial area dirty Prototype UINT gx system dirty partial add GX WIDGET widget GX RECTANGLE dirty area Description This service marks the partial area of this widget as dirty This queues the widget for re drawing by the GUIX canvas refresh operation when the system event processing has been completed Parameters widget Pointer to widget control block dirty area Dirty area of widget to add Return Values GX SUCCESS 0x00 Successful partial dirty area mark GX CALLER ERROR Invalid caller of this function GX PTR ERROR Invalid pointer GX INVALID WIDGET 0x12 Widget not valid GX INVALID SIZE Invalid size of dirty area Allowed From Initialization and threads Example Mark widget widget partial area as dirty status gx system dirty partial add amp my widget amp partial area If status is SUCCESS the partial area partial area associated with widget has been marked as dirty See Also gx system dirty partial add gx system draw context get gx system event send gx system focus claim gx system initialize gx system start gx system string get gx system string table get gx system string ta
83. gx utility math sin my angle angle sine contains the sine of angle See Also gx utility Itoa gx utility math cos gx utility math sqrt gx utility pixelmap rotate gx utility pixelmap simple rotate gx utility rectangle center gx utility rectangle center find gx utility rectangle combine gx utility rectangle compare gx utility rectangle define gx utility rectangle grow gx utility rectangle overlap detect gx utility rectangle point detect gx utility rectangle shift GUIX User Guide 335 gx utility math sqrt Compute square root Prototype UINT gx utility math sqrt UINT value Description This service computes the square root of the supplied value Parameters value Value to compute square root of Return Values square root Square root of supplied value Allowed From All Example Compute square root of my value my square root gx utility math sqrt my value square root contains the square root my value See Also gx utility gx utility math cos gx utility math sin gx utility pixelmap rotate gx utility pixelmap simple rotate gx utility rectangle center gx utility rectangle center find gx utility rectangle combine gx utility rectangle compare gx utility rectangle define gx utility rectangle grow gx utility rectangle overlap detect gx utility rectangle point detect gx utility rectangle shift GUIX User Guide 336 gx utilit
84. in memory However it is most common to GUIX User Guide 38 make the widget object control block global structure by defining it outside the scope of any function If you are using GUIX Studio your widget control blocks can be statically allocated within your Studio generated specifications file or they can be dynamically allocated by your application Dynamic Widget Control Block Allocation and De allocation If you are using dynamic control block allocation you will need to define two functions that GUIX will use to allocate and free the memory required for your widget control blocks Your functions for memory management are passed to the GUIX system component via the gx system memory allocator set API function This function allows you to pass two function pointers into GUIX the first is a pointer to a memory allocation function and the second is a pointer to a memory free function Most often you will implement these functions using ThreadX byte pools but the design of GUIX allows you to implement dynamic memory management in whatever way you prefer Dynamic widget allocation is most often employed within your Studio generated application specifications file when you select the dynamically allocated option in the Studio widget properties field However you can also use dynamic control block allocation within your application If you use dynamic control block allocation within your application you should invoke the gx widget al
85. into which child widgets are searched If this value is 0 only immediate children of each root window are searched If this value is GX SEARCH DEPTH INFINITE the function nests down into all children searching for the requested widget ID For any other value 0 the search level defines how deeply nested this function will go searching for the reqested widget ID return search result Pointer to destination for widget found Return Values GX SUCCESS Successful widget search GX NOT FOUND Widget ID not found GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR Invalid pointer Allowed From Initialization and threads GUIX User Guide 322 Search recursively from the top level widget for the widget with ID of MY WIDGET 10 status gx system widget search MY WIDGET ID GX TRUE NULL amp my widget If status is SUCCESS the search was successful and my widget contains the pointer to the widget See Also gx system dirty partial add gx system draw context get system event send gx system focus claim gx system initialize gx system start gx system string get gx system string table get gx system string table set gx system string width get system timer start gx system timer stop gx system widget find GUIX User Guide 323 gx text button create Create text button Prototype UINT gx text button create GX TEXT B
86. multi line text view event process gx multi line text view font set gx multi line text view text color set gx multi line text view text id set gx multi line text view text set GUIX User Guide 195 gx multi line text view text color set Set the text color for the multi line text view Prototype UINT gx multi line text view text color set GX MULTI LINE TEXT VIEW text view GX RESOURCE ID normal text color id GX RESOURCE ID selected text color id Description This service assigns text color to the multi line text view widget Parameters text view Multi line text view widget control block normal text color id Resource ID of the color for normal text selected text color id Resource ID of the color selected text Return Values GX SUCCESS 0x00 Successfully set colors for the multi line text view GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 Invalid pointer GX INVALID RESOURCE ID 0x22 Invalid resource ID Allowed From Initialization and threads Example Set normal text color and selected text color to the multi line text view widget my text view status gx multi line text view text color set amp my text view NORMAL TEXT COLOR SELECTED TEXT COLOR If status is SUCCESS the text view text view will display the text using specified colors See Also gx single line text input create gx multi line
87. my parent MY PIXELMAP RESOURCE ID STYLE BORDER RAISED MY ICON 10 5 30 If status is SUCCESS the icon my icon has been created See Also gx icon button create gx icon draw gx icon pixelmap set GUIX User Guide 173 gx icon draw Draw icon Prototype UINT gx icon draw GX ICON icon Description This service draws the specified icon widget Parameters icon Pointer to icon widget control block Return Values GX SUCCESS 0x00 Successful icon drawing GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 4 Widget not valid Allowed From Initialization and threads Example Draw icon status gx icon draw amp my icon If status is SUCCESS the icon icon has been drawn See Also gx icon button create gx icon create gx icon pixelmap set GUIX User Guide 174 gx icon event process Icon widget event processing Prototype UINT gx icon event process ICON icon EVENT event ptr Description This service handles events sent to a GX ICON widget Parameters icon Pointer to icon widget control block event ptr Pointer to GX EVENT structure Return Values GX SUCCESS Successful icon drawing GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR Invalid pointer GX INVALID WIDGET Widget not valid Allowed From Initialization and threads
88. my widget SEARCH DEPTH INFINITE MY WIDGET 10 amp widget found If status is SUCCESS the pointer widget found contains the pointer to the widget found See Also widget attach gx widget back move gx widget background set gx widget border draw gx widget border style set gx widget border width get gx widget canvas get gx widget child detect gx widget children draw gx widget client get gx widget created gx widget created test gx widget delete gx widget detach gx widget draw gx widget draw set gx widget event generate gx widget event process gx widget event process set gx widget event to parent gx widget front move gx widget height get gx widget hide gx widget resize 9x widget shift gx widget show gx widget status add gx widget status get gx widget status remove gx widget status test gx widget style add gx widget style get gx widget style remove gx widget style set gx widget width get GUIX User Guide 405 gx widget focus next Move focus to next widget in navigation order Prototype UINT gx widget focus next GX WIDGETG widget Description This service retrieves the font associated with the specified resource ID from the font table of the display on which this widget is visible This function should only be called by a visible widget Parameters widget Pointer to widget control block Return Values GX SUCCESS 0x00
89. pixelmap prompt pixelmap set gx prompt create gx prompt draw gx prompt text color set gx prompt text get gx prompt text id set gx prompt text set GUIX User Guide 231 gx prompt text color set Prototype Set prompt text color UINT gx prompt text color set GX PROMPT prompt Description GX RESOURC GX RESOURC E ID normal color E ID selected color This service sets the text color of a prompt widget Parameters prompt normal color selected color Return Values GX SUCCESS GX CALLER ERROR GX PTR ERROR GX INVALID WIDGET GX INVALID RESOURCE ID Allowed From Initialization and threads GUIX User Guide Pointer to prompt widget control block Resource ID of color for normal text Appendix B contains pre defined color Resource IDs Note that the application may add custom color Resource IDs as well Resource ID of color for selected text Appendix B contains pre defined color Resource IDs Note that the application may add custom color Resource IDs as well 0x00 0x1 1 0x07 0x12 0x22 YS 2 o Successful prompt text color set Invalid caller of this function Invalid pointer Widget not valid Invalid resource ID 232 Set the text color of prompt status gx prompt text color set amp my prompt GX COLOR ID BLACK GX COLOR ID LIGHTGRAY If status is SUCCESS the text color for prompt my prompt h
90. present to repeatedly transmit the graphics data along with timing signals from the local memory to the display This model differs from model 1 in that the graphics memory is a block of the local SRAM or DRAM available to the CPU This may be the same memory in which stack and program variables live Model 3 Local frame buffer external GRAM KG Display Frame Display Driver Buffer Model 3 is a combination of the first two In this model sufficient local memory exists to hold one frame buffer In addition the display device provides an external GRAM and automatically refreshes itself using the data provided in the GRAM This architecture benefits from improved update efficiency because we can transfer the modified portion of the local frame buffer to the external GRAM in one block transfer often utilizing on GUIX User Guide 19 board channels This model also eliminates the tearing and flicker that can be present in either of the first two models because only completed graphics contents is copied to the external GRAM Model 4 Ping pong frame buffers Frame Buffer NC 47 Display Display Driver TA Frame Buffer In model 4 sufficient memory is present to provide two local frame buffers In this case GUIX treats one frame buffer as the active frame buffer and the other as the working frame buffer When a display update or drawing operation is in progress it takes place in the working buffer Whe
91. process If status is SUCCESS all event processing for widget widget is handled by my event process See Also widget attach gx widget back move gx widget background set gx widget border draw gx widget border style set gx widget border width get gx widget canvas get gx widget child detect gx widget children draw gx widget client get gx widget created gx widget created test gx widget delete gx widget detach gx widget draw gx widget draw set gx widget event generate gx widget event process gx widget event to parent gx widget find gx widget front move widget height get gx widget hide gx widget resize gx widget shift gx widget show gx widget status add gx widget status get gx widget status remove gx widget status test gx widget style add gx widget style get gx widget style remove gx widget style set gx widget width get GUIX User Guide 400 gx widget event to parent Send event to widget s parent Prototype UINT gx widget event to parent GX WIDGET widget GX EVENT event Description This service sends an event to the widget s parent Parameters widget Pointer to widget event Pointer to the event Return Values GX SUCCESS 0x00 Successful widget event processing override GX CALLER ERROR 0x11 X Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer Allowed From Init
92. processed for pixelmap slider pixelmap slider af See Also gx_pixelmap_button_create gx_pixelmap_button_draw gx pixelmap button pixelmap set gx pixelmap prompt create gx pixelmap prompt draw gx pixelmap prompt pixelmap set gx pixelmap slider create gx pixelmap slider draw gx pixelmap slider pixelmap set gx slider create gx slider draw gx slider event process gx slider needle draw gx slider needle position get gx slider needle position get gx slider tickmarks draw gx slider travel get gx slider value calculate gx slider value set GUIX User Guide 215 gx pixelmap slider pixelmap set Prototype Assign pixelmaps to slider UINT gx pixelmap slider pixelmap set GX PIXELMAP SLIDER slider GX PIXELMAP SLIDER INFO pixinfo Description This service sets pixelmaps to the pixelmap slider Parameters slider Pointer to pixelmap slider control block pixinfo Slider information block Return Values GX SUCCESS 0x00 GX CALLER ERROR 0x11 GX PTR ERROR 0x07 Allowed From Initialization and threads GUIX User Guide Successful sets the pixelmap to the slider Invalid caller of this function Invalid pointer 216 Draw pixelmap button status gx pixelmap slider pixelmap set amp slider amp pixinfo If status is SUCCESS the pixelmap slider is properly configured with pixelmaps See Also gx butto
93. status is SUCCESS the string ID MY STRING ID was set to my text button See Also gx text button create gx button create gx multi line text button draw gx multi line text button event process gx multi line text button text set gx multi line text button text id set GUIX User Guide 181 gx multi line text button text set Assign text to the text button Prototype UINT gx mult line text button text set GX MULTI LINE TEXT BUTTON text button GX CHAR text Description This service assigns the specified string to the text button The string must be statically or globally allocated i e it may not be an automatic or temporary variable Parameters text button Pointer to text button control block text pointer to the NULL terminated string Return Values GX SUCCESS 0x00 Successfully set the text to the button GX_CALLER_ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer Allowed From Initialization and threads Example Set the string my string to the text button my text button status gx multi line text button text set amp my text button my rstring If status is SUCCESS the string my text button was set See Also gx text button create gx button create gx multi line text button draw gx multi line text button event process gx multi line text button text set gx multi line text button text id set
94. text input create gx multi line text view create gx multi line text view event process gx multi line text view font set gx multi line text view scroll gx multi line text view text id set gx multi line text view text set GUIX User Guide 196 gx multi line text view text id set Set the string ID for the multi line text view Prototype UINT gx multi line text view text id set GX MULTI LINE TEXT VIEW text view GX RESOURCE ID text id Description This service assigns the resource ID of a string to the multi line text view widget Parameters text view Multi line text view widget control block text id Resource ID for the text string Return Values GX SUCCESS 0x00 Successfully set string for the multi line text view GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 Invalid pointer GX INVALID RESOURCE ID 0x22 Invalid resource ID Allowed From Initialization and threads Example Set string ID STRING ID to the multi line text view widget my text view status gx multi line text view text id set amp my text view STRING 10 If status is SUCCESS the text view text view will display the string resource STRING 10 See Also gx single line text input create gx multi line text input create gx multi line text view create gx multi line text view event process gx multi line text view font set gx multi line text
95. the GUIX event queue When the GUIX event queue is empty this service suspends the calling thread until new events arrive in the GUIX event queue Parameters None Return Values GX SUCCESS GX CALLER ERROR 0x00 0x11 Allowed From Initialization and threads Example Start GUIX status gx system start If status is SUCCESS GUIX has been started See Also Successful system start Invalid caller of this function gx system dirty partial add gx system draw context get system event send gx system focus claim gx system initialize gx system start gx system string get gx system string table get gx system string table set gx system string width get system timer start gx system timer stop gx system widget find GUIX User Guide 313 gx system string get Get string Prototype UINT gx system string get GX RESOURCE ID string id GX CHAR return string Description This service gets the string for the specified resource ID Parameters string id String resource ID return string Pointer to string destination pointer Return Values GX SUCCESS 0x00 Successful string get GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 Invalid pointer GX INVALID RESOURCE ID 0x22 Invalid resource ID Allowed From Initialization and threads Example Get the string associated with MY STRING ID status gx
96. the client height of the window Parameters window Pointer to window return height Pointer to destination for client height Return Values GX SUCCESS 0x00 Successful window client height get GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 _ Widget not valid Allowed From Initialization and threads Example Get client height of window status gx window client height get amp my window amp my client height If status is SUCCESS the window window client height is contained in client height See Also gx_window_canvas_set gx_window_client_scroll gx_window_client_width_get gx_window_create gx_window_draw gx_window_event_process gx_window_root_create gx_window_root_delete gx_window_root_event_process gx_window_root_find gx window scroll info get gx_window_scrollbar_find x window wallpaper get gx window wallpaper set GUIX User Guide 435 gx window client scroll Prototype Scroll window clients UINT gx window client scroll GX WINDOW window GX VALUE x scroll Description GX VALUE y scroll This service scrolls the window clients by the specified amount Parameters window x scroll y scroll Return Values Pointer to window Amount to scroll on the x axis Amount to scroll on the y axis GX SUCCESS 0x00 Successful window client scroll GX CALLE
97. the current brush fill color GUIX User Guide 117 Return Values GX SUCCESS define GX INVALID CONTEXT GX CALLER ERROR GX PTR ERROR GX BRUSH PIXELMAP FILL This brush style also applies to shaped drawing functions and indicates that the requested shape should be patten filled with the current brush pixelmap GX BRUSH ALIAS This brush style applies to all line drawing and shape outlines If this flag is set lines and outlines are drawing with the more accurate but also more time consuming anti aliased drawing algorithms This style flag is only used for 16 bpp color depths and higher GX BRUSH UNDERLINE This flag applies to text drawing and indicates that subsequent text drawn should be underlined GX BRUSH ROUND This flag applies to line drawing and indicates that line ends are drawn with a round or circular shape rather than the default square shape GX BRUSH PATTERN This flag applies to line drawing and outline drawing This flag requests that lines are drawn dashed or with an on off pattern rather than solid lines 0x00 Successful context brush 0x06 No active drawing context 0x11 Invalid caller of this function 0x07 X Invalid pointer INVALID RESOURCE ID 0x22 Invalid resource ID GX INVALID STYLE Allowed From Initialization and threads GUIX User Guide 0x18 Invalid style 118 GUIX User Guide 119 Define the brush of the current context
98. the font pointer status gx context font get MY MIDSIZE FONT amp my font See Also gx context brush default gx context brush define gx context brush get gx context brush set gx context brush pattern set gx context brush style set gx context brush width set gx context font set gx context line color set gx context pixelmap set GUIX User Guide 129 gx context raw brush define gx context raw fill color set gx context raw line color set GUIX User Guide 130 gx context font set Set font of current drawing context Prototype UINT gx context font set GX RESOURCE ID font id Description This service sets the font in the active brush of the current drawing context Parameters font id Font resource ID of current context Return Values GX SUCCESS 0x00 Successful context font set GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer INVALID RESOURCE 10 0x22 Invalid resource ID Allowed From Initialization and threads Example Set the font of the current context to MY FONT ID status gx context font set MY FONT ID If status is SUCCESS the font of the current context has been set See Also gx context brush default gx context brush define gx context brush get gx context brush set gx context brush pattern set gx context brush style set gx context brush width set gx context fill
99. to prompt Only the normal state pixelmaps are used this case status gx pixelmap prompt pixelmap set amp my prompt normal left id normal fill id normal right id 0 0 0 If status is SUCCESS the pixelmap prompt is properly configured with pixelmaps See Also gx button background draw gx button create gx button deselect gx button draw gx button event process gx button select gx pixelmap button create gx pixelmap button draw gx pixelmap button pixelmap set gx pixelmap prompt create gx pixelmap prompt draw gx pixelmap slider create gx pixelmap slider draw gx slider event process gx radio button create gx radio button draw gx icon button create gx text button create gx text button color set gx text button draw GUIX User Guide 211 gx pixelmap slider create Create pixelmap slider Prototype UINT gx pixelmap slider create GX PIXELMAP SLIDER slider GX CONST GX CHAR name GX WIDGET parent GX SLIDER INFO info GX PIXELMAP SLIDER INFO pixelmap info ULONG style USHORT pixelmap slider id GX CONST GX RECTANGLE size Description This service creates a pixelmap slider widget Parameters slider Pointer to pixelmap slider control block name Logical name of pixelmap slider widget parent Pointer to the parent widget info Pointer to a GX SLIDER INFO structure which contains values defining the slider minimum value ma
100. utility rectangle point detect gx utility rectangle shift GUIX User Guide 341 gx utility rectangle center find Find center of rectangle Prototype VOID gx utility rectangle center find GX RECTANGLE rectangle GX POINT return center Description This service finds the center of the rectangle Parameters rectangle Rectangle return center Pointer to destination to store found center point Return Values None Allowed From All Example Find center of my rectangle gx utility rectangle center find amp my rectangle amp my center point center point contains the center point of my rectangle See Also gx utility Itoa gx utility math cos gx utility math sin gx utility math sqrt gx utility pixelmap rotate gx utility pixelmap simple rotate gx utility rectangle center gx utility rectangle combine gx utility rectangle compare gx utility rectangle define gx utility rectangle grow gx utility rectangle overlap detect gx utility rectangle point detect gx utility rectangle shift GUIX User Guide 342 gx utility rectangle combine Combine two rectangles into first Prototype VOID gx utility rectangle combine RECTANGLE first rectangle GX RECTANGLE second rectangle Description This service combines the first and second rectangle into the first rectangle The first rectangle is expanded to include the second Parameters first r
101. view scroll gx multi line text view text color set gx multi line text view text set GUIX User Guide 197 gx multi line text view text set Set the string for the multi line text view Prototype UINT gx multi line text view text set GX MULTI LINE TEXT VIEW text view GX CHAR text Description This service assigns a text string to the multi line text view widget Parameters text view Multi line text view widget control block text NULL terminated text string Return Values GX SUCCESS 0x00 Successfully set string for the multi line text view GX_CALLER_ERROR 0x11 X Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer Allowed From Initialization and threads Example Set string my string to the multi line text view widget my text view status gx multi line text view text set amp my text view my string If status is SUCCESS the text view text view will display the string my string See Also gx single line text input create gx multi line text input create gx multi line text view create gx multi line text view event process gx multi line text view font set gx multi line text view scroll gx multi line text view text color set gx multi line text view text id set GUIX User Guide 198 gx pixelmap button create Create pixelmap button Prototype UINT gx pixelmap button create GX PIXELMAP BUTT
102. way the stack requirements to process the event handling only applies to the GUIX thread GUIX Animation Component The GUIX Animation component is a set of functions and services used to automate screen and widget transition automations The GUIX Animation component supports fading in fading out and movement or slide type animations of any widget type To support fade in and fade out type animations the GUIX Animation component requires that a canvas be created that is used strictly for the animation effect The GUIX GUIX User Guide 50 Animation component provides the service gx animation canvas define for this purpose Other animation types do not require a separate canvas but they will utilize it if itis available This makes the best possible use of any underlying hardware support for multiple hardware surfaces The variables controlling an animation are defined by two control blocks First the GX ANIMATION control block which defines the animation controller The animation controller is the driving engine that executes the animation sequence you define A single animation controller can be re used many times to run many different animation sequences If you need to run multiple animation sequences simultaneously you can create multiple GX ANIMATION animation controllers The second control block or structure used to define an animation is the GX ANIMATION INFO structure This structure is used to define one particular an
103. window root event process gx window root find 9 window scroll info get gx window wallpaper get gx window wallpaper set GUIX User Guide 449 gx window wallpaper get Get window wallpaper Prototype UINT gx window wallpaper get GX WINDOW window GX RESOURCE ID return wallpaper id Description This service gets the wallpaper for the specified window Parameters window Pointer to window return wallpaper id Pointer to destination for resource ID of wallpaper Return Values GX SUCCESS 0x00 Successful window wallpaper get GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 Widget not valid Allowed From Initialization and threads Example Get wallpaper for window window status gx window wallpaper get amp my window amp my window wallpaper If status is SUCCESS the window wallpaper contains the wallpaper resource ID for window window See Also gx window canvas set gx window client height get gx window client scroll gx window client width get gx window create gx window draw gx window event process gx window root create gx window root delete gx window root event process gx window root find gx window scroll info get gx window scrollbar find gx window wallpaper GUIX User Guide 450 gx window wallpaper set Prototype Set wi
104. y start INT x end INT y end VOID gx display driver XXBPP polygon draw GX DRAW CONTEXT context NT points GX_POINT coordinates Where the is replaced by the bits per pixel of the driver implementation e g 1 2 4 8 16 24 or 32 bits per pixel BPP Root Window For each visible canvas created by an application the application must also create one Root Window for that canvas This special window basically acts as a container for all the top level application windows and widgets The root window draws the canvas background and since the root window is derived from the GX WINDOW class the root window can also have wallpaper To change the background color of your display or canvas you simply change the fill color of the root window attached to that canvas If you use the GUIX Studio generated function named gx studio display configure to configure your displays then the canvas and root window for each display are created for you as part of this initialization function Anti Aliasing Anti Aliasing is an optional feature in GUIX that is used to smooth lines curves and fonts Anti aliasing is only supported when running with a display driver utilizing 16 bpp or higher color depth Anti aliased line drawing is enabled by setting the GX BRUSH ALIAS flash in the active brush This applies to lines drawn directly as well as to lines drawn as the border of a polygon or circle Anti aliased text drawing is e
105. 0x00 Successful widget status add GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 X Widget not valid Allowed From Initialization and threads GUIX User Guide 418 Add status to widget widget status gx widget status add amp my widget status to add If status is SUCCESS the widget widget status was See Also gx widget attach gx widget back move gx widget background set gx widget border draw gx widget border style set gx widget border width get gx widget canvas get gx widget child detect gx widget children draw gx widget client get gx widget created gx widget created test gx widget delete gx widget detach gx widget draw gx widget draw set gx widget event generate gx widget event process gx widget event process set gx widget event to parent gx widget find gx widget front move gx widget height get gx widget hide gx widget resize gx widget shift gx widget show gx widget status get gx widget status remove gx widget status test gx widget style add gx widget style get gx widget style remove gx widget style set gx widget width get GUIX User Guide 419 gx widget status get Get widget status Prototype UINT gx widget status get GX WIDGET widget ULONG return status Description This service retrieves status flags f
106. 14 Invalid widget control block size GX INVALID RESOURCE ID 0x22 Invalid resource ID GX INVALID STYLE 0x18 Invalid style Allowed From Initialization and threads GUIX User Guide 218 Create progress bar GX PROGRESS BAR INFO info GX RECTANGLE size info Jx progress bar info min val 8 info gx progress bar info max val 100 info gx progress bar info current val 8 info gx progress font id FONT ID SYSTEM FONT info gx progress normal text color COLOR ID WHITE info gx progress selected text color COLOR ID BLUE info gx progress bar fill pixelmap 8 size gx rectangle left 10 size gx rectangle top 10 size gx rectangle right 110 size gx rectangle bottom 140 status gx progress bar create amp progress bar GX NULL NULL amp info GX STYLE BORDER THIN 0 amp size See Also gx progress bar draw gx progress bar event process gx progress bar fill color set gx progress bar font set gx progress bar info set gx progress bar pielmap set gx progress bar range set gx progress bar text color set gx progress bar value set GUIX User Guide 219 gx progress draw Draw a progress bar Prototype UINT progress bar draw GX PROGRESS BAR progress ban Description This service draws a progress bar Parameters progress bar Progress bar control block Return Values GX SUCCESS 0x00 Successful prompt
107. 295 432 system error handling 11 26 ThreadX ii xv xvii xviii 1 2 3 4 5 7 8 9 13 18 25 431 GUIX User Guide ThreadX timer 7 13 18 25 tile pixelmap 35 54 95 cierto ena 18 user interface 3 4 6 11 13 14 utility component 12 51 53 version id xviii 10 widget component 11 39 widget control block 12 39 40 widget creation 12 39 widget defaults 11 30 window 50 DOVER 49 37 49 50 COIT lporient e 48 control block 410 event handler 51 GUIX 14 17 25 48 49 50 49 DFOCESSING 48 root 8 15 36 37 49 50 60 302 414 415 416 417 418 431 432 433 477 Renesas Synergy Platform User s Manual Software Publication Date 5 October 2015 Renesas Platform User s Manual Software 441 NE SAS Renesas Electronics Corporation R11UMO003EU0500
108. 3 14 15 17 24 25 42 284 293 global7 10 22 23 24 27 29 40 49 82 19 21 GUIX components 39 GUIX 14 GUIX system mutex 24 GUIX thread 7 9 13 14 17 21 22 25 37 44 46 51 GUIX widget 13 14 23 33 37 39 49 hardware initialization 35 input drivers 13 17 LCD display 424 memory 1 19 OM 18 canvas 22 35 37 82 424 427 428 constraints 19 dynamic aoo ot ne tte Scent eees 22 frame buffer 18 object 3 7 14 23 27 29 39 48 49 21 27 periodic processing 7 pixelmaps 22 29 30 105 106 191 192 196 198 199 203 204 227 queue event 13 14 15 17 24 25 42 284 293 runtime library 8 screen control block 11 29 screen driver 28 36 47 78 screen refresh 14 21 25 47 2 13 14 scrolling 49 50 51 419 428 setup 6 133 134 135 138 139 424 SKINNING 2 11 32 33 Stack size 9 14 22 Static TOME o oet 31 string table 30 58
109. 39 Do pP PEPERIT PESE 39 enu 40 ceca a ap te aeuo o E E 41 Event NOUMNCQUON me E 41 Event Processing adn ito So n cn ion 43 Implementing Custom Event Processing 43 Drawing REPRE 44 Implementing Custom Drawing example 45 GUIX Drawing Context GombpoFent ae oce eei na eda et oranes eene ica 46 GUIX Window CONmbpOFIQbL 22 needed dept celle 47 Window Creator 9 2 neta tive sea ta aud ahi uda au b pdt ubi deas 48 Window Control 48 POOP MVM Weert cu E M EE ETE 48 Background es 49 49 Event NOMICQUO Marti fen tarta MU UU 50 Event ProceSSiNg 12 audietis entree tl eet te A a ede 50 GUIX Animation OGoOmbOEDGblb soe semen eee ae 50 GUIX Utility Component aii ede dea dete et 52 Chapter 4 Description of GUIX Services 53 GUIX User Guide V animiation CANVAS 60 gx animation 62
110. 441 gx window root 442 ax windewdtooL delelend 444 gx window root vx vocan ioca enc dates venda t vocat Con t vorat Cor at nei 445 TOOT dene debates enr ir de ped itti dte d 446 epe window SCroll info GB Ecsisce cd utet evt Du DU HOHER VER DHE RUDI DHL I Ub SUD PUSH UL Ub DUE 447 9x window scrollbar 449 qx window icis anco itm eatis e c etico 450 gx Window Wallpaper PENNE 451 Chapter 5 GUIX Display qe eade rete 452 GUIX Example eiu e cae cs tores t eru 459 Appendix A GUIX Pre Defined 463 Appendix B GUIX Pre Defined Color Resource 105 464 Appendix GUIX Color Formats 465 Appendix D GUIX Widget Styles 466 Appendix E GUIX antes 469 Appendix GUIX RTOS Binding 470 Appendix G GUIX Font Stet ces eae e di ei ace todas ties Seq Red toda Re extende 473 eR NR E OUR ne Rta ed Ral 476 GUIX User Guide About This Guide This guide contains comprehensive information abo
111. ALWAYS If status is SUCCESS the text input style has been added See Also gx multi line text input buffer get gx multi line text input create gx multi line text input style remove gx multi line text input style set gx multi line text view create gx multi line text view event process gx multi line text view font set gx multi line text view scroll gx multi line text view text color set gx multi line text view text id set gx multi line text view text set GUIX User Guide 186 gx multi line text input style remove Remove styles Prototype UINT gx multi line text input remove GX MULTI LINE TEXT INPUT text input ULONG style Description This service removes styles from multi line text input widget Parameters text input Multi line text input widget control block style Styles to remove Appendix D contains pre defined general styles for all widgets Return Values GX SUCCESS 0x00 Successful multi line text input create GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 Invalid pointer Allowed From Initialization and threads Example Remove style STYLE CURSOR ALWAYS from text input widget text input status gx multi line text input style add amp my text input GX STYLE CURSOR ALWAYS If status is SUCCESS the text input style has been removed See Also gx multi line text input buffer ge
112. C D lt D 5 5 GUIXTM User s Manual Software Renesas Platform synergygallery renesas com Renesas Electronics Rev 5 www renesas com the high performance embedded GUI User Guide Version 5 Express Logic Inc 858 613 6640 Toll Free 888 THREADX FAX 858 521 4259 http www expresslogic com 2002 2015 by Express Logic Inc All rights reserved This document and the associated GUIX software are the sole property of Express Logic Inc Each contains proprietary information of Express Logic Inc Reproduction or duplication by any means of any portion of this document without the prior written consent of Express Logic Inc is expressly forbidden Express Logic Inc reserves the right to make changes to the specifications described herein at any time and without notice in order to improve design or reliability of GUIX The information in this document has been carefully checked for accuracy however Express Logic Inc makes no warranty pertaining to the correctness of this document Trademarks GUIX is a trademark of Express Logic Inc ThreadX is a registered trademark of Express Logic Inc All other product and company names are trademarks or registered trademarks of their respective holders Warranty Limitations Express Logic Inc makes no warranty of any kind that the GUIX products will meet the USER s requirements or will operate in the manner sp
113. CESS the text for prompt has been set See Also gx pixelmap prompt create gx pixelmap prompt draw gx pixelmap prompt pixelmap set gx prompt create gx prompt draw gx prompt font set gx prompt text color set gx prompt text id set gx prompt text get GUIX User Guide 236 gx radio button create Prototype UINT gx radio button create GX RADIO BU Create radio button TTON button GX CONST GX CHAR name GX WIDGET parent GX RESOURC E ID text id ULONG style USHORT radio button id GX CONST GX RECTANGLE size Description This service creates a radio button widget Parameters button Pointer to radio button control block name Logical name of radio button widget parent Pointer to the parent widget text id Resource ID of radio button style Style of radio button Appendix D contains pre defined general styles for all widgets as well as widget specific styles radio button id Application defined ID of radio button size Dimensions of radio button Return Values GX SUCCESS 0x00 GX CALLER ERROR GX PTR ERROR GX ALREADY CREATED 0x13 GX INVALID WIDGET SIZE GX INVALID RESOURCE ID 0x22 GX INVALID SIZE 0x19 Allowed From Initialization and threads GUIX User Guide Successful radio button create Invalid caller of this function Invalid pointer Widget already created Invalid widget control block size Invalid resource ID Invalid size 237
114. DGET 0x12 Parent or child widget not valid Allowed From Initialization and threads GUIX User Guide 380 Determine if child is a child of widget status gx widget child detect amp my widget amp my child amp detected If status is SUCCESS and detected is TRUE my child is a child of widget widget See Also gx_widget_attach gx_widget_back_move gx_widget_background_set gx_widget_border_draw gx_widget_border_style_set gx_widget_border_width_get gx_widget_canvas_get gx_widget_children_draw gx_widget_client_get gx_widget_create gx_widget_created_test gx_widget_delete gx_widget_detach gx_widget_draw gx_widget_draw_set gx_widget_event_generate gx_widget_event_process gx widget event process set gx widget event to parent gx widget find gx widget front move gx widget height get gx widget hide gx widget resize 9x widget shift gx widget show gx widget status add gx widget status get gx widget status remove gx widget status test gx widget style add gx widget style get gx widget style remove gx widget style set gx widget width get GUIX User Guide 381 gx widget children draw Draw widget children Prototype UINT gx widget children draw GX WIDGET widget Description This service draws all children of the parent widget This service is normally invoked by all standard widget dr
115. DING and rebuild the GUIX library to remove the ThreadX dependencies In addition the developer will need to provide the following macro definitions and supporting functions Examples of these macro definitions and supporting functions can be found in the files gx system rtos bind h and 9x system rtos bind c which provide an example generic rtos integration System Integration macros GX RTOS BINDING INITIALIZE This macro is invoked during system initialization The macro should be defined to call any function needed to prepare your rtos system services or rtos resources prior to use This is the binding s opportunity to prepare the rtos resources that GUIX will use GX SYSTEM THREAD START This macro is invoked when the GUIX task or thread should start executing This macro should be defined to call a function which will start the GUIX thread running The entry point to the GUIX thread is passed to the called function The signature of the called function must be UINT function name VOID thread entry point VOID This function should return GX SUCCESS if the thread is successfully started or GX FAILURE GX EVENT PUSH This macro is invoked to push an event into the FIFO event queue used by GUIX When porting to a new rtos it is your responsibility to implement this event queue in a thread safe manner GX EVENT structures must be copied into this queue and copied out of this queue i e a queue of GX EVENT pointers will not wor
116. EEE 1149 1 and Background Debug Mode BDM Debuggers also communicate with target hardware through In Circuit Emulation ICE connections Both OCD and ICE connections provide robust solutions with minimal intrusion on the target resident software As for resources used on the host the source code for GUXI is delivered in ASCII format and requires approximately 30 Mbytes of space on the host computer s hard disk Review the supplied readme guix generic txt file for additional host system considerations and options Target Considerations GUIX requires between 5 KBytes and 80 Kbytes of Read Only Memory ROM on the target Another 5 to 10KBytes of the targets Random Access Memory RAM are required for the GUIX thread stack and other global data structures In addition GUIX requires the use of a ThreadX timer and a ThreadX mutex object These facilities are used for periodic processing needs and thread protection inside GUIX Product Distribution Two types of GUIX packages are available standard and premium The standard package includes minimal source code while the premium package contains complete GUIX source code Either package is shipped on a single CD The exact contents of the distribution CD depends on the target processor development tools and the GUIX package purchased Following is a list of the important files common to most product distributions readme guix This file contains specific information a
117. ET 0x12 X Widget not valid Allowed From Initialization and threads Example Draw the text button my text button void MyButtonDraw GX MULTI LINE TEXT BUTTON button do the normal drawing first status gx_multi_line_text_button_draw amp my_text_button If status is GX SUCCESS the text button my_text_button was drawn Add custom drawing here See Also gx_text_button_create gx_button_create gx_multi_line_text_button_draw gx multi line text button event process gx multi line text button text set gx multi line text button text id set GUIX User Guide 179 gx multi line text button event process Default event handling for multi line text button Prototype UINT gx multi line text button event process GX MULTI LINE TEXT BUTTON button GX EVENT event ptr Description This service is the default event handling function for the multi line text button widget This function is made accessible to applications that want to provide custom event handling for a text button widget Parameters button Pointer to text button control block event ptr Event to be processed Return Values GX SUCCESS 0x00 Successfully handled event GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 Invalid pointer Allowed From Initialization and threads Example UINT MyEventHandler GX MULTI LINE TEXT BUTTON button GX EVENT eve
118. GE gauge INT angle Description This service sets the target angle of a circular gauge widget Parameters gauge Pointer to circular gauge control block angle Target needle angle Return Values GX SUCCESS 0x00 Successful checkbox select GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 _ Widget not valid Allowed From Initialization and threads Example Set target angle of gauge to 180 status gx circular gauge angle set amp my gauge 180 If status is SUCCESS the circular gauge of gauge has been set See Also gx circular gauge angle get gx circular gauge animation set 9x circular gauge create GUIX User Guide 112 gx circular gauge animation set Set animation parameters Prototype UINT gx circular gauge animation set GX CIRCULAR GAUGE gauge INT steps INT delay Description This service sets animation steps and delay time for a circular gauge widget Parameters gauge Pointer to circular gauge control block steps Total steps for one rotation delay Delay time for every step Return Values GX SUCCESS 0x00 Successful checkbox select GX CALLER ERROR 0x11 X Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 X Widget not valid Allowed From Initialization and threads Example Set animation steps and delay time of circular gauge
119. GX BUTTON button GX EVENT event Description This service processes an event for the specified button Parameters button Pointer to button control block event ptr Pointer to event to process Return Values GX SUCCESS 0x00 Successful button event process GX CALLER ERROR 0x11 X Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 X Widget not valid Allowed From Initialization and threads Example Process event for button status gx button event process amp my stop button amp my event If status is SUCCESS the stop button event was successfully processed See Also gx button background draw gx button create gx button deselect gx button draw gx button select gx radio button create gx radio button draw gx icon button create gx pixelmap button create gx pixelmap button draw gx text button create gx text button color set gx text button draw GUIX User Guide 75 gx button select Select button Prototype UINT gx button select GX BUTTON button Description This service selects the specified button Parameters button Pointer to button control block Return Values GX SUCCESS 0x00 Successful button select GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 Widget not valid Allowed From Initialization and threads Example Select button status gx button select amp my stop button
120. GX CONST Description GX R USHORT vertical list id ECTANGLE size This service creates a vertical list Parameters vertical list name parent total rows callback style vertical list id size Return Values GX SUCCESS GX CALLER ERROR GX PTR ERROR GX ALREADY CREATED Vertical list widget control block Name of vertical list Pointer to parent widget Total number of rows in vertical list A function that will be called by the vertical list when the list is scrolled The caller should initially create enough GX WIDGET based children to fill the visible list rows As the list is scrolled this function is called to re create the list children corresponding to the supplied list index Style of scrollbar widget Appendix D contains pre defined general styles for all widgets as well as widget specific styles Application defined ID of vertical list Dimensions of vertical list 0x00 Successfully created the vertical list 0x11 Invalid caller of this function 0x07 Invalid pointer 0x13 Widget already created INVALID WIDGET SIZE 0x14 Invalid widget control GUIX User Guide block size 351 INVALID VALUE 0x22 Number of rows not valid Allowed From Initialization and threads Example Create vertical list list with 20 rows status gx vertical list create amp my list my list amp my parent 20 callback GX STYLE WRAP MY L
121. Get the needle position for slider slider status gx slider needle posistion get amp my slider amp slider info amp needle position If status is SUCCESS the needle position for slider my slider has been retrieved See Also GUIX User Guide 279 gx pixelmap slider create gx pixelmap slider draw pixelmap slider event process gx pixelmap slider pixelmap set gx slider create gx slider draw gx slider event process gx slider needle draw gx slider needle position get gx slider tickmarks draw gx slider travel get gx slider value calculate gx slider value set GUIX User Guide 280 gx slider tickmarks draw Draw slider tickmarks Prototype UINT gx slider tickmarks draw GX SLIDER slider Description This service draws the slider tickmarks This function is called internally by the gx slider draw function but is exposed for use by applications that might implement a custom slider drawing function Parameters slider Slider widget control block Return Values GX SUCCESS 0x00 Successful slider tickmark draw GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 X Widget not valid Allowed From Initialization and threads Example Draw tickmarks for slider my slider status gx slider tickmarks draw amp my slider If status is SUCCESS the tickmarks for slider my slider have been drawn
122. Guide 306 gx system language table get Retrieve active language table Prototype UINT gx system language table get GX CHAR language table UINT languages count UINT string count Description This service retrieves the active language table Parameters language table Address of pointer to return language table languages count Address of variable to return table columns string count Address of pointer to return table rows Return Values GX SUCCESS 0x00 Successful GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer Allowed From Initialization and threads Example GX CHAR language table UINT language count UINT string count Retrieve the language table status gx system language table get amp language table amp language count amp string count See Also 9x system dirty partial add gx system draw context get system event send gx system focus claim gx system initialize gx system start gx system string get gx system string table get gx system string table set gx system string width get system timer start gx system timer stop gx system widget find GUIX User Guide 307 gx system language table set Assign active language table Prototype UINT gx system language table set GX CHAR language table UINT languages count UINT string count Description This service retrieves the active lang
123. IST ID amp size If status is SUCCESS the vertical list list has been created See Also 9x vertical list children position gx vertical list event process gx vertical list page index set gx vertical list selected index get gx vertical list selected widget get gx vertical list selected set gx vertical list total rows set GUIX User Guide 352 gx vertical list event process Process vertical list event Prototype UINT gx vertical list event process GX VERTICAL LIST list GX EVENT event Description This service processes an event for the vertical list Parameters list Vertical list widget control block event Pointer to event to process Return Values GX SUCCESS 0x00 Successfully processed the vertical list event GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 Widget not valid Allowed From Initialization and threads Example Process my event for vertical list list status gx vertical list event process amp my list amp my event If status is SUCCESS the event for vertical list my list has been processed See Also gx vertical list children position gx vertical list create gx vertical list page index set gx vertical list selected index get gx vertical list selected widget get gx vertical list selected set gx vertical list se
124. If status is SUCCESS the stop button was successfully selected See Also gx button background draw gx button create gx button deselect gx button draw gx button event process gx radio button create gx radio button draw gx icon button create gx pixelmap button create gx pixelmap button draw gx text button create gx text button color set gx text button draw GUIX User Guide 76 gx canvas alpha set Set alpha blend value for canvas Prototype UINT gx canvas alpha set GX CANVAS canvas GX UBYTE alpha Description This service sets the alpha blend value for the specified canvas Canvas alpha values can range from 0 transparent to 255 fully opague Canvas alpha values are used when an application creates a canvas with GX CANVAS COMPOSITE style into which all other managed canvases are composited prior to final display This API is only supported when using a screen driver of 16 bpp or higher color depth Parameters canvas Pointer to canvas control block alpha Alpha blend value can range from 0 transparent to 255 opague Return Values GX SUCCESS 0x00 Successful alpha blend value set GX_CALLER_ERROR 0x11 Invalid caller of this function GX_PTR_ERROR 0x07 X Invalid pointer Allowed From Initialization and threads Example Set the alpha blend value of my canvas status gx canvas alpha set amp my canvas GX ALPHA VALUE OPAQUE If status SUCCESS the alpha ble
125. If status is GX SUCCESS the text view my text view will use the specified font to display its text See Also gx single line text input create gx multi line text input create gx multi line text view create gx multi line text view event process gx multi line text view scroll gx multi line text view text color set gx multi line text view text id set gx multi line text view text set GUIX User Guide 194 gx multi line text view scroll Scroll multi line text view Prototype UINT gx multi line text view scroll GX MULTI LINE TEXT VIEW text view GX VALUE amount to scroll Description This service scrolls a multi line text view widget Parameters text view Multi line text view widget control block amount to scroll Number of rows to scroll Return Values GX SUCCESS 0x00 Successful multi line text view scroll GX CALLER ERROR Invalid caller of this function GX PTR ERROR Invalid pointer GX INVALID WIDGET 0x12 _ Widget not valid GX INVALID VALUE Scroll value not valid Allowed From Initialization and threads Example Scroll multi line text view widget my text view by 10 rows status gx multi line text view scroll amp my text view 10 If status is SUCCESS the text view text view has been scrolled by 10 rows See Also gx single line text input create gx multi line text input create gx multi line text view create gx
126. NE1 Color used to draw needle hightlight GX COLOR ID SLIDER NEEDLE LINE2 Color used to draw needle shadow These color ID values are mapped to a specific color value as defined by the color table assigned to each display These defaults can be changed as a group for one display by calling the gx display color table set function If you are using GUIX Studio the display color table is automatically initialized when your application calls the 9x studio display configure function The GUIX display component also maintains a default font table The default font table defines the font used by each widget type unless specifically specified by the application The pre defined display font table IDs include GX FONT ID DEFAULT Default font used when no specific font is defined GX FONT ID BUTTON Default font used for all text on buttons GX FONT ID PROMPT Default font used for static text GX FONT ID EDIT Default font used for text edit fields GUIX User Guide 31 The font ID used by any text type widget can be re assigned by using the gx widget type font set API provided for each text related widget type The entire font table can be re assigned by calling the gx display font table set function Scrollbar Appearance GUIX Display also maintains default scrollbar appearance settings for that display These settings are defined by the GX SCROLLBAR APPEARANCE structure which is defined below GUIX Display maintains one scrollbar a
127. ON button GX CONST GX CHAR name GX WIDGET parent GX RESOURCE ID normal id GX RESOURCE ID selected id GX RESOURCE ID disabled id ULONG style USHORT pixelmap button id GX CONST GX RECTANGLE size Description This service creates a pixelmap button widget Parameters button Pointer to pixelmap button control block name Logical name of pixelmap button widget parent Pointer to the parent widget normal id Normal state Resource ID selected id Selected state Resource ID disabled id Disabled state Resource ID style Style of checkbox Appendix D contains pre defined general styles for all widgets as well as widget specific styles pixelmap button id Application defined ID of pixelmap button size Dimensions of pixelmap button Return Values GX SUCCESS 0x00 Successfully created pixelmap button GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX ALREADY CREATED 0x13 Widget already created INVALID RESOURCE ID 0x22 Invalid resource ID Allowed From Initialization and threads Example GUIX User Guide 199 Create my pixelmap button status gx pixelmap button create amp my button pixelmap button amp my parent NORMAL RESOURCE ID MY SELECTED RESOURCE 10 MY DESELECTED RESOURCE ID GX STYLE BORDER RAISED MY PIXELMAP BUTTON ID amp size If status is SUCCESS the pixelm
128. OR 0x11 Invalid caller of this function GX PTR ERROR 0x07 Invalid pointer Allowed From Initialization and threads Example GX PROGRESS BAR INFO info info gx progress bar info min val 0 info gx progress bar info max val 100 info gx progress bar info current val 0 info gx progress bar font id GX FONT ID SYSTEM FONT info gx progress bar normal text color GX COLOR ID WHITE info gx progress bar selected text color GX COLOR ID BLUE info gx progress bar fill pixelmap 0 UINT status gx progress bar info set progress bar amp info if status GX SUCCESS the progress bar info was re assigned See Also gx progress bar draw gx progress bar event process gx progress bar fill color set gx progress bar font set gx progress bar info set gx progress bar pielmap set gx progress bar range set gx progress bar text color set gx progress bar value set GUIX User Guide 223 gx progress bar pixelmap set Assign pixelmap used to draw progress bar Prototype UINT progress bar pixelmap set GX PROGRESS BAR progress bar GX RESOURCE ID pixelmap id Description This service assigns the pixelmap used to fill the progress bar Parameters progress bar Progress bar control block pixelmap id Pixelmap resource id Return Values GX SUCCESS 0x00 Successful prompt create GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 Invalid pointer Allowed From I
129. OR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer INVALID RESOURCE ID 0x22 Invalid resource ID Allowed From Initialization and threads Example COLOR value Get the color vaue status gx context color get MY BLACK COLOR ID amp color value See Also gx context brush default gx context brush define gx context brush get gx context brush set gx context brush pattern set gx context brush style set gx context brush width set gx context font set gx context line color set gx context pixelmap set GUIX User Guide 126 gx context raw brush define gx context raw fill color set gx context raw line color set GUIX User Guide 127 gx context fill color set Set fill color of current drawing context Prototype UINT gx context fill color set GX RESOURCE ID fill color Description This service sets the fill color of the active brush in the current drawing context Parameters fill color id Resource ID of fill color of current context Appendix B contains pre defined color Resource IDs Note that the application may add custom color Resource IDs as well Return Values GX SUCCESS 0x00 Successful context fill color set GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID RESOURCE ID 0x22 Invalid resource ID Allowed From Initialization and thr
130. R 0x07 X Invalid pointer GX INVALID WIDGET 0x12 X Vertical list or list entry widget not valid Allowed From Initialization and threads Example Set the list entry at the current index of vertical list list status gx vertical list selected set amp my list amp my entry If status is SUCCESS the current index points to the widget entry See Also gx vertical list children position gx vertical list create gx vertical list event process gx vertical list page index get gx vertical list selected index get gx vertical list selected widget get gx vertical list total rows set GUIX User Guide 357 gx vertical list total rows set Set total number of vertical list rows Prototype UINT gx vertical list total rows set GX VERTICAL LIST vertical list INT count Description This service assigns or changes the total number of list rows Parameters vertical list Vertical list widget control block count New list row count Return Values GX SUCCESS 0x00 Successfully set the vertical list row count GX PTR ERROR 0x07 X Invalid pointer Allowed From Initialization and threads Example Set the list row count to 20 items status gx vertical list total rows set amp my list 20 See Also gx vertical list children position gx vertical list create gx vertical list event process gx vertical list page index set gx vertical list se
131. R ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 Widget not valid GX INVALID VALUE 0x22 Scroll value s not valid Allowed From Initialization and threads Example Scroll clients of window status gx window client scroll amp my window 10 0 If status is SUCCESS the clients of window window have been scrolled See Also gx window canvas set gx window client height get gx window client width get gx window create gx window draw gx window event process gx window root create gx window root delete gx window root event process gx window root find gx window scroll info get gx window scrollbar find gx window wallpaper get gx window wallpaper set GUIX User Guide 436 gx window client width get Get window client width Prototype UINT gx window client width get GX WINDOW window GX VALUE return width Description This service gets the client width of the specified window Parameters window Pointer to window return height Pointer to destination for client width Return Values GX SUCCESS 0x00 Successful window client width get GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 X Widget not valid Allowed From Initialization and threads Example Get client width of my win
132. RROW See Also gx drop list close gx drop list create gx drop list event process gx drop list open gx drop list popup get GUIX User Guide 153 gx drop list popup get Destroy display Prototype UINT gx drop list popup get GX DROP LIST drop list GX VERTICAL LIST return list Description This service retrieves the popup list from the drop list Parameters drop list Pointer to the drop list control block return list Pointer to the vertical list stored in the drop list Return Values GX SUCCESS 0x00 Successful screen create GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer Allowed From Initialization and threads Example GX DROP LIST drop list GX VERTICAL LIST vertical list 9x drop list popup get amp drop list amp vertical list See Also gx drop list close gx drop list create gx drop list open gx drop list pixelmap set GUIX User Guide 154 gx horizontal list children position Position children for the horizontal list Prototype UINT gx horizontal list children position GX HORIZONTAL LIST horizontal list Description This function positions the children for the horizontal list This function is called automatically when the list receives the GX EVENT SHOW event but should be called directly if the list is modified after it has been made visible Parameters horizontal list Pointer to the horizontal list control block R
133. Return Values GX SUCCESS GX CALLER ERROR GX PTR ERROR GX ALREADY CREATED GX INVALID WIDGET SIZE GX INVALID WIDGET GX INVALID RESOURCE ID GX INVALID STYLE GX INVALID SIZE Allowed From Initialization and threads GUIX User Guide Application defined ID of prompt Dimensions of prompt 0x00 Successful prompt create Ox11 Invalid caller of this function 0x07 Invalid pointer 0x13 Widget already created 0x14 Invalid widget control block size 0x12 Parent widget not valid 0x22 Invalid resource ID 0x18 Invalid style 0x19 Invalid size 228 Create my prompt status gx prompt create amp my prompt my promPt amp my parent MY PROMPT TEXT RESOURCE ID STYLE BORDER RAISED PROPMT 10 amp size If status SUCCESS the prompt prompt has been created See Also gx pixelmap prompt create gx pixelmap prompt draw gx pixelmap prompt pixelmap set gx prompt draw gx prompt font set gx prompt text color set gx prompt text get gx prompt text id set gx prompt text set GUIX User Guide 229 gx prompt draw Draw prompt Prototype UINT gx prompt draw GX PROMPT prompt Description This service draws a prompt widget This service is called internally by GUIX during canvas refresh but can also be called by custom drawing functions Parameters prompt Pointer to prompt widget control block Return Values GX SUCCESS
134. SUCCESS 0x00 Successfully created icon button GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX ALREADY CREATED 0x13 Widget already created GUIX User Guide 168 Allowed From Initialization and threads Example Create my icon button status gx icon button create amp my icon button icon button amp my parent MY ICON RESOURCE ID GX STYLE BORDER RAISED MY ICON BUTTON 10 amp size If status is GX SUCCESS the icon button my icon button has been created See Also gx button background draw gx button create gx button deselect gx button draw gx button event process gx button select gx icon create gx icon draw gx icon pixelmap set gx pixelmap button create gx pixelmap button draw gx radio button create gx radio button draw gx text button create gx text button color set gx text button draw GUIX User Guide 169 gx icon button draw Draw an icon button Prototype UINT gx icon button create GX ICON BUTTON button Description This service draws the specified icon button widget Parameters button Pointer to icon button control block Return Values GX SUCCESS 0x00 Successfully drawn icon button GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer Allowed From Initialization and threads Example Create my icon button status gx icon button create amp my icon butto
135. See Also gx canvas block move gx canvas line draw gx canvas pixelmap draw gx canvas pixelmap tile gx canvas polygon draw gx canvas rectangle draw gx canvas text draw gx display create GUIX User Guide 145 gx display font table set Assign display font table Prototype UINT gx display font table set GX DISPLAY display GX FONT font table INT table size Description This service re assigns the font table to be used by the display This service is normally invoked by the Studio generated display configuration function but can also be called by the application software Parameters display Pointer to display control block font table Array of FONT pointers table size Number of fonts in table Return Values GX SUCCESS 0x00 Successful screen create GX PTR ERROR 0x07 Invalid pointer Allowed From Initialization and threads Example FONT table 32 Assign font table status gx display font table set amp my display font table 32 If status is GX SUCCESS the font table has been reassigned See Also gx display color set gx display color table set gx display pixelmap table set GUIX User Guide 146 gx display pixelmap table set Assign display font table Prototype UINT gx display pixelmap table set GX DISPLAY display GX PIXELMAP pixelmap table INT table size Description This service re assigns the pixelmap table to be used by the
136. TE GX UBYTE GX VALUE Basic unsigned integer This type is mapped to the most convenient unsigned data type Basic signed integer This type is mapped to the most convenient signed data type Unsigned long type This type must support 32 bit unsigned data Almost always equivalent to the compiler s void type Most often a standard 8 bit character type 8 bit signed type 8 bit unsigned type 16 or 32 bit signed type Defined as needed for best performance on the target system Additional data types are used within the GUIX source They are located in either the tx port h or 9x port h files GUIX User Guide xvii Customer Support Center Support engineers 858 613 6640 Support fax 858 521 4259 Support email support expresslogic com Web page http www expresslogic com Latest Product Information Visit the Express Logic web site and select the Support menu option to find the latest online support information including information about the latest GUIX product releases What We Need From You To more efficiently resolve your support request provide us with the following information in your email request 1 A detailed description of the problem including frequency of occurrence and whether it can be reliably reproduced 2 Adetailed description of any changes to the application and or GUIX that preceded the problem 3 The contents of the tx version id and gx version id strings found in the tx_port h
137. TR ERROR Invalid pointer GX INVALID WIDGET Widget not valid Allowed From Initialization and threads Example Select checkbox status gx checkbox select amp my checkbox If status is SUCCESS the checkbox checkbox has been toggled See Also gx checkbox create gx checkbox draw gx checkbox event process GUIX User Guide 110 gx circular gauge angle get Get current angle Prototype UINT gx circular gauge angle get GX CIRCULAR GAUGE gauge INT angle Description This service retrieves the current needle angle of circular gauge widget Parameters gauge Pointer to circular gauge control block angle Current needle angle to be retrieved Return Values GX SUCCESS 0x00 Successful checkbox select GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 Widget not valid Allowed From Initialization and threads Example INT current angle Retrieve the current needle angle of gauge status gx circular gauge angle get amp my gauge amp current angle If status is SUCCESS the current needle angle of gauge has been retireved See Also gx circular gauge angle set gx circular gauge animation set 9x circular gauge create GUIX User Guide 111 gx circular gauge angle set Set target angle Prototype UINT gx circular gauge angle set GX CIRCULAR GAU
138. The child widgets of a window send events to their parent window Parameters widget Pointer to widget event type Type of event Appendix E contains pre defined GUIX events Additional events may be added by the application value Additional event information Return Values GX SUCCESS 0x00 Successful widget event generation GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 Widget not valid Allowed From Initialization and threads GUIX User Guide 395 Generate redraw event for widget widget status gx widget event generate amp my widget EVENT REDRAW 0 If status is SUCCESS the redraw event for widget widget has been generated See Also gx widget attach gx widget back move gx widget background set gx widget border draw gx widget border style set gx widget border width get gx widget canvas get gx widget child detect gx widget children draw gx widget client get gx widget created gx widget created test gx widget delete gx widget detach gx widget draw gx widget draw set gx widget event process gx widget event process set gx widget event to parent gx widget find gx widget front move gx widget height get gx widget hide gx widget resize gx widget shift gx widget show gx widget status add gx widget status get gx widget status remove gx widget status test gx widget s
139. UE Allowed From Initialization and threads GUIX User Guide Successful scrollbar reset Invalid caller of this function 0x07 Invalid pointer Widget not valid Scroll info not valid 249 Reset scrollbar scrollbar GX SCROLL INFO my info info gx scroll value 0 my info gx scroll minimum 0 scroll maximum 100 scroll visible 10 my info gx scroll increment 1 status gx scrollbar reset amp my scrollbar amp my info If status is SUCCESS the scrollbar scrollbar has been reset See Also gx horizontal scrollbar create gx scrollbar draw gx scrollbar event process gx scrollbar limit check gx vertical scrollbar create GUIX User Guide 250 gx single line text input backspace Process a backspace character in text input widget Prototype UINT gx single line text input backspace GX SINGLE LINE TEXT INPUT text input Description This service processes a backspace character This service is called internally when a backspace character event is received but can also be invoked by the application Parameters text input Single line text input widget control block Return Values GX SUCCESS 0x00 Successful single line text input create GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 Invalid pointer Allowed From Initialization and threa
140. UIX User Guide 202 gx pixelmap prompt pixelmap set gx pixelmap slider create gx pixelmap slider draw gx slider event process gx radio button create gx radio button draw gx icon button create gx text button create gx text button color set gx text button draw GUIX User Guide 203 gx pixelmap button pixelmap set Assign pixelmaps to button Prototype UINT gx pixelmap button pixelmap set GX PIXELMAP BUTTON button GX RESOURCE ID normal id GX RESOURCE ID selected id GX RESOURCE ID disabled id Description This service sets pixelmaps to the pixelmap button Parameters button Pointer to pixelmap button control block normal id Resource ID of the pixelmap to be used as normal state selected id Resource ID of the pixelmap to be used when the button is selected disabled id Resource ID of the pixelmap to be used when the button is disabled Return Values GX SUCCESS 0x00 Successful sets the pixelmap to the button GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 Invalid pointer GX INVALID RESOURCE ID 0x22 Resource ID not valid Allowed From Initialization and threads GUIX User Guide 204 Draw pixelmap button status gx pixelmap button pixelmap set amp my pixelmap button NORMAL ID SELECTED 10 DISABLED 10 If status is SUCCESS the pixelmap button is properly configured with pixelmaps
141. UTTON text button GX CONST GX CHAR name GX WIDGET parent GX RESOURCE ID text id ULONG style USHORT text button id GX CONST GX RECTANGLE size Description This service creates a text button widget Parameters text button Pointer to text button control block name Logical name of text button parent Pointer to parent widget of the button text id Resource ID of text style Text button style Appendix D contains pre defined general styles for all widgets as well as widget specific styles text button id Application defined ID of the text button size Size of the button Return Values GX SUCCESS 0x00 Successful text button create GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX ALREADY CREATED 0x13 Widget already created INVALID WIDGET SIZE 0x14 Invalid widget control block size GX INVALID WIDGET 0x12 Parent widget not valid GX INVALID RESOURCE ID 0x22 Invalid resource ID GX INVALID STYLE 0x18 Invalid style GX INVALID SIZE 0x19 Invalid size Allowed From Initialization and threads GUIX User Guide 324 Create text button my text button status gx text button create amp my text button my text button amp my parent window MY TEXT RESOURCE 10 STYLE BUTTON TOGGLE MY TEXT BUTTON 10 amp size If status is SUCCESS the text button text button was created
142. W GX TYPE VERTICAL LIST GX TYPE HORIZONTAL LIST GX TYPE DROPLIST GX TYPE DIALOG GX TYPE KEYBOARD Styles Widget styles consist of things like border properties raised recessed thin thick or no boarder at all as well as properties for specific widget types as listed previously The widget style flags offer the simplest method for modifying the appearance of any widget The initial widget style is always a parameter passed to the widget type specific create function GUIX User Guide 40 Colors Widgets draw themselves using colors defined in the system color table Color IDs are defined for canvas background default widget fill color button fill color text widget fill color window fill color and several other default color values In addition GX WINDOW objects support displaying a bitmap or wallpaper as the window client is filled The simplest method of changing the default color scheme is to use GUIX Studio and create or define a color scheme that meets your requirements You can also define your color scheme manually by creating an array of GX COLOR values and invoking the 9x system color table set API function Event Notification GUIX events are requests made to one or more widgets to perform a particular action and notifications to notify widgets of user input and internal system status changes For example when a widget gains focus the GX EVENT FOCUS GAINED is sent to the widget via the gx system event send
143. WIDGET 10 amp size If status is SUCCESS the widget widget has been created See Also widget attach gx widget back move gx widget background set gx widget border draw gx widget border style set gx widget border width get gx widget canvas get gx widget child detect gx widget children draw gx widget client get gx widget created test 9x widget delete gx widget detach gx widget draw gx widget draw set gx widget event generate gx widget event process gx widget event process set gx widget event to parent gx widget find gx widget front move gx widget height get gx widget hide gx widget resize gx widget shift gx widget show gx widget status add gx widget status get gx widget status remove gx widget status test gx widget style add gx widget style get gx widget style remove gx widget style set gx widget width get GUIX User Guide 389 gx widget created test Test if widget created Prototype UINT gx widget created test GX WIDGET widget GX BOOL return test Description This service tests to determine if the widget has previously been created Parameters widget Pointer to widget return test Destination for test result Return Values GX SUCCESS 0x00 Successful widget created GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer Allowed From Initialization and threads Example T
144. Widget already created GX INVALID WIDGET Widget not valid Allowed From Initialization and threads GUIX User Guide 191 Create multi line text view widget my text view status gx multi line text view create amp my text view my text view amp my parent my buffer STYLE BORDER RAISED MY TEXT VIEW ID amp size If status is SUCCESS the text view text view has been created See Also gx single line text input create gx multi line text input create gx multi line text view event process gx multi line text view font set gx multi line text view scroll gx multi line text view text color set gx multi line text view text id set gx multi line text view text set GUIX User Guide 192 gx multi line text view event process Process multi line text view event Prototype UINT gx multi line text view event process GX MULTI LINE TEXT VIEW text view GX EVENT event Description This service processes an event for the multi line text view widget Parameters text view Multi line text view widget control block event Pointer to event to process Return Values GX SUCCESS 0x00 Successful multi line text view event process GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 X Widget not valid Allowed From Initialization and threads Exa
145. X PTR ERROR 0x07 Invalid pointer GX ALREADY CREATED 0x13 Widget already created INVALID WIDGET SIZE 0x14 Invalid widget control block size GX INVALID WIDGET 0x12 Parent widget not valid GX INVALID STYLE 0x18 Invalid style Allowed From Initialization and threads Example Create horizontal scrollbar my scrollbar status gx_horizontal_scrollbar_create amp my_scrollbar my_horizontal_scrollbar amp my parent GX STYLE SCROLLBAR END BUTTONS If status is SUCCESS the horizontal scrollbar my scrollbar has been created See Also gx scrollbar draw gx scrollbar event process gx scrollbar limit check gx scrollbar reset gx vertical scrollbar create GUIX User Guide 167 gx icon button create Create icon button Prototype UINT gx icon button create GX ICON BUTTON button GX CONST GX CHAR name GX WIDGET parent GX RESOURCE ID icon id ULONG style USHORT icon button id GX CONST GX RECTANGLE size Description This service creates the specified icon button widget Parameters button Pointer to icon button control block name Logical name of icon button widget parent Pointer to the parent widget icon id Resource ID of icon style Style of icon Appendix D contains pre defined general styles for all widgets as well as widget specific styles icon button id Application defined ID of icon size Dimensions of icon button Return Values GX
146. X STYLE HALIGN LEFT GX STYLE HALIGN RIGHT GX STYLE VALIGN CENTER GX STYLE VALIGN TOP GX STYLE VALIGN BOTTOM GX PIXELMAP HALIGN MASK GX PIXELMAP VALIGN MASK GUIX User Guide Value 0x00000000 0x00000001 0x00000002 0x00000004 0x00000008 0x0000000f 0x10000000 0x20000000 0x40000000 0x00000010 0x00000020 0x00000040 0x00000080 0x00000100 0x00000010 0x00000020 0x00000040 0x00010000 0x00020000 0x00040000 0x00080000 0x00100000 0x00200000 0x00070000 0x00380000 466 Additional Slider Styles GX STYLE SHOW NEEDLE GX STYLE SHOW TICKMARKS GX STYLE SLIDER VERTICAL Additional Pixelmap Slider Styles GX STYLE TILE BACKGROUND Additional Progress Bar Styles GX STYLE SHOW PERCENT Additional Text Alignment Styles GX STYLE TEXT LEFT GX STYLE TEXT RIGHT GX STYLE TEXT CENTER GX STYLE TEXT ALIGNMENT MASK GX STYLE TEXT COPY Additional Cursor Styles GX STYLE CURSOR BLINK GX STYLE CURSOR ALWAYS Additional Text Input Styles GX STYLE TEXT INPUT NOTIFY ALL Additional Window Styles GX STYLE TILE WALLPAPER GX STYLE AUTO HSCROLL GX STYLE AUTO VSCROLL Additional Scrollbar Styles GX SCROLLBAR BACKGROUND TILE GX SCROLLBAR RELATIVE THUMB GX SCROLLBAR END BUTTONS GX SCROLLBAR VERTICAL GUIX User Guide 0x00000200 0x00000400 0x00000800 0x00001000 0x00000010 0x00001000 0x00002000 0x00004000 0x00007000 0x00008000 0x00000040 0x00000080 0x00000100 0x00040000 0x00100000 0x00200000
147. XELMAP MY ON DISABLED PIXELMAP If status is GX SUCCESS the pixelmaps for radio button my radio button has been set See Also gx button background draw gx button create gx button deselect gx button draw gx button event process gx button select gx icon button create gx pixelmap button create gx pixelmap button draw gx text button create gx text button color set gx text button draw gx radio button create GUIX User Guide 241 gx scroll thumb create Create scroll thumb Prototype UINT gx scroll thumb create GX SCROLL THUMB scroll thumb GX SCROLLBAR parent ULONG style Description This service creates a scroll thumbwheel This service is normally called internally when is created but is made public in order to allow custom scrollbar implementations Parameters scroll thumb Scroll thumb widget control block parent Pointer to parent scrollbar style Style of scrollbar widget Appendix D contains pre defined general styles for all widgets as well as widget specific styles Return Values GX SUCCESS 0x00 Successful scroll thumb create GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 Invalid pointer GX ALREADY CREATED 0x13 Widget already created INVALID WIDGET SIZE 0x14 Invalid widget control block size GX INVALID WIDGET 0x12 Parent widget not valid GX INVALID STYLE 0x18 Invalid style Allowed From Initialization and t
148. a asa ad gana aad peau siad genna 2 ANS GC SOUFCBIG DUO E bases 3 Nor A Black BOX idend UR LC RUD RR ER LL LR LUI LR LU 3 Embedded GUI 3 Real time GUI Software 3 GUIX sd os du iaa aa d ais 4 Improved 4 PUR Eee icd 4 Increased T MOM OM DUI soda di ade aera dice deep bcd de eed did cede cabe 4 Processor ISO Iatloniousai e V EDO EDU OR ARR ERU ARMAS 4 Ease Of WS os e nore 4 Improve Time to Market A ee oer Lee E nr 4 Protecting the Software Investment 5 Chapter 2 Installation and Use of GUIX 6 H st A AE 7 Target GonsideratioNS de eroe a a Cop er Ca De 7 Product Distribution eh cn sedo calor erate A A CR A gU E 7 CADIT Installationen n ACH Bel Tbeb EBORE Fb s BOE Doha 8 Bosch cm PILLE 8 TIOUDIOSOOllftt Eu Ea D ND aM ts 8 Configuration ipeo qu Rose OLEO P ERU HUE 9 GUIX User Guide iii GUIX Version amp
149. a significant volume of visual information or strict timing requirements on displaying such information Software Maintenance Using GUIX allows developers to easily partition the GUI aspects of their embedded application This partitioning makes the entire development process easy and significantly enhances future software maintenance Increased Throughput GUIX provides the highest performance GUI available which directly transfers to the embedded application GUIX applications are able to process user interface information faster than non GUIX applications Processor Isolation GUIX provides a robust processor independent interface between the application and the underlying processor and display hardware This allows developers to concentrate on the high level aspects of the user interface rather than spending extra time dealing with display hardware issues Ease of Use GUIX is designed with the application developer in mind The GUIX architecture and service call interface are easy to understand As a result GUIX developers can quickly use its advanced features Improve Time to Market The powerful features of GUIX accelerate the software development process GUIX abstracts most processor and display hardware issues thereby removing these concerns from a majority of application user interface implementation This feature coupled with the ease of use and advanced feature set results in a faster time to market GUIX User Guide 4 Pr
150. a type usually just const MAX ACTIVE TIMERS maximum number of simultaneous GUIX timers GX MAX VIEWS maximum number of simultaneous GUIX views GX UTF8 SUPPORT this definition enables internal support for UTF8 format string encoding GUIX User Guide GUIX Version ID The current version of GUIX is available to both the user and the application software during runtime The programmer can find the GUIX version in the readme guix generic txt file This file also contains a version history of the corresponding port Application software can obtain the GUIX version by examining the global string gx version id in gx port h Application software can also obtain release information from the constants shown below defined in 9x api h These constants identify the current product release by name and the product major and minor version define PRODUCT GUIX define GUIX MAJOR VERSION define GUIX MINOR VERSION GUIX User Guide 10 Chapter 3 Functional Overview GUIX This chapter contains a functional overview of the high performance GUIX user interface product Execution Overview Initialization Application Interface Calls Internal GUIX Thread Event Processing Drawing User Input Modal Dialog Execution Periodic Processing Display Driver Memory Usage Static Memory Usage Dynamic Memory Usage GUIX Components GUIX System Component Initialization Thread Processing Multithread Safety Periodic Process
151. accade acea ace dcc dene 182 gx multi line text input 183 gx multi line text input buffer get 185 gx_multi_line_text_input_style_add 186 multe line text input style remove eire v perd ined 187 gx multi line text view char index 58 189 gx multi line text view 191 gx multi line text view event 55 193 TEXTE MGW TOME SOL Gov ccc cove 194 gx_multi_line_text_view_scroll uices ioc iive bx LE LED LE HUE E LUE LED LE E UE E LEE LUE LE CURE LE ELE LE 195 gx multi line text view text color 58 196 exc text VIEWS text di EM DI X d o UD o urs 197 gx multi line text view text 5 198 ax pixelmap DUNOME CCAS ci eA od euo ten 199 pixeimap button ante edet eite a eae 201 gx pixelmap button event process 202 GUIX User Guide viii 9x pixelmap button 204 9x pixelmap prompt create 206 pixeltiap proimpE Craw caer ec dur e 208 gx pixelmap protmpt pixelmap SOL 1225 exeo xr ie layed 209 pixelmap slidetr Grates iere qiiae donet ten deo re dai e bte dt 212 uci eo tan eot I A e dia EE RUE MM
152. ackground Window backgrounds are either solid colors or bitmap images There is a default window background at the system level which provides the default for the initial set of windows Of course any window background can be changed via the GUIX API To change the solid color background of a window use the gx widget fill color To assign a background wallpaper to a window use the gx window wallpaper set Scrolling GUIX supports standard window scrolling when area required to display the window children exceeds the current size of the window horizontally and or vertically To enable scrolling the application must create the desired scroll bars and attach them to the window The GUIX window component provides a default scrolling implementation based on the size of the window client area and the extent of the all child widgets Applications can also provide their own scrolling implementation and interpretation by overriding the gx window scroll info get function for a particular window GUIX User Guide 49 Event Notification The default window event processing function differs from the GX WIDGET event processing primarily in the handling of scrolling and sizing events GX WINDOW provided defalt handlers for scrolling and sizing events The application can also add its own custom events starting numerically after the constant GX FIRST APP EVENT All event numbers after this constant are reserved for the applic
153. ackground gx scroll button color Color ID of color used to fill scrollbar thumb button In addition to these default settings for fonts color and styles the application may specify any of the parameters on a case by case basis as desired using API provided by each widget type Skinning and Themes GUIX User Guide 32 Skinning allows GUIX widgets and windows to easily change their base appearance i e changing the skin in one place will change the base appearance of all associated widgets and windows Re skinning your GUIX application requires that you supply a new color font and or pixelmap table to the GUIX Display resource tables Since all GUIX widgets refer to their color bitmap or font by resource ID providing a new resource table automatically causes all GUIX widgets to begin using your new colors and pixelmaps when they draw themselves to the desired display A new set of fonts colors and pixelmaps that are designed to work together to provide an attractive appearance is called a Theme A theme defines a set of resource tables and the size of each resource table Any number of themes can be defined for any display using the GUIX Studio application You must pass the starting theme index to the GUIX Studio generated function gx studio display configure which installs the initial theme into the created display The active theme for any display can be changed at any time by calling the function gx display theme install
154. ade te dimi adie 26 GUIX Canvas Component 26 Ganya Crealo eret Ae E M 27 Canvas Control BIOGK iioii ei ur ee Ei E aie Yate teas tale EE RE No En Ld Li Rudd 27 Canvas Alpha nic tetas radio dede deiode sade dad rne 27 Cannas DiaWwinG MM E 28 Color 8 11 ORT T T TERT TT NONIS 28 GUIX Display Odes eee 29 Display ead Iosue decedere esu M AE 29 Display Control BOCK si tects ie aia iaia OR erates ce ae 29 GUIX User Guide iv Resource 29 Widget BIS DLL NRI 30 aec TD cT 32 SKIMMING and ThetriBe cuoio 32 Drawing APIS Mose pi adde ns 35 VWVINGOW e LATUR Ad aM MI MM E 36 nuupAL5ee 36 SN e re 36 IL cM 37 Display Driver Interface uis sees cies atc cee ded oce noti dei ede da eiae 37 GUIX Widget Component M nob do Reb dU CEU 38 eor opm 38 Widget Control BI BC oe mM E A dA EE 38 Dynamic Widget Control Block Allocation and De allocation
155. al variable in gx system h file as follows gx system thread stack GX THREAD STACK SIZE The size of the GUIX thread stack is defined in gx port h but may be overridden by the application by changing gx user h or via project options or command line parameters The stack size must be large enough to handle the worst case event handling and drawing nested calls Dynamic Memory Usage As mentioned before dynamic memory usage is under direct control of the application Control blocks and memory associated with canvases etc can be placed anywhere in the targets memory space This is an important feature because it facilitates easy utilization of different types of physical memory at run time For example suppose a target hardware environment has both fast memory and slow memory If the application needs extra performance for drawing the canvas memory can be explicitly placed in the high speed memory area for best performance GUIX Components The GUIX APIs are divided and organized into several basic groups which correspond to fundamental components of the GUIX system The fundamental components include GX SYSTEM The GUIX system component responsible for initialization events timers string tables and visible widget hierarchy management GX CANVAS A drawing area A Canvas can be a thin abstraction of the hardware frame buffer or it might also be a pure memory canvas The canvas type is determined by parameters passed to
156. alid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 _ Widget not valid Allowed From Initialization and threads Example GUIX User Guide 114 Create my gauge status gx circular gauge create amp my gauge gauge amp parent PIXELMAP RESOURCE ID NULL MY ICON ID 5 30 If status is SUCCESS the circular gauge my gauge has been created See Also gx circular gauge angle get gx circular gauge angle set gx circular gauge animation set GUIX User Guide 115 gx context brush default Set brush of current drawing context Prototype UINT gx context brush default GX DRAW CONTEXT context Description This service creates a default brush within the specified drawing context Parameters context Pointer to context control block Return Values GX SUCCESS 0x00 Successful context set GX INVALID CONTEXT 0x06 active drawing context GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer Allowed From Initialization and threads Example Select context as the current context status gx context brush default amp my context If status is SUCCESS the context context has been set as the default See Also gx context brush define gx context brush get gx context brush set gx context brush style set gx context brush pattern set gx context
157. amic binding of Resources IDs to resource values means that application software and GUIX internal components should most often only resolve Resource IDs to resource values within an active drawing context An active drawing context specifies the currently active display which allows GUIX to resolve each Resource ID to a specific resource value If the application software is required to find a specific resource value outside of a drawing context this can also be done for visible widgets Visible widgets are linked to a root window which can also be used to resolve the active canvas and display for that widget If a widget has been created but not yet displayed i e has not been linked to any root window or other visible parent any resource IDs associated with that widget cannot be resolved to a specific resource value other than by directly indexing into the resource table assigned to a specific display This direct access to a specific resource table can safely be done by the application software but is never done in the internal GUIX library software Widget Defaults The GUIX display component also provides default definitions for various widget attributes Unless otherwise specified by the application widgets windows are created with these system attributes These system attributes are mainly composed of fonts colors and bitmaps maintained in the system resource tables Additional attributes for default scrollbar appearance are also main
158. anvas text draw GUIX User Guide 78 gx canvas block move Move block of canvas Prototype UINT gx canvas block move GX WIDGET caller GX RECTANGLE block GX VALUE x shift GX VALUE y shift GX BOOL mark dirty Description This service moves a block of the canvas according to the amount specified Parameters widget Pointer to widget control block block Coordinates of area to move x shift Number of pixels to shift on the x axis y shift Number of pixels to shift on the y axis mark dirty If set the block is marked as dirty Return Values GX SUCCESS 0x00 Successful block move GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 _ Widget not valid INVALID COORDINATE 0x21 Invalid coordinates to move to GX INVALID VALUE 0x22 X Invalid shift value s Allowed From Initialization and threads GUIX User Guide 79 Move block of my radio button status gx canvas block move amp my radio button amp area 10 15 GX TRUE If status is SUCCESS the block my radio button has been moved See Also gx canvas arc draw gx canvas circle draw gx display create gx canvas ellipse draw gx canvas line draw gx canvas pie draw gx canvas pixelmap draw gx canvas pixelmap tile gx canvas polygon draw gx canvas rectangle draw gx canvas text draw GUIX User Guide 80 g
159. ap button pixelmap button has been created See Also gx button background draw gx button create gx button deselect gx button draw gx button event process gx button select gx pixelmap button draw gx pixelmap button pxielmap set gx pixelmap prompt create gx pixelmap prompt draw gx pixelmap prompt pixelmap set gx pixelmap slider create gx pixelmap slider draw gx slider event process gx radio button create gx radio button draw gx icon button create gx text button create gx text button color set gx text button draw GUIX User Guide 200 gx pixelmap button draw Draw pixelmap button Prototype UINT gx pixelmap button draw GX PIXELMAP BUTTON button Description This service draws a pixelmap button widget Parameters button Pointer to pixelmap button control block Return Values GX SUCCESS 0x00 Successful pixelmap button draw GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 _ Widget not valid Allowed From Initialization and threads Example Draw pixelmap button status gx pixelmap button draw amp my pixelmap button If status is GX SUCCESS the pixelmap button button has been drawn See Also gx button background draw gx button create gx button deselect gx button draw gx button event process gx button select gx pixelmap button create gx pixelmap
160. ar widget will automatically invalidate and redraw itself when the progress bar value is changed Parameters progress bar Progress bar control block value Progress bar current value Return Values GX SUCCESS 0x00 Successful prompt create GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 Invalid pointer Allowed From Initialization and threads Example UINT status gx progress bar value set progress bar 50 if status GX SUCCESS the progress bar value was successfully assigned See Also gx progress bar draw gx progress bar event process gx progress bar fill color set gx progress bar font set gx progress bar info set gx progress bar pielmap set gx progress bar range set gx progress bar text color set gx progress bar value set GUIX User Guide 227 gx prompt create Prototype UINT gx prompt create GX PROMPT prompt GX WIDG ULONG s tyle ET parent Create prompt GX CONST GX CHAR name GX RESOURC E ID text id USHORT prompt id GX CONST GX RECTANGLE size Description This service creates a prompt widget Parameters prompt name parent text id style Pointer to prompt control block Logical name of prompt widget Pointer to the parent widget Resource ID of prompt text Style of prompt Appendix D contains pre defined general styles for all widgets as well as widget specific styles prompt id size
161. as been set See Also gx pixelmap prompt create gx pixelmap prompt draw gx pixelmap prompt pixelmap set gx prompt create gx prompt draw gx prompt font set gx prompt text get gx prompt text id set gx prompt text set GUIX User Guide 233 gx prompt text get Get prompt text Prototype UINT gx prompt text get GX PROMPT prompt GX CHAR return text Description This service gets the text of a prompt widget Parameters prompt Pointer to prompt widget control block return text Pointer to destination for text Return Values GX SUCCESS 0x00 Successful prompt text get GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 _ Widget not valid Allowed From Initialization and threads Example Get the text of prompt GX CHAR my prompt text status gx prompt text get amp my prompt amp my prompt text If status is GX SUCCESS the pointer prompt text points to the text displayed by my prompt See Also gx pixelmap prompt create gx pixelmap prompt draw gx pixelmap prompt pixelmap set gx prompt create gx prompt draw gx prompt font set gx prompt text color set gx prompt text id set gx prompt text set GUIX User Guide 234 gx prompt text id set Set prompt text ID Prototype UINT gx prompt text id set GX PROMPT prompt GX RESOURCE ID string id Description This s
162. ation s use Of course the application s window event handler must have processing for such application events Event Processing Just like all other widget types there is a default window event processing function for every window named gx window event process You will usually override this event handling function with your own event handler in the windows that you create This is how you will respond to events and take action based on events generated by the window child controls It is important to remember to invoke the base gx window event process function for GUIX system events if you override that event handler to allow the default event handling to occur in addition to whatever action you are adding to the event handler For example if you provide a custom handler for the GX EVENT SHOW event and do not pass this event to gx window event process your window will never become visible To provide a custom event handler for a window use the widget event process set function to define the address of your event handler This function overrides the default event processing function with the event function processing function specified in the API e Application event processing functions can take advantage i e not duplicate the processing of the default processing by simply calling the default window event process directly Event processing is called exclusively from the context of the internal GUIX system thread In this
163. atus is SUCCESS the spriter sprite has been created See Also gx sprite start gx sprite stop gx sprite current frame set 9x sprite frame list set GUIX User Guide 289 gx sprite current frame set Assign sprite frame Prototype UINT gx sprite current frame set GX SPRITE sprite USHORT frame Description This service assigns the current sprite frame If a GX SPRITE widget is not auto running it can be used as a program controlled state light displaying the commanded frame pixelmap Parameters sprite Sprite widget control block frame Sprite frame to display Return Values GX SUCCESS 0x00 Successful GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 Invalid pointer Allowed From Initialization and threads Example Assign frame number 3 as the current sprite frame status gx sprite current frame set amp my sprite 3 If status SUCCESS the sprite sprite has will display frame index See Also gx sprite start gx sprite stop gx sprite create gx sprite frame list set GUIX User Guide 290 gx sprite frame list set Assign or alter a sprite frame list Prototype UINT gx sprite frame list set GX SPRITE sprite GX SPRITE FRAME frame list USHORT frame count Description This service can be used to assign or re assign the frame list used by a sprite widget after the sprite widget has been created F
164. aw gx canvas text draw GUIX User Guide 99 gx canvas rectangle draw Draw rectangle Prototype UINT gx canvas rectangle draw GX RECTANGLE rectangle Description This service draws a rectangle on the canvas Parameters rectangle Rectangle to draw Return Values GX SUCCESS Successful rectangle draw GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR Invalid pointer GX INVALID SIZE Invalid rectangle size Allowed From Initialization and threads Example Draw rectangle my rectangle on canvas canvas status gx canvas rectangle draw amp my rectangle If status is SUCCESS the rectangle my rectangle has been drawn canvas See Also gx canvas arc draw gx canvas block move gx canvas circle draw gx display create gx canvas ellipse draw gx canvas line draw gx canvas pie draw gx canvas pixelmap draw gx canvas pixelmap tile gx canvas polygon draw gx canvas text draw GUIX User Guide 100 gx canvas shift Prototype Shift canvas by x y UINT gx canvas shift GX CANVAS canvas GX VALUE x GX VALUE y Description This service shifts the specified canvas offset by the specified amount This affects the position at which the canvas is rendered within the visible frame buffer Parameters canvas X y Return Values GX SUCCESS GX CALLER ERROR GX PTR ERROR GX INVALID CANVAS Allowed From Initializa
165. awing functions to draw any existing child widgets and should be invoked by any custom drawing functions to allow child widgets to be attached to your custom parent widget type Parameters widget Pointer to widget Return Values GX SUCCESS 0x00 Successful widget children draw GX CALLER ERROR 0x11 X Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 X Widget not valid Allowed From Initialization and threads Example Draw children of widget status gx widget children draw amp my widget If status is SUCCESS the child widgets of widget have been drawn See Also gx widget attach gx widget back move gx widget background set gx widget border draw gx widget border style set gx widget border width get gx widget canvas get gx widget child detect gx widget client get gx widget create gx widget created test gx widget delete gx widget detach gx widget draw gx widget draw set gx widget event generate gx widget event process gx widget event process set gx widget event to parent gx widget find gx widget front move gx widget height get gx widget hide gx widget resize gx widget shift gx widget show gx widget status add gx widget status get gx widget status remove gx widget status test gx widget style add GUIX User Guide 382 gx widget style get gx widget style remove gx widget style set
166. ay GX COLOR color table INT color count Description This service re assigns the color table to be used by the display This service is normally invoked by the Studio generated display configuration function but can also be called by the application software Parameters display Pointer to display control block color table Array of color values in display native format color count Indicates number of entries in color table Return Values GX SUCCESS 0x00 Successful screen create GX PTR ERROR 0x07 Invalid pointer Allowed From Initialization and threads Example COLOR default table 32 Change the color table status gx display color table set amp my display default table 32 If status is SUCCESS the color table has been reassigned See Also gx display color set GUIX User Guide 142 gx display create Prototype Create display UINT gx display create GX DISPLAY display GX CONST CHAR name UINT display driver setup GX DISPLAY VOID optional driver info UINT color format GX VALUE width GX VALUE height Description This service creates a screen Parameters display name display driver setup optional driver info color format width height Return Values GX SUCCESS GX CALLER ERROR GX PTR ERROR GX ALREADY CREATED GX INVALID SCREEN SIZE GX INVALID FORMAT Allowed From Initialization and threads GUIX User Guide
167. be found Allowed From Initialization and threads Example Create the widget named child popup which is a child of the top level screen main screen GX WIDGET menu screen status gx studio named widget create main menu amp root window amp menu screen If status GX SUCCESS the screen was created and linked to the root window See Also gx studio widget create GUIX User Guide 295 gx studio display configure Configure display defined in GUIX Studio project Prototype UINT studio display configure USHORT display UINT driver GX DISPLAY USHORT language USHORT theme WINDOW ROOT return root Description This service initializes a DISPLAY so that it is ready for use This function consolidates the functions to initialize a GX DISPLAY control block create a canvas to fit the display and create a root window for the canvas This function also installs the language and resource theme requested after the display has been initialized This function consolidates the programming effort most commonly required to prepare a display for use The function invokes the 9x display create gx display color table set display font table set gx display pixelmap table set gx system language table set gx system active language set system scroll appearance set gx canvas create and window root create functions all or some of which would otherwise be required
168. ble set gx system string width get system timer start gx system timer stop gx system widget find GUIX User Guide 301 gx system draw context get Prototype Get drawing context UINT gx system draw context get GX DRAW CONTEXT current context Description This service returns a pointer to the current drawing context Parameters current context Pointer to destination for current drawing context pointer Return Values GX SUCCESS 0x00 GX CALLER ERROR 0x11 GX PTR ERROR 0x07 Allowed From Initialization and threads Example Get current drawing context status gx system draw context get amp current context Successful current context get Invalid caller of this function Invalid pointer If status is SUCCESS the current drawing context is contained in current context See Also gx system dirty partial add gx system draw context get system event send gx system focus claim gx system initialize gx system start gx system string get gx system string table get gx system string table set gx system string width get system timer start gx system timer stop gx system widget find GUIX User Guide 302 gx system event fold Send event Prototype UINT gx system event fold GX EVENT event Description This service searches the GUIX event queue for an event of the same type I
169. border width gx widget canvas get Get widget canvas gx widget child detect Detect widget child gx widget children draw Draw widget children gx widget client get Get widget client area gx widget color get Resolve color ID to color value for a visible widget gx widget create Create widget gx widget created test Test if widget created gx widget delete Delete widget gx widget detach Detach widget from parent gx widget draw Draw widget gx widget draw set Set draw function of widget gx widget event generate Generate widget event gx widget event process Process widget event gx widget event process set Set event processing function of widget gx widget event to parent Send event to widget s parent gx widget fill color set Assign widget fill color gx widget find Find widget gx widget focus next Move input focus to next widget gx widget focus previous Move input focus to previous widget gx widget font get Resolve font ID to a font pointer for a visible widget gx widget free Free widget control block memory gx widget front move Move widget to front gx widget height get Get widget height gx widget hide Hide widget gx widget pixelmap get Resolve pixelmap ID to a pixelmap pointer for a visible widget gx widget resize Resize widget widge
170. bout the GUIX release 9x api h This C header file contains all system equates data structures and service prototypes 9x port h This C header file contains all target specific and development tool specific data definitions and structures gx a or gx lib This is the binary version of the GUIX C library It is distributed with the standard package e All files are in lower case making it easy to convert the commands to Linux Unix development platforms GUIX User Guide 7 GUIX Installation Installation of GUIX is straightforward The following instructions apply to virtually any installation However please examine thereadme guix txt file for changes specific to the actual development tool environment Step 1 Backup the GUIX distribution disk and store it in a safe location Step 2 On the host hard drive copy all the files of the GUIX distribution into the previously created and installed ThreadX directory Step 3 If installing the standard package GUIX installation is now complete Otherwise if installing the premium package you must build the GUIX runtime library Application software needs access to the GUIX library file usually called e gx a or gx lib and the C include files gx api h and gx port h This is accomplished either by setting the appropriate path for the development tools or by copying these files into the application development area Using GUIX Using GUIX is easy Basically the application
171. button deselect amp my stop button If status is SUCCESS the stop button was successfully deselected See Also gx button background draw gx button create gx button draw gx button event process gx button select gx radio button create gx radio button draw gx icon button create gx pixelmap button create gx pixelmap button draw gx text button create gx text button color set gx text button draw GUIX User Guide 73 gx button draw Draw button Prototype UINT gx button draw GX BUTTON button Description This service draws the specified button Parameters button Pointer to button control block Return Values GX SUCCESS 0x00 Successful button draw GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 Widget not valid Allowed From Initialization and threads Example Draw button status gx button draw amp my stop button If status is SUCCESS the stop button was successfully drawn See Also gx button background draw gx button create gx button deselect gx button event process gx button select gx radio button create gx radio button draw gx icon button create gx pixelmap button create gx pixelmap button draw gx text button create gx text button color set gx text button draw GUIX User Guide 74 gx button event process Process button event Prototype UINT gx button event process
172. cal list widget control block return list entry Destination for return list entry widget Return Values GX SUCCESS 0x00 Successfully get the vertical list entry GX CALLER ERROR Invalid caller of this function GX PTR ERROR Invalid pointer GX INVALID WIDGET 0x12 Widget not valid GX FAILURE selected widget has been scrolled from view Allowed From Initialization and threads Example Get the list entry at the current index of vertical list list status gx vertical list selected widget get amp my list amp current list entry If status is SUCCESS current list entry contains a pointer to the currently selected widget See Also gx vertical list children position gx vertical list create gx vertical list event process gx vertical list page index set 9x vertical list selected index get gx vertical list selected set gx vertical list total rows set GUIX User Guide 356 gx vertical list selected set Set entry in vertical list Prototype UINT gx vertical list selected set GX VERTICAL LIST vertical list GX WIDGET list entry Description This service sets the list entry at the current list index Parameters vertical list Vertical list widget control block list entry Pointer to new list entry Return Values GX SUCCESS 0x00 Successfully set the vertical list entry GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERRO
173. canvas ULONG style USHORT id GX CONST GX RECTANGLE size Description This service creates a root window and attaches the root window to a canvas The root window is the parent of all visible windows on a given canvas and is responsible for redrawing the background when no application window covers some portion of the canvas Changing the background canvas color is therefore actually done by changing the fill color of the root window associated with that canvas One root window must be created for each canvas defined by the system When the GUIX Studio function gx studio display configure is invoked the canvas and root window for the requested display are automatically created by the gx studio display configure function However the application software is free to create other canvases and other root windows for those canvases Parameters root window Pointer to root window control block name Name of the root window canvas Canvas this root window belongs to style Style of the root window id User specified root window ID size Window size Return Values GX SUCCESS 0x00 Successful root window find GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer Allowed From Initialization and threads GUIX User Guide 442 Create root window GX WINDOW ROOT my root GX RECTANGLE size create VGA size root window on main canvas 9x utility rectangle de
174. code must include gx api h during compilation and link with the GUIX library gx a or gx lib There are four easy steps required to build a GUIX application Step 1 Include the gx api h file in all application files that use GUIX services or data structures Step 2 Initialize the GUIX system by calling gx system initialize from the application define function an application thread Step 3 Create a display instance create a canvas for the display and create the root window and any other windows or widgets necessary Step 4 Compile application source and link with the GUIX runtime library gx a or gx lib The resulting image can be downloaded to the target and executed Troubleshooting Each GUIX port is delivered with a demonstration application that executes on specific display hardware The same basic demonstration is delivered with all versions of GUIX It is always a good idea to get the demonstration system running first See the readme guix generic txt file supplied with the distribution for more specific details regarding the demonstration system GUIX User Guide If the demonstration system does run properly perform the following operations to narrow the problem Determine how much of the demonstration is running Increase the stack size of the GUIX thread by changing the compile time constant THREAD STACK SIZE and recompiling the GUIX library Recompile the GUIX library with the appro
175. ctive language Prototype UINT gx system active language set UINT language Description This service set the current language The language index must be less than the number of columns in the application string table Parameters language Language index defined in resource header file Return Values GX SUCCESS 0x00 Successful GX CALLER ERROR 0x11 X Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 _ Widget not valid Allowed From Initialization and threads Example Mark widget widget as dirty status gx system active language set ID LANGUAGE ENGLISH If status is SUCCESS the active language has been assigned See Also gx system dirty partial add gx system draw context get system event send gx system focus claim gx system initialize gx system start gx system string get gx system string table get gx system string table set gx system string width get system timer start gx system timer stop gx system widget find GUIX User Guide 298 gx system canvas refresh Refresh all dirty canvases Prototype UINT gx system canvas refresh VOID Description This service forces an immediate redrawing of all dirty widgets and canvases This service is normally invoked internally by the GUIX system component but can be called by the application to force an immediate system redrawing operation Parameters
176. current screen context Raw definitions are used when 32 bit ARGB color values are to be passed into the brush rather than color IDs Raw color definitions are useful when the desired color is not present in the current system color table or when the RGB color value is computed at runtime Parameters line color Color of line in 32 bit raw ARGB color format Appendix A contains pre defined colors Note that the application may add custom colors as well fill color Color of fill in 32 bit raw ARGB color format Appendix A contains pre defined colors Note that the application may add custom colors as well style Style of brush Appendix D contains pre defined general styles for all widgets as well as widget specific styles Return Values GX SUCCESS 0x00 Successful context raw brush define GX CALLER ERROR Invalid caller of this function GX PTR ERROR Invalid pointer GX INVALID COLOR 0x15 Invalid color GX INVALID STYLE Invalid style Allowed From Initialization and threads GUIX User Guide 136 Define the raw brush of the current context status gx context raw brush define GX COLOR BLACK GX COLOR BLACK STYLE BORDER If status is SUCCESS the raw brush of the current context has been defined See Also gx context brush default gx context brush define gx context brush get gx context brush set gx context brush pattern set gx context brush style set gx c
177. d gx single line text input home gx single line text input position get single line text input right arrow gx single line text input style gx single line text input style set gx multi line text input create gx multi line text view create gx multi line text view event process gx multi line text view scroll GUIX User Guide 269 gx single line text input style set Set styles Prototype UINT gx single line text input style set GX SINGLE LINE TEXT INPUT text input ULONG style Description This service sets styles for single line text input widget Parameters text input Single line text input widget control block style style flags to assign Return Values GX SUCCESS 0x00 Successful GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 Invalid pointer Allowed From Initialization and threads Example Set style STYLE CURSOR BLINK for single line text input widget my text input status gx single line text input style set amp my text input STYLE CURSOR BLINK If status is SUCCESS the text input styles has been set See Also gx single line text input backspace gx single line text input buffer clear single line text input buffer get gx single line text input create gx single line text input character delete gx single line text input character insert gx single line text input draw gx sing
178. d color ID define GX COLOR ID BLACK GX FIRST USER COLOR define GX COLOR ID WHITE FIRST USER COLOR 1 User defined color table GX COLOR demo color table First bring in GUIX default color table These colors are used by GUIX internals SYSTEM DEFAULT COLORS DECLARE In this demo two color entries are added to the color table GX COLOR BLACK GX COLOR WHITE GUIX User Guide 460 Define prototypes x VOID demo thread entry ULONG thread input int main void Enter ThreadX tx kernel enter return 0 VOID tx_application_define void first_unused_memory Create the main demo thread tx thread create amp demo thread GUIX Demo Thread demo thread entry 0 demo thread stack sizeof demo thread stack 1 1 TX NO TIME SLICE TX AUTO START VOID demo thread entry ULONG thread input RECTANGLE root window size GX RECTANGLE prompt position Initialize GUIX gx system initialize Install the demo string table gx system string table set demo strings SID MAX Install the demo color table gx system color table set demo color table sizeof demo color table sizeof GX COLOR Create the demo display and associated driver gx display create amp demo display demo display win32 graphics driver setup 16 DEMO DISPLAY WIDTH DEMO DISPLAY HEIGHT Create the default canvas gx canva
179. d the physical displays available you will use the gx studio display configure API function to create and initialize each of your displays Display Control Block The characteristics of each display object are found in its control block GX DISPLAY and are defined in gx api h The memory required for a display object is provided by the application and can be located anywhere in memory However it is most common to make the display control block a global structure by defining it outside the scope of any function Resource Management Resources are Ul components that are needed by the application but they are application code Resources are application data and are usually statically defined Resource types include pixelmaps fonts colors and strings These resources can be changed at any time usually without changing any application software It is important to keep the storage of and references to resources separated from the application software to allow changing Ul appearance without changing application code since changes to the application software usually require the associated re testing and verification of that software The GUIX display module provides resource management facilities for all resources that are dependent on the color depth and format of the display These facilities include maintaining the active pixelmap table active font table and active color table The string GUIX User Guide 29 table resource is main
180. d threads Example Delete widget widget status gx widget delete amp my widget If status is SUCCESS the widget widget has been deleted See Also gx widget attach gx widget back move gx widget background set gx widget border draw gx widget border style set gx widget border width get gx widget canvas get gx widget child detect gx widget children draw gx widget client get gx widget created gx widget created test gx widget detach gx widget draw gx widget draw set gx widget event generate gx widget event process gx widget event process set gx widget event to parent gx widget find gx widget front move gx widget height get gx widget hide gx widget resize 9x widget shift gx widget show gx widget status add gx widget status get gx widget status remove gx widget status test gx widget style add gx widget style get gx widget style remove gx widget style set gx widget width get GUIX User Guide 391 gx widget detach Detach widget from parent Prototype UINT gx widget detach GX WIDGET widget Description This service detaches the widget from its parent Parameters widget Pointer to widget Return Values GX SUCCESS 0x00 Successful widget detach GX_CALLER_ERROR 0x11 Invalid caller of this function GX_PTR_ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 _ Widget not valid Allowed From Initialization a
181. d threads Example Set the list entry at the current index of horizontal list list status gx horizontal list selected set amp my list amp my entry If status is SUCCESS the current index points to the widget entry See Also gx horizontal list children position gx horizontal list create gx horizontal list event process gx horizontal list page index set gx horizontal list selected index get gx horinzontal list selected widget get gx horizontal list total columns set GUIX User Guide 163 gx horizontal list total columns set Assign the total number of list columns Prototype UINT gx horizontal list total columns set GX horizobntal LIST horizontal list INT count Description This service assigns the total number of columns to be displayed by the horizontal list Parameters horizontal list Horizontal list widget control block count Number of columns to display Return Values GX SUCCESS 0x00 Successful assigned column count GX_PTR_ERROR 0x07 X Invalid pointer Allowed From Initialization and threads Example Tell my list to display 20 total columns status gx horizontal list total columns set amp my list 20 See Also gx horizontal list children position gx horizontal list create gx horizontal list event process gx horizontal list page index set gx horizontal list selected index get gx horinzontal list selected widget get gx horiz
182. dget color get my widget MY FIRST COLOR RESOURCE 10 amp actual color If status is SUCCESS the actual color is contained in actual color See Also gx widget font get gx widget pixelmap get GUIX User Guide 387 gx widget create Create widget Prototype UINT gx widget create WIDGET widget GX CONST GX CHAR name GX WIDGET parent ULONG style USHORT widget id CONST RI Description ECTANGLI E size This service creates a widget Parameters widget name parent style widget id size Return Values GX SUCCESS GX CALLER ERROR GX PTR ERROR GX ALREADY CREATED GX INVALID WIDGET SIZE GX INVALID WIDGET GX INVALID STYLE GX INVALID SIZE Allowed From Initialization and threads GUIX User Guide Pointer to widget Logical name of widget Pointer to parent widget Style Appendix D contains pre defined general styles for all widgets as well as widget specific styles Application defined ID of the widget Size of the widget 0x00 Successful widget create 0x11 Invalid caller of this function 0x07 Invalid pointer 0x13 Widget already created 0x14 Invalid widget control block size 0x12 Parent widget not valid 0x18 Invalid style 0x19 Invalid size 388 Get client area of widget widget status gx widget create amp my widget my widget amp my parent window STYLE BORDER RAISED MY
183. diari Dodo 90 ple ix depende eed eee iden 91 CANVAS offset SOT 92 gx canvas pixelmap blend 93 CANVAS 95 CANVAS draW 2 97 OX CANVAS pixeliiap TUS esses see cc ede nc radii secun 98 gx canvas polygon pu dd EU 99 canvas rectangle CHE EE ER EP EH FEIN FS 100 op Dein sterii RED D D D RD 101 qx canvas text doch coe heed cocer cobra abate 102 gx checkbox CAN acct case iioi i dita i ecco 104 GUIX User Guide vi CIE QW 106 gx checkbox event process 107 GX oneckbox e emot init odes OOo rp dup muni Ud pde due 108 gX checkbox SB BOT o core veruni accumsan tance nds Cade tats Uoc dE toca amt LOU EA 110 bite tite CEE CME ARTE CIRCE bte div 111 49 1 1 BEES 117 gx context brush 121 gx COMPS xr 122 Gx contexr Dr sh patern Seb omine nen Doce On 123 br
184. display This service is normally invoked by the Studio generated display configuration function but can also be called by the application software Parameters display Pointer to display control block pixelmap table Array PIXELMAP pointers table size Number of pixelmaps in table Return Values GX SUCCESS 0x00 Successful screen create GX PTR ERROR 0x07 Invalid pointer Allowed From Initialization and threads Example PIXELMAP table 32 Assign pixelmap table status gx_display_pixelmap_table_set amp my_display pixelmap_table 32 If status is GX SUCCESS the pixelmap table has been reassigned See Also gx_display_color_set gx_display_color_table_set gx_display_font_table_set GUIX User Guide 147 gx drop list close Close a drop list Prototype UINT gx drop list close GX DROP LIST drop list Description This service closes a drop list Parameters drop list Pointer to the drop list control block Return Values GX SUCCESS 0x00 Successful closed the drop list GX CALLER ERROR 0x11 X Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer Allowed From Initialization and threads Example Close a drop list status gx drop list close amp drop list If status is SUCCESS the screen my display has been destroyed See Also gx drop list create gx drop list event process gx drop list open gx drop lis
185. dow status gx window client width get amp my window amp my client width If status is SUCCESS client width contains the client width of window window See Also gx window canvas set gx window client height get gx window client scroll gx window create gx window draw gx window event process gx window root create gx window root delete gx window root event process gx window root find gx window scroll info get gx window scrollbar find gx window wallpaper get gx window wallpaper set GUIX User Guide 437 gx window create Prototype UINT gx window create GX WINDOW window GX WIDGET parent USHORT window id GX CONST GX RECTANGLE size Description This service creates a window Create window GX CONST GX CHAR name ULONG style Parameters window Pointer to window control block name Logical name of window parent Pointer to parent widget style Window style Appendix D contains pre defined general styles for all widgets as well as widget specific styles window id Application defined ID of the window size Size of the window Return Values GX SUCCESS 0x00 GX CALLER ERROR 0x11 GX PTR ERROR 0x07 GX ALREADY CREATED 0x13 Allowed From Initialization and threads GUIX User Guide Successful window create Invalid caller of this function Invalid pointer Widget already created 438 Creat
186. draw gx button create gx button deselect gx button draw gx button event process gx button select gx icon button create gx pixelmap button create gx pixelmap button draw gx text button create gx text button color set gx text button draw gx radio button create GUIX User Guide 239 gx radio button pixelmap set Prototype Set pixelmaps for radio button UINT gx radio button pixelmap set GX RADIO BUTTON button Description GX RESOURCE ID off id GX RESOURCE ID on id GX RESOURCE ID off disabled id GX RESOURCE ID on disabled id This service assigns the pixelmaps to be displayed by the specified radio button for each button state The resource IDs can be duplicated Parameters button off id on id off disabled id on disabled id Return Values GX SUCCESS GX PTR ERROR Pointer to radio button widget control block Pixelmap used for radio button off state Pixelmap used for radio button on state Pixelmap used for radio button disabled and off state Pixelmap used for radio button disabled and on state 0x00 Successful radio button pixelmaps set 0x07 Invalid pointer GX INVALID RESOURCE ID 0x12 Invalid resource ID Allowed From Initialization and threads GUIX User Guide 240 Sets pixelmaps for radio button status gx radio button pixelmap set amp my radio button MY OFF PIXELMAP ON PIXELMAP MY OFF DISABLED PI
187. ds Example invoke backspace handler status gx single line text input backspace amp my text input If status is SUCCESS the text input widget has processed backspace input character See Also gx single line text input buffer clear gx single line text input buffer get gx single line text input create gx single line text input character delete gx single line text input character insert gx single line text input draw gx single line text input end gx single line text input event process gx single line text input home gx single line text input left arrow gx single line text input position get gx single line text input right arrow gx single line text input style add gx single line text input style remove single line text input style set gx multi line text input create gx multi line text view create gx multi line text view event process gx multi line text view scroll GUIX User Guide 251 gx single line text input buffer clear Deletes all characters from the text input buffer Prototype UINT gx single line text input buffer clear GX SINGLE LINE TEXT INPUT text input Description This service delets all characters from the text input buffer Parameters text input Single line text input widget control block Return Values GX SUCCESS 0x00 Successful single line text input create GX CALLER ERROR 0x11 Invalid call
188. e Allowed From Initialization and threads GUIX User Guide 415 Shift widget my widget status gx widget shift amp my widget 10 20 GX FALSE If status is SUCCESS the widget my widget has been shifted See Also gx widget attach gx widget back move gx widget background set gx widget border draw gx widget border style set gx widget border width get gx widget canvas get gx widget child detect gx widget children draw gx widget client get gx widget created gx widget created test gx widget delete gx widget detach gx widget draw gx widget draw set gx widget event generate gx widget event process gx widget event process set gx widget event to parent gx widget find gx widget front move gx widget height get gx widget hide gx widget resize gx widget show gx widget status add gx widget status get gx widget status remove gx widget status test gx widget style add gx widget style get gx widget style remove gx widget style set gx widget width get GUIX User Guide 416 gx widget show Show widget Prototype UINT gx widget show GX WIDGET widget Description This service shows the widget The widget will become visible only if itis attached to a parent and the parent widget is also visible Parameters widget Pointer to widget Return Values GX SUCCESS 0x00 Successful widget show GX CALLER ERROR 0x11 X I
189. e X start Ending x position of the line y end Ending y position of the line Return Values GX SUCCESS GX CALLER ERROR GX PTR ERROR GX INVALID COORDINATE 0x00 Successful line draw 0x11 Invalid caller of this function 0x07 Invalid pointer 0x21 Invalid coordinate s Allowed From Initialization and threads Example Draw line on canvas canvas status gx canvas line draw 0 1 320 480 If status is SUCCESS the line has been drawn on canvas See Also gx canvas arc draw gx canvas block move gx canvas circle draw gx display create gx canvas ellipse draw gx canvas pie draw gx canvas pixelmap draw gx canvas pixelmap tile gx canvas polygon draw gx canvas rectangle draw gx canvas text draw GUIX User Guide 90 gx canvas pie draw Draw pie Prototype UINT gx canvas pie draw INT xcenter INT ycenter UINT r INT start angle INT end angle Description This service draws a pie into the canvas using the current brush The pie is clipped to the canvas invalid region Parameters xcenter x position of center of the pie ycenter y position of center of the pie r Radius of the pie start angle Starting angle of the pie end angle Ending angle of the pie Return Values GX SUCCESS 0x00 Successful arc draw GX CALLER ERROR 0x11 X Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer INVALID COORDINATE 0x21 Invalid
190. e gx widget created test 9x widget delete gx widget detach gx widget draw gx widget draw set gx widget event generate gx widget event process GUIX User Guide 370 gx widget event process set gx widget event to parent gx widget find gx widget front move gx widget height get gx widget hide gx widget resize gx widget shift gx widget show gx widget status add gx widget status get gx widget status remove gx widget status test gx widget style add gx widget style get gx widget style remove gx widget style set gx widget width get GUIX User Guide 371 gx widget border draw Draw widget border Prototype UINT gx widget border draw GX WIDGET widget GX COLOR border color GX COLOR upper fill GX COLOR lower fill GX BOOL fill Description This service draws the widget border This service is normally invoked as part of a widget drawing function This service interprets the widget border style flags to draw no border a thin border a raised border a recessed border or a thick border Parameters widget Pointer to widget border color Color of border Appendix A contains pre defined colors Note that the application may add custom colors as well upper fill Color of upper fill Appendix A contains pre defined colors Note that the application may add custom colors as well lower fill Color of lower fill Appendix A contains pre defined colors Note that the ap
191. e called from any thread at any time However it is usually considered to be better architecture to separate your time critical business logic from your user interface logic Since the user interface drawing operations can sometimes take a long time depending on your display size and CPU performance you normally would not want to have time critical threads delayed waiting for a drawing operation to complete Internal GUIX Thread As mentioned GUIX has an internal thread that performs the bulk of the GUI processing This thread must be created by the application software usually as part of the tx application define function implementation The priority of this thread as well as it s preemption threshold value time slice selection and stack size are determined by the application software The internal GUIX thread execution loop is composed of three actions First GUIX retrieves events from the GUIX event queue and dispatches those events for processing by the GUIX windows and widgets Events are typically pushed into the GUIX event queue by periodic timers input devices such as a touch screen or keypad and by GUIX widgets themselves as they process user input Next after all events have been processed GUIX determines if a screen refresh is needed and if so performs the processing necessary to update the display graphics data mainly by calling the drawing functions of those windows and widgets which have been marked as dirty Finally GUIX
192. e canvas drawing is now offset from position 20 30 See Also gx canvas alpha set gx canvas create gx canvas drawing complete gx canvas initiate gx canvas shift GUIX User Guide 92 gx canvas pixelmap blend Prototype Blend pixelmap UINT gx canvas pixelmap blend GX VALUE x position Description GX VALUE y position GX PIXELMAP pixelmap GX UBYTE alpha This service blends a pixelmap with the canvas background The blending ratio is specified by the caller The alpha value can range from 0 fully transparent to 255 fully opague The pixelmap may also include an internal alpha channel which is combined with the incoming blending value This service is only supported by display drivers running at 16 bpp color depth and higher Parameters x start Return Values GX SUCCESS GX CALLER ERROR GX PTR ERROR GX NOT SUPPORTED Allowed From Initialization and threads Example Draw pixelmap on active canvas PIXELMAP Starting x position of the pixelmap Starting y position of the pixelmap Pointer to pixelmap Successful pixelmap draw Invalid caller of this function 0x07 Invalid pointer Not supported 9x system pixelmap get ID MY PIXELMAP amp map status gx canvas pixelmap blend 10 20 map 128 If status is SUCCESS the pixelmap has been blended onto the current canvas See Also GUIX User Guide 93
193. e details of how these hardware specific drivers are implemented are deferred to chapter 5 GUIX assumes the existence of ThreadX and depends on its thread execution suspension periodic timers and mutual exclusion facilities Initialization The service gx system initialize must be called before any other GUIX service is called GUIX system initialization can be called from the ThreadX ix application define routine initialization context or from application threads GUIX User Guide 13 The gx system initialize function creates the GUIX event queue initializes the GUIX timer facility creates the main GUIX system thread and initializes various data structures maintained by GUIX during the execution of your application After gx system initialize returns the application is ready to create displays canvases windows widgets and customize the properties of all GUIX objects Much of the GUIX object creation API can be called from tx application define or from application threads Application Interface Calls Calls from the application are largely made from tx application define initialization context or from application threads Please see the Allowed From section of each GUIX API described in Chapter 4 to determine what context it may be called from For the most part processing intensive activities are deferred to the internal GUIX thread including all event processing and widget window drawing The GUIX API functions can b
194. e grow gx utility rectangle overlap detect gx utility rectangle point detect GUIX User Guide 349 gx vertical list children position Position children for the vertical list Prototype UINT gx vertical list children position GX VERTICAL LIST vertical list Description This function positions the children for the vertical list Parameters vertical list Pointer to the vertical list control block Return Values GX SUCCESS 0x00 Successfully positioned the children for the vertical list GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer Allowed From Initialization and threads Example Position children in the vertical list status gx vertical list children position amp vertical list If status is SUCCESS the children in the vertical list are positioned See Also gx vertical list create gx vertical list event process gx vertical list page index set gx vertical list selected index get gx vertical list selecgted widget get gx vertical list selected widget get gx vertical list selected set gx vertical list total rows set GUIX User Guide 350 gx vertical list create Prototype Create vertical list UINT gx vertical list create GX VERTICAL LIST vertical list GX CONST GX C HAR name GX WIDGET parent INT total rows VOID callback GX VERTICAL LIST GX WIDGET INT ULONG style
195. e line text input widget control block buffer address The address of the input buffer content size The count of the input data buffer size The size of the input buffer Return Values GX SUCCESS 0x00 Successful single line text input create GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 Invalid pointer Allowed From Initialization and threads Example Retrieves buffer information of my text input widget status gx single line text input buffer get amp my text input amp buffer address amp string size amp buffer size If status is GX SUCCESS the value of buffer address string size and buffer size has been retrieved See Also gx single line text input backspace gx single line text input buffer clear gx single line text input create gx single line text input character delete single line text input character insert gx single line text input draw gx single line text input end gx single line text input event process 9x single line text input home gx single line text input left arrow gx single line text input position get gx single line text input right arrow GUIX User Guide 253 gx single line text input style add gx single line text input style remove gx single line text input style set gx multi line text input create gx multi line text view create gx multi line text view event process gx multi line text view scroll
196. e of 0 indicates that the pixel is transparent For 8 bit data the values range from 0 fully transparent to 255 fully opague All intermediate value represent a blending value for anti aliased fonts The glyph bitmap data is always padded to full byte alignment for formats using less than 8bpp data values The gx glyph ascent and gx glyph descent values position the glyph vertically with respect to the font baseline The gx glyph width and gx glyph height values specify the size of the glyph bitmap data GUIX User Guide 474 The gx glyph advance value specifies the pixel width to advance the drawing position after drawing the glyph this may not be equal to the glyph width The gx glyph leading value specifies the pixels to advance in the x direction prior to rendering the glyph GUIX User Guide 475 Index alpha channel 18 27 29 ANSI C 1 2 3 5 39 49 anti aliasing 2 11 36 110 API 9 39 49 drawing 35 GUIX function 13 14 17 25 object creation 14 Sel VIGO oe oben hood 42 286 7 24 58 313 blend pixel cse 35 block move 35 buffer COMposite 21 frame 18 19 20 22 26 27 37 50 81 84 89 98 424 426 428 431 local frame 19 20 20 21 buffer togg
197. e pen position For timer events the 9x event timer id contains the ID of the expired timer Other payload data fields are GUIX User Guide 41 utilized for other event types as described in that particular widget s event notification documentation The following is a list of pre defined GUIX event types GX EVENT ANIMATION COMPLETE GX EVENT CLICKED GX EVENT CLOSE GX EVENT DESELECTED GX EVENT DESTROY GX EVENT FOCUS GAINED GX EVENT FOCUS LOST GX EVENT HIDE GX EVENT HORIZONTAL FLICK GX EVENT HORIZONTAL SCROLL GX EVENT KEY DOWN GX EVENT KEY PRESS GX EVENT KEY RELEASE GX EVENT KEY UP GX EVENT LANGUAGE CHANGE GX EVENT LIST SELECT GX EVENT MOVE GX EVENT PARENT SIZED GX EVENT PEN DOWN GX EVENT PEN DRAG GX EVENT PEN UP GX EVENT RADIO DESELECT GX EVENT RADIO SELECT GX EVENT REDRAW GX EVENT RESIZE GX EVENT RESOURCE CHANGE GX EVENT SELECTED EVENT SHOW GX EVENT SLIDE GX EVENT SLIDER VALUE GX EVENT SPRITE COMPLETE GX EVENT TERMINATE GX EVENT TEXT EDIT GX EVENT TEXT EDIT COMPLETE GX EVENT TEXT EDITED GX EVENT TIMER GX EVENT TOGGLE OFF GX EVENT TOGGLE ON GX EVENT VERTICAL FLICK GX EVENT VERTICAL SCROLL EVENT ZOOM IN GX EVENT ZOOM OUT The application can also add its own custom events starting numerically after the constant GX FIRST APP EVENT All event numbers after this constant are reserved for the application s use Of course the application s widget event handler must have processi
198. e text input position get gx single line text input right arrow gx single line text input style remove gx single line text input style set gx multi line text input create gx multi line text view create gx multi line text view event process gx multi line text view scroll GUIX User Guide 268 gx single line text input style remove Remove styles Prototype UINT gx single line text input style remove GX SINGLE LINE TEXT INPUT text input ULONG style Description This service removes styles from single line text input widget Parameters text input Single line text input widget control block style Styles to remove Appendix D contains pre defined general styles for all widgets Return Values GX SUCCESS 0x00 Successful GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 Invalid pointer Allowed From Initialization and threads Example invoke backspace handler status gx single line text input style remove amp my text input GX STYLE CURSOR BLINK If status is SUCCESS the text input style has been set See Also gx single line text input backspace gx single line text input buffer clear 9x single line text input buffer get gx single line text input create gx single line text input character delete gx single line text input character insert single line text input draw gx single line text input en
199. e top left starting point for the target widget for slide type animations The gx animation end position defines the top left ending position for the target widget for slide type animations The gx animation delay field defines the number of GUIX timer ticks a multiple of the underlying OS tick rate to delay between each frame of the animation sequence To implement animation effects in your application you must first call gx animation create to initialize your animation controller If your animation will be using a secondary canvas initialize this canvas by calling gx animation canvas define Next you should initialize the GX ANIMATION INFO structure to define the specific type of animation to be performed and the other animation parameters Finally call gx animation start to trigger the animation sequence When the animation controller completes an animation sequence it sends an GX ANIMATION COMPLETE event to the target widget allowing the any desired cleanup of the animation canvas to be done at that time GUIX Utility Component The utility component is responsible for all common utility functions in GUIX These are common functions that are useful utilities and can be invoked from anywhere in the application or the internal GUIX code The utility component functions include 9x pixelmap transparent detect utlity 9x utility math cos 9x utility math sin 9x utility math sqrt 9x utility rectangle center 9x ut
200. e window window status gx window create amp my window my window amp my parent window STYLE BORDER RAISED MY WINDOW 10 amp size If status is SUCCESS window window has been created See Also gx window canvas set gx window client height get gx window client scroll gx window client width get gx window draw gx window event process gx window root create gx window root delete gx window root event process gx window root find gx window scroll info get gx window scrollbar find gx window wallpaper get gx window wallpaper set GUIX User Guide 439 gx window draw Draw window Prototype UINT gx window draw GX WINDOW widget Description This service draws a window Parameters widget Pointer to Window control block Return Values GX SUCCESS Successful window draw GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR Invalid pointer GX INVALID WIDGET Widget not valid Allowed From Initialization and threads Example Draw window my window status gx window draw amp my window If status is SUCCESS window window has been drawn See Also gx window canvas set gx window client height get gx window client scroll gx window client width get gx window create gx window event process gx window root create gx window root delete gx window root event process gx window root find gx wi
201. eads Example Set the fill color of the current context to black status gx context fill color set MY BLACK COLOR 10 If status is SUCCESS the fill color of the current context has been set to black See Also gx context brush default gx context brush define gx context brush get gx context brush set gx context brush pattern set gx context brush style set gx context brush width set gx context font set gx context line color set gx context pixelmap set gx context raw brush define gx context raw fill color set gx context raw line color set GUIX User Guide 128 gx context font get Get font associated with font ID in current draw context Prototype UINT gx context font get GX RESOURCE ID font id GX FONT return font Description This service retrieves the font pointer associated with the indicated font ID This service should only be called from within an active drawing operation Parameters font id Resource ID of font requested return font Address of variable to hold returned font pointer Return Values GX SUCCESS 0x00 Successful context fill color set GX INVALID CONTEXT 0x06 No active drawing context GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer INVALID RESOURCE ID 0x22 Invalid resource ID Allowed From Initialization and threads Example GX FONT my font Get
202. eate multi line text input gx multi line text input style add Add cursor style flags gx multi line text input style remove Remove cursor style flags gx multi line text input style set Assign cursor style flags gx multi line text view create Create multi line text view gx multi line text view event process Process multi line text view event gx multi line text view font set Set font used in multi line text view gx multi line text view scroll Scroll multi line text view gx multi line text view text color set Set text color in mulit line text view gx multi line text view text id set Set system text string in multi line text view gx multi line text view text set Set user defined string in multi line text view gx pixelmap button create Create pixelmap button gx pixelmap button draw Draw pixelmap button gx pixelmap button event process Pixelmap button event processing gx pixelmap button pixelmap set Set pixelmap in pixelmap button gx pixelmap prompt create Create pixelmap prompt gx pixelmap prompt draw Draw pixelmap prompt gx pixelmap prompt pixelmap set Set pixelmap in pixelmap prompt gx pixelmap slider create Create pixelmap slider gx pixelmap slider draw Draw pixelmap slider gx pixelmap slider event process Pixelmap slider event processing gx pixelmap sl
203. ecified by the USER or that the operation of the GUIX products will operate uninterrupted or error free or that any defects that may exist in the GUIX products will be corrected after the warranty period Express Logic Inc makes no warranties of any kind either expressed or implied including but not limited to the implied warranties of merchantability and fitness for a particular purpose with respect to the GUIX products No oral or written information or advice given by Express Logic Inc its dealers distributors agents or employees shall create any other warranty or in any way increase the scope of this warranty and licensee may not rely on any such information or advice Part Number 000 1115 Revision 5 2 5 Table Contents Fable Oft ETUDES TOO OO E ER iii About This Guides ce ce enne ree eA M AM M MELLE XV Organization cA ea ho A DD A DA AR D A AD XV Guide Conventions Data TW OCS t e P xvii Customer Support UP EI aes xviii What We Need Prom YOU 59 cite Pes ani ex UU EL Ee bine end aah xviii Where to Send Comments About This xix Chapter 1 Introduction to GUIX mdr tente kind 1 GUIX Feature OWVGIVIBW i eae eds nea nd pane nd p na aa nd pan na nd yn na aa ad gan sa ad y
204. ectangle First rectangle and combined rectangle second rectangle Second rectangle Return Values None Allowed From All Example Combine rectangle a to my rectangle b 9x utility rectangle combine amp my rectangle amp my rectangle b rectangle is the merger of the original rectangle a my rectangle b See Also gx utility Itoa gx utility math cos gx utility math sin gx utility math gx utility pixelmap rotate gx utility pixelmap simple rotate gx utility rectangle center gx utility rectangle center find gx utility rectangle compare gx utility rectangle define gx utility rectangle grow gx utility rectangle overlap detect gx utility rectangle point detect gx utility rectangle shift GUIX User Guide 343 gx utility rectangle compare Compare two rectangles Prototype GX BOOL gx utility rectangle compare GX RECTANGLE first rectangle GX RECTANGLE second rectangle Description This service compares the first and second rectangle If they are equal a value of GX TRUE is returned Parameters first rectangle First rectangle second rectangle Second rectangle Return Values result GX TRUE if rectangles are equal otherwise GX FALSE is returned Allowed From All Example Compare rectangle a to my rectangle b result gx utility rectangle compare amp my rectangle a amp my rectangle b If res
205. ed reor b Bye pre epe bee pee PEE bee petere bebes nnmnnn nnmnnn 239 ax radio SQL eee cock euentu 240 SCION thumb Cheale E Leve LED A HU QUE LED LE HUE E mine LE ELE LE 242 epe A COC RETR 244 Bxssorollztbumb event DIOGBSS XE RE URN 245 SCO AR 246 gx_scrollbar_event_procesS eee rhetor Oro etr canoer DHT EUH 247 qx serollbar limit lt CNEGK oss cs cot heed corner corr ccr eek cer ew ec cech e 248 qx scrollBat dita ca eat 249 GUIX User Guide ix single line text input 251 9x single line text input buffer 252 gx single line text input buffer get 253 gx single line text input character 255 9x single line text input character 256 ax single Tine text 1 Create Bert kx Et Vx DX Mx BUE 257 9x single line text input 259 _5 _ _1 nds eave cee hie 260 gx single line text input event 558 261 gx single line text input 263 dx single ine text Input xr EM XI XE MEX FIXE
206. ee Also gx checkbox create gx checkbox event process gx checkbox select GUIX User Guide 106 gx checkbox event process Process checkbox event Prototype UINT gx checkbox event process GX CHECKBOX checkbox GX EVENT event ptr Description This service processes an event for the specified checkbox This service should be called as the default event handler by any custom checkbox event processing functions Parameters checkbox Pointer to checkbox control block event ptr Pointer to the event to process Return Values GX SUCCESS 0x00 Successful checkbox event process GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 Widget not valid Allowed From Initialization and threads Example Process event for the checkbox checkbox status gx checkbox event process amp my checkbox amp my event If status is SUCCESS the event for checkbox checkbox has been processed See Also gx checkbox create gx checkbox draw gx checkbox select GUIX User Guide 107 gx checkbox pixelmap set Prototype Set pixelmap for checkbox UINT gx checkbox pixelmap set GX CHECKBOX checkbox GX R GX R GX R GX R Description ESOURC ESOURC ESOURC ESOURC E ID unchecked id E ID checked id E ID unchecked disabled id E ID checked disabled id This serv
207. eese dude 344 rectangle dellriG eol Eo nM S aS 345 9x utility rectangle overlap 346 gx_utility_rectangle_point_detect ox on eoo e eee e eU ug 347 gx_utility_rectangle_resize i enr ao en cian an eon aen an i n nS Dune 348 gx_utility_rectangle_shift t 349 gx_vertical_list_children_position 350 9 Vertical DD e prp E EE 351 Ox vertical fist _ eo 353 gx vertical list selected index 355 gx vertical list selected widget 356 dx vertical list selected Sela 357 Ox vertical list total TOWS SOV ucc p o EX XR 358 UE UU UD UCD LED LED UE 359 IST AOC ANG snp teta toits a 361 OX s Em 363 widget background 365 aqxwidger AE rc ere re AE re bue P AE re bre AP AE RENE EYE 366 gx_widget_back_MOVe once n da d ecdesia care ela P c Ded 368 widget block detecta cide ie aide ene eich 370 gx_widget_border_drawW Pe 372 widget border style set nennen nnns 374 ax widdet border Wii 376 gX WIdGGE CANVAS COU RE
208. ent process set gx widget event to parent gx widget find gx widget front move gx widget height get gx widget hide gx widget resize gx widget shift gx widget show gx widget status add gx widget status get gx widget status remove gx widget style add gx widget style get gx widget style remove gx widget style set gx widget width get GUIX User Guide 425 gx widget style add Add widget style Prototype UINT gx widget style add GX WIDGET widget ULONG style Description This service adds a style to the widget Parameters widget Pointer to widget style New style to add Appendix D contains pre defined general styles for all widgets as well as widget specific styles Return Values GX SUCCESS 0x00 Successful widget style add GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 X Widget not valid GX INVALID STYLE 0x18 Invalid style Allowed From Initialization and threads GUIX User Guide 426 Add style to widget widget status gx widget style add amp my widget GX STYLE BORDER RAISED If status is SUCCESS the widget widget style was See Also gx widget attach gx widget back move gx widget background set gx widget border draw gx widget border style set gx widget border width get gx widget canvas get gx widget child detect gx w
209. er Allowed From Initialization and threads GUIX User Guide 432 Set style STYLE TRANSPARENT to the widget my widget status gx widget style set amp my widget GX STYLE TRANSPARENT If status is SUCCESS the widget widget style is set to STYLE TRANSPARENT See Also gx widget attach gx widget back move gx widget background set gx widget border draw gx widget border style set gx widget border width get gx widget canvas get gx widget child detect gx widget children draw gx widget client get gx widget created gx widget created test gx widget delete gx widget detach gx widget draw gx widget draw set gx widget event generate gx widget event process gx widget event process set gx widget event to parent gx widget find gx widget front move gx widget height get gx widget hide gx widget resize gx widget shift gx widget show gx widget status add gx widget status get gx widget status remove gx widget status test gx widget style add gx widget style get gx widget style set gx widget width get GUIX User Guide 433 gx widget width get Get widget width Prototype UINT gx widget width get GX WIDGET widget GX VALUE return width Description This service gets the width of the widget Parameters widget Pointer to widget return width Pointer to destination for widget width Return Values GX SUCCESS
210. er of this function GX PTR ERROR 0x07 Invalid pointer Allowed From Initialization and threads Example clear input buffer of my text input status gx single line text input clear amp my text input If status is SUCCESS the text input widget has emptied its input buffer See Also gx single line text input backspace gx single line text input buffer gx single line text input create gx single line text input character delete 9x single line text input character insert gx single line text input draw gx single line text input end gx single line text input event process 9x single line text input home gx single line text input left arrow gx single line text input position get gx single line text input right arrow gx single line text input style add gx single line text input style remove gx single line text input style set gx multi line text input create gx multi line text view create gx multi line text view event process gx multi line text view scroll GUIX User Guide 252 gx single line text input buffer get Retrieves buffer information of text input widget Prototype UINT gx single line text input buffer get GX SINGLE LINE TEXT INPUT text input GX CHAR buffer address UINT content size UINT buffer size Description This service retrieves buffer information of the text input widget Parameters text input Singl
211. er specific extra data might include the DMA channel being used by the driver or the SPI channel to which the display frame buffer is connected VOID gx display driver palette set struct DISPLAY STRUCT display COLOR palette INT count This is a pointer to a function to install a color palette This function is NULL unless the driver operates in palette also called color lookup table or CLUT mode GUIX User Guide 454 VOID gx display driver simple line DRAW context INT x1 INTy1 INT x2 INT y2 This is a pointer to a function to implement generic line drawing no anti aliasing Default implementations of this function are provided for each supported color depth and color format VOID gx display driver simple wide line draw GX DRAW context INT x1 INTy1 INT x2 INT y2 This is a pointer to a function to implement generic wide line drawing no anti aliasing Default implementations of this function are provided for each supported color depth and color format VOID gx display driver anti aliased line draw GX DRAW CONTECT context INT x1 INTy1 INT x2 INT y2 This is a pointer to a function to implement generic anti aliased line drawing Default implementations of this function are provided for each supported color depth and color format VOID gx display driver anti aliased wide line draw GX DRAW context INT x1 INTy1 INT x2 INT y2 This
212. ervice sets the string ID for the text prompt widget Parameters prompt Pointer to prompt widget control block string id Resource ID of the string Return Values GX SUCCESS 0x00 Successful prompt text color set GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 Invalid pointer GX INVALID RESOURCE ID 0x22 Invalid resource ID Allowed From Initialization and threads Example Set the string ID of prompt status gx prompt text id set amp my prompt MY STRING ID If status is SUCCESS the text ID for prompt prompt has been set See Also gx pixelmap prompt create gx pixelmap prompt draw gx pixelmap prompt pixelmap set gx prompt create gx prompt draw gx prompt font set gx prompt text get gx prompt text set GUIX User Guide 235 gx prompt text set Set prompt text Prototype UINT gx prompt text set GX PROMPT prompt GX CHAR text Description This service sets the text of a prompt widget Parameters prompt Pointer to prompt widget control block text Pointer to text Return Values GX SUCCESS Successful prompt text set GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR Invalid pointer GX INVALID WIDGET Widget not valid Allowed From Initialization and threads Example Set the text of prompt to my text status gx prompt text set amp my prompt my text If status is SUC
213. est to see if widget widget is created status gx widget created test amp my widget amp was created If status is SUCCESS and was created is TRUE the widget my widget has been created See Also gx widget attach gx widget back move gx widget background set gx widget border draw gx widget border style set gx widget border width get gx widget canvas get gx widget child detect gx widget children draw gx widget client get gx widget created 9x widget delete gx widget detach gx widget draw gx widget set gx widget event generate gx widget event process gx widget event process set gx widget event to parent gx widget find gx widget front move gx widget height get gx widget hide gx widget resize 9x widget shift gx widget show gx widget status add gx widget status get gx widget status remove gx widget status test gx widget style add gx widget style get gx widget style remove gx widget style set gx widget width get GUIX User Guide 390 gx widget delete Delete widget Prototype UINT gx widget delete GX WIDGET widget Description This service deletes the widget Parameters widget Pointer to widget Return Values GX SUCCESS 0x00 Successful widget delete GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 Widget not valid Allowed From Initialization an
214. et GX VALUE gx slider info needle hotspot offset minimum reported value maximum reported value current value value delta needle travel limit needle travel limit current need position needle width in pixels needle height in pixels needle drawing position needle hotspot offset style Style of slider Appendix D contains pre defined general styles for all widgets as well as widget specific styles slider id Application defined ID of slider size Dimensions of slider Return Values GX SUCCESS GX CALLER ERROR GUIX User Guide 0x00 Successful slider create 0x11 Invalid caller of this function 272 ERROR 0x07 Invalid pointer GX ALREADY CREATED 0x13 Widget already created INVALID WIDGET SIZE 0x14 Invalid widget control block size GX INVALID WIDGET 0x12 Widget not valid GX INVALID STYLE 0x18 Invalid style GX INVALID SIZE 0x19 Invalid size Allowed From Initialization and threads Example Create slider slider GX SLIDER INFO info info gx slider info min val 0 info gx slider info max val 100 info gx slider_ info_current_val 50 info gx slider info increment 1 info gx slider info min travel 20 info gx slider info max travel 20 info gx slider info needle pos 0 info gx slider_info_needle_width 10 info gx slider_info_needle_height 10 info gx slider_info_needle_
215. et gx widget style remove gx widget style set gx widget width get GUIX User Guide 373 gx widget border style set Set widget border style Prototype UINT gx widget border style set GX WIDGET widget ULONG style Description This service sets the widget border style Parameters widget Pointer to widget style Style of border Appendix D contains pre defined general styles for all widgets as well as widget specific styles Return Values GX SUCCESS 0x00 Successful widget border style set GX CALLER ERROR Invalid caller of this function GX PTR ERROR Invalid pointer GX INVALID WIDGET 0x12 _ Widget not valid GX INVALID STYLE Invalid style Allowed From Initialization and threads GUIX User Guide 374 Set border style of my widget status gx widget border style set amp my widget GX STYLE BORDER RAISED If status is SUCCESS the widget my widget border style has been set See Also gx widget attach gx widget back move gx widget background set gx widget border draw gx widget border width get gx widget canvas get gx widget child detect gx widget children draw gx widget client get gx widget create gx widget created test gx widget delete gx widget detach gx widget draw gx widget draw set gx widget event generate gx widget event process gx widget event process set gx widget event to parent gx widget find gx
216. et my widget status gx system claim focus amp my widget If status is GX SUCCESS the focus has been claimed for widget See Also gx system dirty partial add gx system draw context get system event send gx system focus claim gx system initialize gx system start gx system string get gx system string table get gx system string table set gx system string width get gx system timer start gx system timer stop gx system widget find GUIX User Guide 305 gx system initialize Prototype UINT gx system initialize VOID Description Initialize GUIX This service initializes GUIX This service must be invoked before any other GUIX service and should only be invoked once at system startup Parameters None Return Values GX SUCCESS GX CALLER ERROR 0x00 0x11 Allowed From Initialization and threads Example Initialize GUIX status gx_system_initialize If status is GX SUCCESS GUIX has been initialized See Also Successful system initialize Invalid caller of this function 9x system dirty partial add gx system draw context get gx system event send gx system focus claim gx system initialize system start gx system string get gx system string table get gx system string table set gx system string width get system timer start gx system timer stop gx system widget find GUIX User
217. eturn Values GX SUCCESS 0x00 Successful positioned the children for the horizontal list GX CALLER ERROR 0x11 X Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer Allowed From Initialization and threads Example Position children in the horizontal list status gx horizontal list children position amp horizontal list If status is SUCCESS the children in the horizontal list are positioned See Also gx horizontal list create gx horizontal list event process gx horizontal list page index set gx horizontal list selected index get gx horinzontal list selected widget get gx horizontal list selected set gx horizontal list total columns set GUIX User Guide 155 gx horizontal list create Create horizontal list Prototype UINT gx horizontal list create GX HORIZONTAL LIST horizontal list GX CONST GX CHAR name GX WIDGET parent INT total columns VOID callback HORIZONTAL LIST WIDGET INT ULONG style USHORT horizontal list id GX CONST GX RECTANGLE size Description This service creates a horizontal list Parameters horizontal list name parent total columns callback style horizontal list id size Return Values Horizontal list widget control block Name of horizontal list Pointer to parent widget Total number of comumns in horizontal list This is a pointer to a callback function provided by the appl
218. ety The GUIX API is available from the GUIX thread context as well as other application threads Application threads can interact with the GUIX thread by sending and receiving events by access to shared variables and through use of the GUIX API functions GUIX uses an internal ThreadX mutex for multi thread resource protection In addition GUIX prevents the internal structure of visible widgets from being modified once a screen refresh operation has begun APIs which would modify the tree of visible objects are blocked while drawing operations are in progress and released once the screen refresh is complete Periodic Processing GUIX provides the application with periodic timers which are often used for periodic update of data displayed in GUIX windows This is accomplished via a ThreadX periodic timer which is also used to perform GUIX system level effects like screen fade in out etc The application can create timers and utilize the same timer facility that is used internally by GUIX Of course the application can also directly create and use ThreadX timers if required The advantage of the GUIX timers is that they are very easy to use and are pre configured to work within the GUIX event driven processing system To create and start a GUIX timer the application should invoke the function 9x system timer start The parameters to this function include a pointer to the calling widget the timer id allowing one widget to start many timers
219. f GUIX is determined by the development tools e g the compiler linker and locator Dynamic memory or run time memory usage is under direct control of the application Static Memory Usage Most of the development tools divide the application program image into five basic areas instruction constant initialized data uninitialized data and the GUIX thread stack Figure X on page X shows an example of these memory areas It is important to understand that this only an example The actual static memory layout is specific to the processor development tools underlying hardware and the application itself The instruction area contains all of the program s processor instructions This area is often located in ROM GUIX User Guide 21 The constant area contains various compiled constants which in GUIX contains default settings and all application resources images strings fonts and colors In addition this area contains the initial copy of the initialized data area During the compiler s initialization process this portion of the constant area is used to set up the global initialized data in RAM The constant area is typically the largest and usually follows the instruction area and is often located in ROM GUIX pixelmaps and fonts typically require large amounts of constant data storage These large static data areas are normally kept in ROM or FLASH The GUIX thread stack is defined within the uninitialized data area as a glob
220. f an event of the same type exists the event payload is updated to match the new event If no matching event is found the gx system event send function is called to add the new event to the end of the event queue This function is commonly used by fast touch input drivers to prevent filling the event queue with multiple DRAG events This function can also be called by the application to prevent multiple events of the same type from being added to the GUIX event queue Parameters event Pointer to event Return Values GX SUCCESS 0x00 Successful event send GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer Allowed From Initialization and threads Example Send event for processing status gx system event fold amp my event If status is SUCCESS the event has been sent for processing See Also gx system dirty partial add gx system draw context get system event send gx system focus claim gx system initialize gx system start gx system string get gx system string table get gx system string table set gx system string width get system timer start gx system timer stop gx system widget find GUIX User Guide 303 gx system event send Prototype UINT Description Send event gx system event send GX EVENT event This service sends the specified event into the GUIX system event
221. fill color set The organization of visible widgets is maintained in a parent child manner using tree structured lists linking child widgets to their parents The children inherit characteristics from their parents such as the views into which they can draw and the canvas on which they draw Child widgets may have their own child widgets again inheriting various characteristics from the parent The characteristics of any widget may be explicitly redefined via various GUIX API calls Widget Creation A widget object can be created during initialization or anytime during the execution of application threads There is no limit on the number of widget objects that can be created by an application There is also no limit on the number of children any widget may have within the memory limits of your target hardware Each widget type has its own create function such as gx button create or 9 prompt create The first three parameters to these functions are always the same namely a pointer to the widget control structure a string pointer to the widget name and a pointer to the widget s parent Each create function may have any number of additional parameters depending on the requirements of that particular widget type Widget Control Block The characteristics of each widget object are found in its control block GX WIDGET and are defined in gx api h The memory required for a widget object is provided by the application and can be located anywhere
222. fine amp size 0 0 639 479 status gx window root create amp my root main root window main canvas GX STYLE NONE 0 amp size If status is SUCCESS the root window contains the root window for window my window See Also 9 window canvas set gx window client height get gx window client scroll 9 window client width get gx window create gx window draw 9 window event process gx window root delete 9 window root event process gx window root find 9 window scroll info get gx window scrollbar find gx window wallpaper get gx window wallpaper set GUIX User Guide 443 gx window root delete Destroy a root window Prototype UINT gx window root delete GX WINDOW ROOT root window Description This service deletes a root window Parameters root window Pointer to root window control block Return Values GX SUCCESS 0x00 Successful root window find GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer Allowed From Initialization and threads Example Delete a root window status gx window root delete amp root window If status is SUCCESS the root window is destroyed See Also gx window canvas set gx window client height get gx window client scroll gx window client width get gx window create gx window draw gx window event process gx window root create
223. focus was moved GX FAILURE 0x00 focus was not moved Allowed From Initialization and threads Example Get font for MY FONT ID status gx widget focus next widget If status is GX SUCCESS the focus has been moved to the next widget in the navigation order See Also gx widget focus previous GUIX User Guide 406 gx widget focus previous Move focus to previous widget in navigation order Prototype UINT gx widget focus previous WIDGET widget Description This service moves focus to the previous widget in the navigation order Parameters widget Pointer to widget that current has input focus Return Values GX SUCCESS 0x00 focus was moved GX FAILURE 0x00 focus was not moved Allowed From Initialization and threads Example Get font for MY FONT ID status gx widget focus previous widget If status is SUCCESS the input focus has been moved to the previous widget See Also gx widget focus next GUIX User Guide 407 gx widget font get Get font Prototype UINT gx widget font get GX WIDGETG widget GX RESOURCE ID resource id GX FONT return font Description This service retrieves the font associated with the specified resource ID from the font table of the display on which this widget is visible This function should only be called by a visible widget Parameters widget Pointer to widget control block resource id Resource ID of
224. font return font Pointer to destination for font pointer Return Values GX SUCCESS 0x00 Successful font get GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 Invalid pointer GX INVALID RESOURCE ID 0x22 Invalid resource ID Allowed From Initialization and threads Example Get font for MY FONT ID status gx widget font get widget MY FONT RESOURCE amp my font If status is SUCCESS the font pointer has been retrieved in my font See Also gx widget color get gx widget pixelmap get GUIX User Guide 408 gx widget front move Prototype UINT gx widget front move GX WIDGET widget GX BOOL return moved Description Move widget to front This service moves the widget to the front in the parent Z order list of child widgets Parameters widget Pointer to widget to move return moved Pointer to destination for indication widget was moved Return Values GX SUCCESS 0x00 GX PTR ERROR 0x07 GX NO CHANGE 0x08 CALLER ERROR 0x11 INVALID WIDGET 0x12 Allowed From Initialization and threads GUIX User Guide Successful widget move to front Invalid pointer No changes applied Invalid caller of this function Widget not valid 409 Move widget widget to the front status gx widget front move amp my widget amp widget moved If status is SUCCESS and widget moved is TRUE the w
225. get find GUIX User Guide 320 gx system version string get Retrieve GUIX library version string Prototype UINT gx system version string get GX CHAR version Description This service retrieves the GUIX library version string Parameters version Pointer to return string value Return Values GX SUCCESS 0x00 Successful Allowed From Initialization and threads Example GX CHAR version get the library version string status gx system verrsion string get amp version See Also gx system dirty partial add gx system draw context get gx system event send gx system focus claim gx system initialize gx system start gx system string get gx system string table get gx system string table set gx system string width get system timer start gx system timer stop gx system widget find GUIX User Guide 321 gx system widget find Find widget Prototype UINT gx system widget find USHORT widget id INT search level GX WIDGET return search result Description This service searches for the specified widget ID Unlike 9x widget find this function searches the children all root windows defined in the system meaning this is an exhaustive search of all visible widgets If you know the parent of the widget you are searching for use gx widget find instead Parameters widget id Widget ID to search for search level Defines the recursive nesting level
226. gle line text input end gx single line text input home gx single line text input left arrow single line text input right arrow gx single line text input style add gx single line text input style remove gx single line text input style set GUIX User Guide 265 gx multi line text input create gx multi line text view create gx multi line text view event process gx multi line text view scroll GUIX User Guide 266 gx single line text input right arrow Move input cursor one character to the right Prototype UINT gx single line text input right arrow GX SINGLE LINE TEXT INPUT text input Description This service moves the text input cursor one character position to the right Parameters text input Single line text input widget control block Return Values GX SUCCESS 0x00 Successful GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 Invalid pointer Allowed From Initialization and threads Example move cursor to the right status gx single line text input right arrow amp my text input If status is SUCCESS the text input cursor has been moved See Also gx single line text input backspace gx single line text input buffer clear single line text input buffer get gx single line text input create gx single line text input character delete gx single line text input character insert gx s
227. gx canvas drawing inititate then calling the desired drawing functions then calling gx canvas drawing complete Parameters canvas Pointer to canvas control block who Pointer to widget control block of the caller This parameter is used to initialize the drawing clipping and view parameters for subsequent drawing operations dirty area Area to draw within This parameter is passed by the caller to indicate the area to which the caller wants all drawing operations clipped This is usually the area previously marked as dirty but the caller is free to expand or contract the clipping area Return Values GX SUCCESS 0x00 Successful drawing initiation GX CALLER ERROR Invalid caller of this function GX PTR ERROR 0x07 Invalid pointer GX INVALID CANVAS 0x20 Invalid canvas GX INVALID WIDGET Widget not valid Allowed From GUIX User Guide 86 Initialization and threads GUIX User Guide 87 Initiate drawing on canvas status gx canvas drawing initiate amp my canvas amp my widget amp my widget gx widget size If status is GX SUCCESS the canvas drawing was successfully initiated See Also gx canvas alpha set gx canvas create gx canvas drawing complete gx canvas offset set gx canvas shift GUIX User Guide 88 gx canvas ellipse draw Draw ellipse Prototype UINT gx canvas ellipse draw INT xcenter INT ycenter INT a INT b Descripti
228. h of current context gx context brush style set Set brush style of current context gx context brush width set Set brush width of current ontext gx context color get Resolve a color ID to color value gx context fill color set Set fill color of current context gx context font get Resolve a font ID to font pointer value gx context font set Set font of current context gx context line color set Set line color of current context gx context pixelmap get Resolve a pixelmap ID to pixelmap pointer value gx context pixelmap set Assign brush pixelmap used for area fills gx context raw brush define Define raw brush of current context gx context raw fill color set Set raw fill color of current context gx context raw line color set Set raw line color of current context gx display color set Replace one color value in display color table gx display color table set Assign the color table used by a display gx display create Create display gx display delete Delete display gx display font table set Assign the font table used by a display gx display pixelmap table set Assign the pixelmap table used by a display gx drop list close Close drop list gx drop list create Create drop list gx drop list open Open drop list gx drop list pixelmap set Set pixelmap to drop l
229. he GUIX resource using the suitable underlying RTOS service If you never utilize any GUIX services outside of the GUIX thread you can define this macro to do nothing GX SYSTEM TIME GET This macro should call a function that returns the current system time is system ticks which is usually the number of low level timer interrupts that have occurred since system startup This service is used to calculate touch event pen speed for touch input gestures The signature of the function invoked by this macro must be ULONG function name VOID GX CURRENT THREAD This macro is invoked to identify the currently executing thread The service called by this macro must return a void meaning that the data type used by your operating system to identify the current execution thread must be cast to a void to be returned to GUX A complete example of a generic RTOS binding is implemented in the filed system rtos bind h and gx system rtos bind c GUIX User Guide 472 Appendix GUIX Font Structure GUIX fonts are normally produced by the GUIX Studio application and font glyphs are rendered by the GUIX display driver The application software need only specify the font and colors that each text display widget should use The GUIX font data structures are documented here for completeness and to enable developers to create their own methods for generating or converting other fonts into the GUIX font format Each GUIX font starts with a
230. he brush style of the current screen context Parameters style Brush style of current context Appendix D contains pre defined general styles for all widgets as well as widget specific styles Return Values GX SUCCESS 0x00 Successful context brush style set GX CALLER ERROR Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID CONTEXT active drawing context GX INVALID STYLE Invalid style Allowed From Initialization and threads Example Set the brush style of the current context status gx context brush style set GX STYLE BORDER NONE If status is SUCCESS the brush style of the current context has been set See Also gx context brush default gx context brush define gx context brush get gx context brush set gx context brush pattern set gx context brush width set gx context fill color set gx context font set gx context line color set gx context pixelmap set gx context raw brush define gx context raw fill color set gx context raw line color set GUIX User Guide 124 gx context brush width set Set brush width of current drawing context Prototype UINT gx context brush width set UINT width Description This service sets the width of the active brush in the current drawing context Parameters width Brush width in pixels of current context Return Values GX SUCCESS 0x00 Successful context brush width set GX
231. hese resource types are specific to each display color format and color depth While you can manually create your application string table most often the system string table is defined by the GUIX Studio application as part of your project resource file The available languages are also defined in the resource header file The system string table is a multi column table of pointers to UTF8 encoded application strings Each column of the string table represents one language supported by the application If your application supports only one language for example English then your string table will have only one column Still you can add support for additional languages at any time without modifying your application software GUIX optionally supports UTF8 format string encoding Support for UTF8 string encoding is enabled by defining the value GX UTF8 SUPPORT in the gx user h header file If this definition is not enabled GUIX will internally use only standard 8 bit ASCII plus Latin 1 code page character encoding UTF8 string encoding has the following traits e ASCII strings take no more storage space than standard 7 bit ASCII encoding e Most ANSI C string functions work with UTF8 string encoding without modification All active character sets in the world including Kanji character sets can be represented using UTF8 string encoding The active string table is assigned by calling the gx_system_string_table_set API function This funct
232. hical overlays and multiple canvases the managed canvases are each allocated their own memory areas which are distinct from the hardware frame buffer memory These managed canvases are rendered into the visible frame buffer during the frame buffer refresh or toggle operation For architectures other than the simplest single canvas single frame buffer organization the size of a canvas is determined by the application and may be different than the fixed size of a frame buffer It may also be at an offset selected by the application Other information such as Z order is maintained within the canvas When the canvas drawing is complete the contents of the canvas are transferred to the physical display by the display driver In some systems that don t have enough memory for a separate canvas and frame buffer memory areas the canvas update is actually made directly to the physical display via the display driver Canvas Creation A canvas object can be created during initialization or anytime during the execution of application threads There is no limit on the number of canvas objects that can be created by an application Most applications however will create only one canvas object for all GUIX drawing Canvas Control Block The characteristics of each canvas object are found in its control block GX CANVAS and is defined in gx api h The memory required for a canvas object is provided by the application and can be located anywhere in memory Howe
233. hreads GUIX User Guide 242 Create scroll thumb scroll thumb status gx scroll thumb create amp my scroll thumb scroll thumb scrolloarGX STYLE NONE If status is SUCCESS the scroll thumb scroll thumb has been created See Also gx scroll thumb draw gx scroll thumb event process GUIX User Guide 243 gx scroll thumb draw Draw scroll thumb Prototype UINT gx scroll thumb draw GX SCROLL THUMB scroll thumb Description This service draws a scroll thumbwheel Parameters scroll thumb Scroll thumb widget control block Return Values GX SUCCESS 0x00 Successful scroll thumb draw GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 _ Widget not valid Allowed From Initialization and threads Example Draw scroll thumb scroll thumb status gx scroll thumb draw amp my scroll thumb If status is SUCCESS the scroll thumb my scroll thumb has been drawn See Also gx scroll thumb create gx scroll thumb event process GUIX User Guide 244 gx scroll thumb event process Process scroll thumb event Prototype UINT gx scroll thumb event process GX SCROLL THUMB scroll thumb GX EVENT event Description This service handles events sent to a scrollbar thumbwheel This service is normally used internally by GUIX but is made public
234. ialization and threads Example Send my event to the widget s parent status gx widget event to parent amp my widget my event If status is GX SUCCESS the event has been delivered to the parent of widget See Also gx widget attach gx widget back move gx widget background set gx widget border draw gx widget border style set gx widget border width get gx widget canvas get gx widget child detect gx widget children draw gx widget client get gx widget created gx widget created test gx widget delete gx widget detach gx widget draw gx widget draw set gx widget event generate gx widget event process gx widget event to parent gx widget find gx widget front move gx widget height get gx widget hide gx widget resize gx widget shift gx widget show gx widget status add gx widget status get gx widget status remove gx widget status test gx widget style add gx widget style get gx widget style remove gx widget style set gx widget width get GUIX User Guide 401 gx widget fill color set Set widget background color Prototype UINT gx widget fill color set GX WIDGET widget GX RESOURCE ID normal color id GX RESOURCE ID selected color id Description This service sets the widget background colors Parameters widget Pointer to widget normal color id Resource ID of the normal color Appendix B contains pre defined color
235. ically you would create at least one canvas for each physical display supported by your system All GUIX drawing takes place on a canvas In simpler or memory constrained systems there will likely be only one canvas which might be directly linked to the visible frame buffer whereas systems with more memory and more advanced graphics requirements might require multiple canvases Making multiple canvases available for one display enables features such as screen and window fade in and fade out effects Canvases can be one of two main types simple or managed A simple canvas is an off screen drawing area used by the application GUIX does nothing directly with a simple canvas but the application can use a simple canvas to render complex drawing to an off screen buffer and then use this off screen buffer to refresh the visible canvas when needed A managed canvas is automatically displayed within the hardware frame buffer by GUIX A managed canvas is included in building a composite canvas for those systems with enough memory to support multiple managed canvases Managed canvases have a Z order maintained by GUIX and view clipping is enforced on all managed canvases GUIX User Guide 26 canvas differs from a frame buffer in that it is more generic In memory constrained systems there may be only one canvas and the memory for this canvas might be the visible frame buffer memory However for more complex systems supporting more advanced grap
236. ication The callback function is invoked when the horizontal list is scrolled to create the newly visible list items In this way the horizontal list can display any user defined widget type as the list items Style of scrollbar widget Appendix D contains pre defined general styles for all widgets as well as widget specific styles Application defined ID of horizontal list Dimensions of the horitzonal list GX SUCCESS 0x00 Successfully created the horizontal list GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX ALREADY CREATED 0x13 Widget already created GUIX User Guide 156 INVALID WIDGET 0x14 GX INVALID VALUE 0x22 Allowed From Initialization and threads Example Create horizontal list list with 5 columns Invalid widget control block size Number of columns not valid status gx horizontal list create amp my list list amp my parent 5 callback STYLE WRAP MY LIST 10 amp size If status is SUCCESS the horizontal list list has been created See Also gx horizontal list children position gx horizontal list event process gx horizontal list page index set gx horizontal list selected index get gx horinzontal list selected widget get gx horizontal list selected set gx horizontal list total columns set GUIX User Guide 157 gx horizontal list event process Process horizontal lis
237. ice assigns the pixelmaps to be displayed by the specified checkbox for each checkbox state The resource IDs can be duplicated Parameters checkbox unchecked id checked id unchecked disabled id checked disabled id Return Values GX SUCCESS GX CALLER ERROR GX PTR ERROR Allowed From Initialization and threads GUIX User Guide Pointer to checkbox control block Pixelmap used for unchecked state Pixelmap used for checked state Pixelmap used for a disabled and unchecked checkbox Pixelmap used for a disabled and checked checkbox 0x00 Successful checkbox select 0x11 Invalid caller of this function X 0x07 X Invalid pointer GX INVALID RESOURCE ID 0x12 Resource ID not valid 108 Select checkbox status gx checkbox pixelmap set amp my checkbox PIXELMAP UNCHECKED 10 PIXELMAP CHECKED 10 PIXELMAP UNCHECKED DISABLED 10 PIXELMAP CHECKED SIABLED 10 If status is SUCCESS the pixelmaps are assigned to the checkbox checkbox See Also gx checkbox create gx checkbox draw gx checkbox event process GUIX User Guide 109 gx checkbox select Select checkbox Prototype UINT gx checkbox select GX CHECKBOX checkbox Description This service forces a checkbox to the selected state Parameters checkbox Pointer to checkbox control block Return Values GX SUCCESS Successful checkbox select GX CALLER ERROR 0x11 X Invalid caller of this function GX P
238. ice draws a text input widget This service is normally called internally during canvas refresh but can also be called from custom text input drawing functions Parameters text input Single line text input widget control block Return Values GX SUCCESS 0x00 Successful single line text input create GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 Invalid pointer Allowed From Initialization and threads Example invoke backspace handler status gx single line text input draw amp my text input If status is SUCCESS the text input widget was drawnr See Also gx single line text input backspace gx single line text input buffer clear gx single line text input buffer get gx single line text input create gx single line text input character delete gx single line text input character insert gx single line text input end gx single line text input event process gx single line text input home gx single line text input left arrow gx single line text input position get gx single line text input right arrow gx single line text input style add gx single line text input style remove single line text input style set gx multi line text input create gx multi line text view create gx multi line text view event process gx multi line text view scroll GUIX User Guide 259 gx single line text input end Move the text input cu
239. ide 65 gx animation stop Prototype Stop an active animation UINT gx animation stop GX ANIMATION animation Description Stop a previously started animation Parameters animation Return Values GX SUCCESS GX PTR ERROR GX INVALID STATUS Allowed From Initialization and threads Example GX ANIMATION animation 9x animation stop amp animation Pointer to animation control block 0x00 0x07 0x26 If status is SUCCESS the animation is stopped See Also Successful Invalid pointer Invalid controller status gx_animation_canvas_define gx_animation_create gx_animation_start GUIX User Guide 66 gx brush default Set the default brush Prototype UINT gx brush default GX BRUSH brush Description This service sets the brush for the current context to the system default value Parameters brush Pointer to brush control block Return Values GX SUCCESS 0x00 Successful brush definition GX CALLER ERROR 0x11 X Invalid caller of this function GX PTR ERROR 0x07 Invalid brush pointer Allowed From Initialization and threads Example Reset the brush to its default value status gx brush default amp my brush If status is SUCCESS the brush was successfully reset to its default value See Also gx brush define GUIX User Guide 67 gx brush define Prototype UINT Description Define brush gx brush define GX BRUSH brush GX COLOR line
240. ide gx widget resize gx widget shift gx widget show gx widget status add gx widget status get gx widget status remove gx widget status test gx widget style add gx widget style get gx widget style remove gx widget style set gx widget width get GUIX User Guide 369 gx widget block move Move a rectangular block of pixels Prototype UINT gx widget block move GX WIDGET widget GX RECTANGLE block INT xshift INT yshift Description This service moves a rectangular block of pixels This service is most often used to implement fast scrolling Parameters widget Pointer to widget requesting block move block Rectangle bounding block to move xshift The x shift amount in pixels yshift The y shift amount in pixels Return Values GX SUCCESS 0x00 Successful widget move to the back GX_CALLER_ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 Widget not valid Allowed From Initialization and threads Example Move block of pixels 20 pixels to the right status gx widget block move amp my widget amp size 20 0 If status is SUCCESS the block of pixels was moved See Also gx widget attach gx widget background set gx widget border draw gx widget border style set gx widget border width get gx widget canvas get gx widget child detect gx widget children draw gx widget client get gx widget creat
241. ider needle draw gx slider needle position get gx slider needle position get gx slider tickmarks draw gx slider travel get gx slider value calculate gx slider value set GUIX User Guide 275 gx slider info set Prototype Set slider information block UINT gx slider info set GX SLIDER slider GX SLIDER INFO info Description This service assigns the specified slider information such as slider minimum slider maximum and slider current value to the incidated slider The slider will update the needle position and redraw based on the new slider information Parameters slider info Slider widget control block Pointer to the slider information structure The slider information structure contains the following parameters INT gx slider info min value INT gx slider info max value INT gx slider info INT gx slider info GX VALUE GX VALUE GX VALUE GX VALUE GX VALUE GX VALUE GX VALUE gx gx gx gx gx gx gx minimum reported value maximum reported value current value current value increment value delta Slider info min travel needle travel limit slider info max travel needle travel limit Slider info needle pos current need position Slider info needle width needle width in pixels Slider info needle height needle height in pixels Slider info needle inset needle drawing position slider info needle hotspot offset needle hotspot offset Return Values
242. ider pixelmap set Set pixelmap in pixelmap slider gx progress bar create Create progress bar gx progress bar draw Draw a progress bar gx progress bar event process Progress bar event processing gx progress bar font set Set progress bar font gx progress bar info set Set progress bar range and value gx progress bar pixelmap set Assign progress bar pixelmap gx progress bar range set Set progress bar range gx progress bar text color set Assign progress bar text color gx progress bar value set Assign progress bar value gx prompt create Create prompt gx prompt draw Draw prompt GUIX User Guide 55 gx prompt font set Set prompt font gx prompt text color set Set prompt text color gx prompt text get Get prompt text gx prompt text id set Set prompt with system text string gx prompt text set Set prompt text gx radio button create Create radio button gx radio button draw Draw radio button gx radio button pixelmap set Set pixelmap in radio button gx scroll thumb create Create scroll thumb gx scroll thumb draw Draw scroll thumb gx scroll thumb event process Process scroll thumb event gx scrollbar draw Draw scrollbar gx scrollbar event process Process scrollbar event gx scrollbar limit check Check scrollbar limit gx scrol
243. idget widget was moved to the front See Also widget attach gx widget back move gx widget background set gx widget border draw gx widget border style set gx widget border width get gx widget canvas get gx widget child detect gx widget children draw gx widget client get gx widget created gx widget created test gx widget delete gx widget detach gx widget draw gx widget draw set gx widget event generate gx widget event process gx widget event process set gx widget event to parent gx widget find gx widget height get gx widget hide gx widget resize gx widget shift gx widget show gx widget status add gx widget status get gx widget status remove gx widget status test gx widget style add gx widget style get gx widget style remove gx widget style set gx widget width get GUIX User Guide 410 gx widget height get Get widget height Prototype UINT gx widget height get GX WIDGET widget UINT return height Description This service gets the widget height Parameters widget Pointer to widget return height Pointer to destination for widget height Return Values GX SUCCESS 0x00 Successful widget height get GX_CALLER_ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 X Widget not valid Allowed From Initialization and threads Example Get height for widget my widget
244. idget has been started See Also gx system dirty partial add gx system draw context get system event send gx system focus claim gx system initialize gx system start gx system string get gx system string table get gx system string table set gx system string width get gx system timer start gx system timer stop gx system widget find GUIX User Guide 319 gx system timer stop Stop timer Prototype UINT gx system timer stop GW WIDGET owner UINT timer id Description This service stops the timer for the specified widget Parameters owner Pointer to widget control block timer id ID of timer Return Values GX SUCCESS Successful timer stop GX NOT FOUND Timer ID not found GX CALLER ERROR 0x11 X Invalid caller of this function GX PTR ERROR Invalid pointer GX INVALID WIDGET Widget not valid Allowed From Initialization and threads Example Stop the periodic timer for the widget widget status gx system timer stop amp my widget MY TIMER ID If status SUCCESS the timer for my widget has been stopped See Also system dirty partial add gx system draw context get system event send gx system focus claim gx system initialize gx system start gx system string get gx system string table get gx system string table set gx system string width get system timer start gx system timer stop gx system wid
245. idget already created Allowed From Initialization and threads Example Create single line text input widget my text input static GX CHAR input string 20 GX RECTANGLE size 9x utility rectangle define amp size 10 10 110 40 GUIX User Guide 257 status gx single line text input create amp my text input text input NULL input string 20 GX STYLE BORDER RECESSED 0 amp size If status is SUCCESS the text input widget has processed backspace input character See Also 9x single line text input backspace gx single line text input buffer clear gx single line text input buffer get gx single line text input character delete gx single line text input draw gx single line text input end gx single line text input event process gx single line text input home gx single line text input left arrow gx single line text input position get gx single line text input right arrow gx single line text input style add gx single line text input style remove gx single line text input style set gx multi line text input create gx multi line text view create 9 multi line text view event process gx multi line text view scroll GUIX User Guide 258 gx single line text input draw Draw a text input widget Prototype UINT gx single line text input draw GX SINGLE LINE TEXT INPUT text input Description This serv
246. idget back move Move widget to back Prototype UINT gx widget back move GX WIDGET widget GX BOOL return widget moved Description This service moves the widget to the back in the parent s Z order of child widgets Parameters parent Pointer to parent widget return widget moved Pointer to destination for flag indicating the widget was moved Return Values GX SUCCESS 0x00 Successful widget move to the back GX_PTR_ERROR 0x07 X Invalid pointer GX CALLER ERROR 0x11 Invalid caller of this function GX NO CHANGE 0x08 changes are applied GX INVALID WIDGET 0x12 Widget not valid Allowed From Initialization and threads Example Move widget to the back status gx widget back move amp my widget amp moved flag If status is SUCCESS and moved is TRUE the widget widget was moved to the back See Also gx widget attach gx widget background set gx widget border draw gx widget border style set gx widget border width get gx widget canvas get gx widget child detect gx widget children draw gx widget client get gx widget create gx widget created test widget delete gx widget detach gx widget draw gx widget draw set gx widget event generate gx widget event process gx widget event process set gx widget event to parent gx widget find GUIX User Guide 368 gx widget front move gx widget height get gx widget h
247. idget children draw gx widget client get gx widget created gx widget created test gx widget delete gx widget detach gx widget draw gx widget draw set gx widget event generate gx widget event process gx widget event process set gx widget event to parent gx widget find gx widget front move gx widget height get gx widget hide gx widget resize gx widget shift gx widget show gx widget status add gx widget status get gx widget status remove gx widget status test gx widget style get gx widget style remove gx widget style set gx widget width get GUIX User Guide 427 gx widget style get Get widget style Prototype UINT gx widget style get GX WIDGET widget ULONG return style Description This service retrieves style flag from the widget Parameters widget Pointer to widget return style Pointer to the style being returned Return Values GX SUCCESS 0x00 Successful widget style add GX_CALLER_ERROR 0x11 Invalid caller of this function GX_PTR_ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 Widget not valid Allowed From Initialization and threads GUIX User Guide 428 Retrieve style from widget into style status gx widget style get amp my widget amp style If status is SUCCESS the style flag from widget is saved in style See Also gx widget attach gx widget back move gx widget background set
248. idget status add gx widget status get GUIX User Guide 361 gx widget status remove gx widget status test gx widget style add gx widget style get gx widget style remove gx widget style set gx widget width get GUIX User Guide 362 gx widget attach Attach widget to its parent Prototype UINT gx widget attach GX WIDGET parent GX WIDGET widget Description This service attaches the widget to the specified parent If the widget is already attached to another parent it is first detached If the widget is already attached to the same parent the function does nothing The widget becomes the front most child of its parent in terms of z ordering If sibling widgets overlap this widget is drawn on top of siblings To put the new widget in the back of the z order use widget back attach or gx widget back move Parameters parent Pointer to parent widget widget Pointer to child widget Return Values GX SUCCESS 0x00 Successful widget attach GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 Parent or widget not valid Allowed From Initialization and threads Example Attach widget to parent status gx widget attach amp my parent amp my widget If status is SUCCESS the widget my widget is attached to parent See Also gx widget attach gx widget back move
249. il in the following sub sections RTOS Binding The GUIX system component is by default configured to utilize the ThreadX real time operating system for services such as thread services event queue services and timer services GUIX can easily be ported to other operating systems by using the pre processor directive GX DISABLE THREADX BINDING and re building the GUIX library This removes the ThreadX dependencies from the GUIX source code and allows the application developer to implement the required operating system services using whatever RTOS is proviced by the target system Appendix F GUIX RTOS Binding Services describes the services that need to be implemented to port GUIX to an operating system other than the ThreadX operating system Initialization GUIX User Guide 23 GUIX initialization is accomplished by the application calling the service 9x system initialize which may be called by the application from the ThreadX ix application define routine initialization context or from application threads The 9x system initialize function initializes all global GUIX data structures and creates the GUIX system mutex event queue timer and thread Once gx system initialize returns the application can use GUIX String Table Management The GUIX string table and string resources are maintained by the GUIX system component The other GUIX resource types colors fonts and pixelmaps are maintained by the GUIX Display component since t
250. ility rectangle center find 9x utility rectangle combine 9x utility rectangle compare 9x utility rectangle define 9x utility rectangle grow 9x utility rectangle inside detect 9x utility rectangle overlap detect 9x utility rectangle point detect 9x utility rectangle shift GUIX User Guide 52 Chapter 4 Description of GUIX Services This chapter contains a description of all GUIX services listed below in alphabetic order In the Return Values section in the following descriptions values in BOLD are not affected by the GX DISABLE ERROR CHECKING define that is used to disable API error checking while non bold values are completely disabled GUIX Service Description gx animation canvas define Provide memory to an animation controller for a canvas to be used for subsequent animations gx animation create Create an animation controller gx animation delete Delete an animation controller gx animation start Initiate an animation sequence gx animation stop Suspend an animation sequence gx brush default Initialize current brush to defaults gx brush define Define brush gx button background draw Draw button background gx button create Create button gx button deselect Deselect button gx button draw Draw button gx button event process Process button event gx button select Select button gx canvas alpha set
251. imation sequence You pass this information structure to your animation controller to initiate an animation sequence using the gx animation start API service The GX ANIMATION INFO structure contains the following fields typedef struct GX ANIMATION INFO STRUCT GX WIDGET gx animation target GX_WIDGET gx animation parent GX UBYTE gx animation type GX UBYTE gx animation start alpha GX UBYTE gx animation end alpha GX UBYTE gx animation steps GX POINT gx animation start position GX POINT gx animation end position GX VALUE gx animation delay GX ANIMATION INFO The gx animation target member defines the target widget that the animation controller will act upon The gx animation parent member defines the parent widget if any to which the target widget will be attached when the animation sequence is complete The gx animation type member defines the type of animation to be performed Currently supported types include ANIMATION FADE GX ANIMATION FADE OUT GX ANIMATION SLIDE IN GX ANIMATION SLIDE OUT The gx animation start alpha field defines the starting canvas alpha value for fade type animations The gx animation end alpha field defines the ending canvas alpha value for fade type animations GUIX User Guide 51 The gx animation steps field defines how many steps the controller should execute between the start and end position or alpha value The gx animation start position defines th
252. imits Parameters scrollbar Scrollbar widget control block Return Values GX SUCCESS 0x00 Successful scrollbar limit check GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 Widget not valid Allowed From Initialization and threads Example Check scrollbar limit of scrollbar status gx scrollbar limit check amp my scrollbar If status is SUCCESS the limit of scrollbar scrollbar has been checked See Also gx horizontal scrollbar create gx scrollbar draw gx scrollbar event process gx scrollbar reset gx vertical scrollbar create GUIX User Guide 248 gx scrollbar reset Prototype Reset scrollbar UINT gx scrollbar reset GX SCROLLBAR scrollbar GX SCROLL INFO info Description This service resets the scrollbar Parameters scrollbar Scrollbar widget control block info Pointer to GX SCROLL INFO structure that defines the scrollbar limits current value and step or increment The GX SCROLL INFO structure has the following integer members GX VALUE gx scroll value current scroll position GX VALUE gx scroll minimum minimum reported position GX VALUE gx scroll maximum maximum reported position GX VALUE gx scroll visible parent window visible range VALUE gx scroll increment scrollbar minimum delta value Return Values GX SUCCESS GX CALLER ERROR GX PTR ERROR GX INVALID WIDGET GX INVALID VAL
253. ing Widget Defaults Scrollbar Appearance Skinning System Error Handling GUIX Canvas Component Canvas Creation Canvas Control Block Canvas Alpha Channel Color Depth Transitions GUIX Display Component Display Creation Display Control Block Installing Themes Drawing APIs Root Window Anti Aliasing Clipping Views Display Driver Interface GUIX Widget Component GUIX User Guide 11 GUIX User Guide Widget Creation Widget Control Block Hierarchy Types Styles Background Event Notification Event Processing Drawing Function GUIX Drawing Context Component Context Creation Context Brush Context Font Context Colors Context Pixelmaps GUIX Window Component Window Creation Window Control Block Root Window Background Scrolling Event Notification Event Processing Drawing Function GUIX Utility Component Working with Rectangles Defining a brush Converting numbers to strings 12 Execution Overview GUIX implements an event driven programming model This means that the GUIX framework is primarily driven by the receipt of events pushed into the GUIX event queue The processing of these events takes place in the context of the GUIX thread which is a ThreadX thread created during GUIX system initialization GUIX applications define the user interface by calling GUIX API functions to create windows and child widgets and customize the appearance of these widgets by calling additional API functions used to define co
254. ing included in this font page The gx font last glyph field defines the last Unicode character encoding included in this font page The gx font glyphs pointer points to an array of GLYPH structures This array must be equal in size to the number of characters contained on this font page i e gx font last glyph gx font first glyph 1 The gx font next page member is used for multiple page fonts Multiple page fonts are used for extended character sets and to optimize the size of the GLYPH structure arrays If all of the characters of the font are contained within one font page or if this is the last page of the font in question the gx font next page member is set to GX NULL As noted above the GX FONT structure above contains a pointer to an array GLYPHS structures There must be one GLYPH structure for each character on the font page The GLYPH structure is defined as typedef struct GX GLYPH STRUCT GX CONST GX UBYTE gx glyph map GX BYTE gx glyph ascent GX BYTE glyph descent GX BYTE glyph advance GX BYTE glyph leading GX UBYTE gx glyph width GX UBYTE gx glyph height GX GLYPH The gx glyph map pointer points to the glyph bitmap This pointer may be GX NULL for whitespace characters The bitmap data is encoded as 1 bpp 2 bpp 4 bpp or 8 bpp alpha values For 1 bit data a value of 1 indicates that the pixel should be written in the foreground color and a valu
255. ing by invoking the gx canvas drawing initiate function This function prepares a canvas for drawing When GUIX invokes the window and widget drawing functions as part of a deferred canvas refresh operation the target canvas is opened for drawing prior to calling the widget drawing function s Therefore the standard widget drawing functions are not required to open the target canvas this has been done for them In some cases the application may want to force immediate drawing to a canvas In this case the application can perform the following steps 1 Call the gx canvas drawing initiate function passing in the target canvas and rectangle within that canvas on which the application wants to draw 2 Call any number of canvas drawing APIs to accomplish the desired drawing 3 Call the gx canvas drawing complete API function to signal that drawing has been completed This flushes the canvas to the visible frame buffer and or triggers a buffer toggle operation depending on the system memory architecture Color Depth GUIX supports color depths up to 32 bpp as well as monochrome and grayscale The type of color depth support largely determined by the capabilities of the underlying physical display and also has an impact on how much memory is required for the canvas drawing area The following is a list of color depth support along with a brief description of the variations within that color depth
256. ingle line text input draw gx single line text input end gx single line text input home gx single line text input position get gx single line text input right arrow gx single line text input cursor flag set 9x single line text input cursor flag clear GUIX User Guide 267 gx single line text input style add Add styles Prototype UINT gx single line text input style add GX SINGLE LINE TEXT INPUT text input ULONG style Description This service adds styles to a single line text input widget Parameters text input Single line text input widget control block style New style to add Appendix D contains pre defined general styles for all widgets Return Values GX SUCCESS 0x00 Successful GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 Invalid pointer Allowed From Initialization and threads Example invoke backspace handler status gx single line text input style add amp my text input GX STYLE CURSOR SHOW If status is SUCCESS the text input style has been set See Also gx single line text input backspace gx single line text input buffer clear single line text input buffer get gx single line text input create gx single line text input character delete gx single line text input character insert gx single line text input draw gx single line text input end gx single line text input home gx single lin
257. inset 5 info gx slider_info_needle_hotspot_offset 5 status gx slider create amp my slider slider amp my parent 10 info GX STYLE ENABLED ID MY SLIDER amp size If status is SUCCESS the slider slider has been created See Also gx pixelmap slider create gx pixelmap slider draw gx pixelmap slider event process gx pixelmap slider pixelmap set gx slider draw gx slider event process gx slider needle draw gx slider needle position get gx slider needle position get gx slider tickmarks draw gx slider travel get gx slider value calculate gx slider value set GUIX User Guide 273 gx slider draw Draw slider Prototype UINT gx slider draw GX SLIDER slider Description This service draws a slider This service is used internally by the slider create function but is also exposed for use by the application in those instances when a custom slider drawing function is defined Parameters slider Slider widget control block Return Values GX SUCCESS Successful slider draw GX CALLER ERROR 0x11 X Invalid caller of this function GX PTR ERROR Invalid pointer GX INVALID WIDGET Widget not valid Allowed From Initialization and threads Example Draw slider slider status gx slider draw amp my slider If status is SUCCESS the slider my slider has been drawn See Also gx pixelmap slider create gx pi
258. ion is called automatically by the GUIX Studio generated startup code but can also be called directly by the application to change the active string table The active language is assigned by calling the gx_system_language_set API function This function determines which column of the system string table is active When this function is invoked aGX_EVENT_LANGUAGE_CHANGE event is sent to all visible GUIX widgets allowing them to update to display the newly active string data GUIX User Guide 24 Widgets and application software resolve statically defined strings using string ID values and the gx system string get API function This function returns the string associated with a given string ID and the currently active system language Thread Processing The internal GUIX thread created during initialization is responsible for most of the processing in GUIX The processing in this thread first completes any additional initialization required by the underlying display driver Once this is complete the GUIX thread enters a loop which first processes all events present in the GUIX event queue and then refreshes the screen if required The screen refresh executes the necessary GUIX drawing functions based on what is visible and has been marked as dirty meaning it needs to be redrawn When there are no events and nothing left to refresh on the display the GUIX thread will suspend waiting for the next GUIX event to arrive Multithread Saf
259. is a pointer to a function to implement generic anti aliased wide line drawing no anti aliasing Default implementations of this function are provided for each supported color depth and color format VOID gx display driver horizonal line draw GX DRAW CONTECT context INT x1 INT x2 INT y This is a pointer to a function to implement the special case of horizontal line drawing Default implementations of this function are provided for each supported color depth and color format VOID gx display driver vertical line draw GX DRAW CONTECT context INT y1 INT y2 INT x This is a pointer to a function to implement the special case of horizontal line drawing Default implementations of this function are provided for each supported color depth and color format VOID gx display driver horizonal pattern line draw GX DRAW CONTECT context INT x1 INT x2 INT y This is a pointer to a function to implement horizontal pattern line drawing Default implementations of this function are provided for each supported color depth and color format VOID gx display driver vertical pattern line draw GX DRAW CONTECT context INT y1 INT y2 INT x This is a pointer to a function to implement vertical pattern line drawing Default implementations of this function are provided for each supported color depth and color format GUIX User Guide 455 VOID gx display driver canvas copy struct GX CANVAS STRUCT source struct GX CANVAS STRUCT
260. is limit GUIX User Guide 165 can be use to prevent the thumb button from travelling to the very end of the scrollbar scroll thumb travel max An offset value in pixels 9x scroll fill pixelmap 9x scroll thumb pixelmap gx scroll up pixelmap 9x scroll down pixelmap 9x scroll fill color 9x scroll button color style GUIX User Guide between the scrollbar end position and the maximum limit to which the scrollbar thumb is allowed to travel optional pixelmap ID If this pixelmap ID is not zero the scrollbar uses this pixelmap to draw the scrollb ar background optional pixelmap ID If this pixelmap ID is not zero the scrollbar thumb button uses this pixelmap to draw itself optional pixelmap ID If this pixelmap ID is not zero the scrollbar end button uses this pixelmap ID to draw the scrollbar left end button optional pixelmap ID If this pixelmap ID is not zero the scrollbar end button used this pixelmap ID to draw the scrollbar right end button The fill color used to draw the background of the scrollbar widget The fill color used to draw the scrollbar thumbbutton and end buttons A 2 A 2 A 2 A Style of scrollbar widget Appendix D contains pre defined general styles for all widgets as well as widget specific styles 166 Return Values GX SUCCESS 0x00 Successful horizontal scrollbar create GX CALLER ERROR 0x11 Invalid caller of this function G
261. ist gx drop list popup set Set popup to drop list gx horizontal list children position Position children in horizontal list gx horizontal list create Create horizontal list gx horizontal list event process Process event in horizontal list gx horizontal list selected index get Get the selected item index gx horizontal list selected widget get Get the selected item widget gx horizontal list selected set Set the selected item gx horizontal list total columns set Change number of list columns after creation gx horizontal scrollbar create Create horizontal scrollbar gx icon button create Create icon button gx icon button draw Draw an icon button GUIX User Guide 54 gx icon button pixelmap set Set pixelmap in icon button gx icon create Create icon gx icon draw Draw icon gx icon event process Icon event processing function gx icon pixelmap set Set pixelmap for icon gx multi line text button create Create multi line text button gx multi line text button draw Draw multi line text button gx multi line text button event process Set font for multi line text button gx multi line text button text id set Set system string to text button gx multi line text button text set Set user defined string to text button gx multi line text input create Cr
262. itializes this structure to inform the scrollbar of the parent window total size viewable area and scrolling increment and limits The default implementation uses the windows client area as the viewable area and scrolls by pixels but customized window implementation can utilize the scroll parameters The GX SCROLL INFO structure has the following members return scroll info GX VALUE gx scroll value GX VALUE gx scroll mimimum GX VALUE gx scroll maximum GX VALUE gx scroll visible GX VALUE gx scroll increment Return Values GX SUCCESS 0x00 GX CALLER ERROR 0x11 GX PTR ERROR 0x07 GX INVALID WIDGET 0x12 GX INVALID TYPE 0x1B Allowed From GUIX User Guide current scroll value minimum scroll value maximum scroll value window visible area scroll delta value Successful window scroll info get Invalid caller of this function Invalid pointer Widget not valid Invalid type 447 Initialization and threads Example Get scroll information for window my window status gx window scroll info get amp my window SCROLLBAR HORIZONTAL amp scroll info If status is SUCCESS the scroll info contains the scroll information for window my window See Also 9 window canvas set gx window client height get gx window client scroll 9 window client width get gx window create gx window draw 9 window event process gx window root create gx window r
263. k since GUIX events can be automatic variables from the view of the event producer The signature of the function called by this macro must be GUIX User Guide 470 UINT function name GX EVENT ptr This function should return GX SUCCESS if the event is pushed into the event queue otherwise it should return GX FAILURE GX EVENT POP This macro is invoked to remove the head oldest event from the GUIX event queue and copy it into the requested location This function must be able to optionally block or wait for an event if no events are currently in the event queue The signature of the function invoked by this macro must be UINT function name GX EVENT put event GX BOOL wait If the wait parameter TRUE the function should not return until an event is provided If the wait parameter is GX FALSE the function should return immediately with or without an event If an event is retrieved from the queue it should copied into the put event location and the return status is GX SUCCESS Otherwise the return status should be GX FAILURE GX EVENT FOLD This macro is invoked by GUIX to fold an event into the FIFO event queue Folding an event means that if an event of the same type already exists in the queue that entry is update to contain the payload of the new event If an existing event of the same type is not found in the queue a new event is pushed into the queue For bindings that cannot implement the event f
264. lay hardware The GUIX display driver implements the lowest level drawing functions that actually change pixel color information in the canvas memory and transfer the canvas memory to the physical display frame buffer in double buffered systems GUIX Display drivers are defined by a structure containing the physcial display parameters and a set of function pointers to the low level driver functions By using these indirect function pointers the abstract canvas and widget drawing functions are made completely independent of the hardware details GUIX provides a default set of drawing functions for each supported color depth and color format When implementing a display driver with no specific hardware acceleration capability or other hardware specific considerations these default drawing functions are normally sufficient for the final driver implementation For these simplest of drivers the only function that normally needs to be implemented in the driver software is a function to configure the hardware device This often involves initializing various hardware registers to define the LCD display clock display dimensions etc For all other functions the driver implementaton simply initialize the GX DISPLAY function pointers to the default function implementations for the desired color depth and format When implementing a custom display driver the best practice is to first initialize your display driver drawing function pointers with the defaul
265. lbar reset Reset scrollbar gx single line text input backspace Handle backspace character gx single line text input buffer clear Clear the character buffer gx single line text input character delete Delete character gx single line text input character insert Insert character gx single line text input create Create single line text input gx single line text input draw Draw single line text input widget gx single line text input end Move cursor to end gx single line text input event process Text input event processing gx single line text input home Move cursor to home gx single line text input left arrow Handle left arrow key gx single line text input position get Get cursor position gx single line text input right arrow Handle right arrow key gx single line text input style add Add style flags gx single line text input style remove Remove style flags gx single line text input style set Assign style flags 9x slider create Create slider gx slider draw Draw slider gx slider event process Process slider event 9x slider info set Set slider information block gx slider needle draw Draw slider needle gx slider needle position get Get slider needle position gx slider tickmarks
266. ld may be repeated multiple times if the widget is child of a child widget Parameters definition Studio generated widget definition structure parent pointer to the widget parent if any Return Values Pointer to the created widget control block or GX NULL if the creation was not successful Allowed From Initialization and threads Example Create the widget named child popup which is a child of the top level screen screen widget gx studio widget create amp main screen child popup define amp main screen If widget 1 NULL the widget was created See Also gx studio named widget create GUIX User Guide 294 gx studio named widget create Create widget defined in Studio generated specifications file Prototype UINT gx studio named widget create char name GX WIDGET parent GX WIDGET new widget Description This service creates a widget and the widget s children using a widget specification defined within the GUIX Studio generated specifications file This API function is used to create top level screens using the screen name specified within the GUIX Studio application as the widget definition identifier Parameters name Screen name as defined within GUIX Studio application parent pointer to the widget parent if any new widget location to return created widget pointer Return Values GX SUCCESS 0x00 Successful GX FAILURE 0x11 widget could not
267. le 35 canvas alpha channel 11 27 28 28 control block 11 27 78 81 82 83 84 85 89 98 11 27 drawing 27 28 54 81 84 85 87 89 GUIX canvas component 11 26 managed 26 27 78 81 memory 22 35 37 82 424 427 428 27 OVOI ay 27 s nie dpt ee 26 27 color depth 2 18 28 35 36 78 110 424 426 427 428 color format 18 23 128 424 426 427 428 compiler xvii 3 9 21 22 9 426 GUIX User Guide data type xvii 9 42 demo thread 431 432 dirty diSter 15 display driver xv 2 11 18 25 27 29 37 135 137 424 428 430 display memory architecture 19 draw basic line 35 draw horizontal line 35 draw pixelmap 35 54 56 90 92 94 188 189 195 201 draw 35 draw quadragon 35 draw rectangle 35 draw 35 draw vertical 35 event notification 12 42 43 51 event processing 11 14 15 17 44 45 51 59 104 255 280 281 371 373 374 375 413 event queue 1
268. le center find gx utility rectangle combine gx utility rectangle compare gx utility rectangle define gx utility rectangle grow gx utility rectangle overlap detect gx utility rectangle point detect gx utility rectangle shift GUIX User Guide 333 gx utility math cos Compute cosine Prototype INT gx utility math cos INT angle Description This service computes the cosine of the supplied angle Parameters angle Angle to compute cosine of Return Values cosine Cosine of supplied angle Allowed From All Example Compute cosine of angle my angle cosine gx utility math cos my angle angle cosine contains the cosine of my angle See Also gx utility Itoa gx utility math sin gx utility math gx utility pixelmap rotate gx utility pixelmap simple rotate gx utility rectangle center gx utility rectangle center find gx utility rectangle combine gx utility rectangle compare gx utility rectangle define gx utility rectangle grow gx utility rectangle overlap detect gx utility rectangle point detect gx utility rectangle shift GUIX User Guide 334 gx utility math sin Compute sine Prototype INT gx utility math sin INT angle Description This service computes the sine of the supplied angle Parameters angle Angle to compute sine of Return Values sine Sine of supplied angle Allowed From All Example Compute sine of angle my angle sine
269. le line text input end gx single line text input home gx single line text input position get 9x single line text input right arrow gx single line text input style add gx single line text input style remove gx multi line text input create GUIX User Guide 270 gx multi line text view create gx multi line text view event process gx multi line text view scroll GUIX User Guide 271 gx slider create Prototype Create slider UINT gx slider create GX SLIDER slider GX CONST GX CHAR name GX WIDGET parent INT tick count GX SLIDER INFO slider info ULONG style USHORT slider id GX CONST GX RECTANGLE size Description This service creates a slider Parameters slider Slider widget control block name Name of slider parent Pointer to parent widget tick count slider info Number of slider ticks Pointer to slider info which is a structure used to pass the slider value limits slider needle size and position and other slider parameters The GX SLIDER INFO structure has the following integer members INT gx slider info min value INT gx slider info max value INT gx slider info current value INT gx slider info increment GX VALUE gx slider info min travel GX VALUE gx slider info max travel GX VALUE gx slider info needle pos GX VALUE gx slider info needle width GX VALUE gx slider info needle height GX VALUE gx slider info needle ins
270. lected index get gx vertical list selected widget get gx vertical list selected set GUIX User Guide 358 gx vertical scrollbar create Create vertical scrollbar Prototype UINT gx vertical scrollbar create GX SCROLLBAR scrollbar GX CONST GX CHAR name GX WINDOW parent GX SCROLLBAR APPEARANCE appearance ULONG style Description This service creates a vertical scrollbar Parameters scrollbar Scrollbar widget control block name Name of scrollbar parent Pointer to parent widget appearance Appearance of vertical scrollbar widget style Style of the scrollbar Return Values GX SUCCESS 0x00 Successful vertical scrollbar create GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 Invalid pointer GX ALREADY CREATED 0x13 Widget already created INVALID WIDGET SIZE 0x14 gt Invalid widget control block size GX INVALID WIDGET 0x12 Parent widget not valid INVALID APPEARANCE 0x25 Invalid appearance Allowed From Initialization and threads GUIX User Guide 359 Create vertical scrollbar scrollbar status gx vertical scrollbar create amp my scrollbar vertical scrollbar amp my parent amp scrollbar appearance If status is SUCCESS the vertical scrollbar my scrollbar has been created See Also gx horizontal scrollbar create gx scrollbar draw gx scrollbar event process gx scrollbar
271. lected set GUIX User Guide 353 gx vertical list page index set Set starting page index Prototype UINT gx vertical list page index set GX VERTICAL LIST list INT index Description This service sets the starting index for the vertical list Parameters list Vertical list widget control block event The new top index Return Values GX SUCCESS 0x00 Successfully set starting page index for the vertical list GX CALLER ERROR Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID VALUE Invalid value GX INVALID WIDGET Widget not valid Allowed From Initialization and threads Example Sets the starting page index of vertical list my list as top index status gx vertical list page index set amp my list amp top index If status is SUCCESS the starting page index of m list has been set See Also gx vertical list children position gx vertical list create gx vertical list event process 9x vertical list selected index get 9x vertical list selected widget get gx vertical list selected set gx vertical list total rows set GUIX User Guide 354 gx vertical list selected index get Get entry from vertical list Prototype UINT gx vertical list selected index get GX VERTICAL LIST vertical list INT return index Description This service returns the selected index of the vertical list Parameters ver
272. lete the display driver is responsible for any direct drawing that can be done in the physical display hardware Finally the display driver is responsible for displaying the frame buffer GUIX User Guide 37 GUIX Widget Component A GUIX widget is a visible graphical element There are GUIX components which are not visible such as timers and math utility functions However all visible components are derived from the basic GUIX widget component A GUIX widget is the primary building block of the GUIX display all other graphic elements are derived from the base widget functionality GUIX widgets are implemented in an object oriented manner with full support of inheritance This is accomplished using ANSI C which results in the smallest possible memory and processing requirements When we speak of one particular widget such as BUTTON being derived from another widget such as the base WIDGET what we mean is that the GX BUTTON control structure contains all of the member variables and function pointers of GX WIDGET with some additional variables that are specific to GX BUTTON GUIX builds up layers of widgets in this fashion so that more complex widgets are always based on a simpler widget before them This hierarchical model of derivation makes it easier to learn the APIs used to modify widget parameters If you want to modify the color of a button you use the same you use to modify the color of a widget namely gx widget
273. lid INVALID RESOURCE ID 0x22 Invalid resource ID GX INVALID STYLE Invalid style GX INVALID SIZE Invalid size Allowed From Initialization and threads Example Create multi line text button text button status gx text button create amp my text button my text button amp my parent window MY TEXT RESOURCE ID GX STYLE BUTTON TOGGLE MY TEXT BUTTON 10 amp size If status SUCCESS the multi line text button text button was created See Also gx text button create gx button create gx multi line text button draw gx multi line text button event process gx multi line text button text set gx multi line text button text id set GUIX User Guide 178 gx multi line text button draw Draw multi line text button Prototype UINT gx multi line text button draw GX MULTI LINE TEXT BUTTON button Description This service draws the multi line text button This function is normally called internaly by GUIX as part of a canvas refresh operation but it also exposed to the application that might want to provide a custom drawing function and invoke the default multi line text button drawing as custom drawing base Parameters button Pointer to text button control block Return Values GX_SUCCESS 0x00 Successful text button draw GX CALLER ERROR 0x11 X Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDG
274. limit check gx scrollbar reset GUIX User Guide 360 gx widget allocate Allocate a widget control block Prototype UINT gx widget allocate GX WIDGET control block ULONG memsize Description This service allocates a widget control block by calling the application defined memory allocation function Parameters control block Pointer to returned control block pointer memsize Control block size in bytes Return Values GX SUCCESS 0x00 Successful widget allocate GX CALLER ERROR 0x11 X Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer Allowed From Initialization and threads Example GX TEXT BUTTON button Attach widget to parent status gx widget allocate amp button sizeof GX TEXT BUTTON If status is SUCCESS the button widget control block is allocated See Also gx widget attach gx widget back move gx widget background set gx widget border draw gx widget border style set gx widget border width get gx widget canvas get gx widget child detect gx widget children draw gx widget client get gx widget create gx widget created test gx widget delete gx widget detach gx widget draw gx widget draw set gx widget event generate gx widget event process gx widget event process set gx widget event to parent gx widget find gx widget front move gx widget height get gx widget hide gx widget resize gx widget shift gx widget show gx w
275. line text input home gx single line text input left arrow gx single line text input position get gx single line text input right arrow gx single line text input style add gx single line text input style remove single line text input style set gx multi line text input create gx multi line text view create gx multi line text view event process gx multi line text view scroll GUIX User Guide 256 gx single line text input create Create a text input widget Prototype UINT gx single line text input create GX SINGLE LINE TEXT INPUT text input GX CONST GX CHAR name GX WIDGET parent GX CHAR input buffer UINT buffer size UINT style USHORT text input id GX CONST GX RECTANGLE size Description This service creates a text input widget The caller must provide storage for the input string and indicate the maximum length of the string Parameters text input Single line text input widget control block name Optional widget logical name parent Optional parent widget input buffer Storage for input string buffer size Size of input string storage area in bytes style Text input style flags text input id Optional ID of the input widget size Rectangle defining initial widget size Return Values GX SUCCESS 0x00 Successful single line text input create GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 Invalid pointer GX ALREADY CREATED 0x13 W
276. llowed From Initialization and threads Example Hide widget widget status gx widget hide amp my widget If status is SUCCESS the widget widget is hidden See Also gx widget attach gx widget back move gx widget background set gx widget border draw gx widget border style set gx widget border width get gx widget canvas get gx widget child detect gx widget children draw gx widget client get gx widget created gx widget created test gx widget delete gx widget detach gx widget draw gx widget draw set gx widget event generate gx widget event process gx widget event process set gx widget event to parent gx widget find gx widget front move gx widget height get gx widget resize gx widget shift gx widget show gx widget status add gx widget style get gx widget status remove gx widget status test gx widget style add gx widget style get gx widget style remove gx widget style set gx widget width get GUIX User Guide 412 gx widget pixelmap get Get pixelmap Prototype UINT gx widget pixelmap get GX WIDGET widget GX RESOURCE ID resource id GX PIXELMAP return pixelmap Description This service gets the pixelmap associated with the supplied resource ID This service should only be called by visible widgets Parameters widget Pointer to widget control block pixelmap id Pixelmap resource ID return pixelma
277. locate GX WIDGET widget ULONG memsize API function to allocate the widget control block Next when you create the widget make certain you pass the GX WIDGET STYLE DYNAMICALLY ALLOCATED style flag along with any other needed style flags to the widget create function This flag is used to mark the widget as being dynamically allocated in the widget status field When and if the widget is later deleted using gx widget delete GUIX will check this status field and automatically call your memory de allocator function to insure there are no memory leaks e A widget created using a dynamically allocated control block must be created with the GX WIDGET STYLE DYNAMICALLY ALLOCATED style flag to prevent memory loss Types GUIX provides a rich fully functional set of built in widgets As mentioned previously all specialized widgets are derived from the base widget Following is a list of the built in widgets in GUIX GX TYPE WIDGET GUIX User Guide 39 GX TYPE BUTTON GX TYPE TEXT BUTTON GX TYPE RADIO BUTTON GX TYPE CHECKBOX GX TYPE PIXELMAP BUTTON GX TYPE SHADOW BUTTON GX TYPE ICON BUTTON GX TYPE ICON GX TYPE SPRITE GX TYPE SLIDER GX TYPE PIXELMAP SLIDER GX TYPE VERTICAL SCROLL GX TYPE HORIZONTAL SCROLL GX TYPE PROGRESS BAR GX TYPE PROMPT GX TYPE PIXELMAP PROMPT GX TYPE SINGLE LINE TEXT INPUT GX TYPE PIXELMAP TEXT INPUT GX TYPE MULTI LINE TEXT VIEW GX TYPE MULTI LINE TEXT INPUT GX TYPE WINDOW GX TYPE ROOT WINDO
278. lock move gx canvas pixelmap tile gx canvas pixelmap blend GUIX User Guide 96 gx canvas pixelmap draw Draw pixelmap Prototype UINT gx canvas pixelmap draw GX VALUE x position GX VALUE y position GX PIXELMAP pixelmap Description This service draws a pixelmap on the canvas Parameters X start Starting x position of the pixelmap y end Starting y position of the pixelmap pixelmap Pointer to pixelmap Return Values GX SUCCESS 0x00 Successful pixelmap draw GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer INVALID COORDINATE 0x21 Invalid coordinate Allowed From Initialization and threads Example Draw pixelmap on canvas canvas status gx canvas pixelmap draw 10 20 amp my pixelmap If status is SUCCESS the pixelmap pixelmap has been drawn my canvas See Also gx canvas block move gx canvas pixelmap tile gx canvas pixelmap blend GUIX User Guide 97 gx canvas pixelmap tile Tile pixelmap Prototype UINT gx canvas pixelmap tile GX RECTANGLE fill GX PIXELMAP pixelmap Description This service fills a rectangle within a canvas with the requested pixelmap Parameters fill Area to tile with pixelmap pixelmap Pointer to pixelmap Return Values GX SUCCESS 0x00 Successful pixelmap tile GX CALLER ERROR 0x11 X Invalid caller of this function GX PTR ERROR
279. lors styles fonts and various other attributes of each window or widget type If you are using GUIX Studio to create the appearance of your user interface screens much of this work of calling GUIX API functions to create your display is done for you by the GUIX Studio application GUIX applications interact with the system user and with external business logic by handling events retrieved from the GUIX event queue These events are usually produced by GUIX widgets but they can also be created by external threads When a typical GUIX button is pushed that button sends an event to the button s parent window Your application program will act on that button push by providing a handler for the button push event Additional GUIX threads are often created for things such as input drivers A typical touch screen input driver is executed as a standalone thread external to the main GUIX thread The touch input driver sends touch information into the GUIX thread by sending events into the GUIX event queue Since many user interface operations such as animations require accurate timing information GUIX also implements a simple and easy to use timer interface This timer interface is built upon the ThreadX timer service and is configured automatically at system startup The vast majority of the GUIX software is independent of any hardware dependencies The framework does require hardware specific input drivers and hardware specific graphics drivers Th
280. lpaper set Set window wallpaper GUIX User Guide 59 gx animation canvas define Provide canvas memory to an animation controller Prototype UINT gx animation canvas define GX ANIMATION animation GX VALUE width GX VALUE height GX DISPLAY display GX COLOR memory ULONG memory size Description This service provides memory to an animation controller for creating a canvas and root window used to implement the animation sequence This service creates a new canvas and new root window using the memory and dimensions provided Parameters animation Pointer to animation control block width Width of the animation canvas in pixels height Height of the animation canvas in pixels display The display driver to be used to paint on the animation canvas memory The canvas memory area memory size The size of the provide memory area in bytes Return Values GX SUCCESS 0x00 Successful GX INVALID MEMORY SIZE 0x29 The provided memory block is not large enough to create the canvas GX PTR ERROR 0x07 X Invalid pointer Allowed From Initialization and threads Example gx animation canvas define animation width height display memory memsize If status is SUCCESS the new canvas was successfully created and initialized See Also GUIX User Guide 60 gx animation create gx animation delete gx animation start gx animation stop GUIX User Guide 61 gx animation create Create an a
281. may be assigned The left fill and right pixelmap ids are used to allow the application to use one set of pixelmaps for prompts of various widths but a common height to save on storage requirements If the left and right IDs are not used they should be set to 0 If the prompt should draw itself differently when it gains input focus the selected pixelmap ids are used for that purpose If the selected ids are not used or are the same as the normal ids set them to 0 Parameters prompt normal left id normal fill id normal right id selected left id selected fill id selected right id Return Values GX SUCCESS GX CALLER ERROR GX PTR ERROR GUIX User Guide Pointer to pixelmap prompt control block Resource ID of the pixelmap to be used on the left side in the normal state Resource ID of the pixelmap to be used as a tiled fill in the normal state Resource ID of the pixelmap to be used on the right side in the normal state Resource ID of the pixelmap to be used on the left side in the selected state Resource ID of the pixelmap to be used as a tiled fill in the selected state Resource ID of the pixelmap to be used on the right side in the selected state 0x00 Successful sets the pixelmap to the prompt 0x11 Invalid caller of this function 0x07 Invalid pointer GX INVALID RESOURCE ID 0x22 Resource ID not valid Allowed From Initialization and threads GUIX User Guide 210 Assign pixelmap IDs
282. me implementation of a GUI designed exclusively for embedded ThreadX based applications This chapter contains an introduction to GUIX and a description of its applications and benefits GUIX Feature Overview ANSI C Source Code Not A Black Box Embedded GUI Applications Real time GUI Software GUIX Benefits Improved Responsiveness Software Maintenance Increased Throughput Processor Isolation Ease of Use Improve Time to Market Protecting the Software Investment GUIX User Guide GUIX Feature Overview Unlike many other GUI implementations GUIX is designed to be versatile easily scaling from small micro controller based applications to those that use powerful RISC and DSP processors This is in sharp contrast to public domain or other commercial implementations originally intended for workstation environments but then squeezed into embedded designs An overview of GUIX features follows GUIX User Guide Easy to use with host based design tool GUIX Studio Win32 GUIX run time environment for complete hosted prototyping Supports most processors supported by ThreadX Written exclusively in ANSI C Endian neutral Smallest Fasted Embedded GUI Run time configurable number of objects screen size etc Easy to write display driver interface Color up to 32 bpp color depth monochrome and grayscale support Multilingual support via UTF8 string encoding and string resources Default free fonts and easy to add new fonts Multiple drawing Canva
283. move gx single line text input style set gx multi line text input create gx multi line text view create gx multi line text view event process gx multi line text view scroll GUIX User Guide 264 gx single line text input position get Move cursor to pixel position Prototype UINT gx single line text input position get GX SINGLE LINE TEXT INPUT text input INT pixel position Description This service positions the text input cursor based on the requested pixel position The text input cursor index will be calculated based on the x value of the pixel position Parameters text input Single line text input widget control block pixel position X value of pixel position Return Values GX SUCCESS 0x00 Successful single line text input create GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 Invalid pointer Allowed From Initialization and threads Example invoke backspace handler status gx single line text input position get amp my text input 100 If status is SUCCESS the text input widget cursor has been positioned See Also gx single line text input backspace gx single line text input buffer clear single line text input buffer get gx single line text input create gx single line text input character delete gx single line text input character insert gx single line text input draw gx sin
284. move gx widget status test gx widget style add gx widget style get gx widget style remove gx widget style set gx widget width get GUIX User Guide 403 gx widget find Find widget Prototype UINT gx widget find GX WIDGET parent USHORT widget id INT search depth GX WIDGET return widget Description This service searches through the children of the specified parent looking for a widget with the requested ID value Parameters parent Pointer to parent widget from which search is started widget id Widget ID to search for search depth Defines the recursive nesting level into which the function will search child widgets If this value is lt 0 only immediate children of the parent widget are searched If this value is GX SEARCH DEPTH INFINITE all children of all child widgets are exhaustively searched For any other value 0 this value limits how deeply nested this function will search through child widgets looked for the requested widget ID return widget Pointer to destination for found widget Return Values GX SUCCESS 0x00 Successful widget find GX NOT FOUND 0x09 Widget not fount GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 Widget not valid Allowed From Initialization and threads GUIX User Guide 404 Find widget my widget status gx widget find amp
285. mple Process event for multi line text view widget my text view status gx multi line text view event processe amp my text view amp my event If status is SUCCESS the event event for text view text view has been processed See Also gx single line text input create gx multi line text input create gx multi line text view create gx multi line text view font set gx multi line text view scroll gx multi line text view text color set gx multi line text view text id set gx multi line text view text set GUIX User Guide 193 gx multi line text view font set Set the font for the multi line text view Prototype UINT gx multi line text view text id set GX MULTI LINE TEXT VIEW text view GX RESOURCE ID font id Description This service assigns the resource ID of a font to the multi line text view widget Parameters text view Multi line text view widget control block font id Resource ID for the text string Return Values GX SUCCESS 0x00 Successfully set font for the multi line text view GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 Invalid pointer GX INVALID RESOURCE ID 0x22 Invalid resource ID Allowed From Initialization and threads Example Set font ID FONT ID to the multi line text view widget my text view status gx multi line text view font set amp my text view FONT ID
286. n icon button amp my parent MY ICON RESOURCE ID GX STYLE BORDER RAISED MY BUTTON 10 amp size If status is GX SUCCESS the icon button my icon button has been created See Also gx button background draw gx button create gx button deselect gx button draw gx button event process gx button select gx icon create gx icon draw gx icon pixelmap set gx pixelmap button create gx pixelmap button draw gx radio button create gx radio button draw gx text button create gx text button color set gx text button draw GUIX User Guide 170 gx icon button pixelmap set Create icon button Prototype UINT gx icon button pixelmap set GX ICON BUTTON button GX RESOURCE ID icon id Description This service assigns a new pixelmap to the icon button widget Parameters button Pointer to icon button control block icon id Resource ID of pixelmap Return Values GX SUCCESS 0x00 Successfully created icon button GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer Allowed From Initialization and threads Example Create my icon button status gx icon button create amp my icon button icon button amp my parent MY ICON RESOURCE ID GX STYLE BORDER RAISED MY BUTTON 10 amp size If status is GX SUCCESS the icon button my icon button has been created See Also gx button background draw gx button c
287. n background draw gx button create gx button deselect gx button draw gx button event process gx button select gx pixelmap button create gx pixelmap button draw gx pixelmap prompt create gx pixelmap prompt draw gx pixelmap prompt pixelmap set gx pixelmap slider create gx pixelmap slider draw gx slider event process gx radio button create gx radio button draw gx icon button create gx text button create gx text button color set gx text button draw GUIX User Guide 217 gx progress bar create Create progress bar Prototype UINT progress bar create PROGRESS BAR progress bar GX CONST GX CHAR name GX WIDGET parent GX PROGRESS BAR INFO progress bar info ULONG style USHORT progress bar id GX CONST GX RECTANGLE size Description This service creates a progress bar Parameters progress bar Progress bar control block name Logical name parent Pointer to the parent widget progress bar info Pointer to progress bar information structure style Style of progress bar Appendix D contains pre defined general styles for all widgets as well as widget specific styles progress bar id Application defined ID of progress bar size Dimensions of progress bar Return Values GX SUCCESS 0x00 Successful prompt create GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 Invalid pointer GX ALREADY CREATED 0x13 Widget already created INVALID WIDGET SIZE 0x
288. n control block Return Values GX SUCCESS 0x00 Successful button background draw GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 X Widget not valid Allowed From Initialization and threads Example custom button draw Draw button background status gx button background draw amp my stop button If status is SUCCESS the stop button background was successfully drawn Add your custom drawing here See Also gx button create gx button deselect gx button draw gx button event process gx button select gx icon button create gx pixelmap button create gx pixelmap button draw gx radio button create gx radio button draw gx text button create gx text button color set gx text button draw GUIX User Guide 70 gx button create Prototype Create button UINT gx button create GX BUTTON button GX CONST GX CHAR name GX WIDGI size Description USHORT button id GX CONST RECTANGLE ULONG style This service creates a button as specified and associates the button with the supplied parent widget Parameters button name parent style button id size Return Values GX SUCCESS GX CALLER ERROR GX PTR ERROR GX ALREADY CREATED Allowed From Initialization and threads GUIX User Guide Pointer to button control block Logical name of button Pointer to
289. n the drawing operation completes the buffers are toggled and the working buffer becomes the active buffer and the active buffer becomes the working buffer This model also eliminates screen flicker and tearing that can be observed in a single buffered system Model 5 Ping pong buffers with canvas compositing Composite NA Software Displ Canvas Isplay MUN Software Composite Canvas B Software Canvas GUIX User Guide 20 Display Driver In model 5 any number canvases can be created up to the limits available memory The canvases can be overlaid or blended together as defined by the application to create the canvas composite When a new composite is created after a screen refresh operation the active and working composite buffers are toggled in an operation identical to the standard ping pong buffer architecture Model 5 adds the ability to perform screen fade and blending operations by blending the canvases into the final output composite Model 6 Canvas compositing with external GRAM Software Canvas Display Display Software Software Canvas Model 6 is a slight variation on Model 5 in which only one composite buffer is required and the composite buffer is then transferred to external GRAM This model also supports full screen blending and overlays Memory Usage GUIX resides along with the application program As a result the static memory or fixed memory usage o
290. nabled by using an anti aliased font which is produced by the GUIX studio application You specify whether a font should be generated as anti aliased or binary when you create the font Anti aliased fonts in GUIX utilize 16 levels of transparency for each pixel Clipping Clipping is supported internally by the GUIX display component and at the window and widget layers by the parent child architecture maintained by GUIX widgets No window or widget is ever allowed to draw outside of that widget s area and a widget is never allowed to draw outside of the area of that widget s parent GUIX User Guide 36 This also prevents widgets from drawing at pixel coordinates that lay outside of the canvas memory which likely lead to memory corruption or a system failure Widgets are not allowed to draw outside of the widget s area the widget s parent area or beyond the canvas extent In addition widgets can only draw to areas that have previously been marked as dirty This prevents an entire window being drawn for example when only a corner of the window has been revealed Only the portion of the window that actually needs to be refreshed is marked as dirty and so the window drawing function only truly refreshes pixels in the dirty area The GUIX dispaly component enforces these clipping algorithms before invoking the driver level drawing functions Views GUIX always maintains a set of views for each root window and each child window of the ro
291. nd GX SPRITE BACKGROUND RESTORE restore previous pixelmap The gx sprite frame alpha value defines an alpha value to be added to the displayed pixelmap The value 255 specifies that no extra alpha value should be imposed If the pixelmap includes an alpha channel this alpha channel will be added to the frame alpha value GUIX User Guide 288 Parameters sprite name parent frame list frame count style sprite id size Return Values GX SUCCESS GX CALLER ERROR GX PTR ERROR GX ALREADY CREATED GX INVALID WIDGET SIZE GX INVALID WIDGET GX INVALID STYLE GX INVALID SIZE Allowed From Initialization and threads Example Create spriter my sprite Sprite widget control block Optional sprite name Pointer to parent widget An array of SPRITE FRAME structures specifies the number of entries in the frame list array Style of sprite Appendix D contains pre defined general styles for all widgets as well as widget specific styles Application defined ID of sprite Dimensions of sprite Successful sprite create Invalid caller of this function 0x07 Invalid pointer Widget already created Invalid widget control block size 0x12 Widget not valid 0x18 Invalid style 0x19 Invalid size status gx slider create amp my sprite my amp my parent sprite frame list frame count GX STYLE SPRITE AUTO GX STYLE SPRITE LOOP ID MY SPRITE amp size If st
292. nd threads Example Detach widget my widget from its parent status gx widget detach amp my widget If status is SUCCESS the widget widget has been detached See Also gx widget attach gx widget back move gx widget background set gx widget border draw gx widget border style set gx widget border width get gx widget canvas get gx widget child detect gx widget children draw gx widget client get gx widget created gx widget created test gx widget delete gx widget draw gx widget draw set gx widget event generate gx widget event process gx widget event process set gx widget event to parent gx widget find gx widget front move gx widget height get gx widget hide gx widget resize 9x widget shift gx widget show gx widget status add gx widget status get gx widget status remove gx widget status test gx widget style add gx widget style get gx widget style remove gx widget style set gx widget width get GUIX User Guide 392 gx widget draw Draw widget Prototype UINT gx widget draw GX WIDGET widget Description This service draws the widget Parameters widget Pointer to widget Return Values GX SUCCESS 0x00 Successful widget draw GX_CALLER_ERROR 0x11 Invalid caller of this function GX_PTR_ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 _ Widget not valid Allowed From Initialization and threads Example
293. nd value was successfully set See Also gx canvas create gx canvas drawing complete gx canvas drawing initiate gx canvas offset set gx canvas shift GUIX User Guide 77 gx canvas arc draw Draw arc Prototype UINT gx canvas arc draw INT xcenter INT ycenter UINT r INT start angle INT end angle Description This service draws a circle arc on the canvas using the current brush The circle arc is clipped to the canvas invalid region Parameters xcenter x position of center of the circle arc ycenter y position of center of the circle arc r Radius of the circle arc start angle Starting angle of the circle arc end angle Ending angle of the circle arc Return Values 0x00 Successful arc draw Ox11 Invalid caller of this function 0x07 Invalid pointer 0x21 Invalid coordinate s GX SUCCESS GX CALLER ERROR GX PTR ERROR GX INVALID COORDINATE Allowed From Initialization and threads Example Draw a circle arc from 0 degree to 90 degree in clockwise status gx canvas arc draw 100 100 50 0 90 If status is SUCCESS the arc has been drawn on my canvas See Also Fixme not sure whether the following included APIs are right gx canvas block move gx canvas circle draw gx display create gx canvas ellipse draw gx canvas line draw gx canvas pie draw gx canvas pixelmap draw gx canvas pixelmap tile gx canvas polygon draw gx canvas rectangle draw gx c
294. ndow scroll info get gx window scrollbar find gx window wallpaper get gx window wallpaper set GUIX User Guide 440 gx window event process Process window event Prototype UINT gx window event process WINDOW widget GX EVENT event Description This service processes an event for this window Parameters widget Pointer to Window control block event Pointer to event to process Return Values GX SUCCESS 0x00 Successful window event processing GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 X Widget not valid Allowed From Initialization and threads Example Process event for window my window status gx window event process amp my window amp my event If status is SUCCESS the event for window my window has been processed See Also gx window canvas set gx window client height get gx window client scroll gx window client width get gx window create gx window draw gx window root create gx window root delete gx window root event process gx window root find gx window scroll info get gx window scrollbar find gx window wallpaper get gx window wallpaper set GUIX User Guide 441 gx window root create Create root window Prototype UINT gx window root create GX WINDOW ROOT root window GX CONST GX CHAR name GX CANVAS
295. ndow wallpaper UINT gx window wallpaper set GX WINDOW window Description GX RESOURCE ID wallpaper id GX BOOL tile This service sets the wallpaper for the specified window Parameters window Pointer to window wallpaper id Resource ID of wallpaper to use tile Wallpaper is tiled if GX TRUE otherwise Return Values wallpaper is not tiled GX SUCCESS 0x00 Successful window wallpaper set GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 Invalid pointer GX INVALID WIDGET 0x12 Widget not valid INVALID RESOURCE ID 0x22 Invalid resource ID Allowed From Initialization and threads Example Set wallpaper for window window status gx window wallpaper set amp my window MY WALLPAPER RESOURCE ID GX TRUE If status is SUCCESS the wallpaper for window window is set See Also 9 window canvas set gx window client height get gx window client scroll 9 window client width get gx window create gx window draw 9 window event process gx window root create gx window root delete 9 window root event process gx window root find 9 window scroll info get gx window scrollbar find gx window wallpaper get GUIX User Guide 451 Chapter 5 GUIX Display Drivers GUIX Display drivers define the software interface between the abstract drawing canvas and the physical disp
296. ne drawing or the outline width for outlined shape drawing The gx brush line color member defines the foreground color for line drawing and for text drawing The gx brush fill color member defines the solid fill color used for shape filling The GUIX context component provides a set of APIs designed to make it very easy to modify the current brush within the active context These APIs include 9 context brush define gx context line color set gx context fill color set 9 context font set and many others The draw context of a parent object is inherited by the objects children Actually a clone of the parent drawing context is inherited by the child objects when their drawing functions are invoked The child can modify the context without affecting the parent drawing but it can also inherit information from the parent such as brush color and style if desired GUIX Window Component The window component is responsible for all window processing in GUIX A GUIX window is fundamentally a distinct display area that may contain one or more child widgets In GUIX the window is actually just a special form of the fundamental widget object GUIX User Guide 47 GUIX windows are implemented an object oriented manner with full support of inheritance This is accomplished using ANSI C which results in the smallest possible memory and processing requirements GUIX windows extend the functionality of the GUIX widget primarily by adding su
297. ng for such application events GUIX User Guide 42 Event Processing There is a default widget event processing function for each and every widget named 9 widget type event process In most cases the application won t need to worry about the event handling of any given widget However in situations where the application requires custom or supplemental event processing the application may override the default processing function with its own via the GUIX API widget event process set This function overrides the default event processing function with the event function processing function specified in the e Application event processing functions can take advantage i e not duplicate the processing of the default processing by simply calling the default widget event process processing directly Event processing is called exclusively from the context of the internal GUIX system thread In this way the stack requirements to process the event handling only applies to the GUIX thread Implementing Custom Event Processing example You can provide your own event processing function for any widget or window in the GUIX system If you are creating your own custom widget type you will normally install your custom event handler in the widget creation function If you are just extending or modifying the operation of an existing widget or window you can call the 9x widget event process set API function after the widget o
298. ngle point detect gx utility rectangle shift GUIX User Guide 345 gx utility rectangle overlap detect Detect overlap of rectangles Prototype UINT gx utility rectangle overlap detect GX RECTANGLE first rectangle GX RECTANGLE second rectangle GX RECTANGLE return overlap area Description This service detects any overlap of the supplied rectangles If overlap is found the service returns GX TRUE and the overlapping rectangle Parameters first rectangle First rectangle second rectangle Second rectangle return overlap area Overlapping rectangle area Return Values result GX TRUE if rectangles overlap otherwise GX FALSE Allowed From All Example Detect overlap rectangle a and rectangle b result gx utility rectangle overlap detect amp my rectangle amp my rectangle b overlap area If result is TRUE overlap area specifies the area the rectangles overlap See Also gx utility Itoa gx utility math cos gx utility math sin gx utility math sqrt gx utility pixelmap rotate gx utility pixelmap simple rotate gx utility rectangle center gx utility rectangle center find gx utility rectangle combine gx utility rectangle compare gx utility rectangle define gx utility rectangle grow gx utility rectangle point detect gx utility rectangle shift GUIX User Guide 346 gx utility rectangle point detect Detect if poi
299. nimation controller Prototype UINT gx animation create GX ANIMATION animation Description This service creates an animation controller The controller is initialized to the idle state Parameters animation Pointer to animation control block Return Values GX SUCCESS 0x00 Successful ALREADY CREATED 0x13 Control block already initialized GX_PTR_ERROR 0x07 X Invalid pointer Allowed From Initialization and threads Example GX ANIMATION animation 9x animation create amp animation If status is GX SUCCESS the new animation controller was successfully created and initialized See Also gx animation canvas define gx animation delete gx animation start gx animation stop GUIX User Guide 62 gx animation delete Delete an animation controller Prototype UINT gx animation delete GX ANIMATION animation Description This service deletes an animation controller If the controller has created a canvas and root window the canvas and root window are also deleted Parameters animation Pointer to animation control block Return Values GX SUCCESS 0x00 Successful GX PTR ERROR 0x07 X Invalid pointer Allowed From Initialization and threads Example GX ANIMATION animation 9x animation delete amp animation If status is GX SUCCESS the new animation controller was successfully deleted See Also gx animation canvas define gx animation create gx animation start gx animation stop GUIX
300. nitialization and threads Example UINT status gx progress bar pixelmap set progress bar GX PIXELMAP ID PROGRESS FILL if status GX SUCCESS the pixelmap was successfully assigned See Also gx progress bar draw gx progress bar event process gx progress bar fill color set gx progress bar font set gx progress bar info set gx progress bar pielmap set gx progress bar range set gx progress bar text color set gx progress bar value set GUIX User Guide 224 gx progress bar range set Assign range of a progress bar Prototype UINT progress bar range set GX PROGRESS BAR progress bar min value INT max value Description This service assigns the progress bar value range Parameters progress bar Progress bar control block min value Progress bar minimum value max value Progress bar maximum value Return Values GX SUCCESS 0x00 Successful prompt create GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 Invalid pointer Allowed From Initialization and threads Example UINT status gx progress bar range set progress bar 0 100 if status SUCCESS the progress bar range was successfully assigned See Also gx progress bar draw gx progress bar event process gx progress bar fill color set gx progress bar font set gx progress bar info set gx progress bar pielmap set gx progress bar range set gx progress bar text color set gx progre
301. not valid GX INVALID VALUE Slider info not valid Allowed From GUIX User Guide 284 Initialization and threads Example Calculate new value for slider slider status gx slider value calculate amp my slider amp info new value If status is SUCCESS the slider my slider See Also 9x pixelmap slider create gx pixelmap slider draw gx pixelmap slider event process gx pixelmap slider pixelmap set 9x slider create gx slider draw gx slider event process gx slider needle draw gx slider needle position get slider needle position get gx slider tickmarks draw gx slider travel get gx slider value set GUIX User Guide 285 gx slider value set Prototype Set slider value UINT gx slider value set GX SLIDER slider GX SLIDER INFO info INT new value Description This service sets the slider value This API can be called by the application to move a slider needle under program control bypassing the need for user input to drag the slider needle Parameters slider info INT gx slider info min value INT gx slider info max value INT gx slider info current value INT gx slider GX VALUE GX VALUE GX VALUE GX VALUE GX VALUE GX VALUE GX VALUE gx gx gx gx gx gx gx slider info increment min travel info slider info max travel slider info needle pos slider info needle width slide
302. nput while the dialog window is displayed regardless of the x y position of touch or mouse input events Modal dialogs are triggered by the application software by first creating the window in the normal way by calling gx window create and then calling the GUIX API function gx window execute When the gx window execute function is called GUIX enters a local event processing loop The gx window execute function does not return to the caller until the dialog window is closed either by user input or by calling gx window destroy For this reason it is very important never to call the gx window execute function from any thread other than the GUIX internal thread GUIX User Guide 17 Periodic Processing In order to provide display effects sprite animation and support for application periodic requests GUIX uses one ThreadX timer This single timer is used to drive all GUIX time related needs By default the frequency for the GUIX internal timer processing is set to 50ms via the constant SYSTEM TIMER FREQUENCY which is defined in 9 port h by default The default frequency may be changed by the application via a compilation option when building the GUIX library or by explicitly redefining it in user h e Note that the GUIX timer frequency is expressed in ThreadX timer ticks Typically a ThreadX timer tick is 10ms so the default value of SYSTEM TIMER FREQUENCY is 5 yielding 50ms However if the ThreadX timer tick represe
303. nt ptr switch event gt gx_event_type case GX_EVENT_SHOW gx_multi_line_text_button_event_proces button event ptr add custom actions here break default multi line text button event proces button event ptr break return SUCCESS See Also gx text button create gx button create gx multi line text button draw gx multi line text button event process gx multi line text button text set gx multi line text button text id set GUIX User Guide 180 gx multi line text button text id set Set text resource ID to the text button Prototype UINT gx multi line text button text id set GX MULTI LINE TEXT BUTTON text button RESOURCE ID string id Description This service sets the specified string resource ID to the text button The string may contain newline characters which act to display the text on multiple lines within the button area Parameters text button Pointer to text button control block string id Resource ID of the string Return Values GX SUCCESS 0x00 Successfully set the string resource ID to the text button GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer Allowed From Initialization and threads Example Set the string ID MY STRING 10 to the text button my text button status gx multi line text button text id set amp my text button MY STRING ID If
304. nt resides in rectangle Prototype UINT gx utility rectangle point detect GX RECTANGLE rectangle GX POINT point Description This service detects if the specified point resides in the rectangle If the point does reside in the rectangle the service returns GX TRUE Parameters rectangle Rectangle point Point Return Values result GX TRUE if point resides in rectangle otherwise GX FALSE Allowed From All Example Detect if point point is within my rectangle result gx utility rectangle point detect amp my rectangle amp my point If result is TRUE point resides in the rectangle See Also gx utility Itoa gx utility math cos gx utility math sin gx utility math sqrt gx utility pixelmap rotate gx utility pixelmap simple rotate gx utility rectangle center gx utility rectangle center find gx utility rectangle combine gx utility rectangle compare gx utility rectangle define gx utility rectangle grow gx utility rectangle overlap detect gx utility rectangle shift GUIX User Guide 347 gx utility rectangle resize Grow rectangle Prototype VOID gx utility rectangle resize GX RECTANGLE rectangle GX VALUE adjust Description This service increases the size of the rectangle as specified Parameters adjust Amount to adjust the rectangle Return Values None Allowed From All Example Adjust rectangle by increasing 20 pi
305. nts a different value the GUIX timer frequency must be adjusted accordingly Display Driver Display drivers are responsible for providing a set of drawing functions to the core GUIX code The implementation of each of these drawing functions is determined by the driver and when possible the implementation will leverage hardware acceleration support In general the drawing function works by writing pixel data to a memory buffer which may be the physical frame buffer or it may be a secondary buffer depending on the driver architecture Many drivers implement double buffering using two frame buffers and these buffers are toggled by invoking the buffer toggle function GUIX calls these functions internally at the appropriate times Or the drawing functions may only write to a memory frame buffer GUIX provides default software implementations of each low level drawing function at every support color depth and format These functions are invoked via function pointers maintained within the GX DISPLAY structure When hardware specific drivers are created they typically will overwrite some number of these function pointers with functions that are specific to the target hardware A typical hardware display driver is implemented by first creating the default GUIX display driver for the required color depth and format Then the hardware driver will replace those functions that need to be optimized or customized for the particular hardware implementation
306. nvalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 X Widget not valid Allowed From Initialization and threads Example Show widget widget status gx widget show amp my widget If status is SUCCESS the widget my widget has been shown See Also gx widget attach gx widget back move gx widget background set gx widget border draw gx widget border style set gx widget border width get gx widget canvas get gx widget child detect gx widget children draw gx widget client get gx widget created gx widget created test gx widget delete gx widget detach gx widget draw gx widget draw set gx widget event generate gx widget event process gx widget event process set gx widget event to parent gx widget find gx widget front move gx widget height get gx widget hide gx widget resize gx widget shift gx widget status add gx widget status get gx widget status remove gx widget status test gx widget style add gx widget style get gx widget style remove gx widget style set gx widget width get GUIX User Guide 417 gx widget status add Add widget status Prototype UINT gx widget status add GX WIDGET widget ULONG status Description This service adds any combination of status flags to the specified widget Parameters widget Pointer to widget status Status to add Return Values GX SUCCESS
307. o draw a polygon VOID gx display driver polygon fill GX DRAW CONTEXT context INT num points GX POINT vertices Pointer to a function to draw a filled polygon VOID gx display driver circle draw GX DRAW CONTEXT context INT xcenter INT ycenter UINT r Pointer to a function to draw a circle VOID gx display driver circle fill GX DRAW CONTEXT context INT xcenter INT ycenter UINT r Pointer to a function to draw a filled circle VOID gx display driver anti aliased circle draw DRAW INT xcenter INT ycenter UINT Pointer to a function to draw an anti aliased circle VOID gx display driver anti aliased arc draw GX DRAW CONTEXT context INT xcenter INT ycenter UINT r INT start angle INTend angle Pointer to a function to draw an anti aliased arc VOID gx display driver arc draw GX DRAW CONTEXT INT xcenter INT ycenter UINT r INT start angle INT end angle Pointer to a function to draw an arc VOID gx display driver arc fill GX DRAW CONTEXT context INT xcenter INT ycenter UINT r INT start angle INT end angle Pointer to a function to draw a filled arc VOID gx display driver fill GX DRAW CONTEXT context INT xcenter INT ycenter UINT r INT start angle INT end angle Pointer to a function to draw a filled pie VOID gx display driver ellipse DRAW CONTEXT context GUIX User Guide 457 INT xcenter
308. ointer to text button control block string id Resource ID of the string Return Values GX SUCCESS 0x00 Successfully set the string resource ID to the text button GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer Allowed From Initialization and threads Example Set the string ID MY STRING 10 to the text button text button status gx text button text id set amp my text button MY STRING ID If status is SUCCESS the string ID STRING ID was set to my text button See Also gx button background draw gx button create gx button deselect gx button draw gx button event process gx button select gx icon button create x pixelmap button create gx pixelmap button draw gx text button create gx text button draw gx text button font set gx text button text color set gx text button text get GUIX User Guide 331 gx text button text set Prototype Set text to the thext button UINT gx text button text set GX TEXT BUTTON text button GX CHAR text Description This service sets the specified string to the text button Parameters text button Pointer to text button control block text pointer to the NULL terminated string Return Values GX SUCCESS 0x00 GX CALLER ERROR 0x11 GX PTR ERROR 0x07 Allowed From Initialization and threads Example Set the string my string to the text button my text button
309. old feature it is acceptable to simply invoke the GX EVENT PUSH GX TIMER START This macro is invoked when GUIX needs to receive periodic timer input This macro should invoke a service that starts the low level RTOS periodic timer service If the RTOS timer service cannot be easily stopped and started it is acceptable but less efficient to leave this service running at all times When the low level RTOS timer service periodically expires the binding must call the GUIX system function gx system timer expiration 0 Calling this function periodically is what drives the high level GUIX timer widget timer services GX TIMER STOP GUIX User Guide 471 This macro is invoked when GUIX no longer needs a periodic timer i e there are no active GUIX timers running If the RTOS timer service cannot be easily stopped and started it is acceptable but less efficient to leave this service running at all times and define this macro to do nothing GX SYSTEM MUTEX LOCK This macro is invoked by GUIX during critical code sections to prevent another task from pre empting and modifying common data structures potentially causing corruption This macro should call a function that implements the suitable RTOS resource locking service If you never utilize any GUIX API services outside of the GUIX thread you can define this macro to do nothing GX SYSTEM MUTEX UNLOCK This macro is invoked at the end of critical code sections and should unlock t
310. on This service draws an ellipse on the canvas using the current brush The ellipse is clipped to the canvas invalid region Parameters xcenter x coord of center of the ellipse ycenter y coord of center of the ellipse a Length of the semi major axis b Length of the semi minor axis Return Values GX SUCCESS GX CALLER ERROR GX PTR ERROR GX INVALID COORDINATE 0x00 Successful circle draw 0x11 Invalid caller of this function 0x07 Invalid pointer 0x21 Invalid coordinate s Allowed From Initialization and threads Example Draw an ellipse of semi major radius 100 semi minor radious 50 and centered at 200 200 status gx canvas ellipse draw 200 200 100 50 If status is SUCCESS the ellipse has been drawn on canvas See Also gx canvas arc draw gx canvas block move gx canvas circle draw gx display create gx canvas line darw gx canvas pie draw gx canvas pixelmap draw gx canvas pixelmap tile gx canvas polygon draw gx canvas rectangle draw gx canvas text draw GUIX User Guide 89 gx canvas line draw Draw line Prototype UINT gx canvas line draw GX VALUE x start GX VALUE y start GX VALUE x end GX VALUE y end Description This service draws a line on the canvas using the current brush The line is clipped to the canvas invalid region Parameters x start Starting x position of the line y end Starting y position of the lin
311. ontal list selected set GUIX User Guide 164 gx horizontal scrollbar create Create horizontal scrollbar Prototype UINT gx horizontal scrollbar create GX SCROLLBAR scrollbar GX CONST GX CHAR name GX WINDOW parent GX SCROLLBAR APPEARANCE appearance ULONG style Description This service creates a horizontal scrollbar The ID for a horizontal scrollbar is pre defined because a window has to know how to catch events from it and the size is automatic because it has to fill the parent window s client width If we decide to allow client area scrollbars we will need to add another create function with the id and size parameters Parameters scrollbar Scrollbar widget control block name Name of scrollbar parent Pointer to parent widget appearance The appearance structure defines the appearance of the scroll bar If this value is GX NULL the scrollbar will use the default scrollbar appearance defined by system scroll appearance get The scrollbar appearance structure holds the following fields 9x scroll width The total width in pixels of the scrollbar widget 9x scroll thumb width The width in pixels of the thumb button which slides on the scrollbar This value is usually some number of pixels less than the total scrollbar width 9x scroll thumb travel min An offset in pixels between the scrollbar end position and the minimuim limit to which the thumb button is allowed to travel Th
312. ontext brush width set context fill color set gx context font set gx context line color set gx context set gx context raw fill color set gx context raw line color set GUIX User Guide 137 gx context raw fill color set Set raw fill color of current drawing context Prototype UINT gx context raw fill color set GX COLOR line color Description This service sets the raw fill color of the current screen context The line color parameter is a 32 bit ARGB format raw color value rather than a color ID value Raw color definitions are useful when the desired color is not present in the current system color table or when the RGB color value is computed at runtime Parameters line color Color of line Appendix A contains pre defined colors Note that the application may add custom colors as well Return Values GX SUCCESS 0x00 Successful context raw fill color set GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID COLOR 0x15 Invalid color Allowed From Initialization and threads Example Set the raw fill color of the current context status gx context raw fill color set GX COLOR BLACK If status is SUCCESS the raw fill color of the current context has been set See Also gx context brush default gx context brush define gx context brush get gx context brush set gx context brush pattern set
313. oot delete 9 window root event process gx window root find gx window scrollbar find gx window wallpaper get gx window wallpaper set GUIX User Guide 448 gx window scrollbar find Prototype Find window scrollbar UINT gx window scrollbar find GX WINDOW window USHORT type Description GX SCROLLBAR return scrollbar This service finds the scrollbar for the specified window Parameters window Pointer to window type GX SCROLLBAR HORIZONTAL or GX SCROLLBAR VERTICAL return scrollbar Pointer to destination for scrollbar Return Values GX SUCCESS 0x00 Successful window scrollbar find GX NOT FOUND 0x09 Scrollbar not found GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 Widget not valid GX INVALID TYPE 0x1B Invalid type Allowed From Initialization and threads Example Find horizontal scrollbar for window window status gx window scrollbar find amp my window GX SCROLLBAR HORIZONTAL amp my scrollbar If status is SUCCESS the scrollbar contains the horizontal scrollbar for window window See Also 9 window canvas set gx window client height get gx window client scroll 9 window client width get gx window create gx window draw 9 window event process gx window root create gx window root delete 9
314. or information about the contents of a sprite frame list refer to the 9x sprite create API documentation Parameters sprite Sprite widget control block frame list Array of SPRITE FRAME structures or GX NULL if no frame list frame count Number of frames in frame list array Return Values GX SUCCESS 0x00 Successful GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 Invalid pointer Allowed From Initialization and threads Example Assign framelist 1 which has 10 frames to sprite status gx sprite frame list set amp my sprite framelist 1 10 If status is SUCCESS the new frame list is now associated with this sprite See Also gx sprite current frame set gx sprite stop gx sprite create gx sprite create GUIX User Guide 291 gx sprite start Start a sprite run sequence Prototype UINT gx sprite start GX SPRITE sprite USHORT frame Description This service starts a sprite auto run sequence The sprite widget will cycle through the sprite frames until the last frame is reached or will run continuously if the GX SPRITE LOOP style is set Parameters sprite Sprite widget control block frame Initial sprite frame to display usually frame 0 Return Values GX SUCCESS 0x00 Successful GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 Invalid pointer Allowed From Initialization and threads Example Start the sprite
315. order style set gx widget border width get gx widget child detect gx widget children draw gx widget client get gx widget create gx widget created test widget delete gx widget detach gx widget draw gx widget draw set gx widget event generate gx widget event process gx widget event process set gx widget event to parent gx widget event to parent gx widget find gx widget front move gx widget height get gx widget hide gx widget resize gx widget shift gx widget show gx widget status add gx widget status get gx widget status remove gx widget status test gx widget style add GUIX User Guide 378 gx widget style get gx widget style remove gx widget style set gx widget width get GUIX User Guide 379 gx widget child detect Detect widget child Prototype UINT gx widget child detect GX WIDGET parent GX WIDGET child GX BOOL return detect Description This service detects if the widget is a child of the parent widget This service nests to search children of children and returns TRUE if the parent widget is at any level an ancestor of the child widget Parameters parent Pointer to parent widget child Pointer to child widget return detect Pointer to destination for detection Return Values GX SUCCESS 0x00 Successful widget child detection GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WI
316. ot window Views are a dynamic run time determined clipping area that changes as window position and Z order are modified GUIX uses views to prevent a window or widget in the background from drawing on top of a window or widget in the foreground Views enforce Z order discipline In addition views are important for efficiency in that they prevent a window in the background from drawing to any area of the canvas that cannot be seen If a window is completely covered by another window the covered window will not be allowed to draw to the canvas at all even if it is attempting to do so Display Driver Interface GUIX display drivers are responsible for all interaction with the underlying physical screen The display drivers have three basic functions initialization drawing and frame buffer display Initialization is responsible for preparing the physical display hardware informing GUIX of the properties of the physical display hardware and for informing GUIX which specific drawing functions should be used The main display driver initialization is called from the GUIX gx display create function In addition the GUIX thread will also call a secondary display driver initialization from the thread context This secondary display driver is only needed if the driver requires RTOS services during its initialization 9 device interrupts or tx thread sleep requests for delay between steps in the initialization process Once initialization is comp
317. otecting the Software Investment GUIX is written exclusively in ANSI C and is fully integrated with the ThreadX real time operating system This means GUIX applications are instantly portable to all ThreadX supported processors Better yet a completely new processor architecture can be supported with ThreadX in a matter of weeks As a result using GUIX ensures the application s migration path and protects the original development investment GUIX User Guide Chapter 2 Installation and Use GUIX This chapter contains a description of various issues related to installation setup and use of the high performance user interface product GUIX including the following Host Considerations Target Considerations Product Distribution GUIX Installation Using GUIX Troubleshooting Configuration Options GUIX Version ID GUIX User Guide Host Considerations Embedded development is usually performed on Windows or Linux Unix host computers After the application is compiled linked and the executable is generated on the host it is downloaded to the target hardware for execution Usually the target download is done from within the development tool s debugger After download the debugger is responsible for providing target execution control go halt breakpoint etc as well as access to memory and processor registers Most development tool debuggers communicate with the target hardware via on chip debug OCD connections such as JTAG I
318. p Pointer to pixelmap destination pointer Return Values GX SUCCESS 0x00 Successful pixelmap get GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 Invalid pointer GX INVALID RESOURCE ID 0x22 Invalid resource ID Allowed From Initialization and threads Example PIXELMAP pixelmap Get the pixelmap associated with MY PIXELMAP 10 status gx widget pixelmap get widget MY PIXELMAP RESOURCE ID amp my_pixelmap If status SUCCESS pixelmap contains the pixemap pointer See Also gx widget color get gx widget font get GUIX User Guide 413 gx widget resize Resize widget Prototype UINT gx widget resize GX WIDGET widget GX RECTANGLE new size Description This service resizes the widget If the widget is visible it is automatically invalidated and queued for re drawing Parameters widget Pointer to widget new size New widget size Return Values GX SUCCESS 0x00 Successful widget resize GX CALLER ERROR 0x11 X Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 Widget not valid GX INVALID SIZE 0x19 Invalid size Allowed From Initialization and threads Example Resize widget widget status gx widget resize amp my widget amp new size If status is SUCCESS the widget my widget has been resized See Also gx widget attach gx widget back mo
319. p prompt widget Pointer to the parent widget Resource ID of text Resource ID of fill Style of checkbox Appendix D contains pre defined general styles for all widgets as well as widget specific styles Application defined ID of pixelmap prompt Dimensions of pixelmap prompt 0x00 Successful pixelmap prompt create 0x11 Invalid caller of this function 0x07 Invalid pointer 0x13 Widget already created 0x22 Invalid resource ID Allowed From Initialization and threads Example Create my pixelmap prompt status gx pixelmap prompt create amp my pixelmap prompt pixelmap prompt amp my parent MY TEXT RESOURCE 10 MY LEFT RESOURCE 10 MY FILL RESOURCE ID MY RIGHT RESOURCE 10 STYLE BORDER RAISED PIXELMAP PROMPT 10 amp size If status is GX SUCCESS the pixelmap prompt my_pixelmap_prompt has been created See Also gx_pixelmap_button_create gx pixelmap button draw gx pixelmap button set gx pixelmap prompt draw gx pixelmap prompt pixelmap set gx pixelmap slider create gx pixelmap slider draw gx pixelmap slider event process gx prompt create gx prompt draw gx prompt font set gx prompt text color set gx prompt text get gx prompt text set GUIX User Guide 207 gx pixelmap prompt draw Draw pixelmap prompt Prototype UINT gx pixelmap prompt draw GX PIXELMAP PROMPT prompt Description This service draws a pixelmap prompt widget Pa
320. parent widget of the button Button style Appendix D contains pre defined general styles for all widgets as well as widget specific styles Application defined ID of the button Size of the button 0x00 0x11 0x07 0x13 Successful button creation Invalid caller of this function Invalid pointer Widget already created 71 Create a stop button status gx button create amp my stop button my stop button amp my parent window STYLE BUTTON TOGGLE MY STOP BUTTON 10 amp size If status is SUCCESS the stop button was successfully created See Also gx button background draw gx button deselect gx button draw gx button event process gx button select gx radio button create gx radio button draw gx icon button create gx pixelmap button create gx pixelmap button draw gx text button create gx text button color set gx text button draw GUIX User Guide 72 gx button deselect Deselect button Prototype UINT gx button deselect GX BUTTON button Description This service deselects the specified button Parameters button Pointer to button control block Return Values GX SUCCESS 0x00 Successful button deselect GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 _ Widget not valid Allowed From Initialization and threads Example Deselect button status gx
321. pixelmap set raw brush define gx context raw fill color set gx context raw line color set GUIX User Guide 132 gx context pixelmap get Get pixelmap associated with pixelmap ID in current draw context Prototype UINT gx context pixelmap get GX RESOURCE ID id GX PIXELMAP return map Description This service retrieves the pixelmap pointer associated with the indicated pixelmap ID Parameters pixelmap id Resource ID of pixelmap requested return map Address of variable to hold returned pixelmap address Return Values GX SUCCESS 0x00 Successful context fill color set GX INVALID CONTEXT 0x06 No active drawing context GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer INVALID RESOURCE ID 0x22 Invalid resource ID Allowed From Initialization and threads Example GX PIXELMAP map Get the pixelmap pointer status gx context pixelmap get MY PIXELMAP 10 amp map See Also gx context brush default gx context brush define gx context brush get gx context brush set gx context brush pattern set gx context brush style set gx context brush width set gx context font set gx context line color set gx context pixelmap set gx context raw brush define gx context raw fill color set gx context raw line color set GUIX User Guide 133 GUIX User Guide 134 g
322. plication may add custom colors as well fill This boolean flag indicates whether or not the widget area should be filled with the supplied fill colors If this value is GX FALSE only the widget border is drawn Return Values GX SUCCESS 0x00 Successful widget border draw GX CALLER ERROR Invalid caller of this function GX PTR ERROR Invalid pointer GX INVALID WIDGET 0x12 Widget not valid GX INVALID COLOR Invalid color GUIX User Guide 372 Allowed From Initialization and threads Example Draw border of widget status gx widget border draw amp my widget GX COLOR BLACK GX COLOR GREEN GX COLOR BLUE GX TRUE If status is SUCCESS the widget widget border has been drawn See Also gx widget attach gx widget back move gx widget background set gx widget border style set gx widget border width get gx widget canvas get gx widget child detect gx widget children draw gx widget client get gx widget create gx widget created test gx widget delete gx widget detach gx widget draw gx widget set gx widget event generate gx widget event process gx widget event process set gx widget event to parent gx widget find gx widget front move gx widget height get gx widget hide gx widget resize 9x widget shift gx widget show gx widget status add gx widget status get gx widget status remove gx widget status test gx widget style add gx widget style g
323. ppearance structure for vertical scrollbars and a second structure for horizontal scroll bars The application can modify the default scrollbar appearance for any display by initializing a GX SCROLLBAR APPEARANCE structure and invoking the API function 9 display scroll appearance set typedef struct GX SCROLLBAR APPEARANCE STRUCT gx scroll width INT gx scroll thumb width INT gx scroll thumb travel min INT gx scroll thumb travel max GX RESOURCE ID gx scroll fill pixelmap GX RESOURCE ID gx scroll thumb pixelmap GX RESOURCE ID gx scroll up pixelmap GX RESOURCE ID gx scroll down pixelmap GX COLOR gx scroll fill color GX COLOR gx scroll button color GX SCROLLBAR APPEARANCE gx scroll width Width of a vertical scrollbar or height of a horizontal scrollbar in pixels gx scroll thumb width Width of the elevator and end buttons in pixels gx scroll thumb travel min Offset from end of scroll bar to minimum thumb button travel point gx scroll thumb travel max Offset from the end of scroll bar to maximum thumb button travel point gx scroll fill pixelmap Pixelmap used to fill scroll background gx scroll thumb pixelmap Pixelmap used to draw scroll thumb button gx scroll up pixelmap Pixelmap used to draw scroll up button gx scroll down pixelmap Pixelmap used to draw scroll down button gx scroll fill color Color ID of color used to fill scrollbar b
324. pport for horizontal and vertical scrolling GUIX window objects can automatically create and display scroll bars and respond to scroll bar input Movable windows also have built in event handling to allow the window to be moved or dragged based on pen input events Finally GUIX window responds to receiving input focus by moving the window to the front of the window Z order GUIX window maintains the concept of client area which is the inner portion of the window once the window borders and non client objects such as scrollbars are removed from the available area Client area child widgets are clipped to the window client area while non client children such as scroll bars are allowed to draw outside of the client area but are still clipped to the window outer dimensions Windows are maintained in a parent child manner where the children inherit characteristics from their parent Children windows may have their own child windows again inheriting various characteristics from the parent The characteristics of any window may be explicitly redefined via various GUIX calls Window Creation A window object can be created during initialization or anytime during the execution of application threads There is no limit on the number of window objects that can be created by an application There is also no limit on the number of children any window may have Window Control Block The characteristics of each window object are found in its cont
325. priate debug options listed in the configuration option section Examine the return status from all API calls Determine if there is an internal system error by setting a breakpoint at the function 9x system error process There error code and caller should give clues as to what might be going wrong Temporarily bypass any recent changes to see if the problem disappears or changes Such information should prove useful to Express Logic support engineers Follow the procedures outlined in the section titled What We Need From You to send the information gathered from the troubleshooting steps Configuration Options There are several configuration options when building the GUIX library and the application using GUIX The options below can be defined in the application source on the command line or within the 9x user h include file Review the readme guix file for additional options for your specific version GUIX The following sections describe configuration options available in GUIX System Configuration Options Define Meaning THREAD STACK SIZE _ stack size in bytes of the internal GUIX thread created at system startup GX SYSTEM TIMER TICKS defines the GUIX timer rate as a multiple of the ThreadX tick interrupt rate GX TICKS SECOND useful definition for application logic must correlate with the GX SYSTEM TIMER TICKS definition GX CONST compiler specific definition of the const dat
326. prite Prototype UINT gx sprite create GX SPRITE sprite GX CONST GX CHAR name GX WIDGET parent GX SPRITE FRAME frame list USHORT frame count ULONG style USHORT sprite id GX CONST GX RECTANGLE size Description This service creates a SPRITE widget A sprite is used to display a sequence of pixelmaps as in an animation or can be used as a multi state pixelmap display widget The SPRITE widget requires an array of SPRITE FRAME structures to define the sprite animation The GX SPRITE FRAME structure is defined as typedef struct GX SPRITE FRAME STRUCT GX RESOURCE ID sprite frame pixelmap GX VALUE gx sprite frame x offset GX VALUE gx sprite frame y offset UINT gx sprite frame delay UINT gx sprite frame background operation UCHAR gx sprite frame alpha GX SPRITE FRAME The gx sprite frame pixelmap is the ID of the pixelmap to be displayed for this frame The ID can be The x and y offset fields specify an offset if desired from the top left corner of the sprite widget to display the pixelmap The frame delay field specifies the delay value in GUIX timer ticks after displaying this frame before advancing to the next sprite frame The background operation defines how the background should be erased Possible values for this field are GX SPRITE BACKGROUND NO ACTION no fill between frames SPRITE BACKGROUND SOLID FILL re draw sprite backgrou
327. queue The new event is placed at the end of the queue Parameters event Return Values GX SUCCESS 0x00 GX CALLER ERROR 0x11 ERROR 0 07 Allowed From Initialization and threads Example Send event for processing status gx system event send amp my event Pointer to event Successful event send Invalid caller of this function Invalid pointer If status SUCCESS the event has been sent for processing See Also system dirty partial add gx system draw context get system event send gx system focus claim gx system initialize gx system start gx system string get gx system string table get gx system string table set gx system string width get system timer start gx system timer stop gx system widget find GUIX User Guide 304 gx system focus claim Claim focus Prototype UINT gx system focus claim GX WIDGET widget Description This service claims the focus for the specified widget If the widget did no previously have focus it will receive a GX EVENT FOCUS GAINED event Parameters widget Pointer to widget control block to claim focus Return Values GX SUCCESS 0x00 Successful focus claim GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 Widget not valid Allowed From Initialization and threads Example Claim focus for widg
328. r info needle height slider info needle inset slider info needle Slider widget control block Pointer to slider info structure The GX SLIDER INFO structure has the following integer members minimum reported value maximum reported value current value value delta needle travel limit needle travel limit current need position needle width in pixels needle height in pixels needle drawing position hotspot offset needle hotspot offset new value Return Values GX SUCCESS GX CALLER ERROR GX PTR ERROR GX INVALID WIDGET GX INVALID VALUE Allowed From Initialization and threads GUIX User Guide New slider value Successful slider value set Invalid caller of this function 0x07 Invalid pointer Widget not valid Slider info or new value not valid 286 Set new value for slider my slider status gx slider value set amp my slider amp info new value If status is SUCCESS the new value has been set for slider slider See Also gx pixelmap slider create gx pixelmap slider draw gx pixelmap slider event process gx pixelmap slider pixelmap set gx slider create gx slider draw gx slider event process gx slider needle draw gx slider needle position get gx slider needle position get gx slider tickmarks draw gx slider travel get gx slider value calculate GUIX User Guide 287 gx sprite create Create s
329. r slider my slider status gx slider needle draw amp my slider If status is SUCCESS the needle for slider slider has been drawn See Also gx pixelmap slider create gx pixelmap slider draw gx pixelmap slider event process gx pixelmap slider pixelmap set gx slider create gx slider draw gx slider event process gx slider needle position get gx slider needle position get gx slider tickmarks draw gx slider travel get gx slider value calculate gx slider value set GUIX User Guide 278 gx slider needle position get Get slider needle position Prototype UINT gx slider needle position get GX SLIDER slider GX SLIDER INFO slider info GX RECTANGLE return position Description This service computes the slider needle position based on the current slider value Parameters slider Slider widget control block slider info Pointer to slider information structure defining the slider limits needle size and offset and other slider parameters The GX SLIDER INFO structure has the following integer members return position Pointer to destination for needle postion Return Values GX SUCCESS 0x00 Successful slider needle position get GX CALLER ERROR Invalid caller of this function GX PTR ERROR Invalid pointer GX INVALID WIDGET 0x12 Widget not valid GX INVALID VALUE Slider info not valid Allowed From Initialization and threads Example
330. r supplemental drawing the application may override the default drawing function with its own via the GUIX API gx_widget_draw_set This function allows the application to provide its own customized drawing function for any widget This further allows the application to define entire new widget types GUIX User Guide 44 e Application drawing functions can take advantage i e not duplicate the coding of the default drawing by simply calling it directly from the overridden drawing function Widget drawing is called exclusively from the context of the internal GUIX system thread In this way the timing and stack requirements to perform the drawing only apply to the GUIX thread Implementing Custom Drawing example The drawing function for any widget is referenced through an indirect function pointer which is a member of the GX WIDGET control block If you use GUIX Studio to define your widget you can install your own function pointer simply by typing the name of your function in the Drawing Function parameter of the widget properties and Studio will install your function pointer for you when the widget is created If you create the widget in your application code you must use the gx widget draw set API function to install your custom drawing function after the widget has been created For this example let s assume that you want to customize the appearance of a button The button will look very much like a GX TEXT BUTTON but we will
331. r text color set gx progress bar value set GUIX User Guide 221 gx progress bar font set Assign font used by progress bar Prototype UINT gx progress bar font set GX PROGRESS BAR progress bar GX RESOURCE ID font id Description This service assigns the font used by a progress bar Parameters progress bar Progress bar control block font id Font resource id Return Values GX SUCCESS 0x00 Successful prompt create GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 Invalid pointer Allowed From Initialization and threads Example UINT status gx progress bar font set progress bar FONT ID MEDIUM if status SUCCESS the font was successfully assigned See Also gx progress bar draw gx progress bar event process gx progress bar fill color set gx progress bar font set gx progress bar info set gx progress bar pielmap set gx progress bar range set gx progress bar text color set gx progress bar value set GUIX User Guide 222 gx progress bar info set Redefine the progress bar information structure Prototype UINT progress bar info set GX PROGRESS BAR progress bar GX PROGRESS BAR INFO info Description Re assign all progress bar drawing information Parameters progress bar Progress bar control block info Pointer to GX PROGRESS BAR INFO structure Return Values GX SUCCESS 0x00 Successful prompt create GX CALLER ERR
332. r window has been created You will almost always provide your own event handling for your top level windows also called Screens in order to process events generated by your child controls Processing event generated by the child controls of a screen is the main way you add functionality to your GUIX application As an example suppose you define top level screen named main menu This screen might be defined using GUIX Studio or you might create this screen in your application code If you define the screen within GUIX Studio you simply type the name of your event handler in the Studio properties field for that screen and the Studio generated specifications code will automatically install your event handler In this case we will call the custom event handler main menu event handler and it should be coded like this GUIX User Guide 43 int main menu item example variable to keep track of selected item UINT main menu event handler GX WINDOW main screen GX EVENT event ptr UINT status GX_SUCCESS switch event ptr gt gx event type this is an example for catching events from a child button case GX SIGNAL IDB CHILD BUTTON GX EVENT CLICKED insert your button handler code here break case GX_EVENT SHOW add functionality to the show event handler first do default processing status gx_window_event_process main_screen event ptr note 1 now add my own processing
333. rameters prompt Pointer to pixelmap prompt control block Return Values GX SUCCESS 0x00 Successful pixelmap prompt draw GX_CALLER_ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 X Widget not valid Allowed From Initialization and threads Example Draw prompt status gx pixelmap prompt draw amp my pixelmap prompt If status is SUCCESS the pixelmap prompt prompt has been drawn See Also gx pixelmap button create gx pixelmap button draw gx pixelmap button pixelmap set gx pixelmap prompt create gx pixelmap prompt pixelmap set gx pixelmap slider create pixelmap slider draw gx pixelmap slider event process gx prompt create gx prompt draw gx prompt font set gx prompt text color set gx prompt text get gx prompt text set GUIX User Guide 208 gx pixelmap prompt pixelmap set Prototype UINT Assign pixelmaps to prompt gx pixelmap prompt pixelmap set GX PIXELMAP PROMPT prompt GX RESOURC GX RESOURC GX RESOURC GX RESOURC GX RESOURC GX RESOURC Description E ID normal left pixelmap E ID normal fill pixelmap E ID normal right pixelmap E ID selected left pixelmap E ID selected fill pixelmap E ID selected right pixelmap This service assigns pixelmap ids to the pixelmap prompt Up to size pixelmaps
334. rance_get Get scroll appearance gx_system_scroll_appearance_set Set scroll appearance gx_system_start Start GUIX gx system string get Get string gx system string table get Get string table gx system string table set Set string table gx system string width get Get string width gx system theme install Install font color pixelmap tables gx system timer start Start timer gx system timer stop Stop timer gx system version string get Retrieve GUIX library version string gx system widget find Find widget gx text button create Create text button gx text button draw Draw text button gx text button font set Set font for text button gx text button text color set Set text button color gx text button text get Get text used in text button gx text button text id set Set system string to text button gx text button text set Set user defined string to text button gx transition window create Create a transition window gx utility Itoa Convert long integer to ASCII gx utility math cos Compute cosine gx utility math sin Compute sine gx utility math sqrt Compute square root gx utility rectangle center Center rectangle inside another rectangle gx utility rectangle center find Find center of rectangle gx utility rectangle combine
335. reate gx button deselect gx button draw gx button event process gx button select gx icon create gx icon draw gx icon pixelmap set gx pixelmap button create gx pixelmap button draw gx radio button create gx radio button draw gx text button create gx text button color set gx text button draw GUIX User Guide 171 gx icon create Create icon Prototype UINT gx icon create GX ICON icon GX CONST GX CHAR name GX WIDGET parent GX RESOURCE ID pixelmap id ULONG style USHORT icon id GX VALUE x GX VALUE y Description This service creates the specified icon widget Parameters icon Pointer to icon control block name Logical name of icon widget parent Pointer to the parent widget pixelmap id Resource ID of pixelmap style Style of icon icon id Application defined ID of icon x Starting x coordinate position y Starting y coordinate position Return Values GX SUCCESS 0x00 Successful icon create GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX ALREADY CREATED 0x13 Widget already created GX INVALID WIDGET SIZE 0x14 Invalid widget control block size GX INVALID RESOURCE ID 0x22 Invalid resource ID GX INVALID STYLE 0x18 Invalid style GX INVALID COORDINATE 0x21 Invalid coordinates Allowed From Initialization and threads GUIX User Guide 172 Create my icon status gx icon create amp my icon my icon amp
336. ren draw gx widget client get gx widget created gx widget created test gx widget delete gx widget detach gx widget draw gx widget draw set gx widget event generate gx widget event process set gx widget event to parent gx widget find gx widget front move GUIX User Guide 397 gx widget height get gx widget hide gx widget resize gx widget shift gx widget show gx widget status add gx widget status get gx widget status remove gx widget status test gx widget style add gx widget style get gx widget style remove gx widget style set gx widget width get GUIX User Guide 398 gx widget event process set Set event processing function of widget Prototype UINT gx widget event process set GX WIDGET widget UINT event processing GX WIDGET GX EVENT Description This service overrides the event processing function of the widget Parameters widget Pointer to widget event processing Pointer to new event processing function Return Values GX SUCCESS 0x00 Successful widget event processing override GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 Widget not valid Allowed From Initialization and threads GUIX User Guide 399 Use event process to process events for widget my widget status gx widget event process set amp my widget my event
337. rizontal scrollbar create gx scrollbar event process gx scrollbar limit check gx scrollbar reset gx vertical scrollbar create GUIX User Guide 246 gx scrollbar event process Process scrollbar event Prototype UINT gx scrollbar event process GX SCROLLBAR scrollbar GX EVENT event Description This service processes a scrollbar event A common event handling function is used for both vertical and horizontal scrollbar widgets Parameters scrollbar Scrollbar widget control block event Pointer to event to process Return Values GX SUCCESS 0x00 Successful scrollbar event process GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 _ Widget not valid Allowed From Initialization and threads Example Process event for scrollbar scrollbar status gx scrollbar event process amp my scrollbar amp my event If status is SUCCESS the event event for scrollbar my_scrollbar has been processed See Also gx horizontal scrollbar create gx scrollbar draw gx scrollbar limit check gx scrollbar reset gx vertical scrollbar create GUIX User Guide 247 gx scrollbar limit check Check scrollbar limit Prototype UINT gx scrollbar limit check GX SCROLLBAR scrollbar Description This service checks the limit of the scrollbar and prevents the scrollbar thumbwheel from traveling beyond the predefined l
338. rol block GX WINDOW and are defined in gx api h The memory required for a window object is provided by the application and can be located anywhere in memory However it is most common to make the window object control block a global structure by defining it outside the scope of any function Root Window GUIX requires what is called a root window for each canvas The root window is border less and has the same dimensions as the canvas to which it is attached It is used primarily as a container for all first level widgets and windows The root window is typically created by the application via the API gx window root create shortly after the creation of the screen and canvas If you use the Studio generated function 9x studio display configure the address of the root window can be returned in the location passed as the last parameter to this function GUIX User Guide 48 A root window defaults to being un moveable and in the simplest case the root window is the size of the canvas The root window in effect draws the display background so to change the display background color or to display background wallpaper you would assign a color or wallpaper to the root window If a root window is moveable it moves not by changing its position on the canvas as a child window would do but by moving the canvas itself This feature allows the GUIX root window to leverage hardware that supports multiple frame buffers with hardware offset registers B
339. rom the widget Parameters widget Pointer to widget return status Pointer to the status being returned Return Values GX SUCCESS 0x00 Successful widget status add GX CALLER ERROR 0x11 Invalid caller of this function GX_PTR_ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 Widget not valid Allowed From Initialization and threads GUIX User Guide 420 Retreive status flag from widget widget status gx widget status get amp my widget amp status If status is SUCCESS the status from widget my widget is saved to status See Also gx widget attach gx widget back move gx widget background set gx widget border draw gx widget border style set gx widget border width get gx widget canvas get gx widget child detect gx widget children draw gx widget client get gx widget created gx widget created test gx widget delete gx widget detach gx widget draw gx widget draw set gx widget event generate gx widget event process gx widget event process set gx widget event to parent gx widget find gx widget front move gx widget height get gx widget hide gx widget resize gx widget shift gx widget show gx widget status remove gx widget status test gx widget style add gx widget style get gx widget style remove gx widget style set gx widget width get GUIX User Guide 421 gx widget status remove Remove widget s
340. rsor to the string end Prototype UINT gx single line text input end GX SINGLE LINE TEXT INPUT text input Description This service positions the text input widget cursor at the end of the input string Parameters text input Single line text input widget control block Return Values GX SUCCESS 0x00 Successful single line text input create GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 Invalid pointer Allowed From Initialization and threads Example invoke backspace handler status gx single line text input end amp my text input If status is SUCCESS the cursor has been moved to the end of the text input string See Also single line text input backspace gx single line text input buffer clear single line text input buffer get gx single line text input create gx single line text input character delete gx single line text input character insert gx single line text input draw gx single line text input event process gx single line text input home gx single line text input left arrow gx single line text input position get gx single line text input right arrow gx single line text input style add gx single line text input style remove gx single line text input style set gx multi line text input create gx multi line text view create gx multi line text view event process gx multi line text view scroll
341. s gx widget style remove amp my widget GX STYLE BORDER RAISED If status is SUCCESS the widget my widget style was removed See Also gx widget attach gx widget back move gx widget background set gx widget border draw gx widget border style set gx widget border width get gx widget canvas get gx widget child detect gx widget children draw gx widget client get gx widget created gx widget created test gx widget delete gx widget detach gx widget draw gx widget draw set gx widget event generate gx widget event process gx widget event process set gx widget event to parent gx widget find gx widget front move gx widget height get gx widget hide gx widget resize gx widget shift gx widget show gx widget status add gx widget status get gx widget status remove gx widget status test gx widget style add gx widget style get gx widget style set gx widget width get GUIX User Guide 431 gx widget style set Set widget style Prototype UINT gx widget style remove GX WIDGET widget ULONG style Description This service sets a style to the widget Parameters widget Pointer to widget style Style to set Appendix D contains pre defined general styles for all widgets as well as widget specific styles Return Values GX SUCCESS 0x00 Successful widget style set GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid point
342. s a pointer to a table used to convert color Id values to color format specific color values PIXELMAP display pixelmap table This is a pointer to the active pixelmap table for this display GX FONT gx display font table This is a pointer to the active font table for this display GX COLOR gx display palette For palette mode drivers this is a pointer to the active color palette For drivers that do not use a color palette this pointer is GX NULL UINT gx display color table size Size of the active color table UINT gx display pixelmap table size Number of entries in the active pixelmap table UINT gx display font table size Number of entries in the active font table UINT gx display palette size Number of entries in color palette if any ULONG gx display handle UINT display driver ready This field is use to signal to GUIX when the driver is ready for operation In some cases the driver may require several levels of initialization and configuration during which time GUIX must not attempt to utilize the driver This flag should be set to 1 when the driver is ready to service drawing requests VOID display driver data This field is for use by the driver implementation If the driver needs to create and reference addtional information not available in the GX DISPLAY structure the driver should allocate space for and point to this additional data using this structure field An example of driv
343. s create amp default canvas demo canvas amp demo display GX CANVAS MANAGED GX CANVAS VISIBLE DEMO DISPLAY WIDTH DEMO DISPLAY HEIGHT default canvas memory sizeof default canvas memory Define the size of the root window gx utility rectangle define amp root window size 0 0 DEMO DISPLAY WIDTH 1 DEMO DISPLAY HEIGHT 1 Create a background root window and attach to the canvas gx window root create amp demo root window demo root window amp default canvas GX STYLE BORDER NONE GX ID NONE amp root window size Set the root window to be black gx widget background set amp demo root window COLOR ID BLACK GX COLOR ID BLACK Create a text prompt on the root window Set the text color to white and the background to black GUIX User Guide 461 Define the size and the position of the prompt gx utility rectangle define amp prompt position 100 90 220 130 Create the prompt on top of the root window using the string defined by string ID SID HELLO WORLD gx prompt create amp demo prompt NULL amp demo root window SID HELLO WORLD GX STYLE NONE GX ID NONE amp prompt position Set the text color to be white and the background color to be black gx prompt text color prompt COLOR ID WHITE COLOR ID WHITE gx widget background set amp demo prompt COLOR ID BLACK COLOR ID BLACK Show the root window gx widget
344. ses supported of various sizes Multiple displays of different sizes and color depths supported Screen Transition support fade in fade out swipe etc Touch Screen Gesture and Virtual Keyboard Support Bitmap compression Alpha Blending Support Dither Support Anti Aliasing Support Skinning and Themes Canvas Blending Complete Window Management o Parent Child Relationship o Dynamic creation deletion resizing moving o Separate event handling and drawing o 2 o Clipping and views Extensive Set of Widgets o Button Bitmap icon text Dialog Drop Down List Keyboard Prompt and Multi Line Prompts Scroll Bar Scrollable List Slider Sprite 0 0 Q OO ANSI C Source Code GUIX is written completely in ANSI C and is portable immediately to virtually any processor architecture that has an ANSI C compiler and ThreadX support Although written in ANSI C GUIX uses an object oriented model and inheritance Not A Black Box Most distributions of GUIX include the complete C source code This eliminates the black box problems that occur with many commercial GUI implementations By using GUIX applications developers can see exactly what the GUI is doing there are no mysteries Having the source code also allows for application specific modifications Although not recommended it is certainly beneficial to have the ability to modify the GUI if it is required These features are especially comforting to developers acc
345. show amp demo root window let GUIX run gx system start GUIX User Guide 462 Color GX COLOR BLACK GX COLOR RED GX COLOR GREEN GX COLOR BROWN GX COLOR BLUE GX COLOR MAGENTA GX COLOR CYAN GX COLOR LIGHTGRAY GX COLOR DARKGRAY GX COLOR LIGHTRED GX COLOR LIGHTGREEN GX COLOR YELLOW GX COLOR LIGHTBLUE GX COLOR LIGHTMAGENTA GX COLOR LIGHTCYAN GX COLOR WHITE GUIX User Guide Appendix A GUIX Pre Defined Colors Value 0x00000000 0x00b80000 0x0000bc00 0x00b8bc00 0x000000b8 0x00b800b8 0x0000bcb8 0x00c0c0c0 0x00808080 0Ox00ff0000 0x0000ff00 OxOOffffO00 0x000000ff 0 0 000 OxOOffffff 463 Appendix GUIX Pre Defined Color Resource IDs Color Value GX COLOR ID CANVAS 0 GX COLOR ID WIDGET FILL 1 GX COLOR ID WINDOW FILL 2 GX COLOR ID DEFAULT BORDER 3 GX COLOR ID WINDOW BORDER 4 GX COLOR ID TEXT 5 COLOR ID SELECTED TEXT 6 GX COLOR ID SELECTED FILL 7 GX COLOR ID SHADOW 8 GX COLOR ID SHINE 9 COLOR ID BUTTON BORDER 10 GX COLOR ID BUTTON UPPER 11 GX COLOR ID BUTTON LOWER 12 GX COLOR ID BUTTON TEXT 13 GX COLOR ID SCROLL FILL 14 GX COLOR ID SCROLL BUTTON 15 COLOR ID TEXT INPUT TEXT 16 GX COLOR ID TEXT INPUT FILL 17 GX COLOR ID SLIDER TICK 18 GX COLOR ID SLIDER GROOVE TOP 19 GX COLOR ID SLIDER GROOVE BOTTOM 20 GX COLOR ID SLIDER NEEDLE OUTLINE 21 GX COLOR ID SLIDER NEEDLE FILL 22 COLOR ID SLIDER NEEDLE LINE1 23 GX COLOR ID SLIDER NEEDLE LINE2 24 GUIX
346. single line text input style set gx multi line text input create gx multi line text view create gx multi line text view event process gx multi line text view scroll GUIX User Guide 263 gx single line text input left arrow Move input cursor one character to the left Prototype UINT gx single line text input left arrow GX SINGLE LINE TEXT INPUT text input Description This service moves the text input cursor one character position to the left Parameters text input Single line text input widget control block Return Values GX SUCCESS 0x00 Successful GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 Invalid pointer Allowed From Initialization and threads Example invoke backspace handler status gx single line text input left arrow amp my text input If status is SUCCESS the text input cursor has been moved See Also gx single line text input backspace gx single line text input buffer clear gx single line text input buffer remove gx single line text input create gx single line text input character delete gx single line text input character insert gx single line text input draw gx single line text input end gx single line text input home gx single line text input position get single line text input right arrow gx single line text input style add gx single line text input style re
347. ss bar value set GUIX User Guide 225 gx progress bar text color set Assign the text color of a progress bar Prototype UINT gx progress bar text color set GX PROGRESS BAR progress bar GX RESOURCE ID normal text color GX RESOURCE ID selected text color Description This service assigns the colors used to draw the progress bar text Parameters progress bar Progress bar control block normal text color Resource ID of normal text color selected text color Resource ID of selected text color Return Values GX SUCCESS 0x00 Successful prompt create GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 Invalid pointer Allowed From Initialization and threads Example UINT status gx progress bar text color set progress bar COLOR ID WHITE GX COLOR ID BLUE if status SUCCESS the progress bar text colors were successfully assigned See Also gx progress bar draw gx progress bar event process gx progress bar fill color set gx progress bar font set gx progress bar info set gx progress bar pielmap set gx progress bar range set gx progress bar text color set gx progress bar value set GUIX User Guide 226 gx progress bar value set Assign current value of a progress bar Prototype UINT progress bar value set GX PROGRESS BAR progress bar value Description This service assigns the progress bar current value The progress b
348. suspends the GUIX thread until a new input event or events arrive GUIX User Guide 14 Event Processing Touch or pen input events are processed by determining the top most window or widget beneath the touch or pen input pixel position and calling that window widget s event processing function If the widget understands pen input events it will process the event as appropriate for that widget type If not the top most widget will pass the touch or pen input event to the widget s parent for processing This passing of the event up the chain continues until either the event is handled or the event arrives at the root window in which case the event is discarded Keypad events are sent to the window widget that has input focus Input focus status is maintained by the GUIX gx system component Timer events are always dispatched to the window or widget that owns the timer for processing Internally generated events such as button click events or slider value change events are always sent to the parent of the widget generating the event If the parent does not process the event it is passed up the chain similar to touch or pen input events Drawing Once all the event processing is complete the GUIX internal thread determines if any display update is needed and if so the appropriate window widget drawing functions are called When drawing is complete the GUIX internal thread simply waits on its event queue for the next GUIX event to process
349. system string get MY STRING RESOURCE amp my string If status is SUCCESS the string is contained in my string See Also gx system dirty partial add gx system draw context get gx system event send gx system focus claim gx system initialize gx system start gx system string get gx system string table get gx system string table set gx system string width get system timer start gx system timer stop gx system widget find GUIX User Guide 314 gx system string table get Retrieves the string table Prototype UINT gx system string table get INT language GX CHAR string table UINT get size Description This service retrieves the system string table Parameters language Language index string table Pointer to storage space of the string table pointer or NULL if the caller does not need to get the pointer to the string table get size Pointer to the storage for the number of strings in string table or NULL if the caller does not need to get the number of strings in the string table Return Values GX SUCCESS 0x00 Successful string table get GX CALLER ERROR 0x11 Invalid caller of this function Allowed From Initialization and threads Example Get the string table CHAR my_string_table UINT table_size status gx system string table get LANGUAGE ID ENGLISH amp my string table amp table size If status is SUCCESS
350. t gx single line text input create gx multi line text input style add gx multi line text input style set gx multi line text view create gx multi line text view event process gx multi line text view font set gx multi line text view scroll gx multi line text view text color set gx multi line text view text id set gx multi line text view text set gx multi line text input style set Set styles GUIX User Guide 187 UINT gx multi line text input set GX MULTI LINE TEXT INPUT text input ULONG style Description This service sets styles for multi line text input widget Parameters text input Multi line text input widget control block style Styles to set Appendix D contains pre defined general styles for all widgets Return Values GX SUCCESS 0x00 Successful multi line text input create GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 Invalid pointer Allowed From Initialization and threads Example Set style STYLE CURSOR ALWAYS for text input widget my text input status gx multi line text input style set amp my text input GX STYLE CURSOR ALWAYS If status is SUCCESS the text input style has been set See Also gx multi line text input buffer get gx multi line text input create gx multi line text input style add gx multi line text input style remove gx multi line text view create gx multi line
351. t software implementation for the color depth you want to support then replace those function pointers where desired to call your custom function implementations if any To assist with this there is a default setup function available for each supported color depth and format For example if you are writing a 16 bit 5 6 5 format RGB display driver the first thing your custom driver would normally do is invoke the generic setup routine for this color depth UINT my custom 565 display driver GX DISPLAY display perform standard function pointer setup gx display driver 565rgb setup display NULL my buffer toggle GUIX User Guide 452 The parameter my buffer toggle above is a pointer to your display driver buffer toggle function which may be GX NULL if your driver is single buffered and drawing directly to the hardware frame buffer If you are writing a custom display driver you will need to include the 9x display h header file in your custom driver source which is an internal use header file not available to application level software The GUIX display level drawing functions receive as input a pointer to a DRAW CONTEXT structure The DRAW CONTEXT structure defines the clipping coordinates for the current drawing operation along with the brush and colors being used Each drawing function receives as input additional parameters specific to the function requirements The signature of the DISPLAY driver entr
352. t brush get gx context brush set gx context brush pattern set gx context brush style set gx context brush width set GUIX User Guide 139 context fill color set gx context font set gx context line color set gx context set gx context raw brush define gx context raw fill color set GUIX User Guide 140 gx display color set Re assign one color value Prototype UINT gx display color set GX DISPLAY display GX RESOURCE ID color id GX COLOR new color Description This service re assigns the color value associated with the specified color ID This can be used to modify the color table of a display without providing an entirely new color table The color value provided must be in the native format supported by the display Parameters display Pointer to display control block color id Color ID to reassign new color Color value to assign to this color id slot Return Values GX SUCCESS 0x00 Successful screen create GX PTR ERROR 0x07 Invalid pointer Allowed From Initialization and threads Example Change value of color MY COLOR ID status gx display color set amp my display MY COLOR 10 0x5454 If status is SUCCESS the color has been reassigned See Also gx display color table set GUIX User Guide 141 gx display color table set Assign display color table Prototype UINT gx display color table set GX DISPLAY displ
353. t event Prototype UINT gx horizontal list event process GX HORIZONTAL LIST list GX EVENT event Description This service processes an event for the horizontal list Parameters list Horizontal list widget control block event Pointer to event to process Return Values GX SUCCESS 0x00 Successfully processed horizontal list event GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 Widget not valid Allowed From Initialization and threads Example Process my event for horizontal list my list status gx horizontal list event process amp my list amp my event If status is GX SUCCESS the event for horizontal list list has been processed See Also gx horizontal list children position gx horizontal list create gx horizontal list page index set gx horizontal list selected index get gx horinzontal list selected widget get gx horizontal list selected set gx horizontal list total columns set GUIX User Guide 158 gx horizontal list page index set Set starting page index Prototype UINT horizontal list page index set GX HORIZONTAL LIST list INT index Description This service sets the starting index for the horizontal list Parameters list Horizontal list widget control block event The new top index Return Values GX SUCCESS 0x00 Successfully set starting page index for
354. t event process set gx widget event to parent gx widget find gx widget front move gx widget height get gx widget hide gx widget resize 9x widget shift gx widget show gx widget status add gx widget status get gx widget status remove gx widget status test gx widget style add gx widget style get gx widget style remove gx widget style set gx widget width get GUIX User Guide 385 gx widget color get Get color Prototype UINT gx widget color get GX WIDGET widget GX RESOURCE ID resource id GX COLOR return color Description This service gets the color associated with the supplied resource ID This service should only be called by visible widgets Parameters widget Pointer to widget control block resource id Resource ID of color Appendix B contains pre defined color Resource IDs Note that the application may add custom color Resource IDs as well return color Pointer to destination for color Appendix A contains pre defined colors Note that the application may add custom colors as well Return Values GX SUCCESS GX CALLER ERROR GX PTR ERROR GX INVALID RESOURCE ID 0x00 Successful color get Ox11 Invalid caller of this function 0x07 Invalid pointer 0x22 Invalid resource ID Allowed From Initialization and threads GUIX User Guide 386 Get color for resource ID FIRST COLOR ID status gx wi
355. t pixelmap set gx drop list popup get GUIX User Guide 148 gx drop list create Prototype Create a drop list UINT gx drop list create GX DROP LIST drop list GX CONST GX CHAR name GX WIDGET parent INT total rows INT open height VOID callback GX VERTICAL LIST GX WIDGET INT ULONG style USHORT drop list id GX CONST GX RECTANGLE size Description This service creates a drop list Parameters drop list name parent total rows open height callback style drop list id size Return Values Pointer to the drop list control block Name of the drop list Pointer to the parent widget Total number of rows in the drop list The height of the vertical list displayed when the drop list is opened Function called by the vertical list when the list is scrolled if the total number of list rows are greater than the list visible rows The user must provide a function to create list row widgets as the list is scrolled Only the visible number of list widgets are required at one time and the application can therefore re use widget slots that have been scrolled out of view The drop down list border style Application defined ID of the drop list Dimensions of the drop list GX SUCCESS 0x00 Successful screen create GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer Allowed From Initialization and threads GUIX User Guide 149
356. t shift Shift widget gx widget show Show widget gx widget status add Add widget status gx widget status get Retrieve widget status flags GUIX User Guide 58 gx widget status remove Remove widget status gx widget status test Test widget status gx widget style add Add widget style gx widget style get Retrieve widget style flags gx widget style remove Remove widget style gx widget style set Set widget style gx widget text draw Draw text assigned to widget gx widget text id draw Draw text assigned to widget gx widget type find Find widget type gx widget width get Get widget width gx window canvas set Set window canvas gx window client height get Get window client height gx window client scroll Scroll window clients gx window client width get Get window client width gx window create Create window gx window draw Draw window gx window event process Process window event gx window root create Create root window gx window root delete Destroy root window gx window root event process Process event for root window gx window root find Find root window gx window scroll info get Get window scroll info gx window scrollbar find Find window scrollbar gx window wallpaper get Get window wallpaper gx window wal
357. t the list entry at the current index of horizontal list list status gx horizontal list selected index get amp my list amp current index entry If status is SUCCESS current index contains the current list selection index See Also gx horizontal list children position gx horizontal list create gx horizontal list event process gx horizontal list page index set gx horinzontal list selected widget get gx horizontal list selected set gx horizontal list total columns set GUIX User Guide 160 gx horizontal list selected widget get Get selected entry from horizontal list Prototype UINT gx horizontal list selected widget get GX horizobntal LIST horizontal list GX WIDGET return list entry Description This service returns the selected list entry of the horizontal list Note that if the horizontal list has more rows than child widgets and the selected entry has been scrolled from view this will return GX NULL because the child widgets are re used as the list content is scrolled The gx horizontal list selected index get function will reliably return the index of the selected item even if that item has been scrolled from view Parameters horizontal list Horizontal list widget control block return list entry Destination for return list entry widget Return Values GX SUCCESS 0x00 Successful obtained the horizontal list entry GX CALLER ERROR Invalid caller of this f
358. t valid status gx pixelmap slider create amp my pixelmap slider my pixelmap slider amp my parent amp info amp pixelmap info STYLE BORDER RAISED PIXELMAP SLIDER 10 amp size If status is SUCCESS the pixelma See Also p slider my pixelmap slider has been created gx pixelmap button create gx pixelmap button draw gx pixelmap button pixelmap set gx pixelmap prompt create gx pixelmap prompt draw gx pixelmap prompt pixelmap set gx pixelmap slider draw gx slider event process ox slider create gx slider draw gx slider event process gx slider needle draw gx slider needle position get gx slider needle position get gx slider tickmarks draw gx sl ider travel get gx slider value calculate gx slider value set GUIX User Guide 213 gx pixelmap slider draw Draw pixelmap slider Prototype UINT gx pixelmap slider draw GX PIXELMAP SLIDER slider Description This service draws a pixelmap slider widget Parameters slider Pointer to pixelmap slider control block Return Values GX SUCCESS 0x00 Successful pixelmap slider draw GX CALLER ERROR 0x11 X Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 _ Widget not valid Allowed From Initialization and threads Example Draw slider status gx pixelmap slider draw amp my slider If status is
359. tained by the GUIX display component GUIX User Guide 30 The default color settings are defined by the color table assigned to each display the pre defined default color IDs These default color ids include GX COLOR ID CANVAS Default canvas i e display background color GX COLOR ID WIDGET FILL Default widget fill color GX COLOR ID WINDOW FILL Default window fill color COLOR ID DEFAULT BORDER Default widget border color COLOR ID WINDOW BORDER Default window border color GX COLOR ID TEXT Default text color GX COLOR ID SELECTED TEXT Default selected text color GX COLOR ID SELECTED TEXT FILL Default selected text fill color GX COLOR ID SCROLL FILL Scrollbar fill color COLOR ID SCROLL BUTTON Scrollbar button fill color GX COLOR ID SHADOW Default shadow color GX COLOR ID SHINE Default highlight color COLOR ID BUTTON BORDER Button widget border color GX COLOR ID BUTTON UPPER Button widget upper fill color GX COLOR ID BUTTON LOWER Button widget lower fill color GX COLOR ID BUTTON TEXT Button widget text color GX COLOR ID TEXT INPUT TEXT Text input widget text color COLOR ID TEXT INPUT FILL Text input fill color COLOR ID SLIDER GROOVE TOP Color used to draw slider groove COLOR ID SLIDER GROOVE BOTOM Color used to draw slider groove GX COLOR ID SLIDER NEEDLE OUTLINE Color used to draw needle outline GX COLOR ID SLIDER NEEDLE FILL Color used to fill slider needle COLOR ID SLIDER NEEDLE LI
360. tained by the GUIX system module since string resources do not normally need to be changed based on color depth and format The application software references resources by their resource Id which is an index into the corresponding resource table This allows the table to be changed for example the color table might be changed when a product changes from day mode to night mode but the color ID values to remain the same Your application resources are written to a resource file or set of resource files by the GUIX Studio application Default colors pixelmaps and fonts are provided automatically when you create a new GUIX Studio project but these defaults are easily replaced as you define the look and feel of your application It is important to note that Resource IDs for colors fonts and pixelmaps cannot be resolved to their actual color font or pixelmap values until the active Display component is known Since the GUIX architecture supports multiple active displays Resource IDs can only be resolved to resource values when a widget and its associated Resource ID can be resolved to a specific display This property is known as dynamic binding The Resource ID for a property such as a text color for example the resource ID GX COLOR ID TEXT might resolve to a 16 bit R G B value for white when used on one display but the same color ID might resolve to a monochrome black color value when used on another display In practice this dyn
361. tatus Prototype UINT gx widget status remove GX WIDGET widget ULONG status Description This service removes the specified status flags from the widgets internal status variable Parameters widget Pointer to widget status Status to remove Return Values GX SUCCESS 0x00 Successful widget status removal GX CALLER ERROR Invalid caller of this function GX PTR ERROR Invalid pointer GX INVALID WIDGET 0x12 Widget not valid GX INVALID STATUS Status not valid Allowed From Initialization and threads GUIX User Guide 422 Remove status of widget my widget status gx widget status remove amp my widget status to remove If status is SUCCESS the widget my widget status was See Also gx widget attach gx widget back move gx widget background set gx widget border draw gx widget border style set gx widget border width get gx widget canvas get gx widget child detect gx widget children draw gx widget client get gx widget created gx widget created test gx widget delete gx widget detach gx widget draw gx widget draw set gx widget event generate gx widget event process gx widget event process set gx widget event to parent gx widget find gx widget front move gx widget height get gx widget hide gx widget resize gx widget shift gx widget show gx widget status add gx widget status get gx widget status test gx widget style add gx widget s
362. te gx widget detach gx widget draw gx widget draw set gx widget event generate gx widget event process gx widget event process set gx widget event to parent gx widget find gx widget front move gx widget height get gx widget hide gx widget resize gx widget shift gx widget show gx widget status add gx widget status get gx widget status remove gx widget status test gx widget style add gx widget style get gx widget style remove gx widget style set gx widget width get GUIX User Guide 377 gx widget canvas get Get widget canvas Prototype UINT gx widget canvas get GX WIDGET widget GX CANVAS return canvas Description This service returns a pointer to the canvas onto which this widget is rendered Parameters widget Pointer to widget return canvas Pointer to destination for widget s canvas Return Values GX SUCCESS 0x00 Successful widget canvas get GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer INVALID WIDGET 0x12 X Widget not valid Allowed From Initialization and threads Example Get canvas associated with my widget status gx widget canvas get amp my widget amp my canvas If status is SUCCESS canvas contains the canvas of the widget widget See Also gx widget attach gx widget back move gx widget background set gx widget border draw gx widget b
363. ters text button Pointer to text button control block normal text color id Resource ID of normal text Appendix B contains pre defined color Resource IDs Note that the application may add custom color Resource IDs as well selected text color id Resource ID of selected text Appendix B contains pre defined color Resource IDs Note that the application may add custom color Resource IDs as well Return Values GX SUCCESS 0x00 Successful text button color set GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 Widget not valid INVALID RESOURCE ID 0x22 Invalid resource ID Allowed From Initialization and threads GUIX User Guide 328 Set the color of the text button my text button status gx text button text color set amp my text button COLOR YELLOW 10 COLOR BLUE 10 If status is SUCCESS the text color my text button was set See Also gx button background draw gx button create gx button deselect gx button draw gx button event process gx button select gx icon button create x pixelmap button create gx pixelmap button draw gx text button create gx text button draw gx text button font set gx text button text get gx text button text set gx text button text id set GUIX User Guide 329 gx text button text get Get text from the thext button Prototype UINT gx text
364. text brush default gx context brush define gx context brush set gx context brush style set gx context brush pattern set gx context brush width set gx context fill color set gx context font set gx context line color set gx context pixelmap set gx context raw brush define gx context raw fill color set gx context raw line color set GUIX User Guide 121 gx context brush set Set brush of current drawing context Prototype UINT gx context brush set GX BRUSH brush Description This service sets the brush of the current drawing context Parameters brush Pointer to brush to use for current context Return Values GX SUCCESS 0x00 Successful context brush set GX INVALID CONTEXT 0x06 No active drawing context GX CALLER ERROR 0x11 X Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer Allowed From Initialization and threads Example Set the brush of the current context status gx_context_brush_set my_brush If status is GX_SUCCESS the brush of the current context has been set See Also gx_context_brush_default gx_context_brush_define gx_context_brush_get gx_context_brush_pattern_set gx_context_brush_style_set gx_context_brush_width_set gx_context_fill_color_set gx_context_font_set gx_context_line_color_set gx_context_pixelmap_set gx_context_raw_brush_define gx_context_raw_fill_color_set gx_context_raw_line_color_set
365. text input widget status gx multi line text input buffer get amp my text input amp buffer address amp string size amp buffer size If status is SUCCESS the value of buffer address string size and buffer size has been retrieved See Also gx multi line text input create gx multi line text input style remove gx multi line text input style set gx multi line text view create gx multi line text view event process gx multi line text view font set gx multi line text view scroll gx multi line text view text color set gx multi line text view text id set gx multi line text view text set GUIX User Guide 185 gx multi line text input style add Add styles Prototype UINT gx multi line text input style add GX MULTI LINE TEXT INPUT text input ULONG style Description This service adds styles to multi line text input widgtet Parameters text input Multi line text input widget control block style Styles to add Appendix D contains pre defined general styles for all widgets Return Values GX SUCCESS 0x00 Successful multi line text input create GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 Invalid pointer Allowed From Initialization and threads Example Add style STYTLE CURSOR ALWAYS to multi line text input widget my text input status gx multi line text input style add amp my text input GX STYLE CURSOR
366. text view event process gx multi line text view font set gx multi line text view scroll gx multi line text view text color set gx multi line text view text id set gx multi line text view text set GUIX User Guide 188 gx multi line text view char index set Assign a character index buffer to the multi line text view widget Prototype UINT gx multi line text view char index set GX MULTI LINE TEXT VIEW text view int index buffer ptr Description This service assigns a buffer to the mult line text view for Parameters text view Multi line text view widget control block name Name of text view widget parent Pointer to parent widget input buffer Pointer to text view buffer style Style of text view widget Appendix D contains pre defined general styles for all widgets as well as widget specific styles text input id Application defined ID of text view size Dimensions of text view widget Return Values GX SUCCESS 0x00 Successfully created multi line text view widget GX CALLER ERROR Invalid caller of this function GX PTR ERROR Invalid pointer GX ALREADY CREATED 0x13 Widget already created GX INVALID WIDGET Widget not valid Allowed From Initialization and threads GUIX User Guide 189 Create multi line text view widget my text view status gx multi line text view create amp my text view my text view amp my parent my b
367. the horizontal list GX CALLER ERROR Invalid caller of this function GX PTR ERROR Invalid pointer GX INVALID VALUE 0x22 Invalid value GX INVALID WIDGET Widget not valid Allowed From Initialization and threads Example Sets the starting page index of horizontal list list as top index status gx horizontal list page index set amp my list amp top index If status is SUCCESS the starting page index of m list has been set See Also gx horizontal list children position gx horizontal list create gx horizontal list event process gx horizontal list selected index get gx horinzontal list selected widget get gx horizontal list selected set gx horizontal list total columns set GUIX User Guide 159 gx horizontal list selected index get Get selected entry index from horizontal list Prototype UINT gx horizontal list selected index get GX horizobntal LIST horizontal list INT return index Description This service returns the selected list entry index of the horizontal list Parameters horizontal list Horizontal list widget control block return index Destination for return list index Return Values GX SUCCESS 0x00 Successful obtained the horizontal list entry GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 Widget not valid Allowed From Initialization and threads Example Ge
368. the gx canvas create API function GUIX User Guide 22 GX CONTEXT The drawing context component The drawing context contains information about the screen canvas and brush and clipping area for the current drawing operations GX DISPLAY Provides the APIs and driver level implementations to allow your application and the GUIX widgets to perform drawing on a canvas GX DISPLAY is implemented to correctly render graphics on each canvas using that canvas required color format The GX DISPLAY component also manages the resources colors fonts and pixelmaps available to widgets drawing to canvases linked to each display GX WIDGET The basic visible widget object and associated APIs GUIX widget types are based on or derived from the basic GX WIDGET type GX UTILITY Utility functions for working with rectangles functions for string conversion and non ANSI mathematical functions are included in this group In addition to these basic components GUIX includes APIs unique to each type of widget provided in the library These APIs are described in the API manual GUIX System Component The GUIX system component provides several services that are global to the UI application These services include initialization event management display management resource management timer management and widget management Each service is essential to the organization of your application program and these services are described in more deta
369. the pointer to the string table has been obtained See Also system dirty partial add gx system draw context get system event send gx system focus claim gx system initialize system start gx system string get gx system string table get gx system string table set gx system string width get system timer start gx system timer stop gx system widget find GUIX User Guide 315 GUIX User Guide 316 gx system string width get Get string width Prototype UINT gx system string width get GX FONT font GX CHAR string INT string length GX VALUE return width Description This service computes the display width of the supplied string in pixels using the specified font If the string length parameter is 0 only the request count of characters are included in the calculation If the string length parameter is 1 the entire string up to the NULL terminator is used in the calculation Parameters font Pointer to string s font string Pointer to string string length Length of string return width Destination for width of string Return Values GX SUCCESS 0x00 Successful string width get GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID FONT 0x16 Invalid font GX INVALID SIZE 0x19 Invalid string length Allowed From Initialization and threads Example Get the string width of string status g
370. tical list Vertical list widget control block return index Destination for return of selected index Return Values GX SUCCESS 0x00 Successfully get the vertical list entry GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 Widget not valid Allowed From Initialization and threads Example Get the list entry at the current index of vertical list list status gx vertical list selected index get amp my list amp current list index If status is SUCCESS current list index contains the index of the selected list item See Also gx vertical list children position gx vertical list create gx vertical list event process gx vertical list page index set 9x vertical list selected widget get gx vertical list selected set gx vertical list total rows set GUIX User Guide 355 gx vertical list selected widget get Get entry from vertical list Prototype UINT gx vertical list selected widget get GX VERTICAL LIST vertical list GX WIDGET return list entry Description This service returns the selected widget of the vertical list Note that if the list contains more rows than child widgets and the selected child widget has been scrolled from view this function will return GX NULL as the GX WIDGET pointer since the widget has been re used to display a new list entry Parameters vertical list Verti
371. tility rectangle compare gx utility rectangle define gx utility rectangle grow gx utility rectangle overlap detect gx utility rectangle point detect gx utility rectangle shift GUIX User Guide 338 gx utility pixelmap simple rotate Rotate pixelmap Prototype UINT gx utility pixelmap simple rotate GX PIXELMAP src INT angle GX PIXELMAP destination UINT rot cx UINT rot cy Description This service rotates a pixelmap by 90 180 or 270 degree Parameters src The pixelmap to rotate angle Angle of rotation in degrees destination Destination buffer for the resulting pixelmap rot cx Retrieved x coordinate of rotation center with respect to destination pixelmap Should be initiated with the x coordinate of rotation center with respect to source pixelmap If rot cx is NULL value will not be retrieved rot cy Retrieved y coordinate of rotation center with respect to destination pixelmap Should be initiated with the y coordinate of rotation center with respect to source pixelmap If rot cy is GX NULL value will not be retrieved Return Values None Allowed From All Example rot cx source rotate center x rot cy source rotate center rotate src pixelmap by 90 degree in clockwise direction GUIX User Guide 339 status gx utility pixelmap rotate src pixelmap 90 amp des_pixelmap amp rot cx amp rot If status is SUCCESS des pixelmap successfull
372. time environment This demonstration consists of a simple Hello World prompt on top of the root window Include necessary system files finclude tx api h finclude gx api h Define constants for the GUIX Win32 demo Define t he display dimentions specific to this implemenation define DEMO DISPLAY WIDTH 320 define DEMO DISPLAY HEIGHT 240 Define t he number of pixels on the canvas fdefine DEFAULT CANVAS PIXELS DEMO DISPLAY WIDTH DEMO DISPLAY HEIGHT Define t TX THREAD Define t ULONG Define t GUIX dis GX DISPLAY he ThreadX demo thread control block demo thread he stack for the demo thread demo thread stack 4096 sizeof ULONG he GUIX resources for this demo play represents the physical display device demo display GUIX canvas is the frame buffer on top of GUIX displayl GX CANVAS default canvas The root window is a special GUIX background window right on top of the canvas GX WINDOW ROOT demo root window GUIX Prompt displays a string GX PROMPT demo prompt Memory for the frame buffer GX COLOR default canvas memory DEFAULT CANVAS PIXELS Define GUIX strings ID for the demo enum demo string ids SID HELLO WORLD 1 SID MAX Define GUIX string for the demo CHAR demo strings NULL Hello World Static GX User define
373. tion and threads Example Shift canvas canvas Pointer to canvas control block Pixels to shift on the X axis Pixels to shift on the Y axis Successful canvas shift Invalid caller of this function 0x07 Invalid pointer Invalid canvas status gx canvas shift amp my canvas 10 15 If status is SUCCESS the canvas has been shifted by 10 pixels on the X axis and 15 on the Y axis See Also gx canvas alpha set gx canvas create gx canvas drawing complete gx canvas initiate gx canvas offset set GUIX User Guide 101 gx canvas text draw Draw text Prototype UINT gx cavas text draw GX VALUE x start GX VALUE y start GX CHAR string INT length Description This service draws text on the canvas Parameters x start Starting x coordinate for text y start Starting y coordinate for text string Pointer to string to draw length If length gt 0 limits the number of characters drawn to length If lengh 0 the entire string until NULL terminator is drawn Return Values GX SUCCESS 0x00 Successful text draw GX_CALLER_ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer INVALID COORDINATE 0x21 Invalid coordinate s GX INVALID SIZE 0x19 Invalid size of string Allowed From Initialization and threads Example Draw text example on current canvas status gx canvas text draw 10 20 example 7
374. to assist with implementing custom scrollbar behaviors Parameters scroll thumb Scroll thumb widget control block event Pointer to event to process Return Values GX SUCCESS 0x00 Successful scroll thumb event process GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 X Widget not valid Allowed From Initialization and threads Example Process event for scroll thumb scroll thumb status gx scroll thumb event process amp my scroll thumb amp my event If status is SUCCESS the event for scroll thumb my scroll thumb has been processed See Also gx scroll thumb create gx scroll thumb draw GUIX User Guide 245 gx scrollbar draw Draw scrollbar Prototype UINT gx scrollbar draw GX SCROLLBAR scrollbar Description This service draws a scrollbar A common drawing function is used for both vertical and horizontal scrollbar widgets Parameters scrollbar Scrollbar widget to draw Return Values GX SUCCESS 0x00 Successful scrollbar draw GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 Widget not valid Allowed From Initialization and threads Example Draw scrollbar my_scrollbar status gx_scrollbar_draw amp my_scrollbar If status is SUCCESS the scrollbar my_scrollbar has been drawn See Also gx ho
375. to canvas control block name Logical name for the canvas display Pointer to previously created display type Type of canvasThe canvas types include GX CANVAS SIMPLE A memory canvas which is used to off screen drawing GX CANVAS MANAGED A canvas which automatically flushed to the active display either as part of the composite building process or as part of the buffer toggle operation for single canvas architectures GX CANVAS VISIBLE This flag can be used to turn on and off a canvas without losing the canvas drawing contents GX CANVAS MODIFIED Reserved for future use GX CANVAS COMPOSITE This flag is used by the application when configuring a multiple canvas system which will composite multiple managed canvases into the composite canvas and the composite is the driven to the hardware frame buffer GUIX User Guide 82 width Width in pixels height Height in pixels memory area Memory area for canvas memory size Size of memory area in bytes Return Values GX SUCCESS 0x00 Successful canvas create GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX ALREADY CREATED 0x13 Widget already created GX INVALID CANVAS SIZE 0x1C Invalid canvas control block size GX INVALID TYPE 0x1B Invalid canvas type GX INVALID WIDGET SIZE 0x19 Invalid widget size Allowed From Initialization and threads Example Define global canvas memory area GX COLOR my canvas memor
376. tyle add gx widget style get gx widget style remove gx widget style set gx widget width get GUIX User Guide 396 gx widget event process Process widget event Prototype UINT gx widget event process WIDGET widget GX EVENT event Description This default event processing function for all widgets When a custom event processing function is written the default action for any event type should always be to pass the event to the widget type upon which a widget is based Widgets that are based on the most basic GX WIDGET type pass use gx widget event process as their default event processing function Parameters widget Pointer to widget event Pointer to event to process Return Values GX SUCCESS 0x00 Successful widget event processing GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 Widget not valid Allowed From Initialization and threads Example Process event my event for widget my widget status gx widget event process amp my widget amp my event If status is SUCCESS the event event for widget my widget has been processed See Also gx widget attach gx widget back move gx widget background set gx widget border draw gx widget border style set gx widget border width get gx widget canvas get gx widget child detect gx widget child
377. tyle get gx widget style remove gx widget style set gx widget width get GUIX User Guide 423 gx widget status test Test widget status Prototype UINT gx widget status test GX WIDGET widget ULONG status GX BOOL return test Description This service tests the status flags of the specified widget Parameters widget Pointer to widget status Status to test return status Pointer to destination for result of test Return Values GX SUCCESS 0x00 Successful widget status test GX CALLER ERROR Invalid caller of this function GX PTR ERROR Invalid pointer GX INVALID WIDGET 0x12 Widget not valid GX INVALID STATUS Status not valid Allowed From Initialization and threads GUIX User Guide 424 Test status of widget widget status gx widget status test amp my widget status to test amp test result If status is SUCCESS the widget widget status was tested and the result in test result See Also gx widget attach gx widget back move gx widget background set gx widget border draw gx widget border style set gx widget border width get gx widget canvas get gx widget child detect gx widget children draw gx widget client get gx widget created gx widget created test gx widget delete gx widget detach gx widget draw gx widget draw set gx widget event generate gx widget event process gx widget ev
378. uage table Parameters language table Pointer to language table languages count Number of languages in table string count Number of string table rows Return Values GX SUCCESS 0x00 Successful GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer Allowed From Initialization and threads Example Retrieve the language table status gx system language table set language table language count string count See Also gx system dirty partial add gx system draw context get gx system event send gx system focus claim gx system initialize gx system start gx system string get gx system string table get gx system string table set gx system string width get gx system timer start gx system timer stop gx system widget find GUIX User Guide 308 gx system memory allocator set Assign functions for memory allocation de allocation Prototype UINT gx system memory allocator set VOID allocate ULONG size VOID release VOID Description This service assigns the application supplied function for dynamic memory allocation This is only required if widget control blocks will be dynamically allocated at runtime rather then control blocks being statically defined Parameters allocator Memory allocator function release Memory free function Return Values GX SUCCESS 0x00 Successful GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR
379. uffer STYLE BORDER RAISED MY TEXT VIEW ID amp size If status is GX SUCCESS the text view my text view has been created See Also gx single line text input create gx multi line text input create gx multi line text view event process gx multi line text view font set gx multi line text view scroll gx multi line text view text color set gx multi line text view text id set gx multi line text view text set GUIX User Guide 190 gx multi line text view create Create multi line text view Prototype UINT gx multi line text view create GX MULTI LINE TEXT VIEW text view GX CONST GX CHAR name GX WINDOW parent GX CHAR input buffer ULONG style USHORT text view id GX CONST GX RECTANGLE size Description This service creates a multi line text view widget Parameters view Multi line text view widget control block name Name of text view widget parent Pointer to parent widget input buffer Pointer to text view buffer style Style of text view widget Appendix D contains pre defined general styles for all widgets as well as widget specific styles text input id Application defined ID of text view size Dimensions of text view widget Return Values GX SUCCESS 0x00 Successfully created multi line text view widget GX CALLER ERROR Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX ALREADY CREATED 0x13
380. ult is TRUE the two rectangles are equal See Also gx utility Itoa gx utility math cos gx utility math sin gx utility math gx utility pixelmap rotate gx utility pixelmap simple rotate gx utility rectangle center gx utility rectangle center find gx utility rectangle combine gx utility rectangle define gx utility rectangle grow gx utility rectangle overlap detect gx utility rectangle point detect gx utility rectangle shift GUIX User Guide 344 gx utility rectangle define Define a rectangle Prototype VOID gx utility rectangle define GX RECTANGLE rectangle GX VALUE left GX VALUE top GX VALUE right GX VALUE bottom Description This service defines a rectangle as specified Parameters rectangle Rectangle control block left Left most coordinate top Top most coordinate right Right most coordinate bottom Bottom most coordiante Return Values None Allowed From All Example Define rectangle gx utility rectangle define amp my rectangle 10 5 200 100 rectangle is defined See Also gx utility Itoa gx utility math cos gx utility math sin gx utility math sqrt gx utility pixelmap rotate gx utility pixelmap simple rotate gx utility rectangle center gx utility rectangle center find gx utility rectangle combine gx utility rectangle compare gx utility rectangle grow gx utility rectangle overlap detect gx utility recta
381. unction GX PTR ERROR Invalid pointer GX INVALID WIDGET 0x12 X Widget not valid GX FAILURE Selected widget has been scrolled from view in a list with more rows than client children Allowed From Initialization and threads Example Get the list entry at the current index of horizontal list my list status gx horizontal list selected widget get amp my list amp current list entry If status is SUCCESS current list entry contains a pointer to the currently selected widget GUIX User Guide 161 See Also gx horizontal list children position gx horizontal list create gx horizontal list event process gx horizontal list page index set gx horizontal list selected index get gx horizontal list selected set gx horizontal list total columns set GUIX User Guide 162 gx horizontal list selected set Set entry in horizontal list Prototype UINT gx horizontal list selected set GX HORIZONATAL LIST horizontal list GX WIDGET list entry Description This service sets the list entry in the horizontal list Parameters horizontal list Horizontal list widget control block list entry Pointer to new list entry Return Values GX SUCCESS 0x00 Successfully set the horizontal list entry GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 X Vertical list or list entry widget not valid Allowed From Initialization an
382. urrent drawing context When GUIX performs a system canvas refresh the canvas is opened for drawing and the drawing context established before the widget level drawing APIs are invoked Therefore widgets do not need to initiate drawing on a canvas within the widget drawing function However if an application desires to perform immediate drawing to a canvas outside the flow of the standard GUIX deferred drawing algorithm the application must directly invoke the gx canvas drawing initiate prior to calling any other drawing APIs and must call gx canvas drawing complete once the immediate drawing has been completed GUIX User Guide 16 User Input GUIX supports touch screen mouse and keyboard devices with pre defined event types Additional input devices can be utilized by defining custom event types or by mapping the custom input device to the pre defined event types Actions associated with these devices are translated into events that are processed by the internal GUIX thread Driver level software written to support a touch screen must prepare and send to the GUIX event queue events for pen down pen up and pen drag operations Similarly a keypad input driver must generate events for key press and key release input Modal Dialog Execution Modal dialog execution refers to presenting a window to the user that must be closed in some way before any other GUIX windows or widgets can receive user input Modal dialogs capture all user i
383. ustomed to working with in house or public domain products They expect to have source code and the ability to modify it GUIX is the ultimate GUI software for such developers Embedded GUI Applications Embedded GUI applications are applications that have a user interface requirement and execute on microprocessors hidden inside products such as cellular phones communication equipment automotive engines laser printers medical devices and so forth Such applications almost always have some memory and performance constraints Another distinction of embedded GUI is that their software and hardware have a dedicated purpose Real time GUI Software Basically GUI software that must perform its processing within an exact period of time is called real time GUI software and when time constraints are imposed on GUI applications they are classified as real time applications Embedded GUI applications are almost always real time because of their inherent interaction with the external world GUIX User Guide 3 GUIX Benefits The primary benefits of using GUIX for embedded applications are high performance feature rich and very small memory requirements GUIX is also completely integrated with the high performance multitasking ThreadX real time operating system Improved Responsiveness The high performance GUIX product enables applications to respond faster than ever before This is especially important for embedded applications that either have
384. ut GUIX the high performance GUI product from Express Logic Inc It is intended for embedded real time software developers familiar with basic GUI concepts the ThreadX RTOS and the C programming language Organization Chapter 1 Introduces GUIX Chapter 2 Gives the basic steps to install and use GUIX with your ThreadX application Chapter 3 Provides a functional overview of GUIX Chapter 4 Details the application s interface to GUIX Chapter 5 Describes display drivers for GUIX Index Topic cross reference GUIX User Guide XV Guide Conventions Italics Typeface denotes book titles emphasizes important words and indicates variables Boldface Typeface denotes file names key words and further emphasizes important words and variables e Information symbols draw attention to important or additional information that could affect performance or function GUIX User Guide xvi GUIX Data Types In addition to the custom GUIX control structure data types there are several special data types that are used in GUIX service call interfaces These special data types map directly to data types of the underlying C compiler This is done to ensure portability between different C compilers The exact implementation is inherited from ThreadX and can be found in the tx port h file included in the ThreadX distribution The following is a list of GUIX service call data types and their associated meanings UINT INT ULONG VOID CHAR GX BY
385. ut style remove gx single line text input style set gx multi line text input create gx multi line text view create gx multi line text view event process gx multi line text view scroll GUIX User Guide 255 gx single line text input character insert Insert a character at current cursor position Prototype UINT gx single line text input character insert GX SINGLE LINE TEXT INPUT text input GX CHAR character Description This service inserts a character into the text input string at the current cursor position Parameters text input Single line text input widget control block character Character value to be inserted Return Values GX SUCCESS 0x00 Successful single line text input create GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 Invalid pointer Allowed From Initialization and threads Example Insert character at current cursor position status gx single line text input character insert amp my text input If status is SUCCESS the text input widget has inserted the characterr See Also gx single line text input backspace gx single line text input buffer clear 9x single line text input buffer get gx single line text input create gx single line text input character delete gx single line text input draw gx single line text input end gx single line text input event process gx single
386. vas CANVAS source GX CANVAS destination VOID gx display driver XXBPP canvas blend GX CANVAS source GX CANVAS dest VOID gx display driver XXBPP horizontal line draw GX DRAW CONTEXT context NT x start INT x end INT y position INT width GX COLOR color VOID gx display driver XXBPP line draw GX DRAW CONTEXT context NT x start INT y start INT x end INT y end VOID gx display driver XXBPP line anti aliasing GX DRAW CONTEXT aontext NT x start INT y start INT x end INT y end VOID gx display driver XXBPP pixel blend GX DRAW CONTEXT econtext NT x position INT y position GX COLOR color GX UBYTE alpha VOID gx display driver XXBPP pixel write GX DRAW CONTEXT context NT x position INT y position GX COLOR color VOID gx display driver XXBPP vertical line draw GX DRAW CONTEXT context NT y start INT y end INT x position INT width GX COLOR color GUIX User Guide 35 VOID gx display driver XXBPP pixelmap draw GX DRAW CONTEXT context NT x start INT y start GX PIXELMAP pixelmap VOID gx display driver XXBPP block move GX DRAW CONTEXT Gontext RECTANGLE source INT x shift INT y shift VOID gx display driver XXBPP round end DRAW CONTEXT context NT x start INT y start INT x end INT y end INT round GX COLOR gx display driver XXBPP native color get GX COLOR raw color VOID gx display driver XXBPP one width line draw GX DRAW CONTEXT context NT x start INT
387. ve gx widget background set gx widget border draw gx widget border style set gx widget border width get gx widget canvas get gx widget child detect gx widget children draw gx widget client get gx widget created gx widget created test gx widget delete gx widget detach gx widget draw gx widget draw set gx widget event generate gx widget event process gx widget event process set gx widget event to parent gx widget find gx widget front move gx widget height get gx widget hide gx widget shift gx widget show gx widget status add gx widget status get gx widget status remove gx widget status test gx widget style add gx widget style get gx widget style remove gx widget style set gx widget width get GUIX User Guide 414 gx widget shift Shift widget Prototype UINT gx widget shift GX WIDGET widget GX VALUE x shift GX VALUE y shift GX BOOL mark dirty Description This service shifts the widget and optionally marks it as dirty Parameters widget Pointer to widget x shift Number of pixels to shift on x axis y shift Number of pixels to shift on y axis mark dirty GX TRUE to indicate dirty otherwise GX FALSE Return Values GX SUCCESS 0x00 Successful widget shift GX CALLER ERROR 0x11 X Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 Widget not valid GX INVALID COORDINATE 0x21 Invalid x or y coordinat
388. ver it is most common to make the canvas object control block and the drawing area a global structure by defining them outside the scope of any function Canvas Alpha Channel GUIX supports alpha blending of foreground and background colors on many levels including bitmap alpha channel which specifies a blending ratio per pixel color alpha which specifies the blending ratio for a brush and canvas alpha which specifies the blending ratio for an overlay canvas The alpha value of a canvas is used when there are multiple canvases which are composited together for display within the frame buffer If the canvas Z order is such that a canvas is above other canvases then the canvas alpha value can be set to blend the canvas with those that lie behind Rapidly modifying the alpha value of a canvas is used to provide fade in screen transition effects but the canvas alpha can be used in many ways GUIX User Guide 27 Alpha values range from 0 through 255 where value 0 means the pixel is fully transparent and values greater than 0 are increasing less transparent canvas alpha value can only be supported for screen drivers running at 16 bpp and higher unless hardware assistance for canvas blending is provided Canvas Drawing The GUIX canvas component provides a full drawing to the application Before the drawing APIs such as gx canvas line draw or gx canvas pixelmap draw can be invoked the target canvas must be opened for draw
389. widget front move gx widget height get gx widget hide gx widget resize gx widget shift gx widget show gx widget status add gx widget status get gx widget status remove gx widget status test gx widget style add gx widget style get gx widget style remove gx widget style set gx widget width get GUIX User Guide 375 gx widget border width get Get widget border width Prototype UINT gx widget border width get GX WIDGET widget GX VALUE return width Description This service gets the widget border width Parameters widget Pointer to widget return width Pointer to destination for widget border width Return Values GX SUCCESS 0x00 Successful widget border style set GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 Widget not valid Allowed From Initialization and threads GUIX User Guide 376 Get border width of my widget status gx widget border width get amp my widget amp my width If status is SUCCESS width contains the border width of the widget widget See Also gx widget attach gx widget back move gx widget background set gx widget border draw gx widget border style set gx widget canvas get gx widget child detect gx widget children draw gx widget client get gx widget create gx widget created test gx widget dele
390. x canvas circle draw Draw circle Prototype UINT gx canvas circle draw INT xcenter INT ycenter UINT r Description This service draws a circle on the canvas using the current brush The circle is clipped to the canvas invalid region Parameters xcenter x coord of center of the circle ycenter y coord of center of the cirlce r Radius of the circle Return Values GX SUCCESS Successful circle draw GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR Invalid pointer Invalid coordinate s Allowed From Initialization and threads Example Draw a circle of radius 10 centered at 100 100 status gx canvas circle draw 100 100 50 If status is SUCCESS the circle has been drawn on my canvas See Also Fixme not sure whether the following included APIs are right gx canvas arc draw gx canvas block move gx display create gx canvas ellipse draw gx canvas line darw gx canvas pie draw gx canvas pixelmap draw gx canvas pixelmap tile gx canvas polygon draw gx canvas rectangle draw gx canvas text draw GUIX User Guide 81 gx canvas create Create canvas Prototype UINT gx canvas create GX CANVAS canvas GX CONST GX CHAR name GX DISPLAY display UINT type UINT width UINT height GX COLOR memory area ULONG memory size Description This service creates the canvas with the specified properties and associated memory Parameters canvas Pointer
391. x context pixelmap set Set pixelmap of current draw context Prototype UINT gx context pixelmap set GX R Description ESOURCE ID 1 id This service assign the pixelmap of the active brush in the current drawing context Parameters pixelmap id Pixelmap resource ID to use for current context Return Values GX SUCCESS GX CALLER ERROR GX PTR ERROR GX INVALID RESOURCE 10 Allowed From Initialization and threads Example Set pixelmap of the current context to MY PIXELMAP 10 0x00 0x11 0x07 0x22 status gx context pixelmap set MY PIXELMAP 10 Successful context pixelmap set Invalid caller of this function Invalid pointer Invalid resource ID If status is SUCCESS the pixelmap of the current context has been set See Also gx context brush default gx context brush define gx context brush get gx context brush set gx context brush pattern set gx context brush style set gx context brush width set gx context fill color set gx context font set gx context line color set gx context raw brush define gx context raw fill color set gx context raw line color set GUIX User Guide 135 gx context raw brush define Define raw brush of current draw context Prototype UINT gx context raw brush define GX COLOR line color GX COLOR fill color UINT style Description This service defines the raw brush of the
392. x multi line text input create amp my text input text input amp my parent my buffer sizeof my buffer STYLE BORDER RAISED MY TEXT INPUT 10 amp size If status is SUCCESS the text input my text input has been created See Also 9 single line text input buffer get gx single line text input create 9 9 multi line text view create gx multi line text view event process multi line text view font set gx multi line text view scroll gx multi line text view text color set gx multi line text view text id set gx multi line text view text set GUIX User Guide 184 gx multi line text input buffer get Retrieves buffer information of text input widget Prototype UINT gx multi line text input buffer get GX MULTI LINE TEXT INPUT text input GX CHAR buffer address UINT content size UINT buffer size Description This service retrieves buffer information of the text input widget Parameters text input Multi line text input widget control block buffer address The address of the input buffer content size The count of the input data buffer size The size of the input buffer Return Values GX SUCCESS 0x00 Successful single line text input create GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 Invalid pointer Allowed From Initialization and threads Example Retrieves buffer information of my
393. x system string width get amp my font string strlen my string amp my width If status is SUCCESS width contains the string width See Also gx system dirty partial add gx system draw context get system event send gx system focus claim gx system initialize gx system start gx system string get gx system string table get GUIX User Guide 317 gx system string table set gx system string width get gx system timer start gx system timer stop gx system widget find GUIX User Guide 318 gx system timer start Start timer Prototype UINT gx system timer start GX WIDGET owner UINT timer id UINT initial ticks UINT reschedule ticks Description This service starts a timer for the specified widget Parameters owner Pointer to widget control block timer id ID of timer initial ticks Initial expiration ticks reschedule ticks Periodic expiration ticks Return Values GX SUCCESS Successful timer start GX OUT OF TIMERS timers GX_CALLER_ERROR 0x11 Invalid caller of this function GX_PTR_ERROR 0x07 X Invalid pointer GX INVALID WIDGET Widget not valid GX INVALID VALUE Timer value s not valid Allowed From Initialization and threads Example Start a periodic timer for the widget widget status gx system timer start amp my widget MY TIMER 10 10 20 If status is SUCCESS the timer for my w
394. x systenm sing WIG e io x AU p xi EO UU HU RU dE 317 gx System SEO I cohors doi robotic fest contin 319 qx system met SIOD iios p aud nae aste de talus 320 gx system version string 321 gxssvstem WIdgeb Tipid pte ie DUE 322 gX text D tton GEO SITO card c are ela P e are edi PE Dodd d Ee sels 324 Text D ftOn ee ei dete deed 326 qx 3ext DUttorr 327 gx text button text color 821 328 T E E E E E E E E 330 gX text text Id S DES TEATA 331 text b utt n SS uuo re iri al ini lev al la a ii 332 DUMMY AN elei eo p o EARS EM OI MEA UA OM Ua UD LU M CAUDAE ODER 333 gx tlit math PCOS 334 EORR Re RD D 335 5o cach adest ea et nok ea es Ar redo ee 336 utility pixelmap TOIBEO unco aere redemit dt 337 GUIX User Guide Xi 9x utility simple 339 gx utility rectangle 341 ice eene coeno nno ertum pues 342 CC utility rectangle _combine nes 343 Utility rectangle compatiens dab teda teo de e dee dal en d
395. xelmap slider draw gx pixelmap slider event process gx pixelmap slider pixelmap set 9x slider create gx slider event process gx slider needle draw gx slider needle position get gx slider needle position get gx slider tickmarks draw gx slider travel get gx slider value calculate gx slider value set GUIX User Guide 274 gx slider event process Process slider event Prototype UINT gx slider event process SLIDER slider GX EVENT event Description This service processes a slider event This function is internally referenced by the gx slider create function but is exposed for use by the application in those cases where the application defines a custom slider event processing function Parameters slider Slider widget control block event Pointer to event to process Return Values GX SUCCESS 0x00 Successful slider event process GX CALLER ERROR 0x11 X Invalid caller of this function GX PTR ERROR 0x07 X Invalid pointer GX INVALID WIDGET 0x12 X Widget not valid Allowed From Initialization and threads Example Process event for slider slider status gx slider event process amp my slider amp my event If status is SUCCESS the event for slider slider has been processed See Also gx pixelmap slider create gx pixelmap slider draw 9x pixelmap slider event process gx pixelmap slider pixelmap set gx slider create gx slider draw gx sl
396. xels on four sides gx utility rectangle adjust amp my rectangle 20 rectangle is 20 pixels larger See Also gx utility Itoa gx utility math cos gx utility math sin gx utility math sqrt gx utility pixelmap rotate gx utility pixelmap simple rotate gx utility rectangle center gx utility rectangle center find gx utility rectangle combine gx utility rectangle compare gx utility rectangle define gx utility rectangle overlap detect gx utility rectangle point detect gx utility rectangle shift GUIX User Guide 348 gx utility rectangle shift Shift rectangle Prototype VOID gx utility rectangle shift GX RECTANGLE rectangle GX VALUE x shift GX VALUE y shift Description This service shifts the rectangle by the specified values Parameters rectangle Rectangle to shift x shift Number of pixels to shift on the x axis y shift Number of pixels to shift on the y axis Return Values None Allowed From All Example Shift my rectangle gx utility rectangle shift amp my rectangle 10 20 At this point rectangle has been shifted See Also gx utility Itoa gx utility math cos gx utility math sin gx utility math sqrt gx utility pixelmap rotate gx utility pixelmap simple rotate gx utility rectangle center gx utility rectangle center find gx utility rectangle combine gx utility rectangle compare gx utility rectangle define gx utility rectangl
397. ximum value current value and needle limits The GX SLIDER INFO structure has the following integer members 9x slider info min value 9x slider info max value 9x slider info current value 9x slider info increment 9x slider info min travel 9x slider info max travel 9x slider info needle pos 9x slider info needle width 9x slider info needle height 9x slider info needle inset 9x slider info needle hotspot offset pixelmap info Pointer to a GX PIXELMAP SLIDER INFO structure which defines the pixelmaps used the draw the slider background and needle The slider background can use one or two pixelmaps If one the background GUIX User Guide 212 style pixelmap slider id size Return Values GX SUCCESS GX CALLER ERROR GX PTR ERROR GX ALREADY CREATED GX INVALID WIDGET Allowed From Initialization and threads Example Create my pixelmap slider does not change as the needle moves If two backgrounds are defined the background before the needle uses the first background pixelmap and the background after the needle uses the second background pixelmap Style of slider Appendix D contains pre defined general styles for all widgets as well as widget specific styles Application defined ID of pixelmap slider Dimensions of pixelmap prompt 0x00 Successfully created pixelmap slider Invalid caller of this function Invalid pointer 0x13 Widget already created Parent widget no
398. xt input style set gx multi line text input create GUIX User Guide 261 gx multi line text view create gx multi line text view event process gx multi line text view scroll GUIX User Guide 262 gx single line text input home Move the text input cursor to the home position Prototype UINT gx single line text input home GX SINGLE LINE TEXT INPUT text input Description Move the text input cursor position to the start of the input string Parameters text input Single line text input widget control block Return Values GX SUCCESS 0x00 Success GX CALLER ERROR 0x11 Invalid caller of this function GX PTR ERROR 0x07 Invalid pointer Allowed From Initialization and threads Example invoke backspace handler status gx single line text input home amp my text input If status is GX SUCCESS the cursor has been moved to the home position See Also gx single line text input backspace gx single line text input buffer clear single line text input buffer get gx single line text input create gx single line text input character delete gx single line text input character insert gx single line text input draw gx single line text input end gx single line text input left arrow gx single line text input position get 9x single line text input right arrow gx single line text input style add gx single line text input style remove gx
399. y 272 480 Create my canvas status gx canvas create amp my canvas my canvas amp my display GX CANVAS MANAGED GX CANVAS VISIBLE 272 480 default canvas memory sizeof default canvas memory If status is SUCCESS the 272 x 480 canvas was successfully created See Also gx canvas alpha set gx canvas delete gx canvas drawing complete gx canvas drawing initiate gx canvas offset set gx canvas shift GUIX User Guide 83 gx canvas delete Prototype UINT Description This service deletes the canvas Parameters canvas Return Values GX SUCCESS 0x00 GX CALLER ERROR 0x11 ERROR 0 07 Allowed From Initialization and threads Example Delete canvas status gx canvas delete amp my canvas If status is SUCCESS my canvas was deleted See Also gx canvas delete GX CANVAS canvas Delete canvas Pointer to canvas control block Successful canvas create Invalid caller of this function Invalid pointer gx canvas alpha set gx canvas drawing complete gx canvas create gx canvas drawing initiate gx canvas offset set gx canvas shift GUIX User Guide 84 gx canvas drawing complete Complete canvas drawing Prototype UINT gx canvas drawing complete GX CANVAS canvas GX BOOL flush Description This service completes drawing on the specified canvas The canvas tracks draw nesting levels and triggers a
400. y load the resulting pixelmap of rotation See Also gx utility Itoa gx utility math cos gx utility math sin gx utility math sqrt gx utility rotate gx utility rectangle center gx utility rectangle center find gx utility rectangle combine gx utility rectangle compare gx utility rectangle define gx utility rectangle grow gx utility rectangle overlap detect gx utility rectangle point detect gx utility rectangle shift GUIX User Guide 340 gx utility rectangle center Center rectangle within another rectangle Prototype VOID gx utility rectangle center GX RECTANGLE rectangle GX RECTANGLE within rectangle Description This service centers the rectangle within another rectangle Parameters rectangle Rectangle to center within rectangle Rectangle to center within Return Values None Allowed From All Example Center my inner rectangle inside of outer rectangle gx utility rectangle center amp my inner rectangle amp my outer rectangle inner rectangle is centered within other rectangle See Also gx utility Itoa gx utility math cos gx utility math sin gx utility math sqrt gx utility pixelmap rotate gx utility pixelmap simple rotate gx utility rectangle center find gx utility rectangle combine gx utility rectangle compare gx utility rectangle define gx utility rectangle grow gx utility rectangle overlap detect gx
401. y pixelmap rotate Rotate pixelmap Prototype UINT gx utility pixelmap rotate GX PIXELMAP src INT angle GX PIXELMAP destination UINT rot cx UINT rot cy Description This service rotates a pixelmap Parameters src The pixelmap to rotate angle Angle of rotation in degrees destination Destination buffer for the resulting pixelmap rot cx Retrieved x coordinate of rotation center with respect to destination pixelmap Should be initiated with the x coordinate of rotation center with respect to source pixelmap If rot cx is NULL value will not be retrieved rot cy Retrieved y coordinate of rotation center with respect to destination pixelmap Should be initiated with the y coordinate of rotation center with respect to source pixelmap If rot cy is GX NULL value will not be retrieved Return Values None Allowed From All Example rot cx source rotate center x rot cy source rotate center rotate src pixelmap by 30 degree in clockwise direction status gx utility pixelmap rotate src pixelmap 30 amp des pixelmap amp rot cx amp rot cy GUIX User Guide 337 If status is SUCCESS des pixelmap successfully load the resulting pixelmap of rotation See Also gx utility Itoa gx utility math cos gx utility math sin gx utility math sqrt gx utility pixelmap simple rotate gx utility rectangle center gx utility rectangle center find gx utility rectangle combine gx u
402. y point is defined as UINT device graphics driver format GX DISPLAY diplay While the name of this function is completely up to the implementor the convention for the drivers provided with GUIX is to use a hardware specific device name in the device field and color format for format field above This function must initialize the GX DISPLAY structure provided as input and perform any hardware setup that is required The GX DISPLAY structure contains the following fields ULONG gx display id This is a field for use by the application in cases where more than one instance of a particular driver is created CHAR display name An optional name used to identify the driver GX DISPLAY gx display created next This field is initialized by GUIX and is used to create and maintain a list of all GX DISPLAY instances GX DISPLAY gx display created previous This field is initialized by GUIX and is used to create and maintain a list of all DISPLAY instances GX VALUE gx display color format This field should reflect the graphics data format supported by this driver The color format types are defined in the gx api h header file GX VALUE gx display width This field should be initialized to hold the physical display width in pixels GUIX User Guide 453 VALUE gx display height This field should be initialized to hold the physical display height in pixels GX COLOR gx display color table This i

Download Pdf Manuals

image

Related Search

Related Contents

  Philips BM01211/00 Twin Plasma Ceiling Support  6963 Manual Fornos de Embutir  RNA UltraSense™ One-Step Quantitative RT  1 製品及び会社情報 2 危険有害性の要約 3 組成及び成分    Kidde HD135 User's Manual  3 Acquiring Images - United Medical Instruments  Manual Usuario Zelio8702N  Automated Battery Welder User`s Manual  

Copyright © All rights reserved.
Failed to retrieve file