Commit Graph

1079 Commits

Author SHA1 Message Date
Emmanuele Bassi
39dbd91bb0 docs: Add yet another private header 2020-12-02 19:05:41 +00:00
Emmanuele Bassi
901d99d7c5 docs: More ignored files 2020-12-02 19:05:41 +00:00
Emmanuele Bassi
8f6e3848f6 docs: Remove duplicate symbol 2020-12-02 19:05:41 +00:00
Emmanuele Bassi
caae240bc7 docs: Ignore harder
First of all, we must list *all* ignored headers. Since we have public
headers in the x11 and wayland directories, we must explicitly declare
all headers that we consider private under those directories.

The "quartz" subdirectory was renamed "macos", with the new macOS
backend. The "mir" directory was removed, so there's no need to ignore
it.

We are also missing a bunch of ignored headers in the top-level gdk
directory.

Finally, pass the list of ignored files to gtkdoc-mkdb, so we won't get
missing declaration warnings.
2020-12-02 19:05:41 +00:00
Emmanuele Bassi
f5f6ceece5 docs: Remove private symbols from the API reference 2020-12-02 19:05:41 +00:00
Emmanuele Bassi
5a307fa7f3 docs: Ignore more private headers 2020-12-01 13:37:59 +00:00
Matthias Clasen
6bd9ce7b55 docs: Ignore more generated Wayland protocol headers
These inject mysterious words like Airbrush, Lense and
Mouse into the list of undocumented apis. No need for that.
2020-11-30 09:21:24 -05:00
Matthias Clasen
e2f26b0d9a docs: Fix a typo 2020-11-16 07:37:33 -05:00
Matthias Clasen
3164f328b5 docs: Some restructuring
Give the GDK docs some more structure.
2020-10-29 14:23:46 -04:00
Matthias Clasen
574a3a456d gdk: Drop GdkPoint from the api
This typedef was not used in any public APIs, and is
only used in the MacOS backend. It is not worth preserving
as public API, move it to the only user.
2020-10-29 14:23:46 -04:00
Matthias Clasen
3617fbab42 docs: Include GDK_WINDOWING_MACOS
We no longer have a Quartz backend, it is called
MacOS now.
2020-10-29 14:23:46 -04:00
Matthias Clasen
1d40f29776 wayland: Make gdk_wayland_device_pad_set_feedback private
It is not a generally useful api, and awkwardly named.
2020-10-15 12:00:00 -04:00
Emmanuele Bassi
4f316f3249 docs: Remove private GdkWayland API from the reference 2020-10-12 16:44:36 +01:00
Alexander Larsson
a299bbfc58 Drop gdk_cairo_surface_upload_to_gl() helper
There is nothing really special about this code, its just a helper for
uploading pixel data to opengl, and we're not really in the business
of doing opengl-specific helper functions.
2020-09-25 15:00:07 +02:00
Matthias Clasen
31042bd761 docs: Add missing Wayland backend api
Since Wayland is now our flagship backend,
we should put some effort into the docs.
2020-09-19 13:13:31 -04:00
Matthias Clasen
3023a61e1d wayland: Change backend api to use GdkToplevel
Most of the surface api we have in the Wayland backend
only makes sense for toplevels, so reshuffle things to
take a GdkToplevel instead of a GdkSurface.

Update all callers and the docs.
2020-09-19 13:07:11 -04:00
Matthias Clasen
b166999683 Add gdk_frame_clock_get_fps
We already have more than one copy of this code
in GTK, so just export this function.
2020-09-13 23:35:01 -04:00
Matthias Clasen
d5d4af585d gdk: Move GdkSurfaceEdge to the right header
This is only used in gdktoplevel.h, so move it there.
2020-09-10 00:44:05 -04:00
Matthias Clasen
93078e52c0 gdk: Rename GdkSurfaceState to GdkToplevelState
That is what it is.

