]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/l4re_c/include/video/goos.h
b12496437bae1abef55f31d8535b524b57b5a35c
[l4.git] / l4 / pkg / l4re_c / include / video / goos.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 Technische Universität Dresden
8  * This file is part of TUD:OS and distributed under the terms of the
9  * GNU General Public License 2.
10  * Please see the COPYING-GPL-2 file for details.
11  *
12  * As a special exception, you may use this file as part of a free software
13  * library without restriction.  Specifically, if other files instantiate
14  * templates or use macros or inline functions from this file, or you compile
15  * this file and link it with other files to produce an executable, this
16  * file does not by itself cause the resulting executable to be covered by
17  * the GNU General Public License.  This exception does not however
18  * invalidate any other reasons why the executable file might be covered by
19  * the GNU General Public License.
20  */
21 #pragma once
22
23 #include <l4/sys/types.h>
24 #include <l4/re/c/dataspace.h>
25 #include <l4/re/c/video/colors.h>
26 #include <l4/re/c/video/view.h>
27
28 /**
29  * \defgroup api_l4re_c_video Video API
30  * \ingroup api_l4re_c
31  */
32
33 /**
34  * \brief Flags of information on the goos.
35  * \ingroup api_l4re_c_video
36  */
37 enum l4re_video_goos_info_flags_t
38 {
39   F_l4re_video_goos_auto_refresh    = 0x01, ///< The graphics display is automatically refreshed
40   F_l4re_video_goos_pointer         = 0x02, ///< We have a mouse pointer
41   F_l4re_video_goos_dynamic_views   = 0x04, ///< Supports dynamically allocated views
42   F_l4re_video_goos_dynamic_buffers = 0x08, ///< Supports dynamically allocated buffers
43 };
44
45 /**
46  * \brief Goos information structure
47  * \ingroup api_l4re_c_video
48  */
49 typedef struct
50 {
51   unsigned long width;                ///< Width of the goos
52   unsigned long height;               ///< Height of the goos
53   unsigned flags;                     ///< Flags of the framebuffer
54   unsigned num_static_views;          ///< Number of static views
55   unsigned num_static_buffers;        ///< Number of static buffers
56   l4re_video_pixel_info_t pixel_info; ///< Pixel layout of the goos
57 } l4re_video_goos_info_t;
58
59 /**
60  * \brief Goos object type
61  * \ingroup api_l4re_c_fb
62  */
63 typedef l4_cap_idx_t l4re_video_goos_t;
64
65 EXTERN_C_BEGIN
66
67 /**
68  * \brief Get information on a goos.
69  * \ingroup api_l4re_c_video
70  *
71  * \param  goos  Goos object
72  * \retval ginfo Pointer to goos information structure.
73  *
74  * \return 0 for success, <0 on error
75  *         - -#L4_ENODEV
76  *         - IPC errors
77  */
78 L4_CV int
79 l4re_video_goos_info(l4re_video_goos_t goos,
80                      l4re_video_goos_info_t *ginfo) L4_NOTHROW;
81
82 EXTERN_C_END