Compare commits

...

35 Commits

Author SHA1 Message Date
Timm Bäder
5713cdc6e5 Update meson build files 2016-11-03 12:00:52 +01:00
Timm Bäder
fc12424e92 meson: Sort input files by name 2016-11-03 12:00:51 +01:00
Timm Bäder
ea42aaa36b meson: Conditionally check for dependencies 2016-11-03 09:21:41 +01:00
Timm Bäder
17e7288787 meson: Check for more libraries 2016-11-03 09:21:40 +01:00
Timm Bäder
5cbe4ccb40 meson: build some more tests 2016-11-03 09:21:40 +01:00
Timm Bäder
7fa7be7b76 build tests/visuals 2016-11-03 09:21:40 +01:00
Timm Bäder
ba2a2419a1 meson: Build gtk utils 2016-11-03 09:21:40 +01:00
Timm Bäder
b0cc84617b meson: Install libgtk and libgdk 2016-11-03 09:21:40 +01:00
Timm Bäder
251bfc0bf5 gtk/meson: Read dirs from options 2016-11-03 09:21:40 +01:00
Timm Bäder
3bb9a55f3c Build examples 2016-11-03 09:21:40 +01:00
Timm Bäder
070fc9d306 examples/drawing: Don't call gtk_main_quit
This is a GtkApplication so it will do the right thing when closing the
window.
2016-11-03 09:21:40 +01:00
Timm Bäder
5ae112e5d4 meson: Build all tests in tests/ 2016-11-03 09:21:39 +01:00
Timm Bäder
9b5b66e264 meson: Also check for sincos 2016-11-03 09:21:39 +01:00
Timm Bäder
9074044b9a meson.build: Add more required versions
...build tests/ and testsuite/, properly define gtk_version, etc.
2016-11-03 09:21:39 +01:00
Tim-Philipp Müller
e6745141c0 meson: figure out wayland-protocols pkgdatadir via pkg-config
Instead of hardcoding the location.
2016-11-03 09:21:39 +01:00
Timm Bäder
fc8244ab18 meson: Use -Bsymbolic 2016-11-03 09:21:39 +01:00
Timm Bäder
18992bfe1c meson: Require gtkmarshal_h before we build gtk 2016-11-03 09:21:39 +01:00
Timm Bäder
c794068f9b meson: Disable broadway build 2016-11-03 09:21:39 +01:00
Timm Bäder
1dac659f1b meson: Generate demos.h for gtk3-demo 2016-11-03 09:21:39 +01:00
Timm Bäder
8c73282d9d meson: Build gtk3-demo 2016-11-03 09:21:38 +01:00
Timm Bäder
fcb737d21f meson: build gtk/ again 2016-11-03 09:21:38 +01:00
Timm Bäder
6718a4b97e build: Generate wayland protocol files 2016-11-03 09:21:38 +01:00
Timm Bäder
bf49d70420 wayland: Include generated sources from builddir, not srcdir 2016-11-03 09:21:38 +01:00
Timm Bäder
2ffb2241c5 gentypefuncs.py: Use python3 2016-11-03 09:21:38 +01:00
Tim-Philipp Müller
d8d264cfc7 meson: replace gentypefuncs.d with python script 2016-11-03 09:21:38 +01:00
Timm Bäder
8e5ac6ee25 gtk major version 2016-11-03 09:21:38 +01:00
Timm Bäder
55d816b013 meson: Use xrandr 2016-11-03 09:21:38 +01:00
Timm Bäder
c740a4db50 meson: make gtk buildable
x11 only
2016-11-03 09:21:37 +01:00
Timm Bäder
75f7b79a31 meson: Build gtk marshallers
And fix libgtk_dep/libgdk_dep to link_with the shared lib
2016-11-03 09:21:37 +01:00
Timm Bäder
603f3a5875 meson: Add unit test files 2016-11-03 09:21:37 +01:00
Timm Bäder
9e0489a3de gtk: Generate gresources file 2016-11-03 09:21:37 +01:00
Timm Bäder
1e758eb910 meson: Add options for x/wayland/broadway backends 2016-11-03 09:21:37 +01:00
Timm Bäder
9946ee20ee Meson build v2 2016-11-03 09:21:37 +01:00
Timm Bäder
9123bbbc4c fallback-c89: Include config.h
It holds all the HAVE_<func> definitions.
2016-11-03 09:21:36 +01:00
Emmanuele Bassi
ebc5d1dd29 Add Meson build files
Original work by: Jussi Pakkanen <jpakkane@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=769881
2016-11-03 09:21:36 +01:00
54 changed files with 4046 additions and 15 deletions

22
build_enum.py Executable file
View File

@@ -0,0 +1,22 @@
#!/usr/bin/env python3
# This is in its own file rather than inside meson.build
# because a) mixing the two is ugly and b) trying to
# make special characters such as \n go through all
# backends is a fool's errand.
import sys, os, shutil, subprocess
# [perl, glib-mkenums]
cmd = [sys.argv[1], sys.argv[2]]
template = sys.argv[3]
ofilename = sys.argv[4]
headers = sys.argv[5:]
arg_array = ['--template', template];
pc = subprocess.Popen(cmd + arg_array + headers, stdout=subprocess.PIPE)
(stdo, _) = pc.communicate()
if pc.returncode != 0:
sys.exit(pc.returncode)
open(ofilename, 'wb').write(stdo)

32
build_marshal.py Executable file
View File

@@ -0,0 +1,32 @@
#!/usr/bin/env python3
# This is in its own file rather than inside meson.build
# because a) mixing the two is ugly and b) trying to
# make special characters such as \n go through all
# backends is a fool's errand.
import sys, os, shutil, subprocess
# [genmarshal, prefix, infile, outfile]
cmd = [sys.argv[1]]
prefix = sys.argv[2]
ifilename = sys.argv[3]
ofilename = sys.argv[4]
h_array = ['--prefix=' + prefix, '--header', '--valist-marshallers']
c_array = ['--prefix=' + prefix, '--body', '--valist-marshallers']
if ofilename.endswith('.h'):
arg_array = h_array
else:
arg_array = c_array
pc = subprocess.Popen(cmd + [ifilename] + arg_array, stdout=subprocess.PIPE)
(stdo, _) = pc.communicate()
if pc.returncode != 0:
sys.exit(pc.returncode)
open(ofilename, 'wb').write(stdo)

323
config.h.meson Normal file
View File

@@ -0,0 +1,323 @@
/* config.h.in. Generated from configure.ac by autoheader. */
/* always defined to indicate that i18n is enabled */
#mesondefine ENABLE_NLS
/* The prefix for our gettext translation domains. */
#mesondefine GETTEXT_PACKAGE
/* Disable deprecation warnings from glib */
#mesondefine GLIB_DISABLE_DEPRECATION_WARNINGS
/* Define the location where the catalogs will be installed */
#mesondefine GTK_LOCALEDIR
/* Define to 1 if you have the `bind_textdomain_codeset' function. */
#mesondefine HAVE_BIND_TEXTDOMAIN_CODESET
/* define if we have colord */
#mesondefine HAVE_COLORD
/* Define to 1 if you have the <crt_externs.h> header file. */
#mesondefine HAVE_CRT_EXTERNS_H
/* Define to 1 if CUPS 1.6 API is available */
#mesondefine HAVE_CUPS_API_1_6
/* Define to 1 if you have the `dcgettext' function. */
#mesondefine HAVE_DCGETTEXT
/* Define to 1 if you have the declaration of `isinf', and to 0 if you don't.
*/
#mesondefine HAVE_DECL_ISINF
/* Define to 1 if you have the declaration of `isnan', and to 0 if you don't.
*/
#mesondefine HAVE_DECL_ISNAN
/* Define to 1 if you have the <dlfcn.h> header file. */
#mesondefine HAVE_DLFCN_H
/* Define to 1 if you have the <ftw.h> header file. */
#mesondefine HAVE_FTW_H
/* Define to 1 if you have the `getpagesize' function. */
#mesondefine HAVE_GETPAGESIZE
/* Define to 1 if you have the `getresuid' function. */
#mesondefine HAVE_GETRESUID
/* Define if the GNU gettext() function is already present or preinstalled. */
#mesondefine HAVE_GETTEXT
/* Define if gio-unix is available */
#mesondefine HAVE_GIO_UNIX
/* Have GNU ftw */
#mesondefine HAVE_GNU_FTW
/* Define to 1 if you have the `httpGetAuthString' function. */
#mesondefine HAVE_HTTPGETAUTHSTRING
/* Define if cups http_t authstring field is accessible */
#mesondefine HAVE_HTTP_AUTHSTRING
/* Define to 1 if you have the <inttypes.h> header file. */
#mesondefine HAVE_INTTYPES_H
/* Define to 1 if the system has the type `IPrintDialogCallback'. */
#mesondefine HAVE_IPRINTDIALOGCALLBACK
/* Define if your <locale.h> file defines LC_MESSAGES. */
#mesondefine HAVE_LC_MESSAGES
/* Define to 1 if you have the `m' library (-lm). */
#mesondefine HAVE_LIBM
/* Define to 1 if you have the <locale.h> header file. */
#mesondefine HAVE_LOCALE_H
/* Define to 1 if you have the `localtime_r' function. */
#mesondefine HAVE_LOCALTIME_R
/* Define to 1 if you have the `lstat' function. */
#mesondefine HAVE_LSTAT
/* Define to 1 if you have the `mallinfo' function. */
#mesondefine HAVE_MALLINFO
/* Define to 1 if you have the <memory.h> header file. */
#mesondefine HAVE_MEMORY_H
/* Define to 1 if you have the `mkstemp' function. */
#mesondefine HAVE_MKSTEMP
/* Define to 1 if you have a working `mmap' system call. */
#mesondefine HAVE_MMAP
/* Define to 1 if you have the `nearbyint' function. */
#mesondefine HAVE_NEARBYINT
/* Define to 1 if libpapi available */
#mesondefine HAVE_PAPI
/* Define to 1 if you have the `posix_fallocate' function. */
#mesondefine HAVE_POSIX_FALLOCATE
/* Have the Xrandr extension library */
#mesondefine HAVE_RANDR
/* Have the Xrandr 1.5 extension library */
#mesondefine HAVE_RANDR15
/* Define to 1 if you have the `rint' function. */
#mesondefine HAVE_RINT
/* Define to 1 if you have the `round' function. */
#mesondefine HAVE_ROUND
/* Define to 1 if you have the `sincos' function. */
#mesondefine HAVE_SINCOS
/* Define to 1 if you have the `log2` function */
#mesondefine HAVE_LOG2
/* Define to 1 if you ahve the `exp2` function */
#mesondefine HAVE_EXP2
/* Have the sockaddr_un.sun_len member */
#mesondefine HAVE_SOCKADDR_UN_SUN_LEN
/* Define to 1 if solaris xinerama is available */
#mesondefine HAVE_SOLARIS_XINERAMA
/* Define to 1 if you have the <stdint.h> header file. */
#mesondefine HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#mesondefine HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#mesondefine HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#mesondefine HAVE_STRING_H
/* Define to 1 if you have the <sys/mman.h> header file. */
#mesondefine HAVE_SYS_MMAN_H
/* Define to 1 if you have the <sys/param.h> header file. */
#mesondefine HAVE_SYS_PARAM_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#mesondefine HAVE_SYS_STAT_H
/* Define to 1 if sys/sysinfo.h is available */
#mesondefine HAVE_SYS_SYSINFO_H
/* Define to 1 if sys/systeminfo.h is available */
#mesondefine HAVE_SYS_SYSTEMINFO_H
/* Define to 1 if you have the <sys/time.h> header file. */
#mesondefine HAVE_SYS_TIME_H
/* Define to 1 if you have the <sys/types.h> header file. */
#mesondefine HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#mesondefine HAVE_UNISTD_H
/* Have the XCOMPOSITE X extension */
#mesondefine HAVE_XCOMPOSITE
/* Have the Xcursor library */
#mesondefine HAVE_XCURSOR
/* Have the XDAMAGE X extension */
#mesondefine HAVE_XDAMAGE
/* Have the XFIXES X extension */
#mesondefine HAVE_XFIXES
/* Define to 1 if XFree Xinerama is available */
#mesondefine HAVE_XFREE_XINERAMA
/* Have XGenericEvent */
#mesondefine HAVE_XGENERICEVENTS
/* Define to 1 if xinerama is available */
#mesondefine HAVE_XINERAMA
/* Define to use XKB extension */
#mesondefine HAVE_XKB
/* Have the SYNC extension library */
#mesondefine HAVE_XSYNC
/* Define to 1 if you have the `_lock_file' function */
#mesondefine HAVE__LOCK_FILE
/* Define to 1 if you have the `flockfile' function */
#mesondefine HAVE_FLOCKFILE
/* Define if _NL_MEASUREMENT_MEASUREMENT is available */
#mesondefine HAVE__NL_MEASUREMENT_MEASUREMENT
/* Define if _NL_PAPER_HEIGHT is available */
#mesondefine HAVE__NL_PAPER_HEIGHT
/* Define if _NL_PAPER_WIDTH is available */
#mesondefine HAVE__NL_PAPER_WIDTH
/* Define if _NL_TIME_FIRST_WEEKDAY is available */
#mesondefine HAVE__NL_TIME_FIRST_WEEKDAY
/* Define to 1 if you have the `_NSGetEnviron' function. */
#mesondefine HAVE__NSGETENVIRON
/* Define to the sub-directory where libtool stores uninstalled libraries. */
#mesondefine LT_OBJDIR
/* Define if <X11/extensions/XIproto.h> needed for xReply */
#mesondefine NEED_XIPROTO_H_FOR_XREPLY
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
#mesondefine NO_MINUS_C_MINUS_O
/* Define to the address where bug reports for this package should be sent. */
#mesondefine PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#mesondefine PACKAGE_NAME
/* Define to the full name and version of this package. */
#mesondefine PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#mesondefine PACKAGE_TARNAME
/* Define to the home page for this package. */
#mesondefine PACKAGE_URL
/* Define to the version of this package. */
#mesondefine PACKAGE_VERSION
/* Use NSBundle functions to determine load paths for libraries, translations,
etc. */
#mesondefine QUARTZ_RELOCATION
/* Define to 1 if you have the ANSI C header files. */
#mesondefine STDC_HEADERS
/* Define to 1 if gmodule works and should be used */
#mesondefine USE_GMODULE
/* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
#endif
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
#endif
/* Enable threading extensions on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS
#endif
/* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE
# undef _TANDEM_SOURCE
#endif
/* Enable general extensions on Solaris. */
#ifndef __EXTENSIONS__
# undef __EXTENSIONS__
#endif
/* Define to 1 if XInput 2.0 is available */
#mesondefine XINPUT_2
/* Define to 1 if XInput 2.2 is available */
#mesondefine XINPUT_2_2
/* Define to 1 if the X Window System is missing or not being used. */
#mesondefine X_DISPLAY_MISSING
/* Enable large inode numbers on Mac OS X 10.5. */
#ifndef _DARWIN_USE_64_BIT_INODE
# define _DARWIN_USE_64_BIT_INODE 1
#endif
/* Number of bits in a file offset, on hosts where this is settable. */
#mesondefine _FILE_OFFSET_BITS
/* defines how to decorate public symbols while building */
#mesondefine _GDK_EXTERN
/* Define for large files, on AIX-style hosts. */
#mesondefine _LARGE_FILES
/* Define to 1 if on MINIX. */
#mesondefine _MINIX
/* Define to 2 if the system does not provide POSIX.1 features except with
this defined. */
#mesondefine _POSIX_1_SOURCE
/* Define to 1 if you need to in order for `stat' and other things to work. */
#mesondefine _POSIX_SOURCE
/* Define to `int' if <sys/types.h> doesn't define. */
#mesondefine gid_t
/* Define to `int' if <sys/types.h> doesn't define. */
#mesondefine uid_t
/* Define to 1 if linux/memfd.h exists */
#mesondefine HAVE_LINUX_MEMFD_H
#mesondefine GTK_LOCALEDIR
#mesondefine GTK_DATADIR
#mesondefine GTK_LIBDIR

108
demos/gtk-demo/geninclude.py Executable file
View File

@@ -0,0 +1,108 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
import re
import os
from collections import *
out_file = sys.argv[1]
in_files = sys.argv[2:]
file_output = """
typedef GtkWidget *(*GDoDemoFunc) (GtkWidget *do_widget);
typedef struct _Demo Demo;
struct _Demo
{
gchar *name;
gchar *title;
gchar *filename;
GDoDemoFunc func;
Demo *children;
};
"""
# Demo = namedtuple('Demo', ['name', 'title', 'file', 'func'])
demos = []
for demo_file in in_files:
filename = demo_file[demo_file.rfind('/')+1:]
demo_name = filename.replace(".c", "")
with open(demo_file, 'r') as f:
title = f.readline().replace("/*", "").strip()
file_output += "GtkWidget *do_" + demo_name + " (GtkWidget *do_widget);\n"
# demos += Demo(name = demo_name,
# title = title,
# file = demo_file,
# func = "do_" + title)
demos.append((demo_name, title, filename, "do_" + demo_name, -1))
# Generate a List of "Parent names"
parents = []
parent_ids = []
parent_index = 0
for demo in demos:
if "/" in demo[1]:
slash_index = demo[1].index('/')
parent_name = demo[1][:slash_index]
do_break = False
# Check for duplicates
if not parent_name in parents:
parents.append(parent_name)
parent_ids.append(parent_index)
demos.append(("NULL", parent_name, "NULL", "NULL", parent_index))
parent_index = parent_index + 1
# For every child with a parent, generate a list of child demos
i = 0
for parent in parents:
id = parent_ids[i]
file_output += "\nDemo child" + str(id) + "[] = {\n"
# iterate over all demos and check if the name starts with the given parent name
for child in demos:
if child[1].startswith(parent + "/"):
title = child[1][child[1].rfind('/') + 1:]
file_output += " { \"" + child[0] + "\", \"" + title + "\", \"" + child[2] + "\", " + child[3] + ", NULL },\n"
file_output += " { NULL }\n};\n"
i = i + 1
# Sort demos by title
demos = sorted(demos, key=lambda x: x[1])
file_output += "\nDemo gtk_demos[] = {\n"
for demo in demos:
# Do not generate one of these for demos with a parent demo
if "/" not in demo[1]:
child_array = "NULL"
name = demo[0];
title = demo[1];
file = demo[2]
if name != "NULL":
name = "\"" + name + "\""
if title != "NULL":
title = "\"" + title + "\""
if file != "NULL":
file = "\"" + file + "\""
if demo[4] != -1:
child_array = "child" + str(demo[4])
file_output += " { " + name + ", " + title + ", " + file + ", " + demo[3] + ", " + child_array + " },\n"
file_output += " { NULL }\n};\n"
ofile = open(out_file, "w")
ofile.write(file_output)
ofile.close()

111
demos/gtk-demo/meson.build Normal file
View File

