Commit Graph

87 Commits

Author SHA1 Message Date
Alexander Larsson
e123931a65 Add more GdkWindow implementation docs 2009-06-01 13:38:04 +02:00
Alexander Larsson
7372379c24 Initial version of input support 2009-05-29 16:39:12 +02:00
Alexander Larsson
44c7264bc7 Add _gdk_gc_get_exposures 2009-05-27 17:06:46 +02:00
Alexander Larsson
8cb385cd31 Add support for visibility notification 2009-05-26 20:53:48 +02:00
Alexander Larsson
532818909c Move the new parts of GdkWindowObject to a private header
Unfortunately the old GdkWindowObject is public and accessed
from macros, etc. So, we publish a limited copy of GdkWindowObject
and use the full one internally when building gdk.
2009-04-02 10:16:30 +02:00
Cody Russell
a93c6cd6e1 CSW Win32 work in progress - builds but does not work yet. 2009-04-02 10:16:29 +02:00
Alexander Larsson
5be3f38535 Move implicit grab tracking totally to common code 2009-04-02 10:15:30 +02:00
Alexander Larsson
26cbf87d7d New approach for grab tracking code
We try to track the exact grab state, i.e. whats valid on the client
now and whats comming soon via the xserver roundtrip (and when).
2009-04-02 10:15:30 +02:00
Alexander Larsson
8de6ae26e4 Remove_gdk_pixmap_set_as_backing etc, as this is not used anymore
We don't copy from a window to a pixmap anymore, so all the code
for this can be removed.
2009-04-02 10:15:28 +02:00
Richard Hult
1a47356485 Remove invalidate_maybe_recurse and process_updates from the paintable interface
Replace them with two new functions
_gdk_windowing_{before,after}_process_all_updates() that are called
around the guts of gdk_window_process_all_updates(). Add empty ones
for X11 (nothing more needed), quartz ones will be implemented next.
2009-04-02 10:15:27 +02:00
Richard Hult
1ee03b35d0 Expose _gdk_window_process_updates_recurse for backends
We use this in the added windowing function
_gdk_windowing_window_process_updates_recurse. The X11 implementation
just calls _gdk_window_process_updates_recurse directly, but at least
quartz will need to do some more work.
2009-04-02 10:15:27 +02:00
Richard Hult
72d4403eed Add a window argument to begin_paint_region in the paintable interface
The paintable itself is now the impl window, which can be different
from the window.
2009-04-02 10:15:27 +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
cf54a2c68e Ungrab keyboard if virtual window is hidden or destroyed 2009-04-02 10:15:26 +02:00
Alexander Larsson
290de401a5 Move keyboard grab state tracking code to common code 2009-04-02 10:15:26 +02:00
Alexander Larsson
1ad01acbf2 Add _gdk_drawable_get_subwindow_scratch_gc as a way to get cached gcs with GDK_INCLUDE_INFERIORS 2009-04-02 10:15:18 +02:00
Alexander Larsson
d7e369c27a Implement input shapes 2009-04-02 10:15:16 +02:00
Alexander Larsson
4ba2b181bf Implement shaped windows 2009-04-02 10:15:16 +02:00
Alexander Larsson
062da50b9f Add _gdk_windowing_window_get_shape 2009-04-02 10:15:16 +02:00
Alexander Larsson
0d540e935b Create _gdk_drawable_create_cairo_surface to ugly typechecking 2009-04-02 10:15:15 +02:00
Alexander Larsson
0ba99e6e7b Make gdk_windowing_window_destroy a GdkWindowImpl method 2009-04-02 10:15:15 +02:00
Alexander Larsson
36ce54878b Make _gdk_windowing_window_queue_translation a GdkWindiwImpl call 2009-04-02 10:15:15 +02:00
Alexander Larsson
7b2b9a0219 Implement cursors 2009-04-02 10:15:15 +02:00
Alexander Larsson
f2b50ff638 Fix crossing event order and some details 2009-04-02 10:15:15 +02:00
Alexander Larsson
b771c9924d New approach to motion event handling 2009-04-02 10:15:11 +02:00
Alexander Larsson
1f5e104495 Add _gdk_pixmap_set_as_backing which is a way to get GraphicsExposures on pixmaps reported to the window they are backing store for 2009-04-02 10:14:08 +02:00
Alexander Larsson
e9ee842db1 Move drawable clip tracking into GdkGC 2009-04-02 10:14:06 +02:00
Alexander Larsson
5ff017e64e Move clip offsetting into _gdk_gc_intersect_clip_region 2009-04-02 10:14:06 +02:00
Alexander Larsson
ec4f8baa08 For foreign parents, use the real parent not the root (which is what we list as parent in the APIs) 2009-04-02 10:14:05 +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
Richard Hult
b81b90949b Bug 550942 – [patch] Rework of gdkeventloop-quartz.c
2008-11-12  Richard Hult  <richard@imendio.com>

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

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

svn path=/trunk/; revision=21783
2008-11-12 13:30:22 +00:00
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
Michael Natterer
2e3c1149ae remove duplicate declaration of _gdk_window_new().
2008-06-30  Michael Natterer  <mitch@imendio.com>

	* gdk/gdkinternals.h: remove duplicate declaration of
	_gdk_window_new().


