附录 E - GUIX 事件说明

GX_EVENT_TERMINATE
- Description: This event can be sent by the application to intentionally terminate the GUIX execution thread. This event will also cause a modally executing window to terminate modal execution and return GX_EVENT_TERMINATE. This event is used internally by the GUIX Win32 binding to terminate the GUIX application when the desktop window is closed.
- Payload: None

GX_EVENT_REDRAW
- Description: This event can be generated to force GUIX to redraw every root window (and all child windows/widgets. This event marks every root window as dirty, forcing a complete system redraw when the next canvas refresh operation occurs. This event is also used internally for desktop operation to force a GUIX canvas refresh when the desktop operating system requests a re-draw.
- Payload: None

GX_EVENT_SHOW 
- Description: This event is internally generated whenever a widget is made visible, either by being attached to a visible widget or by invocation of the gx_widget_show() API. The event is received before the widget is drawn.
- Payload: None

GX_EVENT_HIDE
- Description: This event is internally generated whenever a widget is made hidden either by being detached from its parent or through invocation of the gx_widget_hide() API. The event is received before the widget is made hidden.
- Payload: None.

GX_EVENT_RESIZED
- Description: This event is generated when a widget is resized via the gx_widget_resize API. The event is only generated if the widget gx_widget_status member includes GX_STATUS_RESIZE_NOTIFY.
- Payload: None.

GX_EVENT_SLIDE
- Description: Reserved for future use.
- Payload: None.

GX_EVENT_FOCUS_GAINED
- Description: This event is internally generated when a widget receives input focus.
- Payload: None.

GX_EVENT_FOCUS_LOST
- Description: This event is internally generated when a widget loses input focus.
- Payload: None.

GX_EVENT_HORIZONTAL_SCROLL
- Description: This event is generated by a horizontal scrollbar to inform the parent window of a scrolling operation. The event can also be generated by the application to force a window to scroll it’s child widgets.
- Payload: gx_event_intdata[0] contains the current scrollbar value. 
           gx_event_intdata[1] contains the previous scrollbar value.

GX_EVENT_VERTICAL_SCROLL
- Description: This event is generated by a vertical scrollbar to inform the parent window of a scrolling operation. The event can also be generated by the application to force a window to scroll it’s child widgets.
- Payload: gx_event_intdata[0] contains the current scrollbar value.
           gx_event_intdata[1] contains the previous scrollbar value.

GX_EVENT_TIMER
- Description: This event is sent to a timer owner to notify the owner of timer expiration.
- Payload: gx_event_timer_id contains the user-assigned timer id.
           sgx_event_target contains a pointer to the timer owner.

GX_EVENT_PEN_DOWN
- Description: This event is generated by touch screen and mouse input drivers to indicate user pen-down (or left mouse button click) event.
- Payload: gx_event_pointdata.gx_point_x = pen x position in pixels 
           gx_event_pointdata.gx_point_y = pen y position in pixels
           gx_event_display_handle = handle of the target display

GX_EVENT_PEN_UP
- Description: This event is generated by touch screen and mouse input drivers to indicate user pen-up (or left mouse button released) event.
- Payload: gx_event_pointdata.gx_point_x = pen x position in pixels 
           gx_event_pointdata.gx_point_y = pen y position in pixels
           gx_event_display_handle = handle of the target display

GX_EVENT_PEN_MOVE
- Description: This event is generated by mouse input driver to indicate the mouse has been moved to a new location, but no buttons are pressed.
- Payload: gx_event_pointdata.gx_point_x = pen x position in pixels 
           gx_event_pointdata.gx_point_y = pen y position in pixels
           gx_event_display_handle = handle of the target display

GX_EVENT_PEN_DRAG
- Description: This event is generated by mouse and touch input drivers to indicate the pen is being dragged across the screen, or the mouse is being moved while the left mouse button is pressed.
- Payload: gx_event_pointdata.gx_point_x = pen x position in pixels 
           gx_event_pointdata.gx_point_y = pen y position in pixels
           gx_event_display_handle = handle of the target display

GX_EVENT_KEY_DOWN:
- Description: This event is generated by keyboard input drivers to indicate a keyboard key has been pressed.
- Payload: gx_event_ushortdata[0] holds the Unicode key value.

GX_EVENT_KEY_UP
- Description: This event is generated by keyboard input drivers to indicate a keyboard key has been released.
- Payload: gx_event_ushortdata[0] holds the Unicode key value.

GX_EVENT_CLOSE
- Description: This event can be sent to any GX_WINDOW derived widget to cause that window to detach from it’s parent (i.e. become hidden). If the window is executing modally, it will exit the modal execution loop and return GX_EVENT_CLOSE.
- Payload: None.

GX_EVENT_DELETE
- Description: This event is sent to any widget when the _gx_widget_delete API is used. This event informs the widget that it is about to be deleted, allowing the widget to do an necessary cleanup or memory release
- Payload: gx_event_target points to the widget being deleted.

GX_EVENT_SLIDER_VALUE
- Description: This is a GX_SIGNAL event type generated by GX_SLIDER based child controls. It informs the slider parent that the slider has been manipulated by the user.
- Payload: gx_event_longdata holds the new slider value.
           gx_event_sender holds the ID of the slider widget.

GX_EVENT_TOGGLE_ON
- Description: This is a GX_SIGNAL event type generated by checkbox style (i.e. toggle style) GX_BUTTON widgets. It informs the button parent that the checkbox has been changed to the checked state.
- Payload: gx_event_sender holds the ID of the button widget.

GX_EVENT_TOGGLE_OFF
- Description: This is a GX_SIGNAL event type generated by checkbox style (i.e. toggle style) GX_BUTTON widgets. It informs the button parent that the checkbox has been changed to the unchecked state.
- Payload: gx_event_sender holds the ID of the button widget.

GX_EVENT_RADIO_SELECT
- Description: This is a GX_SIGNAL event type generated by radio button style (i.e. exclusive style) GX_BUTTON widgets. It informs the button parent that the radio button has been changed to the on state.
- Payload: gx_event_sender holds the ID of the button widget.

GX_EVENT_RADIO_DESELECT
- Description: This is a GX_SIGNAL event type generated by radio button style (i.e. exclusive style) GX_BUTTON widgets. It informs the button parent that the radio button has been changed to the off state.
- Payload: gx_event_sender holds the ID of the button widget.

GX_EVENT_CLICKED
- Description: This is a GX_SIGNAL event type generated by all enabled widget types. This event informs the widget parent that the user has clicked on the child widget.
- Payload: gx_event_sender holds the ID of the widget.

GX_EVENT_LIST_SELECT
- Description: This is a GX_SIGNAL event type generated by all horizontal list, vertical list, scroll wheel, and drop-list style child widgets. This event informs the widget parent that the user has selected a new list entry.
- Payload: gx_event_sender holds the ID of the widget.
           gx_event_longdata holds the new list selection index.

GX_EVENT_VERTICAL_FLICK
- Description: This event is generated internally when the pen is dragged and released while moving in a vertical direction. gx_scroll_wheel and gx_vertical_list widgets catch this event to implement animated flicking of the list.
- Payload: gx_event_intdata[0] holds the pen speed.

GX_EVENT_HORIZONTAL_FLICK
- Description: This event is generated internally when the pen is dragged and released while moving in a horizontal direction. gx_horizontal_list widgets catch this event to implement animated
flicking of the list.
- Payload: gx_event_intdata[0] holds the pen speed.

GX_EVENT_PARENT_SIZED
- Description: This event is generated internally when any GX_WINDOW derived widget type is resized using gx_widget_resize(). This allows child widgets like scroll bars to resize themselves as need to fit within the new parent window dimensions.
- Payload: None

GX_EVENT_CLOSE_POPUP
- Description: This event is used internally to close the popup list that is owned by a drop down list widget
- Payload: None

GX_EVENT_ZOOM_IN
- Description: This event is generated by multi-touch touch input drivers to indicate a zoom-in gesture has been input by the user. 
- Payload: None

GX_EVENT_ZOOM_OUT
- Description: This event is generated by multi-touch touch input drivers to indicate a zoom-out gesture has been input by the user. ]
- Payload: None

