/*************************************************************************** * Copyright (c) 2024 Microsoft Corporation * * This program and the accompanying materials are made available under the * terms of the MIT License which is available at * https://opensource.org/licenses/MIT. * * SPDX-License-Identifier: MIT **************************************************************************/ /**************************************************************************/ /**************************************************************************/ /** */ /** GUIX Component */ /** */ /** Button Management (Button) */ /** */ /**************************************************************************/ #define GX_SOURCE_CODE /* Include necessary system files. */ #include "gx_api.h" #include "gx_system.h" #include "gx_widget.h" #include "gx_icon.h" /**************************************************************************/ /* */ /* FUNCTION RELEASE */ /* */ /* _gx_icon_event_process PORTABLE C */ /* 6.1 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ /* */ /* DESCRIPTION */ /* */ /* This function processes events for the specified button. */ /* */ /* INPUT */ /* */ /* icon Pointer to icon control */ /* block */ /* event_ptr Incoming event to process */ /* */ /* OUTPUT */ /* */ /* status Completion status */ /* */ /* CALLS */ /* */ /* _gx_widget_event_process Default widget event process */ /* _gx_icon_pixelmap_update Change the pixelmap */ /* */ /* CALLED BY */ /* */ /* Application Code */ /* GUIX Internal Code */ /* */ /* RELEASE HISTORY */ /* */ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ /* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _gx_icon_event_process(GX_ICON *icon, GX_EVENT *event_ptr) { UINT status; GX_WIDGET *widget = (GX_WIDGET *)icon; /* Default status to success. */ status = GX_SUCCESS; /* Process relative to the type of event. */ switch (event_ptr -> gx_event_type) { case GX_EVENT_SHOW: status = _gx_widget_event_process(widget, event_ptr); _gx_icon_pixelmap_update(icon); break; default: /* Call the widget default processing. */ status = _gx_widget_event_process(widget, event_ptr); } /* Return completion status. */ return(status); }