gtk/gdk/broadway/broadway-output.h
Alexander Larsson 5ef114ba42 Switch from sending png frames to our own encoding
This is based on the rolling hashes code from
http://cgit.freedesktop.org/~krh/weston/log/?h=remote

It works by incrementally calculating hashes for every 32x32 block
in each frame sent, and then refering back to such blocks when
encoding the next frame. This means we detect when a block matches
an existing block in the previous frame in a different position.
This is great for detecting scrolling, which we need now that
the gdk level scrolling is neutered.
2013-11-07 14:09:53 +01:00

64 lines
2.4 KiB
C

#ifndef __BROADWAY_H__
#define __BROADWAY_H__
#include <glib.h>
#include <gio/gio.h>
#include "broadway-protocol.h"
#include "broadway-buffer.h"
typedef struct BroadwayOutput BroadwayOutput;
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;
BroadwayOutput *broadway_output_new (GOutputStream *out,
guint32 serial);
void broadway_output_free (BroadwayOutput *output);
int broadway_output_flush (BroadwayOutput *output);
int broadway_output_has_error (BroadwayOutput *output);
void broadway_output_set_next_serial (BroadwayOutput *output,
guint32 serial);
guint32 broadway_output_get_next_serial (BroadwayOutput *output);
void broadway_output_new_surface (BroadwayOutput *output,
int id,
int x,
int y,
int w,
int h,
gboolean is_temp);
void broadway_output_disconnected (BroadwayOutput *output);
void broadway_output_show_surface (BroadwayOutput *output,
int id);
void broadway_output_hide_surface (BroadwayOutput *output,
int id);
void broadway_output_destroy_surface (BroadwayOutput *output,
int id);
void broadway_output_move_resize_surface (BroadwayOutput *output,
int id,
gboolean has_pos,
int x,
int y,
gboolean has_size,
int w,
int h);
void broadway_output_set_transient_for (BroadwayOutput *output,
int id,
int parent_id);
void broadway_output_put_buffer (BroadwayOutput *output,
int id,
BroadwayBuffer *prev_buffer,
BroadwayBuffer *buffer);
void broadway_output_grab_pointer (BroadwayOutput *output,
int id,
gboolean owner_event);
guint32 broadway_output_ungrab_pointer (BroadwayOutput *output);
void broadway_output_pong (BroadwayOutput *output);
#endif /* __BROADWAY_H__ */