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 /** Prompt Management (Slider) */ 19 /** */ 20 /**************************************************************************/ 21 /**************************************************************************/ 22 23 24 /**************************************************************************/ 25 /* */ 26 /* COMPONENT DEFINITION RELEASE */ 27 /* */ 28 /* gx_slider.h PORTABLE C */ 29 /* 6.1 */ 30 /* AUTHOR */ 31 /* */ 32 /* Kenneth Maxwell, Microsoft Corporation */ 33 /* */ 34 /* DESCRIPTION */ 35 /* */ 36 /* This file defines the GUIX slide widget, */ 37 /* including all data types and external references. It is assumed */ 38 /* that gx_api.h and gx_port.h have already been included. */ 39 /* */ 40 /* RELEASE HISTORY */ 41 /* */ 42 /* DATE NAME DESCRIPTION */ 43 /* */ 44 /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ 45 /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ 46 /* resulting in version 6.1 */ 47 /* */ 48 /**************************************************************************/ 49 50 #ifndef GX_SLIDER_H 51 #define GX_SLIDER_H 52 53 54 /* Define prompt management function prototypes. */ 55 56 #define GX_SLIDER_NEEDLE_WIDTH 5 57 58 UINT _gx_slider_create(GX_SLIDER *slider, GX_CONST GX_CHAR *name, GX_WIDGET *parent, 59 INT tick_count, GX_SLIDER_INFO *slider_info, 60 ULONG style, USHORT slider_id, GX_CONST GX_RECTANGLE *size); 61 62 VOID _gx_slider_draw(GX_SLIDER *slider); 63 UINT _gx_slider_event_process(GX_SLIDER *slider, GX_EVENT *event_ptr); 64 UINT _gx_slider_info_set(GX_SLIDER *slider, GX_SLIDER_INFO *info); 65 VOID _gx_slider_needle_draw(GX_SLIDER *slider); 66 UINT _gx_slider_needle_position_get(GX_SLIDER *slider, GX_SLIDER_INFO *slider_info, GX_RECTANGLE *return_position); 67 VOID _gx_slider_tickmarks_draw(GX_SLIDER *slider); 68 UINT _gx_slider_travel_get(GX_SLIDER *slider, GX_SLIDER_INFO *info, INT *return_min_travel, INT *return_max_travel); 69 UINT _gx_slider_value_calculate(GX_SLIDER *slider, GX_SLIDER_INFO *info, INT newpos); 70 UINT _gx_slider_value_set(GX_SLIDER *slider, GX_SLIDER_INFO *info, INT new_value); 71 72 UINT _gx_pixelmap_slider_create(GX_PIXELMAP_SLIDER *slider, GX_CONST GX_CHAR *name, GX_WIDGET *parent, 73 GX_SLIDER_INFO *info, 74 GX_PIXELMAP_SLIDER_INFO *pixelmap_info, ULONG style, USHORT pixelmap_slider_id, 75 GX_CONST GX_RECTANGLE *size); 76 77 VOID _gx_pixelmap_slider_draw(GX_PIXELMAP_SLIDER *slider); 78 UINT _gx_pixelmap_slider_event_process(GX_PIXELMAP_SLIDER *slider, GX_EVENT *event_ptr); 79 UINT _gx_pixelmap_slider_pixelmap_set(GX_PIXELMAP_SLIDER *slider, GX_PIXELMAP_SLIDER_INFO *info); 80 81 UINT _gxe_slider_create(GX_SLIDER *slider, GX_CONST GX_CHAR *name, GX_WIDGET *parent, INT tick_count, 82 GX_SLIDER_INFO *slider_info, ULONG style, USHORT slider_id, GX_CONST GX_RECTANGLE *size, 83 UINT slider_control_block_size); 84 UINT _gxe_slider_event_process(GX_SLIDER *slider, GX_EVENT *event_ptr); 85 UINT _gxe_slider_travel_get(GX_SLIDER *slider, GX_SLIDER_INFO *info, INT *return_min_travel, INT *return_max_travel); 86 UINT _gxe_slider_needle_position_get(GX_SLIDER *slider, GX_SLIDER_INFO *slider_info, GX_RECTANGLE *return_position); 87 UINT _gxe_slider_value_calculate(GX_SLIDER *slider, GX_SLIDER_INFO *info, INT new_position); 88 UINT _gxe_slider_value_set(GX_SLIDER *slider, GX_SLIDER_INFO *info, INT new_value); 89 90 UINT _gxe_pixelmap_slider_create(GX_PIXELMAP_SLIDER *slider, GX_CONST GX_CHAR *name, GX_WIDGET *parent, 91 GX_SLIDER_INFO *info, GX_PIXELMAP_SLIDER_INFO *pixelmap_info, 92 ULONG style, USHORT pixelmap_slider_id, 93 GX_CONST GX_RECTANGLE *size, UINT pixelmap_slider_controlb_block_size); 94 UINT _gxe_pixelmap_slider_event_process(GX_PIXELMAP_SLIDER *slider, GX_EVENT *event_ptr); 95 UINT _gxe_slider_info_set(GX_SLIDER *slider, GX_SLIDER_INFO *info); 96 UINT _gxe_pixelmap_slider_pixelmap_set(GX_PIXELMAP_SLIDER *slider, GX_PIXELMAP_SLIDER_INFO *info); 97 VOID _gx_pixelmap_slider_pixelmap_update(GX_PIXELMAP_SLIDER *slider); 98 99 #endif 100 101