Commit Graph

603 Commits

Author SHA1 Message Date
Michael Natterer
9d9742f1e5 Bug 631599 - Allow to use arbitrary surfaces for offscreen windows
Add signal GdkWindow::create-surface which allows to use any
surface type as storage for offscreen windows.

Test the new signal in tests/gdkoffscreenbox.c
2010-10-14 13:25:23 +02:00
Kristian Rietveld
eca2af5230 Make set_cairo_surface_size a vfunc on GdkWindowImpl
Note the special implementation of this method on GdkOffscreenWindow
that makes sure its current surface is not destroyed.
2010-10-05 15:38:23 +02:00
Matthias Clasen
32d1defc76 GDK docs: help gtk-doc understand gdk_window_invalidate_maybe_recurse 2010-10-01 09:10:52 -04:00
Benjamin Otte
1408bd9a37 gdk: Don't (un)set the background when destroying a window.
This previously caused the x11 code to do a XSetWindowBackgroundPixmap
call on a window that was about to be destroyed. And that's not really
useful.

https://bugzilla.gnome.org/show_bug.cgi?id=630864
2010-09-29 12:18:17 +02:00
Michael Natterer
06773b1e8b gdk: remove "screen" member from GdkOffscreenWindow, it has become obsolete
Also remove screen parameter from _gdk_offscreen_window_new() and get
rid of a bunch on includes in gdkoffscreenwindow.c
2010-09-28 16:05:38 +02:00
Matthias Clasen
2b3574dda1 Improve some docs 2010-09-27 20:59:08 -04:00
Benjamin Otte
f52a1fcfbd API: remove gdk_drawable_get_size() 2010-09-26 15:11:45 +02:00
Benjamin Otte
9826c31a9f gdk: Get rid of gdk_drawable_get_size() usage 2010-09-26 15:11:43 +02:00
Benjamin Otte
6c971ac479 API: Remove window clear APIs
The feature can and should be implemented manually using
gdk_window_get_background() and Cairo drawing. A non-cairo drawing API
does not make sense in GDK anymore.
2010-09-26 15:11:43 +02:00
Benjamin Otte
af32c9c9be API: Add size getters for GdkWindow
gdk_window_get_width() and gdk_window_get_height() will replace
gdk_drawable_get_size().
2010-09-26 15:11:43 +02:00
Benjamin Otte
7c62a44324 gdk: Make GdkWindow cope better with its surface outliving the window
Make extra sure we release the surface properly. Also make sure that the
released surface doesn't keep any references to us.
2010-09-26 15:11:41 +02:00
Benjamin Otte
04d5c477aa API: Remove gdk_drawable_get_colormap()
And with it, remove any notion of colormaps from GdkWindow. In
particular, X11 windows will now not set attrs.colormap when calling
XCreateWindow.
2010-09-26 15:11:33 +02:00
Benjamin Otte
f08254074c API: Remove colormap member from GdkWindowAttr
Also remove all code that cares about differing colormaps for child
windows.
2010-09-26 15:11:33 +02:00
Benjamin Otte
b5097de481 gdk: gdk_drawable_get_display() => gdk_window_get_display() 2010-09-26 15:11:33 +02:00
Benjamin Otte
7f486231ac API: Add gdk_window_get_display() 2010-09-26 15:11:33 +02:00
Benjamin Otte
a6ef356107 API: Remove drawable getters for visual, screen and depth
Removed and replaced are:
gdk_drawable_get_visual() => gdk_window_get_visual()
gdk_drawable_get_screen() => gdk_window_get_screen()
gdk_drawable_get_depth()  => gdk_visual_get_depth
                                          (gdk_window_get_visual())
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
Benjamin Otte
5b9bbf9de2 API: Add gdk_window_get_visual() and gdk_window_get_screen()
Now that we store the visual in the GdkWindow, these are rather trivial
accessors.
2010-09-26 15:11:32 +02:00
Benjamin Otte
eee6c002d1 gdk: store the visual in the GdkWindowObject 2010-09-26 15:11:32 +02:00
Benjamin Otte
894d402c0f API: Remove gdk_drawable_set_colormap() 2010-09-26 15:11:32 +02:00
Benjamin Otte
2fc80e6102 gdk: Create paint surfaces of the same content as the window
Previously, we failed to create RGBA double buffers for RGBA windows.
2010-09-26 15:11:32 +02:00
Benjamin Otte
6a2124d566 gdk: Remove _gdk_drawable_get_source_drawable()
Now that we don't create pixmaps anymore, this function is not needed
anymore. The indirection it did previously is now basically moved to
gdk_window_create_similar_surface()
2010-09-26 15:11:31 +02:00
Benjamin Otte
e6b74551d1 gdk: Get rid of all occurences of "pixmap" in the comments
Replace them with the correct term, usually "surface".
2010-09-26 15:11:30 +02:00
Benjamin Otte
90b4b88629 API: Remove gdk_window_set_back_pixmap()
The same effect can be achieved with
gdk_window_set_background_pattern().
2010-09-26 15:11:30 +02:00
Benjamin Otte
332652f702 API: Change offscreen windows to use a cairo_surface_t
This requires changes to all the offscreen surface getters that used to
return a GdkPixmap before.
2010-09-26 15:11:29 +02:00
Benjamin Otte
ebdf26e1d8 gdk: Use surfaces for double buffering
Don't use pixmaps anymore. Also use subsurfaces for implicit paints and
correcly set device offsets.
2010-09-26 15:11:11 +02:00
Benjamin Otte
666539736d gdk: Make csw windows have their own cairo surface
With Cairo 1.10 now having cairo_surface_create_for_rectangle(), we can
use them. No need to create multiple native surfaces for the same X
window (ugh) anymore.
2010-09-26 15:11:11 +02:00
Benjamin Otte
b69fdbbd04 API: Remove gdk_window_get_internal_paint_info()
This function should not exist in public API, it exposes too many
internals.
2010-09-26 15:11:11 +02:00
Benjamin Otte
6d27362620 gdk: Create surfaces directly, not from the source drawable
The notion of a source drawable does not make a lot of sense for windows
that are not backed by a drawable, such as GdkOffscreenWindow after
converting it to cairo_surface_t.
2010-09-26 15:11:11 +02:00
Benjamin Otte
2bedd205c5 gdk: Remove gdk_windowing_create_cairo_surface()
Instead, actually use the create_cairo_surface vfunc on the
implementation drawable. D'oh.
2010-09-26 15:11:11 +02:00
Benjamin Otte
d7335837e0 gdk: Remove gdk_window_redirect_to_drawable()
Also remove the reverse gdk_window_remove_redirection().

