meson.build 33.5 KB
Newer Older
1
subdir('a11y')
Emmanuele Bassi's avatar
Emmanuele Bassi committed
2
3
4
subdir('deprecated')
subdir('inspector')

5
6
7
8
9
10
11
12
13
gtk_cargs = [
  '-DGTK_COMPILATION',
  '-DG_LOG_DOMAIN="Gtk"',
  '-DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED',
  '-DGTK_BINARY_VERSION="@0@"'.format(gtk_binary_version),
  '-DGTK_HOST="@0@"'.format(host_machine.system()),
  '-DGTK_DATA_PREFIX="@0@"'.format(gtk_prefix),
]

Emmanuele Bassi's avatar
Emmanuele Bassi committed
14
15
16
# List of sources that do not contain public API, and should not be
# introspected
gtk_private_sources = files([
Emmanuele Bassi's avatar
Emmanuele Bassi committed
17
  'fnmatch.c',
Matthias Clasen's avatar
Matthias Clasen committed
18
  'gdkpixbufutils.c',
19
  'gsettings-mapping.c',
20
  'gtkaccessibleattributeset.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
21
22
  'gtkaccessiblevalue.c',
  'gtkaccessiblevaluestatic.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
23
  'gtkactionhelper.c',
Timm Bäder's avatar
Timm Bäder committed
24
25
26
  'gtkactionmuxer.c',
  'gtkactionobservable.c',
  'gtkactionobserver.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
27
  'gtkallocatedbitmask.c',
Timm Bäder's avatar
Timm Bäder committed
28
  'gtkapplicationaccels.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
29
30
  'gtkapplicationimpl.c',
  'gtkbookmarksmanager.c',
Timm Bäder's avatar
Timm Bäder committed
31
  'gtkbuilder-menus.c',
32
  'gtkbuilderprecompile.c',
Benjamin Otte's avatar
Benjamin Otte committed
33
  'gtkbuiltinicon.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
34
35
36
  'gtkcellareaboxcontext.c',
  'gtkcoloreditor.c',
  'gtkcolorplane.c',
Matthias Clasen's avatar
Matthias Clasen committed
37
  'gtkcolorpicker.c',
Matthias Clasen's avatar
Matthias Clasen committed
38
  'gtkcolorpickerkwin.c',
39
  'gtkcolorpickerportal.c',
40
  'gtkcolorpickershell.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
41
42
  'gtkcolorscale.c',
  'gtkcolorswatch.c',
43
44
45
  'gtkcolumnlistitemfactory.c',
  'gtkcolumnviewcell.c',
  'gtkcolumnviewlayout.c',
Benjamin Otte's avatar
Benjamin Otte committed
46
  'gtkcolumnviewtitle.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
47
48
  'gtkconstraintexpression.c',
  'gtkconstraintsolver.c',
49
  'gtkconstraintvflparser.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
50
  'gtkcssanimatedstyle.c',
Timm Bäder's avatar
Timm Bäder committed
51
  'gtkcssanimation.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
52
53
54
  'gtkcssarrayvalue.c',
  'gtkcssbgsizevalue.c',
  'gtkcssbordervalue.c',
Timm Bäder's avatar
Timm Bäder committed
55
  'gtkcsscalcvalue.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
56
57
  'gtkcsscolorvalue.c',
  'gtkcsscornervalue.c',
Timm Bäder's avatar
Timm Bäder committed
58
  'gtkcssdimensionvalue.c',
59
  'gtkcssdynamic.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
60
  'gtkcsseasevalue.c',
Timm Bäder's avatar
Timm Bäder committed
61
  'gtkcssenumvalue.c',
62
  'gtkcssfiltervalue.c',
63
  'gtkcssfontfeaturesvalue.c',
64
  'gtkcssfontvariationsvalue.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
65
  'gtkcssimage.c',
66
  'gtkcssimageconic.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
67
  'gtkcssimagecrossfade.c',
Timm Bäder's avatar
Timm Bäder committed
68
  'gtkcssimagefallback.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
69
  'gtkcssimageicontheme.c',
70
  'gtkcssimageinvalid.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
71
  'gtkcssimagelinear.c',
72
  'gtkcssimagepaintable.c',
Timm Bäder's avatar
Timm Bäder committed
73
74
75
  'gtkcssimageradial.c',
  'gtkcssimagerecolor.c',
  'gtkcssimagescaled.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
76
77
78
79
80
  'gtkcssimageurl.c',
  'gtkcssimagevalue.c',
  'gtkcssinheritvalue.c',
  'gtkcssinitialvalue.c',
  'gtkcsskeyframes.c',
81
  'gtkcsslineheightvalue.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
82
83
84
  'gtkcsslookup.c',
  'gtkcssnode.c',
  'gtkcssnodedeclaration.c',
Timm Bäder's avatar
Timm Bäder committed
85
  'gtkcssnodestylecache.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
86
  'gtkcssnumbervalue.c',
Timm Bäder's avatar
Timm Bäder committed
87
  'gtkcsspalettevalue.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
88
89
90
91
92
93
94
  'gtkcsspositionvalue.c',
  'gtkcssrepeatvalue.c',
  'gtkcssselector.c',
  'gtkcssshadowvalue.c',
  'gtkcssshorthandproperty.c',
  'gtkcssshorthandpropertyimpl.c',
  'gtkcssstaticstyle.c',
Timm Bäder's avatar
Timm Bäder committed
95
96
97
  'gtkcssstringvalue.c',
  'gtkcssstyle.c',
  'gtkcssstylechange.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
98
99
100
101
102
103
  'gtkcssstyleproperty.c',
  'gtkcssstylepropertyimpl.c',
  'gtkcsstransformvalue.c',
  'gtkcsstransientnode.c',
  'gtkcsstransition.c',
  'gtkcsstypes.c',
Timm Bäder's avatar
Timm Bäder committed
104
  'gtkcssunsetvalue.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
105
106
  'gtkcssvalue.c',
  'gtkcsswidgetnode.c',
Benjamin Otte's avatar
Benjamin Otte committed
107
  'gtkdrop.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
108
109
110
111
112
113
114
  'gtkfilechooserentry.c',
  'gtkfilechoosererrorstack.c',
  'gtkfilechoosernativeportal.c',
  'gtkfilechooserutils.c',
  'gtkfilesystemmodel.c',
  'gtkgizmo.c',
  'gtkiconcache.c',
Matthias Clasen's avatar
Matthias Clasen committed
115
  'gtkiconcachevalidator.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
116
  'gtkiconhelper.c',
117
  'gtkjoinedmenu.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
118
119
120
121
122
  'gtkkineticscrolling.c',
  'gtkmagnifier.c',
  'gtkmenusectionbox.c',
  'gtkmenutracker.c',
  'gtkmenutrackeritem.c',
123
  'gtkpanedhandle.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
124
125
126
127
128
129
130
  'gtkpango.c',
  'gskpango.c',
  'gtkpathbar.c',
  'gtkplacessidebar.c',
  'gtkplacesview.c',
  'gtkplacesviewrow.c',
  'gtkpointerfocus.c',
131
  'gtkpopovercontent.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
132
133
134
  'gtkprintutils.c',
  'gtkprivate.c',
  'gtkprogresstracker.c',
135
  'gtkrbtree.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
136
  'gtkquery.c',
137
  'gtkscaler.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
138
139
  'gtksearchengine.c',
  'gtksearchenginemodel.c',
140
  'gtksecurememory.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
141
  'gtksizerequestcache.c',
Benjamin Otte's avatar
Benjamin Otte committed
142
  'gtksortkeys.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
143
144
145
146
  'gtkstyleanimation.c',
  'gtkstylecascade.c',
  'gtkstyleproperty.c',
  'gtktextbtree.c',
147
  'gtktexthistory.c',
148
  'gtktextviewchild.c',
149
  'timsort/gtktimsort.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
150
151
152
153
154
155
156
157
  'gtktrashmonitor.c',
  'gtktreedatalist.c',
])