Fixes: #2790
2020-09-10 00:39:03 -04:00
Matthias Clasen
1d7b273669 docs: Clean up dangling links in gdk docs
Clean up references to no-longer-existing APIs.
2020-08-05 15:45:43 -04:00
Jonas Ådahl
2ff74eb667 gdk/toplevel: Negotiate surface size via a compute-size signal
GTK will not up front know how to correctly calculate a size, since it
will not be able to reliably predict the constraints that may exist
where it will be mapped.

Thus, to handle this, calculate the size of the toplevel by having GDK
emitting a signal called 'compute-size' that will contain information
needed for computing a toplevel window size.

This signal may be emitted at any time, e.g. during
gdk_toplevel_present(), or spontaneously if constraints change.

This also drops the max size from the toplevel layout, while moving the
min size from the toplevel layout struct to the struct passed via the
signal,

This needs changes to a test case where we make sure we process
GDK_CONFIGURE etc, which means we also needs to show the window and
process all pending events in the test-focus-chain test case.
2020-08-05 15:49:00 +02:00
Carlos Garnacho
96452a2e46 gdk: Rename gdk_seat_get_physical_devices() to gdk_seat_get_devices()
We don't want to tell what they are, and the distinction is now less
clear. Remove the adjective from the function name.
2020-07-30 18:44:40 +02:00
Carlos Garnacho
46eb054337 gdk: Drop gdk_device_get_device_type()
There is no longer a hierarchy of devices, or none that is seen
on the outside.
2020-07-30 18:44:40 +02:00
Carlos Garnacho
3c68db8e47 gdk: Make gdk_device_list_physical_devices() private
Physical devices should probably be accounted internally in gdk/x11,
make this out of private API so at least the implementation details
don't leak.
2020-07-30 18:30:13 +02:00
Carlos Garnacho
9912c80d70 gdk: Drop gdk_device_get_associated_device()
Devices are no longer associated like this, the seat should be used
to resolve queries on other devices.
2020-07-30 18:30:13 +02:00
Matthias Clasen
0b11e78064 Merge branch 'display-cleanup' into 'master'
Display cleanup

See merge request GNOME/gtk!2319
2020-07-30 03:55:23 +00:00
Matthias Clasen
7df070d681 gdk: Move default group api to the X11 backend
This is the only place where it is implemented.
2020-07-29 22:58:37 -04:00
Matthias Clasen
4d012a6d95 Rename gdk_surface_queue_expose
We don't have expose events anymore; instead, there
is a ::render signal. So rename queue_expose to
queue_render to match.

Update all callers.
2020-07-29 22:40:01 -04:00
Matthias Clasen
c1eedf6845 gdk: Stop exporting gdk_surface_freeze_updates
The only legitimate use for freezing the frame clock
is in GDK backends. Exporting this function for
applications makes no sense.
2020-07-29 22:30:44 -04:00
Jonas Ådahl
c7c71137b2 gdk/monitor: Remove gdk_monitor_work_area and GdkMonitor::work-area
It's not a portable API, so remove it. The corresponding backend
specific functions are still available, if they were implemented, e.g.
gdk_macos_monitor_get_workarea() and gdk_x11_monitor_get_workarea().
2020-07-29 17:57:30 +02:00
Carlos Garnacho
cab1dcb696 gdk: Conflate GDK devices
Make GdkEvents hold a single GdkDevice. This device is closer to
the logical device conceptually, although it must be sufficient for
device checks (i.e. GdkInputSource), which makes it similar to the
physical devices.

Make the logical devices have a more accurate GdkInputSource where
needed, and conflate the event devices altogether.
2020-07-29 01:27:51 +02:00
Carlos Garnacho
7629f6d533 gdk: Make GdkDevice axis API internal
All outside interaction happens through gdk_event_get_axis(), no
device poking is necessary, nor axis to array index translations.
2020-07-29 01:27:51 +02:00
Carlos Garnacho
230ce9bfde gdk: Remove gdk_device_get_axes()
Besides the implicit x/y assumptions, devices don't have axes. Those
are actually provided by the GdkDeviceTool driving the device, and
different tools may have different axes.

