Commit Graph

518 Commits

Author SHA1 Message Date
Matthias Clasen
e0990b2311 Drop ::button-press/release event
We are no longer using these, and there are several gestures
that can be used instead. If you need to catch raw button events,
use the ::event signal.
2018-01-16 14:14:11 -05:00
Matthias Clasen
64c3db931d Drop ::motion-notify-event
We no longer emit this signal. You can use various gestures
and event controllers instead. If you need to catch raw
motion events, use the generic ::event signal.
2018-01-16 14:14:10 -05:00
Matthias Clasen
9ba5f053d9 Drop ::focus-in/out-event
These signals are no longer used in GTK+.
If you need to catch focus events, use the ::event signal.
2018-01-16 14:14:10 -05:00
Matthias Clasen
5759bc59c9 Drop gtk_widget_hide_on_delete
This function is misnamed - it is only ever relevant for
windows. And with the ::hide-on-delete property , it is
no longer necessary to use the signal for this simple case.
2018-01-16 14:14:10 -05:00
Matthias Clasen
1c2e09116a Drop ::grab-broken-event
This signal is no longer used in GTK+. Grab broken events
can be handled with the generic ::event signal.
2018-01-16 14:14:10 -05:00
Matthias Clasen
f594807c0a Drop ::enter/leave-notify-event
These signals are no longer used in GTK+ and have a (not quite
perfect yet) replacement with GtkEventControllerMotion.

If you need to catch the raw events, the generic ::event
signal still works.
2018-01-16 14:14:10 -05:00
Matthias Clasen
a9d468a4c8 Drop ::configure-event
This signal is unused in GTK+ and configure events are handled
internally by GtkWindow.

If you need to catch configure events, the generic ::event
signal still works.
2018-01-16 14:14:10 -05:00
Matthias Clasen
fa885f437c Drop ::touch-event
This signal is not used in GTK+, and has a suitable
replacement with GtkGesture and its subclasses.

If you need to catch the raw touch events, the generic ::event
signal still works, too.
2018-01-16 14:14:10 -05:00
Matthias Clasen
47712a826b Drop ::scroll-event
This signal is not used in GTK+, and has a suitable
replacement with GtkEventControllerScroll.

If you need to catch these events, the generic ::event
signal still works, too.
2018-01-16 14:14:10 -05:00
Matthias Clasen
e93c2517e6 Drop ::proximity-in-event and ::proximity-out-event
These are unused in GTK+, and are not very common.
If you need to catch these events, the generic ::event
signal still works.
2018-01-16 14:14:09 -05:00
Matthias Clasen
fd2a3b602f Drop ::map-event and ::unmap-event
These are unused in GTK+, and are not very common.
If you need to catch these events, the generic ::event
signal still works.
2018-01-16 14:14:09 -05:00
Matthias Clasen
7b581ca096 Drop GtkWidget::destroy-event
This signal is unused in GTK+, and is documented as
'hard to ever get', so there's no good reason for
keeping it.
2018-01-16 14:14:09 -05:00
Matthias Clasen
2b52b4be5d Drop GtkWidget::delete-event
Nobody is using this signal anymore, and ::delete is there
for the few places where it is needed.
2018-01-16 14:14:09 -05:00
Matthias Clasen
9f94736c92 Remove selection-handling leftovers
The selection_get and selection_received vfuncs are
no longer used, remove them.
2018-01-02 18:14:14 -05:00
Matthias Clasen
65fc43a1f3 Drop GDK_CLIENT_EVENT
We never generate events of this type, so no need
to carry it around.
2017-12-14 22:55:03 -05:00
Matthias Clasen
a4a2ecb21a widget: Remove the ::window-state-event signal
We no longer use this signal, so remove it.
2017-12-14 22:24:06 -05:00
Benjamin Otte
f2bb2024c8 gdk: Remove properties
They are not used anymore.

Gone with them are PropertyNotify events.
2017-12-14 03:05:34 +01:00
Benjamin Otte
54f9aef0d4 gdk: Remove gdk_selection_convert()
It's not used anymore.
2017-12-14 00:44:26 +01:00
Benjamin Otte
4042d5f242 gdk: Remove ability to own a selection
With this, the GDK_EVENT_SELECTION_REQUEST and GDK_EVENT_SELECTION_CLEAR
and the associated GtkWidget signals are gone, too.
2017-12-13 23:39:02 +01:00
Benjamin Otte
4658d7ea54 dnd: Remove x/y coordinates from drag-data-received
This is in preparation of using input streams to show that these
coordinates aren't needed most of the time and can otherwise be saved
during GtkWidget::drag-drop.
2017-12-05 05:29:00 +01:00
Benjamin Otte
2d5c82b4ec gtk: Remove GtkClipboard 2017-12-03 05:46:49 +01:00
Benjamin Otte
54c8a4b3b7 widget: Add gtk_widget_get_clipboard()
... and gtk_widget_get_primary_clipboard().

They both give out the new GdkClipboard.
2017-12-03 05:46:47 +01:00
Benjamin Otte
a59572f96d widget: gtk_widget_get_clipboard => gtk_widget_get_old_clipboard
Just rename the function, so the previous one can be used for the
new clipboard.
2017-12-03 05:46:47 +01:00
Benjamin Otte
3f5178dc21 selection: Remove the info uint
Instead of allowing people to pass a uint user-data, insist on them
comparing mime types.

