Benjamin Otte
9f47be2216
gtk: gdk_drawable_get_screen/visual => gdk_window_get_screen/visual
2010-09-26 15:11:33 +02:00
Benjamin Otte
e316157671
API: gdk_pixbuf_get_from_drawable() => gdk_pixbuf_get_from_window()
...
The Colormap argument needed to be removed, so the renaming is just a
side effect.
2010-09-26 15:11:32 +02:00
Benjamin Otte
a9f198082a
dnd: Remove unused colormap code
2010-09-26 15:11:32 +02:00
Benjamin Otte
3607a4c082
API: Remove setters and getters for default colormaps
...
This removes:
gtk_widget_set_default_colormap()
gtk_widget_get_default_colormap()
gtk_widget_get_default_visual()
Colormaps are gone, and the default visual is the system visual of the
default screen.
2010-09-26 15:11:32 +02:00
Benjamin Otte
c51e8bd9e5
API: Remove colormap setting and getting from GtkWidget
...
gtk_widget_get_colormap() and gtk_widget_set_colormap() are gone. They
are replaced by visuals.
2010-09-26 15:11:32 +02:00
Benjamin Otte
4701bdb2a8
style: Move from colormaps to visuals
2010-09-26 15:11:32 +02:00
Benjamin Otte
c64946c52d
trayicon: Use XClearArea
...
gdk_window_clear_area() isn't smart enough to clear to a parent pixmap
that is part of a window that GDK doesn't manage.
2010-09-26 15:11:32 +02:00
Benjamin Otte
4515f0803b
trayicon: Change to use gtk_window_set_visual()
...
One less user of colormaps, and the code is cleaner, too!
2010-09-26 15:11:32 +02:00
Benjamin Otte
59b227e123
window: Keep track of own visual
...
Add gtk_window_set_visual() and a "visual" property. This allows
changing the window visual to the rgba one and other awesome things
(like implementing the trayicon spec).
2010-09-26 15:11:32 +02:00
Benjamin Otte
913f3fcc9f
gtk: Change gtk_widget_get_visual()
...
We now return the visual of the topmost widget in widget's stack that
has a window. If no such widget exists, but a GtkWindow is a parent, we
return its visual (note: GtkWindow Will gain support for setting visuals
soon). If a window doesn't exist, we return the system visual of the
default screen.
This change has multiple reasons:
- Colormaps are gone
Now visuals are the most important resource for creating GDK windows.
- Allow widgets to change visuals for themselves and their children
By walking the hierarchy, we ensure that child windows have the same
visual as their parents by default. But widgets can still select a
different visual in their realize handler when creating the GDK
window.
- Have a replacement for gtk_widget_set_colormap()
That function is going to die with colormaps, so a replacement was
needed. That replacement is going to be gdk_window_set_visual().
- Make a future transition to no-window GTK easy
Should we ever attempt a change to make all GTK widgets no-window, a
gtk_widget_set_visual() would be silly, as only widgets with windows
can have their own visuals. So only toplevels will gain the ability to
change it.
2010-09-26 15:11:31 +02:00
Benjamin Otte
e8a6bad00b
gtk: Don't set colormap anymore when creating GDK windows
...
Colormaps are about to be removed, so not using them sounds like an
awesome idea.
2010-09-26 15:11:31 +02:00
Benjamin Otte
e06d04032b
spinner: We're a no-window widget, so setting a colormap does nothing
2010-09-26 15:11:31 +02:00
Benjamin Otte
ce7379a8bd
style: Remove depth member from GtkStyle
2010-09-26 15:11:31 +02:00
Benjamin Otte
b09019560b
style: Remove depth checks in render functions
...
There's no need for them anymore now that we render with Cairo.
2010-09-26 15:11:31 +02:00
Benjamin Otte
b479ff9cb5
API: Remove gtk_widget_push_colormap()
...
And of course, gtk_widget_pop_colormap() is gone, too.
No replacement is necessary, the function is basically unused.
2010-09-26 15:11:31 +02:00
Benjamin Otte
4dd215f82d
tests: Remove GdkPixmap from test
...
It's not used anymore. (Was it ever?)
2010-09-26 15:11:30 +02:00
Benjamin Otte
b7f2f9a678
gtk: Remove special code for detecting pixmaps as event targets
2010-09-26 15:11:30 +02:00
Benjamin Otte
6607f2b794
API: Rename gdk_set_source_pixmap() to gdk_set_source_window()
...
That's what it's used for now.
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
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
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
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
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
0178bff5c0
colorsel: Use gdk_cursor_new_from_pixbuf() to create the cursor
...
gdk_cursor_new_from_pixmap() is about to die.
2010-09-26 15:02:59 +02:00
Benjamin Otte
37a62e9367
window: Remove call to gdk_window_set_icon()
...
Also remove all the functions taking care of it. This is now handled by
the X11 backend directly. And the other backends ignored this function
anyway.
2010-09-26 15:02:59 +02:00
Benjamin Otte
be1d190b2e
style: Convert draw_spinner vfunc to Cairo version
2010-09-26 15:02:59 +02:00
Benjamin Otte
81f15cf908
style: Convert draw_resize_grip vfunc to Cairo version
...
Includes removal of now unused draw_simple_image_no_cairo() function
from pixbuf engine.
2010-09-26 15:02:59 +02:00
Benjamin Otte
d80e2897b9
style: Convert draw_layout vfunc to Cairo version
2010-09-26 15:02:58 +02:00
Benjamin Otte
ff6e75adbc
style: Convert draw_expander vfunc to Cairo version
2010-09-26 15:02:58 +02:00