It does not make sense to offer this API that can change beneath
someone's feet, we now have gdk_device_tool_get_axes() which is static
to the tool.
2020-07-29 01:27:51 +02:00
Carlos Garnacho
b52ad33031 gdk: Add gdk_seat_get_tools() API call
There's GdkSeat::tool-added and ::tool-removed, but there's no
API to query the known tools. Add this call.
2020-07-29 00:11:34 +02:00
Carlos Garnacho
254007a142 gdk: Add gdk_device_tool_get_axes()
Axes are actually a per-tool property, we just adapt devices to the
current tool.
2020-07-28 17:37:09 +02:00
Carlos Garnacho
a2876b5cb4 gdkdevice: Remove gdk_device_get_state()
This is not needed nor recommended anymore, all reasons to maybe
need this were all kept within gdk.
2020-07-28 17:36:18 +02:00
Matthias Clasen
4d7d031ee0 gdk: Small documentation fixes
Make sure gdk_event_get_seat shows up.
2020-06-28 12:24:03 -04:00
Carlos Garnacho
469a4a73f9 gdk: Drop gdk_device_get_last_event_surface()
This kind of transient state sets the expectative that events update
devices, while it's more accurate to say that devices generate events.
It does not make to expose this function anymore.
2020-06-24 11:24:04 +02:00
Carlos Garnacho
6d2860efb7 gdk: Drop gdk_seat_get_logical_pointers()
Events come from hardware devices and are handled by controllers,
there's no need to use logical pointers, nor to peek them. Drop this
unused API.
2020-06-23 23:42:53 +02:00
Carlos Garnacho
59a8106373 gdk: Drop supports_multidevice API
Crossing events are now detached from widget state, all tricky consequences
from getting multiple crossing events are now somewhat moot. Resort to sending
all generated crossing events, and drop this barely (ever?) used API.
2020-06-23 23:42:53 +02:00
Emmanuele Bassi
1c856a208f Rename master and slave device
We already use the "logical/virtual" and "physical" names in the
documentation, there's no reason to use loaded terms just because X11
uses them.
2020-06-18 19:22:20 +01:00
Rico Tzschichholz
7c1cf7781b gdk: Drop gdk_device_get_axis_value leftovers 2020-06-16 15:31:29 +02:00
Matthias Clasen
4b241f8da2 Merge branch 'scroll-compression' into 'master'
gdk: Compress scroll events

Closes #2800

See merge request GNOME/gtk!2066
2020-06-10 14:35:01 +00:00
Matthias Clasen
54c098761f gdk: Drop gdk_device_set_axis_use
If you need some axes changed, you can just flip
the values when you receive them.
2020-06-09 15:27:34 -04:00
Matthias Clasen
2f98400b80 gdk: Drop gdk_device_get/set_keys
This functionality was only ever half-implemented
on X11, and is not useful enough to keep around.
2020-06-09 15:27:33 -04:00
Matthias Clasen
c9fad25131 gdk: Rename gdk_motion_event_get_history
Scroll events can have history too, so make a
getter that works for both. This drops the
gdk_scroll_event_get_history getter that was
added a few commits earlier, since we now
store scroll history in the same way as
motion history.

Update the docs, and all callers.
2020-06-09 13:43:12 -04:00
Matthias Clasen
805ddc3c3a gdk: Drop gdk_device_get_history
This function is not implemented anywhere.
2020-06-08 18:24:20 -04:00
Matthias Clasen
61c83f9ffe gdk: Documentation fixups
Document some missing symbols.
2020-06-05 20:59:51 -04:00
Matthias Clasen
346bba6592 Bring back gdk_display_put_event
It is still needed in WebKit.
2020-05-29 09:26:50 -04:00
Matthias Clasen
c7a9d7b56b Merge branch 'im-context-key-forward' into 'master'
Add back keyboard related apis

