Commit Graph

592 Commits

Author SHA1 Message Date
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
Benjamin Otte
fc170551b6 gdk: Do final copy with OPERATOR_SOURCE in end_implicit_paint
For windows with alpha channel, the previous contents would otherwise
not be erased. Visible for example in the status icon code.

Thanks to Thomas Wood for noticing.
2010-08-13 20:48:36 +02:00
Benjamin Otte
c989d3000a API: Add gdk_window_create_similar_surface() 2010-08-12 23:43:11 +02:00
Kristian Rietveld
d819bc4814 Invalidate cairo surface if resizing is not supported for target
While X11 surfaces can be resized, this is not the case for Quartz
surfaces.  Instead of resizing we will invalidate the surface instead.
By giving _gdk_windowing_set_cairo_surface_size() a boolean return
value, we can signal back whether or not resizing was possible.  If not
possible, we invalidate the surface.
2010-08-10 21:02:31 +02:00
Benjamin Otte
c4f280651a gdk: Don't infinite loop when flushing moves
Spotted by Kristian Rietvield. Fixes testoffscreen test.
2010-08-10 21:02:30 +02:00
Matthias Clasen
075661d376 generic damage generation for offscreen windows
Generating damage from gdk drawing api doesn't help for cairo rendering
...and the gdk drawing api is gone anyway. Bug 621571
2010-08-10 21:02:30 +02:00
Benjamin Otte
1308731580 gdk: Don't require allocating window background colors anymore
X!! allocates the colors itself now.
2010-08-10 21:02:30 +02:00
Kristian Rietveld
c3a59fbfcc Fix compile warnings 2010-08-10 21:02:30 +02:00
Benjamin Otte
6a48a042c7 API: remove GdkGC
XXX: Some traces in the win32 code are left. I suppose they'd best be
replaced using Cairo.
2010-08-10 21:02:29 +02:00
Benjamin Otte
ef2d37cdaf API: remove begin/end_direct_draw functions
They're not needed without GdkGCs.

FIXME: This breaks the win32 XP theme. Someone gotta fix it.
2010-08-10 21:02:29 +02:00
Benjamin Otte
4c16995868 gdk: remove get_composite_drawable vfunc
The vfunc is not used anymore.
2010-08-10 21:02:29 +02:00
Benjamin Otte
61d4a019f8 API: remove gdk_draw_drawable() 2010-08-10 21:02:29 +02:00