1 |
|
|
/*************************************************************************** |
2 |
|
|
* Copyright (c) 2024 Microsoft Corporation |
3 |
|
|
* Copyright (c) 2026-present Eclipse ThreadX contributors |
4 |
|
|
* |
5 |
|
|
* This program and the accompanying materials are made available under the |
6 |
|
|
* terms of the MIT License which is available at |
7 |
|
|
* https://opensource.org/licenses/MIT. |
8 |
|
|
* |
9 |
|
|
* SPDX-License-Identifier: MIT |
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 |
|
|
/**************************************************************************/ |
62 |
|
939 |
UINT _gx_rich_text_view_context_restore(VOID) |
63 |
|
|
{ |
64 |
|
939 |
GX_UBYTE top = _gx_system_rich_text_context_stack_save.gx_rich_text_context_stack_top; |
65 |
|
|
|
66 |
✓✓ |
939 |
if (top) |
67 |
|
|
{ |
68 |
|
|
/* Restore stack to last save point. */ |
69 |
|
216 |
memcpy(&_gx_system_rich_text_context_stack.gx_rich_text_context_stack, /* Use case of memcpy is verified. */ |
70 |
|
|
&_gx_system_rich_text_context_stack_save.gx_rich_text_context_stack, sizeof(GX_RICH_TEXT_CONTEXT) * top); |
71 |
|
|
} |
72 |
|
|
|
73 |
|
939 |
_gx_system_rich_text_context_stack.gx_rich_text_context_stack_top = top; |
74 |
|
|
|
75 |
|
939 |
return GX_SUCCESS; |
76 |
|
|
} |
77 |
|
|
|