1 /*************************************************************************** 2 * Copyright (c) 2024 Microsoft Corporation 3 * 4 * This program and the accompanying materials are made available under the 5 * terms of the MIT License which is available at 6 * https://opensource.org/licenses/MIT. 7 * 8 * SPDX-License-Identifier: MIT 9 **************************************************************************/ 10 11 12 /**************************************************************************/ 13 /**************************************************************************/ 14 /** */ 15 /** GUIX Component */ 16 /** */ 17 /** Progress Bar Management (Progress Bar) */ 18 /** */ 19 /**************************************************************************/ 20 /**************************************************************************/ 21 22 23 /**************************************************************************/ 24 /* */ 25 /* COMPONENT DEFINITION RELEASE */ 26 /* */ 27 /* gx_progress_bar.h PORTABLE C */ 28 /* 6.1 */ 29 /* AUTHOR */ 30 /* */ 31 /* Kenneth Maxwell, Microsoft Corporation */ 32 /* */ 33 /* DESCRIPTION */ 34 /* */ 35 /* This file defines the GUIX progress bar widget, */ 36 /* including all data types and external references. It is assumed */ 37 /* that gx_api.h and gx_port.h have already been included. */ 38 /* */ 39 /* RELEASE HISTORY */ 40 /* */ 41 /* DATE NAME DESCRIPTION */ 42 /* */ 43 /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ 44 /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ 45 /* resulting in version 6.1 */ 46 /* */ 47 /**************************************************************************/ 48 49 #ifndef GX_PROGRESS_BAR_H 50 #define GX_PROGRESS_BAR_H 51 52 53 /* Define progress bar management function prototypes. */ 54 55 #define GX_SEGMENT_BORDER_INTERVAL 1 56 #define GX_SEGMENT_INTERVAL 1 57 58 VOID _gx_progress_bar_background_draw(GX_PROGRESS_BAR *progress_bar); 59 UINT _gx_progress_bar_create(GX_PROGRESS_BAR *progress_bar, GX_CONST GX_CHAR *name, GX_WIDGET *parent, 60 GX_PROGRESS_BAR_INFO *progress_bar_info, ULONG style, 61 USHORT progress_bar_id, GX_CONST GX_RECTANGLE *size); 62 VOID _gx_progress_bar_draw(GX_PROGRESS_BAR *progress_bar); 63 UINT _gx_progress_bar_event_process(GX_PROGRESS_BAR *progress_bar, GX_EVENT *event_ptr); 64 UINT _gx_progress_bar_font_set(GX_PROGRESS_BAR *progress_bar, GX_RESOURCE_ID font_id); 65 UINT _gx_progress_bar_info_set(GX_PROGRESS_BAR *progress_bar, GX_PROGRESS_BAR_INFO *info); 66 UINT _gx_progress_bar_pixelmap_set(GX_PROGRESS_BAR *progress_bar, GX_RESOURCE_ID pixelmap); 67 UINT _gx_progress_bar_range_set(GX_PROGRESS_BAR *progress_bar, INT min_value, INT max_value); 68 UINT _gx_progress_bar_text_color_set(GX_PROGRESS_BAR *progress_bar, GX_RESOURCE_ID normal_text_color_id, 69 GX_RESOURCE_ID selected_text_color_id, GX_RESOURCE_ID disabled_text_color_id); 70 VOID _gx_progress_bar_text_draw(GX_PROGRESS_BAR *progress_bar); 71 UINT _gx_progress_bar_value_set(GX_PROGRESS_BAR *progress_bar, INT new_value); 72 73 UINT _gxe_progress_bar_create(GX_PROGRESS_BAR *progress_bar, GX_CONST GX_CHAR *name, GX_WIDGET *parent, 74 GX_PROGRESS_BAR_INFO *progress_bar_info, ULONG style, 75 USHORT progress_bar_id, GX_CONST GX_RECTANGLE *size, 76 UINT progress_bar_control_block_size); 77 78 /* Define error checking shells for API services. These are only referenced by the 79 application. */ 80 81 UINT _gxe_progress_bar_event_process(GX_PROGRESS_BAR *progress_bar, GX_EVENT *event_ptr); 82 UINT _gxe_progress_bar_font_set(GX_PROGRESS_BAR *progress_bar, GX_RESOURCE_ID font_id); 83 UINT _gxe_progress_bar_info_set(GX_PROGRESS_BAR *progress_bar, GX_PROGRESS_BAR_INFO *info); 84 UINT _gxe_progress_bar_pixelmap_set(GX_PROGRESS_BAR *progress_bar, GX_RESOURCE_ID pixelmap); 85 UINT _gxe_progress_bar_range_set(GX_PROGRESS_BAR *progress_bar, INT min_value, INT max_value); 86 UINT _gxe_progress_bar_text_color_set(GX_PROGRESS_BAR *progress_bar, GX_RESOURCE_ID normal_text_color_id, 87 GX_RESOURCE_ID selected_text_color_id, GX_RESOURCE_ID disabled_text_color_id); 88 UINT _gxe_progress_bar_value_set(GX_PROGRESS_BAR *progress_bar, INT new_value); 89 90 #endif 91 92