Compare commits
6 Commits
3.35.2
...
wip/nielsd
Author | SHA1 | Date | |
---|---|---|---|
![]() |
5f1410f968 | ||
![]() |
156aa3dd99 | ||
![]() |
b590c90e90 | ||
![]() |
a8ee0d8b80 | ||
![]() |
19137361d7 | ||
![]() |
1c7472b24d |
29
.gitignore
vendored
29
.gitignore
vendored
@@ -1,9 +1,25 @@
|
|||||||
|
Makefile
|
||||||
|
Makefile.in
|
||||||
|
Makefile.in.in
|
||||||
|
aclocal.m4
|
||||||
|
autom4te.cache
|
||||||
build-aux
|
build-aux
|
||||||
compile
|
compile
|
||||||
|
config.guess
|
||||||
config.h
|
config.h
|
||||||
config.h.in
|
config.h.in
|
||||||
|
config.log
|
||||||
|
config.status
|
||||||
|
config.sub
|
||||||
|
configure
|
||||||
|
depcomp
|
||||||
|
install-sh
|
||||||
|
intltool-extract.in
|
||||||
|
intltool-merge.in
|
||||||
|
libtool
|
||||||
ltmain.sh
|
ltmain.sh
|
||||||
missing
|
missing
|
||||||
|
.deps
|
||||||
50-mutter-navigation.xml
|
50-mutter-navigation.xml
|
||||||
50-mutter-system.xml
|
50-mutter-system.xml
|
||||||
50-mutter-windows.xml
|
50-mutter-windows.xml
|
||||||
@@ -17,11 +33,15 @@ mutter-wayland.desktop
|
|||||||
*.swp
|
*.swp
|
||||||
*.gir
|
*.gir
|
||||||
*.typelib
|
*.typelib
|
||||||
|
stamp-h1
|
||||||
*.gmo
|
*.gmo
|
||||||
*.make
|
*.make
|
||||||
*.log
|
*.log
|
||||||
*.trs
|
*.trs
|
||||||
*~
|
*~
|
||||||
|
stamp-it
|
||||||
|
.intltool-merge-cache
|
||||||
|
ABOUT-NLS
|
||||||
POTFILES
|
POTFILES
|
||||||
Makevars.template
|
Makevars.template
|
||||||
po/*.header
|
po/*.header
|
||||||
@@ -44,7 +64,9 @@ org.gnome.mutter.wayland.gschema.xml
|
|||||||
testasyncgetprop
|
testasyncgetprop
|
||||||
testboxes
|
testboxes
|
||||||
testgradient
|
testgradient
|
||||||
|
m4/*
|
||||||
INSTALL
|
INSTALL
|
||||||
|
mkinstalldirs
|
||||||
meta-enum-types.[ch]
|
meta-enum-types.[ch]
|
||||||
src/stamp-meta-enum-types.h
|
src/stamp-meta-enum-types.h
|
||||||
src/meta-dbus-display-config.[ch]
|
src/meta-dbus-display-config.[ch]
|
||||||
@@ -100,6 +122,13 @@ doc/reference/meta-undocumented.txt
|
|||||||
doc/reference/meta-unused.txt
|
doc/reference/meta-unused.txt
|
||||||
doc/reference/meta-docs.sgml
|
doc/reference/meta-docs.sgml
|
||||||
doc/reference/meta.types
|
doc/reference/meta.types
|
||||||
|
gtk-doc.m4
|
||||||
|
intltool.m4
|
||||||
|
libtool.m4
|
||||||
|
ltoptions.m4
|
||||||
|
ltsugar.m4
|
||||||
|
ltversion.m4
|
||||||
|
lt~obsolete.m4
|
||||||
.dirstamp
|
.dirstamp
|
||||||
**/tags.*
|
**/tags.*
|
||||||
build/
|
build/
|
||||||
|
@@ -1,79 +1,24 @@
|
|||||||
image: registry.gitlab.gnome.org/gnome/mutter/master:v3
|
image: registry.gitlab.gnome.org/gnome/mutter/master:v1
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- review
|
|
||||||
- build
|
- build
|
||||||
- test
|
- test
|
||||||
|
|
||||||
check-commit-log:
|
|
||||||
stage: review
|
|
||||||
variables:
|
|
||||||
GIT_DEPTH: "100"
|
|
||||||
script:
|
|
||||||
- ./.gitlab-ci/check-commit-log.sh
|
|
||||||
only:
|
|
||||||
- merge_requests
|
|
||||||
|
|
||||||
build-mutter:
|
build-mutter:
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
- meson . build -Dbuildtype=debugoptimized -Degl_device=true -Dwayland_eglstream=true --werror --prefix /usr
|
- meson . build -Degl_device=true -Dwayland_eglstream=true
|
||||||
- ninja -C build
|
- ninja -C build
|
||||||
- ninja -C build install
|
- ninja -C build install
|
||||||
artifacts:
|
|
||||||
expire_in: 1 day
|
|
||||||
paths:
|
|
||||||
- build
|
|
||||||
only:
|
|
||||||
- merge_requests
|
|
||||||
- /^.*$/
|
|
||||||
|
|
||||||
build-without-native-backend-and-wayland:
|
|
||||||
stage: build
|
|
||||||
script:
|
|
||||||
- meson . build -Dbuildtype=debugoptimized -Dnative_backend=false -Dudev=false -Dwayland=false -Dcore_tests=false --werror --prefix /usr
|
|
||||||
- ninja -C build
|
|
||||||
- ninja -C build install
|
|
||||||
artifacts:
|
|
||||||
expire_in: 1 day
|
|
||||||
paths:
|
|
||||||
- build
|
|
||||||
only:
|
|
||||||
- merge_requests
|
|
||||||
- /^.*$/
|
|
||||||
|
|
||||||
test-mutter:
|
test-mutter:
|
||||||
stage: test
|
stage: test
|
||||||
dependencies:
|
|
||||||
- build-mutter
|
|
||||||
variables:
|
|
||||||
XDG_RUNTIME_DIR: "$CI_PROJECT_DIR/runtime-dir"
|
|
||||||
GSETTINGS_SCHEMA_DIR: "$CI_PROJECT_DIR/build/data"
|
|
||||||
G_SLICE: "always-malloc"
|
|
||||||
MALLOC_CHECK_: "3"
|
|
||||||
NO_AT_BRIDGE: "1"
|
|
||||||
MALLOC_PERTURB_: "123"
|
|
||||||
script:
|
script:
|
||||||
- dconf update
|
- meson . build -Degl_device=true -Dwayland_eglstream=true
|
||||||
- mkdir -m 700 $XDG_RUNTIME_DIR
|
- ninja -C build
|
||||||
- glib-compile-schemas $GSETTINGS_SCHEMA_DIR
|
- glib-compile-schemas $PWD/build/data
|
||||||
- >
|
- env XDG_RUNTIME_DIR=/tmp/ GSETTINGS_SCHEMA_DIR=$PWD/build/data dbus-run-session -- xvfb-run -s '+iglx -noreset' meson test -C build --verbose --no-stdsplit
|
||||||
dbus-run-session -- xvfb-run -s '+iglx -noreset'
|
artifacts:
|
||||||
meson test -C build --no-rebuild -t 10 --verbose --no-stdsplit --print-errorlogs --wrap catchsegv
|
paths:
|
||||||
only:
|
- build/meson-logs
|
||||||
- merge_requests
|
when: on_failure
|
||||||
- /^.*$/
|
|
||||||
|
|
||||||
can-build-gnome-shell:
|
|
||||||
stage: test
|
|
||||||
dependencies:
|
|
||||||
- build-mutter
|
|
||||||
before_script:
|
|
||||||
- meson install --no-rebuild -C build
|
|
||||||
script:
|
|
||||||
- .gitlab-ci/checkout-gnome-shell.sh
|
|
||||||
- meson gnome-shell gnome-shell/build --prefix /usr -Dman=false
|
|
||||||
- ninja -C gnome-shell/build install
|
|
||||||
only:
|
|
||||||
- merge_requests
|
|
||||||
- /^.*$/
|
|
||||||
|
@@ -1,29 +1,14 @@
|
|||||||
# Rebuild and push with
|
FROM fedora:29
|
||||||
#
|
|
||||||
# cd .gitlab-ci/
|
|
||||||
# podman build --format docker --no-cache -t registry.gitlab.gnome.org/gnome/mutter/master:v3 .
|
|
||||||
# podman push registry.gitlab.gnome.org/gnome/mutter/master:v3
|
|
||||||
#
|
|
||||||
|
|
||||||
FROM fedora:31
|
|
||||||
|
|
||||||
RUN dnf -y update && dnf -y upgrade && \
|
RUN dnf -y update && dnf -y upgrade && \
|
||||||
dnf install -y 'dnf-command(builddep)' && \
|
dnf install -y 'dnf-command(builddep)' && \
|
||||||
dnf install -y 'dnf-command(copr)' && \
|
|
||||||
dnf copr enable -y fmuellner/gnome-shell-ci && \
|
|
||||||
dnf -y update && dnf -y upgrade && \
|
|
||||||
|
|
||||||
dnf builddep -y mutter && \
|
dnf builddep -y mutter && \
|
||||||
|
|
||||||
# Until Fedora catches up with new build-deps
|
# Until Fedora catches up with meson build-deps
|
||||||
dnf install -y 'pkgconfig(graphene-gobject-1.0)' 'pkgconfig(sysprof-capture-3)' && \
|
dnf install -y meson xorg-x11-server-Xorg gnome-settings-daemon-devel egl-wayland-devel xorg-x11-server-Xwayland && \
|
||||||
|
|
||||||
# For running unit tests
|
# For running unit tests
|
||||||
dnf install -y xorg-x11-server-Xvfb mesa-dri-drivers dbus dbus-x11 '*/xvfb-run' gdm-lib accountsservice-libs gnome-control-center && \
|
dnf install -y xorg-x11-server-Xvfb mesa-dri-drivers dbus dbus-x11 && \
|
||||||
|
|
||||||
# GNOME Shell
|
|
||||||
dnf builddep -y gnome-shell --setopt=install_weak_deps=False && \
|
|
||||||
dnf remove -y gnome-bluetooth-libs-devel dbus-glib-devel upower-devel python3-devel && \
|
|
||||||
dnf remove -y --noautoremove mutter mutter-devel && \
|
|
||||||
|
|
||||||
|
dnf install -y intltool redhat-rpm-config make && \
|
||||||
dnf clean all
|
dnf clean all
|
||||||
|
@@ -1,60 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
if [ -z "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" ]; then
|
|
||||||
echo Cannot review non-merge request
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
git fetch $CI_MERGE_REQUEST_PROJECT_URL.git $CI_MERGE_REQUEST_TARGET_BRANCH_NAME
|
|
||||||
|
|
||||||
branch_point=$(git merge-base HEAD FETCH_HEAD)
|
|
||||||
|
|
||||||
commits=$(git log --format='format:%H' $branch_point..$CI_COMMIT_SHA)
|
|
||||||
|
|
||||||
if [ -z "$commits" ]; then
|
|
||||||
echo Commit range empty
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
function commit_message_has_url() {
|
|
||||||
commit=$1
|
|
||||||
commit_message=$(git show -s --format='format:%b' $commit)
|
|
||||||
echo "$commit_message" | grep -qe "\($CI_MERGE_REQUEST_PROJECT_URL/\(issues\|merge_requests\)/[0-9]\+\|https://bugzilla.gnome.org/show_bug.cgi?id=[0-9]\+\)"
|
|
||||||
return $?
|
|
||||||
}
|
|
||||||
|
|
||||||
function commit_message_subject_is_compliant() {
|
|
||||||
commit=$1
|
|
||||||
commit_message_subject=$(git show -s --format='format:%s' $commit)
|
|
||||||
|
|
||||||
if echo "$commit_message_subject" | grep -qe "\(^meta-\|^Meta\)"; then
|
|
||||||
echo " - message subject should not be prefixed with 'meta-' or 'Meta'"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if echo "$commit_message_subject" | grep -qe "\.[ch]:"; then
|
|
||||||
echo " - message subject prefix should not include .c, .h, etc."
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
RET=0
|
|
||||||
for commit in $commits; do
|
|
||||||
commit_short=$(echo $commit | cut -c -8)
|
|
||||||
|
|
||||||
if ! commit_message_has_url $commit; then
|
|
||||||
echo "Commit $commit_short needs a merge request or issue URL"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
errors=$(commit_message_subject_is_compliant $commit)
|
|
||||||
if [ $? != 0 ]; then
|
|
||||||
echo "Commit message for $commit_short is not compliant:"
|
|
||||||
echo "$errors"
|
|
||||||
RET=1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
exit $RET
|
|
@@ -1,33 +0,0 @@
|
|||||||
#!/usr/bin/bash
|
|
||||||
|
|
||||||
gnome_shell_target=
|
|
||||||
|
|
||||||
git clone https://gitlab.gnome.org/GNOME/gnome-shell.git
|
|
||||||
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo Checkout failed
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd gnome-shell
|
|
||||||
|
|
||||||
if [ "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" ]; then
|
|
||||||
merge_request_remote=${CI_MERGE_REQUEST_SOURCE_PROJECT_URL//mutter/gnome-shell}
|
|
||||||
merge_request_branch=$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
|
|
||||||
|
|
||||||
echo Looking for $merge_request_branch on remote ...
|
|
||||||
if git fetch -q $merge_request_remote $merge_request_branch 2>/dev/null; then
|
|
||||||
gnome_shell_target=FETCH_HEAD
|
|
||||||
else
|
|
||||||
gnome_shell_target=origin/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME
|
|
||||||
echo Using $gnome_shell_target instead
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$gnome_shell_target" ]; then
|
|
||||||
gnome_shell_target=$(git branch -r -l origin/$CI_COMMIT_REF_NAME)
|
|
||||||
gnome_shell_target=${gnome_shell_target:-origin/master}
|
|
||||||
echo Using $gnome_shell_target instead
|
|
||||||
fi
|
|
||||||
|
|
||||||
git checkout -q $gnome_shell_target
|
|
13
Makefile.am
Normal file
13
Makefile.am
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
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
|
422
NEWS
422
NEWS
@@ -1,425 +1,3 @@
|
|||||||
3.35.2
|
|
||||||
======
|
|
||||||
* Don't emit focus event after destruction [Marco; gnome-shell#1704, !860]
|
|
||||||
* Add a notion of pixel format planes [Niels; !858]
|
|
||||||
* Replace various Cogl/Clutter types with Graphene [Georges; !458]
|
|
||||||
* Improve CoglJournal [Georges, Jasper; !402]
|
|
||||||
* Split pick and paint [Georges; !865]
|
|
||||||
* Remove deprecated/unused cogl/clutter APIs [Adam; !866, !878, !879, !880,
|
|
||||||
!885, !900, !902, !904, !896, !913, !922, !883, !903, !921, !933, !819]
|
|
||||||
* Fix hang when opening not-responding dialog on Xorg [Carlos; !876]
|
|
||||||
* Allow changing Clutter debug flags at runtime [Georges; !862]
|
|
||||||
* Fix frozen grabs on Xorg after weeks of inactivity [Jonas; !886]
|
|
||||||
* Fix triggering popups from stylus devices o wayland [Carlos; #886]
|
|
||||||
* Fix fallback to GLES2 [Adam; #635]
|
|
||||||
* Fix buffer age checks on multiple monitors [Carlos; !906]
|
|
||||||
* Adjust to Sysprof API change [Christian; !908]
|
|
||||||
* Improve support for (X11) fullscreen games under wayland [Hans; !739]
|
|
||||||
* Support shadow framebuffers for offscreen rendering [Olivier; !877]
|
|
||||||
* Fix hang after interacting with desktop icons on X11 [Marco; !909]
|
|
||||||
* Don't double scale when getting absolute surface coordinates [Xiang; !915]
|
|
||||||
* Respect NET_WM_TRANSIENT_FOR for override-redirect windows [Marco; !920]
|
|
||||||
* Kill window effects on destroy [Robert; !924]
|
|
||||||
* Remove deprecated ClutterTexture [Jonas; !932]
|
|
||||||
* Use regions instead of bounding box for clipping and culling [Carlos; !867]
|
|
||||||
* Use partial damage for dma-buf and EGLImage buffers on wayland [Robert; #947]
|
|
||||||
* Do not stack transients underneath their always-on-top parent [Florian; #587]
|
|
||||||
* Add explicit paint/pick contexts [Jonas; !935]
|
|
||||||
* Fix KMS freeze after pageflip fallback [Pekka; !953]
|
|
||||||
* Fixed crashes [Robert, Carlos, Jonas, Marco, Hans, Tim; !856, !869, !912,
|
|
||||||
!895, !928, #591, !823, !960]
|
|
||||||
* Plugged memory leaks [Niels, Robert, Carlos, Marco; !847, !868, !873, #908]
|
|
||||||
* Misc. bug fixes and cleanups [Niels, Robert, Jonas, Marco, Carlos, Daniel,
|
|
||||||
Jan, Adam, Cosimo, Florian, Thomas, Georges, Hans, Corentin, Christian,
|
|
||||||
Benjamin; !853, !822, !451, !854, !816, !857, !859, !734, !844, !851, #876,
|
|
||||||
!874, !673, !692, !888, !889, !894, !901, !905, !872, !898, !911, !918, !863,
|
|
||||||
#878, !811, !893, !925, !926, !890, !931, !927, !934, !938, !940, !947, !941,
|
|
||||||
!929, !949, !952, !871, !955, !956, !958, !907, !965, !964, !966]
|
|
||||||
|
|
||||||
Contributors:
|
|
||||||
Marco Trevisan (Treviño), Jan Alexander Steffens (heftig),
|
|
||||||
Thomas Hindoe Paaboel Andersen, Benjamin Berg, Cosimo Cecchi, Tim Crawford,
|
|
||||||
Piotr Drąg, Xiang Fan, Olivier Fourdan, Carlos Garnacho, Hans de Goede,
|
|
||||||
Niels De Graef, Christian Hergert, Adam Jackson, Robert Mader,
|
|
||||||
Florian Müllner, Georges Basile Stavracas Neto, Bastien Nocera, Corentin Noël,
|
|
||||||
Pekka Paalanen, Jasper St. Pierre, Christian Rauch, Daniel van Vugt,
|
|
||||||
Jonas Ådahl
|
|
||||||
|
|
||||||
Translators:
|
|
||||||
Bruce Cowan [en_GB]
|
|
||||||
|
|
||||||
3.35.1
|
|
||||||
======
|
|
||||||
* Fix immediate screen blank after releaseing inhibitor [Tim; #573]
|
|
||||||
* Respond to frame callbacks regardless of damage [Jonas; !839]
|
|
||||||
* selection [Carlos; !842]
|
|
||||||
* Fix Night Light on wayland [Jonas; !840]
|
|
||||||
* Fix various copy+paste/DND regressions [Carlos; !848, #789, #842,
|
|
||||||
#793, #845, #854]
|
|
||||||
* Misc. bug fixes and cleanups [Daniel, Marco, Jonas, Georges;
|
|
||||||
!841, !764, !837, !846]
|
|
||||||
|
|
||||||
Contributors:
|
|
||||||
Marco Trevisan (Treviño), Carlos Garnacho, Tim Klocke,
|
|
||||||
Georges Basile Stavracas Neto, Daniel van Vugt, Jonas Ådahl
|
|
||||||
|
|
||||||
3.34.1
|
|
||||||
======
|
|
||||||
* Fix startup of X11 session services on wayland [Carlos; #771]
|
|
||||||
* Fix _NET_ACTIVE_WINDOW emission [Carlos; #751]
|
|
||||||
* Fix initial view perspective [Marco; !803]
|
|
||||||
* Fix screenshots and window animations when scaled [Robert; !758]
|
|
||||||
* Re-enable coredumps when capabilities are set [Jonas; !811]
|
|
||||||
* Fix scaling of DND surface actors [Robert; !780]
|
|
||||||
* Optimize blitting of untransformed offscreen stage views [Olivier; !809, !820]
|
|
||||||
* Fix freeze of pointer event delivery on X11 [Olivier; !821]
|
|
||||||
* Fix scaling of stylus input coordinates with HiDPI [Dorian; !830]
|
|
||||||
* Fix memory leak when using implicit animations [Jonas; !828]
|
|
||||||
* Fix numlock state for native backend [Carlos; #769]
|
|
||||||
* Fixed crashes [Marco, Olivier, Jonas Å.; !805, #823, !808, !825,
|
|
||||||
#844, !826, #779]
|
|
||||||
* Misc. bug fixes and cleanups [Jonas Å., Georges, Jonas D., Michal, Daniel,
|
|
||||||
Iain, Adam, Marco, Carlos, Ting-Wei, Hans, Robert; !787, !795, !791, !797,
|
|
||||||
!772, !775, !799, !778, !785, !782, !796, #819, !814, !769, !817, !783, !786,
|
|
||||||
!829, !774, #822]
|
|
||||||
|
|
||||||
Contributors:
|
|
||||||
Marco Trevisan (Treviño), Jonas Dreßler, Olivier Fourdan, Carlos Garnacho,
|
|
||||||
Hans de Goede, Adam Jackson, Ting-Wei Lan, Iain Lane, Michal Lazo,
|
|
||||||
Robert Mader, Georges Basile Stavracas Neto, Dorian Stoll, Daniel van Vugt,
|
|
||||||
Jonas Ådahl
|
|
||||||
|
|
||||||
Translators:
|
|
||||||
Milo Casagrande [it], Nathan Follens [nl], Matej Urbančič [sl],
|
|
||||||
Ask Hjorth Larsen [da], Alan Mortensen [da], Jordi Mas [ca]
|
|
||||||
|
|
||||||
3.34.0
|
|
||||||
======
|
|
||||||
* Fix xdg-output v3 support [Olivier; !771]
|
|
||||||
* Fix crash when changing decoration state [Jonas; !773]
|
|
||||||
* Add and remove connectors on hot-plug [Jonas; !743]
|
|
||||||
|
|
||||||
Contributors:
|
|
||||||
Olivier Fourdan, Jonas Ådahl
|
|
||||||
|
|
||||||
Translators:
|
|
||||||
Rafael Fontenelle [pt_BR], Gwan-gyeong Mun [ko], Christian Kirbach [de],
|
|
||||||
Claude Paroz [fr], Milo Casagrande [it], Emin Tufan Çetin [tr],
|
|
||||||
Ryuta Fujii [ja]
|
|
||||||
|
|
||||||
3.33.92
|
|
||||||
=======
|
|
||||||
* Turn MetaShapedTexture into a ClutterContent implementation [Georges; !409]
|
|
||||||
* Restore inhibit shortcut for overlay key [Olivier; #734]
|
|
||||||
* Misc. pointer a11y improvements [Jonas D., Olivier; !746, !747, !745, !761]
|
|
||||||
* Fix position of drag surfaces [Robert; !684]
|
|
||||||
* Implement subsurface.place_below() for parents [Robert; !664]
|
|
||||||
* Add meta_window_actor_get_image() [Jonas Å.; !752]
|
|
||||||
* Revert faulty optimization from !719 [Jonas Å.; #735]
|
|
||||||
* Add additional sysprof trace points [Jonas Å.; !757, !765]
|
|
||||||
* Remove GLX "threaded swap wait" used on Nvidia [Daniel; !602]
|
|
||||||
* Implement geometric picking [Daniel; !189]
|
|
||||||
* Fix lost keyboard focus after DND [Olivier; #747]
|
|
||||||
* Misc. bug fixes and cleanups [Florian, Carlos, Piotr, Hans, Georges, Robert,
|
|
||||||
Ray, Mart, Rémi; !740, !672, !749, !751, !753, !730, !755, !756, !750, !715,
|
|
||||||
#738944, !657, !768]
|
|
||||||
|
|
||||||
Contributors:
|
|
||||||
Jonas Ådahl, Rémi Bernon, Piotr Drąg, Jonas Dreßler, Olivier Fourdan,
|
|
||||||
Carlos Garnacho, Hans de Goede, Robert Mader, Florian Müllner,
|
|
||||||
Georges Basile Stavracas Neto, Mart Raudsepp, Ray Strode, Daniel van Vugt
|
|
||||||
|
|
||||||
Translators:
|
|
||||||
Piotr Drąg [pl], Марко Костић [sr], Rūdolfs Mazurs [lv], Matej Urbančič [sl],
|
|
||||||
Balázs Úr [hu], Fran Dieguez [gl], Jordi Mas [ca], Anders Jonsson [sv],
|
|
||||||
Trần Ngọc Quân [vi], Tim Sabsch [de], Fabio Tomat [fur], Goran Vidović [hr],
|
|
||||||
Marek Černocký [cs]
|
|
||||||
|
|
||||||
3.33.91
|
|
||||||
=======
|
|
||||||
* Fix primary selection copy and paste between X11 and wayland [Hans; #702]
|
|
||||||
* Improve monitor hotplug support [Hans; !713]
|
|
||||||
* Remove a source of frame skips [Daniel; !719]
|
|
||||||
* Fix windows being lowered after unmaximizing with double click [Olivier; #88]
|
|
||||||
* Remove Clutter API for global grabs [Jonas D.; !536]
|
|
||||||
* Improve processing of incompressible events [Daniel; !711]
|
|
||||||
* Add xdg-output v3 support [Olivier; !704]
|
|
||||||
* Misc. bug fixes and cleanups [Jonas Å., Marco, Carlos, Adam, Albert, Niels,
|
|
||||||
Olivier, Florian; !722, !385, !728, !726, !500, !731, !727, !700, !735, !738]
|
|
||||||
|
|
||||||
Contributors:
|
|
||||||
Jonas Ådahl, Albert Vaca Cintora, Jonas Dreßler, Olivier Fourdan,
|
|
||||||
Carlos Garnacho, Hans de Goede, Niels De Graef, Adam Jackson, Florian Müllner,
|
|
||||||
Marco Trevisan (Treviño), Daniel van Vugt
|
|
||||||
|
|
||||||
Translators:
|
|
||||||
Asier Sarasua Garmendia [eu], Kukuh Syafaat [id], Florentina Mușat [ro],
|
|
||||||
Aurimas Černius [lt], Daniel Mustieles [es]
|
|
||||||
|
|
||||||
3.33.90
|
|
||||||
=======
|
|
||||||
* Fix visibility of clones with hidden source [Florian; #683]
|
|
||||||
* Reduce freezes when opening some popup windows [Carlos; #556]
|
|
||||||
* Be more thorough when excluding obscured areas from painting [Carlos; !698]
|
|
||||||
* Make it possible to start Xwayland on demand [Carlos; !709]
|
|
||||||
* clutter: Expose layout_manager to transitions [Florian; !716]
|
|
||||||
* Misc. bug fixes and cleanups [Mark, Florian, Iain, Niels, Carlos, Ray; !671,
|
|
||||||
!691, !694, !696, !703, !707, !697, !710, !708, !714, #719, !721]
|
|
||||||
|
|
||||||
Contributors:
|
|
||||||
Mark Blakeney, Carlos Garnacho, Niels De Graef, Iain Lane, Florian Müllner,
|
|
||||||
Ray Strode
|
|
||||||
|
|
||||||
Translators:
|
|
||||||
Asier Sarasua Garmendia [eu], Rafael Fontenelle [pt_BR], Fabio Tomat [fur],
|
|
||||||
Florentina Mușat [ro]
|
|
||||||
|
|
||||||
3.33.4
|
|
||||||
======
|
|
||||||
* Discard page flip retries on hotplug [Jonas; !630]
|
|
||||||
* Add xdg-output v2 support [Olivier; #645]
|
|
||||||
* Restore DRM format fallbacks [Jonas; !662]
|
|
||||||
* Don't emit ::size-changed when only position changed [Daniel; !568]
|
|
||||||
* Expose workspace layout properties [Florian; !618]
|
|
||||||
* Don't use grab modifiers when shortcuts are inhibited [Olivier; #642]
|
|
||||||
* Fix stuttering due to unchanged power save mode notifications [Georges; !674]
|
|
||||||
* Add API to reorder workspaces [Adam; !670]
|
|
||||||
* Make picking a new focus window more reliable [Marco; !669]
|
|
||||||
* Defer actor allocation till shown [Carlos; !677]
|
|
||||||
* Try to use primary GPU for copy instead of glReadPixels [Pekka; !615]
|
|
||||||
* Unset pointer focus when the cursor is hidden [Jonas D.; !448]
|
|
||||||
* Fix modifier-drag on wayland subsurfaces [Robert; !604]
|
|
||||||
* Fix background corruption on Nvidia after resuming from suspend [Daniel; !600]
|
|
||||||
* Only grab the locate-pointer key when necessary [Olivier; !685, #647]
|
|
||||||
* Misc. bug fixes and cleanups [Florian, Jonas, Daniel, Robert, Olivier,
|
|
||||||
Georges, Marco, Carlos, Emmanuele; !648, !650, !647, !656, !658, !637,
|
|
||||||
!663, !660, !659, !665, !666, !668, !667, #667, !676, !678, #672, !680,
|
|
||||||
!683, !688, !689, !687]
|
|
||||||
|
|
||||||
Contributors:
|
|
||||||
Jonas Ådahl, Emmanuele Bassi, Adam Bieńkowski, Piotr Drąg, Jonas Dreßler,
|
|
||||||
Olivier Fourdan, Carlos Garnacho, Robert Mader, Florian Müllner,
|
|
||||||
Georges Basile Stavracas Neto, Pekka Paalanen, Marco Trevisan (Treviño),
|
|
||||||
Daniel van Vugt
|
|
||||||
|
|
||||||
Translators:
|
|
||||||
Fabio Tomat [fur], Kukuh Syafaat [id]
|
|
||||||
|
|
||||||
3.33.3
|
|
||||||
======
|
|
||||||
* Prepare for running Xwayland on demand [Carlos; !420]
|
|
||||||
* Fix text selection color rendering [Florian; #494]
|
|
||||||
* Fix black shadows when using fractional scaling [Robert; #609]
|
|
||||||
* Honor startup sequence workspace on wayland [Carlos; gnome-shell#674]
|
|
||||||
* Only emit 'grab-op-end` signal after dropping grabs [Marco; !596]
|
|
||||||
* Add a Sysprof-based profiler [Jonas, Georges; !197, !603]
|
|
||||||
* Relax "xwayland-allow-grabs" setting [Olivier; #597]
|
|
||||||
* Implement locate-pointer accessibility feature [Olivier; !453]
|
|
||||||
* Implement mouse accessibility [Olivier; !512]
|
|
||||||
* Consolidate frame throttling [Daniel, Georges; !363]
|
|
||||||
* Fix setting blank cursor under wayland [Jonas; #630]
|
|
||||||
* Pixel-align OpenGL cursors [Jonas; !610]
|
|
||||||
* Handle returning from fullscreen/maximization better [Jonas; !621]
|
|
||||||
* Improve screencast support on multi-monitor systems [Georges; !623]
|
|
||||||
* Fix running X11 applications with sudo under wayland [Hans; #643]
|
|
||||||
* Implement toggle-keys notification [Olivier; #637]
|
|
||||||
* Add initial KMS transactional support [Jonas; !525]
|
|
||||||
* Improve finding new focus window when the old one is closed [Marco; #308]
|
|
||||||
* Misc. bug fixes and cleanups [Jonas, Carlos, Marco, Florian, Pekka, Robert,
|
|
||||||
Douglas, Georges, Daniel, Emil, Niels, Hans, Olivier, Ting-Wei, Corentin;
|
|
||||||
!591, #398, !592, !581, !597, !598, !593, !497, #591, !545, gtk#1675, !601,
|
|
||||||
#568, !564, !605, !609, !115, !214, !611, !617, !616, !619, !624, !622, !627,
|
|
||||||
!628, !629, !632, !633, !631, !636, !639, !638, !634, !640, !529, !644, !590]
|
|
||||||
|
|
||||||
Contributors:
|
|
||||||
Jonas Ådahl, Piotr Drąg, Olivier Fourdan, Carlos Garnacho, Hans de Goede,
|
|
||||||
Niels De Graef, Ting-Wei Lan, Robert Mader, Florian Müllner,
|
|
||||||
Georges Basile Stavracas Neto, Corentin Noël, Pekka Paalanen, Douglas R. Reno,
|
|
||||||
Marco Trevisan (Treviño), Emil Velikov, Daniel van Vugt
|
|
||||||
|
|
||||||
Translators:
|
|
||||||
Balázs Úr [hu], Daniel Mustieles [es], Nathan Follens [nl], Goran Vidović [hr]
|
|
||||||
|
|
||||||
3.33.2
|
|
||||||
======
|
|
||||||
* Fix rendering lag on Xorg [Daniel; !520, !281]
|
|
||||||
* Misc. bug fixes and cleanups [Carlos, Marco, Jonas D., Florian, Niels,
|
|
||||||
Daniel, Benjamin, Jonas Å., Ignacio, Vasilis; #598, !576, !547, !578,
|
|
||||||
!583, !582, !469, !524, !119, !571, !584, !585, !586, #425]
|
|
||||||
|
|
||||||
Contributors:
|
|
||||||
Jonas Ådahl, Benjamin Berg, Jonas Dreßler, Carlos Garnacho, Niels De Graef,
|
|
||||||
Vasilis Liaskovitis, Florian Müllner, Ignacio Casal Quinteiro,
|
|
||||||
Marco Trevisan (Treviño), Daniel van Vugt
|
|
||||||
|
|
||||||
Translators:
|
|
||||||
Daniel Mustieles [es]
|
|
||||||
|
|
||||||
3.33.1
|
|
||||||
======
|
|
||||||
* Remove unused APIs and outdated driver support
|
|
||||||
[Adam; !481, !468, !489, !487, !546]
|
|
||||||
* Enable EGL_IMG_context_priority [Adam; !454]
|
|
||||||
* Disable mouse keys with Numlock on [Olivier; #530]
|
|
||||||
* Fix crash when restarting on X11 [Marco; #576]
|
|
||||||
* Implement clipboard manager [Carlos; !320]
|
|
||||||
* Fix spurious idle signals that prevent session unblank [Jonas Å.; !543]
|
|
||||||
* Fix mapping of touchscreens that don't report dimensions [Carlos; #581]
|
|
||||||
* Fix propagating fractional scaling factor [Robert; !537]
|
|
||||||
* Add experimental RT scheduling support [Carlos; !460]
|
|
||||||
* Misc. bug fixes and cleanups [Robert, Carlos, Olivier, Ray, Marco, Jonas D.,
|
|
||||||
Georges, Daniel V., Daniel M; !467, !504, !551, !552, #575, #556, !557, !442,
|
|
||||||
!562, !535, !548, #586, !567, !396, !422, !507]
|
|
||||||
|
|
||||||
Contributors:
|
|
||||||
Jonas Ådahl, Piotr Drąg, Jonas Dreßler, Olivier Fourdan, Carlos Garnacho,
|
|
||||||
Adam Jackson, Robert Mader, Daniel García Moreno, Florian Müllner,
|
|
||||||
Georges Basile Stavracas Neto, Ray Strode, Marco Trevisan (Treviño),
|
|
||||||
Daniel van Vugt
|
|
||||||
|
|
||||||
Translators:
|
|
||||||
Daniel Mustieles [es], Fabio Tomat [fur], Kukuh Syafaat [id]
|
|
||||||
|
|
||||||
3.32.1
|
|
||||||
======
|
|
||||||
* Fix fallback app menu on wayland [Florian; #493]
|
|
||||||
* Fix elogind support [Tom; !491]
|
|
||||||
* Fix startup notifications not timing out [Carlos; #501]
|
|
||||||
* Fix keyboard accessibility toggle from keys
|
|
||||||
[Olivier, Carlos; !501, #529, !531]
|
|
||||||
* Fix touchscreen input on rotated displays [Carlos; #514]
|
|
||||||
* Work around hangul text input bug [Carlos; #1365]
|
|
||||||
* Fix blurry wallpaper scaling [Daniel; !505]
|
|
||||||
* Fix placement of window menu when using fractional scaling [Jan; #527]
|
|
||||||
* Fix repaint issues of offscreen effects on secondary monitors [Daniel; !511]
|
|
||||||
* Fix windows not getting focus after launch [Daniel; #505]
|
|
||||||
* Properly advertise support for 'underscan' property [Jonas; !507]
|
|
||||||
* Improve power-saving handling [Jonas; !506]
|
|
||||||
* Fix moving windows by super+touch [Jonas D.; !495]
|
|
||||||
* Misc. bug fixes and cleanups [Benjamin, Florian, Adam, Marco, Pablo,
|
|
||||||
Erik, Jonas, Heiher, Pekka, Daniel, Olivier, Carlos; !478, !475, !480,
|
|
||||||
!482, #490, !488, #491, #480, !477, !496, !492, !485, !515, !519, !521,
|
|
||||||
!216, !538, #541, #523]
|
|
||||||
|
|
||||||
Contributors:
|
|
||||||
Jonas Ådahl, Pablo Barciela, Benjamin Berg, Tom Briden, Jonas Dreßler,
|
|
||||||
Olivier Fourdan, Carlos Garnacho, Jan Alexander Steffens (heftig), Heiher,
|
|
||||||
Adam Jackson, Erik Kurzinger, Florian Müllner, Pekka Paalanen,
|
|
||||||
Marco Trevisan (Treviño), Daniel van Vugt
|
|
||||||
|
|
||||||
Translators:
|
|
||||||
Khaled Hosny [ar], Goran Vidović [hr], Daniel Mustieles [es]
|
|
||||||
|
|
||||||
3.32.0
|
|
||||||
======
|
|
||||||
* Fix deadlock when cancelling a theme sound [Andrea; !474]
|
|
||||||
* Stop swizzling BGRA buffers (bye-bye inverted colors in screenshots
|
|
||||||
and animations) [Carlos; !486]
|
|
||||||
|
|
||||||
Contributors:
|
|
||||||
Andrea Azzarone, Carlos Garnacho, Robert Mader
|
|
||||||
|
|
||||||
3.31.92
|
|
||||||
=======
|
|
||||||
* Fix flicker of apps that use multiple SHM buffers [Jonas Å.; #199]
|
|
||||||
* Don't disable page flips after temporary failues [Jonas Å.; #460]
|
|
||||||
* Improve redraw performance [Carlos; !196]
|
|
||||||
* Add cursor-mode support to window screencasting [Jonas Å.; !413]
|
|
||||||
* Add back support for system-wide monitor configurations [Jonas Å.; !253]
|
|
||||||
* Add fractional scaling support [Marco, Jonas Å.; !3]
|
|
||||||
* Consider remapped keys when guessing keycode from keysym [Andrea; #443]
|
|
||||||
* Stop turning on-screen-keyboard off on focus changes [Carlos; !432]
|
|
||||||
* Fix crashes [Robert, Carlos, Jonas D., Florian; !447, #361, !426, #479]
|
|
||||||
* Misc. bug fixes and cleanups [Benjamin, Adam, Olivier, Niels, Piotr; !457,
|
|
||||||
!452, !459, !380, !361, !461, !464, !471, !473, !463]
|
|
||||||
|
|
||||||
Contributors:
|
|
||||||
Jonas Ådahl, Andrea Azzarone, Benjamin Berg, Piotr Drąg, Jonas Dreßler,
|
|
||||||
Olivier Fourdan, Carlos Garnacho, Niels De Graef, Adam Jackson, Robert Mader,
|
|
||||||
Florian Müllner, Marco Trevisan (Treviño)
|
|
||||||
|
|
||||||
Translators:
|
|
||||||
Milo Casagrande [it], Tim Sabsch [de], Trần Ngọc Quân [vi],
|
|
||||||
Gwan-gyeong Mun [ko], Марко Костић [sr], Daniel Mustieles [es],
|
|
||||||
Rūdolfs Mazurs [lv], Nathan Follens [nl]
|
|
||||||
|
|
||||||
3.31.91
|
|
||||||
=======
|
|
||||||
* Fix infinite loop in EDID matching [Marco; #459]
|
|
||||||
* wayland: Don't resetin text-input state prematurely [Carlos; !410]
|
|
||||||
* wayland: Don't maximize windows if minimum size is too big [Olivier; #463]
|
|
||||||
* Fix crash when using "restore shortcuts" without focus window [Olivier; #464]
|
|
||||||
* Add flag parameter to grab accelerator API [Andrea; !169]
|
|
||||||
* Reuse old CRTC if possible to avoid flicker on hotplug [Pekka, Emilio; #373]
|
|
||||||
* Misc. bug fixes and cleanups [Marco, Jonas, Niels, Adam, Olivier; !436,
|
|
||||||
!421, #462, !439, !440, !444, !321, !445, !456]
|
|
||||||
|
|
||||||
Contributors:
|
|
||||||
Jonas Ådahl, Andrea Azzarone, Olivier Fourdan, Carlos Garnacho,
|
|
||||||
Niels De Graef, Adam Jackson, Emilio Pozuelo Monfort, Pekka Paalanen,
|
|
||||||
Marco Trevisan (Treviño)
|
|
||||||
|
|
||||||
Translators:
|
|
||||||
Jiri Grönroos [fi], Charles Monzat [fr], Claude Paroz [fr], Fran Dieguez [gl],
|
|
||||||
Emin Tufan Çetin [tr], Aurimas Černius [lt], Anders Jonsson [sv],
|
|
||||||
Matej Urbančič [sl], Marek Cernocky [cs], Daniel Șerbănescu [ro],
|
|
||||||
Alan Mortensen [da], Baurzhan Muftakhidinov [kk], Yi-Jyun Pan [zh_TW],
|
|
||||||
Daniel Mustieles [es], Rafael Fontenelle [pt_BR]
|
|
||||||
|
|
||||||
3.31.90
|
|
||||||
=======
|
|
||||||
* Fix support of extended characters in on-screen keyboard [Andrea; #109]
|
|
||||||
* Improve selection of the primary GPU [Pekka, Emilio; !271]
|
|
||||||
* Screen-cast cursor updates as PipeWire stream metadata [Jonas; !357]
|
|
||||||
* Fix rendering glitches in magnifier [Daniel; gnome-shell#387]
|
|
||||||
* Fix monitor recording on HiDPI [Jonas; !415]
|
|
||||||
* Honour secondary GPU supported pixel formats [Pekka; !341]
|
|
||||||
* Fall back to CPU copy path when using a software renderer [Emilio; !325]
|
|
||||||
* Remove fallback app menu [Florian; gnome-shell#624]
|
|
||||||
* wayland: Add support for viewporter protocol [Robert; !323]
|
|
||||||
* Misc. bug fixes and cleanups [Florian, Carlos, Olivier, Marco, Robert,
|
|
||||||
Daniel, Pekka, Jonas, Ole, Georges; !391, #335, #442, !406, !395, #447,
|
|
||||||
!375, gnome-shell#349, #451, !416, #784199, !408, !181, !405]
|
|
||||||
|
|
||||||
Contributors:
|
|
||||||
Jonas Ådahl, Andrea Azzarone, Ole Jørgen Brønner, Piotr Drąg, Olivier Fourdan,
|
|
||||||
Dariusz Gadomski, Carlos Garnacho, Antoine Jacoutot, Iain Lane, Robert Mader,
|
|
||||||
Emilio Pozuelo Monfort, Florian Müllner, Georges Basile Stavracas Neto,
|
|
||||||
Pekka Paalanen, Marco Trevisan (Treviño), Josh Triplett, Daniel van Vugt
|
|
||||||
|
|
||||||
Translators:
|
|
||||||
Fabio Tomat [fur], Balázs Úr [hu], Daniel Mustieles [es], Kukuh Syafaat [id],
|
|
||||||
Jordi Mas [ca], Piotr Drąg [pl]
|
|
||||||
|
|
||||||
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
|
3.31.2
|
||||||
======
|
======
|
||||||
* Fix handling of non-UTF8 encodings [Florian; !227]
|
* Fix handling of non-UTF8 encodings [Florian; !227]
|
||||||
|
14
README.md
14
README.md
@@ -22,20 +22,6 @@ by Gala, elementary OS's window manager. It can also be run standalone, using
|
|||||||
the command "mutter", but just running plain mutter is only intended for
|
the command "mutter", but just running plain mutter is only intended for
|
||||||
debugging purposes.
|
debugging purposes.
|
||||||
|
|
||||||
## Contributing
|
|
||||||
|
|
||||||
To contribute, open merge requests at https://gitlab.gnome.org/GNOME/mutter.
|
|
||||||
|
|
||||||
The coding style used is primarily the GNU flavor of the [GNOME coding
|
|
||||||
style](https://developer.gnome.org/programming-guidelines/stable/c-coding-style.html.en)
|
|
||||||
with some minor additions such as preferring `stdint.h` types over GLib
|
|
||||||
fundamental types, and a soft 80 character line limit. However, in general,
|
|
||||||
look at the file you're editing for inspiration.
|
|
||||||
|
|
||||||
Commit messages should follow the [GNOME commit message
|
|
||||||
guidelines](https://wiki.gnome.org/Git/CommitMessages). We require an URL
|
|
||||||
to either an issue or a merge request in each commit.
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
Mutter is distributed under the terms of the GNU General Public License,
|
Mutter is distributed under the terms of the GNU General Public License,
|
||||||
|
28
autogen.sh
Executable file
28
autogen.sh
Executable file
@@ -0,0 +1,28 @@
|
|||||||
|
#!/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
|
49
clutter/Makefile.am
Normal file
49
clutter/Makefile.am
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
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
clutter/build/Makefile.am
Normal file
1
clutter/build/Makefile.am
Normal file
@@ -0,0 +1 @@
|
|||||||
|
SUBDIRS = autotools
|
8
clutter/build/autotools/.gitignore
vendored
Normal file
8
clutter/build/autotools/.gitignore
vendored
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
gtk-doc.m4
|
||||||
|
libtool.m4
|
||||||
|
ltoptions.m4
|
||||||
|
ltsugar.m4
|
||||||
|
ltversion.m4
|
||||||
|
lt~obsolete.m4
|
||||||
|
shave
|
||||||
|
shave-libtool
|
10
clutter/build/autotools/Makefile.am
Normal file
10
clutter/build/autotools/Makefile.am
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
NULL =
|
||||||
|
|
||||||
|
EXTRA_DIST = \
|
||||||
|
introspection.m4 \
|
||||||
|
as-compiler-flag.m4 \
|
||||||
|
glibtests.m4 \
|
||||||
|
glib-tap.mk \
|
||||||
|
tap-driver.sh \
|
||||||
|
tap-test \
|
||||||
|
$(NULL)
|
62
clutter/build/autotools/as-compiler-flag.m4
Normal file
62
clutter/build/autotools/as-compiler-flag.m4
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
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"
|
||||||
|
])
|
||||||
|
|
134
clutter/build/autotools/glib-tap.mk
Normal file
134
clutter/build/autotools/glib-tap.mk
Normal file
@@ -0,0 +1,134 @@
|
|||||||
|
# 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
|
28
clutter/build/autotools/glibtests.m4
Normal file
28
clutter/build/autotools/glibtests.m4
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
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
|
||||||
|
])
|
96
clutter/build/autotools/introspection.m4
Normal file
96
clutter/build/autotools/introspection.m4
Normal file
@@ -0,0 +1,96 @@
|
|||||||
|
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])
|
||||||
|
])
|
652
clutter/build/autotools/tap-driver.sh
Executable file
652
clutter/build/autotools/tap-driver.sh
Executable file
@@ -0,0 +1,652 @@
|
|||||||
|
#! /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:
|
5
clutter/build/autotools/tap-test
Executable file
5
clutter/build/autotools/tap-test
Executable file
@@ -0,0 +1,5 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
# run a GTest in tap mode. The test binary is passed as $1
|
||||||
|
|
||||||
|
$1 -k --tap
|
672
clutter/clutter/Makefile.am
Normal file
672
clutter/clutter/Makefile.am
Normal file
@@ -0,0 +1,672 @@
|
|||||||
|
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-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-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-cairo-texture.h \
|
||||||
|
deprecated/clutter-container.h \
|
||||||
|
deprecated/clutter-input-device.h \
|
||||||
|
deprecated/clutter-keysyms.h \
|
||||||
|
deprecated/clutter-main.h \
|
||||||
|
deprecated/clutter-rectangle.h \
|
||||||
|
deprecated/clutter-stage-manager.h \
|
||||||
|
deprecated/clutter-stage.h \
|
||||||
|
deprecated/clutter-texture.h \
|
||||||
|
deprecated/clutter-timeline.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-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-cairo-texture.c \
|
||||||
|
deprecated/clutter-input-device-deprecated.c \
|
||||||
|
deprecated/clutter-layout-manager-deprecated.c \
|
||||||
|
deprecated/clutter-rectangle.c \
|
||||||
|
deprecated/clutter-texture.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) \
|
||||||
|
$(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)
|
52
clutter/clutter/Makefile.am.enums
Normal file
52
clutter/clutter/Makefile.am.enums
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
# 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
|
54
clutter/clutter/Makefile.am.marshal
Normal file
54
clutter/clutter/Makefile.am.marshal
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
# 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
|
@@ -310,7 +310,11 @@ cally_actor_finalize (GObject *obj)
|
|||||||
|
|
||||||
_cally_actor_clean_action_list (cally_actor);
|
_cally_actor_clean_action_list (cally_actor);
|
||||||
|
|
||||||
g_clear_handle_id (&priv->action_idle_handler, g_source_remove);
|
if (priv->action_idle_handler)
|
||||||
|
{
|
||||||
|
g_source_remove (priv->action_idle_handler);
|
||||||
|
priv->action_idle_handler = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (priv->action_queue)
|
if (priv->action_queue)
|
||||||
{
|
{
|
||||||
@@ -653,7 +657,7 @@ cally_actor_get_extents (AtkComponent *component,
|
|||||||
ClutterActor *actor = NULL;
|
ClutterActor *actor = NULL;
|
||||||
gint top_level_x, top_level_y;
|
gint top_level_x, top_level_y;
|
||||||
gfloat f_width, f_height;
|
gfloat f_width, f_height;
|
||||||
graphene_point3d_t verts[4];
|
ClutterVertex verts[4];
|
||||||
ClutterActor *stage = NULL;
|
ClutterActor *stage = NULL;
|
||||||
|
|
||||||
g_return_if_fail (CALLY_IS_ACTOR (component));
|
g_return_if_fail (CALLY_IS_ACTOR (component));
|
||||||
@@ -733,7 +737,11 @@ cally_actor_grab_focus (AtkComponent *component)
|
|||||||
*
|
*
|
||||||
* This gets the top level origin, it is, the position of the stage in
|
* This gets the top level origin, it is, the position of the stage in
|
||||||
* the global screen. You can see it as the absolute display position
|
* the global screen. You can see it as the absolute display position
|
||||||
* of the stage. This is 0,0 for a compositor.
|
* of the stage.
|
||||||
|
*
|
||||||
|
* FIXME: only the case with x11 is implemented, other backends are
|
||||||
|
* required
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
_cally_actor_get_top_level_origin (ClutterActor *actor,
|
_cally_actor_get_top_level_origin (ClutterActor *actor,
|
||||||
@@ -741,11 +749,54 @@ _cally_actor_get_top_level_origin (ClutterActor *actor,
|
|||||||
gint *yp)
|
gint *yp)
|
||||||
{
|
{
|
||||||
/* default values */
|
/* default values */
|
||||||
|
gint x = 0;
|
||||||
|
gint y = 0;
|
||||||
|
|
||||||
|
#ifdef CLUTTER_WINDOWING_X11
|
||||||
|
if (clutter_check_windowing_backend (CLUTTER_WINDOWING_X11))
|
||||||
|
{
|
||||||
|
ClutterActor *stage = NULL;
|
||||||
|
Display *display = NULL;
|
||||||
|
Window root_window;
|
||||||
|
Window stage_window;
|
||||||
|
Window child;
|
||||||
|
gint return_val = 0;
|
||||||
|
|
||||||
|
stage = clutter_actor_get_stage (actor);
|
||||||
|
|
||||||
|
/* FIXME: what happens if you use another display with
|
||||||
|
clutter_backend_x11_set_display ?*/
|
||||||
|
display = clutter_x11_get_default_display ();
|
||||||
|
root_window = clutter_x11_get_root_window ();
|
||||||
|
stage_window = clutter_x11_get_stage_window (CLUTTER_STAGE (stage));
|
||||||
|
|
||||||
|
return_val = XTranslateCoordinates (display, stage_window, root_window,
|
||||||
|
0, 0, &x, &y,
|
||||||
|
&child);
|
||||||
|
|
||||||
|
if (!return_val)
|
||||||
|
g_warning ("[x11] We were not able to get proper absolute "
|
||||||
|
"position of the stage");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
static gboolean yet_warned = FALSE;
|
||||||
|
|
||||||
|
if (!yet_warned)
|
||||||
|
{
|
||||||
|
yet_warned = TRUE;
|
||||||
|
|
||||||
|
g_warning ("The current Clutter backend does not support using "
|
||||||
|
"atk_component_get_extents() with ATK_XY_SCREEN.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (xp)
|
if (xp)
|
||||||
*xp = 0;
|
*xp = x;
|
||||||
|
|
||||||
if (yp)
|
if (yp)
|
||||||
*yp = 0;
|
*yp = y;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* AtkAction implementation */
|
/* AtkAction implementation */
|
||||||
@@ -993,8 +1044,10 @@ _cally_actor_clean_action_list (CallyActor *cally_actor)
|
|||||||
|
|
||||||
if (priv->action_list)
|
if (priv->action_list)
|
||||||
{
|
{
|
||||||
g_list_free_full (priv->action_list,
|
g_list_foreach (priv->action_list,
|
||||||
(GDestroyNotify) _cally_actor_destroy_action_info);
|
(GFunc) _cally_actor_destroy_action_info,
|
||||||
|
NULL);
|
||||||
|
g_list_free (priv->action_list);
|
||||||
priv->action_list = NULL;
|
priv->action_list = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,147 +0,0 @@
|
|||||||
/* CALLY - The Clutter Accessibility Implementation Library
|
|
||||||
*
|
|
||||||
* Copyright (C) 2008 Igalia, S.L.
|
|
||||||
*
|
|
||||||
* Author: Alejandro Piñeiro Iglesias <apinheiro@igalia.com>
|
|
||||||
*
|
|
||||||
* Based on GailContainer from GAIL
|
|
||||||
* Copyright 2001, 2002, 2003 Sun Microsystems Inc.
|
|
||||||
*
|
|
||||||
* This library is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This library is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library; if not, write to the
|
|
||||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
||||||
* Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* SECTION:cally-group
|
|
||||||
* @Title: CallyGroup
|
|
||||||
* @short_description: Implementation of the ATK interfaces for a #ClutterGroup
|
|
||||||
* @see_also: #ClutterGroup
|
|
||||||
*
|
|
||||||
* #CallyGroup implements the required ATK interfaces of #ClutterGroup
|
|
||||||
* In particular it exposes each of the Clutter actors contained in the
|
|
||||||
* group.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "clutter-build-config.h"
|
|
||||||
|
|
||||||
#include "cally-group.h"
|
|
||||||
#include "cally-actor-private.h"
|
|
||||||
|
|
||||||
static gint cally_group_get_n_children (AtkObject *obj);
|
|
||||||
static AtkObject* cally_group_ref_child (AtkObject *obj,
|
|
||||||
gint i);
|
|
||||||
static void cally_group_real_initialize (AtkObject *obj,
|
|
||||||
gpointer data);
|
|
||||||
|
|
||||||
G_DEFINE_TYPE (CallyGroup, cally_group, CALLY_TYPE_ACTOR)
|
|
||||||
|
|
||||||
static void
|
|
||||||
cally_group_class_init (CallyGroupClass *klass)
|
|
||||||
{
|
|
||||||
/* GObjectClass *gobject_class = G_OBJECT_CLASS (klass); */
|
|
||||||
AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
|
|
||||||
|
|
||||||
class->get_n_children = cally_group_get_n_children;
|
|
||||||
class->ref_child = cally_group_ref_child;
|
|
||||||
class->initialize = cally_group_real_initialize;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
cally_group_init (CallyGroup *group)
|
|
||||||
{
|
|
||||||
/* nothing to do yet */
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* cally_group_new:
|
|
||||||
* @actor: a #ClutterGroup
|
|
||||||
*
|
|
||||||
* Creates a #CallyGroup for @actor
|
|
||||||
*
|
|
||||||
* Return value: the newly created #CallyGroup
|
|
||||||
*
|
|
||||||
* Since: 1.4
|
|
||||||
*/
|
|
||||||
AtkObject *
|
|
||||||
cally_group_new (ClutterActor *actor)
|
|
||||||
{
|
|
||||||
GObject *object = NULL;
|
|
||||||
AtkObject *accessible = NULL;
|
|
||||||
|
|
||||||
g_return_val_if_fail (CLUTTER_IS_GROUP (actor), NULL);
|
|
||||||
|
|
||||||
object = g_object_new (CALLY_TYPE_GROUP, NULL);
|
|
||||||
|
|
||||||
accessible = ATK_OBJECT (object);
|
|
||||||
atk_object_initialize (accessible, actor);
|
|
||||||
|
|
||||||
return accessible;
|
|
||||||
}
|
|
||||||
|
|
||||||
static gint
|
|
||||||
cally_group_get_n_children (AtkObject *obj)
|
|
||||||
{
|
|
||||||
ClutterActor *actor = NULL;
|
|
||||||
gint count = 0;
|
|
||||||
|
|
||||||
g_return_val_if_fail (CALLY_IS_GROUP (obj), count);
|
|
||||||
|
|
||||||
actor = CALLY_GET_CLUTTER_ACTOR (obj);
|
|
||||||
|
|
||||||
if (actor == NULL) /* defunct */
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
g_return_val_if_fail (CLUTTER_IS_GROUP(actor), count);
|
|
||||||
|
|
||||||
count = clutter_actor_get_n_children (actor);
|
|
||||||
|
|
||||||
return count;
|
|
||||||
}
|
|
||||||
|
|
||||||
static AtkObject*
|
|
||||||
cally_group_ref_child (AtkObject *obj,
|
|
||||||
gint i)
|
|
||||||
{
|
|
||||||
AtkObject *accessible = NULL;
|
|
||||||
ClutterActor *actor = NULL;
|
|
||||||
ClutterActor *child = NULL;
|
|
||||||
|
|
||||||
g_return_val_if_fail (CALLY_IS_GROUP (obj), NULL);
|
|
||||||
g_return_val_if_fail ((i >= 0), NULL);
|
|
||||||
|
|
||||||
actor = CALLY_GET_CLUTTER_ACTOR (obj);
|
|
||||||
|
|
||||||
g_return_val_if_fail (CLUTTER_IS_GROUP(actor), NULL);
|
|
||||||
child = clutter_actor_get_child_at_index (actor, i);
|
|
||||||
|
|
||||||
if (!child)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
accessible = clutter_actor_get_accessible (child);
|
|
||||||
|
|
||||||
if (accessible != NULL)
|
|
||||||
g_object_ref (accessible);
|
|
||||||
|
|
||||||
return accessible;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
cally_group_real_initialize (AtkObject *obj,
|
|
||||||
gpointer data)
|
|
||||||
{
|
|
||||||
ATK_OBJECT_CLASS (cally_group_parent_class)->initialize (obj, data);
|
|
||||||
|
|
||||||
obj->role = ATK_ROLE_PANEL;
|
|
||||||
}
|
|
@@ -1,87 +0,0 @@
|
|||||||
/* CALLY - The Clutter Accessibility Implementation Library
|
|
||||||
*
|
|
||||||
* Copyright (C) 2008 Igalia, S.L.
|
|
||||||
*
|
|
||||||
* Author: Alejandro Piñeiro Iglesias <apinheiro@igalia.com>
|
|
||||||
*
|
|
||||||
* Based on GailContainer from GAIL
|
|
||||||
* Copyright 2001, 2002, 2003 Sun Microsystems Inc.
|
|
||||||
*
|
|
||||||
* This library is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This library is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __CALLY_GROUP_H__
|
|
||||||
#define __CALLY_GROUP_H__
|
|
||||||
|
|
||||||
#if !defined(__CALLY_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
|
|
||||||
#error "Only <cally/cally.h> can be included directly."
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <cally/cally-actor.h>
|
|
||||||
#include <clutter/clutter.h>
|
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
|
||||||
|
|
||||||
#define CALLY_TYPE_GROUP (cally_group_get_type ())
|
|
||||||
#define CALLY_GROUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CALLY_TYPE_GROUP, CallyGroup))
|
|
||||||
#define CALLY_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CALLY_TYPE_GROUP, CallyGroupClass))
|
|
||||||
#define CALLY_IS_GROUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CALLY_TYPE_GROUP))
|
|
||||||
#define CALLY_IS_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CALLY_TYPE_GROUP))
|
|
||||||
#define CALLY_GROUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CALLY_TYPE_GROUP, CallyGroupClass))
|
|
||||||
|
|
||||||
typedef struct _CallyGroup CallyGroup;
|
|
||||||
typedef struct _CallyGroupClass CallyGroupClass;
|
|
||||||
typedef struct _CallyGroupPrivate CallyGroupPrivate;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* CallyGroup:
|
|
||||||
*
|
|
||||||
* The <structname>CallyGroup</structname> structure contains only
|
|
||||||
* private data and should be accessed using the provided API
|
|
||||||
*
|
|
||||||
* Since: 1.4
|
|
||||||
*/
|
|
||||||
struct _CallyGroup
|
|
||||||
{
|
|
||||||
/*< private >*/
|
|
||||||
CallyActor parent;
|
|
||||||
|
|
||||||
CallyGroupPrivate *priv;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* CallyGroupClass:
|
|
||||||
*
|
|
||||||
* The <structname>CallyGroupClass</structname> structure contains only
|
|
||||||
* private data
|
|
||||||
*
|
|
||||||
* Since: 1.4
|
|
||||||
*/
|
|
||||||
struct _CallyGroupClass
|
|
||||||
{
|
|
||||||
/*< private >*/
|
|
||||||
CallyActorClass parent_class;
|
|
||||||
|
|
||||||
/* padding for future expansion */
|
|
||||||
gpointer _padding_dummy[8];
|
|
||||||
};
|
|
||||||
|
|
||||||
CLUTTER_EXPORT
|
|
||||||
GType cally_group_get_type (void) G_GNUC_CONST;
|
|
||||||
CLUTTER_EXPORT
|
|
||||||
AtkObject* cally_group_new (ClutterActor *actor);
|
|
||||||
|
|
||||||
G_END_DECLS
|
|
||||||
|
|
||||||
#endif /* __CALLY_GROUP_H__ */
|
|
@@ -75,8 +75,8 @@ struct _CallyRootPrivate
|
|||||||
GSList *stage_list;
|
GSList *stage_list;
|
||||||
|
|
||||||
/* signals id */
|
/* signals id */
|
||||||
gulong stage_added_id;
|
guint stage_added_id;
|
||||||
gulong stage_removed_id;
|
guint stage_removed_id;
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE_WITH_PRIVATE (CallyRoot, cally_root, ATK_TYPE_GOBJECT_ACCESSIBLE)
|
G_DEFINE_TYPE_WITH_PRIVATE (CallyRoot, cally_root, ATK_TYPE_GOBJECT_ACCESSIBLE)
|
||||||
@@ -149,9 +149,11 @@ cally_root_finalize (GObject *object)
|
|||||||
|
|
||||||
stage_manager = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (root));
|
stage_manager = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (root));
|
||||||
|
|
||||||
g_clear_signal_handler (&root->priv->stage_added_id, stage_manager);
|
g_signal_handler_disconnect (stage_manager,
|
||||||
|
root->priv->stage_added_id);
|
||||||
|
|
||||||
g_clear_signal_handler (&root->priv->stage_removed_id, stage_manager);
|
g_signal_handler_disconnect (stage_manager,
|
||||||
|
root->priv->stage_added_id);
|
||||||
|
|
||||||
G_OBJECT_CLASS (cally_root_parent_class)->finalize (object);
|
G_OBJECT_CLASS (cally_root_parent_class)->finalize (object);
|
||||||
}
|
}
|
||||||
|
@@ -63,7 +63,7 @@ struct _CallyStagePrivate
|
|||||||
|
|
||||||
G_DEFINE_TYPE_WITH_CODE (CallyStage,
|
G_DEFINE_TYPE_WITH_CODE (CallyStage,
|
||||||
cally_stage,
|
cally_stage,
|
||||||
CALLY_TYPE_GROUP,
|
CALLY_TYPE_ACTOR,
|
||||||
G_ADD_PRIVATE (CallyStage)
|
G_ADD_PRIVATE (CallyStage)
|
||||||
G_IMPLEMENT_INTERFACE (ATK_TYPE_WINDOW,
|
G_IMPLEMENT_INTERFACE (ATK_TYPE_WINDOW,
|
||||||
cally_stage_window_interface_init));
|
cally_stage_window_interface_init));
|
||||||
|
@@ -25,7 +25,7 @@
|
|||||||
#error "Only <cally/cally.h> can be included directly."
|
#error "Only <cally/cally.h> can be included directly."
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <cally/cally-group.h>
|
#include <cally/cally-actor.h>
|
||||||
#include <clutter/clutter.h>
|
#include <clutter/clutter.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
@@ -52,7 +52,7 @@ typedef struct _CallyStagePrivate CallyStagePrivate;
|
|||||||
struct _CallyStage
|
struct _CallyStage
|
||||||
{
|
{
|
||||||
/*< private >*/
|
/*< private >*/
|
||||||
CallyGroup parent;
|
CallyActor parent;
|
||||||
|
|
||||||
CallyStagePrivate *priv;
|
CallyStagePrivate *priv;
|
||||||
};
|
};
|
||||||
@@ -68,7 +68,7 @@ struct _CallyStage
|
|||||||
struct _CallyStageClass
|
struct _CallyStageClass
|
||||||
{
|
{
|
||||||
/*< private >*/
|
/*< private >*/
|
||||||
CallyGroupClass parent_class;
|
CallyActorClass parent_class;
|
||||||
|
|
||||||
/* padding for future expansion */
|
/* padding for future expansion */
|
||||||
gpointer _padding_dummy[16];
|
gpointer _padding_dummy[16];
|
||||||
|
@@ -247,7 +247,11 @@ cally_text_finalize (GObject *obj)
|
|||||||
/* g_object_unref (cally_text->priv->textutil); */
|
/* g_object_unref (cally_text->priv->textutil); */
|
||||||
/* cally_text->priv->textutil = NULL; */
|
/* cally_text->priv->textutil = NULL; */
|
||||||
|
|
||||||
g_clear_handle_id (&cally_text->priv->insert_idle_handler, g_source_remove);
|
if (cally_text->priv->insert_idle_handler)
|
||||||
|
{
|
||||||
|
g_source_remove (cally_text->priv->insert_idle_handler);
|
||||||
|
cally_text->priv->insert_idle_handler = 0;
|
||||||
|
}
|
||||||
|
|
||||||
G_OBJECT_CLASS (cally_text_parent_class)->finalize (obj);
|
G_OBJECT_CLASS (cally_text_parent_class)->finalize (obj);
|
||||||
}
|
}
|
||||||
@@ -1434,7 +1438,7 @@ static void cally_text_get_character_extents (AtkText *text,
|
|||||||
PangoLayout *layout;
|
PangoLayout *layout;
|
||||||
PangoRectangle extents;
|
PangoRectangle extents;
|
||||||
const gchar *text_value;
|
const gchar *text_value;
|
||||||
graphene_point3d_t verts[4];
|
ClutterVertex verts[4];
|
||||||
|
|
||||||
actor = CALLY_GET_CLUTTER_ACTOR (text);
|
actor = CALLY_GET_CLUTTER_ACTOR (text);
|
||||||
if (actor == NULL) /* State is defunct */
|
if (actor == NULL) /* State is defunct */
|
||||||
@@ -2290,7 +2294,7 @@ _cally_misc_get_index_at_point (ClutterText *clutter_text,
|
|||||||
gint index, x_window, y_window, x_toplevel, y_toplevel;
|
gint index, x_window, y_window, x_toplevel, y_toplevel;
|
||||||
gint x_temp, y_temp;
|
gint x_temp, y_temp;
|
||||||
gboolean ret;
|
gboolean ret;
|
||||||
graphene_point3d_t verts[4];
|
ClutterVertex verts[4];
|
||||||
PangoLayout *layout;
|
PangoLayout *layout;
|
||||||
gint x_layout, y_layout;
|
gint x_layout, y_layout;
|
||||||
|
|
||||||
|
98
clutter/clutter/cally/cally-texture.c
Normal file
98
clutter/clutter/cally/cally-texture.c
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
/* CALLY - The Clutter Accessibility Implementation Library
|
||||||
|
*
|
||||||
|
* Copyright (C) 2009 Igalia, S.L.
|
||||||
|
*
|
||||||
|
* Author: Alejandro Piñeiro Iglesias <apinheiro@igalia.com>
|
||||||
|
*
|
||||||
|
* 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, write to the
|
||||||
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
* Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SECTION:cally-texture
|
||||||
|
* @Title: CallyTexture
|
||||||
|
* @short_description: Implementation of the ATK interfaces for a #ClutterTexture
|
||||||
|
* @see_also: #ClutterTexture
|
||||||
|
*
|
||||||
|
* #CallyTexture implements the required ATK interfaces of #ClutterTexture
|
||||||
|
*
|
||||||
|
* In particular it sets a proper role for the texture.
|
||||||
|
*/
|
||||||
|
#include "clutter-build-config.h"
|
||||||
|
|
||||||
|
#define CLUTTER_DISABLE_DEPRECATION_WARNINGS
|
||||||
|
|
||||||
|
#include "cally-texture.h"
|
||||||
|
#include "cally-actor-private.h"
|
||||||
|
|
||||||
|
#include "deprecated/clutter-texture.h"
|
||||||
|
|
||||||
|
/* AtkObject */
|
||||||
|
static void cally_texture_real_initialize (AtkObject *obj,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
G_DEFINE_TYPE (CallyTexture, cally_texture, CALLY_TYPE_ACTOR)
|
||||||
|
|
||||||
|
static void
|
||||||
|
cally_texture_class_init (CallyTextureClass *klass)
|
||||||
|
{
|
||||||
|
/* GObjectClass *gobject_class = G_OBJECT_CLASS (klass); */
|
||||||
|
AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
|
||||||
|
|
||||||
|
class->initialize = cally_texture_real_initialize;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
cally_texture_init (CallyTexture *texture)
|
||||||
|
{
|
||||||
|
/* nothing to do yet */
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* cally_texture_new:
|
||||||
|
* @actor: a #ClutterActor
|
||||||
|
*
|
||||||
|
* Creates a new #CallyTexture for the given @actor. @actor must be
|
||||||
|
* a #ClutterTexture.
|
||||||
|
*
|
||||||
|
* Return value: the newly created #AtkObject
|
||||||
|
*
|
||||||
|
* Since: 1.4
|
||||||
|
*/
|
||||||
|
AtkObject*
|
||||||
|
cally_texture_new (ClutterActor *actor)
|
||||||
|
{
|
||||||
|
GObject *object = NULL;
|
||||||
|
AtkObject *accessible = NULL;
|
||||||
|
|
||||||
|
g_return_val_if_fail (CLUTTER_IS_TEXTURE (actor), NULL);
|
||||||
|
|
||||||
|
object = g_object_new (CALLY_TYPE_TEXTURE, NULL);
|
||||||
|
|
||||||
|
accessible = ATK_OBJECT (object);
|
||||||
|
atk_object_initialize (accessible, actor);
|
||||||
|
|
||||||
|
return accessible;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
cally_texture_real_initialize (AtkObject *obj,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
ATK_OBJECT_CLASS (cally_texture_parent_class)->initialize (obj, data);
|
||||||
|
|
||||||
|
/* default role */
|
||||||
|
obj->role = ATK_ROLE_IMAGE;
|
||||||
|
}
|
84
clutter/clutter/cally/cally-texture.h
Normal file
84
clutter/clutter/cally/cally-texture.h
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
/* CALLY - The Clutter Accessibility Implementation Library
|
||||||
|
*
|
||||||
|
* Copyright (C) 2009 Igalia, S.L.
|
||||||
|
*
|
||||||
|
* Author: Alejandro Piñeiro Iglesias <apinheiro@igalia.com>
|
||||||
|
*
|
||||||
|
* 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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __CALLY_TEXTURE_H__
|
||||||
|
#define __CALLY_TEXTURE_H__
|
||||||
|
|
||||||
|
#if !defined(__CALLY_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
|
||||||
|
#error "Only <cally/cally.h> can be included directly."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <clutter/clutter.h>
|
||||||
|
#include <cally/cally-actor.h>
|
||||||
|
|
||||||
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
#define CALLY_TYPE_TEXTURE (cally_texture_get_type ())
|
||||||
|
#define CALLY_TEXTURE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CALLY_TYPE_TEXTURE, CallyTexture))
|
||||||
|
#define CALLY_TEXTURE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CALLY_TYPE_TEXTURE, CallyTextureClass))
|
||||||
|
#define CALLY_IS_TEXTURE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CALLY_TYPE_TEXTURE))
|
||||||
|
#define CALLY_IS_TEXTURE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CALLY_TYPE_TEXTURE))
|
||||||
|
#define CALLY_TEXTURE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CALLY_TYPE_TEXTURE, CallyTextureClass))
|
||||||
|
|
||||||
|
typedef struct _CallyTexture CallyTexture;
|
||||||
|
typedef struct _CallyTextureClass CallyTextureClass;
|
||||||
|
typedef struct _CallyTexturePrivate CallyTexturePrivate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CallyTexture:
|
||||||
|
*
|
||||||
|
* The <structname>CallyTexture</structname> structure contains only
|
||||||
|
* private data and should be accessed using the provided API
|
||||||
|
*
|
||||||
|
* Since: 1.4
|
||||||
|
*/
|
||||||
|
struct _CallyTexture
|
||||||
|
{
|
||||||
|
/*< private >*/
|
||||||
|
CallyActor parent;
|
||||||
|
|
||||||
|
CallyTexturePrivate *priv;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CallyTextureClass:
|
||||||
|
*
|
||||||
|
* The <structname>CallyTextureClass</structname> structure contains
|
||||||
|
* only private data
|
||||||
|
*
|
||||||
|
* Since: 1.4
|
||||||
|
*/
|
||||||
|
struct _CallyTextureClass
|
||||||
|
{
|
||||||
|
/*< private >*/
|
||||||
|
CallyActorClass parent_class;
|
||||||
|
|
||||||
|
/* padding for future expansion */
|
||||||
|
gpointer _padding_dummy[8];
|
||||||
|
};
|
||||||
|
|
||||||
|
CLUTTER_EXPORT
|
||||||
|
GType cally_texture_get_type (void) G_GNUC_CONST;
|
||||||
|
CLUTTER_EXPORT
|
||||||
|
AtkObject *cally_texture_new (ClutterActor *actor);
|
||||||
|
|
||||||
|
G_END_DECLS
|
||||||
|
|
||||||
|
#endif /* __CALLY_TEXTURE_H__ */
|
@@ -36,9 +36,9 @@
|
|||||||
#include "cally.h"
|
#include "cally.h"
|
||||||
|
|
||||||
#include "cally-actor.h"
|
#include "cally-actor.h"
|
||||||
#include "cally-group.h"
|
|
||||||
#include "cally-stage.h"
|
#include "cally-stage.h"
|
||||||
#include "cally-text.h"
|
#include "cally-text.h"
|
||||||
|
#include "cally-texture.h"
|
||||||
#include "cally-rectangle.h"
|
#include "cally-rectangle.h"
|
||||||
#include "cally-clone.h"
|
#include "cally-clone.h"
|
||||||
|
|
||||||
@@ -52,9 +52,9 @@
|
|||||||
|
|
||||||
/* factories initialization*/
|
/* factories initialization*/
|
||||||
CALLY_ACCESSIBLE_FACTORY (CALLY_TYPE_ACTOR, cally_actor, cally_actor_new)
|
CALLY_ACCESSIBLE_FACTORY (CALLY_TYPE_ACTOR, cally_actor, cally_actor_new)
|
||||||
CALLY_ACCESSIBLE_FACTORY (CALLY_TYPE_GROUP, cally_group, cally_group_new)
|
|
||||||
CALLY_ACCESSIBLE_FACTORY (CALLY_TYPE_STAGE, cally_stage, cally_stage_new)
|
CALLY_ACCESSIBLE_FACTORY (CALLY_TYPE_STAGE, cally_stage, cally_stage_new)
|
||||||
CALLY_ACCESSIBLE_FACTORY (CALLY_TYPE_TEXT, cally_text, cally_text_new)
|
CALLY_ACCESSIBLE_FACTORY (CALLY_TYPE_TEXT, cally_text, cally_text_new)
|
||||||
|
CALLY_ACCESSIBLE_FACTORY (CALLY_TYPE_TEXTURE, cally_texture, cally_texture_new)
|
||||||
CALLY_ACCESSIBLE_FACTORY (CALLY_TYPE_RECTANGLE, cally_rectangle, cally_rectangle_new)
|
CALLY_ACCESSIBLE_FACTORY (CALLY_TYPE_RECTANGLE, cally_rectangle, cally_rectangle_new)
|
||||||
CALLY_ACCESSIBLE_FACTORY (CALLY_TYPE_CLONE, cally_clone, cally_clone_new)
|
CALLY_ACCESSIBLE_FACTORY (CALLY_TYPE_CLONE, cally_clone, cally_clone_new)
|
||||||
|
|
||||||
@@ -73,9 +73,9 @@ cally_accessibility_init (void)
|
|||||||
{
|
{
|
||||||
/* setting the factories */
|
/* setting the factories */
|
||||||
CALLY_ACTOR_SET_FACTORY (CLUTTER_TYPE_ACTOR, cally_actor);
|
CALLY_ACTOR_SET_FACTORY (CLUTTER_TYPE_ACTOR, cally_actor);
|
||||||
CALLY_ACTOR_SET_FACTORY (CLUTTER_TYPE_GROUP, cally_group);
|
|
||||||
CALLY_ACTOR_SET_FACTORY (CLUTTER_TYPE_STAGE, cally_stage);
|
CALLY_ACTOR_SET_FACTORY (CLUTTER_TYPE_STAGE, cally_stage);
|
||||||
CALLY_ACTOR_SET_FACTORY (CLUTTER_TYPE_TEXT, cally_text);
|
CALLY_ACTOR_SET_FACTORY (CLUTTER_TYPE_TEXT, cally_text);
|
||||||
|
CALLY_ACTOR_SET_FACTORY (CLUTTER_TYPE_TEXTURE, cally_texture);
|
||||||
CALLY_ACTOR_SET_FACTORY (CLUTTER_TYPE_RECTANGLE, cally_rectangle);
|
CALLY_ACTOR_SET_FACTORY (CLUTTER_TYPE_RECTANGLE, cally_rectangle);
|
||||||
CALLY_ACTOR_SET_FACTORY (CLUTTER_TYPE_CLONE, cally_clone);
|
CALLY_ACTOR_SET_FACTORY (CLUTTER_TYPE_CLONE, cally_clone);
|
||||||
|
|
||||||
|
@@ -26,12 +26,12 @@
|
|||||||
#include "cally-actor.h"
|
#include "cally-actor.h"
|
||||||
#include "cally-clone.h"
|
#include "cally-clone.h"
|
||||||
#include "cally-factory.h"
|
#include "cally-factory.h"
|
||||||
#include "cally-group.h"
|
|
||||||
#include "cally-main.h"
|
#include "cally-main.h"
|
||||||
#include "cally-rectangle.h"
|
#include "cally-rectangle.h"
|
||||||
#include "cally-root.h"
|
#include "cally-root.h"
|
||||||
#include "cally-stage.h"
|
#include "cally-stage.h"
|
||||||
#include "cally-text.h"
|
#include "cally-text.h"
|
||||||
|
#include "cally-texture.h"
|
||||||
#include "cally-util.h"
|
#include "cally-util.h"
|
||||||
|
|
||||||
#undef __CALLY_H_INSIDE__
|
#undef __CALLY_H_INSIDE__
|
||||||
|
@@ -1,12 +0,0 @@
|
|||||||
#ifndef __CLUTTER_ACTOR_BOX_PRIVATE_H__
|
|
||||||
#define __CLUTTER_ACTOR_BOX_PRIVATE_H__
|
|
||||||
|
|
||||||
#include <clutter/clutter-types.h>
|
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
|
||||||
|
|
||||||
void _clutter_actor_box_enlarge_for_effects (ClutterActorBox *box);
|
|
||||||
|
|
||||||
G_END_DECLS
|
|
||||||
|
|
||||||
#endif /* __CLUTTER_ACTOR_BOX_PRIVATE_H__ */
|
|
@@ -5,7 +5,6 @@
|
|||||||
#include "clutter-types.h"
|
#include "clutter-types.h"
|
||||||
#include "clutter-interval.h"
|
#include "clutter-interval.h"
|
||||||
#include "clutter-private.h"
|
#include "clutter-private.h"
|
||||||
#include "clutter-actor-box-private.h"
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* clutter_actor_box_new:
|
* clutter_actor_box_new:
|
||||||
@@ -340,7 +339,7 @@ clutter_actor_box_contains (const ClutterActorBox *box,
|
|||||||
/**
|
/**
|
||||||
* clutter_actor_box_from_vertices:
|
* clutter_actor_box_from_vertices:
|
||||||
* @box: a #ClutterActorBox
|
* @box: a #ClutterActorBox
|
||||||
* @verts: (array fixed-size=4): array of four #graphene_point3d_t
|
* @verts: (array fixed-size=4): array of four #ClutterVertex
|
||||||
*
|
*
|
||||||
* Calculates the bounding box represented by the four vertices; for details
|
* Calculates the bounding box represented by the four vertices; for details
|
||||||
* of the vertex array see clutter_actor_get_abs_allocation_vertices().
|
* of the vertex array see clutter_actor_get_abs_allocation_vertices().
|
||||||
@@ -348,8 +347,8 @@ clutter_actor_box_contains (const ClutterActorBox *box,
|
|||||||
* Since: 1.0
|
* Since: 1.0
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
clutter_actor_box_from_vertices (ClutterActorBox *box,
|
clutter_actor_box_from_vertices (ClutterActorBox *box,
|
||||||
const graphene_point3d_t verts[])
|
const ClutterVertex verts[])
|
||||||
{
|
{
|
||||||
gfloat x_1, x_2, y_1, y_2;
|
gfloat x_1, x_2, y_1, y_2;
|
||||||
|
|
||||||
@@ -543,78 +542,6 @@ clutter_actor_box_set_size (ClutterActorBox *box,
|
|||||||
box->y2 = box->y1 + height;
|
box->y2 = box->y1 + height;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
_clutter_actor_box_enlarge_for_effects (ClutterActorBox *box)
|
|
||||||
{
|
|
||||||
float width, height;
|
|
||||||
|
|
||||||
/* 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.
|
|
||||||
*
|
|
||||||
* The reason this is important is because effects will use this
|
|
||||||
* API to determine the size of offscreen framebuffers and so for
|
|
||||||
* a fixed-size object that may be animated accross the screen we
|
|
||||||
* want to make sure that the stage paint-box has an equally stable
|
|
||||||
* size so that effects aren't made to continuously re-allocate
|
|
||||||
* a corresponding fbo.
|
|
||||||
*
|
|
||||||
* The other thing we consider is that the calculation of this box is
|
|
||||||
* subject to floating point precision issues that might be slightly
|
|
||||||
* different to the precision issues involved with actually painting the
|
|
||||||
* actor, which might result in painting slightly leaking outside the
|
|
||||||
* user's calculated paint-volume. For this we simply aim to pad out the
|
|
||||||
* paint-volume by at least half a pixel all the way around.
|
|
||||||
*/
|
|
||||||
width = box->x2 - box->x1;
|
|
||||||
height = box->y2 - box->y1;
|
|
||||||
width = CLUTTER_NEARBYINT (width);
|
|
||||||
height = CLUTTER_NEARBYINT (height);
|
|
||||||
/* XXX: NB the width/height may now be up to 0.5px too small so we
|
|
||||||
* must also pad by 0.25px all around to account for this. In total we
|
|
||||||
* must padd by at least 0.75px around all sides. */
|
|
||||||
|
|
||||||
/* XXX: The furthest that we can overshoot the bottom right corner by
|
|
||||||
* here is 1.75px in total if you consider that the 0.75 padding could
|
|
||||||
* just cross an integer boundary and so ceil will effectively add 1.
|
|
||||||
*/
|
|
||||||
box->x2 = ceilf (box->x2 + 0.75);
|
|
||||||
box->y2 = ceilf (box->y2 + 0.75);
|
|
||||||
|
|
||||||
/* Now we redefine the top-left relative to the bottom right based on the
|
|
||||||
* rounded width/height determined above + a constant so that the overall
|
|
||||||
* size of the box will be stable and not dependant on the box's
|
|
||||||
* position.
|
|
||||||
*
|
|
||||||
* Adding 3px to the width/height will ensure we cover the maximum of
|
|
||||||
* 1.75px padding on the bottom/right and still ensure we have > 0.75px
|
|
||||||
* padding on the top/left.
|
|
||||||
*/
|
|
||||||
box->x1 = box->x2 - width - 3;
|
|
||||||
box->y1 = box->y2 - height - 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* clutter_actor_box_scale:
|
|
||||||
* @box: a #ClutterActorBox
|
|
||||||
* @scale: scale factor for resizing this box
|
|
||||||
*
|
|
||||||
* Rescale the @box by provided @scale factor.
|
|
||||||
*
|
|
||||||
* Since: 1.6
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
clutter_actor_box_scale (ClutterActorBox *box,
|
|
||||||
gfloat scale)
|
|
||||||
{
|
|
||||||
g_return_if_fail (box != NULL);
|
|
||||||
|
|
||||||
box->x1 *= scale;
|
|
||||||
box->x2 *= scale;
|
|
||||||
box->y1 *= scale;
|
|
||||||
box->y2 *= scale;
|
|
||||||
}
|
|
||||||
|
|
||||||
G_DEFINE_BOXED_TYPE_WITH_CODE (ClutterActorBox, clutter_actor_box,
|
G_DEFINE_BOXED_TYPE_WITH_CODE (ClutterActorBox, clutter_actor_box,
|
||||||
clutter_actor_box_copy,
|
clutter_actor_box_copy,
|
||||||
clutter_actor_box_free,
|
clutter_actor_box_free,
|
||||||
|
@@ -51,7 +51,7 @@
|
|||||||
struct _ClutterActorMetaPrivate
|
struct _ClutterActorMetaPrivate
|
||||||
{
|
{
|
||||||
ClutterActor *actor;
|
ClutterActor *actor;
|
||||||
gulong destroy_id;
|
guint destroy_id;
|
||||||
|
|
||||||
gchar *name;
|
gchar *name;
|
||||||
|
|
||||||
@@ -91,7 +91,11 @@ clutter_actor_meta_real_set_actor (ClutterActorMeta *meta,
|
|||||||
if (meta->priv->actor == actor)
|
if (meta->priv->actor == actor)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
g_clear_signal_handler (&meta->priv->destroy_id, meta->priv->actor);
|
if (meta->priv->destroy_id != 0)
|
||||||
|
{
|
||||||
|
g_signal_handler_disconnect (meta->priv->actor, meta->priv->destroy_id);
|
||||||
|
meta->priv->destroy_id = 0;
|
||||||
|
}
|
||||||
|
|
||||||
meta->priv->actor = actor;
|
meta->priv->actor = actor;
|
||||||
|
|
||||||
@@ -158,8 +162,8 @@ clutter_actor_meta_finalize (GObject *gobject)
|
|||||||
{
|
{
|
||||||
ClutterActorMetaPrivate *priv = CLUTTER_ACTOR_META (gobject)->priv;
|
ClutterActorMetaPrivate *priv = CLUTTER_ACTOR_META (gobject)->priv;
|
||||||
|
|
||||||
if (priv->actor != NULL)
|
if (priv->destroy_id != 0 && priv->actor != NULL)
|
||||||
g_clear_signal_handler (&priv->destroy_id, priv->actor);
|
g_signal_handler_disconnect (priv->actor, priv->destroy_id);
|
||||||
|
|
||||||
g_free (priv->name);
|
g_free (priv->name);
|
||||||
|
|
||||||
@@ -573,7 +577,8 @@ _clutter_meta_group_clear_metas (ClutterMetaGroup *group)
|
|||||||
{
|
{
|
||||||
g_list_foreach (group->meta, (GFunc) _clutter_actor_meta_set_actor, NULL);
|
g_list_foreach (group->meta, (GFunc) _clutter_actor_meta_set_actor, NULL);
|
||||||
|
|
||||||
g_list_free_full (group->meta, g_object_unref);
|
g_list_foreach (group->meta, (GFunc) g_object_unref, NULL);
|
||||||
|
g_list_free (group->meta);
|
||||||
group->meta = NULL;
|
group->meta = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -53,8 +53,7 @@ typedef enum
|
|||||||
* Controls some options for how clutter_actor_traverse() iterates
|
* Controls some options for how clutter_actor_traverse() iterates
|
||||||
* through the graph.
|
* through the graph.
|
||||||
*/
|
*/
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
CLUTTER_ACTOR_TRAVERSE_DEPTH_FIRST = 1L<<0,
|
CLUTTER_ACTOR_TRAVERSE_DEPTH_FIRST = 1L<<0,
|
||||||
CLUTTER_ACTOR_TRAVERSE_BREADTH_FIRST = 1L<<1
|
CLUTTER_ACTOR_TRAVERSE_BREADTH_FIRST = 1L<<1
|
||||||
} ClutterActorTraverseFlags;
|
} ClutterActorTraverseFlags;
|
||||||
@@ -75,8 +74,7 @@ typedef enum
|
|||||||
* the continuing traversal. It may stop traversal completely, just
|
* the continuing traversal. It may stop traversal completely, just
|
||||||
* skip over children for the current actor or continue as normal.
|
* skip over children for the current actor or continue as normal.
|
||||||
*/
|
*/
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
CLUTTER_ACTOR_TRAVERSE_VISIT_CONTINUE = 1L<<0,
|
CLUTTER_ACTOR_TRAVERSE_VISIT_CONTINUE = 1L<<0,
|
||||||
CLUTTER_ACTOR_TRAVERSE_VISIT_SKIP_CHILDREN = 1L<<1,
|
CLUTTER_ACTOR_TRAVERSE_VISIT_SKIP_CHILDREN = 1L<<1,
|
||||||
CLUTTER_ACTOR_TRAVERSE_VISIT_BREAK = 1L<<2
|
CLUTTER_ACTOR_TRAVERSE_VISIT_BREAK = 1L<<2
|
||||||
@@ -135,7 +133,7 @@ struct _AnchorCoord
|
|||||||
} fraction;
|
} fraction;
|
||||||
|
|
||||||
/* Use when is_fractional == FALSE */
|
/* Use when is_fractional == FALSE */
|
||||||
graphene_point3d_t units;
|
ClutterVertex units;
|
||||||
} v;
|
} v;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -163,7 +161,7 @@ struct _SizeRequest
|
|||||||
struct _ClutterLayoutInfo
|
struct _ClutterLayoutInfo
|
||||||
{
|
{
|
||||||
/* fixed position coordinates */
|
/* fixed position coordinates */
|
||||||
graphene_point_t fixed_pos;
|
ClutterPoint fixed_pos;
|
||||||
|
|
||||||
ClutterMargin margin;
|
ClutterMargin margin;
|
||||||
|
|
||||||
@@ -173,8 +171,8 @@ struct _ClutterLayoutInfo
|
|||||||
guint x_expand : 1;
|
guint x_expand : 1;
|
||||||
guint y_expand : 1;
|
guint y_expand : 1;
|
||||||
|
|
||||||
graphene_size_t minimum;
|
ClutterSize minimum;
|
||||||
graphene_size_t natural;
|
ClutterSize natural;
|
||||||
};
|
};
|
||||||
|
|
||||||
const ClutterLayoutInfo * _clutter_actor_get_layout_info_or_defaults (ClutterActor *self);
|
const ClutterLayoutInfo * _clutter_actor_get_layout_info_or_defaults (ClutterActor *self);
|
||||||
@@ -203,13 +201,13 @@ struct _ClutterTransformInfo
|
|||||||
AnchorCoord anchor;
|
AnchorCoord anchor;
|
||||||
|
|
||||||
/* translation */
|
/* translation */
|
||||||
graphene_point3d_t translation;
|
ClutterVertex translation;
|
||||||
|
|
||||||
/* z_position */
|
/* z_position */
|
||||||
gfloat z_position;
|
gfloat z_position;
|
||||||
|
|
||||||
/* transformation center */
|
/* transformation center */
|
||||||
graphene_point_t pivot;
|
ClutterPoint pivot;
|
||||||
gfloat pivot_z;
|
gfloat pivot_z;
|
||||||
|
|
||||||
CoglMatrix transform;
|
CoglMatrix transform;
|
||||||
@@ -242,6 +240,9 @@ ClutterAnimationInfo * _clutter_actor_get_animation_info
|
|||||||
ClutterTransition * _clutter_actor_create_transition (ClutterActor *self,
|
ClutterTransition * _clutter_actor_create_transition (ClutterActor *self,
|
||||||
GParamSpec *pspec,
|
GParamSpec *pspec,
|
||||||
...);
|
...);
|
||||||
|
ClutterTransition * _clutter_actor_get_transition (ClutterActor *self,
|
||||||
|
GParamSpec *pspec);
|
||||||
|
|
||||||
gboolean _clutter_actor_foreach_child (ClutterActor *self,
|
gboolean _clutter_actor_foreach_child (ClutterActor *self,
|
||||||
ClutterForeachCallback callback,
|
ClutterForeachCallback callback,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
@@ -274,17 +275,17 @@ void _clutter_actor_set_enable_paint_unmapped
|
|||||||
void _clutter_actor_set_has_pointer (ClutterActor *self,
|
void _clutter_actor_set_has_pointer (ClutterActor *self,
|
||||||
gboolean has_pointer);
|
gboolean has_pointer);
|
||||||
|
|
||||||
void _clutter_actor_set_has_key_focus (ClutterActor *self,
|
void _clutter_actor_queue_redraw_with_clip (ClutterActor *self,
|
||||||
gboolean has_key_focus);
|
ClutterRedrawFlags flags,
|
||||||
|
ClutterPaintVolume *clip_volume);
|
||||||
void _clutter_actor_queue_redraw_with_clip (ClutterActor *self,
|
void _clutter_actor_queue_redraw_full (ClutterActor *self,
|
||||||
ClutterRedrawFlags flags,
|
ClutterRedrawFlags flags,
|
||||||
const ClutterPaintVolume *clip_volume);
|
ClutterPaintVolume *volume,
|
||||||
void _clutter_actor_queue_redraw_full (ClutterActor *self,
|
ClutterEffect *effect);
|
||||||
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,
|
||||||
|
ClutterPaintVolume *clip_volume);
|
||||||
void _clutter_actor_finish_queue_redraw (ClutterActor *self,
|
void _clutter_actor_finish_queue_redraw (ClutterActor *self,
|
||||||
ClutterPaintVolume *clip);
|
ClutterPaintVolume *clip);
|
||||||
|
|
||||||
@@ -297,6 +298,8 @@ const gchar * _clutter_actor_get_debug_name
|
|||||||
void _clutter_actor_push_clone_paint (void);
|
void _clutter_actor_push_clone_paint (void);
|
||||||
void _clutter_actor_pop_clone_paint (void);
|
void _clutter_actor_pop_clone_paint (void);
|
||||||
|
|
||||||
|
guint32 _clutter_actor_get_pick_id (ClutterActor *self);
|
||||||
|
|
||||||
void _clutter_actor_shader_pre_paint (ClutterActor *actor,
|
void _clutter_actor_shader_pre_paint (ClutterActor *actor,
|
||||||
gboolean repeat);
|
gboolean repeat);
|
||||||
void _clutter_actor_shader_post_paint (ClutterActor *actor);
|
void _clutter_actor_shader_post_paint (ClutterActor *actor);
|
||||||
@@ -313,10 +316,8 @@ void _clutter_actor_detach_clone
|
|||||||
void _clutter_actor_queue_redraw_on_clones (ClutterActor *actor);
|
void _clutter_actor_queue_redraw_on_clones (ClutterActor *actor);
|
||||||
void _clutter_actor_queue_relayout_on_clones (ClutterActor *actor);
|
void _clutter_actor_queue_relayout_on_clones (ClutterActor *actor);
|
||||||
void _clutter_actor_queue_only_relayout (ClutterActor *actor);
|
void _clutter_actor_queue_only_relayout (ClutterActor *actor);
|
||||||
void _clutter_actor_queue_update_resource_scale_recursive (ClutterActor *actor);
|
|
||||||
|
|
||||||
gboolean _clutter_actor_get_real_resource_scale (ClutterActor *actor,
|
CoglFramebuffer * _clutter_actor_get_active_framebuffer (ClutterActor *actor);
|
||||||
float *resource_scale);
|
|
||||||
|
|
||||||
ClutterPaintNode * clutter_actor_create_texture_paint_node (ClutterActor *self,
|
ClutterPaintNode * clutter_actor_create_texture_paint_node (ClutterActor *self,
|
||||||
CoglTexture *texture);
|
CoglTexture *texture);
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -39,8 +39,6 @@
|
|||||||
|
|
||||||
#include <clutter/clutter-types.h>
|
#include <clutter/clutter-types.h>
|
||||||
#include <clutter/clutter-event.h>
|
#include <clutter/clutter-event.h>
|
||||||
#include <clutter/clutter-paint-context.h>
|
|
||||||
#include <clutter/clutter-pick-context.h>
|
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
@@ -230,18 +228,16 @@ struct _ClutterActorClass
|
|||||||
void (* unrealize) (ClutterActor *self);
|
void (* unrealize) (ClutterActor *self);
|
||||||
void (* map) (ClutterActor *self);
|
void (* map) (ClutterActor *self);
|
||||||
void (* unmap) (ClutterActor *self);
|
void (* unmap) (ClutterActor *self);
|
||||||
void (* paint) (ClutterActor *self,
|
void (* paint) (ClutterActor *self);
|
||||||
ClutterPaintContext *paint_context);
|
|
||||||
void (* parent_set) (ClutterActor *actor,
|
void (* parent_set) (ClutterActor *actor,
|
||||||
ClutterActor *old_parent);
|
ClutterActor *old_parent);
|
||||||
|
|
||||||
void (* destroy) (ClutterActor *self);
|
void (* destroy) (ClutterActor *self);
|
||||||
void (* pick) (ClutterActor *actor,
|
void (* pick) (ClutterActor *actor,
|
||||||
ClutterPickContext *pick_context);
|
const ClutterColor *color);
|
||||||
|
|
||||||
gboolean (* queue_redraw) (ClutterActor *actor,
|
void (* queue_redraw) (ClutterActor *actor,
|
||||||
ClutterActor *leaf_that_queued,
|
ClutterActor *leaf_that_queued);
|
||||||
ClutterPaintVolume *paint_volume);
|
|
||||||
|
|
||||||
/* size negotiation */
|
/* size negotiation */
|
||||||
void (* get_preferred_width) (ClutterActor *self,
|
void (* get_preferred_width) (ClutterActor *self,
|
||||||
@@ -353,17 +349,9 @@ void clutter_actor_map
|
|||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
void clutter_actor_unmap (ClutterActor *self);
|
void clutter_actor_unmap (ClutterActor *self);
|
||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
void clutter_actor_paint (ClutterActor *self,
|
void clutter_actor_paint (ClutterActor *self);
|
||||||
ClutterPaintContext *paint_context);
|
|
||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
void clutter_actor_continue_paint (ClutterActor *self,
|
void clutter_actor_continue_paint (ClutterActor *self);
|
||||||
ClutterPaintContext *paint_context);
|
|
||||||
CLUTTER_EXPORT
|
|
||||||
void clutter_actor_pick (ClutterActor *actor,
|
|
||||||
ClutterPickContext *pick_context);
|
|
||||||
CLUTTER_EXPORT
|
|
||||||
void clutter_actor_continue_pick (ClutterActor *actor,
|
|
||||||
ClutterPickContext *pick_context);
|
|
||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
void clutter_actor_queue_redraw (ClutterActor *self);
|
void clutter_actor_queue_redraw (ClutterActor *self);
|
||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
@@ -442,7 +430,7 @@ void clutter_actor_get_allocation_box
|
|||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
void clutter_actor_get_allocation_vertices (ClutterActor *self,
|
void clutter_actor_get_allocation_vertices (ClutterActor *self,
|
||||||
ClutterActor *ancestor,
|
ClutterActor *ancestor,
|
||||||
graphene_point3d_t *verts);
|
ClutterVertex verts[]);
|
||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
gboolean clutter_actor_has_allocation (ClutterActor *self);
|
gboolean clutter_actor_has_allocation (ClutterActor *self);
|
||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
@@ -595,11 +583,6 @@ gboolean clutter_actor_is_in_clone_paint
|
|||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
gboolean clutter_actor_get_paint_box (ClutterActor *self,
|
gboolean clutter_actor_get_paint_box (ClutterActor *self,
|
||||||
ClutterActorBox *box);
|
ClutterActorBox *box);
|
||||||
|
|
||||||
CLUTTER_EXPORT
|
|
||||||
gboolean clutter_actor_get_resource_scale (ClutterActor *self,
|
|
||||||
gfloat *resource_scale);
|
|
||||||
|
|
||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
gboolean clutter_actor_has_overlaps (ClutterActor *self);
|
gboolean clutter_actor_has_overlaps (ClutterActor *self);
|
||||||
|
|
||||||
@@ -828,16 +811,16 @@ gboolean clutter_actor_transform_stage_point
|
|||||||
gfloat *y_out);
|
gfloat *y_out);
|
||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
void clutter_actor_get_abs_allocation_vertices (ClutterActor *self,
|
void clutter_actor_get_abs_allocation_vertices (ClutterActor *self,
|
||||||
graphene_point3d_t *verts);
|
ClutterVertex verts[]);
|
||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
void clutter_actor_apply_transform_to_point (ClutterActor *self,
|
void clutter_actor_apply_transform_to_point (ClutterActor *self,
|
||||||
const graphene_point3d_t *point,
|
const ClutterVertex *point,
|
||||||
graphene_point3d_t *vertex);
|
ClutterVertex *vertex);
|
||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
void clutter_actor_apply_relative_transform_to_point (ClutterActor *self,
|
void clutter_actor_apply_relative_transform_to_point (ClutterActor *self,
|
||||||
ClutterActor *ancestor,
|
ClutterActor *ancestor,
|
||||||
const graphene_point3d_t *point,
|
const ClutterVertex *point,
|
||||||
graphene_point3d_t *vertex);
|
ClutterVertex *vertex);
|
||||||
|
|
||||||
/* Implicit animations */
|
/* Implicit animations */
|
||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
@@ -913,11 +896,6 @@ void clutter_actor_bind_model_with_properties
|
|||||||
const char *first_model_property,
|
const char *first_model_property,
|
||||||
...);
|
...);
|
||||||
|
|
||||||
CLUTTER_EXPORT
|
|
||||||
void clutter_actor_pick_box (ClutterActor *self,
|
|
||||||
ClutterPickContext *pick_context,
|
|
||||||
const ClutterActorBox *box);
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __CLUTTER_ACTOR_H__ */
|
#endif /* __CLUTTER_ACTOR_H__ */
|
||||||
|
@@ -30,7 +30,7 @@
|
|||||||
* to control how a #ClutterAnimation will animate a property.
|
* to control how a #ClutterAnimation will animate a property.
|
||||||
*
|
*
|
||||||
* Each #ClutterAnimatable should implement the
|
* Each #ClutterAnimatable should implement the
|
||||||
* #ClutterAnimatableInterface.interpolate_property() virtual function of the
|
* #ClutterAnimatableIface.interpolate_property() virtual function of the
|
||||||
* interface to compute the animation state between two values of an interval
|
* interface to compute the animation state between two values of an interval
|
||||||
* depending on a progress factor, expressed as a floating point value.
|
* depending on a progress factor, expressed as a floating point value.
|
||||||
*
|
*
|
||||||
@@ -54,8 +54,10 @@
|
|||||||
#include "clutter-debug.h"
|
#include "clutter-debug.h"
|
||||||
#include "clutter-private.h"
|
#include "clutter-private.h"
|
||||||
|
|
||||||
|
#include "deprecated/clutter-animatable.h"
|
||||||
#include "deprecated/clutter-animation.h"
|
#include "deprecated/clutter-animation.h"
|
||||||
|
|
||||||
|
typedef ClutterAnimatableIface ClutterAnimatableInterface;
|
||||||
G_DEFINE_INTERFACE (ClutterAnimatable, clutter_animatable, G_TYPE_OBJECT);
|
G_DEFINE_INTERFACE (ClutterAnimatable, clutter_animatable, G_TYPE_OBJECT);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -63,6 +65,80 @@ clutter_animatable_default_init (ClutterAnimatableInterface *iface)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* clutter_animatable_animate_property:
|
||||||
|
* @animatable: a #ClutterAnimatable
|
||||||
|
* @animation: a #ClutterAnimation
|
||||||
|
* @property_name: the name of the animated property
|
||||||
|
* @initial_value: the initial value of the animation interval
|
||||||
|
* @final_value: the final value of the animation interval
|
||||||
|
* @progress: the progress factor
|
||||||
|
* @value: return location for the animation value
|
||||||
|
*
|
||||||
|
* Calls the animate_property() virtual function for @animatable.
|
||||||
|
*
|
||||||
|
* The @initial_value and @final_value #GValue<!-- -->s must contain
|
||||||
|
* the same type; @value must have been initialized to the same
|
||||||
|
* type of @initial_value and @final_value.
|
||||||
|
*
|
||||||
|
* All implementation of the #ClutterAnimatable interface must
|
||||||
|
* implement this function.
|
||||||
|
*
|
||||||
|
* Return value: %TRUE if the value has been validated and can
|
||||||
|
* be applied to the #ClutterAnimatable, and %FALSE otherwise
|
||||||
|
*
|
||||||
|
* Since: 1.0
|
||||||
|
*
|
||||||
|
* Deprecated: 1.8: Use clutter_animatable_interpolate_value()
|
||||||
|
* instead
|
||||||
|
*/
|
||||||
|
gboolean
|
||||||
|
clutter_animatable_animate_property (ClutterAnimatable *animatable,
|
||||||
|
ClutterAnimation *animation,
|
||||||
|
const gchar *property_name,
|
||||||
|
const GValue *initial_value,
|
||||||
|
const GValue *final_value,
|
||||||
|
gdouble progress,
|
||||||
|
GValue *value)
|
||||||
|
{
|
||||||
|
ClutterAnimatableIface *iface;
|
||||||
|
gboolean res;
|
||||||
|
|
||||||
|
g_return_val_if_fail (CLUTTER_IS_ANIMATABLE (animatable), FALSE);
|
||||||
|
g_return_val_if_fail (CLUTTER_IS_ANIMATION (animation), FALSE);
|
||||||
|
g_return_val_if_fail (property_name != NULL, FALSE);
|
||||||
|
g_return_val_if_fail (initial_value != NULL && final_value != NULL, FALSE);
|
||||||
|
g_return_val_if_fail (G_VALUE_TYPE (initial_value) != G_TYPE_INVALID, FALSE);
|
||||||
|
g_return_val_if_fail (G_VALUE_TYPE (final_value) != G_TYPE_INVALID, FALSE);
|
||||||
|
g_return_val_if_fail (value != NULL, FALSE);
|
||||||
|
g_return_val_if_fail (G_VALUE_TYPE (value) == G_VALUE_TYPE (initial_value) &&
|
||||||
|
G_VALUE_TYPE (value) == G_VALUE_TYPE (final_value),
|
||||||
|
FALSE);
|
||||||
|
|
||||||
|
iface = CLUTTER_ANIMATABLE_GET_IFACE (animatable);
|
||||||
|
if (iface->animate_property == NULL)
|
||||||
|
{
|
||||||
|
ClutterInterval *interval;
|
||||||
|
|
||||||
|
interval = clutter_animation_get_interval (animation, property_name);
|
||||||
|
if (interval == NULL)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
res = clutter_animatable_interpolate_value (animatable, property_name,
|
||||||
|
interval,
|
||||||
|
progress,
|
||||||
|
value);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
res = iface->animate_property (animatable, animation,
|
||||||
|
property_name,
|
||||||
|
initial_value, final_value,
|
||||||
|
progress,
|
||||||
|
value);
|
||||||
|
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* clutter_animatable_find_property:
|
* clutter_animatable_find_property:
|
||||||
* @animatable: a #ClutterAnimatable
|
* @animatable: a #ClutterAnimatable
|
||||||
@@ -79,7 +155,7 @@ GParamSpec *
|
|||||||
clutter_animatable_find_property (ClutterAnimatable *animatable,
|
clutter_animatable_find_property (ClutterAnimatable *animatable,
|
||||||
const gchar *property_name)
|
const gchar *property_name)
|
||||||
{
|
{
|
||||||
ClutterAnimatableInterface *iface;
|
ClutterAnimatableIface *iface;
|
||||||
|
|
||||||
g_return_val_if_fail (CLUTTER_IS_ANIMATABLE (animatable), NULL);
|
g_return_val_if_fail (CLUTTER_IS_ANIMATABLE (animatable), NULL);
|
||||||
g_return_val_if_fail (property_name != NULL, NULL);
|
g_return_val_if_fail (property_name != NULL, NULL);
|
||||||
@@ -109,7 +185,7 @@ clutter_animatable_get_initial_state (ClutterAnimatable *animatable,
|
|||||||
const gchar *property_name,
|
const gchar *property_name,
|
||||||
GValue *value)
|
GValue *value)
|
||||||
{
|
{
|
||||||
ClutterAnimatableInterface *iface;
|
ClutterAnimatableIface *iface;
|
||||||
|
|
||||||
g_return_if_fail (CLUTTER_IS_ANIMATABLE (animatable));
|
g_return_if_fail (CLUTTER_IS_ANIMATABLE (animatable));
|
||||||
g_return_if_fail (property_name != NULL);
|
g_return_if_fail (property_name != NULL);
|
||||||
@@ -138,7 +214,7 @@ clutter_animatable_set_final_state (ClutterAnimatable *animatable,
|
|||||||
const gchar *property_name,
|
const gchar *property_name,
|
||||||
const GValue *value)
|
const GValue *value)
|
||||||
{
|
{
|
||||||
ClutterAnimatableInterface *iface;
|
ClutterAnimatableIface *iface;
|
||||||
|
|
||||||
g_return_if_fail (CLUTTER_IS_ANIMATABLE (animatable));
|
g_return_if_fail (CLUTTER_IS_ANIMATABLE (animatable));
|
||||||
g_return_if_fail (property_name != NULL);
|
g_return_if_fail (property_name != NULL);
|
||||||
@@ -184,7 +260,7 @@ clutter_animatable_interpolate_value (ClutterAnimatable *animatable,
|
|||||||
gdouble progress,
|
gdouble progress,
|
||||||
GValue *value)
|
GValue *value)
|
||||||
{
|
{
|
||||||
ClutterAnimatableInterface *iface;
|
ClutterAnimatableIface *iface;
|
||||||
|
|
||||||
g_return_val_if_fail (CLUTTER_IS_ANIMATABLE (animatable), FALSE);
|
g_return_val_if_fail (CLUTTER_IS_ANIMATABLE (animatable), FALSE);
|
||||||
g_return_val_if_fail (property_name != NULL, FALSE);
|
g_return_val_if_fail (property_name != NULL, FALSE);
|
||||||
|
@@ -33,15 +33,24 @@
|
|||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define CLUTTER_TYPE_ANIMATABLE (clutter_animatable_get_type ())
|
#define CLUTTER_TYPE_ANIMATABLE (clutter_animatable_get_type ())
|
||||||
|
#define CLUTTER_ANIMATABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_ANIMATABLE, ClutterAnimatable))
|
||||||
|
#define CLUTTER_IS_ANIMATABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_ANIMATABLE))
|
||||||
|
#define CLUTTER_ANIMATABLE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), CLUTTER_TYPE_ANIMATABLE, ClutterAnimatableIface))
|
||||||
|
|
||||||
CLUTTER_EXPORT
|
typedef struct _ClutterAnimatableIface ClutterAnimatableIface;
|
||||||
G_DECLARE_INTERFACE (ClutterAnimatable, clutter_animatable,
|
|
||||||
CLUTTER, ANIMATABLE,
|
|
||||||
GObject)
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ClutterAnimatableInterface:
|
* ClutterAnimatable:
|
||||||
|
*
|
||||||
|
* #ClutterAnimatable is an opaque structure whose members cannot be directly
|
||||||
|
* accessed
|
||||||
|
*
|
||||||
|
* Since: 1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ClutterAnimatableIface:
|
||||||
* @animate_property: virtual function for custom interpolation of a
|
* @animate_property: virtual function for custom interpolation of a
|
||||||
* property. This virtual function is deprecated
|
* property. This virtual function is deprecated
|
||||||
* @find_property: virtual function for retrieving the #GParamSpec of
|
* @find_property: virtual function for retrieving the #GParamSpec of
|
||||||
@@ -58,7 +67,7 @@ G_DECLARE_INTERFACE (ClutterAnimatable, clutter_animatable,
|
|||||||
*
|
*
|
||||||
* Since: 1.0
|
* Since: 1.0
|
||||||
*/
|
*/
|
||||||
struct _ClutterAnimatableInterface
|
struct _ClutterAnimatableIface
|
||||||
{
|
{
|
||||||
/*< private >*/
|
/*< private >*/
|
||||||
GTypeInterface parent_iface;
|
GTypeInterface parent_iface;
|
||||||
@@ -86,6 +95,9 @@ struct _ClutterAnimatableInterface
|
|||||||
GValue *value);
|
GValue *value);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
CLUTTER_EXPORT
|
||||||
|
GType clutter_animatable_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
GParamSpec *clutter_animatable_find_property (ClutterAnimatable *animatable,
|
GParamSpec *clutter_animatable_find_property (ClutterAnimatable *animatable,
|
||||||
const gchar *property_name);
|
const gchar *property_name);
|
||||||
|
@@ -34,6 +34,7 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterAction, g_object_unref)
|
|||||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterActor, g_object_unref)
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterActor, g_object_unref)
|
||||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterActorMeta, g_object_unref)
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterActorMeta, g_object_unref)
|
||||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterAlignConstraint, g_object_unref)
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterAlignConstraint, g_object_unref)
|
||||||
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterAnimatable, g_object_unref)
|
||||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterBackend, g_object_unref)
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterBackend, g_object_unref)
|
||||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterBindConstraint, g_object_unref)
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterBindConstraint, g_object_unref)
|
||||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterBindingPool, g_object_unref)
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterBindingPool, g_object_unref)
|
||||||
@@ -48,8 +49,10 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterClone, g_object_unref)
|
|||||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterColorizeEffect, g_object_unref)
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterColorizeEffect, g_object_unref)
|
||||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterConstraint, g_object_unref)
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterConstraint, g_object_unref)
|
||||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterContainer, g_object_unref)
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterContainer, g_object_unref)
|
||||||
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterContent, g_object_unref)
|
||||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterDeformEffect, g_object_unref)
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterDeformEffect, g_object_unref)
|
||||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterDesaturateEffect, g_object_unref)
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterDesaturateEffect, g_object_unref)
|
||||||
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterDeviceManager, g_object_unref)
|
||||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterDragAction, g_object_unref)
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterDragAction, g_object_unref)
|
||||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterDropAction, g_object_unref)
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterDropAction, g_object_unref)
|
||||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterEffect, g_object_unref)
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterEffect, g_object_unref)
|
||||||
@@ -90,10 +93,13 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterActorBox, clutter_actor_box_free)
|
|||||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterColor, clutter_color_free)
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterColor, clutter_color_free)
|
||||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterMargin, clutter_margin_free)
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterMargin, clutter_margin_free)
|
||||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterMatrix, clutter_matrix_free)
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterMatrix, clutter_matrix_free)
|
||||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterPaintContext, clutter_paint_context_unref)
|
|
||||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterPaintNode, clutter_paint_node_unref)
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterPaintNode, clutter_paint_node_unref)
|
||||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterPaintVolume, clutter_paint_volume_free)
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterPaintVolume, clutter_paint_volume_free)
|
||||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterPathNode, clutter_path_node_free)
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterPathNode, clutter_path_node_free)
|
||||||
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterPoint, clutter_point_free)
|
||||||
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterRect, clutter_rect_free)
|
||||||
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterSize, clutter_size_free)
|
||||||
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterVertex, clutter_vertex_free)
|
||||||
|
|
||||||
#endif /* __GI_SCANNER__ */
|
#endif /* __GI_SCANNER__ */
|
||||||
|
|
||||||
|
@@ -24,9 +24,10 @@
|
|||||||
|
|
||||||
#include <clutter/clutter-backend.h>
|
#include <clutter/clutter-backend.h>
|
||||||
#include <clutter/clutter-device-manager.h>
|
#include <clutter/clutter-device-manager.h>
|
||||||
#include <clutter/clutter-keymap.h>
|
|
||||||
#include <clutter/clutter-stage-window.h>
|
#include <clutter/clutter-stage-window.h>
|
||||||
|
|
||||||
|
#include "clutter-event-translator.h"
|
||||||
|
|
||||||
#define CLUTTER_BACKEND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_BACKEND, ClutterBackendClass))
|
#define CLUTTER_BACKEND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_BACKEND, ClutterBackendClass))
|
||||||
#define CLUTTER_IS_BACKEND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_BACKEND))
|
#define CLUTTER_IS_BACKEND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_BACKEND))
|
||||||
#define CLUTTER_BACKEND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_BACKEND, ClutterBackendClass))
|
#define CLUTTER_BACKEND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_BACKEND, ClutterBackendClass))
|
||||||
@@ -56,11 +57,9 @@ struct _ClutterBackend
|
|||||||
gfloat units_per_em;
|
gfloat units_per_em;
|
||||||
gint32 units_serial;
|
gint32 units_serial;
|
||||||
|
|
||||||
ClutterStageWindow *stage_window;
|
GList *event_translators;
|
||||||
|
|
||||||
ClutterInputMethod *input_method;
|
ClutterInputMethod *input_method;
|
||||||
|
|
||||||
ClutterKeymap *keymap;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _ClutterBackendClass
|
struct _ClutterBackendClass
|
||||||
@@ -91,6 +90,12 @@ struct _ClutterBackendClass
|
|||||||
GError **error);
|
GError **error);
|
||||||
ClutterDeviceManager *(* get_device_manager) (ClutterBackend *backend);
|
ClutterDeviceManager *(* get_device_manager) (ClutterBackend *backend);
|
||||||
|
|
||||||
|
void (* copy_event_data) (ClutterBackend *backend,
|
||||||
|
const ClutterEvent *src,
|
||||||
|
ClutterEvent *dest);
|
||||||
|
void (* free_event_data) (ClutterBackend *backend,
|
||||||
|
ClutterEvent *event);
|
||||||
|
|
||||||
gboolean (* translate_event) (ClutterBackend *backend,
|
gboolean (* translate_event) (ClutterBackend *backend,
|
||||||
gpointer native,
|
gpointer native,
|
||||||
ClutterEvent *event);
|
ClutterEvent *event);
|
||||||
@@ -99,8 +104,6 @@ struct _ClutterBackendClass
|
|||||||
|
|
||||||
void (* bell_notify) (ClutterBackend *backend);
|
void (* bell_notify) (ClutterBackend *backend);
|
||||||
|
|
||||||
ClutterKeymap * (* get_keymap) (ClutterBackend *backend);
|
|
||||||
|
|
||||||
/* signals */
|
/* signals */
|
||||||
void (* resolution_changed) (ClutterBackend *backend);
|
void (* resolution_changed) (ClutterBackend *backend);
|
||||||
void (* font_changed) (ClutterBackend *backend);
|
void (* font_changed) (ClutterBackend *backend);
|
||||||
@@ -128,11 +131,17 @@ void _clutter_backend_copy_event_data (Clutter
|
|||||||
ClutterEvent *dest);
|
ClutterEvent *dest);
|
||||||
void _clutter_backend_free_event_data (ClutterBackend *backend,
|
void _clutter_backend_free_event_data (ClutterBackend *backend,
|
||||||
ClutterEvent *event);
|
ClutterEvent *event);
|
||||||
CLUTTER_EXPORT
|
|
||||||
gboolean _clutter_backend_translate_event (ClutterBackend *backend,
|
gboolean _clutter_backend_translate_event (ClutterBackend *backend,
|
||||||
gpointer native,
|
gpointer native,
|
||||||
ClutterEvent *event);
|
ClutterEvent *event);
|
||||||
|
|
||||||
|
CLUTTER_EXPORT
|
||||||
|
void _clutter_backend_add_event_translator (ClutterBackend *backend,
|
||||||
|
ClutterEventTranslator *translator);
|
||||||
|
|
||||||
|
void _clutter_backend_remove_event_translator (ClutterBackend *backend,
|
||||||
|
ClutterEventTranslator *translator);
|
||||||
|
|
||||||
ClutterFeatureFlags _clutter_backend_get_features (ClutterBackend *backend);
|
ClutterFeatureFlags _clutter_backend_get_features (ClutterBackend *backend);
|
||||||
|
|
||||||
gfloat _clutter_backend_get_units_per_em (ClutterBackend *backend,
|
gfloat _clutter_backend_get_units_per_em (ClutterBackend *backend,
|
||||||
@@ -141,10 +150,12 @@ gint32 _clutter_backend_get_units_serial (Clutter
|
|||||||
|
|
||||||
PangoDirection _clutter_backend_get_keymap_direction (ClutterBackend *backend);
|
PangoDirection _clutter_backend_get_keymap_direction (ClutterBackend *backend);
|
||||||
|
|
||||||
|
CLUTTER_EXPORT
|
||||||
|
void _clutter_backend_reset_cogl_framebuffer (ClutterBackend *backend);
|
||||||
|
|
||||||
void clutter_set_allowed_drivers (const char *drivers);
|
void clutter_set_allowed_drivers (const char *drivers);
|
||||||
|
|
||||||
CLUTTER_EXPORT
|
void clutter_try_set_windowing_backend (const char *drivers);
|
||||||
ClutterStageWindow * clutter_backend_get_stage_window (ClutterBackend *backend);
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
@@ -53,6 +53,9 @@
|
|||||||
#include "clutter-stage-window.h"
|
#include "clutter-stage-window.h"
|
||||||
#include "clutter-device-manager-private.h"
|
#include "clutter-device-manager-private.h"
|
||||||
|
|
||||||
|
#define CLUTTER_DISABLE_DEPRECATION_WARNINGS
|
||||||
|
#include "deprecated/clutter-backend.h"
|
||||||
|
|
||||||
#ifdef CLUTTER_HAS_WAYLAND_COMPOSITOR_SUPPORT
|
#ifdef CLUTTER_HAS_WAYLAND_COMPOSITOR_SUPPORT
|
||||||
#include "wayland/clutter-wayland-compositor.h"
|
#include "wayland/clutter-wayland-compositor.h"
|
||||||
#endif
|
#endif
|
||||||
@@ -62,6 +65,9 @@
|
|||||||
#ifdef CLUTTER_INPUT_X11
|
#ifdef CLUTTER_INPUT_X11
|
||||||
#include "x11/clutter-backend-x11.h"
|
#include "x11/clutter-backend-x11.h"
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef CLUTTER_INPUT_EVDEV
|
||||||
|
#include "evdev/clutter-device-manager-evdev.h"
|
||||||
|
#endif
|
||||||
#ifdef CLUTTER_WINDOWING_EGL
|
#ifdef CLUTTER_WINDOWING_EGL
|
||||||
#include "egl/clutter-backend-eglnative.h"
|
#include "egl/clutter-backend-eglnative.h"
|
||||||
#endif
|
#endif
|
||||||
@@ -101,12 +107,10 @@ clutter_backend_dispose (GObject *gobject)
|
|||||||
/* clear the events still in the queue of the main context */
|
/* clear the events still in the queue of the main context */
|
||||||
_clutter_clear_events_queue ();
|
_clutter_clear_events_queue ();
|
||||||
|
|
||||||
|
/* remove all event translators */
|
||||||
|
g_clear_pointer (&backend->event_translators, g_list_free);
|
||||||
|
|
||||||
g_clear_pointer (&backend->dummy_onscreen, cogl_object_unref);
|
g_clear_pointer (&backend->dummy_onscreen, cogl_object_unref);
|
||||||
if (backend->stage_window)
|
|
||||||
{
|
|
||||||
g_object_remove_weak_pointer (G_OBJECT (backend->stage_window),
|
|
||||||
(gpointer *) &backend->stage_window);
|
|
||||||
}
|
|
||||||
|
|
||||||
G_OBJECT_CLASS (clutter_backend_parent_class)->dispose (gobject);
|
G_OBJECT_CLASS (clutter_backend_parent_class)->dispose (gobject);
|
||||||
}
|
}
|
||||||
@@ -396,7 +400,7 @@ clutter_backend_real_create_context (ClutterBackend *backend,
|
|||||||
else
|
else
|
||||||
g_set_error_literal (error, CLUTTER_INIT_ERROR,
|
g_set_error_literal (error, CLUTTER_INIT_ERROR,
|
||||||
CLUTTER_INIT_ERROR_BACKEND,
|
CLUTTER_INIT_ERROR_BACKEND,
|
||||||
"Unable to initialize the Clutter backend: no available drivers found.");
|
_("Unable to initialize the Clutter backend: no available drivers found."));
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -426,7 +430,7 @@ clutter_backend_real_get_features (ClutterBackend *backend)
|
|||||||
if (cogl_clutter_winsys_has_feature (COGL_WINSYS_FEATURE_SWAP_THROTTLE))
|
if (cogl_clutter_winsys_has_feature (COGL_WINSYS_FEATURE_SWAP_THROTTLE))
|
||||||
{
|
{
|
||||||
CLUTTER_NOTE (BACKEND, "Cogl supports swap buffers throttling");
|
CLUTTER_NOTE (BACKEND, "Cogl supports swap buffers throttling");
|
||||||
flags |= CLUTTER_FEATURE_SWAP_THROTTLE;
|
flags |= CLUTTER_FEATURE_SYNC_TO_VBLANK;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
CLUTTER_NOTE (BACKEND, "Cogl doesn't support swap buffers throttling");
|
CLUTTER_NOTE (BACKEND, "Cogl doesn't support swap buffers throttling");
|
||||||
@@ -525,7 +529,40 @@ _clutter_create_backend (void)
|
|||||||
static void
|
static void
|
||||||
clutter_backend_real_init_events (ClutterBackend *backend)
|
clutter_backend_real_init_events (ClutterBackend *backend)
|
||||||
{
|
{
|
||||||
g_error ("Unknown input backend");
|
const char *input_backend = NULL;
|
||||||
|
|
||||||
|
input_backend = g_getenv ("CLUTTER_INPUT_BACKEND");
|
||||||
|
if (input_backend != NULL)
|
||||||
|
input_backend = g_intern_string (input_backend);
|
||||||
|
|
||||||
|
#ifdef CLUTTER_INPUT_X11
|
||||||
|
if (clutter_check_windowing_backend (CLUTTER_WINDOWING_X11) &&
|
||||||
|
(input_backend == NULL || input_backend == I_(CLUTTER_INPUT_X11)))
|
||||||
|
{
|
||||||
|
_clutter_backend_x11_events_init (backend);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
#ifdef CLUTTER_INPUT_EVDEV
|
||||||
|
/* Evdev can be used regardless of the windowing system */
|
||||||
|
if ((input_backend != NULL && strcmp (input_backend, CLUTTER_INPUT_EVDEV) == 0)
|
||||||
|
#ifdef CLUTTER_WINDOWING_EGL
|
||||||
|
/* but we do want to always use it for EGL native */
|
||||||
|
|| clutter_check_windowing_backend (CLUTTER_WINDOWING_EGL)
|
||||||
|
#endif
|
||||||
|
)
|
||||||
|
{
|
||||||
|
_clutter_events_evdev_init (backend);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
if (input_backend != NULL)
|
||||||
|
{
|
||||||
|
if (input_backend != I_(CLUTTER_INPUT_NULL))
|
||||||
|
g_error ("Unrecognized input backend '%s'", input_backend);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
g_error ("Unknown input backend");
|
||||||
}
|
}
|
||||||
|
|
||||||
static ClutterDeviceManager *
|
static ClutterDeviceManager *
|
||||||
@@ -540,16 +577,32 @@ clutter_backend_real_get_device_manager (ClutterBackend *backend)
|
|||||||
return backend->device_manager;
|
return backend->device_manager;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ClutterKeymap *
|
static gboolean
|
||||||
clutter_backend_real_get_keymap (ClutterBackend *backend)
|
clutter_backend_real_translate_event (ClutterBackend *backend,
|
||||||
|
gpointer native,
|
||||||
|
ClutterEvent *event)
|
||||||
{
|
{
|
||||||
if (G_UNLIKELY (backend->keymap == NULL))
|
GList *l;
|
||||||
|
|
||||||
|
for (l = backend->event_translators;
|
||||||
|
l != NULL;
|
||||||
|
l = l->next)
|
||||||
{
|
{
|
||||||
g_critical ("No keymap available, expect broken keyboard input");
|
ClutterEventTranslator *translator = l->data;
|
||||||
return NULL;
|
ClutterTranslateReturn retval;
|
||||||
|
|
||||||
|
retval = _clutter_event_translator_translate_event (translator,
|
||||||
|
native,
|
||||||
|
event);
|
||||||
|
|
||||||
|
if (retval == CLUTTER_TRANSLATE_QUEUE)
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
|
if (retval == CLUTTER_TRANSLATE_REMOVE)
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return backend->keymap;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -574,7 +627,8 @@ clutter_backend_class_init (ClutterBackendClass *klass)
|
|||||||
G_TYPE_FROM_CLASS (klass),
|
G_TYPE_FROM_CLASS (klass),
|
||||||
G_SIGNAL_RUN_FIRST,
|
G_SIGNAL_RUN_FIRST,
|
||||||
G_STRUCT_OFFSET (ClutterBackendClass, resolution_changed),
|
G_STRUCT_OFFSET (ClutterBackendClass, resolution_changed),
|
||||||
NULL, NULL, NULL,
|
NULL, NULL,
|
||||||
|
_clutter_marshal_VOID__VOID,
|
||||||
G_TYPE_NONE, 0);
|
G_TYPE_NONE, 0);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -591,7 +645,8 @@ clutter_backend_class_init (ClutterBackendClass *klass)
|
|||||||
G_TYPE_FROM_CLASS (klass),
|
G_TYPE_FROM_CLASS (klass),
|
||||||
G_SIGNAL_RUN_FIRST,
|
G_SIGNAL_RUN_FIRST,
|
||||||
G_STRUCT_OFFSET (ClutterBackendClass, font_changed),
|
G_STRUCT_OFFSET (ClutterBackendClass, font_changed),
|
||||||
NULL, NULL, NULL,
|
NULL, NULL,
|
||||||
|
_clutter_marshal_VOID__VOID,
|
||||||
G_TYPE_NONE, 0);
|
G_TYPE_NONE, 0);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -608,7 +663,8 @@ clutter_backend_class_init (ClutterBackendClass *klass)
|
|||||||
G_TYPE_FROM_CLASS (klass),
|
G_TYPE_FROM_CLASS (klass),
|
||||||
G_SIGNAL_RUN_FIRST,
|
G_SIGNAL_RUN_FIRST,
|
||||||
G_STRUCT_OFFSET (ClutterBackendClass, settings_changed),
|
G_STRUCT_OFFSET (ClutterBackendClass, settings_changed),
|
||||||
NULL, NULL, NULL,
|
NULL, NULL,
|
||||||
|
_clutter_marshal_VOID__VOID,
|
||||||
G_TYPE_NONE, 0);
|
G_TYPE_NONE, 0);
|
||||||
|
|
||||||
klass->resolution_changed = clutter_backend_real_resolution_changed;
|
klass->resolution_changed = clutter_backend_real_resolution_changed;
|
||||||
@@ -616,9 +672,9 @@ clutter_backend_class_init (ClutterBackendClass *klass)
|
|||||||
|
|
||||||
klass->init_events = clutter_backend_real_init_events;
|
klass->init_events = clutter_backend_real_init_events;
|
||||||
klass->get_device_manager = clutter_backend_real_get_device_manager;
|
klass->get_device_manager = clutter_backend_real_get_device_manager;
|
||||||
|
klass->translate_event = clutter_backend_real_translate_event;
|
||||||
klass->create_context = clutter_backend_real_create_context;
|
klass->create_context = clutter_backend_real_create_context;
|
||||||
klass->get_features = clutter_backend_real_get_features;
|
klass->get_features = clutter_backend_real_get_features;
|
||||||
klass->get_keymap = clutter_backend_real_get_keymap;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -627,7 +683,7 @@ clutter_backend_init (ClutterBackend *self)
|
|||||||
self->units_per_em = -1.0;
|
self->units_per_em = -1.0;
|
||||||
self->units_serial = 1;
|
self->units_serial = 1;
|
||||||
|
|
||||||
self->dummy_onscreen = NULL;
|
self->dummy_onscreen = COGL_INVALID_HANDLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -695,10 +751,6 @@ _clutter_backend_create_stage (ClutterBackend *backend,
|
|||||||
|
|
||||||
g_assert (CLUTTER_IS_STAGE_WINDOW (stage_window));
|
g_assert (CLUTTER_IS_STAGE_WINDOW (stage_window));
|
||||||
|
|
||||||
backend->stage_window = stage_window;
|
|
||||||
g_object_add_weak_pointer (G_OBJECT (backend->stage_window),
|
|
||||||
(gpointer *) &backend->stage_window);
|
|
||||||
|
|
||||||
return stage_window;
|
return stage_window;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -783,24 +835,37 @@ _clutter_backend_copy_event_data (ClutterBackend *backend,
|
|||||||
const ClutterEvent *src,
|
const ClutterEvent *src,
|
||||||
ClutterEvent *dest)
|
ClutterEvent *dest)
|
||||||
{
|
{
|
||||||
ClutterDeviceManagerClass *device_manager_class;
|
ClutterEventExtenderInterface *iface;
|
||||||
ClutterDeviceManager *device_manager;
|
ClutterBackendClass *klass;
|
||||||
|
|
||||||
device_manager = clutter_device_manager_get_default ();
|
klass = CLUTTER_BACKEND_GET_CLASS (backend);
|
||||||
device_manager_class = CLUTTER_DEVICE_MANAGER_GET_CLASS (device_manager);
|
if (CLUTTER_IS_EVENT_EXTENDER (backend->device_manager))
|
||||||
device_manager_class->copy_event_data (device_manager, src, dest);
|
{
|
||||||
|
iface = CLUTTER_EVENT_EXTENDER_GET_IFACE (backend->device_manager);
|
||||||
|
iface->copy_event_data (CLUTTER_EVENT_EXTENDER (backend->device_manager),
|
||||||
|
src, dest);
|
||||||
|
}
|
||||||
|
else if (klass->copy_event_data != NULL)
|
||||||
|
klass->copy_event_data (backend, src, dest);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
_clutter_backend_free_event_data (ClutterBackend *backend,
|
_clutter_backend_free_event_data (ClutterBackend *backend,
|
||||||
ClutterEvent *event)
|
ClutterEvent *event)
|
||||||
{
|
{
|
||||||
ClutterDeviceManagerClass *device_manager_class;
|
ClutterEventExtenderInterface *iface;
|
||||||
ClutterDeviceManager *device_manager;
|
ClutterBackendClass *klass;
|
||||||
|
|
||||||
device_manager = clutter_device_manager_get_default ();
|
klass = CLUTTER_BACKEND_GET_CLASS (backend);
|
||||||
device_manager_class = CLUTTER_DEVICE_MANAGER_GET_CLASS (device_manager);
|
|
||||||
device_manager_class->free_event_data (device_manager, event);
|
if (CLUTTER_IS_EVENT_EXTENDER (backend->device_manager))
|
||||||
|
{
|
||||||
|
iface = CLUTTER_EVENT_EXTENDER_GET_IFACE (backend->device_manager);
|
||||||
|
iface->free_event_data (CLUTTER_EVENT_EXTENDER (backend->device_manager),
|
||||||
|
event);
|
||||||
|
}
|
||||||
|
else if (klass->free_event_data != NULL)
|
||||||
|
klass->free_event_data (backend, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -825,6 +890,129 @@ clutter_get_default_backend (void)
|
|||||||
return clutter_context->backend;
|
return clutter_context->backend;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* clutter_backend_set_double_click_time:
|
||||||
|
* @backend: a #ClutterBackend
|
||||||
|
* @msec: milliseconds between two button press events
|
||||||
|
*
|
||||||
|
* Sets the maximum time between two button press events, used to
|
||||||
|
* verify whether it's a double click event or not.
|
||||||
|
*
|
||||||
|
* Since: 0.4
|
||||||
|
*
|
||||||
|
* Deprecated: 1.4: Use #ClutterSettings:double-click-time instead
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
clutter_backend_set_double_click_time (ClutterBackend *backend,
|
||||||
|
guint msec)
|
||||||
|
{
|
||||||
|
ClutterSettings *settings = clutter_settings_get_default ();
|
||||||
|
|
||||||
|
g_object_set (settings, "double-click-time", msec, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* clutter_backend_get_double_click_time:
|
||||||
|
* @backend: a #ClutterBackend
|
||||||
|
*
|
||||||
|
* Gets the maximum time between two button press events, as set
|
||||||
|
* by clutter_backend_set_double_click_time().
|
||||||
|
*
|
||||||
|
* Return value: a time in milliseconds
|
||||||
|
*
|
||||||
|
* Since: 0.4
|
||||||
|
*
|
||||||
|
* Deprecated: 1.4: Use #ClutterSettings:double-click-time instead
|
||||||
|
*/
|
||||||
|
guint
|
||||||
|
clutter_backend_get_double_click_time (ClutterBackend *backend)
|
||||||
|
{
|
||||||
|
ClutterSettings *settings = clutter_settings_get_default ();
|
||||||
|
gint retval;
|
||||||
|
|
||||||
|
g_object_get (settings, "double-click-time", &retval, NULL);
|
||||||
|
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* clutter_backend_set_double_click_distance:
|
||||||
|
* @backend: a #ClutterBackend
|
||||||
|
* @distance: a distance, in pixels
|
||||||
|
*
|
||||||
|
* Sets the maximum distance used to verify a double click event.
|
||||||
|
*
|
||||||
|
* Since: 0.4
|
||||||
|
*
|
||||||
|
* Deprecated: 1.4: Use #ClutterSettings:double-click-distance instead
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
clutter_backend_set_double_click_distance (ClutterBackend *backend,
|
||||||
|
guint distance)
|
||||||
|
{
|
||||||
|
ClutterSettings *settings = clutter_settings_get_default ();
|
||||||
|
|
||||||
|
g_object_set (settings, "double-click-distance", distance, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* clutter_backend_get_double_click_distance:
|
||||||
|
* @backend: a #ClutterBackend
|
||||||
|
*
|
||||||
|
* Retrieves the distance used to verify a double click event
|
||||||
|
*
|
||||||
|
* Return value: a distance, in pixels.
|
||||||
|
*
|
||||||
|
* Since: 0.4
|
||||||
|
*
|
||||||
|
* Deprecated: 1.4: Use #ClutterSettings:double-click-distance instead
|
||||||
|
*/
|
||||||
|
guint
|
||||||
|
clutter_backend_get_double_click_distance (ClutterBackend *backend)
|
||||||
|
{
|
||||||
|
ClutterSettings *settings = clutter_settings_get_default ();
|
||||||
|
gint retval;
|
||||||
|
|
||||||
|
g_object_get (settings, "double-click-distance", &retval, NULL);
|
||||||
|
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* clutter_backend_set_resolution:
|
||||||
|
* @backend: a #ClutterBackend
|
||||||
|
* @dpi: the resolution in "dots per inch" (Physical inches aren't
|
||||||
|
* actually involved; the terminology is conventional).
|
||||||
|
*
|
||||||
|
* Sets the resolution for font handling on the screen. This is a
|
||||||
|
* scale factor between points specified in a #PangoFontDescription
|
||||||
|
* and cairo units. The default value is 96, meaning that a 10 point
|
||||||
|
* font will be 13 units high. (10 * 96. / 72. = 13.3).
|
||||||
|
*
|
||||||
|
* Applications should never need to call this function.
|
||||||
|
*
|
||||||
|
* Since: 0.4
|
||||||
|
*
|
||||||
|
* Deprecated: 1.4: Use #ClutterSettings:font-dpi instead
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
clutter_backend_set_resolution (ClutterBackend *backend,
|
||||||
|
gdouble dpi)
|
||||||
|
{
|
||||||
|
ClutterSettings *settings;
|
||||||
|
gint resolution;
|
||||||
|
|
||||||
|
g_return_if_fail (CLUTTER_IS_BACKEND (backend));
|
||||||
|
|
||||||
|
if (dpi < 0)
|
||||||
|
resolution = -1;
|
||||||
|
else
|
||||||
|
resolution = dpi * 1024;
|
||||||
|
|
||||||
|
settings = clutter_settings_get_default ();
|
||||||
|
g_object_set (settings, "font-dpi", resolution, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* clutter_backend_get_resolution:
|
* clutter_backend_get_resolution:
|
||||||
* @backend: a #ClutterBackend
|
* @backend: a #ClutterBackend
|
||||||
@@ -930,6 +1118,61 @@ clutter_backend_get_font_options (ClutterBackend *backend)
|
|||||||
return backend->font_options;
|
return backend->font_options;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* clutter_backend_set_font_name:
|
||||||
|
* @backend: a #ClutterBackend
|
||||||
|
* @font_name: the name of the font
|
||||||
|
*
|
||||||
|
* Sets the default font to be used by Clutter. The @font_name string
|
||||||
|
* must either be %NULL, which means that the font name from the
|
||||||
|
* default #ClutterBackend will be used; or be something that can
|
||||||
|
* be parsed by the pango_font_description_from_string() function.
|
||||||
|
*
|
||||||
|
* Since: 1.0
|
||||||
|
*
|
||||||
|
* Deprecated: 1.4: Use #ClutterSettings:font-name instead
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
clutter_backend_set_font_name (ClutterBackend *backend,
|
||||||
|
const gchar *font_name)
|
||||||
|
{
|
||||||
|
ClutterSettings *settings = clutter_settings_get_default ();
|
||||||
|
|
||||||
|
g_object_set (settings, "font-name", font_name, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* clutter_backend_get_font_name:
|
||||||
|
* @backend: a #ClutterBackend
|
||||||
|
*
|
||||||
|
* Retrieves the default font name as set by
|
||||||
|
* clutter_backend_set_font_name().
|
||||||
|
*
|
||||||
|
* Return value: the font name for the backend. The returned string is
|
||||||
|
* owned by the #ClutterBackend and should never be modified or freed
|
||||||
|
*
|
||||||
|
* Since: 1.0
|
||||||
|
*
|
||||||
|
* Deprecated: 1.4: Use #ClutterSettings:font-name instead
|
||||||
|
*/
|
||||||
|
const gchar *
|
||||||
|
clutter_backend_get_font_name (ClutterBackend *backend)
|
||||||
|
{
|
||||||
|
ClutterSettings *settings;
|
||||||
|
|
||||||
|
g_return_val_if_fail (CLUTTER_IS_BACKEND (backend), NULL);
|
||||||
|
|
||||||
|
settings = clutter_settings_get_default ();
|
||||||
|
|
||||||
|
/* XXX yuck. but we return a const pointer, so we need to
|
||||||
|
* store it in the backend
|
||||||
|
*/
|
||||||
|
g_free (backend->font_name);
|
||||||
|
g_object_get (settings, "font-name", &backend->font_name, NULL);
|
||||||
|
|
||||||
|
return backend->font_name;
|
||||||
|
}
|
||||||
|
|
||||||
gint32
|
gint32
|
||||||
_clutter_backend_get_units_serial (ClutterBackend *backend)
|
_clutter_backend_get_units_serial (ClutterBackend *backend)
|
||||||
{
|
{
|
||||||
@@ -946,6 +1189,28 @@ _clutter_backend_translate_event (ClutterBackend *backend,
|
|||||||
event);
|
event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_clutter_backend_add_event_translator (ClutterBackend *backend,
|
||||||
|
ClutterEventTranslator *translator)
|
||||||
|
{
|
||||||
|
if (g_list_find (backend->event_translators, translator) != NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
|
backend->event_translators =
|
||||||
|
g_list_prepend (backend->event_translators, translator);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_clutter_backend_remove_event_translator (ClutterBackend *backend,
|
||||||
|
ClutterEventTranslator *translator)
|
||||||
|
{
|
||||||
|
if (g_list_find (backend->event_translators, translator) == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
|
backend->event_translators =
|
||||||
|
g_list_remove (backend->event_translators, translator);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* clutter_backend_get_cogl_context: (skip)
|
* clutter_backend_get_cogl_context: (skip)
|
||||||
* @backend: a #ClutterBackend
|
* @backend: a #ClutterBackend
|
||||||
@@ -997,6 +1262,61 @@ clutter_wayland_set_compositor_display (void *display)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* clutter_set_windowing_backend:
|
||||||
|
* @backend_type: a comma separated list of windowing backends
|
||||||
|
*
|
||||||
|
* Restricts Clutter to only use the specified backend or list of backends.
|
||||||
|
*
|
||||||
|
* You can use one of the `CLUTTER_WINDOWING_*` symbols, e.g.
|
||||||
|
*
|
||||||
|
* |[<!-- language="C" -->
|
||||||
|
* clutter_set_windowing_backend (CLUTTER_WINDOWING_X11);
|
||||||
|
* ]|
|
||||||
|
*
|
||||||
|
* Will force Clutter to use the X11 windowing and input backend, and terminate
|
||||||
|
* if the X11 backend could not be initialized successfully.
|
||||||
|
*
|
||||||
|
* Since Clutter 1.26, you can also use a comma-separated list of windowing
|
||||||
|
* system backends to provide a fallback in case backends are not available or
|
||||||
|
* enabled, e.g.:
|
||||||
|
*
|
||||||
|
* |[<!-- language="C" -->
|
||||||
|
* clutter_set_windowing_backend ("gdk,wayland,x11");
|
||||||
|
* ]|
|
||||||
|
*
|
||||||
|
* Will make Clutter test for the GDK, Wayland, and X11 backends in that order.
|
||||||
|
*
|
||||||
|
* You can use the `*` special value to ask Clutter to use the internally
|
||||||
|
* defined list of backends. For instance:
|
||||||
|
*
|
||||||
|
* |[<!-- language="C" -->
|
||||||
|
* clutter_set_windowing_backend ("x11,wayland,*");
|
||||||
|
* ]|
|
||||||
|
*
|
||||||
|
* Will make Clutter test the X11 and Wayland backends, and then fall back
|
||||||
|
* to the internal list of available backends.
|
||||||
|
*
|
||||||
|
* This function must be called before the first API call to Clutter, including
|
||||||
|
* clutter_get_option_context()
|
||||||
|
*
|
||||||
|
* Since: 1.16
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
clutter_set_windowing_backend (const char *backend_type)
|
||||||
|
{
|
||||||
|
g_return_if_fail (backend_type != NULL);
|
||||||
|
|
||||||
|
allowed_backends = g_strdup (backend_type);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
clutter_try_set_windowing_backend (const char *backend_type)
|
||||||
|
{
|
||||||
|
if (allowed_backends == NULL)
|
||||||
|
clutter_set_windowing_backend (backend_type);
|
||||||
|
}
|
||||||
|
|
||||||
PangoDirection
|
PangoDirection
|
||||||
_clutter_backend_get_keymap_direction (ClutterBackend *backend)
|
_clutter_backend_get_keymap_direction (ClutterBackend *backend)
|
||||||
{
|
{
|
||||||
@@ -1009,6 +1329,27 @@ _clutter_backend_get_keymap_direction (ClutterBackend *backend)
|
|||||||
return PANGO_DIRECTION_NEUTRAL;
|
return PANGO_DIRECTION_NEUTRAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_clutter_backend_reset_cogl_framebuffer (ClutterBackend *backend)
|
||||||
|
{
|
||||||
|
if (backend->dummy_onscreen == COGL_INVALID_HANDLE)
|
||||||
|
{
|
||||||
|
CoglError *internal_error = NULL;
|
||||||
|
|
||||||
|
backend->dummy_onscreen = cogl_onscreen_new (backend->cogl_context, 1, 1);
|
||||||
|
|
||||||
|
if (!cogl_framebuffer_allocate (COGL_FRAMEBUFFER (backend->dummy_onscreen),
|
||||||
|
&internal_error))
|
||||||
|
{
|
||||||
|
g_critical ("Unable to create dummy onscreen: %s", internal_error->message);
|
||||||
|
cogl_error_free (internal_error);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
cogl_set_framebuffer (COGL_FRAMEBUFFER (backend->dummy_onscreen));
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
clutter_set_allowed_drivers (const char *drivers)
|
clutter_set_allowed_drivers (const char *drivers)
|
||||||
{
|
{
|
||||||
@@ -1058,23 +1399,3 @@ clutter_backend_set_input_method (ClutterBackend *backend,
|
|||||||
{
|
{
|
||||||
g_set_object (&backend->input_method, method);
|
g_set_object (&backend->input_method, method);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* clutter_backend_get_keymap:
|
|
||||||
* @backend: the #ClutterBackend
|
|
||||||
*
|
|
||||||
* Gets the keymap used by Clutter
|
|
||||||
*
|
|
||||||
* Returns: (transfer none): the keymap
|
|
||||||
**/
|
|
||||||
ClutterKeymap *
|
|
||||||
clutter_backend_get_keymap (ClutterBackend *backend)
|
|
||||||
{
|
|
||||||
return CLUTTER_BACKEND_GET_CLASS (backend)->get_keymap (backend);
|
|
||||||
}
|
|
||||||
|
|
||||||
ClutterStageWindow *
|
|
||||||
clutter_backend_get_stage_window (ClutterBackend *backend)
|
|
||||||
{
|
|
||||||
return backend->stage_window;
|
|
||||||
}
|
|
||||||
|
@@ -34,7 +34,6 @@
|
|||||||
#include <cogl/cogl.h>
|
#include <cogl/cogl.h>
|
||||||
|
|
||||||
#include <clutter/clutter-config.h>
|
#include <clutter/clutter-config.h>
|
||||||
#include <clutter/clutter-keymap.h>
|
|
||||||
#include <clutter/clutter-types.h>
|
#include <clutter/clutter-types.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
@@ -60,6 +59,9 @@ GType clutter_backend_get_type (void) G_GNUC_CONST;
|
|||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
ClutterBackend * clutter_get_default_backend (void);
|
ClutterBackend * clutter_get_default_backend (void);
|
||||||
|
|
||||||
|
CLUTTER_EXPORT
|
||||||
|
void clutter_set_windowing_backend (const char *backend_type);
|
||||||
|
|
||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
gdouble clutter_backend_get_resolution (ClutterBackend *backend);
|
gdouble clutter_backend_get_resolution (ClutterBackend *backend);
|
||||||
|
|
||||||
@@ -81,9 +83,6 @@ ClutterInputMethod * clutter_backend_get_input_method (Clutter
|
|||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
void clutter_backend_set_input_method (ClutterBackend *backend,
|
void clutter_backend_set_input_method (ClutterBackend *backend,
|
||||||
ClutterInputMethod *method);
|
ClutterInputMethod *method);
|
||||||
CLUTTER_EXPORT
|
|
||||||
ClutterKeymap * clutter_backend_get_keymap (ClutterBackend *backend);
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __CLUTTER_BACKEND_H__ */
|
#endif /* __CLUTTER_BACKEND_H__ */
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -36,7 +36,7 @@ G_BEGIN_DECLS
|
|||||||
|
|
||||||
typedef struct _ClutterBezier ClutterBezier;
|
typedef struct _ClutterBezier ClutterBezier;
|
||||||
|
|
||||||
ClutterBezier *_clutter_bezier_new (void);
|
ClutterBezier *_clutter_bezier_new ();
|
||||||
|
|
||||||
void _clutter_bezier_free (ClutterBezier * b);
|
void _clutter_bezier_free (ClutterBezier * b);
|
||||||
|
|
||||||
|
@@ -49,10 +49,10 @@
|
|||||||
|
|
||||||
#define CLUTTER_DISABLE_DEPRECATION_WARNINGS
|
#define CLUTTER_DISABLE_DEPRECATION_WARNINGS
|
||||||
#include "deprecated/clutter-container.h"
|
#include "deprecated/clutter-container.h"
|
||||||
|
#include "deprecated/clutter-bin-layout.h"
|
||||||
|
|
||||||
#include "clutter-actor-private.h"
|
#include "clutter-actor-private.h"
|
||||||
#include "clutter-animatable.h"
|
#include "clutter-animatable.h"
|
||||||
#include "clutter-bin-layout.h"
|
|
||||||
#include "clutter-child-meta.h"
|
#include "clutter-child-meta.h"
|
||||||
#include "clutter-debug.h"
|
#include "clutter-debug.h"
|
||||||
#include "clutter-enum-types.h"
|
#include "clutter-enum-types.h"
|
||||||
@@ -698,3 +698,187 @@ clutter_bin_layout_new (ClutterBinAlignment x_align,
|
|||||||
"y-align", y_align,
|
"y-align", y_align,
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* clutter_bin_layout_set_alignment:
|
||||||
|
* @self: a #ClutterBinLayout
|
||||||
|
* @child: (allow-none): a child of @container
|
||||||
|
* @x_align: the horizontal alignment policy to be used for the @child
|
||||||
|
* inside @container
|
||||||
|
* @y_align: the vertical aligment policy to be used on the @child
|
||||||
|
* inside @container
|
||||||
|
*
|
||||||
|
* Sets the horizontal and vertical alignment policies to be applied
|
||||||
|
* to a @child of @self
|
||||||
|
*
|
||||||
|
* If @child is %NULL then the @x_align and @y_align values will
|
||||||
|
* be set as the default alignment policies
|
||||||
|
*
|
||||||
|
* Since: 1.2
|
||||||
|
*
|
||||||
|
* Deprecated: 1.12: Use the #ClutterActor:x-align and
|
||||||
|
* #ClutterActor:y-align properties of #ClutterActor instead.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
clutter_bin_layout_set_alignment (ClutterBinLayout *self,
|
||||||
|
ClutterActor *child,
|
||||||
|
ClutterBinAlignment x_align,
|
||||||
|
ClutterBinAlignment y_align)
|
||||||
|
{
|
||||||
|
ClutterBinLayoutPrivate *priv;
|
||||||
|
ClutterLayoutManager *manager;
|
||||||
|
ClutterLayoutMeta *meta;
|
||||||
|
|
||||||
|
g_return_if_fail (CLUTTER_IS_BIN_LAYOUT (self));
|
||||||
|
g_return_if_fail (child == NULL || CLUTTER_IS_ACTOR (child));
|
||||||
|
|
||||||
|
priv = self->priv;
|
||||||
|
|
||||||
|
if (priv->container == NULL)
|
||||||
|
{
|
||||||
|
if (child == NULL)
|
||||||
|
{
|
||||||
|
set_x_align (self, x_align);
|
||||||
|
set_y_align (self, y_align);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
g_warning ("The layout of type '%s' must be associated to "
|
||||||
|
"a ClutterContainer before setting the alignment "
|
||||||
|
"on its children",
|
||||||
|
G_OBJECT_TYPE_NAME (self));
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
manager = CLUTTER_LAYOUT_MANAGER (self);
|
||||||
|
meta = clutter_layout_manager_get_child_meta (manager,
|
||||||
|
priv->container,
|
||||||
|
child);
|
||||||
|
g_assert (CLUTTER_IS_BIN_LAYER (meta));
|
||||||
|
|
||||||
|
set_layer_x_align (CLUTTER_BIN_LAYER (meta), x_align);
|
||||||
|
set_layer_y_align (CLUTTER_BIN_LAYER (meta), y_align);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* clutter_bin_layout_get_alignment:
|
||||||
|
* @self: a #ClutterBinLayout
|
||||||
|
* @child: (allow-none): a child of @container
|
||||||
|
* @x_align: (out) (allow-none): return location for the horizontal
|
||||||
|
* alignment policy
|
||||||
|
* @y_align: (out) (allow-none): return location for the vertical
|
||||||
|
* alignment policy
|
||||||
|
*
|
||||||
|
* Retrieves the horizontal and vertical alignment policies for
|
||||||
|
* a child of @self
|
||||||
|
*
|
||||||
|
* If @child is %NULL the default alignment policies will be returned
|
||||||
|
* instead
|
||||||
|
*
|
||||||
|
* Since: 1.2
|
||||||
|
*
|
||||||
|
* Deprecated: 1.12: Use the #ClutterActor:x-align and the
|
||||||
|
* #ClutterActor:y-align properties of #ClutterActor instead.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
clutter_bin_layout_get_alignment (ClutterBinLayout *self,
|
||||||
|
ClutterActor *child,
|
||||||
|
ClutterBinAlignment *x_align,
|
||||||
|
ClutterBinAlignment *y_align)
|
||||||
|
{
|
||||||
|
ClutterBinLayoutPrivate *priv;
|
||||||
|
ClutterLayoutManager *manager;
|
||||||
|
ClutterLayoutMeta *meta;
|
||||||
|
ClutterBinLayer *layer;
|
||||||
|
|
||||||
|
g_return_if_fail (CLUTTER_IS_BIN_LAYOUT (self));
|
||||||
|
|
||||||
|
priv = self->priv;
|
||||||
|
|
||||||
|
if (priv->container == NULL)
|
||||||
|
{
|
||||||
|
if (child == NULL)
|
||||||
|
{
|
||||||
|
if (x_align)
|
||||||
|
*x_align = priv->x_align;
|
||||||
|
|
||||||
|
if (y_align)
|
||||||
|
*y_align = priv->y_align;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
g_warning ("The layout of type '%s' must be associated to "
|
||||||
|
"a ClutterContainer before getting the alignment "
|
||||||
|
"of its children",
|
||||||
|
G_OBJECT_TYPE_NAME (self));
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
manager = CLUTTER_LAYOUT_MANAGER (self);
|
||||||
|
meta = clutter_layout_manager_get_child_meta (manager,
|
||||||
|
priv->container,
|
||||||
|
child);
|
||||||
|
g_assert (CLUTTER_IS_BIN_LAYER (meta));
|
||||||
|
|
||||||
|
layer = CLUTTER_BIN_LAYER (meta);
|
||||||
|
|
||||||
|
if (x_align)
|
||||||
|
*x_align = layer->x_align;
|
||||||
|
|
||||||
|
if (y_align)
|
||||||
|
*y_align = layer->y_align;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* clutter_bin_layout_add:
|
||||||
|
* @self: a #ClutterBinLayout
|
||||||
|
* @child: a #ClutterActor
|
||||||
|
* @x_align: horizontal alignment policy for @child
|
||||||
|
* @y_align: vertical alignment policy for @child
|
||||||
|
*
|
||||||
|
* Adds a #ClutterActor to the container using @self and
|
||||||
|
* sets the alignment policies for it
|
||||||
|
*
|
||||||
|
* This function is equivalent to clutter_container_add_actor()
|
||||||
|
* and clutter_layout_manager_child_set_property() but it does not
|
||||||
|
* require a pointer to the #ClutterContainer associated to the
|
||||||
|
* #ClutterBinLayout
|
||||||
|
*
|
||||||
|
* Since: 1.2
|
||||||
|
*
|
||||||
|
* Deprecated: 1.12: Use clutter_actor_add_child() instead.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
clutter_bin_layout_add (ClutterBinLayout *self,
|
||||||
|
ClutterActor *child,
|
||||||
|
ClutterBinAlignment x_align,
|
||||||
|
ClutterBinAlignment y_align)
|
||||||
|
{
|
||||||
|
ClutterBinLayoutPrivate *priv;
|
||||||
|
ClutterLayoutManager *manager;
|
||||||
|
ClutterLayoutMeta *meta;
|
||||||
|
|
||||||
|
g_return_if_fail (CLUTTER_IS_BIN_LAYOUT (self));
|
||||||
|
g_return_if_fail (CLUTTER_IS_ACTOR (child));
|
||||||
|
|
||||||
|
priv = self->priv;
|
||||||
|
|
||||||
|
if (priv->container == NULL)
|
||||||
|
{
|
||||||
|
g_warning ("The layout of type '%s' must be associated to "
|
||||||
|
"a ClutterContainer before adding children",
|
||||||
|
G_OBJECT_TYPE_NAME (self));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
clutter_container_add_actor (priv->container, child);
|
||||||
|
|
||||||
|
manager = CLUTTER_LAYOUT_MANAGER (self);
|
||||||
|
meta = clutter_layout_manager_get_child_meta (manager,
|
||||||
|
priv->container,
|
||||||
|
child);
|
||||||
|
g_assert (CLUTTER_IS_BIN_LAYER (meta));
|
||||||
|
|
||||||
|
set_layer_x_align (CLUTTER_BIN_LAYER (meta), x_align);
|
||||||
|
set_layer_y_align (CLUTTER_BIN_LAYER (meta), y_align);
|
||||||
|
}
|
||||||
|
@@ -152,9 +152,7 @@ clutter_bind_constraint_update_allocation (ClutterConstraint *constraint,
|
|||||||
ClutterBindConstraint *bind = CLUTTER_BIND_CONSTRAINT (constraint);
|
ClutterBindConstraint *bind = CLUTTER_BIND_CONSTRAINT (constraint);
|
||||||
gfloat source_width, source_height;
|
gfloat source_width, source_height;
|
||||||
gfloat actor_width, actor_height;
|
gfloat actor_width, actor_height;
|
||||||
graphene_point3d_t source_position;
|
ClutterVertex source_position = { 0., };
|
||||||
|
|
||||||
source_position = GRAPHENE_POINT3D_INIT (0.f, 0.f, 0.f);
|
|
||||||
|
|
||||||
if (bind->source == NULL)
|
if (bind->source == NULL)
|
||||||
return;
|
return;
|
||||||
|
@@ -235,7 +235,8 @@ clutter_binding_pool_finalize (GObject *gobject)
|
|||||||
|
|
||||||
g_hash_table_destroy (pool->entries_hash);
|
g_hash_table_destroy (pool->entries_hash);
|
||||||
|
|
||||||
g_slist_free_full (pool->entries, (GDestroyNotify) binding_entry_free);
|
g_slist_foreach (pool->entries, (GFunc) binding_entry_free, NULL);
|
||||||
|
g_slist_free (pool->entries);
|
||||||
|
|
||||||
G_OBJECT_CLASS (clutter_binding_pool_parent_class)->finalize (gobject);
|
G_OBJECT_CLASS (clutter_binding_pool_parent_class)->finalize (gobject);
|
||||||
}
|
}
|
||||||
|
@@ -99,8 +99,7 @@ G_DEFINE_TYPE (ClutterBlurEffect,
|
|||||||
CLUTTER_TYPE_OFFSCREEN_EFFECT);
|
CLUTTER_TYPE_OFFSCREEN_EFFECT);
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
clutter_blur_effect_pre_paint (ClutterEffect *effect,
|
clutter_blur_effect_pre_paint (ClutterEffect *effect)
|
||||||
ClutterPaintContext *paint_context)
|
|
||||||
{
|
{
|
||||||
ClutterBlurEffect *self = CLUTTER_BLUR_EFFECT (effect);
|
ClutterBlurEffect *self = CLUTTER_BLUR_EFFECT (effect);
|
||||||
ClutterEffectClass *parent_class;
|
ClutterEffectClass *parent_class;
|
||||||
@@ -125,7 +124,7 @@ clutter_blur_effect_pre_paint (ClutterEffect *effect,
|
|||||||
}
|
}
|
||||||
|
|
||||||
parent_class = CLUTTER_EFFECT_CLASS (clutter_blur_effect_parent_class);
|
parent_class = CLUTTER_EFFECT_CLASS (clutter_blur_effect_parent_class);
|
||||||
if (parent_class->pre_paint (effect, paint_context))
|
if (parent_class->pre_paint (effect))
|
||||||
{
|
{
|
||||||
ClutterOffscreenEffect *offscreen_effect =
|
ClutterOffscreenEffect *offscreen_effect =
|
||||||
CLUTTER_OFFSCREEN_EFFECT (effect);
|
CLUTTER_OFFSCREEN_EFFECT (effect);
|
||||||
@@ -158,12 +157,9 @@ clutter_blur_effect_pre_paint (ClutterEffect *effect,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
clutter_blur_effect_paint_target (ClutterOffscreenEffect *effect,
|
clutter_blur_effect_paint_target (ClutterOffscreenEffect *effect)
|
||||||
ClutterPaintContext *paint_context)
|
|
||||||
{
|
{
|
||||||
ClutterBlurEffect *self = CLUTTER_BLUR_EFFECT (effect);
|
ClutterBlurEffect *self = CLUTTER_BLUR_EFFECT (effect);
|
||||||
CoglFramebuffer *framebuffer =
|
|
||||||
clutter_paint_context_get_framebuffer (paint_context);
|
|
||||||
guint8 paint_opacity;
|
guint8 paint_opacity;
|
||||||
|
|
||||||
paint_opacity = clutter_actor_get_paint_opacity (self->actor);
|
paint_opacity = clutter_actor_get_paint_opacity (self->actor);
|
||||||
@@ -173,19 +169,19 @@ clutter_blur_effect_paint_target (ClutterOffscreenEffect *effect,
|
|||||||
paint_opacity,
|
paint_opacity,
|
||||||
paint_opacity,
|
paint_opacity,
|
||||||
paint_opacity);
|
paint_opacity);
|
||||||
|
cogl_push_source (self->pipeline);
|
||||||
|
|
||||||
cogl_framebuffer_draw_rectangle (framebuffer,
|
cogl_rectangle (0, 0, self->tex_width, self->tex_height);
|
||||||
self->pipeline,
|
|
||||||
0, 0,
|
cogl_pop_source ();
|
||||||
self->tex_width, self->tex_height);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
clutter_blur_effect_modify_paint_volume (ClutterEffect *effect,
|
clutter_blur_effect_get_paint_volume (ClutterEffect *effect,
|
||||||
ClutterPaintVolume *volume)
|
ClutterPaintVolume *volume)
|
||||||
{
|
{
|
||||||
gfloat cur_width, cur_height;
|
gfloat cur_width, cur_height;
|
||||||
graphene_point3d_t origin;
|
ClutterVertex origin;
|
||||||
|
|
||||||
clutter_paint_volume_get_origin (volume, &origin);
|
clutter_paint_volume_get_origin (volume, &origin);
|
||||||
cur_width = clutter_paint_volume_get_width (volume);
|
cur_width = clutter_paint_volume_get_width (volume);
|
||||||
@@ -226,7 +222,7 @@ clutter_blur_effect_class_init (ClutterBlurEffectClass *klass)
|
|||||||
gobject_class->dispose = clutter_blur_effect_dispose;
|
gobject_class->dispose = clutter_blur_effect_dispose;
|
||||||
|
|
||||||
effect_class->pre_paint = clutter_blur_effect_pre_paint;
|
effect_class->pre_paint = clutter_blur_effect_pre_paint;
|
||||||
effect_class->modify_paint_volume = clutter_blur_effect_modify_paint_volume;
|
effect_class->get_paint_volume = clutter_blur_effect_get_paint_volume;
|
||||||
|
|
||||||
offscreen_class = CLUTTER_OFFSCREEN_EFFECT_CLASS (klass);
|
offscreen_class = CLUTTER_OFFSCREEN_EFFECT_CLASS (klass);
|
||||||
offscreen_class->paint_target = clutter_blur_effect_paint_target;
|
offscreen_class->paint_target = clutter_blur_effect_paint_target;
|
||||||
@@ -252,7 +248,9 @@ clutter_blur_effect_init (ClutterBlurEffect *self)
|
|||||||
cogl_pipeline_add_layer_snippet (klass->base_pipeline, 0, snippet);
|
cogl_pipeline_add_layer_snippet (klass->base_pipeline, 0, snippet);
|
||||||
cogl_object_unref (snippet);
|
cogl_object_unref (snippet);
|
||||||
|
|
||||||
cogl_pipeline_set_layer_null_texture (klass->base_pipeline, 0);
|
cogl_pipeline_set_layer_null_texture (klass->base_pipeline,
|
||||||
|
0, /* layer number */
|
||||||
|
COGL_TEXTURE_TYPE_2D);
|
||||||
}
|
}
|
||||||
|
|
||||||
self->pipeline = cogl_pipeline_copy (klass->base_pipeline);
|
self->pipeline = cogl_pipeline_copy (klass->base_pipeline);
|
||||||
|
@@ -150,9 +150,9 @@ typedef struct _RequestedSize
|
|||||||
gfloat natural_size;
|
gfloat natural_size;
|
||||||
} RequestedSize;
|
} RequestedSize;
|
||||||
|
|
||||||
static float distribute_natural_allocation (float extra_space,
|
static gint distribute_natural_allocation (gint extra_space,
|
||||||
unsigned int n_requested_sizes,
|
guint n_requested_sizes,
|
||||||
RequestedSize *sizes);
|
RequestedSize *sizes);
|
||||||
static void count_expand_children (ClutterLayoutManager *layout,
|
static void count_expand_children (ClutterLayoutManager *layout,
|
||||||
ClutterContainer *container,
|
ClutterContainer *container,
|
||||||
gint *visible_children,
|
gint *visible_children,
|
||||||
@@ -624,19 +624,7 @@ get_preferred_size_for_opposite_orientation (ClutterBoxLayout *self,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Bring children up to size first */
|
/* Bring children up to size first */
|
||||||
if (isnormal (size) || size == 0)
|
size = distribute_natural_allocation (MAX (0, size), nvis_children, sizes);
|
||||||
{
|
|
||||||
size = distribute_natural_allocation (MAX (0, size),
|
|
||||||
nvis_children,
|
|
||||||
sizes);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
g_critical ("Actor %s (%p) received the invalid "
|
|
||||||
"value %f as minimum/natural size\n",
|
|
||||||
G_OBJECT_TYPE_NAME (container), container, size);
|
|
||||||
size = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Calculate space which hasn't distributed yet,
|
/* Calculate space which hasn't distributed yet,
|
||||||
* and is available for expanding children.
|
* and is available for expanding children.
|
||||||
@@ -891,18 +879,17 @@ compare_gap (gconstpointer p1,
|
|||||||
*
|
*
|
||||||
* Pulled from gtksizerequest.c from Gtk+
|
* Pulled from gtksizerequest.c from Gtk+
|
||||||
*/
|
*/
|
||||||
static float
|
static gint
|
||||||
distribute_natural_allocation (float extra_space,
|
distribute_natural_allocation (gint extra_space,
|
||||||
unsigned int n_requested_sizes,
|
guint n_requested_sizes,
|
||||||
RequestedSize *sizes)
|
RequestedSize *sizes)
|
||||||
{
|
{
|
||||||
unsigned int *spreading;
|
guint *spreading;
|
||||||
int i;
|
gint i;
|
||||||
|
|
||||||
g_return_val_if_fail (isnormal (extra_space) || extra_space == 0, 0);
|
|
||||||
g_return_val_if_fail (extra_space >= 0, 0);
|
g_return_val_if_fail (extra_space >= 0, 0);
|
||||||
|
|
||||||
spreading = g_newa (unsigned int, n_requested_sizes);
|
spreading = g_newa (guint, n_requested_sizes);
|
||||||
|
|
||||||
for (i = 0; i < n_requested_sizes; i++)
|
for (i = 0; i < n_requested_sizes; i++)
|
||||||
spreading[i] = i;
|
spreading[i] = i;
|
||||||
@@ -926,7 +913,7 @@ distribute_natural_allocation (float extra_space,
|
|||||||
|
|
||||||
/* Sort descending by gap and position. */
|
/* Sort descending by gap and position. */
|
||||||
g_qsort_with_data (spreading,
|
g_qsort_with_data (spreading,
|
||||||
n_requested_sizes, sizeof (unsigned int),
|
n_requested_sizes, sizeof (guint),
|
||||||
compare_gap, sizes);
|
compare_gap, sizes);
|
||||||
|
|
||||||
/* Distribute available space.
|
/* Distribute available space.
|
||||||
@@ -938,11 +925,11 @@ distribute_natural_allocation (float extra_space,
|
|||||||
* Sort order and reducing remaining space by assigned space
|
* Sort order and reducing remaining space by assigned space
|
||||||
* ensures that space is distributed equally.
|
* ensures that space is distributed equally.
|
||||||
*/
|
*/
|
||||||
int glue = (extra_space + i) / (i + 1);
|
gint glue = (extra_space + i) / (i + 1);
|
||||||
int gap = sizes[(spreading[i])].natural_size
|
gint gap = sizes[(spreading[i])].natural_size
|
||||||
- sizes[(spreading[i])].minimum_size;
|
- sizes[(spreading[i])].minimum_size;
|
||||||
|
|
||||||
int extra = MIN (glue, gap);
|
gint extra = MIN (glue, gap);
|
||||||
|
|
||||||
sizes[spreading[i]].minimum_size += extra;
|
sizes[spreading[i]].minimum_size += extra;
|
||||||
|
|
||||||
@@ -1069,9 +1056,7 @@ clutter_box_layout_allocate (ClutterLayoutManager *layout,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Bring children up to size first */
|
/* Bring children up to size first */
|
||||||
size = (gint) distribute_natural_allocation (MAX (0, (float) size),
|
size = distribute_natural_allocation (MAX (0, size), nvis_children, sizes);
|
||||||
nvis_children,
|
|
||||||
sizes);
|
|
||||||
|
|
||||||
/* Calculate space which hasn't distributed yet,
|
/* Calculate space which hasn't distributed yet,
|
||||||
* and is available for expanding children.
|
* and is available for expanding children.
|
||||||
|
@@ -130,8 +130,7 @@ will_have_no_effect (ClutterBrightnessContrastEffect *self)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
clutter_brightness_contrast_effect_pre_paint (ClutterEffect *effect,
|
clutter_brightness_contrast_effect_pre_paint (ClutterEffect *effect)
|
||||||
ClutterPaintContext *paint_context)
|
|
||||||
{
|
{
|
||||||
ClutterBrightnessContrastEffect *self = CLUTTER_BRIGHTNESS_CONTRAST_EFFECT (effect);
|
ClutterBrightnessContrastEffect *self = CLUTTER_BRIGHTNESS_CONTRAST_EFFECT (effect);
|
||||||
ClutterEffectClass *parent_class;
|
ClutterEffectClass *parent_class;
|
||||||
@@ -157,7 +156,7 @@ clutter_brightness_contrast_effect_pre_paint (ClutterEffect *effect,
|
|||||||
|
|
||||||
parent_class =
|
parent_class =
|
||||||
CLUTTER_EFFECT_CLASS (clutter_brightness_contrast_effect_parent_class);
|
CLUTTER_EFFECT_CLASS (clutter_brightness_contrast_effect_parent_class);
|
||||||
if (parent_class->pre_paint (effect, paint_context))
|
if (parent_class->pre_paint (effect))
|
||||||
{
|
{
|
||||||
ClutterOffscreenEffect *offscreen_effect =
|
ClutterOffscreenEffect *offscreen_effect =
|
||||||
CLUTTER_OFFSCREEN_EFFECT (effect);
|
CLUTTER_OFFSCREEN_EFFECT (effect);
|
||||||
@@ -176,12 +175,9 @@ clutter_brightness_contrast_effect_pre_paint (ClutterEffect *effect,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
clutter_brightness_contrast_effect_paint_target (ClutterOffscreenEffect *effect,
|
clutter_brightness_contrast_effect_paint_target (ClutterOffscreenEffect *effect)
|
||||||
ClutterPaintContext *paint_context)
|
|
||||||
{
|
{
|
||||||
ClutterBrightnessContrastEffect *self = CLUTTER_BRIGHTNESS_CONTRAST_EFFECT (effect);
|
ClutterBrightnessContrastEffect *self = CLUTTER_BRIGHTNESS_CONTRAST_EFFECT (effect);
|
||||||
CoglFramebuffer *framebuffer =
|
|
||||||
clutter_paint_context_get_framebuffer (paint_context);
|
|
||||||
ClutterActor *actor;
|
ClutterActor *actor;
|
||||||
guint8 paint_opacity;
|
guint8 paint_opacity;
|
||||||
|
|
||||||
@@ -193,11 +189,11 @@ clutter_brightness_contrast_effect_paint_target (ClutterOffscreenEffect *effect,
|
|||||||
paint_opacity,
|
paint_opacity,
|
||||||
paint_opacity,
|
paint_opacity,
|
||||||
paint_opacity);
|
paint_opacity);
|
||||||
|
cogl_push_source (self->pipeline);
|
||||||
|
|
||||||
cogl_framebuffer_draw_rectangle (framebuffer,
|
cogl_rectangle (0, 0, self->tex_width, self->tex_height);
|
||||||
self->pipeline,
|
|
||||||
0, 0,
|
cogl_pop_source ();
|
||||||
self->tex_width, self->tex_height);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -441,7 +437,9 @@ clutter_brightness_contrast_effect_init (ClutterBrightnessContrastEffect *self)
|
|||||||
cogl_pipeline_add_snippet (klass->base_pipeline, snippet);
|
cogl_pipeline_add_snippet (klass->base_pipeline, snippet);
|
||||||
cogl_object_unref (snippet);
|
cogl_object_unref (snippet);
|
||||||
|
|
||||||
cogl_pipeline_set_layer_null_texture (klass->base_pipeline, 0);
|
cogl_pipeline_set_layer_null_texture (klass->base_pipeline,
|
||||||
|
0, /* layer number */
|
||||||
|
COGL_TEXTURE_TYPE_2D);
|
||||||
}
|
}
|
||||||
|
|
||||||
self->pipeline = cogl_pipeline_copy (klass->base_pipeline);
|
self->pipeline = cogl_pipeline_copy (klass->base_pipeline);
|
||||||
|
@@ -44,7 +44,6 @@
|
|||||||
|
|
||||||
#include "clutter-build-config.h"
|
#include "clutter-build-config.h"
|
||||||
|
|
||||||
#include <math.h>
|
|
||||||
#include <cogl/cogl.h>
|
#include <cogl/cogl.h>
|
||||||
#include <cairo-gobject.h>
|
#include <cairo-gobject.h>
|
||||||
|
|
||||||
@@ -70,7 +69,6 @@ struct _ClutterCanvasPrivate
|
|||||||
|
|
||||||
int width;
|
int width;
|
||||||
int height;
|
int height;
|
||||||
float scale_factor;
|
|
||||||
|
|
||||||
CoglTexture *texture;
|
CoglTexture *texture;
|
||||||
gboolean dirty;
|
gboolean dirty;
|
||||||
@@ -84,7 +82,6 @@ enum
|
|||||||
|
|
||||||
PROP_WIDTH,
|
PROP_WIDTH,
|
||||||
PROP_HEIGHT,
|
PROP_HEIGHT,
|
||||||
PROP_SCALE_FACTOR,
|
|
||||||
|
|
||||||
LAST_PROP
|
LAST_PROP
|
||||||
};
|
};
|
||||||
@@ -100,7 +97,7 @@ enum
|
|||||||
|
|
||||||
static guint canvas_signals[LAST_SIGNAL] = { 0, };
|
static guint canvas_signals[LAST_SIGNAL] = { 0, };
|
||||||
|
|
||||||
static void clutter_content_iface_init (ClutterContentInterface *iface);
|
static void clutter_content_iface_init (ClutterContentIface *iface);
|
||||||
|
|
||||||
G_DEFINE_TYPE_WITH_CODE (ClutterCanvas, clutter_canvas, G_TYPE_OBJECT,
|
G_DEFINE_TYPE_WITH_CODE (ClutterCanvas, clutter_canvas, G_TYPE_OBJECT,
|
||||||
G_ADD_PRIVATE (ClutterCanvas)
|
G_ADD_PRIVATE (ClutterCanvas)
|
||||||
@@ -181,19 +178,6 @@ clutter_canvas_set_property (GObject *gobject,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_SCALE_FACTOR:
|
|
||||||
{
|
|
||||||
gfloat new_scale_factor = g_value_get_float (value);
|
|
||||||
|
|
||||||
if (priv->scale_factor != new_scale_factor)
|
|
||||||
{
|
|
||||||
priv->scale_factor = new_scale_factor;
|
|
||||||
|
|
||||||
clutter_content_invalidate (CLUTTER_CONTENT (gobject));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
|
||||||
break;
|
break;
|
||||||
@@ -218,10 +202,6 @@ clutter_canvas_get_property (GObject *gobject,
|
|||||||
g_value_set_int (value, priv->height);
|
g_value_set_int (value, priv->height);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_SCALE_FACTOR:
|
|
||||||
g_value_set_float (value, priv->scale_factor);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
|
||||||
break;
|
break;
|
||||||
@@ -265,19 +245,6 @@ clutter_canvas_class_init (ClutterCanvasClass *klass)
|
|||||||
G_PARAM_READWRITE |
|
G_PARAM_READWRITE |
|
||||||
G_PARAM_STATIC_STRINGS);
|
G_PARAM_STATIC_STRINGS);
|
||||||
|
|
||||||
/**
|
|
||||||
* ClutterCanvas:scale-factor:
|
|
||||||
*
|
|
||||||
* The height of the canvas.
|
|
||||||
*/
|
|
||||||
obj_props[PROP_SCALE_FACTOR] =
|
|
||||||
g_param_spec_float ("scale-factor",
|
|
||||||
P_("Scale Factor"),
|
|
||||||
P_("The Scale factor of the canvas"),
|
|
||||||
0.01f, G_MAXFLOAT,
|
|
||||||
1.0f,
|
|
||||||
G_PARAM_READWRITE |
|
|
||||||
G_PARAM_STATIC_STRINGS);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ClutterCanvas::draw:
|
* ClutterCanvas::draw:
|
||||||
@@ -324,14 +291,12 @@ clutter_canvas_init (ClutterCanvas *self)
|
|||||||
|
|
||||||
self->priv->width = -1;
|
self->priv->width = -1;
|
||||||
self->priv->height = -1;
|
self->priv->height = -1;
|
||||||
self->priv->scale_factor = 1.0f;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
clutter_canvas_paint_content (ClutterContent *content,
|
clutter_canvas_paint_content (ClutterContent *content,
|
||||||
ClutterActor *actor,
|
ClutterActor *actor,
|
||||||
ClutterPaintNode *root,
|
ClutterPaintNode *root)
|
||||||
ClutterPaintContext *paint_context)
|
|
||||||
{
|
{
|
||||||
ClutterCanvas *self = CLUTTER_CANVAS (content);
|
ClutterCanvas *self = CLUTTER_CANVAS (content);
|
||||||
ClutterCanvasPrivate *priv = self->priv;
|
ClutterCanvasPrivate *priv = self->priv;
|
||||||
@@ -375,8 +340,8 @@ clutter_canvas_emit_draw (ClutterCanvas *self)
|
|||||||
|
|
||||||
priv->dirty = TRUE;
|
priv->dirty = TRUE;
|
||||||
|
|
||||||
real_width = ceilf (priv->width * priv->scale_factor);
|
real_width = priv->width;
|
||||||
real_height = ceilf (priv->height * priv->scale_factor);
|
real_height = priv->height;
|
||||||
|
|
||||||
CLUTTER_NOTE (MISC, "Creating Cairo surface with size %d x %d",
|
CLUTTER_NOTE (MISC, "Creating Cairo surface with size %d x %d",
|
||||||
priv->width, priv->height);
|
priv->width, priv->height);
|
||||||
@@ -422,10 +387,6 @@ clutter_canvas_emit_draw (ClutterCanvas *self)
|
|||||||
mapped_buffer = FALSE;
|
mapped_buffer = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
cairo_surface_set_device_scale (surface,
|
|
||||||
priv->scale_factor,
|
|
||||||
priv->scale_factor);
|
|
||||||
|
|
||||||
self->priv->cr = cr = cairo_create (surface);
|
self->priv->cr = cr = cairo_create (surface);
|
||||||
|
|
||||||
g_signal_emit (self, canvas_signals[DRAW], 0,
|
g_signal_emit (self, canvas_signals[DRAW], 0,
|
||||||
@@ -487,16 +448,16 @@ clutter_canvas_get_preferred_size (ClutterContent *content,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (width != NULL)
|
if (width != NULL)
|
||||||
*width = ceilf (priv->width * priv->scale_factor);
|
*width = priv->width;
|
||||||
|
|
||||||
if (height != NULL)
|
if (height != NULL)
|
||||||
*height = ceilf (priv->height * priv->scale_factor);
|
*height = priv->height;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
clutter_content_iface_init (ClutterContentInterface *iface)
|
clutter_content_iface_init (ClutterContentIface *iface)
|
||||||
{
|
{
|
||||||
iface->invalidate = clutter_canvas_invalidate;
|
iface->invalidate = clutter_canvas_invalidate;
|
||||||
iface->paint_content = clutter_canvas_paint_content;
|
iface->paint_content = clutter_canvas_paint_content;
|
||||||
@@ -599,48 +560,3 @@ clutter_canvas_set_size (ClutterCanvas *canvas,
|
|||||||
|
|
||||||
return clutter_canvas_invalidate_internal (canvas, width, height);
|
return clutter_canvas_invalidate_internal (canvas, width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* clutter_canvas_set_scale_factor:
|
|
||||||
* @canvas: a #ClutterCanvas
|
|
||||||
* @scale: the integer scaling factor of the canvas
|
|
||||||
*
|
|
||||||
* Sets the scaling factor of the @canvas, and invalidates the content.
|
|
||||||
*
|
|
||||||
* This function will cause the @canvas to be invalidated only
|
|
||||||
* if the scale factor of the canvas surface has changed.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
clutter_canvas_set_scale_factor (ClutterCanvas *canvas,
|
|
||||||
float scale)
|
|
||||||
{
|
|
||||||
g_return_if_fail (CLUTTER_IS_CANVAS (canvas));
|
|
||||||
g_return_if_fail (scale > 0.0f);
|
|
||||||
|
|
||||||
if (canvas->priv->scale_factor != scale)
|
|
||||||
{
|
|
||||||
canvas->priv->scale_factor = scale;
|
|
||||||
|
|
||||||
g_object_freeze_notify (G_OBJECT (canvas));
|
|
||||||
clutter_content_invalidate (CLUTTER_CONTENT (canvas));
|
|
||||||
g_object_thaw_notify (G_OBJECT (canvas));
|
|
||||||
|
|
||||||
g_object_notify_by_pspec (G_OBJECT (canvas), obj_props[PROP_SCALE_FACTOR]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* clutter_canvas_get_scale_factor:
|
|
||||||
* @canvas: a #ClutterCanvas
|
|
||||||
*
|
|
||||||
* Gets the scale factor of the @canvas.
|
|
||||||
*
|
|
||||||
* Return value: the current @canvas scale factor or -1 if invalid
|
|
||||||
*/
|
|
||||||
float
|
|
||||||
clutter_canvas_get_scale_factor (ClutterCanvas *canvas)
|
|
||||||
{
|
|
||||||
g_return_val_if_fail (CLUTTER_IS_CANVAS (canvas), -1.0f);
|
|
||||||
|
|
||||||
return canvas->priv->scale_factor;
|
|
||||||
}
|
|
||||||
|
@@ -97,9 +97,9 @@ gboolean clutter_canvas_set_size (ClutterCanvas *
|
|||||||
|
|
||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
void clutter_canvas_set_scale_factor (ClutterCanvas *canvas,
|
void clutter_canvas_set_scale_factor (ClutterCanvas *canvas,
|
||||||
float scale);
|
int scale);
|
||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
float clutter_canvas_get_scale_factor (ClutterCanvas *canvas);
|
int clutter_canvas_get_scale_factor (ClutterCanvas *canvas);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
@@ -105,8 +105,8 @@ struct _ClutterClickActionPrivate
|
|||||||
{
|
{
|
||||||
ClutterActor *stage;
|
ClutterActor *stage;
|
||||||
|
|
||||||
gulong event_id;
|
guint event_id;
|
||||||
gulong capture_id;
|
guint capture_id;
|
||||||
guint long_press_id;
|
guint long_press_id;
|
||||||
|
|
||||||
gint long_press_threshold;
|
gint long_press_threshold;
|
||||||
@@ -202,7 +202,11 @@ click_action_emit_long_press (gpointer data)
|
|||||||
CLUTTER_LONG_PRESS_ACTIVATE,
|
CLUTTER_LONG_PRESS_ACTIVATE,
|
||||||
&result);
|
&result);
|
||||||
|
|
||||||
g_clear_signal_handler (&priv->capture_id, priv->stage);
|
if (priv->capture_id != 0)
|
||||||
|
{
|
||||||
|
g_signal_handler_disconnect (priv->stage, priv->capture_id);
|
||||||
|
priv->capture_id = 0;
|
||||||
|
}
|
||||||
|
|
||||||
click_action_set_pressed (action, FALSE);
|
click_action_set_pressed (action, FALSE);
|
||||||
click_action_set_held (action, FALSE);
|
click_action_set_held (action, FALSE);
|
||||||
@@ -257,7 +261,8 @@ click_action_cancel_long_press (ClutterClickAction *action)
|
|||||||
|
|
||||||
actor = clutter_actor_meta_get_actor (CLUTTER_ACTOR_META (action));
|
actor = clutter_actor_meta_get_actor (CLUTTER_ACTOR_META (action));
|
||||||
|
|
||||||
g_clear_handle_id (&priv->long_press_id, g_source_remove);
|
g_source_remove (priv->long_press_id);
|
||||||
|
priv->long_press_id = 0;
|
||||||
|
|
||||||
g_signal_emit (action, click_signals[LONG_PRESS], 0,
|
g_signal_emit (action, click_signals[LONG_PRESS], 0,
|
||||||
actor,
|
actor,
|
||||||
@@ -350,10 +355,6 @@ on_captured_event (ClutterActor *stage,
|
|||||||
|
|
||||||
switch (clutter_event_type (event))
|
switch (clutter_event_type (event))
|
||||||
{
|
{
|
||||||
case CLUTTER_TOUCH_CANCEL:
|
|
||||||
clutter_click_action_release (action);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case CLUTTER_TOUCH_END:
|
case CLUTTER_TOUCH_END:
|
||||||
has_button = FALSE;
|
has_button = FALSE;
|
||||||
case CLUTTER_BUTTON_RELEASE:
|
case CLUTTER_BUTTON_RELEASE:
|
||||||
@@ -370,9 +371,17 @@ on_captured_event (ClutterActor *stage,
|
|||||||
click_action_cancel_long_press (action);
|
click_action_cancel_long_press (action);
|
||||||
|
|
||||||
/* disconnect the capture */
|
/* disconnect the capture */
|
||||||
g_clear_signal_handler (&priv->capture_id, priv->stage);
|
if (priv->capture_id != 0)
|
||||||
|
{
|
||||||
|
g_signal_handler_disconnect (priv->stage, priv->capture_id);
|
||||||
|
priv->capture_id = 0;
|
||||||
|
}
|
||||||
|
|
||||||
g_clear_handle_id (&priv->long_press_id, g_source_remove);
|
if (priv->long_press_id != 0)
|
||||||
|
{
|
||||||
|
g_source_remove (priv->long_press_id);
|
||||||
|
priv->long_press_id = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (!clutter_actor_contains (actor, clutter_event_get_source (event)))
|
if (!clutter_actor_contains (actor, clutter_event_get_source (event)))
|
||||||
return CLUTTER_EVENT_PROPAGATE;
|
return CLUTTER_EVENT_PROPAGATE;
|
||||||
@@ -440,7 +449,7 @@ clutter_click_action_set_actor (ClutterActorMeta *meta,
|
|||||||
ClutterActor *old_actor = clutter_actor_meta_get_actor (meta);
|
ClutterActor *old_actor = clutter_actor_meta_get_actor (meta);
|
||||||
|
|
||||||
if (old_actor != NULL)
|
if (old_actor != NULL)
|
||||||
g_clear_signal_handler (&priv->event_id, old_actor);
|
g_signal_handler_disconnect (old_actor, priv->event_id);
|
||||||
|
|
||||||
priv->event_id = 0;
|
priv->event_id = 0;
|
||||||
}
|
}
|
||||||
@@ -448,13 +457,17 @@ clutter_click_action_set_actor (ClutterActorMeta *meta,
|
|||||||
if (priv->capture_id != 0)
|
if (priv->capture_id != 0)
|
||||||
{
|
{
|
||||||
if (priv->stage != NULL)
|
if (priv->stage != NULL)
|
||||||
g_clear_signal_handler (&priv->capture_id, priv->stage);
|
g_signal_handler_disconnect (priv->stage, priv->capture_id);
|
||||||
|
|
||||||
priv->capture_id = 0;
|
priv->capture_id = 0;
|
||||||
priv->stage = NULL;
|
priv->stage = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_clear_handle_id (&priv->long_press_id, g_source_remove);
|
if (priv->long_press_id != 0)
|
||||||
|
{
|
||||||
|
g_source_remove (priv->long_press_id);
|
||||||
|
priv->long_press_id = 0;
|
||||||
|
}
|
||||||
|
|
||||||
click_action_set_pressed (action, FALSE);
|
click_action_set_pressed (action, FALSE);
|
||||||
click_action_set_held (action, FALSE);
|
click_action_set_held (action, FALSE);
|
||||||
@@ -528,12 +541,24 @@ clutter_click_action_dispose (GObject *gobject)
|
|||||||
{
|
{
|
||||||
ClutterClickActionPrivate *priv = CLUTTER_CLICK_ACTION (gobject)->priv;
|
ClutterClickActionPrivate *priv = CLUTTER_CLICK_ACTION (gobject)->priv;
|
||||||
|
|
||||||
g_clear_signal_handler (&priv->event_id,
|
if (priv->event_id)
|
||||||
clutter_actor_meta_get_actor (CLUTTER_ACTOR_META (gobject)));
|
{
|
||||||
|
g_signal_handler_disconnect (clutter_actor_meta_get_actor (CLUTTER_ACTOR_META (gobject)),
|
||||||
|
priv->event_id);
|
||||||
|
priv->event_id = 0;
|
||||||
|
}
|
||||||
|
|
||||||
g_clear_signal_handler (&priv->capture_id, priv->stage);
|
if (priv->capture_id)
|
||||||
|
{
|
||||||
|
g_signal_handler_disconnect (priv->stage, priv->capture_id);
|
||||||
|
priv->capture_id = 0;
|
||||||
|
}
|
||||||
|
|
||||||
g_clear_handle_id (&priv->long_press_id, g_source_remove);
|
if (priv->long_press_id)
|
||||||
|
{
|
||||||
|
g_source_remove (priv->long_press_id);
|
||||||
|
priv->long_press_id = 0;
|
||||||
|
}
|
||||||
|
|
||||||
G_OBJECT_CLASS (clutter_click_action_parent_class)->dispose (gobject);
|
G_OBJECT_CLASS (clutter_click_action_parent_class)->dispose (gobject);
|
||||||
}
|
}
|
||||||
@@ -637,7 +662,8 @@ clutter_click_action_class_init (ClutterClickActionClass *klass)
|
|||||||
G_TYPE_FROM_CLASS (klass),
|
G_TYPE_FROM_CLASS (klass),
|
||||||
G_SIGNAL_RUN_LAST,
|
G_SIGNAL_RUN_LAST,
|
||||||
G_STRUCT_OFFSET (ClutterClickActionClass, clicked),
|
G_STRUCT_OFFSET (ClutterClickActionClass, clicked),
|
||||||
NULL, NULL, NULL,
|
NULL, NULL,
|
||||||
|
_clutter_marshal_VOID__OBJECT,
|
||||||
G_TYPE_NONE, 1,
|
G_TYPE_NONE, 1,
|
||||||
CLUTTER_TYPE_ACTOR);
|
CLUTTER_TYPE_ACTOR);
|
||||||
|
|
||||||
@@ -731,7 +757,11 @@ clutter_click_action_release (ClutterClickAction *action)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
/* disconnect the capture */
|
/* disconnect the capture */
|
||||||
g_clear_signal_handler (&priv->capture_id, priv->stage);
|
if (priv->capture_id != 0)
|
||||||
|
{
|
||||||
|
g_signal_handler_disconnect (priv->stage, priv->capture_id);
|
||||||
|
priv->capture_id = 0;
|
||||||
|
}
|
||||||
|
|
||||||
click_action_cancel_long_press (action);
|
click_action_cancel_long_press (action);
|
||||||
click_action_set_held (action, FALSE);
|
click_action_set_held (action, FALSE);
|
||||||
|
@@ -152,8 +152,7 @@ clutter_clone_apply_transform (ClutterActor *self, CoglMatrix *matrix)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
clutter_clone_paint (ClutterActor *actor,
|
clutter_clone_paint (ClutterActor *actor)
|
||||||
ClutterPaintContext *paint_context)
|
|
||||||
{
|
{
|
||||||
ClutterClone *self = CLUTTER_CLONE (actor);
|
ClutterClone *self = CLUTTER_CLONE (actor);
|
||||||
ClutterClonePrivate *priv = self->priv;
|
ClutterClonePrivate *priv = self->priv;
|
||||||
@@ -190,7 +189,7 @@ clutter_clone_paint (ClutterActor *actor,
|
|||||||
if (clutter_actor_is_realized (priv->clone_source))
|
if (clutter_actor_is_realized (priv->clone_source))
|
||||||
{
|
{
|
||||||
_clutter_actor_push_clone_paint ();
|
_clutter_actor_push_clone_paint ();
|
||||||
clutter_actor_paint (priv->clone_source, paint_context);
|
clutter_actor_paint (priv->clone_source);
|
||||||
_clutter_actor_pop_clone_paint ();
|
_clutter_actor_pop_clone_paint ();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -253,13 +252,6 @@ clutter_clone_allocate (ClutterActor *self,
|
|||||||
if (priv->clone_source == NULL)
|
if (priv->clone_source == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* ClutterActor delays allocating until the actor is shown; however
|
|
||||||
* we cannot paint it correctly in that case, so force an allocation.
|
|
||||||
*/
|
|
||||||
if (clutter_actor_get_parent (priv->clone_source) != NULL &&
|
|
||||||
!clutter_actor_has_allocation (priv->clone_source))
|
|
||||||
clutter_actor_allocate_preferred_size (priv->clone_source, flags);
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
/* XXX - this is wrong: ClutterClone cannot clone unparented
|
/* XXX - this is wrong: ClutterClone cannot clone unparented
|
||||||
* actors, as it will break all invariants
|
* actors, as it will break all invariants
|
||||||
@@ -401,7 +393,8 @@ clutter_clone_set_source_internal (ClutterClone *self,
|
|||||||
|
|
||||||
if (priv->clone_source != NULL)
|
if (priv->clone_source != NULL)
|
||||||
{
|
{
|
||||||
g_clear_signal_handler (&priv->source_destroy_id, priv->clone_source);
|
g_signal_handler_disconnect (priv->clone_source, priv->source_destroy_id);
|
||||||
|
priv->source_destroy_id = 0;
|
||||||
_clutter_actor_detach_clone (priv->clone_source, CLUTTER_ACTOR (self));
|
_clutter_actor_detach_clone (priv->clone_source, CLUTTER_ACTOR (self));
|
||||||
g_object_unref (priv->clone_source);
|
g_object_unref (priv->clone_source);
|
||||||
priv->clone_source = NULL;
|
priv->clone_source = NULL;
|
||||||
|
@@ -105,8 +105,7 @@ G_DEFINE_TYPE (ClutterColorizeEffect,
|
|||||||
CLUTTER_TYPE_OFFSCREEN_EFFECT);
|
CLUTTER_TYPE_OFFSCREEN_EFFECT);
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
clutter_colorize_effect_pre_paint (ClutterEffect *effect,
|
clutter_colorize_effect_pre_paint (ClutterEffect *effect)
|
||||||
ClutterPaintContext *paint_context)
|
|
||||||
{
|
{
|
||||||
ClutterColorizeEffect *self = CLUTTER_COLORIZE_EFFECT (effect);
|
ClutterColorizeEffect *self = CLUTTER_COLORIZE_EFFECT (effect);
|
||||||
ClutterEffectClass *parent_class;
|
ClutterEffectClass *parent_class;
|
||||||
@@ -127,7 +126,7 @@ clutter_colorize_effect_pre_paint (ClutterEffect *effect,
|
|||||||
}
|
}
|
||||||
|
|
||||||
parent_class = CLUTTER_EFFECT_CLASS (clutter_colorize_effect_parent_class);
|
parent_class = CLUTTER_EFFECT_CLASS (clutter_colorize_effect_parent_class);
|
||||||
if (parent_class->pre_paint (effect, paint_context))
|
if (parent_class->pre_paint (effect))
|
||||||
{
|
{
|
||||||
ClutterOffscreenEffect *offscreen_effect =
|
ClutterOffscreenEffect *offscreen_effect =
|
||||||
CLUTTER_OFFSCREEN_EFFECT (effect);
|
CLUTTER_OFFSCREEN_EFFECT (effect);
|
||||||
@@ -146,12 +145,9 @@ clutter_colorize_effect_pre_paint (ClutterEffect *effect,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
clutter_colorize_effect_paint_target (ClutterOffscreenEffect *effect,
|
clutter_colorize_effect_paint_target (ClutterOffscreenEffect *effect)
|
||||||
ClutterPaintContext *paint_context)
|
|
||||||
{
|
{
|
||||||
ClutterColorizeEffect *self = CLUTTER_COLORIZE_EFFECT (effect);
|
ClutterColorizeEffect *self = CLUTTER_COLORIZE_EFFECT (effect);
|
||||||
CoglFramebuffer *framebuffer =
|
|
||||||
clutter_paint_context_get_framebuffer (paint_context);
|
|
||||||
ClutterActor *actor;
|
ClutterActor *actor;
|
||||||
guint8 paint_opacity;
|
guint8 paint_opacity;
|
||||||
|
|
||||||
@@ -163,11 +159,11 @@ clutter_colorize_effect_paint_target (ClutterOffscreenEffect *effect,
|
|||||||
paint_opacity,
|
paint_opacity,
|
||||||
paint_opacity,
|
paint_opacity,
|
||||||
paint_opacity);
|
paint_opacity);
|
||||||
|
cogl_push_source (self->pipeline);
|
||||||
|
|
||||||
cogl_framebuffer_draw_rectangle (framebuffer,
|
cogl_rectangle (0, 0, self->tex_width, self->tex_height);
|
||||||
self->pipeline,
|
|
||||||
0, 0,
|
cogl_pop_source ();
|
||||||
self->tex_width, self->tex_height);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -296,7 +292,9 @@ clutter_colorize_effect_init (ClutterColorizeEffect *self)
|
|||||||
cogl_pipeline_add_snippet (klass->base_pipeline, snippet);
|
cogl_pipeline_add_snippet (klass->base_pipeline, snippet);
|
||||||
cogl_object_unref (snippet);
|
cogl_object_unref (snippet);
|
||||||
|
|
||||||
cogl_pipeline_set_layer_null_texture (klass->base_pipeline, 0);
|
cogl_pipeline_set_layer_null_texture (klass->base_pipeline,
|
||||||
|
0, /* layer number */
|
||||||
|
COGL_TEXTURE_TYPE_2D);
|
||||||
}
|
}
|
||||||
|
|
||||||
self->pipeline = cogl_pipeline_copy (klass->base_pipeline);
|
self->pipeline = cogl_pipeline_copy (klass->base_pipeline);
|
||||||
|
@@ -43,12 +43,12 @@
|
|||||||
*
|
*
|
||||||
* Constraints can be used with fixed layout managers, like
|
* Constraints can be used with fixed layout managers, like
|
||||||
* #ClutterFixedLayout, or with actors implicitly using a fixed layout
|
* #ClutterFixedLayout, or with actors implicitly using a fixed layout
|
||||||
* manager, like #ClutterGroup and #ClutterStage.
|
* manager, like #ClutterStage.
|
||||||
*
|
*
|
||||||
* Constraints provide a way to build user interfaces by using
|
* Constraints provide a way to build user interfaces by using
|
||||||
* relations between #ClutterActors, without explicit fixed
|
* relations between #ClutterActors, without explicit fixed
|
||||||
* positioning and sizing, similarly to how fluid layout managers like
|
* positioning and sizing, similarly to how fluid layout managers like
|
||||||
* #ClutterBoxLayout lay out their children.
|
* #ClutterBoxLayout and #ClutterTableLayout lay out their children.
|
||||||
*
|
*
|
||||||
* Constraints are attached to a #ClutterActor, and are available
|
* Constraints are attached to a #ClutterActor, and are available
|
||||||
* for inspection using clutter_actor_get_constraints().
|
* for inspection using clutter_actor_get_constraints().
|
||||||
|
@@ -118,6 +118,37 @@ container_real_remove (ClutterContainer *container,
|
|||||||
clutter_actor_remove_child (CLUTTER_ACTOR (container), actor);
|
clutter_actor_remove_child (CLUTTER_ACTOR (container), actor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
ClutterCallback callback;
|
||||||
|
gpointer data;
|
||||||
|
} ForeachClosure;
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
foreach_cb (ClutterActor *actor,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
ForeachClosure *clos = data;
|
||||||
|
|
||||||
|
clos->callback (actor, clos->data);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
container_real_foreach (ClutterContainer *container,
|
||||||
|
ClutterCallback callback,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
ForeachClosure clos;
|
||||||
|
|
||||||
|
clos.callback = callback;
|
||||||
|
clos.data = user_data;
|
||||||
|
|
||||||
|
_clutter_actor_foreach_child (CLUTTER_ACTOR (container),
|
||||||
|
foreach_cb,
|
||||||
|
&clos);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
container_real_raise (ClutterContainer *container,
|
container_real_raise (ClutterContainer *container,
|
||||||
ClutterActor *child,
|
ClutterActor *child,
|
||||||
@@ -166,7 +197,8 @@ clutter_container_default_init (ClutterContainerInterface *iface)
|
|||||||
iface_type,
|
iface_type,
|
||||||
G_SIGNAL_RUN_FIRST,
|
G_SIGNAL_RUN_FIRST,
|
||||||
G_STRUCT_OFFSET (ClutterContainerIface, actor_added),
|
G_STRUCT_OFFSET (ClutterContainerIface, actor_added),
|
||||||
NULL, NULL, NULL,
|
NULL, NULL,
|
||||||
|
_clutter_marshal_VOID__OBJECT,
|
||||||
G_TYPE_NONE, 1,
|
G_TYPE_NONE, 1,
|
||||||
CLUTTER_TYPE_ACTOR);
|
CLUTTER_TYPE_ACTOR);
|
||||||
/**
|
/**
|
||||||
@@ -184,7 +216,8 @@ clutter_container_default_init (ClutterContainerInterface *iface)
|
|||||||
iface_type,
|
iface_type,
|
||||||
G_SIGNAL_RUN_FIRST,
|
G_SIGNAL_RUN_FIRST,
|
||||||
G_STRUCT_OFFSET (ClutterContainerIface, actor_removed),
|
G_STRUCT_OFFSET (ClutterContainerIface, actor_removed),
|
||||||
NULL, NULL, NULL,
|
NULL, NULL,
|
||||||
|
_clutter_marshal_VOID__OBJECT,
|
||||||
G_TYPE_NONE, 1,
|
G_TYPE_NONE, 1,
|
||||||
CLUTTER_TYPE_ACTOR);
|
CLUTTER_TYPE_ACTOR);
|
||||||
|
|
||||||
@@ -212,6 +245,7 @@ clutter_container_default_init (ClutterContainerInterface *iface)
|
|||||||
|
|
||||||
iface->add = container_real_add;
|
iface->add = container_real_add;
|
||||||
iface->remove = container_real_remove;
|
iface->remove = container_real_remove;
|
||||||
|
iface->foreach = container_real_foreach;
|
||||||
iface->raise = container_real_raise;
|
iface->raise = container_real_raise;
|
||||||
iface->lower = container_real_lower;
|
iface->lower = container_real_lower;
|
||||||
iface->sort_depth_order = container_real_sort_depth_order;
|
iface->sort_depth_order = container_real_sort_depth_order;
|
||||||
@@ -384,6 +418,33 @@ clutter_container_add_actor (ClutterContainer *container,
|
|||||||
container_add_actor (container, actor);
|
container_add_actor (container, actor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* clutter_container_add_valist: (skip)
|
||||||
|
* @container: a #ClutterContainer
|
||||||
|
* @first_actor: the first #ClutterActor to add
|
||||||
|
* @var_args: list of actors to add, followed by %NULL
|
||||||
|
*
|
||||||
|
* Alternative va_list version of clutter_container_add().
|
||||||
|
*
|
||||||
|
* This function will call #ClutterContainerIface.add(), which is a
|
||||||
|
* deprecated virtual function. The default implementation will
|
||||||
|
* call clutter_actor_add_child().
|
||||||
|
*
|
||||||
|
* Since: 0.4
|
||||||
|
*
|
||||||
|
* Deprecated: 1.10: Use clutter_actor_add_child() instead.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
clutter_container_add_valist (ClutterContainer *container,
|
||||||
|
ClutterActor *first_actor,
|
||||||
|
va_list var_args)
|
||||||
|
{
|
||||||
|
g_return_if_fail (CLUTTER_IS_CONTAINER (container));
|
||||||
|
g_return_if_fail (CLUTTER_IS_ACTOR (first_actor));
|
||||||
|
|
||||||
|
container_add_valist (container, first_actor, var_args);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* clutter_container_remove: (skip)
|
* clutter_container_remove: (skip)
|
||||||
* @container: a #ClutterContainer
|
* @container: a #ClutterContainer
|
||||||
@@ -447,6 +508,42 @@ clutter_container_remove_actor (ClutterContainer *container,
|
|||||||
container_remove_actor (container, actor);
|
container_remove_actor (container, actor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* clutter_container_remove_valist: (skip)
|
||||||
|
* @container: a #ClutterContainer
|
||||||
|
* @first_actor: the first #ClutterActor to add
|
||||||
|
* @var_args: list of actors to remove, followed by %NULL
|
||||||
|
*
|
||||||
|
* Alternative va_list version of clutter_container_remove().
|
||||||
|
*
|
||||||
|
* This function will call #ClutterContainerIface.remove(), which is a
|
||||||
|
* deprecated virtual function. The default implementation will call
|
||||||
|
* clutter_actor_remove_child().
|
||||||
|
*
|
||||||
|
* Since: 0.4
|
||||||
|
*
|
||||||
|
* Deprecated: 1.10: Use clutter_actor_remove_child() instead.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
clutter_container_remove_valist (ClutterContainer *container,
|
||||||
|
ClutterActor *first_actor,
|
||||||
|
va_list var_args)
|
||||||
|
{
|
||||||
|
g_return_if_fail (CLUTTER_IS_CONTAINER (container));
|
||||||
|
g_return_if_fail (CLUTTER_IS_ACTOR (first_actor));
|
||||||
|
|
||||||
|
container_remove_valist (container, first_actor, var_args);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
get_children_cb (ClutterActor *child,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
GList **children = data;
|
||||||
|
|
||||||
|
*children = g_list_prepend (*children, child);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* clutter_container_get_children:
|
* clutter_container_get_children:
|
||||||
* @container: a #ClutterContainer
|
* @container: a #ClutterContainer
|
||||||
@@ -464,9 +561,108 @@ clutter_container_remove_actor (ClutterContainer *container,
|
|||||||
GList *
|
GList *
|
||||||
clutter_container_get_children (ClutterContainer *container)
|
clutter_container_get_children (ClutterContainer *container)
|
||||||
{
|
{
|
||||||
|
GList *retval;
|
||||||
|
|
||||||
g_return_val_if_fail (CLUTTER_IS_CONTAINER (container), NULL);
|
g_return_val_if_fail (CLUTTER_IS_CONTAINER (container), NULL);
|
||||||
|
|
||||||
return clutter_actor_get_children (CLUTTER_ACTOR (container));
|
retval = NULL;
|
||||||
|
clutter_container_foreach (container, get_children_cb, &retval);
|
||||||
|
|
||||||
|
return g_list_reverse (retval);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* clutter_container_foreach:
|
||||||
|
* @container: a #ClutterContainer
|
||||||
|
* @callback: (scope call): a function to be called for each child
|
||||||
|
* @user_data: data to be passed to the function, or %NULL
|
||||||
|
*
|
||||||
|
* Calls @callback for each child of @container that was added
|
||||||
|
* by the application (with clutter_container_add_actor()). Does
|
||||||
|
* not iterate over "internal" children that are part of the
|
||||||
|
* container's own implementation, if any.
|
||||||
|
*
|
||||||
|
* This function calls the #ClutterContainerIface.foreach()
|
||||||
|
* virtual function, which has been deprecated.
|
||||||
|
*
|
||||||
|
* Since: 0.4
|
||||||
|
*
|
||||||
|
* Deprecated: 1.10: Use clutter_actor_get_first_child() or
|
||||||
|
* clutter_actor_get_last_child() to retrieve the beginning of
|
||||||
|
* the list of children, and clutter_actor_get_next_sibling()
|
||||||
|
* and clutter_actor_get_previous_sibling() to iterate over it;
|
||||||
|
* alternatively, use the #ClutterActorIter API.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
clutter_container_foreach (ClutterContainer *container,
|
||||||
|
ClutterCallback callback,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
g_return_if_fail (CLUTTER_IS_CONTAINER (container));
|
||||||
|
g_return_if_fail (callback != NULL);
|
||||||
|
|
||||||
|
#ifdef CLUTTER_ENABLE_DEBUG
|
||||||
|
if (G_UNLIKELY (_clutter_diagnostic_enabled ()))
|
||||||
|
{
|
||||||
|
ClutterContainerIface *iface = CLUTTER_CONTAINER_GET_IFACE (container);
|
||||||
|
|
||||||
|
if (iface->foreach != container_real_foreach)
|
||||||
|
_clutter_diagnostic_message ("The ClutterContainer::foreach() "
|
||||||
|
"virtual function has been deprecated "
|
||||||
|
"and it should not be overridden by "
|
||||||
|
"newly written code");
|
||||||
|
}
|
||||||
|
#endif /* CLUTTER_ENABLE_DEBUG */
|
||||||
|
|
||||||
|
CLUTTER_CONTAINER_GET_IFACE (container)->foreach (container,
|
||||||
|
callback,
|
||||||
|
user_data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* clutter_container_foreach_with_internals:
|
||||||
|
* @container: a #ClutterContainer
|
||||||
|
* @callback: (scope call): a function to be called for each child
|
||||||
|
* @user_data: data to be passed to the function, or %NULL
|
||||||
|
*
|
||||||
|
* Calls @callback for each child of @container, including "internal"
|
||||||
|
* children built in to the container itself that were never added
|
||||||
|
* by the application.
|
||||||
|
*
|
||||||
|
* This function calls the #ClutterContainerIface.foreach_with_internals()
|
||||||
|
* virtual function, which has been deprecated.
|
||||||
|
*
|
||||||
|
* Since: 1.0
|
||||||
|
*
|
||||||
|
* Deprecated: 1.10: See clutter_container_foreach().
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
clutter_container_foreach_with_internals (ClutterContainer *container,
|
||||||
|
ClutterCallback callback,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
ClutterContainerIface *iface;
|
||||||
|
|
||||||
|
g_return_if_fail (CLUTTER_IS_CONTAINER (container));
|
||||||
|
g_return_if_fail (callback != NULL);
|
||||||
|
|
||||||
|
iface = CLUTTER_CONTAINER_GET_IFACE (container);
|
||||||
|
|
||||||
|
#ifdef CLUTTER_ENABLE_DEBUG
|
||||||
|
if (G_UNLIKELY (_clutter_diagnostic_enabled ()))
|
||||||
|
{
|
||||||
|
if (iface->foreach_with_internals != NULL)
|
||||||
|
_clutter_diagnostic_message ("The ClutterContainer::foreach_with_internals() "
|
||||||
|
"virtual function has been deprecated "
|
||||||
|
"and it should not be overridden by "
|
||||||
|
"newly written code");
|
||||||
|
}
|
||||||
|
#endif /* CLUTTER_ENABLE_DEBUG */
|
||||||
|
|
||||||
|
if (iface->foreach_with_internals != NULL)
|
||||||
|
iface->foreach_with_internals (container, callback, user_data);
|
||||||
|
else
|
||||||
|
iface->foreach (container, callback, user_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -59,6 +59,14 @@ typedef struct _ClutterContainerIface ClutterContainerIface;
|
|||||||
* function is deprecated, and it should not be overridden.
|
* function is deprecated, and it should not be overridden.
|
||||||
* @remove: virtual function for removing an actor from the container. This
|
* @remove: virtual function for removing an actor from the container. This
|
||||||
* virtual function is deprecated, and it should not be overridden.
|
* virtual function is deprecated, and it should not be overridden.
|
||||||
|
* @foreach: virtual function for iterating over the container's children.
|
||||||
|
* This virtual function is deprecated, and it should not be overridden.
|
||||||
|
* @foreach_with_internals: virtual functions for iterating over the
|
||||||
|
* container's children, both added using the #ClutterContainer API
|
||||||
|
* and internal children. The implementation of this virtual function
|
||||||
|
* is required only if the #ClutterContainer implementation has
|
||||||
|
* internal children. This virtual function is deprecated, and it should
|
||||||
|
* not be overridden.
|
||||||
* @raise: virtual function for raising a child. This virtual function is
|
* @raise: virtual function for raising a child. This virtual function is
|
||||||
* deprecated and it should not be overridden.
|
* deprecated and it should not be overridden.
|
||||||
* @lower: virtual function for lowering a child. This virtual function is
|
* @lower: virtual function for lowering a child. This virtual function is
|
||||||
@@ -80,7 +88,7 @@ typedef struct _ClutterContainerIface ClutterContainerIface;
|
|||||||
* @actor_removed: class handler for #ClutterContainer::actor-removed
|
* @actor_removed: class handler for #ClutterContainer::actor-removed
|
||||||
* @child_notify: class handler for #ClutterContainer::child-notify
|
* @child_notify: class handler for #ClutterContainer::child-notify
|
||||||
*
|
*
|
||||||
* Base interface for container actors. The @add and @remove
|
* Base interface for container actors. The @add, @remove and @foreach
|
||||||
* virtual functions must be provided by any implementation; the other
|
* virtual functions must be provided by any implementation; the other
|
||||||
* virtual functions are optional.
|
* virtual functions are optional.
|
||||||
*
|
*
|
||||||
@@ -96,6 +104,13 @@ struct _ClutterContainerIface
|
|||||||
ClutterActor *actor);
|
ClutterActor *actor);
|
||||||
void (* remove) (ClutterContainer *container,
|
void (* remove) (ClutterContainer *container,
|
||||||
ClutterActor *actor);
|
ClutterActor *actor);
|
||||||
|
void (* foreach) (ClutterContainer *container,
|
||||||
|
ClutterCallback callback,
|
||||||
|
gpointer user_data);
|
||||||
|
|
||||||
|
void (* foreach_with_internals) (ClutterContainer *container,
|
||||||
|
ClutterCallback callback,
|
||||||
|
gpointer user_data);
|
||||||
|
|
||||||
/* child stacking */
|
/* child stacking */
|
||||||
void (* raise) (ClutterContainer *container,
|
void (* raise) (ClutterContainer *container,
|
||||||
|
@@ -34,10 +34,9 @@ void _clutter_content_attached (ClutterContent *conte
|
|||||||
void _clutter_content_detached (ClutterContent *content,
|
void _clutter_content_detached (ClutterContent *content,
|
||||||
ClutterActor *actor);
|
ClutterActor *actor);
|
||||||
|
|
||||||
void _clutter_content_paint_content (ClutterContent *content,
|
void _clutter_content_paint_content (ClutterContent *content,
|
||||||
ClutterActor *actor,
|
ClutterActor *actor,
|
||||||
ClutterPaintNode *node,
|
ClutterPaintNode *node);
|
||||||
ClutterPaintContext *paint_context);
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
@@ -38,13 +38,14 @@
|
|||||||
|
|
||||||
#include "clutter-build-config.h"
|
#include "clutter-build-config.h"
|
||||||
|
|
||||||
#include "clutter-actor-private.h"
|
|
||||||
#include "clutter-content-private.h"
|
#include "clutter-content-private.h"
|
||||||
|
|
||||||
#include "clutter-debug.h"
|
#include "clutter-debug.h"
|
||||||
#include "clutter-marshal.h"
|
#include "clutter-marshal.h"
|
||||||
#include "clutter-private.h"
|
#include "clutter-private.h"
|
||||||
|
|
||||||
|
typedef struct _ClutterContentIface ClutterContentInterface;
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
ATTACHED,
|
ATTACHED,
|
||||||
@@ -91,15 +92,9 @@ clutter_content_real_invalidate (ClutterContent *content)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
clutter_content_real_invalidate_size (ClutterContent *content)
|
clutter_content_real_paint_content (ClutterContent *content,
|
||||||
{
|
ClutterActor *actor,
|
||||||
}
|
ClutterPaintNode *context)
|
||||||
|
|
||||||
static void
|
|
||||||
clutter_content_real_paint_content (ClutterContent *content,
|
|
||||||
ClutterActor *actor,
|
|
||||||
ClutterPaintNode *context,
|
|
||||||
ClutterPaintContext *paint_context)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -113,7 +108,6 @@ clutter_content_default_init (ClutterContentInterface *iface)
|
|||||||
iface->attached = clutter_content_real_attached;
|
iface->attached = clutter_content_real_attached;
|
||||||
iface->detached = clutter_content_real_detached;
|
iface->detached = clutter_content_real_detached;
|
||||||
iface->invalidate = clutter_content_real_invalidate;
|
iface->invalidate = clutter_content_real_invalidate;
|
||||||
iface->invalidate_size = clutter_content_real_invalidate_size;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ClutterContent::attached:
|
* ClutterContent::attached:
|
||||||
@@ -129,8 +123,9 @@ clutter_content_default_init (ClutterContentInterface *iface)
|
|||||||
g_signal_new (I_("attached"),
|
g_signal_new (I_("attached"),
|
||||||
G_TYPE_FROM_INTERFACE (iface),
|
G_TYPE_FROM_INTERFACE (iface),
|
||||||
G_SIGNAL_RUN_FIRST,
|
G_SIGNAL_RUN_FIRST,
|
||||||
G_STRUCT_OFFSET (ClutterContentInterface, attached),
|
G_STRUCT_OFFSET (ClutterContentIface, attached),
|
||||||
NULL, NULL, NULL,
|
NULL, NULL,
|
||||||
|
_clutter_marshal_VOID__OBJECT,
|
||||||
G_TYPE_NONE, 1,
|
G_TYPE_NONE, 1,
|
||||||
CLUTTER_TYPE_ACTOR);
|
CLUTTER_TYPE_ACTOR);
|
||||||
|
|
||||||
@@ -148,8 +143,9 @@ clutter_content_default_init (ClutterContentInterface *iface)
|
|||||||
g_signal_new (I_("detached"),
|
g_signal_new (I_("detached"),
|
||||||
G_TYPE_FROM_INTERFACE (iface),
|
G_TYPE_FROM_INTERFACE (iface),
|
||||||
G_SIGNAL_RUN_FIRST,
|
G_SIGNAL_RUN_FIRST,
|
||||||
G_STRUCT_OFFSET (ClutterContentInterface, detached),
|
G_STRUCT_OFFSET (ClutterContentIface, detached),
|
||||||
NULL, NULL, NULL,
|
NULL, NULL,
|
||||||
|
_clutter_marshal_VOID__OBJECT,
|
||||||
G_TYPE_NONE, 1,
|
G_TYPE_NONE, 1,
|
||||||
CLUTTER_TYPE_ACTOR);
|
CLUTTER_TYPE_ACTOR);
|
||||||
}
|
}
|
||||||
@@ -192,45 +188,6 @@ clutter_content_invalidate (ClutterContent *content)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* clutter_content_invalidate_size:
|
|
||||||
* @content: a #ClutterContent
|
|
||||||
*
|
|
||||||
* Signals that @content's size changed. Attached actors with request mode
|
|
||||||
* set to %CLUTTER_REQUEST_CONTENT_SIZE will have a relayout queued.
|
|
||||||
*
|
|
||||||
* Attached actors with other request modes are not redrawn. To redraw them
|
|
||||||
* too, use clutter_content_invalidate().
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
clutter_content_invalidate_size (ClutterContent *content)
|
|
||||||
{
|
|
||||||
ClutterActor *actor;
|
|
||||||
GHashTable *actors;
|
|
||||||
GHashTableIter iter;
|
|
||||||
|
|
||||||
g_return_if_fail (CLUTTER_IS_CONTENT (content));
|
|
||||||
|
|
||||||
CLUTTER_CONTENT_GET_IFACE (content)->invalidate_size (content);
|
|
||||||
|
|
||||||
actors = g_object_get_qdata (G_OBJECT (content), quark_content_actors);
|
|
||||||
if (actors == NULL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
g_hash_table_iter_init (&iter, actors);
|
|
||||||
while (g_hash_table_iter_next (&iter, (gpointer *) &actor, NULL))
|
|
||||||
{
|
|
||||||
ClutterRequestMode request_mode;
|
|
||||||
|
|
||||||
g_assert (actor != NULL);
|
|
||||||
|
|
||||||
request_mode = clutter_actor_get_request_mode (actor);
|
|
||||||
|
|
||||||
if (request_mode == CLUTTER_REQUEST_CONTENT_SIZE)
|
|
||||||
_clutter_actor_queue_only_relayout (actor);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*< private >
|
/*< private >
|
||||||
* _clutter_content_attached:
|
* _clutter_content_attached:
|
||||||
* @content: a #ClutterContent
|
* @content: a #ClutterContent
|
||||||
@@ -242,7 +199,7 @@ clutter_content_invalidate_size (ClutterContent *content)
|
|||||||
* is associated to a #ClutterContent, to set up a backpointer from
|
* is associated to a #ClutterContent, to set up a backpointer from
|
||||||
* the @content to the @actor.
|
* the @content to the @actor.
|
||||||
*
|
*
|
||||||
* This function will invoke the #ClutterContentInterface.attached() virtual
|
* This function will invoke the #ClutterContentIface.attached() virtual
|
||||||
* function.
|
* function.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
@@ -276,7 +233,7 @@ _clutter_content_attached (ClutterContent *content,
|
|||||||
* This function should be used internally every time a #ClutterActor
|
* This function should be used internally every time a #ClutterActor
|
||||||
* removes the association with a #ClutterContent.
|
* removes the association with a #ClutterContent.
|
||||||
*
|
*
|
||||||
* This function will invoke the #ClutterContentInterface.detached() virtual
|
* This function will invoke the #ClutterContentIface.detached() virtual
|
||||||
* function.
|
* function.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
@@ -301,22 +258,19 @@ _clutter_content_detached (ClutterContent *content,
|
|||||||
* _clutter_content_paint_content:
|
* _clutter_content_paint_content:
|
||||||
* @content: a #ClutterContent
|
* @content: a #ClutterContent
|
||||||
* @actor: a #ClutterActor
|
* @actor: a #ClutterActor
|
||||||
* @node: a #ClutterPaintNode
|
* @context: a #ClutterPaintNode
|
||||||
* @paint_context: a #ClutterPaintContext
|
|
||||||
*
|
*
|
||||||
* Creates the render tree for the @content and @actor.
|
* Creates the render tree for the @content and @actor.
|
||||||
*
|
*
|
||||||
* This function will invoke the #ClutterContentInterface.paint_content()
|
* This function will invoke the #ClutterContentIface.paint_content()
|
||||||
* virtual function.
|
* virtual function.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
_clutter_content_paint_content (ClutterContent *content,
|
_clutter_content_paint_content (ClutterContent *content,
|
||||||
ClutterActor *actor,
|
ClutterActor *actor,
|
||||||
ClutterPaintNode *node,
|
ClutterPaintNode *node)
|
||||||
ClutterPaintContext *paint_context)
|
|
||||||
{
|
{
|
||||||
CLUTTER_CONTENT_GET_IFACE (content)->paint_content (content, actor, node,
|
CLUTTER_CONTENT_GET_IFACE (content)->paint_content (content, actor, node);
|
||||||
paint_context);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -33,13 +33,24 @@
|
|||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define CLUTTER_TYPE_CONTENT (clutter_content_get_type ())
|
#define CLUTTER_TYPE_CONTENT (clutter_content_get_type ())
|
||||||
|
#define CLUTTER_CONTENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_CONTENT, ClutterContent))
|
||||||
|
#define CLUTTER_IS_CONTENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_CONTENT))
|
||||||
|
#define CLUTTER_CONTENT_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), CLUTTER_TYPE_CONTENT, ClutterContentIface))
|
||||||
|
|
||||||
CLUTTER_EXPORT
|
typedef struct _ClutterContentIface ClutterContentIface;
|
||||||
G_DECLARE_INTERFACE (ClutterContent, clutter_content, CLUTTER, CONTENT, GObject)
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ClutterContentInterface:
|
* ClutterContent:
|
||||||
|
*
|
||||||
|
* The #ClutterContent structure is an opaque type
|
||||||
|
* whose members cannot be acccessed directly.
|
||||||
|
*
|
||||||
|
* Since: 1.10
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ClutterContentIface:
|
||||||
* @get_preferred_size: virtual function; should be overridden by subclasses
|
* @get_preferred_size: virtual function; should be overridden by subclasses
|
||||||
* of #ClutterContent that have a natural size
|
* of #ClutterContent that have a natural size
|
||||||
* @paint_content: virtual function; called each time the content needs to
|
* @paint_content: virtual function; called each time the content needs to
|
||||||
@@ -51,12 +62,12 @@ G_DECLARE_INTERFACE (ClutterContent, clutter_content, CLUTTER, CONTENT, GObject)
|
|||||||
* @invalidate: virtual function; called each time a #ClutterContent state
|
* @invalidate: virtual function; called each time a #ClutterContent state
|
||||||
* is changed.
|
* is changed.
|
||||||
*
|
*
|
||||||
* The #ClutterContentInterface structure contains only
|
* The #ClutterContentIface structure contains only
|
||||||
* private data.
|
* private data.
|
||||||
*
|
*
|
||||||
* Since: 1.10
|
* Since: 1.10
|
||||||
*/
|
*/
|
||||||
struct _ClutterContentInterface
|
struct _ClutterContentIface
|
||||||
{
|
{
|
||||||
/*< private >*/
|
/*< private >*/
|
||||||
GTypeInterface g_iface;
|
GTypeInterface g_iface;
|
||||||
@@ -65,10 +76,9 @@ struct _ClutterContentInterface
|
|||||||
gboolean (* get_preferred_size) (ClutterContent *content,
|
gboolean (* get_preferred_size) (ClutterContent *content,
|
||||||
gfloat *width,
|
gfloat *width,
|
||||||
gfloat *height);
|
gfloat *height);
|
||||||
void (* paint_content) (ClutterContent *content,
|
void (* paint_content) (ClutterContent *content,
|
||||||
ClutterActor *actor,
|
ClutterActor *actor,
|
||||||
ClutterPaintNode *node,
|
ClutterPaintNode *node);
|
||||||
ClutterPaintContext *paint_context);
|
|
||||||
|
|
||||||
void (* attached) (ClutterContent *content,
|
void (* attached) (ClutterContent *content,
|
||||||
ClutterActor *actor);
|
ClutterActor *actor);
|
||||||
@@ -76,10 +86,11 @@ struct _ClutterContentInterface
|
|||||||
ClutterActor *actor);
|
ClutterActor *actor);
|
||||||
|
|
||||||
void (* invalidate) (ClutterContent *content);
|
void (* invalidate) (ClutterContent *content);
|
||||||
|
|
||||||
void (* invalidate_size) (ClutterContent *content);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
CLUTTER_EXPORT
|
||||||
|
GType clutter_content_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
gboolean clutter_content_get_preferred_size (ClutterContent *content,
|
gboolean clutter_content_get_preferred_size (ClutterContent *content,
|
||||||
gfloat *width,
|
gfloat *width,
|
||||||
@@ -87,9 +98,6 @@ gboolean clutter_content_get_preferred_size (ClutterContent *content
|
|||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
void clutter_content_invalidate (ClutterContent *content);
|
void clutter_content_invalidate (ClutterContent *content);
|
||||||
|
|
||||||
CLUTTER_EXPORT
|
|
||||||
void clutter_content_invalidate_size (ClutterContent *content);
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __CLUTTER_CONTENT_H__ */
|
#endif /* __CLUTTER_CONTENT_H__ */
|
||||||
|
@@ -6,6 +6,42 @@
|
|||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
CLUTTER_DEBUG_MISC = 1 << 0,
|
||||||
|
CLUTTER_DEBUG_ACTOR = 1 << 1,
|
||||||
|
CLUTTER_DEBUG_TEXTURE = 1 << 2,
|
||||||
|
CLUTTER_DEBUG_EVENT = 1 << 3,
|
||||||
|
CLUTTER_DEBUG_PAINT = 1 << 4,
|
||||||
|
CLUTTER_DEBUG_PANGO = 1 << 5,
|
||||||
|
CLUTTER_DEBUG_BACKEND = 1 << 6,
|
||||||
|
CLUTTER_DEBUG_SCHEDULER = 1 << 7,
|
||||||
|
CLUTTER_DEBUG_SCRIPT = 1 << 8,
|
||||||
|
CLUTTER_DEBUG_SHADER = 1 << 9,
|
||||||
|
CLUTTER_DEBUG_MULTISTAGE = 1 << 10,
|
||||||
|
CLUTTER_DEBUG_ANIMATION = 1 << 11,
|
||||||
|
CLUTTER_DEBUG_LAYOUT = 1 << 12,
|
||||||
|
CLUTTER_DEBUG_PICK = 1 << 13,
|
||||||
|
CLUTTER_DEBUG_EVENTLOOP = 1 << 14,
|
||||||
|
CLUTTER_DEBUG_CLIPPING = 1 << 15,
|
||||||
|
CLUTTER_DEBUG_OOB_TRANSFORMS = 1 << 16
|
||||||
|
} ClutterDebugFlag;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
CLUTTER_DEBUG_NOP_PICKING = 1 << 0,
|
||||||
|
CLUTTER_DEBUG_DUMP_PICK_BUFFERS = 1 << 1
|
||||||
|
} ClutterPickDebugFlag;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
CLUTTER_DEBUG_DISABLE_SWAP_EVENTS = 1 << 0,
|
||||||
|
CLUTTER_DEBUG_DISABLE_CLIPPED_REDRAWS = 1 << 1,
|
||||||
|
CLUTTER_DEBUG_REDRAWS = 1 << 2,
|
||||||
|
CLUTTER_DEBUG_PAINT_VOLUMES = 1 << 3,
|
||||||
|
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
|
||||||
|
} ClutterDrawDebugFlag;
|
||||||
|
|
||||||
#ifdef CLUTTER_ENABLE_DEBUG
|
#ifdef CLUTTER_ENABLE_DEBUG
|
||||||
|
|
||||||
#define CLUTTER_HAS_DEBUG(type) ((clutter_debug_flags & CLUTTER_DEBUG_##type) != FALSE)
|
#define CLUTTER_HAS_DEBUG(type) ((clutter_debug_flags & CLUTTER_DEBUG_##type) != FALSE)
|
||||||
@@ -43,9 +79,9 @@ extern guint clutter_pick_debug_flags;
|
|||||||
extern guint clutter_paint_debug_flags;
|
extern guint clutter_paint_debug_flags;
|
||||||
|
|
||||||
void _clutter_debug_messagev (const char *format,
|
void _clutter_debug_messagev (const char *format,
|
||||||
va_list var_args) G_GNUC_PRINTF (1, 0);
|
va_list var_args);
|
||||||
void _clutter_debug_message (const char *format,
|
void _clutter_debug_message (const char *format,
|
||||||
...) G_GNUC_PRINTF (1, 2);
|
...);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
@@ -147,7 +147,7 @@ clutter_deform_effect_set_actor (ClutterActorMeta *meta,
|
|||||||
ClutterActor *old_actor = clutter_actor_meta_get_actor (meta);
|
ClutterActor *old_actor = clutter_actor_meta_get_actor (meta);
|
||||||
|
|
||||||
if (old_actor != NULL)
|
if (old_actor != NULL)
|
||||||
g_clear_signal_handler (&priv->allocation_id, old_actor);
|
g_signal_handler_disconnect (old_actor, priv->allocation_id);
|
||||||
|
|
||||||
priv->allocation_id = 0;
|
priv->allocation_id = 0;
|
||||||
}
|
}
|
||||||
@@ -166,20 +166,18 @@ clutter_deform_effect_set_actor (ClutterActorMeta *meta,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
clutter_deform_effect_paint_target (ClutterOffscreenEffect *effect,
|
clutter_deform_effect_paint_target (ClutterOffscreenEffect *effect)
|
||||||
ClutterPaintContext *paint_context)
|
|
||||||
{
|
{
|
||||||
ClutterDeformEffect *self= CLUTTER_DEFORM_EFFECT (effect);
|
ClutterDeformEffect *self= CLUTTER_DEFORM_EFFECT (effect);
|
||||||
ClutterDeformEffectPrivate *priv = self->priv;
|
ClutterDeformEffectPrivate *priv = self->priv;
|
||||||
CoglHandle material;
|
CoglHandle material;
|
||||||
CoglPipeline *pipeline;
|
CoglPipeline *pipeline;
|
||||||
CoglDepthState depth_state;
|
CoglDepthState depth_state;
|
||||||
CoglFramebuffer *fb =
|
CoglFramebuffer *fb = cogl_get_draw_framebuffer ();
|
||||||
clutter_paint_context_get_framebuffer (paint_context);
|
|
||||||
|
|
||||||
if (priv->is_dirty)
|
if (priv->is_dirty)
|
||||||
{
|
{
|
||||||
graphene_rect_t rect;
|
ClutterRect rect;
|
||||||
gboolean mapped_buffer;
|
gboolean mapped_buffer;
|
||||||
CoglVertexP3T2C4 *verts;
|
CoglVertexP3T2C4 *verts;
|
||||||
ClutterActor *actor;
|
ClutterActor *actor;
|
||||||
@@ -195,8 +193,8 @@ clutter_deform_effect_paint_target (ClutterOffscreenEffect *effect,
|
|||||||
*/
|
*/
|
||||||
if (clutter_offscreen_effect_get_target_rect (effect, &rect))
|
if (clutter_offscreen_effect_get_target_rect (effect, &rect))
|
||||||
{
|
{
|
||||||
width = graphene_rect_get_width (&rect);
|
width = clutter_rect_get_width (&rect);
|
||||||
height = graphene_rect_get_height (&rect);
|
height = clutter_rect_get_height (&rect);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
clutter_actor_get_size (actor, &width, &height);
|
clutter_actor_get_size (actor, &width, &height);
|
||||||
@@ -284,7 +282,6 @@ clutter_deform_effect_paint_target (ClutterOffscreenEffect *effect,
|
|||||||
/* enable depth testing */
|
/* enable depth testing */
|
||||||
cogl_depth_state_init (&depth_state);
|
cogl_depth_state_init (&depth_state);
|
||||||
cogl_depth_state_set_test_enabled (&depth_state, TRUE);
|
cogl_depth_state_set_test_enabled (&depth_state, TRUE);
|
||||||
cogl_depth_state_set_test_function (&depth_state, COGL_DEPTH_TEST_FUNCTION_LEQUAL);
|
|
||||||
cogl_pipeline_set_depth_state (pipeline, &depth_state, NULL);
|
cogl_pipeline_set_depth_state (pipeline, &depth_state, NULL);
|
||||||
|
|
||||||
/* enable backface culling if we have a back material */
|
/* enable backface culling if we have a back material */
|
||||||
|
@@ -5,14 +5,28 @@
|
|||||||
|
|
||||||
#include "deprecated/clutter-actor.h"
|
#include "deprecated/clutter-actor.h"
|
||||||
#include "deprecated/clutter-alpha.h"
|
#include "deprecated/clutter-alpha.h"
|
||||||
|
#include "deprecated/clutter-animatable.h"
|
||||||
#include "deprecated/clutter-animation.h"
|
#include "deprecated/clutter-animation.h"
|
||||||
#include "deprecated/clutter-box.h"
|
#include "deprecated/clutter-backend.h"
|
||||||
|
#include "deprecated/clutter-behaviour.h"
|
||||||
|
#include "deprecated/clutter-behaviour-depth.h"
|
||||||
|
#include "deprecated/clutter-behaviour-ellipse.h"
|
||||||
|
#include "deprecated/clutter-behaviour-opacity.h"
|
||||||
|
#include "deprecated/clutter-behaviour-path.h"
|
||||||
|
#include "deprecated/clutter-behaviour-rotate.h"
|
||||||
|
#include "deprecated/clutter-behaviour-scale.h"
|
||||||
|
#include "deprecated/clutter-bin-layout.h"
|
||||||
|
#include "deprecated/clutter-cairo-texture.h"
|
||||||
#include "deprecated/clutter-container.h"
|
#include "deprecated/clutter-container.h"
|
||||||
#include "deprecated/clutter-group.h"
|
#include "deprecated/clutter-input-device.h"
|
||||||
|
#include "deprecated/clutter-keysyms.h"
|
||||||
|
#include "deprecated/clutter-main.h"
|
||||||
#include "deprecated/clutter-rectangle.h"
|
#include "deprecated/clutter-rectangle.h"
|
||||||
|
#include "deprecated/clutter-stage-manager.h"
|
||||||
#include "deprecated/clutter-stage.h"
|
#include "deprecated/clutter-stage.h"
|
||||||
#include "deprecated/clutter-state.h"
|
#include "deprecated/clutter-texture.h"
|
||||||
#include "deprecated/clutter-timeline.h"
|
#include "deprecated/clutter-timeline.h"
|
||||||
|
#include "deprecated/clutter-util.h"
|
||||||
|
|
||||||
#undef __CLUTTER_DEPRECATED_H_INSIDE__
|
#undef __CLUTTER_DEPRECATED_H_INSIDE__
|
||||||
|
|
||||||
|
@@ -112,8 +112,7 @@ G_DEFINE_TYPE (ClutterDesaturateEffect,
|
|||||||
CLUTTER_TYPE_OFFSCREEN_EFFECT);
|
CLUTTER_TYPE_OFFSCREEN_EFFECT);
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
clutter_desaturate_effect_pre_paint (ClutterEffect *effect,
|
clutter_desaturate_effect_pre_paint (ClutterEffect *effect)
|
||||||
ClutterPaintContext *paint_context)
|
|
||||||
{
|
{
|
||||||
ClutterDesaturateEffect *self = CLUTTER_DESATURATE_EFFECT (effect);
|
ClutterDesaturateEffect *self = CLUTTER_DESATURATE_EFFECT (effect);
|
||||||
ClutterEffectClass *parent_class;
|
ClutterEffectClass *parent_class;
|
||||||
@@ -134,7 +133,7 @@ clutter_desaturate_effect_pre_paint (ClutterEffect *effect,
|
|||||||
}
|
}
|
||||||
|
|
||||||
parent_class = CLUTTER_EFFECT_CLASS (clutter_desaturate_effect_parent_class);
|
parent_class = CLUTTER_EFFECT_CLASS (clutter_desaturate_effect_parent_class);
|
||||||
if (parent_class->pre_paint (effect, paint_context))
|
if (parent_class->pre_paint (effect))
|
||||||
{
|
{
|
||||||
ClutterOffscreenEffect *offscreen_effect =
|
ClutterOffscreenEffect *offscreen_effect =
|
||||||
CLUTTER_OFFSCREEN_EFFECT (effect);
|
CLUTTER_OFFSCREEN_EFFECT (effect);
|
||||||
@@ -153,12 +152,9 @@ clutter_desaturate_effect_pre_paint (ClutterEffect *effect,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
clutter_desaturate_effect_paint_target (ClutterOffscreenEffect *effect,
|
clutter_desaturate_effect_paint_target (ClutterOffscreenEffect *effect)
|
||||||
ClutterPaintContext *paint_context)
|
|
||||||
{
|
{
|
||||||
ClutterDesaturateEffect *self = CLUTTER_DESATURATE_EFFECT (effect);
|
ClutterDesaturateEffect *self = CLUTTER_DESATURATE_EFFECT (effect);
|
||||||
CoglFramebuffer *framebuffer =
|
|
||||||
clutter_paint_context_get_framebuffer (paint_context);
|
|
||||||
ClutterActor *actor;
|
ClutterActor *actor;
|
||||||
CoglHandle texture;
|
CoglHandle texture;
|
||||||
guint8 paint_opacity;
|
guint8 paint_opacity;
|
||||||
@@ -174,12 +170,13 @@ clutter_desaturate_effect_paint_target (ClutterOffscreenEffect *effect,
|
|||||||
paint_opacity,
|
paint_opacity,
|
||||||
paint_opacity,
|
paint_opacity,
|
||||||
paint_opacity);
|
paint_opacity);
|
||||||
|
cogl_push_source (self->pipeline);
|
||||||
|
|
||||||
cogl_framebuffer_draw_rectangle (framebuffer,
|
cogl_rectangle (0, 0,
|
||||||
self->pipeline,
|
cogl_texture_get_width (texture),
|
||||||
0, 0,
|
cogl_texture_get_height (texture));
|
||||||
cogl_texture_get_width (texture),
|
|
||||||
cogl_texture_get_height (texture));
|
cogl_pop_source ();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -300,7 +297,9 @@ clutter_desaturate_effect_init (ClutterDesaturateEffect *self)
|
|||||||
cogl_pipeline_add_snippet (klass->base_pipeline, snippet);
|
cogl_pipeline_add_snippet (klass->base_pipeline, snippet);
|
||||||
cogl_object_unref (snippet);
|
cogl_object_unref (snippet);
|
||||||
|
|
||||||
cogl_pipeline_set_layer_null_texture (klass->base_pipeline, 0);
|
cogl_pipeline_set_layer_null_texture (klass->base_pipeline,
|
||||||
|
0, /* layer number */
|
||||||
|
COGL_TEXTURE_TYPE_2D);
|
||||||
}
|
}
|
||||||
|
|
||||||
self->pipeline = cogl_pipeline_copy (klass->base_pipeline);
|
self->pipeline = cogl_pipeline_copy (klass->base_pipeline);
|
||||||
|
@@ -69,23 +69,6 @@ typedef struct _ClutterTouchInfo
|
|||||||
gfloat current_y;
|
gfloat current_y;
|
||||||
} ClutterTouchInfo;
|
} ClutterTouchInfo;
|
||||||
|
|
||||||
typedef struct _ClutterPtrA11yData
|
|
||||||
{
|
|
||||||
int n_btn_pressed;
|
|
||||||
float current_x;
|
|
||||||
float current_y;
|
|
||||||
|
|
||||||
float dwell_x;
|
|
||||||
float dwell_y;
|
|
||||||
gboolean dwell_drag_started;
|
|
||||||
gboolean dwell_gesture_started;
|
|
||||||
guint dwell_timer;
|
|
||||||
guint dwell_position_timer;
|
|
||||||
|
|
||||||
guint secondary_click_timer;
|
|
||||||
gboolean secondary_click_triggered;
|
|
||||||
} ClutterPtrA11yData;
|
|
||||||
|
|
||||||
struct _ClutterInputDevice
|
struct _ClutterInputDevice
|
||||||
{
|
{
|
||||||
GObject parent_instance;
|
GObject parent_instance;
|
||||||
@@ -160,10 +143,6 @@ struct _ClutterInputDevice
|
|||||||
|
|
||||||
guint has_cursor : 1;
|
guint has_cursor : 1;
|
||||||
guint is_enabled : 1;
|
guint is_enabled : 1;
|
||||||
|
|
||||||
/* Accessiblity */
|
|
||||||
ClutterVirtualInputDevice *accessibility_virtual_device;
|
|
||||||
ClutterPtrA11yData *ptr_a11y_data;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef void (*ClutterEmitInputDeviceEvent) (ClutterEvent *event,
|
typedef void (*ClutterEmitInputDeviceEvent) (ClutterEvent *event,
|
||||||
@@ -194,15 +173,34 @@ struct _ClutterInputDeviceClass
|
|||||||
ClutterEmitInputDeviceEvent emit_event_func);
|
ClutterEmitInputDeviceEvent emit_event_func);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* Platform-dependent interface */
|
||||||
|
typedef struct _ClutterEventExtender ClutterEventExtender;
|
||||||
|
typedef struct _ClutterEventExtenderInterface ClutterEventExtenderInterface;
|
||||||
|
|
||||||
|
#define CLUTTER_TYPE_EVENT_EXTENDER (clutter_event_extender_get_type ())
|
||||||
|
#define CLUTTER_EVENT_EXTENDER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), CLUTTER_TYPE_EVENT_EXTENDER, ClutterEventExtender))
|
||||||
|
#define CLUTTER_IS_EVENT_EXTENDER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), CLUTTER_TYPE_EVENT_EXTENDER))
|
||||||
|
#define CLUTTER_EVENT_EXTENDER_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), CLUTTER_TYPE_EVENT_EXTENDER, ClutterEventExtenderInterface))
|
||||||
|
|
||||||
|
struct _ClutterEventExtenderInterface
|
||||||
|
{
|
||||||
|
GTypeInterface g_iface;
|
||||||
|
|
||||||
|
void (* copy_event_data) (ClutterEventExtender *event_extender,
|
||||||
|
const ClutterEvent *src,
|
||||||
|
ClutterEvent *dest);
|
||||||
|
void (* free_event_data) (ClutterEventExtender *event_extender,
|
||||||
|
ClutterEvent *event);
|
||||||
|
};
|
||||||
|
|
||||||
|
GType clutter_event_extender_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
/* device manager */
|
/* device manager */
|
||||||
CLUTTER_EXPORT
|
|
||||||
void _clutter_device_manager_add_device (ClutterDeviceManager *device_manager,
|
void _clutter_device_manager_add_device (ClutterDeviceManager *device_manager,
|
||||||
ClutterInputDevice *device);
|
ClutterInputDevice *device);
|
||||||
CLUTTER_EXPORT
|
|
||||||
void _clutter_device_manager_remove_device (ClutterDeviceManager *device_manager,
|
void _clutter_device_manager_remove_device (ClutterDeviceManager *device_manager,
|
||||||
ClutterInputDevice *device);
|
ClutterInputDevice *device);
|
||||||
void _clutter_device_manager_update_devices (ClutterDeviceManager *device_manager);
|
void _clutter_device_manager_update_devices (ClutterDeviceManager *device_manager);
|
||||||
CLUTTER_EXPORT
|
|
||||||
void _clutter_device_manager_select_stage_events (ClutterDeviceManager *device_manager,
|
void _clutter_device_manager_select_stage_events (ClutterDeviceManager *device_manager,
|
||||||
ClutterStage *stage);
|
ClutterStage *stage);
|
||||||
ClutterBackend *_clutter_device_manager_get_backend (ClutterDeviceManager *device_manager);
|
ClutterBackend *_clutter_device_manager_get_backend (ClutterDeviceManager *device_manager);
|
||||||
@@ -210,35 +208,25 @@ ClutterBackend *_clutter_device_manager_get_backend (ClutterDeviceMa
|
|||||||
void _clutter_device_manager_compress_motion (ClutterDeviceManager *device_manger,
|
void _clutter_device_manager_compress_motion (ClutterDeviceManager *device_manger,
|
||||||
ClutterEvent *event,
|
ClutterEvent *event,
|
||||||
const ClutterEvent *to_discard);
|
const ClutterEvent *to_discard);
|
||||||
CLUTTER_EXPORT
|
|
||||||
void clutter_device_manager_ensure_a11y_state (ClutterDeviceManager *device_manager);
|
|
||||||
|
|
||||||
/* input device */
|
/* input device */
|
||||||
CLUTTER_EXPORT
|
|
||||||
gboolean _clutter_input_device_has_sequence (ClutterInputDevice *device,
|
gboolean _clutter_input_device_has_sequence (ClutterInputDevice *device,
|
||||||
ClutterEventSequence *sequence);
|
ClutterEventSequence *sequence);
|
||||||
CLUTTER_EXPORT
|
|
||||||
void _clutter_input_device_add_event_sequence (ClutterInputDevice *device,
|
void _clutter_input_device_add_event_sequence (ClutterInputDevice *device,
|
||||||
ClutterEvent *event);
|
ClutterEvent *event);
|
||||||
CLUTTER_EXPORT
|
|
||||||
void _clutter_input_device_remove_event_sequence (ClutterInputDevice *device,
|
void _clutter_input_device_remove_event_sequence (ClutterInputDevice *device,
|
||||||
ClutterEvent *event);
|
ClutterEvent *event);
|
||||||
CLUTTER_EXPORT
|
|
||||||
void _clutter_input_device_set_coords (ClutterInputDevice *device,
|
void _clutter_input_device_set_coords (ClutterInputDevice *device,
|
||||||
ClutterEventSequence *sequence,
|
ClutterEventSequence *sequence,
|
||||||
gfloat x,
|
gfloat x,
|
||||||
gfloat y,
|
gfloat y,
|
||||||
ClutterStage *stage);
|
ClutterStage *stage);
|
||||||
CLUTTER_EXPORT
|
|
||||||
void _clutter_input_device_set_state (ClutterInputDevice *device,
|
void _clutter_input_device_set_state (ClutterInputDevice *device,
|
||||||
ClutterModifierType state);
|
ClutterModifierType state);
|
||||||
CLUTTER_EXPORT
|
|
||||||
void _clutter_input_device_set_time (ClutterInputDevice *device,
|
void _clutter_input_device_set_time (ClutterInputDevice *device,
|
||||||
guint32 time_);
|
guint32 time_);
|
||||||
CLUTTER_EXPORT
|
|
||||||
void _clutter_input_device_set_stage (ClutterInputDevice *device,
|
void _clutter_input_device_set_stage (ClutterInputDevice *device,
|
||||||
ClutterStage *stage);
|
ClutterStage *stage);
|
||||||
CLUTTER_EXPORT
|
|
||||||
ClutterStage * _clutter_input_device_get_stage (ClutterInputDevice *device);
|
ClutterStage * _clutter_input_device_get_stage (ClutterInputDevice *device);
|
||||||
void _clutter_input_device_set_actor (ClutterInputDevice *device,
|
void _clutter_input_device_set_actor (ClutterInputDevice *device,
|
||||||
ClutterEventSequence *sequence,
|
ClutterEventSequence *sequence,
|
||||||
@@ -247,57 +235,44 @@ void _clutter_input_device_set_actor (ClutterInputDev
|
|||||||
ClutterActor * _clutter_input_device_update (ClutterInputDevice *device,
|
ClutterActor * _clutter_input_device_update (ClutterInputDevice *device,
|
||||||
ClutterEventSequence *sequence,
|
ClutterEventSequence *sequence,
|
||||||
gboolean emit_crossing);
|
gboolean emit_crossing);
|
||||||
CLUTTER_EXPORT
|
|
||||||
void _clutter_input_device_set_n_keys (ClutterInputDevice *device,
|
void _clutter_input_device_set_n_keys (ClutterInputDevice *device,
|
||||||
guint n_keys);
|
guint n_keys);
|
||||||
CLUTTER_EXPORT
|
|
||||||
guint _clutter_input_device_add_axis (ClutterInputDevice *device,
|
guint _clutter_input_device_add_axis (ClutterInputDevice *device,
|
||||||
ClutterInputAxis axis,
|
ClutterInputAxis axis,
|
||||||
gdouble min_value,
|
gdouble min_value,
|
||||||
gdouble max_value,
|
gdouble max_value,
|
||||||
gdouble resolution);
|
gdouble resolution);
|
||||||
CLUTTER_EXPORT
|
|
||||||
void _clutter_input_device_reset_axes (ClutterInputDevice *device);
|
void _clutter_input_device_reset_axes (ClutterInputDevice *device);
|
||||||
|
|
||||||
CLUTTER_EXPORT
|
|
||||||
void _clutter_input_device_set_associated_device (ClutterInputDevice *device,
|
void _clutter_input_device_set_associated_device (ClutterInputDevice *device,
|
||||||
ClutterInputDevice *associated);
|
ClutterInputDevice *associated);
|
||||||
CLUTTER_EXPORT
|
|
||||||
void _clutter_input_device_add_slave (ClutterInputDevice *master,
|
void _clutter_input_device_add_slave (ClutterInputDevice *master,
|
||||||
ClutterInputDevice *slave);
|
ClutterInputDevice *slave);
|
||||||
CLUTTER_EXPORT
|
|
||||||
void _clutter_input_device_remove_slave (ClutterInputDevice *master,
|
void _clutter_input_device_remove_slave (ClutterInputDevice *master,
|
||||||
ClutterInputDevice *slave);
|
ClutterInputDevice *slave);
|
||||||
|
|
||||||
CLUTTER_EXPORT
|
|
||||||
gboolean _clutter_input_device_translate_axis (ClutterInputDevice *device,
|
gboolean _clutter_input_device_translate_axis (ClutterInputDevice *device,
|
||||||
guint index_,
|
guint index_,
|
||||||
gdouble value,
|
gdouble value,
|
||||||
gdouble *axis_value);
|
gdouble *axis_value);
|
||||||
|
|
||||||
CLUTTER_EXPORT
|
|
||||||
void _clutter_input_device_add_scroll_info (ClutterInputDevice *device,
|
void _clutter_input_device_add_scroll_info (ClutterInputDevice *device,
|
||||||
guint index_,
|
guint index_,
|
||||||
ClutterScrollDirection direction,
|
ClutterScrollDirection direction,
|
||||||
gdouble increment);
|
gdouble increment);
|
||||||
CLUTTER_EXPORT
|
|
||||||
void _clutter_input_device_reset_scroll_info (ClutterInputDevice *device);
|
void _clutter_input_device_reset_scroll_info (ClutterInputDevice *device);
|
||||||
CLUTTER_EXPORT
|
|
||||||
gboolean _clutter_input_device_get_scroll_delta (ClutterInputDevice *device,
|
gboolean _clutter_input_device_get_scroll_delta (ClutterInputDevice *device,
|
||||||
guint index_,
|
guint index_,
|
||||||
gdouble value,
|
gdouble value,
|
||||||
ClutterScrollDirection *direction_p,
|
ClutterScrollDirection *direction_p,
|
||||||
gdouble *delta_p);
|
gdouble *delta_p);
|
||||||
|
|
||||||
CLUTTER_EXPORT
|
|
||||||
ClutterInputDeviceTool * clutter_input_device_lookup_tool (ClutterInputDevice *device,
|
ClutterInputDeviceTool * clutter_input_device_lookup_tool (ClutterInputDevice *device,
|
||||||
guint64 serial,
|
guint64 serial,
|
||||||
ClutterInputDeviceToolType type);
|
ClutterInputDeviceToolType type);
|
||||||
CLUTTER_EXPORT
|
|
||||||
void clutter_input_device_add_tool (ClutterInputDevice *device,
|
void clutter_input_device_add_tool (ClutterInputDevice *device,
|
||||||
ClutterInputDeviceTool *tool);
|
ClutterInputDeviceTool *tool);
|
||||||
|
|
||||||
CLUTTER_EXPORT
|
|
||||||
void clutter_input_device_update_from_tool (ClutterInputDevice *device,
|
void clutter_input_device_update_from_tool (ClutterInputDevice *device,
|
||||||
ClutterInputDeviceTool *tool);
|
ClutterInputDeviceTool *tool);
|
||||||
|
|
||||||
|
@@ -47,7 +47,6 @@
|
|||||||
#include "clutter-stage-private.h"
|
#include "clutter-stage-private.h"
|
||||||
#include "clutter-virtual-input-device.h"
|
#include "clutter-virtual-input-device.h"
|
||||||
#include "clutter-input-device-tool.h"
|
#include "clutter-input-device-tool.h"
|
||||||
#include "clutter-input-pointer-a11y-private.h"
|
|
||||||
|
|
||||||
struct _ClutterDeviceManagerPrivate
|
struct _ClutterDeviceManagerPrivate
|
||||||
{
|
{
|
||||||
@@ -56,8 +55,6 @@ struct _ClutterDeviceManagerPrivate
|
|||||||
|
|
||||||
/* Keyboard a11y */
|
/* Keyboard a11y */
|
||||||
ClutterKbdA11ySettings kbd_a11y_settings;
|
ClutterKbdA11ySettings kbd_a11y_settings;
|
||||||
/* Pointer a11y */
|
|
||||||
ClutterPointerA11ySettings pointer_a11y_settings;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enum
|
enum
|
||||||
@@ -78,9 +75,6 @@ enum
|
|||||||
TOOL_CHANGED,
|
TOOL_CHANGED,
|
||||||
KBD_A11Y_MASK_CHANGED,
|
KBD_A11Y_MASK_CHANGED,
|
||||||
KBD_A11Y_FLAGS_CHANGED,
|
KBD_A11Y_FLAGS_CHANGED,
|
||||||
PTR_A11Y_DWELL_CLICK_TYPE_CHANGED,
|
|
||||||
PTR_A11Y_TIMEOUT_STARTED,
|
|
||||||
PTR_A11Y_TIMEOUT_STOPPED,
|
|
||||||
|
|
||||||
LAST_SIGNAL
|
LAST_SIGNAL
|
||||||
};
|
};
|
||||||
@@ -91,14 +85,22 @@ G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (ClutterDeviceManager,
|
|||||||
clutter_device_manager,
|
clutter_device_manager,
|
||||||
G_TYPE_OBJECT)
|
G_TYPE_OBJECT)
|
||||||
|
|
||||||
|
G_DEFINE_INTERFACE (ClutterEventExtender,
|
||||||
|
clutter_event_extender,
|
||||||
|
CLUTTER_TYPE_DEVICE_MANAGER)
|
||||||
|
|
||||||
|
static void
|
||||||
|
clutter_event_extender_default_init (ClutterEventExtenderInterface *iface)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
clutter_device_manager_set_property (GObject *gobject,
|
clutter_device_manager_set_property (GObject *gobject,
|
||||||
guint prop_id,
|
guint prop_id,
|
||||||
const GValue *value,
|
const GValue *value,
|
||||||
GParamSpec *pspec)
|
GParamSpec *pspec)
|
||||||
{
|
{
|
||||||
ClutterDeviceManager *self = CLUTTER_DEVICE_MANAGER (gobject);
|
ClutterDeviceManagerPrivate *priv = CLUTTER_DEVICE_MANAGER (gobject)->priv;
|
||||||
ClutterDeviceManagerPrivate *priv = clutter_device_manager_get_instance_private (self);
|
|
||||||
|
|
||||||
switch (prop_id)
|
switch (prop_id)
|
||||||
{
|
{
|
||||||
@@ -117,8 +119,7 @@ clutter_device_manager_get_property (GObject *gobject,
|
|||||||
GValue *value,
|
GValue *value,
|
||||||
GParamSpec *pspec)
|
GParamSpec *pspec)
|
||||||
{
|
{
|
||||||
ClutterDeviceManager *self = CLUTTER_DEVICE_MANAGER (gobject);
|
ClutterDeviceManagerPrivate *priv = CLUTTER_DEVICE_MANAGER (gobject)->priv;
|
||||||
ClutterDeviceManagerPrivate *priv = clutter_device_manager_get_instance_private (self);
|
|
||||||
|
|
||||||
switch (prop_id)
|
switch (prop_id)
|
||||||
{
|
{
|
||||||
@@ -164,7 +165,8 @@ clutter_device_manager_class_init (ClutterDeviceManagerClass *klass)
|
|||||||
G_TYPE_FROM_CLASS (klass),
|
G_TYPE_FROM_CLASS (klass),
|
||||||
G_SIGNAL_RUN_LAST,
|
G_SIGNAL_RUN_LAST,
|
||||||
0,
|
0,
|
||||||
NULL, NULL, NULL,
|
NULL, NULL,
|
||||||
|
_clutter_marshal_VOID__OBJECT,
|
||||||
G_TYPE_NONE, 1,
|
G_TYPE_NONE, 1,
|
||||||
CLUTTER_TYPE_INPUT_DEVICE);
|
CLUTTER_TYPE_INPUT_DEVICE);
|
||||||
|
|
||||||
@@ -183,7 +185,8 @@ clutter_device_manager_class_init (ClutterDeviceManagerClass *klass)
|
|||||||
G_TYPE_FROM_CLASS (klass),
|
G_TYPE_FROM_CLASS (klass),
|
||||||
G_SIGNAL_RUN_LAST,
|
G_SIGNAL_RUN_LAST,
|
||||||
0,
|
0,
|
||||||
NULL, NULL, NULL,
|
NULL, NULL,
|
||||||
|
_clutter_marshal_VOID__OBJECT,
|
||||||
G_TYPE_NONE, 1,
|
G_TYPE_NONE, 1,
|
||||||
CLUTTER_TYPE_INPUT_DEVICE);
|
CLUTTER_TYPE_INPUT_DEVICE);
|
||||||
|
|
||||||
@@ -236,74 +239,12 @@ clutter_device_manager_class_init (ClutterDeviceManagerClass *klass)
|
|||||||
G_TYPE_NONE, 2,
|
G_TYPE_NONE, 2,
|
||||||
G_TYPE_UINT,
|
G_TYPE_UINT,
|
||||||
G_TYPE_UINT);
|
G_TYPE_UINT);
|
||||||
|
|
||||||
/**
|
|
||||||
* ClutterDeviceManager::ptr-a11y-dwell-click-type-changed:
|
|
||||||
* @manager: the #ClutterDeviceManager that emitted the signal
|
|
||||||
* @click_type: the new #ClutterPointerA11yDwellClickType mode
|
|
||||||
*
|
|
||||||
* The ::ptr-a11y-dwell-click-type-changed signal is emitted each time
|
|
||||||
* the ClutterPointerA11yDwellClickType mode is changed as the result
|
|
||||||
* of pointer accessibility operations.
|
|
||||||
*/
|
|
||||||
manager_signals[PTR_A11Y_DWELL_CLICK_TYPE_CHANGED] =
|
|
||||||
g_signal_new (I_("ptr-a11y-dwell-click-type-changed"),
|
|
||||||
G_TYPE_FROM_CLASS (klass),
|
|
||||||
G_SIGNAL_RUN_LAST,
|
|
||||||
0, NULL, NULL,
|
|
||||||
g_cclosure_marshal_VOID__FLAGS,
|
|
||||||
G_TYPE_NONE, 1,
|
|
||||||
CLUTTER_TYPE_POINTER_A11Y_DWELL_CLICK_TYPE);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ClutterDeviceManager::ptr-a11y-timeout-started:
|
|
||||||
* @manager: the #ClutterDeviceManager that emitted the signal
|
|
||||||
* @device: the core pointer #ClutterInputDevice
|
|
||||||
* @timeout_type: the type of timeout #ClutterPointerA11yTimeoutType
|
|
||||||
* @delay: the delay in ms before secondary-click is triggered.
|
|
||||||
*
|
|
||||||
* The ::ptr-a11y-timeout-started signal is emitted when a
|
|
||||||
* pointer accessibility timeout delay is started, so that upper
|
|
||||||
* layers can notify the user with some visual feedback.
|
|
||||||
*/
|
|
||||||
manager_signals[PTR_A11Y_TIMEOUT_STARTED] =
|
|
||||||
g_signal_new (I_("ptr-a11y-timeout-started"),
|
|
||||||
G_TYPE_FROM_CLASS (klass),
|
|
||||||
G_SIGNAL_RUN_LAST,
|
|
||||||
0, NULL, NULL,
|
|
||||||
_clutter_marshal_VOID__OBJECT_FLAGS_UINT,
|
|
||||||
G_TYPE_NONE, 3,
|
|
||||||
CLUTTER_TYPE_INPUT_DEVICE,
|
|
||||||
CLUTTER_TYPE_POINTER_A11Y_TIMEOUT_TYPE,
|
|
||||||
G_TYPE_UINT);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ClutterDeviceManager::ptr-a11y-timeout-stopped:
|
|
||||||
* @manager: the #ClutterDeviceManager that emitted the signal
|
|
||||||
* @device: the core pointer #ClutterInputDevice
|
|
||||||
* @timeout_type: the type of timeout #ClutterPointerA11yTimeoutType
|
|
||||||
* @clicked: %TRUE if the timeout finished and triggered a click
|
|
||||||
*
|
|
||||||
* The ::ptr-a11y-timeout-stopped signal is emitted when a running
|
|
||||||
* pointer accessibility timeout delay is stopped, either because
|
|
||||||
* it's triggered at the end of the delay or cancelled, so that
|
|
||||||
* upper layers can notify the user with some visual feedback.
|
|
||||||
*/
|
|
||||||
manager_signals[PTR_A11Y_TIMEOUT_STOPPED] =
|
|
||||||
g_signal_new (I_("ptr-a11y-timeout-stopped"),
|
|
||||||
G_TYPE_FROM_CLASS (klass),
|
|
||||||
G_SIGNAL_RUN_LAST,
|
|
||||||
0, NULL, NULL,
|
|
||||||
_clutter_marshal_VOID__OBJECT_FLAGS_BOOLEAN,
|
|
||||||
G_TYPE_NONE, 3,
|
|
||||||
CLUTTER_TYPE_INPUT_DEVICE,
|
|
||||||
CLUTTER_TYPE_POINTER_A11Y_TIMEOUT_TYPE,
|
|
||||||
G_TYPE_BOOLEAN);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
clutter_device_manager_init (ClutterDeviceManager *self)
|
clutter_device_manager_init (ClutterDeviceManager *self)
|
||||||
{
|
{
|
||||||
|
self->priv = clutter_device_manager_get_instance_private (self);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -322,7 +263,7 @@ clutter_device_manager_get_default (void)
|
|||||||
{
|
{
|
||||||
ClutterBackend *backend = clutter_get_default_backend ();
|
ClutterBackend *backend = clutter_get_default_backend ();
|
||||||
|
|
||||||
return CLUTTER_BACKEND_GET_CLASS (backend)->get_device_manager (backend);
|
return backend->device_manager;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -546,11 +487,9 @@ _clutter_device_manager_update_devices (ClutterDeviceManager *device_manager)
|
|||||||
ClutterBackend *
|
ClutterBackend *
|
||||||
_clutter_device_manager_get_backend (ClutterDeviceManager *manager)
|
_clutter_device_manager_get_backend (ClutterDeviceManager *manager)
|
||||||
{
|
{
|
||||||
ClutterDeviceManagerPrivate *priv = clutter_device_manager_get_instance_private (manager);
|
|
||||||
|
|
||||||
g_return_val_if_fail (CLUTTER_IS_DEVICE_MANAGER (manager), NULL);
|
g_return_val_if_fail (CLUTTER_IS_DEVICE_MANAGER (manager), NULL);
|
||||||
|
|
||||||
return priv->backend;
|
return manager->priv->backend;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -607,25 +546,17 @@ _clutter_device_manager_compress_motion (ClutterDeviceManager *device_manager,
|
|||||||
manager_class->compress_motion (device_manager, event, to_discard);
|
manager_class->compress_motion (device_manager, event, to_discard);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
clutter_device_manager_ensure_a11y_state (ClutterDeviceManager *device_manager)
|
|
||||||
{
|
|
||||||
ClutterInputDevice *core_pointer;
|
|
||||||
|
|
||||||
core_pointer = clutter_device_manager_get_core_device (device_manager,
|
|
||||||
CLUTTER_POINTER_DEVICE);
|
|
||||||
if (core_pointer)
|
|
||||||
{
|
|
||||||
if (_clutter_is_input_pointer_a11y_enabled (core_pointer))
|
|
||||||
_clutter_input_pointer_a11y_add_device (core_pointer);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
are_kbd_a11y_settings_equal (ClutterKbdA11ySettings *a,
|
are_kbd_a11y_settings_equal (ClutterKbdA11ySettings *a,
|
||||||
ClutterKbdA11ySettings *b)
|
ClutterKbdA11ySettings *b)
|
||||||
{
|
{
|
||||||
return (memcmp (a, b, sizeof (ClutterKbdA11ySettings)) == 0);
|
return (a->controls == b->controls &&
|
||||||
|
a->slowkeys_delay == b->slowkeys_delay &&
|
||||||
|
a->debounce_delay == b->debounce_delay &&
|
||||||
|
a->timeout_delay == b->timeout_delay &&
|
||||||
|
a->mousekeys_init_delay == b->mousekeys_init_delay &&
|
||||||
|
a->mousekeys_max_speed == b->mousekeys_max_speed &&
|
||||||
|
a->mousekeys_accel_time == b->mousekeys_accel_time);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -633,14 +564,13 @@ clutter_device_manager_set_kbd_a11y_settings (ClutterDeviceManager *device_man
|
|||||||
ClutterKbdA11ySettings *settings)
|
ClutterKbdA11ySettings *settings)
|
||||||
{
|
{
|
||||||
ClutterDeviceManagerClass *manager_class;
|
ClutterDeviceManagerClass *manager_class;
|
||||||
ClutterDeviceManagerPrivate *priv = clutter_device_manager_get_instance_private (device_manager);
|
|
||||||
|
|
||||||
g_return_if_fail (CLUTTER_IS_DEVICE_MANAGER (device_manager));
|
g_return_if_fail (CLUTTER_IS_DEVICE_MANAGER (device_manager));
|
||||||
|
|
||||||
if (are_kbd_a11y_settings_equal (&priv->kbd_a11y_settings, settings))
|
if (are_kbd_a11y_settings_equal (&device_manager->priv->kbd_a11y_settings, settings))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
priv->kbd_a11y_settings = *settings;
|
device_manager->priv->kbd_a11y_settings = *settings;
|
||||||
|
|
||||||
manager_class = CLUTTER_DEVICE_MANAGER_GET_CLASS (device_manager);
|
manager_class = CLUTTER_DEVICE_MANAGER_GET_CLASS (device_manager);
|
||||||
if (manager_class->apply_kbd_a11y_settings)
|
if (manager_class->apply_kbd_a11y_settings)
|
||||||
@@ -651,103 +581,7 @@ void
|
|||||||
clutter_device_manager_get_kbd_a11y_settings (ClutterDeviceManager *device_manager,
|
clutter_device_manager_get_kbd_a11y_settings (ClutterDeviceManager *device_manager,
|
||||||
ClutterKbdA11ySettings *settings)
|
ClutterKbdA11ySettings *settings)
|
||||||
{
|
{
|
||||||
ClutterDeviceManagerPrivate *priv = clutter_device_manager_get_instance_private (device_manager);
|
|
||||||
|
|
||||||
g_return_if_fail (CLUTTER_IS_DEVICE_MANAGER (device_manager));
|
g_return_if_fail (CLUTTER_IS_DEVICE_MANAGER (device_manager));
|
||||||
|
|
||||||
*settings = priv->kbd_a11y_settings;
|
*settings = device_manager->priv->kbd_a11y_settings;
|
||||||
}
|
|
||||||
|
|
||||||
static gboolean
|
|
||||||
are_pointer_a11y_settings_equal (ClutterPointerA11ySettings *a,
|
|
||||||
ClutterPointerA11ySettings *b)
|
|
||||||
{
|
|
||||||
return (memcmp (a, b, sizeof (ClutterPointerA11ySettings)) == 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
clutter_device_manager_enable_pointer_a11y (ClutterDeviceManager *device_manager)
|
|
||||||
{
|
|
||||||
ClutterInputDevice *core_pointer;
|
|
||||||
|
|
||||||
core_pointer = clutter_device_manager_get_core_device (device_manager,
|
|
||||||
CLUTTER_POINTER_DEVICE);
|
|
||||||
|
|
||||||
_clutter_input_pointer_a11y_add_device (core_pointer);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
clutter_device_manager_disable_pointer_a11y (ClutterDeviceManager *device_manager)
|
|
||||||
{
|
|
||||||
ClutterInputDevice *core_pointer;
|
|
||||||
|
|
||||||
core_pointer = clutter_device_manager_get_core_device (device_manager,
|
|
||||||
CLUTTER_POINTER_DEVICE);
|
|
||||||
|
|
||||||
_clutter_input_pointer_a11y_remove_device (core_pointer);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* clutter_device_manager_set_pointer_a11y_settings:
|
|
||||||
* @device_manager: a #ClutterDeviceManager
|
|
||||||
* @settings: a pointer to a #ClutterPointerA11ySettings
|
|
||||||
*
|
|
||||||
* Sets the pointer accessibility settings
|
|
||||||
**/
|
|
||||||
void
|
|
||||||
clutter_device_manager_set_pointer_a11y_settings (ClutterDeviceManager *device_manager,
|
|
||||||
ClutterPointerA11ySettings *settings)
|
|
||||||
{
|
|
||||||
ClutterDeviceManagerPrivate *priv =
|
|
||||||
clutter_device_manager_get_instance_private (device_manager);
|
|
||||||
|
|
||||||
g_return_if_fail (CLUTTER_IS_DEVICE_MANAGER (device_manager));
|
|
||||||
|
|
||||||
if (are_pointer_a11y_settings_equal (&priv->pointer_a11y_settings, settings))
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (priv->pointer_a11y_settings.controls == 0 && settings->controls != 0)
|
|
||||||
clutter_device_manager_enable_pointer_a11y (device_manager);
|
|
||||||
else if (priv->pointer_a11y_settings.controls != 0 && settings->controls == 0)
|
|
||||||
clutter_device_manager_disable_pointer_a11y (device_manager);
|
|
||||||
|
|
||||||
priv->pointer_a11y_settings = *settings;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* clutter_device_manager_get_pointer_a11y_settings:
|
|
||||||
* @device_manager: a #ClutterDeviceManager
|
|
||||||
* @settings: a pointer to a #ClutterPointerA11ySettings
|
|
||||||
*
|
|
||||||
* Gets the current pointer accessibility settings
|
|
||||||
**/
|
|
||||||
void
|
|
||||||
clutter_device_manager_get_pointer_a11y_settings (ClutterDeviceManager *device_manager,
|
|
||||||
ClutterPointerA11ySettings *settings)
|
|
||||||
{
|
|
||||||
ClutterDeviceManagerPrivate *priv =
|
|
||||||
clutter_device_manager_get_instance_private (device_manager);
|
|
||||||
|
|
||||||
g_return_if_fail (CLUTTER_IS_DEVICE_MANAGER (device_manager));
|
|
||||||
|
|
||||||
*settings = priv->pointer_a11y_settings;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* clutter_device_manager_set_pointer_a11y_dwell_click_type:
|
|
||||||
* @device_manager: a #ClutterDeviceManager
|
|
||||||
* @click_type: type of click as #ClutterPointerA11yDwellClickType
|
|
||||||
*
|
|
||||||
* Sets the dwell click type
|
|
||||||
**/
|
|
||||||
void
|
|
||||||
clutter_device_manager_set_pointer_a11y_dwell_click_type (ClutterDeviceManager *device_manager,
|
|
||||||
ClutterPointerA11yDwellClickType click_type)
|
|
||||||
{
|
|
||||||
ClutterDeviceManagerPrivate *priv =
|
|
||||||
clutter_device_manager_get_instance_private (device_manager);
|
|
||||||
|
|
||||||
g_return_if_fail (CLUTTER_IS_DEVICE_MANAGER (device_manager));
|
|
||||||
|
|
||||||
priv->pointer_a11y_settings.dwell_click_type = click_type;
|
|
||||||
}
|
}
|
||||||
|
@@ -33,12 +33,16 @@
|
|||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define CLUTTER_TYPE_DEVICE_MANAGER (clutter_device_manager_get_type ())
|
#define CLUTTER_TYPE_DEVICE_MANAGER (clutter_device_manager_get_type ())
|
||||||
CLUTTER_EXPORT
|
#define CLUTTER_DEVICE_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_DEVICE_MANAGER, ClutterDeviceManager))
|
||||||
G_DECLARE_DERIVABLE_TYPE (ClutterDeviceManager, clutter_device_manager,
|
#define CLUTTER_IS_DEVICE_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_DEVICE_MANAGER))
|
||||||
CLUTTER, DEVICE_MANAGER, GObject)
|
#define CLUTTER_DEVICE_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_DEVICE_MANAGER, ClutterDeviceManagerClass))
|
||||||
|
#define CLUTTER_IS_DEVICE_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_DEVICE_MANAGER))
|
||||||
|
#define CLUTTER_DEVICE_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_DEVICE_MANAGER, ClutterDeviceManagerClass))
|
||||||
|
|
||||||
|
typedef struct _ClutterDeviceManager ClutterDeviceManager;
|
||||||
typedef struct _ClutterDeviceManagerPrivate ClutterDeviceManagerPrivate;
|
typedef struct _ClutterDeviceManagerPrivate ClutterDeviceManagerPrivate;
|
||||||
|
typedef struct _ClutterDeviceManagerClass ClutterDeviceManagerClass;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ClutterVirtualDeviceType:
|
* ClutterVirtualDeviceType:
|
||||||
@@ -70,25 +74,19 @@ typedef struct _ClutterKbdA11ySettings
|
|||||||
} ClutterKbdA11ySettings;
|
} ClutterKbdA11ySettings;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ClutterPointerA11ySettings:
|
* ClutterDeviceManager:
|
||||||
*
|
*
|
||||||
* The #ClutterPointerA11ySettings structure contains pointer accessibility
|
* The #ClutterDeviceManager structure contains only private data
|
||||||
* settings
|
|
||||||
*
|
*
|
||||||
|
* Since: 1.2
|
||||||
*/
|
*/
|
||||||
typedef struct _ClutterPointerA11ySettings
|
struct _ClutterDeviceManager
|
||||||
{
|
{
|
||||||
ClutterPointerA11yFlags controls;
|
/*< private >*/
|
||||||
ClutterPointerA11yDwellClickType dwell_click_type;
|
GObject parent_instance;
|
||||||
ClutterPointerA11yDwellMode dwell_mode;
|
|
||||||
ClutterPointerA11yDwellDirection dwell_gesture_single;
|
ClutterDeviceManagerPrivate *priv;
|
||||||
ClutterPointerA11yDwellDirection dwell_gesture_double;
|
};
|
||||||
ClutterPointerA11yDwellDirection dwell_gesture_drag;
|
|
||||||
ClutterPointerA11yDwellDirection dwell_gesture_secondary;
|
|
||||||
gint secondary_click_delay;
|
|
||||||
gint dwell_delay;
|
|
||||||
gint dwell_threshold;
|
|
||||||
} ClutterPointerA11ySettings;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ClutterDeviceManagerClass:
|
* ClutterDeviceManagerClass:
|
||||||
@@ -123,18 +121,13 @@ struct _ClutterDeviceManagerClass
|
|||||||
/* Keyboard accessbility */
|
/* Keyboard accessbility */
|
||||||
void (* apply_kbd_a11y_settings) (ClutterDeviceManager *device_manger,
|
void (* apply_kbd_a11y_settings) (ClutterDeviceManager *device_manger,
|
||||||
ClutterKbdA11ySettings *settings);
|
ClutterKbdA11ySettings *settings);
|
||||||
|
|
||||||
/* Event platform data */
|
|
||||||
void (* copy_event_data) (ClutterDeviceManager *device_manager,
|
|
||||||
const ClutterEvent *src,
|
|
||||||
ClutterEvent *dest);
|
|
||||||
void (* free_event_data) (ClutterDeviceManager *device_manager,
|
|
||||||
ClutterEvent *event);
|
|
||||||
|
|
||||||
/* padding */
|
/* padding */
|
||||||
gpointer _padding[4];
|
gpointer _padding[6];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
CLUTTER_EXPORT
|
||||||
|
GType clutter_device_manager_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
ClutterDeviceManager *clutter_device_manager_get_default (void);
|
ClutterDeviceManager *clutter_device_manager_get_default (void);
|
||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
@@ -159,23 +152,10 @@ ClutterVirtualDeviceType clutter_device_manager_get_supported_virtual_device_typ
|
|||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
void clutter_device_manager_set_kbd_a11y_settings (ClutterDeviceManager *device_manager,
|
void clutter_device_manager_set_kbd_a11y_settings (ClutterDeviceManager *device_manager,
|
||||||
ClutterKbdA11ySettings *settings);
|
ClutterKbdA11ySettings *settings);
|
||||||
|
|
||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
void clutter_device_manager_get_kbd_a11y_settings (ClutterDeviceManager *device_manager,
|
void clutter_device_manager_get_kbd_a11y_settings (ClutterDeviceManager *device_manager,
|
||||||
ClutterKbdA11ySettings *settings);
|
ClutterKbdA11ySettings *settings);
|
||||||
|
|
||||||
CLUTTER_EXPORT
|
|
||||||
void clutter_device_manager_set_pointer_a11y_settings (ClutterDeviceManager *device_manager,
|
|
||||||
ClutterPointerA11ySettings *settings);
|
|
||||||
|
|
||||||
CLUTTER_EXPORT
|
|
||||||
void clutter_device_manager_get_pointer_a11y_settings (ClutterDeviceManager *device_manager,
|
|
||||||
ClutterPointerA11ySettings *settings);
|
|
||||||
|
|
||||||
CLUTTER_EXPORT
|
|
||||||
void clutter_device_manager_set_pointer_a11y_dwell_click_type (ClutterDeviceManager *device_manager,
|
|
||||||
ClutterPointerA11yDwellClickType click_type);
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __CLUTTER_DEVICE_MANAGER_H__ */
|
#endif /* __CLUTTER_DEVICE_MANAGER_H__ */
|
||||||
|
@@ -81,7 +81,7 @@ struct _ClutterDragActionPrivate
|
|||||||
gint y_drag_threshold;
|
gint y_drag_threshold;
|
||||||
ClutterActor *drag_handle;
|
ClutterActor *drag_handle;
|
||||||
ClutterDragAxis drag_axis;
|
ClutterDragAxis drag_axis;
|
||||||
graphene_rect_t drag_area;
|
ClutterRect drag_area;
|
||||||
|
|
||||||
ClutterInputDevice *device;
|
ClutterInputDevice *device;
|
||||||
ClutterEventSequence *sequence;
|
ClutterEventSequence *sequence;
|
||||||
@@ -315,7 +315,11 @@ emit_drag_end (ClutterDragAction *action,
|
|||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
/* disconnect the capture */
|
/* disconnect the capture */
|
||||||
g_clear_signal_handler (&priv->capture_id, priv->stage);
|
if (priv->capture_id != 0)
|
||||||
|
{
|
||||||
|
g_signal_handler_disconnect (priv->stage, priv->capture_id);
|
||||||
|
priv->capture_id = 0;
|
||||||
|
}
|
||||||
|
|
||||||
clutter_stage_set_motion_events_enabled (priv->stage,
|
clutter_stage_set_motion_events_enabled (priv->stage,
|
||||||
priv->motion_events_enabled);
|
priv->motion_events_enabled);
|
||||||
@@ -474,8 +478,8 @@ clutter_drag_action_set_actor (ClutterActorMeta *meta,
|
|||||||
old_actor = clutter_actor_meta_get_actor (meta);
|
old_actor = clutter_actor_meta_get_actor (meta);
|
||||||
if (old_actor != NULL)
|
if (old_actor != NULL)
|
||||||
{
|
{
|
||||||
g_clear_signal_handler (&priv->button_press_id, old_actor);
|
g_signal_handler_disconnect (old_actor, priv->button_press_id);
|
||||||
g_clear_signal_handler (&priv->touch_begin_id, old_actor);
|
g_signal_handler_disconnect (old_actor, priv->touch_begin_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
priv->button_press_id = 0;
|
priv->button_press_id = 0;
|
||||||
@@ -485,7 +489,7 @@ clutter_drag_action_set_actor (ClutterActorMeta *meta,
|
|||||||
if (priv->capture_id != 0)
|
if (priv->capture_id != 0)
|
||||||
{
|
{
|
||||||
if (priv->stage != NULL)
|
if (priv->stage != NULL)
|
||||||
g_clear_signal_handler (&priv->capture_id, priv->stage);
|
g_signal_handler_disconnect (priv->stage, priv->capture_id);
|
||||||
|
|
||||||
priv->capture_id = 0;
|
priv->capture_id = 0;
|
||||||
priv->stage = NULL;
|
priv->stage = NULL;
|
||||||
@@ -538,7 +542,7 @@ clutter_drag_action_real_drag_motion (ClutterDragAction *action,
|
|||||||
|
|
||||||
if (action->priv->drag_area_set)
|
if (action->priv->drag_area_set)
|
||||||
{
|
{
|
||||||
graphene_rect_t *drag_area = &action->priv->drag_area;
|
ClutterRect *drag_area = &action->priv->drag_area;
|
||||||
|
|
||||||
x = CLAMP (x, drag_area->origin.x, drag_area->origin.x + drag_area->size.width);
|
x = CLAMP (x, drag_area->origin.x, drag_area->origin.x + drag_area->size.width);
|
||||||
y = CLAMP (y, drag_area->origin.y, drag_area->origin.y + drag_area->size.height);
|
y = CLAMP (y, drag_area->origin.y, drag_area->origin.y + drag_area->size.height);
|
||||||
@@ -664,7 +668,7 @@ clutter_drag_action_dispose (GObject *gobject)
|
|||||||
priv->motion_events_enabled);
|
priv->motion_events_enabled);
|
||||||
|
|
||||||
if (priv->stage != NULL)
|
if (priv->stage != NULL)
|
||||||
g_clear_signal_handler (&priv->capture_id, priv->stage);
|
g_signal_handler_disconnect (priv->stage, priv->capture_id);
|
||||||
|
|
||||||
priv->capture_id = 0;
|
priv->capture_id = 0;
|
||||||
priv->stage = NULL;
|
priv->stage = NULL;
|
||||||
@@ -677,8 +681,8 @@ clutter_drag_action_dispose (GObject *gobject)
|
|||||||
actor = clutter_actor_meta_get_actor (CLUTTER_ACTOR_META (gobject));
|
actor = clutter_actor_meta_get_actor (CLUTTER_ACTOR_META (gobject));
|
||||||
if (actor != NULL)
|
if (actor != NULL)
|
||||||
{
|
{
|
||||||
g_clear_signal_handler (&priv->button_press_id, actor);
|
g_signal_handler_disconnect (actor, priv->button_press_id);
|
||||||
g_clear_signal_handler (&priv->touch_begin_id, actor);
|
g_signal_handler_disconnect (actor, priv->touch_begin_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
priv->button_press_id = 0;
|
priv->button_press_id = 0;
|
||||||
@@ -807,7 +811,7 @@ clutter_drag_action_class_init (ClutterDragActionClass *klass)
|
|||||||
g_param_spec_boxed ("drag-area",
|
g_param_spec_boxed ("drag-area",
|
||||||
P_("Drag Area"),
|
P_("Drag Area"),
|
||||||
P_("Constrains the dragging to a rectangle"),
|
P_("Constrains the dragging to a rectangle"),
|
||||||
GRAPHENE_TYPE_RECT,
|
CLUTTER_TYPE_RECT,
|
||||||
CLUTTER_PARAM_READWRITE);
|
CLUTTER_PARAM_READWRITE);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1263,10 +1267,10 @@ clutter_drag_action_get_motion_coords (ClutterDragAction *action,
|
|||||||
/**
|
/**
|
||||||
* clutter_drag_action_get_drag_area:
|
* clutter_drag_action_get_drag_area:
|
||||||
* @action: a #ClutterDragAction
|
* @action: a #ClutterDragAction
|
||||||
* @drag_area: (out caller-allocates): a #graphene_rect_t to be filled
|
* @drag_area: (out caller-allocates): a #ClutterRect to be filled
|
||||||
*
|
*
|
||||||
* Retrieves the "drag area" associated with @action, that
|
* Retrieves the "drag area" associated with @action, that
|
||||||
* is a #graphene_rect_t that constrains the actor movements,
|
* is a #ClutterRect that constrains the actor movements,
|
||||||
* in parents coordinates.
|
* in parents coordinates.
|
||||||
*
|
*
|
||||||
* Returns: %TRUE if the actor is actually constrained (and thus
|
* Returns: %TRUE if the actor is actually constrained (and thus
|
||||||
@@ -1274,7 +1278,7 @@ clutter_drag_action_get_motion_coords (ClutterDragAction *action,
|
|||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
clutter_drag_action_get_drag_area (ClutterDragAction *action,
|
clutter_drag_action_get_drag_area (ClutterDragAction *action,
|
||||||
graphene_rect_t *drag_area)
|
ClutterRect *drag_area)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (CLUTTER_IS_DRAG_ACTION (action), FALSE);
|
g_return_val_if_fail (CLUTTER_IS_DRAG_ACTION (action), FALSE);
|
||||||
|
|
||||||
@@ -1294,8 +1298,8 @@ clutter_drag_action_get_drag_area (ClutterDragAction *action,
|
|||||||
* If @drag_area is %NULL, the actor is not constrained.
|
* If @drag_area is %NULL, the actor is not constrained.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
clutter_drag_action_set_drag_area (ClutterDragAction *action,
|
clutter_drag_action_set_drag_area (ClutterDragAction *action,
|
||||||
const graphene_rect_t *drag_area)
|
const ClutterRect *drag_area)
|
||||||
{
|
{
|
||||||
ClutterDragActionPrivate *priv;
|
ClutterDragActionPrivate *priv;
|
||||||
|
|
||||||
|
@@ -141,11 +141,11 @@ void clutter_drag_action_get_motion_coords (ClutterDragAction *actio
|
|||||||
|
|
||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
gboolean clutter_drag_action_get_drag_area (ClutterDragAction *action,
|
gboolean clutter_drag_action_get_drag_area (ClutterDragAction *action,
|
||||||
graphene_rect_t *drag_area);
|
ClutterRect *drag_area);
|
||||||
|
|
||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
void clutter_drag_action_set_drag_area (ClutterDragAction *action,
|
void clutter_drag_action_set_drag_area (ClutterDragAction *action,
|
||||||
const graphene_rect_t *drag_area);
|
const ClutterRect *drag_area);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
@@ -107,7 +107,7 @@ drop_target_free (gpointer _data)
|
|||||||
{
|
{
|
||||||
DropTarget *data = _data;
|
DropTarget *data = _data;
|
||||||
|
|
||||||
g_clear_signal_handler (&data->capture_id, data->stage);
|
g_signal_handler_disconnect (data->stage, data->capture_id);
|
||||||
g_hash_table_destroy (data->actions);
|
g_hash_table_destroy (data->actions);
|
||||||
g_free (data);
|
g_free (data);
|
||||||
}
|
}
|
||||||
@@ -326,10 +326,12 @@ clutter_drop_action_set_actor (ClutterActorMeta *meta,
|
|||||||
{
|
{
|
||||||
drop_action_unregister (CLUTTER_DROP_ACTION (meta));
|
drop_action_unregister (CLUTTER_DROP_ACTION (meta));
|
||||||
|
|
||||||
g_clear_signal_handler (&priv->mapped_id, priv->actor);
|
if (priv->mapped_id != 0)
|
||||||
|
g_signal_handler_disconnect (priv->actor, priv->mapped_id);
|
||||||
|
|
||||||
priv->stage = NULL;
|
priv->stage = NULL;
|
||||||
priv->actor = NULL;
|
priv->actor = NULL;
|
||||||
|
priv->mapped_id = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
priv->actor = actor;
|
priv->actor = actor;
|
||||||
@@ -426,7 +428,8 @@ clutter_drop_action_class_init (ClutterDropActionClass *klass)
|
|||||||
G_TYPE_FROM_CLASS (klass),
|
G_TYPE_FROM_CLASS (klass),
|
||||||
G_SIGNAL_RUN_LAST,
|
G_SIGNAL_RUN_LAST,
|
||||||
G_STRUCT_OFFSET (ClutterDropActionClass, over_in),
|
G_STRUCT_OFFSET (ClutterDropActionClass, over_in),
|
||||||
NULL, NULL, NULL,
|
NULL, NULL,
|
||||||
|
_clutter_marshal_VOID__OBJECT,
|
||||||
G_TYPE_NONE, 1,
|
G_TYPE_NONE, 1,
|
||||||
CLUTTER_TYPE_ACTOR);
|
CLUTTER_TYPE_ACTOR);
|
||||||
|
|
||||||
@@ -445,7 +448,8 @@ clutter_drop_action_class_init (ClutterDropActionClass *klass)
|
|||||||
G_TYPE_FROM_CLASS (klass),
|
G_TYPE_FROM_CLASS (klass),
|
||||||
G_SIGNAL_RUN_LAST,
|
G_SIGNAL_RUN_LAST,
|
||||||
G_STRUCT_OFFSET (ClutterDropActionClass, over_out),
|
G_STRUCT_OFFSET (ClutterDropActionClass, over_out),
|
||||||
NULL, NULL, NULL,
|
NULL, NULL,
|
||||||
|
_clutter_marshal_VOID__OBJECT,
|
||||||
G_TYPE_NONE, 1,
|
G_TYPE_NONE, 1,
|
||||||
CLUTTER_TYPE_ACTOR);
|
CLUTTER_TYPE_ACTOR);
|
||||||
|
|
||||||
|
@@ -5,18 +5,15 @@
|
|||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
gboolean _clutter_effect_pre_paint (ClutterEffect *effect,
|
gboolean _clutter_effect_pre_paint (ClutterEffect *effect);
|
||||||
ClutterPaintContext *paint_context);
|
void _clutter_effect_post_paint (ClutterEffect *effect);
|
||||||
void _clutter_effect_post_paint (ClutterEffect *effect,
|
gboolean _clutter_effect_get_paint_volume (ClutterEffect *effect,
|
||||||
ClutterPaintContext *paint_context);
|
|
||||||
gboolean _clutter_effect_modify_paint_volume (ClutterEffect *effect,
|
|
||||||
ClutterPaintVolume *volume);
|
ClutterPaintVolume *volume);
|
||||||
gboolean _clutter_effect_has_custom_paint_volume (ClutterEffect *effect);
|
gboolean _clutter_effect_has_custom_paint_volume (ClutterEffect *effect);
|
||||||
void _clutter_effect_paint (ClutterEffect *effect,
|
void _clutter_effect_paint (ClutterEffect *effect,
|
||||||
ClutterPaintContext *paint_context,
|
|
||||||
ClutterEffectPaintFlags flags);
|
ClutterEffectPaintFlags flags);
|
||||||
void _clutter_effect_pick (ClutterEffect *effect,
|
void _clutter_effect_pick (ClutterEffect *effect,
|
||||||
ClutterPickContext *pick_context);
|
ClutterEffectPaintFlags flags);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
@@ -100,13 +100,13 @@
|
|||||||
* // Clear the previous state //
|
* // Clear the previous state //
|
||||||
* if (self->rect_1)
|
* if (self->rect_1)
|
||||||
* {
|
* {
|
||||||
* cogl_object_unref (self->rect_1);
|
* cogl_handle_unref (self->rect_1);
|
||||||
* self->rect_1 = NULL;
|
* self->rect_1 = NULL;
|
||||||
* }
|
* }
|
||||||
*
|
*
|
||||||
* if (self->rect_2)
|
* if (self->rect_2)
|
||||||
* {
|
* {
|
||||||
* cogl_object_unref (self->rect_2);
|
* cogl_handle_unref (self->rect_2);
|
||||||
* self->rect_2 = NULL;
|
* self->rect_2 = NULL;
|
||||||
* }
|
* }
|
||||||
*
|
*
|
||||||
@@ -177,28 +177,25 @@ G_DEFINE_ABSTRACT_TYPE (ClutterEffect,
|
|||||||
CLUTTER_TYPE_ACTOR_META);
|
CLUTTER_TYPE_ACTOR_META);
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
clutter_effect_real_pre_paint (ClutterEffect *effect,
|
clutter_effect_real_pre_paint (ClutterEffect *effect)
|
||||||
ClutterPaintContext *paint_context)
|
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
clutter_effect_real_post_paint (ClutterEffect *effect,
|
clutter_effect_real_post_paint (ClutterEffect *effect)
|
||||||
ClutterPaintContext *paint_context)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
clutter_effect_real_modify_paint_volume (ClutterEffect *effect,
|
clutter_effect_real_get_paint_volume (ClutterEffect *effect,
|
||||||
ClutterPaintVolume *volume)
|
ClutterPaintVolume *volume)
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
clutter_effect_real_paint (ClutterEffect *effect,
|
clutter_effect_real_paint (ClutterEffect *effect,
|
||||||
ClutterPaintContext *paint_context,
|
|
||||||
ClutterEffectPaintFlags flags)
|
ClutterEffectPaintFlags flags)
|
||||||
{
|
{
|
||||||
ClutterActorMeta *actor_meta = CLUTTER_ACTOR_META (effect);
|
ClutterActorMeta *actor_meta = CLUTTER_ACTOR_META (effect);
|
||||||
@@ -209,24 +206,24 @@ clutter_effect_real_paint (ClutterEffect *effect,
|
|||||||
effects that haven't migrated to use the 'paint' virtual yet. This
|
effects that haven't migrated to use the 'paint' virtual yet. This
|
||||||
just calls the old pre and post virtuals before chaining on */
|
just calls the old pre and post virtuals before chaining on */
|
||||||
|
|
||||||
pre_paint_succeeded = _clutter_effect_pre_paint (effect, paint_context);
|
pre_paint_succeeded = _clutter_effect_pre_paint (effect);
|
||||||
|
|
||||||
actor = clutter_actor_meta_get_actor (actor_meta);
|
actor = clutter_actor_meta_get_actor (actor_meta);
|
||||||
clutter_actor_continue_paint (actor, paint_context);
|
clutter_actor_continue_paint (actor);
|
||||||
|
|
||||||
if (pre_paint_succeeded)
|
if (pre_paint_succeeded)
|
||||||
_clutter_effect_post_paint (effect, paint_context);
|
_clutter_effect_post_paint (effect);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
clutter_effect_real_pick (ClutterEffect *effect,
|
clutter_effect_real_pick (ClutterEffect *effect,
|
||||||
ClutterPickContext *pick_context)
|
ClutterEffectPaintFlags flags)
|
||||||
{
|
{
|
||||||
ClutterActorMeta *actor_meta = CLUTTER_ACTOR_META (effect);
|
ClutterActorMeta *actor_meta = CLUTTER_ACTOR_META (effect);
|
||||||
ClutterActor *actor;
|
ClutterActor *actor;
|
||||||
|
|
||||||
actor = clutter_actor_meta_get_actor (actor_meta);
|
actor = clutter_actor_meta_get_actor (actor_meta);
|
||||||
clutter_actor_continue_pick (actor, pick_context);
|
clutter_actor_continue_paint (actor);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -255,7 +252,7 @@ clutter_effect_class_init (ClutterEffectClass *klass)
|
|||||||
|
|
||||||
klass->pre_paint = clutter_effect_real_pre_paint;
|
klass->pre_paint = clutter_effect_real_pre_paint;
|
||||||
klass->post_paint = clutter_effect_real_post_paint;
|
klass->post_paint = clutter_effect_real_post_paint;
|
||||||
klass->modify_paint_volume = clutter_effect_real_modify_paint_volume;
|
klass->get_paint_volume = clutter_effect_real_get_paint_volume;
|
||||||
klass->paint = clutter_effect_real_paint;
|
klass->paint = clutter_effect_real_paint;
|
||||||
klass->pick = clutter_effect_real_pick;
|
klass->pick = clutter_effect_real_pick;
|
||||||
}
|
}
|
||||||
@@ -266,51 +263,47 @@ clutter_effect_init (ClutterEffect *self)
|
|||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
_clutter_effect_pre_paint (ClutterEffect *effect,
|
_clutter_effect_pre_paint (ClutterEffect *effect)
|
||||||
ClutterPaintContext *paint_context)
|
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (CLUTTER_IS_EFFECT (effect), FALSE);
|
g_return_val_if_fail (CLUTTER_IS_EFFECT (effect), FALSE);
|
||||||
|
|
||||||
return CLUTTER_EFFECT_GET_CLASS (effect)->pre_paint (effect, paint_context);
|
return CLUTTER_EFFECT_GET_CLASS (effect)->pre_paint (effect);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
_clutter_effect_post_paint (ClutterEffect *effect,
|
_clutter_effect_post_paint (ClutterEffect *effect)
|
||||||
ClutterPaintContext *paint_context)
|
|
||||||
{
|
{
|
||||||
g_return_if_fail (CLUTTER_IS_EFFECT (effect));
|
g_return_if_fail (CLUTTER_IS_EFFECT (effect));
|
||||||
|
|
||||||
CLUTTER_EFFECT_GET_CLASS (effect)->post_paint (effect, paint_context);
|
CLUTTER_EFFECT_GET_CLASS (effect)->post_paint (effect);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
_clutter_effect_paint (ClutterEffect *effect,
|
_clutter_effect_paint (ClutterEffect *effect,
|
||||||
ClutterPaintContext *paint_context,
|
|
||||||
ClutterEffectPaintFlags flags)
|
ClutterEffectPaintFlags flags)
|
||||||
{
|
{
|
||||||
g_return_if_fail (CLUTTER_IS_EFFECT (effect));
|
g_return_if_fail (CLUTTER_IS_EFFECT (effect));
|
||||||
|
|
||||||
CLUTTER_EFFECT_GET_CLASS (effect)->paint (effect, paint_context, flags);
|
CLUTTER_EFFECT_GET_CLASS (effect)->paint (effect, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
_clutter_effect_pick (ClutterEffect *effect,
|
_clutter_effect_pick (ClutterEffect *effect,
|
||||||
ClutterPickContext *pick_context)
|
ClutterEffectPaintFlags flags)
|
||||||
{
|
{
|
||||||
g_return_if_fail (CLUTTER_IS_EFFECT (effect));
|
g_return_if_fail (CLUTTER_IS_EFFECT (effect));
|
||||||
|
|
||||||
CLUTTER_EFFECT_GET_CLASS (effect)->pick (effect, pick_context);
|
CLUTTER_EFFECT_GET_CLASS (effect)->pick (effect, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
_clutter_effect_modify_paint_volume (ClutterEffect *effect,
|
_clutter_effect_get_paint_volume (ClutterEffect *effect,
|
||||||
ClutterPaintVolume *volume)
|
ClutterPaintVolume *volume)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (CLUTTER_IS_EFFECT (effect), FALSE);
|
g_return_val_if_fail (CLUTTER_IS_EFFECT (effect), FALSE);
|
||||||
g_return_val_if_fail (volume != NULL, FALSE);
|
g_return_val_if_fail (volume != NULL, FALSE);
|
||||||
|
|
||||||
return CLUTTER_EFFECT_GET_CLASS (effect)->modify_paint_volume (effect,
|
return CLUTTER_EFFECT_GET_CLASS (effect)->get_paint_volume (effect, volume);
|
||||||
volume);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
@@ -318,7 +311,7 @@ _clutter_effect_has_custom_paint_volume (ClutterEffect *effect)
|
|||||||
{
|
{
|
||||||
g_return_val_if_fail (CLUTTER_IS_EFFECT (effect), FALSE);
|
g_return_val_if_fail (CLUTTER_IS_EFFECT (effect), FALSE);
|
||||||
|
|
||||||
return CLUTTER_EFFECT_GET_CLASS (effect)->modify_paint_volume != clutter_effect_real_modify_paint_volume;
|
return CLUTTER_EFFECT_GET_CLASS (effect)->get_paint_volume != clutter_effect_real_get_paint_volume;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -30,8 +30,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <clutter/clutter-actor-meta.h>
|
#include <clutter/clutter-actor-meta.h>
|
||||||
#include <clutter/clutter-paint-context.h>
|
|
||||||
#include <clutter/clutter-pick-context.h>
|
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
@@ -62,7 +60,7 @@ struct _ClutterEffect
|
|||||||
* ClutterEffectClass:
|
* ClutterEffectClass:
|
||||||
* @pre_paint: virtual function
|
* @pre_paint: virtual function
|
||||||
* @post_paint: virtual function
|
* @post_paint: virtual function
|
||||||
* @modify_paint_volume: virtual function
|
* @get_paint_volume: virtual function
|
||||||
* @paint: virtual function
|
* @paint: virtual function
|
||||||
* @pick: virtual function
|
* @pick: virtual function
|
||||||
*
|
*
|
||||||
@@ -76,19 +74,16 @@ struct _ClutterEffectClass
|
|||||||
ClutterActorMetaClass parent_class;
|
ClutterActorMetaClass parent_class;
|
||||||
|
|
||||||
/*< public >*/
|
/*< public >*/
|
||||||
gboolean (* pre_paint) (ClutterEffect *effect,
|
gboolean (* pre_paint) (ClutterEffect *effect);
|
||||||
ClutterPaintContext *paint_context);
|
void (* post_paint) (ClutterEffect *effect);
|
||||||
void (* post_paint) (ClutterEffect *effect,
|
|
||||||
ClutterPaintContext *paint_context);
|
|
||||||
|
|
||||||
gboolean (* modify_paint_volume) (ClutterEffect *effect,
|
gboolean (* get_paint_volume) (ClutterEffect *effect,
|
||||||
ClutterPaintVolume *volume);
|
ClutterPaintVolume *volume);
|
||||||
|
|
||||||
void (* paint) (ClutterEffect *effect,
|
void (* paint) (ClutterEffect *effect,
|
||||||
ClutterPaintContext *paint_context,
|
ClutterEffectPaintFlags flags);
|
||||||
ClutterEffectPaintFlags flags);
|
void (* pick) (ClutterEffect *effect,
|
||||||
void (* pick) (ClutterEffect *effect,
|
ClutterEffectPaintFlags flags);
|
||||||
ClutterPickContext *pick_context);
|
|
||||||
|
|
||||||
/*< private >*/
|
/*< private >*/
|
||||||
void (* _clutter_effect4) (void);
|
void (* _clutter_effect4) (void);
|
||||||
|
@@ -13,7 +13,7 @@ G_BEGIN_DECLS
|
|||||||
/*** END file-header ***/
|
/*** END file-header ***/
|
||||||
|
|
||||||
/*** BEGIN file-production ***/
|
/*** BEGIN file-production ***/
|
||||||
/* enumerations from "@basename@" */
|
/* enumerations from "@filename@" */
|
||||||
/*** END file-production ***/
|
/*** END file-production ***/
|
||||||
|
|
||||||
/*** BEGIN value-header ***/
|
/*** BEGIN value-header ***/
|
||||||
|
@@ -51,8 +51,7 @@ G_BEGIN_DECLS
|
|||||||
*
|
*
|
||||||
* Deprecated: 1.22: Use the normalized #ClutterActor pivot point instead
|
* Deprecated: 1.22: Use the normalized #ClutterActor pivot point instead
|
||||||
*/
|
*/
|
||||||
typedef enum /*< prefix=CLUTTER_GRAVITY >*/
|
typedef enum { /*< prefix=CLUTTER_GRAVITY >*/
|
||||||
{
|
|
||||||
CLUTTER_GRAVITY_NONE = 0,
|
CLUTTER_GRAVITY_NONE = 0,
|
||||||
CLUTTER_GRAVITY_NORTH,
|
CLUTTER_GRAVITY_NORTH,
|
||||||
CLUTTER_GRAVITY_NORTH_EAST,
|
CLUTTER_GRAVITY_NORTH_EAST,
|
||||||
@@ -75,8 +74,7 @@ typedef enum /*< prefix=CLUTTER_GRAVITY >*/
|
|||||||
*
|
*
|
||||||
* Since: 0.4
|
* Since: 0.4
|
||||||
*/
|
*/
|
||||||
typedef enum /*< prefix=CLUTTER >*/
|
typedef enum { /*< prefix=CLUTTER >*/
|
||||||
{
|
|
||||||
CLUTTER_X_AXIS,
|
CLUTTER_X_AXIS,
|
||||||
CLUTTER_Y_AXIS,
|
CLUTTER_Y_AXIS,
|
||||||
CLUTTER_Z_AXIS
|
CLUTTER_Z_AXIS
|
||||||
@@ -93,8 +91,7 @@ typedef enum /*< prefix=CLUTTER >*/
|
|||||||
*
|
*
|
||||||
* Deprecated: 1.22
|
* Deprecated: 1.22
|
||||||
*/
|
*/
|
||||||
typedef enum /*< prefix=CLUTTER_ROTATE >*/
|
typedef enum { /*< prefix=CLUTTER_ROTATE >*/
|
||||||
{
|
|
||||||
CLUTTER_ROTATE_CW,
|
CLUTTER_ROTATE_CW,
|
||||||
CLUTTER_ROTATE_CCW
|
CLUTTER_ROTATE_CCW
|
||||||
} ClutterRotateDirection;
|
} ClutterRotateDirection;
|
||||||
@@ -110,8 +107,7 @@ typedef enum /*< prefix=CLUTTER_ROTATE >*/
|
|||||||
*
|
*
|
||||||
* Since: 0.8
|
* Since: 0.8
|
||||||
*/
|
*/
|
||||||
typedef enum /*< prefix=CLUTTER_REQUEST >*/
|
typedef enum { /*< prefix=CLUTTER_REQUEST >*/
|
||||||
{
|
|
||||||
CLUTTER_REQUEST_HEIGHT_FOR_WIDTH,
|
CLUTTER_REQUEST_HEIGHT_FOR_WIDTH,
|
||||||
CLUTTER_REQUEST_WIDTH_FOR_HEIGHT,
|
CLUTTER_REQUEST_WIDTH_FOR_HEIGHT,
|
||||||
CLUTTER_REQUEST_CONTENT_SIZE
|
CLUTTER_REQUEST_CONTENT_SIZE
|
||||||
@@ -204,8 +200,7 @@ typedef enum /*< prefix=CLUTTER_REQUEST >*/
|
|||||||
*
|
*
|
||||||
* Since: 1.0
|
* Since: 1.0
|
||||||
*/
|
*/
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
CLUTTER_CUSTOM_MODE = 0,
|
CLUTTER_CUSTOM_MODE = 0,
|
||||||
|
|
||||||
/* linear */
|
/* linear */
|
||||||
@@ -277,6 +272,23 @@ typedef enum
|
|||||||
CLUTTER_ANIMATION_LAST
|
CLUTTER_ANIMATION_LAST
|
||||||
} ClutterAnimationMode;
|
} ClutterAnimationMode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ClutterFontFlags:
|
||||||
|
* @CLUTTER_FONT_MIPMAPPING: Set to use mipmaps for the glyph cache textures.
|
||||||
|
* @CLUTTER_FONT_HINTING: Set to enable hinting on the glyphs.
|
||||||
|
*
|
||||||
|
* Runtime flags to change the font quality. To be used with
|
||||||
|
* clutter_set_font_flags().
|
||||||
|
*
|
||||||
|
* Since: 1.0
|
||||||
|
*
|
||||||
|
* Deprecated: 1.22: Use #cairo_font_options_t instead
|
||||||
|
*/
|
||||||
|
typedef enum { /*< prefix=CLUTTER_FONT >*/
|
||||||
|
CLUTTER_FONT_MIPMAPPING = (1 << 0),
|
||||||
|
CLUTTER_FONT_HINTING = (1 << 1)
|
||||||
|
} ClutterFontFlags;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ClutterTextDirection:
|
* ClutterTextDirection:
|
||||||
* @CLUTTER_TEXT_DIRECTION_DEFAULT: Use the default setting, as returned
|
* @CLUTTER_TEXT_DIRECTION_DEFAULT: Use the default setting, as returned
|
||||||
@@ -288,8 +300,7 @@ typedef enum
|
|||||||
*
|
*
|
||||||
* Since: 1.2
|
* Since: 1.2
|
||||||
*/
|
*/
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
CLUTTER_TEXT_DIRECTION_DEFAULT,
|
CLUTTER_TEXT_DIRECTION_DEFAULT,
|
||||||
CLUTTER_TEXT_DIRECTION_LTR,
|
CLUTTER_TEXT_DIRECTION_LTR,
|
||||||
CLUTTER_TEXT_DIRECTION_RTL
|
CLUTTER_TEXT_DIRECTION_RTL
|
||||||
@@ -304,8 +315,7 @@ typedef enum
|
|||||||
*
|
*
|
||||||
* Since: 1.4
|
* Since: 1.4
|
||||||
*/
|
*/
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
CLUTTER_VERTEX_SHADER,
|
CLUTTER_VERTEX_SHADER,
|
||||||
CLUTTER_FRAGMENT_SHADER
|
CLUTTER_FRAGMENT_SHADER
|
||||||
} ClutterShaderType;
|
} ClutterShaderType;
|
||||||
@@ -340,8 +350,7 @@ typedef enum
|
|||||||
*
|
*
|
||||||
* Since: 0.4
|
* Since: 0.4
|
||||||
*/
|
*/
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
CLUTTER_SHIFT_MASK = 1 << 0,
|
CLUTTER_SHIFT_MASK = 1 << 0,
|
||||||
CLUTTER_LOCK_MASK = 1 << 1,
|
CLUTTER_LOCK_MASK = 1 << 1,
|
||||||
CLUTTER_CONTROL_MASK = 1 << 2,
|
CLUTTER_CONTROL_MASK = 1 << 2,
|
||||||
@@ -407,8 +416,7 @@ typedef enum
|
|||||||
* Keyboard accessibility features applied to a ClutterInputDevice keyboard.
|
* Keyboard accessibility features applied to a ClutterInputDevice keyboard.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
CLUTTER_A11Y_KEYBOARD_ENABLED = 1 << 0,
|
CLUTTER_A11Y_KEYBOARD_ENABLED = 1 << 0,
|
||||||
CLUTTER_A11Y_TIMEOUT_ENABLED = 1 << 1,
|
CLUTTER_A11Y_TIMEOUT_ENABLED = 1 << 1,
|
||||||
CLUTTER_A11Y_MOUSE_KEYS_ENABLED = 1 << 2,
|
CLUTTER_A11Y_MOUSE_KEYS_ENABLED = 1 << 2,
|
||||||
@@ -425,88 +433,6 @@ typedef enum
|
|||||||
CLUTTER_A11Y_FEATURE_STATE_CHANGE_BEEP = 1 << 13,
|
CLUTTER_A11Y_FEATURE_STATE_CHANGE_BEEP = 1 << 13,
|
||||||
} ClutterKeyboardA11yFlags;
|
} ClutterKeyboardA11yFlags;
|
||||||
|
|
||||||
/**
|
|
||||||
* ClutterPointerA11yFlags:
|
|
||||||
* @CLUTTER_A11Y_POINTER_ENABLED:
|
|
||||||
* @CLUTTER_A11Y_SECONDARY_CLICK_ENABLED:
|
|
||||||
* @CLUTTER_A11Y_DWELL_ENABLED:
|
|
||||||
*
|
|
||||||
* Pointer accessibility features applied to a ClutterInputDevice pointer.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
typedef enum {
|
|
||||||
CLUTTER_A11Y_SECONDARY_CLICK_ENABLED = 1 << 0,
|
|
||||||
CLUTTER_A11Y_DWELL_ENABLED = 1 << 1,
|
|
||||||
} ClutterPointerA11yFlags;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ClutterPointerA11yDwellClickType:
|
|
||||||
* @CLUTTER_A11Y_DWELL_CLICK_TYPE_NONE: Internal use only
|
|
||||||
* @CLUTTER_A11Y_DWELL_CLICK_TYPE_PRIMARY:
|
|
||||||
* @CLUTTER_A11Y_DWELL_CLICK_TYPE_SECONDARY:
|
|
||||||
* @CLUTTER_A11Y_DWELL_CLICK_TYPE_MIDDLE:
|
|
||||||
* @CLUTTER_A11Y_DWELL_CLICK_TYPE_DOUBLE:
|
|
||||||
* @CLUTTER_A11Y_DWELL_CLICK_TYPE_DRAG:
|
|
||||||
*
|
|
||||||
* Dwell click types.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
typedef enum {
|
|
||||||
CLUTTER_A11Y_DWELL_CLICK_TYPE_NONE,
|
|
||||||
CLUTTER_A11Y_DWELL_CLICK_TYPE_PRIMARY,
|
|
||||||
CLUTTER_A11Y_DWELL_CLICK_TYPE_SECONDARY,
|
|
||||||
CLUTTER_A11Y_DWELL_CLICK_TYPE_MIDDLE,
|
|
||||||
CLUTTER_A11Y_DWELL_CLICK_TYPE_DOUBLE,
|
|
||||||
CLUTTER_A11Y_DWELL_CLICK_TYPE_DRAG,
|
|
||||||
} ClutterPointerA11yDwellClickType;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ClutterPointerA11yDwellDirection:
|
|
||||||
* @CLUTTER_A11Y_DWELL_DIRECTION_NONE:
|
|
||||||
* @CLUTTER_A11Y_DWELL_DIRECTION_LEFT:
|
|
||||||
* @CLUTTER_A11Y_DWELL_DIRECTION_RIGHT:
|
|
||||||
* @CLUTTER_A11Y_DWELL_DIRECTION_UP:
|
|
||||||
* @CLUTTER_A11Y_DWELL_DIRECTION_DOWN:
|
|
||||||
*
|
|
||||||
* Dwell gesture directions.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
typedef enum {
|
|
||||||
CLUTTER_A11Y_DWELL_DIRECTION_NONE,
|
|
||||||
CLUTTER_A11Y_DWELL_DIRECTION_LEFT,
|
|
||||||
CLUTTER_A11Y_DWELL_DIRECTION_RIGHT,
|
|
||||||
CLUTTER_A11Y_DWELL_DIRECTION_UP,
|
|
||||||
CLUTTER_A11Y_DWELL_DIRECTION_DOWN,
|
|
||||||
} ClutterPointerA11yDwellDirection;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ClutterPointerA11yDwellMode:
|
|
||||||
* @CLUTTER_A11Y_DWELL_MODE_WINDOW:
|
|
||||||
* @CLUTTER_A11Y_DWELL_MODE_GESTURE:
|
|
||||||
*
|
|
||||||
* Dwell mode.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
typedef enum {
|
|
||||||
CLUTTER_A11Y_DWELL_MODE_WINDOW,
|
|
||||||
CLUTTER_A11Y_DWELL_MODE_GESTURE,
|
|
||||||
} ClutterPointerA11yDwellMode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ClutterPointerA11yTimeoutType:
|
|
||||||
* @CLUTTER_A11Y_TIMEOUT_TYPE_SECONDARY_CLICK:
|
|
||||||
* @CLUTTER_A11Y_TIMEOUT_TYPE_DWELL:
|
|
||||||
* @CLUTTER_A11Y_TIMEOUT_TYPE_GESTURE:
|
|
||||||
*
|
|
||||||
* Pointer accessibility timeout type.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
typedef enum {
|
|
||||||
CLUTTER_A11Y_TIMEOUT_TYPE_SECONDARY_CLICK,
|
|
||||||
CLUTTER_A11Y_TIMEOUT_TYPE_DWELL,
|
|
||||||
CLUTTER_A11Y_TIMEOUT_TYPE_GESTURE,
|
|
||||||
} ClutterPointerA11yTimeoutType;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ClutterActorFlags:
|
* ClutterActorFlags:
|
||||||
* @CLUTTER_ACTOR_MAPPED: the actor will be painted (is visible, and inside
|
* @CLUTTER_ACTOR_MAPPED: the actor will be painted (is visible, and inside
|
||||||
@@ -522,8 +448,7 @@ typedef enum {
|
|||||||
*
|
*
|
||||||
* Flags used to signal the state of an actor.
|
* Flags used to signal the state of an actor.
|
||||||
*/
|
*/
|
||||||
typedef enum /*< prefix=CLUTTER_ACTOR >*/
|
typedef enum { /*< prefix=CLUTTER_ACTOR >*/
|
||||||
{
|
|
||||||
CLUTTER_ACTOR_MAPPED = 1 << 1,
|
CLUTTER_ACTOR_MAPPED = 1 << 1,
|
||||||
CLUTTER_ACTOR_REALIZED = 1 << 2,
|
CLUTTER_ACTOR_REALIZED = 1 << 2,
|
||||||
CLUTTER_ACTOR_REACTIVE = 1 << 3,
|
CLUTTER_ACTOR_REACTIVE = 1 << 3,
|
||||||
@@ -543,8 +468,7 @@ typedef enum /*< prefix=CLUTTER_ACTOR >*/
|
|||||||
*
|
*
|
||||||
* Since: 1.8
|
* Since: 1.8
|
||||||
*/
|
*/
|
||||||
typedef enum /*< prefix=CLUTTER_OFFSCREEN_REDIRECT >*/
|
typedef enum { /*< prefix=CLUTTER_OFFSCREEN_REDIRECT >*/
|
||||||
{
|
|
||||||
CLUTTER_OFFSCREEN_REDIRECT_AUTOMATIC_FOR_OPACITY = 1<<0,
|
CLUTTER_OFFSCREEN_REDIRECT_AUTOMATIC_FOR_OPACITY = 1<<0,
|
||||||
CLUTTER_OFFSCREEN_REDIRECT_ALWAYS = 1<<1
|
CLUTTER_OFFSCREEN_REDIRECT_ALWAYS = 1<<1
|
||||||
} ClutterOffscreenRedirect;
|
} ClutterOffscreenRedirect;
|
||||||
@@ -568,8 +492,7 @@ typedef enum /*< prefix=CLUTTER_OFFSCREEN_REDIRECT >*/
|
|||||||
*
|
*
|
||||||
* Since: 1.0
|
* Since: 1.0
|
||||||
*/
|
*/
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
CLUTTER_ALLOCATION_NONE = 0,
|
CLUTTER_ALLOCATION_NONE = 0,
|
||||||
CLUTTER_ABSOLUTE_ORIGIN_CHANGED = 1 << 1,
|
CLUTTER_ABSOLUTE_ORIGIN_CHANGED = 1 << 1,
|
||||||
CLUTTER_DELEGATE_LAYOUT = 1 << 2
|
CLUTTER_DELEGATE_LAYOUT = 1 << 2
|
||||||
@@ -586,8 +509,7 @@ typedef enum
|
|||||||
*
|
*
|
||||||
* Since: 1.4
|
* Since: 1.4
|
||||||
*/
|
*/
|
||||||
typedef enum /*< prefix=CLUTTER_ALIGN >*/
|
typedef enum { /*< prefix=CLUTTER_ALIGN >*/
|
||||||
{
|
|
||||||
CLUTTER_ALIGN_X_AXIS,
|
CLUTTER_ALIGN_X_AXIS,
|
||||||
CLUTTER_ALIGN_Y_AXIS,
|
CLUTTER_ALIGN_Y_AXIS,
|
||||||
CLUTTER_ALIGN_BOTH
|
CLUTTER_ALIGN_BOTH
|
||||||
@@ -604,8 +526,7 @@ typedef enum /*< prefix=CLUTTER_ALIGN >*/
|
|||||||
*
|
*
|
||||||
* Deprecated: 1.22
|
* Deprecated: 1.22
|
||||||
*/
|
*/
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
CLUTTER_INTERPOLATION_LINEAR,
|
CLUTTER_INTERPOLATION_LINEAR,
|
||||||
CLUTTER_INTERPOLATION_CUBIC
|
CLUTTER_INTERPOLATION_CUBIC
|
||||||
} ClutterInterpolation;
|
} ClutterInterpolation;
|
||||||
@@ -630,8 +551,7 @@ typedef enum
|
|||||||
* Deprecated: 1.12: Use #ClutterActorAlign and the #ClutterActor
|
* Deprecated: 1.12: Use #ClutterActorAlign and the #ClutterActor
|
||||||
* API instead
|
* API instead
|
||||||
*/
|
*/
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
CLUTTER_BIN_ALIGNMENT_FIXED,
|
CLUTTER_BIN_ALIGNMENT_FIXED,
|
||||||
CLUTTER_BIN_ALIGNMENT_FILL,
|
CLUTTER_BIN_ALIGNMENT_FILL,
|
||||||
CLUTTER_BIN_ALIGNMENT_START,
|
CLUTTER_BIN_ALIGNMENT_START,
|
||||||
@@ -656,8 +576,7 @@ typedef enum
|
|||||||
*
|
*
|
||||||
* Since: 1.4
|
* Since: 1.4
|
||||||
*/
|
*/
|
||||||
typedef enum /*< prefix=CLUTTER_BIND >*/
|
typedef enum { /*< prefix=CLUTTER_BIND >*/
|
||||||
{
|
|
||||||
CLUTTER_BIND_X,
|
CLUTTER_BIND_X,
|
||||||
CLUTTER_BIND_Y,
|
CLUTTER_BIND_Y,
|
||||||
CLUTTER_BIND_WIDTH,
|
CLUTTER_BIND_WIDTH,
|
||||||
@@ -676,8 +595,7 @@ typedef enum /*< prefix=CLUTTER_BIND >*/
|
|||||||
*
|
*
|
||||||
* Flags passed to the ‘paint’ or ‘pick’ method of #ClutterEffect.
|
* Flags passed to the ‘paint’ or ‘pick’ method of #ClutterEffect.
|
||||||
*/
|
*/
|
||||||
typedef enum /*< prefix=CLUTTER_EFFECT_PAINT >*/
|
typedef enum { /*< prefix=CLUTTER_EFFECT_PAINT >*/
|
||||||
{
|
|
||||||
CLUTTER_EFFECT_PAINT_ACTOR_DIRTY = (1 << 0)
|
CLUTTER_EFFECT_PAINT_ACTOR_DIRTY = (1 << 0)
|
||||||
} ClutterEffectPaintFlags;
|
} ClutterEffectPaintFlags;
|
||||||
|
|
||||||
@@ -693,8 +611,7 @@ typedef enum /*< prefix=CLUTTER_EFFECT_PAINT >*/
|
|||||||
*
|
*
|
||||||
* Since: 1.2
|
* Since: 1.2
|
||||||
*/
|
*/
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
CLUTTER_BOX_ALIGNMENT_START,
|
CLUTTER_BOX_ALIGNMENT_START,
|
||||||
CLUTTER_BOX_ALIGNMENT_END,
|
CLUTTER_BOX_ALIGNMENT_END,
|
||||||
CLUTTER_BOX_ALIGNMENT_CENTER
|
CLUTTER_BOX_ALIGNMENT_CENTER
|
||||||
@@ -711,8 +628,7 @@ typedef enum
|
|||||||
*
|
*
|
||||||
* Since: 1.8
|
* Since: 1.8
|
||||||
*/
|
*/
|
||||||
typedef enum /*< prefix=CLUTTER_LONG_PRESS >*/
|
typedef enum { /*< prefix=CLUTTER_LONG_PRESS >*/
|
||||||
{
|
|
||||||
CLUTTER_LONG_PRESS_QUERY,
|
CLUTTER_LONG_PRESS_QUERY,
|
||||||
CLUTTER_LONG_PRESS_ACTIVATE,
|
CLUTTER_LONG_PRESS_ACTIVATE,
|
||||||
CLUTTER_LONG_PRESS_CANCEL
|
CLUTTER_LONG_PRESS_CANCEL
|
||||||
@@ -770,8 +686,7 @@ typedef enum /*< prefix=CLUTTER_LONG_PRESS >*/
|
|||||||
*
|
*
|
||||||
* Since: 1.6
|
* Since: 1.6
|
||||||
*/
|
*/
|
||||||
typedef enum /*< prefix=CLUTTER_COLOR >*/
|
typedef enum { /*< prefix=CLUTTER_COLOR >*/
|
||||||
{
|
|
||||||
/* CGA/EGA-like palette */
|
/* CGA/EGA-like palette */
|
||||||
CLUTTER_COLOR_WHITE = 0,
|
CLUTTER_COLOR_WHITE = 0,
|
||||||
CLUTTER_COLOR_BLACK,
|
CLUTTER_COLOR_BLACK,
|
||||||
@@ -835,8 +750,7 @@ typedef enum /*< prefix=CLUTTER_COLOR >*/
|
|||||||
*
|
*
|
||||||
* Since: 1.4
|
* Since: 1.4
|
||||||
*/
|
*/
|
||||||
typedef enum /*< prefix=CLUTTER_DRAG >*/
|
typedef enum { /*< prefix=CLUTTER_DRAG >*/
|
||||||
{
|
|
||||||
CLUTTER_DRAG_AXIS_NONE = 0,
|
CLUTTER_DRAG_AXIS_NONE = 0,
|
||||||
|
|
||||||
CLUTTER_DRAG_X_AXIS,
|
CLUTTER_DRAG_X_AXIS,
|
||||||
@@ -853,8 +767,7 @@ typedef enum /*< prefix=CLUTTER_DRAG >*/
|
|||||||
*
|
*
|
||||||
* Since: 0.6
|
* Since: 0.6
|
||||||
*/
|
*/
|
||||||
typedef enum /*< flags prefix=CLUTTER_EVENT >*/
|
typedef enum { /*< flags prefix=CLUTTER_EVENT >*/
|
||||||
{
|
|
||||||
CLUTTER_EVENT_NONE = 0,
|
CLUTTER_EVENT_NONE = 0,
|
||||||
CLUTTER_EVENT_FLAG_SYNTHETIC = 1 << 0,
|
CLUTTER_EVENT_FLAG_SYNTHETIC = 1 << 0,
|
||||||
CLUTTER_EVENT_FLAG_INPUT_METHOD = 1 << 1,
|
CLUTTER_EVENT_FLAG_INPUT_METHOD = 1 << 1,
|
||||||
@@ -899,8 +812,7 @@ typedef enum /*< flags prefix=CLUTTER_EVENT >*/
|
|||||||
*
|
*
|
||||||
* Since: 0.4
|
* Since: 0.4
|
||||||
*/
|
*/
|
||||||
typedef enum /*< prefix=CLUTTER >*/
|
typedef enum { /*< prefix=CLUTTER >*/
|
||||||
{
|
|
||||||
CLUTTER_NOTHING = 0,
|
CLUTTER_NOTHING = 0,
|
||||||
CLUTTER_KEY_PRESS,
|
CLUTTER_KEY_PRESS,
|
||||||
CLUTTER_KEY_RELEASE,
|
CLUTTER_KEY_RELEASE,
|
||||||
@@ -945,8 +857,7 @@ typedef enum /*< prefix=CLUTTER >*/
|
|||||||
*
|
*
|
||||||
* Since: 0.4
|
* Since: 0.4
|
||||||
*/
|
*/
|
||||||
typedef enum /*< prefix=CLUTTER_SCROLL >*/
|
typedef enum { /*< prefix=CLUTTER_SCROLL >*/
|
||||||
{
|
|
||||||
CLUTTER_SCROLL_UP,
|
CLUTTER_SCROLL_UP,
|
||||||
CLUTTER_SCROLL_DOWN,
|
CLUTTER_SCROLL_DOWN,
|
||||||
CLUTTER_SCROLL_LEFT,
|
CLUTTER_SCROLL_LEFT,
|
||||||
@@ -956,21 +867,28 @@ typedef enum /*< prefix=CLUTTER_SCROLL >*/
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* ClutterStageState:
|
* ClutterStageState:
|
||||||
|
* @CLUTTER_STAGE_STATE_FULLSCREEN: Fullscreen mask
|
||||||
|
* @CLUTTER_STAGE_STATE_OFFSCREEN: Offscreen mask (deprecated)
|
||||||
* @CLUTTER_STAGE_STATE_ACTIVATED: Activated mask
|
* @CLUTTER_STAGE_STATE_ACTIVATED: Activated mask
|
||||||
*
|
*
|
||||||
* Stage state masks, used by the #ClutterEvent of type %CLUTTER_STAGE_STATE.
|
* Stage state masks, used by the #ClutterEvent of type %CLUTTER_STAGE_STATE.
|
||||||
*
|
*
|
||||||
* Since: 0.4
|
* Since: 0.4
|
||||||
*/
|
*/
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
CLUTTER_STAGE_STATE_FULLSCREEN = (1 << 1),
|
||||||
|
CLUTTER_STAGE_STATE_OFFSCREEN = (1 << 2),
|
||||||
CLUTTER_STAGE_STATE_ACTIVATED = (1 << 3)
|
CLUTTER_STAGE_STATE_ACTIVATED = (1 << 3)
|
||||||
} ClutterStageState;
|
} ClutterStageState;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ClutterFeatureFlags:
|
* ClutterFeatureFlags:
|
||||||
* @CLUTTER_FEATURE_SWAP_THROTTLE: Set if backend throttles buffer swaps.
|
* @CLUTTER_FEATURE_TEXTURE_NPOT: Set if NPOTS textures supported.
|
||||||
|
* @CLUTTER_FEATURE_SYNC_TO_VBLANK: Set if vblank syncing supported.
|
||||||
|
* @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)
|
* @CLUTTER_FEATURE_STAGE_STATIC: Set if stage size if fixed (i.e framebuffer)
|
||||||
|
* @CLUTTER_FEATURE_STAGE_USER_RESIZE: Set if stage is able to be user resized.
|
||||||
* @CLUTTER_FEATURE_STAGE_CURSOR: Set if stage has a graphical cursor.
|
* @CLUTTER_FEATURE_STAGE_CURSOR: Set if stage has a graphical cursor.
|
||||||
* @CLUTTER_FEATURE_SHADERS_GLSL: Set if the backend supports GLSL shaders.
|
* @CLUTTER_FEATURE_SHADERS_GLSL: Set if the backend supports GLSL shaders.
|
||||||
* @CLUTTER_FEATURE_OFFSCREEN: Set if the backend supports offscreen rendering.
|
* @CLUTTER_FEATURE_OFFSCREEN: Set if the backend supports offscreen rendering.
|
||||||
@@ -984,8 +902,12 @@ typedef enum
|
|||||||
*/
|
*/
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
CLUTTER_FEATURE_SWAP_THROTTLE = (1 << 3),
|
CLUTTER_FEATURE_TEXTURE_NPOT = (1 << 2),
|
||||||
|
CLUTTER_FEATURE_SYNC_TO_VBLANK = (1 << 3),
|
||||||
|
CLUTTER_FEATURE_TEXTURE_YUV = (1 << 4),
|
||||||
|
CLUTTER_FEATURE_TEXTURE_READ_PIXELS = (1 << 5),
|
||||||
CLUTTER_FEATURE_STAGE_STATIC = (1 << 6),
|
CLUTTER_FEATURE_STAGE_STATIC = (1 << 6),
|
||||||
|
CLUTTER_FEATURE_STAGE_USER_RESIZE = (1 << 7),
|
||||||
CLUTTER_FEATURE_STAGE_CURSOR = (1 << 8),
|
CLUTTER_FEATURE_STAGE_CURSOR = (1 << 8),
|
||||||
CLUTTER_FEATURE_SHADERS_GLSL = (1 << 9),
|
CLUTTER_FEATURE_SHADERS_GLSL = (1 << 9),
|
||||||
CLUTTER_FEATURE_OFFSCREEN = (1 << 10),
|
CLUTTER_FEATURE_OFFSCREEN = (1 << 10),
|
||||||
@@ -1005,8 +927,7 @@ typedef enum
|
|||||||
*
|
*
|
||||||
* Since: 1.2
|
* Since: 1.2
|
||||||
*/
|
*/
|
||||||
typedef enum /*< prefix=CLUTTER_FLOW >*/
|
typedef enum { /*< prefix=CLUTTER_FLOW >*/
|
||||||
{
|
|
||||||
CLUTTER_FLOW_HORIZONTAL,
|
CLUTTER_FLOW_HORIZONTAL,
|
||||||
CLUTTER_FLOW_VERTICAL
|
CLUTTER_FLOW_VERTICAL
|
||||||
} ClutterFlowOrientation;
|
} ClutterFlowOrientation;
|
||||||
@@ -1033,8 +954,7 @@ typedef enum /*< prefix=CLUTTER_FLOW >*/
|
|||||||
*
|
*
|
||||||
* Since: 1.0
|
* Since: 1.0
|
||||||
*/
|
*/
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
CLUTTER_POINTER_DEVICE,
|
CLUTTER_POINTER_DEVICE,
|
||||||
CLUTTER_KEYBOARD_DEVICE,
|
CLUTTER_KEYBOARD_DEVICE,
|
||||||
CLUTTER_EXTENSION_DEVICE,
|
CLUTTER_EXTENSION_DEVICE,
|
||||||
@@ -1062,8 +982,7 @@ typedef enum
|
|||||||
*
|
*
|
||||||
* Since: 1.6
|
* Since: 1.6
|
||||||
*/
|
*/
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
CLUTTER_INPUT_MODE_MASTER,
|
CLUTTER_INPUT_MODE_MASTER,
|
||||||
CLUTTER_INPUT_MODE_SLAVE,
|
CLUTTER_INPUT_MODE_SLAVE,
|
||||||
CLUTTER_INPUT_MODE_FLOATING
|
CLUTTER_INPUT_MODE_FLOATING
|
||||||
@@ -1088,8 +1007,7 @@ typedef enum
|
|||||||
*
|
*
|
||||||
* Since: 1.6
|
* Since: 1.6
|
||||||
*/
|
*/
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
CLUTTER_INPUT_AXIS_IGNORE,
|
CLUTTER_INPUT_AXIS_IGNORE,
|
||||||
|
|
||||||
CLUTTER_INPUT_AXIS_X,
|
CLUTTER_INPUT_AXIS_X,
|
||||||
@@ -1116,8 +1034,7 @@ typedef enum
|
|||||||
*
|
*
|
||||||
* Since: 1.6
|
* Since: 1.6
|
||||||
*/
|
*/
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
CLUTTER_SNAP_EDGE_TOP,
|
CLUTTER_SNAP_EDGE_TOP,
|
||||||
CLUTTER_SNAP_EDGE_RIGHT,
|
CLUTTER_SNAP_EDGE_RIGHT,
|
||||||
CLUTTER_SNAP_EDGE_BOTTOM,
|
CLUTTER_SNAP_EDGE_BOTTOM,
|
||||||
@@ -1134,8 +1051,7 @@ typedef enum
|
|||||||
*
|
*
|
||||||
* Since: 1.0
|
* Since: 1.0
|
||||||
*/
|
*/
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
CLUTTER_PICK_NONE = 0,
|
CLUTTER_PICK_NONE = 0,
|
||||||
CLUTTER_PICK_REACTIVE,
|
CLUTTER_PICK_REACTIVE,
|
||||||
CLUTTER_PICK_ALL
|
CLUTTER_PICK_ALL
|
||||||
@@ -1152,8 +1068,7 @@ typedef enum
|
|||||||
*
|
*
|
||||||
* Since: 1.8
|
* Since: 1.8
|
||||||
*/
|
*/
|
||||||
typedef enum /*< prefix=CLUTTER_SWIPE_DIRECTION >*/
|
typedef enum { /*< prefix=CLUTTER_SWIPE_DIRECTION >*/
|
||||||
{
|
|
||||||
CLUTTER_SWIPE_DIRECTION_UP = 1 << 0,
|
CLUTTER_SWIPE_DIRECTION_UP = 1 << 0,
|
||||||
CLUTTER_SWIPE_DIRECTION_DOWN = 1 << 1,
|
CLUTTER_SWIPE_DIRECTION_DOWN = 1 << 1,
|
||||||
CLUTTER_SWIPE_DIRECTION_LEFT = 1 << 2,
|
CLUTTER_SWIPE_DIRECTION_LEFT = 1 << 2,
|
||||||
@@ -1173,8 +1088,7 @@ typedef enum /*< prefix=CLUTTER_SWIPE_DIRECTION >*/
|
|||||||
*
|
*
|
||||||
* Since: 1.12
|
* Since: 1.12
|
||||||
*/
|
*/
|
||||||
typedef enum /*< prefix=CLUTTER_PAN >*/
|
typedef enum { /*< prefix=CLUTTER_PAN >*/
|
||||||
{
|
|
||||||
CLUTTER_PAN_AXIS_NONE = 0,
|
CLUTTER_PAN_AXIS_NONE = 0,
|
||||||
|
|
||||||
CLUTTER_PAN_X_AXIS,
|
CLUTTER_PAN_X_AXIS,
|
||||||
@@ -1183,6 +1097,28 @@ typedef enum /*< prefix=CLUTTER_PAN >*/
|
|||||||
CLUTTER_PAN_AXIS_AUTO
|
CLUTTER_PAN_AXIS_AUTO
|
||||||
} ClutterPanAxis;
|
} ClutterPanAxis;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ClutterTableAlignment:
|
||||||
|
* @CLUTTER_TABLE_ALIGNMENT_START: Align the child to the top or to the
|
||||||
|
* left of a cell in the table, depending on the axis
|
||||||
|
* @CLUTTER_TABLE_ALIGNMENT_CENTER: Align the child to the center of
|
||||||
|
* a cell in the table
|
||||||
|
* @CLUTTER_TABLE_ALIGNMENT_END: Align the child to the bottom or to the
|
||||||
|
* right of a cell in the table, depending on the axis
|
||||||
|
*
|
||||||
|
* The alignment policies available on each axis of the #ClutterTableLayout
|
||||||
|
*
|
||||||
|
* Since: 1.4
|
||||||
|
*
|
||||||
|
* Deprecated: 1.22: Use the alignment properties of #ClutterActor
|
||||||
|
*/
|
||||||
|
typedef enum {
|
||||||
|
CLUTTER_TABLE_ALIGNMENT_START,
|
||||||
|
CLUTTER_TABLE_ALIGNMENT_CENTER,
|
||||||
|
CLUTTER_TABLE_ALIGNMENT_END
|
||||||
|
} ClutterTableAlignment;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ClutterTextureFlags:
|
* ClutterTextureFlags:
|
||||||
* @CLUTTER_TEXTURE_NONE: No flags
|
* @CLUTTER_TEXTURE_NONE: No flags
|
||||||
@@ -1190,15 +1126,15 @@ typedef enum /*< prefix=CLUTTER_PAN >*/
|
|||||||
* @CLUTTER_TEXTURE_RGB_FLAG_PREMULT: Unused flag
|
* @CLUTTER_TEXTURE_RGB_FLAG_PREMULT: Unused flag
|
||||||
* @CLUTTER_TEXTURE_YUV_FLAG_YUV2: Unused flag
|
* @CLUTTER_TEXTURE_YUV_FLAG_YUV2: Unused flag
|
||||||
*
|
*
|
||||||
* Flags for clutter_texture_set_from_rgb_data().
|
* Flags for clutter_texture_set_from_rgb_data() and
|
||||||
|
* clutter_texture_set_from_yuv_data().
|
||||||
*
|
*
|
||||||
* Since: 0.4
|
* Since: 0.4
|
||||||
*
|
*
|
||||||
* Deprecated: 1.22: The #ClutterTexture class was the only user of
|
* Deprecated: 1.22: The #ClutterTexture class was the only user of
|
||||||
* this API
|
* this API
|
||||||
*/
|
*/
|
||||||
typedef enum /*< prefix=CLUTTER_TEXTURE >*/
|
typedef enum { /*< prefix=CLUTTER_TEXTURE >*/
|
||||||
{
|
|
||||||
CLUTTER_TEXTURE_NONE = 0,
|
CLUTTER_TEXTURE_NONE = 0,
|
||||||
CLUTTER_TEXTURE_RGB_FLAG_BGR = 1 << 1,
|
CLUTTER_TEXTURE_RGB_FLAG_BGR = 1 << 1,
|
||||||
CLUTTER_TEXTURE_RGB_FLAG_PREMULT = 1 << 2, /* FIXME: not handled */
|
CLUTTER_TEXTURE_RGB_FLAG_PREMULT = 1 << 2, /* FIXME: not handled */
|
||||||
@@ -1222,8 +1158,7 @@ typedef enum /*< prefix=CLUTTER_TEXTURE >*/
|
|||||||
* this API; use #ClutterImage and clutter_actor_set_content_scaling_filters()
|
* this API; use #ClutterImage and clutter_actor_set_content_scaling_filters()
|
||||||
* instead.
|
* instead.
|
||||||
*/
|
*/
|
||||||
typedef enum /*< prefix=CLUTTER_TEXTURE_QUALITY >*/
|
typedef enum { /*< prefix=CLUTTER_TEXTURE_QUALITY >*/
|
||||||
{
|
|
||||||
CLUTTER_TEXTURE_QUALITY_LOW,
|
CLUTTER_TEXTURE_QUALITY_LOW,
|
||||||
CLUTTER_TEXTURE_QUALITY_MEDIUM,
|
CLUTTER_TEXTURE_QUALITY_MEDIUM,
|
||||||
CLUTTER_TEXTURE_QUALITY_HIGH
|
CLUTTER_TEXTURE_QUALITY_HIGH
|
||||||
@@ -1238,8 +1173,7 @@ typedef enum /*< prefix=CLUTTER_TEXTURE_QUALITY >*/
|
|||||||
*
|
*
|
||||||
* Since: 0.6
|
* Since: 0.6
|
||||||
*/
|
*/
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
CLUTTER_TIMELINE_FORWARD,
|
CLUTTER_TIMELINE_FORWARD,
|
||||||
CLUTTER_TIMELINE_BACKWARD
|
CLUTTER_TIMELINE_BACKWARD
|
||||||
} ClutterTimelineDirection;
|
} ClutterTimelineDirection;
|
||||||
@@ -1258,8 +1192,7 @@ typedef enum
|
|||||||
*
|
*
|
||||||
* Since: 1.0
|
* Since: 1.0
|
||||||
*/
|
*/
|
||||||
typedef enum /*< prefix=CLUTTER_UNIT >*/
|
typedef enum { /*< prefix=CLUTTER_UNIT >*/
|
||||||
{
|
|
||||||
CLUTTER_UNIT_PIXEL,
|
CLUTTER_UNIT_PIXEL,
|
||||||
CLUTTER_UNIT_EM,
|
CLUTTER_UNIT_EM,
|
||||||
CLUTTER_UNIT_MM,
|
CLUTTER_UNIT_MM,
|
||||||
@@ -1289,8 +1222,7 @@ typedef enum /*< prefix=CLUTTER_UNIT >*/
|
|||||||
*
|
*
|
||||||
* Since: 1.0
|
* Since: 1.0
|
||||||
*/
|
*/
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
CLUTTER_PATH_MOVE_TO = 0,
|
CLUTTER_PATH_MOVE_TO = 0,
|
||||||
CLUTTER_PATH_LINE_TO = 1,
|
CLUTTER_PATH_LINE_TO = 1,
|
||||||
CLUTTER_PATH_CURVE_TO = 2,
|
CLUTTER_PATH_CURVE_TO = 2,
|
||||||
@@ -1321,8 +1253,7 @@ typedef enum
|
|||||||
*
|
*
|
||||||
* Since: 1.10
|
* Since: 1.10
|
||||||
*/
|
*/
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
CLUTTER_ACTOR_ALIGN_FILL,
|
CLUTTER_ACTOR_ALIGN_FILL,
|
||||||
CLUTTER_ACTOR_ALIGN_START,
|
CLUTTER_ACTOR_ALIGN_START,
|
||||||
CLUTTER_ACTOR_ALIGN_CENTER,
|
CLUTTER_ACTOR_ALIGN_CENTER,
|
||||||
@@ -1342,8 +1273,7 @@ typedef enum
|
|||||||
*
|
*
|
||||||
* Since: 1.10
|
* Since: 1.10
|
||||||
*/
|
*/
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
CLUTTER_REPAINT_FLAGS_PRE_PAINT = 1 << 0,
|
CLUTTER_REPAINT_FLAGS_PRE_PAINT = 1 << 0,
|
||||||
CLUTTER_REPAINT_FLAGS_POST_PAINT = 1 << 1,
|
CLUTTER_REPAINT_FLAGS_POST_PAINT = 1 << 1,
|
||||||
CLUTTER_REPAINT_FLAGS_QUEUE_REDRAW_ON_ADD = 1 << 2
|
CLUTTER_REPAINT_FLAGS_QUEUE_REDRAW_ON_ADD = 1 << 2
|
||||||
@@ -1368,8 +1298,7 @@ typedef enum
|
|||||||
*
|
*
|
||||||
* Since: 1.10
|
* Since: 1.10
|
||||||
*/
|
*/
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
CLUTTER_CONTENT_GRAVITY_TOP_LEFT,
|
CLUTTER_CONTENT_GRAVITY_TOP_LEFT,
|
||||||
CLUTTER_CONTENT_GRAVITY_TOP,
|
CLUTTER_CONTENT_GRAVITY_TOP,
|
||||||
CLUTTER_CONTENT_GRAVITY_TOP_RIGHT,
|
CLUTTER_CONTENT_GRAVITY_TOP_RIGHT,
|
||||||
@@ -1399,8 +1328,7 @@ typedef enum
|
|||||||
*
|
*
|
||||||
* Since: 1.10
|
* Since: 1.10
|
||||||
*/
|
*/
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
CLUTTER_SCALING_FILTER_LINEAR,
|
CLUTTER_SCALING_FILTER_LINEAR,
|
||||||
CLUTTER_SCALING_FILTER_NEAREST,
|
CLUTTER_SCALING_FILTER_NEAREST,
|
||||||
CLUTTER_SCALING_FILTER_TRILINEAR
|
CLUTTER_SCALING_FILTER_TRILINEAR
|
||||||
@@ -1415,8 +1343,7 @@ typedef enum
|
|||||||
*
|
*
|
||||||
* Since: 1.12
|
* Since: 1.12
|
||||||
*/
|
*/
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
CLUTTER_ORIENTATION_HORIZONTAL,
|
CLUTTER_ORIENTATION_HORIZONTAL,
|
||||||
CLUTTER_ORIENTATION_VERTICAL
|
CLUTTER_ORIENTATION_VERTICAL
|
||||||
} ClutterOrientation;
|
} ClutterOrientation;
|
||||||
@@ -1432,8 +1359,7 @@ typedef enum
|
|||||||
*
|
*
|
||||||
* Since: 1.12
|
* Since: 1.12
|
||||||
*/
|
*/
|
||||||
typedef enum /*< prefix=CLUTTER_SCROLL >*/
|
typedef enum { /*< prefix=CLUTTER_SCROLL >*/
|
||||||
{
|
|
||||||
CLUTTER_SCROLL_NONE = 0,
|
CLUTTER_SCROLL_NONE = 0,
|
||||||
|
|
||||||
CLUTTER_SCROLL_HORIZONTALLY = 1 << 0,
|
CLUTTER_SCROLL_HORIZONTALLY = 1 << 0,
|
||||||
@@ -1453,8 +1379,7 @@ typedef enum /*< prefix=CLUTTER_SCROLL >*/
|
|||||||
*
|
*
|
||||||
* Since: 1.12
|
* Since: 1.12
|
||||||
*/
|
*/
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
CLUTTER_GRID_POSITION_LEFT,
|
CLUTTER_GRID_POSITION_LEFT,
|
||||||
CLUTTER_GRID_POSITION_RIGHT,
|
CLUTTER_GRID_POSITION_RIGHT,
|
||||||
CLUTTER_GRID_POSITION_TOP,
|
CLUTTER_GRID_POSITION_TOP,
|
||||||
@@ -1472,8 +1397,7 @@ typedef enum
|
|||||||
*
|
*
|
||||||
* Since: 1.12
|
* Since: 1.12
|
||||||
*/
|
*/
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
CLUTTER_REPEAT_NONE = 0,
|
CLUTTER_REPEAT_NONE = 0,
|
||||||
CLUTTER_REPEAT_X_AXIS = 1 << 0,
|
CLUTTER_REPEAT_X_AXIS = 1 << 0,
|
||||||
CLUTTER_REPEAT_Y_AXIS = 1 << 1,
|
CLUTTER_REPEAT_Y_AXIS = 1 << 1,
|
||||||
@@ -1495,8 +1419,7 @@ typedef enum
|
|||||||
*
|
*
|
||||||
* Since: 1.12
|
* Since: 1.12
|
||||||
*/
|
*/
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
CLUTTER_STEP_MODE_START,
|
CLUTTER_STEP_MODE_START,
|
||||||
CLUTTER_STEP_MODE_END
|
CLUTTER_STEP_MODE_END
|
||||||
} ClutterStepMode;
|
} ClutterStepMode;
|
||||||
@@ -1512,8 +1435,7 @@ typedef enum
|
|||||||
*
|
*
|
||||||
* Since: 1.12
|
* Since: 1.12
|
||||||
*/
|
*/
|
||||||
typedef enum /*< prefix=CLUTTER_ZOOM >*/
|
typedef enum { /*< prefix=CLUTTER_ZOOM >*/
|
||||||
{
|
|
||||||
CLUTTER_ZOOM_X_AXIS,
|
CLUTTER_ZOOM_X_AXIS,
|
||||||
CLUTTER_ZOOM_Y_AXIS,
|
CLUTTER_ZOOM_Y_AXIS,
|
||||||
CLUTTER_ZOOM_BOTH
|
CLUTTER_ZOOM_BOTH
|
||||||
@@ -1536,8 +1458,7 @@ typedef enum /*< prefix=CLUTTER_ZOOM >*/
|
|||||||
*
|
*
|
||||||
* Since: 1.18
|
* Since: 1.18
|
||||||
*/
|
*/
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
CLUTTER_GESTURE_TRIGGER_EDGE_NONE = 0,
|
CLUTTER_GESTURE_TRIGGER_EDGE_NONE = 0,
|
||||||
CLUTTER_GESTURE_TRIGGER_EDGE_AFTER,
|
CLUTTER_GESTURE_TRIGGER_EDGE_AFTER,
|
||||||
CLUTTER_GESTURE_TRIGGER_EDGE_BEFORE
|
CLUTTER_GESTURE_TRIGGER_EDGE_BEFORE
|
||||||
@@ -1573,8 +1494,7 @@ typedef enum
|
|||||||
*
|
*
|
||||||
* Since: 1.24
|
* Since: 1.24
|
||||||
*/
|
*/
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
CLUTTER_TOUCHPAD_GESTURE_PHASE_BEGIN,
|
CLUTTER_TOUCHPAD_GESTURE_PHASE_BEGIN,
|
||||||
CLUTTER_TOUCHPAD_GESTURE_PHASE_UPDATE,
|
CLUTTER_TOUCHPAD_GESTURE_PHASE_UPDATE,
|
||||||
CLUTTER_TOUCHPAD_GESTURE_PHASE_END,
|
CLUTTER_TOUCHPAD_GESTURE_PHASE_END,
|
||||||
@@ -1596,8 +1516,7 @@ typedef enum
|
|||||||
*
|
*
|
||||||
* Since: 1.26
|
* Since: 1.26
|
||||||
*/
|
*/
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
CLUTTER_SCROLL_SOURCE_UNKNOWN,
|
CLUTTER_SCROLL_SOURCE_UNKNOWN,
|
||||||
CLUTTER_SCROLL_SOURCE_WHEEL,
|
CLUTTER_SCROLL_SOURCE_WHEEL,
|
||||||
CLUTTER_SCROLL_SOURCE_FINGER,
|
CLUTTER_SCROLL_SOURCE_FINGER,
|
||||||
@@ -1615,8 +1534,7 @@ typedef enum
|
|||||||
*
|
*
|
||||||
* Since: 1.26
|
* Since: 1.26
|
||||||
*/
|
*/
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
CLUTTER_SCROLL_FINISHED_NONE = 0,
|
CLUTTER_SCROLL_FINISHED_NONE = 0,
|
||||||
CLUTTER_SCROLL_FINISHED_HORIZONTAL = 1 << 0,
|
CLUTTER_SCROLL_FINISHED_HORIZONTAL = 1 << 0,
|
||||||
CLUTTER_SCROLL_FINISHED_VERTICAL = 1 << 1
|
CLUTTER_SCROLL_FINISHED_VERTICAL = 1 << 1
|
||||||
@@ -1637,8 +1555,7 @@ typedef enum
|
|||||||
*
|
*
|
||||||
* Since: 1.28
|
* Since: 1.28
|
||||||
*/
|
*/
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
CLUTTER_INPUT_DEVICE_TOOL_NONE,
|
CLUTTER_INPUT_DEVICE_TOOL_NONE,
|
||||||
CLUTTER_INPUT_DEVICE_TOOL_PEN,
|
CLUTTER_INPUT_DEVICE_TOOL_PEN,
|
||||||
CLUTTER_INPUT_DEVICE_TOOL_ERASER,
|
CLUTTER_INPUT_DEVICE_TOOL_ERASER,
|
||||||
@@ -1649,20 +1566,17 @@ typedef enum
|
|||||||
CLUTTER_INPUT_DEVICE_TOOL_LENS
|
CLUTTER_INPUT_DEVICE_TOOL_LENS
|
||||||
} ClutterInputDeviceToolType;
|
} ClutterInputDeviceToolType;
|
||||||
|
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
CLUTTER_INPUT_DEVICE_PAD_SOURCE_UNKNOWN,
|
CLUTTER_INPUT_DEVICE_PAD_SOURCE_UNKNOWN,
|
||||||
CLUTTER_INPUT_DEVICE_PAD_SOURCE_FINGER,
|
CLUTTER_INPUT_DEVICE_PAD_SOURCE_FINGER,
|
||||||
} ClutterInputDevicePadSource;
|
} ClutterInputDevicePadSource;
|
||||||
|
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
CLUTTER_INPUT_DEVICE_MAPPING_ABSOLUTE,
|
CLUTTER_INPUT_DEVICE_MAPPING_ABSOLUTE,
|
||||||
CLUTTER_INPUT_DEVICE_MAPPING_RELATIVE,
|
CLUTTER_INPUT_DEVICE_MAPPING_RELATIVE,
|
||||||
} ClutterInputDeviceMapping;
|
} ClutterInputDeviceMapping;
|
||||||
|
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
CLUTTER_INPUT_CONTENT_HINT_COMPLETION = 1 << 0,
|
CLUTTER_INPUT_CONTENT_HINT_COMPLETION = 1 << 0,
|
||||||
CLUTTER_INPUT_CONTENT_HINT_SPELLCHECK = 1 << 1,
|
CLUTTER_INPUT_CONTENT_HINT_SPELLCHECK = 1 << 1,
|
||||||
CLUTTER_INPUT_CONTENT_HINT_AUTO_CAPITALIZATION = 1 << 2,
|
CLUTTER_INPUT_CONTENT_HINT_AUTO_CAPITALIZATION = 1 << 2,
|
||||||
@@ -1675,8 +1589,7 @@ typedef enum
|
|||||||
CLUTTER_INPUT_CONTENT_HINT_MULTILINE = 1 << 9,
|
CLUTTER_INPUT_CONTENT_HINT_MULTILINE = 1 << 9,
|
||||||
} ClutterInputContentHintFlags;
|
} ClutterInputContentHintFlags;
|
||||||
|
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
CLUTTER_INPUT_CONTENT_PURPOSE_NORMAL,
|
CLUTTER_INPUT_CONTENT_PURPOSE_NORMAL,
|
||||||
CLUTTER_INPUT_CONTENT_PURPOSE_ALPHA,
|
CLUTTER_INPUT_CONTENT_PURPOSE_ALPHA,
|
||||||
CLUTTER_INPUT_CONTENT_PURPOSE_DIGITS,
|
CLUTTER_INPUT_CONTENT_PURPOSE_DIGITS,
|
||||||
@@ -1692,8 +1605,7 @@ typedef enum
|
|||||||
CLUTTER_INPUT_CONTENT_PURPOSE_TERMINAL,
|
CLUTTER_INPUT_CONTENT_PURPOSE_TERMINAL,
|
||||||
} ClutterInputContentPurpose;
|
} ClutterInputContentPurpose;
|
||||||
|
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
CLUTTER_INPUT_PANEL_STATE_OFF,
|
CLUTTER_INPUT_PANEL_STATE_OFF,
|
||||||
CLUTTER_INPUT_PANEL_STATE_ON,
|
CLUTTER_INPUT_PANEL_STATE_ON,
|
||||||
CLUTTER_INPUT_PANEL_STATE_TOGGLE,
|
CLUTTER_INPUT_PANEL_STATE_TOGGLE,
|
||||||
|
@@ -5,28 +5,22 @@
|
|||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
CLUTTER_EXPORT
|
|
||||||
void _clutter_event_set_pointer_emulated (ClutterEvent *event,
|
void _clutter_event_set_pointer_emulated (ClutterEvent *event,
|
||||||
gboolean is_emulated);
|
gboolean is_emulated);
|
||||||
|
|
||||||
/* Reinjecting queued events for processing */
|
/* Reinjecting queued events for processing */
|
||||||
CLUTTER_EXPORT
|
|
||||||
void _clutter_process_event (ClutterEvent *event);
|
void _clutter_process_event (ClutterEvent *event);
|
||||||
|
|
||||||
CLUTTER_EXPORT
|
|
||||||
gboolean _clutter_event_process_filters (ClutterEvent *event);
|
gboolean _clutter_event_process_filters (ClutterEvent *event);
|
||||||
|
|
||||||
/* clears the event queue inside the main context */
|
/* clears the event queue inside the main context */
|
||||||
void _clutter_clear_events_queue (void);
|
void _clutter_clear_events_queue (void);
|
||||||
void _clutter_clear_events_queue_for_stage (ClutterStage *stage);
|
void _clutter_clear_events_queue_for_stage (ClutterStage *stage);
|
||||||
|
|
||||||
CLUTTER_EXPORT
|
|
||||||
void _clutter_event_set_platform_data (ClutterEvent *event,
|
void _clutter_event_set_platform_data (ClutterEvent *event,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
CLUTTER_EXPORT
|
|
||||||
gpointer _clutter_event_get_platform_data (const ClutterEvent *event);
|
gpointer _clutter_event_get_platform_data (const ClutterEvent *event);
|
||||||
|
|
||||||
CLUTTER_EXPORT
|
|
||||||
void _clutter_event_set_state_full (ClutterEvent *event,
|
void _clutter_event_set_state_full (ClutterEvent *event,
|
||||||
ClutterModifierType button_state,
|
ClutterModifierType button_state,
|
||||||
ClutterModifierType base_state,
|
ClutterModifierType base_state,
|
||||||
@@ -34,7 +28,6 @@ void _clutter_event_set_state_full (ClutterEvent *ev
|
|||||||
ClutterModifierType locked_state,
|
ClutterModifierType locked_state,
|
||||||
ClutterModifierType effective_state);
|
ClutterModifierType effective_state);
|
||||||
|
|
||||||
CLUTTER_EXPORT
|
|
||||||
void _clutter_event_push (const ClutterEvent *event,
|
void _clutter_event_push (const ClutterEvent *event,
|
||||||
gboolean do_copy);
|
gboolean do_copy);
|
||||||
|
|
||||||
|
38
clutter/clutter/clutter-event-translator.c
Normal file
38
clutter/clutter/clutter-event-translator.c
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
#include "clutter-build-config.h"
|
||||||
|
|
||||||
|
#include "clutter-event-translator.h"
|
||||||
|
|
||||||
|
#include "clutter-backend.h"
|
||||||
|
#include "clutter-private.h"
|
||||||
|
|
||||||
|
#define clutter_event_translator_get_type _clutter_event_translator_get_type
|
||||||
|
|
||||||
|
typedef ClutterEventTranslatorIface ClutterEventTranslatorInterface;
|
||||||
|
|
||||||
|
G_DEFINE_INTERFACE (ClutterEventTranslator, clutter_event_translator, G_TYPE_OBJECT);
|
||||||
|
|
||||||
|
static ClutterTranslateReturn
|
||||||
|
default_translate_event (ClutterEventTranslator *translator,
|
||||||
|
gpointer native,
|
||||||
|
ClutterEvent *event)
|
||||||
|
{
|
||||||
|
return CLUTTER_TRANSLATE_CONTINUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
clutter_event_translator_default_init (ClutterEventTranslatorIface *iface)
|
||||||
|
{
|
||||||
|
iface->translate_event = default_translate_event;
|
||||||
|
}
|
||||||
|
|
||||||
|
ClutterTranslateReturn
|
||||||
|
_clutter_event_translator_translate_event (ClutterEventTranslator *translator,
|
||||||
|
gpointer native,
|
||||||
|
ClutterEvent *translated)
|
||||||
|
{
|
||||||
|
ClutterEventTranslatorIface *iface;
|
||||||
|
|
||||||
|
iface = CLUTTER_EVENT_TRANSLATOR_GET_IFACE (translator);
|
||||||
|
|
||||||
|
return iface->translate_event (translator, native, translated);
|
||||||
|
}
|
41
clutter/clutter/clutter-event-translator.h
Normal file
41
clutter/clutter/clutter-event-translator.h
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
#ifndef __CLUTTER_EVENT_TRANSLATOR_H__
|
||||||
|
#define __CLUTTER_EVENT_TRANSLATOR_H__
|
||||||
|
|
||||||
|
#include <glib-object.h>
|
||||||
|
#include <clutter/clutter-event.h>
|
||||||
|
|
||||||
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
#define CLUTTER_TYPE_EVENT_TRANSLATOR (_clutter_event_translator_get_type ())
|
||||||
|
#define CLUTTER_EVENT_TRANSLATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_EVENT_TRANSLATOR, ClutterEventTranslator))
|
||||||
|
#define CLUTTER_IS_EVENT_TRANSLATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_EVENT_TRANSLATOR))
|
||||||
|
#define CLUTTER_EVENT_TRANSLATOR_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), CLUTTER_TYPE_EVENT_TRANSLATOR, ClutterEventTranslatorIface))
|
||||||
|
|
||||||
|
typedef struct _ClutterEventTranslator ClutterEventTranslator;
|
||||||
|
typedef struct _ClutterEventTranslatorIface ClutterEventTranslatorIface;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
CLUTTER_TRANSLATE_CONTINUE,
|
||||||
|
CLUTTER_TRANSLATE_REMOVE,
|
||||||
|
CLUTTER_TRANSLATE_QUEUE
|
||||||
|
} ClutterTranslateReturn;
|
||||||
|
|
||||||
|
struct _ClutterEventTranslatorIface
|
||||||
|
{
|
||||||
|
GTypeInterface g_iface;
|
||||||
|
|
||||||
|
ClutterTranslateReturn (* translate_event) (ClutterEventTranslator *translator,
|
||||||
|
gpointer native,
|
||||||
|
ClutterEvent *translated);
|
||||||
|
};
|
||||||
|
|
||||||
|
CLUTTER_EXPORT
|
||||||
|
GType _clutter_event_translator_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
|
ClutterTranslateReturn _clutter_event_translator_translate_event (ClutterEventTranslator *translator,
|
||||||
|
gpointer native,
|
||||||
|
ClutterEvent *translated);
|
||||||
|
|
||||||
|
G_END_DECLS
|
||||||
|
|
||||||
|
#endif /* __CLUTTER_EVENT_TRANSLATOR_H__ */
|
@@ -370,7 +370,7 @@ clutter_event_get_coords (const ClutterEvent *event,
|
|||||||
gfloat *x,
|
gfloat *x,
|
||||||
gfloat *y)
|
gfloat *y)
|
||||||
{
|
{
|
||||||
graphene_point_t coords;
|
ClutterPoint coords;
|
||||||
|
|
||||||
g_return_if_fail (event != NULL);
|
g_return_if_fail (event != NULL);
|
||||||
|
|
||||||
@@ -386,15 +386,15 @@ clutter_event_get_coords (const ClutterEvent *event,
|
|||||||
/**
|
/**
|
||||||
* clutter_event_get_position:
|
* clutter_event_get_position:
|
||||||
* @event: a #ClutterEvent
|
* @event: a #ClutterEvent
|
||||||
* @position: a #graphene_point_t
|
* @position: a #ClutterPoint
|
||||||
*
|
*
|
||||||
* Retrieves the event coordinates as a #graphene_point_t.
|
* Retrieves the event coordinates as a #ClutterPoint.
|
||||||
*
|
*
|
||||||
* Since: 1.12
|
* Since: 1.12
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
clutter_event_get_position (const ClutterEvent *event,
|
clutter_event_get_position (const ClutterEvent *event,
|
||||||
graphene_point_t *position)
|
ClutterPoint *position)
|
||||||
{
|
{
|
||||||
g_return_if_fail (event != NULL);
|
g_return_if_fail (event != NULL);
|
||||||
g_return_if_fail (position != NULL);
|
g_return_if_fail (position != NULL);
|
||||||
@@ -415,42 +415,42 @@ clutter_event_get_position (const ClutterEvent *event,
|
|||||||
case CLUTTER_PAD_BUTTON_RELEASE:
|
case CLUTTER_PAD_BUTTON_RELEASE:
|
||||||
case CLUTTER_PAD_STRIP:
|
case CLUTTER_PAD_STRIP:
|
||||||
case CLUTTER_PAD_RING:
|
case CLUTTER_PAD_RING:
|
||||||
graphene_point_init (position, 0.f, 0.f);
|
clutter_point_init (position, 0.f, 0.f);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CLUTTER_ENTER:
|
case CLUTTER_ENTER:
|
||||||
case CLUTTER_LEAVE:
|
case CLUTTER_LEAVE:
|
||||||
graphene_point_init (position, event->crossing.x, event->crossing.y);
|
clutter_point_init (position, event->crossing.x, event->crossing.y);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CLUTTER_BUTTON_PRESS:
|
case CLUTTER_BUTTON_PRESS:
|
||||||
case CLUTTER_BUTTON_RELEASE:
|
case CLUTTER_BUTTON_RELEASE:
|
||||||
graphene_point_init (position, event->button.x, event->button.y);
|
clutter_point_init (position, event->button.x, event->button.y);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CLUTTER_MOTION:
|
case CLUTTER_MOTION:
|
||||||
graphene_point_init (position, event->motion.x, event->motion.y);
|
clutter_point_init (position, event->motion.x, event->motion.y);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CLUTTER_TOUCH_BEGIN:
|
case CLUTTER_TOUCH_BEGIN:
|
||||||
case CLUTTER_TOUCH_UPDATE:
|
case CLUTTER_TOUCH_UPDATE:
|
||||||
case CLUTTER_TOUCH_END:
|
case CLUTTER_TOUCH_END:
|
||||||
case CLUTTER_TOUCH_CANCEL:
|
case CLUTTER_TOUCH_CANCEL:
|
||||||
graphene_point_init (position, event->touch.x, event->touch.y);
|
clutter_point_init (position, event->touch.x, event->touch.y);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CLUTTER_SCROLL:
|
case CLUTTER_SCROLL:
|
||||||
graphene_point_init (position, event->scroll.x, event->scroll.y);
|
clutter_point_init (position, event->scroll.x, event->scroll.y);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CLUTTER_TOUCHPAD_PINCH:
|
case CLUTTER_TOUCHPAD_PINCH:
|
||||||
graphene_point_init (position, event->touchpad_pinch.x,
|
clutter_point_init (position, event->touchpad_pinch.x,
|
||||||
event->touchpad_pinch.y);
|
event->touchpad_pinch.y);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CLUTTER_TOUCHPAD_SWIPE:
|
case CLUTTER_TOUCHPAD_SWIPE:
|
||||||
graphene_point_init (position, event->touchpad_swipe.x,
|
clutter_point_init (position, event->touchpad_swipe.x,
|
||||||
event->touchpad_swipe.y);
|
event->touchpad_swipe.y);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1021,9 +1021,6 @@ clutter_event_get_event_sequence (const ClutterEvent *event)
|
|||||||
event->type == CLUTTER_TOUCH_END ||
|
event->type == CLUTTER_TOUCH_END ||
|
||||||
event->type == CLUTTER_TOUCH_CANCEL)
|
event->type == CLUTTER_TOUCH_CANCEL)
|
||||||
return event->touch.sequence;
|
return event->touch.sequence;
|
||||||
else if (event->type == CLUTTER_ENTER ||
|
|
||||||
event->type == CLUTTER_LEAVE)
|
|
||||||
return event->crossing.sequence;
|
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -1096,7 +1093,7 @@ clutter_event_set_device (ClutterEvent *event,
|
|||||||
{
|
{
|
||||||
ClutterEventPrivate *real_event = (ClutterEventPrivate *) event;
|
ClutterEventPrivate *real_event = (ClutterEventPrivate *) event;
|
||||||
|
|
||||||
g_set_object (&real_event->device, device);
|
real_event->device = device;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (event->type)
|
switch (event->type)
|
||||||
@@ -1365,8 +1362,8 @@ clutter_event_copy (const ClutterEvent *event)
|
|||||||
{
|
{
|
||||||
ClutterEventPrivate *real_event = (ClutterEventPrivate *) event;
|
ClutterEventPrivate *real_event = (ClutterEventPrivate *) event;
|
||||||
|
|
||||||
g_set_object (&new_real_event->device, real_event->device);
|
new_real_event->device = real_event->device;
|
||||||
g_set_object (&new_real_event->source_device, real_event->source_device);
|
new_real_event->source_device = real_event->source_device;
|
||||||
new_real_event->delta_x = real_event->delta_x;
|
new_real_event->delta_x = real_event->delta_x;
|
||||||
new_real_event->delta_y = real_event->delta_y;
|
new_real_event->delta_y = real_event->delta_y;
|
||||||
new_real_event->is_pointer_emulated = real_event->is_pointer_emulated;
|
new_real_event->is_pointer_emulated = real_event->is_pointer_emulated;
|
||||||
@@ -1436,14 +1433,6 @@ clutter_event_free (ClutterEvent *event)
|
|||||||
{
|
{
|
||||||
_clutter_backend_free_event_data (clutter_get_default_backend (), event);
|
_clutter_backend_free_event_data (clutter_get_default_backend (), event);
|
||||||
|
|
||||||
if (is_event_allocated (event))
|
|
||||||
{
|
|
||||||
ClutterEventPrivate *real_event = (ClutterEventPrivate *) event;
|
|
||||||
|
|
||||||
g_clear_object (&real_event->device);
|
|
||||||
g_clear_object (&real_event->source_device);
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (event->type)
|
switch (event->type)
|
||||||
{
|
{
|
||||||
case CLUTTER_BUTTON_PRESS:
|
case CLUTTER_BUTTON_PRESS:
|
||||||
@@ -1698,7 +1687,7 @@ clutter_event_set_source_device (ClutterEvent *event,
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
real_event = (ClutterEventPrivate *) event;
|
real_event = (ClutterEventPrivate *) event;
|
||||||
g_set_object (&real_event->source_device, device);
|
real_event->source_device = device;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1796,12 +1785,12 @@ float
|
|||||||
clutter_event_get_distance (const ClutterEvent *source,
|
clutter_event_get_distance (const ClutterEvent *source,
|
||||||
const ClutterEvent *target)
|
const ClutterEvent *target)
|
||||||
{
|
{
|
||||||
graphene_point_t p0, p1;
|
ClutterPoint p0, p1;
|
||||||
|
|
||||||
clutter_event_get_position (source, &p0);
|
clutter_event_get_position (source, &p0);
|
||||||
clutter_event_get_position (source, &p1);
|
clutter_event_get_position (source, &p1);
|
||||||
|
|
||||||
return graphene_point_distance (&p0, &p1, NULL, NULL);
|
return clutter_point_distance (&p0, &p1, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1822,17 +1811,17 @@ double
|
|||||||
clutter_event_get_angle (const ClutterEvent *source,
|
clutter_event_get_angle (const ClutterEvent *source,
|
||||||
const ClutterEvent *target)
|
const ClutterEvent *target)
|
||||||
{
|
{
|
||||||
graphene_point_t p0, p1;
|
ClutterPoint p0, p1;
|
||||||
float x_distance, y_distance;
|
float x_distance, y_distance;
|
||||||
double angle;
|
double angle;
|
||||||
|
|
||||||
clutter_event_get_position (source, &p0);
|
clutter_event_get_position (source, &p0);
|
||||||
clutter_event_get_position (target, &p1);
|
clutter_event_get_position (target, &p1);
|
||||||
|
|
||||||
if (graphene_point_equal (&p0, &p1))
|
if (clutter_point_equals (&p0, &p1))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
graphene_point_distance (&p0, &p1, &x_distance, &y_distance);
|
clutter_point_distance (&p0, &p1, &x_distance, &y_distance);
|
||||||
|
|
||||||
angle = atan2 (x_distance, y_distance);
|
angle = atan2 (x_distance, y_distance);
|
||||||
|
|
||||||
@@ -2161,9 +2150,9 @@ clutter_event_get_scroll_source (const ClutterEvent *event)
|
|||||||
ClutterScrollFinishFlags
|
ClutterScrollFinishFlags
|
||||||
clutter_event_get_scroll_finish_flags (const ClutterEvent *event)
|
clutter_event_get_scroll_finish_flags (const ClutterEvent *event)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (event != NULL, CLUTTER_SCROLL_FINISHED_NONE);
|
g_return_val_if_fail (event != NULL, CLUTTER_SCROLL_SOURCE_UNKNOWN);
|
||||||
g_return_val_if_fail (event->type == CLUTTER_SCROLL,
|
g_return_val_if_fail (event->type == CLUTTER_SCROLL,
|
||||||
CLUTTER_SCROLL_FINISHED_NONE);
|
CLUTTER_SCROLL_SOURCE_UNKNOWN);
|
||||||
|
|
||||||
return event->scroll.finish_flags;
|
return event->scroll.finish_flags;
|
||||||
}
|
}
|
||||||
|
@@ -269,7 +269,6 @@ struct _ClutterCrossingEvent
|
|||||||
gfloat x;
|
gfloat x;
|
||||||
gfloat y;
|
gfloat y;
|
||||||
ClutterInputDevice *device;
|
ClutterInputDevice *device;
|
||||||
ClutterEventSequence *sequence;
|
|
||||||
ClutterActor *related;
|
ClutterActor *related;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -686,7 +685,7 @@ void clutter_event_get_coords (const ClutterEv
|
|||||||
gfloat *y);
|
gfloat *y);
|
||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
void clutter_event_get_position (const ClutterEvent *event,
|
void clutter_event_get_position (const ClutterEvent *event,
|
||||||
graphene_point_t *position);
|
ClutterPoint *position);
|
||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
float clutter_event_get_distance (const ClutterEvent *source,
|
float clutter_event_get_distance (const ClutterEvent *source,
|
||||||
const ClutterEvent *target);
|
const ClutterEvent *target);
|
||||||
@@ -773,10 +772,7 @@ void clutter_event_get_gesture_motion_delta (const Clut
|
|||||||
gdouble *dx,
|
gdouble *dx,
|
||||||
gdouble *dy);
|
gdouble *dy);
|
||||||
|
|
||||||
CLUTTER_EXPORT
|
|
||||||
ClutterScrollSource clutter_event_get_scroll_source (const ClutterEvent *event);
|
ClutterScrollSource clutter_event_get_scroll_source (const ClutterEvent *event);
|
||||||
|
|
||||||
CLUTTER_EXPORT
|
|
||||||
ClutterScrollFinishFlags clutter_event_get_scroll_finish_flags (const ClutterEvent *event);
|
ClutterScrollFinishFlags clutter_event_get_scroll_finish_flags (const ClutterEvent *event);
|
||||||
|
|
||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
|
@@ -33,6 +33,8 @@
|
|||||||
*
|
*
|
||||||
* It is possible to ask whether Clutter has support for specific features at
|
* It is possible to ask whether Clutter has support for specific features at
|
||||||
* run-time.
|
* run-time.
|
||||||
|
*
|
||||||
|
* See also cogl_get_features() and #CoglFeatureFlags
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "clutter-build-config.h"
|
#include "clutter-build-config.h"
|
||||||
@@ -58,13 +60,24 @@ typedef struct ClutterFeatures
|
|||||||
static ClutterFeatures* __features = NULL;
|
static ClutterFeatures* __features = NULL;
|
||||||
|
|
||||||
static ClutterFeatureFlags
|
static ClutterFeatureFlags
|
||||||
clutter_features_from_cogl (void)
|
clutter_features_from_cogl (guint cogl_flags)
|
||||||
{
|
{
|
||||||
ClutterFeatureFlags clutter_flags = 0;
|
ClutterFeatureFlags clutter_flags = 0;
|
||||||
|
|
||||||
clutter_flags |= CLUTTER_FEATURE_SHADERS_GLSL;
|
if (cogl_flags & COGL_FEATURE_TEXTURE_NPOT)
|
||||||
|
clutter_flags |= CLUTTER_FEATURE_TEXTURE_NPOT;
|
||||||
|
|
||||||
|
if (cogl_flags & COGL_FEATURE_TEXTURE_YUV)
|
||||||
|
clutter_flags |= CLUTTER_FEATURE_TEXTURE_YUV;
|
||||||
|
|
||||||
clutter_flags |= CLUTTER_FEATURE_OFFSCREEN;
|
if (cogl_flags & COGL_FEATURE_TEXTURE_READ_PIXELS)
|
||||||
|
clutter_flags |= CLUTTER_FEATURE_TEXTURE_READ_PIXELS;
|
||||||
|
|
||||||
|
if (cogl_flags & COGL_FEATURE_SHADERS_GLSL)
|
||||||
|
clutter_flags |= CLUTTER_FEATURE_SHADERS_GLSL;
|
||||||
|
|
||||||
|
if (cogl_flags & COGL_FEATURE_OFFSCREEN)
|
||||||
|
clutter_flags |= CLUTTER_FEATURE_OFFSCREEN;
|
||||||
|
|
||||||
return clutter_flags;
|
return clutter_flags;
|
||||||
}
|
}
|
||||||
@@ -92,7 +105,7 @@ _clutter_feature_init (GError **error)
|
|||||||
if (!_clutter_backend_create_context (context->backend, error))
|
if (!_clutter_backend_create_context (context->backend, error))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
__features->flags = (clutter_features_from_cogl ()
|
__features->flags = (clutter_features_from_cogl (cogl_get_features ())
|
||||||
| _clutter_backend_get_features (context->backend));
|
| _clutter_backend_get_features (context->backend));
|
||||||
|
|
||||||
__features->features_set = TRUE;
|
__features->features_set = TRUE;
|
||||||
|
@@ -118,7 +118,7 @@ struct _ClutterGestureActionPrivate
|
|||||||
gint requested_nb_points;
|
gint requested_nb_points;
|
||||||
GArray *points;
|
GArray *points;
|
||||||
|
|
||||||
gulong actor_capture_id;
|
guint actor_capture_id;
|
||||||
gulong stage_capture_id;
|
gulong stage_capture_id;
|
||||||
|
|
||||||
ClutterGestureTriggerEdge edge;
|
ClutterGestureTriggerEdge edge;
|
||||||
@@ -308,7 +308,11 @@ cancel_gesture (ClutterGestureAction *action)
|
|||||||
|
|
||||||
priv->in_gesture = FALSE;
|
priv->in_gesture = FALSE;
|
||||||
|
|
||||||
g_clear_signal_handler (&priv->stage_capture_id, priv->stage);
|
if (priv->stage_capture_id != 0)
|
||||||
|
{
|
||||||
|
g_signal_handler_disconnect (priv->stage, priv->stage_capture_id);
|
||||||
|
priv->stage_capture_id = 0;
|
||||||
|
}
|
||||||
|
|
||||||
actor = clutter_actor_meta_get_actor (CLUTTER_ACTOR_META (action));
|
actor = clutter_actor_meta_get_actor (CLUTTER_ACTOR_META (action));
|
||||||
g_signal_emit (action, gesture_signals[GESTURE_CANCEL], 0, actor);
|
g_signal_emit (action, gesture_signals[GESTURE_CANCEL], 0, actor);
|
||||||
@@ -477,8 +481,11 @@ stage_captured_event_cb (ClutterActor *stage,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (priv->points->len == 0)
|
if (priv->points->len == 0 && priv->stage_capture_id)
|
||||||
g_clear_signal_handler (&priv->stage_capture_id, priv->stage);
|
{
|
||||||
|
g_signal_handler_disconnect (priv->stage, priv->stage_capture_id);
|
||||||
|
priv->stage_capture_id = 0;
|
||||||
|
}
|
||||||
|
|
||||||
return CLUTTER_EVENT_PROPAGATE;
|
return CLUTTER_EVENT_PROPAGATE;
|
||||||
}
|
}
|
||||||
@@ -531,7 +538,7 @@ clutter_gesture_action_set_actor (ClutterActorMeta *meta,
|
|||||||
ClutterActor *old_actor = clutter_actor_meta_get_actor (meta);
|
ClutterActor *old_actor = clutter_actor_meta_get_actor (meta);
|
||||||
|
|
||||||
if (old_actor != NULL)
|
if (old_actor != NULL)
|
||||||
g_clear_signal_handler (&priv->actor_capture_id, old_actor);
|
g_signal_handler_disconnect (old_actor, priv->actor_capture_id);
|
||||||
|
|
||||||
priv->actor_capture_id = 0;
|
priv->actor_capture_id = 0;
|
||||||
}
|
}
|
||||||
@@ -539,7 +546,7 @@ clutter_gesture_action_set_actor (ClutterActorMeta *meta,
|
|||||||
if (priv->stage_capture_id != 0)
|
if (priv->stage_capture_id != 0)
|
||||||
{
|
{
|
||||||
if (priv->stage != NULL)
|
if (priv->stage != NULL)
|
||||||
g_clear_signal_handler (&priv->stage_capture_id, priv->stage);
|
g_signal_handler_disconnect (priv->stage, priv->stage_capture_id);
|
||||||
|
|
||||||
priv->stage_capture_id = 0;
|
priv->stage_capture_id = 0;
|
||||||
priv->stage = NULL;
|
priv->stage = NULL;
|
||||||
@@ -797,7 +804,8 @@ clutter_gesture_action_class_init (ClutterGestureActionClass *klass)
|
|||||||
G_TYPE_FROM_CLASS (klass),
|
G_TYPE_FROM_CLASS (klass),
|
||||||
G_SIGNAL_RUN_LAST,
|
G_SIGNAL_RUN_LAST,
|
||||||
G_STRUCT_OFFSET (ClutterGestureActionClass, gesture_end),
|
G_STRUCT_OFFSET (ClutterGestureActionClass, gesture_end),
|
||||||
NULL, NULL, NULL,
|
NULL, NULL,
|
||||||
|
_clutter_marshal_VOID__OBJECT,
|
||||||
G_TYPE_NONE, 1,
|
G_TYPE_NONE, 1,
|
||||||
CLUTTER_TYPE_ACTOR);
|
CLUTTER_TYPE_ACTOR);
|
||||||
|
|
||||||
@@ -819,7 +827,8 @@ clutter_gesture_action_class_init (ClutterGestureActionClass *klass)
|
|||||||
G_TYPE_FROM_CLASS (klass),
|
G_TYPE_FROM_CLASS (klass),
|
||||||
G_SIGNAL_RUN_LAST,
|
G_SIGNAL_RUN_LAST,
|
||||||
G_STRUCT_OFFSET (ClutterGestureActionClass, gesture_cancel),
|
G_STRUCT_OFFSET (ClutterGestureActionClass, gesture_cancel),
|
||||||
NULL, NULL, NULL,
|
NULL, NULL,
|
||||||
|
_clutter_marshal_VOID__OBJECT,
|
||||||
G_TYPE_NONE, 1,
|
G_TYPE_NONE, 1,
|
||||||
CLUTTER_TYPE_ACTOR);
|
CLUTTER_TYPE_ACTOR);
|
||||||
}
|
}
|
||||||
|
@@ -1,111 +0,0 @@
|
|||||||
/*
|
|
||||||
* Clutter.
|
|
||||||
*
|
|
||||||
* An OpenGL based 'interactive canvas' library.
|
|
||||||
*
|
|
||||||
* Authored By Georges Basile Stavracas Neto <georges.stavracas@gmail.com>
|
|
||||||
*
|
|
||||||
* Copyright (C) 2019 Endless, Inc
|
|
||||||
* Copyright (C) 2009, 2010 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/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "clutter-build-config.h"
|
|
||||||
|
|
||||||
#include "clutter-graphene.h"
|
|
||||||
|
|
||||||
#include "clutter-private.h"
|
|
||||||
#include "clutter-types.h"
|
|
||||||
|
|
||||||
static gboolean
|
|
||||||
graphene_point_progress (const GValue *a,
|
|
||||||
const GValue *b,
|
|
||||||
double progress,
|
|
||||||
GValue *retval)
|
|
||||||
{
|
|
||||||
const graphene_point_t *ap = g_value_get_boxed (a);
|
|
||||||
const graphene_point_t *bp = g_value_get_boxed (b);
|
|
||||||
graphene_point_t res;
|
|
||||||
|
|
||||||
graphene_point_interpolate (ap, bp, progress, &res);
|
|
||||||
|
|
||||||
g_value_set_boxed (retval, &res);
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
static gboolean
|
|
||||||
graphene_point3d_progress (const GValue *a,
|
|
||||||
const GValue *b,
|
|
||||||
double progress,
|
|
||||||
GValue *retval)
|
|
||||||
{
|
|
||||||
const graphene_point3d_t *av = g_value_get_boxed (a);
|
|
||||||
const graphene_point3d_t *bv = g_value_get_boxed (b);
|
|
||||||
graphene_point3d_t res;
|
|
||||||
|
|
||||||
graphene_point3d_interpolate (av, bv, progress, &res);
|
|
||||||
|
|
||||||
g_value_set_boxed (retval, &res);
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
static gboolean
|
|
||||||
graphene_rect_progress (const GValue *a,
|
|
||||||
const GValue *b,
|
|
||||||
double progress,
|
|
||||||
GValue *retval)
|
|
||||||
{
|
|
||||||
const graphene_rect_t *rect_a = g_value_get_boxed (a);
|
|
||||||
const graphene_rect_t *rect_b = g_value_get_boxed (b);
|
|
||||||
graphene_rect_t res;
|
|
||||||
|
|
||||||
graphene_rect_interpolate (rect_a, rect_b, progress, &res);
|
|
||||||
|
|
||||||
g_value_set_boxed (retval, &res);
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
static gboolean
|
|
||||||
graphene_size_progress (const GValue *a,
|
|
||||||
const GValue *b,
|
|
||||||
double progress,
|
|
||||||
GValue *retval)
|
|
||||||
{
|
|
||||||
const graphene_size_t *as = g_value_get_boxed (a);
|
|
||||||
const graphene_size_t *bs = g_value_get_boxed (b);
|
|
||||||
graphene_size_t res;
|
|
||||||
|
|
||||||
graphene_size_interpolate (as, bs, progress, &res);
|
|
||||||
|
|
||||||
g_value_set_boxed (retval, &res);
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
clutter_graphene_init (void)
|
|
||||||
{
|
|
||||||
clutter_interval_register_progress_func (GRAPHENE_TYPE_POINT,
|
|
||||||
graphene_point_progress);
|
|
||||||
clutter_interval_register_progress_func (GRAPHENE_TYPE_POINT3D,
|
|
||||||
graphene_point3d_progress);
|
|
||||||
clutter_interval_register_progress_func (GRAPHENE_TYPE_RECT,
|
|
||||||
graphene_rect_progress);
|
|
||||||
clutter_interval_register_progress_func (GRAPHENE_TYPE_SIZE,
|
|
||||||
graphene_size_progress);
|
|
||||||
}
|
|
@@ -44,12 +44,12 @@
|
|||||||
* SECTION:clutter-grid-layout
|
* SECTION:clutter-grid-layout
|
||||||
* @Short_description: A layout manager for a grid of actors
|
* @Short_description: A layout manager for a grid of actors
|
||||||
* @Title: ClutterGridLayout
|
* @Title: ClutterGridLayout
|
||||||
* @See_also: #ClutterBoxLayout
|
* @See_also: #ClutterTableLayout, #ClutterBoxLayout
|
||||||
*
|
*
|
||||||
* #ClutterGridLayout is a layout manager which arranges its child widgets in
|
* #ClutterGridLayout is a layout manager which arranges its child widgets in
|
||||||
* rows and columns. It is a very similar to #ClutterBoxLayout, but it
|
* rows and columns. It is a very similar to #ClutterTableLayout and
|
||||||
* consistently uses #ClutterActor's alignment and expansion flags instead of
|
* #ClutterBoxLayout, but it consistently uses #ClutterActor's
|
||||||
* custom child properties.
|
* alignment and expansion flags instead of custom child properties.
|
||||||
*
|
*
|
||||||
* Children are added using clutter_grid_layout_attach(). They can span
|
* Children are added using clutter_grid_layout_attach(). They can span
|
||||||
* multiple rows or columns. It is also possible to add a child next to an
|
* multiple rows or columns. It is also possible to add a child next to an
|
||||||
|
@@ -1,96 +0,0 @@
|
|||||||
/*
|
|
||||||
* Clutter.
|
|
||||||
*
|
|
||||||
* An OpenGL based 'interactive canvas' library.
|
|
||||||
*
|
|
||||||
* Authored By Matthew Allum <mallum@openedhand.com>
|
|
||||||
*
|
|
||||||
* Copyright (C) 2006 OpenedHand
|
|
||||||
*
|
|
||||||
* 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/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __CLUTTER_GROUP_H__
|
|
||||||
#define __CLUTTER_GROUP_H__
|
|
||||||
|
|
||||||
#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
|
|
||||||
#error "Only <clutter/clutter.h> can be included directly."
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <glib-object.h>
|
|
||||||
#include <clutter/clutter-types.h>
|
|
||||||
#include <clutter/clutter-actor.h>
|
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
|
||||||
|
|
||||||
#define CLUTTER_TYPE_GROUP (clutter_group_get_type ())
|
|
||||||
#define CLUTTER_GROUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_GROUP, ClutterGroup))
|
|
||||||
#define CLUTTER_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_GROUP, ClutterGroupClass))
|
|
||||||
#define CLUTTER_IS_GROUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_GROUP))
|
|
||||||
#define CLUTTER_IS_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_GROUP))
|
|
||||||
#define CLUTTER_GROUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_GROUP, ClutterGroupClass))
|
|
||||||
|
|
||||||
/* XXX - ClutterGroup is to be considered fully deprecated; the only
|
|
||||||
* reason we keep this header is because ClutterStage inherits from
|
|
||||||
* ClutterGroup, and thus we need to have a structure definition for
|
|
||||||
* the Stage object to expand.
|
|
||||||
*/
|
|
||||||
|
|
||||||
typedef struct _ClutterGroup ClutterGroup;
|
|
||||||
typedef struct _ClutterGroupClass ClutterGroupClass;
|
|
||||||
typedef struct _ClutterGroupPrivate ClutterGroupPrivate;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ClutterGroup:
|
|
||||||
*
|
|
||||||
* The #ClutterGroup structure contains only private data
|
|
||||||
* and should be accessed using the provided API
|
|
||||||
*
|
|
||||||
* Since: 0.2
|
|
||||||
*/
|
|
||||||
struct _ClutterGroup
|
|
||||||
{
|
|
||||||
/*< private >*/
|
|
||||||
ClutterActor parent_instance;
|
|
||||||
|
|
||||||
ClutterGroupPrivate *priv;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ClutterGroupClass:
|
|
||||||
*
|
|
||||||
* The #ClutterGroupClass structure contains only private data
|
|
||||||
*
|
|
||||||
* Since: 0.2
|
|
||||||
*/
|
|
||||||
struct _ClutterGroupClass
|
|
||||||
{
|
|
||||||
/*< private >*/
|
|
||||||
ClutterActorClass parent_class;
|
|
||||||
|
|
||||||
/* padding for future expansion */
|
|
||||||
void (*_clutter_reserved1) (void);
|
|
||||||
void (*_clutter_reserved2) (void);
|
|
||||||
void (*_clutter_reserved3) (void);
|
|
||||||
void (*_clutter_reserved4) (void);
|
|
||||||
void (*_clutter_reserved5) (void);
|
|
||||||
void (*_clutter_reserved6) (void);
|
|
||||||
};
|
|
||||||
|
|
||||||
CLUTTER_EXPORT
|
|
||||||
GType clutter_group_get_type (void) G_GNUC_CONST;
|
|
||||||
|
|
||||||
G_END_DECLS
|
|
||||||
|
|
||||||
#endif /* __CLUTTER_GROUP_H__ */
|
|
@@ -53,11 +53,9 @@
|
|||||||
struct _ClutterImagePrivate
|
struct _ClutterImagePrivate
|
||||||
{
|
{
|
||||||
CoglTexture *texture;
|
CoglTexture *texture;
|
||||||
gint width;
|
|
||||||
gint height;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static void clutter_content_iface_init (ClutterContentInterface *iface);
|
static void clutter_content_iface_init (ClutterContentIface *iface);
|
||||||
|
|
||||||
G_DEFINE_TYPE_WITH_CODE (ClutterImage, clutter_image, G_TYPE_OBJECT,
|
G_DEFINE_TYPE_WITH_CODE (ClutterImage, clutter_image, G_TYPE_OBJECT,
|
||||||
G_ADD_PRIVATE (ClutterImage)
|
G_ADD_PRIVATE (ClutterImage)
|
||||||
@@ -70,27 +68,6 @@ clutter_image_error_quark (void)
|
|||||||
return g_quark_from_static_string ("clutter-image-error-quark");
|
return g_quark_from_static_string ("clutter-image-error-quark");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
update_image_size (ClutterImage *self)
|
|
||||||
{
|
|
||||||
gint width, height;
|
|
||||||
|
|
||||||
if (self->priv->texture == NULL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
width = cogl_texture_get_width (self->priv->texture);
|
|
||||||
height = cogl_texture_get_height (self->priv->texture);
|
|
||||||
|
|
||||||
if (self->priv->width == width &&
|
|
||||||
self->priv->height == height)
|
|
||||||
return;
|
|
||||||
|
|
||||||
self->priv->width = width;
|
|
||||||
self->priv->height = height;
|
|
||||||
|
|
||||||
clutter_content_invalidate_size (CLUTTER_CONTENT (self));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
clutter_image_finalize (GObject *gobject)
|
clutter_image_finalize (GObject *gobject)
|
||||||
{
|
{
|
||||||
@@ -118,10 +95,9 @@ clutter_image_init (ClutterImage *self)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
clutter_image_paint_content (ClutterContent *content,
|
clutter_image_paint_content (ClutterContent *content,
|
||||||
ClutterActor *actor,
|
ClutterActor *actor,
|
||||||
ClutterPaintNode *root,
|
ClutterPaintNode *root)
|
||||||
ClutterPaintContext *paint_context)
|
|
||||||
{
|
{
|
||||||
ClutterImagePrivate *priv = CLUTTER_IMAGE (content)->priv;
|
ClutterImagePrivate *priv = CLUTTER_IMAGE (content)->priv;
|
||||||
ClutterPaintNode *node;
|
ClutterPaintNode *node;
|
||||||
@@ -155,7 +131,7 @@ clutter_image_get_preferred_size (ClutterContent *content,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
clutter_content_iface_init (ClutterContentInterface *iface)
|
clutter_content_iface_init (ClutterContentIface *iface)
|
||||||
{
|
{
|
||||||
iface->get_preferred_size = clutter_image_get_preferred_size;
|
iface->get_preferred_size = clutter_image_get_preferred_size;
|
||||||
iface->paint_content = clutter_image_paint_content;
|
iface->paint_content = clutter_image_paint_content;
|
||||||
@@ -257,12 +233,11 @@ clutter_image_set_data (ClutterImage *image,
|
|||||||
{
|
{
|
||||||
g_set_error_literal (error, CLUTTER_IMAGE_ERROR,
|
g_set_error_literal (error, CLUTTER_IMAGE_ERROR,
|
||||||
CLUTTER_IMAGE_ERROR_INVALID_DATA,
|
CLUTTER_IMAGE_ERROR_INVALID_DATA,
|
||||||
"Unable to load image data");
|
_("Unable to load image data"));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
clutter_content_invalidate (CLUTTER_CONTENT (image));
|
clutter_content_invalidate (CLUTTER_CONTENT (image));
|
||||||
update_image_size (image);
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@@ -326,12 +301,11 @@ clutter_image_set_bytes (ClutterImage *image,
|
|||||||
{
|
{
|
||||||
g_set_error_literal (error, CLUTTER_IMAGE_ERROR,
|
g_set_error_literal (error, CLUTTER_IMAGE_ERROR,
|
||||||
CLUTTER_IMAGE_ERROR_INVALID_DATA,
|
CLUTTER_IMAGE_ERROR_INVALID_DATA,
|
||||||
"Unable to load image data");
|
_("Unable to load image data"));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
clutter_content_invalidate (CLUTTER_CONTENT (image));
|
clutter_content_invalidate (CLUTTER_CONTENT (image));
|
||||||
update_image_size (image);
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@@ -420,12 +394,11 @@ clutter_image_set_area (ClutterImage *image,
|
|||||||
{
|
{
|
||||||
g_set_error_literal (error, CLUTTER_IMAGE_ERROR,
|
g_set_error_literal (error, CLUTTER_IMAGE_ERROR,
|
||||||
CLUTTER_IMAGE_ERROR_INVALID_DATA,
|
CLUTTER_IMAGE_ERROR_INVALID_DATA,
|
||||||
"Unable to load image data");
|
_("Unable to load image data"));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
clutter_content_invalidate (CLUTTER_CONTENT (image));
|
clutter_content_invalidate (CLUTTER_CONTENT (image));
|
||||||
update_image_size (image);
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@@ -63,8 +63,7 @@ typedef struct _ClutterImageClass ClutterImageClass;
|
|||||||
*
|
*
|
||||||
* Since: 1.10
|
* Since: 1.10
|
||||||
*/
|
*/
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
CLUTTER_IMAGE_ERROR_INVALID_DATA
|
CLUTTER_IMAGE_ERROR_INVALID_DATA
|
||||||
} ClutterImageError;
|
} ClutterImageError;
|
||||||
|
|
||||||
|
@@ -35,8 +35,7 @@ struct _ClutterInputDeviceToolPrivate
|
|||||||
guint64 id;
|
guint64 id;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum
|
enum {
|
||||||
{
|
|
||||||
PROP_0,
|
PROP_0,
|
||||||
PROP_TYPE,
|
PROP_TYPE,
|
||||||
PROP_SERIAL,
|
PROP_SERIAL,
|
||||||
|
@@ -107,9 +107,6 @@ clutter_input_device_dispose (GObject *gobject)
|
|||||||
device->associated = NULL;
|
device->associated = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (device->accessibility_virtual_device)
|
|
||||||
g_clear_object (&device->accessibility_virtual_device);
|
|
||||||
|
|
||||||
g_clear_pointer (&device->axes, g_array_unref);
|
g_clear_pointer (&device->axes, g_array_unref);
|
||||||
g_clear_pointer (&device->keys, g_array_unref);
|
g_clear_pointer (&device->keys, g_array_unref);
|
||||||
g_clear_pointer (&device->scroll_info, g_array_unref);
|
g_clear_pointer (&device->scroll_info, g_array_unref);
|
||||||
@@ -837,7 +834,6 @@ _clutter_input_device_set_actor (ClutterInputDevice *device,
|
|||||||
event->crossing.x = device->current_x;
|
event->crossing.x = device->current_x;
|
||||||
event->crossing.y = device->current_y;
|
event->crossing.y = device->current_y;
|
||||||
event->crossing.related = actor;
|
event->crossing.related = actor;
|
||||||
event->crossing.sequence = sequence;
|
|
||||||
clutter_event_set_device (event, device);
|
clutter_event_set_device (event, device);
|
||||||
|
|
||||||
/* we need to make sure that this event is processed
|
/* we need to make sure that this event is processed
|
||||||
@@ -874,7 +870,6 @@ _clutter_input_device_set_actor (ClutterInputDevice *device,
|
|||||||
event->crossing.y = device->current_y;
|
event->crossing.y = device->current_y;
|
||||||
event->crossing.source = actor;
|
event->crossing.source = actor;
|
||||||
event->crossing.related = old_actor;
|
event->crossing.related = old_actor;
|
||||||
event->crossing.sequence = sequence;
|
|
||||||
clutter_event_set_device (event, device);
|
clutter_event_set_device (event, device);
|
||||||
|
|
||||||
/* see above */
|
/* see above */
|
||||||
@@ -991,7 +986,7 @@ clutter_input_device_get_enabled (ClutterInputDevice *device)
|
|||||||
gboolean
|
gboolean
|
||||||
clutter_input_device_get_coords (ClutterInputDevice *device,
|
clutter_input_device_get_coords (ClutterInputDevice *device,
|
||||||
ClutterEventSequence *sequence,
|
ClutterEventSequence *sequence,
|
||||||
graphene_point_t *point)
|
ClutterPoint *point)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (CLUTTER_IS_INPUT_DEVICE (device), FALSE);
|
g_return_val_if_fail (CLUTTER_IS_INPUT_DEVICE (device), FALSE);
|
||||||
g_return_val_if_fail (point != NULL, FALSE);
|
g_return_val_if_fail (point != NULL, FALSE);
|
||||||
@@ -1038,11 +1033,10 @@ _clutter_input_device_update (ClutterInputDevice *device,
|
|||||||
ClutterStage *stage;
|
ClutterStage *stage;
|
||||||
ClutterActor *new_cursor_actor;
|
ClutterActor *new_cursor_actor;
|
||||||
ClutterActor *old_cursor_actor;
|
ClutterActor *old_cursor_actor;
|
||||||
graphene_point_t point = GRAPHENE_POINT_INIT (-1.0f, -1.0f);
|
ClutterPoint point = { -1, -1 };
|
||||||
ClutterInputDeviceType device_type = device->device_type;
|
|
||||||
|
|
||||||
g_assert (device_type != CLUTTER_KEYBOARD_DEVICE &&
|
if (device->device_type == CLUTTER_KEYBOARD_DEVICE)
|
||||||
device_type != CLUTTER_PAD_DEVICE);
|
return NULL;
|
||||||
|
|
||||||
stage = device->stage;
|
stage = device->stage;
|
||||||
if (G_UNLIKELY (stage == NULL))
|
if (G_UNLIKELY (stage == NULL))
|
||||||
@@ -1925,157 +1919,6 @@ _clutter_input_device_reset_scroll_info (ClutterInputDevice *device)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
on_grab_actor_destroy (ClutterActor *actor,
|
|
||||||
ClutterInputDevice *device)
|
|
||||||
{
|
|
||||||
switch (device->device_type)
|
|
||||||
{
|
|
||||||
case CLUTTER_POINTER_DEVICE:
|
|
||||||
case CLUTTER_TABLET_DEVICE:
|
|
||||||
device->pointer_grab_actor = NULL;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case CLUTTER_KEYBOARD_DEVICE:
|
|
||||||
device->keyboard_grab_actor = NULL;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
g_assert_not_reached ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* clutter_input_device_grab:
|
|
||||||
* @device: a #ClutterInputDevice
|
|
||||||
* @actor: a #ClutterActor
|
|
||||||
*
|
|
||||||
* Acquires a grab on @actor for the given @device.
|
|
||||||
*
|
|
||||||
* Any event coming from @device will be delivered to @actor, bypassing
|
|
||||||
* the usual event delivery mechanism, until the grab is released by
|
|
||||||
* calling clutter_input_device_ungrab().
|
|
||||||
*
|
|
||||||
* The grab is client-side: even if the windowing system used by the Clutter
|
|
||||||
* backend has the concept of "device grabs", Clutter will not use them.
|
|
||||||
*
|
|
||||||
* Only #ClutterInputDevice of types %CLUTTER_POINTER_DEVICE,
|
|
||||||
* %CLUTTER_TABLET_DEVICE and %CLUTTER_KEYBOARD_DEVICE can hold a grab.
|
|
||||||
*
|
|
||||||
* Since: 1.10
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
clutter_input_device_grab (ClutterInputDevice *device,
|
|
||||||
ClutterActor *actor)
|
|
||||||
{
|
|
||||||
ClutterActor **grab_actor;
|
|
||||||
|
|
||||||
g_return_if_fail (CLUTTER_IS_INPUT_DEVICE (device));
|
|
||||||
g_return_if_fail (CLUTTER_IS_ACTOR (actor));
|
|
||||||
|
|
||||||
switch (device->device_type)
|
|
||||||
{
|
|
||||||
case CLUTTER_POINTER_DEVICE:
|
|
||||||
case CLUTTER_TABLET_DEVICE:
|
|
||||||
grab_actor = &device->pointer_grab_actor;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case CLUTTER_KEYBOARD_DEVICE:
|
|
||||||
grab_actor = &device->keyboard_grab_actor;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
g_critical ("Only pointer and keyboard devices can grab an actor");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (*grab_actor != NULL)
|
|
||||||
{
|
|
||||||
g_signal_handlers_disconnect_by_func (*grab_actor,
|
|
||||||
G_CALLBACK (on_grab_actor_destroy),
|
|
||||||
device);
|
|
||||||
}
|
|
||||||
|
|
||||||
*grab_actor = actor;
|
|
||||||
|
|
||||||
g_signal_connect (*grab_actor,
|
|
||||||
"destroy",
|
|
||||||
G_CALLBACK (on_grab_actor_destroy),
|
|
||||||
device);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* clutter_input_device_ungrab:
|
|
||||||
* @device: a #ClutterInputDevice
|
|
||||||
*
|
|
||||||
* Releases the grab on the @device, if one is in place.
|
|
||||||
*
|
|
||||||
* Since: 1.10
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
clutter_input_device_ungrab (ClutterInputDevice *device)
|
|
||||||
{
|
|
||||||
ClutterActor **grab_actor;
|
|
||||||
|
|
||||||
g_return_if_fail (CLUTTER_IS_INPUT_DEVICE (device));
|
|
||||||
|
|
||||||
switch (device->device_type)
|
|
||||||
{
|
|
||||||
case CLUTTER_POINTER_DEVICE:
|
|
||||||
case CLUTTER_TABLET_DEVICE:
|
|
||||||
grab_actor = &device->pointer_grab_actor;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case CLUTTER_KEYBOARD_DEVICE:
|
|
||||||
grab_actor = &device->keyboard_grab_actor;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (*grab_actor == NULL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
g_signal_handlers_disconnect_by_func (*grab_actor,
|
|
||||||
G_CALLBACK (on_grab_actor_destroy),
|
|
||||||
device);
|
|
||||||
|
|
||||||
*grab_actor = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* clutter_input_device_get_grabbed_actor:
|
|
||||||
* @device: a #ClutterInputDevice
|
|
||||||
*
|
|
||||||
* Retrieves a pointer to the #ClutterActor currently grabbing all
|
|
||||||
* the events coming from @device.
|
|
||||||
*
|
|
||||||
* Return value: (transfer none): a #ClutterActor, or %NULL
|
|
||||||
*
|
|
||||||
* Since: 1.10
|
|
||||||
*/
|
|
||||||
ClutterActor *
|
|
||||||
clutter_input_device_get_grabbed_actor (ClutterInputDevice *device)
|
|
||||||
{
|
|
||||||
g_return_val_if_fail (CLUTTER_IS_INPUT_DEVICE (device), NULL);
|
|
||||||
|
|
||||||
switch (device->device_type)
|
|
||||||
{
|
|
||||||
case CLUTTER_POINTER_DEVICE:
|
|
||||||
case CLUTTER_TABLET_DEVICE:
|
|
||||||
return device->pointer_grab_actor;
|
|
||||||
|
|
||||||
case CLUTTER_KEYBOARD_DEVICE:
|
|
||||||
return device->keyboard_grab_actor;
|
|
||||||
|
|
||||||
default:
|
|
||||||
g_critical ("Only pointer and keyboard devices can grab an actor");
|
|
||||||
}
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
on_grab_sequence_actor_destroy (ClutterActor *actor,
|
on_grab_sequence_actor_destroy (ClutterActor *actor,
|
||||||
ClutterInputDevice *device)
|
ClutterInputDevice *device)
|
||||||
|
@@ -58,7 +58,7 @@ gint clutter_input_device_get_device_id (ClutterInputDev
|
|||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
gboolean clutter_input_device_get_coords (ClutterInputDevice *device,
|
gboolean clutter_input_device_get_coords (ClutterInputDevice *device,
|
||||||
ClutterEventSequence *sequence,
|
ClutterEventSequence *sequence,
|
||||||
graphene_point_t *point);
|
ClutterPoint *point);
|
||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
ClutterModifierType clutter_input_device_get_modifier_state (ClutterInputDevice *device);
|
ClutterModifierType clutter_input_device_get_modifier_state (ClutterInputDevice *device);
|
||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
|
@@ -89,8 +89,8 @@ clutter_input_focus_reset (ClutterInputFocus *focus)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
clutter_input_focus_set_cursor_location (ClutterInputFocus *focus,
|
clutter_input_focus_set_cursor_location (ClutterInputFocus *focus,
|
||||||
const graphene_rect_t *rect)
|
const ClutterRect *rect)
|
||||||
{
|
{
|
||||||
ClutterInputFocusPrivate *priv;
|
ClutterInputFocusPrivate *priv;
|
||||||
|
|
||||||
@@ -175,8 +175,7 @@ clutter_input_focus_set_can_show_preedit (ClutterInputFocus *focus,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
clutter_input_focus_set_input_panel_state (ClutterInputFocus *focus,
|
clutter_input_focus_request_toggle_input_panel (ClutterInputFocus *focus)
|
||||||
ClutterInputPanelState state)
|
|
||||||
{
|
{
|
||||||
ClutterInputFocusPrivate *priv;
|
ClutterInputFocusPrivate *priv;
|
||||||
|
|
||||||
@@ -185,7 +184,7 @@ clutter_input_focus_set_input_panel_state (ClutterInputFocus *focus,
|
|||||||
|
|
||||||
priv = clutter_input_focus_get_instance_private (focus);
|
priv = clutter_input_focus_get_instance_private (focus);
|
||||||
|
|
||||||
clutter_input_method_set_input_panel_state (priv->im, state);
|
clutter_input_method_toggle_input_panel (priv->im);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@@ -57,8 +57,8 @@ gboolean clutter_input_focus_is_focused (ClutterInputFocus *focus);
|
|||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
void clutter_input_focus_reset (ClutterInputFocus *focus);
|
void clutter_input_focus_reset (ClutterInputFocus *focus);
|
||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
void clutter_input_focus_set_cursor_location (ClutterInputFocus *focus,
|
void clutter_input_focus_set_cursor_location (ClutterInputFocus *focus,
|
||||||
const graphene_rect_t *rect);
|
const ClutterRect *rect);
|
||||||
|
|
||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
void clutter_input_focus_set_surrounding (ClutterInputFocus *focus,
|
void clutter_input_focus_set_surrounding (ClutterInputFocus *focus,
|
||||||
@@ -78,7 +78,6 @@ CLUTTER_EXPORT
|
|||||||
void clutter_input_focus_set_can_show_preedit (ClutterInputFocus *focus,
|
void clutter_input_focus_set_can_show_preedit (ClutterInputFocus *focus,
|
||||||
gboolean can_show_preedit);
|
gboolean can_show_preedit);
|
||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
void clutter_input_focus_set_input_panel_state (ClutterInputFocus *focus,
|
void clutter_input_focus_request_toggle_input_panel (ClutterInputFocus *focus);
|
||||||
ClutterInputPanelState state);
|
|
||||||
|
|
||||||
#endif /* __CLUTTER_INPUT_FOCUS_H__ */
|
#endif /* __CLUTTER_INPUT_FOCUS_H__ */
|
||||||
|
@@ -26,8 +26,8 @@ ClutterInputFocus * clutter_input_method_get_focus (ClutterInputMethod *method);
|
|||||||
|
|
||||||
void clutter_input_method_reset (ClutterInputMethod *method);
|
void clutter_input_method_reset (ClutterInputMethod *method);
|
||||||
|
|
||||||
void clutter_input_method_set_cursor_location (ClutterInputMethod *method,
|
void clutter_input_method_set_cursor_location (ClutterInputMethod *method,
|
||||||
const graphene_rect_t *rect);
|
const ClutterRect *rect);
|
||||||
void clutter_input_method_set_surrounding (ClutterInputMethod *method,
|
void clutter_input_method_set_surrounding (ClutterInputMethod *method,
|
||||||
const gchar *text,
|
const gchar *text,
|
||||||
guint cursor,
|
guint cursor,
|
||||||
|
@@ -37,8 +37,7 @@ struct _ClutterInputMethodPrivate
|
|||||||
gboolean can_show_preedit;
|
gboolean can_show_preedit;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum
|
enum {
|
||||||
{
|
|
||||||
COMMIT,
|
COMMIT,
|
||||||
DELETE_SURROUNDING,
|
DELETE_SURROUNDING,
|
||||||
REQUEST_SURROUNDING,
|
REQUEST_SURROUNDING,
|
||||||
@@ -47,8 +46,7 @@ enum
|
|||||||
N_SIGNALS,
|
N_SIGNALS,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum
|
enum {
|
||||||
{
|
|
||||||
PROP_0,
|
PROP_0,
|
||||||
PROP_CONTENT_HINTS,
|
PROP_CONTENT_HINTS,
|
||||||
PROP_CONTENT_PURPOSE,
|
PROP_CONTENT_PURPOSE,
|
||||||
@@ -187,7 +185,7 @@ clutter_input_method_class_init (ClutterInputMethodClass *klass)
|
|||||||
G_TYPE_FROM_CLASS (object_class),
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
G_SIGNAL_RUN_LAST,
|
G_SIGNAL_RUN_LAST,
|
||||||
0, NULL, NULL, NULL,
|
0, NULL, NULL, NULL,
|
||||||
G_TYPE_NONE, 1, GRAPHENE_TYPE_RECT);
|
G_TYPE_NONE, 1, CLUTTER_TYPE_RECT);
|
||||||
|
|
||||||
pspecs[PROP_CONTENT_HINTS] =
|
pspecs[PROP_CONTENT_HINTS] =
|
||||||
g_param_spec_flags ("content-hints",
|
g_param_spec_flags ("content-hints",
|
||||||
@@ -266,6 +264,9 @@ clutter_input_method_focus_out (ClutterInputMethod *im)
|
|||||||
|
|
||||||
klass = CLUTTER_INPUT_METHOD_GET_CLASS (im);
|
klass = CLUTTER_INPUT_METHOD_GET_CLASS (im);
|
||||||
klass->focus_out (im);
|
klass->focus_out (im);
|
||||||
|
|
||||||
|
g_signal_emit (im, signals[INPUT_PANEL_STATE],
|
||||||
|
0, CLUTTER_INPUT_PANEL_STATE_OFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
ClutterInputFocus *
|
ClutterInputFocus *
|
||||||
@@ -360,12 +361,12 @@ clutter_input_method_notify_key_event (ClutterInputMethod *im,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
clutter_input_method_set_input_panel_state (ClutterInputMethod *im,
|
clutter_input_method_toggle_input_panel (ClutterInputMethod *im)
|
||||||
ClutterInputPanelState state)
|
|
||||||
{
|
{
|
||||||
g_return_if_fail (CLUTTER_IS_INPUT_METHOD (im));
|
g_return_if_fail (CLUTTER_IS_INPUT_METHOD (im));
|
||||||
|
|
||||||
g_signal_emit (im, signals[INPUT_PANEL_STATE], 0, state);
|
g_signal_emit (im, signals[INPUT_PANEL_STATE], 0,
|
||||||
|
CLUTTER_INPUT_PANEL_STATE_TOGGLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -377,8 +378,8 @@ clutter_input_method_reset (ClutterInputMethod *im)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
clutter_input_method_set_cursor_location (ClutterInputMethod *im,
|
clutter_input_method_set_cursor_location (ClutterInputMethod *im,
|
||||||
const graphene_rect_t *rect)
|
const ClutterRect *rect)
|
||||||
{
|
{
|
||||||
g_return_if_fail (CLUTTER_IS_INPUT_METHOD (im));
|
g_return_if_fail (CLUTTER_IS_INPUT_METHOD (im));
|
||||||
|
|
||||||
|
@@ -42,8 +42,8 @@ struct _ClutterInputMethodClass
|
|||||||
|
|
||||||
void (* reset) (ClutterInputMethod *im);
|
void (* reset) (ClutterInputMethod *im);
|
||||||
|
|
||||||
void (* set_cursor_location) (ClutterInputMethod *im,
|
void (* set_cursor_location) (ClutterInputMethod *im,
|
||||||
const graphene_rect_t *rect);
|
const ClutterRect *rect);
|
||||||
void (* set_surrounding) (ClutterInputMethod *im,
|
void (* set_surrounding) (ClutterInputMethod *im,
|
||||||
const gchar *text,
|
const gchar *text,
|
||||||
guint cursor,
|
guint cursor,
|
||||||
@@ -83,8 +83,7 @@ void clutter_input_method_notify_key_event (ClutterInputMethod *im,
|
|||||||
const ClutterEvent *event,
|
const ClutterEvent *event,
|
||||||
gboolean filtered);
|
gboolean filtered);
|
||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
void clutter_input_method_set_input_panel_state (ClutterInputMethod *im,
|
void clutter_input_method_request_toggle_input_panel (ClutterInputMethod *im);
|
||||||
ClutterInputPanelState state);
|
|
||||||
|
|
||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
void clutter_input_method_forward_key (ClutterInputMethod *im,
|
void clutter_input_method_forward_key (ClutterInputMethod *im,
|
||||||
|
@@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) 2019 Red Hat
|
|
||||||
*
|
|
||||||
* 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 of the
|
|
||||||
* License, 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, write to the Free Software
|
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|
||||||
* 02111-1307, USA.
|
|
||||||
*
|
|
||||||
* Author: Olivier Fourdan <ofourdan@redhat.com>
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __CLUTTER_INPUT_POINTER_A11Y_H__
|
|
||||||
#define __CLUTTER_INPUT_POINTER_A11Y_H__
|
|
||||||
|
|
||||||
#include <clutter/clutter-types.h>
|
|
||||||
#include "clutter-enum-types.h"
|
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
|
||||||
|
|
||||||
CLUTTER_EXPORT
|
|
||||||
void _clutter_input_pointer_a11y_add_device (ClutterInputDevice *device);
|
|
||||||
CLUTTER_EXPORT
|
|
||||||
void _clutter_input_pointer_a11y_remove_device (ClutterInputDevice *device);
|
|
||||||
CLUTTER_EXPORT
|
|
||||||
void _clutter_input_pointer_a11y_on_motion_event (ClutterInputDevice *device,
|
|
||||||
float x,
|
|
||||||
float y);
|
|
||||||
CLUTTER_EXPORT
|
|
||||||
void _clutter_input_pointer_a11y_on_button_event (ClutterInputDevice *device,
|
|
||||||
int button,
|
|
||||||
gboolean pressed);
|
|
||||||
CLUTTER_EXPORT
|
|
||||||
gboolean _clutter_is_input_pointer_a11y_enabled (ClutterInputDevice *device);
|
|
||||||
|
|
||||||
G_END_DECLS
|
|
||||||
|
|
||||||
#endif /* __CLUTTER_INPUT_POINTER_A11Y_H__ */
|
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user