Re: GdkLibrary



Hi Owen,

On Wed, 19 Jun 2002, Owen Taylor wrote:

>
> I've been working on notification for new displays and
> for the default display.
>
> To do this, it was easiest to have a global singleton
> object with a ::display-opened signal a ::default-display
> property; and the following functions:
>
> ===
> GdkLibrary *gdk_library_get                 (void);
> GdkDisplay *gdk_library_get_default_display (GdkLibrary *library);
> void        gdk_library_set_default_display (GdkLibrary *library,
> 					     GdkDisplay *display);
> GSList     *gdk_library_list_displays       (GdkLibrary *library);
> ===

	I just noticed the need for something like this. I would have
thought something like

GdkDisplay *gdk_library_lookup_display (const gchar *display_name);

	would have been nice, or that the lookup would be implicit in
gdk_open_display. Or maybe it should be lookup_screen, since that's
the lowest denominator of DISPLAY really ...

	While we're on it, it might be nice to have a utility function
which takes a GdkScreen and munges the display name with the screen
number. This is a pain to do by hand and both the panel and nautilus
needs this for launching apps on different screens.

	Another thing I noticed was that there is a
gtk_plug_new_for_display, but no gtk_window_new_for_display. How
come?

	Anyway, I managed to answer without addressing your questions -
how helpful of me :-)

Good Luck,
Mark.




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