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 |
|
|
/** Canvas Management (Canvas) */ |
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_utility.h" |
30 |
|
|
#include "gx_canvas.h" |
31 |
|
|
|
32 |
|
|
|
33 |
|
|
/**************************************************************************/ |
34 |
|
|
/* */ |
35 |
|
|
/* FUNCTION RELEASE */ |
36 |
|
|
/* */ |
37 |
|
|
/* _gx_canvas_show PORTABLE C */ |
38 |
|
|
/* 6.1 */ |
39 |
|
|
/* AUTHOR */ |
40 |
|
|
/* */ |
41 |
|
|
/* Kenneth Maxwell, Microsoft Corporation */ |
42 |
|
|
/* */ |
43 |
|
|
/* DESCRIPTION */ |
44 |
|
|
/* */ |
45 |
|
|
/* This function makes a canvas visible */ |
46 |
|
|
/* */ |
47 |
|
|
/* INPUT */ |
48 |
|
|
/* */ |
49 |
|
|
/* canvas Canvas control block */ |
50 |
|
|
/* */ |
51 |
|
|
/* OUTPUT */ |
52 |
|
|
/* */ |
53 |
|
|
/* status Completion status */ |
54 |
|
|
/* */ |
55 |
|
|
/* CALLS */ |
56 |
|
|
/* */ |
57 |
|
|
/* _gx_canvas_dirty_mark Set the canvas dirty flag */ |
58 |
|
|
/* */ |
59 |
|
|
/* CALLED BY */ |
60 |
|
|
/* */ |
61 |
|
|
/* Application */ |
62 |
|
|
/* */ |
63 |
|
|
/**************************************************************************/ |
64 |
|
46 |
UINT _gx_canvas_show(GX_CANVAS *canvas) |
65 |
|
|
{ |
66 |
|
|
VOID (*show_function)(INT layer); |
67 |
|
|
|
68 |
|
|
/* change the alpha value */ |
69 |
|
46 |
canvas -> gx_canvas_status |= GX_CANVAS_VISIBLE; |
70 |
|
|
|
71 |
✓✓ |
46 |
if (canvas -> gx_canvas_hardware_layer >= 0) |
72 |
|
|
{ |
73 |
|
2 |
show_function = canvas -> gx_canvas_display -> gx_display_layer_services -> gx_display_layer_show; |
74 |
|
|
|
75 |
✓✓ |
2 |
if (show_function) |
76 |
|
|
{ |
77 |
|
1 |
show_function(canvas -> gx_canvas_hardware_layer); |
78 |
|
1 |
return(GX_SUCCESS); |
79 |
|
|
} |
80 |
|
|
} |
81 |
|
|
|
82 |
|
|
/* mark the canvas dirty so that it get refreshed */ |
83 |
|
45 |
_gx_canvas_dirty_mark(canvas, GX_NULL); |
84 |
|
|
|
85 |
|
|
/* Return successful status. */ |
86 |
|
45 |
return(GX_SUCCESS); |
87 |
|
|
} |
88 |
|
|
|