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