Commit Graph

270 Commits

Author SHA1 Message Date
Alexander Larsson
890080ebf7 GdkWindow -> GdkSurface: File renames
Rename all *window.[ch] source files.

This is an automatic operation, done by the following commands:

for i in $(git ls-files gdk | grep window); do
    git mv $i $(echo $i | sed s/window/surface/);
    git sed -f g $(basename $i) $(basename $i | sed s/window/surface/) ;
done

git checkout NEWS* po-properties po
2018-03-20 11:46:11 +01:00
Alexander Larsson
391727bd0d GdkWindow -> GdkSurface initial type rename
This renames the GdkWindow class and related classes (impl, backend
subclasses) to surface. Additionally it renames related types:
GdkWindowAttr, GdkWindowPaint, GdkWindowWindowClass, GdkWindowType,
GdkWindowTypeHint, GdkWindowHints, GdkWindowState, GdkWindowEdge

This is an automatic conversion using the below commands:

git sed -f g GdkWindowWindowClass GdkSurfaceSurfaceClass

git sed -f g GdkWindow GdkSurface
git sed -f g "gdk_window\([ _\(\),;]\|$\)" "gdk_surface\1" # Avoid hitting gdk_windowing
git sed -f g "GDK_WINDOW\([ _\(]\|$\)" "GDK_SURFACE\1" # Avoid hitting GDK_WINDOWING
git sed "GDK_\([A-Z]*\)IS_WINDOW\([_ (]\|$\)" "GDK_\1IS_SURFACE\2"
git sed GDK_TYPE_WINDOW GDK_TYPE_SURFACE
git sed -f g GdkPointerWindowInfo GdkPointerSurfaceInfo

git sed -f g "BROADWAY_WINDOW" "BROADWAY_SURFACE"
git sed -f g "broadway_window" "broadway_surface"
git sed -f g "BroadwayWindow" "BroadwaySurface"
git sed -f g "WAYLAND_WINDOW" "WAYLAND_SURFACE"
git sed -f g "wayland_window" "wayland_surface"
git sed -f g "WaylandWindow" "WaylandSurface"
git sed -f g "X11_WINDOW" "X11_SURFACE"
git sed -f g "x11_window" "x11_surface"
git sed -f g "X11Window" "X11Surface"
git sed -f g "WIN32_WINDOW" "WIN32_SURFACE"
git sed -f g "win32_window" "win32_surface"
git sed -f g "Win32Window" "Win32Surface"
git sed -f g "QUARTZ_WINDOW" "QUARTZ_SURFACE"
git sed -f g "quartz_window" "quartz_surface"
git sed -f g "QuartzWindow" "QuartzSurface"

git checkout NEWS* po-properties
2018-03-20 11:40:08 +01:00
Matthias Clasen
4c150d8eb5 The big versioning cleanup
Remove all the old 2.x and 3.x version annotations.
GTK+ 4 is a new start, and from the perspective of a
GTK+ 4 developer all these APIs have been around since
the beginning.
2018-02-06 01:16:32 -05:00
Matthias Clasen
77bab4e027 gdk: Drop some unused cursor apis
The query function for cursor sizes and capabilities
are not very interesting. At least, they are not used
in GTK+, and all backends but X11 just hardcode
made-up values anyway. So, lets drop them.
2018-01-16 23:32:01 -05:00
Matthias Clasen
e151058dff Make gdk logging per-display
As far as possible, use per-display debug flags.