@@ -0,0 +1,111 @@
## These should be in the order you want them to appear in the
## demo app, which means alphabetized by demo title, not filename
demos = files([
'application_demo.c',
'assistant.c',
'builder.c',
'button_box.c',
'changedisplay.c',
'clipboard.c',
'colorsel.c',
'combobox.c',
'css_accordion.c',
'css_basics.c',
'css_blendmodes.c',
'css_multiplebgs.c',
'css_pixbufs.c',
'css_shadows.c',
'cursors.c',
'dialog.c',
'drawingarea.c',
'editable_cells.c',
'entry_buffer.c',
'entry_completion.c',
'event_axes.c',
'expander.c',
'filtermodel.c',
'foreigndrawing.c',
'gestures.c',
'glarea.c',
'headerbar.c',
'hypertext.c',
'iconview.c',
'iconview_edit.c',
'images.c',
'infobar.c',
'links.c',
'listbox.c',
'flowbox.c',
'list_store.c',
'markup.c',
'menus.c',
'modelbutton.c',
'overlay.c',
'overlay2.c',
'panes.c',
'pickers.c',
'pixbufs.c',
'popover.c',
'printing.c',
'revealer.c',
'rotated_text.c',
'scale.c',
'search_entry.c',
'search_entry2.c',
'shortcuts.c',
'sidebar.c',
'sizegroup.c',
'spinbutton.c',
'spinner.c',
'stack.c',
'textmask.c',
'textview.c',
'textscroll.c',
'theming_style_classes.c',
'toolpalette.c',
'transparent.c',
'tree_store.c',
])
gtkdemo_deps = [libgtk_dep]
if harfbuzz_dep.found() and pangoft_dep.found()
demos += files('font_features.c')
gtkdemo_deps += harfbuzz_dep
endif
if os_unix
demos += files('pagesetup.c')
endif
gtkdemo_sources = demos + files([
'main.c',
])
geninclude = find_program('geninclude.py')
demos_h = custom_target(
'gtk3 demo header',
output : 'demos.h',
input : demos,
command : [geninclude, '@OUTPUT@', '@INPUT@'],
)
gtkdemo_resources = gnome.compile_resources(
'gtkdemo_resources',
'demo.gresource.xml',
source_dir: '.'
)
gtkdemo = executable(
'gtk3-demo',
gtkdemo_sources,
demos_h,
gtkdemo_resources,
dependencies: gtkdemo_deps,
include_directories : confinc,
gui_app: true,
install: true
)

View File

@@ -0,0 +1,22 @@
iconbrowser_sources = [
'main.c',
'iconbrowserapp.c',
'iconbrowserwin.c',
'iconstore.c'
]
iconbrowser_resources = gnome.compile_resources(
'iconbrowser_resources',
'iconbrowser.gresource.xml',
source_dir: '.'
)
iconbrowser = executable(
'gtk3-icon-browser',
iconbrowser_sources,
iconbrowser_resources,
dependencies: libgtk_dep,
include_directories : confinc,
gui_app: true,
install: true
)

3
demos/meson.build Normal file
View File

@@ -0,0 +1,3 @@
subdir('icon-browser')
subdir('widget-factory')
subdir('gtk-demo')

View File

@@ -0,0 +1,20 @@
widgetfactory_sources = [
'widget-factory.c'
]
widgetfactory_resources = gnome.compile_resources(
'widgetfactory_resources',
'widget-factory.gresource.xml',
source_dir: '.'
)
widget_factory = executable(
'gtk3-widget-factory',
widgetfactory_sources,
widgetfactory_resources,
dependencies: libgtk_dep,
include_directories : confinc,
gui_app: true,
install: true
)

View File

@@ -0,0 +1,11 @@
app1 = executable(
'exampleapp',
'main.c',
'exampleapp.c',
'exampleapp.h',
'exampleappwin.c',
'exampleappwin.h',
dependencies: libgtk_dep
)

View File

@@ -0,0 +1,23 @@
app10_resources = gnome.compile_resources(
'exampleapp10 resources',
'exampleapp.gresource.xml',
source_dir: '.'
)
app10_schemas = gnome.compile_schemas()
app10 = executable(
'exampleapp10',
'main.c',
'exampleapp.c',
'exampleapp.h',
'exampleappwin.c',
'exampleappwin.h',
'exampleappprefs.c',
'exampleappprefs.h',
app10_resources,
app10_schemas,
dependencies: libgtk_dep
)

View File

@@ -0,0 +1,17 @@
app2_resources = gnome.compile_resources(
'exampleapp2 resources',
'exampleapp.gresource.xml',
source_dir: '.'
)
app2 = executable(
'exampleapp2',
'main.c',
'exampleapp.c',
'exampleapp.h',
'exampleappwin.c',
'exampleappwin.h',
app2_resources,
dependencies: libgtk_dep
)

View File

@@ -0,0 +1,17 @@
app3_resources = gnome.compile_resources(
'exampleapp3 resources',
'exampleapp.gresource.xml',
source_dir: '.'
)
app3 = executable(
'exampleapp3',
'main.c',
'exampleapp.c',
'exampleapp.h',
'exampleappwin.c',
'exampleappwin.h',
app3_resources,
dependencies: libgtk_dep
)

View File

@@ -0,0 +1,17 @@
app4_resources = gnome.compile_resources(
'exampleapp4 resources',
'exampleapp.gresource.xml',
source_dir: '.'
)
app4 = executable(
'exampleapp4',
'main.c',
'exampleapp.c',
'exampleapp.h',
'exampleappwin.c',
'exampleappwin.h',
app4_resources,
dependencies: libgtk_dep
)

View File

@@ -0,0 +1,21 @@
app5_resources = gnome.compile_resources(
'exampleapp5 resources',
'exampleapp.gresource.xml',
source_dir: '.'
)
app5_schemas = gnome.compile_schemas()
app5 = executable(
'exampleapp5',
'main.c',
'exampleapp.c',
'exampleapp.h',
'exampleappwin.c',
'exampleappwin.h',
app5_resources,
app5_schemas,
dependencies: libgtk_dep
)

View File

@@ -0,0 +1,23 @@
app6_resources = gnome.compile_resources(
'exampleapp6 resources',
'exampleapp.gresource.xml',
source_dir: '.'
)
app6_schemas = gnome.compile_schemas()
app6 = executable(
'exampleapp6',
'main.c',
'exampleapp.c',
'exampleapp.h',
'exampleappwin.c',
'exampleappwin.h',
'exampleappprefs.c',
'exampleappprefs.h',
app6_resources,
app6_schemas,
dependencies: libgtk_dep
)

View File

@@ -0,0 +1,23 @@
app7_resources = gnome.compile_resources(
'exampleapp7 resources',
'exampleapp.gresource.xml',
source_dir: '.'
)
app7_schemas = gnome.compile_schemas()
app7 = executable(
'exampleapp7',
'main.c',
'exampleapp.c',
'exampleapp.h',
'exampleappwin.c',
'exampleappwin.h',
'exampleappprefs.c',
'exampleappprefs.h',
app7_resources,
app7_schemas,
dependencies: libgtk_dep
)

View File

@@ -0,0 +1,23 @@
app8_resources = gnome.compile_resources(
'exampleapp8 resources',
'exampleapp.gresource.xml',
source_dir: '.'
)
app8_schemas = gnome.compile_schemas()
app8 = executable(
'exampleapp8',
'main.c',
'exampleapp.c',
'exampleapp.h',
'exampleappwin.c',
'exampleappwin.h',
'exampleappprefs.c',
'exampleappprefs.h',
app8_resources,
app8_schemas,
dependencies: libgtk_dep
)

View File

@@ -0,0 +1,23 @@
app9_resources = gnome.compile_resources(
'exampleapp9 resources',
'exampleapp.gresource.xml',
source_dir: '.'
)
app9_schemas = gnome.compile_schemas()
app9 = executable(
'exampleapp9',
'main.c',
'exampleapp.c',
'exampleapp.h',
'exampleappwin.c',
'exampleappwin.h',
'exampleappprefs.c',
'exampleappprefs.h',
app9_resources,
app9_schemas,
dependencies: libgtk_dep
)

14
examples/bp/meson.build Normal file
View File

@@ -0,0 +1,14 @@
bp_resources = gnome.compile_resources(
'bloatpad resources',
'bloatpad.gresources.xml',
source_dir: '.'
)
bloatpad = executable(
'bloatpad',
'bloatpad.c',
bp_resources,
dependencies: libgtk_dep
)

View File

@@ -125,8 +125,6 @@ close_window (void)
{
if (surface)
cairo_surface_destroy (surface);
gtk_main_quit ();
}
static void

60
examples/meson.build Normal file
View File

@@ -0,0 +1,60 @@
builder_example = executable(
'builder_example',
'builder.c',
dependencies: libgtk_dep
)
drawing = executable(
'drawing',
'drawing.c',
dependencies: libgtk_dep
)
grid_packing = executable(
'grid-packing',
'grid-packing.c',
dependencies: libgtk_dep
)
hello_world = executable(
'hello-world',
'hello-world.c',
dependencies: libgtk_dep
)
plugman = executable(
'plugman',
'plugman.c',
dependencies: libgtk_dep
)
search_bar = executable(
'search-bar',
'search-bar.c',
dependencies: libgtk_dep
)
sunny = executable(
'sunny',
'sunny.c',
dependencies: libgtk_dep
)
window_default = executable(
'window-default',
'window-default.c',
dependencies: libgtk_dep
)
subdir('bp')
subdir('application1')
subdir('application2')
subdir('application3')
subdir('application4')
subdir('application5')
subdir('application6')
subdir('application7')
subdir('application8')
subdir('application9')
subdir('application10')

View File

@@ -51,7 +51,8 @@ AM_CPPFLAGS = \
# setup source file variables
#
#
# GDK header files for public installation (non-generated)
#
#GDK header files for public installation (non-generated)
#
#
gdk_public_h_sources = \

15
gdk/gdk.gresource.xml Normal file
View File

@@ -0,0 +1,15 @@
<?xml version='1.0' encoding='UTF-8'?>
<gresources>
<gresource prefix='/org/gtk/libgdk'>
<file alias='glsl/gl2-texture-2d.fs.glsl'>resources/glsl/gl2-texture-2d.fs.glsl</file>
<file alias='glsl/gl2-texture-2d.vs.glsl'>resources/glsl/gl2-texture-2d.vs.glsl</file>
<file alias='glsl/gl2-texture-rect.fs.glsl'>resources/glsl/gl2-texture-rect.fs.glsl</file>
<file alias='glsl/gl2-texture-rect.vs.glsl'>resources/glsl/gl2-texture-rect.vs.glsl</file>
<file alias='glsl/gl3-texture-2d.fs.glsl'>resources/glsl/gl3-texture-2d.fs.glsl</file>
<file alias='glsl/gl3-texture-2d.vs.glsl'>resources/glsl/gl3-texture-2d.vs.glsl</file>
<file alias='glsl/gl3-texture-rect.fs.glsl'>resources/glsl/gl3-texture-rect.fs.glsl</file>
<file alias='glsl/gl3-texture-rect.vs.glsl'>resources/glsl/gl3-texture-rect.vs.glsl</file>
<file alias='glsl/gles2-texture.fs.glsl'>resources/glsl/gles2-texture.fs.glsl</file>
<file alias='glsl/gles2-texture.vs.glsl'>resources/glsl/gles2-texture.vs.glsl</file>
</gresource>
</gresources>

View File

@@ -0,0 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<gresources>
<gresource prefix='/org/gtk/libgdk'>
@GDK_GRESOURCE_XML_FILES@
</gresource>
</gresources>

19
gdk/gdkconfig.h.meson Normal file
View File

@@ -0,0 +1,19 @@
#ifndef __GDKCONFIG_H__
#define __GDKCONFIG_H__
#if !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
#error "Only <gdk/gdk.h> can be included directly."
#endif
#include <glib.h>
G_BEGIN_DECLS
#mesondefine GDK_WINDOWING_X11
#mesondefine GDK_WINDOWING_BROADWAY
#mesondefine GDK_WINDOWING_WAYLAND
G_END_DECLS
#endif /* __GDKCONFIG_H__ */

View File

