Compare commits
148 Commits
wip/3-moni
...
wip/carlos
Author | SHA1 | Date | |
---|---|---|---|
![]() |
162d6d45a0 | ||
![]() |
ff507273d2 | ||
![]() |
f033d0e846 | ||
![]() |
ca67d52cac | ||
![]() |
60d22b7cd0 | ||
![]() |
e9778eba18 | ||
![]() |
56d260cfb3 | ||
![]() |
c45d5f53ff | ||
![]() |
4e402b3972 | ||
![]() |
79d99cbe3f | ||
![]() |
328eff7352 | ||
![]() |
ed5c1f433b | ||
![]() |
7ac2083134 | ||
![]() |
bd97b11414 | ||
![]() |
0da0207eed | ||
![]() |
08229a6f5d | ||
![]() |
50071303af | ||
![]() |
2b2d77dc3e | ||
![]() |
a0909c3440 | ||
![]() |
22f865122c | ||
![]() |
60ac2838b5 | ||
![]() |
dfde2f59da | ||
![]() |
3d2ca9a67f | ||
![]() |
9182c8b801 | ||
![]() |
1def099047 | ||
![]() |
ddb0ef1e8d | ||
![]() |
a56a59feee | ||
![]() |
174df4eaeb | ||
![]() |
e3e933c47a | ||
![]() |
fda2e798bb | ||
![]() |
fb38738fe9 | ||
![]() |
5eb749d690 | ||
![]() |
763ae36cee | ||
![]() |
582b67a2f1 | ||
![]() |
f740e8ed79 | ||
![]() |
d360b25b81 | ||
![]() |
3693f6f630 | ||
![]() |
ebfc6184b2 | ||
![]() |
8715f7481b | ||
![]() |
12f8325cbc | ||
![]() |
956ab4bd58 | ||
![]() |
58b5dee869 | ||
![]() |
b448ced8e4 | ||
![]() |
73ddd7cd48 | ||
![]() |
e7fb45364a | ||
![]() |
0478c225b7 | ||
![]() |
93c29318b2 | ||
![]() |
51e4fe7fef | ||
![]() |
d52081bed4 | ||
![]() |
686b7f8baa | ||
![]() |
b7a9c7e7d3 | ||
![]() |
676a8da005 | ||
![]() |
490f27efcb | ||
![]() |
173867c12b | ||
![]() |
df1384a856 | ||
![]() |
5fbeecaac6 | ||
![]() |
54febd1419 | ||
![]() |
7952808469 | ||
![]() |
0442fc8ddc | ||
![]() |
80e3c1de57 | ||
![]() |
ac2f8cad0c | ||
![]() |
7e8fc13504 | ||
![]() |
60f7ff3a69 | ||
![]() |
2fe05d7c35 | ||
![]() |
012691bebf | ||
![]() |
c84d7ebc6d | ||
![]() |
f9118fb99b | ||
![]() |
d3301d6b53 | ||
![]() |
1755a8b8de | ||
![]() |
36b46af92f | ||
![]() |
e1370ee209 | ||
![]() |
37e36e8208 | ||
![]() |
eac18647c3 | ||
![]() |
c681ccef3c | ||
![]() |
b329256113 | ||
![]() |
177d0c2d63 | ||
![]() |
f7d4a727a8 | ||
![]() |
d539fe28d5 | ||
![]() |
7759adf8e9 | ||
![]() |
7a75692e11 | ||
![]() |
9bd427a74c | ||
![]() |
ebb6c56f67 | ||
![]() |
dcb525397c | ||
![]() |
05ab8eebe8 | ||
![]() |
981b045459 | ||
![]() |
6502735f01 | ||
![]() |
1d73533f78 | ||
![]() |
697aeae2ad | ||
![]() |
2e79d05e04 | ||
![]() |
4139907a7e | ||
![]() |
3c6a518d40 | ||
![]() |
a7df459416 | ||
![]() |
9f3d321bf2 | ||
![]() |
49c2be40bb | ||
![]() |
781ec74fd2 | ||
![]() |
7a5e0c7824 | ||
![]() |
c786b6c13c | ||
![]() |
bbcb66ddf4 | ||
![]() |
ec25f3a6b7 | ||
![]() |
dbe7279c7f | ||
![]() |
931934511c | ||
![]() |
20c9ca25c0 | ||
![]() |
f64eba57ce | ||
![]() |
149e4d6934 | ||
![]() |
8d514095cb | ||
![]() |
bdf8d0f1c3 | ||
![]() |
8e9184b62e | ||
![]() |
b34bb773a4 | ||
![]() |
efd9f86efe | ||
![]() |
7a9805554c | ||
![]() |
ffca9b999d | ||
![]() |
d30301c00a | ||
![]() |
faf89ff35f | ||
![]() |
87858a4e01 | ||
![]() |
08a5e660d3 | ||
![]() |
df48b94889 | ||
![]() |
2b938ce795 | ||
![]() |
df284f9c9d | ||
![]() |
7d20101198 | ||
![]() |
ae4d3bc27d | ||
![]() |
fe0a394e69 | ||
![]() |
1f3e9176fc | ||
![]() |
ffaec917e5 | ||
![]() |
bf4ccd21c1 | ||
![]() |
9a843857b3 | ||
![]() |
9004253c4e | ||
![]() |
c5471e5b8b | ||
![]() |
eacf2f2187 | ||
![]() |
7821256f5c | ||
![]() |
4baefe46b3 | ||
![]() |
c388a8fc9d | ||
![]() |
e4a2d15171 | ||
![]() |
4786cc85bd | ||
![]() |
666bef7af9 | ||
![]() |
19e3c21667 | ||
![]() |
da5a2d3cb8 | ||
![]() |
7226c5c7bf | ||
![]() |
acacd3dd64 | ||
![]() |
20b271fa49 | ||
![]() |
e4de9ed580 | ||
![]() |
452ef4d5bb | ||
![]() |
1467b6b02a | ||
![]() |
9ca6c74267 | ||
![]() |
319500e4f3 | ||
![]() |
b2e75b5da0 | ||
![]() |
365ea2fd56 | ||
![]() |
88f8228425 | ||
![]() |
f8cd1e55a4 |
29
.gitignore
vendored
29
.gitignore
vendored
@@ -1,25 +1,9 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
Makefile.in.in
|
||||
aclocal.m4
|
||||
autom4te.cache
|
||||
build-aux
|
||||
compile
|
||||
config.guess
|
||||
config.h
|
||||
config.h.in
|
||||
config.log
|
||||
config.status
|
||||
config.sub
|
||||
configure
|
||||
depcomp
|
||||
install-sh
|
||||
intltool-extract.in
|
||||
intltool-merge.in
|
||||
libtool
|
||||
ltmain.sh
|
||||
missing
|
||||
.deps
|
||||
50-mutter-navigation.xml
|
||||
50-mutter-system.xml
|
||||
50-mutter-windows.xml
|
||||
@@ -33,15 +17,11 @@ mutter-wayland.desktop
|
||||
*.swp
|
||||
*.gir
|
||||
*.typelib
|
||||
stamp-h1
|
||||
*.gmo
|
||||
*.make
|
||||
*.log
|
||||
*.trs
|
||||
*~
|
||||
stamp-it
|
||||
.intltool-merge-cache
|
||||
ABOUT-NLS
|
||||
POTFILES
|
||||
Makevars.template
|
||||
po/*.header
|
||||
@@ -64,9 +44,7 @@ org.gnome.mutter.wayland.gschema.xml
|
||||
testasyncgetprop
|
||||
testboxes
|
||||
testgradient
|
||||
m4/*
|
||||
INSTALL
|
||||
mkinstalldirs
|
||||
meta-enum-types.[ch]
|
||||
src/stamp-meta-enum-types.h
|
||||
src/meta-dbus-display-config.[ch]
|
||||
@@ -122,13 +100,6 @@ doc/reference/meta-undocumented.txt
|
||||
doc/reference/meta-unused.txt
|
||||
doc/reference/meta-docs.sgml
|
||||
doc/reference/meta.types
|
||||
gtk-doc.m4
|
||||
intltool.m4
|
||||
libtool.m4
|
||||
ltoptions.m4
|
||||
ltsugar.m4
|
||||
ltversion.m4
|
||||
lt~obsolete.m4
|
||||
.dirstamp
|
||||
**/tags.*
|
||||
build/
|
||||
|
@@ -10,5 +10,11 @@ RUN dnf -y update && dnf -y upgrade && \
|
||||
# For running unit tests
|
||||
dnf install -y xorg-x11-server-Xvfb mesa-dri-drivers dbus dbus-x11 && \
|
||||
|
||||
# Unpackaged versions
|
||||
dnf install -y https://copr-be.cloud.fedoraproject.org/results/jadahl/mutter-ci/fedora-29-x86_64/00836095-gsettings-desktop-schemas/gsettings-desktop-schemas-3.30.1-1.20181206git918efdd69be53.fc29.x86_64.rpm https://copr-be.cloud.fedoraproject.org/results/jadahl/mutter-ci/fedora-29-x86_64/00836095-gsettings-desktop-schemas/gsettings-desktop-schemas-devel-3.30.1-1.20181206git918efdd69be53.fc29.x86_64.rpm && \
|
||||
|
||||
# Packages not yet in stable
|
||||
dnf install -y https://kojipkgs.fedoraproject.org//packages/pipewire/0.2.5/1.fc29/x86_64/pipewire-0.2.5-1.fc29.x86_64.rpm https://kojipkgs.fedoraproject.org//packages/pipewire/0.2.5/1.fc29/x86_64/pipewire-devel-0.2.5-1.fc29.x86_64.rpm https://kojipkgs.fedoraproject.org//packages/pipewire/0.2.5/1.fc29/x86_64/pipewire-libs-0.2.5-1.fc29.x86_64.rpm && \
|
||||
|
||||
dnf install -y intltool redhat-rpm-config make && \
|
||||
dnf clean all
|
||||
|
13
Makefile.am
13
Makefile.am
@@ -1,13 +0,0 @@
|
||||
pkgdatadir = $(datadir)/mutter-$(LIBMUTTER_API_VERSION)
|
||||
pkglibdir = $(libdir)/mutter-$(LIBMUTTER_API_VERSION)
|
||||
|
||||
SUBDIRS = cogl clutter data src po doc
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
|
||||
|
||||
DISTCLEANFILES = \
|
||||
intltool-extract \
|
||||
intltool-merge \
|
||||
intltool-update \
|
||||
po/stamp-it \
|
||||
po/.intltool-merge-cache
|
29
NEWS
29
NEWS
@@ -1,3 +1,32 @@
|
||||
3.31.4
|
||||
======
|
||||
* keybindings: Limit corner move to current monitor [Jānis; #320]
|
||||
* xdg-output: Report rotated physical dimensions [Olivier; #369]
|
||||
* Add continuous integration pipeline [Jonas; #193]
|
||||
* Improve performance on secondary GPUs [Pekka; #323, !313]
|
||||
* Use the actual hardware refresh rate [Daniel; #781296]
|
||||
* Remove hide-titlebar-when-maximized support [Florian; !221]
|
||||
* wayland: Implement buffer transforms [Robert; !322]
|
||||
* Remove ability to externally set sync-to-vblank [Georges; !191]
|
||||
* Turn off touchscreens together with DPMS [Carlos; gnome-settings-daemon#29]
|
||||
* Mipmap the wallpaper when shrinking [Daniel; gnome-shell#254]
|
||||
* Implement RecordWindow method for screen-casts [Olivier; !306]
|
||||
* Fix EGLStream texture downloading [Jonas; !362]
|
||||
* Split out display-server-specific code from MetaWindowActor [Georges; !368]
|
||||
* Improve render performance on some KMS devices with software GL [Jonas; #106]
|
||||
* Fix damage area of transformed surfaces [Robert; !366]
|
||||
* Remove autotools support [George]
|
||||
* Misc. bug fixes and cleanups [Jonas, Alan, Olivier, Carlos, Javier, Peter,
|
||||
Daniel, Robert, Florian; !309, #790207, #272, #393, #276, #404, #104, !343,
|
||||
#765011, #786663, #342, !356, #414, #782344, #781034, #423, !374, !382, !383]
|
||||
|
||||
Contributors:
|
||||
Jonas Ådahl, Nikita Churaev, Alan Coopersmith, Jānis Džeriņš, Olivier Fourdan,
|
||||
Carlos Garnacho, Niels De Graef, Peter Hutterer, Javier Jardón,
|
||||
Abderrahim Kitouni, Andre Klapper, Ting-Wei Lan, Robert Mader,
|
||||
Emilio Pozuelo Monfort, Florian Müllner, Georges Basile Stavracas Neto,
|
||||
Pekka Paalanen, Daniel Stone, Marco Trevisan (Treviño), Daniel van Vugt
|
||||
|
||||
3.31.2
|
||||
======
|
||||
* Fix handling of non-UTF8 encodings [Florian; !227]
|
||||
|
28
autogen.sh
28
autogen.sh
@@ -1,28 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Run this to generate all the initial makefiles, etc.
|
||||
|
||||
srcdir=`dirname $0`
|
||||
test -z "$srcdir" && srcdir=.
|
||||
|
||||
REQUIRED_AUTOMAKE_VERSION=1.11
|
||||
|
||||
olddir="$(pwd)"
|
||||
|
||||
cd "${srcdir}"
|
||||
|
||||
(test -f configure.ac \
|
||||
&& test -d src) || {
|
||||
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
|
||||
echo " top-level mutter directory"
|
||||
exit 1
|
||||
}
|
||||
|
||||
aclocal --install || exit 1
|
||||
intltoolize --force --copy --automake || exit 1
|
||||
autoreconf --verbose --force --install || exit 1
|
||||
|
||||
cd "${olddir}"
|
||||
|
||||
if [ "$NOCONFIGURE" = "" ]; then
|
||||
"${srcdir}/configure" "$@" || exit 1
|
||||
fi
|
@@ -1,49 +0,0 @@
|
||||
NULL =
|
||||
|
||||
SUBDIRS = build clutter tests
|
||||
|
||||
DIST_SUBDIRS = clutter tests build
|
||||
|
||||
# XXX - this is a massive hack to make autoreconf honour the ACLOCAL_FLAGS
|
||||
# that jhbuild sets while still retaining build/autotools as the authoritative
|
||||
# source for m4 macros
|
||||
ACLOCAL_AMFLAGS = -I build/autotools ${ACLOCAL_FLAGS}
|
||||
|
||||
CLEANFILES = $(pcfiles)
|
||||
|
||||
DISTCLEANFILES =
|
||||
|
||||
DISTCHECK_CONFIGURE_FLAGS = --enable-maintainer-flags
|
||||
|
||||
# proxy rules for tests
|
||||
test-report full-report:
|
||||
$(MAKE) -C tests/conform $(@)
|
||||
|
||||
perf-report:
|
||||
$(MAKE) -C tests/performance $(@)
|
||||
|
||||
if ENABLE_GCOV
|
||||
# use recursive makes in order to ignore errors during check/perf
|
||||
lcov:
|
||||
-$(MAKE) $(AM_MAKEFLAGS) -C clutter check
|
||||
-$(MAKE) $(AM_MAKEFLAGS) -C tests/conform test
|
||||
$(MAKE) $(AM_MAKEFLAGS) genlcov
|
||||
|
||||
# we have to massage the lcov.info file slightly to hide the effect of libtool
|
||||
# placing the objects files in the .libs/ directory separate from the *.c
|
||||
genlcov:
|
||||
$(LTP) --directory $(top_builddir) --capture --output-file clutter-lcov.info --test-name CLUTTER_TEST --no-checksum
|
||||
$(SED) -e 's#.libs/##' < clutter-lcov.info > clutter-lcov.info.tmp
|
||||
LANG=C $(LTP_GENHTML) --prefix $(top_builddir) --output-directory clutter-lcov --title "Clutter Code Coverage" --show-details clutter-lcov.info.tmp
|
||||
rm -f clutter-lcov.info.tmp
|
||||
|
||||
lcov-clean:
|
||||
-$(LTP) --directory $(top_builddir) -z
|
||||
-$(RM) -rf clutter-lcov.info clutter-lcov
|
||||
else
|
||||
lcov genlcov lcov-clean:
|
||||
@echo You need to configure Clutter with support for gcov enabled.
|
||||
@echo e.g., ./configure --enable-gcov
|
||||
endif
|
||||
|
||||
.PHONY: test-report full-report perf-report lcov genlcov lcov-clean
|
@@ -1 +0,0 @@
|
||||
SUBDIRS = autotools
|
8
clutter/build/autotools/.gitignore
vendored
8
clutter/build/autotools/.gitignore
vendored
@@ -1,8 +0,0 @@
|
||||
gtk-doc.m4
|
||||
libtool.m4
|
||||
ltoptions.m4
|
||||
ltsugar.m4
|
||||
ltversion.m4
|
||||
lt~obsolete.m4
|
||||
shave
|
||||
shave-libtool
|
@@ -1,10 +0,0 @@
|
||||
NULL =
|
||||
|
||||
EXTRA_DIST = \
|
||||
introspection.m4 \
|
||||
as-compiler-flag.m4 \
|
||||
glibtests.m4 \
|
||||
glib-tap.mk \
|
||||
tap-driver.sh \
|
||||
tap-test \
|
||||
$(NULL)
|
@@ -1,62 +0,0 @@
|
||||
dnl as-compiler-flag.m4 0.1.0
|
||||
|
||||
dnl autostars m4 macro for detection of compiler flags
|
||||
|
||||
dnl David Schleef <ds@schleef.org>
|
||||
|
||||
dnl $Id: as-compiler-flag.m4,v 1.1 2005/12/15 23:35:19 ds Exp $
|
||||
|
||||
dnl AS_COMPILER_FLAG(CFLAGS, ACTION-IF-ACCEPTED, [ACTION-IF-NOT-ACCEPTED])
|
||||
dnl Tries to compile with the given CFLAGS.
|
||||
dnl Runs ACTION-IF-ACCEPTED if the compiler can compile with the flags,
|
||||
dnl and ACTION-IF-NOT-ACCEPTED otherwise.
|
||||
|
||||
AC_DEFUN([AS_COMPILER_FLAG],
|
||||
[
|
||||
AC_MSG_CHECKING([to see if compiler understands $1])
|
||||
|
||||
save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $1"
|
||||
|
||||
AC_TRY_COMPILE([ ], [], [flag_ok=yes], [flag_ok=no])
|
||||
CFLAGS="$save_CFLAGS"
|
||||
|
||||
if test "X$flag_ok" = Xyes ; then
|
||||
m4_ifvaln([$2],[$2])
|
||||
true
|
||||
else
|
||||
m4_ifvaln([$3],[$3])
|
||||
true
|
||||
fi
|
||||
AC_MSG_RESULT([$flag_ok])
|
||||
])
|
||||
|
||||
dnl AS_COMPILER_FLAGS(VAR, FLAGS)
|
||||
dnl Tries to compile with the given CFLAGS.
|
||||
|
||||
AC_DEFUN([AS_COMPILER_FLAGS],
|
||||
[
|
||||
list=$2
|
||||
flags_supported=""
|
||||
flags_unsupported=""
|
||||
AC_MSG_CHECKING([for supported compiler flags])
|
||||
for each in $list
|
||||
do
|
||||
save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $each"
|
||||
AC_TRY_COMPILE([ ], [], [flag_ok=yes], [flag_ok=no])
|
||||
CFLAGS="$save_CFLAGS"
|
||||
|
||||
if test "X$flag_ok" = Xyes ; then
|
||||
flags_supported="$flags_supported $each"
|
||||
else
|
||||
flags_unsupported="$flags_unsupported $each"
|
||||
fi
|
||||
done
|
||||
AC_MSG_RESULT([$flags_supported])
|
||||
if test "X$flags_unsupported" != X ; then
|
||||
AC_MSG_WARN([unsupported compiler flags: $flags_unsupported])
|
||||
fi
|
||||
$1="$$1 $flags_supported"
|
||||
])
|
||||
|
@@ -1,134 +0,0 @@
|
||||
# GLIB - Library of useful C routines
|
||||
|
||||
TESTS_ENVIRONMENT= \
|
||||
G_TEST_SRCDIR="$(abs_srcdir)" \
|
||||
G_TEST_BUILDDIR="$(abs_builddir)" \
|
||||
G_DEBUG=gc-friendly \
|
||||
MALLOC_CHECK_=2 \
|
||||
MALLOC_PERTURB_=$$(($${RANDOM:-256} % 256))
|
||||
LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) $(top_srcdir)/build/autotools/tap-driver.sh
|
||||
LOG_COMPILER = $(top_srcdir)/build/autotools/tap-test
|
||||
|
||||
NULL =
|
||||
|
||||
# initialize variables for unconditional += appending
|
||||
BUILT_SOURCES =
|
||||
BUILT_EXTRA_DIST =
|
||||
CLEANFILES = *.log *.trs
|
||||
DISTCLEANFILES =
|
||||
MAINTAINERCLEANFILES =
|
||||
EXTRA_DIST =
|
||||
TESTS =
|
||||
|
||||
installed_test_LTLIBRARIES =
|
||||
installed_test_PROGRAMS =
|
||||
installed_test_SCRIPTS =
|
||||
nobase_installed_test_DATA =
|
||||
|
||||
noinst_LTLIBRARIES =
|
||||
noinst_PROGRAMS =
|
||||
noinst_SCRIPTS =
|
||||
noinst_DATA =
|
||||
|
||||
check_LTLIBRARIES =
|
||||
check_PROGRAMS =
|
||||
check_SCRIPTS =
|
||||
check_DATA =
|
||||
|
||||
# We support a fairly large range of possible variables. It is expected that all types of files in a test suite
|
||||
# will belong in exactly one of the following variables.
|
||||
#
|
||||
# First, we support the usual automake suffixes, but in lowercase, with the customary meaning:
|
||||
#
|
||||
# test_programs, test_scripts, test_data, test_ltlibraries
|
||||
#
|
||||
# The above are used to list files that are involved in both uninstalled and installed testing. The
|
||||
# test_programs and test_scripts are taken to be actual testcases and will be run as part of the test suite.
|
||||
# Note that _data is always used with the nobase_ automake variable name to ensure that installed test data is
|
||||
# installed in the same way as it appears in the package layout.
|
||||
#
|
||||
# In order to mark a particular file as being only for one type of testing, use 'installed' or 'uninstalled',
|
||||
# like so:
|
||||
#
|
||||
# installed_test_programs, uninstalled_test_programs
|
||||
# installed_test_scripts, uninstalled_test_scripts
|
||||
# installed_test_data, uninstalled_test_data
|
||||
# installed_test_ltlibraries, uninstalled_test_ltlibraries
|
||||
#
|
||||
# Additionally, we support 'extra' infixes for programs and scripts. This is used for support programs/scripts
|
||||
# that should not themselves be run as testcases (but exist to be used from other testcases):
|
||||
#
|
||||
# test_extra_programs, installed_test_extra_programs, uninstalled_test_extra_programs
|
||||
# test_extra_scripts, installed_test_extra_scripts, uninstalled_test_extra_scripts
|
||||
#
|
||||
# Additionally, for _scripts and _data, we support the customary dist_ prefix so that the named script or data
|
||||
# file automatically end up in the tarball.
|
||||
#
|
||||
# dist_test_scripts, dist_test_data, dist_test_extra_scripts
|
||||
# dist_installed_test_scripts, dist_installed_test_data, dist_installed_test_extra_scripts
|
||||
# dist_uninstalled_test_scripts, dist_uninstalled_test_data, dist_uninstalled_test_extra_scripts
|
||||
#
|
||||
# Note that no file is automatically disted unless it appears in one of the dist_ variables. This follows the
|
||||
# standard automake convention of not disting programs scripts or data by default.
|
||||
#
|
||||
# test_programs, test_scripts, uninstalled_test_programs and uninstalled_test_scripts (as well as their disted
|
||||
# variants) will be run as part of the in-tree 'make check'. These are all assumed to be runnable under
|
||||
# gtester. That's a bit strange for scripts, but it's possible.
|
||||
|
||||
TESTS += $(test_programs) $(test_scripts) $(uninstalled_test_programs) $(uninstalled_test_scripts) \
|
||||
$(dist_test_scripts) $(dist_uninstalled_test_scripts)
|
||||
|
||||
# Note: build even the installed-only targets during 'make check' to ensure that they still work.
|
||||
# We need to do a bit of trickery here and manage disting via EXTRA_DIST instead of using dist_ prefixes to
|
||||
# prevent automake from mistreating gmake functions like $(wildcard ...) and $(addprefix ...) as if they were
|
||||
# filenames, including removing duplicate instances of the opening part before the space, eg. '$(addprefix'.
|
||||
all_test_programs = $(test_programs) $(uninstalled_test_programs) $(installed_test_programs) \
|
||||
$(test_extra_programs) $(uninstalled_test_extra_programs) $(installed_test_extra_programs)
|
||||
all_test_scripts = $(test_scripts) $(uninstalled_test_scripts) $(installed_test_scripts) \
|
||||
$(test_extra_scripts) $(uninstalled_test_extra_scripts) $(installed_test_extra_scripts)
|
||||
all_dist_test_scripts = $(dist_test_scripts) $(dist_uninstalled_test_scripts) $(dist_installed_test_scripts) \
|
||||
$(dist_test_extra_scripts) $(dist_uninstalled_test_extra_scripts) $(dist_installed_test_extra_scripts)
|
||||
all_test_scripts += $(all_dist_test_scripts)
|
||||
EXTRA_DIST += $(all_dist_test_scripts)
|
||||
all_test_data = $(test_data) $(uninstalled_test_data) $(installed_test_data)
|
||||
all_dist_test_data = $(dist_test_data) $(dist_uninstalled_test_data) $(dist_installed_test_data)
|
||||
all_test_data += $(all_dist_test_data)
|
||||
EXTRA_DIST += $(all_dist_test_data)
|
||||
all_test_ltlibs = $(test_ltlibraries) $(uninstalled_test_ltlibraries) $(installed_test_ltlibraries)
|
||||
|
||||
if ENABLE_ALWAYS_BUILD_TESTS
|
||||
noinst_LTLIBRARIES += $(all_test_ltlibs)
|
||||
noinst_PROGRAMS += $(all_test_programs)
|
||||
noinst_SCRIPTS += $(all_test_scripts)
|
||||
noinst_DATA += $(all_test_data)
|
||||
else
|
||||
check_LTLIBRARIES += $(all_test_ltlibs)
|
||||
check_PROGRAMS += $(all_test_programs)
|
||||
check_SCRIPTS += $(all_test_scripts)
|
||||
check_DATA += $(all_test_data)
|
||||
endif
|
||||
|
||||
if ENABLE_INSTALLED_TESTS
|
||||
installed_test_PROGRAMS += $(test_programs) $(installed_test_programs) \
|
||||
$(test_extra_programs) $(installed_test_extra_programs)
|
||||
installed_test_SCRIPTS += $(test_scripts) $(installed_test_scripts) \
|
||||
$(test_extra_scripts) $(test_installed_extra_scripts)
|
||||
installed_test_SCRIPTS += $(dist_test_scripts) $(dist_test_extra_scripts) \
|
||||
$(dist_installed_test_scripts) $(dist_installed_test_extra_scripts)
|
||||
nobase_installed_test_DATA += $(test_data) $(installed_test_data)
|
||||
nobase_installed_test_DATA += $(dist_test_data) $(dist_installed_test_data)
|
||||
installed_test_LTLIBRARIES += $(test_ltlibraries) $(installed_test_ltlibraries)
|
||||
installed_testcases = $(test_programs) $(installed_test_programs) \
|
||||
$(test_scripts) $(installed_test_scripts) \
|
||||
$(dist_test_scripts) $(dist_installed_test_scripts)
|
||||
|
||||
installed_test_meta_DATA = $(installed_testcases:=.test)
|
||||
|
||||
%.test: %$(EXEEXT) Makefile
|
||||
$(AM_V_GEN) (echo '[Test]' > $@.tmp; \
|
||||
echo 'Type=session' >> $@.tmp; \
|
||||
echo 'Exec=env G_ENABLE_DIAGNOSTIC=0 CLUTTER_ENABLE_DIAGNOSTIC=0 $(installed_testdir)/$<' >> $@.tmp; \
|
||||
mv $@.tmp $@)
|
||||
|
||||
CLEANFILES += $(installed_test_meta_DATA)
|
||||
endif
|
@@ -1,28 +0,0 @@
|
||||
dnl GLIB_TESTS
|
||||
dnl
|
||||
|
||||
AC_DEFUN([GLIB_TESTS],
|
||||
[
|
||||
AC_ARG_ENABLE(installed-tests,
|
||||
AS_HELP_STRING([--enable-installed-tests],
|
||||
[Enable installation of some test cases]),
|
||||
[case ${enableval} in
|
||||
yes) ENABLE_INSTALLED_TESTS="1" ;;
|
||||
no) ENABLE_INSTALLED_TESTS="" ;;
|
||||
*) AC_MSG_ERROR([bad value ${enableval} for --enable-installed-tests]) ;;
|
||||
esac])
|
||||
AM_CONDITIONAL([ENABLE_INSTALLED_TESTS], test "$ENABLE_INSTALLED_TESTS" = "1")
|
||||
AC_ARG_ENABLE(always-build-tests,
|
||||
AS_HELP_STRING([--enable-always-build-tests],
|
||||
[Enable always building tests during 'make all']),
|
||||
[case ${enableval} in
|
||||
yes) ENABLE_ALWAYS_BUILD_TESTS="1" ;;
|
||||
no) ENABLE_ALWAYS_BUILD_TESTS="" ;;
|
||||
*) AC_MSG_ERROR([bad value ${enableval} for --enable-always-build-tests]) ;;
|
||||
esac])
|
||||
AM_CONDITIONAL([ENABLE_ALWAYS_BUILD_TESTS], test "$ENABLE_ALWAYS_BUILD_TESTS" = "1")
|
||||
if test "$ENABLE_INSTALLED_TESTS" = "1"; then
|
||||
AC_SUBST(installed_test_metadir, [${datadir}/installed-tests/]AC_PACKAGE_NAME)
|
||||
AC_SUBST(installed_testdir, [${libexecdir}/installed-tests/]AC_PACKAGE_NAME)
|
||||
fi
|
||||
])
|
@@ -1,96 +0,0 @@
|
||||
dnl -*- mode: autoconf -*-
|
||||
dnl Copyright 2009 Johan Dahlin
|
||||
dnl
|
||||
dnl This file is free software; the author(s) gives unlimited
|
||||
dnl permission to copy and/or distribute it, with or without
|
||||
dnl modifications, as long as this notice is preserved.
|
||||
dnl
|
||||
|
||||
# serial 1
|
||||
|
||||
m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
|
||||
[
|
||||
AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
|
||||
AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
|
||||
AC_BEFORE([LT_INIT],[$0])dnl setup libtool first
|
||||
|
||||
dnl enable/disable introspection
|
||||
m4_if([$2], [require],
|
||||
[dnl
|
||||
enable_introspection=yes
|
||||
],[dnl
|
||||
AC_ARG_ENABLE(introspection,
|
||||
AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]],
|
||||
[Enable introspection for this build]),,
|
||||
[enable_introspection=auto])
|
||||
])dnl
|
||||
|
||||
AC_MSG_CHECKING([for gobject-introspection])
|
||||
|
||||
dnl presence/version checking
|
||||
AS_CASE([$enable_introspection],
|
||||
[no], [dnl
|
||||
found_introspection="no (disabled, use --enable-introspection to enable)"
|
||||
],dnl
|
||||
[yes],[dnl
|
||||
PKG_CHECK_EXISTS([gobject-introspection-1.0],,
|
||||
AC_MSG_ERROR([gobject-introspection-1.0 is not installed]))
|
||||
PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1],
|
||||
found_introspection=yes,
|
||||
AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME]))
|
||||
],dnl
|
||||
[auto],[dnl
|
||||
PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no)
|
||||
dnl Canonicalize enable_introspection
|
||||
enable_introspection=$found_introspection
|
||||
],dnl
|
||||
[dnl
|
||||
AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@])
|
||||
])dnl
|
||||
|
||||
AC_MSG_RESULT([$found_introspection])
|
||||
|
||||
INTROSPECTION_SCANNER=
|
||||
INTROSPECTION_COMPILER=
|
||||
INTROSPECTION_GENERATE=
|
||||
INTROSPECTION_GIRDIR=
|
||||
INTROSPECTION_TYPELIBDIR=
|
||||
if test "x$found_introspection" = "xyes"; then
|
||||
INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
|
||||
INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
|
||||
INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
|
||||
INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
|
||||
INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
|
||||
INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
|
||||
INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
|
||||
INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
|
||||
fi
|
||||
AC_SUBST(INTROSPECTION_SCANNER)
|
||||
AC_SUBST(INTROSPECTION_COMPILER)
|
||||
AC_SUBST(INTROSPECTION_GENERATE)
|
||||
AC_SUBST(INTROSPECTION_GIRDIR)
|
||||
AC_SUBST(INTROSPECTION_TYPELIBDIR)
|
||||
AC_SUBST(INTROSPECTION_CFLAGS)
|
||||
AC_SUBST(INTROSPECTION_LIBS)
|
||||
AC_SUBST(INTROSPECTION_MAKEFILE)
|
||||
|
||||
AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes")
|
||||
])
|
||||
|
||||
|
||||
dnl Usage:
|
||||
dnl GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version])
|
||||
|
||||
AC_DEFUN([GOBJECT_INTROSPECTION_CHECK],
|
||||
[
|
||||
_GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1])
|
||||
])
|
||||
|
||||
dnl Usage:
|
||||
dnl GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version])
|
||||
|
||||
|
||||
AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE],
|
||||
[
|
||||
_GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require])
|
||||
])
|
@@ -1,652 +0,0 @@
|
||||
#! /bin/sh
|
||||
# Copyright (C) 2011-2013 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program 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 General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
scriptversion=2011-12-27.17; # UTC
|
||||
|
||||
# Make unconditional expansion of undefined variables an error. This
|
||||
# helps a lot in preventing typo-related bugs.
|
||||
set -u
|
||||
|
||||
me=tap-driver.sh
|
||||
|
||||
fatal ()
|
||||
{
|
||||
echo "$me: fatal: $*" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
usage_error ()
|
||||
{
|
||||
echo "$me: $*" >&2
|
||||
print_usage >&2
|
||||
exit 2
|
||||
}
|
||||
|
||||
print_usage ()
|
||||
{
|
||||
cat <<END
|
||||
Usage:
|
||||
tap-driver.sh --test-name=NAME --log-file=PATH --trs-file=PATH
|
||||
[--expect-failure={yes|no}] [--color-tests={yes|no}]
|
||||
[--enable-hard-errors={yes|no}] [--ignore-exit]
|
||||
[--diagnostic-string=STRING] [--merge|--no-merge]
|
||||
[--comments|--no-comments] [--] TEST-COMMAND
|
||||
The \`--test-name', \`--log-file' and \`--trs-file' options are mandatory.
|
||||
END
|
||||
}
|
||||
|
||||
# TODO: better error handling in option parsing (in particular, ensure
|
||||
# TODO: $log_file, $trs_file and $test_name are defined).
|
||||
test_name= # Used for reporting.
|
||||
log_file= # Where to save the result and output of the test script.
|
||||
trs_file= # Where to save the metadata of the test run.
|
||||
expect_failure=0
|
||||
color_tests=0
|
||||
merge=0
|
||||
ignore_exit=0
|
||||
comments=0
|
||||
diag_string='#'
|
||||
while test $# -gt 0; do
|
||||
case $1 in
|
||||
--help) print_usage; exit $?;;
|
||||
--version) echo "$me $scriptversion"; exit $?;;
|
||||
--test-name) test_name=$2; shift;;
|
||||
--log-file) log_file=$2; shift;;
|
||||
--trs-file) trs_file=$2; shift;;
|
||||
--color-tests) color_tests=$2; shift;;
|
||||
--expect-failure) expect_failure=$2; shift;;
|
||||
--enable-hard-errors) shift;; # No-op.
|
||||
--merge) merge=1;;
|
||||
--no-merge) merge=0;;
|
||||
--ignore-exit) ignore_exit=1;;
|
||||
--comments) comments=1;;
|
||||
--no-comments) comments=0;;
|
||||
--diagnostic-string) diag_string=$2; shift;;
|
||||
--) shift; break;;
|
||||
-*) usage_error "invalid option: '$1'";;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
test $# -gt 0 || usage_error "missing test command"
|
||||
|
||||
case $expect_failure in
|
||||
yes) expect_failure=1;;
|
||||
*) expect_failure=0;;
|
||||
esac
|
||||
|
||||
if test $color_tests = yes; then
|
||||
init_colors='
|
||||
color_map["red"]="[0;31m" # Red.
|
||||
color_map["grn"]="[0;32m" # Green.
|
||||
color_map["lgn"]="[1;32m" # Light green.
|
||||
color_map["blu"]="[1;34m" # Blue.
|
||||
color_map["mgn"]="[0;35m" # Magenta.
|
||||
color_map["std"]="[m" # No color.
|
||||
color_for_result["ERROR"] = "mgn"
|
||||
color_for_result["PASS"] = "grn"
|
||||
color_for_result["XPASS"] = "red"
|
||||
color_for_result["FAIL"] = "red"
|
||||
color_for_result["XFAIL"] = "lgn"
|
||||
color_for_result["SKIP"] = "blu"'
|
||||
else
|
||||
init_colors=''
|
||||
fi
|
||||
|
||||
# :; is there to work around a bug in bash 3.2 (and earlier) which
|
||||
# does not always set '$?' properly on redirection failure.
|
||||
# See the Autoconf manual for more details.
|
||||
:;{
|
||||
(
|
||||
# Ignore common signals (in this subshell only!), to avoid potential
|
||||
# problems with Korn shells. Some Korn shells are known to propagate
|
||||
# to themselves signals that have killed a child process they were
|
||||
# waiting for; this is done at least for SIGINT (and usually only for
|
||||
# it, in truth). Without the `trap' below, such a behaviour could
|
||||
# cause a premature exit in the current subshell, e.g., in case the
|
||||
# test command it runs gets terminated by a SIGINT. Thus, the awk
|
||||
# script we are piping into would never seen the exit status it
|
||||
# expects on its last input line (which is displayed below by the
|
||||
# last `echo $?' statement), and would thus die reporting an internal
|
||||
# error.
|
||||
# For more information, see the Autoconf manual and the threads:
|
||||
# <http://lists.gnu.org/archive/html/bug-autoconf/2011-09/msg00004.html>
|
||||
# <http://mail.opensolaris.org/pipermail/ksh93-integration-discuss/2009-February/004121.html>
|
||||
trap : 1 3 2 13 15
|
||||
if test $merge -gt 0; then
|
||||
exec 2>&1
|
||||
else
|
||||
exec 2>&3
|
||||
fi
|
||||
"$@"
|
||||
echo $?
|
||||
) | LC_ALL=C ${AM_TAP_AWK-awk} \
|
||||
-v me="$me" \
|
||||
-v test_script_name="$test_name" \
|
||||
-v log_file="$log_file" \
|
||||
-v trs_file="$trs_file" \
|
||||
-v expect_failure="$expect_failure" \
|
||||
-v merge="$merge" \
|
||||
-v ignore_exit="$ignore_exit" \
|
||||
-v comments="$comments" \
|
||||
-v diag_string="$diag_string" \
|
||||
'
|
||||
# FIXME: the usages of "cat >&3" below could be optimized when using
|
||||
# FIXME: GNU awk, and/on on systems that supports /dev/fd/.
|
||||
|
||||
# Implementation note: in what follows, `result_obj` will be an
|
||||
# associative array that (partly) simulates a TAP result object
|
||||
# from the `TAP::Parser` perl module.
|
||||
|
||||
## ----------- ##
|
||||
## FUNCTIONS ##
|
||||
## ----------- ##
|
||||
|
||||
function fatal(msg)
|
||||
{
|
||||
print me ": " msg | "cat >&2"
|
||||
exit 1
|
||||
}
|
||||
|
||||
function abort(where)
|
||||
{
|
||||
fatal("internal error " where)
|
||||
}
|
||||
|
||||
# Convert a boolean to a "yes"/"no" string.
|
||||
function yn(bool)
|
||||
{
|
||||
return bool ? "yes" : "no";
|
||||
}
|
||||
|
||||
function add_test_result(result)
|
||||
{
|
||||
if (!test_results_index)
|
||||
test_results_index = 0
|
||||
test_results_list[test_results_index] = result
|
||||
test_results_index += 1
|
||||
test_results_seen[result] = 1;
|
||||
}
|
||||
|
||||
# Whether the test script should be re-run by "make recheck".
|
||||
function must_recheck()
|
||||
{
|
||||
for (k in test_results_seen)
|
||||
if (k != "XFAIL" && k != "PASS" && k != "SKIP")
|
||||
return 1
|
||||
return 0
|
||||
}
|
||||
|
||||
# Whether the content of the log file associated to this test should
|
||||
# be copied into the "global" test-suite.log.
|
||||
function copy_in_global_log()
|
||||
{
|
||||
for (k in test_results_seen)
|
||||
if (k != "PASS")
|
||||
return 1
|
||||
return 0
|
||||
}
|
||||
|
||||
# FIXME: this can certainly be improved ...
|
||||
function get_global_test_result()
|
||||
{
|
||||
if ("ERROR" in test_results_seen)
|
||||
return "ERROR"
|
||||
if ("FAIL" in test_results_seen || "XPASS" in test_results_seen)
|
||||
return "FAIL"
|
||||
all_skipped = 1
|
||||
for (k in test_results_seen)
|
||||
if (k != "SKIP")
|
||||
all_skipped = 0
|
||||
if (all_skipped)
|
||||
return "SKIP"
|
||||
return "PASS";
|
||||
}
|
||||
|
||||
function stringify_result_obj(result_obj)
|
||||
{
|
||||
if (result_obj["is_unplanned"] || result_obj["number"] != testno)
|
||||
return "ERROR"
|
||||
|
||||
if (plan_seen == LATE_PLAN)
|
||||
return "ERROR"
|
||||
|
||||
if (result_obj["directive"] == "TODO")
|
||||
return result_obj["is_ok"] ? "XPASS" : "XFAIL"
|
||||
|
||||
if (result_obj["directive"] == "SKIP")
|
||||
return result_obj["is_ok"] ? "SKIP" : COOKED_FAIL;
|
||||
|
||||
if (length(result_obj["directive"]))
|
||||
abort("in function stringify_result_obj()")
|
||||
|
||||
return result_obj["is_ok"] ? COOKED_PASS : COOKED_FAIL
|
||||
}
|
||||
|
||||
function decorate_result(result)
|
||||
{
|
||||
color_name = color_for_result[result]
|
||||
if (color_name)
|
||||
return color_map[color_name] "" result "" color_map["std"]
|
||||
# If we are not using colorized output, or if we do not know how
|
||||
# to colorize the given result, we should return it unchanged.
|
||||
return result
|
||||
}
|
||||
|
||||
function report(result, details)
|
||||
{
|
||||
if (result ~ /^(X?(PASS|FAIL)|SKIP|ERROR)/)
|
||||
{
|
||||
msg = ": " test_script_name
|
||||
add_test_result(result)
|
||||
}
|
||||
else if (result == "#")
|
||||
{
|
||||
msg = " " test_script_name ":"
|
||||
}
|
||||
else
|
||||
{
|
||||
abort("in function report()")
|
||||
}
|
||||
if (length(details))
|
||||
msg = msg " " details
|
||||
# Output on console might be colorized.
|
||||
print decorate_result(result) msg
|
||||
# Log the result in the log file too, to help debugging (this is
|
||||
# especially true when said result is a TAP error or "Bail out!").
|
||||
print result msg | "cat >&3";
|
||||
}
|
||||
|
||||
function testsuite_error(error_message)
|
||||
{
|
||||
report("ERROR", "- " error_message)
|
||||
}
|
||||
|
||||
function handle_tap_result()
|
||||
{
|
||||
details = result_obj["number"];
|
||||
if (length(result_obj["description"]))
|
||||
details = details " " result_obj["description"]
|
||||
|
||||
if (plan_seen == LATE_PLAN)
|
||||
{
|
||||
details = details " # AFTER LATE PLAN";
|
||||
}
|
||||
else if (result_obj["is_unplanned"])
|
||||
{
|
||||
details = details " # UNPLANNED";
|
||||
}
|
||||
else if (result_obj["number"] != testno)
|
||||
{
|
||||
details = sprintf("%s # OUT-OF-ORDER (expecting %d)",
|
||||
details, testno);
|
||||
}
|
||||
else if (result_obj["directive"])
|
||||
{
|
||||
details = details " # " result_obj["directive"];
|
||||
if (length(result_obj["explanation"]))
|
||||
details = details " " result_obj["explanation"]
|
||||
}
|
||||
|
||||
report(stringify_result_obj(result_obj), details)
|
||||
}
|
||||
|
||||
# `skip_reason` should be empty whenever planned > 0.
|
||||
function handle_tap_plan(planned, skip_reason)
|
||||
{
|
||||
planned += 0 # Avoid getting confused if, say, `planned` is "00"
|
||||
if (length(skip_reason) && planned > 0)
|
||||
abort("in function handle_tap_plan()")
|
||||
if (plan_seen)
|
||||
{
|
||||
# Error, only one plan per stream is acceptable.
|
||||
testsuite_error("multiple test plans")
|
||||
return;
|
||||
}
|
||||
planned_tests = planned
|
||||
# The TAP plan can come before or after *all* the TAP results; we speak
|
||||
# respectively of an "early" or a "late" plan. If we see the plan line
|
||||
# after at least one TAP result has been seen, assume we have a late
|
||||
# plan; in this case, any further test result seen after the plan will
|
||||
# be flagged as an error.
|
||||
plan_seen = (testno >= 1 ? LATE_PLAN : EARLY_PLAN)
|
||||
# If testno > 0, we have an error ("too many tests run") that will be
|
||||
# automatically dealt with later, so do not worry about it here. If
|
||||
# $plan_seen is true, we have an error due to a repeated plan, and that
|
||||
# has already been dealt with above. Otherwise, we have a valid "plan
|
||||
# with SKIP" specification, and should report it as a particular kind
|
||||
# of SKIP result.
|
||||
if (planned == 0 && testno == 0)
|
||||
{
|
||||
if (length(skip_reason))
|
||||
skip_reason = "- " skip_reason;
|
||||
report("SKIP", skip_reason);
|
||||
}
|
||||
}
|
||||
|
||||
function extract_tap_comment(line)
|
||||
{
|
||||
if (index(line, diag_string) == 1)
|
||||
{
|
||||
# Strip leading `diag_string` from `line`.
|
||||
line = substr(line, length(diag_string) + 1)
|
||||
# And strip any leading and trailing whitespace left.
|
||||
sub("^[ \t]*", "", line)
|
||||
sub("[ \t]*$", "", line)
|
||||
# Return what is left (if any).
|
||||
return line;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
# When this function is called, we know that line is a TAP result line,
|
||||
# so that it matches the (perl) RE "^(not )?ok\b".
|
||||
function setup_result_obj(line)
|
||||
{
|
||||
# Get the result, and remove it from the line.
|
||||
result_obj["is_ok"] = (substr(line, 1, 2) == "ok" ? 1 : 0)
|
||||
sub("^(not )?ok[ \t]*", "", line)
|
||||
|
||||
# If the result has an explicit number, get it and strip it; otherwise,
|
||||
# automatically assing the next progresive number to it.
|
||||
if (line ~ /^[0-9]+$/ || line ~ /^[0-9]+[^a-zA-Z0-9_]/)
|
||||
{
|
||||
match(line, "^[0-9]+")
|
||||
# The final `+ 0` is to normalize numbers with leading zeros.
|
||||
result_obj["number"] = substr(line, 1, RLENGTH) + 0
|
||||
line = substr(line, RLENGTH + 1)
|
||||
}
|
||||
else
|
||||
{
|
||||
result_obj["number"] = testno
|
||||
}
|
||||
|
||||
if (plan_seen == LATE_PLAN)
|
||||
# No further test results are acceptable after a "late" TAP plan
|
||||
# has been seen.
|
||||
result_obj["is_unplanned"] = 1
|
||||
else if (plan_seen && testno > planned_tests)
|
||||
result_obj["is_unplanned"] = 1
|
||||
else
|
||||
result_obj["is_unplanned"] = 0
|
||||
|
||||
# Strip trailing and leading whitespace.
|
||||
sub("^[ \t]*", "", line)
|
||||
sub("[ \t]*$", "", line)
|
||||
|
||||
# This will have to be corrected if we have a "TODO"/"SKIP" directive.
|
||||
result_obj["description"] = line
|
||||
result_obj["directive"] = ""
|
||||
result_obj["explanation"] = ""
|
||||
|
||||
if (index(line, "#") == 0)
|
||||
return # No possible directive, nothing more to do.
|
||||
|
||||
# Directives are case-insensitive.
|
||||
rx = "[ \t]*#[ \t]*([tT][oO][dD][oO]|[sS][kK][iI][pP])[ \t]*"
|
||||
|
||||
# See whether we have the directive, and if yes, where.
|
||||
pos = match(line, rx "$")
|
||||
if (!pos)
|
||||
pos = match(line, rx "[^a-zA-Z0-9_]")
|
||||
|
||||
# If there was no TAP directive, we have nothing more to do.
|
||||
if (!pos)
|
||||
return
|
||||
|
||||
# Let`s now see if the TAP directive has been escaped. For example:
|
||||
# escaped: ok \# SKIP
|
||||
# not escaped: ok \\# SKIP
|
||||
# escaped: ok \\\\\# SKIP
|
||||
# not escaped: ok \ # SKIP
|
||||
if (substr(line, pos, 1) == "#")
|
||||
{
|
||||
bslash_count = 0
|
||||
for (i = pos; i > 1 && substr(line, i - 1, 1) == "\\"; i--)
|
||||
bslash_count += 1
|
||||
if (bslash_count % 2)
|
||||
return # Directive was escaped.
|
||||
}
|
||||
|
||||
# Strip the directive and its explanation (if any) from the test
|
||||
# description.
|
||||
result_obj["description"] = substr(line, 1, pos - 1)
|
||||
# Now remove the test description from the line, that has been dealt
|
||||
# with already.
|
||||
line = substr(line, pos)
|
||||
# Strip the directive, and save its value (normalized to upper case).
|
||||
sub("^[ \t]*#[ \t]*", "", line)
|
||||
result_obj["directive"] = toupper(substr(line, 1, 4))
|
||||
line = substr(line, 5)
|
||||
# Now get the explanation for the directive (if any), with leading
|
||||
# and trailing whitespace removed.
|
||||
sub("^[ \t]*", "", line)
|
||||
sub("[ \t]*$", "", line)
|
||||
result_obj["explanation"] = line
|
||||
}
|
||||
|
||||
function get_test_exit_message(status)
|
||||
{
|
||||
if (status == 0)
|
||||
return ""
|
||||
if (status !~ /^[1-9][0-9]*$/)
|
||||
abort("getting exit status")
|
||||
if (status < 127)
|
||||
exit_details = ""
|
||||
else if (status == 127)
|
||||
exit_details = " (command not found?)"
|
||||
else if (status >= 128 && status <= 255)
|
||||
exit_details = sprintf(" (terminated by signal %d?)", status - 128)
|
||||
else if (status > 256 && status <= 384)
|
||||
# We used to report an "abnormal termination" here, but some Korn
|
||||
# shells, when a child process die due to signal number n, can leave
|
||||
# in $? an exit status of 256+n instead of the more standard 128+n.
|
||||
# Apparently, both behaviours are allowed by POSIX (2008), so be
|
||||
# prepared to handle them both. See also Austing Group report ID
|
||||
# 0000051 <http://www.austingroupbugs.net/view.php?id=51>
|
||||
exit_details = sprintf(" (terminated by signal %d?)", status - 256)
|
||||
else
|
||||
# Never seen in practice.
|
||||
exit_details = " (abnormal termination)"
|
||||
return sprintf("exited with status %d%s", status, exit_details)
|
||||
}
|
||||
|
||||
function write_test_results()
|
||||
{
|
||||
print ":global-test-result: " get_global_test_result() > trs_file
|
||||
print ":recheck: " yn(must_recheck()) > trs_file
|
||||
print ":copy-in-global-log: " yn(copy_in_global_log()) > trs_file
|
||||
for (i = 0; i < test_results_index; i += 1)
|
||||
print ":test-result: " test_results_list[i] > trs_file
|
||||
close(trs_file);
|
||||
}
|
||||
|
||||
BEGIN {
|
||||
|
||||
## ------- ##
|
||||
## SETUP ##
|
||||
## ------- ##
|
||||
|
||||
'"$init_colors"'
|
||||
|
||||
# Properly initialized once the TAP plan is seen.
|
||||
planned_tests = 0
|
||||
|
||||
COOKED_PASS = expect_failure ? "XPASS": "PASS";
|
||||
COOKED_FAIL = expect_failure ? "XFAIL": "FAIL";
|
||||
|
||||
# Enumeration-like constants to remember which kind of plan (if any)
|
||||
# has been seen. It is important that NO_PLAN evaluates "false" as
|
||||
# a boolean.
|
||||
NO_PLAN = 0
|
||||
EARLY_PLAN = 1
|
||||
LATE_PLAN = 2
|
||||
|
||||
testno = 0 # Number of test results seen so far.
|
||||
bailed_out = 0 # Whether a "Bail out!" directive has been seen.
|
||||
|
||||
# Whether the TAP plan has been seen or not, and if yes, which kind
|
||||
# it is ("early" is seen before any test result, "late" otherwise).
|
||||
plan_seen = NO_PLAN
|
||||
|
||||
## --------- ##
|
||||
## PARSING ##
|
||||
## --------- ##
|
||||
|
||||
is_first_read = 1
|
||||
|
||||
while (1)
|
||||
{
|
||||
# Involutions required so that we are able to read the exit status
|
||||
# from the last input line.
|
||||
st = getline
|
||||
if (st < 0) # I/O error.
|
||||
fatal("I/O error while reading from input stream")
|
||||
else if (st == 0) # End-of-input
|
||||
{
|
||||
if (is_first_read)
|
||||
abort("in input loop: only one input line")
|
||||
break
|
||||
}
|
||||
if (is_first_read)
|
||||
{
|
||||
is_first_read = 0
|
||||
nextline = $0
|
||||
continue
|
||||
}
|
||||
else
|
||||
{
|
||||
curline = nextline
|
||||
nextline = $0
|
||||
$0 = curline
|
||||
}
|
||||
# Copy any input line verbatim into the log file.
|
||||
print | "cat >&3"
|
||||
# Parsing of TAP input should stop after a "Bail out!" directive.
|
||||
if (bailed_out)
|
||||
continue
|
||||
|
||||
# TAP test result.
|
||||
if ($0 ~ /^(not )?ok$/ || $0 ~ /^(not )?ok[^a-zA-Z0-9_]/)
|
||||
{
|
||||
testno += 1
|
||||
setup_result_obj($0)
|
||||
handle_tap_result()
|
||||
}
|
||||
# TAP plan (normal or "SKIP" without explanation).
|
||||
else if ($0 ~ /^1\.\.[0-9]+[ \t]*$/)
|
||||
{
|
||||
# The next two lines will put the number of planned tests in $0.
|
||||
sub("^1\\.\\.", "")
|
||||
sub("[^0-9]*$", "")
|
||||
handle_tap_plan($0, "")
|
||||
continue
|
||||
}
|
||||
# TAP "SKIP" plan, with an explanation.
|
||||
else if ($0 ~ /^1\.\.0+[ \t]*#/)
|
||||
{
|
||||
# The next lines will put the skip explanation in $0, stripping
|
||||
# any leading and trailing whitespace. This is a little more
|
||||
# tricky in truth, since we want to also strip a potential leading
|
||||
# "SKIP" string from the message.
|
||||
sub("^[^#]*#[ \t]*(SKIP[: \t][ \t]*)?", "")
|
||||
sub("[ \t]*$", "");
|
||||
handle_tap_plan(0, $0)
|
||||
}
|
||||
# "Bail out!" magic.
|
||||
# Older versions of prove and TAP::Harness (e.g., 3.17) did not
|
||||
# recognize a "Bail out!" directive when preceded by leading
|
||||
# whitespace, but more modern versions (e.g., 3.23) do. So we
|
||||
# emulate the latter, "more modern" behaviour.
|
||||
else if ($0 ~ /^[ \t]*Bail out!/)
|
||||
{
|
||||
bailed_out = 1
|
||||
# Get the bailout message (if any), with leading and trailing
|
||||
# whitespace stripped. The message remains stored in `$0`.
|
||||
sub("^[ \t]*Bail out![ \t]*", "");
|
||||
sub("[ \t]*$", "");
|
||||
# Format the error message for the
|
||||
bailout_message = "Bail out!"
|
||||
if (length($0))
|
||||
bailout_message = bailout_message " " $0
|
||||
testsuite_error(bailout_message)
|
||||
}
|
||||
# Maybe we have too look for dianogtic comments too.
|
||||
else if (comments != 0)
|
||||
{
|
||||
comment = extract_tap_comment($0);
|
||||
if (length(comment))
|
||||
report("#", comment);
|
||||
}
|
||||
}
|
||||
|
||||
## -------- ##
|
||||
## FINISH ##
|
||||
## -------- ##
|
||||
|
||||
# A "Bail out!" directive should cause us to ignore any following TAP
|
||||
# error, as well as a non-zero exit status from the TAP producer.
|
||||
if (!bailed_out)
|
||||
{
|
||||
if (!plan_seen)
|
||||
{
|
||||
testsuite_error("missing test plan")
|
||||
}
|
||||
else if (planned_tests != testno)
|
||||
{
|
||||
bad_amount = testno > planned_tests ? "many" : "few"
|
||||
testsuite_error(sprintf("too %s tests run (expected %d, got %d)",
|
||||
bad_amount, planned_tests, testno))
|
||||
}
|
||||
if (!ignore_exit)
|
||||
{
|
||||
# Fetch exit status from the last line.
|
||||
exit_message = get_test_exit_message(nextline)
|
||||
if (exit_message)
|
||||
testsuite_error(exit_message)
|
||||
}
|
||||
}
|
||||
|
||||
write_test_results()
|
||||
|
||||
exit 0
|
||||
|
||||
} # End of "BEGIN" block.
|
||||
'
|
||||
|
||||
# TODO: document that we consume the file descriptor 3 :-(
|
||||
} 3>"$log_file"
|
||||
|
||||
test $? -eq 0 || fatal "I/O or internal error"
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
@@ -1,5 +0,0 @@
|
||||
#! /bin/sh
|
||||
|
||||
# run a GTest in tap mode. The test binary is passed as $1
|
||||
|
||||
$1 -k --tap
|
@@ -1,710 +0,0 @@
|
||||
AUTOMAKE_OPTIONS = subdir-objects
|
||||
|
||||
# preamble
|
||||
NULL =
|
||||
|
||||
# common definitions
|
||||
CLEANFILES =
|
||||
DISTCLEANFILES =
|
||||
EXTRA_DIST =
|
||||
BUILT_SOURCES =
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-DCLUTTER_SYSCONFDIR=\""$(sysconfdir)"\" \
|
||||
-DCLUTTER_COMPILATION=1 \
|
||||
-DCOGL_DISABLE_DEPRECATION_WARNINGS \
|
||||
-DG_LOG_DOMAIN=\"Clutter\" \
|
||||
-fvisibility=hidden \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_srcdir)/clutter \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_builddir)/clutter \
|
||||
-I$(top_srcdir)/../cogl \
|
||||
-I$(top_builddir)/../cogl \
|
||||
-I$(top_builddir)/../cogl/cogl \
|
||||
$(CLUTTER_DEPRECATED_CFLAGS) \
|
||||
$(CLUTTER_DEBUG_CFLAGS) \
|
||||
$(NULL)
|
||||
|
||||
AM_CFLAGS = $(CLUTTER_CFLAGS) $(MAINTAINER_CFLAGS)
|
||||
|
||||
# these are the gir files we generate using g-ir-scanner
|
||||
INTROSPECTION_GIRS =
|
||||
|
||||
# the base include path for headers
|
||||
clutter_base_includedir = $(includedir)/mutter-$(LIBMUTTER_API_VERSION)/clutter
|
||||
clutter_includedir = $(clutter_base_includedir)/clutter
|
||||
clutter_deprecateddir = $(clutter_base_includedir)/clutter/deprecated
|
||||
|
||||
# pkg-config files
|
||||
pc_files =
|
||||
|
||||
# common sources - please, keep these sorted alphabetically
|
||||
source_h = \
|
||||
clutter-action.h \
|
||||
clutter-actor-meta.h \
|
||||
clutter-actor.h \
|
||||
clutter-align-constraint.h \
|
||||
clutter-animatable.h \
|
||||
clutter-backend.h \
|
||||
clutter-bind-constraint.h \
|
||||
clutter-binding-pool.h \
|
||||
clutter-bin-layout.h \
|
||||
clutter-blur-effect.h \
|
||||
clutter-box-layout.h \
|
||||
clutter-brightness-contrast-effect.h \
|
||||
clutter-cairo.h \
|
||||
clutter-canvas.h \
|
||||
clutter-child-meta.h \
|
||||
clutter-click-action.h \
|
||||
clutter-clone.h \
|
||||
clutter-color-static.h \
|
||||
clutter-color.h \
|
||||
clutter-colorize-effect.h \
|
||||
clutter-constraint.h \
|
||||
clutter-container.h \
|
||||
clutter-content.h \
|
||||
clutter-deform-effect.h \
|
||||
clutter-deprecated.h \
|
||||
clutter-desaturate-effect.h \
|
||||
clutter-device-manager.h \
|
||||
clutter-drag-action.h \
|
||||
clutter-drop-action.h \
|
||||
clutter-effect.h \
|
||||
clutter-enums.h \
|
||||
clutter-event.h \
|
||||
clutter-feature.h \
|
||||
clutter-fixed-layout.h \
|
||||
clutter-flow-layout.h \
|
||||
clutter-gesture-action.h \
|
||||
clutter-grid-layout.h \
|
||||
clutter-group.h \
|
||||
clutter-image.h \
|
||||
clutter-input-device.h \
|
||||
clutter-input-device-tool.h \
|
||||
clutter-input-focus.h \
|
||||
clutter-input-method.h \
|
||||
clutter-interval.h \
|
||||
clutter-keyframe-transition.h \
|
||||
clutter-keysyms.h \
|
||||
clutter-layout-manager.h \
|
||||
clutter-layout-meta.h \
|
||||
clutter-macros.h \
|
||||
clutter-main.h \
|
||||
clutter-offscreen-effect.h \
|
||||
clutter-page-turn-effect.h \
|
||||
clutter-paint-nodes.h \
|
||||
clutter-paint-node.h \
|
||||
clutter-pan-action.h \
|
||||
clutter-path-constraint.h \
|
||||
clutter-path.h \
|
||||
clutter-property-transition.h \
|
||||
clutter-rotate-action.h \
|
||||
clutter-script.h \
|
||||
clutter-scriptable.h \
|
||||
clutter-scroll-actor.h \
|
||||
clutter-settings.h \
|
||||
clutter-shader-effect.h \
|
||||
clutter-shader-types.h \
|
||||
clutter-swipe-action.h \
|
||||
clutter-snap-constraint.h \
|
||||
clutter-stage.h \
|
||||
clutter-stage-manager.h \
|
||||
clutter-tap-action.h \
|
||||
clutter-test-utils.h \
|
||||
clutter-texture.h \
|
||||
clutter-text.h \
|
||||
clutter-text-buffer.h \
|
||||
clutter-timeline.h \
|
||||
clutter-transition-group.h \
|
||||
clutter-transition.h \
|
||||
clutter-types.h \
|
||||
clutter-units.h \
|
||||
clutter-virtual-input-device.h \
|
||||
clutter-zoom-action.h \
|
||||
$(NULL)
|
||||
|
||||
source_c = \
|
||||
clutter-action.c \
|
||||
clutter-actor-box.c \
|
||||
clutter-actor-meta.c \
|
||||
clutter-actor.c \
|
||||
clutter-align-constraint.c \
|
||||
clutter-animatable.c \
|
||||
clutter-backend.c \
|
||||
clutter-base-types.c \
|
||||
clutter-bezier.c \
|
||||
clutter-bind-constraint.c \
|
||||
clutter-binding-pool.c \
|
||||
clutter-bin-layout.c \
|
||||
clutter-blur-effect.c \
|
||||
clutter-box-layout.c \
|
||||
clutter-brightness-contrast-effect.c \
|
||||
clutter-cairo.c \
|
||||
clutter-canvas.c \
|
||||
clutter-child-meta.c \
|
||||
clutter-click-action.c \
|
||||
clutter-clone.c \
|
||||
clutter-color.c \
|
||||
clutter-colorize-effect.c \
|
||||
clutter-constraint.c \
|
||||
clutter-container.c \
|
||||
clutter-content.c \
|
||||
clutter-deform-effect.c \
|
||||
clutter-desaturate-effect.c \
|
||||
clutter-device-manager.c \
|
||||
clutter-drag-action.c \
|
||||
clutter-drop-action.c \
|
||||
clutter-effect.c \
|
||||
clutter-event.c \
|
||||
clutter-feature.c \
|
||||
clutter-fixed-layout.c \
|
||||
clutter-flatten-effect.c \
|
||||
clutter-flow-layout.c \
|
||||
clutter-gesture-action.c \
|
||||
clutter-grid-layout.c \
|
||||
clutter-image.c \
|
||||
clutter-input-device.c \
|
||||
clutter-input-device-tool.c \
|
||||
clutter-input-focus.c \
|
||||
clutter-input-method.c \
|
||||
clutter-virtual-input-device.c \
|
||||
clutter-interval.c \
|
||||
clutter-keyframe-transition.c \
|
||||
clutter-keysyms-table.c \
|
||||
clutter-layout-manager.c \
|
||||
clutter-layout-meta.c \
|
||||
clutter-main.c \
|
||||
clutter-master-clock.c \
|
||||
clutter-master-clock-default.c \
|
||||
clutter-offscreen-effect.c \
|
||||
clutter-page-turn-effect.c \
|
||||
clutter-paint-nodes.c \
|
||||
clutter-paint-node.c \
|
||||
clutter-pan-action.c \
|
||||
clutter-path-constraint.c \
|
||||
clutter-path.c \
|
||||
clutter-property-transition.c \
|
||||
clutter-rotate-action.c \
|
||||
clutter-script.c \
|
||||
clutter-script-parser.c \
|
||||
clutter-scriptable.c \
|
||||
clutter-scroll-actor.c \
|
||||
clutter-settings.c \
|
||||
clutter-shader-effect.c \
|
||||
clutter-shader-types.c \
|
||||
clutter-swipe-action.c \
|
||||
clutter-snap-constraint.c \
|
||||
clutter-stage.c \
|
||||
clutter-stage-manager.c \
|
||||
clutter-stage-window.c \
|
||||
clutter-tap-action.c \
|
||||
clutter-test-utils.c \
|
||||
clutter-text.c \
|
||||
clutter-text-buffer.c \
|
||||
clutter-transition-group.c \
|
||||
clutter-transition.c \
|
||||
clutter-timeline.c \
|
||||
clutter-units.c \
|
||||
clutter-util.c \
|
||||
clutter-paint-volume.c \
|
||||
clutter-zoom-action.c \
|
||||
$(NULL)
|
||||
|
||||
# private headers; these should not be distributed or introspected
|
||||
source_h_priv = \
|
||||
clutter-actor-meta-private.h \
|
||||
clutter-actor-private.h \
|
||||
clutter-backend-private.h \
|
||||
clutter-bezier.h \
|
||||
clutter-constraint-private.h \
|
||||
clutter-content-private.h \
|
||||
clutter-debug.h \
|
||||
clutter-device-manager-private.h \
|
||||
clutter-easing.h \
|
||||
clutter-effect-private.h \
|
||||
clutter-event-translator.h \
|
||||
clutter-event-private.h \
|
||||
clutter-flatten-effect.h \
|
||||
clutter-gesture-action-private.h \
|
||||
clutter-id-pool.h \
|
||||
clutter-input-focus-private.h \
|
||||
clutter-input-method-private.h \
|
||||
clutter-master-clock.h \
|
||||
clutter-master-clock-default.h \
|
||||
clutter-offscreen-effect-private.h \
|
||||
clutter-paint-node-private.h \
|
||||
clutter-paint-volume-private.h \
|
||||
clutter-private.h \
|
||||
clutter-script-private.h \
|
||||
clutter-settings-private.h \
|
||||
clutter-stage-manager-private.h \
|
||||
clutter-stage-private.h \
|
||||
clutter-stage-view.h \
|
||||
clutter-stage-window.h \
|
||||
$(NULL)
|
||||
|
||||
# private source code; these should not be introspected
|
||||
source_c_priv = \
|
||||
clutter-easing.c \
|
||||
clutter-event-translator.c \
|
||||
clutter-id-pool.c \
|
||||
clutter-stage-view.c \
|
||||
$(NULL)
|
||||
|
||||
# deprecated installed headers
|
||||
deprecated_h = \
|
||||
deprecated/clutter-actor.h \
|
||||
deprecated/clutter-alpha.h \
|
||||
deprecated/clutter-animatable.h \
|
||||
deprecated/clutter-animation.h \
|
||||
deprecated/clutter-animator.h \
|
||||
deprecated/clutter-backend.h \
|
||||
deprecated/clutter-behaviour.h \
|
||||
deprecated/clutter-behaviour-depth.h \
|
||||
deprecated/clutter-behaviour-ellipse.h \
|
||||
deprecated/clutter-behaviour-opacity.h \
|
||||
deprecated/clutter-behaviour-path.h \
|
||||
deprecated/clutter-behaviour-rotate.h \
|
||||
deprecated/clutter-behaviour-scale.h \
|
||||
deprecated/clutter-bin-layout.h \
|
||||
deprecated/clutter-box.h \
|
||||
deprecated/clutter-cairo-texture.h \
|
||||
deprecated/clutter-container.h \
|
||||
deprecated/clutter-frame-source.h \
|
||||
deprecated/clutter-group.h \
|
||||
deprecated/clutter-input-device.h \
|
||||
deprecated/clutter-keysyms.h \
|
||||
deprecated/clutter-list-model.h \
|
||||
deprecated/clutter-main.h \
|
||||
deprecated/clutter-media.h \
|
||||
deprecated/clutter-model.h \
|
||||
deprecated/clutter-rectangle.h \
|
||||
deprecated/clutter-score.h \
|
||||
deprecated/clutter-shader.h \
|
||||
deprecated/clutter-stage-manager.h \
|
||||
deprecated/clutter-stage.h \
|
||||
deprecated/clutter-state.h \
|
||||
deprecated/clutter-table-layout.h \
|
||||
deprecated/clutter-texture.h \
|
||||
deprecated/clutter-timeline.h \
|
||||
deprecated/clutter-timeout-pool.h \
|
||||
deprecated/clutter-util.h \
|
||||
$(NULL)
|
||||
|
||||
# deprecated source code
|
||||
deprecated_c = \
|
||||
deprecated/clutter-actor-deprecated.c \
|
||||
deprecated/clutter-alpha.c \
|
||||
deprecated/clutter-animation.c \
|
||||
deprecated/clutter-animator.c \
|
||||
deprecated/clutter-behaviour.c \
|
||||
deprecated/clutter-behaviour-depth.c \
|
||||
deprecated/clutter-behaviour-ellipse.c \
|
||||
deprecated/clutter-behaviour-opacity.c \
|
||||
deprecated/clutter-behaviour-path.c \
|
||||
deprecated/clutter-behaviour-rotate.c \
|
||||
deprecated/clutter-behaviour-scale.c \
|
||||
deprecated/clutter-box.c \
|
||||
deprecated/clutter-cairo-texture.c \
|
||||
deprecated/clutter-frame-source.c \
|
||||
deprecated/clutter-group.c \
|
||||
deprecated/clutter-input-device-deprecated.c \
|
||||
deprecated/clutter-layout-manager-deprecated.c \
|
||||
deprecated/clutter-list-model.c \
|
||||
deprecated/clutter-media.c \
|
||||
deprecated/clutter-model.c \
|
||||
deprecated/clutter-rectangle.c \
|
||||
deprecated/clutter-score.c \
|
||||
deprecated/clutter-shader.c \
|
||||
deprecated/clutter-state.c \
|
||||
deprecated/clutter-table-layout.c \
|
||||
deprecated/clutter-texture.c \
|
||||
deprecated/clutter-timeout-pool.c \
|
||||
$(NULL)
|
||||
|
||||
# deprecated private headers; these should not be installed
|
||||
deprecated_h_priv = \
|
||||
deprecated/clutter-model-private.h \
|
||||
deprecated/clutter-timeout-interval.h \
|
||||
$(NULL)
|
||||
|
||||
# deprecated private source code; these should not be introspected
|
||||
deprecated_c_priv = \
|
||||
deprecated/clutter-timeout-interval.c \
|
||||
$(NULL)
|
||||
|
||||
# built sources
|
||||
built_source_c = \
|
||||
clutter-enum-types.c \
|
||||
clutter-marshal.c \
|
||||
$(NULL)
|
||||
|
||||
# built headers
|
||||
built_source_h = \
|
||||
clutter-enum-types.h \
|
||||
clutter-marshal.h \
|
||||
$(NULL)
|
||||
|
||||
# config header
|
||||
DISTCLEANFILES += clutter-config.h
|
||||
EXTRA_DIST += clutter-config.h.in
|
||||
|
||||
# key symbol update script
|
||||
EXTRA_DIST += clutter-keysyms-update.pl
|
||||
|
||||
pc_files += mutter-clutter-$(LIBMUTTER_API_VERSION).pc
|
||||
|
||||
# in order to be compatible with Clutter < 1.10, when we shipped a single
|
||||
# shared library whose name was determined by the single backend it
|
||||
# supported, we need to install symbolic links so that existing applications
|
||||
# using Clutter won't break in the Brave New World of multi-backend support
|
||||
# in the same shared object.
|
||||
compat_libs =
|
||||
|
||||
# backends source listings
|
||||
#
|
||||
# backend_source_c := source code
|
||||
# backend_source_h := installed public headers
|
||||
# backend_source_c_priv := source that should not be scanned by g-i
|
||||
# backend_source_h_priv := private headers
|
||||
# backend_source_built := built sources
|
||||
#
|
||||
backend_source_c =
|
||||
backend_source_h =
|
||||
backend_source_c_priv =
|
||||
backend_source_h_priv =
|
||||
backend_source_built =
|
||||
|
||||
# X11 backend rules
|
||||
x11_source_c = \
|
||||
x11/clutter-backend-x11.c \
|
||||
x11/clutter-device-manager-core-x11.c \
|
||||
x11/clutter-event-x11.c \
|
||||
x11/clutter-input-device-core-x11.c \
|
||||
x11/clutter-keymap-x11.c \
|
||||
x11/clutter-stage-x11.c \
|
||||
x11/clutter-x11-texture-pixmap.c \
|
||||
x11/clutter-xkb-a11y-x11.c \
|
||||
$(NULL)
|
||||
|
||||
x11_source_h = \
|
||||
x11/clutter-x11.h \
|
||||
x11/clutter-x11-texture-pixmap.h \
|
||||
$(NULL)
|
||||
|
||||
x11_source_h_priv = \
|
||||
x11/clutter-backend-x11.h \
|
||||
x11/clutter-device-manager-core-x11.h \
|
||||
x11/clutter-input-device-core-x11.h \
|
||||
x11/clutter-keymap-x11.h \
|
||||
x11/clutter-settings-x11.h \
|
||||
x11/clutter-stage-x11.h \
|
||||
x11/clutter-xkb-a11y-x11.h \
|
||||
$(NULL)
|
||||
|
||||
x11_source_c_priv = \
|
||||
x11/xsettings/xsettings-client.c \
|
||||
x11/xsettings/xsettings-client.h \
|
||||
x11/xsettings/xsettings-common.c \
|
||||
x11/xsettings/xsettings-common.h \
|
||||
$(NULL)
|
||||
|
||||
x11_source_c += \
|
||||
x11/clutter-device-manager-xi2.c \
|
||||
x11/clutter-input-device-xi2.c \
|
||||
x11/clutter-input-device-tool-xi2.c \
|
||||
$(NULL)
|
||||
|
||||
x11_source_h_priv += \
|
||||
x11/clutter-device-manager-xi2.h \
|
||||
x11/clutter-input-device-xi2.h \
|
||||
x11/clutter-input-device-tool-xi2.h \
|
||||
$(NULL)
|
||||
|
||||
x11_source_c += \
|
||||
x11/clutter-virtual-input-device-x11.c \
|
||||
$(NULL)
|
||||
|
||||
x11_source_h_priv += \
|
||||
x11/clutter-virtual-input-device-x11.h \
|
||||
$(NULL)
|
||||
|
||||
backend_source_h += $(x11_source_h)
|
||||
backend_source_c += $(x11_source_c)
|
||||
backend_source_h_priv += $(x11_source_h_priv)
|
||||
backend_source_c_priv += $(x11_source_c_priv)
|
||||
|
||||
# the list of files we want to introspect on X11
|
||||
x11_introspection = $(x11_source_c) $(x11_source_h)
|
||||
|
||||
clutterx11_includedir = $(clutter_includedir)/x11
|
||||
clutterx11_include_HEADERS = $(x11_source_h)
|
||||
|
||||
mutter-clutter-x11-@LIBMUTTER_API_VERSION@.pc: mutter-clutter-$(LIBMUTTER_API_VERSION).pc
|
||||
$(QUIET_GEN)cp -f $< $(@F)
|
||||
|
||||
pc_files += mutter-clutter-x11-$(LIBMUTTER_API_VERSION).pc
|
||||
|
||||
# Shared cogl backend files
|
||||
cogl_source_h =
|
||||
|
||||
cogl_source_c = \
|
||||
cogl/clutter-stage-cogl.c \
|
||||
$(NULL)
|
||||
|
||||
cogl_source_h_priv = \
|
||||
cogl/clutter-stage-cogl.h \
|
||||
$(NULL)
|
||||
|
||||
cogl_source_c_priv =
|
||||
|
||||
backend_source_h += $(cogl_source_h)
|
||||
backend_source_c += $(cogl_source_c)
|
||||
backend_source_h_priv += $(cogl_source_h_priv)
|
||||
backend_source_c_priv += $(cogl_source_c_priv)
|
||||
|
||||
backend_source_h += $(glx_source_h)
|
||||
backend_source_c += $(glx_source_c)
|
||||
|
||||
evdev_c_priv = \
|
||||
evdev/clutter-device-manager-evdev.c \
|
||||
evdev/clutter-input-device-evdev.c \
|
||||
evdev/clutter-seat-evdev.c \
|
||||
evdev/clutter-virtual-input-device-evdev.c \
|
||||
evdev/clutter-event-evdev.c \
|
||||
evdev/clutter-input-device-tool-evdev.c \
|
||||
$(NULL)
|
||||
evdev_h_priv = \
|
||||
evdev/clutter-device-manager-evdev.h \
|
||||
evdev/clutter-input-device-evdev.h \
|
||||
evdev/clutter-seat-evdev.h \
|
||||
evdev/clutter-input-device-tool-evdev.h \
|
||||
evdev/clutter-virtual-input-device-evdev.h \
|
||||
$(NULL)
|
||||
evdev_h = evdev/clutter-evdev.h
|
||||
|
||||
if SUPPORT_WAYLAND
|
||||
backend_source_c_priv += $(evdev_c_priv)
|
||||
backend_source_h_priv += $(evdev_h_priv)
|
||||
backend_source_h += $(evdev_h)
|
||||
|
||||
backend_source_c += evdev/clutter-xkb-utils.c
|
||||
backend_source_h_priv += evdev/clutter-xkb-utils.h
|
||||
|
||||
# EGL backend rules
|
||||
egl_source_h = \
|
||||
egl/clutter-egl-headers.h \
|
||||
egl/clutter-egl.h \
|
||||
$(NULL)
|
||||
|
||||
egl_source_h_priv = egl/clutter-backend-eglnative.h
|
||||
egl_source_c = egl/clutter-backend-eglnative.c
|
||||
|
||||
wayland_compositor_source_h = \
|
||||
wayland/clutter-wayland-compositor.h \
|
||||
wayland/clutter-wayland-surface.h
|
||||
backend_source_h += $(wayland_compositor_source_h)
|
||||
backend_source_c += \
|
||||
wayland/clutter-wayland-surface.c
|
||||
|
||||
backend_source_h += $(egl_source_h)
|
||||
backend_source_c += $(egl_source_c)
|
||||
backend_source_h_priv += $(egl_source_h_priv)
|
||||
|
||||
endif # SUPPORT_WAYLAND
|
||||
|
||||
# cally
|
||||
cally_sources_h = \
|
||||
cally/cally-actor.h \
|
||||
cally/cally-clone.h \
|
||||
cally/cally-factory.h \
|
||||
cally/cally-group.h \
|
||||
cally/cally.h \
|
||||
cally/cally-main.h \
|
||||
cally/cally-rectangle.h \
|
||||
cally/cally-root.h \
|
||||
cally/cally-stage.h \
|
||||
cally/cally-text.h \
|
||||
cally/cally-texture.h \
|
||||
cally/cally-util.h \
|
||||
$(NULL)
|
||||
|
||||
cally_sources_c = \
|
||||
cally/cally-actor.c \
|
||||
cally/cally.c \
|
||||
cally/cally-clone.c \
|
||||
cally/cally-group.c \
|
||||
cally/cally-rectangle.c \
|
||||
cally/cally-root.c \
|
||||
cally/cally-stage.c \
|
||||
cally/cally-text.c \
|
||||
cally/cally-texture.c \
|
||||
cally/cally-util.c \
|
||||
$(NULL)
|
||||
|
||||
cally_sources_private = \
|
||||
cally/cally-actor-private.h \
|
||||
$(NULL)
|
||||
|
||||
cally_includedir = $(clutter_base_includedir)/cally
|
||||
cally_include_HEADERS = $(cally_sources_h)
|
||||
|
||||
# general build rules:
|
||||
# you should not need to modify anything below this point
|
||||
|
||||
# glib-genmarshal rules
|
||||
glib_marshal_list = clutter-marshal.list
|
||||
glib_marshal_prefix = _clutter_marshal
|
||||
include $(srcdir)/Makefile.am.marshal
|
||||
|
||||
# glib-mkenums rules
|
||||
glib_enum_h = clutter-enum-types.h
|
||||
glib_enum_c = clutter-enum-types.c
|
||||
glib_enum_headers = $(source_h) $(deprecated_h)
|
||||
include $(srcdir)/Makefile.am.enums
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = $(pc_files)
|
||||
DISTCLEANFILES += $(pc_files)
|
||||
|
||||
clutter_include_HEADERS = $(source_h) clutter.h clutter-autocleanups.h clutter-mutter.h
|
||||
nodist_clutter_include_HEADERS = clutter-config.h $(built_source_h)
|
||||
|
||||
clutter_deprecated_HEADERS = $(deprecated_h)
|
||||
|
||||
mutterlibdir = $(libdir)/mutter-@LIBMUTTER_API_VERSION@
|
||||
mutterlib_LTLIBRARIES = libmutter-clutter-@LIBMUTTER_API_VERSION@.la
|
||||
|
||||
libmutter_clutter_@LIBMUTTER_API_VERSION@_la_LIBADD = \
|
||||
$(LIBM) \
|
||||
$(CLUTTER_LIBS) \
|
||||
$(top_builddir)/../cogl/cogl/libmutter-cogl-$(LIBMUTTER_API_VERSION).la \
|
||||
$(top_builddir)/../cogl/cogl-pango/libmutter-cogl-pango-$(LIBMUTTER_API_VERSION).la \
|
||||
$(top_builddir)/../cogl/cogl-path/libmutter-cogl-path-$(LIBMUTTER_API_VERSION).la \
|
||||
$(NULL)
|
||||
|
||||
libmutter_clutter_@LIBMUTTER_API_VERSION@_la_SOURCES = \
|
||||
$(backend_source_c) \
|
||||
$(backend_source_h) \
|
||||
$(backend_source_c_priv) \
|
||||
$(backend_source_h_priv) \
|
||||
$(source_c) \
|
||||
$(source_h) \
|
||||
$(source_c_priv) \
|
||||
$(source_h_priv) \
|
||||
$(deprecated_c) \
|
||||
$(deprecated_h) \
|
||||
$(deprecated_c_priv) \
|
||||
$(deprecated_h_priv) \
|
||||
$(cally_sources_c) \
|
||||
$(cally_sources_h) \
|
||||
$(cally_sources_private) \
|
||||
$(NULL)
|
||||
|
||||
nodist_libmutter_clutter_@LIBMUTTER_API_VERSION@_la_SOURCES = \
|
||||
$(backend_source_built) \
|
||||
$(built_source_c) \
|
||||
$(built_source_h)
|
||||
|
||||
libmutter_clutter_@LIBMUTTER_API_VERSION@_la_LDFLAGS = \
|
||||
$(CLUTTER_LINK_FLAGS) \
|
||||
$(CLUTTER_LT_LDFLAGS) \
|
||||
-export-dynamic \
|
||||
-rpath $(mutterlibdir) \
|
||||
$(NULL)
|
||||
|
||||
install-exec-local:
|
||||
test -z "$(mutterlibdir)" || $(MKDIR_P) "$(DESTDIR)$(mutterlibdir)"
|
||||
for lib in `echo $(compat_libs)`; do \
|
||||
(cd $(DESTDIR)$(mutterlibdir) && \
|
||||
rm -f $$lib.0.$(CLUTTER_LT_CURRENT).$(CLUTTER_LT_REVISION); \
|
||||
) ; \
|
||||
(cd $(DESTDIR)$(mutterlibdir) && \
|
||||
{ ln -s -f libmutter-clutter-$(LIBMUTTER_API_VERSION).so.0.$(CLUTTER_LT_CURRENT).$(CLUTTER_LT_REVISION) $$lib.0 || \
|
||||
{ rm -f $$lib.0 && ln -s libmutter-clutter-$(LIBMUTTER_API_VERSION).so.0.$(CLUTTER_LT_CURRENT).$(CLUTTER_LT_REVISION) $$lib.0; }; \
|
||||
} \
|
||||
) ; \
|
||||
(cd $(DESTDIR)$(mutterlibdir) && \
|
||||
{ ln -s -f libmutter-clutter-$(LIBMUTTER_API_VERSION).so.0.$(CLUTTER_LT_CURRENT).$(CLUTTER_LT_REVISION) $$lib || \
|
||||
{ rm -f $$lib && ln -s libmutter-clutter-$(LIBMUTTER_API_VERSION).so.0.$(CLUTTER_LT_CURRENT).$(CLUTTER_LT_REVISION) $$lib; }; \
|
||||
} \
|
||||
) ; \
|
||||
done
|
||||
|
||||
# gobject-introspection rules
|
||||
-include $(INTROSPECTION_MAKEFILE)
|
||||
|
||||
INTROSPECTION_SCANNER_ARGS = \
|
||||
--add-include-path=$(top_builddir)/../cogl/cogl \
|
||||
--add-include-path=$(top_builddir)/../cogl/cogl-pango
|
||||
INTROSPECTION_COMPILER_ARGS = \
|
||||
--includedir=$(top_builddir)/../cogl/cogl \
|
||||
--includedir=$(top_builddir)/../cogl/cogl-pango
|
||||
INTROSPECTION_SCANNER_ENV = \
|
||||
PKG_CONFIG_PATH=$(top_builddir)/../cogl/cogl/:$(top_builddir)/../cogl/cogl-pango/:$${PKG_CONFIG_PATH}
|
||||
|
||||
Clutter-@LIBMUTTER_API_VERSION@.gir: libmutter-clutter-@LIBMUTTER_API_VERSION@.la Makefile
|
||||
|
||||
Clutter_@LIBMUTTER_API_VERSION@_gir_NAMESPACE = Clutter
|
||||
Clutter_@LIBMUTTER_API_VERSION@_gir_VERSION = @LIBMUTTER_API_VERSION@
|
||||
Clutter_@LIBMUTTER_API_VERSION@_gir_LIBS = libmutter-clutter-@LIBMUTTER_API_VERSION@.la
|
||||
Clutter_@LIBMUTTER_API_VERSION@_gir_FILES = \
|
||||
$(clutter_include_HEADERS) \
|
||||
$(clutter_deprecated_HEADERS) \
|
||||
$(nodist_clutter_include_HEADERS) \
|
||||
$(source_c) \
|
||||
$(deprecated_c) \
|
||||
$(built_source_c)
|
||||
Clutter_@LIBMUTTER_API_VERSION@_gir_CFLAGS = $(AM_CPPFLAGS) $(CLUTTER_CFLAGS)
|
||||
Clutter_@LIBMUTTER_API_VERSION@_gir_INCLUDES = GL-1.0 GObject-2.0 cairo-1.0 Cogl-@LIBMUTTER_API_VERSION@ CoglPango-@LIBMUTTER_API_VERSION@ Atk-1.0 Json-1.0
|
||||
Clutter_@LIBMUTTER_API_VERSION@_gir_SCANNERFLAGS = \
|
||||
--warn-all \
|
||||
--c-include='clutter/clutter.h' \
|
||||
--pkg-export=mutter-clutter-@LIBMUTTER_API_VERSION@
|
||||
|
||||
INTROSPECTION_GIRS += Clutter-@LIBMUTTER_API_VERSION@.gir
|
||||
|
||||
Cally-@LIBMUTTER_API_VERSION@.gir: Makefile Clutter-@LIBMUTTER_API_VERSION@.gir
|
||||
|
||||
Cally_@LIBMUTTER_API_VERSION@_gir_NAMESPACE = Cally
|
||||
Cally_@LIBMUTTER_API_VERSION@_gir_VERSION = @LIBMUTTER_API_VERSION@
|
||||
Cally_@LIBMUTTER_API_VERSION@_gir_LIBS = libmutter-clutter-@LIBMUTTER_API_VERSION@.la
|
||||
Cally_@LIBMUTTER_API_VERSION@_gir_FILES = $(cally_sources_h) $(cally_sources_c)
|
||||
Cally_@LIBMUTTER_API_VERSION@_gir_CFLAGS = $(AM_CPPFLAGS) $(CLUTTER_CFLAGS)
|
||||
Cally_@LIBMUTTER_API_VERSION@_gir_SCANNERFLAGS = \
|
||||
--warn-all \
|
||||
--c-include='cally/cally.h' \
|
||||
--pkg-export=mutter-clutter-@LIBMUTTER_API_VERSION@ \
|
||||
--include-uninstalled=$(top_builddir)/clutter/Clutter-@LIBMUTTER_API_VERSION@.gir
|
||||
|
||||
INTROSPECTION_GIRS += Cally-@LIBMUTTER_API_VERSION@.gir
|
||||
|
||||
ClutterX11-@LIBMUTTER_API_VERSION@.gir: Makefile Clutter-@LIBMUTTER_API_VERSION@.gir
|
||||
|
||||
ClutterX11_@LIBMUTTER_API_VERSION@_gir_NAMESPACE = ClutterX11
|
||||
ClutterX11_@LIBMUTTER_API_VERSION@_gir_INCLUDES = xlib-2.0
|
||||
ClutterX11_@LIBMUTTER_API_VERSION@_gir_LIBS = libmutter-clutter-@LIBMUTTER_API_VERSION@.la
|
||||
ClutterX11_@LIBMUTTER_API_VERSION@_gir_FILES = $(x11_introspection)
|
||||
ClutterX11_@LIBMUTTER_API_VERSION@_gir_CFLAGS = $(AM_CPPFLAGS) $(CLUTTER_CFLAGS)
|
||||
ClutterX11_@LIBMUTTER_API_VERSION@_gir_SCANNERFLAGS = \
|
||||
--warn-all \
|
||||
--c-include='clutter/x11/clutter-x11.h' \
|
||||
--pkg-export=mutter-clutter-x11-@LIBMUTTER_API_VERSION@ \
|
||||
--include-uninstalled=$(top_builddir)/clutter/Clutter-@LIBMUTTER_API_VERSION@.gir
|
||||
|
||||
INTROSPECTION_GIRS += ClutterX11-@LIBMUTTER_API_VERSION@.gir
|
||||
|
||||
# INTROSPECTION_GIRDIR/INTROSPECTION_TYPELIBDIR aren't the right place to
|
||||
# install anything - we need to install inside our prefix.
|
||||
girdir = $(mutterlibdir)
|
||||
gir_DATA = $(INTROSPECTION_GIRS)
|
||||
|
||||
typelibdir = $(mutterlibdir)
|
||||
typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
|
||||
|
||||
EXTRA_DIST += \
|
||||
Makefile.am.marshal \
|
||||
Makefile.am.enums
|
||||
|
||||
CLEANFILES += $(gir_DATA) $(typelib_DATA)
|
@@ -1,52 +0,0 @@
|
||||
# Rules for generating enumeration types using glib-mkenums
|
||||
#
|
||||
# Define:
|
||||
# glib_enum_h = header template file
|
||||
# glib_enum_c = source template file
|
||||
# glib_enum_headers = list of headers to parse
|
||||
#
|
||||
# before including Makefile.am.enums. You will also need to have
|
||||
# the following targets already defined:
|
||||
#
|
||||
# CLEANFILES
|
||||
# DISTCLEANFILES
|
||||
# BUILT_SOURCES
|
||||
# EXTRA_DIST
|
||||
#
|
||||
# Author: Emmanuele Bassi <ebassi@linux.intel.com>
|
||||
|
||||
# Basic sanity checks
|
||||
$(if $(GLIB_MKENUMS),,$(error Need to define GLIB_MKENUMS))
|
||||
|
||||
$(if $(or $(glib_enum_h), \
|
||||
$(glib_enum_c)),, \
|
||||
$(error Need to define glib_enum_h and glib_enum_c))
|
||||
|
||||
$(if $(glib_enum_headers),,$(error Need to define glib_enum_headers))
|
||||
|
||||
enum_tmpl_h=$(addprefix $(srcdir)/, $(glib_enum_h:.h=.h.in))
|
||||
enum_tmpl_c=$(addprefix $(srcdir)/, $(glib_enum_c:.c=.c.in))
|
||||
enum_headers=$(addprefix $(srcdir)/, $(glib_enum_headers))
|
||||
|
||||
CLEANFILES += stamp-enum-types
|
||||
DISTCLEANFILES += $(glib_enum_h) $(glib_enum_c)
|
||||
BUILT_SOURCES += $(glib_enum_h) $(glib_enum_c)
|
||||
EXTRA_DIST += $(enum_tmpl_h) $(enum_tmpl_c)
|
||||
|
||||
stamp-enum-types: $(enum_headers) $(enum_tmpl_h)
|
||||
$(AM_V_GEN)$(GLIB_MKENUMS) \
|
||||
--template $(enum_tmpl_h) \
|
||||
$(enum_headers) > xgen-eh \
|
||||
&& (cmp -s xgen-eh $(glib_enum_h) || cp -f xgen-eh $(glib_enum_h)) \
|
||||
&& rm -f xgen-eh \
|
||||
&& echo timestamp > $(@F)
|
||||
|
||||
$(glib_enum_h): stamp-enum-types
|
||||
@true
|
||||
|
||||
$(glib_enum_c): $(enum_headers) $(enum_tmpl_h) $(enum_tmpl_c)
|
||||
$(AM_V_GEN)$(GLIB_MKENUMS) \
|
||||
--template $(enum_tmpl_c) \
|
||||
$(enum_headers) > xgen-ec \
|
||||
&& cp -f xgen-ec $(glib_enum_c) \
|
||||
&& rm -f xgen-ec
|
@@ -1,54 +0,0 @@
|
||||
# Rules for generating marshal files using glib-genmarshal
|
||||
#
|
||||
# Define:
|
||||
# glib_marshal_list = marshal list file
|
||||
# glib_marshal_prefix = prefix for marshal functions
|
||||
#
|
||||
# before including Makefile.am.marshal. You will also need to have
|
||||
# the following targets already defined:
|
||||
#
|
||||
# CLEANFILES
|
||||
# DISTCLEANFILES
|
||||
# BUILT_SOURCES
|
||||
# EXTRA_DIST
|
||||
#
|
||||
# Author: Emmanuele Bassi <ebassi@linux.intel.com>
|
||||
|
||||
# Basic sanity checks
|
||||
$(if $(GLIB_GENMARSHAL),,$(error Need to define GLIB_GENMARSHAL))
|
||||
|
||||
$(if $(or $(glib_marshal_list), \
|
||||
$(glib_marshal_prefix)),, \
|
||||
$(error Need to define glib_marshal_list and glib_marshal_prefix))
|
||||
|
||||
marshal_h = $(glib_marshal_list:.list=.h)
|
||||
marshal_c = $(glib_marshal_list:.list=.c)
|
||||
marshal_list = $(addprefix $(srcdir)/, $(glib_marshal_list))
|
||||
|
||||
CLEANFILES += stamp-marshal
|
||||
DISTCLEANFILES += $(marshal_h) $(marshal_c)
|
||||
BUILT_SOURCES += $(marshal_h) $(marshal_c)
|
||||
EXTRA_DIST += $(marshal_list)
|
||||
|
||||
stamp-marshal: $(marshal_list)
|
||||
$(AM_V_GEN)$(GLIB_GENMARSHAL) \
|
||||
--prefix=$(glib_marshal_prefix) \
|
||||
--header \
|
||||
--valist-marshallers \
|
||||
$(marshal_list) > xgen-mh \
|
||||
&& (cmp -s xgen-mh $(marshal_h) || cp -f xgen-mh $(marshal_h)) \
|
||||
&& rm -f xgen-mh \
|
||||
&& echo timestamp > $(@F)
|
||||
|
||||
$(marshal_h): stamp-marshal
|
||||
@true
|
||||
|
||||
$(marshal_c): $(marshal_h)
|
||||
$(AM_V_GEN)$(GLIB_GENMARSHAL) \
|
||||
--prefix=$(glib_marshal_prefix) \
|
||||
--body \
|
||||
--valist-marshallers \
|
||||
--prototypes \
|
||||
$(marshal_list) > xgen-mc \
|
||||
&& (cmp -s xgen-mc $(marshal_c) || cp -f xgen-mc $(marshal_c)) \
|
||||
&& rm -f xgen-mc
|
@@ -275,13 +275,13 @@ void _clutter_actor_set_enable_paint_unmapped
|
||||
void _clutter_actor_set_has_pointer (ClutterActor *self,
|
||||
gboolean has_pointer);
|
||||
|
||||
void _clutter_actor_queue_redraw_with_clip (ClutterActor *self,
|
||||
ClutterRedrawFlags flags,
|
||||
ClutterPaintVolume *clip_volume);
|
||||
void _clutter_actor_queue_redraw_full (ClutterActor *self,
|
||||
ClutterRedrawFlags flags,
|
||||
ClutterPaintVolume *volume,
|
||||
ClutterEffect *effect);
|
||||
void _clutter_actor_queue_redraw_with_clip (ClutterActor *self,
|
||||
ClutterRedrawFlags flags,
|
||||
const ClutterPaintVolume *clip_volume);
|
||||
void _clutter_actor_queue_redraw_full (ClutterActor *self,
|
||||
ClutterRedrawFlags flags,
|
||||
const ClutterPaintVolume *volume,
|
||||
ClutterEffect *effect);
|
||||
|
||||
ClutterPaintVolume * _clutter_actor_get_queue_redraw_clip (ClutterActor *self);
|
||||
void _clutter_actor_set_queue_redraw_clip (ClutterActor *self,
|
||||
|
@@ -1722,6 +1722,22 @@ set_show_on_set_parent (ClutterActor *self,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_actor_queue_redraw_on_parent (ClutterActor *self)
|
||||
{
|
||||
const ClutterPaintVolume *pv;
|
||||
|
||||
if (!self->priv->parent)
|
||||
return;
|
||||
|
||||
/* A relayout/redraw is underway */
|
||||
if (self->priv->needs_allocation)
|
||||
return;
|
||||
|
||||
pv = clutter_actor_get_transformed_paint_volume (self, self->priv->parent);
|
||||
_clutter_actor_queue_redraw_with_clip (self->priv->parent, 0, pv);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_actor_show:
|
||||
* @self: A #ClutterActor
|
||||
@@ -1777,7 +1793,7 @@ clutter_actor_show (ClutterActor *self)
|
||||
g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_VISIBLE]);
|
||||
|
||||
if (priv->parent != NULL)
|
||||
clutter_actor_queue_redraw (priv->parent);
|
||||
clutter_actor_queue_redraw (self);
|
||||
|
||||
g_object_thaw_notify (G_OBJECT (self));
|
||||
}
|
||||
@@ -1902,8 +1918,10 @@ clutter_actor_hide (ClutterActor *self)
|
||||
g_signal_emit (self, actor_signals[HIDE], 0);
|
||||
g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_VISIBLE]);
|
||||
|
||||
if (priv->parent != NULL)
|
||||
if (priv->parent != NULL && priv->needs_allocation)
|
||||
clutter_actor_queue_redraw (priv->parent);
|
||||
else
|
||||
clutter_actor_queue_redraw_on_parent (self);
|
||||
|
||||
g_object_thaw_notify (G_OBJECT (self));
|
||||
}
|
||||
@@ -4862,7 +4880,8 @@ clutter_actor_set_scale_factor (ClutterActor *self,
|
||||
g_assert (pspec != NULL);
|
||||
g_assert (scale_p != NULL);
|
||||
|
||||
_clutter_actor_create_transition (self, pspec, *scale_p, factor);
|
||||
if (*scale_p != factor)
|
||||
_clutter_actor_create_transition (self, pspec, *scale_p, factor);
|
||||
}
|
||||
|
||||
static inline void
|
||||
@@ -8744,15 +8763,14 @@ _clutter_actor_get_allocation_clip (ClutterActor *self,
|
||||
}
|
||||
|
||||
void
|
||||
_clutter_actor_queue_redraw_full (ClutterActor *self,
|
||||
ClutterRedrawFlags flags,
|
||||
ClutterPaintVolume *volume,
|
||||
ClutterEffect *effect)
|
||||
_clutter_actor_queue_redraw_full (ClutterActor *self,
|
||||
ClutterRedrawFlags flags,
|
||||
const ClutterPaintVolume *volume,
|
||||
ClutterEffect *effect)
|
||||
{
|
||||
ClutterActorPrivate *priv = self->priv;
|
||||
ClutterPaintVolume allocation_pv;
|
||||
ClutterPaintVolume *pv;
|
||||
gboolean should_free_pv;
|
||||
ClutterPaintVolume *pv = NULL;
|
||||
ClutterActor *stage;
|
||||
|
||||
/* Here's an outline of the actor queue redraw mechanism:
|
||||
@@ -8894,21 +8912,15 @@ _clutter_actor_queue_redraw_full (ClutterActor *self,
|
||||
clutter_paint_volume_set_height (pv,
|
||||
allocation_clip.y2 -
|
||||
allocation_clip.y1);
|
||||
should_free_pv = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
pv = volume;
|
||||
should_free_pv = FALSE;
|
||||
}
|
||||
|
||||
self->priv->queue_redraw_entry =
|
||||
_clutter_stage_queue_actor_redraw (CLUTTER_STAGE (stage),
|
||||
priv->queue_redraw_entry,
|
||||
self,
|
||||
pv);
|
||||
pv ? pv : volume);
|
||||
|
||||
if (should_free_pv)
|
||||
if (pv)
|
||||
clutter_paint_volume_free (pv);
|
||||
|
||||
/* If this is the first redraw queued then we can directly use the
|
||||
@@ -9022,9 +9034,9 @@ clutter_actor_queue_redraw (ClutterActor *self)
|
||||
* picking of your actor.
|
||||
*/
|
||||
void
|
||||
_clutter_actor_queue_redraw_with_clip (ClutterActor *self,
|
||||
ClutterRedrawFlags flags,
|
||||
ClutterPaintVolume *volume)
|
||||
_clutter_actor_queue_redraw_with_clip (ClutterActor *self,
|
||||
ClutterRedrawFlags flags,
|
||||
const ClutterPaintVolume *volume)
|
||||
{
|
||||
_clutter_actor_queue_redraw_full (self,
|
||||
flags, /* flags */
|
||||
@@ -10301,9 +10313,10 @@ clutter_actor_set_position (ClutterActor *self,
|
||||
cur_position.x = clutter_actor_get_x (self);
|
||||
cur_position.y = clutter_actor_get_y (self);
|
||||
|
||||
_clutter_actor_create_transition (self, obj_props[PROP_POSITION],
|
||||
&cur_position,
|
||||
&new_position);
|
||||
if (!clutter_point_equals (&cur_position, &new_position))
|
||||
_clutter_actor_create_transition (self, obj_props[PROP_POSITION],
|
||||
&cur_position,
|
||||
&new_position);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -13662,7 +13675,7 @@ clutter_actor_set_child_above_sibling (ClutterActor *self,
|
||||
sibling);
|
||||
g_object_unref(child);
|
||||
|
||||
clutter_actor_queue_relayout (self);
|
||||
clutter_actor_queue_redraw_on_parent (child);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -13709,7 +13722,7 @@ clutter_actor_set_child_below_sibling (ClutterActor *self,
|
||||
sibling);
|
||||
g_object_unref(child);
|
||||
|
||||
clutter_actor_queue_relayout (self);
|
||||
clutter_actor_queue_redraw_on_parent (child);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -430,7 +430,7 @@ clutter_backend_real_get_features (ClutterBackend *backend)
|
||||
if (cogl_clutter_winsys_has_feature (COGL_WINSYS_FEATURE_SWAP_THROTTLE))
|
||||
{
|
||||
CLUTTER_NOTE (BACKEND, "Cogl supports swap buffers throttling");
|
||||
flags |= CLUTTER_FEATURE_SYNC_TO_VBLANK;
|
||||
flags |= CLUTTER_FEATURE_SWAP_THROTTLE;
|
||||
}
|
||||
else
|
||||
CLUTTER_NOTE (BACKEND, "Cogl doesn't support swap buffers throttling");
|
||||
|
@@ -39,7 +39,8 @@ typedef enum {
|
||||
CLUTTER_DEBUG_DISABLE_CULLING = 1 << 4,
|
||||
CLUTTER_DEBUG_DISABLE_OFFSCREEN_REDIRECT = 1 << 5,
|
||||
CLUTTER_DEBUG_CONTINUOUS_REDRAW = 1 << 6,
|
||||
CLUTTER_DEBUG_PAINT_DEFORM_TILES = 1 << 7
|
||||
CLUTTER_DEBUG_PAINT_DEFORM_TILES = 1 << 7,
|
||||
CLUTTER_DEBUG_PAINT_DAMAGE_REGION = 1 << 8,
|
||||
} ClutterDrawDebugFlag;
|
||||
|
||||
#ifdef CLUTTER_ENABLE_DEBUG
|
||||
|
@@ -26,7 +26,6 @@
|
||||
#include "deprecated/clutter-keysyms.h"
|
||||
#include "deprecated/clutter-list-model.h"
|
||||
#include "deprecated/clutter-main.h"
|
||||
#include "deprecated/clutter-media.h"
|
||||
#include "deprecated/clutter-model.h"
|
||||
#include "deprecated/clutter-rectangle.h"
|
||||
#include "deprecated/clutter-score.h"
|
||||
|
@@ -167,6 +167,10 @@ struct _ClutterInputDeviceClass
|
||||
gboolean (* is_grouped) (ClutterInputDevice *device,
|
||||
ClutterInputDevice *other_device);
|
||||
|
||||
gboolean (* get_physical_size) (ClutterInputDevice *device,
|
||||
gdouble *width,
|
||||
gdouble *height);
|
||||
|
||||
/* Keyboard accessbility */
|
||||
void (* process_kbd_a11y_event) (ClutterEvent *event,
|
||||
ClutterInputDevice *device,
|
||||
|
@@ -884,7 +884,7 @@ typedef enum {
|
||||
/**
|
||||
* ClutterFeatureFlags:
|
||||
* @CLUTTER_FEATURE_TEXTURE_NPOT: Set if NPOTS textures supported.
|
||||
* @CLUTTER_FEATURE_SYNC_TO_VBLANK: Set if vblank syncing supported.
|
||||
* @CLUTTER_FEATURE_SWAP_THROTTLE: Set if backend throttles buffer swaps.
|
||||
* @CLUTTER_FEATURE_TEXTURE_YUV: Set if YUV based textures supported.
|
||||
* @CLUTTER_FEATURE_TEXTURE_READ_PIXELS: Set if texture pixels can be read.
|
||||
* @CLUTTER_FEATURE_STAGE_STATIC: Set if stage size if fixed (i.e framebuffer)
|
||||
@@ -903,7 +903,7 @@ typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
CLUTTER_FEATURE_TEXTURE_NPOT = (1 << 2),
|
||||
CLUTTER_FEATURE_SYNC_TO_VBLANK = (1 << 3),
|
||||
CLUTTER_FEATURE_SWAP_THROTTLE = (1 << 3),
|
||||
CLUTTER_FEATURE_TEXTURE_YUV = (1 << 4),
|
||||
CLUTTER_FEATURE_TEXTURE_READ_PIXELS = (1 << 5),
|
||||
CLUTTER_FEATURE_STAGE_STATIC = (1 << 6),
|
||||
|
@@ -2284,3 +2284,15 @@ clutter_input_device_is_grouped (ClutterInputDevice *device,
|
||||
|
||||
return CLUTTER_INPUT_DEVICE_GET_CLASS (device)->is_grouped (device, other_device);
|
||||
}
|
||||
|
||||
gboolean
|
||||
clutter_input_device_get_physical_size (ClutterInputDevice *device,
|
||||
gdouble *width,
|
||||
gdouble *height)
|
||||
{
|
||||
g_return_val_if_fail (CLUTTER_IS_INPUT_DEVICE (device), FALSE);
|
||||
|
||||
return CLUTTER_INPUT_DEVICE_GET_CLASS (device)->get_physical_size (device,
|
||||
width,
|
||||
height);
|
||||
}
|
||||
|
@@ -171,6 +171,10 @@ void clutter_input_device_set_mapping_mode (ClutterInputDev
|
||||
CLUTTER_EXPORT
|
||||
gboolean clutter_input_device_is_grouped (ClutterInputDevice *device,
|
||||
ClutterInputDevice *other_device);
|
||||
CLUTTER_EXPORT
|
||||
gboolean clutter_input_device_get_physical_size (ClutterInputDevice *device,
|
||||
gdouble *width,
|
||||
gdouble *height);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
@@ -142,6 +142,7 @@ static const GDebugKey clutter_paint_debug_keys[] = {
|
||||
{ "disable-offscreen-redirect", CLUTTER_DEBUG_DISABLE_OFFSCREEN_REDIRECT },
|
||||
{ "continuous-redraw", CLUTTER_DEBUG_CONTINUOUS_REDRAW },
|
||||
{ "paint-deform-tiles", CLUTTER_DEBUG_PAINT_DEFORM_TILES },
|
||||
{ "damage-region", CLUTTER_DEBUG_PAINT_DAMAGE_REGION },
|
||||
};
|
||||
|
||||
static void
|
||||
@@ -254,16 +255,6 @@ clutter_config_read_from_key_file (GKeyFile *keyfile)
|
||||
else
|
||||
clutter_enable_accessibility = bool_value;
|
||||
|
||||
bool_value =
|
||||
g_key_file_get_boolean (keyfile, ENVIRONMENT_GROUP,
|
||||
"SyncToVblank",
|
||||
&key_error);
|
||||
|
||||
if (key_error != NULL)
|
||||
g_clear_error (&key_error);
|
||||
else
|
||||
clutter_sync_to_vblank = bool_value;
|
||||
|
||||
int_value =
|
||||
g_key_file_get_integer (keyfile, ENVIRONMENT_GROUP,
|
||||
"DefaultFps",
|
||||
@@ -1365,6 +1356,9 @@ clutter_init_real (GError **error)
|
||||
CLUTTER_DEBUG_DISABLE_CLIPPED_REDRAWS | CLUTTER_DEBUG_DISABLE_CULLING;
|
||||
}
|
||||
|
||||
if (clutter_paint_debug_flags & CLUTTER_DEBUG_PAINT_DAMAGE_REGION)
|
||||
g_message ("Enabling damaged region");
|
||||
|
||||
/* this will take care of initializing Cogl's state and
|
||||
* query the GL machinery for features
|
||||
*/
|
||||
@@ -1487,10 +1481,6 @@ pre_parse_hook (GOptionContext *context,
|
||||
if (env_string)
|
||||
clutter_use_fuzzy_picking = TRUE;
|
||||
|
||||
env_string = g_getenv ("CLUTTER_VBLANK");
|
||||
if (g_strcmp0 (env_string, "none") == 0)
|
||||
clutter_sync_to_vblank = FALSE;
|
||||
|
||||
return _clutter_backend_pre_parse (backend, error);
|
||||
}
|
||||
|
||||
@@ -3631,12 +3621,6 @@ _clutter_set_sync_to_vblank (gboolean sync_to_vblank)
|
||||
clutter_sync_to_vblank = !!sync_to_vblank;
|
||||
}
|
||||
|
||||
gboolean
|
||||
_clutter_get_sync_to_vblank (void)
|
||||
{
|
||||
return clutter_sync_to_vblank;
|
||||
}
|
||||
|
||||
void
|
||||
_clutter_debug_messagev (const char *format,
|
||||
va_list var_args)
|
||||
|
@@ -298,10 +298,10 @@ master_clock_next_frame_delay (ClutterMasterClockDefault *master_clock)
|
||||
* (NB: if there aren't even any timelines running then the master clock will
|
||||
* be completely stopped in master_clock_is_running())
|
||||
*/
|
||||
if (clutter_feature_available (CLUTTER_FEATURE_SYNC_TO_VBLANK) &&
|
||||
if (clutter_feature_available (CLUTTER_FEATURE_SWAP_THROTTLE) &&
|
||||
!master_clock->idle)
|
||||
{
|
||||
CLUTTER_NOTE (SCHEDULER, "vblank available and updated stages");
|
||||
CLUTTER_NOTE (SCHEDULER, "swap throttling available and updated stages");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@@ -34,9 +34,6 @@
|
||||
CLUTTER_EXPORT
|
||||
void clutter_set_custom_backend_func (ClutterBackend *(* func) (void));
|
||||
|
||||
CLUTTER_EXPORT
|
||||
gboolean _clutter_get_sync_to_vblank (void);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
int64_t clutter_stage_get_frame_counter (ClutterStage *stage);
|
||||
|
||||
|
@@ -1164,6 +1164,21 @@ _clutter_paint_volume_get_stage_paint_box (ClutterPaintVolume *pv,
|
||||
|
||||
_clutter_paint_volume_get_bounding_box (&projected_pv, box);
|
||||
|
||||
if (pv->is_2d && pv->actor &&
|
||||
clutter_actor_get_z_position (pv->actor) == 0)
|
||||
{
|
||||
/* If the volume/actor are perfectly 2D, take the bounding box as
|
||||
* good. We won't need to add any extra room for sub-pixel positioning
|
||||
* in this case.
|
||||
*/
|
||||
clutter_paint_volume_free (&projected_pv);
|
||||
box->x1 = CLUTTER_NEARBYINT (box->x1);
|
||||
box->y1 = CLUTTER_NEARBYINT (box->y1);
|
||||
box->x2 = CLUTTER_NEARBYINT (box->x2);
|
||||
box->y2 = CLUTTER_NEARBYINT (box->y2);
|
||||
return;
|
||||
}
|
||||
|
||||
/* The aim here is that for a given rectangle defined with floating point
|
||||
* coordinates we want to determine a stable quantized size in pixels
|
||||
* that doesn't vary due to the original box's sub-pixel position.
|
||||
|
@@ -87,7 +87,7 @@ const ClutterPlane *_clutter_stage_get_clip (ClutterStage *stage);
|
||||
ClutterStageQueueRedrawEntry *_clutter_stage_queue_actor_redraw (ClutterStage *stage,
|
||||
ClutterStageQueueRedrawEntry *entry,
|
||||
ClutterActor *actor,
|
||||
ClutterPaintVolume *clip);
|
||||
const ClutterPaintVolume *clip);
|
||||
void _clutter_stage_queue_redraw_entry_invalidate (ClutterStageQueueRedrawEntry *entry);
|
||||
|
||||
CoglFramebuffer *_clutter_stage_get_active_framebuffer (ClutterStage *stage);
|
||||
|
@@ -6,6 +6,14 @@
|
||||
#include "clutter-stage-window.h"
|
||||
#include "clutter-private.h"
|
||||
|
||||
/**
|
||||
* SECTION:clutter-stage-window
|
||||
* @short_description: Handles the implementation for ClutterStage
|
||||
*
|
||||
* #ClutterStageWindow is an interface that provides the implementation for the
|
||||
* #ClutterStage actor, abstracting away the specifics of the windowing system.
|
||||
*/
|
||||
|
||||
#define clutter_stage_window_get_type _clutter_stage_window_get_type
|
||||
|
||||
typedef ClutterStageWindowIface ClutterStageWindowInterface;
|
||||
@@ -36,6 +44,12 @@ clutter_stage_window_default_init (ClutterStageWindowInterface *iface)
|
||||
g_object_interface_install_property (iface, pspec);
|
||||
}
|
||||
|
||||
/**
|
||||
* _clutter_stage_window_get_wrapper:
|
||||
* @window: a #ClutterStageWindow object
|
||||
*
|
||||
* Returns the pointer to the #ClutterStage it's part of.
|
||||
*/
|
||||
ClutterActor *
|
||||
_clutter_stage_window_get_wrapper (ClutterStageWindow *window)
|
||||
{
|
||||
@@ -138,6 +152,14 @@ _clutter_stage_window_schedule_update (ClutterStageWindow *window,
|
||||
iface->schedule_update (window, sync_delay);
|
||||
}
|
||||
|
||||
/**
|
||||
* _clutter_stage_window_get_update_time:
|
||||
* @window: a #ClutterStageWindow object
|
||||
*
|
||||
* See _clutter_stage_get_update_time() for more info.
|
||||
*
|
||||
* Returns: The timestamp of the update time
|
||||
*/
|
||||
gint64
|
||||
_clutter_stage_window_get_update_time (ClutterStageWindow *window)
|
||||
{
|
||||
@@ -155,6 +177,12 @@ _clutter_stage_window_get_update_time (ClutterStageWindow *window)
|
||||
return iface->get_update_time (window);
|
||||
}
|
||||
|
||||
/**
|
||||
* _clutter_stage_window_clear_update_time:
|
||||
* @window: a #ClutterStageWindow object
|
||||
*
|
||||
* Clears the update time. See _clutter_stage_clear_update_time() for more info.
|
||||
*/
|
||||
void
|
||||
_clutter_stage_window_clear_update_time (ClutterStageWindow *window)
|
||||
{
|
||||
|
@@ -36,10 +36,10 @@
|
||||
* using clutter_actor_destroy(), which will take care of destroying all the
|
||||
* actors contained inside them.
|
||||
*
|
||||
* #ClutterStage is a proxy actor, wrapping the backend-specific
|
||||
* implementation of the windowing system. It is possible to subclass
|
||||
* #ClutterStage, as long as every overridden virtual function chains up to
|
||||
* the parent class corresponding function.
|
||||
* #ClutterStage is a proxy actor, wrapping the backend-specific implementation
|
||||
* (a #StageWindow) of the windowing system. It is possible to subclass
|
||||
* #ClutterStage, as long as every overridden virtual function chains up to the
|
||||
* parent class corresponding function.
|
||||
*/
|
||||
|
||||
#include "clutter-build-config.h"
|
||||
@@ -1511,7 +1511,8 @@ _clutter_stage_do_pick_on_view (ClutterStage *stage,
|
||||
* are drawn offscreen (as we never swap buffers)
|
||||
*/
|
||||
context->pick_mode = mode;
|
||||
_clutter_stage_paint_view (stage, view, NULL);
|
||||
|
||||
clutter_stage_do_paint_view (stage, view, NULL);
|
||||
context->pick_mode = CLUTTER_PICK_NONE;
|
||||
|
||||
/* Read the color of the screen co-ords pixel. RGBA_8888_PRE is used
|
||||
@@ -2248,6 +2249,8 @@ clutter_stage_class_init (ClutterStageClass *klass)
|
||||
* @stage: the stage that received the event
|
||||
* @frame_event: a #CoglFrameEvent
|
||||
* @frame_info: a #ClutterFrameInfo
|
||||
*
|
||||
* Signals that the #ClutterStage was presented on the screen to the user.
|
||||
*/
|
||||
stage_signals[PRESENTED] =
|
||||
g_signal_new (I_("presented"),
|
||||
@@ -3627,6 +3630,10 @@ _clutter_stage_maybe_setup_viewport (ClutterStage *stage,
|
||||
float fb_scale;
|
||||
float viewport_offset_x;
|
||||
float viewport_offset_y;
|
||||
float viewport_x;
|
||||
float viewport_y;
|
||||
float viewport_width;
|
||||
float viewport_height;
|
||||
float z_2d;
|
||||
|
||||
CLUTTER_NOTE (PAINT,
|
||||
@@ -3639,11 +3646,13 @@ _clutter_stage_maybe_setup_viewport (ClutterStage *stage,
|
||||
|
||||
viewport_offset_x = view_layout.x * fb_scale;
|
||||
viewport_offset_y = view_layout.y * fb_scale;
|
||||
viewport_x = roundf (priv->viewport[0] * fb_scale - viewport_offset_x);
|
||||
viewport_y = roundf (priv->viewport[1] * fb_scale - viewport_offset_y);
|
||||
viewport_width = roundf (priv->viewport[2] * fb_scale);
|
||||
viewport_height = roundf (priv->viewport[3] * fb_scale);
|
||||
cogl_framebuffer_set_viewport (fb,
|
||||
priv->viewport[0] * fb_scale - viewport_offset_x,
|
||||
priv->viewport[1] * fb_scale - viewport_offset_y,
|
||||
priv->viewport[2] * fb_scale,
|
||||
priv->viewport[3] * fb_scale);
|
||||
viewport_x, viewport_y,
|
||||
viewport_width, viewport_height);
|
||||
|
||||
perspective = priv->perspective;
|
||||
|
||||
@@ -3722,6 +3731,17 @@ clutter_stage_ensure_redraw (ClutterStage *stage)
|
||||
_clutter_master_clock_start_running (master_clock);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_stage_is_redraw_queued: (skip)
|
||||
*/
|
||||
gboolean
|
||||
clutter_stage_is_redraw_queued (ClutterStage *stage)
|
||||
{
|
||||
ClutterStagePrivate *priv = stage->priv;
|
||||
|
||||
return priv->redraw_pending;
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_stage_queue_redraw:
|
||||
* @stage: the #ClutterStage
|
||||
@@ -3982,6 +4002,12 @@ clutter_stage_get_minimum_size (ClutterStage *stage,
|
||||
*height_p = (guint) height;
|
||||
}
|
||||
|
||||
/**
|
||||
* _clutter_stage_schedule_update:
|
||||
* @window: a #ClutterStage actor
|
||||
*
|
||||
* Schedules a redraw of the #ClutterStage at the next optimal timestamp.
|
||||
*/
|
||||
void
|
||||
_clutter_stage_schedule_update (ClutterStage *stage)
|
||||
{
|
||||
@@ -3998,7 +4024,18 @@ _clutter_stage_schedule_update (ClutterStage *stage)
|
||||
stage->priv->sync_delay);
|
||||
}
|
||||
|
||||
/* Returns the earliest time the stage is ready to update */
|
||||
/**
|
||||
* _clutter_stage_get_update_time:
|
||||
* @stage: a #ClutterStage actor
|
||||
*
|
||||
* Returns the earliest time in which the stage is ready to update. The update
|
||||
* time is set when _clutter_stage_schedule_update() is called. This can then
|
||||
* be used by e.g. the #ClutterMasterClock to know when the stage needs to be
|
||||
* redrawn.
|
||||
*
|
||||
* Returns: -1 if no redraw is needed; 0 if the backend doesn't know, or the
|
||||
* timestamp (in microseconds) otherwise.
|
||||
*/
|
||||
gint64
|
||||
_clutter_stage_get_update_time (ClutterStage *stage)
|
||||
{
|
||||
@@ -4014,6 +4051,13 @@ _clutter_stage_get_update_time (ClutterStage *stage)
|
||||
return _clutter_stage_window_get_update_time (stage_window);
|
||||
}
|
||||
|
||||
/**
|
||||
* _clutter_stage_clear_update_time:
|
||||
* @stage: a #ClutterStage actor
|
||||
*
|
||||
* Resets the update time. Call this after a redraw, so that the update time
|
||||
* can again be updated.
|
||||
*/
|
||||
void
|
||||
_clutter_stage_clear_update_time (ClutterStage *stage)
|
||||
{
|
||||
@@ -4139,10 +4183,10 @@ _clutter_stage_get_clip (ClutterStage *stage)
|
||||
* didn't explicitly do so.
|
||||
*/
|
||||
ClutterStageQueueRedrawEntry *
|
||||
_clutter_stage_queue_actor_redraw (ClutterStage *stage,
|
||||
_clutter_stage_queue_actor_redraw (ClutterStage *stage,
|
||||
ClutterStageQueueRedrawEntry *entry,
|
||||
ClutterActor *actor,
|
||||
ClutterPaintVolume *clip)
|
||||
ClutterActor *actor,
|
||||
const ClutterPaintVolume *clip)
|
||||
{
|
||||
ClutterStagePrivate *priv = stage->priv;
|
||||
|
||||
|
@@ -250,6 +250,9 @@ void clutter_stage_ensure_viewport (ClutterStage
|
||||
CLUTTER_EXPORT
|
||||
void clutter_stage_ensure_redraw (ClutterStage *stage);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
gboolean clutter_stage_is_redraw_queued (ClutterStage *stage);
|
||||
|
||||
#ifdef CLUTTER_ENABLE_EXPERIMENTAL_API
|
||||
CLUTTER_EXPORT
|
||||
void clutter_stage_set_sync_delay (ClutterStage *stage,
|
||||
|
@@ -351,6 +351,58 @@ valid_buffer_age (ClutterStageViewCogl *view_cogl,
|
||||
return age < MIN (view_priv->damage_index, DAMAGE_HISTORY_MAX);
|
||||
}
|
||||
|
||||
static void
|
||||
paint_damage_region (ClutterStageWindow *stage_window,
|
||||
ClutterStageView *view,
|
||||
cairo_rectangle_int_t *swap_region)
|
||||
{
|
||||
CoglFramebuffer *framebuffer = clutter_stage_view_get_onscreen (view);
|
||||
CoglContext *ctx = cogl_framebuffer_get_context (framebuffer);
|
||||
static CoglPipeline *overlay_blue = NULL;
|
||||
ClutterStageCogl *stage_cogl = CLUTTER_STAGE_COGL (stage_window);
|
||||
ClutterActor *actor = CLUTTER_ACTOR (stage_cogl->wrapper);
|
||||
float x_1 = swap_region->x;
|
||||
float x_2 = swap_region->x + swap_region->width;
|
||||
float y_1 = swap_region->y;
|
||||
float y_2 = swap_region->y + swap_region->height;
|
||||
CoglMatrix modelview;
|
||||
|
||||
if (G_UNLIKELY (overlay_blue == NULL))
|
||||
{
|
||||
overlay_blue = cogl_pipeline_new (ctx);
|
||||
cogl_pipeline_set_color4ub (overlay_blue, 0x00, 0x00, 0x33, 0x33);
|
||||
}
|
||||
|
||||
cogl_framebuffer_push_matrix (framebuffer);
|
||||
cogl_matrix_init_identity (&modelview);
|
||||
_clutter_actor_apply_modelview_transform (actor, &modelview);
|
||||
cogl_framebuffer_set_modelview_matrix (framebuffer, &modelview);
|
||||
|
||||
/* Blue for the swap region */
|
||||
cogl_framebuffer_draw_rectangle (framebuffer, overlay_blue, x_1, y_1, x_2, y_2);
|
||||
|
||||
/* Red for the clip */
|
||||
if (stage_cogl->initialized_redraw_clip)
|
||||
{
|
||||
static CoglPipeline *overlay_red = NULL;
|
||||
|
||||
if (G_UNLIKELY (overlay_red == NULL))
|
||||
{
|
||||
overlay_red = cogl_pipeline_new (ctx);
|
||||
cogl_pipeline_set_color4ub (overlay_red, 0x33, 0x00, 0x00, 0x33);
|
||||
}
|
||||
|
||||
x_1 = stage_cogl->bounding_redraw_clip.x;
|
||||
x_2 = stage_cogl->bounding_redraw_clip.x + stage_cogl->bounding_redraw_clip.width;
|
||||
y_1 = stage_cogl->bounding_redraw_clip.y;
|
||||
y_2 = stage_cogl->bounding_redraw_clip.y + stage_cogl->bounding_redraw_clip.height;
|
||||
|
||||
cogl_framebuffer_draw_rectangle (framebuffer, overlay_red, x_1, y_1, x_2, y_2);
|
||||
}
|
||||
|
||||
cogl_framebuffer_pop_matrix (framebuffer);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
swap_framebuffer (ClutterStageWindow *stage_window,
|
||||
ClutterStageView *view,
|
||||
@@ -370,6 +422,9 @@ swap_framebuffer (ClutterStageWindow *stage_window,
|
||||
else
|
||||
ndamage = 0;
|
||||
|
||||
if (G_UNLIKELY ((clutter_paint_debug_flags & CLUTTER_DEBUG_PAINT_DAMAGE_REGION)))
|
||||
paint_damage_region (stage_window, view, swap_region);
|
||||
|
||||
if (cogl_is_onscreen (framebuffer))
|
||||
{
|
||||
CoglOnscreen *onscreen = COGL_ONSCREEN (framebuffer);
|
||||
@@ -521,6 +576,15 @@ calculate_scissor_region (cairo_rectangle_int_t *fb_clip_region,
|
||||
};
|
||||
}
|
||||
|
||||
static inline gboolean
|
||||
is_buffer_age_enabled (void)
|
||||
{
|
||||
/* Buffer age is disabled when running with CLUTTER_PAINT=damage-region,
|
||||
* to ensure the red damage represents the currently damaged area */
|
||||
return !(clutter_paint_debug_flags & CLUTTER_DEBUG_PAINT_DAMAGE_REGION) &&
|
||||
cogl_clutter_winsys_has_feature (COGL_WINSYS_FEATURE_BUFFER_AGE);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
|
||||
ClutterStageView *view)
|
||||
@@ -558,9 +622,7 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
|
||||
cogl_is_onscreen (fb) &&
|
||||
cogl_clutter_winsys_has_feature (COGL_WINSYS_FEATURE_SWAP_REGION);
|
||||
|
||||
has_buffer_age =
|
||||
cogl_is_onscreen (fb) &&
|
||||
cogl_clutter_winsys_has_feature (COGL_WINSYS_FEATURE_BUFFER_AGE);
|
||||
has_buffer_age = cogl_is_onscreen (fb) && is_buffer_age_enabled ();
|
||||
|
||||
/* NB: a zero width redraw clip == full stage redraw */
|
||||
if (stage_cogl->bounding_redraw_clip.width == 0)
|
||||
@@ -891,7 +953,7 @@ clutter_stage_cogl_get_dirty_pixel (ClutterStageWindow *stage_window,
|
||||
CoglFramebuffer *framebuffer = clutter_stage_view_get_framebuffer (view);
|
||||
gboolean has_buffer_age =
|
||||
cogl_is_onscreen (framebuffer) &&
|
||||
cogl_clutter_winsys_has_feature (COGL_WINSYS_FEATURE_BUFFER_AGE);
|
||||
is_buffer_age_enabled ();
|
||||
float fb_scale;
|
||||
gboolean scale_is_fractional;
|
||||
|
||||
|
@@ -1,664 +0,0 @@
|
||||
/*
|
||||
* Clutter.
|
||||
*
|
||||
* An OpenGL based 'interactive canvas' library.
|
||||
*
|
||||
* Authored By: Matthew Allum <mallum@openedhand.com>
|
||||
* Emmanuele Bassi <ebassi@linux.intel.com>
|
||||
*
|
||||
* Copyright (C) 2006 OpenedHand
|
||||
* Copyright (C) 2009 Intel Corp.
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* SECTION:clutter-media
|
||||
* @short_description: An interface for controlling playback of media data
|
||||
*
|
||||
* #ClutterMedia is an interface for controlling playback of media sources.
|
||||
*
|
||||
* Clutter core does not provide an implementation of this interface, but
|
||||
* other integration libraries like Clutter-GStreamer implement it to offer
|
||||
* a uniform API for applications.
|
||||
*
|
||||
* #ClutterMedia is available since Clutter 0.2
|
||||
*
|
||||
* #ClutterMedia is deprecated since Clutter 1.12. Use the Clutter-GStreamer
|
||||
* API directly instead.
|
||||
*/
|
||||
|
||||
#include "clutter-build-config.h"
|
||||
|
||||
#define CLUTTER_DISABLE_DEPRECATION_WARNINGS
|
||||
|
||||
#include "clutter-debug.h"
|
||||
#include "clutter-enum-types.h"
|
||||
#include "clutter-marshal.h"
|
||||
#include "clutter-media.h"
|
||||
#include "clutter-main.h"
|
||||
#include "clutter-private.h" /* for DBG */
|
||||
|
||||
enum
|
||||
{
|
||||
EOS_SIGNAL,
|
||||
ERROR_SIGNAL, /* can't be called 'ERROR' otherwise it clashes with wingdi.h */
|
||||
|
||||
LAST_SIGNAL
|
||||
};
|
||||
|
||||
static guint media_signals[LAST_SIGNAL] = { 0, };
|
||||
|
||||
typedef ClutterMediaIface ClutterMediaInterface;
|
||||
|
||||
G_DEFINE_INTERFACE (ClutterMedia, clutter_media, G_TYPE_OBJECT);
|
||||
|
||||
static void
|
||||
clutter_media_default_init (ClutterMediaInterface *iface)
|
||||
{
|
||||
GParamSpec *pspec = NULL;
|
||||
|
||||
/**
|
||||
* ClutterMedia:uri:
|
||||
*
|
||||
* The location of a media file, expressed as a valid URI.
|
||||
*
|
||||
* Since: 0.2
|
||||
*
|
||||
* Deprecated: 1.12
|
||||
*/
|
||||
pspec = g_param_spec_string ("uri",
|
||||
P_("URI"),
|
||||
P_("URI of a media file"),
|
||||
NULL,
|
||||
CLUTTER_PARAM_READWRITE |
|
||||
G_PARAM_DEPRECATED);
|
||||
g_object_interface_install_property (iface, pspec);
|
||||
|
||||
/**
|
||||
* ClutterMedia:playing:
|
||||
*
|
||||
* Whether the #ClutterMedia actor is playing.
|
||||
*
|
||||
* Since: 0.2
|
||||
*
|
||||
* Deprecated: 1.12
|
||||
*/
|
||||
pspec = g_param_spec_boolean ("playing",
|
||||
P_("Playing"),
|
||||
P_("Whether the actor is playing"),
|
||||
FALSE,
|
||||
CLUTTER_PARAM_READWRITE |
|
||||
G_PARAM_DEPRECATED);
|
||||
g_object_interface_install_property (iface, pspec);
|
||||
|
||||
/**
|
||||
* ClutterMedia:progress:
|
||||
*
|
||||
* The current progress of the playback, as a normalized
|
||||
* value between 0.0 and 1.0.
|
||||
*
|
||||
* Since: 1.0
|
||||
*
|
||||
* Deprecated: 1.12
|
||||
*/
|
||||
pspec = g_param_spec_double ("progress",
|
||||
P_("Progress"),
|
||||
P_("Current progress of the playback"),
|
||||
0.0, 1.0, 0.0,
|
||||
CLUTTER_PARAM_READWRITE |
|
||||
G_PARAM_DEPRECATED);
|
||||
g_object_interface_install_property (iface, pspec);
|
||||
|
||||
/**
|
||||
* ClutterMedia:subtitle-uri:
|
||||
*
|
||||
* The location of a subtitle file, expressed as a valid URI.
|
||||
*
|
||||
* Since: 1.2
|
||||
*
|
||||
* Deprecated: 1.12
|
||||
*/
|
||||
pspec = g_param_spec_string ("subtitle-uri",
|
||||
P_("Subtitle URI"),
|
||||
P_("URI of a subtitle file"),
|
||||
NULL,
|
||||
CLUTTER_PARAM_READWRITE |
|
||||
G_PARAM_DEPRECATED);
|
||||
g_object_interface_install_property (iface, pspec);
|
||||
|
||||
/**
|
||||
* ClutterMedia:subtitle-font-name:
|
||||
*
|
||||
* The font used to display subtitles. The font description has to
|
||||
* follow the same grammar as the one recognized by
|
||||
* pango_font_description_from_string().
|
||||
*
|
||||
* Since: 1.2
|
||||
*
|
||||
* Deprecated: 1.12
|
||||
*/
|
||||
pspec = g_param_spec_string ("subtitle-font-name",
|
||||
P_("Subtitle Font Name"),
|
||||
P_("The font used to display subtitles"),
|
||||
NULL,
|
||||
CLUTTER_PARAM_READWRITE |
|
||||
G_PARAM_DEPRECATED);
|
||||
g_object_interface_install_property (iface, pspec);
|
||||
|
||||
/**
|
||||
* ClutterMedia:audio-volume:
|
||||
*
|
||||
* The volume of the audio, as a normalized value between
|
||||
* 0.0 and 1.0.
|
||||
*
|
||||
* Since: 1.0
|
||||
*
|
||||
* Deprecated: 1.12
|
||||
*/
|
||||
pspec = g_param_spec_double ("audio-volume",
|
||||
P_("Audio Volume"),
|
||||
P_("The volume of the audio"),
|
||||
0.0, 1.0, 0.5,
|
||||
CLUTTER_PARAM_READWRITE |
|
||||
G_PARAM_DEPRECATED);
|
||||
g_object_interface_install_property (iface, pspec);
|
||||
|
||||
/**
|
||||
* ClutterMedia:can-seek:
|
||||
*
|
||||
* Whether the current stream is seekable.
|
||||
*
|
||||
* Since: 0.2
|
||||
*
|
||||
* Deprecated: 1.12
|
||||
*/
|
||||
pspec = g_param_spec_boolean ("can-seek",
|
||||
P_("Can Seek"),
|
||||
P_("Whether the current stream is seekable"),
|
||||
FALSE,
|
||||
CLUTTER_PARAM_READABLE |
|
||||
G_PARAM_DEPRECATED);
|
||||
g_object_interface_install_property (iface, pspec);
|
||||
|
||||
/**
|
||||
* ClutterMedia:buffer-fill:
|
||||
*
|
||||
* The fill level of the buffer for the current stream,
|
||||
* as a value between 0.0 and 1.0.
|
||||
*
|
||||
* Since: 1.0
|
||||
*
|
||||
* Deprecated: 1.12
|
||||
*/
|
||||
pspec = g_param_spec_double ("buffer-fill",
|
||||
P_("Buffer Fill"),
|
||||
P_("The fill level of the buffer"),
|
||||
0.0, 1.0, 0.0,
|
||||
CLUTTER_PARAM_READABLE |
|
||||
G_PARAM_DEPRECATED);
|
||||
g_object_interface_install_property (iface, pspec);
|
||||
|
||||
/**
|
||||
* ClutterMedia:duration:
|
||||
*
|
||||
* The duration of the current stream, in seconds
|
||||
*
|
||||
* Since: 0.2
|
||||
*
|
||||
* Deprecated: 1.12
|
||||
*/
|
||||
pspec = g_param_spec_double ("duration",
|
||||
P_("Duration"),
|
||||
P_("The duration of the stream, in seconds"),
|
||||
0, G_MAXDOUBLE, 0,
|
||||
CLUTTER_PARAM_READABLE);
|
||||
g_object_interface_install_property (iface, pspec);
|
||||
|
||||
/**
|
||||
* ClutterMedia::eos:
|
||||
* @media: the #ClutterMedia instance that received the signal
|
||||
*
|
||||
* The ::eos signal is emitted each time the media stream ends.
|
||||
*
|
||||
* Since: 0.2
|
||||
*
|
||||
* Deprecated: 1.12
|
||||
*/
|
||||
media_signals[EOS_SIGNAL] =
|
||||
g_signal_new (I_("eos"),
|
||||
CLUTTER_TYPE_MEDIA,
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (ClutterMediaIface, eos),
|
||||
NULL, NULL,
|
||||
_clutter_marshal_VOID__VOID,
|
||||
G_TYPE_NONE, 0);
|
||||
/**
|
||||
* ClutterMedia::error:
|
||||
* @media: the #ClutterMedia instance that received the signal
|
||||
* @error: the #GError
|
||||
*
|
||||
* The ::error signal is emitted each time an error occurred.
|
||||
*
|
||||
* Since: 0.2
|
||||
*
|
||||
* Deprecated: 1.12
|
||||
*/
|
||||
media_signals[ERROR_SIGNAL] =
|
||||
g_signal_new (I_("error"),
|
||||
CLUTTER_TYPE_MEDIA,
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (ClutterMediaIface, error),
|
||||
NULL, NULL,
|
||||
_clutter_marshal_VOID__BOXED,
|
||||
G_TYPE_NONE, 1,
|
||||
G_TYPE_ERROR);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* clutter_media_set_uri:
|
||||
* @media: a #ClutterMedia
|
||||
* @uri: the URI of the media stream
|
||||
*
|
||||
* Sets the URI of @media to @uri.
|
||||
*
|
||||
* Since: 0.2
|
||||
*
|
||||
* Deprecated: 1.12
|
||||
*/
|
||||
void
|
||||
clutter_media_set_uri (ClutterMedia *media,
|
||||
const gchar *uri)
|
||||
{
|
||||
g_return_if_fail (CLUTTER_IS_MEDIA(media));
|
||||
|
||||
g_object_set (G_OBJECT (media), "uri", uri, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_media_get_uri:
|
||||
* @media: a #ClutterMedia
|
||||
*
|
||||
* Retrieves the URI from @media.
|
||||
*
|
||||
* Return value: the URI of the media stream. Use g_free()
|
||||
* to free the returned string
|
||||
*
|
||||
* Since: 0.2
|
||||
*
|
||||
* Deprecated: 1.12
|
||||
*/
|
||||
gchar *
|
||||
clutter_media_get_uri (ClutterMedia *media)
|
||||
{
|
||||
gchar *retval = NULL;
|
||||
|
||||
g_return_val_if_fail (CLUTTER_IS_MEDIA(media), NULL);
|
||||
|
||||
g_object_get (G_OBJECT (media), "uri", &retval, NULL);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_media_set_playing:
|
||||
* @media: a #ClutterMedia
|
||||
* @playing: %TRUE to start playing
|
||||
*
|
||||
* Starts or stops playing of @media.
|
||||
|
||||
* The implementation might be asynchronous, so the way to know whether
|
||||
* the actual playing state of the @media is to use the #GObject::notify
|
||||
* signal on the #ClutterMedia:playing property and then retrieve the
|
||||
* current state with clutter_media_get_playing(). ClutterGstVideoTexture
|
||||
* in clutter-gst is an example of such an asynchronous implementation.
|
||||
*
|
||||
* Since: 0.2
|
||||
*
|
||||
* Deprecated: 1.12
|
||||
*/
|
||||
void
|
||||
clutter_media_set_playing (ClutterMedia *media,
|
||||
gboolean playing)
|
||||
{
|
||||
g_return_if_fail (CLUTTER_IS_MEDIA(media));
|
||||
|
||||
g_object_set (G_OBJECT (media), "playing", playing, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_media_get_playing:
|
||||
* @media: A #ClutterMedia object
|
||||
*
|
||||
* Retrieves the playing status of @media.
|
||||
*
|
||||
* Return value: %TRUE if playing, %FALSE if stopped.
|
||||
*
|
||||
* Since: 0.2
|
||||
*
|
||||
* Deprecated: 1.12
|
||||
*/
|
||||
gboolean
|
||||
clutter_media_get_playing (ClutterMedia *media)
|
||||
{
|
||||
gboolean is_playing = FALSE;
|
||||
|
||||
g_return_val_if_fail (CLUTTER_IS_MEDIA (media), FALSE);
|
||||
|
||||
g_object_get (G_OBJECT (media), "playing", &is_playing, NULL);
|
||||
|
||||
return is_playing;
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_media_set_progress:
|
||||
* @media: a #ClutterMedia
|
||||
* @progress: the progress of the playback, between 0.0 and 1.0
|
||||
*
|
||||
* Sets the playback progress of @media. The @progress is
|
||||
* a normalized value between 0.0 (begin) and 1.0 (end).
|
||||
*
|
||||
* Since: 1.0
|
||||
*
|
||||
* Deprecated: 1.12
|
||||
*/
|
||||
void
|
||||
clutter_media_set_progress (ClutterMedia *media,
|
||||
gdouble progress)
|
||||
{
|
||||
g_return_if_fail (CLUTTER_IS_MEDIA (media));
|
||||
|
||||
g_object_set (G_OBJECT (media), "progress", progress, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_media_get_progress:
|
||||
* @media: a #ClutterMedia
|
||||
*
|
||||
* Retrieves the playback progress of @media.
|
||||
*
|
||||
* Return value: the playback progress, between 0.0 and 1.0
|
||||
*
|
||||
* Since: 1.0
|
||||
*
|
||||
* Deprecated: 1.12
|
||||
*/
|
||||
gdouble
|
||||
clutter_media_get_progress (ClutterMedia *media)
|
||||
{
|
||||
gdouble retval = 0.0;
|
||||
|
||||
g_return_val_if_fail (CLUTTER_IS_MEDIA (media), 0);
|
||||
|
||||
g_object_get (G_OBJECT (media), "progress", &retval, NULL);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_media_set_subtitle_uri:
|
||||
* @media: a #ClutterMedia
|
||||
* @uri: the URI of a subtitle file
|
||||
*
|
||||
* Sets the location of a subtitle file to display while playing @media.
|
||||
*
|
||||
* Since: 1.2
|
||||
*
|
||||
* Deprecated: 1.12
|
||||
*/
|
||||
void
|
||||
clutter_media_set_subtitle_uri (ClutterMedia *media,
|
||||
const char *uri)
|
||||
{
|
||||
g_return_if_fail (CLUTTER_IS_MEDIA (media));
|
||||
|
||||
g_object_set (G_OBJECT (media), "subtitle-uri", uri, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_media_get_subtitle_uri:
|
||||
* @media: a #ClutterMedia
|
||||
*
|
||||
* Retrieves the URI of the subtitle file in use.
|
||||
*
|
||||
* Return value: the URI of the subtitle file. Use g_free()
|
||||
* to free the returned string
|
||||
*
|
||||
* Since: 1.2
|
||||
*
|
||||
* Deprecated: 1.12
|
||||
*/
|
||||
gchar *
|
||||
clutter_media_get_subtitle_uri (ClutterMedia *media)
|
||||
{
|
||||
gchar *retval = NULL;
|
||||
|
||||
g_return_val_if_fail (CLUTTER_IS_MEDIA(media), NULL);
|
||||
|
||||
g_object_get (G_OBJECT (media), "subtitle-uri", &retval, NULL);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_media_set_subtitle_font_name:
|
||||
* @media: a #ClutterMedia
|
||||
* @font_name: a font name, or %NULL to set the default font name
|
||||
*
|
||||
* Sets the font used by the subtitle renderer. The @font_name string must be
|
||||
* either %NULL, which means that the default font name of the underlying
|
||||
* implementation will be used; or must follow the grammar recognized by
|
||||
* pango_font_description_from_string() like:
|
||||
*
|
||||
* |[
|
||||
* clutter_media_set_subtitle_font_name (media, "Sans 24pt");
|
||||
* ]|
|
||||
*
|
||||
* Since: 1.2
|
||||
*
|
||||
* Deprecated: 1.12
|
||||
*/
|
||||
void
|
||||
clutter_media_set_subtitle_font_name (ClutterMedia *media,
|
||||
const char *font_name)
|
||||
{
|
||||
g_return_if_fail (CLUTTER_IS_MEDIA (media));
|
||||
|
||||
g_object_set (G_OBJECT (media), "subtitle-font-name", font_name, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_media_get_subtitle_font_name:
|
||||
* @media: a #ClutterMedia
|
||||
*
|
||||
* Retrieves the font name currently used.
|
||||
*
|
||||
* Return value: a string containing the font name. Use g_free()
|
||||
* to free the returned string
|
||||
*
|
||||
* Since: 1.2
|
||||
*
|
||||
* Deprecated: 1.12
|
||||
*/
|
||||
gchar *
|
||||
clutter_media_get_subtitle_font_name (ClutterMedia *media)
|
||||
{
|
||||
gchar *retval = NULL;
|
||||
|
||||
g_return_val_if_fail (CLUTTER_IS_MEDIA(media), NULL);
|
||||
|
||||
g_object_get (G_OBJECT (media), "subtitle-font-name", &retval, NULL);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_media_set_audio_volume:
|
||||
* @media: a #ClutterMedia
|
||||
* @volume: the volume as a double between 0.0 and 1.0
|
||||
*
|
||||
* Sets the playback volume of @media to @volume.
|
||||
*
|
||||
* Since: 1.0
|
||||
*
|
||||
* Deprecated: 1.12
|
||||
*/
|
||||
void
|
||||
clutter_media_set_audio_volume (ClutterMedia *media,
|
||||
gdouble volume)
|
||||
{
|
||||
g_return_if_fail (CLUTTER_IS_MEDIA(media));
|
||||
|
||||
g_object_set (G_OBJECT (media), "audio-volume", volume, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_media_get_audio_volume:
|
||||
* @media: a #ClutterMedia
|
||||
*
|
||||
* Retrieves the playback volume of @media.
|
||||
*
|
||||
* Return value: The playback volume between 0.0 and 1.0
|
||||
*
|
||||
* Since: 1.0
|
||||
*
|
||||
* Deprecated: 1.12
|
||||
*/
|
||||
gdouble
|
||||
clutter_media_get_audio_volume (ClutterMedia *media)
|
||||
{
|
||||
gdouble retval = 0.0;
|
||||
|
||||
g_return_val_if_fail (CLUTTER_IS_MEDIA (media), 0.0);
|
||||
|
||||
g_object_get (G_OBJECT (media), "audio-volume", &retval, NULL);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_media_get_can_seek:
|
||||
* @media: a #ClutterMedia
|
||||
*
|
||||
* Retrieves whether @media is seekable or not.
|
||||
*
|
||||
* Return value: %TRUE if @media can seek, %FALSE otherwise.
|
||||
*
|
||||
* Since: 0.2
|
||||
*
|
||||
* Deprecated: 1.12
|
||||
*/
|
||||
gboolean
|
||||
clutter_media_get_can_seek (ClutterMedia *media)
|
||||
{
|
||||
gboolean retval = FALSE;
|
||||
|
||||
g_return_val_if_fail (CLUTTER_IS_MEDIA (media), FALSE);
|
||||
|
||||
g_object_get (G_OBJECT (media), "can-seek", &retval, NULL);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_media_get_buffer_fill:
|
||||
* @media: a #ClutterMedia
|
||||
*
|
||||
* Retrieves the amount of the stream that is buffered.
|
||||
*
|
||||
* Return value: the fill level, between 0.0 and 1.0
|
||||
*
|
||||
* Since: 1.0
|
||||
*
|
||||
* Deprecated: 1.12
|
||||
*/
|
||||
gdouble
|
||||
clutter_media_get_buffer_fill (ClutterMedia *media)
|
||||
{
|
||||
gdouble retval = 0.0;
|
||||
|
||||
g_return_val_if_fail (CLUTTER_IS_MEDIA (media), 0);
|
||||
|
||||
g_object_get (G_OBJECT (media), "buffer-fill", &retval, NULL);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_media_get_duration:
|
||||
* @media: a #ClutterMedia
|
||||
*
|
||||
* Retrieves the duration of the media stream that @media represents.
|
||||
*
|
||||
* Return value: the duration of the media stream, in seconds
|
||||
*
|
||||
* Since: 0.2
|
||||
*
|
||||
* Deprecated: 1.12
|
||||
*/
|
||||
gdouble
|
||||
clutter_media_get_duration (ClutterMedia *media)
|
||||
{
|
||||
gdouble retval = 0;
|
||||
|
||||
g_return_val_if_fail (CLUTTER_IS_MEDIA(media), 0);
|
||||
|
||||
g_object_get (G_OBJECT (media), "duration", &retval, NULL);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
/* helper funcs */
|
||||
|
||||
/**
|
||||
* clutter_media_set_filename:
|
||||
* @media: a #ClutterMedia
|
||||
* @filename: A filename
|
||||
*
|
||||
* Sets the source of @media using a file path.
|
||||
*
|
||||
* Since: 0.2
|
||||
*
|
||||
* Deprecated: 1.12
|
||||
*/
|
||||
void
|
||||
clutter_media_set_filename (ClutterMedia *media,
|
||||
const gchar *filename)
|
||||
{
|
||||
gchar *uri;
|
||||
GError *uri_error = NULL;
|
||||
|
||||
if (!g_path_is_absolute (filename))
|
||||
{
|
||||
gchar *abs_path;
|
||||
|
||||
abs_path = g_build_filename (g_get_current_dir (), filename, NULL);
|
||||
uri = g_filename_to_uri (abs_path, NULL, &uri_error);
|
||||
g_free (abs_path);
|
||||
}
|
||||
else
|
||||
uri = g_filename_to_uri (filename, NULL, &uri_error);
|
||||
|
||||
if (uri_error)
|
||||
{
|
||||
g_signal_emit (media, media_signals[ERROR_SIGNAL], 0, uri_error);
|
||||
g_error_free (uri_error);
|
||||
return;
|
||||
}
|
||||
|
||||
clutter_media_set_uri (media, uri);
|
||||
|
||||
g_free (uri);
|
||||
}
|
@@ -1,121 +0,0 @@
|
||||
/*
|
||||
* Clutter.
|
||||
*
|
||||
* An OpenGL based 'interactive canvas' library.
|
||||
*
|
||||
* Authored By: Matthew Allum <mallum@openedhand.com>
|
||||
* Emmanuele Bassi <ebassi@linux.intel.com>
|
||||
*
|
||||
* Copyright (C) 2006 OpenedHand
|
||||
* Copyright (C) 2009 Intel Corp.
|
||||
*
|
||||
* 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(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
|
||||
#error "Only <clutter/clutter.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __CLUTTER_MEDIA_H__
|
||||
#define __CLUTTER_MEDIA_H__
|
||||
|
||||
#include <glib-object.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define CLUTTER_TYPE_MEDIA (clutter_media_get_type ())
|
||||
#define CLUTTER_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_MEDIA, ClutterMedia))
|
||||
#define CLUTTER_IS_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_MEDIA))
|
||||
#define CLUTTER_MEDIA_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), CLUTTER_TYPE_MEDIA, ClutterMediaIface))
|
||||
|
||||
typedef struct _ClutterMedia ClutterMedia; /* dummy typedef */
|
||||
typedef struct _ClutterMediaIface ClutterMediaIface;
|
||||
|
||||
/**
|
||||
* ClutterMedia:
|
||||
*
|
||||
* #ClutterMedia is an opaque structure whose members cannot be directly
|
||||
* accessed
|
||||
*
|
||||
* Since: 0.2
|
||||
*/
|
||||
|
||||
/**
|
||||
* ClutterMediaIface:
|
||||
* @eos: handler for the #ClutterMedia::eos signal
|
||||
* @error: handler for the #ClutterMedia::error signal
|
||||
*
|
||||
* Interface vtable for #ClutterMedia implementations
|
||||
*
|
||||
* Since: 0.2
|
||||
*/
|
||||
struct _ClutterMediaIface
|
||||
{
|
||||
/*< private >*/
|
||||
GTypeInterface base_iface;
|
||||
|
||||
/*< public >*/
|
||||
/* signals */
|
||||
void (* eos) (ClutterMedia *media);
|
||||
void (* error) (ClutterMedia *media,
|
||||
const GError *error);
|
||||
};
|
||||
|
||||
CLUTTER_DEPRECATED
|
||||
GType clutter_media_get_type (void) G_GNUC_CONST;
|
||||
|
||||
CLUTTER_DEPRECATED
|
||||
void clutter_media_set_uri (ClutterMedia *media,
|
||||
const gchar *uri);
|
||||
CLUTTER_DEPRECATED
|
||||
gchar * clutter_media_get_uri (ClutterMedia *media);
|
||||
CLUTTER_DEPRECATED
|
||||
void clutter_media_set_filename (ClutterMedia *media,
|
||||
const gchar *filename);
|
||||
|
||||
CLUTTER_DEPRECATED
|
||||
void clutter_media_set_playing (ClutterMedia *media,
|
||||
gboolean playing);
|
||||
CLUTTER_DEPRECATED
|
||||
gboolean clutter_media_get_playing (ClutterMedia *media);
|
||||
CLUTTER_DEPRECATED
|
||||
void clutter_media_set_progress (ClutterMedia *media,
|
||||
gdouble progress);
|
||||
CLUTTER_DEPRECATED
|
||||
gdouble clutter_media_get_progress (ClutterMedia *media);
|
||||
CLUTTER_DEPRECATED
|
||||
void clutter_media_set_subtitle_uri (ClutterMedia *media,
|
||||
const gchar *uri);
|
||||
CLUTTER_DEPRECATED
|
||||
gchar * clutter_media_get_subtitle_uri (ClutterMedia *media);
|
||||
CLUTTER_DEPRECATED
|
||||
void clutter_media_set_subtitle_font_name (ClutterMedia *media,
|
||||
const char *font_name);
|
||||
CLUTTER_DEPRECATED
|
||||
gchar * clutter_media_get_subtitle_font_name (ClutterMedia *media);
|
||||
CLUTTER_DEPRECATED
|
||||
void clutter_media_set_audio_volume (ClutterMedia *media,
|
||||
gdouble volume);
|
||||
CLUTTER_DEPRECATED
|
||||
gdouble clutter_media_get_audio_volume (ClutterMedia *media);
|
||||
CLUTTER_DEPRECATED
|
||||
gboolean clutter_media_get_can_seek (ClutterMedia *media);
|
||||
CLUTTER_DEPRECATED
|
||||
gdouble clutter_media_get_buffer_fill (ClutterMedia *media);
|
||||
CLUTTER_DEPRECATED
|
||||
gdouble clutter_media_get_duration (ClutterMedia *media);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __CLUTTER_MEDIA_H__ */
|
@@ -1265,6 +1265,18 @@ clutter_input_device_evdev_release_touch_state (ClutterInputDeviceEvdev *device,
|
||||
GINT_TO_POINTER (touch_state->device_slot));
|
||||
}
|
||||
|
||||
static gboolean
|
||||
clutter_input_device_evdev_get_physical_size (ClutterInputDevice *device,
|
||||
gdouble *width,
|
||||
gdouble *height)
|
||||
{
|
||||
struct libinput_device *libinput_device;
|
||||
|
||||
libinput_device = clutter_evdev_input_device_get_libinput_device (device);
|
||||
|
||||
return libinput_device_get_size (libinput_device, width, height) == 0;
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_input_device_evdev_class_init (ClutterInputDeviceEvdevClass *klass)
|
||||
{
|
||||
@@ -1280,6 +1292,7 @@ clutter_input_device_evdev_class_init (ClutterInputDeviceEvdevClass *klass)
|
||||
klass->get_group_n_modes = clutter_input_device_evdev_get_group_n_modes;
|
||||
klass->is_grouped = clutter_input_device_evdev_is_grouped;
|
||||
klass->process_kbd_a11y_event = clutter_input_device_evdev_process_kbd_a11y_event;
|
||||
klass->get_physical_size = clutter_input_device_evdev_get_physical_size;
|
||||
|
||||
obj_props[PROP_DEVICE_MATRIX] =
|
||||
g_param_spec_boxed ("device-matrix",
|
||||
|
@@ -237,7 +237,6 @@ clutter_deprecated_headers = [
|
||||
'deprecated/clutter-keysyms.h',
|
||||
'deprecated/clutter-list-model.h',
|
||||
'deprecated/clutter-main.h',
|
||||
'deprecated/clutter-media.h',
|
||||
'deprecated/clutter-model.h',
|
||||
'deprecated/clutter-rectangle.h',
|
||||
'deprecated/clutter-score.h',
|
||||
@@ -271,7 +270,6 @@ clutter_deprecated_sources = [
|
||||
'deprecated/clutter-input-device-deprecated.c',
|
||||
'deprecated/clutter-layout-manager-deprecated.c',
|
||||
'deprecated/clutter-list-model.c',
|
||||
'deprecated/clutter-media.c',
|
||||
'deprecated/clutter-model.c',
|
||||
'deprecated/clutter-rectangle.c',
|
||||
'deprecated/clutter-score.c',
|
||||
@@ -493,7 +491,7 @@ clutter_marshal = gnome.genmarshal('clutter-marshal',
|
||||
prefix: '_clutter_marshal',
|
||||
sources: 'clutter-marshal.list',
|
||||
valist_marshallers: true,
|
||||
extra_args: ['--prototypes'],
|
||||
extra_args: ['--prototypes', '--quiet'],
|
||||
install_dir: clutter_clutter_includedir,
|
||||
install_header: true,
|
||||
)
|
||||
@@ -540,10 +538,7 @@ libmutter_clutter_dep = declare_dependency(
|
||||
)
|
||||
|
||||
if have_introspection
|
||||
clutter_introspection_args = clutter_c_args + [
|
||||
'-U_GNU_SOURCE', # _GNU_SOURCE triggers warnings in g-ir-scanner
|
||||
'--quiet',
|
||||
]
|
||||
clutter_introspection_args = introspection_args + clutter_c_args
|
||||
|
||||
libmutter_clutter_gir = gnome.generate_gir(libmutter_clutter,
|
||||
sources: [
|
||||
@@ -628,28 +623,30 @@ install_headers(clutter_deprecated_headers,
|
||||
install_headers(clutter_x11_headers,
|
||||
subdir: join_paths(clutter_clutter_includedir, 'x11'))
|
||||
|
||||
pkg.generate(
|
||||
pkg.generate(libmutter_clutter,
|
||||
name: 'Mutters Clutter',
|
||||
filebase: libmutter_clutter_name,
|
||||
description: 'Mutters Clutter Private Library',
|
||||
libraries: [libmutter_clutter, m_dep],
|
||||
libraries: [m_dep],
|
||||
subdirs: join_paths(pkgname, 'clutter'),
|
||||
requires: [clutter_pkg_deps, libmutter_cogl_name],
|
||||
version: meson.project_version(),
|
||||
variables: [
|
||||
'apiversion=' + libmutter_api_version,
|
||||
],
|
||||
install_dir: pcdir,
|
||||
)
|
||||
|
||||
pkg.generate(
|
||||
pkg.generate(libmutter_clutter,
|
||||
name: 'Mutters ClutterX11',
|
||||
filebase: 'mutter-clutter-x11-' + libmutter_api_version,
|
||||
description: 'Mutters ClutterX11 Private Library',
|
||||
libraries: [libmutter_clutter, m_dep],
|
||||
libraries: [m_dep],
|
||||
subdirs: join_paths(pkgname, 'clutter'),
|
||||
requires: [clutter_pkg_deps, libmutter_cogl_name],
|
||||
version: meson.project_version(),
|
||||
variables: [
|
||||
'apiversion=' + libmutter_api_version,
|
||||
],
|
||||
install_dir: pcdir,
|
||||
)
|
||||
|
@@ -67,6 +67,23 @@ static const char *clutter_input_axis_atom_names[] = {
|
||||
|
||||
#define N_AXIS_ATOMS G_N_ELEMENTS (clutter_input_axis_atom_names)
|
||||
|
||||
static const char *wacom_type_atoms[] = {
|
||||
"STYLUS",
|
||||
"CURSOR",
|
||||
"ERASER",
|
||||
"PAD",
|
||||
"TOUCH"
|
||||
};
|
||||
#define N_WACOM_TYPE_ATOMS G_N_ELEMENTS (wacom_type_atoms)
|
||||
|
||||
enum {
|
||||
WACOM_TYPE_STYLUS,
|
||||
WACOM_TYPE_CURSOR,
|
||||
WACOM_TYPE_ERASER,
|
||||
WACOM_TYPE_PAD,
|
||||
WACOM_TYPE_TOUCH,
|
||||
};
|
||||
|
||||
enum {
|
||||
PAD_AXIS_FIRST = 3, /* First axes are always x/y/pressure, ignored in pads */
|
||||
PAD_AXIS_STRIP1 = PAD_AXIS_FIRST,
|
||||
@@ -394,6 +411,86 @@ get_pad_features (XIDeviceInfo *info,
|
||||
*n_strips = strips;
|
||||
}
|
||||
|
||||
/* The Wacom driver exports the tool type as property. Use that over
|
||||
guessing based on the device name */
|
||||
static gboolean
|
||||
guess_source_from_wacom_type (ClutterBackendX11 *backend_x11,
|
||||
XIDeviceInfo *info,
|
||||
ClutterInputDeviceType *source_out)
|
||||
{
|
||||
gulong nitems, bytes_after;
|
||||
guint32 *data = NULL;
|
||||
int rc, format;
|
||||
Atom type;
|
||||
Atom prop;
|
||||
Atom device_type;
|
||||
Atom types[N_WACOM_TYPE_ATOMS];
|
||||
|
||||
prop = XInternAtom (backend_x11->xdpy, "Wacom Tool Type", True);
|
||||
if (prop == None)
|
||||
return FALSE;
|
||||
|
||||
clutter_x11_trap_x_errors ();
|
||||
rc = XIGetProperty (backend_x11->xdpy,
|
||||
info->deviceid,
|
||||
prop,
|
||||
0, 1, False, XA_ATOM, &type, &format, &nitems, &bytes_after,
|
||||
(guchar **) &data);
|
||||
clutter_x11_untrap_x_errors ();
|
||||
|
||||
|
||||
if (rc != Success || type != XA_ATOM || format != 32 || nitems != 1)
|
||||
{
|
||||
XFree (data);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
device_type = *data;
|
||||
XFree (data);
|
||||
|
||||
if (device_type == 0)
|
||||
return FALSE;
|
||||
|
||||
rc = XInternAtoms (backend_x11->xdpy,
|
||||
(char **)wacom_type_atoms,
|
||||
N_WACOM_TYPE_ATOMS,
|
||||
False,
|
||||
types);
|
||||
if (rc == 0)
|
||||
return FALSE;
|
||||
|
||||
if (device_type == types[WACOM_TYPE_STYLUS])
|
||||
{
|
||||
*source_out = CLUTTER_PEN_DEVICE;
|
||||
}
|
||||
else if (device_type == types[WACOM_TYPE_CURSOR])
|
||||
{
|
||||
*source_out = CLUTTER_CURSOR_DEVICE;
|
||||
}
|
||||
else if (device_type == types[WACOM_TYPE_ERASER])
|
||||
{
|
||||
*source_out = CLUTTER_ERASER_DEVICE;
|
||||
}
|
||||
else if (device_type == types[WACOM_TYPE_PAD])
|
||||
{
|
||||
*source_out = CLUTTER_PAD_DEVICE;
|
||||
}
|
||||
else if (device_type == types[WACOM_TYPE_TOUCH])
|
||||
{
|
||||
guint num_touches = 0;
|
||||
|
||||
if (!is_touch_device (info->classes, info->num_classes,
|
||||
source_out, &num_touches))
|
||||
*source_out = CLUTTER_TOUCHSCREEN_DEVICE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static ClutterInputDevice *
|
||||
create_device (ClutterDeviceManagerXI2 *manager_xi2,
|
||||
ClutterBackendX11 *backend_x11,
|
||||
@@ -421,7 +518,7 @@ create_device (ClutterDeviceManagerXI2 *manager_xi2,
|
||||
{
|
||||
source = touch_source;
|
||||
}
|
||||
else
|
||||
else if (!guess_source_from_wacom_type (backend_x11, info, &source))
|
||||
{
|
||||
gchar *name;
|
||||
|
||||
|
@@ -180,6 +180,56 @@ clutter_input_device_xi2_is_mode_switch_button (ClutterInputDevice *device,
|
||||
return button_group == (int) group;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
clutter_input_device_xi2_get_physical_size (ClutterInputDevice *device,
|
||||
gdouble *width,
|
||||
gdouble *height)
|
||||
{
|
||||
Display *xdisplay;
|
||||
XIDeviceInfo *dev_info;
|
||||
gdouble w = 0, h = 0;
|
||||
int i, n_info, device_id;
|
||||
|
||||
xdisplay = clutter_x11_get_default_display ();
|
||||
device_id = clutter_input_device_get_device_id (device);
|
||||
|
||||
clutter_x11_trap_x_errors ();
|
||||
dev_info = XIQueryDevice (xdisplay, device_id, &n_info);
|
||||
if (clutter_x11_untrap_x_errors ())
|
||||
return FALSE;
|
||||
|
||||
if (!dev_info)
|
||||
return FALSE;
|
||||
|
||||
for (i = 0; i < dev_info->num_classes; i++)
|
||||
{
|
||||
XIValuatorClassInfo *valuator;
|
||||
gdouble *value;
|
||||
|
||||
if (dev_info->classes[i]->type != XIValuatorClass)
|
||||
continue;
|
||||
|
||||
valuator = (XIValuatorClassInfo *) dev_info->classes[i];
|
||||
|
||||
if (valuator->label == XInternAtom (xdisplay, "Abs X", True) ||
|
||||
valuator->label == XInternAtom (xdisplay, "Abs MT Position X", True))
|
||||
value = &w;
|
||||
else if (valuator->label == XInternAtom (xdisplay, "Abs Y", True) ||
|
||||
valuator->label == XInternAtom (xdisplay, "Abs MT Position Y", True))
|
||||
value = &h;
|
||||
else
|
||||
continue;
|
||||
|
||||
*value = (valuator->max - valuator->min) * 1000 / valuator->resolution;
|
||||
}
|
||||
|
||||
XIFreeDeviceInfo (dev_info);
|
||||
*width = w;
|
||||
*height = h;
|
||||
|
||||
return (w > 0 && h > 0);
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_input_device_xi2_class_init (ClutterInputDeviceXI2Class *klass)
|
||||
{
|
||||
@@ -193,6 +243,7 @@ clutter_input_device_xi2_class_init (ClutterInputDeviceXI2Class *klass)
|
||||
device_class->is_grouped = clutter_input_device_xi2_is_grouped;
|
||||
device_class->get_group_n_modes = clutter_input_device_xi2_get_group_n_modes;
|
||||
device_class->is_mode_switch_button = clutter_input_device_xi2_is_mode_switch_button;
|
||||
device_class->get_physical_size = clutter_input_device_xi2_get_physical_size;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@@ -76,6 +76,9 @@ struct _ClutterKeymapX11
|
||||
DirectionCacheEntry group_direction_cache[4];
|
||||
int current_group;
|
||||
|
||||
GHashTable *reserved_keycodes;
|
||||
GQueue *available_keycodes;
|
||||
|
||||
guint caps_lock_state : 1;
|
||||
guint num_lock_state : 1;
|
||||
guint has_direction : 1;
|
||||
@@ -422,15 +425,97 @@ clutter_keymap_x11_set_property (GObject *gobject,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_keymap_x11_refresh_reserved_keycodes (ClutterKeymapX11 *keymap_x11)
|
||||
{
|
||||
Display *dpy = clutter_x11_get_default_display ();
|
||||
GHashTableIter iter;
|
||||
gpointer key, value;
|
||||
|
||||
g_hash_table_iter_init (&iter, keymap_x11->reserved_keycodes);
|
||||
while (g_hash_table_iter_next (&iter, &key, &value))
|
||||
{
|
||||
guint reserved_keycode = GPOINTER_TO_UINT (key);
|
||||
guint reserved_keysym = GPOINTER_TO_UINT (value);
|
||||
guint actual_keysym = XkbKeycodeToKeysym (dpy, reserved_keycode, 0, 0);
|
||||
|
||||
/* If an available keycode is no longer mapped to the stored keysym, then
|
||||
* the keycode should not be considered available anymore and should be
|
||||
* removed both from the list of available and reserved keycodes.
|
||||
*/
|
||||
if (reserved_keysym != actual_keysym)
|
||||
{
|
||||
g_hash_table_iter_remove (&iter);
|
||||
g_queue_remove (keymap_x11->available_keycodes, key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
clutter_keymap_x11_replace_keycode (ClutterKeymapX11 *keymap_x11,
|
||||
KeyCode keycode,
|
||||
KeySym keysym)
|
||||
{
|
||||
if (CLUTTER_BACKEND_X11 (keymap_x11->backend)->use_xkb)
|
||||
{
|
||||
Display *dpy = clutter_x11_get_default_display ();
|
||||
XkbDescPtr xkb = get_xkb (keymap_x11);
|
||||
XkbMapChangesRec changes;
|
||||
|
||||
XFlush (dpy);
|
||||
|
||||
xkb->device_spec = XkbUseCoreKbd;
|
||||
memset (&changes, 0, sizeof(changes));
|
||||
|
||||
if (keysym != NoSymbol)
|
||||
{
|
||||
int types[XkbNumKbdGroups] = { XkbOneLevelIndex };
|
||||
XkbChangeTypesOfKey (xkb, keycode, 1, XkbGroup1Mask, types, &changes);
|
||||
XkbKeySymEntry (xkb, keycode, 0, 0) = keysym;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Reset to NoSymbol */
|
||||
XkbChangeTypesOfKey (xkb, keycode, 0, XkbGroup1Mask, NULL, &changes);
|
||||
}
|
||||
|
||||
changes.changed = XkbKeySymsMask | XkbKeyTypesMask;
|
||||
changes.first_key_sym = keycode;
|
||||
changes.num_key_syms = 1;
|
||||
changes.first_type = 0;
|
||||
changes.num_types = xkb->map->num_types;
|
||||
XkbChangeMap (dpy, xkb, &changes);
|
||||
|
||||
XFlush (dpy);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_keymap_x11_finalize (GObject *gobject)
|
||||
{
|
||||
ClutterKeymapX11 *keymap;
|
||||
ClutterEventTranslator *translator;
|
||||
GHashTableIter iter;
|
||||
gpointer key, value;
|
||||
|
||||
keymap = CLUTTER_KEYMAP_X11 (gobject);
|
||||
translator = CLUTTER_EVENT_TRANSLATOR (keymap);
|
||||
|
||||
clutter_keymap_x11_refresh_reserved_keycodes (keymap);
|
||||
g_hash_table_iter_init (&iter, keymap->reserved_keycodes);
|
||||
while (g_hash_table_iter_next (&iter, &key, &value))
|
||||
{
|
||||
guint keycode = GPOINTER_TO_UINT (key);
|
||||
clutter_keymap_x11_replace_keycode (keymap, keycode, NoSymbol);
|
||||
}
|
||||
|
||||
g_hash_table_destroy (keymap->reserved_keycodes);
|
||||
g_queue_free (keymap->available_keycodes);
|
||||
|
||||
_clutter_backend_remove_event_translator (keymap->backend, translator);
|
||||
|
||||
if (keymap->xkb_desc != NULL)
|
||||
@@ -462,6 +547,8 @@ clutter_keymap_x11_init (ClutterKeymapX11 *keymap)
|
||||
{
|
||||
keymap->current_direction = PANGO_DIRECTION_NEUTRAL;
|
||||
keymap->current_group = -1;
|
||||
keymap->reserved_keycodes = g_hash_table_new (NULL, NULL);
|
||||
keymap->available_keycodes = g_queue_new ();
|
||||
}
|
||||
|
||||
static ClutterTranslateReturn
|
||||
@@ -731,6 +818,72 @@ clutter_keymap_x11_get_entries_for_keyval (ClutterKeymapX11 *keymap_x11,
|
||||
}
|
||||
}
|
||||
|
||||
static guint
|
||||
clutter_keymap_x11_get_available_keycode (ClutterKeymapX11 *keymap_x11)
|
||||
{
|
||||
if (CLUTTER_BACKEND_X11 (keymap_x11->backend)->use_xkb)
|
||||
{
|
||||
clutter_keymap_x11_refresh_reserved_keycodes (keymap_x11);
|
||||
|
||||
if (g_hash_table_size (keymap_x11->reserved_keycodes) < 5)
|
||||
{
|
||||
Display *dpy = clutter_x11_get_default_display ();
|
||||
XkbDescPtr xkb = get_xkb (keymap_x11);
|
||||
guint i;
|
||||
|
||||
for (i = xkb->max_key_code; i >= xkb->min_key_code; --i)
|
||||
{
|
||||
if (XkbKeycodeToKeysym (dpy, i, 0, 0) == NoSymbol)
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
return GPOINTER_TO_UINT (g_queue_pop_head (keymap_x11->available_keycodes));
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
gboolean clutter_keymap_x11_reserve_keycode (ClutterKeymapX11 *keymap_x11,
|
||||
guint keyval,
|
||||
guint *keycode_out)
|
||||
{
|
||||
g_return_val_if_fail (CLUTTER_IS_KEYMAP_X11 (keymap_x11), FALSE);
|
||||
g_return_val_if_fail (keyval != 0, FALSE);
|
||||
g_return_val_if_fail (keycode_out != NULL, FALSE);
|
||||
|
||||
*keycode_out = clutter_keymap_x11_get_available_keycode (keymap_x11);
|
||||
|
||||
if (*keycode_out == NoSymbol)
|
||||
{
|
||||
g_warning ("Cannot reserve a keycode for keyval %d: no available keycode", keyval);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!clutter_keymap_x11_replace_keycode (keymap_x11, *keycode_out, keyval))
|
||||
{
|
||||
g_warning ("Failed to remap keycode %d to keyval %d", *keycode_out, keyval);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
g_hash_table_insert (keymap_x11->reserved_keycodes, GUINT_TO_POINTER (*keycode_out), GUINT_TO_POINTER (keyval));
|
||||
g_queue_remove (keymap_x11->available_keycodes, GUINT_TO_POINTER (*keycode_out));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void clutter_keymap_x11_release_keycode_if_needed (ClutterKeymapX11 *keymap_x11,
|
||||
guint keycode)
|
||||
{
|
||||
g_return_if_fail (CLUTTER_IS_KEYMAP_X11 (keymap_x11));
|
||||
|
||||
if (!g_hash_table_contains (keymap_x11->reserved_keycodes, GUINT_TO_POINTER (keycode)) ||
|
||||
g_queue_index (keymap_x11->available_keycodes, GUINT_TO_POINTER (keycode)) != -1)
|
||||
return;
|
||||
|
||||
g_queue_push_tail (keymap_x11->available_keycodes, GUINT_TO_POINTER (keycode));
|
||||
}
|
||||
|
||||
void
|
||||
clutter_keymap_x11_latch_modifiers (ClutterKeymapX11 *keymap_x11,
|
||||
uint32_t level,
|
||||
|
@@ -58,7 +58,11 @@ gboolean clutter_keymap_x11_keycode_for_keyval (ClutterKeymapX11 *keymap_x11,
|
||||
void clutter_keymap_x11_latch_modifiers (ClutterKeymapX11 *keymap_x11,
|
||||
uint32_t level,
|
||||
gboolean enable);
|
||||
|
||||
gboolean clutter_keymap_x11_reserve_keycode (ClutterKeymapX11 *keymap_x11,
|
||||
guint keyval,
|
||||
guint *keycode_out);
|
||||
void clutter_keymap_x11_release_keycode_if_needed (ClutterKeymapX11 *keymap_x11,
|
||||
guint keycode);
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __CLUTTER_KEYMAP_X11_H__ */
|
||||
|
@@ -631,8 +631,6 @@ clutter_stage_x11_realize (ClutterStageWindow *stage_window)
|
||||
|
||||
stage_x11->onscreen = cogl_onscreen_new (backend->cogl_context, width, height);
|
||||
|
||||
cogl_onscreen_set_swap_throttled (stage_x11->onscreen,
|
||||
_clutter_get_sync_to_vblank ());
|
||||
stage_x11->frame_closure =
|
||||
cogl_onscreen_add_frame_callback (stage_x11->onscreen,
|
||||
frame_cb,
|
||||
|
@@ -141,8 +141,13 @@ clutter_virtual_input_device_x11_notify_keyval (ClutterVirtualInputDevice *virtu
|
||||
|
||||
if (!clutter_keymap_x11_keycode_for_keyval (keymap, keyval, &keycode, &level))
|
||||
{
|
||||
g_warning ("No keycode found for keyval %x in current group", keyval);
|
||||
return;
|
||||
level = 0;
|
||||
|
||||
if (!clutter_keymap_x11_reserve_keycode (keymap, keyval, &keycode))
|
||||
{
|
||||
g_warning ("No keycode found for keyval %x in current group", keyval);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!_clutter_keymap_x11_get_is_modifier (keymap, keycode) &&
|
||||
@@ -153,9 +158,13 @@ clutter_virtual_input_device_x11_notify_keyval (ClutterVirtualInputDevice *virtu
|
||||
(KeyCode) keycode,
|
||||
key_state == CLUTTER_KEY_STATE_PRESSED, 0);
|
||||
|
||||
if (!_clutter_keymap_x11_get_is_modifier (keymap, keycode) &&
|
||||
key_state == CLUTTER_KEY_STATE_RELEASED)
|
||||
clutter_keymap_x11_latch_modifiers (keymap, level, FALSE);
|
||||
|
||||
if (key_state == CLUTTER_KEY_STATE_RELEASED)
|
||||
{
|
||||
if (!_clutter_keymap_x11_get_is_modifier (keymap, keycode))
|
||||
clutter_keymap_x11_latch_modifiers (keymap, level, FALSE);
|
||||
clutter_keymap_x11_release_keycode_if_needed (keymap, keycode);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
@@ -1,705 +0,0 @@
|
||||
AC_PREREQ([2.63])
|
||||
|
||||
AC_INIT([clutter],
|
||||
[0.1],
|
||||
[http://bugzilla.gnome.org/enter_bug.cgi?product=clutter],
|
||||
[clutter],
|
||||
[http://www.clutter-project.org])
|
||||
|
||||
AC_CONFIG_SRCDIR([clutter/clutter.h])
|
||||
AC_CONFIG_HEADERS([clutter/clutter-build-config.h])
|
||||
AC_CONFIG_AUX_DIR([build])
|
||||
AC_CONFIG_MACRO_DIR([build/autotools])
|
||||
|
||||
AM_INIT_AUTOMAKE([1.11 foreign -Wno-portability no-define no-dist-gzip dist-xz tar-ustar])
|
||||
AM_SILENT_RULES([yes])
|
||||
|
||||
dnl = Check that we are configured by mutter ==============================
|
||||
|
||||
AC_ARG_VAR([MUTTER_VERSION])
|
||||
AC_ARG_VAR([LIBMUTTER_API_VERSION])
|
||||
|
||||
AS_IF([test "x$MUTTER_VERSION" = "x"],
|
||||
[AC_MSG_ERROR([Clutter can only be configured by mutter])],)
|
||||
|
||||
AC_DEFINE_UNQUOTED(MUTTER_VERSION, "$MUTTER_VERSION", [Mutter version])
|
||||
|
||||
AC_PROG_SED
|
||||
|
||||
dnl = Preliminary platform checks =============================================
|
||||
|
||||
AC_CANONICAL_HOST
|
||||
AC_CACHE_SAVE
|
||||
|
||||
dnl = Dependencies =========================================================
|
||||
|
||||
# Checks for programs.
|
||||
AM_PROG_CC_C_O
|
||||
|
||||
# require libtool >= 2.2
|
||||
LT_PREREQ([2.2.6])
|
||||
LT_INIT([disable-static])
|
||||
LT_LIB_M
|
||||
|
||||
# Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
|
||||
# required versions for dependencies
|
||||
m4_define([glib_req_version], [2.53.2])
|
||||
m4_define([cogl_req_version], [1.21.2])
|
||||
m4_define([json_glib_req_version], [0.12.0])
|
||||
m4_define([atk_req_version], [2.5.3])
|
||||
m4_define([cairo_req_version], [1.14.0])
|
||||
m4_define([pango_req_version], [1.30])
|
||||
m4_define([gi_req_version], [1.39.0])
|
||||
m4_define([xcomposite_req_version], [0.4])
|
||||
m4_define([libinput_req_version], [1.4.0])
|
||||
m4_define([libudev_req_version], [136])
|
||||
m4_define([libwacom_req_version], [0.13])
|
||||
|
||||
AC_SUBST([GLIB_REQ_VERSION], [glib_req_version])
|
||||
AC_SUBST([COGL_REQ_VERSION], [cogl_req_version])
|
||||
AC_SUBST([JSON_GLIB_REQ_VERSION], [json_glib_req_version])
|
||||
AC_SUBST([ATK_REQ_VERSION], [atk_req_version])
|
||||
AC_SUBST([CAIRO_REQ_VERSION], [cairo_req_version])
|
||||
AC_SUBST([PANGO_REQ_VERSION], [pango_req_version])
|
||||
AC_SUBST([GI_REQ_VERSION], [gi_req_version])
|
||||
AC_SUBST([XCOMPOSITE_REQ_VERSION], [xcomposite_req_version])
|
||||
AC_SUBST([LIBINPUT_REQ_VERSION], [libinput_req_version])
|
||||
AC_SUBST([LIBUDEV_REQ_VERSION], [libudev_req_version])
|
||||
AC_SUBST([LIBWACOM_REQ_VERSION], [libwacom_req_version])
|
||||
|
||||
# Checks for typedefs, structures, and compiler characteristics.
|
||||
AM_PATH_GLIB_2_0([glib_req_version],
|
||||
[],
|
||||
[AC_MSG_ERROR([glib-2.0 is required])],
|
||||
[gobject gio gthread gmodule-no-export])
|
||||
|
||||
# Check for -Bsymbolic-functions to avoid intra-library PLT jumps
|
||||
AC_ARG_ENABLE([Bsymbolic],
|
||||
[AS_HELP_STRING([--disable-Bsymbolic],
|
||||
[Avoid linking with -Bsymbolic])],
|
||||
[],
|
||||
[
|
||||
saved_LDFLAGS="${LDFLAGS}"
|
||||
AC_MSG_CHECKING([for -Bsymbolic-functions linker flag])
|
||||
LDFLAGS=-Wl,-Bsymbolic-functions
|
||||
AC_TRY_LINK([], [return 0],
|
||||
[
|
||||
AC_MSG_RESULT([yes])
|
||||
enable_Bsymbolic=yes
|
||||
],
|
||||
[
|
||||
AC_MSG_RESULT([no])
|
||||
enable_Bsymbolic=no
|
||||
])
|
||||
LDFLAGS="${saved_LDFLAGS}"
|
||||
])
|
||||
|
||||
AS_IF([test "x$enable_Bsymbolic" = "xyes"], [CLUTTER_LINK_FLAGS=-Wl[,]-Bsymbolic-functions])
|
||||
AC_SUBST(CLUTTER_LINK_FLAGS)
|
||||
|
||||
AC_CACHE_SAVE
|
||||
|
||||
dnl ========================================================================
|
||||
|
||||
FLAVOUR_LIBS=""
|
||||
FLAVOUR_CFLAGS=""
|
||||
CLUTTER_BACKENDS=""
|
||||
CLUTTER_INPUT_BACKENDS=""
|
||||
CLUTTER_CONFIG_DEFINES=
|
||||
|
||||
# base dependencies for core
|
||||
CLUTTER_BASE_PC_FILES="cairo-gobject >= $CAIRO_REQ_VERSION gio-2.0 >= glib_req_version atk >= $ATK_REQ_VERSION pangocairo >= $PANGO_REQ_VERSION json-glib-1.0 >= $JSON_GLIB_REQ_VERSION"
|
||||
|
||||
# private base dependencies
|
||||
CLUTTER_BASE_PC_FILES_PRIVATE=""
|
||||
|
||||
# backend specific pkg-config files
|
||||
BACKEND_PC_FILES=""
|
||||
|
||||
# private backend specific dependencies
|
||||
BACKEND_PC_FILES_PRIVATE=""
|
||||
|
||||
dnl === Clutter windowing system backend ======================================
|
||||
|
||||
CLUTTER_BACKENDS="$CLUTTER_BACKENDS x11"
|
||||
CLUTTER_INPUT_BACKENDS="$CLUTTER_INPUT_BACKENDS x11"
|
||||
|
||||
SUPPORT_X11=1
|
||||
SUPPORT_GLX=1
|
||||
SUPPORT_COGL=1
|
||||
|
||||
# we use fontconfig API and pango-ft2 when the fontconfig
|
||||
# configuration changes; we don't expose any API for this
|
||||
# so we add pango-ft2 to the private Requires.
|
||||
PKG_CHECK_EXISTS([pangoft2],
|
||||
[
|
||||
AC_DEFINE([HAVE_PANGO_FT2], [1], [Supports PangoFt2])
|
||||
BACKEND_PC_FILES_PRIVATE="$BACKEND_PC_FILES_PRIVATE pangoft2"
|
||||
],
|
||||
[])
|
||||
|
||||
AC_ARG_ENABLE(
|
||||
[wayland-egl-server],
|
||||
[AC_HELP_STRING([--enable-wayland-egl-server=@<:@no/yes@:>@], [Enable server side wayland support @<:@default=no@:>@])],
|
||||
[],
|
||||
enable_wayland_egl_server=yes
|
||||
)
|
||||
|
||||
AS_IF([test "x$enable_wayland_egl_server" = "xyes"],
|
||||
[
|
||||
CLUTTER_BACKENDS="$CLUTTER_BACKENDS egl"
|
||||
SUPPORT_EGL=1
|
||||
|
||||
BACKEND_PC_FILES="$BACKEND_PC_FILES wayland-egl wayland-server"
|
||||
|
||||
SUPPORT_WAYLAND_COMPOSITOR=1
|
||||
CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
|
||||
#define CLUTTER_HAS_WAYLAND_COMPOSITOR_SUPPORT 1"
|
||||
|
||||
CLUTTER_INPUT_BACKENDS="$CLUTTER_INPUT_BACKENDS evdev"
|
||||
|
||||
SUPPORT_EVDEV=1
|
||||
BACKEND_PC_FILES_PRIVATE="$BACKEND_PC_FILES_PRIVATE libudev >= $LIBUDEV_REQ_VERSION libinput >= $LIBINPUT_REQ_VERSION xkbcommon"
|
||||
AC_DEFINE([HAVE_EVDEV], [1], [Have evdev support for input handling])
|
||||
])
|
||||
|
||||
AM_CONDITIONAL(SUPPORT_WAYLAND, [test "x$enable_wayland_egl_server" = "xyes"])
|
||||
|
||||
AC_DEFINE_UNQUOTED([CLUTTER_DRIVERS], ["*"], [List of Cogl drivers])
|
||||
|
||||
dnl strip leading spaces
|
||||
CLUTTER_BACKENDS=${CLUTTER_BACKENDS#* }
|
||||
AC_SUBST(CLUTTER_BACKENDS)
|
||||
|
||||
CLUTTER_INPUT_BACKENDS=${CLUTTER_INPUT_BACKENDS#* }
|
||||
AC_SUBST(CLUTTER_INPUT_BACKENDS)
|
||||
|
||||
AC_CACHE_SAVE
|
||||
|
||||
dnl === Clutter configuration =================================================
|
||||
|
||||
# windowing systems
|
||||
AS_IF([test "x$SUPPORT_X11" = "x1"],
|
||||
[CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
|
||||
#define CLUTTER_WINDOWING_X11 \"x11\"
|
||||
#define CLUTTER_INPUT_X11 \"x11\""])
|
||||
AS_IF([test "x$SUPPORT_GLX" = "x1"],
|
||||
[CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
|
||||
#define CLUTTER_WINDOWING_GLX \"glx\""])
|
||||
AS_IF([test "x$SUPPORT_EGL" = "x1"],
|
||||
[CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
|
||||
#define CLUTTER_WINDOWING_EGL \"eglnative\""])
|
||||
AS_IF([test "x$SUPPORT_EVDEV" = "x1"],
|
||||
[CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
|
||||
#define CLUTTER_INPUT_EVDEV \"evdev\""])
|
||||
|
||||
# the 'null' input backend is special
|
||||
CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
|
||||
#define CLUTTER_INPUT_NULL \"null\""
|
||||
|
||||
AC_SUBST([CLUTTER_CONFIG_DEFINES])
|
||||
|
||||
dnl === Clutter substitutions kept for backwards compatibility ================
|
||||
AC_SUBST([CLUTTER_WINSYS], [deprecated])
|
||||
AC_SUBST([CLUTTER_WINSYS_BASE], [deprecated])
|
||||
AC_SUBST([CLUTTER_STAGE_TYPE], [deprecated])
|
||||
AC_SUBST([CLUTTER_SONAME_INFIX], [deprecated])
|
||||
AC_SUBST([CLUTTER_FLAVOUR], [deprecated])
|
||||
AC_SUBST([CLUTTER_COGL], [deprecated])
|
||||
AC_SUBST([COGL_DRIVER], [deprecated])
|
||||
|
||||
dnl === X11 checks, only for X11-based backends ===============================
|
||||
X11_PC_FILES=""
|
||||
X11_EXTS=""
|
||||
x11_tests=no
|
||||
|
||||
AS_IF([test "x$SUPPORT_X11" = "x1"],
|
||||
[
|
||||
# base X11 includes and libraries
|
||||
AC_MSG_CHECKING([for X11])
|
||||
|
||||
# start with pkg-config
|
||||
PKG_CHECK_EXISTS([x11], [have_x11=yes], [have_x11=no])
|
||||
AS_IF([test "x$have_x11" = "xyes"],
|
||||
[
|
||||
X11_PC_FILES="x11"
|
||||
|
||||
# we actually need to ask for CFLAGS and LIBS
|
||||
X11_CFLAGS=`$PKG_CONFIG --cflags $X11_PC_FILES`
|
||||
X11_LIBS=`$PKG_CONFIG --libs $X11_PC_FILES`
|
||||
|
||||
AC_MSG_RESULT([found])
|
||||
],
|
||||
[
|
||||
# no pkg-config, let's go old school
|
||||
AC_PATH_X
|
||||
|
||||
AS_IF([test "x$no_x" = "xyes"],
|
||||
[AC_MSG_ERROR([No X11 Libraries found])],
|
||||
[
|
||||
AS_IF([test "x$x_includes" != "xNONE" && test -n "$x_includes"],
|
||||
[X11_CFLAGS=-I`echo $x_includes | sed -e "s/:/ -I/g"`])
|
||||
|
||||
AS_IF([test "x$x_libraries" != "xNONE" && test -n "$x_libraries"],
|
||||
[X11_LIBS=-L`echo $x_libraries | sed -e "s/:/ -L/g"`])
|
||||
|
||||
AC_MSG_RESULT([found])
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
|
||||
# XEXT (required)
|
||||
AC_MSG_CHECKING([for XEXT extension])
|
||||
PKG_CHECK_EXISTS([xext], [have_xext=yes], [have_xext=no])
|
||||
AS_IF([test "x$have_xext" = "xyes"],
|
||||
[
|
||||
AC_DEFINE(HAVE_XEXT, [1], [Define to 1 if we have the XEXT X extension])
|
||||
|
||||
X11_LIBS="$X11_LIBS -lXext"
|
||||
X11_PC_FILES="$X11_PC_FILES xext"
|
||||
X11_EXTS="$X11_EXTS xext"
|
||||
|
||||
AC_MSG_RESULT([found])
|
||||
],
|
||||
[AC_MSG_ERROR([Not found])]
|
||||
)
|
||||
|
||||
# XDAMAGE (required)
|
||||
AC_MSG_CHECKING([for XDAMAGE extension])
|
||||
PKG_CHECK_EXISTS([xdamage], [have_xdamage=yes], [have_xdamage=no])
|
||||
AS_IF([test "x$have_xdamage" = "xyes"],
|
||||
[
|
||||
AC_DEFINE(HAVE_XDAMAGE, [1], [Define to 1 if we have the XDAMAGE X extension])
|
||||
|
||||
X11_LIBS="$X11_LIBS -lXdamage"
|
||||
X11_PC_FILES="$X11_PC_FILES xdamage"
|
||||
X11_EXTS="$X11_EXTS xdamage"
|
||||
|
||||
AC_MSG_RESULT([found])
|
||||
],
|
||||
[AC_MSG_ERROR([not found])]
|
||||
)
|
||||
|
||||
# XCOMPOSITE (required)
|
||||
AC_MSG_CHECKING([for XCOMPOSITE extension >= $XCOMPOSITE_REQ_VERSION])
|
||||
PKG_CHECK_EXISTS([xcomposite >= $XCOMPOSITE_REQ_VERSION], [have_xcomposite=yes], [have_xcomposite=no])
|
||||
AS_IF([test "x$have_xcomposite" = "xyes"],
|
||||
[
|
||||
X11_LIBS="$X11_LIBS -lXcomposite"
|
||||
X11_PC_FILES="$X11_PC_FILES xcomposite >= $XCOMPOSITE_REQ_VERSION"
|
||||
X11_EXTS="$X11_EXTS xcomposite"
|
||||
|
||||
AC_MSG_RESULT([found])
|
||||
],
|
||||
[AC_MSG_ERROR([not found])]
|
||||
)
|
||||
|
||||
# XTEST (required)
|
||||
AC_MSG_CHECKING([for XTest extension])
|
||||
PKG_CHECK_EXISTS([xtst], [have_xtest=yes], [have_xtest=no])
|
||||
AS_IF([test "x$have_xtest" = "xyes"],
|
||||
[
|
||||
AC_DEFINE(HAVE_XTEST, [1], [Define to 1 if we have the XTest X extension])
|
||||
|
||||
X11_LIBS="$X11_LIBS -lXtst"
|
||||
X11_PC_FILES="$X11_PC_FILES xtst"
|
||||
X11_EXTS="$X11_EXTS xtst"
|
||||
|
||||
AC_MSG_RESULT([found])
|
||||
],
|
||||
[AC_MSG_ERROR([Not found])]
|
||||
)
|
||||
|
||||
# X Generic Extensions (optional)
|
||||
clutter_save_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $X11_CFLAGS"
|
||||
|
||||
clutter_save_LIBS="$LIBS"
|
||||
LIBS="$LIBS $X11_LIBS"
|
||||
|
||||
CPPFLAGS="$clutter_save_CPPFLAGS"
|
||||
LIBS="$clutter_save_LIBS"
|
||||
|
||||
PKG_CHECK_EXISTS([xi], [have_xinput=yes], AC_MSG_ERROR([XI support not found]))
|
||||
AC_CHECK_HEADERS([X11/extensions/XInput2.h],
|
||||
[],
|
||||
AC_MSG_ERROR([XI2 not found]))
|
||||
AC_CHECK_FUNC([XIAllowTouchEvents],
|
||||
[
|
||||
AC_CHECK_MEMBER([XIScrollClassInfo.number],
|
||||
[],
|
||||
AC_MSG_ERROR([XIScrollClasSInfo.number member missing in XI2]),
|
||||
[[#include <X11/extensions/XInput2.h>]])
|
||||
])
|
||||
LIBS="$clutter_save_LIBS"
|
||||
|
||||
X11_LIBS="$X11_LIBS $XINPUT_LIBS"
|
||||
X11_PC_FILES="$X11_PC_FILES xi"
|
||||
|
||||
AS_IF([test "x$have_xinput_2_2" = "xyes"],
|
||||
[X11_EXTS="$X11_EXTS xi2.2"],
|
||||
[X11_EXTS="$X11_EXTS xi2.0"])
|
||||
|
||||
# XKB
|
||||
clutter_save_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $X11_CFLAGS"
|
||||
|
||||
clutter_save_LIBS="$LIBS"
|
||||
LIBS="$LIBS $X11_LIBS"
|
||||
|
||||
AC_CHECK_FUNC([XkbQueryExtension],
|
||||
[],
|
||||
[AC_MSG_ERROR([XKB support not found])])
|
||||
|
||||
CPPFLAGS="$clutter_save_CPPFLAGS"
|
||||
LIBS="$clutter_save_LIBS"
|
||||
|
||||
x11_tests=yes
|
||||
BACKEND_PC_FILES="$BACKEND_PC_FILES $X11_PC_FILES"
|
||||
FLAVOUR_LIBS="$FLAVOUR_LIBS $X11_LIBS"
|
||||
FLAVOUR_CFLAGS="$FLAVOUR_CFLAGS $X11_CFLAGS"
|
||||
]
|
||||
)
|
||||
|
||||
AM_CONDITIONAL([BUILD_XI2], [test "x$have_xinput2" = "xyes"])
|
||||
AM_CONDITIONAL([X11_TESTS], [test "x$x11_tests" = "xyes"])
|
||||
|
||||
X11_EXTS=${X11_EXTS#* }
|
||||
|
||||
AC_CACHE_SAVE
|
||||
|
||||
dnl === Libwacom support for X11 ===============================================
|
||||
AC_ARG_WITH(libwacom,
|
||||
AC_HELP_STRING([--without-libwacom],
|
||||
[disable the use of libwacom for advanced tablet management]),,
|
||||
with_libwacom=auto)
|
||||
|
||||
have_libwacom=no
|
||||
AC_MSG_CHECKING([libwacom])
|
||||
if test x$with_libwacom = xno ; then
|
||||
AC_MSG_RESULT([disabled])
|
||||
else
|
||||
if $PKG_CONFIG --exists libwacom '>=' $LIBWACOM_REQ_VERSION; then
|
||||
have_libwacom=yes
|
||||
AC_MSG_RESULT(yes)
|
||||
PKG_CHECK_MODULES([LIBWACOM], [libwacom])
|
||||
AC_SUBST(LIBWACOM_CFLAGS)
|
||||
AC_SUBST(LIBWACOM_LIBS)
|
||||
AC_DEFINE([HAVE_LIBWACOM], 1, [Building with libwacom for advanced tablet management])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
if test x$with_libwacom = xyes ; then
|
||||
AC_MSG_ERROR([libwacom forced but not found])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl === Check for GDK-Pixbuf in tests =========================================
|
||||
|
||||
PKG_CHECK_MODULES([GDK_PIXBUF], [gdk-pixbuf-2.0])
|
||||
AC_SUBST(GDK_PIXBUF_CFLAGS)
|
||||
AC_SUBST(GDK_PIXBUF_LIBS)
|
||||
|
||||
dnl === Enable debug level ====================================================
|
||||
|
||||
m4_define([debug_default], [minimum])
|
||||
AC_ARG_ENABLE([debug],
|
||||
[AS_HELP_STRING([--enable-debug=@<:@no/minimum/yes@:>@],
|
||||
[Control Clutter debugging level @<:@default=]debug_default[@:>@])],
|
||||
[],
|
||||
[enable_debug=debug_default])
|
||||
|
||||
AS_CASE([$enable_debug],
|
||||
|
||||
[yes],
|
||||
[
|
||||
test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
|
||||
CLUTTER_DEBUG_CFLAGS="-DCLUTTER_ENABLE_DEBUG"
|
||||
],
|
||||
|
||||
[minimum],
|
||||
[CLUTTER_DEBUG_CFLAGS="-DG_DISABLE_CAST_CHECKS"],
|
||||
|
||||
[no],
|
||||
[CLUTTER_DEBUG_CFLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS"],
|
||||
|
||||
[AC_MSG_ERROR([Unknown argument for --enable-debug])]
|
||||
)
|
||||
|
||||
AC_SUBST(CLUTTER_DEBUG_CFLAGS)
|
||||
|
||||
dnl === Enable deprecation guards ==================================================
|
||||
|
||||
m4_define([deprecated_default],
|
||||
[yes])
|
||||
|
||||
AC_ARG_ENABLE([deprecated],
|
||||
[AS_HELP_STRING([--enable-deprecated=@<:@no/yes@:>@],
|
||||
[Whether deprecated symbols should be disabled when compiling Clutter @<:@default=]deprecated_default[@:>@])],
|
||||
[],
|
||||
[enable_deprecated=deprecated_default])
|
||||
|
||||
AS_CASE([$enable_deprecated],
|
||||
|
||||
[no],
|
||||
[
|
||||
CLUTTER_DEPRECATED_CFLAGS="-DG_DISABLE_SINGLE_INCLUDES -DCOGL_DISABLE_DEPRECATED"
|
||||
],
|
||||
|
||||
[yes],
|
||||
[
|
||||
CLUTTER_DEPRECATED_CFLAGS="-DGLIB_DISABLE_DEPRECATION_WARNINGS"
|
||||
],
|
||||
|
||||
[AC_MSG_ERROR([Unknown argument for --enable-deprecated])]
|
||||
)
|
||||
|
||||
AC_SUBST([CLUTTER_DEPRECATED_CFLAGS])
|
||||
|
||||
dnl === Enable strict compiler flags ==========================================
|
||||
|
||||
# use strict compiler flags only when building from git; the rules for
|
||||
# distcheck will take care of turning this on when making a release
|
||||
m4_define([maintainer_flags_default], [no])
|
||||
AC_ARG_ENABLE([maintainer-flags],
|
||||
[AS_HELP_STRING([--enable-maintainer-flags=@<:@no/yes/error@:>@],
|
||||
[Use strict compiler flags @<:@default=]maintainer_flags_default[@:>@])],
|
||||
[],
|
||||
[enable_maintainer_flags=maintainer_flags_default])
|
||||
|
||||
MAINTAINER_COMPILER_FLAGS="$MAINTAINER_COMPILER_FLAGS
|
||||
-Wall
|
||||
-Wcast-align
|
||||
-Wuninitialized
|
||||
-Wno-strict-aliasing
|
||||
-Wshadow"
|
||||
|
||||
AC_ARG_ENABLE([Werror],
|
||||
[AS_HELP_STRING([--disable-Werror], [Removes -Werror from compiler flags])],
|
||||
[],
|
||||
[enable_Werror=yes])
|
||||
|
||||
AS_IF([test "x$enable_Werror" = xyes], [
|
||||
MAINTAINER_COMPILER_FLAGS="$MAINTAINER_COMPILER_FLAGS
|
||||
-Werror=logical-op
|
||||
-Werror=pointer-arith
|
||||
-Werror=missing-declarations
|
||||
-Werror=redundant-decls
|
||||
-Werror=empty-body
|
||||
-Werror=format
|
||||
-Werror=format-security
|
||||
-Werror=format-nonliteral
|
||||
-Werror=init-self
|
||||
-Werror=declaration-after-statement
|
||||
-Werror=vla"
|
||||
])
|
||||
|
||||
AS_CASE([$enable_maintainer_flags],
|
||||
[yes],
|
||||
[
|
||||
AS_COMPILER_FLAGS([MAINTAINER_CFLAGS], [$MAINTAINER_COMPILER_FLAGS])
|
||||
],
|
||||
|
||||
[no],
|
||||
[
|
||||
],
|
||||
|
||||
[error],
|
||||
[
|
||||
MAINTAINER_COMPILER_FLAGS="$MAINTAINER_COMPILER_FLAGS -Werror"
|
||||
AS_COMPILER_FLAGS([MAINTAINER_CFLAGS], [$MAINTAINER_COMPILER_FLAGS])
|
||||
],
|
||||
|
||||
[*],
|
||||
[AC_MSG_ERROR([Invalid option for --enable-maintainer-flags])]
|
||||
)
|
||||
|
||||
# strip leading spaces
|
||||
MAINTAINER_CFLAGS=${MAINTAINER_CFLAGS#* }
|
||||
AC_SUBST(MAINTAINER_CFLAGS)
|
||||
|
||||
dnl === Dependencies, compiler flags and linker libraries =====================
|
||||
# strip leading space
|
||||
BACKEND_PC_FILES=${BACKEND_PC_FILES#* }
|
||||
|
||||
# public dependencies, will fill the Requires: field of clutter.pc
|
||||
CLUTTER_REQUIRES="$CLUTTER_BASE_PC_FILES $BACKEND_PC_FILES"
|
||||
PKG_CHECK_MODULES(CLUTTER_DEPS, [$CLUTTER_REQUIRES])
|
||||
|
||||
# private dependencies, will fill the Requires.private: field of clutter.pc
|
||||
AS_IF([test "x$CLUTTER_BASE_PC_FILES_PRIVATE" = "x" && test "x$BACKEND_PC_FILES_PRIVATE" = "x"],
|
||||
[
|
||||
CLUTTER_REQUIRES_PRIVATE=""
|
||||
CLUTTER_DEPS_PRIVATE_CFLAGS=""
|
||||
CLUTTER_DEPS_PRIVATE_LIBS=""
|
||||
],
|
||||
[
|
||||
CLUTTER_REQUIRES_PRIVATE="$CLUTTER_BASE_PC_FILES_PRIVATE $BACKEND_PC_FILES_PRIVATE"
|
||||
PKG_CHECK_MODULES(CLUTTER_DEPS_PRIVATE, [$CLUTTER_REQUIRES_PRIVATE])
|
||||
])
|
||||
|
||||
AC_SUBST(CLUTTER_REQUIRES)
|
||||
AC_SUBST(CLUTTER_REQUIRES_PRIVATE)
|
||||
|
||||
CLUTTER_CFLAGS="$FLAVOUR_CFLAGS $CLUTTER_DEPS_CFLAGS $CLUTTER_DEPS_PRIVATE_CFLAGS $GLIB_CFLAGS $LIBWACOM_CFLAGS"
|
||||
CLUTTER_LIBS="$FLAVOUR_LIBS $CLUTTER_DEPS_LIBS $CLUTTER_DEPS_PRIVATE_LIBS $GLIB_LIBS $LIBWACOM_LIBS"
|
||||
AC_SUBST(CLUTTER_CFLAGS)
|
||||
AC_SUBST(CLUTTER_LIBS)
|
||||
|
||||
dnl === Test coverage =========================================================
|
||||
|
||||
AC_ARG_ENABLE([gcov],
|
||||
[AS_HELP_STRING([--enable-gcov], [Enable gcov])],
|
||||
[use_gcov=$enableval],
|
||||
[use_gcov=no])
|
||||
|
||||
AS_IF([test "x$use_gcov" = "xyes"],
|
||||
[
|
||||
dnl we need gcc:
|
||||
AS_IF([test "$GCC" != "yes"], [AC_MSG_ERROR([GCC is required for --enable-gcov])])
|
||||
|
||||
dnl Check if ccache is being used
|
||||
AC_CHECK_PROG(SHTOOL, shtool, shtool)
|
||||
AS_CASE([`$SHTOOL path $CC`],
|
||||
[*ccache*], [gcc_ccache=yes],
|
||||
[gcc_ccache=no])
|
||||
|
||||
if test "$gcc_ccache" = "yes" && (test -z "$CCACHE_DISABLE" || test "$CCACHE_DISABLE" != "1"); then
|
||||
AC_MSG_ERROR([ccache must be disabled when --enable-gcov option is used. You can disable ccache by setting environment variable CCACHE_DISABLE=1.])
|
||||
fi
|
||||
|
||||
ltp_version_list="1.6 1.7 1.8 1.9 1.10"
|
||||
AC_CHECK_PROG(LTP, lcov, lcov)
|
||||
AC_CHECK_PROG(LTP_GENHTML, genhtml, genhtml)
|
||||
|
||||
if test "$LTP"; then
|
||||
AC_CACHE_CHECK([for ltp version], clutter_cv_ltp_version,
|
||||
[
|
||||
clutter_cv_ltp_version=invalid
|
||||
ltp_version=`$LTP -v 2>/dev/null | $SED -e 's/^.* //'`
|
||||
for ltp_check_version in $ltp_version_list; do
|
||||
if test "$ltp_version" = "$ltp_check_version"; then
|
||||
clutter_cv_ltp_version="$ltp_check_version (ok)"
|
||||
fi
|
||||
done
|
||||
])
|
||||
else
|
||||
ltp_msg="To enable code coverage reporting you must have one of the following LTP versions installed: $ltp_version_list"
|
||||
AC_MSG_ERROR([$ltp_msg])
|
||||
fi
|
||||
|
||||
case $clutter_cv_ltp_version in
|
||||
""|invalid[)]
|
||||
ltp_msg="You must have one of the following versions of LTP: $ltp_version_list (found: $ltp_version)."
|
||||
AC_MSG_ERROR([$ltp_msg])
|
||||
LTP="exit 0;"
|
||||
;;
|
||||
esac
|
||||
|
||||
if test -z "$LTP_GENHTML"; then
|
||||
AC_MSG_ERROR([Could not find genhtml from the LTP package])
|
||||
fi
|
||||
|
||||
dnl Remove all optimization flags from CFLAGS
|
||||
changequote({,})
|
||||
CFLAGS=`echo "$CFLAGS" | $SED -e 's/-O[0-9]*//g'`
|
||||
CLUTTER_CFLAGS=`echo "$CLUTTER_CFLAGS" | $SED -e 's/-O[0-9]*//g'`
|
||||
changequote([,])
|
||||
|
||||
dnl Define the special gcc flags
|
||||
CLUTTER_GCOV_CFLAGS="-O0 -fprofile-arcs -ftest-coverage"
|
||||
CLUTTER_GCOV_LDADD="-lgcov"
|
||||
|
||||
AC_SUBST(CLUTTER_GCOV_CFLAGS)
|
||||
AC_SUBST(CLUTTER_GCOV_LDADD)
|
||||
|
||||
CLUTTER_CFLAGS="$CLUTTER_CFLAGS $CLUTTER_GCOV_CFLAGS"
|
||||
CLUTTER_LIBS="$CLUTTER_LIBS $CLUTTER_GCOV_LDADD"
|
||||
])
|
||||
|
||||
AM_CONDITIONAL(ENABLE_GCOV, test "x$use_gcov" = "xyes")
|
||||
|
||||
dnl === GObject-Introspection check ===========================================
|
||||
|
||||
GOBJECT_INTROSPECTION_CHECK([gi_req_version])
|
||||
|
||||
dnl === Conformance test suite ================================================
|
||||
|
||||
GLIB_TESTS
|
||||
|
||||
dnl ===========================================================================
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
Makefile
|
||||
|
||||
build/Makefile
|
||||
build/autotools/Makefile
|
||||
|
||||
clutter/Makefile
|
||||
clutter/clutter-config.h
|
||||
clutter/mutter-clutter-$LIBMUTTER_API_VERSION.pc:clutter/mutter-clutter.pc.in
|
||||
|
||||
tests/Makefile
|
||||
tests/accessibility/Makefile
|
||||
tests/conform/Makefile
|
||||
tests/interactive/Makefile
|
||||
tests/interactive/wrapper.sh
|
||||
tests/micro-bench/Makefile
|
||||
tests/performance/Makefile
|
||||
])
|
||||
|
||||
AC_OUTPUT
|
||||
|
||||
dnl === Summary ===============================================================
|
||||
|
||||
echo ""
|
||||
echo "Clutter - $VERSION (${CLUTTER_RELEASE_STATUS})"
|
||||
|
||||
# Global flags
|
||||
echo ""
|
||||
echo " • Global:"
|
||||
echo " Prefix: ${prefix}"
|
||||
echo " Libdir: ${libdir}"
|
||||
echo " Sysconfdir: ${sysconfdir}"
|
||||
|
||||
# Compiler/Debug related flags
|
||||
echo ""
|
||||
echo " • Compiler options:"
|
||||
echo " Clutter debug level: ${enable_debug}"
|
||||
echo " Compiler flags: ${CFLAGS} ${MAINTAINER_CFLAGS}"
|
||||
echo " Enable coverage tests: ${use_gcov}"
|
||||
echo " Enable deprecated symbols: ${enable_deprecated}"
|
||||
|
||||
# Miscellaneous
|
||||
echo ""
|
||||
echo " • Extra:"
|
||||
echo " Build introspection data: ${enable_introspection}"
|
||||
if test "x$x11_tests" = "xyes"; then
|
||||
echo " Build X11-specific tests: ${x11_tests}"
|
||||
fi
|
||||
if test "x$pixbuf_tests" = "xyes"; then
|
||||
echo " Build tests using GDK-Pixbuf: ${pixbuf_tests}"
|
||||
fi
|
||||
echo " Install test suites: ${enable_installed_tests}"
|
||||
|
||||
# Clutter backend related flags
|
||||
echo ""
|
||||
echo " • Clutter Backends:"
|
||||
echo " Windowing systems: ${CLUTTER_BACKENDS}"
|
||||
echo " Input backends: ${CLUTTER_INPUT_BACKENDS}"
|
||||
|
||||
if test "x$SUPPORT_X11" = "x1"; then
|
||||
echo ""
|
||||
echo " - X11 backend options:"
|
||||
echo " Enabled extensions: ${X11_EXTS}"
|
||||
fi
|
||||
|
||||
if test "x$SUPPORT_WAYLAND_COMPOSITOR" = "x1"; then
|
||||
echo ""
|
||||
echo " - Wayland compositor support enabled"
|
||||
fi
|
||||
|
||||
echo ""
|
@@ -1,3 +0,0 @@
|
||||
SUBDIRS = accessibility conform interactive micro-bench performance
|
||||
|
||||
EXTRA_DIST = README clutter-1.0.suppressions
|
@@ -1,37 +0,0 @@
|
||||
common_ldadd = \
|
||||
$(top_builddir)/clutter/libmutter-clutter-@LIBMUTTER_API_VERSION@.la
|
||||
|
||||
common_sources = \
|
||||
cally-examples-util.c \
|
||||
cally-examples-util.h
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-DPREFIXDIR=\"$(libdir)\" \
|
||||
-DCLUTTER_DISABLE_DEPRECATION_WARNINGS \
|
||||
-DGLIB_DISABLE_DEPRECATION_WARNINGS \
|
||||
-I$(top_srcdir)/../cogl \
|
||||
-I$(top_builddir)/../cogl \
|
||||
-I$(top_builddir)/../cogl/cogl \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_srcdir)/clutter \
|
||||
-I$(top_builddir)/clutter \
|
||||
-I$(top_srcdir)/tests/accessibility
|
||||
|
||||
AM_CFLAGS = $(CLUTTER_CFLAGS) $(MAINTAINER_CFLAGS)
|
||||
LDADD = $(common_ldadd) $(CLUTTER_LIBS)
|
||||
|
||||
check_PROGRAMS = \
|
||||
cally-atkcomponent-example \
|
||||
cally-atkeditabletext-example \
|
||||
cally-atkevents-example \
|
||||
cally-atktext-example \
|
||||
cally-clone-example
|
||||
|
||||
cally_atkcomponent_example_SOURCES = $(common_sources) cally-atkcomponent-example.c
|
||||
cally_atktext_example_SOURCES = $(common_sources) cally-atktext-example.c
|
||||
cally_atkevents_example_SOURCES = $(common_sources) cally-atkevents-example.c
|
||||
cally_atkeditabletext_example_SOURCES = $(common_sources) cally-atkeditabletext-example.c
|
||||
cally_clone_example_SOURCES = $(common_sources) cally-clone-example.c
|
||||
|
||||
DISTCLEANFILES =
|
@@ -1,97 +0,0 @@
|
||||
installed_test_metadir = $(datadir)/installed-tests/mutter-clutter
|
||||
installed_testdir = $(libexecdir)/installed-tests/mutter-clutter
|
||||
include $(top_srcdir)/build/autotools/glib-tap.mk
|
||||
|
||||
AM_CFLAGS = -g $(CLUTTER_CFLAGS) $(MAINTAINER_CFLAGS)
|
||||
LDADD = $(top_builddir)/../cogl/cogl/libmutter-cogl-@LIBMUTTER_API_VERSION@.la $(top_builddir)/clutter/libmutter-clutter-@LIBMUTTER_API_VERSION@.la $(CLUTTER_LIBS) $(LIBM)
|
||||
AM_LDFLAGS = -export-dynamic
|
||||
AM_CPPFLAGS = \
|
||||
-DG_LOG_DOMAIN=\"Clutter-Conform\" \
|
||||
-I$(top_srcdir)/../cogl \
|
||||
-I$(top_builddir)/../cogl \
|
||||
-I$(top_builddir)/../cogl/cogl \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_builddir) \
|
||||
-DCOGL_DISABLE_DEPRECATION_WARNINGS \
|
||||
$(CLUTTER_DEPRECATED_CFLAGS) \
|
||||
$(CLUTTER_DEBUG_CFLAGS)
|
||||
|
||||
# Basic actor API
|
||||
actor_tests = \
|
||||
actor-anchors \
|
||||
actor-destroy \
|
||||
actor-graph \
|
||||
actor-invariants \
|
||||
actor-iter \
|
||||
actor-layout \
|
||||
actor-meta \
|
||||
actor-offscreen-limit-max-size \
|
||||
actor-offscreen-redirect \
|
||||
actor-paint-opacity \
|
||||
actor-pick \
|
||||
actor-shader-effect \
|
||||
actor-size \
|
||||
$(NULL)
|
||||
|
||||
# Actor classes
|
||||
classes_tests = \
|
||||
text \
|
||||
$(NULL)
|
||||
|
||||
# General API
|
||||
general_tests = \
|
||||
binding-pool \
|
||||
color \
|
||||
interval \
|
||||
model \
|
||||
script-parser \
|
||||
units \
|
||||
$(NULL)
|
||||
|
||||
# Test for deprecated functionality
|
||||
deprecated_tests = \
|
||||
animator \
|
||||
behaviours \
|
||||
group \
|
||||
rectangle \
|
||||
texture \
|
||||
$(NULL)
|
||||
|
||||
test_programs = $(actor_tests) $(general_tests) $(classes_tests) $(deprecated_tests)
|
||||
|
||||
dist_test_data = $(script_ui_files)
|
||||
script_ui_files = $(addprefix scripts/,$(script_tests))
|
||||
script_tests = \
|
||||
test-animator-1.json \
|
||||
test-animator-2.json \
|
||||
test-animator-3.json \
|
||||
test-script-animation.json \
|
||||
test-script-child.json \
|
||||
test-script-implicit-alpha.json \
|
||||
test-script-interval.json \
|
||||
test-script-layout-property.json \
|
||||
test-script-margin.json \
|
||||
test-script-model.json \
|
||||
test-script-named-object.json \
|
||||
test-script-object-property.json \
|
||||
test-script-single.json \
|
||||
test-script-timeline-markers.json \
|
||||
test-state-1.json
|
||||
|
||||
TESTS_ENVIRONMENT += G_ENABLE_DIAGNOSTIC=0 CLUTTER_ENABLE_DIAGNOSTIC=0 CLUTTER_SCALE=1
|
||||
|
||||
# simple rules for generating a Git ignore file for the conformance test suite
|
||||
$(srcdir)/.gitignore: Makefile
|
||||
$(AM_V_GEN)( echo "/*.trs" ; \
|
||||
echo "/*.log" ; \
|
||||
echo "/*.test" ; \
|
||||
echo "/.gitignore" ; \
|
||||
for p in $(test_programs); do \
|
||||
echo "/$$p" ; \
|
||||
done ) > $(@F)
|
||||
|
||||
gitignore: $(srcdir)/.gitignore
|
||||
|
||||
all-am: gitignore
|
||||
|
||||
DISTCLEANFILES += .gitignore
|
@@ -407,8 +407,7 @@ test_scale_center (TestState *state)
|
||||
g_assert (scale_x == 4.0);
|
||||
g_assert (scale_y == 2.0);
|
||||
g_assert (gravity == CLUTTER_GRAVITY_NONE);
|
||||
assert_notifications (NOTIFY_SCALE_X | NOTIFY_SCALE_Y
|
||||
| NOTIFY_SCALE_CENTER_X | NOTIFY_SCALE_CENTER_Y
|
||||
assert_notifications (NOTIFY_SCALE_CENTER_X | NOTIFY_SCALE_CENTER_Y
|
||||
| NOTIFY_SCALE_GRAVITY);
|
||||
assert_coords (state, 100 + 10 - 10 * 4, 200 + 20 - 20 * 2,
|
||||
100 + 10 + (RECT_WIDTH - 10) * 4,
|
||||
|
@@ -230,13 +230,13 @@ paint_cb (ClutterStage *stage,
|
||||
gboolean *was_painted = data;
|
||||
|
||||
/* old shader effect */
|
||||
g_assert_cmpint (get_pixel (50, 50), ==, 0xff0000);
|
||||
g_assert_cmpint (get_pixel (0, 25), ==, 0xff0000);
|
||||
/* new shader effect */
|
||||
g_assert_cmpint (get_pixel (150, 50), ==, 0x00ffff);
|
||||
g_assert_cmpint (get_pixel (100, 25), ==, 0x00ffff);
|
||||
/* another new shader effect */
|
||||
g_assert_cmpint (get_pixel (250, 50), ==, 0xff00ff);
|
||||
g_assert_cmpint (get_pixel (200, 25), ==, 0xff00ff);
|
||||
/* new shader effect */
|
||||
g_assert_cmpint (get_pixel (350, 50), ==, 0x00ffff);
|
||||
g_assert_cmpint (get_pixel (300, 25), ==, 0x00ffff);
|
||||
|
||||
*was_painted = TRUE;
|
||||
}
|
||||
|
@@ -1,143 +0,0 @@
|
||||
UNIT_TESTS = \
|
||||
test-texture-slicing.c \
|
||||
test-texture-async.c \
|
||||
test-texture-material.c \
|
||||
test-events.c \
|
||||
test-scale.c \
|
||||
test-actors.c \
|
||||
test-shader-effects.c \
|
||||
test-script.c \
|
||||
test-grab.c \
|
||||
test-cogl-shader-glsl.c \
|
||||
test-animator.c \
|
||||
test-state.c \
|
||||
test-state-animator.c \
|
||||
test-fbo.c \
|
||||
test-multistage.c \
|
||||
test-cogl-tex-tile.c \
|
||||
test-cogl-tex-convert.c \
|
||||
test-cogl-tex-foreign.c \
|
||||
test-cogl-offscreen.c \
|
||||
test-cogl-tex-polygon.c \
|
||||
test-cogl-multitexture.c \
|
||||
test-stage-read-pixels.c \
|
||||
test-paint-wrapper.c \
|
||||
test-texture-quality.c \
|
||||
test-layout.c \
|
||||
test-animation.c \
|
||||
test-easing.c \
|
||||
test-binding-pool.c \
|
||||
test-text.c \
|
||||
test-text-field.c \
|
||||
test-cairo-clock.c \
|
||||
test-cairo-flowers.c \
|
||||
test-cogl-vertex-buffer.c \
|
||||
test-stage-sizing.c \
|
||||
test-scrolling.c \
|
||||
test-swipe-action.c \
|
||||
test-cogl-point-sprites.c \
|
||||
test-table-layout.c \
|
||||
test-path-constraint.c \
|
||||
test-state-script.c \
|
||||
test-devices.c \
|
||||
test-content.c \
|
||||
test-keyframe-transition.c \
|
||||
test-bind-constraint.c \
|
||||
test-touch-events.c \
|
||||
test-rotate-zoom.c \
|
||||
test-image.c
|
||||
|
||||
if X11_TESTS
|
||||
UNIT_TESTS += test-pixmap.c
|
||||
endif
|
||||
|
||||
SHEXT = $(EXEEXT)
|
||||
|
||||
# For convenience, this provides a way to easily run individual unit tests:
|
||||
wrappers: stamp-test-interactive
|
||||
@true
|
||||
|
||||
GIT_IGNORE_EXTRA = \
|
||||
stamp-test-interactive \
|
||||
stamp-test-unit-names \
|
||||
test-unit-names.h \
|
||||
$(UNIT_TESTS:.c=$(SHEXT))
|
||||
|
||||
stamp-test-interactive: Makefile
|
||||
@wrapper=$(abs_builddir)/wrapper.sh ; \
|
||||
chmod +x $$wrapper && \
|
||||
for i in $(UNIT_TESTS); \
|
||||
do \
|
||||
test_bin=$${i%*.c} ; \
|
||||
echo " GEN $$test_bin" ; \
|
||||
( echo "#!/bin/sh" ; \
|
||||
echo "$$wrapper $$test_bin \$$@" \
|
||||
) > $$test_bin$(SHEXT) ; \
|
||||
chmod +x $$test_bin$(SHEXT) ; \
|
||||
done \
|
||||
&& echo timestamp > $(@F)
|
||||
|
||||
test-unit-names.h: stamp-test-unit-names
|
||||
@true
|
||||
|
||||
stamp-test-unit-names: Makefile
|
||||
@( echo "/* ** This file is autogenerated. Do not edit. ** */" ; \
|
||||
echo "" ; \
|
||||
echo "const char *test_unit_names[] = {" ) > test-unit-names.h ; \
|
||||
for i in $(UNIT_TESTS); \
|
||||
do \
|
||||
test_bin=$${i%*.c} ; \
|
||||
echo " \"$$test_bin\"," >> test-unit-names.h ; \
|
||||
done \
|
||||
&& echo "};" >> test-unit-names.h \
|
||||
&& echo timestamp > $(@F)
|
||||
|
||||
clean-wrappers:
|
||||
@for i in $(UNIT_TESTS); \
|
||||
do \
|
||||
test_bin=$${i%*.c} ; \
|
||||
echo " RM $$test_bin"; \
|
||||
rm -f $$test_bin$(SHEXT); \
|
||||
done \
|
||||
&& rm -f stamp-test-unit-names \
|
||||
&& rm -f stamp-test-interactive
|
||||
|
||||
.PHONY: wrappers clean-wrappers
|
||||
|
||||
common_ldadd = \
|
||||
$(top_builddir)/clutter/libmutter-clutter-@LIBMUTTER_API_VERSION@.la \
|
||||
$(top_builddir)/../cogl/cogl/libmutter-cogl-@LIBMUTTER_API_VERSION@.la
|
||||
|
||||
check_PROGRAMS = test-interactive
|
||||
check_SCRIPTS = wrappers
|
||||
|
||||
test_interactive_SOURCES = test-main.c $(UNIT_TESTS)
|
||||
nodist_test_interactive_SOURCES = test-unit-names.h
|
||||
test_interactive_CFLAGS = $(CLUTTER_CFLAGS) $(GDK_PIXBUF_CFLAGS)
|
||||
test_interactive_CPPFLAGS = \
|
||||
-DTESTS_DATADIR=\""$(abs_srcdir)"\" \
|
||||
-DG_DISABLE_SINGLE_INCLUDES \
|
||||
-DGLIB_DISABLE_DEPRECATION_WARNINGS \
|
||||
-DCOGL_DISABLE_DEPRECATION_WARNINGS \
|
||||
-DCLUTTER_DISABLE_DEPRECATION_WARNINGS \
|
||||
-I$(top_srcdir)/../cogl \
|
||||
-I$(top_builddir)/../cogl \
|
||||
-I$(top_builddir)/../cogl/cogl \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_srcdir)/clutter \
|
||||
-I$(top_builddir)/clutter
|
||||
test_interactive_LDFLAGS = -export-dynamic
|
||||
test_interactive_LDADD = $(CLUTTER_LIBS) $(GDK_PIXBUF_LIBS) $(common_ldadd) $(LIBM)
|
||||
|
||||
EXTRA_DIST = \
|
||||
wrapper.sh.in \
|
||||
test-script.json \
|
||||
test-script-signals.json \
|
||||
redhand.png
|
||||
|
||||
DISTCLEANFILES = wrapper.sh .gitignore test-unit-names.h
|
||||
|
||||
BUILT_SOURCES = test-unit-names.h
|
||||
|
||||
clean-local: clean-wrappers
|
@@ -1,15 +1,14 @@
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
outputfile=$1
|
||||
shift
|
||||
test_source_files="$@"
|
||||
|
||||
echo '/* ** This file is autogenerated. Do not edit. ** */' > $outputfile
|
||||
echo '' >> $outputfile
|
||||
echo 'const char *test_unit_names[] = {' >> $outputfile
|
||||
echo '/* ** This file is autogenerated. Do not edit. ** */' > "$outputfile"
|
||||
echo '' >> "$outputfile"
|
||||
echo 'const char *test_unit_names[] = {' >> "$outputfile"
|
||||
|
||||
for test_source_file in $test_source_files; do
|
||||
echo " \"$(echo $test_source_file | sed 's/.*\(test-[a-z0-9\-]\+\)\.c/\1/')\"," >> $outputfile
|
||||
for test_source_file in "$@"; do
|
||||
echo " \"$(echo "$test_source_file" | sed 's/.*\(test-[a-z0-9\-]\+\)\.c/\1/')\"," >> "$outputfile"
|
||||
done
|
||||
|
||||
echo '};' >> $outputfile
|
||||
echo '};' >> "$outputfile"
|
||||
|
@@ -1,34 +0,0 @@
|
||||
common_ldadd = \
|
||||
$(top_builddir)/clutter/libmutter-clutter-@LIBMUTTER_API_VERSION@.la \
|
||||
$(top_builddir)/../cogl/cogl/libmutter-cogl-@LIBMUTTER_API_VERSION@.la
|
||||
|
||||
|
||||
check_PROGRAMS = \
|
||||
test-text \
|
||||
test-picking \
|
||||
test-text-perf \
|
||||
test-random-text \
|
||||
test-cogl-perf
|
||||
|
||||
AM_CFLAGS = $(CLUTTER_CFLAGS) $(MAINTAINER_CFLAGS)
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-DG_DISABLE_SINGLE_INCLUDES \
|
||||
-DGLIB_DISABLE_DEPRECATION_WARNINGS \
|
||||
-DCOGL_DISABLE_DEPRECATION_WARNINGS \
|
||||
-DCLUTTER_DISABLE_DEPRECATION_WARNINGS \
|
||||
-I$(top_srcdir)/../cogl \
|
||||
-I$(top_builddir)/../cogl \
|
||||
-I$(top_builddir)/../cogl/cogl \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_srcdir)/clutter \
|
||||
-I$(top_builddir)/clutter
|
||||
|
||||
LDADD = $(common_ldadd) $(CLUTTER_LIBS) $(LIBM)
|
||||
|
||||
test_text_SOURCES = test-text.c
|
||||
test_picking_SOURCES = test-picking.c
|
||||
test_text_perf_SOURCES = test-text-perf.c
|
||||
test_random_text_SOURCES = test-random-text.c
|
||||
test_cogl_perf_SOURCES = test-cogl-perf.c
|
@@ -1,66 +0,0 @@
|
||||
# A makefile based framework for testing performance commits in retrospect,
|
||||
# based on work done by pippin@gimp.org done for GEGL, original code placed in the public domain.
|
||||
|
||||
SELF = Makefile-retrospect
|
||||
|
||||
MAKE_FLAGS = -j3 -k
|
||||
CC = "ccache gcc" # if you do not have ccache replace with just gcc
|
||||
|
||||
PROJECT_PATH = ../../
|
||||
|
||||
# mute makes echoing of commands
|
||||
.SILENT:
|
||||
|
||||
# replace sequential with random to build a random subset
|
||||
all: reset sequential
|
||||
#all: reset random
|
||||
|
||||
retry:
|
||||
rm -rf reports/`cat jobs | tail -n1`*
|
||||
make -f $(SELF)
|
||||
|
||||
prepare:
|
||||
# uncomment these to make sure cpu is in high performance mode
|
||||
#sudo sh -c 'echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor || true'
|
||||
#sudo sh -c 'echo performance > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor || true'
|
||||
|
||||
reset:
|
||||
rm -rf jobs jobs
|
||||
# remove checkout dir to have a full reset on each invokation
|
||||
rm -rf checkout
|
||||
# create clone
|
||||
git clone -s $(PROJECT_PATH) checkout
|
||||
mkdir reports > /dev/null 2>&1 || true
|
||||
make -f $(SELF) jobs
|
||||
make -f $(SELF) prepare
|
||||
|
||||
jobs: joblist
|
||||
./makejobs.rb joblist > jobs
|
||||
|
||||
sequential:
|
||||
for a in `cat jobs`;do make -f $(SELF) reports/$$a;done
|
||||
|
||||
random:
|
||||
for a in `cat jobs|sort`;do make -f $(SELF) reports/$$a;done
|
||||
|
||||
reports/%:
|
||||
# check out revision
|
||||
(cd checkout; git checkout `echo $@|sed s:reports/::`)
|
||||
# write header for report
|
||||
git log -1 `echo $@|sed s:reports/::` > $@ || true
|
||||
# clean previous build
|
||||
rm -rf install; mkdir install
|
||||
# build revision
|
||||
(cd checkout; if [ ! -f Makefile ]; then CC=$(CC) ./autogen.sh --disable-introspection --prefix=`pwd`/../install; fi ; \
|
||||
make $(MAKE_FLAGS) ; make -k install ) > $@.log 2>&1 || true
|
||||
# testing
|
||||
make -f Makefile-tests clean;\
|
||||
make -f Makefile-tests; sync;\
|
||||
make -f Makefile-tests check >> $@ || true
|
||||
# update report.pdf / report.png
|
||||
./create-report.rb
|
||||
echo
|
||||
|
||||
clean:
|
||||
rm -rf reports jobs report.pdf report.png checkout install
|
||||
make -f Makefile-tests clean
|
@@ -1,15 +0,0 @@
|
||||
CFILES = $(wildcard *.c)
|
||||
bins = $(subst ,,$(CFILES:.c=))
|
||||
|
||||
all: $(bins)
|
||||
|
||||
%: %.c
|
||||
PKG_CONFIG_PATH=install/lib/pkgconfig:$(PKG_CONFIG_PATH) $(CC) -DTESTS_DATA_DIR=\"../data/\" `pkg-config clutter-1.0 --cflags --libs` -Wall -O2 -o $@ $<
|
||||
|
||||
check: $(bins)
|
||||
for a in $(bins); do \
|
||||
LD_LIBRARY_PATH=install/lib:$(LD_LIBRARY_PATH) ./$$a;\
|
||||
done
|
||||
|
||||
clean:
|
||||
rm -f $(bins)
|
@@ -1,43 +0,0 @@
|
||||
check_PROGRAMS = \
|
||||
test-picking \
|
||||
test-text-perf \
|
||||
test-state \
|
||||
test-state-interactive \
|
||||
test-state-hidden \
|
||||
test-state-mini \
|
||||
test-state-pick
|
||||
|
||||
common_ldadd = $(top_builddir)/clutter/libmutter-clutter-@LIBMUTTER_API_VERSION@.la
|
||||
|
||||
LDADD = $(common_ldadd) $(CLUTTER_LIBS) $(LIBM)
|
||||
|
||||
AM_CFLAGS = $(CLUTTER_CFLAGS)
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-DG_DISABLE_SINGLE_INCLUDES \
|
||||
-DGLIB_DISABLE_DEPRECATION_WARNINGS \
|
||||
-DCOGL_DISABLE_DEPRECATION_WARNINGS \
|
||||
-DCLUTTER_DISABLE_DEPRECATION_WARNINGS \
|
||||
-DTESTS_DATA_DIR=\""$(top_srcdir)/tests/data/"\" \
|
||||
-I$(top_srcdir)/../cogl \
|
||||
-I$(top_builddir)/../cogl \
|
||||
-I$(top_builddir)/../cogl/cogl \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_srcdir)/clutter \
|
||||
-I$(top_builddir)/clutter
|
||||
|
||||
perf-report: check
|
||||
|
||||
check:
|
||||
for a in $(noinst_PROGRAMS);do ./$$a;done;true
|
||||
|
||||
test_picking_SOURCES = test-picking.c
|
||||
test_text_perf_SOURCES = test-text-perf.c
|
||||
test_state_SOURCES = test-state.c
|
||||
test_state_hidden_SOURCES = test-state-hidden.c
|
||||
test_state_pick_SOURCES = test-state-pick.c
|
||||
test_state_interactive_SOURCES = test-state-interactive.c
|
||||
test_state_mini_SOURCES = test-state-mini.c
|
||||
|
||||
EXTRA_DIST = Makefile-retrospect Makefile-tests create-report.rb test-common.h
|
1
cogl/.gitignore
vendored
1
cogl/.gitignore
vendored
@@ -66,7 +66,6 @@ TAGS
|
||||
/tests/conform/config.env
|
||||
/tests/conform/.log
|
||||
/tests/unit/.log
|
||||
/tests/micro-perf/test-journal
|
||||
/tests/config.env
|
||||
/po/POTFILES
|
||||
/po/*.gmo
|
||||
|
@@ -1,33 +0,0 @@
|
||||
SUBDIRS = test-fixtures
|
||||
|
||||
SUBDIRS += cogl
|
||||
|
||||
SUBDIRS += cogl-path
|
||||
|
||||
SUBDIRS += cogl-pango
|
||||
|
||||
if BUILD_COGL_GLES2
|
||||
SUBDIRS += cogl-gles2
|
||||
endif
|
||||
|
||||
SUBDIRS += tests
|
||||
|
||||
ACLOCAL_AMFLAGS = -I build/autotools ${ACLOCAL_FLAGS}
|
||||
|
||||
EXTRA_DIST = \
|
||||
config-custom.h
|
||||
|
||||
# .changelog expects these to be initializes
|
||||
CLEANFILES=
|
||||
DISTCLEANFILES=
|
||||
|
||||
DISTCHECK_CONFIGURE_FLAGS = \
|
||||
--enable-maintainer-flags \
|
||||
--enable-profile \
|
||||
--enable-gles2 \
|
||||
--enable-gl \
|
||||
--enable-xlib-egl-platform \
|
||||
--enable-wayland-egl-platform \
|
||||
--enable-glx \
|
||||
--enable-wayland-egl-server \
|
||||
--enable-cogl-gst
|
@@ -1,52 +0,0 @@
|
||||
# Rules for generating enumeration types using glib-mkenums
|
||||
#
|
||||
# Define:
|
||||
# glib_enum_h = header template file
|
||||
# glib_enum_c = source template file
|
||||
# glib_enum_headers = list of headers to parse
|
||||
#
|
||||
# before including Makefile.am.enums. You will also need to have
|
||||
# the following targets already defined:
|
||||
#
|
||||
# CLEANFILES
|
||||
# DISTCLEANFILES
|
||||
# BUILT_SOURCES
|
||||
# EXTRA_DIST
|
||||
#
|
||||
# Author: Emmanuele Bassi <ebassi@linux.intel.com>
|
||||
|
||||
# Basic sanity checks
|
||||
$(if $(GLIB_MKENUMS),,$(error Need to define GLIB_MKENUMS))
|
||||
|
||||
$(if $(or $(glib_enum_h), \
|
||||
$(glib_enum_c)),, \
|
||||
$(error Need to define glib_enum_h and glib_enum_c))
|
||||
|
||||
$(if $(glib_enum_headers),,$(error Need to define glib_enum_headers))
|
||||
|
||||
enum_tmpl_h=$(addprefix $(srcdir)/, $(glib_enum_h:.h=.h.in))
|
||||
enum_tmpl_c=$(addprefix $(srcdir)/, $(glib_enum_c:.c=.c.in))
|
||||
enum_headers=$(addprefix $(srcdir)/, $(glib_enum_headers))
|
||||
|
||||
CLEANFILES += stamp-enum-types
|
||||
DISTCLEANFILES += $(glib_enum_h) $(glib_enum_c)
|
||||
BUILT_SOURCES += $(glib_enum_h) $(glib_enum_c)
|
||||
EXTRA_DIST += $(enum_tmpl_h) $(enum_tmpl_c)
|
||||
|
||||
stamp-enum-types: $(enum_headers) $(enum_tmpl_h)
|
||||
$(AM_V_GEN)$(GLIB_MKENUMS) \
|
||||
--template $(enum_tmpl_h) \
|
||||
$(enum_headers) > xgen-eh \
|
||||
&& (cmp -s xgen-eh $(glib_enum_h) || cp -f xgen-eh $(glib_enum_h)) \
|
||||
&& rm -f xgen-eh \
|
||||
&& echo timestamp > $(@F)
|
||||
|
||||
$(glib_enum_h): stamp-enum-types
|
||||
@true
|
||||
|
||||
$(glib_enum_c): $(enum_headers) $(enum_tmpl_h) $(enum_tmpl_c)
|
||||
$(AM_V_GEN)$(GLIB_MKENUMS) \
|
||||
--template $(enum_tmpl_c) \
|
||||
$(enum_headers) > xgen-ec \
|
||||
&& cp -f xgen-ec $(glib_enum_c) \
|
||||
&& rm -f xgen-ec
|
@@ -1,62 +0,0 @@
|
||||
dnl as-compiler-flag.m4 0.1.0
|
||||
|
||||
dnl autostars m4 macro for detection of compiler flags
|
||||
|
||||
dnl David Schleef <ds@schleef.org>
|
||||
|
||||
dnl $Id: as-compiler-flag.m4,v 1.1 2005/12/15 23:35:19 ds Exp $
|
||||
|
||||
dnl AS_COMPILER_FLAG(CFLAGS, ACTION-IF-ACCEPTED, [ACTION-IF-NOT-ACCEPTED])
|
||||
dnl Tries to compile with the given CFLAGS.
|
||||
dnl Runs ACTION-IF-ACCEPTED if the compiler can compile with the flags,
|
||||
dnl and ACTION-IF-NOT-ACCEPTED otherwise.
|
||||
|
||||
AC_DEFUN([AS_COMPILER_FLAG],
|
||||
[
|
||||
AC_MSG_CHECKING([to see if compiler understands $1])
|
||||
|
||||
save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $1"
|
||||
|
||||
AC_TRY_COMPILE([ ], [], [flag_ok=yes], [flag_ok=no])
|
||||
CFLAGS="$save_CFLAGS"
|
||||
|
||||
if test "X$flag_ok" = Xyes ; then
|
||||
m4_ifvaln([$2],[$2])
|
||||
true
|
||||
else
|
||||
m4_ifvaln([$3],[$3])
|
||||
true
|
||||
fi
|
||||
AC_MSG_RESULT([$flag_ok])
|
||||
])
|
||||
|
||||
dnl AS_COMPILER_FLAGS(VAR, FLAGS)
|
||||
dnl Tries to compile with the given CFLAGS.
|
||||
|
||||
AC_DEFUN([AS_COMPILER_FLAGS],
|
||||
[
|
||||
list=$2
|
||||
flags_supported=""
|
||||
flags_unsupported=""
|
||||
AC_MSG_CHECKING([for supported compiler flags])
|
||||
for each in $list
|
||||
do
|
||||
save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $each"
|
||||
AC_TRY_COMPILE([ ], [], [flag_ok=yes], [flag_ok=no])
|
||||
CFLAGS="$save_CFLAGS"
|
||||
|
||||
if test "X$flag_ok" = Xyes ; then
|
||||
flags_supported="$flags_supported $each"
|
||||
else
|
||||
flags_unsupported="$flags_unsupported $each"
|
||||
fi
|
||||
done
|
||||
AC_MSG_RESULT([$flags_supported])
|
||||
if test "X$flags_unsupported" != X ; then
|
||||
AC_MSG_WARN([unsupported compiler flags: $flags_unsupported])
|
||||
fi
|
||||
$1="$$1 $flags_supported"
|
||||
])
|
||||
|
@@ -1,94 +0,0 @@
|
||||
dnl -*- mode: autoconf -*-
|
||||
dnl Copyright 2009 Johan Dahlin
|
||||
dnl
|
||||
dnl This file is free software; the author(s) gives unlimited
|
||||
dnl permission to copy and/or distribute it, with or without
|
||||
dnl modifications, as long as this notice is preserved.
|
||||
dnl
|
||||
|
||||
# serial 1
|
||||
|
||||
m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
|
||||
[
|
||||
AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
|
||||
AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
|
||||
AC_BEFORE([LT_INIT],[$0])dnl setup libtool first
|
||||
|
||||
dnl enable/disable introspection
|
||||
m4_if([$2], [require],
|
||||
[dnl
|
||||
enable_introspection=yes
|
||||
],[dnl
|
||||
AC_ARG_ENABLE(introspection,
|
||||
AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]],
|
||||
[Enable introspection for this build]),,
|
||||
[enable_introspection=auto])
|
||||
])dnl
|
||||
|
||||
AC_MSG_CHECKING([for gobject-introspection])
|
||||
|
||||
dnl presence/version checking
|
||||
AS_CASE([$enable_introspection],
|
||||
[no], [dnl
|
||||
found_introspection="no (disabled, use --enable-introspection to enable)"
|
||||
],dnl
|
||||
[yes],[dnl
|
||||
PKG_CHECK_EXISTS([gobject-introspection-1.0],,
|
||||
AC_MSG_ERROR([gobject-introspection-1.0 is not installed]))
|
||||
PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1],
|
||||
found_introspection=yes,
|
||||
AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME]))
|
||||
],dnl
|
||||
[auto],[dnl
|
||||
PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no)
|
||||
],dnl
|
||||
[dnl
|
||||
AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@])
|
||||
])dnl
|
||||
|
||||
AC_MSG_RESULT([$found_introspection])
|
||||
|
||||
INTROSPECTION_SCANNER=
|
||||
INTROSPECTION_COMPILER=
|
||||
INTROSPECTION_GENERATE=
|
||||
INTROSPECTION_GIRDIR=
|
||||
INTROSPECTION_TYPELIBDIR=
|
||||
if test "x$found_introspection" = "xyes"; then
|
||||
INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
|
||||
INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
|
||||
INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
|
||||
INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
|
||||
INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
|
||||
INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
|
||||
INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
|
||||
INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
|
||||
fi
|
||||
AC_SUBST(INTROSPECTION_SCANNER)
|
||||
AC_SUBST(INTROSPECTION_COMPILER)
|
||||
AC_SUBST(INTROSPECTION_GENERATE)
|
||||
AC_SUBST(INTROSPECTION_GIRDIR)
|
||||
AC_SUBST(INTROSPECTION_TYPELIBDIR)
|
||||
AC_SUBST(INTROSPECTION_CFLAGS)
|
||||
AC_SUBST(INTROSPECTION_LIBS)
|
||||
AC_SUBST(INTROSPECTION_MAKEFILE)
|
||||
|
||||
AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes")
|
||||
])
|
||||
|
||||
|
||||
dnl Usage:
|
||||
dnl GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version])
|
||||
|
||||
AC_DEFUN([GOBJECT_INTROSPECTION_CHECK],
|
||||
[
|
||||
_GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1])
|
||||
])
|
||||
|
||||
dnl Usage:
|
||||
dnl GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version])
|
||||
|
||||
|
||||
AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE],
|
||||
[
|
||||
_GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require])
|
||||
])
|
@@ -1,37 +0,0 @@
|
||||
# preamble
|
||||
|
||||
NULL =
|
||||
|
||||
DISTCLEANFILES =
|
||||
|
||||
mutterlibdir = $(libdir)/mutter-@LIBMUTTER_API_VERSION@
|
||||
mutterlib_LTLIBRARIES = libmutter-cogl-gles2-@LIBMUTTER_API_VERSION@.la
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_builddir)/cogl \
|
||||
$(NULL)
|
||||
|
||||
AM_CFLAGS = $(COGL_DEP_CFLAGS) $(COGL_EXTRA_CFLAGS) $(MAINTAINER_CFLAGS)
|
||||
|
||||
libmutter_cogl_gles2_@LIBMUTTER_API_VERSION@_la_SOURCES = cogl-gles2-api.c
|
||||
libmutter_cogl_gles2_@LIBMUTTER_API_VERSION@_la_LDFLAGS = \
|
||||
-no-undefined \
|
||||
-rpath $(mutterlibdir) \
|
||||
-avoid-version \
|
||||
-export-dynamic \
|
||||
-export-symbols-regex "^gl*"
|
||||
|
||||
coglgles2includedir = $(includedir)/mutter-@LIBMUTTER_API_VERSION@/cogl/cogl-gles2/GLES2
|
||||
coglgles2include_HEADERS = \
|
||||
GLES2/gl2.h \
|
||||
GLES2/gl2ext.h \
|
||||
GLES2/gl2platform.h
|
||||
|
||||
pc_files = mutter-cogl-gles2-$(LIBMUTTER_API_VERSION).pc
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = $(pc_files)
|
||||
|
||||
DISTCLEANFILES += $(pc_files)
|
@@ -27,15 +27,15 @@ cogl_gles2_includedir = join_paths(cogl_includedir, 'cogl-gles2/GLES2')
|
||||
install_headers(cogl_gles2_public_headers,
|
||||
subdir: cogl_gles2_includedir)
|
||||
|
||||
pkg.generate(
|
||||
pkg.generate(libmutter_cogl_gles2,
|
||||
name: 'CoglGles2',
|
||||
filebase: 'mutter-cogl-gles2-' + libmutter_api_version,
|
||||
description: 'A cogl GLES2 helper library for mutter',
|
||||
libraries: [libmutter_cogl_gles2],
|
||||
subdirs: join_paths(pkgname, 'cogl'),
|
||||
requires: [cogl_pkg_deps, libmutter_cogl_name],
|
||||
version: meson.project_version(),
|
||||
variables: [
|
||||
'apiversion=' + libmutter_api_version,
|
||||
],
|
||||
install_dir: pcdir,
|
||||
)
|
||||
|
@@ -1,93 +0,0 @@
|
||||
NULL =
|
||||
|
||||
CLEANFILES =
|
||||
DISTCLEANFILES =
|
||||
|
||||
EXTRA_DIST =
|
||||
|
||||
source_c = \
|
||||
cogl-pango-display-list.c \
|
||||
cogl-pango-fontmap.c \
|
||||
cogl-pango-render.c \
|
||||
cogl-pango-glyph-cache.c \
|
||||
cogl-pango-pipeline-cache.c \
|
||||
$(NULL)
|
||||
|
||||
source_h = cogl-pango.h
|
||||
|
||||
source_h_priv = \
|
||||
cogl-pango-display-list.h \
|
||||
cogl-pango-private.h \
|
||||
cogl-pango-glyph-cache.h \
|
||||
cogl-pango-pipeline-cache.h \
|
||||
$(NULL)
|
||||
|
||||
mutterlibdir = $(libdir)/mutter-@LIBMUTTER_API_VERSION@
|
||||
mutterlib_LTLIBRARIES = libmutter-cogl-pango-@LIBMUTTER_API_VERSION@.la
|
||||
|
||||
libmutter_cogl_pango_@LIBMUTTER_API_VERSION@_la_SOURCES = $(source_c) $(source_h) $(source_h_priv)
|
||||
libmutter_cogl_pango_@LIBMUTTER_API_VERSION@_la_CFLAGS = $(COGL_DEP_CFLAGS) $(COGL_PANGO_DEP_CFLAGS) $(COGL_EXTRA_CFLAGS) $(MAINTAINER_CFLAGS)
|
||||
libmutter_cogl_pango_@LIBMUTTER_API_VERSION@_la_LIBADD = $(top_builddir)/cogl/libmutter-cogl-$(LIBMUTTER_API_VERSION).la
|
||||
libmutter_cogl_pango_@LIBMUTTER_API_VERSION@_la_LIBADD += $(COGL_DEP_LIBS) $(COGL_PANGO_DEP_LIBS) $(COGL_EXTRA_LDFLAGS)
|
||||
libmutter_cogl_pango_@LIBMUTTER_API_VERSION@_la_LDFLAGS = \
|
||||
-export-dynamic \
|
||||
-rpath $(mutterlibdir) \
|
||||
-export-symbols-regex "^cogl_pango_.*" \
|
||||
-no-undefined \
|
||||
-avoid-version
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-DCOGL_COMPILATION \
|
||||
-DG_LOG_DOMAIN=\"CoglPango\" \
|
||||
-I$(top_srcdir)/cogl \
|
||||
-I$(top_builddir)/cogl \
|
||||
-I$(top_srcdir)/cogl/winsys \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_builddir)
|
||||
|
||||
cogl_base_includedir = $(includedir)/mutter-@LIBMUTTER_API_VERSION@
|
||||
cogl_pangoheadersdir = $(cogl_base_includedir)/cogl/cogl-pango
|
||||
cogl_pangoheaders_HEADERS = $(source_h)
|
||||
|
||||
pc_files = mutter-cogl-pango-$(LIBMUTTER_API_VERSION).pc
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = $(pc_files)
|
||||
|
||||
DISTCLEANFILES += $(pc_files)
|
||||
|
||||
EXTRA_DIST += cogl-pango.symbols
|
||||
|
||||
-include $(INTROSPECTION_MAKEFILE)
|
||||
|
||||
INTROSPECTION_GIRS =
|
||||
|
||||
if HAVE_INTROSPECTION
|
||||
INTROSPECTION_COMPILER_ARGS=--includedir=$(top_builddir)/cogl
|
||||
|
||||
CoglPango-@LIBMUTTER_API_VERSION@.gir: libmutter-cogl-pango-$(LIBMUTTER_API_VERSION).la Makefile
|
||||
|
||||
CoglPango_@LIBMUTTER_API_VERSION@_gir_NAMESPACE = CoglPango
|
||||
CoglPango_@LIBMUTTER_API_VERSION@_gir_VERSION = @LIBMUTTER_API_VERSION@
|
||||
CoglPango_@LIBMUTTER_API_VERSION@_gir_LIBS = $(top_builddir)/cogl/libmutter-cogl-$(LIBMUTTER_API_VERSION).la libmutter-cogl-pango-$(LIBMUTTER_API_VERSION).la
|
||||
CoglPango_@LIBMUTTER_API_VERSION@_gir_FILES = $(source_h) $(source_c)
|
||||
CoglPango_@LIBMUTTER_API_VERSION@_gir_CFLAGS = $(AM_CPPFLAGS) $(COGL_DEP_CFLAGS) $(COGL_PANGO_DEP_CFLAGS)
|
||||
CoglPango_@LIBMUTTER_API_VERSION@_gir_INCLUDES = Pango-1.0 PangoCairo-1.0
|
||||
CoglPango_@LIBMUTTER_API_VERSION@_gir_EXPORT_PACKAGES = mutter-cogl-pango-@LIBMUTTER_API_VERSION@
|
||||
CoglPango_@LIBMUTTER_API_VERSION@_gir_SCANNERFLAGS = \
|
||||
--warn-all \
|
||||
--identifier-prefix=CoglPango \
|
||||
--symbol-prefix=cogl_pango \
|
||||
--c-include='cogl-pango/cogl-pango.h' \
|
||||
--include-uninstalled=$(top_builddir)/cogl/Cogl-@LIBMUTTER_API_VERSION@.gir
|
||||
|
||||
INTROSPECTION_GIRS += CoglPango-@LIBMUTTER_API_VERSION@.gir
|
||||
|
||||
girdir = $(mutterlibdir)
|
||||
gir_DATA = $(INTROSPECTION_GIRS)
|
||||
|
||||
typelibdir = $(mutterlibdir)
|
||||
typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
|
||||
|
||||
CLEANFILES += $(gir_DATA) $(typelib_DATA)
|
||||
endif
|
@@ -54,10 +54,9 @@ if have_introspection
|
||||
pango_dep,
|
||||
libmutter_cogl_pango_dep,
|
||||
],
|
||||
extra_args: [
|
||||
extra_args: introspection_args + [
|
||||
'-UCOGL_COMPILATION',
|
||||
'-DG_LOG_DOMAIN=\"CoglPango\"',
|
||||
'-U_GNU_SOURCE',
|
||||
],
|
||||
install_dir_gir: pkglibdir,
|
||||
install_dir_typelib: pkglibdir,
|
||||
@@ -68,15 +67,15 @@ endif
|
||||
cogl_pango_includedir = join_paths(cogl_includedir, 'cogl-pango')
|
||||
install_headers(cogl_pango_public_headers, subdir: cogl_pango_includedir)
|
||||
|
||||
pkg.generate(
|
||||
pkg.generate(libmutter_cogl_pango,
|
||||
name: 'CoglPango',
|
||||
filebase: 'mutter-cogl-pango-' + libmutter_api_version,
|
||||
description: 'A text rendering for Cogl in mutter',
|
||||
libraries: [libmutter_cogl_pango],
|
||||
subdirs: join_paths(pkgname, 'cogl'),
|
||||
requires: [cogl_pkg_deps, libmutter_cogl_name],
|
||||
version: meson.project_version(),
|
||||
variables: [
|
||||
'apiversion=' + libmutter_api_version,
|
||||
],
|
||||
install_dir: pcdir,
|
||||
)
|
||||
|
@@ -1,102 +0,0 @@
|
||||
NULL =
|
||||
|
||||
BUILT_SOURCES =
|
||||
|
||||
CLEANFILES =
|
||||
DISTCLEANFILES =
|
||||
|
||||
EXTRA_DIST =
|
||||
|
||||
# tesselator sources
|
||||
cogl_tesselator_sources = \
|
||||
tesselator/dict-list.h \
|
||||
tesselator/dict.c \
|
||||
tesselator/dict.h \
|
||||
tesselator/geom.c \
|
||||
tesselator/geom.h \
|
||||
tesselator/gluos.h \
|
||||
tesselator/memalloc.h \
|
||||
tesselator/mesh.c \
|
||||
tesselator/mesh.h \
|
||||
tesselator/normal.c \
|
||||
tesselator/normal.h \
|
||||
tesselator/priorityq-heap.h \
|
||||
tesselator/priorityq-sort.h \
|
||||
tesselator/priorityq.c \
|
||||
tesselator/priorityq.h \
|
||||
tesselator/render.c \
|
||||
tesselator/render.h \
|
||||
tesselator/sweep.c \
|
||||
tesselator/sweep.h \
|
||||
tesselator/tess.c \
|
||||
tesselator/tess.h \
|
||||
tesselator/tesselator.h \
|
||||
tesselator/tessmono.c \
|
||||
tesselator/tessmono.h \
|
||||
tesselator/GL/glu.h \
|
||||
$(NULL)
|
||||
|
||||
source_c = \
|
||||
$(cogl_tesselator_sources) \
|
||||
cogl-path-private.h \
|
||||
cogl-path.c \
|
||||
$(NULL)
|
||||
|
||||
EXTRA_DIST += \
|
||||
tesselator/README \
|
||||
tesselator/priorityq-heap.c \
|
||||
cogl-path.symbols \
|
||||
$(NULL)
|
||||
|
||||
source_1_x_h = \
|
||||
cogl-path-types.h \
|
||||
$(NULL)
|
||||
|
||||
source_h = \
|
||||
cogl-path.h \
|
||||
$(source_1_x_h) \
|
||||
cogl-path-functions.h \
|
||||
$(NULL)
|
||||
|
||||
# glib-mkenums rules
|
||||
glib_enum_h = cogl-path-enum-types.h
|
||||
glib_enum_c = cogl-path-enum-types.c
|
||||
glib_enum_headers = $(source_1_x_h)
|
||||
include $(top_srcdir)/build/autotools/Makefile.am.enums
|
||||
|
||||
mutterlibdir = $(libdir)/mutter-@LIBMUTTER_API_VERSION@
|
||||
mutterlib_LTLIBRARIES = libmutter-cogl-path-@LIBMUTTER_API_VERSION@.la
|
||||
|
||||
libmutter_cogl_path_@LIBMUTTER_API_VERSION@_la_SOURCES = $(source_c) $(source_h)
|
||||
nodist_libmutter_cogl_path_@LIBMUTTER_API_VERSION@_la_SOURCES = $(BUILT_SOURCES)
|
||||
libmutter_cogl_path_@LIBMUTTER_API_VERSION@_la_CFLAGS = $(COGL_DEP_CFLAGS) $(COGL_EXTRA_CFLAGS) $(MAINTAINER_CFLAGS)
|
||||
libmutter_cogl_path_@LIBMUTTER_API_VERSION@_la_LIBADD = $(top_builddir)/cogl/libmutter-cogl-$(LIBMUTTER_API_VERSION).la
|
||||
libmutter_cogl_path_@LIBMUTTER_API_VERSION@_la_LIBADD += $(COGL_DEP_LIBS) $(COGL_EXTRA_LDFLAGS)
|
||||
libmutter_cogl_path_@LIBMUTTER_API_VERSION@_la_LDFLAGS = \
|
||||
-export-dynamic \
|
||||
-export-symbols-regex "^(cogl|cogl2)_(framebuffer|path|is|clip|[sg]et)_.*" \
|
||||
-no-undefined \
|
||||
-avoid-version \
|
||||
-rpath $(mutterlibdir)
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-DCOGL_COMPILATION \
|
||||
-DG_LOG_DOMAIN=\"CoglPath\" \
|
||||
-I$(srcdir)/tesselator \
|
||||
-I$(top_srcdir)/cogl \
|
||||
-I$(top_builddir)/cogl \
|
||||
-I$(top_srcdir)/cogl/winsys \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_builddir)
|
||||
|
||||
cogl_base_includedir = $(includedir)/mutter-@LIBMUTTER_API_VERSION@
|
||||
cogl_pathheadersdir = $(cogl_base_includedir)/cogl/cogl-path
|
||||
cogl_pathheaders_HEADERS = $(source_h)
|
||||
nodist_cogl_pathheaders_HEADERS = cogl-path-enum-types.h
|
||||
|
||||
pc_files = mutter-cogl-path-$(LIBMUTTER_API_VERSION).pc
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = $(pc_files)
|
||||
|
||||
DISTCLEANFILES += $(pc_files)
|
@@ -68,15 +68,15 @@ libmutter_cogl_path_dep = declare_dependency(
|
||||
install_headers(cogl_path_public_headers,
|
||||
subdir: cogl_path_includedir)
|
||||
|
||||
pkg.generate(
|
||||
pkg.generate(libmutter_cogl_path,
|
||||
name: 'CoglPath',
|
||||
filebase: 'mutter-cogl-path-' + libmutter_api_version,
|
||||
description: 'A 2D path drawing library for Cogl in mutter',
|
||||
libraries: [libmutter_cogl_path],
|
||||
subdirs: join_paths(pkgname, 'cogl'),
|
||||
requires: [cogl_pkg_deps, libmutter_cogl_name],
|
||||
version: meson.project_version(),
|
||||
variables: [
|
||||
'apiversion=' + libmutter_api_version,
|
||||
],
|
||||
install_dir: pcdir,
|
||||
)
|
||||
|
@@ -1,493 +0,0 @@
|
||||
# preamble
|
||||
|
||||
NULL =
|
||||
|
||||
SUBDIRS =
|
||||
|
||||
BUILT_SOURCES =
|
||||
|
||||
EXTRA_DIST =
|
||||
CLEANFILES =
|
||||
DISTCLEANFILES =
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_builddir) \
|
||||
$(NULL)
|
||||
|
||||
AM_CPPFLAGS += \
|
||||
-DG_LOG_DOMAIN=\"Cogl\" \
|
||||
-DCOGL_COMPILATION \
|
||||
-DCOGL_GL_LIBNAME=\"$(COGL_GL_LIBNAME)\" \
|
||||
-DCOGL_GLES1_LIBNAME=\"$(COGL_GLES1_LIBNAME)\" \
|
||||
-DCOGL_GLES2_LIBNAME=\"$(COGL_GLES2_LIBNAME)\" \
|
||||
-DCOGL_LOCALEDIR=\""$(localedir)"\" \
|
||||
$(NULL)
|
||||
|
||||
if HAVE_COGL_DEFAULT_DRIVER
|
||||
AM_CPPFLAGS += \
|
||||
-DCOGL_DEFAULT_DRIVER=\"$(COGL_DEFAULT_DRIVER)\"
|
||||
endif
|
||||
|
||||
|
||||
AM_CFLAGS = $(COGL_DEP_CFLAGS) $(COGL_EXTRA_CFLAGS) $(MAINTAINER_CFLAGS)
|
||||
|
||||
BUILT_SOURCES += cogl-defines.h cogl-egl-defines.h cogl-gl-header.h
|
||||
DISTCLEANFILES += cogl-defines.h cogl-egl-defines.h cogl-gl-header.h
|
||||
EXTRA_DIST += cogl-defines.h.in cogl-egl-defines.h.in cogl-gl-header.h.in
|
||||
|
||||
pc_files = mutter-cogl-$(LIBMUTTER_API_VERSION).pc
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = $(pc_files)
|
||||
|
||||
DISTCLEANFILES += $(pc_files)
|
||||
|
||||
cogl_deprecated_h = \
|
||||
deprecated/cogl-material-compat.h \
|
||||
deprecated/cogl-vertex-buffer.h \
|
||||
deprecated/cogl-shader.h \
|
||||
deprecated/cogl-clutter.h \
|
||||
deprecated/cogl-type-casts.h \
|
||||
deprecated/cogl-auto-texture.h \
|
||||
$(NULL)
|
||||
|
||||
cogl_deprecated_nonintrospected_h = \
|
||||
deprecated/cogl-framebuffer-deprecated.h \
|
||||
$(NULL)
|
||||
|
||||
# public 1.x api headers
|
||||
cogl_1_public_h = \
|
||||
$(cogl_deprecated_h) \
|
||||
cogl1-context.h \
|
||||
cogl-bitmap.h \
|
||||
cogl-color.h \
|
||||
cogl-framebuffer.h \
|
||||
cogl-matrix.h \
|
||||
cogl-offscreen.h \
|
||||
cogl-object.h \
|
||||
cogl-onscreen.h \
|
||||
cogl-pipeline.h \
|
||||
cogl-pipeline-state.h \
|
||||
cogl-pipeline-layer-state.h \
|
||||
cogl-primitives.h \
|
||||
cogl-texture.h \
|
||||
cogl-types.h \
|
||||
cogl.h \
|
||||
$(NULL)
|
||||
|
||||
cogl_nonintrospected_h = \
|
||||
cogl-renderer.h \
|
||||
cogl-swap-chain.h \
|
||||
cogl-onscreen-template.h \
|
||||
cogl-display.h \
|
||||
cogl-context.h \
|
||||
cogl-snippet.h \
|
||||
cogl-gles2.h \
|
||||
cogl-gles2-types.h \
|
||||
cogl-index-buffer.h \
|
||||
cogl-attribute-buffer.h \
|
||||
cogl-indices.h \
|
||||
cogl-attribute.h \
|
||||
cogl-primitive.h \
|
||||
cogl-frame-info.h \
|
||||
cogl-vector.h \
|
||||
cogl-euler.h \
|
||||
cogl-output.h \
|
||||
cogl-quaternion.h \
|
||||
cogl-matrix-stack.h \
|
||||
cogl-poll.h \
|
||||
cogl-texture-3d.h \
|
||||
cogl-texture-2d.h \
|
||||
cogl-texture-2d-gl.h \
|
||||
cogl-texture-rectangle.h \
|
||||
cogl-texture-2d-sliced.h \
|
||||
cogl-sub-texture.h \
|
||||
cogl-atlas-texture.h \
|
||||
cogl-meta-texture.h \
|
||||
cogl-primitive-texture.h \
|
||||
cogl-depth-state.h \
|
||||
cogl-buffer.h \
|
||||
cogl-pixel-buffer.h \
|
||||
cogl-macros.h \
|
||||
cogl-fence.h \
|
||||
cogl-version.h \
|
||||
cogl-error.h \
|
||||
cogl-bitmap.h \
|
||||
cogl-color.h \
|
||||
cogl-matrix.h \
|
||||
cogl-texture.h \
|
||||
cogl-types.h \
|
||||
cogl-gtype-private.h \
|
||||
cogl-mutter.h \
|
||||
$(NULL)
|
||||
|
||||
cogl_nodist_h = \
|
||||
$(NULL)
|
||||
|
||||
# nop driver
|
||||
cogl_driver_sources = \
|
||||
driver/nop/cogl-driver-nop.c \
|
||||
driver/nop/cogl-framebuffer-nop-private.h \
|
||||
driver/nop/cogl-framebuffer-nop.c \
|
||||
driver/nop/cogl-attribute-nop-private.h \
|
||||
driver/nop/cogl-attribute-nop.c \
|
||||
driver/nop/cogl-clip-stack-nop-private.h \
|
||||
driver/nop/cogl-clip-stack-nop.c \
|
||||
driver/nop/cogl-texture-2d-nop-private.h \
|
||||
driver/nop/cogl-texture-2d-nop.c \
|
||||
$(NULL)
|
||||
|
||||
# gl driver sources
|
||||
cogl_gl_prototypes_h = \
|
||||
gl-prototypes/cogl-gles2-functions.h \
|
||||
gl-prototypes/cogl-core-functions.h \
|
||||
gl-prototypes/cogl-in-gles-core-functions.h \
|
||||
gl-prototypes/cogl-in-gles2-core-functions.h \
|
||||
gl-prototypes/cogl-glsl-functions.h \
|
||||
$(NULL)
|
||||
|
||||
cogl_driver_sources += \
|
||||
driver/gl/cogl-util-gl-private.h \
|
||||
driver/gl/cogl-util-gl.c \
|
||||
driver/gl/cogl-framebuffer-gl-private.h \
|
||||
driver/gl/cogl-framebuffer-gl.c \
|
||||
driver/gl/cogl-texture-gl-private.h \
|
||||
driver/gl/cogl-texture-gl.c \
|
||||
driver/gl/cogl-texture-2d-gl-private.h \
|
||||
driver/gl/cogl-texture-2d-gl.c \
|
||||
driver/gl/cogl-attribute-gl-private.h \
|
||||
driver/gl/cogl-attribute-gl.c \
|
||||
driver/gl/cogl-clip-stack-gl-private.h \
|
||||
driver/gl/cogl-clip-stack-gl.c \
|
||||
driver/gl/cogl-buffer-gl-private.h \
|
||||
driver/gl/cogl-buffer-gl.c \
|
||||
driver/gl/cogl-pipeline-opengl.c \
|
||||
driver/gl/cogl-pipeline-opengl-private.h \
|
||||
driver/gl/cogl-pipeline-fragend-glsl.c \
|
||||
driver/gl/cogl-pipeline-fragend-glsl-private.h \
|
||||
driver/gl/cogl-pipeline-vertend-glsl.c \
|
||||
driver/gl/cogl-pipeline-vertend-glsl-private.h \
|
||||
driver/gl/cogl-pipeline-progend-glsl.c \
|
||||
driver/gl/cogl-pipeline-progend-glsl-private.h \
|
||||
$(NULL)
|
||||
|
||||
if COGL_DRIVER_GL_SUPPORTED
|
||||
cogl_driver_sources += \
|
||||
driver/gl/gl/cogl-driver-gl.c \
|
||||
driver/gl/gl/cogl-texture-driver-gl.c \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
if COGL_DRIVER_GLES_SUPPORTED
|
||||
cogl_driver_sources += \
|
||||
driver/gl/gles/cogl-driver-gles.c \
|
||||
driver/gl/gles/cogl-texture-driver-gles.c \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
# winsys sources, common to all backends
|
||||
cogl_winsys_common_sources = \
|
||||
winsys/cogl-winsys-private.h \
|
||||
winsys/cogl-winsys.c \
|
||||
$(NULL)
|
||||
|
||||
# sources
|
||||
cogl_sources_c = \
|
||||
$(cogl_driver_sources) \
|
||||
$(cogl_winsys_common_sources) \
|
||||
cogl-private.h \
|
||||
cogl-i18n-private.h \
|
||||
cogl-debug.h \
|
||||
cogl-debug-options.h \
|
||||
cogl-gpu-info.c \
|
||||
cogl-gpu-info-private.h \
|
||||
cogl-context-private.h \
|
||||
cogl-context.c \
|
||||
cogl-renderer-private.h \
|
||||
cogl-renderer.h \
|
||||
cogl-renderer.c \
|
||||
cogl-swap-chain-private.h \
|
||||
cogl-swap-chain.h \
|
||||
cogl-swap-chain.c \
|
||||
cogl-onscreen-template-private.h \
|
||||
cogl-onscreen-template.h \
|
||||
cogl-onscreen-template.c \
|
||||
cogl-display-private.h \
|
||||
cogl-display.h \
|
||||
cogl-display.c \
|
||||
cogl-driver.h \
|
||||
cogl.c \
|
||||
cogl-object-private.h \
|
||||
cogl-object.h \
|
||||
cogl-object.c \
|
||||
cogl-util.h \
|
||||
cogl-util.c \
|
||||
cogl-bitmap-private.h \
|
||||
cogl-bitmap.c \
|
||||
cogl-bitmap-conversion.c \
|
||||
cogl-bitmap-packing.h \
|
||||
cogl-primitives-private.h \
|
||||
cogl-primitives.h \
|
||||
cogl-primitives.c \
|
||||
cogl-bitmap-pixbuf.c \
|
||||
cogl-clip-stack.h \
|
||||
cogl-clip-stack.c \
|
||||
cogl-feature-private.h \
|
||||
cogl-feature-private.c \
|
||||
cogl-color-private.h \
|
||||
cogl-color.c \
|
||||
cogl-buffer-private.h \
|
||||
cogl-buffer.c \
|
||||
cogl-pixel-buffer-private.h \
|
||||
cogl-pixel-buffer.c \
|
||||
cogl-index-buffer-private.h \
|
||||
cogl-index-buffer.c \
|
||||
cogl-attribute-buffer-private.h \
|
||||
cogl-attribute-buffer.c \
|
||||
cogl-indices-private.h \
|
||||
cogl-indices.c \
|
||||
cogl-attribute-private.h \
|
||||
cogl-attribute.c \
|
||||
cogl-primitive-private.h \
|
||||
cogl-primitive.c \
|
||||
cogl-matrix.c \
|
||||
cogl-vector.c \
|
||||
cogl-euler.c \
|
||||
cogl-quaternion-private.h \
|
||||
cogl-quaternion.c \
|
||||
cogl-matrix-private.h \
|
||||
cogl-matrix-stack.c \
|
||||
cogl-matrix-stack-private.h \
|
||||
cogl-depth-state.c \
|
||||
cogl-depth-state-private.h \
|
||||
cogl-node.c \
|
||||
cogl-node-private.h \
|
||||
cogl-pipeline.c \
|
||||
cogl-pipeline-private.h \
|
||||
cogl-pipeline-layer.c \
|
||||
cogl-pipeline-layer-private.h \
|
||||
cogl-pipeline-state.c \
|
||||
cogl-pipeline-layer-state-private.h \
|
||||
cogl-pipeline-layer-state.c \
|
||||
cogl-pipeline-state-private.h \
|
||||
cogl-pipeline-debug.c \
|
||||
cogl-glsl-shader.c \
|
||||
cogl-glsl-shader-private.h \
|
||||
cogl-glsl-shader-boilerplate.h \
|
||||
cogl-pipeline-snippet-private.h \
|
||||
cogl-pipeline-snippet.c \
|
||||
cogl-pipeline-cache.h \
|
||||
cogl-pipeline-cache.c \
|
||||
cogl-pipeline-hash-table.h \
|
||||
cogl-pipeline-hash-table.c \
|
||||
cogl-sampler-cache.c \
|
||||
cogl-sampler-cache-private.h \
|
||||
cogl-blend-string.c \
|
||||
cogl-blend-string.h \
|
||||
cogl-debug.c \
|
||||
cogl-sub-texture-private.h \
|
||||
cogl-texture-private.h \
|
||||
cogl-texture-2d-private.h \
|
||||
cogl-texture-2d-sliced-private.h \
|
||||
cogl-texture-3d-private.h \
|
||||
cogl-texture-driver.h \
|
||||
cogl-sub-texture.c \
|
||||
cogl-texture.c \
|
||||
cogl-texture-2d.c \
|
||||
cogl-texture-2d-sliced.c \
|
||||
cogl-texture-3d.c \
|
||||
cogl-texture-rectangle-private.h \
|
||||
cogl-texture-rectangle.c \
|
||||
cogl-rectangle-map.h \
|
||||
cogl-rectangle-map.c \
|
||||
cogl-atlas.h \
|
||||
cogl-atlas.c \
|
||||
cogl-atlas-texture-private.h \
|
||||
cogl-atlas-texture.c \
|
||||
cogl-meta-texture.c \
|
||||
cogl-primitive-texture.c \
|
||||
cogl-blit.h \
|
||||
cogl-blit.c \
|
||||
cogl-spans.h \
|
||||
cogl-spans.c \
|
||||
cogl-journal-private.h \
|
||||
cogl-journal.c \
|
||||
cogl-frame-info-private.h \
|
||||
cogl-frame-info.c \
|
||||
cogl-framebuffer-private.h \
|
||||
cogl-framebuffer.c \
|
||||
cogl-onscreen-private.h \
|
||||
cogl-onscreen.c \
|
||||
cogl-output-private.h \
|
||||
cogl-output.c \
|
||||
cogl-profile.h \
|
||||
cogl-profile.c \
|
||||
cogl-flags.h \
|
||||
cogl-bitmask.h \
|
||||
cogl-bitmask.c \
|
||||
cogl-gtype.c \
|
||||
cogl-gtype-private.h \
|
||||
cogl-point-in-poly-private.h \
|
||||
cogl-point-in-poly.c \
|
||||
cogl-list.c \
|
||||
cogl-list.h \
|
||||
winsys/cogl-winsys-stub-private.h \
|
||||
winsys/cogl-winsys-stub.c \
|
||||
cogl-config-private.h \
|
||||
cogl-config.c \
|
||||
cogl-boxed-value.h \
|
||||
cogl-boxed-value.c \
|
||||
cogl-snippet-private.h \
|
||||
cogl-snippet.c \
|
||||
cogl-poll-private.h \
|
||||
cogl-poll.c \
|
||||
gl-prototypes/cogl-all-functions.h \
|
||||
gl-prototypes/cogl-gles2-functions.h \
|
||||
gl-prototypes/cogl-core-functions.h \
|
||||
gl-prototypes/cogl-in-gles-core-functions.h \
|
||||
gl-prototypes/cogl-in-gles2-core-functions.h \
|
||||
gl-prototypes/cogl-fixed-functions.h \
|
||||
gl-prototypes/cogl-glsl-functions.h \
|
||||
cogl-memory-stack-private.h \
|
||||
cogl-memory-stack.c \
|
||||
cogl-magazine-private.h \
|
||||
cogl-magazine.c \
|
||||
cogl-gles2-context-private.h \
|
||||
cogl-gles2-context.c \
|
||||
cogl-error-private.h \
|
||||
cogl-error.c \
|
||||
cogl-closure-list-private.h \
|
||||
cogl-closure-list.c \
|
||||
cogl-fence.c \
|
||||
cogl-fence-private.h \
|
||||
deprecated/cogl-vertex-buffer-private.h \
|
||||
deprecated/cogl-vertex-buffer.c \
|
||||
deprecated/cogl-material-compat.c \
|
||||
deprecated/cogl-program.c \
|
||||
deprecated/cogl-program-private.h \
|
||||
deprecated/cogl-auto-texture.c \
|
||||
deprecated/cogl-shader-private.h \
|
||||
deprecated/cogl-shader.c \
|
||||
deprecated/cogl-clutter.c \
|
||||
deprecated/cogl-framebuffer-deprecated.c \
|
||||
$(NULL)
|
||||
|
||||
cogl_nonintrospected_h += cogl-glib-source.h
|
||||
cogl_sources_c += cogl-glib-source.c
|
||||
|
||||
if SUPPORT_XLIB
|
||||
cogl_deprecated_nonintrospected_h += deprecated/cogl-clutter-xlib.h
|
||||
cogl_1_public_h += cogl-xlib-renderer.h
|
||||
|
||||
cogl_nonintrospected_h += \
|
||||
winsys/cogl-texture-pixmap-x11.h \
|
||||
cogl-xlib.h
|
||||
|
||||
cogl_sources_c += \
|
||||
cogl-x11-renderer-private.h \
|
||||
cogl-xlib-renderer-private.h \
|
||||
cogl-xlib-renderer.c \
|
||||
cogl-xlib.c \
|
||||
cogl-xlib-private.h \
|
||||
winsys/cogl-texture-pixmap-x11.c \
|
||||
winsys/cogl-texture-pixmap-x11-private.h
|
||||
endif
|
||||
if SUPPORT_GLX
|
||||
cogl_nonintrospected_h += cogl-glx.h
|
||||
cogl_sources_c += \
|
||||
cogl-glx-renderer-private.h \
|
||||
cogl-glx-display-private.h \
|
||||
winsys/cogl-winsys-glx-feature-functions.h \
|
||||
winsys/cogl-winsys-glx-private.h \
|
||||
winsys/cogl-winsys-glx.c
|
||||
endif
|
||||
if SUPPORT_WAYLAND_EGL_SERVER
|
||||
cogl_nonintrospected_h += cogl-wayland-server.h
|
||||
endif
|
||||
if SUPPORT_EGL_PLATFORM_XLIB
|
||||
cogl_sources_c += \
|
||||
winsys/cogl-winsys-egl-x11.c \
|
||||
winsys/cogl-winsys-egl-x11-private.h
|
||||
endif
|
||||
if SUPPORT_EGL
|
||||
cogl_nonintrospected_h += cogl-egl.h
|
||||
cogl_nodist_h += cogl-egl-defines.h
|
||||
|
||||
cogl_sources_c += \
|
||||
cogl-egl-private.h \
|
||||
winsys/cogl-winsys-egl.c \
|
||||
winsys/cogl-winsys-egl-feature-functions.h \
|
||||
winsys/cogl-winsys-egl-private.h
|
||||
endif
|
||||
|
||||
mutterlibdir = $(libdir)/mutter-@LIBMUTTER_API_VERSION@
|
||||
mutterlib_LTLIBRARIES = libmutter-cogl-@LIBMUTTER_API_VERSION@.la
|
||||
|
||||
libmutter_cogl_@LIBMUTTER_API_VERSION@_la_LIBADD = $(LIBM) $(COGL_DEP_LIBS) $(COGL_EXTRA_LDFLAGS)
|
||||
if UNIT_TESTS
|
||||
libmutter_cogl_@LIBMUTTER_API_VERSION@_la_LIBADD += $(top_builddir)/test-fixtures/libtest-fixtures.la
|
||||
endif
|
||||
# XXX: The aim is to eventually get rid of all private API exports
|
||||
# for cogl-pango.
|
||||
libmutter_cogl_@LIBMUTTER_API_VERSION@_la_LDFLAGS = \
|
||||
-no-undefined \
|
||||
-avoid-version \
|
||||
-export-dynamic \
|
||||
-rpath $(mutterlibdir) \
|
||||
-export-symbols-regex "^(cogl|_cogl_debug_flags|_cogl_atlas_new|_cogl_atlas_add_reorganize_callback|_cogl_atlas_reserve_space|_cogl_callback|_cogl_util_get_eye_planes_for_screen_poly|_cogl_atlas_texture_remove_reorganize_callback|_cogl_atlas_texture_add_reorganize_callback|_cogl_texture_get_format|_cogl_texture_foreach_sub_texture_in_region|_cogl_texture_set_region|_cogl_profile_trace_message|_cogl_context_get_default|_cogl_framebuffer_get_stencil_bits|_cogl_clip_stack_push_rectangle|_cogl_framebuffer_get_modelview_stack|_cogl_object_default_unref|_cogl_pipeline_foreach_layer_internal|_cogl_clip_stack_push_primitive|_cogl_buffer_unmap_for_fill_or_fallback|_cogl_framebuffer_draw_primitive|_cogl_debug_instances|_cogl_framebuffer_get_projection_stack|_cogl_pipeline_layer_get_texture|_cogl_buffer_map_for_fill_or_fallback|_cogl_texture_can_hardware_repeat|_cogl_pipeline_prune_to_n_layers|_cogl_primitive_draw|test_|unit_test_|_cogl_winsys_glx_get_vtable|_cogl_winsys_egl_xlib_get_vtable|_cogl_winsys_egl_get_vtable|_cogl_closure_disconnect|_cogl_onscreen_notify_complete|_cogl_onscreen_notify_frame_sync|_cogl_winsys_egl_renderer_connect_common|_cogl_winsys_error_quark|_cogl_set_error|_cogl_poll_renderer_add_fd|_cogl_poll_renderer_add_idle|_cogl_framebuffer_winsys_update_size|_cogl_winsys_egl_make_current|_cogl_winsys_egl_ensure_current|_cogl_pixel_format_get_bytes_per_pixel).*"
|
||||
|
||||
libmutter_cogl_@LIBMUTTER_API_VERSION@_la_SOURCES = $(cogl_sources_c)
|
||||
nodist_libmutter_cogl_@LIBMUTTER_API_VERSION@_la_SOURCES = $(BUILT_SOURCES)
|
||||
|
||||
# Cogl installed headers
|
||||
cogl_headers = \
|
||||
$(cogl_1_public_h) \
|
||||
cogl-deprecated.h \
|
||||
cogl-pango.h \
|
||||
$(NULL)
|
||||
|
||||
cogl_base_includedir = $(includedir)/mutter-@LIBMUTTER_API_VERSION@
|
||||
cogldeprecatedincludedir = $(cogl_base_includedir)/cogl/cogl/deprecated
|
||||
cogldeprecatedinclude_HEADERS = $(cogl_deprecated_h) $(cogl_deprecated_nonintrospected_h)
|
||||
|
||||
coglincludedir = $(cogl_base_includedir)/cogl/cogl
|
||||
coglinclude_HEADERS = $(cogl_headers) $(cogl_nonintrospected_h)
|
||||
nodist_coglinclude_HEADERS = $(cogl_nodist_h) cogl-defines.h
|
||||
|
||||
cogl_proto_includedir = $(cogl_base_includedir)/cogl/cogl/gl-prototypes
|
||||
cogl_proto_include_HEADERS = $(cogl_gl_prototypes_h)
|
||||
|
||||
EXTRA_DIST += \
|
||||
cogl.symbols
|
||||
|
||||
-include $(INTROSPECTION_MAKEFILE)
|
||||
|
||||
INTROSPECTION_GIRS =
|
||||
|
||||
if HAVE_INTROSPECTION
|
||||
Cogl-@LIBMUTTER_API_VERSION@.gir: libmutter-cogl-$(LIBMUTTER_API_VERSION).la Makefile
|
||||
|
||||
Cogl_@LIBMUTTER_API_VERSION@_gir_NAMESPACE = Cogl
|
||||
Cogl_@LIBMUTTER_API_VERSION@_gir_VERSION = $(LIBMUTTER_API_VERSION)
|
||||
Cogl_@LIBMUTTER_API_VERSION@_gir_LIBS = libmutter-cogl-$(LIBMUTTER_API_VERSION).la
|
||||
if UNIT_TESTS
|
||||
Cogl_@LIBMUTTER_API_VERSION@_gir_LIBS += $(top_builddir)/test-fixtures/libtest-fixtures.la
|
||||
endif
|
||||
Cogl_@LIBMUTTER_API_VERSION@_gir_FILES = $(cogl_1_public_h)
|
||||
|
||||
Cogl_@LIBMUTTER_API_VERSION@_gir_CFLAGS = $(AM_CPPFLAGS) $(COGL_DEP_CFLAGS) -UCOGL_COMPILATION -D__COGL_H_INSIDE__ -D__COGL_XLIB_H_INSIDE__ -D__COGL_EGL_H_INSIDE__ -D__COGL_GLX_H_INSIDE__ -DCOGL_GIR_SCANNING
|
||||
Cogl_@LIBMUTTER_API_VERSION@_gir_INCLUDES = GL-1.0 GObject-2.0
|
||||
Cogl_@LIBMUTTER_API_VERSION@_gir_EXPORT_PACKAGES = mutter-cogl-@LIBMUTTER_API_VERSION@
|
||||
Cogl_@LIBMUTTER_API_VERSION@_gir_SCANNERFLAGS = --warn-all --c-include='cogl/cogl.h'
|
||||
|
||||
INTROSPECTION_GIRS += Cogl-@LIBMUTTER_API_VERSION@.gir
|
||||
|
||||
girdir = $(mutterlibdir)
|
||||
gir_DATA = $(INTROSPECTION_GIRS)
|
||||
|
||||
typelibdir = $(mutterlibdir)
|
||||
typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
|
||||
|
||||
CLEANFILES += $(gir_DATA) $(typelib_DATA)
|
||||
endif
|
@@ -1025,6 +1025,7 @@ cogl_atlas_texture_vtable =
|
||||
FALSE, /* not primitive */
|
||||
_cogl_atlas_texture_allocate,
|
||||
_cogl_atlas_texture_set_region,
|
||||
NULL, /* is_get_data_supported */
|
||||
NULL, /* get_data */
|
||||
_cogl_atlas_texture_foreach_sub_texture_in_region,
|
||||
_cogl_atlas_texture_get_max_waste,
|
||||
|
@@ -199,6 +199,9 @@ struct _CoglDriverVtable
|
||||
int level,
|
||||
CoglError **error);
|
||||
|
||||
CoglBool
|
||||
(* texture_2d_is_get_data_supported) (CoglTexture2D *tex_2d);
|
||||
|
||||
/* Reads back the full contents of the given texture and write it to
|
||||
* @data in the given @format and with the given @rowstride.
|
||||
*
|
||||
|
@@ -59,7 +59,6 @@ typedef struct
|
||||
CoglSwapChain *swap_chain;
|
||||
CoglBool need_stencil;
|
||||
int samples_per_pixel;
|
||||
CoglBool swap_throttled;
|
||||
CoglBool depth_texture_enabled;
|
||||
CoglBool stereo_enabled;
|
||||
} CoglFramebufferConfig;
|
||||
@@ -193,6 +192,11 @@ struct _CoglFramebuffer
|
||||
CoglFramebufferBits bits;
|
||||
|
||||
int samples_per_pixel;
|
||||
|
||||
/* Whether the depth buffer was enabled for this framebuffer,
|
||||
* usually means it needs to be cleared before being reused next.
|
||||
*/
|
||||
CoglBool depth_buffer_clear_needed;
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
|
@@ -116,6 +116,7 @@ _cogl_framebuffer_init (CoglFramebuffer *framebuffer,
|
||||
framebuffer->viewport_age_for_scissor_workaround = -1;
|
||||
framebuffer->dither_enabled = TRUE;
|
||||
framebuffer->depth_writing_enabled = TRUE;
|
||||
framebuffer->depth_buffer_clear_needed = TRUE;
|
||||
|
||||
framebuffer->modelview_stack = cogl_matrix_stack_new (ctx);
|
||||
framebuffer->projection_stack = cogl_matrix_stack_new (ctx);
|
||||
@@ -267,6 +268,13 @@ cogl_framebuffer_clear4f (CoglFramebuffer *framebuffer,
|
||||
int scissor_y1;
|
||||
CoglBool saved_viewport_scissor_workaround;
|
||||
|
||||
if (!framebuffer->depth_buffer_clear_needed &&
|
||||
(buffers & COGL_BUFFER_BIT_DEPTH))
|
||||
buffers &= ~(COGL_BUFFER_BIT_DEPTH);
|
||||
|
||||
if (buffers == 0)
|
||||
return;
|
||||
|
||||
_cogl_clip_stack_get_bounds (clip_stack,
|
||||
&scissor_x0, &scissor_y0,
|
||||
&scissor_x1, &scissor_y1);
|
||||
@@ -414,6 +422,9 @@ cleared:
|
||||
_cogl_framebuffer_mark_mid_scene (framebuffer);
|
||||
_cogl_framebuffer_mark_clear_clip_dirty (framebuffer);
|
||||
|
||||
if (buffers & COGL_BUFFER_BIT_DEPTH)
|
||||
framebuffer->depth_buffer_clear_needed = FALSE;
|
||||
|
||||
if (buffers & COGL_BUFFER_BIT_COLOR && buffers & COGL_BUFFER_BIT_DEPTH)
|
||||
{
|
||||
/* For our fast-path for reading back a single pixel of simple
|
||||
|
@@ -65,8 +65,6 @@ struct _CoglOnscreen
|
||||
void *foreign_update_mask_data;
|
||||
#endif
|
||||
|
||||
CoglBool swap_throttled;
|
||||
|
||||
CoglList frame_closures;
|
||||
|
||||
CoglBool resizable;
|
||||
|
@@ -62,7 +62,6 @@ cogl_onscreen_template_new (CoglSwapChain *swap_chain)
|
||||
else
|
||||
onscreen_template->config.swap_chain = cogl_swap_chain_new ();
|
||||
|
||||
onscreen_template->config.swap_throttled = TRUE;
|
||||
onscreen_template->config.need_stencil = TRUE;
|
||||
onscreen_template->config.samples_per_pixel = 0;
|
||||
|
||||
@@ -86,14 +85,6 @@ cogl_onscreen_template_set_samples_per_pixel (
|
||||
onscreen_template->config.samples_per_pixel = samples_per_pixel;
|
||||
}
|
||||
|
||||
void
|
||||
cogl_onscreen_template_set_swap_throttled (
|
||||
CoglOnscreenTemplate *onscreen_template,
|
||||
CoglBool throttled)
|
||||
{
|
||||
onscreen_template->config.swap_throttled = throttled;
|
||||
}
|
||||
|
||||
void
|
||||
cogl_onscreen_template_set_stereo_enabled (
|
||||
CoglOnscreenTemplate *onscreen_template,
|
||||
|
@@ -85,23 +85,6 @@ cogl_onscreen_template_set_samples_per_pixel (
|
||||
CoglOnscreenTemplate *onscreen_template,
|
||||
int n);
|
||||
|
||||
/**
|
||||
* cogl_onscreen_template_set_swap_throttled:
|
||||
* @onscreen_template: A #CoglOnscreenTemplate template framebuffer
|
||||
* @throttled: Whether throttling should be enabled
|
||||
*
|
||||
* Requests that any future #CoglOnscreen framebuffers derived from this
|
||||
* template should enable or disable swap throttling according to the given
|
||||
* @throttled argument.
|
||||
*
|
||||
* Since: 1.10
|
||||
* Stability: unstable
|
||||
*/
|
||||
void
|
||||
cogl_onscreen_template_set_swap_throttled (
|
||||
CoglOnscreenTemplate *onscreen_template,
|
||||
CoglBool throttled);
|
||||
|
||||
/**
|
||||
* cogl_onscreen_template_set_stereo_enabled:
|
||||
* @onscreen_template: A #CoglOnscreenTemplate template framebuffer
|
||||
|
@@ -557,20 +557,6 @@ cogl_onscreen_remove_swap_buffers_callback (CoglOnscreen *onscreen,
|
||||
cogl_onscreen_remove_frame_callback (onscreen, closure);
|
||||
}
|
||||
|
||||
void
|
||||
cogl_onscreen_set_swap_throttled (CoglOnscreen *onscreen,
|
||||
CoglBool throttled)
|
||||
{
|
||||
CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (onscreen);
|
||||
framebuffer->config.swap_throttled = throttled;
|
||||
if (framebuffer->allocated)
|
||||
{
|
||||
const CoglWinsysVtable *winsys =
|
||||
_cogl_framebuffer_get_winsys (framebuffer);
|
||||
winsys->onscreen_update_swap_throttled (onscreen);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
cogl_onscreen_show (CoglOnscreen *onscreen)
|
||||
{
|
||||
|
@@ -162,23 +162,6 @@ uint32_t
|
||||
cogl_x11_onscreen_get_visual_xid (CoglOnscreen *onscreen);
|
||||
#endif /* COGL_HAS_X11 */
|
||||
|
||||
/**
|
||||
* cogl_onscreen_set_swap_throttled:
|
||||
* @onscreen: A #CoglOnscreen framebuffer
|
||||
* @throttled: Whether swap throttling is wanted or not.
|
||||
*
|
||||
* Requests that the given @onscreen framebuffer should have swap buffer
|
||||
* requests (made using cogl_onscreen_swap_buffers()) throttled either by a
|
||||
* displays vblank period or perhaps some other mechanism in a composited
|
||||
* environment.
|
||||
*
|
||||
* Since: 1.8
|
||||
* Stability: unstable
|
||||
*/
|
||||
void
|
||||
cogl_onscreen_set_swap_throttled (CoglOnscreen *onscreen,
|
||||
CoglBool throttled);
|
||||
|
||||
/**
|
||||
* cogl_onscreen_show:
|
||||
* @onscreen: The onscreen framebuffer to make visible
|
||||
@@ -554,9 +537,8 @@ typedef void (*CoglSwapBuffersNotify) (CoglFramebuffer *framebuffer,
|
||||
* registered callbacks will be called if this feature is not supported.</note>
|
||||
*
|
||||
* We recommend using this mechanism when available to manually throttle your
|
||||
* applications (in conjunction with cogl_onscreen_set_swap_throttled()) so
|
||||
* your application will be able to avoid long blocks in the driver caused by
|
||||
* throttling when you request to swap buffers too quickly.
|
||||
* applications so your application will be able to avoid long blocks in the
|
||||
* driver caused by throttling when you request to swap buffers too quickly.
|
||||
*
|
||||
* Return value: a unique identifier that can be used to remove to remove
|
||||
* the callback later.
|
||||
|
@@ -428,6 +428,14 @@ _cogl_sub_texture_set_region (CoglTexture *tex,
|
||||
error);
|
||||
}
|
||||
|
||||
static CoglBool
|
||||
_cogl_sub_texture_is_get_data_supported (CoglTexture *tex)
|
||||
{
|
||||
CoglSubTexture *sub_tex = COGL_SUB_TEXTURE (tex);
|
||||
|
||||
return cogl_texture_is_get_data_supported (sub_tex->full_texture);
|
||||
}
|
||||
|
||||
static CoglPixelFormat
|
||||
_cogl_sub_texture_get_format (CoglTexture *tex)
|
||||
{
|
||||
@@ -458,6 +466,7 @@ cogl_sub_texture_vtable =
|
||||
FALSE, /* not primitive */
|
||||
_cogl_sub_texture_allocate,
|
||||
_cogl_sub_texture_set_region,
|
||||
_cogl_sub_texture_is_get_data_supported,
|
||||
NULL, /* get_data */
|
||||
_cogl_sub_texture_foreach_sub_texture_in_region,
|
||||
_cogl_sub_texture_get_max_waste,
|
||||
|
@@ -1524,6 +1524,7 @@ cogl_texture_2d_sliced_vtable =
|
||||
FALSE, /* not primitive */
|
||||
_cogl_texture_2d_sliced_allocate,
|
||||
_cogl_texture_2d_sliced_set_region,
|
||||
NULL, /* is_get_data_supported */
|
||||
NULL, /* get_data */
|
||||
_cogl_texture_2d_sliced_foreach_sub_texture_in_region,
|
||||
_cogl_texture_2d_sliced_get_max_waste,
|
||||
|
@@ -629,6 +629,15 @@ _cogl_texture_2d_set_region (CoglTexture *tex,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static CoglBool
|
||||
_cogl_texture_2d_is_get_data_supported (CoglTexture *tex)
|
||||
{
|
||||
CoglTexture2D *tex_2d = COGL_TEXTURE_2D (tex);
|
||||
CoglContext *ctx = tex->context;
|
||||
|
||||
return ctx->driver_vtable->texture_2d_is_get_data_supported (tex_2d);
|
||||
}
|
||||
|
||||
static CoglBool
|
||||
_cogl_texture_2d_get_data (CoglTexture *tex,
|
||||
CoglPixelFormat format,
|
||||
@@ -677,6 +686,7 @@ cogl_texture_2d_vtable =
|
||||
TRUE, /* primitive */
|
||||
_cogl_texture_2d_allocate,
|
||||
_cogl_texture_2d_set_region,
|
||||
_cogl_texture_2d_is_get_data_supported,
|
||||
_cogl_texture_2d_get_data,
|
||||
NULL, /* foreach_sub_texture_in_region */
|
||||
_cogl_texture_2d_get_max_waste,
|
||||
|
@@ -737,6 +737,7 @@ cogl_texture_3d_vtable =
|
||||
TRUE, /* primitive */
|
||||
_cogl_texture_3d_allocate,
|
||||
_cogl_texture_3d_set_region,
|
||||
NULL, /* is_get_data_supported */
|
||||
_cogl_texture_3d_get_data,
|
||||
NULL, /* foreach_sub_texture_in_region */
|
||||
_cogl_texture_3d_get_max_waste,
|
||||
|
@@ -91,6 +91,8 @@ struct _CoglTextureVtable
|
||||
CoglBitmap *bitmap,
|
||||
CoglError **error);
|
||||
|
||||
CoglBool (* is_get_data_supported) (CoglTexture *texture);
|
||||
|
||||
/* This should copy the image data of the texture into @data. The
|
||||
requested format will have been first passed through
|
||||
ctx->texture_driver->find_best_gl_get_data_format so it should
|
||||
|
@@ -755,6 +755,7 @@ cogl_texture_rectangle_vtable =
|
||||
TRUE, /* primitive */
|
||||
_cogl_texture_rectangle_allocate,
|
||||
_cogl_texture_rectangle_set_region,
|
||||
NULL, /* is_get_data_supported */
|
||||
_cogl_texture_rectangle_get_data,
|
||||
NULL, /* foreach_sub_texture_in_region */
|
||||
_cogl_texture_rectangle_get_max_waste,
|
||||
|
@@ -203,6 +203,15 @@ _cogl_texture_is_foreign (CoglTexture *texture)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
CoglBool
|
||||
cogl_texture_is_get_data_supported (CoglTexture *texture)
|
||||
{
|
||||
if (texture->vtable->is_get_data_supported)
|
||||
return texture->vtable->is_get_data_supported (texture);
|
||||
else
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
unsigned int
|
||||
cogl_texture_get_width (CoglTexture *texture)
|
||||
{
|
||||
|
@@ -511,6 +511,12 @@ CoglBool
|
||||
cogl_texture_allocate (CoglTexture *texture,
|
||||
CoglError **error);
|
||||
|
||||
/**
|
||||
* cogl_texture_is_get_data_supported: (skip)
|
||||
*/
|
||||
CoglBool
|
||||
cogl_texture_is_get_data_supported (CoglTexture *texture);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __COGL_TEXTURE_H__ */
|
||||
|
@@ -125,15 +125,6 @@ cogl_handle_ref (CoglHandle handle);
|
||||
void
|
||||
cogl_handle_unref (CoglHandle handle);
|
||||
|
||||
/**
|
||||
* CoglFuncPtr:
|
||||
*
|
||||
* The type used by cogl for function pointers, note that this type
|
||||
* is used as a generic catch-all cast for function pointers and the
|
||||
* actual arguments and return type may be different.
|
||||
*/
|
||||
typedef void (* CoglFuncPtr) (void);
|
||||
|
||||
/* We forward declare this in cogl-types to avoid circular dependencies
|
||||
* between cogl-matrix.h, cogl-euler.h and cogl-quaterion.h */
|
||||
typedef struct _CoglMatrix CoglMatrix;
|
||||
|
@@ -59,7 +59,7 @@
|
||||
|
||||
#include "deprecated/cogl-framebuffer-deprecated.h"
|
||||
|
||||
CoglFuncPtr
|
||||
GCallback
|
||||
cogl_get_proc_address (const char* name)
|
||||
{
|
||||
_COGL_GET_CONTEXT (ctx, NULL);
|
||||
|
@@ -578,7 +578,6 @@ cogl_onscreen_get_gtype
|
||||
cogl_onscreen_get_resizable
|
||||
cogl_onscreen_hide
|
||||
cogl_onscreen_new
|
||||
cogl_onscreen_set_swap_throttled
|
||||
cogl_onscreen_remove_dirty_callback
|
||||
cogl_onscreen_remove_frame_callback
|
||||
cogl_onscreen_remove_resize_callback
|
||||
@@ -587,7 +586,6 @@ cogl_onscreen_remove_swap_buffers_callback
|
||||
cogl_onscreen_resize_closure_get_gtype
|
||||
#endif
|
||||
cogl_onscreen_set_resizable
|
||||
cogl_onscreen_set_swap_throttled
|
||||
cogl_onscreen_show
|
||||
cogl_onscreen_swap_buffers
|
||||
cogl_onscreen_swap_buffers_with_damage
|
||||
@@ -597,7 +595,6 @@ cogl_onscreen_template_get_gtype
|
||||
#endif
|
||||
cogl_onscreen_template_new
|
||||
cogl_onscreen_template_set_samples_per_pixel
|
||||
cogl_onscreen_template_set_swap_throttled
|
||||
|
||||
cogl_ortho
|
||||
|
||||
|
@@ -106,7 +106,7 @@ cogl_features_available (CoglFeatureFlags features);
|
||||
* Return value: a pointer to the requested function or %NULL if the
|
||||
* function is not available.
|
||||
*/
|
||||
CoglFuncPtr
|
||||
GCallback
|
||||
cogl_get_proc_address (const char *name);
|
||||
|
||||
/**
|
||||
|
@@ -378,7 +378,11 @@ flush_depth_state (CoglContext *ctx,
|
||||
if (ctx->depth_test_enabled_cache != depth_state->test_enabled)
|
||||
{
|
||||
if (depth_state->test_enabled == TRUE)
|
||||
GE (ctx, glEnable (GL_DEPTH_TEST));
|
||||
{
|
||||
GE (ctx, glEnable (GL_DEPTH_TEST));
|
||||
if (ctx->current_draw_buffer)
|
||||
ctx->current_draw_buffer->depth_buffer_clear_needed = TRUE;
|
||||
}
|
||||
else
|
||||
GE (ctx, glDisable (GL_DEPTH_TEST));
|
||||
ctx->depth_test_enabled_cache = depth_state->test_enabled;
|
||||
|
@@ -110,6 +110,9 @@ _cogl_texture_2d_gl_copy_from_bitmap (CoglTexture2D *tex_2d,
|
||||
int level,
|
||||
CoglError **error);
|
||||
|
||||
CoglBool
|
||||
_cogl_texture_2d_gl_is_get_data_supported (CoglTexture2D *tex_2d);
|
||||
|
||||
void
|
||||
_cogl_texture_2d_gl_get_data (CoglTexture2D *tex_2d,
|
||||
CoglPixelFormat format,
|
||||
|
@@ -470,7 +470,12 @@ allocate_custom_egl_image_external (CoglTexture2D *tex_2d,
|
||||
{
|
||||
CoglTexture *tex = COGL_TEXTURE (tex_2d);
|
||||
CoglContext *ctx = tex->context;
|
||||
CoglPixelFormat internal_format = loader->src.egl_image_external.format;
|
||||
CoglPixelFormat external_format;
|
||||
CoglPixelFormat internal_format;
|
||||
|
||||
external_format = loader->src.egl_image_external.format;
|
||||
internal_format = _cogl_texture_determine_internal_format (tex,
|
||||
external_format);
|
||||
|
||||
_cogl_gl_util_clear_gl_errors (ctx);
|
||||
|
||||
@@ -833,6 +838,15 @@ _cogl_texture_2d_gl_copy_from_bitmap (CoglTexture2D *tex_2d,
|
||||
return status;
|
||||
}
|
||||
|
||||
CoglBool
|
||||
_cogl_texture_2d_gl_is_get_data_supported (CoglTexture2D *tex_2d)
|
||||
{
|
||||
if (tex_2d->gl_target == GL_TEXTURE_EXTERNAL_OES)
|
||||
return FALSE;
|
||||
else
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
_cogl_texture_2d_gl_get_data (CoglTexture2D *tex_2d,
|
||||
CoglPixelFormat format,
|
||||
@@ -858,12 +872,12 @@ _cogl_texture_2d_gl_get_data (CoglTexture2D *tex_2d,
|
||||
width,
|
||||
bpp);
|
||||
|
||||
_cogl_bind_gl_texture_transient (GL_TEXTURE_2D,
|
||||
_cogl_bind_gl_texture_transient (tex_2d->gl_target,
|
||||
tex_2d->gl_texture,
|
||||
tex_2d->is_foreign);
|
||||
|
||||
ctx->texture_driver->gl_get_tex_image (ctx,
|
||||
GL_TEXTURE_2D,
|
||||
tex_2d->gl_target,
|
||||
gl_format,
|
||||
gl_type,
|
||||
data);
|
||||
|
@@ -705,6 +705,7 @@ _cogl_driver_gl =
|
||||
_cogl_texture_2d_gl_get_gl_handle,
|
||||
_cogl_texture_2d_gl_generate_mipmap,
|
||||
_cogl_texture_2d_gl_copy_from_bitmap,
|
||||
_cogl_texture_2d_gl_is_get_data_supported,
|
||||
_cogl_texture_2d_gl_get_data,
|
||||
_cogl_gl_flush_attributes_state,
|
||||
_cogl_clip_stack_gl_flush,
|
||||
|
@@ -469,6 +469,7 @@ _cogl_driver_gles =
|
||||
_cogl_texture_2d_gl_get_gl_handle,
|
||||
_cogl_texture_2d_gl_generate_mipmap,
|
||||
_cogl_texture_2d_gl_copy_from_bitmap,
|
||||
NULL, /* texture_2d_is_get_data_supported */
|
||||
NULL, /* texture_2d_get_data */
|
||||
_cogl_gl_flush_attributes_state,
|
||||
_cogl_clip_stack_gl_flush,
|
||||
|
@@ -79,6 +79,7 @@ _cogl_driver_nop =
|
||||
_cogl_texture_2d_nop_get_gl_handle,
|
||||
_cogl_texture_2d_nop_generate_mipmap,
|
||||
_cogl_texture_2d_nop_copy_from_bitmap,
|
||||
NULL, /* texture_2d_is_get_data_supported */
|
||||
NULL, /* texture_2d_get_data */
|
||||
_cogl_nop_flush_attributes_state,
|
||||
_cogl_clip_stack_nop_flush,
|
||||
|
@@ -488,14 +488,13 @@ if have_introspection
|
||||
namespace: 'Cogl',
|
||||
includes: ['GL-1.0', 'GObject-2.0'],
|
||||
dependencies: [cogl_deps],
|
||||
extra_args: [
|
||||
extra_args: introspection_args + [
|
||||
'-UCOGL_COMPILATION',
|
||||
'-D__COGL_H_INSIDE__',
|
||||
'-D__COGL_XLIB_H_INSIDE__',
|
||||
'-D__COGL_EGL_H_INSIDE__',
|
||||
'-D__COGL_GLX_H_INSIDE__',
|
||||
'-DCOGL_GIR_SCANNING',
|
||||
'-U_GNU_SOURCE',
|
||||
],
|
||||
install_dir_gir: pkglibdir,
|
||||
install_dir_typelib: pkglibdir,
|
||||
@@ -518,15 +517,16 @@ install_headers([
|
||||
install_headers(cogl_gl_prototype_headers,
|
||||
subdir: join_paths(cogl_cogl_includedir, 'gl-prototypes'))
|
||||
|
||||
pkg.generate(
|
||||
pkg.generate(libmutter_cogl,
|
||||
name: 'Cogl',
|
||||
filebase: libmutter_cogl_name,
|
||||
description: 'An object oriented GL/GLES Abstraction/Utility Layer in mutter',
|
||||
libraries: [libmutter_cogl, m_dep],
|
||||
libraries: [m_dep],
|
||||
subdirs: join_paths(pkgname, 'cogl'),
|
||||
requires: [cogl_pkg_deps],
|
||||
version: meson.project_version(),
|
||||
variables: [
|
||||
'apiversion=' + libmutter_api_version,
|
||||
],
|
||||
install_dir: pcdir,
|
||||
)
|
||||
|
@@ -1162,6 +1162,7 @@ cogl_texture_pixmap_x11_vtable =
|
||||
FALSE, /* not primitive */
|
||||
_cogl_texture_pixmap_x11_allocate,
|
||||
_cogl_texture_pixmap_x11_set_region,
|
||||
NULL, /* is_get_data_supported */
|
||||
_cogl_texture_pixmap_x11_get_data,
|
||||
_cogl_texture_pixmap_x11_foreach_sub_texture_in_region,
|
||||
_cogl_texture_pixmap_x11_get_max_waste,
|
||||
|
@@ -147,3 +147,11 @@ COGL_WINSYS_FEATURE_BEGIN (surfaceless_context,
|
||||
"surfaceless_context\0",
|
||||
COGL_EGL_WINSYS_FEATURE_SURFACELESS_CONTEXT)
|
||||
COGL_WINSYS_FEATURE_END ()
|
||||
|
||||
#ifdef EGL_IMG_context_priority
|
||||
COGL_WINSYS_FEATURE_BEGIN (context_priority,
|
||||
"IMG\0",
|
||||
"context_priority\0",
|
||||
COGL_EGL_WINSYS_FEATURE_CONTEXT_PRIORITY)
|
||||
COGL_WINSYS_FEATURE_END ()
|
||||
#endif
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user