xref: /illumos-gate/usr/src/boot/userboot/userboot/userboot_gfx.c (revision 3d4e20a23e1894c03df6b83e39a88625f74ee0e4)
1 /*
2  * This file and its contents are supplied under the terms of the
3  * Common Development and Distribution License ("CDDL"), version 1.0.
4  * You may only use this file in accordance with the terms of version
5  * 1.0 of the CDDL.
6  *
7  * A full copy of the text of the CDDL should have accompanied this
8  * source.  A copy of the CDDL is also available via the Internet at
9  * http://www.illumos.org/license/CDDL.
10  */
11 
12 /*
13  * Copyright 2019 Toomas Soome <tsoome@me.com>
14  */
15 
16 #include <sys/cdefs.h>
17 #include <sys/types.h>
18 #include <sys/tem_impl.h>
19 #include <pnglite.h>
20 #include "bootstrap.h"
21 
22 font_list_t fonts;
23 tem_state_t tems;
24 
25 void
26 gfx_term_drawrect(uint32_t ux1, uint32_t uy1, uint32_t ux2, uint32_t uy2)
27 {
28 }
29 
30 void
31 gfx_fb_setpixel(uint32_t x, uint32_t y)
32 {
33 }
34 
35 int
36 gfx_fb_putimage(png_t *png, uint32_t ux1, uint32_t uy1, uint32_t ux2,
37     uint32_t uy2, uint32_t flags)
38 {
39 	return (1);
40 }
41 
42 void
43 gfx_fb_drawrect(uint32_t x1, uint32_t y1, uint32_t x2, uint32_t y2,
44     uint32_t fill)
45 {
46 }
47 
48 void
49 gfx_fb_line(uint32_t x0, uint32_t y0, uint32_t x1, uint32_t y1, uint32_t wd)
50 {
51 }
52 
53 void
54 gfx_fb_bezier(uint32_t x0, uint32_t y0, uint32_t x1, uint32_t y1, uint32_t x2,
55     uint32_t y2, uint32_t wd)
56 {
57 }
58 
59 int
60 png_open(png_t *png, const char *filename)
61 {
62 	return (PNG_NOT_SUPPORTED);
63 }
64 
65 int
66 png_close(png_t *png)
67 {
68 	return (PNG_NOT_SUPPORTED);
69 }
70 
71 char *
72 png_error_string(int error)
73 {
74 	return ("Unknown error.");
75 }
76 
77 void
78 tem_save_state(void)
79 {
80 }
81 
82 COMMAND_SET(framebuffer, "framebuffer", "framebuffer mode management",
83     command_fb);
84 
85 static int
86 command_fb(int argc, char *argv[])
87 {
88 	return (CMD_OK);
89 }
90