Commit Graph

22743 Commits

Author SHA1 Message Date
Benjamin Otte
327a04807e treeview: Update rubberbanding code to Cairo 2010-09-26 15:11:36 +02:00
Benjamin Otte
bf3b4438bb treeview: Do not put different windows in else if branches anymore 2010-09-26 15:11:36 +02:00
Benjamin Otte
f679516ce1 treeview: Use Cairo for all bin window drawing 2010-09-26 15:11:36 +02:00
Benjamin Otte
62f5fdc856 treeview: Invalidate on expander changes, don't just repaint
Repaints are supposed to be initiated by GDK, not by random repaints.
2010-09-26 15:11:36 +02:00
Benjamin Otte
bc1cd6c5cb treeview: Draw empty tree view with Cairo 2010-09-26 15:11:36 +02:00
Benjamin Otte
0cbe62f943 API: Add gtk_container_propagate_draw()
Equivalent to gtk_container_propagate_expose(), just for the draw event.
Also port GtkContainer to the draw vfunc
2010-09-26 15:11:36 +02:00
Benjamin Otte
90379ed68a widget: Store the expose event in the cairo_t, not just the window
This way we can grab it for propagating expose events. Not sure if we
need to do this once we're all Cairo, but for now we do.
2010-09-26 15:11:36 +02:00
Benjamin Otte
fb4ba51d44 accellabel: Port to draw vfunc 2010-09-26 15:11:36 +02:00
Benjamin Otte
4aefc82496 label: Port to draw vfunc 2010-09-26 15:11:36 +02:00
Benjamin Otte
2e75cecd49 scale: Port to draw vfunc 2010-09-26 15:11:36 +02:00
Benjamin Otte
e605272436 range: Port to draw vfunc 2010-09-26 15:11:36 +02:00
Benjamin Otte
745f110814 range: Make drawing use a single cairo context 2010-09-26 15:11:36 +02:00
Benjamin Otte
c85f91e14c tests: Remove ability to set backend from testfilechooser
There's no backends anymore
2010-09-26 15:11:35 +02:00
Benjamin Otte
1d5796c95b arrow: Port to draw vfunc 2010-09-26 15:11:35 +02:00
Benjamin Otte
9233a08991 calendar: Port to draw vfunc 2010-09-26 15:11:35 +02:00
Benjamin Otte
725749cd14 calendar: Fix drawing order for windows 2010-09-26 15:11:35 +02:00
Benjamin Otte
02572cdf7e calendar: Create one cairo_t per expose event and pass it around 2010-09-26 15:11:35 +02:00
Benjamin Otte
ed996bcd68 cellview: Port to draw vfunc 2010-09-26 15:11:35 +02:00
Benjamin Otte
0a6b7e5759 spinner: Port to draw vfunc 2010-09-26 15:11:35 +02:00
Benjamin Otte
7121ec2880 image: Port to draw vfunc 2010-09-26 15:11:35 +02:00
Benjamin Otte
c76221426a image: Always render the whole image
Otherwise effects like blur etc will have funny seams on repaints.
Oh, and also, the draw vfunc doesn't have an equivalent to event->area
;)
2010-09-26 15:11:35 +02:00
Benjamin Otte
5228913f68 spinbutton: Port to draw vfunc 2010-09-26 15:11:35 +02:00
Benjamin Otte
d13a2ad66a entry: Remove gtk_entry_is_drawable() checks when painting 2010-09-26 15:11:35 +02:00
Benjamin Otte
c412c1c752 entry: Port to draw signal 2010-09-26 15:11:35 +02:00
Benjamin Otte
696989d499 entry: Split else ifs into separate if statements
Preparation for the draw vfunc
2010-09-26 15:11:35 +02:00
Benjamin Otte
ec4be3619f entry: Add bug reference to workaround 2010-09-26 15:11:35 +02:00
Benjamin Otte
867ab99b1a API: Add gtk_cairo_should_draw_window()
See the function documentation for its purpose and the next commit(s)
for examples on how to use it.
2010-09-26 15:11:35 +02:00
Benjamin Otte
04e58c192e ruler: Port to draw signal 2010-09-26 15:11:35 +02:00
Benjamin Otte
ee8788f766 API: ruler: Change draw_pos vfunc to take a cr, width and height
Also refactor code to use it
2010-09-26 15:11:35 +02:00
Benjamin Otte
f5a10b05b5 API: ruler: Remove private ruler draw functions from header 2010-09-26 15:11:34 +02:00
Benjamin Otte
892593eff4 ruler: Change the way the ruler handles exposes
1) Don't directly draw in motion-notify, instead call
   gtk_widget_queue_draw()
