These macros follow the recent changes in GLibs deprecation
setup. We now annotate deprecated functions with the version
they were deprecated in, and you can define the macro
GDK_VERSION_MIN_REQUIRED to cut off deprecation warnings for
'recent' deprecations.
At the same time, we introduce version annotations for new API
and allow you to avoid 'recent' API additions by defining
GDK_VERSION_MAX_ALLOWED.
These functions were trivial g_spawn wrappers in all backends
except for X11, and they can be easily replaced by
g_app_info_create_for_commandline + GdkAppLaunchContext.
This commit does a number of things:
- remove some dead wchar configury from configure.ac and gdkconfig.h
- repurpose gdkconfig.h as header that contains GDK_WINDOWING_foo
macros for each included backend, include it in gdk.h and install
it in $includedir instead of below $libdir
- drop the backend from the library names
- build libgdk-3.0.la as a convenience lib and include it in libgtk-3.0.la
It does not yet enable building multiple backends at the same time.
The old functions to get core pointer and devices list are gone as
well. This slice is entirely replaced internally by multidevice
handling and may just go.
* add per-display gdk_x11_display_error_trap_push()
(X11-specific because gdk_error_trap_push() probably
should have been)
* make gdk_error_trap_push() handle only GDK displays
not displays opened without a GDK wrapper
* make gdk_error_trap_pop() and gdk_x11_display_error_trap_pop()
automatically sync only if needed, so manual gdk_flush() is not
required
* add gdk_error_trap_pop_ignored() which just asynchronously
ignores errors, so never needs to sync
* add G_GNUC_WARN_UNUSED_RESULT to plain pop(), because
if you use plain pop() and don't need the return value,
the async gdk_error_trap_pop_ignored() should be used
instead. This results in lots of warnings to clean
up in a later patch.
The main objective here was to avoid the need to sync just
to ignore an error. Now, syncing is automatic, and only
happens when we need to know the error code.
https://bugzilla.gnome.org/show_bug.cgi?id=629608
gdk_threads_mutex, gdk_threads_lock and gdk_threads_unlock are removed
from public API. gdk_threads_mutex was deprecated already. Instead of
using gdk_threads_lock and _unlock one was presumably supposed to use
the GDK_THREADS_ENTER and _LEAVE macros, which now simply call the
corresponding gdk_threads_enter() and _leave() functions.
Remove he dllimport/dllexport ugliness for GDK for Windows.
There is still a gdk_display variable being exported by the X11
backend.
2008-06-30 Cody Russell <bratsche@gnome.org>
* Practically everything changed.
Change all references of GIMP Toolkit (and variations of it)
to GTK+ Toolkit, showing no mercy at all to our beloved
ancestry. (#540529)
svn path=/trunk/; revision=20709
2008-05-28 Michael Natterer <mitch@imendio.com>
* gdk/gdk.h: define __GDK_H_INSIDE__ around including all other
headers.
* gdk/gdkenumtypes.h.template
* gdk/gdk*.h: add single-include guards that #error out if
GTK_DISABLE_SINGLE_INCLUDES is defined and any of these files is
included individually. Also removed some redundant includes and
did some tiny trailing whitespace removal that's not worth to
commit separately.
* gdk/gdkprivate.h: include <gdk/gdk.h> instead of individual
files.
* gdk/win32/gdkwin32.h
* gdk/x11/gdkx.h: only include <gdk/gdkprivate.h> and remove all
other includes.
svn path=/trunk/; revision=20217
2007-03-13 Emmanuele Bassi <ebassi@gnome.org>
Apply patch by Vytautas Liuolia for changing the startup
notification id on a window in the X11 backend. (#347375)
* gdk/gdk.h:
* gdk/gdkx.h:
* gdk/x11/gdkdisplay-x11.c: Add gdk_notify_startup_complete_wit_id()
and gdk_x11_display_get_startup_notification_id().
* gdk/gdkwindow.h:
* gdk/x11/gdkwindow-x11.c: Add gdk_window_set_startup_id().
* gtk/gtkwindow.h:
* gtk/gtkwindow.c: Add gtk_window_set_startup_id(), used to
change the startup notification id.
(gtk_window_class_init), (gtk_window_init),
(gtk_window_set_property): Add write-only "startup-id" property
to GtkWindow.
(gtk_window_realize): Set the startup notification id
on a GtkWindow if it's valid.
(gtk_window_map): If we have another valid startup notification
id then finish the notification process.
svn path=/trunk/; revision=17508
2006-12-22 Matthias Clasen <mclasen@redhat.com>
* gdk/gdk.symbols:
* gdk/gdk.h:
* gdk/gdk.c: Add functions to allow threadsafe handling
of idles and timeouts wrt. to the GDK lock. (#321886,
Chris Wilson)
2005-05-11 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorbutton.c: Use a GtkAlignment rather than a GtkDrawingArea
to draw the swatch in to avoid having an extraneous window.
* gtk/gtkcolorsel.c (color_sample_draw_sample): Actually se tthe
color when !has_opacity.
2005-05-10 Owen Taylor <otaylor@redhat.com>
* gdk/gdkcairo.[ch] gdk/gdkcolor.[ch] gdk/Makefile.am: Add source
files for Cairo convenience functionality.
* gdk/gdkcairo.h (gdk_cairo_rectangle, gdk_cairo_region): Add a
convenience functions to add GdkRectangle, GdkRegion to a cairo path.
* gdk/gdkwindow.c gdk/gdkgc.c gtk/gtkcolorsel.c gtk/gtkiconview.c
gtk/gtkstyle.c: Use gdk_cairo_rectangle/region().
* gdk/gdkcairo.[ch] gdk/gdkdrawable.h gdk/gdkdraw.c: Rename
gdk_drawable_create_cairo_context() to gdk_cairo_create().
* gdk/gdkcairo.c gdk/gdkpixbuf.h gdk/gdkpixbuf-render.c:
Rename gdk_pixbuf_set_as_cairo_source() to
gdk_cairo_set_source_pixbuf().
* gdk/gdkdraw.c gdk/gdkpango.c gtk/gtkcolorsel.c gtk/gtkhruler.c
gtk/gtkhsv.c gtk/gtkiconview.c gtk/gtkstyle.c gtk/gtkvruler.c:
Adjust for renames.
* gdk/gdk.symbols: Update.
* gtk/gtkwidget.c (gtk_widget_queue_shallow_draw): Fix
coordinate system problem that was causing the wrong portions
to be invalidated.
* gtk/gtkcellrenderer.c (gtk_cell_renderer_render)
gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_render)
gtk/gtkcellrendererprogress.c (gtk_cell_renderer_progress_render)
gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_render)
gtk/gtkcellview.c (gtk_cell_view_expose)
gtk/gtkdnd.c (gtk_drag_highlight_expose)
gtk/gtkentry.c (gtk_entry_draw_text)
gtk/gtktextview.c (text_window_invalidate_rect): Some cairoization.
* gtk/gtkcalendar.[ch]: Beat into something roughly resembling
GTK+ style ... use instance-private data and standard names for
private structure, etc. Move function docs inline.
* gtk/gtkcalendar.[ch]: Switch to drawing everything in
expose. Switch drawing to Cairo.
* gtk/gtkcalendar.c (gtk_calendar_freeze): Deprecate
gtk_calendar_freeze/thaw
2003-12-02 Michael Meeks <michael@ximian.com>
Based on a patch by Martin Kretzschmar; #122448
* gdk/gdk.h: new gdk_threads_lock, gdk_threads_unlock, point to
implementation of GDK_THREADS_ENTER / GDK_THREADS_LEAVE.
(GDK_THREADS_ENTER, GDK_THREADS_LEAVE): use gdk_threads_[un]lock
function pointers. Deprecate the global gdk_threads_mutex variable.
* gdk/gdk.c (gdk_threads_impl_lock, gdk_threads_impl_unlock): new,
extracted from GTK_THREADS_ENTER/LEAVE macros.
(gdk_threads_init): init gtk_threads_[un]lock if not set.
(gdk_threads_set_lock_functions): impl.
* gdk/gdkglobals.c: add definitions of gdk_threads_[un]lock.
Sun Nov 17 13:45:08 2002 Manish Singh <yosh@gimp.org>
* gdk/Makefile.am: add -DGDK_DISABLE_DEPRECATED
* gdk/gdk.c (gdk_exit): remove obsolete comment
* gdk/gdk.h: declare gdk_input_add_full if GTK_COMPILATION for
gtk_input_add_full
* gdk/gdkcolor.c (gdk_color_white, gdk_color_black): use
gdk_colormap_alloc_color instead of gdk_color_alloc
* gdk/gdkcolor.h: declare gdk_colormap_change if GDK_COMPILATION for
gdk_colors_store. Also, gdk_colors_{alloc,free} for
gdk_rgb_try_colormap
* gdk/gdkdrawable.h: declare gdk_draw_string if GTK_COMPILATION for
gtk_default_draw_string. Also, gdk_draw_text and gdk_draw_text_wc
if GDK_COMPILATION for the respective gdk_window_ and gdk_pixmap_
functions.
* gdk/gdkfont.c: #undef GDK_DISABLE_DEPRECATED, completely compat
code here
* gdk/gdkfont.h: allow the GdkFont structure and a few gdk_font_
functions for compat code in GDK_COMPILATION and GTK_COMPILATION.
* gdk/gdkrgb.c (gdk_rgb_cmap_fail, gdk_rgb_try_colormap): use
gdk_colormap_free_colors instead of gdk_colors_free.
* gdk/gdkrgb.c (gdk_draw_rgb_image_core): no need to set fg/bg
for own_gc, unused.
* gdk/gdkwindow.h: declare gdk_window_get_deskrelative_origin if
GTK_COMPILATION for gtk_handle_box_button_changed.
* gdk/x11/Makefile.am: add -DGDK_DISABLE_DEPRECATED, renmae
-DINSIDE_GDK_X11 to -DGDK_COMPILATION
* gdk/x11/gdkcolor-x11.c: remove duplicate doc string for
gdk_colormap_alloc_colors.
* gdk/x11/gdkfont-x11.c: #undef GDK_DISABLE_DEPRECATED, completely
compat code here
* gdk/x11/gdkx.h: use GDK_COMPILATION instead of INSIDE_GDK_X11,
allow a few gdk_x11_font_ functions if GDK_COMPILATION for compat
code
* gtk/Makefile.am: add -DGDK_DISABLE_DEPRECATED
* gtk/gtkclist.c
* gtk/gtkctree.c
* gtk/gtkpixmap.c
* gtk/gtkpreview.c
* gtk/gtktext.c: #undef GDK_DISABLE_DEPRECATED, deprecated widget
* gtk/gtkhandlebox.c (gtk_handle_box_motion): use
gdk_window_set_geometry_hints instead of gdk_window_set_hints.
* gtk/gtkmain.c (gtk_exit): call exit directly
* gtktipsquery.c (gtk_tips_query_real_start_query)
* gtk/gtktreeitem.c (gtk_tree_item_add_pixmaps): remove some
deprecated GDK usage.
Sat Nov 2 00:22:33 2002 Owen Taylor <otaylor@redhat.com>
Add startup notification hooks - mostly based on patch
by Havoc Pennington in #96772.
* gdk/gdk.h gdk/x11/gdkdisplay-x11.c
gdk/{win32,linux-fb}/gdkmain-*.c: (gdk_notify_startup_complete):
new function that indicates an application has finished starting
up.
* gdk/x11/gdkmain-x11.c gdk/x11/gdkdisplay-x11.c
(_gdk_windowing_set_default_display): store value of
DESKTOP_STARTUP_ID on the default screen, and clear it from the
environment.
* gdk/x11/gdkdisplay-x11.c:
Set _NET_STARTUP_ID hint on display's group leader window.
* gtk/gtkwindow.c (gtk_window_set_auto_startup_notification):
function to toggle whether we automatically broadcast that we've
started up, after mapping the first toplevel window.
(gtk_window_map): call gdk_screen_notify_startup_complete() by
default, unless enabled by above.
* gtk/gtkmain.c gtk/gtkcombo.c gtk/gtktoolbar.c:
Couple of warning fixes.
Thu Oct 31 12:40:39 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.[ch] gdk/gdkglobals.c gdk/gdkinternals.h
gdk/{x11,win32,linux-fb}/gdkscreen-{x11,win32,linux-fb}.c:
Add a --screen option for setting the default screen.
(Based on a patch from Balamurali Viswanathan, #81145)
* gdk/gdk.c gdkdisplay.h gtk/gtkmain.c: Add
gdk_display_open_default_libgtk_only(), so gtk_init_check()
and gdk_init_check() can share the same behavior w.r.t.
--screen.
* gdk/gdk.[ch]: Make gdk_get_display_arg_name() G_CONST_RETURN.
* gdk/x11/gdkselection-x11.c (gdk_selection_property_get):
Suppress a spurious warning.
* tests/testgtkrc: Remove someleft-over commented out
includes that could be confusing.
Tue Sep 24 05:26:31 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.h gdk/gdkdisplay.c gdk/linux-fb/gdkevents-fb.c
gdk/x11/gdkevents-x11.c gdk/win32/gdkevents-win32.c:
Change the window parameter for
gdk_event_send_client_message[_for_display] from guint32
to GdkNativeWindow. (#79979)
Thu Jun 20 16:49:00 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdisplaymanager.[ch] gdk/gdk.[ch] gdk/gdkdisplay.c
gdk/gdkinternals.h gdk/x11/gdkdisplay-x11.c
gdk/win32/gdkdisplay-win32.c: Add a singleton object that
we can use to get notification when displays
appear / disappear or the default display changes.
gdk_set_default_display() => gdk_display_manager_set_default_display()
gdk_list_displays() => gdk_display_manager_list_displays().
(#85696)
* gdk/Makefile.am gdk/gdkmarshalers.list: Add marshaler
generation.
* gdk/gdkintl.h: Add this.
* gtk/gtkmain.c: Add gtk_parse_args() that initializes
GTK+ without opening a display.
* gtk/gtkmain.c: Set things up so if a module
exports gtk_module_init() and gtk_module_display_init(),
then we treat it as multihead aware, otherwise,
we only initialize it after the default display is set.
Thu Apr 25 16:51:40 2002 Owen Taylor <otaylor@redhat.com>
Start of integration of Erwann Chenede's multihead work
from the gtk-multihead branch.
* gdk/gdkdisplay.[ch] gdk/gdkscreen.[ch]
gdk/x11/gdkdisplay-x11.[ch] gdk/x11/gdkscreen-x11.[ch]
New classes representing a set of screens with attached
input devices and a single contiguous area, respectively.
* gdk/gdk.[ch] gdk/gdkinternals.h gdk/x11/gdkmain-x11.c:
gdk/x11/gdkprivate-x11.h: Make the initialization interface
simple _gdk_windowing_init() and do the rest in
gdk_open_display() calls.
* gdk/gdk.[ch]: Add gdk_parse_args() which can be used
to do the display-independent part of initialization
instead of gdk_init_[check].
* gdk/gdkcursor.h gdk/gdkfont.h gdk/gdkkeys.h gdk/gdkpixmap.h
gdk/gdkproperty.h gdk/gdkselection.h gdk/gdkwindow.h:
Add multihead variants (_for_display(), for_screen()) of functions
getting information specific to a particular screen screen or
display.
* gdk/gdkscreen.[ch]: Add gdk_screen__* variants of functions
like gdk_rgb_get_colormap() that used to get/list global
objects.
* gdk/x11/gdkx.h: Add functions for converting GdkScreen
and GdkDisplay into the X equivalents.
* gdk/x11/gdkwindow-x11.c: Removed gdk_window_xid_at_coords()
not in the headers and unused.
* configure.in gdk/x11/{gxid.c,gxid_lib.[ch],gdkinput-gxi.c}:
Remove gxid support ... has not been tested for a long time...
"xfree" support is more portable to non XFree86.
* gdk/**.h: Add a GDK_MULTIHEAD_SAFE define that can be
used to turn off functions that are inherently non-multihead
safe.
* gdk/**.c: add GDK_NOTE(multihead, ...) calls when functions
are used in non-multihead-safe ways.
* gdk/*.c gdk/x11/*.c: Changes to make the internals of GDK
multihead safe.