Commit Graph

196 Commits

Author SHA1 Message Date
Milan Bouchet-Valat
2e3935ba9d Fix missing (transfer) annotations in GDK
Mostly missing (transfer none).
2010-11-24 21:37:20 +01:00
Javier Jardón
b63800bd33 docs: Move documentation to inline comments: gdkthreads 2010-11-15 21:06:35 +01:00
Javier Jardón
1268c17983 docs: Move documentation to inline comments: general 2010-11-15 05:35:40 +01:00
Matthias Clasen
bda1f35585 Inclusion cleanups in sources
Try to do inclusions in the same sequence, more or less.
2010-10-14 22:09:36 -04:00
Benjamin Otte
522becccc0 gdk: Remove pixmap debug category
It's not used anywhere anymore.
2010-09-26 15:11:30 +02:00
Tor Lillqvist
3dda0adf76 Drop GDK_DEBUG_GC and _IMAGE as GDK doesn't do that any more 2010-09-09 01:09:49 +03:00
Tor Lillqvist
3963d5aa76 Remove variables from the platform-independent GDK API
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.
2010-09-08 15:59:09 +03:00
Philip Withnall
5fa4a05ccc Miscellaneous string fixes
Mostly capitalisation fixes. Closes: bgo#528257
2010-08-22 15:06:45 +01:00
Benjamin Otte
548ebc29e5 debug: remove GdkRGB debuggability
GdkRGB is on its way out, so there's no need to have a debugging
category for it.
2010-08-10 21:02:26 +02:00
Javier Jardón
404e7d0e00 gdk/: fully remove gdkalias hacks
https://bugzilla.gnome.org/show_bug.cgi?id=623845
2010-07-10 02:21:31 +02:00
Matthias Clasen
bd4609b140 Merge the xi2-for-master branch 2010-05-25 18:38:44 -04:00
Javier Jardón
c6a789998a Remove deprecated gdk_exit() function 2010-05-12 03:44:07 +02:00
Johan Dahlin
fe85272112 [annotations] Add allow-none
This commit was created using a script that searched for all docstrings
containing a parameter and the string 'or %NULL'.
Gdk backends and demos excluded as they are not part of a public API

https://bugzilla.gnome.org/show_bug.cgi?id=610474
2010-02-19 17:57:51 -02:00
Colin Walters
18dc96caf8 Merge in Gdk-custom.c introspection annotations
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
2009-12-16 17:22:01 -02:00
Alexander Larsson
b18afe9054 Don't propagate GDK_NATIVE_WINDOWS to child processes
Generally you only need to work around bugs in one specific app, so we
don't want to affect the applications that application will start.
Thus we unset GDK_NATIVE_WINDOWS after reading it.
2009-08-31 15:06:01 +02:00
Alexander Larsson
a79f929dd6 Add support for enabling only native windows
Some applications make weird assumtions on Gtk+ that do not work anymore
with the new client-side windows support. For instance SWT/Eclipse reorders
the stacking order of the X windows directly without telling gdk this,
which breaks gdk drawing as gdk now relies on knowing the stacking order
for window clipping.

This introduces a GDK_NATIVE_WINDOWS environment variable, which if set
causes Gtk+ to always use native windows. Its more compatible with
pre-csw Gtk+ behaviour if you do weird X-specific hacks, although it does
limit the size of GdkWindows to 65535x65535.
2009-08-24 15:22:29 +02:00
Tor Lillqvist
550d4d185b A GOptionArgFunc should return gboolean and take also a GError pointer
2009-01-12  Tor Lillqvist  <tml@iki.fi>

	* gdk/gdk.c (gdk_arg_debug_cb) (gdk_arg_no_debug_cb): A
	GOptionArgFunc should return gboolean and take also a GError
	pointer parameter, so make these two functions do that. Return
	FALSE (and set the GError) if the parsing of the debug string
	failed completely. Note that g_parse_debug_string() doesn't really
	have any way to return parsing status, and accepts partially
	incorrect strings, though.


svn path=/trunk/; revision=22095
2009-01-12 12:05:13 +00:00
Richard Hult
b81b90949b Bug 550942 – [patch] Rework of gdkeventloop-quartz.c
2008-11-12  Richard Hult  <richard@imendio.com>

	Bug 550942 – [patch] Rework of gdkeventloop-quartz.c

	* gdk/gdk.c:
	* gdk/gdkinternals.h: Add eventloop debug facility.
	* gdk/quartz/gdkeventloop-quartz.c: Big rework of the quartz
	mainloop integration, patch from Owen Taylor. See bug #550942 for
	the details.

svn path=/trunk/; revision=21783
2008-11-12 13:30:22 +00:00
Michael Natterer
7261e61f29 call gdk_rgb_set_verbose(TRUE) if "gdkrgb" is in the debug flags.
2008-08-04  Michael Natterer  <mitch@imendio.com>

	* gdk/gdk.c (gdk_parse_args): call gdk_rgb_set_verbose(TRUE) if
	"gdkrgb" is in the debug flags.

	* gdk/gdkrgb.c (gdk_rgb_init): remove setting the verbose flag
	here, this function is deprecated and the debug flag didn't work
	when using GDK properly.