# List of files that contain public API, and should be introspected
gtk_public_sources = files([
  'gtkaboutdialog.c',
  'gtkaccelgroup.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
158
  'gtkaccessible.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
159
160
161
162
163
164
165
166
167
168
169
  'gtkactionable.c',
  'gtkactionbar.c',
  'gtkadjustment.c',
  'gtkappchooser.c',
  'gtkappchooserbutton.c',
  'gtkappchooserdialog.c',
  'gtkappchooserwidget.c',
  'gtkapplication.c',
  'gtkapplicationwindow.c',
  'gtkaspectframe.c',
  'gtkassistant.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
170
  'gtkatcontext.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
171
  'gtkbinlayout.c',
Benjamin Otte's avatar
Benjamin Otte committed
172
  'gtkbitset.c',
Benjamin Otte's avatar
Benjamin Otte committed
173
  'gtkboolfilter.c',
Matthias Clasen's avatar
Matthias Clasen committed
174
  'gtkbookmarklist.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
175
  'gtkborder.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
176
  'gtkboxlayout.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
177
178
179
  'gtkbox.c',
  'gtkbuildable.c',
  'gtkbuilder.c',
180
  'gtkbuilderlistitemfactory.c',
181
  'gtkbuilderparser.c',
Benjamin Otte's avatar
Benjamin Otte committed
182
  'gtkbuilderscope.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
  'gtkbutton.c',
  'gtkcalendar.c',
  'gtkcellarea.c',
  'gtkcellareabox.c',
  'gtkcellareacontext.c',
  'gtkcelleditable.c',
  'gtkcelllayout.c',
  'gtkcellrenderer.c',
  'gtkcellrendereraccel.c',
  'gtkcellrenderercombo.c',
  'gtkcellrendererpixbuf.c',
  'gtkcellrendererprogress.c',
  'gtkcellrendererspin.c',
  'gtkcellrendererspinner.c',
  'gtkcellrenderertext.c',
  'gtkcellrenderertoggle.c',
  'gtkcellview.c',
  'gtkcenterbox.c',
Timm Bäder's avatar
Timm Bäder committed
201
  'gtkcenterlayout.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
202
203
204
205
206
207
  'gtkcheckbutton.c',
  'gtkcolorbutton.c',
  'gtkcolorchooser.c',
  'gtkcolorchooserdialog.c',
  'gtkcolorchooserwidget.c',
  'gtkcolorutils.c',
Benjamin Otte's avatar
Benjamin Otte committed
208
209
  'gtkcolumnview.c',
  'gtkcolumnviewcolumn.c',
Matthias Clasen's avatar
Matthias Clasen committed
210
  'gtkcolumnviewsorter.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
211
212
213
  'gtkcombobox.c',
  'gtkcomboboxtext.c',
  'gtkcomposetable.c',
Matthias Clasen's avatar
Matthias Clasen committed
214
  'gtkconstraintguide.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
215
216
  'gtkconstraintlayout.c',
  'gtkconstraint.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
217
  'gtkcssprovider.c',
Benjamin Otte's avatar
Benjamin Otte committed
218
  'gtkcustomfilter.c',
219
  'gtkcustomlayout.c',
Matthias Clasen's avatar
Matthias Clasen committed
220
  'gtkcustomsorter.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
221
  'gtkdialog.c',
Benjamin Otte's avatar
Benjamin Otte committed
222
  'gtkdirectorylist.c',
223
  'gtkdragicon.c',
Timm Bäder's avatar
Timm Bäder committed
224
  'gtkdragsource.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
225
  'gtkdrawingarea.c',
Benjamin Otte's avatar
Benjamin Otte committed
226
  'gtkdropcontrollermotion.c',
Benjamin Otte's avatar
Benjamin Otte committed
227
228
  'gtkdroptarget.c',
  'gtkdroptargetasync.c',
Matthias Clasen's avatar
Matthias Clasen committed
229
  'gtkdropdown.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
230
  'gtkeditable.c',
231
  'gtkeditablelabel.c',
Matthias Clasen's avatar
Matthias Clasen committed
232
  'gtkemojichooser.c',
233
  'gtkemojicompletion.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
234
235
236
237
  'gtkentry.c',
  'gtkentrybuffer.c',
  'gtkentrycompletion.c',
  'gtkeventcontroller.c',
238
  'gtkeventcontrollerfocus.c',
239
240
  'gtkeventcontrollerkey.c',
  'gtkeventcontrollerlegacy.c',
241
  'gtkeventcontrollermotion.c',
242
  'gtkeventcontrollerscroll.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
243
  'gtkexpander.c',
Benjamin Otte's avatar
Benjamin Otte committed
244
  'gtkexpression.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
245
246
  'gtkfilechooser.c',
  'gtkfilechooserdialog.c',
Timm Bäder's avatar
Timm Bäder committed
247
  'gtkfilechoosernative.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
248
249
  'gtkfilechooserwidget.c',
  'gtkfilefilter.c',
Benjamin Otte's avatar
Benjamin Otte committed
250
  'gtkfilter.c',
Benjamin Otte's avatar
Benjamin Otte committed
251
  'gtkfilterlistmodel.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
252
  'gtkfixed.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
253
  'gtkfixedlayout.c',
Benjamin Otte's avatar
Benjamin Otte committed
254
  'gtkflattenlistmodel.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
255
256
257
258
259
260
261
262
263
264
  'gtkflowbox.c',
  'gtkfontbutton.c',
  'gtkfontchooser.c',
  'gtkfontchooserdialog.c',
  'gtkfontchooserutils.c',
  'gtkfontchooserwidget.c',
  'gtkframe.c',
  'gtkgesture.c',
  'gtkgesturedrag.c',
  'gtkgesturelongpress.c',
265
  'gtkgestureclick.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
266
267
268
  'gtkgesturepan.c',
  'gtkgesturerotate.c',
  'gtkgesturesingle.c',
Carlos Garnacho's avatar
Carlos Garnacho committed
269
  'gtkgesturestylus.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
270
271
272
273
  'gtkgestureswipe.c',
  'gtkgesturezoom.c',
  'gtkglarea.c',
  'gtkgrid.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
274
  'gtkgridlayout.c',
275
  'gtkgridview.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
276
277
278
279
  'gtkheaderbar.c',
  'gtkicontheme.c',
  'gtkiconview.c',
  'gtkimage.c',
Timm Bäder's avatar
Timm Bäder committed
280
  'gtkimagedefinition.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
281
282
283
284
285
  'gtkimcontext.c',
  'gtkimcontextsimple.c',
  'gtkimmodule.c',
  'gtkimmulticontext.c',
  'gtkinfobar.c',
Benjamin Otte's avatar
Benjamin Otte committed
286
  'gtkinscription.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
287
  'gtklabel.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
288
  'gtklayoutchild.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
289
  'gtklayoutmanager.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
290
  'gtklevelbar.c',
Benjamin Otte's avatar
Benjamin Otte committed
291
  'gtklistbase.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
292
293
  'gtklinkbutton.c',
  'gtklistbox.c',
Benjamin Otte's avatar
Benjamin Otte committed
294
  'gtklistitem.c',
295
  'gtklistitemfactory.c',
296
  'gtklistitemmanager.c',
Benjamin Otte's avatar
Benjamin Otte committed
297
  'gtklistitemwidget.c',
298
  'gtklistlistmodel.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
299
  'gtkliststore.c',
300
  'gtklistview.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
301
  'gtklockbutton.c',
Timm Bäder's avatar
Timm Bäder committed
302
  'gtkmain.c',
Benjamin Otte's avatar
Benjamin Otte committed
303
  'gtkmaplistmodel.c',
Benjamin Otte's avatar
Benjamin Otte committed
304
  'gtkmediacontrols.c',
Benjamin Otte's avatar
Benjamin Otte committed
305
  'gtkmediafile.c',
Benjamin Otte's avatar
Benjamin Otte committed
306
  'gtkmediastream.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
307
308
309
310
311
  'gtkmenubutton.c',
  'gtkmessagedialog.c',
  'gtkmodelbutton.c',
  'gtkmodules.c',
  'gtkmountoperation.c',
312
  'gtkmultifilter.c',
Matthias Clasen's avatar
Matthias Clasen committed
313
  'gtkmultiselection.c',
Matthias Clasen's avatar
Matthias Clasen committed
314
  'gtkmultisorter.c',
Timm Bäder's avatar
Timm Bäder committed
315
  'gtknativedialog.c',
316
  'gtknomediafile.c',
Benjamin Otte's avatar
Benjamin Otte committed
317
  'gtknoselection.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
318
  'gtknotebook.c',
Matthias Clasen's avatar
Matthias Clasen committed
319
  'gtknumericsorter.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
320
321
  'gtkorientable.c',
  'gtkoverlay.c',
322
  'gtkoverlaylayout.c',
Timm Bäder's avatar
Timm Bäder committed
323
  'gtkpadcontroller.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
324
325
326
  'gtkpagesetup.c',
  'gtkpaned.c',
  'gtkpapersize.c',
Matthias Clasen's avatar
Matthias Clasen committed
327
  'gtkpasswordentry.c',
328
  'gtkpasswordentrybuffer.c',
Benjamin Otte's avatar
Benjamin Otte committed
329
  'gtkpicture.c',
Timm Bäder's avatar
Timm Bäder committed
330
331
  'gtkpopover.c',
  'gtkpopovermenu.c',
332
  'gtkpopovermenubar.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
333
334
335
336
337
  'gtkprintcontext.c',
  'gtkprintoperation.c',
  'gtkprintoperationpreview.c',
  'gtkprintsettings.c',
  'gtkprogressbar.c',
Benjamin Otte's avatar
Benjamin Otte committed
338
  'gtkpropertylookuplistmodel.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
339
  'gtkrange.c',
340
  'gtktreerbtree.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
341
342
343
344
345
  'gtkrecentmanager.c',
  'gtkrender.c',
  'gtkrenderbackground.c',
  'gtkrenderborder.c',
  'gtkrendericon.c',
346
  'gtkrendernodepaintable.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
347
  'gtkrevealer.c',
Benjamin Otte's avatar
Benjamin Otte committed
348
  'gtkroot.c',
Matthias Clasen's avatar
Matthias Clasen committed
349
  'gtknative.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
350
351
352
353
354
355
  'gtkroundedbox.c',
  'gtkscale.c',
  'gtkscalebutton.c',
  'gtkscrollable.c',
  'gtkscrollbar.c',
  'gtkscrolledwindow.c',
Timm Bäder's avatar
Timm Bäder committed
356
357
  'gtksearchbar.c',
  'gtksearchentry.c',
Matthias Clasen's avatar
Matthias Clasen committed
358
  'gtkselectionfiltermodel.c',
Benjamin Otte's avatar
Benjamin Otte committed
359
  'gtkselectionmodel.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
360
361
  'gtkseparator.c',
  'gtksettings.c',
Benjamin Otte's avatar
Benjamin Otte committed
362
  'gtkshortcut.c',
363
  'gtkshortcutaction.c',
Benjamin Otte's avatar
Benjamin Otte committed
364
  'gtkshortcutcontroller.c',
Timm Bäder's avatar
Timm Bäder committed
365
  'gtkshortcutlabel.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
366
  'gtkshortcutmanager.c',
Timm Bäder's avatar
Timm Bäder committed
367
368
369
370
  'gtkshortcutsgroup.c',
  'gtkshortcutssection.c',
  'gtkshortcutsshortcut.c',
  'gtkshortcutswindow.c',
371
  'gtkshortcuttrigger.c',
Timm Bäder's avatar
Timm Bäder committed
372
  'gtkshow.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
373
  'gtksidebarrow.c',
Benjamin Otte's avatar
Benjamin Otte committed
374
  'gtksignallistitemfactory.c',
Benjamin Otte's avatar
Benjamin Otte committed
375
  'gtksingleselection.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
376
377
  'gtksizegroup.c',
  'gtksizerequest.c',
Benjamin Otte's avatar
Benjamin Otte committed
378
  'gtkslicelistmodel.c',
379
  'gtksnapshot.c',
Matthias Clasen's avatar
Matthias Clasen committed
380
  'gtksorter.c',
Benjamin Otte's avatar
Benjamin Otte committed
381
382
  'gtksortlistmodel.c',
  'gtkspinbutton.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
383
384
  'gtkspinner.c',
  'gtkstack.c',
Timm Bäder's avatar
Timm Bäder committed
385
  'gtkstacksidebar.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
386
387
  'gtkstackswitcher.c',
  'gtkstatusbar.c',
Benjamin Otte's avatar
Benjamin Otte committed
388
  'gtkstringfilter.c',
389
  'gtkstringlist.c',
Matthias Clasen's avatar
Matthias Clasen committed
390
  'gtkstringsorter.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
391
392
393
  'gtkstylecontext.c',
  'gtkstyleprovider.c',
  'gtkswitch.c',
394
  'gtksymbolicpaintable.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
395
  'gtktestatcontext.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
396
  'gtktestutils.c',
Matthias Clasen's avatar
Matthias Clasen committed
397
  'gtktext.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
398
399
400
401
402
403
  'gtktextattributes.c',
  'gtktextbuffer.c',
  'gtktextchild.c',
  'gtktexthandle.c',
  'gtktextiter.c',
  'gtktextlayout.c',
404
  'gtktextlinedisplaycache.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
405
406
407
408
409
410
411
412
413
  'gtktextmark.c',
  'gtktextsegment.c',
  'gtktexttag.c',
  'gtktexttagtable.c',
  'gtktexttypes.c',
  'gtktextutil.c',
  'gtktextview.c',
  'gtktogglebutton.c',
  'gtktooltip.c',
Timm Bäder's avatar
Timm Bäder committed
414
  'gtktooltipwindow.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
415
  'gtktreednd.c',
Benjamin Otte's avatar
Benjamin Otte committed
416
  'gtktreeexpander.c',
Benjamin Otte's avatar
Benjamin Otte committed
417
  'gtktreelistmodel.c',
Matthias Clasen's avatar
Matthias Clasen committed
418
  'gtktreelistrowsorter.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
419
420
421
  'gtktreemodel.c',
  'gtktreemodelfilter.c',
  'gtktreemodelsort.c',
422
  'gtktreepopover.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
423
424
425
426
427
  'gtktreeselection.c',
  'gtktreesortable.c',
  'gtktreestore.c',
  'gtktreeview.c',
  'gtktreeviewcolumn.c',
428
  'gtkversion.c',
Benjamin Otte's avatar
Benjamin Otte committed
429
  'gtkvideo.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
430
  'gtkviewport.c',
Timm Bäder's avatar
Timm Bäder committed
431
  'gtkvolumebutton.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
432
433
  'gtkwidget.c',
  'gtkwidgetfocus.c',
Benjamin Otte's avatar
Benjamin Otte committed
434
  'gtkwidgetpaintable.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
435
  'gtkwindow.c',
Alexander Mikhaylenko's avatar
Alexander Mikhaylenko committed
436
  'gtkwindowcontrols.c',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
437
  'gtkwindowgroup.c',
Alexander Mikhaylenko's avatar
Alexander Mikhaylenko committed
438
  'gtkwindowhandle.c',
Timm Bäder's avatar
Timm Bäder committed
439
])
Emmanuele Bassi's avatar
Emmanuele Bassi committed
440