svn path=/trunk/; revision=20707
2008-06-30 11:04:42 +00:00
Emmanuele Bassi
e27632cd6d Abstract some GdkWindow API into an interface that the backends must
2008-06-27  Emmanuele Bassi  <ebassi@gnome.org>

	Abstract some GdkWindow API into an interface that the backends
	must implement. (based on a patch by Alex Larsson)

	* gdk/Makefile.am: Add gdkwindowimpl.[ch]

	* gdk/gdk.symbols: Move symbols around.

	* gdk/gdkinternals.h:
	* gdk/gdkwindowimpl.[ch]: Move some of the GdkWindow API we require
	from the backends to a GInterface that the backends should implement
	instead.

	* gdk/gdkwindow.c: Provide some of the GdkWindow public API as a
	wrapper call around the GdkWindowImpl interface vtable.

	* gdk/x11/gdkevents-x11.c:
	* gdk/x11/gdkgeometry-x11.c:
	* gdk/x11/gdkprivate-x11.h:
	* gdk/x11/gdkwindow-x11.c:
	* gdk/x11/gdkwindow-x11.h: Update the X11 backend to implement
	the GdkWindowImpl interface.

svn path=/trunk/; revision=20695
2008-06-27 14:27:44 +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
Matthias Clasen
580ae3106d Don't install private headers. (#463510)
2008-02-15  Matthias Clasen  <mclasen@redhat.com>

        * gdk/Makefile.am: Don't install private headers. (#463510)

        * gdk/gdkinternal.h: Include gdkmedialib.h here, not in
        the installed header gdkprivate.h.



svn path=/trunk/; revision=19595
2008-02-16 04:33:48 +00:00
Michael Natterer
92f86e0496 gdk/gdk.h gdk/gdkcairo.h gdk/gdkcolor.h gdk/gdkgc.h gdk/gdkinternals.h
2008-01-14  Michael Natterer  <mitch@imendio.com>

	* gdk/gdk.h
	* gdk/gdkcairo.h
	* gdk/gdkcolor.h
	* gdk/gdkgc.h
	* gdk/gdkinternals.h
	* gdk/gdkregion.h
	* gdk/gdkwindow.h: made GdkRectangle*, GdkRegion* and GdkColor*
	parameters const.

	* gdk/gdkcairo.c
	* gdk/gdkgc.c
	* gdk/gdkwindow.c
	* gdk/gdkrectangle.c
	* gdk/gdkpolyreg-generic.c
	* gdk/gdkregion-generic.c
	* gdk/directfb/gdkcolor-directfb.c
	* gdk/directfb/gdkgc-directfb.c
	* gdk/directfb/gdkgeometry-directfb.c
	* gdk/directfb/gdkwindow-directfb.c
	* gdk/quartz/gdkcolor-quartz.c
	* gdk/quartz/gdkgc-quartz.c
	* gdk/quartz/gdkgeometry-quartz.c
	* gdk/quartz/gdkwindow-quartz.c
	* gdk/win32/gdkcolor-win32.c
	* gdk/win32/gdkgc-win32.c
	* gdk/win32/gdkgeometry-win32.c
	* gdk/win32/gdkprivate-win32.h
	* gdk/win32/gdkwindow-win32.c
	* gdk/x11/gdkcolor-x11.c
	* gdk/x11/gdkgc-x11.c
	* gdk/x11/gdkgeometry-x11.c
	* gdk/x11/gdkmain-x11.c
	* gdk/x11/gdkprivate-x11.h
	* gdk/x11/gdkwindow-x11.c: changed accordingly.

	* gdk/gdkpolyreg-generic.c: uncruftify to have proper function
	headers.


svn path=/trunk/; revision=19365
2008-01-14 14:02:12 +00:00
Michael Natterer
a84ac8e3d8 gdk/gdkinternals.h #include <gio/gio.h> instead of individual files.
2007-12-14  Michael Natterer  <mitch@imendio.com>

	* gdk/gdkinternals.h
	* gdk/gdkapplaunchcontext.h: #include <gio/gio.h> instead of
	individual files.

	* gdk/gdkapplaunchcontext.c
	* gdk/x11/gdkapplaunchcontext-x11.c: remove all gio includes, the
	header already includes everything now.


svn path=/trunk/; revision=19180
2007-12-14 11:20:10 +00:00
Mathias Hasselmann
d22e4ed9ce Make the code compile again after the GdkAppLaunchContext changes.
* configure.in: Add gio-2.0 to GDK_PACKAGES.
* gdk/gdkinternals.h: Include <gio/gappinfo.h>.

