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 /**   Synergy Simulation Display Management (Display)                     */
19 /**                                                                       */
20 /**************************************************************************/
21 
22 #define GX_SOURCE_CODE
23 #include "gx_api.h"
24 #include "gx_display.h"
25 #include "gx_dave2d_simulation_display_driver.h"
26 
27 /**************************************************************************/
28 /*                                                                        */
29 /*  FUNCTION                                               RELEASE        */
30 /*                                                                        */
31 /*    _gx_dave2d_s_display_driver_565rgb_setup           PORTABLE C       */
32 /*                                                           6.4.0        */
33 /*  AUTHOR                                                                */
34 /*                                                                        */
35 /*    Ting Zhu, Microsoft Corporation                                     */
36 /*                                                                        */
37 /*  DESCRIPTION                                                           */
38 /*                                                                        */
39 /*    Generic 16-bit 565RGB color format display driver setup routine.    */
40 /*                                                                        */
41 /*  INPUT                                                                 */
42 /*                                                                        */
43 /*    display                               The display control block     */
44 /*    aux_data                              Driver-defined auxiliary data */
45 /*    toggle_function                       Driver-defined screen toggle  */
46 /*                                            function                    */
47 /*                                                                        */
48 /*  OUTPUT                                                                */
49 /*                                                                        */
50 /*    None                                                                */
51 /*                                                                        */
52 /*  CALLS                                                                 */
53 /*                                                                        */
54 /*    None                                                                */
55 /*                                                                        */
56 /*  CALLED BY                                                             */
57 /*                                                                        */
58 /*    GUIX Internal Code                                                  */
59 /*                                                                        */
60 /*  RELEASE HISTORY                                                       */
61 /*                                                                        */
62 /*    DATE              NAME                      DESCRIPTION             */
63 /*                                                                        */
64 /*  12-31-2023     Ting Zhu                 Initial Version 6.4.0         */
65 /*                                                                        */
66 /**************************************************************************/
67 
_gx_dave2d_simulation_display_driver_565rgb_setup(GX_DISPLAY * display,VOID * aux_data,VOID (* toggle_function)(struct GX_CANVAS_STRUCT * canvas,GX_RECTANGLE * dirty_area))68 VOID _gx_dave2d_simulation_display_driver_565rgb_setup(GX_DISPLAY *display, VOID *aux_data,
69                                                         VOID (*toggle_function)(struct GX_CANVAS_STRUCT *canvas,
70                                                                                 GX_RECTANGLE *dirty_area))
71 {
72 
73     _gx_display_driver_565rgb_setup(display, aux_data, toggle_function);
74 
75     display -> gx_display_driver_pixelmap_draw                 = _gx_dave2d_simulation_display_driver_16bpp_pixelmap_draw;
76     display -> gx_display_driver_pixelmap_blend                = _gx_dave2d_simulation_display_driver_565rgb_pixelmap_blend;
77     display -> gx_display_driver_4bit_glyph_draw               = _gx_dave2d_simulation_display_driver_glyph_4bit_draw;
78     display -> gx_display_driver_1bit_glyph_draw               = _gx_dave2d_simulation_display_driver_16bpp_glyph_1bit_draw;
79     display -> gx_display_driver_8bit_compressed_glyph_draw    = _gx_dave2d_simulation_display_driver_compressed_glyph_8bit_draw;
80     display -> gx_display_driver_4bit_compressed_glyph_draw    = _gx_dave2d_simulation_display_driver_compressed_glyph_4bit_draw;
81     display -> gx_display_driver_1bit_compressed_glyph_draw    = _gx_dave2d_simulation_display_driver_16bpp_compressed_glyph_1bit_draw;
82     display -> gx_display_driver_horizontal_pixelmap_line_draw = _gx_dave2d_simulation_display_driver_565rgb_horizontal_pixelmap_line_draw;
83 }
84 
85