This will minimize the debug spew that we get from
the inspector if it is running on a separate display.
2018-01-14 17:05:04 -05:00
Matthias Clasen
c5fc841285 gdk: Reorganize env vars
Drop GDK_GL, GDK_VULKAN and GDK_RENDERING_MODE.
Merge the useful bits into GDK_DEBUG.
Drop unused debug flags (CURSOR).
2018-01-14 17:05:04 -05:00
Matthias Clasen
5c9ea0cf4f display: Cosmetic doc changes 2017-12-26 14:39:49 -05:00
Matthias Clasen
ca2a7c1efd Document more structs 2017-12-26 14:39:24 -05:00
Matthias Clasen
d3920d17fa Document gdk_display_get_setting
New api needs documentation.
2017-12-26 11:51:28 -05:00
Matthias Clasen
ffe838e7de gdk: Document GdkDisplay::setting-changed
New api needs documentation.
2017-12-26 11:51:28 -05:00
Emmanuele Bassi
e847694e91 Update annotations for GdkDisplay
GdkDisplay is missing various annotations, and the introspection scanner
is complaining about it.
2017-12-21 19:13:28 +00:00
Matthias Clasen
fa27d171d0 Drop gdk_keymap_get_for_display
It has been replaced by gdk_display_get_keymap.
2017-12-15 07:46:35 -05:00
Matthias Clasen
1012bbeecf Add gdk_display_get_keymap
This is just a better name for gdk_keymap_get_for_display.
2017-12-15 06:53:13 -05:00
Benjamin Otte
5d70bbf4c4 display: Remove leftover old clipboard APIs 2017-12-14 13:35:32 +01:00
Benjamin Otte
65fcff87b2 gdk: Remove ability to request selection notifications
Without selections, that's kinda pointless.
2017-12-14 04:20:48 +01:00
Carlos Garnacho
2f65a2f5cc gdk: Make gdk_display_peek_event() Return a reference to the event
No need to copy it.
2017-12-14 01:05:48 +01:00
Carlos Garnacho
b9db0b55cb gdk: Refurbish GdkEvent struct hierarchy
Make all specific event structs contain a GdkEventAny, so the base
struct can be extended without modifying structs all over the place.
2017-12-14 00:58:32 +01:00
Benjamin Otte
c93ddf62c3 gdk: Clean up marshalers
Don't generate marshallers that are not needed.

Use the default ones if they exist.
2017-12-13 00:56:52 +01:00
Matthias Clasen
e94b9b9a62 gdk: A GdkClipboard API draft
This commit adds a GdkClipboard object which is intended to
replace GtkClipboard, eventually.
2017-12-03 05:43:24 +01:00
Matthias Clasen
cd3d2badf0 display: Drop the device_manager for good
This is now entirely the backends responsibility.
2017-11-25 11:04:14 -05:00
Matthias Clasen
903959301b display: Stop using devicemanager internally
We can just use the seats to find out about device removals.
2017-11-25 11:04:14 -05:00
Matthias Clasen
a4cd4535dc Don't mention GdkDeviceManager in docs
It is going away.
2017-11-25 11:04:14 -05:00
Matthias Clasen
0cfc812a5d Drop gdk_display_get_device_manager API
GdkDeviceManager is being replaced by GdkSeat.
2017-11-25 11:04:14 -05:00
Matthias Clasen
a129053ed9 gdk: Use G_PARAM_SPEC_STATIC_STRINGS throughout
This avoids some string copies at startup.
2017-11-17 21:38:08 -05:00
Matthias Clasen
c2f6208ce5 Add private api for setting cursor theme
This is implemented in multiple gdk backends,
and we can avoid and ugly ifdef cascade in gtk
by adding a vfunc for this.
2017-11-17 17:42:12 -05:00
Matthias Clasen
2d591cde78 Include gdk-private.h
This gives us access to private gdk api.
2017-11-17 16:34:04 -05:00
Matthias Clasen
1ec93bdda6 gdk: Move code around
Move the gdk_display functions to gdkdisplay.c.
They are misplaced in gdkevents.c.
2017-11-17 16:22:21 -05:00
Matthias Clasen
dbb18ad5d8 gdk: Add a private method to get a server timestamp
This is needed in the clipboard code. We don't make
it public, since that code is destined to eventually
live in gdk anyway.
2017-11-17 15:39:08 -05:00
Matthias Clasen
6263286c4a Drop gdkscreen.h
Nothing uses GdkScreen anymore, so we can get rid of it.
2017-11-17 13:54:04 -05:00
Benjamin Otte
f4ec6290f8 gdk: Remove gdk_flush()
If you need to flush a display, use gdk_display_flush().