GX_EVENT_LANGUAGE_CHANGE
- Description: This event is generated and delivered to all visible widgets when the active language is changed by calling gx_display_active_langauge_set(). This allows text based widgets to retrieve the new string associated with the active language.
- Payload: None

GX_EVENT_RESOURCE_CHANGE
- Description: This event is generated and delivered to all visible widgets when the active theme is changed. This allows widgets using pixelmap and font resources to mark themselves dirty and redraw using the new theme.
- Payload: None

GX_EVENT_ANIMATION_COMPLETE
- Description: This event is generated when an animation being executed by the gx_animation_manager is completed
- Payload: gx_event_target is set to the animation_parent
           gx_event_sender holds the animation id

GX_EVENT_SPRITE_COMPLETE
- Description: This GX_SIGNAL event is generated by gx_sprite widgets when the sprite animation sequence is completed.
- Payload: gx_event_sender holds the sprite widget id

GX_EVENT_TEXT_EDITED
- Description: This GX_SIGNAL event is generated by single line and multi line text input widgets when the text string is edited by the user.
- Payload: gx_event_sender holds the text input widget id

GX_EVENT_FOCUS_NEXT
- Description: This event can be generated by the application or by input driver(s) to move the widget input focus to the next widget in the widget focus list. When a gx_window type widget is made
visible, it automatically creates a linked list of child widgets that accept input focus. This event can be used to move focus from one child widget to the next.
- Payload: None.