Timm Bäder's avatar
Timm Bäder committed
441
gtk_private_type_headers = files([
Timm Bäder's avatar
Timm Bäder committed
442
443
  'gtkcsstypesprivate.h',
  'gtktexthandleprivate.h',
444
  'gtkplacessidebarprivate.h',
Timm Bäder's avatar
Timm Bäder committed
445
])
Timm Bäder's avatar
Timm Bäder committed
446

Timm Bäder's avatar
Timm Bäder committed
447
gtk_public_headers = files([
Timm Bäder's avatar
Timm Bäder committed
448
449
  'gtkaboutdialog.h',
  'gtkaccelgroup.h',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
450
  'gtkaccessible.h',
Timm Bäder's avatar
Timm Bäder committed
451
452
453
454
455
456
457
458
459
460
461
  'gtkactionable.h',
  'gtkactionbar.h',
  'gtkadjustment.h',
  'gtkappchooser.h',
  'gtkappchooserbutton.h',
  'gtkappchooserdialog.h',
  'gtkappchooserwidget.h',
  'gtkapplication.h',
  'gtkapplicationwindow.h',
  'gtkaspectframe.h',
  'gtkassistant.h',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
462
  'gtkatcontext.h',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
463
  'gtkbinlayout.h',
Benjamin Otte's avatar
Benjamin Otte committed
464
  'gtkbitset.h',
Matthias Clasen's avatar
Matthias Clasen committed
465
  'gtkbookmarklist.h',
Benjamin Otte's avatar
Benjamin Otte committed
466
  'gtkboolfilter.h',
Timm Bäder's avatar
Timm Bäder committed
467
468
  'gtkborder.h',
  'gtkbox.h',
469
  'gtkboxlayout.h',
Timm Bäder's avatar
Timm Bäder committed
470
  'gtkbuildable.h',
Timm Bäder's avatar
Timm Bäder committed
471
  'gtkbuilder.h',
472
  'gtkbuilderlistitemfactory.h',
Benjamin Otte's avatar
Benjamin Otte committed
473
  'gtkbuilderscope.h',
Timm Bäder's avatar
Timm Bäder committed
474
475
  'gtkbutton.h',
  'gtkcalendar.h',
Timm Bäder's avatar
Timm Bäder committed
476
  'gtkcenterbox.h',
Timm Bäder's avatar
Timm Bäder committed
477
  'gtkcenterlayout.h',
Timm Bäder's avatar
Timm Bäder committed
478
479
  'gtkcellarea.h',
  'gtkcellareabox.h',
Timm Bäder's avatar
Timm Bäder committed
480
  'gtkcellareacontext.h',
Timm Bäder's avatar
Timm Bäder committed
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
  'gtkcelleditable.h',
  'gtkcelllayout.h',
  'gtkcellrenderer.h',
  'gtkcellrendereraccel.h',
  'gtkcellrenderercombo.h',
  'gtkcellrendererpixbuf.h',
  'gtkcellrendererprogress.h',
  'gtkcellrendererspin.h',
  'gtkcellrendererspinner.h',
  'gtkcellrenderertext.h',
  'gtkcellrenderertoggle.h',
  'gtkcellview.h',
  'gtkcheckbutton.h',
  'gtkcolorbutton.h',
  'gtkcolorchooser.h',
  'gtkcolorchooserdialog.h',
Timm Bäder's avatar
Timm Bäder committed
497
  'gtkcolorchooserwidget.h',
Timm Bäder's avatar
Timm Bäder committed
498
  'gtkcolorutils.h',
Benjamin Otte's avatar
Benjamin Otte committed
499
500
  'gtkcolumnview.h',
  'gtkcolumnviewcolumn.h',
Timm Bäder's avatar
Timm Bäder committed
501
502
  'gtkcombobox.h',
  'gtkcomboboxtext.h',
503
  'gtkconstraintguide.h',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
504
505
  'gtkconstraintlayout.h',
  'gtkconstraint.h',
Timm Bäder's avatar
Timm Bäder committed
506
  'gtkcssprovider.h',
Benjamin Otte's avatar
Benjamin Otte committed
507
  'gtkcustomfilter.h',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
508
  'gtkcustomlayout.h',
Matthias Clasen's avatar
Matthias Clasen committed
509
  'gtkcustomsorter.h',
Timm Bäder's avatar
Timm Bäder committed
510
511
  'gtkdebug.h',
  'gtkdialog.h',
Benjamin Otte's avatar
Benjamin Otte committed
512
  'gtkdirectorylist.h',
513
  'gtkdragicon.h',
Timm Bäder's avatar
Timm Bäder committed
514
515
  'gtkdragsource.h',
  'gtkdrawingarea.h',
Benjamin Otte's avatar
Benjamin Otte committed
516
  'gtkdropcontrollermotion.h',
Benjamin Otte's avatar
Benjamin Otte committed
517
518
  'gtkdroptarget.h',
  'gtkdroptargetasync.h',
Matthias Clasen's avatar
Matthias Clasen committed
519
  'gtkdropdown.h',
Timm Bäder's avatar
Timm Bäder committed
520
  'gtkeditable.h',
521
  'gtkeditablelabel.h',
522
  'gtkemojichooser.h',
Timm Bäder's avatar
Timm Bäder committed
523
524
525
526
527
  'gtkentry.h',
  'gtkentrybuffer.h',
  'gtkentrycompletion.h',
  'gtkenums.h',
  'gtkeventcontroller.h',
528
  'gtkeventcontrollerfocus.h',
529
  'gtkeventcontrollerkey.h',
530
  'gtkeventcontrollerscroll.h',
531
  'gtkeventcontrollermotion.h',
532
  'gtkeventcontrollerlegacy.h',
Timm Bäder's avatar
Timm Bäder committed
533
  'gtkexpander.h',
Benjamin Otte's avatar
Benjamin Otte committed
534
  'gtkexpression.h',
Timm Bäder's avatar
Timm Bäder committed
535
536
537
538
539
  'gtkfilechooser.h',
  'gtkfilechooserdialog.h',
  'gtkfilechoosernative.h',
  'gtkfilechooserwidget.h',
  'gtkfilefilter.h',
Benjamin Otte's avatar
Benjamin Otte committed
540
  'gtkfilter.h',
Benjamin Otte's avatar
Benjamin Otte committed
541
  'gtkfilterlistmodel.h',
Timm Bäder's avatar
Timm Bäder committed
542
  'gtkfixed.h',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
543
  'gtkfixedlayout.h',
Benjamin Otte's avatar
Benjamin Otte committed
544
  'gtkflattenlistmodel.h',
Timm Bäder's avatar
Timm Bäder committed
545
546
547
548
549
550
551
552
553
  'gtkflowbox.h',
  'gtkfontbutton.h',
  'gtkfontchooser.h',
  'gtkfontchooserdialog.h',
  'gtkfontchooserwidget.h',
  'gtkframe.h',
  'gtkgesture.h',
  'gtkgesturedrag.h',
  'gtkgesturelongpress.h',
554
  'gtkgestureclick.h',
Timm Bäder's avatar
Timm Bäder committed
555
556
557
  'gtkgesturepan.h',
  'gtkgesturerotate.h',
  'gtkgesturesingle.h',
Carlos Garnacho's avatar
Carlos Garnacho committed
558
  'gtkgesturestylus.h',
Timm Bäder's avatar
Timm Bäder committed
559
560
561
562
  'gtkgestureswipe.h',
  'gtkgesturezoom.h',
  'gtkglarea.h',
  'gtkgrid.h',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
563
  'gtkgridlayout.h',
564
  'gtkgridview.h',
Timm Bäder's avatar
Timm Bäder committed
565
566
567
568
569
570
571
572
573
  'gtkheaderbar.h',
  'gtkicontheme.h',
  'gtkiconview.h',
  'gtkimage.h',
  'gtkimcontext.h',
  'gtkimcontextsimple.h',
  'gtkimmodule.h',
  'gtkimmulticontext.h',
  'gtkinfobar.h',
Benjamin Otte's avatar
Benjamin Otte committed
574
  'gtkinscription.h',
Timm Bäder's avatar
Timm Bäder committed
575
  'gtklabel.h',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
576
  'gtklayoutchild.h',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
577
  'gtklayoutmanager.h',
Timm Bäder's avatar
Timm Bäder committed
578
579
  'gtklevelbar.h',
  'gtklinkbutton.h',
Benjamin Otte's avatar
Benjamin Otte committed
580
  'gtklistbase.h',
Timm Bäder's avatar
Timm Bäder committed
581
  'gtklistbox.h',
Benjamin Otte's avatar
Benjamin Otte committed
582
  'gtklistitem.h',
583
  'gtklistitemfactory.h',
Timm Bäder's avatar
Timm Bäder committed
584
  'gtkliststore.h',
585
  'gtklistview.h',
Timm Bäder's avatar
Timm Bäder committed
586
587
  'gtklockbutton.h',
  'gtkmain.h',
Benjamin Otte's avatar
Benjamin Otte committed
588
  'gtkmaplistmodel.h',
Benjamin Otte's avatar
Benjamin Otte committed
589
  'gtkmediacontrols.h',
Benjamin Otte's avatar
Benjamin Otte committed
590
  'gtkmediafile.h',
Benjamin Otte's avatar
Benjamin Otte committed
591
  'gtkmediastream.h',
Timm Bäder's avatar
Timm Bäder committed
592
593
594
  'gtkmenubutton.h',
  'gtkmessagedialog.h',
  'gtkmountoperation.h',
595
  'gtkmultifilter.h',
Matthias Clasen's avatar
Matthias Clasen committed
596
  'gtkmultiselection.h',
Matthias Clasen's avatar
Matthias Clasen committed
597
  'gtkmultisorter.h',
598
  'gtknative.h',
Timm Bäder's avatar
Timm Bäder committed
599
  'gtknativedialog.h',
Benjamin Otte's avatar
Benjamin Otte committed
600
  'gtknoselection.h',
Timm Bäder's avatar
Timm Bäder committed
601
  'gtknotebook.h',
Matthias Clasen's avatar
Matthias Clasen committed
602
  'gtknumericsorter.h',
Timm Bäder's avatar
Timm Bäder committed
603
604
  'gtkorientable.h',
  'gtkoverlay.h',
605
  'gtkoverlaylayout.h',
Timm Bäder's avatar
Timm Bäder committed
606
607
608
609
  'gtkpadcontroller.h',
  'gtkpagesetup.h',
  'gtkpaned.h',
  'gtkpapersize.h',
Matthias Clasen's avatar
Matthias Clasen committed
610
  'gtkpasswordentry.h',
611
  'gtkpasswordentrybuffer.h',
Benjamin Otte's avatar
Benjamin Otte committed
612
  'gtkpicture.h',
Timm Bäder's avatar
Timm Bäder committed
613
614
  'gtkpopover.h',
  'gtkpopovermenu.h',
615
  'gtkpopovermenubar.h',
Timm Bäder's avatar
Timm Bäder committed
616
617
618
619
620
621
622
623
624
  'gtkprintcontext.h',
  'gtkprintoperation.h',
  'gtkprintoperationpreview.h',
  'gtkprintsettings.h',
  'gtkprogressbar.h',
  'gtkrange.h',
  'gtkrecentmanager.h',
  'gtkrender.h',
  'gtkrevealer.h',
Benjamin Otte's avatar
Benjamin Otte committed
625
  'gtkroot.h',
Timm Bäder's avatar
Timm Bäder committed
626
627
628
629
630
631
632
  'gtkscale.h',
  'gtkscalebutton.h',
  'gtkscrollable.h',
  'gtkscrollbar.h',
  'gtkscrolledwindow.h',
  'gtksearchbar.h',
  'gtksearchentry.h',
Matthias Clasen's avatar
Matthias Clasen committed
633
  'gtkselectionfiltermodel.h',
Benjamin Otte's avatar
Benjamin Otte committed
634
  'gtkselectionmodel.h',
Timm Bäder's avatar
Timm Bäder committed
635
636
  'gtkseparator.h',
  'gtksettings.h',
Benjamin Otte's avatar
Benjamin Otte committed
637
  'gtkshortcut.h',
638
  'gtkshortcutaction.h',
Benjamin Otte's avatar
Benjamin Otte committed
639
  'gtkshortcutcontroller.h',
Timm Bäder's avatar
Timm Bäder committed
640
  'gtkshortcutlabel.h',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
641
  'gtkshortcutmanager.h',
Timm Bäder's avatar
Timm Bäder committed
642
643
644
645
  'gtkshortcutsgroup.h',
  'gtkshortcutssection.h',
  'gtkshortcutsshortcut.h',
  'gtkshortcutswindow.h',
646
  'gtkshortcuttrigger.h',
Timm Bäder's avatar
Timm Bäder committed
647
  'gtkshow.h',
Benjamin Otte's avatar
Benjamin Otte committed
648
  'gtksignallistitemfactory.h',
Benjamin Otte's avatar
Benjamin Otte committed
649
  'gtksingleselection.h',
Timm Bäder's avatar
Timm Bäder committed
650
651
  'gtksizegroup.h',
  'gtksizerequest.h',
Benjamin Otte's avatar
Benjamin Otte committed
652
  'gtkslicelistmodel.h',
653
  'gtksnapshot.h',
Matthias Clasen's avatar
Matthias Clasen committed
654
  'gtksorter.h',
Benjamin Otte's avatar
Benjamin Otte committed
655
  'gtksortlistmodel.h',
656
  'gtkspinbutton.h',
Timm Bäder's avatar
Timm Bäder committed
657
658
  'gtkspinner.h',
  'gtkstack.h',
Timm Bäder's avatar
Timm Bäder committed
659
  'gtkstacksidebar.h',
Timm Bäder's avatar
Timm Bäder committed
660
661
  'gtkstackswitcher.h',
  'gtkstatusbar.h',
Benjamin Otte's avatar
Benjamin Otte committed
662
  'gtkstringfilter.h',
Matthias Clasen's avatar
Matthias Clasen committed
663
  'gtkstringlist.h',
Matthias Clasen's avatar
Matthias Clasen committed
664
  'gtkstringsorter.h',
Timm Bäder's avatar
Timm Bäder committed
665
666
667
  'gtkstylecontext.h',
  'gtkstyleprovider.h',
  'gtkswitch.h',
668
  'gtksymbolicpaintable.h',
Emmanuele Bassi's avatar
Emmanuele Bassi committed
669
  'gtktestatcontext.h',
Timm Bäder's avatar
Timm Bäder committed
670
  'gtktestutils.h',
Matthias Clasen's avatar
Matthias Clasen committed
671
  'gtktext.h',
Timm Bäder's avatar
Timm Bäder committed
672
673
674
675
676
677
678
679
680
681
  'gtktextbuffer.h',
  'gtktextchild.h',
  'gtktextiter.h',
  'gtktextmark.h',
  'gtktexttag.h',
  'gtktexttagtable.h',
  'gtktextview.h',
  'gtktogglebutton.h',
  'gtktooltip.h',
  'gtktreednd.h',
Benjamin Otte's avatar
Benjamin Otte committed
682
  'gtktreeexpander.h',
Benjamin Otte's avatar
Benjamin Otte committed
683
  'gtktreelistmodel.h',
Matthias Clasen's avatar
Matthias Clasen committed
684
  'gtktreelistrowsorter.h',
Timm Bäder's avatar
Timm Bäder committed
685
686
687
688
689
690
691
692
693
  'gtktreemodel.h',
  'gtktreemodelfilter.h',
  'gtktreemodelsort.h',
  'gtktreeselection.h',
  'gtktreesortable.h',
  'gtktreestore.h',
  'gtktreeview.h',
  'gtktreeviewcolumn.h',
  'gtktypes.h',
Benjamin Otte's avatar
Benjamin Otte committed
694
  'gtkvideo.h',
Timm Bäder's avatar
Timm Bäder committed
695
696
697
  'gtkviewport.h',
  'gtkvolumebutton.h',
  'gtkwidget.h',
Benjamin Otte's avatar
Benjamin Otte committed
698
  'gtkwidgetpaintable.h',
Timm Bäder's avatar
Timm Bäder committed
699
  'gtkwindow.h',
Alexander Mikhaylenko's avatar
Alexander Mikhaylenko committed
700
  'gtkwindowcontrols.h',
Timm Bäder's avatar
Timm Bäder committed
701
  'gtkwindowgroup.h',
Alexander Mikhaylenko's avatar
Alexander Mikhaylenko committed
702
  'gtkwindowhandle.h',
703
704
  'gtk-autocleanups.h',
  'gtk.h',
Timm Bäder's avatar
Timm Bäder committed
705
706
])

