Benjamin Otte
36f0a96161
demos: No need to set the background, it gets overridden anyway
2010-09-26 15:11:30 +02:00
Benjamin Otte
de2a4d1b1a
perf: Use a temp window instead of a normal one
...
This way, we don't need hacks to not set the background.
2010-09-26 15:11:30 +02:00
Benjamin Otte
4a9c32dc36
API: Remove APIs to generate pixmaps from pixbufs
...
The 3 functions in question were:
- gdk_pixbuf_render_threshold_alpha()
- gdk_pixbuf_render_pixmap_and_mask()
- gdk_pixbuf_render_pixmap_and_mask_for_colormap()
All of them can be replaced using Cairo if they have to. The
functionality is only needed to talk to old X interfaces and normal apps
do fine without them.
2010-09-26 15:11:29 +02:00
Benjamin Otte
6453710266
x11: Set the icon using Cairo
...
No more GdkPixmap to store the icon and its mask, but instead use cairo
surfaces. Also render the icon into the surfaces using Cairo instead of
gdk_pixbuf_render_threshold_alpha().
2010-09-26 15:11:29 +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
d04bb38b28
gdk: offscreen window source drawable now is the root window
...
As the source drawable is only used for creating pixmaps these days, we
don't have to keep a real drawable around, but can just use the root
window.
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
804fd4b15a
dnd: Replace last pixmap usage with cairo surfaces.
2010-09-26 15:11:11 +02:00
Benjamin Otte
b370cb0d4c
API: image: Remove ability to set image from a pixmap
2010-09-26 15:11:11 +02:00
Benjamin Otte
3ba78fed2a
API: Remove the ability to set the dnd icon from a pixmap
2010-09-26 15:11:11 +02:00
Benjamin Otte
19bad9fecc
tests: Convert testinput to use cairo_surface_t
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
039e0c273a
testoffscreen: Remove unused code
2010-09-26 15:11:11 +02:00
Benjamin Otte
ca8a835874
API: Remove gtk_widget_get_snapshot()
...
It will be replaced with gtk_widget_draw().
2010-09-26 15:11:11 +02:00
Benjamin Otte
99c82af20a
testgtk: Remove snapshot test
...
gtk_widget_get_snapshot is on its way out.
The test can be added back once we have gtk_widget_draw(), but until
then, there's no way to take snapshots.
2010-09-26 15:04:02 +02:00
Benjamin Otte
8ac0e98f98
ruler: Make the backing store use a surface
2010-09-26 15:04:02 +02:00
Benjamin Otte
b186680a43
API: make gtk_icon_view_create_drag_icon() return a cairo_surface_t
...
GdkPixmap is going to die!
2010-09-26 15:04:02 +02:00
Benjamin Otte
db47dd6197
API: make gtk_tree_view_create_row_drag_icon() return a cairo_surface_t
...
GdkPixmap is going to die!
2010-09-26 15:04:02 +02:00
Benjamin Otte
f085bc67cd
treeview: Convert GtkTreeViewColumn rendering to Cairo
2010-09-26 15:03:01 +02:00
Benjamin Otte
b259dd9aba
iconview: Port to Cairo rendering
2010-09-26 15:03:01 +02:00
Benjamin Otte
e9dd3dc46a
cellview: Port to Cairo rendering
2010-09-26 15:03:01 +02:00
Benjamin Otte
42947e3cdc
API: Add gtk_cell_renderer_render_cairo()
...
It's like gtk_cell_renderer_render(), just cooler.
2010-09-26 15:03:01 +02:00
Benjamin Otte
e31e77eeb8
API: Change cellrenderer->render vfunc to take a cairo_t
...
Also constify the rectangle arguments. They were const anyway.
2010-09-26 15:03:01 +02:00
Benjamin Otte
4138e86ad4
testview: Convert _gtk_text_util_create_rich_drag_icon() to use surfaces
2010-09-26 15:03:01 +02:00
Benjamin Otte
331999d84d
textview: API: change gtk_text_layout_draw() to take a cairo_t
...
This simplifies the API a lot and allows more magic to happen later.
2010-09-26 15:03:01 +02:00
Benjamin Otte
ac48f2330d
API: Add gtk_cairo_draw_insertion_cursor()
...
For now just add it instead of replacing the current function. In the
end, this one should probably be renamed to
gtk_draw_insertion_cursor() and the current
gtk_draw_insertion_cursor() should die.
2010-09-26 15:03:00 +02:00
Benjamin Otte
3d340d7449
text: Make _gtk_text_util_create_drag_icon() return a surface
...
And change its callers to handle it that way.
2010-09-26 15:03:00 +02:00
Benjamin Otte
3dfb47bc3c
API: Add gtk_drag_set_icon_surface()
...
The function is supposed to replace gtk_drag_set_icon_pixmap().
2010-09-26 15:03:00 +02:00
Benjamin Otte
0d9d599b50
menu: set tearoff background using new background API
2010-09-26 15:03:00 +02:00
Benjamin Otte
134683c9be
Use gdk_window_set_background_pattern() to set parent-relative bakground
2010-09-26 15:03:00 +02:00
Benjamin Otte
20d1030823
iconview: No need to set background
2010-09-26 15:03:00 +02:00
Benjamin Otte
84c77c0be3
style: Rewrite background handling to use cairo_pattern_t
2010-09-26 15:03:00 +02:00
Benjamin Otte
603a840de9
trayicon: Use new gdk_window_set_background_pattern() API
2010-09-26 15:03:00 +02:00
Benjamin Otte
5e4aaba482
gtk: Remove calls that try to set GDK_NO_BG on their windows
...
These calls aren't necessary anymore.
2010-09-26 15:03:00 +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
4b57560666
gdk: Don't use clear_area_e() in offscreenwindow
...
Instead, call gdk_window_invalidate_rect() ourselves.
2010-09-26 15:02:59 +02:00
Benjamin Otte
bfa6ad6e7c
gdk: Remove _gdk_windowing_get_shape_for_mask()
...
It's unused. And there's a replacement available with
gdk_cairo_region_create_from_surface()
2010-09-26 15:02:59 +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
Benjamin Otte
806a7239ae
widget: shape_combine_mask => shape_cobine_region
...
Replace gtk_widget_shape_combine_region() with
gtk_widget_shape_combine_mask() and
gtk_widget_input_shape_combine_region() with
gtk_widget_input_shape_combine_mask().
As GdkBitmap is going away, and the region equivalents already exist,
this seems like pretty much the default step to take.
Includes code to fix up the users.
2010-09-26 15:02:59 +02:00
Benjamin Otte
8b4d50dd1d
treeview: Port to gdk_window_shape_combine_region()
...
gdk_window_shape_combine_mask() is going away. It's using a GdkPixmap
and falls back to gdk_window_shape_combine_region() anyway.
2010-09-26 15:02:59 +02:00
Benjamin Otte
96b387599d
API: Add gdk_cairo_region_create_from_surface()
...
The function converts the given surface into an alpha bitmap mask. This
is mostly useful for setting shape regions.
Also adds a new internal function _gdk_cairo_surface_extents() that
computes a surface's extents.
2010-09-26 15:02:59 +02:00