summaryrefslogtreecommitdiff
path: root/gdk/broadway
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2019-03-13 16:27:36 +0800
committerChristoph Reiter <creiter@src.gnome.org>2019-04-11 16:45:36 +0200
commitb0a31fefd7be8fa167cff87f472fd7ddbd8c9257 (patch)
treebb6be36f2a65390f0f9dee28ea34d5c840d1c8c1 /gdk/broadway
parent4da82356bc71dd87e25041779b5fbe15da07e892 (diff)
downloadgtk+-b0a31fefd7be8fa167cff87f472fd7ddbd8c9257.tar.gz
meson: Fix Broadway builds
Make sure the source files are in line with GTK+-3.x Broadway backend sources.
Diffstat (limited to 'gdk/broadway')
-rw-r--r--gdk/broadway/gen-c-array.py21
-rw-r--r--gdk/broadway/meson.build7
2 files changed, 25 insertions, 3 deletions
diff --git a/gdk/broadway/gen-c-array.py b/gdk/broadway/gen-c-array.py
new file mode 100644
index 0000000000..afffda34e5
--- /dev/null
+++ b/gdk/broadway/gen-c-array.py
@@ -0,0 +1,21 @@
+#!/usr/bin/env python3
+
+import argparse
+import sys
+
+parser = argparse.ArgumentParser()
+parser.add_argument('--array-name', help='The name of the array variable')
+parser.add_argument('--output', metavar='FILE', help='Output file',
+ type=argparse.FileType('w'),
+ default=sys.stdout)
+parser.add_argument('input', metavar='FILE', help='The input file',
+ type=argparse.FileType('r'))
+
+args = parser.parse_args()
+
+args.output.write('static const char {}[] = {{\n'.format(args.array_name))
+for line in args.input:
+ for ch in line:
+ args.output.write(' 0x{:02x},\n'.format(ord(ch)))
+
+args.output.write('};')
diff --git a/gdk/broadway/meson.build b/gdk/broadway/meson.build
index 57e3488786..1e2e3044af 100644
--- a/gdk/broadway/meson.build
+++ b/gdk/broadway/meson.build
@@ -19,9 +19,10 @@ gdk_broadway_sources = files(
gdk_broadway_public_headers = files(
'gdkbroadwaydisplay.h',
- 'gdkbroadwaysurface.h',
+ 'gdkbroadwaywindow.h',
'gdkbroadwaycursor.h',
'gdkbroadwaymonitor.h',
+ 'gdkbroadwayvisual.h',
)
# Broadway backend headers aren't installed it seems
@@ -67,11 +68,11 @@ libgdk_broadway = static_library('gdk-broadway',
# gtk4-broadwayd
-broadwayd_syslib = os_win32 ? find_library('ws2_32') : shmlib
+broadwayd_syslib = os_win32 ? cc.find_library('ws2_32') : shmlib
executable('broadwayd',
clienthtml_h, broadwayjs_h,
- 'broadwayd.c', 'broadway-server.c', 'broadway-output.c',
+ 'broadwayd.c', 'broadway-server.c', 'broadway-buffer.c', 'broadway-output.c',
include_directories: [confinc, gdkinc, include_directories('.')],
c_args: ['-DGDK_COMPILATION', '-DG_LOG_DOMAIN="Gdk"', ],
dependencies : [broadwayd_syslib, gdk_deps],