Commit Graph

130 Commits

Author SHA1 Message Date
Matthias Clasen
03f7e26d26 Don't return PropertyNotify.state as modifier state
It isn't, it really is a GdkPropertyState.

Reported by Tim Janik in bug 633795.
2010-12-22 14:33:09 -05:00
Matthias Clasen
536a7c8abb Work around issues with events without screens
Just use the default display for copy/free of event data.
Maybe the vfuncs should be moved to GdkDisplayManager.
2010-12-21 12:07:00 -05:00
Matthias Clasen
39a71b8831 Add vfuncs for _gdk_windowing_event_data_{copy,free} 2010-12-21 12:06:59 -05:00
Matthias Clasen
ea96e5e16f Explode gdkinternals.h into per-class private headers
At the same time, move some more class and instance structs
out of public headers.
2010-12-21 12:06:58 -05:00
Matthias Clasen
ec9c97752d Work toward turning GdkDisplayManager into a backend singleton
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.
2010-12-21 12:06:57 -05:00
Carlos Garnacho
f5a20ab65a Add gdk_event_[gs]et_source_device().
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)
2010-12-15 03:17:58 +01:00
Benjamin Otte
f9a9567731 gdk: Replace direct calls of _gdk_event_func with _gdk_event_emit()
For now that function just calls the event func.
2010-12-02 20:21:05 +01:00
Benjamin Otte
3494f87a10 API: Remove GdkNoExposeEvent
It's not used by anyone and not supported by any backend but X11.
2010-12-02 20:21:04 +01:00
Benjamin Otte
1bb6f48bb3 gdk: Rename GdkWindowObject to GdkWindow
... and remove most of the casting that used to be necessary.
2010-12-02 20:21:03 +01:00
Milan Bouchet-Valat
2e3935ba9d Fix missing (transfer) annotations in GDK
Mostly missing (transfer none).
2010-11-24 21:37:20 +01:00
Michael Natterer
fb5dd9f72f Move all GdkDevice members to private and add one missing accessor 2010-11-23 20:25:13 +01:00
Javier Jardón
4400f997a8 docs: Move documentation to inline comments: gdkevents 2010-11-15 21:06:35 +01:00
Carlos Garnacho
b1dec866e5 Use the client pointer for events with no device.
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.
2010-10-28 23:01:16 +02:00
Owen W. Taylor
398728feb5 Remove unused GdkDeviceManager variable
gdk_display_get_device_manager() was called but the device manager
not used.
2010-10-28 16:43:55 -04:00
Matthias Clasen
bda1f35585 Inclusion cleanups in sources
Try to do inclusions in the same sequence, more or less.
2010-10-14 22:09:36 -04:00
Benjamin Otte
b5097de481 gdk: gdk_drawable_get_display() => gdk_window_get_display() 2010-09-26 15:11:33 +02:00
Benjamin Otte
a6e936788a gdk: gdk_drawable_get_screen/visual => gdk_window_get_screen/visual 2010-09-26 15:11:33 +02:00
Tomeu Vizoso
41f4fd94df Don't try to unref event->dnd.context unconditionally.
As it's not set in gdk_event_new but eventually later.

