├── .gitignore ├── AUTHORS ├── COPYING ├── INSTALL ├── Makefile.am ├── NEWS ├── README.md ├── autogen.sh ├── compiz-animationaddon.pc.in ├── configure.ac ├── gettext └── its │ ├── compiz.its │ └── compiz.loc ├── icons ├── Makefile.am ├── plugin-3d.svg ├── plugin-addhelper.svg ├── plugin-animationaddon.svg ├── plugin-bell.svg ├── plugin-bench.svg ├── plugin-bicubic.svg ├── plugin-crashhandler.svg ├── plugin-cubeaddon.svg ├── plugin-extrawm.svg ├── plugin-fadedesktop.svg ├── plugin-firepaint.svg ├── plugin-gears.svg ├── plugin-grid.svg ├── plugin-group.svg ├── plugin-highlightcontent.svg ├── plugin-loginout.svg ├── plugin-maximumize.svg ├── plugin-mblur.svg ├── plugin-notification.svg ├── plugin-reflex.svg ├── plugin-scalefilter.svg ├── plugin-shelf.svg ├── plugin-showdesktop.svg ├── plugin-showmouse.svg ├── plugin-splash.svg ├── plugin-trailfocus.svg ├── plugin-vidcap.svg ├── plugin-wallpaper.svg ├── plugin-widget.svg └── plugin-workspacenames.svg ├── images ├── Makefile.am ├── Star.png ├── compiz.png ├── compiz_icon.png ├── compizcap.png ├── cubecap_release.png ├── fusioncap.png ├── reflection.png ├── splash_background.png └── splash_logo.png ├── include ├── Makefile.am └── compiz-animationaddon.h ├── metadata ├── 3d.xml.in ├── Makefile.am ├── addhelper.xml.in ├── animationaddon.xml.in ├── bell.xml.in ├── bench.xml.in ├── bicubic.xml.in ├── crashhandler.xml.in ├── cubeaddon.xml.in ├── extrawm.xml.in ├── fadedesktop.xml.in ├── firepaint.xml.in ├── gears.xml.in ├── grid.xml.in ├── group.xml.in ├── highlightcontent.xml.in ├── loginout.xml.in ├── maximumize.xml.in ├── mblur.xml.in ├── notification.xml.in ├── reflex.xml.in ├── scalefilter.xml.in ├── shelf.xml.in ├── showdesktop.xml.in ├── showmouse.xml.in ├── splash.xml.in ├── trailfocus.xml.in ├── vidcap.xml.in ├── wallpaper.xml.in ├── widget.xml.in └── workspacenames.xml.in ├── po ├── ChangeLog ├── LINGUAS ├── Makevars ├── POTFILES.in ├── ar.po ├── bn.po ├── ca.po ├── cs.po ├── de.po ├── el.po ├── en_GB.po ├── es.po ├── eu.po ├── fi.po ├── fr.po ├── gl.po ├── gu.po ├── he.po ├── hi.po ├── hu.po ├── it.po ├── ja.po ├── ko.po ├── nb.po ├── nl.po ├── pl.po ├── pt.po ├── pt_BR.po ├── ru.po ├── sv.po ├── tr.po └── zh_CN.po └── src ├── 3d ├── 3d.c └── Makefile.am ├── Makefile.am ├── addhelper ├── Makefile.am └── addhelper.c ├── animationaddon ├── Makefile.am ├── airplane3d.c ├── animation_tex.h ├── animationaddon.c ├── animationaddon.h ├── beamup.c ├── burn.c ├── domino.c ├── explode3d.c ├── fold3d.c ├── glide3.c ├── leafspread.c ├── particle.c ├── polygon.c └── skewer.c ├── bell ├── Makefile.am └── bell.c ├── bench ├── Makefile.am ├── bench.c └── bench_tex.h ├── bicubic ├── Makefile.am └── bicubic.c ├── crashhandler ├── Makefile.am └── crashhandler.c ├── cubeaddon ├── Makefile.am └── cubeaddon.c ├── extrawm ├── Makefile.am └── extrawm.c ├── fadedesktop ├── Makefile.am └── fadedesktop.c ├── firepaint ├── Makefile.am ├── firepaint.c └── firepaint_tex.h ├── gears ├── Makefile.am └── gears.c ├── grid ├── Makefile.am └── grid.c ├── group ├── Makefile.am ├── cairo.c ├── group-internal.h ├── group.c ├── group_glow.h ├── init.c ├── paint.c ├── queues.c ├── selection.c └── tab.c ├── highlightcontent ├── Makefile.am └── highlightcontent.c ├── loginout ├── Makefile.am └── loginout.c ├── maximumize ├── Makefile.am └── maximumize.c ├── mblur ├── Makefile.am └── mblur.c ├── notification ├── Makefile.am └── notification.c ├── reflex ├── Makefile.am └── reflex.c ├── scalefilter ├── Makefile.am └── scalefilter.c ├── shelf ├── Makefile.am └── shelf.c ├── showdesktop ├── Makefile.am └── showdesktop.c ├── showmouse ├── Makefile.am ├── showmouse.c └── showmouse_tex.h ├── splash ├── Makefile.am └── splash.c ├── trailfocus ├── Makefile.am └── trailfocus.c ├── vidcap ├── Makefile.am ├── vidcap.c └── wcap-decode.h ├── wallpaper ├── Makefile.am └── wallpaper.c ├── widget ├── Makefile.am └── widget.c └── workspacenames ├── Makefile.am └── workspacenames.c /.gitignore: -------------------------------------------------------------------------------- 1 | *.desktop 2 | *.gmo 3 | *.la 4 | *.lo 5 | *.moc.cpp 6 | *.o 7 | *.pc 8 | *.schemas 9 | *~ 10 | .deps 11 | .libs 12 | ABOUT-NLS 13 | ChangeLog 14 | Makefile 15 | Makefile.in 16 | aclocal.m4 17 | autom4te.cache 18 | compile 19 | compiz-plugins-extra-[0-9].[0-9].* 20 | config.guess 21 | config.h 22 | config.h.in 23 | config.log 24 | config.rpath 25 | config.status 26 | config.sub 27 | configure 28 | configure.lineno 29 | cscope.* 30 | depcomp 31 | doltcompile 32 | doltlibtool 33 | install-sh 34 | libtool 35 | ltmain.sh 36 | m4 37 | metadata/*.xml 38 | missing 39 | mkinstalldirs 40 | po/Makefile.in.in 41 | po/Makevars.template 42 | po/POTFILES 43 | po/Rules-quot 44 | po/boldquot.sed 45 | po/compiz-plugins-extra.pot 46 | po/en@boldquot.header 47 | po/en@quot.header 48 | po/insert-header.sin 49 | po/quot.sed 50 | po/remove-potcdate.sed 51 | po/remove-potcdate.sin 52 | po/stamp-po 53 | shave 54 | shave-libtool 55 | # *.c and *.h source files autogenerated with bcop: 56 | src/*/*_options.[ch] 57 | stamp-h1 58 | 59 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Lead Developers: 2 | -------------------------------------------- 3 | Danny Baumann 4 | David Reveman 5 | Dennis Kasprzyk 6 | Erkin Bahceci 7 | iXce - Guillaume Seguin 8 | Kristian Lyngstøl 9 | 10 | Contributors: 11 | -------------------------------------------- 12 | Andrew Wedderburn(artwork) 13 | Treviño - 3v1n0 14 | Travis Watkins 15 | Roland Baer 16 | Robert Carr 17 | Quinnstorm 18 | Roi Cohen 19 | Diogo Ferreira 20 | 21 | Translators: 22 | -------------------------------------------- 23 | de Patrick Niklaus , Danny Baumann , Nick Bauermeister , Thorsten Sperber , Markus Latarius , Johannes Engel 24 | el Δημήτρης (djdoo) , Βασίλης (Aneurysm) , Κώστας (diafanos) , Thodo Mitch (Teddy) , Dimman Ramone (dimmanramone) 25 | fr iXce - Guillaume Seguin , Sylvain Debray (syldeb35) , xsnake - Carl Garand 26 | gu Ankit Patel 27 | it Marco Trevisan (Treviño) , Fabio Fiorentini (Ahren / FaBBio) , Andrea De Iacovo (Firstbit), Emiliano Perulli 28 | pl Karol Sikora (elektrrrus) , Adam Kremienowski (kremien) , Jakub Chromiak (silverado), Mariusz Fik (fisiu) 29 | pt Nicolau Goncalves (Excentrik) 30 | sv Daniel Nylander , Erik Eloff (Loffe) 31 | zh Thruth Wang 32 | 33 | Note: 34 | ------------------------------------------------------------------------------- 35 | If you have contributed something significant to fusion-plugins 36 | and your name is missing here, please email the lead developers 37 | with your Full name, email address, country and a brief 38 | reminder of what you have done. 39 | 40 | Format : 41 | ------------------------------------------------------------------------------- 42 | In order to parse AUTHORS files some rules must be followed : 43 | 44 | 1 - Each first chapter line must end by ':' 45 | The recognized chapter names are : 46 | "Developer:", "Developers:", "Contributors:", Note:", "Website:", "Documenters:" 47 | and "Translators:". 48 | 49 | 2 - Each item of the "Translators" chapter must begin by the locale keyword. 50 | This keyword must be followed by a space. 51 | -------------------------------------------------------------------------------- /Makefile.am: -------------------------------------------------------------------------------- 1 | ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} 2 | 3 | SUBDIRS = metadata include po src images icons 4 | 5 | EXTRA_DIST = \ 6 | AUTHORS \ 7 | COPYING \ 8 | NEWS \ 9 | README.md \ 10 | autogen.sh \ 11 | compiz-animationaddon.pc.in \ 12 | gettext 13 | 14 | if ANIMATIONADDON_PLUGIN 15 | animationaddondata = compiz-animationaddon.pc 16 | endif 17 | 18 | pkgconfigdir = $(libdir)/pkgconfig 19 | pkgconfig_DATA = $(animationaddondata) 20 | 21 | # Build ChangeLog from GIT history 22 | ChangeLog: 23 | $(AM_V_GEN) if test -d $(top_srcdir)/.git; then \ 24 | GIT_DIR="$(top_srcdir)/.git" git log --stat > $@; \ 25 | fi 26 | 27 | dist: ChangeLog 28 | 29 | .PHONY: ChangeLog 30 | -------------------------------------------------------------------------------- /NEWS: -------------------------------------------------------------------------------- 1 | Release 0.8.18 (2020-04-04 The Compiz Reloaded Team) 2 | ================================================================== 3 | COMPIZ-RELOADED 4 | 5 | Add workspacenames plugin (migrated from -experimental) 6 | 7 | Update French translations 8 | 9 | Add a contrast differentiation mode in ADDHelper 10 | 11 | showmouse: add option to initiate automatically on startup 12 | 13 | First attempt at writing a plugin showing speech synthesis: highlightcontent 14 | 15 | grid: fix issues with cycling through window sizes caused by extents 16 | 17 | Fix grid bug that prevented certain windows (chromium based, others) from updating properly 18 | 19 | Fix up DEBUG calls to refer to correct variables 20 | 21 | fix make distcheck command 22 | 23 | showmouse: Fix behavior with particles activation setting 24 | 25 | showmouse: Fix toggling crosshairs while active 26 | 27 | showmouse: Rewrite crosshair drawing to be affected by neg and colorfilter 28 | 29 | wallpaper: Fix calloc call 30 | 31 | Add and improve the bell plugin imported from https://github.com/CarterWeron/compiz-bell-plugin 32 | 33 | Release 0.8.16 (2018-11-11 Scott Moreau ) 34 | ================================================================== 35 | COMPIZ-RELOADED 36 | 37 | Introduce auto fade and directory support in wallpaper plugin 38 | 39 | Add vidcap plugin 40 | 41 | Import icons from ccsm 42 | 43 | Grid improvements 44 | 45 | Add support for gtk frame extents 46 | 47 | Add new crosshair mode to showmouse 48 | 49 | Release 0.8.14 (2017-04-18 Scott Moreau ) 50 | ================================================================== 51 | COMPIZ-RELOADED 52 | 53 | Notification improvements 54 | 55 | Updated catalan translation 56 | 57 | Fix potential crash in animationaddon when restarting compiz 58 | 59 | Backport grid snap feature 60 | 61 | Release 0.8.12.1 (2016-04-10 Sorokin Alexei ) 62 | ================================================================== 63 | COMPIZ-RELOADED 64 | 65 | Include autogen.sh into the tarball. 66 | 67 | Remove Gtk2 requirement from libnotify plugin. 68 | 69 | Release 0.8.12 (2016-02-12 Sorokin Alexei ) 70 | ================================================================ 71 | COMPIZ-RELOADED 72 | 73 | Add font family configuration in Group/Tab (Tabbar font), and 74 | Scale title filter plugins. 75 | 76 | Release 0.8.9 (2015-11-06 Wolfgang Ulbrich ) 77 | ================================================================== 78 | COMPIZ-RELOADED 79 | 80 | Maintenance release. 81 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # compiz-plugins-extra 2 | 3 | Futher development of Compiz 0.8.x series (compiz-reloaded). 4 | 5 | Community extra Compiz compositing manager plugins. 6 | -------------------------------------------------------------------------------- /autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Run this to generate all the initial makefiles, etc. 3 | 4 | srcdir=$(dirname "$0") 5 | [ -z "$srcdir" ] && srcdir="." 6 | cd "$srcdir" 7 | 8 | PKG_NAME="compiz-plugins-extra" 9 | 10 | if [ ! -f "$srcdir/configure.ac" ]; then 11 | echo -n "**Error**: Directory "\`"$srcdir"\'" does not look like the" 12 | echo " top-level $PKG_NAME directory" 13 | exit 1 14 | fi 15 | 16 | mkdir -p m4 17 | aclocal -I m4 --install || exit 1 18 | autoreconf --verbose --force --install || exit 1 19 | 20 | cd "$OLDPWD" || exit $? 21 | if [ -z "$NOCONFIGURE" ]; then 22 | "$srcdir/configure" "$@" || exit 1 23 | fi 24 | -------------------------------------------------------------------------------- /compiz-animationaddon.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: compiz-animationaddon 7 | Description: Animation Addon plugin for compiz 8 | Version: @VERSION@ 9 | 10 | Requires: 11 | Libs: 12 | Cflags: @COMPIZ_CFLAGS@ 13 | -------------------------------------------------------------------------------- /configure.ac: -------------------------------------------------------------------------------- 1 | AC_PREREQ(2.57) 2 | 3 | AC_INIT([compiz-plugins-extra], [0.8.18], [chat-to-me@raveit.de], 4 | [compiz-plugins-extra], [https://gitlab.com/compiz/compiz-plugins-extra]) 5 | AM_INIT_AUTOMAKE([1.9 foreign dist-xz no-dist-gzip check-news]) 6 | AC_CONFIG_HEADER([config.h]) 7 | AM_MAINTAINER_MODE 8 | 9 | AC_ISC_POSIX 10 | AC_PROG_CC 11 | AC_PROG_CPP 12 | LT_INIT 13 | AC_HEADER_STDC 14 | AC_CHECK_HEADERS([stdlib.h sys/time.h unistd.h]) 15 | AC_CONFIG_MACRO_DIR([m4]) 16 | AM_GNU_GETTEXT([external]) 17 | AM_GNU_GETTEXT_VERSION([0.19.7]) 18 | AM_GNU_GETTEXT_REQUIRE_VERSION([0.19.7]) 19 | GETTEXT_PACKAGE=AC_PACKAGE_NAME 20 | AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.]) 21 | AC_SUBST(GETTEXT_PACKAGE) 22 | 23 | dnl The following case statement works around a bug present in 24 | dnl gettext-0.20 and gettext-0.20.1 which occurs at 'make dist' 25 | dnl and 'make distcheck' invocations. 26 | dnl https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=commitdiff;h=2336451ed68d91ff4b5ae1acbc1eca30e47a86a9 27 | 28 | dnl Unless --for-msgfmt is functional, assign the value that 29 | dnl was default before --for-msgfmt was introduced: 30 | case `LC_ALL=C $MSGMERGE --version | sed 1q | sed -e 's,^[[^0-9]]*,,'` in 31 | 0.20|0.20.1) 32 | MSGMERGE_FOR_MSGFMT_OPTION='--no-fuzzy-matching --no-location --quiet' ;; 33 | esac 34 | 35 | if test "x$GCC" = "xyes"; then 36 | case " $CFLAGS " in 37 | *[[\ \ ]]-Wall[[\ \ ]]*) ;; 38 | *) CFLAGS="$CFLAGS -Wall" ;; 39 | esac 40 | 41 | case " $CFLAGS " in 42 | *[[\ \ ]]-Wpointer-arith[[\ \ ]]*) ;; 43 | *) CFLAGS="$CFLAGS -Wpointer-arith" ;; 44 | esac 45 | 46 | case " $CFLAGS " in 47 | *[[\ \ ]]-Wstrict-prototypes[[\ \ ]]*) ;; 48 | *) CFLAGS="$CFLAGS -Wstrict-prototypes" ;; 49 | esac 50 | 51 | case " $CFLAGS " in 52 | *[[\ \ ]]-Wmissing-prototypes[[\ \ ]]*) ;; 53 | *) CFLAGS="$CFLAGS -Wmissing-prototypes" ;; 54 | esac 55 | 56 | case " $CFLAGS " in 57 | *[[\ \ ]]-Wmissing-declarations[[\ \ ]]*) ;; 58 | *) CFLAGS="$CFLAGS -Wmissing-declarations" ;; 59 | esac 60 | 61 | case " $CFLAGS " in 62 | *[[\ \ ]]-Wnested-externs[[\ \ ]]*) ;; 63 | *) CFLAGS="$CFLAGS -Wnested-externs" ;; 64 | esac 65 | 66 | case " $CFLAGS " in 67 | *[[\ \ ]]-fno-strict-aliasing[[\ \ ]]*) ;; 68 | *) CFLAGS="$CFLAGS -fno-strict-aliasing" ;; 69 | esac 70 | 71 | if test "x$enable_ansi" = "xyes"; then 72 | case " $CFLAGS " in 73 | *[[\ \ ]]-ansi[[\ \ ]]*) ;; 74 | *) CFLAGS="$CFLAGS -ansi" ;; 75 | esac 76 | 77 | case " $CFLAGS " in 78 | *[[\ \ ]]-pedantic[[\ \ ]]*) ;; 79 | *) CFLAGS="$CFLAGS -pedantic" ;; 80 | esac 81 | fi 82 | fi 83 | 84 | AC_C_BIGENDIAN 85 | AC_SYS_LARGEFILE 86 | 87 | plugindir=$libdir/compiz 88 | AC_SUBST(plugindir) 89 | 90 | imagedir=$datadir/compiz 91 | AC_SUBST(imagedir) 92 | 93 | metadatadir=$datadir/compiz 94 | AC_SUBST(metadatadir) 95 | 96 | pluginiconsdir=$datadir/compiz/icons/hicolor 97 | AC_SUBST(pluginiconsdir) 98 | 99 | dnl ============================================================ 100 | dnl Check for the pkg-config path. 101 | if test x"$PKG_CONFIG_PATH" = x; then 102 | PKG_CONFIG_PATH=${prefix}/lib/pkgconfig:${prefix}/share/pkgconfig 103 | else 104 | PKG_CONFIG_PATH=${prefix}/lib/pkgconfig:${prefix}/share/pkgconfig:${PKG_CONFIG_PATH} 105 | fi 106 | export PKG_CONFIG_PATH 107 | AC_SUBST(PKG_CONFIG_PATH) 108 | AC_MSG_NOTICE([Using PKG_CONFIG_PATH=$PKG_CONFIG_PATH]) 109 | 110 | PKG_CHECK_MODULES(COMPIZ, compiz) 111 | PKG_CHECK_MODULES(BCOP, bcop >= 0.7.3, [bcop_found=yes]) 112 | if test "$bcop_found" = yes; then 113 | if test -z "$PKG_CONFIG"; then 114 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) 115 | fi 116 | if test "$PKG_CONFIG" != "no" ; then 117 | BCOP_BIN=`$PKG_CONFIG --variable=bin bcop` 118 | AC_SUBST(BCOP_BIN) 119 | fi 120 | fi 121 | 122 | AC_MSG_CHECKING(for GL_CFLAGS) 123 | AC_ARG_WITH(gl-cflags, [ --with-gl-cflags=CFLAGS ], 124 | [GL_CFLAGS="$withval"], 125 | [GL_CFLAGS=""]) 126 | 127 | AC_MSG_RESULT($GL_CFLAGS) 128 | AC_MSG_CHECKING(for GL_LIBS) 129 | AC_ARG_WITH(gl-libs, [ --with-gl-libs=LIBS ], 130 | [GL_LIBS="$withval"], 131 | [GL_LIBS="-lGL"]) 132 | AC_MSG_RESULT($GL_LIBS) 133 | 134 | AC_SUBST(GL_CFLAGS) 135 | AC_SUBST(GL_LIBS) 136 | 137 | 138 | PKG_CHECK_MODULES([BELL], [libcanberra libxsettings-client], [bell_plugin=yes], [bell_plugin=no]) 139 | AM_CONDITIONAL([BELL_PLUGIN], [test "x$bell_plugin" = "xyes"]) 140 | 141 | PKG_CHECK_MODULES(GROUP, compiz-text cairo >= 1.0, [use_group=yes], [use_group=no]) 142 | AM_CONDITIONAL(GROUP_PLUGIN, test "x$use_group" = "xyes") 143 | 144 | PKG_CHECK_MODULES(SCALEFILTER, compiz-text compiz-scale, [use_scalefilter=yes], [use_scalefilter=no]) 145 | AM_CONDITIONAL(SCALEFILTER_PLUGIN, test "x$use_scalefilter" = "xyes") 146 | 147 | PKG_CHECK_MODULES(COMPIZCUBE, compiz-cube, [have_compiz_cube=yes], [have_compiz_cube=no]) 148 | AM_CONDITIONAL(CUBEADDON_PLUGIN, test "x$have_compiz_cube" = "xyes") 149 | AM_CONDITIONAL(THREED_PLUGIN, test "x$have_compiz_cube" = "xyes") 150 | 151 | PKG_CHECK_MODULES(SHOWMOUSE, compiz-mousepoll cairo-xlib cairo xrender, [use_showmouse=yes], [use_showmouse=no]) 152 | AM_CONDITIONAL(SHOWMOUSE_PLUGIN, test "x$use_showmouse" = "xyes") 153 | 154 | PKG_CHECK_MODULES(HIGHLIGHTCONTENT, compiz-focuspoll cairo-xlib cairo xrender, [use_highlightcontent=yes], [use_highlightcontent=no]) 155 | AM_CONDITIONAL(HIGHLIGHTCONTENT_PLUGIN, test "x$use_highlightcontent" = "xyes") 156 | 157 | PKG_CHECK_EXISTS(libnotify > 0.6.0, [have_libnotify_0_7_0=yes], [have_libnotify_0_7_0=no]) 158 | if test "$have_libnotify_0_7_0" = yes; then 159 | PKG_CHECK_MODULES(LIBNOTIFY, libnotify, [have_libnotify=yes], [have_libnotify=no]) 160 | else 161 | PKG_CHECK_MODULES(LIBNOTIFY, libnotify gtk+-2.0, [have_libnotify=yes], [have_libnotify=no]) 162 | fi 163 | AM_CONDITIONAL(NOTIFICATION_PLUGIN, test "x$have_libnotify" = "xyes") 164 | if test "$have_libnotify" = yes; then 165 | AC_DEFINE(USE_NOTIFICATION, 1, [Build notification plugin]) 166 | if test "$have_libnotify_0_7_0" = yes; then 167 | AC_DEFINE(HAVE_LIBNOTIFY_0_7_0, 1, [libnotify >= 0.7.0 present]) 168 | fi 169 | fi 170 | 171 | PKG_CHECK_MODULES(COMPIZANIMATION, compiz-animation, [have_compiz_animation=yes], [have_compiz_animation=no]) 172 | AM_CONDITIONAL(ANIMATIONADDON_PLUGIN, test "x$have_compiz_animation" = "xyes") 173 | 174 | PKG_CHECK_MODULES(COMPIZTEXT, compiz-text, [have_compiz_text=yes], [have_compiz_text=no]) 175 | AM_CONDITIONAL(WORKSPACENAMES_PLUGIN, test "x$have_compiz_text" = "xyes") 176 | 177 | AC_PATH_PROG(UPDATE_ICON_CACHE, gtk-update-icon-cache) 178 | 179 | AC_OUTPUT([ 180 | compiz-animationaddon.pc 181 | Makefile 182 | icons/Makefile 183 | images/Makefile 184 | include/Makefile 185 | metadata/Makefile 186 | src/Makefile 187 | src/3d/Makefile 188 | src/addhelper/Makefile 189 | src/animationaddon/Makefile 190 | src/bell/Makefile 191 | src/bench/Makefile 192 | src/bicubic/Makefile 193 | src/crashhandler/Makefile 194 | src/cubeaddon/Makefile 195 | src/extrawm/Makefile 196 | src/fadedesktop/Makefile 197 | src/firepaint/Makefile 198 | src/gears/Makefile 199 | src/grid/Makefile 200 | src/group/Makefile 201 | src/highlightcontent/Makefile 202 | src/maximumize/Makefile 203 | src/mblur/Makefile 204 | src/notification/Makefile 205 | src/reflex/Makefile 206 | src/scalefilter/Makefile 207 | src/shelf/Makefile 208 | src/showdesktop/Makefile 209 | src/splash/Makefile 210 | src/trailfocus/Makefile 211 | src/widget/Makefile 212 | src/showmouse/Makefile 213 | src/loginout/Makefile 214 | src/vidcap/Makefile 215 | src/wallpaper/Makefile 216 | src/workspacenames/Makefile 217 | po/Makefile.in 218 | ]) 219 | -------------------------------------------------------------------------------- /gettext/its/compiz.its: -------------------------------------------------------------------------------- 1 | 2 | 5 | 7 | 9 | 11 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /gettext/its/compiz.loc: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /icons/Makefile.am: -------------------------------------------------------------------------------- 1 | iconsdir = $(pluginiconsdir)/scalable/apps 2 | icons_DATA = \ 3 | plugin-3d.svg \ 4 | plugin-addhelper.svg \ 5 | plugin-animationaddon.svg \ 6 | plugin-bell.svg \ 7 | plugin-bench.svg \ 8 | plugin-bicubic.svg \ 9 | plugin-crashhandler.svg \ 10 | plugin-cubeaddon.svg \ 11 | plugin-extrawm.svg \ 12 | plugin-fadedesktop.svg \ 13 | plugin-firepaint.svg \ 14 | plugin-gears.svg \ 15 | plugin-grid.svg \ 16 | plugin-group.svg \ 17 | plugin-highlightcontent.svg \ 18 | plugin-loginout.svg \ 19 | plugin-maximumize.svg \ 20 | plugin-mblur.svg \ 21 | plugin-notification.svg \ 22 | plugin-reflex.svg \ 23 | plugin-scalefilter.svg \ 24 | plugin-shelf.svg \ 25 | plugin-showdesktop.svg \ 26 | plugin-showmouse.svg \ 27 | plugin-splash.svg \ 28 | plugin-trailfocus.svg \ 29 | plugin-vidcap.svg \ 30 | plugin-wallpaper.svg \ 31 | plugin-widget.svg \ 32 | plugin-workspacenames.svg 33 | 34 | EXTRA_DIST = \ 35 | $(icons_DATA) 36 | 37 | install-data-hook: 38 | if test x$(DESTDIR) = x; then \ 39 | $(UPDATE_ICON_CACHE) -f -t $(pluginiconsdir); \ 40 | fi 41 | 42 | uninstall-local: 43 | if test x$(DESTDIR) = x; then \ 44 | rm $(pluginiconsdir)/icon-theme.cache; \ 45 | fi 46 | -------------------------------------------------------------------------------- /icons/plugin-crashhandler.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | 13 | 15 | 19 | 23 | 27 | 28 | 30 | 34 | 38 | 39 | 41 | 45 | 49 | 50 | 52 | 56 | 60 | 61 | 63 | 67 | 71 | 72 | 81 | 90 | 99 | 109 | 119 | 128 | 129 | 131 | 135 | 139 | 143 | 147 | 151 | 155 | 156 | 157 | -------------------------------------------------------------------------------- /icons/plugin-workspacenames.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | image/svg+xml 28 | 29 | 30 | 31 | Patrick Niklaus 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | A 58 | B 59 | C 60 | D 61 | 62 | -------------------------------------------------------------------------------- /images/Makefile.am: -------------------------------------------------------------------------------- 1 | imagesdir = $(imagedir) 2 | images_DATA = \ 3 | reflection.png \ 4 | fusioncap.png \ 5 | compizcap.png \ 6 | compiz_icon.png \ 7 | splash_background.png \ 8 | splash_logo.png 9 | 10 | EXTRA_DIST = \ 11 | reflection.png \ 12 | fusioncap.png \ 13 | compizcap.png \ 14 | compiz_icon.png \ 15 | splash_background.png \ 16 | splash_logo.png 17 | -------------------------------------------------------------------------------- /images/Star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/compiz-reloaded/compiz-plugins-extra/3441d027884b37194ca821b8e689d5d569058960/images/Star.png -------------------------------------------------------------------------------- /images/compiz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/compiz-reloaded/compiz-plugins-extra/3441d027884b37194ca821b8e689d5d569058960/images/compiz.png -------------------------------------------------------------------------------- /images/compiz_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/compiz-reloaded/compiz-plugins-extra/3441d027884b37194ca821b8e689d5d569058960/images/compiz_icon.png -------------------------------------------------------------------------------- /images/compizcap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/compiz-reloaded/compiz-plugins-extra/3441d027884b37194ca821b8e689d5d569058960/images/compizcap.png -------------------------------------------------------------------------------- /images/cubecap_release.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/compiz-reloaded/compiz-plugins-extra/3441d027884b37194ca821b8e689d5d569058960/images/cubecap_release.png -------------------------------------------------------------------------------- /images/fusioncap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/compiz-reloaded/compiz-plugins-extra/3441d027884b37194ca821b8e689d5d569058960/images/fusioncap.png -------------------------------------------------------------------------------- /images/reflection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/compiz-reloaded/compiz-plugins-extra/3441d027884b37194ca821b8e689d5d569058960/images/reflection.png -------------------------------------------------------------------------------- /images/splash_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/compiz-reloaded/compiz-plugins-extra/3441d027884b37194ca821b8e689d5d569058960/images/splash_background.png -------------------------------------------------------------------------------- /images/splash_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/compiz-reloaded/compiz-plugins-extra/3441d027884b37194ca821b8e689d5d569058960/images/splash_logo.png -------------------------------------------------------------------------------- /include/Makefile.am: -------------------------------------------------------------------------------- 1 | compizincludedir = $(includedir)/compiz 2 | 3 | if ANIMATIONADDON_PLUGIN 4 | animationaddoninclude = compiz-animationaddon.h 5 | endif 6 | 7 | compizinclude_HEADERS = \ 8 | $(animationaddoninclude) 9 | -------------------------------------------------------------------------------- /include/compiz-animationaddon.h: -------------------------------------------------------------------------------- 1 | #ifndef _COMPIZ_ANIMATIONADDON_H 2 | #define _COMPIZ_ANIMATIONADDON_H 3 | 4 | #define ANIMATIONADDON_ABIVERSION 20081023 5 | 6 | 7 | // Polygon tesselation type: Rectangular, Hexagonal 8 | typedef enum 9 | { 10 | PolygonTessRect = 0, 11 | PolygonTessHex, 12 | PolygonTessGlass 13 | } PolygonTess; 14 | #define LAST_POLYGON_TESS 2 15 | 16 | // This is intended to be a closed 3D piece of a window with convex polygon 17 | // faces and quad-strip sides. Since decoration texture is separate from 18 | // the window texture, it is more complicated than it would be with a single 19 | // texture: we use glClipPlane with the rectangles (clips) to clip 3D space 20 | // to the region falling within that clip. 21 | // If the polygon is on an edge/corner, it also has 2D shadow quad(s) 22 | // (to be faded out at the beginning of 3D animation if necessary). 23 | typedef struct _PolygonObject 24 | { 25 | int nVertices; // number of total vertices (front + back) 26 | int nSides; // number of sides 27 | GLfloat *vertices; // Positions of vertices relative to center 28 | GLushort *sideIndices; // Indices of quad strip for "sides" 29 | GLfloat *normals; // Surface normals for 2+nSides faces 30 | 31 | Box boundingBox; // Bound. box to test intersection with clips 32 | 33 | // Animation effect parameters 34 | 35 | Point3d centerPosStart; // Starting position of center 36 | float rotAngleStart; // Starting rotation angle 37 | 38 | Point3d centerPos; // Position of center 39 | Vector3d rotAxis; // Rotation axis vector 40 | float rotAngle; // Rotation angle 41 | Point3d rotAxisOffset; // Rotation axis translate amount 42 | 43 | Point centerRelPos; // Relative pos of center within the window 44 | 45 | Vector3d finalRelPos; // Velocity factor for scripted movement 46 | float finalRotAng; // Final rotation angle around rotAxis 47 | 48 | float moveStartTime; // Movement starts at this time ([0-1] range) 49 | float moveDuration; // Movement lasts this long ([0-1] range) 50 | 51 | float fadeStartTime; // Fade out starts at this time ([0,1] range) 52 | float fadeDuration; // Duration of fade out ([0,1] range) 53 | 54 | void *effectParameters; /* Pointer to a struct that can contain 55 | custom parameters for an individual effect */ 56 | 57 | float boundSphereRadius; // Radius of bounding sphere 58 | } PolygonObject; 59 | 60 | typedef struct _Clip4Polygons // Rectangular clips 61 | { // (to hold clips passed to AddWindowGeometry) 62 | int id; // clip id (what number this clip is among 63 | // passed clips) 64 | Box box; // Coords 65 | Boxf boxf; // Float coords (for small clipping adjustment) 66 | CompMatrix texMatrix; // Corresponding texture coord. matrix 67 | int *intersectingPolygons; 68 | int nIntersectingPolygons; // Clips (in PolygonSet) that intersect 69 | GLfloat *polygonVertexTexCoords; 70 | // Tex coords for each intersecting polygon and for each vertex 71 | // ordered as p1.v1.x, p1.v1.y, p1.v2.x, p1.v2.y, p2.v1.x, p2.v1.y, ... 72 | } Clip4Polygons; 73 | 74 | typedef enum 75 | { 76 | CorrectPerspectiveNone = 0, 77 | CorrectPerspectivePolygon, 78 | CorrectPerspectiveWindow 79 | } CorrectPerspective; 80 | 81 | typedef struct _PolygonSet // Polygon objects with same thickness 82 | { 83 | int nClips; // Rect. clips collected in AddWindowGeometries 84 | Clip4Polygons *clips; // List of clips 85 | int clipCapacity; // # of clips this list can hold 86 | int firstNondrawnClip; 87 | int *lastClipInGroup; // index of the last clip in each group of clips 88 | // drawn in drawGeometry func. 89 | 90 | Bool doDepthTest; // whether depth testing should be used in the effect 91 | Bool doLighting; // whether lighting should be used in the effect 92 | CorrectPerspective correctPerspective; 93 | PolygonObject *polygons; // The polygons in this set 94 | int nPolygons; 95 | float thickness; // Window thickness (depth along z axis) 96 | int nTotalFrontVertices; // Total # of polygon vertices on front faces 97 | float backAndSidesFadeDur; // How long side and back faces should fade in/out 98 | float allFadeDuration; /* Duration of fade out at the end in [0,1] range 99 | when all polygons fade out at the same time. 100 | If >-1, this overrides fadeDuration in PolygonObject */ 101 | 102 | Bool includeShadows; // include shadows in polygon 103 | 104 | void (*extraPolygonTransformFunc) (PolygonObject *); 105 | } PolygonSet; 106 | 107 | typedef struct _Particle 108 | { 109 | float life; // particle life 110 | float fade; // fade speed 111 | float width; // particle width 112 | float height; // particle height 113 | float w_mod; // particle size modification during life 114 | float h_mod; // particle size modification during life 115 | float r; // red value 116 | float g; // green value 117 | float b; // blue value 118 | float a; // alpha value 119 | float x; // X position 120 | float y; // Y position 121 | float z; // Z position 122 | float xi; // X direction 123 | float yi; // Y direction 124 | float zi; // Z direction 125 | float xg; // X gravity 126 | float yg; // Y gravity 127 | float zg; // Z gravity 128 | float xo; // orginal X position 129 | float yo; // orginal Y position 130 | float zo; // orginal Z position 131 | } Particle; 132 | 133 | typedef struct _ParticleSystem 134 | { 135 | int numParticles; 136 | Particle *particles; 137 | float slowdown; 138 | GLuint tex; 139 | Bool active; 140 | int x, y; 141 | float darken; 142 | GLuint blendMode; 143 | 144 | // Moved from drawParticles to get rid of spurious malloc's 145 | GLfloat *vertices_cache; 146 | int vertex_cache_count; 147 | GLfloat *coords_cache; 148 | int coords_cache_count; 149 | GLfloat *colors_cache; 150 | int color_cache_count; 151 | GLfloat *dcolors_cache; 152 | int dcolors_cache_count; 153 | } ParticleSystem; 154 | 155 | // Window properties for particle or polygon based animation effects 156 | typedef struct _AnimWindowEngineData 157 | { 158 | // for polygon engine 159 | PolygonSet *polygonSet; 160 | 161 | // for particle engine 162 | int numPs; 163 | ParticleSystem *ps; 164 | } AnimWindowEngineData; 165 | 166 | 167 | typedef Bool 168 | (*tessellateProc) (CompWindow * w, 169 | int gridSizeX, 170 | int gridSizeY, 171 | float thickness); 172 | 173 | // Animaddon plugin functions for extension plugins to call 174 | // (only for plugins with effects that use polygon or particle engines). 175 | typedef struct _AnimAddonFunctions { 176 | AnimWindowEngineData * (*getAnimWindowEngineData) (CompWindow *w); 177 | int (*getIntenseTimeStep) (CompScreen *s); 178 | 179 | // Particle engine functions 180 | void (*initParticles) (int numParticles, 181 | ParticleSystem * ps); 182 | void (*finiParticles) (ParticleSystem * ps); 183 | void (*drawParticleSystems) (CompWindow *w); 184 | UpdateBBProc particlesUpdateBB; 185 | void (*particlesCleanup) (CompWindow * w); 186 | Bool (*particlesPrePrepPaintScreen) (CompWindow * w, 187 | int msSinceLastPaint); 188 | 189 | // Polygon engine functions 190 | Bool (*polygonsAnimInit) (CompWindow * w); 191 | void (*polygonsAnimStep) (CompWindow * w, float time); 192 | void (*polygonsPrePaintWindow) (CompWindow * w); 193 | void (*polygonsPostPaintWindow) (CompWindow * w); 194 | void (*polygonsStoreClips) (CompWindow * w, 195 | int nClip, BoxPtr pClip, 196 | int nMatrix, CompMatrix * matrix); 197 | void (*polygonsDrawCustomGeometry) (CompWindow * w); 198 | UpdateBBProc polygonsUpdateBB; 199 | Bool (*polygonsPrePreparePaintScreen) (CompWindow *w, 200 | int msSinceLastPaint); 201 | void (*polygonsCleanup) (CompWindow *w); 202 | void (*polygonsRefresh) (CompWindow *w, 203 | Bool animInitialized); 204 | void (*polygonsDeceleratingAnimStepPolygon) (CompWindow * w, 205 | PolygonObject *p, 206 | float forwardProgress); 207 | void (*freePolygonObjects) (PolygonSet * pset); 208 | tessellateProc tessellateIntoRectangles; 209 | tessellateProc tessellateIntoHexagons; 210 | tessellateProc tessellateIntoGlass; 211 | } AnimAddonFunctions; 212 | 213 | typedef void (*AnimStepPolygonProc) (CompWindow *w, 214 | PolygonObject *p, 215 | float forwardProgress); 216 | 217 | typedef struct _AnimAddonEffectProperties 218 | { 219 | AnimStepPolygonProc animStepPolygonFunc; 220 | } AnimAddonEffectProperties; 221 | 222 | #endif 223 | 224 | -------------------------------------------------------------------------------- /metadata/3d.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 3D Windows 5 | Elevates windows while rotating the cube 6 | Effects 7 | 8 | 9 | cube 10 | 11 | 12 | cube 13 | 14 | 15 | 16 | 17 | Misc. Options 18 | 23 | 30 | 37 | 42 | 43 | 44 | Window Depth 45 | 53 | 60 | 70 | 80 | 81 | Bevel Corners 82 | 87 | 92 | 97 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | -------------------------------------------------------------------------------- /metadata/Makefile.am: -------------------------------------------------------------------------------- 1 | xmldir = $(metadatadir) 2 | 3 | if ANIMATIONADDON_PLUGIN 4 | animationaddonxml = animationaddon.xml.in 5 | endif 6 | 7 | if CUBEADDON_PLUGIN 8 | cubeaddonxml = cubeaddon.xml.in 9 | endif 10 | 11 | if BELL_PLUGIN 12 | bellxml = bell.xml.in 13 | endif 14 | 15 | if GROUP_PLUGIN 16 | groupxml = group.xml.in 17 | endif 18 | 19 | if NOTIFICATION_PLUGIN 20 | notificationxml = notification.xml.in 21 | endif 22 | 23 | if SCALEFILTER_PLUGIN 24 | scalefilterxml = scalefilter.xml.in 25 | endif 26 | 27 | if SHOWMOUSE_PLUGIN 28 | showmousexml = showmouse.xml.in 29 | endif 30 | 31 | if HIGHLIGHTCONTENT_PLUGIN 32 | highlightcontentxml = highlightcontent.xml.in 33 | endif 34 | 35 | if THREED_PLUGIN 36 | threedxml = 3d.xml.in 37 | endif 38 | 39 | if WORKSPACENAMES_PLUGIN 40 | # Depends on Text 41 | workspacenamesxml = workspacenames.xml.in 42 | endif 43 | 44 | xml_in_files = \ 45 | addhelper.xml.in \ 46 | bench.xml.in \ 47 | bicubic.xml.in \ 48 | crashhandler.xml.in \ 49 | extrawm.xml.in \ 50 | fadedesktop.xml.in \ 51 | firepaint.xml.in \ 52 | gears.xml.in \ 53 | grid.xml.in \ 54 | loginout.xml.in \ 55 | maximumize.xml.in \ 56 | mblur.xml.in \ 57 | reflex.xml.in \ 58 | shelf.xml.in \ 59 | showdesktop.xml.in \ 60 | splash.xml.in \ 61 | trailfocus.xml.in \ 62 | widget.xml.in \ 63 | vidcap.xml.in \ 64 | wallpaper.xml.in \ 65 | $(animationaddonxml) \ 66 | $(cubeaddonxml) \ 67 | $(bellxml) \ 68 | $(groupxml) \ 69 | $(notificationxml) \ 70 | $(scalefilterxml) \ 71 | $(showmousexml) \ 72 | $(highlightcontentxml) \ 73 | $(threedxml) \ 74 | $(workspacenamesxml) 75 | 76 | xml_files = $(xml_in_files:.xml.in=.xml) 77 | xml_DATA = $(xml_files) 78 | 79 | %.xml: %.xml.in 80 | GETTEXTDATADIR=$(top_srcdir)/gettext $(AM_V_GEN)$(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@ 81 | 82 | EXTRA_DIST = \ 83 | $(xml_in_files) \ 84 | animationaddon.xml.in \ 85 | cubeaddon.xml.in \ 86 | bell.xml.in \ 87 | group.xml.in \ 88 | notification.xml.in \ 89 | scalefilter.xml.in \ 90 | showmouse.xml.in \ 91 | highlightcontent.xml.in \ 92 | 3d.xml.in \ 93 | workspacenames.xml.in 94 | 95 | CLEANFILES = \ 96 | $(xml_files) 97 | -------------------------------------------------------------------------------- /metadata/addhelper.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ADD Helper 5 | Make it slightly easier to concentrate by dimming all but the active window. 6 | Accessibility 7 | 8 | 9 | fade 10 | 11 | 12 | 13 | 14 | Bindings 15 | 20 | 21 | 22 | Misc. Options 23 | 28 | 33 | 40 | 47 | 54 | 61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /metadata/bell.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Audible Bell 5 | Plays an audible sound for the system bell 6 | Utility 7 | 8 | 9 | composite 10 | opengl 11 | decor 12 | 13 | 14 | 15 | 20 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /metadata/bench.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Benchmark 5 | A simple benchmark plugin 6 | Extras 7 | 8 | 9 | Main 10 | 15 | 20 | 21 | Screen Output 22 | 27 | 34 | 41 | 42 | 43 | Console Output 44 | 49 | 56 | 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /metadata/bicubic.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Bicubic filter 5 | Bicubic texture filtering 6 | Effects 7 | 8 | 9 | blur 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /metadata/crashhandler.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Crash handler 5 | Compiz crash handler plugin 6 | Utility 7 | 8 | 9 | Main 10 | 15 | 21 | 26 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /metadata/extrawm.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Extra WM Actions 5 | Provides less commonly used WM actions 6 | Window Management 7 | 8 | 12 | 16 | 20 | 24 | 28 | 32 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /metadata/fadedesktop.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Fade to Desktop 5 | Easily access your desktop 6 | Desktop 7 | 8 | 9 | fade 10 | 11 | 12 | showdesktop 13 | 14 | 21 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /metadata/firepaint.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Paint fire on the screen 5 | Paint fire or other particles on the screen 6 | Effects 7 | 8 | 13 | 18 | 23 | 28 | 32 | 33 | 34 | 41 | 49 | 57 | 65 | 75 | 80 | 87 | 88 | 89 | 90 | -------------------------------------------------------------------------------- /metadata/gears.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Cube Gears 5 | Render gears inside of the transparent cube 6 | Effects 7 | 8 | 9 | cube 10 | 11 | 12 | cube 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /metadata/highlightcontent.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Highlight Content 5 | Listens for screen reader events and renders highlight for the currently spoken word. 6 | Accessibility 7 | 8 | 9 | cube 10 | 11 | 12 | ezoom 13 | 14 | 15 | focuspoll 16 | 17 | 18 | 19 | 20 | General 21 | 26 | 31 | 36 | 41 | 42 | 43 | 44 | 45 | General 46 | 51 | 52 | 53 | Speech Options 54 | 62 | 72 | 77 | 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /metadata/loginout.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Login/Logout 5 | Login/Logout effect 6 | Effects 7 | 8 | 9 | regex 10 | 11 | 12 | decoration 13 | 14 | 15 | 16 | 17 | Login 18 | 23 | 31 | 39 | 47 | 55 | 56 | 57 | Logout 58 | 63 | 71 | 79 | 87 | 95 | 96 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /metadata/maximumize.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Maximumize 5 | Maximumizes windows (resize them to fit the available screenspace). 6 | Window Management 7 | 8 | 13 | 18 | 23 | 28 | 33 | 38 | 43 | 44 | 45 | Bindings 46 | 47 | Maximumize Bindings 48 | 53 | 58 | 63 | 68 | 73 | 78 | 83 | 88 | 93 | 98 | 103 | 104 | 105 | Minimumize Bindings 106 | 111 | 116 | 121 | 126 | 131 | 136 | 141 | 146 | 151 | 156 | 161 | 162 | 163 | 164 | 165 | 166 | -------------------------------------------------------------------------------- /metadata/mblur.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Motion blur 5 | Motion blur effect 6 | Effects 7 | 8 | 9 | Main 10 | 11 | Activate 12 | 17 | 18 | 19 | 20 | 21 | 22 | Main 23 | 24 | Visibility/Performance 25 | 40 | 48 | 49 | 50 | Activate 51 | 56 | 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /metadata/notification.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Error Notifications 5 | Display errors and other messages using libnotify. 6 | Utility 7 | 8 | 15 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /metadata/reflex.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Reflection 5 | Draws reflections 6 | Effects 7 | 8 | 9 | blur 10 | svg 11 | png 12 | imgjpeg 13 | 14 | 15 | 16 | 17 | Main 18 | 24 | 29 | 34 | 39 | 46 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /metadata/scalefilter.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Scale Window Title Filter 5 | Window title filter facility for the scale plugin 6 | Utility 7 | 8 | 9 | scale 10 | text 11 | 12 | 13 | scale 14 | regex 15 | 16 | 17 | 18 | 19 | Behaviour 20 | 27 | 32 | 37 | 38 | 39 | Appearance 40 | 46 | 51 | 58 | 65 | 75 | 85 | 86 | 87 | 88 | 89 | 90 | -------------------------------------------------------------------------------- /metadata/shelf.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Shelf 5 | Visually scales a window down to allow easy monitoring without true/traditional resizing. 6 | Window Management 7 | 8 | 9 | wall 10 | 11 | 12 | 13 | 14 | Bindings 15 | 20 | 24 | 29 | 34 | 39 | 40 | 47 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /metadata/showdesktop.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Show desktop 5 | Access your desktop easily 6 | Desktop 7 | showdesktop 8 | 9 | 10 | fade 11 | 12 | 13 | 14 | 15 | Misc. Options 16 | 24 | 32 | 67 | 72 | 73 | 74 | Appearance 75 | 83 | 90 | 91 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /metadata/showmouse.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Show mouse 5 | Increases the visibility of the mouse pointer 6 | Accessibility 7 | 8 | 9 | cube 10 | 11 | 12 | ezoom 13 | 14 | 15 | mousepoll 16 | 17 | 18 | 19 | 20 | General 21 | 26 | 31 | 36 | 41 | 42 | 43 | 44 | 45 | General 46 | 51 | 56 | 57 | 58 | Particle Options 59 | 67 | 74 | 81 | 88 | 96 | 104 | 112 | 120 | 125 | 135 | 140 | 141 | 142 | Crosshair Options 143 | 151 | 159 | 169 | 170 | 171 | 172 | 173 | -------------------------------------------------------------------------------- /metadata/splash.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Splash 5 | A simple splash plugin 6 | Extras 7 | 8 | 9 | Main 10 | 15 | 20 | 21 | 22 | Images 23 | 29 | 35 | 36 | 37 | Appearance 38 | 46 | 54 | 62 | 70 | 71 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /metadata/trailfocus.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Trailfocus 5 | Adjust the opacity, saturation and brightness of windows based on when they last had focus. 6 | Effects 7 | 8 | 9 | fade 10 | 11 | 12 | 13 | 14 | Behaviour 15 | 20 | 27 | 34 | 35 | 36 | Appearance 37 | 38 | Opacity 39 | 46 | 53 | 54 | 55 | Brightness 56 | 63 | 70 | 71 | 72 | Saturation 73 | 80 | 87 | 88 | 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /metadata/vidcap.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Vidcap 5 | Screen Recorder 6 | Utility 7 | 8 | 13 | 19 | 24 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /metadata/wallpaper.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Wallpaper 5 | Draw the desktop wallpaper 6 | Utility 7 | 8 | 9 | svg 10 | png 11 | imgjpeg 12 | 13 | 14 | 15 | 20 | 21 | 22 | 27 | 34 | 41 | 46 | 51 | 52 | Backgrounds 53 | 59 | 86 | 105 | 110 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | -------------------------------------------------------------------------------- /metadata/widget.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Widget Layer 5 | Show widget windows on a separate layer 6 | Desktop 7 | 8 | 9 | fade 10 | animation 11 | 12 | 13 | 14 | 19 | 23 | 27 | 28 | 29 | 30 | Behaviour 31 | 36 | 41 | 42 | 43 | Appearance 44 | 52 | 53 | Background in Widget Mode 54 | 61 | 68 | 69 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /metadata/workspacenames.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Workspace Naming 5 | Allows assigning descriptions to workspaces 6 | Window Management 7 | 8 | 9 | text 10 | 11 | 12 | 13 | 14 | Names 15 | 16 | Workspace Names 17 | 24 | 29 | 30 | 31 | 32 | Appearance 33 | 41 | 49 | 50 | Text Display 51 | 56 | 62 | 69 | 88 | 89 | 90 | Colors 91 | 101 | 111 | 112 | 113 | 114 | 115 | 116 | -------------------------------------------------------------------------------- /po/ChangeLog: -------------------------------------------------------------------------------- 1 | 2007-08-04 cyberorg 2 | 3 | * Add zh_CN from Thruth 4 | 5 | 2007-06-28 Guillaume Seguin 6 | 7 | * Add initial fr.po (from Sylvain Debray, xsnake and I) 8 | 9 | 2007-06-28 cyberorg 10 | 11 | * Initial internationalization of fusion plugins 12 | * Developers need to mark _() translatable strings 13 | -------------------------------------------------------------------------------- /po/LINGUAS: -------------------------------------------------------------------------------- 1 | # Set of available languages. Keep it alphabatical. One lingua per line. 2 | ar 3 | bn 4 | ca 5 | cs 6 | de 7 | el 8 | en_GB 9 | es 10 | eu 11 | fi 12 | fr 13 | gl 14 | gu 15 | he 16 | hi 17 | hu 18 | it 19 | ja 20 | ko 21 | nb 22 | nl 23 | pl 24 | pt 25 | pt_BR 26 | ru 27 | sv 28 | tr 29 | zh_CN 30 | -------------------------------------------------------------------------------- /po/Makevars: -------------------------------------------------------------------------------- 1 | # Makefile variables for PO directory in any package using GNU gettext. 2 | 3 | # Usually the message domain is the same as the package name. 4 | DOMAIN = $(PACKAGE) 5 | 6 | # These two variables depend on the location of this directory. 7 | subdir = po 8 | top_builddir = .. 9 | 10 | # These options get passed to xgettext. 11 | XGETTEXT_OPTIONS = --from-code=UTF-8 --keyword=_ --keyword=N_ --no-location 12 | 13 | # This is the copyright holder that gets inserted into the header of the 14 | # $(DOMAIN).pot file. Set this to the copyright holder of the surrounding 15 | # package. (Note that the msgstr strings, extracted from the package's 16 | # sources, belong to the copyright holder of the package.) Translators are 17 | # expected to transfer the copyright for their translations to this person 18 | # or entity, or to disclaim their copyright. The empty string stands for 19 | # the public domain; in this case the translators are expected to disclaim 20 | # their copyright. 21 | COPYRIGHT_HOLDER = gitlab.com/compiz 22 | 23 | # This tells whether or not to prepend "GNU " prefix to the package 24 | # name that gets inserted into the header of the $(DOMAIN).pot file. 25 | # Possible values are "yes", "no", or empty. If it is empty, try to 26 | # detect it automatically by scanning the files in $(top_srcdir) for 27 | # "GNU packagename" string. 28 | PACKAGE_GNU = no 29 | 30 | # This is the email address or URL to which the translators shall report 31 | # bugs in the untranslated strings: 32 | # - Strings which are not entire sentences, see the maintainer guidelines 33 | # in the GNU gettext documentation, section 'Preparing Strings'. 34 | # - Strings which use unclear terms or require additional context to be 35 | # understood. 36 | # - Strings which make invalid assumptions about notation of date, time or 37 | # money. 38 | # - Pluralisation problems. 39 | # - Incorrect English spelling. 40 | # - Incorrect formatting. 41 | # It can be your email address, or a mailing list address where translators 42 | # can write to without being subscribed, or the URL of a web page through 43 | # which the translators can contact you. 44 | MSGID_BUGS_ADDRESS = https://gitlab.com/compiz/compiz-plugins-extra/issues 45 | 46 | # This is the list of locale categories, beyond LC_MESSAGES, for which the 47 | # message catalogs shall be used. It is usually empty. 48 | EXTRA_LOCALE_CATEGORIES = 49 | 50 | # This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt' 51 | # context. Possible values are "yes" and "no". Set this to yes if the 52 | # package uses functions taking also a message context, like pgettext(), or 53 | # if in $(XGETTEXT_OPTIONS) you define keywords with a context argument. 54 | USE_MSGCTXT = no 55 | 56 | # These options get passed to msgmerge. 57 | # Useful options are in particular: 58 | # --previous to keep previous msgids of translated messages, 59 | # --quiet to reduce the verbosity. 60 | MSGMERGE_OPTIONS = 61 | 62 | # These options get passed to msginit. 63 | # If you want to disable line wrapping when writing PO files, add 64 | # --no-wrap to MSGMERGE_OPTIONS, XGETTEXT_OPTIONS, and 65 | # MSGINIT_OPTIONS. 66 | MSGINIT_OPTIONS = 67 | 68 | # This tells whether or not to regenerate a PO file when $(DOMAIN).pot 69 | # has changed. Possible values are "yes" and "no". Set this to no if 70 | # the POT file is checked in the repository and the version control 71 | # program ignores timestamps. 72 | PO_DEPENDS_ON_POT = yes 73 | 74 | # This tells whether or not to forcibly update $(DOMAIN).pot and 75 | # regenerate PO files on "make dist". Possible values are "yes" and 76 | # "no". Set this to no if the POT file and PO files are maintained 77 | # externally. 78 | DIST_DEPENDS_ON_UPDATE_PO = yes 79 | 80 | $(DOMAIN).pot-update: export GETTEXTDATADIR = $(top_srcdir)/gettext 81 | -------------------------------------------------------------------------------- /po/POTFILES.in: -------------------------------------------------------------------------------- 1 | metadata/addhelper.xml.in 2 | metadata/animationaddon.xml.in 3 | metadata/bell.xml.in 4 | metadata/bench.xml.in 5 | metadata/bicubic.xml.in 6 | metadata/crashhandler.xml.in 7 | metadata/cubeaddon.xml.in 8 | metadata/extrawm.xml.in 9 | metadata/fadedesktop.xml.in 10 | metadata/firepaint.xml.in 11 | metadata/gears.xml.in 12 | metadata/grid.xml.in 13 | metadata/group.xml.in 14 | metadata/highlightcontent.xml.in 15 | metadata/mblur.xml.in 16 | metadata/reflex.xml.in 17 | metadata/scalefilter.xml.in 18 | metadata/showdesktop.xml.in 19 | metadata/splash.xml.in 20 | metadata/trailfocus.xml.in 21 | metadata/widget.xml.in 22 | metadata/showmouse.xml.in 23 | metadata/loginout.xml.in 24 | metadata/shelf.xml.in 25 | metadata/maximumize.xml.in 26 | metadata/notification.xml.in 27 | metadata/3d.xml.in 28 | metadata/vidcap.xml.in 29 | metadata/wallpaper.xml.in 30 | metadata/workspacenames.xml.in 31 | -------------------------------------------------------------------------------- /src/3d/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | PFLAGS=-module -avoid-version -no-undefined 3 | 4 | if THREED_PLUGIN 5 | lib3d_la_LDFLAGS = $(PFLAGS) 6 | lib3d_la_LIBADD = @COMPIZ_LIBS@ @COMPIZCUBE_LIBS@ 7 | nodist_lib3d_la_SOURCES = 3d_options.c 3d_options.h 8 | dist_lib3d_la_SOURCES = 3d.c 9 | endif 10 | 11 | BUILT_SOURCES = $(nodist_lib3d_la_SOURCES) 12 | 13 | AM_CPPFLAGS = \ 14 | @COMPIZ_CFLAGS@ \ 15 | @COMPIZCUBE_CFLAGS@ \ 16 | -DDATADIR='"$(compdatadir)"' \ 17 | -DLIBDIR='"$(libdir)"' \ 18 | -DLOCALEDIR="\"@datadir@/locale\"" \ 19 | -DIMAGEDIR='"$(imagedir)"' \ 20 | -I$(top_srcdir)/include 21 | 22 | moduledir = $(plugindir) 23 | 24 | if THREED_PLUGIN 25 | module_LTLIBRARIES = lib3d.la 26 | endif 27 | 28 | CLEANFILES = *_options.c *_options.h 29 | 30 | 3d_options.h: ../../metadata/3d.xml.in 31 | $(BCOP_BIN) --header $@ $< 32 | 33 | 3d_options.c: ../../metadata/3d.xml.in 3d_options.h 34 | $(BCOP_BIN) --source $@ $< 35 | -------------------------------------------------------------------------------- /src/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | SUBDIRS = 3d \ 3 | addhelper \ 4 | animationaddon \ 5 | bell \ 6 | bench \ 7 | bicubic \ 8 | crashhandler \ 9 | cubeaddon \ 10 | extrawm \ 11 | fadedesktop \ 12 | firepaint \ 13 | gears \ 14 | grid \ 15 | group \ 16 | highlightcontent \ 17 | maximumize \ 18 | mblur \ 19 | notification \ 20 | reflex \ 21 | scalefilter \ 22 | shelf \ 23 | showdesktop \ 24 | splash \ 25 | trailfocus \ 26 | widget \ 27 | showmouse \ 28 | loginout \ 29 | vidcap \ 30 | wallpaper \ 31 | workspacenames 32 | -------------------------------------------------------------------------------- /src/addhelper/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | PFLAGS=-module -avoid-version -no-undefined 3 | 4 | libaddhelper_la_LDFLAGS = $(PFLAGS) 5 | libaddhelper_la_LIBADD = @COMPIZ_LIBS@ 6 | nodist_libaddhelper_la_SOURCES = addhelper_options.c addhelper_options.h 7 | dist_libaddhelper_la_SOURCES = addhelper.c 8 | 9 | BUILT_SOURCES = $(nodist_libaddhelper_la_SOURCES) 10 | 11 | AM_CPPFLAGS = \ 12 | @COMPIZ_CFLAGS@ \ 13 | -DDATADIR='"$(compdatadir)"' \ 14 | -DLIBDIR='"$(libdir)"' \ 15 | -DLOCALEDIR="\"@datadir@/locale\"" \ 16 | -DIMAGEDIR='"$(imagedir)"' \ 17 | -I$(top_srcdir)/include 18 | 19 | moduledir = $(plugindir) 20 | 21 | 22 | module_LTLIBRARIES = libaddhelper.la 23 | 24 | CLEANFILES = *_options.c *_options.h 25 | 26 | addhelper_options.h: ../../metadata/addhelper.xml.in 27 | $(BCOP_BIN) --header $@ $< 28 | 29 | addhelper_options.c: ../../metadata/addhelper.xml.in addhelper_options.h 30 | $(BCOP_BIN) --source $@ $< 31 | -------------------------------------------------------------------------------- /src/animationaddon/Makefile.am: -------------------------------------------------------------------------------- 1 | PFLAGS=-module -avoid-version -no-undefined -lGLU 2 | 3 | if ANIMATIONADDON_PLUGIN 4 | libanimationaddon_la_LDFLAGS = $(PFLAGS) 5 | libanimationaddon_la_LIBADD = @COMPIZ_LIBS@ @COMPIZANIMATION_LIBS@ 6 | libanimationaddon_la_SOURCES = airplane3d.c \ 7 | animationaddon.c \ 8 | animationaddon.h \ 9 | beamup.c \ 10 | burn.c \ 11 | domino.c \ 12 | explode3d.c \ 13 | fold3d.c \ 14 | glide3.c \ 15 | leafspread.c \ 16 | particle.c \ 17 | polygon.c \ 18 | skewer.c \ 19 | animation_tex.h 20 | endif 21 | 22 | AM_CPPFLAGS = \ 23 | -I$(top_srcdir)/include \ 24 | @COMPIZ_CFLAGS@ \ 25 | @COMPIZANIMATION_CFLAGS@ \ 26 | -DDATADIR='"$(compdatadir)"' \ 27 | -DLIBDIR='"$(libdir)"' \ 28 | -DLOCALEDIR="\"@datadir@/locale\"" \ 29 | -DIMAGEDIR='"$(imagedir)"' 30 | 31 | moduledir = $(plugindir) 32 | 33 | if ANIMATIONADDON_PLUGIN 34 | module_LTLIBRARIES=libanimationaddon.la 35 | endif 36 | -------------------------------------------------------------------------------- /src/animationaddon/beamup.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Animation plugin for compiz/beryl 3 | * 4 | * animation.c 5 | * 6 | * Copyright : (C) 2006 Erkin Bahceci 7 | * E-mail : erkinbah@gmail.com 8 | * 9 | * Based on Wobbly and Minimize plugins by 10 | * : David Reveman 11 | * E-mail : davidr@novell.com> 12 | * 13 | * Particle system added by : (C) 2006 Dennis Kasprzyk 14 | * E-mail : onestone@compiz.org 15 | * 16 | * Beam-Up added by : Florencio Guimaraes 17 | * E-mail : florencio@nexcorp.com.br 18 | * 19 | * Hexagon tessellator added by : Mike Slegeir 20 | * E-mail : mikeslegeir@mail.utexas.edu> 21 | * 22 | * This program is free software; you can redistribute it and/or 23 | * modify it under the terms of the GNU General Public License 24 | * as published by the Free Software Foundation; either version 2 25 | * of the License, or (at your option) any later version. 26 | * 27 | * This program is distributed in the hope that it will be useful, 28 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 29 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 30 | * GNU General Public License for more details. 31 | * 32 | * You should have received a copy of the GNU General Public License 33 | * along with this program; if not, write to the Free Software 34 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 35 | */ 36 | 37 | #include "animationaddon.h" 38 | #include "animation_tex.h" 39 | 40 | // ===================== Effect: Beam Up ========================= 41 | 42 | Bool 43 | fxBeamUpInit (CompWindow * w) 44 | { 45 | ANIMADDON_DISPLAY (w->screen->display); 46 | ANIMADDON_WINDOW (w); 47 | 48 | ad->animBaseFunctions->defaultAnimInit (w); 49 | 50 | if (!aw->eng.numPs) 51 | { 52 | aw->eng.ps = calloc(1, sizeof(ParticleSystem)); 53 | if (!aw->eng.ps) 54 | { 55 | ad->animBaseFunctions->postAnimationCleanup (w); 56 | return FALSE; 57 | } 58 | 59 | aw->eng.numPs = 1; 60 | } 61 | 62 | int particles = WIN_W(w); 63 | 64 | initParticles(particles, &aw->eng.ps[0]); 65 | aw->eng.ps[0].slowdown = animGetF (w, ANIMADDON_SCREEN_OPTION_BEAMUP_SLOWDOWN); 66 | aw->eng.ps[0].darken = 0.5; 67 | aw->eng.ps[0].blendMode = GL_ONE; 68 | 69 | if (!aw->eng.ps[0].tex) 70 | glGenTextures(1, &aw->eng.ps[0].tex); 71 | glBindTexture(GL_TEXTURE_2D, aw->eng.ps[0].tex); 72 | 73 | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); 74 | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); 75 | 76 | glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 32, 32, 0, 77 | GL_RGBA, GL_UNSIGNED_BYTE, fireTex); 78 | glBindTexture(GL_TEXTURE_2D, 0); 79 | 80 | return TRUE; 81 | } 82 | 83 | static void 84 | fxBeamUpGenNewBeam(CompWindow * w, 85 | ParticleSystem * ps, 86 | int x, 87 | int y, 88 | int width, 89 | int height, 90 | float size, 91 | float time) 92 | { 93 | ps->numParticles = 94 | width / animGetI (w, ANIMADDON_SCREEN_OPTION_BEAMUP_SPACING); 95 | 96 | float beaumUpLife = animGetF (w, ANIMADDON_SCREEN_OPTION_FIRE_LIFE); 97 | float beaumUpLifeNeg = 1 - beaumUpLife; 98 | float fadeExtra = 0.2f * (1.01 - beaumUpLife); 99 | float max_new = ps->numParticles * (time / 50) * (1.05 - beaumUpLife); 100 | 101 | // set color ABAB ANIMADDON_SCREEN_OPTION_BEAMUP_COLOR 102 | unsigned short *c = 103 | animGetC (w, ANIMADDON_SCREEN_OPTION_BEAMUP_COLOR); 104 | float colr1 = (float)c[0] / 0xffff; 105 | float colg1 = (float)c[1] / 0xffff; 106 | float colb1 = (float)c[2] / 0xffff; 107 | float colr2 = 1 / 1.7 * (float)c[0] / 0xffff; 108 | float colg2 = 1 / 1.7 * (float)c[1] / 0xffff; 109 | float colb2 = 1 / 1.7 * (float)c[2] / 0xffff; 110 | float cola = (float)c[3] / 0xffff; 111 | float rVal; 112 | 113 | float partw = 2.5 * animGetF (w, ANIMADDON_SCREEN_OPTION_BEAMUP_SIZE); 114 | 115 | // Limit max number of new particles created simultaneously 116 | if (max_new > ps->numParticles) 117 | max_new = ps->numParticles; 118 | 119 | Particle *part = ps->particles; 120 | int i; 121 | for (i = 0; i < ps->numParticles && max_new > 0; i++, part++) 122 | { 123 | if (part->life <= 0.0f) 124 | { 125 | // give gt new life 126 | rVal = (float)(random() & 0xff) / 255.0; 127 | part->life = 1.0f; 128 | part->fade = rVal * beaumUpLifeNeg + fadeExtra; // Random Fade Value 129 | 130 | // set size 131 | part->width = partw; 132 | part->height = height; 133 | part->w_mod = size * 0.2; 134 | part->h_mod = size * 0.02; 135 | 136 | // choose random x position 137 | rVal = (float)(random() & 0xff) / 255.0; 138 | part->x = x + ((width > 1) ? (rVal * width) : 0); 139 | part->y = y; 140 | part->z = 0.0; 141 | part->xo = part->x; 142 | part->yo = part->y; 143 | part->zo = part->z; 144 | 145 | // set speed and direction 146 | part->xi = 0.0f; 147 | part->yi = 0.0f; 148 | part->zi = 0.0f; 149 | 150 | part->r = colr1 - rVal * colr2; 151 | part->g = colg1 - rVal * colg2; 152 | part->b = colb1 - rVal * colb2; 153 | part->a = cola; 154 | 155 | // set gravity 156 | part->xg = 0.0f; 157 | part->yg = 0.0f; 158 | part->zg = 0.0f; 159 | 160 | ps->active = TRUE; 161 | max_new -= 1; 162 | } 163 | else 164 | { 165 | part->xg = (part->x < part->xo) ? 1.0 : -1.0; 166 | } 167 | } 168 | 169 | } 170 | 171 | void 172 | fxBeamUpAnimStep (CompWindow *w, float time) 173 | { 174 | CompScreen *s = w->screen; 175 | 176 | ANIMADDON_DISPLAY (s->display); 177 | ANIMADDON_WINDOW (w); 178 | 179 | ad->animBaseFunctions->defaultAnimStep (w, time); 180 | 181 | float timestep = (s->slowAnimations ? 2 : // For smooth slow-mo (refer to display.c) 182 | getIntenseTimeStep (s)); 183 | 184 | aw->com->timestep = timestep; 185 | 186 | Bool creating = (aw->com->curWindowEvent == WindowEventOpen || 187 | aw->com->curWindowEvent == WindowEventUnminimize || 188 | aw->com->curWindowEvent == WindowEventUnshade); 189 | 190 | aw->com->animRemainingTime -= timestep; 191 | if (aw->com->animRemainingTime <= 0) 192 | aw->com->animRemainingTime = 0; // avoid sub-zero values 193 | float new = 1 - (aw->com->animRemainingTime) / (aw->com->animTotalTime - timestep); 194 | 195 | if (creating) 196 | new = 1 - new; 197 | 198 | if (!aw->com->drawRegion) 199 | aw->com->drawRegion = XCreateRegion(); 200 | if (aw->com->animRemainingTime > 0) 201 | { 202 | XRectangle rect; 203 | 204 | rect.x = WIN_X(w) + ((new / 2) * WIN_W(w)); 205 | rect.width = (1 - new) * WIN_W(w); 206 | rect.y = WIN_Y(w) + ((new / 2) * WIN_H(w)); 207 | rect.height = (1 - new) * WIN_H(w); 208 | XUnionRectWithRegion(&rect, &emptyRegion, aw->com->drawRegion); 209 | } 210 | else 211 | { 212 | XUnionRegion(&emptyRegion, &emptyRegion, aw->com->drawRegion); 213 | } 214 | 215 | aw->com->useDrawRegion = (fabs (new) > 1e-5); 216 | 217 | if (aw->com->animRemainingTime > 0 && aw->eng.numPs) 218 | { 219 | fxBeamUpGenNewBeam(w, &aw->eng.ps[0], 220 | WIN_X(w), WIN_Y(w) + (WIN_H(w) / 2), WIN_W(w), 221 | creating ? 222 | (1 - new / 2) * WIN_H(w) : 223 | (1 - new) * WIN_H(w), 224 | WIN_W(w) / 40.0, time); 225 | 226 | } 227 | if (aw->com->animRemainingTime <= 0 && aw->eng.numPs 228 | && aw->eng.ps[0].active) 229 | aw->com->animRemainingTime = 0.001f; 230 | 231 | if (!aw->eng.numPs || !aw->eng.ps) 232 | { 233 | if (aw->eng.ps) 234 | { 235 | finiParticles(aw->eng.ps); 236 | free(aw->eng.ps); 237 | aw->eng.ps = NULL; 238 | } 239 | // Abort animation 240 | aw->com->animRemainingTime = 0; 241 | return; 242 | } 243 | 244 | if (aw->com->animRemainingTime > 0) 245 | { 246 | int nParticles = aw->eng.ps[0].numParticles; 247 | Particle *part = aw->eng.ps[0].particles; 248 | int i; 249 | for (i = 0; i < nParticles; i++, part++) 250 | part->xg = (part->x < part->xo) ? 1.0 : -1.0; 251 | } 252 | aw->eng.ps[0].x = WIN_X(w); 253 | aw->eng.ps[0].y = WIN_Y(w); 254 | } 255 | 256 | void 257 | fxBeamupUpdateWindowAttrib (CompWindow *w, 258 | WindowPaintAttrib * wAttrib) 259 | { 260 | ANIMADDON_WINDOW (w); 261 | 262 | float forwardProgress = 0; 263 | if (aw->com->animTotalTime - aw->com->timestep != 0) 264 | forwardProgress = 265 | 1 - aw->com->animRemainingTime / 266 | (aw->com->animTotalTime - aw->com->timestep); 267 | forwardProgress = MIN(forwardProgress, 1); 268 | forwardProgress = MAX(forwardProgress, 0); 269 | 270 | if (aw->com->curWindowEvent == WindowEventOpen || 271 | aw->com->curWindowEvent == WindowEventUnminimize) 272 | { 273 | forwardProgress = forwardProgress * forwardProgress; 274 | forwardProgress = forwardProgress * forwardProgress; 275 | forwardProgress = 1 - forwardProgress; 276 | } 277 | 278 | wAttrib->opacity = (GLushort) (aw->com->storedOpacity * (1 - forwardProgress)); 279 | } 280 | -------------------------------------------------------------------------------- /src/animationaddon/domino.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Animation plugin for compiz/beryl 3 | * 4 | * animation.c 5 | * 6 | * Copyright : (C) 2006 Erkin Bahceci 7 | * E-mail : erkinbah@gmail.com 8 | * 9 | * Based on Wobbly and Minimize plugins by 10 | * : David Reveman 11 | * E-mail : davidr@novell.com> 12 | * 13 | * Particle system added by : (C) 2006 Dennis Kasprzyk 14 | * E-mail : onestone@compiz.org 15 | * 16 | * Beam-Up added by : Florencio Guimaraes 17 | * E-mail : florencio@nexcorp.com.br 18 | * 19 | * Hexagon tessellator added by : Mike Slegeir 20 | * E-mail : mikeslegeir@mail.utexas.edu> 21 | * 22 | * This program is free software; you can redistribute it and/or 23 | * modify it under the terms of the GNU General Public License 24 | * as published by the Free Software Foundation; either version 2 25 | * of the License, or (at your option) any later version. 26 | * 27 | * This program is distributed in the hope that it will be useful, 28 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 29 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 30 | * GNU General Public License for more details. 31 | * 32 | * You should have received a copy of the GNU General Public License 33 | * along with this program; if not, write to the Free Software 34 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 35 | */ 36 | 37 | #include "animationaddon.h" 38 | 39 | Bool 40 | fxDominoInit (CompWindow * w) 41 | { 42 | if (!polygonsAnimInit (w)) 43 | return FALSE; 44 | 45 | ANIMADDON_DISPLAY (w->screen->display); 46 | ANIMADDON_WINDOW (w); 47 | 48 | Bool isRazr = (aw->com->curAnimEffect == AnimEffectRazr); 49 | 50 | int fallDir; 51 | 52 | if (isRazr) 53 | fallDir = ad->animBaseFunctions->getActualAnimDirection 54 | (w, animGetI (w, ANIMADDON_SCREEN_OPTION_RAZR_DIRECTION), TRUE); 55 | else 56 | fallDir = ad->animBaseFunctions->getActualAnimDirection 57 | (w, animGetI (w, ANIMADDON_SCREEN_OPTION_DOMINO_DIRECTION), TRUE); 58 | 59 | int defaultGridSize = 20; 60 | float minCellSize = 30; 61 | int gridSizeX; 62 | int gridSizeY; 63 | int fallDirGridSize; 64 | float minDistStartEdge; // half piece size in [0,1] range 65 | float gridCellW; 66 | float gridCellH; 67 | float cellAspectRatio = 1.25; 68 | 69 | if (isRazr) 70 | cellAspectRatio = 1; 71 | 72 | // Determine sensible domino piece sizes 73 | if (fallDir == AnimDirectionDown || fallDir == AnimDirectionUp) 74 | { 75 | if (minCellSize > BORDER_W(w)) 76 | minCellSize = BORDER_W(w); 77 | if (BORDER_W(w) / defaultGridSize < minCellSize) 78 | gridSizeX = (int)(BORDER_W(w) / minCellSize); 79 | else 80 | gridSizeX = defaultGridSize; 81 | gridCellW = BORDER_W(w) / gridSizeX; 82 | gridSizeY = (int)(BORDER_H(w) / (gridCellW * cellAspectRatio)); 83 | if (gridSizeY == 0) 84 | gridSizeY = 1; 85 | gridCellH = BORDER_H(w) / gridSizeY; 86 | fallDirGridSize = gridSizeY; 87 | } 88 | else 89 | { 90 | if (minCellSize > BORDER_H(w)) 91 | minCellSize = BORDER_H(w); 92 | if (BORDER_H(w) / defaultGridSize < minCellSize) 93 | gridSizeY = (int)(BORDER_H(w) / minCellSize); 94 | else 95 | gridSizeY = defaultGridSize; 96 | gridCellH = BORDER_H(w) / gridSizeY; 97 | gridSizeX = (int)(BORDER_W(w) / (gridCellH * cellAspectRatio)); 98 | if (gridSizeX == 0) 99 | gridSizeX = 1; 100 | gridCellW = BORDER_W(w) / gridSizeX; 101 | fallDirGridSize = gridSizeX; 102 | } 103 | minDistStartEdge = (1.0 / fallDirGridSize) / 2; 104 | 105 | float thickness = MIN(gridCellW, gridCellH) / 3.5; 106 | 107 | if (!tessellateIntoRectangles(w, gridSizeX, gridSizeY, thickness)) 108 | return FALSE; 109 | 110 | float rotAxisX = 0; 111 | float rotAxisY = 0; 112 | Point3d rotAxisOff = { 0, 0, thickness / 2 }; 113 | float posX = 0; // position of standing piece 114 | float posY = 0; 115 | float posZ = 0; 116 | int nFallingColumns = gridSizeX; 117 | float gridCellHalfW = gridCellW / 2; 118 | float gridCellHalfH = gridCellH / 2; 119 | 120 | switch (fallDir) 121 | { 122 | case AnimDirectionDown: 123 | rotAxisX = -1; 124 | if (isRazr) 125 | rotAxisOff.y = -gridCellHalfH; 126 | else 127 | { 128 | posY = -(gridCellHalfH + thickness); 129 | posZ = gridCellHalfH - thickness / 2; 130 | } 131 | break; 132 | case AnimDirectionLeft: 133 | rotAxisY = -1; 134 | if (isRazr) 135 | rotAxisOff.x = gridCellHalfW; 136 | else 137 | { 138 | posX = gridCellHalfW + thickness; 139 | posZ = gridCellHalfW - thickness / 2; 140 | } 141 | nFallingColumns = gridSizeY; 142 | break; 143 | case AnimDirectionUp: 144 | rotAxisX = 1; 145 | if (isRazr) 146 | rotAxisOff.y = gridCellHalfH; 147 | else 148 | { 149 | posY = gridCellHalfH + thickness; 150 | posZ = gridCellHalfH - thickness / 2; 151 | } 152 | break; 153 | case AnimDirectionRight: 154 | rotAxisY = 1; 155 | if (isRazr) 156 | rotAxisOff.x = -gridCellHalfW; 157 | else 158 | { 159 | posX = -(gridCellHalfW + thickness); 160 | posZ = gridCellHalfW - thickness / 2; 161 | } 162 | nFallingColumns = gridSizeY; 163 | break; 164 | } 165 | 166 | float fadeDuration; 167 | float riseDuration; 168 | float riseTimeRandMax = 0.2; 169 | 170 | if (isRazr) 171 | { 172 | riseDuration = (1 - riseTimeRandMax) / fallDirGridSize; 173 | fadeDuration = riseDuration / 2; 174 | } 175 | else 176 | { 177 | fadeDuration = 0.18; 178 | riseDuration = 0.2; 179 | } 180 | float *riseTimeRandSeed = calloc(nFallingColumns, sizeof(float)); 181 | 182 | if (!riseTimeRandSeed) 183 | // TODO: log error here 184 | return FALSE; 185 | int i; 186 | 187 | for (i = 0; i < nFallingColumns; i++) 188 | riseTimeRandSeed[i] = RAND_FLOAT(); 189 | 190 | PolygonSet *pset = aw->eng.polygonSet; 191 | PolygonObject *p = pset->polygons; 192 | 193 | for (i = 0; i < pset->nPolygons; i++, p++) 194 | { 195 | p->rotAxis.x = rotAxisX; 196 | p->rotAxis.y = rotAxisY; 197 | p->rotAxis.z = 0; 198 | 199 | p->finalRelPos.x = posX; 200 | p->finalRelPos.y = posY; 201 | p->finalRelPos.z = posZ; 202 | 203 | // dist. from rise-start / fall-end edge in window ([0,1] range) 204 | float distStartEdge = 0; 205 | 206 | // dist. from edge perpendicular to movement (for move start time) 207 | // so that same the blocks in same row/col. appear to knock down 208 | // the next one 209 | float distPerpEdge = 0; 210 | 211 | switch (fallDir) 212 | { 213 | case AnimDirectionUp: 214 | distStartEdge = p->centerRelPos.y; 215 | distPerpEdge = p->centerRelPos.x; 216 | break; 217 | case AnimDirectionRight: 218 | distStartEdge = 1 - p->centerRelPos.x; 219 | distPerpEdge = p->centerRelPos.y; 220 | break; 221 | case AnimDirectionDown: 222 | distStartEdge = 1 - p->centerRelPos.y; 223 | distPerpEdge = p->centerRelPos.x; 224 | break; 225 | case AnimDirectionLeft: 226 | distStartEdge = p->centerRelPos.x; 227 | distPerpEdge = p->centerRelPos.y; 228 | break; 229 | } 230 | 231 | float riseTimeRand = 232 | riseTimeRandSeed[(int)(distPerpEdge * nFallingColumns)] * 233 | riseTimeRandMax; 234 | 235 | p->moveDuration = riseDuration; 236 | 237 | float mult = 1; 238 | if (fallDirGridSize > 1) 239 | mult = ((distStartEdge - minDistStartEdge) / 240 | (1 - 2 * minDistStartEdge)); 241 | if (isRazr) 242 | { 243 | p->moveStartTime = 244 | mult * 245 | (1 - riseDuration - riseTimeRandMax) + riseTimeRand; 246 | p->fadeStartTime = p->moveStartTime + riseDuration / 2; 247 | p->finalRotAng = -180; 248 | 249 | p->rotAxisOffset.x = rotAxisOff.x; 250 | p->rotAxisOffset.y = rotAxisOff.y; 251 | p->rotAxisOffset.z = rotAxisOff.z; 252 | } 253 | else 254 | { 255 | p->moveStartTime = 256 | mult * 257 | (1 - riseDuration - riseTimeRandMax) + 258 | riseTimeRand; 259 | p->fadeStartTime = 260 | p->moveStartTime + riseDuration - riseTimeRand + 0.03; 261 | p->finalRotAng = -90; 262 | } 263 | if (p->fadeStartTime > 1 - fadeDuration) 264 | p->fadeStartTime = 1 - fadeDuration; 265 | p->fadeDuration = fadeDuration; 266 | } 267 | free(riseTimeRandSeed); 268 | pset->doDepthTest = TRUE; 269 | pset->doLighting = TRUE; 270 | pset->correctPerspective = CorrectPerspectivePolygon; 271 | 272 | aw->com->animTotalTime /= DOMINO_PERCEIVED_T; 273 | aw->com->animRemainingTime = aw->com->animTotalTime; 274 | 275 | return TRUE; 276 | } 277 | -------------------------------------------------------------------------------- /src/animationaddon/explode3d.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Animation plugin for compiz/beryl 3 | * 4 | * animation.c 5 | * 6 | * Copyright : (C) 2006 Erkin Bahceci 7 | * E-mail : erkinbah@gmail.com 8 | * 9 | * Based on Wobbly and Minimize plugins by 10 | * : David Reveman 11 | * E-mail : davidr@novell.com> 12 | * 13 | * Particle system added by : (C) 2006 Dennis Kasprzyk 14 | * E-mail : onestone@compiz.org 15 | * 16 | * Beam-Up added by : Florencio Guimaraes 17 | * E-mail : florencio@nexcorp.com.br 18 | * 19 | * Hexagon tessellator added by : Mike Slegeir 20 | * E-mail : mikeslegeir@mail.utexas.edu> 21 | * 22 | * This program is free software; you can redistribute it and/or 23 | * modify it under the terms of the GNU General Public License 24 | * as published by the Free Software Foundation; either version 2 25 | * of the License, or (at your option) any later version. 26 | * 27 | * This program is distributed in the hope that it will be useful, 28 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 29 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 30 | * GNU General Public License for more details. 31 | * 32 | * You should have received a copy of the GNU General Public License 33 | * along with this program; if not, write to the Free Software 34 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 35 | */ 36 | 37 | #include "animationaddon.h" 38 | 39 | Bool 40 | fxExplodeInit (CompWindow * w) 41 | { 42 | if (!polygonsAnimInit (w)) 43 | return FALSE; 44 | 45 | CompScreen *s = w->screen; 46 | ANIMADDON_WINDOW (w); 47 | 48 | switch (animGetI (w, ANIMADDON_SCREEN_OPTION_EXPLODE_TESS)) 49 | { 50 | case PolygonTessRect: 51 | if (!tessellateIntoRectangles(w, 52 | animGetI (w, ANIMADDON_SCREEN_OPTION_EXPLODE_GRIDSIZE_X), 53 | animGetI (w, ANIMADDON_SCREEN_OPTION_EXPLODE_GRIDSIZE_Y), 54 | animGetF (w, ANIMADDON_SCREEN_OPTION_EXPLODE_THICKNESS))) 55 | return FALSE; 56 | break; 57 | case PolygonTessHex: 58 | if (!tessellateIntoHexagons(w, 59 | animGetI (w, ANIMADDON_SCREEN_OPTION_EXPLODE_GRIDSIZE_X), 60 | animGetI (w, ANIMADDON_SCREEN_OPTION_EXPLODE_GRIDSIZE_Y), 61 | animGetF (w, ANIMADDON_SCREEN_OPTION_EXPLODE_THICKNESS))) 62 | return FALSE; 63 | break; 64 | case PolygonTessGlass: 65 | if (!tessellateIntoGlass (w, 66 | animGetI (w, ANIMADDON_SCREEN_OPTION_EXPLODE_SPOKES), 67 | animGetI (w, ANIMADDON_SCREEN_OPTION_EXPLODE_TIERS), 68 | animGetF (w, ANIMADDON_SCREEN_OPTION_EXPLODE_THICKNESS))) 69 | return FALSE; 70 | break; 71 | default: 72 | return FALSE; 73 | } 74 | 75 | PolygonSet *pset = aw->eng.polygonSet; 76 | PolygonObject *p = pset->polygons; 77 | double sqrt2 = sqrt(2); 78 | 79 | int i; 80 | 81 | for (i = 0; i < pset->nPolygons; i++, p++) 82 | { 83 | p->rotAxis.x = RAND_FLOAT(); 84 | p->rotAxis.y = RAND_FLOAT(); 85 | p->rotAxis.z = RAND_FLOAT(); 86 | 87 | float screenSizeFactor = (0.8 * DEFAULT_Z_CAMERA * s->width); 88 | float speed = screenSizeFactor / 10 * (0.2 + RAND_FLOAT()); 89 | 90 | float xx = 2 * (p->centerRelPos.x - 0.5); 91 | float yy = 2 * (p->centerRelPos.y - 0.5); 92 | 93 | float x = speed * 2 * (xx + 0.5 * (RAND_FLOAT() - 0.5)); 94 | float y = speed * 2 * (yy + 0.5 * (RAND_FLOAT() - 0.5)); 95 | 96 | float distToCenter = sqrt(xx * xx + yy * yy) / sqrt2; 97 | float moveMult = 1 - distToCenter; 98 | moveMult = moveMult < 0 ? 0 : moveMult; 99 | float zbias = 0.1; 100 | float z = speed * 10 * 101 | (zbias + RAND_FLOAT() * 102 | pow(moveMult, 0.5)); 103 | 104 | p->finalRelPos.x = x; 105 | p->finalRelPos.y = y; 106 | p->finalRelPos.z = z; 107 | p->finalRotAng = RAND_FLOAT() * 540 - 270; 108 | } 109 | pset->allFadeDuration = 0.3f; 110 | pset->doDepthTest = TRUE; 111 | pset->doLighting = TRUE; 112 | pset->correctPerspective = CorrectPerspectivePolygon; 113 | pset->backAndSidesFadeDur = 0.2f; 114 | 115 | aw->com->animTotalTime /= EXPLODE_PERCEIVED_T; 116 | aw->com->animRemainingTime = aw->com->animTotalTime; 117 | 118 | return TRUE; 119 | } 120 | 121 | -------------------------------------------------------------------------------- /src/animationaddon/fold3d.c: -------------------------------------------------------------------------------- 1 | /** 2 | * Animation plugin for compiz/beryl 3 | * 4 | * animation.c 5 | * 6 | * Copyright : (C) 2006 Erkin Bahceci 7 | * E-mail : erkinbah@gmail.com 8 | * 9 | * Based on Wobbly and Minimize plugins by 10 | * : David Reveman 11 | * E-mail : davidr@novell.com> 12 | * 13 | * Fold and Skewer added by : Tomasz Kołodziejski 14 | * E-mail : tkolodziejski@gmail.com 15 | * 16 | * This program is free software; you can redistribute it and/or 17 | * modify it under the terms of the GNU General Public License 18 | * as published by the Free Software Foundation; either version 2 19 | * of the License, or (at your option) any later version. 20 | * 21 | * This program is distributed in the hope that it will be useful, 22 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 23 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 24 | * GNU General Public License for more details. 25 | * 26 | * You should have received a copy of the GNU General Public License 27 | * along with this program; if not, write to the Free Software 28 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 29 | **/ 30 | 31 | #include "animationaddon.h" 32 | 33 | Bool 34 | fxFoldInit (CompWindow * w) 35 | { 36 | if (!polygonsAnimInit (w)) 37 | return FALSE; 38 | 39 | ANIMADDON_WINDOW (w); 40 | 41 | aw->com->animTotalTime /= FOLD_PERCEIVED_T; 42 | aw->com->animRemainingTime = aw->com->animTotalTime; 43 | 44 | int gridSizeX = animGetI (w, ANIMADDON_SCREEN_OPTION_FOLD_GRIDSIZE_X); 45 | int gridSizeY = animGetI (w, ANIMADDON_SCREEN_OPTION_FOLD_GRIDSIZE_Y); 46 | 47 | if (!tessellateIntoRectangles (w, gridSizeX, gridSizeY, 1.0f)) 48 | return FALSE; 49 | 50 | PolygonSet *pset = aw->eng.polygonSet; 51 | PolygonObject *p = pset->polygons; 52 | 53 | // handle other non-zero values 54 | int fold_in = animGetI (w, ANIMADDON_SCREEN_OPTION_FOLD_DIR) == 0 ? 1 : 0; 55 | 56 | float rows_duration; 57 | float fduration; 58 | 59 | if (gridSizeY == 1) 60 | { 61 | fduration = 1.0f / (float)(gridSizeY + 2 * ceil (gridSizeX / 2)); 62 | rows_duration = 0; 63 | } 64 | else 65 | { 66 | fduration = 67 | 1.0f / (float)(gridSizeY + 2 * ceil (gridSizeX / 2) + 1 + fold_in); 68 | rows_duration = (gridSizeY - 1 + fold_in) * fduration; 69 | } 70 | 71 | float duration = fduration * 2; 72 | float start; 73 | int i; 74 | int j = 0; 75 | int k = 0; 76 | 77 | for (i = 0; i < pset->nPolygons; i++, p++) 78 | { 79 | if (i > pset->nPolygons - gridSizeX - 1) 80 | { 81 | // bottom row polygons 82 | if (j < gridSizeX / 2) 83 | { 84 | // the left ones 85 | start = rows_duration + duration * j++; 86 | 87 | p->rotAxis.y = -180; 88 | p->finalRotAng = 180; 89 | 90 | p->fadeStartTime = start + fduration; 91 | p->fadeDuration = fduration; 92 | } 93 | else if (j == gridSizeX / 2) 94 | { 95 | // the middle one 96 | start = rows_duration + j * duration; 97 | 98 | p->rotAxis.y = 90; 99 | p->finalRotAng = 90; 100 | 101 | p->fadeStartTime = start + fduration; 102 | p->fadeDuration = fduration; 103 | j++; 104 | } 105 | else 106 | { 107 | // the right ones 108 | start = rows_duration + (j - 2) * duration + duration * k--; 109 | 110 | p->rotAxis.y = 180; 111 | p->finalRotAng = 180; 112 | 113 | p->fadeStartTime = start + fduration; 114 | p->fadeDuration = fduration; 115 | } 116 | } 117 | else 118 | { 119 | // main rows 120 | int row = i / gridSizeX; // [0; gridSizeY-1] 121 | 122 | start = row * fduration; 123 | p->rotAxis.x = 180; 124 | p->finalRelPos.y = row; // number of row, not finalRelPos!! 125 | p->finalRotAng = 180; 126 | 127 | p->fadeDuration = fduration; 128 | p->fadeStartTime = start; 129 | 130 | if (row < gridSizeY - 2 || fold_in) 131 | p->fadeStartTime += fduration; 132 | } 133 | p->moveStartTime = start; 134 | p->moveDuration = duration; 135 | } 136 | pset->doDepthTest = TRUE; 137 | pset->doLighting = TRUE; 138 | pset->correctPerspective = CorrectPerspectiveWindow; 139 | 140 | return TRUE; 141 | } 142 | 143 | void 144 | fxFoldAnimStepPolygon (CompWindow *w, 145 | PolygonObject *p, 146 | float forwardProgress) 147 | { 148 | int dir = animGetI (w, ANIMADDON_SCREEN_OPTION_FOLD_DIR) == 0 ? 1 : -1; 149 | 150 | int gridSizeX = animGetI (w, ANIMADDON_SCREEN_OPTION_FOLD_GRIDSIZE_X); 151 | int gridSizeY = animGetI (w, ANIMADDON_SCREEN_OPTION_FOLD_GRIDSIZE_Y); 152 | 153 | float moveProgress = forwardProgress - p->moveStartTime; 154 | 155 | if (p->moveDuration > 0) 156 | moveProgress /= p->moveDuration; 157 | if (moveProgress < 0) 158 | moveProgress = 0; 159 | else if (moveProgress > 1) 160 | moveProgress = 1; 161 | 162 | float const_x = BORDER_W (w) / (float)gridSizeX; // width of single piece 163 | float const_y = BORDER_H (w) / (float)gridSizeY; // height of single piece 164 | 165 | p->rotAngle = dir * moveProgress * p->finalRotAng; 166 | 167 | if (p->rotAxis.x == 180) 168 | { 169 | if (p->finalRelPos.y == gridSizeY - 2) 170 | { 171 | // it means the last row 172 | p->centerPos.y = 173 | p->centerPosStart.y + const_y / 2.0f - 174 | cos (p->rotAngle * M_PI / 180.0f) * const_y / 2.0f; 175 | p->centerPos.z = 176 | p->centerPosStart.z + 177 | 1.0f / w->screen->width * (sin (-p->rotAngle * M_PI / 180.0f) * 178 | const_y / 2.0f); 179 | } 180 | else 181 | { 182 | // rows 183 | if (fabs (p->rotAngle) < 90) 184 | { 185 | // 1. rotate 90 186 | p->centerPos.y = 187 | p->centerPosStart.y + const_y / 2.0f - 188 | cos (p->rotAngle * M_PI / 180.0f) * const_y / 2.0f; 189 | p->centerPos.z = 190 | p->centerPosStart.z + 191 | 1.0f / w->screen->width * 192 | (sin (-p->rotAngle * M_PI / 180.0f) * const_y / 2.0f); 193 | } 194 | else 195 | { 196 | // 2. rotate faster 180 197 | float alpha = p->rotAngle - dir * 90; // [0 - 45] 198 | float alpha2 = 2 * alpha; // [0 - 90] 199 | 200 | p->rotAngle = (p->rotAngle - dir * 90) * 2 + dir * 90; 201 | 202 | p->centerPos.y = 203 | p->centerPosStart.y + const_y / 2.0f + const_y - 204 | cos (alpha * M_PI / 180.0f) * const_y + dir * 205 | sin (alpha2 * M_PI / 180.0f) * const_y / 2.0f; 206 | 207 | p->centerPos.z = 208 | p->centerPosStart.z + 209 | 1.0f / w->screen->width * 210 | (-sin (alpha * M_PI / 180.0f) * const_y - dir * 211 | cos (alpha2 * M_PI / 180.0f) * const_y / 2.0f); 212 | } 213 | } 214 | } 215 | else if (p->rotAxis.y == -180) 216 | { 217 | // simple blocks left 218 | p->centerPos.x = 219 | p->centerPosStart.x + const_x / 2.0f - 220 | cos (p->rotAngle * M_PI / 180.0f) * const_x / 2.0f; 221 | 222 | p->centerPos.z = 223 | p->centerPosStart.z - 224 | 1.0f / w->screen->width * (sin (p->rotAngle * M_PI / 180.0f) * 225 | const_x / 2.0f); 226 | } 227 | else if (p->rotAxis.y == 180) 228 | { 229 | // simple blocks right 230 | p->centerPos.x = 231 | p->centerPosStart.x - const_x / 2.0f + 232 | cos (-p->rotAngle * M_PI / 180.0f) * const_x / 2.0f; 233 | 234 | p->centerPos.z = 235 | p->centerPosStart.z + 236 | 1.0f / w->screen->width * (sin (-p->rotAngle * M_PI / 180.0f) * 237 | const_x / 2.0f); 238 | } 239 | } 240 | -------------------------------------------------------------------------------- /src/animationaddon/glide3.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Animation plugin for compiz/beryl 3 | * 4 | * animation.c 5 | * 6 | * Copyright : (C) 2006 Erkin Bahceci 7 | * E-mail : erkinbah@gmail.com 8 | * 9 | * Based on Wobbly and Minimize plugins by 10 | * : David Reveman 11 | * E-mail : davidr@novell.com> 12 | * 13 | * Particle system added by : (C) 2006 Dennis Kasprzyk 14 | * E-mail : onestone@compiz.org 15 | * 16 | * Beam-Up added by : Florencio Guimaraes 17 | * E-mail : florencio@nexcorp.com.br 18 | * 19 | * Hexagon tessellator added by : Mike Slegeir 20 | * E-mail : mikeslegeir@mail.utexas.edu> 21 | * 22 | * This program is free software; you can redistribute it and/or 23 | * modify it under the terms of the GNU General Public License 24 | * as published by the Free Software Foundation; either version 2 25 | * of the License, or (at your option) any later version. 26 | * 27 | * This program is distributed in the hope that it will be useful, 28 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 29 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 30 | * GNU General Public License for more details. 31 | * 32 | * You should have received a copy of the GNU General Public License 33 | * along with this program; if not, write to the Free Software 34 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 35 | */ 36 | 37 | #include "animationaddon.h" 38 | 39 | // ===================== Effect: Slab ========================= 40 | 41 | Bool 42 | fxGlide3Init (CompWindow * w) 43 | { 44 | if (!polygonsAnimInit (w)) 45 | return FALSE; 46 | 47 | CompScreen *s = w->screen; 48 | ANIMADDON_WINDOW(w); 49 | 50 | float finalDistFac = animGetF (w, ANIMADDON_SCREEN_OPTION_GLIDE3_AWAY_POS); 51 | float finalRotAng = animGetF (w, ANIMADDON_SCREEN_OPTION_GLIDE3_AWAY_ANGLE); 52 | float thickness = animGetF (w, ANIMADDON_SCREEN_OPTION_GLIDE3_THICKNESS); 53 | 54 | PolygonSet *pset = aw->eng.polygonSet; 55 | 56 | pset->includeShadows = (thickness < 1e-5); 57 | 58 | if (!tessellateIntoRectangles(w, 1, 1, thickness)) 59 | return FALSE; 60 | 61 | PolygonObject *p = pset->polygons; 62 | 63 | int i; 64 | 65 | for (i = 0; i < pset->nPolygons; i++, p++) 66 | { 67 | p->rotAxis.x = 1; 68 | p->rotAxis.y = 0; 69 | p->rotAxis.z = 0; 70 | 71 | p->finalRelPos.x = 0; 72 | p->finalRelPos.y = 0; 73 | p->finalRelPos.z = finalDistFac * 0.8 * DEFAULT_Z_CAMERA * s->width; 74 | 75 | p->finalRotAng = finalRotAng; 76 | } 77 | pset->allFadeDuration = 1.0f; 78 | pset->backAndSidesFadeDur = 0.2f; 79 | pset->doLighting = TRUE; 80 | pset->correctPerspective = CorrectPerspectivePolygon; 81 | 82 | return TRUE; 83 | } 84 | 85 | -------------------------------------------------------------------------------- /src/animationaddon/leafspread.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Animation plugin for compiz/beryl 3 | * 4 | * animation.c 5 | * 6 | * Copyright : (C) 2006 Erkin Bahceci 7 | * E-mail : erkinbah@gmail.com 8 | * 9 | * Based on Wobbly and Minimize plugins by 10 | * : David Reveman 11 | * E-mail : davidr@novell.com> 12 | * 13 | * Particle system added by : (C) 2006 Dennis Kasprzyk 14 | * E-mail : onestone@compiz.org 15 | * 16 | * Beam-Up added by : Florencio Guimaraes 17 | * E-mail : florencio@nexcorp.com.br 18 | * 19 | * Hexagon tessellator added by : Mike Slegeir 20 | * E-mail : mikeslegeir@mail.utexas.edu> 21 | * 22 | * This program is free software; you can redistribute it and/or 23 | * modify it under the terms of the GNU General Public License 24 | * as published by the Free Software Foundation; either version 2 25 | * of the License, or (at your option) any later version. 26 | * 27 | * This program is distributed in the hope that it will be useful, 28 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 29 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 30 | * GNU General Public License for more details. 31 | * 32 | * You should have received a copy of the GNU General Public License 33 | * along with this program; if not, write to the Free Software 34 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 35 | */ 36 | 37 | #include "animationaddon.h" 38 | 39 | Bool 40 | fxLeafSpreadInit (CompWindow * w) 41 | { 42 | if (!polygonsAnimInit (w)) 43 | return FALSE; 44 | 45 | CompScreen *s = w->screen; 46 | ANIMADDON_WINDOW (w); 47 | 48 | if (!tessellateIntoRectangles(w, 20, 14, 15.0f)) 49 | return FALSE; 50 | 51 | PolygonSet *pset = aw->eng.polygonSet; 52 | PolygonObject *p = pset->polygons; 53 | float fadeDuration = 0.26; 54 | float life = 0.4; 55 | float spreadFac = 3.5; 56 | float randYMax = 0.07; 57 | float winFacX = WIN_W(w) / 800.0; 58 | float winFacY = WIN_H(w) / 800.0; 59 | float winFacZ = (WIN_H(w) + WIN_W(w)) / 2.0 / 800.0; 60 | 61 | int i; 62 | 63 | for (i = 0; i < pset->nPolygons; i++, p++) 64 | { 65 | p->rotAxis.x = RAND_FLOAT(); 66 | p->rotAxis.y = RAND_FLOAT(); 67 | p->rotAxis.z = RAND_FLOAT(); 68 | 69 | float screenSizeFactor = (0.8 * DEFAULT_Z_CAMERA * s->width); 70 | float speed = screenSizeFactor / 10 * (0.2 + RAND_FLOAT()); 71 | 72 | float xx = 2 * (p->centerRelPos.x - 0.5); 73 | float yy = 2 * (p->centerRelPos.y - 0.5); 74 | 75 | float x = 76 | speed * winFacX * spreadFac * (xx + 77 | 0.5 * (RAND_FLOAT() - 0.5)); 78 | float y = 79 | speed * winFacY * spreadFac * (yy + 80 | 0.5 * (RAND_FLOAT() - 0.5)); 81 | float z = speed * winFacZ * 7 * ((RAND_FLOAT() - 0.5) / 0.5); 82 | 83 | p->finalRelPos.x = x; 84 | p->finalRelPos.y = y; 85 | p->finalRelPos.z = z; 86 | 87 | p->moveStartTime = 88 | p->centerRelPos.y * (1 - fadeDuration - randYMax) + 89 | randYMax * RAND_FLOAT(); 90 | p->moveDuration = 1; 91 | 92 | p->fadeStartTime = p->moveStartTime + life; 93 | if (p->fadeStartTime > 1 - fadeDuration) 94 | p->fadeStartTime = 1 - fadeDuration; 95 | p->fadeDuration = fadeDuration; 96 | 97 | p->finalRotAng = 150; 98 | } 99 | pset->doDepthTest = TRUE; 100 | pset->doLighting = TRUE; 101 | pset->correctPerspective = CorrectPerspectivePolygon; 102 | 103 | aw->com->animTotalTime /= LEAFSPREAD_PERCEIVED_T; 104 | aw->com->animRemainingTime = aw->com->animTotalTime; 105 | 106 | return TRUE; 107 | } 108 | -------------------------------------------------------------------------------- /src/animationaddon/skewer.c: -------------------------------------------------------------------------------- 1 | /** 2 | * Animation plugin for compiz/beryl 3 | * 4 | * animation.c 5 | * 6 | * Copyright : (C) 2006 Erkin Bahceci 7 | * E-mail : erkinbah@gmail.com 8 | * 9 | * Based on Wobbly and Minimize plugins by 10 | * : David Reveman 11 | * E-mail : davidr@novell.com> 12 | * 13 | * Hexagon tessellator added by : Mike Slegeir 14 | * E-mail : mikeslegeir@mail.utexas.edu> 15 | * 16 | * Fold and Skewer added by : Tomasz Kołodziejski 17 | * E-mail : tkolodziejski@gmail.com 18 | * 19 | * This program is free software; you can redistribute it and/or 20 | * modify it under the terms of the GNU General Public License 21 | * as published by the Free Software Foundation; either version 2 22 | * of the License, or (at your option) any later version. 23 | * 24 | * This program is distributed in the hope that it will be useful, 25 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | * GNU General Public License for more details. 28 | * 29 | * You should have received a copy of the GNU General Public License 30 | * along with this program; if not, write to the Free Software 31 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 32 | **/ 33 | 34 | #include "animationaddon.h" 35 | 36 | static void 37 | getDirection (int *dir, int *c, int direction) 38 | { 39 | switch (direction) 40 | { 41 | case 0: 42 | // left 43 | dir[(*c)++] = 0; 44 | break; 45 | case 1: 46 | // right 47 | dir[(*c)++] = 1; 48 | break; 49 | case 2: 50 | // left-right 51 | dir[(*c)++] = 0; 52 | dir[(*c)++] = 1; 53 | break; 54 | case 3: 55 | // up 56 | dir[(*c)++] = 2; 57 | break; 58 | case 4: 59 | // downs 60 | dir[(*c)++] = 3; 61 | break; 62 | case 5: 63 | // up-down 64 | dir[(*c)++] = 2; 65 | dir[(*c)++] = 3; 66 | break; 67 | case 6: 68 | // in 69 | dir[(*c)++] = 4; 70 | break; 71 | case 7: 72 | // out 73 | dir[(*c)++] = 5; 74 | break; 75 | case 8: 76 | // in-out 77 | dir[(*c)++] = 4; 78 | dir[(*c)++] = 5; 79 | break; 80 | case 9: 81 | // random 82 | getDirection (dir, c, floor (RAND_FLOAT () * 8)); 83 | break; 84 | } 85 | } 86 | 87 | Bool 88 | fxSkewerInit (CompWindow * w) 89 | { 90 | if (!polygonsAnimInit (w)) 91 | return FALSE; 92 | 93 | CompScreen *s = w->screen; 94 | 95 | ANIMADDON_WINDOW (w); 96 | 97 | aw->com->animTotalTime /= SKEWER_PERCEIVED_T; 98 | aw->com->animRemainingTime = aw->com->animTotalTime; 99 | 100 | float thickness = animGetF (w, ANIMADDON_SCREEN_OPTION_SKEWER_THICKNESS); 101 | int rotation = animGetI (w, ANIMADDON_SCREEN_OPTION_SKEWER_ROTATION); 102 | int gridSizeX = animGetI (w, ANIMADDON_SCREEN_OPTION_SKEWER_GRIDSIZE_X); 103 | int gridSizeY = animGetI (w, ANIMADDON_SCREEN_OPTION_SKEWER_GRIDSIZE_Y); 104 | 105 | int dir[2]; // directions array 106 | int c = 0; // number of directions 107 | 108 | getDirection (dir, &c, 109 | animGetI (w, ANIMADDON_SCREEN_OPTION_SKEWER_DIRECTION)); 110 | 111 | if (animGetI (w, ANIMADDON_SCREEN_OPTION_SKEWER_TESS) == PolygonTessHex) 112 | { 113 | if (!tessellateIntoHexagons (w, gridSizeX, gridSizeY, thickness)) 114 | return FALSE; 115 | } 116 | else 117 | { 118 | if (!tessellateIntoRectangles (w, gridSizeX, gridSizeY, thickness)) 119 | return FALSE; 120 | } 121 | 122 | PolygonSet *pset = aw->eng.polygonSet; 123 | PolygonObject *p = pset->polygons; 124 | 125 | int times[pset->nPolygons]; 126 | int last_time = pset->nPolygons - 1; 127 | 128 | int i; 129 | for (i = 0; i < pset->nPolygons; i++) 130 | times[i] = i; 131 | 132 | for (i = 0; i < pset->nPolygons; i++, p++) 133 | { 134 | if (c > 0) 135 | { 136 | switch (dir[(int)floor (RAND_FLOAT () * c)]) 137 | { 138 | case 0: 139 | // left 140 | p->finalRelPos.x = -s->width; 141 | p->rotAxis.x = rotation; 142 | break; 143 | 144 | case 1: 145 | // right 146 | p->finalRelPos.x = s->width; 147 | p->rotAxis.x = rotation; 148 | break; 149 | 150 | case 2: 151 | // up 152 | p->finalRelPos.y = -s->height; 153 | p->rotAxis.y = rotation; 154 | break; 155 | 156 | case 3: 157 | // down 158 | p->finalRelPos.y = s->height; 159 | p->rotAxis.y = rotation; 160 | break; 161 | 162 | case 4: 163 | // in 164 | p->finalRelPos.z = -.8 * DEFAULT_Z_CAMERA * s->width; 165 | p->rotAxis.x = rotation; 166 | p->rotAxis.y = rotation; 167 | break; 168 | 169 | case 5: 170 | // out 171 | p->finalRelPos.z = .8 * DEFAULT_Z_CAMERA * s->width; 172 | p->rotAxis.x = rotation; 173 | p->rotAxis.y = rotation; 174 | break; 175 | } 176 | 177 | p->finalRotAng = rotation; 178 | } 179 | // if no direction is set - just fade 180 | 181 | // choose random start_time 182 | int rand_time = floor (RAND_FLOAT () * last_time); 183 | 184 | p->moveStartTime = 0.8 / (float)pset->nPolygons * times[rand_time]; 185 | p->moveDuration = 1 - p->moveStartTime; 186 | 187 | p->fadeStartTime = p->moveStartTime + 0.2; 188 | p->fadeDuration = 1 - p->fadeStartTime; 189 | 190 | times[rand_time] = times[last_time]; // copy last one over times[rand_time] 191 | last_time--; //descrease last_time 192 | } 193 | 194 | pset->doDepthTest = TRUE; 195 | pset->doLighting = TRUE; 196 | pset->correctPerspective = CorrectPerspectiveWindow; 197 | 198 | return TRUE; 199 | } 200 | 201 | void 202 | fxSkewerAnimStepPolygon (CompWindow *w, 203 | PolygonObject *p, 204 | float forwardProgress) 205 | { 206 | float moveProgress = forwardProgress - p->moveStartTime; 207 | 208 | if (p->moveDuration > 0) 209 | moveProgress /= p->moveDuration; 210 | if (moveProgress < 0) 211 | moveProgress = 0; 212 | else if (moveProgress > 1) 213 | moveProgress = 1; 214 | 215 | p->centerPos.x = 216 | p->centerPosStart.x + pow (moveProgress, 2) * p->finalRelPos.x; 217 | 218 | p->centerPos.y = 219 | p->centerPosStart.y + pow (moveProgress, 2) * p->finalRelPos.y; 220 | 221 | p->centerPos.z = 222 | p->centerPosStart.z + 223 | pow (moveProgress, 2) * p->finalRelPos.z * 1.0f / w->screen->width; 224 | 225 | // rotate 226 | p->rotAngle = pow (moveProgress, 2) * p->finalRotAng + p->rotAngleStart; 227 | } 228 | -------------------------------------------------------------------------------- /src/bell/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | PFLAGS=-module -avoid-version -no-undefined 3 | 4 | if BELL_PLUGIN 5 | libbell_la_LDFLAGS = $(PFLAGS) 6 | libbell_la_LIBADD = $(COMPIZ_LIBS) $(BELL_LIBS) 7 | nodist_libbell_la_SOURCES = bell_options.c bell_options.h 8 | dist_libbell_la_SOURCES = bell.c 9 | 10 | BUILT_SOURCES = $(nodist_libbell_la_SOURCES) 11 | 12 | AM_CPPFLAGS = \ 13 | -I$(top_srcdir)/include \ 14 | $(COMPIZ_CFLAGS) \ 15 | $(BELL_CFLAGS) \ 16 | -DDATADIR='"$(compdatadir)"' \ 17 | -DLIBDIR='"$(libdir)"' \ 18 | -DLOCALEDIR="\"@datadir@/locale\"" \ 19 | -DIMAGEDIR='"$(imagedir)"' 20 | 21 | moduledir = $(plugindir) 22 | 23 | 24 | module_LTLIBRARIES = libbell.la 25 | 26 | CLEANFILES = bell_options.c bell_options.h 27 | 28 | bell_options.h: $(top_srcdir)/metadata/bell.xml.in 29 | $(BCOP_BIN) --header $@ $< 30 | 31 | bell_options.c: $(top_srcdir)/metadata/bell.xml.in bell_options.h 32 | $(BCOP_BIN) --source $@ $< 33 | endif 34 | -------------------------------------------------------------------------------- /src/bell/bell.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Compiz bell plugin 4 | * 5 | * bell.c 6 | * 7 | * Copyright (c) 2011 Emily Strickland 8 | * Copyright (c) 2019 Colomban Wendling 9 | * 10 | * Authors: 11 | * Emily Strickland 12 | * Colomban Wendling 13 | * 14 | * This program is free software; you can redistribute it and/or 15 | * modify it under the terms of the GNU General Public License 16 | * as published by the Free Software Foundation; either version 2 17 | * of the License, or (at your option) any later version. 18 | * 19 | * This program is distributed in the hope that it will be useful, 20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 | * GNU General Public License for more details. 23 | * 24 | **/ 25 | 26 | #include 27 | #include 28 | #include 29 | #include 30 | 31 | #include 32 | #include "bell_options.h" 33 | 34 | 35 | static int displayPrivateIndex; 36 | 37 | typedef struct _BellDisplay 38 | { 39 | ca_context *canberraContext; 40 | /* In theory we could like to have an XSettings client on each 41 | * screen, but in practice most managers only bother setting up 42 | * on the default screen, so we do the same for the sake of 43 | * simplicity */ 44 | XSettingsClient *xsettings_client; 45 | HandleEventProc handleEvent; 46 | } 47 | BellDisplay; 48 | 49 | #define GET_BELL_DISPLAY(d) \ 50 | ((BellDisplay *) (d)->base.privates[displayPrivateIndex].ptr) 51 | #define BELL_DISPLAY(d) \ 52 | BellDisplay *bd = GET_BELL_DISPLAY(d); 53 | 54 | #ifndef CLAMP 55 | # define CLAMP(v, min, max) (((v) > (max)) ? (max) : (((v) < (min)) ? (min) : (v))) 56 | #endif 57 | 58 | 59 | static Bool 60 | bell (CompDisplay *d, 61 | CompAction *action, 62 | CompActionState state, 63 | CompOption *option, 64 | int nOption) 65 | { 66 | int r; 67 | CompWindow *w; 68 | ca_proplist *p; 69 | BELL_DISPLAY (d); 70 | 71 | if (ca_proplist_create (&p) < 0) 72 | return FALSE; 73 | 74 | ca_proplist_sets (p, CA_PROP_EVENT_ID, "bell-window-system"); 75 | ca_proplist_sets (p, CA_PROP_EVENT_DESCRIPTION, "Bell event"); 76 | ca_proplist_sets (p, CA_PROP_CANBERRA_CACHE_CONTROL, "permanent"); 77 | 78 | w = findWindowAtDisplay (d, d->activeWindow); 79 | if (w) 80 | { 81 | ca_proplist_setf (p, CA_PROP_WINDOW_X11_SCREEN, "%d", w->screen->screenNum); 82 | ca_proplist_setf (p, CA_PROP_WINDOW_X11_XID, "%ld", w->id); 83 | ca_proplist_sets (p, CA_PROP_APPLICATION_NAME, w->resName); 84 | ca_proplist_setf (p, CA_PROP_WINDOW_DESKTOP, "%u", w->desktop); 85 | 86 | ca_proplist_setf (p, CA_PROP_WINDOW_X, "%d", w->attrib.x); 87 | ca_proplist_setf (p, CA_PROP_WINDOW_Y, "%d", w->attrib.y); 88 | ca_proplist_setf (p, CA_PROP_WINDOW_WIDTH, "%d", w->attrib.width); 89 | ca_proplist_setf (p, CA_PROP_WINDOW_HEIGHT, "%d", w->attrib.height); 90 | 91 | if (bellGetSpatialSounds (d)) 92 | { 93 | int x, y; 94 | 95 | x = w->attrib.x + w->attrib.width / 2; 96 | x = CLAMP (x, 0, w->screen->width); 97 | y = w->attrib.y + w->attrib.height / 2; 98 | y = CLAMP (y, 0, w->screen->height); 99 | /* The convoluted format is to avoid locale-specific floating 100 | * point formatting. Taken from libcanberra-gtk. */ 101 | ca_proplist_setf (p, CA_PROP_WINDOW_HPOS, "%d.%03d", 102 | (int) (x / w->screen->width), 103 | (int) (x * 1000.0 / w->screen->width) % 1000); 104 | ca_proplist_setf (p, CA_PROP_WINDOW_VPOS, "%d.%03d", 105 | (int) (y / w->screen->height), 106 | (int) (y * 1000.0 / w->screen->height) % 1000); 107 | 108 | compLogMessage ("bell", CompLogLevelDebug, 109 | "spatial: screen geometry: %dx%d%+d%+d", 110 | w->screen->width, w->screen->height, 111 | w->screen->x, w->screen->y); 112 | compLogMessage ("bell", CompLogLevelDebug, 113 | "spatial: window geometry: %dx%d%+d%+d (%d.%03d,%d.%03d)", 114 | w->attrib.width, w->attrib.height, 115 | w->attrib.x, w->attrib.y, 116 | (int) (x / w->screen->width), 117 | (int) (x * 1000.0 / w->screen->width) % 1000, 118 | (int) (y / w->screen->height), 119 | (int) (y * 1000.0 / w->screen->height) % 1000); 120 | } 121 | } 122 | 123 | compLogMessage ("bell", CompLogLevelDebug, "playing bell"); 124 | if ((r = ca_context_play_full (bd->canberraContext, 1, p, NULL, NULL)) < 0) 125 | { 126 | compLogMessage ("bell", CompLogLevelWarn, "couldn't play bell: %s", 127 | ca_strerror (r)); 128 | } 129 | 130 | ca_proplist_destroy (p); 131 | 132 | /* Allow other plugins to handle bell event */ 133 | return FALSE; 134 | } 135 | 136 | static void 137 | xsettings_notify (const char *name, 138 | XSettingsAction action, 139 | XSettingsSetting *setting, 140 | void *cb_data) 141 | { 142 | BellDisplay *bd = cb_data; 143 | 144 | if (setting && 145 | strcmp (setting->name, "Net/SoundThemeName") == 0 && 146 | setting->type == XSETTINGS_TYPE_STRING) 147 | { 148 | compLogMessage ("bell", CompLogLevelDebug, "XSettings notify: %s=%s", 149 | name, setting->data.v_string); 150 | 151 | ca_context_change_props (bd->canberraContext, 152 | CA_PROP_CANBERRA_XDG_THEME_NAME, 153 | setting->data.v_string, 154 | NULL); 155 | } 156 | else if (setting && 157 | strcmp (setting->name, "Net/EnableEventSounds") == 0 && 158 | setting->type == XSETTINGS_TYPE_INT) 159 | { 160 | compLogMessage ("bell", CompLogLevelDebug, "XSettings notify: %s=%d", 161 | name, setting->data.v_int); 162 | 163 | ca_context_change_props (bd->canberraContext, 164 | CA_PROP_CANBERRA_ENABLE, 165 | setting->data.v_int ? "1" : "0", 166 | NULL); 167 | } 168 | } 169 | 170 | static void 171 | bellHandleEvent (CompDisplay *d, 172 | XEvent *event) 173 | { 174 | BELL_DISPLAY (d); 175 | 176 | xsettings_client_process_event (bd->xsettings_client, event); 177 | 178 | UNWRAP (bd, d, handleEvent); 179 | (*d->handleEvent) (d, event); 180 | WRAP (bd, d, handleEvent, bellHandleEvent); 181 | } 182 | 183 | static Bool 184 | bellInitDisplay (CompPlugin *p, 185 | CompDisplay *d) 186 | { 187 | BellDisplay *bd; 188 | int error; 189 | 190 | if (!checkPluginABI ("core", CORE_ABIVERSION)) 191 | return FALSE; 192 | 193 | bd = malloc (sizeof *bd); 194 | if (!bd) 195 | return FALSE; 196 | 197 | bd->canberraContext = NULL; 198 | if ((error = ca_context_create (&bd->canberraContext)) < 0 || 199 | (error = ca_context_change_props (bd->canberraContext, 200 | CA_PROP_APPLICATION_NAME, 201 | "Compiz bell plugin", 202 | CA_PROP_APPLICATION_ID, 203 | "org.compiz.plugin.Bell", 204 | CA_PROP_WINDOW_X11_DISPLAY, 205 | DisplayString (d->display), 206 | NULL)) < 0) 207 | { 208 | compLogMessage ("bell", CompLogLevelWarn, "couldn't initialize canberra: %s", 209 | ca_strerror (error)); 210 | if (bd->canberraContext) 211 | ca_context_destroy (bd->canberraContext); 212 | free (bd); 213 | return FALSE; 214 | } 215 | 216 | bd->xsettings_client = xsettings_client_new (d->display, 217 | DefaultScreen(d->display), 218 | xsettings_notify, 219 | NULL, bd); 220 | if (!bd->xsettings_client) 221 | { 222 | compLogMessage ("bell", CompLogLevelWarn, "couldn't allocate xsettings client"); 223 | ca_context_destroy (bd->canberraContext); 224 | free (bd); 225 | return FALSE; 226 | } 227 | 228 | bellSetBellInitiate (d, bell); 229 | 230 | d->base.privates[displayPrivateIndex].ptr = bd; 231 | 232 | WRAP (bd, d, handleEvent, bellHandleEvent); 233 | 234 | return TRUE; 235 | } 236 | 237 | static void 238 | bellFiniDisplay (CompPlugin *p, 239 | CompDisplay *d) 240 | { 241 | BELL_DISPLAY (d); 242 | 243 | UNWRAP (bd, d, handleEvent); 244 | 245 | ca_context_destroy (bd->canberraContext); 246 | free (bd); 247 | } 248 | 249 | static Bool 250 | bellInit (CompPlugin *p) 251 | { 252 | displayPrivateIndex = allocateDisplayPrivateIndex(); 253 | 254 | return displayPrivateIndex >= 0; 255 | } 256 | 257 | static void 258 | bellFini (CompPlugin *p) 259 | { 260 | freeDisplayPrivateIndex (displayPrivateIndex); 261 | } 262 | 263 | static CompBool 264 | bellInitObject (CompPlugin *p, 265 | CompObject *o) 266 | { 267 | static InitPluginObjectProc dispTab[] = { 268 | (InitPluginObjectProc) 0, /* InitCore */ 269 | (InitPluginObjectProc) bellInitDisplay 270 | }; 271 | 272 | RETURN_DISPATCH (o, dispTab, ARRAY_SIZE (dispTab), TRUE, (p, o)); 273 | } 274 | 275 | static void 276 | bellFiniObject (CompPlugin *p, 277 | CompObject *o) 278 | { 279 | static FiniPluginObjectProc dispTab[] = { 280 | (FiniPluginObjectProc) 0, /* FiniCore */ 281 | (FiniPluginObjectProc) bellFiniDisplay 282 | }; 283 | 284 | DISPATCH (o, dispTab, ARRAY_SIZE (dispTab), (p, o)); 285 | } 286 | 287 | CompPluginVTable bellVTable = { 288 | "bell", 289 | 0, 290 | bellInit, 291 | bellFini, 292 | bellInitObject, 293 | bellFiniObject, 294 | 0, 295 | 0 296 | }; 297 | 298 | CompPluginVTable * 299 | getCompPluginInfo (void) 300 | { 301 | return &bellVTable; 302 | } 303 | -------------------------------------------------------------------------------- /src/bench/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | PFLAGS=-module -avoid-version -no-undefined 3 | 4 | libbench_la_LDFLAGS = $(PFLAGS) 5 | libbench_la_LIBADD = @COMPIZ_LIBS@ 6 | nodist_libbench_la_SOURCES = bench_options.c bench_options.h 7 | dist_libbench_la_SOURCES = bench.c bench_tex.h 8 | 9 | BUILT_SOURCES = $(nodist_libbench_la_SOURCES) 10 | 11 | AM_CPPFLAGS = \ 12 | @COMPIZ_CFLAGS@ \ 13 | -DDATADIR='"$(compdatadir)"' \ 14 | -DLIBDIR='"$(libdir)"' \ 15 | -DLOCALEDIR="\"@datadir@/locale\"" \ 16 | -DIMAGEDIR='"$(imagedir)"' \ 17 | -I$(top_srcdir)/include 18 | 19 | moduledir = $(plugindir) 20 | 21 | 22 | module_LTLIBRARIES = libbench.la 23 | 24 | CLEANFILES = *_options.c *_options.h 25 | 26 | bench_options.h: ../../metadata/bench.xml.in 27 | $(BCOP_BIN) --header $@ $< 28 | 29 | bench_options.c: ../../metadata/bench.xml.in bench_options.h 30 | $(BCOP_BIN) --source $@ $< 31 | -------------------------------------------------------------------------------- /src/bicubic/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | PFLAGS=-module -avoid-version -no-undefined 3 | 4 | libbicubic_la_LDFLAGS = $(PFLAGS) 5 | libbicubic_la_LIBADD = @COMPIZ_LIBS@ 6 | libbicubic_la_SOURCES = bicubic.c 7 | 8 | AM_CPPFLAGS = \ 9 | @COMPIZ_CFLAGS@ \ 10 | -DDATADIR='"$(compdatadir)"' \ 11 | -DLIBDIR='"$(libdir)"' \ 12 | -DLOCALEDIR="\"@datadir@/locale\"" \ 13 | -DIMAGEDIR='"$(imagedir)"' \ 14 | -I$(top_srcdir)/include 15 | 16 | moduledir = $(plugindir) 17 | 18 | module_LTLIBRARIES = libbicubic.la 19 | -------------------------------------------------------------------------------- /src/crashhandler/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | PFLAGS=-module -avoid-version -no-undefined 3 | 4 | libcrashhandler_la_LDFLAGS = $(PFLAGS) 5 | libcrashhandler_la_LIBADD = @COMPIZ_LIBS@ 6 | nodist_libcrashhandler_la_SOURCES = crashhandler_options.c crashhandler_options.h 7 | dist_libcrashhandler_la_SOURCES = crashhandler.c 8 | 9 | BUILT_SOURCES = $(nodist_libcrashhandler_la_SOURCES) 10 | 11 | AM_CPPFLAGS = \ 12 | @COMPIZ_CFLAGS@ \ 13 | -DDATADIR='"$(compdatadir)"' \ 14 | -DLIBDIR='"$(libdir)"' \ 15 | -DLOCALEDIR="\"@datadir@/locale\"" \ 16 | -DIMAGEDIR='"$(imagedir)"' \ 17 | -I$(top_srcdir)/include 18 | 19 | moduledir = $(plugindir) 20 | 21 | 22 | module_LTLIBRARIES = libcrashhandler.la 23 | 24 | CLEANFILES = *_options.c *_options.h 25 | 26 | crashhandler_options.h: ../../metadata/crashhandler.xml.in 27 | $(BCOP_BIN) --header $@ $< 28 | 29 | crashhandler_options.c: ../../metadata/crashhandler.xml.in crashhandler_options.h 30 | $(BCOP_BIN) --source $@ $< 31 | -------------------------------------------------------------------------------- /src/crashhandler/crashhandler.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Compiz crash handler plugin 4 | * 5 | * crashhandler.c 6 | * 7 | * Copyright : (C) 2006 by Dennis Kasprzyk 8 | * E-mail : onestone@compiz.org 9 | * 10 | * 11 | * This program is free software; you can redistribute it and/or 12 | * modify it under the terms of the GNU General Public License 13 | * as published by the Free Software Foundation; either version 2 14 | * of the License, or (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU General Public License for more details. 20 | * 21 | */ 22 | 23 | #include 24 | #include 25 | #include 26 | #include 27 | 28 | #include 29 | 30 | #include "crashhandler_options.h" 31 | 32 | static CompDisplay *cDisplay; 33 | 34 | static void 35 | crash_handler (int sig) 36 | { 37 | if (sig == SIGSEGV || sig == SIGFPE || sig == SIGILL || sig == SIGABRT) 38 | { 39 | static int count = 0; 40 | /* backtrace */ 41 | char cmd[1024]; 42 | 43 | if (++count > 1) 44 | exit (1); 45 | 46 | snprintf (cmd, 1024, 47 | "echo -e \"set prompt\nthread apply all bt full\n" 48 | "echo \\\\\\n\necho \\\\\\n\nbt\nquit\" > /tmp/gdb.tmp;" 49 | "gdb -q %s %i < /tmp/gdb.tmp | " 50 | "grep -v \"No symbol table\" | " 51 | "tee %s/compiz_crash-%i.out; rm -f /tmp/gdb.tmp; " 52 | "echo \"\n[CRASH_HANDLER]: " 53 | "\\\"%s/compiz_crash-%i.out\\\" created!\n\"", 54 | programName, getpid (), crashhandlerGetDirectory (cDisplay), 55 | getpid (), crashhandlerGetDirectory (cDisplay), getpid () ); 56 | 57 | if (system (cmd)); 58 | 59 | if (crashhandlerGetStartWm (cDisplay) ) 60 | { 61 | if (fork () == 0) 62 | { 63 | setsid (); 64 | putenv (cDisplay->displayString); 65 | execl ("/bin/sh", "/bin/sh", "-c", 66 | crashhandlerGetWmCmd (cDisplay), NULL); 67 | exit (0); 68 | } 69 | } 70 | 71 | exit (1); 72 | } 73 | } 74 | 75 | static void 76 | crashhandlerDisplayOptionChanged (CompDisplay *d, 77 | CompOption *opt, 78 | CrashhandlerDisplayOptions num) 79 | { 80 | switch (num) 81 | { 82 | 83 | case CrashhandlerDisplayOptionEnabled: 84 | if (crashhandlerGetEnabled (d) ) 85 | { 86 | /* enable crash handler */ 87 | signal (SIGSEGV, crash_handler); 88 | signal (SIGFPE, crash_handler); 89 | signal (SIGILL, crash_handler); 90 | signal (SIGABRT, crash_handler); 91 | } 92 | else 93 | { 94 | /* disable crash handler */ 95 | signal (SIGSEGV, SIG_DFL); 96 | signal (SIGFPE, SIG_DFL); 97 | signal (SIGILL, SIG_DFL); 98 | signal (SIGABRT, SIG_DFL); 99 | } 100 | 101 | break; 102 | 103 | default: 104 | break; 105 | } 106 | } 107 | 108 | static Bool 109 | crashhandlerInitDisplay (CompPlugin *p, 110 | CompDisplay *d) 111 | { 112 | cDisplay = d; 113 | 114 | if (!checkPluginABI ("core", CORE_ABIVERSION)) 115 | return FALSE; 116 | 117 | if (crashhandlerGetEnabled (d) ) 118 | { 119 | /* segmentation fault */ 120 | signal (SIGSEGV, crash_handler); 121 | /* floating point exception */ 122 | signal (SIGFPE, crash_handler); 123 | /* illegal instruction */ 124 | signal (SIGILL, crash_handler); 125 | /* abort */ 126 | signal (SIGABRT, crash_handler); 127 | } 128 | 129 | crashhandlerSetEnabledNotify (d, crashhandlerDisplayOptionChanged); 130 | 131 | return TRUE; 132 | } 133 | 134 | static void 135 | crashhandlerFiniDisplay (CompPlugin *p, 136 | CompDisplay *d) 137 | { 138 | signal (SIGSEGV, SIG_DFL); 139 | signal (SIGFPE, SIG_DFL); 140 | signal (SIGILL, SIG_DFL); 141 | signal (SIGABRT, SIG_DFL); 142 | } 143 | 144 | static CompBool 145 | crashhandlerInitObject (CompPlugin *p, 146 | CompObject *o) 147 | { 148 | static InitPluginObjectProc dispTab[] = { 149 | (InitPluginObjectProc) 0, /* InitCore */ 150 | (InitPluginObjectProc) crashhandlerInitDisplay 151 | }; 152 | 153 | RETURN_DISPATCH (o, dispTab, ARRAY_SIZE (dispTab), TRUE, (p, o)); 154 | } 155 | 156 | static void 157 | crashhandlerFiniObject (CompPlugin *p, 158 | CompObject *o) 159 | { 160 | static FiniPluginObjectProc dispTab[] = { 161 | (FiniPluginObjectProc) 0, /* FiniCore */ 162 | (FiniPluginObjectProc) crashhandlerFiniDisplay 163 | }; 164 | 165 | DISPATCH (o, dispTab, ARRAY_SIZE (dispTab), (p, o)); 166 | } 167 | 168 | 169 | CompPluginVTable crashhandlerVTable = { 170 | "crashhandler", 171 | 0, 172 | 0, 173 | 0, 174 | crashhandlerInitObject, 175 | crashhandlerFiniObject, 176 | 0, 177 | 0 178 | }; 179 | 180 | CompPluginVTable * 181 | getCompPluginInfo (void) 182 | { 183 | return &crashhandlerVTable; 184 | } 185 | -------------------------------------------------------------------------------- /src/cubeaddon/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | PFLAGS=-module -avoid-version -no-undefined 3 | 4 | if CUBEADDON_PLUGIN 5 | libcubeaddon_la_LDFLAGS = $(PFLAGS) 6 | libcubeaddon_la_LIBADD = @COMPIZ_LIBS@ @COMPIZCUBE_LIBS@ 7 | nodist_libcubeaddon_la_SOURCES = cubeaddon_options.c cubeaddon_options.h 8 | dist_libcubeaddon_la_SOURCES = cubeaddon.c 9 | endif 10 | 11 | BUILT_SOURCES = $(nodist_libcubeaddon_la_SOURCES) 12 | 13 | AM_CPPFLAGS = \ 14 | -I$(top_srcdir)/include \ 15 | @COMPIZ_CFLAGS@ \ 16 | @COMPIZCUBE_CFLAGS@ \ 17 | -DDATADIR='"$(compdatadir)"' \ 18 | -DLIBDIR='"$(libdir)"' \ 19 | -DLOCALEDIR="\"@datadir@/locale\"" \ 20 | -DIMAGEDIR='"$(imagedir)"' 21 | 22 | moduledir = $(plugindir) 23 | 24 | if CUBEADDON_PLUGIN 25 | module_LTLIBRARIES = libcubeaddon.la 26 | endif 27 | 28 | CLEANFILES = *_options.c *_options.h 29 | 30 | cubeaddon_options.h: ../../metadata/cubeaddon.xml.in 31 | $(BCOP_BIN) --header $@ $< 32 | 33 | cubeaddon_options.c: ../../metadata/cubeaddon.xml.in cubeaddon_options.h 34 | $(BCOP_BIN) --source $@ $< 35 | -------------------------------------------------------------------------------- /src/extrawm/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | PFLAGS=-module -avoid-version -no-undefined 3 | 4 | libextrawm_la_LDFLAGS = $(PFLAGS) 5 | libextrawm_la_LIBADD = @COMPIZ_LIBS@ 6 | nodist_libextrawm_la_SOURCES = extrawm_options.c extrawm_options.h 7 | dist_libextrawm_la_SOURCES = extrawm.c 8 | 9 | BUILT_SOURCES = $(nodist_libextrawm_la_SOURCES) 10 | 11 | AM_CPPFLAGS = \ 12 | @COMPIZ_CFLAGS@ \ 13 | -DDATADIR='"$(compdatadir)"' \ 14 | -DLIBDIR='"$(libdir)"' \ 15 | -DLOCALEDIR="\"@datadir@/locale\"" \ 16 | -DIMAGEDIR='"$(imagedir)"' \ 17 | -I$(top_srcdir)/include 18 | 19 | moduledir = $(plugindir) 20 | 21 | 22 | module_LTLIBRARIES = libextrawm.la 23 | 24 | CLEANFILES = *_options.c *_options.h 25 | 26 | extrawm_options.h: ../../metadata/extrawm.xml.in 27 | $(BCOP_BIN) --header $@ $< 28 | 29 | extrawm_options.c: ../../metadata/extrawm.xml.in extrawm_options.h 30 | $(BCOP_BIN) --source $@ $< 31 | -------------------------------------------------------------------------------- /src/fadedesktop/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | PFLAGS=-module -avoid-version -no-undefined 3 | 4 | libfadedesktop_la_LDFLAGS = $(PFLAGS) 5 | libfadedesktop_la_LIBADD = @COMPIZ_LIBS@ 6 | nodist_libfadedesktop_la_SOURCES = fadedesktop_options.c fadedesktop_options.h 7 | dist_libfadedesktop_la_SOURCES = fadedesktop.c 8 | 9 | BUILT_SOURCES = $(nodist_libfadedesktop_la_SOURCES) 10 | 11 | AM_CPPFLAGS = \ 12 | @COMPIZ_CFLAGS@ \ 13 | -DDATADIR='"$(compdatadir)"' \ 14 | -DLIBDIR='"$(libdir)"' \ 15 | -DLOCALEDIR="\"@datadir@/locale\"" \ 16 | -DIMAGEDIR='"$(imagedir)"' \ 17 | -I$(top_srcdir)/include 18 | 19 | moduledir = $(plugindir) 20 | 21 | 22 | module_LTLIBRARIES = libfadedesktop.la 23 | 24 | CLEANFILES = *_options.c *_options.h 25 | 26 | fadedesktop_options.h: ../../metadata/fadedesktop.xml.in 27 | $(BCOP_BIN) --header $@ $< 28 | 29 | fadedesktop_options.c: ../../metadata/fadedesktop.xml.in fadedesktop_options.h 30 | $(BCOP_BIN) --source $@ $< 31 | -------------------------------------------------------------------------------- /src/firepaint/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | PFLAGS=-module -avoid-version -no-undefined 3 | 4 | libfirepaint_la_LDFLAGS = $(PFLAGS) 5 | libfirepaint_la_LIBADD = @COMPIZ_LIBS@ 6 | nodist_libfirepaint_la_SOURCES = firepaint_options.c firepaint_options.h 7 | dist_libfirepaint_la_SOURCES = firepaint.c firepaint_tex.h 8 | 9 | BUILT_SOURCES = $(nodist_libfirepaint_la_SOURCES) 10 | 11 | AM_CPPFLAGS = \ 12 | @COMPIZ_CFLAGS@ \ 13 | -DDATADIR='"$(compdatadir)"' \ 14 | -DLIBDIR='"$(libdir)"' \ 15 | -DLOCALEDIR="\"@datadir@/locale\"" \ 16 | -DIMAGEDIR='"$(imagedir)"' \ 17 | -I$(top_srcdir)/include 18 | 19 | moduledir = $(plugindir) 20 | 21 | 22 | module_LTLIBRARIES = libfirepaint.la 23 | 24 | CLEANFILES = *_options.c *_options.h 25 | 26 | firepaint_options.h: ../../metadata/firepaint.xml.in 27 | $(BCOP_BIN) --header $@ $< 28 | 29 | firepaint_options.c: ../../metadata/firepaint.xml.in firepaint_options.h 30 | $(BCOP_BIN) --source $@ $< 31 | -------------------------------------------------------------------------------- /src/gears/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | PFLAGS=-module -avoid-version -no-undefined 3 | 4 | libgears_la_LDFLAGS = $(PFLAGS) 5 | libgears_la_LIBADD = @COMPIZ_LIBS@ 6 | nodist_libgears_la_SOURCES = gears_options.c gears_options.h 7 | dist_libgears_la_SOURCES = gears.c 8 | 9 | BUILT_SOURCES = $(nodist_libgears_la_SOURCES) 10 | 11 | AM_CPPFLAGS = \ 12 | @COMPIZ_CFLAGS@ \ 13 | -DDATADIR='"$(compdatadir)"' \ 14 | -DLIBDIR='"$(libdir)"' \ 15 | -DLOCALEDIR="\"@datadir@/locale\"" \ 16 | -DIMAGEDIR='"$(imagedir)"' \ 17 | -I$(top_srcdir)/include 18 | 19 | moduledir = $(plugindir) 20 | 21 | 22 | module_LTLIBRARIES = libgears.la 23 | 24 | CLEANFILES = *_options.c *_options.h 25 | 26 | gears_options.h: ../../metadata/gears.xml.in 27 | $(BCOP_BIN) --header $@ $< 28 | 29 | gears_options.c: ../../metadata/gears.xml.in gears_options.h 30 | $(BCOP_BIN) --source $@ $< 31 | -------------------------------------------------------------------------------- /src/grid/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | PFLAGS=-module -avoid-version -no-undefined 3 | 4 | libgrid_la_LDFLAGS = $(PFLAGS) 5 | libgrid_la_LIBADD = @COMPIZ_LIBS@ 6 | nodist_libgrid_la_SOURCES = grid_options.c grid_options.h 7 | dist_libgrid_la_SOURCES = grid.c 8 | 9 | BUILT_SOURCES = $(nodist_libgrid_la_SOURCES) 10 | 11 | AM_CPPFLAGS = \ 12 | @COMPIZ_CFLAGS@ \ 13 | -DDATADIR='"$(compdatadir)"' \ 14 | -DLIBDIR='"$(libdir)"' \ 15 | -DLOCALEDIR="\"@datadir@/locale\"" \ 16 | -DIMAGEDIR='"$(imagedir)"' \ 17 | -I$(top_srcdir)/include 18 | 19 | moduledir = $(plugindir) 20 | 21 | 22 | module_LTLIBRARIES = libgrid.la 23 | 24 | CLEANFILES = *_options.c *_options.h 25 | 26 | grid_options.h: ../../metadata/grid.xml.in 27 | $(BCOP_BIN) --header $@ $< 28 | 29 | grid_options.c: ../../metadata/grid.xml.in grid_options.h 30 | $(BCOP_BIN) --source $@ $< 31 | -------------------------------------------------------------------------------- /src/group/Makefile.am: -------------------------------------------------------------------------------- 1 | PFLAGS=-module -avoid-version -no-undefined 2 | 3 | if GROUP_PLUGIN 4 | libgroup_la_LDFLAGS = $(PFLAGS) 5 | libgroup_la_LIBADD = @COMPIZ_LIBS@ @GROUP_LIBS@ 6 | nodist_libgroup_la_SOURCES = group_options.c \ 7 | group_options.h 8 | dist_libgroup_la_SOURCES = cairo.c \ 9 | group.c \ 10 | init.c \ 11 | paint.c \ 12 | queues.c \ 13 | selection.c \ 14 | tab.c \ 15 | group-internal.h \ 16 | group_glow.h 17 | endif 18 | 19 | BUILT_SOURCES = $(nodist_libgroup_la_SOURCES) 20 | 21 | AM_CPPFLAGS = \ 22 | @COMPIZ_CFLAGS@ \ 23 | @GROUP_CFLAGS@ \ 24 | -DDATADIR='"$(compdatadir)"' \ 25 | -DLIBDIR='"$(libdir)"' \ 26 | -DLOCALEDIR="\"@datadir@/locale\"" \ 27 | -DIMAGEDIR='"$(imagedir)"' \ 28 | -I$(top_srcdir)/include 29 | 30 | moduledir = $(plugindir) 31 | 32 | if GROUP_PLUGIN 33 | module_LTLIBRARIES=libgroup.la 34 | endif 35 | 36 | CLEANFILES = *_options.c *_options.h 37 | 38 | group_options.h: ../../metadata/group.xml.in 39 | $(BCOP_BIN) --header $@ $< 40 | 41 | group_options.c: ../../metadata/group.xml.in group_options.h 42 | $(BCOP_BIN) --source $@ $< 43 | -------------------------------------------------------------------------------- /src/group/queues.c: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Compiz group plugin 4 | * 5 | * queues.c 6 | * 7 | * Copyright : (C) 2006-2007 by Patrick Niklaus, Roi Cohen, Danny Baumann 8 | * Authors: Patrick Niklaus 9 | * Roi Cohen 10 | * Danny Baumann 11 | * 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | **/ 24 | 25 | #include "group-internal.h" 26 | 27 | /* 28 | * functions enqueuing pending notifies 29 | * 30 | */ 31 | 32 | /* forward declaration */ 33 | static Bool groupDequeueTimer (void *closure); 34 | 35 | void 36 | groupEnqueueMoveNotify (CompWindow *w, 37 | int dx, 38 | int dy, 39 | Bool immediate, 40 | Bool sync) 41 | { 42 | GroupPendingMoves *move; 43 | 44 | GROUP_SCREEN (w->screen); 45 | 46 | move = malloc (sizeof (GroupPendingMoves)); 47 | if (!move) 48 | return; 49 | 50 | move->w = w; 51 | move->dx = dx; 52 | move->dy = dy; 53 | 54 | move->immediate = immediate; 55 | move->sync = sync; 56 | move->next = NULL; 57 | 58 | if (gs->pendingMoves) 59 | { 60 | GroupPendingMoves *temp; 61 | for (temp = gs->pendingMoves; temp->next; temp = temp->next); 62 | 63 | temp->next = move; 64 | } 65 | else 66 | gs->pendingMoves = move; 67 | 68 | if (!gs->dequeueTimeoutHandle) 69 | { 70 | gs->dequeueTimeoutHandle = 71 | compAddTimeout (0, 0, groupDequeueTimer, (void *) w->screen); 72 | } 73 | } 74 | 75 | static void 76 | groupDequeueSyncs (GroupPendingSyncs *syncs) 77 | { 78 | GroupPendingSyncs *sync; 79 | 80 | while (syncs) 81 | { 82 | sync = syncs; 83 | syncs = sync->next; 84 | 85 | GROUP_WINDOW (sync->w); 86 | if (gw->needsPosSync) 87 | { 88 | syncWindowPosition (sync->w); 89 | gw->needsPosSync = FALSE; 90 | } 91 | 92 | free (sync); 93 | } 94 | 95 | } 96 | 97 | void 98 | groupDequeueMoveNotifies (CompScreen *s) 99 | { 100 | GroupPendingMoves *move; 101 | GroupPendingSyncs *syncs = NULL, *sync; 102 | 103 | GROUP_SCREEN (s); 104 | 105 | gs->queued = TRUE; 106 | 107 | while (gs->pendingMoves) 108 | { 109 | move = gs->pendingMoves; 110 | gs->pendingMoves = move->next; 111 | 112 | moveWindow (move->w, move->dx, move->dy, TRUE, move->immediate); 113 | if (move->sync) 114 | { 115 | sync = malloc (sizeof (GroupPendingSyncs)); 116 | if (sync) 117 | { 118 | GROUP_WINDOW (move->w); 119 | 120 | gw->needsPosSync = TRUE; 121 | sync->w = move->w; 122 | sync->next = syncs; 123 | syncs = sync; 124 | } 125 | } 126 | free (move); 127 | } 128 | 129 | if (syncs) 130 | groupDequeueSyncs (syncs); 131 | 132 | gs->queued = FALSE; 133 | } 134 | 135 | void 136 | groupEnqueueGrabNotify (CompWindow *w, 137 | int x, 138 | int y, 139 | unsigned int state, 140 | unsigned int mask) 141 | { 142 | GroupPendingGrabs *grab; 143 | 144 | GROUP_SCREEN (w->screen); 145 | 146 | grab = malloc (sizeof (GroupPendingGrabs)); 147 | if (!grab) 148 | return; 149 | 150 | grab->w = w; 151 | grab->x = x; 152 | grab->y = y; 153 | 154 | grab->state = state; 155 | grab->mask = mask; 156 | grab->next = NULL; 157 | 158 | if (gs->pendingGrabs) 159 | { 160 | GroupPendingGrabs *temp; 161 | for (temp = gs->pendingGrabs; temp->next; temp = temp->next); 162 | 163 | temp->next = grab; 164 | } 165 | else 166 | gs->pendingGrabs = grab; 167 | 168 | if (!gs->dequeueTimeoutHandle) 169 | { 170 | gs->dequeueTimeoutHandle = 171 | compAddTimeout (0, 0, groupDequeueTimer, (void *) w->screen); 172 | } 173 | } 174 | 175 | static void 176 | groupDequeueGrabNotifies (CompScreen *s) 177 | { 178 | GroupPendingGrabs *grab; 179 | 180 | GROUP_SCREEN (s); 181 | 182 | gs->queued = TRUE; 183 | 184 | while (gs->pendingGrabs) 185 | { 186 | grab = gs->pendingGrabs; 187 | gs->pendingGrabs = gs->pendingGrabs->next; 188 | 189 | (*(grab->w)->screen->windowGrabNotify) (grab->w, 190 | grab->x, grab->y, 191 | grab->state, grab->mask); 192 | 193 | free (grab); 194 | } 195 | 196 | gs->queued = FALSE; 197 | } 198 | 199 | void 200 | groupEnqueueUngrabNotify (CompWindow *w) 201 | { 202 | GroupPendingUngrabs *ungrab; 203 | 204 | GROUP_SCREEN (w->screen); 205 | 206 | ungrab = malloc (sizeof (GroupPendingUngrabs)); 207 | 208 | if (!ungrab) 209 | return; 210 | 211 | ungrab->w = w; 212 | ungrab->next = NULL; 213 | 214 | if (gs->pendingUngrabs) 215 | { 216 | GroupPendingUngrabs *temp; 217 | for (temp = gs->pendingUngrabs; temp->next; temp = temp->next); 218 | 219 | temp->next = ungrab; 220 | } 221 | else 222 | gs->pendingUngrabs = ungrab; 223 | 224 | if (!gs->dequeueTimeoutHandle) 225 | { 226 | gs->dequeueTimeoutHandle = 227 | compAddTimeout (0, 0, groupDequeueTimer, (void *) w->screen); 228 | } 229 | } 230 | 231 | static void 232 | groupDequeueUngrabNotifies (CompScreen *s) 233 | { 234 | GroupPendingUngrabs *ungrab; 235 | 236 | GROUP_SCREEN (s); 237 | 238 | gs->queued = TRUE; 239 | 240 | while (gs->pendingUngrabs) 241 | { 242 | ungrab = gs->pendingUngrabs; 243 | gs->pendingUngrabs = gs->pendingUngrabs->next; 244 | 245 | (*(ungrab->w)->screen->windowUngrabNotify) (ungrab->w); 246 | 247 | free (ungrab); 248 | } 249 | 250 | gs->queued = FALSE; 251 | } 252 | 253 | static Bool 254 | groupDequeueTimer (void *closure) 255 | { 256 | CompScreen *s = (CompScreen *) closure; 257 | 258 | GROUP_SCREEN (s); 259 | 260 | groupDequeueMoveNotifies (s); 261 | groupDequeueGrabNotifies (s); 262 | groupDequeueUngrabNotifies (s); 263 | 264 | gs->dequeueTimeoutHandle = 0; 265 | 266 | return FALSE; 267 | } 268 | -------------------------------------------------------------------------------- /src/highlightcontent/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | PFLAGS=-module -avoid-version -no-undefined 3 | 4 | if HIGHLIGHTCONTENT_PLUGIN 5 | libhighlightcontent_la_LDFLAGS = $(PFLAGS) 6 | libhighlightcontent_la_LIBADD = @COMPIZ_LIBS@ @HIGHLIGHTCONTENT_LIBS@ 7 | nodist_libhighlightcontent_la_SOURCES = highlightcontent_options.c highlightcontent_options.h 8 | dist_libhighlightcontent_la_SOURCES = highlightcontent.c 9 | endif 10 | 11 | BUILT_SOURCES = $(nodist_libhighlightcontent_la_SOURCES) 12 | 13 | AM_CPPFLAGS = \ 14 | @COMPIZ_CFLAGS@ \ 15 | @HIGHLIGHTCONTENT_CFLAGS@ \ 16 | -DDATADIR='"$(compdatadir)"' \ 17 | -DLIBDIR='"$(libdir)"' \ 18 | -DLOCALEDIR="\"@datadir@/locale\"" \ 19 | -DIMAGEDIR='"$(imagedir)"' \ 20 | -I$(top_srcdir)/include 21 | 22 | moduledir = $(plugindir) 23 | 24 | if HIGHLIGHTCONTENT_PLUGIN 25 | module_LTLIBRARIES = libhighlightcontent.la 26 | endif 27 | 28 | CLEANFILES = *_options.c *_options.h 29 | 30 | highlightcontent_options.h: ../../metadata/highlightcontent.xml.in 31 | $(BCOP_BIN) --header $@ $< 32 | 33 | highlightcontent_options.c: ../../metadata/highlightcontent.xml.in highlightcontent_options.h 34 | $(BCOP_BIN) --source $@ $< 35 | -------------------------------------------------------------------------------- /src/loginout/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | PFLAGS=-module -avoid-version -no-undefined 3 | 4 | libloginout_la_LDFLAGS = $(PFLAGS) 5 | libloginout_la_LIBADD = @COMPIZ_LIBS@ 6 | nodist_libloginout_la_SOURCES = loginout_options.c loginout_options.h 7 | dist_libloginout_la_SOURCES = loginout.c 8 | 9 | BUILT_SOURCES = $(nodist_libloginout_la_SOURCES) 10 | 11 | AM_CPPFLAGS = \ 12 | @COMPIZ_CFLAGS@ \ 13 | -DDATADIR='"$(compdatadir)"' \ 14 | -DLIBDIR='"$(libdir)"' \ 15 | -DLOCALEDIR="\"@datadir@/locale\"" \ 16 | -DIMAGEDIR='"$(imagedir)"' \ 17 | -I$(top_srcdir)/include 18 | 19 | moduledir = $(plugindir) 20 | 21 | 22 | module_LTLIBRARIES = libloginout.la 23 | 24 | CLEANFILES = *_options.c *_options.h 25 | 26 | loginout_options.h: ../../metadata/loginout.xml.in 27 | $(BCOP_BIN) --header $@ $< 28 | 29 | loginout_options.c: ../../metadata/loginout.xml.in loginout_options.h 30 | $(BCOP_BIN) --source $@ $< 31 | -------------------------------------------------------------------------------- /src/maximumize/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | PFLAGS=-module -avoid-version -no-undefined 3 | 4 | libmaximumize_la_LDFLAGS = $(PFLAGS) 5 | libmaximumize_la_LIBADD = @COMPIZ_LIBS@ 6 | nodist_libmaximumize_la_SOURCES = maximumize_options.c \ 7 | maximumize_options.h 8 | dist_libmaximumize_la_SOURCES = maximumize.c 9 | 10 | BUILT_SOURCES = $(nodist_libmaximumize_la_SOURCES) 11 | 12 | AM_CPPFLAGS = \ 13 | @COMPIZ_CFLAGS@ \ 14 | -DDATADIR='"$(compdatadir)"' \ 15 | -DLIBDIR='"$(libdir)"' \ 16 | -DLOCALEDIR="\"@datadir@/locale\"" \ 17 | -DIMAGEDIR='"$(imagedir)"' \ 18 | -I$(top_srcdir)/include 19 | 20 | moduledir = $(plugindir) 21 | 22 | 23 | module_LTLIBRARIES = libmaximumize.la 24 | 25 | CLEANFILES = *_options.c *_options.h 26 | 27 | maximumize_options.h: ../../metadata/maximumize.xml.in 28 | $(BCOP_BIN) --header $@ $< 29 | 30 | maximumize_options.c: ../../metadata/maximumize.xml.in maximumize_options.h 31 | $(BCOP_BIN) --source $@ $< 32 | -------------------------------------------------------------------------------- /src/mblur/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | PFLAGS=-module -avoid-version -no-undefined 3 | 4 | libmblur_la_LDFLAGS = $(PFLAGS) 5 | libmblur_la_LIBADD = @COMPIZ_LIBS@ 6 | nodist_libmblur_la_SOURCES = mblur_options.c mblur_options.h 7 | dist_libmblur_la_SOURCES = mblur.c 8 | 9 | BUILT_SOURCES = $(nodist_libmblur_la_SOURCES) 10 | 11 | AM_CPPFLAGS = \ 12 | @COMPIZ_CFLAGS@ \ 13 | -DDATADIR='"$(compdatadir)"' \ 14 | -DLIBDIR='"$(libdir)"' \ 15 | -DLOCALEDIR="\"@datadir@/locale\"" \ 16 | -DIMAGEDIR='"$(imagedir)"' \ 17 | -I$(top_srcdir)/include 18 | 19 | moduledir = $(plugindir) 20 | 21 | 22 | module_LTLIBRARIES = libmblur.la 23 | 24 | CLEANFILES = *_options.c *_options.h 25 | 26 | mblur_options.h: ../../metadata/mblur.xml.in 27 | $(BCOP_BIN) --header $@ $< 28 | 29 | mblur_options.c: ../../metadata/mblur.xml.in mblur_options.h 30 | $(BCOP_BIN) --source $@ $< 31 | -------------------------------------------------------------------------------- /src/notification/Makefile.am: -------------------------------------------------------------------------------- 1 | PFLAGS=-module -avoid-version -no-undefined 2 | 3 | if NOTIFICATION_PLUGIN 4 | libnotification_la_LDFLAGS = $(PFLAGS) 5 | libnotification_la_LIBADD = @COMPIZ_LIBS@ @LIBNOTIFY_LIBS@ 6 | libnotification_la_SOURCES = notification.c 7 | endif 8 | 9 | AM_CPPFLAGS = \ 10 | @COMPIZ_CFLAGS@ \ 11 | @LIBNOTIFY_CFLAGS@ \ 12 | -DDATADIR='"$(compdatadir)"' \ 13 | -DLIBDIR='"$(libdir)"' \ 14 | -DLOCALEDIR="\"@datadir@/locale\"" \ 15 | -DIMAGEDIR='"$(imagedir)"' \ 16 | -I$(top_srcdir)/include 17 | 18 | moduledir = $(plugindir) 19 | 20 | if NOTIFICATION_PLUGIN 21 | module_LTLIBRARIES=libnotification.la 22 | endif 23 | -------------------------------------------------------------------------------- /src/reflex/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | PFLAGS=-module -avoid-version -no-undefined 3 | 4 | libreflex_la_LDFLAGS = $(PFLAGS) 5 | libreflex_la_LIBADD = @COMPIZ_LIBS@ 6 | nodist_libreflex_la_SOURCES = reflex_options.c reflex_options.h 7 | dist_libreflex_la_SOURCES = reflex.c 8 | 9 | BUILT_SOURCES = $(nodist_libreflex_la_SOURCES) 10 | 11 | AM_CPPFLAGS = \ 12 | @COMPIZ_CFLAGS@ \ 13 | -DDATADIR='"$(compdatadir)"' \ 14 | -DLIBDIR='"$(libdir)"' \ 15 | -DLOCALEDIR="\"@datadir@/locale\"" \ 16 | -DIMAGEDIR='"$(imagedir)"' \ 17 | -I$(top_srcdir)/include 18 | 19 | moduledir = $(plugindir) 20 | 21 | 22 | module_LTLIBRARIES = libreflex.la 23 | 24 | CLEANFILES = *_options.c *_options.h 25 | 26 | reflex_options.h: ../../metadata/reflex.xml.in 27 | $(BCOP_BIN) --header $@ $< 28 | 29 | reflex_options.c: ../../metadata/reflex.xml.in reflex_options.h 30 | $(BCOP_BIN) --source $@ $< 31 | -------------------------------------------------------------------------------- /src/scalefilter/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | PFLAGS=-module -avoid-version -no-undefined 3 | 4 | if SCALEFILTER_PLUGIN 5 | libscalefilter_la_LDFLAGS = $(PFLAGS) 6 | libscalefilter_la_LIBADD = @COMPIZ_LIBS@ @SCALEFILTER_LIBS@ 7 | nodist_libscalefilter_la_SOURCES = scalefilter_options.c \ 8 | scalefilter_options.h 9 | dist_libscalefilter_la_SOURCES = scalefilter.c 10 | endif 11 | 12 | BUILT_SOURCES = $(nodist_libscalefilter_la_SOURCES) 13 | 14 | AM_CPPFLAGS = \ 15 | @COMPIZ_CFLAGS@ \ 16 | @SCALEFILTER_CFLAGS@ \ 17 | -DDATADIR='"$(compdatadir)"' \ 18 | -DLIBDIR='"$(libdir)"' \ 19 | -DLOCALEDIR="\"@datadir@/locale\"" \ 20 | -DIMAGEDIR='"$(imagedir)"' \ 21 | -I$(top_srcdir)/include 22 | 23 | moduledir = $(plugindir) 24 | 25 | if SCALEFILTER_PLUGIN 26 | module_LTLIBRARIES = libscalefilter.la 27 | endif 28 | 29 | CLEANFILES = *_options.c *_options.h 30 | 31 | scalefilter_options.h: ../../metadata/scalefilter.xml.in 32 | $(BCOP_BIN) --header $@ $< 33 | 34 | scalefilter_options.c: ../../metadata/scalefilter.xml.in scalefilter_options.h 35 | $(BCOP_BIN) --source $@ $< 36 | -------------------------------------------------------------------------------- /src/shelf/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | PFLAGS=-module -avoid-version -no-undefined 3 | 4 | libshelf_la_LDFLAGS = $(PFLAGS) 5 | libshelf_la_LIBADD = @COMPIZ_LIBS@ 6 | nodist_libshelf_la_SOURCES = shelf_options.c shelf_options.h 7 | dist_libshelf_la_SOURCES = shelf.c 8 | 9 | BUILT_SOURCES = $(nodist_libshelf_la_SOURCES) 10 | 11 | AM_CPPFLAGS = \ 12 | @COMPIZ_CFLAGS@ \ 13 | -DDATADIR='"$(compdatadir)"' \ 14 | -DLIBDIR='"$(libdir)"' \ 15 | -DLOCALEDIR="\"@datadir@/locale\"" \ 16 | -DIMAGEDIR='"$(imagedir)"' \ 17 | -I$(top_srcdir)/include 18 | 19 | moduledir = $(plugindir) 20 | 21 | 22 | module_LTLIBRARIES = libshelf.la 23 | 24 | CLEANFILES = *_options.c *_options.h 25 | 26 | shelf_options.h: ../../metadata/shelf.xml.in 27 | $(BCOP_BIN) --header $@ $< 28 | 29 | shelf_options.c: ../../metadata/shelf.xml.in shelf_options.h 30 | $(BCOP_BIN) --source $@ $< 31 | -------------------------------------------------------------------------------- /src/showdesktop/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | PFLAGS=-module -avoid-version -no-undefined 3 | 4 | libshowdesktop_la_LDFLAGS = $(PFLAGS) 5 | libshowdesktop_la_LIBADD = @COMPIZ_LIBS@ 6 | nodist_libshowdesktop_la_SOURCES = showdesktop_options.c showdesktop_options.h 7 | dist_libshowdesktop_la_SOURCES = showdesktop.c 8 | 9 | BUILT_SOURCES = $(nodist_libshowdesktop_la_SOURCES) 10 | 11 | AM_CPPFLAGS = \ 12 | @COMPIZ_CFLAGS@ \ 13 | -DDATADIR='"$(compdatadir)"' \ 14 | -DLIBDIR='"$(libdir)"' \ 15 | -DLOCALEDIR="\"@datadir@/locale\"" \ 16 | -DIMAGEDIR='"$(imagedir)"' \ 17 | -I$(top_srcdir)/include 18 | 19 | moduledir = $(plugindir) 20 | 21 | 22 | module_LTLIBRARIES = libshowdesktop.la 23 | 24 | CLEANFILES = *_options.c *_options.h 25 | 26 | showdesktop_options.h: ../../metadata/showdesktop.xml.in 27 | $(BCOP_BIN) --header $@ $< 28 | 29 | showdesktop_options.c: ../../metadata/showdesktop.xml.in showdesktop_options.h 30 | $(BCOP_BIN) --source $@ $< 31 | -------------------------------------------------------------------------------- /src/showmouse/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | PFLAGS=-module -avoid-version -no-undefined 3 | 4 | if SHOWMOUSE_PLUGIN 5 | libshowmouse_la_LDFLAGS = $(PFLAGS) 6 | libshowmouse_la_LIBADD = @COMPIZ_LIBS@ @SHOWMOUSE_LIBS@ 7 | nodist_libshowmouse_la_SOURCES = showmouse_options.c showmouse_options.h 8 | dist_libshowmouse_la_SOURCES = showmouse.c showmouse_tex.h 9 | endif 10 | 11 | BUILT_SOURCES = $(nodist_libshowmouse_la_SOURCES) 12 | 13 | AM_CPPFLAGS = \ 14 | @COMPIZ_CFLAGS@ \ 15 | @SHOWMOUSE_CFLAGS@ \ 16 | -DDATADIR='"$(compdatadir)"' \ 17 | -DLIBDIR='"$(libdir)"' \ 18 | -DLOCALEDIR="\"@datadir@/locale\"" \ 19 | -DIMAGEDIR='"$(imagedir)"' \ 20 | -I$(top_srcdir)/include 21 | 22 | moduledir = $(plugindir) 23 | 24 | if SHOWMOUSE_PLUGIN 25 | module_LTLIBRARIES = libshowmouse.la 26 | endif 27 | 28 | CLEANFILES = *_options.c *_options.h 29 | 30 | showmouse_options.h: ../../metadata/showmouse.xml.in 31 | $(BCOP_BIN) --header $@ $< 32 | 33 | showmouse_options.c: ../../metadata/showmouse.xml.in showmouse_options.h 34 | $(BCOP_BIN) --source $@ $< 35 | -------------------------------------------------------------------------------- /src/splash/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | PFLAGS=-module -avoid-version -no-undefined 3 | 4 | libsplash_la_LDFLAGS = $(PFLAGS) 5 | libsplash_la_LIBADD = @COMPIZ_LIBS@ 6 | nodist_libsplash_la_SOURCES = splash_options.c splash_options.h 7 | dist_libsplash_la_SOURCES = splash.c 8 | 9 | BUILT_SOURCES = $(nodist_libsplash_la_SOURCES) 10 | 11 | AM_CPPFLAGS = \ 12 | @COMPIZ_CFLAGS@ \ 13 | -DDATADIR='"$(compdatadir)"' \ 14 | -DLIBDIR='"$(libdir)"' \ 15 | -DLOCALEDIR="\"@datadir@/locale\"" \ 16 | -DIMAGEDIR='"$(imagedir)"' \ 17 | -I$(top_srcdir)/include 18 | 19 | moduledir = $(plugindir) 20 | 21 | 22 | module_LTLIBRARIES = libsplash.la 23 | 24 | CLEANFILES = *_options.c *_options.h 25 | 26 | splash_options.h: ../../metadata/splash.xml.in 27 | $(BCOP_BIN) --header $@ $< 28 | 29 | splash_options.c: ../../metadata/splash.xml.in splash_options.h 30 | $(BCOP_BIN) --source $@ $< 31 | -------------------------------------------------------------------------------- /src/trailfocus/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | PFLAGS=-module -avoid-version -no-undefined 3 | 4 | libtrailfocus_la_LDFLAGS = $(PFLAGS) 5 | libtrailfocus_la_LIBADD = @COMPIZ_LIBS@ 6 | nodist_libtrailfocus_la_SOURCES = trailfocus_options.c trailfocus_options.h 7 | dist_libtrailfocus_la_SOURCES = trailfocus.c 8 | 9 | BUILT_SOURCES = $(nodist_libtrailfocus_la_SOURCES) 10 | 11 | AM_CPPFLAGS = \ 12 | @COMPIZ_CFLAGS@ \ 13 | -DDATADIR='"$(compdatadir)"' \ 14 | -DLIBDIR='"$(libdir)"' \ 15 | -DLOCALEDIR="\"@datadir@/locale\"" \ 16 | -DIMAGEDIR='"$(imagedir)"' \ 17 | -I$(top_srcdir)/include 18 | 19 | moduledir = $(plugindir) 20 | 21 | 22 | module_LTLIBRARIES = libtrailfocus.la 23 | 24 | CLEANFILES = *_options.c *_options.h 25 | 26 | trailfocus_options.h: ../../metadata/trailfocus.xml.in 27 | $(BCOP_BIN) --header $@ $< 28 | 29 | trailfocus_options.c: ../../metadata/trailfocus.xml.in trailfocus_options.h 30 | $(BCOP_BIN) --source $@ $< 31 | -------------------------------------------------------------------------------- /src/vidcap/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | PFLAGS=-module -avoid-version -no-undefined 3 | 4 | libvidcap_la_LDFLAGS = $(PFLAGS) 5 | libvidcap_la_LIBADD = @COMPIZ_LIBS@ 6 | nodist_libvidcap_la_SOURCES = vidcap_options.c vidcap_options.h 7 | dist_libvidcap_la_SOURCES = vidcap.c wcap-decode.h 8 | 9 | BUILT_SOURCES = $(nodist_libvidcap_la_SOURCES) 10 | 11 | AM_CPPFLAGS = \ 12 | @COMPIZ_CFLAGS@ \ 13 | -DDATADIR='"$(compdatadir)"' \ 14 | -DLIBDIR='"$(libdir)"' \ 15 | -DLOCALEDIR="\"@datadir@/locale\"" \ 16 | -DIMAGEDIR='"$(imagedir)"' \ 17 | -I$(top_srcdir)/include 18 | 19 | moduledir = $(plugindir) 20 | 21 | 22 | module_LTLIBRARIES = libvidcap.la 23 | 24 | CLEANFILES = *_options.c *_options.h 25 | 26 | vidcap_options.h: ../../metadata/vidcap.xml.in 27 | $(BCOP_BIN) --header $@ $< 28 | 29 | vidcap_options.c: ../../metadata/vidcap.xml.in vidcap_options.h 30 | $(BCOP_BIN) --source $@ $< 31 | -------------------------------------------------------------------------------- /src/vidcap/wcap-decode.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2012 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining 5 | * a copy of this software and associated documentation files (the 6 | * "Software"), to deal in the Software without restriction, including 7 | * without limitation the rights to use, copy, modify, merge, publish, 8 | * distribute, sublicense, and/or sell copies of the Software, and to 9 | * permit persons to whom the Software is furnished to do so, subject to 10 | * the following conditions: 11 | * 12 | * The above copyright notice and this permission notice (including the 13 | * next paragraph) shall be included in all copies or substantial 14 | * portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 20 | * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 21 | * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | * SOFTWARE. 24 | */ 25 | 26 | #ifndef _WCAP_DECODE_ 27 | #define _WCAP_DECODE_ 28 | 29 | #include 30 | 31 | #define WCAP_HEADER_MAGIC 0x57434150 32 | 33 | #define WCAP_FORMAT_XRGB8888 0x34325258 34 | #define WCAP_FORMAT_XBGR8888 0x34324258 35 | #define WCAP_FORMAT_RGBX8888 0x34325852 36 | #define WCAP_FORMAT_BGRX8888 0x34325842 37 | 38 | struct wcap_header { 39 | uint32_t magic; 40 | uint32_t format; 41 | uint32_t width, height; 42 | }; 43 | 44 | struct wcap_frame_header { 45 | uint32_t msecs; 46 | uint32_t nrects; 47 | }; 48 | 49 | struct wcap_rectangle { 50 | int32_t x1, y1, x2, y2; 51 | }; 52 | 53 | struct wcap_decoder { 54 | int fd; 55 | size_t size; 56 | void *map, *p, *end; 57 | uint32_t *frame; 58 | uint32_t format; 59 | uint32_t msecs; 60 | uint32_t count; 61 | int width, height; 62 | }; 63 | 64 | int wcap_decoder_get_frame(struct wcap_decoder *decoder); 65 | struct wcap_decoder *wcap_decoder_create(const char *filename); 66 | void wcap_decoder_destroy(struct wcap_decoder *decoder); 67 | 68 | #endif 69 | -------------------------------------------------------------------------------- /src/wallpaper/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | PFLAGS=-module -avoid-version -no-undefined 3 | 4 | libwallpaper_la_LDFLAGS = $(PFLAGS) 5 | libwallpaper_la_LIBADD = @COMPIZ_LIBS@ 6 | nodist_libwallpaper_la_SOURCES = wallpaper_options.c wallpaper_options.h 7 | dist_libwallpaper_la_SOURCES = wallpaper.c 8 | 9 | BUILT_SOURCES = $(nodist_libwallpaper_la_SOURCES) 10 | 11 | AM_CPPFLAGS = \ 12 | @COMPIZ_CFLAGS@ \ 13 | -DDATADIR='"$(compdatadir)"' \ 14 | -DLIBDIR='"$(libdir)"' \ 15 | -DLOCALEDIR="\"@datadir@/locale\"" \ 16 | -DIMAGEDIR='"$(imagedir)"' \ 17 | -I$(top_srcdir)/include 18 | 19 | moduledir = $(plugindir) 20 | 21 | 22 | module_LTLIBRARIES = libwallpaper.la 23 | 24 | CLEANFILES = *_options.c *_options.h 25 | 26 | wallpaper_options.h: ../../metadata/wallpaper.xml.in 27 | $(BCOP_BIN) --header $@ $< 28 | 29 | wallpaper_options.c: ../../metadata/wallpaper.xml.in wallpaper_options.h 30 | $(BCOP_BIN) --source $@ $< 31 | -------------------------------------------------------------------------------- /src/widget/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | PFLAGS=-module -avoid-version -no-undefined 3 | 4 | libwidget_la_LDFLAGS = $(PFLAGS) 5 | libwidget_la_LIBADD = @COMPIZ_LIBS@ 6 | nodist_libwidget_la_SOURCES = widget_options.c widget_options.h 7 | dist_libwidget_la_SOURCES = widget.c 8 | 9 | BUILT_SOURCES = $(nodist_libwidget_la_SOURCES) 10 | 11 | AM_CPPFLAGS = \ 12 | @COMPIZ_CFLAGS@ \ 13 | -DDATADIR='"$(compdatadir)"' \ 14 | -DLIBDIR='"$(libdir)"' \ 15 | -DLOCALEDIR="\"@datadir@/locale\"" \ 16 | -DIMAGEDIR='"$(imagedir)"' \ 17 | -I$(top_srcdir)/include 18 | 19 | moduledir = $(plugindir) 20 | 21 | 22 | module_LTLIBRARIES = libwidget.la 23 | 24 | CLEANFILES = *_options.c *_options.h 25 | 26 | widget_options.h: ../../metadata/widget.xml.in 27 | $(BCOP_BIN) --header $@ $< 28 | 29 | widget_options.c: ../../metadata/widget.xml.in widget_options.h 30 | $(BCOP_BIN) --source $@ $< 31 | -------------------------------------------------------------------------------- /src/workspacenames/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | PFLAGS=-module -avoid-version -no-undefined 3 | 4 | libworkspacenames_la_LDFLAGS = $(PFLAGS) 5 | libworkspacenames_la_LIBADD = @COMPIZ_LIBS@ 6 | nodist_libworkspacenames_la_SOURCES = workspacenames_options.c \ 7 | workspacenames_options.h 8 | dist_libworkspacenames_la_SOURCES = workspacenames.c 9 | 10 | BUILT_SOURCES = $(nodist_libworkspacenames_la_SOURCES) 11 | 12 | AM_CPPFLAGS = \ 13 | -I$(top_srcdir)/include \ 14 | @COMPIZ_CFLAGS@ \ 15 | -DDATADIR='"$(compdatadir)"' \ 16 | -DPREFIX='"$(prefix)"' \ 17 | -DLIBDIR='"$(libdir)"' \ 18 | -DLOCALEDIR="\"@datadir@/locale\"" \ 19 | -DIMAGEDIR='"$(imagedir)"' 20 | 21 | moduledir = $(plugindir) 22 | 23 | if WORKSPACENAMES_PLUGIN 24 | module_LTLIBRARIES = libworkspacenames.la 25 | endif 26 | 27 | CLEANFILES = *_options.c *_options.h 28 | 29 | workspacenames_options.h: ../../metadata/workspacenames.xml.in 30 | $(BCOP_BIN) --header $@ $< 31 | 32 | workspacenames_options.c: ../../metadata/workspacenames.xml.in workspacenames_options.h 33 | $(BCOP_BIN) --source $@ $< 34 | --------------------------------------------------------------------------------