~ubuntu-branches/ubuntu/vivid/gtk-vnc/vivid

« back to all changes in this revision

Viewing changes to src/vncframebuffer.h

  • Committer: Bazaar Package Importer
  • Author(s): Guido Günther
  • Date: 2010-07-16 17:55:31 UTC
  • mfrom: (1.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20100716175531-vnolppaqgmo3rqij
Tags: 0.4.1-1
* [2703df5] Imported Upstream version 0.4.1
* [5a5910e] Drop patches applied upstream 
      0001-say-disconnected-from-server-only-once-connected.patch
      0002-remove-WERROR_CFLAGS.patch
      0004-Don-t-use-PATH_MAX.patch
      0005-Drop-space-after-Wl-in-libgtk_vnc_1_0_la_LDFLAGS.patch
      0006-Add-Wl-since-no-undefined-is-a-linker-option.patch
      0007-Explicitly-link-against-X11-libs-for-XkbGetKeyboard.patch
      0008-Add-missing-symbols.patch
      0009-Fix-missing-intialisation-of-sysdir-and-uderdir.patch
* [e3ed1d0] No need to run autoreconf anymore
* [1529b9a] No static libs built
* [15068ef] Update symbols file with new symbols
* [337c397] Bump standards version

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * GTK VNC Widget
 
3
 *
 
4
 * Copyright (C) 2006  Anthony Liguori <anthony@codemonkey.ws>
 
5
 * Copyright (C) 2009-2010 Daniel P. Berrange <dan@berrange.com>
 
6
 *
 
7
 * This library is free software; you can redistribute it and/or
 
8
 * modify it under the terms of the GNU Lesser General Public
 
9
 * License as published by the Free Software Foundation; either
 
10
 * version 2.0 of the License, or (at your option) any later version.
 
11
 *
 
12
 * This library is distributed in the hope that it will be useful,
 
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
15
 * Lesser General Public License for more details.
 
16
 *
 
17
 * You should have received a copy of the GNU Lesser General Public
 
18
 * License along with this library; if not, write to the Free Software
 
19
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 
20
 */
 
21
 
 
22
#ifndef VNC_FRAMEBUFFER_H
 
23
#define VNC_FRAMEBUFFER_H
 
24
 
 
25
#include <glib-object.h>
 
26
 
 
27
#include <vncpixelformat.h>
 
28
#include <vnccolormap.h>
 
29
 
 
30
G_BEGIN_DECLS
 
31
 
 
32
#define VNC_TYPE_FRAMEBUFFER            (vnc_framebuffer_get_type ())
 
33
#define VNC_FRAMEBUFFER(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), VNC_TYPE_FRAMEBUFFER, VncFramebuffer))
 
34
#define VNC_IS_FRAMEBUFFER(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VNC_TYPE_FRAMEBUFFER))
 
35
#define VNC_FRAMEBUFFER_GET_INTERFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), VNC_TYPE_FRAMEBUFFER, VncFramebufferInterface))
 
36
 
 
37
 
 
38
typedef struct _VncFramebuffer VncFramebuffer; /* Dummy object */
 
39
typedef struct _VncFramebufferInterface VncFramebufferInterface;
 
40
 
 
41
struct _VncFramebufferInterface {
 
42
        GTypeInterface parent;
 
43
 
 
44
        guint16 (*get_width)(VncFramebuffer *fb);
 
45
        guint16 (*get_height)(VncFramebuffer *fb);
 
46
        int (*get_rowstride)(VncFramebuffer *fb);
 
47
        guint8 *(*get_buffer)(VncFramebuffer *fb);
 
48
        const VncPixelFormat *(*get_local_format)(VncFramebuffer *fb);
 
49
        const VncPixelFormat *(*get_remote_format)(VncFramebuffer *fb);
 
50
        gboolean (*perfect_format_match)(VncFramebuffer *fb);
 
51
 
 
52
        void (*set_pixel_at)(VncFramebuffer *fb,
 
53
                             guint8 *src, /* One remote pixel */
 
54
                             guint16 x, guint16 y);
 
55
        void (*fill)(VncFramebuffer *fb,
 
56
                     guint8 *src, /* One remote pixel */
 
57
                     guint16 x, guint16 y,
 
58
                     guint16 width, guint16 height);
 
59
        void (*copyrect)(VncFramebuffer *fb,
 
60
                         guint16 srcx, guint16 srcy,
 
61
                         guint16 dstx, guint16 dsty,
 
62
                         guint16 width, guint16 height);
 
63
        void (*blt)(VncFramebuffer *fb,
 
64
                    guint8 *src, /* Remote pixel array */
 
65
                    int rowstride,
 
66
                    guint16 x, guint16 y,
 
67
                    guint16 width, guint16 height);
 
68
        void (*rgb24_blt)(VncFramebuffer *fb,
 
69
                          guint8 *src, /* rgb24 pixel array */
 
70
                          int rowstride,
 
71
                          guint16 x, guint16 y,
 
72
                          guint16 width, guint16 height);
 
73
        void (*set_color_map)(VncFramebuffer *fb,
 
74
                              VncColorMap *map);
 
75
 
 
76
        /* Do not add fields to this struct */
 
77
};
 
78
 
 
79
GType vnc_framebuffer_get_type(void) G_GNUC_CONST;
 
80
 
 
81
 
 
82
guint16 vnc_framebuffer_get_width(VncFramebuffer *fb);
 
83
guint16 vnc_framebuffer_get_height(VncFramebuffer *fb);
 
84
int vnc_framebuffer_get_rowstride(VncFramebuffer *fb);
 
85
 
 
86
guint8 *vnc_framebuffer_get_buffer(VncFramebuffer *fb);
 
87
 
 
88
const VncPixelFormat *vnc_framebuffer_get_local_format(VncFramebuffer *fb);
 
89
const VncPixelFormat *vnc_framebuffer_get_remote_format(VncFramebuffer *fb);
 
90
gboolean vnc_framebuffer_perfect_format_match(VncFramebuffer *fb);
 
91
 
 
92
void vnc_framebuffer_set_pixel_at(VncFramebuffer *fb,
 
93
                                  guint8 *src, /* One remote pixel */
 
94
                                  guint16 x, guint16 y);
 
95
 
 
96
void vnc_framebuffer_fill(VncFramebuffer *fb,
 
97
                          guint8 *src, /* One remote pixel */
 
98
                          guint16 x, guint16 y,
 
99
                          guint16 width, guint16 height);
 
100
 
 
101
void vnc_framebuffer_copyrect(VncFramebuffer *fb,
 
102
                              guint16 srcx, guint16 srcy,
 
103
                              guint16 dstx, guint16 dsty,
 
104
                              guint16 width, guint16 height);
 
105
 
 
106
void vnc_framebuffer_blt(VncFramebuffer *fb,
 
107
                         guint8 *src, /* Remote pixel array */
 
108
                         int rowstride,
 
109
                         guint16 x, guint16 y,
 
110
                         guint16 width, guint16 height);
 
111
 
 
112
void vnc_framebuffer_rgb24_blt(VncFramebuffer *fb,
 
113
                               guint8 *src, /* rgb24 pixel array */
 
114
                               int rowstride,
 
115
                               guint16 x, guint16 y,
 
116
                               guint16 width, guint16 height);
 
117
 
 
118
void vnc_framebuffer_set_color_map(VncFramebuffer *fb,
 
119
                                   VncColorMap *map);
 
120
 
 
121
 
 
122
G_END_DECLS
 
123
 
 
124
#endif /* VNC_FRAMEBUFFER_H */
 
125
 
 
126
/*
 
127
 * Local variables:
 
128
 *  c-indent-level: 8
 
129
 *  c-basic-offset: 8
 
130
 *  tab-width: 8
 
131
 * End:
 
132
 */