2020-01-24 18:33:13 +00:00
|
|
|
subdir('cursor')
|
|
|
|
|
2017-03-20 00:36:38 +00:00
|
|
|
gdk_wayland_sources = files([
|
|
|
|
'gdkapplaunchcontext-wayland.c',
|
2018-04-12 14:48:31 +00:00
|
|
|
'gdkcairocontext-wayland.c',
|
2017-12-02 20:54:36 +00:00
|
|
|
'gdkclipboard-wayland.c',
|
2017-03-20 00:36:38 +00:00
|
|
|
'gdkcursor-wayland.c',
|
|
|
|
'gdkdevice-wayland.c',
|
|
|
|
'gdkdisplay-wayland.c',
|
2018-07-04 07:28:43 +00:00
|
|
|
'gdkdrag-wayland.c',
|
2018-05-30 02:04:51 +00:00
|
|
|
'gdkdrop-wayland.c',
|
2017-03-20 00:37:09 +00:00
|
|
|
'gdkeventsource.c',
|
2017-03-20 00:36:38 +00:00
|
|
|
'gdkglcontext-wayland.c',
|
|
|
|
'gdkkeys-wayland.c',
|
|
|
|
'gdkmonitor-wayland.c',
|
2017-12-03 04:39:08 +00:00
|
|
|
'gdkprimary-wayland.c',
|
2017-03-20 00:36:38 +00:00
|
|
|
'gdkvulkancontext-wayland.c',
|
2018-03-20 10:46:11 +00:00
|
|
|
'gdksurface-wayland.c',
|
2017-03-20 00:36:38 +00:00
|
|
|
'wm-button-layout-translation.c',
|
|
|
|
])
|
|
|
|
|
|
|
|
gdk_wayland_public_headers = files([
|
|
|
|
'gdkwaylanddevice.h',
|
|
|
|
'gdkwaylanddisplay.h',
|
|
|
|
'gdkwaylandglcontext.h',
|
|
|
|
'gdkwaylandmonitor.h',
|
2020-10-14 10:55:34 +00:00
|
|
|
'gdkwaylandseat.h',
|
|
|
|
'gdkwaylandsurface.h',
|
2017-03-20 00:36:38 +00:00
|
|
|
])
|
|
|
|
|
2019-05-06 18:09:03 +00:00
|
|
|
install_headers(gdk_wayland_public_headers, 'gdkwayland.h', subdir: 'gtk-4.0/gdk/wayland/')
|
2017-03-20 00:36:38 +00:00
|
|
|
|
|
|
|
gdk_wayland_deps = [
|
|
|
|
shmlib,
|
|
|
|
xkbdep,
|
|
|
|
wlclientdep,
|
|
|
|
wlprotocolsdep,
|
|
|
|
wlegldep,
|
|
|
|
]
|
|
|
|
|
2017-03-19 20:50:58 +00:00
|
|
|
wayland_scanner = find_program('wayland-scanner')
|
2016-09-10 18:40:02 +00:00
|
|
|
|
2017-04-26 14:16:21 +00:00
|
|
|
# Format:
|
|
|
|
# - protocol name
|
2017-12-18 12:00:36 +00:00
|
|
|
# - protocol stability ('private', 'stable' or 'unstable')
|
2017-04-26 14:16:21 +00:00
|
|
|
# - protocol version (if stability is 'unstable')
|
2017-03-19 20:50:58 +00:00
|
|
|
proto_sources = [
|
2017-12-18 12:00:36 +00:00
|
|
|
['gtk-shell', 'private', ],
|
2020-09-27 14:10:52 +00:00
|
|
|
['primary-selection', 'unstable', 'v1', ],
|
2017-04-26 14:16:21 +00:00
|
|
|
['pointer-gestures', 'unstable', 'v1', ],
|
|
|
|
['xdg-shell', 'unstable', 'v6', ],
|
2017-12-18 12:00:36 +00:00
|
|
|
['xdg-shell', 'stable', ],
|
2017-04-26 14:16:21 +00:00
|
|
|
['xdg-foreign', 'unstable', 'v1', ],
|
|
|
|
['tablet', 'unstable', 'v2', ],
|
2017-04-29 00:35:51 +00:00
|
|
|
['keyboard-shortcuts-inhibit', 'unstable', 'v1', ],
|
2017-12-18 12:00:36 +00:00
|
|
|
['server-decoration', 'private' ],
|
2019-04-15 14:42:45 +00:00
|
|
|
['xdg-output', 'unstable', 'v1', ],
|
2020-07-14 19:18:03 +00:00
|
|
|
['idle-inhibit', 'unstable', 'v1', ],
|
2020-12-02 16:22:41 +00:00
|
|
|
['xdg-activation', 'staging', 'v1', ],
|
2017-03-19 20:50:58 +00:00
|
|
|
]
|
2016-09-10 18:40:02 +00:00
|
|
|
|
2017-03-20 11:44:42 +00:00
|
|
|
gdk_wayland_gen_headers = []
|
|
|
|
|
2017-04-26 14:16:21 +00:00
|
|
|
foreach p: proto_sources
|
|
|
|
proto_name = p.get(0)
|
|
|
|
proto_stability = p.get(1)
|
|
|
|
|
|
|
|
if proto_stability == 'stable'
|
2017-12-18 12:00:36 +00:00
|
|
|
output_base = proto_name
|
2020-02-16 19:09:42 +00:00
|
|
|
input = files(join_paths(wlproto_dir, '@0@/@1@/@2@.xml'.format(proto_stability, proto_name, output_base)))
|
2020-12-02 16:22:41 +00:00
|
|
|
elif proto_stability == 'staging'
|
|
|
|
proto_version = p.get(2)
|
|
|
|
output_base = '@0@-@1@'.format(proto_name, proto_version)
|
2022-02-10 18:21:28 +00:00
|
|
|
input = files(join_paths(wlproto_dir, '@0@/@1@/@2@.xml'.format(proto_stability, proto_name, output_base)))
|
2017-12-18 12:00:36 +00:00
|
|
|
elif proto_stability == 'private'
|
2017-04-26 14:16:21 +00:00
|
|
|
output_base = proto_name
|
2020-02-16 19:09:42 +00:00
|
|
|
input = files('protocol/@0@.xml'.format(proto_name))
|
2017-04-26 14:16:21 +00:00
|
|
|
else
|
|
|
|
proto_version = p.get(2)
|
|
|
|
output_base = '@0@-@1@-@2@'.format(proto_name, proto_stability, proto_version)
|
2020-02-16 19:09:42 +00:00
|
|
|
input = files(join_paths(wlproto_dir, '@0@/@1@/@2@.xml'.format(proto_stability, proto_name, output_base)))
|
2017-04-26 14:16:21 +00:00
|
|
|
endif
|
2016-09-10 18:40:02 +00:00
|
|
|
|
2017-03-20 11:44:42 +00:00
|
|
|
gdk_wayland_gen_headers += custom_target('@0@ client header'.format(output_base),
|
2020-12-15 12:31:38 +00:00
|
|
|
input: input,
|
|
|
|
output: '@0@-client-protocol.h'.format(output_base),
|
|
|
|
command: [
|
|
|
|
wayland_scanner,
|
|
|
|
'client-header',
|
|
|
|
'@INPUT@', '@OUTPUT@',
|
|
|
|
],
|
|
|
|
)
|
2016-09-10 18:40:02 +00:00
|
|
|
|
2017-03-20 00:36:38 +00:00
|
|
|
gdk_wayland_sources += custom_target('@0@ source'.format(output_base),
|
2020-12-15 12:31:38 +00:00
|
|
|
input: input,
|
|
|
|
output: '@0@-protocol.c'.format(output_base),
|
|
|
|
command: [
|
|
|
|
wayland_scanner,
|
|
|
|
'private-code',
|
|
|
|
'@INPUT@', '@OUTPUT@',
|
|
|
|
],
|
|
|
|
)
|
2017-03-19 20:50:58 +00:00
|
|
|
endforeach
|
2017-03-20 00:37:09 +00:00
|
|
|
|
2017-03-30 23:15:08 +00:00
|
|
|
libgdk_wayland = static_library('gdk-wayland',
|
2020-12-15 12:31:38 +00:00
|
|
|
sources: [
|
|
|
|
gdk_wayland_sources,
|
|
|
|
gdk_wayland_gen_headers,
|
|
|
|
gdkconfig,
|
|
|
|
gdkenum_h,
|
|
|
|
],
|
|
|
|
include_directories: [ confinc, gdkinc, ],
|
|
|
|
c_args: [
|
|
|
|
'-DGTK_COMPILATION',
|
|
|
|
'-DG_LOG_DOMAIN="Gdk"',
|
|
|
|
] + common_cflags,
|
|
|
|
link_with: [ libwayland_cursor, ],
|
|
|
|
dependencies: [ gdk_deps, gdk_wayland_deps ],
|
|
|
|
)
|