summaryrefslogtreecommitdiff
path: root/gtk/spice-channel.h
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/spice-channel.h')
-rw-r--r--gtk/spice-channel.h26
1 files changed, 24 insertions, 2 deletions
diff --git a/gtk/spice-channel.h b/gtk/spice-channel.h
index cffaff5..cafa8a8 100644
--- a/gtk/spice-channel.h
+++ b/gtk/spice-channel.h
@@ -7,6 +7,14 @@ G_BEGIN_DECLS
#define SPICE_IS_CHANNEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SPICE_TYPE_CHANNEL))
#define SPICE_CHANNEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SPICE_TYPE_CHANNEL, SpiceChannelClass))
+enum SpiceChannelEvent {
+ SPICE_CHANNEL_OPENED,
+ SPICE_CHANNEL_CLOSED,
+ SPICE_CHANNEL_ERROR_CONNECT,
+ SPICE_CHANNEL_ERROR_AUTH,
+ SPICE_CHANNEL_ERROR_IO,
+};
+
struct _SpiceChannel
{
GObject parent;
@@ -18,7 +26,13 @@ struct _SpiceChannelClass
{
GObjectClass parent_class;
- /* Signals */
+ /* common signals */
+ void (*spice_channel_event)(SpiceChannel *channel, enum SpiceChannelEvent event);
+
+ /* main signals */
+ void (*spice_main_mouse_mode)(SpiceChannel *channel, enum SpiceMouseMode mode);
+
+ /* display signals */
void (*spice_display_primary_create)(SpiceChannel *channel, gint format,
gint width, gint height, gint stride,
gint shmid, gpointer data);
@@ -48,10 +62,18 @@ typedef struct spice_channel_info spice_channel_info;
SpiceChannel *spice_channel_new(SpiceSession *s, spice_channel_info *info, int id);
gboolean spice_channel_connect(SpiceChannel *channel);
-void spice_channel_disconnect(SpiceChannel *channel);
+void spice_channel_disconnect(SpiceChannel *channel, enum SpiceChannelEvent event);
int spice_channel_type(SpiceChannel *channel);
int spice_channel_id(SpiceChannel *channel);
+enum SpiceMouseMode spice_main_get_mouse_mode(SpiceChannel *channel);
+
+void spice_inputs_motion(SpiceChannel *channel, gint dx, gint dy, gint button_state);
+void spice_inputs_position(SpiceChannel *channel, gint x, gint y,
+ gint display, gint button_state);
+void spice_inputs_button_press(SpiceChannel *channel, gint button, gint button_state);
+void spice_inputs_button_release(SpiceChannel *channel, gint button, gint button_state);
+
spice_msg_in *spice_msg_in_new(SpiceChannel *channel);
void spice_msg_in_get(spice_msg_in *in);
void spice_msg_in_put(spice_msg_in *in);