@@ -0,0 +1,416 @@
/* gdkversionmacros.h - version boundaries checks
* Copyright (C) 2012 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.▸ See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#if !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
#error "Only <gdk/gdk.h> can be included directly."
#endif
#ifndef __GDK_VERSION_MACROS_H__
#define __GDK_VERSION_MACROS_H__
#include <glib.h>
#mesondefine GDK_MAJOR_VERSION
#mesondefine GDK_MINOR_VERSION
#mesondefine GDK_MICRO_VERSION
#ifndef _GDK_EXTERN
#define _GDK_EXTERN extern
#endif
/**
* GDK_DISABLE_DEPRECATION_WARNINGS:
*
* A macro that should be defined before including the gdk.h header.
* If it is defined, no compiler warnings will be produced for uses
* of deprecated GDK and GTK+ APIs.
*/
#ifdef GDK_DISABLE_DEPRECATION_WARNINGS
#define GDK_DEPRECATED _GDK_EXTERN
#define GDK_DEPRECATED_FOR(f) _GDK_EXTERN
#define GDK_UNAVAILABLE(maj,min) _GDK_EXTERN
#else
#define GDK_DEPRECATED G_DEPRECATED _GDK_EXTERN
#define GDK_DEPRECATED_FOR(f) G_DEPRECATED_FOR(f) _GDK_EXTERN
#define GDK_UNAVAILABLE(maj,min) G_UNAVAILABLE(maj,min) _GDK_EXTERN
#endif
/* XXX: Every new stable minor release bump should add a macro here */
/**
* GDK_VERSION_3_0:
*
* A macro that evaluates to the 3.0 version of GDK, in a format
* that can be used by the C pre-processor.
*
* Since: 3.4
*/
#define GDK_VERSION_3_0 (G_ENCODE_VERSION (3, 0))
/**
* GDK_VERSION_3_2:
*
* A macro that evaluates to the 3.2 version of GDK, in a format
* that can be used by the C pre-processor.
*
* Since: 3.4
*/
#define GDK_VERSION_3_2 (G_ENCODE_VERSION (3, 2))
/**
* GDK_VERSION_3_4:
*
* A macro that evaluates to the 3.4 version of GDK, in a format
* that can be used by the C pre-processor.
*
* Since: 3.4
*/
#define GDK_VERSION_3_4 (G_ENCODE_VERSION (3, 4))
/**
* GDK_VERSION_3_6:
*
* A macro that evaluates to the 3.6 version of GDK, in a format
* that can be used by the C pre-processor.
*
* Since: 3.6
*/
#define GDK_VERSION_3_6 (G_ENCODE_VERSION (3, 6))
/**
* GDK_VERSION_3_8:
*
* A macro that evaluates to the 3.8 version of GDK, in a format
* that can be used by the C pre-processor.
*
* Since: 3.8
*/
#define GDK_VERSION_3_8 (G_ENCODE_VERSION (3, 8))
/**
* GDK_VERSION_3_10:
*
* A macro that evaluates to the 3.10 version of GDK, in a format
* that can be used by the C pre-processor.
*
* Since: 3.10
*/
#define GDK_VERSION_3_10 (G_ENCODE_VERSION (3, 10))
/**
* GDK_VERSION_3_12:
*
* A macro that evaluates to the 3.12 version of GDK, in a format
* that can be used by the C pre-processor.
*
* Since: 3.12
*/
#define GDK_VERSION_3_12 (G_ENCODE_VERSION (3, 12))
/**
* GDK_VERSION_3_14:
*
* A macro that evaluates to the 3.14 version of GDK, in a format
* that can be used by the C pre-processor.
*
* Since: 3.14
*/
#define GDK_VERSION_3_14 (G_ENCODE_VERSION (3, 14))
/**
* GDK_VERSION_3_16:
*
* A macro that evaluates to the 3.16 version of GDK, in a format
* that can be used by the C pre-processor.
*
* Since: 3.16
*/
#define GDK_VERSION_3_16 (G_ENCODE_VERSION (3, 16))
/**
* GDK_VERSION_3_18:
*
* A macro that evaluates to the 3.18 version of GDK, in a format
* that can be used by the C pre-processor.
*
* Since: 3.18
*/
#define GDK_VERSION_3_18 (G_ENCODE_VERSION (3, 18))
/**
* GDK_VERSION_3_20:
*
* A macro that evaluates to the 3.20 version of GDK, in a format
* that can be used by the C pre-processor.
*
* Since: 3.18
*/
#define GDK_VERSION_3_20 (G_ENCODE_VERSION (3, 20))
/**
* GDK_VERSION_3_22:
*
* A macro that evaluates to the 3.22 version of GDK, in a format
* that can be used by the C pre-processor.
*
* Since: 3.20
*/
#define GDK_VERSION_3_22 (G_ENCODE_VERSION (3, 22))
/* evaluates to the current stable version; for development cycles,
* this means the next stable target
*/
#if (GDK_MINOR_VERSION % 2)
#define GDK_VERSION_CUR_STABLE (G_ENCODE_VERSION (GDK_MAJOR_VERSION, GDK_MINOR_VERSION + 1))
#else
#define GDK_VERSION_CUR_STABLE (G_ENCODE_VERSION (GDK_MAJOR_VERSION, GDK_MINOR_VERSION))
#endif
/* evaluates to the previous stable version */
#if (GDK_MINOR_VERSION % 2)
#define GDK_VERSION_PREV_STABLE (G_ENCODE_VERSION (GDK_MAJOR_VERSION, GDK_MINOR_VERSION - 1))
#else
#define GDK_VERSION_PREV_STABLE (G_ENCODE_VERSION (GDK_MAJOR_VERSION, GDK_MINOR_VERSION - 2))
#endif
/**
* GDK_VERSION_MIN_REQUIRED:
*
* A macro that should be defined by the user prior to including
* the gdk.h header.
* The definition should be one of the predefined GDK version
* macros: %GDK_VERSION_3_0, %GDK_VERSION_3_2,...
*
* This macro defines the lower bound for the GDK API to use.
*
* If a function has been deprecated in a newer version of GDK,
* it is possible to use this symbol to avoid the compiler warnings
* without disabling warning for every deprecated function.
*
* Since: 3.4
*/
#ifndef GDK_VERSION_MIN_REQUIRED
# define GDK_VERSION_MIN_REQUIRED (GDK_VERSION_CUR_STABLE)
#endif
/**
* GDK_VERSION_MAX_ALLOWED:
*
* A macro that should be defined by the user prior to including
* the gdk.h header.
* The definition should be one of the predefined GDK version
* macros: %GDK_VERSION_3_0, %GDK_VERSION_3_2,...
*
* This macro defines the upper bound for the GDK API to use.
*
* If a function has been introduced in a newer version of GDK,
* it is possible to use this symbol to get compiler warnings when
* trying to use that function.
*
* Since: 3.4
*/
#ifndef GDK_VERSION_MAX_ALLOWED
# if GDK_VERSION_MIN_REQUIRED > GDK_VERSION_PREV_STABLE
# define GDK_VERSION_MAX_ALLOWED GDK_VERSION_MIN_REQUIRED
# else
# define GDK_VERSION_MAX_ALLOWED GDK_VERSION_CUR_STABLE
# endif
#endif
/* sanity checks */
#if GDK_VERSION_MAX_ALLOWED < GDK_VERSION_MIN_REQUIRED
#error "GDK_VERSION_MAX_ALLOWED must be >= GDK_VERSION_MIN_REQUIRED"
#endif
#if GDK_VERSION_MIN_REQUIRED < GDK_VERSION_3_0
#error "GDK_VERSION_MIN_REQUIRED must be >= GDK_VERSION_3_0"
#endif
#define GDK_AVAILABLE_IN_ALL _GDK_EXTERN
/* XXX: Every new stable minor release should add a set of macros here */
#if GDK_VERSION_MIN_REQUIRED >= GDK_VERSION_3_0
# define GDK_DEPRECATED_IN_3_0 GDK_DEPRECATED
# define GDK_DEPRECATED_IN_3_0_FOR(f) GDK_DEPRECATED_FOR(f)
#else
# define GDK_DEPRECATED_IN_3_0 _GDK_EXTERN
# define GDK_DEPRECATED_IN_3_0_FOR(f) _GDK_EXTERN
#endif
#if GDK_VERSION_MAX_ALLOWED < GDK_VERSION_3_0
# define GDK_AVAILABLE_IN_3_0 GDK_UNAVAILABLE(3, 0)
#else
# define GDK_AVAILABLE_IN_3_0 _GDK_EXTERN
#endif
#if GDK_VERSION_MIN_REQUIRED >= GDK_VERSION_3_2
# define GDK_DEPRECATED_IN_3_2 GDK_DEPRECATED
# define GDK_DEPRECATED_IN_3_2_FOR(f) GDK_DEPRECATED_FOR(f)
#else
# define GDK_DEPRECATED_IN_3_2 _GDK_EXTERN
# define GDK_DEPRECATED_IN_3_2_FOR(f) _GDK_EXTERN
#endif
#if GDK_VERSION_MAX_ALLOWED < GDK_VERSION_3_2
# define GDK_AVAILABLE_IN_3_2 GDK_UNAVAILABLE(3, 2)
#else
# define GDK_AVAILABLE_IN_3_2 _GDK_EXTERN
#endif
#if GDK_VERSION_MIN_REQUIRED >= GDK_VERSION_3_4
# define GDK_DEPRECATED_IN_3_4 GDK_DEPRECATED
# define GDK_DEPRECATED_IN_3_4_FOR(f) GDK_DEPRECATED_FOR(f)
#else
# define GDK_DEPRECATED_IN_3_4 _GDK_EXTERN
# define GDK_DEPRECATED_IN_3_4_FOR(f) _GDK_EXTERN
#endif
#if GDK_VERSION_MAX_ALLOWED < GDK_VERSION_3_4
# define GDK_AVAILABLE_IN_3_4 GDK_UNAVAILABLE(3, 4)
#else
# define GDK_AVAILABLE_IN_3_4 _GDK_EXTERN
#endif
#if GDK_VERSION_MIN_REQUIRED >= GDK_VERSION_3_6
# define GDK_DEPRECATED_IN_3_6 GDK_DEPRECATED
# define GDK_DEPRECATED_IN_3_6_FOR(f) GDK_DEPRECATED_FOR(f)
#else
# define GDK_DEPRECATED_IN_3_6 _GDK_EXTERN
# define GDK_DEPRECATED_IN_3_6_FOR(f) _GDK_EXTERN
#endif
#if GDK_VERSION_MAX_ALLOWED < GDK_VERSION_3_6
# define GDK_AVAILABLE_IN_3_6 GDK_UNAVAILABLE(3, 6)
#else
# define GDK_AVAILABLE_IN_3_6 _GDK_EXTERN
#endif
#if GDK_VERSION_MIN_REQUIRED >= GDK_VERSION_3_8
# define GDK_DEPRECATED_IN_3_8 GDK_DEPRECATED
# define GDK_DEPRECATED_IN_3_8_FOR(f) GDK_DEPRECATED_FOR(f)
#else
# define GDK_DEPRECATED_IN_3_8 _GDK_EXTERN
# define GDK_DEPRECATED_IN_3_8_FOR(f) _GDK_EXTERN
#endif
#if GDK_VERSION_MAX_ALLOWED < GDK_VERSION_3_8
# define GDK_AVAILABLE_IN_3_8 GDK_UNAVAILABLE(3, 8)
#else
# define GDK_AVAILABLE_IN_3_8 _GDK_EXTERN
#endif
#if GDK_VERSION_MIN_REQUIRED >= GDK_VERSION_3_10
# define GDK_DEPRECATED_IN_3_10 GDK_DEPRECATED
# define GDK_DEPRECATED_IN_3_10_FOR(f) GDK_DEPRECATED_FOR(f)
#else
# define GDK_DEPRECATED_IN_3_10 _GDK_EXTERN
# define GDK_DEPRECATED_IN_3_10_FOR(f) _GDK_EXTERN
#endif
#if GDK_VERSION_MAX_ALLOWED < GDK_VERSION_3_10
# define GDK_AVAILABLE_IN_3_10 GDK_UNAVAILABLE(3, 10)
#else
# define GDK_AVAILABLE_IN_3_10 _GDK_EXTERN
#endif
#if GDK_VERSION_MIN_REQUIRED >= GDK_VERSION_3_12
# define GDK_DEPRECATED_IN_3_12 GDK_DEPRECATED
# define GDK_DEPRECATED_IN_3_12_FOR(f) GDK_DEPRECATED_FOR(f)
#else
# define GDK_DEPRECATED_IN_3_12 _GDK_EXTERN
# define GDK_DEPRECATED_IN_3_12_FOR(f) _GDK_EXTERN
#endif
#if GDK_VERSION_MAX_ALLOWED < GDK_VERSION_3_12
# define GDK_AVAILABLE_IN_3_12 GDK_UNAVAILABLE(3, 12)
#else
# define GDK_AVAILABLE_IN_3_12 _GDK_EXTERN
#endif
#if GDK_VERSION_MIN_REQUIRED >= GDK_VERSION_3_14
# define GDK_DEPRECATED_IN_3_14 GDK_DEPRECATED
# define GDK_DEPRECATED_IN_3_14_FOR(f) GDK_DEPRECATED_FOR(f)
#else
# define GDK_DEPRECATED_IN_3_14 _GDK_EXTERN
# define GDK_DEPRECATED_IN_3_14_FOR(f) _GDK_EXTERN
#endif
#if GDK_VERSION_MAX_ALLOWED < GDK_VERSION_3_14
# define GDK_AVAILABLE_IN_3_14 GDK_UNAVAILABLE(3, 14)
#else
# define GDK_AVAILABLE_IN_3_14 _GDK_EXTERN
#endif
#if GDK_VERSION_MIN_REQUIRED >= GDK_VERSION_3_16
# define GDK_DEPRECATED_IN_3_16 GDK_DEPRECATED
# define GDK_DEPRECATED_IN_3_16_FOR(f) GDK_DEPRECATED_FOR(f)
#else
# define GDK_DEPRECATED_IN_3_16 _GDK_EXTERN
# define GDK_DEPRECATED_IN_3_16_FOR(f) _GDK_EXTERN
#endif
#if GDK_VERSION_MAX_ALLOWED < GDK_VERSION_3_16
# define GDK_AVAILABLE_IN_3_16 GDK_UNAVAILABLE(3, 16)
#else
# define GDK_AVAILABLE_IN_3_16 _GDK_EXTERN
#endif
#if GDK_VERSION_MIN_REQUIRED >= GDK_VERSION_3_18
# define GDK_DEPRECATED_IN_3_18 GDK_DEPRECATED
# define GDK_DEPRECATED_IN_3_18_FOR(f) GDK_DEPRECATED_FOR(f)
#else
# define GDK_DEPRECATED_IN_3_18 _GDK_EXTERN
# define GDK_DEPRECATED_IN_3_18_FOR(f) _GDK_EXTERN
#endif
#if GDK_VERSION_MAX_ALLOWED < GDK_VERSION_3_18
# define GDK_AVAILABLE_IN_3_18 GDK_UNAVAILABLE(3, 18)
#else
# define GDK_AVAILABLE_IN_3_18 _GDK_EXTERN
#endif
#if GDK_VERSION_MIN_REQUIRED >= GDK_VERSION_3_20
# define GDK_DEPRECATED_IN_3_20 GDK_DEPRECATED
# define GDK_DEPRECATED_IN_3_20_FOR(f) GDK_DEPRECATED_FOR(f)
#else
# define GDK_DEPRECATED_IN_3_20 _GDK_EXTERN
# define GDK_DEPRECATED_IN_3_20_FOR(f) _GDK_EXTERN
#endif
#if GDK_VERSION_MAX_ALLOWED < GDK_VERSION_3_20
# define GDK_AVAILABLE_IN_3_20 GDK_UNAVAILABLE(3, 20)
#else
# define GDK_AVAILABLE_IN_3_20 _GDK_EXTERN
#endif
#if GDK_VERSION_MIN_REQUIRED >= GDK_VERSION_3_22
# define GDK_DEPRECATED_IN_3_22 GDK_DEPRECATED
# define GDK_DEPRECATED_IN_3_22_FOR(f) GDK_DEPRECATED_FOR(f)
#else
# define GDK_DEPRECATED_IN_3_22 _GDK_EXTERN
# define GDK_DEPRECATED_IN_3_22_FOR(f) _GDK_EXTERN
#endif
#if GDK_VERSION_MAX_ALLOWED < GDK_VERSION_3_22
# define GDK_AVAILABLE_IN_3_22 GDK_UNAVAILABLE(3, 22)
#else
# define GDK_AVAILABLE_IN_3_22 _GDK_EXTERN
#endif
#endif /* __GDK_VERSION_MACROS_H__ */

418
gdk/meson.build Normal file
View File

@@ -0,0 +1,418 @@
gdk_sources = files([
'gdk-private.c',
'gdk.c',
'gdkapplaunchcontext.c',
'gdkcairo.c',
'gdkcursor.c',
'gdkdeprecated.c',
'gdkdevice.c',
'gdkdevicemanager.c',
'gdkdevicepad.c',
'gdkdevicetool.c',
'gdkdisplay.c',
'gdkdisplaymanager.c',
'gdkdnd.c',
'gdkdrawingcontext.c',
'gdkevents.c',
'gdkframeclock.c',
'gdkframeclockidle.c',
'gdkframetimings.c',
'gdkgl.c',
'gdkglcontext.c',
'gdkglobals.c',
'gdkkeys.c',
'gdkkeyuni.c',
'gdkmonitor.c',
'gdkpango.c',
'gdkpixbuf-drawable.c',
'gdkproperty.c',
'gdkrectangle.c',
'gdkrgba.c',
'gdkscreen.c',
'gdkseat.c',
'gdkseatdefault.c',
'gdkselection.c',
'gdkvisual.c',
'gdkwindow.c',
'gdkwindowimpl.c',
])
gdk_public_h_sources = files([
'gdk-autocleanup.h',
'gdk.h',
'gdkapplaunchcontext.h',
'gdkcairo.h',
'gdkcursor.h',
'gdkdevice.h',
'gdkdevicemanager.h',
'gdkdevicepad.h',
'gdkdevicetool.h',
'gdkdisplay.h',
'gdkdisplaymanager.h',
'gdkdnd.h',
'gdkdrawingcontext.h',
'gdkevents.h',
'gdkframeclock.h',
'gdkframetimings.h',
'gdkglcontext.h',
'gdkkeys.h',
'gdkkeysyms-compat.h',
'gdkkeysyms.h',
'gdkmain.h',
'gdkmonitor.h',
'gdkpango.h',
'gdkpixbuf.h',
'gdkprivate.h',
'gdkproperty.h',
'gdkrectangle.h',
'gdkrgba.h',
'gdkscreen.h',
'gdkseat.h',
'gdkselection.h',
'gdktestutils.h',
'gdkthreads.h',
'gdktypes.h',
'gdkvisual.h',
'gdkwindow.h',
])
gdk_private_h_sources = files([
'gdkdevicetoolprivate.h',
'gdkdrawingcontextprivate.h',
'gdkmonitorprivate.h',
'gdkprivate.h',
'gdkseatdefaultprivate.h',
])
gdk_x_sources = files([
'x11/MwmUtil.h',
'x11/gdkapplaunchcontext-x11.c',
'x11/gdkasync.c',
'x11/gdkasync.h',
'x11/gdkcursor-x11.c',
'x11/gdkdevice-core-x11.c',
'x11/gdkdevice-xi2.c',
'x11/gdkdevicemanager-core-x11.c',
'x11/gdkdevicemanager-x11.c',
'x11/gdkdevicemanager-xi2.c',
'x11/gdkdisplay-x11.c',
'x11/gdkdisplay-x11.h',
'x11/gdkdisplaymanager-x11.c',
'x11/gdkdnd-x11.c',
'x11/gdkeventsource.c',
'x11/gdkeventsource.h',
'x11/gdkeventtranslator.c',
'x11/gdkeventtranslator.h',
'x11/gdkgeometry-x11.c',
'x11/gdkglcontext-x11.c',
'x11/gdkglcontext-x11.h',
'x11/gdkkeys-x11.c',
'x11/gdkmain-x11.c',
'x11/gdkmonitor-x11.c',
'x11/gdkmonitor-x11.h',
'x11/gdkproperty-x11.c',
'x11/gdkscreen-x11.c',
'x11/gdkscreen-x11.h',
'x11/gdkselection-x11.c',
'x11/gdktestutils-x11.c',
'x11/gdkvisual-x11.c',
'x11/gdkwindow-x11.c',
'x11/gdkwindow-x11.h',
'x11/gdkx.h',
'x11/gdkx11monitor.h',
'x11/gdkxftdefaults.c',
'x11/gdkxid.c',
'x11/xsettings-client.c',
'x11/xsettings-client.h',
])
gdk_x_private_sources = files([
'x11/gdkdevicemanagerprivate-core.h',
'x11/gdkprivate-x11.h',
])
gdk_x_public_headers = files([
'x11/gdkx-autocleanups.h',
'x11/gdkx11applaunchcontext.h',
'x11/gdkx11cursor.h',
'x11/gdkx11device-core.h',
'x11/gdkx11device-xi2.h',
'x11/gdkx11device.h',
'x11/gdkx11devicemanager-core.h',
'x11/gdkx11devicemanager-xi2.h',
'x11/gdkx11devicemanager.h',
'x11/gdkx11display.h',
'x11/gdkx11displaymanager.h',
'x11/gdkx11dnd.h',
'x11/gdkx11glcontext.h',
'x11/gdkx11keys.h',
'x11/gdkx11monitor.h',
'x11/gdkx11property.h',
'x11/gdkx11screen.h',
'x11/gdkx11selection.h',
'x11/gdkx11utils.h',
'x11/gdkx11visual.h',
'x11/gdkx11window.h',
])
gdk_wayland_sources = files([
'wayland/gdkapplaunchcontext-wayland.c',
'wayland/gdkcursor-wayland.c',
'wayland/gdkdevice-wayland.c',
'wayland/gdkdisplay-wayland.c',
'wayland/gdkdisplay-wayland.h',
'wayland/gdkdnd-wayland.c',
'wayland/gdkeventsource.c',
'wayland/gdkglcontext-wayland.c',
'wayland/gdkglcontext-wayland.h',
'wayland/gdkkeys-wayland.c',
'wayland/gdkmonitor-wayland.c',
'wayland/gdkmonitor-wayland.h',
'wayland/gdkscreen-wayland.c',
'wayland/gdkseat-wayland.h',
'wayland/gdkselection-wayland.c',
'wayland/gdkwayland.h',
'wayland/gdkwaylanddevice.h',
'wayland/gdkwaylanddisplay.h',
'wayland/gdkwaylandglcontext.h',
'wayland/gdkwaylandmonitor.h',
'wayland/gdkwaylandselection.h',
'wayland/gdkwaylandwindow.h',
'wayland/gdkwindow-wayland.c',
'wayland/wm-button-layout-translation.c',
])
gdk_wayland_public_headers = files([
'wayland/gdkwaylanddevice.h',
'wayland/gdkwaylanddisplay.h',
'wayland/gdkwaylandglcontext.h',
'wayland/gdkwaylandselection.h',
'wayland/gdkwaylandwindow.h'
])
gdk_wayland_private_sources = files([
'wayland/gdkprivate-wayland.h',
])
gdk_broadway_sources = files([
'broadway/broadway-buffer.c',
'broadway/broadway-buffer.h',
'broadway/broadway-output.c',
'broadway/broadway-output.h',
'broadway/broadway-server.c',
'broadway/broadway-server.h',
'broadway/broadwayd.c',
'broadway/gdkbroadway-server.c',
'broadway/gdkcursor-broadway.c',
'broadway/gdkdevice-broadway.c',
'broadway/gdkdevice-broadway.h',
'broadway/gdkdevicemanager-broadway.c',
'broadway/gdkdevicemanager-broadway.h',
'broadway/gdkdisplay-broadway.c',
'broadway/gdkdisplay-broadway.h',
'broadway/gdkdnd-broadway.c',
'broadway/gdkeventsource.c',
'broadway/gdkeventsource.h',
'broadway/gdkglobals-broadway.c',
'broadway/gdkkeys-broadway.c',
'broadway/gdkmonitor-broadway.c',
'broadway/gdkmonitor-broadway.h',
'broadway/gdkproperty-broadway.c',
'broadway/gdkscreen-broadway.c',
'broadway/gdkscreen-broadway.h',
'broadway/gdkselection-broadway.c',
'broadway/gdktestutils-broadway.c',
'broadway/gdkvisual-broadway.c',
'broadway/gdkwindow-broadway.c',
'broadway/gdkwindow-broadway.h',
])
gdk_broadway_private_sources = files([
'broadway/gdkprivate-broadway.h'
])
# glsl_sources = [
# 'gl3-texture-2d.fs.glsl',
# 'gl3-texture-2d.vs.glsl',
# 'gl3-texture-rect.fs.glsl',
# 'gl3-texture-rect.vs.glsl',
# 'gl2-texture-2d.fs.glsl',
# 'gl2-texture-2d.fs.glsl',
# 'gl2-texture-rect.vs.glsl',
# 'gl2-texture-rect.vs.glsl',
# 'gles2-texture.fs.glsl',
# 'gles2-texture.vs.glsl',
# ]
# resource_xml = ''
# foreach glsl_file : glsl_sources
# resource_xml += ' <file alias="glsl/@0@">resources/glsl/@0@</file>\n'.format(glsl_file)
# endforeach
# cdata = configuration_data()
# cdata.set('GDK_GRESOURCE_XML_FILES', resource_xml)
# gdkresources_xml = configure_file(
# input : 'gdk.gresource.xml.meson',
# output : 'gdk.gresource.xml',
# configuration : cdata
# )
gdkresources = gnome.compile_resources(
'gdkresources',
'gdk.gresource.xml',
source_dir: '.',
c_name: '_gdk',
extra_args: '--manual-register'
)
gdk_headers = gdk_public_h_sources + gdk_private_h_sources
gdkenum_h = custom_target(
'gdkenum_h',
output : 'gdkenumtypes.h',
input : gdk_headers,
command : [mkenum, perl, glib_mkenums, meson.current_source_dir() + '/gdkenumtypes.h.template', '@OUTPUT@', '@INPUT@'])
gdkenum_c = custom_target(
'gdkenum_c',
output : 'gdkenumtypes.c',
input : gdk_headers,
depends : gdkenum_h,
command : [mkenum, perl, glib_mkenums, meson.current_source_dir() + '/gdkenumtypes.c.template', '@OUTPUT@', '@INPUT@'])
gdkmarshal_h = custom_target(
'gdkmarshal_h',
output : 'gdkmarshalers.h',
input : 'gdkmarshalers.list',
command : [mkmarshal, glib_marshal, '_gdk_marshal', '@INPUT@', '@OUTPUT@']
)
gdkmarshal_c = custom_target(
'gdkmarshal_c',
output : 'gdkmarshalers.c',
input : 'gdkmarshalers.list',
command : [mkmarshal, glib_marshal, '_gdk_marshal', '@INPUT@', '@OUTPUT@']
)
cdata = configuration_data()
cdata.set('GTK_MAJOR_VERSION', gtk_major_version)
cdata.set('GTK_MINOR_VERSION', gtk_minor_version)
cdata.set('GTK_MICRO_VERSION', gtk_micro_version)
if x11_enabled cdata.set('GDK_WINDOWING_X11', '') endif
if wayland_enabled cdata.set('GDK_WINDOWING_WAYLAND', '') endif
if broadway_enabled cdata.set('GDK_WINDOWING_BROADWAY', '') endif
gdkconfig = configure_file(
input : 'gdkconfig.h.meson',
output : 'gdkconfig.h',
configuration : cdata,
install_dir: 'include/gtk-4.0/gdk/' # XXX ???
)
gdkversionmacros = configure_file(
input : 'gdkversionmacros.h.in',
output : 'gdkversionmacros.h',
configuration: cdata,
install_dir: 'include/gtk-4.0/gdk/' # XXX ???
)
xinc = include_directories('x11')
wlinc = include_directories('.')
gdk_deps = [
mlib,
pixbuf_dep,
cairo_dep,
pango_dep,
cairogobj_dep,
glib_dep,
epoxy_dep,
fontconfig_dep,
giounix_dep,
pangocairo_dep
]
gdk_sources = [
gdkconfig,
gdk_sources,
gdkenum_c, gdkenum_h,
gdkmarshal_c, gdkmarshal_h,
gdkresources,
gdkversionmacros,
gdk_headers
]
if x11_enabled
gdk_deps += [
xrender_dep,
xi_dep,
xext_dep,
x11_dep,
xcursor_dep,
xdamage_dep,
xfixes_dep,
xcomposite_dep,
xrandr_dep
]
gdk_sources += [
gdk_x_sources,
gdk_x_private_sources
]
# install_headers(gdk_x_public_headers, subdir: 'gtk-3.0/gdk/x11/')
endif
if wayland_enabled
subdir('wayland')
gdk_deps += [
shmlib,
xkbdep,
wlclientdep,
wlprotocolsdep,
wlcursordep,
wlegldep
]
gdk_sources += [
gdk_wayland_sources,
gdk_wayland_private_sources
]
# install_headers(gdk_wayland_public_headers, subdir: 'gtk-3.0/gdk/wayland/')
endif
if broadway_enabled
gdk_deps += [
shmlib,
]
gdk_sources += [
gdk_broadway_sources,
gdk_broadway_private_sources
]
endif
# install_headers(gdk_public_h_sources, subdir: 'gtk-3.0/gdk/')
libgdk = static_library('gdk',
sources: [gdk_sources, gdkconfig, gdkenum_h],
c_args: ['-DHAVE_CONFIG_H', '-DGDK_COMPILATION'],
include_directories: [confinc, xinc, wlinc],
dependencies: gdk_deps,
)
libgdk_dep = declare_dependency(
sources: ['gdk.h', gdkconfig, gdkenum_h],
depends: gdk_sources,
include_directories: [confinc, xinc, wlinc],
dependencies: gdk_deps,
link_with: libgdk,
link_args: ['-Bsymbolic'],
)

