Commit Graph

22852 Commits

Author SHA1 Message Date
Benjamin Otte
70e6aba0d0 API: style: Remove old drawing functions 2010-09-26 15:11:42 +02:00
Benjamin Otte
326f887ae7 API: widget: Remove the expose event
gtk_widget_send_expose() now calls the draw function.
2010-09-26 15:11:42 +02:00
Benjamin Otte
9aa4f417d0 API: Remove gtk_container_propagate_expose()
Also, move the documentation to its replacement
gtk_widget_propagate_draw().
2010-09-26 15:11:42 +02:00
Benjamin Otte
7947b3faf8 container: Implement gtk_container_propagate_draw() without fallbacks
No more fallbacks to gtk_container_propagate_expose().
2010-09-26 15:11:42 +02:00
Benjamin Otte
45744d9a5f Change semantics of the draw signal
Previously, we tried to move the context's origin to the widget's top
left location, no matter what window the paint was happening on. Now we
only do that for child windows of the widget's window and leave the
context untouched for windows that the widget has created outside its
own hierarchy. In those casses, we also don't clip the context to
the widget's allocation.

Includes fixes to GtkHandlebox for this effect and fixes all known
issues with it.

These semantics assume that gtk_widget_draw() should only draw the parts
of a widget that are inside child windows and not draw stuff that is
located in completely different GdkWindows. In the handlebox case, it
means that it should only draw the handle when it is attached, but not
when it isn't. We'll likely need a special draw function for the
detached handlebox if we want to draw it.
2010-09-26 15:11:42 +02:00
Benjamin Otte
0acec382c8 widget: Clip drawing to the widget's allocation.
I've seen (and written) quite some widgets (and theme engines) that use
cairo_paint() to draw the background. So avoiding overdraw makes sense.

