gtk/gdk/gdkevents.c

1039 lines
25 KiB
C
Raw Normal View History

/* GDK - The GIMP Drawing Kit
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/*
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
* file for a list of people on the GTK+ Team. See the ChangeLog
* files for a list of changes. These files are distributed with
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
#include "gdk.h"
2000-03-28 01:24:44 +00:00
#include "gdkinternals.h"
typedef struct _GdkIOClosure GdkIOClosure;
typedef struct _GdkEventPrivate GdkEventPrivate;
typedef enum
{
/* Following flag is set for events on the event queue during
* translation and cleared afterwards.
*/
GDK_EVENT_PENDING = 1 << 0
} GdkEventFlags;
struct _GdkIOClosure
{
GdkInputFunction function;
GdkInputCondition condition;
GdkDestroyNotify notify;
gpointer data;
};
struct _GdkEventPrivate
{
GdkEvent event;
guint flags;
};
/* Private variable declarations
*/
Make gdkx.h the only installed header from gdk/x11. All structures in Fri Sep 7 11:51:44 2001 Owen Taylor <otaylor@redhat.com> Make gdkx.h the only installed header from gdk/x11. All structures in gdk/x11 are opaque. * gdk/x11/Makefile.am gdk/x11/gdkx.h gdk/x11/gdkprivate-x11.h: Don't install gdk{drawable,pixmap,window}-x11.h. * gdk/x11/{gdkcolormap-x11.c, gdkfont-x11.c, gdkx.h, gdkvisual-x11.c: Move GdkColormapPrivateX11, GdkFontPrivateX GdkImagePrivateX11, GdkVisualClass into C files. * gdk/gdkpixmap-x11.[ch]: Make gdk_pixmap_impl_get_type() static. * gdk/x11/{gdkcolor-x11.c, gdkcursor-x11.c, gdkdrawable-x11.c, gdkfont-x11.c, gdkgc-x11.c, gdkx.h, gdkimage-x11,gdkvisual-x11.c} Add public functions to replace previously exported direct structure access. gdk_x11_colormap_get_{xdisplay,xcolormap} gdk_x11_cursor_get_{xdisplay,xcursor}, gdk_x11_drawable_get_{xdisplay,xcursor,gdk_x11_visual_get_xvisual, gdk_x11_font_get_{xdisplay,xfont}, gdk_x11_image_get_{xdisplay,ximage}, gdk_x11_gc_get_{xdisplay,ximage} * gdk/gdkprivate.h gdk/gdkinternals.h: Move GdkColorInfo, GdkEventFilter, GdkClientFilter, GdkFontPrivate to gdkinternals. Fix a number of variables and functions that were exported "accidentally" from GDK. * gdk/**.[ch]: gdk => _gdk for gdk_visual_init, gdk_events_init, gdk_input_init, gdk_dnd_init, gdk_image_exit, gdk_input_exit, gdk_windowing_exit, gdk_event_func, gdk_event_data, gdk_event_notify, gdk_queued_events, gdk_queued_tail, gdk_event_new, gdk_events_queue, gdk_events_unqueue, gdk_event_queue_find_first, gdk_event_queue_remove_link, gdk_event_queue_append, gdk_event_button_generate, gdk_debug_flags, gdk_default_filters, gdk_parent_root. * gdk/x11/{gdkevents-x11.c, gdkglobals-x11.c, gdkimage-x11.c, gdkmain-x11.c, gdkprivate-x11.h, gdk/x11/gdkwindow-x11.c}: gdk => _gdk for gdk_event_mask_table, gkd_nevent_masks, gdk_wm_window_protocols, gdk_leader_window, gdk_xgrab_window, gdk_use_xshm, gdk_input_ignore_core. * gdk/x11/xsettings-common.h (xsettings_list_insert): Add #defines to namespace functions into the private _gdk_ namespace. * gdk/gdkwindow.[ch] gdk/x11/gdkx.h: Add gdk_get_default_root_window () to replace gdk_parent_root exported variable. Adjust and deprecate GDK_ROOT_PARENT(). * demos/{testpixbuf-drawable.c,testpixbuf-save.c}: Fix GDK_ROOT_PARENT usage, remove includes of port-specific headers. * gdk/{win32,x11,fb}/gdkinput*.[ch]: s/gdk/_gdk/ for _gdk_input_gxid_host, _gdk_input_gxid_port, _gdk_input_ignore_core, gdk_input_devices, _gdk_input_windows, gdk_init_input_core. * gdk/x11/{gdkevents-x11.,c gdkglobals-x11.c, gdkmain-x11.c} docs/Changes-2.0.txt: Remove gdk_wm_protocols, gdk_wm_delete_window functions, gdk_wm_take_focus, use gdk_atom_intern() instead. * gdk/linux-fb/{gdkselection-fb.c, gdkmain-fb.c, gdkprivatefb.h} gdk/win32/{gdkselection-win32.c, gdkmgdkwin32.h, gdkprivate-win32.h} gdk/x11/{gdkselection-x11.c gdkx.h, gtkprivate-x11.h} gtk/gtkselection.c Unexport gdk_selection_property, just use gdk_atom_intern ("GDK_SELECTION"). * gdk/x11/{gdkprivate-x11.h,gdkdrawable-x11h,gdkgc-x11.c,gdkx.h}: Unexport gdk_drawable_impl_x11_get_type, gdk_gc_x11_get_type, GDK_GC_X11 cast macros, GdkGCX11 structures, GdkCursorPrivate, GdkVisualprivate, gdk_x11_gc_flush. Make a number of public exports of variables into functions to increase encapsulation. * gdk/gdkinternals.h gdk/gdkinput.h gdk/gdkevents.h gdk/linux-fb/gdkmouse-fb.c: gdk_core_pointer => _gdk_core_pointer, move to gdkinternals.h. Add gdk_device_get_core_pointer (). * gdk/gdkprivate.h gdk/gdkpango.c gdk/gdkinternals.h docs/Changes-2.0.txt: Unexport gdk_parent_root, gdk_error_code, gdk_error_warnings. * gdk/x11/{gdkcolormap-x11.c, gdkmain-x11.c, gdkx.h} docs/Changes-2.0.txt: s/gdk_screen/_gdk_screen/, add gdk_x11_get_default_screen() s/gdk_root_window/_gdk_root_window/, add gdk_x11_get_default_root_xwindow() Add gdk_x11_get_default_xdisplay(). * gdk/gdk.h gdk/gdk.c linux-fb/gdkfb.h linux-fb/gdkglobals-fb.c win32/gdkwin32.h x11/gdkglobals-x11.c gdk/x11/gdkmain-x11.c gdk/x11/gdkx.h: gdk/gdk.def: Add gdk_get/set_program_class, Don't export gdk_progclass, move --class command line option and handling to common portion of GDK. Miscellaneous fixes: * gdk/x11/gdkwindow-x11.c (gdk_window_set_icon_list): Fix g_return_val_if_fail that should have been g_return_if_fail. * gdk/gdkinternals.h gdk/gdkprivate.h: Move gdk_synthesize_window_state() to the semi-public gdkprivate.h. * gtk/gtkdnd.c (_gtk_drag_source_handle_event): Remove uneeded X11 dependency. * gdk/linux-fb/gdkmain-fb.c gdk/win32/gdkmain-win32.c gdk/TODO: Remove unused gdk_key_repeat_disable/restore. * linux-fb/gdkglobals-fb.c win32/gdkglobals-win32.c x11/gdkglobals-x11.c x11/gdkprivate-x11.h gdk/gdk.def: Remove unused gdk_null_window_warnings variable. * gdk/Makefile.am (DIST_SUBDIRS) nanox/*: cvs remove nanox; it can be retrieved from the repository; it is too far from functional to be worth having people check out; it would be easier to start from scratch, I suspect. * gdk/x11/gdkpixmap-x11.c: Fix lvalue usage of GDK_PIXMAP_XID(). * gdk/x11/gdkkeys-x11.c gdk/gdkrgb.c gdk/gdkwindow.c gdk/x11/gdkpango-x11.c gdk/x11/gdkselection-x11.c: Fix some accidentally global variables and unused global variables. * gdk/x11/gdkkeys-x11.c gdk/gdkrgb.c gdk/gdkwindow.c gdk/x11/gdkpango-x11.c gdk/x11/gdkselection-x11.c: Fix some accidentally global variables and unused global variables. Add some space for future expansion to multihead. * gdk/gdkdrawable.h: Add four reserved function pointers for future expansion of GdkDrawableClass. * gtk/gtkwindow.h gtk/gtkinvisible.h: Add reserved pointer where we can put a GdkScreen * later.
2001-09-07 21:50:20 +00:00
GdkEventFunc _gdk_event_func = NULL; /* Callback for events */
gpointer _gdk_event_data = NULL;
GDestroyNotify _gdk_event_notify = NULL;
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
#define TRIPLE_CLICK_TIME(display) (2*display->double_click_time)
#define DOUBLE_CLICK_DIST 5
#define TRIPLE_CLICK_DIST 5
/*********************************************
* Functions for maintaining the event queue *
*********************************************/
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
/**
Make gdkx.h the only installed header from gdk/x11. All structures in Fri Sep 7 11:51:44 2001 Owen Taylor <otaylor@redhat.com> Make gdkx.h the only installed header from gdk/x11. All structures in gdk/x11 are opaque. * gdk/x11/Makefile.am gdk/x11/gdkx.h gdk/x11/gdkprivate-x11.h: Don't install gdk{drawable,pixmap,window}-x11.h. * gdk/x11/{gdkcolormap-x11.c, gdkfont-x11.c, gdkx.h, gdkvisual-x11.c: Move GdkColormapPrivateX11, GdkFontPrivateX GdkImagePrivateX11, GdkVisualClass into C files. * gdk/gdkpixmap-x11.[ch]: Make gdk_pixmap_impl_get_type() static. * gdk/x11/{gdkcolor-x11.c, gdkcursor-x11.c, gdkdrawable-x11.c, gdkfont-x11.c, gdkgc-x11.c, gdkx.h, gdkimage-x11,gdkvisual-x11.c} Add public functions to replace previously exported direct structure access. gdk_x11_colormap_get_{xdisplay,xcolormap} gdk_x11_cursor_get_{xdisplay,xcursor}, gdk_x11_drawable_get_{xdisplay,xcursor,gdk_x11_visual_get_xvisual, gdk_x11_font_get_{xdisplay,xfont}, gdk_x11_image_get_{xdisplay,ximage}, gdk_x11_gc_get_{xdisplay,ximage} * gdk/gdkprivate.h gdk/gdkinternals.h: Move GdkColorInfo, GdkEventFilter, GdkClientFilter, GdkFontPrivate to gdkinternals. Fix a number of variables and functions that were exported "accidentally" from GDK. * gdk/**.[ch]: gdk => _gdk for gdk_visual_init, gdk_events_init, gdk_input_init, gdk_dnd_init, gdk_image_exit, gdk_input_exit, gdk_windowing_exit, gdk_event_func, gdk_event_data, gdk_event_notify, gdk_queued_events, gdk_queued_tail, gdk_event_new, gdk_events_queue, gdk_events_unqueue, gdk_event_queue_find_first, gdk_event_queue_remove_link, gdk_event_queue_append, gdk_event_button_generate, gdk_debug_flags, gdk_default_filters, gdk_parent_root. * gdk/x11/{gdkevents-x11.c, gdkglobals-x11.c, gdkimage-x11.c, gdkmain-x11.c, gdkprivate-x11.h, gdk/x11/gdkwindow-x11.c}: gdk => _gdk for gdk_event_mask_table, gkd_nevent_masks, gdk_wm_window_protocols, gdk_leader_window, gdk_xgrab_window, gdk_use_xshm, gdk_input_ignore_core. * gdk/x11/xsettings-common.h (xsettings_list_insert): Add #defines to namespace functions into the private _gdk_ namespace. * gdk/gdkwindow.[ch] gdk/x11/gdkx.h: Add gdk_get_default_root_window () to replace gdk_parent_root exported variable. Adjust and deprecate GDK_ROOT_PARENT(). * demos/{testpixbuf-drawable.c,testpixbuf-save.c}: Fix GDK_ROOT_PARENT usage, remove includes of port-specific headers. * gdk/{win32,x11,fb}/gdkinput*.[ch]: s/gdk/_gdk/ for _gdk_input_gxid_host, _gdk_input_gxid_port, _gdk_input_ignore_core, gdk_input_devices, _gdk_input_windows, gdk_init_input_core. * gdk/x11/{gdkevents-x11.,c gdkglobals-x11.c, gdkmain-x11.c} docs/Changes-2.0.txt: Remove gdk_wm_protocols, gdk_wm_delete_window functions, gdk_wm_take_focus, use gdk_atom_intern() instead. * gdk/linux-fb/{gdkselection-fb.c, gdkmain-fb.c, gdkprivatefb.h} gdk/win32/{gdkselection-win32.c, gdkmgdkwin32.h, gdkprivate-win32.h} gdk/x11/{gdkselection-x11.c gdkx.h, gtkprivate-x11.h} gtk/gtkselection.c Unexport gdk_selection_property, just use gdk_atom_intern ("GDK_SELECTION"). * gdk/x11/{gdkprivate-x11.h,gdkdrawable-x11h,gdkgc-x11.c,gdkx.h}: Unexport gdk_drawable_impl_x11_get_type, gdk_gc_x11_get_type, GDK_GC_X11 cast macros, GdkGCX11 structures, GdkCursorPrivate, GdkVisualprivate, gdk_x11_gc_flush. Make a number of public exports of variables into functions to increase encapsulation. * gdk/gdkinternals.h gdk/gdkinput.h gdk/gdkevents.h gdk/linux-fb/gdkmouse-fb.c: gdk_core_pointer => _gdk_core_pointer, move to gdkinternals.h. Add gdk_device_get_core_pointer (). * gdk/gdkprivate.h gdk/gdkpango.c gdk/gdkinternals.h docs/Changes-2.0.txt: Unexport gdk_parent_root, gdk_error_code, gdk_error_warnings. * gdk/x11/{gdkcolormap-x11.c, gdkmain-x11.c, gdkx.h} docs/Changes-2.0.txt: s/gdk_screen/_gdk_screen/, add gdk_x11_get_default_screen() s/gdk_root_window/_gdk_root_window/, add gdk_x11_get_default_root_xwindow() Add gdk_x11_get_default_xdisplay(). * gdk/gdk.h gdk/gdk.c linux-fb/gdkfb.h linux-fb/gdkglobals-fb.c win32/gdkwin32.h x11/gdkglobals-x11.c gdk/x11/gdkmain-x11.c gdk/x11/gdkx.h: gdk/gdk.def: Add gdk_get/set_program_class, Don't export gdk_progclass, move --class command line option and handling to common portion of GDK. Miscellaneous fixes: * gdk/x11/gdkwindow-x11.c (gdk_window_set_icon_list): Fix g_return_val_if_fail that should have been g_return_if_fail. * gdk/gdkinternals.h gdk/gdkprivate.h: Move gdk_synthesize_window_state() to the semi-public gdkprivate.h. * gtk/gtkdnd.c (_gtk_drag_source_handle_event): Remove uneeded X11 dependency. * gdk/linux-fb/gdkmain-fb.c gdk/win32/gdkmain-win32.c gdk/TODO: Remove unused gdk_key_repeat_disable/restore. * linux-fb/gdkglobals-fb.c win32/gdkglobals-win32.c x11/gdkglobals-x11.c x11/gdkprivate-x11.h gdk/gdk.def: Remove unused gdk_null_window_warnings variable. * gdk/Makefile.am (DIST_SUBDIRS) nanox/*: cvs remove nanox; it can be retrieved from the repository; it is too far from functional to be worth having people check out; it would be easier to start from scratch, I suspect. * gdk/x11/gdkpixmap-x11.c: Fix lvalue usage of GDK_PIXMAP_XID(). * gdk/x11/gdkkeys-x11.c gdk/gdkrgb.c gdk/gdkwindow.c gdk/x11/gdkpango-x11.c gdk/x11/gdkselection-x11.c: Fix some accidentally global variables and unused global variables. * gdk/x11/gdkkeys-x11.c gdk/gdkrgb.c gdk/gdkwindow.c gdk/x11/gdkpango-x11.c gdk/x11/gdkselection-x11.c: Fix some accidentally global variables and unused global variables. Add some space for future expansion to multihead. * gdk/gdkdrawable.h: Add four reserved function pointers for future expansion of GdkDrawableClass. * gtk/gtkwindow.h gtk/gtkinvisible.h: Add reserved pointer where we can put a GdkScreen * later.
2001-09-07 21:50:20 +00:00
* _gdk_event_queue_find_first:
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
* @display: a #GdkDisplay
*
* Find the first event on the queue that is not still
* being filled in.
*
* Return value: Pointer to the list node for that event, or NULL.
**/
Move all X specific code into the x11/ directory. Aside from shuffling Mon Nov 8 14:47:04 1999 Owen Taylor <otaylor@redhat.com> Move all X specific code into the x11/ directory. Aside from shuffling things around, did the following: * gdk/gdkprivate.h gdk/gdk.h gdk/x11/gdkmain-x11.h: Add gdk_arg_context_* - a simple argument parsing system in the style of popt. * gdk/gdkdrawable.[ch] gdk/gdkprivate.h gdk/gdkwindow.[ch] gdk/x11/gdkprivate-x11.h: Remove X specific stuff from GdkDrawable and GdkWindowPrivate - add ->klass and ->klass_data fields. The klass_data field points to an auxilliary structure that is windowing system dependent. * gdk/gdkfont.c: Make most of the measurement functions simply wrappers around gdk_text_extents(). * gdk/gdkfont.c gdk/gdkprivate.h gdk/x11/gdkfont-x11.c: Add a _gdk_font_strlen() function that hides the weird behavior in gtk+-1.[02] where a string is interpreted differently for 8-bit and 16-bit fonts. * gdk/gdkevents.c: Add a new function gdk_event_button_generate() to store common code for synthesizing double/triple press events. * gdk/gdkgc.[ch]: Virtualize in the same way as gdkdrawable.h. Make all the function that modify an existing GC simply wrappers around gdk_gc_set_values(). * gdk/gdkcc.[ch]: Moved into x11/ directory in preparation for throwing out later. * gdk/gdkfont.c gdk/gdkimage.c gdk/gdkcolor.c: Change GdkFontPrivate, GdkImagePrivate and GdkColormapPrivate to have a windowing system dependent part (GdkFontPrivateX etc.) that "derives" from the system-independent part. * configure.in gdk/x11/Makefile.in gdk/x11/gdkinput*.c: Got rid of the included-source-files for XInput in favor of automake conditionals. (Which didn't exist when XInput support was originally added.) * gdk/gdkrgb.c: Remove the visual id from the debugging statements since that is X11 specific; print out type/depth info instead.
1999-11-08 20:14:59 +00:00
GList*
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
_gdk_event_queue_find_first (GdkDisplay *display)
{
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
GList *tmp_list = display->queued_events;
while (tmp_list)
{
GdkEventPrivate *event = tmp_list->data;
if (!(event->flags & GDK_EVENT_PENDING))
return tmp_list;
tmp_list = g_list_next (tmp_list);
}
return NULL;
}
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
/**
* _gdk_event_queue_append:
* @display: a #GdkDisplay
* @event: Event to append.
*
* Appends an event onto the tail of the event queue.
*
* Returns: the newly appended list node.
**/
GList *
_gdk_event_queue_append (GdkDisplay *display,
GdkEvent *event)
{
display->queued_tail = g_list_append (display->queued_tail, event);
if (!display->queued_events)
display->queued_events = display->queued_tail;
else
display->queued_tail = display->queued_tail->next;
return display->queued_tail;
}
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
/**
* _gdk_event_queue_remove_link:
* @display: a #GdkDisplay
* @node: node to remove
*
* Removes a specified list node from the event queue.
**/
Move all X specific code into the x11/ directory. Aside from shuffling Mon Nov 8 14:47:04 1999 Owen Taylor <otaylor@redhat.com> Move all X specific code into the x11/ directory. Aside from shuffling things around, did the following: * gdk/gdkprivate.h gdk/gdk.h gdk/x11/gdkmain-x11.h: Add gdk_arg_context_* - a simple argument parsing system in the style of popt. * gdk/gdkdrawable.[ch] gdk/gdkprivate.h gdk/gdkwindow.[ch] gdk/x11/gdkprivate-x11.h: Remove X specific stuff from GdkDrawable and GdkWindowPrivate - add ->klass and ->klass_data fields. The klass_data field points to an auxilliary structure that is windowing system dependent. * gdk/gdkfont.c: Make most of the measurement functions simply wrappers around gdk_text_extents(). * gdk/gdkfont.c gdk/gdkprivate.h gdk/x11/gdkfont-x11.c: Add a _gdk_font_strlen() function that hides the weird behavior in gtk+-1.[02] where a string is interpreted differently for 8-bit and 16-bit fonts. * gdk/gdkevents.c: Add a new function gdk_event_button_generate() to store common code for synthesizing double/triple press events. * gdk/gdkgc.[ch]: Virtualize in the same way as gdkdrawable.h. Make all the function that modify an existing GC simply wrappers around gdk_gc_set_values(). * gdk/gdkcc.[ch]: Moved into x11/ directory in preparation for throwing out later. * gdk/gdkfont.c gdk/gdkimage.c gdk/gdkcolor.c: Change GdkFontPrivate, GdkImagePrivate and GdkColormapPrivate to have a windowing system dependent part (GdkFontPrivateX etc.) that "derives" from the system-independent part. * configure.in gdk/x11/Makefile.in gdk/x11/gdkinput*.c: Got rid of the included-source-files for XInput in favor of automake conditionals. (Which didn't exist when XInput support was originally added.) * gdk/gdkrgb.c: Remove the visual id from the debugging statements since that is X11 specific; print out type/depth info instead.
1999-11-08 20:14:59 +00:00
void
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
_gdk_event_queue_remove_link (GdkDisplay *display,
GList *node)
{
if (node->prev)
node->prev->next = node->next;
else
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
display->queued_events = node->next;
if (node->next)
node->next->prev = node->prev;
else
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
display->queued_tail = node->prev;
}
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
/**
* _gdk_event_unqueue:
* @display: a #GdkDisplay
*
* Removes and returns the first event from the event
* queue that is not still being filled in.
*
* Return value: the event, or %NULL. Ownership is transferred
* to the caller.
**/
GdkEvent*
_gdk_event_unqueue (GdkDisplay *display)
{
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
GdkEvent *event = NULL;
GList *tmp_list;
tmp_list = _gdk_event_queue_find_first (display);
if (tmp_list)
{
event = tmp_list->data;
_gdk_event_queue_remove_link (display, tmp_list);
g_list_free_1 (tmp_list);
}
return event;
}
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
/**
* gdk_event_handler_set:
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
* @func: the function to call to handle events from GDK.
* @data: user data to pass to the function.
* @notify: the function to call when the handler function is removed, i.e. when
* gdk_event_handler_set() is called with another event handler.
*
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
* Sets the function to call to handle all events from GDK.
*
* Note that GTK+ uses this to install its own event handler, so it is
* usually not useful for GTK+ applications. (Although an application
* can call this function then call gtk_main_do_event() to pass
* events to GTK+.)
**/
void
gdk_event_handler_set (GdkEventFunc func,
gpointer data,
GDestroyNotify notify)
{
Make gdkx.h the only installed header from gdk/x11. All structures in Fri Sep 7 11:51:44 2001 Owen Taylor <otaylor@redhat.com> Make gdkx.h the only installed header from gdk/x11. All structures in gdk/x11 are opaque. * gdk/x11/Makefile.am gdk/x11/gdkx.h gdk/x11/gdkprivate-x11.h: Don't install gdk{drawable,pixmap,window}-x11.h. * gdk/x11/{gdkcolormap-x11.c, gdkfont-x11.c, gdkx.h, gdkvisual-x11.c: Move GdkColormapPrivateX11, GdkFontPrivateX GdkImagePrivateX11, GdkVisualClass into C files. * gdk/gdkpixmap-x11.[ch]: Make gdk_pixmap_impl_get_type() static. * gdk/x11/{gdkcolor-x11.c, gdkcursor-x11.c, gdkdrawable-x11.c, gdkfont-x11.c, gdkgc-x11.c, gdkx.h, gdkimage-x11,gdkvisual-x11.c} Add public functions to replace previously exported direct structure access. gdk_x11_colormap_get_{xdisplay,xcolormap} gdk_x11_cursor_get_{xdisplay,xcursor}, gdk_x11_drawable_get_{xdisplay,xcursor,gdk_x11_visual_get_xvisual, gdk_x11_font_get_{xdisplay,xfont}, gdk_x11_image_get_{xdisplay,ximage}, gdk_x11_gc_get_{xdisplay,ximage} * gdk/gdkprivate.h gdk/gdkinternals.h: Move GdkColorInfo, GdkEventFilter, GdkClientFilter, GdkFontPrivate to gdkinternals. Fix a number of variables and functions that were exported "accidentally" from GDK. * gdk/**.[ch]: gdk => _gdk for gdk_visual_init, gdk_events_init, gdk_input_init, gdk_dnd_init, gdk_image_exit, gdk_input_exit, gdk_windowing_exit, gdk_event_func, gdk_event_data, gdk_event_notify, gdk_queued_events, gdk_queued_tail, gdk_event_new, gdk_events_queue, gdk_events_unqueue, gdk_event_queue_find_first, gdk_event_queue_remove_link, gdk_event_queue_append, gdk_event_button_generate, gdk_debug_flags, gdk_default_filters, gdk_parent_root. * gdk/x11/{gdkevents-x11.c, gdkglobals-x11.c, gdkimage-x11.c, gdkmain-x11.c, gdkprivate-x11.h, gdk/x11/gdkwindow-x11.c}: gdk => _gdk for gdk_event_mask_table, gkd_nevent_masks, gdk_wm_window_protocols, gdk_leader_window, gdk_xgrab_window, gdk_use_xshm, gdk_input_ignore_core. * gdk/x11/xsettings-common.h (xsettings_list_insert): Add #defines to namespace functions into the private _gdk_ namespace. * gdk/gdkwindow.[ch] gdk/x11/gdkx.h: Add gdk_get_default_root_window () to replace gdk_parent_root exported variable. Adjust and deprecate GDK_ROOT_PARENT(). * demos/{testpixbuf-drawable.c,testpixbuf-save.c}: Fix GDK_ROOT_PARENT usage, remove includes of port-specific headers. * gdk/{win32,x11,fb}/gdkinput*.[ch]: s/gdk/_gdk/ for _gdk_input_gxid_host, _gdk_input_gxid_port, _gdk_input_ignore_core, gdk_input_devices, _gdk_input_windows, gdk_init_input_core. * gdk/x11/{gdkevents-x11.,c gdkglobals-x11.c, gdkmain-x11.c} docs/Changes-2.0.txt: Remove gdk_wm_protocols, gdk_wm_delete_window functions, gdk_wm_take_focus, use gdk_atom_intern() instead. * gdk/linux-fb/{gdkselection-fb.c, gdkmain-fb.c, gdkprivatefb.h} gdk/win32/{gdkselection-win32.c, gdkmgdkwin32.h, gdkprivate-win32.h} gdk/x11/{gdkselection-x11.c gdkx.h, gtkprivate-x11.h} gtk/gtkselection.c Unexport gdk_selection_property, just use gdk_atom_intern ("GDK_SELECTION"). * gdk/x11/{gdkprivate-x11.h,gdkdrawable-x11h,gdkgc-x11.c,gdkx.h}: Unexport gdk_drawable_impl_x11_get_type, gdk_gc_x11_get_type, GDK_GC_X11 cast macros, GdkGCX11 structures, GdkCursorPrivate, GdkVisualprivate, gdk_x11_gc_flush. Make a number of public exports of variables into functions to increase encapsulation. * gdk/gdkinternals.h gdk/gdkinput.h gdk/gdkevents.h gdk/linux-fb/gdkmouse-fb.c: gdk_core_pointer => _gdk_core_pointer, move to gdkinternals.h. Add gdk_device_get_core_pointer (). * gdk/gdkprivate.h gdk/gdkpango.c gdk/gdkinternals.h docs/Changes-2.0.txt: Unexport gdk_parent_root, gdk_error_code, gdk_error_warnings. * gdk/x11/{gdkcolormap-x11.c, gdkmain-x11.c, gdkx.h} docs/Changes-2.0.txt: s/gdk_screen/_gdk_screen/, add gdk_x11_get_default_screen() s/gdk_root_window/_gdk_root_window/, add gdk_x11_get_default_root_xwindow() Add gdk_x11_get_default_xdisplay(). * gdk/gdk.h gdk/gdk.c linux-fb/gdkfb.h linux-fb/gdkglobals-fb.c win32/gdkwin32.h x11/gdkglobals-x11.c gdk/x11/gdkmain-x11.c gdk/x11/gdkx.h: gdk/gdk.def: Add gdk_get/set_program_class, Don't export gdk_progclass, move --class command line option and handling to common portion of GDK. Miscellaneous fixes: * gdk/x11/gdkwindow-x11.c (gdk_window_set_icon_list): Fix g_return_val_if_fail that should have been g_return_if_fail. * gdk/gdkinternals.h gdk/gdkprivate.h: Move gdk_synthesize_window_state() to the semi-public gdkprivate.h. * gtk/gtkdnd.c (_gtk_drag_source_handle_event): Remove uneeded X11 dependency. * gdk/linux-fb/gdkmain-fb.c gdk/win32/gdkmain-win32.c gdk/TODO: Remove unused gdk_key_repeat_disable/restore. * linux-fb/gdkglobals-fb.c win32/gdkglobals-win32.c x11/gdkglobals-x11.c x11/gdkprivate-x11.h gdk/gdk.def: Remove unused gdk_null_window_warnings variable. * gdk/Makefile.am (DIST_SUBDIRS) nanox/*: cvs remove nanox; it can be retrieved from the repository; it is too far from functional to be worth having people check out; it would be easier to start from scratch, I suspect. * gdk/x11/gdkpixmap-x11.c: Fix lvalue usage of GDK_PIXMAP_XID(). * gdk/x11/gdkkeys-x11.c gdk/gdkrgb.c gdk/gdkwindow.c gdk/x11/gdkpango-x11.c gdk/x11/gdkselection-x11.c: Fix some accidentally global variables and unused global variables. * gdk/x11/gdkkeys-x11.c gdk/gdkrgb.c gdk/gdkwindow.c gdk/x11/gdkpango-x11.c gdk/x11/gdkselection-x11.c: Fix some accidentally global variables and unused global variables. Add some space for future expansion to multihead. * gdk/gdkdrawable.h: Add four reserved function pointers for future expansion of GdkDrawableClass. * gtk/gtkwindow.h gtk/gtkinvisible.h: Add reserved pointer where we can put a GdkScreen * later.
2001-09-07 21:50:20 +00:00
if (_gdk_event_notify)
(*_gdk_event_notify) (_gdk_event_data);
Make gdkx.h the only installed header from gdk/x11. All structures in Fri Sep 7 11:51:44 2001 Owen Taylor <otaylor@redhat.com> Make gdkx.h the only installed header from gdk/x11. All structures in gdk/x11 are opaque. * gdk/x11/Makefile.am gdk/x11/gdkx.h gdk/x11/gdkprivate-x11.h: Don't install gdk{drawable,pixmap,window}-x11.h. * gdk/x11/{gdkcolormap-x11.c, gdkfont-x11.c, gdkx.h, gdkvisual-x11.c: Move GdkColormapPrivateX11, GdkFontPrivateX GdkImagePrivateX11, GdkVisualClass into C files. * gdk/gdkpixmap-x11.[ch]: Make gdk_pixmap_impl_get_type() static. * gdk/x11/{gdkcolor-x11.c, gdkcursor-x11.c, gdkdrawable-x11.c, gdkfont-x11.c, gdkgc-x11.c, gdkx.h, gdkimage-x11,gdkvisual-x11.c} Add public functions to replace previously exported direct structure access. gdk_x11_colormap_get_{xdisplay,xcolormap} gdk_x11_cursor_get_{xdisplay,xcursor}, gdk_x11_drawable_get_{xdisplay,xcursor,gdk_x11_visual_get_xvisual, gdk_x11_font_get_{xdisplay,xfont}, gdk_x11_image_get_{xdisplay,ximage}, gdk_x11_gc_get_{xdisplay,ximage} * gdk/gdkprivate.h gdk/gdkinternals.h: Move GdkColorInfo, GdkEventFilter, GdkClientFilter, GdkFontPrivate to gdkinternals. Fix a number of variables and functions that were exported "accidentally" from GDK. * gdk/**.[ch]: gdk => _gdk for gdk_visual_init, gdk_events_init, gdk_input_init, gdk_dnd_init, gdk_image_exit, gdk_input_exit, gdk_windowing_exit, gdk_event_func, gdk_event_data, gdk_event_notify, gdk_queued_events, gdk_queued_tail, gdk_event_new, gdk_events_queue, gdk_events_unqueue, gdk_event_queue_find_first, gdk_event_queue_remove_link, gdk_event_queue_append, gdk_event_button_generate, gdk_debug_flags, gdk_default_filters, gdk_parent_root. * gdk/x11/{gdkevents-x11.c, gdkglobals-x11.c, gdkimage-x11.c, gdkmain-x11.c, gdkprivate-x11.h, gdk/x11/gdkwindow-x11.c}: gdk => _gdk for gdk_event_mask_table, gkd_nevent_masks, gdk_wm_window_protocols, gdk_leader_window, gdk_xgrab_window, gdk_use_xshm, gdk_input_ignore_core. * gdk/x11/xsettings-common.h (xsettings_list_insert): Add #defines to namespace functions into the private _gdk_ namespace. * gdk/gdkwindow.[ch] gdk/x11/gdkx.h: Add gdk_get_default_root_window () to replace gdk_parent_root exported variable. Adjust and deprecate GDK_ROOT_PARENT(). * demos/{testpixbuf-drawable.c,testpixbuf-save.c}: Fix GDK_ROOT_PARENT usage, remove includes of port-specific headers. * gdk/{win32,x11,fb}/gdkinput*.[ch]: s/gdk/_gdk/ for _gdk_input_gxid_host, _gdk_input_gxid_port, _gdk_input_ignore_core, gdk_input_devices, _gdk_input_windows, gdk_init_input_core. * gdk/x11/{gdkevents-x11.,c gdkglobals-x11.c, gdkmain-x11.c} docs/Changes-2.0.txt: Remove gdk_wm_protocols, gdk_wm_delete_window functions, gdk_wm_take_focus, use gdk_atom_intern() instead. * gdk/linux-fb/{gdkselection-fb.c, gdkmain-fb.c, gdkprivatefb.h} gdk/win32/{gdkselection-win32.c, gdkmgdkwin32.h, gdkprivate-win32.h} gdk/x11/{gdkselection-x11.c gdkx.h, gtkprivate-x11.h} gtk/gtkselection.c Unexport gdk_selection_property, just use gdk_atom_intern ("GDK_SELECTION"). * gdk/x11/{gdkprivate-x11.h,gdkdrawable-x11h,gdkgc-x11.c,gdkx.h}: Unexport gdk_drawable_impl_x11_get_type, gdk_gc_x11_get_type, GDK_GC_X11 cast macros, GdkGCX11 structures, GdkCursorPrivate, GdkVisualprivate, gdk_x11_gc_flush. Make a number of public exports of variables into functions to increase encapsulation. * gdk/gdkinternals.h gdk/gdkinput.h gdk/gdkevents.h gdk/linux-fb/gdkmouse-fb.c: gdk_core_pointer => _gdk_core_pointer, move to gdkinternals.h. Add gdk_device_get_core_pointer (). * gdk/gdkprivate.h gdk/gdkpango.c gdk/gdkinternals.h docs/Changes-2.0.txt: Unexport gdk_parent_root, gdk_error_code, gdk_error_warnings. * gdk/x11/{gdkcolormap-x11.c, gdkmain-x11.c, gdkx.h} docs/Changes-2.0.txt: s/gdk_screen/_gdk_screen/, add gdk_x11_get_default_screen() s/gdk_root_window/_gdk_root_window/, add gdk_x11_get_default_root_xwindow() Add gdk_x11_get_default_xdisplay(). * gdk/gdk.h gdk/gdk.c linux-fb/gdkfb.h linux-fb/gdkglobals-fb.c win32/gdkwin32.h x11/gdkglobals-x11.c gdk/x11/gdkmain-x11.c gdk/x11/gdkx.h: gdk/gdk.def: Add gdk_get/set_program_class, Don't export gdk_progclass, move --class command line option and handling to common portion of GDK. Miscellaneous fixes: * gdk/x11/gdkwindow-x11.c (gdk_window_set_icon_list): Fix g_return_val_if_fail that should have been g_return_if_fail. * gdk/gdkinternals.h gdk/gdkprivate.h: Move gdk_synthesize_window_state() to the semi-public gdkprivate.h. * gtk/gtkdnd.c (_gtk_drag_source_handle_event): Remove uneeded X11 dependency. * gdk/linux-fb/gdkmain-fb.c gdk/win32/gdkmain-win32.c gdk/TODO: Remove unused gdk_key_repeat_disable/restore. * linux-fb/gdkglobals-fb.c win32/gdkglobals-win32.c x11/gdkglobals-x11.c x11/gdkprivate-x11.h gdk/gdk.def: Remove unused gdk_null_window_warnings variable. * gdk/Makefile.am (DIST_SUBDIRS) nanox/*: cvs remove nanox; it can be retrieved from the repository; it is too far from functional to be worth having people check out; it would be easier to start from scratch, I suspect. * gdk/x11/gdkpixmap-x11.c: Fix lvalue usage of GDK_PIXMAP_XID(). * gdk/x11/gdkkeys-x11.c gdk/gdkrgb.c gdk/gdkwindow.c gdk/x11/gdkpango-x11.c gdk/x11/gdkselection-x11.c: Fix some accidentally global variables and unused global variables. * gdk/x11/gdkkeys-x11.c gdk/gdkrgb.c gdk/gdkwindow.c gdk/x11/gdkpango-x11.c gdk/x11/gdkselection-x11.c: Fix some accidentally global variables and unused global variables. Add some space for future expansion to multihead. * gdk/gdkdrawable.h: Add four reserved function pointers for future expansion of GdkDrawableClass. * gtk/gtkwindow.h gtk/gtkinvisible.h: Add reserved pointer where we can put a GdkScreen * later.
2001-09-07 21:50:20 +00:00
_gdk_event_func = func;
_gdk_event_data = data;
_gdk_event_notify = notify;
}
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
/**
* gdk_event_get:
*
* Checks all open displays for a #GdkEvent to process,to be processed
* on, fetching events from the windowing system if necessary.
* See gdk_display_get_event().
*
* Return value: the next #GdkEvent to be processed, or %NULL if no events
* are pending. The returned #GdkEvent should be freed with gdk_event_free().
**/
GdkEvent*
gdk_event_get (void)
{
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
GSList *tmp_list;
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
for (tmp_list = _gdk_displays; tmp_list; tmp_list = tmp_list->next)
{
GdkEvent *event = gdk_display_get_event (tmp_list->data);
if (event)
return event;
}
return NULL;
}
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
/**
* gdk_event_peek:
*
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
* If there is an event waiting in the event queue of some open
* display, returns a copy of it. See gdk_display_peek_event().
*
* Return value: a copy of the first #GdkEvent on some event queue, or %NULL if no
* events are in any queues. The returned #GdkEvent should be freed with
* gdk_event_free().
**/
GdkEvent*
gdk_event_peek (void)
{
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
GSList *tmp_list;
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
for (tmp_list = _gdk_displays; tmp_list; tmp_list = tmp_list->next)
{
GdkEvent *event = gdk_display_peek_event (tmp_list->data);
if (event)
return event;
}
return NULL;
}
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
/**
* gdk_event_put:
* @event: a #GdkEvent.
*
* Appends a copy of the given event onto the front of the event
* queue for event->any.window's display, or the default event
* queue if event->any.window is %NULL. See gdk_display_put_event().
**/
void
gdk_event_put (GdkEvent *event)
{
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
GdkDisplay *display;
g_return_if_fail (event != NULL);
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
if (event->any.window)
display = gdk_drawable_get_display (event->any.window);
else
{
GDK_NOTE (MULTIHEAD,
g_message ("Falling back to default display for gdk_event_put()"));
display = gdk_display_get_default ();
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
}
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
gdk_display_put_event (display, event);
}
static GMemChunk *event_chunk = NULL;
Move all X specific code into the x11/ directory. Aside from shuffling Mon Nov 8 14:47:04 1999 Owen Taylor <otaylor@redhat.com> Move all X specific code into the x11/ directory. Aside from shuffling things around, did the following: * gdk/gdkprivate.h gdk/gdk.h gdk/x11/gdkmain-x11.h: Add gdk_arg_context_* - a simple argument parsing system in the style of popt. * gdk/gdkdrawable.[ch] gdk/gdkprivate.h gdk/gdkwindow.[ch] gdk/x11/gdkprivate-x11.h: Remove X specific stuff from GdkDrawable and GdkWindowPrivate - add ->klass and ->klass_data fields. The klass_data field points to an auxilliary structure that is windowing system dependent. * gdk/gdkfont.c: Make most of the measurement functions simply wrappers around gdk_text_extents(). * gdk/gdkfont.c gdk/gdkprivate.h gdk/x11/gdkfont-x11.c: Add a _gdk_font_strlen() function that hides the weird behavior in gtk+-1.[02] where a string is interpreted differently for 8-bit and 16-bit fonts. * gdk/gdkevents.c: Add a new function gdk_event_button_generate() to store common code for synthesizing double/triple press events. * gdk/gdkgc.[ch]: Virtualize in the same way as gdkdrawable.h. Make all the function that modify an existing GC simply wrappers around gdk_gc_set_values(). * gdk/gdkcc.[ch]: Moved into x11/ directory in preparation for throwing out later. * gdk/gdkfont.c gdk/gdkimage.c gdk/gdkcolor.c: Change GdkFontPrivate, GdkImagePrivate and GdkColormapPrivate to have a windowing system dependent part (GdkFontPrivateX etc.) that "derives" from the system-independent part. * configure.in gdk/x11/Makefile.in gdk/x11/gdkinput*.c: Got rid of the included-source-files for XInput in favor of automake conditionals. (Which didn't exist when XInput support was originally added.) * gdk/gdkrgb.c: Remove the visual id from the debugging statements since that is X11 specific; print out type/depth info instead.
1999-11-08 20:14:59 +00:00
GdkEvent*
Make gdkx.h the only installed header from gdk/x11. All structures in Fri Sep 7 11:51:44 2001 Owen Taylor <otaylor@redhat.com> Make gdkx.h the only installed header from gdk/x11. All structures in gdk/x11 are opaque. * gdk/x11/Makefile.am gdk/x11/gdkx.h gdk/x11/gdkprivate-x11.h: Don't install gdk{drawable,pixmap,window}-x11.h. * gdk/x11/{gdkcolormap-x11.c, gdkfont-x11.c, gdkx.h, gdkvisual-x11.c: Move GdkColormapPrivateX11, GdkFontPrivateX GdkImagePrivateX11, GdkVisualClass into C files. * gdk/gdkpixmap-x11.[ch]: Make gdk_pixmap_impl_get_type() static. * gdk/x11/{gdkcolor-x11.c, gdkcursor-x11.c, gdkdrawable-x11.c, gdkfont-x11.c, gdkgc-x11.c, gdkx.h, gdkimage-x11,gdkvisual-x11.c} Add public functions to replace previously exported direct structure access. gdk_x11_colormap_get_{xdisplay,xcolormap} gdk_x11_cursor_get_{xdisplay,xcursor}, gdk_x11_drawable_get_{xdisplay,xcursor,gdk_x11_visual_get_xvisual, gdk_x11_font_get_{xdisplay,xfont}, gdk_x11_image_get_{xdisplay,ximage}, gdk_x11_gc_get_{xdisplay,ximage} * gdk/gdkprivate.h gdk/gdkinternals.h: Move GdkColorInfo, GdkEventFilter, GdkClientFilter, GdkFontPrivate to gdkinternals. Fix a number of variables and functions that were exported "accidentally" from GDK. * gdk/**.[ch]: gdk => _gdk for gdk_visual_init, gdk_events_init, gdk_input_init, gdk_dnd_init, gdk_image_exit, gdk_input_exit, gdk_windowing_exit, gdk_event_func, gdk_event_data, gdk_event_notify, gdk_queued_events, gdk_queued_tail, gdk_event_new, gdk_events_queue, gdk_events_unqueue, gdk_event_queue_find_first, gdk_event_queue_remove_link, gdk_event_queue_append, gdk_event_button_generate, gdk_debug_flags, gdk_default_filters, gdk_parent_root. * gdk/x11/{gdkevents-x11.c, gdkglobals-x11.c, gdkimage-x11.c, gdkmain-x11.c, gdkprivate-x11.h, gdk/x11/gdkwindow-x11.c}: gdk => _gdk for gdk_event_mask_table, gkd_nevent_masks, gdk_wm_window_protocols, gdk_leader_window, gdk_xgrab_window, gdk_use_xshm, gdk_input_ignore_core. * gdk/x11/xsettings-common.h (xsettings_list_insert): Add #defines to namespace functions into the private _gdk_ namespace. * gdk/gdkwindow.[ch] gdk/x11/gdkx.h: Add gdk_get_default_root_window () to replace gdk_parent_root exported variable. Adjust and deprecate GDK_ROOT_PARENT(). * demos/{testpixbuf-drawable.c,testpixbuf-save.c}: Fix GDK_ROOT_PARENT usage, remove includes of port-specific headers. * gdk/{win32,x11,fb}/gdkinput*.[ch]: s/gdk/_gdk/ for _gdk_input_gxid_host, _gdk_input_gxid_port, _gdk_input_ignore_core, gdk_input_devices, _gdk_input_windows, gdk_init_input_core. * gdk/x11/{gdkevents-x11.,c gdkglobals-x11.c, gdkmain-x11.c} docs/Changes-2.0.txt: Remove gdk_wm_protocols, gdk_wm_delete_window functions, gdk_wm_take_focus, use gdk_atom_intern() instead. * gdk/linux-fb/{gdkselection-fb.c, gdkmain-fb.c, gdkprivatefb.h} gdk/win32/{gdkselection-win32.c, gdkmgdkwin32.h, gdkprivate-win32.h} gdk/x11/{gdkselection-x11.c gdkx.h, gtkprivate-x11.h} gtk/gtkselection.c Unexport gdk_selection_property, just use gdk_atom_intern ("GDK_SELECTION"). * gdk/x11/{gdkprivate-x11.h,gdkdrawable-x11h,gdkgc-x11.c,gdkx.h}: Unexport gdk_drawable_impl_x11_get_type, gdk_gc_x11_get_type, GDK_GC_X11 cast macros, GdkGCX11 structures, GdkCursorPrivate, GdkVisualprivate, gdk_x11_gc_flush. Make a number of public exports of variables into functions to increase encapsulation. * gdk/gdkinternals.h gdk/gdkinput.h gdk/gdkevents.h gdk/linux-fb/gdkmouse-fb.c: gdk_core_pointer => _gdk_core_pointer, move to gdkinternals.h. Add gdk_device_get_core_pointer (). * gdk/gdkprivate.h gdk/gdkpango.c gdk/gdkinternals.h docs/Changes-2.0.txt: Unexport gdk_parent_root, gdk_error_code, gdk_error_warnings. * gdk/x11/{gdkcolormap-x11.c, gdkmain-x11.c, gdkx.h} docs/Changes-2.0.txt: s/gdk_screen/_gdk_screen/, add gdk_x11_get_default_screen() s/gdk_root_window/_gdk_root_window/, add gdk_x11_get_default_root_xwindow() Add gdk_x11_get_default_xdisplay(). * gdk/gdk.h gdk/gdk.c linux-fb/gdkfb.h linux-fb/gdkglobals-fb.c win32/gdkwin32.h x11/gdkglobals-x11.c gdk/x11/gdkmain-x11.c gdk/x11/gdkx.h: gdk/gdk.def: Add gdk_get/set_program_class, Don't export gdk_progclass, move --class command line option and handling to common portion of GDK. Miscellaneous fixes: * gdk/x11/gdkwindow-x11.c (gdk_window_set_icon_list): Fix g_return_val_if_fail that should have been g_return_if_fail. * gdk/gdkinternals.h gdk/gdkprivate.h: Move gdk_synthesize_window_state() to the semi-public gdkprivate.h. * gtk/gtkdnd.c (_gtk_drag_source_handle_event): Remove uneeded X11 dependency. * gdk/linux-fb/gdkmain-fb.c gdk/win32/gdkmain-win32.c gdk/TODO: Remove unused gdk_key_repeat_disable/restore. * linux-fb/gdkglobals-fb.c win32/gdkglobals-win32.c x11/gdkglobals-x11.c x11/gdkprivate-x11.h gdk/gdk.def: Remove unused gdk_null_window_warnings variable. * gdk/Makefile.am (DIST_SUBDIRS) nanox/*: cvs remove nanox; it can be retrieved from the repository; it is too far from functional to be worth having people check out; it would be easier to start from scratch, I suspect. * gdk/x11/gdkpixmap-x11.c: Fix lvalue usage of GDK_PIXMAP_XID(). * gdk/x11/gdkkeys-x11.c gdk/gdkrgb.c gdk/gdkwindow.c gdk/x11/gdkpango-x11.c gdk/x11/gdkselection-x11.c: Fix some accidentally global variables and unused global variables. * gdk/x11/gdkkeys-x11.c gdk/gdkrgb.c gdk/gdkwindow.c gdk/x11/gdkpango-x11.c gdk/x11/gdkselection-x11.c: Fix some accidentally global variables and unused global variables. Add some space for future expansion to multihead. * gdk/gdkdrawable.h: Add four reserved function pointers for future expansion of GdkDrawableClass. * gtk/gtkwindow.h gtk/gtkinvisible.h: Add reserved pointer where we can put a GdkScreen * later.
2001-09-07 21:50:20 +00:00
_gdk_event_new (void)
{
GdkEventPrivate *new_event;
if (event_chunk == NULL)
event_chunk = g_mem_chunk_new ("events",
sizeof (GdkEventPrivate),
4096,
G_ALLOC_AND_FREE);
new_event = g_chunk_new (GdkEventPrivate, event_chunk);
new_event->flags = 0;
return (GdkEvent*) new_event;
}
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
/**
* gdk_event_copy:
* @event: a #GdkEvent
*
* Copies a #GdkEvent, copying or incrementing the reference count of the
* resources associated with it (e.g. #GdkWindow's and strings).
*
* Return value: a copy of @event. The returned #GdkEvent should be freed with
* gdk_event_free().
**/
GdkEvent*
gdk_event_copy (GdkEvent *event)
{
GdkEvent *new_event;
g_return_val_if_fail (event != NULL, NULL);
Make gdkx.h the only installed header from gdk/x11. All structures in Fri Sep 7 11:51:44 2001 Owen Taylor <otaylor@redhat.com> Make gdkx.h the only installed header from gdk/x11. All structures in gdk/x11 are opaque. * gdk/x11/Makefile.am gdk/x11/gdkx.h gdk/x11/gdkprivate-x11.h: Don't install gdk{drawable,pixmap,window}-x11.h. * gdk/x11/{gdkcolormap-x11.c, gdkfont-x11.c, gdkx.h, gdkvisual-x11.c: Move GdkColormapPrivateX11, GdkFontPrivateX GdkImagePrivateX11, GdkVisualClass into C files. * gdk/gdkpixmap-x11.[ch]: Make gdk_pixmap_impl_get_type() static. * gdk/x11/{gdkcolor-x11.c, gdkcursor-x11.c, gdkdrawable-x11.c, gdkfont-x11.c, gdkgc-x11.c, gdkx.h, gdkimage-x11,gdkvisual-x11.c} Add public functions to replace previously exported direct structure access. gdk_x11_colormap_get_{xdisplay,xcolormap} gdk_x11_cursor_get_{xdisplay,xcursor}, gdk_x11_drawable_get_{xdisplay,xcursor,gdk_x11_visual_get_xvisual, gdk_x11_font_get_{xdisplay,xfont}, gdk_x11_image_get_{xdisplay,ximage}, gdk_x11_gc_get_{xdisplay,ximage} * gdk/gdkprivate.h gdk/gdkinternals.h: Move GdkColorInfo, GdkEventFilter, GdkClientFilter, GdkFontPrivate to gdkinternals. Fix a number of variables and functions that were exported "accidentally" from GDK. * gdk/**.[ch]: gdk => _gdk for gdk_visual_init, gdk_events_init, gdk_input_init, gdk_dnd_init, gdk_image_exit, gdk_input_exit, gdk_windowing_exit, gdk_event_func, gdk_event_data, gdk_event_notify, gdk_queued_events, gdk_queued_tail, gdk_event_new, gdk_events_queue, gdk_events_unqueue, gdk_event_queue_find_first, gdk_event_queue_remove_link, gdk_event_queue_append, gdk_event_button_generate, gdk_debug_flags, gdk_default_filters, gdk_parent_root. * gdk/x11/{gdkevents-x11.c, gdkglobals-x11.c, gdkimage-x11.c, gdkmain-x11.c, gdkprivate-x11.h, gdk/x11/gdkwindow-x11.c}: gdk => _gdk for gdk_event_mask_table, gkd_nevent_masks, gdk_wm_window_protocols, gdk_leader_window, gdk_xgrab_window, gdk_use_xshm, gdk_input_ignore_core. * gdk/x11/xsettings-common.h (xsettings_list_insert): Add #defines to namespace functions into the private _gdk_ namespace. * gdk/gdkwindow.[ch] gdk/x11/gdkx.h: Add gdk_get_default_root_window () to replace gdk_parent_root exported variable. Adjust and deprecate GDK_ROOT_PARENT(). * demos/{testpixbuf-drawable.c,testpixbuf-save.c}: Fix GDK_ROOT_PARENT usage, remove includes of port-specific headers. * gdk/{win32,x11,fb}/gdkinput*.[ch]: s/gdk/_gdk/ for _gdk_input_gxid_host, _gdk_input_gxid_port, _gdk_input_ignore_core, gdk_input_devices, _gdk_input_windows, gdk_init_input_core. * gdk/x11/{gdkevents-x11.,c gdkglobals-x11.c, gdkmain-x11.c} docs/Changes-2.0.txt: Remove gdk_wm_protocols, gdk_wm_delete_window functions, gdk_wm_take_focus, use gdk_atom_intern() instead. * gdk/linux-fb/{gdkselection-fb.c, gdkmain-fb.c, gdkprivatefb.h} gdk/win32/{gdkselection-win32.c, gdkmgdkwin32.h, gdkprivate-win32.h} gdk/x11/{gdkselection-x11.c gdkx.h, gtkprivate-x11.h} gtk/gtkselection.c Unexport gdk_selection_property, just use gdk_atom_intern ("GDK_SELECTION"). * gdk/x11/{gdkprivate-x11.h,gdkdrawable-x11h,gdkgc-x11.c,gdkx.h}: Unexport gdk_drawable_impl_x11_get_type, gdk_gc_x11_get_type, GDK_GC_X11 cast macros, GdkGCX11 structures, GdkCursorPrivate, GdkVisualprivate, gdk_x11_gc_flush. Make a number of public exports of variables into functions to increase encapsulation. * gdk/gdkinternals.h gdk/gdkinput.h gdk/gdkevents.h gdk/linux-fb/gdkmouse-fb.c: gdk_core_pointer => _gdk_core_pointer, move to gdkinternals.h. Add gdk_device_get_core_pointer (). * gdk/gdkprivate.h gdk/gdkpango.c gdk/gdkinternals.h docs/Changes-2.0.txt: Unexport gdk_parent_root, gdk_error_code, gdk_error_warnings. * gdk/x11/{gdkcolormap-x11.c, gdkmain-x11.c, gdkx.h} docs/Changes-2.0.txt: s/gdk_screen/_gdk_screen/, add gdk_x11_get_default_screen() s/gdk_root_window/_gdk_root_window/, add gdk_x11_get_default_root_xwindow() Add gdk_x11_get_default_xdisplay(). * gdk/gdk.h gdk/gdk.c linux-fb/gdkfb.h linux-fb/gdkglobals-fb.c win32/gdkwin32.h x11/gdkglobals-x11.c gdk/x11/gdkmain-x11.c gdk/x11/gdkx.h: gdk/gdk.def: Add gdk_get/set_program_class, Don't export gdk_progclass, move --class command line option and handling to common portion of GDK. Miscellaneous fixes: * gdk/x11/gdkwindow-x11.c (gdk_window_set_icon_list): Fix g_return_val_if_fail that should have been g_return_if_fail. * gdk/gdkinternals.h gdk/gdkprivate.h: Move gdk_synthesize_window_state() to the semi-public gdkprivate.h. * gtk/gtkdnd.c (_gtk_drag_source_handle_event): Remove uneeded X11 dependency. * gdk/linux-fb/gdkmain-fb.c gdk/win32/gdkmain-win32.c gdk/TODO: Remove unused gdk_key_repeat_disable/restore. * linux-fb/gdkglobals-fb.c win32/gdkglobals-win32.c x11/gdkglobals-x11.c x11/gdkprivate-x11.h gdk/gdk.def: Remove unused gdk_null_window_warnings variable. * gdk/Makefile.am (DIST_SUBDIRS) nanox/*: cvs remove nanox; it can be retrieved from the repository; it is too far from functional to be worth having people check out; it would be easier to start from scratch, I suspect. * gdk/x11/gdkpixmap-x11.c: Fix lvalue usage of GDK_PIXMAP_XID(). * gdk/x11/gdkkeys-x11.c gdk/gdkrgb.c gdk/gdkwindow.c gdk/x11/gdkpango-x11.c gdk/x11/gdkselection-x11.c: Fix some accidentally global variables and unused global variables. * gdk/x11/gdkkeys-x11.c gdk/gdkrgb.c gdk/gdkwindow.c gdk/x11/gdkpango-x11.c gdk/x11/gdkselection-x11.c: Fix some accidentally global variables and unused global variables. Add some space for future expansion to multihead. * gdk/gdkdrawable.h: Add four reserved function pointers for future expansion of GdkDrawableClass. * gtk/gtkwindow.h gtk/gtkinvisible.h: Add reserved pointer where we can put a GdkScreen * later.
2001-09-07 21:50:20 +00:00
new_event = _gdk_event_new ();
*new_event = *event;
if (new_event->any.window)
gdk_window_ref (new_event->any.window);
switch (event->any.type)
{
case GDK_KEY_PRESS:
case GDK_KEY_RELEASE:
new_event->key.string = g_strdup (event->key.string);
break;
case GDK_ENTER_NOTIFY:
case GDK_LEAVE_NOTIFY:
if (event->crossing.subwindow != NULL)
gdk_window_ref (event->crossing.subwindow);
break;
case GDK_DRAG_ENTER:
case GDK_DRAG_LEAVE:
case GDK_DRAG_MOTION:
case GDK_DRAG_STATUS:
case GDK_DROP_START:
case GDK_DROP_FINISHED:
gdk_drag_context_ref (event->dnd.context);
break;
Document expose event->region change and that gtk_widget_event doesn't 2001-03-09 Alexander Larsson <alexl@redhat.com> * docs/Changes-2.0.txt: Document expose event->region change and that gtk_widget_event doesn't allow passing expose events. * gdk/gdkevents.h: Add region to expose event. * gdk/gdkevents.c: Handle event->region in gdk_event_copy() and gdk_event_free(). * gdk/gdkwindow.c (gdk_window_process_updates_internal): Generate expose_event->region when creating expose events. * gdk/x11/gdkevents-x11.c: Generate expose events with regions when translating X events. * gtk/gtkcontainer.[ch]: Default expose handler that propagates expose events to NO_WINDOW children. New function gtk_container_propagate_expose() * gtk/gtkwidget.[ch]: Moved gtk_widget_event implementation to gtk_widget_event_internal. gtk_widget_event calls gtk_widget_event_internal but doesn't allow expose events. New function gtk_widget_send_expose() to send expose events. New function gtk_widget_region_intersect() to calculate window/region intersections. * gtk/gtkmain.c (gtk_main_do_event): Use gdk_window_begin_paint_region() instead of gdk_window_begin_paint_rect(). Use gtk_widget_send_expose() to send expose events. * gtk/gtkbin.c: * gtk/gtkbox.c: * gtk/gtkfixed.c: * gtk/gtkimagemenuitem.c: * gtk/gtklist.c: * gtk/gtkpacker.c: * gtk/gtktable.c: * gtk/gtktree.c: Remove expose handler, using the default container implementation instead. * gtk/gtkbutton.c: * gtk/gtkcheckbutton.c: * gtk/gtkeventbox.c: * gtk/gtkfixed.c: * gtk/gtkhandlebox.c: * gtk/gtklayout.c: * gtk/gtklistitem.c: * gtk/gtkmenu.c: * gtk/gtkmenubar.c: * gtk/gtkmenuitem.c: * gtk/gtknotebook.c: * gtk/gtkoptionmenu.c: * gtk/gtkpaned.c: * gtk/gtkscrolledwindow.c: * gtk/gtktogglebutton.c: * gtk/gtktoolbar.c: * gtk/gtktreeitem.c: * gtk/gtkviewport.c: Chain expose handler to parent class handler. Use gtk_container_propagate_expose() to propagate exposes. * gtk/gtkclist.c (check_exposures): * gtk/gtktext.c (process_exposes): Use gtk_widget_send_expose instead of gtk_widget_event.
2001-03-09 13:28:26 +00:00
case GDK_EXPOSE:
if (event->expose.region)
new_event->expose.region = gdk_region_copy (event->expose.region);
break;
case GDK_SETTING:
new_event->setting.name = g_strdup (new_event->setting.name);
break;
default:
break;
}
return new_event;
}
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
/**
* gdk_event_free:
* @event: a #GdkEvent.
*
* Frees a #GdkEvent, freeing or decrementing any resources associated with it.
* Note that this function should only be called with events returned from
* functions such as gdk_event_peek(), gdk_event_get(),
* gdk_event_get_graphics_expose() and gdk_event_copy().
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
**/
void
gdk_event_free (GdkEvent *event)
{
g_return_if_fail (event != NULL);
g_assert (event_chunk != NULL); /* paranoid */
if (event->any.window)
gdk_window_unref (event->any.window);
switch (event->any.type)
{
case GDK_KEY_PRESS:
case GDK_KEY_RELEASE:
g_free (event->key.string);
break;
case GDK_ENTER_NOTIFY:
case GDK_LEAVE_NOTIFY:
if (event->crossing.subwindow != NULL)
gdk_window_unref (event->crossing.subwindow);
break;
case GDK_DRAG_ENTER:
case GDK_DRAG_LEAVE:
case GDK_DRAG_MOTION:
case GDK_DRAG_STATUS:
case GDK_DROP_START:
case GDK_DROP_FINISHED:
gdk_drag_context_unref (event->dnd.context);
break;
case GDK_BUTTON_PRESS:
case GDK_BUTTON_RELEASE:
if (event->button.axes)
g_free (event->button.axes);
break;
Document expose event->region change and that gtk_widget_event doesn't 2001-03-09 Alexander Larsson <alexl@redhat.com> * docs/Changes-2.0.txt: Document expose event->region change and that gtk_widget_event doesn't allow passing expose events. * gdk/gdkevents.h: Add region to expose event. * gdk/gdkevents.c: Handle event->region in gdk_event_copy() and gdk_event_free(). * gdk/gdkwindow.c (gdk_window_process_updates_internal): Generate expose_event->region when creating expose events. * gdk/x11/gdkevents-x11.c: Generate expose events with regions when translating X events. * gtk/gtkcontainer.[ch]: Default expose handler that propagates expose events to NO_WINDOW children. New function gtk_container_propagate_expose() * gtk/gtkwidget.[ch]: Moved gtk_widget_event implementation to gtk_widget_event_internal. gtk_widget_event calls gtk_widget_event_internal but doesn't allow expose events. New function gtk_widget_send_expose() to send expose events. New function gtk_widget_region_intersect() to calculate window/region intersections. * gtk/gtkmain.c (gtk_main_do_event): Use gdk_window_begin_paint_region() instead of gdk_window_begin_paint_rect(). Use gtk_widget_send_expose() to send expose events. * gtk/gtkbin.c: * gtk/gtkbox.c: * gtk/gtkfixed.c: * gtk/gtkimagemenuitem.c: * gtk/gtklist.c: * gtk/gtkpacker.c: * gtk/gtktable.c: * gtk/gtktree.c: Remove expose handler, using the default container implementation instead. * gtk/gtkbutton.c: * gtk/gtkcheckbutton.c: * gtk/gtkeventbox.c: * gtk/gtkfixed.c: * gtk/gtkhandlebox.c: * gtk/gtklayout.c: * gtk/gtklistitem.c: * gtk/gtkmenu.c: * gtk/gtkmenubar.c: * gtk/gtkmenuitem.c: * gtk/gtknotebook.c: * gtk/gtkoptionmenu.c: * gtk/gtkpaned.c: * gtk/gtkscrolledwindow.c: * gtk/gtktogglebutton.c: * gtk/gtktoolbar.c: * gtk/gtktreeitem.c: * gtk/gtkviewport.c: Chain expose handler to parent class handler. Use gtk_container_propagate_expose() to propagate exposes. * gtk/gtkclist.c (check_exposures): * gtk/gtktext.c (process_exposes): Use gtk_widget_send_expose instead of gtk_widget_event.
2001-03-09 13:28:26 +00:00
case GDK_EXPOSE:
if (event->expose.region)
gdk_region_destroy (event->expose.region);
break;
case GDK_MOTION_NOTIFY:
if (event->motion.axes)
g_free (event->motion.axes);
break;
case GDK_SETTING:
g_free (event->setting.name);
break;
default:
break;
}
g_mem_chunk_free (event_chunk, event);
}
/**
* gdk_event_get_time:
* @event: a #GdkEvent
*
* Returns the time stamp from @event, if there is one; otherwise
* returns #GDK_CURRENT_TIME. If @event is %NULL, returns #GDK_CURRENT_TIME.
*
* Return value: time stamp field from @event
**/
guint32
gdk_event_get_time (GdkEvent *event)
{
if (event)
switch (event->type)
{
case GDK_MOTION_NOTIFY:
return event->motion.time;
case GDK_BUTTON_PRESS:
case GDK_2BUTTON_PRESS:
case GDK_3BUTTON_PRESS:
case GDK_BUTTON_RELEASE:
return event->button.time;
Port to GObject, can go back in gdk-pixbuf after setting up a 2000-12-16 Havoc Pennington <hp@pobox.com> * gtk/gdk-pixbuf-loader.h, gtk/gdk-pixbuf-loader.c: Port to GObject, can go back in gdk-pixbuf after setting up a gdk-pixbuf-marshal.h header over there. * gtk/gtktreeview.c: s/SEPERATOR/SEPARATOR/g; (gtk_tree_view_class_init): specify GTK_TYPE_ADJUSTMENT for signal args (gtk_tree_view_init): don't unset GTK_NO_WINDOW, it shouldn't be set (gtk_tree_view_realize_buttons): don't gtk_widget_show() buttons here, do it when we create the buttons later (gtk_tree_view_realize_buttons): add some g_return_if_fail (gtk_tree_view_map): paranoia checks that column->button is shown and unmapped (gtk_tree_view_size_request): only request visible children. Move header size calculation in here, for cleanliness, and to maintain invariants for child widgets if we eventually let users set different children inside the buttons (gtk_tree_view_map_buttons): factor out code to map buttons, since it was being called several times (gtk_tree_view_size_allocate_buttons): move_resize the drag windows instead of just moving them; their height may change if we allow random widgets in there, or the theme changes. (gtk_tree_view_size_allocate): move button size allocation above emitting the scroll signals, to ensure a sane state when we hit user code (gtk_tree_view_button_release): remove queue_resize after tree_view_set_size(), set_size() will handle any resize queuing that's needed (gtk_tree_view_focus_in): just queue a draw, don't fool with draw_focus goo (gtk_tree_view_focus): use gtk_get_current_event() and gdk_event_get_state() (gtk_tree_view_deleted): don't queue_resize() after calling set_size() (gtk_tree_view_build_tree): fix a "if (foo); {}" bug - i.e. remove semicolon (gtk_tree_view_create_button): show the button here (gtk_tree_view_button_clicked): actually emit the clicked signal on the column (_gtk_tree_view_set_size): return right away if the size is unchanged, as a cheesy optimization (gtk_tree_view_setup_model): rename set_model_realized to setup_model to match the flag that indicates whether we've called it (gtk_tree_view_get_hadjustment): create adjustment if it doesn't exist, because set_scroll_adjustment does that and it shouldn't matter what order you call these in (gtk_tree_view_get_vadjustment): ditto (gtk_tree_view_set_headers_visible): canonicalize the bool, for paranoia (gtk_tree_view_set_headers_visible): call gtk_tree_view_map_buttons() instead of using cut-and-paste code (gtk_tree_view_append_column): clarify whether the return value is the count of columns before or after, and do the increment separately from the return statement so you can tell from the code. (gtk_tree_view_remove_column): ditto (gtk_tree_view_insert_column): ditto (gtk_tree_view_get_column): remove g_return_if_fail for columns outside the existing range, the docs say that outside-range columns are allowed, so we handle them as documented. (Presumably this allows a nice loop with column != NULL as test.) (gtk_tree_view_move_to): document what 0.0, 0.5, 1.0 alignments mean (left/right/center etc.). (gtk_tree_view_collapse_all): only queue a draw if we're mapped (gtk_tree_view_expand_row): add docs (gtk_tree_view_collapse_row): add docs * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_clicked): new function to emit the clicked signal on a column * gdk/gdkevents.c (gdk_event_get_state): new function, to get the state of an event (gdk_event_get_time): don't treat GDK_SCROLL as a button event, remove default case from switch so gcc will whine if we don't explicitly handle all event types * gtk/gtktreeselection.h: added some FIXME * gtk/gtktreeprivate.h (struct _GtkTreeViewPrivate): rename "columns" to "n_columns" and "column" to "columns" for clarity
2000-12-17 23:50:00 +00:00
case GDK_SCROLL:
return event->scroll.time;
case GDK_KEY_PRESS:
case GDK_KEY_RELEASE:
return event->key.time;
case GDK_ENTER_NOTIFY:
case GDK_LEAVE_NOTIFY:
return event->crossing.time;
case GDK_PROPERTY_NOTIFY:
return event->property.time;
case GDK_SELECTION_CLEAR:
case GDK_SELECTION_REQUEST:
case GDK_SELECTION_NOTIFY:
return event->selection.time;
case GDK_PROXIMITY_IN:
case GDK_PROXIMITY_OUT:
return event->proximity.time;
case GDK_DRAG_ENTER:
case GDK_DRAG_LEAVE:
case GDK_DRAG_MOTION:
case GDK_DRAG_STATUS:
case GDK_DROP_START:
case GDK_DROP_FINISHED:
return event->dnd.time;
Port to GObject, can go back in gdk-pixbuf after setting up a 2000-12-16 Havoc Pennington <hp@pobox.com> * gtk/gdk-pixbuf-loader.h, gtk/gdk-pixbuf-loader.c: Port to GObject, can go back in gdk-pixbuf after setting up a gdk-pixbuf-marshal.h header over there. * gtk/gtktreeview.c: s/SEPERATOR/SEPARATOR/g; (gtk_tree_view_class_init): specify GTK_TYPE_ADJUSTMENT for signal args (gtk_tree_view_init): don't unset GTK_NO_WINDOW, it shouldn't be set (gtk_tree_view_realize_buttons): don't gtk_widget_show() buttons here, do it when we create the buttons later (gtk_tree_view_realize_buttons): add some g_return_if_fail (gtk_tree_view_map): paranoia checks that column->button is shown and unmapped (gtk_tree_view_size_request): only request visible children. Move header size calculation in here, for cleanliness, and to maintain invariants for child widgets if we eventually let users set different children inside the buttons (gtk_tree_view_map_buttons): factor out code to map buttons, since it was being called several times (gtk_tree_view_size_allocate_buttons): move_resize the drag windows instead of just moving them; their height may change if we allow random widgets in there, or the theme changes. (gtk_tree_view_size_allocate): move button size allocation above emitting the scroll signals, to ensure a sane state when we hit user code (gtk_tree_view_button_release): remove queue_resize after tree_view_set_size(), set_size() will handle any resize queuing that's needed (gtk_tree_view_focus_in): just queue a draw, don't fool with draw_focus goo (gtk_tree_view_focus): use gtk_get_current_event() and gdk_event_get_state() (gtk_tree_view_deleted): don't queue_resize() after calling set_size() (gtk_tree_view_build_tree): fix a "if (foo); {}" bug - i.e. remove semicolon (gtk_tree_view_create_button): show the button here (gtk_tree_view_button_clicked): actually emit the clicked signal on the column (_gtk_tree_view_set_size): return right away if the size is unchanged, as a cheesy optimization (gtk_tree_view_setup_model): rename set_model_realized to setup_model to match the flag that indicates whether we've called it (gtk_tree_view_get_hadjustment): create adjustment if it doesn't exist, because set_scroll_adjustment does that and it shouldn't matter what order you call these in (gtk_tree_view_get_vadjustment): ditto (gtk_tree_view_set_headers_visible): canonicalize the bool, for paranoia (gtk_tree_view_set_headers_visible): call gtk_tree_view_map_buttons() instead of using cut-and-paste code (gtk_tree_view_append_column): clarify whether the return value is the count of columns before or after, and do the increment separately from the return statement so you can tell from the code. (gtk_tree_view_remove_column): ditto (gtk_tree_view_insert_column): ditto (gtk_tree_view_get_column): remove g_return_if_fail for columns outside the existing range, the docs say that outside-range columns are allowed, so we handle them as documented. (Presumably this allows a nice loop with column != NULL as test.) (gtk_tree_view_move_to): document what 0.0, 0.5, 1.0 alignments mean (left/right/center etc.). (gtk_tree_view_collapse_all): only queue a draw if we're mapped (gtk_tree_view_expand_row): add docs (gtk_tree_view_collapse_row): add docs * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_clicked): new function to emit the clicked signal on a column * gdk/gdkevents.c (gdk_event_get_state): new function, to get the state of an event (gdk_event_get_time): don't treat GDK_SCROLL as a button event, remove default case from switch so gcc will whine if we don't explicitly handle all event types * gtk/gtktreeselection.h: added some FIXME * gtk/gtktreeprivate.h (struct _GtkTreeViewPrivate): rename "columns" to "n_columns" and "column" to "columns" for clarity
2000-12-17 23:50:00 +00:00
case GDK_CLIENT_EVENT:
case GDK_VISIBILITY_NOTIFY:
case GDK_NO_EXPOSE:
case GDK_CONFIGURE:
case GDK_FOCUS_CHANGE:
case GDK_NOTHING:
case GDK_DELETE:
case GDK_DESTROY:
case GDK_EXPOSE:
case GDK_MAP:
case GDK_UNMAP:
test the window state stuff 2001-02-26 Havoc Pennington <hp@redhat.com> * gtk/testgtk.c: test the window state stuff * gtk/gtkwindow.c (gtk_window_present): new function, makes a window come to the user's attention as if it were just created (gtk_window_iconify): new function (gtk_window_deiconify): new function (gtk_window_stick): new function (gtk_window_unstick): new function (gtk_window_maximize): new function (gtk_window_unmaximize): new function * gtk/gtkwidget.h, gtk/gtkwidget.c: add window_state_event signal * gtk/gtkmain.c (gtk_main_do_event): handle GDK_WINDOW_STATE * gdk/x11/gdkevents-x11.c: create window state events when appropriate (gdk_wmspec_supported): new function * gdk/x11/gdkwindow-x11.c (gdk_window_iconify): handle iconification before showing the window (gdk_window_deiconify): new function (gdk_window_stick): new function (gdk_window_unstick): new function (gdk_window_maximize): new function (gdk_window_unmaximize): new function * gdk/gdkwindow.c: store the window state in the window; change to using the GDK_WINDOW_STATE_WITHDRAWN flag instead of window->mapped. (gdk_window_get_state): return the current window state * gdk/gdkevents.c (gdk_event_get_time): handle GDK_WINDOW_STATE (gdk_event_get_state): handle GDK_WINDOW_STATE (gdk_synthesize_window_state): function to create the window state events * gdk/gdkevents.h (struct _GdkEventWindowState): new type of event, for changes to "window state" such as maximized, sticky, etc. * gdk/x11/gdkwindow-x11.c (gdk_window_focus): new function, focuses a window * gdk/x11/gdkmain-x11.c (_gdk_wmspec_supported): new function, finds out if we support a given WM spec hint
2001-02-27 20:40:15 +00:00
case GDK_WINDOW_STATE:
case GDK_SETTING:
Port to GObject, can go back in gdk-pixbuf after setting up a 2000-12-16 Havoc Pennington <hp@pobox.com> * gtk/gdk-pixbuf-loader.h, gtk/gdk-pixbuf-loader.c: Port to GObject, can go back in gdk-pixbuf after setting up a gdk-pixbuf-marshal.h header over there. * gtk/gtktreeview.c: s/SEPERATOR/SEPARATOR/g; (gtk_tree_view_class_init): specify GTK_TYPE_ADJUSTMENT for signal args (gtk_tree_view_init): don't unset GTK_NO_WINDOW, it shouldn't be set (gtk_tree_view_realize_buttons): don't gtk_widget_show() buttons here, do it when we create the buttons later (gtk_tree_view_realize_buttons): add some g_return_if_fail (gtk_tree_view_map): paranoia checks that column->button is shown and unmapped (gtk_tree_view_size_request): only request visible children. Move header size calculation in here, for cleanliness, and to maintain invariants for child widgets if we eventually let users set different children inside the buttons (gtk_tree_view_map_buttons): factor out code to map buttons, since it was being called several times (gtk_tree_view_size_allocate_buttons): move_resize the drag windows instead of just moving them; their height may change if we allow random widgets in there, or the theme changes. (gtk_tree_view_size_allocate): move button size allocation above emitting the scroll signals, to ensure a sane state when we hit user code (gtk_tree_view_button_release): remove queue_resize after tree_view_set_size(), set_size() will handle any resize queuing that's needed (gtk_tree_view_focus_in): just queue a draw, don't fool with draw_focus goo (gtk_tree_view_focus): use gtk_get_current_event() and gdk_event_get_state() (gtk_tree_view_deleted): don't queue_resize() after calling set_size() (gtk_tree_view_build_tree): fix a "if (foo); {}" bug - i.e. remove semicolon (gtk_tree_view_create_button): show the button here (gtk_tree_view_button_clicked): actually emit the clicked signal on the column (_gtk_tree_view_set_size): return right away if the size is unchanged, as a cheesy optimization (gtk_tree_view_setup_model): rename set_model_realized to setup_model to match the flag that indicates whether we've called it (gtk_tree_view_get_hadjustment): create adjustment if it doesn't exist, because set_scroll_adjustment does that and it shouldn't matter what order you call these in (gtk_tree_view_get_vadjustment): ditto (gtk_tree_view_set_headers_visible): canonicalize the bool, for paranoia (gtk_tree_view_set_headers_visible): call gtk_tree_view_map_buttons() instead of using cut-and-paste code (gtk_tree_view_append_column): clarify whether the return value is the count of columns before or after, and do the increment separately from the return statement so you can tell from the code. (gtk_tree_view_remove_column): ditto (gtk_tree_view_insert_column): ditto (gtk_tree_view_get_column): remove g_return_if_fail for columns outside the existing range, the docs say that outside-range columns are allowed, so we handle them as documented. (Presumably this allows a nice loop with column != NULL as test.) (gtk_tree_view_move_to): document what 0.0, 0.5, 1.0 alignments mean (left/right/center etc.). (gtk_tree_view_collapse_all): only queue a draw if we're mapped (gtk_tree_view_expand_row): add docs (gtk_tree_view_collapse_row): add docs * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_clicked): new function to emit the clicked signal on a column * gdk/gdkevents.c (gdk_event_get_state): new function, to get the state of an event (gdk_event_get_time): don't treat GDK_SCROLL as a button event, remove default case from switch so gcc will whine if we don't explicitly handle all event types * gtk/gtktreeselection.h: added some FIXME * gtk/gtktreeprivate.h (struct _GtkTreeViewPrivate): rename "columns" to "n_columns" and "column" to "columns" for clarity
2000-12-17 23:50:00 +00:00
/* return current time */
break;
}
return GDK_CURRENT_TIME;
}
Port to GObject, can go back in gdk-pixbuf after setting up a 2000-12-16 Havoc Pennington <hp@pobox.com> * gtk/gdk-pixbuf-loader.h, gtk/gdk-pixbuf-loader.c: Port to GObject, can go back in gdk-pixbuf after setting up a gdk-pixbuf-marshal.h header over there. * gtk/gtktreeview.c: s/SEPERATOR/SEPARATOR/g; (gtk_tree_view_class_init): specify GTK_TYPE_ADJUSTMENT for signal args (gtk_tree_view_init): don't unset GTK_NO_WINDOW, it shouldn't be set (gtk_tree_view_realize_buttons): don't gtk_widget_show() buttons here, do it when we create the buttons later (gtk_tree_view_realize_buttons): add some g_return_if_fail (gtk_tree_view_map): paranoia checks that column->button is shown and unmapped (gtk_tree_view_size_request): only request visible children. Move header size calculation in here, for cleanliness, and to maintain invariants for child widgets if we eventually let users set different children inside the buttons (gtk_tree_view_map_buttons): factor out code to map buttons, since it was being called several times (gtk_tree_view_size_allocate_buttons): move_resize the drag windows instead of just moving them; their height may change if we allow random widgets in there, or the theme changes. (gtk_tree_view_size_allocate): move button size allocation above emitting the scroll signals, to ensure a sane state when we hit user code (gtk_tree_view_button_release): remove queue_resize after tree_view_set_size(), set_size() will handle any resize queuing that's needed (gtk_tree_view_focus_in): just queue a draw, don't fool with draw_focus goo (gtk_tree_view_focus): use gtk_get_current_event() and gdk_event_get_state() (gtk_tree_view_deleted): don't queue_resize() after calling set_size() (gtk_tree_view_build_tree): fix a "if (foo); {}" bug - i.e. remove semicolon (gtk_tree_view_create_button): show the button here (gtk_tree_view_button_clicked): actually emit the clicked signal on the column (_gtk_tree_view_set_size): return right away if the size is unchanged, as a cheesy optimization (gtk_tree_view_setup_model): rename set_model_realized to setup_model to match the flag that indicates whether we've called it (gtk_tree_view_get_hadjustment): create adjustment if it doesn't exist, because set_scroll_adjustment does that and it shouldn't matter what order you call these in (gtk_tree_view_get_vadjustment): ditto (gtk_tree_view_set_headers_visible): canonicalize the bool, for paranoia (gtk_tree_view_set_headers_visible): call gtk_tree_view_map_buttons() instead of using cut-and-paste code (gtk_tree_view_append_column): clarify whether the return value is the count of columns before or after, and do the increment separately from the return statement so you can tell from the code. (gtk_tree_view_remove_column): ditto (gtk_tree_view_insert_column): ditto (gtk_tree_view_get_column): remove g_return_if_fail for columns outside the existing range, the docs say that outside-range columns are allowed, so we handle them as documented. (Presumably this allows a nice loop with column != NULL as test.) (gtk_tree_view_move_to): document what 0.0, 0.5, 1.0 alignments mean (left/right/center etc.). (gtk_tree_view_collapse_all): only queue a draw if we're mapped (gtk_tree_view_expand_row): add docs (gtk_tree_view_collapse_row): add docs * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_clicked): new function to emit the clicked signal on a column * gdk/gdkevents.c (gdk_event_get_state): new function, to get the state of an event (gdk_event_get_time): don't treat GDK_SCROLL as a button event, remove default case from switch so gcc will whine if we don't explicitly handle all event types * gtk/gtktreeselection.h: added some FIXME * gtk/gtktreeprivate.h (struct _GtkTreeViewPrivate): rename "columns" to "n_columns" and "column" to "columns" for clarity
2000-12-17 23:50:00 +00:00
/**
* gdk_event_get_state:
* @event: a #GdkEvent or NULL
* @state: return location for state
*
* If the event contains a "state" field, puts that field in @state. Otherwise
* stores an empty state (0). Returns %TRUE if there was a state field
* in the event. @event may be %NULL, in which case it's treated
* as if the event had no state field.
Port to GObject, can go back in gdk-pixbuf after setting up a 2000-12-16 Havoc Pennington <hp@pobox.com> * gtk/gdk-pixbuf-loader.h, gtk/gdk-pixbuf-loader.c: Port to GObject, can go back in gdk-pixbuf after setting up a gdk-pixbuf-marshal.h header over there. * gtk/gtktreeview.c: s/SEPERATOR/SEPARATOR/g; (gtk_tree_view_class_init): specify GTK_TYPE_ADJUSTMENT for signal args (gtk_tree_view_init): don't unset GTK_NO_WINDOW, it shouldn't be set (gtk_tree_view_realize_buttons): don't gtk_widget_show() buttons here, do it when we create the buttons later (gtk_tree_view_realize_buttons): add some g_return_if_fail (gtk_tree_view_map): paranoia checks that column->button is shown and unmapped (gtk_tree_view_size_request): only request visible children. Move header size calculation in here, for cleanliness, and to maintain invariants for child widgets if we eventually let users set different children inside the buttons (gtk_tree_view_map_buttons): factor out code to map buttons, since it was being called several times (gtk_tree_view_size_allocate_buttons): move_resize the drag windows instead of just moving them; their height may change if we allow random widgets in there, or the theme changes. (gtk_tree_view_size_allocate): move button size allocation above emitting the scroll signals, to ensure a sane state when we hit user code (gtk_tree_view_button_release): remove queue_resize after tree_view_set_size(), set_size() will handle any resize queuing that's needed (gtk_tree_view_focus_in): just queue a draw, don't fool with draw_focus goo (gtk_tree_view_focus): use gtk_get_current_event() and gdk_event_get_state() (gtk_tree_view_deleted): don't queue_resize() after calling set_size() (gtk_tree_view_build_tree): fix a "if (foo); {}" bug - i.e. remove semicolon (gtk_tree_view_create_button): show the button here (gtk_tree_view_button_clicked): actually emit the clicked signal on the column (_gtk_tree_view_set_size): return right away if the size is unchanged, as a cheesy optimization (gtk_tree_view_setup_model): rename set_model_realized to setup_model to match the flag that indicates whether we've called it (gtk_tree_view_get_hadjustment): create adjustment if it doesn't exist, because set_scroll_adjustment does that and it shouldn't matter what order you call these in (gtk_tree_view_get_vadjustment): ditto (gtk_tree_view_set_headers_visible): canonicalize the bool, for paranoia (gtk_tree_view_set_headers_visible): call gtk_tree_view_map_buttons() instead of using cut-and-paste code (gtk_tree_view_append_column): clarify whether the return value is the count of columns before or after, and do the increment separately from the return statement so you can tell from the code. (gtk_tree_view_remove_column): ditto (gtk_tree_view_insert_column): ditto (gtk_tree_view_get_column): remove g_return_if_fail for columns outside the existing range, the docs say that outside-range columns are allowed, so we handle them as documented. (Presumably this allows a nice loop with column != NULL as test.) (gtk_tree_view_move_to): document what 0.0, 0.5, 1.0 alignments mean (left/right/center etc.). (gtk_tree_view_collapse_all): only queue a draw if we're mapped (gtk_tree_view_expand_row): add docs (gtk_tree_view_collapse_row): add docs * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_clicked): new function to emit the clicked signal on a column * gdk/gdkevents.c (gdk_event_get_state): new function, to get the state of an event (gdk_event_get_time): don't treat GDK_SCROLL as a button event, remove default case from switch so gcc will whine if we don't explicitly handle all event types * gtk/gtktreeselection.h: added some FIXME * gtk/gtktreeprivate.h (struct _GtkTreeViewPrivate): rename "columns" to "n_columns" and "column" to "columns" for clarity
2000-12-17 23:50:00 +00:00
*
* Return value: %TRUE if there was a state field in the event
**/
gboolean
gdk_event_get_state (GdkEvent *event,
GdkModifierType *state)
{
g_return_val_if_fail (state != NULL, FALSE);
Port to GObject, can go back in gdk-pixbuf after setting up a 2000-12-16 Havoc Pennington <hp@pobox.com> * gtk/gdk-pixbuf-loader.h, gtk/gdk-pixbuf-loader.c: Port to GObject, can go back in gdk-pixbuf after setting up a gdk-pixbuf-marshal.h header over there. * gtk/gtktreeview.c: s/SEPERATOR/SEPARATOR/g; (gtk_tree_view_class_init): specify GTK_TYPE_ADJUSTMENT for signal args (gtk_tree_view_init): don't unset GTK_NO_WINDOW, it shouldn't be set (gtk_tree_view_realize_buttons): don't gtk_widget_show() buttons here, do it when we create the buttons later (gtk_tree_view_realize_buttons): add some g_return_if_fail (gtk_tree_view_map): paranoia checks that column->button is shown and unmapped (gtk_tree_view_size_request): only request visible children. Move header size calculation in here, for cleanliness, and to maintain invariants for child widgets if we eventually let users set different children inside the buttons (gtk_tree_view_map_buttons): factor out code to map buttons, since it was being called several times (gtk_tree_view_size_allocate_buttons): move_resize the drag windows instead of just moving them; their height may change if we allow random widgets in there, or the theme changes. (gtk_tree_view_size_allocate): move button size allocation above emitting the scroll signals, to ensure a sane state when we hit user code (gtk_tree_view_button_release): remove queue_resize after tree_view_set_size(), set_size() will handle any resize queuing that's needed (gtk_tree_view_focus_in): just queue a draw, don't fool with draw_focus goo (gtk_tree_view_focus): use gtk_get_current_event() and gdk_event_get_state() (gtk_tree_view_deleted): don't queue_resize() after calling set_size() (gtk_tree_view_build_tree): fix a "if (foo); {}" bug - i.e. remove semicolon (gtk_tree_view_create_button): show the button here (gtk_tree_view_button_clicked): actually emit the clicked signal on the column (_gtk_tree_view_set_size): return right away if the size is unchanged, as a cheesy optimization (gtk_tree_view_setup_model): rename set_model_realized to setup_model to match the flag that indicates whether we've called it (gtk_tree_view_get_hadjustment): create adjustment if it doesn't exist, because set_scroll_adjustment does that and it shouldn't matter what order you call these in (gtk_tree_view_get_vadjustment): ditto (gtk_tree_view_set_headers_visible): canonicalize the bool, for paranoia (gtk_tree_view_set_headers_visible): call gtk_tree_view_map_buttons() instead of using cut-and-paste code (gtk_tree_view_append_column): clarify whether the return value is the count of columns before or after, and do the increment separately from the return statement so you can tell from the code. (gtk_tree_view_remove_column): ditto (gtk_tree_view_insert_column): ditto (gtk_tree_view_get_column): remove g_return_if_fail for columns outside the existing range, the docs say that outside-range columns are allowed, so we handle them as documented. (Presumably this allows a nice loop with column != NULL as test.) (gtk_tree_view_move_to): document what 0.0, 0.5, 1.0 alignments mean (left/right/center etc.). (gtk_tree_view_collapse_all): only queue a draw if we're mapped (gtk_tree_view_expand_row): add docs (gtk_tree_view_collapse_row): add docs * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_clicked): new function to emit the clicked signal on a column * gdk/gdkevents.c (gdk_event_get_state): new function, to get the state of an event (gdk_event_get_time): don't treat GDK_SCROLL as a button event, remove default case from switch so gcc will whine if we don't explicitly handle all event types * gtk/gtktreeselection.h: added some FIXME * gtk/gtktreeprivate.h (struct _GtkTreeViewPrivate): rename "columns" to "n_columns" and "column" to "columns" for clarity
2000-12-17 23:50:00 +00:00
if (event)
switch (event->type)
{
case GDK_MOTION_NOTIFY:
*state = event->motion.state;
return TRUE;
Port to GObject, can go back in gdk-pixbuf after setting up a 2000-12-16 Havoc Pennington <hp@pobox.com> * gtk/gdk-pixbuf-loader.h, gtk/gdk-pixbuf-loader.c: Port to GObject, can go back in gdk-pixbuf after setting up a gdk-pixbuf-marshal.h header over there. * gtk/gtktreeview.c: s/SEPERATOR/SEPARATOR/g; (gtk_tree_view_class_init): specify GTK_TYPE_ADJUSTMENT for signal args (gtk_tree_view_init): don't unset GTK_NO_WINDOW, it shouldn't be set (gtk_tree_view_realize_buttons): don't gtk_widget_show() buttons here, do it when we create the buttons later (gtk_tree_view_realize_buttons): add some g_return_if_fail (gtk_tree_view_map): paranoia checks that column->button is shown and unmapped (gtk_tree_view_size_request): only request visible children. Move header size calculation in here, for cleanliness, and to maintain invariants for child widgets if we eventually let users set different children inside the buttons (gtk_tree_view_map_buttons): factor out code to map buttons, since it was being called several times (gtk_tree_view_size_allocate_buttons): move_resize the drag windows instead of just moving them; their height may change if we allow random widgets in there, or the theme changes. (gtk_tree_view_size_allocate): move button size allocation above emitting the scroll signals, to ensure a sane state when we hit user code (gtk_tree_view_button_release): remove queue_resize after tree_view_set_size(), set_size() will handle any resize queuing that's needed (gtk_tree_view_focus_in): just queue a draw, don't fool with draw_focus goo (gtk_tree_view_focus): use gtk_get_current_event() and gdk_event_get_state() (gtk_tree_view_deleted): don't queue_resize() after calling set_size() (gtk_tree_view_build_tree): fix a "if (foo); {}" bug - i.e. remove semicolon (gtk_tree_view_create_button): show the button here (gtk_tree_view_button_clicked): actually emit the clicked signal on the column (_gtk_tree_view_set_size): return right away if the size is unchanged, as a cheesy optimization (gtk_tree_view_setup_model): rename set_model_realized to setup_model to match the flag that indicates whether we've called it (gtk_tree_view_get_hadjustment): create adjustment if it doesn't exist, because set_scroll_adjustment does that and it shouldn't matter what order you call these in (gtk_tree_view_get_vadjustment): ditto (gtk_tree_view_set_headers_visible): canonicalize the bool, for paranoia (gtk_tree_view_set_headers_visible): call gtk_tree_view_map_buttons() instead of using cut-and-paste code (gtk_tree_view_append_column): clarify whether the return value is the count of columns before or after, and do the increment separately from the return statement so you can tell from the code. (gtk_tree_view_remove_column): ditto (gtk_tree_view_insert_column): ditto (gtk_tree_view_get_column): remove g_return_if_fail for columns outside the existing range, the docs say that outside-range columns are allowed, so we handle them as documented. (Presumably this allows a nice loop with column != NULL as test.) (gtk_tree_view_move_to): document what 0.0, 0.5, 1.0 alignments mean (left/right/center etc.). (gtk_tree_view_collapse_all): only queue a draw if we're mapped (gtk_tree_view_expand_row): add docs (gtk_tree_view_collapse_row): add docs * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_clicked): new function to emit the clicked signal on a column * gdk/gdkevents.c (gdk_event_get_state): new function, to get the state of an event (gdk_event_get_time): don't treat GDK_SCROLL as a button event, remove default case from switch so gcc will whine if we don't explicitly handle all event types * gtk/gtktreeselection.h: added some FIXME * gtk/gtktreeprivate.h (struct _GtkTreeViewPrivate): rename "columns" to "n_columns" and "column" to "columns" for clarity
2000-12-17 23:50:00 +00:00
case GDK_BUTTON_PRESS:
case GDK_2BUTTON_PRESS:
case GDK_3BUTTON_PRESS:
case GDK_BUTTON_RELEASE:
*state = event->button.state;
return TRUE;
Port to GObject, can go back in gdk-pixbuf after setting up a 2000-12-16 Havoc Pennington <hp@pobox.com> * gtk/gdk-pixbuf-loader.h, gtk/gdk-pixbuf-loader.c: Port to GObject, can go back in gdk-pixbuf after setting up a gdk-pixbuf-marshal.h header over there. * gtk/gtktreeview.c: s/SEPERATOR/SEPARATOR/g; (gtk_tree_view_class_init): specify GTK_TYPE_ADJUSTMENT for signal args (gtk_tree_view_init): don't unset GTK_NO_WINDOW, it shouldn't be set (gtk_tree_view_realize_buttons): don't gtk_widget_show() buttons here, do it when we create the buttons later (gtk_tree_view_realize_buttons): add some g_return_if_fail (gtk_tree_view_map): paranoia checks that column->button is shown and unmapped (gtk_tree_view_size_request): only request visible children. Move header size calculation in here, for cleanliness, and to maintain invariants for child widgets if we eventually let users set different children inside the buttons (gtk_tree_view_map_buttons): factor out code to map buttons, since it was being called several times (gtk_tree_view_size_allocate_buttons): move_resize the drag windows instead of just moving them; their height may change if we allow random widgets in there, or the theme changes. (gtk_tree_view_size_allocate): move button size allocation above emitting the scroll signals, to ensure a sane state when we hit user code (gtk_tree_view_button_release): remove queue_resize after tree_view_set_size(), set_size() will handle any resize queuing that's needed (gtk_tree_view_focus_in): just queue a draw, don't fool with draw_focus goo (gtk_tree_view_focus): use gtk_get_current_event() and gdk_event_get_state() (gtk_tree_view_deleted): don't queue_resize() after calling set_size() (gtk_tree_view_build_tree): fix a "if (foo); {}" bug - i.e. remove semicolon (gtk_tree_view_create_button): show the button here (gtk_tree_view_button_clicked): actually emit the clicked signal on the column (_gtk_tree_view_set_size): return right away if the size is unchanged, as a cheesy optimization (gtk_tree_view_setup_model): rename set_model_realized to setup_model to match the flag that indicates whether we've called it (gtk_tree_view_get_hadjustment): create adjustment if it doesn't exist, because set_scroll_adjustment does that and it shouldn't matter what order you call these in (gtk_tree_view_get_vadjustment): ditto (gtk_tree_view_set_headers_visible): canonicalize the bool, for paranoia (gtk_tree_view_set_headers_visible): call gtk_tree_view_map_buttons() instead of using cut-and-paste code (gtk_tree_view_append_column): clarify whether the return value is the count of columns before or after, and do the increment separately from the return statement so you can tell from the code. (gtk_tree_view_remove_column): ditto (gtk_tree_view_insert_column): ditto (gtk_tree_view_get_column): remove g_return_if_fail for columns outside the existing range, the docs say that outside-range columns are allowed, so we handle them as documented. (Presumably this allows a nice loop with column != NULL as test.) (gtk_tree_view_move_to): document what 0.0, 0.5, 1.0 alignments mean (left/right/center etc.). (gtk_tree_view_collapse_all): only queue a draw if we're mapped (gtk_tree_view_expand_row): add docs (gtk_tree_view_collapse_row): add docs * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_clicked): new function to emit the clicked signal on a column * gdk/gdkevents.c (gdk_event_get_state): new function, to get the state of an event (gdk_event_get_time): don't treat GDK_SCROLL as a button event, remove default case from switch so gcc will whine if we don't explicitly handle all event types * gtk/gtktreeselection.h: added some FIXME * gtk/gtktreeprivate.h (struct _GtkTreeViewPrivate): rename "columns" to "n_columns" and "column" to "columns" for clarity
2000-12-17 23:50:00 +00:00
case GDK_SCROLL:
*state = event->scroll.state;
return TRUE;
Port to GObject, can go back in gdk-pixbuf after setting up a 2000-12-16 Havoc Pennington <hp@pobox.com> * gtk/gdk-pixbuf-loader.h, gtk/gdk-pixbuf-loader.c: Port to GObject, can go back in gdk-pixbuf after setting up a gdk-pixbuf-marshal.h header over there. * gtk/gtktreeview.c: s/SEPERATOR/SEPARATOR/g; (gtk_tree_view_class_init): specify GTK_TYPE_ADJUSTMENT for signal args (gtk_tree_view_init): don't unset GTK_NO_WINDOW, it shouldn't be set (gtk_tree_view_realize_buttons): don't gtk_widget_show() buttons here, do it when we create the buttons later (gtk_tree_view_realize_buttons): add some g_return_if_fail (gtk_tree_view_map): paranoia checks that column->button is shown and unmapped (gtk_tree_view_size_request): only request visible children. Move header size calculation in here, for cleanliness, and to maintain invariants for child widgets if we eventually let users set different children inside the buttons (gtk_tree_view_map_buttons): factor out code to map buttons, since it was being called several times (gtk_tree_view_size_allocate_buttons): move_resize the drag windows instead of just moving them; their height may change if we allow random widgets in there, or the theme changes. (gtk_tree_view_size_allocate): move button size allocation above emitting the scroll signals, to ensure a sane state when we hit user code (gtk_tree_view_button_release): remove queue_resize after tree_view_set_size(), set_size() will handle any resize queuing that's needed (gtk_tree_view_focus_in): just queue a draw, don't fool with draw_focus goo (gtk_tree_view_focus): use gtk_get_current_event() and gdk_event_get_state() (gtk_tree_view_deleted): don't queue_resize() after calling set_size() (gtk_tree_view_build_tree): fix a "if (foo); {}" bug - i.e. remove semicolon (gtk_tree_view_create_button): show the button here (gtk_tree_view_button_clicked): actually emit the clicked signal on the column (_gtk_tree_view_set_size): return right away if the size is unchanged, as a cheesy optimization (gtk_tree_view_setup_model): rename set_model_realized to setup_model to match the flag that indicates whether we've called it (gtk_tree_view_get_hadjustment): create adjustment if it doesn't exist, because set_scroll_adjustment does that and it shouldn't matter what order you call these in (gtk_tree_view_get_vadjustment): ditto (gtk_tree_view_set_headers_visible): canonicalize the bool, for paranoia (gtk_tree_view_set_headers_visible): call gtk_tree_view_map_buttons() instead of using cut-and-paste code (gtk_tree_view_append_column): clarify whether the return value is the count of columns before or after, and do the increment separately from the return statement so you can tell from the code. (gtk_tree_view_remove_column): ditto (gtk_tree_view_insert_column): ditto (gtk_tree_view_get_column): remove g_return_if_fail for columns outside the existing range, the docs say that outside-range columns are allowed, so we handle them as documented. (Presumably this allows a nice loop with column != NULL as test.) (gtk_tree_view_move_to): document what 0.0, 0.5, 1.0 alignments mean (left/right/center etc.). (gtk_tree_view_collapse_all): only queue a draw if we're mapped (gtk_tree_view_expand_row): add docs (gtk_tree_view_collapse_row): add docs * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_clicked): new function to emit the clicked signal on a column * gdk/gdkevents.c (gdk_event_get_state): new function, to get the state of an event (gdk_event_get_time): don't treat GDK_SCROLL as a button event, remove default case from switch so gcc will whine if we don't explicitly handle all event types * gtk/gtktreeselection.h: added some FIXME * gtk/gtktreeprivate.h (struct _GtkTreeViewPrivate): rename "columns" to "n_columns" and "column" to "columns" for clarity
2000-12-17 23:50:00 +00:00
case GDK_KEY_PRESS:
case GDK_KEY_RELEASE:
*state = event->key.state;
return TRUE;
Port to GObject, can go back in gdk-pixbuf after setting up a 2000-12-16 Havoc Pennington <hp@pobox.com> * gtk/gdk-pixbuf-loader.h, gtk/gdk-pixbuf-loader.c: Port to GObject, can go back in gdk-pixbuf after setting up a gdk-pixbuf-marshal.h header over there. * gtk/gtktreeview.c: s/SEPERATOR/SEPARATOR/g; (gtk_tree_view_class_init): specify GTK_TYPE_ADJUSTMENT for signal args (gtk_tree_view_init): don't unset GTK_NO_WINDOW, it shouldn't be set (gtk_tree_view_realize_buttons): don't gtk_widget_show() buttons here, do it when we create the buttons later (gtk_tree_view_realize_buttons): add some g_return_if_fail (gtk_tree_view_map): paranoia checks that column->button is shown and unmapped (gtk_tree_view_size_request): only request visible children. Move header size calculation in here, for cleanliness, and to maintain invariants for child widgets if we eventually let users set different children inside the buttons (gtk_tree_view_map_buttons): factor out code to map buttons, since it was being called several times (gtk_tree_view_size_allocate_buttons): move_resize the drag windows instead of just moving them; their height may change if we allow random widgets in there, or the theme changes. (gtk_tree_view_size_allocate): move button size allocation above emitting the scroll signals, to ensure a sane state when we hit user code (gtk_tree_view_button_release): remove queue_resize after tree_view_set_size(), set_size() will handle any resize queuing that's needed (gtk_tree_view_focus_in): just queue a draw, don't fool with draw_focus goo (gtk_tree_view_focus): use gtk_get_current_event() and gdk_event_get_state() (gtk_tree_view_deleted): don't queue_resize() after calling set_size() (gtk_tree_view_build_tree): fix a "if (foo); {}" bug - i.e. remove semicolon (gtk_tree_view_create_button): show the button here (gtk_tree_view_button_clicked): actually emit the clicked signal on the column (_gtk_tree_view_set_size): return right away if the size is unchanged, as a cheesy optimization (gtk_tree_view_setup_model): rename set_model_realized to setup_model to match the flag that indicates whether we've called it (gtk_tree_view_get_hadjustment): create adjustment if it doesn't exist, because set_scroll_adjustment does that and it shouldn't matter what order you call these in (gtk_tree_view_get_vadjustment): ditto (gtk_tree_view_set_headers_visible): canonicalize the bool, for paranoia (gtk_tree_view_set_headers_visible): call gtk_tree_view_map_buttons() instead of using cut-and-paste code (gtk_tree_view_append_column): clarify whether the return value is the count of columns before or after, and do the increment separately from the return statement so you can tell from the code. (gtk_tree_view_remove_column): ditto (gtk_tree_view_insert_column): ditto (gtk_tree_view_get_column): remove g_return_if_fail for columns outside the existing range, the docs say that outside-range columns are allowed, so we handle them as documented. (Presumably this allows a nice loop with column != NULL as test.) (gtk_tree_view_move_to): document what 0.0, 0.5, 1.0 alignments mean (left/right/center etc.). (gtk_tree_view_collapse_all): only queue a draw if we're mapped (gtk_tree_view_expand_row): add docs (gtk_tree_view_collapse_row): add docs * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_clicked): new function to emit the clicked signal on a column * gdk/gdkevents.c (gdk_event_get_state): new function, to get the state of an event (gdk_event_get_time): don't treat GDK_SCROLL as a button event, remove default case from switch so gcc will whine if we don't explicitly handle all event types * gtk/gtktreeselection.h: added some FIXME * gtk/gtktreeprivate.h (struct _GtkTreeViewPrivate): rename "columns" to "n_columns" and "column" to "columns" for clarity
2000-12-17 23:50:00 +00:00
case GDK_ENTER_NOTIFY:
case GDK_LEAVE_NOTIFY:
*state = event->crossing.state;
return TRUE;
Port to GObject, can go back in gdk-pixbuf after setting up a 2000-12-16 Havoc Pennington <hp@pobox.com> * gtk/gdk-pixbuf-loader.h, gtk/gdk-pixbuf-loader.c: Port to GObject, can go back in gdk-pixbuf after setting up a gdk-pixbuf-marshal.h header over there. * gtk/gtktreeview.c: s/SEPERATOR/SEPARATOR/g; (gtk_tree_view_class_init): specify GTK_TYPE_ADJUSTMENT for signal args (gtk_tree_view_init): don't unset GTK_NO_WINDOW, it shouldn't be set (gtk_tree_view_realize_buttons): don't gtk_widget_show() buttons here, do it when we create the buttons later (gtk_tree_view_realize_buttons): add some g_return_if_fail (gtk_tree_view_map): paranoia checks that column->button is shown and unmapped (gtk_tree_view_size_request): only request visible children. Move header size calculation in here, for cleanliness, and to maintain invariants for child widgets if we eventually let users set different children inside the buttons (gtk_tree_view_map_buttons): factor out code to map buttons, since it was being called several times (gtk_tree_view_size_allocate_buttons): move_resize the drag windows instead of just moving them; their height may change if we allow random widgets in there, or the theme changes. (gtk_tree_view_size_allocate): move button size allocation above emitting the scroll signals, to ensure a sane state when we hit user code (gtk_tree_view_button_release): remove queue_resize after tree_view_set_size(), set_size() will handle any resize queuing that's needed (gtk_tree_view_focus_in): just queue a draw, don't fool with draw_focus goo (gtk_tree_view_focus): use gtk_get_current_event() and gdk_event_get_state() (gtk_tree_view_deleted): don't queue_resize() after calling set_size() (gtk_tree_view_build_tree): fix a "if (foo); {}" bug - i.e. remove semicolon (gtk_tree_view_create_button): show the button here (gtk_tree_view_button_clicked): actually emit the clicked signal on the column (_gtk_tree_view_set_size): return right away if the size is unchanged, as a cheesy optimization (gtk_tree_view_setup_model): rename set_model_realized to setup_model to match the flag that indicates whether we've called it (gtk_tree_view_get_hadjustment): create adjustment if it doesn't exist, because set_scroll_adjustment does that and it shouldn't matter what order you call these in (gtk_tree_view_get_vadjustment): ditto (gtk_tree_view_set_headers_visible): canonicalize the bool, for paranoia (gtk_tree_view_set_headers_visible): call gtk_tree_view_map_buttons() instead of using cut-and-paste code (gtk_tree_view_append_column): clarify whether the return value is the count of columns before or after, and do the increment separately from the return statement so you can tell from the code. (gtk_tree_view_remove_column): ditto (gtk_tree_view_insert_column): ditto (gtk_tree_view_get_column): remove g_return_if_fail for columns outside the existing range, the docs say that outside-range columns are allowed, so we handle them as documented. (Presumably this allows a nice loop with column != NULL as test.) (gtk_tree_view_move_to): document what 0.0, 0.5, 1.0 alignments mean (left/right/center etc.). (gtk_tree_view_collapse_all): only queue a draw if we're mapped (gtk_tree_view_expand_row): add docs (gtk_tree_view_collapse_row): add docs * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_clicked): new function to emit the clicked signal on a column * gdk/gdkevents.c (gdk_event_get_state): new function, to get the state of an event (gdk_event_get_time): don't treat GDK_SCROLL as a button event, remove default case from switch so gcc will whine if we don't explicitly handle all event types * gtk/gtktreeselection.h: added some FIXME * gtk/gtktreeprivate.h (struct _GtkTreeViewPrivate): rename "columns" to "n_columns" and "column" to "columns" for clarity
2000-12-17 23:50:00 +00:00
case GDK_PROPERTY_NOTIFY:
*state = event->property.state;
return TRUE;
Port to GObject, can go back in gdk-pixbuf after setting up a 2000-12-16 Havoc Pennington <hp@pobox.com> * gtk/gdk-pixbuf-loader.h, gtk/gdk-pixbuf-loader.c: Port to GObject, can go back in gdk-pixbuf after setting up a gdk-pixbuf-marshal.h header over there. * gtk/gtktreeview.c: s/SEPERATOR/SEPARATOR/g; (gtk_tree_view_class_init): specify GTK_TYPE_ADJUSTMENT for signal args (gtk_tree_view_init): don't unset GTK_NO_WINDOW, it shouldn't be set (gtk_tree_view_realize_buttons): don't gtk_widget_show() buttons here, do it when we create the buttons later (gtk_tree_view_realize_buttons): add some g_return_if_fail (gtk_tree_view_map): paranoia checks that column->button is shown and unmapped (gtk_tree_view_size_request): only request visible children. Move header size calculation in here, for cleanliness, and to maintain invariants for child widgets if we eventually let users set different children inside the buttons (gtk_tree_view_map_buttons): factor out code to map buttons, since it was being called several times (gtk_tree_view_size_allocate_buttons): move_resize the drag windows instead of just moving them; their height may change if we allow random widgets in there, or the theme changes. (gtk_tree_view_size_allocate): move button size allocation above emitting the scroll signals, to ensure a sane state when we hit user code (gtk_tree_view_button_release): remove queue_resize after tree_view_set_size(), set_size() will handle any resize queuing that's needed (gtk_tree_view_focus_in): just queue a draw, don't fool with draw_focus goo (gtk_tree_view_focus): use gtk_get_current_event() and gdk_event_get_state() (gtk_tree_view_deleted): don't queue_resize() after calling set_size() (gtk_tree_view_build_tree): fix a "if (foo); {}" bug - i.e. remove semicolon (gtk_tree_view_create_button): show the button here (gtk_tree_view_button_clicked): actually emit the clicked signal on the column (_gtk_tree_view_set_size): return right away if the size is unchanged, as a cheesy optimization (gtk_tree_view_setup_model): rename set_model_realized to setup_model to match the flag that indicates whether we've called it (gtk_tree_view_get_hadjustment): create adjustment if it doesn't exist, because set_scroll_adjustment does that and it shouldn't matter what order you call these in (gtk_tree_view_get_vadjustment): ditto (gtk_tree_view_set_headers_visible): canonicalize the bool, for paranoia (gtk_tree_view_set_headers_visible): call gtk_tree_view_map_buttons() instead of using cut-and-paste code (gtk_tree_view_append_column): clarify whether the return value is the count of columns before or after, and do the increment separately from the return statement so you can tell from the code. (gtk_tree_view_remove_column): ditto (gtk_tree_view_insert_column): ditto (gtk_tree_view_get_column): remove g_return_if_fail for columns outside the existing range, the docs say that outside-range columns are allowed, so we handle them as documented. (Presumably this allows a nice loop with column != NULL as test.) (gtk_tree_view_move_to): document what 0.0, 0.5, 1.0 alignments mean (left/right/center etc.). (gtk_tree_view_collapse_all): only queue a draw if we're mapped (gtk_tree_view_expand_row): add docs (gtk_tree_view_collapse_row): add docs * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_clicked): new function to emit the clicked signal on a column * gdk/gdkevents.c (gdk_event_get_state): new function, to get the state of an event (gdk_event_get_time): don't treat GDK_SCROLL as a button event, remove default case from switch so gcc will whine if we don't explicitly handle all event types * gtk/gtktreeselection.h: added some FIXME * gtk/gtktreeprivate.h (struct _GtkTreeViewPrivate): rename "columns" to "n_columns" and "column" to "columns" for clarity
2000-12-17 23:50:00 +00:00
case GDK_VISIBILITY_NOTIFY:
case GDK_CLIENT_EVENT:
case GDK_NO_EXPOSE:
case GDK_CONFIGURE:
case GDK_FOCUS_CHANGE:
case GDK_SELECTION_CLEAR:
case GDK_SELECTION_REQUEST:
case GDK_SELECTION_NOTIFY:
case GDK_PROXIMITY_IN:
case GDK_PROXIMITY_OUT:
case GDK_DRAG_ENTER:
case GDK_DRAG_LEAVE:
case GDK_DRAG_MOTION:
case GDK_DRAG_STATUS:
case GDK_DROP_START:
case GDK_DROP_FINISHED:
case GDK_NOTHING:
case GDK_DELETE:
case GDK_DESTROY:
case GDK_EXPOSE:
case GDK_MAP:
case GDK_UNMAP:
test the window state stuff 2001-02-26 Havoc Pennington <hp@redhat.com> * gtk/testgtk.c: test the window state stuff * gtk/gtkwindow.c (gtk_window_present): new function, makes a window come to the user's attention as if it were just created (gtk_window_iconify): new function (gtk_window_deiconify): new function (gtk_window_stick): new function (gtk_window_unstick): new function (gtk_window_maximize): new function (gtk_window_unmaximize): new function * gtk/gtkwidget.h, gtk/gtkwidget.c: add window_state_event signal * gtk/gtkmain.c (gtk_main_do_event): handle GDK_WINDOW_STATE * gdk/x11/gdkevents-x11.c: create window state events when appropriate (gdk_wmspec_supported): new function * gdk/x11/gdkwindow-x11.c (gdk_window_iconify): handle iconification before showing the window (gdk_window_deiconify): new function (gdk_window_stick): new function (gdk_window_unstick): new function (gdk_window_maximize): new function (gdk_window_unmaximize): new function * gdk/gdkwindow.c: store the window state in the window; change to using the GDK_WINDOW_STATE_WITHDRAWN flag instead of window->mapped. (gdk_window_get_state): return the current window state * gdk/gdkevents.c (gdk_event_get_time): handle GDK_WINDOW_STATE (gdk_event_get_state): handle GDK_WINDOW_STATE (gdk_synthesize_window_state): function to create the window state events * gdk/gdkevents.h (struct _GdkEventWindowState): new type of event, for changes to "window state" such as maximized, sticky, etc. * gdk/x11/gdkwindow-x11.c (gdk_window_focus): new function, focuses a window * gdk/x11/gdkmain-x11.c (_gdk_wmspec_supported): new function, finds out if we support a given WM spec hint
2001-02-27 20:40:15 +00:00
case GDK_WINDOW_STATE:
case GDK_SETTING:
Port to GObject, can go back in gdk-pixbuf after setting up a 2000-12-16 Havoc Pennington <hp@pobox.com> * gtk/gdk-pixbuf-loader.h, gtk/gdk-pixbuf-loader.c: Port to GObject, can go back in gdk-pixbuf after setting up a gdk-pixbuf-marshal.h header over there. * gtk/gtktreeview.c: s/SEPERATOR/SEPARATOR/g; (gtk_tree_view_class_init): specify GTK_TYPE_ADJUSTMENT for signal args (gtk_tree_view_init): don't unset GTK_NO_WINDOW, it shouldn't be set (gtk_tree_view_realize_buttons): don't gtk_widget_show() buttons here, do it when we create the buttons later (gtk_tree_view_realize_buttons): add some g_return_if_fail (gtk_tree_view_map): paranoia checks that column->button is shown and unmapped (gtk_tree_view_size_request): only request visible children. Move header size calculation in here, for cleanliness, and to maintain invariants for child widgets if we eventually let users set different children inside the buttons (gtk_tree_view_map_buttons): factor out code to map buttons, since it was being called several times (gtk_tree_view_size_allocate_buttons): move_resize the drag windows instead of just moving them; their height may change if we allow random widgets in there, or the theme changes. (gtk_tree_view_size_allocate): move button size allocation above emitting the scroll signals, to ensure a sane state when we hit user code (gtk_tree_view_button_release): remove queue_resize after tree_view_set_size(), set_size() will handle any resize queuing that's needed (gtk_tree_view_focus_in): just queue a draw, don't fool with draw_focus goo (gtk_tree_view_focus): use gtk_get_current_event() and gdk_event_get_state() (gtk_tree_view_deleted): don't queue_resize() after calling set_size() (gtk_tree_view_build_tree): fix a "if (foo); {}" bug - i.e. remove semicolon (gtk_tree_view_create_button): show the button here (gtk_tree_view_button_clicked): actually emit the clicked signal on the column (_gtk_tree_view_set_size): return right away if the size is unchanged, as a cheesy optimization (gtk_tree_view_setup_model): rename set_model_realized to setup_model to match the flag that indicates whether we've called it (gtk_tree_view_get_hadjustment): create adjustment if it doesn't exist, because set_scroll_adjustment does that and it shouldn't matter what order you call these in (gtk_tree_view_get_vadjustment): ditto (gtk_tree_view_set_headers_visible): canonicalize the bool, for paranoia (gtk_tree_view_set_headers_visible): call gtk_tree_view_map_buttons() instead of using cut-and-paste code (gtk_tree_view_append_column): clarify whether the return value is the count of columns before or after, and do the increment separately from the return statement so you can tell from the code. (gtk_tree_view_remove_column): ditto (gtk_tree_view_insert_column): ditto (gtk_tree_view_get_column): remove g_return_if_fail for columns outside the existing range, the docs say that outside-range columns are allowed, so we handle them as documented. (Presumably this allows a nice loop with column != NULL as test.) (gtk_tree_view_move_to): document what 0.0, 0.5, 1.0 alignments mean (left/right/center etc.). (gtk_tree_view_collapse_all): only queue a draw if we're mapped (gtk_tree_view_expand_row): add docs (gtk_tree_view_collapse_row): add docs * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_clicked): new function to emit the clicked signal on a column * gdk/gdkevents.c (gdk_event_get_state): new function, to get the state of an event (gdk_event_get_time): don't treat GDK_SCROLL as a button event, remove default case from switch so gcc will whine if we don't explicitly handle all event types * gtk/gtktreeselection.h: added some FIXME * gtk/gtktreeprivate.h (struct _GtkTreeViewPrivate): rename "columns" to "n_columns" and "column" to "columns" for clarity
2000-12-17 23:50:00 +00:00
/* no state field */
break;
}
*state = 0;
return FALSE;
Port to GObject, can go back in gdk-pixbuf after setting up a 2000-12-16 Havoc Pennington <hp@pobox.com> * gtk/gdk-pixbuf-loader.h, gtk/gdk-pixbuf-loader.c: Port to GObject, can go back in gdk-pixbuf after setting up a gdk-pixbuf-marshal.h header over there. * gtk/gtktreeview.c: s/SEPERATOR/SEPARATOR/g; (gtk_tree_view_class_init): specify GTK_TYPE_ADJUSTMENT for signal args (gtk_tree_view_init): don't unset GTK_NO_WINDOW, it shouldn't be set (gtk_tree_view_realize_buttons): don't gtk_widget_show() buttons here, do it when we create the buttons later (gtk_tree_view_realize_buttons): add some g_return_if_fail (gtk_tree_view_map): paranoia checks that column->button is shown and unmapped (gtk_tree_view_size_request): only request visible children. Move header size calculation in here, for cleanliness, and to maintain invariants for child widgets if we eventually let users set different children inside the buttons (gtk_tree_view_map_buttons): factor out code to map buttons, since it was being called several times (gtk_tree_view_size_allocate_buttons): move_resize the drag windows instead of just moving them; their height may change if we allow random widgets in there, or the theme changes. (gtk_tree_view_size_allocate): move button size allocation above emitting the scroll signals, to ensure a sane state when we hit user code (gtk_tree_view_button_release): remove queue_resize after tree_view_set_size(), set_size() will handle any resize queuing that's needed (gtk_tree_view_focus_in): just queue a draw, don't fool with draw_focus goo (gtk_tree_view_focus): use gtk_get_current_event() and gdk_event_get_state() (gtk_tree_view_deleted): don't queue_resize() after calling set_size() (gtk_tree_view_build_tree): fix a "if (foo); {}" bug - i.e. remove semicolon (gtk_tree_view_create_button): show the button here (gtk_tree_view_button_clicked): actually emit the clicked signal on the column (_gtk_tree_view_set_size): return right away if the size is unchanged, as a cheesy optimization (gtk_tree_view_setup_model): rename set_model_realized to setup_model to match the flag that indicates whether we've called it (gtk_tree_view_get_hadjustment): create adjustment if it doesn't exist, because set_scroll_adjustment does that and it shouldn't matter what order you call these in (gtk_tree_view_get_vadjustment): ditto (gtk_tree_view_set_headers_visible): canonicalize the bool, for paranoia (gtk_tree_view_set_headers_visible): call gtk_tree_view_map_buttons() instead of using cut-and-paste code (gtk_tree_view_append_column): clarify whether the return value is the count of columns before or after, and do the increment separately from the return statement so you can tell from the code. (gtk_tree_view_remove_column): ditto (gtk_tree_view_insert_column): ditto (gtk_tree_view_get_column): remove g_return_if_fail for columns outside the existing range, the docs say that outside-range columns are allowed, so we handle them as documented. (Presumably this allows a nice loop with column != NULL as test.) (gtk_tree_view_move_to): document what 0.0, 0.5, 1.0 alignments mean (left/right/center etc.). (gtk_tree_view_collapse_all): only queue a draw if we're mapped (gtk_tree_view_expand_row): add docs (gtk_tree_view_collapse_row): add docs * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_clicked): new function to emit the clicked signal on a column * gdk/gdkevents.c (gdk_event_get_state): new function, to get the state of an event (gdk_event_get_time): don't treat GDK_SCROLL as a button event, remove default case from switch so gcc will whine if we don't explicitly handle all event types * gtk/gtktreeselection.h: added some FIXME * gtk/gtktreeprivate.h (struct _GtkTreeViewPrivate): rename "columns" to "n_columns" and "column" to "columns" for clarity
2000-12-17 23:50:00 +00:00
}
!GTK_OBJECT_DESTROYED() -> GTK_WIDGET_REALIZE() for resize queueing. Thu Jun 28 23:53:31 2001 Tim Janik <timj@gtk.org> * gtk/gtkwidget.c (gtk_widget_hide): !GTK_OBJECT_DESTROYED() -> GTK_WIDGET_REALIZE() for resize queueing. * gtk/gtkmain.c (gtk_main_do_event): !GTK_OBJECT_DESTROYED() -> GTK_WIDGET_REALIZE() for post event delivery destruction upon GDK_DESTROY. * gtk/gtkwidget.c: added GtkWidget::event-after notification signal, to sompensate for former (pre-2.0) connect_after() facility. (gtk_widget_send_expose): (gtk_widget_event): assert the widget is realized, since event delivery to non-realized widgets is essentially a bug. event handlers should be able to unconditionally rely on widget->window (unless they emit events on their own which can trigger widget destruction). (gtk_widget_event_internal): removed old outdated GTK_OBJECT_DESTROYED() logic. event delivery happens as follows: a) emission of GtkWidget::event (RUN_LAST handler). returns was_handled. b) if !was_handled in (a) and the widget is still realized, emit event- specific signal (RUN_LAST handler). returns was_handled. c) emission of GtkWidget::event-after for notification if the widget is still realized (regardless of was_handled from previous stages, no class handler). no return value. d) was_handled gets passed on to caller, to determine further propagation. if the widget got unrealized meanwhile, was_handled is returned as TRUE. * gdk/gdkevents.[hc]: added gdk_event_get_root_coords() and gdk_event_get_coords().
2001-06-28 22:49:20 +00:00
/**
* gdk_event_get_coords:
* @event: a #GdkEvent
* @x_win: location to put event window x coordinate
* @y_win: location to put event window y coordinate
!GTK_OBJECT_DESTROYED() -> GTK_WIDGET_REALIZE() for resize queueing. Thu Jun 28 23:53:31 2001 Tim Janik <timj@gtk.org> * gtk/gtkwidget.c (gtk_widget_hide): !GTK_OBJECT_DESTROYED() -> GTK_WIDGET_REALIZE() for resize queueing. * gtk/gtkmain.c (gtk_main_do_event): !GTK_OBJECT_DESTROYED() -> GTK_WIDGET_REALIZE() for post event delivery destruction upon GDK_DESTROY. * gtk/gtkwidget.c: added GtkWidget::event-after notification signal, to sompensate for former (pre-2.0) connect_after() facility. (gtk_widget_send_expose): (gtk_widget_event): assert the widget is realized, since event delivery to non-realized widgets is essentially a bug. event handlers should be able to unconditionally rely on widget->window (unless they emit events on their own which can trigger widget destruction). (gtk_widget_event_internal): removed old outdated GTK_OBJECT_DESTROYED() logic. event delivery happens as follows: a) emission of GtkWidget::event (RUN_LAST handler). returns was_handled. b) if !was_handled in (a) and the widget is still realized, emit event- specific signal (RUN_LAST handler). returns was_handled. c) emission of GtkWidget::event-after for notification if the widget is still realized (regardless of was_handled from previous stages, no class handler). no return value. d) was_handled gets passed on to caller, to determine further propagation. if the widget got unrealized meanwhile, was_handled is returned as TRUE. * gdk/gdkevents.[hc]: added gdk_event_get_root_coords() and gdk_event_get_coords().
2001-06-28 22:49:20 +00:00
*
* Extract the event window relative x/y coordinates from an event.
*
* Return value: %TRUE if the event delivered event window coordinates
**/
gboolean
gdk_event_get_coords (GdkEvent *event,
gdouble *x_win,
gdouble *y_win)
{
gdouble x = 0, y = 0;
gboolean fetched = TRUE;
g_return_val_if_fail (event != NULL, FALSE);
switch (event->type)
{
case GDK_CONFIGURE:
x = event->configure.x;
y = event->configure.y;
break;
case GDK_ENTER_NOTIFY:
case GDK_LEAVE_NOTIFY:
x = event->crossing.x;
y = event->crossing.y;
break;
case GDK_SCROLL:
x = event->scroll.x;
y = event->scroll.y;
break;
case GDK_BUTTON_PRESS:
case GDK_2BUTTON_PRESS:
case GDK_3BUTTON_PRESS:
case GDK_BUTTON_RELEASE:
x = event->button.x;
y = event->button.y;
break;
case GDK_MOTION_NOTIFY:
x = event->motion.x;
y = event->motion.y;
break;
default:
fetched = FALSE;
break;
}
if (x_win)
*x_win = x;
if (y_win)
*y_win = y;
!GTK_OBJECT_DESTROYED() -> GTK_WIDGET_REALIZE() for resize queueing. Thu Jun 28 23:53:31 2001 Tim Janik <timj@gtk.org> * gtk/gtkwidget.c (gtk_widget_hide): !GTK_OBJECT_DESTROYED() -> GTK_WIDGET_REALIZE() for resize queueing. * gtk/gtkmain.c (gtk_main_do_event): !GTK_OBJECT_DESTROYED() -> GTK_WIDGET_REALIZE() for post event delivery destruction upon GDK_DESTROY. * gtk/gtkwidget.c: added GtkWidget::event-after notification signal, to sompensate for former (pre-2.0) connect_after() facility. (gtk_widget_send_expose): (gtk_widget_event): assert the widget is realized, since event delivery to non-realized widgets is essentially a bug. event handlers should be able to unconditionally rely on widget->window (unless they emit events on their own which can trigger widget destruction). (gtk_widget_event_internal): removed old outdated GTK_OBJECT_DESTROYED() logic. event delivery happens as follows: a) emission of GtkWidget::event (RUN_LAST handler). returns was_handled. b) if !was_handled in (a) and the widget is still realized, emit event- specific signal (RUN_LAST handler). returns was_handled. c) emission of GtkWidget::event-after for notification if the widget is still realized (regardless of was_handled from previous stages, no class handler). no return value. d) was_handled gets passed on to caller, to determine further propagation. if the widget got unrealized meanwhile, was_handled is returned as TRUE. * gdk/gdkevents.[hc]: added gdk_event_get_root_coords() and gdk_event_get_coords().
2001-06-28 22:49:20 +00:00
return fetched;
}
/**
* gdk_event_get_root_coords:
* @event: a #GdkEvent
* @x_root: location to put root window x coordinate
* @y_root: location to put root window y coordinate
*
* Extract the root window relative x/y coordinates from an event.
*
* Return value: %TRUE if the event delivered root window coordinates
**/
gboolean
gdk_event_get_root_coords (GdkEvent *event,
gdouble *x_root,
gdouble *y_root)
{
gdouble x = 0, y = 0;
gboolean fetched = TRUE;
g_return_val_if_fail (event != NULL, FALSE);
switch (event->type)
{
case GDK_MOTION_NOTIFY:
x = event->motion.x_root;
y = event->motion.y_root;
break;
case GDK_BUTTON_PRESS:
case GDK_2BUTTON_PRESS:
case GDK_3BUTTON_PRESS:
case GDK_BUTTON_RELEASE:
x = event->button.x_root;
y = event->button.y_root;
break;
case GDK_ENTER_NOTIFY:
case GDK_LEAVE_NOTIFY:
x = event->crossing.x_root;
y = event->crossing.y_root;
break;
case GDK_DRAG_ENTER:
case GDK_DRAG_LEAVE:
case GDK_DRAG_MOTION:
case GDK_DRAG_STATUS:
case GDK_DROP_START:
case GDK_DROP_FINISHED:
x = event->dnd.x_root;
y = event->dnd.y_root;
break;
default:
fetched = FALSE;
break;
}
if (x_root)
*x_root = x;
if (y_root)
*y_root = y;
!GTK_OBJECT_DESTROYED() -> GTK_WIDGET_REALIZE() for resize queueing. Thu Jun 28 23:53:31 2001 Tim Janik <timj@gtk.org> * gtk/gtkwidget.c (gtk_widget_hide): !GTK_OBJECT_DESTROYED() -> GTK_WIDGET_REALIZE() for resize queueing. * gtk/gtkmain.c (gtk_main_do_event): !GTK_OBJECT_DESTROYED() -> GTK_WIDGET_REALIZE() for post event delivery destruction upon GDK_DESTROY. * gtk/gtkwidget.c: added GtkWidget::event-after notification signal, to sompensate for former (pre-2.0) connect_after() facility. (gtk_widget_send_expose): (gtk_widget_event): assert the widget is realized, since event delivery to non-realized widgets is essentially a bug. event handlers should be able to unconditionally rely on widget->window (unless they emit events on their own which can trigger widget destruction). (gtk_widget_event_internal): removed old outdated GTK_OBJECT_DESTROYED() logic. event delivery happens as follows: a) emission of GtkWidget::event (RUN_LAST handler). returns was_handled. b) if !was_handled in (a) and the widget is still realized, emit event- specific signal (RUN_LAST handler). returns was_handled. c) emission of GtkWidget::event-after for notification if the widget is still realized (regardless of was_handled from previous stages, no class handler). no return value. d) was_handled gets passed on to caller, to determine further propagation. if the widget got unrealized meanwhile, was_handled is returned as TRUE. * gdk/gdkevents.[hc]: added gdk_event_get_root_coords() and gdk_event_get_coords().
2001-06-28 22:49:20 +00:00
return fetched;
}
/**
* gdk_event_get_axis:
* @event: a #GdkEvent
* @axis_use: the axis use to look for
* @value: location to store the value found
*
* Extract the axis value for a particular axis use from
* an event structure.
*
* Return value: %TRUE if the specified axis was found, otherwise %FALSE
**/
gboolean
gdk_event_get_axis (GdkEvent *event,
GdkAxisUse axis_use,
gdouble *value)
{
gdouble *axes;
GdkDevice *device;
g_return_val_if_fail (event != NULL, FALSE);
if (axis_use == GDK_AXIS_X || axis_use == GDK_AXIS_Y)
{
gdouble x, y;
switch (event->type)
{
case GDK_MOTION_NOTIFY:
x = event->motion.x;
y = event->motion.y;
break;
case GDK_SCROLL:
x = event->scroll.x;
y = event->scroll.y;
break;
case GDK_BUTTON_PRESS:
case GDK_BUTTON_RELEASE:
x = event->button.x;
y = event->button.y;
break;
case GDK_ENTER_NOTIFY:
case GDK_LEAVE_NOTIFY:
x = event->crossing.x;
y = event->crossing.y;
break;
default:
return FALSE;
}
if (axis_use == GDK_AXIS_X && value)
*value = x;
if (axis_use == GDK_AXIS_Y && value)
*value = y;
return TRUE;
}
else if (event->type == GDK_BUTTON_PRESS ||
event->type == GDK_BUTTON_RELEASE)
{
device = event->button.device;
axes = event->button.axes;
}
else if (event->type == GDK_MOTION_NOTIFY)
{
device = event->motion.device;
axes = event->motion.axes;
}
else
return FALSE;
return gdk_device_get_axis (device, axes, axis_use, value);
}
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
/**
* gdk_set_show_events:
* @show_events: %TRUE to output event debugging information.
*
* Sets whether a trace of received events is output.
* Note that GTK+ must be compiled with debugging (that is,
* configured using the <option>--enable-debug</option> option)
* to use this option.
**/
void
2000-03-14 19:57:25 +00:00
gdk_set_show_events (gboolean show_events)
{
if (show_events)
Make gdkx.h the only installed header from gdk/x11. All structures in Fri Sep 7 11:51:44 2001 Owen Taylor <otaylor@redhat.com> Make gdkx.h the only installed header from gdk/x11. All structures in gdk/x11 are opaque. * gdk/x11/Makefile.am gdk/x11/gdkx.h gdk/x11/gdkprivate-x11.h: Don't install gdk{drawable,pixmap,window}-x11.h. * gdk/x11/{gdkcolormap-x11.c, gdkfont-x11.c, gdkx.h, gdkvisual-x11.c: Move GdkColormapPrivateX11, GdkFontPrivateX GdkImagePrivateX11, GdkVisualClass into C files. * gdk/gdkpixmap-x11.[ch]: Make gdk_pixmap_impl_get_type() static. * gdk/x11/{gdkcolor-x11.c, gdkcursor-x11.c, gdkdrawable-x11.c, gdkfont-x11.c, gdkgc-x11.c, gdkx.h, gdkimage-x11,gdkvisual-x11.c} Add public functions to replace previously exported direct structure access. gdk_x11_colormap_get_{xdisplay,xcolormap} gdk_x11_cursor_get_{xdisplay,xcursor}, gdk_x11_drawable_get_{xdisplay,xcursor,gdk_x11_visual_get_xvisual, gdk_x11_font_get_{xdisplay,xfont}, gdk_x11_image_get_{xdisplay,ximage}, gdk_x11_gc_get_{xdisplay,ximage} * gdk/gdkprivate.h gdk/gdkinternals.h: Move GdkColorInfo, GdkEventFilter, GdkClientFilter, GdkFontPrivate to gdkinternals. Fix a number of variables and functions that were exported "accidentally" from GDK. * gdk/**.[ch]: gdk => _gdk for gdk_visual_init, gdk_events_init, gdk_input_init, gdk_dnd_init, gdk_image_exit, gdk_input_exit, gdk_windowing_exit, gdk_event_func, gdk_event_data, gdk_event_notify, gdk_queued_events, gdk_queued_tail, gdk_event_new, gdk_events_queue, gdk_events_unqueue, gdk_event_queue_find_first, gdk_event_queue_remove_link, gdk_event_queue_append, gdk_event_button_generate, gdk_debug_flags, gdk_default_filters, gdk_parent_root. * gdk/x11/{gdkevents-x11.c, gdkglobals-x11.c, gdkimage-x11.c, gdkmain-x11.c, gdkprivate-x11.h, gdk/x11/gdkwindow-x11.c}: gdk => _gdk for gdk_event_mask_table, gkd_nevent_masks, gdk_wm_window_protocols, gdk_leader_window, gdk_xgrab_window, gdk_use_xshm, gdk_input_ignore_core. * gdk/x11/xsettings-common.h (xsettings_list_insert): Add #defines to namespace functions into the private _gdk_ namespace. * gdk/gdkwindow.[ch] gdk/x11/gdkx.h: Add gdk_get_default_root_window () to replace gdk_parent_root exported variable. Adjust and deprecate GDK_ROOT_PARENT(). * demos/{testpixbuf-drawable.c,testpixbuf-save.c}: Fix GDK_ROOT_PARENT usage, remove includes of port-specific headers. * gdk/{win32,x11,fb}/gdkinput*.[ch]: s/gdk/_gdk/ for _gdk_input_gxid_host, _gdk_input_gxid_port, _gdk_input_ignore_core, gdk_input_devices, _gdk_input_windows, gdk_init_input_core. * gdk/x11/{gdkevents-x11.,c gdkglobals-x11.c, gdkmain-x11.c} docs/Changes-2.0.txt: Remove gdk_wm_protocols, gdk_wm_delete_window functions, gdk_wm_take_focus, use gdk_atom_intern() instead. * gdk/linux-fb/{gdkselection-fb.c, gdkmain-fb.c, gdkprivatefb.h} gdk/win32/{gdkselection-win32.c, gdkmgdkwin32.h, gdkprivate-win32.h} gdk/x11/{gdkselection-x11.c gdkx.h, gtkprivate-x11.h} gtk/gtkselection.c Unexport gdk_selection_property, just use gdk_atom_intern ("GDK_SELECTION"). * gdk/x11/{gdkprivate-x11.h,gdkdrawable-x11h,gdkgc-x11.c,gdkx.h}: Unexport gdk_drawable_impl_x11_get_type, gdk_gc_x11_get_type, GDK_GC_X11 cast macros, GdkGCX11 structures, GdkCursorPrivate, GdkVisualprivate, gdk_x11_gc_flush. Make a number of public exports of variables into functions to increase encapsulation. * gdk/gdkinternals.h gdk/gdkinput.h gdk/gdkevents.h gdk/linux-fb/gdkmouse-fb.c: gdk_core_pointer => _gdk_core_pointer, move to gdkinternals.h. Add gdk_device_get_core_pointer (). * gdk/gdkprivate.h gdk/gdkpango.c gdk/gdkinternals.h docs/Changes-2.0.txt: Unexport gdk_parent_root, gdk_error_code, gdk_error_warnings. * gdk/x11/{gdkcolormap-x11.c, gdkmain-x11.c, gdkx.h} docs/Changes-2.0.txt: s/gdk_screen/_gdk_screen/, add gdk_x11_get_default_screen() s/gdk_root_window/_gdk_root_window/, add gdk_x11_get_default_root_xwindow() Add gdk_x11_get_default_xdisplay(). * gdk/gdk.h gdk/gdk.c linux-fb/gdkfb.h linux-fb/gdkglobals-fb.c win32/gdkwin32.h x11/gdkglobals-x11.c gdk/x11/gdkmain-x11.c gdk/x11/gdkx.h: gdk/gdk.def: Add gdk_get/set_program_class, Don't export gdk_progclass, move --class command line option and handling to common portion of GDK. Miscellaneous fixes: * gdk/x11/gdkwindow-x11.c (gdk_window_set_icon_list): Fix g_return_val_if_fail that should have been g_return_if_fail. * gdk/gdkinternals.h gdk/gdkprivate.h: Move gdk_synthesize_window_state() to the semi-public gdkprivate.h. * gtk/gtkdnd.c (_gtk_drag_source_handle_event): Remove uneeded X11 dependency. * gdk/linux-fb/gdkmain-fb.c gdk/win32/gdkmain-win32.c gdk/TODO: Remove unused gdk_key_repeat_disable/restore. * linux-fb/gdkglobals-fb.c win32/gdkglobals-win32.c x11/gdkglobals-x11.c x11/gdkprivate-x11.h gdk/gdk.def: Remove unused gdk_null_window_warnings variable. * gdk/Makefile.am (DIST_SUBDIRS) nanox/*: cvs remove nanox; it can be retrieved from the repository; it is too far from functional to be worth having people check out; it would be easier to start from scratch, I suspect. * gdk/x11/gdkpixmap-x11.c: Fix lvalue usage of GDK_PIXMAP_XID(). * gdk/x11/gdkkeys-x11.c gdk/gdkrgb.c gdk/gdkwindow.c gdk/x11/gdkpango-x11.c gdk/x11/gdkselection-x11.c: Fix some accidentally global variables and unused global variables. * gdk/x11/gdkkeys-x11.c gdk/gdkrgb.c gdk/gdkwindow.c gdk/x11/gdkpango-x11.c gdk/x11/gdkselection-x11.c: Fix some accidentally global variables and unused global variables. Add some space for future expansion to multihead. * gdk/gdkdrawable.h: Add four reserved function pointers for future expansion of GdkDrawableClass. * gtk/gtkwindow.h gtk/gtkinvisible.h: Add reserved pointer where we can put a GdkScreen * later.
2001-09-07 21:50:20 +00:00
_gdk_debug_flags |= GDK_DEBUG_EVENTS;
else
Make gdkx.h the only installed header from gdk/x11. All structures in Fri Sep 7 11:51:44 2001 Owen Taylor <otaylor@redhat.com> Make gdkx.h the only installed header from gdk/x11. All structures in gdk/x11 are opaque. * gdk/x11/Makefile.am gdk/x11/gdkx.h gdk/x11/gdkprivate-x11.h: Don't install gdk{drawable,pixmap,window}-x11.h. * gdk/x11/{gdkcolormap-x11.c, gdkfont-x11.c, gdkx.h, gdkvisual-x11.c: Move GdkColormapPrivateX11, GdkFontPrivateX GdkImagePrivateX11, GdkVisualClass into C files. * gdk/gdkpixmap-x11.[ch]: Make gdk_pixmap_impl_get_type() static. * gdk/x11/{gdkcolor-x11.c, gdkcursor-x11.c, gdkdrawable-x11.c, gdkfont-x11.c, gdkgc-x11.c, gdkx.h, gdkimage-x11,gdkvisual-x11.c} Add public functions to replace previously exported direct structure access. gdk_x11_colormap_get_{xdisplay,xcolormap} gdk_x11_cursor_get_{xdisplay,xcursor}, gdk_x11_drawable_get_{xdisplay,xcursor,gdk_x11_visual_get_xvisual, gdk_x11_font_get_{xdisplay,xfont}, gdk_x11_image_get_{xdisplay,ximage}, gdk_x11_gc_get_{xdisplay,ximage} * gdk/gdkprivate.h gdk/gdkinternals.h: Move GdkColorInfo, GdkEventFilter, GdkClientFilter, GdkFontPrivate to gdkinternals. Fix a number of variables and functions that were exported "accidentally" from GDK. * gdk/**.[ch]: gdk => _gdk for gdk_visual_init, gdk_events_init, gdk_input_init, gdk_dnd_init, gdk_image_exit, gdk_input_exit, gdk_windowing_exit, gdk_event_func, gdk_event_data, gdk_event_notify, gdk_queued_events, gdk_queued_tail, gdk_event_new, gdk_events_queue, gdk_events_unqueue, gdk_event_queue_find_first, gdk_event_queue_remove_link, gdk_event_queue_append, gdk_event_button_generate, gdk_debug_flags, gdk_default_filters, gdk_parent_root. * gdk/x11/{gdkevents-x11.c, gdkglobals-x11.c, gdkimage-x11.c, gdkmain-x11.c, gdkprivate-x11.h, gdk/x11/gdkwindow-x11.c}: gdk => _gdk for gdk_event_mask_table, gkd_nevent_masks, gdk_wm_window_protocols, gdk_leader_window, gdk_xgrab_window, gdk_use_xshm, gdk_input_ignore_core. * gdk/x11/xsettings-common.h (xsettings_list_insert): Add #defines to namespace functions into the private _gdk_ namespace. * gdk/gdkwindow.[ch] gdk/x11/gdkx.h: Add gdk_get_default_root_window () to replace gdk_parent_root exported variable. Adjust and deprecate GDK_ROOT_PARENT(). * demos/{testpixbuf-drawable.c,testpixbuf-save.c}: Fix GDK_ROOT_PARENT usage, remove includes of port-specific headers. * gdk/{win32,x11,fb}/gdkinput*.[ch]: s/gdk/_gdk/ for _gdk_input_gxid_host, _gdk_input_gxid_port, _gdk_input_ignore_core, gdk_input_devices, _gdk_input_windows, gdk_init_input_core. * gdk/x11/{gdkevents-x11.,c gdkglobals-x11.c, gdkmain-x11.c} docs/Changes-2.0.txt: Remove gdk_wm_protocols, gdk_wm_delete_window functions, gdk_wm_take_focus, use gdk_atom_intern() instead. * gdk/linux-fb/{gdkselection-fb.c, gdkmain-fb.c, gdkprivatefb.h} gdk/win32/{gdkselection-win32.c, gdkmgdkwin32.h, gdkprivate-win32.h} gdk/x11/{gdkselection-x11.c gdkx.h, gtkprivate-x11.h} gtk/gtkselection.c Unexport gdk_selection_property, just use gdk_atom_intern ("GDK_SELECTION"). * gdk/x11/{gdkprivate-x11.h,gdkdrawable-x11h,gdkgc-x11.c,gdkx.h}: Unexport gdk_drawable_impl_x11_get_type, gdk_gc_x11_get_type, GDK_GC_X11 cast macros, GdkGCX11 structures, GdkCursorPrivate, GdkVisualprivate, gdk_x11_gc_flush. Make a number of public exports of variables into functions to increase encapsulation. * gdk/gdkinternals.h gdk/gdkinput.h gdk/gdkevents.h gdk/linux-fb/gdkmouse-fb.c: gdk_core_pointer => _gdk_core_pointer, move to gdkinternals.h. Add gdk_device_get_core_pointer (). * gdk/gdkprivate.h gdk/gdkpango.c gdk/gdkinternals.h docs/Changes-2.0.txt: Unexport gdk_parent_root, gdk_error_code, gdk_error_warnings. * gdk/x11/{gdkcolormap-x11.c, gdkmain-x11.c, gdkx.h} docs/Changes-2.0.txt: s/gdk_screen/_gdk_screen/, add gdk_x11_get_default_screen() s/gdk_root_window/_gdk_root_window/, add gdk_x11_get_default_root_xwindow() Add gdk_x11_get_default_xdisplay(). * gdk/gdk.h gdk/gdk.c linux-fb/gdkfb.h linux-fb/gdkglobals-fb.c win32/gdkwin32.h x11/gdkglobals-x11.c gdk/x11/gdkmain-x11.c gdk/x11/gdkx.h: gdk/gdk.def: Add gdk_get/set_program_class, Don't export gdk_progclass, move --class command line option and handling to common portion of GDK. Miscellaneous fixes: * gdk/x11/gdkwindow-x11.c (gdk_window_set_icon_list): Fix g_return_val_if_fail that should have been g_return_if_fail. * gdk/gdkinternals.h gdk/gdkprivate.h: Move gdk_synthesize_window_state() to the semi-public gdkprivate.h. * gtk/gtkdnd.c (_gtk_drag_source_handle_event): Remove uneeded X11 dependency. * gdk/linux-fb/gdkmain-fb.c gdk/win32/gdkmain-win32.c gdk/TODO: Remove unused gdk_key_repeat_disable/restore. * linux-fb/gdkglobals-fb.c win32/gdkglobals-win32.c x11/gdkglobals-x11.c x11/gdkprivate-x11.h gdk/gdk.def: Remove unused gdk_null_window_warnings variable. * gdk/Makefile.am (DIST_SUBDIRS) nanox/*: cvs remove nanox; it can be retrieved from the repository; it is too far from functional to be worth having people check out; it would be easier to start from scratch, I suspect. * gdk/x11/gdkpixmap-x11.c: Fix lvalue usage of GDK_PIXMAP_XID(). * gdk/x11/gdkkeys-x11.c gdk/gdkrgb.c gdk/gdkwindow.c gdk/x11/gdkpango-x11.c gdk/x11/gdkselection-x11.c: Fix some accidentally global variables and unused global variables. * gdk/x11/gdkkeys-x11.c gdk/gdkrgb.c gdk/gdkwindow.c gdk/x11/gdkpango-x11.c gdk/x11/gdkselection-x11.c: Fix some accidentally global variables and unused global variables. Add some space for future expansion to multihead. * gdk/gdkdrawable.h: Add four reserved function pointers for future expansion of GdkDrawableClass. * gtk/gtkwindow.h gtk/gtkinvisible.h: Add reserved pointer where we can put a GdkScreen * later.
2001-09-07 21:50:20 +00:00
_gdk_debug_flags &= ~GDK_DEBUG_EVENTS;
}
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
/**
* gdk_get_show_events:
*
* Gets whether event debugging output is enabled.
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
*
* Return value: %TRUE if event debugging output is enabled.
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
**/
2000-03-14 19:57:25 +00:00
gboolean
gdk_get_show_events (void)
{
Make gdkx.h the only installed header from gdk/x11. All structures in Fri Sep 7 11:51:44 2001 Owen Taylor <otaylor@redhat.com> Make gdkx.h the only installed header from gdk/x11. All structures in gdk/x11 are opaque. * gdk/x11/Makefile.am gdk/x11/gdkx.h gdk/x11/gdkprivate-x11.h: Don't install gdk{drawable,pixmap,window}-x11.h. * gdk/x11/{gdkcolormap-x11.c, gdkfont-x11.c, gdkx.h, gdkvisual-x11.c: Move GdkColormapPrivateX11, GdkFontPrivateX GdkImagePrivateX11, GdkVisualClass into C files. * gdk/gdkpixmap-x11.[ch]: Make gdk_pixmap_impl_get_type() static. * gdk/x11/{gdkcolor-x11.c, gdkcursor-x11.c, gdkdrawable-x11.c, gdkfont-x11.c, gdkgc-x11.c, gdkx.h, gdkimage-x11,gdkvisual-x11.c} Add public functions to replace previously exported direct structure access. gdk_x11_colormap_get_{xdisplay,xcolormap} gdk_x11_cursor_get_{xdisplay,xcursor}, gdk_x11_drawable_get_{xdisplay,xcursor,gdk_x11_visual_get_xvisual, gdk_x11_font_get_{xdisplay,xfont}, gdk_x11_image_get_{xdisplay,ximage}, gdk_x11_gc_get_{xdisplay,ximage} * gdk/gdkprivate.h gdk/gdkinternals.h: Move GdkColorInfo, GdkEventFilter, GdkClientFilter, GdkFontPrivate to gdkinternals. Fix a number of variables and functions that were exported "accidentally" from GDK. * gdk/**.[ch]: gdk => _gdk for gdk_visual_init, gdk_events_init, gdk_input_init, gdk_dnd_init, gdk_image_exit, gdk_input_exit, gdk_windowing_exit, gdk_event_func, gdk_event_data, gdk_event_notify, gdk_queued_events, gdk_queued_tail, gdk_event_new, gdk_events_queue, gdk_events_unqueue, gdk_event_queue_find_first, gdk_event_queue_remove_link, gdk_event_queue_append, gdk_event_button_generate, gdk_debug_flags, gdk_default_filters, gdk_parent_root. * gdk/x11/{gdkevents-x11.c, gdkglobals-x11.c, gdkimage-x11.c, gdkmain-x11.c, gdkprivate-x11.h, gdk/x11/gdkwindow-x11.c}: gdk => _gdk for gdk_event_mask_table, gkd_nevent_masks, gdk_wm_window_protocols, gdk_leader_window, gdk_xgrab_window, gdk_use_xshm, gdk_input_ignore_core. * gdk/x11/xsettings-common.h (xsettings_list_insert): Add #defines to namespace functions into the private _gdk_ namespace. * gdk/gdkwindow.[ch] gdk/x11/gdkx.h: Add gdk_get_default_root_window () to replace gdk_parent_root exported variable. Adjust and deprecate GDK_ROOT_PARENT(). * demos/{testpixbuf-drawable.c,testpixbuf-save.c}: Fix GDK_ROOT_PARENT usage, remove includes of port-specific headers. * gdk/{win32,x11,fb}/gdkinput*.[ch]: s/gdk/_gdk/ for _gdk_input_gxid_host, _gdk_input_gxid_port, _gdk_input_ignore_core, gdk_input_devices, _gdk_input_windows, gdk_init_input_core. * gdk/x11/{gdkevents-x11.,c gdkglobals-x11.c, gdkmain-x11.c} docs/Changes-2.0.txt: Remove gdk_wm_protocols, gdk_wm_delete_window functions, gdk_wm_take_focus, use gdk_atom_intern() instead. * gdk/linux-fb/{gdkselection-fb.c, gdkmain-fb.c, gdkprivatefb.h} gdk/win32/{gdkselection-win32.c, gdkmgdkwin32.h, gdkprivate-win32.h} gdk/x11/{gdkselection-x11.c gdkx.h, gtkprivate-x11.h} gtk/gtkselection.c Unexport gdk_selection_property, just use gdk_atom_intern ("GDK_SELECTION"). * gdk/x11/{gdkprivate-x11.h,gdkdrawable-x11h,gdkgc-x11.c,gdkx.h}: Unexport gdk_drawable_impl_x11_get_type, gdk_gc_x11_get_type, GDK_GC_X11 cast macros, GdkGCX11 structures, GdkCursorPrivate, GdkVisualprivate, gdk_x11_gc_flush. Make a number of public exports of variables into functions to increase encapsulation. * gdk/gdkinternals.h gdk/gdkinput.h gdk/gdkevents.h gdk/linux-fb/gdkmouse-fb.c: gdk_core_pointer => _gdk_core_pointer, move to gdkinternals.h. Add gdk_device_get_core_pointer (). * gdk/gdkprivate.h gdk/gdkpango.c gdk/gdkinternals.h docs/Changes-2.0.txt: Unexport gdk_parent_root, gdk_error_code, gdk_error_warnings. * gdk/x11/{gdkcolormap-x11.c, gdkmain-x11.c, gdkx.h} docs/Changes-2.0.txt: s/gdk_screen/_gdk_screen/, add gdk_x11_get_default_screen() s/gdk_root_window/_gdk_root_window/, add gdk_x11_get_default_root_xwindow() Add gdk_x11_get_default_xdisplay(). * gdk/gdk.h gdk/gdk.c linux-fb/gdkfb.h linux-fb/gdkglobals-fb.c win32/gdkwin32.h x11/gdkglobals-x11.c gdk/x11/gdkmain-x11.c gdk/x11/gdkx.h: gdk/gdk.def: Add gdk_get/set_program_class, Don't export gdk_progclass, move --class command line option and handling to common portion of GDK. Miscellaneous fixes: * gdk/x11/gdkwindow-x11.c (gdk_window_set_icon_list): Fix g_return_val_if_fail that should have been g_return_if_fail. * gdk/gdkinternals.h gdk/gdkprivate.h: Move gdk_synthesize_window_state() to the semi-public gdkprivate.h. * gtk/gtkdnd.c (_gtk_drag_source_handle_event): Remove uneeded X11 dependency. * gdk/linux-fb/gdkmain-fb.c gdk/win32/gdkmain-win32.c gdk/TODO: Remove unused gdk_key_repeat_disable/restore. * linux-fb/gdkglobals-fb.c win32/gdkglobals-win32.c x11/gdkglobals-x11.c x11/gdkprivate-x11.h gdk/gdk.def: Remove unused gdk_null_window_warnings variable. * gdk/Makefile.am (DIST_SUBDIRS) nanox/*: cvs remove nanox; it can be retrieved from the repository; it is too far from functional to be worth having people check out; it would be easier to start from scratch, I suspect. * gdk/x11/gdkpixmap-x11.c: Fix lvalue usage of GDK_PIXMAP_XID(). * gdk/x11/gdkkeys-x11.c gdk/gdkrgb.c gdk/gdkwindow.c gdk/x11/gdkpango-x11.c gdk/x11/gdkselection-x11.c: Fix some accidentally global variables and unused global variables. * gdk/x11/gdkkeys-x11.c gdk/gdkrgb.c gdk/gdkwindow.c gdk/x11/gdkpango-x11.c gdk/x11/gdkselection-x11.c: Fix some accidentally global variables and unused global variables. Add some space for future expansion to multihead. * gdk/gdkdrawable.h: Add four reserved function pointers for future expansion of GdkDrawableClass. * gtk/gtkwindow.h gtk/gtkinvisible.h: Add reserved pointer where we can put a GdkScreen * later.
2001-09-07 21:50:20 +00:00
return (_gdk_debug_flags & GDK_DEBUG_EVENTS) != 0;
}
static void
gdk_io_destroy (gpointer data)
{
GdkIOClosure *closure = data;
if (closure->notify)
closure->notify (closure->data);
g_free (closure);
}
[ Merges from gtk-1-2 ] Wed Sep 8 07:13:29 1999 Tim Janik <timj@gtk.org> * configure.in: fixed "GNU Make" check to pass with new make version 3.77.95. Fri Sep 3 16:04:41 1999 Tim Janik <timj@gtk.org> * gtk-config.in (--version): don't echo @GTK_VERSION@, but @GTK_MAJOR_VERSION@.@GTK_MINOR_VERSION@.@GTK_MICRO_VERSION@, so the AM_PATH_GTK() macros don't get confused by the -pre1. Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com> * configure.in (REBUILD): Change check for perl5 to check explicitely for v >= 5.002. (5.001 does not work with our scripts.) Wed Aug 25 15:45:46 1999 Tim Janik <timj@gtk.org> * configure.in: evaluate $PERL for the perl version check. added --disable-rebuilds to give the user an option to completely disable any source autogeneration rules. Mon Aug 23 23:16:14 1999 Tim Janik <timj@gtk.org> * configure.in: evaluate $ac_make when checking for GNU Make. Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org> * docs/Makefile.am: added generation.txt. * Makefile.am: require automake 1.4, build README from README.in and INSTALL from INSTALL.in in dist-hook. * README.in: * INSTALL.in: new files to autogenerate README and INSTALL from. * configure.in: figure whether we have GNU Make * docs/generation.txt: minor additions/corrections. Wed Aug 11 13:38:26 BST 1999 Tony Gale <gale@gtk.org> * docs/gtkfaq.sgml: FAQ Update July 30, 1999 Elliot Lee <sopwith@redhat.com> * configure.in: Fix autoconf warnings about cross compilation by trying to provide sane defaults for AC_TRY_RUN. Fri Jul 16 22:20:21 PDT 1999 Manish Singh <yosh@gimp.org> * ltconfig * ltmain.sh: upgrade to libtool 1.3.3 Thu Jul 8 11:30:18 1999 Owen Taylor <otaylor@redhat.com> * INSTALL: Indicate that the --with-glib= configure time flag is unsupported. Mon Jul 5 20:36:03 1999 Owen Taylor <otaylor@redhat.com> * docs/generation.txt: Added a file that gives documenation about the autogeneration process for various autogenerated files. Tue Jun 29 15:59:25 1999 Owen Taylor <otaylor@redhat.com> * configure.in (LIBS): Look for libgmodule in the right location. Thu Jun 17 13:57:31 1999 Owen Taylor <otaylor@redhat.com> * docs/gtk_tut.sgml: Removed references to code examples in my directory on gtk.org as they should all be in the tutorial now. * docs/gtk_tut.sgml: Added sources for dial-test and scribble-xinput programs that were previously missing. Fri Jun 4 00:08:59 1999 Owen Taylor <otaylor@redhat.com> * TODO: Added entry about menu keyboard navigation, removed some finished items. Mon May 31 00:11:24 1999 Owen Taylor <otaylor@redhat.com> * acinclude.m4: Standardize on func_dgettext not func_gettext, so that the checks for dgettext actually are paid attention to. Wed May 5 10:47:54 1999 Owen Taylor <otaylor@redhat.com> * configure.in (LIBS): Add $INTLLIBS into $LIBS directly, rather than repeating the checks for gettext. * INSTALL: Added information about gettext and NLS support. * acinclude.m4 (LIBM): Check for dgettext, not just gettext. This should hopefully fix things wrt systems with old versions of GNU gettext installed. Tue Jun 29 15:59:25 1999 Owen Taylor <otaylor@redhat.com> * configure.in (LIBS): Look for libgmodule in the right location. Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org> * autogen.sh: add --enable-maintainer-mode * configure.in: set ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS" Wed Mar 24 23:03:49 CST 1999 Shawn T. Amundson <amundson@gtk.org> * docs/gtk-config.1.in: docs/Makefile.am: configure.in: gtk-config is now generated. * docs/gtk-config.1: Removed, now generated. Thu Sep 23 17:59:59 1999 Tim Janik <timj@gtk.org> * gdk/gdkevents.c (gdk_event_translate): grr, even if Gdk doesn't handle CreateNotify itself, still put out a debuging message for --gdk-debug=events. made the ReparentNotify debugging message more verbose. wrap xcoords translation for ConfigureEvents into an error trap, a destroy event may already be pending, and in that case, the actuall coordinate values are not at all critical. Sat Sep 18 22:24:15 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkcc.c: Stop leaking the color_hash all over the place. Simplify and improve the logic. Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org> * gdk/gdk.h, gdk/gdkcolor.c: make return types (gint or gboolean) for prototypes and function implementations consistent (reported by Tomas Ogren). Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org> * gdk/gdkevents.c (gdk_event_translate): tell if expose events have send_event set in debugging output. (gdk_compress_exposures): default initialize the event so we don't operate on bogus values (namely send_event). Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkwindow.c: When we receive an unexpected destroy notify on one of our windows, don't just warn about it, also mark our windows as destroyed. Sun Sep 5 08:10:53 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkfont.c (gdk_font_hash_insert): Add name => font and name => fontset hashes. The name => fontset hash is a _big_ win since we weren't previously caching fontsets at all and loading fontsets is expensive. The name => font hash is less of a win, but it does save us from doing repeated XQueryFont calls on the same font. * gdk/gdkprivate.h (struct _GdkFontPrivate): Add a names list so we can remove font/fontset from hash. Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkproperty.c (gdk_atom_intern): Remove useless and slightly confusing test. [ XInternAtom (,,TRUE) will never return None ]. Sat Sep 4 08:39:26 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkwindow.c (gdk_window_set_geometry_hints) gdk/gdkwindow.c (gdk_window_set_hints): Don't omit setting the properties if flags == 0 - there may be an existing set of properties there already. (Very old bug. Would it be better to delete the property instead?) * gdk/gdkselection.c (gdk_selection_property_get): Fix spelling error in comment. Wed Sep 1 14:05:30 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkimage.c (gdk_image_new): Use gdk_error_trap_push() to avoid stomping over gdk_error_warnings. * gdk/gdkimage.c (gdk_image_new): compute image->bpp as (bits_per_pixel + 7) / 8. This gives the same result as before for multiples of 8, but actually a "reasonable" value for 1bit or 4bit displays. Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org> * gdk/Makefile.am: minor cleanups, strip spaces on build rules for GNU Make. Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org> * gdk/gdkevents.c (gdk_event_translate): give a debugging note when discarding configure events. 1999-08-18 Federico Mena Quintero <federico@redhat.com> * gdk/gdkpixmap.c (gdk_pixmap_unref): g_return_if_fail() the refcount is greater than zero. * gdk/gdkwindow.c (gdk_window_unref): Likewise. * gdk/gdkfont.c (gdk_font_unref): Likewise. * gdk/gdkgc.c (gdk_gc_unref): Likewise. * gdk/gdkdnd.c (gdk_drag_context_unref): Likewise. Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkproperty.c (gdk_property_get): Fix assumption that format 32 => sizeof(item) == 4. It really is sizeof(long). Tue Jun 29 23:02:42 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdk.c (gdk_x_error / gdk_x_io_error): Don't core dump at all on X IO errors, only core dump if --enable-debug for X errors. Thu Jun 24 17:06:23 1999 Tim Janik <timj@gtk.org> * gdk/gdkevents.c (gdk_event_translate): removed old ""Got event for unknown window:" message. disabled ConfigureNotify discarding code, because it led to events being processed out of order. Thu Jun 24 12:22:02 1999 Tim Janik <timj@gtk.org> * gdk/gdkglobals.c: preinitialize gdk_error_code to 0. * gdk/gdkevents.c (gdk_event_send_client_message_to_all_recurse): since we export this function, supress error warnings and don't reset the error code in the first half of this function. * gdk/gdk.c (gdk_x_error): set gdk_error_code to the actuall X error code (instead of just -1) so gdk_error_trap_pop() reveals something actually informative about the error that happened. * gdk/*.c: don't rely on gdk_error_code being -1 if an error occoured, but just gdk_error_code != 0. Thu Jun 24 11:50:07 1999 Tim Janik <timj@gtk.org> * gdk/gdkevents.c (gdk_event_apply_filters): advance the filter list pointer *before* invoking the filter function, so we at least don't crash if a filter is removed that is currently executed. window filters *really* need to be made truely reentrant at some point. Mon Jun 14 11:10:15 1999 Tim Janik <timj@gtk.org> * gdk/gdkevents.c (gdk_event_translate): print the atom name in the PropertyNotify debug messages. Wed May 5 22:51:06 1999 Owen Taylor <otaylor@redhat.com> Patch from Sung-Hyun Nam <namsh@lgic.co.kr> * gdk/gdkim.c: Fix cut-and-paste errors for x/y and PreeditAttributes/StatusAttributes. Wed May 5 22:24:21 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkwindow.c (gdk_window_set_geometry_hints): Change G_MAXINT to 2^16 to alleviate overflow problems in various window managers. Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkfont.c (gdk_text_measure): Fix the return value for fontsets. Wed May 5 12:42:01 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkwindow.c (gdk_window_set_geometry_hints): Initialize size_hints.x and size_hints.y because kwm brokenly pays attention to them. (Bug #1181 - Lars Heete <hel@admin.de>) Wed May 5 11:38:56 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkrgb.c (gdk_rgb_choose_visual): Free the return value of gdk_list_visuals(). (Bug #1193 - Morten Welinder <terra@diku.dk>) Tue May 4 11:12:56 PDT 1999 Manish Singh <yosh@gimp.org> * gdk/gdkim.c (gdk_im_real_open): cast the return value of XSetIMValues to (void *) when comparing to NULL, to workaround the problem of some compilers barfing since older X headers don't have the prototype for it. Mon Apr 19 10:11:12 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkcolor.c (gdk_colormap_new): Fix memory leak for pseudocolor where colormap->colors was double allocated. * gdk/gdkcolor.c (gdk_colormap_alloc1): Store the color value in the hash table with the pixel filled in so when we do later hash table lookups, the color value is correct. Sun May 2 15:29:45 PDT 1999 Manish Singh <yosh@gimp.org> * gdk/gdkdraw.c (gdk_draw_lines): check private->destroyed before making the call Tue Apr 27 11:17:35 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkdnd.c (xdnd_set_{targets,actions}): Fix leak pointed out by Morten Welinder <terra@diku.dk>. Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com> * gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the default filter from the list Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com> * gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the default filter from the list Fri Apr 16 20:41:43 PDT 1999 Manish Singh <yosh@gimp.org> * gdk/gdk.c: #include "gdkkeysyms.h" for gdk_XConvertCase #defines * gtk/gtkfontsel.c (gtk_font_selection_create_xlfd): use g_strdup_printf instead of calcing the length separately Tue Apr 13 02:49:33 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkwindow.c: removed some silly #ifdef HAVE_CONFIG that we don't do in many other places. (Fixing duplicate #include of config.h) * gdk/gdkevents.c: include gdkinput.h _after_ config.h. Otherwise, #ifndef XINPUT_NONE check in the latter doesn't work. (Bug #546) Sun Apr 11 14:38:03 1999 Tim Janik <timj@gtk.org> * gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): check for color "None" case insensitive. Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkselection.c: Add error traps so if the other end of the connection dies, we survive. Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkdnd.c (gdk_drag_motion): Separate out the dest_xid field into two fields - one for the window to send in messages, one to indicate the last looked up window for caching purposes. This is needed, so that Leave messages get the correct window. Mon Apr 5 13:21:30 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkevents.c (gdk_event_check, gdk_event_prepare): Fix warning created by people mucking around with the gsource API. * gdk/gdkevents.c (gdk_io_invoke, gdk_input_add_full): Change mapping between GIOCondition and GdkInputCondition to match the way the Linux kernel does it. This should fix problems where closed pipes were no longer signalling GDK_INPUT_READ on systems with a native poll(). Mon Apr 5 17:11:57 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): Check explicitly for the string "None" - it is in the XPM spec and some servers treat unknown colors in odd ways (like asking the user!) Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org> * gdk/gdkevents.c: made "->" into a "." of previous change so it compiles Thu Apr 1 18:41:25 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkevents.c (gdk_compress_exposures): Set the window field of the event structure before calling user filters. 1999-03-31 Federico Mena Quintero <federico@nuclecu.unam.mx> * gdk/gdk.c (gdk_init_check): Use False as the last argument to XInternAtom() here. This is a particularly Old And Nasty(tm) bug. Mon Mar 29 17:31:52 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkim.c (gdk_mbstowcs): Free the value of the intermediate text property - prevents major memory leak when gdk_use_mb. gtk-d3august-990311-0: Bj|rn Augustsson <d3august@dtek.chalmers.se> Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com> Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp> gtk-a-higuti-990322-[0-3] * gdk/gdkfont.c (gdk_text_extents_wc): Make work when sizeof(wchar_t) != sizeof (GdkWChar) * configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS that was causing -DX_LOCALE not to work. * gtk/gtkrc.c (gtk_rc_init): X_LOCALE will never have LC_MESSAGES defined * gdk/gdk.c (gdk_init_check): Remove --xim-preedit and --xim-status from argv properly. * gdk/gdkim.c (gdk_ic_real_new): Add a gdk_flush() so that the client window is present on the X server before we pass it to the input method. Tue Mar 9 10:46:49 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkdnd.c (motif_find_drag_window): Fix bug where if --display is specified on the command line, than the drag window will not be created on that display. Tue Mar 9 10:38:24 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkproperty.c (gdk_atom_intern): Fixed bug where lookups with only_if_exists == TRUE were inserting bogus values into the atom cache. Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org> * gdk/gdkselection.c (gdk_selection_property_get): first XFree(t), then reset it to NULL. * gdk/gdkcolor.c: (gdk_colors_free): (gdk_colormap_free_colors): use colormap->colors[in_pixels[i]] as the key for g_hash_table_remove() in both functions, this prevents us from accessing possibly uninitialized portions of a GdkColor structure where we are only interested in its pixel value. Tue Mar 9 01:01:28 1999 Tim Janik <timj@gtk.org> * gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our font hash table, if we have a GdkFontPrivate entry for this font already, simply increment its reference count, provided by Olaf Dietsche <olaf.dietsche+list.gtk@netcologne.de>. 1999-09-21 Tor Lillqvist <tml@iki.fi>
1999-09-28 20:19:13 +00:00
/* What do we do with G_IO_NVAL?
*/
#define READ_CONDITION (G_IO_IN | G_IO_HUP | G_IO_ERR)
#define WRITE_CONDITION (G_IO_OUT | G_IO_ERR)
#define EXCEPTION_CONDITION (G_IO_PRI)
static gboolean
gdk_io_invoke (GIOChannel *source,
GIOCondition condition,
gpointer data)
{
GdkIOClosure *closure = data;
GdkInputCondition gdk_cond = 0;
[ Merges from gtk-1-2 ] Wed Sep 8 07:13:29 1999 Tim Janik <timj@gtk.org> * configure.in: fixed "GNU Make" check to pass with new make version 3.77.95. Fri Sep 3 16:04:41 1999 Tim Janik <timj@gtk.org> * gtk-config.in (--version): don't echo @GTK_VERSION@, but @GTK_MAJOR_VERSION@.@GTK_MINOR_VERSION@.@GTK_MICRO_VERSION@, so the AM_PATH_GTK() macros don't get confused by the -pre1. Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com> * configure.in (REBUILD): Change check for perl5 to check explicitely for v >= 5.002. (5.001 does not work with our scripts.) Wed Aug 25 15:45:46 1999 Tim Janik <timj@gtk.org> * configure.in: evaluate $PERL for the perl version check. added --disable-rebuilds to give the user an option to completely disable any source autogeneration rules. Mon Aug 23 23:16:14 1999 Tim Janik <timj@gtk.org> * configure.in: evaluate $ac_make when checking for GNU Make. Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org> * docs/Makefile.am: added generation.txt. * Makefile.am: require automake 1.4, build README from README.in and INSTALL from INSTALL.in in dist-hook. * README.in: * INSTALL.in: new files to autogenerate README and INSTALL from. * configure.in: figure whether we have GNU Make * docs/generation.txt: minor additions/corrections. Wed Aug 11 13:38:26 BST 1999 Tony Gale <gale@gtk.org> * docs/gtkfaq.sgml: FAQ Update July 30, 1999 Elliot Lee <sopwith@redhat.com> * configure.in: Fix autoconf warnings about cross compilation by trying to provide sane defaults for AC_TRY_RUN. Fri Jul 16 22:20:21 PDT 1999 Manish Singh <yosh@gimp.org> * ltconfig * ltmain.sh: upgrade to libtool 1.3.3 Thu Jul 8 11:30:18 1999 Owen Taylor <otaylor@redhat.com> * INSTALL: Indicate that the --with-glib= configure time flag is unsupported. Mon Jul 5 20:36:03 1999 Owen Taylor <otaylor@redhat.com> * docs/generation.txt: Added a file that gives documenation about the autogeneration process for various autogenerated files. Tue Jun 29 15:59:25 1999 Owen Taylor <otaylor@redhat.com> * configure.in (LIBS): Look for libgmodule in the right location. Thu Jun 17 13:57:31 1999 Owen Taylor <otaylor@redhat.com> * docs/gtk_tut.sgml: Removed references to code examples in my directory on gtk.org as they should all be in the tutorial now. * docs/gtk_tut.sgml: Added sources for dial-test and scribble-xinput programs that were previously missing. Fri Jun 4 00:08:59 1999 Owen Taylor <otaylor@redhat.com> * TODO: Added entry about menu keyboard navigation, removed some finished items. Mon May 31 00:11:24 1999 Owen Taylor <otaylor@redhat.com> * acinclude.m4: Standardize on func_dgettext not func_gettext, so that the checks for dgettext actually are paid attention to. Wed May 5 10:47:54 1999 Owen Taylor <otaylor@redhat.com> * configure.in (LIBS): Add $INTLLIBS into $LIBS directly, rather than repeating the checks for gettext. * INSTALL: Added information about gettext and NLS support. * acinclude.m4 (LIBM): Check for dgettext, not just gettext. This should hopefully fix things wrt systems with old versions of GNU gettext installed. Tue Jun 29 15:59:25 1999 Owen Taylor <otaylor@redhat.com> * configure.in (LIBS): Look for libgmodule in the right location. Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org> * autogen.sh: add --enable-maintainer-mode * configure.in: set ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS" Wed Mar 24 23:03:49 CST 1999 Shawn T. Amundson <amundson@gtk.org> * docs/gtk-config.1.in: docs/Makefile.am: configure.in: gtk-config is now generated. * docs/gtk-config.1: Removed, now generated. Thu Sep 23 17:59:59 1999 Tim Janik <timj@gtk.org> * gdk/gdkevents.c (gdk_event_translate): grr, even if Gdk doesn't handle CreateNotify itself, still put out a debuging message for --gdk-debug=events. made the ReparentNotify debugging message more verbose. wrap xcoords translation for ConfigureEvents into an error trap, a destroy event may already be pending, and in that case, the actuall coordinate values are not at all critical. Sat Sep 18 22:24:15 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkcc.c: Stop leaking the color_hash all over the place. Simplify and improve the logic. Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org> * gdk/gdk.h, gdk/gdkcolor.c: make return types (gint or gboolean) for prototypes and function implementations consistent (reported by Tomas Ogren). Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org> * gdk/gdkevents.c (gdk_event_translate): tell if expose events have send_event set in debugging output. (gdk_compress_exposures): default initialize the event so we don't operate on bogus values (namely send_event). Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkwindow.c: When we receive an unexpected destroy notify on one of our windows, don't just warn about it, also mark our windows as destroyed. Sun Sep 5 08:10:53 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkfont.c (gdk_font_hash_insert): Add name => font and name => fontset hashes. The name => fontset hash is a _big_ win since we weren't previously caching fontsets at all and loading fontsets is expensive. The name => font hash is less of a win, but it does save us from doing repeated XQueryFont calls on the same font. * gdk/gdkprivate.h (struct _GdkFontPrivate): Add a names list so we can remove font/fontset from hash. Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkproperty.c (gdk_atom_intern): Remove useless and slightly confusing test. [ XInternAtom (,,TRUE) will never return None ]. Sat Sep 4 08:39:26 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkwindow.c (gdk_window_set_geometry_hints) gdk/gdkwindow.c (gdk_window_set_hints): Don't omit setting the properties if flags == 0 - there may be an existing set of properties there already. (Very old bug. Would it be better to delete the property instead?) * gdk/gdkselection.c (gdk_selection_property_get): Fix spelling error in comment. Wed Sep 1 14:05:30 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkimage.c (gdk_image_new): Use gdk_error_trap_push() to avoid stomping over gdk_error_warnings. * gdk/gdkimage.c (gdk_image_new): compute image->bpp as (bits_per_pixel + 7) / 8. This gives the same result as before for multiples of 8, but actually a "reasonable" value for 1bit or 4bit displays. Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org> * gdk/Makefile.am: minor cleanups, strip spaces on build rules for GNU Make. Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org> * gdk/gdkevents.c (gdk_event_translate): give a debugging note when discarding configure events. 1999-08-18 Federico Mena Quintero <federico@redhat.com> * gdk/gdkpixmap.c (gdk_pixmap_unref): g_return_if_fail() the refcount is greater than zero. * gdk/gdkwindow.c (gdk_window_unref): Likewise. * gdk/gdkfont.c (gdk_font_unref): Likewise. * gdk/gdkgc.c (gdk_gc_unref): Likewise. * gdk/gdkdnd.c (gdk_drag_context_unref): Likewise. Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkproperty.c (gdk_property_get): Fix assumption that format 32 => sizeof(item) == 4. It really is sizeof(long). Tue Jun 29 23:02:42 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdk.c (gdk_x_error / gdk_x_io_error): Don't core dump at all on X IO errors, only core dump if --enable-debug for X errors. Thu Jun 24 17:06:23 1999 Tim Janik <timj@gtk.org> * gdk/gdkevents.c (gdk_event_translate): removed old ""Got event for unknown window:" message. disabled ConfigureNotify discarding code, because it led to events being processed out of order. Thu Jun 24 12:22:02 1999 Tim Janik <timj@gtk.org> * gdk/gdkglobals.c: preinitialize gdk_error_code to 0. * gdk/gdkevents.c (gdk_event_send_client_message_to_all_recurse): since we export this function, supress error warnings and don't reset the error code in the first half of this function. * gdk/gdk.c (gdk_x_error): set gdk_error_code to the actuall X error code (instead of just -1) so gdk_error_trap_pop() reveals something actually informative about the error that happened. * gdk/*.c: don't rely on gdk_error_code being -1 if an error occoured, but just gdk_error_code != 0. Thu Jun 24 11:50:07 1999 Tim Janik <timj@gtk.org> * gdk/gdkevents.c (gdk_event_apply_filters): advance the filter list pointer *before* invoking the filter function, so we at least don't crash if a filter is removed that is currently executed. window filters *really* need to be made truely reentrant at some point. Mon Jun 14 11:10:15 1999 Tim Janik <timj@gtk.org> * gdk/gdkevents.c (gdk_event_translate): print the atom name in the PropertyNotify debug messages. Wed May 5 22:51:06 1999 Owen Taylor <otaylor@redhat.com> Patch from Sung-Hyun Nam <namsh@lgic.co.kr> * gdk/gdkim.c: Fix cut-and-paste errors for x/y and PreeditAttributes/StatusAttributes. Wed May 5 22:24:21 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkwindow.c (gdk_window_set_geometry_hints): Change G_MAXINT to 2^16 to alleviate overflow problems in various window managers. Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkfont.c (gdk_text_measure): Fix the return value for fontsets. Wed May 5 12:42:01 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkwindow.c (gdk_window_set_geometry_hints): Initialize size_hints.x and size_hints.y because kwm brokenly pays attention to them. (Bug #1181 - Lars Heete <hel@admin.de>) Wed May 5 11:38:56 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkrgb.c (gdk_rgb_choose_visual): Free the return value of gdk_list_visuals(). (Bug #1193 - Morten Welinder <terra@diku.dk>) Tue May 4 11:12:56 PDT 1999 Manish Singh <yosh@gimp.org> * gdk/gdkim.c (gdk_im_real_open): cast the return value of XSetIMValues to (void *) when comparing to NULL, to workaround the problem of some compilers barfing since older X headers don't have the prototype for it. Mon Apr 19 10:11:12 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkcolor.c (gdk_colormap_new): Fix memory leak for pseudocolor where colormap->colors was double allocated. * gdk/gdkcolor.c (gdk_colormap_alloc1): Store the color value in the hash table with the pixel filled in so when we do later hash table lookups, the color value is correct. Sun May 2 15:29:45 PDT 1999 Manish Singh <yosh@gimp.org> * gdk/gdkdraw.c (gdk_draw_lines): check private->destroyed before making the call Tue Apr 27 11:17:35 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkdnd.c (xdnd_set_{targets,actions}): Fix leak pointed out by Morten Welinder <terra@diku.dk>. Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com> * gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the default filter from the list Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com> * gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the default filter from the list Fri Apr 16 20:41:43 PDT 1999 Manish Singh <yosh@gimp.org> * gdk/gdk.c: #include "gdkkeysyms.h" for gdk_XConvertCase #defines * gtk/gtkfontsel.c (gtk_font_selection_create_xlfd): use g_strdup_printf instead of calcing the length separately Tue Apr 13 02:49:33 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkwindow.c: removed some silly #ifdef HAVE_CONFIG that we don't do in many other places. (Fixing duplicate #include of config.h) * gdk/gdkevents.c: include gdkinput.h _after_ config.h. Otherwise, #ifndef XINPUT_NONE check in the latter doesn't work. (Bug #546) Sun Apr 11 14:38:03 1999 Tim Janik <timj@gtk.org> * gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): check for color "None" case insensitive. Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkselection.c: Add error traps so if the other end of the connection dies, we survive. Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkdnd.c (gdk_drag_motion): Separate out the dest_xid field into two fields - one for the window to send in messages, one to indicate the last looked up window for caching purposes. This is needed, so that Leave messages get the correct window. Mon Apr 5 13:21:30 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkevents.c (gdk_event_check, gdk_event_prepare): Fix warning created by people mucking around with the gsource API. * gdk/gdkevents.c (gdk_io_invoke, gdk_input_add_full): Change mapping between GIOCondition and GdkInputCondition to match the way the Linux kernel does it. This should fix problems where closed pipes were no longer signalling GDK_INPUT_READ on systems with a native poll(). Mon Apr 5 17:11:57 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): Check explicitly for the string "None" - it is in the XPM spec and some servers treat unknown colors in odd ways (like asking the user!) Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org> * gdk/gdkevents.c: made "->" into a "." of previous change so it compiles Thu Apr 1 18:41:25 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkevents.c (gdk_compress_exposures): Set the window field of the event structure before calling user filters. 1999-03-31 Federico Mena Quintero <federico@nuclecu.unam.mx> * gdk/gdk.c (gdk_init_check): Use False as the last argument to XInternAtom() here. This is a particularly Old And Nasty(tm) bug. Mon Mar 29 17:31:52 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkim.c (gdk_mbstowcs): Free the value of the intermediate text property - prevents major memory leak when gdk_use_mb. gtk-d3august-990311-0: Bj|rn Augustsson <d3august@dtek.chalmers.se> Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com> Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp> gtk-a-higuti-990322-[0-3] * gdk/gdkfont.c (gdk_text_extents_wc): Make work when sizeof(wchar_t) != sizeof (GdkWChar) * configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS that was causing -DX_LOCALE not to work. * gtk/gtkrc.c (gtk_rc_init): X_LOCALE will never have LC_MESSAGES defined * gdk/gdk.c (gdk_init_check): Remove --xim-preedit and --xim-status from argv properly. * gdk/gdkim.c (gdk_ic_real_new): Add a gdk_flush() so that the client window is present on the X server before we pass it to the input method. Tue Mar 9 10:46:49 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkdnd.c (motif_find_drag_window): Fix bug where if --display is specified on the command line, than the drag window will not be created on that display. Tue Mar 9 10:38:24 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkproperty.c (gdk_atom_intern): Fixed bug where lookups with only_if_exists == TRUE were inserting bogus values into the atom cache. Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org> * gdk/gdkselection.c (gdk_selection_property_get): first XFree(t), then reset it to NULL. * gdk/gdkcolor.c: (gdk_colors_free): (gdk_colormap_free_colors): use colormap->colors[in_pixels[i]] as the key for g_hash_table_remove() in both functions, this prevents us from accessing possibly uninitialized portions of a GdkColor structure where we are only interested in its pixel value. Tue Mar 9 01:01:28 1999 Tim Janik <timj@gtk.org> * gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our font hash table, if we have a GdkFontPrivate entry for this font already, simply increment its reference count, provided by Olaf Dietsche <olaf.dietsche+list.gtk@netcologne.de>. 1999-09-21 Tor Lillqvist <tml@iki.fi>
1999-09-28 20:19:13 +00:00
if (condition & READ_CONDITION)
gdk_cond |= GDK_INPUT_READ;
[ Merges from gtk-1-2 ] Wed Sep 8 07:13:29 1999 Tim Janik <timj@gtk.org> * configure.in: fixed "GNU Make" check to pass with new make version 3.77.95. Fri Sep 3 16:04:41 1999 Tim Janik <timj@gtk.org> * gtk-config.in (--version): don't echo @GTK_VERSION@, but @GTK_MAJOR_VERSION@.@GTK_MINOR_VERSION@.@GTK_MICRO_VERSION@, so the AM_PATH_GTK() macros don't get confused by the -pre1. Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com> * configure.in (REBUILD): Change check for perl5 to check explicitely for v >= 5.002. (5.001 does not work with our scripts.) Wed Aug 25 15:45:46 1999 Tim Janik <timj@gtk.org> * configure.in: evaluate $PERL for the perl version check. added --disable-rebuilds to give the user an option to completely disable any source autogeneration rules. Mon Aug 23 23:16:14 1999 Tim Janik <timj@gtk.org> * configure.in: evaluate $ac_make when checking for GNU Make. Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org> * docs/Makefile.am: added generation.txt. * Makefile.am: require automake 1.4, build README from README.in and INSTALL from INSTALL.in in dist-hook. * README.in: * INSTALL.in: new files to autogenerate README and INSTALL from. * configure.in: figure whether we have GNU Make * docs/generation.txt: minor additions/corrections. Wed Aug 11 13:38:26 BST 1999 Tony Gale <gale@gtk.org> * docs/gtkfaq.sgml: FAQ Update July 30, 1999 Elliot Lee <sopwith@redhat.com> * configure.in: Fix autoconf warnings about cross compilation by trying to provide sane defaults for AC_TRY_RUN. Fri Jul 16 22:20:21 PDT 1999 Manish Singh <yosh@gimp.org> * ltconfig * ltmain.sh: upgrade to libtool 1.3.3 Thu Jul 8 11:30:18 1999 Owen Taylor <otaylor@redhat.com> * INSTALL: Indicate that the --with-glib= configure time flag is unsupported. Mon Jul 5 20:36:03 1999 Owen Taylor <otaylor@redhat.com> * docs/generation.txt: Added a file that gives documenation about the autogeneration process for various autogenerated files. Tue Jun 29 15:59:25 1999 Owen Taylor <otaylor@redhat.com> * configure.in (LIBS): Look for libgmodule in the right location. Thu Jun 17 13:57:31 1999 Owen Taylor <otaylor@redhat.com> * docs/gtk_tut.sgml: Removed references to code examples in my directory on gtk.org as they should all be in the tutorial now. * docs/gtk_tut.sgml: Added sources for dial-test and scribble-xinput programs that were previously missing. Fri Jun 4 00:08:59 1999 Owen Taylor <otaylor@redhat.com> * TODO: Added entry about menu keyboard navigation, removed some finished items. Mon May 31 00:11:24 1999 Owen Taylor <otaylor@redhat.com> * acinclude.m4: Standardize on func_dgettext not func_gettext, so that the checks for dgettext actually are paid attention to. Wed May 5 10:47:54 1999 Owen Taylor <otaylor@redhat.com> * configure.in (LIBS): Add $INTLLIBS into $LIBS directly, rather than repeating the checks for gettext. * INSTALL: Added information about gettext and NLS support. * acinclude.m4 (LIBM): Check for dgettext, not just gettext. This should hopefully fix things wrt systems with old versions of GNU gettext installed. Tue Jun 29 15:59:25 1999 Owen Taylor <otaylor@redhat.com> * configure.in (LIBS): Look for libgmodule in the right location. Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org> * autogen.sh: add --enable-maintainer-mode * configure.in: set ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS" Wed Mar 24 23:03:49 CST 1999 Shawn T. Amundson <amundson@gtk.org> * docs/gtk-config.1.in: docs/Makefile.am: configure.in: gtk-config is now generated. * docs/gtk-config.1: Removed, now generated. Thu Sep 23 17:59:59 1999 Tim Janik <timj@gtk.org> * gdk/gdkevents.c (gdk_event_translate): grr, even if Gdk doesn't handle CreateNotify itself, still put out a debuging message for --gdk-debug=events. made the ReparentNotify debugging message more verbose. wrap xcoords translation for ConfigureEvents into an error trap, a destroy event may already be pending, and in that case, the actuall coordinate values are not at all critical. Sat Sep 18 22:24:15 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkcc.c: Stop leaking the color_hash all over the place. Simplify and improve the logic. Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org> * gdk/gdk.h, gdk/gdkcolor.c: make return types (gint or gboolean) for prototypes and function implementations consistent (reported by Tomas Ogren). Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org> * gdk/gdkevents.c (gdk_event_translate): tell if expose events have send_event set in debugging output. (gdk_compress_exposures): default initialize the event so we don't operate on bogus values (namely send_event). Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkwindow.c: When we receive an unexpected destroy notify on one of our windows, don't just warn about it, also mark our windows as destroyed. Sun Sep 5 08:10:53 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkfont.c (gdk_font_hash_insert): Add name => font and name => fontset hashes. The name => fontset hash is a _big_ win since we weren't previously caching fontsets at all and loading fontsets is expensive. The name => font hash is less of a win, but it does save us from doing repeated XQueryFont calls on the same font. * gdk/gdkprivate.h (struct _GdkFontPrivate): Add a names list so we can remove font/fontset from hash. Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkproperty.c (gdk_atom_intern): Remove useless and slightly confusing test. [ XInternAtom (,,TRUE) will never return None ]. Sat Sep 4 08:39:26 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkwindow.c (gdk_window_set_geometry_hints) gdk/gdkwindow.c (gdk_window_set_hints): Don't omit setting the properties if flags == 0 - there may be an existing set of properties there already. (Very old bug. Would it be better to delete the property instead?) * gdk/gdkselection.c (gdk_selection_property_get): Fix spelling error in comment. Wed Sep 1 14:05:30 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkimage.c (gdk_image_new): Use gdk_error_trap_push() to avoid stomping over gdk_error_warnings. * gdk/gdkimage.c (gdk_image_new): compute image->bpp as (bits_per_pixel + 7) / 8. This gives the same result as before for multiples of 8, but actually a "reasonable" value for 1bit or 4bit displays. Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org> * gdk/Makefile.am: minor cleanups, strip spaces on build rules for GNU Make. Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org> * gdk/gdkevents.c (gdk_event_translate): give a debugging note when discarding configure events. 1999-08-18 Federico Mena Quintero <federico@redhat.com> * gdk/gdkpixmap.c (gdk_pixmap_unref): g_return_if_fail() the refcount is greater than zero. * gdk/gdkwindow.c (gdk_window_unref): Likewise. * gdk/gdkfont.c (gdk_font_unref): Likewise. * gdk/gdkgc.c (gdk_gc_unref): Likewise. * gdk/gdkdnd.c (gdk_drag_context_unref): Likewise. Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkproperty.c (gdk_property_get): Fix assumption that format 32 => sizeof(item) == 4. It really is sizeof(long). Tue Jun 29 23:02:42 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdk.c (gdk_x_error / gdk_x_io_error): Don't core dump at all on X IO errors, only core dump if --enable-debug for X errors. Thu Jun 24 17:06:23 1999 Tim Janik <timj@gtk.org> * gdk/gdkevents.c (gdk_event_translate): removed old ""Got event for unknown window:" message. disabled ConfigureNotify discarding code, because it led to events being processed out of order. Thu Jun 24 12:22:02 1999 Tim Janik <timj@gtk.org> * gdk/gdkglobals.c: preinitialize gdk_error_code to 0. * gdk/gdkevents.c (gdk_event_send_client_message_to_all_recurse): since we export this function, supress error warnings and don't reset the error code in the first half of this function. * gdk/gdk.c (gdk_x_error): set gdk_error_code to the actuall X error code (instead of just -1) so gdk_error_trap_pop() reveals something actually informative about the error that happened. * gdk/*.c: don't rely on gdk_error_code being -1 if an error occoured, but just gdk_error_code != 0. Thu Jun 24 11:50:07 1999 Tim Janik <timj@gtk.org> * gdk/gdkevents.c (gdk_event_apply_filters): advance the filter list pointer *before* invoking the filter function, so we at least don't crash if a filter is removed that is currently executed. window filters *really* need to be made truely reentrant at some point. Mon Jun 14 11:10:15 1999 Tim Janik <timj@gtk.org> * gdk/gdkevents.c (gdk_event_translate): print the atom name in the PropertyNotify debug messages. Wed May 5 22:51:06 1999 Owen Taylor <otaylor@redhat.com> Patch from Sung-Hyun Nam <namsh@lgic.co.kr> * gdk/gdkim.c: Fix cut-and-paste errors for x/y and PreeditAttributes/StatusAttributes. Wed May 5 22:24:21 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkwindow.c (gdk_window_set_geometry_hints): Change G_MAXINT to 2^16 to alleviate overflow problems in various window managers. Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkfont.c (gdk_text_measure): Fix the return value for fontsets. Wed May 5 12:42:01 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkwindow.c (gdk_window_set_geometry_hints): Initialize size_hints.x and size_hints.y because kwm brokenly pays attention to them. (Bug #1181 - Lars Heete <hel@admin.de>) Wed May 5 11:38:56 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkrgb.c (gdk_rgb_choose_visual): Free the return value of gdk_list_visuals(). (Bug #1193 - Morten Welinder <terra@diku.dk>) Tue May 4 11:12:56 PDT 1999 Manish Singh <yosh@gimp.org> * gdk/gdkim.c (gdk_im_real_open): cast the return value of XSetIMValues to (void *) when comparing to NULL, to workaround the problem of some compilers barfing since older X headers don't have the prototype for it. Mon Apr 19 10:11:12 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkcolor.c (gdk_colormap_new): Fix memory leak for pseudocolor where colormap->colors was double allocated. * gdk/gdkcolor.c (gdk_colormap_alloc1): Store the color value in the hash table with the pixel filled in so when we do later hash table lookups, the color value is correct. Sun May 2 15:29:45 PDT 1999 Manish Singh <yosh@gimp.org> * gdk/gdkdraw.c (gdk_draw_lines): check private->destroyed before making the call Tue Apr 27 11:17:35 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkdnd.c (xdnd_set_{targets,actions}): Fix leak pointed out by Morten Welinder <terra@diku.dk>. Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com> * gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the default filter from the list Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com> * gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the default filter from the list Fri Apr 16 20:41:43 PDT 1999 Manish Singh <yosh@gimp.org> * gdk/gdk.c: #include "gdkkeysyms.h" for gdk_XConvertCase #defines * gtk/gtkfontsel.c (gtk_font_selection_create_xlfd): use g_strdup_printf instead of calcing the length separately Tue Apr 13 02:49:33 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkwindow.c: removed some silly #ifdef HAVE_CONFIG that we don't do in many other places. (Fixing duplicate #include of config.h) * gdk/gdkevents.c: include gdkinput.h _after_ config.h. Otherwise, #ifndef XINPUT_NONE check in the latter doesn't work. (Bug #546) Sun Apr 11 14:38:03 1999 Tim Janik <timj@gtk.org> * gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): check for color "None" case insensitive. Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkselection.c: Add error traps so if the other end of the connection dies, we survive. Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkdnd.c (gdk_drag_motion): Separate out the dest_xid field into two fields - one for the window to send in messages, one to indicate the last looked up window for caching purposes. This is needed, so that Leave messages get the correct window. Mon Apr 5 13:21:30 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkevents.c (gdk_event_check, gdk_event_prepare): Fix warning created by people mucking around with the gsource API. * gdk/gdkevents.c (gdk_io_invoke, gdk_input_add_full): Change mapping between GIOCondition and GdkInputCondition to match the way the Linux kernel does it. This should fix problems where closed pipes were no longer signalling GDK_INPUT_READ on systems with a native poll(). Mon Apr 5 17:11:57 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): Check explicitly for the string "None" - it is in the XPM spec and some servers treat unknown colors in odd ways (like asking the user!) Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org> * gdk/gdkevents.c: made "->" into a "." of previous change so it compiles Thu Apr 1 18:41:25 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkevents.c (gdk_compress_exposures): Set the window field of the event structure before calling user filters. 1999-03-31 Federico Mena Quintero <federico@nuclecu.unam.mx> * gdk/gdk.c (gdk_init_check): Use False as the last argument to XInternAtom() here. This is a particularly Old And Nasty(tm) bug. Mon Mar 29 17:31:52 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkim.c (gdk_mbstowcs): Free the value of the intermediate text property - prevents major memory leak when gdk_use_mb. gtk-d3august-990311-0: Bj|rn Augustsson <d3august@dtek.chalmers.se> Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com> Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp> gtk-a-higuti-990322-[0-3] * gdk/gdkfont.c (gdk_text_extents_wc): Make work when sizeof(wchar_t) != sizeof (GdkWChar) * configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS that was causing -DX_LOCALE not to work. * gtk/gtkrc.c (gtk_rc_init): X_LOCALE will never have LC_MESSAGES defined * gdk/gdk.c (gdk_init_check): Remove --xim-preedit and --xim-status from argv properly. * gdk/gdkim.c (gdk_ic_real_new): Add a gdk_flush() so that the client window is present on the X server before we pass it to the input method. Tue Mar 9 10:46:49 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkdnd.c (motif_find_drag_window): Fix bug where if --display is specified on the command line, than the drag window will not be created on that display. Tue Mar 9 10:38:24 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkproperty.c (gdk_atom_intern): Fixed bug where lookups with only_if_exists == TRUE were inserting bogus values into the atom cache. Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org> * gdk/gdkselection.c (gdk_selection_property_get): first XFree(t), then reset it to NULL. * gdk/gdkcolor.c: (gdk_colors_free): (gdk_colormap_free_colors): use colormap->colors[in_pixels[i]] as the key for g_hash_table_remove() in both functions, this prevents us from accessing possibly uninitialized portions of a GdkColor structure where we are only interested in its pixel value. Tue Mar 9 01:01:28 1999 Tim Janik <timj@gtk.org> * gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our font hash table, if we have a GdkFontPrivate entry for this font already, simply increment its reference count, provided by Olaf Dietsche <olaf.dietsche+list.gtk@netcologne.de>. 1999-09-21 Tor Lillqvist <tml@iki.fi>
1999-09-28 20:19:13 +00:00
if (condition & WRITE_CONDITION)
gdk_cond |= GDK_INPUT_WRITE;
[ Merges from gtk-1-2 ] Wed Sep 8 07:13:29 1999 Tim Janik <timj@gtk.org> * configure.in: fixed "GNU Make" check to pass with new make version 3.77.95. Fri Sep 3 16:04:41 1999 Tim Janik <timj@gtk.org> * gtk-config.in (--version): don't echo @GTK_VERSION@, but @GTK_MAJOR_VERSION@.@GTK_MINOR_VERSION@.@GTK_MICRO_VERSION@, so the AM_PATH_GTK() macros don't get confused by the -pre1. Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com> * configure.in (REBUILD): Change check for perl5 to check explicitely for v >= 5.002. (5.001 does not work with our scripts.) Wed Aug 25 15:45:46 1999 Tim Janik <timj@gtk.org> * configure.in: evaluate $PERL for the perl version check. added --disable-rebuilds to give the user an option to completely disable any source autogeneration rules. Mon Aug 23 23:16:14 1999 Tim Janik <timj@gtk.org> * configure.in: evaluate $ac_make when checking for GNU Make. Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org> * docs/Makefile.am: added generation.txt. * Makefile.am: require automake 1.4, build README from README.in and INSTALL from INSTALL.in in dist-hook. * README.in: * INSTALL.in: new files to autogenerate README and INSTALL from. * configure.in: figure whether we have GNU Make * docs/generation.txt: minor additions/corrections. Wed Aug 11 13:38:26 BST 1999 Tony Gale <gale@gtk.org> * docs/gtkfaq.sgml: FAQ Update July 30, 1999 Elliot Lee <sopwith@redhat.com> * configure.in: Fix autoconf warnings about cross compilation by trying to provide sane defaults for AC_TRY_RUN. Fri Jul 16 22:20:21 PDT 1999 Manish Singh <yosh@gimp.org> * ltconfig * ltmain.sh: upgrade to libtool 1.3.3 Thu Jul 8 11:30:18 1999 Owen Taylor <otaylor@redhat.com> * INSTALL: Indicate that the --with-glib= configure time flag is unsupported. Mon Jul 5 20:36:03 1999 Owen Taylor <otaylor@redhat.com> * docs/generation.txt: Added a file that gives documenation about the autogeneration process for various autogenerated files. Tue Jun 29 15:59:25 1999 Owen Taylor <otaylor@redhat.com> * configure.in (LIBS): Look for libgmodule in the right location. Thu Jun 17 13:57:31 1999 Owen Taylor <otaylor@redhat.com> * docs/gtk_tut.sgml: Removed references to code examples in my directory on gtk.org as they should all be in the tutorial now. * docs/gtk_tut.sgml: Added sources for dial-test and scribble-xinput programs that were previously missing. Fri Jun 4 00:08:59 1999 Owen Taylor <otaylor@redhat.com> * TODO: Added entry about menu keyboard navigation, removed some finished items. Mon May 31 00:11:24 1999 Owen Taylor <otaylor@redhat.com> * acinclude.m4: Standardize on func_dgettext not func_gettext, so that the checks for dgettext actually are paid attention to. Wed May 5 10:47:54 1999 Owen Taylor <otaylor@redhat.com> * configure.in (LIBS): Add $INTLLIBS into $LIBS directly, rather than repeating the checks for gettext. * INSTALL: Added information about gettext and NLS support. * acinclude.m4 (LIBM): Check for dgettext, not just gettext. This should hopefully fix things wrt systems with old versions of GNU gettext installed. Tue Jun 29 15:59:25 1999 Owen Taylor <otaylor@redhat.com> * configure.in (LIBS): Look for libgmodule in the right location. Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org> * autogen.sh: add --enable-maintainer-mode * configure.in: set ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS" Wed Mar 24 23:03:49 CST 1999 Shawn T. Amundson <amundson@gtk.org> * docs/gtk-config.1.in: docs/Makefile.am: configure.in: gtk-config is now generated. * docs/gtk-config.1: Removed, now generated. Thu Sep 23 17:59:59 1999 Tim Janik <timj@gtk.org> * gdk/gdkevents.c (gdk_event_translate): grr, even if Gdk doesn't handle CreateNotify itself, still put out a debuging message for --gdk-debug=events. made the ReparentNotify debugging message more verbose. wrap xcoords translation for ConfigureEvents into an error trap, a destroy event may already be pending, and in that case, the actuall coordinate values are not at all critical. Sat Sep 18 22:24:15 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkcc.c: Stop leaking the color_hash all over the place. Simplify and improve the logic. Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org> * gdk/gdk.h, gdk/gdkcolor.c: make return types (gint or gboolean) for prototypes and function implementations consistent (reported by Tomas Ogren). Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org> * gdk/gdkevents.c (gdk_event_translate): tell if expose events have send_event set in debugging output. (gdk_compress_exposures): default initialize the event so we don't operate on bogus values (namely send_event). Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkwindow.c: When we receive an unexpected destroy notify on one of our windows, don't just warn about it, also mark our windows as destroyed. Sun Sep 5 08:10:53 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkfont.c (gdk_font_hash_insert): Add name => font and name => fontset hashes. The name => fontset hash is a _big_ win since we weren't previously caching fontsets at all and loading fontsets is expensive. The name => font hash is less of a win, but it does save us from doing repeated XQueryFont calls on the same font. * gdk/gdkprivate.h (struct _GdkFontPrivate): Add a names list so we can remove font/fontset from hash. Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkproperty.c (gdk_atom_intern): Remove useless and slightly confusing test. [ XInternAtom (,,TRUE) will never return None ]. Sat Sep 4 08:39:26 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkwindow.c (gdk_window_set_geometry_hints) gdk/gdkwindow.c (gdk_window_set_hints): Don't omit setting the properties if flags == 0 - there may be an existing set of properties there already. (Very old bug. Would it be better to delete the property instead?) * gdk/gdkselection.c (gdk_selection_property_get): Fix spelling error in comment. Wed Sep 1 14:05:30 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkimage.c (gdk_image_new): Use gdk_error_trap_push() to avoid stomping over gdk_error_warnings. * gdk/gdkimage.c (gdk_image_new): compute image->bpp as (bits_per_pixel + 7) / 8. This gives the same result as before for multiples of 8, but actually a "reasonable" value for 1bit or 4bit displays. Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org> * gdk/Makefile.am: minor cleanups, strip spaces on build rules for GNU Make. Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org> * gdk/gdkevents.c (gdk_event_translate): give a debugging note when discarding configure events. 1999-08-18 Federico Mena Quintero <federico@redhat.com> * gdk/gdkpixmap.c (gdk_pixmap_unref): g_return_if_fail() the refcount is greater than zero. * gdk/gdkwindow.c (gdk_window_unref): Likewise. * gdk/gdkfont.c (gdk_font_unref): Likewise. * gdk/gdkgc.c (gdk_gc_unref): Likewise. * gdk/gdkdnd.c (gdk_drag_context_unref): Likewise. Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkproperty.c (gdk_property_get): Fix assumption that format 32 => sizeof(item) == 4. It really is sizeof(long). Tue Jun 29 23:02:42 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdk.c (gdk_x_error / gdk_x_io_error): Don't core dump at all on X IO errors, only core dump if --enable-debug for X errors. Thu Jun 24 17:06:23 1999 Tim Janik <timj@gtk.org> * gdk/gdkevents.c (gdk_event_translate): removed old ""Got event for unknown window:" message. disabled ConfigureNotify discarding code, because it led to events being processed out of order. Thu Jun 24 12:22:02 1999 Tim Janik <timj@gtk.org> * gdk/gdkglobals.c: preinitialize gdk_error_code to 0. * gdk/gdkevents.c (gdk_event_send_client_message_to_all_recurse): since we export this function, supress error warnings and don't reset the error code in the first half of this function. * gdk/gdk.c (gdk_x_error): set gdk_error_code to the actuall X error code (instead of just -1) so gdk_error_trap_pop() reveals something actually informative about the error that happened. * gdk/*.c: don't rely on gdk_error_code being -1 if an error occoured, but just gdk_error_code != 0. Thu Jun 24 11:50:07 1999 Tim Janik <timj@gtk.org> * gdk/gdkevents.c (gdk_event_apply_filters): advance the filter list pointer *before* invoking the filter function, so we at least don't crash if a filter is removed that is currently executed. window filters *really* need to be made truely reentrant at some point. Mon Jun 14 11:10:15 1999 Tim Janik <timj@gtk.org> * gdk/gdkevents.c (gdk_event_translate): print the atom name in the PropertyNotify debug messages. Wed May 5 22:51:06 1999 Owen Taylor <otaylor@redhat.com> Patch from Sung-Hyun Nam <namsh@lgic.co.kr> * gdk/gdkim.c: Fix cut-and-paste errors for x/y and PreeditAttributes/StatusAttributes. Wed May 5 22:24:21 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkwindow.c (gdk_window_set_geometry_hints): Change G_MAXINT to 2^16 to alleviate overflow problems in various window managers. Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkfont.c (gdk_text_measure): Fix the return value for fontsets. Wed May 5 12:42:01 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkwindow.c (gdk_window_set_geometry_hints): Initialize size_hints.x and size_hints.y because kwm brokenly pays attention to them. (Bug #1181 - Lars Heete <hel@admin.de>) Wed May 5 11:38:56 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkrgb.c (gdk_rgb_choose_visual): Free the return value of gdk_list_visuals(). (Bug #1193 - Morten Welinder <terra@diku.dk>) Tue May 4 11:12:56 PDT 1999 Manish Singh <yosh@gimp.org> * gdk/gdkim.c (gdk_im_real_open): cast the return value of XSetIMValues to (void *) when comparing to NULL, to workaround the problem of some compilers barfing since older X headers don't have the prototype for it. Mon Apr 19 10:11:12 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkcolor.c (gdk_colormap_new): Fix memory leak for pseudocolor where colormap->colors was double allocated. * gdk/gdkcolor.c (gdk_colormap_alloc1): Store the color value in the hash table with the pixel filled in so when we do later hash table lookups, the color value is correct. Sun May 2 15:29:45 PDT 1999 Manish Singh <yosh@gimp.org> * gdk/gdkdraw.c (gdk_draw_lines): check private->destroyed before making the call Tue Apr 27 11:17:35 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkdnd.c (xdnd_set_{targets,actions}): Fix leak pointed out by Morten Welinder <terra@diku.dk>. Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com> * gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the default filter from the list Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com> * gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the default filter from the list Fri Apr 16 20:41:43 PDT 1999 Manish Singh <yosh@gimp.org> * gdk/gdk.c: #include "gdkkeysyms.h" for gdk_XConvertCase #defines * gtk/gtkfontsel.c (gtk_font_selection_create_xlfd): use g_strdup_printf instead of calcing the length separately Tue Apr 13 02:49:33 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkwindow.c: removed some silly #ifdef HAVE_CONFIG that we don't do in many other places. (Fixing duplicate #include of config.h) * gdk/gdkevents.c: include gdkinput.h _after_ config.h. Otherwise, #ifndef XINPUT_NONE check in the latter doesn't work. (Bug #546) Sun Apr 11 14:38:03 1999 Tim Janik <timj@gtk.org> * gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): check for color "None" case insensitive. Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkselection.c: Add error traps so if the other end of the connection dies, we survive. Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkdnd.c (gdk_drag_motion): Separate out the dest_xid field into two fields - one for the window to send in messages, one to indicate the last looked up window for caching purposes. This is needed, so that Leave messages get the correct window. Mon Apr 5 13:21:30 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkevents.c (gdk_event_check, gdk_event_prepare): Fix warning created by people mucking around with the gsource API. * gdk/gdkevents.c (gdk_io_invoke, gdk_input_add_full): Change mapping between GIOCondition and GdkInputCondition to match the way the Linux kernel does it. This should fix problems where closed pipes were no longer signalling GDK_INPUT_READ on systems with a native poll(). Mon Apr 5 17:11:57 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): Check explicitly for the string "None" - it is in the XPM spec and some servers treat unknown colors in odd ways (like asking the user!) Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org> * gdk/gdkevents.c: made "->" into a "." of previous change so it compiles Thu Apr 1 18:41:25 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkevents.c (gdk_compress_exposures): Set the window field of the event structure before calling user filters. 1999-03-31 Federico Mena Quintero <federico@nuclecu.unam.mx> * gdk/gdk.c (gdk_init_check): Use False as the last argument to XInternAtom() here. This is a particularly Old And Nasty(tm) bug. Mon Mar 29 17:31:52 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkim.c (gdk_mbstowcs): Free the value of the intermediate text property - prevents major memory leak when gdk_use_mb. gtk-d3august-990311-0: Bj|rn Augustsson <d3august@dtek.chalmers.se> Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com> Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp> gtk-a-higuti-990322-[0-3] * gdk/gdkfont.c (gdk_text_extents_wc): Make work when sizeof(wchar_t) != sizeof (GdkWChar) * configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS that was causing -DX_LOCALE not to work. * gtk/gtkrc.c (gtk_rc_init): X_LOCALE will never have LC_MESSAGES defined * gdk/gdk.c (gdk_init_check): Remove --xim-preedit and --xim-status from argv properly. * gdk/gdkim.c (gdk_ic_real_new): Add a gdk_flush() so that the client window is present on the X server before we pass it to the input method. Tue Mar 9 10:46:49 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkdnd.c (motif_find_drag_window): Fix bug where if --display is specified on the command line, than the drag window will not be created on that display. Tue Mar 9 10:38:24 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkproperty.c (gdk_atom_intern): Fixed bug where lookups with only_if_exists == TRUE were inserting bogus values into the atom cache. Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org> * gdk/gdkselection.c (gdk_selection_property_get): first XFree(t), then reset it to NULL. * gdk/gdkcolor.c: (gdk_colors_free): (gdk_colormap_free_colors): use colormap->colors[in_pixels[i]] as the key for g_hash_table_remove() in both functions, this prevents us from accessing possibly uninitialized portions of a GdkColor structure where we are only interested in its pixel value. Tue Mar 9 01:01:28 1999 Tim Janik <timj@gtk.org> * gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our font hash table, if we have a GdkFontPrivate entry for this font already, simply increment its reference count, provided by Olaf Dietsche <olaf.dietsche+list.gtk@netcologne.de>. 1999-09-21 Tor Lillqvist <tml@iki.fi>
1999-09-28 20:19:13 +00:00
if (condition & EXCEPTION_CONDITION)
gdk_cond |= GDK_INPUT_EXCEPTION;
if (closure->condition & gdk_cond)
closure->function (closure->data, g_io_channel_unix_get_fd (source), gdk_cond);
return TRUE;
}
gint
gdk_input_add_full (gint source,
GdkInputCondition condition,
GdkInputFunction function,
gpointer data,
GdkDestroyNotify destroy)
{
guint result;
GdkIOClosure *closure = g_new (GdkIOClosure, 1);
GIOChannel *channel;
GIOCondition cond = 0;
closure->function = function;
closure->condition = condition;
closure->notify = destroy;
closure->data = data;
if (condition & GDK_INPUT_READ)
[ Merges from gtk-1-2 ] Wed Sep 8 07:13:29 1999 Tim Janik <timj@gtk.org> * configure.in: fixed "GNU Make" check to pass with new make version 3.77.95. Fri Sep 3 16:04:41 1999 Tim Janik <timj@gtk.org> * gtk-config.in (--version): don't echo @GTK_VERSION@, but @GTK_MAJOR_VERSION@.@GTK_MINOR_VERSION@.@GTK_MICRO_VERSION@, so the AM_PATH_GTK() macros don't get confused by the -pre1. Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com> * configure.in (REBUILD): Change check for perl5 to check explicitely for v >= 5.002. (5.001 does not work with our scripts.) Wed Aug 25 15:45:46 1999 Tim Janik <timj@gtk.org> * configure.in: evaluate $PERL for the perl version check. added --disable-rebuilds to give the user an option to completely disable any source autogeneration rules. Mon Aug 23 23:16:14 1999 Tim Janik <timj@gtk.org> * configure.in: evaluate $ac_make when checking for GNU Make. Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org> * docs/Makefile.am: added generation.txt. * Makefile.am: require automake 1.4, build README from README.in and INSTALL from INSTALL.in in dist-hook. * README.in: * INSTALL.in: new files to autogenerate README and INSTALL from. * configure.in: figure whether we have GNU Make * docs/generation.txt: minor additions/corrections. Wed Aug 11 13:38:26 BST 1999 Tony Gale <gale@gtk.org> * docs/gtkfaq.sgml: FAQ Update July 30, 1999 Elliot Lee <sopwith@redhat.com> * configure.in: Fix autoconf warnings about cross compilation by trying to provide sane defaults for AC_TRY_RUN. Fri Jul 16 22:20:21 PDT 1999 Manish Singh <yosh@gimp.org> * ltconfig * ltmain.sh: upgrade to libtool 1.3.3 Thu Jul 8 11:30:18 1999 Owen Taylor <otaylor@redhat.com> * INSTALL: Indicate that the --with-glib= configure time flag is unsupported. Mon Jul 5 20:36:03 1999 Owen Taylor <otaylor@redhat.com> * docs/generation.txt: Added a file that gives documenation about the autogeneration process for various autogenerated files. Tue Jun 29 15:59:25 1999 Owen Taylor <otaylor@redhat.com> * configure.in (LIBS): Look for libgmodule in the right location. Thu Jun 17 13:57:31 1999 Owen Taylor <otaylor@redhat.com> * docs/gtk_tut.sgml: Removed references to code examples in my directory on gtk.org as they should all be in the tutorial now. * docs/gtk_tut.sgml: Added sources for dial-test and scribble-xinput programs that were previously missing. Fri Jun 4 00:08:59 1999 Owen Taylor <otaylor@redhat.com> * TODO: Added entry about menu keyboard navigation, removed some finished items. Mon May 31 00:11:24 1999 Owen Taylor <otaylor@redhat.com> * acinclude.m4: Standardize on func_dgettext not func_gettext, so that the checks for dgettext actually are paid attention to. Wed May 5 10:47:54 1999 Owen Taylor <otaylor@redhat.com> * configure.in (LIBS): Add $INTLLIBS into $LIBS directly, rather than repeating the checks for gettext. * INSTALL: Added information about gettext and NLS support. * acinclude.m4 (LIBM): Check for dgettext, not just gettext. This should hopefully fix things wrt systems with old versions of GNU gettext installed. Tue Jun 29 15:59:25 1999 Owen Taylor <otaylor@redhat.com> * configure.in (LIBS): Look for libgmodule in the right location. Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org> * autogen.sh: add --enable-maintainer-mode * configure.in: set ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS" Wed Mar 24 23:03:49 CST 1999 Shawn T. Amundson <amundson@gtk.org> * docs/gtk-config.1.in: docs/Makefile.am: configure.in: gtk-config is now generated. * docs/gtk-config.1: Removed, now generated. Thu Sep 23 17:59:59 1999 Tim Janik <timj@gtk.org> * gdk/gdkevents.c (gdk_event_translate): grr, even if Gdk doesn't handle CreateNotify itself, still put out a debuging message for --gdk-debug=events. made the ReparentNotify debugging message more verbose. wrap xcoords translation for ConfigureEvents into an error trap, a destroy event may already be pending, and in that case, the actuall coordinate values are not at all critical. Sat Sep 18 22:24:15 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkcc.c: Stop leaking the color_hash all over the place. Simplify and improve the logic. Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org> * gdk/gdk.h, gdk/gdkcolor.c: make return types (gint or gboolean) for prototypes and function implementations consistent (reported by Tomas Ogren). Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org> * gdk/gdkevents.c (gdk_event_translate): tell if expose events have send_event set in debugging output. (gdk_compress_exposures): default initialize the event so we don't operate on bogus values (namely send_event). Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkwindow.c: When we receive an unexpected destroy notify on one of our windows, don't just warn about it, also mark our windows as destroyed. Sun Sep 5 08:10:53 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkfont.c (gdk_font_hash_insert): Add name => font and name => fontset hashes. The name => fontset hash is a _big_ win since we weren't previously caching fontsets at all and loading fontsets is expensive. The name => font hash is less of a win, but it does save us from doing repeated XQueryFont calls on the same font. * gdk/gdkprivate.h (struct _GdkFontPrivate): Add a names list so we can remove font/fontset from hash. Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkproperty.c (gdk_atom_intern): Remove useless and slightly confusing test. [ XInternAtom (,,TRUE) will never return None ]. Sat Sep 4 08:39:26 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkwindow.c (gdk_window_set_geometry_hints) gdk/gdkwindow.c (gdk_window_set_hints): Don't omit setting the properties if flags == 0 - there may be an existing set of properties there already. (Very old bug. Would it be better to delete the property instead?) * gdk/gdkselection.c (gdk_selection_property_get): Fix spelling error in comment. Wed Sep 1 14:05:30 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkimage.c (gdk_image_new): Use gdk_error_trap_push() to avoid stomping over gdk_error_warnings. * gdk/gdkimage.c (gdk_image_new): compute image->bpp as (bits_per_pixel + 7) / 8. This gives the same result as before for multiples of 8, but actually a "reasonable" value for 1bit or 4bit displays. Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org> * gdk/Makefile.am: minor cleanups, strip spaces on build rules for GNU Make. Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org> * gdk/gdkevents.c (gdk_event_translate): give a debugging note when discarding configure events. 1999-08-18 Federico Mena Quintero <federico@redhat.com> * gdk/gdkpixmap.c (gdk_pixmap_unref): g_return_if_fail() the refcount is greater than zero. * gdk/gdkwindow.c (gdk_window_unref): Likewise. * gdk/gdkfont.c (gdk_font_unref): Likewise. * gdk/gdkgc.c (gdk_gc_unref): Likewise. * gdk/gdkdnd.c (gdk_drag_context_unref): Likewise. Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkproperty.c (gdk_property_get): Fix assumption that format 32 => sizeof(item) == 4. It really is sizeof(long). Tue Jun 29 23:02:42 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdk.c (gdk_x_error / gdk_x_io_error): Don't core dump at all on X IO errors, only core dump if --enable-debug for X errors. Thu Jun 24 17:06:23 1999 Tim Janik <timj@gtk.org> * gdk/gdkevents.c (gdk_event_translate): removed old ""Got event for unknown window:" message. disabled ConfigureNotify discarding code, because it led to events being processed out of order. Thu Jun 24 12:22:02 1999 Tim Janik <timj@gtk.org> * gdk/gdkglobals.c: preinitialize gdk_error_code to 0. * gdk/gdkevents.c (gdk_event_send_client_message_to_all_recurse): since we export this function, supress error warnings and don't reset the error code in the first half of this function. * gdk/gdk.c (gdk_x_error): set gdk_error_code to the actuall X error code (instead of just -1) so gdk_error_trap_pop() reveals something actually informative about the error that happened. * gdk/*.c: don't rely on gdk_error_code being -1 if an error occoured, but just gdk_error_code != 0. Thu Jun 24 11:50:07 1999 Tim Janik <timj@gtk.org> * gdk/gdkevents.c (gdk_event_apply_filters): advance the filter list pointer *before* invoking the filter function, so we at least don't crash if a filter is removed that is currently executed. window filters *really* need to be made truely reentrant at some point. Mon Jun 14 11:10:15 1999 Tim Janik <timj@gtk.org> * gdk/gdkevents.c (gdk_event_translate): print the atom name in the PropertyNotify debug messages. Wed May 5 22:51:06 1999 Owen Taylor <otaylor@redhat.com> Patch from Sung-Hyun Nam <namsh@lgic.co.kr> * gdk/gdkim.c: Fix cut-and-paste errors for x/y and PreeditAttributes/StatusAttributes. Wed May 5 22:24:21 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkwindow.c (gdk_window_set_geometry_hints): Change G_MAXINT to 2^16 to alleviate overflow problems in various window managers. Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkfont.c (gdk_text_measure): Fix the return value for fontsets. Wed May 5 12:42:01 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkwindow.c (gdk_window_set_geometry_hints): Initialize size_hints.x and size_hints.y because kwm brokenly pays attention to them. (Bug #1181 - Lars Heete <hel@admin.de>) Wed May 5 11:38:56 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkrgb.c (gdk_rgb_choose_visual): Free the return value of gdk_list_visuals(). (Bug #1193 - Morten Welinder <terra@diku.dk>) Tue May 4 11:12:56 PDT 1999 Manish Singh <yosh@gimp.org> * gdk/gdkim.c (gdk_im_real_open): cast the return value of XSetIMValues to (void *) when comparing to NULL, to workaround the problem of some compilers barfing since older X headers don't have the prototype for it. Mon Apr 19 10:11:12 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkcolor.c (gdk_colormap_new): Fix memory leak for pseudocolor where colormap->colors was double allocated. * gdk/gdkcolor.c (gdk_colormap_alloc1): Store the color value in the hash table with the pixel filled in so when we do later hash table lookups, the color value is correct. Sun May 2 15:29:45 PDT 1999 Manish Singh <yosh@gimp.org> * gdk/gdkdraw.c (gdk_draw_lines): check private->destroyed before making the call Tue Apr 27 11:17:35 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkdnd.c (xdnd_set_{targets,actions}): Fix leak pointed out by Morten Welinder <terra@diku.dk>. Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com> * gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the default filter from the list Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com> * gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the default filter from the list Fri Apr 16 20:41:43 PDT 1999 Manish Singh <yosh@gimp.org> * gdk/gdk.c: #include "gdkkeysyms.h" for gdk_XConvertCase #defines * gtk/gtkfontsel.c (gtk_font_selection_create_xlfd): use g_strdup_printf instead of calcing the length separately Tue Apr 13 02:49:33 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkwindow.c: removed some silly #ifdef HAVE_CONFIG that we don't do in many other places. (Fixing duplicate #include of config.h) * gdk/gdkevents.c: include gdkinput.h _after_ config.h. Otherwise, #ifndef XINPUT_NONE check in the latter doesn't work. (Bug #546) Sun Apr 11 14:38:03 1999 Tim Janik <timj@gtk.org> * gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): check for color "None" case insensitive. Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkselection.c: Add error traps so if the other end of the connection dies, we survive. Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkdnd.c (gdk_drag_motion): Separate out the dest_xid field into two fields - one for the window to send in messages, one to indicate the last looked up window for caching purposes. This is needed, so that Leave messages get the correct window. Mon Apr 5 13:21:30 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkevents.c (gdk_event_check, gdk_event_prepare): Fix warning created by people mucking around with the gsource API. * gdk/gdkevents.c (gdk_io_invoke, gdk_input_add_full): Change mapping between GIOCondition and GdkInputCondition to match the way the Linux kernel does it. This should fix problems where closed pipes were no longer signalling GDK_INPUT_READ on systems with a native poll(). Mon Apr 5 17:11:57 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): Check explicitly for the string "None" - it is in the XPM spec and some servers treat unknown colors in odd ways (like asking the user!) Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org> * gdk/gdkevents.c: made "->" into a "." of previous change so it compiles Thu Apr 1 18:41:25 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkevents.c (gdk_compress_exposures): Set the window field of the event structure before calling user filters. 1999-03-31 Federico Mena Quintero <federico@nuclecu.unam.mx> * gdk/gdk.c (gdk_init_check): Use False as the last argument to XInternAtom() here. This is a particularly Old And Nasty(tm) bug. Mon Mar 29 17:31:52 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkim.c (gdk_mbstowcs): Free the value of the intermediate text property - prevents major memory leak when gdk_use_mb. gtk-d3august-990311-0: Bj|rn Augustsson <d3august@dtek.chalmers.se> Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com> Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp> gtk-a-higuti-990322-[0-3] * gdk/gdkfont.c (gdk_text_extents_wc): Make work when sizeof(wchar_t) != sizeof (GdkWChar) * configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS that was causing -DX_LOCALE not to work. * gtk/gtkrc.c (gtk_rc_init): X_LOCALE will never have LC_MESSAGES defined * gdk/gdk.c (gdk_init_check): Remove --xim-preedit and --xim-status from argv properly. * gdk/gdkim.c (gdk_ic_real_new): Add a gdk_flush() so that the client window is present on the X server before we pass it to the input method. Tue Mar 9 10:46:49 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkdnd.c (motif_find_drag_window): Fix bug where if --display is specified on the command line, than the drag window will not be created on that display. Tue Mar 9 10:38:24 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkproperty.c (gdk_atom_intern): Fixed bug where lookups with only_if_exists == TRUE were inserting bogus values into the atom cache. Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org> * gdk/gdkselection.c (gdk_selection_property_get): first XFree(t), then reset it to NULL. * gdk/gdkcolor.c: (gdk_colors_free): (gdk_colormap_free_colors): use colormap->colors[in_pixels[i]] as the key for g_hash_table_remove() in both functions, this prevents us from accessing possibly uninitialized portions of a GdkColor structure where we are only interested in its pixel value. Tue Mar 9 01:01:28 1999 Tim Janik <timj@gtk.org> * gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our font hash table, if we have a GdkFontPrivate entry for this font already, simply increment its reference count, provided by Olaf Dietsche <olaf.dietsche+list.gtk@netcologne.de>. 1999-09-21 Tor Lillqvist <tml@iki.fi>
1999-09-28 20:19:13 +00:00
cond |= READ_CONDITION;
if (condition & GDK_INPUT_WRITE)
[ Merges from gtk-1-2 ] Wed Sep 8 07:13:29 1999 Tim Janik <timj@gtk.org> * configure.in: fixed "GNU Make" check to pass with new make version 3.77.95. Fri Sep 3 16:04:41 1999 Tim Janik <timj@gtk.org> * gtk-config.in (--version): don't echo @GTK_VERSION@, but @GTK_MAJOR_VERSION@.@GTK_MINOR_VERSION@.@GTK_MICRO_VERSION@, so the AM_PATH_GTK() macros don't get confused by the -pre1. Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com> * configure.in (REBUILD): Change check for perl5 to check explicitely for v >= 5.002. (5.001 does not work with our scripts.) Wed Aug 25 15:45:46 1999 Tim Janik <timj@gtk.org> * configure.in: evaluate $PERL for the perl version check. added --disable-rebuilds to give the user an option to completely disable any source autogeneration rules. Mon Aug 23 23:16:14 1999 Tim Janik <timj@gtk.org> * configure.in: evaluate $ac_make when checking for GNU Make. Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org> * docs/Makefile.am: added generation.txt. * Makefile.am: require automake 1.4, build README from README.in and INSTALL from INSTALL.in in dist-hook. * README.in: * INSTALL.in: new files to autogenerate README and INSTALL from. * configure.in: figure whether we have GNU Make * docs/generation.txt: minor additions/corrections. Wed Aug 11 13:38:26 BST 1999 Tony Gale <gale@gtk.org> * docs/gtkfaq.sgml: FAQ Update July 30, 1999 Elliot Lee <sopwith@redhat.com> * configure.in: Fix autoconf warnings about cross compilation by trying to provide sane defaults for AC_TRY_RUN. Fri Jul 16 22:20:21 PDT 1999 Manish Singh <yosh@gimp.org> * ltconfig * ltmain.sh: upgrade to libtool 1.3.3 Thu Jul 8 11:30:18 1999 Owen Taylor <otaylor@redhat.com> * INSTALL: Indicate that the --with-glib= configure time flag is unsupported. Mon Jul 5 20:36:03 1999 Owen Taylor <otaylor@redhat.com> * docs/generation.txt: Added a file that gives documenation about the autogeneration process for various autogenerated files. Tue Jun 29 15:59:25 1999 Owen Taylor <otaylor@redhat.com> * configure.in (LIBS): Look for libgmodule in the right location. Thu Jun 17 13:57:31 1999 Owen Taylor <otaylor@redhat.com> * docs/gtk_tut.sgml: Removed references to code examples in my directory on gtk.org as they should all be in the tutorial now. * docs/gtk_tut.sgml: Added sources for dial-test and scribble-xinput programs that were previously missing. Fri Jun 4 00:08:59 1999 Owen Taylor <otaylor@redhat.com> * TODO: Added entry about menu keyboard navigation, removed some finished items. Mon May 31 00:11:24 1999 Owen Taylor <otaylor@redhat.com> * acinclude.m4: Standardize on func_dgettext not func_gettext, so that the checks for dgettext actually are paid attention to. Wed May 5 10:47:54 1999 Owen Taylor <otaylor@redhat.com> * configure.in (LIBS): Add $INTLLIBS into $LIBS directly, rather than repeating the checks for gettext. * INSTALL: Added information about gettext and NLS support. * acinclude.m4 (LIBM): Check for dgettext, not just gettext. This should hopefully fix things wrt systems with old versions of GNU gettext installed. Tue Jun 29 15:59:25 1999 Owen Taylor <otaylor@redhat.com> * configure.in (LIBS): Look for libgmodule in the right location. Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org> * autogen.sh: add --enable-maintainer-mode * configure.in: set ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS" Wed Mar 24 23:03:49 CST 1999 Shawn T. Amundson <amundson@gtk.org> * docs/gtk-config.1.in: docs/Makefile.am: configure.in: gtk-config is now generated. * docs/gtk-config.1: Removed, now generated. Thu Sep 23 17:59:59 1999 Tim Janik <timj@gtk.org> * gdk/gdkevents.c (gdk_event_translate): grr, even if Gdk doesn't handle CreateNotify itself, still put out a debuging message for --gdk-debug=events. made the ReparentNotify debugging message more verbose. wrap xcoords translation for ConfigureEvents into an error trap, a destroy event may already be pending, and in that case, the actuall coordinate values are not at all critical. Sat Sep 18 22:24:15 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkcc.c: Stop leaking the color_hash all over the place. Simplify and improve the logic. Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org> * gdk/gdk.h, gdk/gdkcolor.c: make return types (gint or gboolean) for prototypes and function implementations consistent (reported by Tomas Ogren). Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org> * gdk/gdkevents.c (gdk_event_translate): tell if expose events have send_event set in debugging output. (gdk_compress_exposures): default initialize the event so we don't operate on bogus values (namely send_event). Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkwindow.c: When we receive an unexpected destroy notify on one of our windows, don't just warn about it, also mark our windows as destroyed. Sun Sep 5 08:10:53 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkfont.c (gdk_font_hash_insert): Add name => font and name => fontset hashes. The name => fontset hash is a _big_ win since we weren't previously caching fontsets at all and loading fontsets is expensive. The name => font hash is less of a win, but it does save us from doing repeated XQueryFont calls on the same font. * gdk/gdkprivate.h (struct _GdkFontPrivate): Add a names list so we can remove font/fontset from hash. Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkproperty.c (gdk_atom_intern): Remove useless and slightly confusing test. [ XInternAtom (,,TRUE) will never return None ]. Sat Sep 4 08:39:26 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkwindow.c (gdk_window_set_geometry_hints) gdk/gdkwindow.c (gdk_window_set_hints): Don't omit setting the properties if flags == 0 - there may be an existing set of properties there already. (Very old bug. Would it be better to delete the property instead?) * gdk/gdkselection.c (gdk_selection_property_get): Fix spelling error in comment. Wed Sep 1 14:05:30 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkimage.c (gdk_image_new): Use gdk_error_trap_push() to avoid stomping over gdk_error_warnings. * gdk/gdkimage.c (gdk_image_new): compute image->bpp as (bits_per_pixel + 7) / 8. This gives the same result as before for multiples of 8, but actually a "reasonable" value for 1bit or 4bit displays. Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org> * gdk/Makefile.am: minor cleanups, strip spaces on build rules for GNU Make. Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org> * gdk/gdkevents.c (gdk_event_translate): give a debugging note when discarding configure events. 1999-08-18 Federico Mena Quintero <federico@redhat.com> * gdk/gdkpixmap.c (gdk_pixmap_unref): g_return_if_fail() the refcount is greater than zero. * gdk/gdkwindow.c (gdk_window_unref): Likewise. * gdk/gdkfont.c (gdk_font_unref): Likewise. * gdk/gdkgc.c (gdk_gc_unref): Likewise. * gdk/gdkdnd.c (gdk_drag_context_unref): Likewise. Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkproperty.c (gdk_property_get): Fix assumption that format 32 => sizeof(item) == 4. It really is sizeof(long). Tue Jun 29 23:02:42 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdk.c (gdk_x_error / gdk_x_io_error): Don't core dump at all on X IO errors, only core dump if --enable-debug for X errors. Thu Jun 24 17:06:23 1999 Tim Janik <timj@gtk.org> * gdk/gdkevents.c (gdk_event_translate): removed old ""Got event for unknown window:" message. disabled ConfigureNotify discarding code, because it led to events being processed out of order. Thu Jun 24 12:22:02 1999 Tim Janik <timj@gtk.org> * gdk/gdkglobals.c: preinitialize gdk_error_code to 0. * gdk/gdkevents.c (gdk_event_send_client_message_to_all_recurse): since we export this function, supress error warnings and don't reset the error code in the first half of this function. * gdk/gdk.c (gdk_x_error): set gdk_error_code to the actuall X error code (instead of just -1) so gdk_error_trap_pop() reveals something actually informative about the error that happened. * gdk/*.c: don't rely on gdk_error_code being -1 if an error occoured, but just gdk_error_code != 0. Thu Jun 24 11:50:07 1999 Tim Janik <timj@gtk.org> * gdk/gdkevents.c (gdk_event_apply_filters): advance the filter list pointer *before* invoking the filter function, so we at least don't crash if a filter is removed that is currently executed. window filters *really* need to be made truely reentrant at some point. Mon Jun 14 11:10:15 1999 Tim Janik <timj@gtk.org> * gdk/gdkevents.c (gdk_event_translate): print the atom name in the PropertyNotify debug messages. Wed May 5 22:51:06 1999 Owen Taylor <otaylor@redhat.com> Patch from Sung-Hyun Nam <namsh@lgic.co.kr> * gdk/gdkim.c: Fix cut-and-paste errors for x/y and PreeditAttributes/StatusAttributes. Wed May 5 22:24:21 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkwindow.c (gdk_window_set_geometry_hints): Change G_MAXINT to 2^16 to alleviate overflow problems in various window managers. Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkfont.c (gdk_text_measure): Fix the return value for fontsets. Wed May 5 12:42:01 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkwindow.c (gdk_window_set_geometry_hints): Initialize size_hints.x and size_hints.y because kwm brokenly pays attention to them. (Bug #1181 - Lars Heete <hel@admin.de>) Wed May 5 11:38:56 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkrgb.c (gdk_rgb_choose_visual): Free the return value of gdk_list_visuals(). (Bug #1193 - Morten Welinder <terra@diku.dk>) Tue May 4 11:12:56 PDT 1999 Manish Singh <yosh@gimp.org> * gdk/gdkim.c (gdk_im_real_open): cast the return value of XSetIMValues to (void *) when comparing to NULL, to workaround the problem of some compilers barfing since older X headers don't have the prototype for it. Mon Apr 19 10:11:12 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkcolor.c (gdk_colormap_new): Fix memory leak for pseudocolor where colormap->colors was double allocated. * gdk/gdkcolor.c (gdk_colormap_alloc1): Store the color value in the hash table with the pixel filled in so when we do later hash table lookups, the color value is correct. Sun May 2 15:29:45 PDT 1999 Manish Singh <yosh@gimp.org> * gdk/gdkdraw.c (gdk_draw_lines): check private->destroyed before making the call Tue Apr 27 11:17:35 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkdnd.c (xdnd_set_{targets,actions}): Fix leak pointed out by Morten Welinder <terra@diku.dk>. Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com> * gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the default filter from the list Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com> * gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the default filter from the list Fri Apr 16 20:41:43 PDT 1999 Manish Singh <yosh@gimp.org> * gdk/gdk.c: #include "gdkkeysyms.h" for gdk_XConvertCase #defines * gtk/gtkfontsel.c (gtk_font_selection_create_xlfd): use g_strdup_printf instead of calcing the length separately Tue Apr 13 02:49:33 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkwindow.c: removed some silly #ifdef HAVE_CONFIG that we don't do in many other places. (Fixing duplicate #include of config.h) * gdk/gdkevents.c: include gdkinput.h _after_ config.h. Otherwise, #ifndef XINPUT_NONE check in the latter doesn't work. (Bug #546) Sun Apr 11 14:38:03 1999 Tim Janik <timj@gtk.org> * gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): check for color "None" case insensitive. Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkselection.c: Add error traps so if the other end of the connection dies, we survive. Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkdnd.c (gdk_drag_motion): Separate out the dest_xid field into two fields - one for the window to send in messages, one to indicate the last looked up window for caching purposes. This is needed, so that Leave messages get the correct window. Mon Apr 5 13:21:30 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkevents.c (gdk_event_check, gdk_event_prepare): Fix warning created by people mucking around with the gsource API. * gdk/gdkevents.c (gdk_io_invoke, gdk_input_add_full): Change mapping between GIOCondition and GdkInputCondition to match the way the Linux kernel does it. This should fix problems where closed pipes were no longer signalling GDK_INPUT_READ on systems with a native poll(). Mon Apr 5 17:11:57 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): Check explicitly for the string "None" - it is in the XPM spec and some servers treat unknown colors in odd ways (like asking the user!) Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org> * gdk/gdkevents.c: made "->" into a "." of previous change so it compiles Thu Apr 1 18:41:25 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkevents.c (gdk_compress_exposures): Set the window field of the event structure before calling user filters. 1999-03-31 Federico Mena Quintero <federico@nuclecu.unam.mx> * gdk/gdk.c (gdk_init_check): Use False as the last argument to XInternAtom() here. This is a particularly Old And Nasty(tm) bug. Mon Mar 29 17:31:52 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkim.c (gdk_mbstowcs): Free the value of the intermediate text property - prevents major memory leak when gdk_use_mb. gtk-d3august-990311-0: Bj|rn Augustsson <d3august@dtek.chalmers.se> Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com> Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp> gtk-a-higuti-990322-[0-3] * gdk/gdkfont.c (gdk_text_extents_wc): Make work when sizeof(wchar_t) != sizeof (GdkWChar) * configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS that was causing -DX_LOCALE not to work. * gtk/gtkrc.c (gtk_rc_init): X_LOCALE will never have LC_MESSAGES defined * gdk/gdk.c (gdk_init_check): Remove --xim-preedit and --xim-status from argv properly. * gdk/gdkim.c (gdk_ic_real_new): Add a gdk_flush() so that the client window is present on the X server before we pass it to the input method. Tue Mar 9 10:46:49 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkdnd.c (motif_find_drag_window): Fix bug where if --display is specified on the command line, than the drag window will not be created on that display. Tue Mar 9 10:38:24 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkproperty.c (gdk_atom_intern): Fixed bug where lookups with only_if_exists == TRUE were inserting bogus values into the atom cache. Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org> * gdk/gdkselection.c (gdk_selection_property_get): first XFree(t), then reset it to NULL. * gdk/gdkcolor.c: (gdk_colors_free): (gdk_colormap_free_colors): use colormap->colors[in_pixels[i]] as the key for g_hash_table_remove() in both functions, this prevents us from accessing possibly uninitialized portions of a GdkColor structure where we are only interested in its pixel value. Tue Mar 9 01:01:28 1999 Tim Janik <timj@gtk.org> * gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our font hash table, if we have a GdkFontPrivate entry for this font already, simply increment its reference count, provided by Olaf Dietsche <olaf.dietsche+list.gtk@netcologne.de>. 1999-09-21 Tor Lillqvist <tml@iki.fi>
1999-09-28 20:19:13 +00:00
cond |= WRITE_CONDITION;
if (condition & GDK_INPUT_EXCEPTION)
[ Merges from gtk-1-2 ] Wed Sep 8 07:13:29 1999 Tim Janik <timj@gtk.org> * configure.in: fixed "GNU Make" check to pass with new make version 3.77.95. Fri Sep 3 16:04:41 1999 Tim Janik <timj@gtk.org> * gtk-config.in (--version): don't echo @GTK_VERSION@, but @GTK_MAJOR_VERSION@.@GTK_MINOR_VERSION@.@GTK_MICRO_VERSION@, so the AM_PATH_GTK() macros don't get confused by the -pre1. Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com> * configure.in (REBUILD): Change check for perl5 to check explicitely for v >= 5.002. (5.001 does not work with our scripts.) Wed Aug 25 15:45:46 1999 Tim Janik <timj@gtk.org> * configure.in: evaluate $PERL for the perl version check. added --disable-rebuilds to give the user an option to completely disable any source autogeneration rules. Mon Aug 23 23:16:14 1999 Tim Janik <timj@gtk.org> * configure.in: evaluate $ac_make when checking for GNU Make. Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org> * docs/Makefile.am: added generation.txt. * Makefile.am: require automake 1.4, build README from README.in and INSTALL from INSTALL.in in dist-hook. * README.in: * INSTALL.in: new files to autogenerate README and INSTALL from. * configure.in: figure whether we have GNU Make * docs/generation.txt: minor additions/corrections. Wed Aug 11 13:38:26 BST 1999 Tony Gale <gale@gtk.org> * docs/gtkfaq.sgml: FAQ Update July 30, 1999 Elliot Lee <sopwith@redhat.com> * configure.in: Fix autoconf warnings about cross compilation by trying to provide sane defaults for AC_TRY_RUN. Fri Jul 16 22:20:21 PDT 1999 Manish Singh <yosh@gimp.org> * ltconfig * ltmain.sh: upgrade to libtool 1.3.3 Thu Jul 8 11:30:18 1999 Owen Taylor <otaylor@redhat.com> * INSTALL: Indicate that the --with-glib= configure time flag is unsupported. Mon Jul 5 20:36:03 1999 Owen Taylor <otaylor@redhat.com> * docs/generation.txt: Added a file that gives documenation about the autogeneration process for various autogenerated files. Tue Jun 29 15:59:25 1999 Owen Taylor <otaylor@redhat.com> * configure.in (LIBS): Look for libgmodule in the right location. Thu Jun 17 13:57:31 1999 Owen Taylor <otaylor@redhat.com> * docs/gtk_tut.sgml: Removed references to code examples in my directory on gtk.org as they should all be in the tutorial now. * docs/gtk_tut.sgml: Added sources for dial-test and scribble-xinput programs that were previously missing. Fri Jun 4 00:08:59 1999 Owen Taylor <otaylor@redhat.com> * TODO: Added entry about menu keyboard navigation, removed some finished items. Mon May 31 00:11:24 1999 Owen Taylor <otaylor@redhat.com> * acinclude.m4: Standardize on func_dgettext not func_gettext, so that the checks for dgettext actually are paid attention to. Wed May 5 10:47:54 1999 Owen Taylor <otaylor@redhat.com> * configure.in (LIBS): Add $INTLLIBS into $LIBS directly, rather than repeating the checks for gettext. * INSTALL: Added information about gettext and NLS support. * acinclude.m4 (LIBM): Check for dgettext, not just gettext. This should hopefully fix things wrt systems with old versions of GNU gettext installed. Tue Jun 29 15:59:25 1999 Owen Taylor <otaylor@redhat.com> * configure.in (LIBS): Look for libgmodule in the right location. Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org> * autogen.sh: add --enable-maintainer-mode * configure.in: set ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS" Wed Mar 24 23:03:49 CST 1999 Shawn T. Amundson <amundson@gtk.org> * docs/gtk-config.1.in: docs/Makefile.am: configure.in: gtk-config is now generated. * docs/gtk-config.1: Removed, now generated. Thu Sep 23 17:59:59 1999 Tim Janik <timj@gtk.org> * gdk/gdkevents.c (gdk_event_translate): grr, even if Gdk doesn't handle CreateNotify itself, still put out a debuging message for --gdk-debug=events. made the ReparentNotify debugging message more verbose. wrap xcoords translation for ConfigureEvents into an error trap, a destroy event may already be pending, and in that case, the actuall coordinate values are not at all critical. Sat Sep 18 22:24:15 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkcc.c: Stop leaking the color_hash all over the place. Simplify and improve the logic. Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org> * gdk/gdk.h, gdk/gdkcolor.c: make return types (gint or gboolean) for prototypes and function implementations consistent (reported by Tomas Ogren). Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org> * gdk/gdkevents.c (gdk_event_translate): tell if expose events have send_event set in debugging output. (gdk_compress_exposures): default initialize the event so we don't operate on bogus values (namely send_event). Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkwindow.c: When we receive an unexpected destroy notify on one of our windows, don't just warn about it, also mark our windows as destroyed. Sun Sep 5 08:10:53 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkfont.c (gdk_font_hash_insert): Add name => font and name => fontset hashes. The name => fontset hash is a _big_ win since we weren't previously caching fontsets at all and loading fontsets is expensive. The name => font hash is less of a win, but it does save us from doing repeated XQueryFont calls on the same font. * gdk/gdkprivate.h (struct _GdkFontPrivate): Add a names list so we can remove font/fontset from hash. Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkproperty.c (gdk_atom_intern): Remove useless and slightly confusing test. [ XInternAtom (,,TRUE) will never return None ]. Sat Sep 4 08:39:26 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkwindow.c (gdk_window_set_geometry_hints) gdk/gdkwindow.c (gdk_window_set_hints): Don't omit setting the properties if flags == 0 - there may be an existing set of properties there already. (Very old bug. Would it be better to delete the property instead?) * gdk/gdkselection.c (gdk_selection_property_get): Fix spelling error in comment. Wed Sep 1 14:05:30 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkimage.c (gdk_image_new): Use gdk_error_trap_push() to avoid stomping over gdk_error_warnings. * gdk/gdkimage.c (gdk_image_new): compute image->bpp as (bits_per_pixel + 7) / 8. This gives the same result as before for multiples of 8, but actually a "reasonable" value for 1bit or 4bit displays. Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org> * gdk/Makefile.am: minor cleanups, strip spaces on build rules for GNU Make. Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org> * gdk/gdkevents.c (gdk_event_translate): give a debugging note when discarding configure events. 1999-08-18 Federico Mena Quintero <federico@redhat.com> * gdk/gdkpixmap.c (gdk_pixmap_unref): g_return_if_fail() the refcount is greater than zero. * gdk/gdkwindow.c (gdk_window_unref): Likewise. * gdk/gdkfont.c (gdk_font_unref): Likewise. * gdk/gdkgc.c (gdk_gc_unref): Likewise. * gdk/gdkdnd.c (gdk_drag_context_unref): Likewise. Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkproperty.c (gdk_property_get): Fix assumption that format 32 => sizeof(item) == 4. It really is sizeof(long). Tue Jun 29 23:02:42 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdk.c (gdk_x_error / gdk_x_io_error): Don't core dump at all on X IO errors, only core dump if --enable-debug for X errors. Thu Jun 24 17:06:23 1999 Tim Janik <timj@gtk.org> * gdk/gdkevents.c (gdk_event_translate): removed old ""Got event for unknown window:" message. disabled ConfigureNotify discarding code, because it led to events being processed out of order. Thu Jun 24 12:22:02 1999 Tim Janik <timj@gtk.org> * gdk/gdkglobals.c: preinitialize gdk_error_code to 0. * gdk/gdkevents.c (gdk_event_send_client_message_to_all_recurse): since we export this function, supress error warnings and don't reset the error code in the first half of this function. * gdk/gdk.c (gdk_x_error): set gdk_error_code to the actuall X error code (instead of just -1) so gdk_error_trap_pop() reveals something actually informative about the error that happened. * gdk/*.c: don't rely on gdk_error_code being -1 if an error occoured, but just gdk_error_code != 0. Thu Jun 24 11:50:07 1999 Tim Janik <timj@gtk.org> * gdk/gdkevents.c (gdk_event_apply_filters): advance the filter list pointer *before* invoking the filter function, so we at least don't crash if a filter is removed that is currently executed. window filters *really* need to be made truely reentrant at some point. Mon Jun 14 11:10:15 1999 Tim Janik <timj@gtk.org> * gdk/gdkevents.c (gdk_event_translate): print the atom name in the PropertyNotify debug messages. Wed May 5 22:51:06 1999 Owen Taylor <otaylor@redhat.com> Patch from Sung-Hyun Nam <namsh@lgic.co.kr> * gdk/gdkim.c: Fix cut-and-paste errors for x/y and PreeditAttributes/StatusAttributes. Wed May 5 22:24:21 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkwindow.c (gdk_window_set_geometry_hints): Change G_MAXINT to 2^16 to alleviate overflow problems in various window managers. Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkfont.c (gdk_text_measure): Fix the return value for fontsets. Wed May 5 12:42:01 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkwindow.c (gdk_window_set_geometry_hints): Initialize size_hints.x and size_hints.y because kwm brokenly pays attention to them. (Bug #1181 - Lars Heete <hel@admin.de>) Wed May 5 11:38:56 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkrgb.c (gdk_rgb_choose_visual): Free the return value of gdk_list_visuals(). (Bug #1193 - Morten Welinder <terra@diku.dk>) Tue May 4 11:12:56 PDT 1999 Manish Singh <yosh@gimp.org> * gdk/gdkim.c (gdk_im_real_open): cast the return value of XSetIMValues to (void *) when comparing to NULL, to workaround the problem of some compilers barfing since older X headers don't have the prototype for it. Mon Apr 19 10:11:12 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkcolor.c (gdk_colormap_new): Fix memory leak for pseudocolor where colormap->colors was double allocated. * gdk/gdkcolor.c (gdk_colormap_alloc1): Store the color value in the hash table with the pixel filled in so when we do later hash table lookups, the color value is correct. Sun May 2 15:29:45 PDT 1999 Manish Singh <yosh@gimp.org> * gdk/gdkdraw.c (gdk_draw_lines): check private->destroyed before making the call Tue Apr 27 11:17:35 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkdnd.c (xdnd_set_{targets,actions}): Fix leak pointed out by Morten Welinder <terra@diku.dk>. Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com> * gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the default filter from the list Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com> * gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the default filter from the list Fri Apr 16 20:41:43 PDT 1999 Manish Singh <yosh@gimp.org> * gdk/gdk.c: #include "gdkkeysyms.h" for gdk_XConvertCase #defines * gtk/gtkfontsel.c (gtk_font_selection_create_xlfd): use g_strdup_printf instead of calcing the length separately Tue Apr 13 02:49:33 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkwindow.c: removed some silly #ifdef HAVE_CONFIG that we don't do in many other places. (Fixing duplicate #include of config.h) * gdk/gdkevents.c: include gdkinput.h _after_ config.h. Otherwise, #ifndef XINPUT_NONE check in the latter doesn't work. (Bug #546) Sun Apr 11 14:38:03 1999 Tim Janik <timj@gtk.org> * gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): check for color "None" case insensitive. Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkselection.c: Add error traps so if the other end of the connection dies, we survive. Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkdnd.c (gdk_drag_motion): Separate out the dest_xid field into two fields - one for the window to send in messages, one to indicate the last looked up window for caching purposes. This is needed, so that Leave messages get the correct window. Mon Apr 5 13:21:30 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkevents.c (gdk_event_check, gdk_event_prepare): Fix warning created by people mucking around with the gsource API. * gdk/gdkevents.c (gdk_io_invoke, gdk_input_add_full): Change mapping between GIOCondition and GdkInputCondition to match the way the Linux kernel does it. This should fix problems where closed pipes were no longer signalling GDK_INPUT_READ on systems with a native poll(). Mon Apr 5 17:11:57 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): Check explicitly for the string "None" - it is in the XPM spec and some servers treat unknown colors in odd ways (like asking the user!) Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org> * gdk/gdkevents.c: made "->" into a "." of previous change so it compiles Thu Apr 1 18:41:25 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkevents.c (gdk_compress_exposures): Set the window field of the event structure before calling user filters. 1999-03-31 Federico Mena Quintero <federico@nuclecu.unam.mx> * gdk/gdk.c (gdk_init_check): Use False as the last argument to XInternAtom() here. This is a particularly Old And Nasty(tm) bug. Mon Mar 29 17:31:52 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkim.c (gdk_mbstowcs): Free the value of the intermediate text property - prevents major memory leak when gdk_use_mb. gtk-d3august-990311-0: Bj|rn Augustsson <d3august@dtek.chalmers.se> Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com> Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp> gtk-a-higuti-990322-[0-3] * gdk/gdkfont.c (gdk_text_extents_wc): Make work when sizeof(wchar_t) != sizeof (GdkWChar) * configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS that was causing -DX_LOCALE not to work. * gtk/gtkrc.c (gtk_rc_init): X_LOCALE will never have LC_MESSAGES defined * gdk/gdk.c (gdk_init_check): Remove --xim-preedit and --xim-status from argv properly. * gdk/gdkim.c (gdk_ic_real_new): Add a gdk_flush() so that the client window is present on the X server before we pass it to the input method. Tue Mar 9 10:46:49 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkdnd.c (motif_find_drag_window): Fix bug where if --display is specified on the command line, than the drag window will not be created on that display. Tue Mar 9 10:38:24 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkproperty.c (gdk_atom_intern): Fixed bug where lookups with only_if_exists == TRUE were inserting bogus values into the atom cache. Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org> * gdk/gdkselection.c (gdk_selection_property_get): first XFree(t), then reset it to NULL. * gdk/gdkcolor.c: (gdk_colors_free): (gdk_colormap_free_colors): use colormap->colors[in_pixels[i]] as the key for g_hash_table_remove() in both functions, this prevents us from accessing possibly uninitialized portions of a GdkColor structure where we are only interested in its pixel value. Tue Mar 9 01:01:28 1999 Tim Janik <timj@gtk.org> * gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our font hash table, if we have a GdkFontPrivate entry for this font already, simply increment its reference count, provided by Olaf Dietsche <olaf.dietsche+list.gtk@netcologne.de>. 1999-09-21 Tor Lillqvist <tml@iki.fi>
1999-09-28 20:19:13 +00:00
cond |= EXCEPTION_CONDITION;
channel = g_io_channel_unix_new (source);
result = g_io_add_watch_full (channel, G_PRIORITY_DEFAULT, cond,
gdk_io_invoke,
closure, gdk_io_destroy);
g_io_channel_unref (channel);
return result;
}
gint
gdk_input_add (gint source,
GdkInputCondition condition,
GdkInputFunction function,
gpointer data)
{
return gdk_input_add_full (source, condition, function, data, NULL);
}
void
gdk_input_remove (gint tag)
{
g_source_remove (tag);
}
static void
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
gdk_synthesize_click (GdkDisplay *display,
GdkEvent *event,
gint nclicks)
{
GdkEvent temp_event;
g_return_if_fail (event != NULL);
temp_event = *event;
temp_event.type = (nclicks == 2) ? GDK_2BUTTON_PRESS : GDK_3BUTTON_PRESS;
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
gdk_display_put_event (display, &temp_event);
}
Move all X specific code into the x11/ directory. Aside from shuffling Mon Nov 8 14:47:04 1999 Owen Taylor <otaylor@redhat.com> Move all X specific code into the x11/ directory. Aside from shuffling things around, did the following: * gdk/gdkprivate.h gdk/gdk.h gdk/x11/gdkmain-x11.h: Add gdk_arg_context_* - a simple argument parsing system in the style of popt. * gdk/gdkdrawable.[ch] gdk/gdkprivate.h gdk/gdkwindow.[ch] gdk/x11/gdkprivate-x11.h: Remove X specific stuff from GdkDrawable and GdkWindowPrivate - add ->klass and ->klass_data fields. The klass_data field points to an auxilliary structure that is windowing system dependent. * gdk/gdkfont.c: Make most of the measurement functions simply wrappers around gdk_text_extents(). * gdk/gdkfont.c gdk/gdkprivate.h gdk/x11/gdkfont-x11.c: Add a _gdk_font_strlen() function that hides the weird behavior in gtk+-1.[02] where a string is interpreted differently for 8-bit and 16-bit fonts. * gdk/gdkevents.c: Add a new function gdk_event_button_generate() to store common code for synthesizing double/triple press events. * gdk/gdkgc.[ch]: Virtualize in the same way as gdkdrawable.h. Make all the function that modify an existing GC simply wrappers around gdk_gc_set_values(). * gdk/gdkcc.[ch]: Moved into x11/ directory in preparation for throwing out later. * gdk/gdkfont.c gdk/gdkimage.c gdk/gdkcolor.c: Change GdkFontPrivate, GdkImagePrivate and GdkColormapPrivate to have a windowing system dependent part (GdkFontPrivateX etc.) that "derives" from the system-independent part. * configure.in gdk/x11/Makefile.in gdk/x11/gdkinput*.c: Got rid of the included-source-files for XInput in favor of automake conditionals. (Which didn't exist when XInput support was originally added.) * gdk/gdkrgb.c: Remove the visual id from the debugging statements since that is X11 specific; print out type/depth info instead.
1999-11-08 20:14:59 +00:00
void
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
_gdk_event_button_generate (GdkDisplay *display,
GdkEvent *event)
{
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
if ((event->button.time < (display->button_click_time[1] + TRIPLE_CLICK_TIME (display))) &&
(event->button.window == display->button_window[1]) &&
(event->button.button == display->button_number[1]))
{
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
gdk_synthesize_click (display, event, 3);
Move all X specific code into the x11/ directory. Aside from shuffling Mon Nov 8 14:47:04 1999 Owen Taylor <otaylor@redhat.com> Move all X specific code into the x11/ directory. Aside from shuffling things around, did the following: * gdk/gdkprivate.h gdk/gdk.h gdk/x11/gdkmain-x11.h: Add gdk_arg_context_* - a simple argument parsing system in the style of popt. * gdk/gdkdrawable.[ch] gdk/gdkprivate.h gdk/gdkwindow.[ch] gdk/x11/gdkprivate-x11.h: Remove X specific stuff from GdkDrawable and GdkWindowPrivate - add ->klass and ->klass_data fields. The klass_data field points to an auxilliary structure that is windowing system dependent. * gdk/gdkfont.c: Make most of the measurement functions simply wrappers around gdk_text_extents(). * gdk/gdkfont.c gdk/gdkprivate.h gdk/x11/gdkfont-x11.c: Add a _gdk_font_strlen() function that hides the weird behavior in gtk+-1.[02] where a string is interpreted differently for 8-bit and 16-bit fonts. * gdk/gdkevents.c: Add a new function gdk_event_button_generate() to store common code for synthesizing double/triple press events. * gdk/gdkgc.[ch]: Virtualize in the same way as gdkdrawable.h. Make all the function that modify an existing GC simply wrappers around gdk_gc_set_values(). * gdk/gdkcc.[ch]: Moved into x11/ directory in preparation for throwing out later. * gdk/gdkfont.c gdk/gdkimage.c gdk/gdkcolor.c: Change GdkFontPrivate, GdkImagePrivate and GdkColormapPrivate to have a windowing system dependent part (GdkFontPrivateX etc.) that "derives" from the system-independent part. * configure.in gdk/x11/Makefile.in gdk/x11/gdkinput*.c: Got rid of the included-source-files for XInput in favor of automake conditionals. (Which didn't exist when XInput support was originally added.) * gdk/gdkrgb.c: Remove the visual id from the debugging statements since that is X11 specific; print out type/depth info instead.
1999-11-08 20:14:59 +00:00
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
display->button_click_time[1] = 0;
display->button_click_time[0] = 0;
display->button_window[1] = NULL;
display->button_window[0] = 0;
display->button_number[1] = -1;
display->button_number[0] = -1;
}
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
else if ((event->button.time < (display->button_click_time[0] + display->double_click_time)) &&
(event->button.window == display->button_window[0]) &&
(event->button.button == display->button_number[0]))
{
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
gdk_synthesize_click (display, event, 2);
Move all X specific code into the x11/ directory. Aside from shuffling Mon Nov 8 14:47:04 1999 Owen Taylor <otaylor@redhat.com> Move all X specific code into the x11/ directory. Aside from shuffling things around, did the following: * gdk/gdkprivate.h gdk/gdk.h gdk/x11/gdkmain-x11.h: Add gdk_arg_context_* - a simple argument parsing system in the style of popt. * gdk/gdkdrawable.[ch] gdk/gdkprivate.h gdk/gdkwindow.[ch] gdk/x11/gdkprivate-x11.h: Remove X specific stuff from GdkDrawable and GdkWindowPrivate - add ->klass and ->klass_data fields. The klass_data field points to an auxilliary structure that is windowing system dependent. * gdk/gdkfont.c: Make most of the measurement functions simply wrappers around gdk_text_extents(). * gdk/gdkfont.c gdk/gdkprivate.h gdk/x11/gdkfont-x11.c: Add a _gdk_font_strlen() function that hides the weird behavior in gtk+-1.[02] where a string is interpreted differently for 8-bit and 16-bit fonts. * gdk/gdkevents.c: Add a new function gdk_event_button_generate() to store common code for synthesizing double/triple press events. * gdk/gdkgc.[ch]: Virtualize in the same way as gdkdrawable.h. Make all the function that modify an existing GC simply wrappers around gdk_gc_set_values(). * gdk/gdkcc.[ch]: Moved into x11/ directory in preparation for throwing out later. * gdk/gdkfont.c gdk/gdkimage.c gdk/gdkcolor.c: Change GdkFontPrivate, GdkImagePrivate and GdkColormapPrivate to have a windowing system dependent part (GdkFontPrivateX etc.) that "derives" from the system-independent part. * configure.in gdk/x11/Makefile.in gdk/x11/gdkinput*.c: Got rid of the included-source-files for XInput in favor of automake conditionals. (Which didn't exist when XInput support was originally added.) * gdk/gdkrgb.c: Remove the visual id from the debugging statements since that is X11 specific; print out type/depth info instead.
1999-11-08 20:14:59 +00:00
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
display->button_click_time[1] = display->button_click_time[0];
display->button_click_time[0] = event->button.time;
display->button_window[1] = display->button_window[0];
display->button_window[0] = event->button.window;
display->button_number[1] = display->button_number[0];
display->button_number[0] = event->button.button;
}
else
{
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
display->button_click_time[1] = 0;
display->button_click_time[0] = event->button.time;
display->button_window[1] = NULL;
display->button_window[0] = event->button.window;
display->button_number[1] = -1;
display->button_number[0] = event->button.button;
}
}
test the window state stuff 2001-02-26 Havoc Pennington <hp@redhat.com> * gtk/testgtk.c: test the window state stuff * gtk/gtkwindow.c (gtk_window_present): new function, makes a window come to the user's attention as if it were just created (gtk_window_iconify): new function (gtk_window_deiconify): new function (gtk_window_stick): new function (gtk_window_unstick): new function (gtk_window_maximize): new function (gtk_window_unmaximize): new function * gtk/gtkwidget.h, gtk/gtkwidget.c: add window_state_event signal * gtk/gtkmain.c (gtk_main_do_event): handle GDK_WINDOW_STATE * gdk/x11/gdkevents-x11.c: create window state events when appropriate (gdk_wmspec_supported): new function * gdk/x11/gdkwindow-x11.c (gdk_window_iconify): handle iconification before showing the window (gdk_window_deiconify): new function (gdk_window_stick): new function (gdk_window_unstick): new function (gdk_window_maximize): new function (gdk_window_unmaximize): new function * gdk/gdkwindow.c: store the window state in the window; change to using the GDK_WINDOW_STATE_WITHDRAWN flag instead of window->mapped. (gdk_window_get_state): return the current window state * gdk/gdkevents.c (gdk_event_get_time): handle GDK_WINDOW_STATE (gdk_event_get_state): handle GDK_WINDOW_STATE (gdk_synthesize_window_state): function to create the window state events * gdk/gdkevents.h (struct _GdkEventWindowState): new type of event, for changes to "window state" such as maximized, sticky, etc. * gdk/x11/gdkwindow-x11.c (gdk_window_focus): new function, focuses a window * gdk/x11/gdkmain-x11.c (_gdk_wmspec_supported): new function, finds out if we support a given WM spec hint
2001-02-27 20:40:15 +00:00
void
gdk_synthesize_window_state (GdkWindow *window,
GdkWindowState unset_flags,
GdkWindowState set_flags)
{
GdkEvent temp_event;
test the window state stuff 2001-02-26 Havoc Pennington <hp@redhat.com> * gtk/testgtk.c: test the window state stuff * gtk/gtkwindow.c (gtk_window_present): new function, makes a window come to the user's attention as if it were just created (gtk_window_iconify): new function (gtk_window_deiconify): new function (gtk_window_stick): new function (gtk_window_unstick): new function (gtk_window_maximize): new function (gtk_window_unmaximize): new function * gtk/gtkwidget.h, gtk/gtkwidget.c: add window_state_event signal * gtk/gtkmain.c (gtk_main_do_event): handle GDK_WINDOW_STATE * gdk/x11/gdkevents-x11.c: create window state events when appropriate (gdk_wmspec_supported): new function * gdk/x11/gdkwindow-x11.c (gdk_window_iconify): handle iconification before showing the window (gdk_window_deiconify): new function (gdk_window_stick): new function (gdk_window_unstick): new function (gdk_window_maximize): new function (gdk_window_unmaximize): new function * gdk/gdkwindow.c: store the window state in the window; change to using the GDK_WINDOW_STATE_WITHDRAWN flag instead of window->mapped. (gdk_window_get_state): return the current window state * gdk/gdkevents.c (gdk_event_get_time): handle GDK_WINDOW_STATE (gdk_event_get_state): handle GDK_WINDOW_STATE (gdk_synthesize_window_state): function to create the window state events * gdk/gdkevents.h (struct _GdkEventWindowState): new type of event, for changes to "window state" such as maximized, sticky, etc. * gdk/x11/gdkwindow-x11.c (gdk_window_focus): new function, focuses a window * gdk/x11/gdkmain-x11.c (_gdk_wmspec_supported): new function, finds out if we support a given WM spec hint
2001-02-27 20:40:15 +00:00
GdkWindowState old;
g_return_if_fail (window != NULL);
temp_event.window_state.window = window;
temp_event.window_state.type = GDK_WINDOW_STATE;
temp_event.window_state.send_event = FALSE;
test the window state stuff 2001-02-26 Havoc Pennington <hp@redhat.com> * gtk/testgtk.c: test the window state stuff * gtk/gtkwindow.c (gtk_window_present): new function, makes a window come to the user's attention as if it were just created (gtk_window_iconify): new function (gtk_window_deiconify): new function (gtk_window_stick): new function (gtk_window_unstick): new function (gtk_window_maximize): new function (gtk_window_unmaximize): new function * gtk/gtkwidget.h, gtk/gtkwidget.c: add window_state_event signal * gtk/gtkmain.c (gtk_main_do_event): handle GDK_WINDOW_STATE * gdk/x11/gdkevents-x11.c: create window state events when appropriate (gdk_wmspec_supported): new function * gdk/x11/gdkwindow-x11.c (gdk_window_iconify): handle iconification before showing the window (gdk_window_deiconify): new function (gdk_window_stick): new function (gdk_window_unstick): new function (gdk_window_maximize): new function (gdk_window_unmaximize): new function * gdk/gdkwindow.c: store the window state in the window; change to using the GDK_WINDOW_STATE_WITHDRAWN flag instead of window->mapped. (gdk_window_get_state): return the current window state * gdk/gdkevents.c (gdk_event_get_time): handle GDK_WINDOW_STATE (gdk_event_get_state): handle GDK_WINDOW_STATE (gdk_synthesize_window_state): function to create the window state events * gdk/gdkevents.h (struct _GdkEventWindowState): new type of event, for changes to "window state" such as maximized, sticky, etc. * gdk/x11/gdkwindow-x11.c (gdk_window_focus): new function, focuses a window * gdk/x11/gdkmain-x11.c (_gdk_wmspec_supported): new function, finds out if we support a given WM spec hint
2001-02-27 20:40:15 +00:00
old = ((GdkWindowObject*) temp_event.window_state.window)->state;
test the window state stuff 2001-02-26 Havoc Pennington <hp@redhat.com> * gtk/testgtk.c: test the window state stuff * gtk/gtkwindow.c (gtk_window_present): new function, makes a window come to the user's attention as if it were just created (gtk_window_iconify): new function (gtk_window_deiconify): new function (gtk_window_stick): new function (gtk_window_unstick): new function (gtk_window_maximize): new function (gtk_window_unmaximize): new function * gtk/gtkwidget.h, gtk/gtkwidget.c: add window_state_event signal * gtk/gtkmain.c (gtk_main_do_event): handle GDK_WINDOW_STATE * gdk/x11/gdkevents-x11.c: create window state events when appropriate (gdk_wmspec_supported): new function * gdk/x11/gdkwindow-x11.c (gdk_window_iconify): handle iconification before showing the window (gdk_window_deiconify): new function (gdk_window_stick): new function (gdk_window_unstick): new function (gdk_window_maximize): new function (gdk_window_unmaximize): new function * gdk/gdkwindow.c: store the window state in the window; change to using the GDK_WINDOW_STATE_WITHDRAWN flag instead of window->mapped. (gdk_window_get_state): return the current window state * gdk/gdkevents.c (gdk_event_get_time): handle GDK_WINDOW_STATE (gdk_event_get_state): handle GDK_WINDOW_STATE (gdk_synthesize_window_state): function to create the window state events * gdk/gdkevents.h (struct _GdkEventWindowState): new type of event, for changes to "window state" such as maximized, sticky, etc. * gdk/x11/gdkwindow-x11.c (gdk_window_focus): new function, focuses a window * gdk/x11/gdkmain-x11.c (_gdk_wmspec_supported): new function, finds out if we support a given WM spec hint
2001-02-27 20:40:15 +00:00
temp_event.window_state.changed_mask = (unset_flags | set_flags) ^ old;
temp_event.window_state.new_window_state = old;
temp_event.window_state.new_window_state |= set_flags;
temp_event.window_state.new_window_state &= ~unset_flags;
test the window state stuff 2001-02-26 Havoc Pennington <hp@redhat.com> * gtk/testgtk.c: test the window state stuff * gtk/gtkwindow.c (gtk_window_present): new function, makes a window come to the user's attention as if it were just created (gtk_window_iconify): new function (gtk_window_deiconify): new function (gtk_window_stick): new function (gtk_window_unstick): new function (gtk_window_maximize): new function (gtk_window_unmaximize): new function * gtk/gtkwidget.h, gtk/gtkwidget.c: add window_state_event signal * gtk/gtkmain.c (gtk_main_do_event): handle GDK_WINDOW_STATE * gdk/x11/gdkevents-x11.c: create window state events when appropriate (gdk_wmspec_supported): new function * gdk/x11/gdkwindow-x11.c (gdk_window_iconify): handle iconification before showing the window (gdk_window_deiconify): new function (gdk_window_stick): new function (gdk_window_unstick): new function (gdk_window_maximize): new function (gdk_window_unmaximize): new function * gdk/gdkwindow.c: store the window state in the window; change to using the GDK_WINDOW_STATE_WITHDRAWN flag instead of window->mapped. (gdk_window_get_state): return the current window state * gdk/gdkevents.c (gdk_event_get_time): handle GDK_WINDOW_STATE (gdk_event_get_state): handle GDK_WINDOW_STATE (gdk_synthesize_window_state): function to create the window state events * gdk/gdkevents.h (struct _GdkEventWindowState): new type of event, for changes to "window state" such as maximized, sticky, etc. * gdk/x11/gdkwindow-x11.c (gdk_window_focus): new function, focuses a window * gdk/x11/gdkmain-x11.c (_gdk_wmspec_supported): new function, finds out if we support a given WM spec hint
2001-02-27 20:40:15 +00:00
if (temp_event.window_state.new_window_state == old)
test the window state stuff 2001-02-26 Havoc Pennington <hp@redhat.com> * gtk/testgtk.c: test the window state stuff * gtk/gtkwindow.c (gtk_window_present): new function, makes a window come to the user's attention as if it were just created (gtk_window_iconify): new function (gtk_window_deiconify): new function (gtk_window_stick): new function (gtk_window_unstick): new function (gtk_window_maximize): new function (gtk_window_unmaximize): new function * gtk/gtkwidget.h, gtk/gtkwidget.c: add window_state_event signal * gtk/gtkmain.c (gtk_main_do_event): handle GDK_WINDOW_STATE * gdk/x11/gdkevents-x11.c: create window state events when appropriate (gdk_wmspec_supported): new function * gdk/x11/gdkwindow-x11.c (gdk_window_iconify): handle iconification before showing the window (gdk_window_deiconify): new function (gdk_window_stick): new function (gdk_window_unstick): new function (gdk_window_maximize): new function (gdk_window_unmaximize): new function * gdk/gdkwindow.c: store the window state in the window; change to using the GDK_WINDOW_STATE_WITHDRAWN flag instead of window->mapped. (gdk_window_get_state): return the current window state * gdk/gdkevents.c (gdk_event_get_time): handle GDK_WINDOW_STATE (gdk_event_get_state): handle GDK_WINDOW_STATE (gdk_synthesize_window_state): function to create the window state events * gdk/gdkevents.h (struct _GdkEventWindowState): new type of event, for changes to "window state" such as maximized, sticky, etc. * gdk/x11/gdkwindow-x11.c (gdk_window_focus): new function, focuses a window * gdk/x11/gdkmain-x11.c (_gdk_wmspec_supported): new function, finds out if we support a given WM spec hint
2001-02-27 20:40:15 +00:00
return; /* No actual work to do, nothing changed. */
/* Actually update the field in GdkWindow, this is sort of an odd
* place to do it, but seems like the safest since it ensures we expose no
* inconsistent state to the user.
*/
((GdkWindowObject*) window)->state = temp_event.window_state.new_window_state;
test the window state stuff 2001-02-26 Havoc Pennington <hp@redhat.com> * gtk/testgtk.c: test the window state stuff * gtk/gtkwindow.c (gtk_window_present): new function, makes a window come to the user's attention as if it were just created (gtk_window_iconify): new function (gtk_window_deiconify): new function (gtk_window_stick): new function (gtk_window_unstick): new function (gtk_window_maximize): new function (gtk_window_unmaximize): new function * gtk/gtkwidget.h, gtk/gtkwidget.c: add window_state_event signal * gtk/gtkmain.c (gtk_main_do_event): handle GDK_WINDOW_STATE * gdk/x11/gdkevents-x11.c: create window state events when appropriate (gdk_wmspec_supported): new function * gdk/x11/gdkwindow-x11.c (gdk_window_iconify): handle iconification before showing the window (gdk_window_deiconify): new function (gdk_window_stick): new function (gdk_window_unstick): new function (gdk_window_maximize): new function (gdk_window_unmaximize): new function * gdk/gdkwindow.c: store the window state in the window; change to using the GDK_WINDOW_STATE_WITHDRAWN flag instead of window->mapped. (gdk_window_get_state): return the current window state * gdk/gdkevents.c (gdk_event_get_time): handle GDK_WINDOW_STATE (gdk_event_get_state): handle GDK_WINDOW_STATE (gdk_synthesize_window_state): function to create the window state events * gdk/gdkevents.h (struct _GdkEventWindowState): new type of event, for changes to "window state" such as maximized, sticky, etc. * gdk/x11/gdkwindow-x11.c (gdk_window_focus): new function, focuses a window * gdk/x11/gdkmain-x11.c (_gdk_wmspec_supported): new function, finds out if we support a given WM spec hint
2001-02-27 20:40:15 +00:00
/* We only really send the event to toplevels, since
* all the window states don't apply to non-toplevels.
* Non-toplevels do use the GDK_WINDOW_STATE_WITHDRAWN flag
* internally so we needed to update window->state.
*/
switch (((GdkWindowObject*) window)->window_type)
{
case GDK_WINDOW_TOPLEVEL:
case GDK_WINDOW_DIALOG:
case GDK_WINDOW_TEMP: /* ? */
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
gdk_display_put_event (gdk_drawable_get_display (window), &temp_event);
test the window state stuff 2001-02-26 Havoc Pennington <hp@redhat.com> * gtk/testgtk.c: test the window state stuff * gtk/gtkwindow.c (gtk_window_present): new function, makes a window come to the user's attention as if it were just created (gtk_window_iconify): new function (gtk_window_deiconify): new function (gtk_window_stick): new function (gtk_window_unstick): new function (gtk_window_maximize): new function (gtk_window_unmaximize): new function * gtk/gtkwidget.h, gtk/gtkwidget.c: add window_state_event signal * gtk/gtkmain.c (gtk_main_do_event): handle GDK_WINDOW_STATE * gdk/x11/gdkevents-x11.c: create window state events when appropriate (gdk_wmspec_supported): new function * gdk/x11/gdkwindow-x11.c (gdk_window_iconify): handle iconification before showing the window (gdk_window_deiconify): new function (gdk_window_stick): new function (gdk_window_unstick): new function (gdk_window_maximize): new function (gdk_window_unmaximize): new function * gdk/gdkwindow.c: store the window state in the window; change to using the GDK_WINDOW_STATE_WITHDRAWN flag instead of window->mapped. (gdk_window_get_state): return the current window state * gdk/gdkevents.c (gdk_event_get_time): handle GDK_WINDOW_STATE (gdk_event_get_state): handle GDK_WINDOW_STATE (gdk_synthesize_window_state): function to create the window state events * gdk/gdkevents.h (struct _GdkEventWindowState): new type of event, for changes to "window state" such as maximized, sticky, etc. * gdk/x11/gdkwindow-x11.c (gdk_window_focus): new function, focuses a window * gdk/x11/gdkmain-x11.c (_gdk_wmspec_supported): new function, finds out if we support a given WM spec hint
2001-02-27 20:40:15 +00:00
break;
case GDK_WINDOW_FOREIGN:
case GDK_WINDOW_ROOT:
case GDK_WINDOW_CHILD:
break;
}
}
/**
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
* gdk_display_set_double_click_time:
* @display: a #GdkDisplay
* @msec: double click time in milliseconds (thousandths of a second)
*
* Sets the double click time (two clicks within this time interval
* count as a double click and result in a #GDK_2BUTTON_PRESS event).
* Applications should NOT set this, it is a global user-configured setting.
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
**/
void
gdk_display_set_double_click_time (GdkDisplay *display,
guint msec)
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
{
display->double_click_time = msec;
}
/**
* gdk_set_double_click_time:
* @msec: double click time in milliseconds (thousandths of a second)
*
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
* Set the double click time for the default display. See
* gdk_display_set_double_click_time(). Applications should NOT
* set this, it is a global user-configured setting.
**/
void
gdk_set_double_click_time (guint msec)
{
gdk_display_set_double_click_time (gdk_display_get_default (), msec);
}
GType
gdk_event_get_type (void)
{
static GType our_type = 0;
if (our_type == 0)
our_type = g_boxed_type_register_static ("GdkEvent",
(GBoxedCopyFunc)gdk_event_copy,
(GBoxedFreeFunc)gdk_event_free);
return our_type;
}
Make gdkx.h the only installed header from gdk/x11. All structures in Fri Sep 7 11:51:44 2001 Owen Taylor <otaylor@redhat.com> Make gdkx.h the only installed header from gdk/x11. All structures in gdk/x11 are opaque. * gdk/x11/Makefile.am gdk/x11/gdkx.h gdk/x11/gdkprivate-x11.h: Don't install gdk{drawable,pixmap,window}-x11.h. * gdk/x11/{gdkcolormap-x11.c, gdkfont-x11.c, gdkx.h, gdkvisual-x11.c: Move GdkColormapPrivateX11, GdkFontPrivateX GdkImagePrivateX11, GdkVisualClass into C files. * gdk/gdkpixmap-x11.[ch]: Make gdk_pixmap_impl_get_type() static. * gdk/x11/{gdkcolor-x11.c, gdkcursor-x11.c, gdkdrawable-x11.c, gdkfont-x11.c, gdkgc-x11.c, gdkx.h, gdkimage-x11,gdkvisual-x11.c} Add public functions to replace previously exported direct structure access. gdk_x11_colormap_get_{xdisplay,xcolormap} gdk_x11_cursor_get_{xdisplay,xcursor}, gdk_x11_drawable_get_{xdisplay,xcursor,gdk_x11_visual_get_xvisual, gdk_x11_font_get_{xdisplay,xfont}, gdk_x11_image_get_{xdisplay,ximage}, gdk_x11_gc_get_{xdisplay,ximage} * gdk/gdkprivate.h gdk/gdkinternals.h: Move GdkColorInfo, GdkEventFilter, GdkClientFilter, GdkFontPrivate to gdkinternals. Fix a number of variables and functions that were exported "accidentally" from GDK. * gdk/**.[ch]: gdk => _gdk for gdk_visual_init, gdk_events_init, gdk_input_init, gdk_dnd_init, gdk_image_exit, gdk_input_exit, gdk_windowing_exit, gdk_event_func, gdk_event_data, gdk_event_notify, gdk_queued_events, gdk_queued_tail, gdk_event_new, gdk_events_queue, gdk_events_unqueue, gdk_event_queue_find_first, gdk_event_queue_remove_link, gdk_event_queue_append, gdk_event_button_generate, gdk_debug_flags, gdk_default_filters, gdk_parent_root. * gdk/x11/{gdkevents-x11.c, gdkglobals-x11.c, gdkimage-x11.c, gdkmain-x11.c, gdkprivate-x11.h, gdk/x11/gdkwindow-x11.c}: gdk => _gdk for gdk_event_mask_table, gkd_nevent_masks, gdk_wm_window_protocols, gdk_leader_window, gdk_xgrab_window, gdk_use_xshm, gdk_input_ignore_core. * gdk/x11/xsettings-common.h (xsettings_list_insert): Add #defines to namespace functions into the private _gdk_ namespace. * gdk/gdkwindow.[ch] gdk/x11/gdkx.h: Add gdk_get_default_root_window () to replace gdk_parent_root exported variable. Adjust and deprecate GDK_ROOT_PARENT(). * demos/{testpixbuf-drawable.c,testpixbuf-save.c}: Fix GDK_ROOT_PARENT usage, remove includes of port-specific headers. * gdk/{win32,x11,fb}/gdkinput*.[ch]: s/gdk/_gdk/ for _gdk_input_gxid_host, _gdk_input_gxid_port, _gdk_input_ignore_core, gdk_input_devices, _gdk_input_windows, gdk_init_input_core. * gdk/x11/{gdkevents-x11.,c gdkglobals-x11.c, gdkmain-x11.c} docs/Changes-2.0.txt: Remove gdk_wm_protocols, gdk_wm_delete_window functions, gdk_wm_take_focus, use gdk_atom_intern() instead. * gdk/linux-fb/{gdkselection-fb.c, gdkmain-fb.c, gdkprivatefb.h} gdk/win32/{gdkselection-win32.c, gdkmgdkwin32.h, gdkprivate-win32.h} gdk/x11/{gdkselection-x11.c gdkx.h, gtkprivate-x11.h} gtk/gtkselection.c Unexport gdk_selection_property, just use gdk_atom_intern ("GDK_SELECTION"). * gdk/x11/{gdkprivate-x11.h,gdkdrawable-x11h,gdkgc-x11.c,gdkx.h}: Unexport gdk_drawable_impl_x11_get_type, gdk_gc_x11_get_type, GDK_GC_X11 cast macros, GdkGCX11 structures, GdkCursorPrivate, GdkVisualprivate, gdk_x11_gc_flush. Make a number of public exports of variables into functions to increase encapsulation. * gdk/gdkinternals.h gdk/gdkinput.h gdk/gdkevents.h gdk/linux-fb/gdkmouse-fb.c: gdk_core_pointer => _gdk_core_pointer, move to gdkinternals.h. Add gdk_device_get_core_pointer (). * gdk/gdkprivate.h gdk/gdkpango.c gdk/gdkinternals.h docs/Changes-2.0.txt: Unexport gdk_parent_root, gdk_error_code, gdk_error_warnings. * gdk/x11/{gdkcolormap-x11.c, gdkmain-x11.c, gdkx.h} docs/Changes-2.0.txt: s/gdk_screen/_gdk_screen/, add gdk_x11_get_default_screen() s/gdk_root_window/_gdk_root_window/, add gdk_x11_get_default_root_xwindow() Add gdk_x11_get_default_xdisplay(). * gdk/gdk.h gdk/gdk.c linux-fb/gdkfb.h linux-fb/gdkglobals-fb.c win32/gdkwin32.h x11/gdkglobals-x11.c gdk/x11/gdkmain-x11.c gdk/x11/gdkx.h: gdk/gdk.def: Add gdk_get/set_program_class, Don't export gdk_progclass, move --class command line option and handling to common portion of GDK. Miscellaneous fixes: * gdk/x11/gdkwindow-x11.c (gdk_window_set_icon_list): Fix g_return_val_if_fail that should have been g_return_if_fail. * gdk/gdkinternals.h gdk/gdkprivate.h: Move gdk_synthesize_window_state() to the semi-public gdkprivate.h. * gtk/gtkdnd.c (_gtk_drag_source_handle_event): Remove uneeded X11 dependency. * gdk/linux-fb/gdkmain-fb.c gdk/win32/gdkmain-win32.c gdk/TODO: Remove unused gdk_key_repeat_disable/restore. * linux-fb/gdkglobals-fb.c win32/gdkglobals-win32.c x11/gdkglobals-x11.c x11/gdkprivate-x11.h gdk/gdk.def: Remove unused gdk_null_window_warnings variable. * gdk/Makefile.am (DIST_SUBDIRS) nanox/*: cvs remove nanox; it can be retrieved from the repository; it is too far from functional to be worth having people check out; it would be easier to start from scratch, I suspect. * gdk/x11/gdkpixmap-x11.c: Fix lvalue usage of GDK_PIXMAP_XID(). * gdk/x11/gdkkeys-x11.c gdk/gdkrgb.c gdk/gdkwindow.c gdk/x11/gdkpango-x11.c gdk/x11/gdkselection-x11.c: Fix some accidentally global variables and unused global variables. * gdk/x11/gdkkeys-x11.c gdk/gdkrgb.c gdk/gdkwindow.c gdk/x11/gdkpango-x11.c gdk/x11/gdkselection-x11.c: Fix some accidentally global variables and unused global variables. Add some space for future expansion to multihead. * gdk/gdkdrawable.h: Add four reserved function pointers for future expansion of GdkDrawableClass. * gtk/gtkwindow.h gtk/gtkinvisible.h: Add reserved pointer where we can put a GdkScreen * later.
2001-09-07 21:50:20 +00:00
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
/**
* gdk_setting_get:
* @name: the name of the setting.
* @value: location to store the value of the setting.
*
* Obtains a desktop-wide setting, such as the double-click time,
* for the default screen. See gdk_screen_get_setting().
*
* Returns : %TRUE if the setting existed and a value was stored
* in @value, %FALSE otherwise.
**/
gboolean
gdk_setting_get (const gchar *name,
GValue *value)
{
return gdk_screen_get_setting (gdk_screen_get_default (), name, value);
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
}