]>
Pileus Git - ~andy/gtk/log
Benjamin Otte [Tue, 7 Sep 2010 14:48:29 +0000 (16:48 +0200)]
viewport: Pass sizes explicitly to paint functions
Benjamin Otte [Tue, 7 Sep 2010 14:41:57 +0000 (16:41 +0200)]
viewport: Merge gtk_viewport_paint() into expose function
Benjamin Otte [Tue, 7 Sep 2010 14:37:27 +0000 (16:37 +0200)]
viewport: Don't paint stuff in realize handler
Benjamin Otte [Tue, 7 Sep 2010 00:39:44 +0000 (02:39 +0200)]
notebook: Port to draw vfunc
Benjamin Otte [Tue, 7 Sep 2010 00:28:26 +0000 (02:28 +0200)]
notebook: The drawable check is not necessary
Large patch, but that's only indentation.
Benjamin Otte [Mon, 6 Sep 2010 23:33:25 +0000 (01:33 +0200)]
notebook: Draw tabs and arrows with Cairo
Includes a fix to only draw the current page once during a drag
operation.
Benjamin Otte [Mon, 6 Sep 2010 23:09:41 +0000 (01:09 +0200)]
notebook: Simplify draw_tab function a bit
Don't keep lots of local variables that are only used once.
Benjamin Otte [Mon, 6 Sep 2010 21:20:03 +0000 (23:20 +0200)]
notebook: remove check for is_drawable
When we reach that code, the widget will always be drawable
Benjamin Otte [Mon, 6 Sep 2010 21:18:14 +0000 (23:18 +0200)]
notebook: Reorder expose function in preparation of draw vfunc
Benjamin Otte [Mon, 6 Sep 2010 21:15:56 +0000 (23:15 +0200)]
notebook: Use a for loop when iterating over a list
Benjamin Otte [Mon, 6 Sep 2010 21:12:32 +0000 (23:12 +0200)]
notebook: Draw focus when drawing tab
Instead of using a special function, draw the focus of a tab when the
tab actually is painted. Simplifies the code quite a bit.
Benjamin Otte [Mon, 6 Sep 2010 21:07:52 +0000 (23:07 +0200)]
notebook: Remove useless optimization
It will become especially useless once we draw with Cairo exclusively.
Benjamin Otte [Mon, 6 Sep 2010 18:00:13 +0000 (20:00 +0200)]
paned: Port to draw vfunc
Benjamin Otte [Mon, 6 Sep 2010 17:44:32 +0000 (19:44 +0200)]
infobar: Port to draw vfunc
Benjamin Otte [Mon, 6 Sep 2010 17:40:47 +0000 (19:40 +0200)]
statusbar: Port to draw vfunc
Benjamin Otte [Mon, 6 Sep 2010 17:30:22 +0000 (19:30 +0200)]
layout: Port to draw vfunc
Benjamin Otte [Mon, 6 Sep 2010 16:54:04 +0000 (18:54 +0200)]
iconview: Port to draw vfunc
Benjamin Otte [Mon, 6 Sep 2010 16:44:32 +0000 (18:44 +0200)]
iconview: Check if the cr is clipped instead of using region
Benjamin Otte [Mon, 6 Sep 2010 15:46:37 +0000 (17:46 +0200)]
iconview: Simplify rubberband drawing
Benjamin Otte [Mon, 6 Sep 2010 15:32:30 +0000 (17:32 +0200)]
menu: Port to draw vfunc
Benjamin Otte [Mon, 6 Sep 2010 15:23:40 +0000 (17:23 +0200)]
menubar: Port to draw vfunc
Benjamin Otte [Mon, 6 Sep 2010 14:38:08 +0000 (16:38 +0200)]
textview: Port to draw vfunc
Benjamin Otte [Mon, 6 Sep 2010 14:20:30 +0000 (16:20 +0200)]
separatortoolitem: Port to draw vfunc
Benjamin Otte [Mon, 6 Sep 2010 14:10:08 +0000 (16:10 +0200)]
toolbar: Port to draw vfunc
Benjamin Otte [Mon, 6 Sep 2010 14:07:44 +0000 (16:07 +0200)]
toolbar: Don't propagate events to placeholders
In particular don't when that's done using uninitialized memory
Benjamin Otte [Mon, 6 Sep 2010 11:56:26 +0000 (13:56 +0200)]
toolpalette: Port to draw vfunc
Benjamin Otte [Mon, 6 Sep 2010 11:51:17 +0000 (13:51 +0200)]
treeview: Port to draw vfunc
Benjamin Otte [Thu, 9 Sep 2010 19:38:15 +0000 (21:38 +0200)]
treeview: Update rubberbanding code to Cairo
Benjamin Otte [Mon, 6 Sep 2010 11:31:33 +0000 (13:31 +0200)]
treeview: Do not put different windows in else if branches anymore
Benjamin Otte [Mon, 6 Sep 2010 10:39:00 +0000 (12:39 +0200)]
treeview: Use Cairo for all bin window drawing
Benjamin Otte [Mon, 6 Sep 2010 11:27:50 +0000 (13:27 +0200)]
treeview: Invalidate on expander changes, don't just repaint
Repaints are supposed to be initiated by GDK, not by random repaints.
Benjamin Otte [Mon, 6 Sep 2010 10:19:58 +0000 (12:19 +0200)]
treeview: Draw empty tree view with Cairo
Benjamin Otte [Mon, 6 Sep 2010 09:34:07 +0000 (11:34 +0200)]
API: Add gtk_container_propagate_draw()
Equivalent to gtk_container_propagate_expose(), just for the draw event.
Also port GtkContainer to the draw vfunc
Benjamin Otte [Mon, 6 Sep 2010 09:33:21 +0000 (11:33 +0200)]
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.
Benjamin Otte [Sun, 5 Sep 2010 18:42:56 +0000 (20:42 +0200)]
accellabel: Port to draw vfunc
Benjamin Otte [Sun, 5 Sep 2010 18:04:10 +0000 (20:04 +0200)]
label: Port to draw vfunc
Benjamin Otte [Sat, 4 Sep 2010 21:16:16 +0000 (23:16 +0200)]
scale: Port to draw vfunc
Benjamin Otte [Sat, 4 Sep 2010 19:44:54 +0000 (21:44 +0200)]
range: Port to draw vfunc
Benjamin Otte [Sat, 4 Sep 2010 19:34:01 +0000 (21:34 +0200)]
range: Make drawing use a single cairo context
Benjamin Otte [Sat, 4 Sep 2010 17:53:18 +0000 (19:53 +0200)]
tests: Remove ability to set backend from testfilechooser
There's no backends anymore
Benjamin Otte [Sat, 4 Sep 2010 17:28:22 +0000 (19:28 +0200)]
arrow: Port to draw vfunc
Benjamin Otte [Sat, 4 Sep 2010 17:16:26 +0000 (19:16 +0200)]
calendar: Port to draw vfunc
Benjamin Otte [Sat, 4 Sep 2010 17:09:13 +0000 (19:09 +0200)]
calendar: Fix drawing order for windows
Benjamin Otte [Sat, 4 Sep 2010 17:07:39 +0000 (19:07 +0200)]
calendar: Create one cairo_t per expose event and pass it around
Benjamin Otte [Fri, 3 Sep 2010 16:41:52 +0000 (18:41 +0200)]
cellview: Port to draw vfunc
Benjamin Otte [Fri, 3 Sep 2010 16:30:30 +0000 (18:30 +0200)]
spinner: Port to draw vfunc
Benjamin Otte [Fri, 3 Sep 2010 16:22:59 +0000 (18:22 +0200)]
image: Port to draw vfunc
Benjamin Otte [Fri, 3 Sep 2010 16:18:28 +0000 (18:18 +0200)]
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
;)
Benjamin Otte [Thu, 9 Sep 2010 19:22:43 +0000 (21:22 +0200)]
spinbutton: Port to draw vfunc
Benjamin Otte [Fri, 3 Sep 2010 16:03:18 +0000 (18:03 +0200)]
entry: Remove gtk_entry_is_drawable() checks when painting
Benjamin Otte [Fri, 3 Sep 2010 15:53:08 +0000 (17:53 +0200)]
entry: Port to draw signal
Benjamin Otte [Fri, 3 Sep 2010 15:25:26 +0000 (17:25 +0200)]
entry: Split else ifs into separate if statements
Preparation for the draw vfunc
Benjamin Otte [Thu, 2 Sep 2010 22:17:35 +0000 (00:17 +0200)]
entry: Add bug reference to workaround
Benjamin Otte [Thu, 2 Sep 2010 21:26:13 +0000 (23:26 +0200)]
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.
Benjamin Otte [Tue, 14 Sep 2010 10:24:27 +0000 (12:24 +0200)]
ruler: Port to draw signal
Benjamin Otte [Thu, 2 Sep 2010 16:02:48 +0000 (18:02 +0200)]
API: ruler: Change draw_pos vfunc to take a cr, width and height
Also refactor code to use it
Benjamin Otte [Thu, 2 Sep 2010 15:50:41 +0000 (17:50 +0200)]
API: ruler: Remove private ruler draw functions from header
Benjamin Otte [Thu, 2 Sep 2010 12:57:16 +0000 (14:57 +0200)]
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
Benjamin Otte [Thu, 2 Sep 2010 12:47:02 +0000 (14:47 +0200)]
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.
Benjamin Otte [Wed, 1 Sep 2010 21:08:01 +0000 (23:08 +0200)]
ruler: Don't create two cairo_t's
Benjamin Otte [Thu, 9 Sep 2010 19:03:24 +0000 (21:03 +0200)]
separator: Convert to draw signal
Benjamin Otte [Wed, 1 Sep 2010 19:30:39 +0000 (21:30 +0200)]
hsv: Convert to draw signal
Benjamin Otte [Wed, 1 Sep 2010 19:22:11 +0000 (21:22 +0200)]
progressbar: Port to new draw signal
Benjamin Otte [Wed, 1 Sep 2010 18:13:44 +0000 (20:13 +0200)]
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.
Benjamin Otte [Tue, 14 Sep 2010 09:39:51 +0000 (11:39 +0200)]
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).
Benjamin Otte [Wed, 8 Sep 2010 23:45:54 +0000 (01:45 +0200)]
API: add gdk_cairo_get_clip_rectangle() convenience API
Benjamin Otte [Wed, 1 Sep 2010 17:57:01 +0000 (19:57 +0200)]
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.
Kristian Rietveld [Wed, 15 Sep 2010 12:20:31 +0000 (14:20 +0200)]
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.
Kristian Rietveld [Wed, 15 Sep 2010 09:36:13 +0000 (11:36 +0200)]
quartz: Get size from wrapper, not drawable
Matthias Clasen [Thu, 9 Sep 2010 03:29:23 +0000 (23:29 -0400)]
Make the docs build
Benjamin Otte [Sun, 29 Aug 2010 11:06:35 +0000 (13:06 +0200)]
API: Remove GdkColormap
Benjamin Otte [Sun, 29 Aug 2010 10:53:02 +0000 (12:53 +0200)]
gdk: Remove nonexisting function from internal header
Benjamin Otte [Sun, 29 Aug 2010 10:51:07 +0000 (12:51 +0200)]
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()
Benjamin Otte [Sun, 29 Aug 2010 10:37:58 +0000 (12:37 +0200)]
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.
Benjamin Otte [Sun, 29 Aug 2010 15:48:58 +0000 (17:48 +0200)]
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.
Benjamin Otte [Sun, 29 Aug 2010 14:40:48 +0000 (16:40 +0200)]
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.
Benjamin Otte [Sun, 29 Aug 2010 09:52:29 +0000 (11:52 +0200)]
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.
Benjamin Otte [Sun, 29 Aug 2010 00:30:33 +0000 (02:30 +0200)]
API: Remove colormap member from GdkWindowAttr
Also remove all code that cares about differing colormaps for child
windows.
Benjamin Otte [Sun, 29 Aug 2010 00:16:27 +0000 (02:16 +0200)]
quartz: Compare visuals for RGBA, not colormaps
Benjamin Otte [Sun, 29 Aug 2010 00:10:19 +0000 (02:10 +0200)]
API: Remove gdk_drawable_get_display()
Benjamin Otte [Sun, 29 Aug 2010 00:08:47 +0000 (02:08 +0200)]
gdk: gdk_drawable_get_display() => gdk_window_get_display()
Benjamin Otte [Sun, 29 Aug 2010 00:08:24 +0000 (02:08 +0200)]
gtk: gdk_drawable_get_display() => gdk_window_get_display()
Benjamin Otte [Sun, 29 Aug 2010 00:03:19 +0000 (02:03 +0200)]
API: Add gdk_window_get_display()
Benjamin Otte [Sat, 28 Aug 2010 23:53:58 +0000 (01:53 +0200)]
x11: Use gdk_window_get_screen() in the testutils
Benjamin Otte [Sat, 28 Aug 2010 23:49:30 +0000 (01:49 +0200)]
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())
Benjamin Otte [Sat, 28 Aug 2010 23:51:54 +0000 (01:51 +0200)]
quartz: Remove unused _gdk_quartz_colormap_get_cgcolor_from_pixel()
Benjamin Otte [Sat, 28 Aug 2010 23:32:52 +0000 (01:32 +0200)]
gdk: gdk_drawable_get_screen/visual => gdk_window_get_screen/visual
Benjamin Otte [Sat, 28 Aug 2010 23:18:43 +0000 (01:18 +0200)]
gtk: gdk_drawable_get_screen/visual => gdk_window_get_screen/visual
Benjamin Otte [Sat, 28 Aug 2010 23:15:28 +0000 (01:15 +0200)]
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.
Benjamin Otte [Sat, 28 Aug 2010 23:05:59 +0000 (01:05 +0200)]
gdk: store the visual in the GdkWindowObject
Benjamin Otte [Sat, 28 Aug 2010 22:03:01 +0000 (00:03 +0200)]
API: Remove gdk_drawable_set_colormap()
Benjamin Otte [Sat, 28 Aug 2010 21:51:58 +0000 (23:51 +0200)]
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.
Benjamin Otte [Sat, 28 Aug 2010 21:30:39 +0000 (23:30 +0200)]
dnd: Remove unused colormap code
Benjamin Otte [Sat, 28 Aug 2010 21:22:34 +0000 (23:22 +0200)]
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.
Benjamin Otte [Sat, 28 Aug 2010 21:19:28 +0000 (23:19 +0200)]
API: Remove colormap setting and getting from GtkWidget
gtk_widget_get_colormap() and gtk_widget_set_colormap() are gone. They
are replaced by visuals.
Benjamin Otte [Sat, 28 Aug 2010 21:19:18 +0000 (23:19 +0200)]
style: Move from colormaps to visuals
Benjamin Otte [Sat, 28 Aug 2010 21:13:19 +0000 (23:13 +0200)]
testgtk: Check visual, not colormap for RGBA availability
Benjamin Otte [Sat, 28 Aug 2010 21:05:48 +0000 (23:05 +0200)]
gtk-demo: Remove colormaps from window attributes
Benjamin Otte [Sat, 28 Aug 2010 20:26:48 +0000 (22:26 +0200)]
gdk: Create paint surfaces of the same content as the window
Previously, we failed to create RGBA double buffers for RGBA windows.
Benjamin Otte [Sat, 28 Aug 2010 18:24:28 +0000 (20:24 +0200)]
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.