broadway-output.h 2.86 KB
Newer Older
1 2 3
#ifndef __BROADWAY_H__
#define __BROADWAY_H__

4
#include <glib.h>
5
#include <gio/gio.h>
6
#include "broadway-protocol.h"
7
#include "broadway-buffer.h"
8

9
typedef struct BroadwayOutput BroadwayOutput;
10

11 12 13 14 15 16 17 18 19
typedef enum {
  BROADWAY_WS_CONTINUATION = 0,
  BROADWAY_WS_TEXT = 1,
  BROADWAY_WS_BINARY = 2,
  BROADWAY_WS_CNX_CLOSE = 8,
  BROADWAY_WS_CNX_PING = 9,
  BROADWAY_WS_CNX_PONG = 0xa
} BroadwayWSOpCode;

20
BroadwayOutput *broadway_output_new             (GOutputStream  *out,
21
						 guint32         serial);
22 23 24
void            broadway_output_free            (BroadwayOutput *output);
int             broadway_output_flush           (BroadwayOutput *output);
int             broadway_output_has_error       (BroadwayOutput *output);
25 26
void            broadway_output_set_next_serial (BroadwayOutput *output,
						 guint32         serial);
27
guint32         broadway_output_get_next_serial (BroadwayOutput *output);
28
void            broadway_output_new_surface     (BroadwayOutput *output,
29 30 31 32
						 int             id,
						 int             x,
						 int             y,
						 int             w,
33 34
						 int             h,
						 gboolean        is_temp);
35
void            broadway_output_disconnected    (BroadwayOutput *output);
36
void            broadway_output_show_surface    (BroadwayOutput *output,
37
						 int             id);
38
void            broadway_output_hide_surface    (BroadwayOutput *output,
39
						 int             id);
40 41 42 43
void            broadway_output_raise_surface   (BroadwayOutput *output,
                                                 int             id);
void            broadway_output_lower_surface   (BroadwayOutput *output,
                                                 int             id);
44
void            broadway_output_destroy_surface (BroadwayOutput *output,
45
						 int             id);
46 47 48 49 50 51 52 53
void            broadway_output_move_resize_surface (BroadwayOutput *output,
						     int             id,
						     gboolean        has_pos,
						     int             x,
						     int             y,
						     gboolean        has_size,
						     int             w,
						     int             h);
54 55 56
void            broadway_output_set_transient_for (BroadwayOutput *output,
						   int             id,
						   int             parent_id);
57
void            broadway_output_put_buffer      (BroadwayOutput *output,
58
						 int             id,
59 60
                                                 BroadwayBuffer *prev_buffer,
                                                 BroadwayBuffer *buffer);
61
void            broadway_output_grab_pointer    (BroadwayOutput *output,
62
						 int id,
63 64
						 gboolean owner_event);
guint32         broadway_output_ungrab_pointer  (BroadwayOutput *output);
65
void            broadway_output_pong            (BroadwayOutput *output);
66 67
void            broadway_output_set_show_keyboard (BroadwayOutput *output,
                                                   gboolean show);
68 69

#endif /* __BROADWAY_H__ */