There is never a need to flush displays you don't know about.
2017-11-17 08:36:35 +01:00
Matthias Clasen
30e6a4c29d Drop the generic error trap api
This is only implemented on X11, so we don't
need generic api for it.
2017-11-17 00:08:24 -05:00
Matthias Clasen
211f16d68b Drop gdk_notify_startup_complete
This function and its variant are just wrappers
around the display-specific function.
2017-11-16 22:45:52 -05:00
Matthias Clasen
baf40d35c5 Drop gdk_beep
This is an unnecessary wrapper around gdk_display_beep.
2017-11-16 22:10:26 -05:00
Matthias Clasen
20fab69c38 Drop gdk_display_get_root_window
This is no longer used.
2017-11-05 21:45:51 -05:00
Matthias Clasen
c16a0bd9b7 Drop gdk_display_get_toplevel_windows
Nothing uses this private api anymore, so we can drop it.
2017-11-05 18:39:01 -05:00
Matthias Clasen
8144d31ebe Stop talking about GdkScreen in the docs
This api is going away.
2017-11-01 19:44:28 -04:00
Matthias Clasen
7f0b5297c6 Drop gdk_display_get_default_screen
Also remove the backend implementations.
This api is no longer used.
2017-11-01 19:44:28 -04:00
Matthias Clasen
463fba18a6 Port to gdk_display_get_root_window
This is the replacement for the GdkScreen api of the same name.
2017-10-31 21:27:24 -04:00
Matthias Clasen
5cb5bdf1bc Add gdk_display_get_toplevel_windows
This is replacing the corresponding GdkScreen api, which
is going away. To implement this, we need to add a
get_root_window vfunc to GdkDisplay.
2017-10-31 20:29:48 -04:00
Matthias Clasen
2d6bd1ae6d Drop gdk_window_get_screen
This includes removing the GdkScreen argument from the
create_window_impl display vfunc.
2017-10-31 17:25:01 -04:00
Matthias Clasen
f9dacd6de0 use the GdkDisplay get_setting vfunc
Instead of calling the GdkScreen implementation, use our
own vfunc now.
2017-10-30 16:44:47 -04:00
Matthias Clasen
61d13b0f14 gdk: Add settings api to GdkDisplay
This commit adds gdk_display_get_setting and a ::setting-changed
signal, which will replace the settings event we use now. Note
that I've done away with the GdkSettingAction argument that the
event has, since we are not using it at all.
2017-10-30 09:21:47 -04:00
Timm Bäder
63eb3517be GdkDisplay: Add a private _emit_opened
So we don't have to use the slower g_signal_emit_by_name in startup
paths.
2017-10-10 09:49:35 +02:00
Carlos Garnacho
97139e4027 gdk: Remove remainings of fake crossing event delivery across touch
This was by all lights broken, and is basically an implementation detail
of the X11 backend since the pointer emulating touch just steals the pointer
cursor, so should be reimplemented there.
2017-09-19 18:40:51 +02:00
Carlos Garnacho
f3b0a3780e gdk: Coalesce 2 GdkWindow fields in GdkPointerWindowInfo struct
One used to point to the toplevel and the other to the client-side window
that the pointer pointed to. The latter was made to be like the former in
most places, so put those together, and fix the remaining cases where the
variable might not end up with a toplevel/native window.
2017-09-19 18:40:51 +02:00
Carlos Garnacho
c00567a64c gdk: Remove unused variable
It was supporting API that has been removed.
2017-09-19 18:40:51 +02:00
Carlos Garnacho
0317b0d18d gdk: Remove implicit touch grab accounting
This is not necessary now that there's no client-side windows to track.
The only removed piece that could make sense is emission of grab broken
events, but it's already an stretch since the semantics of those with
multi-touchpoint is unclear.

Anyhow, This should be fixed at the GTK level, while we let GDK deal with
seat/device level grabs.
2017-09-19 18:40:51 +02:00
Carlos Garnacho
44cb3ccfa1 gdk: Remove motion hints
Motion hints are now literally a thing of the past. Everything should be
using the full motion event stream.
2017-09-19 18:40:51 +02:00
Carlos Garnacho
3e1f672170 gdk: Drop generation of synthesized crossing events on grabs
GDK just needs to care about toplevels nowadays, which means these events
are already delivered from the windowing. We don't need to generate
intra-window crossing events ourselves.
2017-09-19 18:40:50 +02:00
Carlos Garnacho
a9988e18b0 gtk: Remove 2BUTTON and 3BUTTON events and event types
Those should be interpreted by widget-local gestures, not guessed at a
high level with no notions of the specific context. Users will want
GtkGestureMultiPress to replace these events.
2017-09-19 18:40:50 +02:00