| author | Øyvind Kolås <pippin@gimp.org> | 2011-01-19 19:14:46 (GMT) |
|---|---|---|
| committer | Øyvind Kolås <pippin@gimp.org> | 2011-01-19 19:14:46 (GMT) |
| commit | 41ce5730b3f0421991c49c6c79bbc0e2d64595ab (patch) (side-by-side diff) | |
| tree | fc966e9b478d231eecd6d17dd88ec5db2042bc90 | |
| parent | 4af591ed5c47673ebcb64e25e4ae016a97202403 (diff) | |
| download | toys-master.zip toys-master.tar.gz | |
38 files changed, 0 insertions, 4753 deletions
diff --git a/pinpoint/.gitignore b/pinpoint/.gitignore deleted file mode 100644 index a3547af..0000000 --- a/pinpoint/.gitignore +++ b/dev/null @@ -1,19 +0,0 @@ -pinpoint -.*.sw? -.deps -*.o -*~ -INSTALL -Makefile -Makefile.in -aclocal.m4 -autom4te.cache -config.h -config.h.in -config.log -config.status -configure -depcomp -install-sh -missing -stamp-h1 diff --git a/pinpoint/AUTHORS b/pinpoint/AUTHORS deleted file mode 100644 index 134720c..0000000 --- a/pinpoint/AUTHORS +++ b/dev/null @@ -1,6 +0,0 @@ -Øyvind Kolås <pippin@linux.intel.com> -Damien Lespiau <damien.lespiau@intel.com> -Emmanuele Bassi <ebassi@linux.intel.com> -Neil Roberts <neil@linux.intel.com> -Nick Richards <nick@linux.intel.com> -daniel g. siegel <dgsiegel@gnome.org> diff --git a/pinpoint/COPYING b/pinpoint/COPYING deleted file mode 100644 index 5ab7695..0000000 --- a/pinpoint/COPYING +++ b/dev/null @@ -1,504 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - <one line to give the library's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - <signature of Ty Coon>, 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - diff --git a/pinpoint/ChangeLog b/pinpoint/ChangeLog deleted file mode 100644 index 2b1b5f6..0000000 --- a/pinpoint/ChangeLog +++ b/dev/null @@ -1 +0,0 @@ --- changelog not used, see git log -- diff --git a/pinpoint/Makefile.am b/pinpoint/Makefile.am deleted file mode 100644 index 2aa4050..0000000 --- a/pinpoint/Makefile.am +++ b/dev/null @@ -1,26 +0,0 @@ -SUBDIRS=transitions -bin_PROGRAMS=pinpoint - -AM_CFLAGS = $(DEPS_CFLAGS) $(MAINTAINER_FLAGS) -D_GNU_SOURCE -DPKGDATADIR=\"$(pkgdatadir)/\" -ACLOCAL_AMFLAGS = -I m4 - -if USE_DAX -DAX_SOURCES = pp-super-aa.c pp-super-aa.h -endif - -pinpoint_LDADD = $(DEPS_LIBS) -pinpoint_SOURCES = \ - pinpoint.c \ - pinpoint.h \ - pp-cairo.c \ - pp-clutter.c \ - gst-video-thumbnailer.c \ - $(DAX_SOURCES) - -EXTRA_DIST=sample.txt wth.jpg bg.jpg pp-super-aa.c pp-super-aa.h - -MAINTAINERCLEANFILES = aclocal.m4 compile config.guess config.sub configure depcomp install-sh ltmain.sh Makefile.in missing - -snapshot: - $(MAKE) dist distdir=$(PACKAGE)-snap`date +"%Y%m%d"` - diff --git a/pinpoint/NEWS b/pinpoint/NEWS deleted file mode 100644 index e69de29..0000000 --- a/pinpoint/NEWS +++ b/dev/null diff --git a/pinpoint/README b/pinpoint/README deleted file mode 100644 index f99a3ad..0000000 --- a/pinpoint/README +++ b/dev/null @@ -1,6 +0,0 @@ -pinpoint - -pinpoint a simple presentation tool that hopes to encourage small amounts of -text and images instead of death by bullet points. introduction.pin contains a -demonstration of most features. Look at it in a text editor and run it with -pinpoint name-of-file. diff --git a/pinpoint/autogen.sh b/pinpoint/autogen.sh deleted file mode 100755 index d68a142..0000000 --- a/pinpoint/autogen.sh +++ b/dev/null @@ -1,3 +0,0 @@ -#! /bin/sh -autoreconf -v --install || exit 1 -./configure "$@" diff --git a/pinpoint/bg.jpg b/pinpoint/bg.jpg Binary files differdeleted file mode 100644 index c147bf0..0000000 --- a/pinpoint/bg.jpg +++ b/dev/null diff --git a/pinpoint/bowls.jpg b/pinpoint/bowls.jpg Binary files differdeleted file mode 100644 index f278444..0000000 --- a/pinpoint/bowls.jpg +++ b/dev/null diff --git a/pinpoint/configure.ac b/pinpoint/configure.ac deleted file mode 100644 index 02640cb..0000000 --- a/pinpoint/configure.ac +++ b/dev/null @@ -1,128 +0,0 @@ -AC_PREREQ(2.53) -AC_INIT(pinpoint, [0.0], []) -AC_CONFIG_SRCDIR(pinpoint.c) -AC_CONFIG_AUX_DIR([build]) -AM_INIT_AUTOMAKE([foreign -Wno-portability no-define]) -AM_CONFIG_HEADER([config.h]) -m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) - -AC_PROG_CC -PKG_PROG_PKG_CONFIG -AC_HEADER_STDC - -PINPOINT_DEPS="clutter-1.0 >= 1.3 gio-2.0 cairo-pdf pangocairo gdk-pixbuf-2.0" - -AS_COMPILER_FLAGS([MAINTAINER_CFLAGS], [-Wall]) - -# PDF output support -AC_ARG_ENABLE([pdf], - [AS_HELP_STRING([--enable-pdf=@<:no/auto/yes:>@], - [Produce PDFs])],, - [enable_pdf=auto]) -AC_MSG_CHECKING([for the stuff needed to generate PDFs]) -AS_CASE([$enable_pdf], - [no], [have_pdf="no (disabled)"], - [yes], [PKG_CHECK_EXISTS([cairo-pdf >= 1.9.12 pangocairo gdk-pixbuf-2.0], - have_pdf="yes", - AC_MSG_ERROR([Oh no!]))], - [auto], [PKG_CHECK_EXISTS([cairo-pdf >= 1.9.12 pangocairo gdk-pixbuf-2.0], - have_pdf="yes", - have_pdf="no")], - AC_MSG_ERROR([invalid argumented passed to --enable-pdf])) -AC_MSG_RESULT([$have_pdf]) -AS_IF([test "x$have_pdf" = "xyes"], [ - PINPOINT_DEPS="$PINPOINT_DEPS cairo-pdf >= 1.9.12 pangocairo gdk-pixbuf-2.0" - AC_DEFINE([HAVE_PDF], [1], [Whether pinpoint will generate PDFs])]) -AM_CONDITIONAL([HAVE_PDF], [test "x$have_pdf" = "xyes"]) - -# ClutterGst support -AC_ARG_ENABLE([cluttergst], - [AS_HELP_STRING([--enable-cluttergst=@<:no/auto/yes:>@], - [Show media files using ClutterGst])],, - [enable_cluttergst=auto]) -AC_MSG_CHECKING([for the stuff needed to show media files]) -AS_CASE([$enable_cluttergst], - [no], [have_cluttergst="no (disabled)"], - [yes], [PKG_CHECK_EXISTS([clutter-gst-1.0 >= 1.3], - have_cluttergst="yes", - AC_MSG_ERROR([Oh no!]))], - [auto], [PKG_CHECK_EXISTS([clutter-gst-1.0 >= 1.3], - have_cluttergst="yes", - have_cluttergst="no")], - AC_MSG_ERROR([invalid argumented passed to --enable-cluttergst])) -AC_MSG_RESULT([$have_cluttergst]) -AS_IF([test "x$have_cluttergst" = "xyes"], [ - PINPOINT_DEPS="$PINPOINT_DEPS clutter-gst-1.0 >= 1.3" - AC_DEFINE([USE_CLUTTER_GST], [1], [Whether pinpoint will display media files using ClutterGst])]) -AM_CONDITIONAL([USE_CLUTTER_GST], [test "x$have_cluttergst" = "xyes"]) - -# SVG output support in the PDFs -AC_ARG_ENABLE([rsvg], - [AS_HELP_STRING([--enable-rsvg=@<:no/auto/yes:>@], - [Use SVGs in PDFs])],, - [enable_rsvg=auto]) -AC_MSG_CHECKING([for the stuff needed to put SVGs in PDFs]) -AS_CASE([$enable_rsvg], - [no], [have_rsvg="no (disabled)"], - [yes], [PKG_CHECK_EXISTS([librsvg-2.0], - have_rsvg="yes", - AC_MSG_ERROR([Oh no!]))], - [auto], [PKG_CHECK_EXISTS([librsvg-2.0], - have_rsvg="yes", - have_rsvg="no")], - AC_MSG_ERROR([invalid argumented passed to --enable-rsvg])) -AC_MSG_RESULT([$have_rsvg]) -AS_IF([test "x$have_rsvg" = "xyes"], [ - PINPOINT_DEPS="$PINPOINT_DEPS librsvg-2.0" - AC_DEFINE([HAVE_RSVG], [1], [Whether pinpoint will generate RSVGs])]) -AM_CONDITIONAL([HAVE_RSVG], [test "x$have_rsvg" = "xyes"]) - -# SVG support with Dax -AC_ARG_ENABLE([dax], - [AS_HELP_STRING([--enabled-dax=@<:no/auto/yes:>@], - [SVG loading with dax])],, - [enable_dax=auto]) -AC_MSG_CHECKING([for dax]) -AS_CASE([$enable_dax], - [no], [use_dax="no (disabled)"], - [yes], [PKG_CHECK_EXISTS([dax-0.2 mx-1.0], - use_dax="yes", - AC_MSG_ERROR([Dax not installed]))], - [auto], [PKG_CHECK_EXISTS([dax-0.2 mx-1.0], - use_dax="yes", - use_dax="no")], - AC_MSG_ERROR([invalid argumented passed to --enable-dax])) -AC_MSG_RESULT([$use_dax]) -AS_IF([test "x$use_dax" = "xyes"], [ - PINPOINT_DEPS="$PINPOINT_DEPS dax-0.2 mx-1.0" - AC_DEFINE([USE_DAX], [1], [Whether pinpoint will use Dax])]) -AM_CONDITIONAL([USE_DAX], [test "x$use_dax" = "xyes"]) - -PKG_CHECK_MODULES([DEPS], [$PINPOINT_DEPS]) - -AC_OUTPUT([ - Makefile - transitions/Makefile -]) - -echo "" -echo "Pinpoint" - -echo"" -echo " • General" -echo " prefix: ${prefix}" -echo " cflags: ${MAINTAINER_CFLAGS}" - -echo "" -echo " • Slides' background" -echo " Images: yes (built-in)" -echo " SVG: ${use_dax}" -echo " SVG in PDF: ${have_rsvg}" -echo " ClutterGst: ${have_cluttergst}" - -echo "" -echo " • Renderers" -echo " Clutter: yes (built-in)" -echo " PDF : $have_pdf" - -echo "" diff --git a/pinpoint/gst-video-thumbnailer.c b/pinpoint/gst-video-thumbnailer.c deleted file mode 100644 index fa2fbe2..0000000 --- a/pinpoint/gst-video-thumbnailer.c +++ b/dev/null @@ -1,321 +0,0 @@ -/* - * Bickley - a meta data management framework. - * Copyright © 2008 - 2009, Intel Corporation. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms and conditions of the GNU Lesser General Public License, - * version 2.1, as published by the Free Software Foundation. - * - * This program is distributed in the hope it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include <config.h> -#ifdef USE_CLUTTER_GST - -#include <string.h> -#include <stdlib.h> -#include <glib.h> - -#include <gio/gio.h> -#include <gst/gst.h> -#include <gdk-pixbuf/gdk-pixbuf.h> - -#include "gst-video-thumbnailer.h" - -static void -push_buffer (GstElement *element, - GstBuffer *out_buffer, - GstPad *pad, - GstBuffer *in_buffer) -{ - gst_buffer_set_caps (out_buffer, GST_BUFFER_CAPS (in_buffer)); - GST_BUFFER_SIZE (out_buffer) = GST_BUFFER_SIZE (in_buffer); - memcpy (GST_BUFFER_DATA (out_buffer), GST_BUFFER_DATA (in_buffer), - GST_BUFFER_SIZE (in_buffer)); -} - -static void -pull_buffer (GstElement *element, - GstBuffer *in_buffer, - GstPad *pad, - GstBuffer **out_buffer) -{ - *out_buffer = gst_buffer_ref (in_buffer); -} - -GdkPixbuf * -convert_buffer_to_pixbuf (GstBuffer *buffer, - GCancellable *cancellable) -{ - GstCaps *pb_caps; - GstElement *pipeline; - GstBuffer *out_buffer = NULL; - GstElement *src, *sink, *colorspace, *scale, *filter; - GstBus *bus; - GstMessage *msg; - GstStateChangeReturn state; - gboolean ret; - int width, height, dw, dh, i; - GstStructure *s; - - s = gst_caps_get_structure (GST_BUFFER_CAPS (buffer), 0); - gst_structure_get_int (s, "width", &dw); - gst_structure_get_int (s, "height", &dh); - - pb_caps = gst_caps_new_simple ("video/x-raw-rgb", - "bpp", G_TYPE_INT, 24, - "depth", G_TYPE_INT, 24, - "width", G_TYPE_INT, dw, - "height", G_TYPE_INT, dh, - "pixel-aspect-ratio", GST_TYPE_FRACTION, 1, 1, - NULL); - - pipeline = gst_pipeline_new ("pipeline"); - - src = gst_element_factory_make ("fakesrc", "src"); - colorspace = gst_element_factory_make ("ffmpegcolorspace", "colorspace"); - scale = gst_element_factory_make ("videoscale", "scale"); - filter = gst_element_factory_make ("capsfilter", "filter"); - sink = gst_element_factory_make ("fakesink", "sink"); - - gst_bin_add_many (GST_BIN (pipeline), src, colorspace, scale, - filter, sink, NULL); - - g_object_set (filter, - "caps", pb_caps, - NULL); - g_object_set (src, - "num-buffers", 1, - "sizetype", 2, - "sizemax", GST_BUFFER_SIZE (buffer), - "signal-handoffs", TRUE, - NULL); - g_signal_connect (src, "handoff", - G_CALLBACK (push_buffer), buffer); - - g_object_set (sink, - "signal-handoffs", TRUE, - "preroll-queue-len", 1, - NULL); - g_signal_connect (sink, "handoff", - G_CALLBACK (pull_buffer), &out_buffer); - - ret = gst_element_link (src, colorspace); - if (ret == FALSE) { - g_warning ("Failed to link src->colorspace"); - return NULL; - } - - ret = gst_element_link (colorspace, scale); - if (ret == FALSE) { - g_warning ("Failed to link colorspace->scale"); - return NULL; - } - - ret = gst_element_link (scale, filter); - if (ret == FALSE) { - g_warning ("Failed to link scale->filter"); - return NULL; - } - - ret = gst_element_link (filter, sink); - if (ret == FALSE) { - g_warning ("Failed to link filter->sink"); - return NULL; - } - - bus = gst_element_get_bus (GST_ELEMENT (pipeline)); - state = gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_PLAYING); - - i = 0; - msg = NULL; - while (msg == NULL && i < 5) { - msg = gst_bus_timed_pop_filtered (bus, GST_SECOND, - GST_MESSAGE_ERROR | GST_MESSAGE_EOS); - i++; - } - - /* FIXME: Notify about error? */ - gst_message_unref (msg); - - gst_caps_unref (pb_caps); - - if (out_buffer) { - GdkPixbuf *pixbuf; - char *data; - - data = g_memdup (GST_BUFFER_DATA (out_buffer), - GST_BUFFER_SIZE (out_buffer)); - pixbuf = gdk_pixbuf_new_from_data ((guchar *) data, - GDK_COLORSPACE_RGB, FALSE, - 8, dw, dh, GST_ROUND_UP_4 (dw * 3), - (GdkPixbufDestroyNotify) g_free, - NULL); - - gst_buffer_unref (buffer); - return pixbuf; - } - - /* FIXME: Check what buffers need freed */ - return NULL; -} - -GdkPixbuf * -gst_video_thumbnailer_get_shot (const gchar *location, - GCancellable *cancellable) -{ - GstElement *playbin, *audio_sink, *video_sink; - GstStateChangeReturn state; - GdkPixbuf *shot = NULL; - int count = 0; - gchar *uri = g_strconcat ("file://", location, NULL); - - playbin = gst_element_factory_make ("playbin", "playbin"); - audio_sink = gst_element_factory_make ("fakesink", "audiosink"); - video_sink = gst_element_factory_make ("fakesink", "videosink"); - - g_object_set (playbin, - "uri", uri, - "audio-sink", audio_sink, - "video-sink", video_sink, - NULL); - g_object_set (video_sink, - "sync", TRUE, - NULL); - state = gst_element_set_state (playbin, GST_STATE_PAUSED); - while (state == GST_STATE_CHANGE_ASYNC - && count < 5 - && !g_cancellable_is_cancelled (cancellable)) { - g_print ("Waiting in loop %d\n", count); - state = gst_element_get_state (playbin, NULL, 0, 1 * GST_SECOND); - count++; - - /* Spin mainloop so we can pick up the cancels */ - while (g_main_context_pending (NULL)) { - g_main_context_iteration (NULL, FALSE); - } - } - - if (g_cancellable_is_cancelled (cancellable)) { - g_print ("Video %s was cancelled\n", uri); - state = GST_STATE_CHANGE_FAILURE; - } - - if (state != GST_STATE_CHANGE_FAILURE && - state != GST_STATE_CHANGE_ASYNC) { - GstFormat format = GST_FORMAT_TIME; - gint64 duration; - - if (gst_element_query_duration (playbin, &format, &duration)) { - gint64 seekpos; - GstBuffer *frame; - - if (duration > 0) { - if (duration / (3 * GST_SECOND) > 90) { - seekpos = (rand () % (duration / (3 * GST_SECOND))) * GST_SECOND; - } else { - seekpos = (rand () % (duration / (GST_SECOND))) * GST_SECOND; - } - } else { - seekpos = 5 * GST_SECOND; - } - - gst_element_seek_simple (playbin, GST_FORMAT_TIME, - GST_SEEK_FLAG_FLUSH | - GST_SEEK_FLAG_ACCURATE, seekpos); - - /* Wait for seek to complete */ - count = 0; - state = gst_element_get_state (playbin, NULL, 0, - 0.2 * GST_SECOND); - while (state == GST_STATE_CHANGE_ASYNC && count < 3) { - g_print ("Waiting in loop %d\n", count); - state = gst_element_get_state (playbin, NULL, 0, 1 * GST_SECOND); - count++; - } - - g_object_get (playbin, - "frame", &frame, - NULL); - if (frame == NULL) { - g_warning ("No frame for %s", uri); - return NULL; - } - - shot = convert_buffer_to_pixbuf (frame, cancellable); - } - } - - gst_element_set_state (playbin, GST_STATE_NULL); - g_object_unref (playbin); - g_free (uri); - - return shot; -} - -static gboolean -is_interesting (GdkPixbuf *pixbuf) -{ - int width, height, r, rowstride; - gboolean has_alpha; - guint32 histogram[4][4][4] = {{{0,},},}; - guchar *pixels; - int pxl_count = 0, count, i; - - width = gdk_pixbuf_get_width (pixbuf); - height = gdk_pixbuf_get_height (pixbuf); - rowstride = gdk_pixbuf_get_rowstride (pixbuf); - has_alpha = gdk_pixbuf_get_has_alpha (pixbuf); - - pixels = gdk_pixbuf_get_pixels (pixbuf); - for (r = 0; r < height; r++) { - guchar *row = pixels + (r * rowstride); - int c; - - for (c = 0; c < width; c++) { - guchar r, g, b; - - r = row[0]; - g = row[1]; - b = row[2]; - - histogram[r / 64][g / 64][b / 64]++; - - if (has_alpha) { - row += 4; - } else { - row += 3; - } - - pxl_count++; - } - } - - count = 0; - for (i = 0; i < 4; i++) { - int j; - for (j = 0; j < 4; j++) { - int k; - - for (k = 0; k < 4; k++) { - /* Count how many bins have more than - 1% of the pixels in the histogram */ - if (histogram[i][j][k] > pxl_count / 100) { - count++; - } - } - } - } - - /* Image is boring if there is only 1 bin with > 1% of pixels */ - return count > 1; -} - -#endif diff --git a/pinpoint/gst-video-thumbnailer.h b/pinpoint/gst-video-thumbnailer.h deleted file mode 100644 index ef74893..0000000 --- a/pinpoint/gst-video-thumbnailer.h +++ b/dev/null @@ -1,27 +0,0 @@ -/* - * Bickley - a meta data management framework. - * Copyright © 2008 - 2009, Intel Corporation. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms and conditions of the GNU Lesser General Public License, - * version 2.1, as published by the Free Software Foundation. - * - * This program is distributed in the hope it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef __GST_VIDEO_THUMBNAILER_H__ -#define __GST_VIDEO_THUMBNAILER_H__ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -GdkPixbuf * gst_video_thumbnailer_get_shot (const gchar *location, GCancellable *cancellable); -#endif diff --git a/pinpoint/introduction.pin b/pinpoint/introduction.pin deleted file mode 100755 index ea2ee9e..0000000 --- a/pinpoint/introduction.pin +++ b/dev/null @@ -1,149 +0,0 @@ -#!/usr/bin/env pinpoint -[font=Sans 50px] -[bg.jpg] - -- The bits above this point are defaults for every slide in the presentation -Welcome to pinpoint - -- [bowls.jpg] lines starting with - are slide seperators. This is where you can override the defaults with with per-slide properties -A tool for making excellent presentations - -- -It has a simple text source - -- [font=monospace 18px] [shading-opacity=1.0] -The current presentation thus far: - #!/usr/bin/env pinpoint - [font=Droid Sans 50px] - [bg.jpg] - - - The bits above this point are defaults for every slide in the presentation - Welcome to pinpoint - - - [bowls.jpg] lines starting with - are slide seperators.. - A tool for making excellent presentations - - - - - It has a simple text source - - - [font=monospace 18px] [shading-opacity=1.0] - - The current presentation thus far: -- [text-align=center] -You start by writing down the core concepts that you will be talking about. Then sort and format -them as a pinpoint presentation in a text editor of your choice. - -If this was a presentation given as a demonstration of pinpoint you would now be trying to read -this slide as well as pay attention to what is said. Less than ideal. - -Pinpoint reloads the presentation when it changes on disk, very useful when you're tuning things -so keep both pinpoint and your text editor open. And remember, the less text you have, the happier -your audience will be ;-) - - -- You can add '\n' before and after the slide text to keep the file tidy and slides seperated -Let's use some of the more -esoteric features of pinpoint - -- [bowls.jpg] [text-align=center] -\- [filename.jpg] -set a custom background for an individual slide - -- [bunny.ogg] [fill] -You can put <b>anything</b> in the background - -- [linus.jpg] [fill] [bottom-left] -But, slides with cat pictures are best - --[top-right] [text-align=right] -position text in the -[top-right] - -- [right] -[right] - -- [bottom-right] -[bottom-right] - -- [bottom] -[bottom] - -- [bottom-left] -[bottom-left] - -- [left] -[left] - -- [top-left] -[top-left] - -- [top] -[top] - -- [center] [text-align=center] -and even in the -[center] -(which is the default) - -- [font=Monospace 100px][white][text-color=black][shading-opacity=0.0][bottom] -Make text big! -[font=Monospace 100px] -[white][text-color=black] -[shading-opacity=0.0][bottom] - -- -<s>use</s> <b>pango</b> <i -><span foreground='#f24'>m<u ->ar</u>k<sup>up</sup></span></i> for style - -- [no-markup] -[no-markup] -<s>don't use</s> <b>pango</b> <i -><span foreground='#f24'>m<u ->ar</u>k<sup>up</sup></span></i> - -- [transition=page-curl-both][bowls.jpg] -need bullets? - ❥ use the power of unicode -• ✽ ✩ ✔ ☃ ◦ - -- [transition=text-slide-up] -$ pinpoint presentation.txt -o output.pdf -Export to PDF. Handy. - -- [fill] -[fill] -Fill the slide with your background -(the default is [fit]) - -- [transition=swing] -Keybindings: - -- [transition=sheet] -right, down or space - next slide - -- [transition=slide-left] -left or up - previous slide - -- [transition=slide-up] -F11 - toggle fullscreen - -- [transition=text-slide-down] -Escape - quit pinpoint - -- [transition=slide-in-left] [command=killall xeyes ; xeyes] [fill] -Enter - Run command -Tab - Edit command -[command=killall xeyes ; xeyes] - -N.B. run pinpoint with the -m option -and hidden or auto-hiding panels, to -allow window management in fullscreen. - -- [linus.jpg] [fill] [bottom-right] -That's pretty much everything. -Told you it was simple. - -- [black] [font=Sans 100px] [transition=spin-text] -FIN diff --git a/pinpoint/linus.jpg b/pinpoint/linus.jpg Binary files differdeleted file mode 100644 index bac4331..0000000 --- a/pinpoint/linus.jpg +++ b/dev/null diff --git a/pinpoint/m4/as-compiler-flag.m4 b/pinpoint/m4/as-compiler-flag.m4 deleted file mode 100644 index 0f660cf..0000000 --- a/pinpoint/m4/as-compiler-flag.m4 +++ b/dev/null @@ -1,62 +0,0 @@ -dnl as-compiler-flag.m4 0.1.0 - -dnl autostars m4 macro for detection of compiler flags - -dnl David Schleef <ds@schleef.org> - -dnl $Id: as-compiler-flag.m4,v 1.1 2005/12/15 23:35:19 ds Exp $ - -dnl AS_COMPILER_FLAG(CFLAGS, ACTION-IF-ACCEPTED, [ACTION-IF-NOT-ACCEPTED]) -dnl Tries to compile with the given CFLAGS. -dnl Runs ACTION-IF-ACCEPTED if the compiler can compile with the flags, -dnl and ACTION-IF-NOT-ACCEPTED otherwise. - -AC_DEFUN([AS_COMPILER_FLAG], -[ - AC_MSG_CHECKING([to see if compiler understands $1]) - - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $1" - - AC_TRY_COMPILE([ ], [], [flag_ok=yes], [flag_ok=no]) - CFLAGS="$save_CFLAGS" - - if test "X$flag_ok" = Xyes ; then - m4_ifvaln([$2],[$2]) - true - else - m4_ifvaln([$3],[$3]) - true - fi - AC_MSG_RESULT([$flag_ok]) -]) - -dnl AS_COMPILER_FLAGS(VAR, FLAGS) -dnl Tries to compile with the given CFLAGS. - -AC_DEFUN([AS_COMPILER_FLAGS], -[ - list=$2 - flags_supported="" - flags_unsupported="" - AC_MSG_CHECKING([for supported compiler flags]) - for each in $list - do - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $each" - AC_TRY_COMPILE([ ], [], [flag_ok=yes], [flag_ok=no]) - CFLAGS="$save_CFLAGS" - - if test "X$flag_ok" = Xyes ; then - flags_supported="$flags_supported $each" - else - flags_unsupported="$flags_unsupported $each" - fi - done - AC_MSG_RESULT([$flags_supported]) - if test "X$flags_unsupported" != X ; then - AC_MSG_WARN([unsupported compiler flags: $flags_unsupported]) - fi - $1="$$1 $flags_supported" -]) - diff --git a/pinpoint/pinpoint.c b/pinpoint/pinpoint.c deleted file mode 100644 index aa0db30..0000000 --- a/pinpoint/pinpoint.c +++ b/dev/null @@ -1,602 +0,0 @@ -/* - * Pinpoint: A small-ish presentation tool - * - * Copyright (C) 2010 Intel Corporation - * - * This program is free software; you can redistribute it and/or modify it - * under the terms and conditions of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 of the - * License, or (at your option0 any later version. - * - * This program is distributed in the hope it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library. If not, see <http://www.gnu.org/licenses/>. - * - * Written by: Øyvind Kolås <pippin@linux.intel.com> - * Damien Lespiau <damien.lespiau@intel.com> - * Emmanuele Bassi <ebassi@linux.intel.com> - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <string.h> -#include <stdlib.h> -#include <ctype.h> - -#include "pinpoint.h" - -GList *pp_slides = NULL; /* list of slide text */ -GList *pp_slidep = NULL; /* current slide */ - -typedef struct -{ - const char *name; - int value; -} EnumDescription; - -static EnumDescription PPTextAlign_desc[] = -{ - { "left", PP_TEXT_LEFT }, - { "center", PP_TEXT_CENTER }, - { "right", PP_TEXT_RIGHT }, - { NULL, 0 } -}; - -#define PINPOINT_RENDERER(renderer) ((PinPointRenderer *) renderer) - -static PinPointPoint default_point = { - .stage_color = "black", - - .bg = "NULL", - .bg_type = PP_BG_NONE, - .bg_scale = PP_BG_FIT, - - .text = NULL, - .position = CLUTTER_GRAVITY_CENTER, - .font = "Sans 60px", - .text_color = "white", - .text_align = PP_TEXT_LEFT, - .use_markup = TRUE, - - .shading_color = "black", - .shading_opacity = 0.66, - .transition = NULL, - - .command = NULL, - .data = NULL, -}; - -char *pp_output_filename; -gboolean pp_fullscreen = FALSE; -gboolean pp_maximized = FALSE; - -static GOptionEntry entries[] = -{ - { "maximized", 'm', 0, G_OPTION_ARG_NONE, &pp_maximized, - "Maximize without window decoration, instead\n" -" of fullscreening, this is useful\n" -" to enable window management when running\n" -" [command=] spawned apps.", NULL}, - { "fullscreen", 'f', 0, G_OPTION_ARG_NONE, &pp_fullscreen, - "Start in fullscreen mode", NULL}, - { "output", 'o', 0, G_OPTION_ARG_STRING, &pp_output_filename, - "Output presentation to FILE\n" -" (formats supported: pdf)", "FILE" }, - { NULL } -}; - -PinPointRenderer *pp_clutter_renderer (void); -#ifdef HAVE_PDF -PinPointRenderer *pp_cairo_renderer (void); -#endif - -int -main (int argc, - char **argv) -{ - PinPointRenderer *renderer; - GOptionContext *context; - GError *error = NULL; - char *text = NULL; - - renderer = pp_clutter_renderer (); - - context = g_option_context_new ("- Presentations made easy"); - g_option_context_add_main_entries (context, entries, NULL); - g_option_context_add_group (context, clutter_get_option_group_without_init ()); - g_option_context_add_group (context, cogl_get_option_group ()); - if (!g_option_context_parse (context, &argc, &argv, &error)) - { - g_print ("option parsing failed: %s\n", error->message); - return EXIT_FAILURE; - } - - if (!argv[1]) - { - g_print ("usage: %s [options] <presentation>\n", argv[0]); - text = g_strdup ("[no-markup][transition=sheet][red]\n--\nusage: pinpoint [options] <presentation.txt>\n"); - } - else - { - if (!g_file_get_contents (argv[1], &text, NULL, NULL)) - { - g_print ("failed to load presentation from %s\n", argv[1]); - return -1; - } - } - -#ifdef USE_CLUTTER_GST - clutter_gst_init (&argc, &argv); -#else - clutter_init (&argc, &argv); -#endif -#ifdef USE_DAX - dax_init (&argc, &argv); -#endif - - /* select the cairo renderer if we have requested pdf output */ - if (pp_output_filename && g_str_has_suffix (pp_output_filename, ".pdf")) - { -#ifdef HAVE_PDF - renderer = pp_cairo_renderer (); - /* makes more sense to default to a white "stage" colour in PDFs*/ - default_point.stage_color = "white"; -#else - g_warning ("Pinpoint was built without PDF support"); - return EXIT_FAILURE; -#endif - } - - renderer->init (renderer, argv[1]); - - pp_parse_slides (renderer, text); - g_free (text); - - renderer->run (renderer); - renderer->finalize (renderer); - if (renderer->source) - g_free (renderer->source); - - g_list_free (pp_slides); - - return 0; -} - -/*********************/ - - -/* - * Cross-renderer helpers - */ - -void -pp_get_padding (float stage_width, - float stage_height, - float *padding) -{ - *padding = stage_width * 0.01; -} - -void -pp_get_background_position_scale (PinPointPoint *point, - float stage_width, - float stage_height, - float bg_width, - float bg_height, - float *bg_x, - float *bg_y, - float *bg_scale) -{ - float w_scale = stage_width / bg_width; - float h_scale = stage_height / bg_height; - - switch (point->bg_scale) - { - case PP_BG_FILL: - *bg_scale = (w_scale > h_scale) ? w_scale : h_scale; - break; - case PP_BG_FIT: - *bg_scale = (w_scale < h_scale) ? w_scale : h_scale; - break; - case PP_BG_UNSCALED: - *bg_scale = (w_scale < h_scale) ? w_scale : h_scale; - if (*bg_scale > 1.0) - *bg_scale = 1.0; - break; - } - *bg_x = (stage_width - bg_width * *bg_scale) / 2; - *bg_y = (stage_height - bg_height * *bg_scale) / 2; -} - -void -pp_get_text_position_scale (PinPointPoint *point, - float stage_width, - float stage_height, - float text_width, - float text_height, - float *text_x, - float *text_y, - float *text_scale) -{ - float w, h; - float x, y; - float sx = 1.0; - float sy = 1.0; - float padding; - - pp_get_padding (stage_width, stage_height, &padding); - - w = text_width; - h = text_height; - - sx = stage_width / w * 0.8; - sy = stage_height / h * 0.8; - - if (sy < sx) - sx = sy; - if (sx > 1.0) /* avoid enlarging text */ - sx = 1.0; - - switch (point->position) - { - case CLUTTER_GRAVITY_EAST: - case CLUTTER_GRAVITY_NORTH_EAST: - case CLUTTER_GRAVITY_SOUTH_EAST: - x = stage_width * 0.95 - w * sx; - break; - case CLUTTER_GRAVITY_WEST: - case CLUTTER_GRAVITY_NORTH_WEST: - case CLUTTER_GRAVITY_SOUTH_WEST: - x = stage_width * 0.05; - break; - case CLUTTER_GRAVITY_CENTER: - default: - x = (stage_width - w * sx) / 2; - break; - } - switch (point->position) - { - case CLUTTER_GRAVITY_SOUTH: - case CLUTTER_GRAVITY_SOUTH_EAST: - case CLUTTER_GRAVITY_SOUTH_WEST: - y = stage_height * 0.95 - h * sx; - break; - case CLUTTER_GRAVITY_NORTH: - case CLUTTER_GRAVITY_NORTH_EAST: - case CLUTTER_GRAVITY_NORTH_WEST: - y = stage_height * 0.05; - break; - default: - y = (stage_height- h * sx) / 2; - break; - } - - *text_scale = sx; - *text_x = x; - *text_y = y; -} - -void -pp_get_shading_position_size (float stage_width, - float stage_height, - float text_x, - float text_y, - float text_width, - float text_height, - float text_scale, - float *shading_x, - float *shading_y, - float *shading_width, - float *shading_height) -{ - float padding; - - pp_get_padding (stage_width, stage_height, &padding); - - *shading_x = text_x - padding; - *shading_y = text_y - padding; - *shading_width = text_width * text_scale + padding * 2; - *shading_height = text_height * text_scale + padding * 2; -} - -void pp_parse_slides (PinPointRenderer *renderer, - const char *slide_src); -/* - * Parsing - */ - -static void -parse_setting (PinPointPoint *point, - const gchar *setting) -{ -/* C Preprocessor macros implemeting a mini language for interpreting - * pinpoint key=value pairs - */ - -#define START_PARSER if (0) { -#define DEFAULT } else { -#define END_PARSER } -#define IF_PREFIX(prefix) } else if (g_str_has_prefix (setting, prefix)) { -#define IF_EQUAL(string) } else if (g_str_equal (setting, string)) { -#define char g_intern_string (strchrnul (setting, '=') + 1) -#define float g_ascii_strtod (strchrnul (setting, '=') + 1, NULL); -#define enum(r,t,s) \ - do { \ - int _i; \ - EnumDescription *_d = t##_desc; \ - r = _d[0].value; \ - for (_i = 0; _d[_i].name; _i++) \ - if (g_strcmp0 (_d[_i].name, s) == 0) \ - r = _d[_i].value; \ - } while (0) - - START_PARSER - IF_PREFIX("stage-color=") point->stage_color = char; - IF_PREFIX("font=") point->font = char; - IF_PREFIX("text-color=") point->text_color = char; - IF_PREFIX("text-align=") enum(point->text_align, PPTextAlign, char); - IF_PREFIX("shading-color=") point->shading_color = char; - IF_PREFIX("shading-opacity=") point->shading_opacity = float; - IF_PREFIX("command=") point->command = char; - IF_PREFIX("transition=") point->transition = char; - IF_EQUAL("fill") point->bg_scale = PP_BG_FILL; - IF_EQUAL("fit") point->bg_scale = PP_BG_FIT; - IF_EQUAL("unscaled") point->bg_scale = PP_BG_UNSCALED; - IF_EQUAL("center") point->position = CLUTTER_GRAVITY_CENTER; - IF_EQUAL("top") point->position = CLUTTER_GRAVITY_NORTH; - IF_EQUAL("bottom") point->position = CLUTTER_GRAVITY_SOUTH; - IF_EQUAL("left") point->position = CLUTTER_GRAVITY_WEST; - IF_EQUAL("right") point->position = CLUTTER_GRAVITY_EAST; - IF_EQUAL("top-left") point->position = CLUTTER_GRAVITY_NORTH_WEST; - IF_EQUAL("top-right") point->position = CLUTTER_GRAVITY_NORTH_EAST; - IF_EQUAL("bottom-left") point->position = CLUTTER_GRAVITY_SOUTH_WEST; - IF_EQUAL("bottom-right") point->position = CLUTTER_GRAVITY_SOUTH_EAST; - IF_EQUAL("no-markup") point->use_markup = FALSE; - IF_EQUAL("markup") point->use_markup = TRUE; - DEFAULT point->bg = g_intern_string (setting); - END_PARSER - -/* undefine all the overrides, returning us to regular C */ -#undef START_PARSER -#undef END_PARSER -#undef DEFAULT -#undef IF_PREFIX -#undef IF_EQUAL -#undef float -#undef char -#undef enum -} - -static void -parse_config (PinPointPoint *point, - const char *config) -{ - GString *str = g_string_new (""); - const char *p; - - for (p = config; *p; p++) - { - if (*p != '[') - continue; - - p++; - g_string_truncate (str, 0); - while (*p && *p != ']' && *p != '\n') - { - g_string_append_c (str, *p); - p++; - } - - if (*p == ']') - parse_setting (point, str->str); - } - g_string_free (str, TRUE); -} - -static void -pin_point_free (PinPointRenderer *renderer, - PinPointPoint *point) -{ - if (renderer->free_data) - renderer->free_data (renderer, point->data); - g_free (point); -} - -static PinPointPoint * -pin_point_new (PinPointRenderer *renderer) -{ - PinPointPoint *point; - - point = g_new0 (PinPointPoint, 1); - *point = default_point; - - if (renderer->allocate_data) - point->data = renderer->allocate_data (renderer); - - return point; -} - -static gboolean -pp_is_color (const char *string) -{ - ClutterColor color; - return clutter_color_from_string (&color, string); -} - -void -pp_parse_slides (PinPointRenderer *renderer, - const char *slide_src) -{ - const char *p; - int slideno = 0; - gboolean done = FALSE; - gboolean startofline = TRUE; - gboolean gotconfig = FALSE; - GString *slide_str = g_string_new (""); - GString *setting_str = g_string_new (""); - GList *s; - PinPointPoint *point, *next_point; - - if (renderer->source) - { - gboolean start_of_line = TRUE; - int pos; - int lineno=0; - /* compute slide no that has changed */ - for (pos = 0, slideno = 0; - slide_src[pos] && renderer->source[pos] && slide_src[pos]==renderer->source[pos] - ; pos ++) - { - switch (slide_src[pos]) - { - case '\n': - start_of_line = TRUE; - lineno++; - break; - case '-': - if (start_of_line) - slideno++; - default: - start_of_line = FALSE; - } - } - slideno--; - g_free (renderer->source); - } - renderer->source = g_strdup (slide_src); - - for (s = pp_slides; s; s = s->next) - pin_point_free (renderer, s->data); - - g_list_free (pp_slides); - pp_slides = NULL; - point = pin_point_new (renderer); - - /* parse the slides, constructing lists of objects, adding all generated - * actors to the stage - */ - for (p = slide_src; *p; p++) - { - switch (*p) - { - case '\\': /* escape the next char */ - p++; - startofline = FALSE; - if (*p) - g_string_append_c (slide_str, *p); - break; - case '\n': - startofline = TRUE; - g_string_append_c (slide_str, *p); - break; - case '-': /* slide seperator */ - close_last_slide: - if (startofline) - { - next_point = pin_point_new (renderer); - - g_string_assign (setting_str, ""); - while (*p && *p!='\n') /* until newline */ - { - g_string_append_c (setting_str, *p); - p++; - } - parse_config (next_point, setting_str->str); - - if (!gotconfig) - { - parse_config (&default_point, slide_str->str); - /* copy the default point except the per-slide allocated - * data (void *) */ - memcpy (point, &default_point, - sizeof (PinPointPoint) - sizeof (void *)); - parse_config (point, setting_str->str); - gotconfig = TRUE; - g_string_assign (slide_str, ""); - g_string_assign (setting_str, ""); - } - else - { - if (point->bg && point->bg[0]) - { - gchar *filename = g_strdup (point->bg); - int i = 0; - - while (filename[i]) - { - filename[i] = tolower(filename[i]); - i++; - } - if (g_str_has_suffix (filename, ".avi") - || g_str_has_suffix (filename, ".ogg") - || g_str_has_suffix (filename, ".ogv") - || g_str_has_suffix (filename, ".mpg") - || g_str_has_suffix (filename, ".mpeg") - || g_str_has_suffix (filename, ".mov") - || g_str_has_suffix (filename, ".mp4") - || g_str_has_suffix (filename, ".wmv") - || g_str_has_suffix (filename, ".webm")) - point->bg_type = PP_BG_VIDEO; - else if (g_str_has_suffix (filename, ".svg")) - point->bg_type = PP_BG_SVG; - else if (pp_is_color (point->bg)) - point->bg_type = PP_BG_COLOR; - else - point->bg_type = PP_BG_IMAGE; - g_free (filename); - } - - { - char *str = slide_str->str; - - /* trim newlines from start and end. ' ' can be used in the - * insane case that you actually want blank lines before or after - * the text of a slide */ - while (*str == '\n') str++; - while ( slide_str->str[strlen(slide_str->str)-1]=='\n') - slide_str->str[strlen(slide_str->str)-1]='\0'; - - point->text = g_intern_string (str); - } - - renderer->make_point (renderer, point); - - g_string_assign (slide_str, ""); - g_string_assign (setting_str, ""); - - pp_slides = g_list_append (pp_slides, point); - point = next_point; - } - } - else - { - startofline = FALSE; - g_string_append_c (slide_str, *p); - } - break; - default: - startofline = FALSE; - g_string_append_c (slide_str, *p); - break; - } - } - if (!done) - { - done = TRUE; - goto close_last_slide; - } - - g_string_free (slide_str, TRUE); - g_string_free (setting_str, TRUE); - - if (g_list_nth (pp_slides, slideno)) - pp_slidep = g_list_nth (pp_slides, slideno); - else - pp_slidep = pp_slides; -} diff --git a/pinpoint/pinpoint.h b/pinpoint/pinpoint.h deleted file mode 100644 index 5d84d2e..0000000 --- a/pinpoint/pinpoint.h +++ b/dev/null @@ -1,146 +0,0 @@ -/* - * Pinpoint: A small-ish presentation tool - * - * Copyright (C) 2010 Intel Corporation - * - * This program is free software; you can redistribute it and/or modify it - * under the terms and conditions of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 of the - * License, or (at your option0 any later version. - * - * This program is distributed in the hope it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library. If not, see <http://www.gnu.org/licenses/>. - * - * Written by: Øyvind Kolås <pippin@linux.intel.com> - * Damien Lespiau <damien.lespiau@intel.com> - * Emmanuele Bassi <ebassi@linux.intel.com> - */ - -#ifndef __PINPOINT_H__ -#define __PINPOINT_H__ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <clutter/clutter.h> - -typedef struct _PinPointPoint PinPointPoint; -typedef struct _PinPointRenderer PinPointRenderer; - -typedef enum -{ - PP_TEXT_LEFT = PANGO_ALIGN_LEFT, - PP_TEXT_CENTER = PANGO_ALIGN_CENTER, - PP_TEXT_RIGHT = PANGO_ALIGN_RIGHT -} PPTextAlign; - -typedef enum -{ - PP_BG_NONE, - PP_BG_COLOR, - PP_BG_IMAGE, - PP_BG_VIDEO, - PP_BG_SVG -} PPBackgroundType; - -typedef enum -{ - PP_BG_UNSCALED, - PP_BG_FIT, /* default value */ - PP_BG_FILL -} PPBackgroundScale; - -#define PINPOINT_RENDERER(renderer) ((PinPointRenderer *) renderer) - -struct _PinPointRenderer -{ - void (*init) (PinPointRenderer *renderer, - char *pinpoint_file); - void (*run) (PinPointRenderer *renderer); - void (*finalize) (PinPointRenderer *renderer); - gboolean (*make_point) (PinPointRenderer *renderer, - PinPointPoint *point); - void * (*allocate_data) (PinPointRenderer *renderer); - void (*free_data) (PinPointRenderer *renderer, - void *datap); - char * source; -}; - -struct _PinPointPoint -{ - const char *stage_color; - - const gchar *bg; - PPBackgroundType bg_type; - PPBackgroundScale bg_scale; - - const char *text; /* the text of the slide */ - ClutterGravity position; - const char *font; - PPTextAlign text_align; - const char *text_color; - gboolean use_markup; - - const char *shading_color; - float shading_opacity; - const char *transition; /* transition template to use, if any */ - - const char *command; - - void *data; /* the renderer can attach data here */ -}; - -extern char *pp_output_filename; -extern gboolean pp_fullscreen; -extern gboolean pp_maximized; - -extern GList *pp_slides; -extern GList *pp_slidep; - -void pp_parse_slides (PinPointRenderer *renderer, - const char *slide_src); - -void -pp_get_padding (float stage_width, - float stage_height, - float *padding); - -void -pp_get_background_position_scale (PinPointPoint *point, - float stage_width, - float stage_height, - float bg_width, - float bg_height, - float *bg_x, - float *bg_y, - float *bg_scale); -void -pp_get_text_position_scale (PinPointPoint *point, - float stage_width, - float stage_height, - float text_width, - float text_height, - float *text_x, - float *text_y, - float *text_scale); - -void -pp_get_shading_position_size (float stage_width, - float stage_height, - float text_x, - float text_y, - float text_width, - float text_height, - float text_scale, - float *shading_x, - float *shading_y, - float *shading_width, - float *shading_height); - -#endif diff --git a/pinpoint/pp-cairo.c b/pinpoint/pp-cairo.c deleted file mode 100644 index 427f7a3..0000000 --- a/pinpoint/pp-cairo.c +++ b/dev/null @@ -1,546 +0,0 @@ -/* - * Pinpoint: A small-ish presentation tool - * - * Copyright (C) 2010 Intel Corporation - * - * This program is free software; you can redistribute it and/or modify it - * under the terms and conditions of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 of the - * License, or (at your option0 any later version. - * - * This program is distributed in the hope it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library. If not, see <http://www.gnu.org/licenses/>. - * - * Written by: Øyvind Kolås <pippin@linux.intel.com> - * Damien Lespiau <damien.lespiau@intel.com> - * Emmanuele Bassi <ebassi@linux.intel.com> - */ - -#include "pinpoint.h" - -#ifdef HAVE_PDF -#include <cairo.h> -#include <cairo-pdf.h> -#include <gdk-pixbuf/gdk-pixbuf.h> -#include <pango/pango.h> -#include <pango/pangocairo.h> -#ifdef HAVE_RSVG -#include <librsvg/rsvg.h> -#include <librsvg/rsvg-cairo.h> -#endif - -#include "gst-video-thumbnailer.h" - -#define CAIRO_RENDERER(renderer) ((CairoRenderer *) renderer) - -typedef struct _CairoRenderer -{ - PinPointRenderer renderer; - GHashTable *surfaces; /* keep cairo_surface_t around for source - images as we wantt to only include one - instance of the image when using it in - several slides */ - GHashTable *svgs; /* keep RsvgHandles around for source - svg backgrounds as we want to only - include one instance of the image - when using it in several slides */ - cairo_surface_t *surface; - cairo_t *ctx; -} CairoRenderer; - -typedef struct -{ -} CairoPointData; - -static void -_destroy_surface (gpointer data) -{ - cairo_surface_t *surface = data; - - cairo_surface_destroy (surface); -} - -#define A4_LS_WIDTH 841.88976378 -#define A4_LS_HEIGHT 595.275590551 - -static void -cairo_renderer_init (PinPointRenderer *pp_renderer, - char *pinpoint_file) -{ - CairoRenderer *renderer = CAIRO_RENDERER (pp_renderer); - - /* A4, landscape */ - renderer->surface = cairo_pdf_surface_create (pp_output_filename, - A4_LS_WIDTH, A4_LS_HEIGHT); - - renderer->ctx = cairo_create (renderer->surface); - renderer->surfaces = g_hash_table_new_full (g_str_hash, g_str_equal, - NULL, _destroy_surface); - renderer->svgs = g_hash_table_new_full (g_str_hash, g_str_equal, - NULL, - g_object_unref); -} - -/* This function is adapted from Gtk's gdk_cairo_set_source_pixbuf() you can - * find in gdk/gdkcairo.c. - * Copyright (C) Red Had, Inc. - * LGPLv2+ */ -static cairo_surface_t * -_cairo_new_surface_from_pixbuf (const GdkPixbuf *pixbuf) -{ - gint width = gdk_pixbuf_get_width (pixbuf); - gint height = gdk_pixbuf_get_height (pixbuf); - guchar *gdk_pixels = gdk_pixbuf_get_pixels (pixbuf); - int gdk_rowstride = gdk_pixbuf_get_rowstride (pixbuf); - int n_channels = gdk_pixbuf_get_n_channels (pixbuf); - int cairo_stride; - guchar *cairo_pixels; - cairo_format_t format; - cairo_surface_t *surface; - static const cairo_user_data_key_t key; - int j; - - if (n_channels == 3) - format = CAIRO_FORMAT_RGB24; - else - format = CAIRO_FORMAT_ARGB32; - - cairo_stride = cairo_format_stride_for_width (format, width); - cairo_pixels = g_malloc (height * cairo_stride); - surface = cairo_image_surface_create_for_data ((unsigned char *)cairo_pixels, - format, - width, height, cairo_stride); - - cairo_surface_set_user_data (surface, &key, - cairo_pixels, (cairo_destroy_func_t)g_free); - - for (j = height; j; j--) - { - guchar *p = gdk_pixels; - guchar *q = cairo_pixels; - - if (n_channels == 3) - { - guchar *end = p + 3 * width; - - while (p < end) - { -#if G_BYTE_ORDER == G_LITTLE_ENDIAN - q[0] = p[2]; - q[1] = p[1]; - q[2] = p[0]; -#else - q[1] = p[0]; - q[2] = p[1]; - q[3] = p[2]; -#endif - p += 3; - q += 4; - } - } - else - { - guchar *end = p + 4 * width; - guint t1,t2,t3; - -#define MULT(d,c,a,t) G_STMT_START { t = c * a + 0x7f; d = ((t >> 8) + t) >> 8; } G_STMT_END - - while (p < end) - { -#if G_BYTE_ORDER == G_LITTLE_ENDIAN - MULT(q[0], p[2], p[3], t1); - MULT(q[1], p[1], p[3], t2); - MULT(q[2], p[0], p[3], t3); - q[3] = p[3]; -#else - q[0] = p[3]; - MULT(q[1], p[0], p[3], t1); - MULT(q[2], p[1], p[3], t2); - MULT(q[3], p[2], p[3], t3); -#endif - - p += 4; - q += 4; - } - -#undef MULT - } - - gdk_pixels += gdk_rowstride; - cairo_pixels += cairo_stride; - } - - return surface; -} - -static gboolean -_cairo_read_file (const char *file, - unsigned char **data, - unsigned int *len) -{ - FILE *fp; - - fp = fopen (file, "rb"); - if (fp == NULL) - return FALSE; - - fseek (fp, 0, SEEK_END); - *len = ftell(fp); - fseek (fp, 0, SEEK_SET); - *data = g_malloc (*len); - - if (fread(*data, *len, 1, fp) != 1) - return FALSE; - - fclose(fp); - return TRUE; -} - -static cairo_surface_t * -_cairo_get_surface (CairoRenderer *renderer, - const char *file) -{ - cairo_surface_t *surface; - GdkPixbuf *pixbuf; - GError *error = NULL; - - surface = g_hash_table_lookup (renderer->surfaces, file); - if (surface) - return surface; - - pixbuf = gdk_pixbuf_new_from_file (file, &error); - if (pixbuf == NULL) - { - if (error) - { - g_warning ("could not load file %s: %s", file, error->message); - g_clear_error (&error); - } - return NULL; - } - - surface = _cairo_new_surface_from_pixbuf (pixbuf); - g_hash_table_insert (renderer->surfaces, (char *) file, surface); - - /* If we embed a JPEG, we can actually insert the coded data into the PDF in - * a lossless fashion (no recompression of the JPEG) */ - if (g_str_has_suffix (file, ".jpg") || g_str_has_suffix (file, ".jpeg")) - { - unsigned char *data = NULL; - guint len; - - _cairo_read_file (file, &data, &len); - cairo_surface_set_mime_data (surface, CAIRO_MIME_TYPE_JPEG, - data, len, - g_free, data); - } - - return surface; -} - -#ifdef HAVE_RSVG - -static RsvgHandle * -_cairo_get_svg (CairoRenderer *renderer, - const char *file) -{ - RsvgHandle *svg; - GError *error = NULL; - - svg = g_hash_table_lookup (renderer->svgs, file); - if (svg) - return svg; - - svg = rsvg_handle_new_from_file (file, &error); - - if (svg == NULL) - { - if (error) - { - g_warning ("could not load file %s: %s", file, error->message); - g_clear_error (&error); - } - return NULL; - } - - g_hash_table_insert (renderer->svgs, (char *) file, svg); - - return svg; -} - -#endif /* HAVE_RSVG */ - -static void -_cairo_render_background (CairoRenderer *renderer, - PinPointPoint *point) -{ - if (point->stage_color) - { - ClutterColor color; - - clutter_color_from_string (&color, point->stage_color); - cairo_set_source_rgba (renderer->ctx, - color.red / 255.f, - color.green / 255.f, - color.blue / 255.f, - color.alpha / 255.f); - cairo_paint (renderer->ctx); - } - - switch (point->bg_type) - { - case PP_BG_COLOR: - { - ClutterColor color; - - clutter_color_from_string (&color, point->bg); - cairo_set_source_rgba (renderer->ctx, - color.red / 255.f, - color.green / 255.f, - color.blue / 255.f, - color.alpha / 255.f); - cairo_paint (renderer->ctx); - } - break; - case PP_BG_IMAGE: - { - cairo_surface_t *surface; - float bg_x, bg_y, bg_width, bg_height, bg_scale; - - surface = _cairo_get_surface (renderer, point->bg); - if (surface == NULL) - break; - - - bg_width = cairo_image_surface_get_width (surface); - bg_height = cairo_image_surface_get_height (surface); - - pp_get_background_position_scale (point, - A4_LS_WIDTH, A4_LS_HEIGHT, - bg_width, bg_height, - &bg_x, &bg_y, - &bg_scale); - - cairo_save (renderer->ctx); - cairo_translate (renderer->ctx, bg_x, bg_y); - cairo_scale (renderer->ctx, bg_scale, bg_scale); - cairo_set_source_surface (renderer->ctx, surface, 0., 0.); - cairo_paint (renderer->ctx); - cairo_restore (renderer->ctx); - } - break; - case PP_BG_VIDEO: - { -#ifdef USE_CLUTTER_GST - GdkPixbuf *pixbuf; - cairo_surface_t *surface; - float bg_x, bg_y, bg_width, bg_height, bg_scale; - GCancellable* cancellable = g_cancellable_new (); - - pixbuf = gst_video_thumbnailer_get_shot (point->bg, cancellable); - if (pixbuf == NULL) - break; - - surface = _cairo_new_surface_from_pixbuf (pixbuf); - g_hash_table_insert (renderer->surfaces, (char *) point->bg, surface); - - bg_width = cairo_image_surface_get_width (surface); - bg_height = cairo_image_surface_get_height (surface); - - pp_get_background_position_scale (point, - A4_LS_WIDTH, A4_LS_HEIGHT, - bg_width, bg_height, - &bg_x, &bg_y, - &bg_scale); - - cairo_save (renderer->ctx); - cairo_translate (renderer->ctx, bg_x, bg_y); - cairo_scale (renderer->ctx, bg_scale, bg_scale); - cairo_set_source_surface (renderer->ctx, surface, 0., 0.); - cairo_paint (renderer->ctx); - cairo_restore (renderer->ctx); -#endif - break; - } - case PP_BG_SVG: -#ifdef HAVE_RSVG - { - RsvgHandle *svg = _cairo_get_svg (renderer, point->bg); - RsvgDimensionData dim; - float bg_x, bg_y, bg_scale; - - if (svg == NULL) - break; - - rsvg_handle_get_dimensions (svg, &dim); - - pp_get_background_position_scale (point, - A4_LS_WIDTH, A4_LS_HEIGHT, - dim.width, dim.height, - &bg_x, &bg_y, - &bg_scale); - - cairo_save (renderer->ctx); - cairo_translate (renderer->ctx, bg_x, bg_y); - cairo_scale (renderer->ctx, bg_scale, bg_scale); - rsvg_handle_render_cairo (svg, renderer->ctx); - - cairo_restore (renderer->ctx); - } -#endif - break; - default: - g_assert_not_reached(); - } -} - -static void -_cairo_render_text (CairoRenderer *renderer, - PinPointPoint *point) -{ - PangoLayout *layout; - PangoFontDescription *desc; - PangoRectangle logical_rect = { 0, }; - ClutterColor text_color, shading_color; - - float text_width, text_height, text_x, text_y, text_scale; - float shading_x, shading_y, shading_width, shading_height; - - layout = pango_cairo_create_layout (renderer->ctx); - desc = pango_font_description_from_string (point->font); - pango_layout_set_font_description (layout, desc); - if (point->use_markup) - pango_layout_set_markup (layout, point->text, -1); - else - pango_layout_set_text (layout, point->text, -1); - pango_layout_set_alignment (layout, point->text_align); - - pango_layout_get_extents (layout, NULL, &logical_rect); - text_width = (logical_rect.x + logical_rect.width) / 1024; - text_height = (logical_rect.y + logical_rect.height) / 1024; - if (text_width < 1) - goto out; - - pp_get_text_position_scale (point, - A4_LS_WIDTH, A4_LS_HEIGHT, - text_width, text_height, - &text_x, &text_y, - &text_scale); - - pp_get_shading_position_size (A4_LS_HEIGHT, A4_LS_WIDTH, - text_x, text_y, - text_width, text_height, - text_scale, - &shading_x, &shading_y, - &shading_width, &shading_height); - - clutter_color_from_string (&text_color, point->text_color); - clutter_color_from_string (&shading_color, point->shading_color); - - cairo_set_source_rgba (renderer->ctx, - shading_color.red / 255.f, - shading_color.green / 255.f, - shading_color.blue / 255.f, - shading_color.alpha / 255.f * point->shading_opacity); - cairo_rectangle (renderer->ctx, - shading_x, shading_y, shading_width, shading_height); - cairo_fill (renderer->ctx); - - cairo_save (renderer->ctx); - cairo_translate (renderer->ctx, text_x, text_y); - cairo_scale (renderer->ctx, text_scale, text_scale); - cairo_set_source_rgba (renderer->ctx, - text_color.red / 255.f, - text_color.green / 255.f, - text_color.blue / 255.f, - text_color.alpha / 255.f); - pango_cairo_show_layout (renderer->ctx, layout); - cairo_restore (renderer->ctx); - -out: - pango_font_description_free (desc); - g_object_unref (layout); -} - -static void -_cairo_render_page (CairoRenderer *renderer, - PinPointPoint *point) -{ - _cairo_render_background (renderer, point); - _cairo_render_text (renderer, point); - cairo_show_page (renderer->ctx); -} - -static void -cairo_renderer_run (PinPointRenderer *pp_renderer) -{ - CairoRenderer *renderer = CAIRO_RENDERER (pp_renderer); - GList *cur; - - for (cur = pp_slides; cur; cur = g_list_next (cur)) - _cairo_render_page (renderer, cur->data); -} - -static void -cairo_renderer_finalize (PinPointRenderer *pp_renderer) -{ - CairoRenderer *renderer = CAIRO_RENDERER (pp_renderer); - - cairo_surface_destroy (renderer->surface); - g_hash_table_unref (renderer->surfaces); - g_hash_table_unref (renderer->svgs); - cairo_destroy (renderer->ctx); -} - -static gboolean -cairo_renderer_make_point (PinPointRenderer *pp_renderer, - PinPointPoint *point) -{ - gboolean ret = TRUE; - - if (point->bg_type == PP_BG_COLOR) - { - ClutterColor color; - - ret = clutter_color_from_string (&color, point->bg); - } - - return ret; -} - -static void * -cairo_renderer_allocate_data (PinPointRenderer *renderer) -{ - return NULL; -} - -static void -cairo_renderer_free_data (PinPointRenderer *renderer, - void *datap) -{ -} - -static CairoRenderer cairo_renderer_vtable = -{ - .renderer = - { - .init = cairo_renderer_init, - .run = cairo_renderer_run, - .finalize = cairo_renderer_finalize, - .make_point = cairo_renderer_make_point, - .allocate_data = cairo_renderer_allocate_data, - .free_data = cairo_renderer_free_data - } -}; - -PinPointRenderer *pp_cairo_renderer (void) -{ - return (void*)&cairo_renderer_vtable; -} - -#endif /* HAVE_PDF */ diff --git a/pinpoint/pp-clutter.c b/pinpoint/pp-clutter.c deleted file mode 100644 index b86e973..0000000 --- a/pinpoint/pp-clutter.c +++ b/dev/null @@ -1,1087 +0,0 @@ -/* - * Pinpoint: A small-ish presentation tool - * - * Copyright (C) 2010 Intel Corporation - * - * This program is free software; you can redistribute it and/or modify it - * under the terms and conditions of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 of the - * License, or (at your option0 any later version. - * - * This program is distributed in the hope it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library. If not, see <http://www.gnu.org/licenses/>. - * - * Written by: Øyvind Kolås <pippin@linux.intel.com> - * Damien Lespiau <damien.lespiau@intel.com> - * Emmanuele Bassi <ebassi@linux.intel.com> - */ - -#include "pinpoint.h" -#include <clutter/x11/clutter-x11.h> -#include <gio/gio.h> -#ifdef USE_CLUTTER_GST -#include <clutter-gst/clutter-gst.h> -#endif -#ifdef USE_DAX -#include <dax/dax.h> -#include "pp-super-aa.h" -#endif -#include <stdlib.h> - -/* #define QUICK_ACCESS_LEFT - uncomment to move speed access from top to left, - * useful on meego netbook - */ - -#define RESTDEPTH -9000.0 -#define RESTX 4600.0 -#define STARTPOS -3000.0 - -static ClutterColor black = {0x00,0x00,0x00,0xff}; - -typedef struct _ClutterRenderer -{ - PinPointRenderer renderer; - GHashTable *bg_cache; /* only load the same backgrounds once */ - ClutterActor *stage; - ClutterActor *background; - ClutterActor *midground; - ClutterActor *shading; - ClutterActor *foreground; - - ClutterActor *json_layer; - - ClutterActor *commandline; - ClutterActor *commandline_shading; - char *path; /* path of the file of the GFileMonitor callback */ - float rest_y; /* where the text can rest */ -} ClutterRenderer; - -typedef struct -{ - PinPointRenderer *renderer; - ClutterActor *background; - ClutterActor *text; - float rest_y; /* y coordinate when text is stationary unused */ - - ClutterState *state; - ClutterActor *json_slide; - ClutterActor *background2; - ClutterScript *script; - ClutterActor *midground; - ClutterActor *foreground; - ClutterActor *shading; -} ClutterPointData; - -#define CLUTTER_RENDERER(renderer) ((ClutterRenderer *) renderer) - - -static void leave_slide (ClutterRenderer *renderer, - gboolean backwards); -static void show_slide (ClutterRenderer *renderer, - gboolean backwards); -static void action_slide (ClutterRenderer *renderer); -static void activate_commandline (ClutterRenderer *renderer); -static void file_changed (GFileMonitor *monitor, - GFile *file, - GFile *other_file, - GFileMonitorEvent event_type, - ClutterRenderer *renderer); -static void stage_resized (ClutterActor *actor, - GParamSpec *pspec, - ClutterRenderer *renderer); -static gboolean key_pressed (ClutterActor *actor, - ClutterEvent *event, - ClutterRenderer *renderer); - - -static void pp_set_fullscreen (ClutterStage *stage, - gboolean fullscreen) -{ - static gboolean is_fullscreen = FALSE; - static gfloat old_width=640, old_height=480; - - struct { - unsigned long flags; - unsigned long functions; - unsigned long decorations; - long inputMode; - unsigned long status; - } MWMHints = { 2, 0, 0, 0, 0}; - - Display *xdisplay = clutter_x11_get_default_display (); - int xscreen = clutter_x11_get_default_screen (); - Atom wm_hints = XInternAtom(xdisplay, "_MOTIF_WM_HINTS", True); - Window xwindow = clutter_x11_get_stage_window (stage); - - if (!pp_maximized) - return clutter_stage_set_fullscreen (stage, fullscreen); - - pp_fullscreen = fullscreen; - if (is_fullscreen == fullscreen) - return; - is_fullscreen = fullscreen; - - if (fullscreen) - { - int full_width = DisplayWidth (xdisplay, xscreen); - int full_height = DisplayHeight (xdisplay, xscreen)+5; /* avoid being detected as fullscreen */ - clutter_actor_get_size (CLUTTER_ACTOR (stage), &old_width, &old_height); - - if (wm_hints != None) - XChangeProperty (xdisplay, xwindow, wm_hints, wm_hints, 32, - PropModeReplace, (guchar*)&MWMHints, - sizeof(MWMHints)/sizeof(long)); - clutter_actor_set_size (CLUTTER_ACTOR (stage), full_width, full_height); - XMoveResizeWindow (xdisplay, xwindow, - 0, 0, full_width, full_height); - } - else - { - MWMHints.decorations = 7; - if (wm_hints != None ) - XChangeProperty (xdisplay, xwindow, wm_hints, wm_hints, 32, - PropModeReplace, (guchar*)&MWMHints, - sizeof(MWMHints)/sizeof(long)); - clutter_stage_set_fullscreen (stage, FALSE); - clutter_actor_set_size (CLUTTER_ACTOR (stage), old_width, old_height); - } -} - -static gboolean pp_get_fullscreen (ClutterStage *stage) -{ - if (!pp_maximized) - return clutter_stage_get_fullscreen (stage); - return pp_fullscreen; -} - -static void -_destroy_surface (gpointer data) -{ - /* not destroying background, since it would be destoryed with - * the stage itself. - */ -} - -static uint hide_cursor = 0; -static gboolean hide_cursor_cb (gpointer stage) -{ - hide_cursor = 0; - clutter_stage_hide_cursor (stage); - return FALSE; -} - -static void update_commandline_shading (ClutterRenderer *renderer); - -static void -activate_commandline (ClutterRenderer *renderer) -{ - PinPointPoint *point; - ClutterPointData *data; - - if (!pp_slidep) - return; - - point = pp_slidep->data; - data = point->data; - - clutter_actor_animate (renderer->commandline, - CLUTTER_LINEAR, 500, - "opacity", 0xff, NULL); - clutter_actor_animate (renderer->commandline_shading, - CLUTTER_LINEAR, 100, - "opacity", (int)(point->shading_opacity*0xff*0.33), NULL); - - g_object_set (renderer->commandline, "editable", TRUE, - "single-line-mode", TRUE, "activatable", TRUE, NULL); - clutter_actor_grab_key_focus (renderer->commandline); -} - - -static gboolean commandline_cancel_cb (ClutterActor *actor, - ClutterEvent *event, - gpointer data) -{ - ClutterRenderer *renderer = CLUTTER_RENDERER (data); - PinPointPoint *point = pp_slidep->data; - - if (clutter_event_type (event) == CLUTTER_KEY_PRESS && - (clutter_event_get_key_symbol (event) == CLUTTER_Escape || - clutter_event_get_key_symbol (event) == CLUTTER_Tab)) - { - clutter_actor_grab_key_focus (renderer->stage); - clutter_actor_animate (renderer->commandline, - CLUTTER_LINEAR, 500, - "opacity", (int)(0xff*0.33), NULL); - g_object_set (renderer->commandline, "editable", FALSE, NULL); - clutter_actor_animate (renderer->commandline_shading, - CLUTTER_LINEAR, 500, - "opacity", (int)(point->shading_opacity*0xff*0.33), NULL); - return TRUE; - } - update_commandline_shading (renderer); - return FALSE; -} - -static gboolean commandline_action_cb (ClutterActor *actor, - gpointer data) -{ - ClutterRenderer *renderer = CLUTTER_RENDERER (data); - PinPointPoint *point = pp_slidep->data; - clutter_actor_grab_key_focus (renderer->stage); - clutter_actor_animate (renderer->commandline, - CLUTTER_LINEAR, 500, - "opacity", (int)(0xff*0.33), NULL); - g_object_set (renderer->commandline, "editable", FALSE, NULL); - clutter_actor_animate (renderer->commandline_shading, - CLUTTER_LINEAR, 500, - "opacity", (int)(point->shading_opacity*0xff*0.33), NULL); - - action_slide (renderer); - return FALSE; -} - -static gboolean stage_motion (ClutterActor *actor, - ClutterEvent *event, - gpointer renderer) -{ - gfloat stage_width, stage_height; - - if (hide_cursor) - g_source_remove (hide_cursor); - clutter_stage_show_cursor (CLUTTER_STAGE (actor)); - hide_cursor = g_timeout_add (500, hide_cursor_cb, actor); - - if (!pp_get_fullscreen (CLUTTER_STAGE (actor))) - return FALSE; - - clutter_actor_get_size (CLUTTER_RENDERER (renderer)->stage, &stage_width, &stage_height); -#ifdef QUICK_ACCESS_LEFT - if (event->motion.x < 8) - { - float d = event->motion.y / stage_height; -#else - if (event->motion.y < 8) - { - float d = event->motion.x / stage_width; -#endif - if (pp_slidep) - { - leave_slide (renderer, FALSE); - } - pp_slidep = g_list_nth (pp_slides, g_list_length (pp_slides) * d); - show_slide (renderer, FALSE); - } - - return FALSE; -} - -static void -clutter_renderer_init (PinPointRenderer *pp_renderer, - char *pinpoint_file) -{ - ClutterRenderer *renderer = CLUTTER_RENDERER (pp_renderer); - GFileMonitor *monitor; - ClutterActor *stage; - - renderer->rest_y = STARTPOS; - - renderer->stage = stage = clutter_stage_get_default (); - - renderer->background = clutter_group_new (); - renderer->midground = clutter_group_new (); - renderer->foreground = clutter_group_new (); - renderer->json_layer = clutter_group_new (); - renderer->shading = clutter_rectangle_new_with_color (&black); - renderer->commandline_shading = clutter_rectangle_new_with_color (&black); - renderer->commandline = clutter_text_new (); - clutter_actor_set_opacity (renderer->shading, 0x77); - clutter_actor_set_opacity (renderer->commandline_shading, 0x77); - - clutter_container_add_actor (CLUTTER_CONTAINER (renderer->midground), - renderer->shading); - clutter_container_add (CLUTTER_CONTAINER (stage), - renderer->background, - renderer->midground, - renderer->foreground, - renderer->json_layer, - renderer->commandline_shading, - renderer->commandline, - NULL); - - clutter_actor_show (stage); - clutter_stage_set_color (CLUTTER_STAGE (stage), &black); - g_signal_connect (stage, "key-press-event", - G_CALLBACK (key_pressed), renderer); - g_signal_connect (stage, "notify::width", - G_CALLBACK (stage_resized), renderer); - g_signal_connect (stage, "notify::height", - G_CALLBACK (stage_resized), renderer); - g_signal_connect (stage, "motion-event", - G_CALLBACK (stage_motion), renderer); - g_signal_connect (renderer->commandline, "activate", - G_CALLBACK (commandline_action_cb), renderer); - g_signal_connect (renderer->commandline, "captured-event", - G_CALLBACK (commandline_cancel_cb), renderer); - - clutter_stage_set_user_resizable (CLUTTER_STAGE (stage), TRUE); - - if (pp_fullscreen) - pp_set_fullscreen (CLUTTER_STAGE (stage), TRUE); - - renderer->path = pinpoint_file; - if (renderer->path) - { - monitor = g_file_monitor (g_file_new_for_commandline_arg (pinpoint_file), - G_FILE_MONITOR_NONE, NULL, NULL); - g_signal_connect (monitor, "changed", G_CALLBACK (file_changed), - renderer); - } - - renderer->bg_cache = g_hash_table_new_full (g_str_hash, g_str_equal, - NULL, _destroy_surface); -} - -static void -clutter_renderer_run (PinPointRenderer *renderer) -{ - show_slide (CLUTTER_RENDERER (renderer), FALSE); - clutter_main (); -} - -static void -clutter_renderer_finalize (PinPointRenderer *pp_renderer) -{ - ClutterRenderer *renderer = CLUTTER_RENDERER (pp_renderer); - - clutter_actor_destroy (renderer->stage); - g_hash_table_unref (renderer->bg_cache); -} - -static ClutterActor * -_clutter_get_texture (ClutterRenderer *renderer, - const char *file) -{ - ClutterActor *source; - - source = g_hash_table_lookup (renderer->bg_cache, file); - if (source) - { - return clutter_clone_new (source); - } - - source = g_object_new (CLUTTER_TYPE_TEXTURE, - "filename", file, - "load-data-async", TRUE, - NULL); - - if (!source) - return NULL; - - clutter_container_add_actor (CLUTTER_CONTAINER (renderer->stage), source); - clutter_actor_hide (source); - - g_hash_table_insert (renderer->bg_cache, (char *) file, source); - - return clutter_clone_new (source); -} - - -static gboolean -clutter_renderer_make_point (PinPointRenderer *pp_renderer, - PinPointPoint *point) -{ - ClutterRenderer *renderer = CLUTTER_RENDERER (pp_renderer); - ClutterPointData *data = point->data; - ClutterColor color; - gboolean ret; - - switch (point->bg_type) - { - case PP_BG_COLOR: - { - ret = clutter_color_from_string (&color, point->bg); - if (ret) - data->background = g_object_new (CLUTTER_TYPE_RECTANGLE, - "color", &color, - "width", 100.0, - "height", 100.0, - NULL); - } - break; - case PP_BG_IMAGE: - data->background = _clutter_get_texture (renderer, point->bg); - ret = TRUE; - break; - case PP_BG_VIDEO: -#ifdef USE_CLUTTER_GST - data->background = clutter_gst_video_texture_new (); - clutter_media_set_filename (CLUTTER_MEDIA (data->background), point->bg); - /* should pre-roll the video and set the size */ - clutter_actor_set_size (data->background, 400, 300); - ret = TRUE; -#endif - break; - case PP_BG_SVG: -#ifdef USE_DAX - { - ClutterActor *aa, *svg; - GError *error = NULL; - - aa = pp_super_aa_new (); - pp_super_aa_set_resolution (PP_SUPER_AA (aa), 2, 2); - svg = dax_actor_new_from_file (point->bg, &error); - mx_offscreen_set_pick_child (MX_OFFSCREEN (aa), TRUE); - clutter_container_add_actor (CLUTTER_CONTAINER (aa), - svg); - - data->background = aa; - - if (data->background == NULL) - { - g_warning ("Could not open SVG file %s: %s", - point->bg, error->message); - g_clear_error (&error); - } - ret = data->background != NULL; - } -#endif - break; - default: - g_assert_not_reached(); - } - - if (data->background) - { - clutter_container_add_actor (CLUTTER_CONTAINER (renderer->background), - data->background); - clutter_actor_set_opacity (data->background, 0); - } - - clutter_color_from_string (&color, point->text_color); - - if (point->use_markup) - { - data->text = g_object_new (CLUTTER_TYPE_TEXT, - "font-name", point->font, - "text", point->text, - "line-alignment", point->text_align, - "color", &color, - "use-markup", TRUE, - NULL); - } - else - { - data->text = g_object_new (CLUTTER_TYPE_TEXT, - "font-name", point->font, - "text", point->text, - "line-alignment", point->text_align, - "color", &color, - NULL); - } - - clutter_container_add_actor (CLUTTER_CONTAINER (renderer->foreground), - data->text); - - clutter_actor_set_position (data->text, RESTX, renderer->rest_y); - data->rest_y = renderer->rest_y; - renderer->rest_y += clutter_actor_get_height (data->text); - clutter_actor_set_depth (data->text, RESTDEPTH); - - return ret; -} - -static void * -clutter_renderer_allocate_data (PinPointRenderer *renderer) -{ - ClutterPointData *data = g_slice_new0 (ClutterPointData); - data->renderer = renderer; - return data; -} - -static void -clutter_renderer_free_data (PinPointRenderer *renderer, - void *datap) -{ - ClutterPointData *data = datap; - - if (data->background) - clutter_actor_destroy (data->background); - if (data->text) - clutter_actor_destroy (data->text); - if (data->json_slide) - clutter_actor_destroy (data->json_slide); - if (data->script) - g_object_unref (data->script); - g_slice_free (ClutterPointData, data); -} - - - -static gboolean -key_pressed (ClutterActor *actor, - ClutterEvent *event, - ClutterRenderer *renderer) -{ - if (event) /* There is no event for the first triggering */ - switch (clutter_event_get_key_symbol (event)) - { - case CLUTTER_Left: - case CLUTTER_Up: - if (pp_slidep && pp_slidep->prev) - { - leave_slide (renderer, TRUE); - pp_slidep = pp_slidep->prev; - show_slide (renderer, TRUE); - } - break; - case CLUTTER_BackSpace: - case CLUTTER_Prior: - if (pp_slidep && pp_slidep->prev) - { - leave_slide (renderer, TRUE); - pp_slidep = pp_slidep->prev; - show_slide (renderer, TRUE); - } - break; - case CLUTTER_Right: - case CLUTTER_space: - case CLUTTER_Next: - case CLUTTER_Down: - if (pp_slidep && pp_slidep->next) - { - leave_slide (renderer, FALSE); - pp_slidep = pp_slidep->next; - show_slide (renderer, FALSE); - } - break; - case CLUTTER_Escape: - clutter_main_quit (); - break; - case CLUTTER_F11: - pp_set_fullscreen (CLUTTER_STAGE (renderer->stage), - !pp_get_fullscreen (CLUTTER_STAGE (renderer->stage))); - break; - case CLUTTER_Return: - action_slide (renderer); - break; - case CLUTTER_Tab: - activate_commandline (renderer); - break; - } - return TRUE; -} - - -static void leave_slide (ClutterRenderer *renderer, - gboolean backwards) -{ - PinPointPoint *point = pp_slidep->data; - ClutterPointData *data = point->data; - - if (!point->transition) - { - clutter_actor_animate (data->text, - CLUTTER_LINEAR, 2000, - "depth", RESTDEPTH, - "scale-x", 1.0, - "scale-y", 1.0, - "x", RESTX, - "y", data->rest_y, - NULL); - if (data->background) - { - clutter_actor_animate (data->background, - CLUTTER_LINEAR, 1000, - "opacity", 0x0, - NULL); -#ifdef USE_CLUTTER_GST - if (CLUTTER_GST_IS_VIDEO_TEXTURE (data->background)) - { - clutter_media_set_playing (CLUTTER_MEDIA (data->background), FALSE); - } -#endif -#ifdef USE_DAX - if (DAX_IS_ACTOR (data->background)) - { - dax_actor_set_playing (DAX_ACTOR (data->background), FALSE); - } - else if (PP_IS_SUPER_AA (data->background)) - { - ClutterActor *actor; - - actor = mx_offscreen_get_child (MX_OFFSCREEN (data->background)); - dax_actor_set_playing (DAX_ACTOR (actor), FALSE); - } -#endif - } - } - else - { - if (data->script) - { - if (backwards) - clutter_state_set_state (data->state, "pre"); - else - clutter_state_set_state (data->state, "post"); - } - } -} - -static void state_completed (ClutterState *state, gpointer user_data) -{ - PinPointPoint *point = user_data; - ClutterPointData *data = point->data; - const gchar *new_state = clutter_state_get_state (state); - - if (new_state == g_intern_static_string ("post") || - new_state == g_intern_static_string ("pre")) - { - clutter_actor_hide (data->json_slide); - if (data->background2) - { - clutter_actor_reparent (data->text, CLUTTER_RENDERER (data->renderer)->foreground); - - g_object_set (data->text, - "depth", RESTDEPTH, - "scale-x", 1.0, - "scale-y", 1.0, - "x", RESTX, - "y", data->rest_y, - NULL); - clutter_actor_set_opacity (data->background, 0); - } - } -} - -static void -action_slide (ClutterRenderer *renderer) -{ - PinPointPoint *point; - ClutterPointData *data; - const char *command = NULL; - - if (!pp_slidep) - return; - - point = pp_slidep->data; - data = point->data; - - if (data->state) - clutter_state_set_state (data->state, "action"); - - command = clutter_text_get_text (CLUTTER_TEXT (renderer->commandline)); - if (command && *command) - { - char *tmp = g_strdup_printf ("%s &", command); - g_print ("running: %s\n", tmp); - system (tmp); - g_free (tmp); - } -} - -static gchar *pp_lookup_transition (const gchar *transition) -{ - int i; - gchar *dirs[] ={ "", "./transitions/", PKGDATADIR, NULL}; - for (i = 0; dirs[i]; i++) - { - gchar *path = g_strdup_printf ("%s%s.json", dirs[i], transition); - if (g_file_test (path, G_FILE_TEST_EXISTS)) - return path; - g_free (path); - } - return NULL; -} - - -static void update_commandline_shading (ClutterRenderer *renderer) -{ - ClutterColor color; - float text_x, text_y, text_width, text_height; - float shading_x, shading_y, shading_width, shading_height; - const char *command; - PinPointPoint *point; - point = pp_slidep->data; - clutter_actor_get_size (renderer->commandline, &text_width, &text_height); - clutter_actor_get_position (renderer->commandline, &text_x, &text_y); - pp_get_shading_position_size (clutter_actor_get_width (renderer->stage), - clutter_actor_get_height (renderer->stage), - text_x, text_y, - text_width, text_height, - 1.0, - &shading_x, &shading_y, - &shading_width, &shading_height); - - clutter_color_from_string (&color, point->shading_color); - g_object_set (renderer->commandline_shading, - "x", shading_x, - "y", shading_y, - NULL); - command = clutter_text_get_text (CLUTTER_TEXT (renderer->commandline)); - clutter_actor_animate (renderer->commandline_shading, - CLUTTER_EASE_OUT_QUINT, 1000, - "opacity", command && *command?(int)(point->shading_opacity*255*0.33):0, - "color", &color, - "width", shading_width, - "height", shading_height, - NULL); - } - -static void -show_slide (ClutterRenderer *renderer, gboolean backwards) -{ - PinPointPoint *point; - ClutterPointData *data; - ClutterColor color; - - if (!pp_slidep) - return; - - point = pp_slidep->data; - data = point->data; - - if (point->stage_color) - { - clutter_color_from_string (&color, point->stage_color); - clutter_stage_set_color (CLUTTER_STAGE (renderer->stage), &color); - } - - if (data->background) - { - float bg_x, bg_y, bg_width, bg_height, bg_scale; - if (CLUTTER_IS_RECTANGLE (data->background)) - { - clutter_actor_get_size (renderer->stage, &bg_width, &bg_height); - clutter_actor_set_size (data->background, bg_width, bg_height); - } - else - { - clutter_actor_get_size (data->background, &bg_width, &bg_height); - } - - pp_get_background_position_scale (point, - clutter_actor_get_width (renderer->stage), - clutter_actor_get_height (renderer->stage), - bg_width, bg_height, - &bg_x, &bg_y, &bg_scale); - - clutter_actor_set_scale (data->background, bg_scale, bg_scale); - clutter_actor_set_position (data->background, bg_x, bg_y); - -#ifdef USE_CLUTTER_GST - if (CLUTTER_GST_IS_VIDEO_TEXTURE (data->background)) - { - clutter_media_set_progress (CLUTTER_MEDIA (data->background), 0.0); - clutter_media_set_playing (CLUTTER_MEDIA (data->background), TRUE); - } - else -#endif -#ifdef USE_DAX - if (DAX_IS_ACTOR (data->background)) - { - dax_actor_set_playing (DAX_ACTOR (data->background), TRUE); - } - else if (PP_IS_SUPER_AA (data->background)) - { - ClutterActor *actor; - - actor = mx_offscreen_get_child (MX_OFFSCREEN (data->background)); - dax_actor_set_playing (DAX_ACTOR (actor), TRUE); - } - else -#endif - { - } - } - - if (!point->transition) - { - clutter_actor_animate (renderer->foreground, - CLUTTER_LINEAR, 500, - "opacity", 255, - NULL); - clutter_actor_animate (renderer->midground, - CLUTTER_LINEAR, 500, - "opacity", 255, - NULL); - clutter_actor_animate (renderer->background, - CLUTTER_LINEAR, 500, - "opacity", 255, - NULL); - - - if (point->text && *point->text) - { - float text_x, text_y, text_width, text_height, text_scale; - float shading_x, shading_y, shading_width, shading_height; - - clutter_actor_get_size (data->text, &text_width, &text_height); - pp_get_text_position_scale (point, - clutter_actor_get_width (renderer->stage), - clutter_actor_get_height (renderer->stage), - text_width, text_height, - &text_x, &text_y, - &text_scale); - pp_get_shading_position_size (clutter_actor_get_width (renderer->stage), - clutter_actor_get_height (renderer->stage), - text_x, text_y, - text_width, text_height, - text_scale, - &shading_x, &shading_y, - &shading_width, &shading_height); - clutter_color_from_string (&color, point->shading_color); - - clutter_actor_animate (data->text, - CLUTTER_EASE_OUT_QUINT, 1000, - "depth", 0.0, - "scale-x", text_scale, - "scale-y", text_scale, - "x", text_x, - "y", text_y, - NULL); - - clutter_actor_animate (renderer->shading, - CLUTTER_EASE_OUT_QUINT, 1000, - "x", shading_x, - "y", shading_y, - "opacity", (int)(point->shading_opacity*255), - "color", &color, - "width", shading_width, - "height", shading_height, - NULL); - } - else - { - clutter_actor_animate (renderer->shading, - CLUTTER_LINEAR, 500, - "opacity", 0, - "width", 0, - "height", 0, - NULL); - } - - - if (data->background) - clutter_actor_animate (data->background, - CLUTTER_LINEAR, 1000, - "opacity", 0xff, - NULL); - } - else - { - GError *error = NULL; - /* fade out global group of texts when using a custom .json template */ - clutter_actor_animate (renderer->foreground, - CLUTTER_LINEAR, 500, - "opacity", 0, - NULL); - clutter_actor_animate (renderer->midground, - CLUTTER_LINEAR, 500, - "opacity", 0, - NULL); - clutter_actor_animate (renderer->background, - CLUTTER_LINEAR, 500, - "opacity", 0, - NULL); - if (!data->script) - { - gchar *path = pp_lookup_transition (point->transition); - data->script = clutter_script_new (); - clutter_script_load_from_file (data->script, path, &error); - g_free (path); - data->foreground = CLUTTER_ACTOR (clutter_script_get_object (data->script, "foreground")); - data->midground = CLUTTER_ACTOR (clutter_script_get_object (data->script, "midground")); - data->background2 = CLUTTER_ACTOR (clutter_script_get_object (data->script, "background")); - data->state = CLUTTER_STATE (clutter_script_get_object (data->script, "state")); - data->json_slide = CLUTTER_ACTOR (clutter_script_get_object (data->script, "actor")); - clutter_container_add_actor (CLUTTER_CONTAINER (renderer->json_layer), data->json_slide); - g_signal_connect (data->state, "completed", G_CALLBACK (state_completed), point); - clutter_state_warp_to_state (data->state, "pre"); - - if (data->background2) /* parmanently steal background */ - { - clutter_actor_reparent (data->background, data->background2); - } - } - clutter_actor_set_size (data->json_slide, clutter_actor_get_width (renderer->stage), - clutter_actor_get_height (renderer->stage)); - - clutter_actor_set_size (data->foreground, clutter_actor_get_width (renderer->stage), - clutter_actor_get_height (renderer->stage)); - - clutter_actor_set_size (data->background2, clutter_actor_get_width (renderer->stage), - clutter_actor_get_height (renderer->stage)); - if (!data->json_slide) - { - g_warning ("failed to load transition %s %s\n", point->transition, error?error->message:""); - return; - } - if (data->foreground) - { - clutter_actor_reparent (data->text, data->foreground); - } - clutter_actor_set_opacity (data->background, 255); - - { - float text_x, text_y, text_width, text_height, text_scale; - - clutter_actor_get_size (data->text, &text_width, &text_height); - pp_get_text_position_scale (point, - clutter_actor_get_width (renderer->stage), - clutter_actor_get_height (renderer->stage), - text_width, text_height, - &text_x, &text_y, - &text_scale); - g_object_set (data->text, - "depth", 0.0, - "scale-x", text_scale, - "scale-y", text_scale, - "x", text_x, - "y", text_y, - NULL); - - - if (clutter_actor_get_width (data->text) > 1.0) - { - ClutterColor color; - float shading_x, shading_y, shading_width, shading_height; - clutter_color_from_string (&color, point->shading_color); - - - pp_get_shading_position_size (clutter_actor_get_width (renderer->stage), - clutter_actor_get_height (renderer->stage), - text_x, text_y, - text_width, text_height, - text_scale, - &shading_x, &shading_y, - &shading_width, &shading_height); - if (!data->shading) - { - data->shading = clutter_rectangle_new_with_color (&black); - clutter_container_add_actor (CLUTTER_CONTAINER (data->midground), data->shading); - clutter_actor_set_size (data->midground, clutter_actor_get_width (renderer->stage), - clutter_actor_get_height (renderer->stage)); - } - g_object_set (data->shading, - "depth", -0.01, - "x", shading_x, - "y", shading_y, - "opacity", (int)(point->shading_opacity*255), - "color", &color, - "width", shading_width, - "height", shading_height, - NULL); - } - else /* no text, fade out shading */ - if (data->shading) - g_object_set (data->shading, "opacity", 0, NULL); - if (data->foreground) - { - clutter_actor_reparent (data->text, data->foreground); - } - } - - if (!backwards) - clutter_actor_raise_top (data->json_slide); - clutter_actor_show (data->json_slide); - clutter_state_set_state (data->state, "show"); - } - - - /* render potentially executed commands */ - { - float text_x, text_y, text_width, text_height; - - clutter_color_from_string (&color, point->text_color); - g_object_set (renderer->commandline, - "font-name", point->font, - "text", point->command?point->command:"", - "color", &color, - NULL); - color.alpha *= 0.33; - g_object_set (renderer->commandline, - "selection-color", &color, - NULL); - - clutter_actor_get_size (renderer->commandline, &text_width, &text_height); - if (point->position == CLUTTER_GRAVITY_SOUTH || - point->position == CLUTTER_GRAVITY_SOUTH_WEST) - text_y = clutter_actor_get_height (renderer->stage) * 0.05; - else - text_y = clutter_actor_get_height (renderer->stage) * 0.95 - text_height; - text_x = clutter_actor_get_width (renderer->stage) * 0.05; - - - g_object_set (renderer->commandline, - "x", text_x, - "y", text_y, - NULL); - clutter_actor_animate (renderer->commandline, - CLUTTER_EASE_OUT_QUINT, 1000, - "opacity", point->command?(gint)(0xff*0.33):0, - NULL); - - update_commandline_shading (renderer); - } -} - - -static void -stage_resized (ClutterActor *actor, - GParamSpec *pspec, - ClutterRenderer *renderer) -{ - show_slide (renderer, FALSE); /* redisplay the current slide */ -} - -static guint reload_tag = 0; - -static gboolean -reload (gpointer data) -{ - ClutterRenderer *renderer = data; - char *text = NULL; - if (!g_file_get_contents (renderer->path, &text, NULL, NULL)) - g_error ("failed to load slides from %s\n", renderer->path); - renderer->rest_y = STARTPOS; - pp_parse_slides (PINPOINT_RENDERER (renderer), text); - g_free (text); - show_slide(renderer, FALSE); - reload_tag = 0; - return FALSE; -} - -static void -file_changed (GFileMonitor *monitor, - GFile *file, - GFile *other_file, - GFileMonitorEvent event_type, - ClutterRenderer *renderer) -{ - if (reload_tag) - g_source_remove (reload_tag); - reload_tag = g_timeout_add (200, reload, renderer); -} - -static ClutterRenderer clutter_renderer_vtable = -{ - .renderer = - { - .init = clutter_renderer_init, - .run = clutter_renderer_run, - .finalize = clutter_renderer_finalize, - .make_point = clutter_renderer_make_point, - .allocate_data = clutter_renderer_allocate_data, - .free_data = clutter_renderer_free_data - } -}; - -PinPointRenderer *pp_clutter_renderer (void) -{ - return (void*)&clutter_renderer_vtable; -} diff --git a/pinpoint/pp-super-aa.c b/pinpoint/pp-super-aa.c deleted file mode 100644 index eab6ffe..0000000 --- a/pinpoint/pp-super-aa.c +++ b/dev/null @@ -1,168 +0,0 @@ -/* pp-super-aa.c */ - -#include "pp-super-aa.h" - -G_DEFINE_TYPE (PPSuperAA, pp_super_aa, MX_TYPE_OFFSCREEN) - -#define SUPER_AA_PRIVATE(o) \ - (G_TYPE_INSTANCE_GET_PRIVATE ((o), PP_TYPE_SUPER_AA, PPSuperAAPrivate)) - -struct _PPSuperAAPrivate -{ - gfloat x_res; - gfloat y_res; -}; - -enum -{ - PROP_0, - - PROP_X_RES, - PROP_Y_RES -}; - -static void -pp_super_aa_get_property (GObject *object, - guint property_id, - GValue *value, - GParamSpec *pspec) -{ - PPSuperAA *self = PP_SUPER_AA (object); - - switch (property_id) - { - case PROP_X_RES: - g_value_set_float (value, self->priv->x_res); - break; - - case PROP_Y_RES: - g_value_set_float (value, self->priv->y_res); - break; - - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - } -} - -static void -pp_super_aa_set_property (GObject *object, - guint property_id, - const GValue *value, - GParamSpec *pspec) -{ - PPSuperAA *self = PP_SUPER_AA (object); - - switch (property_id) - { - case PROP_X_RES: - self->priv->x_res = g_value_get_float (value); - clutter_actor_queue_redraw (CLUTTER_ACTOR (object)); - break; - - case PROP_Y_RES: - self->priv->y_res = g_value_get_float (value); - clutter_actor_queue_redraw (CLUTTER_ACTOR (object)); - break; - - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - } -} - -static void -pp_super_aa_dispose (GObject *object) -{ - G_OBJECT_CLASS (pp_super_aa_parent_class)->dispose (object); -} - -static void -pp_super_aa_finalize (GObject *object) -{ - G_OBJECT_CLASS (pp_super_aa_parent_class)->finalize (object); -} - -static void -pp_super_aa_paint (ClutterActor *actor) -{ - CoglHandle texture; - gfloat width, height; - - PPSuperAAPrivate *priv = PP_SUPER_AA (actor)->priv; - - clutter_actor_get_size (actor, &width, &height); - texture = clutter_texture_get_cogl_texture (CLUTTER_TEXTURE (actor)); - - if (!texture || - (cogl_texture_get_width (texture) != (guint)(width * priv->x_res)) || - (cogl_texture_get_height (texture) != (guint)(height * priv->y_res))) - { - texture = cogl_texture_new_with_size ((guint)(width * priv->x_res), - (guint)(height * priv->y_res), - COGL_TEXTURE_NO_SLICING, - COGL_PIXEL_FORMAT_RGBA_8888_PRE); - clutter_texture_set_cogl_texture (CLUTTER_TEXTURE (actor), texture); - cogl_handle_unref (texture); - } - - CLUTTER_ACTOR_CLASS (pp_super_aa_parent_class)->paint (actor); -} - -static void -pp_super_aa_paint_child (MxOffscreen *offscreen) -{ - PPSuperAAPrivate *priv = PP_SUPER_AA (offscreen)->priv; - - cogl_scale (priv->x_res, priv->y_res, 1.0); - - MX_OFFSCREEN_CLASS (pp_super_aa_parent_class)->paint_child (offscreen); -} - -static void -pp_super_aa_class_init (PPSuperAAClass *klass) -{ - GObjectClass *object_class = G_OBJECT_CLASS (klass); - ClutterActorClass *actor_class = CLUTTER_ACTOR_CLASS (klass); - MxOffscreenClass *offscreen_class = MX_OFFSCREEN_CLASS (klass); - - g_type_class_add_private (klass, sizeof (PPSuperAAPrivate)); - - object_class->get_property = pp_super_aa_get_property; - object_class->set_property = pp_super_aa_set_property; - object_class->dispose = pp_super_aa_dispose; - object_class->finalize = pp_super_aa_finalize; - - actor_class->paint = pp_super_aa_paint; - - offscreen_class->paint_child = pp_super_aa_paint_child; -} - -static void -pp_super_aa_init (PPSuperAA *self) -{ - self->priv = SUPER_AA_PRIVATE (self); - clutter_texture_set_sync_size (CLUTTER_TEXTURE (self), FALSE); -} - -ClutterActor * -pp_super_aa_new (void) -{ - return g_object_new (PP_TYPE_SUPER_AA, NULL); -} - -void -pp_super_aa_set_resolution (PPSuperAA *aa, gfloat x_res, gfloat y_res) -{ - aa->priv->x_res = x_res; - aa->priv->y_res = y_res; - clutter_actor_queue_redraw (CLUTTER_ACTOR (aa)); -} - -void -pp_super_aa_get_resolution (PPSuperAA *aa, gfloat *x_res, gfloat *y_res) -{ - if (x_res) - *x_res = aa->priv->x_res; - if (y_res) - *y_res = aa->priv->y_res; -} - diff --git a/pinpoint/pp-super-aa.h b/pinpoint/pp-super-aa.h deleted file mode 100644 index 3394e6c..0000000 --- a/pinpoint/pp-super-aa.h +++ b/dev/null @@ -1,58 +0,0 @@ -/* pp-super-aa.h */ - -#ifndef _PP_SUPER_AA_H -#define _PP_SUPER_AA_H - -#include <glib-object.h> -#include <mx/mx.h> - -G_BEGIN_DECLS - -#define PP_TYPE_SUPER_AA pp_super_aa_get_type() - -#define PP_SUPER_AA(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ - PP_TYPE_SUPER_AA, PPSuperAA)) - -#define PP_SUPER_AA_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST ((klass), \ - PP_TYPE_SUPER_AA, PPSuperAAClass)) - -#define PP_IS_SUPER_AA(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \ - PP_TYPE_SUPER_AA)) - -#define PP_IS_SUPER_AA_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE ((klass), \ - PP_TYPE_SUPER_AA)) - -#define PP_SUPER_AA_GET_CLASS(obj) \ - (G_TYPE_INSTANCE_GET_CLASS ((obj), \ - PP_TYPE_SUPER_AA, PPSuperAAClass)) - -typedef struct _PPSuperAA PPSuperAA; -typedef struct _PPSuperAAClass PPSuperAAClass; -typedef struct _PPSuperAAPrivate PPSuperAAPrivate; - -struct _PPSuperAA -{ - MxOffscreen parent; - - PPSuperAAPrivate *priv; -}; - -struct _PPSuperAAClass -{ - MxOffscreenClass parent_class; -}; - -GType pp_super_aa_get_type (void) G_GNUC_CONST; - -ClutterActor *pp_super_aa_new (); - -void pp_super_aa_set_resolution (PPSuperAA *aa, gfloat x_res, gfloat y_res); -void pp_super_aa_get_resolution (PPSuperAA *aa, gfloat *x_res, gfloat *y_res); - -G_END_DECLS - -#endif /* _PP_SUPER_AA_H */ diff --git a/pinpoint/transitions/Makefile.am b/pinpoint/transitions/Makefile.am deleted file mode 100644 index 6b40e9f..0000000 --- a/pinpoint/transitions/Makefile.am +++ b/dev/null @@ -1,2 +0,0 @@ -transitionsdir = $(pkgdatadir) -transitions_DATA = $(wildcard $(srcdir)/*.json) diff --git a/pinpoint/transitions/action.json b/pinpoint/transitions/action.json deleted file mode 100644 index 9148a9c..0000000 --- a/pinpoint/transitions/action.json +++ b/dev/null @@ -1,65 +0,0 @@ -[{ - "type":"ClutterGroup", - "id":"actor", - "rotation-center-z-gravity":"center", - "scale-gravity":"center", - "children":[ - { - "id":"background", - "type":"ClutterGroup", - "rotation-center-z-gravity":"center", - "scale-gravity":"center" - }, - { - "type":"ClutterGroup", - "depth":20.0, - "children":[ - { - "id":"midground", - "type":"ClutterGroup", - "rotation-center-z-gravity":"center", - "scale-gravity":"center" - }]}, - { - "id":"foreground", - "depth":30.0, - "type":"ClutterGroup", - "rotation-center-z-gravity":"center", - "scale-gravity":"center", - "children":[ - {"type":"ClutterRectangle", "id":"rect", - "color":"red", "width":100, "height":100, "opacity":0} - ] - } - ]} - ,{ - "type":"ClutterState", - "id":"state", - "duration":1000, - "transitions":[ - { - "source":null, - "target":"pre", - "keys": [["actor", "x", "linear", 1024]] - }, - { - "source":null, - "target":"show", - "keys": [["actor", "x", "linear", 0]] - }, - { - "source":null, - "target":"action", - "keys": [["actor", "depth", "linear", -200.0], - ["rect", "opacity", "linear", 255], - ["rect", "x", "linear", 100], - ["rect", "y", "linear", 100], - ["actor", "x", "linear", 0]] - }, - { - "source":null, - "target":"post", - "keys": [["actor", "x", "linear", -1024]] - } - ]} -] diff --git a/pinpoint/transitions/fade.json b/pinpoint/transitions/fade.json deleted file mode 100644 index 354fa73..0000000 --- a/pinpoint/transitions/fade.json +++ b/dev/null @@ -1,50 +0,0 @@ -[{ - "type":"ClutterGroup", - "id":"actor", - "rotation-center-z-gravity":"center", - "scale-gravity":"center", - "children":[ - { - "id":"background", - "type":"ClutterGroup", - "rotation-center-z-gravity":"center", - "scale-gravity":"center" - }, - { - "type":"ClutterGroup", - "children":[ - { - "id":"midground", - "type":"ClutterGroup", - "rotation-center-z-gravity":"center", - "scale-gravity":"center" - }]}, - { - "id":"foreground", - "type":"ClutterGroup", - "rotation-center-z-gravity":"center", - "scale-gravity":"center" - } - ]} - ,{ - "type":"ClutterState", - "id":"state", - "duration":800, - "transitions":[ - { - "source":null, - "target":"pre", - "keys": [["actor", "opacity", "linear", 0]] - }, - { - "source":null, - "target":"show", - "keys": [["actor", "opacity", "linear", 255]] - }, - { - "source":null, - "target":"post", - "keys": [["actor", "opacity", "linear", 0]] - } - ]} -] diff --git a/pinpoint/transitions/page-curl-both.json b/pinpoint/transitions/page-curl-both.json deleted file mode 100644 index f4ba4cf..0000000 --- a/pinpoint/transitions/page-curl-both.json +++ b/dev/null @@ -1,63 +0,0 @@ -[ -{ - "type":"ClutterGroup", - "id":"actor", - "rotation-center-z-gravity":"center", - "scale-gravity":"center", - "children":[ - { - "id":"background", - "type":"ClutterGroup", - "rotation-center-z-gravity":"center", - "scale-gravity":"center" - }, - { - "type":"ClutterGroup", - "depth":20.0, - "children":[ - { - "id":"midground", - "type":"ClutterGroup", - "rotation-center-z-gravity":"center", - "scale-gravity":"center" - }]}, - { - "id":"foreground", - "depth":30.0, - "type":"ClutterGroup", - "rotation-center-z-gravity":"center", - "scale-gravity":"center" - } - ], - "effects":[ - { - "id":"page-turn", - "type":"ClutterPageTurnEffect", - "period":0.0, - "radius":50.0, - "angle":15.0 - } - - ]} - ,{ - "type":"ClutterState", - "id":"state", - "duration":1000, - "transitions":[ - { - "source":null, - "target":"pre", - "keys": [["page-turn", "period", "linear", 1.0]] - }, - { - "source":null, - "target":"show", - "keys": [["page-turn", "period", "linear", 0.0]] - }, - { - "source":null, - "target":"post", - "keys": [["page-turn", "period", "linear", 1.0]] - } - ]} -] diff --git a/pinpoint/transitions/page-curl.json b/pinpoint/transitions/page-curl.json deleted file mode 100644 index cdb7b97..0000000 --- a/pinpoint/transitions/page-curl.json +++ b/dev/null @@ -1,64 +0,0 @@ -[ -{ - "type":"ClutterGroup", - "id":"actor", - "rotation-center-z-gravity":"center", - "scale-gravity":"center", - "children":[ - { - "id":"background", - "type":"ClutterGroup", - "rotation-center-z-gravity":"center", - "scale-gravity":"center", - "depth":120.0 - }, - { - "type":"ClutterGroup", - "depth":20.0, - "children":[ - { - "id":"midground", - "type":"ClutterGroup", - "rotation-center-z-gravity":"center", - "scale-gravity":"center" - }]}, - { - "id":"foreground", - "depth":30.0, - "type":"ClutterGroup", - "rotation-center-z-gravity":"center", - "scale-gravity":"center" - } - ], - "effects":[ - { - "id":"page-turn", - "type":"ClutterPageTurnEffect", - "period":0.0, - "radius":50.0, - "angle":0.0 - } - - ]} - ,{ - "type":"ClutterState", - "id":"state", - "duration":2000, - "transitions":[ - { - "source":null, - "target":"pre", - "keys": [["page-turn", "period", "linear", 0.0]] - }, - { - "source":null, - "target":"show", - "keys": [["page-turn", "period", "linear", 0.0]] - }, - { - "source":null, - "target":"post", - "keys": [["page-turn", "period", "linear", 1.0]] - } - ]} -] diff --git a/pinpoint/transitions/sheet.json b/pinpoint/transitions/sheet.json deleted file mode 100644 index 8234020..0000000 --- a/pinpoint/transitions/sheet.json +++ b/dev/null @@ -1,58 +0,0 @@ -[{ - "type":"ClutterGroup", - "id":"actor", - "rotation-center-z-gravity":"center", - "scale-gravity":"center", - "children":[ - { - "id":"background", - "type":"ClutterGroup", - "rotation-center-z-gravity":"center", - "scale-gravity":"center" - }, - { - "type":"ClutterGroup", - "depth":20.0, - "children":[ - { - "id":"midground", - "type":"ClutterGroup", - "rotation-center-z-gravity":"center", - "scale-gravity":"center" - }]}, - { - "id":"foreground", - "depth":30.0, - "type":"ClutterGroup", - "rotation-center-z-gravity":"center", - "scale-gravity":"center" - } - ]} - ,{ - "type":"ClutterState", - "id":"state", - "duration":1000, - "transitions":[ - { - "source":null, - "target":"pre", - "keys": [["actor", "rotation-angle-x", "linear", 90.0], - ["actor", "y", "linear", 0.0], - ["actor", "opacity", "linear", 0]] - }, - { - "source":null, - "target":"show", - "keys": [["actor", "rotation-angle-x", "linear", 0.0], - ["actor", "y", "linear", 0.0], - ["actor", "opacity", "linear", 255]] - }, - { - "source":null, - "target":"post", - "keys": [["actor", "rotation-angle-x", "linear", 0.0], - ["actor", "y", "linear", 1024.0], - ["actor", "opacity", "linear", 0]] - } - ]} -] diff --git a/pinpoint/transitions/slide-in-left.json b/pinpoint/transitions/slide-in-left.json deleted file mode 100644 index c0fd56f..0000000 --- a/pinpoint/transitions/slide-in-left.json +++ b/dev/null @@ -1,55 +0,0 @@ -[{ - "type":"ClutterGroup", - "id":"actor", - "rotation-center-z-gravity":"center", - "scale-gravity":"center", - "children":[ - { - "id":"background", - "type":"ClutterGroup", - "rotation-center-z-gravity":"center", - "scale-gravity":"center" - }, - { - "type":"ClutterGroup", - "depth":20.0, - "children":[ - { - "id":"midground", - "type":"ClutterGroup", - "rotation-center-z-gravity":"center", - "scale-gravity":"center" - }]}, - { - "id":"foreground", - "depth":30.0, - "type":"ClutterGroup", - "rotation-center-z-gravity":"center", - "scale-gravity":"center" - } - ]} - ,{ - "type":"ClutterState", - "id":"state", - "duration":1000, - "transitions":[ - { - "source":null, - "target":"pre", - "keys": [["actor", "x", "linear", 1024], - ["actor", "opacity", "linear", 0]] - }, - { - "source":null, - "target":"show", - "keys": [["actor", "x", "linear", 0], - ["actor", "opacity", "linear", 255]] - }, - { - "source":null, - "target":"post", - "keys": [["actor", "x", "linear", 0], - ["actor", "opacity", "linear", 0]] - } - ]} -] diff --git a/pinpoint/transitions/slide-left.json b/pinpoint/transitions/slide-left.json deleted file mode 100644 index 9622511..0000000 --- a/pinpoint/transitions/slide-left.json +++ b/dev/null @@ -1,52 +0,0 @@ -[{ - "type":"ClutterGroup", - "id":"actor", - "rotation-center-z-gravity":"center", - "scale-gravity":"center", - "children":[ - { - "id":"background", - "type":"ClutterGroup", - "rotation-center-z-gravity":"center", - "scale-gravity":"center" - }, - { - "type":"ClutterGroup", - "depth":20.0, - "children":[ - { - "id":"midground", - "type":"ClutterGroup", - "rotation-center-z-gravity":"center", - "scale-gravity":"center" - }]}, - { - "id":"foreground", - "depth":30.0, - "type":"ClutterGroup", - "rotation-center-z-gravity":"center", - "scale-gravity":"center" - } - ]} - ,{ - "type":"ClutterState", - "id":"state", - "duration":1000, - "transitions":[ - { - "source":null, - "target":"pre", - "keys": [["actor", "x", "linear", 1024]] - }, - { - "source":null, - "target":"show", - "keys": [["actor", "x", "linear", 0]] - }, - { - "source":null, - "target":"post", - "keys": [["actor", "x", "linear", -1024]] - } - ]} -] diff --git a/pinpoint/transitions/slide-up.json b/pinpoint/transitions/slide-up.json deleted file mode 100644 index b1097a3..0000000 --- a/pinpoint/transitions/slide-up.json +++ b/dev/null @@ -1,52 +0,0 @@ -[{ - "type":"ClutterGroup", - "id":"actor", - "rotation-center-z-gravity":"center", - "scale-gravity":"center", - "children":[ - { - "id":"background", - "type":"ClutterGroup", - "rotation-center-z-gravity":"center", - "scale-gravity":"center" - }, - { - "type":"ClutterGroup", - "depth":20.0, - "children":[ - { - "id":"midground", - "type":"ClutterGroup", - "rotation-center-z-gravity":"center", - "scale-gravity":"center" - }]}, - { - "id":"foreground", - "depth":30.0, - "type":"ClutterGroup", - "rotation-center-z-gravity":"center", - "scale-gravity":"center" - } - ]} - ,{ - "type":"ClutterState", - "id":"state", - "duration":1000, - "transitions":[ - { - "source":null, - "target":"pre", - "keys": [["actor", "y", "linear", 1024]] - }, - { - "source":null, - "target":"show", - "keys": [["actor", "y", "linear", 0]] - }, - { - "source":null, - "target":"post", - "keys": [["actor", "y", "linear", -1024]] - } - ]} -] diff --git a/pinpoint/transitions/spin-bg.json b/pinpoint/transitions/spin-bg.json deleted file mode 100644 index 84f45ea..0000000 --- a/pinpoint/transitions/spin-bg.json +++ b/dev/null @@ -1,61 +0,0 @@ -[{ - "type":"ClutterGroup", - "id":"actor", - "rotation-center-z-gravity":"center", - "scale-gravity":"center", - "children":[ - { - "id":"background", - "type":"ClutterGroup", - "rotation-center-z-gravity":"center", - "scale-gravity":"center" - }, - { - "type":"ClutterGroup", - "depth":20.0, - "children":[ - { - "id":"midground", - "type":"ClutterGroup", - "rotation-center-z-gravity":"center", - "scale-gravity":"center" - }]}, - { - "id":"foreground", - "depth":30.0, - "type":"ClutterGroup", - "rotation-center-z-gravity":"center", - "scale-gravity":"center" - } - ]} - ,{ - "type":"ClutterState", - "id":"state", - "duration":800, - "transitions":[ - { - "source":null, - "target":"pre", - "keys": [["actor", "rotation-angle-z", "linear", -360.0], - ["actor", "scale-x", "linear", 0.01], - ["actor", "scale-y", "linear", 0.01], - ["actor", "opacity", "linear", 0]] - }, - { - "source":null, - "target":"show", - "keys": [["actor", "rotation-angle-z", "linear", 0.0], - ["actor", "scale-x", "linear", 1.0], - ["actor", "scale-y", "linear", 1.0], - ["actor", "opacity", "linear", 255]] - }, - { - "source":null, - "target":"post", - "keys": [["actor", "rotation-angle-z", "linear", 360.0], - ["actor", "scale-x", "linear", 4.0], - ["actor", "scale-y", "linear", 4.0], - ["actor", "opacity", "linear", 0]] - } - ]} -] diff --git a/pinpoint/transitions/spin-text.json b/pinpoint/transitions/spin-text.json deleted file mode 100644 index bf7f970..0000000 --- a/pinpoint/transitions/spin-text.json +++ b/dev/null @@ -1,73 +0,0 @@ -[{ - "type":"ClutterGroup", - "id":"actor", - "rotation-center-z-gravity":"center", - "scale-gravity":"center", - "children":[ - { - "id":"background", - "type":"ClutterGroup", - "rotation-center-z-gravity":"center", - "scale-gravity":"center" - }, - { - "type":"ClutterGroup", - "depth":20.0, - "children":[ - { - "id":"midground", - "type":"ClutterGroup", - "rotation-center-z-gravity":"center", - "scale-gravity":"center" - }]}, - { - "id":"foreground", - "depth":30.0, - "type":"ClutterGroup", - "rotation-center-z-gravity":"center", - "scale-gravity":"center" - } - ]} - ,{ - "type":"ClutterState", - "id":"state", - "duration":800, - "transitions":[ - { - "source":null, - "target":"pre", - "keys": [ - ["foreground", "rotation-angle-z", "linear", -360.0], - ["foreground", "scale-x", "linear", 0.01], - ["foreground", "scale-y", "linear", 0.01], - ["midground", "rotation-angle-z", "linear", -360.0], - ["midground", "scale-x", "linear", 0.01], - ["midground", "scale-y", "linear", 0.01], - ["actor", "opacity", "linear", 0]] - }, - { - "source":null, - "target":"show", - "keys": [ - ["foreground", "rotation-angle-z", "linear", 0.0], - ["foreground", "scale-x", "linear", 1.0], - ["foreground", "scale-y", "linear", 1.0], - ["midground", "rotation-angle-z", "linear", 0.0], - ["midground", "scale-x", "linear", 1.0], - ["midground", "scale-y", "linear", 1.0], - ["actor", "opacity", "linear", 255]] - }, - { - "source":null, - "target":"post", - "keys": [ - ["foreground", "rotation-angle-z", "linear", 360.0], - ["foreground", "scale-x", "linear", 4.0], - ["foreground", "scale-y", "linear", 4.0], - ["midground", "rotation-angle-z", "linear", 360.0], - ["midground", "scale-x", "linear", 4.0], - ["midground", "scale-y", "linear", 4.0], - ["actor", "opacity", "linear", 0]] - } - ]} -] diff --git a/pinpoint/transitions/spin.json b/pinpoint/transitions/spin.json deleted file mode 100644 index 0b0c3a8..0000000 --- a/pinpoint/transitions/spin.json +++ b/dev/null @@ -1,61 +0,0 @@ -[{ - "type":"ClutterGroup", - "id":"actor", - "rotation-center-z-gravity":"center", - "scale-gravity":"center", - "children":[ - { - "id":"background", - "type":"ClutterGroup", - "rotation-center-z-gravity":"center", - "scale-gravity":"center" - }, - { - "type":"ClutterGroup", - "depth":20.0, - "children":[ - { - "id":"midground", - "type":"ClutterGroup", - "rotation-center-z-gravity":"center", - "scale-gravity":"center" - }]}, - { - "id":"foreground", - "depth":30.0, - "type":"ClutterGroup", - "rotation-center-z-gravity":"center", - "scale-gravity":"center" - } - ]} - ,{ - "type":"ClutterState", - "id":"state", - "duration":800, - "transitions":[ - { - "source":null, - "target":"pre", - "keys": [["background", "rotation-angle-z", "linear", -360.0], - ["background", "scale-x", "linear", 0.01], - ["background", "scale-y", "linear", 0.01], - ["actor", "opacity", "linear", 0]] - }, - { - "source":null, - "target":"show", - "keys": [["background", "rotation-angle-z", "linear", 0.0], - ["background", "scale-x", "linear", 1.0], - ["background", "scale-y", "linear", 1.0], - ["actor", "opacity", "linear", 255]] - }, - { - "source":null, - "target":"post", - "keys": [["background", "rotation-angle-z", "linear", 360.0], - ["background", "scale-x", "linear", 4.0], - ["background", "scale-y", "linear", 4.0], - ["actor", "opacity", "linear", 0]] - } - ]} -] diff --git a/pinpoint/transitions/swing.json b/pinpoint/transitions/swing.json deleted file mode 100644 index b95a0dd..0000000 --- a/pinpoint/transitions/swing.json +++ b/dev/null @@ -1,61 +0,0 @@ -[{ - "type":"ClutterGroup", - "id":"actor", - "rotation-center-z-gravity":"center", - "scale-gravity":"center", - "children":[ - { - "id":"background", - "type":"ClutterGroup", - "rotation-center-z-gravity":"center", - "scale-gravity":"center" - }, - { - "type":"ClutterGroup", - "depth":20.0, - "children":[ - { - "id":"midground", - "type":"ClutterGroup", - "rotation-center-z-gravity":"center", - "scale-gravity":"center" - }]}, - { - "id":"foreground", - "depth":30.0, - "type":"ClutterGroup", - "rotation-center-z-gravity":"center", - "scale-gravity":"center" - } - ]} - ,{ - "type":"ClutterState", - "id":"state", - "duration":1000, - "transitions":[ - { - "source":null, - "target":"pre", - "keys": [["actor", "rotation-angle-x", "linear", 90.0], - ["actor", "opacity", "linear", 0]] - }, - { - "source":null, - "target":"show", - "keys": [["actor", "rotation-angle-x", "linear", 0.0], - ["actor", "opacity", "linear", 255]] - }, - { - "source":null, - "target":"post", - "keys": [["actor", "rotation-angle-x", "linear", -90.0], - ["actor", "opacity", "linear", 0]] - }, - { - "source":"show", - "target":"pre", - "duration":100, - "keys":[] - } - ]} -] diff --git a/pinpoint/transitions/text-slide-down.json b/pinpoint/transitions/text-slide-down.json deleted file mode 100644 index 4649209..0000000 --- a/pinpoint/transitions/text-slide-down.json +++ b/dev/null @@ -1,58 +0,0 @@ -[{ - "type":"ClutterGroup", - "id":"actor", - "rotation-center-z-gravity":"center", - "scale-gravity":"center", - "children":[ - { - "id":"background", - "type":"ClutterGroup", - "rotation-center-z-gravity":"center", - "scale-gravity":"center" - }, - { - "type":"ClutterGroup", - "depth":20.0, - "children":[ - { - "id":"midground", - "type":"ClutterGroup", - "rotation-center-z-gravity":"center", - "scale-gravity":"center" - }]}, - { - "id":"foreground", - "depth":30.0, - "type":"ClutterGroup", - "rotation-center-z-gravity":"center", - "scale-gravity":"center" - } - ]} - ,{ - "type":"ClutterState", - "id":"state", - "duration":1000, - "transitions":[ - { - "source":null, - "target":"post", - "keys": [["foreground", "y", "linear", 1024], - ["midground", "y", "linear", 1024], - ["background", "opacity", "linear", 0]] - }, - { - "source":null, - "target":"show", - "keys": [["foreground", "y", "linear", 0], - ["midground", "y", "linear", 0], - ["background", "opacity", "linear", 255]] - }, - { - "source":null, - "target":"pre", - "keys": [["foreground", "y", "linear", -1024], - ["midground", "y", "linear", -1024], - ["background", "opacity", "linear", 0]] - } - ]} -] diff --git a/pinpoint/transitions/text-slide-left.json b/pinpoint/transitions/text-slide-left.json deleted file mode 100644 index 21fd94b..0000000 --- a/pinpoint/transitions/text-slide-left.json +++ b/dev/null @@ -1,61 +0,0 @@ -[{ - "type":"ClutterGroup", - "id":"actor", - "rotation-center-z-gravity":"center", - "scale-gravity":"center", - "children":[ - { - "id":"background", - "type":"ClutterGroup", - "rotation-center-z-gravity":"center", - "scale-gravity":"center" - }, - { - "type":"ClutterGroup", - "depth":20.0, - "children":[ - { - "id":"midground", - "type":"ClutterGroup", - "rotation-center-z-gravity":"center", - "scale-gravity":"center" - }]}, - { - "id":"foreground", - "depth":30.0, - "type":"ClutterGroup", - "rotation-center-z-gravity":"center", - "scale-gravity":"center" - } - ]} - ,{ - "type":"ClutterState", - "id":"state", - "duration":1000, - "transitions":[ - { - "source":null, - "target":"pre", - "keys": [["foreground", "x", "linear", 1024], - ["midground", "x", "linear", 1024], - ["midground", "opacity", "linear", 0], - ["background", "opacity", "linear", 0]] - }, - { - "source":null, - "target":"show", - "keys": [["foreground", "x", "linear", 0], - ["midground", "x", "linear", 0], - ["midground", "opacity", "linear", 255], - ["background", "opacity", "linear", 255]] - }, - { - "source":null, - "target":"post", - "keys": [["foreground", "x", "linear", -1024], - ["midground", "x", "linear", -1024], - ["midground", "opacity", "linear", 0], - ["background", "opacity", "linear", 0]] - } - ]} -] diff --git a/pinpoint/transitions/text-slide-up.json b/pinpoint/transitions/text-slide-up.json deleted file mode 100644 index 17e8bc0..0000000 --- a/pinpoint/transitions/text-slide-up.json +++ b/dev/null @@ -1,58 +0,0 @@ -[{ - "type":"ClutterGroup", - "id":"actor", - "rotation-center-z-gravity":"center", - "scale-gravity":"center", - "children":[ - { - "id":"background", - "type":"ClutterGroup", - "rotation-center-z-gravity":"center", - "scale-gravity":"center" - }, - { - "type":"ClutterGroup", - "depth":20.0, - "children":[ - { - "id":"midground", - "type":"ClutterGroup", - "rotation-center-z-gravity":"center", - "scale-gravity":"center" - }]}, - { - "id":"foreground", - "depth":30.0, - "type":"ClutterGroup", - "rotation-center-z-gravity":"center", - "scale-gravity":"center" - } - ]} - ,{ - "type":"ClutterState", - "id":"state", - "duration":1000, - "transitions":[ - { - "source":null, - "target":"pre", - "keys": [["foreground", "y", "linear", 1024], - ["midground", "y", "linear", 1024], - ["background", "opacity", "linear", 0]] - }, - { - "source":null, - "target":"show", - "keys": [["foreground", "y", "linear", 0], - ["midground", "y", "linear", 0], - ["background", "opacity", "linear", 255]] - }, - { - "source":null, - "target":"post", - "keys": [["foreground", "y", "linear", -1024], - ["midground", "y", "linear", -1024], - ["background", "opacity", "linear", 0]] - } - ]} -] |