2) Don't draw ticks in expose events anymore, only when they were
   changed
2010-09-26 15:11:34 +02:00
Benjamin Otte
c68029b778 API: ruler: Change draw_ticks vfunc
We now pass in a cairo_t of the backbuffer and the width and height of
the widget/backbuffer, so the vfunc has a place to draw to.
2010-09-26 15:11:34 +02:00
Benjamin Otte
3bd8319a08 ruler: Don't create two cairo_t's 2010-09-26 15:11:34 +02:00
Benjamin Otte
84671438b0 separator: Convert to draw signal 2010-09-26 15:11:34 +02:00
Benjamin Otte
812d9b9948 hsv: Convert to draw signal 2010-09-26 15:11:34 +02:00
Benjamin Otte
5ea1d78857 progressbar: Port to new draw signal 2010-09-26 15:11:34 +02:00
Benjamin Otte
7108586b16 widget: Add draw signal
For now, the draw signal is emitted by default from the expose event, so
widgets can chose to either implement the expose event or the draw
function.
This is for the transitional period from expose event to draw signal.

Note that for now subclasses can only implement the draw function when
none of their parents implemented the expose event.
2010-09-26 15:11:34 +02:00
Benjamin Otte
9507670db4 API: Add API to query width and height when rendering
The functions are gtk_widget_get_allocated_width() and
gtk_widget_get_allocated_height().

They are currently identical to using width/height of
gtk_widget_get_allocation(), but are introduced for ease of use (no need
to use a custom struct) and to free people from having to think about
allocation.x and allocation.y (which is where the origin of the cairo
context in GtkWidget::draw is located).
2010-09-26 15:11:34 +02:00
Benjamin Otte
d4f08efd57 API: add gdk_cairo_get_clip_rectangle() convenience API 2010-09-26 15:11:34 +02:00
Benjamin Otte
39b376681c build: Depend on cairo-gobject
We want to use cairo types for signals and properties, so we need to
depend on the library providing them.
2010-09-26 15:11:34 +02:00
Kristian Rietveld
03cf19e8e2 Create cairo context after running validate_visible_area()
validate_visible_area() can change the vertical adjustment and thus
trigger window moves/scrolls.  This seems to change the surface for
which gtk_tree_view_bin_expose() just created a cairo context.  Creating
the cairo context after the call to validate_visible_area() fixes
such crashes.
2010-09-26 15:11:34 +02:00
Kristian Rietveld
0129b89153 quartz: Get size from wrapper, not drawable 2010-09-26 15:11:34 +02:00
Matthias Clasen
0775b0a858 Make the docs build 2010-09-26 15:11:34 +02:00
Benjamin Otte
e624656c20 API: Remove GdkColormap 2010-09-26 15:11:34 +02:00
Benjamin Otte
94f809d439 gdk: Remove nonexisting function from internal header 2010-09-26 15:11:34 +02:00
Benjamin Otte
cf4cb4f6d9 API: Remove colormap handling from GdkScreen
In particular, the following functions are gone:
- gdk_screen_get_default_colormap()
- gdk_screen_set_default_colormap()
- gdk_screen_get_system_colormap()
- gdk_screen_get_rgba_colormap()
2010-09-26 15:11:34 +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
28b4567159 x11: Keep a default X Colormap in every visual to construct windows with
This way, we can specify a colormap when constructing windows. And ew
must do that to avoid BadMatch from XCreateWindow when we use a
different visual.
2010-09-26 15:11:33 +02:00
Benjamin Otte
47ee996198 x11: Use G_DEFINE_TYPE() to define GdkVisual
Also add a priv pointer to GdkVisual and use it for the GdkVisualPrivate
structure. Then Make GdkVisualPrivate actually private to
gdkvisual-x11.c and make other callers use proper function calls to
access it.
2010-09-26 15:11:33 +02:00
Benjamin Otte
571e749d60 x11: Set background color bypassing colormaps
Direct and TrueColor visuals don't alloc colors, so they don't need to
fiddle with colormaps. Just copy the code that computes the pixel value
from gdkcolor-x11.c and use it. For other visual types, don't set the
background color and fallback to background = None.
2010-09-26 15:11:33 +02:00