]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/l4re_c/include/video/view.h
14e9616aa23e8f397fedd2fa191ed1f24c1c2e6a
[l4.git] / l4 / pkg / l4re_c / include / video / view.h
1 /**
2  * \file
3  * \note The C interface of L4Re::Video does _NOT_ reflect the full C++
4  *       interface on purpose. Use the C++ where possible.
5  */
6 /*
7  * (c) 2008-2009 Adam Lackorzynski <adam@os.inf.tu-dresden.de>
8  *     economic rights: Technische Universität Dresden (Germany)
9  *
10  * This file is part of TUD:OS and distributed under the terms of the
11  * GNU General Public License 2.
12  * Please see the COPYING-GPL-2 file for details.
13  *
14  * As a special exception, you may use this file as part of a free software
15  * library without restriction.  Specifically, if other files instantiate
16  * templates or use macros or inline functions from this file, or you compile
17  * this file and link it with other files to produce an executable, this
18  * file does not by itself cause the resulting executable to be covered by
19  * the GNU General Public License.  This exception does not however
20  * invalidate any other reasons why the executable file might be covered by
21  * the GNU General Public License.
22  */
23 #pragma once
24
25 #include <l4/sys/types.h>
26 #include <l4/re/c/dataspace.h>
27 #include <l4/re/c/video/colors.h>
28
29 /**
30  * \brief Flags of information on a view.
31  * \ingroup api_l4re_c_video
32  */
33 enum l4re_video_view_info_flags_t
34 {
35   F_l4re_video_view_none               = 0x00, ///< everything for this view is static (the VESA-FB case)
36   F_l4re_video_view_set_buffer         = 0x01, ///< buffer object for this view can be changed
37   F_l4re_video_view_set_buffer_offset  = 0x02, ///< buffer offset can be set
38   F_l4re_video_view_set_bytes_per_line = 0x04, ///< bytes per line can be set
39   F_l4re_video_view_set_pixel          = 0x08, ///< pixel type can be set
40   F_l4re_video_view_set_position       = 0x10, ///< position on screen can be set
41   F_l4re_video_view_dyn_allocated      = 0x20, ///< View is dynamically allocated
42
43   F_l4re_video_view_fully_dynamic      =   F_l4re_video_view_set_buffer
44                                          | F_l4re_video_view_set_buffer_offset
45                                          | F_l4re_video_view_set_bytes_per_line
46                                          | F_l4re_video_view_set_pixel
47                                          | F_l4re_video_view_set_position
48                                          | F_l4re_video_view_dyn_allocated,
49 };
50
51 /**
52  * \brief View information structure
53  * \ingroup api_l4re_c_video
54  */
55 typedef struct l4re_video_view_info_t
56 {
57   unsigned                flags;                     ///< Flags
58   unsigned                view_index;                ///< Number of view in the goos
59   unsigned long           xpos, ypos, width, height; ///< Position in goos and size of view
60   unsigned long           buffer_offset;             ///< Memory offset in goos buffer
61   unsigned long           bytes_per_line;            ///< Size of line in view
62   l4re_video_pixel_info_t pixel_info;                ///< Pixel info
63   unsigned                buffer_index;              ///< Number of buffer of goos
64 } l4re_video_view_info_t;