#ifndef click_h_
#define click_h_
-#include <vncconnection.h>
#include <glib-object.h>
+#include <vncconnection.h>
+#include <spice-client.h>
enum command_qual {
CMD_CLICK
union {
struct {
int x, y; /* x, y location */
- unsigned mask; /* button mask */
+ int b; /* button number */
} click;
};
} command_t;
typedef struct {
void (*shutdown) (struct self_t *self);
- int (*click) (struct self_t *self, int x, int y, unsigned mask);
+ int (*click) (struct self_t *self, int x, int y, int b);
} callbacks_t;
typedef struct self_t {
GMainLoop *loop;
int ret;
+ gboolean connected;
/* Callbacks. */
callbacks_t *callbacks;
command_t command;
/* Private data for VNC connections: */
- gchar *host;
- int port;
VncConnection *conn;
- gboolean connected;
+
+ /* Private data for SPICE connections. */
+ SpiceSession *session;
+ SpiceChannel *display_channel;
+ SpiceChannel *inputs_channel;
} self_t;
extern gboolean verbose;
extern int vc_parse_command (self_t *self, gchar **args, guint nr_args);
extern void vc_issue_command (self_t *self);
+/* spice.c */
+extern GOptionGroup *vc_spice_cmdline_get_option_group (void);
+extern gboolean vc_spice_is_selected (void);
+extern void vc_spice_setup (self_t *self);
+
/* vnc.c */
-extern void vc_vnc_setup (self_t *click, gchar *vnc);
+extern GOptionGroup *vc_vnc_cmdline_get_option_group (void);
+extern gboolean vc_vnc_is_selected (void);
+extern void vc_vnc_setup (self_t *self);
/* vnc-auth.c */
extern void vc_vnc_auth_credential (VncConnection *conn, GValueArray *credList, gpointer opaque);