/**************************************************************************/ /* */ /* Copyright (c) Microsoft Corporation. All rights reserved. */ /* */ /* This software is licensed under the Microsoft Software License */ /* Terms for Microsoft Azure RTOS. Full text of the license can be */ /* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */ /* and in the root directory of this software. */ /* */ /**************************************************************************/ /**************************************************************************/ /**************************************************************************/ /** */ /** GUIX Component */ /** */ /** Drop List Management (List) */ /** */ /**************************************************************************/ #define GX_SOURCE_CODE /* Include necessary system files. */ #include "gx_api.h" #include "gx_widget.h" #include "gx_window.h" #include "gx_system.h" #include "gx_drop_list.h" /**************************************************************************/ /* */ /* FUNCTION RELEASE */ /* */ /* _gx_drop_list_close PORTABLE C */ /* 6.1 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ /* */ /* DESCRIPTION */ /* */ /* This service closes a drop list. */ /* */ /* INPUT */ /* */ /* drop_list Drop list control block */ /* */ /* OUTPUT */ /* */ /* status Completion status */ /* */ /* CALLS */ /* */ /* _gx_widget_unlink Unlink a widget */ /* */ /* CALLED BY */ /* */ /* Application Code */ /* _gx_drop_list_event_process */ /* */ /* 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_drop_list_close(GX_DROP_LIST *drop_list) { GX_VERTICAL_LIST *list = &drop_list -> gx_drop_list_popup.gx_popup_list_list; GX_WIDGET *child = list -> gx_widget_first_child; if (drop_list -> gx_drop_list_popup_open) { drop_list -> gx_drop_list_popup_open = GX_FALSE; while (child) { child -> gx_widget_style &= ~GX_STYLE_DRAW_SELECTED; child = child -> gx_widget_next; } _gx_widget_unlink((GX_WIDGET *)list); } return(GX_SUCCESS); }