/*************************************************************************** * 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 */ /** */ /** Scroll Wheel Management (Scroll Wheel) */ /** */ /**************************************************************************/ #define GX_SOURCE_CODE /* Include necessary system files. */ #include "gx_api.h" #include "gx_scroll_wheel.h" GX_CALLER_CHECKING_EXTERNS /**************************************************************************/ /* */ /* FUNCTION RELEASE */ /* */ /* _gxe_scroll_wheel_create PORTABLE C */ /* 6.1 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ /* */ /* DESCRIPTION */ /* */ /* This function checks for errors in scroll wheel create call. */ /* */ /* INPUT */ /* */ /* wheel Scroll wheel control block */ /* name Name of widget */ /* parent Parent widget control block */ /* total_rows Total rows of the scroll wheel*/ /* style Style of widget */ /* Id Application-defined ID of the */ /* the widget */ /* size Widget size */ /* control_block_size Size of the scroll wheel */ /* control block */ /* */ /* OUTPUT */ /* */ /* status Completion status */ /* */ /* CALLS */ /* */ /* _gx_scroll_wheel_create Actual scroll wheel */ /* 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_scroll_wheel_create(GX_SCROLL_WHEEL *wheel, GX_CONST GX_CHAR *name, GX_WIDGET *parent, INT total_rows, ULONG style, USHORT Id, GX_CONST GX_RECTANGLE *size, UINT control_block_size) { UINT status; /* Check for appropriate caller. */ GX_INIT_AND_THREADS_CALLER_CHECKING /* Check for invalid pointer. */ if ((wheel == GX_NULL) || (size == GX_NULL)) { return GX_PTR_ERROR; } /* Check for invalid control block size. */ if (control_block_size != sizeof(GX_SCROLL_WHEEL)) { return GX_INVALID_SIZE; } /* Check for widget already created. */ if (wheel -> gx_widget_type != 0) { return(GX_ALREADY_CREATED); } /* Check for invalid parent widget. */ if (parent && parent -> gx_widget_type == 0) { return(GX_INVALID_WIDGET); } status = _gx_scroll_wheel_create(wheel, name, parent, total_rows, style, Id, size); return status; }