L4Re Operating System Framework
Interface and Usage Documentation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
colors.h
Go to the documentation of this file.
1
6/*
7 * (c) 2008-2009 Adam Lackorzynski <adam@os.inf.tu-dresden.de>
8 * economic rights: Technische Universität Dresden (Germany)
9 *
10 * License: see LICENSE.spdx (in this directory or the directories above)
11 */
12#pragma once
13
14#include <l4/sys/compiler.h>
15
21{
22 unsigned char size;
23 unsigned char shift;
24} __attribute__((packed)) l4re_video_color_component_t;
25
35
37
39l4re_video_bits_per_pixel(l4re_video_pixel_info_t *p) L4_NOTHROW;
40
41/* ************************************************************** */
42/* Implementations */
43
45l4re_video_bits_per_pixel(l4re_video_pixel_info_t *p) L4_NOTHROW
46{
47 return p->r.size + p->b.size + p->g.size + p->a.size;
48}
49
L4 compiler related defines.
#define __END_DECLS
End section with C types and functions.
Definition compiler.h:167
#define L4_CV
Define calling convention.
Definition linkage.h:33
#define L4_NOTHROW
Mark a function declaration and definition as never throwing an exception.
Definition compiler.h:159
#define L4_INLINE
L4 Inline function attribute.
Definition compiler.h:51
#define __BEGIN_DECLS
Start section with C types and functions.
Definition compiler.h:164
Color component structure.
Definition colors.h:21
unsigned char size
Size in bits.
Definition colors.h:22
unsigned char shift
offset in pixel
Definition colors.h:23
Pixel_info structure.
Definition colors.h:31
l4re_video_color_component_t a
Colors.
Definition colors.h:32
unsigned char bytes_per_pixel
Bytes per pixel.
Definition colors.h:33