svn path=/trunk/; revision=19168
2007-12-13 10:05:07 +00:00
Matthias Clasen
1397a9fd7d Implement GAppLaunchContext in gdk, providing startup notification.
2007-12-12  Matthias Clasen  <mclasen@redhat.com>

        * gdk/gdkapplaunchcontext.[hc]: Implement GAppLaunchContext
        in gdk, providing startup notification.  (#503203)

        * gdk/x11/gdkapplaunchcontext-x11.c:
        * gdk/win32/gdkapplaunchcontext-win32.c:
        * gdk/quartz/gdkapplaunchcontext-quartz.c:
        * gdk/directfb/gdkapplaunchcontext-directfb.c: Backend-specific
        parts. All but X11 are just empty stubs for now.

        * gdk/gdk.symbols:
        * gdk/gdkinternals.h:
        * gdk/Makefile.am:
        * gdk/x11/Makefile.am:
        * gdk/win32/Makefile.am:
        * gdk/quartz/Makefile.am:
        * gdk/directfb/Makefile.am: Necessary glue.



svn path=/trunk/; revision=19165
2007-12-13 05:16:33 +00:00
Mathias Hasselmann
708dba5dc6 Restore G_BEGIN_DECLS at the top of this file to make C++ compilers happy.
2007-06-19  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* gdk/gdkinternals.h: Restore G_BEGIN_DECLS at the
	top of this file to make C++ compilers happy.

svn path=/trunk/; revision=18196
2007-06-19 18:37:14 +00:00
Matthias Clasen
885ba04648 Add support for composited child windows. (#412882, Ryan Lortie)
2007-06-01  Matthias Clasen  <mclasen@redhat.com>

        Add support for composited child windows.  (#412882, Ryan Lortie)

        * gdk/gdk.symbols:
        * gdk/gdkdisplay.h:
        * gdk/gdkinternals.h:
        * gdk/gdkwindow.[hc]: Add gdk_display_supports_composite() and
        gdk_window_set_composited().

        * gdk/x11/gdkevents-x11.c:
        * gdk/x11/gdkdisplay-x11.[hc]:
        * gdk/x11/gdkwindow-x11.[hc]: X11 implementation.

        * gdk/win32/gdkdisplay-win32.c:
        * gdk/win32/gdkwindow-win32.c: Dummy win32 implementration.

        * gdk/quartz/gdkdisplay-quartz.c:
        * gdk/quartz/gdkwindow-quartz.c: Dummy Quartz implementation.

        * gdk/directfb/gdkdisplay-directfb.c:
        * gdk/directfb/gdkwindow-directfb.c: Dummy DirectFB implementation.

        * tests/testgtk.c: Add a "composited window" test.


svn path=/trunk/; revision=18004
2007-06-01 12:16:12 +00:00
Behdad Esfahbod
fb3eeb8686 Rollback the following changes, to fix it the proper way in Pango:
2006-05-22  Behdad Esfahbod  <behdad@gnome.org>

        Rollback the following changes, to fix it the proper way in Pango:

        * gdk/gdkinternals.h:
        * gdk/gdkscreen.c (gdk_screen_class_init), (gdk_screen_finalize),
        (update_fontmap_resolution), (gdk_screen_set_resolution):  Add new
        function _gdk_screen_get_font_map() and have one fontmap per screen,
        with the correct resolution set on it.

        * gdk/gdkpango.c (gdk_pango_context_get_for_screen): Use
        _gdk_screen_get_font_map() instead of setting resolution on the
        PangoCairoContext.  (#342529)
2006-05-22 17:08:13 +00:00
Behdad Esfahbod
f3b986724c Add new function _gdk_screen_get_font_map() and have one fontmap per
2006-05-21  Behdad Esfahbod  <behdad@gnome.org>

        * gdk/gdkinternals.h:
        * gdk/gdkscreen.c (gdk_screen_class_init), (gdk_screen_finalize),
        (update_fontmap_resolution), (gdk_screen_set_resolution):  Add new
        function _gdk_screen_get_font_map() and have one fontmap per screen,
        with the correct resolution set on it.

        * gdk/gdkpango.c (gdk_pango_context_get_for_screen): Use
        _gdk_screen_get_font_map() instead of setting resolution on the
        PangoCairoContext.  (#342529)
2006-05-22 04:04:51 +00:00
Anders Carlsson
47257b075b Add new GdkPaintable interface which implementation objects can implement
2006-04-11  Anders Carlsson  <andersca@imendio.com>

        * gdk/gdkinternals.h:
        * gdk/gdkwindow.c:
        (_gdk_paintable_get_type):
        (gdk_window_begin_paint_region):
        (gdk_window_end_paint):
        (gdk_window_process_updates):
        (gdk_window_invalidate_maybe_recurse):
        Add new GdkPaintable interface which implementation objects can
        implement in order to override gdk painting functions.
2006-04-10 19:43:08 +00:00
Matthias Clasen
aff3329de1 Make _gdk_windowing_args const.
2006-04-03  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkinternals.h:
	* gdk/x11/gdkmain-x11.c:
	* gdk/win32/gdkmain-win32.c:
	* gdk/directfb/gdkdisplay-directfb.c:
	* gdk/quartz/gdkmain-quartz.c: Make _gdk_windowing_args const.
2006-04-03 20:36:52 +00:00
Matthias Clasen
0f0845a6b6 Forgotten file 2006-02-20 17:20:09 +00:00