/*************************************************************************** * 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 */ /** */ /** Progress Bar Management (Radial Progress Bar) */ /** */ /**************************************************************************/ #define GX_SOURCE_CODE /* Include necessary system files. */ #include "gx_api.h" #include "gx_radial_progress_bar.h" /* Bring in externs for caller checking code. */ GX_CALLER_CHECKING_EXTERNS /**************************************************************************/ /* */ /* FUNCTION RELEASE */ /* */ /* _gxe_radial_progress_bar_create PORTABLE C */ /* 6.1 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ /* */ /* DESCRIPTION */ /* */ /* This function checks for errors in the radial progress bar create */ /* call. */ /* */ /* INPUT */ /* */ /* progress_bar Progress Bar control block */ /* name Name of radial progress bar */ /* parent Pointer to parent widget */ /* info Pointer to radial progress */ /* bar info. */ /* style Style of radial progress bar */ /* id Application-defined ID of */ /* progress bar */ /* size Dimensions of radial progress */ /* bar */ /* */ /* OUTPUT */ /* */ /* status Completion status */ /* */ /* CALLS */ /* */ /* _gx_radial_progress_bar_create Actual radial progress bar */ /* create call */ /* */ /* CALLED BY */ /* */ /* Application 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 _gxe_radial_progress_bar_create(GX_RADIAL_PROGRESS_BAR *progress_bar, GX_CONST GX_CHAR *name, GX_WIDGET *parent, GX_RADIAL_PROGRESS_BAR_INFO *info, ULONG style, USHORT id, UINT progress_bar_control_block_size) { UINT status; /* Check for invalid caller. */ GX_INIT_AND_THREADS_CALLER_CHECKING /* Check for invalid pointer. */ if ((progress_bar == GX_NULL) || (info == GX_NULL)) { return(GX_PTR_ERROR); } /* Check for invalid widget control block size. */ if (progress_bar_control_block_size != sizeof(GX_RADIAL_PROGRESS_BAR)) { return(GX_INVALID_SIZE); } /* Check for widget already created. */ if (progress_bar -> gx_widget_type != 0) { return(GX_ALREADY_CREATED); } /* Check for invalid parent widget. */ if (parent && (parent -> gx_widget_type == 0)) { return(GX_INVALID_WIDGET); } /* Call actual radial progress bar create function. */ status = _gx_radial_progress_bar_create(progress_bar, name, parent, info, style, id); /* Return completion status. */ return status; }