svn path=/trunk/; revision=20981
2008-08-04 17:17:46 +00:00
Matthias Clasen
75651f652e Add gdk_threads_add_timeout_seconds{_full}
svn path=/trunk/; revision=20919
2008-07-31 22:11:44 +00:00
Cody Russell
57223c9a05 Revert name change
svn path=/trunk/; revision=20724
2008-07-01 22:57:50 +00:00
Cody Russell
fce9c8b7d4 Practically everything changed.
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-06-30 23:01:56 +00:00
Johan Dahlin
d97cdbdf53 Include "config.h" instead of <config.h> Command used: find -name
2008-06-21  Johan Dahlin  <jdahlin@async.com.br>

    * *.[ch]: Include "config.h" instead of <config.h>
    Command used:
    find -name \*.[ch]|xargs perl -p -i -e 's/^#include <config.h>/#include "config.h"/g'
    Rubberstamped by Mitch and Tim


svn path=/trunk/; revision=20669
2008-06-22 14:28:52 +00:00
Matthias Clasen
4896e24bb1 Require gtk-doc 1.8
2007-11-25  Matthias Clasen  <mclasen@redhat.com>

        * configure.in: Require gtk-doc 1.8

        * */*.c: Use gtk-doc abbreviations for examples in docs.


svn path=/trunk/; revision=19041
2007-11-25 06:51:19 +00:00
Tim Janik
508baa258c clarified documentation example.
Thu Jul 12 18:03:02 2007  Tim Janik  <timj@gtk.org>

        * gdk/gdk.c (gdk_threads_add_idle_full): clarified documentation example.



svn path=/trunk/; revision=18458
2007-07-12 16:13:36 +00:00
Matthias Clasen
8f955adce7 Update docs
svn path=/trunk/; revision=17941
2007-05-26 20:49:08 +00:00
Matthias Clasen
82ce59cd0f Remove unnecessary NULL checks before g_free(). (#369666, Morten Welinder,
2007-03-09  Matthias Clasen <mclasen@redhat.com>

        * Everywhere: Remove unnecessary NULL checks before
        g_free().  (#369666, Morten Welinder, Djihed Afifi)

        * configure.in: Check for ftw.h



svn path=/trunk/; revision=17444
2007-03-09 21:57:37 +00:00
Matthias Clasen
61f5f016db Fix some formatting errors in docs.
2006-12-28  Matthias Clasen  <mclasen@redhat.com>

        * gdk/gdk.c: Fix some formatting errors in docs.
2006-12-28 21:22:23 +00:00
Matthias Clasen
7854bd1b6e Add functions to allow threadsafe handling of idles and timeouts wrt. to
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)
2006-12-22 17:46:32 +00:00
Matthias Clasen
805782a574 Handle display_name being NULL. (#354004, Chris Wilson)
2006-09-03  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkmain.c (post_parse_hook):
	* gdk/gdk.c (gdk_init): Handle display_name being NULL.
	(#354004, Chris Wilson)
2006-09-03 05:26:45 +00:00
Matthias Clasen
9713b368b2 Here too.
2006-04-03  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdk.c: Here too.
2006-04-03 20:38:09 +00:00
Matthias Clasen
c7778a8600 Fix an oversight 2005-12-11 04:25:52 +00:00
Matthias Clasen
73696ef8be Don't ignore errors from g_option_context_parse().
2005-12-06  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdk.c (gdk_parse_args):
	* gtk/gtkmain.c (gtk_parse_args): Don't ignore errors
	from g_option_context_parse().
2005-12-06 16:44:31 +00:00
Tor Lillqvist
3b9a63ec6e gdk/gdkinternals.h Add new GDK_DEBUG_DRAW flag to the GdkDebugFlag enum.
2005-11-09  Tor Lillqvist  <tml@novell.com>

	* gdk/gdkinternals.h
	* gdk/gdk.c (gdk_debug_keys[]): Add new GDK_DEBUG_DRAW flag to
	the GdkDebugFlag enum.

	* gdk/win32/gdkdrawable-win32.c: Use DRAW to trigger GDK_NOTEs in
	this file instead of MISC. Now asking for MISC will give mainly
	window manipulation debugging output.
2005-11-09 13:10:27 +00:00
Matthias Clasen
2a2d769d42 Make PLT-reduction work with gcc4, and don't include everything in
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.
2005-03-16 03:17:27 +00:00
Matthias Clasen
d5f92150d4 Fix many sparse warnings. 2004-10-28 15:00:05 +00:00
Manish Singh
1d3846451d remove now unused arg variables.
Tue Sep 21 16:27:19 2004  Manish Singh  <yosh@gimp.org>

        * gdk/gdk.c: remove now unused arg variables.

        * gdk/gdkinternals.h: declare _gdk_windowing_init ().

        * gtk/gtkmain.c (do_pre_parse_initialization): call gdk_parse_args ()
        here instead of gdk_pre_parse_libgtk_only (). Should fix #153082.
2004-09-21 23:35:18 +00:00
Matthias Clasen
e1077caf36 Add descriptions for the commandline arguments. The actual descriptions
Sun Sep  5 17:14:16 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkmain.c:
	* gdk/gdk.c:
	* gdk/x11/gdkmain-x11.c:
	* gdk/win32/gdkmain-win32.c: Add descriptions for the
	commandline arguments. The actual descriptions are mostly
	taken from libbonoboui, so translators should be able to
	copy existing translations from there.
2004-09-05 21:15:58 +00:00
Anders Carlsson
04d65a6d3d Make gtk argument parsing use goption. Add gtk_get_option_group and
2004-09-05  Anders Carlsson  <andersca@gnome.org>

	* gdk/gdk.c: (gdk_arg_class_cb), (gdk_arg_name_cb),
	(gdk_add_option_entries_libgtk_only), (gdk_pre_parse_libgtk_only),
	(gdk_parse_args):
	* gdk/gdk.h:
	* gdk/gdkinternals.h:
	* gdk/linux-fb/gdkmain-fb.c: (_gdk_windowing_init):
	* gdk/win32/gdkmain-win32.c: (_gdk_windowing_init):
	* gdk/x11/gdkdisplay-x11.c: (gdk_display_open):
	* gdk/x11/gdkmain-x11.c: (_gdk_windowing_init):
	* gtk/gtkmain.c: (gtk_arg_debug_cb), (gtk_arg_no_debug_cb),
	(gtk_arg_module_cb), (gtk_arg_warnings_cb),
	(do_pre_parse_initialization), (do_post_parse_initialization),
	(pre_parse_hook), (post_parse_hook), (gtk_get_option_group),
	(gtk_init_with_args), (gtk_parse_args):
	* gtk/gtkmain.h:
	Make gtk argument parsing use goption. Add gtk_get_option_group and
	gtk_init_with_args.

	* tests/testtreemodel.c: (main):
	Use gtk_init_with_args.
2004-09-05 15:09:55 +00:00
Matthias Clasen
0742ff3ae3 Add hidden aliases for exported symbols which are used internally in order
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-08-09 20:14:43 +00:00
Anders Carlsson
3bfc888d4a Handle '--' correctly.
2004-04-05  Anders Carlsson  <andersca@gnome.org>

	* gdk/gdk.c (gdk_arg_context_parse): Handle '--' correctly.
2004-04-05 20:39:31 +00:00
Federico Mena Quintero
80581c3011 Fixes #136082 and #135265, patch by Morten Welinder.
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>
2004-03-06 03:38:59 +00:00
Matthias Clasen
5d8f0a69c4 Documentation updates. 2003-12-11 23:52:59 +00:00
Michael Meeks
fa3ca01b17 Based on a patch by Martin Kretzschmar; #122448
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.
2003-12-08 17:13:13 +00:00
Matthias Clasen
b31a2ece5c Introduce a GDK_DEBUG_XINERAMA debug flag, and make it trigger a fake 2x2
Mon Nov  3 20:56:28 2003  Matthias Clasen  <maclas@gmx.de>

	* gdk/gdk.c:
	* gdk/gdkinternals.h:
	* gdk/x11/gdkscreen-x11.c (init_xinerama_support): Introduce a
	GDK_DEBUG_XINERAMA debug flag, and make it trigger a fake 2x2
	Xinerama mode when no actual Xinerama setup is found.
2003-11-03 20:10:34 +00:00
Owen Taylor
34c550243f Make the list of default languages more comprehensive. (Suggestion of Fco.
Sat Aug 16 10:34:49 2003  Owen Taylor  <otaylor@redhat.com>

        * modules/input/imcedilla.c: Make the list of default
        languages more comprehensive. (Suggestion of
        Fco. Javier F. Serrador)

Sat Aug  9 12:47:11 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdk.c (gdk_arg_context_parse): Fix broken
        parentheses when skipping args.
2003-08-16 14:44:00 +00:00
Owen Taylor
4fbca22e4a g_set_prgname("<unknown>") if argc is 0 as well, instead of leaving it
Fri Aug  1 15:06:25 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdk.c (gdk_parse_args): g_set_prgname("<unknown>")
        if argc is 0 as well, instead of leaving it unset.
        (#116023, Michael Meeks)
2003-08-01 19:28:19 +00:00
Matthias Clasen
7cb3f99fc7 Document 2.2 API additions. 2002-11-28 00:33:17 +00:00
Manish Singh
89fd6ad3de add -DGDK_DISABLE_DEPRECATED
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.
2002-11-17 22:04:03 +00:00
Matthias Clasen
1751a74916 Use g_return_val_if_fail in this non-void function. (gdk_init_check):
* gdk/gdk.c (gdk_display_open_default_libgtk_only): Use
	g_return_val_if_fail in this non-void function.
	(gdk_init_check): Remove unused variable.
2002-11-07 21:05:52 +00:00