~vcs-imports/gtk-vnc/trunk

« back to all changes in this revision

Viewing changes to gvnc.h

  • Committer: anthony@rhesus
  • Date: 2007-01-06 05:24:48 UTC
  • Revision ID: git-v1:1b37b85e6ab9f2c7660814051b1a6886f9a3290d
Reorganize repo and create a proper setup.py

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef _GVNC_H_
2
 
#define _GVNC_H_
3
 
 
4
 
#include <glib.h>
5
 
#include <stdint.h>
6
 
 
7
 
struct gvnc;
8
 
 
9
 
struct vnc_ops
10
 
{
11
 
        gboolean (*update)(void *, int, int, int, int);
12
 
        gboolean (*set_color_map_entry)(void *, int, int, int, int);
13
 
        gboolean (*bell)(void *);
14
 
        gboolean (*server_cut_text)(void *, const void *, size_t);
15
 
        gboolean (*resize)(void *, int, int);
16
 
        gboolean (*pointer_type_change)(void *, int);
17
 
        void *user;
18
 
};
19
 
 
20
 
struct vnc_pixel_format
21
 
{
22
 
        uint8_t bits_per_pixel;
23
 
        uint8_t depth;
24
 
        uint8_t big_endian_flag;
25
 
        uint8_t true_color_flag;
26
 
        uint16_t red_max;
27
 
        uint16_t green_max;
28
 
        uint16_t blue_max;
29
 
        uint8_t red_shift;
30
 
        uint8_t green_shift;
31
 
        uint8_t blue_shift;
32
 
};
33
 
 
34
 
struct framebuffer
35
 
{
36
 
        uint8_t *data;
37
 
 
38
 
        int width;
39
 
        int height;
40
 
 
41
 
        int linesize;
42
 
 
43
 
        int depth;
44
 
        int bpp;
45
 
 
46
 
        int red_mask;
47
 
        int green_mask;
48
 
        int blue_mask;
49
 
 
50
 
        int red_shift;
51
 
        int blue_shift;
52
 
        int green_shift;
53
 
};
54
 
 
55
 
struct gvnc *gvnc_connect(GIOChannel *channel, gboolean shared_flag, const char *password);
56
 
 
57
 
gboolean gvnc_server_message(struct gvnc *gvnc);
58
 
 
59
 
gboolean gvnc_client_cut_text(struct gvnc *gvnc,
60
 
                              const void *data, size_t length);
61
 
 
62
 
gboolean gvnc_pointer_event(struct gvnc *gvnc, uint8_t button_mask,
63
 
                            uint16_t x, uint16_t y);
64
 
 
65
 
gboolean gvnc_key_event(struct gvnc *gvnc, uint8_t down_flag, uint32_t key);
66
 
 
67
 
gboolean gvnc_framebuffer_update_request(struct gvnc *gvnc,
68
 
                                         uint8_t incremental,
69
 
                                         uint16_t x, uint16_t y,
70
 
                                         uint16_t width, uint16_t height);
71
 
 
72
 
gboolean gvnc_set_encodings(struct gvnc *gvnc, int n_encoding, int32_t *encoding);
73
 
 
74
 
gboolean gvnc_set_pixel_format(struct gvnc *gvnc,
75
 
                               const struct vnc_pixel_format *fmt);
76
 
 
77
 
gboolean gvnc_has_error(struct gvnc *gvnc);
78
 
 
79
 
gboolean gvnc_set_local(struct gvnc *gvnc, struct framebuffer *fb);
80
 
 
81
 
gboolean gvnc_set_vnc_ops(struct gvnc *gvnc, struct vnc_ops *ops);
82
 
 
83
 
const char *gvnc_get_name(struct gvnc *gvnc);
84
 
 
85
 
#endif