2017-03-12 16:27:34 +00:00
|
|
|
# These should be in the order you want them to appear in the
|
|
|
|
# demo app, which means alphabetized by demo title, not filename
|
2016-09-20 14:29:14 +00:00
|
|
|
demos = files([
|
2016-09-20 10:13:28 +00:00
|
|
|
'application_demo.c',
|
|
|
|
'assistant.c',
|
|
|
|
'builder.c',
|
|
|
|
'clipboard.c',
|
|
|
|
'combobox.c',
|
2019-06-13 18:33:36 +00:00
|
|
|
'constraints.c',
|
2020-11-18 23:35:56 +00:00
|
|
|
'constraints_interactive.c',
|
|
|
|
'constraints_vfl.c',
|
|
|
|
'constraints_builder.c',
|
2016-09-20 10:13:28 +00:00
|
|
|
'css_accordion.c',
|
|
|
|
'css_basics.c',
|
|
|
|
'css_blendmodes.c',
|
|
|
|
'css_multiplebgs.c',
|
|
|
|
'css_pixbufs.c',
|
|
|
|
'css_shadows.c',
|
|
|
|
'cursors.c',
|
|
|
|
'dialog.c',
|
|
|
|
'drawingarea.c',
|
2017-12-06 00:22:06 +00:00
|
|
|
'dnd.c',
|
2016-09-20 10:13:28 +00:00
|
|
|
'editable_cells.c',
|
|
|
|
'entry_completion.c',
|
2019-11-01 18:20:02 +00:00
|
|
|
'entry_undo.c',
|
2020-09-13 14:37:32 +00:00
|
|
|
'errorstates.c',
|
2016-09-20 10:13:28 +00:00
|
|
|
'expander.c',
|
|
|
|
'filtermodel.c',
|
2017-03-12 16:27:34 +00:00
|
|
|
'fishbowl.c',
|
2019-04-02 19:49:35 +00:00
|
|
|
'fixed.c',
|
2018-07-27 22:42:22 +00:00
|
|
|
'fontrendering.c',
|
2021-03-29 12:26:17 +00:00
|
|
|
'frames.c',
|
2020-04-13 00:39:03 +00:00
|
|
|
'gears.c',
|
2016-09-20 10:13:28 +00:00
|
|
|
'gestures.c',
|
|
|
|
'glarea.c',
|
2020-09-21 19:05:04 +00:00
|
|
|
'gltransition.c',
|
2016-09-20 10:13:28 +00:00
|
|
|
'headerbar.c',
|
|
|
|
'hypertext.c',
|
2019-10-11 21:35:58 +00:00
|
|
|
'iconscroll.c',
|
2016-09-20 10:13:28 +00:00
|
|
|
'iconview.c',
|
|
|
|
'iconview_edit.c',
|
|
|
|
'images.c',
|
|
|
|
'infobar.c',
|
2020-08-12 01:14:05 +00:00
|
|
|
'layoutmanager.c',
|
2020-08-27 11:16:38 +00:00
|
|
|
'layoutmanager2.c',
|
2016-09-20 10:13:28 +00:00
|
|
|
'links.c',
|
|
|
|
'listbox.c',
|
2020-11-18 23:35:56 +00:00
|
|
|
'listbox_controls.c',
|
2020-09-16 02:17:34 +00:00
|
|
|
'menu.c',
|
2016-09-20 10:13:28 +00:00
|
|
|
'flowbox.c',
|
|
|
|
'list_store.c',
|
2020-06-04 19:44:39 +00:00
|
|
|
'listview_applauncher.c',
|
2019-11-24 07:07:33 +00:00
|
|
|
'listview_clocks.c',
|
2019-12-14 18:32:55 +00:00
|
|
|
'listview_colors.c',
|
2019-10-18 18:47:48 +00:00
|
|
|
'listview_filebrowser.c',
|
2019-10-28 08:47:52 +00:00
|
|
|
'listview_minesweeper.c',
|
2020-06-25 17:57:17 +00:00
|
|
|
'dropdown.c',
|
2019-10-13 05:40:58 +00:00
|
|
|
'listview_settings.c',
|
2020-11-11 03:08:38 +00:00
|
|
|
'listview_ucd.c',
|
2019-10-07 02:46:11 +00:00
|
|
|
'listview_weather.c',
|
2020-06-27 04:38:20 +00:00
|
|
|
'listview_words.c',
|
2016-09-20 10:13:28 +00:00
|
|
|
'markup.c',
|
|
|
|
'overlay.c',
|
2020-11-18 23:35:56 +00:00
|
|
|
'overlay_decorative.c',
|
2018-02-02 15:04:17 +00:00
|
|
|
'paint.c',
|
2018-02-27 01:28:55 +00:00
|
|
|
'paintable.c',
|
2018-02-27 02:09:33 +00:00
|
|
|
'paintable_animated.c',
|
2020-09-12 01:09:41 +00:00
|
|
|
'paintable_emblem.c',
|
2018-02-27 02:58:52 +00:00
|
|
|
'paintable_mediastream.c',
|
2021-08-28 01:46:55 +00:00
|
|
|
'paintable_symbolic.c',
|
2016-09-20 10:13:28 +00:00
|
|
|
'panes.c',
|
2019-03-13 22:53:13 +00:00
|
|
|
'password_entry.c',
|
2020-03-01 07:45:15 +00:00
|
|
|
'peg_solitaire.c',
|
2016-09-20 10:13:28 +00:00
|
|
|
'pickers.c',
|
|
|
|
'printing.c',
|
|
|
|
'revealer.c',
|
|
|
|
'rotated_text.c',
|
|
|
|
'scale.c',
|
|
|
|
'search_entry.c',
|
|
|
|
'search_entry2.c',
|
2020-09-07 13:32:22 +00:00
|
|
|
'shadertoy.c',
|
2016-09-20 10:13:28 +00:00
|
|
|
'shortcuts.c',
|
2018-08-11 23:40:03 +00:00
|
|
|
'shortcut_triggers.c',
|
2016-09-20 10:13:28 +00:00
|
|
|
'sidebar.c',
|
|
|
|
'sizegroup.c',
|
2018-06-04 03:41:44 +00:00
|
|
|
'sliding_puzzle.c',
|
2016-09-20 10:13:28 +00:00
|
|
|
'spinbutton.c',
|
|
|
|
'spinner.c',
|
|
|
|
'stack.c',
|
2017-03-12 16:27:34 +00:00
|
|
|
'tabs.c',
|
2019-03-15 14:34:06 +00:00
|
|
|
'tagged_entry.c',
|
2016-09-20 10:13:28 +00:00
|
|
|
'textmask.c',
|
2019-11-01 18:20:22 +00:00
|
|
|
'textundo.c',
|
2016-09-20 10:13:28 +00:00
|
|
|
'textview.c',
|
|
|
|
'textscroll.c',
|
2019-06-05 03:23:13 +00:00
|
|
|
'themes.c',
|
2016-09-20 10:13:28 +00:00
|
|
|
'theming_style_classes.c',
|
|
|
|
'transparent.c',
|
|
|
|
'tree_store.c',
|
2018-03-05 01:15:29 +00:00
|
|
|
'video_player.c',
|
2016-09-20 10:13:28 +00:00
|
|
|
])
|
|
|
|
|
2017-04-26 16:04:20 +00:00
|
|
|
gtkdemo_deps = [ libgtk_dep, ]
|
2016-09-20 14:29:14 +00:00
|
|
|
|
2020-12-15 12:31:38 +00:00
|
|
|
extra_demo_sources = files([
|
|
|
|
'main.c',
|
|
|
|
'fontify.c',
|
|
|
|
'gtkfishbowl.c',
|
|
|
|
'fontplane.c',
|
|
|
|
'gtkgears.c',
|
|
|
|
'gtkshaderbin.c',
|
|
|
|
'gtkshadertoy.c',
|
|
|
|
'gtkshaderstack.c',
|
|
|
|
'gskshaderpaintable.c',
|
|
|
|
'puzzlepiece.c',
|
|
|
|
'bluroverlay.c',
|
|
|
|
'demoimage.c',
|
|
|
|
'demotaggedentry.c',
|
|
|
|
'demochild.c',
|
|
|
|
'demolayout.c',
|
|
|
|
'demowidget.c',
|
|
|
|
'demo2layout.c',
|
|
|
|
'singular_value_decomposition.c',
|
|
|
|
'four_point_transform.c',
|
|
|
|
'demo2widget.c',
|
|
|
|
'demo3widget.c',
|
|
|
|
'pixbufpaintable.c',
|
|
|
|
'script-names.c',
|
|
|
|
'unicode-names.c',
|
|
|
|
'suggestionentry.c',
|
|
|
|
])
|
2018-03-28 04:57:28 +00:00
|
|
|
|
2016-09-24 15:35:10 +00:00
|
|
|
if harfbuzz_dep.found() and pangoft_dep.found()
|
2020-11-11 03:08:38 +00:00
|
|
|
demos += files(['font_features.c'])
|
|
|
|
extra_demo_sources += files(['language-names.c'])
|
2019-11-24 07:07:33 +00:00
|
|
|
gtkdemo_deps += [ harfbuzz_dep, epoxy_dep ]
|
2016-09-20 14:29:14 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
if os_unix
|
|
|
|
demos += files('pagesetup.c')
|
|
|
|
endif
|
|
|
|
|
2020-10-06 19:12:09 +00:00
|
|
|
librsvg_dep = dependency('librsvg-2.0', version: '>= 2.46.0', required: false)
|
|
|
|
|
|
|
|
if librsvg_dep.found()
|
|
|
|
demos += files('paintable_svg.c')
|
2020-11-10 21:12:16 +00:00
|
|
|
extra_demo_sources += files(['svgpaintable.c'])
|
2020-10-06 19:12:09 +00:00
|
|
|
gtkdemo_deps += [ librsvg_dep ]
|
|
|
|
endif
|
|
|
|
|
2017-04-26 16:04:20 +00:00
|
|
|
gtkdemo_args = [ '-DGDK_DISABLE_DEPRECATED', '-DGTK_DISABLE_DEPRECATED', ]
|
2016-09-20 10:13:28 +00:00
|
|
|
|
2017-03-12 16:27:34 +00:00
|
|
|
demos_h = custom_target('gtk4 demo header',
|
2020-12-15 12:31:38 +00:00
|
|
|
output: 'demos.h',
|
|
|
|
input: demos,
|
|
|
|
command: [ find_program('geninclude.py'), '@OUTPUT@', '@INPUT@' ],
|
|
|
|
)
|
2016-09-20 14:29:14 +00:00
|
|
|
|
2021-10-01 02:47:00 +00:00
|
|
|
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)
|
|
|
|
|
|
|
|
if build_machine.system() == 'linux' and objcopy.found() and objcopy_supports_add_symbol and ld.found()
|
|
|
|
glib_compile_resources = find_program('glib-compile-resources')
|
|
|
|
|
|
|
|
# Create the resource blob
|
|
|
|
gtkdemo_gresource = custom_target('gtkdemo.gresource',
|
|
|
|
input : 'demo.gresource.xml',
|
|
|
|
output : 'gtkdemo.gresource',
|
2021-10-04 01:01:04 +00:00
|
|
|
depfile : 'gtkdemo.gresource.d',
|
2021-10-01 02:47:00 +00:00
|
|
|
command : [glib_compile_resources,
|
2021-10-04 01:01:04 +00:00
|
|
|
'--generate',
|
2021-10-01 02:47:00 +00:00
|
|
|
'--target=@OUTPUT@',
|
2021-10-04 01:01:04 +00:00
|
|
|
'--dependency-file=@DEPFILE@',
|
2021-10-01 02:47:00 +00:00
|
|
|
'--sourcedir=' + meson.current_source_dir(),
|
|
|
|
'--sourcedir=' + meson.current_build_dir(),
|
|
|
|
'@INPUT@'])
|
|
|
|
|
|
|
|
# Create resource data file
|
|
|
|
gtkdemo_resources_c = custom_target('gtkdemo_resources.c',
|
|
|
|
input : 'demo.gresource.xml',
|
|
|
|
output : 'gtkdemo_resources.c',
|
2021-10-04 01:01:04 +00:00
|
|
|
depfile : 'gtkdemo_resources.c.d',
|
2021-10-01 02:47:00 +00:00
|
|
|
command : [glib_compile_resources,
|
2021-10-04 01:01:04 +00:00
|
|
|
'--generate-source',
|
2021-10-01 02:47:00 +00:00
|
|
|
'--target=@OUTPUT@',
|
2021-10-04 01:01:04 +00:00
|
|
|
'--dependency-file=@DEPFILE@',
|
2021-10-01 02:47:00 +00:00
|
|
|
'--sourcedir=' + meson.current_source_dir(),
|
|
|
|
'--sourcedir=' + meson.current_build_dir(),
|
|
|
|
'--external-data',
|
|
|
|
'--c-name', '_g_binary_gtkdemo',
|
|
|
|
'@INPUT@'])
|
|
|
|
|
|
|
|
# Create object file containing resource data
|
|
|
|
gtkdemo_resources_binary = custom_target('gtkdemo_resources.o',
|
|
|
|
input : gtkdemo_gresource,
|
|
|
|
output : 'gtkdemo_resources.o',
|
|
|
|
command : [ld,
|
|
|
|
'-r',
|
|
|
|
'-b','binary',
|
|
|
|
'@INPUT@',
|
|
|
|
'-o','@OUTPUT@'])
|
|
|
|
|
|
|
|
# Rename symbol to match the one in the C file
|
|
|
|
gtkdemo_resources_o = custom_target('gtkdemo_resources2.o',
|
|
|
|
input : gtkdemo_resources_binary,
|
|
|
|
output : 'gtkdemo_resources2.o',
|
|
|
|
command : [objcopy,
|
|
|
|
'--add-symbol','_g_binary_gtkdemo_resource_data=.data:0',
|
|
|
|
'@INPUT@',
|
|
|
|
'@OUTPUT@'])
|
|
|
|
|
|
|
|
gtkdemo_resources = [
|
|
|
|
gtkdemo_resources_c,
|
|
|
|
gtkdemo_resources_o,
|
|
|
|
]
|
|
|
|
else
|
|
|
|
gtkdemo_resources = gnome.compile_resources('gtkdemo_resources',
|
|
|
|
'demo.gresource.xml',
|
|
|
|
source_dir: '.',
|
|
|
|
)
|
|
|
|
endif
|
2017-03-12 16:27:34 +00:00
|
|
|
|
2020-12-15 12:31:38 +00:00
|
|
|
# Use a subset of compiler flags
|
2020-03-07 14:01:21 +00:00
|
|
|
demo_cflags = []
|
|
|
|
foreach flag: common_cflags
|
|
|
|
if flag not in ['-Werror=missing-prototypes', '-Werror=missing-declarations', '-fvisibility=hidden']
|
|
|
|
demo_cflags += flag
|
|
|
|
endif
|
|
|
|
endforeach
|
|
|
|
|
2021-02-12 04:35:26 +00:00
|
|
|
gtkdemo_deps += [ demo_conf_h ]
|
|
|
|
|
2017-03-12 16:27:34 +00:00
|
|
|
executable('gtk4-demo',
|
2020-12-15 12:31:38 +00:00
|
|
|
sources: [demos, demos_h, extra_demo_sources, gtkdemo_resources],
|
|
|
|
c_args: gtkdemo_args + demo_cflags,
|
|
|
|
dependencies: gtkdemo_deps,
|
|
|
|
include_directories: confinc,
|
|
|
|
gui_app: true,
|
|
|
|
link_args: extra_demo_ldflags,
|
|
|
|
install: true,
|
|
|
|
)
|
2017-03-12 16:27:34 +00:00
|
|
|
|
|
|
|
executable('gtk4-demo-application',
|
2020-12-15 12:31:38 +00:00
|
|
|
sources: ['application.c', gtkdemo_resources],
|
|
|
|
c_args: gtkdemo_args + common_cflags,
|
|
|
|
dependencies: gtkdemo_deps,
|
|
|
|
include_directories: confinc,
|
|
|
|
gui_app: true,
|
|
|
|
link_args: extra_demo_ldflags,
|
|
|
|
install: true,
|
|
|
|
)
|
2017-03-12 16:27:34 +00:00
|
|
|
|
|
|
|
# icons
|
2017-04-26 16:04:20 +00:00
|
|
|
icontheme_dir = join_paths(gtk_datadir, 'icons/hicolor')
|
2017-03-12 16:27:34 +00:00
|
|
|
|
2019-02-06 14:37:25 +00:00
|
|
|
foreach size: ['scalable', 'symbolic']
|
2020-12-15 12:31:38 +00:00
|
|
|
install_subdir('data/' + size, install_dir: icontheme_dir)
|
2017-03-12 16:27:34 +00:00
|
|
|
endforeach
|
|
|
|
|
|
|
|
# desktop file
|
2019-04-01 22:49:09 +00:00
|
|
|
install_data('org.gtk.Demo4.desktop', install_dir: gtk_applicationsdir)
|
2017-03-12 16:27:34 +00:00
|
|
|
|
|
|
|
# GSettings
|
2019-04-01 22:49:09 +00:00
|
|
|
install_data('org.gtk.Demo4.gschema.xml', install_dir: gtk_schemasdir)
|
2017-04-26 16:04:20 +00:00
|
|
|
gnome.compile_schemas()
|
2018-03-20 23:40:30 +00:00
|
|
|
|
|
|
|
# appdata
|
2021-06-01 12:16:27 +00:00
|
|
|
configure_file(
|
|
|
|
input: 'org.gtk.Demo4.appdata.xml.in',
|
|
|
|
output: 'org.gtk.Demo4.appdata.xml',
|
|
|
|
configuration: appdata_config,
|
|
|
|
install_dir: gtk_appdatadir
|
|
|
|
)
|