Commit Graph

34 Commits

Author SHA1 Message Date
Timm Bäder
2cd1a984cf set clip of more widgets 2017-07-19 21:27:11 -04:00
Carlos Garnacho
8402174d6b gtkcolorplane: Remove event window
It is not necessary anymore to receive events.
2017-05-25 16:25:59 +02:00
Carlos Garnacho
a72404dd5a gtk: Mass delete all GtkWidget event mask API
We now rely on toplevels receiving and forwarding all the events
the windowing should be able to handle. Event masks are no longer a
way to determine whether an event is deliverable ot a widget.

Events will always be delivered in the three captured/target/bubbled
phases, widgets can now just attach GtkEventControllers and let those
handle the events.
2017-05-25 16:25:58 +02:00
Carlos Garnacho
f5e02f3a2a gtkcolorplane: Drop usage of gtk_gesture_set_window()
It's now meaningless since the widget will receive the event despite
the input window.
2017-05-25 16:25:58 +02:00
Benjamin Otte
6055028c96 snapshot: Rename append APIs
Instead of having gtk_snapshot_append_foo_node(), just have
gtk_snapshot_append_foo(). Nobody needs to know that this internally
uses nodes.
2017-01-13 04:46:09 +01:00
Benjamin Otte
4ead5c3ba8 colorplane: Implement snapshot() 2017-01-01 19:53:36 +01:00
Benjamin Otte
7e9796568d colorplane: Port to be a no-window widget 2016-11-03 03:00:15 +01:00
Benjamin Otte
5e07a31d2b gtk: Call gtk_widget_set_has_window() on every widget
Even if we just set it to the value it already had.
2016-11-02 06:54:57 +01:00
Matthias Clasen
e2e8231ca9 color chooser: Fix a problem with show-editor=TRUE
For some reason we end up allocating the colorplane widget
before it is realized, and then never initialize the surface.

Fix this by explicitly doing it on realize.

https://bugzilla.gnome.org/show_bug.cgi?id=773474
2016-10-26 14:33:07 -04:00
Matthias Clasen
5c2759af3c Use standard cursor names
This changes GTK+ to use gdk_cursor_new_from_name() with the
'standard' css names, instead of GdkCursorType.

https://bugzilla.gnome.org/show_bug.cgi?id=652085
2015-07-26 01:45:06 -04:00
Matthias Clasen
00543f1781 GtkColorChooser: Make color plane react to mouse again
Fallout from changing the defaults for gesture properties.
2014-08-22 11:21:52 -04:00
Carlos Garnacho
9e89640b0b colorplane: Update to new GtkGestureSingle/GtkEventController defaults
GtkGestureSingle::button is set to 0, as multiple buttons are managed by
the same gesture. Also avoid some extra lines of code setting what nowadays
are default values.

https://bugzilla.gnome.org/show_bug.cgi?id=734285
2014-08-15 13:49:39 +02:00
Jasper St. Pierre
2651b99a13 colorplane: Don't connect to the configure-event signal
We want to stop people from using configure events
entirely. GtkDrawingArea synthesizes a configure event, but we can just
make the only user of this functionality stop it, and correct the
documentation to not mention it.
2014-06-28 00:10:42 -04:00
Matthias Clasen
38e4fbc90c Revert "colorplane: Don't connect to the configure-event signal"
This reverts commit 886f58e1cf.

This made the color plane go missing.
2014-06-27 22:03:59 -04:00
Jasper St. Pierre
886f58e1cf colorplane: Don't connect to the configure-event signal
We want to stop people from using configure events
entirely. GtkDrawingArea synthesizes a configure event, but we can just
make the only user of this functionality stop it, and correct the
documentation to not mention it.
2014-06-26 15:58:44 -04:00
Carlos Garnacho
907e9f1946 gtk: Update GtkGesture users to the GtkPropagationPhase semantics change
Mainly doing s/TARGET/BUBBLE/ on the fully ported widgets, but GtkTreeView
where the double click handler has moved to GTK_PHASE_TARGET so it runs
parallelly to the still existing event handlers.
2014-05-27 17:47:12 +02:00
Carlos Garnacho
d05a9f9a7b gesture: Replace gtk_gesture_attach/detach with event controller API
Event controllers now auto-attach, and the GtkCapturePhase only determines
when are events dispatched, but all controllers are managed by the widget wrt
grabs.