Also move all that setup into a _gtk_widget_draw_internal() function
that will be used by all functions that can be used by other functions
that draw widgets.
2010-09-26 15:11:42 +02:00
Benjamin Otte
0c285bad75 iconfactory: Initialize varibale to NULL in failure path
Otherwise we use random memory and that is not good.
2010-09-26 15:11:42 +02:00
Benjamin Otte
8929321cba image: Add a default case to switch statement to avoid gcc warnings 2010-09-26 15:11:42 +02:00
Benjamin Otte
45836db7a5 test: Port offscreen test to draw vfunc 2010-09-26 15:11:42 +02:00
Benjamin Otte
8aa402b610 gtk-demo: Port offscreen example to draw vfunc 2010-09-26 15:11:42 +02:00
Benjamin Otte
256012bdbd gtk-demo: Port offscreen example to draw vfunc 2010-09-26 15:11:42 +02:00
Benjamin Otte
e194bc14fd testgtk: Use draw signal in layout test 2010-09-26 15:11:42 +02:00
Benjamin Otte
5442f5b9f2 testgtk: Use draw signal in scrolling test 2010-09-26 15:11:42 +02:00
Benjamin Otte
0ab6956579 testgtk: Use draw signal in cursors example 2010-09-26 15:11:41 +02:00
Benjamin Otte
87940287aa testgtk: Remove non-existing property from frame constructor 2010-09-26 15:11:41 +02:00
Benjamin Otte
38c932ace6 testgtk: Use draw signal in gridded geometry example 2010-09-26 15:11:41 +02:00
Benjamin Otte
c42f6ff4bf testgtk: Make big windows test not use expose events
Instead, use gdk_window_set_background().
2010-09-26 15:11:41 +02:00
Benjamin Otte
e1571a5936 testgtk: Use draw signal in resize grips example 2010-09-26 15:11:41 +02:00
Benjamin Otte
5625c20759 x11: When querying window size, ask the wrapper, not ourselves 2010-09-26 15:11:41 +02:00
Benjamin Otte
7c62a44324 gdk: Make GdkWindow cope better with its surface outliving the window
Make extra sure we release the surface properly. Also make sure that the
released surface doesn't keep any references to us.
2010-09-26 15:11:41 +02:00
Benjamin Otte
ba21d3e687 tests: Use draw vfunc in print-editor 2010-09-26 15:11:41 +02:00
Benjamin Otte
e65b1cfd76 testoffscreen: Connect to draw signal 2010-09-26 15:11:41 +02:00
Benjamin Otte
9cd83da6dc tests: Use draw signal in testinput 2010-09-26 15:11:41 +02:00
Benjamin Otte
97b997d59e testpixbuf-save: Use the draw signal 2010-09-26 15:11:41 +02:00
Benjamin Otte
b271c76c06 testpixbuf-scale: Connect to draw signal 2010-09-26 15:11:41 +02:00
Benjamin Otte
ebba458336 pixbuf-demo: Use draw signal 2010-09-26 15:11:41 +02:00
Benjamin Otte
f1171c9c07 gtk-demo: Use draw signal in color selection demo 2010-09-26 15:11:41 +02:00
Benjamin Otte
c6f28c3dbc testtooltips: Connect to draw signal 2010-09-26 15:11:41 +02:00
Benjamin Otte
07d0c0b921 testtooltips: Don't call gdk_window_get_pointer() in expose events 2010-09-26 15:11:41 +02:00
Benjamin Otte
b8ebcdd0e0 testgtk: Connect to draw signal in "rotated text" example 2010-09-26 15:11:41 +02:00
Benjamin Otte
7af767333e testgtk: Connect to draw signals in "composited window" example 2010-09-26 15:11:41 +02:00
Benjamin Otte
ec604d11ec testgtk: Connect to draw signal in alpha test
Test still behaves weird, no idea why though.
2010-09-26 15:11:41 +02:00
Benjamin Otte
dfd0ceab1c tests: Connect to draw signal in testimage 2010-09-26 15:11:40 +02:00
Benjamin Otte
f8b420783d tests: Connect to draw signal in testoffscreenwindow 2010-09-26 15:11:40 +02:00
Benjamin Otte
0ad2f57332 tests: Connect to draw signal in testellipsise
The test seems broken, not sure why.
2010-09-26 15:11:40 +02:00
Benjamin Otte
9c980372d2 testcairo: Connect to draw signal 2010-09-26 15:11:40 +02:00
Benjamin Otte
eed9468e06 perf: Connect to draw signal 2010-09-26 15:11:40 +02:00
Benjamin Otte
b452bb768d imcontextxim: Connect to draw signal 2010-09-26 15:11:40 +02:00
Benjamin Otte
73b6ddbf47 gtk-demo: Connect to draw signal in rotated-text 2010-09-26 15:11:40 +02:00
Benjamin Otte
9ef1dfc0a3 gtk-demo: Connect to draw signal in pixbufs example 2010-09-26 15:11:40 +02:00
Benjamin Otte
ef56ba83f8 gtk-demo: Connet to draw signal in drawingarea example 2010-09-26 15:11:40 +02:00
Benjamin Otte
3f10e45ea1 printunixdialog: Connect to draw vfunc 2010-09-26 15:11:40 +02:00
Benjamin Otte
d207fd05e5 printunixdialog: Connect to draw signal for collate callback 2010-09-26 15:11:40 +02:00
Benjamin Otte
b0f078ba43 dnd-quartz: Connect to draw func for dnd hilight 2010-09-26 15:11:40 +02:00
Benjamin Otte
729f80b554 dnd: Connect to raw func for drag hilight 2010-09-26 15:11:40 +02:00
Benjamin Otte
830cda9e32 colorsel: Connect to draw signal 2010-09-26 15:11:40 +02:00
Benjamin Otte
b717f1b265 filechooserentry: Connect to draw event 2010-09-26 15:11:40 +02:00
Benjamin Otte
8f2fdec7d6 colorbutton: Connect to draw event 2010-09-26 15:11:40 +02:00
Benjamin Otte
5f771c8a9f notebook: Connect to draw signal 2010-09-26 15:11:40 +02:00
Benjamin Otte
c54968e964 tooltip: Connect to draw signal 2010-09-26 15:11:40 +02:00