summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* spinbutton: Avoid touch text handles to pop upgesturesCarlos Garnacho2014-05-231-29/+16
| | | | | | | | | | | Those get in the middle more than help on these widgets, the widget is already packed with clickable areas and having handles (and their invisible clickable area around) hovering above don't help, plus the purpose in most likely numeric values is a bit doubtful. All touch events are either consumed by the up/down panels, or the swipe gesture, all GtkEntry handling of touch events on the text window is avoided, so handles to not appear anymore.
* colorswatch: Set gestures in GTK_PHASE_TARGETCarlos Garnacho2014-05-231-2/+2
| | | | That's the right phase for gestures replacing entirely event handlers.
* spinbutton: Use GTK_PHASE_CAPTURE for touch swipesCarlos Garnacho2014-05-231-2/+2
| | | | | The gesture must be able to catch first events for it to be seen as recognized in event handlers.
* widget: Flip execution order of GTK_PHASE_TARGET/BUBBLECarlos Garnacho2014-05-231-1/+2
| | | | | | | | | | | the "bubble" phase used to run before event handlers before GTK_PHASE_TARGET was added, in order to keep phases in the expected order, move GTK_PHASE_BUBBLE to be run (still invariably) after event handlers. The only behavioral change should be wrt widgets wanting mixed event handler/ gesture handling, they could previously attach the gesture to the bubble phase and check for gtk_gesture_is_active() in the event handler to bail out, they'll have to use GTK_PHASE_CAPTURE for that purpose from now on.
* texthandle: Mind the invisible area when moving the handleCarlos Garnacho2014-05-231-3/+7
| | | | | | The handle is still centered horizontally, but the extra vertical space wasn't taken into account, leading to misplacing the dragging point (and the handle) during motion events.
* textview: Check first whether the sequence is handled, fetch later the eventCarlos Garnacho2014-05-231-4/+7
| | | | | And always unset/hide the selection popover if unhandled, that means the sequence went grabbed/claimed somewhere else and cancelled here.
* entry: Check first whether the sequence is handled, fetch later the eventCarlos Garnacho2014-05-231-4/+7
| | | | | And always unset/hide the selection popover if unhandled, that means the sequence went grabbed/claimed somewhere else and cancelled here.
* gesture: Use GdkEventSequence GType in signalsCarlos Garnacho2014-05-231-5/+5
|
* gesture: Introspection fixesCarlos Garnacho2014-05-231-2/+2
| | | | | Set annotations on return values for gtk_gesture_get_device() and gtk_gesture_get_window().
* eventcontroller: introspection fixCarlos Garnacho2014-05-231-1/+1
| | | | Set transfer annotation on gtk_event_controller_get_widget()
* gdk: Make GdkEventSequence a boxed typeCarlos Garnacho2014-05-232-1/+21
| | | | Not much to copy nor free, but this'll make bindings happy
* paned: Handle pointer events from touchscreen devicesCarlos Garnacho2014-05-231-2/+7
| | | | | | GtkPaned may just capture pointer events because the child widget doesn't happen to have GDK_TOUCH_MASK set, resort to checking the device in that case.
* Docs: Cosmetic fixesMatthias Clasen2014-05-239-54/+62
|
* docs: Correct a referenceMatthias Clasen2014-05-231-1/+2
|
* Revert "docs: GtkEventController was dropped from public api"Matthias Clasen2014-05-233-0/+24
| | | | This reverts commit eefac03b395a6b885fd61c100b48652200beb996.
* Revert "docs: More GtkEventController removal"Matthias Clasen2014-05-231-1/+1
| | | | This reverts commit 75f503fb1fc9068c9e1a0d02126c55addbe8eb3e.
* Docs: Add information about event propagationMatthias Clasen2014-05-231-3/+26
|
* Docs: Minor changesMatthias Clasen2014-05-233-5/+5
|
* Document gtk_gesture_set_stateMatthias Clasen2014-05-231-0/+14
|
* docs: gtk_gesture_cancel_sequence was made privateMatthias Clasen2014-05-231-1/+0
|
* docs: More GtkEventController removalMatthias Clasen2014-05-231-1/+1
|
* docs: GtkEventController was dropped from public apiMatthias Clasen2014-05-233-24/+0
|
* paned: Use GtkGesture to handle handle draggingCarlos Garnacho2014-05-231-153/+134
| | | | | | | | | | Dragging is all handled by a GtkGesturePan now, matching the paned orientation. On touch events, a wider area is listened for, so touch events don't need to be as accurate to initiate dragging, if no dragging is truly initiated in this case, events are just forwarded for child widgets to handle.
* switch: Use GtkGesture to handle input eventsCarlos Garnacho2014-05-231-137/+118
| | | | | | A pan gesture is used to handle switch dragging, which is only triggered by horizontal panning movements. A multipress gesture handles the cases where clicking without dragging happens, just toggling the switch.
* inspector: Add more complete gesture supportMatthias Clasen2014-05-238-0/+337
| | | | | Add a dedicated tab that shows how gestures are grouped, and allows changing the propagation phase.
* inspector: Minimal support for gesturesMatthias Clasen2014-05-231-0/+28
| | | | We're just showing them as objects in the tree, for now.
* Add back a private api to list controllersMatthias Clasen2014-05-232-0/+24
| | | | This will let us show them in the inspector.
* texthandle: Make a bigger hit area around texthandlesCarlos Garnacho2014-05-231-2/+11
| | | | | | The hit area now extends to all sides around the handle, instead of just towards where the text is. This makes it easier to grab handles once shown.
* gesture: Declare GtkGesture:window as an object propertyCarlos Garnacho2014-05-231-5/+5
|
* widget: 3-way merge ate my g_object_ref()Carlos Garnacho2014-05-231-1/+1
| | | | Move it to the right place.
* scrolledwindow: Handle directional cancellation if there is a single scroll ↵Carlos Garnacho2014-05-231-2/+36
| | | | | | | | | | | direction A pan gesture is optionally attached if there is only one scrolling direction, the pan gesture orientation is changed so movements tangential to the scroll direction get scrolling cancelled (The pan gesture is automatically denied when that happens, and that state change spreads to the others gestures in the group). If the pan direction happens in the expected directions, no cancellation happens, and scrolling eventually takes place.
* widget: remove check on whether the controller was already addedCarlos Garnacho2014-05-231-1/+0
| | | | | | Multiple calls are supposedly allowed to change the phase (although unlikely to happen), so remove the g_return_if_fail() checking whether the controller was already added.
* pan: Remove wrong checkCarlos Garnacho2014-05-231-3/+0
| | | | | From the very early days where there were a NONE=0 GtkPanOrientation value. This makes vertical pan operations work as expected.
* entry: Ensure the cursor text handle is shown after touching to reposition ↵Carlos Garnacho2014-05-231-3/+4
| | | | cursor.
* popover: Hide widget first when disposingCarlos Garnacho2014-05-231-1/+2
| | | | In order to ensure invariants are kept.
* entry: Obey implementations' frame when placing handles/popovers aroundCarlos Garnacho2014-05-231-7/+21
| | | | | Y=0 was assumed in a few places, not necessarily right on eg. vertical spinbuttons.
* entry: Improve touch popover interactionCarlos Garnacho2014-05-231-11/+17
| | | | | | Presses alternatively show and dismiss the popover, the popover is still always shown invariably after any dragging happens (either text selection, or dragging a text handle)
* textview: Show the magnifier popover a bit farther from the touch positionCarlos Garnacho2014-05-231-3/+7
| | | | | Somewhat arbitrary at the moment, would be nice to have minimal units support for this, or at least hidpi support.
* textview: Improve touch popover interactionCarlos Garnacho2014-05-231-7/+15
| | | | | | Presses alternatively show and dismiss the popover, the popover is still always shown invariably after any dragging happens (either text selection, or dragging a text handle)
* entry: Use gestures to handle pointer/touch eventsCarlos Garnacho2014-05-231-328/+343
| | | | | | | | | Similarly to GtkTextView, a GtkGestureMultiPress gesture handles button/touch presses to initiate one selection mode or other, and a GtkGestureDrag is used to handle text selection and DnD checks. The code from button press/release, motion, and grab_notify handlers has been shuffled into the actions triggered by those gestures.
* spinbutton: Attach "swipe to spin" controllers to the bubble phaseCarlos Garnacho2014-05-231-32/+3
| | | | | It is unnecessary to have those process events manually, just attach those to the bubble phase.
* colorplane: Fully port to GtkGestureCarlos Garnacho2014-05-231-100/+87
| | | | | | | | | 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.
* gdk: Lookup both device and global cursor when checking up the hierarchyCarlos Garnacho2014-05-231-0/+1
| | | | | | | | When the pointer cursor is updated on CSW, lookup for either a device cursor, or a global one. It would previously lookup for windows with a global cursor, and then check if it had a device cursor, which would skip windows with only device cursors set, and unexpectedly set the global cursor.
* button: Make multipress gesture exclusiveCarlos Garnacho2014-05-231-0/+1
| | | | | | We only want actions to be triggered by a single sequence there, so buttons trigger no actions on further simultaneous touches happening.
* gesturesingle: Add an "exclusive" boolean propertyCarlos Garnacho2014-05-233-0/+90
| | | | | | All "exclusive" gestures listen for either pointer events, or "pointer emulating" touch events, so only a single sequence at a time can make these run.
* button: Use GtkGestureMultiPress for signal emissionCarlos Garnacho2014-05-231-11/+15
| | | | | It is now useful for that purpose with a ::release signal, so replace the custom GtkGestureSingle with one of these.
* drag: Allow gtk_gesture_get_start_point/offset() to be called on ::drag-endCarlos Garnacho2014-05-231-2/+12
|
* multipress: Add matching ::released signalCarlos Garnacho2014-05-232-2/+47
| | | | | | | This signal will always be paired with a ::pressed signal, unless the sequence is cancelled, or the controller is reset. the n_press argument in the signal always matches the ::press signal one, even if GtkGestureMultiPress::stopped was emitted in between.
* multipress: Protect against fleeting touches mistriggering eventsCarlos Garnacho2014-05-231-41/+51
| | | | | | | The current sequence (as per gtk_gesture_single_get_current_sequence) is used to find out the coordinates. And only emit ::pressed if the gesture began through a GDK_BUTTON_PRESS/TOUCH_BEGIN (eg. not due to an extra touch being lifted)
* textview: Set up controllers on the GTK_PHASE_TARGET propagation phaseCarlos Garnacho2014-05-231-2/+2
| | | | | This way events are managed by gestures in the event handlers themselves, respecting the execution order already assumed by subclasses around.