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 /** Rich Text View Management (Rich Text View) */ 19 /** */ 20 /**************************************************************************/ 21 22 #define GX_SOURCE_CODE 23 24 25 /* Include necessary system files. */ 26 27 #include "gx_api.h" 28 #include "gx_system.h" 29 #include "gx_rich_text_view.h" 30 31 /**************************************************************************/ 32 /* */ 33 /* COMPONENT DEFINITION RELEASE */ 34 /* */ 35 /* _gx_rich_text_view_context_restore PORTABLE C */ 36 /* 6.1 */ 37 /* AUTHOR */ 38 /* */ 39 /* Kenneth Maxwell, Microsoft Corporation */ 40 /* */ 41 /* DESCRIPTION */ 42 /* */ 43 /* This function restores rich text context stack to last save point. */ 44 /* */ 45 /* INPUT */ 46 /* */ 47 /* None */ 48 /* */ 49 /* OUTPUT */ 50 /* */ 51 /* status Completion status */ 52 /* */ 53 /* CALLS */ 54 /* */ 55 /* None */ 56 /* */ 57 /* CALLED BY */ 58 /* */ 59 /* GUIX Internal Code */ 60 /* */ 61 /* RELEASE HISTORY */ 62 /* */ 63 /* DATE NAME DESCRIPTION */ 64 /* */ 65 /* 09-30-2020 Kenneth Maxwell Initial Version 6.1 */ 66 /* */ 67 /**************************************************************************/ _gx_rich_text_view_context_restore()68UINT _gx_rich_text_view_context_restore() 69 { 70 GX_UBYTE top = _gx_system_rich_text_context_stack_save.gx_rich_text_context_stack_top; 71 72 if (top) 73 { 74 /* Restore stack to last save point. */ 75 memcpy(&_gx_system_rich_text_context_stack.gx_rich_text_context_stack, /* Use case of memcpy is verified. */ 76 &_gx_system_rich_text_context_stack_save.gx_rich_text_context_stack, sizeof(GX_RICH_TEXT_CONTEXT) * top); 77 } 78 79 _gx_system_rich_text_context_stack.gx_rich_text_context_stack_top = top; 80 81 return GX_SUCCESS; 82 } 83 84