Changes in uspace/lib/gfx/src/color.c [bc52b5b:a3f63ac] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/gfx/src/color.c
rbc52b5b ra3f63ac 1 1 /* 2 * Copyright (c) 20 21Jiri Svoboda2 * Copyright (c) 2019 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 69 69 } 70 70 71 /** Create new EGA color.72 *73 * @param attr EGA attributes74 * @param rcolor Place to store pointer to new color75 *76 * @return EOK on success or an error code, ENOMEM if out of resources,77 * EIO if the graphic device connection was lost78 */79 errno_t gfx_color_new_ega(uint8_t attr, gfx_color_t **rcolor)80 {81 gfx_color_t *color;82 83 color = calloc(1, sizeof(gfx_color_t));84 if (color == NULL)85 return ENOMEM;86 87 color->attr = attr;88 89 *rcolor = color;90 return EOK;91 }92 93 71 /** Delete color. 94 72 * … … 115 93 } 116 94 117 /** Convert color to EGA attributes.118 *119 * @param color Color120 * @param attr Place to store EGA attributes121 */122 void gfx_color_get_ega(gfx_color_t *color, uint8_t *attr)123 {124 *attr = color->attr;125 }126 127 95 /** @} 128 96 */
Note:
See TracChangeset
for help on using the changeset viewer.