View File

@@ -42,10 +42,10 @@
#include "gdkprivate-wayland.h"
#include "gdkglcontext-wayland.h"
#include "gdkwaylandmonitor.h"
#include "pointer-gestures-unstable-v1-client-protocol.h"
#include <wayland/pointer-gestures-unstable-v1-client-protocol.h>
#include "tablet-unstable-v2-client-protocol.h"
#include "xdg-shell-unstable-v6-client-protocol.h"
#include "xdg-foreign-unstable-v1-client-protocol.h"
#include <wayland/xdg-shell-unstable-v6-client-protocol.h>
#include <wayland/xdg-foreign-unstable-v1-client-protocol.h>
/**
* SECTION:wayland_interaction

View File

@@ -32,7 +32,7 @@
#include "gdkinternals.h"
#include "gdkdeviceprivate.h"
#include "gdkprivate-wayland.h"
#include "xdg-shell-unstable-v6-client-protocol.h"
#include <wayland/xdg-shell-unstable-v6-client-protocol.h>
#include <stdlib.h>
#include <stdio.h>
@@ -3205,9 +3205,9 @@ gdk_wayland_window_fullscreen_on_monitor (GdkWindow *window, gint monitor)
{
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
GdkScreen *screen = gdk_window_get_screen (window);
struct wl_output *fullscreen_output =
struct wl_output *fullscreen_output =
_gdk_wayland_screen_get_wl_output (screen, monitor);
if (GDK_WINDOW_DESTROYED (window))
return;
@@ -3245,7 +3245,7 @@ static void
gdk_wayland_window_unfullscreen (GdkWindow *window)
{
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
if (GDK_WINDOW_DESTROYED (window))
return;

49
gdk/wayland/genprotocolfiles.py Executable file
View File

@@ -0,0 +1,49 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
import re
import shutil
import subprocess
scanner = sys.argv[1]
in_file = sys.argv[2]
out_file = sys.argv[3]
#TODO: We can infer this optinon from the name of the output file!
option = sys.argv[4]
pc = subprocess.Popen([scanner, option , in_file , out_file], stdout=subprocess.PIPE)
(stdo, _) = pc.communicate()
if pc.returncode != 0:
sys.exit(pc.returncode)
# Now read the generated file again and remove all WL_EXPORTs
content = ""
with open(out_file, 'r') as content_file:
content = content_file.read()
content = content.replace("WL_EXPORT", "")
ofile = open(out_file, 'w')
ofile.write(content)
ofile.close()
# unstable = False
# if "unstable" in out_file:
# unstable = True
# if out_file.endswith("-protocol.c"):
# print("protocol source")
# elif out_file.endswith("-client-protocol.h"):
# print("client protocol header")
# elif out_file.endswith("-server-protocol.h"):
# print("server protocol header")
# else:
# print("ERROR: '",out_file,"' is not a valid output file")

111
gdk/wayland/meson.build Normal file
View File

@@ -0,0 +1,111 @@
if wayland_enabled
runcmd = run_command('pkg-config', '--variable=pkgdatadir', 'wayland-protocols')
if runcmd.returncode() == 0
wayland_protocols_datadir = runcmd.stdout().strip() + '/'
else
error('Could not get wayland-protocols pkgdatadir via pkg-config.')
endif
wayland_scanner = find_program('wayland-scanner')
genprotocols = find_program('genprotocolfiles.py')
gtk_shell_h = custom_target(
'gtk shell protocol header',
input : 'protocol/gtk-shell.xml',
output : 'gtk-shell-client-protocol.h',
command: [genprotocols, wayland_scanner, '@INPUT@', '@OUTPUT@', 'client-header']
)
gtk_shell_c = custom_target(
'gtk shell protocol source',
input : 'protocol/gtk-shell.xml',
output : 'gtk-shell-protocol.c',
command: [genprotocols, wayland_scanner, '@INPUT@', '@OUTPUT@', 'code']
)
pointer_gestures_h = custom_target(
'pointer gestures header',
input : wayland_protocols_datadir + 'unstable/pointer-gestures/pointer-gestures-unstable-v1.xml',
output : 'pointer-gestures-unstable-v1-client-protocol.h',
command: [genprotocols, wayland_scanner, '@INPUT@', '@OUTPUT@', 'client-header']
)
pointer_gestures_c = custom_target(
'pointer gestures source',
input : wayland_protocols_datadir + 'unstable/pointer-gestures/pointer-gestures-unstable-v1.xml',
output : 'pointer-gestures-unstable-v1-protocol.c',
command: [genprotocols, wayland_scanner, '@INPUT@', '@OUTPUT@', 'code']
)
primary_selection_h = custom_target(
'primary selection header',
input : 'protocol/gtk-primary-selection.xml',
output : 'gtk-primary-selection-client-protocol.h',
command: [genprotocols, wayland_scanner,'@INPUT@', '@OUTPUT@', 'client-header']
)
primary_selection_c = custom_target(
'primary selection source',
input : 'protocol/gtk-primary-selection.xml',
output : 'gtk-primary-selection-protocol.c',
command: [genprotocols, wayland_scanner,'@INPUT@', '@OUTPUT@', 'code']
)
xdg_shell_h = custom_target(
'xdg shell v6 header',
input : wayland_protocols_datadir + 'unstable/xdg-shell/xdg-shell-unstable-v6.xml',
output : 'xdg-shell-unstable-v6-client-protocol.h',
command: [genprotocols, wayland_scanner,'@INPUT@', '@OUTPUT@', 'client-header']
)
xdg_shell_c = custom_target(
'xdg shell v6 source',
input : wayland_protocols_datadir + 'unstable/xdg-shell/xdg-shell-unstable-v6.xml',
output : 'xdg-shell-unstable-v6-protocol.c',
command: [genprotocols, wayland_scanner,'@INPUT@', '@OUTPUT@', 'code']
)
xdg_foreign_h = custom_target(
'xdg foreign v1 header',
input : wayland_protocols_datadir + 'unstable/xdg-foreign/xdg-foreign-unstable-v1.xml',
output : 'xdg-foreign-unstable-v1-client-protocol.h',
command: [genprotocols, wayland_scanner,'@INPUT@', '@OUTPUT@', 'client-header']
)
xdg_foreign_c = custom_target(
'xdg foreign v1 source',
input : wayland_protocols_datadir + 'unstable/xdg-foreign/xdg-foreign-unstable-v1.xml',
output : 'xdg-foreign-unstable-v1-protocol.c',
command: [genprotocols, wayland_scanner,'@INPUT@', '@OUTPUT@', 'code']
)
tablet_h = custom_target(
'tablet v2 header',
input : wayland_protocols_datadir + 'unstable/tablet/tablet-unstable-v2.xml',
output : 'tablet-unstable-v2-client-protocol.h',
command: [genprotocols, wayland_scanner,'@INPUT@', '@OUTPUT@', 'client-header']
)
tablet_c = custom_target(
'tablet v2 source',
input : wayland_protocols_datadir + 'unstable/tablet/tablet-unstable-v2.xml',
output : 'tablet-unstable-v2-protocol.c',
command: [genprotocols, wayland_scanner,'@INPUT@', '@OUTPUT@', 'code']
)
gdk_sources += [
gtk_shell_c,
gtk_shell_h,
pointer_gestures_h,
pointer_gestures_c,
primary_selection_h,
primary_selection_c,
xdg_shell_h,
xdg_shell_c,
xdg_foreign_h,
xdg_foreign_c,
tablet_h,
tablet_c
]
endif

15
gsk/gsk.resources.xml Normal file
View File

@@ -0,0 +1,15 @@
<?xml version='1.0' encoding='UTF-8'?>
<gresources>
<gresource prefix='/org/gtk/libgsk'>
<file alias='glsl/blend.fs.glsl'>resources/glsl/blend.fs.glsl</file>
<file alias='glsl/blend.vs.glsl'>resources/glsl/blend.vs.glsl</file>
<file alias='glsl/blit.fs.glsl'>resources/glsl/blit.fs.glsl</file>
<file alias='glsl/blit.vs.glsl'>resources/glsl/blit.vs.glsl</file>
<file alias='glsl/es2_common.fs.glsl'>resources/glsl/es2_common.fs.glsl</file>
<file alias='glsl/es2_common.vs.glsl'>resources/glsl/es2_common.vs.glsl</file>
<file alias='glsl/gl3_common.fs.glsl'>resources/glsl/gl3_common.fs.glsl</file>
<file alias='glsl/gl3_common.vs.glsl'>resources/glsl/gl3_common.vs.glsl</file>
<file alias='glsl/gl_common.fs.glsl'>resources/glsl/gl_common.fs.glsl</file>
<file alias='glsl/gl_common.vs.glsl'>resources/glsl/gl_common.vs.glsl</file>
</gresource>
</gresources>

78
gsk/meson.build Normal file
View File

@@ -0,0 +1,78 @@
gsk_sources = files([
'gskrenderer.c',
'gskrendernode.c',
'gskrendernodeiter.c',
'gskcairorenderer.c',
'gskdebug.c',
'gskgldriver.c',
'gskglprofiler.c',
'gskglrenderer.c',
'gskprivate.c',
'gskprofiler.c',
'gskshaderbuilder.c',
])
gsk_headers = files([
'gskenums.h',
'gskrenderer.h',
'gskrendernode.h',
'gskrendernodeiter.h',
'gsktypes.h',
'gskcairorendererprivate.h',
'gskdebugprivate.h',
'gskgldriverprivate.h',
'gskglprofilerprivate.h',
'gskglrendererprivate.h',
'gskprivate.h',
'gskprofilerprivate.h',
'gskrendererprivate.h',
'gskrendernodeprivate.h',
'gskshaderbuilderprivate.h',
])
gskenum_h = custom_target(
'gskenum_h',
output : 'gskenumtypes.h',
input : gsk_headers,
command : [mkenum, perl, glib_mkenums, meson.current_source_dir() + '/gskenumtypes.h.template', '@OUTPUT@', '@INPUT@'])
gskenum_c = custom_target(
'gskenum_c',
output : 'gskenumtypes.c',
input : gsk_headers,
depends : gskenum_h,
command : [mkenum, perl, glib_mkenums, meson.current_source_dir() + '/gskenumtypes.c.template', '@OUTPUT@', '@INPUT@'])
gskresources = gnome.compile_resources(
'gskresources',
'gsk.resources.xml',
source_dir: '.',
c_name: '_gsk',
extra_args: '--manual-register'
)
gsk_deps = [
graphene_dep,
pango_dep,
cairo_dep,
pixbuf_dep,
libgdk_dep,
]
libgsk = static_library(
'gsk',
sources: [gsk_sources, gskenum_h, gskresources],
dependencies: gsk_deps,
include_directories: [confinc],
c_args: ['-DGSK_COMPILATION'],
)
libgsk_dep = declare_dependency(
depends: gsk_sources,
link_with: libgsk,
link_args: ['-Bsymbolic'],
include_directories: [confinc],
sources: [gskenum_h, gskresources]
)

109
gtk/a11y/meson.build Normal file
View File

@@ -0,0 +1,109 @@
a11y_sources = files([
'gtkaccessibility.c',
'gtkaccessibilityutil.c',
'gtkbooleancellaccessible.c',
'gtkbuttonaccessible.c',
'gtkcellaccessible.c',
'gtkcellaccessibleparent.c',
'gtkcheckmenuitemaccessible.c',
'gtkcolorswatchaccessible.c',
'gtkcomboboxaccessible.c',
'gtkcontaineraccessible.c',
'gtkcontainercellaccessible.c',
'gtkentryaccessible.c',
'gtkexpanderaccessible.c',
'gtkflowboxaccessible.c',
'gtkflowboxchildaccessible.c',
'gtkframeaccessible.c',
'gtkiconviewaccessible.c',
'gtkimageaccessible.c',
'gtkimagecellaccessible.c',
'gtklabelaccessible.c',
'gtklevelbaraccessible.c',
'gtklinkbuttonaccessible.c',
'gtklistboxaccessible.c',
'gtklistboxrowaccessible.c',
'gtklockbuttonaccessible.c',
'gtkmenuaccessible.c',
'gtkmenubuttonaccessible.c',
'gtkmenuitemaccessible.c',
'gtkmenushellaccessible.c',
'gtknotebookaccessible.c',
'gtknotebookpageaccessible.c',
'gtkpanedaccessible.c',
'gtkpopoveraccessible.c',
'gtkprogressbaraccessible.c',
'gtkradiobuttonaccessible.c',
'gtkradiomenuitemaccessible.c',
'gtkrangeaccessible.c',
'gtkrenderercellaccessible.c',
'gtkscaleaccessible.c',
'gtkscalebuttonaccessible.c',
'gtkscrolledwindowaccessible.c',
'gtkspinbuttonaccessible.c',
'gtkspinneraccessible.c',
'gtkstackaccessible.c',
'gtkstatusbaraccessible.c',
'gtkswitchaccessible.c',
'gtktextcellaccessible.c',
'gtktextviewaccessible.c',
'gtktogglebuttonaccessible.c',
'gtktoplevelaccessible.c',
'gtktreeviewaccessible.c',
'gtkwidgetaccessible.c',
'gtkwindowaccessible.c',
])
a11y_headers = files([
'gtk-a11y-autocleanups.h',
'gtkbooleancellaccessible.h',
'gtkbuttonaccessible.h',
'gtkcellaccessible.h',
'gtkcellaccessibleparent.h',
'gtkcheckmenuitemaccessible.h',
'gtkcomboboxaccessible.h',
'gtkcontaineraccessible.h',
'gtkcontainercellaccessible.h',
'gtkentryaccessible.h',
'gtkexpanderaccessible.h',
'gtkflowboxaccessible.h',
'gtkflowboxchildaccessible.h',
'gtkframeaccessible.h',
'gtkiconviewaccessible.h',
'gtkimageaccessible.h',
'gtkimagecellaccessible.h',
'gtklabelaccessible.h',
'gtklevelbaraccessible.h',
'gtklinkbuttonaccessible.h',
'gtklistboxaccessible.h',
'gtklistboxrowaccessible.h',
'gtklockbuttonaccessible.h',
'gtkmenuaccessible.h',
'gtkmenubuttonaccessible.h',
'gtkmenuitemaccessible.h',
'gtkmenushellaccessible.h',
'gtknotebookaccessible.h',
'gtknotebookpageaccessible.h',
'gtkpanedaccessible.h',
'gtkpopoveraccessible.h',
'gtkprogressbaraccessible.h',
'gtkradiobuttonaccessible.h',
'gtkradiomenuitemaccessible.h',
'gtkrangeaccessible.h',
'gtkrenderercellaccessible.h',
'gtkscaleaccessible.h',
'gtkscalebuttonaccessible.h',
'gtkscrolledwindowaccessible.h',
'gtkspinbuttonaccessible.h',
'gtkspinneraccessible.h',
'gtkstackaccessible.h',
'gtkstatusbaraccessible.h',
'gtkswitchaccessible.h',
'gtktextcellaccessible.h',
'gtktextviewaccessible.h',
'gtktogglebuttonaccessible.h',
'gtktoplevelaccessible.h',
'gtktreeviewaccessible.h',
'gtkwidgetaccessible.h',
'gtkwindowaccessible.h',
])

View File

@@ -0,0 +1,9 @@
gtk_deprecated_sources = files(
'gtkgradient.c',
'gtksymboliccolor.c',
)
gtk_deprecated_headers = files([
'gtkgradient.h',
'gtksymboliccolor.h',
])

View File

@@ -18,7 +18,8 @@
*/
#include <math.h>
#include "config.h"
/* Workaround for round() for non-GCC/non-C99 compilers */
#ifndef HAVE_ROUND
static inline double

