Changeset a3f63ac in mainline
- Timestamp:
- 2019-09-24T11:13:18Z (5 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- aac5069
- Parents:
- 00e8290
- git-author:
- Jiri Svoboda <jiri@…> (2019-08-23 17:43:11)
- git-committer:
- Jiri Svoboda <jiri@…> (2019-09-24 11:13:18)
- Location:
- uspace
- Files:
-
- 4 added
- 6 edited
- 8 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/gfxdemo/gfxdemo.c
r00e8290 ra3f63ac 34 34 35 35 #include <canvas.h> 36 #include <congfx/console.h> 36 37 #include <draw/surface.h> 37 38 #include <fibril.h> 38 #include <gfx/backend/canvas.h> 39 #include <gfx/backend/console.h> 39 #include <guigfx/canvas.h> 40 40 #include <gfx/color.h> 41 41 #include <gfx/render.h> … … 161 161 } 162 162 163 // sig_connect(&canvas->keyboard_event, NULL, wnd_keyboard_event);164 165 163 window_resize(window, 0, 0, vw + 10, vh + 30, WINDOW_PLACEMENT_ANY); 166 164 window_exec(window); -
uspace/app/gfxdemo/meson.build
r00e8290 ra3f63ac 27 27 # 28 28 29 deps = [ 'gfx' ]29 deps = [ 'gfx', 'guigfx', 'congfx' ] 30 30 src = files( 31 31 'gfxdemo.c', -
uspace/lib/congfx/include/congfx/console.h
r00e8290 ra3f63ac 27 27 */ 28 28 29 /** @addtogroup lib gfx29 /** @addtogroup libcongfx 30 30 * @{ 31 31 */ … … 34 34 */ 35 35 36 #ifndef _ GFX_BACKEND_CONSOLE_H37 #define _ GFX_BACKEND_CONSOLE_H36 #ifndef _CONGFX_CONSOLE_H 37 #define _CONGFX_CONSOLE_H 38 38 39 39 #include <io/console.h> 40 40 #include <stdio.h> 41 #include <types/ gfx/backend/console.h>41 #include <types/congfx/console.h> 42 42 #include <types/gfx/context.h> 43 43 #include <types/gfx/ops/context.h> -
uspace/lib/congfx/include/types/congfx/console.h
r00e8290 ra3f63ac 27 27 */ 28 28 29 /** @addtogroup lib gfx29 /** @addtogroup libcongfx 30 30 * @{ 31 31 */ … … 34 34 */ 35 35 36 #ifndef _ GFX_TYPES_BACKEND_CONSOLE_H37 #define _ GFX_TYPES_BACKEND_CONSOLE_H36 #ifndef _CONGFX_TYPES_CONSOLE_H 37 #define _CONGFX_TYPES_CONSOLE_H 38 38 39 39 struct console_gc; -
uspace/lib/congfx/private/console.h
r00e8290 ra3f63ac 27 27 */ 28 28 29 /** @addtogroup lib gfx29 /** @addtogroup libcongfx 30 30 * @{ 31 31 */ … … 35 35 */ 36 36 37 #ifndef _ GFX_PRIVATE_BACKEND_CONSOLE_H38 #define _ GFX_PRIVATE_BACKEND_CONSOLE_H37 #ifndef _CONGFX_PRIVATE_CONSOLE_H 38 #define _CONGFX_PRIVATE_CONSOLE_H 39 39 40 #include <gfx/context.h> 40 41 #include <io/console.h> 41 42 #include <stdio.h> 42 #include "../context.h"43 43 44 44 /** Actual structure of graphics context. 45 45 * 46 * This is private to lib gfx. It is not visible to clients nor backends.46 * This is private to libcongfx. It is not visible to clients nor backends. 47 47 */ 48 48 struct console_gc { -
uspace/lib/congfx/src/console.c
r00e8290 ra3f63ac 27 27 */ 28 28 29 /** @addtogroup lib gfx29 /** @addtogroup libcongfx 30 30 * @{ 31 31 */ … … 38 38 */ 39 39 40 #include < gfx/backend/console.h>40 #include <congfx/console.h> 41 41 #include <gfx/context.h> 42 42 #include <gfx/render.h> 43 43 #include <io/pixel.h> 44 44 #include <stdlib.h> 45 #include "../ ../private/backend/console.h"46 #include "../ ../private/color.h"45 #include "../private/console.h" 46 #include "../private/color.h" 47 47 48 48 static errno_t console_gc_set_color(void *, gfx_color_t *); -
uspace/lib/gfx/include/gfx/color.h
r00e8290 ra3f63ac 44 44 uint16_t, gfx_color_t **); 45 45 extern void gfx_color_delete(gfx_color_t *); 46 extern void gfx_color_get_rgb_i16(gfx_color_t *, uint16_t *, uint16_t *, 47 uint16_t *); 46 48 47 49 #endif -
uspace/lib/gfx/meson.build
r00e8290 ra3f63ac 27 27 # 28 28 29 deps = [ 'gui' ]30 29 src = files( 31 'src/backend/canvas.c',32 'src/backend/console.c',33 30 'src/color.c', 34 31 'src/context.c', -
uspace/lib/gfx/src/color.c
r00e8290 ra3f63ac 78 78 } 79 79 80 /** Convert color to 16-bit RGB coordinates. 81 * 82 * @param color Color 83 * @param r Place to store red coordinate 84 * @param g Place to store green coordinate 85 * @param b Place to store blue coordinate 86 */ 87 void gfx_color_get_rgb_i16(gfx_color_t *color, uint16_t *r, uint16_t *g, 88 uint16_t *b) 89 { 90 *r = color->r; 91 *g = color->g; 92 *b = color->b; 93 } 94 80 95 /** @} 81 96 */ -
uspace/lib/guigfx/include/guigfx/canvas.h
r00e8290 ra3f63ac 27 27 */ 28 28 29 /** @addtogroup libg fx29 /** @addtogroup libguigfx 30 30 * @{ 31 31 */ … … 34 34 */ 35 35 36 #ifndef _G FX_BACKEND_CANVAS_H37 #define _G FX_BACKEND_CANVAS_H36 #ifndef _GUIGFX_CANVAS_H 37 #define _GUIGFX_CANVAS_H 38 38 39 39 #include <canvas.h> 40 #include <types/gfx/backend/canvas.h>41 40 #include <types/gfx/context.h> 42 41 #include <types/gfx/ops/context.h> 42 #include <types/guigfx/canvas.h> 43 43 44 44 extern gfx_context_ops_t canvas_gc_ops; -
uspace/lib/guigfx/include/types/guigfx/canvas.h
r00e8290 ra3f63ac 27 27 */ 28 28 29 /** @addtogroup libg fx29 /** @addtogroup libguigfx 30 30 * @{ 31 31 */ … … 34 34 */ 35 35 36 #ifndef _G FX_TYPES_BACKEND_CANVAS_H37 #define _G FX_TYPES_BACKEND_CANVAS_H36 #ifndef _GUIGFX_TYPES_CANVAS_H 37 #define _GUIGFX_TYPES_CANVAS_H 38 38 39 39 struct canvas_gc; -
uspace/lib/guigfx/private/canvas.h
r00e8290 ra3f63ac 27 27 */ 28 28 29 /** @addtogroup libg fx29 /** @addtogroup libguigfx 30 30 * @{ 31 31 */ … … 35 35 */ 36 36 37 #ifndef _G FX_PRIVATE_BACKEND_CANVAS_H38 #define _G FX_PRIVATE_BACKEND_CANVAS_H37 #ifndef _GUIGFX_PRIVATE_CANVAS_H 38 #define _GUIGFX_PRIVATE_CANVAS_H 39 39 40 40 #include <canvas.h> 41 41 #include <draw/surface.h> 42 #include <gfx/context.h> 42 43 #include <io/pixel.h> 43 #include "../context.h"44 44 45 45 /** Actual structure of graphics context. 46 46 * 47 * This is private to libg fx. It is not visible to clients nor backends.47 * This is private to libguigfx. It is not visible to clients nor backends. 48 48 */ 49 49 struct canvas_gc { -
uspace/lib/guigfx/src/canvas.c
r00e8290 ra3f63ac 27 27 */ 28 28 29 /** @addtogroup libg fx29 /** @addtogroup libguigfx 30 30 * @{ 31 31 */ … … 37 37 */ 38 38 39 #include <gfx/ backend/canvas.h>39 #include <gfx/color.h> 40 40 #include <gfx/context.h> 41 41 #include <gfx/render.h> 42 #include <guigfx/canvas.h> 42 43 #include <io/pixel.h> 43 44 #include <stdlib.h> 44 #include "../ ../private/backend/canvas.h"45 #include "../../private/color.h"45 #include "../private/canvas.h" 46 //#include "../../private/color.h" 46 47 47 48 static errno_t canvas_gc_set_color(void *, gfx_color_t *); … … 65 66 { 66 67 canvas_gc_t *cgc = (canvas_gc_t *) arg; 68 uint16_t r, g, b; 67 69 68 cgc->color = PIXEL(0, color->r >> 8, color->g >> 8, color->b >> 8); 70 gfx_color_get_rgb_i16(color, &r, &g, &b); 71 cgc->color = PIXEL(0, r >> 8, g >> 8, b >> 8); 69 72 return EOK; 70 73 } -
uspace/lib/meson.build
r00e8290 ra3f63ac 52 52 'fmtutil', 53 53 'fs', 54 'gfx', 54 55 'graph', 55 56 'http', … … 82 83 'virtio', 83 84 84 'gfx', 85 'congfx', 86 'guigfx', 85 87 'ieee80211', 86 88 ]
Note:
See TracChangeset
for help on using the changeset viewer.