707
708
install_headers(gtk_public_headers, subdir: 'gtk-4.0/gtk/')

Emmanuele Bassi's avatar
Emmanuele Bassi committed
709
gtk_sources = gtk_public_sources + gtk_private_sources
710

711
proto_sources = [
712
  ['text-input', 'unstable', 'v3', ],
713
714
715
716
717
718
719
720
]

im_wayland_sources = files('gtkimcontextwayland.c')

foreach p: proto_sources
  proto_name = p.get(0)
  proto_stability = p.get(1)

721
  if wayland_enabled
722
723
    if proto_stability == 'stable'
      output_base = proto_name
724
      input = files('@0@.xml'.format(proto_name))
725
726
727
    else
      proto_version = p.get(2)
      output_base = '@0@-@1@-@2@'.format(proto_name, proto_stability, proto_version)
728
      input = files(join_paths(wlproto_dir, '@0@/@1@/@2@.xml'.format(proto_stability, proto_name, output_base)))
729
730
    endif

731
    # wayland_scanner is defined in gdk/wayland/meson.build
732
    im_wayland_sources += custom_target('@0@ client header'.format(output_base),
733
734
735
736
737
738
739
740
      input: input,
      output: '@0@-client-protocol.h'.format(output_base),
      command: [
        wayland_scanner,
        'client-header',
        '@INPUT@', '@OUTPUT@',
      ],
    )
