Re: Separating GdkAtom and Atom



Erwann Chenede <Erwann Chenede Sun COM> writes:

> [...]
> 
> >
> >So, we need to add functions to GTK+-2.0 to do the same operations,
> >but in a "using the default display" manner. These functions will be
> >protected with #ifndef GDK_MULTIHEAD_SAFE in GTK+-2.2. The names I
> >have currently are:
> >
> > Atom    gdk_x11_atom_to_xatom     (GdkAtom      atom);
> > GdkAtom gdk_x11_xatom_to_atom     (Atom         xatom);
> > Atom    gdk_x11_get_xatom_by_name (const gchar *atom_name);
> > gchar * gdk_x11_get_xatom_name    (Atom         xatom);
> >
> >I actually like these names considerably better than the
> >multihead-branch names, because it's hard for me to keep straight what
> >is the "real" atom, and what the "virtual" atom.
> >
> >But it is rather confusing to use unrelated names for the
> >same operations depending on whether there is a GdkDisplay
> >parameter or not.
> >
> >So, we probably should pick one of the following schemes:
> >
> > gdk_x11_default_atom_to_xatom (GdkAtom atom);
> > gdk_x11_atom_to_xatom (GdkDisplay *display, Atom atom);
> > 
> > gdk_x11_atom_to_xatom (GdkAtom atom);
> > gdk_x11_display_atom_to_xatom (GdkDisplay *display, GdkAtom atom);
> > 
> > gdk_x11_atom_to_xatom (GdkAtom atom);
> > gdk_x11_atom_to_xatom_for_display (GdkDisplay *display, GdkAtom atom);
> 
> I'll propage this changes in the multihead branch.

Thanks.

> > - Finalize the naming scheme
> 
> What else is there to finalize ?

I checked in the gdk_x11_xatom_to_atom names to HEAD, so I guess
we need to decide between renaming gdk_x11_get_virtual_atom() to

 gdk_x11_xatom_to_atom_for_display()
 gdk_x11_display_xatom_to_atom()

if we want to stay consistent. I don't care much one way or the
other; the gdk_x11_display() name is a little more "OO", but 
the _for_display() name would fit more closely with most of the
multihead names that you've added.

Regards,
                                        Owen



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