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 /** Prompt Management (Prompt) */ 18 /** */ 19 /**************************************************************************/ 20 /**************************************************************************/ 21 22 23 /**************************************************************************/ 24 /* */ 25 /* COMPONENT DEFINITION RELEASE */ 26 /* */ 27 /* gx_prompt.h PORTABLE C */ 28 /* 6.1 */ 29 /* AUTHOR */ 30 /* */ 31 /* Kenneth Maxwell, Microsoft Corporation */ 32 /* */ 33 /* DESCRIPTION */ 34 /* */ 35 /* This file defines the GUIX prompt management component, */ 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 /* added new prototypes, */ 46 /* resulting in version 6.1 */ 47 /* */ 48 /**************************************************************************/ 49 50 #ifndef GX_PROMPT_H 51 #define GX_PROMPT_H 52 53 54 /* Define prompt management function prototypes. */ 55 56 UINT _gx_prompt_create(GX_PROMPT *prompt, GX_CONST GX_CHAR *name, GX_WIDGET *parent, 57 GX_RESOURCE_ID text_id, 58 ULONG style, USHORT prompt_id, 59 GX_CONST GX_RECTANGLE *size); 60 VOID _gx_prompt_draw(GX_PROMPT *prompt); 61 UINT _gx_prompt_event_process(GX_PROMPT *prompt, GX_EVENT *event_ptr); 62 UINT _gx_prompt_font_set(GX_PROMPT *prompt, GX_RESOURCE_ID fontid); 63 VOID _gx_prompt_text_draw(GX_PROMPT *prompt); 64 UINT _gx_prompt_text_color_set(GX_PROMPT *prompt, 65 GX_RESOURCE_ID normal_text_color_id, 66 GX_RESOURCE_ID selected_text_color_id, 67 GX_RESOURCE_ID disabled_text_color_id); 68 #if defined(GX_ENABLE_DEPRECATED_STRING_API) 69 UINT _gx_prompt_text_get(GX_PROMPT *prompt, GX_CONST GX_CHAR **return_text); 70 UINT _gx_prompt_text_set(GX_PROMPT *prompt, GX_CONST GX_CHAR *text); 71 #endif 72 UINT _gx_prompt_text_get_ext(GX_PROMPT *prompt, GX_STRING *return_text); 73 UINT _gx_prompt_text_set_ext(GX_PROMPT *prompt, GX_CONST GX_STRING *text); 74 75 UINT _gx_prompt_text_id_set(GX_PROMPT *prompt, GX_RESOURCE_ID string_id); 76 77 78 /* Define error checking shells for API services. These are only referenced by the 79 application. */ 80 81 UINT _gxe_prompt_create(GX_PROMPT *prompt, GX_CONST GX_CHAR *name, GX_WIDGET *parent, GX_RESOURCE_ID text_id, 82 ULONG style, USHORT prompt_id, GX_CONST GX_RECTANGLE *size, UINT prompt_control_block_size); 83 UINT _gxe_prompt_event_process(GX_PROMPT *prompt, GX_EVENT *event_ptr); 84 UINT _gxe_prompt_font_set(GX_PROMPT *prompt, GX_RESOURCE_ID fontid); 85 UINT _gxe_prompt_text_color_set(GX_PROMPT *prompt, 86 GX_RESOURCE_ID normal_text_color_id, 87 GX_RESOURCE_ID selected_text_color_id, 88 GX_RESOURCE_ID disabled_text_color_id); 89 #if defined(GX_ENABLE_DEPRECATED_STRING_API) 90 UINT _gxe_prompt_text_get(GX_PROMPT *prompt, GX_CONST GX_CHAR **return_text); 91 UINT _gxe_prompt_text_set(GX_PROMPT *prompt, GX_CONST GX_CHAR *text); 92 #endif 93 UINT _gxe_prompt_text_get_ext(GX_PROMPT *prompt, GX_STRING *return_text); 94 UINT _gxe_prompt_text_set_ext(GX_PROMPT *prompt, GX_CONST GX_STRING *text); 95 96 UINT _gxe_prompt_text_id_set(GX_PROMPT *prompt, GX_RESOURCE_ID string_id); 97 #endif 98 99