source: mainline/uspace/lib/fb/fb.h@ bf9ac4e8

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since bf9ac4e8 was 7c014d1, checked in by Martin Decky <martin@…>, 14 years ago

console and framebuffer server rewrite

  • Property mode set to 100644
File size: 4.2 KB
Line 
1/*
2 * Copyright (c) 2011 Martin Decky
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * - Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * - Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * - The name of the author may not be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29/** @addtogroup libc
30 * @{
31 */
32/** @file
33 */
34
35#ifndef IMGMAP_FB_H_
36#define IMGMAP_FB_H_
37
38#include <sys/types.h>
39#include <async.h>
40#include <io/style.h>
41#include <io/console.h>
42#include <ipc/common.h>
43
44typedef enum {
45 /** Screen methods */
46 FB_GET_RESOLUTION = IPC_FIRST_USER_METHOD,
47 FB_YIELD,
48 FB_CLAIM,
49 FB_POINTER_UPDATE,
50
51 /** Object methods */
52 FB_VP_CREATE,
53 FB_VP_DESTROY,
54 FB_FRONTBUF_CREATE,
55 FB_FRONTBUF_DESTROY,
56 FB_IMAGEMAP_CREATE,
57 FB_IMAGEMAP_DESTROY,
58 FB_SEQUENCE_CREATE,
59 FB_SEQUENCE_DESTROY,
60 FB_SEQUENCE_ADD_IMAGEMAP,
61
62 /** Viewport stateful methods */
63 FB_VP_FOCUS,
64 FB_VP_CLEAR,
65 FB_VP_GET_DIMENSIONS,
66 FB_VP_GET_CAPS,
67
68 /** Style methods (viewport specific) */
69 FB_VP_CURSOR_UPDATE,
70 FB_VP_SET_STYLE,
71 FB_VP_SET_COLOR,
72 FB_VP_SET_RGB_COLOR,
73
74 /** Text methods (viewport specific) */
75 FB_VP_PUTCHAR,
76 FB_VP_UPDATE,
77 FB_VP_DAMAGE,
78
79 /** Imagemap methods (viewport specific) */
80 FB_VP_IMAGEMAP_DAMAGE,
81
82 /** Sequence methods (viewport specific) */
83 FB_VP_SEQUENCE_START,
84 FB_VP_SEQUENCE_STOP
85} fb_request_t;
86
87/** Forward declarations */
88struct screenbuffer;
89struct imgmap;
90
91typedef struct screenbuffer screenbuffer_t;
92typedef struct imgmap imgmap_t;
93
94typedef uint32_t pixel_t;
95
96typedef sysarg_t vp_handle_t;
97typedef sysarg_t frontbuf_handle_t;
98typedef sysarg_t imagemap_handle_t;
99typedef sysarg_t sequence_handle_t;
100
101extern int fb_get_resolution(async_sess_t *, sysarg_t *, sysarg_t *);
102extern int fb_yield(async_sess_t *);
103extern int fb_claim(async_sess_t *);
104extern int fb_pointer_update(async_sess_t *, sysarg_t, sysarg_t, bool);
105
106extern vp_handle_t fb_vp_create(async_sess_t *, sysarg_t, sysarg_t, sysarg_t,
107 sysarg_t);
108extern frontbuf_handle_t fb_frontbuf_create(async_sess_t *, screenbuffer_t *);
109extern imagemap_handle_t fb_imagemap_create(async_sess_t *, imgmap_t *);
110extern sequence_handle_t fb_sequence_create(async_sess_t *);
111
112extern int fb_vp_get_dimensions(async_sess_t *, vp_handle_t, sysarg_t *,
113 sysarg_t *);
114extern int fb_vp_get_caps(async_sess_t *, vp_handle_t, console_caps_t *);
115extern int fb_vp_clear(async_sess_t *, vp_handle_t);
116
117extern int fb_vp_cursor_update(async_sess_t *, vp_handle_t, frontbuf_handle_t);
118extern int fb_vp_set_style(async_sess_t *, vp_handle_t, console_style_t);
119
120extern int fb_vp_putchar(async_sess_t *, vp_handle_t, sysarg_t, sysarg_t,
121 wchar_t);
122extern int fb_vp_update(async_sess_t *, vp_handle_t, frontbuf_handle_t);
123extern int fb_vp_damage(async_sess_t *, vp_handle_t, frontbuf_handle_t,
124 sysarg_t, sysarg_t, sysarg_t, sysarg_t);
125
126extern int fb_vp_imagemap_damage(async_sess_t *, vp_handle_t, imagemap_handle_t,
127 sysarg_t, sysarg_t, sysarg_t, sysarg_t);
128
129extern int fb_sequence_add_imagemap(async_sess_t *, sequence_handle_t,
130 imagemap_handle_t);
131extern int fb_vp_sequence_start(async_sess_t *, vp_handle_t, sequence_handle_t);
132
133#endif
134
135/** @}
136 */
Note: See TracBrowser for help on using the repository browser.