See merge request GNOME/gtk!1977
2020-05-29 00:10:39 +00:00
Matthias Clasen
266a3a5267 Export keymap translation again
This is needed in WebKit webdriver test environment.
2020-05-28 15:15:53 -04:00
Matthias Clasen
48f8affb2c gdk: Make event-related apis private
Without a way to create events, there is no point
in allowing gdk_display_put_event to be used from
the outside. And little good can come out of using
the other apis, so just make them all private.
2020-05-28 14:53:08 -04:00
Matthias Clasen
f27d855c68 gdk: Drop the GdkEventMask enum
This is not used in public api anymore.
Some of the backends still use it internally,
so keep it in gdkinternals.h for now.
2020-05-26 19:39:31 -04:00
Matthias Clasen
0553b10214 gdk: Drop the GdkSurfaceTypeHint enum
This is not used in public api anymore.
Some of the backends still use it internally,
so keep it in gdkinternals.h for now.
2020-05-26 19:34:59 -04:00
Matthias Clasen
287c40276a gdk: Drop gdk_display_supports_shapes
The apis to set shapes on surfaces are gone,
so there is no point in providing this information
on GdkDisplay.
2020-05-17 21:52:15 -04:00
Matthias Clasen
c0faf0c6b6 Merge branch 'toplevel-move-resize' into 'master'
Toplevel move resize

See merge request GNOME/gtk!1923
2020-05-17 19:15:46 +00:00
Matthias Clasen
eb6edac4bd gdk: Drop gdk_surface_begin_move/resize_drag
These have been replaced by GdkToplevel api.
2020-05-17 12:49:29 -04:00
Matthias Clasen
309a7aa253 gdk: Add gdk_toplevel_begin_move/resize
For now, these are wrappers around the surface apis,
but they are going to replace them, since this operation
is only available on toplevels.
2020-05-17 12:41:16 -04:00
Benjamin Otte
4c7914dc49 display: Remove unneeded getters
Applications can use the listmodel instead.
2020-05-17 07:32:37 +02:00
Benjamin Otte
d4731a4ab4 x11: Remove gdk_x11_register_standard_event_type()
It's not used anymore since GdkX11Display::xevent exists.
2020-05-17 01:02:17 +02:00
Benjamin Otte
0c6266fd1a surface: Remove gdk_surface_is_viewable()
It returns the same value as gdk_surface_get_mapped(), so use that
instead.
2020-05-17 00:41:44 +02:00
Benjamin Otte
dd7d76f389 gdk: Add gdk_display_get_monitors()
Returns a GListModel of GDK_TYPE_MONITOR.

This will replace the current andling of monitors in GdkDisplay.
2020-05-13 07:00:35 +02:00
Corentin Noël
076b2f11d2 docs: Fix several missing references in the documentation
This fixes several typos and missing references
2020-05-11 19:26:20 +02:00
Matthias Clasen
3c987f073e Remove GdkGeometry from public API
The api to configure surfaces is now GdkToplevelLayout
and GdkPopupLayout. Unfortunately, there's still quite
a bit of internal use of GdkGeometry that will take some
time to clean up, so move it go gdkinternals.h for now.
2020-04-19 10:41:18 -04:00
Matthias Clasen
c5b4066714 gdk: Small documentation fixes 2020-04-11 10:07:31 -04:00
Matthias Clasen
89ad7893ad gdk: Make GdkKeymap a private api
We have replacement apis in GdkDevice and GdkDisplay.
2020-04-06 16:32:03 -04:00
Matthias Clasen
3300686bef gdk: Clean up GdkModifierType
Remove MOD2..MOD5. Backends are expected to just set
the named modifiers.
2020-04-06 15:13:54 -04:00
Matthias Clasen
0a96a483c6 gdk: Redo key events
Add all of the keyboard translation results in the key event,
so we can translate the keyboard state at the time the event
is created, and avoid doing state translation at match time.

