Functions dealing with native Xlib types were (skip)ed because
gobject-introspection did not have correct Xlib types declarations.
They are corrected now, so these GdkX11 functions can be enabled back
again.
https://bugzilla.gnome.org/show_bug.cgi?id=655495
Moving the direct-access redefinitions of various macros
to gdkprivate-x11.h and use that header throughout in x11/.
Also remove a workaround for a long-fixed X server bug.
The X11 backend exports a number of symbols which are _-prefixed
(so don't become part of the gdk api), but are not named in a
way to prevent accidental clashes between backends.
The one API change here is that the gdk_xid_table functions
have been removed - they did not server an purpose, since the
xid table only stores windows anyway, and we already have a
lookup-by-xid function for windows.
It turned out no vfuncs were necessary. I've decided to move
the screen member up to GdkVisual, since it is the same in all
backends. The X11 backend subclasses now, to add the X members
that it needs to keep track of. GdkVisual and GdkVisualClass
are hidden now.
This way, we can specify a colormap when constructing windows. And ew
must do that to avoid BadMatch from XCreateWindow when we use a
different visual.
Also add a priv pointer to GdkVisual and use it for the GdkVisualPrivate
structure. Then Make GdkVisualPrivate actually private to
gdkvisual-x11.c and make other callers use proper function calls to
access it.
The Gdk-custom.c file in gir-repository contained a number of
introspection annotations. Merge those into the GDK source files.
Some documentation was moved from the tmpl/ files to accomodate
the addition of annotations.
https://bugzilla.gnome.org/show_bug.cgi?id=592279
Either g_type_register_static_simple (used by G_DEFINE_TYPE_EXTENDED)
and G_IMPLEMENT_INTERFACE use automatic variables for GTypeInfo and
GInterfaceInfo structs, while tutorials and source code often use
static variables. This commit consistently adopts the former method.
https://bugzilla.gnome.org/show_bug.cgi?id=600158
2007-03-17 Chris Wilson <chris@chris-wilson.co.uk>
* gdk/x11/gdkvisual-x11.c (_gdk_visual_init):
Initialise nxvisuals to 0 in order to handle
XGetVisualInfo() failures gracefully. (#419171)
svn path=/trunk/; revision=17538
2005-11-10 Michael Natterer <mitch@imendio.com>
Applied patch from maemo-gtk that addresses many issues wrt
display migration and display closing (bug #85715).
* gdk/gdkdisplay.c (gdk_display_dispose): don't just set the
default display to NULL when it's closed. Instead set the most
recently opened display as new default (if one exists).
* gdk/gdkpango.c (on_renderer_display_closed): fixed signature
of this callback.
* gdk/gdkscreen.c (gdk_screen_dispose): check if the GCs still
exist before unrefing them.
* gdk/gdkwindow.c (_gdk_window_destroy_hierarchy): if the screen
is closed, allow destruction of the root window.
* gdk/x11/gdkdisplay-x11.c: moved some stuff from finalize() to
dispose(), free stuff that was leaked before.
* gdk/x11/gdkevents-x11.c (_gdk_x11_events_uninit_screen): check if
the xsettings_client still exists before destroying it.
* gdk/x11/gdkkeys-x11.c: added finalization and free the allocated
X resources.
* gdk/x11/gdkpixmap-x11.c: moved stuff from finalize() to new
dispose() implementation.
* gdk/x11/gdkscreen-x11.c: moved stuff from finalize() to
dispose() and check if it still exists before unrefing it. Set
their pointers to NULL/None *after* upchaining in dispose(),
because X11 implementations of members of the parent class still
need them for their own destruction.
* gdk/x11/gdkvisual-x11.c: removed finalize() implementation which
was g_error()ing when finalizing a visual.
* gtk/gtkclipboard.c (gtk_clipboard_finalize): don't use
get_clipboard_widget() because it would create the widget if it
doesn't exist. Use g_object_get_data() directly instead.
* gtk/gtktextdisplay.c (on_renderer_display_closed): fixed signature
of this callback.
2005-06-30 Matthias Clasen <mclasen@redhat.com>
* gdk/x11/gdkvisual-x11.c (gdk_visual_decompose_mask): Avoid
infinite loop if a mask is zero. (#309222, David Saxton)
2005-05-09 Owen Taylor <otaylor@redhat.com>
* gdk/gdkrgb.c (gdk_rgb_convert_0888_br, gdk_rgb_convert_8880_br):
Fill in unused bits so they can be used for the depth-32 target case.
Rewrite so that that gives a marginal speedup rather than a
marginal slowdown. (on x86)
* gdk/gdkscreen.h gdk/x11/gdkscreen-x11.[ch] gdk/x11/gdkvisual-x11.c:
Add gdk_screen_get_rgba_colormap/visual to get a visual for
windows with an alpha channel, if one exists.
* gdk/win32/gdkscreen-win32.c gdk/linux-fb/gdkscreen-fb.c:
Stub out gdk_screen_get_rgba_colormap/visual.
* gdk/x11/gdkcolor-x11.c (gdk_colormap_alloc_colors): computation of
"unused" wasn't right for depth == 32, since it depended on
shifting by 32.
* gdk/gdkrgb.c: Fill in alpha bits with 1s. (Based on patch from
Keith Packard,
http://mail.gnome.org/archives/gtk-devel-list/2004-June/msg00080.html)
* gdk/x11/gdkdrawable-x11.c (gdk_x11_drawable_get_picture):
Implement again, without using Xft.
* tests/testgtk.c: Add a test for windows with an alpha channel.
2005-03-15 Matthias Clasen <mclasen@redhat.com>
Make PLT-reduction work with gcc4, and don't include
everything in gdkalias.h:
* gdk/gdk.symbols: Group symbols by header and source file.
* gdk/makegdkalias.pl: Protect definitions by the same
preprocessor symbols used to guard the headers. Move
the alias declarations to a separate file which is
produced when calling makegdkalias.pl -def
* gdk/Makefile.am (gdkaliasdef.c): Add a rule to generate this
file.
* gdk/*.c, gdk/x11/*.c: Include gdkalias.h after the other
headers, include gdkaliasdef.c at the bottom.
Mon Aug 9 15:41:17 2004 Matthias Clasen <maclas@gmx.de>
Add hidden aliases for exported symbols which are
used internally in order to get rid of many PLT
entries. (#145519, Arjan van de Ven)
* gdk/Makefile.am: Add rules to generate gdk.def and
gdkalias.h from gdk.symbols, and make make check check
the abi with abicheck.sh.
* gdk/gdk.symbols: New file. Definition of the GDK ABI.
The file can be processed by cpp to filter out certain
subsets of symbols.
* gdk/abicheck.sh: New file. Script to check the actually
symbols exported from libgdk-x11.2.0.so against the symbols
found in gdk.symbols.
* gdk/makegdkalias.pl: New file. Perl script to generate the
header containing the alias definitions for internally used
exported symbols from a list of symbols.
* gdk/*.c, gdk/x11/*.c: Include gdkalias.h
2004-03-05 Federico Mena Quintero <federico@ximian.com>
Fixes#136082 and #135265, patch by Morten Welinder.
* configure.in: Use AC_SYS_LARGEFILE.
* */*.c: #include <config.h>
Tue Sep 24 17:49:52 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelgroup.[ch] (gtk_accel_group_find):
Add a GtkAccelGroupFindFunc to clean up the
prototype. (#76670, Vitaly Tishkov)
* gdk/x11/gdkvisual-x11.c gdk/x11/gdkx.h: Rename
gdkx_visual_get_for_screen() to
gdk_x11_screen_lookup_visual(). (#85702)
Wed Jun 5 18:34:47 2002 Owen Taylor <otaylor@redhat.com>
Changes multihead reorganizing code for win32 support,
mostly from a patch by Hans Breuer.
* gdk/gdkcolor.c gdk/x11/gdkcolor-x11.c gdk/gdkcursor.c
gdk/x11/gdkcursor-x11.c gdk/gdkevents.c gdk/x11/gdkevents-x11.c
gdk/gdkfont.c gdk/x11/gdkfont-x11.c gdk/gdkkeys.c
gdk/x11/gdkkeys-x11.c gdk/gdkimage.c gdk/x11/gdkimage-x11.c
gdk/gdkscreen.c gdk/x11/gdkmain-x11.c
gdk/gdkdisplay.c gdk/gdkevents-x11.c gdk/gdkpango.c
gdk/x11/gdkpango-x11.c gdk/gdkselection.c
gdk/x11/gdkselection-x11.c gdk/gdkwindow.c
gdk/x11/gdkwindow-x11.c gdk/gdkvisual.c gdk/x11/gdkvisual-x11.c:
Move port-independent singlehead wrapper functions into
port-independent part of GDK. (#80009)
* gdk/win32/gdkcolor-win32.c gdk/win32/gdkcursor-win32.c
gdk/win32/gdkevents-win32.c gdk/win32/gdkfont-win32.c
gdk/win32/gdkimage-win32.c gdk/win32/gdkkeys-win32.c
gdk/win32/gdkmain-win32.c gdk/win32/gdkproperty-win32.c
gdk/win32/gdkselection-win32.c gdk/win32/gkwindow-win32.c:
Turn singlehead functions into "multihead" functions that ignore
their GdkDisplay or GdkScreen arguments.
* gdk/win32/gdkdrawable-win32.c gdk/win32/gdkevents-win32.c
gdk/win32/gdkinput-win32.c gdk/win32/gdkprivate-win32.h:
Misc multihead-compatibility changes.
* gtk/gtk.def gdk/gdk.def: Update for multihead functions.
* gdk/gdkcolormap.h gdk/gdkvisual.h gdk/x11/gdkcolormap-x11.c
gdk/x11/gdkvisual-x11.c: Remove the screen fields
from the public parts of the colormap/visual structures, add accessors
instead.
* gdk/gdkpixbuf-render.c gdk/gdkpixmap.c gdk/gdkrgb.c
gdk/x11/gdkcolormap-x11.c gdk/x11/gdkimage-x11.c
gdk/x11/gdkimage-x11.c gdk/x11/gdkprivate-x11.h gtk/gtkgc.c
gtk/gtkstyle.c gtk/gtkwidget.c: Use accessors to get the screen
for colormaps, visuals; move the fields into the private
structures for the x11 backend.
* gdk/gdkdisplay.[ch] gdk/x11/gdkdisplay-x11.[ch]
gdk/gdkscreen.[ch] gdk/x11/gdkscreen-x11.c:
Remove virtualization of screen and display functions.
(#79990, patch from Erwann Chenede)
* gdk/win32/gdkdisplay-x11.c gdk/win32/gdkscreen-win32.c
gdk/win32/{Makefile.am, makefile.msc, makefile.mingw}:
New files containing stub implementations of Display,
Screen functions.
* gdk/x11/gdkscreen-x11.[ch] gdk/x11/gdkdisplay-x11.[ch]
gdk/x11/gdkx.h: Clean up function exports and what
headers they are in. (#79954)
* gdk/x11/gdkx.h: Fix macro that was referring to a non-existant
screen->screen_num. (In the patch for #79972, Erwann Chenede)
* gdk/gdkscreen.c gdk/gdkwindow.c gdk/x11/gdkinternals.h
gdk/x11/gdkscreen-x11.c: Fix gdk_screen_get_window_at_pointer()
to use window hooks. (#79972, patch partly from Erwann Chenede)
* gdk/x11/gdkdisplay-x11.c gdk/x11/gdkevents-x11.c: Fix
some warnings.