The user data was a uint instead of a pointer anyway, so uniqueness
could not be guaranteed and it caused more issues than it was worth.
And that's ignoring the fact that it basically wasn't used.
2017-11-16 22:59:43 +01:00
Benjamin Otte
9d56cee622 widget: Remove gtk_widget_set_device_enabled()
Nobody is using it.
2017-11-13 23:41:37 +01:00
Benjamin Otte
cf2d549e92 widget: Implement gtk_widget_pick()
... and use it.
2017-11-05 05:13:17 +01:00
Benjamin Otte
b38a4cb824 widget: Export gtk_widget_set_cursor()
Widgets can now set their favorite cursor using public API.

This is very necessary because all cursor-setting APIs are still
setting it on their GdkWindow, which by now is the toplevel - oops.
2017-11-04 01:00:27 +01:00
Timm Bäder
8f55647fbb widget: Add get_width() and get_height() 2017-11-02 11:54:06 +01:00
Timm Bäder
dea8233663 widget: Remove stray prototype
gtk_cairo_transform_to_window is gone.
2017-11-02 11:25:41 +01:00
Benjamin Otte
d88c441764 widget: Add gtk_widget_contains() 2017-11-01 19:46:59 +01:00
Timm Bäder
f576002e9e widget: Improve get_request_mode vfunc docs 2017-10-31 10:10:53 +01:00
Benjamin Otte
648d040395 widget: Remove gtk_widget_get_screen()
Replace the remaining users with "correct" code that does not need that
function anymore.
2017-10-31 08:25:37 +01:00
Benjamin Otte
1c36c6ed4d widget: Remove gtk_widget_has_screen()
All widgets always have a screen (or display).
2017-10-31 04:33:11 +01:00
Benjamin Otte
44614394e6 widget: Turn screen-changed signal into display-changed 2017-10-31 00:43:11 +01:00
Timm Bäder
ff6cd8f75e widget: Remove parent-set signal
When a widget unparents its child widget manually in finalize, this can
lead to the parent-set signal being emitted for those child widgets. The
parent already has a ref_count of 0 though, so it can't be used in a
meaningful way. Specifically, emitting the signal will already try to
ref the parent which prints a critical.

Since GtkWidget already has a "parent" property, one can use its notify
signal instead to get notified when the parent widget changes.
2017-10-29 17:24:12 +01:00
Timm Bäder
a8a755e5cd widget: Remove gtk_widget_set_redraw_on_alloc
Since gtk+ draws more than the widget and allocates more size to it than
it knows about, this flag doesn't work anymore. Removing it (or setting
it to TRUE for widgets that used to set it to FALSE) fixes drawing
invalidation when these widgets get allocated a new size.
2017-08-09 16:26:26 +02:00
Timm Bäder
5720f2a845 widget: Make _set_clip private
We don't need this anymore since clips are now reported in
size-allocate.
2017-07-19 21:27:16 -04:00
Timm Bäder
5116ce19b7 widget: Remove queue_draw_region vfunc
Unused
2017-07-19 21:27:16 -04:00
Timm Bäder
36ab70ddf5 widget: Add baseline and out_clip parameters to size-allocate
Since setting a clip is mandatory for almost all widgets, we can as well
change the size-allocate signature to include a out_clip parameter, just
like GtkCssGadget did. And since we now always propagate baselines, we
might as well pass that one on to size-allocate.

This way we can also make sure to transform the clip returned from
size-allocate to parent-coordinates, i.e. the same coordinate space
priv->allocation is in.
2017-07-19 21:27:16 -04:00
Timm Bäder
c4f6cea111 fix a few documentation problems 2017-07-19 21:27:15 -04:00
Timm Bäder
e36ddfec17 Remove all widget style property code 2017-07-19 21:27:14 -04:00
Timm Bäder
ec6184c2af widget: Remove queue_draw_child vfunc 2017-07-19 21:27:13 -04:00
Timm Bäder
2cedf1be9c widget: Remove gtk_widget_set_allocation 2017-07-19 21:27:12 -04:00
Timm Bäder
a0016758a8 widget: Copy event in gtk_widget_event and _captured_event
To ensure that we never translate the coordinates to widget coordinates
twice.
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
9c97bf0c02 GtkWidget: Add ::pick vmethod
The default implementation iterates through all children, so should suffice
for most widgets.
2017-05-25 16:25:58 +02:00
Timm Bäder
3d21128dbb Remove gtk_widget_get_preferred_*
They are unnecessary now that we have gtk_widget_measure.
2017-05-05 11:18:25 +02:00
Timm Bäder
ba363fbb71 widget: Add gtk_widget_insert_before/after
To insert a widget into the widget tree before or after a child widget
of the soon-to-be parent.
2017-04-25 20:29:02 +02:00
Timm Bäder
f860ff8647 widget: Remove get_valign_with_baseline
This only existed for backwards compat reasons which aren't interesting
for gtk4.
2017-03-05 15:18:32 +01:00
Timm Bäder
6c6ed7496c widget: Remove gtk_widget_class_list_style_properties
Unused.
2017-01-30 18:11:00 +01:00