49
gtk/gentypefuncs.py Normal file
View File

@@ -0,0 +1,49 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
import re
import os
debug = os.getenv('GTK_GENTYPEFUNCS_DEBUG') is not None
out_file = sys.argv[1]
in_files = sys.argv[2:]
funcs = []
if debug: print ('Output file: ', out_file)
if debug: print (len(in_files), 'input files')
for filename in in_files:
if debug: print ('Input file: ', filename)
with open(filename, "r") as f:
for line in f:
line = line.rstrip('\n').rstrip('\r')
# print line
match = re.search(r'\bg[td]k_[a-zA-Z0-9_]*_get_type\b', line)
if match:
func = match.group(0)
if not func in funcs:
funcs.append(func)
if debug: print ('Found ', func)
file_output = 'G_GNUC_BEGIN_IGNORE_DEPRECATIONS\n'
funcs = sorted(funcs)
for f in funcs:
if f.startswith('gdk_x11') or f.startswith('gtk_socket') or f.startswith('gtk_plug'):
file_output += '#ifdef GDK_WINDOWING_X11\n'
file_output += '*tp++ = {0}();\n'.format(f)
file_output += '#endif\n'
else:
file_output += '*tp++ = {0}();\n'.format(f)
if debug: print (len(funcs), 'functions')
ofile = open(out_file, "w")
ofile.write(file_output)
ofile.close()

269
gtk/gtk.gresource.xml Normal file
View File

@@ -0,0 +1,269 @@
<?xml version='1.0' encoding='UTF-8'?>
<gresources>
<gresource prefix='/org/gtk/libgtk'>
<file alias='theme/Raleigh/gtk.css'>theme/Raleigh/gtk-default.css</file>
<file>theme/Adwaita/gtk.css</file>
<file>theme/Adwaita/gtk-dark.css</file>
<file>theme/Adwaita/gtk-contained.css</file>
<file>theme/Adwaita/gtk-contained-dark.css</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/bullet-symbolic.symbolic.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/checkbox-active-selectionmode@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/checkbox-active-selectionmode.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/checkbox-backdrop-selectionmode@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/checkbox-backdrop-selectionmode.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/checkbox-checked-active-selectionmode@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/checkbox-checked-active-selectionmode.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/checkbox-checked-backdrop-selectionmode@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/checkbox-checked-backdrop-selectionmode.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/checkbox-checked-hover-selectionmode@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/checkbox-checked-hover-selectionmode.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/checkbox-checked-selectionmode@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/checkbox-checked-selectionmode.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/checkbox-hover-selectionmode@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/checkbox-hover-selectionmode.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/checkbox-selectionmode@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/checkbox-selectionmode.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/check-symbolic.symbolic.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/dash-symbolic.symbolic.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-above@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-above-active@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-above-active-dark@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-above-active-dark.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-above-active.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-above-backdrop@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-above-backdrop-dark@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-above-backdrop-dark.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-above-backdrop-insensitive@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-above-backdrop-insensitive-dark@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-above-backdrop-insensitive-dark.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-above-backdrop-insensitive.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-above-backdrop.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-above-dark@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-above-dark.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-above-hover@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-above-hover-dark@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-above-hover-dark.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-above-hover.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-above-insensitive@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-above-insensitive-dark@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-above-insensitive-dark.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-above-insensitive.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-above.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-below@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-below-active@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-below-active-dark@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-below-active-dark.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-below-active.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-below-backdrop@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-below-backdrop-dark@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-below-backdrop-dark.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-below-backdrop-insensitive@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-below-backdrop-insensitive-dark@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-below-backdrop-insensitive-dark.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-below-backdrop-insensitive.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-below-backdrop.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-below-dark@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-below-dark.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-below-hover@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-below-hover-dark@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-below-hover-dark.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-below-hover.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-below-insensitive@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-below-insensitive-dark@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-below-insensitive-dark.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-below-insensitive.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-below.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-above@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-above-active@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-above-active-dark@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-above-active-dark.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-above-active.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-above-backdrop@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-above-backdrop-dark@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-above-backdrop-dark.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-above-backdrop-insensitive@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-above-backdrop-insensitive-dark@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-above-backdrop-insensitive-dark.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-above-backdrop-insensitive.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-above-backdrop.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-above-dark@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-above-dark.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-above-hover@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-above-hover-dark@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-above-hover-dark.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-above-hover.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-above-insensitive@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-above-insensitive-dark@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-above-insensitive-dark.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-above-insensitive.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-above.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-below@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-below-active@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-below-active-dark@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-below-active-dark.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-below-active.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-below-backdrop@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-below-backdrop-dark@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-below-backdrop-dark.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-below-backdrop-insensitive@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-below-backdrop-insensitive-dark@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-below-backdrop-insensitive-dark.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-below-backdrop-insensitive.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-below-backdrop.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-below-dark@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-below-dark.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-below-hover@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-below-hover-dark@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-below-hover-dark.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-below-hover.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-below-insensitive@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-below-insensitive-dark@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-below-insensitive-dark.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-below-insensitive.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-below.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/text-select-end@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/text-select-end-active@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/text-select-end-active-dark@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/text-select-end-active-dark.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/text-select-end-active.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/text-select-end-dark@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/text-select-end-dark.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/text-select-end-hover@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/text-select-end-hover-dark@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/text-select-end-hover-dark.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/text-select-end-hover.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/text-select-end.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/text-select-start@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/text-select-start-active@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/text-select-start-active-dark@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/text-select-start-active-dark.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/text-select-start-active.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/text-select-start-dark@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/text-select-start-dark.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/text-select-start-hover@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/text-select-start-hover-dark@2.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/text-select-start-hover-dark.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/text-select-start-hover.png</file>
<file preprocess='to-pixdata'>theme/Adwaita/assets/text-select-start.png</file>
<file>theme/Adwaita/assets/bullet-symbolic.svg</file>
<file>theme/Adwaita/assets/check-symbolic.svg</file>
<file>theme/Adwaita/assets/dash-symbolic.svg</file>
<file>theme/HighContrast/gtk.css</file>
<file alias='theme/HighContrastInverse/gtk.css'>theme/HighContrast/gtk-inverse.css</file>
<file>theme/HighContrast/gtk-contained.css</file>
<file>theme/HighContrast/gtk-contained-inverse.css</file>
<file preprocess='to-pixdata'>theme/HighContrast/assets/bullet-symbolic.symbolic.png</file>
<file preprocess='to-pixdata'>theme/HighContrast/assets/check-symbolic.symbolic.png</file>
<file preprocess='to-pixdata'>theme/HighContrast/assets/dash-symbolic.symbolic.png</file>
<file>theme/HighContrast/assets/bullet-symbolic.svg</file>
<file>theme/HighContrast/assets/check-symbolic.svg</file>
<file>theme/HighContrast/assets/dash-symbolic.svg</file>
<file>theme/win32/gtk-win32-base.css</file>
<file>theme/win32/gtk.css</file>
<file>cursor/dnd-ask.png</file>
<file>cursor/dnd-copy.png</file>
<file>cursor/dnd-link.png</file>
<file>cursor/dnd-move.png</file>
<file>cursor/dnd-none.png</file>
<file alias='icons/64x64/actions/gesture-pinch-symbolic.symbolic.png'>gesture/gesture-pinch-symbolic.symbolic.png</file>
<file alias='icons/64x64/actions/gesture-rotate-anticlockwise-symbolic.symbolic.png'>gesture/gesture-rotate-anticlockwise-symbolic.symbolic.png</file>
<file alias='icons/64x64/actions/gesture-rotate-clockwise-symbolic.symbolic.png'>gesture/gesture-rotate-clockwise-symbolic.symbolic.png</file>
<file alias='icons/64x64/actions/gesture-stretch-symbolic.symbolic.png'>gesture/gesture-stretch-symbolic.symbolic.png</file>
<file alias='icons/64x64/actions/gesture-two-finger-swipe-left-symbolic.symbolic.png'>gesture/gesture-two-finger-swipe-left-symbolic.symbolic.png</file>
<file alias='icons/64x64/actions/gesture-two-finger-swipe-right-symbolic.symbolic.png'>gesture/gesture-two-finger-swipe-right-symbolic.symbolic.png</file>
<file compressed='true'>ui/gtkaboutdialog.ui</file>
<file compressed='true'>ui/gtkactionbar.ui</file>
<file compressed='true'>ui/gtkappchooserdialog.ui</file>
<file compressed='true'>ui/gtkappchooserwidget.ui</file>
<file compressed='true'>ui/gtkapplication-quartz.ui</file>
<file compressed='true'>ui/gtkassistant.ui</file>
<file compressed='true'>ui/gtkcolorchooserdialog.ui</file>
<file compressed='true'>ui/gtkcoloreditor.ui</file>
<file compressed='true'>ui/gtkcombobox.ui</file>
<file compressed='true'>ui/gtkdialog.ui</file>
<file compressed='true'>ui/gtkfilechooserbutton.ui</file>
<file compressed='true'>ui/gtkfilechooserdialog.ui</file>
<file compressed='true'>ui/gtkfilechooserwidget.ui</file>
<file compressed='true'>ui/gtkfontbutton.ui</file>
<file compressed='true'>ui/gtkfontchooserdialog.ui</file>
<file compressed='true'>ui/gtkfontchooserwidget.ui</file>
<file compressed='true'>ui/gtkinfobar.ui</file>
<file compressed='true'>ui/gtklockbutton.ui</file>
<file compressed='true'>ui/gtkmessagedialog.ui</file>
<file compressed='true'>ui/gtkpagesetupunixdialog.ui</file>
<file compressed='true'>ui/gtkpathbar.ui</file>
<file compressed='true'>ui/gtkplacesviewrow.ui</file>
<file compressed='true'>ui/gtkplacesview.ui</file>
<file compressed='true'>ui/gtkprintunixdialog.ui</file>
<file compressed='true'>ui/gtkrecentchooserdefault.ui</file>
<file compressed='true'>ui/gtkscalebutton.ui</file>
<file compressed='true'>ui/gtksearchbar.ui</file>
<file compressed='true'>ui/gtksidebarrow.ui</file>
<file compressed='true'>ui/gtkstatusbar.ui</file>
<file compressed='true'>ui/gtktooltipwindow.ui</file>
<file compressed='true'>ui/gtkvolumebutton.ui</file>
<file>icons/16x16/actions/gtk-caps-lock-warning.png</file>
<file>icons/16x16/actions/gtk-color-picker.png</file>
<file>icons/16x16/actions/gtk-connect.png</file>
<file>icons/16x16/actions/gtk-convert.png</file>
<file>icons/16x16/actions/gtk-disconnect.png</file>
<file>icons/16x16/actions/gtk-edit.png</file>
<file>icons/16x16/actions/gtk-index.png</file>
<file>icons/16x16/actions/gtk-orientation-landscape.png</file>
<file>icons/16x16/actions/gtk-orientation-portrait.png</file>
<file>icons/16x16/actions/gtk-orientation-reverse-landscape.png</file>
<file>icons/16x16/actions/gtk-orientation-reverse-portrait.png</file>
<file>icons/16x16/actions/gtk-page-setup.png</file>
<file>icons/16x16/actions/gtk-preferences.png</file>
<file>icons/16x16/actions/gtk-select-color.png</file>
<file>icons/16x16/actions/gtk-select-font.png</file>
<file>icons/16x16/actions/gtk-undelete.png</file>
<file>icons/16x16/actions/gtk-undelete-rtl.png</file>
<file>icons/16x16/status/image-missing.png</file>
<file>icons/22x22/actions/gtk-apply.png</file>
<file>icons/22x22/actions/gtk-cancel.png</file>
<file>icons/22x22/actions/gtk-no.png</file>
<file>icons/22x22/actions/gtk-ok.png</file>
<file>icons/22x22/actions/gtk-yes.png</file>
<file>icons/24x24/actions/gtk-caps-lock-warning.png</file>
<file>icons/24x24/actions/gtk-color-picker.png</file>
<file>icons/24x24/actions/gtk-connect.png</file>
<file>icons/24x24/actions/gtk-convert.png</file>
<file>icons/24x24/actions/gtk-disconnect.png</file>
<file>icons/24x24/actions/gtk-edit.png</file>
<file>icons/24x24/actions/gtk-index.png</file>
<file>icons/24x24/actions/gtk-orientation-landscape.png</file>
<file>icons/24x24/actions/gtk-orientation-portrait.png</file>
<file>icons/24x24/actions/gtk-orientation-reverse-landscape.png</file>
<file>icons/24x24/actions/gtk-orientation-reverse-portrait.png</file>
<file>icons/24x24/actions/gtk-page-setup.png</file>
<file>icons/24x24/actions/gtk-preferences.png</file>
<file>icons/24x24/actions/gtk-select-color.png</file>
<file>icons/24x24/actions/gtk-select-font.png</file>
<file>icons/24x24/actions/gtk-undelete.png</file>
<file>icons/24x24/actions/gtk-undelete-rtl.png</file>
<file>icons/24x24/status/image-missing.png</file>
<file>icons/32x32/actions/gtk-dnd-multiple.png</file>
<file>icons/32x32/actions/gtk-dnd.png</file>
<file>icons/32x32/status/image-missing.png</file>
<file>icons/48x48/status/image-missing.png</file>
<file compressed='true'>inspector/actions.ui</file>
<file compressed='true'>inspector/css-editor.ui</file>
<file compressed='true'>inspector/css-node-tree.ui</file>
<file compressed='true'>inspector/data-list.ui</file>
<file compressed='true'>inspector/general.ui</file>
<file compressed='true'>inspector/magnifier.ui</file>
<file compressed='true'>inspector/menu.ui</file>
<file compressed='true'>inspector/misc-info.ui</file>
<file compressed='true'>inspector/object-hierarchy.ui</file>
<file compressed='true'>inspector/object-tree.ui</file>
<file compressed='true'>inspector/prop-list.ui</file>
<file compressed='true'>inspector/resource-list.ui</file>
<file compressed='true'>inspector/selector.ui</file>
<file compressed='true'>inspector/signals-list.ui</file>
<file compressed='true'>inspector/statistics.ui</file>
<file compressed='true'>inspector/visual.ui</file>
<file compressed='true'>inspector/window.ui</file>
<file>inspector/logo.png</file>
</gresource>
</gresources>

View File

@@ -421,7 +421,7 @@ gtk_test_register_all_types (void)
GType *tp;
all_registered_types = g_new0 (GType, max_gtk_types);
tp = all_registered_types;
#include "gtktypefuncs.c"
#include <gtktypefuncs.c>
n_all_registered_types = tp - all_registered_types;
g_assert (n_all_registered_types + 1 < max_gtk_types);
*tp = 0;

View File