741

742
    im_wayland_sources += custom_target('@0@ source'.format(output_base),
743
744
745
746
747
748
749
750
      input: input,
      output: '@0@-protocol.c'.format(output_base),
      command: [
        wayland_scanner,
        'private-code',
        '@INPUT@', '@OUTPUT@',
      ],
    )
751
  endif
752
753
endforeach

754
if os_unix and tracker3_dep.found()
755
756
757
  gtk_sources += 'gtksearchenginetracker3.c'
endif

758
759
760
761
762
763
764
765
766
if os_unix
  gtk_unix_print_headers = [
    'gtkpagesetupunixdialog.h',
    'gtkprintunixdialog.h',
    'gtkprinter.h',
    'gtkprintjob.h',
    'gtkunixprint-autocleanups.h',
    'gtkunixprint.h',
  ]
767
  install_headers(gtk_unix_print_headers, subdir: 'gtk-4.0/unix-print/gtk')
768

769
  gtk_unix_print_sources = files([
770
771
772
773
774
775
776
777
778
779
780
781
    'gtkcustompaperunixdialog.c',
    'gtkpagesetupunixdialog.c',
    'gtkprintbackend.c',
    'gtkprinter.c',
    'gtkprinteroption.c',
    'gtkprinteroptionset.c',
    'gtkprinteroptionwidget.c',
    'gtkprintjob.c',
    'gtkprintoperation-unix.c',
    'gtkprintoperation-portal.c',
    'gtkprintunixdialog.c',
  ])
