Getting the X display from a GTK window



Hi!

	I have a main window, and I want to find out the Display structure the
program is running on, and the screen it is running on (the Display *
representing the display and the integer representing the screen number).
	I dug out a macro called GDK_WINDOW_XDISPLAY which seems to take a
GdkWindow and return a Display *. Now the problem is that I do not know how
to extract the GdkWindow out of a GtkWidget. More specifically, I have a
GtkWindow.
	My questions:
1. how do I get the GdkWindow from a GtkWidget?
2. how do I get the Display * from a GtkWidget or a GdkWindow (if the above
macro does not work)?
3. how do I get the screen number from a GtkWidget?

TIA,

Mihai

-- 
 Mihai Christodorescu <mihai@cs.ucsb.edu> - TBP VP - ACM chair
---------------------------------------------------------------
| Nagler's Comments on Murphy's Law: "Murphy's Law was not propounded by
| Murphy, but by another man of the same name."



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]