Gerd Hoffmann, on Wed 26 Oct 2016 12:17:44 +0200, wrote:
> > +        /* All consoles share the same window */
> 
> No.  That is the default setup, but try "View / Detach tab".  Window ID
> changing at runtime ...

So we would need to make baum register for notification of Window ID
change.

It could be a mere

typedef void QemuConsoleWindowIDListener(void);
qemu_console_window_id_add_listener(QemuConsoleWindowIDListener listener);
qemu_console_window_id_remove_listener(QemuConsoleWindowIDListener listener);

that adds/removes the listener to a list to be called when
qemu_console_set_window_id is called.

Or we could generalize a bit: 

typedef void QemuConsoleConfigListener(void);
qemu_console_config_add_listener(QemuConsoleConfigListener listener);
qemu_console_config_remove_listener(QemuConsoleConfigListener listener);

Or even more generalized:

struct QemuConsoleListener {
  void (*window_id)(void);
};
typedef struct QemuConsoleListener QemuConsoleListener;
qemu_console_add_listener(QemuConsoleListener *listener);
qemu_console_remove_listener(QemuConsoleListener *listener);

What would be preferrable?

Samuel

Reply via email to