We actually need to carry two sets of translation results,
since we ignore CapsLock when matching accelerators, in
gdk_event_matches().

At the same time, drop the scancode field - it is only ever
set on win32, and is basically unused in GTK.

Update all callers.
2020-04-06 15:13:54 -04:00
Matthias Clasen
00b25d5594 Move keymap mapping functions to GdkDisplay
We want to stop exposing GdkKeymap, so this
functionality needs a new home.
2020-04-06 01:40:40 -04:00
Matthias Clasen
c9aef3fc4d Add gdk_event_get_match
This is a counterpart to gdk_event_matches() that can
be used to obtain a shortcut matching an event.
2020-04-05 23:37:13 -04:00
Matthias Clasen
5bf030413b Add new api to the docs 2020-03-30 14:12:14 -04:00
Matthias Clasen
32b9dd64db Drop GdkToplevel:keep-above/below
These properties were only ever implemented in the X11
backend. If you want to keep windows above or below
on X11, just use the X properties.
2020-03-14 15:46:55 -04:00
Matthias Clasen
60ea97187a Drop GdkToplevel:sticky
This was only ever implemented on X11. If you
want to use it there, just use the X properties
yourself.
2020-03-14 15:16:18 -04:00
Matthias Clasen
50c2b80c74 gdk: Documentation fixes 2020-03-14 01:23:56 -04:00
Matthias Clasen
7fd60ab570 Fix up gdk docs 2020-03-12 15:30:11 -04:00
Benjamin Otte
0e72adf6dd drop: Remove unused convenience APIs
With the new event controllers, these are unused.
2020-03-02 04:43:56 +01:00
Matthias Clasen
6fb50ccd0d Drop gdk_surface_is_visible
It has been replaced by gdk_surface_get_mapped.
2020-02-24 19:07:03 -05:00
Matthias Clasen
96b7c5f575 Add gdk_surface_get_mapped
Returns the value of the ::mapped property. This is
a direct replacement for gtk_surface_is_visible.
2020-02-24 17:59:12 -05:00
Matthias Clasen
3c95798cd3 Add missing GdkDrag getters 2020-02-24 14:38:42 -05:00
Matthias Clasen
ec76f65d09 surface: Add a getter for autohide 2020-02-24 14:38:42 -05:00
Matthias Clasen
9ce6e98487 device: Add missing getters
This adds getters for a few properties that were
missing them, and renames the input-mode and input-source
properties to match their existing getters.
2020-02-24 08:40:16 -05:00
Matthias Clasen
4ca0a93324 Add a getter for GdkAppLaunchContext::display 2020-02-24 08:32:34 -05:00
Benjamin Otte
cc7c1fe108 gdk: Remove GdkAtom
finally!!!!!
2020-02-23 01:59:26 +01:00
Benjamin Otte
6e935d469a x11: Get rid of GdkAtom and APIs supporting it.
replace all uses with const char * (non-interned).
Also remove a lot fo juggling from atom to GdkAtom to string and back.

The X Atom hash table is now mapping to (again, non-interned) strings.
2020-02-23 01:59:26 +01:00
Benjamin Otte
4280ca2263 device: gdk_device_list_axes() => gdk_device_get_axis_names()
Turn a GList of GdkAtom into a char ** - and rename the function to not
cause problems.
2020-02-23 01:59:26 +01:00
Benjamin Otte
28dced597f gdk: Remove gdk_text_property_to_utf8_list_for_display()
A lot of files became empty now, so they have been removed, which makes
this commit seem larger than it is.
2020-02-23 01:59:26 +01:00
Benjamin Otte
6442ec2f8d gdk: Remove gdk_utf8_to_string_target()
Only keep the X11 version around in the backend.
2020-02-23 01:59:00 +01:00
Matthias Clasen
be25905a8d Fix gdk docs build 2020-02-22 10:44:21 -05:00
Jonas Ådahl
b4bce2ff8a docs: Add GdkPopupLayout to gdk4-sections.txt 2020-02-21 23:25:30 +01:00
Matthias Clasen
71b3f47909 Update event docs section 2020-02-21 00:51:03 -05:00
Benjamin Otte
9660ae5556 Merge branch 'wip/xdg-popup-async-relayout' into 'master'
Synchronous popup layout