https://bugzilla.gnome.org/show_bug.cgi?id=630520
2010-09-24 18:20:41 +02:00
Javier Jardón
9c3d1080d6 Do not use deprecated gdk_display_get_core_pointer()
Use gdk_device_manager_get_client_pointer() instead
2010-09-22 03:42:15 +02:00
Matthias Clasen
e0aa12eb0a Tons of transfer annotations 2010-09-21 00:18:11 -04:00
Matthias Clasen
eb10e6b128 Remove the long deprecated GDK_WINDOW_DIALOG type.
This has been deprecated forever, and was just left in for
compatibility reasons.
2010-08-28 20:10:02 -04:00
Christian Persch
ffa07ee21e Use G_DEFINE_BOXED_TYPE
Bug #627214.
2010-08-18 15:34:47 +02:00
Javier Jardón
404e7d0e00 gdk/: fully remove gdkalias hacks
https://bugzilla.gnome.org/show_bug.cgi?id=623845
2010-07-10 02:21:31 +02:00
Kristian Rietveld
43f4398dbd Remove mention of gdk_event_get_graphics_expose() 2010-06-30 21:43:25 +02:00
Benjamin Otte
3e96cfe8fc Deprecate the GdkRegion API
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
2010-06-29 16:06:38 +02:00
Javier Jardón
349f8c561d Remove gdk_input_* callbacks on file descriptors deprecated functions
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=619687
2010-06-20 00:46:38 +02:00
Carlos Garnacho
cd76d995eb gdk_event_get_device(): Fallback to core pointer/keyboard.
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.
2010-06-15 21:06:11 +02:00
Steve Frécinaux
586d60dbee [gdkevents] Add annotations for GdkEvent getters. 2010-06-08 00:00:28 +02:00
Matthias Clasen
bd4609b140 Merge the xi2-for-master branch 2010-05-25 18:38:44 -04:00
Javier Jardón
7894951cee Remove deprecated code from GdkEvent 2010-05-03 01:48:45 +02:00
Matthias Clasen
78e68d4548 Update the gdk_event_free docs
Bug 616118
2010-04-22 14:13:35 -04:00
Javier Jardón
ccf17a828b [docs] Add missing "Deprecated: 2.x" to the api doc comments 2010-01-11 06:25:59 +01:00
Matthias Clasen
9d999fb89f Properly free damage events
This was reported in bug 605008
2009-12-20 03:11:04 -05:00
Alexander Larsson
aa8693f2cb Track viewable for GdkWindow 2009-07-18 23:11:54 +02:00
Alexander Larsson
a006d85928 Avoid warnings about non-handled GDK_EVENT_LAST enum 2009-04-02 10:15:28 +02:00
Alexander Larsson
e24c9e291d Switch motion hint emulation to be serial based.
For backends not supporting serials, just have
_gdk_windowing_window_get_next_serial return zero.
2009-04-02 10:15:26 +02:00
Alexander Larsson
cb05af0a61 Implement GDK_POINTER_MOTION_HINT_MASK support 2009-04-02 10:15:25 +02:00
Alexander Larsson
eabac453e6 Initial client-side-windows work
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.
2009-04-02 10:14:01 +02:00
Sven Herzberg
ad7880a590 Bug 551063 – deprecated marking without a link to what new code should
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-09-06 17:26:33 +00:00
Matthias Clasen
faef4e8ce2 Small doc fixes
svn path=/trunk/; revision=20771
2008-07-04 21:55:21 +00:00
Cody Russell
57223c9a05 Revert name change
svn path=/trunk/; revision=20724
2008-07-01 22:57:50 +00:00
Cody Russell
fce9c8b7d4 Practically everything changed.
2008-06-30  Cody Russell  <bratsche@gnome.org>

        * Practically everything changed.

        Change	all references	of GIMP	Toolkit	(and variations	of it)
        to GTK+	Toolkit, showing no mercy at all to our	beloved
	ancestry. (#540529)


svn path=/trunk/; revision=20709
2008-06-30 23:01:56 +00:00
Johan Dahlin
d97cdbdf53 Include "config.h" instead of <config.h> Command used: find -name
2008-06-21  Johan Dahlin  <jdahlin@async.com.br>

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


svn path=/trunk/; revision=20669
2008-06-22 14:28:52 +00:00
Michael Natterer
67c6c28fe0 deprecate GdkDestroyNotify.
2008-06-18  Michael Natterer  <mitch@imendio.com>

	* gdk/gdk.h: deprecate GdkDestroyNotify.

	* gdk/gdkevents.c
	* gdk/gdktypes.h
	* gdk/x11/gdkevents-x11.c
	* gtk/gtkmain.c: s/GdkDestroyNotify/GDestroyNotify/g.


svn path=/trunk/; revision=20449
2008-06-18 09:39:24 +00:00
10:49:20 Tim Janik
4111cf2065 Bug 318807 – Offscreen windows and window redirection.
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-21 19:04:24 +00:00
Michael Natterer
f3cd3f7cf5 gdk/gdkinternals.h gdk/gdkevents.c gdk/directfb/gdkevents-directfb.c
2008-05-07  Michael Natterer  <mitch@imendio.com>

	* gdk/gdkinternals.h
	* gdk/gdkevents.c
	* 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):
	order parameters src,dest and make src const.


svn path=/trunk/; revision=20079
2008-05-06 22:35:13 +00:00
Richard Hult
4ee2d1b6ba Add private backend data to events, and handle it when copying/freeing
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-05-06 21:00:06 +00:00
Michael Natterer
8243e3d415 gdk/gdkdisplay.h gdk/gdkdrawable.h gdk/gdkevents.h gdk/gdkpango.h
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
2008-01-15 15:32:37 +00:00
Matthias Clasen
4896e24bb1 Require gtk-doc 1.8
2007-11-25  Matthias Clasen  <mclasen@redhat.com>

        * configure.in: Require gtk-doc 1.8

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


svn path=/trunk/; revision=19041
2007-11-25 06:51:19 +00:00
Tim Janik
52c134e007 added usage example to gdk_event_request_motions() docs.
Wed Jul  4 12:20:23 2007  Tim Janik  <timj@imendio.com>

        * gdk/gdkevents.c (gdk_event_request_motions): added usage example
        to gdk_event_request_motions() docs.



svn path=/trunk/; revision=18378
2007-07-04 10:21:05 +00:00