blob: 1db432bac64e1107993bb4dea885979b1466f936 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
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);
|