See merge request GNOME/gtk!1241
2020-02-19 18:57:14 +00:00
Jonas Ådahl
ca71119a40 gdk/surface: Replace move_to_rect() with GdkPopupLayout based API
Replace the gdk_surface_move_to_rect() API with a new GdkSurface
method called gdk_surface_present_popup() taking a new GdkPopupLayout
object describing how they should be laid out on screen.

The layout properties provided are the same as the ones used with
gdk_surface_move_to_rect(), except they are now set up using
GdkPopupLayout.

Calling gdk_surface_present_popup() will either show the popup at the
position described using the popup layout object and a new unconstrained
size, or reposition it accordingly.

In some situations, such as when a popup is set to autohide, presenting
may immediately fail, in case the grab was not granted by the display
server.

After a successful present, the result of the layout can be queried
using the following methods:

 * gdk_surface_get_position() - to get the position relative to its
   parent
 * gdk_surface_get_width() - to get the current width
 * gdk_surface_get_height() - to get the current height
 * gdk_surface_get_rect_anchor() - to get the anchor point on the anchor
   rectangle the popup was effectively positioned against given
   constraints defined by the environment and the layout rules provided
   via GdkPopupLayout.
 * gdk_surface_get_surface_anchor() - the same as the one above but for
   the surface anchor.

A new signal replaces the old "moved-to-rect" one -
"popup-layout-changed". However, it is only intended to be emitted when
the layout changes implicitly by the windowing system, for example if
the monitor resolution changed, or the parent window moved.
2020-02-19 09:47:18 +01:00
Benjamin Otte
8d2ed36a1b contentprovider: Add gdk_content_provider_new_typed()
Gets around the boilerplate required to create and initialize a GValue
by having this function doing it via G_VALUE_COLLECT().
2020-02-16 20:10:30 +01:00
Matthias Clasen
8ef7013165 Drop gdk_surface_new_temp
GTK is not using this API anymore, and we want
to consolidate our surface types to just toplevels
and popups.
2020-02-14 21:20:12 +01:00
Benjamin Otte
052d0f6e60 gdk: Remove gdk_cairo_get_clip_rectangle()
The function is fundamentally broken for unbounded surfaces.
If a surface is unbounded, we cannot represent this as a
cairo_rectangle_int_t, and using the return value doesn't work because
it's already used for something else.

In GTK3, unbounded surfaces aren't a problem, but GTK4 uses recording
surfaces.

So better remove that function before we keep using it and using it
wrong.
2020-02-13 07:36:38 +01:00
Matthias Clasen
a824be2bb9 docs: Drop a few no longer existing symbols 2020-02-08 19:25:13 -05:00
Alberts Muktupāvels
66af531ff3 display-x11: don't mention gdk_monitor_is_primary in the docs
https://gitlab.gnome.org/GNOME/gtk/merge_requests/1371#note_699272
2020-02-02 19:18:22 +02:00
Alexander Larsson
2ec51b7010 icon-theme: Update the docs 2020-01-30 10:53:43 +01:00
Matthias Clasen
0bb9fc65ad Remove gdk_seat_grab
We are no longer using free-standing grabs
in GTK. The replacement is the autohide
functionality of popup surfaces.
2019-12-29 20:31:58 -05:00
Emmanuele Bassi
9a88d17ef2 Merge branch 'gdk-backend-imports' into 'master'
Correct Gdk backend import paths and related gtk-doc

See merge request GNOME/gtk!1197
2019-11-18 10:27:32 +00:00