/*************************************************************************** * 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 */ /** */ /** System Management (System) */ /** */ /**************************************************************************/ #define GX_SOURCE_CODE /* Include necessary system files. */ #include "gx_api.h" #include "gx_widget.h" /**************************************************************************/ /* */ /* FUNCTION RELEASE */ /* */ /* _gxe_widget_color_get PORTABLE C */ /* 6.1 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ /* */ /* DESCRIPTION */ /* */ /* This function checks for errors in system color get call. */ /* */ /* INPUT */ /* */ /* widget caller identify */ /* color_id Resource ID of color */ /* return_color Pointer to destination for */ /* color */ /* */ /* OUTPUT */ /* */ /* status Completion status */ /* */ /* CALLS */ /* */ /* _gx_widget_color_get Actual widget color get call */ /* */ /* CALLED BY */ /* */ /* Application Code */ /* GUIX default draw funtions */ /* */ /* 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 _gxe_widget_color_get(GX_WIDGET *widget, GX_RESOURCE_ID color_id, GX_COLOR *return_color) { UINT status; /* Check for invalid pointer. */ if ((return_color == GX_NULL) || (widget == GX_NULL)) { return(GX_PTR_ERROR); } /* Check for invalid widget. */ if (widget -> gx_widget_type == 0) { return(GX_INVALID_WIDGET); } /* Call actual widget color get. */ status = _gx_widget_color_get(widget, color_id, return_color); /* Return status. */ return(status); }