This commit hides the GdkDisplayManager instance and class structs,
adds vfuncs for listing displays, opening displays, and getting and
setting the default display. The X11 backend has a derived
GdkDisplayManagerX11.
The gdk_display_manager_get() function is responsible for deciding on
which of the compiled in backends to use. Currently, it consults the
GDK_BACKEND environment variable and falls back to x11.
This function may be used to know the hardware device that triggered
an event, it could resort to the master device in the few cases there's
not a direct hardware device to relate to the event (i.e.: crossing events
due to grabs)
The core pointer is sort of meaningless in a multidevice environment,
the client pointer is used instead to fake a GdkDevice on events that
don't have one.
Includes fixing all callers to use the cairo region API instead. This is
usually just replacing the function names, the only difference is
gdk_region_get_rectangles() being replaced by
cairo_region_num_rectangles() and cairo_region_get_rectangle() which
required a bit more work.
https://bugzilla.gnome.org/show_bug.cgi?id=613284
Events could be injected by third party code, which could not have a
GdkDevice set for newer GdkEvent types holding a GdkDevice. This
function will now fallback to core pointer/keyboard, plus issuing
a warning about the problem.
The history before this was kind of twisted as several different
approaches were tested, so that was all squashed into this initial
commit to hide the uninteresting changes and files that were later
removed.
2008-09-06 Sven Herzberg <sven@imendio.com>
Bug 551063 – deprecated marking without a link to what new code should
use
* gdk/tmpl/input.sgml: dropped tmpl documentation for gdk_input_add()
and gdk_input_add_full()
* gdk/gdkevents.c: added inline documentation for gdk_input_add() and
gdk_input_add_full(); added replacement hints into the deprecation
message
svn path=/trunk/; revision=21305
2008-06-30 Cody Russell <bratsche@gnome.org>
* Practically everything changed.
Change all references of GIMP Toolkit (and variations of it)
to GTK+ Toolkit, showing no mercy at all to our beloved
ancestry. (#540529)
svn path=/trunk/; revision=20709
2008-03-18 10:49:20 Tim Janik <timj@imendio.com>
* Applied pixmap redirection patch by Alexander Larsson with
various updates from:
Bug 318807 – Offscreen windows and window redirection.
Updates:
* updated docs to mention "Since 2.16".
* tests/testgtk.c: fixed snapshooting pixmap leak.
convert pixmap to pixbuf after snapshooting, to compensate for different
bit depths (occurs when snapshooting ARGB visuals and displaying the
pixmap in an RGB visual).
* gdk/gdkwindow.[hc]: made GdkWindowRedirect private.
* gdk/gdkwindow.c: removed damage idle handler, there's no aparent
need for it. enqueue damage notification as GDK_DAMAGE events
for each painting redirection at the start of the event queue.
consider windows with a redirection fully visible when invalidating,
and when updating from backing store. cleaned up stale variables.
* gdk/gdkevents.c: added _gdk_event_queue_prepend().
* gtk/gtkwidget.c: fixed coordinates for !NO_WINDOW widgets in
gtk_widget_get_snapshot; this fixes garbage snap offsets for gammacurve,
tree, drawingarea, text, handlebox, etc.
clip the redirected window hierarchy to window sizes, the visible
rectangles don't need to be taken into account here.
extended snapshooting docs to recommend gdk_pixbuf_get_from_drawable()
in case pixmap visuals could mismatch.
* gdk/x11/gdkwindow-x11.c: removed _gdk_windowing_window_get_visible_rect().
Base patch:
* tests/testgtk.c: add a "Snapshot" test to demonstrate snapshooting
of possibly obscured widgets into an offscreen pixmap.
* gtk/gtkwidget.[hc]: add GtkWidget::damage-event signal, add
gtk_widget_get_snapshot() to render a widget's contents to a GdkPixmap.
* gtk/gtkmain.c: dispatch GDK_DAMAGE events.
* gdk/gdkwindow.c: moved outer gdk_window_new() and gdk_window_reparent()
implementations here, adapted them to propagate redirects to child windows.
gdk_window_end_paint(): copy repainted window contents to redirection pixmap,
clipped to visible region. queue GDK_DAMAGE event delivery.
gdk_window_redirect_to_drawable(): install window painting redirection.
gdk_window_remove_redirection(): remove previously installed redirection.
* gdk/x11/gdkwindow-x11.c: added _gdk_windowing_window_get_visible_rect(),
renamed _gdk_window_new() and _gdk_window_reparent().
* gdk/gdkwindow.h: added GdkWindowRedirect* to GdkWindowObject, export
gdk_window_redirect_to_drawable() and gdk_window_remove_redirection().
* gdk/gdkevents.h: added GDK_DAMAGE event type.
* gdk/gdkevents.c: extract time and state from GDK_DAMAGE events.
* gdk/gdkinternals.h: added internal prototypes.
svn path=/trunk/; revision=20122
2008-05-06 Richard Hult <richard@imendio.com>
* gdk/gdkevents.c: (gdk_event_copy), (gdk_event_free):
* gdk/gdkinternals.h: Add private backend data to events, and
handle it when copying/freeing events. Currently only needed in
the quartz backend.
* gdk/directfb/gdkevents-directfb.c:
* gdk/quartz/gdkevents-quartz.c:
* gdk/win32/gdkevents-win32.c:
* gdk/x11/gdkevents-x11.c: (_gdk_windowing_event_data_copy)
(_gdk_windowing_event_data_free): Add stubs for X11, win32 and
directfb. Implement for quartz. Part of fixing bug #473822.
svn path=/trunk/; revision=20078
2008-01-15 Michael Natterer <mitch@imendio.com>
* gdk/gdkdisplay.h
* gdk/gdkdrawable.h
* gdk/gdkevents.h
* gdk/gdkpango.h
* gdk/gdkregion.h
* gdk/gdkrgb.h
* gdk/gdkwindow.h: made more struct pointer and array parameters
const. GDK should now be constified as far as possible without
breaking source compatibility. Includes some minor cleanup like
indentation and s/nfoo/n_foo/ (bug #508544).
* gdk/gdkdisplay.c
* gdk/gdkdraw.c
* gdk/gdkevents.c
* gdk/gdkpango.c
* gdk/gdkregion-generic.c
* gdk/gdkrgb.c
* gdk/directfb/gdkdisplay-directfb.c
* gdk/directfb/gdkwindow-directfb.c
* gdk/quartz/gdkdisplay-quartz.c
* gdk/quartz/gdkwindow-quartz.c
* gdk/win32/gdkdisplay-win32.c
* gdk/win32/gdkwindow-win32.c
* gdk/x11/gdkdisplay-x11.c
* gdk/x11/gdkwindow-x11.c: changed accordingly.
svn path=/trunk/; revision=19372
2005-03-15 Matthias Clasen <mclasen@redhat.com>
Make PLT-reduction work with gcc4, and don't include
everything in gdkalias.h:
* gdk/gdk.symbols: Group symbols by header and source file.
* gdk/makegdkalias.pl: Protect definitions by the same
preprocessor symbols used to guard the headers. Move
the alias declarations to a separate file which is
produced when calling makegdkalias.pl -def
* gdk/Makefile.am (gdkaliasdef.c): Add a rule to generate this
file.
* gdk/*.c, gdk/x11/*.c: Include gdkalias.h after the other
headers, include gdkaliasdef.c at the bottom.
Mon Aug 9 15:41:17 2004 Matthias Clasen <maclas@gmx.de>
Add hidden aliases for exported symbols which are
used internally in order to get rid of many PLT
entries. (#145519, Arjan van de Ven)
* gdk/Makefile.am: Add rules to generate gdk.def and
gdkalias.h from gdk.symbols, and make make check check
the abi with abicheck.sh.
* gdk/gdk.symbols: New file. Definition of the GDK ABI.
The file can be processed by cpp to filter out certain
subsets of symbols.
* gdk/abicheck.sh: New file. Script to check the actually
symbols exported from libgdk-x11.2.0.so against the symbols
found in gdk.symbols.
* gdk/makegdkalias.pl: New file. Perl script to generate the
header containing the alias definitions for internally used
exported symbols from a list of symbols.
* gdk/*.c, gdk/x11/*.c: Include gdkalias.h
Fri Jul 9 15:33:55 2004 Manish Singh <yosh@gimp.org>
* gdk/gdkevents.c: have a dummy case GDK_OWNER_CHANGE in switch
statements to avoid gcc warnings about not all enum values handled.
* gdk/x11/gdkdisplay-x11.c (gdk_display_open): ignore should live in
#ifdef HAVE_XFIXES.
2004-03-05 Federico Mena Quintero <federico@ximian.com>
Fixes#136082 and #135265, patch by Morten Welinder.
* configure.in: Use AC_SYS_LARGEFILE.
* */*.c: #include <config.h>
Tue Dec 16 01:46:46 2003 Matthias Clasen <maclas@gmx.de>
Do not interpret distant clicks as double-clicks (#116541,
Bernhard Walle):
* gdk/gdkdisplay.h (struct GdkDisplay): Add new fields
double_click_distance, button_x and button_y.
* gdk/gdkdisplay.c (gdk_display_init): Initialize the new fields.
* gdk/gdkdisplay.h:
* gdk/gdkevents.c (gdk_display_set_double_click_distance):
New function to set the double click distance on a display.
* gdk/gdkevents.c: Take double click distance into account
when generating single, double or triple clicks.
* gtk/gtksettings.c: Add new setting "gtk-double-click-distance".
* gdk/x11/gdkevents-x11.c: Add the XSetting
"Net/DoubleClickDistance" and map it to "gtk-double-click-distance".
Fri Apr 18 17:14:33 2003 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.c (gdk_event_copy): Fix for the
case when gdk_event_copy() is called on a non-allocated
event. (#109716, reported by Rich Burridge)
Thu Oct 3 14:13:33 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.c (gdk_event_new): Add a 'type'
parameter, make public.
* gdk/gdkevents.c (gdk_event_copy): Copy the screen.
* gdk/gdkevents.c gdk/linux-fb/gdkmain-fb.c
gdk/x11/gdkevents-x11.c gdk/win32/gdkevents-win32.c:
_gdk_event_new() => gdk_event_new().
* gdk/win32/gdkevents-win32.c (real_window_procedure):
Fix event_private->screen breakage that results from evil
encapsulation breakage here.
* gtk/gtkclist.c gtk/gtkcombo.c gtk/gtkcontainer.c
gtk/gtkdialog.c gtk/gtkdnd.c gtk/gtkdrawingarea.c
gtk/gtkimcontextsimple.c gtk/gtklist.c gtk/gtkmenu.c
gtk/gtknotebook.c gtk/gtkplug.c gtk/gtkselection.c
gtk/gtktext.c gtk/gtktreeitem.c gtk/gtktreeview.c
gtk/gtkviewport.c gtk/gtkwindow-decorate.c gtk/gtkwindow.c
tests/testgtk.c: Remove most usage of stack-allocated
GdkEvent structures.
* gtk/gtktreeview.c: Use a cut-and-paste of the full
send_focus_event() from gtkwindow.c that does the necessary
notification of the ::has-focus property and setting of
the HAS_FOCUS flag.x
* gtk/gtkdnd.c: Clean up some mess/duplicated code; removing
an extraneous use of a GdkEvent.
Wed Oct 2 17:46:53 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdrawable.h gdk/gdkinternals.h gdk/gdkdraw.c
gdk/gdkwindow.c gdk/gdkdrawable.c: Export _gdk_draw_pixbuf
as gdk_draw_pixbuf(), rename the _draw_pixbuf virtual
function to draw_pixbuf. (#60582)
* gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable[_alpha]):
Note that these functions are obsolete in the docs.
* gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable):
Remove all the sanity checks now we make it clear
that it is obsolete name for gdk_draw_pixbuf().
* gdk/gdkpixmap.c gtk/gtkcellrendererpixbuf.c gtk/gtkimage.c
gtk/gtkpixmap.c demos/testpixbuf-scale.c demos/testpixbuf.c
tests/testrgb.c: Use gdk_draw_pixbuf() everywhere.
* gtk/gtklabel.c (gtk_label_set_mnemonic_widget): Fix
some warnings.
* gdk/gdkinternals.h (struct _GdkEventPrivate): Fix missed
bit from last gdk_event_get_screen() change.
* gdk/gdkevents.c: Couple of small fixes.i
Wed Oct 2 17:36:42 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.[ch] gdk/x11/gdkevents-x11.[ch]: Add
gdk_screen_set_screen()/_get_screen() which (by evil
hacks) work for for heap allocated events and
fall back gracefully for stack allocated events.
2002-08-25 Tor Lillqvist <tml@iki.fi>
* gdk/gdkevents.c
* gdk/gdkinternals.h
* gdk/x11/gdkevents-x11.c
* gdk/win32/gdkevents-win32.c: Move the GdkEventPrivate and
GdkEventFlags definitions from gdkevents.c to
gdkinternals.h. Remove the duplicated definitions in
gdkevents-x11.c and gdkevents-win32.c. (#89771)
Thu Jun 20 14:51:30 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtksettings.c (gtk_settings_notify): Only
change the double click time if the screen for
the notification is screen 0 of the display.
(#77978)
* gdk/gdkevents.c (gdk_display_set_double_click_time): Fix
half-done rename.
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.
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.
Wed Mar 20 16:36:08 2002 Owen Taylor <otaylor@redhat.com>
* gtk/*.c: Patch from Erwann Chenede, #73900 fixing
a lot of warnings with Forte CC, mostly implicit
casts between void * and function pointers.
* gdk/gdkevents.c (gdk_event_get_state): GdkEventVisibility's
state field is not a GdkModifierType. (Also #73900)
Tue Dec 4 12:06:13 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c: Ref and sink priv->tooltips in
init() and unref priv->tooltips in destroy rather
than calling gtk_object_destroy() which has no
effect on memory management. (#66104, HideToshi
Tajima)
* gtk/gtkcolorsel.c (palette_set_color): Use g_object_set_data_full()
so we free the when the object is freed. (Fixes memory
leak, #66096, HideToshi Tajima)
* gdk/gdkevents.c (gdk_synthesize_window_state): Use
a full GdkEvent structure to avoid reads of uninitialized/
invalid memory in gdk_event_put() (#65877, patch
from Hidetoshi Tajima)
Fri Nov 23 19:22:50 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c: Handle events in windows other
than widget->event_window properly. (#65079, reported
by Damon Chaplin)
* gdk/gdkevents.c (gdk_event_get_coords): Fix x/y bug.
2001-10-28 Hans Breuer <hans@breuer.org>
* gdk/gdk.c gdk/gdkevents.c
gdk/win32/gdkcolor-win32.c gdk/win32/gdkdnd-win32.c
gdk/win32/gdkdrawable-win32.c gdk/win32/gdkevents-win32.c
gdk/win32/gdkfont-win32.c gdk/win32/gdkgc-win32.c
gdk/win32/gdkim-win32.c gdk/win32/gdkmain-win32.c
gdk/win32/gdkprivate-win32.h gdk/win32/gdkproperty-win32.c
gdk/win32/gdkselection-win32.c gdk/win32/gdkwin32.h
gdk/win32/gdkwindow-win32.c gdk/win32/gdkwindow-win32.h :
static correct-ness, underscore prefixing of library internal
functions
(applied the undisputed and the win32 part. Of the latter
I'm probably the one who will change it back again, if Owen
decides that the Gdk*Impl types should not be private to Gdk)
* gdk/gdk.def : added the remaining exported functions
2001-10-02 Havoc Pennington <hp@redhat.com>
Throughout: assorted docs
* gdk/gdkwindow.h: deprecate gdk_window_set_hints(), it's broken,
gdk_window_set_geometry_hints() should be used instead.
* gdk/gdkimage.h: deprecate gdk_image_ref, gdk_image_unref, and
document them
* gdk/x11/gdkx.h: remove gdk_get_client_window() since it doesn't
seem to exist in any .c files
* gdk/x11/gdkcolor-x11.c (gdk_colormap_query_color): docs,
g_return_if_fail (pixel < colormap->size).
2001-09-10 Alex Larsson <alexl@redhat.com>
* demos/gtk-demo/stock_browser.c:
* gdk/gdkcolor.c:
* gdk/gdkcursor.c:
* gdk/gdkevents.c:
* gdk/gdkrectangle.c:
* gtk/gtktypeutils.c:
Update to use the new g_boxed_type_register_static API.
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.
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-29 James Henstridge <james@daa.com.au>
The following changes correspond to bug #56812
* gdk/gdkinput.h, gdk/gdkevents.c (GDK_TYPE_DEVICE): register type
code for GdkDevice.
* gdk/gdkcursor.[ch] (GDK_TYPE_CURSOR): register type code for
GdkCursor.
Mon Apr 2 18:18:07 2001 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.h: Add GdkEventSetting event for notification
of changes to system settings, gdk_setting_get() to retrieve
a single system setting.
* gdk/x11/gdkevents-x11.c: Bridge gdk_setting_get() and GdkEventSetting
to the draft XSETTINGS mechanism.
* gdk/x11/xsettings-{common,client}.[ch]: Sample-implementation of
XSETTINGS.
* gtk/gtkmain.c gtk/gtksettings.[ch]: Propagate notification
of GDK settings changes to the GtkSettings object.
* gdk/gdkevents.[ch] gdk/gtk/gtksettings.c: Hook up the
double-click-timeout property to GDK.
* gdk/gdkcolor.[ch] gdk/gdkvisual.h gdk/gdkevent.[ch] gdk/gdkfont.[ch]:
Define GDK boxed types here.
* gdk/Makefile.am gdk/makeenums.pl: Generate source files
gdk/gdkenumtypes.[ch] for enum definitions.
* gtk/gtkcompat.h: Add defines for GTK_TYPE_GDK_*
* gtk/gtk-boxed.defs: Comment out GDK types
* gtk/gtktypeutils.h: Remove GDK types
* gtk/Makefile.am: No longer scan GDK headers for enumerataions
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
2000-12-18 Havoc Pennington <hp@redhat.com>
* gdk/gdkevents.c (gdk_event_get_state): wow, that implementation
was pretty non-working.
* gtk/testtext.c (fill_file_buffer): make this a bit more robust
by passing the length to g_utf8_validate().
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
Wed Jul 26 12:59:31 2000 Tim Janik <timj@gtk.org>
* *.[hc]: applied patch from Andreas Persenius <ndap@swipnet.se> that
updates the license headers to the GNU Lesser General Public License,
as well as updating the copyright year to 2000.
Mon Jul 3 14:24:16 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_draw): Ignore calls with
<= width or height.
* gtk/gtktable.c (gtk_table_attach): Fix missed merge
from 1.2 for parent/child states.
* gdk/gdkgc.c (gdk_gc_set_rgb_fg/bg_color): Fix a couple
of typos.
* gdk/gdkevents.[ch]: Remove press/xtilt/ytilt fields of
event structures, replace with a generic axes field. Replace
deviceid/source with GdkDevice *device.
* gdk/gdkevents.[ch] (gdk_event_get_axis): Add function
to extract particular axis use value from event. (Also
can be used for normal X/Y.)
* gdk/gdkinput.h gdk/x11/gdkinput*: Major revision;
allow for arbitrary number of axes, namespace everything
as gdk_device_*. Replace guint32 deviceid with GdkDevice *
everywhere.
* gdk/x11/{gdkmain-x11.c,gdkevent-x11.c,gdkinput*}:
Get rid of the gdk_input_vtable setup if favor of simply
defining the functions in gdkinput-none/gxi/xfree.c in
a similar fashion to the way that the port structure is
done.
* gtk/gtkdnd.c: Fix fields of synthesized button press event
for new event structures.
* gtk/gtkinputdialog.c gtk/testinput.c: Revise to match
new device interfaces.