The code was only used by the snapshotting code, and that code is dead
now.
2010-09-26 15:11:11 +02:00
Benjamin Otte
2c1633699f gdk: Rewrite background handling
Now the window background is a cairo_pattern_t. The backends will try to
set this as good as they can on the windowing system, but no guarantees
are made on wether the windowing system supports the pattern.

Also gets rid of GDK_NO_BG as undefined behavior is not a good idea to
support, and GDK_NO_BG effectively made the window's contents undefined.
It wasn't effectively used in GTK anyway.
2010-09-26 15:03:00 +02:00
Benjamin Otte
c250b3fe1d gdk: Remove supports_native_bg on WindowImplIface
This will not be TRUE for anything anymore, once we fix background
handling.
2010-09-26 15:03:00 +02:00
Benjamin Otte
95686cb704 gdk: Remove send_expose event from gdk_window_clear_region_internal()
It's always FALSE.
2010-09-26 15:03:00 +02:00
Benjamin Otte
547e2cc837 gdk: Remove GdkWindowImpl->clear_region
It was only used on the X11 backend and is easier to implement locally,
in particular when we want to allow backgrounds that X can't handle.
2010-09-26 15:03:00 +02:00
Benjamin Otte
3d98537c2e gdk: Simplify clear_area code
No more use for a gdk_window_clear_area_internal() function as there's
just one caller.
2010-09-26 15:03:00 +02:00
Benjamin Otte
6ab793da8d API: Remove gdk_window_clear_area_e()
Awesome name for a function. Plus, it's unused and its functionality can
easily be replicated.
2010-09-26 15:03:00 +02:00
Benjamin Otte
a7fec8cf46 API: Remove shape_combine_mask functions from gdk
This removes gdk_window_shape_combine_mask() and
gdk_window_input_shape_combine_mask(). GdkBitmap is going away and a
replacement exists via the combine_region() functions and
gdk_cairo_region_create_from_surface().
2010-09-26 15:02:59 +02:00
Johan Dahlin
6ba904486c Add a couple of missing transfer annotations 2010-09-20 23:45:01 -03:00
Matthias Clasen
6aa8941b84 Add annotations
The goi scanner warns about these nowadays.
2010-09-17 00:18:20 -04:00
Matthias Clasen
08dd02fe25 Don't use g_idle_add to schedule idles in GDK
We need to use gdk_threads_add_idle, in order to keep GDK code
under the GDK lock.

Bug 629277
2010-09-10 22:32:44 -04:00
Javier Jardón
bd277fad50 Remove deprecated gdk_window_get_deskrelative_origin() and its implementations 2010-09-09 00:50:46 +02:00
Owen W. Taylor
d04e557370 Fix annotations for gdk_window_get_device_position()
Add (out) and (transfer none) as appropriate
2010-09-07 14:03:18 -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
Javier Jardón
1abb8f6e7f gdk/gdkwindow.c: Fix compilation warning 2010-08-24 21:27:57 +02:00
Carlos Garnacho
b2545e1732 GdkWindow: Check device cursor first in update_cursor(). 2010-08-17 15:45:17 +02:00
Benjamin Otte
434b3e1072 gdk: Use gdk_window_get_background_pixmap() when setting up paint 2010-08-16 19:48:46 +02:00
Benjamin Otte
2944561ba3 API: Add gdk_window_get_background_pattern()
This is the suggested way for GTK3 to store a Window's background so it
makes sense to use the same function today already.
2010-08-16 19:48:46 +02:00
Benjamin Otte
0b29f4e769 Remove window background getters again
They were added as accessors for 2.22 even though querying the
background wasn't possible previously. As GTK 3.0 will change background
handling, it doesn't make sense at all to expose these getters.
2010-08-15 03:34:02 +02:00
Benjamin Otte
ca7d3f9081 gdk: When using OPERATOR_SOURCE, use clip + paint instead of fill
SOURCE is unbounded, so we clear unwanted areas.
2010-08-14 01:46:04 +02:00