782
783

  gtk_sources += gtk_unix_print_sources
784
785
786
endif

if os_win32
787
  gtk_win32_print_headers = []
788
  gtk_win32_print_sources = files([
789
790
791
792
    'gtkprint-win32.c',
    'gtkprintoperation-win32.c',
    'gtkfilechoosernativewin32.c',
    'gtkwin32.c',
793
794
795
  ])

  gtk_sources += gtk_win32_print_sources
796
  gtk_sources += ['gtkimcontextime.c']
797
798
799
800

  if cc.has_header_symbol('windows.h', 'IPrintDialogCallback')
    cdata.set('HAVE_IPRINTDIALOGCALLBACK', 1)
  endif
801
802
803
804
805
806
807
808
endif

if x11_enabled
  gtk_sources += ['gtkapplication-x11.c', 'gtkmountoperation-x11.c']
endif

if wayland_enabled
  gtk_sources += ['gtkapplication-wayland.c']
809
  gtk_sources += im_wayland_sources
810
811
812
813
814
815
816
817
818
819
endif

if x11_enabled or wayland_enabled
  gtk_sources += ['gtkapplication-dbus.c']
endif

if win32_enabled
  gtk_sources += ['gtkmountoperation-stub.c']
endif

820
if macos_enabled
821
  gtk_sources += files([
822
823
824
    'gtksearchenginequartz.c',
    'gtkapplication-quartz.c',
    'gtkapplication-quartz-menu.c',
825
    'gtkfilechoosernativequartz.c',
826
    'gtkimcontextquartz.c',
827
    'gtkquartz.c',
828
  ])
