diff options
Diffstat (limited to 'qemu-gtk.h')
-rw-r--r-- | qemu-gtk.h | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/qemu-gtk.h b/qemu-gtk.h new file mode 100644 index 0000000..1db432b --- /dev/null +++ b/qemu-gtk.h @@ -0,0 +1,70 @@ +struct qemu_window; + +struct qemu_mq { + struct qemu_mq *next; + char cmd[64]; +}; + +enum vnc_state { + VNC_NONE = 0, + VNC_CONNECTED, + VNC_INITIALIZED, + VNC_DISCONNECTED, +}; + +struct qemu_conn { + int handle; + GIOChannel *ch; + guint id; + GtkWidget *vte; + struct qemu_window *win; + char name[32]; + char hostname[128]; +}; + +struct qemu_window { + /* widgets */ + GtkWidget *toplevel, *status; + GtkWidget *tab, *vnc; + + /* vnc (gfx) */ + char vnc_display[128]; + char vnc_hostname[128]; + char vnc_tcpport[16]; + enum vnc_state vnc_state; + int vnc_grab; + int vnc_width; + int vnc_height; + + /* console (text) */ + struct qemu_conn console; + + /* monitor */ + struct qemu_conn monitor; + char *mbuf; + int msize; + int mused; + struct qemu_mq *mqueue; + struct qemu_mq *mrun; + + /* gdb */ + GtkWidget *gdb_vte; + pid_t gdb_pid; + + /* vm info */ + char version[32]; + char name[128]; +}; + +/* qemu-gtk.c */ +void update_status(struct qemu_window *win); +void vnc_connect(struct qemu_window *win); +int conn_init(struct qemu_conn *conn, char *name, char *dest); +void qemu_vnc_tab(struct qemu_window *win); +void qemu_conn_tab(struct qemu_window *win, struct qemu_conn *conn, int pos); + +/* monitor.c */ +int monitor_connect(struct qemu_window *win, char *dest); +void monitor_append(struct qemu_window *win, char *cmd); + + |