All callers have been updated.
2014-05-27 17:47:12 +02:00
Carlos Garnacho
70ea24b9e8 colorplane: Fully port to GtkGesture
A GtkGestureDrag is used for color selection, removing also the
need to track the pointer state in widget data. The GDK grab performed
just to set the crosshair cursor has been replaced by a call
to gdk_window_set_device_cursor(), which will be unset if the
drag operation is finished, or cancelled due to the implicit grab
being broken.
2014-05-23 19:54:31 +02:00
Carlos Garnacho
5369c77029 gesture: Simplify gesture/widget interaction public API
The propagation phase property/methods in GtkEventController are gone,
This is now set directly on the GtkWidget add/remove controller API,
which has been made private.

The only public bit now are the new functions gtk_gesture_attach() and
gtk_gesture_detach() that will use the private API underneath.

All callers have been updated.
2014-05-23 19:54:29 +02:00
Matthias Clasen
3a752658ab GtkColorPlane: Actually add the long press gesture
This was missed because gtk_widget_remove_controller silently
does nothing on unowned controllers.
2014-05-23 19:54:28 +02:00
Carlos Garnacho
8c139c1fca colorplane: Replace GtkPressAndHold with GtkLongPressGesture 2014-05-23 19:54:26 +02:00
Emmanuele Bassi
0899ef7cc9 gtk: Use new macros for defining private data
https://bugzilla.gnome.org/show_bug.cgi?id=702996
2013-07-09 09:30:02 +01:00
Tristan Van Berkom
65080c6755 GtkColorPlane: Added construct-only properties to setup the adjustments.
This allows basic construction of this private type in GtkBuilder script,
so it can be used in the GtkColorEditor UI.
2013-04-08 21:19:29 +09:00
Matthias Clasen
7192f9668c colorplane: Select for touch events
We now use long touches to trigger the popup.
2012-03-04 11:24:51 -05:00
Matthias Clasen
912ad3b698 Break out press-and-hold code as its own object
https://bugzilla.gnome.org/show_bug.cgi?id=671057
2012-03-04 00:29:04 -05:00
Benjamin Otte
2353d60b8a types: Move GtkAdustment declaration to gtktypes.h
... and make all the headers to not include gtkadjustment.h anymore. Of
course, also include it in the source files instead.
2012-03-03 19:45:03 +01:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Matthias Clasen
bad24bc119 Consistently private headers
Add a 'private' suffix to all newly introduced private
headers.
2012-02-14 16:36:58 -05:00
Matthias Clasen
d7cff0797e Misc cleanups 2012-02-14 16:36:56 -05:00
Matthias Clasen
cb128cc6e9 Deprecate old color selection widgets
GtkColorSelectionDialog, GtkColorSelection and GtkHSV have
been superseded by the GtkColorChooser* family of widgets.
2012-02-14 16:36:55 -05:00
Matthias Clasen
cc127c64a9 Add some accessible labels 2012-02-14 16:36:54 -05:00
Matthias Clasen
f2aaffaf07 Finishing touches
Implement popups in the editor, fix window sizing, fix RTL flipping.
GtkColorPlane is now using adjustments, and GtkColorEditor is using
adjustments as its model as well.
2012-02-14 16:36:53 -05:00
Matthias Clasen
ff1f5de62f Don't waste memory 2012-02-14 16:36:51 -05:00
Matthias Clasen
e06ccb0fbb Move the plane into a separate widget 2012-02-14 16:36:49 -05:00