1 /**************************************************************************/ 2 /* */ 3 /* Copyright (c) Microsoft Corporation. All rights reserved. */ 4 /* */ 5 /* This software is licensed under the Microsoft Software License */ 6 /* Terms for Microsoft Azure RTOS. Full text of the license can be */ 7 /* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */ 8 /* and in the root directory of this software. */ 9 /* */ 10 /**************************************************************************/ 11 12 13 /**************************************************************************/ 14 /**************************************************************************/ 15 /** */ 16 /** GUIX Component */ 17 /** */ 18 /** Button Management (Checkbox) */ 19 /** */ 20 /**************************************************************************/ 21 22 #define GX_SOURCE_CODE 23 24 25 /* Include necessary system files. */ 26 27 #include "gx_api.h" 28 #include "gx_widget.h" 29 #include "gx_button.h" 30 #include "gx_system.h" 31 32 GX_CALLER_CHECKING_EXTERNS 33 34 /**************************************************************************/ 35 /* */ 36 /* FUNCTION RELEASE */ 37 /* */ 38 /* _gxe_checkbox_select PORTABLE C */ 39 /* 6.1 */ 40 /* AUTHOR */ 41 /* */ 42 /* Kenneth Maxwell, Microsoft Corporation */ 43 /* */ 44 /* DESCRIPTION */ 45 /* */ 46 /* This function checks for errors in the checkbox select function */ 47 /* call. */ 48 /* */ 49 /* INPUT */ 50 /* */ 51 /* checkbox Checkbox control block */ 52 /* */ 53 /* OUTPUT */ 54 /* */ 55 /* status Completion status */ 56 /* */ 57 /* CALLS */ 58 /* */ 59 /* _gx_checkbox_select Actual checkbox select call */ 60 /* */ 61 /* CALLED BY */ 62 /* */ 63 /* Application Code */ 64 /* */ 65 /* RELEASE HISTORY */ 66 /* */ 67 /* DATE NAME DESCRIPTION */ 68 /* */ 69 /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ 70 /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ 71 /* resulting in version 6.1 */ 72 /* */ 73 /**************************************************************************/ _gxe_checkbox_select(GX_CHECKBOX * checkbox)74UINT _gxe_checkbox_select(GX_CHECKBOX *checkbox) 75 { 76 UINT status; 77 GX_WIDGET *parent; 78 79 /* Check for appropriate caller. */ 80 GX_INIT_AND_THREADS_CALLER_CHECKING 81 82 /* Check for the invalid input pointers. */ 83 if ((checkbox == GX_NULL) || (checkbox -> gx_widget_parent == GX_NULL)) 84 { 85 return(GX_PTR_ERROR); 86 } 87 88 parent = checkbox -> gx_widget_parent; 89 90 /* Check for the invalid widget. */ 91 if ((parent -> gx_widget_type == 0) || 92 (checkbox -> gx_widget_type == 0)) 93 { 94 return(GX_INVALID_WIDGET); 95 } 96 97 /* Call the actual checkbox select function. */ 98 status = _gx_checkbox_select(checkbox); 99 100 /* Return completion status. */ 101 return status; 102 } 103 104