summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2017-08-04 16:24:58 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2017-08-04 15:57:50 -0400
commit5807ac7b89c7f45d4635a3aad2c8008a975cc4e0 (patch)
tree2a25c0efd65b18a069ad71752ab97d7d07acd0c8
parent8ffae277b39f095cf37911a52e49de0f1f290609 (diff)
add proto
-rw-r--r--e-gadget.xml35
-rw-r--r--meson.build62
2 files changed, 74 insertions, 23 deletions
diff --git a/e-gadget.xml b/e-gadget.xml
new file mode 100644
index 0000000..f01463e
--- /dev/null
+++ b/e-gadget.xml
@@ -0,0 +1,35 @@
1<protocol name="e_gadget">
2
3 <interface name="e_gadget" version="1">
4 <enum name="orient">
5 <entry name="none" value="0"/>
6 <entry name="horizontal" value="1"/>
7 <entry name="vertical" value="2"/>
8 </enum>
9 <enum name="gravity">
10 <entry name="none" value="0"/>
11 <entry name="left" value="1"/>
12 <entry name="right" value="2"/>
13 <entry name="top" value="3"/>
14 <entry name="bottom" value="4"/>
15 <entry name="center" value="5"/>
16 </enum>
17 <enum name="anchor" bitfield="true">
18 <entry name="none" value="0"/>
19 <entry name="left" value="1"/>
20 <entry name="right" value="2"/>
21 <entry name="top" value="4"/>
22 <entry name="bottom" value="8"/>
23 </enum>
24 <event name="gadget_anchor">
25 <arg name="anchor" type="uint" enum="anchor"/>
26 </event>
27 <event name="gadget_orient">
28 <arg name="orient" type="uint" enum="orient"/>
29 </event>
30 <event name="gadget_gravity">
31 <arg name="gravity" type="uint" enum="gravity"/>
32 </event>
33 </interface>
34
35</protocol>
diff --git a/meson.build b/meson.build
index 9ff4094..82c6e3a 100644
--- a/meson.build
+++ b/meson.build
@@ -55,43 +55,43 @@ endif
55module_arch = '@0@-@1@-@2@'.format(host_os, host_machine.cpu_family(), release) 55module_arch = '@0@-@1@-@2@'.format(host_os, host_machine.cpu_family(), release)
56 56
57config_h = configuration_data() 57config_h = configuration_data()
58config_h.set('_GNU_SOURCE' , '1') 58config_h.set('_GNU_SOURCE', '1')
59config_h.set('_ALL_SOURCE' , '1') 59config_h.set('_ALL_SOURCE', '1')
60config_h.set('_POSIX_PTHREAD_SEMANTICS', '1') 60config_h.set('_POSIX_PTHREAD_SEMANTICS', '1')
61config_h.set('_TANDEM_SOURCE' , '1') 61config_h.set('_TANDEM_SOURCE', '1')
62config_h.set('__EXTENSIONS__' , '1') 62config_h.set('__EXTENSIONS__', '1')
63 63
64config_h.set_quoted('MODULE_ARCH' , module_arch) 64config_h.set_quoted('MODULE_ARCH', module_arch)
65config_h.set_quoted('PACKAGE' , meson.project_name()) 65config_h.set_quoted('PACKAGE', meson.project_name())
66config_h.set_quoted('PACKAGE_VERSION' , meson.project_version()) 66config_h.set_quoted('PACKAGE_VERSION', meson.project_version())
67config_h.set_quoted('VERSION' , meson.project_version()) 67config_h.set_quoted('VERSION', meson.project_version())
68config_h.set_quoted('PACKAGE_NAME' , meson.project_name()) 68config_h.set_quoted('PACKAGE_NAME', meson.project_name())
69config_h.set_quoted('BINDIR' , dir_bin) 69config_h.set_quoted('BINDIR', dir_bin)
70config_h.set_quoted('DATADIR' , dir_data) 70config_h.set_quoted('DATADIR', dir_data)
71 71
72if cc.has_function('setenv') == true 72if cc.has_function('setenv') == true
73 config_h.set('HAVE_SETENV' , '1') 73 config_h.set('HAVE_SETENV', '1')
74endif 74endif
75if cc.has_function('unsetenv') == true 75if cc.has_function('unsetenv') == true
76 config_h.set('HAVE_UNSETENV' , '1') 76 config_h.set('HAVE_UNSETENV', '1')
77endif 77endif
78if cc.has_function('clearenv') == true 78if cc.has_function('clearenv') == true
79 config_h.set('HAVE_CLEARENV' , '1') 79 config_h.set('HAVE_CLEARENV', '1')
80endif 80endif
81if cc.has_header('features.h') == true 81if cc.has_header('features.h') == true
82 config_h.set('HAVE_FEATURES_H' , '1') 82 config_h.set('HAVE_FEATURES_H', '1')
83endif 83endif
84if cc.has_header('sys/ptrace.h') == true 84if cc.has_header('sys/ptrace.h') == true
85 config_h.set('HAVE_SYS_PTRACE_H' , '1') 85 config_h.set('HAVE_SYS_PTRACE_H', '1')
86endif 86endif
87if cc.has_header('arpa/inet.h') == true 87if cc.has_header('arpa/inet.h') == true
88 config_h.set('HAVE_ARPA_INET_H' , '1') 88 config_h.set('HAVE_ARPA_INET_H', '1')
89endif 89endif
90if cc.has_header('netinet/in.h') == true 90if cc.has_header('netinet/in.h') == true
91 config_h.set('HAVE_NETINET_IN_H' , '1') 91 config_h.set('HAVE_NETINET_IN_H', '1')
92endif 92endif
93if cc.has_header('execinfo.h') == true 93if cc.has_header('execinfo.h') == true
94 config_h.set('HAVE_EXECINFO_H' , '1') 94 config_h.set('HAVE_EXECINFO_H', '1')
95elif cc.has_function('backtrace_symbols_fd', dependencies: 'execinfo') == false 95elif cc.has_function('backtrace_symbols_fd', dependencies: 'execinfo') == false
96 execinfo_dep = dependency('execinfo', required: false) 96 execinfo_dep = dependency('execinfo', required: false)
97endif 97endif
@@ -130,14 +130,30 @@ build_files = [
130 'src/desksanity.c' 130 'src/desksanity.c'
131] 131]
132 132
133configure_file(output : 'config.h',
134 install : false,
135 configuration: config_h)
136
137if dep_efl_wl.found() == true 133if dep_efl_wl.found() == true
138 build_files += 'src/runner.c' 134 build_files += 'src/runner.c'
135 config_h.set('HAVE_RUNNER', '1')
136
137 wayland_scanner = find_program('wayland-scanner')
138 gen_scanner_client = generator(wayland_scanner,
139 output: '@BASENAME@-client-protocol.h',
140 arguments: ['client-header', '@INPUT@', '@OUTPUT@'])
141 gen_scanner_impl = generator(wayland_scanner,
142 output: '@BASENAME@-protocol.c',
143 arguments: ['code', '@INPUT@', '@OUTPUT@'])
144 protos = [ 'e-gadget.xml']
145
146 foreach proto: protos
147 build_files += gen_scanner_client.process(proto)
148 build_files += gen_scanner_impl.process(proto)
149 endforeach
139endif 150endif
140 151
152
153configure_file(output : 'config.h',
154 install : false,
155 configuration: config_h)
156
141shared_module('desksanity', build_files, 157shared_module('desksanity', build_files,
142 include_directories: include_directories(['src']), 158 include_directories: include_directories(['src']),
143 name_prefix: '', 159 name_prefix: '',