829

830
831
832
  gtk_cargs += ['-xobjective-c']  # FIXME? maybe add_languages() instead?
endif

833
if not (x11_enabled or win32_enabled)
834
  gtk_sources += ['gtkmountoperation-stub.c', ]
835
endif
Emmanuele Bassi's avatar
Emmanuele Bassi committed
836

837
gen_gtk_gresources_xml = find_program('gen-gtk-gresources-xml.py')
838
gtk_gresources_xml = configure_file(output: 'gtk.gresources.xml',
839
840
841
  command: [
    gen_gtk_gresources_xml,
    meson.current_source_dir(),
842
    host_machine.endian(),
843
844
845
    '@OUTPUT@'
  ],
)
846

Benjamin Otte's avatar
Benjamin Otte committed
847
848
theme_deps = []
# For git checkouts, but not for tarballs...
849
if not fs.exists('theme/Default/Default-light.css')
Benjamin Otte's avatar
Benjamin Otte committed
850
851
852
853
854
855
  # ... build the theme files
  sassc = find_program('sassc', required: false)
  if not sassc.found()
    subproject('sassc')
    sassc = find_program('sassc', required: true)
  endif
856

Benjamin Otte's avatar
Benjamin Otte committed
857
858
  if sassc.found()
    sassc_opts = [ '-a', '-M', '-t', 'compact' ]
859

Benjamin Otte's avatar
Benjamin Otte committed
860
    subdir('theme/Default')
861

Benjamin Otte's avatar
Benjamin Otte committed
862
863
864
865
    theme_deps += [
      default_theme_deps,
    ]
  endif
Matthias Clasen's avatar
Matthias Clasen committed
866
endif
867