@@ -9044,8 +9044,9 @@ gtk_window_move_resize (GtkWindow *window)
/* handle resizing/moving and widget tree allocation
*/
if (priv->configure_notify_received)
{
{
GtkAllocation allocation;
int min, nat;
/* If we have received a configure event since
* the last time in this function, we need to
@@ -9062,8 +9063,12 @@ gtk_window_move_resize (GtkWindow *window)
allocation.x = 0;
allocation.y = 0;
allocation.width = current_width;
allocation.height = current_height;
/*allocation.width = current_width;*/
gtk_widget_get_preferred_width (widget, &min, &nat);
allocation.width = MAX (min, current_width);
gtk_widget_get_preferred_height_for_width (widget, allocation.width, &min, &nat);
allocation.height = MAX (min, current_height);
gtk_widget_size_allocate (widget, &allocation);

31
gtk/inspector/meson.build Normal file
View File

@@ -0,0 +1,31 @@
inspector_sources = files(
'action-editor.c',
'actions.c',
'cellrenderergraph.c',
'css-editor.c',
'css-node-tree.c',
'data-list.c',
'general.c',
'gestures.c',
'graphdata.c',
'gtkstackcombo.c',
'gtktreemodelcssnode.c',
'init.c',
'inspect-button.c',
'magnifier.c',
'menu.c',
'misc-info.c',
'object-hierarchy.c',
'object-tree.c',
'prop-editor.c',
'prop-list.c',
'resource-list.c',
'selector.c',
'signals-list.c',
'size-groups.c',
'statistics.c',
'strv-editor.c',
'treewalk.c',
'visual.c',
'window.c',
)

848
gtk/meson.build Normal file
View File

@@ -0,0 +1,848 @@
subdir('deprecated')
subdir('a11y')
subdir('inspector')
gtk_sources = files([
'fallback-c89.c',
'fnmatch.c',
'gdkpixbufutils.c',
'gtkaboutdialog.c',
'gtkaccelgroup.c',
'gtkaccellabel.c',
'gtkaccelmap.c',
'gtkaccessible.c',
'gtkactionable.c',
'gtkactionbar.c',
'gtkactionhelper.c',
'gtkactionmuxer.c',
'gtkactionobservable.c',
'gtkactionobserver.c',
'gtkadjustment.c',
'gtkallocatedbitmask.c',
'gtkappchooser.c',
'gtkappchooserbutton.c',
'gtkappchooserdialog.c',
'gtkappchooserwidget.c',
'gtkapplication.c',
'gtkapplicationaccels.c',
'gtkapplicationimpl.c',
'gtkapplicationwindow.c',
'gtkaspectframe.c',
'gtkassistant.c',
'gtkbbox.c',
'gtkbin.c',
'gtkbindings.c',
'gtkbookmarksmanager.c',
'gtkborder.c',
'gtkbox.c',
'gtkboxgadget.c',
'gtkbuildable.c',
'gtkbuilder-menus.c',
'gtkbuilder.c',
'gtkbuilderparser.c',
'gtkbuiltinicon.c',
'gtkbutton.c',
'gtkcairoblur.c',
'gtkcalendar.c',
'gtkcellarea.c',
'gtkcellareabox.c',
'gtkcellareaboxcontext.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',
'gtkcheckbutton.c',
'gtkcheckmenuitem.c',
'gtkcolorbutton.c',
'gtkcolorchooser.c',
'gtkcolorchooserdialog.c',
'gtkcolorchooserwidget.c',
'gtkcoloreditor.c',
'gtkcolorplane.c',
'gtkcolorscale.c',
'gtkcolorswatch.c',
'gtkcolorutils.c',
'gtkcombobox.c',
'gtkcomboboxtext.c',
'gtkcomposetable.c',
'gtkcontainer.c',
'gtkcssanimatedstyle.c',
'gtkcssanimation.c',
'gtkcssarrayvalue.c',
'gtkcssbgsizevalue.c',
'gtkcssbordervalue.c',
'gtkcsscalcvalue.c',
'gtkcsscolorvalue.c',
'gtkcsscornervalue.c',
'gtkcsscustomgadget.c',
'gtkcssdimensionvalue.c',
'gtkcsseasevalue.c',
'gtkcssenumvalue.c',
'gtkcssgadget.c',
'gtkcssiconthemevalue.c',
'gtkcssimage.c',
'gtkcssimagebuiltin.c',
'gtkcssimagecrossfade.c',
'gtkcssimagefallback.c',
'gtkcssimagegradient.c',
'gtkcssimageicontheme.c',
'gtkcssimagelinear.c',
'gtkcssimageradial.c',
'gtkcssimagerecolor.c',
'gtkcssimagescaled.c',
'gtkcssimagesurface.c',
'gtkcssimageurl.c',
'gtkcssimagevalue.c',
'gtkcssimagewin32.c',
'gtkcssinheritvalue.c',
'gtkcssinitialvalue.c',
'gtkcsskeyframes.c',
'gtkcsslookup.c',
'gtkcssmatcher.c',
'gtkcssnode.c',
'gtkcssnode.c',
'gtkcssnodedeclaration.c',
'gtkcssnodestylecache.c',
'gtkcssnumbervalue.c',
'gtkcsspalettevalue.c',
'gtkcssparser.c',
'gtkcsspathnode.c',
'gtkcsspositionvalue.c',
'gtkcssprovider.c',
'gtkcssrepeatvalue.c',
'gtkcssrgbavalue.c',
'gtkcsssection.c',
'gtkcssselector.c',
'gtkcssshadowsvalue.c',
'gtkcssshadowvalue.c',
'gtkcssshorthandproperty.c',
'gtkcssshorthandpropertyimpl.c',
'gtkcssstaticstyle.c',
'gtkcssstringvalue.c',
'gtkcssstyle.c',
'gtkcssstylechange.c',
'gtkcssstylefuncs.c',
'gtkcssstyleproperty.c',
'gtkcssstylepropertyimpl.c',
'gtkcsstransformvalue.c',
'gtkcsstransientnode.c',
'gtkcsstransition.c',
'gtkcsstypes.c',
'gtkcssunsetvalue.c',
'gtkcssvalue.c',
'gtkcsswidgetnode.c',
'gtkcsswin32sizevalue.c',
'gtkdialog.c',
'gtkdragdest.c',
'gtkdragsource.c',
'gtkdrawingarea.c',
'gtkeditable.c',
'gtkentry.c',
'gtkentrybuffer.c',
'gtkentrycompletion.c',
'gtkeventbox.c',
'gtkeventcontroller.c',
'gtkexpander.c',
'gtkfilechooser.c',
'gtkfilechooserbutton.c',
'gtkfilechooserdialog.c',
'gtkfilechooserembed.c',
'gtkfilechooserentry.c',
'gtkfilechoosernative.c',
'gtkfilechoosernativeportal.c',
'gtkfilechooserutils.c',
'gtkfilechooserwidget.c',
'gtkfilefilter.c',
'gtkfilesystem.c',
'gtkfilesystemmodel.c',
'gtkfixed.c',
'gtkflowbox.c',
'gtkfontbutton.c',
'gtkfontchooser.c',
'gtkfontchooserdialog.c',
'gtkfontchooserutils.c',
'gtkfontchooserwidget.c',
'gtkframe.c',
'gtkgesture.c',
'gtkgesturedrag.c',
'gtkgesturelongpress.c',
'gtkgesturemultipress.c',
'gtkgesturepan.c',
'gtkgesturerotate.c',
'gtkgesturesingle.c',
'gtkgestureswipe.c',
'gtkgesturezoom.c',
'gtkgladecatalog.c',
'gtkglarea.c',
'gtkgrid.c',
'gtkheaderbar.c',
'gtkhsla.c',
'gtkicon.c',
'gtkiconcache.c',
'gtkiconcachevalidator.c',
'gtkiconhelper.c',
'gtkicontheme.c',
'gtkiconview.c',
'gtkimage.c',
'gtkimagedefinition.c',
'gtkimcontext.c',
'gtkimcontextsimple.c',
'gtkimmodule.c',
'gtkimmulticontext.c',
'gtkinfobar.c',
'gtkinvisible.c',
'gtkkeyhash.c',
'gtkkineticscrolling.c',
'gtklabel.c',
'gtklayout.c',
'gtklevelbar.c',
'gtklinkbutton.c',
'gtklistbox.c',
'gtkliststore.c',
'gtklockbutton.c',
'gtkmagnifier.c',
'gtkmain.c',
'gtkmenu.c',
'gtkmenubar.c',
'gtkmenubutton.c',
'gtkmenuitem.c',
'gtkmenusectionbox.c',
'gtkmenushell.c',
'gtkmenutoolbutton.c',
'gtkmenutracker.c',
'gtkmenutrackeritem.c',
'gtkmessagedialog.c',
'gtkmnemonichash.c',
'gtkmodelbutton.c',
'gtkmodelmenuitem.c',
'gtkmodules.c',
'gtkmountoperation.c',
'gtknativedialog.c',
'gtknotebook.c',
'gtkorientable.c',
'gtkoverlay.c',
'gtkpadcontroller.c',
'gtkpagesetup.c',
'gtkpaned.c',
'gtkpango.c',
'gtkpapersize.c',
'gtkpathbar.c',
'gtkplacessidebar.c',
'gtkplacesview.c',
'gtkplacesviewrow.c',
'gtkpopover.c',
'gtkpopovermenu.c',
'gtkprintcontext.c',
'gtkprintoperation-portal.c',
'gtkprintoperation.c',
'gtkprintoperationpreview.c',
'gtkprintsettings.c',
'gtkprintutils.c',
'gtkprivate.c',
'gtkprogressbar.c',
'gtkprogresstracker.c',
'gtkquery.c',
'gtkradiobutton.c',
'gtkradiomenuitem.c',
'gtkradiotoolbutton.c',
'gtkrange.c',
'gtkrbtree.c',
'gtkrecentchooser.c',
'gtkrecentchooserdefault.c',
'gtkrecentchooserdialog.c',
'gtkrecentchoosermenu.c',
'gtkrecentchooserutils.c',
'gtkrecentchooserwidget.c',
'gtkrecentfilter.c',
'gtkrecentmanager.c',
'gtkrender.c',
'gtkrenderbackground.c',
'gtkrenderborder.c',
'gtkrendericon.c',
'gtkrevealer.c',
'gtkroundedbox.c',
'gtkscale.c',
'gtkscalebutton.c',
'gtkscrollable.c',
'gtkscrollbar.c',
'gtkscrolledwindow.c',
'gtksearchbar.c',
'gtksearchengine.c',
'gtksearchenginemodel.c',
'gtksearchenginesimple.c',
'gtksearchentry.c',
'gtkselection.c',
'gtkseparator.c',
'gtkseparatormenuitem.c',
'gtkseparatortoolitem.c',
'gtksettings.c',
'gtkshortcutlabel.c',
'gtkshortcutsgroup.c',
'gtkshortcutssection.c',
'gtkshortcutsshortcut.c',
'gtkshortcutswindow.c',
'gtkshow.c',
'gtksidebarrow.c',
'gtksizegroup.c',
'gtksizerequest.c',
'gtksizerequestcache.c',
'gtkspinbutton.c',
'gtkspinner.c',
'gtkstack.c',
'gtkstacksidebar.c',
'gtkstackswitcher.c',
'gtkstatusbar.c',
'gtkstyleanimation.c',
'gtkstylecascade.c',
'gtkstylecontext.c',
'gtkstyleproperty.c',
'gtkstyleprovider.c',
'gtkstyleproviderprivate.c',
'gtkswitch.c',
'gtktestutils.c',
'gtktextattributes.c',
'gtktextbtree.c',
'gtktextbuffer.c',
'gtktextbufferrichtext.c',
'gtktextbufferserialize.c',
'gtktextchild.c',
'gtktextdisplay.c',
'gtktexthandle.c',
'gtktextiter.c',
'gtktextlayout.c',
'gtktextmark.c',
'gtktextsegment.c',
'gtktexttag.c',
'gtktexttagtable.c',
'gtktexttypes.c',
'gtktextutil.c',
'gtktextview.c',
'gtktogglebutton.c',
'gtktoggletoolbutton.c',
'gtktoolbar.c',
'gtktoolbutton.c',
'gtktoolitem.c',
'gtktoolitemgroup.c',
'gtktoolpalette.c',
'gtktoolshell.c',
'gtktooltip.c',
'gtktooltipwindow.c',
'gtktrashmonitor.c',
'gtktreedatalist.c',
'gtktreednd.c',
'gtktreemenu.c',
'gtktreemodel.c',
'gtktreemodelfilter.c',
'gtktreemodelsort.c',
'gtktreeselection.c',
'gtktreesortable.c',
'gtktreestore.c',
'gtktreeview.c',
'gtktreeviewcolumn.c',
'gtkutils.c',
'gtkviewport.c',
'gtkvolumebutton.c',
'gtkwidget.c',
'gtkwidgetpath.c',
'gtkwin32draw.c',
'gtkwin32theme.c',
'gtkwin32theme.c',
'gtkwindow.c',
'gtkwindowgroup.c',
])
gtk_private_type_headers = files([
'gtkcsstypesprivate.h',
'gtktexthandleprivate.h',
])
gtk_private_headers = gtk_private_type_headers + files([
'gtkrbtree.h',
'gtkrecentchooserutils.h',
])
gtk_public_headers = files([
'gtk-a11y.h',
'gtk-autocleanups.h',
'gtk.h',
'gtkaboutdialog.h',
'gtkaccelgroup.h',
'gtkaccellabel.h',
'gtkaccelmap.h',
'gtkaccessible.h',
'gtkactionable.h',
'gtkactionbar.h',
'gtkadjustment.h',
'gtkappchooser.h',
'gtkappchooserbutton.h',
'gtkappchooserdialog.h',
'gtkappchooserwidget.h',
'gtkapplication.h',
'gtkapplicationwindow.h',
'gtkaspectframe.h',
'gtkassistant.h',
'gtkbbox.h',
'gtkbin.h',
'gtkbindings.h',
'gtkborder.h',
'gtkbox.h',
'gtkbuildable.h',
'gtkbuilder.h',
'gtkbutton.h',
'gtkcalendar.h',
'gtkcellarea.h',
'gtkcellareabox.h',
'gtkcellareacontext.h',
'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',
'gtkcheckmenuitem.h',
'gtkclipboard.h',
'gtkcolorbutton.h',
'gtkcolorchooser.h',
'gtkcolorchooserdialog.h',
'gtkcolorchooserwidget.h',
'gtkcolorutils.h',
'gtkcombobox.h',
'gtkcomboboxtext.h',
'gtkcontainer.h',
'gtkcssprovider.h',
'gtkcsssection.h',
'gtkdebug.h',
'gtkdialog.h',
'gtkdnd.h',
'gtkdragdest.h',
'gtkdragsource.h',
'gtkdrawingarea.h',
'gtkeditable.h',
'gtkentry.h',
'gtkentrybuffer.h',
'gtkentrycompletion.h',
'gtkenums.h',
'gtkeventbox.h',
'gtkeventcontroller.h',
'gtkexpander.h',
'gtkfilechooser.h',
'gtkfilechooserbutton.h',
'gtkfilechooserdialog.h',
'gtkfilechoosernative.h',
'gtkfilechooserwidget.h',
'gtkfilefilter.h',
'gtkfixed.h',
'gtkflowbox.h',
'gtkfontbutton.h',
'gtkfontchooser.h',
'gtkfontchooserdialog.h',
'gtkfontchooserwidget.h',
'gtkframe.h',
'gtkgesture.h',
'gtkgesturedrag.h',
'gtkgesturelongpress.h',
'gtkgesturemultipress.h',
'gtkgesturepan.h',
'gtkgesturerotate.h',
'gtkgesturesingle.h',
'gtkgestureswipe.h',
'gtkgesturezoom.h',
'gtkglarea.h',
'gtkgrid.h',
'gtkheaderbar.h',
'gtkicontheme.h',
'gtkiconview.h',
'gtkimage.h',
'gtkimcontext.h',
'gtkimcontextinfo.h',
'gtkimcontextsimple.h',
'gtkimmodule.h',
'gtkimmulticontext.h',
'gtkinfobar.h',
'gtkinvisible.h',
'gtklabel.h',
'gtklayout.h',
'gtklevelbar.h',
'gtklinkbutton.h',
'gtklistbox.h',
'gtkliststore.h',
'gtklockbutton.h',
'gtkmain.h',
'gtkmenu.h',
'gtkmenubar.h',
'gtkmenubutton.h',
'gtkmenuitem.h',
'gtkmenushell.h',
'gtkmenutoolbutton.h',
'gtkmessagedialog.h',
'gtkmodelbutton.h',
'gtkmodules.h',
'gtkmountoperation.h',
'gtknativedialog.h',
'gtknotebook.h',
'gtkorientable.h',
'gtkoverlay.h',
'gtkpadcontroller.h',
'gtkpagesetup.h',
'gtkpaned.h',
'gtkpapersize.h',
'gtkplacessidebar.h',
'gtkpopover.h',
'gtkpopovermenu.h',
'gtkprintcontext.h',
'gtkprintoperation.h',
'gtkprintoperationpreview.h',
'gtkprintsettings.h',
'gtkprogressbar.h',
'gtkradiobutton.h',
'gtkradiomenuitem.h',
'gtkradiotoolbutton.h',
'gtkrange.h',
'gtkrecentchooser.h',
'gtkrecentchooserdialog.h',
'gtkrecentchoosermenu.h',
'gtkrecentchooserwidget.h',
'gtkrecentfilter.h',
'gtkrecentmanager.h',
'gtkrender.h',
'gtkrevealer.h',
'gtkscale.h',
'gtkscalebutton.h',
'gtkscrollable.h',
'gtkscrollbar.h',
'gtkscrolledwindow.h',
'gtksearchbar.h',
'gtksearchentry.h',
'gtkselection.h',
'gtkseparator.h',
'gtkseparatormenuitem.h',
'gtkseparatortoolitem.h',
'gtksettings.h',
'gtkshortcutlabel.h',
'gtkshortcutsgroup.h',
'gtkshortcutssection.h',
'gtkshortcutsshortcut.h',
'gtkshortcutswindow.h',
'gtkshow.h',
'gtksizegroup.h',
'gtksizerequest.h',
'gtkspinbutton.h',
'gtkspinner.h',
'gtkstack.h',
'gtkstacksidebar.h',
'gtkstackswitcher.h',
'gtkstatusbar.h',
'gtkstylecontext.h',
'gtkstyleprovider.h',
'gtkswitch.h',
'gtktestutils.h',
'gtktextattributes.h',
'gtktextbuffer.h',
'gtktextbufferrichtext.h',
'gtktextchild.h',
'gtktextdisplay.h',
'gtktextiter.h',
'gtktextlayout.h',
'gtktextmark.h',
'gtktexttag.h',
'gtktexttagtable.h',
'gtktextview.h',
'gtktogglebutton.h',
'gtktoggletoolbutton.h',
'gtktoolbar.h',
'gtktoolbutton.h',
'gtktoolitem.h',
'gtktoolitemgroup.h',
'gtktoolpalette.h',
'gtktoolshell.h',
'gtktooltip.h',
'gtktreednd.h',
'gtktreemodel.h',
'gtktreemodelfilter.h',
'gtktreemodelsort.h',
'gtktreeselection.h',
'gtktreesortable.h',
'gtktreestore.h',
'gtktreeview.h',
'gtktreeviewcolumn.h',
'gtktypes.h',
'gtkviewport.h',
'gtkvolumebutton.h',
'gtkwidget.h',
'gtkwidgetpath.h',
'gtkwindow.h',
'gtkwindowgroup.h',
])
gtk_unix_sources = files([
'gtkcustompaperunixdialog.c',
'gtkpagesetupunixdialog.c',
'gtkprintbackend.c',
'gtkprinter.c',
'gtkprinteroption.c',
'gtkprinteroptionset.c',
'gtkprinteroptionwidget.c',
'gtkprintjob.c',
'gtkprintoperation-unix.c',
'gtkprintunixdialog.c',
'gtksearchenginetracker.c',
])
gtkresources = gnome.compile_resources(
'gtkresources',
'gtk.gresource.xml',
source_dir: '.',
c_name: '_gtk',
extra_args: '--manual-register'
)
gtk_x11_sources = files([
'gtkapplication-x11.c',
'gtkmountoperation-x11.c',
])
gtk_wayland_sources = files([
'gtkapplication-wayland.c'
])
dnd_sources = files([
'gtkclipboard.c',
'gtkdnd.c'
])
gtk_use_wayland_or_x11_c_sources = files([
'gtkapplication-dbus.c'
])
gtk_dbus_src = gnome.gdbus_codegen('gtkdbusgenerated', 'gtkdbusinterfaces.xml',
interface_prefix: 'org.Gtk.',
namespace: '_Gtk')
gtkmarshal_h = custom_target(
'gtkmarshal_h',
output : 'gtkmarshalers.h',
input : 'gtkmarshalers.list',
command : [mkmarshal, glib_marshal, '_gtk_marshal', '@INPUT@', '@OUTPUT@']
)
gtkmarshal_c = custom_target(
'gtkmarshal_c',
output : 'gtkmarshalers.c',
input : 'gtkmarshalers.list',
command : [mkmarshal, glib_marshal, '_gtk_marshal', '@INPUT@', '@OUTPUT@']
)
gtktypebuiltins_h = custom_target(
'gtkypebuiltins_h',
output : 'gtktypebuiltins.h',
input : gtk_public_headers + gtk_deprecated_headers,
command : [mkenum, perl, glib_mkenums, meson.current_source_dir() + '/gtktypebuiltins.h.template', '@OUTPUT@', '@INPUT@'],
install: true,
install_dir: 'include/gtk-4.0/gtk/' # XXX ???
)
gtktypebuiltins_c = custom_target(
'gtkypebuiltins_c',
output : 'gtktypebuiltins.c',
input : gtk_public_headers + gtk_deprecated_headers,
depends : gtktypebuiltins_h,
command : [mkenum, perl, glib_mkenums, meson.current_source_dir() + '/gtktypebuiltins.c.template', '@OUTPUT@', '@INPUT@']
)
gtkprivatetypebuiltins_h = custom_target(
'gtkprivateypebuiltins_h',
output : 'gtkprivatetypebuiltins.h',
input : gtk_private_type_headers,
command : [mkenum, perl, glib_mkenums, meson.current_source_dir() + '/gtkprivatetypebuiltins.h.template', '@OUTPUT@', '@INPUT@']
)
gtkprivatetypebuiltins_c = custom_target(
'gtkprivateypebuiltins_c',
output : 'gtkprivatetypebuiltins.c',
input : gtk_private_type_headers,
depends : [gtkprivatetypebuiltins_h, gtktypebuiltins_h],
command : [mkenum, perl, glib_mkenums, meson.current_source_dir() + '/gtkprivatetypebuiltins.c.template', '@OUTPUT@', '@INPUT@']
)
gentypefuncs_prog = find_program('gentypefuncs.py')
# Generate gtktypefuncs.c
typefuncs = custom_target(
'typefuncs',
depends: gdkenum_h,
output : 'gtktypefuncs.c',
input : gdk_headers + gtk_public_headers + gtk_deprecated_headers + gtk_private_headers + [gtktypebuiltins_h] + [gdkenum_h],
command: [gentypefuncs_prog, '@OUTPUT@', '@INPUT@'],
install: false,
)
cdata = configuration_data()
cdata.set('GTK_MAJOR_VERSION', gtk_major_version)
cdata.set('GTK_MINOR_VERSION', gtk_minor_version)
cdata.set('GTK_MICRO_VERSION', gtk_micro_version)
cdata.set('GTK_BINARY_AGE', gtk_binary_age)
cdata.set('GTK_INTERFACE_AGE', gtk_interface_age)
gtkversion = configure_file(
input : 'gtkversion.h.in',
output : 'gtkversion.h',
configuration: cdata,
install_dir: 'include/gtk-4.0/gtk/' # XXX ???
)
gtk_cargs = [
'-DGTK_COMPILATION',
'-DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED',
'-DGTK_BINARY_VERSION="' + gtk_binary_version + '"',
'-DGTK_HOST="' + host_machine.system() + '"',
'-DGTK_SYSCONFDIR="' + get_option('prefix') + '/etc"',
'-DGTK_DATADIR="' + get_option('datadir') + '"',
'-DGTK_DATA_PREFIX="'+ get_option('prefix') + '"',
'-DGTK_PRINT_BACKENDS="null"',
]
gtk_sources += [
gtk_dbus_src,
gtk_unix_sources,
gtk_deprecated_sources,
dnd_sources,
inspector_sources,
a11y_sources,
gtkresources,
gtkmarshal_c,
gtkprivatetypebuiltins_c,
gtktypebuiltins_c,
]
gtk_deps = [
gmodule_dep,
giounix_dep,
glib_dep,
atkbridge_dep,
pangocairo_dep,
pango_dep,
cairogobj_dep,
cairo_dep,
fontconfig_dep,
pixbuf_dep,
atk_dep,
epoxy_dep,
mlib,
graphene_dep
]
if x11_enabled
runcmd = run_command('pkg-config', '--variable=prefix', 'x11')
if runcmd.returncode() == 0
gtk_cargs += '-DX11_DATA_PREFIX="' + runcmd.stdout().strip() + '"'
else
error('Could not get x11 data prefix via pkg-config.')
endif
gtk_sources += gtk_x11_sources
gtk_deps += [
xi_dep,
x11_dep,
]
endif
if wayland_enabled
gtk_sources += gtk_wayland_sources
endif
# So we don't add these twice
if x11_enabled or wayland_enabled
gtk_sources += gtk_use_wayland_or_x11_c_sources
gtk_deps += pangoft_dep
endif
gnome.compile_schemas()
# Install necessary headers
# install_headers(gtk_public_headers, subdir: 'gtk-3.0/gtk/')
# install_headers(gtk_deprecated_headers, subdir: 'gtk-3.0/gtk/deprecated/')
# install_headers(a11y_headers, subdir: 'gtk-3.0/gtk/a11y/')
libgtk = shared_library('gtk',
sources: [typefuncs, gtk_sources, gtkmarshal_h],
c_args: gtk_cargs,
include_directories: [confinc, gdkinc, gtkinc],
dependencies: [gtk_deps, libgdk_dep, libgsk_dep],
install: true
)
libgtk_dep = declare_dependency(
sources: [
'gtk.h',
gtkversion,
gtktypebuiltins_c,
gtktypebuiltins_h,
],
dependencies: gtk_deps,
link_with: [libgtk, libgdk, libgsk],
link_args: ['-Bsymbolic'],
include_directories: [confinc, gtkinc, gdkinc]
)
####### Utils ######
gtk_query_settings = executable(
'gtk4-query-settings',
'gtk-query-settings.c',
dependencies: libgtk_dep,
install: true
)
gtk_builder_tool = executable(
'gtk4-builder-tool',
'gtk-builder-tool.c',
dependencies: libgtk_dep,
install: true
)
gtk_update_icon_cache = executable(
'gtk4-update-icon-cache',
'updateiconcache.c',
dependencies: libgtk_dep,
install: true
)
# gtk_query_immodules = executable(
# 'gtk-query-immodules-3.0',
# 'queryimmodules.c',
# 'gtkutils.c',
# dependencies: libgtk_dep,
# install: true
# )
gtk_encode_symbolic_svg = executable(
'gtk4-encode-symbolic-svg',
'encodesymbolic.c',
dependencies: libgtk_dep,
install: true
)
gtk_launch = executable(
'gtk4-launch',
'gtk-launch.c',
dependencies: libgtk_dep,
install: true
)

267
meson.build Normal file
View File

@@ -0,0 +1,267 @@
project('gtk+-3.0', 'c',
version: '3.90.0',
default_options: [
'buildtype=debugoptimized',
'c_std=gnu89',
'warning_level=1'
],
license: 'LGPLv2.1+')
gnome = import('gnome')
add_global_arguments('-DG_LOG_USE_STRUCTURED=1', language: 'c')
add_global_arguments('-DG_ENABLE_DEBUG', language: 'c')
add_global_arguments('-DG_ENABLE_CONSISTENCY_CHECKS', language: 'c')
gtk_version = meson.project_version().split('.')
gtk_major_version = gtk_version[0].to_int()
gtk_minor_version = gtk_version[1].to_int()
gtk_micro_version = gtk_version[2].to_int()
gtk_interface_age = 0
add_global_arguments('-DGTK_VERSION="' + meson.project_version() + '"', language: 'c')
# Define a string for the earliest version that this release has
# backwards binary compatibility with for all interfaces a module
# might. Unless we add module-only API with lower stability
# guarantees, this should be unchanged until we break binary compat
# for GTK+.
gtk_binary_version = '3.0.0'
gtk_binary_age = 100 * gtk_minor_version + gtk_micro_version
gtk_api_version = '@0@.0'.format(gtk_major_version)
x11_enabled = get_option('enable-x11-backend')
wayland_enabled = get_option('enable-wayland-backend')
broadway_enabled = get_option('enable-broadway-backend')
mkmarshal = find_program('build_marshal.py')
glib_marshal = find_program('glib-genmarshal')
mkenum = find_program('build_enum.py')
perl = find_program('perl')
glib_mkenums = find_program('glib-mkenums')
os_unix = false
os_linux = false
os_win32 = false
os_darwin = false
if host_machine.system().contains('darwin')
os_darwin = true
elif host_machine.system().contains('mingw')
os_win32 = true
elif host_machine.system().contains('linux')
os_linux = true
endif
os_unix = not os_win32
cc = meson.get_compiler('c')
cdata = configuration_data()
cdata.set('PACKAGE_VERSION', '"'+meson.project_version()+'"')
cdata.set('GTK_LOCALEDIR', '"'+get_option('localedir')+'"')
cdata.set('GTK_DATADIR', '"'+get_option('datadir')+'"')
cdata.set('GTK_LIBDIR', '"'+get_option('libdir')+'"')
cdata.set('GETTEXT_PACKAGE', '"gtk30"')
cdata.set('GTK_MAJOR_VERSION', gtk_major_version)
cdata.set('GTK_MINOR_VERSION', gtk_minor_version)
cdata.set('GTK_MICRO_VERSION', gtk_micro_version)
cdata.set('GTK_BINARY_AGE', gtk_binary_age)
cdata.set('GTK_INTERFACE_AGE', gtk_interface_age)
check_headers = [
['HAVE_CRT_EXTERNS_H', 'crt/externs.h'],
['HAVE_DLFCN_H', 'dlfcn.h'],
['HAVE_FTW_H', 'ftw.h'],
['HAVE_INTTYPES_H', 'inttypes.h'],
['HAVE_LOCALE_H', 'locale.h'],
['HAVE_MEMORY_H', 'memory.h'],
['HAVE_STDINT_H', 'stdint.h'],
['HAVE_STDLIB_H', 'stdlib.h'],
['HAVE_STRINGS_H', 'strings.h'],
['HAVE_STRING_H', 'string.h'],
['HAVE_SYS_MMAN_H', 'sys/mman.h'],
['HAVE_SYS_PARAM_H', 'sys/param.h'],
['HAVE_SYS_STAT_H', 'sys/stat.h'],
['HAVE_SYS_SYSINFO_H', 'sys/sysinfo.h'],
['HAVE_SYS_SYSTEMINFO_H', 'sys/systeminfo.h'],
['HAVE_SYS_TIME_H', 'sys/time.h'],
['HAVE_SYS_TYPES_H', 'sys/types.h'],
['HAVE_UNISTD_H', 'unistd.h'],
['HAVE_LINUX_MEMFD_H', 'linux/memfd.h'],
]
foreach h : check_headers
if cc.has_header(h.get(1))
cdata.set(h.get(0), 1)
endif
endforeach
check_functions = [
# check token HAVE_BIND_TEXTDOMAIN_CODESET
# check token HAVE_CUPS_API_1_6
['HAVE_DCGETTEXT', 'dcgettext', '#include<libintl.h>'],
['HAVE_DECL_ISINF', 'isinf', '#include<math.h>'],
['HAVE_DECL_ISNAN', 'isnan', '#include<math.h>'],
['HAVE_GETPAGESIZE', 'getpagesize', '#include<unistd.h>'],
['HAVE_GETRESUID', 'getresuid', '#include<unistd.h>'],
# check token HAVE_GETTEXT
# check token HAVE_GIO_UNIX
# check token HAVE_GNU_FTW
# check token HAVE_HTTPGETAUTHSTRING
# check token HAVE_HTTP_AUTHSTRING
# check token HAVE_IPRINTDIALOGCALLBACK
# check token HAVE_LC_MESSAGES
# check token HAVE_LOCALTIME_R
['HAVE_LSTAT', 'lstat', '#include<sys/stat.h>'],
['HAVE_MMAP', 'mmap', '#include<sys/mman.h>'],
['HAVE_NEARBYINT', 'nearbyint', '#include<math.h>'],
['HAVE_POSIX_FALLOCATE', 'posix_fallocate', '#include<fcntl.h>'],
['HAVE__LOCK_FILE', '_lock_file', '#include<stdio.h>'],
['HAVE_FLOCKFILE', 'flockfile', '#include<stdio.h>'],
['HAVE_MKSTEMP', 'mkstemp', '#include<stdlib.h>'],
['HAVE_MALLINFO', 'mallinfo', '#include<malloc.h>'],
['HAVE_ROUND', 'round', '#include<math.h>'],
['HAVE_RINT', 'rint', '#include<math.h>'],
['HAVE_LOG2', 'log2', '#include<math.h>'],
['HAVE_EXP2', 'exp2', '#include<math.h>'],
['HAVE_SINCOS', 'sincos', '#include<math.h>'],
['HAVE_XKB', 'XkbQueryExtension', '#include<X11/XKBlib.h>'],
# check token HAVE_SOCKADDR_UN_SUN_LEN
# check token HAVE_SOLARIS_XINERAMA
# check token HAVE_XFREE_XINERAMA
# check token HAVE_XINERAMA
# check token HAVE__NL_MEASUREMENT_MEASUREMENT
# check token HAVE__NL_PAPER_HEIGHT
# check token HAVE__NL_PAPER_WIDTH
# check token HAVE__NL_TIME_FIRST_WEEKDAY
# check token HAVE__NSGETENVIRON
]
if x11_enabled
check_functions += [
['HAVE_XGENERICEVENTS', 'XGetEventData', '#include<X11/Xlib.h>'],
['HAVE_XSYNC', 'XSyncQueryExtension', '#include<X11/Xlib.h>\n#include</usr/include/X11/extensions/sync.h>']
]
endif
foreach f : check_functions
if cc.has_function(f.get(1), prefix : f.get(2))
cdata.set(f.get(0), 1)
endif
endforeach
# Disable deprecation checks for all libraries we depend on on stable branches.
# This is so newer versions of those libraries don't cause more warnings with
# a stable GTK version.
# We don't ever want to turn off deprecation warnings for master however, because
# that's where we get rid of deprecated API we use.
if gtk_minor_version % 2 == 0
cdata.set('GLIB_DISABLE_DEPRECATION_WARNINGS', 1)
endif
confinc = include_directories('.')
gdkinc = include_directories('gdk')
gtkinc = include_directories('gtk')
glib_dep = dependency('glib-2.0', version: '>= 2.49.4')
giounix_dep = dependency('gio-unix-2.0', required : false)
pango_dep = dependency('pango', version: '>=1.37.3')
pangoft_dep = dependency('pangoft2', required: wayland_enabled or x11_enabled)
cairo_dep = dependency('cairo', version: '>= 1.14.0')
pangocairo_dep = dependency('pangocairo')
cairogobj_dep = dependency('cairo-gobject')
pixbuf_dep = dependency('gdk-pixbuf-2.0', version: '>= 2.30.0')
epoxy_dep = dependency('epoxy', version: '>= 1.0')
atk_dep = dependency('atk', version: '>= 2.15.1')
atkbridge_dep = dependency('atk-bridge-2.0')
gmodule_dep = dependency('gmodule-2.0')
colord_dep = dependency('colord', version: '>= 0.1.9', required: false)
fontconfig_dep = dependency('fontconfig')
harfbuzz_dep = dependency('harfbuzz', version: '>= 0.9', required: false)
xkbdep = dependency('xkbcommon', version: '>= 0.2.0')
graphene_dep = dependency('graphene-1.0')
if wayland_enabled
wlclientdep = dependency('wayland-client', version: '>= 1.9.91')
wlprotocolsdep = dependency('wayland-protocols', version: '>= 1.7')
wlcursordep = dependency('wayland-cursor', version: '>= 1.9.91')
wlegldep = dependency('wayland-egl')
endif
if x11_enabled
xrandr_dep = dependency('xrandr', version: '>= 1.2.99')
xrandr15_dep = dependency('xrandr', version: '>= 1.5', required: false)
x11_dep = dependency('x11')
xrender_dep = dependency('xrender')
xi_dep = dependency('xi')
xext_dep = dependency('xext')
xcursor_dep = dependency('xcursor', required: false)
xdamage_dep = dependency('xdamage', required: false)
xfixes_dep = dependency('xfixes', required: false)
xcomposite_dep = dependency('xcomposite', required: false)
if xdamage_dep.found()
cdata.set('HAVE_XDAMAGE', 1)
endif
if xcursor_dep.found()
cdata.set('HAVE_XCURSOR', 1)
endif
if xcomposite_dep.found()
cdata.set('HAVE_XCOMPOSITE', 1)
endif
if xfixes_dep.found()
cdata.set('HAVE_XFIXES', 1)
endif
if xi_dep.found() and cc.has_header('X11/extensions/XInput2.h')
cdata.set('XINPUT_2', 1)
prefix = '#include<X11/Xlib.h>\n#include<X11/extensions/XInput2.h>'
if cc.has_function('XIAllowTouchEvents', prefix: prefix) and cc.has_member('XIScrollClassInfo', 'number', prefix: prefix)
cdata.set('XINPUT_2_2', 1)
endif
endif
if xrandr_dep.found()
cdata.set('HAVE_RANDR', 1)
if xrandr15_dep.found()
cdata.set('HAVE_RANDR15', 1)
endif
endif
endif
mlib = cc.find_library('m', required: false)
shmlib = cc.find_library('rt')
if giounix_dep.found()
cdata.set('HAVE_GIO_UNIX', 1)
endif
if colord_dep.found()
cdata.set('HAVE_COLORD', 1)
endif
if mlib.found()
cdata.set('HAVE_LIBM', 1)
endif
configure_file(
input : 'config.h.meson',
output: 'config.h',
configuration: cdata
)
subdir('gdk')
subdir('gsk')
subdir('gtk')
subdir('demos')
subdir('tests')
subdir('testsuite')
subdir('examples')

3
meson_options.txt Normal file
View File

@@ -0,0 +1,3 @@
option('enable-x11-backend', type: 'boolean', value: 'true')
option('enable-wayland-backend', type: 'boolean', value: 'true')
option('enable-broadway-backend', type: 'boolean', value: 'false')

182
tests/meson.build Normal file
View File

@@ -0,0 +1,182 @@
test_animated_resizing = executable('animated-resizing',
'animated-resizing.c',
'frame-stats.c',
'frame-stats.h',
'variable.c',
'variable.h',
dependencies: libgtk_dep
)
test_animted_revealing = executable('animated-revealing',
'animated-revealing.c',
'frame-stats.c',
'frame-stats.h',
'variable.c',
'variable.h',
dependencies: libgtk_dep
)
test_scrolling_performance = executable('scrolling-performance',
'scrolling-performance.c',
'frame-stats.c',
'frame-stats.h',
'variable.c',
'variable.h',
dependencies: libgtk_dep
)
test_blur_performance = executable('blur-performance',
'blur-performance.c',
'../gtk/gtkcairoblur.c',
dependencies: libgtk_dep
)
test_video_timer = executable('video-timer',
'video-timer.c',
'variable.c',
'variable.h',
dependencies: libgtk_dep
)
test_print = executable('testprint',
'testprint.c',
'testprintfileoperation.c',
'testprintfileoperation.h',
dependencies: libgtk_dep
)
test_gdkgears = executable('gdkgears',
'gdkgears.c',
'gtkgears.c',
'gtkgears.h',
dependencies: libgtk_dep
)
test_glblending = executable('testglblending',
'testglblending.c',
'gtkgears.c',
'gtkgears.h',
dependencies: libgtk_dep
)
test_boxcss = executable('testboxcss', 'testboxcss.c', dependencies: libgtk_dep)
test_entrycompletion = executable('testentrycompletion', 'testentrycompletion.c', dependencies: libgtk_dep)
test_entryicons = executable('testentryicons', 'testentryicons.c', dependencies: libgtk_dep)
test_filechooser = executable('testfilechooser', 'testfilechooser.c', dependencies: libgtk_dep)
test_filechooserbutton = executable('testfilechooserbutton', 'testfilechooserbutton.c', dependencies: libgtk_dep)
test_flowbox = executable('testflowbox', 'testflowbox.c', dependencies: libgtk_dep)
test_fontchooser = executable('testfontchooser', 'testfontchooser.c', dependencies: libgtk_dep)
test_fontoptions = executable('testfontoptions', 'testfontoptions.c', dependencies: libgtk_dep)
test_grid = executable('testgrid', 'testgrid.c', dependencies: libgtk_dep)
# TODO: Can't find the x11/gdkx.h
#test_gtk = executable('testgtk', 'testgtk.c', dependencies: libgtk_dep)
test_treechanging = executable('testtreechanging', 'testtreechanging.c', dependencies: libgtk_dep)
test_treednd = executable('testtreednd', 'testtreednd.c', dependencies: libgtk_dep)
test_treeedit = executable('testtreeedit', 'testtreeedit.c', dependencies: libgtk_dep)
test_treemodel = executable('testtreemodel', 'testtreemodel.c', dependencies: libgtk_dep)
test_treeview = executable('testtreeview', 'testtreeview.c', dependencies: libgtk_dep)
test_treefocus = executable('testtreefocus', 'testtreefocus.c', dependencies: libgtk_dep)
test_treeflow = executable('testtreeflow', 'testtreeflow.c', dependencies: libgtk_dep)
test_treecolumns = executable('testtreecolumns', 'testtreecolumns.c', dependencies: libgtk_dep)
test_treecolumnsizing = executable('testtreecolumnsizing', 'testtreecolumnsizing.c', dependencies: libgtk_dep)
test_treesort = executable('testtreesort', 'testtreesort.c', dependencies: libgtk_dep)
test_toolbar = executable('testtoolbar', 'testtoolbar.c', dependencies: libgtk_dep)
test_toolbar2 = executable('testtoolbar2', 'testtoolbar2.c', dependencies: libgtk_dep)
test_menubutton = executable('testmenubutton', 'testmenubutton.c', dependencies: libgtk_dep)
test_spinbutton = executable('testspinbutton', 'testspinbutton.c', dependencies: libgtk_dep)
test_baseline = executable('testbaseline', 'testbaseline.c', dependencies: libgtk_dep)
test_bbox = executable('testbbox', 'testbbox.c', dependencies: libgtk_dep)
test_buttons = executable('testbuttons', 'testbuttons.c', dependencies: libgtk_dep)
test_frame = executable('testframe', 'testframe.c', dependencies: libgtk_dep)
test_giconpixbuf = executable('testgiconpixbuf', 'testgiconpixbuf.c', dependencies: libgtk_dep)
test_iconview = executable('testiconview', 'testiconview.c', dependencies: libgtk_dep)
test_iconview_keynav = executable('testiconview_keynav', 'testiconview-keynav.c', dependencies: libgtk_dep)
test_recentchooser = executable('testrecentchooser', 'testrecentchooser.c', dependencies: libgtk_dep)
test_grouping = executable('testgrouping', 'testgrouping.c', dependencies: libgtk_dep)
test_tooltips = executable('testtooltips', 'testtooltips.c', dependencies: libgtk_dep)
test_recentchoosermenu = executable('testrecentchoosermenu', 'testrecentchoosermenu.c', dependencies: libgtk_dep)
test_volumebutton = executable('testvolumebutton', 'testvolumebutton.c', dependencies: libgtk_dep)
test_scrolledwindow = executable('testscrolledwindow', 'testscrolledwindow.c', dependencies: libgtk_dep)
test_cellarea = executable('testcellarea', 'testcellarea.c', dependencies: libgtk_dep)
test_treemenu = executable('testtreemenu', 'testtreemenu.c', dependencies: libgtk_dep)
test_overlay = executable('testoverlay', 'testoverlay.c', dependencies: libgtk_dep)
test_overlaystyleclass = executable('testoverlaystyleclass', 'testoverlaystyleclass.c', dependencies: libgtk_dep)
test_appchooser = executable('testappchooser', 'testappchooser.c', dependencies: libgtk_dep)
test_expand = executable('testexpand', 'testexpand.c', dependencies: libgtk_dep)
test_expander = executable('testexpander', 'testexpander.c', dependencies: libgtk_dep)
test_switch = executable('testswitch', 'testswitch.c', dependencies: libgtk_dep)
test_styleexamples = executable('styleexamples', 'styleexamples.c', dependencies: libgtk_dep)
test_toplevelembed = executable('testtoplevelembed', 'testtoplevelembed.c', dependencies: libgtk_dep)
test_textview = executable('testtextview', 'testtextview.c', dependencies: libgtk_dep)
test_animation = executable('testanimation', 'testanimation.c', dependencies: libgtk_dep)
test_pixbuf_scale = executable('testpixbuf_scale', 'testpixbuf-scale.c', dependencies: libgtk_dep)
test_pixbuf_color = executable('testpixbuf_color', 'testpixbuf-color.c', dependencies: libgtk_dep)
test_pixbuf_save = executable('testpixbuf_save', 'testpixbuf-save.c', dependencies: libgtk_dep)
test_colorchooser = executable('testcolorchooser', 'testcolorchooser.c', dependencies: libgtk_dep)
test_colorchooser2 = executable('testcolorchooser2', 'testcolorchooser2.c', dependencies: libgtk_dep)
test_kineticscrolling = executable('testkineticscrolling', 'testkineticscrolling.c', dependencies: libgtk_dep)
test_stack = executable('teststack', 'teststack.c', dependencies: libgtk_dep)
test_revealer = executable('testrevealer', 'testrevealer.c', dependencies: libgtk_dep)
test_revealer2 = executable('testrevealer2', 'testrevealer2.c', dependencies: libgtk_dep)
test_titlebar = executable('testtitlebar', 'testtitlebar.c', dependencies: libgtk_dep)
test_windowsize = executable('testwindowsize', 'testwindowsize.c', dependencies: libgtk_dep)
test_listmodel = executable('listmodel', 'listmodel.c', dependencies: libgtk_dep)
test_popover = executable('testpopover', 'testpopover.c', dependencies: libgtk_dep)
test_cairo = executable('testcairo', 'testcairo.c', dependencies: libgtk_dep)
test_overlayscroll = executable('overlayscroll', 'overlayscroll.c', dependencies: libgtk_dep)
test_syncscroll = executable('syncscroll', 'syncscroll.c', dependencies: libgtk_dep)
test_subsurface = executable('subsurface', 'subsurface.c', dependencies: libgtk_dep)
test_motion_compression = executable('motion-compression', 'motion-compression.c', dependencies: libgtk_dep)
test_simple = executable('simple', 'simple.c', dependencies: libgtk_dep)
test_flicker = executable('flicker', 'flicker.c', dependencies: libgtk_dep)
test_print_editor = executable('print-editor', 'print-editor.c', dependencies: libgtk_dep)
test_accel = executable('testaccel', 'testaccel.c', dependencies: libgtk_dep)
test_adjustsize = executable('testadjustsize', 'testadjustsize.c', dependencies: libgtk_dep)
test_appchooserbutton = executable('testappchooserbutton', 'testappchooserbutton.c', dependencies: libgtk_dep)
test_assistant = executable('testassistant', 'testassistant.c', dependencies: libgtk_dep)
test_box = executable('testbox', 'testbox.c', dependencies: libgtk_dep)
test_calendar = executable('testcalendar', 'testcalendar.c', dependencies: libgtk_dep)
test_clipboard = executable('testclipboard', 'testclipboard.c', dependencies: libgtk_dep)
test_combo = executable('testcombo', 'testcombo.c', dependencies: libgtk_dep)
test_combochange = executable('testcombochange', 'testcombochange.c', dependencies: libgtk_dep)
test_cellrenderertext = executable('testcellrenderertext', 'testcellrenderertext.c', dependencies: libgtk_dep)
test_dialog = executable('testdialog', 'testdialog.c', dependencies: libgtk_dep)
test_dnd = executable('testdnd', 'testdnd.c', dependencies: libgtk_dep)
test_dnd2 = executable('testdnd2', 'testdnd2.c', dependencies: libgtk_dep)
test_ellipsise = executable('testellipsise', 'testellipsise.c', dependencies: libgtk_dep)
test_emblems = executable('testemblems', 'testemblems.c', dependencies: libgtk_dep)
test_fullscreen = executable('testfullscreen', 'testfullscreen.c', dependencies: libgtk_dep)
test_headerbar = executable('testheaderbar', 'testheaderbar.c', dependencies: libgtk_dep)
test_heightforwidth = executable('testheightforwidth', 'testheightforwidth.c', dependencies: libgtk_dep)
test_icontheme = executable('testicontheme', 'testicontheme.c', dependencies: libgtk_dep)
test_image = executable('testimage', 'testimage.c', dependencies: libgtk_dep)
test_input = executable('testinput', 'testinput.c', dependencies: libgtk_dep)
test_list = executable('testlist', 'testlist.c', dependencies: libgtk_dep)
test_list2 = executable('testlist2', 'testlist2.c', dependencies: libgtk_dep)
test_list3 = executable('testlist3', 'testlist3.c', dependencies: libgtk_dep)
test_levelbar = executable('testlevelbar', 'testlevelbar.c', dependencies: libgtk_dep)
test_lockbutton = executable('testlockbutton', 'testlockbutton.c', dependencies: libgtk_dep)
test_mountoperation = executable('testmountoperation', 'testmountoperation.c', dependencies: libgtk_dep)
test_multidisplay = executable('testmultidisplay', 'testmultidisplay.c', dependencies: libgtk_dep)
test_notebookdnd = executable('testnotebookdnd', 'testnotebookdnd.c', dependencies: libgtk_dep)
test_nouiprint = executable('testnouiprint', 'testnouiprint.c', dependencies: libgtk_dep)
test_orientable = executable('testorientable', 'testorientable.c', dependencies: libgtk_dep)
test_richtext = executable('testrichtext', 'testrichtext.c', dependencies: libgtk_dep)
test_scale = executable('testscale', 'testscale.c', dependencies: libgtk_dep)
test_selection = executable('testselection', 'testselection.c', dependencies: libgtk_dep)
test_selectionmode = executable('testselectionmode', 'testselectionmode.c', dependencies: libgtk_dep)
test_stresstest_toolbar = executable('stresstest-oolbar', 'stresstest-toolbar.c', dependencies: libgtk_dep)
test_verticalcells = executable('testverticalcells', 'testverticalcells.c', dependencies: libgtk_dep)
test_treestoretest = executable('treestoretest', 'treestoretest.c', dependencies: libgtk_dep)
test_xinerama = executable('testxinerama', 'testxinerama.c', dependencies: libgtk_dep)
test_scrolledge = executable('testscrolledge', 'testscrolledge.c', dependencies: libgtk_dep)
test_noscreen = executable('testnoscreen', 'testnoscreen.c', dependencies: libgtk_dep)
test_treepos = executable('testtreepos', 'testtreepos.c', dependencies: libgtk_dep)
test_sensitive = executable('testsensitive', 'testsensitive.c', dependencies: libgtk_dep)
test_gmenu = executable('testgmenu', 'testgmenu.c', dependencies: libgtk_dep)
test_logout = executable('testlogout', 'testlogout.c', dependencies: libgtk_dep)
test_splitheaders = executable('testsplitheaders', 'testsplitheaders.c', dependencies: libgtk_dep)
test_actionbar = executable('testactionbar', 'testactionbar.c', dependencies: libgtk_dep)
test_popup = executable('testpopup', 'testpopup.c', dependencies: libgtk_dep)
test_popupat = executable('testpopupat', 'testpopupat.c', dependencies: libgtk_dep)
if os_linux
test_fontchooserdialog = executable('testfontchooserdialog', 'testfontchooserdialog.c', dependencies: libgtk_dep)
endif
subdir('visuals')

View File

@@ -0,0 +1,6 @@
visuals = executable(
'visuals',
'visuals.c',
dependencies: libgtk_dep,
)

View File

@@ -0,0 +1,11 @@
test_text = executable(
'a11y_test_text',
'text.c',
dependencies: libgtk_dep
)
test('a11y/text', test_text)

View File

@@ -0,0 +1,6 @@
subdir('parser')
subdir('nodes')
subdir('style')
test_api = executable('api', 'api.c', dependencies: libgtk_dep)
test('css/api', test_api)

View File

@@ -0,0 +1,3 @@
test_nodes = executable('test-css-nodes', 'test-css-nodes.c', dependencies: libgtk_dep)
test('css/nodes/test-nodes', test_nodes)

View File

@@ -0,0 +1,3 @@
test_parser = executable('test-css-parser', 'test-css-parser.c', dependencies: libgtk_dep)
test('css/parser/css-parser', test_parser)

View File

@@ -0,0 +1,14 @@
cssresources = gnome.compile_resources(
'cssresources',
'test-css-style.gresource.xml',
source_dir: '.',
)
test_style = executable(
'test-css-style',
'test-css-style.c',
cssresources,
dependencies: libgtk_dep,
)
test('css/style/test-style', test_style)

24
testsuite/gdk/meson.build Normal file
View File

@@ -0,0 +1,24 @@
test_cairo = executable('cairo', 'cairo.c', dependencies: libgdk_dep)
test('gdk/cairo', test_cairo)
test_display = executable('display', 'display.c', dependencies: libgdk_dep)
test('gdk/display', test_display)
test_encoding = executable('encoding', 'encoding.c', dependencies: libgdk_dep)
test('gdk/encoding', test_encoding)
test_keysyms = executable('keysyms', 'keysyms.c', dependencies: libgdk_dep)
test('gdk/keysyms', test_keysyms)
test_rectangle = executable('rectangle', 'rectangle.c', dependencies: libgdk_dep)
test('gdk/rectangle', test_rectangle)
test_rgba = executable('rgba', 'rgba.c', dependencies: libgdk_dep)
test('gdk/rgba', test_rgba)
test_seat = executable('seat', 'seat.c', dependencies: libgdk_dep)
test('gdk/seat', test_seat)
test_visual = executable('visual', 'visual.c', dependencies: libgdk_dep)
test('gdk/visual', test_visual)

146
testsuite/gtk/meson.build Normal file
View File

@@ -0,0 +1,146 @@
test_accel = executable('accel', 'accel.c', dependencies: libgtk_dep)
test('gtk/accel test', test_accel)
test_accessible = executable('accessible', 'accessible.c', dependencies: libgtk_dep)
test('gtk/accessible test', test_accessible)
test_adjustment = executable('adjustment', 'adjustment.c', dependencies: libgtk_dep)
test('gtk/adjustment test', test_adjustment)
test_bitmask = executable('bitmask', 'bitmask.c', dependencies: libgtk_dep)
test('gtk/bitmask test', test_bitmask)
test_builder = executable('builder', 'builder.c', dependencies: libgtk_dep)
test('gtk/builder test', test_builder)
test_builderparser = executable(
'builderparser',
'builderparser.c',
dependencies: libgtk_dep,
link_with: libgtk,
)
test(
'gtk/builderparser test',
test_builderparser,
env: [
'G_TEST_SRCDIR='+meson.source_root(),
'G_TEST_BUILDDIR='+meson.build_root()
]
)
test_cellarea = executable('cellarea', 'cellarea.c', dependencies: libgtk_dep)
test('gtk/cellarea test', test_cellarea)
test_check_icon_names = executable('check_icon_names', 'check-icon-names.c', dependencies: libgtk_dep)
test('gtk/check_icon_names test', test_check_icon_names)
test_check_cursor_names = executable('check_cursor_names', 'check-cursor-names.c', dependencies: libgtk_dep)
test('gtk/check_cursor_names test', test_check_cursor_names)
test_clipboard = executable('clipboard', 'clipboard.c', dependencies: libgtk_dep)
test('gtk/clipboard test', test_clipboard)
test_cssprovider = executable('cssprovider', 'cssprovider.c', dependencies: libgtk_dep)
test('gtk/cssprovider test', test_cssprovider)
test_defaultvalue = executable('defaultvalue', 'defaultvalue.c', dependencies: libgtk_dep)
test('gtk/defaultvalue test', test_defaultvalue)
test_entry = executable('entry', 'entry.c', dependencies: libgtk_dep)
test('gtk/entry test', test_entry)
test_firefox_stylecontext = executable('firefox_stylecontext', 'firefox-stylecontext.c', dependencies: libgtk_dep)
test('gtk/firefox_stylecontext test', test_firefox_stylecontext)
test_floating = executable('floating', 'floating.c', dependencies: libgtk_dep)
test('gtk/floating test', test_floating)
test_focus = executable('focus', 'focus.c', dependencies: libgtk_dep)
test('gtk/focus test', test_focus)
test_gestures = executable('gestures', 'gestures.c', dependencies: libgtk_dep)
test('gtk/gestures test', test_gestures)
test_grid = executable('grid', 'grid.c', dependencies: libgtk_dep)
test('gtk/grid test', test_grid)
test_gtkmenu = executable('gtkmenu', 'gtkmenu.c', dependencies: libgtk_dep)
test('gtk/gtkmenu test', test_gtkmenu)
test_icontheme = executable('icontheme', 'icontheme.c', dependencies: libgtk_dep)
test('gtk/icontheme test', test_icontheme)
test_keyhash = executable('keyhash', 'keyhash.c', dependencies: libgtk_dep)
test('gtk/keyhash test', test_keyhash)
test_listbox = executable('listbox', 'listbox.c', dependencies: libgtk_dep)
test('gtk/listbox test', test_listbox)
test_notify = executable('notify', 'notify.c', dependencies: libgtk_dep)
test('gtk/notify test', test_notify)
test_no_gtk_init = executable('no_gtk_init', 'no-gtk-init.c', dependencies: libgtk_dep)
test('gtk/no_gtk_init test', test_no_gtk_init)
test_object = executable('object', 'object.c', dependencies: libgtk_dep)
test('gtk/object test', test_object)
test_objects_finalize = executable('objects_finalize', 'objects-finalize.c', dependencies: libgtk_dep)
test('gtk/objects_finalize test', test_objects_finalize)
test_papersize = executable('papersize', 'papersize.c', dependencies: libgtk_dep)
test('gtk/papersize test', test_papersize)
test_rbtree = executable('rbtree', 'rbtree.c', dependencies: libgtk_dep)
test('gtk/rbtree test', test_rbtree)
test_recentmanager = executable('recentmanager', 'recentmanager.c', dependencies: libgtk_dep)
test('gtk/recentmanager test', test_recentmanager)
test_regression_tests = executable('regression_tests', 'regression-tests.c', dependencies: libgtk_dep)
test('gtk/regression_tests test', test_regression_tests)
test_scrolledwindow = executable('scrolledwindow', 'scrolledwindow.c', dependencies: libgtk_dep)
test('gtk/scrolledwindow test', test_scrolledwindow)
test_spinbutton = executable('spinbutton', 'spinbutton.c', dependencies: libgtk_dep)
test('gtk/spinbutton test', test_spinbutton)
test_stylecontext = executable('stylecontext', 'stylecontext.c', dependencies: libgtk_dep)
test('gtk/stylecontext test', test_stylecontext)
test_templates = executable('templates', 'templates.c', dependencies: libgtk_dep)
test('gtk/templates test', test_templates)
test_textbuffer = executable('textbuffer', 'textbuffer.c', dependencies: libgtk_dep)
test('gtk/textbuffer test', test_textbuffer)
test_textiter = executable('textiter', 'textiter.c', dependencies: libgtk_dep)
test('gtk/textiter test', test_textiter)
test_treemodel = executable(
'treemodel',
'treemodel.c', 'liststore.c', 'treestore.c', 'filtermodel.c',
'modelrefcount.c', 'sortmodel.c', 'gtktreemodelrefcount.c',
dependencies: libgtk_dep
)
test('gtk/treemodel test', test_treemodel)
test_treepath = executable('treepath', 'treepath.c', dependencies: libgtk_dep)
test('gtk/treepath test', test_treepath)
test_treeview = executable('treeview', 'treeview.c', dependencies: libgtk_dep)
test('gtk/treeview test', test_treeview)
test_typename = executable('typename', 'typename.c', dependencies: libgtk_dep)
test('gtk/typename test', test_typename)
test_window = executable('window', 'window.c', dependencies: libgtk_dep)
test('gtk/window test', test_window)
test_displayclose = executable('displayclose', 'displayclose.c', dependencies: libgtk_dep)
test('gtk/displayclose test', test_displayclose)
test_revealer_size = executable('revealer_size', 'revealer-size.c', dependencies: libgtk_dep)
test('gtk/revealer_size test', test_revealer_size)

6
testsuite/meson.build Normal file
View File

@@ -0,0 +1,6 @@
subdir('gtk')
subdir('gdk')
subdir('css')
subdir('a11y')
# subdir('tools')
# subdir('reftests')