xref: /illumos-gate/usr/src/boot/userboot/userboot/userboot_gfx.c (revision 10a869258e300c530ae56b29aa3bf43461ca98ff)
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
gfx_term_drawrect(uint32_t ux1,uint32_t uy1,uint32_t ux2,uint32_t uy2)26 gfx_term_drawrect(uint32_t ux1, uint32_t uy1, uint32_t ux2, uint32_t uy2)
27 {
28 }
29 
30 void
gfx_fb_setpixel(uint32_t x,uint32_t y)31 gfx_fb_setpixel(uint32_t x, uint32_t y)
32 {
33 }
34 
35 int
gfx_fb_putimage(png_t * png,uint32_t ux1,uint32_t uy1,uint32_t ux2,uint32_t uy2,uint32_t flags)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
gfx_fb_drawrect(uint32_t x1,uint32_t y1,uint32_t x2,uint32_t y2,uint32_t fill)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
gfx_fb_line(uint32_t x0,uint32_t y0,uint32_t x1,uint32_t y1,uint32_t wd)49 gfx_fb_line(uint32_t x0, uint32_t y0, uint32_t x1, uint32_t y1, uint32_t wd)
50 {
51 }
52 
53 void
gfx_fb_bezier(uint32_t x0,uint32_t y0,uint32_t x1,uint32_t y1,uint32_t x2,uint32_t y2,uint32_t wd)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
png_open(png_t * png,const char * filename)60 png_open(png_t *png, const char *filename)
61 {
62 	return (PNG_NOT_SUPPORTED);
63 }
64 
65 int
png_close(png_t * png)66 png_close(png_t *png)
67 {
68 	return (PNG_NOT_SUPPORTED);
69 }
70 
71 char *
png_error_string(int error)72 png_error_string(int error)
73 {
74 	return ("Unknown error.");
75 }
76 
77 void
tem_save_state(void)78 tem_save_state(void)
79 {
80 }
81 
82 COMMAND_SET(framebuffer, "framebuffer", "framebuffer mode management",
83     command_fb);
84 
85 static int
command_fb(int argc,char * argv[])86 command_fb(int argc, char *argv[])
87 {
88 	return (CMD_OK);
89 }
90