GdkAtom change



Here's the Changes-2.0.txt entry for what I just checked
in:

* GdkAtoms no longer correspond to X atoms. This change was made
  because in GTK+-2.2, when we introduce multihead support, the
  same GdkAtom will map to different X atoms on different displays.
  To convert from GdkAtoms to and from X atoms, use
  gdk_x11_xatom_to_atom and gdk_x11_atom_to_xatom.

* To allow the compiler to catch attempts to use X atoms as
  GdkAtoms, and vice versa, GdkAtom has been changed to an opaque
  pointer typedef. This causes some incompatibilities:

   - When storing GdkAtom as pointers, as in the GList
     GdkDragContext->targets,  you can no longer use
     GPOINTER_TO_UINT, GUINT_TO_POINTER. You can either use 
     the GDK_POINTER_TO_ATOM, GDK_ATOM_TO_POINTER macros,
     or omit any macro let the C compiler do the cast from void * 
     to GdkAtom * for you.

   - Using the GDK atom constants an GDK_NONE for X atoms, or
     None and the Xatom.h constants for GDK atoms no longer
     works.

   - You can no longer use GdkAtom in integer contexts, such
     as a case statement. (Such usage was very rare or nonexistant)

   - The GdkSelection, GdkTarget, and GdkSelectionType enumerations
     become deprecated aliases for GdkAtom. To my knowledge,
     these enumerations were unused.



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