one standard trick here would be to introduce a new function gtk_set_display().
Olivier Galibert wrote:
On Tue, Mar 21, 2000 at 10:45:27AM -0600, Charles G Waldman wrote:
> In particular, I can imagine that patches to Gtk to allow for
> simultaneous windows on different displays might be welcome. I
> intend, when I get some time, to take a closer look at the Gtk sources
> to see if this would in fact be a feasable modification.
Well, I did program in gtk and look at the sources. The main problem
is that the interface to all widget creations is intrinsially
monodisplay.
Quick code excerpt:
gtk_init(&argc, &argv);
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
box1 = gtk_vbox_new(FALSE, 0);
video = videoout_new(quarter ? 360 : 720, quarter ? 240 : 480, grayscale ?
VO_TYPE_GRAYSCALE : VO_TYPE_PACKED_RGB);
fps = gtk_label_new("fps");
gtk_box_pack_start(GTK_BOX(box1), video, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(box1), fps, TRUE, TRUE, 0);
gtk_container_add(GTK_CONTAINER(window), box1);
gtk_widget_show(video);
gtk_widget_show(fps);
gtk_widget_show(box1);
gtk_widget_show(window);
gtk_main();
Where to add the support for multiple display? Difficult question.
Maybe in gtk_window_new, resolving which display to use at show time?
What happens if you detach a widget and reattach it to another
container?
I.e., it sucks in this aspect (and numerous others, but heh...).
OG.
--
Ben
In order to save my hands, I am cutting back on my mail. I also write
as succinctly as possible -- please don't be offended. If you send me
mail, you _will_ get a response, but please be patient, especially for
XEmacs-related mail. If you need an immediate response and it is not
apparent in your message, please say so. Thanks for your understanding.
See also
http://www.666.com/ben/typing.html.