1 |
|
|
|
2 |
|
|
/*************************************************************************** |
3 |
|
|
* Copyright (c) 2024 Microsoft Corporation |
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 |
|
|
/** Display Management (Display) */ |
19 |
|
|
/** */ |
20 |
|
|
/**************************************************************************/ |
21 |
|
|
|
22 |
|
|
#define GX_SOURCE_CODE |
23 |
|
|
/* Include necessary system files. */ |
24 |
|
|
|
25 |
|
|
#include "gx_api.h" |
26 |
|
|
#include "gx_display.h" |
27 |
|
|
|
28 |
|
|
/**************************************************************************/ |
29 |
|
|
/* */ |
30 |
|
|
/* FUNCTION RELEASE */ |
31 |
|
|
/* */ |
32 |
|
|
/* _gx_display_driver_332rgb_setup PORTABLE C */ |
33 |
|
|
/* 6.1 */ |
34 |
|
|
/* AUTHOR */ |
35 |
|
|
/* */ |
36 |
|
|
/* Kenneth Maxwell, Microsoft Corporation */ |
37 |
|
|
/* */ |
38 |
|
|
/* DESCRIPTION */ |
39 |
|
|
/* */ |
40 |
|
|
/* Generic 8-bit 332RGB color format display driver setup routine. */ |
41 |
|
|
/* */ |
42 |
|
|
/* INPUT */ |
43 |
|
|
/* */ |
44 |
|
|
/* display The display control block */ |
45 |
|
|
/* aux_data Driver-defined auxiliary data */ |
46 |
|
|
/* toggle_function Driver-defined screen toggle */ |
47 |
|
|
/* function */ |
48 |
|
|
/* */ |
49 |
|
|
/* OUTPUT */ |
50 |
|
|
/* */ |
51 |
|
|
/* None */ |
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 |
|
|
/* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ |
66 |
|
|
/* 09-30-2020 Kenneth Maxwell Modified comment(s), */ |
67 |
|
|
/* resulting in version 6.1 */ |
68 |
|
|
/* */ |
69 |
|
|
/**************************************************************************/ |
70 |
|
19 |
VOID _gx_display_driver_332rgb_setup(GX_DISPLAY *display, VOID *aux_data, |
71 |
|
|
VOID (*toggle_function)(struct GX_CANVAS_STRUCT *canvas, |
72 |
|
|
GX_RECTANGLE *dirty_area)) |
73 |
|
|
{ |
74 |
|
19 |
_gx_display_driver_8bit_palette_setup(display, aux_data, toggle_function); |
75 |
|
|
|
76 |
|
19 |
display -> gx_display_color_format = GX_COLOR_FORMAT_8BIT_PACKED_PIXEL; |
77 |
|
19 |
display -> gx_display_driver_native_color_get = _gx_display_driver_332rgb_native_color_get; |
78 |
|
19 |
display -> gx_display_driver_pixelmap_draw = _gx_display_driver_332rgb_pixelmap_draw; |
79 |
|
19 |
display -> gx_display_driver_alphamap_draw = _gx_display_driver_generic_alphamap_draw; |
80 |
|
19 |
display -> gx_display_driver_anti_aliased_line_draw = _gx_display_driver_generic_aliased_line_draw; |
81 |
|
19 |
display -> gx_display_driver_anti_aliased_wide_line_draw = _gx_display_driver_generic_aliased_wide_line_draw; |
82 |
|
|
|
83 |
|
|
#if defined(GX_ARC_DRAWING_SUPPORT) |
84 |
|
19 |
display -> gx_display_driver_anti_aliased_circle_draw = _gx_display_driver_generic_aliased_circle_draw; |
85 |
|
19 |
display -> gx_display_driver_anti_aliased_ellipse_draw = _gx_display_driver_generic_aliased_ellipse_draw; |
86 |
|
19 |
display -> gx_display_driver_anti_aliased_arc_draw = _gx_display_driver_generic_aliased_arc_draw; |
87 |
|
19 |
display -> gx_display_driver_anti_aliased_wide_circle_draw = _gx_display_driver_generic_aliased_wide_circle_draw; |
88 |
|
19 |
display -> gx_display_driver_anti_aliased_wide_ellipse_draw = _gx_display_driver_generic_aliased_wide_ellipse_draw; |
89 |
|
19 |
display -> gx_display_driver_anti_aliased_wide_arc_draw = _gx_display_driver_generic_aliased_wide_arc_draw; |
90 |
|
|
|
91 |
|
|
#endif |
92 |
|
|
|
93 |
|
19 |
display -> gx_display_driver_horizontal_pixelmap_line_draw = _gx_display_driver_332rgb_horizontal_pixelmap_line_draw; |
94 |
|
19 |
display -> gx_display_driver_pixel_blend = _gx_display_driver_332rgb_pixel_blend; |
95 |
|
19 |
display -> gx_display_driver_pixelmap_blend = _gx_display_driver_8bpp_pixelmap_blend; |
96 |
|
19 |
display -> gx_display_driver_pixelmap_rotate = _gx_display_driver_332rgb_pixelmap_rotate; |
97 |
|
19 |
display -> gx_display_driver_4bit_glyph_draw = _gx_display_driver_generic_glyph_4bit_draw; |
98 |
|
19 |
display -> gx_display_driver_8bit_glyph_draw = GX_NULL; |
99 |
|
19 |
display -> gx_display_driver_8bit_compressed_glyph_draw = GX_NULL; |
100 |
|
19 |
display -> gx_display_driver_4bit_compressed_glyph_draw = GX_NULL; |
101 |
|
19 |
display -> gx_display_driver_1bit_compressed_glyph_draw = GX_NULL; |
102 |
|
19 |
} |
103 |
|
|
|