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 /** Text Input Management (Single Line Text Input) */ 19 /** */ 20 /**************************************************************************/ 21 22 #define GX_SOURCE_CODE 23 24 25 /* Include necessary system files. */ 26 27 #include "gx_api.h" 28 #include "gx_single_line_text_input.h" 29 30 GX_CALLER_CHECKING_EXTERNS 31 32 /**************************************************************************/ 33 /* */ 34 /* FUNCTION RELEASE */ 35 /* */ 36 /* _gxe_single_line_text_input_character_insert PORTABLE C */ 37 /* 6.1 */ 38 /* AUTHOR */ 39 /* */ 40 /* Kenneth Maxwell, Microsoft Corporation */ 41 /* */ 42 /* DESCRIPTION */ 43 /* */ 44 /* This function checks for errors in the single line text input */ 45 /* character insert call. */ 46 /* */ 47 /* INPUT */ 48 /* */ 49 /* text_input Single-line text input widget */ 50 /* control block */ 51 /* insert_str Byte string of insert */ 52 /* character */ 53 /* insert_size String size of insert */ 54 /* character */ 55 /* */ 56 /* OUTPUT */ 57 /* */ 58 /* status Completion status */ 59 /* */ 60 /* CALLS */ 61 /* */ 62 /* _gx_single_line_text_input_character_insert */ 63 /* Acutal call to the character */ 64 /* insert function */ 65 /* */ 66 /* CALLED BY */ 67 /* */ 68 /* Application Code */ 69 /* */ 70 /* RELEASE HISTORY */ 71 /* */ 72 /* DATE NAME DESCRIPTION */ 73 /* */ 74 /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ 75 /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ 76 /* resulting in version 6.1 */ 77 /* */ 78 /**************************************************************************/ _gxe_single_line_text_input_character_insert(GX_SINGLE_LINE_TEXT_INPUT * text_input,GX_UBYTE * insert_str,UINT insert_size)79UINT _gxe_single_line_text_input_character_insert(GX_SINGLE_LINE_TEXT_INPUT *text_input, GX_UBYTE *insert_str, UINT insert_size) 80 { 81 UINT status; 82 83 /* Check for appropriate caller. */ 84 GX_INIT_AND_THREADS_CALLER_CHECKING 85 86 /* Check for invalid input pointers. */ 87 if (text_input == GX_NULL) 88 { 89 return GX_PTR_ERROR; 90 } 91 92 if (text_input -> gx_widget_type == 0) 93 { 94 return GX_INVALID_WIDGET; 95 } 96 97 /* Call the actual text input character insert function. */ 98 status = _gx_single_line_text_input_character_insert(text_input, insert_str, insert_size); 99 100 /* Return completion status. */ 101 return(status); 102 } 103 104