Skip to content

Commit 744cc1d

Browse files
fdesbiensCopilot
andauthored
Added Appendix K - GUIX Widget Status Flags (#25)
Documented all GX_STATUS_* macros defined in gx_api.h, organized into logical groups (general, focus, navigation, behavior, text input cursor, radial slider, window/container, memory & lifecycle). Flags managed internally by GUIX are clearly noted. Added cross-references to Appendix K in the See Also sections of the four gx_widget_status_* API entries in Chapter 4. Closes #17 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 94904d3 commit 744cc1d

3 files changed

Lines changed: 184 additions & 0 deletions

File tree

rtos-docs/guix/modules/ROOT/nav.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
*** xref:guix:ROOT:appendix-h.adoc[App. H - GUIX build-time configuration flags]
2323
*** xref:guix:ROOT:appendix-i.adoc[App. I - GUIX information structures]
2424
*** xref:guix:ROOT:appendix-j.adoc[App. J - Canvas Partial Frame Buffer Feature]
25+
*** xref:guix:ROOT:appendix-k.adoc[App. K - GUIX Widget Status Flags]
2526
** GUIX Studio User Guide
2627
*** xref:guix:ROOT:about-guix-studio.adoc[About GUIX Studio]
2728
*** xref:guix:ROOT:guix-studio-1.adoc[Ch. 1 - Introduction to GUIX Studio]
Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
////
2+
3+
Copyright (c) 2026 Eclipse ThreadX Contributors
4+
5+
This program and the accompanying materials are made available
6+
under the terms of the MIT license which is available at
7+
https://opensource.org/license/mit.
8+
9+
SPDX-License-Identifier: MIT
10+
11+
////
12+
13+
= Appendix K - GUIX Widget Status Flags
14+
:description: Learn about the GUIX widget status flags.
15+
16+
Widget status flags represent the runtime state of a `GX_WIDGET`. They are stored in the `gx_widget_status` field of the widget control block and can be read or modified using the xref:chapter-4.adoc#gx_widget_status_add[gx_widget_status_add], xref:chapter-4.adoc#gx_widget_status_get[gx_widget_status_get], xref:chapter-4.adoc#gx_widget_status_remove[gx_widget_status_remove], and xref:chapter-4.adoc#gx_widget_status_test[gx_widget_status_test] API functions.
17+
18+
NOTE: Several flags are set and cleared internally by GUIX. Modifying them directly via the status API may produce undefined behavior. Flags documented as "managed internally" are described here for reference purposes only.
19+
20+
***_General Widget Status Flags:_***
21+
22+
*GX_STATUS_VISIBLE*
23+
24+
* Value: 0x00000001
25+
* Description: Indicates the widget is currently visible. This flag is set when a widget is shown and cleared when it is hidden. A widget is drawn only if this flag is set and all of its ancestors are also visible.
26+
27+
*GX_STATUS_SELECTABLE*
28+
29+
* Value: 0x00000002
30+
* Description: Indicates the widget can be selected by the user. This flag enables selection highlighting for the widget.
31+
32+
*GX_STATUS_ACCEPTS_INPUT*
33+
34+
* Value: 0x00000004
35+
* Description: Indicates the widget accepts user input events such as pen or touch events. Widgets that process user interaction should have this flag set.
36+
37+
*GX_STATUS_HIDDEN*
38+
39+
* Value: 0x00000008
40+
* Description: Indicates the widget is hidden and should not be drawn. This flag is managed internally when `gx_widget_hide` or `gx_widget_show` is called.
41+
42+
***_Focus-Related Status Flags:_***
43+
44+
*GX_STATUS_DEFAULT_FOCUS*
45+
46+
* Value: 0x00000010
47+
* Description: Identifies the widget as the default focus target within its parent. When focus is assigned to a parent container, GUIX will assign input focus to the child bearing this flag.
48+
49+
*GX_STATUS_ACCEPTS_FOCUS*
50+
51+
* Value: 0x00000020
52+
* Description: Indicates the widget is capable of accepting keyboard input focus. Widgets that handle keyboard events should have this flag set.
53+
54+
*GX_STATUS_HAS_FOCUS*
55+
56+
* Value: 0x00000040
57+
* Description: Indicates the widget currently holds input focus. This flag is managed internally by GUIX and should not be set or cleared directly by the application.
58+
59+
*GX_STATUS_NOTIFY_ON_GAIN_FOCUS*
60+
61+
* Value: 0x00000080
62+
* Description: When set, the widget sends a `GX_EVENT_FOCUS_GAINED` notification to its parent widget when it receives input focus. This allows parent widgets to react when one of their children gains focus.
63+
64+
***_Navigation Status Flags:_***
65+
66+
*GX_STATUS_NAV_STOP*
67+
68+
* Value: 0x00000100
69+
* Description: Marks the widget as a navigation stop. During keyboard-based focus navigation, GUIX will stop navigation traversal at widgets bearing this flag rather than passing focus to sibling or parent widgets.
70+
71+
*GX_STATUS_NAV_PARENT*
72+
73+
* Value: 0x00000200
74+
* Description: Indicates the widget acts as a navigation parent — a container whose children participate in focus navigation as a group. For example, horizontal and vertical list widgets set this flag so that focus navigation cycles through list items before leaving the list.
75+
76+
***_Behavior Status Flags:_***
77+
78+
*GX_STATUS_MOVABLE*
79+
80+
* Value: 0x00001000
81+
* Description: Indicates the widget can be moved by the user by dragging it with a pen or touch input.
82+
83+
*GX_STATUS_BUTTON_DERIVED*
84+
85+
* Value: 0x00002000
86+
* Description: Managed internally. Indicates the widget is derived from the button base type (`GX_BUTTON`). This flag is set during widget creation by all button-derived widget types.
87+
88+
*GX_STATUS_TOGGLE_UNLOCK*
89+
90+
* Value: 0x00004000
91+
* Description: Managed internally. Used by toggle-style buttons to track whether the button can transition back to an un-pushed (deselected) state. This flag is set when the button is pushed and cleared when the button is released.
92+
93+
*GX_STATUS_DIRTY*
94+
95+
* Value: 0x00008000
96+
* Description: Managed internally. Indicates the widget needs to be redrawn. GUIX sets this flag when a widget's appearance changes and clears it after the widget is redrawn. Applications should not set or clear this flag directly; use `gx_system_dirty_mark` instead.
97+
98+
***_Text Input Cursor Status Flags (GX_SINGLE_LINE_TEXT_INPUT and GX_MULTI_LINE_TEXT_INPUT only):_***
99+
100+
*GX_STATUS_CURSOR_SHOW*
101+
102+
* Value: 0x00010000
103+
* Description: Managed internally. Indicates the text input cursor is currently in its visible phase. The cursor blinks by toggling between visible and invisible states; this flag tracks the current phase.
104+
105+
*GX_STATUS_CURSOR_DRAW*
106+
107+
* Value: 0x00020000
108+
* Description: Managed internally. Indicates the text input cursor should be rendered on the current drawing pass.
109+
110+
*GX_STATUS_MARK_PREVIOUS*
111+
112+
* Value: 0x00040000
113+
* Description: Managed internally. Indicates that the active text selection in a text input widget extends toward the beginning of the text buffer (i.e., the cursor moved left to extend the selection).
114+
115+
*GX_STATUS_MARK_NEXT*
116+
117+
* Value: 0x00080000
118+
* Description: Managed internally. Indicates that the active text selection in a text input widget extends toward the end of the text buffer (i.e., the cursor moved right to extend the selection).
119+
120+
***_Radial Slider Status Flags (GX_RADIAL_SLIDER only):_***
121+
122+
*GX_STATUS_ANIMATION_NONE*
123+
124+
* Value: 0x00010000
125+
* Description: Managed internally. Indicates no animation is currently in progress for the radial slider widget.
126+
127+
*GX_STATUS_TRACKING_PEN*
128+
129+
* Value: 0x00020000
130+
* Description: Managed internally. Indicates the radial slider is currently tracking pen or touch input to update the slider value in real time.
131+
132+
***_Window and Container Status Flags:_***
133+
134+
*GX_STATUS_MODAL*
135+
136+
* Value: 0x00100000
137+
* Description: Indicates the widget is a modal window. While a modal window is displayed, all input is directed exclusively to that window and its children. This flag is typically set on popup or dialog windows created via `gx_window_execute`.
138+
139+
***_Memory and Lifecycle Status Flags:_***
140+
141+
*GX_STATUS_DYNAMIC_BUFFER*
142+
143+
* Value: 0x01000000
144+
* Description: Managed internally. Indicates the widget uses a dynamically allocated memory buffer (for example, a private text copy). This buffer will be freed when the widget is destroyed.
145+
146+
*GX_STATUS_LINE_BREAK_PROCESSED*
147+
148+
* Value: 0x02000000
149+
* Description: Managed internally. Used by multi-line text widgets to indicate that line-break positions have been calculated for the current text content and do not need to be recalculated.
150+
151+
*GX_STATUS_RESIZE_NOTIFY*
152+
153+
* Value: 0x04000000
154+
* Description: Indicates the widget should notify itself (via its event handler) when its bounding rectangle changes. Widgets such as `GX_CIRCULAR_GAUGE`, `GX_MULTI_LINE_TEXT_VIEW`, and `GX_SINGLE_LINE_TEXT_INPUT` set this flag during creation so they can recalculate internal geometry after a resize.
155+
156+
*GX_STATUS_STUDIO_CREATED*
157+
158+
* Value: 0x08000000
159+
* Description: Managed internally. Indicates the widget was created by GUIX Studio-generated code. This flag allows the GUIX runtime to distinguish between widgets created by application code and those created by the generated initialization code.
160+
161+
*GX_STATUS_TRANSPARENT*
162+
163+
* Value: 0x10000000
164+
* Description: Indicates the widget background is at least partially transparent. When this flag is set, GUIX redraws the widget's parent region before drawing the widget itself, ensuring the transparent areas are rendered correctly.
165+
166+
*GX_STATUS_NONCLIENT*
167+
168+
* Value: 0x20000000
169+
* Description: Managed internally. Indicates the widget is a non-client child of its parent, such as a scrollbar attached to a list or window. Non-client widgets are excluded from operations that iterate over a container's content children, such as list item positioning.
170+
171+
*GX_STATUS_OWNS_INPUT*
172+
173+
* Value: 0x40000000
174+
* Description: Managed internally. Indicates the widget has captured exclusive pen or touch input via `gx_system_input_capture`. While this flag is set, all pen events are routed directly to this widget regardless of where the input occurs on the screen. This flag is cleared when `gx_system_input_release` is called.
175+
176+
*GX_STATUS_DYNAMICALLY_ALLOCATED*
177+
178+
* Value: 0x80000000
179+
* Description: Indicates the widget control block was dynamically allocated from the heap using the `gx_system_memory_allocator` function. When the widget is deleted, GUIX will automatically free the control block memory using the `gx_system_memory_deallocator` function.

rtos-docs/guix/modules/ROOT/pages/chapter-4.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26364,6 +26364,7 @@ status = gx_widget_status_add(&my_widget, status_to_add);
2636426364
=== See Also
2636526365

2636626366
* <<Widget_Services,Guix Widget Services>>
26367+
* xref:appendix-k.adoc[Appendix K - GUIX Widget Status Flags]
2636726368

2636826369
== gx_widget_status_get
2636926370

@@ -26413,6 +26414,7 @@ saved to "get_status". */
2641326414
=== See Also
2641426415

2641526416
* <<Widget_Services,Guix Widget Services>>
26417+
* xref:appendix-k.adoc[Appendix K - GUIX Widget Status Flags]
2641626418

2641726419
== gx_widget_status_remove
2641826420

@@ -26460,6 +26462,7 @@ widget "my_widget". */
2646026462
=== See Also
2646126463

2646226464
* <<Widget_Services,Guix Widget Services>>
26465+
* xref:appendix-k.adoc[Appendix K - GUIX Widget Status Flags]
2646326466

2646426467
== gx_widget_status_test
2646526468

@@ -26512,6 +26515,7 @@ and the result in "test_result". */
2651226515
=== See Also
2651326516

2651426517
* <<Widget_Services,Guix Widget Services>>
26518+
* xref:appendix-k.adoc[Appendix K - GUIX Widget Status Flags]
2651526519

2651626520
== gx_widget_string_get
2651726521

0 commit comments

Comments
 (0)