Matthias Clasen's avatar
Matthias Clasen committed
868
869
870
871
872
873
874
875
876

objcopy_supports_add_symbol = false
objcopy = find_program('objcopy', required : false)
if objcopy.found()
  objcopy_supports_add_symbol = run_command(objcopy, '--help').stdout().contains('--add-symbol')
endif

ld = find_program('ld', required : false)

Matthias Clasen's avatar
Matthias Clasen committed
877
if not meson.is_cross_build() and build_machine.cpu_family() != 'arm' and build_machine.system() == 'linux' and objcopy.found() and objcopy_supports_add_symbol and ld.found()
Matthias Clasen's avatar
Matthias Clasen committed
878
879
880
881
882
883
884
  glib_compile_resources = find_program('glib-compile-resources')

  # Create the resource blob
  gtk_gresource = custom_target('gtk.gresource',
      input : gtk_gresources_xml,
      depends : theme_deps,
      output : 'gtk.gresource',
885
      depfile : 'gtk.gresource.d',
Matthias Clasen's avatar
Matthias Clasen committed
886
      command : [glib_compile_resources,
887
                 '--generate',
888
                 '--internal',
Matthias Clasen's avatar
Matthias Clasen committed
889
                 '--target=@OUTPUT@',
890
                 '--dependency-file=@DEPFILE@',
Matthias Clasen's avatar
Matthias Clasen committed
891
892
893
894
895
                 '--sourcedir=' + meson.current_source_dir(),
                 '--sourcedir=' + meson.current_build_dir(),
                 '@INPUT@'])

  # Create resource data file
Matthias Clasen's avatar
Matthias Clasen committed
896
  gtk_resources_c = custom_target('gtkresources.c',
Matthias Clasen's avatar
Matthias Clasen committed
897
898
      input : gtk_gresources_xml,
      depends : theme_deps,
Matthias Clasen's avatar
Matthias Clasen committed
899
      output : 'gtkresources.c',
900
      depfile : 'gtkresources.c.d',
Matthias Clasen's avatar
Matthias Clasen committed
901
      command : [glib_compile_resources,
902
                 '--generate-source',
903
                 '--internal',
Matthias Clasen's avatar
Matthias Clasen committed
904
                 '--target=@OUTPUT@',
905
                 '--dependency-file=@DEPFILE@',
Matthias Clasen's avatar
Matthias Clasen committed
906
907
908
909
910
911
912
                 '--sourcedir=' + meson.current_source_dir(),
                 '--sourcedir=' + meson.current_build_dir(),
                 '--external-data',
                 '--c-name', '_gtk',
                 '--manual-register',
                 '@INPUT@'])

Matthias Clasen's avatar
Matthias Clasen committed
913
  gtk_resources_h = custom_target('gtkresources.h',
Matthias Clasen's avatar
Matthias Clasen committed
914
915
      input : gtk_gresources_xml,
      depends : theme_deps,
Matthias Clasen's avatar
Matthias Clasen committed
916
      output : 'gtkresources.h',
917
      depfile : 'gtkresources.h.d',
Matthias Clasen's avatar
Matthias Clasen committed
918
      command : [glib_compile_resources,
919
                 '--generate-header',
920
                 '--internal',
Matthias Clasen's avatar
Matthias Clasen committed
921
                 '--target=@OUTPUT@',
922
                 '--dependency-file=@DEPFILE@',
Matthias Clasen's avatar
Matthias Clasen committed
923
924
925
926
927
928
929
                 '--sourcedir=' + meson.current_source_dir(),
                 '--sourcedir=' + meson.current_build_dir(),
                 '--external-data',
                 '--c-name', '_gtk',
                 '--manual-register',
                 '@INPUT@'])

Matthias Clasen's avatar
Matthias Clasen committed
930
  # Create object file containing resource data
Matthias Clasen's avatar
Matthias Clasen committed
931
  gtk_resources_binary = custom_target('gtkresources_blob.o',
Matthias Clasen's avatar
Matthias Clasen committed
932
      input : gtk_gresource,
Matthias Clasen's avatar
Matthias Clasen committed
933
      output : 'gtkresources_blob.o',
Matthias Clasen's avatar
Matthias Clasen committed
934
      command : [ld,
Matthias Clasen's avatar
Matthias Clasen committed
935
                 '-z', 'noexecstack',
Matthias Clasen's avatar
Matthias Clasen committed
936
937
938
939
940
941
                 '-r',
                 '-b','binary',
                 '@INPUT@',
                 '-o','@OUTPUT@'])

  # Rename symbol to match the one in the C file
Matthias Clasen's avatar
Matthias Clasen committed
942
  gtk_resources_o = custom_target('gtkresources_blob2.o',
Matthias Clasen's avatar
Matthias Clasen committed
943
    input : gtk_resources_binary,
Matthias Clasen's avatar
Matthias Clasen committed
944
    output : 'gtkresources_blob2.o',
Matthias Clasen's avatar
Matthias Clasen committed
945
    command : [objcopy,
Matthias Clasen's avatar
Matthias Clasen committed
946
                 '--strip-all',
947
948
                 '--rename-section', '.data=.gresource.gtk',
                 '--add-symbol','_gtk_resource_data=.gresource.gtk:0',
Matthias Clasen's avatar
Matthias Clasen committed
949
950
951
952
953
                 '@INPUT@',
                 '@OUTPUT@'])

  gtkresources = [
      gtk_resources_c,
Matthias Clasen's avatar
Matthias Clasen committed
954
      gtk_resources_h,
Matthias Clasen's avatar
Matthias Clasen committed
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
      gtk_resources_o,
    ]
else
  gtkresources = gnome.compile_resources('gtkresources',
    gtk_gresources_xml,
    dependencies: theme_deps,
    source_dir: [
      # List in order of preference
      meson.current_build_dir(),
      meson.current_source_dir(),
    ],
    c_name: '_gtk',
    extra_args: '--manual-register',
  )
endif
Timm Bäder's avatar
Timm Bäder committed
970

Kévin Commaille's avatar
Kévin Commaille committed
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
foreach lang : [
    'de',
    'da',
    'fr',
    'es',
    'hu',
    'it',
    'ko',
    'lt',
    'ms',
    'nl',
    'pl',
    'pt',
    'ru',
    'sv',
    'uk',
    'zh'
  ]
989
990
991
  conf = configuration_data()
  conf.set('lang', lang)
  resxml = configure_file(input: 'emoji/gresource.xml.in',
992
993
    output: lang + '.gresource.xml',
    configuration: conf
994
995
996
997
998
999
1000
  )

  gnome.compile_resources(lang,
    resxml,
    source_dir: 'emoji',
    gresource_bundle: true,
    install: true,