Commit Graph

60 Commits

Author SHA1 Message Date
Matthias Clasen
6ec22dfc1d Documentation fixes
svn path=/trunk/; revision=18522
2007-07-22 04:19:19 +00:00
Matthias Clasen
436a34e318 New function to determine if keyboard layouts for both LTR and LTR
2007-06-29  Matthias Clasen  <mclasen@redhat.com>

        * gdk/gdk.symbols:
        * gdk/gdkkeys.h:
        * gdk/x11/gdkkeys-x11.c (gdk_keymap_have_bidi_layouts): New
        function to determine if keyboard layouts for both LTR and LTR
        languages are in use. Refactor the direction caching code to
        make this information available.  (#451575, Behnam Esfahbod)



svn path=/trunk/; revision=18301
2007-06-30 01:43:04 +00:00
Matthias Clasen
40e359d893 Update the docs to state which out parameters may be NULL. (#360870,
2006-10-09  Matthias Clasen  <mclasen@redhat.com>

        * gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
        Update the docs to state which out parameters may be NULL.
        (#360870, Attilio Fiandrotti)
2006-10-09 14:36:16 +00:00
Behnam Esfahbod
a0c6753511 just check the first shift-level of keyboard layout for RTL and LTR
2006-09-20  Behnam Esfahbod <behnam@zwnj.org>
	* gdk/x11/gdkkeys-x11.c:
	  (get_direction): just check the first shift-level of keyboard
	  layout for RTL and LTR keysyms() (compliment to #116626)
2006-09-20 17:47:28 +00:00
Matthias Clasen
c6985e1394 Free all XKB data. (#349997, Chris Wilson)
2006-08-06  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkkeys-x11.c (gdk_keymap_x11_finalize): Free
	all XKB data. (#349997, Chris Wilson)
2006-08-06 06:01:18 +00:00
Matthias Clasen
6d66ce2fc3 Rearrange the code a bit.
2006-04-12  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkkeys-x11.c (gdk_keymap_get_entries_for_keycode):
	Rearrange the code a bit.
2006-04-12 17:57:30 +00:00
Matthias Clasen
4906bd0fad Fix another Coverity bug 2006-04-12 04:20:28 +00:00
Matthias Clasen
83e2e23fe1 Don't corrupt odd keymaps (#316638, Kean Johnston)
2005-11-10  Matthias Clasen  <mclasen@redhat.com>

	Don't corrupt odd keymaps (#316638, Kean Johnston)

	* gdk/x11/gdkkeys-x11.c (set_symbol): Auxiliary function to
	handle frobbing keymaps with odd numbers of syms/code.

	* gdk/x11/gdkkeys-x11.c (update_keymaps): Use set_symbol() to
	frob the keymap.
2005-11-10 17:38:09 +00:00
Michael Natterer
8bdc0bf97c Applied patch from maemo-gtk that addresses many issues wrt display
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-11-10 12:09:42 +00:00
Matthias Clasen
cd63ed1eb4 *** empty log message *** 2005-09-20 05:28:34 +00:00
Matthias Clasen
03aea1a3da Make it possible to determine if a key event is for a modifier key:
2005-09-09  Matthias Clasen  <mclasen@redhat.com>

	Make it possible to determine if a key event is for a
	modifier key:

 	* gdk/x11/gdkprivate-x11.h:
	* gdk/x11/gdkkeys-x11.c (_gdk_keymap_key_is_modifier):
	New function to determine if a keycode is mapped to a modifier.
	(get_xkb): Get the modmap.

	* gdk/x11/gdkevents-x11.c (translate_key_event): Set the
	is_modifier bit by calling _gdk_keymap_key_is_modifier().

	* gdk/gdkevents.h (struct _GdkEventKey): Add an is_modifier
	bit.
2005-09-09 22:50:15 +00:00
Matthias Clasen
2726ffafe3 Make the modmap reflexive. (_gdk_keymap_add_virtual_modifiers): Don't add
2005-09-06  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkkeys-x11.c (update_modmap): Make the modmap reflexive.
	(_gdk_keymap_add_virtual_modifiers): Don't add both Alt and Meta
	if they are mapped to the same modifier.
2005-09-07 01:31:23 +00:00
Matthias Clasen
543ce67477 Add support for extra virtual modifiers: (#85780, Owen Taylor)
2005-09-06  Matthias Clasen  <mclasen@redhat.com>

	Add support for extra virtual modifiers:  (#85780, Owen Taylor)

	* gdk/x11/gdkkeys-x11.c (struct _GdkKeymapX11): Add a
	modmap to maintain the information which X modifiers map to
	virtual modifiers.
	(get_xkb): Set up the modmap from the XKB tables.
	(update_keymaps): Set up the modmap from the information returned
	by XGetModifierMapping in the non-XKB case.

	* gdk/x11/gdkprivate-x11.h:
	* gdk/x11/gdkkeys-x11.c (_gdk_keymap_add_virtual_modifiers): New
	function to set the virtual modifiers in the state.

	* gdk/x11/gdkevents-x11.c (translate_key_event): Call
	_gdk_keymap_add_virtual_modifiers here.

	* gdk/gdktypes.h (GdkModifierType): Add bits for virtual Super,
	Hyper and Meta modifiers. Also add GDK_ALT_MASK as an alias
	for GDK_MOD1_MASK.
2005-09-06 17:56:01 +00:00
Matthias Clasen
476e138db0 Intern type names before registering the type to avoid unnecessary copies.
2005-08-31  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkwindow-x11.c (gdk_window_impl_x11_get_type):
	* gdk/x11/gdkscreen-x11.c (_gdk_screen_x11_get_type):
	* gdk/x11/gdkpixmap-x11.c (gdk_pixmap_impl_x11_get_type):
	* gdk/x11/gdkkeys-x11.c (gdk_keymap_x11_get_type):
	* gdk/x11/gdkinput.c (gdk_device_get_type):
	* gdk/x11/gdkimage-x11.c (gdk_image_get_type):
	* gdk/x11/gdkgc-x11.c (_gdk_gc_x11_get_type):
	* gdk/x11/gdkdrawable-x11.c (_gdk_drawable_impl_x11_get_type):
	* gdk/x11/gdkdnd-x11.c (gdk_drag_context_get_type):
	* gdk/x11/gdkdisplay-x11.c (_gdk_display_x11_get_type):
	* gdk/x11/gdkcolor-x11.c (gdk_colormap_get_type):
	* gdk/gdkwindow.c (gdk_window_object_get_type):
	* gdk/gdkscreen.c (gdk_screen_get_type):
	* gdk/gdkrectangle.c (gdk_rectangle_get_type):
	* gdk/gdkpixmap.c (gdk_pixmap_get_type):
	* gdk/gdkkeys.c (gdk_keymap_get_type):
	* gdk/gdkfont.c (gdk_font_get_type):
	* gdk/gdkevents.c (gdk_event_get_type):
	* gdk/gdkdraw.c (gdk_drawable_get_type):
	* gdk/gdkdisplaymanager.c (gdk_display_manager_get_type):
	* gdk/gdkdisplay.c (gdk_display_get_type):
	* gdk/gdkcursor.c (gdk_cursor_get_type):
	* gdk/gdkcolor.c (gdk_color_get_type): Intern type names before
	registering the type to avoid unnecessary copies.
2005-08-31 15:14:26 +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
1d0c7ea1bb Fix many instances of "the the" in docs and comments. (#165815, Masao
2005-02-01  Matthias Clasen  <mclasen@redhat.com>

	* */*.c: Fix many instances of "the the" in docs and
	comments.  (#165815, Masao Mutoh)
2005-02-01 18:15:09 +00:00
Matthias Clasen
c61b0e4a07 Determine the direction of XKB groups from their content, not by looking
2004-11-29  Matthias Clasen  <mclasen@redhat.com>

	Determine the direction of XKB groups from their content,
	not by looking for hardcoded keymap names.  (#116626, patch by
	Behdad Esfahbod, based on an earlier patch by Ilya Konstantinov)

	* gdk/x11/gdkkeys-x11.c (struct _GdkKeymapX11): Cache directions
	for XKB groups.
	(get_direction): Determine direction of group by looking at
	directions of keysyms.
	(update_direction): Maintain the cache of group directions.
	(gdk_keymap_get_direction): Use update_direction().
2004-11-29 14:25:22 +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
Bastien Nocera
8b6934bc2c reviewed by: Matthias Clasen <maclas@gmx.de>
2004-06-25  Bastien Nocera  <hadess@hadess.net>

	reviewed by: Matthias Clasen  <maclas@gmx.de>

	* gdk/x11/gdkkeys-x11.c: (get_symbol), (update_keymaps),
	(gdk_keymap_lookup_key), (translate_keysym): fix keys parsing when
	the number of keysyms per keycode is odd. Fixes #144808.
2004-06-25 15:21:43 +00:00
Matthias Clasen
db167a4a5f Make static.
2004-05-10  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkdisplay.c (singlehead_...):
	* gdk/x11/gdkkeys-x11.c (get_effective_keymap):
	* gdk/x11/gdkgeometry-x11.c (expose_serial_predicate):
	* gdk/x11/gdkdisplay-x11.c (escape_for_xmessage): Make static.
2004-05-10 20:51:19 +00:00
Soeren Sandmann
8340991b7d Make gdk_keymap_translate_keyboard_state() handle NULL keymaps. (#139715,
Sun Apr 18 17:06:03 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gdk/x11/gdkkeys-x11.c (get_effective_keymap): Make
	gdk_keymap_translate_keyboard_state() handle NULL
	keymaps. (#139715, Torsten Schoenfeld).
2004-04-18 15:10:59 +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
ce940e61a5 Improve PointerHint docs. Explain is_hint field in GdkEventMotion.
2003-08-28  Matthias Clasen  <maclas@gmx.de>

	* gdk/tmpl/events.sgml: Improve PointerHint docs.
	* gdk/tmpl/event_structs.sgml: Explain is_hint field in GdkEventMotion.
	(#120542)
	* gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state): Markup
	fix in the docs.
2003-08-27 22:59:47 +00:00
Owen Taylor
d8c62d66c2 Fix variable declaration not at start of block. (#120371, Damien Carbery)
Tue Aug 26 09:57:38 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkkeys-x11.c (update_keymaps): Fix variable
        declaration not at start of block. (#120371, Damien Carbery)
2003-08-26 14:04:52 +00:00
Owen Taylor
378005c65e Fix up CapsLock and NumLock handling for non-XKB. Add a special case hack
Mon Aug 25 16:15:41 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkkeys-x11.c: Fix up CapsLock and
        NumLock handling for non-XKB. Add a special case
        hack for NumLock on Sun servers. (Patch from
        Robert Basch, #115819)
2003-08-25 20:22:39 +00:00
Owen Taylor
c7c5a7ddaa Change the interpretation of consumed_modifiers so that it contains: -
Thu Aug 21 15:17:42 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkkeys-x11.c: Change the interpretation
        of consumed_modifiers so that it contains:
         - Modifiers combinations actually found in
           state.
         - Single modifier modifier combinations.
        But not multi-modifier combinations that aren't
        in event->state. Document. (#100439)
2003-08-21 19:23:39 +00:00
Matthias Clasen
7cb3f99fc7 Document 2.2 API additions. 2002-11-28 00:33:17 +00:00
Owen Taylor
30faa38aec Fix use of uninitialized variable.
Thu Oct 17 17:17:05 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkcheckbutton.c (gtk_check_button_size_request):
        Fix use of uninitialized variable.

Thu Oct 17 14:38:37 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkaccellabel.c (gtk_accel_label_expose_event):
        Align the baseline of the accelerator label with the
        first baseline of the main label of the menu item. (#76593)

Wed Oct 16 18:25:24 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkevents-x11.c (translate_key_event):
        Use gdk_keymap_translate_keyboard_state() rather than
        XLookupString() to get the keysymbol, since XLookupString
        can confuse the input method handling. (#93575)

        * gdk/x11/gdkkeys-x11.c: Rewrite the handling of
        key translation for the non-XKB case to properly
        handle Shift_Lock, Caps_Lock, Num_Lock according
        to the Xlib spec. (#67066)
2002-10-18 19:26:43 +00:00
Owen Taylor
79193611f4 Fix from Phil Blundell for compiling without Xkb. (#95909)
Wed Oct 16 15:19:44 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkkeys-x11.c: Fix from Phil Blundell for
        compiling without Xkb. (#95909)
2002-10-16 19:20:57 +00:00
Owen Taylor
f2313b63cd Move out of HAVE_XKB. (#95129, Phil Blundell)
Mon Oct  7 19:44:45 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkkeys-x11.c (_gdk_keymap_keys_changed): Move
        out of HAVE_XKB. (#95129, Phil Blundell)
2002-10-08 13:27:04 +00:00
Owen Taylor
f3f016d045 Add gdk_drag_find_window_for_screen(), so that we can interpret x_root /
Mon Oct  7 15:48:44 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkdnd.[ch] gdk/x11/gdkdnd-x11.c: Add
        gdk_drag_find_window_for_screen(), so that we can
        interpret x_root / y_root relative to the correct screen.

        * gdk/gdkdnd.c Makefile.am gdk/x11/gdkdnd-x11.c
        gdk/fb/gdkdnd-fb.c gdk/win32/gdkdnd-win32.c: New file.
        Move gdk_drag_find_window(), gdk_drag_get_protocol() here.

        * gtk/gtkdnd.c: Handle drags between screens; use
        a fallback icon for icons set as windows/pixmaps,
        move the drag icon between displays for icons set as
        pixbufs.

        * gdk/x11/gdkkeys-x11.c (update_keymaps): Fix infinite
        loop from last change.
2002-10-07 20:03:15 +00:00
Owen Taylor
b598a4344e If Mode_switch is used for a known modifier like Mod1, assume it won't be
Mon Oct  7 11:45:17 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkkeys-x11.c (update_keymaps): If Mode_switch
        is used for a known modifier like Mod1, assume it won't
        be used to switch group. (#94841, problem reported by
        Szekeres Istvan)
2002-10-07 16:06:31 +00:00
Owen Taylor
fd83bdbadb Patch from Shivram U <shivaram.upadhyayula@wipro.com>
Fri Oct  4 14:49:04 2002  Owen Taylor  <otaylor@redhat.com>

        Patch from Shivram U <shivaram.upadhyayula@wipro.com>

        * gdk/x11/gdkkeys-x11.c (update_keymaps): Increased the keycount to
        (max_keycode - min_keycode) + 1 from (max_keycode - min_keycode).
        (update_keymaps), (gdk_keymap_get_entries_for_keyval) looping through
        less than or equal to max_keycode. (#79184)
2002-10-04 18:59:49 +00:00
Manish Singh
234e191c1c add -DG_DISABLE_DEPRECATED and -DGDK_PIXBUF_DISABLE_DEPRECATED to compile
Wed Sep 25 00:16:53 2002  Manish Singh  <yosh@gimp.org>

        * gdk/Makefile.am gdk/x11/Makefile.am: add -DG_DISABLE_DEPRECATED
        and -DGDK_PIXBUF_DISABLE_DEPRECATED to compile flags

        * gdk/gdkcolor.c gdk/gdkdisplay.c gdk/gdkdraw.c gdk/gdkevents.c
        gdk/gdkgc.c gdk/gdkimage.c gdk/gdkpango.c gdk/gdkpixbuf-render.c
        gdk/gdkpixmap.c gdk/gdkrgb.c gdk/gdkwindow.c gdk/linux-fb/gdkdnd-fb.c
        gdk/linux-fb/gdkfont-fb.c gdk/win32/gdkdnd-win32.c
        gdk/win32/gdkfont-win32.c gdk/x11/gdkdisplay-x11.c gdk/x11/gdkdnd-x11.c
        gdk/x11/gdkdrawable-x11.c gdk/x11/gdkevents-x11.c gdk/x11/gdkfont-x11.c
        gdk/x11/gdkgc-x11.c gdk/x11/gdkgeometry-x11.c gdk/x11/gdkim-x11.c
        gdk/x11/gdkinput-x11.c gdk/x11/gdkkeys-x11.c gdk/x11/gdkscreen-x11.c
        gdk/x11/gdkwindow-x11.c: Deprecation cleanup, mostly changing
        gdk_foo_{ref,unref} to g_object equivalents.
2002-09-25 07:23:55 +00:00
Owen Taylor
a16b63eb35 Add a keys_changed signal emitted when the keymap changes. (#72148)
Mon Sep 23 16:48:46 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkkeys.[ch] gdk/x11/gdkkeys-x11.c gdk/x11/gdkevents-x11.c:
        Add a keys_changed signal emitted when the keymap changes.
        (#72148)

        * gtk/gtkkeyhash.c (_gtk_key_hash_remove_entry):
        Hook up code to handle keymap changes, change to keep
        a linked list of keymap entries so that we can reinsert
        them in the same order on a keymap change.
2002-09-23 21:35:00 +00:00
Owen Taylor
28c2b0a31f Renames:
Thu Jun 20 19:41:09 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkdisplay.h gdk/gdkscreen.h gdk/**.c gtk/*.c
        tests/*.c: Renames:

         gdk_get_default_display => gdk_display_get_default
         gdk_get_default_screen  => gdk_screen_get_default
         gdk_open_display        => gdk_display_open
2002-06-20 23:59:27 +00:00
Owen Taylor
aeaaae04ac Changes multihead reorganizing code for win32 support, mostly from a patch
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.
2002-06-06 00:26:42 +00:00
Owen Taylor
44859f939c Try adding a #ifndef/#define for XkbKeySymEntry to make up for OSF broken
Tue May 14 15:09:33 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkkeys-x11.c: Try adding a #ifndef/#define
        for XkbKeySymEntry to make up for OSF broken
        XKB extension. (#77819, Gareth Pearce)

        * gtk/gtklayout.c: Clamp the upper values in response
        to ::size-allocate if necessary. (#81290, Christophe Saout)

        * gtk/gtkcombo.c (gtk_combo_entry_focus_out): Handle
        combo being destroyed before idle fires.
        (#81396, Timo Sirainen)
2002-05-14 19:15:46 +00:00
Matthias Clasen
7b168e71eb Doc updates. 2002-05-02 22:28:50 +00:00
Owen Taylor
425b9886c9 Start of integration of Erwann Chenede's multihead work from the
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.
2002-04-25 22:29:14 +00:00
Padraig O'Briain
ab62fadd82 Fudge keymap to have lower upper case variants if there is only a single
* gdk/x11/gdkkeys-x11.c (update_keymaps): Fudge keymap to have lower
upper case variants if there is only a single keysym per keycode and
the key symbol has upper and lower case variants (#74512)
2002-03-15 10:06:02 +00:00
Owen Taylor
b543bbff41 Fixes for non XKB operation. (#73103)
Mon Mar  4 12:43:48 2002  Owen Taylor  <otaylor@redhat.com>

        Fixes for non XKB operation. (#73103)

        * gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
        Fix problem where GDK_Tab was converted to GDK_ISO_Left_Tab
        always, not just if Shift was pressed.

        * gdk/x11/gdkkeys-x11.c gdk/x11/gdkprivate-x11.c
        gdk/x11/gdkevents-x11.c: Move determination of group
        to _gdk_x11_get_group_for_state(), fix to handle non-XKB.

        * gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state): Only
        add in SHIFT_MASK | LOCK_MASK to consumed_modifiers if the shifted
        and unshifted keysyms are different. Only add in group_switch_mask
        if the group-switched and non-group-switched keysyms are diferent.

        * gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
        When calling XKeycodeToKeysym, use group * keysyms_per_keycode / 2
        not group * keysyms_per_keycode. (Tor Lillquist)

        * gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
        Remove the hack to fudge the return value for GDK_Tab + Shift
        since that didn't work -- it didn't affect the reverse mapping.
        Instead fudge the non-XKB keymap instead.
2002-03-04 20:19:04 +00:00
Tor Lillqvist
d237e8557d gdk/gdkkeys.c (gdk_keyval_convert_case) If the keyval to be converted is
2002-03-01  Tor Lillqvist  <tml@iki.fi>

	* gdk/gdkkeys.c (gdk_keyval_convert_case)
	* gdk/x11/gdkkeys-x11.c (gdk_keyval_convert_case): If the keyval
	to be converted is one of those that consist of a Unicode
	character plus our special flag bit, use the
	g_unichar_to{lower,upper} functions (Bug#73112).

	* gdk/gdkkeys.c (gdk_keyval_convert_case): Drop the #ifdefs for
	the GDK keysym symbols. As we include gdkkeysyms.h, we know they
	are there. And if GDK keysyms some day are added/removed, this
	function needs changes, too, anyway.
2002-03-01 22:09:27 +00:00
Owen Taylor
0fd671aed5 Make sure Page_Up, Page_Down get those names, not Prior, Next.
Tue Feb 26 19:16:28 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/win32/gdkkeys-win32.c (gdk_keyval_name):
        * gdk/x11/gdkkeys-x11.c (gdk_keyval_name):
        Make sure Page_Up, Page_Down get those names, not Prior,
        Next.
2002-02-27 00:24:11 +00:00
Owen Taylor
9953d39036 Fix precendence problem. (Sven Neumann)
Mon Feb 25 12:47:25 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
        Fix precendence problem. (Sven Neumann)
2002-02-25 17:48:32 +00:00
Owen Taylor
708e1a9574 Implement "fuzzy" key binding lookups; allow matches on key and level but
Wed Feb 20 14:26:47 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkkeyhash.[ch]: Implement "fuzzy" key binding lookups;
        allow matches on key and level but not group. Also, implement
        ignoring "consumed modifiers correctly."

        * gtk/gtkaccelgroup.c gtk/gtkbindings.c: Convert to using
        GtkKeyHash.

        * gtk/gtkdebug.h gtk/gtkmain.c: Support GTK_DEBUG=keybindings

        * gdk/x11/gdkevents-x11.c (gdk_event_translate): Fill in
        the group for key release events as well as key press events.

        * gdk/gdkkeys.h gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
        Rename unused_modifiers to consumed_modifiers, make the docs and
        non-Xkb implementation match the Xkb implementation.

        * gdk/linux-fb/gdkkeyboard-fb.c gdk/win32/gdkkeys-win32.c: Propagate
        doc and parameter name changes.

        * gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
        XkbTranslateKeyCode doesn't handle LockMask, we need to handle
        it ourselves.

        * gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state): Force
        <Shift>Tab to give GDK_ISO_Left_Tab, since we need consistency
        to allow dealing with ISO_Left_Tab.

        * gtk/gtkwindow.c gtk/gtktextview.c gtk/gtkscrolledwindow.c
        gtk/gtkpaned.c gtk/gtkcombo.c  gtk/gtknotebook.c:
        Remove inappropriate uses of GDK_ISO_Left_Tab. (GDK_ISO_Left_Tab
        or <Shift>Tab both are equivalent as a binding specifier.)

        * gtk/gtkbutton.c (gtk_button_class_init): Make ::activate
        GTK_RUN_ACTION, so you can bind an accelerator to it.

        * gtk/gtklabel.c (gtk_label_set_uline_text_internal): Call
        gdk_unicode_to_keyval on the mnemonic character.

        * tests/testgtk.c: Add a test for the new fuzzy key binding matching.
2002-02-21 17:14:10 +00:00
Darin Adler
6ec06edbbf isspace -> g_ascii_isspace Remove gdki8n.h include. Remove <ctype.h>
* demos/gtk-demo/main.c: (load_file): isspace -> g_ascii_isspace
	* gdk/x11/gdkim-x11.c: Remove gdki8n.h include.
	* gdk/x11/gdkkeys-x11.c: Remove <ctype.h> include.
	* gdk/x11/gdkmain-x11.c: Remove <ctype.h> include.
	* gtk/fnmatch.c: Remove <ctype.h> include.
	* gtk/gtkaccelgroup.c: Remove <ctype.h> include.
	* gtk/gtkaccellabel.c: (gtk_accel_label_refetch): toupper ->
	g_unichar_toupper, toupper -> g_unichar_totile
	* gtk/gtkbindings.c: Remove <ctype.h> include.
	* gtk/gtkfontsel.c: Remove <ctype.h> include.
	* gtk/gtkiconfactory.c: Remove <ctype.h> include.
	* gtk/gtkinputdialog.c: Remove <ctype.h> include.
	* gtk/gtklabel.c: Remove <ctype.h> include.
	* gtk/gtkmain.c: Remove <ctype.h> include.
	* gtk/gtkmenu.c: Remove <ctype.h> include.
	* gtk/gtkoldeditable.c: Remove <ctype.h> include.
	* gtk/gtkrc.c: Remove <ctype.h> include.
	* gtk/gtktextbtree.c: Remove <ctype.h> include.
	* gtk/gtktextiter.c: Remove <ctype.h> include.
	* gtk/gtktextsegment.c: Remove <ctype.h> include.
2002-02-08 19:12:34 +00:00
Jonathan Blandford
50a641ae48 get the types as well as the symbols because we need them in
Wed Jan  9 20:56:42 2002  Jonathan Blandford  <jrb@redhat.com>

	* gdk/x11/gdkkeys-x11.c (get_xkb): get the types as well as the
	symbols because we need them in MyEnhancedXkbTranslateKeyCode.
2002-01-10 02:02:59 +00:00
Owen Taylor
4e32ede287 Remove G_DISABLE_CONST_RETURNS.
Tue Oct 23 11:53:00 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/Makefile.am (INCLUDES): Remove G_DISABLE_CONST_RETURNS.

	* gtk/gtkfontsel.[ch]: Make gtk_font_selection_get_font()
	G_CONST_RETURN. (Murray Cumming)

	* gtk/gtkfontsel.c (gtk_font_selection_dialog_get_preview_text):
	Make G_CONST_RETURN.

	* gtk/gtkfilesel.c (open_user_dir): Fix bug with freeing
	results of g_get_home_dir().

	* gtk/gtkfilesel.c: Make filesel->fileop_file a duplicated
	copy. Storing the return from gtk_entry_get_text() is evil.

	* gtk/gtkcombo.c gtk/gtkcellrenderertext.c gtk/gtkbindings.c
	gtk/gtkfilesel.c gtk/gtkfontsel.c gtk/gtkimmodule.c
	gtk/gtkobject.c gtk/gtkoldeditable.c gtk/gtktreedatalist.c
	gtk/gtksignal.c: Add const.

	* gdk/x11/gdkkeys-x11.c (get_direction): Add missing const.

	* gtk/gtktreeview.c: Namespace object data keys to be safe, even
	if we are setting them on private widgets.

	* gtk/gtktreeview.c (gtk_tree_view_real_start_interactive_search):
	Duplicate entry->text before setting it as object data.
2001-10-23 16:02:23 +00:00
Owen Taylor
46dde80428 Fix problem with g_return_if_fail return value.
Sun Oct 21 23:27:00 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwidget.c (gtk_widget_translate_coordinates): Fix
	problem with g_return_if_fail return value.

 	* gdk/x11/gdkproperty-x11.c docs/Changes-2.0.txt: Move over the
	virtual atom code from the gdk-multihead branch, removing the per-display
	part. Virtualizing atoms needs to be done now to prevent compat
	breakage in direct Xlib accessing code in the future. (#62208)

 	* gdk/x11/gdkx.h: gdk/gdk/x11/gdkproperty-x11.c: Export
 	gdk_x11_xatom_to_atom, gdk_x11_atom_to_xatom().

	* gdk/gdktypes.h docs/Changes-2.0.txt: Make GdkAtom
	an opaque pointer type so the compiler catches attempts
	to mingle it with X atoms.

	* gdk/x11/{gdkdnd-x11.c,gdkevents-x11.c,gdkglobals-x11.c,
	  gdkkeys-x11.c, gdkmain-x11.c, gdkprivate-x11.c,
	  gdkproperty-x11.c, gdkselection-x11.c, gdkwindow-x11.c}
	  gtk/{gtkclist.c,gtkctree.c,gtkdnd.c,gtkplug.c,gtksocket.c}
	  tests/testdnd.c,tests/testselection.c:
	Fix up for above atom changes.

	* gdk/gdkselection.h (GDK_SELECTION_CLIPBOARD): Add, since we
	now have the ability to add custom predefines.

	* gtk/{gtkentry.c,gtklabel.c,gtkoldeditable.c,gtktextview.c}:
	Use GDK_SELECTION_CLIPBOARD instead of GDK_NONE in calls
	to gtk_clipboard_get().

	* gdk/win32/gdkproperty-win32.c: Add CLIPBOARD, fix up
	for GdkAtom => pointer change.

	* gdk/linux-fb/gdkproperty-fb.c: Fix handling of predefined
	atoms, fix for GdkAtom => pointer change.
2001-10-22 04:34:42 +00:00