2023-03-31 19:11:10 +00:00
|
|
|
#pragma once
|
2012-12-19 11:37:02 +00:00
|
|
|
|
2011-03-10 13:58:47 +00:00
|
|
|
#include <glib.h>
|
2011-04-18 17:52:05 +00:00
|
|
|
#include <gio/gio.h>
|
2012-12-21 23:02:55 +00:00
|
|
|
#include "broadway-protocol.h"
|
2017-11-29 18:08:37 +00:00
|
|
|
#include "broadway-server.h"
|
2011-03-10 13:58:47 +00:00
|
|
|
|
2010-11-24 20:40:25 +00:00
|
|
|
typedef struct BroadwayOutput BroadwayOutput;
|
2010-11-16 11:42:53 +00:00
|
|
|
|
2011-11-10 09:12:28 +00:00
|
|
|
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;
|
|
|
|
|
2017-12-05 13:38:57 +00:00
|
|
|
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,
|
2020-03-13 13:33:07 +00:00
|
|
|
int h);
|
2017-12-05 13:38:57 +00:00
|
|
|
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_raise_surface (BroadwayOutput *output,
|
|
|
|
int id);
|
|
|
|
void broadway_output_lower_surface (BroadwayOutput *output,
|
|
|
|
int id);
|
|
|
|
void broadway_output_destroy_surface (BroadwayOutput *output,
|
|
|
|
int id);
|
|
|
|
void broadway_output_roundtrip (BroadwayOutput *output,
|
|
|
|
int id,
|
|
|
|
guint32 tag);
|
2011-04-12 09:11:36 +00:00
|
|
|
void broadway_output_move_resize_surface (BroadwayOutput *output,
|
2017-12-05 13:38:57 +00:00
|
|
|
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_surface_set_nodes (BroadwayOutput *output,
|
|
|
|
int id,
|
|
|
|
BroadwayNode *root,
|
2019-03-28 15:03:42 +00:00
|
|
|
BroadwayNode *old_root,
|
|
|
|
GHashTable *old_node_lookup);
|
2017-12-05 13:38:57 +00:00
|
|
|
void broadway_output_upload_texture (BroadwayOutput *output,
|
|
|
|
guint32 id,
|
|
|
|
GBytes *texture);
|
|
|
|
void broadway_output_release_texture (BroadwayOutput *output,
|
|
|
|
guint32 id);
|
|
|
|
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);
|
|
|
|
void broadway_output_set_show_keyboard (BroadwayOutput *output,
|
|
|
|
gboolean show);
|
2012-12-19 11:37:02 +00:00
|
|
|
|