GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: gx_system_views_update.c Lines: 6 6 100.0 %
Date: 2024-12-05 08:52:37 Branches: 0 0 - %

Line Branch Exec Source
1
/***************************************************************************
2
 * Copyright (c) 2024 Microsoft Corporation
3
 *
4
 * This program and the accompanying materials are made available under the
5
 * terms of the MIT License which is available at
6
 * https://opensource.org/licenses/MIT.
7
 *
8
 * SPDX-License-Identifier: MIT
9
 **************************************************************************/
10
11
12
/**************************************************************************/
13
/**************************************************************************/
14
/**                                                                       */
15
/** GUIX Component                                                        */
16
/**                                                                       */
17
/**   System Management (System)                                          */
18
/**                                                                       */
19
/**************************************************************************/
20
21
#define GX_SOURCE_CODE
22
23
24
/* Include necessary system files.  */
25
26
#include "gx_api.h"
27
#include "gx_system.h"
28
#include "gx_utility.h"
29
30
31
/**************************************************************************/
32
/*                                                                        */
33
/*  FUNCTION                                               RELEASE        */
34
/*                                                                        */
35
/*    _gx_system_views_update                             PORTABLE C      */
36
/*                                                           6.1          */
37
/*  AUTHOR                                                                */
38
/*                                                                        */
39
/*    Kenneth Maxwell, Microsoft Corporation                              */
40
/*                                                                        */
41
/*  DESCRIPTION                                                           */
42
/*                                                                        */
43
/*    This function calculates the viewports that are owned by each       */
44
/*    top level window attached to a root.                                */
45
/*                                                                        */
46
/*  INPUT                                                                 */
47
/*                                                                        */
48
/*    root                                  Root window that needs to     */
49
/*                                            have it's children updated  */
50
/*                                                                        */
51
/*  OUTPUT                                                                */
52
/*                                                                        */
53
/*    children of the root window have view list updated.                 */
54
/*                                                                        */
55
/*  CALLS                                                                 */
56
/*                                                                        */
57
/*    _gx_system_all_views_free            Return all views to free list  */
58
/*    _gx_system_root_view_add             Add a view to root window      */
59
/*                                                                        */
60
/*                                                                        */
61
/*  CALLED BY                                                             */
62
/*                                                                        */
63
/*    _gx_system_canvas_refresh            Refresh the canvas             */
64
/*                                                                        */
65
/*  RELEASE HISTORY                                                       */
66
/*                                                                        */
67
/*    DATE              NAME                      DESCRIPTION             */
68
/*                                                                        */
69
/*  05-19-2020     Kenneth Maxwell          Initial Version 6.0           */
70
/*  09-30-2020     Kenneth Maxwell          Modified comment(s),          */
71
/*                                            resulting in version 6.1    */
72
/*                                                                        */
73
/**************************************************************************/
74
75
1881
VOID _gx_system_views_update(GX_WINDOW_ROOT *root)
76
{
77
1881
GX_RECTANGLE *baserect = &root -> gx_widget_size;
78
79
1881
    _gx_system_all_views_free(root);
80
81
    /* the root window has to check for child windows that are on top */
82
1881
    _gx_system_root_view_add(root, baserect);
83
84
    /* clear the update flag */
85
1881
    root -> gx_window_root_views_changed = GX_FALSE;
86
1881
}
87