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 |
|
|
/** Window Management (Window) */ |
19 |
|
|
/** */ |
20 |
|
|
/**************************************************************************/ |
21 |
|
|
|
22 |
|
|
#define GX_SOURCE_CODE |
23 |
|
|
|
24 |
|
|
|
25 |
|
|
/* Include necessary system files. */ |
26 |
|
|
|
27 |
|
|
#include "gx_api.h" |
28 |
|
|
#include "gx_widget.h" |
29 |
|
|
#include "gx_window.h" |
30 |
|
|
|
31 |
|
|
|
32 |
|
|
/**************************************************************************/ |
33 |
|
|
/* */ |
34 |
|
|
/* FUNCTION RELEASE */ |
35 |
|
|
/* */ |
36 |
|
|
/* _gx_window_view_update_detect PORTABLE C */ |
37 |
|
|
/* 6.1 */ |
38 |
|
|
/* AUTHOR */ |
39 |
|
|
/* */ |
40 |
|
|
/* Kenneth Maxwell, Microsoft Corporation */ |
41 |
|
|
/* */ |
42 |
|
|
/* DESCRIPTION */ |
43 |
|
|
/* */ |
44 |
|
|
/* This function is called when a window is moved or changes in a way */ |
45 |
|
|
/* that causes viewports to be invalid. Check to see if this window is */ |
46 |
|
|
/* a child of the root window, and if so mark the root as needing an */ |
47 |
|
|
/* update. */ |
48 |
|
|
/* */ |
49 |
|
|
/* INPUT */ |
50 |
|
|
/* */ |
51 |
|
|
/* window Window's widget control block */ |
52 |
|
|
/* */ |
53 |
|
|
/* OUTPUT */ |
54 |
|
|
/* */ |
55 |
|
|
/* status Completion status */ |
56 |
|
|
/* */ |
57 |
|
|
/* CALLS */ |
58 |
|
|
/* */ |
59 |
|
|
/* none */ |
60 |
|
|
/* */ |
61 |
|
|
/* CALLED BY */ |
62 |
|
|
/* */ |
63 |
|
|
/* Application Code */ |
64 |
|
|
/* GUIX Internal Code */ |
65 |
|
|
/* */ |
66 |
|
|
/**************************************************************************/ |
67 |
|
28621 |
VOID _gx_window_view_update_detect(GX_WINDOW *window) |
68 |
|
|
{ |
69 |
|
|
GX_WINDOW_ROOT *root; |
70 |
|
|
GX_WIDGET *parent; |
71 |
|
|
|
72 |
|
|
/* pick up a pointer to the parent of this widget */ |
73 |
|
|
|
74 |
✓✓ |
28621 |
if (window -> gx_widget_type >= GX_TYPE_WINDOW) |
75 |
|
|
{ |
76 |
|
28620 |
parent = window -> gx_widget_parent; |
77 |
|
|
|
78 |
✓✓ |
28620 |
if (parent) |
79 |
|
|
{ |
80 |
|
|
/* is my parent a GX_ROOT_WINDOW type? */ |
81 |
✓✓ |
26806 |
if (parent -> gx_widget_type == GX_TYPE_ROOT_WINDOW) |
82 |
|
|
{ |
83 |
|
4878 |
root = (GX_WINDOW_ROOT *)parent; |
84 |
|
4878 |
root -> gx_window_root_views_changed = GX_TRUE; |
85 |
|
|
} |
86 |
|
|
} |
87 |
|
|
else |
88 |
|
|
{ |
89 |
✓✓ |
1814 |
if (window -> gx_widget_type == GX_TYPE_ROOT_WINDOW) |
90 |
|
|
{ |
91 |
|
1811 |
root = (GX_WINDOW_ROOT *)window; |
92 |
|
1811 |
root -> gx_window_root_views_changed = GX_TRUE; |
93 |
|
|
} |
94 |
|
|
} |
95 |
|
|
} |
96 |
|
28621 |
} |
97 |
|
|
|