GX_EVENT_FOCUS_PREVIOUS
- Description: This event can be generated by the application or by input driver(s) to move the widget input focus to the previous widget in the widget focus list. When a gx_window type widget is made visible, it automatically creates a linked list of child widgets that accept input focus. This event can be used to move focus from one child widget to the previous widget.
- Payload: None.

GX_EVENT_FOCUS_GAIN_NOTIFY
- Description: This GX_SIGNAL style event can be generated by a child widgets when they gain input focus. In order for a child widget to generate this signal, the child widget must have a non-zero ID and it must have the GX_STATUS_NOTIFY_ON_GAIN_FOCUS status flag set. 
- Payload: gx_event_sender holds the child widget ID.

GX_EVENT_SELECT
- Description: This event can be generated by the application to place a button in the selected or pushed state.
- Payload: None.

GX_EVENT_DESELECT
- Description: This event can be generated by the application to place a button in the non selected or not pushed state.
- Payload: None.

GX_EVENT_PROGRESS_VALUE
- Description: This is a GX_SIGNAL type event generated by progress_bar type widgets when the progress bar value is changed.
- Payload: gx_event_longdata holds the new progress bar value.

GX_EVENT_TOUCH_CALIBRATION_COMPLETE
- Description: This event is sent by the generic resistive touch screen input driver when the touch screen calibration sequence is completed. This notifies the application that the normal screen display can begin or resume after a calibration sequence has been performed.
- Payload: None.

GX_EVENT_INPUT_RELEASE
- Description: This event is a command telling any widget that has captured the user input (touch, keypad) to release it. This command event is used by the screen drag animation event handler to force child widgets to release an input capture, but can also be generated by the application.
- Payload: None.

GX_EVENT_TREE_SELECT
- Description: This event is generated by gx_tree_view widgets when a tree node is selected by the user.
- Payload: gx_event_sender contains the tree widget ID.
           gx_event_longdata holds the ID of the selected tree node.

GX_EVENT_STYLE_CHANGED
- Description: This event is generated when a widget style is changed using gx_widget_style_add() or gx_widget_style_remove() APIs. This allows the target widget to redraw if required by the style change.
- Payload: gx_event_ulongdata holds the previous widget style flags.
           gx_event_target points at the modified widget.

GX_EVENT_CLIENT_UPDATED
- Description: This event is generated when the client area of a window is modified by the addition or removal of non-client children, such as the addition or removal of a scroll bar.
- Payload: None.

GX_EVENT_CUT
- Description: This event is generated by input device drivers to command a text input widget to cut the selected text to the GUIX clipboard.
- Payload: None.

GX_EVENT_COPY
- Description: This event is generated by input device drivers to command a text input widget to copy the selected text to the GUIX clipboard.
- Payload: None.

GX_EVENT_PASTE
- Description: This event is generated by input device drivers to command a text input widget to paste the selected text to the GUIX clipboard.
- Payload: None.

GX_EVENT_MARK_NEXT
- Description: This event is generated by input device drivers to command a text input widget to mark the next character in the input string.
- Payload: None.

GX_EVENT_MARK_PREVIOUS
- Description: This event is generated by input device drivers to command a text input widget to mark the previous character in the input string.
- Payload: None.

GX_EVENT_MARK_UP
- Description: This event is generated by input device drivers to command a text input widget to mark the previous row of characters in the input string.
- Payload: None.

GX_EVENT_MARK_DOWN
- Description: This event is generated by input device drivers to command a text input widget to mark the following row of characters in the input string.
- Payload: None.

GX_EVENT_MARK_END
- Description: This event is generated by input device drivers to command a text input widget to move the end marker to the end of the input string.
- Payload: None.

GX_EVENT_MARK_HOME
- Description: This event is generated by input device drivers to command a text input widget to move the start marker to the beginning of the input string.
- Payload: None.