Commit Graph

576 Commits

Author SHA1 Message Date
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
Benjamin Otte
65ac54bb23 gdk: Make window moves a custom vfunc
The window move code needs special attention for multiple reasons:
- invalid areas for expose events need to be modified
- self-copy is not supported by Cairo
- in X11, copying from an overlapped Window might cause unexposed areas
  to be copied in, spo expose events for those need to be generated.

This was all special cased in various parts of the code. By making it an
explicit vfunc, we can work around it.
2010-08-10 21:02:28 +02:00
Benjamin Otte
db5fc43759 gdk: Draw redirected windows using Cairo 2010-08-10 21:02:28 +02:00
Benjamin Otte
56e7abb8a4 gdk: Refactor redirection code
This will make future patches easier
2010-08-10 21:02:28 +02:00
Benjamin Otte
755bd51757 gdk: Simplify code
Use new Cairo APIs to make the code simpler.
2010-08-10 21:02:28 +02:00
Benjamin Otte
a6fcc75774 gdk: Remove excess variables 2010-08-10 21:02:28 +02:00
Benjamin Otte
3df6726656 gdk: Do end_implicit_paint copy with Cairo 2010-08-10 21:02:28 +02:00
Benjamin Otte
f1620b5ce1 gdk: Implement gdk_window_get_source_drawable() using Cairo
Do we have a test case for this?
2010-08-10 21:02:28 +02:00
Benjamin Otte
46206f8bb8 gdk: Implement end_implicit_paint() with Cairo 2010-08-10 21:02:28 +02:00
Benjamin Otte
600fbd3e74 API: remove gdk_draw_rectangle() 2010-08-10 21:02:28 +02:00
Benjamin Otte
9ee5176492 API: remove gdk_draw_point(s) 2010-08-10 21:02:27 +02:00
Benjamin Otte
a9e99e7f5b API: remove gdk_draw_{line,lines,segments}
Those were the 3 intermixed line drawing calls.
2010-08-10 21:02:27 +02:00
Benjamin Otte
e85dfc7cc4 API: remove gdk_draw_polygon() 2010-08-10 21:02:27 +02:00
Benjamin Otte
89d28eb09d API: remove gdk_draw_glyphs() and gdk_draw_glyphs_transformed() 2010-08-10 21:02:27 +02:00
Benjamin Otte
92f4882497 API: remove gdk_draw_trapezoids() and GdkTrapezoid struct 2010-08-10 21:02:27 +02:00
Benjamin Otte
559ae63f01 API: remove gdk_draw_arc() 2010-08-10 21:02:27 +02:00
Benjamin Otte
6f5084551a API: remove gdk_drawable_copy_to_image() 2010-08-10 21:02:26 +02:00