pigment-0.3.17/0000777000175000017500000000000011205035141010242 500000000000000pigment-0.3.17/INSTALL0000644000175000017500000002243211205034420011211 00000000000000Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. (Caching is disabled by default to prevent problems with accidental use of stale cache files.) If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You only need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not support the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Here is a another example: /bin/bash ./configure CONFIG_SHELL=/bin/bash Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent configuration-related scripts to be executed by `/bin/bash'. `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of the options to `configure', and exit. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. pigment-0.3.17/COPYING0000644000175000017500000006347611205034420011230 00000000000000 GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 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. Copyright (C) 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! pigment-0.3.17/docs/0000777000175000017500000000000011205035137011177 500000000000000pigment-0.3.17/docs/Makefile.am0000644000175000017500000000001611205034417013144 00000000000000SUBDIRS = pgm pigment-0.3.17/docs/pgm/0000777000175000017500000000000011205035140011754 500000000000000pigment-0.3.17/docs/pgm/running.xml0000644000175000017500000001653411205034416014110 00000000000000 Running Pigment Applications 3 Pigment Library Running Pigment Applications Run and debug your Pigment applications. Running and debugging Pigment applications Pigment environment variables Pigment inspects a few environment variables. <envar>PGM_PLUGIN_PATH</envar> This environment variable can be set to a colon-separated list of paths. Pigment will scan these paths for rendering plug-ins. These plug-ins will be loaded in addition to, and before the plug-ins found in the system paths. <envar>PGM_DEBUG</envar> If GStreamer has been configured with , this variable can be set to a list of debug options, which causes Pigment to print out different types of debugging information to stderr. The variable takes a comma-separated list of "category_name:level" pairs to set specific levels for the individual categories. The level value ranges from 0 (nothing) to 5 (LOG). 1 - Logs all fatal errors. These are errors that do not allow the core or a plugin to perform the requested action. The application can still recover if programmed to handle the conditions that triggered the error. 2 - Logs all warnings. Typically these are non-fatal, but user-visible problems are expected to happen. 3 - Logs all informational messages. These are typically used for events in the system that only happen once, or are important and rare enough to be logged at this level. 4 - Logs all debug messages. These are general debug messages for events that happen only a limited number of times during an object's lifetime; these include setup, teardown, change of parameters, ... 5 - Logs all log messages. These are messages for events that happen repeatedly during an object's lifetime; these include streaming and steady-state conditions. The category_name can contain " as a wildcard. For example, setting PGM_DEBUG to , will cause the category to be logged at full level, while all categories starting with will be logged at level. To get all possible debug output, set PGM_DEBUG to <envar>PGM_IMAGE_THREAD_POOL_SIZE</envar> This environment variable can be set to an integer in the range [1, 16] defining the number of pre-allocated threads used by the image loader thread pool. The default setting is 1. OpenGL Viewport environment variables Pigment OpenGL Viewport plugin inspects a few environment variables. <envar>PGM_GL_VBLANK</envar> This environment variable can be set to override the plugin selection of the best vertical synchronization method to use depending on the graphical driver. Note that if the __GL_SYNC_TO_VBLANK environment variable used by the NVIDIA proprietary driver is set, PGM_GL_VBLANK is simply ignored. 0 - Disable all attempts to synchronize to the VBlank. 1 - Use the GLX_SGI_video_sync extension to synchronize to the VBlank. 2 - Use the GLX_SGI_swap_control extension to synchronize to the VBlank. <envar>PGM_GL_PROGRAMS</envar> This environment variable can be set to 0 in order to disable the use of all ARB vertex and fragment programs. In this case, Pigment will behave as if programs were not supported. <envar>PGM_GL_CSP_PROGRAM</envar> This environment variable can be set to 0 in order to disable the use of a fragment program to handle the color space conversion from I420 or YV12 YCbCr formats to RGB. It removes the I420 and YV12 pixel formats from the list of supported formats in the viewport. <envar>PGM_GL_FPS</envar> This environment variable can be set to an integer specifying the framerate in which the rendering loop should run. Note that the vertical synchronization will not work correctly when running Pigment with a custom framerate. <envar>PGM_GL_ARGB_VISUAL</envar> This environment variable can be set to 1 to enable the search for an ARGB visual when the plugin is used on Xlib/GLX. It means that if you are running in a composited environment, you will be able to change the opacity of the window. <envar>PGM_GL_INDIRECT_RENDERING</envar> This environment variable can be set to 1 to explicitly request the creation of a indirect rendered OpenGL context. OpenGL ES Viewport environment variables Pigment OpenGL ES Viewport plugin inspects a few environment variables. <envar>PGM_GLES_SWAP_INTERVAL</envar> This environment variable can be set to an integer specifying the minimum number of vertical refresh periods (interval) that should occur for each buffer swap. A value of 0 specifies that buffer swaps must not be synchronized. <envar>PGM_GLES_FPS</envar> This environment variable can be set to an integer specifying the framerate in which the rendering loop should run. Note that the vertical synchronization will not work correctly when running Pigment with a custom framerate. pigment-0.3.17/docs/pgm/glossary.xml0000644000175000017500000000077111205034416014267 00000000000000 Glossary compositing FIXME drawable FIXME event FIXME pigment-0.3.17/docs/pgm/version-short.xml.in0000644000175000017500000000002111205034416015637 00000000000000@PGM_MAJORMINOR@ pigment-0.3.17/docs/pgm/pigment.types0000644000175000017500000000060611205035140014423 00000000000000% Add a *_get_type for every GObject whose properties and signals you want % documented and add the relevant includes to be able to call those *_get_type % functions. #include #include pgm_canvas_get_type pgm_drawable_get_type pgm_image_get_type pgm_image_sink_get_type pgm_text_get_type pgm_viewport_get_type pgm_viewport_factory_get_type pgm_gtk_get_type pigment-0.3.17/docs/pgm/Makefile.am0000644000175000017500000000432711205034416013737 00000000000000## Process this file with automake to produce Makefile.in AUTOMAKE_OPTIONS = 1.6 # The name of the module. DOC_MODULE = pigment # The top-level SGML file. DOC_MAIN_SGML_FILE = $(DOC_MODULE)-docs.sgml # The directory containing the source code. Relative to $(srcdir). DOC_SOURCE_DIR = $(top_srcdir)/pgm # Extra options to supply to gtkdoc-scan. SCAN_OPTIONS= # Extra options to supply to gtkdoc-mkdb. MKDB_OPTIONS = \ --sgml-mode \ --output-format=xml \ --ignore-files=parse # Extra options to supply to gtkdoc-mktmpl MKTMPL_OPTIONS= # Extra options to supply to gtkdoc-fixref. FIXXREF_OPTIONS = \ $(GLIB_PREFIX)/share/gtk-doc/html/gobject \ --extra-dir=$(GLIB_PREFIX)/share/gtk-doc/html/glib # Used for dependencies. The docs will be rebuilt if any of these change. HFILE_GLOB = \ $(top_srcdir)/pgm/*.h \ $(top_srcdir)/pgm/gtk/*.h \ $(top_srcdir)/pgm/imaging/*.h CFILE_GLOB = \ $(top_srcdir)/pgm/*.c \ $(top_srcdir)/pgm/gtk/*.c \ $(top_srcdir)/pgm/imaging/*.c # Extra options to pass to gtkdoc-scangobj. SCANGOBJ_OPTIONS = --type-init-func="pgm_init(&argc,&argv)" # Header files to ignore when scanning. IGNORE_HFILES = \ pgmkeysyms.h \ pgmmarshal.h \ pgmenumtypes.h # Images to copy into HTML directory. HTML_IMAGES = \ images/scaled_layout.png \ images/filled_layout.png \ images/zoomed_layout.png # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE). content_files = \ version-short.xml \ version-full.xml \ running.xml \ glossary.xml \ compiling.xml # SGML files where gtk-doc abbrevations (#GtkWidget) are expanded # These files must be listed here *and* in content_files expand_content_files= # CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library. # Only needed if you are using gtkdoc-scangobj to dynamically query widget # signals and properties. GTKDOC_CFLAGS = $(PGM_GTKDOC_CFLAGS) GTKDOC_LIBS = $(PGM_OBJ_LIBS) # Add the GTK+ symbols if available if USE_GTK_WIDGET GTKDOC_CFLAGS += $(GTK_CFLAGS) GTKDOC_LIBS += \ $(top_builddir)/pgm/gtk/libpigment-gtk-@PGM_MAJORMINOR@.la \ $(GTK_LIBS) endif # This includes the standard gtk-doc make rules, copied by gtkdocize. include $(top_srcdir)/gtk-doc.make # Other files to distribute EXTRA_DIST += \ version-short.xml.in \ version-full.xml.in pigment-0.3.17/docs/pgm/images/0000777000175000017500000000000011205035137013227 500000000000000pigment-0.3.17/docs/pgm/images/filled_layout.png0000644000175000017500000000605111205034416016506 00000000000000PNG  IHDR`@4rbKGD pHYs  tIMEr IDATx\ml~vvvmAآ@EkӨB5 FIH`bP#LhQJ \?\ @)-QWÜs3'3;s3j.]]. f`|lY"L qBub1@NgA#33?|o1m0wn>n[Iࠎt\u.D0X ->pw'‹p؏ G=4Υ!¥KefCUS}fPf]HDߍ 1g,Z˥uuah \\P(cH22@Og bodI))I@wΟn{Da Ձ`p3:;vf4&OSCii+**jl>5 hoozz#(f̐7YácvZUA@O Nm@ Piz<7Fe1em٘ŋbQTB!{ A4f33zi6e幧vUV5SRưzxHO //bx8;6e pwʧmH7efoTUapL.ihiy$}fdՀ˨غCumUh6 gŽ 1J|Yfxx]8{6-9:o'zfq7㍛(,E[WW^~y'{<ƹsx5<5!# f$R%^xуڍ#G|9 ]];06,gϒ  FUEQe~{9:FGs,*TO*e?HINoooW8hQ=iBh4Jan׬@O9.IʟY]&CYge7g/̚3geeVDȨf+(D ~"2,gW7֢ddjK7ߚqR)%FQV7$X65rs`׮[(S@U6Y Wu`,xfhqG /Rz8EԙT$Z-Zd+(@mSOI;ƧАWF PS2g)9%U2qݽ{1돩6481<쵤dRՔhY6XJYY#݆?'ё{_Eww6`5eM!A+;BbQQ/>m,ZLރڝjjٳ嶃d1)}+D]{C̛G{P[U_S2eՑ,E_'%EÖ-+ėu45E\k |;) JdR_wy SUU _}?`-Y*X>=} >n6utP9)vjyPyڊGkc[&c/7e>QEj6؉D ۶ՠr8xp3kҊ (*cx_ 5: =Q xy֮6$goᰎ49~ׯg"AuYrrrQ<7_j4MGsspxfCT[i3nTUգb.5_GSS:NFg:,$P `⋸}XԏQL7yy7 )hkSBOOFFV7Ybp0 cc)4'Qb1EDN0rs##[̞=5sOSbٖk.iIENDB`pigment-0.3.17/docs/pgm/images/scaled_layout.png0000644000175000017500000000446311205034416016507 00000000000000PNG  IHDR`@4rbKGD pHYs  tIME6]ZVIDATx\MlGqR$X{C҃MʏT T(Dp@4R\*TJDrD)Ej0UW4ins^ٛ7].4J **hm WܜH 33}%~a*鹂-["hl}E$*FGG6[/j146l]% D,vGlY#a!9r0=h$ϳ[7իǞ='`| @U݋k"J4(.W mP^Y_~9^~>|j?֊?k'yuLƍK{~Xz4U-)COE=?ԅsYn,%`dd-?0/8B-<xR}o;wN;L~ȕzJ ;GF͎"`zz Mv+.dXĄBZѓ%&xД{8rQTtڍsNVp>oMxY_!CD;M{L͍hV0W54tj_FGf=\eC#z_2 CC{07bv"%Yeڵ}H$Tt-,ma/KDLϞcx~-0H}'>@D}"`rɤo |9`dO0:Zgna\Cd˛ne݆W,ujgz@<@;8TPlv(QH+D81O6WtaYp+t눓Ɇ@M A zZ1<x!%UyM!S;QyX*F-+ty9x- 5 FC\ p:SH^'2cw,"(LOxFM?PLPggo֔ 2l^֓4Rԡtaܴ)Sy zsX\쬏za(+IGIAES_'kڪ7rhm+Wxuʻb"I6Tj'F>l:l?!,P̊pJSTġ&Dw%IU>nJB`vŹ"å1} ֯G犔T '+} 0WטeK.W Lz1(b ##_&(M ]aY ^< Bss]ݨj:d7J/Zkl̈́\jcH Mɋ灣G%vDGfa1;fLa_͆˚w=#4Dfʌ^S_ \df6hř3pUm[{l)ᩑݲ%ANPO>yt:rz^Nxcz;8sfJ?+ywL=3ܦ_Qf.^ T%uu58qb6I.+l0fnռ>l-FF>$Պ̐Ȥ%,Vr9 /q_BdܤW׶nxgpΟ?%,x[ >/}:Hx 8'55ر_c+G鹝#0 ]q> "r` ):ܺՍwwAڵUlzXCQwύht <وẊO17׀LyÑǓBKKmm VINƔ+?4h5;JIENDB`pigment-0.3.17/docs/pgm/images/zoomed_layout.png0000644000175000017500000000556611205034416016556 00000000000000PNG  IHDR`@4rbKGD pHYs  tIME3U IDATxڵ\[o[U||NIJ[n BEM**$^xa&D$^!!E TBJNi*M3 B&&u }𢡊>J}W=@v|Ƽ p޻X_/l?CM?cKCe}lT?d\%/!lCSKu"wo^}`|^LNQIa=K4Ia2,5;q|Eom ˽8F}L҉Ns$9X>{SSVVʸ|O 4qV|޽VX^އbqq; LpDpMg%l&.\xׯ`m-021!1>ԏ̎gkkk 8}zSS%q>9)J(\:/qڋ/<"3B 33CVB1D8X 4qђ6`d(1%p MWJuT9\'Ο߁(Q.֑A }D^:[0X\,?t}؝c)\眻F_2@ *OL}yLNBh&IF>AmwPX1:'3r)LO?C4+,$ ҐVžpUʚ0?lk7am~9^sH#"7iES2mX_W #\9z5?%!QY3)$i ?0Fd2"UJ T'f4rTgjJ&'ƍ,/oVIh}!md'IzSM A.\zRP.}DE5٤nm$ToGAz!a P(cn:%7x)F%{r>BoJ߼ىB yNGJٟHv q*m )?[X[KPhctbqdMKK\Y;K6ܿ4(D Y`FNE0s5yiDl(lԤP \U[.LbSׯw.uSV/4~Qs$ Z&tF_ݹ)҈HS$*3HГ {gfv/Z7@SR^%)̶dݻֶ# !LZ$3A v&r$N-iG{[aQ VcĹ4~0ٶTJ_lrU($$NJ(RɃoMCKX$ y[ݑ֟p5;IiᯔO@8N Mŀø@9=Ր8`;8ϋ{^aa ,ШՐ5 {mqbFigY`rdMⴵZ2\Bq ߺu v6 iQG+ΝKbvvXuHٲI9WZp={rv'Ӄ#'WhKRqB\Kcl80h4O E\5@"ڐ4*|8B{,ДlSU/14MT4h#'2ZZw%LtPe^$Ҵ҂z['ut, 9y,.nd6o,Ջ$k\D=I ^$!죏fܜҒFO<^1׺Z$kl0e5^$z="<%r*-ZكRvcc_y1`M5B9I=$km+Y|\^'ON;6;q[x^\m TvTEl3P6i=JxokG~D_ |nm yI}'u\y=zd7@[OJFH.'yHY$3_i3-Ь֧@KGk1%8)vx^ ǎ>^=]QɞIKia={04tb<׬Jʴ-\%y!bҽ+VX=71=WU%%eQ- @$W-:xp##cnޮ+EɑF8٢m4:#LXL~xyo,Y?'`nHHp__-듵KjK#p-+ƷukCCqV\ vsGI5qvZ M]B023[sCw13Ӊ~Q^uC^dw9+߲wpرuW?hpI#{ܒ8z{?Fglo6߇Gx3hn.m ɯJ4&0s 3xHڭ/oIENDB`pigment-0.3.17/docs/pgm/pigment-sections.txt0000644000175000017500000002713111205035140015725 00000000000000# Pigment API reference sections # please add sections in alphabetical order using the following template # leave two empty lines between sections #
# pgmxxx # PgmXxx # typedefs # macros # constructor # methods # # #
pgm/pgm.h
pgm Pgm pgm_init pgm_init_check pgm_deinit pgm_version pgm_version_string pgm_events_pending pgm_main pgm_main_quit pgm_main_iteration pgm_main_iteration_do
pgmcanvas PgmCanvas PgmCanvas pgm_canvas_new pgm_canvas_set_size pgm_canvas_get_size pgm_canvas_add pgm_canvas_remove pgm_canvas_add_many pgm_canvas_remove_many pgm_canvas_set_order pgm_canvas_get_order pgm_canvas_get_layer_count pgm_canvas_regenerate pgm_canvas_get_pixel_formats pgm_canvas_get_pixel_offsets PGM_CANVAS PGM_IS_CANVAS PGM_TYPE_CANVAS PGM_CANVAS_CLASS PGM_IS_CANVAS_CLASS PGM_CANVAS_GET_CLASS pgm_canvas_get_type PgmCanvasClass
pgmcommon PgmCommon PGM_DEGREES_TO_RADIANS PGM_RADIANS_TO_DEGREES PGM_SINCOS PGM_FABSF pgm_lrintf PgmError
pgmdrawable PgmDrawable PgmDrawableLayer PgmDrawableProperty PgmDrawable PgmDrawableClass pgm_drawable_hide pgm_drawable_show pgm_drawable_is_visible pgm_drawable_set_size pgm_drawable_get_size pgm_drawable_set_position pgm_drawable_get_position pgm_drawable_set_rotation_x pgm_drawable_get_rotation_x pgm_drawable_set_rotation_y pgm_drawable_get_rotation_y pgm_drawable_set_rotation_z pgm_drawable_get_rotation_z pgm_drawable_set_scale pgm_drawable_get_scale pgm_drawable_set_fg_color pgm_drawable_get_fg_color pgm_drawable_set_bg_color pgm_drawable_get_bg_color pgm_drawable_set_opacity pgm_drawable_get_opacity pgm_drawable_set_grid_aligned pgm_drawable_get_grid_aligned pgm_drawable_set_drag_distance pgm_drawable_get_drag_distance pgm_drawable_regenerate pgm_drawable_from_canvas pgm_drawable_to_canvas PGM_DRAWABLE PGM_IS_DRAWABLE PGM_TYPE_DRAWABLE PGM_DRAWABLE_CLASS PGM_IS_DRAWABLE_CLASS PGM_DRAWABLE_GET_CLASS PgmDrawableFlags PgmDrawablePickingSignal pgm_drawable_get_type
pgmevents PgmEvents PgmEventType PgmModifierType PgmButtonType PgmScrollDirection PgmViewportState PgmEvent PgmEventAny PgmEventMotion PgmEventButton PgmEventScroll PgmEventState PgmEventWin32Message PgmEventDnd PgmEventKey PgmEventExpose PgmEventConfigure pgm_event_new pgm_event_copy pgm_event_free pgm_keyval_to_unicode PGM_TYPE_EVENT pgm_event_get_type
pgmimage PgmImage PgmImageAlignment PgmImageLayoutType PgmImageInterpType PgmImageWrapping PgmImagePixelFormat PgmImageFile PgmImageBuffer PgmImageGstBuffer PgmImageSystemBuffer PgmImagePixbuf PgmImageStorageType PgmImageData PgmImage pgm_image_new pgm_image_new_from_file pgm_image_new_from_pixbuf pgm_image_new_from_buffer pgm_image_new_from_image pgm_image_set_from_file pgm_image_set_from_pixbuf pgm_image_set_from_buffer pgm_image_set_from_gst_buffer pgm_image_set_from_system_buffer pgm_image_set_from_image pgm_image_to_pixbuf pgm_image_clear pgm_image_get_storage_type pgm_image_system_buffer_lock pgm_image_system_buffer_unlock pgm_image_set_mapping_matrix pgm_image_get_mapping_matrix pgm_image_set_alignment pgm_image_get_alignment pgm_image_set_layout pgm_image_get_layout pgm_image_set_interp pgm_image_get_interp pgm_image_set_wrapping pgm_image_get_wrapping pgm_image_set_aspect_ratio pgm_image_get_aspect_ratio pgm_image_set_border_width pgm_image_get_border_width pgm_image_set_border_inner_color pgm_image_get_border_inner_color pgm_image_set_border_outer_color pgm_image_get_border_outer_color pgm_image_from_drawable pgm_image_to_drawable PGM_IMAGE PGM_IS_IMAGE PGM_TYPE_IMAGE PGM_IMAGE_CLASS PGM_IS_IMAGE_CLASS PGM_IMAGE_GET_CLASS PGM_IMAGE_NB_PIXEL_FORMATS PgmImageClass pgm_image_get_type
pgmimagesink PgmImageSink PgmImageSinkEventMask PgmImageSink pgm_image_sink_new pgm_image_sink_set_image pgm_image_sink_get_image pgm_image_sink_set_events pgm_image_sink_get_events PGM_IMAGE_SINK PGM_IS_IMAGE_SINK PGM_TYPE_IMAGE_SINK PGM_IMAGE_SINK_CLASS PGM_IS_IMAGE_SINK_CLASS PgmImageSinkClass pgm_image_sink_get_type
pgmlinearalgebra PgmLinearAlgebra PgmMat4x4Predefined PgmVec3 PgmVec4 PgmMat3x3 PgmMat4x4 pgm_vec3_new pgm_vec3_new_from_scalars pgm_vec3_copy pgm_vec3_free pgm_vec3_set_from_scalars pgm_vec3_set_from_vec3 pgm_vec3_length pgm_vec3_normalize pgm_vec3_dot_product pgm_vec3_cross_product pgm_vec3_add_scalar pgm_vec3_add_vec3 pgm_vec3_substract_scalar pgm_vec3_substract_vec3 pgm_vec3_multiply_scalar pgm_vec3_multiply_vec3 pgm_vec3_to_string pgm_vec4_new pgm_vec4_new_from_scalars pgm_vec4_copy pgm_vec4_free pgm_vec4_set_from_scalars pgm_vec4_set_from_vec4 pgm_vec4_length pgm_vec4_normalize pgm_vec4_add_scalar pgm_vec4_add_vec4 pgm_vec4_substract_scalar pgm_vec4_substract_vec4 pgm_vec4_multiply_scalar pgm_vec4_multiply_vec4 pgm_vec4_to_string pgm_mat3x3_new pgm_mat3x3_new_from_scalars pgm_mat3x3_new_from_vec3 pgm_mat3x3_new_identity pgm_mat3x3_copy pgm_mat3x3_free pgm_mat3x3_set_from_scalars pgm_mat3x3_set_from_vec3 pgm_mat3x3_set_from_mat3x3 pgm_mat3x3_is_identity pgm_mat3x3_inverse pgm_mat3x3_transpose pgm_mat3x3_add_scalar pgm_mat3x3_add_mat3x3 pgm_mat3x3_substract_scalar pgm_mat3x3_substract_mat3x3 pgm_mat3x3_multiply_scalar pgm_mat3x3_multiply_vec3 pgm_mat3x3_multiply_mat3x3 pgm_mat3x3_to_string pgm_mat4x4_new pgm_mat4x4_new_from_scalars pgm_mat4x4_new_from_vec4 pgm_mat4x4_new_identity pgm_mat4x4_new_predefined pgm_mat4x4_new_translate_from_vec3 pgm_mat4x4_new_translate_from_scalars pgm_mat4x4_new_scale_from_vec3 pgm_mat4x4_new_scale_from_scalars pgm_mat4x4_new_rotate_x pgm_mat4x4_new_rotate_y pgm_mat4x4_new_rotate_z pgm_mat4x4_new_rotate_axis_from_vec3 pgm_mat4x4_new_rotate_axis_from_scalars pgm_mat4x4_copy pgm_mat4x4_free pgm_mat4x4_set_from_scalars pgm_mat4x4_set_from_vec4 pgm_mat4x4_set_from_mat4x4 pgm_mat4x4_is_identity pgm_mat4x4_inverse pgm_mat4x4_transpose pgm_mat4x4_translate_from_vec3 pgm_mat4x4_translate_from_scalars pgm_mat4x4_scale_from_vec3 pgm_mat4x4_scale_from_scalars pgm_mat4x4_rotate_x pgm_mat4x4_rotate_y pgm_mat4x4_rotate_z pgm_mat4x4_rotate_axis_from_vec3 pgm_mat4x4_rotate_axis_from_scalars pgm_mat4x4_add_scalar pgm_mat4x4_add_mat4x4 pgm_mat4x4_substract_scalar pgm_mat4x4_substract_mat4x4 pgm_mat4x4_multiply_scalar pgm_mat4x4_multiply_vec4 pgm_mat4x4_multiply_mat4x4 pgm_mat4x4_to_string pgm_intersection_line_plane pgm_point_belongs_rectangle PGM_TYPE_MAT3X3 PGM_TYPE_MAT4X4 PGM_TYPE_VEC3 PGM_TYPE_VEC4 pgm_vec3_get_type pgm_vec4_get_type pgm_mat3x3_get_type pgm_mat4x4_get_type
pgmmodule PgmModule PGM_IS_MODULE PGM_IS_MODULE_CLASS PGM_MODULE PGM_MODULE_CLASS PGM_MODULE_GET_CLASS PGM_TYPE_MODULE PgmModule PgmModuleClass pgm_module_get_type pgm_module_new
pgmplugin PgmPlugin PGM_PLUGIN_PATH_NAME PgmPluginInitFunc PgmPluginShutdownFunc PgmPluginCreateFunc PgmPluginDesc PGM_PLUGIN_DEFINE PGM_DEFINE_DYNAMIC_TYPE PGM_DEFINE_DYNAMIC_TYPE_EXTENDED
pgmtext PgmText PgmTextEllipsize PgmTextAlignment PgmTextWrap PgmTextGravity PgmTextStretch PgmTextStyle PgmTextVariant PgmTextWeight PgmTextShadowPosition PgmText pgm_text_new pgm_text_set_label pgm_text_set_markup pgm_text_get_label pgm_text_set_font_family pgm_text_get_font_family pgm_text_set_font_height pgm_text_get_font_height pgm_text_set_ellipsize pgm_text_get_ellipsize pgm_text_set_justify pgm_text_get_justify pgm_text_set_alignment pgm_text_get_alignment pgm_text_set_wrap pgm_text_get_wrap pgm_text_set_gravity pgm_text_get_gravity pgm_text_set_stretch pgm_text_get_stretch pgm_text_set_style pgm_text_get_style pgm_text_set_variant pgm_text_get_variant pgm_text_set_weight pgm_text_get_weight pgm_text_set_multiline pgm_text_get_multiline pgm_text_set_line_spacing pgm_text_get_line_spacing pgm_text_set_color pgm_text_get_color pgm_text_set_outline_color pgm_text_get_outline_color pgm_text_set_outline_width pgm_text_get_outline_width pgm_text_set_cast_shadow pgm_text_get_cast_shadow pgm_text_set_shadow_position pgm_text_get_shadow_position pgm_text_set_shadow_color pgm_text_get_shadow_color PGM_TEXT PGM_IS_TEXT PGM_TYPE_TEXT PGM_TEXT_CLASS PGM_IS_TEXT_CLASS PGM_TEXT_GET_CLASS PgmTextClass pgm_text_get_type
pgmversion PgmVersion PGM_VERSION_MAJOR PGM_VERSION_MINOR PGM_VERSION_MICRO PGM_VERSION_NANO
pgmviewport PgmViewport PgmViewportCursor PgmViewportCapacity PgmViewportRotation PgmViewportReflection PgmViewport PgmViewportClass pgm_viewport_set_title pgm_viewport_get_title pgm_viewport_show pgm_viewport_hide pgm_viewport_is_visible pgm_viewport_set_decorated pgm_viewport_get_decorated pgm_viewport_set_cursor pgm_viewport_get_cursor pgm_viewport_set_icon pgm_viewport_get_icon pgm_viewport_set_size pgm_viewport_get_size pgm_viewport_set_alpha_blending pgm_viewport_get_alpha_blending pgm_viewport_set_opacity pgm_viewport_get_opacity pgm_viewport_set_fullscreen pgm_viewport_get_fullscreen pgm_viewport_set_iconified pgm_viewport_get_iconified pgm_viewport_focus pgm_viewport_get_screen_resolution pgm_viewport_set_screen_resolution pgm_viewport_get_screen_size_mm pgm_viewport_set_screen_size_mm pgm_viewport_set_message_filter pgm_viewport_get_message_filter pgm_viewport_push_event pgm_viewport_get_canvas pgm_viewport_set_canvas pgm_viewport_set_canvas_rotation pgm_viewport_get_canvas_rotation pgm_viewport_set_canvas_reflection pgm_viewport_get_canvas_reflection pgm_viewport_update_projection pgm_viewport_to_canvas pgm_viewport_from_canvas pgm_viewport_get_embedding_id pgm_viewport_get_pixel_formats pgm_viewport_get_caps_mask pgm_viewport_get_max_texture_size pgm_viewport_get_frame_rate pgm_viewport_read_pixels pgm_viewport_push_pixels pgm_viewport_emit_update_pass PGM_VIEWPORT PGM_IS_VIEWPORT PGM_TYPE_VIEWPORT PGM_VIEWPORT_CLASS PGM_IS_VIEWPORT_CLASS PGM_VIEWPORT_GET_CLASS PGM_VIEWPORT_CAST _PgmIOWatch pgm_viewport_get_type
pgmviewportfactory PgmViewportFactory PgmViewportFactory pgm_viewport_factory_new pgm_viewport_factory_get_description pgm_viewport_factory_get_license pgm_viewport_factory_get_origin pgm_viewport_factory_get_author pgm_viewport_factory_create pgm_viewport_factory_make PGM_VIEWPORT_FACTORY PGM_IS_VIEWPORT_FACTORY PGM_TYPE_VIEWPORT_FACTORY PGM_VIEWPORT_FACTORY_CLASS PGM_IS_VIEWPORT_FACTORY_CLASS PGM_VIEWPORT_FACTORY_GET_CLASS PgmViewportFactoryClass pgm_viewport_factory_get_type
pgm/gtk/pgmgtk.h
pgmgtk PgmGtk PgmGtk pgm_gtk_new pgm_gtk_set_viewport pgm_gtk_get_viewport PGM_TYPE_GTK PGM_GTK PGM_IS_GTK PGM_GTK_CLASS PGM_IS_GTK_CLASS PgmGtkClass pgm_gtk_get_type
pgm/imaging/pgmimaging.h
pgmimaging PgmImaging pgm_imaging_linear_alpha_gradient
pigment-0.3.17/docs/pgm/tmpl/0000777000175000017500000000000011205035140012730 500000000000000pigment-0.3.17/docs/pgm/tmpl/pgmplugin.sgml0000644000175000017500000000162411205035140015535 00000000000000 PgmPlugin @module: @Returns: @module: @Returns: @Returns: @init: @shutdown: @create: @name: @version: @description: @license: @origin: @author: @init: @shutdown: @create: @name: @version: @description: @license: @origin: @author: pigment-0.3.17/docs/pgm/tmpl/pgmmodule.sgml0000644000175000017500000000040411205035140015517 00000000000000 PgmModule pigment-0.3.17/docs/pgm/tmpl/pgmcommon.sgml0000644000175000017500000000131111205035140015520 00000000000000 PgmCommon @theta: @theta: @theta: @s: @c: @x: @x: @Returns: @PGM_ERROR_X: @PGM_ERROR_OK: pigment-0.3.17/docs/pgm/tmpl/pgmviewportfactory.sgml0000644000175000017500000000212411205035140017502 00000000000000 PgmViewportFactory @name: @Returns: @factory: @description: @Returns: @factory: @license: @Returns: @factory: @origin: @Returns: @factory: @author: @Returns: @factory: @viewport: @Returns: @name: @viewport: @Returns: pigment-0.3.17/docs/pgm/tmpl/pgmlinearalgebra.sgml0000644000175000017500000002315111205035140017026 00000000000000 PgmLinearAlgebra @PGM_MAT4X4_FLIP_HORIZONTAL: @PGM_MAT4X4_FLIP_VERTICAL: @PGM_MAT4X4_ROTATE_CLOCKWISE: @PGM_MAT4X4_ROTATE_COUNTER_CLOCKWISE: @v: @v: @m: @m: @Returns: @v0: @v1: @v2: @Returns: @vec3: @Returns: @vec3: @vec3: @v0: @v1: @v2: @vec3: @v: @vec3: @Returns: @vec3: @Returns: @vec3: @v: @Returns: @vec3: @v: @Returns: @vec3: @s: @Returns: @vec3: @v: @Returns: @vec3: @s: @Returns: @vec3: @v: @Returns: @vec3: @s: @Returns: @vec3: @v: @Returns: @vec3: @Returns: @Returns: @v0: @v1: @v2: @v3: @Returns: @vec4: @Returns: @vec4: @vec4: @v0: @v1: @v2: @v3: @vec4: @v: @vec4: @Returns: @vec4: @Returns: @vec4: @s: @Returns: @vec4: @v: @Returns: @vec4: @s: @Returns: @vec4: @v: @Returns: @vec4: @s: @Returns: @vec4: @v: @Returns: @vec4: @Returns: @Returns: @v0: @v1: @v2: @v3: @v4: @v5: @v6: @v7: @v8: @Returns: @v0: @v1: @v2: @Returns: @Returns: @mat3x3: @Returns: @mat3x3: @mat3x3: @v0: @v1: @v2: @v3: @v4: @v5: @v6: @v7: @v8: @mat3x3: @v0: @v1: @v2: @mat3x3: @m: @mat3x3: @Returns: @mat3x3: @Returns: @mat3x3: @Returns: @mat3x3: @s: @Returns: @mat3x3: @m: @Returns: @mat3x3: @s: @Returns: @mat3x3: @m: @Returns: @mat3x3: @s: @Returns: @mat3x3: @v: @Returns: @mat3x3: @m: @Returns: @mat3x3: @Returns: @Returns: @v0: @v1: @v2: @v3: @v4: @v5: @v6: @v7: @v8: @v9: @v10: @v11: @v12: @v13: @v14: @v15: @Returns: @v0: @v1: @v2: @v3: @Returns: @Returns: @predefined: @Returns: @t: @Returns: @tx: @ty: @tz: @Returns: @s: @Returns: @sx: @sy: @sz: @Returns: @angle: @Returns: @angle: @Returns: @angle: @Returns: @angle: @axis: @Returns: @angle: @axis_x: @axis_y: @axis_z: @Returns: @mat4x4: @Returns: @mat4x4: @mat4x4: @v0: @v1: @v2: @v3: @v4: @v5: @v6: @v7: @v8: @v9: @v10: @v11: @v12: @v13: @v14: @v15: @mat4x4: @v0: @v1: @v2: @v3: @mat4x4: @m: @mat4x4: @Returns: @mat4x4: @Returns: @mat4x4: @Returns: @mat4x4: @t: @mat4x4: @tx: @ty: @tz: @mat4x4: @s: @mat4x4: @sx: @sy: @sz: @mat4x4: @angle: @mat4x4: @angle: @mat4x4: @angle: @mat4x4: @angle: @axis: @mat4x4: @angle: @axis_x: @axis_y: @axis_z: @mat4x4: @s: @Returns: @mat4x4: @m: @Returns: @mat4x4: @s: @Returns: @mat4x4: @m: @Returns: @mat4x4: @s: @Returns: @mat4x4: @v: @Returns: @mat4x4: @m: @Returns: @mat4x4: @Returns: @l1: @l2: @p: @pu: @pv: @Returns: @p: @r: @ru: @rv: @Returns: pigment-0.3.17/docs/pgm/tmpl/pgmimage.sgml0000644000175000017500000001520211205035140015316 00000000000000 PgmImage @PGM_IMAGE_LEFT: @PGM_IMAGE_CENTER: @PGM_IMAGE_RIGHT: @PGM_IMAGE_TOP: @PGM_IMAGE_BOTTOM: @PGM_IMAGE_TOP_LEFT: @PGM_IMAGE_TOP_CENTER: @PGM_IMAGE_TOP_RIGHT: @PGM_IMAGE_BOTTOM_LEFT: @PGM_IMAGE_BOTTOM_CENTER: @PGM_IMAGE_BOTTOM_RIGHT: @PGM_IMAGE_FILLED: @PGM_IMAGE_SCALED: @PGM_IMAGE_ZOOMED: @PGM_IMAGE_CENTERED: @PGM_IMAGE_TILED: @PGM_IMAGE_NEAREST: @PGM_IMAGE_BILINEAR: @PGM_IMAGE_CLAMP: @PGM_IMAGE_TRANSPARENT: @PGM_IMAGE_REPEAT: @PGM_IMAGE_RGB: @PGM_IMAGE_BGR: @PGM_IMAGE_RGBA: @PGM_IMAGE_BGRA: @PGM_IMAGE_I420: @PGM_IMAGE_YV12: @PGM_IMAGE_UYVY: @PGM_IMAGE_YUYV: @pixbuf: @filename: @width: @height: @buffer: @format: @width: @height: @stride: @size: @gst_buffer: @format: @width: @height: @stride: @system_buffer: @format: @width: @height: @pixbuf: @PGM_IMAGE_EMPTY: @PGM_IMAGE_FILE: @PGM_IMAGE_BUFFER: @PGM_IMAGE_GST_BUFFER: @PGM_IMAGE_PIXBUF: @PGM_IMAGE_IMAGE: @PGM_IMAGE_SYSTEM_BUFFER: @master: @slaves: @mapping_matrix: @storage_type: @data: @layout: @align: @interp: @wrap_s: @wrap_t: @par_n: @par_d: @border_width: @border_inner_r: @border_inner_g: @border_inner_b: @border_inner_a: @border_outer_r: @border_outer_g: @border_outer_b: @border_outer_a: @pgmimage: the object which received the signal. @arg1: @arg2: @pgmimage: the object which received the signal. @pgmimage: the object which received the signal. @arg1: @Returns: @filename: @max_size: @Returns: @pixbuf: @Returns: @format: @width: @height: @stride: @size: @data: @Returns: @src_image: @Returns: @image: @filename: @max_size: @Returns: @image: @pixbuf: @Returns: @image: @format: @width: @height: @stride: @size: @data: @Returns: @image: @format: @width: @height: @stride: @buffer: @Returns: @image: @format: @width: @height: @system_buffer: @Returns: @image: @src_image: @Returns: @image: @pixbuf: @Returns: @image: @Returns: @image: @storage: @Returns: @image: @Returns: @image: @Returns: @image: @mapping_matrix: @Returns: @image: @mapping_matrix: @Returns: @image: @align: @Returns: @image: @align: @Returns: @image: @layout: @Returns: @image: @layout: @Returns: @image: @interp: @Returns: @image: @interp: @Returns: @image: @wrap_s: @wrap_t: @Returns: @image: @wrap_s: @wrap_t: @Returns: @image: @numerator: @denominator: @Returns: @image: @numerator: @denominator: @Returns: @image: @width: @Returns: @image: @width: @Returns: @image: @red: @green: @blue: @alpha: @Returns: @image: @red: @green: @blue: @alpha: @Returns: @image: @red: @green: @blue: @alpha: @Returns: @image: @red: @green: @blue: @alpha: @Returns: @image: @x_image: @y_image: @x_drawable: @y_drawable: @Returns: @image: @x_drawable: @y_drawable: @x_image: @y_image: @Returns: pigment-0.3.17/docs/pgm/tmpl/pgmcanvas.sgml0000644000175000017500000000472011205035140015512 00000000000000 PgmCanvas @far_layer: @middle_layer: @near_layer: @width: @height: @pixel_offset_x: @pixel_offset_y: @pixel_formats: @pgmcanvas: the object which received the signal. @arg1: @arg2: @arg3: @pgmcanvas: the object which received the signal. @arg1: @arg2: @pgmcanvas: the object which received the signal. @arg1: @arg2: @arg3: @pgmcanvas: the object which received the signal. @pgmcanvas: the object which received the signal. @Returns: @canvas: @width: @height: @Returns: @canvas: @width: @height: @Returns: @canvas: @layer: @drawable: @Returns: @canvas: @drawable: @Returns: @canvas: @layer: @drawable_1: @Varargs: @Returns: @canvas: @drawable_1: @Varargs: @Returns: @canvas: @drawable: @order: @Returns: @canvas: @drawable: @layer: @order: @Returns: @canvas: @layer: @count: @Returns: @canvas: @Returns: @canvas: @pixel_formats: @Returns: @canvas: @x: @y: @Returns: pigment-0.3.17/docs/pgm/tmpl/pgm.sgml0000644000175000017500000000175511205035140014323 00000000000000 Pgm @argc: @argv: @argc: @argv: @Returns: @major: @minor: @micro: @nano: @Returns: @Returns: @blocking: pigment-0.3.17/docs/pgm/tmpl/pgmversion.sgml0000644000175000017500000000100411205035140015714 00000000000000 PgmVersion pigment-0.3.17/docs/pgm/tmpl/pgmtext.sgml0000644000175000017500000001453111205035140015224 00000000000000 PgmText @PGM_TEXT_ELLIPSIZE_NONE: @PGM_TEXT_ELLIPSIZE_START: @PGM_TEXT_ELLIPSIZE_MIDDLE: @PGM_TEXT_ELLIPSIZE_END: @PGM_TEXT_ALIGN_LEFT: @PGM_TEXT_ALIGN_CENTER: @PGM_TEXT_ALIGN_RIGHT: @PGM_TEXT_WRAP_WORD: @PGM_TEXT_WRAP_CHAR: @PGM_TEXT_WRAP_WORD_CHAR: @PGM_TEXT_GRAVITY_SOUTH: @PGM_TEXT_GRAVITY_EAST: @PGM_TEXT_GRAVITY_NORTH: @PGM_TEXT_GRAVITY_WEST: @PGM_TEXT_GRAVITY_AUTO: @PGM_TEXT_STRETCH_CONDENSED: @PGM_TEXT_STRETCH_NORMAL: @PGM_TEXT_STRETCH_EXPANDED: @PGM_TEXT_STYLE_NORMAL: @PGM_TEXT_STYLE_OBLIQUE: @PGM_TEXT_STYLE_ITALIC: @PGM_TEXT_VARIANT_NORMAL: @PGM_TEXT_VARIANT_SMALL_CAPS: @PGM_TEXT_WEIGHT_LIGHT: @PGM_TEXT_WEIGHT_NORMAL: @PGM_TEXT_WEIGHT_BOLD: @PGM_TEXT_SHADOW_NORTH: @PGM_TEXT_SHADOW_SOUTH: @PGM_TEXT_SHADOW_WEST: @PGM_TEXT_SHADOW_EAST: @PGM_TEXT_SHADOW_NORTH_WEST: @PGM_TEXT_SHADOW_NORTH_EAST: @PGM_TEXT_SHADOW_SOUTH_WEST: @PGM_TEXT_SHADOW_SOUTH_EAST: @label: @font_family: @gravity: @stretch: @style: @variant: @weight: @height: @ellipsize: @alignment: @wrap: @line_spacing: @justify: @multiline: @cast_shadow: @shadow_position: @outline_width: @r: @g: @b: @a: @shadow_r: @shadow_g: @shadow_b: @shadow_a: @outline_r: @outline_g: @outline_b: @outline_a: @markup: @Returns: @text: @label: @Returns: @text: @markup: @Returns: @text: @label: @Returns: @text: @font_family: @Returns: @text: @font_family: @Returns: @text: @font_height: @Returns: @text: @font_height: @Returns: @text: @ellipsize: @Returns: @text: @ellipsize: @Returns: @text: @justify: @Returns: @text: @justify: @Returns: @text: @alignment: @Returns: @text: @alignment: @Returns: @text: @wrap: @Returns: @text: @wrap: @Returns: @text: @gravity: @Returns: @text: @gravity: @Returns: @text: @stretch: @Returns: @text: @stretch: @Returns: @text: @style: @Returns: @text: @style: @Returns: @text: @variant: @Returns: @text: @variant: @Returns: @text: @weight: @Returns: @text: @weight: @Returns: @text: @multiline: @Returns: @text: @multiline: @Returns: @text: @line_spacing: @Returns: @text: @line_spacing: @Returns: @text: @red: @green: @blue: @alpha: @Returns: @text: @red: @green: @blue: @alpha: @Returns: @text: @red: @green: @blue: @alpha: @Returns: @text: @red: @green: @blue: @alpha: @Returns: @text: @width: @Returns: @text: @width: @Returns: @text: @cast_shadow: @Returns: @text: @cast_shadow: @Returns: @text: @position: @Returns: @text: @position: @Returns: @text: @red: @green: @blue: @alpha: @Returns: @text: @red: @green: @blue: @alpha: @Returns: pigment-0.3.17/docs/pgm/tmpl/pgmgtk.sgml0000644000175000017500000000110611205035140015017 00000000000000 PgmGtk @Returns: @gtk: @viewport: @Returns: @gtk: @viewport: @Returns: pigment-0.3.17/docs/pgm/tmpl/pgmevents.sgml0000644000175000017500000000500211205035140015535 00000000000000 PgmEvents @PGM_NOTHING: @PGM_MOTION_NOTIFY: @PGM_BUTTON_PRESS: @PGM_DOUBLE_BUTTON_PRESS: @PGM_TRIPLE_BUTTON_PRESS: @PGM_BUTTON_PRESSURE: @PGM_BUTTON_RELEASE: @PGM_KEY_PRESS: @PGM_KEY_RELEASE: @PGM_EXPOSE: @PGM_CONFIGURE: @PGM_DRAG_MOTION: @PGM_DRAG_DROP: @PGM_DRAG_LEAVE: @PGM_SCROLL: @PGM_STATE: @PGM_DELETE: @PGM_WIN32_MESSAGE: @PGM_SHIFT_MASK: @PGM_CAPSLOCK_MASK: @PGM_CONTROL_MASK: @PGM_ALT_MASK: @PGM_NUMLOCK_MASK: @PGM_BUTTON_LEFT: @PGM_BUTTON_MIDDLE: @PGM_BUTTON_RIGHT: @PGM_SCROLL_UP: @PGM_SCROLL_DOWN: @PGM_VIEWPORT_ICONIFIED: @type: @source: @type: @source: @time: @x: @y: @pressure: @type: @source: @time: @x: @y: @button: @pressure: @type: @source: @time: @x: @y: @direction: @type: @source: @changed_mask: @state_mask: @type: @source: @time: @message: @wparam: @lparam: @type: @source: @time: @x: @y: @uri: @type: @source: @time: @modifier: @keyval: @hardware_keycode: @type: @source: @type: @source: @x: @y: @width: @height: @type: @Returns: @event: @Returns: @event: @keyval: @Returns: pigment-0.3.17/docs/pgm/tmpl/pgmdrawable.sgml0000644000175000017500000001667111205035140016030 00000000000000 PgmDrawable @PGM_DRAWABLE_UNBOUND: @PGM_DRAWABLE_FAR: @PGM_DRAWABLE_MIDDLE: @PGM_DRAWABLE_NEAR: @PGM_DRAWABLE_VISIBILITY: @PGM_DRAWABLE_SIZE: @PGM_DRAWABLE_POSITION: @PGM_DRAWABLE_TRANSFORMATION_MATRIX: @PGM_DRAWABLE_BG_COLOR: @PGM_DRAWABLE_FG_COLOR: @PGM_DRAWABLE_OPACITY: @PGM_DRAWABLE_REGENERATE: @PGM_IMAGE_DATA_FILE: @PGM_IMAGE_DATA_BUFFER: @PGM_IMAGE_DATA_GST_BUFFER: @PGM_IMAGE_DATA_PIXBUF: @PGM_IMAGE_DATA_SYSTEM_BUFFER: @PGM_IMAGE_DATA_IMAGE: @PGM_IMAGE_DATA_EMPTY: @PGM_IMAGE_SYSTEM_BUFFER_CONTENT: @PGM_IMAGE_MAPPING_MATRIX: @PGM_IMAGE_ALIGNMENT: @PGM_IMAGE_LAYOUT: @PGM_IMAGE_INTERP: @PGM_IMAGE_WRAPPING: @PGM_IMAGE_ASPECT_RATIO: @PGM_IMAGE_BORDER_WIDTH: @PGM_IMAGE_BORDER_INNER_COLOR: @PGM_IMAGE_BORDER_OUTER_COLOR: @PGM_TEXT_LABEL: @PGM_TEXT_MARKUP: @PGM_TEXT_FONT_FAMILY: @PGM_TEXT_HEIGHT: @PGM_TEXT_ELLIPSIZE: @PGM_TEXT_JUSTIFY: @PGM_TEXT_ALIGNMENT: @PGM_TEXT_WRAP: @PGM_TEXT_GRAVITY: @PGM_TEXT_STRETCH: @PGM_TEXT_STYLE: @PGM_TEXT_VARIANT: @PGM_TEXT_WEIGHT: @PGM_TEXT_MULTILINE: @PGM_TEXT_LINE_SPACING: @PGM_TEXT_COLOR: @PGM_TEXT_OUTLINE_COLOR: @PGM_TEXT_OUTLINE_WIDTH: @PGM_TEXT_CAST_SHADOW: @PGM_TEXT_SHADOW_POSITION: @PGM_TEXT_SHADOW_COLOR: @transformation_matrix: @angle_x: @angle_y: @angle_z: @layer: @x: @y: @z: @orig_x: @orig_y: @scale: @width: @height: @orig_width: @orig_height: @grid_aligned: @fg_r: @fg_g: @fg_b: @fg_a: @bg_r: @bg_g: @bg_b: @bg_a: @opacity: @pgmdrawable: the object which received the signal. @arg1: @pgmdrawable: the object which received the signal. @arg1: @Returns: @Param4: @Param5: @Param6: @Returns: @Returns: @pgmdrawable: the object which received the signal. @arg1: @arg2: @arg3: @arg4: @arg5: @Returns: @pgmdrawable: the object which received the signal. @arg1: @arg2: @arg3: @arg4: @arg5: @Returns: @Returns: @pgmdrawable: the object which received the signal. @arg1: @arg2: @arg3: @arg4: @arg5: @Returns: @pgmdrawable: the object which received the signal. @arg1: @arg2: @arg3: @arg4: @arg5: @Returns: @Returns: @pgmdrawable: the object which received the signal. @arg1: @arg2: @arg3: @arg4: @Returns: @pgmdrawable: the object which received the signal. @arg1: @arg2: @arg3: @arg4: @pgmdrawable: the object which received the signal. @arg1: @arg2: @arg3: @arg4: @Returns: @pgmdrawable: the object which received the signal. @arg1: @Returns: @Param4: @Param5: @Param6: @Returns: @Returns: @pgmdrawable: the object which received the signal. @arg1: @arg2: @arg3: @arg4: @arg5: @arg6: @Returns: @pgmdrawable: the object which received the signal. @arg1: @Returns: @Returns: @Param5: @Param6: @Returns: @pgmdrawable: the object which received the signal. @arg1: @arg2: @arg3: @arg4: @arg5: @Returns: @parent_class: @changed: @pressed: @pressured: @released: @clicked: @double_clicked: @scrolled: @drag_begin: @drag_motion: @drag_end: @motion: @entered: @left: @hide: @show: @set_size: @set_position: @set_fg_color: @set_bg_color: @set_opacity: @drawable: @Returns: @drawable: @Returns: @drawable: @visible: @Returns: @drawable: @width: @height: @Returns: @drawable: @width: @height: @Returns: @drawable: @x: @y: @z: @Returns: @drawable: @x: @y: @z: @Returns: @drawable: @angle: @Returns: @drawable: @angle: @Returns: @drawable: @angle: @Returns: @drawable: @angle: @Returns: @drawable: @angle: @Returns: @drawable: @angle: @Returns: @drawable: @scale: @Returns: @drawable: @scale: @Returns: @drawable: @r: @g: @b: @a: @Returns: @drawable: @r: @g: @b: @a: @Returns: @drawable: @r: @g: @b: @a: @Returns: @drawable: @r: @g: @b: @a: @Returns: @drawable: @opacity: @Returns: @drawable: @opacity: @Returns: @drawable: @aligned: @Returns: @drawable: @aligned: @Returns: @drawable: @distance: @Returns: @drawable: @distance: @Returns: @drawable: @Returns: @drawable: @x_drawable: @y_drawable: @x_canvas: @y_canvas: @z_canvas: @Returns: @drawable: @x_canvas: @y_canvas: @z_canvas: @x_drawable: @y_drawable: @Returns: pigment-0.3.17/docs/pgm/tmpl/pgmimaging.sgml0000644000175000017500000000066111205035140015652 00000000000000 PgmImaging @pixbuf: @start_x: @start_y: @start_alpha: @end_x: @end_y: @end_alpha: @Returns: pigment-0.3.17/docs/pgm/tmpl/pgmimagesink.sgml0000644000175000017500000000210011205035140016174 00000000000000 PgmImageSink @PGM_IMAGE_SINK_MOTION: @PGM_IMAGE_SINK_PRESSED: @PGM_IMAGE_SINK_RELEASED: @name: @Returns: @sink: @image: @Returns: @sink: @image: @Returns: @sink: @events: @Returns: @sink: @events: @Returns: pigment-0.3.17/docs/pgm/tmpl/pgmviewport.sgml0000644000175000017500000002304311205035140016115 00000000000000 PgmViewport @PGM_VIEWPORT_LEFT_ARROW: @PGM_VIEWPORT_INHERIT: @PGM_VIEWPORT_NONE: @PGM_VIEWPORT_HARDWARE_ACCELERATION: @PGM_VIEWPORT_APPLICATION_EMBEDDING: @PGM_VIEWPORT_OPACITY: @PGM_VIEWPORT_TOUCHPAD: @PGM_VIEWPORT_X11_SYSTEM_BUFFER: @PGM_VIEWPORT_ROTATION_NONE: @PGM_VIEWPORT_ROTATION_90: @PGM_VIEWPORT_ROTATION_180: @PGM_VIEWPORT_ROTATION_270: @PGM_VIEWPORT_REFLECTION_NONE: @PGM_VIEWPORT_REFLECTION_HORIZONTAL_FLIP: @PGM_VIEWPORT_REFLECTION_VERTICAL_FLIP: @factory: @canvas: @message_filter: @title: @icon: @cursor: @fullscreen: @visible: @decorated: @iconified: @alpha_blending: @width: @height: @width_mm: @height_mm: @projection: @inv_projection: @projected_x: @projected_y: @projected_width: @projected_height: @rotation: @reflection: @pixel_aspect_ratio: @viewport_ratio: @canvas_ratio: @caps_mask: @opacity: @pgmviewport: the object which received the signal. @arg1: @pgmviewport: the object which received the signal. @arg1: @pgmviewport: the object which received the signal. @arg1: @pgmviewport: the object which received the signal. @arg1: @pgmviewport: the object which received the signal. @arg1: @pgmviewport: the object which received the signal. @arg1: @pgmviewport: the object which received the signal. @arg1: @pgmviewport: the object which received the signal. @arg1: @Returns: @pgmviewport: the object which received the signal. @arg1: @pgmviewport: the object which received the signal. @arg1: @pgmviewport: the object which received the signal. @arg1: @pgmviewport: the object which received the signal. @arg1: @pgmviewport: the object which received the signal. @arg1: @arg2: @arg3: @pgmviewport: the object which received the signal. @arg1: @pgmviewport: the object which received the signal. @arg1: @pgmviewport: the object which received the signal. @parent_class: @button_press_event: @button_pressure_event: @button_release_event: @key_press_event: @key_release_event: @configure_event: @delete_event: @scroll_event: @motion_notify_event: @expose_event: @drag_motion_event: @drag_drop_event: @drag_leave_event: @state_event: @win32_message_event: @pixels_read: @update_pass: @set_title: @show: @hide: @set_decorated: @set_cursor: @set_icon: @set_size: @get_size: @set_alpha_blending: @set_opacity: @set_fullscreen: @set_iconified: @focus: @set_screen_resolution: @get_screen_resolution: @set_screen_size_mm: @get_screen_size_mm: @set_canvas: @update_projection: @get_embedding_id: @get_pixel_formats: @get_caps_mask: @get_max_texture_size: @get_frame_rate: @set_message_filter: @read_pixels: @set_drag_status: @viewport: @title: @Returns: @viewport: @title: @Returns: @viewport: @Returns: @viewport: @Returns: @viewport: @visible: @Returns: @viewport: @decorated: @Returns: @viewport: @decorated: @Returns: @viewport: @cursor: @Returns: @viewport: @cursor: @Returns: @viewport: @icon: @Returns: @viewport: @icon: @Returns: @viewport: @width: @height: @Returns: @viewport: @width: @height: @Returns: @viewport: @alpha_blending: @Returns: @viewport: @alpha_blending: @Returns: @viewport: @opacity: @Returns: @viewport: @opacity: @Returns: @viewport: @fullscreen: @Returns: @viewport: @fullscreen: @Returns: @viewport: @iconified: @Returns: @viewport: @iconified: @Returns: @viewport: @Returns: @viewport: @width: @height: @Returns: @viewport: @width: @height: @Returns: @viewport: @width: @height: @Returns: @viewport: @width: @height: @Returns: @viewport: @filter: @Returns: @viewport: @filter: @Returns: @viewport: @event: @Returns: @viewport: @canvas: @Returns: @viewport: @canvas: @Returns: @viewport: @rotation: @Returns: @viewport: @rotation: @Returns: @viewport: @reflection: @Returns: @viewport: @reflection: @Returns: @viewport: @Returns: @viewport: @canvas_x: @canvas_y: @canvas_z: @viewport_x: @viewport_y: @viewport_z: @Returns: @viewport: @viewport_x: @viewport_y: @viewport_z: @canvas_x: @canvas_y: @canvas_z: @Returns: @viewport: @embedding_id: @Returns: @viewport: @formats_mask: @Returns: @viewport: @caps_mask: @Returns: @viewport: @max_texture_size: @Returns: @viewport: @frame_rate: @Returns: @viewport: @x: @y: @width: @height: @pixels: @Returns: @viewport: @width: @height: @pixels: @Returns: @viewport: @Returns: pigment-0.3.17/docs/pgm/tmpl/pigment-unused.sgml0000644000175000017500000000000011205035140016462 00000000000000pigment-0.3.17/docs/pgm/version-short.xml0000644000175000017500000000000411205034714015234 000000000000000.3 pigment-0.3.17/docs/pgm/pigment-docs.sgml0000644000175000017500000001156111205034416015156 00000000000000 ]> Pigment &PGM_MAJORMINOR; Reference Manual for Pigment &PGM_VERSION; 2006 2007 2008 Fluendo Embedded S.L. Introduction Pigment is a library for creating rich application user interfaces. It allows embedding multimedia contents such as audio and video thanks to a simple integration of the GStreamer library. Pigment uses a plugin system allowing to render interfaces using different rendering API such as OpenGL, OpenGL ES or Direct3D. It works on many UNIX-like platforms, Windows, Mac and embedded devices. Pigment has originally been created to be used in the Elisa Media Center, but is also really useful for projects looking for slick, efficient and innovative user interfaces. Pigment is released under the GNU Lesser General Public License (GNU LGPL), which allows for flexible licensing of client applications. Pigment has a C-based object-oriented architecture that allows for maximum flexibility. Bindings for other languages like Python have been written. Pigment depends on the following libraries: GLib A general-purpose utility library, not specific to graphical user interfaces. GLib provides many useful data types, macros, type conversions, string utilities, file utilities, a main loop abstraction, and so on. GdkPixbuf A small library which allowing to load pixel buffers from image data or image files of several formats. GStreamer A library that allows the construction of graphs of media-handling components, ranging from simple Ogg/Vorbis playback to complex audio and video processing. Applications can take advantage of advances in codec and filter technology transparently. Developers can add new codecs and filters by writing a simple plugin with a clean, generic interface. Pigment Overview How to use and develop Pigment applications. &pgm-compiling; &pgm-running; Pigment Core Reference The Pigment core library reference. Pigment Library Reference The Pigment external libraries reference. Object Hierarchy Index pigment-0.3.17/docs/pgm/compiling.xml0000644000175000017500000000264411205034416014406 00000000000000 Compiling Pigment Applications 3 Pigment Library Compiling Pigment Applications Compile your Pigment applications. Compiling Pigment Applications on UNIX To compile a Pigment application, you need to tell the compiler where to find the Pigment header files and libraries. This is done with the pkg-config utility. The following interactive shell session demonstrates how pkg-config is used (the actual output on your system may be different): $ pkg-config --cflags pigment-&PGM_MAJORMINOR; -I/usr/include/pigment-&PGM_MAJORMINOR; $ pkg-config --libs pigment-&PGM_MAJORMINOR; -L/usr/lib -lpigment-&PGM_MAJORMINOR; The simplest way to compile a program is to use the "backticks" feature of the shell. If you enclose a command in backticks (not single quotes), then its output will be substituted into the command line before execution. So to compile a Pigment "Hello World", you would type the following: $ cc `pkg-config --cflags --libs pigment-&PGM_MAJORMINOR;` hello.c -o hello pigment-0.3.17/docs/pgm/Makefile.in0000644000175000017500000005324611205034671013757 00000000000000# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # -*- mode: makefile -*- #################################### # Everything below here is generic # #################################### VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ # Add the GTK+ symbols if available @USE_GTK_WIDGET_TRUE@am__append_1 = $(GTK_CFLAGS) @USE_GTK_WIDGET_TRUE@am__append_2 = \ @USE_GTK_WIDGET_TRUE@ $(top_builddir)/pgm/gtk/libpigment-gtk-@PGM_MAJORMINOR@.la \ @USE_GTK_WIDGET_TRUE@ $(GTK_LIBS) DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/version-full.xml.in $(srcdir)/version-short.xml.in \ $(top_srcdir)/gtk-doc.make subdir = docs/pgm ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/as-compiler-flag.m4 \ $(top_srcdir)/common/m4/as-version.m4 \ $(top_srcdir)/common/m4/check.m4 \ $(top_srcdir)/common/m4/gst-args.m4 \ $(top_srcdir)/common/m4/gst-check.m4 \ $(top_srcdir)/common/m4/gst-error.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/libtool.m4 \ $(top_srcdir)/common/m4/ltoptions.m4 \ $(top_srcdir)/common/m4/ltsugar.m4 \ $(top_srcdir)/common/m4/ltversion.m4 \ $(top_srcdir)/common/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = version-short.xml version-full.xml SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAIROXLIB_CFLAGS = @CAIROXLIB_CFLAGS@ CAIROXLIB_LIBS = @CAIROXLIB_LIBS@ CAIRO_CFLAGS = @CAIRO_CFLAGS@ CAIRO_LIBS = @CAIRO_LIBS@ CC = @CC@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXEEXT = @EXEEXT@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ GCOV = @GCOV@ GCOV_CFLAGS = @GCOV_CFLAGS@ GCOV_LIBS = @GCOV_LIBS@ GDKPIXBUFXLIB_CFLAGS = @GDKPIXBUFXLIB_CFLAGS@ GDKPIXBUFXLIB_LIBS = @GDKPIXBUFXLIB_LIBS@ GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@ GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ GST_0_10_13_CFLAGS = @GST_0_10_13_CFLAGS@ GST_0_10_13_LIBS = @GST_0_10_13_LIBS@ GST_10_10_CFLAGS = @GST_10_10_CFLAGS@ GST_10_10_LIBS = @GST_10_10_LIBS@ GST_10_11_CFLAGS = @GST_10_11_CFLAGS@ GST_10_11_LIBS = @GST_10_11_LIBS@ GST_10_12_CFLAGS = @GST_10_12_CFLAGS@ GST_10_12_LIBS = @GST_10_12_LIBS@ GST_10_13_CFLAGS = @GST_10_13_CFLAGS@ GST_10_13_LIBS = @GST_10_13_LIBS@ GST_10_14_CFLAGS = @GST_10_14_CFLAGS@ GST_10_14_LIBS = @GST_10_14_LIBS@ GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ GST_BASE_LIBS = @GST_BASE_LIBS@ GST_CFLAGS = @GST_CFLAGS@ GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ GST_CHECK_LIBS = @GST_CHECK_LIBS@ GST_LIBS = @GST_LIBS@ GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ GST_TOOLS_DIR = @GST_TOOLS_DIR@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_GTK_WIDGET = @HAVE_GTK_WIDGET@ HAVE_IMAGING_LIBRARY = @HAVE_IMAGING_LIBRARY@ HAVE_OPENGLES_PLUGIN = @HAVE_OPENGLES_PLUGIN@ HAVE_OPENGL_PLUGIN = @HAVE_OPENGL_PLUGIN@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGLADE_2_0_CFLAGS = @LIBGLADE_2_0_CFLAGS@ LIBGLADE_2_0_LIBS = @LIBGLADE_2_0_LIBS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENGLES_BACKEND = @OPENGLES_BACKEND@ OPENGL_BACKEND = @OPENGL_BACKEND@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ PANGOCAIRO_CFLAGS = @PANGOCAIRO_CFLAGS@ PANGOCAIRO_LIBS = @PANGOCAIRO_LIBS@ PANGO_1_16_CFLAGS = @PANGO_1_16_CFLAGS@ PANGO_1_16_LIBS = @PANGO_1_16_LIBS@ PANGO_CFLAGS = @PANGO_CFLAGS@ PANGO_LIBS = @PANGO_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL_PATH = @PERL_PATH@ PGM_ALL_CFLAGS = @PGM_ALL_CFLAGS@ PGM_ALL_LDFLAGS = @PGM_ALL_LDFLAGS@ PGM_ALL_LIBS = @PGM_ALL_LIBS@ PGM_GLES_CFLAGS = @PGM_GLES_CFLAGS@ PGM_GLES_LIBS = @PGM_GLES_LIBS@ PGM_GL_CFLAGS = @PGM_GL_CFLAGS@ PGM_GL_LIBS = @PGM_GL_LIBS@ PGM_GTKDOC_CFLAGS = @PGM_GTKDOC_CFLAGS@ PGM_LIB_LDFLAGS = @PGM_LIB_LDFLAGS@ PGM_LT_LDFLAGS = @PGM_LT_LDFLAGS@ PGM_LT_VERSION = @PGM_LT_VERSION@ PGM_MAJORMINOR = @PGM_MAJORMINOR@ PGM_OBJ_CFLAGS = @PGM_OBJ_CFLAGS@ PGM_OBJ_LIBS = @PGM_OBJ_LIBS@ PGM_OPTION_CFLAGS = @PGM_OPTION_CFLAGS@ PGM_PLUGIN_LDFLAGS = @PGM_PLUGIN_LDFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PLUGIN_PATH = @PLUGIN_PATH@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XCOMPOSITE_CFLAGS = @XCOMPOSITE_CFLAGS@ XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ XMKMF = @XMKMF@ XRENDER_CFLAGS = @XRENDER_CFLAGS@ XRENDER_LIBS = @XRENDER_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cairo_req = @cairo_req@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ glib_req = @glib_req@ gstreamer_plugins_base_req = @gstreamer_plugins_base_req@ gstreamer_req = @gstreamer_req@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pango_req = @pango_req@ pangocairo_req = @pangocairo_req@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = 1.6 # The name of the module. DOC_MODULE = pigment # The top-level SGML file. DOC_MAIN_SGML_FILE = $(DOC_MODULE)-docs.sgml # The directory containing the source code. Relative to $(srcdir). DOC_SOURCE_DIR = $(top_srcdir)/pgm # Extra options to supply to gtkdoc-scan. SCAN_OPTIONS = # Extra options to supply to gtkdoc-mkdb. MKDB_OPTIONS = \ --sgml-mode \ --output-format=xml \ --ignore-files=parse # Extra options to supply to gtkdoc-mktmpl MKTMPL_OPTIONS = # Extra options to supply to gtkdoc-fixref. FIXXREF_OPTIONS = \ $(GLIB_PREFIX)/share/gtk-doc/html/gobject \ --extra-dir=$(GLIB_PREFIX)/share/gtk-doc/html/glib # Used for dependencies. The docs will be rebuilt if any of these change. HFILE_GLOB = \ $(top_srcdir)/pgm/*.h \ $(top_srcdir)/pgm/gtk/*.h \ $(top_srcdir)/pgm/imaging/*.h CFILE_GLOB = \ $(top_srcdir)/pgm/*.c \ $(top_srcdir)/pgm/gtk/*.c \ $(top_srcdir)/pgm/imaging/*.c # Extra options to pass to gtkdoc-scangobj. SCANGOBJ_OPTIONS = --type-init-func="pgm_init(&argc,&argv)" # Header files to ignore when scanning. IGNORE_HFILES = \ pgmkeysyms.h \ pgmmarshal.h \ pgmenumtypes.h # Images to copy into HTML directory. HTML_IMAGES = \ images/scaled_layout.png \ images/filled_layout.png \ images/zoomed_layout.png # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE). content_files = \ version-short.xml \ version-full.xml \ running.xml \ glossary.xml \ compiling.xml # SGML files where gtk-doc abbrevations (#GtkWidget) are expanded # These files must be listed here *and* in content_files expand_content_files = # CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library. # Only needed if you are using gtkdoc-scangobj to dynamically query widget # signals and properties. GTKDOC_CFLAGS = $(PGM_GTKDOC_CFLAGS) $(am__append_1) GTKDOC_LIBS = $(PGM_OBJ_LIBS) $(am__append_2) @GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_CC = $(LIBTOOL) --mode=compile $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) @GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_LD = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) @GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_RUN = sh -c @GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_RUN = $(LIBTOOL) --mode=execute # We set GPATH here; this gives us semantics for GNU make # which are more like other make's VPATH, when it comes to # whether a source that is a target of one rule is then # searched for in VPATH/GPATH. # GPATH = $(srcdir) TARGET_DIR = $(HTML_DIR)/$(DOC_MODULE) # This includes the standard gtk-doc make rules, copied by gtkdocize. # Other files to distribute EXTRA_DIST = $(content_files) $(HTML_IMAGES) $(DOC_MAIN_SGML_FILE) \ $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt \ version-short.xml.in version-full.xml.in DOC_STAMPS = scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \ $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp SCANOBJ_FILES = \ $(DOC_MODULE).args \ $(DOC_MODULE).hierarchy \ $(DOC_MODULE).interfaces \ $(DOC_MODULE).prerequisites \ $(DOC_MODULE).signals REPORT_FILES = \ $(DOC_MODULE)-undocumented.txt \ $(DOC_MODULE)-undeclared.txt \ $(DOC_MODULE)-unused.txt CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/gtk-doc.make $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/pgm/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu docs/pgm/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh version-short.xml: $(top_builddir)/config.status $(srcdir)/version-short.xml.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ version-full.xml: $(top_builddir)/config.status $(srcdir)/version-full.xml.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am check: check-am all-am: Makefile all-local installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-local dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-data-local install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic \ maintainer-clean-local mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-local .MAKE: install-am install-strip .PHONY: all all-am all-local check check-am clean clean-generic \ clean-libtool clean-local dist-hook distclean \ distclean-generic distclean-libtool distclean-local distdir \ dvi dvi-am html html-am info info-am install install-am \ install-data install-data-am install-data-local install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic \ maintainer-clean-local mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-local @ENABLE_GTK_DOC_TRUE@all-local: html-build.stamp @ENABLE_GTK_DOC_FALSE@all-local: docs: html-build.stamp $(REPORT_FILES): sgml-build.stamp #### scan #### scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) @echo 'gtk-doc: Scanning header files' @-chmod -R u+w $(srcdir) cd $(srcdir) && \ gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES) if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \ else \ cd $(srcdir) ; \ for i in $(SCANOBJ_FILES) ; do \ test -f $$i || touch $$i ; \ done \ fi touch scan-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp @true #### templates #### tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt @echo 'gtk-doc: Rebuilding template files' @-chmod -R u+w $(srcdir) cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS) touch tmpl-build.stamp tmpl.stamp: tmpl-build.stamp @true tmpl/*.sgml: @true #### xml #### sgml-build.stamp: tmpl.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files) @echo 'gtk-doc: Building XML' @-chmod -R u+w $(srcdir) cd $(srcdir) && \ gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS) touch sgml-build.stamp sgml.stamp: sgml-build.stamp @true #### html #### html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) @echo 'gtk-doc: Building HTML' @-chmod -R u+w $(srcdir) rm -rf $(srcdir)/html mkdir $(srcdir)/html mkhtml_options=""; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \ if test "$(?)" = "0"; then \ mkhtml_options=--path="$(srcdir)"; \ fi cd $(srcdir)/html && gtkdoc-mkhtml $(mkhtml_options) $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html ) @echo 'gtk-doc: Fixing cross-references' cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) touch html-build.stamp ############## clean-local: rm -f *~ *.bak rm -rf .libs distclean-local: cd $(srcdir) && \ rm -rf xml $(REPORT_FILES) \ $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt maintainer-clean-local: clean cd $(srcdir) && rm -rf xml html install-data-local: installfiles=`echo $(srcdir)/html/*`; \ if test "$$installfiles" = '$(srcdir)/html/*'; \ then echo '-- Nothing to install' ; \ else \ if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ else \ installdir="$(DESTDIR)$(TARGET_DIR)"; \ fi; \ $(mkinstalldirs) $${installdir} ; \ for i in $$installfiles; do \ echo '-- Installing '$$i ; \ $(INSTALL_DATA) $$i $${installdir}; \ done; \ if test -n "$(DOC_MODULE_VERSION)"; then \ mv -f $${installdir}/$(DOC_MODULE).devhelp2 \ $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \ mv -f $${installdir}/$(DOC_MODULE).devhelp \ $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp; \ fi; \ ! which gtkdoc-rebase >/dev/null 2>&1 || \ gtkdoc-rebase --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir} ; \ fi uninstall-local: if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ else \ installdir="$(DESTDIR)$(TARGET_DIR)"; \ fi; \ rm -rf $${installdir} # # Require gtk-doc when making dist # @ENABLE_GTK_DOC_TRUE@dist-check-gtkdoc: @ENABLE_GTK_DOC_FALSE@dist-check-gtkdoc: @ENABLE_GTK_DOC_FALSE@ @echo "*** gtk-doc must be installed and enabled in order to make dist" @ENABLE_GTK_DOC_FALSE@ @false dist-hook: dist-check-gtkdoc dist-hook-local mkdir $(distdir)/tmpl mkdir $(distdir)/xml mkdir $(distdir)/html -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl -cp $(srcdir)/xml/*.xml $(distdir)/xml cp $(srcdir)/html/* $(distdir)/html -cp $(srcdir)/$(DOC_MODULE).types $(distdir)/ -cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/ cd $(distdir) && rm -f $(DISTCLEANFILES) ! which gtkdoc-rebase >/dev/null 2>&1 || \ gtkdoc-rebase --online --relative --html-dir=$(distdir)/html .PHONY : dist-hook-local docs # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pigment-0.3.17/docs/pgm/xml/0000777000175000017500000000000011205035140012554 500000000000000pigment-0.3.17/docs/pgm/xml/pgmcommon.xml0000644000175000017500000001414311205035140015211 00000000000000 ]> PgmCommon 3 PIGMENT Library PgmCommon Various functions used for common tasks. Synopsis #include <pgm/pgm.h> #define PGM_DEGREES_TO_RADIANS (theta) #define PGM_RADIANS_TO_DEGREES (theta) #define PGM_SINCOS (theta,s,c) #define PGM_FABSF (x) gint32 pgm_lrintf (gfloat x); enum PgmError; Description Various functions used by Pigment for common tasks. Last reviewed on 2009-05-07 (0.3.16) Details PGM_DEGREES_TO_RADIANS() PGM_DEGREES_TO_RADIANS#define PGM_DEGREES_TO_RADIANS(theta) ((theta) * (G_PI / 180.0f)) Converts from degrees to radians. theta : an angle in degrees. PGM_RADIANS_TO_DEGREES() PGM_RADIANS_TO_DEGREES#define PGM_RADIANS_TO_DEGREES(theta) ((theta) * (180.0f / G_PI)) Converts from radians to degrees. theta : an angle in radians. PGM_SINCOS() PGM_SINCOS#define PGM_SINCOS(theta,s,c) Calculates sine and cosine of the angle theta simultaneously. theta : a float representing an angle in radians. s : the address of the float where the sine value is going to be stored. c : the address of the float where the cosine value is going to be stored. PGM_FABSF() PGM_FABSF#define PGM_FABSF(x) Calculates the absolute value of float. x : the floating-point number. pgm_lrintf () pgm_lrintfgint32 pgm_lrintf (gfloat x); Round x to nearest integer using the current FPU rounding mode. On platforms other than Windows where the C99 lrintf function is not available, the function reverts to a float-to-int cast which uses the truncate FPU rounding mode. x : the input floating-point number. Returns : the rounded nearest integer. enum PgmError PgmErrortypedef enum { PGM_ERROR_X, PGM_ERROR_OK } PgmError; Every Pigment method returns an error code from that list. PGM_ERROR_X Generic error code. PGM_ERROR_OK No error occured. pigment-0.3.17/docs/pgm/xml/pgmimage.xml0000644000175000017500000033413511205035140015011 00000000000000 ]> PgmImage 3 PIGMENT Library PgmImage An image drawable supporting various media. Synopsis #include <pgm/pgm.h> enum PgmImageAlignment; enum PgmImageLayoutType; enum PgmImageInterpType; enum PgmImageWrapping; enum PgmImagePixelFormat; PgmImageFile; PgmImageBuffer; PgmImageGstBuffer; PgmImageSystemBuffer; PgmImagePixbuf; enum PgmImageStorageType; union PgmImageData; PgmImage; PgmDrawable * pgm_image_new (void); PgmDrawable * pgm_image_new_from_file (const gchar *filename, guint max_size); PgmDrawable * pgm_image_new_from_pixbuf (GdkPixbuf *pixbuf); PgmDrawable * pgm_image_new_from_buffer (PgmImagePixelFormat format, guint width, guint height, guint stride, guint size, gconstpointer data); PgmDrawable * pgm_image_new_from_image (PgmImage *src_image); PgmError pgm_image_set_from_file (PgmImage *image, const gchar *filename, guint max_size); PgmError pgm_image_set_from_pixbuf (PgmImage *image, GdkPixbuf *pixbuf); PgmError pgm_image_set_from_buffer (PgmImage *image, PgmImagePixelFormat format, guint width, guint height, guint stride, guint size, gconstpointer data); PgmError pgm_image_set_from_gst_buffer (PgmImage *image, PgmImagePixelFormat format, guint width, guint height, guint stride, GstBuffer *buffer); PgmError pgm_image_set_from_system_buffer (PgmImage *image, PgmImagePixelFormat format, guint width, guint height, gconstpointer system_buffer); PgmError pgm_image_set_from_image (PgmImage *image, PgmImage *src_image); PgmError pgm_image_to_pixbuf (PgmImage *image, GdkPixbuf **pixbuf); PgmError pgm_image_clear (PgmImage *image); PgmError pgm_image_get_storage_type (PgmImage *image, PgmImageStorageType *storage); PgmError pgm_image_system_buffer_lock (PgmImage *image); PgmError pgm_image_system_buffer_unlock (PgmImage *image); PgmError pgm_image_set_mapping_matrix (PgmImage *image, PgmMat4x4 *mapping_matrix); PgmError pgm_image_get_mapping_matrix (PgmImage *image, PgmMat4x4 **mapping_matrix); PgmError pgm_image_set_alignment (PgmImage *image, PgmImageAlignment align); PgmError pgm_image_get_alignment (PgmImage *image, PgmImageAlignment *align); PgmError pgm_image_set_layout (PgmImage *image, PgmImageLayoutType layout); PgmError pgm_image_get_layout (PgmImage *image, PgmImageLayoutType *layout); PgmError pgm_image_set_interp (PgmImage *image, PgmImageInterpType interp); PgmError pgm_image_get_interp (PgmImage *image, PgmImageInterpType *interp); PgmError pgm_image_set_wrapping (PgmImage *image, PgmImageWrapping wrap_s, PgmImageWrapping wrap_t); PgmError pgm_image_get_wrapping (PgmImage *image, PgmImageWrapping *wrap_s, PgmImageWrapping *wrap_t); PgmError pgm_image_set_aspect_ratio (PgmImage *image, guint numerator, guint denominator); PgmError pgm_image_get_aspect_ratio (PgmImage *image, guint *numerator, guint *denominator); PgmError pgm_image_set_border_width (PgmImage *image, gfloat width); PgmError pgm_image_get_border_width (PgmImage *image, gfloat *width); PgmError pgm_image_set_border_inner_color (PgmImage *image, guchar red, guchar green, guchar blue, guchar alpha); PgmError pgm_image_get_border_inner_color (PgmImage *image, guchar *red, guchar *green, guchar *blue, guchar *alpha); PgmError pgm_image_set_border_outer_color (PgmImage *image, guchar red, guchar green, guchar blue, guchar alpha); PgmError pgm_image_get_border_outer_color (PgmImage *image, guchar *red, guchar *green, guchar *blue, guchar *alpha); PgmError pgm_image_from_drawable (PgmImage *image, gint *x_image, gint *y_image, gfloat x_drawable, gfloat y_drawable); PgmError pgm_image_to_drawable (PgmImage *image, gfloat *x_drawable, gfloat *y_drawable, gint x_image, gint y_image); Object Hierarchy GObject +----GstObject +----PgmDrawable +----PgmImage Signals "cloned" : Run First "file-loaded" : Run First "un-cloned" : Run First Description PgmImage is a drawable displaying media. It supports various ways of loading images through buffers, file paths or videos through GStreamer. Loading image data Image data loading can happen with three different functions: pgm_image_set_from_buffer() takes a pre-loaded data buffer and sets it as the currently displayed image. This is useful when you want to use an image loading library (GdkPixbuf, FreeImage, etc) in your application and just provide the pixels to PgmImage for display. The data buffer containing the pixels is copied internally, you can free the data buffer from the application side as soon as the function returns. pgm_image_set_from_gst_buffer() takes a GStreamer GstBuffer and sets it as the currently displayed image. This is mostly used to do video rendering. There's no copying of the buffer data to optimize performances, indeed the reference count of the buffer is going to be increased to keep the buffer around while it's needed for rendering. When you call pgm_image_clear() the reference to the buffer will be decreased and the buffer can get freed. Note that this method is used by PgmSink to render video frames directly in a PgmImage when the pipeline is playing. pgm_image_set_from_file() takes a path to an image file delegating image loading to Pigment. Thus the loading is asynchronous and won't block the Pigment main loop. Sharing image data between <link linkend="PgmImage"><type>PgmImage</type></link> objects pgm_image_set_from_image() is a convenient system to slave an image to another one. Indeed you might want to load an image data once and then use it in multiple image objects. In that case this image becomes a slave to the one that has the image data loaded internally and each time it needs to draw it will use that data. Layout settings of the drawable are independent from one image to another. That means that even if two image objects are using the same image, they can have different colors, different PgmDrawableLayoutType or different PgmDrawableAlignment. Each time a new image data buffer is loaded in the master image object, all the slave image objects are automatically updated. That means you can render a video clip in ten different drawables without doing anything else than slaving nine image objects to the one that's receiving the image data. Image data aspect ratio This rarely happens with normal images but video rendering often has non square pixels video frames coming out of the video decoders (DVD, DV cameras, etc). In that case a calculation has to be done when projecting to the viewport so that we put in adequation both the pixel aspect ratio and the source video aspect ratio. You can set the image aspect ratio using pgm_image_set_aspect_ratio() and be assured that Pigment is going to render that image correctly on the viewport. Benefitting from hardware acceleration Depending on the viewport implementation, some PgmImagePixelFormat (color space) can be supported or not. When it comes to video rendering, hardware acceleration is very important and you need to know what kind of pixel formats are convenient for the rendering backend. you can get a list of supported (accelerated) pixel formats using pgm_viewport_get_pixel_formats(). Last reviewed on 2007-11-08 (0.3.2) Details enum PgmImageAlignment PgmImageAlignmenttypedef enum { PGM_IMAGE_LEFT = (1 << 0), PGM_IMAGE_CENTER = (1 << 1), PGM_IMAGE_RIGHT = (1 << 2), PGM_IMAGE_TOP = (1 << 3), PGM_IMAGE_BOTTOM = (1 << 4), PGM_IMAGE_TOP_LEFT = (PGM_IMAGE_TOP | PGM_IMAGE_LEFT), PGM_IMAGE_TOP_CENTER = (PGM_IMAGE_TOP | PGM_IMAGE_CENTER), PGM_IMAGE_TOP_RIGHT = (PGM_IMAGE_TOP | PGM_IMAGE_RIGHT), PGM_IMAGE_BOTTOM_LEFT = (PGM_IMAGE_BOTTOM | PGM_IMAGE_LEFT), PGM_IMAGE_BOTTOM_CENTER = (PGM_IMAGE_BOTTOM | PGM_IMAGE_CENTER), PGM_IMAGE_BOTTOM_RIGHT = (PGM_IMAGE_BOTTOM | PGM_IMAGE_RIGHT) } PgmImageAlignment; The possible alignments you can combine. PGM_IMAGE_LEFT Align to the left. PGM_IMAGE_CENTER Align to the center (both vertically and horizontally). PGM_IMAGE_RIGHT Align to the right. PGM_IMAGE_TOP Align to the top. PGM_IMAGE_BOTTOM Align to the bottom. PGM_IMAGE_TOP_LEFT Align to the top left. PGM_IMAGE_TOP_CENTER Align to the top center. PGM_IMAGE_TOP_RIGHT Align to the top right. PGM_IMAGE_BOTTOM_LEFT Align to the bottom left. PGM_IMAGE_BOTTOM_CENTER Align to the bottom center. PGM_IMAGE_BOTTOM_RIGHT Align to the bottom right. enum PgmImageLayoutType PgmImageLayoutTypetypedef enum { PGM_IMAGE_FILLED = 0, PGM_IMAGE_SCALED = 1, PGM_IMAGE_ZOOMED = 2, PGM_IMAGE_CENTERED = 3, PGM_IMAGE_TILED = 4 } PgmImageLayoutType; The different layout types. PGM_IMAGE_FILLED Scales the stored image to the whole drawable size ignoring the pixel-aspect-ratio. PGM_IMAGE_SCALED Scales the stored image to adapt its size to the drawable one keeping the pixel-aspect-ratio. PGM_IMAGE_ZOOMED Scales the stored image to the whole drawable size keeping the pixel-aspect-ratio. It crops the border of the stored image. PGM_IMAGE_CENTERED Centers the stored image in the middle of the drawable keeping the pixel-aspect-ratio. It crops the image if its size is bigger than the drawable size. PGM_IMAGE_TILED Repeats the stored image along the drawable. enum PgmImageInterpType PgmImageInterpTypetypedef enum { PGM_IMAGE_NEAREST, PGM_IMAGE_BILINEAR } PgmImageInterpType; The different image interpolation types. PGM_IMAGE_NEAREST The nearest neighbour sampling is the fastest and lowest quality mode. PGM_IMAGE_BILINEAR The bilinear sampling is the slowest and highest quality mode. enum PgmImageWrapping PgmImageWrappingtypedef enum { PGM_IMAGE_CLAMP, PGM_IMAGE_TRANSPARENT, PGM_IMAGE_REPEAT } PgmImageWrapping; The different image wrapping types. PGM_IMAGE_CLAMP The image content is displayed in the mapping range [0.0, 1.0] and clamped to the last pixel outside it. PGM_IMAGE_TRANSPARENT The image content is displayed in the mapping range [0.0, 1.0] and discarded outside it. Can be used in combination with the PGM_IMAGE_BILINEAR filtering to antialias the edges of images. PGM_IMAGE_REPEAT The image content is displayed in the mapping range [0.0, 1.0] and repeated infinitely outside it. enum PgmImagePixelFormat PgmImagePixelFormattypedef enum { PGM_IMAGE_RGB = (1 << 0), PGM_IMAGE_BGR = (1 << 1), PGM_IMAGE_RGBA = (1 << 2), PGM_IMAGE_BGRA = (1 << 3), PGM_IMAGE_I420 = (1 << 4), PGM_IMAGE_YV12 = (1 << 5), PGM_IMAGE_UYVY = (1 << 6), PGM_IMAGE_YUYV = (1 << 7) } PgmImagePixelFormat; The different image pixel formats. PGM_IMAGE_RGB 24 bits RGB (3 bytes, red 8 @ 16, green 8 @ 8, blue 8 @ 0). PGM_IMAGE_BGR 24 bits BGR (3 bytes, blue 8 @ 16, green 8 @ 8, red 8 @ 0). PGM_IMAGE_RGBA 32 bits RGBA (4 bytes, red 8 @ 24, green 8 @ 16, blue 8 @ 8, alpha 8 @ 0). PGM_IMAGE_BGRA 32 bits BGRA (4 bytes, blue 8 @ 24, green 8 @ 16, red 8 @ 8, alpha 8 @ 0). PGM_IMAGE_I420 12 bits YUV (8 bits Y plane followed by 8 bits quarter size U/V planes). PGM_IMAGE_YV12 12 bits YUV (8 bits Y plane followed by 8 bits quarter size V/U planes). PGM_IMAGE_UYVY 16 bits YUV (4 bytes / 2 pixels, macropixel contains YCbYCr [31:0]). PGM_IMAGE_YUYV 16 bits YUV (4 bytes / 2 pixels, macropixel contains CbYCrY [31:0], duplicate of YUY2). PgmImageFile PgmImageFiletypedef struct { GdkPixbuf *pixbuf; gchar *filename; guint width; guint height; } PgmImageFile; The PgmImageFile structure. GdkPixbuf *pixbuf; the GdkPixbuf object. gchar *filename; the file name. guint width; the cached pixbuf width. guint height; the cached pixbuf height. PgmImageBuffer PgmImageBuffertypedef struct { guint8 *buffer; PgmImagePixelFormat format; guint width; guint height; guint stride; guint size; } PgmImageBuffer; The PgmImageBuffer structure. guint8 *buffer; the buffer pointer. PgmImagePixelFormat format; the buffer format. guint width; the buffer width. guint height; the buffer height. guint stride; the buffer stride. guint size; the buffer size. PgmImageGstBuffer PgmImageGstBuffertypedef struct { GstBuffer *gst_buffer; PgmImagePixelFormat format; guint width; guint height; guint stride; } PgmImageGstBuffer; The PgmImageGstBuffer structure. GstBuffer *gst_buffer; the GstBuffer object. PgmImagePixelFormat format; the GstBuffer format. guint width; the GstBuffer width. guint height; the GstBuffer height. guint stride; the GstBuffer stride. PgmImageSystemBuffer PgmImageSystemBuffertypedef struct { gconstpointer system_buffer; PgmImagePixelFormat format; guint width; guint height; } PgmImageSystemBuffer; The PgmImageSystemBuffer structure. gconstpointer system_buffer; the system buffer pointer. PgmImagePixelFormat format; the system buffer format. guint width; the system buffer width. guint height; the system buffer height. PgmImagePixbuf PgmImagePixbuftypedef struct { GdkPixbuf *pixbuf; } PgmImagePixbuf; The PgmImagePixbuf structure. GdkPixbuf *pixbuf; the GdkPixbuf object. enum PgmImageStorageType PgmImageStorageTypetypedef enum { PGM_IMAGE_EMPTY, PGM_IMAGE_FILE, PGM_IMAGE_BUFFER, PGM_IMAGE_GST_BUFFER, PGM_IMAGE_PIXBUF, PGM_IMAGE_IMAGE, PGM_IMAGE_SYSTEM_BUFFER } PgmImageStorageType; The different storage type. PGM_IMAGE_EMPTY no image stored. PGM_IMAGE_FILE a PgmImageFile is stored. PGM_IMAGE_BUFFER a PgmImageBuffer is stored. PGM_IMAGE_GST_BUFFER a PgmImageGstBuffer is stored. PGM_IMAGE_PIXBUF a PgmImagePixbuf is stored. PGM_IMAGE_IMAGE a PgmImage is stored. PGM_IMAGE_SYSTEM_BUFFER a PgmImageSystemBuffer is stored. union PgmImageData PgmImageDataunion PgmImageData { PgmImageFile file; PgmImageBuffer buffer; PgmImageGstBuffer gst_buffer; PgmImagePixbuf pixbuf; PgmImageSystemBuffer system_buffer; }; The stored data depending on the storage type. PgmImage PgmImagetypedef struct { /* Slavery handling */ PgmImage *master; GList *slaves; PgmMat4x4 *mapping_matrix; /* Image storage */ PgmImageStorageType storage_type; PgmImageData data; /* Image displaying properties */ PgmImageLayoutType layout; PgmImageAlignment align; PgmImageInterpType interp; PgmImageWrapping wrap_s; PgmImageWrapping wrap_t; guint par_n, par_d; /* Image border */ gfloat border_width; guchar border_inner_r; guchar border_inner_g; guchar border_inner_b; guchar border_inner_a; guchar border_outer_r; guchar border_outer_g; guchar border_outer_b; guchar border_outer_a; } PgmImage; The PgmImage structure. PgmImage *master; the image PgmImage master. GList *slaves; the image list of PgmImage slaves. PgmMat4x4 *mapping_matrix; the image mapping matrix. PgmImageStorageType storage_type; the currently stored image type. PgmImageData data; the image data depending on the type. PgmImageLayoutType layout; the image layout. PgmImageAlignment align; the image alignment. PgmImageInterpType interp; the image interpolation. PgmImageWrapping wrap_s; the image s wrapping. PgmImageWrapping wrap_t; the image t wrapping. guint par_n; the image pixel-aspect-ratio numerator. guint par_d; the image pixel-aspect-ratio denominator. gfloat border_width; the image border width. guchar border_inner_r; the image border outer red color. guchar border_inner_g; the image border outer green color. guchar border_inner_b; the image border outer blue color. guchar border_inner_a; the image border outer alpha color. guchar border_outer_r; the image border outer red color. guchar border_outer_g; the image border outer green color. guchar border_outer_b; the image border outer blue color. guchar border_outer_a; the image border outer alpha color. pgm_image_new () pgm_image_newPgmDrawable * pgm_image_new (void); Creates a new PgmImage instance. MT safe. Returns : a new PgmImage instance. pgm_image_new_from_file () pgm_image_new_from_filePgmDrawable * pgm_image_new_from_file (const gchar *filename, guint max_size); Creates a new PgmImage instance loading an image from the given filename. It optionally pre-scales the image so that it has a maximum width and height of max_size. The loading is done asynchronously, it means that this function returns right after the image object is created, the loading and decoding of the image being done in another thread. The 'file-loaded' signal is emitted from the Pigment main loop (the thread running pgm_main() or the thread running a GMainLoop using the default GMainContext) once the loading finishes successfully. MT safe. filename : the filename. max_size : the maximum size of the image in pixels before loading it in the PgmImage or 0 to not constrain the size. Returns : a new PgmImage instance. pgm_image_new_from_pixbuf () pgm_image_new_from_pixbufPgmDrawable * pgm_image_new_from_pixbuf (GdkPixbuf *pixbuf); Creates a new PgmImage instance using pixbuf as stored image. MT safe. pixbuf : the GdkPixbuf. Returns : a new PgmImage instance. pgm_image_new_from_buffer () pgm_image_new_from_bufferPgmDrawable * pgm_image_new_from_buffer (PgmImagePixelFormat format, guint width, guint height, guint stride, guint size, gconstpointer data); Creates a new PgmImage instance with the image from the given buffer. MT safe. format : the pixel format of the buffer. width : the image width in pixels. height : the image height in pixels. stride : the image rowstride in bytes (number of bytes per line). size : the buffer size in bytes. data : a pointer to the data buffer. Returns : a new PgmImage instance. pgm_image_new_from_image () pgm_image_new_from_imagePgmDrawable * pgm_image_new_from_image (PgmImage *src_image); Creates a new PgmImage instance with an image slaved from the image of src_image. MT safe. src_image : a PgmImage which will be used as the master image. Returns : a new PgmImage instance. pgm_image_set_from_file () pgm_image_set_from_filePgmError pgm_image_set_from_file (PgmImage *image, const gchar *filename, guint max_size); Loads an image from the file filename. It optionally pre-scales the image so it has a maximum width and height of max_size. The loading is done asynchronously, it means that this function returns right after the image object is created, the loading and decoding of the image being done in another thread. The 'pixbuf-loaded' signal is emitted from the Pigment main loop (the thread running pgm_main() or the thread running a GMainLoop using the default GMainContext) once the loading finishes successfully. MT safe. image : a PgmImage object. filename : a filename. max_size : the maximum size of the image in pixels before loading it in the PgmImage or 0 to not constrain the size. Returns : a PgmError indicating success/failure. pgm_image_set_from_pixbuf () pgm_image_set_from_pixbufPgmError pgm_image_set_from_pixbuf (PgmImage *image, GdkPixbuf *pixbuf); Loads an image in image from a pixbuf. pixbuf will have its reference count increased by 1 and will not get freed until the drawable gets cleaned up or that a new buffer is loaded. MT safe. image : a PgmImage object. pixbuf : the GdkPixbuf. Returns : a PgmError indicating success/failure. pgm_image_set_from_buffer () pgm_image_set_from_bufferPgmError pgm_image_set_from_buffer (PgmImage *image, PgmImagePixelFormat format, guint width, guint height, guint stride, guint size, gconstpointer data); Loads an image in image from an existing buffer using pixel format format. If you don't know the rowstride of the image you can set stride to 0. data is copied internally you can free it right after the function call returns. MT safe. image : a PgmImage object. format : the pixel format of the buffer. width : the image width in pixels. height : the image height in pixels. stride : the rowstride of the image in bytes (number of bytes per line). size : the buffer size in bytes. data : a pointer to the data buffer. Returns : a PgmError indicating success/failure. pgm_image_set_from_gst_buffer () pgm_image_set_from_gst_bufferPgmError pgm_image_set_from_gst_buffer (PgmImage *image, PgmImagePixelFormat format, guint width, guint height, guint stride, GstBuffer *buffer); Loads an image in image from an existing GstBuffer using the pixel format format. If you don't know the rowstride of the image you can set stride to 0. buffer will have its reference count increased by 1 and will not get freed until the drawable gets cleaned up or that a new buffer is loaded. MT safe. image : a PgmImage object. format : the pixel format of the buffer. width : the image width in pixels. height : the image height in pixels. stride : the rowstride of the image in bytes (number of bytes per line). buffer : A GstBuffer reference containing the video frame. Returns : a PgmError indicating success/failure. pgm_image_set_from_system_buffer () pgm_image_set_from_system_bufferPgmError pgm_image_set_from_system_buffer (PgmImage *image, PgmImagePixelFormat format, guint width, guint height, gconstpointer system_buffer); Loads an image in image from an existing system buffer. A system buffer depends on the platform, for instance on UNIX with an X11 server running, system_buffer can be set to an X11 Pixmap. MT safe. image : a PgmImage object. format : the pixel format of the buffer. width : the image width in pixels. height : the image height in pixels. system_buffer : a pointer to the system buffer. Returns : a PgmError indicating success/failure. pgm_image_set_from_image () pgm_image_set_from_imagePgmError pgm_image_set_from_image (PgmImage *image, PgmImage *src_image); Slaves image to src_image. Every change to src_image is reflected on image until you remove image from the canvas or you call pgm_image_clear() on image. MT safe. image : a PgmImage object. src_image : the source PgmImage object to use as a master. Returns : a PgmError indicating success/failure. pgm_image_to_pixbuf () pgm_image_to_pixbufPgmError pgm_image_to_pixbuf (PgmImage *image, GdkPixbuf **pixbuf); Retrieves a GdkPixbuf of the image currently stored in image. Only the images stored as pixbuf can be retrieved at the moment, the conversion for the other storage types is not implemented yet. MT safe. image : a PgmImage object. pixbuf : a double pointer to GdkPixbuf. Unref after usage. Returns : a PgmError indicating success/failure. pgm_image_clear () pgm_image_clearPgmError pgm_image_clear (PgmImage *image); Removes any image from image. If image had some image data loaded, it's cleared, if there was a GstBuffer used, it's unreffed and if the image was a slave to another it is not anymore. If image has slave images they all get cleared but they still are slaves to image. So if you load a new image to image, all the slaves will load it too. MT safe. image : a PgmImage object. Returns : a PgmError indicating success/failure. pgm_image_get_storage_type () pgm_image_get_storage_typePgmError pgm_image_get_storage_type (PgmImage *image, PgmImageStorageType *storage); Retrieves the type of representation being used by image to store image data. If image has no image data, the return value will be PGM_IMAGE_EMPTY. MT safe. image : a PgmImage object. storage : a PgmImageStorageType where the storage type is going to be stored. Returns : a PgmError indicating success/failure. pgm_image_system_buffer_lock () pgm_image_system_buffer_lockPgmError pgm_image_system_buffer_lock (PgmImage *image); Lock the system buffer set as the image content, ensuring the image is not going to be drawn while the system buffer content changes. This function guaranties tear free system buffer updates. MT safe. image : a PgmImage object. Returns : a PgmError indicating success/failure. pgm_image_system_buffer_unlock () pgm_image_system_buffer_unlockPgmError pgm_image_system_buffer_unlock (PgmImage *image); Unlock the system buffer set as the image content. MT safe. image : a PgmImage object. Returns : a PgmError indicating success/failure. pgm_image_set_mapping_matrix () pgm_image_set_mapping_matrixPgmError pgm_image_set_mapping_matrix (PgmImage *image, PgmMat4x4 *mapping_matrix); Defines the transformation to apply to the stored image when it is rendered. You can make the stored image slide over the drawable, rotate around it, stretch and shrink, or any combination of the three. Each point in an image can be defined by an (x, y) vector, which we call the source position, representing the horizontal (x) and vertical (y) positions (with values between 0 for left/top and 1 for right/bottom). When the image is drawn on a surface, each point (x, y) is drawn on the (x', y') coordinate of the surface. We call (x', y') the destination position. The default mapping matrix is the identity, you have (x', y') == (x, y). Once you have called the function, the destination position is calculated by multiplying mapping_matrix with the source position vector. To reset the mapping matrix, just set the identity. mapping_matrix is a 4x4 matrix since the source and destination positions can be represented as 4 coordinate vectors (x, y, z, w) and (x', y', z', w'). Unless you know what you are doing, you should not worry about z and w, and arrange for your matrix to leave them unchanged. MT safe. image : a PgmImage object. mapping_matrix : a PgmMat4x4 object. Returns : a PgmError indicating success/failure. pgm_image_get_mapping_matrix () pgm_image_get_mapping_matrixPgmError pgm_image_get_mapping_matrix (PgmImage *image, PgmMat4x4 **mapping_matrix); Retrieves in matrix the current mapping matrix applied to image. MT safe. image : a PgmImage object. mapping_matrix : a pointer to a PgmMat4x4 pointer where the mapping matrix is going to be stored. pgm_mat4x4_free() after use. Returns : a PgmError indicating success/failure. pgm_image_set_alignment () pgm_image_set_alignmentPgmError pgm_image_set_alignment (PgmImage *image, PgmImageAlignment align); Defines the way image aligns the stored image. MT safe. image : a PgmImage object. align : a PgmImageAlignment combination of flags. Returns : a PgmError indicating success/failure. pgm_image_get_alignment () pgm_image_get_alignmentPgmError pgm_image_get_alignment (PgmImage *image, PgmImageAlignment *align); Retrieves in align the way image aligns the stored image. MT safe. image : a PgmImage object. align : a pointer to a PgmImageAlignment where alignment flags are going to be stored. Returns : a PgmError indicating success/failure. pgm_image_set_layout () pgm_image_set_layoutPgmError pgm_image_set_layout (PgmImage *image, PgmImageLayoutType layout); Defines the way image layouts its stored image. MT safe. image : a PgmImage object. layout : a PgmImageLayoutType layout type. Returns : a PgmError indicating success/failure. pgm_image_get_layout () pgm_image_get_layoutPgmError pgm_image_get_layout (PgmImage *image, PgmImageLayoutType *layout); Retrieves in layout the way image layouts its its stored image. MT safe. image : a PgmImage object. layout : a pointer to a PgmImageLayoutType where the layout type is going to be stored. Returns : a PgmError indicating success/failure. pgm_image_set_interp () pgm_image_set_interpPgmError pgm_image_set_interp (PgmImage *image, PgmImageInterpType interp); Defines that image will be rendered using interp as its interpolation type. MT safe. image : a PgmImage object. interp : the interpolation type. Returns : a PgmError indicating success/failure. pgm_image_get_interp () pgm_image_get_interpPgmError pgm_image_get_interp (PgmImage *image, PgmImageInterpType *interp); Retrieves in interp the current interpolation type of image. MT safe. image : a PgmImage object. interp : a pointer to a PgmImageInterpType where the interpolation type is going to be stored. Returns : a PgmError indicating success/failure. pgm_image_set_wrapping () pgm_image_set_wrappingPgmError pgm_image_set_wrapping (PgmImage *image, PgmImageWrapping wrap_s, PgmImageWrapping wrap_t); Sets the horizontal and vertical wrapping modes used for the mapping of image. When the mapping matrix is modified, pixels outside the range of the image content are accessed, the wrapping mode defines the behaviour of the mapping in that particular case. MT safe. image : a PgmImage object. wrap_s : the wrapping on the s coordinate. PGM_IMAGE_REPEAT by default. wrap_t : the wrapping on the t coordinate. PGM_IMAGE_REPEAT by default. Returns : a PgmError indicating success/failure. pgm_image_get_wrapping () pgm_image_get_wrappingPgmError pgm_image_get_wrapping (PgmImage *image, PgmImageWrapping *wrap_s, PgmImageWrapping *wrap_t); Retrieves in wrap_s and wrap_t the current wrapping modes of image. MT safe. image : a PgmImage object. wrap_s : a pointer to a PgmImageInterpType where the wrapping mode on the s coordinate is going to be stored. wrap_t : a pointer to a PgmImageInterpType where the wrapping mode on the t coordinate is going to be stored. Returns : a PgmError indicating success/failure. pgm_image_set_aspect_ratio () pgm_image_set_aspect_ratioPgmError pgm_image_set_aspect_ratio (PgmImage *image, guint numerator, guint denominator); Customizes the aspect ratio of the stored image. MT safe. image : a PgmImage object. numerator : the numerator of the aspect ratio fraction. denominator : the denominator of the aspect ratio fraction. Returns : a PgmError indicating success/failure. pgm_image_get_aspect_ratio () pgm_image_get_aspect_ratioPgmError pgm_image_get_aspect_ratio (PgmImage *image, guint *numerator, guint *denominator); Retrieves the aspect ratio of the stored image. MT safe. image : a PgmImage object. numerator : a pointer to a guint where the numerator of the aspect ratio fraction will be stored. denominator : a pointer to a guint where the denominator of the aspect ratio fraction will be stored. Returns : a PgmError indicating success/failure. pgm_image_set_border_width () pgm_image_set_border_widthPgmError pgm_image_set_border_width (PgmImage *image, gfloat width); Defines the border width drawn around image. Note that the border is drawn around the image, inside the drawable. When you change the size of the border, the image will be down-scaled. MT safe. image : a PgmImage object. width : the border with. 0.0 by default. Returns : a PgmError indicating success/failure. pgm_image_get_border_width () pgm_image_get_border_widthPgmError pgm_image_get_border_width (PgmImage *image, gfloat *width); Retrieves the width of the border drawn around image inside the drawable. MT safe. image : a PgmImage object. width : a pointer to a gfloat where the border width will be stored. Returns : a PgmError indicating success/failure. pgm_image_set_border_inner_color () pgm_image_set_border_inner_colorPgmError pgm_image_set_border_inner_color (PgmImage *image, guchar red, guchar green, guchar blue, guchar alpha); Defines the border inner color drawn around image. MT safe. image : a PgmImage object. red : the border inner red color. 255 by default. green : the border inner green color. 255 by default. blue : the border inner blue color. 255 by default. alpha : the border inner alpha color. 255 by default. Returns : a PgmError indicating success/failure. pgm_image_get_border_inner_color () pgm_image_get_border_inner_colorPgmError pgm_image_get_border_inner_color (PgmImage *image, guchar *red, guchar *green, guchar *blue, guchar *alpha); Retrieves the inner color of the border drawn around image inside the drawable. MT safe. image : a PgmImage object. red : a pointer to a guchar where the border inner red color will be stored. green : a pointer to a guchar where the border inner green color will be stored. blue : a pointer to a guchar where the border inner blue color will be stored. alpha : a pointer to a guchar where the border inner alpha color will be stored. Returns : a PgmError indicating success/failure. pgm_image_set_border_outer_color () pgm_image_set_border_outer_colorPgmError pgm_image_set_border_outer_color (PgmImage *image, guchar red, guchar green, guchar blue, guchar alpha); Defines the border outer color drawn around image. MT safe. image : a PgmImage object. red : the border outer red color. 255 by default. green : the border outer green color. 255 by default. blue : the border outer blue color. 255 by default. alpha : the border outer alpha color. 255 by default. Returns : a PgmError indicating success/failure. pgm_image_get_border_outer_color () pgm_image_get_border_outer_colorPgmError pgm_image_get_border_outer_color (PgmImage *image, guchar *red, guchar *green, guchar *blue, guchar *alpha); Retrieves the outer color of the border drawn around image inside the drawable. MT safe. image : a PgmImage object. red : a pointer to a guchar where the border outer red color will be stored. green : a pointer to a guchar where the border outer green color will be stored. blue : a pointer to a guchar where the border outer blue color will be stored. alpha : a pointer to a guchar where the border outer alpha color will be stored. Returns : a PgmError indicating success/failure. pgm_image_from_drawable () pgm_image_from_drawablePgmError pgm_image_from_drawable (PgmImage *image, gint *x_image, gint *y_image, gfloat x_drawable, gfloat y_drawable); Converts a position in drawable space (canvas units, origin at top left of drawable) into image space (image pixel units, origin at top left of image). image : a PgmImage instance x_image : where to return the x coordinate in the image plane. y_image : where to return the y coordinate in the image plane. x_drawable : the x coordinate in drawable space. y_drawable : the y coordinate in drawable space. Returns : a PgmError indicating success/failure. pgm_image_to_drawable () pgm_image_to_drawablePgmError pgm_image_to_drawable (PgmImage *image, gfloat *x_drawable, gfloat *y_drawable, gint x_image, gint y_image); Converts a position in image space (image pixel units, origin at top left of image) into drawable space (canvas units, origin at top left of drawable). image : a PgmImage instance x_drawable : where to return the x coordinate in the drawable plane. y_drawable : where to return the y coordinate in the drawable plane. x_image : the x coordinate in image space. y_image : the y coordinate in image space. Returns : a PgmError indicating success/failure. Signal Details The <literal>"cloned"</literal> signal PgmImage::clonedvoid user_function (PgmImage *image, PgmImage *clone, guint n_clones, gpointer user_data) : Run First Will be emitted after image has been cloned by another PgmImage through the pgm_image_new_from_image() or pgm_image_set_from_image() functions. image : the PgmImage clone : the cloned PgmImage n_clones : the number of cloned images user_data : user data set when the signal handler was connected. The <literal>"file-loaded"</literal> signal PgmImage::file-loadedvoid user_function (PgmImage *image, gpointer user_data) : Run First Will be emitted after image has finished to load its data from the file path given in the pgm_image_set_from_file() method. image : the PgmImage user_data : user data set when the signal handler was connected. The <literal>"un-cloned"</literal> signal PgmImage::un-clonedvoid user_function (PgmImage *image, guint n_clones, gpointer user_data) : Run First Will be emitted after image has got a cloned PgmImage removed. image : the PgmImage n_clones : the number of cloned images user_data : user data set when the signal handler was connected. See Also #PgmDrawable, PgmText, PgmCanvas. pigment-0.3.17/docs/pgm/xml/pgmmodule.xml0000644000175000017500000000470511205035140015211 00000000000000 ]> PgmModule 3 PIGMENT Library PgmModule A class to load and unload plugins at runtime. Synopsis #include <pgm/pgm.h> Description A PgmModule object is responsible for loading and unloading plugins at runtime. Most of the work is done in GTypeModule from which PgmModule inherits. GTypeModule decides when the plugin must be loaded or unloaded, and calls pgm_module_load() or pgm_module_unload(). The PgmModule object also keeps a reference to the PgmPluginDesc structure found in the plugin. All access to pgm_plugin_desc must be made between a call to g_type_module_use() and a call to g_type_module_unuse(). PgmModule is an object internal to Pigment, and should not be used outside of it. It is only a helper class for PgmViewportFactory. Last reviewed on 2007-10-23 (0.3.2) Details pigment-0.3.17/docs/pgm/xml/api-index-full.xml0000644000175000017500000016671211205035140016045 00000000000000 ]> P PgmButtonType PgmCanvas PgmCanvas::drawable-added PgmCanvas::drawable-removed PgmCanvas::drawable-reordered PgmCanvas::regenerated PgmCanvas::size-changed PgmDrawable PgmDrawable::changed PgmDrawable::clicked PgmDrawable::double-clicked PgmDrawable::drag-begin PgmDrawable::drag-end PgmDrawable::drag-motion PgmDrawable::entered PgmDrawable::left PgmDrawable::motion PgmDrawable::pressed PgmDrawable::pressured PgmDrawable::released PgmDrawable::scrolled PgmDrawableClass PgmDrawableLayer PgmDrawableProperty PgmError PgmEvent PgmEventAny PgmEventButton PgmEventConfigure PgmEventDnd PgmEventExpose PgmEventKey PgmEventMotion PgmEventScroll PgmEventState PgmEventType PgmEventWin32Message PgmGtk PgmImage PgmImage::cloned PgmImage::file-loaded PgmImage::un-cloned PgmImageAlignment PgmImageBuffer PgmImageData PgmImageFile PgmImageGstBuffer PgmImageInterpType PgmImageLayoutType PgmImagePixbuf PgmImagePixelFormat PgmImageSink PgmImageSink:events PgmImageSink:image PgmImageSinkEventMask PgmImageStorageType PgmImageSystemBuffer PgmImageWrapping PgmMat3x3 PgmMat4x4 PgmMat4x4Predefined PgmModifierType PgmPluginCreateFunc PgmPluginDesc PgmPluginInitFunc PgmPluginShutdownFunc PgmScrollDirection PgmText PgmTextAlignment PgmTextEllipsize PgmTextGravity PgmTextShadowPosition PgmTextStretch PgmTextStyle PgmTextVariant PgmTextWeight PgmTextWrap PgmVec3 PgmVec4 PgmViewport PgmViewport::button-press-event PgmViewport::button-pressure-event PgmViewport::button-release-event PgmViewport::configure-event PgmViewport::delete-event PgmViewport::drag-drop-event PgmViewport::drag-leave-event PgmViewport::drag-motion-event PgmViewport::expose-event PgmViewport::key-press-event PgmViewport::key-release-event PgmViewport::motion-notify-event PgmViewport::pixels-read PgmViewport::scroll-event PgmViewport::state-event PgmViewport::update-pass PgmViewportCapacity PgmViewportClass PgmViewportCursor PgmViewportFactory PgmViewportReflection PgmViewportRotation PgmViewportState pgm_canvas_add pgm_canvas_add_many pgm_canvas_get_layer_count pgm_canvas_get_order pgm_canvas_get_pixel_formats pgm_canvas_get_pixel_offsets pgm_canvas_get_size pgm_canvas_new pgm_canvas_regenerate pgm_canvas_remove pgm_canvas_remove_many pgm_canvas_set_order pgm_canvas_set_size PGM_DEGREES_TO_RADIANS pgm_deinit pgm_drawable_from_canvas pgm_drawable_get_bg_color pgm_drawable_get_drag_distance pgm_drawable_get_fg_color pgm_drawable_get_grid_aligned pgm_drawable_get_opacity pgm_drawable_get_position pgm_drawable_get_rotation_x pgm_drawable_get_rotation_y pgm_drawable_get_rotation_z pgm_drawable_get_scale pgm_drawable_get_size pgm_drawable_hide pgm_drawable_is_visible pgm_drawable_regenerate pgm_drawable_set_bg_color pgm_drawable_set_drag_distance pgm_drawable_set_fg_color pgm_drawable_set_grid_aligned pgm_drawable_set_opacity pgm_drawable_set_position pgm_drawable_set_rotation_x pgm_drawable_set_rotation_y pgm_drawable_set_rotation_z pgm_drawable_set_scale pgm_drawable_set_size pgm_drawable_show pgm_drawable_to_canvas pgm_events_pending pgm_event_copy pgm_event_free pgm_event_new PGM_FABSF pgm_gtk_get_viewport pgm_gtk_new pgm_gtk_set_viewport pgm_image_clear pgm_image_from_drawable pgm_image_get_alignment pgm_image_get_aspect_ratio pgm_image_get_border_inner_color pgm_image_get_border_outer_color pgm_image_get_border_width pgm_image_get_interp pgm_image_get_layout pgm_image_get_mapping_matrix pgm_image_get_storage_type pgm_image_get_wrapping pgm_image_new pgm_image_new_from_buffer pgm_image_new_from_file pgm_image_new_from_image pgm_image_new_from_pixbuf pgm_image_set_alignment pgm_image_set_aspect_ratio pgm_image_set_border_inner_color pgm_image_set_border_outer_color pgm_image_set_border_width pgm_image_set_from_buffer pgm_image_set_from_file pgm_image_set_from_gst_buffer pgm_image_set_from_image pgm_image_set_from_pixbuf pgm_image_set_from_system_buffer pgm_image_set_interp pgm_image_set_layout pgm_image_set_mapping_matrix pgm_image_set_wrapping pgm_image_sink_get_events pgm_image_sink_get_image pgm_image_sink_new pgm_image_sink_set_events pgm_image_sink_set_image pgm_image_system_buffer_lock pgm_image_system_buffer_unlock pgm_image_to_drawable pgm_image_to_pixbuf pgm_imaging_linear_alpha_gradient pgm_init pgm_init_check pgm_intersection_line_plane pgm_keyval_to_unicode pgm_lrintf pgm_main pgm_main_iteration pgm_main_iteration_do pgm_main_quit pgm_mat3x3_add_mat3x3 pgm_mat3x3_add_scalar pgm_mat3x3_copy pgm_mat3x3_free pgm_mat3x3_inverse pgm_mat3x3_is_identity pgm_mat3x3_multiply_mat3x3 pgm_mat3x3_multiply_scalar pgm_mat3x3_multiply_vec3 pgm_mat3x3_new pgm_mat3x3_new_from_scalars pgm_mat3x3_new_from_vec3 pgm_mat3x3_new_identity pgm_mat3x3_set_from_mat3x3 pgm_mat3x3_set_from_scalars pgm_mat3x3_set_from_vec3 pgm_mat3x3_substract_mat3x3 pgm_mat3x3_substract_scalar pgm_mat3x3_to_string pgm_mat3x3_transpose pgm_mat4x4_add_mat4x4 pgm_mat4x4_add_scalar pgm_mat4x4_copy pgm_mat4x4_free pgm_mat4x4_inverse pgm_mat4x4_is_identity pgm_mat4x4_multiply_mat4x4 pgm_mat4x4_multiply_scalar pgm_mat4x4_multiply_vec4 pgm_mat4x4_new pgm_mat4x4_new_from_scalars pgm_mat4x4_new_from_vec4 pgm_mat4x4_new_identity pgm_mat4x4_new_predefined pgm_mat4x4_new_rotate_axis_from_scalars pgm_mat4x4_new_rotate_axis_from_vec3 pgm_mat4x4_new_rotate_x pgm_mat4x4_new_rotate_y pgm_mat4x4_new_rotate_z pgm_mat4x4_new_scale_from_scalars pgm_mat4x4_new_scale_from_vec3 pgm_mat4x4_new_translate_from_scalars pgm_mat4x4_new_translate_from_vec3 pgm_mat4x4_rotate_axis_from_scalars pgm_mat4x4_rotate_axis_from_vec3 pgm_mat4x4_rotate_x pgm_mat4x4_rotate_y pgm_mat4x4_rotate_z pgm_mat4x4_scale_from_scalars pgm_mat4x4_scale_from_vec3 pgm_mat4x4_set_from_mat4x4 pgm_mat4x4_set_from_scalars pgm_mat4x4_set_from_vec4 pgm_mat4x4_substract_mat4x4 pgm_mat4x4_substract_scalar pgm_mat4x4_to_string pgm_mat4x4_translate_from_scalars pgm_mat4x4_translate_from_vec3 pgm_mat4x4_transpose PGM_PLUGIN_DEFINE PGM_PLUGIN_PATH_NAME pgm_point_belongs_rectangle PGM_RADIANS_TO_DEGREES PGM_SINCOS pgm_text_get_alignment pgm_text_get_cast_shadow pgm_text_get_color pgm_text_get_ellipsize pgm_text_get_font_family pgm_text_get_font_height pgm_text_get_gravity pgm_text_get_justify pgm_text_get_label pgm_text_get_line_spacing pgm_text_get_multiline pgm_text_get_outline_color pgm_text_get_outline_width pgm_text_get_shadow_color pgm_text_get_shadow_position pgm_text_get_stretch pgm_text_get_style pgm_text_get_variant pgm_text_get_weight pgm_text_get_wrap pgm_text_new pgm_text_set_alignment pgm_text_set_cast_shadow pgm_text_set_color pgm_text_set_ellipsize pgm_text_set_font_family pgm_text_set_font_height pgm_text_set_gravity pgm_text_set_justify pgm_text_set_label pgm_text_set_line_spacing pgm_text_set_markup pgm_text_set_multiline pgm_text_set_outline_color pgm_text_set_outline_width pgm_text_set_shadow_color pgm_text_set_shadow_position pgm_text_set_stretch pgm_text_set_style pgm_text_set_variant pgm_text_set_weight pgm_text_set_wrap pgm_vec3_add_scalar pgm_vec3_add_vec3 pgm_vec3_copy pgm_vec3_cross_product pgm_vec3_dot_product pgm_vec3_free pgm_vec3_length pgm_vec3_multiply_scalar pgm_vec3_multiply_vec3 pgm_vec3_new pgm_vec3_new_from_scalars pgm_vec3_normalize pgm_vec3_set_from_scalars pgm_vec3_set_from_vec3 pgm_vec3_substract_scalar pgm_vec3_substract_vec3 pgm_vec3_to_string pgm_vec4_add_scalar pgm_vec4_add_vec4 pgm_vec4_copy pgm_vec4_free pgm_vec4_length pgm_vec4_multiply_scalar pgm_vec4_multiply_vec4 pgm_vec4_new pgm_vec4_new_from_scalars pgm_vec4_normalize pgm_vec4_set_from_scalars pgm_vec4_set_from_vec4 pgm_vec4_substract_scalar pgm_vec4_substract_vec4 pgm_vec4_to_string pgm_version PGM_VERSION_MAJOR PGM_VERSION_MICRO PGM_VERSION_MINOR PGM_VERSION_NANO pgm_version_string pgm_viewport_emit_update_pass pgm_viewport_factory_create pgm_viewport_factory_get_author pgm_viewport_factory_get_description pgm_viewport_factory_get_license pgm_viewport_factory_get_origin pgm_viewport_factory_make pgm_viewport_factory_new pgm_viewport_focus pgm_viewport_from_canvas pgm_viewport_get_alpha_blending pgm_viewport_get_canvas pgm_viewport_get_canvas_reflection pgm_viewport_get_canvas_rotation pgm_viewport_get_caps_mask pgm_viewport_get_cursor pgm_viewport_get_decorated pgm_viewport_get_embedding_id pgm_viewport_get_frame_rate pgm_viewport_get_fullscreen pgm_viewport_get_icon pgm_viewport_get_iconified pgm_viewport_get_max_texture_size pgm_viewport_get_message_filter pgm_viewport_get_opacity pgm_viewport_get_pixel_formats pgm_viewport_get_screen_resolution pgm_viewport_get_screen_size_mm pgm_viewport_get_size pgm_viewport_get_title pgm_viewport_hide pgm_viewport_is_visible pgm_viewport_push_event pgm_viewport_push_pixels pgm_viewport_read_pixels pgm_viewport_set_alpha_blending pgm_viewport_set_canvas pgm_viewport_set_canvas_reflection pgm_viewport_set_canvas_rotation pgm_viewport_set_cursor pgm_viewport_set_decorated pgm_viewport_set_fullscreen pgm_viewport_set_icon pgm_viewport_set_iconified pgm_viewport_set_message_filter pgm_viewport_set_opacity pgm_viewport_set_screen_resolution pgm_viewport_set_screen_size_mm pgm_viewport_set_size pgm_viewport_set_title pgm_viewport_show pgm_viewport_to_canvas pgm_viewport_update_projection pigment-0.3.17/docs/pgm/xml/pgmcanvas.xml0000644000175000017500000013040211205035140015171 00000000000000 ]> PgmCanvas 3 PIGMENT Library PgmCanvas A virtual positioning class for drawables. Synopsis #include <pgm/pgm.h> PgmCanvas; PgmCanvas * pgm_canvas_new (void); PgmError pgm_canvas_set_size (PgmCanvas *canvas, gfloat width, gfloat height); PgmError pgm_canvas_get_size (PgmCanvas *canvas, gfloat *width, gfloat *height); PgmError pgm_canvas_add (PgmCanvas *canvas, PgmDrawableLayer layer, PgmDrawable *drawable); PgmError pgm_canvas_remove (PgmCanvas *canvas, PgmDrawable *drawable); PgmError pgm_canvas_add_many (PgmCanvas *canvas, PgmDrawableLayer layer, PgmDrawable *drawable_1, ...); PgmError pgm_canvas_remove_many (PgmCanvas *canvas, PgmDrawable *drawable_1, ...); PgmError pgm_canvas_set_order (PgmCanvas *canvas, PgmDrawable *drawable, gint order); PgmError pgm_canvas_get_order (PgmCanvas *canvas, PgmDrawable *drawable, PgmDrawableLayer *layer, gint *order); PgmError pgm_canvas_get_layer_count (PgmCanvas *canvas, PgmDrawableLayer layer, gint *count); PgmError pgm_canvas_regenerate (PgmCanvas *canvas); PgmError pgm_canvas_get_pixel_formats (PgmCanvas *canvas, gulong *pixel_formats); PgmError pgm_canvas_get_pixel_offsets (PgmCanvas *canvas, gfloat *x, gfloat *y); Object Hierarchy GObject +----GstObject +----PgmCanvas Signals "drawable-added" : Run First "drawable-removed" : Run First "drawable-reordered" : Run First "regenerated" : Run First "size-changed" : Run First Description A PgmCanvas object is used as a virtual positioning system for the PgmDrawable. It provides Pigment users (application developers using the library) a very simple and flexible way to build their user interface without having to worry about visual rendering problems such as non square pixels, aspect ratio of images or videos, keeping proportional alignment or spacing between objects when resizing, etc. Canvas coordinates The origin of the canvas coordinate system corresponds to the upper-left corner. A canvas can only understand canvas coordinates, and those coordinates have nothing to do with pixels. This is why the methods you can call on a canvas always use coordinates with floating numbers. Let's say you want to draw a user interface with an aspect ratio of 16:9 (which is nice to do on most wide screen TV of the market). In that case you would for example set the canvas size to width 16.0 and height 9.0. Every coordinate and size of the drawables you are going to put on the canvas will use the same coordinate system. So, if you wanted to put an image in the middle of the user interface you would compute its position so that its center is at (8.0, 4.5) on the canvas. You would also define the size of that image using values of the same scale. For example, the width of the image could be 1.0 and its height 1.0 thus making appear as a square. Link between canvas and viewport A canvas is never drawn directly which is why you can use abstract coordinates to place objects on it. Also, since it is using floating numbers there is no limit in precision. At some point we still need to have a visual representation of what is on the canvas, this is what PgmViewport does. A canvas can be projected on 0 to n viewport. Scalable user interface It is entirely the application's responsibility to decide how many drawables are going to be drawn on the canvas and their size. Using the viewport information the application can decide which aspect ratio to use and how many drawables can fit on the canvas while still being easily readable. If for example the end user (user interface user) steps away from the monitor and cannot read the text the application can just make the drawables bigger on the canvas which will automatically get reprojected onto the viewport. Rendering layers When adding a drawable to a canvas you have to choose a PgmDrawableLayer in which that drawable will be stored. The three layers are used to handle a first control on the drawing order. The first layer drawn is the PGM_DRAWABLE_FAR one, all the drawables inside this layer will appear behind the two others. The second layer drawn is the PGM_DRAWABLE_MIDDLE one, the drawables inside this layer will be drawn over the PGM_DRAWABLE_FAR layer and behind the PGM_DRAWABLE_NEAR layer. The third layer drawn is the PGM_DRAWABLE_NEAR one, all the drawables inside this layer will be drawn over the two others. This is useful to make sure that dialog is shown on top of all the other objects for example or to make sure that no object is going to go behind the background. Drawables inside a layer are automatically ordered by Pigment depending on their z coordinate set through pgm_drawable_set_position(). Pigment also provides a way to reorder drawables inside a layer that have the same z coordinate thanks to the pgm_canvas_set_order() function. Drawable reference counting When a drawable is created it has a floating reference, when you add it to the canvas, the canvas takes a reference to that drawable and sink the object reference. That means that the canvas now owns the drawable reference and you do not need to unref the drawable when cleaning up your objects. Just unrefing the canvas is going to cleanup all the drawables that were added to it. Here is an example: Create a canvas, add drawables, unref the canvas PgmCanvas *canvas = pgm_canvas_new (); PgmDrawable *drb1 = pgm_text_new ("hello world"); PgmDrawable *drb2 = pgm_image_new_from_fd (fd, 1024); PgmDrawable *drb3 = pgm_image_new_from_image (drb2);   pgm_canvas_add_many (canvas, PGM_DRAWABLE_MIDDLE, drb1, drb2, drb3, NULL); gst_object_unref (canvas); // Unref canvas, drb1, drb2 and drb3 Signal connections The drawable-added signal is fired whenever a new drawable is added to the canvas. Likewise the drawable-removed signal is fired whenever an drawable is removed from the canvas. The drawable-reordered signal is fired whenever a drawable is reordered inside the canvas. Last reviewed on 2007-08-03 (0.3.0) Details PgmCanvas PgmCanvastypedef struct { /* Layer lists */ GList *far_layer; GList *middle_layer; GList *near_layer; /* Canvas size */ gfloat width, height; /* Pixel offsets */ gfloat pixel_offset_x, pixel_offset_y; /* Mask of supported formats */ gulong pixel_formats; } PgmCanvas; The PgmCanvas structure. GList *far_layer; the list of PgmDrawable in the PGM_DRAWABLE_FAR layer. GList *middle_layer; the list of PgmDrawable in the PGM_DRAWABLE_MIDDLE layer. GList *near_layer; the list of PgmDrawable in the PGM_DRAWABLE_NEAR layer. gfloat width; the canvas width. gfloat height; the canvas height. gfloat pixel_offset_x; the pixel offset on x. gfloat pixel_offset_y; the pixel offset on y. gulong pixel_formats; the pixel formats mask. pgm_canvas_new () pgm_canvas_newPgmCanvas * pgm_canvas_new (void); Creates a new PgmCanvas instance. MT safe. Returns : a new PgmCanvas instance. pgm_canvas_set_size () pgm_canvas_set_sizePgmError pgm_canvas_set_size (PgmCanvas *canvas, gfloat width, gfloat height); Sets the width and height size of canvas. These values are not supposed to be pixels. You are strongly encouraged to use abstract coordinates such as 16.0x9.0 for a 16:9 interface or 4.0x3.0 for a 4:3 one, etc. MT safe. canvas : a PgmCanvas object. width : the canvas width. height : the canvas height. Returns : a PgmError indicating success/failure. pgm_canvas_get_size () pgm_canvas_get_sizePgmError pgm_canvas_get_size (PgmCanvas *canvas, gfloat *width, gfloat *height); Retrieves width and height size of canvas in width and height. MT safe. canvas : a PgmCanvas object. width : a pointer to a gfloat where the canvas width is going to be stored. height : a pointer to a gfloat where the canvas height is going to be stored. Returns : a PgmError indicating success/failure. pgm_canvas_add () pgm_canvas_addPgmError pgm_canvas_add (PgmCanvas *canvas, PgmDrawableLayer layer, PgmDrawable *drawable); Adds drawable to canvas in layer. Both canvas and drawable reference counts will be increased by one as they are linking to each other. drawable reference will be sink as well so if the object reference was floating it now belongs to canvas and you don't have to unref drawable when cleaning up your objects. MT safe. canvas : a PgmCanvas object. layer : a PgmDrawableLayer to add drawable into. drawable : the PgmDrawable object to add. Returns : a PgmError indicating success/failure. pgm_canvas_remove () pgm_canvas_removePgmError pgm_canvas_remove (PgmCanvas *canvas, PgmDrawable *drawable); Removes drawable from canvas. Both canvas and drawable reference counts will be decreased by one as they were referencing each other. In most cases that means that drawable is going to be destroyed because canvas owned the only reference to it. If you want to reuse drawable in another canvas or in another layer you need to take a reference to it before removing it from canvas. MT safe. canvas : a PgmCanvas object. drawable : the PgmDrawable object to remove. Returns : a PgmError indicating success/failure. pgm_canvas_add_many () pgm_canvas_add_manyPgmError pgm_canvas_add_many (PgmCanvas *canvas, PgmDrawableLayer layer, PgmDrawable *drawable_1, ...); Adds a NULL-terminated list of drawables to canvas. This function is equivalent to calling pgm_canvas_add() for each member of the list. MT safe. canvas : a PgmCanvas object. layer : a PgmDrawableLayer to add the drawables into. drawable_1 : the PgmDrawable object to add. ... : additional PgmDrawable objects to add. Returns : a PgmError indicating success/failure. pgm_canvas_remove_many () pgm_canvas_remove_manyPgmError pgm_canvas_remove_many (PgmCanvas *canvas, PgmDrawable *drawable_1, ...); Removes a NULL-terminated list of drawables from canvas. This function is equivalent to calling pgm_canvas_remove() for each member of the list. MT safe. canvas : a PgmCanvas object. drawable_1 : the PgmDrawable object to remove. ... : additional PgmDrawable objects to remove. Returns : a PgmError indicating success/failure. pgm_canvas_set_order () pgm_canvas_set_orderPgmError pgm_canvas_set_order (PgmCanvas *canvas, PgmDrawable *drawable, gint order); Defines the ordering of drawable in its layer at position order. Since drawables are ordered function of their z coordinate, set through pgm_drawable_set_position(), this function is only useful if you want to reorder drawables at the same z coordinate. If you try to reorder a drawable inside a layer at an order where the current drawable doesn't have the same z coordinate, the function will do nothing and return an error. MT safe. canvas : a PgmCanvas object. drawable : the PgmDrawable to reorder. order : the new position of drawable. Returns : a PgmError indicating success/failure. pgm_canvas_get_order () pgm_canvas_get_orderPgmError pgm_canvas_get_order (PgmCanvas *canvas, PgmDrawable *drawable, PgmDrawableLayer *layer, gint *order); Retrieves the layering of drawable. MT safe. canvas : a PgmCanvas object. drawable : the PgmDrawable to retrieve the layering. layer : a pointer to a PgmDrawableLayer in which drawable layer is going to be stored. order : a pointer to a gint in which the position of drawable in the layer is going to be stored. Returns : a PgmError indicating success/failure. pgm_canvas_get_layer_count () pgm_canvas_get_layer_countPgmError pgm_canvas_get_layer_count (PgmCanvas *canvas, PgmDrawableLayer layer, gint *count); Retrieves the number of drawables in layer. MT safe. canvas : a PgmCanvas object. layer : the PgmDrawableLayer to retrieve the size. count : a pointer to a gint in which the number of drawables in layer is going to be stored. Returns : a PgmError indicating success/failure. pgm_canvas_regenerate () pgm_canvas_regeneratePgmError pgm_canvas_regenerate (PgmCanvas *canvas); Affects all the drawables of the canvas which need to be displayed at a fixed size. It regenerates those rasterized pixmaps which have been affected by the canvas projection. MT safe. canvas : a PgmCanvas object. Returns : a PgmError indicating success/failure. pgm_canvas_get_pixel_formats () pgm_canvas_get_pixel_formatsPgmError pgm_canvas_get_pixel_formats (PgmCanvas *canvas, gulong *pixel_formats); Gets the list of the supported pixel formats by canvas. This is the intersection of the pixel formats supported by the viewports to which canvas is bound. MT safe. canvas : a PgmCanvas object. pixel_formats : a pointer to a gulong where the mask of supported PgmImagePixelFormat is going to be stored. Returns : a PgmError indicating success/failure. pgm_canvas_get_pixel_offsets () pgm_canvas_get_pixel_offsetsPgmError pgm_canvas_get_pixel_offsets (PgmCanvas *canvas, gfloat *x, gfloat *y); Gets the x and y ratios corresponding to the offsets in canvas coordinates between two pixels at z=0. canvas : a PgmCanvas object. x : a pointer to a gfloat where the x pixel offset is going to be stored. y : a pointer to a gfloat where the y pixel offset is going to be stored. Returns : a PgmError indicating success/failure. Signal Details The <literal>"drawable-added"</literal> signal PgmCanvas::drawable-addedvoid user_function (PgmCanvas *canvas, PgmDrawable *drawable, PgmDrawableLayer layer, gint order, gpointer user_data) : Run First Will be emitted after drawable was added to canvas. canvas : the PgmCanvas drawable : the PgmDrawable that was added to canvas layer : the PgmDrawableLayer in which drawable was added order : the order in layer in which drawable was added user_data : user data set when the signal handler was connected. The <literal>"drawable-removed"</literal> signal PgmCanvas::drawable-removedvoid user_function (PgmCanvas *canvas, PgmDrawable *drawable, PgmDrawableLayer layer, gpointer user_data) : Run First Will be emitted after drawable was removed from canvas. canvas : the PgmCanvas drawable : the PgmDrawable that was removed from canvas layer : the PgmDrawableLayer from which drawable was removed user_data : user data set when the signal handler was connected. The <literal>"drawable-reordered"</literal> signal PgmCanvas::drawable-reorderedvoid user_function (PgmCanvas *canvas, PgmDrawable *drawable, PgmDrawableLayer layer, gint order, gpointer user_data) : Run First Will be emitted after drawable was reordered in canvas. canvas : the PgmCanvas drawable : the PgmDrawable that was reordered in canvas layer : the PgmDrawableLayer in which drawable was reordered order : the new order of drawable user_data : user data set when the signal handler was connected. The <literal>"regenerated"</literal> signal PgmCanvas::regeneratedvoid user_function (PgmCanvas *canvas, gpointer user_data) : Run First Will be emitted after canvas received a regeneration request. canvas : the PgmCanvas user_data : user data set when the signal handler was connected. The <literal>"size-changed"</literal> signal PgmCanvas::size-changedvoid user_function (PgmCanvas *canvas, gpointer user_data) : Run First Will be emitted after canvas size was changed. canvas : the PgmCanvas user_data : user data set when the signal handler was connected. See Also #PgmViewport, PgmDrawable. pigment-0.3.17/docs/pgm/xml/pgmplugin.xml0000644000175000017500000002517311205035140015224 00000000000000 ]> PgmPlugin 3 PIGMENT Library PgmPlugin Various structs and macros used for plugins handling. Synopsis #include <pgm/pgm.h> #define PGM_PLUGIN_PATH_NAME gboolean (*PgmPluginInitFunc) (GTypeModule *module); gboolean (*PgmPluginShutdownFunc) (GTypeModule *module); PgmViewport * (*PgmPluginCreateFunc) (void); PgmPluginDesc; #define PGM_PLUGIN_DEFINE (init,shutdown,create,name,version,description,license,origin,author) Description Various structs and macros used by Pigment for plugins handling. Last reviewed on 2007-04-12 (0.1.5) Details PGM_PLUGIN_PATH_NAME PGM_PLUGIN_PATH_NAME#define PGM_PLUGIN_PATH_NAME "PGM_PLUGIN_PATH" The name of the plugin path environment variable name. PgmPluginInitFunc () PgmPluginInitFuncgboolean (*PgmPluginInitFunc) (GTypeModule *module); A plugin should provide a pointer to a function of this type in the PgmPluginDesc struct. This function will be called to initialize the plugin. module : the GTypeModule to use in the init func to register your types (with g_type_module_register_type() or PGM_DEFINE_DYNAMIC_TYPE or PGM_DEFINE_DYNAMIC_TYPE_EXTENDED. Returns : TRUE if the initialization successes, FALSE otherwise. PgmPluginShutdownFunc () PgmPluginShutdownFuncgboolean (*PgmPluginShutdownFunc) (GTypeModule *module); A plugin should provide a pointer to a function of this type in the PgmPluginDesc struct. This function will be called to shutdown the plugin. module : the GTypeModule that was passed to the PgmPluginInitFunc function. Returns : TRUE if the deinitialization successes, FALSE otherwise. PgmPluginCreateFunc () PgmPluginCreateFuncPgmViewport * (*PgmPluginCreateFunc) (void); A plugin should provide a pointer to a function of this prototype in the PgmPluginDesc struct. This function will be called by the user to create the PgmViewport. Returns : a new PgmViewport. PgmPluginDesc PgmPluginDesctypedef struct { PgmPluginInitFunc init; PgmPluginShutdownFunc shutdown; PgmPluginCreateFunc create; gchar *name; gchar *version; gchar *description; gchar *license; gchar *origin; gchar *author; } PgmPluginDesc; Pigment Plugin description structure. PgmPluginInitFunc init; the plugin initialization function pointer. PgmPluginShutdownFunc shutdown; the plugin shutdown function pointer. PgmPluginCreateFunc create; the plugin create function pointer (returning a PgmViewport). gchar *name; the plugin name. gchar *version; the version string of Pigment that plugin was compiled for. gchar *description; the plugin description. gchar *license; the plugin license. gchar *origin; the plugin origin URL. gchar *author; the plugin author. PGM_PLUGIN_DEFINE() PGM_PLUGIN_DEFINE#define PGM_PLUGIN_DEFINE(init,shutdown,create,name,version,description,license,origin,author) Utility macro to create a PgmPluginDesc plugin description structure. This is the entry point for every Pigment plugin and it is highly recommended to use this macro to avoid common mistakes maxking entry point unusable. init : the plugin initialization function pointer. shutdown : the plugin shutdown function pointer. create : the plugin creation function pointer (returning a PgmViewport). name : the plugin name. version : the version string of Pigment that plugin was compiled for. description : the plugin description. license : the plugin license. origin : the plugin origin URL. author : the plugin author. pigment-0.3.17/docs/pgm/xml/pgm.xml0000644000175000017500000003563311205035140014007 00000000000000 ]> Pgm 3 PIGMENT Library Pgm A library to create rich application user interfaces. Synopsis #include <pgm/pgm.h> void pgm_init (int *argc, char **argv[]); gboolean pgm_init_check (int *argc, char **argv[]); void pgm_deinit (void); void pgm_version (guint *major, guint *minor, guint *micro, guint *nano); gchar * pgm_version_string (void); gboolean pgm_events_pending (void); void pgm_main (void); void pgm_main_quit (void); void pgm_main_iteration (void); void pgm_main_iteration_do (gboolean blocking); Description Pigment is a media rendering library written in C providing an abstraction layer to easily design GUI (Graphical User Interfaces) like simple games, media center/set-top box applications, etc. It has a pluggable backend system so that the same application can run on various hardware and software platforms using rendering libraries such as OpenGL or DirectFB on operating systems such as Windows, GNU/Linux or Mac OS X. Pigment has been designed to handle common issues like non square pixels displays, non square pixels images or video sources, positioning abstraction and scalable user interface support. Moreover, Pigment is a fully thread safe library which means that you can call methods on Pigment objects from multiple threads at the same time even if the rendering backend is not thread safe itself like some OpenGL implementations are for example. Pigment initialization The Pigment library has to be initialized with pgm_init() before it can be used. You should pass pointers to the main argc and argv variables so that Pigment can process its own command line options, as shown in the following example. Initializing the library int main (int argc, char *argv[]) { pgm_init (&argc, &argv); ... } The pgm_deinit() call is used to clean up all internal resources used by Pigment. Pigment version retrieval Use pgm_version() to query the library version at runtime or use the PGM_VERSION_* macros to find the version at compile time. Optionally pgm_version_string() returns a printable string. Pigment programming model Pigment is a GUI toolkit based on an event-driven programming model. When the user is doing nothing, Pigment sits in the main loop and waits for input. If the user performs some action, like a mouse button click, then the main loop "wakes up" and delivers an event to Pigment. When a viewport receives an event, it emits a signal to notify your program that something happened by invoking functions you connected to the signal with g_signal_connect(). Functions connected to a signal are often termed callbacks. When your callbacks are invoked, you would typically take some action, for example when a key of the keyboard is pressed you might update the properties of your drawables. After a callback finishes, Pigment will return to the main loop and await more user input. Last reviewed on 2007-09-25 (0.3.1) Details pgm_init () pgm_initvoid pgm_init (int *argc, char **argv[]); Initializes the Pigment library. This function will terminate your program if it was unable to initialize Pigment for some reason. If you want your program to fall back, use pgm_init_check() instead. argc : the address of the argc parameter of your main function. argv : the address of the argv parameter of your main function. pgm_init_check () pgm_init_checkgboolean pgm_init_check (int *argc, char **argv[]); Initializes the Pigment library without terminating the program if it was unable to initialize successfully. argc : the address of the argc parameter of your main function. argv : the address of the argv parameter of your main function. Returns : TRUE if Pigment was initialized successfully, FALSE otherwise. pgm_deinit () pgm_deinitvoid pgm_deinit (void); Deinitializes the Pigment library. This is not going to free Pigment objects, you need to explicitely unref these objects using gst_object_unref(). pgm_version () pgm_versionvoid pgm_version (guint *major, guint *minor, guint *micro, guint *nano); Gets the version number of the Pigment library. major : a pointer to a guint to store the major version number. minor : a pointer to a guint to store the minor version number. micro : a pointer to a guint to store the micro version number. nano : a pointer to a guint to store the nano version number. pgm_version_string () pgm_version_stringgchar * pgm_version_string (void); Returns a string that is useful for describing this version of Pigment to the outside world: user agent strings, logging, etc. Returns : a newly allocated string describing this version of Pigment. pgm_events_pending () pgm_events_pendinggboolean pgm_events_pending (void); Checks if any events are pending. This can be used to update the GUI, while doing some time intensive computation. Updating the GUI during a long computation. // computation going on ... while (pgm_events_pending ()) pgm_main_iteration (); ... // computation continued Returns : TRUE if any events are pending, FALSE otherwise. pgm_main () pgm_mainvoid pgm_main (void); Runs the main loop until pgm_main_quit() is called. It's ok to use the GLib main loop directly instead, though it involves slightly more typing. See GMainLoop in the GLib documentation. pgm_main_quit () pgm_main_quitvoid pgm_main_quit (void); Quits the main loop. pgm_main_iteration () pgm_main_iterationvoid pgm_main_iteration (void); Runs a single iteration of the main loop. If no events are waiting to be processed, Pigment will block until the next event is noticed. If you don't want to block, look at pgm_main_iteration_do() or check if any events are pending with pgm_events_pending() first. pgm_main_iteration_do () pgm_main_iteration_dovoid pgm_main_iteration_do (gboolean blocking); Runs a single iteration of the main loop. If no events are available, either returns or blocks dependent on the value of blocking. blocking : TRUE if you want Pigment to block if no events are pending. See Also #PgmViewport, PgmDrawable. pigment-0.3.17/docs/pgm/xml/pgmversion.xml0000644000175000017500000000644611205035140015415 00000000000000 ]> PgmVersion 3 PIGMENT Library PgmVersion Pigment version macros. Synopsis #include <pgm/pgm.h> #define PGM_VERSION_MAJOR #define PGM_VERSION_MINOR #define PGM_VERSION_MICRO #define PGM_VERSION_NANO Description You can use the macros to keep the Pigment version information in your application. Use the pgm_version() function if you want to know which version of Pigment you are currently linked against. The version macros get defined by including "pgm/pgm.h". Last reviewed on 2007-04-12 (0.1.5) Details PGM_VERSION_MAJOR PGM_VERSION_MAJOR#define PGM_VERSION_MAJOR (0) The major version of Pigment at compile time. PGM_VERSION_MINOR PGM_VERSION_MINOR#define PGM_VERSION_MINOR (3) The minor version of Pigment at compile time. PGM_VERSION_MICRO PGM_VERSION_MICRO#define PGM_VERSION_MICRO (17) The micro version of Pigment at compile time. PGM_VERSION_NANO PGM_VERSION_NANO#define PGM_VERSION_NANO (0) The nano version of Pigment at compile time. Actual releases have 0, Subversion versions have 1, prerelease versions have [2-n]. pigment-0.3.17/docs/pgm/xml/pgmtext.xml0000644000175000017500000027452511205035140014721 00000000000000 ]> PgmText 3 PIGMENT Library PgmText A text drawable. Synopsis #include <pgm/pgm.h> enum PgmTextEllipsize; enum PgmTextAlignment; enum PgmTextWrap; enum PgmTextGravity; enum PgmTextStretch; enum PgmTextStyle; enum PgmTextVariant; enum PgmTextWeight; enum PgmTextShadowPosition; PgmText; PgmDrawable * pgm_text_new (const gchar *markup); PgmError pgm_text_set_label (PgmText *text, const gchar *label); PgmError pgm_text_set_markup (PgmText *text, const gchar *markup); PgmError pgm_text_get_label (PgmText *text, gchar **label); PgmError pgm_text_set_font_family (PgmText *text, const gchar *font_family); PgmError pgm_text_get_font_family (PgmText *text, gchar **font_family); PgmError pgm_text_set_font_height (PgmText *text, gfloat font_height); PgmError pgm_text_get_font_height (PgmText *text, gfloat *font_height); PgmError pgm_text_set_ellipsize (PgmText *text, PgmTextEllipsize ellipsize); PgmError pgm_text_get_ellipsize (PgmText *text, PgmTextEllipsize *ellipsize); PgmError pgm_text_set_justify (PgmText *text, gboolean justify); PgmError pgm_text_get_justify (PgmText *text, gboolean *justify); PgmError pgm_text_set_alignment (PgmText *text, PgmTextAlignment alignment); PgmError pgm_text_get_alignment (PgmText *text, PgmTextAlignment *alignment); PgmError pgm_text_set_wrap (PgmText *text, PgmTextWrap wrap); PgmError pgm_text_get_wrap (PgmText *text, PgmTextWrap *wrap); PgmError pgm_text_set_gravity (PgmText *text, PgmTextGravity gravity); PgmError pgm_text_get_gravity (PgmText *text, PgmTextGravity *gravity); PgmError pgm_text_set_stretch (PgmText *text, PgmTextStretch stretch); PgmError pgm_text_get_stretch (PgmText *text, PgmTextStretch *stretch); PgmError pgm_text_set_style (PgmText *text, PgmTextStyle style); PgmError pgm_text_get_style (PgmText *text, PgmTextStyle *style); PgmError pgm_text_set_variant (PgmText *text, PgmTextVariant variant); PgmError pgm_text_get_variant (PgmText *text, PgmTextVariant *variant); PgmError pgm_text_set_weight (PgmText *text, PgmTextWeight weight); PgmError pgm_text_get_weight (PgmText *text, PgmTextWeight *weight); PgmError pgm_text_set_multiline (PgmText *text, gboolean multiline); PgmError pgm_text_get_multiline (PgmText *text, gboolean *multiline); PgmError pgm_text_set_line_spacing (PgmText *text, gfloat line_spacing); PgmError pgm_text_get_line_spacing (PgmText *text, gfloat *line_spacing); PgmError pgm_text_set_color (PgmText *text, guchar red, guchar green, guchar blue, guchar alpha); PgmError pgm_text_get_color (PgmText *text, guchar *red, guchar *green, guchar *blue, guchar *alpha); PgmError pgm_text_set_outline_color (PgmText *text, guchar red, guchar green, guchar blue, guchar alpha); PgmError pgm_text_get_outline_color (PgmText *text, guchar *red, guchar *green, guchar *blue, guchar *alpha); PgmError pgm_text_set_outline_width (PgmText *text, gfloat width); PgmError pgm_text_get_outline_width (PgmText *text, gfloat *width); PgmError pgm_text_set_cast_shadow (PgmText *text, gboolean cast_shadow); PgmError pgm_text_get_cast_shadow (PgmText *text, gboolean *cast_shadow); PgmError pgm_text_set_shadow_position (PgmText *text, PgmTextShadowPosition position); PgmError pgm_text_get_shadow_position (PgmText *text, PgmTextShadowPosition *position); PgmError pgm_text_set_shadow_color (PgmText *text, guchar red, guchar green, guchar blue, guchar alpha); PgmError pgm_text_get_shadow_color (PgmText *text, guchar *red, guchar *green, guchar *blue, guchar *alpha); Object Hierarchy GObject +----GstObject +----PgmDrawable +----PgmText Description PgmText is a drawable displaying a text with support for multiple lines, markups and several properties. The specified text is then arranged to fit inside the drawable size. Fonts are specified through face name and attributes. The font height is given in canvas coordinates. FIXME: • Describe the markup syntax. • Describe the different capabilities. Last reviewed on 2007-05-18 (0.1.5) Details enum PgmTextEllipsize PgmTextEllipsizetypedef enum { PGM_TEXT_ELLIPSIZE_NONE, PGM_TEXT_ELLIPSIZE_START, PGM_TEXT_ELLIPSIZE_MIDDLE, PGM_TEXT_ELLIPSIZE_END } PgmTextEllipsize; The different text ellipsizings. PGM_TEXT_ELLIPSIZE_NONE No ellipsization. PGM_TEXT_ELLIPSIZE_START Omit characters at the start of the text. PGM_TEXT_ELLIPSIZE_MIDDLE Omit characters in the middle of the text. PGM_TEXT_ELLIPSIZE_END Omit characters at the end of the text. enum PgmTextAlignment PgmTextAlignmenttypedef enum { PGM_TEXT_ALIGN_LEFT, PGM_TEXT_ALIGN_CENTER, PGM_TEXT_ALIGN_RIGHT } PgmTextAlignment; The different text alignments. PGM_TEXT_ALIGN_LEFT Put all available space on the right. PGM_TEXT_ALIGN_CENTER Center the line within the available space. PGM_TEXT_ALIGN_RIGHT Put all available space on the left. enum PgmTextWrap PgmTextWraptypedef enum { PGM_TEXT_WRAP_WORD, PGM_TEXT_WRAP_CHAR, PGM_TEXT_WRAP_WORD_CHAR } PgmTextWrap; The different text wrappings. PGM_TEXT_WRAP_WORD Wrap lines at word boundaries. PGM_TEXT_WRAP_CHAR Wrap lines at character boundaries. PGM_TEXT_WRAP_WORD_CHAR Wrap lines at word boundaries, but fall back to character boundaries if there is not enough space for a full word. enum PgmTextGravity PgmTextGravitytypedef enum { PGM_TEXT_GRAVITY_SOUTH, PGM_TEXT_GRAVITY_EAST, PGM_TEXT_GRAVITY_NORTH, PGM_TEXT_GRAVITY_WEST, PGM_TEXT_GRAVITY_AUTO } PgmTextGravity; The different text gravities. PGM_TEXT_GRAVITY_SOUTH Glyphs stand upright. PGM_TEXT_GRAVITY_EAST Glyphs are rotated 90 degrees clockwise. PGM_TEXT_GRAVITY_NORTH Glyphs are upside-down. PGM_TEXT_GRAVITY_WEST Glyphs are rotated 90 degrees counter-clockwise. PGM_TEXT_GRAVITY_AUTO Gravity is resolved automatically. enum PgmTextStretch PgmTextStretchtypedef enum { PGM_TEXT_STRETCH_CONDENSED, PGM_TEXT_STRETCH_NORMAL, PGM_TEXT_STRETCH_EXPANDED } PgmTextStretch; The different text stretchings. PGM_TEXT_STRETCH_CONDENSED Condensed width. PGM_TEXT_STRETCH_NORMAL Normal width. PGM_TEXT_STRETCH_EXPANDED Expanded width. enum PgmTextStyle PgmTextStyletypedef enum { PGM_TEXT_STYLE_NORMAL, PGM_TEXT_STYLE_OBLIQUE, PGM_TEXT_STYLE_ITALIC } PgmTextStyle; The different text styles. PGM_TEXT_STYLE_NORMAL The font is upright. PGM_TEXT_STYLE_OBLIQUE The font is slanted, but in a roman style. PGM_TEXT_STYLE_ITALIC The font is slanted in an italic style. enum PgmTextVariant PgmTextVarianttypedef enum { PGM_TEXT_VARIANT_NORMAL, PGM_TEXT_VARIANT_SMALL_CAPS } PgmTextVariant; The different text variants. PGM_TEXT_VARIANT_NORMAL Normal font. PGM_TEXT_VARIANT_SMALL_CAPS Font with the lower case characters replaced by smaller variants of the capital characters. enum PgmTextWeight PgmTextWeighttypedef enum { PGM_TEXT_WEIGHT_LIGHT, PGM_TEXT_WEIGHT_NORMAL, PGM_TEXT_WEIGHT_BOLD } PgmTextWeight; The different text weights. PGM_TEXT_WEIGHT_LIGHT The light weight. PGM_TEXT_WEIGHT_NORMAL The normal weight. PGM_TEXT_WEIGHT_BOLD The bold weight. enum PgmTextShadowPosition PgmTextShadowPositiontypedef enum { PGM_TEXT_SHADOW_NORTH = (1 << 0), PGM_TEXT_SHADOW_SOUTH = (1 << 1), PGM_TEXT_SHADOW_WEST = (1 << 2), PGM_TEXT_SHADOW_EAST = (1 << 3), PGM_TEXT_SHADOW_NORTH_WEST = (PGM_TEXT_SHADOW_NORTH | PGM_TEXT_SHADOW_WEST), PGM_TEXT_SHADOW_NORTH_EAST = (PGM_TEXT_SHADOW_NORTH | PGM_TEXT_SHADOW_EAST), PGM_TEXT_SHADOW_SOUTH_WEST = (PGM_TEXT_SHADOW_SOUTH | PGM_TEXT_SHADOW_WEST), PGM_TEXT_SHADOW_SOUTH_EAST = (PGM_TEXT_SHADOW_SOUTH | PGM_TEXT_SHADOW_EAST) } PgmTextShadowPosition; The text's shadow cast position. PGM_TEXT_SHADOW_NORTH Shadow casted to the North. PGM_TEXT_SHADOW_SOUTH Shadow casted to the South. PGM_TEXT_SHADOW_WEST Shadow casted to the West. PGM_TEXT_SHADOW_EAST Shadow casted to the East. PGM_TEXT_SHADOW_NORTH_WEST Shadow casted to the North/West. PGM_TEXT_SHADOW_NORTH_EAST Shadow casted to the North/East. PGM_TEXT_SHADOW_SOUTH_WEST Shadow casted to the South/West. PGM_TEXT_SHADOW_SOUTH_EAST Shadow casted to the South/East. PgmText PgmTexttypedef struct { /* Label */ gchar *label; /* Font properties */ gchar *font_family; PgmTextGravity gravity; PgmTextStretch stretch; PgmTextStyle style; PgmTextVariant variant; PgmTextWeight weight; gfloat height; /* Text adjustment */ PgmTextEllipsize ellipsize; PgmTextAlignment alignment; PgmTextWrap wrap; gfloat line_spacing; gboolean justify; gboolean multiline; gboolean cast_shadow; PgmTextShadowPosition shadow_position; gfloat outline_width; /* Colors */ guchar r, g, b, a; guchar shadow_r, shadow_g, shadow_b, shadow_a; guchar outline_r, outline_g, outline_b, outline_a; } PgmText; The PgmText structure. gchar *label; the text label. gchar *font_family; the text font family. PgmTextGravity gravity; the text gravity. PgmTextStretch stretch; the text stretching. PgmTextStyle style; the text style. PgmTextVariant variant; the text variant. PgmTextWeight weight; the text weight. gfloat height; the text height in proportion to the drawable height. PgmTextEllipsize ellipsize; the text ellipsizing. PgmTextAlignment alignment; the text alignment. PgmTextWrap wrap; the text wrapping. gfloat line_spacing; the space between to lines of text in canvas coordinates. gboolean justify; the text justification. gboolean multiline; the text multilining. gboolean cast_shadow; the text shadow casting state. PgmTextShadowPosition shadow_position; the text shadow position. gfloat outline_width; the text outline width in canvas coordinates. guchar r; the text red color component. guchar g; the text blue color component. guchar b; the text green color component. guchar a; the text alpha color component. guchar shadow_r; the text shadow red color component. guchar shadow_g; the text shadow blue color component. guchar shadow_b; the text shadow green color component. guchar shadow_a; the text shadow alpha color component. guchar outline_r; the text outline red color component. guchar outline_g; the text outline blue color component. guchar outline_b; the text outline green color component. guchar outline_a; the text outline alpha color component. pgm_text_new () pgm_text_newPgmDrawable * pgm_text_new (const gchar *markup); Creates a new PgmText instance. MT safe. markup : the markup string. Returns : a new PgmText instance. pgm_text_set_label () pgm_text_set_labelPgmError pgm_text_set_label (PgmText *text, const gchar *label); Sets label of text to label. label has to be a NULL-terminated string. The default label is the empty one "". MT safe. text : a PgmText object. label : the label string. Returns : A PgmError indicating success/failure. pgm_text_set_markup () pgm_text_set_markupPgmError pgm_text_set_markup (PgmText *text, const gchar *markup); Sets markup of text to markup. markup has to be a NULL-terminated string. The default label is the empty one "". MT safe. text : a PgmText object. markup : the markup string. Returns : A PgmError indicating success/failure. pgm_text_get_label () pgm_text_get_labelPgmError pgm_text_get_label (PgmText *text, gchar **label); Retrieves the current label of text in label. If a markup is currently used, the full markup is retrieved. MT safe. text : a PgmText object. label : a pointer to a pointer to a gchar where the label string will be stored. g_free() after use. Returns : A PgmError indicating success/failure. pgm_text_set_font_family () pgm_text_set_font_familyPgmError pgm_text_set_font_family (PgmText *text, const gchar *font_family); Sets the font family of text to font_family. The default font family name is "Sans". MT safe. text : a PgmText object. font_family : the font-family string. Returns : A PgmError indicating success/failure. pgm_text_get_font_family () pgm_text_get_font_familyPgmError pgm_text_get_font_family (PgmText *text, gchar **font_family); Retrieves the current font-family of text in label. MT safe. text : a PgmText object. font_family : a pointer to a pointer to a gchar where the font family string will be stored. g_free() after use. Returns : A PgmError indicating success/failure. pgm_text_set_font_height () pgm_text_set_font_heightPgmError pgm_text_set_font_height (PgmText *text, gfloat font_height); Sets the height of text to font_height in canvas coordinates. The default height is 1.0f. MT safe. text : a PgmText object. font_height : the text height in canvas coordinates. Returns : A PgmError indicating success/failure. pgm_text_get_font_height () pgm_text_get_font_heightPgmError pgm_text_get_font_height (PgmText *text, gfloat *font_height); Retrieves the height of text in height. MT safe. text : a PgmText object. font_height : a pointer to a gfloat where the text height is going to be stored. Returns : A PgmError indicating success/failure. pgm_text_set_ellipsize () pgm_text_set_ellipsizePgmError pgm_text_set_ellipsize (PgmText *text, PgmTextEllipsize ellipsize); Sets ellipsizing of text to ellipsize. Only takes effect when text gets to large to fit the drawable size. The default value is PGM_TEXT_ELLIPSIZE_NONE. MT safe. text : a PgmText object. ellipsize : the text ellipsizing. Returns : A PgmError indicating success/failure. pgm_text_get_ellipsize () pgm_text_get_ellipsizePgmError pgm_text_get_ellipsize (PgmText *text, PgmTextEllipsize *ellipsize); Retrieves the ellipsizing of text in ellipsize. MT safe. text : a PgmText object. ellipsize : a pointer to a PgmTextEllipsize where the text ellipsizing is going to be stored. Returns : A PgmError indicating success/failure. pgm_text_set_justify () pgm_text_set_justifyPgmError pgm_text_set_justify (PgmText *text, gboolean justify); Enables or not justification of text. If justify is TRUE, text is expanded to fill the whole drawable width. MT safe. text : a PgmText object. justify : the text justification state. Returns : A PgmError indicating success/failure. pgm_text_get_justify () pgm_text_get_justifyPgmError pgm_text_get_justify (PgmText *text, gboolean *justify); Retrieves the justification state of text in justify. MT safe. text : a PgmText object. justify : a pointer to a gboolean where the justification state is going to be stored. Returns : A PgmError indicating success/failure. pgm_text_set_alignment () pgm_text_set_alignmentPgmError pgm_text_set_alignment (PgmText *text, PgmTextAlignment alignment); Sets alignment of text to alignment. The default value is PGM_TEXT_ALIGN_LEFT. MT safe. text : a PgmText object. alignment : the text alignment. Returns : A PgmError indicating success/failure. pgm_text_get_alignment () pgm_text_get_alignmentPgmError pgm_text_get_alignment (PgmText *text, PgmTextAlignment *alignment); Retrieves the alignment of text in alignment. MT safe. text : a PgmText object. alignment : a pointer to a PgmTextAlignment where the text alignment is going to be stored. Returns : A PgmError indicating success/failure. pgm_text_set_wrap () pgm_text_set_wrapPgmError pgm_text_set_wrap (PgmText *text, PgmTextWrap wrap); Sets wrapping of text to wrap. The default value is PGM_TEXT_WRAP_WORD. MT safe. text : a PgmText object. wrap : the text wrapping. Returns : A PgmError indicating success/failure. pgm_text_get_wrap () pgm_text_get_wrapPgmError pgm_text_get_wrap (PgmText *text, PgmTextWrap *wrap); Retrieves the wrapping of text in wrap. MT safe. text : a PgmText object. wrap : a pointer to a PgmTextWrap where the text wrapping is going to be stored. Returns : A PgmError indicating success/failure. pgm_text_set_gravity () pgm_text_set_gravityPgmError pgm_text_set_gravity (PgmText *text, PgmTextGravity gravity); Sets gravity of text to gravity. The default value is PGM_TEXT_GRAVITY_AUTO. MT safe. text : a PgmText object. gravity : the text gravity. Returns : A PgmError indicating success/failure. pgm_text_get_gravity () pgm_text_get_gravityPgmError pgm_text_get_gravity (PgmText *text, PgmTextGravity *gravity); Retrieves the gravity of text in gravity. MT safe. text : a PgmText object. gravity : a pointer to a PgmTextGravity where the text gravity is going to be stored. Returns : A PgmError indicating success/failure. pgm_text_set_stretch () pgm_text_set_stretchPgmError pgm_text_set_stretch (PgmText *text, PgmTextStretch stretch); Sets stretching of text to stretch. The default value is PGM_TEXT_STRETCH_NORMAL. MT safe. text : a PgmText object. stretch : the text stretching. Returns : A PgmError indicating success/failure. pgm_text_get_stretch () pgm_text_get_stretchPgmError pgm_text_get_stretch (PgmText *text, PgmTextStretch *stretch); Retrieves the stretching of text in stretch. MT safe. text : a PgmText object. stretch : a pointer to a PgmTextStretch where the text stretching is going to be stored. Returns : A PgmError indicating success/failure. pgm_text_set_style () pgm_text_set_stylePgmError pgm_text_set_style (PgmText *text, PgmTextStyle style); Sets style of text to style. The default value is PGM_TEXT_STYLE_NORMAL. MT safe. text : a PgmText object. style : the text style. Returns : A PgmError indicating success/failure. pgm_text_get_style () pgm_text_get_stylePgmError pgm_text_get_style (PgmText *text, PgmTextStyle *style); Retrieves the style of text in style. MT safe. text : a PgmText object. style : a pointer to a PgmTextStyle where the text style is going to be stored. Returns : A PgmError indicating success/failure. pgm_text_set_variant () pgm_text_set_variantPgmError pgm_text_set_variant (PgmText *text, PgmTextVariant variant); Sets variant of text to variant. The default value is PGM_TEXT_VARIANT_NORMAL. MT safe. text : a PgmText object. variant : the text variant. Returns : A PgmError indicating success/failure. pgm_text_get_variant () pgm_text_get_variantPgmError pgm_text_get_variant (PgmText *text, PgmTextVariant *variant); Retrieves the variant of text in variant. MT safe. text : a PgmText object. variant : a pointer to a PgmTextVariant where the text variant is going to be stored. Returns : A PgmError indicating success/failure. pgm_text_set_weight () pgm_text_set_weightPgmError pgm_text_set_weight (PgmText *text, PgmTextWeight weight); Sets weight of text to weight. The default value is PGM_TEXT_WEIGHT_NORMAL. MT safe. text : a PgmText object. weight : the text weight. Returns : A PgmError indicating success/failure. pgm_text_get_weight () pgm_text_get_weightPgmError pgm_text_get_weight (PgmText *text, PgmTextWeight *weight); Retrieves the weight of text in weight. MT safe. text : a PgmText object. weight : a pointer to a PgmTextWeight where the text weight is going to be stored. Returns : A PgmError indicating success/failure. pgm_text_set_multiline () pgm_text_set_multilinePgmError pgm_text_set_multiline (PgmText *text, gboolean multiline); Sets the multilining state of text to multiline. When multilining is disabled, the text is displayed on one line and vertically centered in the drawable. The default value is TRUE. MT safe. text : a PgmText object. multiline : the multilining state. Returns : A PgmError indicating success/failure. pgm_text_get_multiline () pgm_text_get_multilinePgmError pgm_text_get_multiline (PgmText *text, gboolean *multiline); Retrieves the multilining state of text in multiline. MT safe. text : a PgmText object. multiline : a pointer to a gboolean where the multilining state is going to be stored. Returns : A PgmError indicating success/failure. pgm_text_set_line_spacing () pgm_text_set_line_spacingPgmError pgm_text_set_line_spacing (PgmText *text, gfloat line_spacing); Sets the space between two lines of text to line_spacing in canvas coordinates. The default value is 0.0f. MT safe. text : a PgmText object. line_spacing : the line spacing. Returns : A PgmError indicating success/failure. pgm_text_get_line_spacing () pgm_text_get_line_spacingPgmError pgm_text_get_line_spacing (PgmText *text, gfloat *line_spacing); Retrieves the space between two lines of text in line_spacing. MT safe. text : a PgmText object. line_spacing : a pointer to a gfloat where the line spacing is going to be stored. Returns : A PgmError indicating success/failure. pgm_text_set_color () pgm_text_set_colorPgmError pgm_text_set_color (PgmText *text, guchar red, guchar green, guchar blue, guchar alpha); Sets the color of text to (red, green, blue, alpha). MT safe. text : a PgmText object. red : the text red color component. green : the text green color component. blue : the text blue color component. alpha : the text alpha color component. Returns : A PgmError indicating success/failure. pgm_text_get_color () pgm_text_get_colorPgmError pgm_text_get_color (PgmText *text, guchar *red, guchar *green, guchar *blue, guchar *alpha); Retrieves the color of text in (red, green, blue, alpha). MT safe. text : a PgmText object. red : a pointer to a guchar where the red color component is going to be stored. green : a pointer to a guchar where the green color component is going to be stored. blue : a pointer to a guchar where the blue color component is going to be stored. alpha : a pointer to a guchar where the alpha color component is going to be stored. Returns : A PgmError indicating success/failure. pgm_text_set_outline_color () pgm_text_set_outline_colorPgmError pgm_text_set_outline_color (PgmText *text, guchar red, guchar green, guchar blue, guchar alpha); Sets the outline color of text to (red, green, blue, alpha). MT safe. text : a PgmText object. red : the text outline red color component. green : the text outline green color component. blue : the text outline blue color component. alpha : the text outline alpha color component. Returns : A PgmError indicating success/failure. pgm_text_get_outline_color () pgm_text_get_outline_colorPgmError pgm_text_get_outline_color (PgmText *text, guchar *red, guchar *green, guchar *blue, guchar *alpha); Retrieves the outline color of text in (red, green, blue, alpha). MT safe. text : a PgmText object. red : a pointer to a guchar where the outline red color component is going to be stored. green : a pointer to a guchar where the outline green color component is going to be stored. blue : a pointer to a guchar where the outline blue color component is going to be stored. alpha : a pointer to a guchar where the outline alpha color component is going to be stored. Returns : A PgmError indicating success/failure. pgm_text_set_outline_width () pgm_text_set_outline_widthPgmError pgm_text_set_outline_width (PgmText *text, gfloat width); Sets the outline width (thickness) of text to width in canvas coordinates. The default value is 0.0f. MT safe. text : a PgmText object. width : the text outline width. Returns : A PgmError indicating success/failure. pgm_text_get_outline_width () pgm_text_get_outline_widthPgmError pgm_text_get_outline_width (PgmText *text, gfloat *width); Retrieves the outline width (thickness) of text in width. MT safe. text : a PgmText object. width : a pointer to a gfloat where the text outline width is going to be stored. Returns : A PgmError indicating success/failure. pgm_text_set_cast_shadow () pgm_text_set_cast_shadowPgmError pgm_text_set_cast_shadow (PgmText *text, gboolean cast_shadow); Sets the shadow casting state of text to cast_shadow. When shadow casting is enabled, the text is displayed with a shadow behind it. The default value is FALSE. MT safe. text : a PgmText object. cast_shadow : the shadow casting state. Returns : A PgmError indicating success/failure. pgm_text_get_cast_shadow () pgm_text_get_cast_shadowPgmError pgm_text_get_cast_shadow (PgmText *text, gboolean *cast_shadow); Retrieves the shadow casting state of text in cast_shadow. MT safe. text : a PgmText object. cast_shadow : a pointer to a gboolean where the shadow casting state is going to be stored. Returns : A PgmError indicating success/failure. pgm_text_set_shadow_position () pgm_text_set_shadow_positionPgmError pgm_text_set_shadow_position (PgmText *text, PgmTextShadowPosition position); Sets the shadow position of text to position. The default value is PGM_TEXT_SHADOW_TOP. MT safe. text : a PgmText object. position : the text shadow position. Returns : A PgmError indicating success/failure. pgm_text_get_shadow_position () pgm_text_get_shadow_positionPgmError pgm_text_get_shadow_position (PgmText *text, PgmTextShadowPosition *position); Retrieves the shadow position of text in position. MT safe. text : a PgmText object. position : a pointer to a PgmTextShadowPosition where the text shadow position is going to be stored. Returns : A PgmError indicating success/failure. pgm_text_set_shadow_color () pgm_text_set_shadow_colorPgmError pgm_text_set_shadow_color (PgmText *text, guchar red, guchar green, guchar blue, guchar alpha); Sets the shadow color of text to (red, green, blue, alpha). MT safe. text : a PgmText object. red : the text shadow red color component. green : the text shadow green color component. blue : the text shadow blue color component. alpha : the text shadow alpha color component. Returns : A PgmError indicating success/failure. pgm_text_get_shadow_color () pgm_text_get_shadow_colorPgmError pgm_text_get_shadow_color (PgmText *text, guchar *red, guchar *green, guchar *blue, guchar *alpha); Retrieves the shadow color of text in (red, green, blue, alpha). MT safe. text : a PgmText object. red : a pointer to a guchar where the shadow red color component is going to be stored. green : a pointer to a guchar where the shadow green color component is going to be stored. blue : a pointer to a guchar where the shadow blue color component is going to be stored. alpha : a pointer to a guchar where the shadow alpha color component is going to be stored. Returns : A PgmError indicating success/failure. See Also #PgmDrawable, PgmImage. pigment-0.3.17/docs/pgm/xml/pgmviewportfactory.xml0000644000175000017500000003710311205035140017171 00000000000000 ]> PgmViewportFactory 3 PIGMENT Library PgmViewportFactory A factory creating viewports. Synopsis #include <pgm/pgm.h> PgmViewportFactory; PgmViewportFactory * pgm_viewport_factory_new (const gchar *name); PgmError pgm_viewport_factory_get_description (PgmViewportFactory *factory, gchar **description); PgmError pgm_viewport_factory_get_license (PgmViewportFactory *factory, gchar **license); PgmError pgm_viewport_factory_get_origin (PgmViewportFactory *factory, gchar **origin); PgmError pgm_viewport_factory_get_author (PgmViewportFactory *factory, gchar **author); PgmError pgm_viewport_factory_create (PgmViewportFactory *factory, PgmViewport **viewport); PgmError pgm_viewport_factory_make (const gchar *name, PgmViewport **viewport); Object Hierarchy GObject +----GstObject +----PgmViewportFactory Description PgmViewportFactory is used to create instances of PgmViewport. Use the pgm_viewport_factory_new() and pgm_viewport_factory_create() functions to create viewport instances or use pgm_viewport_factory_make() as a convenient shortcut. The following code example shows you how to create an OpenGL based viewport. Using a viewport factory PgmViewportFactory *factory; PgmViewport *viewport;   pgm_init (&argc, &argv);   factory = pgm_viewport_factory_new ("opengl"); pgm_viewport_factory_create (factory, &viewport); Last reviewed on 2007-04-12 (0.1.5) Details PgmViewportFactory PgmViewportFactorytypedef struct _PgmViewportFactory PgmViewportFactory; The PgmViewportFactory opaque structure. pgm_viewport_factory_new () pgm_viewport_factory_newPgmViewportFactory * pgm_viewport_factory_new (const gchar *name); Creates a new PgmViewportFactory instance of the given name. PgmViewportFactory is a singleton, if a factory of the given name has already been created, this constructor returns that one with a incremented refcount. This function does not detect if the name passed as argument is an invalid name (i.e. if there is no plugin of that name). Such an error will only be detected when trying to use the factory (e.g. with pgm_viewport_factory_create() or with one of the pgm_viewport_factory_get*() functions. MT safe. name : the name of the factory to create. Returns : a PgmViewportFactory instance or NULL if an error occurred. pgm_viewport_factory_get_description () pgm_viewport_factory_get_descriptionPgmError pgm_viewport_factory_get_description (PgmViewportFactory *factory, gchar **description); Retrieves the description of the viewports managed by factory in description. MT safe. factory : a PgmViewportFactory object. description : a pointer to a pointer to a gchar where the description string is going to be be stored. g_free() after use. Returns : a PgmError indicating success/failure. pgm_viewport_factory_get_license () pgm_viewport_factory_get_licensePgmError pgm_viewport_factory_get_license (PgmViewportFactory *factory, gchar **license); Retrieves the license of the viewports managed by factory in license. MT safe. factory : a PgmViewportFactory object. license : a pointer to a pointer to a gchar where the license string is going to be be stored. g_free() after use. Returns : a PgmError indicating success/failure. pgm_viewport_factory_get_origin () pgm_viewport_factory_get_originPgmError pgm_viewport_factory_get_origin (PgmViewportFactory *factory, gchar **origin); Retrieves the origin of the viewports managed by factory in origin. MT safe. factory : a PgmViewportFactory object. origin : a pointer to a pointer to a gchar where the origin string is going to be be stored. g_free() after use. Returns : a PgmError indicating success/failure. pgm_viewport_factory_get_author () pgm_viewport_factory_get_authorPgmError pgm_viewport_factory_get_author (PgmViewportFactory *factory, gchar **author); Retrieves the author of the viewports managed by factory in author. MT safe. factory : a PgmViewportFactory object. author : a pointer to a pointer to a gchar where the author string is going to be be stored. g_free() after use. Returns : a PgmError indicating success/failure. pgm_viewport_factory_create () pgm_viewport_factory_createPgmError pgm_viewport_factory_create (PgmViewportFactory *factory, PgmViewport **viewport); Creates a new viewport of the type defined by factory in viewport. MT safe. factory : a PgmViewportFactory object. viewport : a pointer to a PgmViewport's pointer where the created viewport is going to be be stored. Returns : a PgmError indicating success/failure. pgm_viewport_factory_make () pgm_viewport_factory_makePgmError pgm_viewport_factory_make (const gchar *name, PgmViewport **viewport); Creates a new viewport of the given name in viewport. MT safe. name : the name of the viewport to make. viewport : a pointer to a PgmViewport's pointer where the created viewport is going to be be stored. Returns : a PgmError indicating success/failure. See Also #PgmViewport. pigment-0.3.17/docs/pgm/xml/pgmimaging.xml0000644000175000017500000001265311205035140015340 00000000000000 ]> PgmImaging 3 PIGMENT Library PgmImaging A library to process pixbufs through software filters. Synopsis #include <pgm/imaging/pgmimaging.h> GdkPixbuf * pgm_imaging_linear_alpha_gradient (const GdkPixbuf *pixbuf, gfloat start_x, gfloat start_y, gfloat start_alpha, gfloat end_x, gfloat end_y, gfloat end_alpha); Description PgmImaging is a library providing several software image processing filters. The functions can be used as CPU (Central Processing Unit) software fallback when effects can't be applied by Pigment plugins through the GPU (Graphics Processing Unit). Last reviewed on 2008-07-29 (0.3.7) Details pgm_imaging_linear_alpha_gradient () pgm_imaging_linear_alpha_gradientGdkPixbuf * pgm_imaging_linear_alpha_gradient (const GdkPixbuf *pixbuf, gfloat start_x, gfloat start_y, gfloat start_alpha, gfloat end_x, gfloat end_y, gfloat end_alpha); Creates a new GdkPixbuf by compositing the alpha channel of pixbuf with the linear alpha gradient mask given as parameters. Note that the resulting pixbuf always contains an alpha channel even if the original pixbuf does not. In that case, the alpha channel is automatically added with a default value of 1.0 corresponding to opaque pixels. pixbuf : A GdkPixbuf. start_x : x coordinate of the start point, in the range [0.0, 1.0]. start_y : y coordinate of the start point, in the range [0.0, 1.0]. start_alpha : Alpha component at the start point, in the range [0.0, 1.0]. end_x : x coordinate of the end point, in the range [0.0, 1.0]. end_y : y coordinate of the end point, in the range [0.0, 1.0]. end_alpha : Alpha component at the end point, in the range [0.0, 1.0]. Returns : A newly-created GdkPixbuf with a reference count of 1, or NULL if not enough memory could be allocated. pigment-0.3.17/docs/pgm/xml/api-index-deprecated.xml0000644000175000017500000000056711205035140017176 00000000000000 ]> pigment-0.3.17/docs/pgm/xml/pgmimagesink.xml0000644000175000017500000003341711205035140015675 00000000000000 ]> PgmImageSink 3 PIGMENT Library PgmImageSink A GStreamer image sink outputing frames to image drawables. Synopsis #include <pgm/pgm.h> enum PgmImageSinkEventMask; PgmImageSink; GstElement * pgm_image_sink_new (const gchar *name); PgmError pgm_image_sink_set_image (PgmImageSink *sink, PgmImage *image); PgmError pgm_image_sink_get_image (PgmImageSink *sink, PgmImage **image); PgmError pgm_image_sink_set_events (PgmImageSink *sink, PgmImageSinkEventMask events); PgmError pgm_image_sink_get_events (PgmImageSink *sink, PgmImageSinkEventMask *events); Object Hierarchy GObject +----GstObject +----GstElement +----GstBaseSink +----GstVideoSink +----PgmImageSink Properties "events" PgmImageSinkEventMask : Read / Write "image" PgmImage* : Read / Write Description PgmImageSink is a GStreamer image sink element allowing to build GStreamer pipelines outputing frames directly to PgmImage. You can explicitly use the pgm_image_sink_new() function to instanciate a new sink, but you can alos use the standard GStreamer functions using gst_element_factory_make() or gst_parse_launch(), the factory name of the sink being "pgmimagesink". Internally, the sink is simply outputing GStreamer buffers (GstBuffer) to images (PgmImage) using the pgm_image_set_from_gst_buffer() function. Last reviewed on 2008-01-28 (0.3.4) Details enum PgmImageSinkEventMask PgmImageSinkEventMasktypedef enum { PGM_IMAGE_SINK_MOTION = (1 << 0), PGM_IMAGE_SINK_PRESSED = (1 << 1), PGM_IMAGE_SINK_RELEASED = (1 << 2) } PgmImageSinkEventMask; The event mask flags. PGM_IMAGE_SINK_MOTION The motion event flag. PGM_IMAGE_SINK_PRESSED The pressed event flag. PGM_IMAGE_SINK_RELEASED The released event flag. PgmImageSink PgmImageSinktypedef struct _PgmImageSink PgmImageSink; The opaque PgmImageSink data structure. pgm_image_sink_new () pgm_image_sink_newGstElement * pgm_image_sink_new (const gchar *name); Creates a new image sink with the given name. name : the name of the new image sink. Returns : a new PgmImageSink. pgm_image_sink_set_image () pgm_image_sink_set_imagePgmError pgm_image_sink_set_image (PgmImageSink *sink, PgmImage *image); Sets image as the PgmImage object which will receive the frames (GstBuffer) outputed by sink. MT Safe. sink : a PgmImageSink object. image : the PgmImage object. Returns : a PgmError indicating success/failure. pgm_image_sink_get_image () pgm_image_sink_get_imagePgmError pgm_image_sink_get_image (PgmImageSink *sink, PgmImage **image); Retrieves the PgmImage object in image which sink is using to output its frames (GstBuffer). MT Safe. sink : a PgmImageSink object. image : a pointer to a PgmImage pointer where the image will be stored. Unref after usage. Returns : a PgmError indicating success/failure. pgm_image_sink_set_events () pgm_image_sink_set_eventsPgmError pgm_image_sink_set_events (PgmImageSink *sink, PgmImageSinkEventMask events); Sets the mouse events interacting with the currently set image that will be sent upstream in the pipeline. sink : a PgmImageSink object. events : a PgmImageSinkEventMask. Returns : a PgmError indicating success/failure. pgm_image_sink_get_events () pgm_image_sink_get_eventsPgmError pgm_image_sink_get_events (PgmImageSink *sink, PgmImageSinkEventMask *events); Retrieves in events the mouse events sent upstream in the pipeline. sink : a PgmImageSink object. events : a PgmImageSinkEventMask pointer where the event mask will be stored. Returns : a PgmError indicating success/failure. Property Details The <literal>"events"</literal> property PgmImageSink:events "events" PgmImageSinkEventMask : Read / Write A PgmImageSinkEventMask specifying what input events should be sent upstream in the pipeline. The <literal>"image"</literal> property PgmImageSink:image "image" PgmImage* : Read / Write A PgmImage on which the sink output video frames. See Also #PgmImage pigment-0.3.17/docs/pgm/xml/pgmgtk.xml0000644000175000017500000001512511205035140014507 00000000000000 ]> PgmGtk 3 PIGMENT Library PgmGtk A GTK+ widget embedding viewports. Synopsis #include <pgm/gtk/pgmgtk.h> PgmGtk; GtkWidget * pgm_gtk_new (void); gboolean pgm_gtk_set_viewport (PgmGtk *gtk, PgmViewport *viewport); PgmError pgm_gtk_get_viewport (PgmGtk *gtk, PgmViewport **viewport); Object Hierarchy GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkSocket +----PgmGtk Implemented Interfaces PgmGtk implements AtkImplementorIface and GtkBuildable. Description PgmGtk is a GTK+ widget allowing to embed a PgmViewport inside a GTK+ application. Last reviewed on 2007-11-09 (0.3.2) Details PgmGtk PgmGtktypedef struct _PgmGtk PgmGtk; The opaque PgmGtk data structure. pgm_gtk_new () pgm_gtk_newGtkWidget * pgm_gtk_new (void); Creates a new PgmGtk object. Returns : a new PgmGtk instance. pgm_gtk_set_viewport () pgm_gtk_set_viewportgboolean pgm_gtk_set_viewport (PgmGtk *gtk, PgmViewport *viewport); Embeds viewport in the GTK+ widget gtk. viewport must support application embedding for the function to success. gtk : A PgmGtk object. viewport : A PgmViewport object. Returns : TRUE if viewport has been embedded successfully, FALSE otherwise. pgm_gtk_get_viewport () pgm_gtk_get_viewportPgmError pgm_gtk_get_viewport (PgmGtk *gtk, PgmViewport **viewport); Retrieves the viewport of gtk. gtk : a PgmViewport object. viewport : a pointer to a PgmViewport pointer where the viewport is going to be stored. Unref after usage. Returns : a PgmError indicating success/failure. pigment-0.3.17/docs/pgm/xml/pgmdrawable.xml0000644000175000017500000036654211205035140015517 00000000000000 ]> PgmDrawable 3 PIGMENT Library PgmDrawable A base class used for embedding media types. Synopsis #include <pgm/pgm.h> enum PgmDrawableLayer; enum PgmDrawableProperty; PgmDrawable; PgmDrawableClass; PgmError pgm_drawable_hide (PgmDrawable *drawable); PgmError pgm_drawable_show (PgmDrawable *drawable); PgmError pgm_drawable_is_visible (PgmDrawable *drawable, gboolean *visible); PgmError pgm_drawable_set_size (PgmDrawable *drawable, gfloat width, gfloat height); PgmError pgm_drawable_get_size (PgmDrawable *drawable, gfloat *width, gfloat *height); PgmError pgm_drawable_set_position (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z); PgmError pgm_drawable_get_position (PgmDrawable *drawable, gfloat *x, gfloat *y, gfloat *z); PgmError pgm_drawable_set_rotation_x (PgmDrawable *drawable, gfloat angle); PgmError pgm_drawable_get_rotation_x (PgmDrawable *drawable, gfloat *angle); PgmError pgm_drawable_set_rotation_y (PgmDrawable *drawable, gfloat angle); PgmError pgm_drawable_get_rotation_y (PgmDrawable *drawable, gfloat *angle); PgmError pgm_drawable_set_rotation_z (PgmDrawable *drawable, gfloat angle); PgmError pgm_drawable_get_rotation_z (PgmDrawable *drawable, gfloat *angle); PgmError pgm_drawable_set_scale (PgmDrawable *drawable, gfloat scale); PgmError pgm_drawable_get_scale (PgmDrawable *drawable, gfloat *scale); PgmError pgm_drawable_set_fg_color (PgmDrawable *drawable, guchar r, guchar g, guchar b, guchar a); PgmError pgm_drawable_get_fg_color (PgmDrawable *drawable, guchar *r, guchar *g, guchar *b, guchar *a); PgmError pgm_drawable_set_bg_color (PgmDrawable *drawable, guchar r, guchar g, guchar b, guchar a); PgmError pgm_drawable_get_bg_color (PgmDrawable *drawable, guchar *r, guchar *g, guchar *b, guchar *a); PgmError pgm_drawable_set_opacity (PgmDrawable *drawable, guchar opacity); PgmError pgm_drawable_get_opacity (PgmDrawable *drawable, guchar *opacity); PgmError pgm_drawable_set_grid_aligned (PgmDrawable *drawable, gboolean aligned); PgmError pgm_drawable_get_grid_aligned (PgmDrawable *drawable, gboolean *aligned); PgmError pgm_drawable_set_drag_distance (PgmDrawable *drawable, guchar distance); PgmError pgm_drawable_get_drag_distance (PgmDrawable *drawable, guchar *distance); PgmError pgm_drawable_regenerate (PgmDrawable *drawable); PgmError pgm_drawable_from_canvas (PgmDrawable *drawable, gfloat *x_drawable, gfloat *y_drawable, gfloat x_canvas, gfloat y_canvas, gfloat z_canvas); PgmError pgm_drawable_to_canvas (PgmDrawable *drawable, gfloat *x_canvas, gfloat *y_canvas, gfloat *z_canvas, gfloat x_drawable, gfloat y_drawable); Object Hierarchy GObject +----GstObject +----PgmDrawable +----PgmImage +----PgmText Signals "changed" : Run First "clicked" : Run Last "double-clicked" : Run Last "drag-begin" : Run Last "drag-end" : Run Last "drag-motion" : Run Last "entered" : Run Last "left" : Run Last "motion" : Run Last "pressed" : Run Last "pressured" : Run Last "released" : Run Last "scrolled" : Run Last Description PgmDrawable represents a visual object on which you can embed media types such as text, images and video, or 2D graphics. It is meant to be a base abstract class for more specific visual objects such as PgmImage or PgmText. Drawables are not visible until they are added to a PgmCanvas. A drawable never knows about physical on screen coordinates such as pixels, and use floating point canvas coordinates. Drawables are positioned in 3D and then projected on a PgmViewport. Manipulating drawables The base class implements simple drawing methods that are common to the different subclasses. For example if you want to draw a left aligned green text you would do something like that: Calling drawing functions on a drawable pgm_drawable_set_fg_color (text, 0, 255, 0, 255); pgm_drawable_set_bg_color (text, 255, 0, 0, 255); pgm_text_set_label (PGM_TEXT (text), "Hello world!"); You are basically using a mix of drawable calls and text calls on the same object at different level of the object hierarchy. Signal connections The changed signal is fired whenever a property of a drawable is changed. There are also signals for handling mouse picking. For instance, you just need to connect a callback to the clicked signal to be notified of a click on a drawable. Last reviewed on 2007-09-25 (0.3.1) Details enum PgmDrawableLayer PgmDrawableLayertypedef enum { PGM_DRAWABLE_UNBOUND, PGM_DRAWABLE_FAR, PGM_DRAWABLE_MIDDLE, PGM_DRAWABLE_NEAR } PgmDrawableLayer; The rendering layers. PGM_DRAWABLE_UNBOUND Not bound to a Canvas. PGM_DRAWABLE_FAR Layer of drawables drawn behind the other layers. PGM_DRAWABLE_MIDDLE Layer of drawables drawn over the drawables in the far layer and behind the drawables in the near one. PGM_DRAWABLE_NEAR Layer of drawables drawn over the other layers. enum PgmDrawableProperty PgmDrawablePropertytypedef enum { /* PgmDrawable properties */ PGM_DRAWABLE_VISIBILITY = 0, PGM_DRAWABLE_SIZE = 1, PGM_DRAWABLE_POSITION = 2, PGM_DRAWABLE_TRANSFORMATION_MATRIX = 3, PGM_DRAWABLE_BG_COLOR = 4, PGM_DRAWABLE_FG_COLOR = 5, PGM_DRAWABLE_OPACITY = 6, PGM_DRAWABLE_REGENERATE = 7, /* PgmImage properties */ PGM_IMAGE_DATA_FILE = 8, PGM_IMAGE_DATA_BUFFER = 9, PGM_IMAGE_DATA_GST_BUFFER = 10, PGM_IMAGE_DATA_PIXBUF = 11, PGM_IMAGE_DATA_SYSTEM_BUFFER = 12, PGM_IMAGE_DATA_IMAGE = 13, PGM_IMAGE_DATA_EMPTY = 14, PGM_IMAGE_SYSTEM_BUFFER_CONTENT = 15, PGM_IMAGE_MAPPING_MATRIX = 16, PGM_IMAGE_ALIGNMENT = 17, PGM_IMAGE_LAYOUT = 18, PGM_IMAGE_INTERP = 19, PGM_IMAGE_WRAPPING = 20, PGM_IMAGE_ASPECT_RATIO = 21, PGM_IMAGE_BORDER_WIDTH = 22, PGM_IMAGE_BORDER_INNER_COLOR = 23, PGM_IMAGE_BORDER_OUTER_COLOR = 24, /* PgmText properties */ PGM_TEXT_LABEL = 25, PGM_TEXT_MARKUP = 26, PGM_TEXT_FONT_FAMILY = 27, PGM_TEXT_HEIGHT = 28, PGM_TEXT_ELLIPSIZE = 29, PGM_TEXT_JUSTIFY = 30, PGM_TEXT_ALIGNMENT = 31, PGM_TEXT_WRAP = 32, PGM_TEXT_GRAVITY = 33, PGM_TEXT_STRETCH = 34, PGM_TEXT_STYLE = 35, PGM_TEXT_VARIANT = 36, PGM_TEXT_WEIGHT = 37, PGM_TEXT_MULTILINE = 38, PGM_TEXT_LINE_SPACING = 39, PGM_TEXT_COLOR = 40, PGM_TEXT_OUTLINE_COLOR = 41, PGM_TEXT_OUTLINE_WIDTH = 42, PGM_TEXT_CAST_SHADOW = 43, PGM_TEXT_SHADOW_POSITION = 44, PGM_TEXT_SHADOW_COLOR = 45 } PgmDrawableProperty; The different properties of the drawables. PGM_DRAWABLE_VISIBILITY PgmDrawable visibility property. PGM_DRAWABLE_SIZE PgmDrawable size property. PGM_DRAWABLE_POSITION PgmDrawable position property. PGM_DRAWABLE_TRANSFORMATION_MATRIX PgmDrawable transformation matrix property. PGM_DRAWABLE_BG_COLOR PgmDrawable background color property. PGM_DRAWABLE_FG_COLOR PgmDrawable foreground color property. PGM_DRAWABLE_OPACITY PgmDrawable opacity property. PGM_DRAWABLE_REGENERATE PgmDrawable regenerate property. PGM_IMAGE_DATA_FILE PgmImage file data property. PGM_IMAGE_DATA_BUFFER PgmImage buffer data property. PGM_IMAGE_DATA_GST_BUFFER PgmImage GstBuffer data property. PGM_IMAGE_DATA_PIXBUF PgmImage GdkPixbuf data property. PGM_IMAGE_DATA_SYSTEM_BUFFER PgmImage system buffer data property. PGM_IMAGE_DATA_IMAGE PgmImage image data property. PGM_IMAGE_DATA_EMPTY PgmImage empty data property. PGM_IMAGE_SYSTEM_BUFFER_CONTENT PgmImage system buffer content property. PGM_IMAGE_MAPPING_MATRIX PgmImage mapping matrix data property. PGM_IMAGE_ALIGNMENT PgmImage alignment property. PGM_IMAGE_LAYOUT PgmImage layout property. PGM_IMAGE_INTERP PgmImage interpolation property. PGM_IMAGE_WRAPPING PgmImage wrapping property. PGM_IMAGE_ASPECT_RATIO PgmImage aspect-ratio property. PGM_IMAGE_BORDER_WIDTH PgmImage border width property. PGM_IMAGE_BORDER_INNER_COLOR PgmImage border inner color property. PGM_IMAGE_BORDER_OUTER_COLOR PgmImage border outer color property. PGM_TEXT_LABEL PgmText label property. PGM_TEXT_MARKUP PgmText markup property. PGM_TEXT_FONT_FAMILY PgmText font family property. PGM_TEXT_HEIGHT PgmText height property. PGM_TEXT_ELLIPSIZE PgmText ellipsize property. PGM_TEXT_JUSTIFY PgmText justify property. PGM_TEXT_ALIGNMENT PgmText alignment property. PGM_TEXT_WRAP PgmText wrap property. PGM_TEXT_GRAVITY PgmText gravity property. PGM_TEXT_STRETCH PgmText stretch property. PGM_TEXT_STYLE PgmText style property. PGM_TEXT_VARIANT PgmText variant property. PGM_TEXT_WEIGHT PgmText weight property. PGM_TEXT_MULTILINE PgmText multiline property. PGM_TEXT_LINE_SPACING PgmText line spacing property. PGM_TEXT_COLOR PgmText color property. PGM_TEXT_OUTLINE_COLOR PgmText outline color property. PGM_TEXT_OUTLINE_WIDTH PgmText outline width property. PGM_TEXT_CAST_SHADOW PgmText cast shadow property. PGM_TEXT_SHADOW_POSITION PgmText shadow position property. PGM_TEXT_SHADOW_COLOR PgmText shadow color. PgmDrawable PgmDrawabletypedef struct { /* Transformation */ PgmMat4x4 *transformation_matrix; gfloat angle_x, angle_y, angle_z; /* Layer */ PgmDrawableLayer layer; /* Position */ gfloat x, y, z; gfloat orig_x, orig_y; /* Scale */ gfloat scale; /* Size */ gfloat width, height; gfloat orig_width, orig_height; gboolean grid_aligned; /* Colors */ guchar fg_r, fg_g, fg_b, fg_a; guchar bg_r, bg_g, bg_b, bg_a; /* Opacity */ guchar opacity; } PgmDrawable; Pigment drawable abstract base class. PgmMat4x4 *transformation_matrix; the drawable transformation matrix. gfloat angle_x; the drawable angle of rotation on the x axis. gfloat angle_y; the drawable angle of rotation on the y axis. gfloat angle_z; the drawable angle of rotation on the z axis. PgmDrawableLayer layer; the layer the drawable belongs to. gfloat x; the drawable position on the x axis. gfloat y; the drawable position on the y axis. gfloat z; the drawable position on the z axis. gfloat orig_x; the drawable original position on the x axis. gfloat orig_y; the drawable original position on the y axis. gfloat scale; the drawable scale factor. gfloat width; the drawable width. gfloat height; the drawable height. gfloat orig_width; the drawable original width. gfloat orig_height; the drawable original height. gboolean grid_aligned; the grid aligned boolean. guchar fg_r; the drawable foreground red color component. guchar fg_g; the drawable foreground green color component. guchar fg_b; the drawable foreground blue color component. guchar fg_a; the drawable foreground alpha color component. guchar bg_r; the drawable background red color component. guchar bg_g; the drawable background green color component. guchar bg_b; the drawable background blue color component. guchar bg_a; the drawable background alpha color component. guchar opacity; the drawable opacity. PgmDrawableClass PgmDrawableClasstypedef struct { GstObjectClass parent_class; /* Signals */ void (*changed) (PgmDrawable *drawable, PgmDrawableProperty property); gboolean (*pressed) (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, PgmButtonType button, guint32 time, guint32 pressure); gboolean (*pressured) (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, PgmButtonType button, guint32 time, guint32 pressure); gboolean (*released) (PgmDrawable *drawable, PgmButtonType button, guint32 time); gboolean (*clicked) (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, PgmButtonType button, guint32 time, guint32 pressure); gboolean (*double_clicked) (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, PgmButtonType button, guint32 time); gboolean (*scrolled) (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, PgmScrollDirection direction, guint32 time); gboolean (*drag_begin) (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, PgmButtonType button, guint32 time, guint32 pressure); gboolean (*drag_motion) (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, PgmButtonType button, guint32 time, guint32 pressure); gboolean (*drag_end) (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, PgmButtonType button, guint32 time); gboolean (*motion) (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, guint32 time); gboolean (*entered) (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, guint32 time); gboolean (*left) (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, guint32 time); /* virtual methods for subclasses */ PgmError (*hide) (PgmDrawable *drawable); PgmError (*show) (PgmDrawable *drawable); PgmError (*set_size) (PgmDrawable *drawable, gfloat width, gfloat height); PgmError (*set_position) (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z); PgmError (*set_fg_color) (PgmDrawable *drawable, guchar r, guchar g, guchar b, guchar a); PgmError (*set_bg_color) (PgmDrawable *drawable, guchar r, guchar g, guchar b, guchar a); PgmError (*set_opacity) (PgmDrawable *drawable, guchar opacity); } PgmDrawableClass; The PgmDrawable structure. GstObjectClass parent_class; the parent class structure. changed () the "changed" signal. pressed () the "pressed" signal. pressured () the "pressured" signal. released () the "released" signal. clicked () the "clicked" signal. double_clicked () the "double-clicked" signal. scrolled () the "scrolled" signal. drag_begin () the "drag-begin" signal. drag_motion () the "drag-motion" signal. drag_end () the "drag-end" signal. motion () the "motion" signal. entered () the "entered" signal. left () the "left" signal. hide () the hide virtual method. show () the show virtual method. set_size () the set_size virtual method. set_position () the set_position virtual method. set_fg_color () the set_fg_color virtual method. set_bg_color () the set_bg_color virtual method. set_opacity () the set_opacity virtual method. pgm_drawable_hide () pgm_drawable_hidePgmError pgm_drawable_hide (PgmDrawable *drawable); Makes drawable invisible. MT safe. drawable : a PgmDrawable object. Returns : a PgmError indicating success/failure. pgm_drawable_show () pgm_drawable_showPgmError pgm_drawable_show (PgmDrawable *drawable); Makes drawable visible. MT safe. drawable : a PgmDrawable object. Returns : a PgmError indicating success/failure. pgm_drawable_is_visible () pgm_drawable_is_visiblePgmError pgm_drawable_is_visible (PgmDrawable *drawable, gboolean *visible); Retrieves whether drawable is visible. MT safe. drawable : a PgmDrawable object. visible : a pointer to a gboolean where the visible state of the drawable is going to be stored. Returns : a PgmError indicating success/failure. pgm_drawable_set_size () pgm_drawable_set_sizePgmError pgm_drawable_set_size (PgmDrawable *drawable, gfloat width, gfloat height); Defines drawable size in canvas units to width x height. MT safe. drawable : a PgmDrawable object. width : the width of the canvas. height : the height of the canvas. Returns : a PgmError indicating success/failure. pgm_drawable_get_size () pgm_drawable_get_sizePgmError pgm_drawable_get_size (PgmDrawable *drawable, gfloat *width, gfloat *height); Gets drawable size in canvas units. MT safe. drawable : a PgmDrawable object. width : a pointer to a gfloat where the width of the drawable is going to be stored. height : a pointer to a gfloat where the height of the drawable is going to be stored. Returns : a PgmError indicating success/failure. pgm_drawable_set_position () pgm_drawable_set_positionPgmError pgm_drawable_set_position (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z); Sets position of drawable in canvas units. MT safe. drawable : a PgmDrawable object. x : the position of drawable on the x axis. y : the position of drawable on the y axis. z : the position of drawable on the z axis. Returns : a PgmError indicating success/failure. pgm_drawable_get_position () pgm_drawable_get_positionPgmError pgm_drawable_get_position (PgmDrawable *drawable, gfloat *x, gfloat *y, gfloat *z); Gets drawable position in canvas units. MT safe. drawable : a PgmDrawable object. x : a pointer to a gfloat where the x position of drawable is going to be stored. y : a pointer to a gfloat where the y position of drawable is going to be stored. z : a pointer to a gfloat where the z position of drawable is going to be stored. Returns : a PgmError indicating success/failure. pgm_drawable_set_rotation_x () pgm_drawable_set_rotation_xPgmError pgm_drawable_set_rotation_x (PgmDrawable *drawable, gfloat angle); Defines the rotation to apply to drawable on the x axis. The rotation point is the center of drawable and the axis is its normal. MT safe. drawable : a PgmDrawable object. angle : an angle of rotation, in radians. Returns : a PgmError indicating success/failure. pgm_drawable_get_rotation_x () pgm_drawable_get_rotation_xPgmError pgm_drawable_get_rotation_x (PgmDrawable *drawable, gfloat *angle); Retrieves in angle the current x rotation angle applied to drawable. MT safe. drawable : a PgmDrawable object. angle : a gfloat pointer where the x rotation angle is going to be stored. Returns : a PgmError indicating success/failure. pgm_drawable_set_rotation_y () pgm_drawable_set_rotation_yPgmError pgm_drawable_set_rotation_y (PgmDrawable *drawable, gfloat angle); Defines the rotation to apply to drawable on the y axis. The rotation point is the center of drawable and the axis is its normal. MT safe. drawable : a PgmDrawable object. angle : an angle of rotation, in radians. Returns : a PgmError indicating success/failure. pgm_drawable_get_rotation_y () pgm_drawable_get_rotation_yPgmError pgm_drawable_get_rotation_y (PgmDrawable *drawable, gfloat *angle); Retrieves in angle the current y rotation angle applied to drawable. MT safe. drawable : a PgmDrawable object. angle : a gfloat pointer where the y rotation angle is going to be stored. Returns : a PgmError indicating success/failure. pgm_drawable_set_rotation_z () pgm_drawable_set_rotation_zPgmError pgm_drawable_set_rotation_z (PgmDrawable *drawable, gfloat angle); Defines the rotation to apply to drawable on the z axis. The rotation point is the center of drawable and the axis is its normal. MT safe. drawable : a PgmDrawable object. angle : an angle of rotation, in radians. Returns : a PgmError indicating success/failure. pgm_drawable_get_rotation_z () pgm_drawable_get_rotation_zPgmError pgm_drawable_get_rotation_z (PgmDrawable *drawable, gfloat *angle); Retrieves in angle the current z rotation angle applied to drawable. MT safe. drawable : a PgmDrawable object. angle : a gfloat pointer where the z rotation angle is going to be stored. Returns : a PgmError indicating success/failure. pgm_drawable_set_scale () pgm_drawable_set_scalePgmError pgm_drawable_set_scale (PgmDrawable *drawable, gfloat scale); Defines the scale to apply to drawable. The scaling point is the center of drawable. MT safe. drawable : a PgmDrawable object. scale : a scale factor. Returns : a PgmError indicating success/failure. pgm_drawable_get_scale () pgm_drawable_get_scalePgmError pgm_drawable_get_scale (PgmDrawable *drawable, gfloat *scale); Retrieves in scale the current scale factor applied to drawable. MT safe. drawable : a PgmDrawable object. scale : a gfloat pointer where the scale factor is going to be stored. Returns : a PgmError indicating success/failure. pgm_drawable_set_fg_color () pgm_drawable_set_fg_colorPgmError pgm_drawable_set_fg_color (PgmDrawable *drawable, guchar r, guchar g, guchar b, guchar a); Set the color used for drawing operations on drawable to (r,g,b,a). MT safe. drawable : a PgmDrawable object. r : the red foreground color. g : the green foreground color. b : the blue foreground color. a : the alpha foreground color. Returns : a PgmError indicating success/failure. pgm_drawable_get_fg_color () pgm_drawable_get_fg_colorPgmError pgm_drawable_get_fg_color (PgmDrawable *drawable, guchar *r, guchar *g, guchar *b, guchar *a); Retrieves the color used for drawing operations on drawable in (r,g,b,a). MT safe. drawable : a PgmDrawable object. r : a pointer to a guchar where the red foreground color is going to be stored. g : a pointer to a guchar where the green foreground color is going to be stored. b : a pointer to a guchar where the blue foreground color is going to be stored. a : a pointer to a guchar where the alpha foreground color is going to be stored. Returns : a PgmError indicating success/failure. pgm_drawable_set_bg_color () pgm_drawable_set_bg_colorPgmError pgm_drawable_set_bg_color (PgmDrawable *drawable, guchar r, guchar g, guchar b, guchar a); Sets the color used to fill the background of drawable to (r,g,b,a). MT safe. drawable : a PgmDrawable object. r : the red background color. g : the green background color. b : the blue background color. a : the alpha background color. Returns : a PgmError indicating success/failure. pgm_drawable_get_bg_color () pgm_drawable_get_bg_colorPgmError pgm_drawable_get_bg_color (PgmDrawable *drawable, guchar *r, guchar *g, guchar *b, guchar *a); Retrieves the color used to fill the background of drawable in (r,g,b,a). MT safe. drawable : A PgmDrawable object. r : a pointer to a guchar where the red background color is going to be stored. g : a pointer to a guchar where the green background color is going to be stored. b : a pointer to a guchar where the blue background color is going to be stored. a : a pointer to a guchar where the alpha background color is going to be stored. Returns : A PgmError indicating success/failure. pgm_drawable_set_opacity () pgm_drawable_set_opacityPgmError pgm_drawable_set_opacity (PgmDrawable *drawable, guchar opacity); Defines the opacity of drawable to opacity. MT safe. drawable : a PgmDrawable object. opacity : the opacity of drawable. Returns : a PgmError indicating success/failure. pgm_drawable_get_opacity () pgm_drawable_get_opacityPgmError pgm_drawable_get_opacity (PgmDrawable *drawable, guchar *opacity); Retrieves the opacity of drawable in opacity. MT safe. drawable : a PgmDrawable object. opacity : a pointer to a guchar where the opacity is going to be stored. Returns : a PgmError indicating success/failure. pgm_drawable_set_grid_aligned () pgm_drawable_set_grid_alignedPgmError pgm_drawable_set_grid_aligned (PgmDrawable *drawable, gboolean aligned); Sets whether or not drawable must be automatically aligned to the pixel boundaries in the viewport. MT safe. drawable : a PgmDrawable object. aligned : the grid aligned boolean. FALSE by default. Returns : a PgmError indicating success/failure. pgm_drawable_get_grid_aligned () pgm_drawable_get_grid_alignedPgmError pgm_drawable_get_grid_aligned (PgmDrawable *drawable, gboolean *aligned); Gets whether or not drawable must be automatically aligned to the pixel boundaries in the viewport. MT safe. drawable : a PgmDrawable object. aligned : a pointer to a gboolean where the grid aligned boolean is going to be stored. Returns : a PgmError indicating success/failure. pgm_drawable_set_drag_distance () pgm_drawable_set_drag_distancePgmError pgm_drawable_set_drag_distance (PgmDrawable *drawable, guchar distance); Defines the drag distance of drawable to distance. The drag distance is the distance in pixels the user has to cover with a mouse button pressed to trigger the 'drag-begin' signal. MT safe. drawable : a PgmDrawable object. distance : the drag distance of drawable. 5 by default. Returns : a PgmError indicating success/failure. pgm_drawable_get_drag_distance () pgm_drawable_get_drag_distancePgmError pgm_drawable_get_drag_distance (PgmDrawable *drawable, guchar *distance); Retrieves the drag distance of drawable in distance. MT safe. drawable : a PgmDrawable object. distance : a pointer to a guchar where the drag distance is going to be stored. Returns : a PgmError indicating success/failure. pgm_drawable_regenerate () pgm_drawable_regeneratePgmError pgm_drawable_regenerate (PgmDrawable *drawable); Forces a regeneration of the drawable. MT safe. drawable : a PgmDrawable object. Returns : a PgmError indicating success/failure. pgm_drawable_from_canvas () pgm_drawable_from_canvasPgmError pgm_drawable_from_canvas (PgmDrawable *drawable, gfloat *x_drawable, gfloat *y_drawable, gfloat x_canvas, gfloat y_canvas, gfloat z_canvas); Converts a position in the canvas into its orthogonal projection in the plane of drawable, with the (0,0) coordinate in that plane being the upper left corner of drawable. drawable : a PgmDrawable object. x_drawable : where to return the x coordinate in the drawable plane. y_drawable : where to return the y coordinate in the drawable plane. x_canvas : x coordinate in the canvas space. y_canvas : y coordinate in the canvas space. z_canvas : z coordinate in the canvas space. Returns : a PgmError indicating success/failure. pgm_drawable_to_canvas () pgm_drawable_to_canvasPgmError pgm_drawable_to_canvas (PgmDrawable *drawable, gfloat *x_canvas, gfloat *y_canvas, gfloat *z_canvas, gfloat x_drawable, gfloat y_drawable); Converts a position in the plane of drawable into the canvas space. drawable : a PgmDrawable object. x_canvas : where to return the x coordinate in the canvas space. y_canvas : where to return the y coordinate in the canvas space. z_canvas : where to return the z coordinate in the canvas space. x_drawable : x coordinate in the drawable plane. y_drawable : y coordinate in the drawable plane. Returns : a PgmError indicating success/failure. Signal Details The <literal>"changed"</literal> signal PgmDrawable::changedvoid user_function (PgmDrawable *drawable, PgmDrawableProperty property, gpointer user_data) : Run First Will be emitted after property of drawable is changed. drawable : the PgmDrawable property : the PgmDrawableProperty changed in drawable user_data : user data set when the signal handler was connected. The <literal>"clicked"</literal> signal PgmDrawable::clickedgboolean user_function (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, PgmButtonType button, guint time, guint pressure, gpointer user_data) : Run Last Will be emitted after drawable is clicked. drawable : the PgmDrawable x : the x coordinate of the point intersecting the click on drawable y : the y coordinate of the point intersecting the click on drawable z : the z coordinate of the point intersecting the click on drawable button : the PgmButtonType time : the timestamp of the button press event pressure : the pressure force, set to 0 when not used with a touch screen user_data : user data set when the signal handler was connected. Returns : TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further. The <literal>"double-clicked"</literal> signal PgmDrawable::double-clickedgboolean user_function (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, PgmButtonType button, guint time, gpointer user_data) : Run Last Will be emitted after drawable is clicked. drawable : the PgmDrawable x : the x coordinate of the point intersecting the double-click on drawable y : the y coordinate of the point intersecting the double-click on drawable z : the z coordinate of the point intersecting the double-click on drawable button : the PgmButtonType time : the timestamp of the button press event user_data : user data set when the signal handler was connected. Returns : TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further. The <literal>"drag-begin"</literal> signal PgmDrawable::drag-begingboolean user_function (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, PgmButtonType button, guint time, guint pressure, gpointer user_data) : Run Last Will be emitted after drawable is initially dragged. You can for instance use that signal to change drawable properties or store the intersecting point for further computations during the "drag-motion" signal emission. drawable : the PgmDrawable x : the x coordinate of the point intersecting the initial click on drawable y : the y coordinate of the point intersecting the initial click on drawable z : the z coordinate of the point intersecting the initial click on drawable button : the PgmButtonType time : the timestamp of the motion event pressure : the pressure force, set to 0 when not used with a touch screen user_data : user data set when the signal handler was connected. Returns : TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further. The <literal>"drag-end"</literal> signal PgmDrawable::drag-endgboolean user_function (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, PgmButtonType button, guint time, gpointer user_data) : Run Last Will be emitted after drawable is released. This signal is emitted on all the drawables which have received a "drag-begin" signal. drawable : the PgmDrawable x : the x coordinate of the point intersecting the release event on the dragged drawable plane y : the y coordinate of the point intersecting the release event on the dragged drawable plane z : the z coordinate of the point intersecting the release event on the dragged drawable plane button : the PgmButtonType time : the timestamp of the motion event user_data : user data set when the signal handler was connected. Returns : TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further. The <literal>"drag-motion"</literal> signal PgmDrawable::drag-motiongboolean user_function (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, PgmButtonType button, guint time, guint pressure, gpointer user_data) : Run Last Will be emitted after drawable is dragged. drawable : the PgmDrawable x : the x coordinate of the point intersecting the cursor position on the dragged drawable plane y : the y coordinate of the point intersecting the cursor position on the dragged drawable plane z : the z coordinate of the point intersecting the cursor position on the dragged drawable plane button : the PgmButtonType time : the timestamp of the motion event pressure : the pressure force, set to 0 when not used with a touch screen user_data : user data set when the signal handler was connected. Returns : TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further. The <literal>"entered"</literal> signal PgmDrawable::enteredgboolean user_function (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, guint time, gpointer user_data) : Run Last Will be emitted when the pointer enters the drawable area. drawable : the PgmDrawable x : the x coordinate of the point intersecting the cursor position on the drawable plane y : the y coordinate of the point intersecting the cursor position on the drawable plane z : the z coordinate of the point intersecting the cursor position on the drawable plane time : the timestamp of the motion event user_data : user data set when the signal handler was connected. Returns : TRUE if drawables under drawable should not be in "entered" state until the pointer leaves drawable, FALSE otherwise. The <literal>"left"</literal> signal PgmDrawable::leftvoid user_function (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, guint time, gpointer user_data) : Run Last Will be emitted when the pointer leaves the drawable area. drawable : the PgmDrawable x : the x coordinate of the point intersecting the cursor position on the drawable plane y : the y coordinate of the point intersecting the cursor position on the drawable plane z : the z coordinate of the point intersecting the cursor position on the drawable plane time : the timestamp of the motion event user_data : user data set when the signal handler was connected. The <literal>"motion"</literal> signal PgmDrawable::motiongboolean user_function (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, guint time, gpointer user_data) : Run Last Will be emitted when the pointer is moved over drawable. drawable : the PgmDrawable x : the x coordinate of the point intersecting the cursor position on the drawable plane y : the y coordinate of the point intersecting the cursor position on the drawable plane z : the z coordinate of the point intersecting the cursor position on the drawable plane time : the timestamp of the motion event user_data : user data set when the signal handler was connected. Returns : TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further. The <literal>"pressed"</literal> signal PgmDrawable::pressedgboolean user_function (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, PgmButtonType button, guint time, guint pressure, gpointer user_data) : Run Last Will be emitted after drawable is pressed. drawable : the PgmDrawable x : the x coordinate of the point intersecting the click on drawable y : the y coordinate of the point intersecting the click on drawable z : the z coordinate of the point intersecting the click on drawable button : the PgmButtonType time : the timestamp of the button press event pressure : the pressure force, set to 0 when not used with a touch screen user_data : user data set when the signal handler was connected. Returns : TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further. The <literal>"pressured"</literal> signal PgmDrawable::pressuredgboolean user_function (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, PgmButtonType button, guint time, guint pressure, gpointer user_data) : Run Last Will be emitted after the touch pressure on drawable change. drawable : the PgmDrawable x : the x coordinate of the point intersecting the click on drawable y : the y coordinate of the point intersecting the click on drawable z : the z coordinate of the point intersecting the click on drawable button : the PgmButtonType time : the timestamp of the button press event pressure : the pressure force user_data : user data set when the signal handler was connected. Returns : TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further. The <literal>"released"</literal> signal PgmDrawable::releasedgboolean user_function (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, PgmButtonType button, guint time, gpointer user_data) : Run Last Will be emitted after drawable is released. drawable : the PgmDrawable x : the x coordinate of the point intersecting the click on drawable plane y : the y coordinate of the point intersecting the click on drawable plane z : the z coordinate of the point intersecting the click on drawable plane button : the PgmButtonType time : the timestamp of the button release event user_data : user data set when the signal handler was connected. Returns : TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further. The <literal>"scrolled"</literal> signal PgmDrawable::scrolledgboolean user_function (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, PgmScrollDirection direction, guint time, gpointer user_data) : Run Last Will be emitted after drawable is scrolled. drawable : the PgmDrawable x : the x coordinate of the point intersecting the scroll on drawable y : the y coordinate of the point intersecting the scroll on drawable z : the z coordinate of the point intersecting the scroll on drawable direction : the PgmScrollDirection time : the timestamp of the scroll event user_data : user data set when the signal handler was connected. Returns : TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further. See Also #PgmImage, PgmText, PgmCanvas. pigment-0.3.17/docs/pgm/xml/pgmlinearalgebra.xml0000644000175000017500000047011511205035140016516 00000000000000 ]> PgmLinearAlgebra 3 PIGMENT Library PgmLinearAlgebra Various linear algebra objects and utility functions. Synopsis #include <pgm/pgm.h> enum PgmMat4x4Predefined; PgmVec3; PgmVec4; PgmMat3x3; PgmMat4x4; PgmVec3 * pgm_vec3_new (void); PgmVec3 * pgm_vec3_new_from_scalars (gfloat v0, gfloat v1, gfloat v2); PgmVec3 * pgm_vec3_copy (PgmVec3 *vec3); void pgm_vec3_free (PgmVec3 *vec3); void pgm_vec3_set_from_scalars (PgmVec3 *vec3, gfloat v0, gfloat v1, gfloat v2); void pgm_vec3_set_from_vec3 (PgmVec3 *vec3, const PgmVec3 *v); gfloat pgm_vec3_length (PgmVec3 *vec3); PgmVec3 * pgm_vec3_normalize (PgmVec3 *vec3); gfloat pgm_vec3_dot_product (PgmVec3 *vec3, const PgmVec3 *v); PgmVec3 * pgm_vec3_cross_product (PgmVec3 *vec3, const PgmVec3 *v); PgmVec3 * pgm_vec3_add_scalar (PgmVec3 *vec3, gfloat s); PgmVec3 * pgm_vec3_add_vec3 (PgmVec3 *vec3, const PgmVec3 *v); PgmVec3 * pgm_vec3_substract_scalar (PgmVec3 *vec3, gfloat s); PgmVec3 * pgm_vec3_substract_vec3 (PgmVec3 *vec3, const PgmVec3 *v); PgmVec3 * pgm_vec3_multiply_scalar (PgmVec3 *vec3, gfloat s); PgmVec3 * pgm_vec3_multiply_vec3 (PgmVec3 *vec3, const PgmVec3 *v); gchar * pgm_vec3_to_string (PgmVec3 *vec3); PgmVec4 * pgm_vec4_new (void); PgmVec4 * pgm_vec4_new_from_scalars (gfloat v0, gfloat v1, gfloat v2, gfloat v3); PgmVec4 * pgm_vec4_copy (PgmVec4 *vec4); void pgm_vec4_free (PgmVec4 *vec4); void pgm_vec4_set_from_scalars (PgmVec4 *vec4, gfloat v0, gfloat v1, gfloat v2, gfloat v3); void pgm_vec4_set_from_vec4 (PgmVec4 *vec4, const PgmVec4 *v); gfloat pgm_vec4_length (PgmVec4 *vec4); PgmVec4 * pgm_vec4_normalize (PgmVec4 *vec4); PgmVec4 * pgm_vec4_add_scalar (PgmVec4 *vec4, gfloat s); PgmVec4 * pgm_vec4_add_vec4 (PgmVec4 *vec4, const PgmVec4 *v); PgmVec4 * pgm_vec4_substract_scalar (PgmVec4 *vec4, gfloat s); PgmVec4 * pgm_vec4_substract_vec4 (PgmVec4 *vec4, const PgmVec4 *v); PgmVec4 * pgm_vec4_multiply_scalar (PgmVec4 *vec4, gfloat s); PgmVec4 * pgm_vec4_multiply_vec4 (PgmVec4 *vec4, const PgmVec4 *v); gchar * pgm_vec4_to_string (PgmVec4 *vec4); PgmMat3x3 * pgm_mat3x3_new (void); PgmMat3x3 * pgm_mat3x3_new_from_scalars (gfloat v0, gfloat v1, gfloat v2, gfloat v3, gfloat v4, gfloat v5, gfloat v6, gfloat v7, gfloat v8); PgmMat3x3 * pgm_mat3x3_new_from_vec3 (const PgmVec3 *v0, const PgmVec3 *v1, const PgmVec3 *v2); PgmMat3x3 * pgm_mat3x3_new_identity (void); PgmMat3x3 * pgm_mat3x3_copy (PgmMat3x3 *mat3x3); void pgm_mat3x3_free (PgmMat3x3 *mat3x3); void pgm_mat3x3_set_from_scalars (PgmMat3x3 *mat3x3, gfloat v0, gfloat v1, gfloat v2, gfloat v3, gfloat v4, gfloat v5, gfloat v6, gfloat v7, gfloat v8); void pgm_mat3x3_set_from_vec3 (PgmMat3x3 *mat3x3, const PgmVec3 *v0, const PgmVec3 *v1, const PgmVec3 *v2); void pgm_mat3x3_set_from_mat3x3 (PgmMat3x3 *mat3x3, const PgmMat3x3 *m); gboolean pgm_mat3x3_is_identity (PgmMat3x3 *mat3x3); PgmMat3x3 * pgm_mat3x3_inverse (PgmMat3x3 *mat3x3); PgmMat3x3 * pgm_mat3x3_transpose (PgmMat3x3 *mat3x3); PgmMat3x3 * pgm_mat3x3_add_scalar (PgmMat3x3 *mat3x3, gfloat s); PgmMat3x3 * pgm_mat3x3_add_mat3x3 (PgmMat3x3 *mat3x3, const PgmMat3x3 *m); PgmMat3x3 * pgm_mat3x3_substract_scalar (PgmMat3x3 *mat3x3, gfloat s); PgmMat3x3 * pgm_mat3x3_substract_mat3x3 (PgmMat3x3 *mat3x3, const PgmMat3x3 *m); PgmMat3x3 * pgm_mat3x3_multiply_scalar (PgmMat3x3 *mat3x3, gfloat s); PgmVec3 * pgm_mat3x3_multiply_vec3 (PgmMat3x3 *mat3x3, const PgmVec3 *v); PgmMat3x3 * pgm_mat3x3_multiply_mat3x3 (PgmMat3x3 *mat3x3, const PgmMat3x3 *m); gchar * pgm_mat3x3_to_string (PgmMat3x3 *mat3x3); PgmMat4x4 * pgm_mat4x4_new (void); PgmMat4x4 * pgm_mat4x4_new_from_scalars (gfloat v0, gfloat v1, gfloat v2, gfloat v3, gfloat v4, gfloat v5, gfloat v6, gfloat v7, gfloat v8, gfloat v9, gfloat v10, gfloat v11, gfloat v12, gfloat v13, gfloat v14, gfloat v15); PgmMat4x4 * pgm_mat4x4_new_from_vec4 (const PgmVec4 *v0, const PgmVec4 *v1, const PgmVec4 *v2, const PgmVec4 *v3); PgmMat4x4 * pgm_mat4x4_new_identity (void); PgmMat4x4 * pgm_mat4x4_new_predefined (PgmMat4x4Predefined predefined); PgmMat4x4 * pgm_mat4x4_new_translate_from_vec3 (const PgmVec3 *t); PgmMat4x4 * pgm_mat4x4_new_translate_from_scalars (gfloat tx, gfloat ty, gfloat tz); PgmMat4x4 * pgm_mat4x4_new_scale_from_vec3 (const PgmVec3 *s); PgmMat4x4 * pgm_mat4x4_new_scale_from_scalars (gfloat sx, gfloat sy, gfloat sz); PgmMat4x4 * pgm_mat4x4_new_rotate_x (gfloat angle); PgmMat4x4 * pgm_mat4x4_new_rotate_y (gfloat angle); PgmMat4x4 * pgm_mat4x4_new_rotate_z (gfloat angle); PgmMat4x4 * pgm_mat4x4_new_rotate_axis_from_vec3 (gfloat angle, const PgmVec3 *axis); PgmMat4x4 * pgm_mat4x4_new_rotate_axis_from_scalars (gfloat angle, gfloat axis_x, gfloat axis_y, gfloat axis_z); PgmMat4x4 * pgm_mat4x4_copy (PgmMat4x4 *mat4x4); void pgm_mat4x4_free (PgmMat4x4 *mat4x4); void pgm_mat4x4_set_from_scalars (PgmMat4x4 *mat4x4, gfloat v0, gfloat v1, gfloat v2, gfloat v3, gfloat v4, gfloat v5, gfloat v6, gfloat v7, gfloat v8, gfloat v9, gfloat v10, gfloat v11, gfloat v12, gfloat v13, gfloat v14, gfloat v15); void pgm_mat4x4_set_from_vec4 (PgmMat4x4 *mat4x4, const PgmVec4 *v0, const PgmVec4 *v1, const PgmVec4 *v2, const PgmVec4 *v3); void pgm_mat4x4_set_from_mat4x4 (PgmMat4x4 *mat4x4, const PgmMat4x4 *m); gboolean pgm_mat4x4_is_identity (PgmMat4x4 *mat4x4); PgmMat4x4 * pgm_mat4x4_inverse (PgmMat4x4 *mat4x4); PgmMat4x4 * pgm_mat4x4_transpose (PgmMat4x4 *mat4x4); void pgm_mat4x4_translate_from_vec3 (PgmMat4x4 *mat4x4, const PgmVec3 *t); void pgm_mat4x4_translate_from_scalars (PgmMat4x4 *mat4x4, gfloat tx, gfloat ty, gfloat tz); void pgm_mat4x4_scale_from_vec3 (PgmMat4x4 *mat4x4, const PgmVec3 *s); void pgm_mat4x4_scale_from_scalars (PgmMat4x4 *mat4x4, gfloat sx, gfloat sy, gfloat sz); void pgm_mat4x4_rotate_x (PgmMat4x4 *mat4x4, gfloat angle); void pgm_mat4x4_rotate_y (PgmMat4x4 *mat4x4, gfloat angle); void pgm_mat4x4_rotate_z (PgmMat4x4 *mat4x4, gfloat angle); void pgm_mat4x4_rotate_axis_from_vec3 (PgmMat4x4 *mat4x4, gfloat angle, const PgmVec3 *axis); void pgm_mat4x4_rotate_axis_from_scalars (PgmMat4x4 *mat4x4, gfloat angle, gfloat axis_x, gfloat axis_y, gfloat axis_z); PgmMat4x4 * pgm_mat4x4_add_scalar (PgmMat4x4 *mat4x4, gfloat s); PgmMat4x4 * pgm_mat4x4_add_mat4x4 (PgmMat4x4 *mat4x4, const PgmMat4x4 *m); PgmMat4x4 * pgm_mat4x4_substract_scalar (PgmMat4x4 *mat4x4, gfloat s); PgmMat4x4 * pgm_mat4x4_substract_mat4x4 (PgmMat4x4 *mat4x4, const PgmMat4x4 *m); PgmMat4x4 * pgm_mat4x4_multiply_scalar (PgmMat4x4 *mat4x4, gfloat s); PgmVec4 * pgm_mat4x4_multiply_vec4 (PgmMat4x4 *mat4x4, const PgmVec4 *v); PgmMat4x4 * pgm_mat4x4_multiply_mat4x4 (PgmMat4x4 *mat4x4, const PgmMat4x4 *m); gchar * pgm_mat4x4_to_string (PgmMat4x4 *mat4x4); PgmVec3 * pgm_intersection_line_plane (const PgmVec3 *l1, const PgmVec3 *l2, const PgmVec3 *p, const PgmVec3 *pu, const PgmVec3 *pv); gboolean pgm_point_belongs_rectangle (const PgmVec3 *p, const PgmVec3 *r, const PgmVec3 *ru, const PgmVec3 *rv); Description Various linear algebra objects and utility functions simplifying the use of matrice and vector types. Notation In this documentation, we use the column vector notation for matrices and matrix operations. That is also the notation used by the *_to_string() functions, with the exception of pgm_vec3_to_string() and pgm_vec4_to_string() for practical reasons. Memory storage convention Pigment matrices are stored in row-major order. This means that rows are stored one after the other. The difference between addresses of array cells in increasing rows is larger than addresses of cells in increasing columns. Last reviewed on 2008-01-15 (0.3.2) Details enum PgmMat4x4Predefined PgmMat4x4Predefinedtypedef enum { PGM_MAT4X4_FLIP_HORIZONTAL, PGM_MAT4X4_FLIP_VERTICAL, PGM_MAT4X4_ROTATE_CLOCKWISE, PGM_MAT4X4_ROTATE_COUNTER_CLOCKWISE } PgmMat4x4Predefined; Predefined 4x4 matrices describing several common effects. PGM_MAT4X4_FLIP_HORIZONTAL Horizontal flipping. PGM_MAT4X4_FLIP_VERTICAL Vertical flipping. PGM_MAT4X4_ROTATE_CLOCKWISE Clockwise rotation. PGM_MAT4X4_ROTATE_COUNTER_CLOCKWISE Counter-clockwise rotation. PgmVec3 PgmVec3typedef struct { gfloat v[3]; } PgmVec3; Describes a 3 components vector. gfloat v[3]; the 3 components vector array. PgmVec4 PgmVec4typedef struct { gfloat v[4]; } PgmVec4; Describes a 4 components vector. gfloat v[4]; the 4 components vector. PgmMat3x3 PgmMat3x3typedef struct { gfloat m[9]; } PgmMat3x3; Describes a 3x3 matrix. gfloat m[9]; the 3x3 matrix array in row-major order. PgmMat4x4 PgmMat4x4typedef struct { gfloat m[16]; } PgmMat4x4; Describes a 4x4 matrix. gfloat m[16]; the 4x4 matrix array in row-major order. pgm_vec3_new () pgm_vec3_newPgmVec3 * pgm_vec3_new (void); Creates a new PgmVec3 with components initialized at 0.0f. MT safe. Returns : a new PgmVec3 instance. pgm_vec3_new_from_scalars () pgm_vec3_new_from_scalarsPgmVec3 * pgm_vec3_new_from_scalars (gfloat v0, gfloat v1, gfloat v2); Creates a new PgmVec3 with components initialized with the given scalars. MT safe. v0 : the 1st component. v1 : the 2nd component. v2 : the 3rd component. Returns : a new PgmVec3 instance. pgm_vec3_copy () pgm_vec3_copyPgmVec3 * pgm_vec3_copy (PgmVec3 *vec3); Copies vec3. MT safe. vec3 : a PgmVec3 object. Returns : a newly allocated PgmVec3. pgm_vec3_free () pgm_vec3_freevoid pgm_vec3_free (PgmVec3 *vec3); Frees all resources used by vec3. MT safe. vec3 : A PgmVec3 object. pgm_vec3_set_from_scalars () pgm_vec3_set_from_scalarsvoid pgm_vec3_set_from_scalars (PgmVec3 *vec3, gfloat v0, gfloat v1, gfloat v2); Sets the components of vec3 with the given scalars. MT safe. vec3 : A PgmVec3 object. v0 : the 1st component. v1 : the 2nd component. v2 : the 3rd component. pgm_vec3_set_from_vec3 () pgm_vec3_set_from_vec3void pgm_vec3_set_from_vec3 (PgmVec3 *vec3, const PgmVec3 *v); Sets the components of vec3 with the given vector. MT safe. vec3 : A PgmVec3 object. v : A PgmVec3 object. pgm_vec3_length () pgm_vec3_lengthgfloat pgm_vec3_length (PgmVec3 *vec3); Retrieves the length of the vector vec3. MT safe. vec3 : A PgmVec3 object. Returns : the length of vec3. pgm_vec3_normalize () pgm_vec3_normalizePgmVec3 * pgm_vec3_normalize (PgmVec3 *vec3); Retrieves the normalized vec3 vector. MT safe. vec3 : A PgmVec3 object. Returns : the normalized vec3 vector, or NULL if vec3 is the zero vector. pgm_vec3_dot_product () pgm_vec3_dot_productgfloat pgm_vec3_dot_product (PgmVec3 *vec3, const PgmVec3 *v); Computes the dot product vec3v. MT safe. vec3 : A PgmVec3 object. v : A PgmVec3 object. Returns : the dot product vec3v. pgm_vec3_cross_product () pgm_vec3_cross_productPgmVec3 * pgm_vec3_cross_product (PgmVec3 *vec3, const PgmVec3 *v); Computes the dot product vec3 × v. MT safe. vec3 : A PgmVec3 object. v : A PgmVec3 object. Returns : the cross product vec3 × v in a newly allocated PgmVec3. pgm_vec3_add_scalar () pgm_vec3_add_scalarPgmVec3 * pgm_vec3_add_scalar (PgmVec3 *vec3, gfloat s); Computes the sum vec3 + s. MT safe. vec3 : A PgmVec3 object. s : A scalar. Returns : the sum vec3 + s in a newly allocated PgmVec3. pgm_vec3_add_vec3 () pgm_vec3_add_vec3PgmVec3 * pgm_vec3_add_vec3 (PgmVec3 *vec3, const PgmVec3 *v); Computes the sum vec3 + v. MT safe. vec3 : A PgmVec3 object. v : A PgmVec3 object. Returns : the sum vec3 + v in a newly allocated PgmVec3. pgm_vec3_substract_scalar () pgm_vec3_substract_scalarPgmVec3 * pgm_vec3_substract_scalar (PgmVec3 *vec3, gfloat s); Computes the substraction vec3 - s. MT safe. vec3 : A PgmVec3 object. s : A scalar. Returns : the substraction vec3 - s in a newly allocated PgmVec3. pgm_vec3_substract_vec3 () pgm_vec3_substract_vec3PgmVec3 * pgm_vec3_substract_vec3 (PgmVec3 *vec3, const PgmVec3 *v); Computes the substraction vec3 - v. MT safe. vec3 : A PgmVec3 object. v : A PgmVec3 object. Returns : the substraction vec3 - v in a newly allocated PgmVec3. pgm_vec3_multiply_scalar () pgm_vec3_multiply_scalarPgmVec3 * pgm_vec3_multiply_scalar (PgmVec3 *vec3, gfloat s); Computes the multiplication vec3 . s. MT safe. vec3 : A PgmVec3 object. s : A scalar. Returns : the multiplication vec3 . s in a newly allocated PgmVec3. pgm_vec3_multiply_vec3 () pgm_vec3_multiply_vec3PgmVec3 * pgm_vec3_multiply_vec3 (PgmVec3 *vec3, const PgmVec3 *v); Computes the component by component multiplication vec3 . v. MT safe. vec3 : A PgmVec3 object. v : A PgmVec3 object. Returns : the component by component multiplication vec3 . v in a newly allocated PgmVec3. pgm_vec3_to_string () pgm_vec3_to_stringgchar * pgm_vec3_to_string (PgmVec3 *vec3); Converts vec3 to a string representation. This function, as well as pgm_vec4_to_string(), returns a representation of vec3 in row vector notation. This is practical for most usages since it fits in one line. MT safe. vec3 : A PgmVec3 object. Returns : a newly allocated string representing vec3 as a row. pgm_vec4_new () pgm_vec4_newPgmVec4 * pgm_vec4_new (void); Creates a new PgmVec4 with components initilized at 0.0f. MT safe. Returns : a new PgmVec4 instance. pgm_vec4_new_from_scalars () pgm_vec4_new_from_scalarsPgmVec4 * pgm_vec4_new_from_scalars (gfloat v0, gfloat v1, gfloat v2, gfloat v3); Creates a new PgmVec4 with components initialized with the given scalars. MT safe. v0 : the 1st component. v1 : the 2nd component. v2 : the 3rd component. v3 : the 4th component. Returns : a new PgmVec4 instance. pgm_vec4_copy () pgm_vec4_copyPgmVec4 * pgm_vec4_copy (PgmVec4 *vec4); Copies vec4. MT safe. vec4 : a PgmVec4 object. Returns : a newly allocated PgmVec4. pgm_vec4_free () pgm_vec4_freevoid pgm_vec4_free (PgmVec4 *vec4); Frees all resources used by vec4. MT safe. vec4 : A PgmVec4 object. pgm_vec4_set_from_scalars () pgm_vec4_set_from_scalarsvoid pgm_vec4_set_from_scalars (PgmVec4 *vec4, gfloat v0, gfloat v1, gfloat v2, gfloat v3); Sets the components of vec4 with the given scalars. MT safe. vec4 : A PgmVec4 object. v0 : the 1st component. v1 : the 2nd component. v2 : the 3rd component. v3 : the 4th component. pgm_vec4_set_from_vec4 () pgm_vec4_set_from_vec4void pgm_vec4_set_from_vec4 (PgmVec4 *vec4, const PgmVec4 *v); Sets the components of vec4 with the given vector. MT safe. vec4 : A PgmVec4 object. v : A PgmVec4 object. pgm_vec4_length () pgm_vec4_lengthgfloat pgm_vec4_length (PgmVec4 *vec4); Retrieves the length of the vector vec4. MT safe. vec4 : A PgmVec4 object. Returns : the length of vec4. pgm_vec4_normalize () pgm_vec4_normalizePgmVec4 * pgm_vec4_normalize (PgmVec4 *vec4); Retrieves the normalized vec4 vector. MT safe. vec4 : A PgmVec4 object. Returns : the normalized vec4 vector, or NULL if vec4 is the zero vector. pgm_vec4_add_scalar () pgm_vec4_add_scalarPgmVec4 * pgm_vec4_add_scalar (PgmVec4 *vec4, gfloat s); Computes the sum vec4 + s. MT safe. vec4 : A PgmVec4 object. s : A scalar. Returns : the sum vec4 + s in a newly allocated PgmVec4. pgm_vec4_add_vec4 () pgm_vec4_add_vec4PgmVec4 * pgm_vec4_add_vec4 (PgmVec4 *vec4, const PgmVec4 *v); Computes the sum vec4 + v. MT safe. vec4 : A PgmVec4 object. v : A PgmVec4 object. Returns : the sum vec4 + v in a newly allocated PgmVec4. pgm_vec4_substract_scalar () pgm_vec4_substract_scalarPgmVec4 * pgm_vec4_substract_scalar (PgmVec4 *vec4, gfloat s); Computes the substraction vec4 - s. MT safe. vec4 : A PgmVec4 object. s : A scalar. Returns : the substraction vec4 - s in a newly allocated PgmVec4. pgm_vec4_substract_vec4 () pgm_vec4_substract_vec4PgmVec4 * pgm_vec4_substract_vec4 (PgmVec4 *vec4, const PgmVec4 *v); Computes the substraction vec4 - v. MT safe. vec4 : A PgmVec4 object. v : A PgmVec4 object. Returns : the substraction vec4 - v in a newly allocated PgmVec4. pgm_vec4_multiply_scalar () pgm_vec4_multiply_scalarPgmVec4 * pgm_vec4_multiply_scalar (PgmVec4 *vec4, gfloat s); Computes the multiplication vec4 . s. MT safe. vec4 : A PgmVec4 object. s : A scalar. Returns : the multiplication vec4 . s in a newly allocated PgmVec4. pgm_vec4_multiply_vec4 () pgm_vec4_multiply_vec4PgmVec4 * pgm_vec4_multiply_vec4 (PgmVec4 *vec4, const PgmVec4 *v); Computes the component by component multiplication vec4 . v. MT safe. vec4 : A PgmVec4 object. v : A PgmVec4 object. Returns : the component by component multiplication vec4 . v in a newly allocated PgmVec4. pgm_vec4_to_string () pgm_vec4_to_stringgchar * pgm_vec4_to_string (PgmVec4 *vec4); Converts vec4 to a string representation. This function, as well as pgm_vec3_to_string(), returns a representation of vec4 in row vector notation. This is practical for most usages since it fits in one line. MT safe. vec4 : A PgmVec4 object. Returns : a newly allocated string representing vec4 as a row. pgm_mat3x3_new () pgm_mat3x3_newPgmMat3x3 * pgm_mat3x3_new (void); Creates a new PgmMat3x3 with components initilized at 0.0f. MT safe. Returns : a new PgmMat3x3 instance. pgm_mat3x3_new_from_scalars () pgm_mat3x3_new_from_scalarsPgmMat3x3 * pgm_mat3x3_new_from_scalars (gfloat v0, gfloat v1, gfloat v2, gfloat v3, gfloat v4, gfloat v5, gfloat v6, gfloat v7, gfloat v8); Creates a new PgmMat3x3 with components initialized with the given scalars. MT safe. v0 : the 1st component of the 1st vector. v1 : the 2nd component of the 1st vector. v2 : the 3rd component of the 1st vector. v3 : the 1st component of the 2nd vector. v4 : the 2nd component of the 2nd vector. v5 : the 3rd component of the 2nd vector. v6 : the 1st component of the 3rd vector. v7 : the 2nd component of the 3rd vector. v8 : the 3rd component of the 3rd vector. Returns : a new PgmMat3x3 instance. pgm_mat3x3_new_from_vec3 () pgm_mat3x3_new_from_vec3PgmMat3x3 * pgm_mat3x3_new_from_vec3 (const PgmVec3 *v0, const PgmVec3 *v1, const PgmVec3 *v2); Creates a new PgmMat3x3 with components initialized with the given vectors. MT safe. v0 : the 1st vector. v1 : the 2nd vector. v2 : the 3rd vector. Returns : a new PgmMat3x3 instance. pgm_mat3x3_new_identity () pgm_mat3x3_new_identityPgmMat3x3 * pgm_mat3x3_new_identity (void); Creates a new PgmMat3x3 identity matrix. MT safe. Returns : a new PgmMat3x3 instance. pgm_mat3x3_copy () pgm_mat3x3_copyPgmMat3x3 * pgm_mat3x3_copy (PgmMat3x3 *mat3x3); Copies mat3x3. MT safe. mat3x3 : a PgmMat3x3 object. Returns : a newly allocated PgmMat3x3. pgm_mat3x3_free () pgm_mat3x3_freevoid pgm_mat3x3_free (PgmMat3x3 *mat3x3); Frees all resources used by mat3x3. MT safe. mat3x3 : A PgmMat3x3 object. pgm_mat3x3_set_from_scalars () pgm_mat3x3_set_from_scalarsvoid pgm_mat3x3_set_from_scalars (PgmMat3x3 *mat3x3, gfloat v0, gfloat v1, gfloat v2, gfloat v3, gfloat v4, gfloat v5, gfloat v6, gfloat v7, gfloat v8); Set the components of mat3x3 with the given scalars. MT safe. mat3x3 : A PgmMat3x3 object. v0 : the 1st component of the 1st vector. v1 : the 2nd component of the 1st vector. v2 : the 3rd component of the 1st vector. v3 : the 1st component of the 2nd vector. v4 : the 2nd component of the 2nd vector. v5 : the 3rd component of the 2nd vector. v6 : the 1st component of the 3rd vector. v7 : the 2nd component of the 3rd vector. v8 : the 3rd component of the 3rd vector. pgm_mat3x3_set_from_vec3 () pgm_mat3x3_set_from_vec3void pgm_mat3x3_set_from_vec3 (PgmMat3x3 *mat3x3, const PgmVec3 *v0, const PgmVec3 *v1, const PgmVec3 *v2); Set the components of mat3x3 with the given vectors. MT safe. mat3x3 : A PgmMat3x3 object. v0 : the 1st vector. v1 : the 1st vector. v2 : the 1st vector. pgm_mat3x3_set_from_mat3x3 () pgm_mat3x3_set_from_mat3x3void pgm_mat3x3_set_from_mat3x3 (PgmMat3x3 *mat3x3, const PgmMat3x3 *m); Sets the components of mat3x3 with the given matrix. MT safe. mat3x3 : A PgmMat3x3 object. m : A PgmMat3x3 object. pgm_mat3x3_is_identity () pgm_mat3x3_is_identitygboolean pgm_mat3x3_is_identity (PgmMat3x3 *mat3x3); Retrieves whether or not mat3x3 is the identity matrix. MT safe. mat3x3 : A PgmMat3x3 object. Returns : TRUE if mat3x3 is the identity matrix, FALSE otherwise. pgm_mat3x3_inverse () pgm_mat3x3_inversePgmMat3x3 * pgm_mat3x3_inverse (PgmMat3x3 *mat3x3); Retrieves the inverted mat3x3 matrix. MT safe. mat3x3 : A PgmMat3x3 object. Returns : the inverted mat3x3 in a newly allocated PgmMat3x3. pgm_mat3x3_transpose () pgm_mat3x3_transposePgmMat3x3 * pgm_mat3x3_transpose (PgmMat3x3 *mat3x3); Retrieves the transposed mat3x3 matrix. MT safe. mat3x3 : A PgmMat3x3 object. Returns : the transposed mat3x3 in a newly allocated PgmMat3x3. pgm_mat3x3_add_scalar () pgm_mat3x3_add_scalarPgmMat3x3 * pgm_mat3x3_add_scalar (PgmMat3x3 *mat3x3, gfloat s); Computes the sum mat3x3 + s. MT safe. mat3x3 : A PgmMat3x3 object. s : A scalar. Returns : the sum mat3x3 + s in a newly allocated PgmMat3x3. pgm_mat3x3_add_mat3x3 () pgm_mat3x3_add_mat3x3PgmMat3x3 * pgm_mat3x3_add_mat3x3 (PgmMat3x3 *mat3x3, const PgmMat3x3 *m); Computes the sum mat3x3 + m. MT safe. mat3x3 : A PgmMat3x3 object. m : A PgmMat3x3 object. Returns : the sum mat3x3 + m in a newly allocated PgmMat3x3. pgm_mat3x3_substract_scalar () pgm_mat3x3_substract_scalarPgmMat3x3 * pgm_mat3x3_substract_scalar (PgmMat3x3 *mat3x3, gfloat s); Computes the substraction mat3x3 - s. MT safe. mat3x3 : A PgmMat3x3 object. s : A scalar. Returns : the substraction mat3x3 - s in a newly allocated PgmMat3x3. pgm_mat3x3_substract_mat3x3 () pgm_mat3x3_substract_mat3x3PgmMat3x3 * pgm_mat3x3_substract_mat3x3 (PgmMat3x3 *mat3x3, const PgmMat3x3 *m); Computes the substraction mat3x3 - m. MT safe. mat3x3 : A PgmMat3x3 object. m : A PgmMat3x3 object. Returns : the substraction mat3x3 - m in a newly allocated PgmMat3x3. pgm_mat3x3_multiply_scalar () pgm_mat3x3_multiply_scalarPgmMat3x3 * pgm_mat3x3_multiply_scalar (PgmMat3x3 *mat3x3, gfloat s); Computes the multiplication mat3x3 . s. MT safe. mat3x3 : A PgmMat3x3 object. s : A scalar. Returns : the multiplication mat3x3 . s in a newly allocated PgmMat3x3. pgm_mat3x3_multiply_vec3 () pgm_mat3x3_multiply_vec3PgmVec3 * pgm_mat3x3_multiply_vec3 (PgmMat3x3 *mat3x3, const PgmVec3 *v); Computes the multiplication mat3x3 . v. MT safe. mat3x3 : A PgmMat3x3 object. v : A PgmVec3 object. Returns : the multiplication mat3x3 . v in a newly allocated PgmVec3. pgm_mat3x3_multiply_mat3x3 () pgm_mat3x3_multiply_mat3x3PgmMat3x3 * pgm_mat3x3_multiply_mat3x3 (PgmMat3x3 *mat3x3, const PgmMat3x3 *m); Computes the multiplication mat3x3 . m. Note that it is a post-multiplication of mat3x3 by m. MT safe. mat3x3 : A PgmMat3x3 object. m : A PgmMat3x3 object. Returns : the multiplication mat3x3 . m in a newly allocated PgmMat3x3. pgm_mat3x3_to_string () pgm_mat3x3_to_stringgchar * pgm_mat3x3_to_string (PgmMat3x3 *mat3x3); Converts mat3x3 to a string representation. MT safe. mat3x3 : A PgmMat3x3 object. Returns : a newly allocated string representing mat3x3. pgm_mat4x4_new () pgm_mat4x4_newPgmMat4x4 * pgm_mat4x4_new (void); Creates a new PgmMat4x4 with components initilized at 0.0f. MT safe. Returns : a new PgmMat4x4 instance. pgm_mat4x4_new_from_scalars () pgm_mat4x4_new_from_scalarsPgmMat4x4 * pgm_mat4x4_new_from_scalars (gfloat v0, gfloat v1, gfloat v2, gfloat v3, gfloat v4, gfloat v5, gfloat v6, gfloat v7, gfloat v8, gfloat v9, gfloat v10, gfloat v11, gfloat v12, gfloat v13, gfloat v14, gfloat v15); Creates a new PgmMat4x4 with components initialized with the given scalars. MT safe. v0 : the 1st component of the 1st vector. v1 : the 2nd component of the 1st vector. v2 : the 3rd component of the 1st vector. v3 : the 4th component of the 1st vector. v4 : the 1st component of the 2nd vector. v5 : the 2nd component of the 2nd vector. v6 : the 3rd component of the 2nd vector. v7 : the 4th component of the 2nd vector. v8 : the 1st component of the 3rd vector. v9 : the 2nd component of the 3rd vector. v10 : the 3rd component of the 3rd vector. v11 : the 4th component of the 3rd vector. v12 : the 1st component of the 4th vector. v13 : the 2nd component of the 4th vector. v14 : the 3rd component of the 4th vector. v15 : the 4th component of the 4th vector. Returns : a new PgmMat4x4 instance. pgm_mat4x4_new_from_vec4 () pgm_mat4x4_new_from_vec4PgmMat4x4 * pgm_mat4x4_new_from_vec4 (const PgmVec4 *v0, const PgmVec4 *v1, const PgmVec4 *v2, const PgmVec4 *v3); Creates a new PgmMat4x4 with components initialized with the given vectors. MT safe. v0 : the 1st vector. v1 : the 2nd vector. v2 : the 3rd vector. v3 : the 4th vector. Returns : a new PgmMat4x4 instance. pgm_mat4x4_new_identity () pgm_mat4x4_new_identityPgmMat4x4 * pgm_mat4x4_new_identity (void); Creates a new PgmMat4x4 identity matrix. MT safe. Returns : a new PgmMat4x4 instance. pgm_mat4x4_new_predefined () pgm_mat4x4_new_predefinedPgmMat4x4 * pgm_mat4x4_new_predefined (PgmMat4x4Predefined predefined); Creates a new PgmMat4x4 matrix corresponding to predefined. MT safe. predefined : The predefined 4x4 matrix. Returns : a new PgmMat4x4 instance. pgm_mat4x4_new_translate_from_vec3 () pgm_mat4x4_new_translate_from_vec3PgmMat4x4 * pgm_mat4x4_new_translate_from_vec3 (const PgmVec3 *t); Creates a new PgmMat4x4 translation matrix. MT safe. t : A PgmVec3 object representing the translation. Returns : a new PgmMat4x4 instance. pgm_mat4x4_new_translate_from_scalars () pgm_mat4x4_new_translate_from_scalarsPgmMat4x4 * pgm_mat4x4_new_translate_from_scalars (gfloat tx, gfloat ty, gfloat tz); Creates a new PgmMat4x4 translation matrix. MT safe. tx : The translation on the x cardinal axis. ty : The translation on the y cardinal axis. tz : The translation on the z cardinal axis. Returns : a new PgmMat4x4 instance. pgm_mat4x4_new_scale_from_vec3 () pgm_mat4x4_new_scale_from_vec3PgmMat4x4 * pgm_mat4x4_new_scale_from_vec3 (const PgmVec3 *s); Creates a new PgmMat4x4 scaling matrix. MT safe. s : A PgmVec3 object representing the scaling. Returns : a new PgmMat4x4 instance. pgm_mat4x4_new_scale_from_scalars () pgm_mat4x4_new_scale_from_scalarsPgmMat4x4 * pgm_mat4x4_new_scale_from_scalars (gfloat sx, gfloat sy, gfloat sz); Creates a new PgmMat4x4 scaling matrix. MT safe. sx : The scale on the x cardinal axis. sy : The scale on the y cardinal axis. sz : The scale on the z cardinal axis. Returns : a new PgmMat4x4 instance. pgm_mat4x4_new_rotate_x () pgm_mat4x4_new_rotate_xPgmMat4x4 * pgm_mat4x4_new_rotate_x (gfloat angle); Creates a new PgmMat4x4 matrix for a rotation about the x cardinal axis. MT safe. angle : The angle of rotation, in radians. Returns : a new PgmMat4x4 instance. pgm_mat4x4_new_rotate_y () pgm_mat4x4_new_rotate_yPgmMat4x4 * pgm_mat4x4_new_rotate_y (gfloat angle); Creates a new PgmMat4x4 matrix for a rotation about the y cardinal axis. MT safe. angle : The angle of rotation, in radians. Returns : a new PgmMat4x4 instance. pgm_mat4x4_new_rotate_z () pgm_mat4x4_new_rotate_zPgmMat4x4 * pgm_mat4x4_new_rotate_z (gfloat angle); Creates a new PgmMat4x4 matrix for a rotation about the z cardinal axis. MT safe. angle : The angle of rotation, in radians. Returns : a new PgmMat4x4 instance. pgm_mat4x4_new_rotate_axis_from_vec3 () pgm_mat4x4_new_rotate_axis_from_vec3PgmMat4x4 * pgm_mat4x4_new_rotate_axis_from_vec3 (gfloat angle, const PgmVec3 *axis); Creates a new PgmMat4x4 matrix for a rotation about axis. MT safe. angle : The angle of rotation, in radians. axis : A PgmVec3 object representing the axis of rotation. Returns : a new PgmMat4x4 instance. pgm_mat4x4_new_rotate_axis_from_scalars () pgm_mat4x4_new_rotate_axis_from_scalarsPgmMat4x4 * pgm_mat4x4_new_rotate_axis_from_scalars (gfloat angle, gfloat axis_x, gfloat axis_y, gfloat axis_z); Creates a new PgmMat4x4 matrix for a rotation about the given axis. MT safe. angle : The angle of rotation, in radians. axis_x : The x component of the axis of rotation. axis_y : The y component of the axis of rotation. axis_z : The z component of the axis of rotation. Returns : a new PgmMat4x4 instance. pgm_mat4x4_copy () pgm_mat4x4_copyPgmMat4x4 * pgm_mat4x4_copy (PgmMat4x4 *mat4x4); Copies mat4x4. MT safe. mat4x4 : a PgmMat4x4 object. Returns : a newly allocated PgmMat4x4. pgm_mat4x4_free () pgm_mat4x4_freevoid pgm_mat4x4_free (PgmMat4x4 *mat4x4); Frees all resources used by mat4x4. MT safe. mat4x4 : A PgmMat4x4 object. pgm_mat4x4_set_from_scalars () pgm_mat4x4_set_from_scalarsvoid pgm_mat4x4_set_from_scalars (PgmMat4x4 *mat4x4, gfloat v0, gfloat v1, gfloat v2, gfloat v3, gfloat v4, gfloat v5, gfloat v6, gfloat v7, gfloat v8, gfloat v9, gfloat v10, gfloat v11, gfloat v12, gfloat v13, gfloat v14, gfloat v15); Set the components of mat4x4 with the given scalars. MT safe. mat4x4 : A PgmMat4x4 object. v0 : the 1st component of the 1st vector. v1 : the 2nd component of the 1st vector. v2 : the 3rd component of the 1st vector. v3 : the 4th component of the 1st vector. v4 : the 1st component of the 2nd vector. v5 : the 2nd component of the 2nd vector. v6 : the 3rd component of the 2nd vector. v7 : the 4th component of the 2nd vector. v8 : the 1st component of the 3rd vector. v9 : the 2nd component of the 3rd vector. v10 : the 3rd component of the 3rd vector. v11 : the 4th component of the 3rd vector. v12 : the 1st component of the 4th vector. v13 : the 2nd component of the 4th vector. v14 : the 3rd component of the 4th vector. v15 : the 4th component of the 4th vector. pgm_mat4x4_set_from_vec4 () pgm_mat4x4_set_from_vec4void pgm_mat4x4_set_from_vec4 (PgmMat4x4 *mat4x4, const PgmVec4 *v0, const PgmVec4 *v1, const PgmVec4 *v2, const PgmVec4 *v3); Set the components of mat4x4 with the given vectors. MT safe. mat4x4 : A PgmMat4x4 object. v0 : the 1st vector. v1 : the 2nd vector. v2 : the 3rd vector. v3 : the 4th vector. pgm_mat4x4_set_from_mat4x4 () pgm_mat4x4_set_from_mat4x4void pgm_mat4x4_set_from_mat4x4 (PgmMat4x4 *mat4x4, const PgmMat4x4 *m); Sets the components of mat4x4 with the given matrix. MT safe. mat4x4 : A PgmMat4x4 object. m : A PgmMat4x4 object. pgm_mat4x4_is_identity () pgm_mat4x4_is_identitygboolean pgm_mat4x4_is_identity (PgmMat4x4 *mat4x4); Retrieves whether or not mat4x4 is the identity matrix. MT safe. mat4x4 : A PgmMat4x4 object. Returns : TRUE if mat4x4 is the identity matrix, FALSE otherwise. pgm_mat4x4_inverse () pgm_mat4x4_inversePgmMat4x4 * pgm_mat4x4_inverse (PgmMat4x4 *mat4x4); Retrieves the inverted mat4x4 matrix. MT safe. mat4x4 : A PgmMat4x4 object. Returns : the inverted mat4x4 in a newly allocated PgmMat4x4, or NULL if mat4x4 is non-invertible (singular). pgm_mat4x4_transpose () pgm_mat4x4_transposePgmMat4x4 * pgm_mat4x4_transpose (PgmMat4x4 *mat4x4); Retrieves the transposed mat4x4 matrix. MT safe. mat4x4 : A PgmMat4x4 object. Returns : the transposed mat4x4 in a newly allocated PgmMat4x4. pgm_mat4x4_translate_from_vec3 () pgm_mat4x4_translate_from_vec3void pgm_mat4x4_translate_from_vec3 (PgmMat4x4 *mat4x4, const PgmVec3 *t); Post multiplies mat4x4 by a translation matrix with the product replacing mat4x4. MT safe. mat4x4 : A PgmMat4x4 object. t : A PgmVec3 object representing the translation to apply. pgm_mat4x4_translate_from_scalars () pgm_mat4x4_translate_from_scalarsvoid pgm_mat4x4_translate_from_scalars (PgmMat4x4 *mat4x4, gfloat tx, gfloat ty, gfloat tz); Post multiplies mat4x4 by a translation matrix with the product replacing mat4x4. MT safe. mat4x4 : A PgmMat4x4 object. tx : The translation on the x cardinal axis. ty : The translation on the y cardinal axis. tz : The translation on the z cardinal axis. pgm_mat4x4_scale_from_vec3 () pgm_mat4x4_scale_from_vec3void pgm_mat4x4_scale_from_vec3 (PgmMat4x4 *mat4x4, const PgmVec3 *s); Post multiplies mat4x4 by a scaling matrix with the product replacing mat4x4. MT safe. mat4x4 : A PgmMat4x4 object. s : A PgmVec3 object representing the scale to apply. pgm_mat4x4_scale_from_scalars () pgm_mat4x4_scale_from_scalarsvoid pgm_mat4x4_scale_from_scalars (PgmMat4x4 *mat4x4, gfloat sx, gfloat sy, gfloat sz); Post multiplies mat4x4 by a scaling matrix with the product replacing mat4x4. MT safe. mat4x4 : A PgmMat4x4 object. sx : The scale to apply on the x axis. sy : The scale to apply on the y axis. sz : The scale to apply on the z axis. pgm_mat4x4_rotate_x () pgm_mat4x4_rotate_xvoid pgm_mat4x4_rotate_x (PgmMat4x4 *mat4x4, gfloat angle); Post multiplies mat4x4 by a rotation matrix with the product replacing mat4x4. MT safe. mat4x4 : A PgmMat4x4 object. angle : The angle of rotation, in radians. pgm_mat4x4_rotate_y () pgm_mat4x4_rotate_yvoid pgm_mat4x4_rotate_y (PgmMat4x4 *mat4x4, gfloat angle); Post multiplies mat4x4 by a rotation matrix with the product replacing mat4x4. MT safe. mat4x4 : A PgmMat4x4 object. angle : The angle of rotation, in radians. pgm_mat4x4_rotate_z () pgm_mat4x4_rotate_zvoid pgm_mat4x4_rotate_z (PgmMat4x4 *mat4x4, gfloat angle); Post multiplies mat4x4 by a rotation matrix with the product replacing mat4x4. MT safe. mat4x4 : A PgmMat4x4 object. angle : The angle of rotation, in radians. pgm_mat4x4_rotate_axis_from_vec3 () pgm_mat4x4_rotate_axis_from_vec3void pgm_mat4x4_rotate_axis_from_vec3 (PgmMat4x4 *mat4x4, gfloat angle, const PgmVec3 *axis); Post multiplies mat4x4 by a rotation matrix with the product replacing mat4x4. MT safe. mat4x4 : A PgmMat4x4 object. angle : The angle of rotation, in radians. axis : A PgmVec3 object representing the axis of rotation. pgm_mat4x4_rotate_axis_from_scalars () pgm_mat4x4_rotate_axis_from_scalarsvoid pgm_mat4x4_rotate_axis_from_scalars (PgmMat4x4 *mat4x4, gfloat angle, gfloat axis_x, gfloat axis_y, gfloat axis_z); Post multiplies mat4x4 by a rotation matrix with the product replacing mat4x4. MT safe. mat4x4 : A PgmMat4x4 object. angle : The angle of rotation, in radians. axis_x : The x component of the axis of rotation. axis_y : The y component of the axis of rotation. axis_z : The z component of the axis of rotation. pgm_mat4x4_add_scalar () pgm_mat4x4_add_scalarPgmMat4x4 * pgm_mat4x4_add_scalar (PgmMat4x4 *mat4x4, gfloat s); Computes the sum mat4x4 + s. MT safe. mat4x4 : A PgmMat4x4 object. s : A scalar. Returns : the sum mat4x4 + s in a newly allocated PgmMat4x4. pgm_mat4x4_add_mat4x4 () pgm_mat4x4_add_mat4x4PgmMat4x4 * pgm_mat4x4_add_mat4x4 (PgmMat4x4 *mat4x4, const PgmMat4x4 *m); Computes the sum mat4x4 + m. MT safe. mat4x4 : A PgmMat4x4 object. m : A PgmMat4x4 object. Returns : the sum mat4x4 + m in a newly allocated PgmMat4x4. pgm_mat4x4_substract_scalar () pgm_mat4x4_substract_scalarPgmMat4x4 * pgm_mat4x4_substract_scalar (PgmMat4x4 *mat4x4, gfloat s); Computes the substraction mat4x4 - s. MT safe. mat4x4 : A PgmMat4x4 object. s : A scalar. Returns : the substraction mat4x4 - s in a newly allocated PgmMat4x4. pgm_mat4x4_substract_mat4x4 () pgm_mat4x4_substract_mat4x4PgmMat4x4 * pgm_mat4x4_substract_mat4x4 (PgmMat4x4 *mat4x4, const PgmMat4x4 *m); Computes the substraction mat4x4 - m. MT safe. mat4x4 : A PgmMat4x4 object. m : A PgmMat4x4 object. Returns : the substraction mat4x4 - m in a newly allocated PgmMat4x4. pgm_mat4x4_multiply_scalar () pgm_mat4x4_multiply_scalarPgmMat4x4 * pgm_mat4x4_multiply_scalar (PgmMat4x4 *mat4x4, gfloat s); Computes the multiplication mat4x4 . s. MT safe. mat4x4 : A PgmMat4x4 object. s : A scalar. Returns : the multiplication mat4x4 . s in a newly allocated PgmMat4x4. pgm_mat4x4_multiply_vec4 () pgm_mat4x4_multiply_vec4PgmVec4 * pgm_mat4x4_multiply_vec4 (PgmMat4x4 *mat4x4, const PgmVec4 *v); Computes the multiplication mat4x4 . v. MT safe. mat4x4 : A PgmMat4x4 object. v : A PgmVec4 object. Returns : the multiplication mat4x4 . v in a newly allocated PgmVec4. pgm_mat4x4_multiply_mat4x4 () pgm_mat4x4_multiply_mat4x4PgmMat4x4 * pgm_mat4x4_multiply_mat4x4 (PgmMat4x4 *mat4x4, const PgmMat4x4 *m); Computes the multiplication mat4x4 . m. Note that this a post-multiplication of mat4x4 by m. MT safe. mat4x4 : A PgmMat4x4 object. m : A PgmMat4x4 object. Returns : the multiplication mat4x4 . m in a newly allocated PgmMat4x4. pgm_mat4x4_to_string () pgm_mat4x4_to_stringgchar * pgm_mat4x4_to_string (PgmMat4x4 *mat4x4); Converts mat4x4 to a string representation. MT safe. mat4x4 : A PgmMat4x4 object. Returns : a newly allocated string representing mat4x4. pgm_intersection_line_plane () pgm_intersection_line_planePgmVec3 * pgm_intersection_line_plane (const PgmVec3 *l1, const PgmVec3 *l2, const PgmVec3 *p, const PgmVec3 *pu, const PgmVec3 *pv); Retrieves the intersection point of the line defined by l1 and l2 with the plane defined by p, pu and pv. pu and pv must not be colinear. If the line belongs to the plane then it's considered as if there is no intersection. MT safe. l1 : A PgmVec3 representing a 1st point of the line. l2 : A PgmVec3 representing a 2nd point of the line. p : A PgmVec3 representing point of the plane. pu : A PgmVec3 representing a 1st vector colinear to the plane. pv : A PgmVec3 representing a 2nd vector colinear to the plane. Returns : the intersection point in a newly allocated PgmVec3 if any, NULL otherwise. pgm_point_belongs_rectangle () pgm_point_belongs_rectanglegboolean pgm_point_belongs_rectangle (const PgmVec3 *p, const PgmVec3 *r, const PgmVec3 *ru, const PgmVec3 *rv); Retrieves if the point p belongs to the rectangle defined by the point r and the vectors ru and rv. MT safe. p : A PgmVec3 representing the point. r : A PgmVec3 representing the top-left corner position of the rectangle. ru : A PgmVec3 representing the top edge of the rectangle. rv : a 3 components vector defining the left edge of the rectangle. Returns : TRUE if p belongs to the rectangle, FALSE otherwise. pigment-0.3.17/docs/pgm/xml/pgmevents.xml0000644000175000017500000010223011205035140015220 00000000000000 ]> PgmEvents 3 PIGMENT Library PgmEvents Various structs and functions used for events handling. Synopsis #include <pgm/pgm.h> enum PgmEventType; enum PgmModifierType; enum PgmButtonType; enum PgmScrollDirection; enum PgmViewportState; union PgmEvent; PgmEventAny; PgmEventMotion; PgmEventButton; PgmEventScroll; PgmEventState; PgmEventWin32Message; PgmEventDnd; PgmEventKey; PgmEventExpose; PgmEventConfigure; PgmEvent * pgm_event_new (PgmEventType type); PgmEvent * pgm_event_copy (PgmEvent *event); void pgm_event_free (PgmEvent *event); guint32 pgm_keyval_to_unicode (guint keyval); Description Various structs and functions used by Pigment for events handling. Last reviewed on 2007-04-12 (0.1.5) Details enum PgmEventType PgmEventTypetypedef enum { PGM_NOTHING = -1, PGM_MOTION_NOTIFY = 0, PGM_BUTTON_PRESS = 1, PGM_DOUBLE_BUTTON_PRESS = 2, PGM_TRIPLE_BUTTON_PRESS = 3, PGM_BUTTON_PRESSURE = 4, PGM_BUTTON_RELEASE = 5, PGM_KEY_PRESS = 6, PGM_KEY_RELEASE = 7, PGM_EXPOSE = 8, PGM_CONFIGURE = 9, PGM_DRAG_MOTION = 10, PGM_DRAG_DROP = 12, PGM_DRAG_LEAVE = 13, PGM_SCROLL = 14, PGM_STATE = 15, PGM_DELETE = 16, PGM_WIN32_MESSAGE = 17 } PgmEventType; Specifies the type of the event. PGM_NOTHING a special code to indicate a null event. PGM_MOTION_NOTIFY the pointer has entered the window. PGM_BUTTON_PRESS a mouse button has been pressed. PGM_DOUBLE_BUTTON_PRESS a mouse button has been clicked 2 times in a short period of time. Note that each click also generates a PGM_BUTTON_PRESS event. PGM_TRIPLE_BUTTON_PRESS a mouse button has been clicked 3 times in a short period of time. Note that each click also generates a PGM_BUTTON_PRESS event. PGM_BUTTON_PRESSURE a mouse button pressure has changed. PGM_BUTTON_RELEASE a mouse button has been released. PGM_KEY_PRESS a key has been pressed. PGM_KEY_RELEASE a key has been released. PGM_EXPOSE the window has become visible and needs to be redrawn. PGM_CONFIGURE the size or the position of the viewport has changed. PGM_DRAG_MOTION the mouse has moved in the viewport while a drag is in progress. PGM_DRAG_DROP the mouse has dropped data onto the viewport. PGM_DRAG_LEAVE the mouse has left the viewport while a drag is in progress. PGM_SCROLL the scroll wheel was turned. PGM_STATE the state of a viewport has changed. PGM_DELETE the window manager has requested that the toplevel window be destroyed, usually when the user clicks on a special icon in the title bar. PGM_WIN32_MESSAGE a Win32 message has been received (Only used on Windows). enum PgmModifierType PgmModifierTypetypedef enum { PGM_SHIFT_MASK = (1 << 0), PGM_CAPSLOCK_MASK = (1 << 1), PGM_CONTROL_MASK = (1 << 2), PGM_ALT_MASK = (1 << 3), PGM_NUMLOCK_MASK = (1 << 4) } PgmModifierType; A set of bit-flags to indicate the state of modifier keys. Typical modifier keys are Shift, Control, Alt and CapsLock. PGM_SHIFT_MASK the Shift key. PGM_CAPSLOCK_MASK the Caps Lock. PGM_CONTROL_MASK the Control key. PGM_ALT_MASK the Alt key. PGM_NUMLOCK_MASK the Num Lock. enum PgmButtonType PgmButtonTypetypedef enum { PGM_BUTTON_LEFT = (1 << 0), PGM_BUTTON_MIDDLE = (1 << 1), PGM_BUTTON_RIGHT = (1 << 2) } PgmButtonType; The mouse button type. PGM_BUTTON_LEFT the left mouse button. PGM_BUTTON_MIDDLE the middle mouse button. PGM_BUTTON_RIGHT the right mouse button. enum PgmScrollDirection PgmScrollDirectiontypedef enum { PGM_SCROLL_UP, PGM_SCROLL_DOWN } PgmScrollDirection; The mouse wheel scrolling directions. PGM_SCROLL_UP the scrolling in the upward direction. PGM_SCROLL_DOWN the scrolling in the downward direction. enum PgmViewportState PgmViewportStatetypedef enum { PGM_VIEWPORT_ICONIFIED = (1 << 0) } PgmViewportState; Specifies the state of a viewport. PGM_VIEWPORT_ICONIFIED The viewport is minimized. union PgmEvent PgmEventunion PgmEvent { PgmEventType type; PgmEventAny any; PgmEventMotion motion; PgmEventButton button; PgmEventScroll scroll; PgmEventKey key; PgmEventExpose expose; PgmEventConfigure configure; PgmEventDnd dnd; PgmEventState state; #ifdef WIN32 PgmEventWin32Message win32_message; #endif /* WIN32 */ }; The PgmEvent struct contains a union of all of the event structs, and allows access to the data fields in a number of ways. The event type is always the first field in all of the event structs, and can always be accessed with the following code, no matter what type of event it is: PgmEvent *event; PgmEventType type; type = event->type; To access other fields of the event structs, the pointer to the event can be cast to the appropriate event struct pointer, or the union member name can be used. For example if the event type is PGM_BUTTON_PRESS then the x coordinate of the button press can be accessed with: PgmEvent *event; gfloat x; x = ((PgmEventButton*) event)->x; or with: PgmEvent *event; gfloat x; x = event->button.x; PgmEventAny PgmEventAnytypedef struct { PgmEventType type; guint8 source; } PgmEventAny; Contains the fields which are common to all event structs. Any event pointer can safely be cast to a pointer to a PgmEventAny to access these fields. PgmEventType type; the type of the event. guint8 source; the source field that can be filled by applications to indicate the source of the event (mouse, pen, remote control, etc). PgmEventMotion PgmEventMotiontypedef struct { PgmEventType type; guint8 source; guint32 time; gfloat x, y; guint32 pressure; } PgmEventMotion; Generated when the pointer moves. PgmEventType type; the type of the event. guint8 source; the source field that can be filled by applications to indicate the source of the event (mouse, pen, remote control, etc). guint32 time; the time of the event in milliseconds. gfloat x; the x coordinate of the pointer relative to the window. gfloat y; the y coordinate of the pointer relative to the window. guint32 pressure; the pressure force, set to 0 when not used with a touch screen. PgmEventButton PgmEventButtontypedef struct { PgmEventType type; guint8 source; guint32 time; gfloat x, y; PgmButtonType button; guint32 pressure; } PgmEventButton; Used for button press and button release events. PgmEventType type; the type of the event. guint8 source; the source field that can be filled by applications to indicate the source of the event (mouse, pen, remote control, etc). guint32 time; the time of the event in milliseconds. gfloat x; the x coordinate of the pointer relative to the window. gfloat y; the y coordinate of the pointer relative to the window. PgmButtonType button; the button which was pressed or released. guint32 pressure; the pressure force, set to 0 when not used with a touch screen. PgmEventScroll PgmEventScrolltypedef struct { PgmEventType type; guint8 source; guint32 time; gfloat x, y; PgmScrollDirection direction; } PgmEventScroll; Generated when the mouse wheel is turned. PgmEventType type; the type of the event. guint8 source; the source field that can be filled by applications to indicate the source of the event (mouse, pen, remote control, etc). guint32 time; the time of the event in milliseconds. gfloat x; the x coordinate of the pointer relative to the window. gfloat y; the y coordinate of the pointer relative to the window. PgmScrollDirection direction; the scroll wheel direction. PgmEventState PgmEventStatetypedef struct { PgmEventType type; guint8 source; PgmViewportState changed_mask; PgmViewportState state_mask; } PgmEventState; Generated when the state of a viewport changes. PgmEventType type; the type of the event. guint8 source; the source field that can be filled by applications to indicate the source of the event (mouse, pen, remote control, etc). PgmViewportState changed_mask; mask specifying what viewport flags have changed. PgmViewportState state_mask; mask specifying the new viewport flags. PgmEventWin32Message PgmEventWin32Messagetypedef struct { PgmEventType type; guint8 source; guint32 time; UINT message; WPARAM wparam; LPARAM lparam; } PgmEventWin32Message; Describes a Win32 message. PgmEventType type; the type of the event. guint8 source; the source field that can be filled by applications to indicate the source of the event (mouse, pen, remote control, etc). guint32 time; the time of the event in milliseconds. UINT message; the Win32 message value. WPARAM wparam; additional message information depending on the message value. LPARAM lparam; additional message information depending on the message value. PgmEventDnd PgmEventDndtypedef struct { PgmEventType type; guint8 source; guint32 time; gfloat x, y; gchar **uri; } PgmEventDnd; Describes a drag motion, drop, or leave event. PgmEventType type; the type of the event. guint8 source; the source field that can be filled by applications to indicate the source of the event (mouse, pen, remote control, etc). guint32 time; the time of the event in milliseconds. gfloat x; the new x coordinate of the window. gfloat y; the new y coordinate of the window. gchar **uri; the list of URI as a NULL-terminated array of strings. PgmEventKey PgmEventKeytypedef struct { PgmEventType type; guint8 source; guint32 time; guint modifier; guint keyval; guint16 hardware_keycode; } PgmEventKey; Describes a key press or key release event. PgmEventType type; the type of the event. guint8 source; the source field that can be filled by applications to indicate the source of the event (mouse, pen, remote control, etc). guint32 time; the time of the event in milliseconds. guint modifier; A bit-mask representing the state of the modifier keys (e.g. Control, Shift and Alt), see PgmModifierType. guint keyval; the key that was pressed or released. See the pgm/pgmkeysyms.h header file for a complete list of Pigment key codes. guint16 hardware_keycode; the raw code of the key that was pressed or released. PgmEventExpose PgmEventExposetypedef struct { PgmEventType type; guint8 source; } PgmEventExpose; Generated when a window becomes visible and needs to be redrawn. PgmEventType type; the type of the event. guint8 source; the source field that can be filled by applications to indicate the source of the event (mouse, pen, remote control, etc). PgmEventConfigure PgmEventConfiguretypedef struct { PgmEventType type; guint8 source; gint x, y; gint width, height; } PgmEventConfigure; Generated when a viewport size or position has changed. PgmEventType type; the type of the event. guint8 source; the source field that can be filled by applications to indicate the source of the event (mouse, pen, remote control, etc). gint x; the new x coordinate of the window. gint y; the new y coordinate of the window. gint width; the new width of the viewport. gint height; the new height of the viewport. pgm_event_new () pgm_event_newPgmEvent * pgm_event_new (PgmEventType type); Creates a new PgmEvent of the specified type. MT safe. type : the type of event. Returns : a new PgmEvent instance. pgm_event_copy () pgm_event_copyPgmEvent * pgm_event_copy (PgmEvent *event); Copies event. MT safe. event : a PgmEvent object. Returns : a newly allocated PgmEvent. pgm_event_free () pgm_event_freevoid pgm_event_free (PgmEvent *event); MT safe. Frees all resources used by event. event : A PgmEvent object. pgm_keyval_to_unicode () pgm_keyval_to_unicodeguint32 pgm_keyval_to_unicode (guint keyval); Converts from a Pigment key symbol to the corresponding ISO10646 (Unicode) character. MT safe. keyval : a Pigment key symbol. Returns : the corresponding unicode character, or 0 if there is no corresponding one. pigment-0.3.17/docs/pgm/xml/pgmviewport.xml0000644000175000017500000043353611205035140015613 00000000000000 ]> PgmViewport 3 PIGMENT Library PgmViewport An abstract class doing a visual projection of a canvas. Synopsis #include <pgm/pgm.h> enum PgmViewportCursor; enum PgmViewportCapacity; enum PgmViewportRotation; enum PgmViewportReflection; PgmViewport; PgmViewportClass; PgmError pgm_viewport_set_title (PgmViewport *viewport, const gchar *title); PgmError pgm_viewport_get_title (PgmViewport *viewport, gchar **title); PgmError pgm_viewport_show (PgmViewport *viewport); PgmError pgm_viewport_hide (PgmViewport *viewport); PgmError pgm_viewport_is_visible (PgmViewport *viewport, gboolean *visible); PgmError pgm_viewport_set_decorated (PgmViewport *viewport, gboolean decorated); PgmError pgm_viewport_get_decorated (PgmViewport *viewport, gboolean *decorated); PgmError pgm_viewport_set_cursor (PgmViewport *viewport, PgmViewportCursor cursor); PgmError pgm_viewport_get_cursor (PgmViewport *viewport, PgmViewportCursor *cursor); PgmError pgm_viewport_set_icon (PgmViewport *viewport, GdkPixbuf *icon); PgmError pgm_viewport_get_icon (PgmViewport *viewport, GdkPixbuf **icon); PgmError pgm_viewport_set_size (PgmViewport *viewport, gint width, gint height); PgmError pgm_viewport_get_size (PgmViewport *viewport, gint *width, gint *height); PgmError pgm_viewport_set_alpha_blending (PgmViewport *viewport, gboolean alpha_blending); PgmError pgm_viewport_get_alpha_blending (PgmViewport *viewport, gboolean *alpha_blending); PgmError pgm_viewport_set_opacity (PgmViewport *viewport, guchar opacity); PgmError pgm_viewport_get_opacity (PgmViewport *viewport, guchar *opacity); PgmError pgm_viewport_set_fullscreen (PgmViewport *viewport, gboolean fullscreen); PgmError pgm_viewport_get_fullscreen (PgmViewport *viewport, gboolean *fullscreen); PgmError pgm_viewport_set_iconified (PgmViewport *viewport, gboolean iconified); PgmError pgm_viewport_get_iconified (PgmViewport *viewport, gboolean *iconified); PgmError pgm_viewport_focus (PgmViewport *viewport); PgmError pgm_viewport_get_screen_resolution (PgmViewport *viewport, gint *width, gint *height); PgmError pgm_viewport_set_screen_resolution (PgmViewport *viewport, gint width, gint height); PgmError pgm_viewport_get_screen_size_mm (PgmViewport *viewport, gint *width, gint *height); PgmError pgm_viewport_set_screen_size_mm (PgmViewport *viewport, gint width, gint height); PgmError pgm_viewport_set_message_filter (PgmViewport *viewport, GList *filter); PgmError pgm_viewport_get_message_filter (PgmViewport *viewport, GList **filter); PgmError pgm_viewport_push_event (PgmViewport *viewport, PgmEvent *event); PgmError pgm_viewport_get_canvas (PgmViewport *viewport, PgmCanvas **canvas); PgmError pgm_viewport_set_canvas (PgmViewport *viewport, PgmCanvas *canvas); PgmError pgm_viewport_set_canvas_rotation (PgmViewport *viewport, PgmViewportRotation rotation); PgmError pgm_viewport_get_canvas_rotation (PgmViewport *viewport, PgmViewportRotation *rotation); PgmError pgm_viewport_set_canvas_reflection (PgmViewport *viewport, PgmViewportReflection reflection); PgmError pgm_viewport_get_canvas_reflection (PgmViewport *viewport, PgmViewportReflection *reflection); PgmError pgm_viewport_update_projection (PgmViewport *viewport); PgmError pgm_viewport_to_canvas (PgmViewport *viewport, gfloat *canvas_x, gfloat *canvas_y, gfloat *canvas_z, gfloat viewport_x, gfloat viewport_y, gfloat viewport_z); PgmError pgm_viewport_from_canvas (PgmViewport *viewport, gfloat *viewport_x, gfloat *viewport_y, gfloat *viewport_z, gfloat canvas_x, gfloat canvas_y, gfloat canvas_z); PgmError pgm_viewport_get_embedding_id (PgmViewport *viewport, gulong *embedding_id); PgmError pgm_viewport_get_pixel_formats (PgmViewport *viewport, gulong *formats_mask); PgmError pgm_viewport_get_caps_mask (PgmViewport *viewport, gulong *caps_mask); PgmError pgm_viewport_get_max_texture_size (PgmViewport *viewport, guint32 *max_texture_size); PgmError pgm_viewport_get_frame_rate (PgmViewport *viewport, guint *frame_rate); PgmError pgm_viewport_read_pixels (PgmViewport *viewport, guint x, guint y, guint width, guint height, guint8 *pixels); PgmError pgm_viewport_push_pixels (PgmViewport *viewport, guint width, guint height, guint8 *pixels); PgmError pgm_viewport_emit_update_pass (PgmViewport *viewport); Object Hierarchy GObject +----GstObject +----PgmViewport Signals "button-press-event" : Run Last "button-pressure-event" : Run Last "button-release-event" : Run Last "configure-event" : Run Last "delete-event" : Run Last "drag-drop-event" : Run Last "drag-leave-event" : Run Last "drag-motion-event" : Run Last "expose-event" : Run Last "key-press-event" : Run Last "key-release-event" : Run Last "motion-notify-event" : Run Last "pixels-read" : Run Last "scroll-event" : Run Last "state-event" : Run Last "update-pass" : Run Last Description A PgmViewport object is used to do a visual projection of PgmCanvas object. Each PgmDrawable added to the canvas is rendered on the viewport converting canvas coordinates to display coordinates. Viewport is a base abstract class from which implementation plugins inherit. You can instantiate several viewport implementations through a PgmViewportFactory. A viewport can handle 0 or 1 canvas, if there's no canvas binded, nothing is projected except the background color of the viewport. Implementation capacities Each viewport implementations are based on a dedicated graphical library such as DirectFB, OpenGL or Direct3D to project the binded canvas. These libraries can be completely different, some of them being 2d-based generating their output through blit operations, other being 3d-based generating their output through a 3d pipeline. Each of them can also optimize part of their rendering paths thanks to dedicated hardware. These differences can lead to viewport implementations with different capacities. The result being that some properties of a drawable could not be correctly projected by some implementations. You can retrieve the mask capacities handled by a Viewport at runtime with the pgm_viewport_get_caps_mask() method, and you can get the list of handled color spaces with pgm_viewport_get_pixel_formats(). Event handling A viewport is responsible of the event handling. It catches the events generated by the underlying backend, and converts them building Pigment events, which are then dispatched through signals. You can connect functions to these signals using g_signal_connect() , in UI programming these functions are often called callbacks. Each time an event is generated, the corresponding signal is emited and all the connected callbacks are called. Viewport size Practically speaking, the viewport is basically either a window on your screen or your complete monitor/TV. When you define the size of the viewport, the implementation will try to change the window size, or the video mode if you set it to be fullscreen. Some viewport implementation are not able to obtain the screen size in millimeters and you have to set it, so that the viewport can calculate the appropriate projections taking in account non square pixels. Recommended usage of viewport size Applications are strongly encouraged to use the viewport the following way: The application initializes Pigment using pgm_init and then try to get the screen size in millimeters, the screen resolution and the viewport size (window size or fullscreen size). Looking at those parameters the application can calculate the pixel aspect ratio of the screen and figure out the visual aspect ratio of the viewport (4:3, 16:9, etc). When the application has defined the visual aspect ratio of the viewport, it can decide the visual aspect ratio it's going to generate and set the canvas size accordingly. Let's say for example that the viewport size is a 750x400 pixels window and that we have square pixels, this is a bit wider than 16:9. The application decides to generate a 16:9 style user interface and sets the canvas to 16.0x9.0. The viewport will draw black borders and project that canvas as a 711x400 pixels large rectangle in the middle of that window. If the viewport size changes (window resize), the application can decide to use another aspect ratio or stick with the current one. Last reviewed on 2007-06-10 (0.1.5) Details enum PgmViewportCursor PgmViewportCursortypedef enum { PGM_VIEWPORT_LEFT_ARROW = 0, PGM_VIEWPORT_INHERIT = 1, PGM_VIEWPORT_NONE = 2 } PgmViewportCursor; Pigment system cursor type. PGM_VIEWPORT_LEFT_ARROW Standard left arrow system cursor. PGM_VIEWPORT_INHERIT Inherited cursor from the environment. PGM_VIEWPORT_NONE Hidden cursor. enum PgmViewportCapacity PgmViewportCapacitytypedef enum { PGM_VIEWPORT_HARDWARE_ACCELERATION = (1 << 0), PGM_VIEWPORT_APPLICATION_EMBEDDING = (1 << 1), PGM_VIEWPORT_OPACITY = (1 << 2), PGM_VIEWPORT_TOUCHPAD = (1 << 3), PGM_VIEWPORT_X11_SYSTEM_BUFFER = (1 << 4) } PgmViewportCapacity; Capacities supported by the viewport. PGM_VIEWPORT_HARDWARE_ACCELERATION Supports accelerated rendering thanks to dedicated hardware. PGM_VIEWPORT_APPLICATION_EMBEDDING Supports embedding into another application. PGM_VIEWPORT_OPACITY Supports opacity so that compositing managers can blend the viewport with other applications. PGM_VIEWPORT_TOUCHPAD Supports touchpad so that application can use the pressure events and parameters. PGM_VIEWPORT_X11_SYSTEM_BUFFER Supports X11 system buffer as image content. Actually, X11 system buffers are Pixmaps. enum PgmViewportRotation PgmViewportRotationtypedef enum { PGM_VIEWPORT_ROTATION_NONE = 0, PGM_VIEWPORT_ROTATION_90 = 1, PGM_VIEWPORT_ROTATION_180 = 2, PGM_VIEWPORT_ROTATION_270 = 3 } PgmViewportRotation; The rotation types of the canvas projection. PGM_VIEWPORT_ROTATION_NONE Do not rotate to the canvas. PGM_VIEWPORT_ROTATION_90 Rotate the canvas 90° counter-clockwise. PGM_VIEWPORT_ROTATION_180 Rotate the canvas 180° counter-clockwise. PGM_VIEWPORT_ROTATION_270 Rotate the canvas 270° counter-clockwise. enum PgmViewportReflection PgmViewportReflectiontypedef enum { PGM_VIEWPORT_REFLECTION_NONE = 0, PGM_VIEWPORT_REFLECTION_HORIZONTAL_FLIP = 1, PGM_VIEWPORT_REFLECTION_VERTICAL_FLIP = 2 } PgmViewportReflection; The reflection types of the canvas projection. PGM_VIEWPORT_REFLECTION_NONE Do not reflect to the canvas. PGM_VIEWPORT_REFLECTION_HORIZONTAL_FLIP Reflect the canvas horizontally. PGM_VIEWPORT_REFLECTION_VERTICAL_FLIP Reflect the canvas vertically. PgmViewport PgmViewporttypedef struct { PgmViewportFactory *factory; PgmCanvas *canvas; GList *message_filter; gchar *title; GdkPixbuf *icon; PgmViewportCursor cursor; gboolean fullscreen; gboolean visible; gboolean decorated; gboolean iconified; gboolean alpha_blending; gint width, height; gint width_mm, height_mm; PgmMat4x4 *projection, *inv_projection; gint projected_x, projected_y; gint projected_width, projected_height; PgmViewportRotation rotation; PgmViewportReflection reflection; gfloat pixel_aspect_ratio; gfloat viewport_ratio; gfloat canvas_ratio; gulong caps_mask; guchar opacity; } PgmViewport; The PgmViewport structure. PgmViewportFactory *factory; the factory used to instantiate the PgmViewport. PgmCanvas *canvas; the attached canvas. GList *message_filter; the filter of message events. gchar *title; the viewport title. GdkPixbuf *icon; the current icon. PgmViewportCursor cursor; the current cursor. gboolean fullscreen; the fullscreen state. gboolean visible; the visible state. gboolean decorated; the decorated state. gboolean iconified; the iconified state. gboolean alpha_blending; the alpha blending state. gint width; the viewport width. gint height; the viewport height. gint width_mm; the viewport screen width in millimeters. gint height_mm; the viewport screen height in millimeters. PgmMat4x4 *projection; the 4x4 projection matrix. PgmMat4x4 *inv_projection; the 4x4 inverse projection matrix. gint projected_x; the attached canvas projected x position. gint projected_y; the attached canvas projected y position. gint projected_width; the attached canvas projected width. gint projected_height; the attached canvas projected height. PgmViewportRotation rotation; the rotation of the projected canvas. PgmViewportReflection reflection; the reflection of the projected canvas. gfloat pixel_aspect_ratio; the pixel-aspect-ratio. gfloat viewport_ratio; the viewport ratio. gfloat canvas_ratio; the attached canvas ratio with pixel-aspect-ratio correction applied. gulong caps_mask; the viewport mask of supported capacities. guchar opacity; the opacity. PgmViewportClass PgmViewportClasstypedef struct { GstObjectClass parent_class; /* signals */ void (*button_press_event) (PgmViewport *viewport, PgmEventButton *event); void (*button_pressure_event) (PgmViewport *viewport, PgmEventButton *event); void (*button_release_event) (PgmViewport *viewport, PgmEventButton *event); void (*key_press_event) (PgmViewport *viewport, PgmEventKey *event); void (*key_release_event) (PgmViewport *viewport, PgmEventKey *event); void (*configure_event) (PgmViewport *viewport, PgmEventConfigure *event); void (*delete_event) (PgmViewport *viewport, PgmEvent *event); void (*scroll_event) (PgmViewport *viewport, PgmEventScroll *event); void (*motion_notify_event) (PgmViewport *viewport, PgmEventMotion *event); void (*expose_event) (PgmViewport *viewport, PgmEventExpose *event); gboolean (*drag_motion_event) (PgmViewport *viewport, PgmEventDnd *event); void (*drag_drop_event) (PgmViewport *viewport, PgmEventDnd *event); void (*drag_leave_event) (PgmViewport *viewport, PgmEventDnd *event); void (*state_event) (PgmViewport *viewport, PgmEventState *event); #ifdef WIN32 LRESULT (*win32_message_event) (PgmViewport *viewport, PgmEventWin32Message *event); #endif /* WIN32 */ void (*pixels_read) (PgmViewport *viewport, guint width, guint height, gpointer pixels); void (*update_pass) (PgmViewport *viewport); /* virtual methods for subclasses */ PgmError (*set_title) (PgmViewport *viewport, const gchar *title); PgmError (*show) (PgmViewport *viewport); PgmError (*hide) (PgmViewport *viewport); PgmError (*set_decorated) (PgmViewport *viewport, gboolean decorated); PgmError (*set_cursor) (PgmViewport *viewport, PgmViewportCursor cursor); PgmError (*set_icon) (PgmViewport *viewport, GdkPixbuf *icon); PgmError (*set_size) (PgmViewport *viewport, gint width, gint height); PgmError (*get_size) (PgmViewport *viewport, gint *width, gint *height); PgmError (*set_alpha_blending) (PgmViewport *viewport, gboolean alpha_blending); PgmError (*set_opacity) (PgmViewport *viewport, guchar opacity); PgmError (*set_fullscreen) (PgmViewport *viewport, gboolean fullscreen); PgmError (*set_iconified) (PgmViewport *viewport, gboolean iconified); PgmError (*focus) (PgmViewport *viewport); PgmError (*set_screen_resolution) (PgmViewport *viewport, gint width, gint height); PgmError (*get_screen_resolution) (PgmViewport *viewport, gint *width, gint *height); PgmError (*set_screen_size_mm) (PgmViewport *viewport, gint width, gint height); PgmError (*get_screen_size_mm) (PgmViewport *viewport, gint *width, gint *height); PgmError (*set_canvas) (PgmViewport *viewport, PgmCanvas *canvas); PgmError (*update_projection) (PgmViewport *viewport); PgmError (*get_embedding_id) (PgmViewport *viewport, gulong *embedding_id); PgmError (*get_pixel_formats) (PgmViewport *viewport, gulong *formats_mask); PgmError (*get_caps_mask) (PgmViewport *viewport, gulong *caps_mask); PgmError (*get_max_texture_size) (PgmViewport *viewport, guint32 *max_texture_size); PgmError (*get_frame_rate) (PgmViewport *viewport, guint *frame_rate); PgmError (*set_message_filter) (PgmViewport *viewport, GList *filter); PgmError (*read_pixels) (PgmViewport *viewport, guint x, guint y, guint width, guint height, guint8 *pixels); PgmError (*set_drag_status) (PgmViewport *viewport, gboolean accept); } PgmViewportClass; Pigment drawable class. GstObjectClass parent_class; the parent class structure. button_press_event () the "button-press-event" signal. button_pressure_event () the "button-pressure-event" signal. button_release_event () the "button-release-event" signal. key_press_event () the "key-press-event" signal. key_release_event () the "key-release-event" signal. configure_event () the "configure-event" signal. delete_event () the "delete-event" signal. scroll_event () the "scroll-event" signal. motion_notify_event () the "motion-notify-event" signal. expose_event () the "expose-event" signal. drag_motion_event () the "drag-motion-event" signal. drag_drop_event () the "drag-drop-event" signal. drag_leave_event () the "drag-leave-event" signal. state_event () the "state-event" signal. win32_message_event () the "win32-message-event" signal. pixels_read () the "pixels-read" signal. update_pass () the "update-pass" signal. set_title () the set_title virtual method. show () the show virtual method. hide () the hide virtual method. set_decorated () the set_decorated virtual method. set_cursor () the set_cursor virtual method. set_icon () the set_icon virtual method. set_size () the set_size virtual method. get_size () the get_size virtual method. set_alpha_blending () the set_alpha_blending virtual method. set_opacity () the set_opacity virtual method. set_fullscreen () the set_fullscreen virtual method. set_iconified () the set_iconified virtual method. focus () the focus virtual method. set_screen_resolution () the set_screen_resolution virtual method. get_screen_resolution () the get_screen_resolution virtual method. set_screen_size_mm () the set_screen_size_mm virtual method. get_screen_size_mm () the get_screen_size_mm virtual method. set_canvas () the set_canvas virtual method. update_projection () the update_projection virtual method. get_embedding_id () the get_embedding_id virtual method. get_pixel_formats () the get_pixel_formats virtual method. get_caps_mask () the get_caps_mask virtual method. get_max_texture_size () the get_max_texture_size virtual method. get_frame_rate () the get_frame_rate virtual method. set_message_filter () the set_message_filter virtual method. read_pixels () the read_pixels virtual method. set_drag_status () the set_drag_status virtual method. pgm_viewport_set_title () pgm_viewport_set_titlePgmError pgm_viewport_set_title (PgmViewport *viewport, const gchar *title); Sets the title appearing in the title bar and in the iconified window list. The string is copied and can be freed when the call returns. MT safe. viewport : a PgmViewport object. title : the title. Returns : a PgmError indicating success/failure. pgm_viewport_get_title () pgm_viewport_get_titlePgmError pgm_viewport_get_title (PgmViewport *viewport, gchar **title); Retrieves the title of viewport in title. MT safe. viewport : a PgmViewport object. title : a pointer to a pointer to a gchar where the title string will be stored. g_free() after use. Returns : A PgmError indicating success/failure. pgm_viewport_show () pgm_viewport_showPgmError pgm_viewport_show (PgmViewport *viewport); Makes viewport visible. MT safe. viewport : a PgmViewport object. Returns : a PgmError indicating success/failure. pgm_viewport_hide () pgm_viewport_hidePgmError pgm_viewport_hide (PgmViewport *viewport); Makes viewport invisible. MT safe. viewport : a PgmViewport object. Returns : a PgmError indicating success/failure. pgm_viewport_is_visible () pgm_viewport_is_visiblePgmError pgm_viewport_is_visible (PgmViewport *viewport, gboolean *visible); Retrieves whether viewport is visible. MT safe. viewport : a PgmViewport object. visible : a pointer to a gboolean where the visible state of the viewport is going to be stored. Returns : a PgmError indicating success/failure. pgm_viewport_set_decorated () pgm_viewport_set_decoratedPgmError pgm_viewport_set_decorated (PgmViewport *viewport, gboolean decorated); By default, viewports should be (depending on the plugin) decorated with a title bar and resize controls. This function allows to disable these decorations, creating a borderless viewport. MT safe. viewport : a PgmViewport object. decorated : TRUE to decorate the viewport. Returns : a PgmError indicating success/failure. pgm_viewport_get_decorated () pgm_viewport_get_decoratedPgmError pgm_viewport_get_decorated (PgmViewport *viewport, gboolean *decorated); Retrieves in decorated whether viewport is decorated. MT safe. viewport : a PgmViewport object. decorated : a pointer the a gboolean where the decorated state will be stored. Returns : a PgmError indicating success/failure. pgm_viewport_set_cursor () pgm_viewport_set_cursorPgmError pgm_viewport_set_cursor (PgmViewport *viewport, PgmViewportCursor cursor); Sets cursor as the current cursor of viewport. MT safe. viewport : a PgmViewport object. cursor : the cursor to set. Returns : a PgmError indicating success/failure. pgm_viewport_get_cursor () pgm_viewport_get_cursorPgmError pgm_viewport_get_cursor (PgmViewport *viewport, PgmViewportCursor *cursor); Retrieves the cursor of viewport. MT safe. viewport : a PgmViewport object. cursor : a pointer PgmViewportCursor where the viewport cursor is going to be stored. Returns : a PgmError indicating success/failure. pgm_viewport_set_icon () pgm_viewport_set_iconPgmError pgm_viewport_set_icon (PgmViewport *viewport, GdkPixbuf *icon); Sets icon as the current icon of viewport (shown by the window manager e.g. when the viewport window is minimised). MT safe. viewport : a PgmViewport object. icon : a GdkPixbuf object to set as icon for viewport. Returns : a PgmError indicating success/failure. pgm_viewport_get_icon () pgm_viewport_get_iconPgmError pgm_viewport_get_icon (PgmViewport *viewport, GdkPixbuf **icon); Retrieves the icon of viewport. MT safe. viewport : a PgmViewport object. icon : a double pointer GdkPixbuf where the viewport icon is going to be stored. Unref after usage. Returns : a PgmError indicating success/failure. pgm_viewport_set_size () pgm_viewport_set_sizePgmError pgm_viewport_set_size (PgmViewport *viewport, gint width, gint height); Sets viewport size in pixels to (width,height). MT safe. viewport : a PgmViewport object. width : the viewport width. height : the viewport height. Returns : a PgmError indicating success/failure. pgm_viewport_get_size () pgm_viewport_get_sizePgmError pgm_viewport_get_size (PgmViewport *viewport, gint *width, gint *height); Retrieves the size (width,height) of viewport in pixels. MT safe. viewport : a PgmViewport object. width : a pointer to a gint where the viewport width in pixels is going to be stored. height : a pointer to a gint where the viewport height in pixels is going to be stored. Returns : a PgmError indicating success/failure. pgm_viewport_set_alpha_blending () pgm_viewport_set_alpha_blendingPgmError pgm_viewport_set_alpha_blending (PgmViewport *viewport, gboolean alpha_blending); Enable or disable alpha blending on viewport. The function is useful to improve the rendering performance. For instance it can make HD video playback in fullscreen smoother, when no blended drawables need to be drawn over it. MT safe. viewport : a PgmViewport object. alpha_blending : the alpha blending state. Returns : a PgmError indicating success/failure. pgm_viewport_get_alpha_blending () pgm_viewport_get_alpha_blendingPgmError pgm_viewport_get_alpha_blending (PgmViewport *viewport, gboolean *alpha_blending); Retrieves in alpha_blending the alpha blending state of viewport. MT safe. viewport : a PgmViewport object. alpha_blending : a pointer to a gboolean where the alpha blending state is going to be stored. Returns : a PgmError indicating success/failure. pgm_viewport_set_opacity () pgm_viewport_set_opacityPgmError pgm_viewport_set_opacity (PgmViewport *viewport, guchar opacity); Set the opacity of viewport. Note that this function only works if viewport supports the PGM_VIEWPORT_OPACITY capacity. The opacity is considered by compositing managers for blending with other applications. MT safe. viewport : a PgmViewport object. opacity : the opacity between 0 and 255. Returns : a PgmError indicating success/failure. pgm_viewport_get_opacity () pgm_viewport_get_opacityPgmError pgm_viewport_get_opacity (PgmViewport *viewport, guchar *opacity); Retrieves in opacity the opacity of viewport. MT safe. viewport : a PgmViewport object. opacity : a pointer to a guchar where the opacity is going to be stored. Returns : a PgmError indicating success/failure. pgm_viewport_set_fullscreen () pgm_viewport_set_fullscreenPgmError pgm_viewport_set_fullscreen (PgmViewport *viewport, gboolean fullscreen); Sets/unsets fullscreen mode of viewport function of fullscreen. MT safe. viewport : a PgmViewport object. fullscreen : the fullscreen state. Returns : a PgmError indicating success/failure. pgm_viewport_get_fullscreen () pgm_viewport_get_fullscreenPgmError pgm_viewport_get_fullscreen (PgmViewport *viewport, gboolean *fullscreen); Retrieves the fullscreen state of viewport in fullscreen. MT safe. viewport : a PgmViewport object. fullscreen : a pointer to a gboolean where the fullscreen state is going to be stored. Returns : A PgmError indicating success/failure. pgm_viewport_set_iconified () pgm_viewport_set_iconifiedPgmError pgm_viewport_set_iconified (PgmViewport *viewport, gboolean iconified); Asks to iconify (i.e. minimize) viewport depending on the iconified value. MT safe. viewport : a PgmViewport object. iconified : TRUE to iconify the viewport. Returns : a PgmError indicating success/failure. pgm_viewport_get_iconified () pgm_viewport_get_iconifiedPgmError pgm_viewport_get_iconified (PgmViewport *viewport, gboolean *iconified); Retrieves in iconified whether viewport is iconified. MT safe. viewport : a PgmViewport object. iconified : a pointer the a gboolean where the iconified state will be stored. Returns : a PgmError indicating success/failure. pgm_viewport_focus () pgm_viewport_focusPgmError pgm_viewport_focus (PgmViewport *viewport); Presents viewport to the user. This may mean raising the window in the stacking order, deiconifying it and/or giving it the keyboard focus, possibly dependent on the user's platform, window manager, and preferences. Note that if viewport is hidden, this function calls pgm_viewport_show() as well. MT safe. viewport : a PgmViewport object. Returns : a PgmError indicating success/failure. pgm_viewport_get_screen_resolution () pgm_viewport_get_screen_resolutionPgmError pgm_viewport_get_screen_resolution (PgmViewport *viewport, gint *width, gint *height); Retrieves the resolution (width,height) of viewport in pixels. MT safe. viewport : a PgmViewport object. width : a pointer to a gint where the screen width in pixels is going to be stored. height : a pointer to a gint where the screen height in pixels is going to be stored. Returns : a PgmError indicating success/failure. pgm_viewport_set_screen_resolution () pgm_viewport_set_screen_resolutionPgmError pgm_viewport_set_screen_resolution (PgmViewport *viewport, gint width, gint height); Sets a new resolution (width,height) of viewport in pixels. This is changing the video mode or the display resolution so you are strongly encouraged to restore it to original value when exiting. MT safe. viewport : a PgmViewport object. width : the screen width in pixels. height : the screen height in pixels. Returns : a PgmError indicating success/failure. pgm_viewport_get_screen_size_mm () pgm_viewport_get_screen_size_mmPgmError pgm_viewport_get_screen_size_mm (PgmViewport *viewport, gint *width, gint *height); Retrieves the physical (width,height) size of viewport in millimeters. If the plugin can not provide that information it will return -1 as width and height. In that case the application should provide the screen size through pgm_viewport_set_screen_size_mm(). MT safe. viewport : a PgmViewport object. width : a pointer to a gint where the screen width in millimeters is going to be stored. height : a pointer to a gint where the screen height in millimeters is going to be stored. Returns : a PgmError indicating success/failure. pgm_viewport_set_screen_size_mm () pgm_viewport_set_screen_size_mmPgmError pgm_viewport_set_screen_size_mm (PgmViewport *viewport, gint width, gint height); Sets the physical screen size in millimeters. This is used if the viewport implementation cannot retrieve that information by itself. You have to define the physical ratio of the screen so that viewport can calculate the pixel aspect ratio. MT safe. viewport : a PgmViewport object. width : the screen width in millimeters. height : the screen height in millimeters. Returns : a PgmError indicating success/failure. pgm_viewport_set_message_filter () pgm_viewport_set_message_filterPgmError pgm_viewport_set_message_filter (PgmViewport *viewport, GList *filter); Sets the list of message types filtered by viewport for the "win32-message-events" signal. The previously set filter is discarded. A NULL filter is equivalent to a void list. The list is copied internally and have to be freed by the caller. MT safe. viewport : a PgmViewport object. filter : the GList containing the message types to filter. Returns : a PgmError indicating success/failure. pgm_viewport_get_message_filter () pgm_viewport_get_message_filterPgmError pgm_viewport_get_message_filter (PgmViewport *viewport, GList **filter); Retrieves the current list of message types filtered by viewport. MT safe. viewport : a PgmViewport object. filter : a pointer to GList pointer in which the filter list is going to be stored. g_list_free() after use. Returns : a PgmError indicating success/failure. pgm_viewport_push_event () pgm_viewport_push_eventPgmError pgm_viewport_push_event (PgmViewport *viewport, PgmEvent *event); Push an event in the list. MT safe. viewport : a PgmViewport object. event : the PgmEvent to push. Returns : a PgmError indicating success/failure. pgm_viewport_get_canvas () pgm_viewport_get_canvasPgmError pgm_viewport_get_canvas (PgmViewport *viewport, PgmCanvas **canvas); Retrieves the current canvas or NULL if there's no canvas bound. MT safe. viewport : a PgmViewport object. canvas : a pointer to PgmCanvas pointer in which the canvas bound to viewport is going to be stored. The refcount of canvas is increased. Returns : a PgmError indicating success/failure. pgm_viewport_set_canvas () pgm_viewport_set_canvasPgmError pgm_viewport_set_canvas (PgmViewport *viewport, PgmCanvas *canvas); Sets the canvas to be projected by the viewport. This function increases the refcount on the canvas. Any previously set canvas on viewport is unreffed. If canvas is NULL, the previously set canvas is unreffed. MT safe. viewport : a PgmViewport object. canvas : the PgmCanvas to bind. Returns : a PgmError indicating success/failure. pgm_viewport_set_canvas_rotation () pgm_viewport_set_canvas_rotationPgmError pgm_viewport_set_canvas_rotation (PgmViewport *viewport, PgmViewportRotation rotation); Affects the way viewport projects its canvas applying the specified rotation. MT safe. viewport : a PgmViewport object. rotation : the PgmViewportRotation rotation type. Returns : a PgmError indicating success/failure. pgm_viewport_get_canvas_rotation () pgm_viewport_get_canvas_rotationPgmError pgm_viewport_get_canvas_rotation (PgmViewport *viewport, PgmViewportRotation *rotation); Retrieves the current rotation applied by viewport on its canvas. MT safe. viewport : a PgmViewport object. rotation : a pointer to PgmViewportRotation where the current rotation will be stored. Returns : a PgmError indicating success/failure. pgm_viewport_set_canvas_reflection () pgm_viewport_set_canvas_reflectionPgmError pgm_viewport_set_canvas_reflection (PgmViewport *viewport, PgmViewportReflection reflection); Affects the way viewport projects its canvas applying the specified reflection. MT safe. viewport : a PgmViewport object. reflection : the PgmViewportReflection reflection type. Returns : a PgmError indicating success/failure. pgm_viewport_get_canvas_reflection () pgm_viewport_get_canvas_reflectionPgmError pgm_viewport_get_canvas_reflection (PgmViewport *viewport, PgmViewportReflection *reflection); Retrieves the current reflection applied by viewport on its canvas. MT safe. viewport : a PgmViewport object. reflection : a pointer to PgmViewportReflection where the current reflection will be stored. Returns : a PgmError indicating success/failure. pgm_viewport_update_projection () pgm_viewport_update_projectionPgmError pgm_viewport_update_projection (PgmViewport *viewport); Update the projection. The projection update is done automatically by Pigment, this function is only useful for plugin that have changed for instance the size of the viewport, and want to adapt the projection accordingly. MT safe. viewport : a PgmViewport object. Returns : a PgmError indicating success/failure. pgm_viewport_to_canvas () pgm_viewport_to_canvasPgmError pgm_viewport_to_canvas (PgmViewport *viewport, gfloat *canvas_x, gfloat *canvas_y, gfloat *canvas_z, gfloat viewport_x, gfloat viewport_y, gfloat viewport_z); Retrieves the projection of a 3-components vector in viewport coordinates on the viewport in a 3-components vector in canvas coordinates. The z component of the viewport being clamped in the range [0.0, 1.0]. Note that if you want to get a canvas vector with a z coordinates of 0.0f, you can give -1.0f to viewport_z. It can be useful when you want to convert 2d position in viewport coordinates to canvas coordinates. MT safe. viewport : a PgmViewport object. canvas_x : a gfloat address to store the unprojected canvas x component. canvas_y : a gfloat address to store the unprojected canvas y component. canvas_z : a gfloat address to store the unprojected canvas z component. viewport_x : the viewport x component to project. viewport_y : the viewport y component to project. viewport_z : the viewport z component to project. Returns : a PgmError indicating success/failure. pgm_viewport_from_canvas () pgm_viewport_from_canvasPgmError pgm_viewport_from_canvas (PgmViewport *viewport, gfloat *viewport_x, gfloat *viewport_y, gfloat *viewport_z, gfloat canvas_x, gfloat canvas_y, gfloat canvas_z); Retrieves the projection of a 3-components vector in canvas coordinates on the viewport in a 3-components vector in viewport coordinates. MT safe. viewport : a PgmViewport object. viewport_x : a gfloat address to store the projected viewport x component. viewport_y : a gfloat address to store the projected viewport y component. viewport_z : a gfloat address to store the projected viewport z component. canvas_x : the canvas x component to project. canvas_y : the canvas y component to project. canvas_z : the canvas z component to project. Returns : a PgmError indicating success/failure. pgm_viewport_get_embedding_id () pgm_viewport_get_embedding_idPgmError pgm_viewport_get_embedding_id (PgmViewport *viewport, gulong *embedding_id); Gets the embedding ID of viewport. It can be used by other applications to embed it. MT safe. viewport : a PgmViewport object. embedding_id : a pointer to a gulong where the embedding ID is going to be stored. Returns : a PgmError indicating success/failure. pgm_viewport_get_pixel_formats () pgm_viewport_get_pixel_formatsPgmError pgm_viewport_get_pixel_formats (PgmViewport *viewport, gulong *formats_mask); Gets the list of supported pixel formats of viewport. MT safe. viewport : a PgmViewport object. formats_mask : a pointer to a gulong where the mask of supported PgmImagePixelFormat is going to be stored. Returns : a PgmError indicating success/failure. pgm_viewport_get_caps_mask () pgm_viewport_get_caps_maskPgmError pgm_viewport_get_caps_mask (PgmViewport *viewport, gulong *caps_mask); Retrieves the mask of supported PgmViewportCapacity. MT safe. viewport : a PgmViewport object. caps_mask : a pointer to a gulong where the mask of PgmViewportCapacity is going to be stored. Returns : a PgmError indicating success/failure. pgm_viewport_get_max_texture_size () pgm_viewport_get_max_texture_sizePgmError pgm_viewport_get_max_texture_size (PgmViewport *viewport, guint32 *max_texture_size); Retrieves the maximum texture size. MT safe. viewport : a PgmViewport object. max_texture_size : a pointer to a guint32 where the maximum texture size is going to be stored. Returns : a PgmError indicating success/failure. pgm_viewport_get_frame_rate () pgm_viewport_get_frame_ratePgmError pgm_viewport_get_frame_rate (PgmViewport *viewport, guint *frame_rate); Retrieves the frame rate in frames per second of the rendering of the canvas on viewport. The value retrieved changes each second, and represents the number of frames that have been rendered in the previous second. That function could be useful to check the rendering performance on a system, and for instance tell the user if too many frames are dropped. MT safe. viewport : a PgmViewport object. frame_rate : a pointer to a guint where the frame rate is going to be stored. Returns : a PgmError indicating success/failure. pgm_viewport_read_pixels () pgm_viewport_read_pixelsPgmError pgm_viewport_read_pixels (PgmViewport *viewport, guint x, guint y, guint width, guint height, guint8 *pixels); Requests the reading of a pixel area in viewport, starting with the pixel whose top-left corner is at location (x, y) and dimension is (width, height). Once the pixel area is obtained, the "pixels-read" signal is emitted with the requested pixels stored at location pixels. The retrieved pixel area is in the RGBA color space. pixels should be allocated by the application with the necessary size (width * height * 4) before any call to that function. A callback must be connected to the "pixels-read" signal before any call to that function. x, y, width and height are clamped if their values lie outside viewport size. MT Safe. viewport : a PgmViewport object. x : the x coordinate of the first pixel to read from the left of viewport. y : the y coordinate of the first pixel to read from the top of viewport. width : the width of the pixel area to read, corresponds to a single pixel. height : the height of the pixel area to read, corresponds to a single pixel. pixels : a pre-allocated memory area where the pixels read will be written. The buffer must be freed by the application, in the "pixels-read" signal callback for instance. Returns : a PgmError indicating success/failure. pgm_viewport_push_pixels () pgm_viewport_push_pixelsPgmError pgm_viewport_push_pixels (PgmViewport *viewport, guint width, guint height, guint8 *pixels); Push a pixel area to viewport. The function will emit the "pixels-read" signal from the Pigment main loop with the given pixel area parameters. A plugin must call this function for each read_pixels() call that does not return an error, because the user may free the pixel array in the callback called from there. This function should only be used by plugins. MT safe. viewport : a PgmViewport object. width : the width of the pixel area. height : the height of the pixel area. pixels : the pixels to push. Returns : a PgmError indicating success/failure. pgm_viewport_emit_update_pass () pgm_viewport_emit_update_passPgmError pgm_viewport_emit_update_pass (PgmViewport *viewport); Emits the 'update-pass' signal on viewport. This function should only be used by plugins. MT safe. viewport : the PgmViewport object. Returns : a PgmError indicating success/failure. Signal Details The <literal>"button-press-event"</literal> signal PgmViewport::button-press-eventvoid user_function (PgmViewport *viewport, PgmEvent *event, gpointer user_data) : Run Last Will be emitted on a mouse button press on the viewport. viewport : the PgmViewport event : the PgmEventButton user_data : user data set when the signal handler was connected. The <literal>"button-pressure-event"</literal> signal PgmViewport::button-pressure-eventvoid user_function (PgmViewport *viewport, PgmEvent *event, gpointer user_data) : Run Last Will be emitted on a mouse button pressure change on the viewport. viewport : the PgmViewport event : the PgmEventButton user_data : user data set when the signal handler was connected. The <literal>"button-release-event"</literal> signal PgmViewport::button-release-eventvoid user_function (PgmViewport *viewport, PgmEvent *event, gpointer user_data) : Run Last Will be emitted on a mouse button release on the viewport. viewport : the PgmViewport event : the PgmEventButton user_data : user data set when the signal handler was connected. The <literal>"configure-event"</literal> signal PgmViewport::configure-eventvoid user_function (PgmViewport *viewport, PgmEvent *event, gpointer user_data) : Run Last Will be emitted on a viewport position or size change. viewport : the PgmViewport event : the PgmEventConfigure user_data : user data set when the signal handler was connected. The <literal>"delete-event"</literal> signal PgmViewport::delete-eventvoid user_function (PgmViewport *viewport, PgmEvent *event, gpointer user_data) : Run Last Will be emitted on a viewport close request (ie the user clicked the close button of the window manager). viewport : the PgmViewport event : the PgmEventDelete user_data : user data set when the signal handler was connected. The <literal>"drag-drop-event"</literal> signal PgmViewport::drag-drop-eventvoid user_function (PgmViewport *viewport, PgmEvent *event, gpointer user_data) : Run Last Will be emitted when the user drops data onto viewport. Note that you have to connect a handler to the signal "drag-motion-event" and return TRUE to accept a drag. This signal is not emitted if a drag has not been accepted. viewport : the PgmViewport event : the PgmEventDnd user_data : user data set when the signal handler was connected. The <literal>"drag-leave-event"</literal> signal PgmViewport::drag-leave-eventvoid user_function (PgmViewport *viewport, PgmEvent *event, gpointer user_data) : Run Last Will be emitted when the user leaves viewport during a drag. A typical reason to connect to this signal is to undo things done in "drag-motion-event". viewport : the PgmViewport event : the PgmEventDnd user_data : user data set when the signal handler was connected. The <literal>"drag-motion-event"</literal> signal PgmViewport::drag-motion-eventgboolean user_function (PgmViewport *viewport, PgmEvent *event, gpointer user_data) : Run Last Will be emitted when the user moves the cursor over viewport during a drag. The signal handler must determine whether the cursor position is in a drop zone or not. If it is not in a drop zone, it returns FALSE and the "drag-drop-event" signal will not be called. Otherwise, the handler returns TRUE. viewport : the PgmViewport event : the PgmEventDnd user_data : user data set when the signal handler was connected. The <literal>"expose-event"</literal> signal PgmViewport::expose-eventvoid user_function (PgmViewport *viewport, PgmEvent *event, gpointer user_data) : Run Last Will be emitted when the viewport visibility status has changed. viewport : the PgmViewport event : the PgmEventExpose user_data : user data set when the signal handler was connected. The <literal>"key-press-event"</literal> signal PgmViewport::key-press-eventvoid user_function (PgmViewport *viewport, PgmEvent *event, gpointer user_data) : Run Last Will be emitted on a keyboard press on the viewport. viewport : the PgmViewport event : the PgmEventKey user_data : user data set when the signal handler was connected. The <literal>"key-release-event"</literal> signal PgmViewport::key-release-eventvoid user_function (PgmViewport *viewport, PgmEvent *event, gpointer user_data) : Run Last Will be emitted on a keyboard release on the viewport. viewport : the PgmViewport event : the PgmEventKey user_data : user data set when the signal handler was connected. The <literal>"motion-notify-event"</literal> signal PgmViewport::motion-notify-eventvoid user_function (PgmViewport *viewport, PgmEvent *event, gpointer user_data) : Run Last Will be emitted on a mouse move on the viewport. viewport : the PgmViewport event : the PgmEventMotion user_data : user data set when the signal handler was connected. The <literal>"pixels-read"</literal> signal PgmViewport::pixels-readvoid user_function (PgmViewport *viewport, guint width, guint height, gpointer pixels, gpointer user_data) : Run Last Will be emitted when pixels have been read following a call to pgm_viewport_read_pixels(). viewport : the PgmViewport width : the width of the pixels area height : the height of the pixels area pixels : the pixels area that has been filled. It has been allocated by the application and must be freed by the application. user_data : user data set when the signal handler was connected. The <literal>"scroll-event"</literal> signal PgmViewport::scroll-eventvoid user_function (PgmViewport *viewport, PgmEvent *event, gpointer user_data) : Run Last Will be emitted on a mouse scroll on the viewport. viewport : the PgmViewport event : the PgmEventScroll user_data : user data set when the signal handler was connected. The <literal>"state-event"</literal> signal PgmViewport::state-eventvoid user_function (PgmViewport *viewport, PgmEvent *event, gpointer user_data) : Run Last Will be emitted when the state of viewport changes, being a visibility change, a fullscreen change or an iconification change. viewport : the PgmViewport event : the PgmEventState user_data : user data set when the signal handler was connected. The <literal>"update-pass"</literal> signal PgmViewport::update-passvoid user_function (PgmViewport *viewport, gpointer user_data) : Run Last Will be emitted prior to any rendering pass happening in the Pigment internal rendering thread. It is highly recommended to update all the Pigment drawables rendered by viewport in this signal. It ensures the best performance and rendering correctness since the object update pass will be completely synchronized prior to the rendering pass. Note that this is the only signal in Pigment which is emitted from another thread than the one of the Pigment main loop. viewport : the PgmViewport user_data : user data set when the signal handler was connected. See Also #PgmCanvas, PgmViewportFactory, PgmDrawable. pigment-0.3.17/docs/pgm/pigment-overrides.txt0000644000175000017500000000000011205034416016067 00000000000000pigment-0.3.17/docs/pgm/version-full.xml0000644000175000017500000000000711205034714015042 000000000000000.3.17 pigment-0.3.17/docs/pgm/html/0000777000175000017500000000000011205035140012720 500000000000000pigment-0.3.17/docs/pgm/html/filled_layout.png0000644000175000017500000000605111205035140016200 00000000000000PNG  IHDR`@4rbKGD pHYs  tIMEr IDATx\ml~vvvmAآ@EkӨB5 FIH`bP#LhQJ \?\ @)-QWÜs3'3;s3j.]]. f`|lY"L qBub1@NgA#33?|o1m0wn>n[Iࠎt\u.D0X ->pw'‹p؏ G=4Υ!¥KefCUS}fPf]HDߍ 1g,Z˥uuah \\P(cH22@Og bodI))I@wΟn{Da Ձ`p3:;vf4&OSCii+**jl>5 hoozz#(f̐7YácvZUA@O Nm@ Piz<7Fe1em٘ŋbQTB!{ A4f33zi6e幧vUV5SRưzxHO //bx8;6e pwʧmH7efoTUapL.ihiy$}fdՀ˨غCumUh6 gŽ 1J|Yfxx]8{6-9:o'zfq7㍛(,E[WW^~y'{<ƹsx5<5!# f$R%^xуڍ#G|9 ]];06,gϒ  FUEQe~{9:FGs,*TO*e?HINoooW8hQ=iBh4Jan׬@O9.IʟY]&CYge7g/̚3geeVDȨf+(D ~"2,gW7֢ddjK7ߚqR)%FQV7$X65rs`׮[(S@U6Y Wu`,xfhqG /Rz8EԙT$Z-Zd+(@mSOI;ƧАWF PS2g)9%U2qݽ{1돩6481<쵤dRՔhY6XJYY#݆?'ё{_Eww6`5eM!A+;BbQQ/>m,ZLރڝjjٳ嶃d1)}+D]{C̛G{P[U_S2eՑ,E_'%EÖ-+ėu45E\k |;) JdR_wy SUU _}?`-Y*X>=} >n6utP9)vjyPyڊGkc[&c/7e>QEj6؉D ۶ՠr8xp3kҊ (*cx_ 5: =Q xy֮6$goᰎ49~ׯg"AuYrrrQ<7_j4MGsspxfCT[i3nTUգb.5_GSS:NFg:,$P `⋸}XԏQL7yy7 )hkSBOOFFV7Ybp0 cc)4'Qb1EDN0rs##[̞=5sOSbٖk.iIENDB`pigment-0.3.17/docs/pgm/html/PgmImageSink.html0000644000175000017500000004265311205035140016047 00000000000000 PgmImageSink

PgmImageSink

PgmImageSink — A GStreamer image sink outputing frames to image drawables.

Object Hierarchy

  GObject
   +----GstObject
         +----GstElement
               +----GstBaseSink
                     +----GstVideoSink
                           +----PgmImageSink

Properties

  "events"                   PgmImageSinkEventMask  : Read / Write
  "image"                    PgmImage*             : Read / Write

Description

PgmImageSink is a GStreamer image sink element allowing to build GStreamer pipelines outputing frames directly to PgmImage.

You can explicitly use the pgm_image_sink_new() function to instanciate a new sink, but you can alos use the standard GStreamer functions using gst_element_factory_make() or gst_parse_launch(), the factory name of the sink being "pgmimagesink".

Internally, the sink is simply outputing GStreamer buffers (GstBuffer) to images (PgmImage) using the pgm_image_set_from_gst_buffer() function.

Last reviewed on 2008-01-28 (0.3.4)

Details

enum PgmImageSinkEventMask

typedef enum {
    PGM_IMAGE_SINK_MOTION   = (1 << 0),
    PGM_IMAGE_SINK_PRESSED  = (1 << 1),
    PGM_IMAGE_SINK_RELEASED = (1 << 2)
} PgmImageSinkEventMask;

The event mask flags.

PGM_IMAGE_SINK_MOTION

The motion event flag.

PGM_IMAGE_SINK_PRESSED

The pressed event flag.

PGM_IMAGE_SINK_RELEASED

The released event flag.

PgmImageSink

typedef struct _PgmImageSink PgmImageSink;

The opaque PgmImageSink data structure.


pgm_image_sink_new ()

GstElement *        pgm_image_sink_new                  (const gchar *name);

Creates a new image sink with the given name.

name :

the name of the new image sink.

Returns :

a new PgmImageSink.

pgm_image_sink_set_image ()

PgmError            pgm_image_sink_set_image            (PgmImageSink *sink,
                                                         PgmImage *image);

Sets image as the PgmImage object which will receive the frames (GstBuffer) outputed by sink.

MT Safe.

sink :

a PgmImageSink object.

image :

the PgmImage object.

Returns :

a PgmError indicating success/failure.

pgm_image_sink_get_image ()

PgmError            pgm_image_sink_get_image            (PgmImageSink *sink,
                                                         PgmImage **image);

Retrieves the PgmImage object in image which sink is using to output its frames (GstBuffer).

MT Safe.

sink :

a PgmImageSink object.

image :

a pointer to a PgmImage pointer where the image will be stored. Unref after usage.

Returns :

a PgmError indicating success/failure.

pgm_image_sink_set_events ()

PgmError            pgm_image_sink_set_events           (PgmImageSink *sink,
                                                         PgmImageSinkEventMask events);

Sets the mouse events interacting with the currently set image that will be sent upstream in the pipeline.

sink :

a PgmImageSink object.

events :

a PgmImageSinkEventMask.

Returns :

a PgmError indicating success/failure.

pgm_image_sink_get_events ()

PgmError            pgm_image_sink_get_events           (PgmImageSink *sink,
                                                         PgmImageSinkEventMask *events);

Retrieves in events the mouse events sent upstream in the pipeline.

sink :

a PgmImageSink object.

events :

a PgmImageSinkEventMask pointer where the event mask will be stored.

Returns :

a PgmError indicating success/failure.

Property Details

The "events" property

  "events"                   PgmImageSinkEventMask  : Read / Write

A PgmImageSinkEventMask specifying what input events should be sent upstream in the pipeline.


The "image" property

  "image"                    PgmImage*             : Read / Write

A PgmImage on which the sink output video frames.

See Also

#PgmImage
pigment-0.3.17/docs/pgm/html/pigment.devhelp0000644000175000017500000012257311205035140015662 00000000000000 pigment-0.3.17/docs/pgm/html/PgmCanvas.html0000644000175000017500000015576311205035140015422 00000000000000 PgmCanvas

PgmCanvas

PgmCanvas — A virtual positioning class for drawables.

Object Hierarchy

  GObject
   +----GstObject
         +----PgmCanvas

Signals

  "drawable-added"                                 : Run First
  "drawable-removed"                               : Run First
  "drawable-reordered"                             : Run First
  "regenerated"                                    : Run First
  "size-changed"                                   : Run First

Description

Canvas coordinates

A PgmCanvas object is used as a virtual positioning system for the PgmDrawable. It provides Pigment users (application developers using the library) a very simple and flexible way to build their user interface without having to worry about visual rendering problems such as non square pixels, aspect ratio of images or videos, keeping proportional alignment or spacing between objects when resizing, etc.

The origin of the canvas coordinate system corresponds to the upper-left corner. A canvas can only understand canvas coordinates, and those coordinates have nothing to do with pixels. This is why the methods you can call on a canvas always use coordinates with floating numbers. Let's say you want to draw a user interface with an aspect ratio of 16:9 (which is nice to do on most wide screen TV of the market). In that case you would for example set the canvas size to width 16.0 and height 9.0. Every coordinate and size of the drawables you are going to put on the canvas will use the same coordinate system. So, if you wanted to put an image in the middle of the user interface you would compute its position so that its center is at (8.0, 4.5) on the canvas. You would also define the size of that image using values of the same scale. For example, the width of the image could be 1.0 and its height 1.0 thus making appear as a square.

A canvas is never drawn directly which is why you can use abstract coordinates to place objects on it. Also, since it is using floating numbers there is no limit in precision. At some point we still need to have a visual representation of what is on the canvas, this is what PgmViewport does. A canvas can be projected on 0 to n viewport.

It is entirely the application's responsibility to decide how many drawables are going to be drawn on the canvas and their size. Using the viewport information the application can decide which aspect ratio to use and how many drawables can fit on the canvas while still being easily readable. If for example the end user (user interface user) steps away from the monitor and cannot read the text the application can just make the drawables bigger on the canvas which will automatically get reprojected onto the viewport.

When adding a drawable to a canvas you have to choose a PgmDrawableLayer in which that drawable will be stored. The three layers are used to handle a first control on the drawing order. The first layer drawn is the PGM_DRAWABLE_FAR one, all the drawables inside this layer will appear behind the two others. The second layer drawn is the PGM_DRAWABLE_MIDDLE one, the drawables inside this layer will be drawn over the PGM_DRAWABLE_FAR layer and behind the PGM_DRAWABLE_NEAR layer. The third layer drawn is the PGM_DRAWABLE_NEAR one, all the drawables inside this layer will be drawn over the two others. This is useful to make sure that dialog is shown on top of all the other objects for example or to make sure that no object is going to go behind the background. Drawables inside a layer are automatically ordered by Pigment depending on their z coordinate set through pgm_drawable_set_position(). Pigment also provides a way to reorder drawables inside a layer that have the same z coordinate thanks to the pgm_canvas_set_order() function.

When a drawable is created it has a floating reference, when you add it to the canvas, the canvas takes a reference to that drawable and sink the object reference. That means that the canvas now owns the drawable reference and you do not need to unref the drawable when cleaning up your objects. Just unrefing the canvas is going to cleanup all the drawables that were added to it. Here is an example:

Example 3. Create a canvas, add drawables, unref the canvas

PgmCanvas *canvas = pgm_canvas_new ();
PgmDrawable *drb1 = pgm_text_new ("hello world");
PgmDrawable *drb2 = pgm_image_new_from_fd (fd, 1024);
PgmDrawable *drb3 = pgm_image_new_from_image (drb2);
 
pgm_canvas_add_many (canvas, PGM_DRAWABLE_MIDDLE, drb1, drb2, drb3, NULL);
gst_object_unref (canvas); // Unref canvas, drb1, drb2 and drb3


The drawable-added signal is fired whenever a new drawable is added to the canvas. Likewise the drawable-removed signal is fired whenever an drawable is removed from the canvas. The drawable-reordered signal is fired whenever a drawable is reordered inside the canvas.

Last reviewed on 2007-08-03 (0.3.0)

Details

PgmCanvas

typedef struct {
  /* Layer lists */
  GList *far_layer;
  GList *middle_layer;
  GList *near_layer;

  /* Canvas size */
  gfloat width, height;

  /* Pixel offsets */
  gfloat pixel_offset_x, pixel_offset_y;

  /* Mask of supported formats */
  gulong pixel_formats;
} PgmCanvas;

The PgmCanvas structure.

GList *far_layer;

the list of PgmDrawable in the PGM_DRAWABLE_FAR layer.

GList *middle_layer;

the list of PgmDrawable in the PGM_DRAWABLE_MIDDLE layer.

GList *near_layer;

the list of PgmDrawable in the PGM_DRAWABLE_NEAR layer.

gfloat width;

the canvas width.

gfloat height;

the canvas height.

gfloat pixel_offset_x;

the pixel offset on x.

gfloat pixel_offset_y;

the pixel offset on y.

gulong pixel_formats;

the pixel formats mask.

pgm_canvas_new ()

PgmCanvas *         pgm_canvas_new                      (void);

Creates a new PgmCanvas instance.

MT safe.

Returns :

a new PgmCanvas instance.

pgm_canvas_set_size ()

PgmError            pgm_canvas_set_size                 (PgmCanvas *canvas,
                                                         gfloat width,
                                                         gfloat height);

Sets the width and height size of canvas. These values are not supposed to be pixels. You are strongly encouraged to use abstract coordinates such as 16.0x9.0 for a 16:9 interface or 4.0x3.0 for a 4:3 one, etc.

MT safe.

canvas :

a PgmCanvas object.

width :

the canvas width.

height :

the canvas height.

Returns :

a PgmError indicating success/failure.

pgm_canvas_get_size ()

PgmError            pgm_canvas_get_size                 (PgmCanvas *canvas,
                                                         gfloat *width,
                                                         gfloat *height);

Retrieves width and height size of canvas in width and height.

MT safe.

canvas :

a PgmCanvas object.

width :

a pointer to a gfloat where the canvas width is going to be stored.

height :

a pointer to a gfloat where the canvas height is going to be stored.

Returns :

a PgmError indicating success/failure.

pgm_canvas_add ()

PgmError            pgm_canvas_add                      (PgmCanvas *canvas,
                                                         PgmDrawableLayer layer,
                                                         PgmDrawable *drawable);

Adds drawable to canvas in layer. Both canvas and drawable reference counts will be increased by one as they are linking to each other. drawable reference will be sink as well so if the object reference was floating it now belongs to canvas and you don't have to unref drawable when cleaning up your objects.

MT safe.

canvas :

a PgmCanvas object.

layer :

a PgmDrawableLayer to add drawable into.

drawable :

the PgmDrawable object to add.

Returns :

a PgmError indicating success/failure.

pgm_canvas_remove ()

PgmError            pgm_canvas_remove                   (PgmCanvas *canvas,
                                                         PgmDrawable *drawable);

Removes drawable from canvas. Both canvas and drawable reference counts will be decreased by one as they were referencing each other. In most cases that means that drawable is going to be destroyed because canvas owned the only reference to it. If you want to reuse drawable in another canvas or in another layer you need to take a reference to it before removing it from canvas.

MT safe.

canvas :

a PgmCanvas object.

drawable :

the PgmDrawable object to remove.

Returns :

a PgmError indicating success/failure.

pgm_canvas_add_many ()

PgmError            pgm_canvas_add_many                 (PgmCanvas *canvas,
                                                         PgmDrawableLayer layer,
                                                         PgmDrawable *drawable_1,
                                                         ...);

Adds a NULL-terminated list of drawables to canvas. This function is equivalent to calling pgm_canvas_add() for each member of the list.

MT safe.

canvas :

a PgmCanvas object.

layer :

a PgmDrawableLayer to add the drawables into.

drawable_1 :

the PgmDrawable object to add.

... :

additional PgmDrawable objects to add.

Returns :

a PgmError indicating success/failure.

pgm_canvas_remove_many ()

PgmError            pgm_canvas_remove_many              (PgmCanvas *canvas,
                                                         PgmDrawable *drawable_1,
                                                         ...);

Removes a NULL-terminated list of drawables from canvas. This function is equivalent to calling pgm_canvas_remove() for each member of the list.

MT safe.

canvas :

a PgmCanvas object.

drawable_1 :

the PgmDrawable object to remove.

... :

additional PgmDrawable objects to remove.

Returns :

a PgmError indicating success/failure.

pgm_canvas_set_order ()

PgmError            pgm_canvas_set_order                (PgmCanvas *canvas,
                                                         PgmDrawable *drawable,
                                                         gint order);

Defines the ordering of drawable in its layer at position order. Since drawables are ordered function of their z coordinate, set through pgm_drawable_set_position(), this function is only useful if you want to reorder drawables at the same z coordinate. If you try to reorder a drawable inside a layer at an order where the current drawable doesn't have the same z coordinate, the function will do nothing and return an error.

MT safe.

canvas :

a PgmCanvas object.

drawable :

the PgmDrawable to reorder.

order :

the new position of drawable.

Returns :

a PgmError indicating success/failure.

pgm_canvas_get_order ()

PgmError            pgm_canvas_get_order                (PgmCanvas *canvas,
                                                         PgmDrawable *drawable,
                                                         PgmDrawableLayer *layer,
                                                         gint *order);

Retrieves the layering of drawable.

MT safe.

canvas :

a PgmCanvas object.

drawable :

the PgmDrawable to retrieve the layering.

layer :

a pointer to a PgmDrawableLayer in which drawable layer is going to be stored.

order :

a pointer to a gint in which the position of drawable in the layer is going to be stored.

Returns :

a PgmError indicating success/failure.

pgm_canvas_get_layer_count ()

PgmError            pgm_canvas_get_layer_count          (PgmCanvas *canvas,
                                                         PgmDrawableLayer layer,
                                                         gint *count);

Retrieves the number of drawables in layer.

MT safe.

canvas :

a PgmCanvas object.

layer :

the PgmDrawableLayer to retrieve the size.

count :

a pointer to a gint in which the number of drawables in layer is going to be stored.

Returns :

a PgmError indicating success/failure.

pgm_canvas_regenerate ()

PgmError            pgm_canvas_regenerate               (PgmCanvas *canvas);

Affects all the drawables of the canvas which need to be displayed at a fixed size. It regenerates those rasterized pixmaps which have been affected by the canvas projection.

MT safe.

canvas :

a PgmCanvas object.

Returns :

a PgmError indicating success/failure.

pgm_canvas_get_pixel_formats ()

PgmError            pgm_canvas_get_pixel_formats        (PgmCanvas *canvas,
                                                         gulong *pixel_formats);

Gets the list of the supported pixel formats by canvas. This is the intersection of the pixel formats supported by the viewports to which canvas is bound.

MT safe.

canvas :

a PgmCanvas object.

pixel_formats :

a pointer to a gulong where the mask of supported PgmImagePixelFormat is going to be stored.

Returns :

a PgmError indicating success/failure.

pgm_canvas_get_pixel_offsets ()

PgmError            pgm_canvas_get_pixel_offsets        (PgmCanvas *canvas,
                                                         gfloat *x,
                                                         gfloat *y);

Gets the x and y ratios corresponding to the offsets in canvas coordinates between two pixels at z=0.

canvas :

a PgmCanvas object.

x :

a pointer to a gfloat where the x pixel offset is going to be stored.

y :

a pointer to a gfloat where the y pixel offset is going to be stored.

Returns :

a PgmError indicating success/failure.

Signal Details

The "drawable-added" signal

void                user_function                      (PgmCanvas       *canvas,
                                                        PgmDrawable     *drawable,
                                                        PgmDrawableLayer layer,
                                                        gint             order,
                                                        gpointer         user_data)      : Run First

Will be emitted after drawable was added to canvas.

canvas :

the PgmCanvas

drawable :

the PgmDrawable that was added to canvas

layer :

the PgmDrawableLayer in which drawable was added

order :

the order in layer in which drawable was added

user_data :

user data set when the signal handler was connected.

The "drawable-removed" signal

void                user_function                      (PgmCanvas       *canvas,
                                                        PgmDrawable     *drawable,
                                                        PgmDrawableLayer layer,
                                                        gpointer         user_data)      : Run First

Will be emitted after drawable was removed from canvas.

canvas :

the PgmCanvas

drawable :

the PgmDrawable that was removed from canvas

layer :

the PgmDrawableLayer from which drawable was removed

user_data :

user data set when the signal handler was connected.

The "drawable-reordered" signal

void                user_function                      (PgmCanvas       *canvas,
                                                        PgmDrawable     *drawable,
                                                        PgmDrawableLayer layer,
                                                        gint             order,
                                                        gpointer         user_data)      : Run First

Will be emitted after drawable was reordered in canvas.

canvas :

the PgmCanvas

drawable :

the PgmDrawable that was reordered in canvas

layer :

the PgmDrawableLayer in which drawable was reordered

order :

the new order of drawable

user_data :

user data set when the signal handler was connected.

The "regenerated" signal

void                user_function                      (PgmCanvas *canvas,
                                                        gpointer   user_data)      : Run First

Will be emitted after canvas received a regeneration request.

canvas :

the PgmCanvas

user_data :

user data set when the signal handler was connected.

The "size-changed" signal

void                user_function                      (PgmCanvas *canvas,
                                                        gpointer   user_data)      : Run First

Will be emitted after canvas size was changed.

canvas :

the PgmCanvas

user_data :

user data set when the signal handler was connected.

See Also

#PgmViewport, PgmDrawable.
pigment-0.3.17/docs/pgm/html/pgm-compiling.html0000644000175000017500000000664111205035140016273 00000000000000 Compiling Pigment Applications

Compiling Pigment Applications

Compiling Pigment Applications — Compile your Pigment applications.

Compiling Pigment Applications on UNIX

To compile a Pigment application, you need to tell the compiler where to find the Pigment header files and libraries. This is done with the pkg-config utility.

The following interactive shell session demonstrates how pkg-config is used (the actual output on your system may be different):

$ pkg-config --cflags pigment-0.3

 -I/usr/include/pigment-0.3

$ pkg-config --libs pigment-0.3

 -L/usr/lib -lpigment-0.3

The simplest way to compile a program is to use the "backticks" feature of the shell. If you enclose a command in backticks (not single quotes), then its output will be substituted into the command line before execution. So to compile a Pigment "Hello World", you would type the following:

$ cc `pkg-config --cflags --libs pigment-0.3
` hello.c -o hello

pigment-0.3.17/docs/pgm/html/pigment-overview.html0000644000175000017500000000502411205035140017032 00000000000000 Part I. Pigment Overview

Part I. Pigment Overview

How to use and develop Pigment applications.

Table of Contents

Compiling Pigment Applications — Compile your Pigment applications.
Running Pigment Applications — Run and debug your Pigment applications.
pigment-0.3.17/docs/pgm/html/index.sgml0000644000175000017500000013171511205035140014637 00000000000000 pigment-0.3.17/docs/pgm/html/PgmImage.html0000644000175000017500000041121511205035140015214 00000000000000 PgmImage

PgmImage

PgmImage — An image drawable supporting various media.

Synopsis


#include <pgm/pgm.h>

enum                PgmImageAlignment;
enum                PgmImageLayoutType;
enum                PgmImageInterpType;
enum                PgmImageWrapping;
enum                PgmImagePixelFormat;
                    PgmImageFile;
                    PgmImageBuffer;
                    PgmImageGstBuffer;
                    PgmImageSystemBuffer;
                    PgmImagePixbuf;
enum                PgmImageStorageType;
union               PgmImageData;
                    PgmImage;
PgmDrawable *       pgm_image_new                       (void);
PgmDrawable *       pgm_image_new_from_file             (const gchar *filename,
                                                         guint max_size);
PgmDrawable *       pgm_image_new_from_pixbuf           (GdkPixbuf *pixbuf);
PgmDrawable *       pgm_image_new_from_buffer           (PgmImagePixelFormat format,
                                                         guint width,
                                                         guint height,
                                                         guint stride,
                                                         guint size,
                                                         gconstpointer data);
PgmDrawable *       pgm_image_new_from_image            (PgmImage *src_image);
PgmError            pgm_image_set_from_file             (PgmImage *image,
                                                         const gchar *filename,
                                                         guint max_size);
PgmError            pgm_image_set_from_pixbuf           (PgmImage *image,
                                                         GdkPixbuf *pixbuf);
PgmError            pgm_image_set_from_buffer           (PgmImage *image,
                                                         PgmImagePixelFormat format,
                                                         guint width,
                                                         guint height,
                                                         guint stride,
                                                         guint size,
                                                         gconstpointer data);
PgmError            pgm_image_set_from_gst_buffer       (PgmImage *image,
                                                         PgmImagePixelFormat format,
                                                         guint width,
                                                         guint height,
                                                         guint stride,
                                                         GstBuffer *buffer);
PgmError            pgm_image_set_from_system_buffer    (PgmImage *image,
                                                         PgmImagePixelFormat format,
                                                         guint width,
                                                         guint height,
                                                         gconstpointer system_buffer);
PgmError            pgm_image_set_from_image            (PgmImage *image,
                                                         PgmImage *src_image);
PgmError            pgm_image_to_pixbuf                 (PgmImage *image,
                                                         GdkPixbuf **pixbuf);
PgmError            pgm_image_clear                     (PgmImage *image);
PgmError            pgm_image_get_storage_type          (PgmImage *image,
                                                         PgmImageStorageType *storage);
PgmError            pgm_image_system_buffer_lock        (PgmImage *image);
PgmError            pgm_image_system_buffer_unlock      (PgmImage *image);
PgmError            pgm_image_set_mapping_matrix        (PgmImage *image,
                                                         PgmMat4x4 *mapping_matrix);
PgmError            pgm_image_get_mapping_matrix        (PgmImage *image,
                                                         PgmMat4x4 **mapping_matrix);
PgmError            pgm_image_set_alignment             (PgmImage *image,
                                                         PgmImageAlignment align);
PgmError            pgm_image_get_alignment             (PgmImage *image,
                                                         PgmImageAlignment *align);
PgmError            pgm_image_set_layout                (PgmImage *image,
                                                         PgmImageLayoutType layout);
PgmError            pgm_image_get_layout                (PgmImage *image,
                                                         PgmImageLayoutType *layout);
PgmError            pgm_image_set_interp                (PgmImage *image,
                                                         PgmImageInterpType interp);
PgmError            pgm_image_get_interp                (PgmImage *image,
                                                         PgmImageInterpType *interp);
PgmError            pgm_image_set_wrapping              (PgmImage *image,
                                                         PgmImageWrapping wrap_s,
                                                         PgmImageWrapping wrap_t);
PgmError            pgm_image_get_wrapping              (PgmImage *image,
                                                         PgmImageWrapping *wrap_s,
                                                         PgmImageWrapping *wrap_t);
PgmError            pgm_image_set_aspect_ratio          (PgmImage *image,
                                                         guint numerator,
                                                         guint denominator);
PgmError            pgm_image_get_aspect_ratio          (PgmImage *image,
                                                         guint *numerator,
                                                         guint *denominator);
PgmError            pgm_image_set_border_width          (PgmImage *image,
                                                         gfloat width);
PgmError            pgm_image_get_border_width          (PgmImage *image,
                                                         gfloat *width);
PgmError            pgm_image_set_border_inner_color    (PgmImage *image,
                                                         guchar red,
                                                         guchar green,
                                                         guchar blue,
                                                         guchar alpha);
PgmError            pgm_image_get_border_inner_color    (PgmImage *image,
                                                         guchar *red,
                                                         guchar *green,
                                                         guchar *blue,
                                                         guchar *alpha);
PgmError            pgm_image_set_border_outer_color    (PgmImage *image,
                                                         guchar red,
                                                         guchar green,
                                                         guchar blue,
                                                         guchar alpha);
PgmError            pgm_image_get_border_outer_color    (PgmImage *image,
                                                         guchar *red,
                                                         guchar *green,
                                                         guchar *blue,
                                                         guchar *alpha);
PgmError            pgm_image_from_drawable             (PgmImage *image,
                                                         gint *x_image,
                                                         gint *y_image,
                                                         gfloat x_drawable,
                                                         gfloat y_drawable);
PgmError            pgm_image_to_drawable               (PgmImage *image,
                                                         gfloat *x_drawable,
                                                         gfloat *y_drawable,
                                                         gint x_image,
                                                         gint y_image);

Object Hierarchy

  GObject
   +----GstObject
         +----PgmDrawable
               +----PgmImage

Signals

  "cloned"                                         : Run First
  "file-loaded"                                    : Run First
  "un-cloned"                                      : Run First

Description

Loading image data

PgmImage is a drawable displaying media. It supports various ways of loading images through buffers, file paths or videos through GStreamer.

Image data loading can happen with three different functions:

  • pgm_image_set_from_buffer() takes a pre-loaded data buffer and sets it as the currently displayed image. This is useful when you want to use an image loading library (GdkPixbuf, FreeImage, etc) in your application and just provide the pixels to PgmImage for display. The data buffer containing the pixels is copied internally, you can free the data buffer from the application side as soon as the function returns.

  • pgm_image_set_from_gst_buffer() takes a GStreamer GstBuffer and sets it as the currently displayed image. This is mostly used to do video rendering. There's no copying of the buffer data to optimize performances, indeed the reference count of the buffer is going to be increased to keep the buffer around while it's needed for rendering. When you call pgm_image_clear() the reference to the buffer will be decreased and the buffer can get freed. Note that this method is used by PgmSink to render video frames directly in a PgmImage when the pipeline is playing.

  • pgm_image_set_from_file() takes a path to an image file delegating image loading to Pigment. Thus the loading is asynchronous and won't block the Pigment main loop.

pgm_image_set_from_image() is a convenient system to slave an image to another one. Indeed you might want to load an image data once and then use it in multiple image objects. In that case this image becomes a slave to the one that has the image data loaded internally and each time it needs to draw it will use that data.

Layout settings of the drawable are independent from one image to another. That means that even if two image objects are using the same image, they can have different colors, different PgmDrawableLayoutType or different PgmDrawableAlignment.

Each time a new image data buffer is loaded in the master image object, all the slave image objects are automatically updated. That means you can render a video clip in ten different drawables without doing anything else than slaving nine image objects to the one that's receiving the image data.

This rarely happens with normal images but video rendering often has non square pixels video frames coming out of the video decoders (DVD, DV cameras, etc). In that case a calculation has to be done when projecting to the viewport so that we put in adequation both the pixel aspect ratio and the source video aspect ratio. You can set the image aspect ratio using pgm_image_set_aspect_ratio() and be assured that Pigment is going to render that image correctly on the viewport.

Depending on the viewport implementation, some PgmImagePixelFormat (color space) can be supported or not. When it comes to video rendering, hardware acceleration is very important and you need to know what kind of pixel formats are convenient for the rendering backend. you can get a list of supported (accelerated) pixel formats using pgm_viewport_get_pixel_formats().

Last reviewed on 2007-11-08 (0.3.2)

Details

enum PgmImageAlignment

typedef enum {
  PGM_IMAGE_LEFT          = (1 << 0),
  PGM_IMAGE_CENTER        = (1 << 1),
  PGM_IMAGE_RIGHT         = (1 << 2),
  PGM_IMAGE_TOP           = (1 << 3),
  PGM_IMAGE_BOTTOM        = (1 << 4),
  PGM_IMAGE_TOP_LEFT      = (PGM_IMAGE_TOP | PGM_IMAGE_LEFT),
  PGM_IMAGE_TOP_CENTER    = (PGM_IMAGE_TOP | PGM_IMAGE_CENTER),
  PGM_IMAGE_TOP_RIGHT     = (PGM_IMAGE_TOP | PGM_IMAGE_RIGHT),
  PGM_IMAGE_BOTTOM_LEFT   = (PGM_IMAGE_BOTTOM | PGM_IMAGE_LEFT),
  PGM_IMAGE_BOTTOM_CENTER = (PGM_IMAGE_BOTTOM | PGM_IMAGE_CENTER),
  PGM_IMAGE_BOTTOM_RIGHT  = (PGM_IMAGE_BOTTOM | PGM_IMAGE_RIGHT)
} PgmImageAlignment;

The possible alignments you can combine.

PGM_IMAGE_LEFT

Align to the left.

PGM_IMAGE_CENTER

Align to the center (both vertically and horizontally).

PGM_IMAGE_RIGHT

Align to the right.

PGM_IMAGE_TOP

Align to the top.

PGM_IMAGE_BOTTOM

Align to the bottom.

PGM_IMAGE_TOP_LEFT

Align to the top left.

PGM_IMAGE_TOP_CENTER

Align to the top center.

PGM_IMAGE_TOP_RIGHT

Align to the top right.

PGM_IMAGE_BOTTOM_LEFT

Align to the bottom left.

PGM_IMAGE_BOTTOM_CENTER

Align to the bottom center.

PGM_IMAGE_BOTTOM_RIGHT

Align to the bottom right.

enum PgmImageLayoutType

typedef enum {
  PGM_IMAGE_FILLED   = 0,
  PGM_IMAGE_SCALED   = 1,
  PGM_IMAGE_ZOOMED   = 2,
  PGM_IMAGE_CENTERED = 3,
  PGM_IMAGE_TILED    = 4
} PgmImageLayoutType;

The different layout types.

PGM_IMAGE_FILLED

Scales the stored image to the whole drawable size ignoring the pixel-aspect-ratio.

PGM_IMAGE_SCALED

Scales the stored image to adapt its size to the drawable one keeping the pixel-aspect-ratio.

PGM_IMAGE_ZOOMED

Scales the stored image to the whole drawable size keeping the pixel-aspect-ratio. It crops the border of the stored image.

PGM_IMAGE_CENTERED

Centers the stored image in the middle of the drawable keeping the pixel-aspect-ratio. It crops the image if its size is bigger than the drawable size.

PGM_IMAGE_TILED

Repeats the stored image along the drawable.

enum PgmImageInterpType

typedef enum {
  PGM_IMAGE_NEAREST,
  PGM_IMAGE_BILINEAR
} PgmImageInterpType;

The different image interpolation types.

PGM_IMAGE_NEAREST

The nearest neighbour sampling is the fastest and lowest quality mode.

PGM_IMAGE_BILINEAR

The bilinear sampling is the slowest and highest quality mode.

enum PgmImageWrapping

typedef enum {
  PGM_IMAGE_CLAMP,
  PGM_IMAGE_TRANSPARENT,
  PGM_IMAGE_REPEAT
} PgmImageWrapping;

The different image wrapping types.

PGM_IMAGE_CLAMP

The image content is displayed in the mapping range [0.0, 1.0] and clamped to the last pixel outside it.

PGM_IMAGE_TRANSPARENT

The image content is displayed in the mapping range [0.0, 1.0] and discarded outside it. Can be used in combination with the PGM_IMAGE_BILINEAR filtering to antialias the edges of images.

PGM_IMAGE_REPEAT

The image content is displayed in the mapping range [0.0, 1.0] and repeated infinitely outside it.

enum PgmImagePixelFormat

typedef enum {
  PGM_IMAGE_RGB  = (1 << 0),
  PGM_IMAGE_BGR  = (1 << 1),
  PGM_IMAGE_RGBA = (1 << 2),
  PGM_IMAGE_BGRA = (1 << 3),
  PGM_IMAGE_I420 = (1 << 4),
  PGM_IMAGE_YV12 = (1 << 5),
  PGM_IMAGE_UYVY = (1 << 6),
  PGM_IMAGE_YUYV = (1 << 7)
} PgmImagePixelFormat;

The different image pixel formats.

PGM_IMAGE_RGB

24 bits RGB (3 bytes, red 8 @ 16, green 8 @ 8, blue 8 @ 0).

PGM_IMAGE_BGR

24 bits BGR (3 bytes, blue 8 @ 16, green 8 @ 8, red 8 @ 0).

PGM_IMAGE_RGBA

32 bits RGBA (4 bytes, red 8 @ 24, green 8 @ 16, blue 8 @ 8, alpha 8 @ 0).

PGM_IMAGE_BGRA

32 bits BGRA (4 bytes, blue 8 @ 24, green 8 @ 16, red 8 @ 8, alpha 8 @ 0).

PGM_IMAGE_I420

12 bits YUV (8 bits Y plane followed by 8 bits quarter size U/V planes).

PGM_IMAGE_YV12

12 bits YUV (8 bits Y plane followed by 8 bits quarter size V/U planes).

PGM_IMAGE_UYVY

16 bits YUV (4 bytes / 2 pixels, macropixel contains YCbYCr [31:0]).

PGM_IMAGE_YUYV

16 bits YUV (4 bytes / 2 pixels, macropixel contains CbYCrY [31:0], duplicate of YUY2).

PgmImageFile

typedef struct {
  GdkPixbuf *pixbuf;
  gchar     *filename;
  guint      width;
  guint      height;
} PgmImageFile;

The PgmImageFile structure.

GdkPixbuf *pixbuf;

the GdkPixbuf object.

gchar *filename;

the file name.

guint width;

the cached pixbuf width.

guint height;

the cached pixbuf height.

PgmImageBuffer

typedef struct {
  guint8              *buffer;
  PgmImagePixelFormat  format;
  guint                width;
  guint                height;
  guint                stride;
  guint                size;
} PgmImageBuffer;

The PgmImageBuffer structure.

guint8 *buffer;

the buffer pointer.

PgmImagePixelFormat format;

the buffer format.

guint width;

the buffer width.

guint height;

the buffer height.

guint stride;

the buffer stride.

guint size;

the buffer size.

PgmImageGstBuffer

typedef struct {
  GstBuffer           *gst_buffer;
  PgmImagePixelFormat  format;
  guint                width;
  guint                height;
  guint                stride;
} PgmImageGstBuffer;

The PgmImageGstBuffer structure.

GstBuffer *gst_buffer;

the GstBuffer object.

PgmImagePixelFormat format;

the GstBuffer format.

guint width;

the GstBuffer width.

guint height;

the GstBuffer height.

guint stride;

the GstBuffer stride.

PgmImageSystemBuffer

typedef struct {
  gconstpointer       system_buffer;
  PgmImagePixelFormat format;
  guint               width;
  guint               height;
} PgmImageSystemBuffer;

The PgmImageSystemBuffer structure.

gconstpointer system_buffer;

the system buffer pointer.

PgmImagePixelFormat format;

the system buffer format.

guint width;

the system buffer width.

guint height;

the system buffer height.

PgmImagePixbuf

typedef struct {
  GdkPixbuf *pixbuf;
} PgmImagePixbuf;

The PgmImagePixbuf structure.

GdkPixbuf *pixbuf;

the GdkPixbuf object.

enum PgmImageStorageType

typedef enum {
  PGM_IMAGE_EMPTY,
  PGM_IMAGE_FILE,
  PGM_IMAGE_BUFFER,
  PGM_IMAGE_GST_BUFFER,
  PGM_IMAGE_PIXBUF,
  PGM_IMAGE_IMAGE,
  PGM_IMAGE_SYSTEM_BUFFER
} PgmImageStorageType;

The different storage type.

PGM_IMAGE_EMPTY

no image stored.

PGM_IMAGE_FILE

a PgmImageFile is stored.

PGM_IMAGE_BUFFER

a PgmImageBuffer is stored.

PGM_IMAGE_GST_BUFFER

a PgmImageGstBuffer is stored.

PGM_IMAGE_PIXBUF

a PgmImagePixbuf is stored.

PGM_IMAGE_IMAGE

a PgmImage is stored.

PGM_IMAGE_SYSTEM_BUFFER

a PgmImageSystemBuffer is stored.

union PgmImageData

union PgmImageData {
  PgmImageFile         file;
  PgmImageBuffer       buffer;
  PgmImageGstBuffer    gst_buffer;
  PgmImagePixbuf       pixbuf;
  PgmImageSystemBuffer system_buffer;
};

The stored data depending on the storage type.


PgmImage

typedef struct {
  /* Slavery handling */
  PgmImage *master;
  GList    *slaves;

  PgmMat4x4 *mapping_matrix;

  /* Image storage */
  PgmImageStorageType storage_type;
  PgmImageData data;

  /* Image displaying properties */
  PgmImageLayoutType  layout;
  PgmImageAlignment   align;
  PgmImageInterpType  interp;
  PgmImageWrapping    wrap_s;
  PgmImageWrapping    wrap_t;
  guint               par_n, par_d;

  /* Image border */
  gfloat border_width;
  guchar border_inner_r;
  guchar border_inner_g;
  guchar border_inner_b;
  guchar border_inner_a;
  guchar border_outer_r;
  guchar border_outer_g;
  guchar border_outer_b;
  guchar border_outer_a;
} PgmImage;

The PgmImage structure.

PgmImage *master;

the image PgmImage master.

GList *slaves;

the image list of PgmImage slaves.

PgmMat4x4 *mapping_matrix;

the image mapping matrix.

PgmImageStorageType storage_type;

the currently stored image type.

PgmImageData data;

the image data depending on the type.

PgmImageLayoutType layout;

the image layout.

PgmImageAlignment align;

the image alignment.

PgmImageInterpType interp;

the image interpolation.

PgmImageWrapping wrap_s;

the image s wrapping.

PgmImageWrapping wrap_t;

the image t wrapping.

guint par_n;

the image pixel-aspect-ratio numerator.

guint par_d;

the image pixel-aspect-ratio denominator.

gfloat border_width;

the image border width.

guchar border_inner_r;

the image border outer red color.

guchar border_inner_g;

the image border outer green color.

guchar border_inner_b;

the image border outer blue color.

guchar border_inner_a;

the image border outer alpha color.

guchar border_outer_r;

the image border outer red color.

guchar border_outer_g;

the image border outer green color.

guchar border_outer_b;

the image border outer blue color.

guchar border_outer_a;

the image border outer alpha color.

pgm_image_new ()

PgmDrawable *       pgm_image_new                       (void);

Creates a new PgmImage instance.

MT safe.

Returns :

a new PgmImage instance.

pgm_image_new_from_file ()

PgmDrawable *       pgm_image_new_from_file             (const gchar *filename,
                                                         guint max_size);

Creates a new PgmImage instance loading an image from the given filename. It optionally pre-scales the image so that it has a maximum width and height of max_size.

The loading is done asynchronously, it means that this function returns right after the image object is created, the loading and decoding of the image being done in another thread. The 'file-loaded' signal is emitted from the Pigment main loop (the thread running pgm_main() or the thread running a GMainLoop using the default GMainContext) once the loading finishes successfully.

MT safe.

filename :

the filename.

max_size :

the maximum size of the image in pixels before loading it in the PgmImage or 0 to not constrain the size.

Returns :

a new PgmImage instance.

pgm_image_new_from_pixbuf ()

PgmDrawable *       pgm_image_new_from_pixbuf           (GdkPixbuf *pixbuf);

Creates a new PgmImage instance using pixbuf as stored image.

MT safe.

pixbuf :

the GdkPixbuf.

Returns :

a new PgmImage instance.

pgm_image_new_from_buffer ()

PgmDrawable *       pgm_image_new_from_buffer           (PgmImagePixelFormat format,
                                                         guint width,
                                                         guint height,
                                                         guint stride,
                                                         guint size,
                                                         gconstpointer data);

Creates a new PgmImage instance with the image from the given buffer.

MT safe.

format :

the pixel format of the buffer.

width :

the image width in pixels.

height :

the image height in pixels.

stride :

the image rowstride in bytes (number of bytes per line).

size :

the buffer size in bytes.

data :

a pointer to the data buffer.

Returns :

a new PgmImage instance.

pgm_image_new_from_image ()

PgmDrawable *       pgm_image_new_from_image            (PgmImage *src_image);

Creates a new PgmImage instance with an image slaved from the image of src_image.

MT safe.

src_image :

a PgmImage which will be used as the master image.

Returns :

a new PgmImage instance.

pgm_image_set_from_file ()

PgmError            pgm_image_set_from_file             (PgmImage *image,
                                                         const gchar *filename,
                                                         guint max_size);

Loads an image from the file filename. It optionally pre-scales the image so it has a maximum width and height of max_size.

The loading is done asynchronously, it means that this function returns right after the image object is created, the loading and decoding of the image being done in another thread. The 'pixbuf-loaded' signal is emitted from the Pigment main loop (the thread running pgm_main() or the thread running a GMainLoop using the default GMainContext) once the loading finishes successfully.

MT safe.

image :

a PgmImage object.

filename :

a filename.

max_size :

the maximum size of the image in pixels before loading it in the PgmImage or 0 to not constrain the size.

Returns :

a PgmError indicating success/failure.

pgm_image_set_from_pixbuf ()

PgmError            pgm_image_set_from_pixbuf           (PgmImage *image,
                                                         GdkPixbuf *pixbuf);

Loads an image in image from a pixbuf. pixbuf will have its reference count increased by 1 and will not get freed until the drawable gets cleaned up or that a new buffer is loaded.

MT safe.

image :

a PgmImage object.

pixbuf :

the GdkPixbuf.

Returns :

a PgmError indicating success/failure.

pgm_image_set_from_buffer ()

PgmError            pgm_image_set_from_buffer           (PgmImage *image,
                                                         PgmImagePixelFormat format,
                                                         guint width,
                                                         guint height,
                                                         guint stride,
                                                         guint size,
                                                         gconstpointer data);

Loads an image in image from an existing buffer using pixel format format. If you don't know the rowstride of the image you can set stride to 0. data is copied internally you can free it right after the function call returns.

MT safe.

image :

a PgmImage object.

format :

the pixel format of the buffer.

width :

the image width in pixels.

height :

the image height in pixels.

stride :

the rowstride of the image in bytes (number of bytes per line).

size :

the buffer size in bytes.

data :

a pointer to the data buffer.

Returns :

a PgmError indicating success/failure.

pgm_image_set_from_gst_buffer ()

PgmError            pgm_image_set_from_gst_buffer       (PgmImage *image,
                                                         PgmImagePixelFormat format,
                                                         guint width,
                                                         guint height,
                                                         guint stride,
                                                         GstBuffer *buffer);

Loads an image in image from an existing GstBuffer using the pixel format format. If you don't know the rowstride of the image you can set stride to 0. buffer will have its reference count increased by 1 and will not get freed until the drawable gets cleaned up or that a new buffer is loaded.

MT safe.

image :

a PgmImage object.

format :

the pixel format of the buffer.

width :

the image width in pixels.

height :

the image height in pixels.

stride :

the rowstride of the image in bytes (number of bytes per line).

buffer :

A GstBuffer reference containing the video frame.

Returns :

a PgmError indicating success/failure.

pgm_image_set_from_system_buffer ()

PgmError            pgm_image_set_from_system_buffer    (PgmImage *image,
                                                         PgmImagePixelFormat format,
                                                         guint width,
                                                         guint height,
                                                         gconstpointer system_buffer);

Loads an image in image from an existing system buffer.

A system buffer depends on the platform, for instance on UNIX with an X11 server running, system_buffer can be set to an X11 Pixmap.

MT safe.

image :

a PgmImage object.

format :

the pixel format of the buffer.

width :

the image width in pixels.

height :

the image height in pixels.

system_buffer :

a pointer to the system buffer.

Returns :

a PgmError indicating success/failure.

pgm_image_set_from_image ()

PgmError            pgm_image_set_from_image            (PgmImage *image,
                                                         PgmImage *src_image);

Slaves image to src_image. Every change to src_image is reflected on image until you remove image from the canvas or you call pgm_image_clear() on image.

MT safe.

image :

a PgmImage object.

src_image :

the source PgmImage object to use as a master.

Returns :

a PgmError indicating success/failure.

pgm_image_to_pixbuf ()

PgmError            pgm_image_to_pixbuf                 (PgmImage *image,
                                                         GdkPixbuf **pixbuf);

Retrieves a GdkPixbuf of the image currently stored in image.

Only the images stored as pixbuf can be retrieved at the moment, the conversion for the other storage types is not implemented yet.

MT safe.

image :

a PgmImage object.

pixbuf :

a double pointer to GdkPixbuf. Unref after usage.

Returns :

a PgmError indicating success/failure.

pgm_image_clear ()

PgmError            pgm_image_clear                     (PgmImage *image);

Removes any image from image. If image had some image data loaded, it's cleared, if there was a GstBuffer used, it's unreffed and if the image was a slave to another it is not anymore. If image has slave images they all get cleared but they still are slaves to image. So if you load a new image to image, all the slaves will load it too.

MT safe.

image :

a PgmImage object.

Returns :

a PgmError indicating success/failure.

pgm_image_get_storage_type ()

PgmError            pgm_image_get_storage_type          (PgmImage *image,
                                                         PgmImageStorageType *storage);

Retrieves the type of representation being used by image to store image data. If image has no image data, the return value will be PGM_IMAGE_EMPTY.

MT safe.

image :

a PgmImage object.

storage :

a PgmImageStorageType where the storage type is going to be stored.

Returns :

a PgmError indicating success/failure.

pgm_image_system_buffer_lock ()

PgmError            pgm_image_system_buffer_lock        (PgmImage *image);

Lock the system buffer set as the image content, ensuring the image is not going to be drawn while the system buffer content changes. This function guaranties tear free system buffer updates.

MT safe.

image :

a PgmImage object.

Returns :

a PgmError indicating success/failure.

pgm_image_system_buffer_unlock ()

PgmError            pgm_image_system_buffer_unlock      (PgmImage *image);

Unlock the system buffer set as the image content.

MT safe.

image :

a PgmImage object.

Returns :

a PgmError indicating success/failure.

pgm_image_set_mapping_matrix ()

PgmError            pgm_image_set_mapping_matrix        (PgmImage *image,
                                                         PgmMat4x4 *mapping_matrix);

Defines the transformation to apply to the stored image when it is rendered. You can make the stored image slide over the drawable, rotate around it, stretch and shrink, or any combination of the three.

Each point in an image can be defined by an (x, y) vector, which we call the source position, representing the horizontal (x) and vertical (y) positions (with values between 0 for left/top and 1 for right/bottom). When the image is drawn on a surface, each point (x, y) is drawn on the (x', y') coordinate of the surface. We call (x', y') the destination position. The default mapping matrix is the identity, you have (x', y') == (x, y). Once you have called the function, the destination position is calculated by multiplying mapping_matrix with the source position vector. To reset the mapping matrix, just set the identity.

mapping_matrix is a 4x4 matrix since the source and destination positions can be represented as 4 coordinate vectors (x, y, z, w) and (x', y', z', w'). Unless you know what you are doing, you should not worry about z and w, and arrange for your matrix to leave them unchanged.

MT safe.

image :

a PgmImage object.

mapping_matrix :

a PgmMat4x4 object.

Returns :

a PgmError indicating success/failure.

pgm_image_get_mapping_matrix ()

PgmError            pgm_image_get_mapping_matrix        (PgmImage *image,
                                                         PgmMat4x4 **mapping_matrix);

Retrieves in matrix the current mapping matrix applied to image.

MT safe.

image :

a PgmImage object.

mapping_matrix :

a pointer to a PgmMat4x4 pointer where the mapping matrix is going to be stored. pgm_mat4x4_free() after use.

Returns :

a PgmError indicating success/failure.

pgm_image_set_alignment ()

PgmError            pgm_image_set_alignment             (PgmImage *image,
                                                         PgmImageAlignment align);

Defines the way image aligns the stored image.

MT safe.

image :

a PgmImage object.

align :

a PgmImageAlignment combination of flags.

Returns :

a PgmError indicating success/failure.

pgm_image_get_alignment ()

PgmError            pgm_image_get_alignment             (PgmImage *image,
                                                         PgmImageAlignment *align);

Retrieves in align the way image aligns the stored image.

MT safe.

image :

a PgmImage object.

align :

a pointer to a PgmImageAlignment where alignment flags are going to be stored.

Returns :

a PgmError indicating success/failure.

pgm_image_set_layout ()

PgmError            pgm_image_set_layout                (PgmImage *image,
                                                         PgmImageLayoutType layout);

Defines the way image layouts its stored image.

MT safe.

image :

a PgmImage object.

layout :

a PgmImageLayoutType layout type.

Returns :

a PgmError indicating success/failure.

pgm_image_get_layout ()

PgmError            pgm_image_get_layout                (PgmImage *image,
                                                         PgmImageLayoutType *layout);

Retrieves in layout the way image layouts its its stored image.

MT safe.

image :

a PgmImage object.

layout :

a pointer to a PgmImageLayoutType where the layout type is going to be stored.

Returns :

a PgmError indicating success/failure.

pgm_image_set_interp ()

PgmError            pgm_image_set_interp                (PgmImage *image,
                                                         PgmImageInterpType interp);

Defines that image will be rendered using interp as its interpolation type.

MT safe.

image :

a PgmImage object.

interp :

the interpolation type.

Returns :

a PgmError indicating success/failure.

pgm_image_get_interp ()

PgmError            pgm_image_get_interp                (PgmImage *image,
                                                         PgmImageInterpType *interp);

Retrieves in interp the current interpolation type of image.

MT safe.

image :

a PgmImage object.

interp :

a pointer to a PgmImageInterpType where the interpolation type is going to be stored.

Returns :

a PgmError indicating success/failure.

pgm_image_set_wrapping ()

PgmError            pgm_image_set_wrapping              (PgmImage *image,
                                                         PgmImageWrapping wrap_s,
                                                         PgmImageWrapping wrap_t);

Sets the horizontal and vertical wrapping modes used for the mapping of image. When the mapping matrix is modified, pixels outside the range of the image content are accessed, the wrapping mode defines the behaviour of the mapping in that particular case.

MT safe.

image :

a PgmImage object.

wrap_s :

the wrapping on the s coordinate. PGM_IMAGE_REPEAT by default.

wrap_t :

the wrapping on the t coordinate. PGM_IMAGE_REPEAT by default.

Returns :

a PgmError indicating success/failure.

pgm_image_get_wrapping ()

PgmError            pgm_image_get_wrapping              (PgmImage *image,
                                                         PgmImageWrapping *wrap_s,
                                                         PgmImageWrapping *wrap_t);

Retrieves in wrap_s and wrap_t the current wrapping modes of image.

MT safe.

image :

a PgmImage object.

wrap_s :

a pointer to a PgmImageInterpType where the wrapping mode on the s coordinate is going to be stored.

wrap_t :

a pointer to a PgmImageInterpType where the wrapping mode on the t coordinate is going to be stored.

Returns :

a PgmError indicating success/failure.

pgm_image_set_aspect_ratio ()

PgmError            pgm_image_set_aspect_ratio          (PgmImage *image,
                                                         guint numerator,
                                                         guint denominator);

Customizes the aspect ratio of the stored image.

MT safe.

image :

a PgmImage object.

numerator :

the numerator of the aspect ratio fraction.

denominator :

the denominator of the aspect ratio fraction.

Returns :

a PgmError indicating success/failure.

pgm_image_get_aspect_ratio ()

PgmError            pgm_image_get_aspect_ratio          (PgmImage *image,
                                                         guint *numerator,
                                                         guint *denominator);

Retrieves the aspect ratio of the stored image.

MT safe.

image :

a PgmImage object.

numerator :

a pointer to a guint where the numerator of the aspect ratio fraction will be stored.

denominator :

a pointer to a guint where the denominator of the aspect ratio fraction will be stored.

Returns :

a PgmError indicating success/failure.

pgm_image_set_border_width ()

PgmError            pgm_image_set_border_width          (PgmImage *image,
                                                         gfloat width);

Defines the border width drawn around image.

Note that the border is drawn around the image, inside the drawable. When you change the size of the border, the image will be down-scaled.

MT safe.

image :

a PgmImage object.

width :

the border with. 0.0 by default.

Returns :

a PgmError indicating success/failure.

pgm_image_get_border_width ()

PgmError            pgm_image_get_border_width          (PgmImage *image,
                                                         gfloat *width);

Retrieves the width of the border drawn around image inside the drawable.

MT safe.

image :

a PgmImage object.

width :

a pointer to a gfloat where the border width will be stored.

Returns :

a PgmError indicating success/failure.

pgm_image_set_border_inner_color ()

PgmError            pgm_image_set_border_inner_color    (PgmImage *image,
                                                         guchar red,
                                                         guchar green,
                                                         guchar blue,
                                                         guchar alpha);

Defines the border inner color drawn around image.

MT safe.

image :

a PgmImage object.

red :

the border inner red color. 255 by default.

green :

the border inner green color. 255 by default.

blue :

the border inner blue color. 255 by default.

alpha :

the border inner alpha color. 255 by default.

Returns :

a PgmError indicating success/failure.

pgm_image_get_border_inner_color ()

PgmError            pgm_image_get_border_inner_color    (PgmImage *image,
                                                         guchar *red,
                                                         guchar *green,
                                                         guchar *blue,
                                                         guchar *alpha);

Retrieves the inner color of the border drawn around image inside the drawable.

MT safe.

image :

a PgmImage object.

red :

a pointer to a guchar where the border inner red color will be stored.

green :

a pointer to a guchar where the border inner green color will be stored.

blue :

a pointer to a guchar where the border inner blue color will be stored.

alpha :

a pointer to a guchar where the border inner alpha color will be stored.

Returns :

a PgmError indicating success/failure.

pgm_image_set_border_outer_color ()

PgmError            pgm_image_set_border_outer_color    (PgmImage *image,
                                                         guchar red,
                                                         guchar green,
                                                         guchar blue,
                                                         guchar alpha);

Defines the border outer color drawn around image.

MT safe.

image :

a PgmImage object.

red :

the border outer red color. 255 by default.

green :

the border outer green color. 255 by default.

blue :

the border outer blue color. 255 by default.

alpha :

the border outer alpha color. 255 by default.

Returns :

a PgmError indicating success/failure.

pgm_image_get_border_outer_color ()

PgmError            pgm_image_get_border_outer_color    (PgmImage *image,
                                                         guchar *red,
                                                         guchar *green,
                                                         guchar *blue,
                                                         guchar *alpha);

Retrieves the outer color of the border drawn around image inside the drawable.

MT safe.

image :

a PgmImage object.

red :

a pointer to a guchar where the border outer red color will be stored.

green :

a pointer to a guchar where the border outer green color will be stored.

blue :

a pointer to a guchar where the border outer blue color will be stored.

alpha :

a pointer to a guchar where the border outer alpha color will be stored.

Returns :

a PgmError indicating success/failure.

pgm_image_from_drawable ()

PgmError            pgm_image_from_drawable             (PgmImage *image,
                                                         gint *x_image,
                                                         gint *y_image,
                                                         gfloat x_drawable,
                                                         gfloat y_drawable);

Converts a position in drawable space (canvas units, origin at top left of drawable) into image space (image pixel units, origin at top left of image).

image :

a PgmImage instance

x_image :

where to return the x coordinate in the image plane.

y_image :

where to return the y coordinate in the image plane.

x_drawable :

the x coordinate in drawable space.

y_drawable :

the y coordinate in drawable space.

Returns :

a PgmError indicating success/failure.

pgm_image_to_drawable ()

PgmError            pgm_image_to_drawable               (PgmImage *image,
                                                         gfloat *x_drawable,
                                                         gfloat *y_drawable,
                                                         gint x_image,
                                                         gint y_image);

Converts a position in image space (image pixel units, origin at top left of image) into drawable space (canvas units, origin at top left of drawable).

image :

a PgmImage instance

x_drawable :

where to return the x coordinate in the drawable plane.

y_drawable :

where to return the y coordinate in the drawable plane.

x_image :

the x coordinate in image space.

y_image :

the y coordinate in image space.

Returns :

a PgmError indicating success/failure.

Signal Details

The "cloned" signal

void                user_function                      (PgmImage *image,
                                                        PgmImage *clone,
                                                        guint     n_clones,
                                                        gpointer  user_data)      : Run First

Will be emitted after image has been cloned by another PgmImage through the pgm_image_new_from_image() or pgm_image_set_from_image() functions.

image :

the PgmImage

clone :

the cloned PgmImage

n_clones :

the number of cloned images

user_data :

user data set when the signal handler was connected.

The "file-loaded" signal

void                user_function                      (PgmImage *image,
                                                        gpointer  user_data)      : Run First

Will be emitted after image has finished to load its data from the file path given in the pgm_image_set_from_file() method.

image :

the PgmImage

user_data :

user data set when the signal handler was connected.

The "un-cloned" signal

void                user_function                      (PgmImage *image,
                                                        guint     n_clones,
                                                        gpointer  user_data)      : Run First

Will be emitted after image has got a cloned PgmImage removed.

image :

the PgmImage

n_clones :

the number of cloned images

user_data :

user data set when the signal handler was connected.

See Also

#PgmDrawable, PgmText, PgmCanvas.
pigment-0.3.17/docs/pgm/html/left.png0000644000175000017500000000071311205035140014275 00000000000000PNG  IHDRw=bKGD pHYs  ~tIME1&[(XIDATx!OPE*ID%~ꊯ"p'ŏ`sܖrKf hmiIz}ܯI.p\`x l?l[,Hk<#c%\AUx[S7n6rzEs1j@NL$ݤi0 5/}\EKIo͓$a0jdFbkIAh>WlC'?tk;|/t*INZ^`y4Nr]׮ J<ڐt`X1@p䀸dZ')hK $V?%]+LsgUK"w53OIENDB`pigment-0.3.17/docs/pgm/html/index.html0000644000175000017500000001211711205035140014633 00000000000000 Pigment 0.3 Reference Manual

for Pigment 0.3.17


Introduction
I. Pigment Overview
Compiling Pigment Applications — Compile your Pigment applications.
Running Pigment Applications — Run and debug your Pigment applications.
II. Pigment Core Reference
Pgm — A library to create rich application user interfaces.
PgmCanvas — A virtual positioning class for drawables.
PgmCommon — Various functions used for common tasks.
PgmDrawable — A base class used for embedding media types.
PgmEvents — Various structs and functions used for events handling.
PgmImage — An image drawable supporting various media.
PgmImageSink — A GStreamer image sink outputing frames to image drawables.
PgmLinearAlgebra — Various linear algebra objects and utility functions.
PgmPlugin — Various structs and macros used for plugins handling.
PgmText — A text drawable.
PgmVersion — Pigment version macros.
PgmViewport — An abstract class doing a visual projection of a canvas.
PgmViewportFactory — A factory creating viewports.
III. Pigment Library Reference
PgmImaging — A library to process pixbufs through software filters.
PgmGtk — A GTK+ widget embedding viewports.
Object Hierarchy
Index
pigment-0.3.17/docs/pgm/html/api-index.html0000644000175000017500000015460211205035140015410 00000000000000 Index

Index

P

PgmButtonType, enum PgmButtonType
PgmCanvas, PgmCanvas
PgmCanvas::drawable-added, The "drawable-added" signal
PgmCanvas::drawable-removed, The "drawable-removed" signal
PgmCanvas::drawable-reordered, The "drawable-reordered" signal
PgmCanvas::regenerated, The "regenerated" signal
PgmCanvas::size-changed, The "size-changed" signal
PgmDrawable, PgmDrawable
PgmDrawable::changed, The "changed" signal
PgmDrawable::clicked, The "clicked" signal
PgmDrawable::double-clicked, The "double-clicked" signal
PgmDrawable::drag-begin, The "drag-begin" signal
PgmDrawable::drag-end, The "drag-end" signal
PgmDrawable::drag-motion, The "drag-motion" signal
PgmDrawable::entered, The "entered" signal
PgmDrawable::left, The "left" signal
PgmDrawable::motion, The "motion" signal
PgmDrawable::pressed, The "pressed" signal
PgmDrawable::pressured, The "pressured" signal
PgmDrawable::released, The "released" signal
PgmDrawable::scrolled, The "scrolled" signal
PgmDrawableClass, PgmDrawableClass
PgmDrawableLayer, enum PgmDrawableLayer
PgmDrawableProperty, enum PgmDrawableProperty
PgmError, enum PgmError
PgmEvent, union PgmEvent
PgmEventAny, PgmEventAny
PgmEventButton, PgmEventButton
PgmEventConfigure, PgmEventConfigure
PgmEventDnd, PgmEventDnd
PgmEventExpose, PgmEventExpose
PgmEventKey, PgmEventKey
PgmEventMotion, PgmEventMotion
PgmEventScroll, PgmEventScroll
PgmEventState, PgmEventState
PgmEventType, enum PgmEventType
PgmEventWin32Message, PgmEventWin32Message
PgmGtk, PgmGtk
PgmImage, PgmImage
PgmImage::cloned, The "cloned" signal
PgmImage::file-loaded, The "file-loaded" signal
PgmImage::un-cloned, The "un-cloned" signal
PgmImageAlignment, enum PgmImageAlignment
PgmImageBuffer, PgmImageBuffer
PgmImageData, union PgmImageData
PgmImageFile, PgmImageFile
PgmImageGstBuffer, PgmImageGstBuffer
PgmImageInterpType, enum PgmImageInterpType
PgmImageLayoutType, enum PgmImageLayoutType
PgmImagePixbuf, PgmImagePixbuf
PgmImagePixelFormat, enum PgmImagePixelFormat
PgmImageSink, PgmImageSink
PgmImageSink:events, The "events" property
PgmImageSink:image, The "image" property
PgmImageSinkEventMask, enum PgmImageSinkEventMask
PgmImageStorageType, enum PgmImageStorageType
PgmImageSystemBuffer, PgmImageSystemBuffer
PgmImageWrapping, enum PgmImageWrapping
PgmMat3x3, PgmMat3x3
PgmMat4x4, PgmMat4x4
PgmMat4x4Predefined, enum PgmMat4x4Predefined
PgmModifierType, enum PgmModifierType
PgmPluginCreateFunc, PgmPluginCreateFunc ()
PgmPluginDesc, PgmPluginDesc
PgmPluginInitFunc, PgmPluginInitFunc ()
PgmPluginShutdownFunc, PgmPluginShutdownFunc ()
PgmScrollDirection, enum PgmScrollDirection
PgmText, PgmText
PgmTextAlignment, enum PgmTextAlignment
PgmTextEllipsize, enum PgmTextEllipsize
PgmTextGravity, enum PgmTextGravity
PgmTextShadowPosition, enum PgmTextShadowPosition
PgmTextStretch, enum PgmTextStretch
PgmTextStyle, enum PgmTextStyle
PgmTextVariant, enum PgmTextVariant
PgmTextWeight, enum PgmTextWeight
PgmTextWrap, enum PgmTextWrap
PgmVec3, PgmVec3
PgmVec4, PgmVec4
PgmViewport, PgmViewport
PgmViewport::button-press-event, The "button-press-event" signal
PgmViewport::button-pressure-event, The "button-pressure-event" signal
PgmViewport::button-release-event, The "button-release-event" signal
PgmViewport::configure-event, The "configure-event" signal
PgmViewport::delete-event, The "delete-event" signal
PgmViewport::drag-drop-event, The "drag-drop-event" signal
PgmViewport::drag-leave-event, The "drag-leave-event" signal
PgmViewport::drag-motion-event, The "drag-motion-event" signal
PgmViewport::expose-event, The "expose-event" signal
PgmViewport::key-press-event, The "key-press-event" signal
PgmViewport::key-release-event, The "key-release-event" signal
PgmViewport::motion-notify-event, The "motion-notify-event" signal
PgmViewport::pixels-read, The "pixels-read" signal
PgmViewport::scroll-event, The "scroll-event" signal
PgmViewport::state-event, The "state-event" signal
PgmViewport::update-pass, The "update-pass" signal
PgmViewportCapacity, enum PgmViewportCapacity
PgmViewportClass, PgmViewportClass
PgmViewportCursor, enum PgmViewportCursor
PgmViewportFactory, PgmViewportFactory
PgmViewportReflection, enum PgmViewportReflection
PgmViewportRotation, enum PgmViewportRotation
PgmViewportState, enum PgmViewportState
pgm_canvas_add, pgm_canvas_add ()
pgm_canvas_add_many, pgm_canvas_add_many ()
pgm_canvas_get_layer_count, pgm_canvas_get_layer_count ()
pgm_canvas_get_order, pgm_canvas_get_order ()
pgm_canvas_get_pixel_formats, pgm_canvas_get_pixel_formats ()
pgm_canvas_get_pixel_offsets, pgm_canvas_get_pixel_offsets ()
pgm_canvas_get_size, pgm_canvas_get_size ()
pgm_canvas_new, pgm_canvas_new ()
pgm_canvas_regenerate, pgm_canvas_regenerate ()
pgm_canvas_remove, pgm_canvas_remove ()
pgm_canvas_remove_many, pgm_canvas_remove_many ()
pgm_canvas_set_order, pgm_canvas_set_order ()
pgm_canvas_set_size, pgm_canvas_set_size ()
PGM_DEGREES_TO_RADIANS, PGM_DEGREES_TO_RADIANS()
pgm_deinit, pgm_deinit ()
pgm_drawable_from_canvas, pgm_drawable_from_canvas ()
pgm_drawable_get_bg_color, pgm_drawable_get_bg_color ()
pgm_drawable_get_drag_distance, pgm_drawable_get_drag_distance ()
pgm_drawable_get_fg_color, pgm_drawable_get_fg_color ()
pgm_drawable_get_grid_aligned, pgm_drawable_get_grid_aligned ()
pgm_drawable_get_opacity, pgm_drawable_get_opacity ()
pgm_drawable_get_position, pgm_drawable_get_position ()
pgm_drawable_get_rotation_x, pgm_drawable_get_rotation_x ()
pgm_drawable_get_rotation_y, pgm_drawable_get_rotation_y ()
pgm_drawable_get_rotation_z, pgm_drawable_get_rotation_z ()
pgm_drawable_get_scale, pgm_drawable_get_scale ()
pgm_drawable_get_size, pgm_drawable_get_size ()
pgm_drawable_hide, pgm_drawable_hide ()
pgm_drawable_is_visible, pgm_drawable_is_visible ()
pgm_drawable_regenerate, pgm_drawable_regenerate ()
pgm_drawable_set_bg_color, pgm_drawable_set_bg_color ()
pgm_drawable_set_drag_distance, pgm_drawable_set_drag_distance ()
pgm_drawable_set_fg_color, pgm_drawable_set_fg_color ()
pgm_drawable_set_grid_aligned, pgm_drawable_set_grid_aligned ()
pgm_drawable_set_opacity, pgm_drawable_set_opacity ()
pgm_drawable_set_position, pgm_drawable_set_position ()
pgm_drawable_set_rotation_x, pgm_drawable_set_rotation_x ()
pgm_drawable_set_rotation_y, pgm_drawable_set_rotation_y ()
pgm_drawable_set_rotation_z, pgm_drawable_set_rotation_z ()
pgm_drawable_set_scale, pgm_drawable_set_scale ()
pgm_drawable_set_size, pgm_drawable_set_size ()
pgm_drawable_show, pgm_drawable_show ()
pgm_drawable_to_canvas, pgm_drawable_to_canvas ()
pgm_events_pending, pgm_events_pending ()
pgm_event_copy, pgm_event_copy ()
pgm_event_free, pgm_event_free ()
pgm_event_new, pgm_event_new ()
PGM_FABSF, PGM_FABSF()
pgm_gtk_get_viewport, pgm_gtk_get_viewport ()
pgm_gtk_new, pgm_gtk_new ()
pgm_gtk_set_viewport, pgm_gtk_set_viewport ()
pgm_image_clear, pgm_image_clear ()
pgm_image_from_drawable, pgm_image_from_drawable ()
pgm_image_get_alignment, pgm_image_get_alignment ()
pgm_image_get_aspect_ratio, pgm_image_get_aspect_ratio ()
pgm_image_get_border_inner_color, pgm_image_get_border_inner_color ()
pgm_image_get_border_outer_color, pgm_image_get_border_outer_color ()
pgm_image_get_border_width, pgm_image_get_border_width ()
pgm_image_get_interp, pgm_image_get_interp ()
pgm_image_get_layout, pgm_image_get_layout ()
pgm_image_get_mapping_matrix, pgm_image_get_mapping_matrix ()
pgm_image_get_storage_type, pgm_image_get_storage_type ()
pgm_image_get_wrapping, pgm_image_get_wrapping ()
pgm_image_new, pgm_image_new ()
pgm_image_new_from_buffer, pgm_image_new_from_buffer ()
pgm_image_new_from_file, pgm_image_new_from_file ()
pgm_image_new_from_image, pgm_image_new_from_image ()
pgm_image_new_from_pixbuf, pgm_image_new_from_pixbuf ()
pgm_image_set_alignment, pgm_image_set_alignment ()
pgm_image_set_aspect_ratio, pgm_image_set_aspect_ratio ()
pgm_image_set_border_inner_color, pgm_image_set_border_inner_color ()
pgm_image_set_border_outer_color, pgm_image_set_border_outer_color ()
pgm_image_set_border_width, pgm_image_set_border_width ()
pgm_image_set_from_buffer, pgm_image_set_from_buffer ()
pgm_image_set_from_file, pgm_image_set_from_file ()
pgm_image_set_from_gst_buffer, pgm_image_set_from_gst_buffer ()
pgm_image_set_from_image, pgm_image_set_from_image ()
pgm_image_set_from_pixbuf, pgm_image_set_from_pixbuf ()
pgm_image_set_from_system_buffer, pgm_image_set_from_system_buffer ()
pgm_image_set_interp, pgm_image_set_interp ()
pgm_image_set_layout, pgm_image_set_layout ()
pgm_image_set_mapping_matrix, pgm_image_set_mapping_matrix ()
pgm_image_set_wrapping, pgm_image_set_wrapping ()
pgm_image_sink_get_events, pgm_image_sink_get_events ()
pgm_image_sink_get_image, pgm_image_sink_get_image ()
pgm_image_sink_new, pgm_image_sink_new ()
pgm_image_sink_set_events, pgm_image_sink_set_events ()
pgm_image_sink_set_image, pgm_image_sink_set_image ()
pgm_image_system_buffer_lock, pgm_image_system_buffer_lock ()
pgm_image_system_buffer_unlock, pgm_image_system_buffer_unlock ()
pgm_image_to_drawable, pgm_image_to_drawable ()
pgm_image_to_pixbuf, pgm_image_to_pixbuf ()
pgm_imaging_linear_alpha_gradient, pgm_imaging_linear_alpha_gradient ()
pgm_init, pgm_init ()
pgm_init_check, pgm_init_check ()
pgm_intersection_line_plane, pgm_intersection_line_plane ()
pgm_keyval_to_unicode, pgm_keyval_to_unicode ()
pgm_lrintf, pgm_lrintf ()
pgm_main, pgm_main ()
pgm_main_iteration, pgm_main_iteration ()
pgm_main_iteration_do, pgm_main_iteration_do ()
pgm_main_quit, pgm_main_quit ()
pgm_mat3x3_add_mat3x3, pgm_mat3x3_add_mat3x3 ()
pgm_mat3x3_add_scalar, pgm_mat3x3_add_scalar ()
pgm_mat3x3_copy, pgm_mat3x3_copy ()
pgm_mat3x3_free, pgm_mat3x3_free ()
pgm_mat3x3_inverse, pgm_mat3x3_inverse ()
pgm_mat3x3_is_identity, pgm_mat3x3_is_identity ()
pgm_mat3x3_multiply_mat3x3, pgm_mat3x3_multiply_mat3x3 ()
pgm_mat3x3_multiply_scalar, pgm_mat3x3_multiply_scalar ()
pgm_mat3x3_multiply_vec3, pgm_mat3x3_multiply_vec3 ()
pgm_mat3x3_new, pgm_mat3x3_new ()
pgm_mat3x3_new_from_scalars, pgm_mat3x3_new_from_scalars ()
pgm_mat3x3_new_from_vec3, pgm_mat3x3_new_from_vec3 ()
pgm_mat3x3_new_identity, pgm_mat3x3_new_identity ()
pgm_mat3x3_set_from_mat3x3, pgm_mat3x3_set_from_mat3x3 ()
pgm_mat3x3_set_from_scalars, pgm_mat3x3_set_from_scalars ()
pgm_mat3x3_set_from_vec3, pgm_mat3x3_set_from_vec3 ()
pgm_mat3x3_substract_mat3x3, pgm_mat3x3_substract_mat3x3 ()
pgm_mat3x3_substract_scalar, pgm_mat3x3_substract_scalar ()
pgm_mat3x3_to_string, pgm_mat3x3_to_string ()
pgm_mat3x3_transpose, pgm_mat3x3_transpose ()
pgm_mat4x4_add_mat4x4, pgm_mat4x4_add_mat4x4 ()
pgm_mat4x4_add_scalar, pgm_mat4x4_add_scalar ()
pgm_mat4x4_copy, pgm_mat4x4_copy ()
pgm_mat4x4_free, pgm_mat4x4_free ()
pgm_mat4x4_inverse, pgm_mat4x4_inverse ()
pgm_mat4x4_is_identity, pgm_mat4x4_is_identity ()
pgm_mat4x4_multiply_mat4x4, pgm_mat4x4_multiply_mat4x4 ()
pgm_mat4x4_multiply_scalar, pgm_mat4x4_multiply_scalar ()
pgm_mat4x4_multiply_vec4, pgm_mat4x4_multiply_vec4 ()
pgm_mat4x4_new, pgm_mat4x4_new ()
pgm_mat4x4_new_from_scalars, pgm_mat4x4_new_from_scalars ()
pgm_mat4x4_new_from_vec4, pgm_mat4x4_new_from_vec4 ()
pgm_mat4x4_new_identity, pgm_mat4x4_new_identity ()
pgm_mat4x4_new_predefined, pgm_mat4x4_new_predefined ()
pgm_mat4x4_new_rotate_axis_from_scalars, pgm_mat4x4_new_rotate_axis_from_scalars ()
pgm_mat4x4_new_rotate_axis_from_vec3, pgm_mat4x4_new_rotate_axis_from_vec3 ()
pgm_mat4x4_new_rotate_x, pgm_mat4x4_new_rotate_x ()
pgm_mat4x4_new_rotate_y, pgm_mat4x4_new_rotate_y ()
pgm_mat4x4_new_rotate_z, pgm_mat4x4_new_rotate_z ()
pgm_mat4x4_new_scale_from_scalars, pgm_mat4x4_new_scale_from_scalars ()
pgm_mat4x4_new_scale_from_vec3, pgm_mat4x4_new_scale_from_vec3 ()
pgm_mat4x4_new_translate_from_scalars, pgm_mat4x4_new_translate_from_scalars ()
pgm_mat4x4_new_translate_from_vec3, pgm_mat4x4_new_translate_from_vec3 ()
pgm_mat4x4_rotate_axis_from_scalars, pgm_mat4x4_rotate_axis_from_scalars ()
pgm_mat4x4_rotate_axis_from_vec3, pgm_mat4x4_rotate_axis_from_vec3 ()
pgm_mat4x4_rotate_x, pgm_mat4x4_rotate_x ()
pgm_mat4x4_rotate_y, pgm_mat4x4_rotate_y ()
pgm_mat4x4_rotate_z, pgm_mat4x4_rotate_z ()
pgm_mat4x4_scale_from_scalars, pgm_mat4x4_scale_from_scalars ()
pgm_mat4x4_scale_from_vec3, pgm_mat4x4_scale_from_vec3 ()
pgm_mat4x4_set_from_mat4x4, pgm_mat4x4_set_from_mat4x4 ()
pgm_mat4x4_set_from_scalars, pgm_mat4x4_set_from_scalars ()
pgm_mat4x4_set_from_vec4, pgm_mat4x4_set_from_vec4 ()
pgm_mat4x4_substract_mat4x4, pgm_mat4x4_substract_mat4x4 ()
pgm_mat4x4_substract_scalar, pgm_mat4x4_substract_scalar ()
pgm_mat4x4_to_string, pgm_mat4x4_to_string ()
pgm_mat4x4_translate_from_scalars, pgm_mat4x4_translate_from_scalars ()
pgm_mat4x4_translate_from_vec3, pgm_mat4x4_translate_from_vec3 ()
pgm_mat4x4_transpose, pgm_mat4x4_transpose ()
PGM_PLUGIN_DEFINE, PGM_PLUGIN_DEFINE()
PGM_PLUGIN_PATH_NAME, PGM_PLUGIN_PATH_NAME
pgm_point_belongs_rectangle, pgm_point_belongs_rectangle ()
PGM_RADIANS_TO_DEGREES, PGM_RADIANS_TO_DEGREES()
PGM_SINCOS, PGM_SINCOS()
pgm_text_get_alignment, pgm_text_get_alignment ()
pgm_text_get_cast_shadow, pgm_text_get_cast_shadow ()
pgm_text_get_color, pgm_text_get_color ()
pgm_text_get_ellipsize, pgm_text_get_ellipsize ()
pgm_text_get_font_family, pgm_text_get_font_family ()
pgm_text_get_font_height, pgm_text_get_font_height ()
pgm_text_get_gravity, pgm_text_get_gravity ()
pgm_text_get_justify, pgm_text_get_justify ()
pgm_text_get_label, pgm_text_get_label ()
pgm_text_get_line_spacing, pgm_text_get_line_spacing ()
pgm_text_get_multiline, pgm_text_get_multiline ()
pgm_text_get_outline_color, pgm_text_get_outline_color ()
pgm_text_get_outline_width, pgm_text_get_outline_width ()
pgm_text_get_shadow_color, pgm_text_get_shadow_color ()
pgm_text_get_shadow_position, pgm_text_get_shadow_position ()
pgm_text_get_stretch, pgm_text_get_stretch ()
pgm_text_get_style, pgm_text_get_style ()
pgm_text_get_variant, pgm_text_get_variant ()
pgm_text_get_weight, pgm_text_get_weight ()
pgm_text_get_wrap, pgm_text_get_wrap ()
pgm_text_new, pgm_text_new ()
pgm_text_set_alignment, pgm_text_set_alignment ()
pgm_text_set_cast_shadow, pgm_text_set_cast_shadow ()
pgm_text_set_color, pgm_text_set_color ()
pgm_text_set_ellipsize, pgm_text_set_ellipsize ()
pgm_text_set_font_family, pgm_text_set_font_family ()
pgm_text_set_font_height, pgm_text_set_font_height ()
pgm_text_set_gravity, pgm_text_set_gravity ()
pgm_text_set_justify, pgm_text_set_justify ()
pgm_text_set_label, pgm_text_set_label ()
pgm_text_set_line_spacing, pgm_text_set_line_spacing ()
pgm_text_set_markup, pgm_text_set_markup ()
pgm_text_set_multiline, pgm_text_set_multiline ()
pgm_text_set_outline_color, pgm_text_set_outline_color ()
pgm_text_set_outline_width, pgm_text_set_outline_width ()
pgm_text_set_shadow_color, pgm_text_set_shadow_color ()
pgm_text_set_shadow_position, pgm_text_set_shadow_position ()
pgm_text_set_stretch, pgm_text_set_stretch ()
pgm_text_set_style, pgm_text_set_style ()
pgm_text_set_variant, pgm_text_set_variant ()
pgm_text_set_weight, pgm_text_set_weight ()
pgm_text_set_wrap, pgm_text_set_wrap ()
pgm_vec3_add_scalar, pgm_vec3_add_scalar ()
pgm_vec3_add_vec3, pgm_vec3_add_vec3 ()
pgm_vec3_copy, pgm_vec3_copy ()
pgm_vec3_cross_product, pgm_vec3_cross_product ()
pgm_vec3_dot_product, pgm_vec3_dot_product ()
pgm_vec3_free, pgm_vec3_free ()
pgm_vec3_length, pgm_vec3_length ()
pgm_vec3_multiply_scalar, pgm_vec3_multiply_scalar ()
pgm_vec3_multiply_vec3, pgm_vec3_multiply_vec3 ()
pgm_vec3_new, pgm_vec3_new ()
pgm_vec3_new_from_scalars, pgm_vec3_new_from_scalars ()
pgm_vec3_normalize, pgm_vec3_normalize ()
pgm_vec3_set_from_scalars, pgm_vec3_set_from_scalars ()
pgm_vec3_set_from_vec3, pgm_vec3_set_from_vec3 ()
pgm_vec3_substract_scalar, pgm_vec3_substract_scalar ()
pgm_vec3_substract_vec3, pgm_vec3_substract_vec3 ()
pgm_vec3_to_string, pgm_vec3_to_string ()
pgm_vec4_add_scalar, pgm_vec4_add_scalar ()
pgm_vec4_add_vec4, pgm_vec4_add_vec4 ()
pgm_vec4_copy, pgm_vec4_copy ()
pgm_vec4_free, pgm_vec4_free ()
pgm_vec4_length, pgm_vec4_length ()
pgm_vec4_multiply_scalar, pgm_vec4_multiply_scalar ()
pgm_vec4_multiply_vec4, pgm_vec4_multiply_vec4 ()
pgm_vec4_new, pgm_vec4_new ()
pgm_vec4_new_from_scalars, pgm_vec4_new_from_scalars ()
pgm_vec4_normalize, pgm_vec4_normalize ()
pgm_vec4_set_from_scalars, pgm_vec4_set_from_scalars ()
pgm_vec4_set_from_vec4, pgm_vec4_set_from_vec4 ()
pgm_vec4_substract_scalar, pgm_vec4_substract_scalar ()
pgm_vec4_substract_vec4, pgm_vec4_substract_vec4 ()
pgm_vec4_to_string, pgm_vec4_to_string ()
pgm_version, pgm_version ()
PGM_VERSION_MAJOR, PGM_VERSION_MAJOR
PGM_VERSION_MICRO, PGM_VERSION_MICRO
PGM_VERSION_MINOR, PGM_VERSION_MINOR
PGM_VERSION_NANO, PGM_VERSION_NANO
pgm_version_string, pgm_version_string ()
pgm_viewport_emit_update_pass, pgm_viewport_emit_update_pass ()
pgm_viewport_factory_create, pgm_viewport_factory_create ()
pgm_viewport_factory_get_author, pgm_viewport_factory_get_author ()
pgm_viewport_factory_get_description, pgm_viewport_factory_get_description ()
pgm_viewport_factory_get_license, pgm_viewport_factory_get_license ()
pgm_viewport_factory_get_origin, pgm_viewport_factory_get_origin ()
pgm_viewport_factory_make, pgm_viewport_factory_make ()
pgm_viewport_factory_new, pgm_viewport_factory_new ()
pgm_viewport_focus, pgm_viewport_focus ()
pgm_viewport_from_canvas, pgm_viewport_from_canvas ()
pgm_viewport_get_alpha_blending, pgm_viewport_get_alpha_blending ()
pgm_viewport_get_canvas, pgm_viewport_get_canvas ()
pgm_viewport_get_canvas_reflection, pgm_viewport_get_canvas_reflection ()
pgm_viewport_get_canvas_rotation, pgm_viewport_get_canvas_rotation ()
pgm_viewport_get_caps_mask, pgm_viewport_get_caps_mask ()
pgm_viewport_get_cursor, pgm_viewport_get_cursor ()
pgm_viewport_get_decorated, pgm_viewport_get_decorated ()
pgm_viewport_get_embedding_id, pgm_viewport_get_embedding_id ()
pgm_viewport_get_frame_rate, pgm_viewport_get_frame_rate ()
pgm_viewport_get_fullscreen, pgm_viewport_get_fullscreen ()
pgm_viewport_get_icon, pgm_viewport_get_icon ()
pgm_viewport_get_iconified, pgm_viewport_get_iconified ()
pgm_viewport_get_max_texture_size, pgm_viewport_get_max_texture_size ()
pgm_viewport_get_message_filter, pgm_viewport_get_message_filter ()
pgm_viewport_get_opacity, pgm_viewport_get_opacity ()
pgm_viewport_get_pixel_formats, pgm_viewport_get_pixel_formats ()
pgm_viewport_get_screen_resolution, pgm_viewport_get_screen_resolution ()
pgm_viewport_get_screen_size_mm, pgm_viewport_get_screen_size_mm ()
pgm_viewport_get_size, pgm_viewport_get_size ()
pgm_viewport_get_title, pgm_viewport_get_title ()
pgm_viewport_hide, pgm_viewport_hide ()
pgm_viewport_is_visible, pgm_viewport_is_visible ()
pgm_viewport_push_event, pgm_viewport_push_event ()
pgm_viewport_push_pixels, pgm_viewport_push_pixels ()
pgm_viewport_read_pixels, pgm_viewport_read_pixels ()
pgm_viewport_set_alpha_blending, pgm_viewport_set_alpha_blending ()
pgm_viewport_set_canvas, pgm_viewport_set_canvas ()
pgm_viewport_set_canvas_reflection, pgm_viewport_set_canvas_reflection ()
pgm_viewport_set_canvas_rotation, pgm_viewport_set_canvas_rotation ()
pgm_viewport_set_cursor, pgm_viewport_set_cursor ()
pgm_viewport_set_decorated, pgm_viewport_set_decorated ()
pgm_viewport_set_fullscreen, pgm_viewport_set_fullscreen ()
pgm_viewport_set_icon, pgm_viewport_set_icon ()
pgm_viewport_set_iconified, pgm_viewport_set_iconified ()
pgm_viewport_set_message_filter, pgm_viewport_set_message_filter ()
pgm_viewport_set_opacity, pgm_viewport_set_opacity ()
pgm_viewport_set_screen_resolution, pgm_viewport_set_screen_resolution ()
pgm_viewport_set_screen_size_mm, pgm_viewport_set_screen_size_mm ()
pgm_viewport_set_size, pgm_viewport_set_size ()
pgm_viewport_set_title, pgm_viewport_set_title ()
pgm_viewport_show, pgm_viewport_show ()
pgm_viewport_to_canvas, pgm_viewport_to_canvas ()
pgm_viewport_update_projection, pgm_viewport_update_projection ()
pigment-0.3.17/docs/pgm/html/pigment-PgmLinearAlgebra.html0000644000175000017500000062246511205035140020336 00000000000000 PgmLinearAlgebra

PgmLinearAlgebra

PgmLinearAlgebra — Various linear algebra objects and utility functions.

Synopsis


#include <pgm/pgm.h>

enum                PgmMat4x4Predefined;
                    PgmVec3;
                    PgmVec4;
                    PgmMat3x3;
                    PgmMat4x4;
PgmVec3 *           pgm_vec3_new                        (void);
PgmVec3 *           pgm_vec3_new_from_scalars           (gfloat v0,
                                                         gfloat v1,
                                                         gfloat v2);
PgmVec3 *           pgm_vec3_copy                       (PgmVec3 *vec3);
void                pgm_vec3_free                       (PgmVec3 *vec3);
void                pgm_vec3_set_from_scalars           (PgmVec3 *vec3,
                                                         gfloat v0,
                                                         gfloat v1,
                                                         gfloat v2);
void                pgm_vec3_set_from_vec3              (PgmVec3 *vec3,
                                                         const PgmVec3 *v);
gfloat              pgm_vec3_length                     (PgmVec3 *vec3);
PgmVec3 *           pgm_vec3_normalize                  (PgmVec3 *vec3);
gfloat              pgm_vec3_dot_product                (PgmVec3 *vec3,
                                                         const PgmVec3 *v);
PgmVec3 *           pgm_vec3_cross_product              (PgmVec3 *vec3,
                                                         const PgmVec3 *v);
PgmVec3 *           pgm_vec3_add_scalar                 (PgmVec3 *vec3,
                                                         gfloat s);
PgmVec3 *           pgm_vec3_add_vec3                   (PgmVec3 *vec3,
                                                         const PgmVec3 *v);
PgmVec3 *           pgm_vec3_substract_scalar           (PgmVec3 *vec3,
                                                         gfloat s);
PgmVec3 *           pgm_vec3_substract_vec3             (PgmVec3 *vec3,
                                                         const PgmVec3 *v);
PgmVec3 *           pgm_vec3_multiply_scalar            (PgmVec3 *vec3,
                                                         gfloat s);
PgmVec3 *           pgm_vec3_multiply_vec3              (PgmVec3 *vec3,
                                                         const PgmVec3 *v);
gchar *             pgm_vec3_to_string                  (PgmVec3 *vec3);
PgmVec4 *           pgm_vec4_new                        (void);
PgmVec4 *           pgm_vec4_new_from_scalars           (gfloat v0,
                                                         gfloat v1,
                                                         gfloat v2,
                                                         gfloat v3);
PgmVec4 *           pgm_vec4_copy                       (PgmVec4 *vec4);
void                pgm_vec4_free                       (PgmVec4 *vec4);
void                pgm_vec4_set_from_scalars           (PgmVec4 *vec4,
                                                         gfloat v0,
                                                         gfloat v1,
                                                         gfloat v2,
                                                         gfloat v3);
void                pgm_vec4_set_from_vec4              (PgmVec4 *vec4,
                                                         const PgmVec4 *v);
gfloat              pgm_vec4_length                     (PgmVec4 *vec4);
PgmVec4 *           pgm_vec4_normalize                  (PgmVec4 *vec4);
PgmVec4 *           pgm_vec4_add_scalar                 (PgmVec4 *vec4,
                                                         gfloat s);
PgmVec4 *           pgm_vec4_add_vec4                   (PgmVec4 *vec4,
                                                         const PgmVec4 *v);
PgmVec4 *           pgm_vec4_substract_scalar           (PgmVec4 *vec4,
                                                         gfloat s);
PgmVec4 *           pgm_vec4_substract_vec4             (PgmVec4 *vec4,
                                                         const PgmVec4 *v);
PgmVec4 *           pgm_vec4_multiply_scalar            (PgmVec4 *vec4,
                                                         gfloat s);
PgmVec4 *           pgm_vec4_multiply_vec4              (PgmVec4 *vec4,
                                                         const PgmVec4 *v);
gchar *             pgm_vec4_to_string                  (PgmVec4 *vec4);
PgmMat3x3 *         pgm_mat3x3_new                      (void);
PgmMat3x3 *         pgm_mat3x3_new_from_scalars         (gfloat v0,
                                                         gfloat v1,
                                                         gfloat v2,
                                                         gfloat v3,
                                                         gfloat v4,
                                                         gfloat v5,
                                                         gfloat v6,
                                                         gfloat v7,
                                                         gfloat v8);
PgmMat3x3 *         pgm_mat3x3_new_from_vec3            (const PgmVec3 *v0,
                                                         const PgmVec3 *v1,
                                                         const PgmVec3 *v2);
PgmMat3x3 *         pgm_mat3x3_new_identity             (void);
PgmMat3x3 *         pgm_mat3x3_copy                     (PgmMat3x3 *mat3x3);
void                pgm_mat3x3_free                     (PgmMat3x3 *mat3x3);
void                pgm_mat3x3_set_from_scalars         (PgmMat3x3 *mat3x3,
                                                         gfloat v0,
                                                         gfloat v1,
                                                         gfloat v2,
                                                         gfloat v3,
                                                         gfloat v4,
                                                         gfloat v5,
                                                         gfloat v6,
                                                         gfloat v7,
                                                         gfloat v8);
void                pgm_mat3x3_set_from_vec3            (PgmMat3x3 *mat3x3,
                                                         const PgmVec3 *v0,
                                                         const PgmVec3 *v1,
                                                         const PgmVec3 *v2);
void                pgm_mat3x3_set_from_mat3x3          (PgmMat3x3 *mat3x3,
                                                         const PgmMat3x3 *m);
gboolean            pgm_mat3x3_is_identity              (PgmMat3x3 *mat3x3);
PgmMat3x3 *         pgm_mat3x3_inverse                  (PgmMat3x3 *mat3x3);
PgmMat3x3 *         pgm_mat3x3_transpose                (PgmMat3x3 *mat3x3);
PgmMat3x3 *         pgm_mat3x3_add_scalar               (PgmMat3x3 *mat3x3,
                                                         gfloat s);
PgmMat3x3 *         pgm_mat3x3_add_mat3x3               (PgmMat3x3 *mat3x3,
                                                         const PgmMat3x3 *m);
PgmMat3x3 *         pgm_mat3x3_substract_scalar         (PgmMat3x3 *mat3x3,
                                                         gfloat s);
PgmMat3x3 *         pgm_mat3x3_substract_mat3x3         (PgmMat3x3 *mat3x3,
                                                         const PgmMat3x3 *m);
PgmMat3x3 *         pgm_mat3x3_multiply_scalar          (PgmMat3x3 *mat3x3,
                                                         gfloat s);
PgmVec3 *           pgm_mat3x3_multiply_vec3            (PgmMat3x3 *mat3x3,
                                                         const PgmVec3 *v);
PgmMat3x3 *         pgm_mat3x3_multiply_mat3x3          (PgmMat3x3 *mat3x3,
                                                         const PgmMat3x3 *m);
gchar *             pgm_mat3x3_to_string                (PgmMat3x3 *mat3x3);
PgmMat4x4 *         pgm_mat4x4_new                      (void);
PgmMat4x4 *         pgm_mat4x4_new_from_scalars         (gfloat v0,
                                                         gfloat v1,
                                                         gfloat v2,
                                                         gfloat v3,
                                                         gfloat v4,
                                                         gfloat v5,
                                                         gfloat v6,
                                                         gfloat v7,
                                                         gfloat v8,
                                                         gfloat v9,
                                                         gfloat v10,
                                                         gfloat v11,
                                                         gfloat v12,
                                                         gfloat v13,
                                                         gfloat v14,
                                                         gfloat v15);
PgmMat4x4 *         pgm_mat4x4_new_from_vec4            (const PgmVec4 *v0,
                                                         const PgmVec4 *v1,
                                                         const PgmVec4 *v2,
                                                         const PgmVec4 *v3);
PgmMat4x4 *         pgm_mat4x4_new_identity             (void);
PgmMat4x4 *         pgm_mat4x4_new_predefined           (PgmMat4x4Predefined predefined);
PgmMat4x4 *         pgm_mat4x4_new_translate_from_vec3  (const PgmVec3 *t);
PgmMat4x4 *         pgm_mat4x4_new_translate_from_scalars
                                                        (gfloat tx,
                                                         gfloat ty,
                                                         gfloat tz);
PgmMat4x4 *         pgm_mat4x4_new_scale_from_vec3      (const PgmVec3 *s);
PgmMat4x4 *         pgm_mat4x4_new_scale_from_scalars   (gfloat sx,
                                                         gfloat sy,
                                                         gfloat sz);
PgmMat4x4 *         pgm_mat4x4_new_rotate_x             (gfloat angle);
PgmMat4x4 *         pgm_mat4x4_new_rotate_y             (gfloat angle);
PgmMat4x4 *         pgm_mat4x4_new_rotate_z             (gfloat angle);
PgmMat4x4 *         pgm_mat4x4_new_rotate_axis_from_vec3
                                                        (gfloat angle,
                                                         const PgmVec3 *axis);
PgmMat4x4 *         pgm_mat4x4_new_rotate_axis_from_scalars
                                                        (gfloat angle,
                                                         gfloat axis_x,
                                                         gfloat axis_y,
                                                         gfloat axis_z);
PgmMat4x4 *         pgm_mat4x4_copy                     (PgmMat4x4 *mat4x4);
void                pgm_mat4x4_free                     (PgmMat4x4 *mat4x4);
void                pgm_mat4x4_set_from_scalars         (PgmMat4x4 *mat4x4,
                                                         gfloat v0,
                                                         gfloat v1,
                                                         gfloat v2,
                                                         gfloat v3,
                                                         gfloat v4,
                                                         gfloat v5,
                                                         gfloat v6,
                                                         gfloat v7,
                                                         gfloat v8,
                                                         gfloat v9,
                                                         gfloat v10,
                                                         gfloat v11,
                                                         gfloat v12,
                                                         gfloat v13,
                                                         gfloat v14,
                                                         gfloat v15);
void                pgm_mat4x4_set_from_vec4            (PgmMat4x4 *mat4x4,
                                                         const PgmVec4 *v0,
                                                         const PgmVec4 *v1,
                                                         const PgmVec4 *v2,
                                                         const PgmVec4 *v3);
void                pgm_mat4x4_set_from_mat4x4          (PgmMat4x4 *mat4x4,
                                                         const PgmMat4x4 *m);
gboolean            pgm_mat4x4_is_identity              (PgmMat4x4 *mat4x4);
PgmMat4x4 *         pgm_mat4x4_inverse                  (PgmMat4x4 *mat4x4);
PgmMat4x4 *         pgm_mat4x4_transpose                (PgmMat4x4 *mat4x4);
void                pgm_mat4x4_translate_from_vec3      (PgmMat4x4 *mat4x4,
                                                         const PgmVec3 *t);
void                pgm_mat4x4_translate_from_scalars   (PgmMat4x4 *mat4x4,
                                                         gfloat tx,
                                                         gfloat ty,
                                                         gfloat tz);
void                pgm_mat4x4_scale_from_vec3          (PgmMat4x4 *mat4x4,
                                                         const PgmVec3 *s);
void                pgm_mat4x4_scale_from_scalars       (PgmMat4x4 *mat4x4,
                                                         gfloat sx,
                                                         gfloat sy,
                                                         gfloat sz);
void                pgm_mat4x4_rotate_x                 (PgmMat4x4 *mat4x4,
                                                         gfloat angle);
void                pgm_mat4x4_rotate_y                 (PgmMat4x4 *mat4x4,
                                                         gfloat angle);
void                pgm_mat4x4_rotate_z                 (PgmMat4x4 *mat4x4,
                                                         gfloat angle);
void                pgm_mat4x4_rotate_axis_from_vec3    (PgmMat4x4 *mat4x4,
                                                         gfloat angle,
                                                         const PgmVec3 *axis);
void                pgm_mat4x4_rotate_axis_from_scalars (PgmMat4x4 *mat4x4,
                                                         gfloat angle,
                                                         gfloat axis_x,
                                                         gfloat axis_y,
                                                         gfloat axis_z);
PgmMat4x4 *         pgm_mat4x4_add_scalar               (PgmMat4x4 *mat4x4,
                                                         gfloat s);
PgmMat4x4 *         pgm_mat4x4_add_mat4x4               (PgmMat4x4 *mat4x4,
                                                         const PgmMat4x4 *m);
PgmMat4x4 *         pgm_mat4x4_substract_scalar         (PgmMat4x4 *mat4x4,
                                                         gfloat s);
PgmMat4x4 *         pgm_mat4x4_substract_mat4x4         (PgmMat4x4 *mat4x4,
                                                         const PgmMat4x4 *m);
PgmMat4x4 *         pgm_mat4x4_multiply_scalar          (PgmMat4x4 *mat4x4,
                                                         gfloat s);
PgmVec4 *           pgm_mat4x4_multiply_vec4            (PgmMat4x4 *mat4x4,
                                                         const PgmVec4 *v);
PgmMat4x4 *         pgm_mat4x4_multiply_mat4x4          (PgmMat4x4 *mat4x4,
                                                         const PgmMat4x4 *m);
gchar *             pgm_mat4x4_to_string                (PgmMat4x4 *mat4x4);
PgmVec3 *           pgm_intersection_line_plane         (const PgmVec3 *l1,
                                                         const PgmVec3 *l2,
                                                         const PgmVec3 *p,
                                                         const PgmVec3 *pu,
                                                         const PgmVec3 *pv);
gboolean            pgm_point_belongs_rectangle         (const PgmVec3 *p,
                                                         const PgmVec3 *r,
                                                         const PgmVec3 *ru,
                                                         const PgmVec3 *rv);

Description

Notation

Various linear algebra objects and utility functions simplifying the use of matrice and vector types.

In this documentation, we use the column vector notation for matrices and matrix operations. That is also the notation used by the *_to_string() functions, with the exception of pgm_vec3_to_string() and pgm_vec4_to_string() for practical reasons.

Pigment matrices are stored in row-major order. This means that rows are stored one after the other. The difference between addresses of array cells in increasing rows is larger than addresses of cells in increasing columns.

Last reviewed on 2008-01-15 (0.3.2)

Details

enum PgmMat4x4Predefined

typedef enum {
  PGM_MAT4X4_FLIP_HORIZONTAL,
  PGM_MAT4X4_FLIP_VERTICAL,
  PGM_MAT4X4_ROTATE_CLOCKWISE,
  PGM_MAT4X4_ROTATE_COUNTER_CLOCKWISE
} PgmMat4x4Predefined;

Predefined 4x4 matrices describing several common effects.

PGM_MAT4X4_FLIP_HORIZONTAL

Horizontal flipping.

PGM_MAT4X4_FLIP_VERTICAL

Vertical flipping.

PGM_MAT4X4_ROTATE_CLOCKWISE

Clockwise rotation.

PGM_MAT4X4_ROTATE_COUNTER_CLOCKWISE

Counter-clockwise rotation.

PgmVec3

typedef struct {
  gfloat v[3];
} PgmVec3;

Describes a 3 components vector.

gfloat v[3];

the 3 components vector array.

PgmVec4

typedef struct {
  gfloat v[4];
} PgmVec4;

Describes a 4 components vector.

gfloat v[4];

the 4 components vector.

PgmMat3x3

typedef struct {
  gfloat m[9];
} PgmMat3x3;

Describes a 3x3 matrix.

gfloat m[9];

the 3x3 matrix array in row-major order.

PgmMat4x4

typedef struct {
  gfloat m[16];
} PgmMat4x4;

Describes a 4x4 matrix.

gfloat m[16];

the 4x4 matrix array in row-major order.

pgm_vec3_new ()

PgmVec3 *           pgm_vec3_new                        (void);

Creates a new PgmVec3 with components initialized at 0.0f.

MT safe.

Returns :

a new PgmVec3 instance.

pgm_vec3_new_from_scalars ()

PgmVec3 *           pgm_vec3_new_from_scalars           (gfloat v0,
                                                         gfloat v1,
                                                         gfloat v2);

Creates a new PgmVec3 with components initialized with the given scalars.

MT safe.

v0 :

the 1st component.

v1 :

the 2nd component.

v2 :

the 3rd component.

Returns :

a new PgmVec3 instance.

pgm_vec3_copy ()

PgmVec3 *           pgm_vec3_copy                       (PgmVec3 *vec3);

Copies vec3.

MT safe.

vec3 :

a PgmVec3 object.

Returns :

a newly allocated PgmVec3.

pgm_vec3_free ()

void                pgm_vec3_free                       (PgmVec3 *vec3);

Frees all resources used by vec3.

MT safe.

vec3 :

A PgmVec3 object.

pgm_vec3_set_from_scalars ()

void                pgm_vec3_set_from_scalars           (PgmVec3 *vec3,
                                                         gfloat v0,
                                                         gfloat v1,
                                                         gfloat v2);

Sets the components of vec3 with the given scalars.

MT safe.

vec3 :

A PgmVec3 object.

v0 :

the 1st component.

v1 :

the 2nd component.

v2 :

the 3rd component.

pgm_vec3_set_from_vec3 ()

void                pgm_vec3_set_from_vec3              (PgmVec3 *vec3,
                                                         const PgmVec3 *v);

Sets the components of vec3 with the given vector.

MT safe.

vec3 :

A PgmVec3 object.

v :

A PgmVec3 object.

pgm_vec3_length ()

gfloat              pgm_vec3_length                     (PgmVec3 *vec3);

Retrieves the length of the vector vec3.

MT safe.

vec3 :

A PgmVec3 object.

Returns :

the length of vec3.

pgm_vec3_normalize ()

PgmVec3 *           pgm_vec3_normalize                  (PgmVec3 *vec3);

Retrieves the normalized vec3 vector.

MT safe.

vec3 :

A PgmVec3 object.

Returns :

the normalized vec3 vector, or NULL if vec3 is the zero vector.

pgm_vec3_dot_product ()

gfloat              pgm_vec3_dot_product                (PgmVec3 *vec3,
                                                         const PgmVec3 *v);

Computes the dot product vec3v.

MT safe.

vec3 :

A PgmVec3 object.

v :

A PgmVec3 object.

Returns :

the dot product vec3v.

pgm_vec3_cross_product ()

PgmVec3 *           pgm_vec3_cross_product              (PgmVec3 *vec3,
                                                         const PgmVec3 *v);

Computes the dot product vec3 × v.

MT safe.

vec3 :

A PgmVec3 object.

v :

A PgmVec3 object.

Returns :

the cross product vec3 × v in a newly allocated PgmVec3.

pgm_vec3_add_scalar ()

PgmVec3 *           pgm_vec3_add_scalar                 (PgmVec3 *vec3,
                                                         gfloat s);

Computes the sum vec3 + s.

MT safe.

vec3 :

A PgmVec3 object.

s :

A scalar.

Returns :

the sum vec3 + s in a newly allocated PgmVec3.

pgm_vec3_add_vec3 ()

PgmVec3 *           pgm_vec3_add_vec3                   (PgmVec3 *vec3,
                                                         const PgmVec3 *v);

Computes the sum vec3 + v.

MT safe.

vec3 :

A PgmVec3 object.

v :

A PgmVec3 object.

Returns :

the sum vec3 + v in a newly allocated PgmVec3.

pgm_vec3_substract_scalar ()

PgmVec3 *           pgm_vec3_substract_scalar           (PgmVec3 *vec3,
                                                         gfloat s);

Computes the substraction vec3 - s.

MT safe.

vec3 :

A PgmVec3 object.

s :

A scalar.

Returns :

the substraction vec3 - s in a newly allocated PgmVec3.

pgm_vec3_substract_vec3 ()

PgmVec3 *           pgm_vec3_substract_vec3             (PgmVec3 *vec3,
                                                         const PgmVec3 *v);

Computes the substraction vec3 - v.

MT safe.

vec3 :

A PgmVec3 object.

v :

A PgmVec3 object.

Returns :

the substraction vec3 - v in a newly allocated PgmVec3.

pgm_vec3_multiply_scalar ()

PgmVec3 *           pgm_vec3_multiply_scalar            (PgmVec3 *vec3,
                                                         gfloat s);

Computes the multiplication vec3 . s.

MT safe.

vec3 :

A PgmVec3 object.

s :

A scalar.

Returns :

the multiplication vec3 . s in a newly allocated PgmVec3.

pgm_vec3_multiply_vec3 ()

PgmVec3 *           pgm_vec3_multiply_vec3              (PgmVec3 *vec3,
                                                         const PgmVec3 *v);

Computes the component by component multiplication vec3 . v.

MT safe.

vec3 :

A PgmVec3 object.

v :

A PgmVec3 object.

Returns :

the component by component multiplication vec3 . v in a newly allocated PgmVec3.

pgm_vec3_to_string ()

gchar *             pgm_vec3_to_string                  (PgmVec3 *vec3);

Converts vec3 to a string representation.

This function, as well as pgm_vec4_to_string(), returns a representation of vec3 in row vector notation. This is practical for most usages since it fits in one line.

MT safe.

vec3 :

A PgmVec3 object.

Returns :

a newly allocated string representing vec3 as a row.

pgm_vec4_new ()

PgmVec4 *           pgm_vec4_new                        (void);

Creates a new PgmVec4 with components initilized at 0.0f.

MT safe.

Returns :

a new PgmVec4 instance.

pgm_vec4_new_from_scalars ()

PgmVec4 *           pgm_vec4_new_from_scalars           (gfloat v0,
                                                         gfloat v1,
                                                         gfloat v2,
                                                         gfloat v3);

Creates a new PgmVec4 with components initialized with the given scalars.

MT safe.

v0 :

the 1st component.

v1 :

the 2nd component.

v2 :

the 3rd component.

v3 :

the 4th component.

Returns :

a new PgmVec4 instance.

pgm_vec4_copy ()

PgmVec4 *           pgm_vec4_copy                       (PgmVec4 *vec4);

Copies vec4.

MT safe.

vec4 :

a PgmVec4 object.

Returns :

a newly allocated PgmVec4.

pgm_vec4_free ()

void                pgm_vec4_free                       (PgmVec4 *vec4);

Frees all resources used by vec4.

MT safe.

vec4 :

A PgmVec4 object.

pgm_vec4_set_from_scalars ()

void                pgm_vec4_set_from_scalars           (PgmVec4 *vec4,
                                                         gfloat v0,
                                                         gfloat v1,
                                                         gfloat v2,
                                                         gfloat v3);

Sets the components of vec4 with the given scalars.

MT safe.

vec4 :

A PgmVec4 object.

v0 :

the 1st component.

v1 :

the 2nd component.

v2 :

the 3rd component.

v3 :

the 4th component.

pgm_vec4_set_from_vec4 ()

void                pgm_vec4_set_from_vec4              (PgmVec4 *vec4,
                                                         const PgmVec4 *v);

Sets the components of vec4 with the given vector.

MT safe.

vec4 :

A PgmVec4 object.

v :

A PgmVec4 object.

pgm_vec4_length ()

gfloat              pgm_vec4_length                     (PgmVec4 *vec4);

Retrieves the length of the vector vec4.

MT safe.

vec4 :

A PgmVec4 object.

Returns :

the length of vec4.

pgm_vec4_normalize ()

PgmVec4 *           pgm_vec4_normalize                  (PgmVec4 *vec4);

Retrieves the normalized vec4 vector.

MT safe.

vec4 :

A PgmVec4 object.

Returns :

the normalized vec4 vector, or NULL if vec4 is the zero vector.

pgm_vec4_add_scalar ()

PgmVec4 *           pgm_vec4_add_scalar                 (PgmVec4 *vec4,
                                                         gfloat s);

Computes the sum vec4 + s.

MT safe.

vec4 :

A PgmVec4 object.

s :

A scalar.

Returns :

the sum vec4 + s in a newly allocated PgmVec4.

pgm_vec4_add_vec4 ()

PgmVec4 *           pgm_vec4_add_vec4                   (PgmVec4 *vec4,
                                                         const PgmVec4 *v);

Computes the sum vec4 + v.

MT safe.

vec4 :

A PgmVec4 object.

v :

A PgmVec4 object.

Returns :

the sum vec4 + v in a newly allocated PgmVec4.

pgm_vec4_substract_scalar ()

PgmVec4 *           pgm_vec4_substract_scalar           (PgmVec4 *vec4,
                                                         gfloat s);

Computes the substraction vec4 - s.

MT safe.

vec4 :

A PgmVec4 object.

s :

A scalar.

Returns :

the substraction vec4 - s in a newly allocated PgmVec4.

pgm_vec4_substract_vec4 ()

PgmVec4 *           pgm_vec4_substract_vec4             (PgmVec4 *vec4,
                                                         const PgmVec4 *v);

Computes the substraction vec4 - v.

MT safe.

vec4 :

A PgmVec4 object.

v :

A PgmVec4 object.

Returns :

the substraction vec4 - v in a newly allocated PgmVec4.

pgm_vec4_multiply_scalar ()

PgmVec4 *           pgm_vec4_multiply_scalar            (PgmVec4 *vec4,
                                                         gfloat s);

Computes the multiplication vec4 . s.

MT safe.

vec4 :

A PgmVec4 object.

s :

A scalar.

Returns :

the multiplication vec4 . s in a newly allocated PgmVec4.

pgm_vec4_multiply_vec4 ()

PgmVec4 *           pgm_vec4_multiply_vec4              (PgmVec4 *vec4,
                                                         const PgmVec4 *v);

Computes the component by component multiplication vec4 . v.

MT safe.

vec4 :

A PgmVec4 object.

v :

A PgmVec4 object.

Returns :

the component by component multiplication vec4 . v in a newly allocated PgmVec4.

pgm_vec4_to_string ()

gchar *             pgm_vec4_to_string                  (PgmVec4 *vec4);

Converts vec4 to a string representation.

This function, as well as pgm_vec3_to_string(), returns a representation of vec4 in row vector notation. This is practical for most usages since it fits in one line.

MT safe.

vec4 :

A PgmVec4 object.

Returns :

a newly allocated string representing vec4 as a row.

pgm_mat3x3_new ()

PgmMat3x3 *         pgm_mat3x3_new                      (void);

Creates a new PgmMat3x3 with components initilized at 0.0f.

MT safe.

Returns :

a new PgmMat3x3 instance.

pgm_mat3x3_new_from_scalars ()

PgmMat3x3 *         pgm_mat3x3_new_from_scalars         (gfloat v0,
                                                         gfloat v1,
                                                         gfloat v2,
                                                         gfloat v3,
                                                         gfloat v4,
                                                         gfloat v5,
                                                         gfloat v6,
                                                         gfloat v7,
                                                         gfloat v8);

Creates a new PgmMat3x3 with components initialized with the given scalars.

MT safe.

v0 :

the 1st component of the 1st vector.

v1 :

the 2nd component of the 1st vector.

v2 :

the 3rd component of the 1st vector.

v3 :

the 1st component of the 2nd vector.

v4 :

the 2nd component of the 2nd vector.

v5 :

the 3rd component of the 2nd vector.

v6 :

the 1st component of the 3rd vector.

v7 :

the 2nd component of the 3rd vector.

v8 :

the 3rd component of the 3rd vector.

Returns :

a new PgmMat3x3 instance.

pgm_mat3x3_new_from_vec3 ()

PgmMat3x3 *         pgm_mat3x3_new_from_vec3            (const PgmVec3 *v0,
                                                         const PgmVec3 *v1,
                                                         const PgmVec3 *v2);

Creates a new PgmMat3x3 with components initialized with the given vectors.

MT safe.

v0 :

the 1st vector.

v1 :

the 2nd vector.

v2 :

the 3rd vector.

Returns :

a new PgmMat3x3 instance.

pgm_mat3x3_new_identity ()

PgmMat3x3 *         pgm_mat3x3_new_identity             (void);

Creates a new PgmMat3x3 identity matrix.

MT safe.

Returns :

a new PgmMat3x3 instance.

pgm_mat3x3_copy ()

PgmMat3x3 *         pgm_mat3x3_copy                     (PgmMat3x3 *mat3x3);

Copies mat3x3.

MT safe.

mat3x3 :

a PgmMat3x3 object.

Returns :

a newly allocated PgmMat3x3.

pgm_mat3x3_free ()

void                pgm_mat3x3_free                     (PgmMat3x3 *mat3x3);

Frees all resources used by mat3x3.

MT safe.

mat3x3 :

A PgmMat3x3 object.

pgm_mat3x3_set_from_scalars ()

void                pgm_mat3x3_set_from_scalars         (PgmMat3x3 *mat3x3,
                                                         gfloat v0,
                                                         gfloat v1,
                                                         gfloat v2,
                                                         gfloat v3,
                                                         gfloat v4,
                                                         gfloat v5,
                                                         gfloat v6,
                                                         gfloat v7,
                                                         gfloat v8);

Set the components of mat3x3 with the given scalars.

MT safe.

mat3x3 :

A PgmMat3x3 object.

v0 :

the 1st component of the 1st vector.

v1 :

the 2nd component of the 1st vector.

v2 :

the 3rd component of the 1st vector.

v3 :

the 1st component of the 2nd vector.

v4 :

the 2nd component of the 2nd vector.

v5 :

the 3rd component of the 2nd vector.

v6 :

the 1st component of the 3rd vector.

v7 :

the 2nd component of the 3rd vector.

v8 :

the 3rd component of the 3rd vector.

pgm_mat3x3_set_from_vec3 ()

void                pgm_mat3x3_set_from_vec3            (PgmMat3x3 *mat3x3,
                                                         const PgmVec3 *v0,
                                                         const PgmVec3 *v1,
                                                         const PgmVec3 *v2);

Set the components of mat3x3 with the given vectors.

MT safe.

mat3x3 :

A PgmMat3x3 object.

v0 :

the 1st vector.

v1 :

the 1st vector.

v2 :

the 1st vector.

pgm_mat3x3_set_from_mat3x3 ()

void                pgm_mat3x3_set_from_mat3x3          (PgmMat3x3 *mat3x3,
                                                         const PgmMat3x3 *m);

Sets the components of mat3x3 with the given matrix.

MT safe.

mat3x3 :

A PgmMat3x3 object.

m :

A PgmMat3x3 object.

pgm_mat3x3_is_identity ()

gboolean            pgm_mat3x3_is_identity              (PgmMat3x3 *mat3x3);

Retrieves whether or not mat3x3 is the identity matrix.

MT safe.

mat3x3 :

A PgmMat3x3 object.

Returns :

TRUE if mat3x3 is the identity matrix, FALSE otherwise.

pgm_mat3x3_inverse ()

PgmMat3x3 *         pgm_mat3x3_inverse                  (PgmMat3x3 *mat3x3);

Retrieves the inverted mat3x3 matrix.

MT safe.

mat3x3 :

A PgmMat3x3 object.

Returns :

the inverted mat3x3 in a newly allocated PgmMat3x3.

pgm_mat3x3_transpose ()

PgmMat3x3 *         pgm_mat3x3_transpose                (PgmMat3x3 *mat3x3);

Retrieves the transposed mat3x3 matrix.

MT safe.

mat3x3 :

A PgmMat3x3 object.

Returns :

the transposed mat3x3 in a newly allocated PgmMat3x3.

pgm_mat3x3_add_scalar ()

PgmMat3x3 *         pgm_mat3x3_add_scalar               (PgmMat3x3 *mat3x3,
                                                         gfloat s);

Computes the sum mat3x3 + s.

MT safe.

mat3x3 :

A PgmMat3x3 object.

s :

A scalar.

Returns :

the sum mat3x3 + s in a newly allocated PgmMat3x3.

pgm_mat3x3_add_mat3x3 ()

PgmMat3x3 *         pgm_mat3x3_add_mat3x3               (PgmMat3x3 *mat3x3,
                                                         const PgmMat3x3 *m);

Computes the sum mat3x3 + m.

MT safe.

mat3x3 :

A PgmMat3x3 object.

m :

A PgmMat3x3 object.

Returns :

the sum mat3x3 + m in a newly allocated PgmMat3x3.

pgm_mat3x3_substract_scalar ()

PgmMat3x3 *         pgm_mat3x3_substract_scalar         (PgmMat3x3 *mat3x3,
                                                         gfloat s);

Computes the substraction mat3x3 - s.

MT safe.

mat3x3 :

A PgmMat3x3 object.

s :

A scalar.

Returns :

the substraction mat3x3 - s in a newly allocated PgmMat3x3.

pgm_mat3x3_substract_mat3x3 ()

PgmMat3x3 *         pgm_mat3x3_substract_mat3x3         (PgmMat3x3 *mat3x3,
                                                         const PgmMat3x3 *m);

Computes the substraction mat3x3 - m.

MT safe.

mat3x3 :

A PgmMat3x3 object.

m :

A PgmMat3x3 object.

Returns :

the substraction mat3x3 - m in a newly allocated PgmMat3x3.

pgm_mat3x3_multiply_scalar ()

PgmMat3x3 *         pgm_mat3x3_multiply_scalar          (PgmMat3x3 *mat3x3,
                                                         gfloat s);

Computes the multiplication mat3x3 . s.

MT safe.

mat3x3 :

A PgmMat3x3 object.

s :

A scalar.

Returns :

the multiplication mat3x3 . s in a newly allocated PgmMat3x3.

pgm_mat3x3_multiply_vec3 ()

PgmVec3 *           pgm_mat3x3_multiply_vec3            (PgmMat3x3 *mat3x3,
                                                         const PgmVec3 *v);

Computes the multiplication mat3x3 . v.

MT safe.

mat3x3 :

A PgmMat3x3 object.

v :

A PgmVec3 object.

Returns :

the multiplication mat3x3 . v in a newly allocated PgmVec3.

pgm_mat3x3_multiply_mat3x3 ()

PgmMat3x3 *         pgm_mat3x3_multiply_mat3x3          (PgmMat3x3 *mat3x3,
                                                         const PgmMat3x3 *m);

Computes the multiplication mat3x3 . m. Note that it is a post-multiplication of mat3x3 by m.

MT safe.

mat3x3 :

A PgmMat3x3 object.

m :

A PgmMat3x3 object.

Returns :

the multiplication mat3x3 . m in a newly allocated PgmMat3x3.

pgm_mat3x3_to_string ()

gchar *             pgm_mat3x3_to_string                (PgmMat3x3 *mat3x3);

Converts mat3x3 to a string representation.

MT safe.

mat3x3 :

A PgmMat3x3 object.

Returns :

a newly allocated string representing mat3x3.

pgm_mat4x4_new ()

PgmMat4x4 *         pgm_mat4x4_new                      (void);

Creates a new PgmMat4x4 with components initilized at 0.0f.

MT safe.

Returns :

a new PgmMat4x4 instance.

pgm_mat4x4_new_from_scalars ()

PgmMat4x4 *         pgm_mat4x4_new_from_scalars         (gfloat v0,
                                                         gfloat v1,
                                                         gfloat v2,
                                                         gfloat v3,
                                                         gfloat v4,
                                                         gfloat v5,
                                                         gfloat v6,
                                                         gfloat v7,
                                                         gfloat v8,
                                                         gfloat v9,
                                                         gfloat v10,
                                                         gfloat v11,
                                                         gfloat v12,
                                                         gfloat v13,
                                                         gfloat v14,
                                                         gfloat v15);

Creates a new PgmMat4x4 with components initialized with the given scalars.

MT safe.

v0 :

the 1st component of the 1st vector.

v1 :

the 2nd component of the 1st vector.

v2 :

the 3rd component of the 1st vector.

v3 :

the 4th component of the 1st vector.

v4 :

the 1st component of the 2nd vector.

v5 :

the 2nd component of the 2nd vector.

v6 :

the 3rd component of the 2nd vector.

v7 :

the 4th component of the 2nd vector.

v8 :

the 1st component of the 3rd vector.

v9 :

the 2nd component of the 3rd vector.

v10 :

the 3rd component of the 3rd vector.

v11 :

the 4th component of the 3rd vector.

v12 :

the 1st component of the 4th vector.

v13 :

the 2nd component of the 4th vector.

v14 :

the 3rd component of the 4th vector.

v15 :

the 4th component of the 4th vector.

Returns :

a new PgmMat4x4 instance.

pgm_mat4x4_new_from_vec4 ()

PgmMat4x4 *         pgm_mat4x4_new_from_vec4            (const PgmVec4 *v0,
                                                         const PgmVec4 *v1,
                                                         const PgmVec4 *v2,
                                                         const PgmVec4 *v3);

Creates a new PgmMat4x4 with components initialized with the given vectors.

MT safe.

v0 :

the 1st vector.

v1 :

the 2nd vector.

v2 :

the 3rd vector.

v3 :

the 4th vector.

Returns :

a new PgmMat4x4 instance.

pgm_mat4x4_new_identity ()

PgmMat4x4 *         pgm_mat4x4_new_identity             (void);

Creates a new PgmMat4x4 identity matrix.

MT safe.

Returns :

a new PgmMat4x4 instance.

pgm_mat4x4_new_predefined ()

PgmMat4x4 *         pgm_mat4x4_new_predefined           (PgmMat4x4Predefined predefined);

Creates a new PgmMat4x4 matrix corresponding to predefined.

MT safe.

predefined :

The predefined 4x4 matrix.

Returns :

a new PgmMat4x4 instance.

pgm_mat4x4_new_translate_from_vec3 ()

PgmMat4x4 *         pgm_mat4x4_new_translate_from_vec3  (const PgmVec3 *t);

Creates a new PgmMat4x4 translation matrix.

MT safe.

t :

A PgmVec3 object representing the translation.

Returns :

a new PgmMat4x4 instance.

pgm_mat4x4_new_translate_from_scalars ()

PgmMat4x4 *         pgm_mat4x4_new_translate_from_scalars
                                                        (gfloat tx,
                                                         gfloat ty,
                                                         gfloat tz);

Creates a new PgmMat4x4 translation matrix.

MT safe.

tx :

The translation on the x cardinal axis.

ty :

The translation on the y cardinal axis.

tz :

The translation on the z cardinal axis.

Returns :

a new PgmMat4x4 instance.

pgm_mat4x4_new_scale_from_vec3 ()

PgmMat4x4 *         pgm_mat4x4_new_scale_from_vec3      (const PgmVec3 *s);

Creates a new PgmMat4x4 scaling matrix.

MT safe.

s :

A PgmVec3 object representing the scaling.

Returns :

a new PgmMat4x4 instance.

pgm_mat4x4_new_scale_from_scalars ()

PgmMat4x4 *         pgm_mat4x4_new_scale_from_scalars   (gfloat sx,
                                                         gfloat sy,
                                                         gfloat sz);

Creates a new PgmMat4x4 scaling matrix.

MT safe.

sx :

The scale on the x cardinal axis.

sy :

The scale on the y cardinal axis.

sz :

The scale on the z cardinal axis.

Returns :

a new PgmMat4x4 instance.

pgm_mat4x4_new_rotate_x ()

PgmMat4x4 *         pgm_mat4x4_new_rotate_x             (gfloat angle);

Creates a new PgmMat4x4 matrix for a rotation about the x cardinal axis.

MT safe.

angle :

The angle of rotation, in radians.

Returns :

a new PgmMat4x4 instance.

pgm_mat4x4_new_rotate_y ()

PgmMat4x4 *         pgm_mat4x4_new_rotate_y             (gfloat angle);

Creates a new PgmMat4x4 matrix for a rotation about the y cardinal axis.

MT safe.

angle :

The angle of rotation, in radians.

Returns :

a new PgmMat4x4 instance.

pgm_mat4x4_new_rotate_z ()

PgmMat4x4 *         pgm_mat4x4_new_rotate_z             (gfloat angle);

Creates a new PgmMat4x4 matrix for a rotation about the z cardinal axis.

MT safe.

angle :

The angle of rotation, in radians.

Returns :

a new PgmMat4x4 instance.

pgm_mat4x4_new_rotate_axis_from_vec3 ()

PgmMat4x4 *         pgm_mat4x4_new_rotate_axis_from_vec3
                                                        (gfloat angle,
                                                         const PgmVec3 *axis);

Creates a new PgmMat4x4 matrix for a rotation about axis.

MT safe.

angle :

The angle of rotation, in radians.

axis :

A PgmVec3 object representing the axis of rotation.

Returns :

a new PgmMat4x4 instance.

pgm_mat4x4_new_rotate_axis_from_scalars ()

PgmMat4x4 *         pgm_mat4x4_new_rotate_axis_from_scalars
                                                        (gfloat angle,
                                                         gfloat axis_x,
                                                         gfloat axis_y,
                                                         gfloat axis_z);

Creates a new PgmMat4x4 matrix for a rotation about the given axis.

MT safe.

angle :

The angle of rotation, in radians.

axis_x :

The x component of the axis of rotation.

axis_y :

The y component of the axis of rotation.

axis_z :

The z component of the axis of rotation.

Returns :

a new PgmMat4x4 instance.

pgm_mat4x4_copy ()

PgmMat4x4 *         pgm_mat4x4_copy                     (PgmMat4x4 *mat4x4);

Copies mat4x4.

MT safe.

mat4x4 :

a PgmMat4x4 object.

Returns :

a newly allocated PgmMat4x4.

pgm_mat4x4_free ()

void                pgm_mat4x4_free                     (PgmMat4x4 *mat4x4);

Frees all resources used by mat4x4.

MT safe.

mat4x4 :

A PgmMat4x4 object.

pgm_mat4x4_set_from_scalars ()

void                pgm_mat4x4_set_from_scalars         (PgmMat4x4 *mat4x4,
                                                         gfloat v0,
                                                         gfloat v1,
                                                         gfloat v2,
                                                         gfloat v3,
                                                         gfloat v4,
                                                         gfloat v5,
                                                         gfloat v6,
                                                         gfloat v7,
                                                         gfloat v8,
                                                         gfloat v9,
                                                         gfloat v10,
                                                         gfloat v11,
                                                         gfloat v12,
                                                         gfloat v13,
                                                         gfloat v14,
                                                         gfloat v15);

Set the components of mat4x4 with the given scalars.

MT safe.

mat4x4 :

A PgmMat4x4 object.

v0 :

the 1st component of the 1st vector.

v1 :

the 2nd component of the 1st vector.

v2 :

the 3rd component of the 1st vector.

v3 :

the 4th component of the 1st vector.

v4 :

the 1st component of the 2nd vector.

v5 :

the 2nd component of the 2nd vector.

v6 :

the 3rd component of the 2nd vector.

v7 :

the 4th component of the 2nd vector.

v8 :

the 1st component of the 3rd vector.

v9 :

the 2nd component of the 3rd vector.

v10 :

the 3rd component of the 3rd vector.

v11 :

the 4th component of the 3rd vector.

v12 :

the 1st component of the 4th vector.

v13 :

the 2nd component of the 4th vector.

v14 :

the 3rd component of the 4th vector.

v15 :

the 4th component of the 4th vector.

pgm_mat4x4_set_from_vec4 ()

void                pgm_mat4x4_set_from_vec4            (PgmMat4x4 *mat4x4,
                                                         const PgmVec4 *v0,
                                                         const PgmVec4 *v1,
                                                         const PgmVec4 *v2,
                                                         const PgmVec4 *v3);

Set the components of mat4x4 with the given vectors.

MT safe.

mat4x4 :

A PgmMat4x4 object.

v0 :

the 1st vector.

v1 :

the 2nd vector.

v2 :

the 3rd vector.

v3 :

the 4th vector.

pgm_mat4x4_set_from_mat4x4 ()

void                pgm_mat4x4_set_from_mat4x4          (PgmMat4x4 *mat4x4,
                                                         const PgmMat4x4 *m);

Sets the components of mat4x4 with the given matrix.

MT safe.

mat4x4 :

A PgmMat4x4 object.

m :

A PgmMat4x4 object.

pgm_mat4x4_is_identity ()

gboolean            pgm_mat4x4_is_identity              (PgmMat4x4 *mat4x4);

Retrieves whether or not mat4x4 is the identity matrix.

MT safe.

mat4x4 :

A PgmMat4x4 object.

Returns :

TRUE if mat4x4 is the identity matrix, FALSE otherwise.

pgm_mat4x4_inverse ()

PgmMat4x4 *         pgm_mat4x4_inverse                  (PgmMat4x4 *mat4x4);

Retrieves the inverted mat4x4 matrix.

MT safe.

mat4x4 :

A PgmMat4x4 object.

Returns :

the inverted mat4x4 in a newly allocated PgmMat4x4, or NULL if mat4x4 is non-invertible (singular).

pgm_mat4x4_transpose ()

PgmMat4x4 *         pgm_mat4x4_transpose                (PgmMat4x4 *mat4x4);

Retrieves the transposed mat4x4 matrix.

MT safe.

mat4x4 :

A PgmMat4x4 object.

Returns :

the transposed mat4x4 in a newly allocated PgmMat4x4.

pgm_mat4x4_translate_from_vec3 ()

void                pgm_mat4x4_translate_from_vec3      (PgmMat4x4 *mat4x4,
                                                         const PgmVec3 *t);

Post multiplies mat4x4 by a translation matrix with the product replacing mat4x4.

MT safe.

mat4x4 :

A PgmMat4x4 object.

t :

A PgmVec3 object representing the translation to apply.

pgm_mat4x4_translate_from_scalars ()

void                pgm_mat4x4_translate_from_scalars   (PgmMat4x4 *mat4x4,
                                                         gfloat tx,
                                                         gfloat ty,
                                                         gfloat tz);

Post multiplies mat4x4 by a translation matrix with the product replacing mat4x4.

MT safe.

mat4x4 :

A PgmMat4x4 object.

tx :

The translation on the x cardinal axis.

ty :

The translation on the y cardinal axis.

tz :

The translation on the z cardinal axis.

pgm_mat4x4_scale_from_vec3 ()

void                pgm_mat4x4_scale_from_vec3          (PgmMat4x4 *mat4x4,
                                                         const PgmVec3 *s);

Post multiplies mat4x4 by a scaling matrix with the product replacing mat4x4.

MT safe.

mat4x4 :

A PgmMat4x4 object.

s :

A PgmVec3 object representing the scale to apply.

pgm_mat4x4_scale_from_scalars ()

void                pgm_mat4x4_scale_from_scalars       (PgmMat4x4 *mat4x4,
                                                         gfloat sx,
                                                         gfloat sy,
                                                         gfloat sz);

Post multiplies mat4x4 by a scaling matrix with the product replacing mat4x4.

MT safe.

mat4x4 :

A PgmMat4x4 object.

sx :

The scale to apply on the x axis.

sy :

The scale to apply on the y axis.

sz :

The scale to apply on the z axis.

pgm_mat4x4_rotate_x ()

void                pgm_mat4x4_rotate_x                 (PgmMat4x4 *mat4x4,
                                                         gfloat angle);

Post multiplies mat4x4 by a rotation matrix with the product replacing mat4x4.

MT safe.

mat4x4 :

A PgmMat4x4 object.

angle :

The angle of rotation, in radians.

pgm_mat4x4_rotate_y ()

void                pgm_mat4x4_rotate_y                 (PgmMat4x4 *mat4x4,
                                                         gfloat angle);

Post multiplies mat4x4 by a rotation matrix with the product replacing mat4x4.

MT safe.

mat4x4 :

A PgmMat4x4 object.

angle :

The angle of rotation, in radians.

pgm_mat4x4_rotate_z ()

void                pgm_mat4x4_rotate_z                 (PgmMat4x4 *mat4x4,
                                                         gfloat angle);

Post multiplies mat4x4 by a rotation matrix with the product replacing mat4x4.

MT safe.

mat4x4 :

A PgmMat4x4 object.

angle :

The angle of rotation, in radians.

pgm_mat4x4_rotate_axis_from_vec3 ()

void                pgm_mat4x4_rotate_axis_from_vec3    (PgmMat4x4 *mat4x4,
                                                         gfloat angle,
                                                         const PgmVec3 *axis);

Post multiplies mat4x4 by a rotation matrix with the product replacing mat4x4.

MT safe.

mat4x4 :

A PgmMat4x4 object.

angle :

The angle of rotation, in radians.

axis :

A PgmVec3 object representing the axis of rotation.

pgm_mat4x4_rotate_axis_from_scalars ()

void                pgm_mat4x4_rotate_axis_from_scalars (PgmMat4x4 *mat4x4,
                                                         gfloat angle,
                                                         gfloat axis_x,
                                                         gfloat axis_y,
                                                         gfloat axis_z);

Post multiplies mat4x4 by a rotation matrix with the product replacing mat4x4.

MT safe.

mat4x4 :

A PgmMat4x4 object.

angle :

The angle of rotation, in radians.

axis_x :

The x component of the axis of rotation.

axis_y :

The y component of the axis of rotation.

axis_z :

The z component of the axis of rotation.

pgm_mat4x4_add_scalar ()

PgmMat4x4 *         pgm_mat4x4_add_scalar               (PgmMat4x4 *mat4x4,
                                                         gfloat s);

Computes the sum mat4x4 + s.

MT safe.

mat4x4 :

A PgmMat4x4 object.

s :

A scalar.

Returns :

the sum mat4x4 + s in a newly allocated PgmMat4x4.

pgm_mat4x4_add_mat4x4 ()

PgmMat4x4 *         pgm_mat4x4_add_mat4x4               (PgmMat4x4 *mat4x4,
                                                         const PgmMat4x4 *m);

Computes the sum mat4x4 + m.

MT safe.

mat4x4 :

A PgmMat4x4 object.

m :

A PgmMat4x4 object.

Returns :

the sum mat4x4 + m in a newly allocated PgmMat4x4.

pgm_mat4x4_substract_scalar ()

PgmMat4x4 *         pgm_mat4x4_substract_scalar         (PgmMat4x4 *mat4x4,
                                                         gfloat s);

Computes the substraction mat4x4 - s.

MT safe.

mat4x4 :

A PgmMat4x4 object.

s :

A scalar.

Returns :

the substraction mat4x4 - s in a newly allocated PgmMat4x4.

pgm_mat4x4_substract_mat4x4 ()

PgmMat4x4 *         pgm_mat4x4_substract_mat4x4         (PgmMat4x4 *mat4x4,
                                                         const PgmMat4x4 *m);

Computes the substraction mat4x4 - m.

MT safe.

mat4x4 :

A PgmMat4x4 object.

m :

A PgmMat4x4 object.

Returns :

the substraction mat4x4 - m in a newly allocated PgmMat4x4.

pgm_mat4x4_multiply_scalar ()

PgmMat4x4 *         pgm_mat4x4_multiply_scalar          (PgmMat4x4 *mat4x4,
                                                         gfloat s);

Computes the multiplication mat4x4 . s.

MT safe.

mat4x4 :

A PgmMat4x4 object.

s :

A scalar.

Returns :

the multiplication mat4x4 . s in a newly allocated PgmMat4x4.

pgm_mat4x4_multiply_vec4 ()

PgmVec4 *           pgm_mat4x4_multiply_vec4            (PgmMat4x4 *mat4x4,
                                                         const PgmVec4 *v);

Computes the multiplication mat4x4 . v.

MT safe.

mat4x4 :

A PgmMat4x4 object.

v :

A PgmVec4 object.

Returns :

the multiplication mat4x4 . v in a newly allocated PgmVec4.

pgm_mat4x4_multiply_mat4x4 ()

PgmMat4x4 *         pgm_mat4x4_multiply_mat4x4          (PgmMat4x4 *mat4x4,
                                                         const PgmMat4x4 *m);

Computes the multiplication mat4x4 . m. Note that this a post-multiplication of mat4x4 by m.

MT safe.

mat4x4 :

A PgmMat4x4 object.

m :

A PgmMat4x4 object.

Returns :

the multiplication mat4x4 . m in a newly allocated PgmMat4x4.

pgm_mat4x4_to_string ()

gchar *             pgm_mat4x4_to_string                (PgmMat4x4 *mat4x4);

Converts mat4x4 to a string representation.

MT safe.

mat4x4 :

A PgmMat4x4 object.

Returns :

a newly allocated string representing mat4x4.

pgm_intersection_line_plane ()

PgmVec3 *           pgm_intersection_line_plane         (const PgmVec3 *l1,
                                                         const PgmVec3 *l2,
                                                         const PgmVec3 *p,
                                                         const PgmVec3 *pu,
                                                         const PgmVec3 *pv);

Retrieves the intersection point of the line defined by l1 and l2 with the plane defined by p, pu and pv.

pu and pv must not be colinear. If the line belongs to the plane then it's considered as if there is no intersection.

MT safe.

l1 :

A PgmVec3 representing a 1st point of the line.

l2 :

A PgmVec3 representing a 2nd point of the line.

p :

A PgmVec3 representing point of the plane.

pu :

A PgmVec3 representing a 1st vector colinear to the plane.

pv :

A PgmVec3 representing a 2nd vector colinear to the plane.

Returns :

the intersection point in a newly allocated PgmVec3 if any, NULL otherwise.

pgm_point_belongs_rectangle ()

gboolean            pgm_point_belongs_rectangle         (const PgmVec3 *p,
                                                         const PgmVec3 *r,
                                                         const PgmVec3 *ru,
                                                         const PgmVec3 *rv);

Retrieves if the point p belongs to the rectangle defined by the point r and the vectors ru and rv.

MT safe.

p :

A PgmVec3 representing the point.

r :

A PgmVec3 representing the top-left corner position of the rectangle.

ru :

A PgmVec3 representing the top edge of the rectangle.

rv :

a 3 components vector defining the left edge of the rectangle.

Returns :

TRUE if p belongs to the rectangle, FALSE otherwise.
pigment-0.3.17/docs/pgm/html/right.png0000644000175000017500000000073011205035140014457 00000000000000PNG  IHDRw=bKGD pHYs  ~tIME2 I%=eIDATx!o@.'**M0$$?1~vIeEuLl&4䝠Bݛ|>$ݶoc Part II. Pigment Core Reference

Part II. Pigment Core Reference

The Pigment core library reference.

Table of Contents

Pgm — A library to create rich application user interfaces.
PgmCanvas — A virtual positioning class for drawables.
PgmCommon — Various functions used for common tasks.
PgmDrawable — A base class used for embedding media types.
PgmEvents — Various structs and functions used for events handling.
PgmImage — An image drawable supporting various media.
PgmImageSink — A GStreamer image sink outputing frames to image drawables.
PgmLinearAlgebra — Various linear algebra objects and utility functions.
PgmPlugin — Various structs and macros used for plugins handling.
PgmText — A text drawable.
PgmVersion — Pigment version macros.
PgmViewport — An abstract class doing a visual projection of a canvas.
PgmViewportFactory — A factory creating viewports.
pigment-0.3.17/docs/pgm/html/scaled_layout.png0000644000175000017500000000446311205035140016201 00000000000000PNG  IHDR`@4rbKGD pHYs  tIME6]ZVIDATx\MlGqR$X{C҃MʏT T(Dp@4R\*TJDrD)Ej0UW4ins^ٛ7].4J **hm WܜH 33}%~a*鹂-["hl}E$*FGG6[/j146l]% D,vGlY#a!9r0=h$ϳ[7իǞ='`| @U݋k"J4(.W mP^Y_~9^~>|j?֊?k'yuLƍK{~Xz4U-)COE=?ԅsYn,%`dd-?0/8B-<xR}o;wN;L~ȕzJ ;GF͎"`zz Mv+.dXĄBZѓ%&xД{8rQTtڍsNVp>oMxY_!CD;M{L͍hV0W54tj_FGf=\eC#z_2 CC{07bv"%Yeڵ}H$Tt-,ma/KDLϞcx~-0H}'>@D}"`rɤo |9`dO0:Zgna\Cd˛ne݆W,ujgz@<@;8TPlv(QH+D81O6WtaYp+t눓Ɇ@M A zZ1<x!%UyM!S;QyX*F-+ty9x- 5 FC\ p:SH^'2cw,"(LOxFM?PLPggo֔ 2l^֓4Rԡtaܴ)Sy zsX\쬏za(+IGIAES_'kڪ7rhm+Wxuʻb"I6Tj'F>l:l?!,P̊pJSTġ&Dw%IU>nJB`vŹ"å1} ֯G犔T '+} 0WטeK.W Lz1(b ##_&(M ]aY ^< Bss]ݨj:d7J/Zkl̈́\jcH Mɋ灣G%vDGfa1;fLa_͆˚w=#4Dfʌ^S_ \df6hř3pUm[{l)ᩑݲ%ANPO>yt:rz^Nxcz;8sfJ?+ywL=3ܦ_Qf.^ T%uu58qb6I.+l0fnռ>l-FF>$Պ̐Ȥ%,Vr9 /q_BdܤW׶nxgpΟ?%,x[ >/}:Hx 8'55ر_c+G鹝#0 ]q> "r` ):ܺՍwwAڵUlzXCQwύht <وẊO17׀LyÑǓBKKmm VINƔ+?4h5;JIENDB`pigment-0.3.17/docs/pgm/html/pigment.devhelp20000644000175000017500000020302511205035140015734 00000000000000 pigment-0.3.17/docs/pgm/html/pigment-PgmVersion.html0000644000175000017500000001147411205035140017263 00000000000000 PgmVersion

PgmVersion

PgmVersion — Pigment version macros.

Synopsis


#include <pgm/pgm.h>

#define             PGM_VERSION_MAJOR
#define             PGM_VERSION_MINOR
#define             PGM_VERSION_MICRO
#define             PGM_VERSION_NANO

Description

You can use the macros to keep the Pigment version information in your application.

Use the pgm_version() function if you want to know which version of Pigment you are currently linked against.

The version macros get defined by including "pgm/pgm.h".

Last reviewed on 2007-04-12 (0.1.5)

Details

PGM_VERSION_MAJOR

#define PGM_VERSION_MAJOR (0)

The major version of Pigment at compile time.


PGM_VERSION_MINOR

#define PGM_VERSION_MINOR (3)

The minor version of Pigment at compile time.


PGM_VERSION_MICRO

#define PGM_VERSION_MICRO (17)

The micro version of Pigment at compile time.


PGM_VERSION_NANO

#define PGM_VERSION_NANO (0)

The nano version of Pigment at compile time. Actual releases have 0, Subversion versions have 1, prerelease versions have [2-n].

pigment-0.3.17/docs/pgm/html/PgmText.html0000644000175000017500000035004411205035140015120 00000000000000 PgmText

PgmText

PgmText — A text drawable.

Synopsis


#include <pgm/pgm.h>

enum                PgmTextEllipsize;
enum                PgmTextAlignment;
enum                PgmTextWrap;
enum                PgmTextGravity;
enum                PgmTextStretch;
enum                PgmTextStyle;
enum                PgmTextVariant;
enum                PgmTextWeight;
enum                PgmTextShadowPosition;
                    PgmText;
PgmDrawable *       pgm_text_new                        (const gchar *markup);
PgmError            pgm_text_set_label                  (PgmText *text,
                                                         const gchar *label);
PgmError            pgm_text_set_markup                 (PgmText *text,
                                                         const gchar *markup);
PgmError            pgm_text_get_label                  (PgmText *text,
                                                         gchar **label);
PgmError            pgm_text_set_font_family            (PgmText *text,
                                                         const gchar *font_family);
PgmError            pgm_text_get_font_family            (PgmText *text,
                                                         gchar **font_family);
PgmError            pgm_text_set_font_height            (PgmText *text,
                                                         gfloat font_height);
PgmError            pgm_text_get_font_height            (PgmText *text,
                                                         gfloat *font_height);
PgmError            pgm_text_set_ellipsize              (PgmText *text,
                                                         PgmTextEllipsize ellipsize);
PgmError            pgm_text_get_ellipsize              (PgmText *text,
                                                         PgmTextEllipsize *ellipsize);
PgmError            pgm_text_set_justify                (PgmText *text,
                                                         gboolean justify);
PgmError            pgm_text_get_justify                (PgmText *text,
                                                         gboolean *justify);
PgmError            pgm_text_set_alignment              (PgmText *text,
                                                         PgmTextAlignment alignment);
PgmError            pgm_text_get_alignment              (PgmText *text,
                                                         PgmTextAlignment *alignment);
PgmError            pgm_text_set_wrap                   (PgmText *text,
                                                         PgmTextWrap wrap);
PgmError            pgm_text_get_wrap                   (PgmText *text,
                                                         PgmTextWrap *wrap);
PgmError            pgm_text_set_gravity                (PgmText *text,
                                                         PgmTextGravity gravity);
PgmError            pgm_text_get_gravity                (PgmText *text,
                                                         PgmTextGravity *gravity);
PgmError            pgm_text_set_stretch                (PgmText *text,
                                                         PgmTextStretch stretch);
PgmError            pgm_text_get_stretch                (PgmText *text,
                                                         PgmTextStretch *stretch);
PgmError            pgm_text_set_style                  (PgmText *text,
                                                         PgmTextStyle style);
PgmError            pgm_text_get_style                  (PgmText *text,
                                                         PgmTextStyle *style);
PgmError            pgm_text_set_variant                (PgmText *text,
                                                         PgmTextVariant variant);
PgmError            pgm_text_get_variant                (PgmText *text,
                                                         PgmTextVariant *variant);
PgmError            pgm_text_set_weight                 (PgmText *text,
                                                         PgmTextWeight weight);
PgmError            pgm_text_get_weight                 (PgmText *text,
                                                         PgmTextWeight *weight);
PgmError            pgm_text_set_multiline              (PgmText *text,
                                                         gboolean multiline);
PgmError            pgm_text_get_multiline              (PgmText *text,
                                                         gboolean *multiline);
PgmError            pgm_text_set_line_spacing           (PgmText *text,
                                                         gfloat line_spacing);
PgmError            pgm_text_get_line_spacing           (PgmText *text,
                                                         gfloat *line_spacing);
PgmError            pgm_text_set_color                  (PgmText *text,
                                                         guchar red,
                                                         guchar green,
                                                         guchar blue,
                                                         guchar alpha);
PgmError            pgm_text_get_color                  (PgmText *text,
                                                         guchar *red,
                                                         guchar *green,
                                                         guchar *blue,
                                                         guchar *alpha);
PgmError            pgm_text_set_outline_color          (PgmText *text,
                                                         guchar red,
                                                         guchar green,
                                                         guchar blue,
                                                         guchar alpha);
PgmError            pgm_text_get_outline_color          (PgmText *text,
                                                         guchar *red,
                                                         guchar *green,
                                                         guchar *blue,
                                                         guchar *alpha);
PgmError            pgm_text_set_outline_width          (PgmText *text,
                                                         gfloat width);
PgmError            pgm_text_get_outline_width          (PgmText *text,
                                                         gfloat *width);
PgmError            pgm_text_set_cast_shadow            (PgmText *text,
                                                         gboolean cast_shadow);
PgmError            pgm_text_get_cast_shadow            (PgmText *text,
                                                         gboolean *cast_shadow);
PgmError            pgm_text_set_shadow_position        (PgmText *text,
                                                         PgmTextShadowPosition position);
PgmError            pgm_text_get_shadow_position        (PgmText *text,
                                                         PgmTextShadowPosition *position);
PgmError            pgm_text_set_shadow_color           (PgmText *text,
                                                         guchar red,
                                                         guchar green,
                                                         guchar blue,
                                                         guchar alpha);
PgmError            pgm_text_get_shadow_color           (PgmText *text,
                                                         guchar *red,
                                                         guchar *green,
                                                         guchar *blue,
                                                         guchar *alpha);

Object Hierarchy

  GObject
   +----GstObject
         +----PgmDrawable
               +----PgmText

Description

PgmText is a drawable displaying a text with support for multiple lines, markups and several properties. The specified text is then arranged to fit inside the drawable size. Fonts are specified through face name and attributes. The font height is given in canvas coordinates.

FIXME: • Describe the markup syntax. • Describe the different capabilities.

Last reviewed on 2007-05-18 (0.1.5)

Details

enum PgmTextEllipsize

typedef enum {
  PGM_TEXT_ELLIPSIZE_NONE,
  PGM_TEXT_ELLIPSIZE_START,
  PGM_TEXT_ELLIPSIZE_MIDDLE,
  PGM_TEXT_ELLIPSIZE_END
} PgmTextEllipsize;

The different text ellipsizings.

PGM_TEXT_ELLIPSIZE_NONE

No ellipsization.

PGM_TEXT_ELLIPSIZE_START

Omit characters at the start of the text.

PGM_TEXT_ELLIPSIZE_MIDDLE

Omit characters in the middle of the text.

PGM_TEXT_ELLIPSIZE_END

Omit characters at the end of the text.

enum PgmTextAlignment

typedef enum {
  PGM_TEXT_ALIGN_LEFT,
  PGM_TEXT_ALIGN_CENTER,
  PGM_TEXT_ALIGN_RIGHT
} PgmTextAlignment;

The different text alignments.

PGM_TEXT_ALIGN_LEFT

Put all available space on the right.

PGM_TEXT_ALIGN_CENTER

Center the line within the available space.

PGM_TEXT_ALIGN_RIGHT

Put all available space on the left.

enum PgmTextWrap

typedef enum {
  PGM_TEXT_WRAP_WORD,
  PGM_TEXT_WRAP_CHAR,
  PGM_TEXT_WRAP_WORD_CHAR
} PgmTextWrap;

The different text wrappings.

PGM_TEXT_WRAP_WORD

Wrap lines at word boundaries.

PGM_TEXT_WRAP_CHAR

Wrap lines at character boundaries.

PGM_TEXT_WRAP_WORD_CHAR

Wrap lines at word boundaries, but fall back to character boundaries if there is not enough space for a full word.

enum PgmTextGravity

typedef enum {
  PGM_TEXT_GRAVITY_SOUTH,
  PGM_TEXT_GRAVITY_EAST,
  PGM_TEXT_GRAVITY_NORTH,
  PGM_TEXT_GRAVITY_WEST,
  PGM_TEXT_GRAVITY_AUTO
} PgmTextGravity;

The different text gravities.

PGM_TEXT_GRAVITY_SOUTH

Glyphs stand upright.

PGM_TEXT_GRAVITY_EAST

Glyphs are rotated 90 degrees clockwise.

PGM_TEXT_GRAVITY_NORTH

Glyphs are upside-down.

PGM_TEXT_GRAVITY_WEST

Glyphs are rotated 90 degrees counter-clockwise.

PGM_TEXT_GRAVITY_AUTO

Gravity is resolved automatically.

enum PgmTextStretch

typedef enum {
  PGM_TEXT_STRETCH_CONDENSED,
  PGM_TEXT_STRETCH_NORMAL,
  PGM_TEXT_STRETCH_EXPANDED
} PgmTextStretch;

The different text stretchings.

PGM_TEXT_STRETCH_CONDENSED

Condensed width.

PGM_TEXT_STRETCH_NORMAL

Normal width.

PGM_TEXT_STRETCH_EXPANDED

Expanded width.

enum PgmTextStyle

typedef enum {
  PGM_TEXT_STYLE_NORMAL,
  PGM_TEXT_STYLE_OBLIQUE,
  PGM_TEXT_STYLE_ITALIC
} PgmTextStyle;

The different text styles.

PGM_TEXT_STYLE_NORMAL

The font is upright.

PGM_TEXT_STYLE_OBLIQUE

The font is slanted, but in a roman style.

PGM_TEXT_STYLE_ITALIC

The font is slanted in an italic style.

enum PgmTextVariant

typedef enum {
  PGM_TEXT_VARIANT_NORMAL,
  PGM_TEXT_VARIANT_SMALL_CAPS
} PgmTextVariant;

The different text variants.

PGM_TEXT_VARIANT_NORMAL

Normal font.

PGM_TEXT_VARIANT_SMALL_CAPS

Font with the lower case characters replaced by smaller variants of the capital characters.

enum PgmTextWeight

typedef enum {
  PGM_TEXT_WEIGHT_LIGHT,
  PGM_TEXT_WEIGHT_NORMAL,
  PGM_TEXT_WEIGHT_BOLD
} PgmTextWeight;

The different text weights.

PGM_TEXT_WEIGHT_LIGHT

The light weight.

PGM_TEXT_WEIGHT_NORMAL

The normal weight.

PGM_TEXT_WEIGHT_BOLD

The bold weight.

enum PgmTextShadowPosition

typedef enum {
  PGM_TEXT_SHADOW_NORTH      = (1 << 0),
  PGM_TEXT_SHADOW_SOUTH      = (1 << 1),
  PGM_TEXT_SHADOW_WEST       = (1 << 2),
  PGM_TEXT_SHADOW_EAST       = (1 << 3),
  PGM_TEXT_SHADOW_NORTH_WEST = (PGM_TEXT_SHADOW_NORTH | PGM_TEXT_SHADOW_WEST),
  PGM_TEXT_SHADOW_NORTH_EAST = (PGM_TEXT_SHADOW_NORTH | PGM_TEXT_SHADOW_EAST),
  PGM_TEXT_SHADOW_SOUTH_WEST = (PGM_TEXT_SHADOW_SOUTH | PGM_TEXT_SHADOW_WEST),
  PGM_TEXT_SHADOW_SOUTH_EAST = (PGM_TEXT_SHADOW_SOUTH | PGM_TEXT_SHADOW_EAST)
} PgmTextShadowPosition;

The text's shadow cast position.

PGM_TEXT_SHADOW_NORTH

Shadow casted to the North.

PGM_TEXT_SHADOW_SOUTH

Shadow casted to the South.

PGM_TEXT_SHADOW_WEST

Shadow casted to the West.

PGM_TEXT_SHADOW_EAST

Shadow casted to the East.

PGM_TEXT_SHADOW_NORTH_WEST

Shadow casted to the North/West.

PGM_TEXT_SHADOW_NORTH_EAST

Shadow casted to the North/East.

PGM_TEXT_SHADOW_SOUTH_WEST

Shadow casted to the South/West.

PGM_TEXT_SHADOW_SOUTH_EAST

Shadow casted to the South/East.

PgmText

typedef struct {
  /* Label */
  gchar *label;

  /* Font properties */
  gchar          *font_family;
  PgmTextGravity  gravity;
  PgmTextStretch  stretch;
  PgmTextStyle    style;
  PgmTextVariant  variant;
  PgmTextWeight   weight;
  gfloat          height;

  /* Text adjustment */
  PgmTextEllipsize ellipsize;
  PgmTextAlignment alignment;
  PgmTextWrap      wrap;
  gfloat           line_spacing;
  gboolean         justify;
  gboolean         multiline;

  gboolean cast_shadow;
  PgmTextShadowPosition shadow_position;
  gfloat outline_width;

  /* Colors */
  guchar r, g, b, a;
  guchar shadow_r, shadow_g, shadow_b, shadow_a;
  guchar outline_r, outline_g, outline_b, outline_a;
} PgmText;

The PgmText structure.

gchar *label;

the text label.

gchar *font_family;

the text font family.

PgmTextGravity gravity;

the text gravity.

PgmTextStretch stretch;

the text stretching.

PgmTextStyle style;

the text style.

PgmTextVariant variant;

the text variant.

PgmTextWeight weight;

the text weight.

gfloat height;

the text height in proportion to the drawable height.

PgmTextEllipsize ellipsize;

the text ellipsizing.

PgmTextAlignment alignment;

the text alignment.

PgmTextWrap wrap;

the text wrapping.

gfloat line_spacing;

the space between to lines of text in canvas coordinates.

gboolean justify;

the text justification.

gboolean multiline;

the text multilining.

gboolean cast_shadow;

the text shadow casting state.

PgmTextShadowPosition shadow_position;

the text shadow position.

gfloat outline_width;

the text outline width in canvas coordinates.

guchar r;

the text red color component.

guchar g;

the text blue color component.

guchar b;

the text green color component.

guchar a;

the text alpha color component.

guchar shadow_r;

the text shadow red color component.

guchar shadow_g;

the text shadow blue color component.

guchar shadow_b;

the text shadow green color component.

guchar shadow_a;

the text shadow alpha color component.

guchar outline_r;

the text outline red color component.

guchar outline_g;

the text outline blue color component.

guchar outline_b;

the text outline green color component.

guchar outline_a;

the text outline alpha color component.

pgm_text_new ()

PgmDrawable *       pgm_text_new                        (const gchar *markup);

Creates a new PgmText instance.

MT safe.

markup :

the markup string.

Returns :

a new PgmText instance.

pgm_text_set_label ()

PgmError            pgm_text_set_label                  (PgmText *text,
                                                         const gchar *label);

Sets label of text to label. label has to be a NULL-terminated string. The default label is the empty one "".

MT safe.

text :

a PgmText object.

label :

the label string.

Returns :

A PgmError indicating success/failure.

pgm_text_set_markup ()

PgmError            pgm_text_set_markup                 (PgmText *text,
                                                         const gchar *markup);

Sets markup of text to markup. markup has to be a NULL-terminated string. The default label is the empty one "".

MT safe.

text :

a PgmText object.

markup :

the markup string.

Returns :

A PgmError indicating success/failure.

pgm_text_get_label ()

PgmError            pgm_text_get_label                  (PgmText *text,
                                                         gchar **label);

Retrieves the current label of text in label. If a markup is currently used, the full markup is retrieved.

MT safe.

text :

a PgmText object.

label :

a pointer to a pointer to a gchar where the label string will be stored. g_free() after use.

Returns :

A PgmError indicating success/failure.

pgm_text_set_font_family ()

PgmError            pgm_text_set_font_family            (PgmText *text,
                                                         const gchar *font_family);

Sets the font family of text to font_family. The default font family name is "Sans".

MT safe.

text :

a PgmText object.

font_family :

the font-family string.

Returns :

A PgmError indicating success/failure.

pgm_text_get_font_family ()

PgmError            pgm_text_get_font_family            (PgmText *text,
                                                         gchar **font_family);

Retrieves the current font-family of text in label.

MT safe.

text :

a PgmText object.

font_family :

a pointer to a pointer to a gchar where the font family string will be stored. g_free() after use.

Returns :

A PgmError indicating success/failure.

pgm_text_set_font_height ()

PgmError            pgm_text_set_font_height            (PgmText *text,
                                                         gfloat font_height);

Sets the height of text to font_height in canvas coordinates. The default height is 1.0f.

MT safe.

text :

a PgmText object.

font_height :

the text height in canvas coordinates.

Returns :

A PgmError indicating success/failure.

pgm_text_get_font_height ()

PgmError            pgm_text_get_font_height            (PgmText *text,
                                                         gfloat *font_height);

Retrieves the height of text in height.

MT safe.

text :

a PgmText object.

font_height :

a pointer to a gfloat where the text height is going to be stored.

Returns :

A PgmError indicating success/failure.

pgm_text_set_ellipsize ()

PgmError            pgm_text_set_ellipsize              (PgmText *text,
                                                         PgmTextEllipsize ellipsize);

Sets ellipsizing of text to ellipsize. Only takes effect when text gets to large to fit the drawable size. The default value is PGM_TEXT_ELLIPSIZE_NONE.

MT safe.

text :

a PgmText object.

ellipsize :

the text ellipsizing.

Returns :

A PgmError indicating success/failure.

pgm_text_get_ellipsize ()

PgmError            pgm_text_get_ellipsize              (PgmText *text,
                                                         PgmTextEllipsize *ellipsize);

Retrieves the ellipsizing of text in ellipsize.

MT safe.

text :

a PgmText object.

ellipsize :

a pointer to a PgmTextEllipsize where the text ellipsizing is going to be stored.

Returns :

A PgmError indicating success/failure.

pgm_text_set_justify ()

PgmError            pgm_text_set_justify                (PgmText *text,
                                                         gboolean justify);

Enables or not justification of text. If justify is TRUE, text is expanded to fill the whole drawable width.

MT safe.

text :

a PgmText object.

justify :

the text justification state.

Returns :

A PgmError indicating success/failure.

pgm_text_get_justify ()

PgmError            pgm_text_get_justify                (PgmText *text,
                                                         gboolean *justify);

Retrieves the justification state of text in justify.

MT safe.

text :

a PgmText object.

justify :

a pointer to a gboolean where the justification state is going to be stored.

Returns :

A PgmError indicating success/failure.

pgm_text_set_alignment ()

PgmError            pgm_text_set_alignment              (PgmText *text,
                                                         PgmTextAlignment alignment);

Sets alignment of text to alignment. The default value is PGM_TEXT_ALIGN_LEFT.

MT safe.

text :

a PgmText object.

alignment :

the text alignment.

Returns :

A PgmError indicating success/failure.

pgm_text_get_alignment ()

PgmError            pgm_text_get_alignment              (PgmText *text,
                                                         PgmTextAlignment *alignment);

Retrieves the alignment of text in alignment.

MT safe.

text :

a PgmText object.

alignment :

a pointer to a PgmTextAlignment where the text alignment is going to be stored.

Returns :

A PgmError indicating success/failure.

pgm_text_set_wrap ()

PgmError            pgm_text_set_wrap                   (PgmText *text,
                                                         PgmTextWrap wrap);

Sets wrapping of text to wrap. The default value is PGM_TEXT_WRAP_WORD.

MT safe.

text :

a PgmText object.

wrap :

the text wrapping.

Returns :

A PgmError indicating success/failure.

pgm_text_get_wrap ()

PgmError            pgm_text_get_wrap                   (PgmText *text,
                                                         PgmTextWrap *wrap);

Retrieves the wrapping of text in wrap.

MT safe.

text :

a PgmText object.

wrap :

a pointer to a PgmTextWrap where the text wrapping is going to be stored.

Returns :

A PgmError indicating success/failure.

pgm_text_set_gravity ()

PgmError            pgm_text_set_gravity                (PgmText *text,
                                                         PgmTextGravity gravity);

Sets gravity of text to gravity. The default value is PGM_TEXT_GRAVITY_AUTO.

MT safe.

text :

a PgmText object.

gravity :

the text gravity.

Returns :

A PgmError indicating success/failure.

pgm_text_get_gravity ()

PgmError            pgm_text_get_gravity                (PgmText *text,
                                                         PgmTextGravity *gravity);

Retrieves the gravity of text in gravity.

MT safe.

text :

a PgmText object.

gravity :

a pointer to a PgmTextGravity where the text gravity is going to be stored.

Returns :

A PgmError indicating success/failure.

pgm_text_set_stretch ()

PgmError            pgm_text_set_stretch                (PgmText *text,
                                                         PgmTextStretch stretch);

Sets stretching of text to stretch. The default value is PGM_TEXT_STRETCH_NORMAL.

MT safe.

text :

a PgmText object.

stretch :

the text stretching.

Returns :

A PgmError indicating success/failure.

pgm_text_get_stretch ()

PgmError            pgm_text_get_stretch                (PgmText *text,
                                                         PgmTextStretch *stretch);

Retrieves the stretching of text in stretch.

MT safe.

text :

a PgmText object.

stretch :

a pointer to a PgmTextStretch where the text stretching is going to be stored.

Returns :

A PgmError indicating success/failure.

pgm_text_set_style ()

PgmError            pgm_text_set_style                  (PgmText *text,
                                                         PgmTextStyle style);

Sets style of text to style. The default value is PGM_TEXT_STYLE_NORMAL.

MT safe.

text :

a PgmText object.

style :

the text style.

Returns :

A PgmError indicating success/failure.

pgm_text_get_style ()

PgmError            pgm_text_get_style                  (PgmText *text,
                                                         PgmTextStyle *style);

Retrieves the style of text in style.

MT safe.

text :

a PgmText object.

style :

a pointer to a PgmTextStyle where the text style is going to be stored.

Returns :

A PgmError indicating success/failure.

pgm_text_set_variant ()

PgmError            pgm_text_set_variant                (PgmText *text,
                                                         PgmTextVariant variant);

Sets variant of text to variant. The default value is PGM_TEXT_VARIANT_NORMAL.

MT safe.

text :

a PgmText object.

variant :

the text variant.

Returns :

A PgmError indicating success/failure.

pgm_text_get_variant ()

PgmError            pgm_text_get_variant                (PgmText *text,
                                                         PgmTextVariant *variant);

Retrieves the variant of text in variant.

MT safe.

text :

a PgmText object.

variant :

a pointer to a PgmTextVariant where the text variant is going to be stored.

Returns :

A PgmError indicating success/failure.

pgm_text_set_weight ()

PgmError            pgm_text_set_weight                 (PgmText *text,
                                                         PgmTextWeight weight);

Sets weight of text to weight. The default value is PGM_TEXT_WEIGHT_NORMAL.

MT safe.

text :

a PgmText object.

weight :

the text weight.

Returns :

A PgmError indicating success/failure.

pgm_text_get_weight ()

PgmError            pgm_text_get_weight                 (PgmText *text,
                                                         PgmTextWeight *weight);

Retrieves the weight of text in weight.

MT safe.

text :

a PgmText object.

weight :

a pointer to a PgmTextWeight where the text weight is going to be stored.

Returns :

A PgmError indicating success/failure.

pgm_text_set_multiline ()

PgmError            pgm_text_set_multiline              (PgmText *text,
                                                         gboolean multiline);

Sets the multilining state of text to multiline. When multilining is disabled, the text is displayed on one line and vertically centered in the drawable. The default value is TRUE.

MT safe.

text :

a PgmText object.

multiline :

the multilining state.

Returns :

A PgmError indicating success/failure.

pgm_text_get_multiline ()

PgmError            pgm_text_get_multiline              (PgmText *text,
                                                         gboolean *multiline);

Retrieves the multilining state of text in multiline.

MT safe.

text :

a PgmText object.

multiline :

a pointer to a gboolean where the multilining state is going to be stored.

Returns :

A PgmError indicating success/failure.

pgm_text_set_line_spacing ()

PgmError            pgm_text_set_line_spacing           (PgmText *text,
                                                         gfloat line_spacing);

Sets the space between two lines of text to line_spacing in canvas coordinates. The default value is 0.0f.

MT safe.

text :

a PgmText object.

line_spacing :

the line spacing.

Returns :

A PgmError indicating success/failure.

pgm_text_get_line_spacing ()

PgmError            pgm_text_get_line_spacing           (PgmText *text,
                                                         gfloat *line_spacing);

Retrieves the space between two lines of text in line_spacing.

MT safe.

text :

a PgmText object.

line_spacing :

a pointer to a gfloat where the line spacing is going to be stored.

Returns :

A PgmError indicating success/failure.

pgm_text_set_color ()

PgmError            pgm_text_set_color                  (PgmText *text,
                                                         guchar red,
                                                         guchar green,
                                                         guchar blue,
                                                         guchar alpha);

Sets the color of text to (red, green, blue, alpha).

MT safe.

text :

a PgmText object.

red :

the text red color component.

green :

the text green color component.

blue :

the text blue color component.

alpha :

the text alpha color component.

Returns :

A PgmError indicating success/failure.

pgm_text_get_color ()

PgmError            pgm_text_get_color                  (PgmText *text,
                                                         guchar *red,
                                                         guchar *green,
                                                         guchar *blue,
                                                         guchar *alpha);

Retrieves the color of text in (red, green, blue, alpha).

MT safe.

text :

a PgmText object.

red :

a pointer to a guchar where the red color component is going to be stored.

green :

a pointer to a guchar where the green color component is going to be stored.

blue :

a pointer to a guchar where the blue color component is going to be stored.

alpha :

a pointer to a guchar where the alpha color component is going to be stored.

Returns :

A PgmError indicating success/failure.

pgm_text_set_outline_color ()

PgmError            pgm_text_set_outline_color          (PgmText *text,
                                                         guchar red,
                                                         guchar green,
                                                         guchar blue,
                                                         guchar alpha);

Sets the outline color of text to (red, green, blue, alpha).

MT safe.

text :

a PgmText object.

red :

the text outline red color component.

green :

the text outline green color component.

blue :

the text outline blue color component.

alpha :

the text outline alpha color component.

Returns :

A PgmError indicating success/failure.

pgm_text_get_outline_color ()

PgmError            pgm_text_get_outline_color          (PgmText *text,
                                                         guchar *red,
                                                         guchar *green,
                                                         guchar *blue,
                                                         guchar *alpha);

Retrieves the outline color of text in (red, green, blue, alpha).

MT safe.

text :

a PgmText object.

red :

a pointer to a guchar where the outline red color component is going to be stored.

green :

a pointer to a guchar where the outline green color component is going to be stored.

blue :

a pointer to a guchar where the outline blue color component is going to be stored.

alpha :

a pointer to a guchar where the outline alpha color component is going to be stored.

Returns :

A PgmError indicating success/failure.

pgm_text_set_outline_width ()

PgmError            pgm_text_set_outline_width          (PgmText *text,
                                                         gfloat width);

Sets the outline width (thickness) of text to width in canvas coordinates. The default value is 0.0f.

MT safe.

text :

a PgmText object.

width :

the text outline width.

Returns :

A PgmError indicating success/failure.

pgm_text_get_outline_width ()

PgmError            pgm_text_get_outline_width          (PgmText *text,
                                                         gfloat *width);

Retrieves the outline width (thickness) of text in width.

MT safe.

text :

a PgmText object.

width :

a pointer to a gfloat where the text outline width is going to be stored.

Returns :

A PgmError indicating success/failure.

pgm_text_set_cast_shadow ()

PgmError            pgm_text_set_cast_shadow            (PgmText *text,
                                                         gboolean cast_shadow);

Sets the shadow casting state of text to cast_shadow. When shadow casting is enabled, the text is displayed with a shadow behind it. The default value is FALSE.

MT safe.

text :

a PgmText object.

cast_shadow :

the shadow casting state.

Returns :

A PgmError indicating success/failure.

pgm_text_get_cast_shadow ()

PgmError            pgm_text_get_cast_shadow            (PgmText *text,
                                                         gboolean *cast_shadow);

Retrieves the shadow casting state of text in cast_shadow.

MT safe.

text :

a PgmText object.

cast_shadow :

a pointer to a gboolean where the shadow casting state is going to be stored.

Returns :

A PgmError indicating success/failure.

pgm_text_set_shadow_position ()

PgmError            pgm_text_set_shadow_position        (PgmText *text,
                                                         PgmTextShadowPosition position);

Sets the shadow position of text to position. The default value is PGM_TEXT_SHADOW_TOP.

MT safe.

text :

a PgmText object.

position :

the text shadow position.

Returns :

A PgmError indicating success/failure.

pgm_text_get_shadow_position ()

PgmError            pgm_text_get_shadow_position        (PgmText *text,
                                                         PgmTextShadowPosition *position);

Retrieves the shadow position of text in position.

MT safe.

text :

a PgmText object.

position :

a pointer to a PgmTextShadowPosition where the text shadow position is going to be stored.

Returns :

A PgmError indicating success/failure.

pgm_text_set_shadow_color ()

PgmError            pgm_text_set_shadow_color           (PgmText *text,
                                                         guchar red,
                                                         guchar green,
                                                         guchar blue,
                                                         guchar alpha);

Sets the shadow color of text to (red, green, blue, alpha).

MT safe.

text :

a PgmText object.

red :

the text shadow red color component.

green :

the text shadow green color component.

blue :

the text shadow blue color component.

alpha :

the text shadow alpha color component.

Returns :

A PgmError indicating success/failure.

pgm_text_get_shadow_color ()

PgmError            pgm_text_get_shadow_color           (PgmText *text,
                                                         guchar *red,
                                                         guchar *green,
                                                         guchar *blue,
                                                         guchar *alpha);

Retrieves the shadow color of text in (red, green, blue, alpha).

MT safe.

text :

a PgmText object.

red :

a pointer to a guchar where the shadow red color component is going to be stored.

green :

a pointer to a guchar where the shadow green color component is going to be stored.

blue :

a pointer to a guchar where the shadow blue color component is going to be stored.

alpha :

a pointer to a guchar where the shadow alpha color component is going to be stored.

Returns :

A PgmError indicating success/failure.

See Also

#PgmDrawable, PgmImage.
pigment-0.3.17/docs/pgm/html/pigment-hierarchy.html0000644000175000017500000016002511205035140017145 00000000000000 Object Hierarchy

Object Hierarchy

    GObject
        GstObject
            GstElement
                GstBaseSink
                    GstVideoSink
                        PgmImageSink
            PgmDrawable
                PgmImage
                PgmText
            PgmCanvas
            PgmViewport
            PgmViewportFactory
        GInitiallyUnowned
            GtkObject
                GtkWidget
                    GtkContainer
                        GtkSocket
                            PgmGtk

P

PgmButtonType, enum PgmButtonType
PgmCanvas, PgmCanvas
PgmCanvas::drawable-added, The "drawable-added" signal
PgmCanvas::drawable-removed, The "drawable-removed" signal
PgmCanvas::drawable-reordered, The "drawable-reordered" signal
PgmCanvas::regenerated, The "regenerated" signal
PgmCanvas::size-changed, The "size-changed" signal
PgmDrawable, PgmDrawable
PgmDrawable::changed, The "changed" signal
PgmDrawable::clicked, The "clicked" signal
PgmDrawable::double-clicked, The "double-clicked" signal
PgmDrawable::drag-begin, The "drag-begin" signal
PgmDrawable::drag-end, The "drag-end" signal
PgmDrawable::drag-motion, The "drag-motion" signal
PgmDrawable::entered, The "entered" signal
PgmDrawable::left, The "left" signal
PgmDrawable::motion, The "motion" signal
PgmDrawable::pressed, The "pressed" signal
PgmDrawable::pressured, The "pressured" signal
PgmDrawable::released, The "released" signal
PgmDrawable::scrolled, The "scrolled" signal
PgmDrawableClass, PgmDrawableClass
PgmDrawableLayer, enum PgmDrawableLayer
PgmDrawableProperty, enum PgmDrawableProperty
PgmError, enum PgmError
PgmEvent, union PgmEvent
PgmEventAny, PgmEventAny
PgmEventButton, PgmEventButton
PgmEventConfigure, PgmEventConfigure
PgmEventDnd, PgmEventDnd
PgmEventExpose, PgmEventExpose
PgmEventKey, PgmEventKey
PgmEventMotion, PgmEventMotion
PgmEventScroll, PgmEventScroll
PgmEventState, PgmEventState
PgmEventType, enum PgmEventType
PgmEventWin32Message, PgmEventWin32Message
PgmGtk, PgmGtk
PgmImage, PgmImage
PgmImage::cloned, The "cloned" signal
PgmImage::file-loaded, The "file-loaded" signal
PgmImage::un-cloned, The "un-cloned" signal
PgmImageAlignment, enum PgmImageAlignment
PgmImageBuffer, PgmImageBuffer
PgmImageData, union PgmImageData
PgmImageFile, PgmImageFile
PgmImageGstBuffer, PgmImageGstBuffer
PgmImageInterpType, enum PgmImageInterpType
PgmImageLayoutType, enum PgmImageLayoutType
PgmImagePixbuf, PgmImagePixbuf
PgmImagePixelFormat, enum PgmImagePixelFormat
PgmImageSink, PgmImageSink
PgmImageSink:events, The "events" property
PgmImageSink:image, The "image" property
PgmImageSinkEventMask, enum PgmImageSinkEventMask
PgmImageStorageType, enum PgmImageStorageType
PgmImageSystemBuffer, PgmImageSystemBuffer
PgmImageWrapping, enum PgmImageWrapping
PgmMat3x3, PgmMat3x3
PgmMat4x4, PgmMat4x4
PgmMat4x4Predefined, enum PgmMat4x4Predefined
PgmModifierType, enum PgmModifierType
PgmPluginCreateFunc, PgmPluginCreateFunc ()
PgmPluginDesc, PgmPluginDesc
PgmPluginInitFunc, PgmPluginInitFunc ()
PgmPluginShutdownFunc, PgmPluginShutdownFunc ()
PgmScrollDirection, enum PgmScrollDirection
PgmText, PgmText
PgmTextAlignment, enum PgmTextAlignment
PgmTextEllipsize, enum PgmTextEllipsize
PgmTextGravity, enum PgmTextGravity
PgmTextShadowPosition, enum PgmTextShadowPosition
PgmTextStretch, enum PgmTextStretch
PgmTextStyle, enum PgmTextStyle
PgmTextVariant, enum PgmTextVariant
PgmTextWeight, enum PgmTextWeight
PgmTextWrap, enum PgmTextWrap
PgmVec3, PgmVec3
PgmVec4, PgmVec4
PgmViewport, PgmViewport
PgmViewport::button-press-event, The "button-press-event" signal
PgmViewport::button-pressure-event, The "button-pressure-event" signal
PgmViewport::button-release-event, The "button-release-event" signal
PgmViewport::configure-event, The "configure-event" signal
PgmViewport::delete-event, The "delete-event" signal
PgmViewport::drag-drop-event, The "drag-drop-event" signal
PgmViewport::drag-leave-event, The "drag-leave-event" signal
PgmViewport::drag-motion-event, The "drag-motion-event" signal
PgmViewport::expose-event, The "expose-event" signal
PgmViewport::key-press-event, The "key-press-event" signal
PgmViewport::key-release-event, The "key-release-event" signal
PgmViewport::motion-notify-event, The "motion-notify-event" signal
PgmViewport::pixels-read, The "pixels-read" signal
PgmViewport::scroll-event, The "scroll-event" signal
PgmViewport::state-event, The "state-event" signal
PgmViewport::update-pass, The "update-pass" signal
PgmViewportCapacity, enum PgmViewportCapacity
PgmViewportClass, PgmViewportClass
PgmViewportCursor, enum PgmViewportCursor
PgmViewportFactory, PgmViewportFactory
PgmViewportReflection, enum PgmViewportReflection
PgmViewportRotation, enum PgmViewportRotation
PgmViewportState, enum PgmViewportState
pgm_canvas_add, pgm_canvas_add ()
pgm_canvas_add_many, pgm_canvas_add_many ()
pgm_canvas_get_layer_count, pgm_canvas_get_layer_count ()
pgm_canvas_get_order, pgm_canvas_get_order ()
pgm_canvas_get_pixel_formats, pgm_canvas_get_pixel_formats ()
pgm_canvas_get_pixel_offsets, pgm_canvas_get_pixel_offsets ()
pgm_canvas_get_size, pgm_canvas_get_size ()
pgm_canvas_new, pgm_canvas_new ()
pgm_canvas_regenerate, pgm_canvas_regenerate ()
pgm_canvas_remove, pgm_canvas_remove ()
pgm_canvas_remove_many, pgm_canvas_remove_many ()
pgm_canvas_set_order, pgm_canvas_set_order ()
pgm_canvas_set_size, pgm_canvas_set_size ()
PGM_DEGREES_TO_RADIANS, PGM_DEGREES_TO_RADIANS()
pgm_deinit, pgm_deinit ()
pgm_drawable_from_canvas, pgm_drawable_from_canvas ()
pgm_drawable_get_bg_color, pgm_drawable_get_bg_color ()
pgm_drawable_get_drag_distance, pgm_drawable_get_drag_distance ()
pgm_drawable_get_fg_color, pgm_drawable_get_fg_color ()
pgm_drawable_get_grid_aligned, pgm_drawable_get_grid_aligned ()
pgm_drawable_get_opacity, pgm_drawable_get_opacity ()
pgm_drawable_get_position, pgm_drawable_get_position ()
pgm_drawable_get_rotation_x, pgm_drawable_get_rotation_x ()
pgm_drawable_get_rotation_y, pgm_drawable_get_rotation_y ()
pgm_drawable_get_rotation_z, pgm_drawable_get_rotation_z ()
pgm_drawable_get_scale, pgm_drawable_get_scale ()
pgm_drawable_get_size, pgm_drawable_get_size ()
pgm_drawable_hide, pgm_drawable_hide ()
pgm_drawable_is_visible, pgm_drawable_is_visible ()
pgm_drawable_regenerate, pgm_drawable_regenerate ()
pgm_drawable_set_bg_color, pgm_drawable_set_bg_color ()
pgm_drawable_set_drag_distance, pgm_drawable_set_drag_distance ()
pgm_drawable_set_fg_color, pgm_drawable_set_fg_color ()
pgm_drawable_set_grid_aligned, pgm_drawable_set_grid_aligned ()
pgm_drawable_set_opacity, pgm_drawable_set_opacity ()
pgm_drawable_set_position, pgm_drawable_set_position ()
pgm_drawable_set_rotation_x, pgm_drawable_set_rotation_x ()
pgm_drawable_set_rotation_y, pgm_drawable_set_rotation_y ()
pgm_drawable_set_rotation_z, pgm_drawable_set_rotation_z ()
pgm_drawable_set_scale, pgm_drawable_set_scale ()
pgm_drawable_set_size, pgm_drawable_set_size ()
pgm_drawable_show, pgm_drawable_show ()
pgm_drawable_to_canvas, pgm_drawable_to_canvas ()
pgm_events_pending, pgm_events_pending ()
pgm_event_copy, pgm_event_copy ()
pgm_event_free, pgm_event_free ()
pgm_event_new, pgm_event_new ()
PGM_FABSF, PGM_FABSF()
pgm_gtk_get_viewport, pgm_gtk_get_viewport ()
pgm_gtk_new, pgm_gtk_new ()
pgm_gtk_set_viewport, pgm_gtk_set_viewport ()
pgm_image_clear, pgm_image_clear ()
pgm_image_from_drawable, pgm_image_from_drawable ()
pgm_image_get_alignment, pgm_image_get_alignment ()
pgm_image_get_aspect_ratio, pgm_image_get_aspect_ratio ()
pgm_image_get_border_inner_color, pgm_image_get_border_inner_color ()
pgm_image_get_border_outer_color, pgm_image_get_border_outer_color ()
pgm_image_get_border_width, pgm_image_get_border_width ()
pgm_image_get_interp, pgm_image_get_interp ()
pgm_image_get_layout, pgm_image_get_layout ()
pgm_image_get_mapping_matrix, pgm_image_get_mapping_matrix ()
pgm_image_get_storage_type, pgm_image_get_storage_type ()
pgm_image_get_wrapping, pgm_image_get_wrapping ()
pgm_image_new, pgm_image_new ()
pgm_image_new_from_buffer, pgm_image_new_from_buffer ()
pgm_image_new_from_file, pgm_image_new_from_file ()
pgm_image_new_from_image, pgm_image_new_from_image ()
pgm_image_new_from_pixbuf, pgm_image_new_from_pixbuf ()
pgm_image_set_alignment, pgm_image_set_alignment ()
pgm_image_set_aspect_ratio, pgm_image_set_aspect_ratio ()
pgm_image_set_border_inner_color, pgm_image_set_border_inner_color ()
pgm_image_set_border_outer_color, pgm_image_set_border_outer_color ()
pgm_image_set_border_width, pgm_image_set_border_width ()
pgm_image_set_from_buffer, pgm_image_set_from_buffer ()
pgm_image_set_from_file, pgm_image_set_from_file ()
pgm_image_set_from_gst_buffer, pgm_image_set_from_gst_buffer ()
pgm_image_set_from_image, pgm_image_set_from_image ()
pgm_image_set_from_pixbuf, pgm_image_set_from_pixbuf ()
pgm_image_set_from_system_buffer, pgm_image_set_from_system_buffer ()
pgm_image_set_interp, pgm_image_set_interp ()
pgm_image_set_layout, pgm_image_set_layout ()
pgm_image_set_mapping_matrix, pgm_image_set_mapping_matrix ()
pgm_image_set_wrapping, pgm_image_set_wrapping ()
pgm_image_sink_get_events, pgm_image_sink_get_events ()
pgm_image_sink_get_image, pgm_image_sink_get_image ()
pgm_image_sink_new, pgm_image_sink_new ()
pgm_image_sink_set_events, pgm_image_sink_set_events ()
pgm_image_sink_set_image, pgm_image_sink_set_image ()
pgm_image_system_buffer_lock, pgm_image_system_buffer_lock ()
pgm_image_system_buffer_unlock, pgm_image_system_buffer_unlock ()
pgm_image_to_drawable, pgm_image_to_drawable ()
pgm_image_to_pixbuf, pgm_image_to_pixbuf ()
pgm_imaging_linear_alpha_gradient, pgm_imaging_linear_alpha_gradient ()
pgm_init, pgm_init ()
pgm_init_check, pgm_init_check ()
pgm_intersection_line_plane, pgm_intersection_line_plane ()
pgm_keyval_to_unicode, pgm_keyval_to_unicode ()
pgm_lrintf, pgm_lrintf ()
pgm_main, pgm_main ()
pgm_main_iteration, pgm_main_iteration ()
pgm_main_iteration_do, pgm_main_iteration_do ()
pgm_main_quit, pgm_main_quit ()
pgm_mat3x3_add_mat3x3, pgm_mat3x3_add_mat3x3 ()
pgm_mat3x3_add_scalar, pgm_mat3x3_add_scalar ()
pgm_mat3x3_copy, pgm_mat3x3_copy ()
pgm_mat3x3_free, pgm_mat3x3_free ()
pgm_mat3x3_inverse, pgm_mat3x3_inverse ()
pgm_mat3x3_is_identity, pgm_mat3x3_is_identity ()
pgm_mat3x3_multiply_mat3x3, pgm_mat3x3_multiply_mat3x3 ()
pgm_mat3x3_multiply_scalar, pgm_mat3x3_multiply_scalar ()
pgm_mat3x3_multiply_vec3, pgm_mat3x3_multiply_vec3 ()
pgm_mat3x3_new, pgm_mat3x3_new ()
pgm_mat3x3_new_from_scalars, pgm_mat3x3_new_from_scalars ()
pgm_mat3x3_new_from_vec3, pgm_mat3x3_new_from_vec3 ()
pgm_mat3x3_new_identity, pgm_mat3x3_new_identity ()
pgm_mat3x3_set_from_mat3x3, pgm_mat3x3_set_from_mat3x3 ()
pgm_mat3x3_set_from_scalars, pgm_mat3x3_set_from_scalars ()
pgm_mat3x3_set_from_vec3, pgm_mat3x3_set_from_vec3 ()
pgm_mat3x3_substract_mat3x3, pgm_mat3x3_substract_mat3x3 ()
pgm_mat3x3_substract_scalar, pgm_mat3x3_substract_scalar ()
pgm_mat3x3_to_string, pgm_mat3x3_to_string ()
pgm_mat3x3_transpose, pgm_mat3x3_transpose ()
pgm_mat4x4_add_mat4x4, pgm_mat4x4_add_mat4x4 ()
pgm_mat4x4_add_scalar, pgm_mat4x4_add_scalar ()
pgm_mat4x4_copy, pgm_mat4x4_copy ()
pgm_mat4x4_free, pgm_mat4x4_free ()
pgm_mat4x4_inverse, pgm_mat4x4_inverse ()
pgm_mat4x4_is_identity, pgm_mat4x4_is_identity ()
pgm_mat4x4_multiply_mat4x4, pgm_mat4x4_multiply_mat4x4 ()
pgm_mat4x4_multiply_scalar, pgm_mat4x4_multiply_scalar ()
pgm_mat4x4_multiply_vec4, pgm_mat4x4_multiply_vec4 ()
pgm_mat4x4_new, pgm_mat4x4_new ()
pgm_mat4x4_new_from_scalars, pgm_mat4x4_new_from_scalars ()
pgm_mat4x4_new_from_vec4, pgm_mat4x4_new_from_vec4 ()
pgm_mat4x4_new_identity, pgm_mat4x4_new_identity ()
pgm_mat4x4_new_predefined, pgm_mat4x4_new_predefined ()
pgm_mat4x4_new_rotate_axis_from_scalars, pgm_mat4x4_new_rotate_axis_from_scalars ()
pgm_mat4x4_new_rotate_axis_from_vec3, pgm_mat4x4_new_rotate_axis_from_vec3 ()
pgm_mat4x4_new_rotate_x, pgm_mat4x4_new_rotate_x ()
pgm_mat4x4_new_rotate_y, pgm_mat4x4_new_rotate_y ()
pgm_mat4x4_new_rotate_z, pgm_mat4x4_new_rotate_z ()
pgm_mat4x4_new_scale_from_scalars, pgm_mat4x4_new_scale_from_scalars ()
pgm_mat4x4_new_scale_from_vec3, pgm_mat4x4_new_scale_from_vec3 ()
pgm_mat4x4_new_translate_from_scalars, pgm_mat4x4_new_translate_from_scalars ()
pgm_mat4x4_new_translate_from_vec3, pgm_mat4x4_new_translate_from_vec3 ()
pgm_mat4x4_rotate_axis_from_scalars, pgm_mat4x4_rotate_axis_from_scalars ()
pgm_mat4x4_rotate_axis_from_vec3, pgm_mat4x4_rotate_axis_from_vec3 ()
pgm_mat4x4_rotate_x, pgm_mat4x4_rotate_x ()
pgm_mat4x4_rotate_y, pgm_mat4x4_rotate_y ()
pgm_mat4x4_rotate_z, pgm_mat4x4_rotate_z ()
pgm_mat4x4_scale_from_scalars, pgm_mat4x4_scale_from_scalars ()
pgm_mat4x4_scale_from_vec3, pgm_mat4x4_scale_from_vec3 ()
pgm_mat4x4_set_from_mat4x4, pgm_mat4x4_set_from_mat4x4 ()
pgm_mat4x4_set_from_scalars, pgm_mat4x4_set_from_scalars ()
pgm_mat4x4_set_from_vec4, pgm_mat4x4_set_from_vec4 ()
pgm_mat4x4_substract_mat4x4, pgm_mat4x4_substract_mat4x4 ()
pgm_mat4x4_substract_scalar, pgm_mat4x4_substract_scalar ()
pgm_mat4x4_to_string, pgm_mat4x4_to_string ()
pgm_mat4x4_translate_from_scalars, pgm_mat4x4_translate_from_scalars ()
pgm_mat4x4_translate_from_vec3, pgm_mat4x4_translate_from_vec3 ()
pgm_mat4x4_transpose, pgm_mat4x4_transpose ()
PGM_PLUGIN_DEFINE, PGM_PLUGIN_DEFINE()
PGM_PLUGIN_PATH_NAME, PGM_PLUGIN_PATH_NAME
pgm_point_belongs_rectangle, pgm_point_belongs_rectangle ()
PGM_RADIANS_TO_DEGREES, PGM_RADIANS_TO_DEGREES()
PGM_SINCOS, PGM_SINCOS()
pgm_text_get_alignment, pgm_text_get_alignment ()
pgm_text_get_cast_shadow, pgm_text_get_cast_shadow ()
pgm_text_get_color, pgm_text_get_color ()
pgm_text_get_ellipsize, pgm_text_get_ellipsize ()
pgm_text_get_font_family, pgm_text_get_font_family ()
pgm_text_get_font_height, pgm_text_get_font_height ()
pgm_text_get_gravity, pgm_text_get_gravity ()
pgm_text_get_justify, pgm_text_get_justify ()
pgm_text_get_label, pgm_text_get_label ()
pgm_text_get_line_spacing, pgm_text_get_line_spacing ()
pgm_text_get_multiline, pgm_text_get_multiline ()
pgm_text_get_outline_color, pgm_text_get_outline_color ()
pgm_text_get_outline_width, pgm_text_get_outline_width ()
pgm_text_get_shadow_color, pgm_text_get_shadow_color ()
pgm_text_get_shadow_position, pgm_text_get_shadow_position ()
pgm_text_get_stretch, pgm_text_get_stretch ()
pgm_text_get_style, pgm_text_get_style ()
pgm_text_get_variant, pgm_text_get_variant ()
pgm_text_get_weight, pgm_text_get_weight ()
pgm_text_get_wrap, pgm_text_get_wrap ()
pgm_text_new, pgm_text_new ()
pgm_text_set_alignment, pgm_text_set_alignment ()
pgm_text_set_cast_shadow, pgm_text_set_cast_shadow ()
pgm_text_set_color, pgm_text_set_color ()
pgm_text_set_ellipsize, pgm_text_set_ellipsize ()
pgm_text_set_font_family, pgm_text_set_font_family ()
pgm_text_set_font_height, pgm_text_set_font_height ()
pgm_text_set_gravity, pgm_text_set_gravity ()
pgm_text_set_justify, pgm_text_set_justify ()
pgm_text_set_label, pgm_text_set_label ()
pgm_text_set_line_spacing, pgm_text_set_line_spacing ()
pgm_text_set_markup, pgm_text_set_markup ()
pgm_text_set_multiline, pgm_text_set_multiline ()
pgm_text_set_outline_color, pgm_text_set_outline_color ()
pgm_text_set_outline_width, pgm_text_set_outline_width ()
pgm_text_set_shadow_color, pgm_text_set_shadow_color ()
pgm_text_set_shadow_position, pgm_text_set_shadow_position ()
pgm_text_set_stretch, pgm_text_set_stretch ()
pgm_text_set_style, pgm_text_set_style ()
pgm_text_set_variant, pgm_text_set_variant ()
pgm_text_set_weight, pgm_text_set_weight ()
pgm_text_set_wrap, pgm_text_set_wrap ()
pgm_vec3_add_scalar, pgm_vec3_add_scalar ()
pgm_vec3_add_vec3, pgm_vec3_add_vec3 ()
pgm_vec3_copy, pgm_vec3_copy ()
pgm_vec3_cross_product, pgm_vec3_cross_product ()
pgm_vec3_dot_product, pgm_vec3_dot_product ()
pgm_vec3_free, pgm_vec3_free ()
pgm_vec3_length, pgm_vec3_length ()
pgm_vec3_multiply_scalar, pgm_vec3_multiply_scalar ()
pgm_vec3_multiply_vec3, pgm_vec3_multiply_vec3 ()
pgm_vec3_new, pgm_vec3_new ()
pgm_vec3_new_from_scalars, pgm_vec3_new_from_scalars ()
pgm_vec3_normalize, pgm_vec3_normalize ()
pgm_vec3_set_from_scalars, pgm_vec3_set_from_scalars ()
pgm_vec3_set_from_vec3, pgm_vec3_set_from_vec3 ()
pgm_vec3_substract_scalar, pgm_vec3_substract_scalar ()
pgm_vec3_substract_vec3, pgm_vec3_substract_vec3 ()
pgm_vec3_to_string, pgm_vec3_to_string ()
pgm_vec4_add_scalar, pgm_vec4_add_scalar ()
pgm_vec4_add_vec4, pgm_vec4_add_vec4 ()
pgm_vec4_copy, pgm_vec4_copy ()
pgm_vec4_free, pgm_vec4_free ()
pgm_vec4_length, pgm_vec4_length ()
pgm_vec4_multiply_scalar, pgm_vec4_multiply_scalar ()
pgm_vec4_multiply_vec4, pgm_vec4_multiply_vec4 ()
pgm_vec4_new, pgm_vec4_new ()
pgm_vec4_new_from_scalars, pgm_vec4_new_from_scalars ()
pgm_vec4_normalize, pgm_vec4_normalize ()
pgm_vec4_set_from_scalars, pgm_vec4_set_from_scalars ()
pgm_vec4_set_from_vec4, pgm_vec4_set_from_vec4 ()
pgm_vec4_substract_scalar, pgm_vec4_substract_scalar ()
pgm_vec4_substract_vec4, pgm_vec4_substract_vec4 ()
pgm_vec4_to_string, pgm_vec4_to_string ()
pgm_version, pgm_version ()
PGM_VERSION_MAJOR, PGM_VERSION_MAJOR
PGM_VERSION_MICRO, PGM_VERSION_MICRO
PGM_VERSION_MINOR, PGM_VERSION_MINOR
PGM_VERSION_NANO, PGM_VERSION_NANO
pgm_version_string, pgm_version_string ()
pgm_viewport_emit_update_pass, pgm_viewport_emit_update_pass ()
pgm_viewport_factory_create, pgm_viewport_factory_create ()
pgm_viewport_factory_get_author, pgm_viewport_factory_get_author ()
pgm_viewport_factory_get_description, pgm_viewport_factory_get_description ()
pgm_viewport_factory_get_license, pgm_viewport_factory_get_license ()
pgm_viewport_factory_get_origin, pgm_viewport_factory_get_origin ()
pgm_viewport_factory_make, pgm_viewport_factory_make ()
pgm_viewport_factory_new, pgm_viewport_factory_new ()
pgm_viewport_focus, pgm_viewport_focus ()
pgm_viewport_from_canvas, pgm_viewport_from_canvas ()
pgm_viewport_get_alpha_blending, pgm_viewport_get_alpha_blending ()
pgm_viewport_get_canvas, pgm_viewport_get_canvas ()
pgm_viewport_get_canvas_reflection, pgm_viewport_get_canvas_reflection ()
pgm_viewport_get_canvas_rotation, pgm_viewport_get_canvas_rotation ()
pgm_viewport_get_caps_mask, pgm_viewport_get_caps_mask ()
pgm_viewport_get_cursor, pgm_viewport_get_cursor ()
pgm_viewport_get_decorated, pgm_viewport_get_decorated ()
pgm_viewport_get_embedding_id, pgm_viewport_get_embedding_id ()
pgm_viewport_get_frame_rate, pgm_viewport_get_frame_rate ()
pgm_viewport_get_fullscreen, pgm_viewport_get_fullscreen ()
pgm_viewport_get_icon, pgm_viewport_get_icon ()
pgm_viewport_get_iconified, pgm_viewport_get_iconified ()
pgm_viewport_get_max_texture_size, pgm_viewport_get_max_texture_size ()
pgm_viewport_get_message_filter, pgm_viewport_get_message_filter ()
pgm_viewport_get_opacity, pgm_viewport_get_opacity ()
pgm_viewport_get_pixel_formats, pgm_viewport_get_pixel_formats ()
pgm_viewport_get_screen_resolution, pgm_viewport_get_screen_resolution ()
pgm_viewport_get_screen_size_mm, pgm_viewport_get_screen_size_mm ()
pgm_viewport_get_size, pgm_viewport_get_size ()
pgm_viewport_get_title, pgm_viewport_get_title ()
pgm_viewport_hide, pgm_viewport_hide ()
pgm_viewport_is_visible, pgm_viewport_is_visible ()
pgm_viewport_push_event, pgm_viewport_push_event ()
pgm_viewport_push_pixels, pgm_viewport_push_pixels ()
pgm_viewport_read_pixels, pgm_viewport_read_pixels ()
pgm_viewport_set_alpha_blending, pgm_viewport_set_alpha_blending ()
pgm_viewport_set_canvas, pgm_viewport_set_canvas ()
pgm_viewport_set_canvas_reflection, pgm_viewport_set_canvas_reflection ()
pgm_viewport_set_canvas_rotation, pgm_viewport_set_canvas_rotation ()
pgm_viewport_set_cursor, pgm_viewport_set_cursor ()
pgm_viewport_set_decorated, pgm_viewport_set_decorated ()
pgm_viewport_set_fullscreen, pgm_viewport_set_fullscreen ()
pgm_viewport_set_icon, pgm_viewport_set_icon ()
pgm_viewport_set_iconified, pgm_viewport_set_iconified ()
pgm_viewport_set_message_filter, pgm_viewport_set_message_filter ()
pgm_viewport_set_opacity, pgm_viewport_set_opacity ()
pgm_viewport_set_screen_resolution, pgm_viewport_set_screen_resolution ()
pgm_viewport_set_screen_size_mm, pgm_viewport_set_screen_size_mm ()
pgm_viewport_set_size, pgm_viewport_set_size ()
pgm_viewport_set_title, pgm_viewport_set_title ()
pgm_viewport_show, pgm_viewport_show ()
pgm_viewport_to_canvas, pgm_viewport_to_canvas ()
pgm_viewport_update_projection, pgm_viewport_update_projection ()
pigment-0.3.17/docs/pgm/html/pigment-PgmCommon.html0000644000175000017500000002011111205035140017052 00000000000000 PgmCommon

PgmCommon

PgmCommon — Various functions used for common tasks.

Synopsis


#include <pgm/pgm.h>

#define             PGM_DEGREES_TO_RADIANS              (theta)
#define             PGM_RADIANS_TO_DEGREES              (theta)
#define             PGM_SINCOS                          (theta,s,c)
#define             PGM_FABSF                           (x)
gint32              pgm_lrintf                          (gfloat x);
enum                PgmError;

Description

Various functions used by Pigment for common tasks.

Last reviewed on 2009-05-07 (0.3.16)

Details

PGM_DEGREES_TO_RADIANS()

#define PGM_DEGREES_TO_RADIANS(theta) ((theta) * (G_PI / 180.0f))

Converts from degrees to radians.

theta :

an angle in degrees.

PGM_RADIANS_TO_DEGREES()

#define PGM_RADIANS_TO_DEGREES(theta) ((theta) * (180.0f / G_PI))

Converts from radians to degrees.

theta :

an angle in radians.

PGM_SINCOS()

#define             PGM_SINCOS(theta,s,c)

Calculates sine and cosine of the angle theta simultaneously.

theta :

a float representing an angle in radians.

s :

the address of the float where the sine value is going to be stored.

c :

the address of the float where the cosine value is going to be stored.

PGM_FABSF()

#define             PGM_FABSF(x)

Calculates the absolute value of float.

x :

the floating-point number.

pgm_lrintf ()

gint32              pgm_lrintf                          (gfloat x);

Round x to nearest integer using the current FPU rounding mode. On platforms other than Windows where the C99 lrintf function is not available, the function reverts to a float-to-int cast which uses the truncate FPU rounding mode.

x :

the input floating-point number.

Returns :

the rounded nearest integer.

enum PgmError

typedef enum {
  PGM_ERROR_X,
  PGM_ERROR_OK
} PgmError;

Every Pigment method returns an error code from that list.

PGM_ERROR_X

Generic error code.

PGM_ERROR_OK

No error occured.
pigment-0.3.17/docs/pgm/html/PgmViewport.html0000644000175000017500000052072211205035140016015 00000000000000 PgmViewport

PgmViewport

PgmViewport — An abstract class doing a visual projection of a canvas.

Synopsis


#include <pgm/pgm.h>

enum                PgmViewportCursor;
enum                PgmViewportCapacity;
enum                PgmViewportRotation;
enum                PgmViewportReflection;
                    PgmViewport;
                    PgmViewportClass;
PgmError            pgm_viewport_set_title              (PgmViewport *viewport,
                                                         const gchar *title);
PgmError            pgm_viewport_get_title              (PgmViewport *viewport,
                                                         gchar **title);
PgmError            pgm_viewport_show                   (PgmViewport *viewport);
PgmError            pgm_viewport_hide                   (PgmViewport *viewport);
PgmError            pgm_viewport_is_visible             (PgmViewport *viewport,
                                                         gboolean *visible);
PgmError            pgm_viewport_set_decorated          (PgmViewport *viewport,
                                                         gboolean decorated);
PgmError            pgm_viewport_get_decorated          (PgmViewport *viewport,
                                                         gboolean *decorated);
PgmError            pgm_viewport_set_cursor             (PgmViewport *viewport,
                                                         PgmViewportCursor cursor);
PgmError            pgm_viewport_get_cursor             (PgmViewport *viewport,
                                                         PgmViewportCursor *cursor);
PgmError            pgm_viewport_set_icon               (PgmViewport *viewport,
                                                         GdkPixbuf *icon);
PgmError            pgm_viewport_get_icon               (PgmViewport *viewport,
                                                         GdkPixbuf **icon);
PgmError            pgm_viewport_set_size               (PgmViewport *viewport,
                                                         gint width,
                                                         gint height);
PgmError            pgm_viewport_get_size               (PgmViewport *viewport,
                                                         gint *width,
                                                         gint *height);
PgmError            pgm_viewport_set_alpha_blending     (PgmViewport *viewport,
                                                         gboolean alpha_blending);
PgmError            pgm_viewport_get_alpha_blending     (PgmViewport *viewport,
                                                         gboolean *alpha_blending);
PgmError            pgm_viewport_set_opacity            (PgmViewport *viewport,
                                                         guchar opacity);
PgmError            pgm_viewport_get_opacity            (PgmViewport *viewport,
                                                         guchar *opacity);
PgmError            pgm_viewport_set_fullscreen         (PgmViewport *viewport,
                                                         gboolean fullscreen);
PgmError            pgm_viewport_get_fullscreen         (PgmViewport *viewport,
                                                         gboolean *fullscreen);
PgmError            pgm_viewport_set_iconified          (PgmViewport *viewport,
                                                         gboolean iconified);
PgmError            pgm_viewport_get_iconified          (PgmViewport *viewport,
                                                         gboolean *iconified);
PgmError            pgm_viewport_focus                  (PgmViewport *viewport);
PgmError            pgm_viewport_get_screen_resolution  (PgmViewport *viewport,
                                                         gint *width,
                                                         gint *height);
PgmError            pgm_viewport_set_screen_resolution  (PgmViewport *viewport,
                                                         gint width,
                                                         gint height);
PgmError            pgm_viewport_get_screen_size_mm     (PgmViewport *viewport,
                                                         gint *width,
                                                         gint *height);
PgmError            pgm_viewport_set_screen_size_mm     (PgmViewport *viewport,
                                                         gint width,
                                                         gint height);
PgmError            pgm_viewport_set_message_filter     (PgmViewport *viewport,
                                                         GList *filter);
PgmError            pgm_viewport_get_message_filter     (PgmViewport *viewport,
                                                         GList **filter);
PgmError            pgm_viewport_push_event             (PgmViewport *viewport,
                                                         PgmEvent *event);
PgmError            pgm_viewport_get_canvas             (PgmViewport *viewport,
                                                         PgmCanvas **canvas);
PgmError            pgm_viewport_set_canvas             (PgmViewport *viewport,
                                                         PgmCanvas *canvas);
PgmError            pgm_viewport_set_canvas_rotation    (PgmViewport *viewport,
                                                         PgmViewportRotation rotation);
PgmError            pgm_viewport_get_canvas_rotation    (PgmViewport *viewport,
                                                         PgmViewportRotation *rotation);
PgmError            pgm_viewport_set_canvas_reflection  (PgmViewport *viewport,
                                                         PgmViewportReflection reflection);
PgmError            pgm_viewport_get_canvas_reflection  (PgmViewport *viewport,
                                                         PgmViewportReflection *reflection);
PgmError            pgm_viewport_update_projection      (PgmViewport *viewport);
PgmError            pgm_viewport_to_canvas              (PgmViewport *viewport,
                                                         gfloat *canvas_x,
                                                         gfloat *canvas_y,
                                                         gfloat *canvas_z,
                                                         gfloat viewport_x,
                                                         gfloat viewport_y,
                                                         gfloat viewport_z);
PgmError            pgm_viewport_from_canvas            (PgmViewport *viewport,
                                                         gfloat *viewport_x,
                                                         gfloat *viewport_y,
                                                         gfloat *viewport_z,
                                                         gfloat canvas_x,
                                                         gfloat canvas_y,
                                                         gfloat canvas_z);
PgmError            pgm_viewport_get_embedding_id       (PgmViewport *viewport,
                                                         gulong *embedding_id);
PgmError            pgm_viewport_get_pixel_formats      (PgmViewport *viewport,
                                                         gulong *formats_mask);
PgmError            pgm_viewport_get_caps_mask          (PgmViewport *viewport,
                                                         gulong *caps_mask);
PgmError            pgm_viewport_get_max_texture_size   (PgmViewport *viewport,
                                                         guint32 *max_texture_size);
PgmError            pgm_viewport_get_frame_rate         (PgmViewport *viewport,
                                                         guint *frame_rate);
PgmError            pgm_viewport_read_pixels            (PgmViewport *viewport,
                                                         guint x,
                                                         guint y,
                                                         guint width,
                                                         guint height,
                                                         guint8 *pixels);
PgmError            pgm_viewport_push_pixels            (PgmViewport *viewport,
                                                         guint width,
                                                         guint height,
                                                         guint8 *pixels);
PgmError            pgm_viewport_emit_update_pass       (PgmViewport *viewport);

Object Hierarchy

  GObject
   +----GstObject
         +----PgmViewport

Signals

  "button-press-event"                             : Run Last
  "button-pressure-event"                          : Run Last
  "button-release-event"                           : Run Last
  "configure-event"                                : Run Last
  "delete-event"                                   : Run Last
  "drag-drop-event"                                : Run Last
  "drag-leave-event"                               : Run Last
  "drag-motion-event"                              : Run Last
  "expose-event"                                   : Run Last
  "key-press-event"                                : Run Last
  "key-release-event"                              : Run Last
  "motion-notify-event"                            : Run Last
  "pixels-read"                                    : Run Last
  "scroll-event"                                   : Run Last
  "state-event"                                    : Run Last
  "update-pass"                                    : Run Last

Description

Implementation capacities

A PgmViewport object is used to do a visual projection of PgmCanvas object. Each PgmDrawable added to the canvas is rendered on the viewport converting canvas coordinates to display coordinates. Viewport is a base abstract class from which implementation plugins inherit. You can instantiate several viewport implementations through a PgmViewportFactory. A viewport can handle 0 or 1 canvas, if there's no canvas binded, nothing is projected except the background color of the viewport.

Each viewport implementations are based on a dedicated graphical library such as DirectFB, OpenGL or Direct3D to project the binded canvas. These libraries can be completely different, some of them being 2d-based generating their output through blit operations, other being 3d-based generating their output through a 3d pipeline. Each of them can also optimize part of their rendering paths thanks to dedicated hardware. These differences can lead to viewport implementations with different capacities. The result being that some properties of a drawable could not be correctly projected by some implementations. You can retrieve the mask capacities handled by a Viewport at runtime with the pgm_viewport_get_caps_mask() method, and you can get the list of handled color spaces with pgm_viewport_get_pixel_formats().

A viewport is responsible of the event handling. It catches the events generated by the underlying backend, and converts them building Pigment events, which are then dispatched through signals. You can connect functions to these signals using g_signal_connect() , in UI programming these functions are often called callbacks. Each time an event is generated, the corresponding signal is emited and all the connected callbacks are called.

Practically speaking, the viewport is basically either a window on your screen or your complete monitor/TV. When you define the size of the viewport, the implementation will try to change the window size, or the video mode if you set it to be fullscreen. Some viewport implementation are not able to obtain the screen size in millimeters and you have to set it, so that the viewport can calculate the appropriate projections taking in account non square pixels.

Applications are strongly encouraged to use the viewport the following way:

  • The application initializes Pigment using pgm_init and then try to get the screen size in millimeters, the screen resolution and the viewport size (window size or fullscreen size). Looking at those parameters the application can calculate the pixel aspect ratio of the screen and figure out the visual aspect ratio of the viewport (4:3, 16:9, etc).

  • When the application has defined the visual aspect ratio of the viewport, it can decide the visual aspect ratio it's going to generate and set the canvas size accordingly. Let's say for example that the viewport size is a 750x400 pixels window and that we have square pixels, this is a bit wider than 16:9. The application decides to generate a 16:9 style user interface and sets the canvas to 16.0x9.0. The viewport will draw black borders and project that canvas as a 711x400 pixels large rectangle in the middle of that window.

  • If the viewport size changes (window resize), the application can decide to use another aspect ratio or stick with the current one.

Last reviewed on 2007-06-10 (0.1.5)

Details

enum PgmViewportCursor

typedef enum {
  PGM_VIEWPORT_LEFT_ARROW = 0,
  PGM_VIEWPORT_INHERIT    = 1,
  PGM_VIEWPORT_NONE       = 2
} PgmViewportCursor;

Pigment system cursor type.

PGM_VIEWPORT_LEFT_ARROW

Standard left arrow system cursor.

PGM_VIEWPORT_INHERIT

Inherited cursor from the environment.

PGM_VIEWPORT_NONE

Hidden cursor.

enum PgmViewportCapacity

typedef enum {
  PGM_VIEWPORT_HARDWARE_ACCELERATION = (1 << 0),
  PGM_VIEWPORT_APPLICATION_EMBEDDING = (1 << 1),
  PGM_VIEWPORT_OPACITY               = (1 << 2),
  PGM_VIEWPORT_TOUCHPAD              = (1 << 3),
  PGM_VIEWPORT_X11_SYSTEM_BUFFER     = (1 << 4)
} PgmViewportCapacity;

Capacities supported by the viewport.

PGM_VIEWPORT_HARDWARE_ACCELERATION

Supports accelerated rendering thanks to dedicated hardware.

PGM_VIEWPORT_APPLICATION_EMBEDDING

Supports embedding into another application.

PGM_VIEWPORT_OPACITY

Supports opacity so that compositing managers can blend the viewport with other applications.

PGM_VIEWPORT_TOUCHPAD

Supports touchpad so that application can use the pressure events and parameters.

PGM_VIEWPORT_X11_SYSTEM_BUFFER

Supports X11 system buffer as image content. Actually, X11 system buffers are Pixmaps.

enum PgmViewportRotation

typedef enum {
  PGM_VIEWPORT_ROTATION_NONE = 0,
  PGM_VIEWPORT_ROTATION_90   = 1,
  PGM_VIEWPORT_ROTATION_180  = 2,
  PGM_VIEWPORT_ROTATION_270  = 3
} PgmViewportRotation;

The rotation types of the canvas projection.

PGM_VIEWPORT_ROTATION_NONE

Do not rotate to the canvas.

PGM_VIEWPORT_ROTATION_90

Rotate the canvas 90° counter-clockwise.

PGM_VIEWPORT_ROTATION_180

Rotate the canvas 180° counter-clockwise.

PGM_VIEWPORT_ROTATION_270

Rotate the canvas 270° counter-clockwise.

enum PgmViewportReflection

typedef enum {
  PGM_VIEWPORT_REFLECTION_NONE            = 0,
  PGM_VIEWPORT_REFLECTION_HORIZONTAL_FLIP = 1,
  PGM_VIEWPORT_REFLECTION_VERTICAL_FLIP   = 2
} PgmViewportReflection;

The reflection types of the canvas projection.

PGM_VIEWPORT_REFLECTION_NONE

Do not reflect to the canvas.

PGM_VIEWPORT_REFLECTION_HORIZONTAL_FLIP

Reflect the canvas horizontally.

PGM_VIEWPORT_REFLECTION_VERTICAL_FLIP

Reflect the canvas vertically.

PgmViewport

typedef struct {
  PgmViewportFactory *factory;
  PgmCanvas          *canvas;

  GList *message_filter;

  gchar             *title;
  GdkPixbuf         *icon;
  PgmViewportCursor  cursor;
  gboolean           fullscreen;
  gboolean           visible;
  gboolean           decorated;
  gboolean           iconified;
  gboolean           alpha_blending;

  gint width, height;
  gint width_mm, height_mm;

  PgmMat4x4 *projection, *inv_projection;
  gint       projected_x, projected_y;
  gint       projected_width, projected_height;

  PgmViewportRotation   rotation;
  PgmViewportReflection reflection;

  gfloat pixel_aspect_ratio;
  gfloat viewport_ratio;
  gfloat canvas_ratio;

  gulong caps_mask;

  guchar opacity;
} PgmViewport;

The PgmViewport structure.

PgmViewportFactory *factory;

the factory used to instantiate the PgmViewport.

PgmCanvas *canvas;

the attached canvas.

GList *message_filter;

the filter of message events.

gchar *title;

the viewport title.

GdkPixbuf *icon;

the current icon.

PgmViewportCursor cursor;

the current cursor.

gboolean fullscreen;

the fullscreen state.

gboolean visible;

the visible state.

gboolean decorated;

the decorated state.

gboolean iconified;

the iconified state.

gboolean alpha_blending;

the alpha blending state.

gint width;

the viewport width.

gint height;

the viewport height.

gint width_mm;

the viewport screen width in millimeters.

gint height_mm;

the viewport screen height in millimeters.

PgmMat4x4 *projection;

the 4x4 projection matrix.

PgmMat4x4 *inv_projection;

the 4x4 inverse projection matrix.

gint projected_x;

the attached canvas projected x position.

gint projected_y;

the attached canvas projected y position.

gint projected_width;

the attached canvas projected width.

gint projected_height;

the attached canvas projected height.

PgmViewportRotation rotation;

the rotation of the projected canvas.

PgmViewportReflection reflection;

the reflection of the projected canvas.

gfloat pixel_aspect_ratio;

the pixel-aspect-ratio.

gfloat viewport_ratio;

the viewport ratio.

gfloat canvas_ratio;

the attached canvas ratio with pixel-aspect-ratio correction applied.

gulong caps_mask;

the viewport mask of supported capacities.

guchar opacity;

the opacity.

PgmViewportClass

typedef struct {
  GstObjectClass parent_class;


  /* signals */

  void     (*button_press_event)    (PgmViewport *viewport,
                                     PgmEventButton *event);

  void     (*button_pressure_event) (PgmViewport *viewport,
                                     PgmEventButton *event);

  void     (*button_release_event)  (PgmViewport *viewport,
                                     PgmEventButton *event);

  void     (*key_press_event)       (PgmViewport *viewport,
                                     PgmEventKey *event);

  void     (*key_release_event)     (PgmViewport *viewport,
                                     PgmEventKey *event);

  void     (*configure_event)       (PgmViewport *viewport,
                                     PgmEventConfigure *event);

  void     (*delete_event)          (PgmViewport *viewport,
                                     PgmEvent *event);

  void     (*scroll_event)          (PgmViewport *viewport,
                                     PgmEventScroll *event);

  void     (*motion_notify_event)   (PgmViewport *viewport,
                                     PgmEventMotion *event);

  void     (*expose_event)          (PgmViewport *viewport,
                                     PgmEventExpose *event);

  gboolean (*drag_motion_event)     (PgmViewport *viewport,
                                     PgmEventDnd *event);

  void     (*drag_drop_event)       (PgmViewport *viewport,
                                     PgmEventDnd *event);

  void     (*drag_leave_event)      (PgmViewport *viewport,
                                     PgmEventDnd *event);

  void     (*state_event)           (PgmViewport *viewport,
                                     PgmEventState *event);

#ifdef WIN32
  LRESULT  (*win32_message_event)   (PgmViewport *viewport,
                                     PgmEventWin32Message *event);
#endif /* WIN32 */

  void     (*pixels_read)           (PgmViewport *viewport,
                                     guint width,
                                     guint height,
                                     gpointer pixels);

  void     (*update_pass)           (PgmViewport *viewport);

  /* virtual methods for subclasses */

  PgmError (*set_title)             (PgmViewport *viewport,
                                     const gchar *title);

  PgmError (*show)                  (PgmViewport *viewport);
  PgmError (*hide)                  (PgmViewport *viewport);

  PgmError (*set_decorated)         (PgmViewport *viewport,
                                     gboolean decorated);

  PgmError (*set_cursor)            (PgmViewport *viewport,
                                     PgmViewportCursor cursor);

  PgmError (*set_icon)              (PgmViewport *viewport,
                                     GdkPixbuf *icon);

  PgmError (*set_size)              (PgmViewport *viewport,
                                     gint width,
                                     gint height);
  PgmError (*get_size)              (PgmViewport *viewport,
                                     gint *width,
                                     gint *height);

  PgmError (*set_alpha_blending)    (PgmViewport *viewport,
                                     gboolean alpha_blending);

  PgmError (*set_opacity)           (PgmViewport *viewport,
                                     guchar opacity);

  PgmError (*set_fullscreen)        (PgmViewport *viewport,
                                     gboolean fullscreen);

  PgmError (*set_iconified)         (PgmViewport *viewport,
                                     gboolean iconified);

  PgmError (*focus)                 (PgmViewport *viewport);

  PgmError (*set_screen_resolution) (PgmViewport *viewport,
                                     gint width,
                                     gint height);
  PgmError (*get_screen_resolution) (PgmViewport *viewport,
                                     gint *width,
                                     gint *height);

  PgmError (*set_screen_size_mm)    (PgmViewport *viewport,
                                     gint width,
                                     gint height);
  PgmError (*get_screen_size_mm)    (PgmViewport *viewport,
                                     gint *width,
                                     gint *height);

  PgmError (*set_canvas)            (PgmViewport *viewport,
                                     PgmCanvas *canvas);

  PgmError (*update_projection)     (PgmViewport *viewport);

  PgmError (*get_embedding_id)      (PgmViewport *viewport,
                                     gulong *embedding_id);

  PgmError (*get_pixel_formats)     (PgmViewport *viewport,
                                     gulong *formats_mask);

  PgmError (*get_caps_mask)         (PgmViewport *viewport,
                                     gulong *caps_mask);

  PgmError (*get_max_texture_size)  (PgmViewport *viewport,
                                     guint32 *max_texture_size);

  PgmError (*get_frame_rate)        (PgmViewport *viewport,
                                     guint *frame_rate);

  PgmError (*set_message_filter)    (PgmViewport *viewport,
                                     GList *filter);

  PgmError (*read_pixels)           (PgmViewport *viewport,
                                     guint x,
                                     guint y,
                                     guint width,
                                     guint height,
                                     guint8 *pixels);

  PgmError (*set_drag_status)       (PgmViewport *viewport,
                                     gboolean accept);
} PgmViewportClass;

Pigment drawable class.

GstObjectClass parent_class;

the parent class structure.

button_press_event ()

the "button-press-event" signal.

button_pressure_event ()

the "button-pressure-event" signal.

button_release_event ()

the "button-release-event" signal.

key_press_event ()

the "key-press-event" signal.

key_release_event ()

the "key-release-event" signal.

configure_event ()

the "configure-event" signal.

delete_event ()

the "delete-event" signal.

scroll_event ()

the "scroll-event" signal.

motion_notify_event ()

the "motion-notify-event" signal.

expose_event ()

the "expose-event" signal.

drag_motion_event ()

the "drag-motion-event" signal.

drag_drop_event ()

the "drag-drop-event" signal.

drag_leave_event ()

the "drag-leave-event" signal.

state_event ()

the "state-event" signal.

win32_message_event ()

the "win32-message-event" signal.

pixels_read ()

the "pixels-read" signal.

update_pass ()

the "update-pass" signal.

set_title ()

the set_title virtual method.

show ()

the show virtual method.

hide ()

the hide virtual method.

set_decorated ()

the set_decorated virtual method.

set_cursor ()

the set_cursor virtual method.

set_icon ()

the set_icon virtual method.

set_size ()

the set_size virtual method.

get_size ()

the get_size virtual method.

set_alpha_blending ()

the set_alpha_blending virtual method.

set_opacity ()

the set_opacity virtual method.

set_fullscreen ()

the set_fullscreen virtual method.

set_iconified ()

the set_iconified virtual method.

focus ()

the focus virtual method.

set_screen_resolution ()

the set_screen_resolution virtual method.

get_screen_resolution ()

the get_screen_resolution virtual method.

set_screen_size_mm ()

the set_screen_size_mm virtual method.

get_screen_size_mm ()

the get_screen_size_mm virtual method.

set_canvas ()

the set_canvas virtual method.

update_projection ()

the update_projection virtual method.

get_embedding_id ()

the get_embedding_id virtual method.

get_pixel_formats ()

the get_pixel_formats virtual method.

get_caps_mask ()

the get_caps_mask virtual method.

get_max_texture_size ()

the get_max_texture_size virtual method.

get_frame_rate ()

the get_frame_rate virtual method.

set_message_filter ()

the set_message_filter virtual method.

read_pixels ()

the read_pixels virtual method.

set_drag_status ()

the set_drag_status virtual method.

pgm_viewport_set_title ()

PgmError            pgm_viewport_set_title              (PgmViewport *viewport,
                                                         const gchar *title);

Sets the title appearing in the title bar and in the iconified window list. The string is copied and can be freed when the call returns.

MT safe.

viewport :

a PgmViewport object.

title :

the title.

Returns :

a PgmError indicating success/failure.

pgm_viewport_get_title ()

PgmError            pgm_viewport_get_title              (PgmViewport *viewport,
                                                         gchar **title);

Retrieves the title of viewport in title.

MT safe.

viewport :

a PgmViewport object.

title :

a pointer to a pointer to a gchar where the title string will be stored. g_free() after use.

Returns :

A PgmError indicating success/failure.

pgm_viewport_show ()

PgmError            pgm_viewport_show                   (PgmViewport *viewport);

Makes viewport visible.

MT safe.

viewport :

a PgmViewport object.

Returns :

a PgmError indicating success/failure.

pgm_viewport_hide ()

PgmError            pgm_viewport_hide                   (PgmViewport *viewport);

Makes viewport invisible.

MT safe.

viewport :

a PgmViewport object.

Returns :

a PgmError indicating success/failure.

pgm_viewport_is_visible ()

PgmError            pgm_viewport_is_visible             (PgmViewport *viewport,
                                                         gboolean *visible);

Retrieves whether viewport is visible.

MT safe.

viewport :

a PgmViewport object.

visible :

a pointer to a gboolean where the visible state of the viewport is going to be stored.

Returns :

a PgmError indicating success/failure.

pgm_viewport_set_decorated ()

PgmError            pgm_viewport_set_decorated          (PgmViewport *viewport,
                                                         gboolean decorated);

By default, viewports should be (depending on the plugin) decorated with a title bar and resize controls. This function allows to disable these decorations, creating a borderless viewport.

MT safe.

viewport :

a PgmViewport object.

decorated :

TRUE to decorate the viewport.

Returns :

a PgmError indicating success/failure.

pgm_viewport_get_decorated ()

PgmError            pgm_viewport_get_decorated          (PgmViewport *viewport,
                                                         gboolean *decorated);

Retrieves in decorated whether viewport is decorated.

MT safe.

viewport :

a PgmViewport object.

decorated :

a pointer the a gboolean where the decorated state will be stored.

Returns :

a PgmError indicating success/failure.

pgm_viewport_set_cursor ()

PgmError            pgm_viewport_set_cursor             (PgmViewport *viewport,
                                                         PgmViewportCursor cursor);

Sets cursor as the current cursor of viewport.

MT safe.

viewport :

a PgmViewport object.

cursor :

the cursor to set.

Returns :

a PgmError indicating success/failure.

pgm_viewport_get_cursor ()

PgmError            pgm_viewport_get_cursor             (PgmViewport *viewport,
                                                         PgmViewportCursor *cursor);

Retrieves the cursor of viewport.

MT safe.

viewport :

a PgmViewport object.

cursor :

a pointer PgmViewportCursor where the viewport cursor is going to be stored.

Returns :

a PgmError indicating success/failure.

pgm_viewport_set_icon ()

PgmError            pgm_viewport_set_icon               (PgmViewport *viewport,
                                                         GdkPixbuf *icon);

Sets icon as the current icon of viewport (shown by the window manager e.g. when the viewport window is minimised).

MT safe.

viewport :

a PgmViewport object.

icon :

a GdkPixbuf object to set as icon for viewport.

Returns :

a PgmError indicating success/failure.

pgm_viewport_get_icon ()

PgmError            pgm_viewport_get_icon               (PgmViewport *viewport,
                                                         GdkPixbuf **icon);

Retrieves the icon of viewport.

MT safe.

viewport :

a PgmViewport object.

icon :

a double pointer GdkPixbuf where the viewport icon is going to be stored. Unref after usage.

Returns :

a PgmError indicating success/failure.

pgm_viewport_set_size ()

PgmError            pgm_viewport_set_size               (PgmViewport *viewport,
                                                         gint width,
                                                         gint height);

Sets viewport size in pixels to (width,height).

MT safe.

viewport :

a PgmViewport object.

width :

the viewport width.

height :

the viewport height.

Returns :

a PgmError indicating success/failure.

pgm_viewport_get_size ()

PgmError            pgm_viewport_get_size               (PgmViewport *viewport,
                                                         gint *width,
                                                         gint *height);

Retrieves the size (width,height) of viewport in pixels.

MT safe.

viewport :

a PgmViewport object.

width :

a pointer to a gint where the viewport width in pixels is going to be stored.

height :

a pointer to a gint where the viewport height in pixels is going to be stored.

Returns :

a PgmError indicating success/failure.

pgm_viewport_set_alpha_blending ()

PgmError            pgm_viewport_set_alpha_blending     (PgmViewport *viewport,
                                                         gboolean alpha_blending);

Enable or disable alpha blending on viewport.

The function is useful to improve the rendering performance. For instance it can make HD video playback in fullscreen smoother, when no blended drawables need to be drawn over it.

MT safe.

viewport :

a PgmViewport object.

alpha_blending :

the alpha blending state.

Returns :

a PgmError indicating success/failure.

pgm_viewport_get_alpha_blending ()

PgmError            pgm_viewport_get_alpha_blending     (PgmViewport *viewport,
                                                         gboolean *alpha_blending);

Retrieves in alpha_blending the alpha blending state of viewport.

MT safe.

viewport :

a PgmViewport object.

alpha_blending :

a pointer to a gboolean where the alpha blending state is going to be stored.

Returns :

a PgmError indicating success/failure.

pgm_viewport_set_opacity ()

PgmError            pgm_viewport_set_opacity            (PgmViewport *viewport,
                                                         guchar opacity);

Set the opacity of viewport.

Note that this function only works if viewport supports the PGM_VIEWPORT_OPACITY capacity. The opacity is considered by compositing managers for blending with other applications.

MT safe.

viewport :

a PgmViewport object.

opacity :

the opacity between 0 and 255.

Returns :

a PgmError indicating success/failure.

pgm_viewport_get_opacity ()

PgmError            pgm_viewport_get_opacity            (PgmViewport *viewport,
                                                         guchar *opacity);

Retrieves in opacity the opacity of viewport.

MT safe.

viewport :

a PgmViewport object.

opacity :

a pointer to a guchar where the opacity is going to be stored.

Returns :

a PgmError indicating success/failure.

pgm_viewport_set_fullscreen ()

PgmError            pgm_viewport_set_fullscreen         (PgmViewport *viewport,
                                                         gboolean fullscreen);

Sets/unsets fullscreen mode of viewport function of fullscreen.

MT safe.

viewport :

a PgmViewport object.

fullscreen :

the fullscreen state.

Returns :

a PgmError indicating success/failure.

pgm_viewport_get_fullscreen ()

PgmError            pgm_viewport_get_fullscreen         (PgmViewport *viewport,
                                                         gboolean *fullscreen);

Retrieves the fullscreen state of viewport in fullscreen.

MT safe.

viewport :

a PgmViewport object.

fullscreen :

a pointer to a gboolean where the fullscreen state is going to be stored.

Returns :

A PgmError indicating success/failure.

pgm_viewport_set_iconified ()

PgmError            pgm_viewport_set_iconified          (PgmViewport *viewport,
                                                         gboolean iconified);

Asks to iconify (i.e. minimize) viewport depending on the iconified value.

MT safe.

viewport :

a PgmViewport object.

iconified :

TRUE to iconify the viewport.

Returns :

a PgmError indicating success/failure.

pgm_viewport_get_iconified ()

PgmError            pgm_viewport_get_iconified          (PgmViewport *viewport,
                                                         gboolean *iconified);

Retrieves in iconified whether viewport is iconified.

MT safe.

viewport :

a PgmViewport object.

iconified :

a pointer the a gboolean where the iconified state will be stored.

Returns :

a PgmError indicating success/failure.

pgm_viewport_focus ()

PgmError            pgm_viewport_focus                  (PgmViewport *viewport);

Presents viewport to the user. This may mean raising the window in the stacking order, deiconifying it and/or giving it the keyboard focus, possibly dependent on the user's platform, window manager, and preferences.

Note that if viewport is hidden, this function calls pgm_viewport_show() as well.

MT safe.

viewport :

a PgmViewport object.

Returns :

a PgmError indicating success/failure.

pgm_viewport_get_screen_resolution ()

PgmError            pgm_viewport_get_screen_resolution  (PgmViewport *viewport,
                                                         gint *width,
                                                         gint *height);

Retrieves the resolution (width,height) of viewport in pixels.

MT safe.

viewport :

a PgmViewport object.

width :

a pointer to a gint where the screen width in pixels is going to be stored.

height :

a pointer to a gint where the screen height in pixels is going to be stored.

Returns :

a PgmError indicating success/failure.

pgm_viewport_set_screen_resolution ()

PgmError            pgm_viewport_set_screen_resolution  (PgmViewport *viewport,
                                                         gint width,
                                                         gint height);

Sets a new resolution (width,height) of viewport in pixels. This is changing the video mode or the display resolution so you are strongly encouraged to restore it to original value when exiting.

MT safe.

viewport :

a PgmViewport object.

width :

the screen width in pixels.

height :

the screen height in pixels.

Returns :

a PgmError indicating success/failure.

pgm_viewport_get_screen_size_mm ()

PgmError            pgm_viewport_get_screen_size_mm     (PgmViewport *viewport,
                                                         gint *width,
                                                         gint *height);

Retrieves the physical (width,height) size of viewport in millimeters. If the plugin can not provide that information it will return -1 as width and height. In that case the application should provide the screen size through pgm_viewport_set_screen_size_mm().

MT safe.

viewport :

a PgmViewport object.

width :

a pointer to a gint where the screen width in millimeters is going to be stored.

height :

a pointer to a gint where the screen height in millimeters is going to be stored.

Returns :

a PgmError indicating success/failure.

pgm_viewport_set_screen_size_mm ()

PgmError            pgm_viewport_set_screen_size_mm     (PgmViewport *viewport,
                                                         gint width,
                                                         gint height);

Sets the physical screen size in millimeters. This is used if the viewport implementation cannot retrieve that information by itself. You have to define the physical ratio of the screen so that viewport can calculate the pixel aspect ratio.

MT safe.

viewport :

a PgmViewport object.

width :

the screen width in millimeters.

height :

the screen height in millimeters.

Returns :

a PgmError indicating success/failure.

pgm_viewport_set_message_filter ()

PgmError            pgm_viewport_set_message_filter     (PgmViewport *viewport,
                                                         GList *filter);

Sets the list of message types filtered by viewport for the "win32-message-events" signal. The previously set filter is discarded. A NULL filter is equivalent to a void list. The list is copied internally and have to be freed by the caller.

MT safe.

viewport :

a PgmViewport object.

filter :

the GList containing the message types to filter.

Returns :

a PgmError indicating success/failure.

pgm_viewport_get_message_filter ()

PgmError            pgm_viewport_get_message_filter     (PgmViewport *viewport,
                                                         GList **filter);

Retrieves the current list of message types filtered by viewport.

MT safe.

viewport :

a PgmViewport object.

filter :

a pointer to GList pointer in which the filter list is going to be stored. g_list_free() after use.

Returns :

a PgmError indicating success/failure.

pgm_viewport_push_event ()

PgmError            pgm_viewport_push_event             (PgmViewport *viewport,
                                                         PgmEvent *event);

Push an event in the list.

MT safe.

viewport :

a PgmViewport object.

event :

the PgmEvent to push.

Returns :

a PgmError indicating success/failure.

pgm_viewport_get_canvas ()

PgmError            pgm_viewport_get_canvas             (PgmViewport *viewport,
                                                         PgmCanvas **canvas);

Retrieves the current canvas or NULL if there's no canvas bound.

MT safe.

viewport :

a PgmViewport object.

canvas :

a pointer to PgmCanvas pointer in which the canvas bound to viewport is going to be stored. The refcount of canvas is increased.

Returns :

a PgmError indicating success/failure.

pgm_viewport_set_canvas ()

PgmError            pgm_viewport_set_canvas             (PgmViewport *viewport,
                                                         PgmCanvas *canvas);

Sets the canvas to be projected by the viewport. This function increases the refcount on the canvas. Any previously set canvas on viewport is unreffed. If canvas is NULL, the previously set canvas is unreffed.

MT safe.

viewport :

a PgmViewport object.

canvas :

the PgmCanvas to bind.

Returns :

a PgmError indicating success/failure.

pgm_viewport_set_canvas_rotation ()

PgmError            pgm_viewport_set_canvas_rotation    (PgmViewport *viewport,
                                                         PgmViewportRotation rotation);

Affects the way viewport projects its canvas applying the specified rotation.

MT safe.

viewport :

a PgmViewport object.

rotation :

the PgmViewportRotation rotation type.

Returns :

a PgmError indicating success/failure.

pgm_viewport_get_canvas_rotation ()

PgmError            pgm_viewport_get_canvas_rotation    (PgmViewport *viewport,
                                                         PgmViewportRotation *rotation);

Retrieves the current rotation applied by viewport on its canvas.

MT safe.

viewport :

a PgmViewport object.

rotation :

a pointer to PgmViewportRotation where the current rotation will be stored.

Returns :

a PgmError indicating success/failure.

pgm_viewport_set_canvas_reflection ()

PgmError            pgm_viewport_set_canvas_reflection  (PgmViewport *viewport,
                                                         PgmViewportReflection reflection);

Affects the way viewport projects its canvas applying the specified reflection.

MT safe.

viewport :

a PgmViewport object.

reflection :

the PgmViewportReflection reflection type.

Returns :

a PgmError indicating success/failure.

pgm_viewport_get_canvas_reflection ()

PgmError            pgm_viewport_get_canvas_reflection  (PgmViewport *viewport,
                                                         PgmViewportReflection *reflection);

Retrieves the current reflection applied by viewport on its canvas.

MT safe.

viewport :

a PgmViewport object.

reflection :

a pointer to PgmViewportReflection where the current reflection will be stored.

Returns :

a PgmError indicating success/failure.

pgm_viewport_update_projection ()

PgmError            pgm_viewport_update_projection      (PgmViewport *viewport);

Update the projection. The projection update is done automatically by Pigment, this function is only useful for plugin that have changed for instance the size of the viewport, and want to adapt the projection accordingly.

MT safe.

viewport :

a PgmViewport object.

Returns :

a PgmError indicating success/failure.

pgm_viewport_to_canvas ()

PgmError            pgm_viewport_to_canvas              (PgmViewport *viewport,
                                                         gfloat *canvas_x,
                                                         gfloat *canvas_y,
                                                         gfloat *canvas_z,
                                                         gfloat viewport_x,
                                                         gfloat viewport_y,
                                                         gfloat viewport_z);

Retrieves the projection of a 3-components vector in viewport coordinates on the viewport in a 3-components vector in canvas coordinates. The z component of the viewport being clamped in the range [0.0, 1.0].

Note that if you want to get a canvas vector with a z coordinates of 0.0f, you can give -1.0f to viewport_z. It can be useful when you want to convert 2d position in viewport coordinates to canvas coordinates.

MT safe.

viewport :

a PgmViewport object.

canvas_x :

a gfloat address to store the unprojected canvas x component.

canvas_y :

a gfloat address to store the unprojected canvas y component.

canvas_z :

a gfloat address to store the unprojected canvas z component.

viewport_x :

the viewport x component to project.

viewport_y :

the viewport y component to project.

viewport_z :

the viewport z component to project.

Returns :

a PgmError indicating success/failure.

pgm_viewport_from_canvas ()

PgmError            pgm_viewport_from_canvas            (PgmViewport *viewport,
                                                         gfloat *viewport_x,
                                                         gfloat *viewport_y,
                                                         gfloat *viewport_z,
                                                         gfloat canvas_x,
                                                         gfloat canvas_y,
                                                         gfloat canvas_z);

Retrieves the projection of a 3-components vector in canvas coordinates on the viewport in a 3-components vector in viewport coordinates.

MT safe.

viewport :

a PgmViewport object.

viewport_x :

a gfloat address to store the projected viewport x component.

viewport_y :

a gfloat address to store the projected viewport y component.

viewport_z :

a gfloat address to store the projected viewport z component.

canvas_x :

the canvas x component to project.

canvas_y :

the canvas y component to project.

canvas_z :

the canvas z component to project.

Returns :

a PgmError indicating success/failure.

pgm_viewport_get_embedding_id ()

PgmError            pgm_viewport_get_embedding_id       (PgmViewport *viewport,
                                                         gulong *embedding_id);

Gets the embedding ID of viewport. It can be used by other applications to embed it.

MT safe.

viewport :

a PgmViewport object.

embedding_id :

a pointer to a gulong where the embedding ID is going to be stored.

Returns :

a PgmError indicating success/failure.

pgm_viewport_get_pixel_formats ()

PgmError            pgm_viewport_get_pixel_formats      (PgmViewport *viewport,
                                                         gulong *formats_mask);

Gets the list of supported pixel formats of viewport.

MT safe.

viewport :

a PgmViewport object.

formats_mask :

a pointer to a gulong where the mask of supported PgmImagePixelFormat is going to be stored.

Returns :

a PgmError indicating success/failure.

pgm_viewport_get_caps_mask ()

PgmError            pgm_viewport_get_caps_mask          (PgmViewport *viewport,
                                                         gulong *caps_mask);

Retrieves the mask of supported PgmViewportCapacity.

MT safe.

viewport :

a PgmViewport object.

caps_mask :

a pointer to a gulong where the mask of PgmViewportCapacity is going to be stored.

Returns :

a PgmError indicating success/failure.

pgm_viewport_get_max_texture_size ()

PgmError            pgm_viewport_get_max_texture_size   (PgmViewport *viewport,
                                                         guint32 *max_texture_size);

Retrieves the maximum texture size.

MT safe.

viewport :

a PgmViewport object.

max_texture_size :

a pointer to a guint32 where the maximum texture size is going to be stored.

Returns :

a PgmError indicating success/failure.

pgm_viewport_get_frame_rate ()

PgmError            pgm_viewport_get_frame_rate         (PgmViewport *viewport,
                                                         guint *frame_rate);

Retrieves the frame rate in frames per second of the rendering of the canvas on viewport. The value retrieved changes each second, and represents the number of frames that have been rendered in the previous second.

That function could be useful to check the rendering performance on a system, and for instance tell the user if too many frames are dropped.

MT safe.

viewport :

a PgmViewport object.

frame_rate :

a pointer to a guint where the frame rate is going to be stored.

Returns :

a PgmError indicating success/failure.

pgm_viewport_read_pixels ()

PgmError            pgm_viewport_read_pixels            (PgmViewport *viewport,
                                                         guint x,
                                                         guint y,
                                                         guint width,
                                                         guint height,
                                                         guint8 *pixels);

Requests the reading of a pixel area in viewport, starting with the pixel whose top-left corner is at location (x, y) and dimension is (width, height). Once the pixel area is obtained, the "pixels-read" signal is emitted with the requested pixels stored at location pixels. The retrieved pixel area is in the RGBA color space.

pixels should be allocated by the application with the necessary size (width * height * 4) before any call to that function. A callback must be connected to the "pixels-read" signal before any call to that function. x, y, width and height are clamped if their values lie outside viewport size.

MT Safe.

viewport :

a PgmViewport object.

x :

the x coordinate of the first pixel to read from the left of viewport.

y :

the y coordinate of the first pixel to read from the top of viewport.

width :

the width of the pixel area to read, corresponds to a single pixel.

height :

the height of the pixel area to read, corresponds to a single pixel.

pixels :

a pre-allocated memory area where the pixels read will be written. The buffer must be freed by the application, in the "pixels-read" signal callback for instance.

Returns :

a PgmError indicating success/failure.

pgm_viewport_push_pixels ()

PgmError            pgm_viewport_push_pixels            (PgmViewport *viewport,
                                                         guint width,
                                                         guint height,
                                                         guint8 *pixels);

Push a pixel area to viewport. The function will emit the "pixels-read" signal from the Pigment main loop with the given pixel area parameters.

A plugin must call this function for each read_pixels() call that does not return an error, because the user may free the pixel array in the callback called from there.

This function should only be used by plugins.

MT safe.

viewport :

a PgmViewport object.

width :

the width of the pixel area.

height :

the height of the pixel area.

pixels :

the pixels to push.

Returns :

a PgmError indicating success/failure.

pgm_viewport_emit_update_pass ()

PgmError            pgm_viewport_emit_update_pass       (PgmViewport *viewport);

Emits the 'update-pass' signal on viewport.

This function should only be used by plugins.

MT safe.

viewport :

the PgmViewport object.

Returns :

a PgmError indicating success/failure.

Signal Details

The "button-press-event" signal

void                user_function                      (PgmViewport *viewport,
                                                        PgmEvent    *event,
                                                        gpointer     user_data)      : Run Last

Will be emitted on a mouse button press on the viewport.

viewport :

the PgmViewport

event :

the PgmEventButton

user_data :

user data set when the signal handler was connected.

The "button-pressure-event" signal

void                user_function                      (PgmViewport *viewport,
                                                        PgmEvent    *event,
                                                        gpointer     user_data)      : Run Last

Will be emitted on a mouse button pressure change on the viewport.

viewport :

the PgmViewport

event :

the PgmEventButton

user_data :

user data set when the signal handler was connected.

The "button-release-event" signal

void                user_function                      (PgmViewport *viewport,
                                                        PgmEvent    *event,
                                                        gpointer     user_data)      : Run Last

Will be emitted on a mouse button release on the viewport.

viewport :

the PgmViewport

event :

the PgmEventButton

user_data :

user data set when the signal handler was connected.

The "configure-event" signal

void                user_function                      (PgmViewport *viewport,
                                                        PgmEvent    *event,
                                                        gpointer     user_data)      : Run Last

Will be emitted on a viewport position or size change.

viewport :

the PgmViewport

event :

the PgmEventConfigure

user_data :

user data set when the signal handler was connected.

The "delete-event" signal

void                user_function                      (PgmViewport *viewport,
                                                        PgmEvent    *event,
                                                        gpointer     user_data)      : Run Last

Will be emitted on a viewport close request (ie the user clicked the close button of the window manager).

viewport :

the PgmViewport

event :

the PgmEventDelete

user_data :

user data set when the signal handler was connected.

The "drag-drop-event" signal

void                user_function                      (PgmViewport *viewport,
                                                        PgmEvent    *event,
                                                        gpointer     user_data)      : Run Last

Will be emitted when the user drops data onto viewport. Note that you have to connect a handler to the signal "drag-motion-event" and return TRUE to accept a drag. This signal is not emitted if a drag has not been accepted.

viewport :

the PgmViewport

event :

the PgmEventDnd

user_data :

user data set when the signal handler was connected.

The "drag-leave-event" signal

void                user_function                      (PgmViewport *viewport,
                                                        PgmEvent    *event,
                                                        gpointer     user_data)      : Run Last

Will be emitted when the user leaves viewport during a drag. A typical reason to connect to this signal is to undo things done in "drag-motion-event".

viewport :

the PgmViewport

event :

the PgmEventDnd

user_data :

user data set when the signal handler was connected.

The "drag-motion-event" signal

gboolean            user_function                      (PgmViewport *viewport,
                                                        PgmEvent    *event,
                                                        gpointer     user_data)      : Run Last

Will be emitted when the user moves the cursor over viewport during a drag. The signal handler must determine whether the cursor position is in a drop zone or not. If it is not in a drop zone, it returns FALSE and the "drag-drop-event" signal will not be called. Otherwise, the handler returns TRUE.

viewport :

the PgmViewport

event :

the PgmEventDnd

user_data :

user data set when the signal handler was connected.

The "expose-event" signal

void                user_function                      (PgmViewport *viewport,
                                                        PgmEvent    *event,
                                                        gpointer     user_data)      : Run Last

Will be emitted when the viewport visibility status has changed.

viewport :

the PgmViewport

event :

the PgmEventExpose

user_data :

user data set when the signal handler was connected.

The "key-press-event" signal

void                user_function                      (PgmViewport *viewport,
                                                        PgmEvent    *event,
                                                        gpointer     user_data)      : Run Last

Will be emitted on a keyboard press on the viewport.

viewport :

the PgmViewport

event :

the PgmEventKey

user_data :

user data set when the signal handler was connected.

The "key-release-event" signal

void                user_function                      (PgmViewport *viewport,
                                                        PgmEvent    *event,
                                                        gpointer     user_data)      : Run Last

Will be emitted on a keyboard release on the viewport.

viewport :

the PgmViewport

event :

the PgmEventKey

user_data :

user data set when the signal handler was connected.

The "motion-notify-event" signal

void                user_function                      (PgmViewport *viewport,
                                                        PgmEvent    *event,
                                                        gpointer     user_data)      : Run Last

Will be emitted on a mouse move on the viewport.

viewport :

the PgmViewport

event :

the PgmEventMotion

user_data :

user data set when the signal handler was connected.

The "pixels-read" signal

void                user_function                      (PgmViewport *viewport,
                                                        guint        width,
                                                        guint        height,
                                                        gpointer     pixels,
                                                        gpointer     user_data)      : Run Last

Will be emitted when pixels have been read following a call to pgm_viewport_read_pixels().

viewport :

the PgmViewport

width :

the width of the pixels area

height :

the height of the pixels area

pixels :

the pixels area that has been filled. It has been allocated by the application and must be freed by the application.

user_data :

user data set when the signal handler was connected.

The "scroll-event" signal

void                user_function                      (PgmViewport *viewport,
                                                        PgmEvent    *event,
                                                        gpointer     user_data)      : Run Last

Will be emitted on a mouse scroll on the viewport.

viewport :

the PgmViewport

event :

the PgmEventScroll

user_data :

user data set when the signal handler was connected.

The "state-event" signal

void                user_function                      (PgmViewport *viewport,
                                                        PgmEvent    *event,
                                                        gpointer     user_data)      : Run Last

Will be emitted when the state of viewport changes, being a visibility change, a fullscreen change or an iconification change.

viewport :

the PgmViewport

event :

the PgmEventState

user_data :

user data set when the signal handler was connected.

The "update-pass" signal

void                user_function                      (PgmViewport *viewport,
                                                        gpointer     user_data)      : Run Last

Will be emitted prior to any rendering pass happening in the Pigment internal rendering thread. It is highly recommended to update all the Pigment drawables rendered by viewport in this signal. It ensures the best performance and rendering correctness since the object update pass will be completely synchronized prior to the rendering pass.

Note that this is the only signal in Pigment which is emitted from another thread than the one of the Pigment main loop.

viewport :

the PgmViewport

user_data :

user data set when the signal handler was connected.

See Also

#PgmCanvas, PgmViewportFactory, PgmDrawable.
pigment-0.3.17/docs/pgm/html/pigment-PgmImaging.html0000644000175000017500000002062211205035140017204 00000000000000 PgmImaging

PgmImaging

PgmImaging — A library to process pixbufs through software filters.

Synopsis


#include <pgm/imaging/pgmimaging.h>

GdkPixbuf *         pgm_imaging_linear_alpha_gradient   (const GdkPixbuf *pixbuf,
                                                         gfloat start_x,
                                                         gfloat start_y,
                                                         gfloat start_alpha,
                                                         gfloat end_x,
                                                         gfloat end_y,
                                                         gfloat end_alpha);

Description

PgmImaging is a library providing several software image processing filters. The functions can be used as CPU (Central Processing Unit) software fallback when effects can't be applied by Pigment plugins through the GPU (Graphics Processing Unit).

Last reviewed on 2008-07-29 (0.3.7)

Details

pgm_imaging_linear_alpha_gradient ()

GdkPixbuf *         pgm_imaging_linear_alpha_gradient   (const GdkPixbuf *pixbuf,
                                                         gfloat start_x,
                                                         gfloat start_y,
                                                         gfloat start_alpha,
                                                         gfloat end_x,
                                                         gfloat end_y,
                                                         gfloat end_alpha);

Creates a new GdkPixbuf by compositing the alpha channel of pixbuf with the linear alpha gradient mask given as parameters. Note that the resulting pixbuf always contains an alpha channel even if the original pixbuf does not. In that case, the alpha channel is automatically added with a default value of 1.0 corresponding to opaque pixels.

pixbuf :

A GdkPixbuf.

start_x :

x coordinate of the start point, in the range [0.0, 1.0].

start_y :

y coordinate of the start point, in the range [0.0, 1.0].

start_alpha :

Alpha component at the start point, in the range [0.0, 1.0].

end_x :

x coordinate of the end point, in the range [0.0, 1.0].

end_y :

y coordinate of the end point, in the range [0.0, 1.0].

end_alpha :

Alpha component at the end point, in the range [0.0, 1.0].

Returns :

A newly-created GdkPixbuf with a reference count of 1, or NULL if not enough memory could be allocated.
pigment-0.3.17/docs/pgm/html/pigment-PgmEvents.html0000644000175000017500000011353511205035140017103 00000000000000 PgmEvents

PgmEvents

PgmEvents — Various structs and functions used for events handling.

Description

Various structs and functions used by Pigment for events handling.

Last reviewed on 2007-04-12 (0.1.5)

Details

enum PgmEventType

typedef enum {
  PGM_NOTHING             = -1,
  PGM_MOTION_NOTIFY       = 0,
  PGM_BUTTON_PRESS        = 1,
  PGM_DOUBLE_BUTTON_PRESS = 2,
  PGM_TRIPLE_BUTTON_PRESS = 3,
  PGM_BUTTON_PRESSURE     = 4,
  PGM_BUTTON_RELEASE      = 5,
  PGM_KEY_PRESS           = 6,
  PGM_KEY_RELEASE         = 7,
  PGM_EXPOSE              = 8,
  PGM_CONFIGURE           = 9,
  PGM_DRAG_MOTION         = 10,
  PGM_DRAG_DROP           = 12,
  PGM_DRAG_LEAVE          = 13,
  PGM_SCROLL              = 14,
  PGM_STATE               = 15,
  PGM_DELETE              = 16,
  PGM_WIN32_MESSAGE       = 17
} PgmEventType;

Specifies the type of the event.

PGM_NOTHING

a special code to indicate a null event.

PGM_MOTION_NOTIFY

the pointer has entered the window.

PGM_BUTTON_PRESS

a mouse button has been pressed.

PGM_DOUBLE_BUTTON_PRESS

a mouse button has been clicked 2 times in a short period of time. Note that each click also generates a PGM_BUTTON_PRESS event.

PGM_TRIPLE_BUTTON_PRESS

a mouse button has been clicked 3 times in a short period of time. Note that each click also generates a PGM_BUTTON_PRESS event.

PGM_BUTTON_PRESSURE

a mouse button pressure has changed.

PGM_BUTTON_RELEASE

a mouse button has been released.

PGM_KEY_PRESS

a key has been pressed.

PGM_KEY_RELEASE

a key has been released.

PGM_EXPOSE

the window has become visible and needs to be redrawn.

PGM_CONFIGURE

the size or the position of the viewport has changed.

PGM_DRAG_MOTION

the mouse has moved in the viewport while a drag is in progress.

PGM_DRAG_DROP

the mouse has dropped data onto the viewport.

PGM_DRAG_LEAVE

the mouse has left the viewport while a drag is in progress.

PGM_SCROLL

the scroll wheel was turned.

PGM_STATE

the state of a viewport has changed.

PGM_DELETE

the window manager has requested that the toplevel window be destroyed, usually when the user clicks on a special icon in the title bar.

PGM_WIN32_MESSAGE

a Win32 message has been received (Only used on Windows).

enum PgmModifierType

typedef enum {
  PGM_SHIFT_MASK    = (1 << 0),
  PGM_CAPSLOCK_MASK = (1 << 1),
  PGM_CONTROL_MASK  = (1 << 2),
  PGM_ALT_MASK      = (1 << 3),
  PGM_NUMLOCK_MASK  = (1 << 4)
} PgmModifierType;

A set of bit-flags to indicate the state of modifier keys. Typical modifier keys are Shift, Control, Alt and CapsLock.

PGM_SHIFT_MASK

the Shift key.

PGM_CAPSLOCK_MASK

the Caps Lock.

PGM_CONTROL_MASK

the Control key.

PGM_ALT_MASK

the Alt key.

PGM_NUMLOCK_MASK

the Num Lock.

enum PgmButtonType

typedef enum {
  PGM_BUTTON_LEFT   = (1 << 0),
  PGM_BUTTON_MIDDLE = (1 << 1),
  PGM_BUTTON_RIGHT  = (1 << 2)
} PgmButtonType;

The mouse button type.

PGM_BUTTON_LEFT

the left mouse button.

PGM_BUTTON_MIDDLE

the middle mouse button.

PGM_BUTTON_RIGHT

the right mouse button.

enum PgmScrollDirection

typedef enum {
  PGM_SCROLL_UP,
  PGM_SCROLL_DOWN
} PgmScrollDirection;

The mouse wheel scrolling directions.

PGM_SCROLL_UP

the scrolling in the upward direction.

PGM_SCROLL_DOWN

the scrolling in the downward direction.

enum PgmViewportState

typedef enum {
  PGM_VIEWPORT_ICONIFIED  = (1 << 0)
} PgmViewportState;

Specifies the state of a viewport.

PGM_VIEWPORT_ICONIFIED

The viewport is minimized.

union PgmEvent

union PgmEvent {
  PgmEventType         type;
  PgmEventAny          any;
  PgmEventMotion       motion;
  PgmEventButton       button;
  PgmEventScroll       scroll;
  PgmEventKey          key;
  PgmEventExpose       expose;
  PgmEventConfigure    configure;
  PgmEventDnd          dnd;
  PgmEventState        state;
#ifdef WIN32
  PgmEventWin32Message win32_message;
#endif /* WIN32 */
};

The PgmEvent struct contains a union of all of the event structs, and allows access to the data fields in a number of ways.

The event type is always the first field in all of the event structs, and can always be accessed with the following code, no matter what type of event it is:

  PgmEvent *event;  
  PgmEventType type;
  type = event->type;

To access other fields of the event structs, the pointer to the event can be cast to the appropriate event struct pointer, or the union member name can be used. For example if the event type is PGM_BUTTON_PRESS then the x coordinate of the button press can be accessed with:

  PgmEvent *event;  
  gfloat x;
  x = ((PgmEventButton*) event)->x;

or with:

  PgmEvent *event;  
  gfloat x;
  x = event->button.x;


PgmEventAny

typedef struct {
  PgmEventType type;
  guint8       source;
} PgmEventAny;

Contains the fields which are common to all event structs. Any event pointer can safely be cast to a pointer to a PgmEventAny to access these fields.

PgmEventType type;

the type of the event.

guint8 source;

the source field that can be filled by applications to indicate the source of the event (mouse, pen, remote control, etc).

PgmEventMotion

typedef struct {
  PgmEventType type;
  guint8       source;
  guint32      time;
  gfloat       x, y;
  guint32      pressure;
} PgmEventMotion;

Generated when the pointer moves.

PgmEventType type;

the type of the event.

guint8 source;

the source field that can be filled by applications to indicate the source of the event (mouse, pen, remote control, etc).

guint32 time;

the time of the event in milliseconds.

gfloat x;

the x coordinate of the pointer relative to the window.

gfloat y;

the y coordinate of the pointer relative to the window.

guint32 pressure;

the pressure force, set to 0 when not used with a touch screen.

PgmEventButton

typedef struct {
  PgmEventType  type;
  guint8        source;
  guint32       time;
  gfloat        x, y;
  PgmButtonType button;
  guint32       pressure;
} PgmEventButton;

Used for button press and button release events.

PgmEventType type;

the type of the event.

guint8 source;

the source field that can be filled by applications to indicate the source of the event (mouse, pen, remote control, etc).

guint32 time;

the time of the event in milliseconds.

gfloat x;

the x coordinate of the pointer relative to the window.

gfloat y;

the y coordinate of the pointer relative to the window.

PgmButtonType button;

the button which was pressed or released.

guint32 pressure;

the pressure force, set to 0 when not used with a touch screen.

PgmEventScroll

typedef struct {
  PgmEventType       type;
  guint8             source;
  guint32            time;
  gfloat             x, y;
  PgmScrollDirection direction;
} PgmEventScroll;

Generated when the mouse wheel is turned.

PgmEventType type;

the type of the event.

guint8 source;

the source field that can be filled by applications to indicate the source of the event (mouse, pen, remote control, etc).

guint32 time;

the time of the event in milliseconds.

gfloat x;

the x coordinate of the pointer relative to the window.

gfloat y;

the y coordinate of the pointer relative to the window.

PgmScrollDirection direction;

the scroll wheel direction.

PgmEventState

typedef struct {
  PgmEventType     type;
  guint8           source;
  PgmViewportState changed_mask;
  PgmViewportState state_mask;
} PgmEventState;

Generated when the state of a viewport changes.

PgmEventType type;

the type of the event.

guint8 source;

the source field that can be filled by applications to indicate the source of the event (mouse, pen, remote control, etc).

PgmViewportState changed_mask;

mask specifying what viewport flags have changed.

PgmViewportState state_mask;

mask specifying the new viewport flags.

PgmEventWin32Message

typedef struct {
  PgmEventType type;
  guint8       source;
  guint32      time;
  UINT         message;
  WPARAM       wparam;
  LPARAM       lparam;
} PgmEventWin32Message;

Describes a Win32 message.

PgmEventType type;

the type of the event.

guint8 source;

the source field that can be filled by applications to indicate the source of the event (mouse, pen, remote control, etc).

guint32 time;

the time of the event in milliseconds.

UINT message;

the Win32 message value.

WPARAM wparam;

additional message information depending on the message value.

LPARAM lparam;

additional message information depending on the message value.

PgmEventDnd

typedef struct {
  PgmEventType   type;
  guint8         source;
  guint32        time;
  gfloat         x, y;
  gchar        **uri;
} PgmEventDnd;

Describes a drag motion, drop, or leave event.

PgmEventType type;

the type of the event.

guint8 source;

the source field that can be filled by applications to indicate the source of the event (mouse, pen, remote control, etc).

guint32 time;

the time of the event in milliseconds.

gfloat x;

the new x coordinate of the window.

gfloat y;

the new y coordinate of the window.

gchar **uri;

the list of URI as a NULL-terminated array of strings.

PgmEventKey

typedef struct {
  PgmEventType type;
  guint8       source;
  guint32      time;
  guint        modifier;
  guint        keyval;
  guint16      hardware_keycode;
} PgmEventKey;

Describes a key press or key release event.

PgmEventType type;

the type of the event.

guint8 source;

the source field that can be filled by applications to indicate the source of the event (mouse, pen, remote control, etc).

guint32 time;

the time of the event in milliseconds.

guint modifier;

A bit-mask representing the state of the modifier keys (e.g. Control, Shift and Alt), see PgmModifierType.

guint keyval;

the key that was pressed or released. See the pgm/pgmkeysyms.h header file for a complete list of Pigment key codes.

guint16 hardware_keycode;

the raw code of the key that was pressed or released.

PgmEventExpose

typedef struct {
  PgmEventType type;
  guint8       source;
} PgmEventExpose;

Generated when a window becomes visible and needs to be redrawn.

PgmEventType type;

the type of the event.

guint8 source;

the source field that can be filled by applications to indicate the source of the event (mouse, pen, remote control, etc).

PgmEventConfigure

typedef struct {
  PgmEventType type;
  guint8       source;
  gint         x, y;
  gint         width, height;
} PgmEventConfigure;

Generated when a viewport size or position has changed.

PgmEventType type;

the type of the event.

guint8 source;

the source field that can be filled by applications to indicate the source of the event (mouse, pen, remote control, etc).

gint x;

the new x coordinate of the window.

gint y;

the new y coordinate of the window.

gint width;

the new width of the viewport.

gint height;

the new height of the viewport.

pgm_event_new ()

PgmEvent *          pgm_event_new                       (PgmEventType type);

Creates a new PgmEvent of the specified type.

MT safe.

type :

the type of event.

Returns :

a new PgmEvent instance.

pgm_event_copy ()

PgmEvent *          pgm_event_copy                      (PgmEvent *event);

Copies event.

MT safe.

event :

a PgmEvent object.

Returns :

a newly allocated PgmEvent.

pgm_event_free ()

void                pgm_event_free                      (PgmEvent *event);

MT safe.

Frees all resources used by event.

event :

A PgmEvent object.

pgm_keyval_to_unicode ()

guint32             pgm_keyval_to_unicode               (guint keyval);

Converts from a Pigment key symbol to the corresponding ISO10646 (Unicode) character.

MT safe.

keyval :

a Pigment key symbol.

Returns :

the corresponding unicode character, or 0 if there is no corresponding one.
pigment-0.3.17/docs/pgm/html/PgmGtk.html0000644000175000017500000002357211205035140014724 00000000000000 PgmGtk

PgmGtk

PgmGtk — A GTK+ widget embedding viewports.

Synopsis


#include <pgm/gtk/pgmgtk.h>

                    PgmGtk;
GtkWidget *         pgm_gtk_new                         (void);
gboolean            pgm_gtk_set_viewport                (PgmGtk *gtk,
                                                         PgmViewport *viewport);
PgmError            pgm_gtk_get_viewport                (PgmGtk *gtk,
                                                         PgmViewport **viewport);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkSocket
                                 +----PgmGtk

Implemented Interfaces

PgmGtk implements AtkImplementorIface and GtkBuildable.

Description

PgmGtk is a GTK+ widget allowing to embed a PgmViewport inside a GTK+ application.

Last reviewed on 2007-11-09 (0.3.2)

Details

PgmGtk

typedef struct _PgmGtk PgmGtk;

The opaque PgmGtk data structure.


pgm_gtk_new ()

GtkWidget *         pgm_gtk_new                         (void);

Creates a new PgmGtk object.

Returns :

a new PgmGtk instance.

pgm_gtk_set_viewport ()

gboolean            pgm_gtk_set_viewport                (PgmGtk *gtk,
                                                         PgmViewport *viewport);

Embeds viewport in the GTK+ widget gtk. viewport must support application embedding for the function to success.

gtk :

A PgmGtk object.

viewport :

A PgmViewport object.

Returns :

TRUE if viewport has been embedded successfully, FALSE otherwise.

pgm_gtk_get_viewport ()

PgmError            pgm_gtk_get_viewport                (PgmGtk *gtk,
                                                         PgmViewport **viewport);

Retrieves the viewport of gtk.

gtk :

a PgmViewport object.

viewport :

a pointer to a PgmViewport pointer where the viewport is going to be stored. Unref after usage.

Returns :

a PgmError indicating success/failure.
pigment-0.3.17/docs/pgm/html/introduction.html0000644000175000017500000001063711205035140016252 00000000000000 Introduction

Introduction

Pigment is a library for creating rich application user interfaces. It allows embedding multimedia contents such as audio and video thanks to a simple integration of the GStreamer library. Pigment uses a plugin system allowing to render interfaces using different rendering API such as OpenGL, OpenGL ES or Direct3D. It works on many UNIX-like platforms, Windows, Mac and embedded devices.

Pigment has originally been created to be used in the Elisa Media Center, but is also really useful for projects looking for slick, efficient and innovative user interfaces.

Pigment is released under the GNU Lesser General Public License (GNU LGPL), which allows for flexible licensing of client applications. Pigment has a C-based object-oriented architecture that allows for maximum flexibility. Bindings for other languages like Python have been written.

Pigment depends on the following libraries:

GLib

A general-purpose utility library, not specific to graphical user interfaces. GLib provides many useful data types, macros, type conversions, string utilities, file utilities, a main loop abstraction, and so on.

GdkPixbuf

A small library which allowing to load pixel buffers from image data or image files of several formats.

GStreamer

A library that allows the construction of graphs of media-handling components, ranging from simple Ogg/Vorbis playback to complex audio and video processing. Applications can take advantage of advances in codec and filter technology transparently. Developers can add new codecs and filters by writing a simple plugin with a clean, generic interface.

pigment-0.3.17/docs/pgm/html/up.png0000644000175000017500000000062611205035140013772 00000000000000PNG  IHDRw=bKGD pHYs  ~tIME2.E#IDATx=J@Fo] !+2[Z<@/9|t$D9nnBjBRIsI:H8UPN1fcsN95M㧖ɵ 束1~pEe$I 7nrDf!;`'ykI䲤sI_]y^^I>O>?YBIENDB`pigment-0.3.17/docs/pgm/html/PgmDrawable.html0000644000175000017500000045107611205035140015724 00000000000000 PgmDrawable

PgmDrawable

PgmDrawable — A base class used for embedding media types.

Synopsis


#include <pgm/pgm.h>

enum                PgmDrawableLayer;
enum                PgmDrawableProperty;
                    PgmDrawable;
                    PgmDrawableClass;
PgmError            pgm_drawable_hide                   (PgmDrawable *drawable);
PgmError            pgm_drawable_show                   (PgmDrawable *drawable);
PgmError            pgm_drawable_is_visible             (PgmDrawable *drawable,
                                                         gboolean *visible);
PgmError            pgm_drawable_set_size               (PgmDrawable *drawable,
                                                         gfloat width,
                                                         gfloat height);
PgmError            pgm_drawable_get_size               (PgmDrawable *drawable,
                                                         gfloat *width,
                                                         gfloat *height);
PgmError            pgm_drawable_set_position           (PgmDrawable *drawable,
                                                         gfloat x,
                                                         gfloat y,
                                                         gfloat z);
PgmError            pgm_drawable_get_position           (PgmDrawable *drawable,
                                                         gfloat *x,
                                                         gfloat *y,
                                                         gfloat *z);
PgmError            pgm_drawable_set_rotation_x         (PgmDrawable *drawable,
                                                         gfloat angle);
PgmError            pgm_drawable_get_rotation_x         (PgmDrawable *drawable,
                                                         gfloat *angle);
PgmError            pgm_drawable_set_rotation_y         (PgmDrawable *drawable,
                                                         gfloat angle);
PgmError            pgm_drawable_get_rotation_y         (PgmDrawable *drawable,
                                                         gfloat *angle);
PgmError            pgm_drawable_set_rotation_z         (PgmDrawable *drawable,
                                                         gfloat angle);
PgmError            pgm_drawable_get_rotation_z         (PgmDrawable *drawable,
                                                         gfloat *angle);
PgmError            pgm_drawable_set_scale              (PgmDrawable *drawable,
                                                         gfloat scale);
PgmError            pgm_drawable_get_scale              (PgmDrawable *drawable,
                                                         gfloat *scale);
PgmError            pgm_drawable_set_fg_color           (PgmDrawable *drawable,
                                                         guchar r,
                                                         guchar g,
                                                         guchar b,
                                                         guchar a);
PgmError            pgm_drawable_get_fg_color           (PgmDrawable *drawable,
                                                         guchar *r,
                                                         guchar *g,
                                                         guchar *b,
                                                         guchar *a);
PgmError            pgm_drawable_set_bg_color           (PgmDrawable *drawable,
                                                         guchar r,
                                                         guchar g,
                                                         guchar b,
                                                         guchar a);
PgmError            pgm_drawable_get_bg_color           (PgmDrawable *drawable,
                                                         guchar *r,
                                                         guchar *g,
                                                         guchar *b,
                                                         guchar *a);
PgmError            pgm_drawable_set_opacity            (PgmDrawable *drawable,
                                                         guchar opacity);
PgmError            pgm_drawable_get_opacity            (PgmDrawable *drawable,
                                                         guchar *opacity);
PgmError            pgm_drawable_set_grid_aligned       (PgmDrawable *drawable,
                                                         gboolean aligned);
PgmError            pgm_drawable_get_grid_aligned       (PgmDrawable *drawable,
                                                         gboolean *aligned);
PgmError            pgm_drawable_set_drag_distance      (PgmDrawable *drawable,
                                                         guchar distance);
PgmError            pgm_drawable_get_drag_distance      (PgmDrawable *drawable,
                                                         guchar *distance);
PgmError            pgm_drawable_regenerate             (PgmDrawable *drawable);
PgmError            pgm_drawable_from_canvas            (PgmDrawable *drawable,
                                                         gfloat *x_drawable,
                                                         gfloat *y_drawable,
                                                         gfloat x_canvas,
                                                         gfloat y_canvas,
                                                         gfloat z_canvas);
PgmError            pgm_drawable_to_canvas              (PgmDrawable *drawable,
                                                         gfloat *x_canvas,
                                                         gfloat *y_canvas,
                                                         gfloat *z_canvas,
                                                         gfloat x_drawable,
                                                         gfloat y_drawable);

Object Hierarchy

  GObject
   +----GstObject
         +----PgmDrawable
               +----PgmImage
               +----PgmText

Signals

  "changed"                                        : Run First
  "clicked"                                        : Run Last
  "double-clicked"                                 : Run Last
  "drag-begin"                                     : Run Last
  "drag-end"                                       : Run Last
  "drag-motion"                                    : Run Last
  "entered"                                        : Run Last
  "left"                                           : Run Last
  "motion"                                         : Run Last
  "pressed"                                        : Run Last
  "pressured"                                      : Run Last
  "released"                                       : Run Last
  "scrolled"                                       : Run Last

Description

Manipulating drawables

PgmDrawable represents a visual object on which you can embed media types such as text, images and video, or 2D graphics. It is meant to be a base abstract class for more specific visual objects such as PgmImage or PgmText. Drawables are not visible until they are added to a PgmCanvas. A drawable never knows about physical on screen coordinates such as pixels, and use floating point canvas coordinates. Drawables are positioned in 3D and then projected on a PgmViewport.

The base class implements simple drawing methods that are common to the different subclasses. For example if you want to draw a left aligned green text you would do something like that:

Example 4. Calling drawing functions on a drawable

pgm_drawable_set_fg_color (text, 0, 255, 0, 255);
pgm_drawable_set_bg_color (text, 255, 0, 0, 255);
pgm_text_set_label (PGM_TEXT (text), "Hello world!");


You are basically using a mix of drawable calls and text calls on the same object at different level of the object hierarchy.

The changed signal is fired whenever a property of a drawable is changed. There are also signals for handling mouse picking. For instance, you just need to connect a callback to the clicked signal to be notified of a click on a drawable.

Last reviewed on 2007-09-25 (0.3.1)

Details

enum PgmDrawableLayer

typedef enum {
  PGM_DRAWABLE_UNBOUND,
  PGM_DRAWABLE_FAR,
  PGM_DRAWABLE_MIDDLE,
  PGM_DRAWABLE_NEAR
} PgmDrawableLayer;

The rendering layers.

PGM_DRAWABLE_UNBOUND

Not bound to a Canvas.

PGM_DRAWABLE_FAR

Layer of drawables drawn behind the other layers.

PGM_DRAWABLE_MIDDLE

Layer of drawables drawn over the drawables in the far layer and behind the drawables in the near one.

PGM_DRAWABLE_NEAR

Layer of drawables drawn over the other layers.

enum PgmDrawableProperty

typedef enum {
  /* PgmDrawable properties */
  PGM_DRAWABLE_VISIBILITY            = 0,
  PGM_DRAWABLE_SIZE                  = 1,
  PGM_DRAWABLE_POSITION              = 2,
  PGM_DRAWABLE_TRANSFORMATION_MATRIX = 3,
  PGM_DRAWABLE_BG_COLOR              = 4,
  PGM_DRAWABLE_FG_COLOR              = 5,
  PGM_DRAWABLE_OPACITY               = 6,
  PGM_DRAWABLE_REGENERATE            = 7,
  /* PgmImage properties */
  PGM_IMAGE_DATA_FILE                = 8,
  PGM_IMAGE_DATA_BUFFER              = 9,
  PGM_IMAGE_DATA_GST_BUFFER          = 10,
  PGM_IMAGE_DATA_PIXBUF              = 11,
  PGM_IMAGE_DATA_SYSTEM_BUFFER       = 12,
  PGM_IMAGE_DATA_IMAGE               = 13,
  PGM_IMAGE_DATA_EMPTY               = 14,
  PGM_IMAGE_SYSTEM_BUFFER_CONTENT    = 15,
  PGM_IMAGE_MAPPING_MATRIX           = 16,
  PGM_IMAGE_ALIGNMENT                = 17,
  PGM_IMAGE_LAYOUT                   = 18,
  PGM_IMAGE_INTERP                   = 19,
  PGM_IMAGE_WRAPPING                 = 20,
  PGM_IMAGE_ASPECT_RATIO             = 21,
  PGM_IMAGE_BORDER_WIDTH             = 22,
  PGM_IMAGE_BORDER_INNER_COLOR       = 23,
  PGM_IMAGE_BORDER_OUTER_COLOR       = 24,
  /* PgmText properties */
  PGM_TEXT_LABEL                     = 25,
  PGM_TEXT_MARKUP                    = 26,
  PGM_TEXT_FONT_FAMILY               = 27,
  PGM_TEXT_HEIGHT                    = 28,
  PGM_TEXT_ELLIPSIZE                 = 29,
  PGM_TEXT_JUSTIFY                   = 30,
  PGM_TEXT_ALIGNMENT                 = 31,
  PGM_TEXT_WRAP                      = 32,
  PGM_TEXT_GRAVITY                   = 33,
  PGM_TEXT_STRETCH                   = 34,
  PGM_TEXT_STYLE                     = 35,
  PGM_TEXT_VARIANT                   = 36,
  PGM_TEXT_WEIGHT                    = 37,
  PGM_TEXT_MULTILINE                 = 38,
  PGM_TEXT_LINE_SPACING              = 39,
  PGM_TEXT_COLOR                     = 40,
  PGM_TEXT_OUTLINE_COLOR             = 41,
  PGM_TEXT_OUTLINE_WIDTH             = 42,
  PGM_TEXT_CAST_SHADOW               = 43,
  PGM_TEXT_SHADOW_POSITION           = 44,
  PGM_TEXT_SHADOW_COLOR              = 45
} PgmDrawableProperty;

The different properties of the drawables.

PGM_DRAWABLE_VISIBILITY

PgmDrawable visibility property.

PGM_DRAWABLE_SIZE

PgmDrawable size property.

PGM_DRAWABLE_POSITION

PgmDrawable position property.

PGM_DRAWABLE_TRANSFORMATION_MATRIX

PgmDrawable transformation matrix property.

PGM_DRAWABLE_BG_COLOR

PgmDrawable background color property.

PGM_DRAWABLE_FG_COLOR

PgmDrawable foreground color property.

PGM_DRAWABLE_OPACITY

PgmDrawable opacity property.

PGM_DRAWABLE_REGENERATE

PgmDrawable regenerate property.

PGM_IMAGE_DATA_FILE

PgmImage file data property.

PGM_IMAGE_DATA_BUFFER

PgmImage buffer data property.

PGM_IMAGE_DATA_GST_BUFFER

PgmImage GstBuffer data property.

PGM_IMAGE_DATA_PIXBUF

PgmImage GdkPixbuf data property.

PGM_IMAGE_DATA_SYSTEM_BUFFER

PgmImage system buffer data property.

PGM_IMAGE_DATA_IMAGE

PgmImage image data property.

PGM_IMAGE_DATA_EMPTY

PgmImage empty data property.

PGM_IMAGE_SYSTEM_BUFFER_CONTENT

PgmImage system buffer content property.

PGM_IMAGE_MAPPING_MATRIX

PgmImage mapping matrix data property.

PGM_IMAGE_ALIGNMENT

PgmImage alignment property.

PGM_IMAGE_LAYOUT

PgmImage layout property.

PGM_IMAGE_INTERP

PgmImage interpolation property.

PGM_IMAGE_WRAPPING

PgmImage wrapping property.

PGM_IMAGE_ASPECT_RATIO

PgmImage aspect-ratio property.

PGM_IMAGE_BORDER_WIDTH

PgmImage border width property.

PGM_IMAGE_BORDER_INNER_COLOR

PgmImage border inner color property.

PGM_IMAGE_BORDER_OUTER_COLOR

PgmImage border outer color property.

PGM_TEXT_LABEL

PgmText label property.

PGM_TEXT_MARKUP

PgmText markup property.

PGM_TEXT_FONT_FAMILY

PgmText font family property.

PGM_TEXT_HEIGHT

PgmText height property.

PGM_TEXT_ELLIPSIZE

PgmText ellipsize property.

PGM_TEXT_JUSTIFY

PgmText justify property.

PGM_TEXT_ALIGNMENT

PgmText alignment property.

PGM_TEXT_WRAP

PgmText wrap property.

PGM_TEXT_GRAVITY

PgmText gravity property.

PGM_TEXT_STRETCH

PgmText stretch property.

PGM_TEXT_STYLE

PgmText style property.

PGM_TEXT_VARIANT

PgmText variant property.

PGM_TEXT_WEIGHT

PgmText weight property.

PGM_TEXT_MULTILINE

PgmText multiline property.

PGM_TEXT_LINE_SPACING

PgmText line spacing property.

PGM_TEXT_COLOR

PgmText color property.

PGM_TEXT_OUTLINE_COLOR

PgmText outline color property.

PGM_TEXT_OUTLINE_WIDTH

PgmText outline width property.

PGM_TEXT_CAST_SHADOW

PgmText cast shadow property.

PGM_TEXT_SHADOW_POSITION

PgmText shadow position property.

PGM_TEXT_SHADOW_COLOR

PgmText shadow color.

PgmDrawable

typedef struct {
  /* Transformation */
  PgmMat4x4 *transformation_matrix;
  gfloat angle_x, angle_y, angle_z;

  /* Layer */
  PgmDrawableLayer layer;

  /* Position */
  gfloat x, y, z;
  gfloat orig_x, orig_y;

  /* Scale */
  gfloat scale;

  /* Size */
  gfloat width, height;
  gfloat orig_width, orig_height;
  gboolean grid_aligned;

  /* Colors */
  guchar fg_r, fg_g, fg_b, fg_a;
  guchar bg_r, bg_g, bg_b, bg_a;

  /* Opacity */
  guchar opacity;
} PgmDrawable;

Pigment drawable abstract base class.

PgmMat4x4 *transformation_matrix;

the drawable transformation matrix.

gfloat angle_x;

the drawable angle of rotation on the x axis.

gfloat angle_y;

the drawable angle of rotation on the y axis.

gfloat angle_z;

the drawable angle of rotation on the z axis.

PgmDrawableLayer layer;

the layer the drawable belongs to.

gfloat x;

the drawable position on the x axis.

gfloat y;

the drawable position on the y axis.

gfloat z;

the drawable position on the z axis.

gfloat orig_x;

the drawable original position on the x axis.

gfloat orig_y;

the drawable original position on the y axis.

gfloat scale;

the drawable scale factor.

gfloat width;

the drawable width.

gfloat height;

the drawable height.

gfloat orig_width;

the drawable original width.

gfloat orig_height;

the drawable original height.

gboolean grid_aligned;

the grid aligned boolean.

guchar fg_r;

the drawable foreground red color component.

guchar fg_g;

the drawable foreground green color component.

guchar fg_b;

the drawable foreground blue color component.

guchar fg_a;

the drawable foreground alpha color component.

guchar bg_r;

the drawable background red color component.

guchar bg_g;

the drawable background green color component.

guchar bg_b;

the drawable background blue color component.

guchar bg_a;

the drawable background alpha color component.

guchar opacity;

the drawable opacity.

PgmDrawableClass

typedef struct {
  GstObjectClass parent_class;


  /* Signals */

  void     (*changed)        (PgmDrawable *drawable,
                              PgmDrawableProperty property);

  gboolean (*pressed)        (PgmDrawable *drawable,
                              gfloat x,
                              gfloat y,
                              gfloat z,
                              PgmButtonType button,
                              guint32 time,
                              guint32 pressure);

  gboolean (*pressured)      (PgmDrawable *drawable,
                              gfloat x,
                              gfloat y,
                              gfloat z,
                              PgmButtonType button,
                              guint32 time,
                              guint32 pressure);

  gboolean (*released)       (PgmDrawable *drawable,
                              PgmButtonType button,
                              guint32 time);

  gboolean (*clicked)        (PgmDrawable *drawable,
                              gfloat x,
                              gfloat y,
                              gfloat z,
                              PgmButtonType button,
                              guint32 time,
                              guint32 pressure);

  gboolean (*double_clicked) (PgmDrawable *drawable,
                              gfloat x,
                              gfloat y,
                              gfloat z,
                              PgmButtonType button,
                              guint32 time);

  gboolean (*scrolled)       (PgmDrawable *drawable,
                              gfloat x,
                              gfloat y,
                              gfloat z,
                              PgmScrollDirection direction,
                              guint32 time);

  gboolean (*drag_begin)     (PgmDrawable *drawable,
                              gfloat x,
                              gfloat y,
                              gfloat z,
                              PgmButtonType button,
                              guint32 time,
                              guint32 pressure);

  gboolean (*drag_motion)    (PgmDrawable *drawable,
                              gfloat x,
                              gfloat y,
                              gfloat z,
                              PgmButtonType button,
                              guint32 time,
                              guint32 pressure);

  gboolean (*drag_end)       (PgmDrawable *drawable,
                              gfloat x,
                              gfloat y,
                              gfloat z,
                              PgmButtonType button,
                              guint32 time);

  gboolean (*motion)         (PgmDrawable *drawable,
                              gfloat x,
                              gfloat y,
                              gfloat z,
                              guint32 time);

  gboolean (*entered)        (PgmDrawable *drawable,
                              gfloat x,
                              gfloat y,
                              gfloat z,
                              guint32 time);

  gboolean (*left)           (PgmDrawable *drawable,
                              gfloat x,
                              gfloat y,
                              gfloat z,
                              guint32 time);

  /* virtual methods for subclasses */

  PgmError (*hide)                      (PgmDrawable *drawable);

  PgmError (*show)                      (PgmDrawable *drawable);

  PgmError (*set_size)                  (PgmDrawable *drawable,
                                         gfloat width,
                                         gfloat height);

  PgmError (*set_position)              (PgmDrawable *drawable,
                                         gfloat x,
                                         gfloat y,
                                         gfloat z);

  PgmError (*set_fg_color)              (PgmDrawable *drawable,
                                         guchar r,
                                         guchar g,
                                         guchar b,
                                         guchar a);

  PgmError (*set_bg_color)              (PgmDrawable *drawable,
                                         guchar r,
                                         guchar g,
                                         guchar b,
                                         guchar a);

  PgmError (*set_opacity)               (PgmDrawable *drawable,
                                         guchar opacity);
} PgmDrawableClass;

The PgmDrawable structure.

GstObjectClass parent_class;

the parent class structure.

changed ()

the "changed" signal.

pressed ()

the "pressed" signal.

pressured ()

the "pressured" signal.

released ()

the "released" signal.

clicked ()

the "clicked" signal.

double_clicked ()

the "double-clicked" signal.

scrolled ()

the "scrolled" signal.

drag_begin ()

the "drag-begin" signal.

drag_motion ()

the "drag-motion" signal.

drag_end ()

the "drag-end" signal.

motion ()

the "motion" signal.

entered ()

the "entered" signal.

left ()

the "left" signal.

hide ()

the hide virtual method.

show ()

the show virtual method.

set_size ()

the set_size virtual method.

set_position ()

the set_position virtual method.

set_fg_color ()

the set_fg_color virtual method.

set_bg_color ()

the set_bg_color virtual method.

set_opacity ()

the set_opacity virtual method.

pgm_drawable_hide ()

PgmError            pgm_drawable_hide                   (PgmDrawable *drawable);

Makes drawable invisible.

MT safe.

drawable :

a PgmDrawable object.

Returns :

a PgmError indicating success/failure.

pgm_drawable_show ()

PgmError            pgm_drawable_show                   (PgmDrawable *drawable);

Makes drawable visible.

MT safe.

drawable :

a PgmDrawable object.

Returns :

a PgmError indicating success/failure.

pgm_drawable_is_visible ()

PgmError            pgm_drawable_is_visible             (PgmDrawable *drawable,
                                                         gboolean *visible);

Retrieves whether drawable is visible.

MT safe.

drawable :

a PgmDrawable object.

visible :

a pointer to a gboolean where the visible state of the drawable is going to be stored.

Returns :

a PgmError indicating success/failure.

pgm_drawable_set_size ()

PgmError            pgm_drawable_set_size               (PgmDrawable *drawable,
                                                         gfloat width,
                                                         gfloat height);

Defines drawable size in canvas units to width x height.

MT safe.

drawable :

a PgmDrawable object.

width :

the width of the canvas.

height :

the height of the canvas.

Returns :

a PgmError indicating success/failure.

pgm_drawable_get_size ()

PgmError            pgm_drawable_get_size               (PgmDrawable *drawable,
                                                         gfloat *width,
                                                         gfloat *height);

Gets drawable size in canvas units.

MT safe.

drawable :

a PgmDrawable object.

width :

a pointer to a gfloat where the width of the drawable is going to be stored.

height :

a pointer to a gfloat where the height of the drawable is going to be stored.

Returns :

a PgmError indicating success/failure.

pgm_drawable_set_position ()

PgmError            pgm_drawable_set_position           (PgmDrawable *drawable,
                                                         gfloat x,
                                                         gfloat y,
                                                         gfloat z);

Sets position of drawable in canvas units.

MT safe.

drawable :

a PgmDrawable object.

x :

the position of drawable on the x axis.

y :

the position of drawable on the y axis.

z :

the position of drawable on the z axis.

Returns :

a PgmError indicating success/failure.

pgm_drawable_get_position ()

PgmError            pgm_drawable_get_position           (PgmDrawable *drawable,
                                                         gfloat *x,
                                                         gfloat *y,
                                                         gfloat *z);

Gets drawable position in canvas units.

MT safe.

drawable :

a PgmDrawable object.

x :

a pointer to a gfloat where the x position of drawable is going to be stored.

y :

a pointer to a gfloat where the y position of drawable is going to be stored.

z :

a pointer to a gfloat where the z position of drawable is going to be stored.

Returns :

a PgmError indicating success/failure.

pgm_drawable_set_rotation_x ()

PgmError            pgm_drawable_set_rotation_x         (PgmDrawable *drawable,
                                                         gfloat angle);

Defines the rotation to apply to drawable on the x axis. The rotation point is the center of drawable and the axis is its normal.

MT safe.

drawable :

a PgmDrawable object.

angle :

an angle of rotation, in radians.

Returns :

a PgmError indicating success/failure.

pgm_drawable_get_rotation_x ()

PgmError            pgm_drawable_get_rotation_x         (PgmDrawable *drawable,
                                                         gfloat *angle);

Retrieves in angle the current x rotation angle applied to drawable.

MT safe.

drawable :

a PgmDrawable object.

angle :

a gfloat pointer where the x rotation angle is going to be stored.

Returns :

a PgmError indicating success/failure.

pgm_drawable_set_rotation_y ()

PgmError            pgm_drawable_set_rotation_y         (PgmDrawable *drawable,
                                                         gfloat angle);

Defines the rotation to apply to drawable on the y axis. The rotation point is the center of drawable and the axis is its normal.

MT safe.

drawable :

a PgmDrawable object.

angle :

an angle of rotation, in radians.

Returns :

a PgmError indicating success/failure.

pgm_drawable_get_rotation_y ()

PgmError            pgm_drawable_get_rotation_y         (PgmDrawable *drawable,
                                                         gfloat *angle);

Retrieves in angle the current y rotation angle applied to drawable.

MT safe.

drawable :

a PgmDrawable object.

angle :

a gfloat pointer where the y rotation angle is going to be stored.

Returns :

a PgmError indicating success/failure.

pgm_drawable_set_rotation_z ()

PgmError            pgm_drawable_set_rotation_z         (PgmDrawable *drawable,
                                                         gfloat angle);

Defines the rotation to apply to drawable on the z axis. The rotation point is the center of drawable and the axis is its normal.

MT safe.

drawable :

a PgmDrawable object.

angle :

an angle of rotation, in radians.

Returns :

a PgmError indicating success/failure.

pgm_drawable_get_rotation_z ()

PgmError            pgm_drawable_get_rotation_z         (PgmDrawable *drawable,
                                                         gfloat *angle);

Retrieves in angle the current z rotation angle applied to drawable.

MT safe.

drawable :

a PgmDrawable object.

angle :

a gfloat pointer where the z rotation angle is going to be stored.

Returns :

a PgmError indicating success/failure.

pgm_drawable_set_scale ()

PgmError            pgm_drawable_set_scale              (PgmDrawable *drawable,
                                                         gfloat scale);

Defines the scale to apply to drawable. The scaling point is the center of drawable.

MT safe.

drawable :

a PgmDrawable object.

scale :

a scale factor.

Returns :

a PgmError indicating success/failure.

pgm_drawable_get_scale ()

PgmError            pgm_drawable_get_scale              (PgmDrawable *drawable,
                                                         gfloat *scale);

Retrieves in scale the current scale factor applied to drawable.

MT safe.

drawable :

a PgmDrawable object.

scale :

a gfloat pointer where the scale factor is going to be stored.

Returns :

a PgmError indicating success/failure.

pgm_drawable_set_fg_color ()

PgmError            pgm_drawable_set_fg_color           (PgmDrawable *drawable,
                                                         guchar r,
                                                         guchar g,
                                                         guchar b,
                                                         guchar a);

Set the color used for drawing operations on drawable to (r,g,b,a).

MT safe.

drawable :

a PgmDrawable object.

r :

the red foreground color.

g :

the green foreground color.

b :

the blue foreground color.

a :

the alpha foreground color.

Returns :

a PgmError indicating success/failure.

pgm_drawable_get_fg_color ()

PgmError            pgm_drawable_get_fg_color           (PgmDrawable *drawable,
                                                         guchar *r,
                                                         guchar *g,
                                                         guchar *b,
                                                         guchar *a);

Retrieves the color used for drawing operations on drawable in (r,g,b,a).

MT safe.

drawable :

a PgmDrawable object.

r :

a pointer to a guchar where the red foreground color is going to be stored.

g :

a pointer to a guchar where the green foreground color is going to be stored.

b :

a pointer to a guchar where the blue foreground color is going to be stored.

a :

a pointer to a guchar where the alpha foreground color is going to be stored.

Returns :

a PgmError indicating success/failure.

pgm_drawable_set_bg_color ()

PgmError            pgm_drawable_set_bg_color           (PgmDrawable *drawable,
                                                         guchar r,
                                                         guchar g,
                                                         guchar b,
                                                         guchar a);

Sets the color used to fill the background of drawable to (r,g,b,a).

MT safe.

drawable :

a PgmDrawable object.

r :

the red background color.

g :

the green background color.

b :

the blue background color.

a :

the alpha background color.

Returns :

a PgmError indicating success/failure.

pgm_drawable_get_bg_color ()

PgmError            pgm_drawable_get_bg_color           (PgmDrawable *drawable,
                                                         guchar *r,
                                                         guchar *g,
                                                         guchar *b,
                                                         guchar *a);

Retrieves the color used to fill the background of drawable in (r,g,b,a).

MT safe.

drawable :

A PgmDrawable object.

r :

a pointer to a guchar where the red background color is going to be stored.

g :

a pointer to a guchar where the green background color is going to be stored.

b :

a pointer to a guchar where the blue background color is going to be stored.

a :

a pointer to a guchar where the alpha background color is going to be stored.

Returns :

A PgmError indicating success/failure.

pgm_drawable_set_opacity ()

PgmError            pgm_drawable_set_opacity            (PgmDrawable *drawable,
                                                         guchar opacity);

Defines the opacity of drawable to opacity.

MT safe.

drawable :

a PgmDrawable object.

opacity :

the opacity of drawable.

Returns :

a PgmError indicating success/failure.

pgm_drawable_get_opacity ()

PgmError            pgm_drawable_get_opacity            (PgmDrawable *drawable,
                                                         guchar *opacity);

Retrieves the opacity of drawable in opacity.

MT safe.

drawable :

a PgmDrawable object.

opacity :

a pointer to a guchar where the opacity is going to be stored.

Returns :

a PgmError indicating success/failure.

pgm_drawable_set_grid_aligned ()

PgmError            pgm_drawable_set_grid_aligned       (PgmDrawable *drawable,
                                                         gboolean aligned);

Sets whether or not drawable must be automatically aligned to the pixel boundaries in the viewport.

MT safe.

drawable :

a PgmDrawable object.

aligned :

the grid aligned boolean. FALSE by default.

Returns :

a PgmError indicating success/failure.

pgm_drawable_get_grid_aligned ()

PgmError            pgm_drawable_get_grid_aligned       (PgmDrawable *drawable,
                                                         gboolean *aligned);

Gets whether or not drawable must be automatically aligned to the pixel boundaries in the viewport.

MT safe.

drawable :

a PgmDrawable object.

aligned :

a pointer to a gboolean where the grid aligned boolean is going to be stored.

Returns :

a PgmError indicating success/failure.

pgm_drawable_set_drag_distance ()

PgmError            pgm_drawable_set_drag_distance      (PgmDrawable *drawable,
                                                         guchar distance);

Defines the drag distance of drawable to distance. The drag distance is the distance in pixels the user has to cover with a mouse button pressed to trigger the 'drag-begin' signal.

MT safe.

drawable :

a PgmDrawable object.

distance :

the drag distance of drawable. 5 by default.

Returns :

a PgmError indicating success/failure.

pgm_drawable_get_drag_distance ()

PgmError            pgm_drawable_get_drag_distance      (PgmDrawable *drawable,
                                                         guchar *distance);

Retrieves the drag distance of drawable in distance.

MT safe.

drawable :

a PgmDrawable object.

distance :

a pointer to a guchar where the drag distance is going to be stored.

Returns :

a PgmError indicating success/failure.

pgm_drawable_regenerate ()

PgmError            pgm_drawable_regenerate             (PgmDrawable *drawable);

Forces a regeneration of the drawable.

MT safe.

drawable :

a PgmDrawable object.

Returns :

a PgmError indicating success/failure.

pgm_drawable_from_canvas ()

PgmError            pgm_drawable_from_canvas            (PgmDrawable *drawable,
                                                         gfloat *x_drawable,
                                                         gfloat *y_drawable,
                                                         gfloat x_canvas,
                                                         gfloat y_canvas,
                                                         gfloat z_canvas);

Converts a position in the canvas into its orthogonal projection in the plane of drawable, with the (0,0) coordinate in that plane being the upper left corner of drawable.

drawable :

a PgmDrawable object.

x_drawable :

where to return the x coordinate in the drawable plane.

y_drawable :

where to return the y coordinate in the drawable plane.

x_canvas :

x coordinate in the canvas space.

y_canvas :

y coordinate in the canvas space.

z_canvas :

z coordinate in the canvas space.

Returns :

a PgmError indicating success/failure.

pgm_drawable_to_canvas ()

PgmError            pgm_drawable_to_canvas              (PgmDrawable *drawable,
                                                         gfloat *x_canvas,
                                                         gfloat *y_canvas,
                                                         gfloat *z_canvas,
                                                         gfloat x_drawable,
                                                         gfloat y_drawable);

Converts a position in the plane of drawable into the canvas space.

drawable :

a PgmDrawable object.

x_canvas :

where to return the x coordinate in the canvas space.

y_canvas :

where to return the y coordinate in the canvas space.

z_canvas :

where to return the z coordinate in the canvas space.

x_drawable :

x coordinate in the drawable plane.

y_drawable :

y coordinate in the drawable plane.

Returns :

a PgmError indicating success/failure.

Signal Details

The "changed" signal

void                user_function                      (PgmDrawable        *drawable,
                                                        PgmDrawableProperty property,
                                                        gpointer            user_data)      : Run First

Will be emitted after property of drawable is changed.

drawable :

the PgmDrawable

property :

the PgmDrawableProperty changed in drawable

user_data :

user data set when the signal handler was connected.

The "clicked" signal

gboolean            user_function                      (PgmDrawable  *drawable,
                                                        gfloat        x,
                                                        gfloat        y,
                                                        gfloat        z,
                                                        PgmButtonType button,
                                                        guint         time,
                                                        guint         pressure,
                                                        gpointer      user_data)      : Run Last

Will be emitted after drawable is clicked.

drawable :

the PgmDrawable

x :

the x coordinate of the point intersecting the click on drawable

y :

the y coordinate of the point intersecting the click on drawable

z :

the z coordinate of the point intersecting the click on drawable

button :

the PgmButtonType

time :

the timestamp of the button press event

pressure :

the pressure force, set to 0 when not used with a touch screen

user_data :

user data set when the signal handler was connected.

Returns :

TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.

The "double-clicked" signal

gboolean            user_function                      (PgmDrawable  *drawable,
                                                        gfloat        x,
                                                        gfloat        y,
                                                        gfloat        z,
                                                        PgmButtonType button,
                                                        guint         time,
                                                        gpointer      user_data)      : Run Last

Will be emitted after drawable is clicked.

drawable :

the PgmDrawable

x :

the x coordinate of the point intersecting the double-click on drawable

y :

the y coordinate of the point intersecting the double-click on drawable

z :

the z coordinate of the point intersecting the double-click on drawable

button :

the PgmButtonType

time :

the timestamp of the button press event

user_data :

user data set when the signal handler was connected.

Returns :

TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.

The "drag-begin" signal

gboolean            user_function                      (PgmDrawable  *drawable,
                                                        gfloat        x,
                                                        gfloat        y,
                                                        gfloat        z,
                                                        PgmButtonType button,
                                                        guint         time,
                                                        guint         pressure,
                                                        gpointer      user_data)      : Run Last

Will be emitted after drawable is initially dragged. You can for instance use that signal to change drawable properties or store the intersecting point for further computations during the "drag-motion" signal emission.

drawable :

the PgmDrawable

x :

the x coordinate of the point intersecting the initial click on drawable

y :

the y coordinate of the point intersecting the initial click on drawable

z :

the z coordinate of the point intersecting the initial click on drawable

button :

the PgmButtonType

time :

the timestamp of the motion event

pressure :

the pressure force, set to 0 when not used with a touch screen

user_data :

user data set when the signal handler was connected.

Returns :

TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.

The "drag-end" signal

gboolean            user_function                      (PgmDrawable  *drawable,
                                                        gfloat        x,
                                                        gfloat        y,
                                                        gfloat        z,
                                                        PgmButtonType button,
                                                        guint         time,
                                                        gpointer      user_data)      : Run Last

Will be emitted after drawable is released. This signal is emitted on all the drawables which have received a "drag-begin" signal.

drawable :

the PgmDrawable

x :

the x coordinate of the point intersecting the release event on the dragged drawable plane

y :

the y coordinate of the point intersecting the release event on the dragged drawable plane

z :

the z coordinate of the point intersecting the release event on the dragged drawable plane

button :

the PgmButtonType

time :

the timestamp of the motion event

user_data :

user data set when the signal handler was connected.

Returns :

TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.

The "drag-motion" signal

gboolean            user_function                      (PgmDrawable  *drawable,
                                                        gfloat        x,
                                                        gfloat        y,
                                                        gfloat        z,
                                                        PgmButtonType button,
                                                        guint         time,
                                                        guint         pressure,
                                                        gpointer      user_data)      : Run Last

Will be emitted after drawable is dragged.

drawable :

the PgmDrawable

x :

the x coordinate of the point intersecting the cursor position on the dragged drawable plane

y :

the y coordinate of the point intersecting the cursor position on the dragged drawable plane

z :

the z coordinate of the point intersecting the cursor position on the dragged drawable plane

button :

the PgmButtonType

time :

the timestamp of the motion event

pressure :

the pressure force, set to 0 when not used with a touch screen

user_data :

user data set when the signal handler was connected.

Returns :

TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.

The "entered" signal

gboolean            user_function                      (PgmDrawable *drawable,
                                                        gfloat       x,
                                                        gfloat       y,
                                                        gfloat       z,
                                                        guint        time,
                                                        gpointer     user_data)      : Run Last

Will be emitted when the pointer enters the drawable area.

drawable :

the PgmDrawable

x :

the x coordinate of the point intersecting the cursor position on the drawable plane

y :

the y coordinate of the point intersecting the cursor position on the drawable plane

z :

the z coordinate of the point intersecting the cursor position on the drawable plane

time :

the timestamp of the motion event

user_data :

user data set when the signal handler was connected.

Returns :

TRUE if drawables under drawable should not be in "entered" state until the pointer leaves drawable, FALSE otherwise.

The "left" signal

void                user_function                      (PgmDrawable *drawable,
                                                        gfloat       x,
                                                        gfloat       y,
                                                        gfloat       z,
                                                        guint        time,
                                                        gpointer     user_data)      : Run Last

Will be emitted when the pointer leaves the drawable area.

drawable :

the PgmDrawable

x :

the x coordinate of the point intersecting the cursor position on the drawable plane

y :

the y coordinate of the point intersecting the cursor position on the drawable plane

z :

the z coordinate of the point intersecting the cursor position on the drawable plane

time :

the timestamp of the motion event

user_data :

user data set when the signal handler was connected.

The "motion" signal

gboolean            user_function                      (PgmDrawable *drawable,
                                                        gfloat       x,
                                                        gfloat       y,
                                                        gfloat       z,
                                                        guint        time,
                                                        gpointer     user_data)      : Run Last

Will be emitted when the pointer is moved over drawable.

drawable :

the PgmDrawable

x :

the x coordinate of the point intersecting the cursor position on the drawable plane

y :

the y coordinate of the point intersecting the cursor position on the drawable plane

z :

the z coordinate of the point intersecting the cursor position on the drawable plane

time :

the timestamp of the motion event

user_data :

user data set when the signal handler was connected.

Returns :

TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.

The "pressed" signal

gboolean            user_function                      (PgmDrawable  *drawable,
                                                        gfloat        x,
                                                        gfloat        y,
                                                        gfloat        z,
                                                        PgmButtonType button,
                                                        guint         time,
                                                        guint         pressure,
                                                        gpointer      user_data)      : Run Last

Will be emitted after drawable is pressed.

drawable :

the PgmDrawable

x :

the x coordinate of the point intersecting the click on drawable

y :

the y coordinate of the point intersecting the click on drawable

z :

the z coordinate of the point intersecting the click on drawable

button :

the PgmButtonType

time :

the timestamp of the button press event

pressure :

the pressure force, set to 0 when not used with a touch screen

user_data :

user data set when the signal handler was connected.

Returns :

TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.

The "pressured" signal

gboolean            user_function                      (PgmDrawable  *drawable,
                                                        gfloat        x,
                                                        gfloat        y,
                                                        gfloat        z,
                                                        PgmButtonType button,
                                                        guint         time,
                                                        guint         pressure,
                                                        gpointer      user_data)      : Run Last

Will be emitted after the touch pressure on drawable change.

drawable :

the PgmDrawable

x :

the x coordinate of the point intersecting the click on drawable

y :

the y coordinate of the point intersecting the click on drawable

z :

the z coordinate of the point intersecting the click on drawable

button :

the PgmButtonType

time :

the timestamp of the button press event

pressure :

the pressure force

user_data :

user data set when the signal handler was connected.

Returns :

TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.

The "released" signal

gboolean            user_function                      (PgmDrawable  *drawable,
                                                        gfloat        x,
                                                        gfloat        y,
                                                        gfloat        z,
                                                        PgmButtonType button,
                                                        guint         time,
                                                        gpointer      user_data)      : Run Last

Will be emitted after drawable is released.

drawable :

the PgmDrawable

x :

the x coordinate of the point intersecting the click on drawable plane

y :

the y coordinate of the point intersecting the click on drawable plane

z :

the z coordinate of the point intersecting the click on drawable plane

button :

the PgmButtonType

time :

the timestamp of the button release event

user_data :

user data set when the signal handler was connected.

Returns :

TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.

The "scrolled" signal

gboolean            user_function                      (PgmDrawable       *drawable,
                                                        gfloat             x,
                                                        gfloat             y,
                                                        gfloat             z,
                                                        PgmScrollDirection direction,
                                                        guint              time,
                                                        gpointer           user_data)      : Run Last

Will be emitted after drawable is scrolled.

drawable :

the PgmDrawable

x :

the x coordinate of the point intersecting the scroll on drawable

y :

the y coordinate of the point intersecting the scroll on drawable

z :

the z coordinate of the point intersecting the scroll on drawable

direction :

the PgmScrollDirection

time :

the timestamp of the scroll event

user_data :

user data set when the signal handler was connected.

Returns :

TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.

See Also

#PgmImage, PgmText, PgmCanvas.
pigment-0.3.17/docs/pgm/html/PgmViewportFactory.html0000644000175000017500000005222011205035140017336 00000000000000 PgmViewportFactory

PgmViewportFactory

PgmViewportFactory — A factory creating viewports.

Object Hierarchy

  GObject
   +----GstObject
         +----PgmViewportFactory

Description

PgmViewportFactory is used to create instances of PgmViewport.

Use the pgm_viewport_factory_new() and pgm_viewport_factory_create() functions to create viewport instances or use pgm_viewport_factory_make() as a convenient shortcut.

The following code example shows you how to create an OpenGL based viewport.

Example 5. Using a viewport factory

PgmViewportFactory *factory;
PgmViewport *viewport;
 
pgm_init (&argc, &argv);
 
factory = pgm_viewport_factory_new ("opengl");
pgm_viewport_factory_create (factory, &viewport);


Last reviewed on 2007-04-12 (0.1.5)

Details

PgmViewportFactory

typedef struct _PgmViewportFactory PgmViewportFactory;

The PgmViewportFactory opaque structure.


pgm_viewport_factory_new ()

PgmViewportFactory * pgm_viewport_factory_new           (const gchar *name);

Creates a new PgmViewportFactory instance of the given name. PgmViewportFactory is a singleton, if a factory of the given name has already been created, this constructor returns that one with a incremented refcount. This function does not detect if the name passed as argument is an invalid name (i.e. if there is no plugin of that name). Such an error will only be detected when trying to use the factory (e.g. with pgm_viewport_factory_create() or with one of the pgm_viewport_factory_get*() functions.

MT safe.

name :

the name of the factory to create.

Returns :

a PgmViewportFactory instance or NULL if an error occurred.

pgm_viewport_factory_get_description ()

PgmError            pgm_viewport_factory_get_description
                                                        (PgmViewportFactory *factory,
                                                         gchar **description);

Retrieves the description of the viewports managed by factory in description.

MT safe.

factory :

a PgmViewportFactory object.

description :

a pointer to a pointer to a gchar where the description string is going to be be stored. g_free() after use.

Returns :

a PgmError indicating success/failure.

pgm_viewport_factory_get_license ()

PgmError            pgm_viewport_factory_get_license    (PgmViewportFactory *factory,
                                                         gchar **license);

Retrieves the license of the viewports managed by factory in license.

MT safe.

factory :

a PgmViewportFactory object.

license :

a pointer to a pointer to a gchar where the license string is going to be be stored. g_free() after use.

Returns :

a PgmError indicating success/failure.

pgm_viewport_factory_get_origin ()

PgmError            pgm_viewport_factory_get_origin     (PgmViewportFactory *factory,
                                                         gchar **origin);

Retrieves the origin of the viewports managed by factory in origin.

MT safe.

factory :

a PgmViewportFactory object.

origin :

a pointer to a pointer to a gchar where the origin string is going to be be stored. g_free() after use.

Returns :

a PgmError indicating success/failure.

pgm_viewport_factory_get_author ()

PgmError            pgm_viewport_factory_get_author     (PgmViewportFactory *factory,
                                                         gchar **author);

Retrieves the author of the viewports managed by factory in author.

MT safe.

factory :

a PgmViewportFactory object.

author :

a pointer to a pointer to a gchar where the author string is going to be be stored. g_free() after use.

Returns :

a PgmError indicating success/failure.

pgm_viewport_factory_create ()

PgmError            pgm_viewport_factory_create         (PgmViewportFactory *factory,
                                                         PgmViewport **viewport);

Creates a new viewport of the type defined by factory in viewport.

MT safe.

factory :

a PgmViewportFactory object.

viewport :

a pointer to a PgmViewport's pointer where the created viewport is going to be be stored.

Returns :

a PgmError indicating success/failure.

pgm_viewport_factory_make ()

PgmError            pgm_viewport_factory_make           (const gchar *name,
                                                         PgmViewport **viewport);

Creates a new viewport of the given name in viewport.

MT safe.

name :

the name of the viewport to make.

viewport :

a pointer to a PgmViewport's pointer where the created viewport is going to be be stored.

Returns :

a PgmError indicating success/failure.

See Also

#PgmViewport.
pigment-0.3.17/docs/pgm/html/pigment-PgmPlugin.html0000644000175000017500000003373111205035140017074 00000000000000 PgmPlugin

PgmPlugin

PgmPlugin — Various structs and macros used for plugins handling.

Synopsis


#include <pgm/pgm.h>

#define             PGM_PLUGIN_PATH_NAME
gboolean            (*PgmPluginInitFunc)                (GTypeModule *module);
gboolean            (*PgmPluginShutdownFunc)            (GTypeModule *module);
PgmViewport *       (*PgmPluginCreateFunc)              (void);
                    PgmPluginDesc;
#define             PGM_PLUGIN_DEFINE                   (init,shutdown,create,name,version,description,license,origin,author)

Description

Various structs and macros used by Pigment for plugins handling.

Last reviewed on 2007-04-12 (0.1.5)

Details

PGM_PLUGIN_PATH_NAME

#define PGM_PLUGIN_PATH_NAME "PGM_PLUGIN_PATH"

The name of the plugin path environment variable name.


PgmPluginInitFunc ()

gboolean            (*PgmPluginInitFunc)                (GTypeModule *module);

A plugin should provide a pointer to a function of this type in the PgmPluginDesc struct. This function will be called to initialize the plugin.

module :

the GTypeModule to use in the init func to register your types (with g_type_module_register_type() or PGM_DEFINE_DYNAMIC_TYPE or PGM_DEFINE_DYNAMIC_TYPE_EXTENDED.

Returns :

TRUE if the initialization successes, FALSE otherwise.

PgmPluginShutdownFunc ()

gboolean            (*PgmPluginShutdownFunc)            (GTypeModule *module);

A plugin should provide a pointer to a function of this type in the PgmPluginDesc struct. This function will be called to shutdown the plugin.

module :

the GTypeModule that was passed to the PgmPluginInitFunc function.

Returns :

TRUE if the deinitialization successes, FALSE otherwise.

PgmPluginCreateFunc ()

PgmViewport *       (*PgmPluginCreateFunc)              (void);

A plugin should provide a pointer to a function of this prototype in the PgmPluginDesc struct. This function will be called by the user to create the PgmViewport.

Returns :

a new PgmViewport.

PgmPluginDesc

typedef struct {
  PgmPluginInitFunc      init;
  PgmPluginShutdownFunc  shutdown;
  PgmPluginCreateFunc    create;
  gchar                 *name;
  gchar                 *version;
  gchar                 *description;
  gchar                 *license;
  gchar                 *origin;
  gchar                 *author;
} PgmPluginDesc;

Pigment Plugin description structure.

PgmPluginInitFunc init;

the plugin initialization function pointer.

PgmPluginShutdownFunc shutdown;

the plugin shutdown function pointer.

PgmPluginCreateFunc create;

the plugin create function pointer (returning a PgmViewport).

gchar *name;

the plugin name.

gchar *version;

the version string of Pigment that plugin was compiled for.

gchar *description;

the plugin description.

gchar *license;

the plugin license.

gchar *origin;

the plugin origin URL.

gchar *author;

the plugin author.

PGM_PLUGIN_DEFINE()

#define             PGM_PLUGIN_DEFINE(init,shutdown,create,name,version,description,license,origin,author)

Utility macro to create a PgmPluginDesc plugin description structure. This is the entry point for every Pigment plugin and it is highly recommended to use this macro to avoid common mistakes maxking entry point unusable.

init :

the plugin initialization function pointer.

shutdown :

the plugin shutdown function pointer.

create :

the plugin creation function pointer (returning a PgmViewport).

name :

the plugin name.

version :

the version string of Pigment that plugin was compiled for.

description :

the plugin description.

license :

the plugin license.

origin :

the plugin origin URL.

author :

the plugin author.
pigment-0.3.17/docs/pgm/html/pigment-Pgm.html0000644000175000017500000004427111205035140015716 00000000000000 Pgm

Pgm

Pgm — A library to create rich application user interfaces.

Synopsis


#include <pgm/pgm.h>

void                pgm_init                            (int *argc,
                                                         char **argv[]);
gboolean            pgm_init_check                      (int *argc,
                                                         char **argv[]);
void                pgm_deinit                          (void);
void                pgm_version                         (guint *major,
                                                         guint *minor,
                                                         guint *micro,
                                                         guint *nano);
gchar *             pgm_version_string                  (void);
gboolean            pgm_events_pending                  (void);
void                pgm_main                            (void);
void                pgm_main_quit                       (void);
void                pgm_main_iteration                  (void);
void                pgm_main_iteration_do               (gboolean blocking);

Description

Pigment initialization

Pigment is a media rendering library written in C providing an abstraction layer to easily design GUI (Graphical User Interfaces) like simple games, media center/set-top box applications, etc. It has a pluggable backend system so that the same application can run on various hardware and software platforms using rendering libraries such as OpenGL or DirectFB on operating systems such as Windows, GNU/Linux or Mac OS X.

Pigment has been designed to handle common issues like non square pixels displays, non square pixels images or video sources, positioning abstraction and scalable user interface support. Moreover, Pigment is a fully thread safe library which means that you can call methods on Pigment objects from multiple threads at the same time even if the rendering backend is not thread safe itself like some OpenGL implementations are for example.

The Pigment library has to be initialized with pgm_init() before it can be used. You should pass pointers to the main argc and argv variables so that Pigment can process its own command line options, as shown in the following example.

Example 1. Initializing the library

int
main (int argc, char *argv[])
{
  pgm_init (&argc, &argv);
  ...
}


The pgm_deinit() call is used to clean up all internal resources used by Pigment.

Use pgm_version() to query the library version at runtime or use the PGM_VERSION_* macros to find the version at compile time. Optionally pgm_version_string() returns a printable string.

Pigment is a GUI toolkit based on an event-driven programming model. When the user is doing nothing, Pigment sits in the main loop and waits for input. If the user performs some action, like a mouse button click, then the main loop "wakes up" and delivers an event to Pigment. When a viewport receives an event, it emits a signal to notify your program that something happened by invoking functions you connected to the signal with g_signal_connect(). Functions connected to a signal are often termed callbacks. When your callbacks are invoked, you would typically take some action, for example when a key of the keyboard is pressed you might update the properties of your drawables. After a callback finishes, Pigment will return to the main loop and await more user input.

Last reviewed on 2007-09-25 (0.3.1)

Details

pgm_init ()

void                pgm_init                            (int *argc,
                                                         char **argv[]);

Initializes the Pigment library.

Note

This function will terminate your program if it was unable to initialize Pigment for some reason. If you want your program to fall back, use pgm_init_check() instead.

argc :

the address of the argc parameter of your main function.

argv :

the address of the argv parameter of your main function.

pgm_init_check ()

gboolean            pgm_init_check                      (int *argc,
                                                         char **argv[]);

Initializes the Pigment library without terminating the program if it was unable to initialize successfully.

argc :

the address of the argc parameter of your main function.

argv :

the address of the argv parameter of your main function.

Returns :

TRUE if Pigment was initialized successfully, FALSE otherwise.

pgm_deinit ()

void                pgm_deinit                          (void);

Deinitializes the Pigment library. This is not going to free Pigment objects, you need to explicitely unref these objects using gst_object_unref().


pgm_version ()

void                pgm_version                         (guint *major,
                                                         guint *minor,
                                                         guint *micro,
                                                         guint *nano);

Gets the version number of the Pigment library.

major :

a pointer to a guint to store the major version number.

minor :

a pointer to a guint to store the minor version number.

micro :

a pointer to a guint to store the micro version number.

nano :

a pointer to a guint to store the nano version number.

pgm_version_string ()

gchar *             pgm_version_string                  (void);

Returns a string that is useful for describing this version of Pigment to the outside world: user agent strings, logging, etc.

Returns :

a newly allocated string describing this version of Pigment.

pgm_events_pending ()

gboolean            pgm_events_pending                  (void);

Checks if any events are pending. This can be used to update the GUI, while doing some time intensive computation.

Example 2. Updating the GUI during a long computation.

  // computation going on
  ...
  while (pgm_events_pending ())
    pgm_main_iteration ();
  ...
  // computation continued


Returns :

TRUE if any events are pending, FALSE otherwise.

pgm_main ()

void                pgm_main                            (void);

Runs the main loop until pgm_main_quit() is called. It's ok to use the GLib main loop directly instead, though it involves slightly more typing. See GMainLoop in the GLib documentation.


pgm_main_quit ()

void                pgm_main_quit                       (void);

Quits the main loop.


pgm_main_iteration ()

void                pgm_main_iteration                  (void);

Runs a single iteration of the main loop. If no events are waiting to be processed, Pigment will block until the next event is noticed. If you don't want to block, look at pgm_main_iteration_do() or check if any events are pending with pgm_events_pending() first.


pgm_main_iteration_do ()

void                pgm_main_iteration_do               (gboolean blocking);

Runs a single iteration of the main loop. If no events are available, either returns or blocks dependent on the value of blocking.

blocking :

TRUE if you want Pigment to block if no events are pending.

See Also

#PgmViewport, PgmDrawable.
pigment-0.3.17/docs/pgm/html/home.png0000644000175000017500000000121611205035140014272 00000000000000PNG  IHDRw=bKGD pHYs  ~tIME1KvIDATxՕkq?rCp ~CnpCAAJ .B-\'G]:ܠC -(8 Ԁ!fDғklbRoyxwpðIJ<of_-@RHf֟t^ښ$Q|pgv;X^^&s(bwwZF9&3඙ ^IRZUE.0Z]]U PYM8HGIekqqҀ! $۬3n e{-/seeeÌXOͷ$8==USQRR'9-s+B^ Cەs+%<7W :2IENDB`pigment-0.3.17/docs/pgm/html/zoomed_layout.png0000644000175000017500000000556611205035140016250 00000000000000PNG  IHDR`@4rbKGD pHYs  tIME3U IDATxڵ\[o[U||NIJ[n BEM**$^xa&D$^!!E TBJNi*M3 B&&u }𢡊>J}W=@v|Ƽ p޻X_/l?CM?cKCe}lT?d\%/!lCSKu"wo^}`|^LNQIa=K4Ia2,5;q|Eom ˽8F}L҉Ns$9X>{SSVVʸ|O 4qV|޽VX^އbqq; LpDpMg%l&.\xׯ`m-021!1>ԏ̎gkkk 8}zSS%q>9)J(\:/qڋ/<"3B 33CVB1D8X 4qђ6`d(1%p MWJuT9\'Ο߁(Q.֑A }D^:[0X\,?t}؝c)\眻F_2@ *OL}yLNBh&IF>AmwPX1:'3r)LO?C4+,$ ҐVžpUʚ0?lk7am~9^sH#"7iES2mX_W #\9z5?%!QY3)$i ?0Fd2"UJ T'f4rTgjJ&'ƍ,/oVIh}!md'IzSM A.\zRP.}DE5٤nm$ToGAz!a P(cn:%7x)F%{r>BoJ߼ىB yNGJٟHv q*m )?[X[KPhctbqdMKK\Y;K6ܿ4(D Y`FNE0s5yiDl(lԤP \U[.LbSׯw.uSV/4~Qs$ Z&tF_ݹ)҈HS$*3HГ {gfv/Z7@SR^%)̶dݻֶ# !LZ$3A v&r$N-iG{[aQ VcĹ4~0ٶTJ_lrU($$NJ(RɃoMCKX$ y[ݑ֟p5;IiᯔO@8N Mŀø@9=Ր8`;8ϋ{^aa ,ШՐ5 {mqbFigY`rdMⴵZ2\Bq ߺu v6 iQG+ΝKbvvXuHٲI9WZp={rv'Ӄ#'WhKRqB\Kcl80h4O E\5@"ڐ4*|8B{,ДlSU/14MT4h#'2ZZw%LtPe^$Ҵ҂z['ut, 9y,.nd6o,Ջ$k\D=I ^$!죏fܜҒFO<^1׺Z$kl0e5^$z="<%r*-ZكRvcc_y1`M5B9I=$km+Y|\^'ON;6;q[x^\m TvTEl3P6i=JxokG~D_ |nm yI}'u\y=zd7@[OJFH.'yHY$3_i3-Ь֧@KGk1%8)vx^ ǎ>^=]QɞIKia={04tb<׬Jʴ-\%y!bҽ+VX=71=WU%%eQ- @$W-:xp##cnޮ+EɑF8٢m4:#LXL~xyo,Y?'`nHHp__-듵KjK#p-+ƷukCCqV\ vsGI5qvZ M]B023[sCw13Ӊ~Q^uC^dw9+߲wpرuW?hpI#{ܒ8z{?Fglo6߇Gx3hn.m ɯJ4&0s 3xHڭ/oIENDB`pigment-0.3.17/docs/pgm/html/style.css0000644000175000017500000000460111205035140014507 00000000000000.synopsis, .classsynopsis { background: #eeeeee; border: solid 1px #aaaaaa; padding: 0.5em; } .programlisting { background: #eeeeff; border: solid 1px #aaaaff; padding: 0.5em; } .variablelist { padding: 4px; margin-left: 3em; } .variablelist td:first-child { vertical-align: top; } /* this is needed so that the local anchors are displayed below the naviagtion */ @media screen { sup a.footnote { position: relative; top: 0em ! important; } div.refnamediv a[name], div.refsect1 a[name] { position: relative; top: -4.5em; } table.navigation#top { background: #ffeeee; border: solid 1px #ffaaaa; margin-top: 0; margin-bottom: 0; position: fixed; top: 0; left: 0; height: 2em; z-index: 1; } .navigation a { color: #770000; } .navigation a:visited { color: #550000; } td.shortcuts { color: #770000; font-size: 80%; white-space: nowrap; } div.refentry, div.chapter, div.reference, div.part, div.book, div.glossary, div.sect1, div.appendix, div.preface { position: relative; top: 3em; z-index: 0; } div.glossary, div.index { position: relative; top: 2em; z-index: 0; } div.refnamediv { margin-top: 2em; } body { padding-bottom: 20em; } } @media print { table.navigation { visibility: collapse; display: none; } div.titlepage table.navigation { visibility: visible; display: table; background: #ffeeee; border: solid 1px #ffaaaa; margin-top: 0; margin-bottom: 0; top: 0; left: 0; height: 2em; } } .navigation .title { font-size: 200%; } div.gallery-float { float: left; padding: 10px; } div.gallery-float img { border-style: none; } div.gallery-spacer { clear: both; } a { text-decoration: none; } a:hover { text-decoration: underline; color: #FF0000; } div.table table { border-collapse: collapse; border-spacing: 0px; border-style: solid; border-color: #777777; border-width: 1px; } div.table table td, div.table table th { border-style: solid; border-color: #777777; border-width: 1px; padding: 3px; vertical-align: top; } div.table table th { background-color: #eeeeee; } hr { color: #777777; background: #777777; border: 0; height: 1px; clear: both; } .footer { padding-top: 3.5em; color: #777777; text-align: center; font-size: 80%; } pigment-0.3.17/docs/pgm/html/pigment-library.html0000644000175000017500000000503111205035140016626 00000000000000 Part III. Pigment Library Reference

Part III. Pigment Library Reference

The Pigment external libraries reference.

Table of Contents

PgmImaging — A library to process pixbufs through software filters.
PgmGtk — A GTK+ widget embedding viewports.
pigment-0.3.17/docs/pgm/html/pgm-running.html0000644000175000017500000002211411205035140015763 00000000000000 Running Pigment Applications

Running Pigment Applications

Running Pigment Applications — Run and debug your Pigment applications.

Running and debugging Pigment applications

Pigment environment variables

Pigment inspects a few environment variables.

PGM_PLUGIN_PATH This environment variable can be set to a colon-separated list of paths. Pigment will scan these paths for rendering plug-ins. These plug-ins will be loaded in addition to, and before the plug-ins found in the system paths.

PGM_DEBUG If GStreamer has been configured with --enable-gst-debug=yes, this variable can be set to a list of debug options, which causes Pigment to print out different types of debugging information to stderr. The variable takes a comma-separated list of "category_name:level" pairs to set specific levels for the individual categories. The level value ranges from 0 (nothing) to 5 (LOG).

1 - ERROR

Logs all fatal errors. These are errors that do not allow the core or a plugin to perform the requested action. The application can still recover if programmed to handle the conditions that triggered the error.

2 - WARNING

Logs all warnings. Typically these are non-fatal, but user-visible problems are expected to happen.

3 - INFO

Logs all informational messages. These are typically used for events in the system that only happen once, or are important and rare enough to be logged at this level.

4 - DEBUG

Logs all debug messages. These are general debug messages for events that happen only a limited number of times during an object's lifetime; these include setup, teardown, change of parameters, ...

5 - LOG

Logs all log messages. These are messages for events that happen repeatedly during an object's lifetime; these include streaming and steady-state conditions.

The category_name can contain "*" as a wildcard. For example, setting PGM_DEBUG to pgm_canvas:5,pgm_*:3, will cause the pgm_canvas category to be logged at full LOG level, while all categories starting with pgm_ will be logged at INFO level. To get all possible debug output, set PGM_DEBUG to *:5

PGM_IMAGE_THREAD_POOL_SIZE This environment variable can be set to an integer in the range [1, 16] defining the number of pre-allocated threads used by the image loader thread pool. The default setting is 1.


OpenGL Viewport environment variables

Pigment OpenGL Viewport plugin inspects a few environment variables.

PGM_GL_VBLANK This environment variable can be set to override the plugin selection of the best vertical synchronization method to use depending on the graphical driver. Note that if the __GL_SYNC_TO_VBLANK environment variable used by the NVIDIA proprietary driver is set, PGM_GL_VBLANK is simply ignored.

0 -

Disable all attempts to synchronize to the VBlank.

1 -

Use the GLX_SGI_video_sync extension to synchronize to the VBlank.

2 -

Use the GLX_SGI_swap_control extension to synchronize to the VBlank.

PGM_GL_PROGRAMS This environment variable can be set to 0 in order to disable the use of all ARB vertex and fragment programs. In this case, Pigment will behave as if programs were not supported.

PGM_GL_CSP_PROGRAM This environment variable can be set to 0 in order to disable the use of a fragment program to handle the color space conversion from I420 or YV12 YCbCr formats to RGB. It removes the I420 and YV12 pixel formats from the list of supported formats in the viewport.

PGM_GL_FPS This environment variable can be set to an integer specifying the framerate in which the rendering loop should run. Note that the vertical synchronization will not work correctly when running Pigment with a custom framerate.

PGM_GL_ARGB_VISUAL This environment variable can be set to 1 to enable the search for an ARGB visual when the plugin is used on Xlib/GLX. It means that if you are running in a composited environment, you will be able to change the opacity of the window.

PGM_GL_INDIRECT_RENDERING This environment variable can be set to 1 to explicitly request the creation of a indirect rendered OpenGL context.


OpenGL ES Viewport environment variables

Pigment OpenGL ES Viewport plugin inspects a few environment variables.

PGM_GLES_SWAP_INTERVAL This environment variable can be set to an integer specifying the minimum number of vertical refresh periods (interval) that should occur for each buffer swap. A value of 0 specifies that buffer swaps must not be synchronized.

PGM_GLES_FPS This environment variable can be set to an integer specifying the framerate in which the rendering loop should run. Note that the vertical synchronization will not work correctly when running Pigment with a custom framerate.

pigment-0.3.17/docs/pgm/version-full.xml.in0000644000175000017500000000002211205034416015443 00000000000000@PACKAGE_VERSION@ pigment-0.3.17/docs/Makefile.in0000644000175000017500000004417211205034671013172 00000000000000# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = docs DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/as-compiler-flag.m4 \ $(top_srcdir)/common/m4/as-version.m4 \ $(top_srcdir)/common/m4/check.m4 \ $(top_srcdir)/common/m4/gst-args.m4 \ $(top_srcdir)/common/m4/gst-check.m4 \ $(top_srcdir)/common/m4/gst-error.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/libtool.m4 \ $(top_srcdir)/common/m4/ltoptions.m4 \ $(top_srcdir)/common/m4/ltsugar.m4 \ $(top_srcdir)/common/m4/ltversion.m4 \ $(top_srcdir)/common/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAIROXLIB_CFLAGS = @CAIROXLIB_CFLAGS@ CAIROXLIB_LIBS = @CAIROXLIB_LIBS@ CAIRO_CFLAGS = @CAIRO_CFLAGS@ CAIRO_LIBS = @CAIRO_LIBS@ CC = @CC@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXEEXT = @EXEEXT@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ GCOV = @GCOV@ GCOV_CFLAGS = @GCOV_CFLAGS@ GCOV_LIBS = @GCOV_LIBS@ GDKPIXBUFXLIB_CFLAGS = @GDKPIXBUFXLIB_CFLAGS@ GDKPIXBUFXLIB_LIBS = @GDKPIXBUFXLIB_LIBS@ GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@ GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ GST_0_10_13_CFLAGS = @GST_0_10_13_CFLAGS@ GST_0_10_13_LIBS = @GST_0_10_13_LIBS@ GST_10_10_CFLAGS = @GST_10_10_CFLAGS@ GST_10_10_LIBS = @GST_10_10_LIBS@ GST_10_11_CFLAGS = @GST_10_11_CFLAGS@ GST_10_11_LIBS = @GST_10_11_LIBS@ GST_10_12_CFLAGS = @GST_10_12_CFLAGS@ GST_10_12_LIBS = @GST_10_12_LIBS@ GST_10_13_CFLAGS = @GST_10_13_CFLAGS@ GST_10_13_LIBS = @GST_10_13_LIBS@ GST_10_14_CFLAGS = @GST_10_14_CFLAGS@ GST_10_14_LIBS = @GST_10_14_LIBS@ GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ GST_BASE_LIBS = @GST_BASE_LIBS@ GST_CFLAGS = @GST_CFLAGS@ GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ GST_CHECK_LIBS = @GST_CHECK_LIBS@ GST_LIBS = @GST_LIBS@ GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ GST_TOOLS_DIR = @GST_TOOLS_DIR@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_GTK_WIDGET = @HAVE_GTK_WIDGET@ HAVE_IMAGING_LIBRARY = @HAVE_IMAGING_LIBRARY@ HAVE_OPENGLES_PLUGIN = @HAVE_OPENGLES_PLUGIN@ HAVE_OPENGL_PLUGIN = @HAVE_OPENGL_PLUGIN@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGLADE_2_0_CFLAGS = @LIBGLADE_2_0_CFLAGS@ LIBGLADE_2_0_LIBS = @LIBGLADE_2_0_LIBS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENGLES_BACKEND = @OPENGLES_BACKEND@ OPENGL_BACKEND = @OPENGL_BACKEND@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ PANGOCAIRO_CFLAGS = @PANGOCAIRO_CFLAGS@ PANGOCAIRO_LIBS = @PANGOCAIRO_LIBS@ PANGO_1_16_CFLAGS = @PANGO_1_16_CFLAGS@ PANGO_1_16_LIBS = @PANGO_1_16_LIBS@ PANGO_CFLAGS = @PANGO_CFLAGS@ PANGO_LIBS = @PANGO_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL_PATH = @PERL_PATH@ PGM_ALL_CFLAGS = @PGM_ALL_CFLAGS@ PGM_ALL_LDFLAGS = @PGM_ALL_LDFLAGS@ PGM_ALL_LIBS = @PGM_ALL_LIBS@ PGM_GLES_CFLAGS = @PGM_GLES_CFLAGS@ PGM_GLES_LIBS = @PGM_GLES_LIBS@ PGM_GL_CFLAGS = @PGM_GL_CFLAGS@ PGM_GL_LIBS = @PGM_GL_LIBS@ PGM_GTKDOC_CFLAGS = @PGM_GTKDOC_CFLAGS@ PGM_LIB_LDFLAGS = @PGM_LIB_LDFLAGS@ PGM_LT_LDFLAGS = @PGM_LT_LDFLAGS@ PGM_LT_VERSION = @PGM_LT_VERSION@ PGM_MAJORMINOR = @PGM_MAJORMINOR@ PGM_OBJ_CFLAGS = @PGM_OBJ_CFLAGS@ PGM_OBJ_LIBS = @PGM_OBJ_LIBS@ PGM_OPTION_CFLAGS = @PGM_OPTION_CFLAGS@ PGM_PLUGIN_LDFLAGS = @PGM_PLUGIN_LDFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PLUGIN_PATH = @PLUGIN_PATH@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XCOMPOSITE_CFLAGS = @XCOMPOSITE_CFLAGS@ XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ XMKMF = @XMKMF@ XRENDER_CFLAGS = @XRENDER_CFLAGS@ XRENDER_LIBS = @XRENDER_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cairo_req = @cairo_req@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ glib_req = @glib_req@ gstreamer_plugins_base_req = @gstreamer_plugins_base_req@ gstreamer_req = @gstreamer_req@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pango_req = @pango_req@ pangocairo_req = @pangocairo_req@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = pgm all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu docs/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ am__remove_distdir=: \ am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-exec-am: install-html: install-html-recursive install-info: install-info-recursive install-man: install-pdf: install-pdf-recursive install-ps: install-ps-recursive installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ install-strip .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pigment-0.3.17/pigment.spec.in0000644000175000017500000001017511205034420013105 00000000000000%{!?majorminor: %define majorminor @PGM_MAJORMINOR@} %{!?gstreamer: %define gstreamer gstreamer} Name: pigment Version: @VERSION@ Release: 1 Summary: Pigment media rendering library Group: Applications/Multimedia License: LGPL URL: https://code.fluendo.com/pigment/trac Source: http://www.fluendo.com/elisa/downloads/pigment/%{name}-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: glib2 >= @glib_req@ Requires: pango >= @pango_req@ Requires: pangocairo >= @pangocairo_req@ Requires: %{gstreamer} >= @gstreamer_req@ BuildRequires: glib2-devel >= @glib_req@ BuildRequires: pango-devel >= @pango_req@ BuildRequires: pangocairo-devel >= @pangocairo_req@ BuildRequires: libX11-devel BuildRequires: %{gstreamer}-devel >= @gstreamer_req@ BuildRequires: %{gstreamer}-plugins-base-devel >= @gstreamer_plugins_base_req@ BuildRequires: mesa-libGLU-devel BuildRequires: gtk-doc # for gdk-pixbuf BuildRequires: gtk2-devel %description Pigment is a GLib/GObject library designed to easily create rich application user interfaces embedding different media types. Its design allows to use it on several platforms, thanks to a plugin system allowing to choose the underlying graphical API. %package devel Summary: Libraries/include files for Pigment Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: glib2-devel >= @glib_req@ %description devel Pigment is a GLib/GObject library designed to easily create rich application user interfaces embedding different media types. Its design allows to use it on several platforms, thanks to a plugin system allowing to choose the underlying graphical API. This package contains the libraries and includes files necessary to develop applications and plugins using Pigment. %prep %setup -q -n %{name}-%{version} %build %configure --enable-gtk-doc make %install rm -rf $RPM_BUILD_ROOT # Install doc temporarily in order to be included later by rpm %makeinstall docdir="`pwd`/installed-doc" # Do not package .la files find $RPM_BUILD_ROOT%{_libdir} -name "*.la" -exec rm {} \; %clean rm -rf $RPM_BUILD_ROOT %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(-, root, root, -) %doc AUTHORS COPYING INSTALL NEWS README RELEASE TODO ChangeLog %{_libdir}/libpigment-%{majorminor}.so.* %{_libdir}/pigment-%{majorminor}/%{version}/*.so %files devel %defattr(-, root, root, -) %{_includedir}/pigment-%{majorminor}/pgm/*.h %{_includedir}/pigment-%{majorminor}/pgm/gtk/*.h %{_libdir}/libpigment-%{majorminor}.so %{_libdir}/pkgconfig/pigment-%{majorminor}.pc %{_libdir}/pkgconfig/pigment-gtk-%{majorminor}.pc %{_datadir}/gtk-doc/html/pigment %changelog * Mon Jan 21 2008 Loïc Molinari - changed plugin path * Fri Jan 11 2008 Loïc Molinari - updated doc files - changed the description - adapted for the python binding split - added libpigment-gtk * Tue Jan 8 2008 Loïc Molinari - removed the image sink plugin which is now linked statically * Thu Aug 2 2007 Loïc Molinari - adapted to branch 0.3 * Tue Mar 13 2007 Loïc Molinari - adapted to library namespace change - changed description * Fri Feb 16 2007 Loïc Molinari - added libX11-devel and libXrandr-devel build requirements * Thu Feb 01 2007 Loïc Molinari - removed the pygtk2-devel build requirement - removed the libSDL requirement * Thu Jan 04 2007 Thomas Vander Stichele - fix requires - fix URL's - add plugins-base BR - pull in either pygobject2-devel or pygtk2-devel depending on version * Thu Nov 09 2006 Loïc Molinari - changed the license * Thu Nov 09 2006 Thomas Vander Stichele - cleaned up - fixed for 64-bit systems - get versions from configure.ac * Wed Nov 08 2006 Loïc Molinari - added the GStreamer video sink plugin * Thu Oct 31 2006 Christian Schaller - first draft of spec file pigment-0.3.17/README0000644000175000017500000000540511205034420011041 00000000000000WHAT IT IS ---------- Pigment is a library designed to easily build user interfaces for embedded multimedia. Its design allows to use it on several platforms, thanks to a plugin system allowing to choose the underlying graphical API. WHERE TO START -------------- We have a development website at https://code.fluendo.com/pigment/trac You can subscribe to our mailing lists; see the website for details. We track bugs in Trac on the website. You can join us on IRC at #pigment on irc.freenode.org You can generate the Pigment API documentation typing the following command and then point your browser to docs/pgm/html/index.html. ./autogen.sh && make PLATFORMS --------- - Linux is *of course* fully supported. - MacOSX is supported, using the autotools. - Windows is supported, see the win32/README.txt file for more information. INSTALLING FROM PACKAGES ------------------------ You should always prefer installing from packages first. There are Pigment packages for a number of distributions, including Fedora, Debian, Ubuntu, Mandrake, Gentoo, etc. Only in cases where you: - want to hack on Pigment - want to verify that a bug has been fixed - do not have a sane distribution should you choose to build from source tarballs or SVN. COMPILING FROM SVN ------------------ To build Pigment from repository source code, you simply do something like this: svn co https://code.fluendo.com/pigment/svn/trunk pigment cd pigment ./autogen.sh --prefix=/opt/pigment make make install You can also run Pigment uninstalled, which is recommended if you want to develop on it. The script misc/pgm-uninstalled is helpful in setting up your environment for this: svn co https://code.fluendo.com/pigment/svn/trunk pigment cd pigment ./autogen.sh make ./misc/pgm-uninstalled OPENGL ES EMULATION WITH X11 ---------------------------- To build the Pigment OpenGL ES-CM 1.X plugin for PC emulation on X11 from SVN, you first need a wrapper OpenGL ES library like the one provided by PowerVR for instance. Then you have to correctly set your environment to detect the headers and the library for the build: export CFLAGS=-I/path/to/opengl-es-pc-emulation/include export LDLAGS=-L/path/to/opengl-es-pc-emulation/lib Enable the use of the emulation layer: ./autogen.sh --enable-opengles-pc-emulation Then set the path to the library to detect it at run-time: export LD_LIBRARY_PATH=/path/to/opengl-es-pc-emulation/lib:$LD_LIBRARY_PATH BUILD DEPENDENCIES ------------------ Ubuntu Feisty, Gutsy & Hardy: Core dependencies: - autoconf - automake1.7 - libglib2.0-dev - libgtk2.0-dev - gtk-doc-tools - libgstreamer0.10-dev - libgstreamer-plugins-base0.10-dev OpenGL plugin: - libx11-dev - libgl1-mesa-dev - libpango1.0-dev - libcairo-dev Unit tests: - check pigment-0.3.17/aclocal.m40000644000175000017500000012235411205034663012035 00000000000000# generated automatically by aclocal 1.10.2 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, [m4_warning([this file was generated for autoconf 2.63. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) dnl -*- mode: autoconf -*- # serial 1 dnl Usage: dnl GTK_DOC_CHECK([minimum-gtk-doc-version]) AC_DEFUN([GTK_DOC_CHECK], [ AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first dnl for overriding the documentation installation directory AC_ARG_WITH([html-dir], AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),, [with_html_dir='${datadir}/gtk-doc/html']) HTML_DIR="$with_html_dir" AC_SUBST([HTML_DIR]) dnl enable/disable documentation building AC_ARG_ENABLE([gtk-doc], AS_HELP_STRING([--enable-gtk-doc], [use gtk-doc to build documentation [[default=no]]]),, [enable_gtk_doc=no]) if test x$enable_gtk_doc = xyes; then ifelse([$1],[], [PKG_CHECK_EXISTS([gtk-doc],, AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))], [PKG_CHECK_EXISTS([gtk-doc >= $1],, AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build gtk-doc]))]) fi AC_MSG_CHECKING([whether to build gtk-doc documentation]) AC_MSG_RESULT($enable_gtk_doc) AC_PATH_PROGS(GTKDOC_CHECK,gtkdoc-check,) AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes]) AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"]) ]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # # Copyright © 2004 Scott James Remnant . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # # Similar to PKG_CHECK_MODULES, make sure that the first instance of # this or PKG_CHECK_MODULES is called, or make sure to call # PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_ifval([$2], [$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$PKG_CONFIG"; then if test -n "$$1"; then pkg_cv_[]$1="$$1" else PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], [pkg_failed=yes]) fi else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` else $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD ifelse([$4], , [AC_MSG_ERROR(dnl [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT ])], [AC_MSG_RESULT([no]) $4]) elif test $pkg_failed = untried; then ifelse([$4], , [AC_MSG_FAILURE(dnl [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])], [$4]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) ifelse([$3], , :, [$3]) fi[]dnl ])# PKG_CHECK_MODULES # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.10' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.10.2], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.10.2])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 9 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 4 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [# Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 13 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.60])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) ]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 AC_DEFUN([AM_MAINTAINER_MODE], [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode is disabled by default AC_ARG_ENABLE(maintainer-mode, [ --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer], USE_MAINTAINER_MODE=$enableval, USE_MAINTAINER_MODE=no) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST(MAINT)dnl ] ) AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 6 # AM_PROG_CC_C_O # -------------- # Like AC_PROG_CC_C_O, but changed for automake. AC_DEFUN([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC_C_O])dnl AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o if test "$am_t" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi dnl Make sure AC_PROG_CC is never called again, or it will override our dnl setting of CC. m4_define([AC_PROG_CC], [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([common/m4/as-ac-expand.m4]) m4_include([common/m4/as-compiler-flag.m4]) m4_include([common/m4/as-version.m4]) m4_include([common/m4/check.m4]) m4_include([common/m4/gst-args.m4]) m4_include([common/m4/gst-check.m4]) m4_include([common/m4/gst-error.m4]) m4_include([common/m4/gst.m4]) m4_include([common/m4/libtool.m4]) m4_include([common/m4/ltoptions.m4]) m4_include([common/m4/ltsugar.m4]) m4_include([common/m4/ltversion.m4]) m4_include([common/m4/lt~obsolete.m4]) pigment-0.3.17/misc/0000777000175000017500000000000011205035141011175 500000000000000pigment-0.3.17/misc/Makefile.am0000644000175000017500000000003511205034417013150 00000000000000EXTRA_DIST = pgm-uninstalled pigment-0.3.17/misc/Makefile.in0000644000175000017500000003117611205034672013176 00000000000000# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = misc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/as-compiler-flag.m4 \ $(top_srcdir)/common/m4/as-version.m4 \ $(top_srcdir)/common/m4/check.m4 \ $(top_srcdir)/common/m4/gst-args.m4 \ $(top_srcdir)/common/m4/gst-check.m4 \ $(top_srcdir)/common/m4/gst-error.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/libtool.m4 \ $(top_srcdir)/common/m4/ltoptions.m4 \ $(top_srcdir)/common/m4/ltsugar.m4 \ $(top_srcdir)/common/m4/ltversion.m4 \ $(top_srcdir)/common/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAIROXLIB_CFLAGS = @CAIROXLIB_CFLAGS@ CAIROXLIB_LIBS = @CAIROXLIB_LIBS@ CAIRO_CFLAGS = @CAIRO_CFLAGS@ CAIRO_LIBS = @CAIRO_LIBS@ CC = @CC@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXEEXT = @EXEEXT@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ GCOV = @GCOV@ GCOV_CFLAGS = @GCOV_CFLAGS@ GCOV_LIBS = @GCOV_LIBS@ GDKPIXBUFXLIB_CFLAGS = @GDKPIXBUFXLIB_CFLAGS@ GDKPIXBUFXLIB_LIBS = @GDKPIXBUFXLIB_LIBS@ GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@ GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ GST_0_10_13_CFLAGS = @GST_0_10_13_CFLAGS@ GST_0_10_13_LIBS = @GST_0_10_13_LIBS@ GST_10_10_CFLAGS = @GST_10_10_CFLAGS@ GST_10_10_LIBS = @GST_10_10_LIBS@ GST_10_11_CFLAGS = @GST_10_11_CFLAGS@ GST_10_11_LIBS = @GST_10_11_LIBS@ GST_10_12_CFLAGS = @GST_10_12_CFLAGS@ GST_10_12_LIBS = @GST_10_12_LIBS@ GST_10_13_CFLAGS = @GST_10_13_CFLAGS@ GST_10_13_LIBS = @GST_10_13_LIBS@ GST_10_14_CFLAGS = @GST_10_14_CFLAGS@ GST_10_14_LIBS = @GST_10_14_LIBS@ GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ GST_BASE_LIBS = @GST_BASE_LIBS@ GST_CFLAGS = @GST_CFLAGS@ GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ GST_CHECK_LIBS = @GST_CHECK_LIBS@ GST_LIBS = @GST_LIBS@ GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ GST_TOOLS_DIR = @GST_TOOLS_DIR@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_GTK_WIDGET = @HAVE_GTK_WIDGET@ HAVE_IMAGING_LIBRARY = @HAVE_IMAGING_LIBRARY@ HAVE_OPENGLES_PLUGIN = @HAVE_OPENGLES_PLUGIN@ HAVE_OPENGL_PLUGIN = @HAVE_OPENGL_PLUGIN@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGLADE_2_0_CFLAGS = @LIBGLADE_2_0_CFLAGS@ LIBGLADE_2_0_LIBS = @LIBGLADE_2_0_LIBS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENGLES_BACKEND = @OPENGLES_BACKEND@ OPENGL_BACKEND = @OPENGL_BACKEND@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ PANGOCAIRO_CFLAGS = @PANGOCAIRO_CFLAGS@ PANGOCAIRO_LIBS = @PANGOCAIRO_LIBS@ PANGO_1_16_CFLAGS = @PANGO_1_16_CFLAGS@ PANGO_1_16_LIBS = @PANGO_1_16_LIBS@ PANGO_CFLAGS = @PANGO_CFLAGS@ PANGO_LIBS = @PANGO_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL_PATH = @PERL_PATH@ PGM_ALL_CFLAGS = @PGM_ALL_CFLAGS@ PGM_ALL_LDFLAGS = @PGM_ALL_LDFLAGS@ PGM_ALL_LIBS = @PGM_ALL_LIBS@ PGM_GLES_CFLAGS = @PGM_GLES_CFLAGS@ PGM_GLES_LIBS = @PGM_GLES_LIBS@ PGM_GL_CFLAGS = @PGM_GL_CFLAGS@ PGM_GL_LIBS = @PGM_GL_LIBS@ PGM_GTKDOC_CFLAGS = @PGM_GTKDOC_CFLAGS@ PGM_LIB_LDFLAGS = @PGM_LIB_LDFLAGS@ PGM_LT_LDFLAGS = @PGM_LT_LDFLAGS@ PGM_LT_VERSION = @PGM_LT_VERSION@ PGM_MAJORMINOR = @PGM_MAJORMINOR@ PGM_OBJ_CFLAGS = @PGM_OBJ_CFLAGS@ PGM_OBJ_LIBS = @PGM_OBJ_LIBS@ PGM_OPTION_CFLAGS = @PGM_OPTION_CFLAGS@ PGM_PLUGIN_LDFLAGS = @PGM_PLUGIN_LDFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PLUGIN_PATH = @PLUGIN_PATH@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XCOMPOSITE_CFLAGS = @XCOMPOSITE_CFLAGS@ XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ XMKMF = @XMKMF@ XRENDER_CFLAGS = @XRENDER_CFLAGS@ XRENDER_LIBS = @XRENDER_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cairo_req = @cairo_req@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ glib_req = @glib_req@ gstreamer_plugins_base_req = @gstreamer_plugins_base_req@ gstreamer_req = @gstreamer_req@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pango_req = @pango_req@ pangocairo_req = @pangocairo_req@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = pgm-uninstalled all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu misc/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu misc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pigment-0.3.17/misc/pgm-uninstalled0000755000175000017500000000355511205034417014157 00000000000000#!/bin/bash -i # # Set up environment to use and develop with Pigment uninstalled. # # The script is registering several environment variables to run # Pigment uninstalled. It also registers PYTHONPATH for Pigment # Python, this one should be put in the parent directory of Pigment. # It is how the packages are stored in the Subversion repository. # # Author(s): Thomas Vander Stichele # Loïc Molinari PROJECT='pigment-0.3' # Find the script directory handling symlinks self=$0 absolute=$self if test -L $absolute then absolute=`stat $absolute -c %N -t | sed 's/^.* -> .//g' | sed 's/.$//g'` fi MISCDIR=`dirname $absolute` BASEDIR=`cd $MISCDIR/.. && pwd` # Set up the paths needed to run uninstalled # UNIX library path env var LD_LIBRARY_PATH=$BASEDIR/../prefix/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} LD_LIBRARY_PATH=$BASEDIR/pgm/.libs${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} export LD_LIBRARY_PATH # Mac OS library path env var DYLD_LIBRARY_PATH=$BASEDIR/../prefix/lib${DYLD_LIBRARY_PATH:+:$DYLD_LIBRARY_PATH} DYLD_LIBRARY_PATH=$BASEDIR/pgm/.libs${DYLD_LIBRARY_PATH:+:$DYLD_LIBRARY_PATH} export DYLD_LIBRARY_PATH # Common env vars export PGM_PLUGIN_PATH=$BASEDIR/plugins export PKG_CONFIG_PATH=$BASEDIR/../prefix/lib/pkgconfig:$BASEDIR/pkgconfig:$PKG_CONFIG_PATH export PYTHONPATH=$BASEDIR/../pigment-python:$BASEDIR/../pigment-python/pgm/.libs:$PYTHONPATH # If we got a command, run it and exit if test ! -z "$1"; then $@ exit $? fi # Set up a prompt helping us remember we're in a subshell tmp=`mktemp -t bashrc.XXXXXXXX` echo source $HOME/.bashrc >> $tmp echo PS1=\'[$PROJECT] $PS1\' >> $tmp SHELL_OPTIONS="--init-file $tmp" # Start the shell echo Entering interactive $PROJECT shell $SHELL. $SHELL $SHELL_OPTIONS # Remove temporary file if test ! -z "$tmp" then rm $tmp fi echo Thank you for using $PROJECT. pigment-0.3.17/Makefile.am0000644000175000017500000000067411205034420012220 00000000000000DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc ACLOCAL_AMFLAGS = -I common/m4 SUBDIRS = \ pgm \ plugins \ tests \ examples \ docs \ pkgconfig \ misc \ win32 MAINTAINERCLEANFILES = \ build-aux/compile \ build-aux/config.guess \ build-aux/config.sub \ build-aux/depcomp \ build-aux/install-sh \ build-aux/ltmain.sh \ build-aux/missing \ Makefile.in \ config.h.in \ configure EXTRA_DIST = \ pigment.spec \ COPYING \ RELEASE pigment-0.3.17/configure0000755000175000017500000240141111205034667012104 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.63 for Pigment 0.3.17. # # Report bugs to . # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH if test "x$CONFIG_SHELL" = x; then if (eval ":") 2>/dev/null; then as_have_required=yes else as_have_required=no fi if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=\$LINENO as_lineno_2=\$LINENO test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } ") 2> /dev/null; then : else as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. case $as_dir in /*) for as_base in sh bash ksh sh5; do as_candidate_shells="$as_candidate_shells $as_dir/$as_base" done;; esac done IFS=$as_save_IFS for as_shell in $as_candidate_shells $SHELL; do # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : _ASEOF }; then CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : (as_func_return () { (exit $1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = "$1" ); then : else exitcode=1 echo positional parameters were not saved. fi test $exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } _ASEOF }; then break fi fi done if test "x$CONFIG_SHELL" != x; then for as_var in BASH_ENV ENV do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test $as_have_required = no; then echo This script requires a shell more modern than all the echo shells that I found on your system. Please install a echo modern shell, or manually run the script under such a echo shell if you do have one. { (exit 1); exit 1; } fi fi fi (eval "as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0") || { echo No shell found that supports shell functions. echo Please tell bug-autoconf@gnu.org about your system, echo including any error possibly output before this message. echo This can help us improve future autoconf versions. echo Configuration will now proceed without shell functions. } as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$lt_ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','` ;; esac ECHO=${lt_ECHO-echo} if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then # Yippee, $ECHO works! : else # Restart under the correct shell. exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat <<_LT_EOF $* _LT_EOF exit 0 fi # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test -z "$lt_ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if { echo_test_string=`eval $cmd`; } 2>/dev/null && { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null then break fi done fi if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$ECHO" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. ECHO='print -r' elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} else # Try using printf. ECHO='printf %s\n' if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL ECHO="$CONFIG_SHELL $0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$CONFIG_SHELL $0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "$0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} else # Oops. We lost completely, so just stick with echo. ECHO=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. lt_ECHO=$ECHO if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" fi exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='Pigment' PACKAGE_TARNAME='pigment' PACKAGE_VERSION='0.3.17' PACKAGE_STRING='Pigment 0.3.17' PACKAGE_BUGREPORT='https://code.fluendo.com/pigment/trac/newticket' ac_unique_file="pgm/pgm.c" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='LTLIBOBJS LIBOBJS PLUGIN_PATH PGM_GTKDOC_CFLAGS PGM_PLUGIN_LDFLAGS PGM_OBJ_LIBS PGM_OBJ_CFLAGS PGM_LIB_LDFLAGS PGM_ALL_LDFLAGS PGM_ALL_LIBS PGM_ALL_CFLAGS PGM_OPTION_CFLAGS PROFILE_CFLAGS OPENGL_TESTS_ENABLED_FALSE OPENGL_TESTS_ENABLED_TRUE HAVE_LIBGLADE_2_0_FALSE HAVE_LIBGLADE_2_0_TRUE LIBGLADE_2_0_LIBS LIBGLADE_2_0_CFLAGS USE_OPENGLES_FALSE USE_OPENGLES_TRUE OPENGLES_BACKEND HAVE_OPENGLES_PLUGIN PGM_GLES_LIBS PGM_GLES_CFLAGS TSLIB_LIBS TSLIB_CFLAGS ENABLE_TOUCHSCREEN_FALSE ENABLE_TOUCHSCREEN_TRUE USE_OPENGLES_PC_EMULATION_FALSE USE_OPENGLES_PC_EMULATION_TRUE USE_OPENGL_FALSE USE_OPENGL_TRUE OPENGL_BACKEND HAVE_OPENGL_PLUGIN PGM_GL_LIBS PGM_GL_CFLAGS USE_GL_FALSE USE_GL_TRUE XRENDER_LIBS XRENDER_CFLAGS GDKPIXBUFXLIB_LIBS GDKPIXBUFXLIB_CFLAGS PANGOCAIRO_LIBS PANGOCAIRO_CFLAGS PANGO_1_16_LIBS PANGO_1_16_CFLAGS PANGO_LIBS PANGO_CFLAGS USE_GLX_FALSE USE_GLX_TRUE USE_AGL_FALSE USE_AGL_TRUE HAVE_XCOMPOSITE_FALSE HAVE_XCOMPOSITE_TRUE HAVE_CAIRO_XLIB_FALSE HAVE_CAIRO_XLIB_TRUE XCOMPOSITE_LIBS XCOMPOSITE_CFLAGS CAIROXLIB_LIBS CAIROXLIB_CFLAGS X_EXTRA_LIBS X_LIBS X_PRE_LIBS X_CFLAGS XMKMF X11_LIBS X11_CFLAGS USE_GTK_WIDGET_FALSE USE_GTK_WIDGET_TRUE HAVE_GTK_WIDGET HAVE_GTK_FALSE HAVE_GTK_TRUE GTK_LIBS GTK_CFLAGS BUILD_GTK_WIDGET_FALSE BUILD_GTK_WIDGET_TRUE USE_IMAGING_LIBRARY_FALSE USE_IMAGING_LIBRARY_TRUE HAVE_IMAGING_LIBRARY HAVE_CAIRO_FALSE HAVE_CAIRO_TRUE CAIRO_LIBS CAIRO_CFLAGS BUILD_IMAGING_LIBRARY_FALSE BUILD_IMAGING_LIBRARY_TRUE GDKPIXBUF_LIBS GDKPIXBUF_CFLAGS HAVE_CHECK_FALSE HAVE_CHECK_TRUE CHECK_LIBS CHECK_CFLAGS GST_0_10_13_LIBS GST_0_10_13_CFLAGS GST_CHECK_LIBS GST_CHECK_CFLAGS GSTPB_PLUGINS_DIR GST_PLUGINS_BASE_LIBS GST_PLUGINS_BASE_CFLAGS GST_BASE_LIBS GST_BASE_CFLAGS GST_10_14_LIBS GST_10_14_CFLAGS GST_10_13_LIBS GST_10_13_CFLAGS GST_10_12_LIBS GST_10_12_CFLAGS GST_10_11_LIBS GST_10_11_CFLAGS GST_10_10_LIBS GST_10_10_CFLAGS GST_PLUGINS_DIR GST_TOOLS_DIR GST_LIBS GST_CFLAGS GLIB_LIBS GLIB_CFLAGS GTK_DOC_USE_LIBTOOL_FALSE GTK_DOC_USE_LIBTOOL_TRUE ENABLE_GTK_DOC_FALSE ENABLE_GTK_DOC_TRUE GTKDOC_CHECK HTML_DIR cairo_req pangocairo_req pango_req gstreamer_plugins_base_req gstreamer_req glib_req HAVE_VALGRIND_FALSE HAVE_VALGRIND_TRUE VALGRIND_PATH PERL_PATH LIBM OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL lt_ECHO RANLIB AR OBJDUMP LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP SED host_os host_vendor host_cpu host build_os build_vendor build_cpu build LIBTOOL ERROR_CFLAGS BUILD_EXAMPLES_FALSE BUILD_EXAMPLES_TRUE GST_GCOV_ENABLED_FALSE GST_GCOV_ENABLED_TRUE CCASFLAGS FFLAGS CXXFLAGS GCOV GCOV_LIBS GCOV_CFLAGS VALGRIND_LIBS VALGRIND_CFLAGS PKG_CONFIG PGM_LT_LDFLAGS PGM_LT_VERSION PGM_MAJORMINOR EGREP GREP CPP am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE PACKAGE_VERSION_RELEASE PACKAGE_VERSION_NANO PACKAGE_VERSION_MICRO PACKAGE_VERSION_MINOR PACKAGE_VERSION_MAJOR am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_maintainer_mode enable_dependency_tracking enable_profiling enable_valgrind enable_gcov enable_examples enable_shared enable_static with_pic enable_fast_install with_gnu_ld enable_libtool_lock with_html_dir enable_gtk_doc with_check with_checklibname enable_imaging_library enable_gtk_widget with_x enable_opengles_pc_emulation enable_gdl enable_touchscreen enable_opengl_tests ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP PKG_CONFIG VALGRIND_CFLAGS VALGRIND_LIBS GLIB_CFLAGS GLIB_LIBS GST_CFLAGS GST_LIBS GST_10_10_CFLAGS GST_10_10_LIBS GST_10_11_CFLAGS GST_10_11_LIBS GST_10_12_CFLAGS GST_10_12_LIBS GST_10_13_CFLAGS GST_10_13_LIBS GST_10_14_CFLAGS GST_10_14_LIBS GST_BASE_CFLAGS GST_BASE_LIBS GST_PLUGINS_BASE_CFLAGS GST_PLUGINS_BASE_LIBS GST_CHECK_CFLAGS GST_CHECK_LIBS GST_0_10_13_CFLAGS GST_0_10_13_LIBS GDKPIXBUF_CFLAGS GDKPIXBUF_LIBS CAIRO_CFLAGS CAIRO_LIBS GTK_CFLAGS GTK_LIBS X11_CFLAGS X11_LIBS XMKMF CAIROXLIB_CFLAGS CAIROXLIB_LIBS XCOMPOSITE_CFLAGS XCOMPOSITE_LIBS PANGO_CFLAGS PANGO_LIBS PANGO_1_16_CFLAGS PANGO_1_16_LIBS PANGOCAIRO_CFLAGS PANGOCAIRO_LIBS GDKPIXBUFXLIB_CFLAGS GDKPIXBUFXLIB_LIBS XRENDER_CFLAGS XRENDER_LIBS TSLIB_CFLAGS TSLIB_LIBS LIBGLADE_2_0_CFLAGS LIBGLADE_2_0_LIBS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { $as_echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { $as_echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 { (exit 1); exit 1; }; } ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || { $as_echo "$as_me: error: working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures Pigment 0.3.17 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/pigment] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names X features: --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of Pigment 0.3.17:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-profiling adds -pg to compiler commandline, for profiling --disable-valgrind disable run-time valgrind detection --enable-gcov compile with coverage profiling instrumentation (gcc only) --disable-examples disable building examples --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --enable-gtk-doc use gtk-doc to build documentation [default=no] --disable-imaging-library disable building imaging library --disable-gtk-widget disable building GTK+ widget --enable-opengles-pc-emulation enable the emulation of OpenGL ES on PC [default=no] --enable-gdl enable GDL backend support --enable-touchscreen enable touchscreen support --enable-opengl-tests enable the tests requiring OpenGL [default=no] Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-html-dir=PATH path to installed docs --with-check=PATH prefix where check is installed default=auto --with-check-lib-name=NAME name of the PIC check library (default=check) --with-x use the X Window System Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor PKG_CONFIG path to pkg-config utility VALGRIND_CFLAGS C compiler flags for VALGRIND, overriding pkg-config VALGRIND_LIBS linker flags for VALGRIND, overriding pkg-config GLIB_CFLAGS C compiler flags for GLIB, overriding pkg-config GLIB_LIBS linker flags for GLIB, overriding pkg-config GST_CFLAGS C compiler flags for GST, overriding pkg-config GST_LIBS linker flags for GST, overriding pkg-config GST_10_10_CFLAGS C compiler flags for GST_10_10, overriding pkg-config GST_10_10_LIBS linker flags for GST_10_10, overriding pkg-config GST_10_11_CFLAGS C compiler flags for GST_10_11, overriding pkg-config GST_10_11_LIBS linker flags for GST_10_11, overriding pkg-config GST_10_12_CFLAGS C compiler flags for GST_10_12, overriding pkg-config GST_10_12_LIBS linker flags for GST_10_12, overriding pkg-config GST_10_13_CFLAGS C compiler flags for GST_10_13, overriding pkg-config GST_10_13_LIBS linker flags for GST_10_13, overriding pkg-config GST_10_14_CFLAGS C compiler flags for GST_10_14, overriding pkg-config GST_10_14_LIBS linker flags for GST_10_14, overriding pkg-config GST_BASE_CFLAGS C compiler flags for GST_BASE, overriding pkg-config GST_BASE_LIBS linker flags for GST_BASE, overriding pkg-config GST_PLUGINS_BASE_CFLAGS C compiler flags for GST_PLUGINS_BASE, overriding pkg-config GST_PLUGINS_BASE_LIBS linker flags for GST_PLUGINS_BASE, overriding pkg-config GST_CHECK_CFLAGS C compiler flags for GST_CHECK, overriding pkg-config GST_CHECK_LIBS linker flags for GST_CHECK, overriding pkg-config GST_0_10_13_CFLAGS C compiler flags for GST_0_10_13, overriding pkg-config GST_0_10_13_LIBS linker flags for GST_0_10_13, overriding pkg-config GDKPIXBUF_CFLAGS C compiler flags for GDKPIXBUF, overriding pkg-config GDKPIXBUF_LIBS linker flags for GDKPIXBUF, overriding pkg-config CAIRO_CFLAGS C compiler flags for CAIRO, overriding pkg-config CAIRO_LIBS linker flags for CAIRO, overriding pkg-config GTK_CFLAGS C compiler flags for GTK, overriding pkg-config GTK_LIBS linker flags for GTK, overriding pkg-config X11_CFLAGS C compiler flags for X11, overriding pkg-config X11_LIBS linker flags for X11, overriding pkg-config XMKMF Path to xmkmf, Makefile generator for X Window System CAIROXLIB_CFLAGS C compiler flags for CAIROXLIB, overriding pkg-config CAIROXLIB_LIBS linker flags for CAIROXLIB, overriding pkg-config XCOMPOSITE_CFLAGS C compiler flags for XCOMPOSITE, overriding pkg-config XCOMPOSITE_LIBS linker flags for XCOMPOSITE, overriding pkg-config PANGO_CFLAGS C compiler flags for PANGO, overriding pkg-config PANGO_LIBS linker flags for PANGO, overriding pkg-config PANGO_1_16_CFLAGS C compiler flags for PANGO_1_16, overriding pkg-config PANGO_1_16_LIBS linker flags for PANGO_1_16, overriding pkg-config PANGOCAIRO_CFLAGS C compiler flags for PANGOCAIRO, overriding pkg-config PANGOCAIRO_LIBS linker flags for PANGOCAIRO, overriding pkg-config GDKPIXBUFXLIB_CFLAGS C compiler flags for GDKPIXBUFXLIB, overriding pkg-config GDKPIXBUFXLIB_LIBS linker flags for GDKPIXBUFXLIB, overriding pkg-config XRENDER_CFLAGS C compiler flags for XRENDER, overriding pkg-config XRENDER_LIBS linker flags for XRENDER, overriding pkg-config TSLIB_CFLAGS C compiler flags for TSLIB, overriding pkg-config TSLIB_LIBS linker flags for TSLIB, overriding pkg-config LIBGLADE_2_0_CFLAGS C compiler flags for LIBGLADE_2_0, overriding pkg-config LIBGLADE_2_0_LIBS linker flags for LIBGLADE_2_0, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF Pigment configure 0.3.17 generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by Pigment $as_me 0.3.17, which was generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test -r "$ac_site_file"; then { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 $as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in build-aux "$srcdir"/build-aux; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in build-aux \"$srcdir\"/build-aux" >&5 $as_echo "$as_me: error: cannot find install-sh or install.sh in build-aux \"$srcdir\"/build-aux" >&2;} { (exit 1); exit 1; }; } fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. ac_config_headers="$ac_config_headers config.h" am__api_version='1.10' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 $as_echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 $as_echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi { $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AWK+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:$LINENO: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 $as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='pigment' VERSION='0.3.17' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' PACKAGE_VERSION_MAJOR=`echo 0.3.17 | cut -d'.' -f1` PACKAGE_VERSION_MINOR=`echo 0.3.17 | cut -d'.' -f2` PACKAGE_VERSION_MICRO=`echo 0.3.17 | cut -d'.' -f3` { $as_echo "$as_me:$LINENO: checking nano version" >&5 $as_echo_n "checking nano version... " >&6; } NANO=`echo 0.3.17 | cut -d'.' -f4` if test x"$NANO" = x || test "x$NANO" = "x0" ; then { $as_echo "$as_me:$LINENO: result: 0 (release)" >&5 $as_echo "0 (release)" >&6; } NANO=0 PACKAGE_VERSION_RELEASE=1 PGM_SVN="no" else { $as_echo "$as_me:$LINENO: result: $NANO" >&5 $as_echo "$NANO" >&6; } PACKAGE_VERSION_RELEASE=0.`date +%Y%m%d.%H%M%S` PGM_SVN="yes" fi PACKAGE_VERSION_NANO=$NANO { $as_echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi { $as_echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi { $as_echo "$as_me:$LINENO: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 $as_echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } # Provide some information about the compiler. $as_echo "$as_me:$LINENO: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { (ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi { $as_echo "$as_me:$LINENO: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } if test -z "$ac_file"; then $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 $as_echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; }; } fi ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi fi fi { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } { $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } { $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi rm -f conftest$ac_cv_exeext { $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT { $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:$LINENO: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:$LINENO: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:$LINENO: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 $as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if test "${ac_cv_path_GREP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 $as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:$LINENO: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if test "${ac_cv_path_EGREP+set}" = set; then $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 $as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test "${ac_cv_header_minix_config_h+set}" = set; then { $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5 $as_echo_n "checking for minix/config.h... " >&6; } if test "${ac_cv_header_minix_config_h+set}" = set; then $as_echo_n "(cached) " >&6 fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 $as_echo "$ac_cv_header_minix_config_h" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking minix/config.h usability" >&5 $as_echo_n "checking minix/config.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking minix/config.h presence" >&5 $as_echo_n "checking minix/config.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## -------------------------------------------------------------- ## ## Report this to https://code.fluendo.com/pigment/trac/newticket ## ## -------------------------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5 $as_echo_n "checking for minix/config.h... " >&6; } if test "${ac_cv_header_minix_config_h+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_header_minix_config_h=$ac_header_preproc fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 $as_echo "$ac_cv_header_minix_config_h" >&6; } fi if test "x$ac_cv_header_minix_config_h" = x""yes; then MINIX=yes else MINIX= fi if test "$MINIX" = yes; then cat >>confdefs.h <<\_ACEOF #define _POSIX_SOURCE 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define _POSIX_1_SOURCE 2 _ACEOF cat >>confdefs.h <<\_ACEOF #define _MINIX 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } if test "${ac_cv_safe_to_define___extensions__+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ # define __EXTENSIONS__ 1 $ac_includes_default int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_safe_to_define___extensions__=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_safe_to_define___extensions__=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } test $ac_cv_safe_to_define___extensions__ = yes && cat >>confdefs.h <<\_ACEOF #define __EXTENSIONS__ 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define _ALL_SOURCE 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define _GNU_SOURCE 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define _POSIX_PTHREAD_SEMANTICS 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define _TANDEM_SOURCE 1 _ACEOF PGM_MAJORMINOR=$PACKAGE_VERSION_MAJOR.$PACKAGE_VERSION_MINOR cat >>confdefs.h <<_ACEOF #define PGM_MAJORMINOR "PGM_MAJORMINOR" _ACEOF PGM_LT_CURRENT=11 PGM_LT_REV=0 PGM_LT_AGE=0 PGM_LT_VERSION="$PGM_LT_CURRENT:$PGM_LT_REV:$PGM_LT_AGE" PGM_LT_LDFLAGS="-version-info $PGM_LT_VERSION" # Check whether --enable-profiling was given. if test "${enable_profiling+set}" = set; then enableval=$enable_profiling; case "${enableval}" in yes) USE_PROFILING=yes ;; no) USE_PROFILING=no ;; *) { { $as_echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-profiling" >&5 $as_echo "$as_me: error: bad value ${enableval} for --enable-profiling" >&2;} { (exit 1); exit 1; }; } ;; esac else USE_PROFILING=no fi if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PKG_CONFIG+set}" = set; then $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi # Check whether --enable-valgrind was given. if test "${enable_valgrind+set}" = set; then enableval=$enable_valgrind; case "${enableval}" in yes) USE_VALGRIND="$USE_DEBUG" ;; no) USE_VALGRIND=no ;; *) { { $as_echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-valgrind" >&5 $as_echo "$as_me: error: bad value ${enableval} for --enable-valgrind" >&2;} { (exit 1); exit 1; }; } ;; esac else USE_VALGRIND="$USE_DEBUG" fi VALGRIND_REQ="2.1" if test "x$USE_VALGRIND" = xyes; then pkg_failed=no { $as_echo "$as_me:$LINENO: checking for VALGRIND" >&5 $as_echo_n "checking for VALGRIND... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$VALGRIND_CFLAGS"; then pkg_cv_VALGRIND_CFLAGS="$VALGRIND_CFLAGS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"valgrind > \$VALGRIND_REQ\"") >&5 ($PKG_CONFIG --exists --print-errors "valgrind > $VALGRIND_REQ") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_VALGRIND_CFLAGS=`$PKG_CONFIG --cflags "valgrind > $VALGRIND_REQ" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$VALGRIND_LIBS"; then pkg_cv_VALGRIND_LIBS="$VALGRIND_LIBS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"valgrind > \$VALGRIND_REQ\"") >&5 ($PKG_CONFIG --exists --print-errors "valgrind > $VALGRIND_REQ") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_VALGRIND_LIBS=`$PKG_CONFIG --libs "valgrind > $VALGRIND_REQ" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then VALGRIND_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "valgrind > $VALGRIND_REQ"` else VALGRIND_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "valgrind > $VALGRIND_REQ"` fi # Put the nasty error message in config.log where it belongs echo "$VALGRIND_PKG_ERRORS" >&5 { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } USE_VALGRIND="no" { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } elif test $pkg_failed = untried; then USE_VALGRIND="no" { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } else VALGRIND_CFLAGS=$pkg_cv_VALGRIND_CFLAGS VALGRIND_LIBS=$pkg_cv_VALGRIND_LIBS { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } USE_VALGRIND="yes" fi fi if test "x$USE_VALGRIND" = xyes; then cat >>confdefs.h <<\_ACEOF #define HAVE_VALGRIND 1 _ACEOF { $as_echo "$as_me:$LINENO: Using extra code paths for valgrind" >&5 $as_echo "$as_me: Using extra code paths for valgrind" >&6;} fi # Check whether --enable-gcov was given. if test "${enable_gcov+set}" = set; then enableval=$enable_gcov; enable_gcov=$enableval else enable_gcov=no fi if test x$enable_gcov = xyes ; then if test "x$GCC" != "xyes" then { { $as_echo "$as_me:$LINENO: error: gcov only works if gcc is used" >&5 $as_echo "$as_me: error: gcov only works if gcc is used" >&2;} { (exit 1); exit 1; }; } fi { $as_echo "$as_me:$LINENO: checking to see if compiler understands \"-fprofile-arcs\"" >&5 $as_echo_n "checking to see if compiler understands \"-fprofile-arcs\"... " >&6; } save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS "-fprofile-arcs"" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then flag_ok=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 flag_ok=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" if test "X$flag_ok" = Xyes ; then GCOV_CFLAGS="$GCOV_CFLAGS -fprofile-arcs" true else true true fi { $as_echo "$as_me:$LINENO: result: $flag_ok" >&5 $as_echo "$flag_ok" >&6; } { $as_echo "$as_me:$LINENO: checking to see if compiler understands \"-ftest-coverage\"" >&5 $as_echo_n "checking to see if compiler understands \"-ftest-coverage\"... " >&6; } save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS "-ftest-coverage"" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then flag_ok=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 flag_ok=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" if test "X$flag_ok" = Xyes ; then GCOV_CFLAGS="$GCOV_CFLAGS -ftest-coverage" true else true true fi { $as_echo "$as_me:$LINENO: result: $flag_ok" >&5 $as_echo "$flag_ok" >&6; } GCOV_CFLAGS=`echo "$GCOV_CFLAGS" | sed -e 's/-O[0-9]*//g'` GCOV_LIBS=-lgcov GCOV=`echo $CC | sed s/gcc/gcov/g` GST_GCOV_ENABLED=yes cat >>confdefs.h <<_ACEOF #define GST_GCOV_ENABLED 1 _ACEOF if test "x$GST_GCOV_ENABLED" = "xyes" then CFLAGS="-O0" CXXFLAGS="-O0" FFLAGS="-O0" CCASFLAGS="-O0" { $as_echo "$as_me:$LINENO: gcov enabled, setting CFLAGS and friends to $CFLAGS" >&5 $as_echo "$as_me: gcov enabled, setting CFLAGS and friends to $CFLAGS" >&6;} fi fi if test x$enable_gcov = xyes; then GST_GCOV_ENABLED_TRUE= GST_GCOV_ENABLED_FALSE='#' else GST_GCOV_ENABLED_TRUE='#' GST_GCOV_ENABLED_FALSE= fi # Check whether --enable-examples was given. if test "${enable_examples+set}" = set; then enableval=$enable_examples; case "${enableval}" in yes) BUILD_EXAMPLES=yes ;; no) BUILD_EXAMPLES=no ;; *) { { $as_echo "$as_me:$LINENO: error: bad value ${enableval} for --disable-examples" >&5 $as_echo "$as_me: error: bad value ${enableval} for --disable-examples" >&2;} { (exit 1); exit 1; }; } ;; esac else BUILD_EXAMPLES=yes fi if test "x$BUILD_EXAMPLES" = "xyes"; then BUILD_EXAMPLES_TRUE= BUILD_EXAMPLES_FALSE='#' else BUILD_EXAMPLES_TRUE='#' BUILD_EXAMPLES_FALSE= fi { $as_echo "$as_me:$LINENO: checking to see if compiler understands -Wall" >&5 $as_echo_n "checking to see if compiler understands -Wall... " >&6; } save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wall" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then flag_ok=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 flag_ok=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" if test "X$flag_ok" = Xyes ; then ERROR_CFLAGS="-Wall" true else ERROR_CFLAGS="" true fi { $as_echo "$as_me:$LINENO: result: $flag_ok" >&5 $as_echo "$flag_ok" >&6; } if test "x$PGM_SVN" != "xno" then { $as_echo "$as_me:$LINENO: checking to see if compiler understands -Werror" >&5 $as_echo_n "checking to see if compiler understands -Werror... " >&6; } save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Werror" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then flag_ok=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 flag_ok=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" if test "X$flag_ok" = Xyes ; then ERROR_CFLAGS="$ERROR_CFLAGS -Werror" true else true fi { $as_echo "$as_me:$LINENO: result: $flag_ok" >&5 $as_echo "$flag_ok" >&6; } if test "x$ERROR_CFLAGS" == "x" then { $as_echo "$as_me:$LINENO: checking to see if compiler understands -errwarn=%all,no%E_EMPTY_DECLARATION,no%E_STATEMENT_NOT_REACHED" >&5 $as_echo_n "checking to see if compiler understands -errwarn=%all,no%E_EMPTY_DECLARATION,no%E_STATEMENT_NOT_REACHED... " >&6; } save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -errwarn=%all,no%E_EMPTY_DECLARATION,no%E_STATEMENT_NOT_REACHED" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then flag_ok=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 flag_ok=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" if test "X$flag_ok" = Xyes ; then ERROR_CFLAGS="-errwarn=%all,no%E_EMPTY_DECLARATION,no%E_STATEMENT_NOT_REACHED" true else true fi { $as_echo "$as_me:$LINENO: result: $flag_ok" >&5 $as_echo "$flag_ok" >&6; } { $as_echo "$as_me:$LINENO: checking to see if compiler understands -features=no%extinl" >&5 $as_echo_n "checking to see if compiler understands -features=no%extinl... " >&6; } save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -features=no%extinl" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then flag_ok=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 flag_ok=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" if test "X$flag_ok" = Xyes ; then ERROR_CFLAGS="$ERROR_CFLAGS -features=no%extinl" true else true fi { $as_echo "$as_me:$LINENO: result: $flag_ok" >&5 $as_echo "$flag_ok" >&6; } if test "x$ERROR_CFLAGS" == "x" then { $as_echo "$as_me:$LINENO: checking to see if compiler understands -errwarn=%all" >&5 $as_echo_n "checking to see if compiler understands -errwarn=%all... " >&6; } save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -errwarn=%all" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then flag_ok=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 flag_ok=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" if test "X$flag_ok" = Xyes ; then ERROR_CFLAGS="-errwarn=%all" true else true fi { $as_echo "$as_me:$LINENO: result: $flag_ok" >&5 $as_echo "$flag_ok" >&6; } fi fi fi { $as_echo "$as_me:$LINENO: set ERROR_CFLAGS to $ERROR_CFLAGS" >&5 $as_echo "$as_me: set ERROR_CFLAGS to $ERROR_CFLAGS" >&6;} if test "x$PGM_SVN" = "xyes"; then PGM_DEFAULT_LOG_LEVEL=GST_LEVEL_INFO else PGM_DEFAULT_LOG_LEVEL=GST_LEVEL_NONE fi cat >>confdefs.h <<_ACEOF #define PGM_DEFAULT_LOG_LEVEL $PGM_DEFAULT_LOG_LEVEL _ACEOF ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 $as_echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } # Provide some information about the compiler. $as_echo "$as_me:$LINENO: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:$LINENO: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:$LINENO: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi if test "x$CC" != xcc; then { $as_echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5 $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } else { $as_echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5 $as_echo_n "checking whether cc understands -c and -o together... " >&6; } fi set dummy $CC; ac_cc=`$as_echo "$2" | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # We do the test twice because some compilers refuse to overwrite an # existing .o file with -o, though they will create one. ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' rm -f conftest2.* if { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -f conftest2.$ac_objext && { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then eval ac_cv_prog_cc_${ac_cc}_c_o=yes if test "x$CC" != xcc; then # Test first that cc exists at all. if { ac_try='cc -c conftest.$ac_ext >&5' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' rm -f conftest2.* if { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -f conftest2.$ac_objext && { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # cc works too. : else # cc exists but doesn't like -o. eval ac_cv_prog_cc_${ac_cc}_c_o=no fi fi fi else eval ac_cv_prog_cc_${ac_cc}_c_o=no fi rm -f core conftest* fi if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } cat >>confdefs.h <<\_ACEOF #define NO_MINUS_C_MINUS_O 1 _ACEOF fi # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o if test "$am_t" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi case `pwd` in *\ * | *\ *) { $as_echo "$as_me:$LINENO: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.2.6' macro_revision='1.3012' ltmain="$ac_aux_dir/ltmain.sh" # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 $as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} { (exit 1); exit 1; }; } { $as_echo "$as_me:$LINENO: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if test "${ac_cv_build+set}" = set; then $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 $as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 $as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi { $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 $as_echo "$as_me: error: invalid value of canonical build" >&2;} { (exit 1); exit 1; }; };; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:$LINENO: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if test "${ac_cv_host+set}" = set; then $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 $as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} { (exit 1); exit 1; }; } fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 $as_echo "$as_me: error: invalid value of canonical host" >&2;} { (exit 1); exit 1; }; };; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if test "${ac_cv_path_SED+set}" = set; then $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed $as_unset ac_script || ac_script= if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then { { $as_echo "$as_me:$LINENO: error: no acceptable sed could be found in \$PATH" >&5 $as_echo "$as_me: error: no acceptable sed could be found in \$PATH" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:$LINENO: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if test "${ac_cv_path_FGREP+set}" = set; then $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then { { $as_echo "$as_me:$LINENO: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 $as_echo "$as_me: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if test "${lt_cv_path_LD+set}" = set; then $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 $as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } { $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:$LINENO: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if test "${lt_cv_path_NM+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$ac_tool_prefix"; then for ac_prog in "dumpbin -symbols" "link -dump -symbols" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_DUMPBIN+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:$LINENO: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in "dumpbin -symbols" "link -dump -symbols" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if test "${lt_cv_nm_interface+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:7159: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:7162: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:7165: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if test "${lt_cv_sys_max_cmd_len+set}" = set; then $as_echo_n "(cached) " >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ = "XX$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:$LINENO: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} { $as_echo "$as_me:$LINENO: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes { $as_echo "$as_me:$LINENO: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } { $as_echo "$as_me:$LINENO: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes { $as_echo "$as_me:$LINENO: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if test "${lt_cv_ld_reload_flag+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OBJDUMP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:$LINENO: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if test "${lt_cv_deplibs_check_method+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AR+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="${ac_tool_prefix}ar" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:$LINENO: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_AR+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="ar" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi else AR="$ac_cv_prog_AR" fi test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Now try to grab the symbols. nlist=conftest.nm if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ const struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:$LINENO: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:$LINENO: result: ok" >&5 $as_echo "ok" >&6; } fi # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line 8370 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if test "${lt_cv_cc_needs_belf+set}" = set; then $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_cv_cc_needs_belf=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 lt_cv_cc_needs_belf=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_DSYMUTIL+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:$LINENO: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_NMEDIT+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:$LINENO: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_LIPO+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:$LINENO: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OTOOL+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:$LINENO: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OTOOL64+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:$LINENO: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:$LINENO: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if test "${lt_cv_apple_cc_single_mod+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if test "${lt_cv_ld_exported_symbols_list+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_cv_ld_exported_symbols_list=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 lt_cv_ld_exported_symbols_list=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac for ac_header in dlfcn.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # Set options enable_dlopen=no enable_win32_dll=no # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then withval=$with_pic; pic_mode="$withval" else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:$LINENO: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if test "${lt_cv_objdir+set}" = set; then $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:$LINENO: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' { $as_echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:9739: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:9743: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= { $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl*) # IBM XL C 8.0/Fortran 10.1 on PPC lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 $as_echo "$lt_prog_compiler_pic" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if test "${lt_cv_prog_compiler_pic_works+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:10078: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:10082: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test "${lt_cv_prog_compiler_static_works+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:10183: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:10187: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:10238: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:10242: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:$LINENO: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag= tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld='-rpath $libdir' archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi link_all_deplibs=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes=yes ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported whole_archive_flag_spec='' link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=echo archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; freebsd1*) ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" cat >conftest.$ac_ext <<_ACEOF int foo(void) {} _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='${wl}-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:$LINENO: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc=no else archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 $as_echo "$archive_cmds_need_lc" >&6; } ;; esac fi ;; esac { $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then shlibpath_overrides_runpath=yes fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:$LINENO: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || test "$inherit_rpath" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_dl_dlopen=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = x""yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) { $as_echo "$as_me:$LINENO: checking for shl_load" >&5 $as_echo_n "checking for shl_load... " >&6; } if test "${ac_cv_func_shl_load+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define shl_load to an innocuous variant, in case declares shl_load. For example, HP-UX 11i declares gettimeofday. */ #define shl_load innocuous_shl_load /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shl_load (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shl_load /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_shl_load || defined __stub___shl_load choke me #endif int main () { return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func_shl_load=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 $as_echo "$ac_cv_func_shl_load" >&6; } if test "x$ac_cv_func_shl_load" = x""yes; then lt_cv_dlopen="shl_load" else { $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_dld_shl_load=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = x""yes; then lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else { $as_echo "$as_me:$LINENO: checking for dlopen" >&5 $as_echo_n "checking for dlopen... " >&6; } if test "${ac_cv_func_dlopen+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define dlopen to an innocuous variant, in case declares dlopen. For example, HP-UX 11i declares gettimeofday. */ #define dlopen innocuous_dlopen /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlopen (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef dlopen /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_dlopen || defined __stub___dlopen choke me #endif int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func_dlopen=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 $as_echo "$ac_cv_func_dlopen" >&6; } if test "x$ac_cv_func_dlopen" = x""yes; then lt_cv_dlopen="dlopen" else { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_dl_dlopen=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = x""yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if test "${ac_cv_lib_svld_dlopen+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_svld_dlopen=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = x""yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if test "${ac_cv_lib_dld_dld_link+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_dld_dld_link=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = x""yes; then lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if test "${lt_cv_dlopen_self+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line 13051 "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if test "${lt_cv_dlopen_self_static+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line 13147 "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:$LINENO: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:$LINENO: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:$LINENO: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:$LINENO: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" ac_config_commands="$ac_config_commands libtool" # Only expand once: { $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if test "${ac_cv_c_const+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset cs; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_const=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF #define const /**/ _ACEOF fi { $as_echo "$as_me:$LINENO: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } if test "${ac_cv_c_inline+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_inline=$ac_kw else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi { $as_echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 $as_echo "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac { $as_echo "$as_me:$LINENO: checking for fabs in -lm" >&5 $as_echo_n "checking for fabs in -lm... " >&6; } if test "${ac_cv_lib_m_fabs+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char fabs (); int main () { return fabs (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_m_fabs=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_m_fabs=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_m_fabs" >&5 $as_echo "$ac_cv_lib_m_fabs" >&6; } if test "x$ac_cv_lib_m_fabs" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_FABS 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for sinf in -lm" >&5 $as_echo_n "checking for sinf in -lm... " >&6; } if test "${ac_cv_lib_m_sinf+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sinf (); int main () { return sinf (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_m_sinf=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_m_sinf=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_m_sinf" >&5 $as_echo "$ac_cv_lib_m_sinf" >&6; } if test "x$ac_cv_lib_m_sinf" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_SINF 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for cosf in -lm" >&5 $as_echo_n "checking for cosf in -lm... " >&6; } if test "${ac_cv_lib_m_cosf+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char cosf (); int main () { return cosf (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_m_cosf=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_m_cosf=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_m_cosf" >&5 $as_echo "$ac_cv_lib_m_cosf" >&6; } if test "x$ac_cv_lib_m_cosf" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_COSF 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for sincosf in -lm" >&5 $as_echo_n "checking for sincosf in -lm... " >&6; } if test "${ac_cv_lib_m_sincosf+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sincosf (); int main () { return sincosf (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_m_sincosf=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_m_sincosf=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_m_sincosf" >&5 $as_echo "$ac_cv_lib_m_sincosf" >&6; } if test "x$ac_cv_lib_m_sincosf" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_SINCOSF 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for lrintf in -lm" >&5 $as_echo_n "checking for lrintf in -lm... " >&6; } if test "${ac_cv_lib_m_lrintf+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char lrintf (); int main () { return lrintf (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_m_lrintf=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_m_lrintf=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_m_lrintf" >&5 $as_echo "$ac_cv_lib_m_lrintf" >&6; } if test "x$ac_cv_lib_m_lrintf" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_LRINTF 1 _ACEOF fi LIBM= case $host in *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) { $as_echo "$as_me:$LINENO: checking for _mwvalidcheckl in -lmw" >&5 $as_echo_n "checking for _mwvalidcheckl in -lmw... " >&6; } if test "${ac_cv_lib_mw__mwvalidcheckl+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmw $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char _mwvalidcheckl (); int main () { return _mwvalidcheckl (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_mw__mwvalidcheckl=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_mw__mwvalidcheckl=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mw__mwvalidcheckl" >&5 $as_echo "$ac_cv_lib_mw__mwvalidcheckl" >&6; } if test "x$ac_cv_lib_mw__mwvalidcheckl" = x""yes; then LIBM="-lmw" fi { $as_echo "$as_me:$LINENO: checking for cos in -lm" >&5 $as_echo_n "checking for cos in -lm... " >&6; } if test "${ac_cv_lib_m_cos+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char cos (); int main () { return cos (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_m_cos=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_m_cos=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_m_cos" >&5 $as_echo "$ac_cv_lib_m_cos" >&6; } if test "x$ac_cv_lib_m_cos" = x""yes; then LIBM="$LIBM -lm" fi ;; *) { $as_echo "$as_me:$LINENO: checking for cos in -lm" >&5 $as_echo_n "checking for cos in -lm... " >&6; } if test "${ac_cv_lib_m_cos+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char cos (); int main () { return cos (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_m_cos=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_m_cos=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_m_cos" >&5 $as_echo "$ac_cv_lib_m_cos" >&6; } if test "x$ac_cv_lib_m_cos" = x""yes; then LIBM="-lm" fi ;; esac # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PERL_PATH+set}" = set; then $as_echo_n "(cached) " >&6 else case $PERL_PATH in [\\/]* | ?:[\\/]*) ac_cv_path_PERL_PATH="$PERL_PATH" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PERL_PATH="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_PERL_PATH" && ac_cv_path_PERL_PATH="no" ;; esac fi PERL_PATH=$ac_cv_path_PERL_PATH if test -n "$PERL_PATH"; then { $as_echo "$as_me:$LINENO: result: $PERL_PATH" >&5 $as_echo "$PERL_PATH" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test x$PERL_PATH = xno; then { { $as_echo "$as_me:$LINENO: error: Could not find Perl" >&5 $as_echo "$as_me: error: Could not find Perl" >&2;} { (exit 1); exit 1; }; } fi # Extract the first word of "valgrind", so it can be a program name with args. set dummy valgrind; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_VALGRIND_PATH+set}" = set; then $as_echo_n "(cached) " >&6 else case $VALGRIND_PATH in [\\/]* | ?:[\\/]*) ac_cv_path_VALGRIND_PATH="$VALGRIND_PATH" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_VALGRIND_PATH="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_VALGRIND_PATH" && ac_cv_path_VALGRIND_PATH="no" ;; esac fi VALGRIND_PATH=$ac_cv_path_VALGRIND_PATH if test -n "$VALGRIND_PATH"; then { $as_echo "$as_me:$LINENO: result: $VALGRIND_PATH" >&5 $as_echo "$VALGRIND_PATH" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test ! "x$VALGRIND_PATH" = "xno"; then HAVE_VALGRIND_TRUE= HAVE_VALGRIND_FALSE='#' else HAVE_VALGRIND_TRUE='#' HAVE_VALGRIND_FALSE= fi { $as_echo "$as_me:$LINENO: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if test "${ac_cv_host+set}" = set; then $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 $as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} { (exit 1); exit 1; }; } fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 $as_echo "$as_me: error: invalid value of canonical host" >&2;} { (exit 1); exit 1; }; };; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac case $host_os in darwin*) HOST_IS_DARWIN="yes" ;; *) HOST_IS_DARWIN="no" ;; esac glib_req=2.8.0 gstreamer_req=0.10.0 gstreamer_plugins_base_req=0.10.0 pango_req=1.20 pangocairo_req=1.20 cairo_req=1.4 # Check whether --with-html-dir was given. if test "${with_html_dir+set}" = set; then withval=$with_html_dir; else with_html_dir='${datadir}/gtk-doc/html' fi HTML_DIR="$with_html_dir" # Check whether --enable-gtk-doc was given. if test "${enable_gtk_doc+set}" = set; then enableval=$enable_gtk_doc; else enable_gtk_doc=no fi if test x$enable_gtk_doc = xyes; then if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk-doc >= 1.3\"") >&5 ($PKG_CONFIG --exists --print-errors "gtk-doc >= 1.3") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then : else { { $as_echo "$as_me:$LINENO: error: You need to have gtk-doc >= 1.3 installed to build gtk-doc" >&5 $as_echo "$as_me: error: You need to have gtk-doc >= 1.3 installed to build gtk-doc" >&2;} { (exit 1); exit 1; }; } fi fi { $as_echo "$as_me:$LINENO: checking whether to build gtk-doc documentation" >&5 $as_echo_n "checking whether to build gtk-doc documentation... " >&6; } { $as_echo "$as_me:$LINENO: result: $enable_gtk_doc" >&5 $as_echo "$enable_gtk_doc" >&6; } for ac_prog in gtkdoc-check do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_GTKDOC_CHECK+set}" = set; then $as_echo_n "(cached) " >&6 else case $GTKDOC_CHECK in [\\/]* | ?:[\\/]*) ac_cv_path_GTKDOC_CHECK="$GTKDOC_CHECK" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GTKDOC_CHECK="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi GTKDOC_CHECK=$ac_cv_path_GTKDOC_CHECK if test -n "$GTKDOC_CHECK"; then { $as_echo "$as_me:$LINENO: result: $GTKDOC_CHECK" >&5 $as_echo "$GTKDOC_CHECK" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$GTKDOC_CHECK" && break done if test x$enable_gtk_doc = xyes; then ENABLE_GTK_DOC_TRUE= ENABLE_GTK_DOC_FALSE='#' else ENABLE_GTK_DOC_TRUE='#' ENABLE_GTK_DOC_FALSE= fi if test -n "$LIBTOOL"; then GTK_DOC_USE_LIBTOOL_TRUE= GTK_DOC_USE_LIBTOOL_FALSE='#' else GTK_DOC_USE_LIBTOOL_TRUE='#' GTK_DOC_USE_LIBTOOL_FALSE= fi pkg_failed=no { $as_echo "$as_me:$LINENO: checking for GLIB" >&5 $as_echo_n "checking for GLIB... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$GLIB_CFLAGS"; then pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= \$glib_req\"") >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0 >= $glib_req") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GLIB_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= $glib_req" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$GLIB_LIBS"; then pkg_cv_GLIB_LIBS="$GLIB_LIBS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= \$glib_req\"") >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0 >= $glib_req") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GLIB_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= $glib_req" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "glib-2.0 >= $glib_req"` else GLIB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "glib-2.0 >= $glib_req"` fi # Put the nasty error message in config.log where it belongs echo "$GLIB_PKG_ERRORS" >&5 { { $as_echo "$as_me:$LINENO: error: Package requirements (glib-2.0 >= $glib_req) were not met: $GLIB_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GLIB_CFLAGS and GLIB_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&5 $as_echo "$as_me: error: Package requirements (glib-2.0 >= $glib_req) were not met: $GLIB_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GLIB_CFLAGS and GLIB_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&2;} { (exit 1); exit 1; }; } elif test $pkg_failed = untried; then { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables GLIB_CFLAGS and GLIB_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details." >&5 $as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables GLIB_CFLAGS and GLIB_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } else GLIB_CFLAGS=$pkg_cv_GLIB_CFLAGS GLIB_LIBS=$pkg_cv_GLIB_LIBS { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } : fi GST_MAJORMINOR=0.10 module=gstreamer-$GST_MAJORMINOR minver=$gstreamer_req name="GStreamer" required="yes" pkg_failed=no { $as_echo "$as_me:$LINENO: checking for GST" >&5 $as_echo_n "checking for GST... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$GST_CFLAGS"; then pkg_cv_GST_CFLAGS="$GST_CFLAGS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$module >= \$minver\"") >&5 ($PKG_CONFIG --exists --print-errors "$module >= $minver") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GST_CFLAGS=`$PKG_CONFIG --cflags "$module >= $minver" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$GST_LIBS"; then pkg_cv_GST_LIBS="$GST_LIBS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$module >= \$minver\"") >&5 ($PKG_CONFIG --exists --print-errors "$module >= $minver") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GST_LIBS=`$PKG_CONFIG --libs "$module >= $minver" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GST_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$module >= $minver"` else GST_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$module >= $minver"` fi # Put the nasty error message in config.log where it belongs echo "$GST_PKG_ERRORS" >&5 { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } HAVE_GST="no" { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:$LINENO: $GST_PKG_ERRORS" >&5 $as_echo "$as_me: $GST_PKG_ERRORS" >&6;} if test "x$required" = "xyes"; then { { $as_echo "$as_me:$LINENO: error: no $module >= $minver ($name) found" >&5 $as_echo "$as_me: error: no $module >= $minver ($name) found" >&2;} { (exit 1); exit 1; }; } else { $as_echo "$as_me:$LINENO: no $module >= $minver ($name) found" >&5 $as_echo "$as_me: no $module >= $minver ($name) found" >&6;} fi elif test $pkg_failed = untried; then HAVE_GST="no" { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:$LINENO: $GST_PKG_ERRORS" >&5 $as_echo "$as_me: $GST_PKG_ERRORS" >&6;} if test "x$required" = "xyes"; then { { $as_echo "$as_me:$LINENO: error: no $module >= $minver ($name) found" >&5 $as_echo "$as_me: error: no $module >= $minver ($name) found" >&2;} { (exit 1); exit 1; }; } else { $as_echo "$as_me:$LINENO: no $module >= $minver ($name) found" >&5 $as_echo "$as_me: no $module >= $minver ($name) found" >&6;} fi else GST_CFLAGS=$pkg_cv_GST_CFLAGS GST_LIBS=$pkg_cv_GST_LIBS { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } HAVE_GST="yes" fi if test -z $GST_TOOLS_DIR; then GST_TOOLS_DIR=`$PKG_CONFIG --variable=toolsdir gstreamer-$GST_MAJORMINOR` if test -z $GST_TOOLS_DIR; then { { $as_echo "$as_me:$LINENO: error: no tools dir set in GStreamer pkg-config file, core upgrade needed." >&5 $as_echo "$as_me: error: no tools dir set in GStreamer pkg-config file, core upgrade needed." >&2;} { (exit 1); exit 1; }; } fi fi { $as_echo "$as_me:$LINENO: using GStreamer tools in $GST_TOOLS_DIR" >&5 $as_echo "$as_me: using GStreamer tools in $GST_TOOLS_DIR" >&6;} if test -z $GST_PLUGINS_DIR; then GST_PLUGINS_DIR=`$PKG_CONFIG --variable=pluginsdir gstreamer-$GST_MAJORMINOR` if test -z $GST_PLUGINS_DIR; then { { $as_echo "$as_me:$LINENO: error: no pluginsdir set in GStreamer pkg-config file, core upgrade needed." >&5 $as_echo "$as_me: error: no pluginsdir set in GStreamer pkg-config file, core upgrade needed." >&2;} { (exit 1); exit 1; }; } fi fi { $as_echo "$as_me:$LINENO: using GStreamer plug-ins in $GST_PLUGINS_DIR" >&5 $as_echo "$as_me: using GStreamer plug-ins in $GST_PLUGINS_DIR" >&6;} pkg_failed=no { $as_echo "$as_me:$LINENO: checking for GST_10_10" >&5 $as_echo_n "checking for GST_10_10... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$GST_10_10_CFLAGS"; then pkg_cv_GST_10_10_CFLAGS="$GST_10_10_CFLAGS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gstreamer-0.10 >= 0.10.10\"") >&5 ($PKG_CONFIG --exists --print-errors "gstreamer-0.10 >= 0.10.10") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GST_10_10_CFLAGS=`$PKG_CONFIG --cflags "gstreamer-0.10 >= 0.10.10" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$GST_10_10_LIBS"; then pkg_cv_GST_10_10_LIBS="$GST_10_10_LIBS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gstreamer-0.10 >= 0.10.10\"") >&5 ($PKG_CONFIG --exists --print-errors "gstreamer-0.10 >= 0.10.10") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GST_10_10_LIBS=`$PKG_CONFIG --libs "gstreamer-0.10 >= 0.10.10" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GST_10_10_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gstreamer-0.10 >= 0.10.10"` else GST_10_10_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gstreamer-0.10 >= 0.10.10"` fi # Put the nasty error message in config.log where it belongs echo "$GST_10_10_PKG_ERRORS" >&5 { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } POST_10_10=0 elif test $pkg_failed = untried; then POST_10_10=0 else GST_10_10_CFLAGS=$pkg_cv_GST_10_10_CFLAGS GST_10_10_LIBS=$pkg_cv_GST_10_10_LIBS { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } POST_10_10=1 fi cat >>confdefs.h <<_ACEOF #define POST_10_10 $POST_10_10 _ACEOF pkg_failed=no { $as_echo "$as_me:$LINENO: checking for GST_10_11" >&5 $as_echo_n "checking for GST_10_11... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$GST_10_11_CFLAGS"; then pkg_cv_GST_10_11_CFLAGS="$GST_10_11_CFLAGS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gstreamer-0.10 >= 0.10.11\"") >&5 ($PKG_CONFIG --exists --print-errors "gstreamer-0.10 >= 0.10.11") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GST_10_11_CFLAGS=`$PKG_CONFIG --cflags "gstreamer-0.10 >= 0.10.11" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$GST_10_11_LIBS"; then pkg_cv_GST_10_11_LIBS="$GST_10_11_LIBS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gstreamer-0.10 >= 0.10.11\"") >&5 ($PKG_CONFIG --exists --print-errors "gstreamer-0.10 >= 0.10.11") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GST_10_11_LIBS=`$PKG_CONFIG --libs "gstreamer-0.10 >= 0.10.11" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GST_10_11_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gstreamer-0.10 >= 0.10.11"` else GST_10_11_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gstreamer-0.10 >= 0.10.11"` fi # Put the nasty error message in config.log where it belongs echo "$GST_10_11_PKG_ERRORS" >&5 { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } POST_10_11=0 elif test $pkg_failed = untried; then POST_10_11=0 else GST_10_11_CFLAGS=$pkg_cv_GST_10_11_CFLAGS GST_10_11_LIBS=$pkg_cv_GST_10_11_LIBS { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } POST_10_11=1 fi cat >>confdefs.h <<_ACEOF #define POST_10_11 $POST_10_11 _ACEOF pkg_failed=no { $as_echo "$as_me:$LINENO: checking for GST_10_12" >&5 $as_echo_n "checking for GST_10_12... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$GST_10_12_CFLAGS"; then pkg_cv_GST_10_12_CFLAGS="$GST_10_12_CFLAGS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gstreamer-0.10 >= 0.10.12\"") >&5 ($PKG_CONFIG --exists --print-errors "gstreamer-0.10 >= 0.10.12") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GST_10_12_CFLAGS=`$PKG_CONFIG --cflags "gstreamer-0.10 >= 0.10.12" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$GST_10_12_LIBS"; then pkg_cv_GST_10_12_LIBS="$GST_10_12_LIBS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gstreamer-0.10 >= 0.10.12\"") >&5 ($PKG_CONFIG --exists --print-errors "gstreamer-0.10 >= 0.10.12") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GST_10_12_LIBS=`$PKG_CONFIG --libs "gstreamer-0.10 >= 0.10.12" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GST_10_12_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gstreamer-0.10 >= 0.10.12"` else GST_10_12_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gstreamer-0.10 >= 0.10.12"` fi # Put the nasty error message in config.log where it belongs echo "$GST_10_12_PKG_ERRORS" >&5 { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } POST_10_12=0 elif test $pkg_failed = untried; then POST_10_12=0 else GST_10_12_CFLAGS=$pkg_cv_GST_10_12_CFLAGS GST_10_12_LIBS=$pkg_cv_GST_10_12_LIBS { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } POST_10_12=1 fi cat >>confdefs.h <<_ACEOF #define POST_10_12 $POST_10_12 _ACEOF pkg_failed=no { $as_echo "$as_me:$LINENO: checking for GST_10_13" >&5 $as_echo_n "checking for GST_10_13... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$GST_10_13_CFLAGS"; then pkg_cv_GST_10_13_CFLAGS="$GST_10_13_CFLAGS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gstreamer-0.10 >= 0.10.13\"") >&5 ($PKG_CONFIG --exists --print-errors "gstreamer-0.10 >= 0.10.13") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GST_10_13_CFLAGS=`$PKG_CONFIG --cflags "gstreamer-0.10 >= 0.10.13" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$GST_10_13_LIBS"; then pkg_cv_GST_10_13_LIBS="$GST_10_13_LIBS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gstreamer-0.10 >= 0.10.13\"") >&5 ($PKG_CONFIG --exists --print-errors "gstreamer-0.10 >= 0.10.13") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GST_10_13_LIBS=`$PKG_CONFIG --libs "gstreamer-0.10 >= 0.10.13" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GST_10_13_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gstreamer-0.10 >= 0.10.13"` else GST_10_13_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gstreamer-0.10 >= 0.10.13"` fi # Put the nasty error message in config.log where it belongs echo "$GST_10_13_PKG_ERRORS" >&5 { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } POST_10_13=0 elif test $pkg_failed = untried; then POST_10_13=0 else GST_10_13_CFLAGS=$pkg_cv_GST_10_13_CFLAGS GST_10_13_LIBS=$pkg_cv_GST_10_13_LIBS { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } POST_10_13=1 fi cat >>confdefs.h <<_ACEOF #define POST_10_13 $POST_10_13 _ACEOF pkg_failed=no { $as_echo "$as_me:$LINENO: checking for GST_10_14" >&5 $as_echo_n "checking for GST_10_14... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$GST_10_14_CFLAGS"; then pkg_cv_GST_10_14_CFLAGS="$GST_10_14_CFLAGS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gstreamer-0.10 >= 0.10.14\"") >&5 ($PKG_CONFIG --exists --print-errors "gstreamer-0.10 >= 0.10.14") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GST_10_14_CFLAGS=`$PKG_CONFIG --cflags "gstreamer-0.10 >= 0.10.14" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$GST_10_14_LIBS"; then pkg_cv_GST_10_14_LIBS="$GST_10_14_LIBS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gstreamer-0.10 >= 0.10.14\"") >&5 ($PKG_CONFIG --exists --print-errors "gstreamer-0.10 >= 0.10.14") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GST_10_14_LIBS=`$PKG_CONFIG --libs "gstreamer-0.10 >= 0.10.14" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GST_10_14_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gstreamer-0.10 >= 0.10.14"` else GST_10_14_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gstreamer-0.10 >= 0.10.14"` fi # Put the nasty error message in config.log where it belongs echo "$GST_10_14_PKG_ERRORS" >&5 { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } POST_10_14=0 elif test $pkg_failed = untried; then POST_10_14=0 else GST_10_14_CFLAGS=$pkg_cv_GST_10_14_CFLAGS GST_10_14_LIBS=$pkg_cv_GST_10_14_LIBS { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } POST_10_14=1 fi cat >>confdefs.h <<_ACEOF #define POST_10_14 $POST_10_14 _ACEOF module=gstreamer-base-$GST_MAJORMINOR minver=$gstreamer_req name="GStreamer Base Libraries" required="yes" pkg_failed=no { $as_echo "$as_me:$LINENO: checking for GST_BASE" >&5 $as_echo_n "checking for GST_BASE... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$GST_BASE_CFLAGS"; then pkg_cv_GST_BASE_CFLAGS="$GST_BASE_CFLAGS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$module >= \$minver\"") >&5 ($PKG_CONFIG --exists --print-errors "$module >= $minver") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GST_BASE_CFLAGS=`$PKG_CONFIG --cflags "$module >= $minver" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$GST_BASE_LIBS"; then pkg_cv_GST_BASE_LIBS="$GST_BASE_LIBS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$module >= \$minver\"") >&5 ($PKG_CONFIG --exists --print-errors "$module >= $minver") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GST_BASE_LIBS=`$PKG_CONFIG --libs "$module >= $minver" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GST_BASE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$module >= $minver"` else GST_BASE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$module >= $minver"` fi # Put the nasty error message in config.log where it belongs echo "$GST_BASE_PKG_ERRORS" >&5 { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } HAVE_GST_BASE="no" { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:$LINENO: $GST_BASE_PKG_ERRORS" >&5 $as_echo "$as_me: $GST_BASE_PKG_ERRORS" >&6;} if test "x$required" = "xyes"; then { { $as_echo "$as_me:$LINENO: error: no $module >= $minver ($name) found" >&5 $as_echo "$as_me: error: no $module >= $minver ($name) found" >&2;} { (exit 1); exit 1; }; } else { $as_echo "$as_me:$LINENO: no $module >= $minver ($name) found" >&5 $as_echo "$as_me: no $module >= $minver ($name) found" >&6;} fi elif test $pkg_failed = untried; then HAVE_GST_BASE="no" { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:$LINENO: $GST_BASE_PKG_ERRORS" >&5 $as_echo "$as_me: $GST_BASE_PKG_ERRORS" >&6;} if test "x$required" = "xyes"; then { { $as_echo "$as_me:$LINENO: error: no $module >= $minver ($name) found" >&5 $as_echo "$as_me: error: no $module >= $minver ($name) found" >&2;} { (exit 1); exit 1; }; } else { $as_echo "$as_me:$LINENO: no $module >= $minver ($name) found" >&5 $as_echo "$as_me: no $module >= $minver ($name) found" >&6;} fi else GST_BASE_CFLAGS=$pkg_cv_GST_BASE_CFLAGS GST_BASE_LIBS=$pkg_cv_GST_BASE_LIBS { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } HAVE_GST_BASE="yes" fi module=gstreamer-plugins-base-$GST_MAJORMINOR minver=$gstreamer_plugins_base_req name="GStreamer Base Plug-ins Library" required="yes" pkg_failed=no { $as_echo "$as_me:$LINENO: checking for GST_PLUGINS_BASE" >&5 $as_echo_n "checking for GST_PLUGINS_BASE... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$GST_PLUGINS_BASE_CFLAGS"; then pkg_cv_GST_PLUGINS_BASE_CFLAGS="$GST_PLUGINS_BASE_CFLAGS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$module >= \$minver\"") >&5 ($PKG_CONFIG --exists --print-errors "$module >= $minver") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GST_PLUGINS_BASE_CFLAGS=`$PKG_CONFIG --cflags "$module >= $minver" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$GST_PLUGINS_BASE_LIBS"; then pkg_cv_GST_PLUGINS_BASE_LIBS="$GST_PLUGINS_BASE_LIBS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$module >= \$minver\"") >&5 ($PKG_CONFIG --exists --print-errors "$module >= $minver") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GST_PLUGINS_BASE_LIBS=`$PKG_CONFIG --libs "$module >= $minver" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GST_PLUGINS_BASE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$module >= $minver"` else GST_PLUGINS_BASE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$module >= $minver"` fi # Put the nasty error message in config.log where it belongs echo "$GST_PLUGINS_BASE_PKG_ERRORS" >&5 { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } HAVE_GST_PLUGINS_BASE="no" { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:$LINENO: $GST_PLUGINS_BASE_PKG_ERRORS" >&5 $as_echo "$as_me: $GST_PLUGINS_BASE_PKG_ERRORS" >&6;} if test "x$required" = "xyes"; then { { $as_echo "$as_me:$LINENO: error: no $module >= $minver ($name) found" >&5 $as_echo "$as_me: error: no $module >= $minver ($name) found" >&2;} { (exit 1); exit 1; }; } else { $as_echo "$as_me:$LINENO: no $module >= $minver ($name) found" >&5 $as_echo "$as_me: no $module >= $minver ($name) found" >&6;} fi elif test $pkg_failed = untried; then HAVE_GST_PLUGINS_BASE="no" { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:$LINENO: $GST_PLUGINS_BASE_PKG_ERRORS" >&5 $as_echo "$as_me: $GST_PLUGINS_BASE_PKG_ERRORS" >&6;} if test "x$required" = "xyes"; then { { $as_echo "$as_me:$LINENO: error: no $module >= $minver ($name) found" >&5 $as_echo "$as_me: error: no $module >= $minver ($name) found" >&2;} { (exit 1); exit 1; }; } else { $as_echo "$as_me:$LINENO: no $module >= $minver ($name) found" >&5 $as_echo "$as_me: no $module >= $minver ($name) found" >&6;} fi else GST_PLUGINS_BASE_CFLAGS=$pkg_cv_GST_PLUGINS_BASE_CFLAGS GST_PLUGINS_BASE_LIBS=$pkg_cv_GST_PLUGINS_BASE_LIBS { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } HAVE_GST_PLUGINS_BASE="yes" fi if test -z $GSTPB_PLUGINS_DIR; then GSTPB_PLUGINS_DIR=`$PKG_CONFIG --variable=pluginsdir gstreamer-plugins-base-$GST_MAJORMINOR` if test -z $GSTPB_PLUGINS_DIR; then { { $as_echo "$as_me:$LINENO: error: no pluginsdir set in GStreamer Base Plug-ins pkg-config file" >&5 $as_echo "$as_me: error: no pluginsdir set in GStreamer Base Plug-ins pkg-config file" >&2;} { (exit 1); exit 1; }; } fi fi { $as_echo "$as_me:$LINENO: using GStreamer Base Plug-ins in $GSTPB_PLUGINS_DIR" >&5 $as_echo "$as_me: using GStreamer Base Plug-ins in $GSTPB_PLUGINS_DIR" >&6;} module=gstreamer-check-$GST_MAJORMINOR minver=$gstreamer_req name="GStreamer Check unittest Library" required=no pkg_failed=no { $as_echo "$as_me:$LINENO: checking for GST_CHECK" >&5 $as_echo_n "checking for GST_CHECK... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$GST_CHECK_CFLAGS"; then pkg_cv_GST_CHECK_CFLAGS="$GST_CHECK_CFLAGS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$module >= \$minver\"") >&5 ($PKG_CONFIG --exists --print-errors "$module >= $minver") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GST_CHECK_CFLAGS=`$PKG_CONFIG --cflags "$module >= $minver" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$GST_CHECK_LIBS"; then pkg_cv_GST_CHECK_LIBS="$GST_CHECK_LIBS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$module >= \$minver\"") >&5 ($PKG_CONFIG --exists --print-errors "$module >= $minver") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GST_CHECK_LIBS=`$PKG_CONFIG --libs "$module >= $minver" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GST_CHECK_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$module >= $minver"` else GST_CHECK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$module >= $minver"` fi # Put the nasty error message in config.log where it belongs echo "$GST_CHECK_PKG_ERRORS" >&5 { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } HAVE_GST_CHECK="no" { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:$LINENO: $GST_CHECK_PKG_ERRORS" >&5 $as_echo "$as_me: $GST_CHECK_PKG_ERRORS" >&6;} if test "x$required" = "xyes"; then { { $as_echo "$as_me:$LINENO: error: no $module >= $minver ($name) found" >&5 $as_echo "$as_me: error: no $module >= $minver ($name) found" >&2;} { (exit 1); exit 1; }; } else { $as_echo "$as_me:$LINENO: no $module >= $minver ($name) found" >&5 $as_echo "$as_me: no $module >= $minver ($name) found" >&6;} fi elif test $pkg_failed = untried; then HAVE_GST_CHECK="no" { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:$LINENO: $GST_CHECK_PKG_ERRORS" >&5 $as_echo "$as_me: $GST_CHECK_PKG_ERRORS" >&6;} if test "x$required" = "xyes"; then { { $as_echo "$as_me:$LINENO: error: no $module >= $minver ($name) found" >&5 $as_echo "$as_me: error: no $module >= $minver ($name) found" >&2;} { (exit 1); exit 1; }; } else { $as_echo "$as_me:$LINENO: no $module >= $minver ($name) found" >&5 $as_echo "$as_me: no $module >= $minver ($name) found" >&6;} fi else GST_CHECK_CFLAGS=$pkg_cv_GST_CHECK_CFLAGS GST_CHECK_LIBS=$pkg_cv_GST_CHECK_LIBS { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } HAVE_GST_CHECK="yes" fi pkg_failed=no { $as_echo "$as_me:$LINENO: checking for GST_0_10_13" >&5 $as_echo_n "checking for GST_0_10_13... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$GST_0_10_13_CFLAGS"; then pkg_cv_GST_0_10_13_CFLAGS="$GST_0_10_13_CFLAGS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gstreamer-0.10 >= 0.10.13\"") >&5 ($PKG_CONFIG --exists --print-errors "gstreamer-0.10 >= 0.10.13") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GST_0_10_13_CFLAGS=`$PKG_CONFIG --cflags "gstreamer-0.10 >= 0.10.13" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$GST_0_10_13_LIBS"; then pkg_cv_GST_0_10_13_LIBS="$GST_0_10_13_LIBS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gstreamer-0.10 >= 0.10.13\"") >&5 ($PKG_CONFIG --exists --print-errors "gstreamer-0.10 >= 0.10.13") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GST_0_10_13_LIBS=`$PKG_CONFIG --libs "gstreamer-0.10 >= 0.10.13" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GST_0_10_13_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gstreamer-0.10 >= 0.10.13"` else GST_0_10_13_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gstreamer-0.10 >= 0.10.13"` fi # Put the nasty error message in config.log where it belongs echo "$GST_0_10_13_PKG_ERRORS" >&5 { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } HAVE_GST_0_10_13=no elif test $pkg_failed = untried; then HAVE_GST_0_10_13=no else GST_0_10_13_CFLAGS=$pkg_cv_GST_0_10_13_CFLAGS GST_0_10_13_LIBS=$pkg_cv_GST_0_10_13_LIBS { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } HAVE_GST_0_10_13=yes fi if test "x$HAVE_GST_0_10_13" = xyes; then cat >>confdefs.h <<\_ACEOF #define HAVE_GST_0_10_13 1 _ACEOF fi # Check whether --with-check was given. if test "${with_check+set}" = set; then withval=$with_check; fi # Check whether --with-checklibname was given. if test "${with_checklibname+set}" = set; then withval=$with_checklibname; fi min_check_version=0.9.2 if test x$with_check = xno; then { $as_echo "$as_me:$LINENO: result: disabled" >&5 $as_echo "disabled" >&6; } HAVE_CHECK=no else if test "x$with_check" != x; then CHECK_EXTRA_CFLAGS="-I$with_check/include" CHECK_EXTRA_LIBS="-L$with_check/lib" else CHECK_EXTRA_CFLAGS="" CHECK_EXTRA_LIBS="" fi if test x$with_checklibname = x; then min_check_version=$min_check_version extra_cflags=$CHECK_EXTRA_CFLAGS extra_libs=$CHECK_EXTRA_LIBS check_lib_name=check_pic CHECK_CFLAGS="$extra_cflags" CHECK_LIBS="$extra_libs -l$check_lib_name" ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $CHECK_CFLAGS" LIBS="$CHECK_LIBS $LIBS" { $as_echo "$as_me:$LINENO: checking for check named $check_lib_name - version >= $min_check_version" >&5 $as_echo_n "checking for check named $check_lib_name - version >= $min_check_version... " >&6; } rm -f conf.check-test no_check= if test "$cross_compiling" = yes; then echo $ac_n "cross compiling; assumed OK... $ac_c" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { int major, minor, micro; char *tmp_version; system ("touch conf.check-test"); /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = strdup("$min_check_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_check_version"); return 1; } if ((CHECK_MAJOR_VERSION != check_major_version) || (CHECK_MINOR_VERSION != check_minor_version) || (CHECK_MICRO_VERSION != check_micro_version)) { printf("\n*** The check header file (version %d.%d.%d) does not match\n", CHECK_MAJOR_VERSION, CHECK_MINOR_VERSION, CHECK_MICRO_VERSION); printf("*** the check library (version %d.%d.%d).\n", check_major_version, check_minor_version, check_micro_version); return 1; } if ((check_major_version > major) || ((check_major_version == major) && (check_minor_version > minor)) || ((check_major_version == major) && (check_minor_version == minor) && (check_micro_version >= micro))) { return 0; } else { printf("\n*** An old version of check (%d.%d.%d) was found.\n", check_major_version, check_minor_version, check_micro_version); printf("*** You need a version of check being at least %d.%d.%d.\n", major, minor, micro); printf("***\n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the check library and header\n"); printf("*** file is being found. Rerun configure with the --with-check=PATH option\n"); printf("*** to specify the prefix where the correct version was installed.\n"); } return 1; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) no_check=yes fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" if test "x$no_check" = x ; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } have_check=true else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } if test -f conf.check-test ; then : else echo "*** Could not run check test program, checking why..." CFLAGS="$CFLAGS $CHECK_CFLAGS" LIBS="$CHECK_LIBS $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding check. You'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "*** The test program failed to compile or link. See the file config.log for" echo "*** the exact error that occured." fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi CHECK_CFLAGS="" CHECK_LIBS="" rm -f conf.check-test have_check=false fi if test x$have_check = xtrue; then HAVE_CHECK=yes else min_check_version=$min_check_version extra_cflags=$CHECK_EXTRA_CFLAGS extra_libs=$CHECK_EXTRA_LIBS check_lib_name=check CHECK_CFLAGS="$extra_cflags" CHECK_LIBS="$extra_libs -l$check_lib_name" ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $CHECK_CFLAGS" LIBS="$CHECK_LIBS $LIBS" { $as_echo "$as_me:$LINENO: checking for check named $check_lib_name - version >= $min_check_version" >&5 $as_echo_n "checking for check named $check_lib_name - version >= $min_check_version... " >&6; } rm -f conf.check-test no_check= if test "$cross_compiling" = yes; then echo $ac_n "cross compiling; assumed OK... $ac_c" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { int major, minor, micro; char *tmp_version; system ("touch conf.check-test"); /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = strdup("$min_check_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_check_version"); return 1; } if ((CHECK_MAJOR_VERSION != check_major_version) || (CHECK_MINOR_VERSION != check_minor_version) || (CHECK_MICRO_VERSION != check_micro_version)) { printf("\n*** The check header file (version %d.%d.%d) does not match\n", CHECK_MAJOR_VERSION, CHECK_MINOR_VERSION, CHECK_MICRO_VERSION); printf("*** the check library (version %d.%d.%d).\n", check_major_version, check_minor_version, check_micro_version); return 1; } if ((check_major_version > major) || ((check_major_version == major) && (check_minor_version > minor)) || ((check_major_version == major) && (check_minor_version == minor) && (check_micro_version >= micro))) { return 0; } else { printf("\n*** An old version of check (%d.%d.%d) was found.\n", check_major_version, check_minor_version, check_micro_version); printf("*** You need a version of check being at least %d.%d.%d.\n", major, minor, micro); printf("***\n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the check library and header\n"); printf("*** file is being found. Rerun configure with the --with-check=PATH option\n"); printf("*** to specify the prefix where the correct version was installed.\n"); } return 1; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) no_check=yes fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" if test "x$no_check" = x ; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } have_check=true else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } if test -f conf.check-test ; then : else echo "*** Could not run check test program, checking why..." CFLAGS="$CFLAGS $CHECK_CFLAGS" LIBS="$CHECK_LIBS $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding check. You'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "*** The test program failed to compile or link. See the file config.log for" echo "*** the exact error that occured." fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi CHECK_CFLAGS="" CHECK_LIBS="" rm -f conf.check-test have_check=false fi if test x$have_check = xtrue; then HAVE_CHECK=yes else HAVE_CHECK=no fi fi else min_check_version=$min_check_version extra_cflags=$CHECK_EXTRA_CFLAGS extra_libs=$CHECK_EXTRA_LIBS check_lib_name=$with_checklibname CHECK_CFLAGS="$extra_cflags" CHECK_LIBS="$extra_libs -l$check_lib_name" ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $CHECK_CFLAGS" LIBS="$CHECK_LIBS $LIBS" { $as_echo "$as_me:$LINENO: checking for check named $check_lib_name - version >= $min_check_version" >&5 $as_echo_n "checking for check named $check_lib_name - version >= $min_check_version... " >&6; } rm -f conf.check-test no_check= if test "$cross_compiling" = yes; then echo $ac_n "cross compiling; assumed OK... $ac_c" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { int major, minor, micro; char *tmp_version; system ("touch conf.check-test"); /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = strdup("$min_check_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_check_version"); return 1; } if ((CHECK_MAJOR_VERSION != check_major_version) || (CHECK_MINOR_VERSION != check_minor_version) || (CHECK_MICRO_VERSION != check_micro_version)) { printf("\n*** The check header file (version %d.%d.%d) does not match\n", CHECK_MAJOR_VERSION, CHECK_MINOR_VERSION, CHECK_MICRO_VERSION); printf("*** the check library (version %d.%d.%d).\n", check_major_version, check_minor_version, check_micro_version); return 1; } if ((check_major_version > major) || ((check_major_version == major) && (check_minor_version > minor)) || ((check_major_version == major) && (check_minor_version == minor) && (check_micro_version >= micro))) { return 0; } else { printf("\n*** An old version of check (%d.%d.%d) was found.\n", check_major_version, check_minor_version, check_micro_version); printf("*** You need a version of check being at least %d.%d.%d.\n", major, minor, micro); printf("***\n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the check library and header\n"); printf("*** file is being found. Rerun configure with the --with-check=PATH option\n"); printf("*** to specify the prefix where the correct version was installed.\n"); } return 1; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) no_check=yes fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" if test "x$no_check" = x ; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } have_check=true else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } if test -f conf.check-test ; then : else echo "*** Could not run check test program, checking why..." CFLAGS="$CFLAGS $CHECK_CFLAGS" LIBS="$CHECK_LIBS $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding check. You'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "*** The test program failed to compile or link. See the file config.log for" echo "*** the exact error that occured." fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi CHECK_CFLAGS="" CHECK_LIBS="" rm -f conf.check-test have_check=false fi if test x$have_check = xtrue; then HAVE_CHECK=yes else HAVE_CHECK=no fi fi rm -f conf.check-test fi if test "x$HAVE_CHECK" = "xyes"; then HAVE_CHECK_TRUE= HAVE_CHECK_FALSE='#' else HAVE_CHECK_TRUE='#' HAVE_CHECK_FALSE= fi pkg_failed=no { $as_echo "$as_me:$LINENO: checking for GDKPIXBUF" >&5 $as_echo_n "checking for GDKPIXBUF... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$GDKPIXBUF_CFLAGS"; then pkg_cv_GDKPIXBUF_CFLAGS="$GDKPIXBUF_CFLAGS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gdk-pixbuf-2.0\"") >&5 ($PKG_CONFIG --exists --print-errors "gdk-pixbuf-2.0") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GDKPIXBUF_CFLAGS=`$PKG_CONFIG --cflags "gdk-pixbuf-2.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$GDKPIXBUF_LIBS"; then pkg_cv_GDKPIXBUF_LIBS="$GDKPIXBUF_LIBS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gdk-pixbuf-2.0\"") >&5 ($PKG_CONFIG --exists --print-errors "gdk-pixbuf-2.0") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GDKPIXBUF_LIBS=`$PKG_CONFIG --libs "gdk-pixbuf-2.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GDKPIXBUF_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gdk-pixbuf-2.0"` else GDKPIXBUF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gdk-pixbuf-2.0"` fi # Put the nasty error message in config.log where it belongs echo "$GDKPIXBUF_PKG_ERRORS" >&5 { { $as_echo "$as_me:$LINENO: error: Package requirements (gdk-pixbuf-2.0) were not met: $GDKPIXBUF_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GDKPIXBUF_CFLAGS and GDKPIXBUF_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&5 $as_echo "$as_me: error: Package requirements (gdk-pixbuf-2.0) were not met: $GDKPIXBUF_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GDKPIXBUF_CFLAGS and GDKPIXBUF_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&2;} { (exit 1); exit 1; }; } elif test $pkg_failed = untried; then { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables GDKPIXBUF_CFLAGS and GDKPIXBUF_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details." >&5 $as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables GDKPIXBUF_CFLAGS and GDKPIXBUF_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } else GDKPIXBUF_CFLAGS=$pkg_cv_GDKPIXBUF_CFLAGS GDKPIXBUF_LIBS=$pkg_cv_GDKPIXBUF_LIBS { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } : fi # Check whether --enable-imaging-library was given. if test "${enable_imaging_library+set}" = set; then enableval=$enable_imaging_library; case "${enableval}" in yes) BUILD_IMAGING_LIBRARY=yes ;; no) BUILD_IMAGING_LIBRARY=no ;; *) { { $as_echo "$as_me:$LINENO: error: bad value ${enableval} for --disable-imaging-library" >&5 $as_echo "$as_me: error: bad value ${enableval} for --disable-imaging-library" >&2;} { (exit 1); exit 1; }; } ;; esac else BUILD_IMAGING_LIBRARY=yes fi if test "x$BUILD_IMAGING_LIBRARY" = "xyes"; then BUILD_IMAGING_LIBRARY_TRUE= BUILD_IMAGING_LIBRARY_FALSE='#' else BUILD_IMAGING_LIBRARY_TRUE='#' BUILD_IMAGING_LIBRARY_FALSE= fi pkg_failed=no { $as_echo "$as_me:$LINENO: checking for CAIRO" >&5 $as_echo_n "checking for CAIRO... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$CAIRO_CFLAGS"; then pkg_cv_CAIRO_CFLAGS="$CAIRO_CFLAGS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"cairo >= \$cairo_req\"") >&5 ($PKG_CONFIG --exists --print-errors "cairo >= $cairo_req") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_CAIRO_CFLAGS=`$PKG_CONFIG --cflags "cairo >= $cairo_req" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$CAIRO_LIBS"; then pkg_cv_CAIRO_LIBS="$CAIRO_LIBS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"cairo >= \$cairo_req\"") >&5 ($PKG_CONFIG --exists --print-errors "cairo >= $cairo_req") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_CAIRO_LIBS=`$PKG_CONFIG --libs "cairo >= $cairo_req" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then CAIRO_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "cairo >= $cairo_req"` else CAIRO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "cairo >= $cairo_req"` fi # Put the nasty error message in config.log where it belongs echo "$CAIRO_PKG_ERRORS" >&5 { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } HAVE_CAIRO=no elif test $pkg_failed = untried; then HAVE_CAIRO=no else CAIRO_CFLAGS=$pkg_cv_CAIRO_CFLAGS CAIRO_LIBS=$pkg_cv_CAIRO_LIBS { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } HAVE_CAIRO=yes fi if test x$HAVE_CAIRO = xyes; then HAVE_CAIRO_TRUE= HAVE_CAIRO_FALSE='#' else HAVE_CAIRO_TRUE='#' HAVE_CAIRO_FALSE= fi if test x$HAVE_CAIRO = xyes -a x$BUILD_IMAGING_LIBRARY = xyes; then HAVE_IMAGING_LIBRARY="yes" else HAVE_IMAGING_LIBRARY="no" fi if test x$HAVE_CAIRO = xyes -a x$BUILD_IMAGING_LIBRARY = xyes; then USE_IMAGING_LIBRARY_TRUE= USE_IMAGING_LIBRARY_FALSE='#' else USE_IMAGING_LIBRARY_TRUE='#' USE_IMAGING_LIBRARY_FALSE= fi # Check whether --enable-gtk-widget was given. if test "${enable_gtk_widget+set}" = set; then enableval=$enable_gtk_widget; case "${enableval}" in yes) BUILD_GTK_WIDGET=yes ;; no) BUILD_GTK_WIDGET=no ;; *) { { $as_echo "$as_me:$LINENO: error: bad value ${enableval} for --disable-gtk-widget" >&5 $as_echo "$as_me: error: bad value ${enableval} for --disable-gtk-widget" >&2;} { (exit 1); exit 1; }; } ;; esac else BUILD_GTK_WIDGET=yes fi if test "x$BUILD_GTK_WIDGET" = "xyes"; then BUILD_GTK_WIDGET_TRUE= BUILD_GTK_WIDGET_FALSE='#' else BUILD_GTK_WIDGET_TRUE='#' BUILD_GTK_WIDGET_FALSE= fi pkg_failed=no { $as_echo "$as_me:$LINENO: checking for GTK" >&5 $as_echo_n "checking for GTK... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$GTK_CFLAGS"; then pkg_cv_GTK_CFLAGS="$GTK_CFLAGS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0\"") >&5 ($PKG_CONFIG --exists --print-errors "gtk+-2.0") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$GTK_LIBS"; then pkg_cv_GTK_LIBS="$GTK_LIBS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0\"") >&5 ($PKG_CONFIG --exists --print-errors "gtk+-2.0") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GTK_LIBS=`$PKG_CONFIG --libs "gtk+-2.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gtk+-2.0"` else GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0"` fi # Put the nasty error message in config.log where it belongs echo "$GTK_PKG_ERRORS" >&5 { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } HAVE_GTK=no elif test $pkg_failed = untried; then HAVE_GTK=no else GTK_CFLAGS=$pkg_cv_GTK_CFLAGS GTK_LIBS=$pkg_cv_GTK_LIBS { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } HAVE_GTK=yes fi if test x$HAVE_GTK = xyes; then HAVE_GTK_TRUE= HAVE_GTK_FALSE='#' else HAVE_GTK_TRUE='#' HAVE_GTK_FALSE= fi if test x$HAVE_GTK = xyes -a x$BUILD_GTK_WIDGET = xyes; then HAVE_GTK_WIDGET="yes" else HAVE_GTK_WIDGET="no" fi if test x$HAVE_GTK = xyes -a x$BUILD_GTK_WIDGET = xyes; then USE_GTK_WIDGET_TRUE= USE_GTK_WIDGET_FALSE='#' else USE_GTK_WIDGET_TRUE='#' USE_GTK_WIDGET_FALSE= fi pkg_failed=no { $as_echo "$as_me:$LINENO: checking for X11" >&5 $as_echo_n "checking for X11... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$X11_CFLAGS"; then pkg_cv_X11_CFLAGS="$X11_CFLAGS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11\"") >&5 ($PKG_CONFIG --exists --print-errors "x11") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_X11_CFLAGS=`$PKG_CONFIG --cflags "x11" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$X11_LIBS"; then pkg_cv_X11_LIBS="$X11_LIBS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11\"") >&5 ($PKG_CONFIG --exists --print-errors "x11") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_X11_LIBS=`$PKG_CONFIG --libs "x11" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then X11_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11"` else X11_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11"` fi # Put the nasty error message in config.log where it belongs echo "$X11_PKG_ERRORS" >&5 { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } HAVE_X11=no elif test $pkg_failed = untried; then HAVE_X11=no else X11_CFLAGS=$pkg_cv_X11_CFLAGS X11_LIBS=$pkg_cv_X11_LIBS { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } HAVE_X11=yes fi if test x$HAVE_X11 = xno; then { $as_echo "$as_me:$LINENO: checking for X" >&5 $as_echo_n "checking for X... " >&6; } # Check whether --with-x was given. if test "${with_x+set}" = set; then withval=$with_x; fi # $have_x is `yes', `no', `disabled', or empty when we do not yet know. if test "x$with_x" = xno; then # The user explicitly disabled X. have_x=disabled else case $x_includes,$x_libraries in #( *\'*) { { $as_echo "$as_me:$LINENO: error: cannot use X directory names containing '" >&5 $as_echo "$as_me: error: cannot use X directory names containing '" >&2;} { (exit 1); exit 1; }; };; #( *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then $as_echo_n "(cached) " >&6 else # One or both of the vars are not set, and there is no cached value. ac_x_includes=no ac_x_libraries=no rm -f -r conftest.dir if mkdir conftest.dir; then cd conftest.dir cat >Imakefile <<'_ACEOF' incroot: @echo incroot='${INCROOT}' usrlibdir: @echo usrlibdir='${USRLIBDIR}' libdir: @echo libdir='${LIBDIR}' _ACEOF if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then # GNU make sometimes prints "make[1]: Entering...", which would confuse us. for ac_var in incroot usrlibdir libdir; do eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" done # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. for ac_extension in a so sl dylib la dll; do if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && test -f "$ac_im_libdir/libX11.$ac_extension"; then ac_im_usrlibdir=$ac_im_libdir; break fi done # Screen out bogus values from the imake configuration. They are # bogus both because they are the default anyway, and because # using them would break gcc on systems where it needs fixed includes. case $ac_im_incroot in /usr/include) ac_x_includes= ;; *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; esac case $ac_im_usrlibdir in /usr/lib | /usr/lib64 | /lib | /lib64) ;; *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; esac fi cd .. rm -f -r conftest.dir fi # Standard set of common directories for X headers. # Check X11 before X11Rn because it is often a symlink to the current release. ac_x_header_dirs=' /usr/X11/include /usr/X11R6/include /usr/X11R5/include /usr/X11R4/include /usr/include/X11 /usr/include/X11R6 /usr/include/X11R5 /usr/include/X11R4 /usr/local/X11/include /usr/local/X11R6/include /usr/local/X11R5/include /usr/local/X11R4/include /usr/local/include/X11 /usr/local/include/X11R6 /usr/local/include/X11R5 /usr/local/include/X11R4 /usr/X386/include /usr/x386/include /usr/XFree86/include/X11 /usr/include /usr/local/include /usr/unsupported/include /usr/athena/include /usr/local/x11r5/include /usr/lpp/Xamples/include /usr/openwin/include /usr/openwin/share/include' if test "$ac_x_includes" = no; then # Guess where to find include files, by looking for Xlib.h. # First, try using that file with no special directory specified. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # We can compile using X headers with no special include directory. ac_x_includes= else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 for ac_dir in $ac_x_header_dirs; do if test -r "$ac_dir/X11/Xlib.h"; then ac_x_includes=$ac_dir break fi done fi rm -f conftest.err conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then # Check for the libraries. # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS LIBS="-lX11 $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { XrmInitialize () ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then LIBS=$ac_save_LIBS # We can link X programs with no special library path. ac_x_libraries= else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 LIBS=$ac_save_LIBS for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` do # Don't even attempt the hair of trying to link an X program! for ac_extension in a so sl dylib la dll; do if test -r "$ac_dir/libX11.$ac_extension"; then ac_x_libraries=$ac_dir break 2 fi done done fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi # $ac_x_libraries = no case $ac_x_includes,$ac_x_libraries in #( no,* | *,no | *\'*) # Didn't find X, or a directory has "'" in its name. ac_cv_have_x="have_x=no";; #( *) # Record where we found X for the cache. ac_cv_have_x="have_x=yes\ ac_x_includes='$ac_x_includes'\ ac_x_libraries='$ac_x_libraries'" esac fi ;; #( *) have_x=yes;; esac eval "$ac_cv_have_x" fi # $with_x != no if test "$have_x" != yes; then { $as_echo "$as_me:$LINENO: result: $have_x" >&5 $as_echo "$have_x" >&6; } no_x=yes else # If each of the values was on the command line, it overrides each guess. test "x$x_includes" = xNONE && x_includes=$ac_x_includes test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries # Update the cache value to reflect the command line values. ac_cv_have_x="have_x=yes\ ac_x_includes='$x_includes'\ ac_x_libraries='$x_libraries'" { $as_echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5 $as_echo "libraries $x_libraries, headers $x_includes" >&6; } fi if test "$no_x" = yes; then # Not all programs may use this symbol, but it does not hurt to define it. cat >>confdefs.h <<\_ACEOF #define X_DISPLAY_MISSING 1 _ACEOF X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= else if test -n "$x_includes"; then X_CFLAGS="$X_CFLAGS -I$x_includes" fi # It would also be nice to do this for all -L options, not just this one. if test -n "$x_libraries"; then X_LIBS="$X_LIBS -L$x_libraries" # For Solaris; some versions of Sun CC require a space after -R and # others require no space. Words are not sufficient . . . . { $as_echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5 $as_echo_n "checking whether -R must be followed by a space... " >&6; } ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" ac_xsave_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } X_LIBS="$X_LIBS -R$x_libraries" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 LIBS="$ac_xsave_LIBS -R $x_libraries" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } X_LIBS="$X_LIBS -R $x_libraries" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { $as_echo "$as_me:$LINENO: result: neither works" >&5 $as_echo "neither works" >&6; } fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext ac_c_werror_flag=$ac_xsave_c_werror_flag LIBS=$ac_xsave_LIBS fi # Check for system-dependent libraries X programs must link with. # Do this before checking for the system-independent R6 libraries # (-lICE), since we may need -lsocket or whatever for X linking. if test "$ISC" = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" else # Martyn Johnson says this is needed for Ultrix, if the X # libraries were built with DECnet support. And Karl Berry says # the Alpha needs dnet_stub (dnet does not exist). ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char XOpenDisplay (); int main () { return XOpenDisplay (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { $as_echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnet_ntoa (); int main () { return dnet_ntoa (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_dnet_dnet_ntoa=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dnet_dnet_ntoa=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then { $as_echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; } if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet_stub $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnet_ntoa (); int main () { return dnet_ntoa (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_dnet_stub_dnet_ntoa=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dnet_stub_dnet_ntoa=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" fi fi fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS="$ac_xsave_LIBS" # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, # to get the SysV transport functions. # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) # needs -lnsl. # The nsl library prevents programs from opening the X display # on Irix 5.2, according to T.E. Dickey. # The functions gethostbyname, getservbyname, and inet_addr are # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. { $as_echo "$as_me:$LINENO: checking for gethostbyname" >&5 $as_echo_n "checking for gethostbyname... " >&6; } if test "${ac_cv_func_gethostbyname+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define gethostbyname to an innocuous variant, in case declares gethostbyname. For example, HP-UX 11i declares gettimeofday. */ #define gethostbyname innocuous_gethostbyname /* System header to define __stub macros and hopefully few prototypes, which can conflict with char gethostbyname (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef gethostbyname /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_gethostbyname || defined __stub___gethostbyname choke me #endif int main () { return gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func_gethostbyname=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_gethostbyname=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 $as_echo "$ac_cv_func_gethostbyname" >&6; } if test $ac_cv_func_gethostbyname = no; then { $as_echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; } if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); int main () { return gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_nsl_gethostbyname=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_nsl_gethostbyname=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" fi if test $ac_cv_lib_nsl_gethostbyname = no; then { $as_echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; } if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); int main () { return gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_bsd_gethostbyname=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_bsd_gethostbyname=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; } if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" fi fi fi # lieder@skyler.mavd.honeywell.com says without -lsocket, # socket/setsockopt and other routines are undefined under SCO ODT # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary # on later versions), says Simon Leinen: it contains gethostby* # variants that don't use the name server (or something). -lsocket # must be given before -lnsl if both are needed. We assume that # if connect needs -lnsl, so does gethostbyname. { $as_echo "$as_me:$LINENO: checking for connect" >&5 $as_echo_n "checking for connect... " >&6; } if test "${ac_cv_func_connect+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define connect to an innocuous variant, in case declares connect. For example, HP-UX 11i declares gettimeofday. */ #define connect innocuous_connect /* System header to define __stub macros and hopefully few prototypes, which can conflict with char connect (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef connect /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char connect (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_connect || defined __stub___connect choke me #endif int main () { return connect (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func_connect=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_connect=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 $as_echo "$ac_cv_func_connect" >&6; } if test $ac_cv_func_connect = no; then { $as_echo "$as_me:$LINENO: checking for connect in -lsocket" >&5 $as_echo_n "checking for connect in -lsocket... " >&6; } if test "${ac_cv_lib_socket_connect+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char connect (); int main () { return connect (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_socket_connect=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_socket_connect=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5 $as_echo "$ac_cv_lib_socket_connect" >&6; } if test "x$ac_cv_lib_socket_connect" = x""yes; then X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" fi fi # Guillermo Gomez says -lposix is necessary on A/UX. { $as_echo "$as_me:$LINENO: checking for remove" >&5 $as_echo_n "checking for remove... " >&6; } if test "${ac_cv_func_remove+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define remove to an innocuous variant, in case declares remove. For example, HP-UX 11i declares gettimeofday. */ #define remove innocuous_remove /* System header to define __stub macros and hopefully few prototypes, which can conflict with char remove (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef remove /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char remove (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_remove || defined __stub___remove choke me #endif int main () { return remove (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func_remove=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_remove=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5 $as_echo "$ac_cv_func_remove" >&6; } if test $ac_cv_func_remove = no; then { $as_echo "$as_me:$LINENO: checking for remove in -lposix" >&5 $as_echo_n "checking for remove in -lposix... " >&6; } if test "${ac_cv_lib_posix_remove+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lposix $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char remove (); int main () { return remove (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_posix_remove=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_posix_remove=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5 $as_echo "$ac_cv_lib_posix_remove" >&6; } if test "x$ac_cv_lib_posix_remove" = x""yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" fi fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. { $as_echo "$as_me:$LINENO: checking for shmat" >&5 $as_echo_n "checking for shmat... " >&6; } if test "${ac_cv_func_shmat+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define shmat to an innocuous variant, in case declares shmat. For example, HP-UX 11i declares gettimeofday. */ #define shmat innocuous_shmat /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shmat (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shmat /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shmat (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_shmat || defined __stub___shmat choke me #endif int main () { return shmat (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func_shmat=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shmat=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5 $as_echo "$ac_cv_func_shmat" >&6; } if test $ac_cv_func_shmat = no; then { $as_echo "$as_me:$LINENO: checking for shmat in -lipc" >&5 $as_echo_n "checking for shmat in -lipc... " >&6; } if test "${ac_cv_lib_ipc_shmat+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lipc $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shmat (); int main () { return shmat (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_ipc_shmat=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_ipc_shmat=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5 $as_echo "$ac_cv_lib_ipc_shmat" >&6; } if test "x$ac_cv_lib_ipc_shmat" = x""yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" fi fi fi # Check for libraries that X11R6 Xt/Xaw programs need. ac_save_LDFLAGS=$LDFLAGS test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to # check for ICE first), but we must link in the order -lSM -lICE or # we get undefined symbols. So assume we have SM if we have ICE. # These have to be linked with before -lX11, unlike the other # libraries we check for below, so use a different variable. # John Interrante, Karl Berry { $as_echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; } if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char IceConnectionNumber (); int main () { return IceConnectionNumber (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_ICE_IceConnectionNumber=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_ICE_IceConnectionNumber=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; } if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" fi LDFLAGS=$ac_save_LDFLAGS fi if test "x$no_x" = xyes; then { $as_echo "$as_me:$LINENO: X11 development libraries not found" >&5 $as_echo "$as_me: X11 development libraries not found" >&6;}; else XLIB_LIBS="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS" XLIB_CFLAGS="$X_CFLAGS" HAVE_X11="yes" fi else XLIB_LIBS="$X11_LIBS" XLIB_CFLAGS="$X11_CFLAGS" fi pkg_failed=no { $as_echo "$as_me:$LINENO: checking for CAIROXLIB" >&5 $as_echo_n "checking for CAIROXLIB... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$CAIROXLIB_CFLAGS"; then pkg_cv_CAIROXLIB_CFLAGS="$CAIROXLIB_CFLAGS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"cairo-xlib\"") >&5 ($PKG_CONFIG --exists --print-errors "cairo-xlib") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_CAIROXLIB_CFLAGS=`$PKG_CONFIG --cflags "cairo-xlib" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$CAIROXLIB_LIBS"; then pkg_cv_CAIROXLIB_LIBS="$CAIROXLIB_LIBS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"cairo-xlib\"") >&5 ($PKG_CONFIG --exists --print-errors "cairo-xlib") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_CAIROXLIB_LIBS=`$PKG_CONFIG --libs "cairo-xlib" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then CAIROXLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "cairo-xlib"` else CAIROXLIB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "cairo-xlib"` fi # Put the nasty error message in config.log where it belongs echo "$CAIROXLIB_PKG_ERRORS" >&5 { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } HAVE_CAIRO_XLIB=no elif test $pkg_failed = untried; then HAVE_CAIRO_XLIB=no else CAIROXLIB_CFLAGS=$pkg_cv_CAIROXLIB_CFLAGS CAIROXLIB_LIBS=$pkg_cv_CAIROXLIB_LIBS { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } HAVE_CAIRO_XLIB=yes fi pkg_failed=no { $as_echo "$as_me:$LINENO: checking for XCOMPOSITE" >&5 $as_echo_n "checking for XCOMPOSITE... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$XCOMPOSITE_CFLAGS"; then pkg_cv_XCOMPOSITE_CFLAGS="$XCOMPOSITE_CFLAGS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xcomposite\"") >&5 ($PKG_CONFIG --exists --print-errors "xcomposite") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_XCOMPOSITE_CFLAGS=`$PKG_CONFIG --cflags "xcomposite" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$XCOMPOSITE_LIBS"; then pkg_cv_XCOMPOSITE_LIBS="$XCOMPOSITE_LIBS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xcomposite\"") >&5 ($PKG_CONFIG --exists --print-errors "xcomposite") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_XCOMPOSITE_LIBS=`$PKG_CONFIG --libs "xcomposite" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then XCOMPOSITE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xcomposite"` else XCOMPOSITE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xcomposite"` fi # Put the nasty error message in config.log where it belongs echo "$XCOMPOSITE_PKG_ERRORS" >&5 { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } HAVE_XCOMPOSITE=no elif test $pkg_failed = untried; then HAVE_XCOMPOSITE=no else XCOMPOSITE_CFLAGS=$pkg_cv_XCOMPOSITE_CFLAGS XCOMPOSITE_LIBS=$pkg_cv_XCOMPOSITE_LIBS { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } HAVE_XCOMPOSITE=yes fi if test x$with_x = xno ; then HAVE_XCOMPOSITE="no" HAVE_CAIRO_XLIB="no" HAVE_OPENGL="no" HAVE_X11="no" fi if test x$HAVE_CAIRO_XLIB = xyes; then HAVE_CAIRO_XLIB_TRUE= HAVE_CAIRO_XLIB_FALSE='#' else HAVE_CAIRO_XLIB_TRUE='#' HAVE_CAIRO_XLIB_FALSE= fi if test x$HAVE_XCOMPOSITE = xyes; then HAVE_XCOMPOSITE_TRUE= HAVE_XCOMPOSITE_FALSE='#' else HAVE_XCOMPOSITE_TRUE='#' HAVE_XCOMPOSITE_FALSE= fi if test x$HOST_IS_DARWIN = xyes; then for ac_header in AGL/agl.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## -------------------------------------------------------------- ## ## Report this to https://code.fluendo.com/pigment/trac/newticket ## ## -------------------------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF HAVE_AGL=yes else HAVE_AGL=no fi done else for ac_header in GL/glx.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## -------------------------------------------------------------- ## ## Report this to https://code.fluendo.com/pigment/trac/newticket ## ## -------------------------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF HAVE_GLX=yes else HAVE_GLX=no fi done fi if test x$HAVE_AGL = xyes; then USE_AGL_TRUE= USE_AGL_FALSE='#' else USE_AGL_TRUE='#' USE_AGL_FALSE= fi if test x$HAVE_GLX = xyes; then USE_GLX_TRUE= USE_GLX_FALSE='#' else USE_GLX_TRUE='#' USE_GLX_FALSE= fi pkg_failed=no { $as_echo "$as_me:$LINENO: checking for PANGO" >&5 $as_echo_n "checking for PANGO... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$PANGO_CFLAGS"; then pkg_cv_PANGO_CFLAGS="$PANGO_CFLAGS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"pango >= \$pango_req\"") >&5 ($PKG_CONFIG --exists --print-errors "pango >= $pango_req") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_PANGO_CFLAGS=`$PKG_CONFIG --cflags "pango >= $pango_req" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$PANGO_LIBS"; then pkg_cv_PANGO_LIBS="$PANGO_LIBS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"pango >= \$pango_req\"") >&5 ($PKG_CONFIG --exists --print-errors "pango >= $pango_req") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_PANGO_LIBS=`$PKG_CONFIG --libs "pango >= $pango_req" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then PANGO_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "pango >= $pango_req"` else PANGO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "pango >= $pango_req"` fi # Put the nasty error message in config.log where it belongs echo "$PANGO_PKG_ERRORS" >&5 { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } HAVE_PANGO=no elif test $pkg_failed = untried; then HAVE_PANGO=no else PANGO_CFLAGS=$pkg_cv_PANGO_CFLAGS PANGO_LIBS=$pkg_cv_PANGO_LIBS { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } HAVE_PANGO=yes fi pkg_failed=no { $as_echo "$as_me:$LINENO: checking for PANGO_1_16" >&5 $as_echo_n "checking for PANGO_1_16... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$PANGO_1_16_CFLAGS"; then pkg_cv_PANGO_1_16_CFLAGS="$PANGO_1_16_CFLAGS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"pango >= 1.16\"") >&5 ($PKG_CONFIG --exists --print-errors "pango >= 1.16") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_PANGO_1_16_CFLAGS=`$PKG_CONFIG --cflags "pango >= 1.16" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$PANGO_1_16_LIBS"; then pkg_cv_PANGO_1_16_LIBS="$PANGO_1_16_LIBS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"pango >= 1.16\"") >&5 ($PKG_CONFIG --exists --print-errors "pango >= 1.16") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_PANGO_1_16_LIBS=`$PKG_CONFIG --libs "pango >= 1.16" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then PANGO_1_16_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "pango >= 1.16"` else PANGO_1_16_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "pango >= 1.16"` fi # Put the nasty error message in config.log where it belongs echo "$PANGO_1_16_PKG_ERRORS" >&5 { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } HAVE_PANGO_1_16=no elif test $pkg_failed = untried; then HAVE_PANGO_1_16=no else PANGO_1_16_CFLAGS=$pkg_cv_PANGO_1_16_CFLAGS PANGO_1_16_LIBS=$pkg_cv_PANGO_1_16_LIBS { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } HAVE_PANGO_1_16=yes fi if test "x$HAVE_PANGO_1_16" = xyes; then cat >>confdefs.h <<\_ACEOF #define HAVE_PANGO_1_16 1 _ACEOF fi pkg_failed=no { $as_echo "$as_me:$LINENO: checking for PANGOCAIRO" >&5 $as_echo_n "checking for PANGOCAIRO... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$PANGOCAIRO_CFLAGS"; then pkg_cv_PANGOCAIRO_CFLAGS="$PANGOCAIRO_CFLAGS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"pangocairo >= \$pangocairo_req\"") >&5 ($PKG_CONFIG --exists --print-errors "pangocairo >= $pangocairo_req") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_PANGOCAIRO_CFLAGS=`$PKG_CONFIG --cflags "pangocairo >= $pangocairo_req" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$PANGOCAIRO_LIBS"; then pkg_cv_PANGOCAIRO_LIBS="$PANGOCAIRO_LIBS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"pangocairo >= \$pangocairo_req\"") >&5 ($PKG_CONFIG --exists --print-errors "pangocairo >= $pangocairo_req") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_PANGOCAIRO_LIBS=`$PKG_CONFIG --libs "pangocairo >= $pangocairo_req" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then PANGOCAIRO_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "pangocairo >= $pangocairo_req"` else PANGOCAIRO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "pangocairo >= $pangocairo_req"` fi # Put the nasty error message in config.log where it belongs echo "$PANGOCAIRO_PKG_ERRORS" >&5 { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } HAVE_PANGOCAIRO=no elif test $pkg_failed = untried; then HAVE_PANGOCAIRO=no else PANGOCAIRO_CFLAGS=$pkg_cv_PANGOCAIRO_CFLAGS PANGOCAIRO_LIBS=$pkg_cv_PANGOCAIRO_LIBS { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } HAVE_PANGOCAIRO=yes fi pkg_failed=no { $as_echo "$as_me:$LINENO: checking for GDKPIXBUFXLIB" >&5 $as_echo_n "checking for GDKPIXBUFXLIB... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$GDKPIXBUFXLIB_CFLAGS"; then pkg_cv_GDKPIXBUFXLIB_CFLAGS="$GDKPIXBUFXLIB_CFLAGS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gdk-pixbuf-xlib-2.0\"") >&5 ($PKG_CONFIG --exists --print-errors "gdk-pixbuf-xlib-2.0") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GDKPIXBUFXLIB_CFLAGS=`$PKG_CONFIG --cflags "gdk-pixbuf-xlib-2.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$GDKPIXBUFXLIB_LIBS"; then pkg_cv_GDKPIXBUFXLIB_LIBS="$GDKPIXBUFXLIB_LIBS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gdk-pixbuf-xlib-2.0\"") >&5 ($PKG_CONFIG --exists --print-errors "gdk-pixbuf-xlib-2.0") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GDKPIXBUFXLIB_LIBS=`$PKG_CONFIG --libs "gdk-pixbuf-xlib-2.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GDKPIXBUFXLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gdk-pixbuf-xlib-2.0"` else GDKPIXBUFXLIB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gdk-pixbuf-xlib-2.0"` fi # Put the nasty error message in config.log where it belongs echo "$GDKPIXBUFXLIB_PKG_ERRORS" >&5 { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } HAVE_GDKPIXBUFXLIB=no elif test $pkg_failed = untried; then HAVE_GDKPIXBUFXLIB=no else GDKPIXBUFXLIB_CFLAGS=$pkg_cv_GDKPIXBUFXLIB_CFLAGS GDKPIXBUFXLIB_LIBS=$pkg_cv_GDKPIXBUFXLIB_LIBS { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } HAVE_GDKPIXBUFXLIB=yes fi pkg_failed=no { $as_echo "$as_me:$LINENO: checking for XRENDER" >&5 $as_echo_n "checking for XRENDER... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$XRENDER_CFLAGS"; then pkg_cv_XRENDER_CFLAGS="$XRENDER_CFLAGS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xrender\"") >&5 ($PKG_CONFIG --exists --print-errors "xrender") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_XRENDER_CFLAGS=`$PKG_CONFIG --cflags "xrender" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$XRENDER_LIBS"; then pkg_cv_XRENDER_LIBS="$XRENDER_LIBS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xrender\"") >&5 ($PKG_CONFIG --exists --print-errors "xrender") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_XRENDER_LIBS=`$PKG_CONFIG --libs "xrender" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then XRENDER_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xrender"` else XRENDER_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xrender"` fi # Put the nasty error message in config.log where it belongs echo "$XRENDER_PKG_ERRORS" >&5 { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } HAVE_XRENDER=no elif test $pkg_failed = untried; then HAVE_XRENDER=no else XRENDER_CFLAGS=$pkg_cv_XRENDER_CFLAGS XRENDER_LIBS=$pkg_cv_XRENDER_LIBS { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } HAVE_XRENDER=yes fi if test x$HOST_IS_DARWIN = xyes; then for ac_header in OpenGL/gl.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## -------------------------------------------------------------- ## ## Report this to https://code.fluendo.com/pigment/trac/newticket ## ## -------------------------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF HAVE_GL=yes else HAVE_GL=no fi done if test x$HAVE_GL = xno; then { $as_echo "$as_me:$LINENO: OSX OpenGL development libraries not found" >&5 $as_echo "$as_me: OSX OpenGL development libraries not found" >&6;}; else GL_LIBS="-framework OpenGL -framework AGL -framework CoreFoundation -framework Carbon" GL_CFLAGS="" fi elif test x$HAVE_X11 = xyes; then for ac_header in GL/gl.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## -------------------------------------------------------------- ## ## Report this to https://code.fluendo.com/pigment/trac/newticket ## ## -------------------------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF HAVE_GL=yes else HAVE_GL=no fi done if test x$HAVE_GL = xyes; then GL_LIBS="-lGL" GL_CFLAGS="" fi fi if test x$HAVE_GL = xyes; then USE_GL_TRUE= USE_GL_FALSE='#' else USE_GL_TRUE='#' USE_GL_FALSE= fi if test x$HAVE_GL = xyes -a x$HAVE_X11 = xyes -a x$HAVE_GDKPIXBUFXLIB = xyes -a x$HAVE_GLX = xyes -a x$HAVE_PANGO = xyes -a x$HAVE_PANGOCAIRO = xyes -a x$HAVE_XRENDER = xyes; then if test x$with_x = xno ; then HAVE_OPENGL_PLUGIN="no" else PGM_GL_LIBS="$XLIB_LIBS $XRENDER_LIBS $GDKPIXBUFXLIB_LIBS $GL_LIBS $PANGO_LIBS $PANGOCAIRO_LIBS" PGM_GL_CFLAGS="$XLIB_CFLAGS $XRENDER_CFLAGS $GDKPIXBUFXLIB_CFLAGS $GL_CFLAGS $PANGO_CFLAGS $PANGOCAIRO_CFLAGS" HAVE_OPENGL_PLUGIN="yes" OPENGL_BACKEND="(Xlib/GLX backend)" fi elif test x$HAVE_GL = xyes -a x$HOST_IS_DARWIN = xyes -a x$HAVE_AGL = xyes -a x$HAVE_PANGO = xyes -a x$HAVE_PANGOCAIRO = xyes; then PGM_GL_LIBS="$GL_LIBS $PANGO_LIBS $PANGOCAIRO_LIBS" PGM_GL_CFLAGS="$GL_CFLAGS $PANGO_CFLAGS $PANGOCAIRO_CFLAGS" HAVE_OPENGL_PLUGIN="yes" OPENGL_BACKEND="(OSX/AGL backend)" else HAVE_OPENGL_PLUGIN="no" OPENGL_BACKEND="" fi if test \( x$HAVE_X11 = xyes -a x$HAVE_GLX = xyes -a x$HAVE_GDKPIXBUFXLIB = xyes \) -o \( x$HOST_IS_DARWIN = xyes -a x$HAVE_AGL = xyes \) -a x$HAVE_GL = xyes -a x$HAVE_PANGO = xyes -a x$HAVE_PANGOCAIRO = xyes -a x$HAVE_XRENDER = xyes; then USE_OPENGL_TRUE= USE_OPENGL_FALSE='#' else USE_OPENGL_TRUE='#' USE_OPENGL_FALSE= fi # Check whether --enable-opengles-pc-emulation was given. if test "${enable_opengles_pc_emulation+set}" = set; then enableval=$enable_opengles_pc_emulation; case "${enableval}" in yes) OPENGLES_PC_EMULATION=yes ;; no) OPENGLES_PC_EMULATION=no ;; *) { { $as_echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-opengles-pc-emulation" >&5 $as_echo "$as_me: error: bad value ${enableval} for --enable-opengles-pc-emulation" >&2;} { (exit 1); exit 1; }; } ;; esac else OPENGLES_PC_EMULATION=no fi if test "x$OPENGLES_PC_EMULATION" = "xyes"; then USE_OPENGLES_PC_EMULATION_TRUE= USE_OPENGLES_PC_EMULATION_FALSE='#' else USE_OPENGLES_PC_EMULATION_TRUE='#' USE_OPENGLES_PC_EMULATION_FALSE= fi if test x$OPENGLES_PC_EMULATION = xyes; then cat >>confdefs.h <<\_ACEOF #define HAVE_OPENGLES_PC_EMULATION 1 _ACEOF fi for ac_header in GLES/egl.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## -------------------------------------------------------------- ## ## Report this to https://code.fluendo.com/pigment/trac/newticket ## ## -------------------------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF HAVE_EGL=yes else HAVE_EGL=no fi done for ac_header in GLES/gl.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## -------------------------------------------------------------- ## ## Report this to https://code.fluendo.com/pigment/trac/newticket ## ## -------------------------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF HAVE_GLES=yes else HAVE_GLES=no fi done if test x$HAVE_GLES = xyes; then GLES_LIBS="-lGLES_CM" GLES_CFLAGS="" fi # Check whether --enable-gdl was given. if test "${enable_gdl+set}" = set; then enableval=$enable_gdl; case "${enableval}" in yes) cat >>confdefs.h <<\_ACEOF #define HAVE_GDL 1 _ACEOF GLES_LIBS="$GLES_LIBS -lgdl -lEGL -lGLESv2" ;; no) cat >>confdefs.h <<\_ACEOF #define HAVE_GDL 0 _ACEOF ;; *) { { $as_echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-gdl" >&5 $as_echo "$as_me: error: bad value ${enableval} for --enable-gdl" >&2;} { (exit 1); exit 1; }; } ;; esac else cat >>confdefs.h <<\_ACEOF #define HAVE_GDL 0 _ACEOF fi # Check whether --enable-touchscreen was given. if test "${enable_touchscreen+set}" = set; then enableval=$enable_touchscreen; case "${enableval}" in yes) ENABLE_TOUCHSCREEN=yes ;; no) ENABLE_TOUCHSCREEN=no ;; *) { { $as_echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-touchscreen" >&5 $as_echo "$as_me: error: bad value ${enableval} for --enable-touchscreen" >&2;} { (exit 1); exit 1; }; } ;; esac else ENABLE_TOUCHSCREEN=yes fi if test "x$ENABLE_TOUCHSCREEN" = "xyes"; then ENABLE_TOUCHSCREEN_TRUE= ENABLE_TOUCHSCREEN_FALSE='#' else ENABLE_TOUCHSCREEN_TRUE='#' ENABLE_TOUCHSCREEN_FALSE= fi pkg_failed=no { $as_echo "$as_me:$LINENO: checking for TSLIB" >&5 $as_echo_n "checking for TSLIB... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$TSLIB_CFLAGS"; then pkg_cv_TSLIB_CFLAGS="$TSLIB_CFLAGS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"tslib-0.0\"") >&5 ($PKG_CONFIG --exists --print-errors "tslib-0.0") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_TSLIB_CFLAGS=`$PKG_CONFIG --cflags "tslib-0.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$TSLIB_LIBS"; then pkg_cv_TSLIB_LIBS="$TSLIB_LIBS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"tslib-0.0\"") >&5 ($PKG_CONFIG --exists --print-errors "tslib-0.0") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_TSLIB_LIBS=`$PKG_CONFIG --libs "tslib-0.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then TSLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "tslib-0.0"` else TSLIB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "tslib-0.0"` fi # Put the nasty error message in config.log where it belongs echo "$TSLIB_PKG_ERRORS" >&5 { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } HAVE_TSLIB=no elif test $pkg_failed = untried; then HAVE_TSLIB=no else TSLIB_CFLAGS=$pkg_cv_TSLIB_CFLAGS TSLIB_LIBS=$pkg_cv_TSLIB_LIBS { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } HAVE_TSLIB=yes fi if test x$HAVE_TSLIB = xyes -a x$ENABLE_TOUCHSCREEN = xyes; then cat >>confdefs.h <<\_ACEOF #define HAVE_TSLIB 1 _ACEOF fi if test x$OPENGLES_PC_EMULATION = xyes -a x$HAVE_GLES = xyes -a x$HAVE_X11 = xyes -a x$HAVE_GLX = xyes -a x$HAVE_PANGO = xyes -a x$HAVE_PANGOCAIRO = xyes; then PGM_GLES_LIBS="$XLIB_LIBS $GLES_LIBS $PANGO_LIBS $PANGOCAIRO_LIBS" PGM_GLES_CFLAGS="$XLIB_CFLAGS $GLES_CFLAGS $PANGO_CFLAGS $PANGOCAIRO_CFLAGS" HAVE_OPENGLES_PLUGIN="yes" OPENGLES_BACKEND="(Xlib/GLX PC emulation backend)" elif test x$HAVE_EGL = xyes -a x$HAVE_GLES = xyes -a x$HAVE_PANGO = xyes -a x$HAVE_PANGOCAIRO = xyes; then PGM_GLES_LIBS="$GLES_LIBS $PANGO_LIBS $PANGOCAIRO_LIBS $TSLIB_LIBS" PGM_GLES_CFLAGS="$GLES_CFLAGS $PANGO_CFLAGS $PANGOCAIRO_CFLAGS $TSLIB_CFLAGS" HAVE_OPENGLES_PLUGIN="yes" if test "x$HAVE_TSLIB" = xyes -a "x$ENABLE_TOUCHSCREEN" = xyes; then OPENGLES_BACKEND="(EGL backend with tslib)" else OPENGLES_BACKEND="(EGL backend without tslib)" fi else HAVE_OPENGLES_PLUGIN="no" OPENGLES_BACKEND="" fi if test \( x$OPENGLES_PC_EMULATION = xyes -a x$HAVE_X11 = xyes -a x$HAVE_GLX = xyes \) -o \( x$HAVE_EGL = xyes \) -a x$HAVE_GLES = xyes -a x$HAVE_PANGO = xyes -a x$HAVE_PANGOCAIRO = xyes; then USE_OPENGLES_TRUE= USE_OPENGLES_FALSE='#' else USE_OPENGLES_TRUE='#' USE_OPENGLES_FALSE= fi pkg_failed=no { $as_echo "$as_me:$LINENO: checking for LIBGLADE_2_0" >&5 $as_echo_n "checking for LIBGLADE_2_0... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$LIBGLADE_2_0_CFLAGS"; then pkg_cv_LIBGLADE_2_0_CFLAGS="$LIBGLADE_2_0_CFLAGS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libglade-2.0\"") >&5 ($PKG_CONFIG --exists --print-errors "libglade-2.0") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_LIBGLADE_2_0_CFLAGS=`$PKG_CONFIG --cflags "libglade-2.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$LIBGLADE_2_0_LIBS"; then pkg_cv_LIBGLADE_2_0_LIBS="$LIBGLADE_2_0_LIBS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libglade-2.0\"") >&5 ($PKG_CONFIG --exists --print-errors "libglade-2.0") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_LIBGLADE_2_0_LIBS=`$PKG_CONFIG --libs "libglade-2.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBGLADE_2_0_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libglade-2.0"` else LIBGLADE_2_0_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libglade-2.0"` fi # Put the nasty error message in config.log where it belongs echo "$LIBGLADE_2_0_PKG_ERRORS" >&5 { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } HAVE_LIBGLADE_2_0=no elif test $pkg_failed = untried; then HAVE_LIBGLADE_2_0=no else LIBGLADE_2_0_CFLAGS=$pkg_cv_LIBGLADE_2_0_CFLAGS LIBGLADE_2_0_LIBS=$pkg_cv_LIBGLADE_2_0_LIBS { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } HAVE_LIBGLADE_2_0=yes fi if test "x$HAVE_LIBGLADE_2_0" = "xyes"; then HAVE_LIBGLADE_2_0_TRUE= HAVE_LIBGLADE_2_0_FALSE='#' else HAVE_LIBGLADE_2_0_TRUE='#' HAVE_LIBGLADE_2_0_FALSE= fi # Check whether --enable-opengl-tests was given. if test "${enable_opengl_tests+set}" = set; then enableval=$enable_opengl_tests; enable_opengl_tests=$enableval else enable_opengl_tests=no fi if test x$HAVE_OPENGL_PLUGIN = xyes -a x$enable_opengl_tests = xyes; then OPENGL_TESTS_ENABLED_TRUE= OPENGL_TESTS_ENABLED_FALSE='#' else OPENGL_TESTS_ENABLED_TRUE='#' OPENGL_TESTS_ENABLED_FALSE= fi if test x$HAVE_OPENGL_PLUGIN = xno -a x$HAVE_OPENGLES_PLUGIN = xno ; then { { $as_echo "$as_me:$LINENO: error: No plugin to compile" >&5 $as_echo "$as_me: error: No plugin to compile" >&2;} { (exit 1); exit 1; }; } fi if test "x$USE_DEBUG" = xyes; then PROFILE_CFLAGS="-g" fi PGM_OPTION_CFLAGS="\$(ERROR_CFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS)" PGM_ALL_CFLAGS="-I\$(top_srcdir) -I\$(top_builddir)/pgm $GST_CFLAGS $GST_PLUGINS_BASE_CFLAGS $GDKPIXBUF_CFLAGS \$(PGM_OPTION_CFLAGS)" PGM_ALL_LIBS="$GST_LIBS $GST_BASE_LIBS $GST_PLUGINS_BASE_LIBS -lgstvideo-0.10 $GDKPIXBUF_LIBS $LIBM \$(GCOV_LIBS)" PGM_ALL_LDFLAGS="-no-undefined" PGM_LIB_LDFLAGS="-export-symbols-regex \^_*\(pgm_\|Pgm\|PGM_\).*" PGM_OBJ_CFLAGS="\$(PGM_ALL_CFLAGS)" PGM_OBJ_LIBS="\$(top_builddir)/pgm/libpigment-$PGM_MAJORMINOR.la \$(PGM_ALL_LIBS)" PGM_PLUGIN_LDFLAGS="-module -avoid-version -export-symbols-regex '^_*pgm_plugin_desc\$\$' $PGM_ALL_LDFLAGS" PGM_GTKDOC_CFLAGS="-I\$(top_srcdir) -I\$(top_builddir)/pgm $GST_CFLAGS $GST_PLUGINS_BASE_CFLAGS $GDKPIXBUF_CFLAGS" EXP_VAR=PLUGIN_PATH FROM_VAR=${libdir}/pigment-$PGM_MAJORMINOR/$VERSION prefix_save=$prefix exec_prefix_save=$exec_prefix if test "x$prefix" = "xNONE"; then prefix="$ac_default_prefix" fi if test "x$exec_prefix" = "xNONE"; then exec_prefix=$prefix fi full_var="$FROM_VAR" while true; do new_full_var="`eval echo $full_var`" if test "x$new_full_var" = "x$full_var"; then break; fi full_var=$new_full_var done full_var=$new_full_var PLUGIN_PATH="$full_var" prefix=$prefix_save exec_prefix=$exec_prefix_save cat >>confdefs.h <<_ACEOF #define PGM_PLUGIN_PATH "$PLUGIN_PATH" _ACEOF ac_config_files="$ac_config_files Makefile pigment.spec pgm/Makefile pgm/pgmversion.h pgm/gtk/Makefile pgm/imaging/Makefile plugins/Makefile plugins/boilerplate/Makefile plugins/opengl/Makefile plugins/opengles/Makefile tests/Makefile tests/check/Makefile tests/check/common/Makefile tests/check/pgm/Makefile tests/check/plugins/Makefile tests/check/plugins/common/Makefile tests/check/plugins/opengl/Makefile tests/check/plugins/boilerplate/Makefile tests/interactive/Makefile examples/Makefile examples/pictures/Makefile docs/Makefile docs/pgm/Makefile docs/pgm/version-short.xml docs/pgm/version-full.xml pkgconfig/Makefile pkgconfig/pigment.pc pkgconfig/pigment-uninstalled.pc pkgconfig/pigment-imaging.pc pkgconfig/pigment-imaging-uninstalled.pc pkgconfig/pigment-gtk.pc pkgconfig/pigment-gtk-uninstalled.pc win32/Makefile win32/common/Makefile win32/vs6/Makefile win32/vs9/Makefile misc/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${GST_GCOV_ENABLED_TRUE}" && test -z "${GST_GCOV_ENABLED_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"GST_GCOV_ENABLED\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"GST_GCOV_ENABLED\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${BUILD_EXAMPLES_TRUE}" && test -z "${BUILD_EXAMPLES_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"BUILD_EXAMPLES\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"BUILD_EXAMPLES\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_VALGRIND_TRUE}" && test -z "${HAVE_VALGRIND_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_VALGRIND\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"HAVE_VALGRIND\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${ENABLE_GTK_DOC_TRUE}" && test -z "${ENABLE_GTK_DOC_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"ENABLE_GTK_DOC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"ENABLE_GTK_DOC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${GTK_DOC_USE_LIBTOOL_TRUE}" && test -z "${GTK_DOC_USE_LIBTOOL_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"GTK_DOC_USE_LIBTOOL\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"GTK_DOC_USE_LIBTOOL\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_CHECK_TRUE}" && test -z "${HAVE_CHECK_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_CHECK\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"HAVE_CHECK\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${BUILD_IMAGING_LIBRARY_TRUE}" && test -z "${BUILD_IMAGING_LIBRARY_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"BUILD_IMAGING_LIBRARY\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"BUILD_IMAGING_LIBRARY\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_CAIRO_TRUE}" && test -z "${HAVE_CAIRO_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_CAIRO\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"HAVE_CAIRO\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${USE_IMAGING_LIBRARY_TRUE}" && test -z "${USE_IMAGING_LIBRARY_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"USE_IMAGING_LIBRARY\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"USE_IMAGING_LIBRARY\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${BUILD_GTK_WIDGET_TRUE}" && test -z "${BUILD_GTK_WIDGET_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"BUILD_GTK_WIDGET\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"BUILD_GTK_WIDGET\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_GTK_TRUE}" && test -z "${HAVE_GTK_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_GTK\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"HAVE_GTK\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${USE_GTK_WIDGET_TRUE}" && test -z "${USE_GTK_WIDGET_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"USE_GTK_WIDGET\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"USE_GTK_WIDGET\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_CAIRO_XLIB_TRUE}" && test -z "${HAVE_CAIRO_XLIB_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_CAIRO_XLIB\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"HAVE_CAIRO_XLIB\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_XCOMPOSITE_TRUE}" && test -z "${HAVE_XCOMPOSITE_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_XCOMPOSITE\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"HAVE_XCOMPOSITE\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${USE_AGL_TRUE}" && test -z "${USE_AGL_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"USE_AGL\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"USE_AGL\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${USE_GLX_TRUE}" && test -z "${USE_GLX_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"USE_GLX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"USE_GLX\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${USE_GL_TRUE}" && test -z "${USE_GL_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"USE_GL\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"USE_GL\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${USE_OPENGL_TRUE}" && test -z "${USE_OPENGL_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"USE_OPENGL\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"USE_OPENGL\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${USE_OPENGLES_PC_EMULATION_TRUE}" && test -z "${USE_OPENGLES_PC_EMULATION_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"USE_OPENGLES_PC_EMULATION\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"USE_OPENGLES_PC_EMULATION\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${ENABLE_TOUCHSCREEN_TRUE}" && test -z "${ENABLE_TOUCHSCREEN_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"ENABLE_TOUCHSCREEN\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"ENABLE_TOUCHSCREEN\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${USE_OPENGLES_TRUE}" && test -z "${USE_OPENGLES_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"USE_OPENGLES\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"USE_OPENGLES\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_LIBGLADE_2_0_TRUE}" && test -z "${HAVE_LIBGLADE_2_0_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_LIBGLADE_2_0\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"HAVE_LIBGLADE_2_0\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${OPENGL_TESTS_ENABLED_TRUE}" && test -z "${OPENGL_TESTS_ENABLED_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"OPENGL_TESTS_ENABLED\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"OPENGL_TESTS_ENABLED\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 # Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by Pigment $as_me 0.3.17, which was generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTION]... [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ Pigment config.status 0.3.17 configured by $0, generated by GNU Autoconf 2.63, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2008 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header { $as_echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; };; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { $as_echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`' macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`' enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`' enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`' host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`' host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`' host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`' build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`' build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`' build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`' SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`' Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`' GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`' EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`' FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`' LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`' NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`' LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`' ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`' exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`' lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`' reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`' reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`' AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`' STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`' RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`' CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`' compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`' GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`' SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`' ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`' need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`' NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`' LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`' OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`' OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`' libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`' fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`' include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`' file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`' version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`' runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`' libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`' library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`' soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`' finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`' sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`' hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`' old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`' striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # Quote evaled strings. for var in SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ AR \ AR_FLAGS \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ SHELL \ ECHO \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_wl \ lt_prog_compiler_pic \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ fix_srcfile_path \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ finish_eval \ old_striplib \ striplib; do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec; do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Fix-up fallback echo if it was mangled by the above quoting rules. case \$lt_ECHO in *'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\` ;; esac ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "pigment.spec") CONFIG_FILES="$CONFIG_FILES pigment.spec" ;; "pgm/Makefile") CONFIG_FILES="$CONFIG_FILES pgm/Makefile" ;; "pgm/pgmversion.h") CONFIG_FILES="$CONFIG_FILES pgm/pgmversion.h" ;; "pgm/gtk/Makefile") CONFIG_FILES="$CONFIG_FILES pgm/gtk/Makefile" ;; "pgm/imaging/Makefile") CONFIG_FILES="$CONFIG_FILES pgm/imaging/Makefile" ;; "plugins/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/Makefile" ;; "plugins/boilerplate/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/boilerplate/Makefile" ;; "plugins/opengl/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/opengl/Makefile" ;; "plugins/opengles/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/opengles/Makefile" ;; "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; "tests/check/Makefile") CONFIG_FILES="$CONFIG_FILES tests/check/Makefile" ;; "tests/check/common/Makefile") CONFIG_FILES="$CONFIG_FILES tests/check/common/Makefile" ;; "tests/check/pgm/Makefile") CONFIG_FILES="$CONFIG_FILES tests/check/pgm/Makefile" ;; "tests/check/plugins/Makefile") CONFIG_FILES="$CONFIG_FILES tests/check/plugins/Makefile" ;; "tests/check/plugins/common/Makefile") CONFIG_FILES="$CONFIG_FILES tests/check/plugins/common/Makefile" ;; "tests/check/plugins/opengl/Makefile") CONFIG_FILES="$CONFIG_FILES tests/check/plugins/opengl/Makefile" ;; "tests/check/plugins/boilerplate/Makefile") CONFIG_FILES="$CONFIG_FILES tests/check/plugins/boilerplate/Makefile" ;; "tests/interactive/Makefile") CONFIG_FILES="$CONFIG_FILES tests/interactive/Makefile" ;; "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; "examples/pictures/Makefile") CONFIG_FILES="$CONFIG_FILES examples/pictures/Makefile" ;; "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;; "docs/pgm/Makefile") CONFIG_FILES="$CONFIG_FILES docs/pgm/Makefile" ;; "docs/pgm/version-short.xml") CONFIG_FILES="$CONFIG_FILES docs/pgm/version-short.xml" ;; "docs/pgm/version-full.xml") CONFIG_FILES="$CONFIG_FILES docs/pgm/version-full.xml" ;; "pkgconfig/Makefile") CONFIG_FILES="$CONFIG_FILES pkgconfig/Makefile" ;; "pkgconfig/pigment.pc") CONFIG_FILES="$CONFIG_FILES pkgconfig/pigment.pc" ;; "pkgconfig/pigment-uninstalled.pc") CONFIG_FILES="$CONFIG_FILES pkgconfig/pigment-uninstalled.pc" ;; "pkgconfig/pigment-imaging.pc") CONFIG_FILES="$CONFIG_FILES pkgconfig/pigment-imaging.pc" ;; "pkgconfig/pigment-imaging-uninstalled.pc") CONFIG_FILES="$CONFIG_FILES pkgconfig/pigment-imaging-uninstalled.pc" ;; "pkgconfig/pigment-gtk.pc") CONFIG_FILES="$CONFIG_FILES pkgconfig/pigment-gtk.pc" ;; "pkgconfig/pigment-gtk-uninstalled.pc") CONFIG_FILES="$CONFIG_FILES pkgconfig/pigment-gtk-uninstalled.pc" ;; "win32/Makefile") CONFIG_FILES="$CONFIG_FILES win32/Makefile" ;; "win32/common/Makefile") CONFIG_FILES="$CONFIG_FILES win32/common/Makefile" ;; "win32/vs6/Makefile") CONFIG_FILES="$CONFIG_FILES win32/vs6/Makefile" ;; "win32/vs9/Makefile") CONFIG_FILES="$CONFIG_FILES win32/vs9/Makefile" ;; "misc/Makefile") CONFIG_FILES="$CONFIG_FILES misc/Makefile" ;; *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 $as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || { $as_echo "$as_me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=' ' ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\).*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\).*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 $as_echo "$as_me: error: could not setup config files machinery" >&2;} { (exit 1); exit 1; }; } _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_t=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_t"; then break elif $ac_last_try; then { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5 $as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 $as_echo "$as_me: error: could not setup config headers machinery" >&2;} { (exit 1); exit 1; }; } fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 $as_echo "$as_me: error: invalid tag $ac_tag" >&2;} { (exit 1); exit 1; }; };; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 $as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac ac_file_inputs="$ac_file_inputs '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir="$ac_dir" case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 $as_echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p ' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$tmp/config.h" "$ac_file" \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 $as_echo "$as_me: error: could not create -" >&2;} { (exit 1); exit 1; }; } fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir=$dirpart/$fdir case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 $as_echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; "libtool":C) # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # The names of the tagged configurations supported by this script. available_tags="" # ### BEGIN LIBTOOL CONFIG # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == "file_magic". file_magic_cmd=$lt_file_magic_cmd # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # The name of the directory that contains temporary libtool files. objdir=$objdir # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that does not interpret backslashes. ECHO=$lt_ECHO # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # If ld is used when linking, flag to hardcode \$libdir into a binary # during linking. This must work even if \$libdir does not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain="$ac_aux_dir/ltmain.sh" # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) case $xsi_shell in yes) cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac } # func_basename file func_basename () { func_basename_result="${1##*/}" } # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}" } # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). func_stripname () { # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"} } # func_opt_split func_opt_split () { func_opt_split_opt=${1%%=*} func_opt_split_arg=${1#*=} } # func_lo2o object func_lo2o () { case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac } # func_xform libobj-or-source func_xform () { func_xform_result=${1%.*}.lo } # func_arith arithmetic-term... func_arith () { func_arith_result=$(( $* )) } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=${#1} } _LT_EOF ;; *) # Bourne compatible functions. cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_basename file func_basename () { func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` } # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; esac } # sed scripts: my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' my_sed_long_arg='1s/^-[^=]*=//' # func_opt_split func_opt_split () { func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` } # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` } # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'` } # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "$@"` } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` } _LT_EOF esac case $lt_shell_append in yes) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$1+=\$2" } _LT_EOF ;; *) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$1=\$$1\$2" } _LT_EOF ;; esac sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ;; esac done # for ac_tag { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 $as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi echo "" echo " Pigment $PACKAGE_VERSION" echo " ===============" echo " Prefix: ${prefix}" echo " Documentation: ${enable_gtk_doc}" echo " OpenGL plugin: ${HAVE_OPENGL_PLUGIN} ${OPENGL_BACKEND}" echo " OpenGL ES plugin: ${HAVE_OPENGLES_PLUGIN} ${OPENGLES_BACKEND}" echo " Imaging library: ${HAVE_IMAGING_LIBRARY}" echo " GTK+ widget: ${HAVE_GTK_WIDGET}" echo " Examples: ${BUILD_EXAMPLES}" pigment-0.3.17/plugins/0000777000175000017500000000000011205035134011725 500000000000000pigment-0.3.17/plugins/Makefile.am0000644000175000017500000000026511205034416013702 00000000000000if USE_OPENGL OPENGL_DIR=opengl else OPENGL_DIR= endif if USE_OPENGLES OPENGLES_DIR=opengles else OPENGLES_DIR= endif SUBDIRS = \ boilerplate \ $(OPENGL_DIR) \ $(OPENGLES_DIR) pigment-0.3.17/plugins/boilerplate/0000777000175000017500000000000011205035134014227 500000000000000pigment-0.3.17/plugins/boilerplate/Makefile.am0000644000175000017500000000111511205034415016176 00000000000000plugindir = @PLUGIN_PATH@ plugin_LTLIBRARIES = libpgmboilerplate.la libpgmboilerplate_la_DEPENDENCIES = $(top_builddir)/pgm/libpigment-@PGM_MAJORMINOR@.la libpgmboilerplate_la_SOURCES = \ pgmbp.c \ pgmbpviewport.c libpgmboilerplate_la_CFLAGS = $(PGM_OBJ_CFLAGS) libpgmboilerplate_la_LIBADD = $(PGM_OBJ_LIBS) libpgmboilerplate_la_LDFLAGS = $(PGM_PLUGIN_LDFLAGS) noinst_HEADERS = pgmbpviewport.h CLEANFILES = \ *.gcno \ *.gcda \ *.gcov \ *.gcov.out %.c.gcov: .libs/libpgmboilerplate_la-%.gcda %.c LANG=C $(GCOV) -b -f -o $^ > $@.out gcov: $(libpgmboilerplate_la_SOURCES:=.gcov) pigment-0.3.17/plugins/boilerplate/pgmbpviewport.c0000644000175000017500000001631711205034415017225 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment Boilerplate plugin * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include "pgmbpviewport.h" GST_DEBUG_CATEGORY_EXTERN (pgm_bp_debug); #define GST_CAT_DEFAULT pgm_bp_debug static PgmCanvasClass *parent_class = NULL; static PgmError pgm_bp_viewport_set_title (PgmViewport *viewport, const gchar * title) { GST_DEBUG_OBJECT (viewport, "set_title"); return PGM_ERROR_OK; } static PgmError pgm_bp_viewport_set_cursor (PgmViewport *viewport, PgmViewportCursor cursor) { GST_DEBUG_OBJECT (viewport, "set_cursor"); return PGM_ERROR_OK; } static PgmError pgm_bp_viewport_set_icon (PgmViewport *viewport, GdkPixbuf *icon) { GST_DEBUG_OBJECT (viewport, "set_icon"); return PGM_ERROR_OK; } static PgmError pgm_bp_viewport_set_size (PgmViewport *viewport, gint width, gint height) { GST_DEBUG_OBJECT (viewport, "set_size"); return PGM_ERROR_OK; } static PgmError pgm_bp_viewport_get_size (PgmViewport *viewport, gint *width, gint *height) { GST_LOG_OBJECT (viewport, "get_size"); return PGM_ERROR_OK; } static PgmError pgm_bp_viewport_set_fullscreen (PgmViewport *viewport, gboolean fullscreen) { GST_DEBUG_OBJECT (viewport, "set_fullscreen"); return PGM_ERROR_OK; } static PgmError pgm_bp_viewport_set_screen_resolution (PgmViewport *viewport, gint width, gint height) { GST_DEBUG_OBJECT (viewport, "set_screen_resolution"); return PGM_ERROR_OK; } static PgmError pgm_bp_viewport_get_screen_resolution (PgmViewport *viewport, gint *width, gint *height) { GST_LOG_OBJECT (viewport, "get_screen_resolution"); /* FIXME: we should store screen resolution and size somewhere in * PgmBpViewport, so that the setters and getters work */ *width = viewport->width; *height = viewport->height; return PGM_ERROR_OK; } static PgmError pgm_bp_viewport_set_screen_size_mm (PgmViewport *viewport, gint width, gint height) { GST_DEBUG_OBJECT (viewport, "set_screen_size_mm"); return PGM_ERROR_OK; } static PgmError pgm_bp_viewport_get_screen_size_mm (PgmViewport *viewport, gint *width, gint *height) { GST_LOG_OBJECT (viewport, "get_screen_size_mm"); *width = viewport->width; *height = viewport->height; return PGM_ERROR_OK; } static PgmError pgm_bp_viewport_set_canvas (PgmViewport *viewport, PgmCanvas *canvas) { GST_DEBUG_OBJECT (viewport, "set_canvas"); return PGM_ERROR_OK; } static PgmError pgm_bp_viewport_get_pixel_formats (PgmViewport *viewport, gulong *formats_mask) { GST_LOG_OBJECT (viewport, "get_pixel_formats"); *formats_mask = PGM_IMAGE_RGB | PGM_IMAGE_BGR | PGM_IMAGE_RGBA | PGM_IMAGE_BGRA | PGM_IMAGE_I420 | PGM_IMAGE_YV12 | PGM_IMAGE_UYVY | PGM_IMAGE_YUYV; return PGM_ERROR_OK; } static PgmError pgm_bp_viewport_get_caps_mask (PgmViewport *viewport, gulong *caps_mask) { GST_DEBUG_OBJECT (viewport, "get_caps_mask"); return PGM_ERROR_OK; } static PgmError pgm_bp_viewport_read_pixels (PgmViewport *viewport, guint x, guint y, guint width, guint height, guint8 *pixels) { GST_DEBUG_OBJECT (viewport, "read_pixels"); pgm_viewport_push_pixels (viewport, width, height, pixels); return PGM_ERROR_OK; } /* GObject stuff */ PGM_DEFINE_DYNAMIC_TYPE (PgmBpViewport, pgm_bp_viewport, PGM_TYPE_VIEWPORT) void pgm_bp_viewport_register (GTypeModule *module) { pgm_bp_viewport_register_type (module); } static void pgm_bp_viewport_dispose (GObject *object) { PgmBpViewport *viewport = PGM_BP_VIEWPORT (object); GST_DEBUG_OBJECT (viewport, "disposing boilerplate viewport"); if (viewport->mutex) g_mutex_free (viewport->mutex); viewport->initialized = FALSE; GST_CALL_PARENT (G_OBJECT_CLASS, dispose, (object)); } static void pgm_bp_viewport_class_init (PgmBpViewportClass *klass) { GObjectClass *gobject_class; PgmViewportClass *viewport_class; parent_class = g_type_class_peek_parent (klass); gobject_class = G_OBJECT_CLASS (klass); viewport_class = PGM_VIEWPORT_CLASS (klass); /* GObject virtual table */ gobject_class->dispose = GST_DEBUG_FUNCPTR (pgm_bp_viewport_dispose); /* PgmViewport virtual table */ viewport_class->set_title = GST_DEBUG_FUNCPTR (pgm_bp_viewport_set_title); viewport_class->set_cursor = GST_DEBUG_FUNCPTR (pgm_bp_viewport_set_cursor); viewport_class->set_icon = GST_DEBUG_FUNCPTR (pgm_bp_viewport_set_icon); viewport_class->set_size = GST_DEBUG_FUNCPTR (pgm_bp_viewport_set_size); viewport_class->get_size = GST_DEBUG_FUNCPTR (pgm_bp_viewport_get_size); viewport_class->set_fullscreen = GST_DEBUG_FUNCPTR (pgm_bp_viewport_set_fullscreen); viewport_class->set_screen_resolution = GST_DEBUG_FUNCPTR (pgm_bp_viewport_set_screen_resolution); viewport_class->get_screen_resolution = GST_DEBUG_FUNCPTR (pgm_bp_viewport_get_screen_resolution); viewport_class->set_screen_size_mm = GST_DEBUG_FUNCPTR (pgm_bp_viewport_set_screen_size_mm); viewport_class->get_screen_size_mm = GST_DEBUG_FUNCPTR (pgm_bp_viewport_get_screen_size_mm); viewport_class->set_canvas = GST_DEBUG_FUNCPTR (pgm_bp_viewport_set_canvas); viewport_class->get_pixel_formats = GST_DEBUG_FUNCPTR (pgm_bp_viewport_get_pixel_formats); viewport_class->get_caps_mask = GST_DEBUG_FUNCPTR (pgm_bp_viewport_get_caps_mask); viewport_class->read_pixels = GST_DEBUG_FUNCPTR (pgm_bp_viewport_read_pixels); } static void pgm_bp_viewport_class_finalize (PgmBpViewportClass *klass) { return; } static void pgm_bp_viewport_init (PgmBpViewport *viewport) { GST_DEBUG_OBJECT (viewport, "initializing boilerplate viewport"); viewport->mutex = g_mutex_new (); } PgmViewport * pgm_bp_viewport_new (void) { return g_object_new (PGM_TYPE_BP_VIEWPORT, NULL); } pigment-0.3.17/plugins/boilerplate/pgmbp.c0000644000175000017500000000331111205034415015413 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment Boilerplate plugin * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include "pgmbpviewport.h" GST_DEBUG_CATEGORY (pgm_bp_debug); #define GST_CAT_DEFAULT pgm_bp_debug static gboolean pgm_bp_init (GTypeModule *module) { GST_DEBUG_CATEGORY_INIT (pgm_bp_debug, "pgm_bp", 0, "Pigment boilerplate viewport"); pgm_bp_viewport_register (module); return TRUE; } static gboolean pgm_bp_shutdown (GTypeModule *module) { return TRUE; } PGM_PLUGIN_DEFINE ( (PgmPluginInitFunc) pgm_bp_init, (PgmPluginShutdownFunc) pgm_bp_shutdown, (PgmPluginCreateFunc) pgm_bp_viewport_new, "boilerplate", VERSION, "A boilerplate viewport used for tests", "LGPL", "https://code.fluendo.com/pigment/trac", "Loïc Molinari " ) pigment-0.3.17/plugins/boilerplate/Makefile.in0000644000175000017500000005320411205034673016223 00000000000000# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = plugins/boilerplate DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/as-compiler-flag.m4 \ $(top_srcdir)/common/m4/as-version.m4 \ $(top_srcdir)/common/m4/check.m4 \ $(top_srcdir)/common/m4/gst-args.m4 \ $(top_srcdir)/common/m4/gst-check.m4 \ $(top_srcdir)/common/m4/gst-error.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/libtool.m4 \ $(top_srcdir)/common/m4/ltoptions.m4 \ $(top_srcdir)/common/m4/ltsugar.m4 \ $(top_srcdir)/common/m4/ltversion.m4 \ $(top_srcdir)/common/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(plugindir)" pluginLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(plugin_LTLIBRARIES) am__DEPENDENCIES_1 = am_libpgmboilerplate_la_OBJECTS = libpgmboilerplate_la-pgmbp.lo \ libpgmboilerplate_la-pgmbpviewport.lo libpgmboilerplate_la_OBJECTS = $(am_libpgmboilerplate_la_OBJECTS) libpgmboilerplate_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(libpgmboilerplate_la_CFLAGS) $(CFLAGS) \ $(libpgmboilerplate_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libpgmboilerplate_la_SOURCES) DIST_SOURCES = $(libpgmboilerplate_la_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAIROXLIB_CFLAGS = @CAIROXLIB_CFLAGS@ CAIROXLIB_LIBS = @CAIROXLIB_LIBS@ CAIRO_CFLAGS = @CAIRO_CFLAGS@ CAIRO_LIBS = @CAIRO_LIBS@ CC = @CC@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXEEXT = @EXEEXT@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ GCOV = @GCOV@ GCOV_CFLAGS = @GCOV_CFLAGS@ GCOV_LIBS = @GCOV_LIBS@ GDKPIXBUFXLIB_CFLAGS = @GDKPIXBUFXLIB_CFLAGS@ GDKPIXBUFXLIB_LIBS = @GDKPIXBUFXLIB_LIBS@ GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@ GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ GST_0_10_13_CFLAGS = @GST_0_10_13_CFLAGS@ GST_0_10_13_LIBS = @GST_0_10_13_LIBS@ GST_10_10_CFLAGS = @GST_10_10_CFLAGS@ GST_10_10_LIBS = @GST_10_10_LIBS@ GST_10_11_CFLAGS = @GST_10_11_CFLAGS@ GST_10_11_LIBS = @GST_10_11_LIBS@ GST_10_12_CFLAGS = @GST_10_12_CFLAGS@ GST_10_12_LIBS = @GST_10_12_LIBS@ GST_10_13_CFLAGS = @GST_10_13_CFLAGS@ GST_10_13_LIBS = @GST_10_13_LIBS@ GST_10_14_CFLAGS = @GST_10_14_CFLAGS@ GST_10_14_LIBS = @GST_10_14_LIBS@ GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ GST_BASE_LIBS = @GST_BASE_LIBS@ GST_CFLAGS = @GST_CFLAGS@ GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ GST_CHECK_LIBS = @GST_CHECK_LIBS@ GST_LIBS = @GST_LIBS@ GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ GST_TOOLS_DIR = @GST_TOOLS_DIR@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_GTK_WIDGET = @HAVE_GTK_WIDGET@ HAVE_IMAGING_LIBRARY = @HAVE_IMAGING_LIBRARY@ HAVE_OPENGLES_PLUGIN = @HAVE_OPENGLES_PLUGIN@ HAVE_OPENGL_PLUGIN = @HAVE_OPENGL_PLUGIN@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGLADE_2_0_CFLAGS = @LIBGLADE_2_0_CFLAGS@ LIBGLADE_2_0_LIBS = @LIBGLADE_2_0_LIBS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENGLES_BACKEND = @OPENGLES_BACKEND@ OPENGL_BACKEND = @OPENGL_BACKEND@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ PANGOCAIRO_CFLAGS = @PANGOCAIRO_CFLAGS@ PANGOCAIRO_LIBS = @PANGOCAIRO_LIBS@ PANGO_1_16_CFLAGS = @PANGO_1_16_CFLAGS@ PANGO_1_16_LIBS = @PANGO_1_16_LIBS@ PANGO_CFLAGS = @PANGO_CFLAGS@ PANGO_LIBS = @PANGO_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL_PATH = @PERL_PATH@ PGM_ALL_CFLAGS = @PGM_ALL_CFLAGS@ PGM_ALL_LDFLAGS = @PGM_ALL_LDFLAGS@ PGM_ALL_LIBS = @PGM_ALL_LIBS@ PGM_GLES_CFLAGS = @PGM_GLES_CFLAGS@ PGM_GLES_LIBS = @PGM_GLES_LIBS@ PGM_GL_CFLAGS = @PGM_GL_CFLAGS@ PGM_GL_LIBS = @PGM_GL_LIBS@ PGM_GTKDOC_CFLAGS = @PGM_GTKDOC_CFLAGS@ PGM_LIB_LDFLAGS = @PGM_LIB_LDFLAGS@ PGM_LT_LDFLAGS = @PGM_LT_LDFLAGS@ PGM_LT_VERSION = @PGM_LT_VERSION@ PGM_MAJORMINOR = @PGM_MAJORMINOR@ PGM_OBJ_CFLAGS = @PGM_OBJ_CFLAGS@ PGM_OBJ_LIBS = @PGM_OBJ_LIBS@ PGM_OPTION_CFLAGS = @PGM_OPTION_CFLAGS@ PGM_PLUGIN_LDFLAGS = @PGM_PLUGIN_LDFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PLUGIN_PATH = @PLUGIN_PATH@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XCOMPOSITE_CFLAGS = @XCOMPOSITE_CFLAGS@ XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ XMKMF = @XMKMF@ XRENDER_CFLAGS = @XRENDER_CFLAGS@ XRENDER_LIBS = @XRENDER_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cairo_req = @cairo_req@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ glib_req = @glib_req@ gstreamer_plugins_base_req = @gstreamer_plugins_base_req@ gstreamer_req = @gstreamer_req@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pango_req = @pango_req@ pangocairo_req = @pangocairo_req@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ plugindir = @PLUGIN_PATH@ plugin_LTLIBRARIES = libpgmboilerplate.la libpgmboilerplate_la_DEPENDENCIES = $(top_builddir)/pgm/libpigment-@PGM_MAJORMINOR@.la libpgmboilerplate_la_SOURCES = \ pgmbp.c \ pgmbpviewport.c libpgmboilerplate_la_CFLAGS = $(PGM_OBJ_CFLAGS) libpgmboilerplate_la_LIBADD = $(PGM_OBJ_LIBS) libpgmboilerplate_la_LDFLAGS = $(PGM_PLUGIN_LDFLAGS) noinst_HEADERS = pgmbpviewport.h CLEANFILES = \ *.gcno \ *.gcda \ *.gcov \ *.gcov.out all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/boilerplate/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/boilerplate/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(plugindir)" || $(MKDIR_P) "$(DESTDIR)$(plugindir)" @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(plugindir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(plugindir)/$$f"; \ else :; fi; \ done uninstall-pluginLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$p'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$p"; \ done clean-pluginLTLIBRARIES: -test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES) @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libpgmboilerplate.la: $(libpgmboilerplate_la_OBJECTS) $(libpgmboilerplate_la_DEPENDENCIES) $(libpgmboilerplate_la_LINK) -rpath $(plugindir) $(libpgmboilerplate_la_OBJECTS) $(libpgmboilerplate_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpgmboilerplate_la-pgmbp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpgmboilerplate_la-pgmbpviewport.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libpgmboilerplate_la-pgmbp.lo: pgmbp.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpgmboilerplate_la_CFLAGS) $(CFLAGS) -MT libpgmboilerplate_la-pgmbp.lo -MD -MP -MF $(DEPDIR)/libpgmboilerplate_la-pgmbp.Tpo -c -o libpgmboilerplate_la-pgmbp.lo `test -f 'pgmbp.c' || echo '$(srcdir)/'`pgmbp.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpgmboilerplate_la-pgmbp.Tpo $(DEPDIR)/libpgmboilerplate_la-pgmbp.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pgmbp.c' object='libpgmboilerplate_la-pgmbp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpgmboilerplate_la_CFLAGS) $(CFLAGS) -c -o libpgmboilerplate_la-pgmbp.lo `test -f 'pgmbp.c' || echo '$(srcdir)/'`pgmbp.c libpgmboilerplate_la-pgmbpviewport.lo: pgmbpviewport.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpgmboilerplate_la_CFLAGS) $(CFLAGS) -MT libpgmboilerplate_la-pgmbpviewport.lo -MD -MP -MF $(DEPDIR)/libpgmboilerplate_la-pgmbpviewport.Tpo -c -o libpgmboilerplate_la-pgmbpviewport.lo `test -f 'pgmbpviewport.c' || echo '$(srcdir)/'`pgmbpviewport.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpgmboilerplate_la-pgmbpviewport.Tpo $(DEPDIR)/libpgmboilerplate_la-pgmbpviewport.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pgmbpviewport.c' object='libpgmboilerplate_la-pgmbpviewport.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpgmboilerplate_la_CFLAGS) $(CFLAGS) -c -o libpgmboilerplate_la-pgmbpviewport.lo `test -f 'pgmbpviewport.c' || echo '$(srcdir)/'`pgmbpviewport.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(plugindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-pluginLTLIBRARIES install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-pluginLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-pluginLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-pluginLTLIBRARIES \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-pluginLTLIBRARIES %.c.gcov: .libs/libpgmboilerplate_la-%.gcda %.c LANG=C $(GCOV) -b -f -o $^ > $@.out gcov: $(libpgmboilerplate_la_SOURCES:=.gcov) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pigment-0.3.17/plugins/boilerplate/pgmbpviewport.h0000644000175000017500000000411411205034415017222 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment Boilerplate plugin * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ #ifndef __PGM_BP_VIEWPORT_H__ #define __PGM_BP_VIEWPORT_H__ #include G_BEGIN_DECLS #define PGM_TYPE_BP_VIEWPORT (pgm_bp_viewport_get_type()) #define PGM_BP_VIEWPORT(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), PGM_TYPE_BP_VIEWPORT, PgmBpViewport)) #define PGM_BP_VIEWPORT_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), PGM_TYPE_BP_VIEWPORT, PgmBpViewportClass)) #define PGM_IS_BP_VIEWPORT(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), PGM_TYPE_BP_VIEWPORT)) #define PGM_IS_BP_VIEWPORT_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), PGM_TYPE_BP_VIEWPORT)) #define PGM_BP_VIEWPORT_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS((obj), PGM_TYPE_BP_VIEWPORT, PgmBpViewportClass)) typedef struct _PgmBpViewport PgmBpViewport; typedef struct _PgmBpViewportClass PgmBpViewportClass; struct _PgmBpViewport { PgmViewport parent; GMutex *mutex; gboolean initialized; }; struct _PgmBpViewportClass { PgmViewportClass parent_class; }; GType pgm_bp_viewport_get_type (void) G_GNUC_CONST; PgmViewport *pgm_bp_viewport_new (void); void pgm_bp_viewport_register (GTypeModule *module); G_END_DECLS #endif /* __PGM_BP_VIEWPORT_H__ */ pigment-0.3.17/plugins/Makefile.in0000644000175000017500000004453011205034673013723 00000000000000# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = plugins DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/as-compiler-flag.m4 \ $(top_srcdir)/common/m4/as-version.m4 \ $(top_srcdir)/common/m4/check.m4 \ $(top_srcdir)/common/m4/gst-args.m4 \ $(top_srcdir)/common/m4/gst-check.m4 \ $(top_srcdir)/common/m4/gst-error.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/libtool.m4 \ $(top_srcdir)/common/m4/ltoptions.m4 \ $(top_srcdir)/common/m4/ltsugar.m4 \ $(top_srcdir)/common/m4/ltversion.m4 \ $(top_srcdir)/common/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = boilerplate opengl opengles DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAIROXLIB_CFLAGS = @CAIROXLIB_CFLAGS@ CAIROXLIB_LIBS = @CAIROXLIB_LIBS@ CAIRO_CFLAGS = @CAIRO_CFLAGS@ CAIRO_LIBS = @CAIRO_LIBS@ CC = @CC@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXEEXT = @EXEEXT@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ GCOV = @GCOV@ GCOV_CFLAGS = @GCOV_CFLAGS@ GCOV_LIBS = @GCOV_LIBS@ GDKPIXBUFXLIB_CFLAGS = @GDKPIXBUFXLIB_CFLAGS@ GDKPIXBUFXLIB_LIBS = @GDKPIXBUFXLIB_LIBS@ GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@ GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ GST_0_10_13_CFLAGS = @GST_0_10_13_CFLAGS@ GST_0_10_13_LIBS = @GST_0_10_13_LIBS@ GST_10_10_CFLAGS = @GST_10_10_CFLAGS@ GST_10_10_LIBS = @GST_10_10_LIBS@ GST_10_11_CFLAGS = @GST_10_11_CFLAGS@ GST_10_11_LIBS = @GST_10_11_LIBS@ GST_10_12_CFLAGS = @GST_10_12_CFLAGS@ GST_10_12_LIBS = @GST_10_12_LIBS@ GST_10_13_CFLAGS = @GST_10_13_CFLAGS@ GST_10_13_LIBS = @GST_10_13_LIBS@ GST_10_14_CFLAGS = @GST_10_14_CFLAGS@ GST_10_14_LIBS = @GST_10_14_LIBS@ GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ GST_BASE_LIBS = @GST_BASE_LIBS@ GST_CFLAGS = @GST_CFLAGS@ GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ GST_CHECK_LIBS = @GST_CHECK_LIBS@ GST_LIBS = @GST_LIBS@ GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ GST_TOOLS_DIR = @GST_TOOLS_DIR@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_GTK_WIDGET = @HAVE_GTK_WIDGET@ HAVE_IMAGING_LIBRARY = @HAVE_IMAGING_LIBRARY@ HAVE_OPENGLES_PLUGIN = @HAVE_OPENGLES_PLUGIN@ HAVE_OPENGL_PLUGIN = @HAVE_OPENGL_PLUGIN@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGLADE_2_0_CFLAGS = @LIBGLADE_2_0_CFLAGS@ LIBGLADE_2_0_LIBS = @LIBGLADE_2_0_LIBS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENGLES_BACKEND = @OPENGLES_BACKEND@ OPENGL_BACKEND = @OPENGL_BACKEND@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ PANGOCAIRO_CFLAGS = @PANGOCAIRO_CFLAGS@ PANGOCAIRO_LIBS = @PANGOCAIRO_LIBS@ PANGO_1_16_CFLAGS = @PANGO_1_16_CFLAGS@ PANGO_1_16_LIBS = @PANGO_1_16_LIBS@ PANGO_CFLAGS = @PANGO_CFLAGS@ PANGO_LIBS = @PANGO_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL_PATH = @PERL_PATH@ PGM_ALL_CFLAGS = @PGM_ALL_CFLAGS@ PGM_ALL_LDFLAGS = @PGM_ALL_LDFLAGS@ PGM_ALL_LIBS = @PGM_ALL_LIBS@ PGM_GLES_CFLAGS = @PGM_GLES_CFLAGS@ PGM_GLES_LIBS = @PGM_GLES_LIBS@ PGM_GL_CFLAGS = @PGM_GL_CFLAGS@ PGM_GL_LIBS = @PGM_GL_LIBS@ PGM_GTKDOC_CFLAGS = @PGM_GTKDOC_CFLAGS@ PGM_LIB_LDFLAGS = @PGM_LIB_LDFLAGS@ PGM_LT_LDFLAGS = @PGM_LT_LDFLAGS@ PGM_LT_VERSION = @PGM_LT_VERSION@ PGM_MAJORMINOR = @PGM_MAJORMINOR@ PGM_OBJ_CFLAGS = @PGM_OBJ_CFLAGS@ PGM_OBJ_LIBS = @PGM_OBJ_LIBS@ PGM_OPTION_CFLAGS = @PGM_OPTION_CFLAGS@ PGM_PLUGIN_LDFLAGS = @PGM_PLUGIN_LDFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PLUGIN_PATH = @PLUGIN_PATH@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XCOMPOSITE_CFLAGS = @XCOMPOSITE_CFLAGS@ XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ XMKMF = @XMKMF@ XRENDER_CFLAGS = @XRENDER_CFLAGS@ XRENDER_LIBS = @XRENDER_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cairo_req = @cairo_req@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ glib_req = @glib_req@ gstreamer_plugins_base_req = @gstreamer_plugins_base_req@ gstreamer_req = @gstreamer_req@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pango_req = @pango_req@ pangocairo_req = @pangocairo_req@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @USE_OPENGL_FALSE@OPENGL_DIR = @USE_OPENGL_TRUE@OPENGL_DIR = opengl @USE_OPENGLES_FALSE@OPENGLES_DIR = @USE_OPENGLES_TRUE@OPENGLES_DIR = opengles SUBDIRS = \ boilerplate \ $(OPENGL_DIR) \ $(OPENGLES_DIR) all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ am__remove_distdir=: \ am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-exec-am: install-html: install-html-recursive install-info: install-info-recursive install-man: install-pdf: install-pdf-recursive install-ps: install-ps-recursive installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ install-strip .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pigment-0.3.17/plugins/opengl/0000777000175000017500000000000011205035134013211 500000000000000pigment-0.3.17/plugins/opengl/pgmgldrawable.h0000644000175000017500000001063011205034416016110 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment OpenGL plugin * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ #ifndef __PGM_GL_DRAWABLE_H__ #define __PGM_GL_DRAWABLE_H__ /* pgmgldrawable.h and pgmglviewport.h include eachother */ typedef struct _PgmGlDrawable PgmGlDrawable; typedef struct _PgmGlDrawableClass PgmGlDrawableClass; #include #include "pgmgldefs.h" #include "pgmglviewport.h" G_BEGIN_DECLS #define PGM_TYPE_GL_DRAWABLE (pgm_gl_drawable_get_type()) #define PGM_GL_DRAWABLE(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), PGM_TYPE_GL_DRAWABLE, PgmGlDrawable)) #define PGM_GL_DRAWABLE_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), PGM_TYPE_GL_DRAWABLE, PgmGlDrawableClass)) #define PGM_IS_GL_DRAWABLE(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), PGM_TYPE_GL_DRAWABLE)) #define PGM_IS_GL_DRAWABLE_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), PGM_TYPE_GL_DRAWABLE)) #define PGM_GL_DRAWABLE_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS((obj), PGM_TYPE_GL_DRAWABLE, PgmGlDrawableClass)) /* (1/255) and (1/255)^2 to avoid successive divisions during conversions */ #define INV_255 0.003921568627f #define SQR_INV_255 0.0000153787f /* Flags */ typedef enum { PGM_GL_DRAWABLE_IDENTITY_MATRIX = (1 << 0) } PgmGlDrawableFlags; struct _PgmGlDrawable { GstObject parent; /* Generic drawable to reflect */ PgmDrawable *drawable; /* GlViewport container */ PgmGlViewport *glviewport; /* Transformation */ PgmMat4x4 *transformation_matrix; /* Id of the handler connected to the "PgmDrawable::changed" signal */ guint change_handler; /* Position and size in viewport coordinates */ gfloat width, height; gfloat x, y, z; /* Background vertex arrays */ PgmGlFloat bg_color[4]; PgmGlFloat bg_vertex[12]; /* Flags */ PgmGlDrawableFlags flags; }; struct _PgmGlDrawableClass { GstObjectClass parent_class; /* virtual methods for subclasses */ void (*sync) (PgmGlDrawable *gldrawable); void (*draw) (PgmGlDrawable *gldrawable); void (*regenerate) (PgmGlDrawable *gldrawable); void (*update_projection) (PgmGlDrawable *gldrawable); void (*set_visibility) (PgmGlDrawable *gldrawable); void (*set_size) (PgmGlDrawable *gldrawable); void (*set_position) (PgmGlDrawable *gldrawable); void (*set_transformation_matrix) (PgmGlDrawable *gldrawable); void (*set_fg_color) (PgmGlDrawable *gldrawable); void (*set_bg_color) (PgmGlDrawable *gldrawable); void (*set_opacity) (PgmGlDrawable *gldrawable); }; GType pgm_gl_drawable_get_type (void) G_GNUC_CONST; void pgm_gl_drawable_register (GTypeModule *module); void pgm_gl_drawable_sync (PgmGlDrawable *gldrawable); void pgm_gl_drawable_draw (PgmGlDrawable *gldrawable); void pgm_gl_drawable_regenerate (PgmGlDrawable *gldrawable); void pgm_gl_drawable_update_projection (PgmGlDrawable *gldrawable); void pgm_gl_drawable_set_visibility (PgmGlDrawable *gldrawable); void pgm_gl_drawable_set_size (PgmGlDrawable *gldrawable); void pgm_gl_drawable_set_position (PgmGlDrawable *gldrawable); void pgm_gl_drawable_set_transformation_matrix (PgmGlDrawable *gldrawable); void pgm_gl_drawable_set_fg_color (PgmGlDrawable *gldrawable); void pgm_gl_drawable_set_bg_color (PgmGlDrawable *gldrawable); void pgm_gl_drawable_set_opacity (PgmGlDrawable *gldrawable); G_END_DECLS #endif /* __PGM_GL_DRAWABLE_H__ */ pigment-0.3.17/plugins/opengl/pgmaglbackend.c0000644000175000017500000007370711205034416016070 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment OpenGL plugin * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Arek Korbik */ /* * OpenGL backend for Mac OS X, using Carbon and AGL. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include "pgmaglbackend.h" GST_DEBUG_CATEGORY_STATIC (pgm_gl_aglbackend_debug); #define GST_CAT_DEFAULT pgm_gl_aglbackend_debug static void set_foreground(); static void init_agl(PgmAglBackend *aglbackend); static void init_opengl_bundle(PgmAglBackend *backend); static void dealloc_opengl_bundle(PgmAglBackend *backend); static void translate_key_event (PgmAglBackend *aglbackend, PgmEventKey *event, EventRef cevent); static pascal OSStatus app_event_handler(EventHandlerCallRef handler, EventRef event, void *user_data); static pascal OSStatus window_event_handler(EventHandlerCallRef handler, EventRef event, void *user_data); static gboolean install_app_event_handler(PgmBackend *backend); static gboolean install_window_event_handler(PgmBackend *backend); static gboolean post_create_window_event(PgmBackend *backend); static gboolean do_create_window(PgmBackend *backend); static gboolean pgm_agl_backend_dispatch_events (PgmBackend *backend); static gboolean timed_dispatch_events (PgmBackend *backend); #define CHECK_MAIN_EVENT_LOOP() \ (GST_DEBUG("!! IN THE MAIN T?: %c (0x%08lx, 0x%08lx)", \ GetCurrentEventLoop() == GetMainEventLoop() ? 'Y' : 'n', \ (unsigned long) GetMainEventLoop(), \ (unsigned long) GetCurrentEventLoop())) static PgmBackendClass *parent_class = NULL; /* Private functions */ static void init_agl(PgmAglBackend *aglbackend) { GSource *to_src; guint ret = 0; GST_DEBUG_OBJECT (aglbackend, "init_agl"); CHECK_MAIN_EVENT_LOOP(); GST_DEBUG("!! numevents: c: %ld, m: %ld", GetNumEventsInQueue(GetCurrentEventQueue()), GetNumEventsInQueue(GetMainEventQueue())); set_foreground(); install_app_event_handler(aglbackend); to_src = g_timeout_source_new(40); g_source_set_callback(to_src, (GSourceFunc) timed_dispatch_events, aglbackend, NULL); GST_DEBUG("ATTACHING!!: %p %p", to_src, PGM_BACKEND(aglbackend)->context); ret = g_source_attach(to_src, PGM_BACKEND(aglbackend)->context->render_context); GST_DEBUG("ATTACHED!!: %u", ret); } static void init_opengl_bundle(PgmAglBackend *backend) { OSStatus err = noErr; CFURLRef bundleURLOpenGL; // FIXME: build the path properly const UInt8 *glpath = "/System/Library/Frameworks/OpenGL.framework"; // l:43 bundleURLOpenGL = CFURLCreateFromFileSystemRepresentation(NULL, glpath, 43, true); if (!bundleURLOpenGL) { GST_ERROR_OBJECT(backend, "Could not create OpenGL Framework bundle URL"); return; } backend->gl_bundle_ref = CFBundleCreate(kCFAllocatorDefault, bundleURLOpenGL); if (!backend->gl_bundle_ref) { GST_ERROR_OBJECT(backend, "Could not create OpenGL Framework bundle"); return; } CFRelease (bundleURLOpenGL); if (!CFBundleLoadExecutable(backend->gl_bundle_ref)) { GST_ERROR_OBJECT(backend, "Could not load Mach-O executable"); return; } //return err; } static void dealloc_opengl_bundle(PgmAglBackend *backend) { if (backend->gl_bundle_ref != NULL) { CFBundleUnloadExecutable (backend->gl_bundle_ref); CFRelease (backend->gl_bundle_ref); backend->gl_bundle_ref = NULL; } } static void set_foreground() { OSStatus err; ProcessSerialNumber psn; GST_DEBUG("set_foreground"); err = GetCurrentProcess(&psn); if (!err) { // long live the "No hidden APIs!" extern int32_t CPSSetProcessName(ProcessSerialNumber * PSN, char *name); GST_DEBUG("enabling foreground operation"); TransformProcessType(&psn, kProcessTransformToForegroundApplication); CPSSetProcessName(&psn, "Pigment app"); SetFrontProcess(&psn); } } static gboolean pgm_agl_backend_dispatch_events (PgmBackend *backend) { OSStatus err = noErr; EventRef theEvent; EventTargetRef theTarget; GST_LOG_OBJECT (backend, "dispatch_events"); CHECK_MAIN_EVENT_LOOP(); theTarget = GetEventDispatcherTarget(); while ((err = ReceiveNextEvent(0, NULL, kEventDurationNoWait, true, &theEvent)) == noErr) { GST_LOG_OBJECT(backend, "!!! DISPATCHING"); SendEventToEventTarget(theEvent, theTarget); ReleaseEvent(theEvent); } if (err != eventLoopTimedOutErr) GST_LOG_OBJECT(backend, "ReceiveNextEvent = %ld", err); return TRUE; } static gboolean timed_dispatch_events (PgmBackend *backend) { OSStatus err = noErr; EventRef theEvent; EventTargetRef theTarget; //GST_DEBUG_OBJECT (backend, "timed_dispatch_events"); //CHECK_MAIN_EVENT_LOOP(); //GST_DEBUG("!! numevents: c: %ld, m: %ld", // GetNumEventsInQueue(GetCurrentEventQueue()), // GetNumEventsInQueue(GetMainEventQueue())); // just call the dispatcher method, but always return TRUE pgm_agl_backend_dispatch_events(backend); return TRUE; } static pascal OSStatus app_event_handler(EventHandlerCallRef handler, EventRef event, void *user_data) { OSStatus err = eventNotHandledErr; Rect rectPort; WindowRef window = FrontWindow(); UInt32 class = GetEventClass(event); UInt32 kind = GetEventKind(event); HICommand command; GST_LOG_OBJECT(user_data, "app_event_handler"); if (window) { GetWindowPortBounds(window, &rectPort); } switch (class) { case kEventClassMouse: //handleWindowMouseEvents(handler, event); break; case kEventClassCommand: switch (kind) { case kEventProcessCommand: GetEventParameter(event, kEventParamDirectObject, kEventParamHICommand, NULL, sizeof(command), NULL, &command); switch (command.commandID) { case kHICommandQuit: QuitApplicationEventLoop(); break; } err = noErr; break; } break; } return err; } static void translate_key_event (PgmAglBackend *aglbackend, PgmEventKey *event, EventRef cevent) { guint32 keycode = 0; UniChar keychar = 0; event->time = GetEventTime(cevent); GetEventParameter(cevent, kEventParamKeyCode, typeUInt32, NULL, sizeof(guint32), NULL, &keycode); GST_WARNING("translate_key_event:: keycode = %ld, 0x%08lx", keycode, keycode); GetEventParameter(cevent, kEventParamKeyUnicodes, typeUnicodeText, NULL, sizeof(UniChar), NULL, &keychar); GST_WARNING("translate_key_event:: keychar = %u, 0x%08x", keychar, keychar); switch (keycode) { case 0x73: // Home event->keyval = 0xff50; break; case 0x74: // Page Up event->keyval = 0xff55; break; case 0x77: // End event->keyval = 0xff57; break; case 0x79: // Page Down event->keyval = 0xff56; break; default: switch (keychar) { case 0x1c: // Left event->keyval = 0xff51; break; case 0x1d: // Right event->keyval = 0xff53; break; case 0x1e: // Up event->keyval = 0xff52; break; case 0x1f: // Down event->keyval = 0xff54; break; case 0x03: // 'mini' return event->keyval = 0xff0d; break; case 0x01: // BOL event->keyval = 0xff58; break; case 0x08: // Backspace case 0x09: // Tab case 0x0a: // Linefeed case 0x0b: // Clear case 0x0d: // Return case 0x1b: // Escape event->keyval = 0xff00 | keychar; break; case 0x7f: // Delete event->keyval = 0xffff; break; default: event->keyval = keychar; } } event->hardware_keycode = keycode; } static pascal OSStatus window_event_handler(EventHandlerCallRef handler, EventRef event, void *user_data) { PgmAglBackend *aglbackend = (PgmAglBackend *) user_data; PgmGlViewport *glviewport = PGM_BACKEND(aglbackend)->context->glviewport; PgmViewport *viewport = PGM_VIEWPORT(glviewport); OSStatus err = eventNotHandledErr; Rect rectPort; WindowRef window = FrontWindow(); UInt32 class = GetEventClass(event); UInt32 kind = GetEventKind(event); PgmEvent *pgmevent = NULL; GST_LOG("window_event_handler"); switch (class) { case kEventClassKeyboard: switch (kind) { case kEventRawKeyDown: GST_LOG("window_event_handler :: kEventRawKeyDown"); pgmevent = pgm_event_new (PGM_KEY_PRESS); translate_key_event (aglbackend, (PgmEventKey *) pgmevent, event); break; case kEventRawKeyRepeat: GST_LOG("window_event_handler :: kEventRawKeyRepeat"); pgmevent = pgm_event_new (PGM_KEY_PRESS); translate_key_event (aglbackend, (PgmEventKey *) pgmevent, event); break; case kEventRawKeyUp: GST_LOG("window_event_handler :: kEventRawKeyUp"); pgmevent = pgm_event_new (PGM_KEY_RELEASE); translate_key_event (aglbackend, (PgmEventKey *) pgmevent, event); break; } break; case kEventClassWindow: GST_LOG("window_event_handler :: kEventClassWindow"); GetEventParameter(event, kEventParamDirectObject, typeWindowRef, NULL, sizeof(WindowRef), NULL, &window); switch (kind) { case kEventWindowCollapsing: //GetWindowPortBounds (window, &rectPort); //drawGL (window, false); // in this case just draw content //CompositeGLBufferIntoWindow(...->ctx, &rectPort, window); //err = UpdateCollapsedWindowDockTile(window); break; case kEventWindowActivated: // called initially and on click activation //... break; case kEventWindowDrawContent: // called before being shown //... break; case kEventWindowClose: // called when window is being closed (close box) //... //HideWindow(window); //TransitionWindow(window, kWindowFadeTransitionEffect, // kWindowHideTransitionAction, NULL); pgmevent = pgm_event_new (PGM_DELETE); break; case kEventWindowBoundsChanged: // called for resize and moves/drags //GetWindowPortBounds(window, &rectPort); //... break; case kEventWindowZoomed: // called after window has been zoomed (zoom // button clicked) break; } break; } if (pgmevent != NULL) pgm_viewport_push_event (viewport, pgmevent); return err; } static gboolean install_app_event_handler(PgmBackend *backend) { OSStatus err; EventHandlerRef ref; EventTypeSpec list[] = {{ kEventClassCommand, kEventProcessCommand }, { kEventClassCommand, kEventCommandUpdateStatus }, { kEventClassMouse, kEventMouseDown }, { kEventClassMouse, kEventMouseUp }, { kEventClassMouse, kEventMouseDragged }, { kEventClassMouse, kEventMouseWheelMoved }}; PgmAglBackend *aglbackend = PGM_AGL_BACKEND (backend); EventQueueRef cqref, mqref; GST_DEBUG_OBJECT (aglbackend, "install_app_event_handler"); cqref = GetCurrentEventQueue(); mqref = GetMainEventQueue(); CHECK_MAIN_EVENT_LOOP(); GST_DEBUG_OBJECT (aglbackend, "numevents: c: %ld, m: %ld", GetNumEventsInQueue(cqref), GetNumEventsInQueue(mqref)); err = InstallApplicationEventHandler(aglbackend->app_event_handler, GetEventTypeCount(list), list, backend, &ref); GST_DEBUG_OBJECT(aglbackend, "InstallApplicationEventHandler() = %ld", err); return TRUE; } static gboolean install_window_event_handler(PgmBackend *backend) { OSStatus err; EventHandlerRef ref; EventTypeSpec list[] = { { kEventClassWindow, kEventWindowCollapsing }, { kEventClassWindow, kEventWindowShown }, { kEventClassWindow, kEventWindowActivated }, { kEventClassWindow, kEventWindowClose }, { kEventClassWindow, kEventWindowDrawContent }, { kEventClassWindow, kEventWindowBoundsChanged }, { kEventClassWindow, kEventWindowZoomed }, { kEventClassKeyboard, kEventRawKeyDown }, { kEventClassKeyboard, kEventRawKeyRepeat }, { kEventClassKeyboard, kEventRawKeyUp } }; PgmAglBackend *aglbackend = PGM_AGL_BACKEND (backend); GST_DEBUG_OBJECT (aglbackend, "install_window_event_handler"); CHECK_MAIN_EVENT_LOOP(); GST_LOG("!! numevents: c: %ld, m: %ld", GetNumEventsInQueue(GetCurrentEventQueue()), GetNumEventsInQueue(GetMainEventQueue())); //GST_WARNING("!! ARE WE IN THE MAIN THREAD?: %c", // GetCurrentEventLoop() == GetMainEventLoop() ? 'Y' : 'n'); err = InstallWindowEventHandler(aglbackend->win, aglbackend->win_event_handler, GetEventTypeCount (list), list, (void*) aglbackend, &ref); // add event handler GST_LOG_OBJECT(aglbackend, "InstallWindowEventHandler() = %ld", err); return TRUE; } static gboolean post_create_window_event(PgmBackend *backend) { OSStatus err; EventRef windowEvent; GST_DEBUG_OBJECT(backend, "posting synthetic event."); err = MacCreateEvent(nil, kEventClassCommand, kEventProcessCommand, 0, kEventAttributeNone, &windowEvent); if (err == noErr) { HICommand command; // set HI command parameter... GST_LOG_OBJECT(backend, "posting synthetic event.."); command.commandID = kHICommandNew; command.attributes = 0; command.menu.menuRef = 0; command.menu.menuItemIndex = 0; err = SetEventParameter(windowEvent, kEventParamDirectObject, kEventParamHICommand, sizeof(command), &command); if (err == noErr) { GST_LOG_OBJECT(backend, "posting synthetic event..."); err = PostEventToQueue(GetCurrentEventQueue(), windowEvent, kEventPriorityHigh); } ReleaseEvent(windowEvent); } return TRUE; } static gboolean do_create_window(PgmBackend *backend) { PgmAglBackend *aglbackend = PGM_AGL_BACKEND(backend); EventHandlerRef ref; EventTypeSpec list[] = { { kEventClassWindow, kEventWindowCollapsing }, { kEventClassWindow, kEventWindowShown }, { kEventClassWindow, kEventWindowActivated }, { kEventClassWindow, kEventWindowClose }, { kEventClassWindow, kEventWindowDrawContent }, { kEventClassWindow, kEventWindowBoundsChanged }, { kEventClassWindow, kEventWindowZoomed }, { kEventClassKeyboard, kEventRawKeyDown }, { kEventClassKeyboard, kEventRawKeyRepeat }, { kEventClassKeyboard, kEventRawKeyUp } }; //WindowRef window = NULL; Rect bounds = {100, 280, 700, 1000}; OSStatus werr = noErr; PgmViewport *viewport; gint width, height; GST_DEBUG_OBJECT (aglbackend, "create_window"); CHECK_MAIN_EVENT_LOOP(); GST_WARNING("!! numevents: c: %ld, m: %ld", GetNumEventsInQueue(GetCurrentEventQueue()), GetNumEventsInQueue(GetMainEventQueue())); viewport = PGM_VIEWPORT (backend->context->glviewport); /**/ pgm_viewport_get_size (viewport, &width, &height); bounds.right = bounds.left + width; bounds.bottom = bounds.top + height; /**/ werr = CreateNewWindow(kDocumentWindowClass, kWindowStandardDocumentAttributes | kWindowCloseBoxAttribute | kWindowFullZoomAttribute | kWindowCollapseBoxAttribute | kWindowResizableAttribute | kWindowStandardHandlerAttribute | kWindowLiveResizeAttribute, &bounds, &aglbackend->win); // build window from scratch if (aglbackend->win) { install_window_event_handler(backend); //ShowWindow(aglbackend->win); //TransitionWindow(aglbackend->win, kWindowFadeTransitionEffect, // kWindowShowTransitionAction, NULL); } else { GST_ERROR_OBJECT (aglbackend, "CreateNewWindow() = %ld", werr); } { /* OpenGL part */ OSStatus err = noErr; Rect rectPort; GLint attrib[] = { AGL_RGBA, AGL_DOUBLEBUFFER, AGL_DEPTH_SIZE, 16, AGL_NONE }; //!pRecContext pContextInfo = GetCurrentContextInfo(window); ProcessSerialNumber psn = { 0, kCurrentProcess }; aglbackend->pixfmt = aglChoosePixelFormat(NULL, 0, attrib); if (aglbackend->pixfmt) aglbackend->ctx = aglCreateContext(aglbackend->pixfmt, NULL); if (aglbackend->pixfmt) { short fNum; GLint swap = 1; CGRect viewRect = {{0.0f, 0.0f}, {0.0f, 0.0f}}; GrafPtr portSave = NULL; GetPort (&portSave); SetPort ((GrafPtr) GetWindowPort(aglbackend->win)); if(!aglSetDrawable(aglbackend->ctx, GetWindowPort(aglbackend->win))) //err = aglReportError(); ; if (!aglSetCurrentContext(aglbackend->ctx)) //err = aglReportError(); ; aglbackend->currentVS = aglGetVirtualScreen(aglbackend->ctx); // sync renderer //aglSetInteger (aglbackend->ctx, AGL_SWAP_INTERVAL, &swap); SetPort (portSave); } } aglbackend->created = TRUE; return TRUE; } /* PgmBackend methods */ static gboolean pgm_agl_backend_create_window (PgmBackend *backend) { PgmAglBackend *aglbackend = PGM_AGL_BACKEND(backend); GST_DEBUG_OBJECT (backend, "create_window"); init_agl(aglbackend); return do_create_window(backend); } static gboolean pgm_agl_backend_destroy_window (PgmBackend *backend) { PgmAglBackend *aglbackend = PGM_AGL_BACKEND(backend); GST_DEBUG_OBJECT (backend, "destroy_window"); if (aglbackend->created) { HideWindow(aglbackend->win); aglSetDrawable(aglbackend->ctx, NULL); aglSetCurrentContext(NULL); aglDestroyContext(aglbackend->ctx); aglDestroyPixelFormat(aglbackend->pixfmt); //FIXME: destroy font lists? //SetWRefCon(aglbackend->win, NULL); DisposeWindow(aglbackend->win); aglbackend->win = NULL; aglbackend->created = FALSE; } return TRUE; } static void pgm_agl_backend_set_title (PgmBackend *backend, const gchar *title) { GST_DEBUG_OBJECT (backend, "set_title"); /* SetWindowTitleWithCFString(aglbackend->win, ...); */ } static gboolean pgm_agl_backend_set_visibility (PgmBackend *backend, gboolean visible) { PgmAglBackend *aglbackend = PGM_AGL_BACKEND(backend); GST_DEBUG_OBJECT (backend, "set_visibility"); if (visible) ShowWindow(aglbackend->win); else HideWindow(aglbackend->win); return TRUE; } static gboolean pgm_agl_backend_set_decorated (PgmBackend *backend, gboolean decorated) { PgmAglBackend *aglbackend = PGM_AGL_BACKEND(backend); GST_DEBUG_OBJECT (backend, "set_decorated"); /* FIXME */ return FALSE; } static void pgm_agl_backend_swap_buffers (PgmBackend *backend) { PgmAglBackend *aglbackend = PGM_AGL_BACKEND(backend); GST_LOG_OBJECT (backend, "swap_buffers"); aglSwapBuffers(aglbackend->ctx); } static gpointer pgm_agl_backend_get_proc_address (PgmBackend *backend, const gchar *proc_name) { PgmAglBackend *aglbackend = PGM_AGL_BACKEND(backend); GST_LOG_OBJECT (backend, "get_proc_address"); return CFBundleGetFunctionPointerForName(aglbackend->gl_bundle_ref, CFStringCreateWithCStringNoCopy(NULL, proc_name, CFStringGetSystemEncoding(), NULL)); } static gboolean pgm_agl_backend_set_size (PgmBackend *backend, gint width, gint height) { PgmAglBackend *aglbackend = PGM_AGL_BACKEND(backend); Rect r; gint diff = 0; GST_DEBUG_OBJECT (backend, "set_size"); GetWindowBounds (aglbackend->win, kWindowContentRgn, &r); diff = r.right - r.left - width; r.left -= diff / 2; r.right = r.left + width; diff = r.bottom - r.top - height; r.top -= diff / 2; r.bottom = r.top + height; SetWindowBounds (aglbackend->win, kWindowContentRgn, &r); return TRUE; } static gboolean pgm_agl_backend_set_fullscreen (PgmBackend *backend, gboolean fullscreen) { PgmAglBackend *aglbackend = PGM_AGL_BACKEND(backend); GST_DEBUG_OBJECT (backend, "set_fullscreen"); if (fullscreen) { SetSystemUIMode(kUIModeAllHidden, kUIOptionAutoShowMenuBar); } else { SetSystemUIMode(kUIModeNormal, 0); } return TRUE; } static void pgm_agl_backend_get_screen_size_mm (PgmBackend *backend, gint *width, gint *height) { PgmAglBackend *aglbackend = PGM_AGL_BACKEND(backend); GST_LOG_OBJECT (backend, "get_screen_size_mm"); *width = aglbackend->size_mm_width; *height = aglbackend->size_mm_height; } static gboolean pgm_agl_backend_set_screen_resolution (PgmBackend *backend, gint width, gint height) { GST_DEBUG_OBJECT (backend, "set_screen_resolution"); return FALSE; } static void pgm_agl_backend_get_screen_resolution (PgmBackend *backend, gint *width, gint *height) { PgmAglBackend *aglbackend = PGM_AGL_BACKEND(backend); GST_LOG_OBJECT (backend, "get_screen_resolution"); *width = aglbackend->resolution_width; *height = aglbackend->resolution_height; } static gboolean pgm_agl_backend_build_text_lists (PgmBackend *backend) { PgmAglBackend *aglbackend = PGM_AGL_BACKEND(backend); PgmContextProcAddress *gl = backend->context->gl; gint first; gint last; short f_num = 0; char f_name_pascal[] = {'\6', 'G', 'e', 'n', 'e', 'v', 'a', '\0'}; GST_DEBUG_OBJECT (backend, "build_text_lists"); aglbackend->text_lists = gl->gen_lists(256); if (!gl->is_list(aglbackend->text_lists)) { GST_WARNING_OBJECT(aglbackend, "unable to build text display lists\n"); return FALSE; } // FIXME: check for errors from GetFNum()...? GetFNum(f_name_pascal, &f_num); first = 0; last = 255; if (aglUseFont(aglbackend->ctx, f_num, bold, 8, first, last - first + 1, aglbackend->text_lists + first)) { glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); } return TRUE; } static gboolean pgm_agl_backend_destroy_text_lists (PgmBackend *backend) { PgmAglBackend *aglbackend = PGM_AGL_BACKEND(backend); PgmContextProcAddress *gl = backend->context->gl; GST_DEBUG_OBJECT (backend, "destroy_text_lists"); if (gl->is_list(aglbackend->text_lists)) gl->delete_lists(aglbackend->text_lists, 256); return TRUE; } static void pgm_agl_backend_raster_text (PgmBackend *backend, const gchar *text, gfloat x, gfloat y, gfloat r, gfloat g, gfloat b) { PgmAglBackend *aglbackend = PGM_AGL_BACKEND (backend); PgmContextProcAddress *gl = backend->context->gl; GST_DEBUG_OBJECT (backend, "raster_text"); gl->load_identity (); gl->bind_texture (PGM_GL_TEXTURE_2D, 0); gl->push_attrib (PGM_GL_LIST_BIT); gl->color_4f (r, g, b, 1.0f); gl->raster_pos_2f (x, y); gl->list_base (aglbackend->text_lists); gl->call_lists (strlen (text), PGM_GL_UNSIGNED_BYTE, (PgmGlUbyte *) text); gl->pop_attrib (); } static void pgm_agl_backend_wait_for_vblank (PgmBackend *backend) { GST_LOG_OBJECT (backend, "wait_for_vblank"); } static void pgm_agl_backend_notify_startup_complete (PgmBackend *backend) { GST_LOG_OBJECT (backend, "notify_startup_complete"); } static gboolean pgm_agl_backend_set_cursor (PgmBackend *backend, PgmViewportCursor cursor) { GST_DEBUG_OBJECT (backend, "set_cursor"); return FALSE; } static gboolean pgm_agl_backend_set_icon (PgmBackend *backend, GdkPixbuf *icon) { GST_DEBUG_OBJECT (backend, "set_icon"); return FALSE; } static void pgm_agl_backend_set_drag_status (PgmBackend *backend, gboolean accept) { GST_LOG_OBJECT (backend, "set_drag_status"); } static gboolean pgm_agl_backend_is_accelerated (PgmBackend *backend) { GST_DEBUG_OBJECT (backend, "is_accelerated"); return FALSE; } static gboolean pgm_agl_backend_is_embeddable (PgmBackend *backend) { PgmAglBackend *aglbackend = PGM_AGL_BACKEND (backend); GST_LOG_OBJECT (backend, "is_embeddable"); /* Not supported yet */ return FALSE; } static void pgm_agl_backend_get_embedding_id (PgmBackend *backend, gulong *embedding_id) { PgmAglBackend *aglbackend = PGM_AGL_BACKEND (backend); GST_LOG_OBJECT (backend, "get_embedding_id"); *embedding_id = 0; } static gboolean pgm_agl_backend_has_alpha_component (PgmBackend *backend) { GST_DEBUG_OBJECT (backend, "has_alpha_component"); return FALSE; } /* GObject stuff */ PGM_DEFINE_DYNAMIC_TYPE (PgmAglBackend, pgm_agl_backend, PGM_TYPE_BACKEND) void pgm_agl_backend_register (GTypeModule *module) { pgm_agl_backend_register_type (module); } static void pgm_agl_backend_dispose (GObject *object) { PgmAglBackend *aglbackend = PGM_AGL_BACKEND (object); GST_DEBUG_OBJECT (aglbackend, "dispose"); pgm_agl_backend_destroy_text_lists(PGM_BACKEND(aglbackend)); if (aglbackend->created) pgm_agl_backend_destroy_window(PGM_BACKEND(aglbackend)); dealloc_opengl_bundle(aglbackend); // FIXME: free handler UPPs GST_CALL_PARENT (G_OBJECT_CLASS, dispose, (object)); } static void pgm_agl_backend_class_init (PgmAglBackendClass *klass) { GObjectClass *gobject_class; PgmBackendClass *backend_class; GST_DEBUG_CATEGORY_INIT (pgm_gl_agl_debug, "pgm_gl_aglbackend", 0, "OpenGL plugin: PgmAglBackend"); parent_class = g_type_class_peek_parent (klass); gobject_class = G_OBJECT_CLASS (klass); backend_class = PGM_BACKEND_CLASS (klass); /* GObject virtual table */ gobject_class->dispose = GST_DEBUG_FUNCPTR (pgm_agl_backend_dispose); /* PgmBackend virtual table */ backend_class->create_window = GST_DEBUG_FUNCPTR (pgm_agl_backend_create_window); backend_class->destroy_window = GST_DEBUG_FUNCPTR (pgm_agl_backend_destroy_window); backend_class->set_title = GST_DEBUG_FUNCPTR (pgm_agl_backend_set_title); backend_class->set_decorated = GST_DEBUG_FUNCPTR (pgm_agl_backend_set_decorated); backend_class->swap_buffers = GST_DEBUG_FUNCPTR (pgm_agl_backend_swap_buffers); backend_class->get_proc_address = GST_DEBUG_FUNCPTR (pgm_agl_backend_get_proc_address); backend_class->set_size = GST_DEBUG_FUNCPTR (pgm_agl_backend_set_size); backend_class->set_fullscreen = GST_DEBUG_FUNCPTR (pgm_agl_backend_set_fullscreen); backend_class->set_visibility = GST_DEBUG_FUNCPTR (pgm_agl_backend_set_visibility); backend_class->get_screen_size_mm = GST_DEBUG_FUNCPTR (pgm_agl_backend_get_screen_size_mm); backend_class->set_screen_resolution = GST_DEBUG_FUNCPTR (pgm_agl_backend_set_screen_resolution); backend_class->get_screen_resolution = GST_DEBUG_FUNCPTR (pgm_agl_backend_get_screen_resolution); backend_class->build_text_lists = GST_DEBUG_FUNCPTR (pgm_agl_backend_build_text_lists); backend_class->destroy_text_lists = GST_DEBUG_FUNCPTR (pgm_agl_backend_destroy_text_lists); backend_class->raster_text = GST_DEBUG_FUNCPTR (pgm_agl_backend_raster_text); backend_class->wait_for_vblank = GST_DEBUG_FUNCPTR (pgm_agl_backend_wait_for_vblank); backend_class->notify_startup_complete = GST_DEBUG_FUNCPTR (pgm_agl_backend_notify_startup_complete); backend_class->set_cursor = GST_DEBUG_FUNCPTR (pgm_agl_backend_set_cursor); backend_class->set_icon = GST_DEBUG_FUNCPTR (pgm_agl_backend_set_icon); backend_class->set_drag_status = GST_DEBUG_FUNCPTR (pgm_agl_backend_set_drag_status); backend_class->is_accelerated = GST_DEBUG_FUNCPTR (pgm_agl_backend_is_accelerated); backend_class->is_embeddable = GST_DEBUG_FUNCPTR (pgm_agl_backend_is_embeddable); backend_class->get_embedding_id = GST_DEBUG_FUNCPTR (pgm_agl_backend_get_embedding_id); backend_class->has_alpha_component = GST_DEBUG_FUNCPTR (pgm_agl_backend_has_alpha_component); } static void pgm_agl_backend_class_finalize (PgmAglBackendClass *klass) { return; } static void pgm_agl_backend_init (PgmAglBackend *aglbackend) { GST_INFO_OBJECT (aglbackend, "init"); aglbackend->win = NULL; aglbackend->pixfmt = NULL; aglbackend->gl_bundle_ref = NULL; aglbackend->created = FALSE; init_opengl_bundle (aglbackend); //set_foreground(); aglbackend->app_event_handler = NewEventHandlerUPP (app_event_handler); aglbackend->win_event_handler = NewEventHandlerUPP (window_event_handler); //install_app_event_handler(aglbackend); } /* Public methods */ PgmBackend * pgm_agl_backend_new (PgmContext *context) { PgmBackend *backend; backend = g_object_new (PGM_TYPE_AGL_BACKEND, NULL); GST_DEBUG_OBJECT (PGM_AGL_BACKEND (backend), "created new aglbackend"); backend->context = context; return backend; } pigment-0.3.17/plugins/opengl/pgmgltext.h0000644000175000017500000001065111205034416015316 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment OpenGL plugin * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author(s): Loïc Molinari * Mirco Müller */ #ifndef __PGM_GL_TEXT_H__ #define __PGM_GL_TEXT_H__ #include #include #include #include "pgmgldrawable.h" G_BEGIN_DECLS #define PGM_TYPE_GL_TEXT (pgm_gl_text_get_type()) #define PGM_GL_TEXT(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), PGM_TYPE_GL_TEXT, PgmGlText)) #define PGM_GL_TEXT_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), PGM_TYPE_GL_TEXT, PgmGlTextClass)) #define PGM_IS_GL_TEXT(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), PGM_TYPE_GL_TEXT)) #define PGM_IS_GL_TEXT_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), PGM_TYPE_GL_TEXT)) #define PGM_GL_TEXT_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS((obj), PGM_TYPE_GL_TEXT, PgmGlTextClass)) typedef struct _PgmGlText PgmGlText; typedef struct _PgmGlTextClass PgmGlTextClass; struct _PgmGlText { PgmGlDrawable parent; /* Pixmap buffer */ guchar *buffer; /* Texture handling */ PgmTexture *texture; /* Pango rendering */ PangoContext *pango_ctx; PangoFontDescription *desc; PangoLayout *layout; /* Cairo backend */ cairo_t *cairo_ctx; cairo_surface_t *surface; cairo_font_options_t *font_options; /* Pixmap size */ guint width, height, size; /* Regeneration boolean */ gboolean size_updated; /* Multi lines */ gboolean multiline; /* Color */ gfloat color[4]; /* Outline conversions */ gfloat outline_color[4]; gfloat outline_width; /* Shadow */ gboolean cast_shadow; gfloat shadow_color[4]; gfloat shadow_offset; gfloat shadow_latitude_factor; gfloat shadow_longitude_factor; /* Vertex arrays */ PgmGlFloat fg_color[4]; PgmGlFloat coord[8]; PgmGlFloat vertex[12]; }; struct _PgmGlTextClass { PgmGlDrawableClass parent_class; }; GType pgm_gl_text_get_type (void) G_GNUC_CONST; PgmGlDrawable *pgm_gl_text_new (PgmDrawable *drawable, PgmGlViewport *glviewport); void pgm_gl_text_register (GTypeModule *module); void pgm_gl_text_set_label (PgmGlText *gltext); void pgm_gl_text_set_markup (PgmGlText *gltext); void pgm_gl_text_set_font_family (PgmGlText *gltext); void pgm_gl_text_set_font_height (PgmGlText *gltext); void pgm_gl_text_set_ellipsize (PgmGlText *gltext); void pgm_gl_text_set_justify (PgmGlText *gltext); void pgm_gl_text_set_alignment (PgmGlText *gltext); void pgm_gl_text_set_wrap (PgmGlText *gltext); void pgm_gl_text_set_gravity (PgmGlText *gltext); void pgm_gl_text_set_stretch (PgmGlText *gltext); void pgm_gl_text_set_style (PgmGlText *gltext); void pgm_gl_text_set_variant (PgmGlText *gltext); void pgm_gl_text_set_weight (PgmGlText *gltext); void pgm_gl_text_set_multiline (PgmGlText *gltext); void pgm_gl_text_set_line_spacing (PgmGlText *gltext); void pgm_gl_text_set_color (PgmGlText *gltext); void pgm_gl_text_set_outline_color (PgmGlText *gltext); void pgm_gl_text_set_outline_width (PgmGlText *gltext); void pgm_gl_text_set_cast_shadow (PgmGlText *gltext); void pgm_gl_text_set_shadow_position (PgmGlText *gltext); void pgm_gl_text_set_shadow_color (PgmGlText *gltext); G_END_DECLS #endif /* __PGM_GL_TEXT_H__ */ pigment-0.3.17/plugins/opengl/Makefile.am0000644000175000017500000000220111205034416015156 00000000000000plugindir = @PLUGIN_PATH@ plugin_LTLIBRARIES = libpgmopengl.la libpgmopengl_la_DEPENDENCIES = $(top_builddir)/pgm/libpigment-@PGM_MAJORMINOR@.la if USE_AGL libpgmopengl_la_SOURCES = \ pgmgl.c \ pgmtexture.c \ pgmcontext.c \ pgmbackend.c \ pgmaglbackend.c \ pgmgldrawable.c \ pgmglviewport.c \ pgmglimage.c \ pgmgltext.c \ pgmprogram.c else libpgmopengl_la_SOURCES = \ pgmgl.c \ pgmtexture.c \ pgmcontext.c \ pgmbackend.c \ pgmglxbackend.c \ pgmgldrawable.c \ pgmglviewport.c \ pgmglimage.c \ pgmgltext.c \ pgmprogram.c endif libpgmopengl_la_CFLAGS = \ $(PGM_OPTION_CFLAGS) \ $(PGM_OBJ_CFLAGS) \ $(PGM_GL_CFLAGS) libpgmopengl_la_LIBADD = \ $(PGM_OBJ_LIBS) \ $(PGM_GL_LIBS) libpgmopengl_la_LDFLAGS = $(PGM_PLUGIN_LDFLAGS) noinst_HEADERS = \ pgmbackend.h \ pgmaglbackend.h \ pgmwglbackend.h \ pgmglxbackend.h \ pgmtexture.h \ pgmcontext.h \ pgmgldefs.h \ pgmgldrawable.h \ pgmglimage.h \ pgmgltext.h \ pgmglviewport.h \ pgmprogram.h CLEANFILES = \ *.gcno \ *.gcda \ *.gcov \ *.gcov.out %.c.gcov: .libs/libpgmopengl_la-%.gcda %.c LANG=C $(GCOV) -b -f -o $^ > $@.out gcov: $(libpgmopengl_la_SOURCES:=.gcov) pigment-0.3.17/plugins/opengl/pgmprogram.c0000644000175000017500000002367411205034416015462 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment OpenGL plugin * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ /* * The plugin uses the ARB_fragment_program extension to access the * per-fragment programmability of the OpenGL pipeline (pixel-shading). We * could have used the "OpenGL Shading Language" but at the time this plugin * is written, the needed extensions have just been integrated in Mesa, and * thus not widely available on systems using DRI drivers. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include /* strlen */ #include /* sprintf */ #include "pgmtexture.h" GST_DEBUG_CATEGORY_EXTERN (pgm_gl_debug); #define GST_CAT_DEFAULT pgm_gl_debug /* fragment program header and footer strings */ #define PROGRAM_HEADER "!!ARBfp1.0" #define PROGRAM_FOOTER "END" /* Program limits checking */ typedef struct { PgmGlEnum query; PgmGlEnum maximum; const gchar *description; } ProgramQuery; /* Limits table */ static ProgramQuery limits[] = { { PGM_GL_PROGRAM_INSTRUCTIONS, PGM_GL_MAX_PROGRAM_INSTRUCTIONS, "total instructions" }, { PGM_GL_PROGRAM_NATIVE_INSTRUCTIONS, PGM_GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS, "native total instructions" }, { PGM_GL_PROGRAM_PARAMETERS, PGM_GL_MAX_PROGRAM_PARAMETERS, "parameter bindings" }, { PGM_GL_PROGRAM_NATIVE_PARAMETERS, PGM_GL_MAX_PROGRAM_NATIVE_PARAMETERS, "native parameter bindings" } #if 0 /* Sadly that needs to be disabled due to a bug in Mesa which returns * uninitialized values in glGetProgramiv for the following limits. */ { PGM_GL_PROGRAM_ALU_INSTRUCTIONS, PGM_GL_MAX_PROGRAM_ALU_INSTRUCTIONS, "ALU instructions" }, { PGM_GL_PROGRAM_TEX_INSTRUCTIONS, PGM_GL_MAX_PROGRAM_TEX_INSTRUCTIONS, "texture instructions" }, { PGM_GL_PROGRAM_TEX_INDIRECTIONS, PGM_GL_MAX_PROGRAM_TEX_INDIRECTIONS, "texture indirections" }, { PGM_GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS, PGM_GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS, "native ALU instructions" }, { PGM_GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS, PGM_GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS, "native texture instructions" }, { PGM_GL_PROGRAM_NATIVE_TEX_INDIRECTIONS, PGM_GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS, "native texture indirections" } #endif }; /* Convert from YV12/I420 planar YCbCr to RGB color space using coefficients * from the ITU-R BT.601 standard for SDTV and the equations detailed in the * book "Video Demystified, 4th Edition". */ static const gchar *per_plane_i420_yv12_rgb_header_string = "OPTION ARB_precision_hint_fastest;" "ATTRIB position = fragment.texcoord[0];"; /* Program meant to run correctly with all OpenGL implementations */ static const gchar *per_plane_i420_yv12_rgb_string = "TEMP color, tmp;" "TEX color, position, texture[0], 2D;" "MAD color, color, 1.164, -0.073;" "TEX tmp.r, position, texture[%s], 2D;" "TEX tmp.g, position, texture[%s], 2D;" "SUB tmp.rg, tmp, { 0.5, 0.5 };" "MAD color.rgb, { 0, -0.391, 2.018 }, tmp.rrra, color;" "MAD color.rgb, { 1.596, -0.813, 0 }, tmp.ggga, color;"; /* Combine the color with the primary vertex color */ static const gchar *primary_color_combine_string = "MUL result.color, fragment.color, color;"; /* Programs and lookup table indexed on the name */ static PgmProgram *per_plane_i420_rgb = NULL; static PgmProgram *per_plane_yv12_rgb = NULL; static PgmProgram *program_table[PGM_PROGRAM_NAME_LAST] = { NULL }; /* OpenGL procedure addresses */ static const PgmContextProcAddress *gl = NULL; /* Private functions */ /* Check if a program exceeds GPU limits */ static gboolean is_over_limits (PgmProgram *program) { gboolean over = FALSE; gint i = 0; gint limit_count; gint value, max; limit_count = sizeof (limits) / sizeof (ProgramQuery); while (!over && i < limit_count) { gl->get_program_iv (PGM_GL_FRAGMENT_PROGRAM, limits[i].query, &value); gl->get_program_iv (PGM_GL_FRAGMENT_PROGRAM, limits[i].maximum, &max); GST_DEBUG ("program %p '%-27s': %d, limit is %d", program, limits[i].description, value, max); if (value >= max) { GST_WARNING ("program %p: too many %s (%d, limit is %d)", program, limits[i].description, value, max); over = TRUE; } i++; } return over; } /* Define the string of the fragment program */ static void set_program_string (PgmProgram *program, const gchar *string) { if (program->string) g_free (program->string); program->string = g_strdup (string); program->string_len = strlen (string); } /* Compile a fragment program */ static gboolean compile_program (PgmProgram *program) { gint error = 0; if (!program->string) { GST_WARNING ("no string to compile\n"); return FALSE; } /* Clean up errors */ while (gl->get_error () != PGM_GL_NO_ERROR); /* Compile the program */ gl->bind_program (PGM_GL_FRAGMENT_PROGRAM, program->id); gl->program_string (PGM_GL_FRAGMENT_PROGRAM, PGM_GL_PROGRAM_FORMAT_ASCII, program->string_len, program->string); /* Check compilation errors */ gl->get_integer_v (PGM_GL_PROGRAM_ERROR_POSITION, &error); if (error != -1) { GST_WARNING ("error at pos %d beginning with '%.40s'\n", error, program->string + error); gl->bind_program (PGM_GL_FRAGMENT_PROGRAM, 0); return FALSE; } /* Validate limits */ if (is_over_limits (program)) { GST_WARNING ("exceeds native resource limits\n"); gl->bind_program (PGM_GL_FRAGMENT_PROGRAM, 0); return FALSE; } #if 0 /* Check the number of local parameters * FIXME: local parameters are currently not used */ gint max; gl->get_integer_v (PGM_GL_FRAGMENT_PROGRAM, PGM_GL_MAX_PROGRAM_LOCAL_PARAMETERS, &max); if (program->local_count > max) { GST_WARNING ("exceeds local parameters limit (%d, limit is %d)\n", program->local_count, max); gl->bind_program (PGM_GL_FRAGMENT_PROGRAM, 0); return FALSE; } #endif return TRUE; } /* Fragment program contructor */ static PgmProgram* new_program (void) { PgmProgram *program = NULL; program = g_slice_new0 (PgmProgram); program->string = NULL; program->string_len = 0; gl->gen_programs (1, &program->id); return program; } /* Fragment program destructor */ static void free_program (PgmProgram *program) { if (program->string) { g_free (program->string); program->string = NULL; program->string_len = 0; } if (program->id) gl->delete_programs (1, &program->id); g_slice_free (PgmProgram, program); } /* Public functions */ gboolean pgm_program_create (PgmContext *context) { gchar buffer[1024]; /* should be enough */ gchar *p; /* The function should be called only once */ if (G_UNLIKELY (gl)) return FALSE; /* Check validity of the context */ if (G_UNLIKELY (!context)) return FALSE; gl = context->gl; if (context->feature_mask & PGM_GL_FEAT_PER_PLANE_YCBCR_PROGRAM) { /* Program converting from per plane I420 to RGB */ per_plane_i420_rgb = new_program (); if (per_plane_i420_rgb) { p = buffer; p += sprintf (p, PROGRAM_HEADER); p += sprintf (p, "%s", per_plane_i420_yv12_rgb_header_string); p += sprintf (p, per_plane_i420_yv12_rgb_string, "1", "2"); p += sprintf (p, "%s", primary_color_combine_string); sprintf (p, PROGRAM_FOOTER); set_program_string (per_plane_i420_rgb, buffer); if (!compile_program (per_plane_i420_rgb)) { free_program (per_plane_i420_rgb); per_plane_i420_rgb = NULL; } } program_table[PGM_PROGRAM_PER_PLANE_I420_RGB] = per_plane_i420_rgb; /* Program converting from per plane YV12 to RGB */ per_plane_yv12_rgb = new_program (); if (per_plane_yv12_rgb) { p = buffer; p += sprintf (p, PROGRAM_HEADER); p += sprintf (p, "%s", per_plane_i420_yv12_rgb_header_string); p += sprintf (p, per_plane_i420_yv12_rgb_string, "2", "1"); p += sprintf (p, "%s", primary_color_combine_string); sprintf (p, PROGRAM_FOOTER); set_program_string (per_plane_yv12_rgb, buffer); if (!compile_program (per_plane_yv12_rgb)) { free_program (per_plane_yv12_rgb); per_plane_yv12_rgb = NULL; } } program_table[PGM_PROGRAM_PER_PLANE_YV12_RGB] = per_plane_yv12_rgb; } return TRUE; } void pgm_program_delete (void) { guint i; for (i = 0; i < PGM_PROGRAM_NAME_LAST; i++) { if (program_table[i]) { free_program (program_table[i]); program_table[i] = NULL; } } gl = NULL; } PgmProgram * pgm_program_get (PgmProgramName name) { return program_table[name]; } void pgm_program_bind (PgmProgram *program) { g_return_if_fail (program != NULL); if (program->id) { gl->enable (PGM_GL_FRAGMENT_PROGRAM); gl->bind_program (PGM_GL_FRAGMENT_PROGRAM, program->id); } } void pgm_program_unbind (void) { gl->disable (PGM_GL_FRAGMENT_PROGRAM); } pigment-0.3.17/plugins/opengl/pgmgl.c0000644000175000017500000000420211205034416014377 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment OpenGL plugin * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include "pgmglviewport.h" #include "pgmglimage.h" #include "pgmgltext.h" #if defined (HAVE_GL_GLX_H) #include "pgmglxbackend.h" #elif defined (HAVE_AGL_AGL_H) #include "pgmaglbackend.h" #elif defined (HAVE_WGL_H) #include "pgmwglbackend.h" #endif GST_DEBUG_CATEGORY (pgm_gl_debug); #define GST_CAT_DEFAULT pgm_gl_debug /* Private functions */ static gboolean pgm_gl_init (GTypeModule *module) { GST_DEBUG_CATEGORY_INIT (pgm_gl_debug, "pgm_gl", 0, "OpenGL plugin"); pgm_gl_drawable_register (module); pgm_gl_image_register (module); pgm_gl_text_register (module); pgm_gl_viewport_register (module); pgm_backend_register (module); #if defined (HAVE_GL_GLX_H) pgm_glx_backend_register (module); #elif defined (HAVE_AGL_AGL_H) pgm_agl_backend_register (module); #elif defined (HAVE_WGL_H) pgm_wgl_backend_register (module); #endif return TRUE; } /* Pigment plugin entry point */ PGM_PLUGIN_DEFINE ( (PgmPluginInitFunc) pgm_gl_init, NULL, (PgmPluginCreateFunc) pgm_gl_viewport_new, "opengl", VERSION, "An OpenGL viewport", "LGPL", "https://code.fluendo.com/pigment/trac", "Loïc Molinari " ) pigment-0.3.17/plugins/opengl/pgmwglbackend.h0000644000175000017500000001031311205034416016103 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment OpenGL plugin * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ #ifndef __PGM_WGL_BACKEND_H__ #define __PGM_WGL_BACKEND_H__ #include #if WINVER >= 0x0600 #include #else #include #endif /* WINVER >= 0x0600 */ #include "pgmbackend.h" G_BEGIN_DECLS #define PGM_TYPE_WGL_BACKEND (pgm_wgl_backend_get_type ()) #define PGM_WGL_BACKEND(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), PGM_TYPE_WGL_BACKEND, PgmWglBackend)) #define PGM_WGL_BACKEND_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), PGM_TYPE_WGL_BACKEND, PgmWglBackendClass)) #define PGM_IS_WGL_BACKEND(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), PGM_TYPE_WGL_BACKEND)) #define PGM_IS_WGL_BACKEND_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), PGM_TYPE_WGL_BACKEND)) #define PGM_WGL_BACKEND_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS((obj), PGM_TYPE_WGL_BACKEND, PgmWglBackendClass)) typedef struct _PgmWglBackend PgmWglBackend; typedef struct _PgmWglBackendClass PgmWglBackendClass; typedef struct _PgmWglBackendSource PgmWglBackendSource; typedef struct _PgmWglBackendProcAddress PgmWglBackendProcAddress; typedef struct _PgmWglBackendDropTarget PgmWglBackendDropTarget; typedef enum { PGM_WGL_FEAT_SWAP_CONTROL = (1 << 0) } PgmWglBackendFeature; typedef enum { PGM_VBLANK_NONE, PGM_VBLANK_SWAP_CONTROL } PgmWglBackendVBlank; struct _PgmWglBackend { PgmBackend parent; /* Window management */ WNDCLASS wc; HWND hwnd; HGLRC hrc; HDC hdc; PIXELFORMATDESCRIPTOR pfd; guint pf; /* WGL extensions */ const gchar *extensions; /* Message source id */ guint message_id; /* Message events filter */ GArray *message_filter; guint message_filter_len; /* WGL features */ guint feature_mask; /* WGL function pointers */ PgmWglBackendProcAddress *wgl; /* Drag-and-drop */ PgmWglBackendDropTarget *droptarget; /* Display lists to rasterize Windows fonts (for debugging purpose) */ guint text_lists; /* Screen informations */ gint resolution_width; gint resolution_height; gint size_mm_width; gint size_mm_height; /* Backed up window position/size */ RECT windowed; /* Current cursor */ HICON cursor; /* Vertical blanking mode */ PgmWglBackendVBlank vblank_mode; /* States */ PgmViewportState state; gboolean created; gboolean never_shown; gboolean hidden; gboolean fullscreen; gboolean decorated; gboolean intel_chipset; }; struct _PgmWglBackendClass { PgmBackendClass parent_class; }; /* Message source */ struct _PgmWglBackendSource { GSource source; GPollFD poll_fd; }; /* WGL function pointers definitions */ typedef gboolean (WINAPI *PgmWglSwapIntervalFunc) (gint interval); /* WGL function pointers used for extensions loading */ struct _PgmWglBackendProcAddress { PgmWglSwapIntervalFunc swap_interval; }; /* IDropTarget wrapper */ struct _PgmWglBackendDropTarget { IDropTarget idt; IDropTargetHelper *idt_helper; PgmWglBackend *wglbackend; gchar **uri; gfloat x, y; gint32 ref_count; gboolean status; }; GType pgm_wgl_backend_get_type (void) G_GNUC_CONST; PgmBackend *pgm_wgl_backend_new (PgmContext *context); void pgm_wgl_backend_register (GTypeModule *module); G_END_DECLS #endif /* __PGM_WGL_BACKEND_H__ */ pigment-0.3.17/plugins/opengl/pgmcontext.c0000644000175000017500000016302611205034416015473 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment OpenGL plugin * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ /* * Context class is used to create and handle the OpenGL context. It retrieves * the capabilities of the OpenGL implementation at runtime and stores the * results in its version, limits and feature mask data. * * It creates a thread dedicated to the rendering. Only this thread communicates * with the native OpenGL libraries for the entire process. It allows the * application side to do blocking operations without stopping the rendering. * * Context handles two task queues for other threads to push operations. The * first queue is used to push tasks that need to be complete as soon as * possible in the rendering thread, the tasks pushed in this queue are called * "immediate tasks". Typical immediate tasks can be for example requests to * change the viewport size or title. The second queue is used to push * tasks that only need to be complete on a viewport update request. Such tasks * are called "deferred tasks". Deferred tasks can be for example texture * uploads or projection matrix updates. The immediate task queue is flushed * each time a task is pushed with the pgm_context_push_immediate_task() * function. The deferred task queue is flushed each time an update is requested * with the pgm_context_update() function. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include "pgmcontext.h" #ifdef G_OS_UNIX #include /* pipe, close */ #endif /* G_OS_UNIX */ #ifdef WIN32 #include #include /* _O_BINARY */ #include /* _pipe */ #define pipe(handle) _pipe(handle, 4096, _O_BINARY) #endif /* WIN32 */ #include /* gl* */ #include /* strlen */ #include /* isdigit */ #include /* tan */ #ifdef HAVE_AGL_AGL_H #include "pgmaglbackend.h" #elif defined HAVE_GL_GLX_H #include "pgmglxbackend.h" #elif defined HAVE_WGL_H #include "pgmwglbackend.h" #endif GST_DEBUG_CATEGORY_EXTERN (pgm_gl_debug); #define GST_CAT_DEFAULT pgm_gl_debug /* Function prototypes */ static void flush_task_queue (PgmContext *context, GList **queue); static void render (PgmContext *context); /* Map OpenGL extension names and feature bits */ typedef struct { const gchar *name; gint feature_mask; } ExtensionMap; /* OpenGL extensions checked at runtime */ static ExtensionMap gl_extensions_map[] = { { "GL_ARB_texture_rectangle", PGM_GL_FEAT_TEXTURE_RECTANGLE }, { "GL_EXT_texture_rectangle", PGM_GL_FEAT_TEXTURE_RECTANGLE }, { "GL_NV_texture_rectangle", PGM_GL_FEAT_TEXTURE_RECTANGLE }, { "GL_ARB_texture_non_power_of_two", PGM_GL_FEAT_TEXTURE_NON_POWER_OF_TWO }, { "GL_ARB_texture_mirrored_repeat", PGM_GL_FEAT_TEXTURE_MIRRORED_REPEAT }, { "GL_ARB_texture_border_clamp", PGM_GL_FEAT_TEXTURE_BORDER_CLAMP }, { "GL_ARB_texture_env_combine", PGM_GL_FEAT_TEXTURE_ENV_COMBINE }, { "GL_EXT_texture_env_combine", PGM_GL_FEAT_TEXTURE_ENV_COMBINE }, { "GL_ARB_texture_env_dot3", PGM_GL_FEAT_TEXTURE_ENV_DOT3 }, { "GL_ARB_multisample", PGM_GL_FEAT_MULTISAMPLE }, { "GL_NV_multisample_filter_hint", PGM_GL_FEAT_MULTISAMPLE_FILTER_HINT }, { "GL_ARB_multitexture", PGM_GL_FEAT_MULTITEXTURE }, { "GL_EXT_multi_draw_arrays", PGM_GL_FEAT_MULTI_DRAW_ARRAYS }, { "GL_ARB_fragment_program", PGM_GL_FEAT_FRAGMENT_PROGRAM }, { "GL_ARB_vertex_buffer_object", PGM_GL_FEAT_VERTEX_BUFFER_OBJECT }, { "GL_ARB_pixel_buffer_object", PGM_GL_FEAT_PIXEL_BUFFER_OBJECT }, { "GL_EXT_pixel_buffer_object", PGM_GL_FEAT_PIXEL_BUFFER_OBJECT }, { "GL_EXT_blend_func_separate", PGM_GL_FEAT_BLEND_FUNC_SEPARATE }, { "GL_EXT_blend_color", PGM_GL_FEAT_BLEND_COLOR }, { "GL_ARB_imaging", PGM_GL_FEAT_BLEND_COLOR }, { "GL_APPLE_packed_pixels", PGM_GL_FEAT_PACKED_PIXELS }, { "GL_EXT_framebuffer_object", PGM_GL_FEAT_FRAMEBUFFER_OBJECT }, { NULL, 0 } }; /* OpenGL functions binding */ static PgmContextProcAddress gl_proc_address = { /* OpenGL 1.2 core functions */ (pgm_gl_enable) glEnable, (pgm_gl_disable) glDisable, (pgm_gl_get_error) glGetError, (pgm_gl_get_string) glGetString, (pgm_gl_begin) glBegin, (pgm_gl_end) glEnd, (pgm_gl_vertex_3f) glVertex3f, (pgm_gl_tex_coord_2f) glTexCoord2f, (pgm_gl_enable_client_state) glEnableClientState, (pgm_gl_disable_client_state) glDisableClientState, (pgm_gl_vertex_pointer) glVertexPointer, (pgm_gl_color_pointer) glColorPointer, (pgm_gl_tex_coord_pointer) glTexCoordPointer, (pgm_gl_draw_arrays) glDrawArrays, (pgm_gl_tex_env_f) glTexEnvf, (pgm_gl_tex_env_fv) glTexEnvfv, (pgm_gl_tex_gen_i) glTexGeni, (pgm_gl_tex_gen_fv) glTexGenfv, (pgm_gl_color_4f) glColor4f, (pgm_gl_color_4fv) glColor4fv, (pgm_gl_scissor) glScissor, (pgm_gl_depth_func) glDepthFunc, (pgm_gl_blend_func) glBlendFunc, (pgm_gl_line_width) glLineWidth, (pgm_gl_clear) glClear, (pgm_gl_clear_color) glClearColor, (pgm_gl_clear_stencil) glClearStencil, (pgm_gl_stencil_func) glStencilFunc, (pgm_gl_stencil_op) glStencilOp, (pgm_gl_push_attrib) glPushAttrib, (pgm_gl_pop_attrib) glPopAttrib, (pgm_gl_matrix_mode) glMatrixMode, (pgm_gl_push_matrix) glPushMatrix, (pgm_gl_pop_matrix) glPopMatrix, (pgm_gl_load_identity) glLoadIdentity, (pgm_gl_load_matrix_f) glLoadMatrixf, (pgm_gl_depth_range) glDepthRange, (pgm_gl_viewport) glViewport, (pgm_gl_raster_pos_2f) glRasterPos2f, (pgm_gl_bitmap) glBitmap, (pgm_gl_read_buffer) glReadBuffer, (pgm_gl_draw_buffer) glDrawBuffer, (pgm_gl_copy_pixels) glCopyPixels, (pgm_gl_flush) glFlush, (pgm_gl_finish) glFinish, (pgm_gl_pixel_store_i) glPixelStorei, (pgm_gl_frustum) glFrustum, (pgm_gl_ortho) glOrtho, (pgm_gl_scale_f) glScalef, (pgm_gl_translate_f) glTranslatef, (pgm_gl_rotate_f) glRotatef, (pgm_gl_is_list) glIsList, (pgm_gl_delete_lists) glDeleteLists, (pgm_gl_gen_lists) glGenLists, (pgm_gl_new_list) glNewList, (pgm_gl_end_list) glEndList, (pgm_gl_call_list) glCallList, (pgm_gl_call_lists) glCallLists, (pgm_gl_list_base) glListBase, (pgm_gl_hint) glHint, (pgm_gl_depth_mask) glDepthMask, (pgm_gl_polygon_mode) glPolygonMode, (pgm_gl_shade_model) glShadeModel, (pgm_gl_color_mask) glColorMask, (pgm_gl_read_pixels) glReadPixels, (pgm_gl_get_tex_image) glGetTexImage, (pgm_gl_tex_sub_image_2d) glTexSubImage2D, (pgm_gl_gen_textures) glGenTextures, (pgm_gl_delete_textures) glDeleteTextures, (pgm_gl_bind_texture) glBindTexture, (pgm_gl_tex_image_2d) glTexImage2D, (pgm_gl_tex_parameter_i) glTexParameteri, (pgm_gl_tex_parameter_fv) glTexParameterfv, (pgm_gl_copy_tex_sub_image_2d) glCopyTexSubImage2D, (pgm_gl_get_integer_v) glGetIntegerv, (pgm_gl_get_float_v) glGetFloatv, /* OpenGL 1.2 extension functions */ (pgm_gl_blend_func_separate) NULL, (pgm_gl_blend_color) NULL, (pgm_gl_active_texture) NULL, (pgm_gl_client_active_texture) NULL, (pgm_gl_multi_draw_arrays) NULL, (pgm_gl_gen_programs) NULL, (pgm_gl_delete_programs) NULL, (pgm_gl_program_string) NULL, (pgm_gl_bind_program) NULL, (pgm_gl_program_local_param_4fv) NULL, (pgm_gl_get_program_iv) NULL, (pgm_gl_gen_buffers) NULL, (pgm_gl_delete_buffers) NULL, (pgm_gl_bind_buffer) NULL, (pgm_gl_buffer_data) NULL, (pgm_gl_buffer_sub_data) NULL, (pgm_gl_get_buffer_sub_data) NULL, (pgm_gl_map_buffer) NULL, (pgm_gl_unmap_buffer) NULL, (pgm_gl_gen_framebuffers) NULL, (pgm_gl_delete_framebuffers) NULL, (pgm_gl_bind_framebuffer) NULL, (pgm_gl_framebuffer_renderbuffer) NULL, (pgm_gl_framebuffer_texture_2d) NULL, (pgm_gl_check_framebuffer_status) NULL, (pgm_gl_gen_renderbuffers) NULL, (pgm_gl_delete_renderbuffers) NULL, (pgm_gl_bind_renderbuffer) NULL, (pgm_gl_renderbuffer_storage) NULL, (pgm_gl_get_renderbuffer_parameter_iv) NULL }; /* Update OpenGL viewport and projection */ static void update_projection (PgmContext *context) { PgmGlViewport *glviewport = context->glviewport; PgmViewport *viewport = PGM_VIEWPORT (glviewport); PgmContextProcAddress *gl = context->gl; gint projected_width, projected_height; gint projected_x, projected_y; PgmMat4x4 *projection, *transpose; /* Retrieve viewport informations with lock */ GST_OBJECT_LOCK (viewport); projected_width = viewport->projected_width; projected_height = viewport->projected_height; projected_x = viewport->projected_x; projected_y = viewport->projected_y; projection = viewport->projection; GST_OBJECT_UNLOCK (viewport); /* Set up viewport */ gl->viewport (projected_x, projected_y, projected_width, projected_height); /* Update projection matrix */ gl->matrix_mode (PGM_GL_PROJECTION); gl->load_identity (); transpose = pgm_mat4x4_transpose (projection); gl->load_matrix_f (transpose->m); pgm_mat4x4_free (transpose); gl->matrix_mode (PGM_GL_MODELVIEW); /* Update all the drawables inside the viewport */ pgm_gl_viewport_update_drawable_projection (glviewport); #if 0 /* Display projection matrix */ PgmGlFloat m[16]; gl->get_float_v (PGM_GL_PROJECTION_MATRIX, m); g_print ("[ %7.2f %7.2f %7.2f %7.2f ]\n[ %7.2f %7.2f %7.2f %7.2f ]\n" "[ %7.2f %7.2f %7.2f %7.2f ]\n[ %7.2f %7.2f %7.2f %7.2f ]\n\n", m[0], m[1], m[2], m[3], m[4], m[5], m[6], m[7], m[8], m[9], m[10], m[11], m[12], m[13], m[14], m[15]); #endif } /* Set up initial OpenGL states */ static void init_opengl_states (PgmContext *context) { PgmContextProcAddress *gl = context->gl; /* Enable texture mapping */ gl->enable (PGM_GL_TEXTURE_2D); /* Disable depth testing */ gl->disable (PGM_GL_DEPTH_TEST); /* Set up standard blending with a different alpha function to correctly * support compositing with the desktop when the alpha clearing color is * available (ARGB visual) */ /* XXX A premuliplied alpha blending should be used instead, but it would * require API and implementation changes in a lot files */ if (context->feature_mask & PGM_GL_FEAT_BLEND_FUNC_SEPARATE) gl->blend_func_separate (PGM_GL_SRC_ALPHA, PGM_GL_ONE_MINUS_SRC_ALPHA, PGM_GL_SRC_ALPHA, PGM_GL_ONE); else gl->blend_func (PGM_GL_SRC_ALPHA, PGM_GL_ONE_MINUS_SRC_ALPHA); gl->enable (PGM_GL_BLEND); } /* Check whether an extension is supported by the OpenGL implementation given * the extension name and the list of supported extensions */ static gboolean has_opengl_extension (const gchar *extensions, const gchar *extension_name) { gchar *end; size_t ext_name_len = strlen (extension_name); gchar *p = (gchar*) extensions; size_t size; if (!extensions) return FALSE; end = p + strlen (p); while (p < end) { size = strcspn (p, " "); if ((ext_name_len == size) && (strncmp (extension_name, p, size) == 0)) return TRUE; p += size + 1; } return FALSE; } /* Retrieve the OpenGL version as a float given the string version */ static gfloat get_float_opengl_version (const gchar *version_string) { gfloat version = 0.0f; gint i; for (i = 0; isdigit (version_string[i]); i++) version = version * 10.0f + (version_string[i] - 48); if (version_string[i++] != '.') return 0.0f; version = version * 10.0f + (version_string[i] - 48); return (version + 0.1f) / 10.0f; } /* Bind the OpenGL extension proc addresses considering OpenGL 1.2 as the * minimal required base. Depending on the run-time OpenGL implementation * version, extensions could be considered as core functionnalities. So * depending on the extension and the version, the logic is to retrieve the * core proc addresses or the extension proc addresses. */ static void bind_opengl_extensions (PgmContext *context) { PgmContextProcAddress *gl = context->gl; /* Blend func separate */ if (context->feature_mask & PGM_GL_FEAT_BLEND_FUNC_SEPARATE) { if (context->version >= 1.4f) gl->blend_func_separate = (pgm_gl_blend_func_separate) pgm_backend_get_proc_address (context->backend, "glBlendFuncSeparate"); else gl->blend_func_separate = (pgm_gl_blend_func_separate) pgm_backend_get_proc_address (context->backend, "glBlendFuncSeparateEXT"); if (!gl->blend_func_separate) context->feature_mask &= ~PGM_GL_FEAT_BLEND_FUNC_SEPARATE; } /* Blend color */ if (context->feature_mask & PGM_GL_FEAT_BLEND_COLOR) { if (context->version >= 1.4f) gl->blend_color = (pgm_gl_blend_color) pgm_backend_get_proc_address (context->backend, "glBlendColor"); else gl->blend_color = (pgm_gl_blend_color) pgm_backend_get_proc_address (context->backend, "glBlendColorEXT"); if (!gl->blend_color) context->feature_mask &= ~PGM_GL_FEAT_BLEND_COLOR; } /* Multi-texturing */ if (context->feature_mask & PGM_GL_FEAT_MULTITEXTURE) { if (context->version >= 1.3f) { gl->active_texture = (pgm_gl_active_texture) pgm_backend_get_proc_address (context->backend, "glActiveTexture"); gl->client_active_texture = (pgm_gl_client_active_texture) pgm_backend_get_proc_address (context->backend, "glClientActiveTexture"); } else { gl->active_texture = (pgm_gl_active_texture) pgm_backend_get_proc_address (context->backend, "glActiveTextureARB"); gl->client_active_texture = (pgm_gl_client_active_texture) pgm_backend_get_proc_address (context->backend, "glClientActiveTextureARB"); } if ((!gl->active_texture) || (!gl->client_active_texture)) context->feature_mask &= ~PGM_GL_FEAT_MULTITEXTURE; } /* Multi draw arrays */ if (context->feature_mask & PGM_GL_FEAT_MULTI_DRAW_ARRAYS) { if (context->version >= 1.4f) gl->multi_draw_arrays = (pgm_gl_multi_draw_arrays) pgm_backend_get_proc_address (context->backend, "glMultiDrawArrays"); else gl->multi_draw_arrays = (pgm_gl_multi_draw_arrays) pgm_backend_get_proc_address (context->backend, "glMultiDrawArraysEXT"); if (!gl->multi_draw_arrays) context->feature_mask &= ~PGM_GL_FEAT_MULTI_DRAW_ARRAYS; } /* Fragment program */ if (context->feature_mask & PGM_GL_FEAT_FRAGMENT_PROGRAM) { gl->gen_programs = (pgm_gl_gen_programs) pgm_backend_get_proc_address (context->backend, "glGenProgramsARB"); gl->delete_programs = (pgm_gl_delete_programs) pgm_backend_get_proc_address (context->backend, "glDeleteProgramsARB"); gl->program_string = (pgm_gl_program_string) pgm_backend_get_proc_address (context->backend, "glProgramStringARB"); gl->bind_program = (pgm_gl_bind_program) pgm_backend_get_proc_address (context->backend, "glBindProgramARB"); gl->program_local_param_4fv = (pgm_gl_program_local_param_4fv) pgm_backend_get_proc_address (context->backend, "glProgramLocalParameter4fvARB"); gl->get_program_iv = (pgm_gl_get_program_iv) pgm_backend_get_proc_address (context->backend, "glGetProgramivARB"); if ((!gl->gen_programs) || (!gl->delete_programs) || (!gl->program_string) || (!gl->bind_program) || (!gl->program_local_param_4fv)) context->feature_mask &= ~PGM_GL_FEAT_FRAGMENT_PROGRAM; } /* VBO and PBO */ if ((context->feature_mask & PGM_GL_FEAT_VERTEX_BUFFER_OBJECT) || (context->feature_mask & PGM_GL_FEAT_PIXEL_BUFFER_OBJECT)) { if (context->version >= 1.5f) { gl->gen_buffers = (pgm_gl_gen_buffers) pgm_backend_get_proc_address (context->backend, "glGenBuffers"); gl->delete_buffers = (pgm_gl_delete_buffers) pgm_backend_get_proc_address (context->backend, "glDeleteBuffers"); gl->bind_buffer = (pgm_gl_bind_buffer) pgm_backend_get_proc_address (context->backend, "glBindBuffer"); gl->buffer_data = (pgm_gl_buffer_data) pgm_backend_get_proc_address (context->backend, "glBufferData"); gl->buffer_sub_data = (pgm_gl_buffer_sub_data) pgm_backend_get_proc_address (context->backend, "glBufferSubData"); gl->get_buffer_sub_data = (pgm_gl_get_buffer_sub_data) pgm_backend_get_proc_address (context->backend, "glGetBufferSubData"); gl->map_buffer = (pgm_gl_map_buffer) pgm_backend_get_proc_address (context->backend, "glMapBuffer"); gl->unmap_buffer = (pgm_gl_unmap_buffer) pgm_backend_get_proc_address (context->backend, "glUnmapBuffer"); } else { gl->gen_buffers = (pgm_gl_gen_buffers) pgm_backend_get_proc_address (context->backend, "glGenBuffersARB"); gl->delete_buffers = (pgm_gl_delete_buffers) pgm_backend_get_proc_address (context->backend, "glDeleteBuffersARB"); gl->bind_buffer = (pgm_gl_bind_buffer) pgm_backend_get_proc_address (context->backend, "glBindBufferARB"); gl->buffer_data = (pgm_gl_buffer_data) pgm_backend_get_proc_address (context->backend, "glBufferDataARB"); gl->buffer_sub_data = (pgm_gl_buffer_sub_data) pgm_backend_get_proc_address (context->backend, "glBufferSubDataARB"); gl->get_buffer_sub_data = (pgm_gl_get_buffer_sub_data) pgm_backend_get_proc_address (context->backend, "glGetBufferSubDataARB"); gl->map_buffer = (pgm_gl_map_buffer) pgm_backend_get_proc_address (context->backend, "glMapBufferARB"); gl->unmap_buffer = (pgm_gl_unmap_buffer) pgm_backend_get_proc_address (context->backend, "glUnmapBufferARB"); } if ((!gl->gen_buffers) || (!gl->delete_buffers) || (!gl->bind_buffer) || (!gl->buffer_data) || (!gl->buffer_sub_data) || (!gl->get_buffer_sub_data) || (!gl->map_buffer) || (!gl->unmap_buffer)) { context->feature_mask &= ~PGM_GL_FEAT_VERTEX_BUFFER_OBJECT; context->feature_mask &= ~PGM_GL_FEAT_PIXEL_BUFFER_OBJECT; } } /* FBO */ if (context->feature_mask & PGM_GL_FEAT_FRAMEBUFFER_OBJECT) { gl->gen_framebuffers = (pgm_gl_gen_framebuffers) pgm_backend_get_proc_address (context->backend, "glGenFramebuffersEXT"); gl->delete_framebuffers = (pgm_gl_delete_framebuffers) pgm_backend_get_proc_address (context->backend, "glDeleteFramebuffersEXT"); gl->bind_framebuffer = (pgm_gl_bind_framebuffer) pgm_backend_get_proc_address (context->backend, "glBindFramebufferEXT"); gl->framebuffer_renderbuffer = (pgm_gl_framebuffer_renderbuffer) pgm_backend_get_proc_address (context->backend, "glFramebufferRenderbufferEXT"); gl->framebuffer_texture_2d = (pgm_gl_framebuffer_texture_2d) pgm_backend_get_proc_address (context->backend, "glFramebufferTexture2DEXT"); gl->check_framebuffer_status = (pgm_gl_check_framebuffer_status) pgm_backend_get_proc_address (context->backend, "glCheckFramebufferStatusEXT"); gl->gen_renderbuffers = (pgm_gl_gen_renderbuffers) pgm_backend_get_proc_address (context->backend, "glGenRenderbuffersEXT"); gl->delete_renderbuffers = (pgm_gl_delete_renderbuffers) pgm_backend_get_proc_address (context->backend, "glDeleteRenderbuffersEXT"); gl->bind_renderbuffer = (pgm_gl_bind_renderbuffer) pgm_backend_get_proc_address (context->backend, "glBindRenderbufferEXT"); gl->renderbuffer_storage = (pgm_gl_renderbuffer_storage) pgm_backend_get_proc_address (context->backend, "glRenderbufferStorageEXT"); gl->get_renderbuffer_parameter_iv = (pgm_gl_get_renderbuffer_parameter_iv) pgm_backend_get_proc_address (context->backend, "glGetRenderbufferParameterivEXT"); if ((!gl->gen_framebuffers) || (!gl->delete_framebuffers) || (!gl->bind_framebuffer) || (!gl->framebuffer_renderbuffer) || (!gl->framebuffer_texture_2d) || (!gl->check_framebuffer_status) || (!gl->gen_renderbuffers) || (!gl->delete_renderbuffers) || (!gl->bind_renderbuffer) || (!gl->renderbuffer_storage) || (!gl->get_renderbuffer_parameter_iv)) context->feature_mask &= ~PGM_GL_FEAT_FRAMEBUFFER_OBJECT; } } /* Compute the frame rate per second */ static void compute_frame_rate (PgmContext *context) { GTimeVal current_time; gfloat elapsed_time; static guint fps = 0; /* Retrieve current time and compute the time elapsed since the last tick */ g_get_current_time (¤t_time); elapsed_time = (current_time.tv_sec - context->fps_tick_time.tv_sec) + (current_time.tv_usec - context->fps_tick_time.tv_usec) * 0.000001f; /* Is the second elapsed? */ if (elapsed_time >= 1.0f) { context->fps = fps; /* Set the new tick time */ context->fps_tick_time.tv_sec = current_time.tv_sec; context->fps_tick_time.tv_usec = current_time.tv_usec; /* Reset the counter */ fps = 0; } fps++; #if 0 /* FIXME: Broken */ { gchar fps_string[16]; /* Build and rasterize the FPS string */ g_snprintf (fps_string, 16, "%d FPS", fps); context->gl->disable (PGM_GL_TEXTURE_2D); pgm_backend_raster_text (context->backend, fps_string, 6.0f, 15.0f, 0.0f, 0.0f, 0.0f); pgm_backend_raster_text (context->backend, fps_string, 5.0f, 14.0f, 1.0f, 1.0f, 1.0f); context->gl->enable (PGM_GL_TEXTURE_2D); } #endif } /* Viewport update task handler */ static void do_projection (PgmContext *context, gpointer data) { update_projection (context); pgm_context_update (context); } /* Size update task handler */ static void do_size (PgmContext *context, gpointer data) { gint width, height; GST_OBJECT_LOCK (context->glviewport); width = PGM_VIEWPORT (context->glviewport)->width; height = PGM_VIEWPORT (context->glviewport)->height; GST_OBJECT_UNLOCK (context->glviewport); pgm_backend_set_size (context->backend, width, height); pgm_context_update (context); } /* Title update task handler */ static void do_title (PgmContext *context, gpointer data) { gchar *title; GST_OBJECT_LOCK (context->glviewport); title = g_strdup (PGM_VIEWPORT (context->glviewport)->title); GST_OBJECT_UNLOCK (context->glviewport); pgm_backend_set_title (context->backend, title); g_free (title); } /* Decoration update task handler */ static void do_decoration (PgmContext *context, gpointer data) { gboolean decorated; GST_OBJECT_LOCK (context->glviewport); decorated = PGM_VIEWPORT (context->glviewport)->decorated; GST_OBJECT_UNLOCK (context->glviewport); pgm_backend_set_decorated (context->backend, decorated); } /* Fullscreen update task handler */ static void do_fullscreen (PgmContext *context, gpointer data) { gboolean fullscreen; GST_OBJECT_LOCK (context->glviewport); fullscreen = PGM_VIEWPORT (context->glviewport)->fullscreen; GST_OBJECT_UNLOCK (context->glviewport); pgm_backend_set_fullscreen (context->backend, fullscreen); pgm_context_update (context); } /* Alpha blending update task handler */ static void do_alpha_blending (PgmContext *context, gpointer data) { gboolean alpha_blending; GST_OBJECT_LOCK (context->glviewport); alpha_blending = PGM_VIEWPORT (context->glviewport)->alpha_blending; GST_OBJECT_UNLOCK (context->glviewport); if (alpha_blending) context->gl->enable (PGM_GL_BLEND); else context->gl->disable (PGM_GL_BLEND); pgm_context_update (context); } /* Resolution update task handler */ static void do_resolution (PgmContext *context, gpointer data) { /* FIXME */ } /* Opacity task handler */ static void do_opacity (PgmContext *context, gpointer data) { gfloat opacity; GST_OBJECT_LOCK (context->glviewport); opacity = PGM_VIEWPORT (context->glviewport)->opacity * INV_255; GST_OBJECT_UNLOCK (context->glviewport); context->gl->clear_color (0.0f, 0.0f, 0.0f, opacity); pgm_context_update (context); } /* Visibility update task handler */ static void do_visibility (PgmContext *context, gpointer data) { static gboolean first = TRUE; gboolean visible; GST_OBJECT_LOCK (context->glviewport); visible = PGM_VIEWPORT (context->glviewport)->visible; GST_OBJECT_UNLOCK (context->glviewport); /* First time window is shown */ if (G_UNLIKELY (first && visible)) { /* The clear color needs an update, to avoid flashes */ do_opacity (context, NULL); pgm_backend_notify_startup_complete (context->backend); first = FALSE; } pgm_backend_set_visibility (context->backend, visible); } /* Iconification update task handler */ static void do_iconification (PgmContext *context, gpointer data) { gboolean iconified; GST_OBJECT_LOCK (context->glviewport); iconified = PGM_VIEWPORT (context->glviewport)->iconified; GST_OBJECT_UNLOCK (context->glviewport); pgm_backend_set_iconified (context->backend, iconified); } /* Focus update task handler */ static void do_focus (PgmContext *context, gpointer data) { pgm_backend_focus (context->backend); } /* Cursor update task handler */ static void do_cursor (PgmContext *context, gpointer data) { PgmViewportCursor cursor; GST_OBJECT_LOCK (context->glviewport); cursor = PGM_VIEWPORT (context->glviewport)->cursor; GST_OBJECT_UNLOCK (context->glviewport); pgm_backend_set_cursor (context->backend, cursor); } /* Icon update task handler */ static void do_icon (PgmContext *context, gpointer data) { GdkPixbuf *icon; GST_OBJECT_LOCK (context->glviewport); icon = PGM_VIEWPORT (context->glviewport)->icon; GST_OBJECT_UNLOCK (context->glviewport); pgm_backend_set_icon (context->backend, icon); } /* Message filter update task handler */ static void do_message_filter (PgmContext *context, gpointer data) { GList *filter; GST_OBJECT_LOCK (context->glviewport); filter = PGM_VIEWPORT (context->glviewport)->message_filter; GST_OBJECT_UNLOCK (context->glviewport); pgm_backend_set_message_filter (context->backend, filter); } /* Drag status update task handler */ static void do_drag_status (PgmContext *context, gpointer data) { pgm_backend_set_drag_status (context->backend, context->glviewport->drag_status); } /* Frame buffer read task handler */ static void do_read_pixels (PgmContext *context, gpointer data) { PgmGlViewportPixelRectangle *rectangle = (PgmGlViewportPixelRectangle*) data; PgmContextProcAddress *gl = context->gl; PgmViewport *viewport = PGM_VIEWPORT (context->glviewport); PgmCanvas *canvas = viewport->canvas; /* Flush the queues ensuring last rendering requests will be completed */ pgm_gl_viewport_flush_update_queue (context->glviewport); flush_task_queue (context, &context->immediate_task); flush_task_queue (context, &context->deferred_task); /* If there's a canvas we need to invert the projection matrix upside-down. * Note that if there's no canvas bound, the pixels area will be black. */ if (G_LIKELY (canvas)) { gl->matrix_mode (PGM_GL_PROJECTION); gl->push_matrix (); gl->scale_f (1.0f, -1.0f, 1.0f); gl->translate_f (0.0f, -canvas->height, 0.0f); gl->matrix_mode (PGM_GL_MODELVIEW); } /* Draw the scene, read it from the back buffer, and clear the back buffer */ render (context); gl->read_buffer (PGM_GL_BACK); gl->read_pixels (rectangle->x, rectangle->y, rectangle->width, rectangle->height, PGM_GL_RGBA, PGM_GL_UNSIGNED_BYTE, rectangle->pixels); gl->clear (PGM_GL_COLOR_BUFFER_BIT); gl->read_buffer (PGM_GL_FRONT); /* Pop our inverted projection matrix if needed */ if (G_LIKELY (canvas)) { gl->matrix_mode (PGM_GL_PROJECTION); gl->pop_matrix (); gl->matrix_mode (PGM_GL_MODELVIEW); } /* Push the read pixels back to the viewport */ pgm_viewport_push_pixels (viewport, rectangle->width, rectangle->height, rectangle->pixels); /* Then finally free the rectangle structure */ g_slice_free (PgmGlViewportPixelRectangle, rectangle); rectangle = NULL; } /* Texture generation task handler */ static void do_gen_texture (PgmContext *context, gpointer data) { pgm_texture_generate (PGM_TEXTURE (data)); } /* Texture clean up task handler */ static void do_clean_texture (PgmContext *context, gpointer data) { pgm_texture_clean (PGM_TEXTURE (data)); } /* Texture upload task handler */ static void do_upload_texture (PgmContext *context, gpointer data) { pgm_texture_upload (PGM_TEXTURE (data)); } /* Texture update task handler */ static void do_update_texture (PgmContext *context, gpointer data) { pgm_texture_update (PGM_TEXTURE (data)); } /* Texture free task handler */ static void do_free_texture (PgmContext *context, gpointer data) { pgm_texture_free (PGM_TEXTURE (data)); } #ifdef HAVE_WGL_H /* On Windows with the Intel 945GM driver, scene rendered with only one texture * with texture data uploaded to video memory are very very slow. Seems like a * bug in the Intel driver. The workaround is to draw an invisible texture * mapped triangle with that card on Windows. */ static void do_intel945gm_black_magic (PgmContext *context) { static PgmGlUint black_magic_tex_id = 0; static PgmGlFloat vertex[9] = { 0.0f }; static PgmGlFloat color[9] = { 0.0f }; PgmContextProcAddress *gl = context->gl; /* Create invisible texture */ if (G_UNLIKELY (black_magic_tex_id == 0)) { gl->gen_textures (1, &black_magic_tex_id); gl->bind_texture (PGM_GL_TEXTURE_2D, black_magic_tex_id); gl->tex_image_2d (PGM_GL_TEXTURE_2D, 0, PGM_GL_RGBA, 8, 8, 0, PGM_GL_RGBA, PGM_GL_UNSIGNED_BYTE, NULL); gl->tex_parameter_i (PGM_GL_TEXTURE_2D, PGM_GL_TEXTURE_MIN_FILTER, PGM_GL_NEAREST); gl->tex_parameter_i (PGM_GL_TEXTURE_2D, PGM_GL_TEXTURE_MAG_FILTER, PGM_GL_NEAREST); } /* Draw invisible texture mapped triangle */ gl->enable_client_state (PGM_GL_VERTEX_ARRAY); gl->enable_client_state (PGM_GL_COLOR_ARRAY); gl->vertex_pointer (3, PGM_GL_FLOAT, 0, vertex); gl->color_pointer (3, PGM_GL_FLOAT, 0, color); gl->bind_texture (PGM_GL_TEXTURE_2D, black_magic_tex_id); gl->draw_arrays (PGM_GL_TRIANGLES, 0, 3); gl->bind_texture (PGM_GL_TEXTURE_2D, 0); gl->disable_client_state (PGM_GL_VERTEX_ARRAY); gl->disable_client_state (PGM_GL_COLOR_ARRAY); } #endif /* HAVE_WGL_H */ /* Copy a layer */ static GList* copy_layer (GList *layer) { GList *new_layer = NULL; if (layer) { GList *last; new_layer = g_slice_new (GList); new_layer->data = g_object_ref (layer->data); new_layer->prev = NULL; last = new_layer; layer = layer->next; while (layer) { last->next = g_slice_new (GList); last->next->prev = last; last = last->next; last->data = g_object_ref (layer->data); layer = layer->next; } last->next = NULL; } return new_layer; } /* Render a layer */ static void render_layer (GList *layer) { GList *walk = layer; while (walk) { PgmGlDrawable *gldrawable = (PgmGlDrawable*) walk->data; pgm_gl_drawable_draw (gldrawable); g_object_unref (gldrawable); walk = walk->next; } g_list_free (layer); } /* Traverse the layers and draw each drawable */ static void render (PgmContext *context) { GList *near_layer, *middle_layer, *far_layer; PgmGlViewport *glviewport = context->glviewport; /* Get copies of the layers */ g_mutex_lock (glviewport->layer_lock); near_layer = copy_layer (glviewport->near_layer); middle_layer = copy_layer (glviewport->middle_layer); far_layer = copy_layer (glviewport->far_layer); g_mutex_unlock (glviewport->layer_lock); /* Then render each drawable of each layer */ render_layer (far_layer); render_layer (middle_layer); render_layer (near_layer); } /* Push a task in a queue removing a similar one if any */ static void push_task (PgmContext *context, GList **queue, PgmContextTask *task) { GList *_queue = *queue; PgmContextTask *queued_task; PGM_CONTEXT_LOCK (context); /* Search and remove a similar task from the queue */ while (_queue) { queued_task = PGM_CONTEXT_TASK (_queue->data); if (queued_task->type == task->type && queued_task->data == task->data) { GList *next = _queue->next; if (_queue->prev) _queue->prev->next = next; else *queue = next; if (next) next->prev = _queue->prev; pgm_context_task_free (PGM_CONTEXT_TASK (_queue->data)); g_list_free_1 (_queue); _queue = NULL; } else _queue = _queue->next; } /* And prepend the task in the queue */ *queue = g_list_prepend (*queue, task); PGM_CONTEXT_UNLOCK (context); } /* Removes all the tasks with the given data from a queue */ static void remove_tasks_with_data (PgmContext *context, GList **queue, gconstpointer data) { GList *_queue = *queue; PGM_CONTEXT_LOCK (context); /* Sequentially search for tasks with the corresponding data and remove * them until the end of the queue */ while (_queue) { if (PGM_CONTEXT_TASK (_queue->data)->data != data) _queue = _queue->next; else { GList *next = _queue->next; if (_queue->prev) _queue->prev->next = next; else *queue = next; if (next) next->prev = _queue->prev; pgm_context_task_free (PGM_CONTEXT_TASK (_queue->data)); g_list_free_1 (_queue); _queue = next; } } PGM_CONTEXT_UNLOCK (context); } /* Frees a task queue with all its remaining tasks */ static void free_task_queue (GList **queue) { GList *walk = *queue; while (walk) { pgm_context_task_free ((PgmContextTask *) walk->data); walk = walk->next; } g_list_free (*queue); *queue = NULL; } /* Flushes a task queue calling the correct handler for each tasks */ static void flush_task_queue (PgmContext *context, GList **queue) { PgmContextTask *task; GList *reversed_queue, *walk; PGM_CONTEXT_LOCK (context); reversed_queue = g_list_reverse (*queue); *queue = NULL; PGM_CONTEXT_UNLOCK (context); walk = reversed_queue; while (walk) { task = PGM_CONTEXT_TASK (walk->data); context->task_func[task->type] (context, task->data); pgm_context_task_free (task); walk = walk->next; } g_list_free (reversed_queue); reversed_queue = NULL; } /* i/o watch callback for immediate tasks */ static gboolean immediate_io_cb (GIOChannel *source, GIOCondition condition, gpointer data) { PgmContext *context = PGM_CONTEXT (data); gchar buf; g_io_channel_read_chars (source, &buf, 1, NULL, NULL); /* Complete the immediate task queue */ flush_task_queue (context, &context->immediate_task); return TRUE; } /* Update source */ static gboolean update_cb (gpointer data) { PgmContext *context = PGM_CONTEXT (data); /* User defined update callback */ pgm_viewport_emit_update_pass (PGM_VIEWPORT (context->glviewport)); /* Check if the viewport has not been disposed in the update pass signal */ if (G_LIKELY (context->glviewport)) { /* Flush update queue */ pgm_gl_viewport_flush_update_queue (context->glviewport); /* Flush rendering queues */ flush_task_queue (context, &context->immediate_task); flush_task_queue (context, &context->deferred_task); /* Render the scene */ render (context); #ifdef HAVE_WGL_H /* The driver for Intel 945GM on Windows needs black magic. See the * do_intel945gm_black_magic function documentation. */ if (context->intel945gm_chipset) do_intel945gm_black_magic (context); #endif /* HAVE_WGL_H */ /* Wait for VSync and swap buffers */ pgm_backend_wait_for_vblank (context->backend); pgm_backend_swap_buffers (context->backend); context->gl->clear (PGM_GL_COLOR_BUFFER_BIT); /* Handle frame rate */ compute_frame_rate (context); return TRUE; } else return FALSE; } /* Update timeout used to remove the update idle after 1 second of inactivity */ static gboolean update_removal_timeout_cb (gpointer data) { PgmContext *context = (PgmContext*) data; GTimeVal current_time; g_get_current_time (¤t_time); g_mutex_lock (context->update_mutex); /* If the elapsed time since the previous update request rises above one * second, remove the auto-update source */ if ((current_time.tv_sec - context->update_timestamp.tv_sec) >= 2 || context->prevent_update) { GSource *source; /* Get the source from the rendering GMainContext and remove it */ source = g_main_context_find_source_by_id (context->render_context, context->update_tag); if (source) g_source_destroy (source); context->update_tag = 0; context->auto_updated = FALSE; context->fps = 0; g_mutex_unlock (context->update_mutex); GST_DEBUG ("removing update source"); /* Remove ourself from the loop */ return FALSE; } g_mutex_unlock (context->update_mutex); return TRUE; } /* Create a pipe and its i/o channels */ static void create_io_channels (gint *fd, GIOChannel **in, GIOChannel **out) { if (pipe (fd) == -1) { GST_ERROR ("cannot create the pipe"); return; } #ifdef WIN32 *in = g_io_channel_win32_new_fd (fd[1]); #else *in = g_io_channel_unix_new (fd[1]); #endif /* WIN32 */ if (!*in) { GST_ERROR ("cannot create the input channel"); return; } #ifdef WIN32 *out = g_io_channel_win32_new_fd (fd[0]); #else *out = g_io_channel_unix_new (fd[0]); #endif /* WIN32 */ if (!*out) { GST_ERROR ("cannot create the output channel"); return; } /* We don't close the fd ourselves because otherwise it deadlocks on windows */ g_io_channel_set_close_on_unref (*in, TRUE); g_io_channel_set_close_on_unref (*out, TRUE); } /* Close a pipe and unref its i/o channels */ static void delete_io_channels (gint *fd, GIOChannel **in, GIOChannel **out) { if (*out) { g_io_channel_unref (*out); *out = NULL; } if (*in) { g_io_channel_unref (*in); *in = NULL; } } /* Write a byte in the given i/o channel */ static inline void write_char (GIOChannel *channel) { if (G_LIKELY (channel)) { g_io_channel_write_chars (channel, "#", 1, NULL, NULL); g_io_channel_flush (channel, NULL); } } /* Add an input watch to a specific context */ static guint add_input_watch (GIOChannel *channel, GIOFunc func, gpointer user_data, GMainContext *context) { GSource *source; guint id; source = g_io_create_watch (channel, G_IO_IN); g_source_set_callback (source, (GSourceFunc) func, user_data, NULL); id = g_source_attach (source, context); g_source_unref (source); return id; } /* Rendering thread entry point, initialize and launch the rendering loop. * FIXME: Correct error handling */ static gpointer render_loop (gpointer data) { PgmContext *context = (PgmContext *) data; PgmContextProcAddress *gl = NULL; const gchar *env_var = NULL; GSource *source; gint i = 0; /* Instantiate correct backend depending on the system at compile-time */ #if defined (HAVE_GL_GLX_H) context->backend = PGM_BACKEND (pgm_glx_backend_new (context)); #elif defined (HAVE_AGL_AGL_H) context->backend = PGM_BACKEND (pgm_agl_backend_new (context)); #elif defined (HAVE_WGL_H) context->backend = PGM_BACKEND (pgm_wgl_backend_new (context)); #endif if (!pgm_backend_create_window (context->backend)) { g_print ("ERROR: couldn't create the window, exiting...\n"); goto error_handler; } context->gl = gl = &gl_proc_address; /* Retrieve renderer informations */ context->version_string = (const gchar *) gl->get_string (PGM_GL_VERSION); context->vendor = (const gchar *) gl->get_string (PGM_GL_VENDOR); context->renderer = (const gchar *) gl->get_string (PGM_GL_RENDERER); context->extensions = (const gchar *) gl->get_string (PGM_GL_EXTENSIONS); /* Add some debug info */ GST_INFO ("OpenGL vendor: %s", context->vendor); GST_INFO ("OpenGL renderer: %s", context->renderer); GST_INFO ("OpenGL version: %s", context->version_string); GST_DEBUG ("OpenGL extensions: %s", context->extensions); /* Check that OpenGL minimum version is 1.2 */ if (!context->version_string) { g_print ("ERROR: couldn't retrieve OpenGL version, exiting...\n"); goto error_handler; } context->version = get_float_opengl_version (context->version_string); if (context->version < 1.2f) { g_print ("ERROR: OpenGL version %.1f (1.2 minimum required), exiting...\n", context->version); goto error_handler; } /* Retrieve and bind supported extensions */ while (gl_extensions_map[i].name) { if (has_opengl_extension (context->extensions, gl_extensions_map[i].name)) context->feature_mask |= gl_extensions_map[i].feature_mask; i++; } #ifdef HAVE_WGL_H /* Windows driver detection for Intel 945GM chipset */ if (!strncmp ("Intel 945GM", context->renderer, 11)) { GST_DEBUG_OBJECT (context, "Setting up the texture workaround for Intel " "945GM chipsets"); context->intel945gm_chipset = TRUE; } #endif /* HAVE_GL_WGL_H */ /* Check in the environment if we have to disable ARB vp/fp */ if (context->feature_mask & PGM_GL_FEAT_FRAGMENT_PROGRAM) { GST_INFO ("OpenGL fragment programs are supported"); env_var = g_getenv ("PGM_GL_PROGRAMS"); if (env_var && '0' == env_var[0]) { GST_INFO ("Deactivating ARB vertex and fragment programs"); context->feature_mask &= ~PGM_GL_FEAT_FRAGMENT_PROGRAM; } } else GST_INFO ("OpenGL fragment programs are not supported"); bind_opengl_extensions (context); /* Maximum POT and NPOT texture size */ gl->get_integer_v (PGM_GL_MAX_TEXTURE_SIZE, &context->max_texture_2d_size); GST_INFO ("OpenGL max texture 2D size: %d", context->max_texture_2d_size); if (context->feature_mask & PGM_GL_FEAT_TEXTURE_RECTANGLE) { gl->get_integer_v (PGM_GL_MAX_RECTANGLE_TEXTURE_SIZE, &context->max_texture_rect_size); GST_INFO ("OpenGL max texture rect size: %d", context->max_texture_rect_size); } /* Pixel store default values */ gl->get_integer_v (PGM_GL_UNPACK_ROW_LENGTH, &context->row_length); gl->get_integer_v (PGM_GL_UNPACK_SKIP_ROWS, &context->skip_rows); gl->get_integer_v (PGM_GL_UNPACK_SKIP_PIXELS, &context->skip_pixels); /* Multi texturing */ if (context->feature_mask & PGM_GL_FEAT_MULTITEXTURE) { gl->get_integer_v (PGM_GL_MAX_TEXTURE_IMAGE_UNITS, &context->max_texture_units); GST_INFO ("OpenGL multitexturing is supported, %d image units", context->max_texture_units); if (context->feature_mask & PGM_GL_FEAT_FRAGMENT_PROGRAM && context->max_texture_units >= 3) { GST_INFO ("OpenGL shader for color space conversions is available"); context->feature_mask |= PGM_GL_FEAT_PER_PLANE_YCBCR_PROGRAM; } } else GST_INFO ("OpenGL multitexturing is not supported"); /* Rasterized text display lists */ pgm_backend_build_text_lists (context->backend); /* Init OpenGL */ init_opengl_states (context); gl->clear (PGM_GL_COLOR_BUFFER_BIT); /* Compile the ARB fragment programs if supported */ if (context->feature_mask & PGM_GL_FEAT_FRAGMENT_PROGRAM) pgm_program_create (context); /* Add the immediate source to the rendering thread GMainContext */ context->immediate_tag = add_input_watch (context->immediate_out, (GIOFunc) immediate_io_cb, context, context->render_context); /* Get the framerate requested by the user in the environment */ env_var = g_getenv ("PGM_GL_FPS"); if (env_var) { gint fps = atoi (env_var); if (fps > 0) { GST_INFO ("Requested FPS: %d", fps); context->requested_fps = 1000 / fps; } } /* Signal application thread that the rendering thread is now initialized */ g_mutex_lock (context->init_mutex); context->initialized = TRUE; g_cond_signal (context->init_cond); g_mutex_unlock (context->init_mutex); /* Enter the main loop */ g_main_loop_run (context->render_loop); /* Dispose immediate source */ source = g_main_context_find_source_by_id (context->render_context, context->immediate_tag); if (source) g_source_destroy (source); delete_io_channels (context->immediate_fd, &context->immediate_in, &context->immediate_out); context->immediate_in = NULL; context->immediate_out = NULL; /* Free the task queues */ free_task_queue (&context->deferred_task); free_task_queue (&context->immediate_task); /* Delete the ARB fragment programs if supported */ if (context->feature_mask & PGM_GL_FEAT_FRAGMENT_PROGRAM) pgm_program_delete (); /* Clean up rendering thread related data */ pgm_backend_destroy_window (context->backend); gst_object_unref (context->backend); /* Signal application thread that the rendering thread is now finalized, * no need to signal if the context is disposed in the rendering thread */ if (context->fini_signal) { g_mutex_lock (context->fini_mutex); context->finalized = TRUE; g_cond_signal (context->fini_cond); g_mutex_unlock (context->fini_mutex); } return NULL; /* FIXME: The current Pigment architecture doesn't allow to correctly report * to the plugin system that the OpenGL context can't be created. At * the moment we shamefully stop the whole process... On Windows it's * been decided to first display a pop-up explaining the issue. */ error_handler: #ifdef HAVE_WGL_H MessageBox (NULL, "This application cannot run on your system. The issue comes " "from either your graphical card which might not be powerful " "enough to support it, or from a lack of graphical driver for " "it to run correctly.", NULL, MB_OK | MB_ICONERROR); #endif /* HAVE_WGL_H */ exit (1); } /* Initialize context creating the rendering thread */ static gboolean init_context (PgmContext *context) { GError *error = NULL; /* Structure access */ context->mutex = g_mutex_new (); /* Context and loop creation */ context->render_context = g_main_context_new (); context->render_loop = g_main_loop_new (context->render_context, FALSE); /* Initialization lock */ context->init_mutex = g_mutex_new (); context->init_cond = g_cond_new (); context->initialized = FALSE; /* Finalization lock */ context->fini_mutex = g_mutex_new (); context->fini_cond = g_cond_new (); context->fini_signal = FALSE; context->finalized = FALSE; /* Immediate task source */ context->immediate_fd[0] = -1; context->immediate_fd[1] = -1; context->immediate_in = NULL; context->immediate_out = NULL; context->immediate_tag = 0; create_io_channels (context->immediate_fd, &context->immediate_in, &context->immediate_out); /* Task queues */ context->immediate_task = NULL; context->deferred_task = NULL; /* Auto-update */ context->update_mutex = g_mutex_new (); context->auto_updated = FALSE; context->prevent_update = FALSE; g_get_current_time (&context->update_timestamp); context->update_tag = 0; context->requested_fps = 0; /* Frame rate */ g_get_current_time (&context->fps_tick_time); context->fps = 0; #ifdef HAVE_WGL_H /* Windows driver for Intel 945GM chipset */ context->intel945gm_chipset = FALSE; #endif /* HAVE_GL_WGL_H */ /* Create rendering thread */ context->render_thread = g_thread_create (render_loop, context, FALSE, &error); if (error != NULL) { GST_ERROR ("couldn't create rendering thread: %s", error->message); return FALSE; } /* Various tasks function binding */ context->task_func[PGM_CONTEXT_PROJECTION] = GST_DEBUG_FUNCPTR (do_projection); context->task_func[PGM_CONTEXT_SIZE] = GST_DEBUG_FUNCPTR (do_size); context->task_func[PGM_CONTEXT_TITLE] = GST_DEBUG_FUNCPTR (do_title); context->task_func[PGM_CONTEXT_DECORATION] = GST_DEBUG_FUNCPTR (do_decoration); context->task_func[PGM_CONTEXT_FULLSCREEN] = GST_DEBUG_FUNCPTR (do_fullscreen); context->task_func[PGM_CONTEXT_VISIBILITY] = GST_DEBUG_FUNCPTR (do_visibility); context->task_func[PGM_CONTEXT_ICONIFICATION] = GST_DEBUG_FUNCPTR (do_iconification); context->task_func[PGM_CONTEXT_FOCUS] = GST_DEBUG_FUNCPTR (do_focus); context->task_func[PGM_CONTEXT_ALPHA_BLENDING] = GST_DEBUG_FUNCPTR (do_alpha_blending); context->task_func[PGM_CONTEXT_RESOLUTION] = GST_DEBUG_FUNCPTR (do_resolution); context->task_func[PGM_CONTEXT_OPACITY] = GST_DEBUG_FUNCPTR (do_opacity); context->task_func[PGM_CONTEXT_CURSOR] = GST_DEBUG_FUNCPTR (do_cursor); context->task_func[PGM_CONTEXT_ICON] = GST_DEBUG_FUNCPTR (do_icon); context->task_func[PGM_CONTEXT_MESSAGE_FILTER] = GST_DEBUG_FUNCPTR (do_message_filter); context->task_func[PGM_CONTEXT_DRAG_STATUS] = GST_DEBUG_FUNCPTR (do_drag_status); context->task_func[PGM_CONTEXT_READ_PIXELS] = GST_DEBUG_FUNCPTR (do_read_pixels); /* Texture related tasks function binding */ context->task_func[PGM_CONTEXT_GEN_TEXTURE] = GST_DEBUG_FUNCPTR (do_gen_texture); context->task_func[PGM_CONTEXT_CLEAN_TEXTURE] = GST_DEBUG_FUNCPTR (do_clean_texture); context->task_func[PGM_CONTEXT_UPLOAD_TEXTURE] = GST_DEBUG_FUNCPTR (do_upload_texture); context->task_func[PGM_CONTEXT_UPDATE_TEXTURE] = GST_DEBUG_FUNCPTR (do_update_texture); context->task_func[PGM_CONTEXT_FREE_TEXTURE] = GST_DEBUG_FUNCPTR (do_free_texture); /* Wait for the rendering thread initialization completion */ g_mutex_lock (context->init_mutex); if (!context->initialized) g_cond_wait (context->init_cond, context->init_mutex); g_mutex_unlock (context->init_mutex); return TRUE; } /* Public functions */ PgmContext * pgm_context_new (PgmGlViewport *glviewport) { PgmContext *context; gboolean initialized; context = g_slice_new0 (PgmContext); context->glviewport = glviewport; initialized = init_context (context); if (!initialized) { g_slice_free (PgmContext, context); context = NULL; } return context; } void pgm_context_free (PgmContext *context) { g_return_if_fail (context != NULL); /* Store whether the context disposition happens in the rendering thread */ context->fini_signal = g_thread_self () != context->render_thread; /* Quit the rendering loop */ g_main_loop_quit (context->render_loop); /* Wait for the rendering thread finalization completion if the context * disposition happens in the rendering thread */ if (context->fini_signal) { g_mutex_lock (context->fini_mutex); if (!context->finalized) g_cond_wait (context->fini_cond, context->fini_mutex); g_mutex_unlock (context->fini_mutex); } /* Free the context */ g_main_loop_unref (context->render_loop); g_main_context_unref (context->render_context); g_mutex_free (context->fini_mutex); g_cond_free (context->fini_cond); g_mutex_free (context->update_mutex); g_mutex_free (context->init_mutex); g_cond_free (context->init_cond); g_mutex_free (context->mutex); g_slice_free (PgmContext, context); } PgmContextTask * pgm_context_task_new (PgmContextTaskType type, gpointer data) { PgmContextTask *task; task = g_slice_new0 (PgmContextTask); task->type = type; task->data = data; return task; } void pgm_context_task_free (PgmContextTask *task) { g_return_if_fail (task != NULL); task->data = NULL; g_slice_free (PgmContextTask, task); } void pgm_context_update (PgmContext *context) { g_return_if_fail (context != NULL); g_mutex_lock (context->update_mutex); /* Get a timestamp of the last update request */ g_get_current_time (&context->update_timestamp); /* Add the auto-update if the rendering loop is stopped */ if (G_UNLIKELY (!context->auto_updated)) { GSource *source; /* Don't add the update source if it's been asked to prevent it */ if (G_UNLIKELY (context->prevent_update)) goto no_update; /* Add the update source to the rendering GMainContext. If the user has * not specified a framerate through the PGM_GL_FPS environment * variable, an idle source blocked on the vsync is attached. Otherwise, * a timeout source with the specified framerate is attached. */ if (G_LIKELY (context->requested_fps == 0)) { GST_DEBUG ("adding update idle source"); source = g_idle_source_new (); g_source_set_priority ((GSource*) source, G_PRIORITY_DEFAULT); } else { GST_DEBUG ("adding update timeout source"); source = g_timeout_source_new (context->requested_fps); } g_source_set_callback (source, update_cb, context, NULL); context->update_tag = g_source_attach (source, context->render_context); g_source_unref (source); /* Add the update removal timeout to the rendering GMainContext */ source = g_timeout_source_new (750); g_source_set_callback (source, update_removal_timeout_cb, context, NULL); g_source_attach (source, context->render_context); g_source_unref (source); /* Mark the render loop as auto-updated */ context->auto_updated = TRUE; } no_update: g_mutex_unlock (context->update_mutex); } void pgm_context_push_immediate_task (PgmContext *context, PgmContextTask *task) { g_return_if_fail (context != NULL); push_task (context, &context->immediate_task, task); write_char (context->immediate_in); } void pgm_context_push_deferred_task (PgmContext *context, PgmContextTask *task) { g_return_if_fail (context != NULL); push_task (context, &context->deferred_task, task); } void pgm_context_remove_tasks_with_data (PgmContext *context, gconstpointer data) { g_return_if_fail (context != NULL); remove_tasks_with_data (context, &context->immediate_task, data); remove_tasks_with_data (context, &context->deferred_task, data); } void pgm_context_prevent_update (PgmContext *context, gboolean prevent) { g_mutex_lock (context->update_mutex); context->prevent_update = prevent; g_mutex_unlock (context->update_mutex); } /* FIXME */ void pgm_context_dump_features (PgmContext *context) { g_return_if_fail (context != NULL); } pigment-0.3.17/plugins/opengl/pgmglviewport.c0000644000175000017500000013342211205034416016206 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment OpenGL plugin * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ /* * The plugin duplicates all "generic" Pigment drawables in GL drawables. The * GL drawables are stored in layer (lists) inside the GL viewport object. The * generic layers are duplicated when the user calls pgm_viewport_set_canvas(). * The duplicated GL drawables are deleted when the canvas is disposed, when * another canvas is bound or when NULL is bound. The GL Viewport is connected * to the Canvas 'added' and 'removed' signals so that it can update the GL * drawable layers to reflect the "generic" one. * * The link between the "generic" and the GL drawable is done through a * dedicated hash-table using the "generic" drawable address as the key and the * GL drawable address as the value. When a "generic" drawable property changes, * it emits the 'changed' signal to which the Gl Viewport is connected. The * handler stores the change as a task in an update queue which is flushed * during the automatic update done in the rendering thread in PgmContext. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include "pgmglviewport.h" #include "pgmglimage.h" #include "pgmgltext.h" GST_DEBUG_CATEGORY_STATIC (pgm_gl_viewport_debug); #define GST_CAT_DEFAULT pgm_gl_viewport_debug /* Task types */ typedef enum { TASK_CHANGE, TASK_REORDER, TASK_ADD, TASK_REMOVE, TASK_REGENERATE, LAST_TASK } TaskType; /* Change task */ typedef struct { TaskType type; PgmGlDrawable *gldrawable; PgmDrawableProperty property; } TaskChange; /* Reorder task */ typedef struct { TaskType type; PgmGlDrawable *drawable; PgmDrawableLayer layer; guint order; } TaskReorder; /* Add task */ typedef struct { TaskType type; PgmDrawable *drawable; PgmDrawableLayer layer; guint order; } TaskAdd; /* Remove task */ typedef struct { TaskType type; PgmDrawable *drawable; PgmDrawableLayer layer; } TaskRemove; /* Any task */ typedef struct { TaskType type; } TaskAny; /* Task */ typedef union { TaskType type; TaskAny any; TaskChange change; TaskReorder reorder; TaskAdd add; TaskRemove remove; } Task; /* Task function type definition */ typedef void (*TaskFunc) (PgmGlViewport *glviewport, Task *task); /* Task function prototypes */ static void do_task_change (PgmGlViewport *glviewport, Task *task); static void do_task_reorder (PgmGlViewport *glviewport, Task *task); static void do_task_add (PgmGlViewport *glviewport, Task *task); static void do_task_remove (PgmGlViewport *glviewport, Task *task); static void do_task_regenerate (PgmGlViewport *glviewport, Task *task); /* Callback prototypes */ static void changed_cb (PgmDrawable *drawable, PgmDrawableProperty property, gpointer data); /* Task function array */ static TaskFunc task_func[LAST_TASK] = { do_task_change, do_task_reorder, do_task_add, do_task_remove, do_task_regenerate }; static PgmViewportClass *parent_class = NULL; /* Private functions */ /* Copy a layer taking a ref on each drawable */ static GList* copy_layer (GList *layer) { GList *new_layer = NULL; if (layer) { GList *last; new_layer = g_slice_new (GList); new_layer->data = g_object_ref (layer->data); new_layer->prev = NULL; last = new_layer; layer = layer->next; while (layer) { last->next = g_slice_new (GList); last->next->prev = last; last = last->next; last->data = g_object_ref (layer->data); layer = layer->next; } last->next = NULL; } return new_layer; } /* Create a change task */ static Task* task_change_new (PgmGlDrawable *gldrawable, PgmDrawableProperty property) { Task *task; task = g_slice_new (Task); task->change.type = TASK_CHANGE; task->change.gldrawable = gst_object_ref (gldrawable); task->change.property = property; return task; } /* Free a change task */ static void task_change_free (Task *task) { g_return_if_fail (task != NULL); gst_object_unref (task->change.gldrawable); g_slice_free (Task, task); } /* Create a reorder task */ static Task* task_reorder_new (PgmDrawable *drawable, PgmDrawableLayer layer, guint order) { Task *task; task = g_slice_new (Task); task->reorder.type = TASK_REORDER; task->reorder.drawable = gst_object_ref (drawable); task->reorder.layer = layer; task->reorder.order = order; return task; } /* Free a reorder task */ static void task_reorder_free (Task *task) { g_return_if_fail (task != NULL); gst_object_unref (task->reorder.drawable); g_slice_free (Task, task); } /* Create a add task */ static Task* task_add_new (PgmDrawable *drawable, PgmDrawableLayer layer, guint order) { Task *task; task = g_slice_new (Task); task->add.type = TASK_ADD; task->add.drawable = gst_object_ref (drawable); task->add.layer = layer; task->add.order = order; return task; } /* Free a add task */ static void task_add_free (Task *task) { g_return_if_fail (task != NULL); gst_object_unref (task->add.drawable); g_slice_free (Task, task); } /* Create a remove task */ static Task* task_remove_new (PgmDrawable *drawable, PgmDrawableLayer layer) { Task *task; task = g_slice_new (Task); task->remove.type = TASK_REMOVE; task->remove.drawable = gst_object_ref (drawable); task->remove.layer = layer; return task; } /* Free a remove task */ static void task_remove_free (Task *task) { g_return_if_fail (task != NULL); gst_object_unref (task->remove.drawable); g_slice_free (Task, task); } /* Create a new generic task */ static Task* task_any_new (TaskType type) { Task *task; task = g_slice_new (Task); task->any.type = type; return task; } /* Create a new generic task */ static void task_any_free (Task *task) { g_slice_free (Task, task); } /* Free a generic task guessing the type */ static void task_free (Task *task) { switch (task->type) { case TASK_CHANGE: task_change_free (task); break; case TASK_REORDER: task_reorder_free (task); break; case TASK_ADD: task_add_free (task); break; case TASK_REMOVE: task_remove_free (task); break; default: task_any_free (task); break; } } /* Create a GL drawable from a generic drawable */ static PgmGlDrawable* gl_drawable_new (PgmGlViewport *glviewport, PgmDrawable *drawable) { PgmGlDrawable *gldrawable = NULL; /* Create the GlDrawable depending on the type */ if (PGM_IS_IMAGE (drawable)) { gldrawable = pgm_gl_image_new (drawable, glviewport); GST_DEBUG_OBJECT (glviewport, "created %s", GST_OBJECT_NAME (gldrawable)); } else if (PGM_IS_TEXT (drawable)) { gldrawable = pgm_gl_text_new (drawable, glviewport); GST_DEBUG_OBJECT (glviewport, "created %s", GST_OBJECT_NAME (gldrawable)); } else { gldrawable = NULL; GST_WARNING_OBJECT (glviewport, "cannot create object from this type"); } /* Make it easily retrievable */ if (gldrawable) { GST_OBJECT_LOCK (glviewport); g_hash_table_insert (glviewport->drawable_hash, drawable, gldrawable); GST_OBJECT_UNLOCK (glviewport); } return gldrawable; } /* Free a GL drawable */ static void gl_drawable_free (PgmGlViewport *glviewport, PgmGlDrawable *gldrawable) { GSList *walk, *tmp; Task *task; if (gldrawable == NULL) return; /* Disconnect from the 'changed' signal and remove it from the hash */ GST_OBJECT_LOCK (glviewport); GST_OBJECT_LOCK (gldrawable->drawable); g_signal_handler_disconnect (gldrawable->drawable, gldrawable->change_handler); g_hash_table_remove (glviewport->drawable_hash, gldrawable->drawable); GST_OBJECT_UNLOCK (gldrawable->drawable); GST_OBJECT_UNLOCK (glviewport); /* Remove the gldrawable from the update queue */ g_mutex_lock (glviewport->update_lock); walk = glviewport->update_queue; while (walk) { tmp = walk->next; task = walk->data; /* Remove it only if it's a task dealing with gldrawable */ if (task->type == TASK_CHANGE) { if (task->change.gldrawable == gldrawable) { glviewport->update_queue = g_slist_delete_link (glviewport->update_queue, walk); task_change_free (task); } } walk = tmp; } g_mutex_unlock (glviewport->update_lock); /* Then delete it */ GST_DEBUG_OBJECT (glviewport, "unreferencing %s", GST_OBJECT_NAME (gldrawable)); gst_object_unref (gldrawable); } /* Complete a change task and free it */ static void do_task_change (PgmGlViewport *glviewport, Task *task) { PgmGlViewportClass *klass = PGM_GL_VIEWPORT_GET_CLASS (glviewport); klass->changed_func[task->change.property] (task->change.gldrawable); task_change_free (task); } /* Complete a reorder task and free it */ static void do_task_reorder (PgmGlViewport *glviewport, Task *task) { PgmGlDrawable *gldrawable; GST_OBJECT_LOCK (glviewport); gldrawable = g_hash_table_lookup (glviewport->drawable_hash, task->reorder.drawable); GST_OBJECT_UNLOCK (glviewport); if (!gldrawable) goto removed; g_mutex_lock (glviewport->layer_lock); switch (task->reorder.layer) { case PGM_DRAWABLE_NEAR: glviewport->near_layer = g_list_remove (glviewport->near_layer, gldrawable); glviewport->near_layer = g_list_insert (glviewport->near_layer, gldrawable, task->reorder.order); break; case PGM_DRAWABLE_MIDDLE: glviewport->middle_layer = g_list_remove (glviewport->middle_layer, gldrawable); glviewport->middle_layer = g_list_insert (glviewport->middle_layer, gldrawable, task->reorder.order); break; case PGM_DRAWABLE_FAR: glviewport->far_layer = g_list_remove (glviewport->far_layer, gldrawable); glviewport->far_layer = g_list_insert (glviewport->far_layer, gldrawable, task->reorder.order); break; default: break; } g_mutex_unlock (glviewport->layer_lock); removed: task_reorder_free (task); } /* Complete a add task and free it */ static void do_task_add (PgmGlViewport *glviewport, Task *task) { PgmGlDrawable *gldrawable; gldrawable = gl_drawable_new (glviewport, task->add.drawable); g_mutex_lock (glviewport->layer_lock); switch (task->add.layer) { case PGM_DRAWABLE_NEAR: glviewport->near_layer = g_list_insert (glviewport->near_layer, gldrawable, task->add.order); break; case PGM_DRAWABLE_MIDDLE: glviewport->middle_layer = g_list_insert (glviewport->middle_layer, gldrawable, task->add.order); break; case PGM_DRAWABLE_FAR: glviewport->far_layer = g_list_insert (glviewport->far_layer, gldrawable, task->add.order); break; default: break; } g_mutex_unlock (glviewport->layer_lock); task_add_free (task); } /* Complete a remove task and free it */ static void do_task_remove (PgmGlViewport *glviewport, Task *task) { PgmGlDrawable *gldrawable; /* Get the GlDrawable */ GST_OBJECT_LOCK (glviewport); gldrawable = g_hash_table_lookup (glviewport->drawable_hash, task->remove.drawable); GST_OBJECT_UNLOCK (glviewport); /* Remove it from the list */ g_mutex_lock (glviewport->layer_lock); switch (task->remove.layer) { case PGM_DRAWABLE_NEAR: glviewport->near_layer = g_list_remove (glviewport->near_layer, gldrawable); break; case PGM_DRAWABLE_MIDDLE: glviewport->middle_layer = g_list_remove (glviewport->middle_layer, gldrawable); break; case PGM_DRAWABLE_FAR: glviewport->far_layer = g_list_remove (glviewport->far_layer, gldrawable); break; default: break; } g_mutex_unlock (glviewport->layer_lock); /* And delete it */ gl_drawable_free (glviewport, gldrawable); task_remove_free (task); } /* Regenerate a layer */ static void regenerate_layer (GList *layer) { GList *walk = layer; while (walk) { PgmGlDrawable *gldrawable = (PgmGlDrawable*) walk->data; pgm_gl_drawable_regenerate (gldrawable); g_object_unref (gldrawable); walk = walk->next; } g_list_free (layer); } /* Complete a regenerate task and free it */ static void do_task_regenerate (PgmGlViewport *glviewport, Task *task) { GList *near_layer, *middle_layer, *far_layer; /* Get copies of the layers */ g_mutex_lock (glviewport->layer_lock); near_layer = copy_layer (glviewport->near_layer); middle_layer = copy_layer (glviewport->middle_layer); far_layer = copy_layer (glviewport->far_layer); g_mutex_unlock (glviewport->layer_lock); /* Then regenerate each drawable of each layer */ regenerate_layer (far_layer); regenerate_layer (middle_layer); regenerate_layer (near_layer); task_any_free (task); } /* Drawable 'changed' handler */ static void changed_cb (PgmDrawable *drawable, PgmDrawableProperty property, gpointer data) { PgmGlDrawable *gldrawable = PGM_GL_DRAWABLE (data); PgmGlViewport *glviewport = gldrawable->glviewport; if (glviewport) { Task *task; /* Add the change task to the update queue */ g_mutex_lock (glviewport->update_lock); task = task_change_new (gldrawable, property); glviewport->update_queue = g_slist_prepend (glviewport->update_queue, task); g_mutex_unlock (glviewport->update_lock); /* Request an update */ pgm_context_update (glviewport->context); } } /* Canvas 'drawable-added' handler */ static void drawable_added_cb (PgmCanvas *canvas, PgmDrawable *drawable, PgmDrawableLayer layer, gint order, gpointer data) { PgmGlViewport *glviewport = PGM_GL_VIEWPORT (data); Task *task; /* Add the add task in the update queue */ task = task_add_new (drawable, layer, order); g_mutex_lock (glviewport->update_lock); glviewport->update_queue = g_slist_prepend (glviewport->update_queue, task); g_mutex_unlock (glviewport->update_lock); /* Request an update */ pgm_context_update (glviewport->context); } /* Canvas 'drawable-removed' handler */ static void drawable_removed_cb (PgmCanvas *canvas, PgmDrawable *drawable, PgmDrawableLayer layer, gpointer data) { PgmGlViewport *glviewport = PGM_GL_VIEWPORT (data); Task *task; /* Add the remove task in the update queue */ task = task_remove_new (drawable, layer); g_mutex_lock (glviewport->update_lock); glviewport->update_queue = g_slist_prepend (glviewport->update_queue, task); g_mutex_unlock (glviewport->update_lock); /* Request an update */ pgm_context_update (glviewport->context); } /* Canvas 'drawable-reordered' handler */ static void drawable_reordered_cb (PgmCanvas *canvas, PgmDrawable *drawable, PgmDrawableLayer layer, gint order, gpointer data) { PgmGlViewport *glviewport = PGM_GL_VIEWPORT (data); Task *task; /* Add the reorder task in the update queue */ task = task_reorder_new (drawable, layer, order); g_mutex_lock (glviewport->update_lock); glviewport->update_queue = g_slist_prepend (glviewport->update_queue, task); g_mutex_unlock (glviewport->update_lock); /* Request an update */ pgm_context_update (glviewport->context); } /* Canvas 'regenerated' handler */ static void regenerated_cb (PgmCanvas *canvas, gpointer data) { PgmGlViewport *glviewport = PGM_GL_VIEWPORT (data); Task *task; /* Add the regenerate task in the update queue */ task = task_any_new (TASK_REGENERATE); g_mutex_lock (glviewport->update_lock); glviewport->update_queue = g_slist_prepend (glviewport->update_queue, task); g_mutex_unlock (glviewport->update_lock); /* Request an update */ pgm_context_update (glviewport->context); } /* Delete all GL drawable from the given GL viewport layer list and free it */ static void delete_all_gl_drawable_from_layer (PgmGlViewport *glviewport, GList **layer) { GList *walk = *layer; PgmGlDrawable *gldrawable; while (walk) { gldrawable = (PgmGlDrawable*) walk->data; gl_drawable_free (glviewport, gldrawable); walk = walk->next; } GST_OBJECT_LOCK (glviewport); g_list_free (*layer); *layer = NULL; GST_OBJECT_UNLOCK (glviewport); } /* Synchronize the drawables from the given canvas creating and adding the * the corresponding GL drawables in the layers */ static void sync_gl_drawable_from_canvas (PgmGlViewport *glviewport, PgmCanvas *canvas) { PgmGlDrawable *gldrawable; GList *walk; /* Sync near layer */ walk = canvas->near_layer; while (walk) { gldrawable = gl_drawable_new (glviewport, (PgmDrawable*) walk->data); g_mutex_lock (glviewport->layer_lock); glviewport->near_layer = g_list_append (glviewport->near_layer, gldrawable); g_mutex_unlock (glviewport->layer_lock); walk = walk->next; } /* Sync middle layer */ walk = canvas->middle_layer; while (walk) { gldrawable = gl_drawable_new (glviewport, (PgmDrawable*) walk->data); g_mutex_lock (glviewport->layer_lock); glviewport->middle_layer = g_list_append (glviewport->middle_layer, gldrawable); g_mutex_unlock (glviewport->layer_lock); walk = walk->next; } /* Sync far layer */ walk = canvas->far_layer; while (walk) { gldrawable = gl_drawable_new (glviewport, (PgmDrawable*) walk->data); g_mutex_lock (glviewport->layer_lock); glviewport->far_layer = g_list_append (glviewport->far_layer, gldrawable); g_mutex_unlock (glviewport->layer_lock); walk = walk->next; } } /* Update a layer projection */ static void update_layer_projection (GList *layer) { GList *walk = layer; while (walk) { PgmGlDrawable *gldrawable = (PgmGlDrawable*) walk->data; pgm_gl_drawable_update_projection (gldrawable); g_object_unref (gldrawable); walk = walk->next; } g_list_free (layer); } /* PgmViewport methods */ static PgmError pgm_gl_viewport_set_title (PgmViewport *viewport, const gchar *title) { PgmGlViewport *glviewport = PGM_GL_VIEWPORT (viewport); PgmContextTask *task; task = pgm_context_task_new (PGM_CONTEXT_TITLE, NULL); pgm_context_push_immediate_task (glviewport->context, task); return PGM_ERROR_OK; } static PgmError pgm_gl_viewport_show (PgmViewport *viewport) { PgmGlViewport *glviewport = PGM_GL_VIEWPORT (viewport); PgmContextTask *task; task = pgm_context_task_new (PGM_CONTEXT_VISIBILITY, NULL); pgm_context_push_immediate_task (glviewport->context, task); return PGM_ERROR_OK; } static PgmError pgm_gl_viewport_hide (PgmViewport *viewport) { PgmGlViewport *glviewport = PGM_GL_VIEWPORT (viewport); PgmContextTask *task; task = pgm_context_task_new (PGM_CONTEXT_VISIBILITY, NULL); pgm_context_push_immediate_task (glviewport->context, task); return PGM_ERROR_OK; } static PgmError pgm_gl_viewport_set_decorated (PgmViewport *viewport, gboolean decorated) { PgmGlViewport *glviewport = PGM_GL_VIEWPORT (viewport); PgmContextTask *task; task = pgm_context_task_new (PGM_CONTEXT_DECORATION, NULL); pgm_context_push_immediate_task (glviewport->context, task); return PGM_ERROR_OK; } static PgmError pgm_gl_viewport_set_cursor (PgmViewport *viewport, PgmViewportCursor cursor) { PgmGlViewport *glviewport = PGM_GL_VIEWPORT (viewport); PgmContextTask *task; task = pgm_context_task_new (PGM_CONTEXT_CURSOR, NULL); pgm_context_push_immediate_task (glviewport->context, task); return PGM_ERROR_OK; } static PgmError pgm_gl_viewport_set_icon (PgmViewport *viewport, GdkPixbuf *icon) { PgmGlViewport *glviewport = PGM_GL_VIEWPORT (viewport); PgmContextTask *task; task = pgm_context_task_new (PGM_CONTEXT_ICON, NULL); pgm_context_push_immediate_task (glviewport->context, task); return PGM_ERROR_OK; } static PgmError pgm_gl_viewport_set_drag_status (PgmViewport *viewport, gboolean accept) { PgmGlViewport *glviewport = PGM_GL_VIEWPORT (viewport); PgmContextTask *task; glviewport->drag_status = accept; task = pgm_context_task_new (PGM_CONTEXT_DRAG_STATUS, NULL); pgm_context_push_immediate_task (glviewport->context, task); return PGM_ERROR_OK; } static PgmError pgm_gl_viewport_set_size (PgmViewport *viewport, gint width, gint height) { PgmGlViewport *glviewport = PGM_GL_VIEWPORT (viewport); PgmContextTask *task; task = pgm_context_task_new (PGM_CONTEXT_SIZE, NULL); pgm_context_push_immediate_task (glviewport->context, task); return PGM_ERROR_OK; } static PgmError pgm_gl_viewport_set_alpha_blending (PgmViewport *viewport, gboolean alpha_blending) { PgmGlViewport *glviewport = PGM_GL_VIEWPORT (viewport); PgmContextTask *task; task = pgm_context_task_new (PGM_CONTEXT_ALPHA_BLENDING, NULL); pgm_context_push_immediate_task (glviewport->context, task); return PGM_ERROR_OK; } static PgmError pgm_gl_viewport_set_opacity (PgmViewport *viewport, guchar opacity) { PgmGlViewport *glviewport = PGM_GL_VIEWPORT (viewport); PgmContextTask *task; task = pgm_context_task_new (PGM_CONTEXT_OPACITY, NULL); pgm_context_push_immediate_task (glviewport->context, task); return PGM_ERROR_OK; } static PgmError pgm_gl_viewport_set_fullscreen (PgmViewport *viewport, gboolean fullscreen) { PgmGlViewport *glviewport = PGM_GL_VIEWPORT (viewport); PgmContextTask *task; task = pgm_context_task_new (PGM_CONTEXT_FULLSCREEN, NULL); pgm_context_push_immediate_task (glviewport->context, task); return PGM_ERROR_OK; } static PgmError pgm_gl_viewport_set_iconified (PgmViewport *viewport, gboolean iconified) { PgmGlViewport *glviewport = PGM_GL_VIEWPORT (viewport); PgmContextTask *task; task = pgm_context_task_new (PGM_CONTEXT_ICONIFICATION, NULL); pgm_context_push_immediate_task (glviewport->context, task); return PGM_ERROR_OK; } static PgmError pgm_gl_viewport_focus (PgmViewport *viewport) { PgmGlViewport *glviewport = PGM_GL_VIEWPORT (viewport); PgmContextTask *task; task = pgm_context_task_new (PGM_CONTEXT_FOCUS, NULL); pgm_context_push_immediate_task (glviewport->context, task); return PGM_ERROR_OK; } static PgmError pgm_gl_viewport_get_screen_resolution (PgmViewport *viewport, gint *width, gint *height) { PgmGlViewport *glviewport = PGM_GL_VIEWPORT (viewport); pgm_backend_get_screen_resolution (glviewport->context->backend, width, height); return PGM_ERROR_OK; } static PgmError pgm_gl_viewport_get_screen_size_mm (PgmViewport *viewport, gint *width, gint *height) { PgmGlViewport *glviewport = PGM_GL_VIEWPORT (viewport); pgm_backend_get_screen_size_mm (glviewport->context->backend, width, height); return PGM_ERROR_OK; } static PgmError pgm_gl_viewport_set_canvas (PgmViewport *viewport, PgmCanvas *canvas) { PgmGlViewport *glviewport = PGM_GL_VIEWPORT (viewport); /* There's a canvas bound, let's clear associated data */ if (glviewport->canvas) { GST_OBJECT_LOCK (glviewport); GST_OBJECT_LOCK (glviewport->canvas); /* Disconnect handlers */ g_signal_handler_disconnect (glviewport->canvas, glviewport->add_handler); g_signal_handler_disconnect (glviewport->canvas, glviewport->remove_handler); g_signal_handler_disconnect (glviewport->canvas, glviewport->reorder_handler); g_signal_handler_disconnect (glviewport->canvas, glviewport->regenerated_handler); GST_OBJECT_UNLOCK (glviewport->canvas); GST_OBJECT_UNLOCK (glviewport); /* Delete our hierarchy */ delete_all_gl_drawable_from_layer (glviewport, &glviewport->near_layer); delete_all_gl_drawable_from_layer (glviewport, &glviewport->middle_layer); delete_all_gl_drawable_from_layer (glviewport, &glviewport->far_layer); GST_OBJECT_LOCK (glviewport); glviewport->canvas = NULL; GST_OBJECT_UNLOCK (glviewport); } /* Bind the new canvas if any */ if (canvas) { sync_gl_drawable_from_canvas (glviewport, canvas); GST_OBJECT_LOCK (glviewport); GST_OBJECT_LOCK (canvas); /* Connect handlers */ glviewport->add_handler = g_signal_connect (G_OBJECT (canvas), "drawable-added", G_CALLBACK (drawable_added_cb), (gpointer) glviewport); glviewport->remove_handler = g_signal_connect (G_OBJECT (canvas), "drawable-removed", G_CALLBACK (drawable_removed_cb), (gpointer) glviewport); glviewport->reorder_handler = g_signal_connect (G_OBJECT (canvas), "drawable-reordered", G_CALLBACK (drawable_reordered_cb), (gpointer) glviewport); glviewport->regenerated_handler = g_signal_connect (G_OBJECT (canvas), "regenerated", G_CALLBACK (regenerated_cb), (gpointer) glviewport); glviewport->canvas = canvas; GST_OBJECT_UNLOCK (canvas); GST_OBJECT_UNLOCK (glviewport); } return PGM_ERROR_OK; } static PgmError pgm_gl_viewport_update_projection (PgmViewport *viewport) { PgmGlViewport *glviewport = PGM_GL_VIEWPORT (viewport); PgmContextTask *task; GST_OBJECT_LOCK (viewport); /* Store the projected size */ if (viewport->rotation == PGM_VIEWPORT_ROTATION_NONE || viewport->rotation == PGM_VIEWPORT_ROTATION_180) { glviewport->projected_w = (gfloat) viewport->projected_width; glviewport->projected_h = (gfloat) viewport->projected_height; } else { glviewport->projected_w = (gfloat) viewport->projected_height; glviewport->projected_h = (gfloat) viewport->projected_width; } /* Store the canvas size */ if (viewport->canvas) { GST_OBJECT_LOCK (viewport->canvas); glviewport->canvas_w = viewport->canvas->width; glviewport->canvas_h = viewport->canvas->height; GST_OBJECT_UNLOCK (viewport->canvas); } GST_OBJECT_UNLOCK (viewport); /* And queue the projection update task */ task = pgm_context_task_new (PGM_CONTEXT_PROJECTION, NULL); pgm_context_push_immediate_task (glviewport->context, task); return PGM_ERROR_OK; } static PgmError pgm_gl_viewport_get_embedding_id (PgmViewport *viewport, gulong *embedding_id) { PgmGlViewport *glviewport = PGM_GL_VIEWPORT (viewport); GST_OBJECT_LOCK (glviewport); pgm_backend_get_embedding_id (glviewport->context->backend, embedding_id); GST_OBJECT_UNLOCK (glviewport); return PGM_ERROR_OK; } static PgmError pgm_gl_viewport_get_pixel_formats (PgmViewport *viewport, gulong *formats_mask) { PgmGlViewport *glviewport = PGM_GL_VIEWPORT (viewport); const gchar *variable; GST_OBJECT_LOCK (glviewport); /* The classic formats supported by all hardware */ *formats_mask = PGM_IMAGE_RGB | PGM_IMAGE_RGBA | PGM_IMAGE_BGR | PGM_IMAGE_BGRA; /* I420 and YV12 are supported through fragment programs and * multi-texturing with a minimum texture units number of three. The * PGM_GL_CSP_PROGRAM environment variable allows to disable the use * fragment programs to do the color space conversion. */ if (glviewport->context->feature_mask & PGM_GL_FEAT_PER_PLANE_YCBCR_PROGRAM) { *formats_mask |= PGM_IMAGE_I420 | PGM_IMAGE_YV12; variable = g_getenv ("PGM_GL_CSP_PROGRAM"); if (variable && variable[0] == '0') *formats_mask &= ~(PGM_IMAGE_I420 | PGM_IMAGE_YV12); } /* FIXME: YUYV and UYVY are not supported */ GST_OBJECT_UNLOCK (glviewport); return PGM_ERROR_OK; } static PgmError pgm_gl_viewport_get_caps_mask (PgmViewport *viewport, gulong *caps_mask) { PgmGlViewport *glviewport = PGM_GL_VIEWPORT (viewport); GST_OBJECT_LOCK (glviewport); *caps_mask = glviewport->capacities; GST_OBJECT_UNLOCK (glviewport); return PGM_ERROR_OK; } static PgmError pgm_gl_viewport_get_max_texture_size (PgmViewport *viewport, guint32 *max_texture_size) { PgmGlViewport *glviewport = PGM_GL_VIEWPORT (viewport); GST_OBJECT_LOCK (glviewport); *max_texture_size = glviewport->context->max_texture_2d_size; GST_OBJECT_UNLOCK (glviewport); return PGM_ERROR_OK; } static PgmError pgm_gl_viewport_get_frame_rate (PgmViewport *viewport, guint *frame_rate) { PgmGlViewport *glviewport = PGM_GL_VIEWPORT (viewport); GST_OBJECT_LOCK (glviewport); *frame_rate = glviewport->context->fps; GST_OBJECT_UNLOCK (glviewport); return PGM_ERROR_OK; } static PgmError pgm_gl_viewport_set_message_filter (PgmViewport *viewport, GList *filter) { PgmGlViewport *glviewport = PGM_GL_VIEWPORT (viewport); PgmContextTask *task; task = pgm_context_task_new (PGM_CONTEXT_MESSAGE_FILTER, NULL); pgm_context_push_immediate_task (glviewport->context, task); return PGM_ERROR_OK; } static PgmError pgm_gl_viewport_read_pixels (PgmViewport *viewport, guint x, guint y, guint width, guint height, guint8 *pixels) { PgmGlViewport *glviewport = PGM_GL_VIEWPORT (viewport); PgmGlViewportPixelRectangle *rectangle = NULL; PgmContextTask *task = NULL; rectangle = g_slice_new (PgmGlViewportPixelRectangle); if (!rectangle) return PGM_ERROR_X; rectangle->x = x; rectangle->y = y; rectangle->width = width; rectangle->height = height; rectangle->pixels = pixels; task = pgm_context_task_new (PGM_CONTEXT_READ_PIXELS, rectangle); pgm_context_push_immediate_task (glviewport->context, task); return PGM_ERROR_OK; } /* GObject stuff */ PGM_DEFINE_DYNAMIC_TYPE (PgmGlViewport, pgm_gl_viewport, PGM_TYPE_VIEWPORT) void pgm_gl_viewport_register (GTypeModule *module) { pgm_gl_viewport_register_type (module); } static void pgm_gl_viewport_dispose (GObject *object) { PgmGlViewport *glviewport = PGM_GL_VIEWPORT (object); if (glviewport->canvas) { /* Disconnect handlers */ g_signal_handler_disconnect (glviewport->canvas, glviewport->add_handler); g_signal_handler_disconnect (glviewport->canvas, glviewport->remove_handler); g_signal_handler_disconnect (glviewport->canvas, glviewport->reorder_handler); g_signal_handler_disconnect (glviewport->canvas, glviewport->regenerated_handler); /* Delete our hierarchy */ g_mutex_lock (glviewport->layer_lock); delete_all_gl_drawable_from_layer (glviewport, &glviewport->near_layer); delete_all_gl_drawable_from_layer (glviewport, &glviewport->middle_layer); delete_all_gl_drawable_from_layer (glviewport, &glviewport->far_layer); g_mutex_unlock (glviewport->layer_lock); } g_mutex_lock (glviewport->update_lock); g_slist_foreach (glviewport->update_queue, (GFunc) task_free, NULL); g_slist_free (glviewport->update_queue); glviewport->update_queue = NULL; g_mutex_unlock (glviewport->update_lock); pgm_context_free (glviewport->context); g_mutex_free (glviewport->layer_lock); g_mutex_free (glviewport->update_lock); GST_CALL_PARENT (G_OBJECT_CLASS, dispose, (object)); } static void pgm_gl_viewport_class_init (PgmGlViewportClass *klass) { GObjectClass *gobject_class; PgmViewportClass *viewport_class; GST_DEBUG_CATEGORY_INIT (pgm_gl_viewport_debug, "pgm_gl_viewport", 0, "OpenGL plugin: PgmGlViewport"); parent_class = g_type_class_peek_parent (klass); gobject_class = G_OBJECT_CLASS (klass); viewport_class = PGM_VIEWPORT_CLASS (klass); /* GObject virtual table */ gobject_class->dispose = GST_DEBUG_FUNCPTR (pgm_gl_viewport_dispose); /* PgmViewport virtual table */ viewport_class->set_title = GST_DEBUG_FUNCPTR (pgm_gl_viewport_set_title); viewport_class->show = GST_DEBUG_FUNCPTR (pgm_gl_viewport_show); viewport_class->hide = GST_DEBUG_FUNCPTR (pgm_gl_viewport_hide); viewport_class->set_decorated = GST_DEBUG_FUNCPTR (pgm_gl_viewport_set_decorated); viewport_class->set_cursor = GST_DEBUG_FUNCPTR (pgm_gl_viewport_set_cursor); viewport_class->set_icon = GST_DEBUG_FUNCPTR (pgm_gl_viewport_set_icon); viewport_class->set_drag_status = GST_DEBUG_FUNCPTR (pgm_gl_viewport_set_drag_status); viewport_class->set_size = GST_DEBUG_FUNCPTR (pgm_gl_viewport_set_size); viewport_class->set_alpha_blending = GST_DEBUG_FUNCPTR (pgm_gl_viewport_set_alpha_blending); viewport_class->set_opacity = GST_DEBUG_FUNCPTR (pgm_gl_viewport_set_opacity); viewport_class->set_fullscreen = GST_DEBUG_FUNCPTR (pgm_gl_viewport_set_fullscreen); viewport_class->set_iconified = GST_DEBUG_FUNCPTR (pgm_gl_viewport_set_iconified); viewport_class->focus = GST_DEBUG_FUNCPTR (pgm_gl_viewport_focus); viewport_class->get_screen_resolution = GST_DEBUG_FUNCPTR (pgm_gl_viewport_get_screen_resolution); viewport_class->get_screen_size_mm = GST_DEBUG_FUNCPTR (pgm_gl_viewport_get_screen_size_mm); viewport_class->set_canvas = GST_DEBUG_FUNCPTR (pgm_gl_viewport_set_canvas); viewport_class->update_projection = GST_DEBUG_FUNCPTR (pgm_gl_viewport_update_projection); viewport_class->get_embedding_id = GST_DEBUG_FUNCPTR (pgm_gl_viewport_get_embedding_id); viewport_class->get_pixel_formats = GST_DEBUG_FUNCPTR (pgm_gl_viewport_get_pixel_formats); viewport_class->get_caps_mask = GST_DEBUG_FUNCPTR (pgm_gl_viewport_get_caps_mask); viewport_class->get_max_texture_size = GST_DEBUG_FUNCPTR (pgm_gl_viewport_get_max_texture_size); viewport_class->get_frame_rate = GST_DEBUG_FUNCPTR (pgm_gl_viewport_get_frame_rate); viewport_class->set_message_filter = GST_DEBUG_FUNCPTR (pgm_gl_viewport_set_message_filter); viewport_class->read_pixels = GST_DEBUG_FUNCPTR (pgm_gl_viewport_read_pixels); /* PgmGlDrawable changed table */ klass->changed_func[PGM_DRAWABLE_VISIBILITY] = GST_DEBUG_FUNCPTR (pgm_gl_drawable_set_visibility); klass->changed_func[PGM_DRAWABLE_SIZE] = GST_DEBUG_FUNCPTR (pgm_gl_drawable_set_size); klass->changed_func[PGM_DRAWABLE_POSITION] = GST_DEBUG_FUNCPTR (pgm_gl_drawable_set_position); klass->changed_func[PGM_DRAWABLE_TRANSFORMATION_MATRIX] = GST_DEBUG_FUNCPTR (pgm_gl_drawable_set_transformation_matrix); klass->changed_func[PGM_DRAWABLE_BG_COLOR] = GST_DEBUG_FUNCPTR (pgm_gl_drawable_set_bg_color); klass->changed_func[PGM_DRAWABLE_FG_COLOR] = GST_DEBUG_FUNCPTR (pgm_gl_drawable_set_fg_color); klass->changed_func[PGM_DRAWABLE_OPACITY] = GST_DEBUG_FUNCPTR (pgm_gl_drawable_set_opacity); klass->changed_func[PGM_DRAWABLE_REGENERATE] = GST_DEBUG_FUNCPTR (pgm_gl_drawable_regenerate); /* PgmGlImage changed table */ klass->changed_func[PGM_IMAGE_DATA_EMPTY] = GST_DEBUG_FUNCPTR ((PgmGlDrawableChangedFunc) pgm_gl_image_clear); klass->changed_func[PGM_IMAGE_DATA_FILE] = GST_DEBUG_FUNCPTR ((PgmGlDrawableChangedFunc) pgm_gl_image_set_from_file); klass->changed_func[PGM_IMAGE_DATA_BUFFER] = GST_DEBUG_FUNCPTR ((PgmGlDrawableChangedFunc) pgm_gl_image_set_from_buffer); klass->changed_func[PGM_IMAGE_DATA_GST_BUFFER] = GST_DEBUG_FUNCPTR ((PgmGlDrawableChangedFunc) pgm_gl_image_set_from_gst_buffer); klass->changed_func[PGM_IMAGE_DATA_PIXBUF] = GST_DEBUG_FUNCPTR ((PgmGlDrawableChangedFunc) pgm_gl_image_set_from_pixbuf); klass->changed_func[PGM_IMAGE_DATA_SYSTEM_BUFFER] = GST_DEBUG_FUNCPTR ((PgmGlDrawableChangedFunc) pgm_gl_image_set_from_system_buffer); klass->changed_func[PGM_IMAGE_DATA_IMAGE] = GST_DEBUG_FUNCPTR ((PgmGlDrawableChangedFunc) pgm_gl_image_set_from_image); klass->changed_func[PGM_IMAGE_SYSTEM_BUFFER_CONTENT] = GST_DEBUG_FUNCPTR ((PgmGlDrawableChangedFunc) pgm_gl_image_system_buffer_changed); klass->changed_func[PGM_IMAGE_MAPPING_MATRIX] = GST_DEBUG_FUNCPTR ((PgmGlDrawableChangedFunc) pgm_gl_image_set_mapping_matrix); klass->changed_func[PGM_IMAGE_ALIGNMENT] = GST_DEBUG_FUNCPTR ((PgmGlDrawableChangedFunc) pgm_gl_image_set_alignment); klass->changed_func[PGM_IMAGE_LAYOUT] = GST_DEBUG_FUNCPTR ((PgmGlDrawableChangedFunc) pgm_gl_image_set_layout); klass->changed_func[PGM_IMAGE_INTERP] = GST_DEBUG_FUNCPTR ((PgmGlDrawableChangedFunc) pgm_gl_image_set_interp); klass->changed_func[PGM_IMAGE_WRAPPING] = GST_DEBUG_FUNCPTR ((PgmGlDrawableChangedFunc) pgm_gl_image_set_wrapping); klass->changed_func[PGM_IMAGE_ASPECT_RATIO] = GST_DEBUG_FUNCPTR ((PgmGlDrawableChangedFunc) pgm_gl_image_set_aspect_ratio); klass->changed_func[PGM_IMAGE_BORDER_WIDTH] = GST_DEBUG_FUNCPTR ((PgmGlDrawableChangedFunc) pgm_gl_image_set_border_width); klass->changed_func[PGM_IMAGE_BORDER_INNER_COLOR] = GST_DEBUG_FUNCPTR ((PgmGlDrawableChangedFunc) pgm_gl_image_set_border_inner_color); klass->changed_func[PGM_IMAGE_BORDER_OUTER_COLOR] = GST_DEBUG_FUNCPTR ((PgmGlDrawableChangedFunc) pgm_gl_image_set_border_outer_color); /* PgmGlText changed table */ klass->changed_func[PGM_TEXT_LABEL] = GST_DEBUG_FUNCPTR ((PgmGlDrawableChangedFunc) pgm_gl_text_set_label); klass->changed_func[PGM_TEXT_MARKUP] = GST_DEBUG_FUNCPTR ((PgmGlDrawableChangedFunc) pgm_gl_text_set_markup); klass->changed_func[PGM_TEXT_FONT_FAMILY] = GST_DEBUG_FUNCPTR ((PgmGlDrawableChangedFunc) pgm_gl_text_set_font_family); klass->changed_func[PGM_TEXT_HEIGHT] = GST_DEBUG_FUNCPTR ((PgmGlDrawableChangedFunc) pgm_gl_text_set_font_height); klass->changed_func[PGM_TEXT_ELLIPSIZE] = GST_DEBUG_FUNCPTR ((PgmGlDrawableChangedFunc) pgm_gl_text_set_ellipsize); klass->changed_func[PGM_TEXT_JUSTIFY] = GST_DEBUG_FUNCPTR ((PgmGlDrawableChangedFunc) pgm_gl_text_set_justify); klass->changed_func[PGM_TEXT_ALIGNMENT] = GST_DEBUG_FUNCPTR ((PgmGlDrawableChangedFunc) pgm_gl_text_set_alignment); klass->changed_func[PGM_TEXT_WRAP] = GST_DEBUG_FUNCPTR ((PgmGlDrawableChangedFunc) pgm_gl_text_set_wrap); klass->changed_func[PGM_TEXT_GRAVITY] = GST_DEBUG_FUNCPTR ((PgmGlDrawableChangedFunc) pgm_gl_text_set_gravity); klass->changed_func[PGM_TEXT_STRETCH] = GST_DEBUG_FUNCPTR ((PgmGlDrawableChangedFunc) pgm_gl_text_set_stretch); klass->changed_func[PGM_TEXT_STYLE] = GST_DEBUG_FUNCPTR ((PgmGlDrawableChangedFunc) pgm_gl_text_set_style); klass->changed_func[PGM_TEXT_VARIANT] = GST_DEBUG_FUNCPTR ((PgmGlDrawableChangedFunc) pgm_gl_text_set_variant); klass->changed_func[PGM_TEXT_WEIGHT] = GST_DEBUG_FUNCPTR ((PgmGlDrawableChangedFunc) pgm_gl_text_set_weight); klass->changed_func[PGM_TEXT_MULTILINE] = GST_DEBUG_FUNCPTR ((PgmGlDrawableChangedFunc) pgm_gl_text_set_multiline); klass->changed_func[PGM_TEXT_LINE_SPACING] = GST_DEBUG_FUNCPTR ((PgmGlDrawableChangedFunc) pgm_gl_text_set_line_spacing); klass->changed_func[PGM_TEXT_COLOR] = GST_DEBUG_FUNCPTR ((PgmGlDrawableChangedFunc) pgm_gl_text_set_color); klass->changed_func[PGM_TEXT_OUTLINE_COLOR] = GST_DEBUG_FUNCPTR ((PgmGlDrawableChangedFunc) pgm_gl_text_set_outline_color); klass->changed_func[PGM_TEXT_OUTLINE_WIDTH] = GST_DEBUG_FUNCPTR ((PgmGlDrawableChangedFunc) pgm_gl_text_set_outline_width); klass->changed_func[PGM_TEXT_CAST_SHADOW] = GST_DEBUG_FUNCPTR ((PgmGlDrawableChangedFunc) pgm_gl_text_set_cast_shadow); klass->changed_func[PGM_TEXT_SHADOW_POSITION] = GST_DEBUG_FUNCPTR ((PgmGlDrawableChangedFunc) pgm_gl_text_set_shadow_position); klass->changed_func[PGM_TEXT_SHADOW_COLOR] = GST_DEBUG_FUNCPTR ((PgmGlDrawableChangedFunc) pgm_gl_text_set_shadow_color); } static void pgm_gl_viewport_class_finalize (PgmGlViewportClass *klass) { return; } static void pgm_gl_viewport_init (PgmGlViewport *glviewport) { /* Attached canvas */ /* glviewport->canvas = NULL; */ /* Empty lists */ /* glviewport->far_layer = NULL; */ /* glviewport->middle_layer = NULL; */ /* glviewport->near_layer = NULL; */ glviewport->layer_lock = g_mutex_new (); /* Update task queue */ /* glviewport->update_queue = NULL; */ glviewport->update_lock = g_mutex_new (); /* Create the drawable hash using pointers as keys */ glviewport->drawable_hash = g_hash_table_new (NULL, NULL); /* Create context */ glviewport->context = pgm_context_new (glviewport); /* Signal handlers id */ /* glviewport->add_handler = 0; */ /* glviewport->remove_handler = 0; */ /* glviewport->reorder_handler = 0; */ /* glviewport->regenerated_handler = 0; */ /* Projection informations */ glviewport->projected_w = 800; glviewport->projected_h = 600; glviewport->canvas_w = 4.0f; glviewport->canvas_h = 3.0f; /* Fill capacities */ /* glviewport->capacities = 0; */ if (pgm_backend_is_accelerated (glviewport->context->backend)) glviewport->capacities |= PGM_VIEWPORT_HARDWARE_ACCELERATION; if (pgm_backend_is_embeddable (glviewport->context->backend)) glviewport->capacities |= PGM_VIEWPORT_APPLICATION_EMBEDDING; if (pgm_backend_has_alpha_component (glviewport->context->backend)) glviewport->capacities |= PGM_VIEWPORT_OPACITY; #ifdef HAVE_GL_GLX_H if (pgm_backend_has_system_buffer (glviewport->context->backend) && glviewport->context->feature_mask & PGM_GL_FEAT_TEXTURE_NON_POWER_OF_TWO) glviewport->capacities |= PGM_VIEWPORT_X11_SYSTEM_BUFFER; #endif /* HAVE_GL_GLX_H */ /* Drag status */ /* glviewport->drag_status = FALSE; */ } /* Public methods */ PgmViewport * pgm_gl_viewport_new (void) { PgmGlViewport *glviewport; glviewport = g_object_new (PGM_TYPE_GL_VIEWPORT, NULL); GST_DEBUG_OBJECT (glviewport, "created new glviewport"); return PGM_VIEWPORT (glviewport); } void pgm_gl_viewport_flush_update_queue (PgmGlViewport *glviewport) { GSList *copy, *walk; Task *task; /* Get a reverse copy of the update task list, and NULLify it */ g_mutex_lock (glviewport->update_lock); copy = g_slist_reverse (glviewport->update_queue); glviewport->update_queue = NULL; g_mutex_unlock (glviewport->update_lock); /* Flush the update task list */ walk = copy; while (walk) { task = walk->data; task_func[task->type] (glviewport, task); walk = walk->next; } g_slist_free (copy); copy = NULL; } void pgm_gl_viewport_update_drawable_projection (PgmGlViewport *glviewport) { GList *near_layer, *middle_layer, *far_layer; /* Get copies of the layers */ g_mutex_lock (glviewport->layer_lock); near_layer = copy_layer (glviewport->near_layer); middle_layer = copy_layer (glviewport->middle_layer); far_layer = copy_layer (glviewport->far_layer); g_mutex_unlock (glviewport->layer_lock); /* Then update the projection of each drawable of each layer */ update_layer_projection (far_layer); update_layer_projection (middle_layer); update_layer_projection (near_layer); } /* Connects the GL drawable to the "changed" signal. Should be called at the * creation of a new GL drawable to be notified of any change. */ void pgm_gl_viewport_connect_changed_callback (PgmGlViewport *glviewport, PgmGlDrawable *gldrawable) { PgmDrawable *drawable = gldrawable->drawable; GST_OBJECT_LOCK (drawable); gldrawable->change_handler = g_signal_connect (drawable, "changed", G_CALLBACK (changed_cb), (gpointer) gldrawable); GST_OBJECT_UNLOCK (drawable); } pigment-0.3.17/plugins/opengl/pgmglimage.h0000644000175000017500000000757111205034416015423 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment OpenGL plugin * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ #ifndef __PGM_GL_IMAGE_H__ #define __PGM_GL_IMAGE_H__ #include "pgmgldrawable.h" #include "pgmtexture.h" G_BEGIN_DECLS #define PGM_TYPE_GL_IMAGE (pgm_gl_image_get_type()) #define PGM_GL_IMAGE(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), PGM_TYPE_GL_IMAGE, PgmGlImage)) #define PGM_GL_IMAGE_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), PGM_TYPE_GL_IMAGE, PgmGlImageClass)) #define PGM_IS_GL_IMAGE(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), PGM_TYPE_GL_IMAGE)) #define PGM_IS_GL_IMAGE_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), PGM_TYPE_GL_IMAGE)) #define PGM_GL_IMAGE_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS((obj), PGM_TYPE_GL_IMAGE, PgmGlImageClass)) typedef struct _PgmGlImage PgmGlImage; typedef struct _PgmGlImageClass PgmGlImageClass; struct _PgmGlImage { PgmGlDrawable parent; /* Textures */ PgmTexture *native_texture; PgmTexture *texture; /* Aspect ratios */ gfloat drawable_ratio; gfloat image_ratio; /* Last position */ gfloat last_x, last_y, last_z; /* Alignment coeficients */ gfloat h_align, v_align; /* Drawing condition */ gboolean empty; /* Image vertex arrays */ PgmGlFloat fg_color[4]; PgmGlFloat coord[8]; PgmGlFloat vertex[12]; /* Image border vertex arrays */ PgmGlFloat border_vertex[30]; PgmGlFloat border_color[40]; gfloat border_width; }; struct _PgmGlImageClass { PgmGlDrawableClass parent_class; }; GType pgm_gl_image_get_type (void) G_GNUC_CONST; PgmGlDrawable *pgm_gl_image_new (PgmDrawable *drawable, PgmGlViewport *glviewport); void pgm_gl_image_register (GTypeModule *module); void pgm_gl_image_clear (PgmGlImage *glimage); void pgm_gl_image_set_from_file (PgmGlImage *glimage); void pgm_gl_image_set_from_buffer (PgmGlImage *glimage); void pgm_gl_image_set_from_gst_buffer (PgmGlImage *glimage); void pgm_gl_image_set_from_pixbuf (PgmGlImage *glimage); void pgm_gl_image_set_from_system_buffer (PgmGlImage *glimage); void pgm_gl_image_set_from_image (PgmGlImage *glimage); void pgm_gl_image_set_mapping_matrix (PgmGlImage *glimage); void pgm_gl_image_set_alignment (PgmGlImage *glimage); void pgm_gl_image_set_layout (PgmGlImage *glimage); void pgm_gl_image_set_interp (PgmGlImage *glimage); void pgm_gl_image_set_wrapping (PgmGlImage *glimage); void pgm_gl_image_set_aspect_ratio (PgmGlImage *glimage); void pgm_gl_image_set_border_width (PgmGlImage *glimage); void pgm_gl_image_set_border_inner_color (PgmGlImage *glimage); void pgm_gl_image_set_border_outer_color (PgmGlImage *glimage); void pgm_gl_image_system_buffer_changed (PgmGlImage *glimage); G_END_DECLS #endif /* __PGM_GL_IMAGE_H__ */ pigment-0.3.17/plugins/opengl/pgmgldefs.h0000644000175000017500000006066111205034416015261 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment OpenGL plugin * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ #ifndef __PGM_GL_DEFS_H__ #define __PGM_GL_DEFS_H__ #if defined(G_OS_WIN32) #include #define PGM_GL_API_ATTRIBUTE __stdcall #elif defined(G_OS_UNIX) #define PGM_GL_API_ATTRIBUTE #endif /* defined(G_OS_WIN32) */ G_BEGIN_DECLS /* OpenGL feature flags */ #define PGM_GL_FEAT_TEXTURE_RECTANGLE (1L << 0) #define PGM_GL_FEAT_TEXTURE_NON_POWER_OF_TWO (1L << 1) #define PGM_GL_FEAT_TEXTURE_MIRRORED_REPEAT (1L << 2) #define PGM_GL_FEAT_TEXTURE_BORDER_CLAMP (1L << 3) #define PGM_GL_FEAT_MULTISAMPLE (1L << 4) #define PGM_GL_FEAT_MULTISAMPLE_FILTER_HINT (1L << 5) #define PGM_GL_FEAT_MULTITEXTURE (1L << 6) #define PGM_GL_FEAT_TEXTURE_ENV_COMBINE (1L << 7) #define PGM_GL_FEAT_TEXTURE_ENV_DOT3 (1L << 8) #define PGM_GL_FEAT_FRAGMENT_PROGRAM (1L << 9) #define PGM_GL_FEAT_VERTEX_BUFFER_OBJECT (1L << 10) #define PGM_GL_FEAT_PIXEL_BUFFER_OBJECT (1L << 11) #define PGM_GL_FEAT_PER_PLANE_YCBCR_PROGRAM (1L << 12) #define PGM_GL_FEAT_BLEND_FUNC_SEPARATE (1L << 13) #define PGM_GL_FEAT_BLEND_COLOR (1L << 14) #define PGM_GL_FEAT_PACKED_PIXELS (1L << 15) #define PGM_GL_FEAT_MULTI_DRAW_ARRAYS (1L << 16) #define PGM_GL_FEAT_FRAMEBUFFER_OBJECT (1L << 17) #define PGM_GL_FEAT_COPY_SUB_BUFFER (1L << 18) /* OpenGL constant definitions */ #define PGM_GL_FALSE 0x0 #define PGM_GL_TRUE 0x1 #define PGM_GL_NO_ERROR 0x0 #define PGM_GL_INVALID_OPERATION 0x0502 #define PGM_GL_VENDOR 0x1F00 #define PGM_GL_RENDERER 0x1F01 #define PGM_GL_VERSION 0x1F02 #define PGM_GL_EXTENSIONS 0x1F03 #define PGM_GL_UNSIGNED_BYTE 0x1401 #define PGM_GL_MODELVIEW 0x1700 #define PGM_GL_PROJECTION 0x1701 #define PGM_GL_SHORT 0x1402 #define PGM_GL_INT 0x1404 #define PGM_GL_FLOAT 0x1406 #define PGM_GL_DOUBLE 0x140A #define PGM_GL_POINTS 0x0000 #define PGM_GL_LINES 0x0001 #define PGM_GL_LINE_LOOP 0x0002 #define PGM_GL_LINE_STRIP 0x0003 #define PGM_GL_TRIANGLES 0x0004 #define PGM_GL_TRIANGLE_STRIP 0x0005 #define PGM_GL_TRIANGLE_FAN 0x0006 #define PGM_GL_QUADS 0x0007 #define PGM_GL_QUAD_STRIP 0x0008 #define PGM_GL_POLYGON 0x0009 #define PGM_GL_VERTEX_ARRAY 0x8074 #define PGM_GL_COLOR_ARRAY 0x8076 #define PGM_GL_TEXTURE_COORD_ARRAY 0x8078 #define PGM_GL_FILL 0x1B02 #define PGM_GL_FRONT 0x0404 #define PGM_GL_BACK 0x0405 #define PGM_GL_CULL_FACE 0x0B44 #define PGM_GL_POINT_SMOOTH 0x0B10 #define PGM_GL_LINE_SMOOTH 0x0B20 #define PGM_GL_POLYGON_SMOOTH 0x0B41 #define PGM_GL_SCISSOR_TEST 0x0C11 #define PGM_GL_MAX_TEXTURE_SIZE 0x0D33 #define PGM_GL_MAX_VIEWPORT_DIMS 0x0D3A #define PGM_GL_TEXTURE_WIDTH 0x1000 #define PGM_GL_TEXTURE_HEIGHT 0x1001 #define PGM_GL_TEXTURE_BORDER_COLOR 0x1004 #define PGM_GL_TEXTURE_BINDING_2D 0x8069 #define PGM_GL_TEXTURE_BINDING_RECTANGLE 0x84F6 #define PGM_GL_TEXTURE_ENV 0x2300 #define PGM_GL_TEXTURE_ENV_MODE 0x2200 #define PGM_GL_TEXTURE_2D 0x0DE1 #define PGM_GL_PROXY_TEXTURE_2D 0x8064 #define PGM_GL_TEXTURE_WRAP_S 0x2802 #define PGM_GL_TEXTURE_WRAP_T 0x2803 #define PGM_GL_TEXTURE_MAG_FILTER 0x2800 #define PGM_GL_TEXTURE_MIN_FILTER 0x2801 #define PGM_GL_TEXTURE_ENV_COLOR 0x2201 #define PGM_GL_TEXTURE_GEN_S 0x0C60 #define PGM_GL_TEXTURE_GEN_T 0x0C61 #define PGM_GL_TEXTURE_GEN_MODE 0x2500 #define PGM_GL_TEXTURE_BORDER_COLOR 0x1004 #define PGM_GL_EYE_LINEAR 0x2400 #define PGM_GL_EYE_PLANE 0x2502 #define PGM_GL_S 0x2000 #define PGM_GL_T 0x2001 #define PGM_GL_MODULATE 0x2100 #define PGM_GL_NEAREST 0x2600 #define PGM_GL_LINEAR 0x2601 #define PGM_GL_CLAMP 0x2900 #define PGM_GL_REPEAT 0x2901 #define PGM_GL_CLAMP_TO_EDGE 0x812F #define PGM_GL_CLAMP_TO_BORDER 0x812D #define PGM_GL_TEXTURE_RED_SIZE 0x805C #define PGM_GL_TEXTURE_GREEN_SIZE 0x805D #define PGM_GL_TEXTURE_BLUE_SIZE 0x805E #define PGM_GL_TEXTURE_ALPHA_SIZE 0x805F #define PGM_GL_NEAREST_MIPMAP_NEAREST 0x2700 #define PGM_GL_LINEAR_MIPMAP_NEAREST 0x2701 #define PGM_GL_NEAREST_MIPMAP_LINEAR 0x2702 #define PGM_GL_LINEAR_MIPMAP_LINEAR 0x2703 #define PGM_GL_TEXTURE 0x1702 #define PGM_GL_SRC_COLOR 0x0300 #define PGM_GL_COMBINE 0x8570 #define PGM_GL_COMBINE_RGB 0x8571 #define PGM_GL_COMBINE_ALPHA 0x8572 #define PGM_GL_SOURCE0_RGB 0x8580 #define PGM_GL_SOURCE1_RGB 0x8581 #define PGM_GL_SOURCE2_RGB 0x8582 #define PGM_GL_SOURCE0_ALPHA 0x8588 #define PGM_GL_SOURCE1_ALPHA 0x8589 #define PGM_GL_SOURCE2_ALPHA 0x858A #define PGM_GL_OPERAND0_RGB 0x8590 #define PGM_GL_OPERAND1_RGB 0x8591 #define PGM_GL_OPERAND2_RGB 0x8592 #define PGM_GL_OPERAND0_ALPHA 0x8598 #define PGM_GL_OPERAND1_ALPHA 0x8599 #define PGM_GL_OPERAND2_ALPHA 0x859A #define PGM_GL_RGB_SCALE 0x8573 #define PGM_GL_ADD_SIGNED 0x8574 #define PGM_GL_INTERPOLATE 0x8575 #define PGM_GL_SUBTRACT 0x84E7 #define PGM_GL_CONSTANT 0x8576 #define PGM_GL_PRIMARY_COLOR 0x8577 #define PGM_GL_PREVIOUS 0x8578 #define PGM_GL_DOT3_RGB 0x86AE #define PGM_GL_DOT3_RGBA 0x86AF #define PGM_GL_STENCIL_TEST 0x0B90 #define PGM_GL_KEEP 0x1E00 #define PGM_GL_REPLACE 0x1E01 #define PGM_GL_INCR 0x1E02 #define PGM_GL_DECR 0x1E03 #define PGM_GL_LESS 0x0201 #define PGM_GL_EQUAL 0x0202 #define PGM_GL_LEQUAL 0x0203 #define PGM_GL_ALWAYS 0x0207 #define PGM_GL_DEPTH_TEST 0x0B71 #define PGM_GL_DEPTH_BUFFER_BIT 0x00000100 #define PGM_GL_STENCIL_BUFFER_BIT 0x00000400 #define PGM_GL_VIEWPORT_BIT 0x00000800 #define PGM_GL_TRANSFORM_BIT 0x00001000 #define PGM_GL_COLOR_BUFFER_BIT 0x00004000 #define PGM_GL_LIST_BIT 0x00020000 #define PGM_GL_STENCIL_INDEX 0x1901 #define PGM_GL_DEPTH_COMPONENT 0x1902 #define PGM_GL_ALPHA 0x1906 #define PGM_GL_RGB 0x1907 #define PGM_GL_LUMINANCE 0x1909 #define PGM_GL_LUMINANCE_ALPHA 0x190A #define PGM_GL_COLOR 0x1800 #define PGM_GL_DITHER 0x0BD0 #define PGM_GL_RGBA 0x1908 #define PGM_GL_BGR 0x80E0 #define PGM_GL_BGRA 0x80E1 #define PGM_GL_MODELVIEW_MATRIX 0x0BA6 #define PGM_GL_PROJECTION_MATRIX 0x0BA7 #define PGM_GL_TEXTURE_MATRIX 0x0BA8 #define PGM_GL_FRONT_AND_BACK 0x0408 #define PGM_GL_FLAT 0x1D00 #define PGM_GL_SMOOTH 0x1D01 #define PGM_GL_BLEND 0x0BE2 #define PGM_GL_ZERO 0x0000 #define PGM_GL_ONE 0x0001 #define PGM_GL_ONE_MINUS_SRC_COLOR 0x0301 #define PGM_GL_SRC_ALPHA 0x0302 #define PGM_GL_ONE_MINUS_SRC_ALPHA 0x0303 #define PGM_GL_DST_ALPHA 0x0304 #define PGM_GL_ONE_MINUS_DST_ALPHA 0x0305 #define PGM_GL_SRC_ALPHA_SATURATE 0x0308 #define PGM_GL_CONSTANT_COLOR 0x8001 #define PGM_GL_PACK_ALIGNMENT 0x0D05 #define PGM_GL_PACK_LSB_FIRST 0x0D01 #define PGM_GL_PACK_ROW_LENGTH 0x0D02 #define PGM_GL_PACK_SKIP_PIXELS 0x0D04 #define PGM_GL_PACK_SKIP_ROWS 0x0D03 #define PGM_GL_UNPACK_ALIGNMENT 0x0CF5 #define PGM_GL_UNPACK_LSB_FIRST 0x0CF1 #define PGM_GL_UNPACK_ROW_LENGTH 0x0CF2 #define PGM_GL_UNPACK_SKIP_PIXELS 0x0CF4 #define PGM_GL_UNPACK_SKIP_ROWS 0x0CF3 #define PGM_GL_PERSPECTIVE_CORRECTION_HINT 0x0C50 #define PGM_GL_FASTEST 0x1101 #define PGM_GL_NICEST 0x1102 #define PGM_GL_COMPILE 0x1300 #define PGM_GL_TEXTURE_RECTANGLE 0x84F5 #define PGM_GL_PROXY_TEXTURE_RECTANGLE 0x84F7 #define PGM_GL_MAX_RECTANGLE_TEXTURE_SIZE 0x84F8 #define PGM_GL_MIRRORED_REPEAT 0x8370 #define PGM_GL_TEXTURE0 0x84C0 #define PGM_GL_TEXTURE1 0x84C1 #define PGM_GL_TEXTURE2 0x84C2 #define PGM_GL_ACTIVE_TEXTURE 0x84E0 #define PGM_GL_MAX_TEXTURE_UNITS 0x84E2 #define PGM_GL_MULTISAMPLE 0x809D #define PGM_GL_MULTISAMPLE_FILTER_HINT 0x8534 #define PGM_GL_FRAGMENT_PROGRAM 0x8804 #define PGM_GL_PROGRAM_STRING 0x8628 #define PGM_GL_PROGRAM_FORMAT_ASCII 0x8875 #define PGM_GL_PROGRAM_ERROR_POSITION 0x864B #define PGM_GL_MAX_PROGRAM_LOCAL_PARAMETERS 0x88B4 #define PGM_GL_PROGRAM_INSTRUCTIONS 0x88A0 #define PGM_GL_MAX_PROGRAM_INSTRUCTIONS 0x88A1 #define PGM_GL_PROGRAM_NATIVE_INSTRUCTIONS 0x88A2 #define PGM_GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS 0x88A3 #define PGM_GL_PROGRAM_PARAMETERS 0x88A8 #define PGM_GL_MAX_PROGRAM_PARAMETERS 0x88A9 #define PGM_GL_PROGRAM_NATIVE_PARAMETERS 0x88AA #define PGM_GL_MAX_PROGRAM_NATIVE_PARAMETERS 0x88AB #define PGM_GL_PROGRAM_UNDER_NATIVE_LIMITS 0x88B6 #define PGM_GL_PROGRAM_ALU_INSTRUCTIONS 0x8805 #define PGM_GL_PROGRAM_TEX_INSTRUCTIONS 0x8806 #define PGM_GL_PROGRAM_TEX_INDIRECTIONS 0x8807 #define PGM_GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS 0x8808 #define PGM_GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS 0x8809 #define PGM_GL_PROGRAM_NATIVE_TEX_INDIRECTIONS 0x880A #define PGM_GL_MAX_PROGRAM_ALU_INSTRUCTIONS 0x880B #define PGM_GL_MAX_PROGRAM_TEX_INSTRUCTIONS 0x880C #define PGM_GL_MAX_PROGRAM_TEX_INDIRECTIONS 0x880D #define PGM_GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS 0x880E #define PGM_GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS 0x880F #define PGM_GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS 0x8810 #define PGM_GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 #define PGM_GL_FRAGMENT_SHADER 0x8B30 #define PGM_GL_VERTEX_SHADER 0x8B31 #define PGM_GL_OBJECT_INFO_LOG_LENGTH 0x8B84 #define PGM_GL_PROGRAM_OBJECT 0x8B40 #define PGM_GL_OBJECT_DELETE_STATUS 0x8B80 #define PGM_GL_OBJECT_COMPILE_STATUS 0x8B81 #define PGM_GL_OBJECT_LINK_STATUS 0x8B82 #define PGM_GL_OBJECT_VALIDATE_STATUS 0x8B83 #define PGM_GL_ARRAY_BUFFER 0x8892 #define PGM_GL_PIXEL_PACK_BUFFER 0x88EB #define PGM_GL_PIXEL_UNPACK_BUFFER 0x88EC #define PGM_GL_STREAM_DRAW 0x88E0 #define PGM_GL_STREAM_READ 0x88E1 #define PGM_GL_STREAM_COPY 0x88E2 #define PGM_GL_STATIC_DRAW 0x88E4 #define PGM_GL_STATIC_READ 0x88E5 #define PGM_GL_STATIC_COPY 0x88E6 #define PGM_GL_DYNAMIC_DRAW 0x88E8 #define PGM_GL_DYNAMIC_READ 0x88E9 #define PGM_GL_DYNAMIC_COPY 0x88EA #define PGM_GL_READ_ONLY 0x88B8 #define PGM_GL_WRITE_ONLY 0x88B9 #define PGM_GL_READ_WRITE 0x88BA #define PGM_GL_FRAMEBUFFER 0x8D40 #define PGM_GL_RENDERBUFFER 0x8D41 #define PGM_GL_COLOR_ATTACHMENT0 0x8CE0 #define PGM_GL_COLOR_ATTACHMENT1 0x8CE1 #define PGM_GL_DEPTH_ATTACHMENT 0x8D00 #define PGM_GL_STENCIL_ATTACHMENT 0x8D20 #define PGM_GL_FRAMEBUFFER_COMPLETE 0x8CD5 #define PGM_GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6 #define PGM_GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7 #define PGM_GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT 0x8CD8 #define PGM_GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9 #define PGM_GL_FRAMEBUFFER_INCOMPLETE_FORMATS 0x8CDA #define PGM_GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER 0x8CDB #define PGM_GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER 0x8CDC #define PGM_GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD #define PGM_GL_FRAMEBUFFER_STATUS_ERROR 0x8CDE #define PGM_GL_RENDERBUFFER_RED_SIZE 0x8D50 #define PGM_GL_RENDERBUFFER_GREEN_SIZE 0x8D51 #define PGM_GL_RENDERBUFFER_BLUE_SIZE 0x8D52 #define PGM_GL_RENDERBUFFER_ALPHA_SIZE 0x8D53 #define PGM_GL_RENDERBUFFER_DEPTH_SIZE 0x8D54 #define PGM_GL_RENDERBUFFER_STENCIL_SIZE 0x8D55 /* OpenGL type definitions */ typedef unsigned int PgmGlEnum; typedef unsigned char PgmGlBoolean; typedef char PgmGlChar; typedef unsigned int PgmGlHandle; typedef void PgmGlVoid; typedef int PgmGlInt; typedef unsigned int PgmGlUint; typedef int PgmGlSizei; typedef double PgmGlDouble; typedef float PgmGlFloat; typedef unsigned short PgmGlUshort; typedef short PgmGlShort; typedef unsigned int PgmGlBitfield; typedef double PgmGlClampd; typedef float PgmGlClampf; typedef unsigned char PgmGlUbyte; typedef ptrdiff_t PgmGlIntptr; typedef ptrdiff_t PgmGlSizeiptr; /* OpenGL function definitions */ typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_enable) (PgmGlEnum cap); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_disable) (PgmGlEnum cap); typedef PgmGlEnum (PGM_GL_API_ATTRIBUTE * pgm_gl_get_error) (PgmGlVoid); typedef PgmGlUbyte *(PGM_GL_API_ATTRIBUTE * pgm_gl_get_string) (PgmGlEnum name); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_begin) (PgmGlEnum mode); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_end) (PgmGlVoid); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_vertex_3f) (PgmGlFloat x, PgmGlFloat y, PgmGlFloat z); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_tex_coord_2f) (PgmGlFloat s, PgmGlFloat t); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_enable_client_state) (PgmGlEnum cap); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_disable_client_state) (PgmGlEnum cap); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_vertex_pointer) (PgmGlInt size, PgmGlEnum type, PgmGlSizei stride, const PgmGlVoid *ptr); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_color_pointer) (PgmGlInt size, PgmGlEnum type, PgmGlSizei stride, const PgmGlVoid *ptr); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_tex_coord_pointer) (PgmGlInt size, PgmGlEnum type, PgmGlSizei stride, const PgmGlVoid *ptr); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_draw_arrays) (PgmGlEnum mode, PgmGlInt first, PgmGlSizei count); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_multi_draw_arrays) (PgmGlEnum mode, PgmGlInt *first, PgmGlSizei *count, PgmGlSizei primcount); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_tex_env_f) (PgmGlEnum target, PgmGlEnum pname, PgmGlFloat param); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_tex_env_fv) (PgmGlEnum target, PgmGlEnum pname, const PgmGlFloat *params); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_tex_gen_i) (PgmGlEnum coord, PgmGlEnum pname, PgmGlInt param); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_tex_gen_fv) (PgmGlEnum coord, PgmGlEnum pname, const PgmGlFloat *params); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_scissor) (PgmGlInt x, PgmGlInt y, PgmGlSizei width, PgmGlSizei height); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_color_4f) (PgmGlUshort red, PgmGlUshort green, PgmGlUshort blue, PgmGlUshort alpha); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_color_4fv) (const PgmGlFloat *v); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_depth_func) (PgmGlEnum function); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_blend_func) (PgmGlEnum sfactor, PgmGlEnum dfactor); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_blend_func_separate) (PgmGlEnum srgb, PgmGlEnum drgb, PgmGlEnum salpha, PgmGlEnum dalpha); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_blend_color) (PgmGlClampf red, PgmGlClampf green, PgmGlClampf blue, PgmGlClampf alpha); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_line_width) (PgmGlFloat width); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_clear) (PgmGlBitfield mask); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_clear_color) (PgmGlClampf red, PgmGlClampf green, PgmGlClampf blue, PgmGlClampf alpha); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_clear_stencil) (PgmGlInt s); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_stencil_func) (PgmGlEnum func, PgmGlInt ref, PgmGlUint mask); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_stencil_op) (PgmGlEnum fail, PgmGlEnum zfail, PgmGlEnum zpass); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_push_attrib) (PgmGlBitfield mask); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_pop_attrib) (PgmGlVoid); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_matrix_mode) (PgmGlEnum mode); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_push_matrix) (PgmGlVoid); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_pop_matrix) (PgmGlVoid); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_load_identity) (PgmGlVoid); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_load_matrix_f) (const PgmGlFloat *m); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_depth_range) (PgmGlClampd near_val, PgmGlClampd far_val); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_viewport) (PgmGlInt x, PgmGlInt y, PgmGlSizei width, PgmGlSizei height); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_raster_pos_2f) (PgmGlFloat x, PgmGlFloat y); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_bitmap) (PgmGlSizei width, PgmGlSizei height, PgmGlFloat xorig, PgmGlFloat yorig, PgmGlFloat xmove, PgmGlFloat ymove, const PgmGlUbyte *bitmap); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_read_buffer) (PgmGlEnum mode); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_draw_buffer) (PgmGlEnum mode); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_copy_pixels) (PgmGlInt x, PgmGlInt y, PgmGlSizei width, PgmGlSizei height, PgmGlEnum type); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_flush) (PgmGlVoid); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_finish) (PgmGlVoid); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_pixel_store_i) (PgmGlEnum pname, PgmGlInt param); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_frustum) (PgmGlDouble left, PgmGlDouble right, PgmGlDouble bottom, PgmGlDouble top, PgmGlDouble near_val, PgmGlDouble far_val); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_ortho) (PgmGlDouble left, PgmGlDouble right, PgmGlDouble bottom, PgmGlDouble top, PgmGlDouble near_val, PgmGlDouble far_val); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_scale_f) (PgmGlFloat x, PgmGlFloat y, PgmGlFloat z); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_translate_f) (PgmGlFloat x, PgmGlFloat y, PgmGlFloat z); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_rotate_f) (PgmGlFloat angle, PgmGlFloat x, PgmGlFloat y, PgmGlFloat z); typedef PgmGlBoolean (PGM_GL_API_ATTRIBUTE * pgm_gl_is_list) (PgmGlUint list); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_delete_lists) (PgmGlUint list, PgmGlSizei range); typedef PgmGlUint (PGM_GL_API_ATTRIBUTE * pgm_gl_gen_lists) (PgmGlSizei range); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_new_list) (PgmGlUint list, PgmGlEnum mode); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_end_list) (PgmGlVoid); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_call_list) (PgmGlUint list); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_call_lists) (PgmGlSizei n, PgmGlEnum type, const PgmGlVoid *lists); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_list_base) (PgmGlUint base); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_hint) (PgmGlEnum target, PgmGlEnum mode); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_depth_mask) (PgmGlBoolean flag); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_polygon_mode) (PgmGlEnum face, PgmGlEnum mode); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_shade_model) (PgmGlEnum mode); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_color_mask) (PgmGlBoolean red, PgmGlBoolean green, PgmGlBoolean blue, PgmGlBoolean alpha); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_read_pixels) (PgmGlInt x, PgmGlInt y, PgmGlSizei width, PgmGlSizei height, PgmGlEnum format, PgmGlEnum type, PgmGlVoid *pixels); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_get_tex_image) (PgmGlEnum target, PgmGlInt level, PgmGlEnum format, PgmGlEnum type, PgmGlVoid *pixels); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_tex_sub_image_2d) (PgmGlEnum target, PgmGlInt level, PgmGlInt xoffset, PgmGlInt yoffset, PgmGlSizei width, PgmGlSizei height, PgmGlEnum format, PgmGlEnum type, const PgmGlVoid *pixels); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_gen_textures) (PgmGlSizei n, PgmGlUint *textures); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_delete_textures) (PgmGlSizei n, const PgmGlUint *textures); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_bind_texture) (PgmGlEnum target, PgmGlUint texture); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_tex_image_2d) (PgmGlEnum target, PgmGlInt level, PgmGlInt internal_format, PgmGlSizei width, PgmGlSizei height, PgmGlInt border, PgmGlEnum format, PgmGlEnum type, const PgmGlVoid *pixels); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_tex_parameter_i) (PgmGlEnum target, PgmGlEnum pname, PgmGlInt param); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_tex_parameter_fv) (PgmGlEnum target, PgmGlEnum pname, PgmGlFloat *params); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_copy_tex_sub_image_2d) (PgmGlEnum target, PgmGlInt level, PgmGlInt xoffset, PgmGlInt yoffset, PgmGlInt x, PgmGlInt y, PgmGlSizei width, PgmGlSizei height); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_get_integer_v) (PgmGlEnum pname, PgmGlInt *params); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_get_float_v) (PgmGlEnum pname, PgmGlFloat *params); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_get_pointer_v) (PgmGlEnum pname, PgmGlVoid **params); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_active_texture) (PgmGlEnum); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_client_active_texture) (PgmGlEnum); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_gen_programs) (PgmGlSizei, PgmGlUint *); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_delete_programs) (PgmGlSizei, const PgmGlUint *); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_program_string) (PgmGlEnum, PgmGlEnum, PgmGlSizei, const PgmGlVoid *); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_bind_program) (PgmGlEnum, PgmGlUint); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_program_local_param_4fv) (PgmGlEnum, PgmGlUint, const PgmGlFloat *); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_get_program_iv) (PgmGlEnum, PgmGlEnum, PgmGlInt *); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_gen_buffers) (PgmGlSizei, PgmGlUint *buffers); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_delete_buffers) (PgmGlSizei, const PgmGlUint *buffers); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_bind_buffer) (PgmGlEnum, PgmGlUint buffer); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_buffer_data) (PgmGlEnum, PgmGlSizeiptr, const PgmGlVoid *, PgmGlEnum); typedef PgmGlVoid *(PGM_GL_API_ATTRIBUTE * pgm_gl_buffer_sub_data) (PgmGlEnum, PgmGlIntptr, PgmGlSizeiptr, const PgmGlVoid *); typedef PgmGlVoid *(PGM_GL_API_ATTRIBUTE * pgm_gl_get_buffer_sub_data) (PgmGlEnum, PgmGlIntptr, PgmGlSizeiptr, PgmGlVoid *); typedef PgmGlVoid *(PGM_GL_API_ATTRIBUTE * pgm_gl_map_buffer) (PgmGlEnum, PgmGlEnum); typedef PgmGlBoolean (PGM_GL_API_ATTRIBUTE * pgm_gl_unmap_buffer) (PgmGlEnum); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_gen_framebuffers) (PgmGlSizei, PgmGlUint *); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_delete_framebuffers) (PgmGlSizei, const PgmGlUint *); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_bind_framebuffer) (PgmGlEnum, PgmGlUint); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_framebuffer_renderbuffer) (PgmGlEnum, PgmGlEnum, PgmGlEnum, PgmGlUint); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_framebuffer_texture_2d) (PgmGlEnum, PgmGlEnum, PgmGlEnum, PgmGlUint, PgmGlInt); typedef PgmGlEnum (PGM_GL_API_ATTRIBUTE * pgm_gl_check_framebuffer_status) (PgmGlEnum); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_gen_renderbuffers) (PgmGlSizei, PgmGlUint *); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_delete_renderbuffers) (PgmGlSizei, const PgmGlUint *); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_bind_renderbuffer) (PgmGlEnum, PgmGlUint); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_renderbuffer_storage) (PgmGlEnum, PgmGlEnum, PgmGlSizei, PgmGlSizei); typedef PgmGlVoid (PGM_GL_API_ATTRIBUTE * pgm_gl_get_renderbuffer_parameter_iv) (PgmGlEnum, PgmGlEnum, PgmGlInt *); G_BEGIN_DECLS #endif /* __PGM_GL_DEFS_H__ */ pigment-0.3.17/plugins/opengl/pgmcontext.h0000644000175000017500000002641711205034416015502 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment OpenGL plugin * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ #ifndef __PGM_CONTEXT_H__ #define __PGM_CONTEXT_H__ /* pgmcontext.h and pgmbackend.h/pgmglviewport.h include eachother */ typedef struct _PgmContext PgmContext; typedef struct _PgmContextTask PgmContextTask; typedef struct _PgmContextProcAddress PgmContextProcAddress; #include "pgmtexture.h" #include "pgmprogram.h" #include "pgmbackend.h" #include "pgmglviewport.h" #include "pgmgldefs.h" G_BEGIN_DECLS /* Context locking */ #define PGM_CONTEXT_LOCK(context) (g_mutex_lock (context->mutex)) #define PGM_CONTEXT_UNLOCK(context) (g_mutex_unlock (context->mutex)) /* Type casting */ #define PGM_CONTEXT(obj) ((PgmContext *) (obj)) #define PGM_CONTEXT_TASK(obj) ((PgmContextTask *) (obj)) /* Task handler */ typedef void (*PgmContextTaskFunc) (PgmContext *context, gpointer data); /* Task types */ typedef enum { /* Various */ PGM_CONTEXT_PROJECTION = 0, /* Update viewport and projection matrix */ PGM_CONTEXT_SIZE, /* Update window size */ PGM_CONTEXT_TITLE, /* Update window and icon titles */ PGM_CONTEXT_DECORATION, /* Update decoration state */ PGM_CONTEXT_FULLSCREEN, /* Update fullscreen state */ PGM_CONTEXT_VISIBILITY, /* Update visibility state */ PGM_CONTEXT_ICONIFICATION, /* Update iconification state */ PGM_CONTEXT_FOCUS, /* Update window active state */ PGM_CONTEXT_ALPHA_BLENDING, /* Update alpha blending state */ PGM_CONTEXT_RESOLUTION, /* Update desktop resolution */ PGM_CONTEXT_OPACITY, /* Update opacity */ PGM_CONTEXT_CURSOR, /* Update system cursor */ PGM_CONTEXT_ICON, /* Update window icon */ PGM_CONTEXT_MESSAGE_FILTER, /* Update message filter */ PGM_CONTEXT_DRAG_STATUS, /* Update drag status */ PGM_CONTEXT_READ_PIXELS, /* Read frame buffer */ /* Texture related */ PGM_CONTEXT_GEN_TEXTURE, /* Generate texture */ PGM_CONTEXT_CLEAN_TEXTURE, /* Clean up texture */ PGM_CONTEXT_UPLOAD_TEXTURE, /* Upload texture buffer */ PGM_CONTEXT_UPDATE_TEXTURE, /* Update texture parameters */ PGM_CONTEXT_FREE_TEXTURE, /* Free texture */ /* Task types count */ PGM_CONTEXT_LAST_TASK } PgmContextTaskType; /* Context */ struct _PgmContext { PgmGlViewport *glviewport; /* PgmContext structure access mutex */ GMutex *mutex; /* Rendering thread */ GThread *render_thread; GMainContext *render_context; GMainLoop *render_loop; /* Immediate event source */ gint immediate_fd[2]; GIOChannel *immediate_out; GIOChannel *immediate_in; guint immediate_tag; /* Task queues */ GList *immediate_task; GList *deferred_task; /* Auto-update */ GMutex *update_mutex; gboolean auto_updated; gboolean prevent_update; GTimeVal update_timestamp; guint update_tag; guint requested_fps; /* Initialization lock */ GMutex *init_mutex; GCond *init_cond; gboolean initialized; /* Finalization lock */ GMutex *fini_mutex; GCond *fini_cond; gboolean fini_signal; gboolean finalized; /* Physical screen informations */ gint screen_width_mm; gint screen_height_mm; /* Limits */ gint max_texture_2d_size; gint max_texture_rect_size; gint max_texture_units; /* Pixel store modes */ gint row_length; gint skip_rows; gint skip_pixels; /* Renderer informations */ const gchar *vendor; const gchar *version_string; const gchar *renderer; const gchar *extensions; gfloat version; /* Features */ gulong feature_mask; /* OpenGL backend */ PgmBackend *backend; /* OpenGL function pointers */ PgmContextProcAddress *gl; /* Frame rate per second */ GTimeVal fps_tick_time; guint fps; /* Task handlers */ PgmContextTaskFunc task_func[PGM_CONTEXT_LAST_TASK]; #ifdef HAVE_WGL_H gboolean intel945gm_chipset; #endif /* HAVE_GL_WGL_H */ }; /* Task */ struct _PgmContextTask { /* Task type */ PgmContextTaskType type; /* Opaque pointer depending on task type */ gpointer data; }; /* OpenGL function pointers, used for extensions loading */ struct _PgmContextProcAddress { /* OpenGL core functions */ pgm_gl_enable enable; pgm_gl_disable disable; pgm_gl_get_error get_error; pgm_gl_get_string get_string; pgm_gl_begin begin; pgm_gl_end end; pgm_gl_vertex_3f vertex_3f; pgm_gl_tex_coord_2f tex_coord_2f; pgm_gl_enable_client_state enable_client_state; pgm_gl_disable_client_state disable_client_state; pgm_gl_vertex_pointer vertex_pointer; pgm_gl_color_pointer color_pointer; pgm_gl_tex_coord_pointer tex_coord_pointer; pgm_gl_draw_arrays draw_arrays; pgm_gl_tex_env_f tex_env_f; pgm_gl_tex_env_fv tex_env_fv; pgm_gl_tex_gen_i tex_gen_i; pgm_gl_tex_gen_fv tex_gen_fv; pgm_gl_color_4f color_4f; pgm_gl_color_4fv color_4fv; pgm_gl_scissor scissor; pgm_gl_depth_func depth_func; pgm_gl_blend_func blend_func; pgm_gl_line_width line_width; pgm_gl_clear clear; pgm_gl_clear_color clear_color; pgm_gl_clear_stencil clear_stencil; pgm_gl_stencil_func stencil_func; pgm_gl_stencil_op stencil_op; pgm_gl_push_attrib push_attrib; pgm_gl_pop_attrib pop_attrib; pgm_gl_matrix_mode matrix_mode; pgm_gl_push_matrix push_matrix; pgm_gl_pop_matrix pop_matrix; pgm_gl_load_identity load_identity; pgm_gl_load_matrix_f load_matrix_f; pgm_gl_depth_range depth_range; pgm_gl_viewport viewport; pgm_gl_raster_pos_2f raster_pos_2f; pgm_gl_bitmap bitmap; pgm_gl_read_buffer read_buffer; pgm_gl_draw_buffer draw_buffer; pgm_gl_copy_pixels copy_pixels; pgm_gl_flush flush; pgm_gl_finish finish; pgm_gl_pixel_store_i pixel_store_i; pgm_gl_frustum frustum; pgm_gl_ortho ortho; pgm_gl_scale_f scale_f; pgm_gl_translate_f translate_f; pgm_gl_rotate_f rotate_f; pgm_gl_is_list is_list; pgm_gl_delete_lists delete_lists; pgm_gl_gen_lists gen_lists; pgm_gl_new_list new_list; pgm_gl_end_list end_list; pgm_gl_call_list call_list; pgm_gl_call_lists call_lists; pgm_gl_list_base list_base; pgm_gl_hint hint; pgm_gl_depth_mask depth_mask; pgm_gl_polygon_mode polygon_mode; pgm_gl_shade_model shade_model; pgm_gl_color_mask color_mask; pgm_gl_read_pixels read_pixels; pgm_gl_get_tex_image get_tex_image; pgm_gl_tex_sub_image_2d tex_sub_image_2d; pgm_gl_gen_textures gen_textures; pgm_gl_delete_textures delete_textures; pgm_gl_bind_texture bind_texture; pgm_gl_tex_image_2d tex_image_2d; pgm_gl_tex_parameter_i tex_parameter_i; pgm_gl_tex_parameter_fv tex_parameter_fv; pgm_gl_copy_tex_sub_image_2d copy_tex_sub_image_2d; pgm_gl_get_integer_v get_integer_v; pgm_gl_get_float_v get_float_v; /* OpenGL extension functions */ pgm_gl_blend_func_separate blend_func_separate; pgm_gl_blend_color blend_color; pgm_gl_active_texture active_texture; pgm_gl_client_active_texture client_active_texture; pgm_gl_multi_draw_arrays multi_draw_arrays; pgm_gl_gen_programs gen_programs; pgm_gl_delete_programs delete_programs; pgm_gl_program_string program_string; pgm_gl_bind_program bind_program; pgm_gl_program_local_param_4fv program_local_param_4fv; pgm_gl_get_program_iv get_program_iv; pgm_gl_gen_buffers gen_buffers; pgm_gl_delete_buffers delete_buffers; pgm_gl_bind_buffer bind_buffer; pgm_gl_buffer_data buffer_data; pgm_gl_buffer_sub_data buffer_sub_data; pgm_gl_get_buffer_sub_data get_buffer_sub_data; pgm_gl_map_buffer map_buffer; pgm_gl_unmap_buffer unmap_buffer; pgm_gl_gen_framebuffers gen_framebuffers; pgm_gl_delete_framebuffers delete_framebuffers; pgm_gl_bind_framebuffer bind_framebuffer; pgm_gl_framebuffer_renderbuffer framebuffer_renderbuffer; pgm_gl_framebuffer_texture_2d framebuffer_texture_2d; pgm_gl_check_framebuffer_status check_framebuffer_status; pgm_gl_gen_renderbuffers gen_renderbuffers; pgm_gl_delete_renderbuffers delete_renderbuffers; pgm_gl_bind_renderbuffer bind_renderbuffer; pgm_gl_renderbuffer_storage renderbuffer_storage; pgm_gl_get_renderbuffer_parameter_iv get_renderbuffer_parameter_iv; }; /* Create a new context */ PgmContext *pgm_context_new (PgmGlViewport *glviewport); /* Free a context */ void pgm_context_free (PgmContext *context); /* Create a new task */ PgmContextTask *pgm_context_task_new (PgmContextTaskType type, gpointer data); /* Free a task */ void pgm_context_task_free (PgmContextTask *task); /* Request a rendering update */ void pgm_context_update (PgmContext *context); /* Push a new task on the immediate queue */ void pgm_context_push_immediate_task (PgmContext *context, PgmContextTask *task); /* Push a new task on the deferred queue */ void pgm_context_push_deferred_task (PgmContext *context, PgmContextTask *task); /* Remove tasks with the given data from the immediate and deferred queues */ void pgm_context_remove_tasks_with_data (PgmContext *context, gconstpointer data); /* Prevent rendering updates when window is fully obscured or iconified */ void pgm_context_prevent_update (PgmContext *context, gboolean prevent); /* Dump a formatted output on stdout showing informations about the GPU */ void pgm_context_dump_features (PgmContext *context); G_END_DECLS #endif /* __PGM_CONTEXT_H__ */ pigment-0.3.17/plugins/opengl/pgmbackend.c0000644000175000017500000003167211205034416015377 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment OpenGL plugin * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ /* * Backend is the base abstract class to subclass in order to implement a * backend for an operating system. The backend is responsible for window and * context managements and for events retrieving. For instance, UNIX systems * need a backend to glue OpenGL with XWindow using GLX, and Windows systems * need another one to glue OpenGL with the Windows API using WGL. * * One of the task of the backend is to build and push the generated events to * the Viewport. Events are created with the API of PgmEvents, and pushed to * the Viewport using the pgm_viewport_push_event() method. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include "pgmbackend.h" GST_DEBUG_CATEGORY_STATIC (pgm_gl_backend_debug); #define GST_CAT_DEFAULT pgm_gl_backend_debug static GstObjectClass *parent_class = NULL; /* GObject stuff */ PGM_DEFINE_DYNAMIC_TYPE_EXTENDED (PgmBackend, pgm_backend, GST_TYPE_OBJECT, G_TYPE_FLAG_ABSTRACT, {}) void pgm_backend_register (GTypeModule *module) { pgm_backend_register_type (module); } static void pgm_backend_dispose (GObject *object) { GST_CALL_PARENT (G_OBJECT_CLASS, dispose, (object)); } static void pgm_backend_class_init (PgmBackendClass *klass) { GObjectClass *gobject_class = (GObjectClass *) klass; GST_DEBUG_CATEGORY_INIT (pgm_gl_backend_debug, "pgm_gl_backend", 0, "OpenGL plugin: PgmBackend"); parent_class = g_type_class_peek_parent (klass); gobject_class->dispose = GST_DEBUG_FUNCPTR (pgm_backend_dispose); } static void pgm_backend_class_finalize (PgmBackendClass *klass) { return; } static void pgm_backend_init (PgmBackend *backend) { GST_DEBUG_OBJECT (backend, "init"); backend->context = NULL; } /* Public methods */ gboolean pgm_backend_create_window (PgmBackend *backend) { PgmBackendClass *klass; g_return_val_if_fail (PGM_IS_BACKEND (backend), FALSE); klass = PGM_BACKEND_GET_CLASS (backend); if (klass->create_window) return klass->create_window (backend); return FALSE; } gboolean pgm_backend_destroy_window (PgmBackend *backend) { PgmBackendClass *klass; g_return_val_if_fail (PGM_IS_BACKEND (backend), FALSE); klass = PGM_BACKEND_GET_CLASS (backend); if (klass->destroy_window) return klass->destroy_window (backend); return FALSE; } void pgm_backend_set_title (PgmBackend *backend, const gchar *title) { PgmBackendClass *klass; g_return_if_fail (PGM_IS_BACKEND (backend)); klass = PGM_BACKEND_GET_CLASS (backend); if (klass->set_title) klass->set_title (backend, title); } gboolean pgm_backend_set_decorated (PgmBackend *backend, gboolean decorated) { PgmBackendClass *klass; g_return_val_if_fail (PGM_IS_BACKEND (backend), FALSE); klass = PGM_BACKEND_GET_CLASS (backend); if (klass->set_decorated) return klass->set_decorated (backend, decorated); return FALSE; } void pgm_backend_swap_buffers (PgmBackend *backend) { PgmBackendClass *klass; g_return_if_fail (PGM_IS_BACKEND (backend)); klass = PGM_BACKEND_GET_CLASS (backend); if (klass->swap_buffers) klass->swap_buffers (backend); } gpointer pgm_backend_get_proc_address (PgmBackend *backend, const gchar *proc_name) { PgmBackendClass *klass; g_return_val_if_fail (PGM_IS_BACKEND (backend), NULL); klass = PGM_BACKEND_GET_CLASS (backend); if (klass->get_proc_address) return klass->get_proc_address (backend, proc_name); return NULL; } gboolean pgm_backend_set_size (PgmBackend *backend, gint width, gint height) { PgmBackendClass *klass; g_return_val_if_fail (PGM_IS_BACKEND (backend), FALSE); klass = PGM_BACKEND_GET_CLASS (backend); if (klass->set_size) return klass->set_size (backend, width, height); return FALSE; } gboolean pgm_backend_set_fullscreen (PgmBackend *backend, gboolean fullscreen) { PgmBackendClass *klass; g_return_val_if_fail (PGM_IS_BACKEND (backend), FALSE); klass = PGM_BACKEND_GET_CLASS (backend); if (klass->set_fullscreen) return klass->set_fullscreen (backend, fullscreen); return FALSE; } gboolean pgm_backend_set_visibility (PgmBackend *backend, gboolean visibility) { PgmBackendClass *klass; g_return_val_if_fail (PGM_IS_BACKEND (backend), FALSE); klass = PGM_BACKEND_GET_CLASS (backend); if (klass->set_visibility) klass->set_visibility (backend, visibility); return FALSE; } gboolean pgm_backend_set_iconified (PgmBackend *backend, gboolean iconified) { PgmBackendClass *klass; g_return_val_if_fail (PGM_IS_BACKEND (backend), FALSE); klass = PGM_BACKEND_GET_CLASS (backend); if (klass->set_iconified) klass->set_iconified (backend, iconified); return FALSE; } void pgm_backend_focus (PgmBackend *backend) { PgmBackendClass *klass; g_return_if_fail (PGM_IS_BACKEND (backend)); klass = PGM_BACKEND_GET_CLASS (backend); if (klass->focus) klass->focus (backend); } void pgm_backend_get_screen_size_mm (PgmBackend *backend, gint *width, gint *height) { PgmBackendClass *klass; g_return_if_fail (PGM_IS_BACKEND (backend)); klass = PGM_BACKEND_GET_CLASS (backend); if (klass->get_screen_size_mm) klass->get_screen_size_mm (backend, width, height); } gboolean pgm_backend_set_screen_resolution (PgmBackend *backend, gint width, gint height) { PgmBackendClass *klass; g_return_val_if_fail (PGM_IS_BACKEND (backend), FALSE); klass = PGM_BACKEND_GET_CLASS (backend); if (klass->set_screen_resolution) return klass->set_screen_resolution (backend, width, height); return FALSE; } void pgm_backend_get_screen_resolution (PgmBackend *backend, gint *width, gint *height) { PgmBackendClass *klass; g_return_if_fail (PGM_IS_BACKEND (backend)); klass = PGM_BACKEND_GET_CLASS (backend); if (klass->get_screen_resolution) klass->get_screen_resolution (backend, width, height); } gboolean pgm_backend_build_text_lists (PgmBackend *backend) { PgmBackendClass *klass; g_return_val_if_fail (PGM_IS_BACKEND (backend), FALSE); klass = PGM_BACKEND_GET_CLASS (backend); if (klass->build_text_lists) return klass->build_text_lists (backend); return FALSE; } gboolean pgm_backend_destroy_text_lists (PgmBackend *backend) { PgmBackendClass *klass; g_return_val_if_fail (PGM_IS_BACKEND (backend), FALSE); klass = PGM_BACKEND_GET_CLASS (backend); if (klass->destroy_text_lists) return klass->destroy_text_lists (backend); return FALSE; } void pgm_backend_raster_text (PgmBackend *backend, const gchar *text, gfloat x, gfloat y, gfloat r, gfloat g, gfloat b) { PgmBackendClass *klass; g_return_if_fail (PGM_IS_BACKEND (backend)); klass = PGM_BACKEND_GET_CLASS (backend); if (klass->raster_text) klass->raster_text (backend, text, x, y, r, g, b); } void pgm_backend_wait_for_vblank (PgmBackend *backend) { PgmBackendClass *klass; g_return_if_fail (PGM_IS_BACKEND (backend)); klass = PGM_BACKEND_GET_CLASS (backend); if (klass->wait_for_vblank) klass->wait_for_vblank (backend); } void pgm_backend_notify_startup_complete (PgmBackend *backend) { PgmBackendClass *klass; g_return_if_fail (PGM_IS_BACKEND (backend)); klass = PGM_BACKEND_GET_CLASS (backend); if (klass->notify_startup_complete) klass->notify_startup_complete (backend); } gboolean pgm_backend_set_cursor (PgmBackend *backend, PgmViewportCursor cursor) { PgmBackendClass *klass; g_return_val_if_fail (PGM_IS_BACKEND (backend), FALSE); klass = PGM_BACKEND_GET_CLASS (backend); if (klass->set_cursor) return klass->set_cursor (backend, cursor); return FALSE; } gboolean pgm_backend_set_icon (PgmBackend *backend, GdkPixbuf *icon) { PgmBackendClass *klass; g_return_val_if_fail (PGM_IS_BACKEND (backend), FALSE); klass = PGM_BACKEND_GET_CLASS (backend); if (klass->set_icon) return klass->set_icon (backend, icon); return FALSE; } void pgm_backend_set_drag_status (PgmBackend *backend, gboolean accept) { PgmBackendClass *klass; g_return_if_fail (PGM_IS_BACKEND (backend)); klass = PGM_BACKEND_GET_CLASS (backend); if (klass->set_drag_status) klass->set_drag_status (backend, accept); } gboolean pgm_backend_is_accelerated (PgmBackend *backend) { PgmBackendClass *klass; g_return_val_if_fail (PGM_IS_BACKEND (backend), FALSE); klass = PGM_BACKEND_GET_CLASS (backend); if (klass->is_accelerated) return klass->is_accelerated (backend); return FALSE; } gboolean pgm_backend_is_embeddable (PgmBackend *backend) { PgmBackendClass *klass; g_return_val_if_fail (PGM_IS_BACKEND (backend), FALSE); klass = PGM_BACKEND_GET_CLASS (backend); if (klass->is_embeddable) return klass->is_embeddable (backend); return FALSE; } void pgm_backend_get_embedding_id (PgmBackend *backend, gulong *embedding_id) { PgmBackendClass *klass; g_return_if_fail (PGM_IS_BACKEND (backend)); klass = PGM_BACKEND_GET_CLASS (backend); if (klass->get_embedding_id) klass->get_embedding_id (backend, embedding_id); } gboolean pgm_backend_has_alpha_component (PgmBackend *backend) { PgmBackendClass *klass; g_return_val_if_fail (PGM_IS_BACKEND (backend), FALSE); klass = PGM_BACKEND_GET_CLASS (backend); if (klass->has_alpha_component) return klass->has_alpha_component (backend); return FALSE; } void pgm_backend_set_message_filter (PgmBackend *backend, GList *filter) { PgmBackendClass *klass; g_return_if_fail (PGM_IS_BACKEND (backend)); klass = PGM_BACKEND_GET_CLASS (backend); if (klass->set_message_filter) klass->set_message_filter (backend, filter); } gboolean pgm_backend_has_system_buffer (PgmBackend *backend) { PgmBackendClass *klass; g_return_val_if_fail (PGM_IS_BACKEND (backend), FALSE); klass = PGM_BACKEND_GET_CLASS (backend); if (klass->has_system_buffer) return klass->has_system_buffer (backend); return FALSE; } gpointer pgm_backend_create_system_buffer_object (PgmBackend *backend, gconstpointer system_buffer, PgmImagePixelFormat format) { PgmBackendClass *klass; gpointer system_buffer_object = NULL; g_return_val_if_fail (PGM_IS_BACKEND (backend), system_buffer_object); klass = PGM_BACKEND_GET_CLASS (backend); if (klass->create_system_buffer_object) system_buffer_object = klass->create_system_buffer_object (backend, system_buffer, format); return system_buffer_object; } void pgm_backend_destroy_system_buffer_object (PgmBackend *backend, gpointer system_buffer_object) { PgmBackendClass *klass; g_return_if_fail (PGM_IS_BACKEND (backend)); klass = PGM_BACKEND_GET_CLASS (backend); if (klass->destroy_system_buffer_object) klass->destroy_system_buffer_object (backend, system_buffer_object); } void pgm_backend_bind_system_buffer_object (PgmBackend *backend, gconstpointer system_buffer_object) { PgmBackendClass *klass; g_return_if_fail (PGM_IS_BACKEND (backend)); klass = PGM_BACKEND_GET_CLASS (backend); if (klass->bind_system_buffer_object) klass->bind_system_buffer_object (backend, system_buffer_object); } void pgm_backend_release_system_buffer_object (PgmBackend *backend, gconstpointer system_buffer_object) { PgmBackendClass *klass; g_return_if_fail (PGM_IS_BACKEND (backend)); klass = PGM_BACKEND_GET_CLASS (backend); if (klass->release_system_buffer_object) klass->release_system_buffer_object (backend, system_buffer_object); } pigment-0.3.17/plugins/opengl/pgmgldrawable.c0000644000175000017500000002343511205034416016112 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment OpenGL plugin * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include "pgmgldrawable.h" GST_DEBUG_CATEGORY_STATIC (pgm_gl_drawable_debug); #define GST_CAT_DEFAULT pgm_gl_drawable_debug static GstObjectClass *parent_class = NULL; /* Private methods */ /* Update the position of the duplicated GL drawable. Since these values are accessed quite often, storing it in the GL drawable avoids putting locks on the generic drawable. */ static void update_position (PgmGlDrawable *gldrawable) { PgmDrawable *drawable = gldrawable->drawable; GST_OBJECT_LOCK (drawable); gldrawable->x = drawable->x; gldrawable->y = drawable->y; gldrawable->z = drawable->z; GST_OBJECT_UNLOCK (drawable); } /* Update the size of the duplicated GL drawable. Since these values are accessed quite often, storing it in the GL drawable avoids putting locks on the generic drawable. */ static void update_size (PgmGlDrawable *gldrawable) { PgmDrawable *drawable = gldrawable->drawable; GST_OBJECT_LOCK (drawable); gldrawable->width = drawable->width; gldrawable->height = drawable->height; GST_OBJECT_UNLOCK (drawable); } /* GObject stuff */ PGM_DEFINE_DYNAMIC_TYPE_EXTENDED (PgmGlDrawable, pgm_gl_drawable, GST_TYPE_OBJECT, G_TYPE_FLAG_ABSTRACT, {}) void pgm_gl_drawable_register (GTypeModule *module) { pgm_gl_drawable_register_type (module); } static void pgm_gl_drawable_dispose (GObject *object) { PgmGlDrawable *gldrawable = PGM_GL_DRAWABLE (object); gldrawable->drawable = NULL; gldrawable->glviewport = NULL; if (gldrawable->transformation_matrix) pgm_mat4x4_free (gldrawable->transformation_matrix); GST_CALL_PARENT (G_OBJECT_CLASS, dispose, (object)); } static void pgm_gl_drawable_class_init (PgmGlDrawableClass *klass) { GObjectClass *gobject_class; GST_DEBUG_CATEGORY_INIT (pgm_gl_drawable_debug, "pgm_gl_drawable", 0, "OpenGL plugin: PgmGlDrawable"); parent_class = g_type_class_peek_parent (klass); gobject_class = G_OBJECT_CLASS (klass); /* GObject virtual table */ gobject_class->dispose = GST_DEBUG_FUNCPTR (pgm_gl_drawable_dispose); } static void pgm_gl_drawable_class_finalize (PgmGlDrawableClass *klass) { return; } static void pgm_gl_drawable_init (PgmGlDrawable *gldrawable) { /* gldrawable->drawable = NULL; */ /* gldrawable->glviewport = NULL; */ /* gldrawable->transformation_matrix = NULL; */ } /* Public methods */ void pgm_gl_drawable_sync (PgmGlDrawable *gldrawable) { PgmGlDrawableClass *klass; g_return_if_fail (PGM_IS_GL_DRAWABLE (gldrawable)); update_size (gldrawable); pgm_gl_drawable_set_position (gldrawable); pgm_gl_drawable_set_bg_color (gldrawable); pgm_gl_drawable_set_transformation_matrix (gldrawable); klass = PGM_GL_DRAWABLE_GET_CLASS (gldrawable); if (klass->sync) klass->sync (gldrawable); } void pgm_gl_drawable_draw (PgmGlDrawable *gldrawable) { PgmGlDrawableClass *klass; PgmDrawable *drawable; PgmContextProcAddress *gl; gboolean visible; g_return_if_fail (PGM_IS_GL_DRAWABLE (gldrawable)); g_return_if_fail (PGM_IS_DRAWABLE (gldrawable->drawable)); drawable = gldrawable->drawable; /* Don't draw if not visible, or if the opacity is 0 */ GST_OBJECT_LOCK (drawable); visible = (GST_OBJECT_FLAG_IS_SET (drawable, PGM_DRAWABLE_FLAG_VISIBLE)); if (visible) visible = drawable->opacity; GST_OBJECT_UNLOCK (drawable); if (!visible) return; gl = gldrawable->glviewport->context->gl; /* Push and set the modelview matrix for the drawable if needed */ if (!(gldrawable->flags & PGM_GL_DRAWABLE_IDENTITY_MATRIX)) { gl->push_matrix (); gl->load_matrix_f (gldrawable->transformation_matrix->m); } /* Batch background array if it's visible */ if (gldrawable->bg_color[3] != 0.0f) { gl->bind_texture (PGM_GL_TEXTURE_2D, 0); gl->enable_client_state (PGM_GL_VERTEX_ARRAY); gl->vertex_pointer (3, PGM_GL_FLOAT, 0, gldrawable->bg_vertex); gl->color_4fv (gldrawable->bg_color); gl->draw_arrays (PGM_GL_QUADS, 0, 4); gl->disable_client_state (PGM_GL_VERTEX_ARRAY); } klass = PGM_GL_DRAWABLE_GET_CLASS (gldrawable); if (klass && klass->draw) klass->draw (gldrawable); /* Pop the modelview matrix if needed */ if (!(gldrawable->flags & PGM_GL_DRAWABLE_IDENTITY_MATRIX)) gl->pop_matrix (); } void pgm_gl_drawable_regenerate (PgmGlDrawable *gldrawable) { PgmGlDrawableClass *klass; g_return_if_fail (PGM_IS_GL_DRAWABLE (gldrawable)); klass = PGM_GL_DRAWABLE_GET_CLASS (gldrawable); if (klass->regenerate) klass->regenerate (gldrawable); } void pgm_gl_drawable_update_projection (PgmGlDrawable *gldrawable) { PgmGlDrawableClass *klass; g_return_if_fail (PGM_IS_GL_DRAWABLE (gldrawable)); pgm_gl_drawable_set_position (gldrawable); pgm_gl_drawable_set_size (gldrawable); klass = PGM_GL_DRAWABLE_GET_CLASS (gldrawable); if (klass->update_projection) klass->update_projection (gldrawable); } void pgm_gl_drawable_set_visibility (PgmGlDrawable *gldrawable) { PgmGlDrawableClass *klass; g_return_if_fail (PGM_IS_GL_DRAWABLE (gldrawable)); klass = PGM_GL_DRAWABLE_GET_CLASS (gldrawable); if (klass->set_visibility) klass->set_visibility (gldrawable); } void pgm_gl_drawable_set_size (PgmGlDrawable *gldrawable) { PgmGlDrawableClass *klass; g_return_if_fail (PGM_IS_GL_DRAWABLE (gldrawable)); update_size (gldrawable); gldrawable->bg_vertex[3] = gldrawable->bg_vertex[0] + gldrawable->width; gldrawable->bg_vertex[6] = gldrawable->bg_vertex[9] + gldrawable->width; gldrawable->bg_vertex[10] = gldrawable->bg_vertex[1] + gldrawable->height; gldrawable->bg_vertex[7] = gldrawable->bg_vertex[4] + gldrawable->height; klass = PGM_GL_DRAWABLE_GET_CLASS (gldrawable); if (klass->set_size) klass->set_size (gldrawable); } void pgm_gl_drawable_set_position (PgmGlDrawable *gldrawable) { PgmGlDrawableClass *klass; g_return_if_fail (PGM_IS_GL_DRAWABLE (gldrawable)); update_position (gldrawable); gldrawable->bg_vertex[0] = gldrawable->x; gldrawable->bg_vertex[1] = gldrawable->y; gldrawable->bg_vertex[2] = gldrawable->z; gldrawable->bg_vertex[3] = gldrawable->x + gldrawable->width; gldrawable->bg_vertex[4] = gldrawable->y; gldrawable->bg_vertex[5] = gldrawable->z; gldrawable->bg_vertex[6] = gldrawable->x + gldrawable->width; gldrawable->bg_vertex[7] = gldrawable->y + gldrawable->height; gldrawable->bg_vertex[8] = gldrawable->z; gldrawable->bg_vertex[9] = gldrawable->x; gldrawable->bg_vertex[10] = gldrawable->y + gldrawable->height; gldrawable->bg_vertex[11] = gldrawable->z; klass = PGM_GL_DRAWABLE_GET_CLASS (gldrawable); if (klass->set_position) klass->set_position (gldrawable); } void pgm_gl_drawable_set_transformation_matrix (PgmGlDrawable *gldrawable) { PgmDrawable *drawable = gldrawable->drawable; PgmGlDrawableClass *klass; PgmMat4x4 matrix; g_return_if_fail (PGM_IS_GL_DRAWABLE (gldrawable)); klass = PGM_GL_DRAWABLE_GET_CLASS (gldrawable); /* Store the matrix */ GST_OBJECT_LOCK (drawable); pgm_mat4x4_set_from_mat4x4 (&matrix, drawable->transformation_matrix); GST_OBJECT_UNLOCK (drawable); gldrawable->transformation_matrix = pgm_mat4x4_transpose (&matrix); /* Check identity so that we can avoid pushing the matrix at rendering */ if (G_UNLIKELY (pgm_mat4x4_is_identity (gldrawable->transformation_matrix))) gldrawable->flags |= PGM_GL_DRAWABLE_IDENTITY_MATRIX; else gldrawable->flags &= ~PGM_GL_DRAWABLE_IDENTITY_MATRIX; if (klass->set_transformation_matrix) klass->set_transformation_matrix (gldrawable); } void pgm_gl_drawable_set_fg_color (PgmGlDrawable *gldrawable) { PgmGlDrawableClass *klass; g_return_if_fail (PGM_IS_GL_DRAWABLE (gldrawable)); klass = PGM_GL_DRAWABLE_GET_CLASS (gldrawable); if (klass->set_fg_color) klass->set_fg_color (gldrawable); } void pgm_gl_drawable_set_bg_color (PgmGlDrawable *gldrawable) { PgmGlDrawableClass *klass; PgmDrawable *drawable; g_return_if_fail (PGM_IS_GL_DRAWABLE (gldrawable)); drawable = gldrawable->drawable; GST_OBJECT_LOCK (drawable); gldrawable->bg_color[0] = drawable->bg_r * INV_255; gldrawable->bg_color[1] = drawable->bg_g * INV_255; gldrawable->bg_color[2] = drawable->bg_b * INV_255; gldrawable->bg_color[3] = drawable->bg_a * drawable->opacity * SQR_INV_255; GST_OBJECT_UNLOCK (drawable); klass = PGM_GL_DRAWABLE_GET_CLASS (gldrawable); if (klass->set_bg_color) klass->set_bg_color (gldrawable); } void pgm_gl_drawable_set_opacity (PgmGlDrawable *gldrawable) { PgmGlDrawableClass *klass; PgmDrawable *drawable; g_return_if_fail (PGM_IS_GL_DRAWABLE (gldrawable)); klass = PGM_GL_DRAWABLE_GET_CLASS (gldrawable); drawable = gldrawable->drawable; GST_OBJECT_LOCK (drawable); gldrawable->bg_color[3] = drawable->bg_a * drawable->opacity * SQR_INV_255; GST_OBJECT_UNLOCK (drawable); if (klass->set_opacity) klass->set_opacity (gldrawable); } pigment-0.3.17/plugins/opengl/pgmaglbackend.h0000644000175000017500000000514511205034416016064 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment OpenGL plugin * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Arek Korbik */ #ifndef __PGM_AGL_BACKEND_H__ #define __PGM_AGL_BACKEND_H__ #include #include #include "pgmbackend.h" G_BEGIN_DECLS #define PGM_TYPE_AGL_BACKEND (pgm_agl_backend_get_type ()) #define PGM_AGL_BACKEND(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), PGM_TYPE_AGL_BACKEND, PgmAglBackend)) #define PGM_AGL_BACKEND_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), PGM_TYPE_AGL_BACKEND, PgmAglBackendClass)) #define PGM_IS_AGL_BACKEND(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), PGM_TYPE_AGL_BACKEND)) #define PGM_IS_AGL_BACKEND_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), PGM_TYPE_AGL_BACKEND)) #define PGM_AGL_BACKEND_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS((obj), PGM_TYPE_AGL_BACKEND, PgmAglBackendClass)) typedef struct _PgmAglBackend PgmAglBackend; typedef struct _PgmAglBackendClass PgmAglBackendClass; struct _PgmAglBackend { PgmBackend parent; /* Window management & OS X stuff */ WindowRef win; CFBundleRef gl_bundle_ref; EventHandlerUPP app_event_handler; EventHandlerUPP win_event_handler; /* OpenGL context handling */ AGLContext ctx; AGLPixelFormat pixfmt; gint currentVS; /* Display lists to rasterize X fonts (for debugging purpose) */ guint text_lists; /* Screen informations */ gint resolution_width; gint resolution_height; gint size_mm_width; gint size_mm_height; /* Whether window and context are created */ gboolean created; }; struct _PgmAglBackendClass { PgmBackendClass parent_class; }; GType pgm_agl_backend_get_type (void) G_GNUC_CONST; PgmBackend *pgm_agl_backend_new (PgmContext *context); void pgm_agl_backend_register (GTypeModule *module); G_END_DECLS #endif /* __PGM_AGL_BACKEND_H__ */ pigment-0.3.17/plugins/opengl/pgmglimage.c0000644000175000017500000010643711205034416015417 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment OpenGL plugin * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include "pgmglimage.h" GST_DEBUG_CATEGORY_STATIC (pgm_gl_image_debug); #define GST_CAT_DEFAULT pgm_gl_image_debug static PgmGlDrawableClass *parent_class = NULL; /* Private methods */ /* Computes the image pixel aspect ratio */ static void update_image_ratio (PgmGlImage *glimage) { PgmGlDrawable *gldrawable = PGM_GL_DRAWABLE (glimage); PgmImage *image = PGM_IMAGE (gldrawable->drawable); GST_OBJECT_LOCK (image); glimage->image_ratio = (gfloat) image->par_n / image->par_d; GST_OBJECT_UNLOCK (image); } /* Computes the drawable pixel aspect ratio */ static void update_drawable_ratio (PgmGlImage *glimage) { PgmGlDrawable *gldrawable = PGM_GL_DRAWABLE (glimage); if (G_LIKELY (gldrawable->height != 0.0)) glimage->drawable_ratio = gldrawable->width / gldrawable->height; else glimage->drawable_ratio = 1.0f; } /* Updates the last position fields with the one from the drawable */ static void update_last_position (PgmGlImage *glimage) { PgmGlDrawable *gldrawable = PGM_GL_DRAWABLE (glimage); glimage->last_x = gldrawable->x; glimage->last_y = gldrawable->y; glimage->last_z = gldrawable->z; } /* Updates the alignment */ static void update_alignment (PgmGlImage *glimage) { PgmDrawable *drawable = PGM_GL_DRAWABLE (glimage)->drawable; PgmImage *image = PGM_IMAGE (drawable); PgmImageAlignment align; GST_OBJECT_LOCK (image); align = image->align; GST_OBJECT_UNLOCK (image); /* Horizontal alignment */ if (align & PGM_IMAGE_LEFT) glimage->h_align = 0.0f; else if (align & PGM_IMAGE_RIGHT) glimage->h_align = 1.0f; else glimage->h_align = 0.5f; /* Vertical alignment */ if (align & PGM_IMAGE_TOP) glimage->v_align = 0.0f; else if (align & PGM_IMAGE_BOTTOM) glimage->v_align = 1.0f; else glimage->v_align = 0.5f; } /* Updates the interpolation */ static void update_interp (PgmGlImage *glimage) { PgmGlDrawable *gldrawable = PGM_GL_DRAWABLE (glimage); PgmImage *image = PGM_IMAGE (gldrawable->drawable); PgmTexture *texture = glimage->texture; GST_OBJECT_LOCK (image); if (image->interp == PGM_IMAGE_BILINEAR) texture->filter = PGM_GL_LINEAR; else if (image->interp == PGM_IMAGE_NEAREST) texture->filter = PGM_GL_NEAREST; GST_OBJECT_UNLOCK (image); } /* Updates the wrapping */ static void update_wrapping (PgmGlImage *glimage) { PgmGlDrawable *gldrawable = PGM_GL_DRAWABLE (glimage); PgmImage *image = PGM_IMAGE (gldrawable->drawable); PgmTexture *texture = glimage->texture; GST_OBJECT_LOCK (image); if (image->wrap_s == PGM_IMAGE_CLAMP) texture->wrap_s = PGM_GL_CLAMP_TO_EDGE; else if (image->wrap_s == PGM_IMAGE_REPEAT) texture->wrap_s = PGM_GL_REPEAT; else if (image->wrap_s == PGM_IMAGE_TRANSPARENT) texture->wrap_s = PGM_GL_CLAMP_TO_BORDER; if (image->wrap_t == PGM_IMAGE_CLAMP) texture->wrap_t = PGM_GL_CLAMP_TO_EDGE; else if (image->wrap_t == PGM_IMAGE_REPEAT) texture->wrap_t = PGM_GL_REPEAT; else if (image->wrap_t == PGM_IMAGE_TRANSPARENT) texture->wrap_t = PGM_GL_CLAMP_TO_BORDER; GST_OBJECT_UNLOCK (image); } /* Updates the mapping (texture) matrix */ static void update_mapping_matrix (PgmGlImage *glimage) { PgmGlDrawable *gldrawable = PGM_GL_DRAWABLE (glimage); PgmImage *image = PGM_IMAGE (gldrawable->drawable); GST_OBJECT_LOCK (image); pgm_texture_set_matrix (glimage->texture, image->mapping_matrix); GST_OBJECT_UNLOCK (image); } /* Updates the color of the inner border vertices */ static void update_border_inner_color (PgmGlImage *glimage) { PgmDrawable *drawable = PGM_GL_DRAWABLE (glimage)->drawable; PgmGlFloat *border_color = glimage->border_color; PgmImage *image = PGM_IMAGE (drawable); gfloat r, g, b, a; guint i; /* Get the right color components */ GST_OBJECT_LOCK (drawable); r = image->border_inner_r * INV_255; g = image->border_inner_g * INV_255; b = image->border_inner_b * INV_255; a = image->border_inner_a * drawable->opacity * SQR_INV_255; GST_OBJECT_UNLOCK (drawable); /* Then set the color attribute of the inner vertices */ for (i = 0; i < 40; i += 8) { border_color[i+0] = r; border_color[i+1] = g; border_color[i+2] = b; border_color[i+3] = a; } } /* Updates the color of the outer border vertices */ static void update_border_outer_color (PgmGlImage *glimage) { PgmDrawable *drawable = PGM_GL_DRAWABLE (glimage)->drawable; PgmGlFloat *border_color = glimage->border_color; PgmImage *image = PGM_IMAGE (drawable); gfloat r, g, b, a; guint i; /* Get the right color components */ GST_OBJECT_LOCK (drawable); r = image->border_outer_r * INV_255; g = image->border_outer_g * INV_255; b = image->border_outer_b * INV_255; a = image->border_outer_a * drawable->opacity * SQR_INV_255; GST_OBJECT_UNLOCK (drawable); /* Then set the color attribute of the outer vertices */ for (i = 4; i < 44; i += 8) { border_color[i+0] = r; border_color[i+1] = g; border_color[i+2] = b; border_color[i+3] = a; } } /* Updates the border vertices */ static void set_border_vertices (PgmGlImage *glimage, gfloat border_width, gfloat border_height) { PgmGlFloat *border_vertex = glimage->border_vertex; PgmGlFloat *img_vertex = glimage->vertex; /* Here is how the border vertices are drawn using a GL_TRIANGLE_STRIP mode. * Note that the vertices 8 and 9 are not shown but are using the exact same * coordinates than respectively the vertices 0 and 1. Remember that the * projection matrix flip the scene vertically and the representation of this * schema in a Pigment scene is inverted along the y cardinal axis. * * 7------------5 * | 6--------4 | * | | | | * | 0--------2 | * 1------------3 */ /* Vertex 0 */ border_vertex[0] = img_vertex[0]; border_vertex[1] = img_vertex[1]; border_vertex[2] = img_vertex[2]; /* Vertex 1 */ border_vertex[3] = img_vertex[0] - border_width; border_vertex[4] = img_vertex[1] - border_height; border_vertex[5] = img_vertex[2]; /* Vertex 2 */ border_vertex[6] = img_vertex[3]; border_vertex[7] = img_vertex[4]; border_vertex[8] = img_vertex[5]; /* Vertex 3 */ border_vertex[9] = img_vertex[3] + border_width; border_vertex[10] = img_vertex[4] - border_height; border_vertex[11] = img_vertex[5]; /* Vertex 4 */ border_vertex[12] = img_vertex[6]; border_vertex[13] = img_vertex[7]; border_vertex[14] = img_vertex[8]; /* Vertex 5 */ border_vertex[15] = img_vertex[6] + border_width; border_vertex[16] = img_vertex[7] + border_height; border_vertex[17] = img_vertex[8]; /* Vertex 6 */ border_vertex[18] = img_vertex[9]; border_vertex[19] = img_vertex[10]; border_vertex[20] = img_vertex[11]; /* Vertex 7 */ border_vertex[21] = img_vertex[9] - border_width; border_vertex[22] = img_vertex[10] + border_height; border_vertex[23] = img_vertex[11]; /* Vertex 8, simple copy of the vertex 0 */ border_vertex[24] = border_vertex[0]; border_vertex[25] = border_vertex[1]; border_vertex[26] = border_vertex[2]; /* Vertex 9, simple copy of the vertex 1 */ border_vertex[27] = border_vertex[3]; border_vertex[28] = border_vertex[4]; border_vertex[29] = border_vertex[5]; } /* Simply copies gldrawable background vertices */ static void set_image_standard_vertices (PgmGlImage *glimage) { PgmGlDrawable *gldrawable = PGM_GL_DRAWABLE (glimage); PgmGlFloat *drb_vertex = gldrawable->bg_vertex; PgmGlFloat *img_vertex = glimage->vertex; gfloat border_width, border_height; /* Get the border sizes avoiding overlapped borders */ border_width = MIN (glimage->border_width, gldrawable->width * 0.5f); border_height = MIN (glimage->border_width, gldrawable->height * 0.5f); /* Copy the drawable vertices applying the border offset */ img_vertex[0] = drb_vertex[0] + border_width; img_vertex[1] = drb_vertex[1] + border_height; img_vertex[2] = drb_vertex[2]; img_vertex[3] = drb_vertex[3] - border_width; img_vertex[4] = img_vertex[1]; img_vertex[5] = drb_vertex[5]; img_vertex[6] = img_vertex[3]; img_vertex[7] = drb_vertex[7] - border_height; img_vertex[8] = drb_vertex[8]; img_vertex[9] = img_vertex[0]; img_vertex[10] = img_vertex[7]; img_vertex[11] = drb_vertex[11]; /* Update the border vertices if necessary */ if (glimage->border_width > 0.0f) set_border_vertices (glimage, border_width, border_height); } /* Modifies vertices for the scaled layout */ static void set_image_scaled_vertices (PgmGlImage *glimage) { PgmGlDrawable *gldrawable = PGM_GL_DRAWABLE (glimage); PgmGlFloat *drb_vertex = gldrawable->bg_vertex; PgmGlFloat *img_vertex = glimage->vertex; gfloat border_width, border_height, offset; /* Drawable width larger than image width */ if (glimage->drawable_ratio >= glimage->image_ratio) { offset = gldrawable->width - gldrawable->height * glimage->image_ratio; /* Get the border sizes avoiding overlapped borders */ border_width = MIN (glimage->border_width, (gldrawable->width - offset) / 2.0f); border_height = MIN (glimage->border_width, gldrawable->height / 2.0f); img_vertex[0] = (drb_vertex[0] + offset * glimage->h_align) + border_width; img_vertex[1] = drb_vertex[1] + border_height; img_vertex[3] = (drb_vertex[3] - offset * (1.0f - glimage->h_align)) - border_width; img_vertex[4] = drb_vertex[4] + border_height; img_vertex[6] = img_vertex[3]; img_vertex[7] = drb_vertex[7] - border_height; img_vertex[9] = img_vertex[0]; img_vertex[10] = drb_vertex[10] - border_height; } /* Drawable height larger than image height */ else { offset = gldrawable->height - gldrawable->width / glimage->image_ratio; /* Get the border sizes avoiding overlapped borders */ border_width = MIN (glimage->border_width, gldrawable->width / 2.0f); border_height = MIN (glimage->border_width, (gldrawable->height - offset) / 2.0f); img_vertex[0] = drb_vertex[0] + border_width; img_vertex[1] = (drb_vertex[1] + offset * glimage->v_align) + border_height; img_vertex[3] = drb_vertex[3] - border_width; img_vertex[4] = img_vertex[1]; img_vertex[6] = drb_vertex[6] - border_width; img_vertex[7] = (drb_vertex[7] - offset * (1.0f - glimage->v_align)) - border_height; img_vertex[9] = drb_vertex[9] + border_width; img_vertex[10] = img_vertex[7]; } /* Then simply copy the z position from the background one */ img_vertex[2] = drb_vertex[2]; img_vertex[5] = drb_vertex[5]; img_vertex[8] = drb_vertex[8]; img_vertex[11] = drb_vertex[11]; /* Update the border vertices if necessary */ if (glimage->border_width > 0.0f) set_border_vertices (glimage, border_width, border_height); } /* Modifies texture coordinates for the zoomed layout */ static void set_image_zoomed_coordinates (PgmGlImage *glimage) { PgmGlDrawable *gldrawable = PGM_GL_DRAWABLE (glimage); PgmTexture *texture = glimage->texture; gfloat max_s, max_t; gfloat offset; max_s = (gfloat) texture->width / texture->width_pot; max_t = (gfloat) texture->height / texture->height_pot; /* Adapt coordinates when drawable width is larger than image width */ if (glimage->drawable_ratio >= glimage->image_ratio) { gfloat image_height = gldrawable->width / glimage->image_ratio; offset = ((image_height - gldrawable->height) * max_t) / image_height; glimage->coord[0] = 0.0f; glimage->coord[1] = offset * glimage->v_align; glimage->coord[2] = max_s; glimage->coord[3] = glimage->coord[1]; glimage->coord[4] = max_s; glimage->coord[5] = max_t - offset * (1.0f - glimage->v_align); glimage->coord[6] = 0.0f; glimage->coord[7] = glimage->coord[5]; } /* Adapt coordinates when drawable height is larger than image height */ else { gfloat image_width = gldrawable->height * glimage->image_ratio; offset = ((image_width - gldrawable->width) * max_s) / image_width; glimage->coord[0] = offset * glimage->h_align; glimage->coord[1] = 0.0f; glimage->coord[2] = max_s - offset * (1.0f - glimage->h_align); glimage->coord[3] = 0.0f; glimage->coord[4] = glimage->coord[2]; glimage->coord[5] = max_t; glimage->coord[6] = glimage->coord[0]; glimage->coord[7] = max_t; } } /* Modifies texture coordinates to fill the whole stored texture */ static void set_image_standard_coordinates (PgmGlImage *glimage) { PgmTexture *texture = glimage->texture; glimage->coord[0] = 0.0f; glimage->coord[1] = 0.0f; glimage->coord[2] = (gfloat) texture->width / texture->width_pot; glimage->coord[3] = 0.0f; glimage->coord[4] = glimage->coord[2]; glimage->coord[5] = (gfloat) texture->height / texture->height_pot; glimage->coord[6] = 0.0f; glimage->coord[7] = glimage->coord[5]; } /* Adapts properties to a size change depending on the layout */ static void update_layout (PgmGlImage *glimage) { PgmDrawable *drawable = PGM_GL_DRAWABLE (glimage)->drawable; PgmImage *image = PGM_IMAGE (drawable); PgmImageLayoutType layout; GST_OBJECT_LOCK (image); layout = image->layout; GST_OBJECT_UNLOCK (image); switch (layout) { case PGM_IMAGE_SCALED: case PGM_IMAGE_CENTERED: /* FIXME: Not implemented yet */ case PGM_IMAGE_TILED: /* FIXME: Not implemented yet */ set_image_scaled_vertices (glimage); set_image_standard_coordinates (glimage); break; case PGM_IMAGE_ZOOMED: set_image_standard_vertices (glimage); set_image_zoomed_coordinates (glimage); break; case PGM_IMAGE_FILLED: set_image_standard_vertices (glimage); set_image_standard_coordinates (glimage); break; default: break; } } /* Adapts to a drawable position change */ static void update_vertices_position (PgmGlImage *glimage) { PgmGlDrawable *gldrawable = PGM_GL_DRAWABLE (glimage); PgmGlFloat *img_vertex = glimage->vertex; PgmGlFloat *img_border = glimage->border_vertex; gfloat x_offset, y_offset, z_offset; guint i; x_offset = gldrawable->x - glimage->last_x; y_offset = gldrawable->y - glimage->last_y; z_offset = gldrawable->z - glimage->last_z; img_vertex[0] += x_offset; img_vertex[1] += y_offset; img_vertex[2] += z_offset; img_vertex[3] += x_offset; img_vertex[4] = img_vertex[1]; img_vertex[5] = img_vertex[2]; img_vertex[6] = img_vertex[3]; img_vertex[7] += y_offset; img_vertex[8] = img_vertex[5]; img_vertex[9] = img_vertex[0]; img_vertex[10] = img_vertex[7]; img_vertex[11] = img_vertex[8]; /* Add the offsets to the border vertices, if necessary */ if (glimage->border_width > 0.0f) for (i = 0; i < 30; i += 3) { img_border[i] += x_offset; img_border[i+1] += y_offset; img_border[i+2] += z_offset; } /* And update the last position with the new one */ update_last_position (glimage); } /* Update the border_width value stored in the GL image */ static void update_border_width (PgmGlImage *glimage) { PgmDrawable *drawable = PGM_GL_DRAWABLE (glimage)->drawable; PgmImage *image = PGM_IMAGE (drawable); GST_OBJECT_LOCK (image); glimage->border_width = image->border_width; GST_OBJECT_UNLOCK (image); } /* Update the image ratio and layout of all the slaves of the given image */ static void update_slaves (PgmGlImage *glimage) { PgmGlDrawable *gldrawable = PGM_GL_DRAWABLE (glimage); PgmGlViewport *glviewport = gldrawable->glviewport; PgmImage *master = PGM_IMAGE (gldrawable->drawable); PgmGlImage *slave; GList *walk; GST_OBJECT_LOCK (master); walk = master->slaves; while (walk) { /* Retrieve the slave glimage */ GST_OBJECT_LOCK (glviewport); slave = g_hash_table_lookup (glviewport->drawable_hash, walk->data); GST_OBJECT_UNLOCK (glviewport); /* Update slave glimage parameters */ if (slave) { GST_OBJECT_UNLOCK (master); update_image_ratio (slave); update_layout (slave); GST_OBJECT_LOCK (master); } walk = walk->next; } GST_OBJECT_UNLOCK (master); } /* PgmGlDrawable methods */ static void pgm_gl_image_draw (PgmGlDrawable *gldrawable) { PgmGlImage *glimage = PGM_GL_IMAGE (gldrawable); PgmContextProcAddress *gl; /* Avoid drawing if it's not visible */ if (glimage->empty || (glimage->fg_color[3] == 0.0f)) return; gl = gldrawable->glviewport->context->gl; gl->enable_client_state (PGM_GL_VERTEX_ARRAY); gl->enable_client_state (PGM_GL_TEXTURE_COORD_ARRAY); /* Upload vertices and texture coordinates for the image */ gl->vertex_pointer (3, PGM_GL_FLOAT, 0, glimage->vertex); gl->tex_coord_pointer (2, PGM_GL_FLOAT, 0, glimage->coord); gl->color_4fv (glimage->fg_color); /* Draw the image */ pgm_texture_bind (glimage->texture); gl->draw_arrays (PGM_GL_QUADS, 0, 4); pgm_texture_unbind (glimage->texture); gl->disable_client_state (PGM_GL_TEXTURE_COORD_ARRAY); if (glimage->border_width <= 0.0f) { gl->disable_client_state (PGM_GL_VERTEX_ARRAY); } else { /* Upload vertices and colors for the border */ gl->enable_client_state (PGM_GL_COLOR_ARRAY); gl->vertex_pointer (3, PGM_GL_FLOAT, 0, glimage->border_vertex); gl->color_pointer (4, PGM_GL_FLOAT, 0, glimage->border_color); /* Draw the border */ gl->draw_arrays (PGM_GL_QUAD_STRIP, 0, 10); gl->disable_client_state (PGM_GL_COLOR_ARRAY); gl->disable_client_state (PGM_GL_VERTEX_ARRAY); } } static void pgm_gl_image_regenerate (PgmGlDrawable *gldrawable) { } static void pgm_gl_image_update_projection (PgmGlDrawable *gldrawable) { PgmGlImage *glimage = PGM_GL_IMAGE (gldrawable); update_image_ratio (glimage); update_layout (glimage); } static void pgm_gl_image_set_size (PgmGlDrawable *gldrawable) { PgmGlImage *glimage = PGM_GL_IMAGE (gldrawable); update_drawable_ratio (glimage); update_layout (glimage); } static void pgm_gl_image_set_position (PgmGlDrawable *gldrawable) { PgmGlImage *glimage = PGM_GL_IMAGE (gldrawable); update_vertices_position (glimage); } static void pgm_gl_image_set_fg_color (PgmGlDrawable *gldrawable) { PgmGlImage *glimage = PGM_GL_IMAGE (gldrawable); PgmDrawable *drawable; drawable = gldrawable->drawable; GST_OBJECT_LOCK (drawable); glimage->fg_color[0] = drawable->fg_r * INV_255; glimage->fg_color[1] = drawable->fg_g * INV_255; glimage->fg_color[2] = drawable->fg_b * INV_255; glimage->fg_color[3] = drawable->fg_a * drawable->opacity * SQR_INV_255; GST_OBJECT_UNLOCK (drawable); } static void pgm_gl_image_set_opacity (PgmGlDrawable *gldrawable) { PgmGlImage *glimage = PGM_GL_IMAGE (gldrawable); PgmDrawable *drawable = gldrawable->drawable; PgmImage *image = PGM_IMAGE (drawable); PgmGlFloat *border_color = glimage->border_color; gfloat fg_opacity, border_opacity; guint i; /* Get the opacities */ GST_OBJECT_LOCK (drawable); fg_opacity = drawable->fg_a * drawable->opacity * SQR_INV_255; border_opacity = image->border_inner_a * drawable->opacity * SQR_INV_255; GST_OBJECT_UNLOCK (drawable); /* Image alpha blending */ glimage->fg_color[3] = fg_opacity; /* Border alpha blending */ for (i = 3; i < 40; i += 4) border_color[i] = border_opacity; } static void pgm_gl_image_sync (PgmGlDrawable *gldrawable) { PgmGlImage *glimage = PGM_GL_IMAGE (gldrawable); PgmImage *image = PGM_IMAGE (gldrawable->drawable); PgmImageStorageType type; /* Synchronize various properties */ pgm_gl_image_set_fg_color (gldrawable); update_interp (glimage); update_wrapping (glimage); update_alignment (glimage); update_last_position (glimage); update_drawable_ratio (glimage); update_image_ratio (glimage); update_mapping_matrix (glimage); update_border_width (glimage); update_border_inner_color (glimage); update_border_outer_color (glimage); GST_OBJECT_LOCK (image); type = image->storage_type; GST_OBJECT_UNLOCK (image); /* Synchronize the buffer */ switch (type) { case PGM_IMAGE_FILE: pgm_gl_image_set_from_file (glimage); break; case PGM_IMAGE_BUFFER: pgm_gl_image_set_from_buffer (glimage); break; case PGM_IMAGE_GST_BUFFER: pgm_gl_image_set_from_gst_buffer (glimage); break; case PGM_IMAGE_PIXBUF: pgm_gl_image_set_from_pixbuf (glimage); break; case PGM_IMAGE_SYSTEM_BUFFER: pgm_gl_image_set_from_system_buffer (glimage); break; case PGM_IMAGE_IMAGE: pgm_gl_image_set_from_image (glimage); break; case PGM_IMAGE_EMPTY: break; default: break; } } /* GObject stuff */ PGM_DEFINE_DYNAMIC_TYPE (PgmGlImage, pgm_gl_image, PGM_TYPE_GL_DRAWABLE) void pgm_gl_image_register (GTypeModule *module) { pgm_gl_image_register_type (module); } static void pgm_gl_image_dispose (GObject *object) { PgmGlDrawable *gldrawable = PGM_GL_DRAWABLE (object); PgmGlViewport *glviewport = gldrawable->glviewport; PgmGlImage *glimage = PGM_GL_IMAGE (object); PgmImage *master = PGM_IMAGE (gldrawable->drawable); PgmContextTask *task; PgmGlImage *slave; GList *walk; /* Clean up the slaves */ GST_OBJECT_LOCK (master); walk = master->slaves; while (walk) { GST_OBJECT_LOCK (glviewport); slave = g_hash_table_lookup (glviewport->drawable_hash, walk->data); GST_OBJECT_UNLOCK (glviewport); if (slave) { slave->empty = TRUE; slave->texture = slave->native_texture; slave->image_ratio = 0.0f; } walk = walk->next; } GST_OBJECT_UNLOCK (master); gst_object_unref (gldrawable->drawable); pgm_context_remove_tasks_with_data (gldrawable->glviewport->context, glimage->native_texture); task = pgm_context_task_new (PGM_CONTEXT_FREE_TEXTURE, glimage->native_texture); pgm_context_push_immediate_task (gldrawable->glviewport->context, task); glimage->native_texture = NULL; glimage->texture = NULL; GST_CALL_PARENT (G_OBJECT_CLASS, dispose, (object)); } static void pgm_gl_image_class_init (PgmGlImageClass *klass) { GObjectClass *gobject_class; PgmGlDrawableClass *drawable_class; GST_DEBUG_CATEGORY_INIT (pgm_gl_image_debug, "pgm_gl_image", 0, "OpenGL plugin: PgmGlImage"); parent_class = g_type_class_peek_parent (klass); gobject_class = G_OBJECT_CLASS (klass); drawable_class = PGM_GL_DRAWABLE_CLASS (klass); /* GObject virtual table */ gobject_class->dispose = GST_DEBUG_FUNCPTR (pgm_gl_image_dispose); /* PgmGlDrawable virtual table */ drawable_class->sync = GST_DEBUG_FUNCPTR (pgm_gl_image_sync); drawable_class->draw = GST_DEBUG_FUNCPTR (pgm_gl_image_draw); drawable_class->regenerate = GST_DEBUG_FUNCPTR (pgm_gl_image_regenerate); drawable_class->update_projection = GST_DEBUG_FUNCPTR (pgm_gl_image_update_projection); drawable_class->set_size = GST_DEBUG_FUNCPTR (pgm_gl_image_set_size); drawable_class->set_position = GST_DEBUG_FUNCPTR (pgm_gl_image_set_position); drawable_class->set_fg_color = GST_DEBUG_FUNCPTR (pgm_gl_image_set_fg_color); drawable_class->set_opacity = GST_DEBUG_FUNCPTR (pgm_gl_image_set_opacity); } static void pgm_gl_image_class_finalize (PgmGlImageClass *klass) { return; } static void pgm_gl_image_init (PgmGlImage *glimage) { glimage->empty = TRUE; /* glimage->border_width = 0.0f; */ } /* Public methods */ PgmGlDrawable * pgm_gl_image_new (PgmDrawable *drawable, PgmGlViewport *glviewport) { PgmImage *master = PGM_IMAGE (drawable); PgmGlImage *slave; PgmGlImage *glimage; PgmGlDrawable *gldrawable; GList *walk; glimage = g_object_new (PGM_TYPE_GL_IMAGE, NULL); glimage->native_texture = pgm_texture_new (glviewport->context); glimage->texture = glimage->native_texture; gldrawable = PGM_GL_DRAWABLE (glimage); gldrawable->drawable = gst_object_ref (drawable); gldrawable->glviewport = glviewport; pgm_gl_viewport_connect_changed_callback (glviewport, gldrawable); pgm_gl_drawable_sync (gldrawable); /* Update the slaves that are in the Canvas */ GST_OBJECT_LOCK (master); walk = master->slaves; while (walk) { GST_OBJECT_LOCK (glviewport); slave = g_hash_table_lookup (glviewport->drawable_hash, walk->data); GST_OBJECT_UNLOCK (glviewport); if (slave) { slave->empty = FALSE; slave->texture = glimage->texture; update_image_ratio (slave); update_layout (slave); } walk = walk->next; } GST_OBJECT_UNLOCK (master); return gldrawable; } void pgm_gl_image_clear (PgmGlImage *glimage) { PgmGlDrawable *gldrawable = PGM_GL_DRAWABLE (glimage); PgmContextTask *task = NULL; if (glimage->empty) return; /* Request texture clean up in case it was not using a master texture */ if (glimage->texture == glimage->native_texture) { task = pgm_context_task_new (PGM_CONTEXT_CLEAN_TEXTURE, glimage->texture); pgm_context_push_immediate_task (gldrawable->glviewport->context, task); } else glimage->texture = glimage->native_texture; GST_OBJECT_LOCK (glimage); glimage->empty = TRUE; glimage->image_ratio = 0.0f; GST_OBJECT_UNLOCK (glimage); } void pgm_gl_image_set_from_file (PgmGlImage *glimage) { PgmGlDrawable *gldrawable = PGM_GL_DRAWABLE (glimage); PgmImage *image = PGM_IMAGE (gldrawable->drawable); PgmContextTask *task; GST_OBJECT_LOCK (image); if (G_UNLIKELY (!(image->storage_type == PGM_IMAGE_FILE || image->storage_type == PGM_IMAGE_IMAGE))) { GST_OBJECT_UNLOCK (image); return; } if (image->data.file.pixbuf == NULL) { GST_OBJECT_UNLOCK (image); _pgm_image_stored_from_file_load (image); return; } pgm_texture_set_pixbuf (glimage->texture, image->data.file.pixbuf); pgm_texture_set_matrix (glimage->texture, image->mapping_matrix); GST_OBJECT_UNLOCK (image); _pgm_image_stored_from_file_free (image); glimage->empty = FALSE; update_image_ratio (glimage); update_layout (glimage); update_slaves (glimage); task = pgm_context_task_new (PGM_CONTEXT_GEN_TEXTURE, glimage->texture); pgm_context_push_immediate_task (gldrawable->glviewport->context, task); task = pgm_context_task_new (PGM_CONTEXT_UPLOAD_TEXTURE, glimage->texture); pgm_context_push_deferred_task (gldrawable->glviewport->context, task); } void pgm_gl_image_set_from_buffer (PgmGlImage *glimage) { PgmGlDrawable *gldrawable = PGM_GL_DRAWABLE (glimage); PgmImage *image = PGM_IMAGE (gldrawable->drawable); PgmContextTask *task; GST_OBJECT_LOCK (image); if (G_UNLIKELY (!(image->storage_type == PGM_IMAGE_BUFFER || image->storage_type == PGM_IMAGE_IMAGE))) { GST_OBJECT_UNLOCK (image); return; } pgm_texture_set_buffer (glimage->texture, image->data.buffer.buffer, image->data.buffer.format, image->data.buffer.width, image->data.buffer.height, image->data.buffer.size, image->data.buffer.stride, FALSE); pgm_texture_set_matrix (glimage->texture, image->mapping_matrix); GST_OBJECT_UNLOCK (image); glimage->empty = FALSE; update_image_ratio (glimage); update_layout (glimage); update_slaves (glimage); task = pgm_context_task_new (PGM_CONTEXT_GEN_TEXTURE, glimage->texture); pgm_context_push_immediate_task (gldrawable->glviewport->context, task); task = pgm_context_task_new (PGM_CONTEXT_UPLOAD_TEXTURE, glimage->texture); pgm_context_push_deferred_task (gldrawable->glviewport->context, task); } void pgm_gl_image_set_from_gst_buffer (PgmGlImage *glimage) { PgmGlDrawable *gldrawable = PGM_GL_DRAWABLE (glimage); PgmImage *image = PGM_IMAGE (gldrawable->drawable); PgmContextTask *task; /* It's the first time the glimage receives a GstBuffer, let's set the * texture buffer with its different informations */ if (G_UNLIKELY (glimage->empty)) { GST_OBJECT_LOCK (image); if (G_UNLIKELY (!(image->storage_type == PGM_IMAGE_GST_BUFFER || image->storage_type == PGM_IMAGE_IMAGE))) { GST_OBJECT_UNLOCK (image); return; } pgm_texture_set_gst_buffer (glimage->texture, image->data.gst_buffer.gst_buffer, image->data.gst_buffer.format, image->data.gst_buffer.width, image->data.gst_buffer.height, image->data.gst_buffer.stride); pgm_texture_set_matrix (glimage->texture, image->mapping_matrix); GST_OBJECT_UNLOCK (image); glimage->empty = FALSE; update_image_ratio (glimage); update_layout (glimage); update_slaves (glimage); task = pgm_context_task_new (PGM_CONTEXT_GEN_TEXTURE, glimage->texture); pgm_context_push_immediate_task (gldrawable->glviewport->context, task); } /* It's not the first time, so we just need to send the updated buffer */ else { GST_OBJECT_LOCK (image); if (G_UNLIKELY (!(image->storage_type == PGM_IMAGE_GST_BUFFER || image->storage_type == PGM_IMAGE_IMAGE))) { GST_OBJECT_UNLOCK (image); return; } pgm_texture_update_gst_buffer (glimage->texture, image->data.gst_buffer.gst_buffer); GST_OBJECT_UNLOCK (image); } task = pgm_context_task_new (PGM_CONTEXT_UPLOAD_TEXTURE, glimage->texture); pgm_context_push_deferred_task (gldrawable->glviewport->context, task); } void pgm_gl_image_set_from_pixbuf (PgmGlImage *glimage) { PgmGlDrawable *gldrawable = PGM_GL_DRAWABLE (glimage); PgmImage *image = PGM_IMAGE (gldrawable->drawable); PgmContextTask *task; GST_OBJECT_LOCK (image); if (G_UNLIKELY (!(image->storage_type == PGM_IMAGE_PIXBUF || image->storage_type == PGM_IMAGE_IMAGE))) { GST_OBJECT_UNLOCK (image); return; } pgm_texture_set_pixbuf (glimage->texture, image->data.pixbuf.pixbuf); pgm_texture_set_matrix (glimage->texture, image->mapping_matrix); GST_OBJECT_UNLOCK (image); glimage->empty = FALSE; update_image_ratio (glimage); update_layout (glimage); update_slaves (glimage); task = pgm_context_task_new (PGM_CONTEXT_GEN_TEXTURE, glimage->texture); pgm_context_push_immediate_task (gldrawable->glviewport->context, task); task = pgm_context_task_new (PGM_CONTEXT_UPLOAD_TEXTURE, glimage->texture); pgm_context_push_deferred_task (gldrawable->glviewport->context, task); } void pgm_gl_image_set_from_system_buffer (PgmGlImage *glimage) { PgmGlDrawable *gldrawable = PGM_GL_DRAWABLE (glimage); PgmImage *image = PGM_IMAGE (gldrawable->drawable); PgmContextTask *task; GST_OBJECT_LOCK (image); if (!(gldrawable->glviewport->context->feature_mask & PGM_GL_FEAT_TEXTURE_NON_POWER_OF_TWO)) { GST_DEBUG_OBJECT (image, "System buffer cannot be set, the OpenGL " "implementation does not support NPOT textures"); GST_OBJECT_UNLOCK (image); return; } if (!(image->data.system_buffer.format == PGM_IMAGE_RGB || image->data.system_buffer.format == PGM_IMAGE_RGBA)) { GST_DEBUG_OBJECT (image, "System buffer cannot be set, the OpenGL plugin " "only supports RGB and RGBA color spaces"); GST_OBJECT_UNLOCK (image); return; } if (G_UNLIKELY (!(image->storage_type == PGM_IMAGE_SYSTEM_BUFFER || image->storage_type == PGM_IMAGE_IMAGE))) { GST_OBJECT_UNLOCK (image); return; } pgm_texture_set_system_buffer (glimage->texture, image->data.system_buffer.system_buffer, image->data.system_buffer.format, image->data.system_buffer.width, image->data.system_buffer.height); pgm_texture_set_matrix (glimage->texture, image->mapping_matrix); GST_OBJECT_UNLOCK (image); glimage->empty = FALSE; update_image_ratio (glimage); update_layout (glimage); update_slaves (glimage); task = pgm_context_task_new (PGM_CONTEXT_GEN_TEXTURE, glimage->texture); pgm_context_push_immediate_task (gldrawable->glviewport->context, task); } void pgm_gl_image_set_from_image (PgmGlImage *glimage) { PgmGlDrawable *gldrawable = PGM_GL_DRAWABLE (glimage); PgmImage *image = PGM_IMAGE (gldrawable->drawable); PgmGlViewport *glviewport = gldrawable->glviewport; PgmGlImage *master; /* Retrieve the master glimage */ GST_OBJECT_LOCK (image); if (G_UNLIKELY (image->storage_type != PGM_IMAGE_IMAGE)) { GST_OBJECT_UNLOCK (image); return; } GST_OBJECT_LOCK (glviewport); master = g_hash_table_lookup (glviewport->drawable_hash, image->master); GST_OBJECT_UNLOCK (glviewport); GST_OBJECT_UNLOCK (image); /* And use its texture */ if (master) { glimage->texture = master->texture; glimage->empty = FALSE; update_image_ratio (glimage); update_layout (glimage); } } void pgm_gl_image_set_mapping_matrix (PgmGlImage *glimage) { update_mapping_matrix (glimage); } void pgm_gl_image_set_alignment (PgmGlImage *glimage) { update_alignment (glimage); update_layout (glimage); } void pgm_gl_image_set_layout (PgmGlImage *glimage) { update_layout (glimage); } void pgm_gl_image_set_interp (PgmGlImage *glimage) { PgmGlDrawable *gldrawable = PGM_GL_DRAWABLE (glimage); PgmContextTask *task; update_interp (glimage); task = pgm_context_task_new (PGM_CONTEXT_UPDATE_TEXTURE, glimage->texture); pgm_context_push_immediate_task (gldrawable->glviewport->context, task); } void pgm_gl_image_set_wrapping (PgmGlImage *glimage) { PgmGlDrawable *gldrawable = PGM_GL_DRAWABLE (glimage); PgmContextTask *task; update_wrapping (glimage); task = pgm_context_task_new (PGM_CONTEXT_UPDATE_TEXTURE, glimage->texture); pgm_context_push_immediate_task (gldrawable->glviewport->context, task); } void pgm_gl_image_set_aspect_ratio (PgmGlImage *glimage) { update_image_ratio (glimage); update_layout (glimage); } void pgm_gl_image_set_border_width (PgmGlImage *glimage) { update_border_width (glimage); update_layout (glimage); } void pgm_gl_image_set_border_inner_color (PgmGlImage *glimage) { update_border_inner_color (glimage); } void pgm_gl_image_set_border_outer_color (PgmGlImage *glimage) { update_border_outer_color (glimage); } void pgm_gl_image_system_buffer_changed (PgmGlImage *glimage) { } pigment-0.3.17/plugins/opengl/pgmglxbackend.h0000644000175000017500000001545611205034416016121 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment OpenGL plugin * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ #ifndef __PGM_GLX_BACKEND_H__ #define __PGM_GLX_BACKEND_H__ #include #include /* NVIDIA has glXGetProcAddressARB guarded by GLX_GLXEXT_PROTOTYPES */ #define GLX_GLXEXT_PROTOTYPES #include #undef GLX_GLXEXT_PROTOTYPES #include "pgmbackend.h" G_BEGIN_DECLS #define PGM_TYPE_GLX_BACKEND (pgm_glx_backend_get_type ()) #define PGM_GLX_BACKEND(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), PGM_TYPE_GLX_BACKEND, PgmGlxBackend)) #define PGM_GLX_BACKEND_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), PGM_TYPE_GLX_BACKEND, PgmGlxBackendClass)) #define PGM_IS_GLX_BACKEND(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), PGM_TYPE_GLX_BACKEND)) #define PGM_IS_GLX_BACKEND_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), PGM_TYPE_GLX_BACKEND)) #define PGM_GLX_BACKEND_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS((obj), PGM_TYPE_GLX_BACKEND, PgmGlxBackendClass)) typedef struct _PgmGlxBackend PgmGlxBackend; typedef struct _PgmGlxBackendClass PgmGlxBackendClass; typedef struct _PgmGlxBackendSource PgmGlxBackendSource; typedef struct _PgmGlxBackendProcAddress PgmGlxBackendProcAddress; /* Feature flags */ typedef enum { PGM_GLX_FEAT_FBCONFIG = (1 << 0), PGM_GLX_FEAT_VIDEO_SYNC = (1 << 1), PGM_GLX_FEAT_SWAP_CONTROL = (1 << 2), PGM_GLX_FEAT_DIRECT_RENDERING = (1 << 3), PGM_GLX_FEAT_ARGB_VISUAL = (1 << 4), PGM_GLX_FEAT_TEXTURE_FROM_PIXMAP = (1 << 5) } PgmGlxBackendFeature; /* VBlank modes */ typedef enum { PGM_VBLANK_NONE, PGM_VBLANK_SWAP_CONTROL, PGM_VBLANK_VIDEO_SYNC } PgmGlxBackendVBlank; struct _PgmGlxBackend { PgmBackend parent; /* X connection and window management */ Display *dpy; Window win; gint screen; gint root; /* X protocols */ Atom *atom; gchar *startup_notification_id; Window embedder; /* X drag and drop */ Window drag_source; gboolean drag_data_has_uri; gboolean drag_data_received; gfloat drag_x, drag_y; gchar **drag_uri; /* OpenGL context handling */ PgmGlxBackendProcAddress *glx; GLXFBConfig *fbconfig; gint fbconfig_index; XVisualInfo *visual; GLXContext ctx; /* GLX informations */ const gchar *vendor; const gchar *extensions; gfloat version; guint feature_mask; /* Event handling source id */ guint event_id; /* Display lists to rasterize X fonts (for debugging purpose) */ guint text_lists; /* None cursor */ Cursor none_cursor; /* Screen informations */ gint resolution_width; gint resolution_height; gint size_mm_width; gint size_mm_height; /* Backed up window size */ gint windowed_width; gint windowed_height; /* Vertical blanking mode */ PgmGlxBackendVBlank vblank_mode; /* States */ PgmViewportState state; gboolean created; gboolean mapped; gboolean fullscreen; gboolean drag_status; }; struct _PgmGlxBackendClass { PgmBackendClass parent_class; }; /* Event source */ struct _PgmGlxBackendSource { GSource source; GPollFD poll_fd; /* Keep track of the backend */ PgmGlxBackend *glxbackend; }; /* GLX function pointers definitions */ typedef GLXFBConfig* (*PgmGlxChooseFbconfigFunc) (Display *dpy, gint screen, const gint *attrib_list, gint *nelements); typedef gint (*PgmGlxGetFbconfigAttribFunc) (Display *dpy, GLXFBConfig config, gint attribute, gint *value); typedef XVisualInfo* (*PgmGlxGetVisualFromFbconfigFunc) (Display *dpy, GLXFBConfig config); typedef GLXContext (*PgmGlxCreateNewContextFunc) (Display *dpy, GLXFBConfig config, gint render_type, GLXContext share_list, gboolean direct); typedef gint (*PgmGlxGetVideoSyncFunc) (guint *count); typedef gint (*PgmGlxWaitVideoSyncFunc) (gint divisor, gint remainder, guint *count); typedef gint (*PgmGlxSwapIntervalFunc) (gint interval); typedef void (*PgmGlxBindTexImageFunc) (Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list); typedef void (*PgmGlxReleaseTexImageFunc) (Display *dpy, GLXDrawable drawable, int buffer); /* GLX function pointers used for extensions loading */ struct _PgmGlxBackendProcAddress { PgmGlxChooseFbconfigFunc choose_fbconfig; PgmGlxGetFbconfigAttribFunc get_fbconfig_attrib; PgmGlxGetVisualFromFbconfigFunc get_visual_from_fbconfig; PgmGlxCreateNewContextFunc create_new_context; PgmGlxGetVideoSyncFunc get_video_sync; PgmGlxWaitVideoSyncFunc wait_video_sync; PgmGlxSwapIntervalFunc swap_interval; PgmGlxBindTexImageFunc bind_tex_image; PgmGlxReleaseTexImageFunc release_tex_image; }; GType pgm_glx_backend_get_type (void) G_GNUC_CONST; PgmBackend *pgm_glx_backend_new (PgmContext *context); void pgm_glx_backend_register (GTypeModule *module); G_END_DECLS #endif /* __PGM_GLX_BACKEND_H__ */ pigment-0.3.17/plugins/opengl/Makefile.in0000644000175000017500000010274011205034673015205 00000000000000# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = plugins/opengl DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/as-compiler-flag.m4 \ $(top_srcdir)/common/m4/as-version.m4 \ $(top_srcdir)/common/m4/check.m4 \ $(top_srcdir)/common/m4/gst-args.m4 \ $(top_srcdir)/common/m4/gst-check.m4 \ $(top_srcdir)/common/m4/gst-error.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/libtool.m4 \ $(top_srcdir)/common/m4/ltoptions.m4 \ $(top_srcdir)/common/m4/ltsugar.m4 \ $(top_srcdir)/common/m4/ltversion.m4 \ $(top_srcdir)/common/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(plugindir)" pluginLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(plugin_LTLIBRARIES) am__DEPENDENCIES_1 = am__libpgmopengl_la_SOURCES_DIST = pgmgl.c pgmtexture.c pgmcontext.c \ pgmbackend.c pgmglxbackend.c pgmgldrawable.c pgmglviewport.c \ pgmglimage.c pgmgltext.c pgmprogram.c pgmaglbackend.c @USE_AGL_FALSE@am_libpgmopengl_la_OBJECTS = libpgmopengl_la-pgmgl.lo \ @USE_AGL_FALSE@ libpgmopengl_la-pgmtexture.lo \ @USE_AGL_FALSE@ libpgmopengl_la-pgmcontext.lo \ @USE_AGL_FALSE@ libpgmopengl_la-pgmbackend.lo \ @USE_AGL_FALSE@ libpgmopengl_la-pgmglxbackend.lo \ @USE_AGL_FALSE@ libpgmopengl_la-pgmgldrawable.lo \ @USE_AGL_FALSE@ libpgmopengl_la-pgmglviewport.lo \ @USE_AGL_FALSE@ libpgmopengl_la-pgmglimage.lo \ @USE_AGL_FALSE@ libpgmopengl_la-pgmgltext.lo \ @USE_AGL_FALSE@ libpgmopengl_la-pgmprogram.lo @USE_AGL_TRUE@am_libpgmopengl_la_OBJECTS = libpgmopengl_la-pgmgl.lo \ @USE_AGL_TRUE@ libpgmopengl_la-pgmtexture.lo \ @USE_AGL_TRUE@ libpgmopengl_la-pgmcontext.lo \ @USE_AGL_TRUE@ libpgmopengl_la-pgmbackend.lo \ @USE_AGL_TRUE@ libpgmopengl_la-pgmaglbackend.lo \ @USE_AGL_TRUE@ libpgmopengl_la-pgmgldrawable.lo \ @USE_AGL_TRUE@ libpgmopengl_la-pgmglviewport.lo \ @USE_AGL_TRUE@ libpgmopengl_la-pgmglimage.lo \ @USE_AGL_TRUE@ libpgmopengl_la-pgmgltext.lo \ @USE_AGL_TRUE@ libpgmopengl_la-pgmprogram.lo libpgmopengl_la_OBJECTS = $(am_libpgmopengl_la_OBJECTS) libpgmopengl_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libpgmopengl_la_CFLAGS) \ $(CFLAGS) $(libpgmopengl_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libpgmopengl_la_SOURCES) DIST_SOURCES = $(am__libpgmopengl_la_SOURCES_DIST) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAIROXLIB_CFLAGS = @CAIROXLIB_CFLAGS@ CAIROXLIB_LIBS = @CAIROXLIB_LIBS@ CAIRO_CFLAGS = @CAIRO_CFLAGS@ CAIRO_LIBS = @CAIRO_LIBS@ CC = @CC@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXEEXT = @EXEEXT@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ GCOV = @GCOV@ GCOV_CFLAGS = @GCOV_CFLAGS@ GCOV_LIBS = @GCOV_LIBS@ GDKPIXBUFXLIB_CFLAGS = @GDKPIXBUFXLIB_CFLAGS@ GDKPIXBUFXLIB_LIBS = @GDKPIXBUFXLIB_LIBS@ GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@ GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ GST_0_10_13_CFLAGS = @GST_0_10_13_CFLAGS@ GST_0_10_13_LIBS = @GST_0_10_13_LIBS@ GST_10_10_CFLAGS = @GST_10_10_CFLAGS@ GST_10_10_LIBS = @GST_10_10_LIBS@ GST_10_11_CFLAGS = @GST_10_11_CFLAGS@ GST_10_11_LIBS = @GST_10_11_LIBS@ GST_10_12_CFLAGS = @GST_10_12_CFLAGS@ GST_10_12_LIBS = @GST_10_12_LIBS@ GST_10_13_CFLAGS = @GST_10_13_CFLAGS@ GST_10_13_LIBS = @GST_10_13_LIBS@ GST_10_14_CFLAGS = @GST_10_14_CFLAGS@ GST_10_14_LIBS = @GST_10_14_LIBS@ GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ GST_BASE_LIBS = @GST_BASE_LIBS@ GST_CFLAGS = @GST_CFLAGS@ GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ GST_CHECK_LIBS = @GST_CHECK_LIBS@ GST_LIBS = @GST_LIBS@ GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ GST_TOOLS_DIR = @GST_TOOLS_DIR@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_GTK_WIDGET = @HAVE_GTK_WIDGET@ HAVE_IMAGING_LIBRARY = @HAVE_IMAGING_LIBRARY@ HAVE_OPENGLES_PLUGIN = @HAVE_OPENGLES_PLUGIN@ HAVE_OPENGL_PLUGIN = @HAVE_OPENGL_PLUGIN@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGLADE_2_0_CFLAGS = @LIBGLADE_2_0_CFLAGS@ LIBGLADE_2_0_LIBS = @LIBGLADE_2_0_LIBS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENGLES_BACKEND = @OPENGLES_BACKEND@ OPENGL_BACKEND = @OPENGL_BACKEND@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ PANGOCAIRO_CFLAGS = @PANGOCAIRO_CFLAGS@ PANGOCAIRO_LIBS = @PANGOCAIRO_LIBS@ PANGO_1_16_CFLAGS = @PANGO_1_16_CFLAGS@ PANGO_1_16_LIBS = @PANGO_1_16_LIBS@ PANGO_CFLAGS = @PANGO_CFLAGS@ PANGO_LIBS = @PANGO_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL_PATH = @PERL_PATH@ PGM_ALL_CFLAGS = @PGM_ALL_CFLAGS@ PGM_ALL_LDFLAGS = @PGM_ALL_LDFLAGS@ PGM_ALL_LIBS = @PGM_ALL_LIBS@ PGM_GLES_CFLAGS = @PGM_GLES_CFLAGS@ PGM_GLES_LIBS = @PGM_GLES_LIBS@ PGM_GL_CFLAGS = @PGM_GL_CFLAGS@ PGM_GL_LIBS = @PGM_GL_LIBS@ PGM_GTKDOC_CFLAGS = @PGM_GTKDOC_CFLAGS@ PGM_LIB_LDFLAGS = @PGM_LIB_LDFLAGS@ PGM_LT_LDFLAGS = @PGM_LT_LDFLAGS@ PGM_LT_VERSION = @PGM_LT_VERSION@ PGM_MAJORMINOR = @PGM_MAJORMINOR@ PGM_OBJ_CFLAGS = @PGM_OBJ_CFLAGS@ PGM_OBJ_LIBS = @PGM_OBJ_LIBS@ PGM_OPTION_CFLAGS = @PGM_OPTION_CFLAGS@ PGM_PLUGIN_LDFLAGS = @PGM_PLUGIN_LDFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PLUGIN_PATH = @PLUGIN_PATH@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XCOMPOSITE_CFLAGS = @XCOMPOSITE_CFLAGS@ XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ XMKMF = @XMKMF@ XRENDER_CFLAGS = @XRENDER_CFLAGS@ XRENDER_LIBS = @XRENDER_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cairo_req = @cairo_req@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ glib_req = @glib_req@ gstreamer_plugins_base_req = @gstreamer_plugins_base_req@ gstreamer_req = @gstreamer_req@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pango_req = @pango_req@ pangocairo_req = @pangocairo_req@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ plugindir = @PLUGIN_PATH@ plugin_LTLIBRARIES = libpgmopengl.la libpgmopengl_la_DEPENDENCIES = $(top_builddir)/pgm/libpigment-@PGM_MAJORMINOR@.la @USE_AGL_FALSE@libpgmopengl_la_SOURCES = \ @USE_AGL_FALSE@ pgmgl.c \ @USE_AGL_FALSE@ pgmtexture.c \ @USE_AGL_FALSE@ pgmcontext.c \ @USE_AGL_FALSE@ pgmbackend.c \ @USE_AGL_FALSE@ pgmglxbackend.c \ @USE_AGL_FALSE@ pgmgldrawable.c \ @USE_AGL_FALSE@ pgmglviewport.c \ @USE_AGL_FALSE@ pgmglimage.c \ @USE_AGL_FALSE@ pgmgltext.c \ @USE_AGL_FALSE@ pgmprogram.c @USE_AGL_TRUE@libpgmopengl_la_SOURCES = \ @USE_AGL_TRUE@ pgmgl.c \ @USE_AGL_TRUE@ pgmtexture.c \ @USE_AGL_TRUE@ pgmcontext.c \ @USE_AGL_TRUE@ pgmbackend.c \ @USE_AGL_TRUE@ pgmaglbackend.c \ @USE_AGL_TRUE@ pgmgldrawable.c \ @USE_AGL_TRUE@ pgmglviewport.c \ @USE_AGL_TRUE@ pgmglimage.c \ @USE_AGL_TRUE@ pgmgltext.c \ @USE_AGL_TRUE@ pgmprogram.c libpgmopengl_la_CFLAGS = \ $(PGM_OPTION_CFLAGS) \ $(PGM_OBJ_CFLAGS) \ $(PGM_GL_CFLAGS) libpgmopengl_la_LIBADD = \ $(PGM_OBJ_LIBS) \ $(PGM_GL_LIBS) libpgmopengl_la_LDFLAGS = $(PGM_PLUGIN_LDFLAGS) noinst_HEADERS = \ pgmbackend.h \ pgmaglbackend.h \ pgmwglbackend.h \ pgmglxbackend.h \ pgmtexture.h \ pgmcontext.h \ pgmgldefs.h \ pgmgldrawable.h \ pgmglimage.h \ pgmgltext.h \ pgmglviewport.h \ pgmprogram.h CLEANFILES = \ *.gcno \ *.gcda \ *.gcov \ *.gcov.out all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/opengl/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/opengl/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(plugindir)" || $(MKDIR_P) "$(DESTDIR)$(plugindir)" @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(plugindir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(plugindir)/$$f"; \ else :; fi; \ done uninstall-pluginLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$p'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$p"; \ done clean-pluginLTLIBRARIES: -test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES) @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libpgmopengl.la: $(libpgmopengl_la_OBJECTS) $(libpgmopengl_la_DEPENDENCIES) $(libpgmopengl_la_LINK) -rpath $(plugindir) $(libpgmopengl_la_OBJECTS) $(libpgmopengl_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpgmopengl_la-pgmaglbackend.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpgmopengl_la-pgmbackend.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpgmopengl_la-pgmcontext.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpgmopengl_la-pgmgl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpgmopengl_la-pgmgldrawable.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpgmopengl_la-pgmglimage.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpgmopengl_la-pgmgltext.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpgmopengl_la-pgmglviewport.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpgmopengl_la-pgmglxbackend.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpgmopengl_la-pgmprogram.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpgmopengl_la-pgmtexture.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libpgmopengl_la-pgmgl.lo: pgmgl.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpgmopengl_la_CFLAGS) $(CFLAGS) -MT libpgmopengl_la-pgmgl.lo -MD -MP -MF $(DEPDIR)/libpgmopengl_la-pgmgl.Tpo -c -o libpgmopengl_la-pgmgl.lo `test -f 'pgmgl.c' || echo '$(srcdir)/'`pgmgl.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpgmopengl_la-pgmgl.Tpo $(DEPDIR)/libpgmopengl_la-pgmgl.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pgmgl.c' object='libpgmopengl_la-pgmgl.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpgmopengl_la_CFLAGS) $(CFLAGS) -c -o libpgmopengl_la-pgmgl.lo `test -f 'pgmgl.c' || echo '$(srcdir)/'`pgmgl.c libpgmopengl_la-pgmtexture.lo: pgmtexture.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpgmopengl_la_CFLAGS) $(CFLAGS) -MT libpgmopengl_la-pgmtexture.lo -MD -MP -MF $(DEPDIR)/libpgmopengl_la-pgmtexture.Tpo -c -o libpgmopengl_la-pgmtexture.lo `test -f 'pgmtexture.c' || echo '$(srcdir)/'`pgmtexture.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpgmopengl_la-pgmtexture.Tpo $(DEPDIR)/libpgmopengl_la-pgmtexture.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pgmtexture.c' object='libpgmopengl_la-pgmtexture.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpgmopengl_la_CFLAGS) $(CFLAGS) -c -o libpgmopengl_la-pgmtexture.lo `test -f 'pgmtexture.c' || echo '$(srcdir)/'`pgmtexture.c libpgmopengl_la-pgmcontext.lo: pgmcontext.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpgmopengl_la_CFLAGS) $(CFLAGS) -MT libpgmopengl_la-pgmcontext.lo -MD -MP -MF $(DEPDIR)/libpgmopengl_la-pgmcontext.Tpo -c -o libpgmopengl_la-pgmcontext.lo `test -f 'pgmcontext.c' || echo '$(srcdir)/'`pgmcontext.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpgmopengl_la-pgmcontext.Tpo $(DEPDIR)/libpgmopengl_la-pgmcontext.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pgmcontext.c' object='libpgmopengl_la-pgmcontext.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpgmopengl_la_CFLAGS) $(CFLAGS) -c -o libpgmopengl_la-pgmcontext.lo `test -f 'pgmcontext.c' || echo '$(srcdir)/'`pgmcontext.c libpgmopengl_la-pgmbackend.lo: pgmbackend.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpgmopengl_la_CFLAGS) $(CFLAGS) -MT libpgmopengl_la-pgmbackend.lo -MD -MP -MF $(DEPDIR)/libpgmopengl_la-pgmbackend.Tpo -c -o libpgmopengl_la-pgmbackend.lo `test -f 'pgmbackend.c' || echo '$(srcdir)/'`pgmbackend.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpgmopengl_la-pgmbackend.Tpo $(DEPDIR)/libpgmopengl_la-pgmbackend.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pgmbackend.c' object='libpgmopengl_la-pgmbackend.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpgmopengl_la_CFLAGS) $(CFLAGS) -c -o libpgmopengl_la-pgmbackend.lo `test -f 'pgmbackend.c' || echo '$(srcdir)/'`pgmbackend.c libpgmopengl_la-pgmglxbackend.lo: pgmglxbackend.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpgmopengl_la_CFLAGS) $(CFLAGS) -MT libpgmopengl_la-pgmglxbackend.lo -MD -MP -MF $(DEPDIR)/libpgmopengl_la-pgmglxbackend.Tpo -c -o libpgmopengl_la-pgmglxbackend.lo `test -f 'pgmglxbackend.c' || echo '$(srcdir)/'`pgmglxbackend.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpgmopengl_la-pgmglxbackend.Tpo $(DEPDIR)/libpgmopengl_la-pgmglxbackend.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pgmglxbackend.c' object='libpgmopengl_la-pgmglxbackend.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpgmopengl_la_CFLAGS) $(CFLAGS) -c -o libpgmopengl_la-pgmglxbackend.lo `test -f 'pgmglxbackend.c' || echo '$(srcdir)/'`pgmglxbackend.c libpgmopengl_la-pgmgldrawable.lo: pgmgldrawable.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpgmopengl_la_CFLAGS) $(CFLAGS) -MT libpgmopengl_la-pgmgldrawable.lo -MD -MP -MF $(DEPDIR)/libpgmopengl_la-pgmgldrawable.Tpo -c -o libpgmopengl_la-pgmgldrawable.lo `test -f 'pgmgldrawable.c' || echo '$(srcdir)/'`pgmgldrawable.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpgmopengl_la-pgmgldrawable.Tpo $(DEPDIR)/libpgmopengl_la-pgmgldrawable.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pgmgldrawable.c' object='libpgmopengl_la-pgmgldrawable.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpgmopengl_la_CFLAGS) $(CFLAGS) -c -o libpgmopengl_la-pgmgldrawable.lo `test -f 'pgmgldrawable.c' || echo '$(srcdir)/'`pgmgldrawable.c libpgmopengl_la-pgmglviewport.lo: pgmglviewport.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpgmopengl_la_CFLAGS) $(CFLAGS) -MT libpgmopengl_la-pgmglviewport.lo -MD -MP -MF $(DEPDIR)/libpgmopengl_la-pgmglviewport.Tpo -c -o libpgmopengl_la-pgmglviewport.lo `test -f 'pgmglviewport.c' || echo '$(srcdir)/'`pgmglviewport.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpgmopengl_la-pgmglviewport.Tpo $(DEPDIR)/libpgmopengl_la-pgmglviewport.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pgmglviewport.c' object='libpgmopengl_la-pgmglviewport.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpgmopengl_la_CFLAGS) $(CFLAGS) -c -o libpgmopengl_la-pgmglviewport.lo `test -f 'pgmglviewport.c' || echo '$(srcdir)/'`pgmglviewport.c libpgmopengl_la-pgmglimage.lo: pgmglimage.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpgmopengl_la_CFLAGS) $(CFLAGS) -MT libpgmopengl_la-pgmglimage.lo -MD -MP -MF $(DEPDIR)/libpgmopengl_la-pgmglimage.Tpo -c -o libpgmopengl_la-pgmglimage.lo `test -f 'pgmglimage.c' || echo '$(srcdir)/'`pgmglimage.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpgmopengl_la-pgmglimage.Tpo $(DEPDIR)/libpgmopengl_la-pgmglimage.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pgmglimage.c' object='libpgmopengl_la-pgmglimage.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpgmopengl_la_CFLAGS) $(CFLAGS) -c -o libpgmopengl_la-pgmglimage.lo `test -f 'pgmglimage.c' || echo '$(srcdir)/'`pgmglimage.c libpgmopengl_la-pgmgltext.lo: pgmgltext.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpgmopengl_la_CFLAGS) $(CFLAGS) -MT libpgmopengl_la-pgmgltext.lo -MD -MP -MF $(DEPDIR)/libpgmopengl_la-pgmgltext.Tpo -c -o libpgmopengl_la-pgmgltext.lo `test -f 'pgmgltext.c' || echo '$(srcdir)/'`pgmgltext.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpgmopengl_la-pgmgltext.Tpo $(DEPDIR)/libpgmopengl_la-pgmgltext.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pgmgltext.c' object='libpgmopengl_la-pgmgltext.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpgmopengl_la_CFLAGS) $(CFLAGS) -c -o libpgmopengl_la-pgmgltext.lo `test -f 'pgmgltext.c' || echo '$(srcdir)/'`pgmgltext.c libpgmopengl_la-pgmprogram.lo: pgmprogram.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpgmopengl_la_CFLAGS) $(CFLAGS) -MT libpgmopengl_la-pgmprogram.lo -MD -MP -MF $(DEPDIR)/libpgmopengl_la-pgmprogram.Tpo -c -o libpgmopengl_la-pgmprogram.lo `test -f 'pgmprogram.c' || echo '$(srcdir)/'`pgmprogram.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpgmopengl_la-pgmprogram.Tpo $(DEPDIR)/libpgmopengl_la-pgmprogram.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pgmprogram.c' object='libpgmopengl_la-pgmprogram.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpgmopengl_la_CFLAGS) $(CFLAGS) -c -o libpgmopengl_la-pgmprogram.lo `test -f 'pgmprogram.c' || echo '$(srcdir)/'`pgmprogram.c libpgmopengl_la-pgmaglbackend.lo: pgmaglbackend.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpgmopengl_la_CFLAGS) $(CFLAGS) -MT libpgmopengl_la-pgmaglbackend.lo -MD -MP -MF $(DEPDIR)/libpgmopengl_la-pgmaglbackend.Tpo -c -o libpgmopengl_la-pgmaglbackend.lo `test -f 'pgmaglbackend.c' || echo '$(srcdir)/'`pgmaglbackend.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpgmopengl_la-pgmaglbackend.Tpo $(DEPDIR)/libpgmopengl_la-pgmaglbackend.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pgmaglbackend.c' object='libpgmopengl_la-pgmaglbackend.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpgmopengl_la_CFLAGS) $(CFLAGS) -c -o libpgmopengl_la-pgmaglbackend.lo `test -f 'pgmaglbackend.c' || echo '$(srcdir)/'`pgmaglbackend.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(plugindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-pluginLTLIBRARIES install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-pluginLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-pluginLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-pluginLTLIBRARIES \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-pluginLTLIBRARIES %.c.gcov: .libs/libpgmopengl_la-%.gcda %.c LANG=C $(GCOV) -b -f -o $^ > $@.out gcov: $(libpgmopengl_la_SOURCES:=.gcov) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pigment-0.3.17/plugins/opengl/pgmglviewport.h0000644000175000017500000000716711205034416016221 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment OpenGL plugin * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ #ifndef __PGM_GL_VIEWPORT_H__ #define __PGM_GL_VIEWPORT_H__ /* pgmglviewport.h and pgmcontext.h/pgmgldrawable.h include eachother */ typedef struct _PgmGlViewport PgmGlViewport; typedef struct _PgmGlViewportClass PgmGlViewportClass; #include "pgmcontext.h" #include "pgmgldrawable.h" G_BEGIN_DECLS #define PGM_TYPE_GL_VIEWPORT (pgm_gl_viewport_get_type()) #define PGM_GL_VIEWPORT(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), PGM_TYPE_GL_VIEWPORT, PgmGlViewport)) #define PGM_GL_VIEWPORT_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), PGM_TYPE_GL_VIEWPORT, PgmGlViewportClass)) #define PGM_IS_GL_VIEWPORT(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), PGM_TYPE_GL_VIEWPORT)) #define PGM_IS_GL_VIEWPORT_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), PGM_TYPE_GL_VIEWPORT)) #define PGM_GL_VIEWPORT_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS((obj), PGM_TYPE_GL_VIEWPORT, PgmGlViewportClass)) /* FIXME: Hardly maintainable */ #define PROPERTY_CHANGED_COUNT 46 typedef void (*PgmGlDrawableChangedFunc) (PgmGlDrawable *gldrawable); struct _PgmGlViewport { PgmViewport parent; /* Canvas bound */ PgmCanvas *canvas; /* PgmGlDrawable layer lists */ GList *far_layer; GList *middle_layer; GList *near_layer; GMutex *layer_lock; /* Update task queue */ GSList *update_queue; GMutex *update_lock; /* PgmDrawable/PgmGlDrawable lookup hash */ GHashTable *drawable_hash; /* OpenGL context */ PgmContext *context; /* Signal handler IDs */ gulong add_handler; gulong remove_handler; gulong reorder_handler; gulong regenerated_handler; /* Projection informations */ gfloat projected_w; gfloat projected_h; gfloat canvas_w; gfloat canvas_h; /* Capacities mask */ gulong capacities; /* Drag status */ gboolean drag_status; }; struct _PgmGlViewportClass { PgmViewportClass parent_class; /* Drawable changed function pointers */ PgmGlDrawableChangedFunc changed_func[PROPERTY_CHANGED_COUNT]; }; /* Pixel rectangle */ typedef struct _PgmGlViewportPixelRectangle { guint x; guint y; guint width; guint height; guint8 *pixels; } PgmGlViewportPixelRectangle; GType pgm_gl_viewport_get_type (void) G_GNUC_CONST; PgmViewport *pgm_gl_viewport_new (void); void pgm_gl_viewport_register (GTypeModule *module); void pgm_gl_viewport_flush_update_queue (PgmGlViewport *glviewport); void pgm_gl_viewport_update_drawable_projection (PgmGlViewport *glviewport); void pgm_gl_viewport_connect_changed_callback (PgmGlViewport *glviewport, PgmGlDrawable *gldrawable); G_END_DECLS #endif /* __PGM_GL_VIEWPORT_H__ */ pigment-0.3.17/plugins/opengl/pgmgltext.c0000644000175000017500000010603311205034416015311 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment OpenGL plugin * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author(s): Loïc Molinari * Mirco Müller */ /* * PgmGlText uses the Pango text rendering pipeline to generate a pixmap with * the size of the drawable and then bind it as a texture. Each time a property * is changed, the pixmap is updated. When the drawable size is changed, the * pixmap is reallocated to this new one and then updated. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include "pgmgltext.h" #ifndef HAVE_PANGO_1_16 #ifndef G_OS_WIN32 #include #endif #endif /* This is the offset such that (0xFF << PGM_n_OFFSET) is the mask to access the * nth byte of a guint32 */ #if G_BYTE_ORDER == G_LITTLE_ENDIAN #define BYTE_1_OFFSET 0 #define BYTE_2_OFFSET 8 #define BYTE_3_OFFSET 16 #define BYTE_4_OFFSET 24 #else /* G_BIG_ENDIAN */ #define BYTE_1_OFFSET 24 #define BYTE_2_OFFSET 16 #define BYTE_3_OFFSET 8 #define BYTE_4_OFFSET 0 #endif /* These are the offsets to shift to access the alpha, red, green and blue bytes * in a native endian ARGB value (such as what is given by Cairo) */ #define ARGB_A_OFFSET 24 #define ARGB_R_OFFSET 16 #define ARGB_G_OFFSET 8 #define ARGB_B_OFFSET 0 /* These are the A,R,G,B component byte masks for a native endian ARGB value * (such as what is given by Cairo) */ #define ARGB_A_MASK 0xFF000000 #define ARGB_R_MASK 0x00FF0000 #define ARGB_G_MASK 0x0000FF00 #define ARGB_B_MASK 0x000000FF GST_DEBUG_CATEGORY_STATIC (pgm_gl_text_debug); #define GST_CAT_DEFAULT pgm_gl_text_debug static PgmGlDrawableClass *parent_class = NULL; /* Private methods */ /* Gets the projected height of the drawable on the viewport at z=0 */ static gfloat get_projected_height (PgmGlDrawable *gldrawable, gfloat canvas_height) { PgmGlViewport *glviewport = gldrawable->glviewport; return (canvas_height * glviewport->projected_h) / glviewport->canvas_h; } /* Gets the projected width of the drawable on the viewport at z=0 */ static gfloat get_projected_width (PgmGlDrawable *gldrawable, gfloat canvas_width) { PgmGlViewport *glviewport = gldrawable->glviewport; return (canvas_width * glviewport->projected_w) / glviewport->canvas_w; } /* Defines texture coordinates */ static void set_coordinates (PgmGlText *gltext) { PgmTexture *texture = gltext->texture; PgmGlDrawable *gldrawable = PGM_GL_DRAWABLE (gltext); PgmText *text = PGM_TEXT (gldrawable->drawable); gfloat ratio = ((gfloat) texture->height / texture->height_pot); gfloat offset; if (gltext->multiline == TRUE) offset = 0.0f; else offset = (1.0f - (text->height / gldrawable->height)) * ratio * -0.5f; gltext->coord[2] = (PgmGlFloat) texture->width / texture->width_pot; gltext->coord[4] = gltext->coord[2]; gltext->coord[1] = offset; gltext->coord[3] = gltext->coord[1]; gltext->coord[5] = (PgmGlFloat) ratio + offset; gltext->coord[7] = gltext->coord[5]; } /* Stores color depending on PgmText color normalizing components to the range * [0.0; 1.0] */ static void set_color (PgmGlText *gltext) { PgmGlDrawable *gldrawable = PGM_GL_DRAWABLE (gltext); PgmText *text = PGM_TEXT (gldrawable->drawable); GST_OBJECT_LOCK (text); gltext->color[0] = text->r * INV_255; gltext->color[1] = text->g * INV_255; gltext->color[2] = text->b * INV_255; gltext->color[3] = text->a * INV_255; GST_OBJECT_UNLOCK (text); } /* Stores outline width depending on PgmText outline width converting it * from canvas coordinates to viewport coordinates */ static void set_outline_width (PgmGlText *gltext) { PgmGlDrawable *gldrawable = PGM_GL_DRAWABLE (gltext); PgmText *text = PGM_TEXT (gldrawable->drawable); gltext->outline_width = get_projected_height (gldrawable, text->outline_width); } /* Stores outline color depending on PgmText color normalizing components to * the range [0.0; 1.0] */ static void set_outline_color (PgmGlText *gltext) { PgmGlDrawable *gldrawable = PGM_GL_DRAWABLE (gltext); PgmText *text = PGM_TEXT (gldrawable->drawable); GST_OBJECT_LOCK (text); gltext->outline_color[0] = text->outline_r * INV_255; gltext->outline_color[1] = text->outline_g * INV_255; gltext->outline_color[2] = text->outline_b * INV_255; gltext->outline_color[3] = text->outline_a * INV_255; GST_OBJECT_UNLOCK (text); } /* Stores the shadow casting state */ static void set_cast_shadow (PgmGlText *gltext) { PgmGlDrawable *gldrawable = PGM_GL_DRAWABLE (gltext); PgmText *text = PGM_TEXT (gldrawable->drawable); GST_OBJECT_LOCK (text); gltext->cast_shadow = text->cast_shadow; GST_OBJECT_UNLOCK (text); } /* Stores the shadow position */ static void set_shadow_position (PgmGlText *gltext) { PgmGlDrawable *gldrawable = PGM_GL_DRAWABLE (gltext); PgmText *text = PGM_TEXT (gldrawable->drawable); GST_OBJECT_LOCK (text); if (text->shadow_position & PGM_TEXT_SHADOW_NORTH) gltext->shadow_longitude_factor = -1.0f; else if (text->shadow_position & PGM_TEXT_SHADOW_SOUTH) gltext->shadow_longitude_factor = 1.0f; else gltext->shadow_longitude_factor = 0.0f; if (text->shadow_position & PGM_TEXT_SHADOW_WEST) gltext->shadow_latitude_factor = -1.0f; else if (text->shadow_position & PGM_TEXT_SHADOW_EAST) gltext->shadow_latitude_factor = 1.0f; else gltext->shadow_latitude_factor = 0.0f; GST_OBJECT_UNLOCK (text); } /* Stores shadow color depending on PgmText color normalizing components to the * range [0.0; 1.0] */ static void set_shadow_color (PgmGlText *gltext) { PgmGlDrawable *gldrawable = PGM_GL_DRAWABLE (gltext); PgmText *text = PGM_TEXT (gldrawable->drawable); GST_OBJECT_LOCK (text); gltext->shadow_color[0] = text->shadow_r * INV_255; gltext->shadow_color[1] = text->shadow_g * INV_255; gltext->shadow_color[2] = text->shadow_b * INV_255; gltext->shadow_color[3] = text->shadow_a * INV_255; GST_OBJECT_UNLOCK (text); } /* Defines Pango spacing depending on PgmText line spacing converting it * from canvas coordinates to viewport coordinates */ static void set_line_spacing (PgmGlText *gltext) { PgmGlDrawable *gldrawable = PGM_GL_DRAWABLE (gltext); PgmText *text = PGM_TEXT (gldrawable->drawable); gfloat line_spacing; line_spacing = get_projected_height (gldrawable, text->line_spacing); pango_layout_set_spacing (gltext->layout, pgm_lrintf (line_spacing * PANGO_SCALE)); } /* Calculates the maximum total height of a line of text for the current font * and font height set in gltext. Returns the value in device unit. */ static gfloat get_max_height (PgmGlText *gltext) { /* FIXME: we use the language of the current locale, but the text we display * may be in another language. */ PangoLanguage *language = NULL; PangoFontMetrics *metrics = NULL; gint ascent, descent; gchar *locale = NULL; #ifdef HAVE_PANGO_1_16 language = pango_language_get_default (); #else #ifdef G_OS_WIN32 locale = g_win32_getlocale (); #else locale = g_strdup (setlocale (LC_CTYPE, NULL)); #endif language = pango_language_from_string (locale); #endif metrics = pango_context_get_metrics (gltext->pango_ctx, gltext->desc, language); ascent = pango_font_metrics_get_ascent (metrics); descent = pango_font_metrics_get_descent (metrics); pango_font_metrics_unref (metrics); g_free (locale); return ((ascent + descent) / ((gfloat) PANGO_SCALE)); } /* Defines Pango font size depending on PgmText height converting it from * canvas coordinates to viewport coordinates. This function depends on * various parameters, including the font set for gltext. When setting many * parameters, it is cautious to set this one last. */ static void set_font_height (PgmGlText *gltext) { PgmGlDrawable *gldrawable = PGM_GL_DRAWABLE (gltext); PgmText *text = PGM_TEXT (gldrawable->drawable); /* All the heights here are in device unit. */ gfloat requested_height, wanted_height, max_height, font_ratio; /* text->height is a value in canvas space */ requested_height = get_projected_height (gldrawable, text->height); /* The "pango height" is something like the height of an M, but we want to set * the maximum height of a line, so we need to calculate the ratio first. */ pango_font_description_set_absolute_size (gltext->desc, requested_height * PANGO_SCALE); max_height = get_max_height (gltext); font_ratio = requested_height / max_height; wanted_height = requested_height * font_ratio; pango_font_description_set_absolute_size (gltext->desc, wanted_height * PANGO_SCALE); pango_layout_set_font_description (gltext->layout, gltext->desc); /* Precompute and store the offset to apply to the shadow based on the font * wanted height, the idea is to increase the offset with the font height. */ gltext->shadow_offset = sqrtf (wanted_height / 16.0f); } /* Defines Pango font family depending on PgmText font family */ static void set_font_family (PgmGlText *gltext) { PgmGlDrawable *gldrawable = PGM_GL_DRAWABLE (gltext); PgmText *text = PGM_TEXT (gldrawable->drawable); GST_OBJECT_LOCK (text); pango_font_description_set_family (gltext->desc, text->font_family); pango_layout_set_font_description (gltext->layout, gltext->desc); GST_OBJECT_UNLOCK (text); } /* Defines Pango text/markup depending on PgmText label */ static void set_label (PgmGlText *gltext) { PgmGlDrawable *gldrawable = PGM_GL_DRAWABLE (gltext); PgmText *text = PGM_TEXT (gldrawable->drawable); /* FIXME: defining a markup and right after a label keeps the * previous markups on the new label. */ GST_OBJECT_LOCK (text); if (text->use_markup) pango_layout_set_markup (gltext->layout, text->label, -1); else pango_layout_set_text (gltext->layout, text->label, -1); GST_OBJECT_UNLOCK (text); } /* Defines Pango width depending on PgmText width */ static void set_width (PgmGlText *gltext) { PgmGlDrawable *gldrawable = PGM_GL_DRAWABLE (gltext); /* Multiline mode */ if (gltext->multiline == TRUE) { PgmViewport *viewport = PGM_VIEWPORT (gldrawable->glviewport); gfloat non_square_ratio, size; /* Set the correct width */ size = get_projected_width (gldrawable, gldrawable->width); GST_OBJECT_LOCK (viewport); non_square_ratio = 1.0f / viewport->pixel_aspect_ratio; GST_OBJECT_UNLOCK (viewport); pango_layout_set_width (gltext->layout, pgm_lrintf (size * PANGO_SCALE * non_square_ratio)); /* Set the correct height */ size = get_projected_height (gldrawable, gldrawable->height); pango_layout_set_height (gltext->layout, pgm_lrintf (size * PANGO_SCALE)); } /* Monoline mode */ else { PgmText *text = PGM_TEXT (gldrawable->drawable); /* If the text needs to be ellipsized, set the correct width */ if (text->ellipsize != PGM_TEXT_ELLIPSIZE_NONE) { PgmViewport *viewport = PGM_VIEWPORT (gldrawable->glviewport); gfloat non_square_ratio, width; /* Set the correct width */ width = get_projected_width (gldrawable, gldrawable->width); GST_OBJECT_LOCK (viewport); non_square_ratio = 1.0f / viewport->pixel_aspect_ratio; GST_OBJECT_UNLOCK (viewport); pango_layout_set_width (gltext->layout, pgm_lrintf (width * PANGO_SCALE * non_square_ratio)); } /* Otherwise disable the width */ else pango_layout_set_width (gltext->layout, -1); /* Disable the height */ pango_layout_set_height (gltext->layout, -1); } } /* Stores the multiline state */ static void set_multiline (PgmGlText *gltext) { PgmGlDrawable *gldrawable = PGM_GL_DRAWABLE (gltext); PgmText *text = PGM_TEXT (gldrawable->drawable); gltext->multiline = text->multiline; } /* Defines Pango justification depending on PgmText justification */ static void set_justify (PgmGlText *gltext) { #ifdef HAVE_PANGO_1_16 PgmGlDrawable *gldrawable = PGM_GL_DRAWABLE (gltext); PgmText *text = PGM_TEXT (gldrawable->drawable); GST_OBJECT_LOCK (text); pango_layout_set_justify (gltext->layout, text->justify); GST_OBJECT_UNLOCK (text); #endif /* HAVE_PANGO_1_16 */ } /* Defines Pango weight depending on PgmText weight */ static void set_weight (PgmGlText *gltext) { PgmGlDrawable *gldrawable = PGM_GL_DRAWABLE (gltext); PgmText *text = PGM_TEXT (gldrawable->drawable); switch (text->weight) { case PGM_TEXT_WEIGHT_LIGHT: pango_font_description_set_weight (gltext->desc, PANGO_WEIGHT_LIGHT); break; case PGM_TEXT_WEIGHT_NORMAL: pango_font_description_set_weight (gltext->desc, PANGO_WEIGHT_NORMAL); break; case PGM_TEXT_WEIGHT_BOLD: pango_font_description_set_weight (gltext->desc, PANGO_WEIGHT_BOLD); break; default: break; } pango_layout_set_font_description (gltext->layout, gltext->desc); } /* Defines Pango stretching depending on PgmText stretching */ static void set_stretch (PgmGlText *gltext) { PgmGlDrawable *gldrawable = PGM_GL_DRAWABLE (gltext); PgmText *text = PGM_TEXT (gldrawable->drawable); switch (text->stretch) { case PGM_TEXT_STRETCH_CONDENSED: pango_font_description_set_stretch (gltext->desc, PANGO_STRETCH_CONDENSED); break; case PGM_TEXT_STRETCH_NORMAL: pango_font_description_set_stretch (gltext->desc, PANGO_STRETCH_NORMAL); break; case PGM_TEXT_STRETCH_EXPANDED: pango_font_description_set_stretch (gltext->desc, PANGO_STRETCH_EXPANDED); break; default: break; } pango_layout_set_font_description (gltext->layout, gltext->desc); } /* Defines Pango alignment depending on PgmText alignment */ static void set_alignment (PgmGlText *gltext) { PgmGlDrawable *gldrawable = PGM_GL_DRAWABLE (gltext); PgmText *text = PGM_TEXT (gldrawable->drawable); switch (text->alignment) { case PGM_TEXT_ALIGN_LEFT: pango_layout_set_alignment (gltext->layout, PANGO_ALIGN_LEFT); break; case PGM_TEXT_ALIGN_CENTER: pango_layout_set_alignment (gltext->layout, PANGO_ALIGN_CENTER); break; case PGM_TEXT_ALIGN_RIGHT: pango_layout_set_alignment (gltext->layout, PANGO_ALIGN_RIGHT); break; default: break; } } /* Defines Pango ellipsizing depending on PgmText ellipsizing */ static void set_ellipsize (PgmGlText *gltext) { PgmGlDrawable *gldrawable = PGM_GL_DRAWABLE (gltext); PgmText *text = PGM_TEXT (gldrawable->drawable); switch (text->ellipsize) { case PGM_TEXT_ELLIPSIZE_NONE: pango_layout_set_ellipsize (gltext->layout, PANGO_ELLIPSIZE_NONE); break; case PGM_TEXT_ELLIPSIZE_START: pango_layout_set_ellipsize (gltext->layout, PANGO_ELLIPSIZE_START); break; case PGM_TEXT_ELLIPSIZE_MIDDLE: pango_layout_set_ellipsize (gltext->layout, PANGO_ELLIPSIZE_MIDDLE); break; case PGM_TEXT_ELLIPSIZE_END: pango_layout_set_ellipsize (gltext->layout, PANGO_ELLIPSIZE_END); break; default: break; } } /* Defines Pango wrapping depending on PgmText wrapping */ static void set_wrap (PgmGlText *gltext) { PgmGlDrawable *gldrawable = PGM_GL_DRAWABLE (gltext); PgmText *text = PGM_TEXT (gldrawable->drawable); switch (text->wrap) { case PGM_TEXT_WRAP_WORD: pango_layout_set_wrap (gltext->layout, PANGO_WRAP_WORD); break; case PGM_TEXT_WRAP_CHAR: pango_layout_set_wrap (gltext->layout, PANGO_WRAP_CHAR); break; case PGM_TEXT_WRAP_WORD_CHAR: pango_layout_set_wrap (gltext->layout, PANGO_WRAP_WORD_CHAR); break; default: break; } } /* Defines Pango gravity depending on PgmText gravity */ static void set_gravity (PgmGlText *gltext) { #ifdef HAVE_PANGO_1_16 PgmGlDrawable *gldrawable = PGM_GL_DRAWABLE (gltext); PgmText *text = PGM_TEXT (gldrawable->drawable); switch (text->gravity) { case PGM_TEXT_GRAVITY_SOUTH: pango_context_set_base_gravity (gltext->pango_ctx, PANGO_GRAVITY_SOUTH); break; case PGM_TEXT_GRAVITY_EAST: pango_context_set_base_gravity (gltext->pango_ctx, PANGO_GRAVITY_EAST); break; case PGM_TEXT_GRAVITY_NORTH: pango_context_set_base_gravity (gltext->pango_ctx, PANGO_GRAVITY_NORTH); break; case PGM_TEXT_GRAVITY_WEST: pango_context_set_base_gravity (gltext->pango_ctx, PANGO_GRAVITY_WEST); break; case PGM_TEXT_GRAVITY_AUTO: pango_context_set_base_gravity (gltext->pango_ctx, PANGO_GRAVITY_AUTO); break; default: break; } #endif /* HAVE_PANGO_1_16 */ } /* Defines Pango style depending on PgmText style */ static void set_style (PgmGlText *gltext) { PgmGlDrawable *gldrawable = PGM_GL_DRAWABLE (gltext); PgmText *text = PGM_TEXT (gldrawable->drawable); switch (text->style) { case PGM_TEXT_STYLE_NORMAL: pango_font_description_set_style (gltext->desc, PANGO_STYLE_NORMAL); break; case PGM_TEXT_STYLE_OBLIQUE: pango_font_description_set_style (gltext->desc, PANGO_STYLE_OBLIQUE); break; case PGM_TEXT_STYLE_ITALIC: pango_font_description_set_style (gltext->desc, PANGO_STYLE_ITALIC); break; default: break; } pango_layout_set_font_description (gltext->layout, gltext->desc); } /* Defines Pango variant depending on PgmText variant */ static void set_variant (PgmGlText *gltext) { PgmGlDrawable *gldrawable = PGM_GL_DRAWABLE (gltext); PgmText *text = PGM_TEXT (gldrawable->drawable); switch (text->variant) { case PGM_TEXT_VARIANT_NORMAL: pango_font_description_set_variant (gltext->desc, PANGO_VARIANT_NORMAL); break; case PGM_TEXT_VARIANT_SMALL_CAPS: pango_font_description_set_variant (gltext->desc, PANGO_VARIANT_SMALL_CAPS); break; default: break; } pango_layout_set_font_description (gltext->layout, gltext->desc); } /* Update all the properties of the text */ static void update_properties (PgmGlText *gltext) { set_font_family (gltext); set_weight (gltext); set_stretch (gltext); set_style (gltext); set_variant (gltext); set_alignment (gltext); set_ellipsize (gltext); set_justify (gltext); set_multiline (gltext); set_line_spacing (gltext); set_width (gltext); set_coordinates (gltext); set_wrap (gltext); set_gravity (gltext); set_label (gltext); set_color (gltext); set_outline_width (gltext); set_outline_color (gltext); set_cast_shadow (gltext); set_shadow_position (gltext); set_shadow_color (gltext); set_font_height (gltext); } /* Cairo uses a premultiplied alpha blending function, pigment's not. This * function unpremultiplies the alpha of cairo's native endian ARGB buffer and * converts it to BGRA in memory order. */ static void unpremultiply_alpha (guint32 *buffer, guint32 width, guint32 height) { guint32 size = width * height; guint32 a, r, g, b; guint32 i; for (i = 0; i < size; i++) { a = (buffer[i] & ARGB_A_MASK) >> ARGB_A_OFFSET; if (a == 0) /* optimisation for most common case */ { continue; } else if (a == 255) { /* If the pixel is full alpha, we don't have to change the rgb values, * but we have to convert the pixel from native endian ARGB to memory * BGRA, which is equivalent to little endian ARGB. */ buffer[i] = GUINT32_TO_LE (buffer[i]); } else { r = (((buffer[i] & ARGB_R_MASK) >> ARGB_R_OFFSET) * 255 + a / 2) / a; g = (((buffer[i] & ARGB_G_MASK) >> ARGB_G_OFFSET) * 255 + a / 2) / a; b = (((buffer[i] & ARGB_B_MASK) >> ARGB_B_OFFSET) * 255 + a / 2) / a; /* we write the buffer in BGRA memory order (B in low address, A in * high address) in one memory access */ buffer[i] = b << BYTE_1_OFFSET | g << BYTE_2_OFFSET | r << BYTE_3_OFFSET | a << BYTE_4_OFFSET; } } } /* Allocates the pixmap, the Pango pipeline using a Cairo backend and * generates the texture */ static void create_pixmap (PgmGlText *gltext) { PgmGlDrawable *gldrawable = PGM_GL_DRAWABLE (gltext); PgmViewport *viewport = PGM_VIEWPORT (gldrawable->glviewport); PgmContextTask *task; gfloat sx, sy; /* It's important here to round the floating-point value returned by * get_projected_* using the default "to nearest" rounding mode of the FPU and * not the "truncate" mode implied by the float-to-int cast. It's faster and * allows to get the exact rasterized size required to have a direct texel to * pixel mapping. */ gltext->width = MAX (1, pgm_lrintf (get_projected_width (gldrawable, gldrawable->width))); gltext->height = MAX (1, pgm_lrintf (get_projected_height (gldrawable, gldrawable->height))); GST_OBJECT_LOCK (viewport); if (viewport->rotation == PGM_VIEWPORT_ROTATION_NONE || viewport->rotation == PGM_VIEWPORT_ROTATION_180) { sx = viewport->pixel_aspect_ratio; sy = 1.0f; } else { sx = 1.0f; sy = viewport->pixel_aspect_ratio; } GST_OBJECT_UNLOCK (viewport); gltext->size = gltext->width * gltext->height * 4; gltext->buffer = (guchar *) g_slice_alloc0 (gltext->size); gltext->surface = cairo_image_surface_create_for_data (gltext->buffer, CAIRO_FORMAT_ARGB32, gltext->width, gltext->height, gltext->width * 4); gltext->cairo_ctx = cairo_create (gltext->surface); cairo_set_font_options (gltext->cairo_ctx, gltext->font_options); cairo_scale (gltext->cairo_ctx, sx, sy); gltext->layout = pango_cairo_create_layout (gltext->cairo_ctx); gltext->pango_ctx = pango_layout_get_context (gltext->layout); pgm_texture_set_buffer (gltext->texture, gltext->buffer, PGM_IMAGE_BGRA, gltext->width, gltext->height, gltext->size, 0, TRUE); set_coordinates (gltext); /* And request a texture generation */ task = pgm_context_task_new (PGM_CONTEXT_GEN_TEXTURE, gltext->texture); pgm_context_push_immediate_task (gldrawable->glviewport->context, task); } /* Frees the pixmap and the Cairo backend */ static void free_pixmap (PgmGlText *gltext) { PgmGlDrawable *gldrawable = PGM_GL_DRAWABLE (gltext); PgmContextTask *task; g_object_unref (gltext->layout); gltext->layout = NULL; cairo_destroy (gltext->cairo_ctx); gltext->cairo_ctx = NULL; cairo_surface_destroy (gltext->surface); gltext->surface = NULL; if (gltext->buffer) { g_slice_free1 (gltext->size, (gpointer) gltext->buffer); gltext->buffer = NULL; } /* Request texture clean up */ task = pgm_context_task_new (PGM_CONTEXT_CLEAN_TEXTURE, gltext->texture); pgm_context_push_immediate_task (gldrawable->glviewport->context, task); } /* Updates text properties and draw it on the pixmap */ static void update_pixmap (PgmGlText *gltext) { PgmGlDrawable *gldrawable = PGM_GL_DRAWABLE (gltext); PgmContextTask *task; /* Clear the surface */ cairo_set_operator (gltext->cairo_ctx, CAIRO_OPERATOR_SOURCE); cairo_set_source_rgba (gltext->cairo_ctx, 0.0f, 0.0f, 0.0f, 0.0f); cairo_paint (gltext->cairo_ctx); /* Draw the text without shadow */ if (!gltext->cast_shadow) { cairo_set_source_rgba (gltext->cairo_ctx, gltext->color[0], gltext->color[1], gltext->color[2], gltext->color[3]); pango_cairo_show_layout (gltext->cairo_ctx, gltext->layout); } /* Draw the text with a shadow */ else { gdouble tx = gltext->shadow_offset * gltext->shadow_latitude_factor; gdouble ty = gltext->shadow_offset * gltext->shadow_longitude_factor; cairo_set_source_rgba (gltext->cairo_ctx, gltext->shadow_color[0], gltext->shadow_color[1], gltext->shadow_color[2], gltext->shadow_color[3]); cairo_translate (gltext->cairo_ctx, tx, ty); pango_cairo_show_layout (gltext->cairo_ctx, gltext->layout); cairo_translate (gltext->cairo_ctx, -tx, -ty); cairo_set_source_rgba (gltext->cairo_ctx, gltext->color[0], gltext->color[1], gltext->color[2], gltext->color[3]); pango_cairo_show_layout (gltext->cairo_ctx, gltext->layout); } /* And the stroke */ if (gltext->outline_width > 0.0f) { pango_cairo_layout_path (gltext->cairo_ctx, gltext->layout); cairo_set_source_rgba (gltext->cairo_ctx, gltext->outline_color[0], gltext->outline_color[1], gltext->outline_color[2], gltext->outline_color[3]); cairo_set_line_width (gltext->cairo_ctx, gltext->outline_width); cairo_stroke (gltext->cairo_ctx); } #if 0 /* Debugging */ #ifndef WIN32 cairo_surface_write_to_png (gltext->surface, "/tmp/pgmgltext.png"); #else cairo_surface_write_to_png (gltext->surface, "C:\\pgmgltext.png"); #endif /* WIN32 */ #endif /* Get rid of the premultiplied alpha */ unpremultiply_alpha ((guint32*) gltext->buffer, gltext->width, gltext->height); /* Update texture */ pgm_texture_set_buffer (gltext->texture, gltext->buffer, PGM_IMAGE_BGRA, gltext->width, gltext->height, gltext->size, 0, TRUE); /* Request texture upload */ task = pgm_context_task_new (PGM_CONTEXT_UPLOAD_TEXTURE, gltext->texture); pgm_context_push_deferred_task (gldrawable->glviewport->context, task); } /* Do a complete regeneration of a text */ static void regenerate_text (PgmGlText *gltext) { free_pixmap (gltext); create_pixmap (gltext); update_properties (gltext); update_pixmap (gltext); } /* Update a text by simply generating the new one in the current allocated * memory if the size has not changed. If it has changed, the whole text is * regenerated. */ static void update_text (PgmGlText *gltext) { if (!gltext->size_updated) update_pixmap (gltext); else { gltext->size_updated = FALSE; regenerate_text (gltext); } } /* PgmGlDrawable methods */ static void pgm_gl_text_draw (PgmGlDrawable *gldrawable) { PgmGlText *gltext = PGM_GL_TEXT (gldrawable); /* Only draw if it's visible */ if (gltext->fg_color[3] != 0.0f) { PgmContextProcAddress *gl = gldrawable->glviewport->context->gl; pgm_texture_bind (gltext->texture); gl->enable_client_state (PGM_GL_VERTEX_ARRAY); gl->enable_client_state (PGM_GL_TEXTURE_COORD_ARRAY); gl->vertex_pointer (3, PGM_GL_FLOAT, 0, gltext->vertex); gl->tex_coord_pointer (2, PGM_GL_FLOAT, 0, gltext->coord); gl->color_4fv (gltext->fg_color); gl->draw_arrays (PGM_GL_QUADS, 0, 4); gl->disable_client_state (PGM_GL_VERTEX_ARRAY); gl->disable_client_state (PGM_GL_TEXTURE_COORD_ARRAY); pgm_texture_unbind (gltext->texture); } } static void pgm_gl_text_regenerate (PgmGlDrawable *gldrawable) { PgmGlText *gltext = PGM_GL_TEXT (gldrawable); if (gltext->size_updated) { regenerate_text (gltext); gltext->size_updated = FALSE; } } static void pgm_gl_text_update_projection (PgmGlDrawable *gldrawable) { PgmGlText *gltext = PGM_GL_TEXT (gldrawable); gltext->size_updated = TRUE; } static void pgm_gl_text_set_size (PgmGlDrawable *gldrawable) { PgmGlText *gltext = PGM_GL_TEXT (gldrawable); guint32 i; for (i = 0; i < 12; i++) gltext->vertex[i] = gldrawable->bg_vertex[i]; gltext->size_updated = TRUE; } static void pgm_gl_text_set_position (PgmGlDrawable *gldrawable) { PgmGlText *gltext = PGM_GL_TEXT (gldrawable); guint32 i; for (i = 0; i < 12; i++) gltext->vertex[i] = gldrawable->bg_vertex[i]; } static void pgm_gl_text_set_fg_color (PgmGlDrawable *gldrawable) { PgmGlText *gltext = PGM_GL_TEXT (gldrawable); PgmDrawable *drawable; drawable = gldrawable->drawable; GST_OBJECT_LOCK (drawable); gltext->fg_color[0] = drawable->fg_r * INV_255; gltext->fg_color[1] = drawable->fg_g * INV_255; gltext->fg_color[2] = drawable->fg_b * INV_255; gltext->fg_color[3] = drawable->fg_a * drawable->opacity * SQR_INV_255; GST_OBJECT_UNLOCK (drawable); } static void pgm_gl_text_set_opacity (PgmGlDrawable *gldrawable) { PgmGlText *gltext = PGM_GL_TEXT (gldrawable); PgmDrawable *drawable; drawable = gldrawable->drawable; GST_OBJECT_LOCK (drawable); gltext->fg_color[3] = drawable->fg_a * drawable->opacity * SQR_INV_255; GST_OBJECT_UNLOCK (drawable); } static void pgm_gl_text_sync (PgmGlDrawable *gldrawable) { PgmGlText *gltext = PGM_GL_TEXT (gldrawable); create_pixmap (gltext); update_properties (gltext); /* Synchronize various other properties */ pgm_gl_text_set_position (gldrawable); pgm_gl_text_set_fg_color (gldrawable); update_pixmap (gltext); } /* GObject stuff */ PGM_DEFINE_DYNAMIC_TYPE (PgmGlText, pgm_gl_text, PGM_TYPE_GL_DRAWABLE) void pgm_gl_text_register (GTypeModule *module) { pgm_gl_text_register_type (module); } static void pgm_gl_text_dispose (GObject *object) { PgmGlDrawable *gldrawable = PGM_GL_DRAWABLE (object); PgmGlText *gltext = PGM_GL_TEXT (object); PgmContextTask *task; free_pixmap (gltext); pango_font_description_free (gltext->desc); gltext->desc = NULL; cairo_font_options_destroy (gltext->font_options); gltext->font_options = NULL; gst_object_unref (gldrawable->drawable); pgm_context_remove_tasks_with_data (gldrawable->glviewport->context, gltext->texture); task = pgm_context_task_new (PGM_CONTEXT_FREE_TEXTURE, gltext->texture); pgm_context_push_immediate_task (gldrawable->glviewport->context, task); gltext->texture = NULL; GST_CALL_PARENT (G_OBJECT_CLASS, dispose, (object)); } static void pgm_gl_text_class_init (PgmGlTextClass *klass) { GObjectClass *gobject_class; PgmGlDrawableClass *drawable_class; GST_DEBUG_CATEGORY_INIT (pgm_gl_text_debug, "pgm_gl_text", 0, "OpenGL plugin: PgmGlText"); parent_class = g_type_class_peek_parent (klass); gobject_class = G_OBJECT_CLASS (klass); drawable_class = PGM_GL_DRAWABLE_CLASS (klass); /* GObject virtual table */ gobject_class->dispose = GST_DEBUG_FUNCPTR (pgm_gl_text_dispose); /* PgmGlDrawable virtual table */ drawable_class->sync = GST_DEBUG_FUNCPTR (pgm_gl_text_sync); drawable_class->draw = GST_DEBUG_FUNCPTR (pgm_gl_text_draw); drawable_class->regenerate = GST_DEBUG_FUNCPTR (pgm_gl_text_regenerate); drawable_class->update_projection = GST_DEBUG_FUNCPTR (pgm_gl_text_update_projection); drawable_class->set_size = GST_DEBUG_FUNCPTR (pgm_gl_text_set_size); drawable_class->set_position = GST_DEBUG_FUNCPTR (pgm_gl_text_set_position); drawable_class->set_fg_color = GST_DEBUG_FUNCPTR (pgm_gl_text_set_fg_color); drawable_class->set_opacity = GST_DEBUG_FUNCPTR (pgm_gl_text_set_opacity); } static void pgm_gl_text_class_finalize (PgmGlTextClass *klass) { return; } static void pgm_gl_text_init (PgmGlText *gltext) { gltext->font_options = cairo_font_options_create (); cairo_font_options_set_antialias (gltext->font_options, CAIRO_ANTIALIAS_SUBPIXEL); gltext->multiline = TRUE; gltext->desc = pango_font_description_new (); /* gltext->size_updated = FALSE; */ } /* Public methods */ PgmGlDrawable * pgm_gl_text_new (PgmDrawable *drawable, PgmGlViewport *glviewport) { PgmGlDrawable *gldrawable; PgmGlText *gltext; gltext = g_object_new (PGM_TYPE_GL_TEXT, NULL); gltext->texture = pgm_texture_new (glviewport->context); gltext->texture->filter = PGM_GL_NEAREST; gltext->texture->wrap_s = PGM_GL_CLAMP_TO_BORDER; gltext->texture->wrap_t = PGM_GL_CLAMP_TO_BORDER; gldrawable = PGM_GL_DRAWABLE (gltext); gldrawable->drawable = gst_object_ref (drawable); gldrawable->glviewport = glviewport; pgm_gl_viewport_connect_changed_callback (glviewport, gldrawable); pgm_gl_drawable_sync (gldrawable); return gldrawable; } void pgm_gl_text_set_label (PgmGlText *gltext) { set_label (gltext); update_text (gltext); } void pgm_gl_text_set_markup (PgmGlText *gltext) { set_label (gltext); update_text (gltext); } void pgm_gl_text_set_font_family (PgmGlText *gltext) { set_font_family (gltext); update_text (gltext); } void pgm_gl_text_set_font_height (PgmGlText *gltext) { set_font_height (gltext); update_text (gltext); } void pgm_gl_text_set_ellipsize (PgmGlText *gltext) { set_ellipsize (gltext); set_width (gltext); set_coordinates (gltext); update_text (gltext); } void pgm_gl_text_set_justify (PgmGlText *gltext) { set_justify (gltext); update_text (gltext); } void pgm_gl_text_set_alignment (PgmGlText *gltext) { set_alignment (gltext); update_text (gltext); } void pgm_gl_text_set_wrap (PgmGlText *gltext) { set_wrap (gltext); update_text (gltext); } void pgm_gl_text_set_gravity (PgmGlText *gltext) { set_gravity (gltext); update_text (gltext); } void pgm_gl_text_set_stretch (PgmGlText *gltext) { set_stretch (gltext); update_text (gltext); } void pgm_gl_text_set_style (PgmGlText *gltext) { set_style (gltext); update_text (gltext); } void pgm_gl_text_set_variant (PgmGlText *gltext) { set_variant (gltext); update_text (gltext); } void pgm_gl_text_set_weight (PgmGlText *gltext) { set_weight (gltext); update_text (gltext); } void pgm_gl_text_set_multiline (PgmGlText *gltext) { set_multiline (gltext); set_width (gltext); set_coordinates (gltext); update_text (gltext); } void pgm_gl_text_set_line_spacing (PgmGlText *gltext) { set_line_spacing (gltext); update_text (gltext); } void pgm_gl_text_set_color (PgmGlText *gltext) { set_color (gltext); update_text (gltext); } void pgm_gl_text_set_outline_color (PgmGlText *gltext) { set_outline_color (gltext); update_text (gltext); } void pgm_gl_text_set_outline_width (PgmGlText *gltext) { set_outline_width (gltext); update_text (gltext); } void pgm_gl_text_set_cast_shadow (PgmGlText *gltext) { set_cast_shadow (gltext); update_text (gltext); } void pgm_gl_text_set_shadow_position (PgmGlText *gltext) { set_shadow_position (gltext); update_text (gltext); } void pgm_gl_text_set_shadow_color (PgmGlText *gltext) { set_shadow_color (gltext); update_text (gltext); } pigment-0.3.17/plugins/opengl/pgmprogram.h0000644000175000017500000000345111205034416015456 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment OpenGL plugin * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ #ifndef __PGM_PROGRAM_H__ #define __PGM_PROGRAM_H__ #include "pgmgldefs.h" G_BEGIN_DECLS typedef struct _PgmProgram PgmProgram; /* Program names */ typedef enum { PGM_PROGRAM_PER_PLANE_I420_RGB = 0, PGM_PROGRAM_PER_PLANE_YV12_RGB, PGM_PROGRAM_NAME_LAST } PgmProgramName; struct _PgmProgram { /* Program string */ gchar *string; guint string_len; /* Program id */ guint id; }; /* Create the fragment programs */ gboolean pgm_program_create (PgmContext *context); /* Delete the fragment programs */ void pgm_program_delete (void); /* Get a program given its name */ PgmProgram *pgm_program_get (PgmProgramName name); /* Bind a program and enable the fragment program mode */ void pgm_program_bind (PgmProgram *program); /* Disable the fragment program mode */ void pgm_program_unbind (void); G_END_DECLS #endif /* __PGM_PROGRAM_H__ */ pigment-0.3.17/plugins/opengl/pgmtexture.c0000644000175000017500000006673611205034415015520 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment OpenGL plugin * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ /* * Object used to handle the OpenGL texturing. Depending on the color space of * the stored buffer and the capabilities of the GPU, different paths can be * used. The plugin supports YCbCr planar FOURCC such as I420 and YV12 through * OpenGL fragment programs. If the hardware supports pixel-shaders and * multi-texturing with more than 3 texture image units, a fragment program * using a texture for each plane is bound. There is at the moment no color * space conversion programs for packed FOURCCs. If the hardware does not * provide pixel-shaders, the plugin doesn't support YCbCr color spaces. * * FIXME: The behaviour is currently undefined if the user sends us an image * with an unsupported color space (ie a pixel format which is not * returned by pgm_viewport_get_pixel_formats). */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include /* memset */ #include "pgmtexture.h" GST_DEBUG_CATEGORY_EXTERN (pgm_gl_debug); #define GST_CAT_DEFAULT pgm_gl_debug /* Texture upload function prototypes */ static void do_rgb_upload (PgmTexture *texture, void *buffer); static void do_bgr_upload (PgmTexture *texture, void *buffer); static void do_rgba_upload (PgmTexture *texture, void *buffer); static void do_bgra_upload (PgmTexture *texture, void *buffer); static void do_planar_12_upload (PgmTexture *texture, void *buffer); static void do_packed_16_upload (PgmTexture *texture, void *buffer); /* Texture create function prototypes */ static void do_rgb_create (PgmTexture *texture); static void do_bgr_create (PgmTexture *texture); static void do_rgba_create (PgmTexture *texture); static void do_bgra_create (PgmTexture *texture); static void do_planar_12_create (PgmTexture *texture); static void do_packed_16_create (PgmTexture *texture); /* Texture bind function prototypes */ static void do_rgb_bind (PgmTexture *texture); static void do_i420_bind (PgmTexture *texture); static void do_yv12_bind (PgmTexture *texture); static void do_uyvy_bind (PgmTexture *texture); /* Texture unbind function prototypes */ static void do_rgb_unbind (PgmTexture *texture); static void do_planar_12_unbind (PgmTexture *texture); static void do_uyvy_unbind (PgmTexture *texture); /* Texturing task function pointers * FIXME: 4kb lost for 128b effectively used... */ static PgmTextureCreateFunc create_func[256] = { NULL }; static PgmTextureUploadFunc upload_func[256] = { NULL }; static PgmTextureBindFunc bind_func[256] = { NULL }; static PgmTextureBindFunc unbind_func[256] = { NULL }; /* Texture border colors */ static gfloat rgb_border_color[4] = { 0.0f, 0.0f, 0.0f, 0.0f }; static gfloat y_border_color[4] = { 0.0f, 0.0f, 0.0f, 0.0f }; static gfloat cbcr_border_color[4] = { 0.5f, 0.5f, 0.5f, 0.0f }; /* Keep track of the context and OpenGL procedures */ static const PgmContextProcAddress *gl = NULL; static const PgmContext *context = NULL; /* Private functions */ /* Returns number rounded up to the next power of 2. This is the branch-free * implementation detailed in "Hacker's Delight" by Henry S. Warren, Jr. */ static guint get_upper_power_of_two (guint number) { number = number - 1; number = number | (number >> 1); number = number | (number >> 2); number = number | (number >> 4); number = number | (number >> 8); number = number | (number >> 16); return number + 1; } /* Specifies texture parameters of the currently bound texture */ static void set_texture_parameters (PgmTexture *texture, gfloat *border_color) { /* Texture border color */ if (border_color) gl->tex_parameter_fv (PGM_GL_TEXTURE_2D, PGM_GL_TEXTURE_BORDER_COLOR, border_color); /* Texture wrapping */ gl->tex_parameter_i (PGM_GL_TEXTURE_2D, PGM_GL_TEXTURE_WRAP_S, texture->wrap_s); gl->tex_parameter_i (PGM_GL_TEXTURE_2D, PGM_GL_TEXTURE_WRAP_T, texture->wrap_t); /* Texture filtering */ gl->tex_parameter_i (PGM_GL_TEXTURE_2D, PGM_GL_TEXTURE_MIN_FILTER, texture->filter); gl->tex_parameter_i (PGM_GL_TEXTURE_2D, PGM_GL_TEXTURE_MAG_FILTER, texture->filter); } /* 24 bits RGB texture creation * Stored as RGBA so that the part of the texture not used (pot_size - size) * is opaque. */ static void do_rgb_create (PgmTexture *texture) { guint8 *pixels = g_malloc0 (texture->width_pot * texture->height_pot * 4); gl->bind_texture (PGM_GL_TEXTURE_2D, texture->id[0]); gl->tex_image_2d (PGM_GL_TEXTURE_2D, 0, PGM_GL_RGBA, texture->width_pot, texture->height_pot, 0, PGM_GL_RGBA, PGM_GL_UNSIGNED_BYTE, pixels); set_texture_parameters (texture, rgb_border_color); g_free (pixels); } /* 24 bits BGR texture creation. * Stored as BGRA so that the part of the texture not used (pot_size - size) * is opaque. */ static void do_bgr_create (PgmTexture *texture) { guint8 *pixels = g_malloc0 (texture->width_pot * texture->height_pot * 4); gl->bind_texture (PGM_GL_TEXTURE_2D, texture->id[0]); gl->tex_image_2d (PGM_GL_TEXTURE_2D, 0, PGM_GL_RGBA, texture->width_pot, texture->height_pot, 0, PGM_GL_BGRA, PGM_GL_UNSIGNED_BYTE, pixels); set_texture_parameters (texture, rgb_border_color); g_free (pixels); } /* 32 bits RGBA texture creation */ static void do_rgba_create (PgmTexture *texture) { guint8 *pixels = g_malloc0 (texture->width_pot * texture->height_pot * 4); gl->bind_texture (PGM_GL_TEXTURE_2D, texture->id[0]); gl->tex_image_2d (PGM_GL_TEXTURE_2D, 0, PGM_GL_RGBA, texture->width_pot, texture->height_pot, 0, PGM_GL_RGBA, PGM_GL_UNSIGNED_BYTE, pixels); set_texture_parameters (texture, rgb_border_color); g_free (pixels); } /* 32 bits BGRA texture creation */ static void do_bgra_create (PgmTexture *texture) { guint8 *pixels = g_malloc0 (texture->width_pot * texture->height_pot * 4); gl->bind_texture (PGM_GL_TEXTURE_2D, texture->id[0]); gl->tex_image_2d (PGM_GL_TEXTURE_2D, 0, PGM_GL_RGBA, texture->width_pot, texture->height_pot, 0, PGM_GL_BGRA, PGM_GL_UNSIGNED_BYTE, pixels); set_texture_parameters (texture, rgb_border_color); g_free (pixels); } /* 3 * 8 bits LUMINANCE textures creation to store 12 bits planar YCbCr FourCC * formats such as I420 and YV12. Creates 3 textures for respectively the Y, * Cb and Cr planes. Fragment program is then used to convert the colorspace. */ static void do_planar_12_create (PgmTexture *texture) { guint lower_width_pot = texture->width_pot >> 1; guint lower_height_pot = texture->height_pot >> 1; guint8 *y_pixels, *cbcr_pixels; guint size; /* Get the correct strides and Cb/Cr plane offsets */ texture->cbcr_height = texture->height / 2; texture->y_stride = GST_ROUND_UP_4 (texture->width); texture->cbcr_stride = GST_ROUND_UP_8 (texture->width) / 2; texture->cb_offset = texture->y_stride * GST_ROUND_UP_2 (texture->height); texture->cr_offset = texture->cb_offset + texture->cbcr_stride * GST_ROUND_UP_2 (texture->height) / 2; /* Initialization pixels area, the area is initialized with black pixels in * the YCbCr color space: (0,0,0)RGB == (16,128,128)YCbCr. We replace in our * specific case the Y component which should be 16 by 0. */ y_pixels = g_malloc0 (texture->width_pot * texture->height_pot); size = lower_width_pot * lower_height_pot; cbcr_pixels = g_malloc (size); memset (cbcr_pixels, 128, size); /* Y plane creation */ gl->bind_texture (PGM_GL_TEXTURE_2D, texture->id[0]); gl->tex_image_2d (PGM_GL_TEXTURE_2D, 0, PGM_GL_LUMINANCE, texture->width_pot, texture->height_pot, 0, PGM_GL_LUMINANCE, PGM_GL_UNSIGNED_BYTE, y_pixels); set_texture_parameters (texture, y_border_color); /* Cb plane creation */ gl->bind_texture (PGM_GL_TEXTURE_2D, texture->id[1]); gl->tex_image_2d (PGM_GL_TEXTURE_2D, 0, PGM_GL_LUMINANCE, lower_width_pot, lower_height_pot, 0, PGM_GL_LUMINANCE, PGM_GL_UNSIGNED_BYTE, cbcr_pixels); set_texture_parameters (texture, cbcr_border_color); /* Cr plane creation */ gl->bind_texture (PGM_GL_TEXTURE_2D, texture->id[2]); gl->tex_image_2d (PGM_GL_TEXTURE_2D, 0, PGM_GL_LUMINANCE, lower_width_pot , lower_height_pot, 0, PGM_GL_LUMINANCE, PGM_GL_UNSIGNED_BYTE, cbcr_pixels); set_texture_parameters (texture, cbcr_border_color); /* Free initialization pixels area */ g_free (y_pixels); g_free (cbcr_pixels); } /* FIXME */ static void do_packed_16_create (PgmTexture *texture) { } /* 24 bits RGB texture upload */ static void do_rgb_upload (PgmTexture *texture, void *buffer) { gl->bind_texture (PGM_GL_TEXTURE_2D, texture->id[0]); gl->tex_sub_image_2d (PGM_GL_TEXTURE_2D, 0, 0, 0, texture->width, texture->height, PGM_GL_RGB, PGM_GL_UNSIGNED_BYTE, buffer); } /* 24 bits BGR texture upload */ static void do_bgr_upload (PgmTexture *texture, void *buffer) { gl->bind_texture (PGM_GL_TEXTURE_2D, texture->id[0]); gl->tex_sub_image_2d (PGM_GL_TEXTURE_2D, 0, 0, 0, texture->width, texture->height, PGM_GL_BGR, PGM_GL_UNSIGNED_BYTE, buffer); } /* 32 bits RGBA texture upload */ static void do_rgba_upload (PgmTexture *texture, void *buffer) { gl->bind_texture (PGM_GL_TEXTURE_2D, texture->id[0]); gl->tex_sub_image_2d (PGM_GL_TEXTURE_2D, 0, 0, 0, texture->width, texture->height, PGM_GL_RGBA, PGM_GL_UNSIGNED_BYTE, buffer); } /* 32 bits BGRA texture upload */ static void do_bgra_upload (PgmTexture *texture, void *buffer) { gl->bind_texture (PGM_GL_TEXTURE_2D, texture->id[0]); gl->tex_sub_image_2d (PGM_GL_TEXTURE_2D, 0, 0, 0, texture->width, texture->height, PGM_GL_BGRA, PGM_GL_UNSIGNED_BYTE, buffer); } /* 12 bits planar YCbCr upload */ static void do_planar_12_upload (PgmTexture *texture, void *buffer) { /* Y plane */ gl->bind_texture (PGM_GL_TEXTURE_2D, texture->id[0]); gl->tex_sub_image_2d (PGM_GL_TEXTURE_2D, 0, 0, 0, texture->y_stride, texture->height, PGM_GL_LUMINANCE, PGM_GL_UNSIGNED_BYTE, buffer); /* Cb plane */ gl->bind_texture (PGM_GL_TEXTURE_2D, texture->id[1]); gl->tex_sub_image_2d (PGM_GL_TEXTURE_2D, 0, 0, 0, texture->cbcr_stride, texture->cbcr_height, PGM_GL_LUMINANCE, PGM_GL_UNSIGNED_BYTE, ((guint8*) buffer) + texture->cb_offset); /* Cr plane */ gl->bind_texture (PGM_GL_TEXTURE_2D, texture->id[2]); gl->tex_sub_image_2d (PGM_GL_TEXTURE_2D, 0, 0, 0, texture->cbcr_stride, texture->cbcr_height, PGM_GL_LUMINANCE, PGM_GL_UNSIGNED_BYTE, ((guint8*) buffer) + texture->cr_offset); } /* FIXME */ static void do_packed_16_upload (PgmTexture *texture, void *buffer) { } /* Simple texture name binding */ static void do_rgb_bind (PgmTexture *texture) { gl->bind_texture (PGM_GL_TEXTURE_2D, texture->id[0]); if (texture->storage == PGM_TEXTURE_SYSTEM_BUFFER) pgm_backend_bind_system_buffer_object (context->backend, texture->data.systembuffer); } /* Multi-texture and fragment program binding for the I420 to RGB color * space conversion fragment program */ static void do_i420_bind (PgmTexture *texture) { if (context->feature_mask & PGM_GL_FEAT_PER_PLANE_YCBCR_PROGRAM) { /* Bind the I420 to RGB color space conversion program */ pgm_program_bind (pgm_program_get (PGM_PROGRAM_PER_PLANE_I420_RGB)); /* And bind the texture names to the three texture units */ gl->active_texture (PGM_GL_TEXTURE0); gl->bind_texture (PGM_GL_TEXTURE_2D, texture->id[0]); gl->active_texture (PGM_GL_TEXTURE1); gl->bind_texture (PGM_GL_TEXTURE_2D, texture->id[1]); gl->active_texture (PGM_GL_TEXTURE2); gl->bind_texture (PGM_GL_TEXTURE_2D, texture->id[2]); } } /* Multi-texture and fragment program binding for the YV12 to RGB color * space conversion fragment program */ static void do_yv12_bind (PgmTexture *texture) { if (context->feature_mask & PGM_GL_FEAT_PER_PLANE_YCBCR_PROGRAM) { /* Bind the YV12 to RGB color space conversion program */ pgm_program_bind (pgm_program_get (PGM_PROGRAM_PER_PLANE_YV12_RGB)); /* And bind the texture names to the three texture units */ gl->active_texture (PGM_GL_TEXTURE0); gl->bind_texture (PGM_GL_TEXTURE_2D, texture->id[0]); gl->active_texture (PGM_GL_TEXTURE1); gl->bind_texture (PGM_GL_TEXTURE_2D, texture->id[1]); gl->active_texture (PGM_GL_TEXTURE2); gl->bind_texture (PGM_GL_TEXTURE_2D, texture->id[2]); } } /* FIXME */ static void do_uyvy_bind (PgmTexture *texture) { } /* Disable the texture binding the default one */ static void do_rgb_unbind (PgmTexture *texture) { if (texture->storage == PGM_TEXTURE_SYSTEM_BUFFER) pgm_backend_release_system_buffer_object (context->backend, texture->data.systembuffer); gl->bind_texture (PGM_GL_TEXTURE_2D, 0); } /* Disable fragment program and multi-texturing */ static void do_planar_12_unbind (PgmTexture *texture) { /* Unbind the conversion program */ pgm_program_unbind (); /* And disable texture units */ gl->active_texture (PGM_GL_TEXTURE2); gl->bind_texture (PGM_GL_TEXTURE_2D, 0); gl->active_texture (PGM_GL_TEXTURE1); gl->bind_texture (PGM_GL_TEXTURE_2D, 0); gl->active_texture (PGM_GL_TEXTURE0); gl->bind_texture (PGM_GL_TEXTURE_2D, 0); } /* FIXME */ static void do_uyvy_unbind (PgmTexture *texture) { } /* Update the normalized size fields */ static void update_normalized_size (PgmTexture *texture) { texture->norm_width = (gfloat) texture->width / texture->width_pot; texture->norm_height = (gfloat) texture->height / texture->height_pot; texture->inv_norm_width = 1.0f / texture->norm_width; texture->inv_norm_height = 1.0f / texture->norm_height; } /* Frees the current stored buffer if any */ static void free_buffer (PgmTexture *texture) { switch (texture->storage) { case PGM_TEXTURE_GST_BUFFER: if (texture->data.gstbuffer) { gst_buffer_unref (texture->data.gstbuffer); texture->data.gstbuffer = NULL; } break; case PGM_TEXTURE_PIXBUF: if (texture->data.pixbuf) { gdk_pixbuf_unref (texture->data.pixbuf); texture->data.pixbuf = NULL; } break; case PGM_TEXTURE_BUFFER: if (texture->data.buffer) { if (!texture->shared) g_free (texture->data.buffer); texture->data.buffer = NULL; } break; case PGM_TEXTURE_SYSTEM_BUFFER: if (texture->data.systembuffer) { pgm_backend_destroy_system_buffer_object (context->backend, texture->data.systembuffer); texture->data.systembuffer = NULL; } break; default: break; } texture->storage = PGM_TEXTURE_CLEAN; } /* Constructor */ static void init_texture (PgmTexture *texture) { /* Content */ texture->storage = PGM_TEXTURE_CLEAN; texture->data.gstbuffer = NULL; texture->width = -1; texture->height = -1; texture->width_pot = -1; texture->height_pot = -1; texture->stride = -1; texture->size = -1; texture->norm_width = -1.0f; texture->norm_height = -1.0f; texture->inv_norm_width = -1.0f; texture->inv_norm_height = -1.0f; /* Parameters */ texture->matrix = pgm_mat4x4_new_identity (); texture->filter = PGM_GL_LINEAR; texture->wrap_s = PGM_GL_CLAMP_TO_EDGE; texture->wrap_t = PGM_GL_CLAMP_TO_EDGE; /* State flags */ texture->flags = PGM_TEXTURE_IDENTITY_MATRIX; /* Indentifiants */ texture->count = 0; texture->id = NULL; texture->shared = 0; } /* Destructor */ static void dispose_texture (PgmTexture *texture) { free_buffer (texture); if (texture->id) pgm_texture_clean (texture); pgm_mat4x4_free (texture->matrix); texture->matrix = NULL; } /* Global pointers initialization */ static void class_init (PgmContext *_context) { /* Create color space indexed function pointers */ create_func[PGM_IMAGE_RGB] = GST_DEBUG_FUNCPTR (do_rgb_create); create_func[PGM_IMAGE_BGR] = GST_DEBUG_FUNCPTR (do_bgr_create); create_func[PGM_IMAGE_RGBA] = GST_DEBUG_FUNCPTR (do_rgba_create); create_func[PGM_IMAGE_BGRA] = GST_DEBUG_FUNCPTR (do_bgra_create); create_func[PGM_IMAGE_I420] = GST_DEBUG_FUNCPTR (do_planar_12_create); create_func[PGM_IMAGE_YV12] = GST_DEBUG_FUNCPTR (do_planar_12_create); create_func[PGM_IMAGE_UYVY] = GST_DEBUG_FUNCPTR (do_packed_16_create); create_func[PGM_IMAGE_YUYV] = GST_DEBUG_FUNCPTR (do_packed_16_create); /* Upload color space indexed function pointers */ upload_func[PGM_IMAGE_RGB] = GST_DEBUG_FUNCPTR (do_rgb_upload); upload_func[PGM_IMAGE_BGR] = GST_DEBUG_FUNCPTR (do_bgr_upload); upload_func[PGM_IMAGE_RGBA] = GST_DEBUG_FUNCPTR (do_rgba_upload); upload_func[PGM_IMAGE_BGRA] = GST_DEBUG_FUNCPTR (do_bgra_upload); upload_func[PGM_IMAGE_I420] = GST_DEBUG_FUNCPTR (do_planar_12_upload); upload_func[PGM_IMAGE_YV12] = GST_DEBUG_FUNCPTR (do_planar_12_upload); upload_func[PGM_IMAGE_UYVY] = GST_DEBUG_FUNCPTR (do_packed_16_upload); upload_func[PGM_IMAGE_YUYV] = GST_DEBUG_FUNCPTR (do_packed_16_upload); /* Bind color space indexed function pointers */ bind_func[PGM_IMAGE_RGB] = GST_DEBUG_FUNCPTR (do_rgb_bind); bind_func[PGM_IMAGE_BGR] = GST_DEBUG_FUNCPTR (do_rgb_bind); bind_func[PGM_IMAGE_RGBA] = GST_DEBUG_FUNCPTR (do_rgb_bind); bind_func[PGM_IMAGE_BGRA] = GST_DEBUG_FUNCPTR (do_rgb_bind); bind_func[PGM_IMAGE_I420] = GST_DEBUG_FUNCPTR (do_i420_bind); bind_func[PGM_IMAGE_YV12] = GST_DEBUG_FUNCPTR (do_yv12_bind); bind_func[PGM_IMAGE_UYVY] = GST_DEBUG_FUNCPTR (do_uyvy_bind); bind_func[PGM_IMAGE_YUYV] = GST_DEBUG_FUNCPTR (do_uyvy_bind); /* Unbind color space indexed function pointers */ unbind_func[PGM_IMAGE_RGB] = GST_DEBUG_FUNCPTR (do_rgb_unbind); unbind_func[PGM_IMAGE_BGR] = GST_DEBUG_FUNCPTR (do_rgb_unbind); unbind_func[PGM_IMAGE_RGBA] = GST_DEBUG_FUNCPTR (do_rgb_unbind); unbind_func[PGM_IMAGE_BGRA] = GST_DEBUG_FUNCPTR (do_rgb_unbind); unbind_func[PGM_IMAGE_I420] = GST_DEBUG_FUNCPTR (do_planar_12_unbind); unbind_func[PGM_IMAGE_YV12] = GST_DEBUG_FUNCPTR (do_planar_12_unbind); unbind_func[PGM_IMAGE_UYVY] = GST_DEBUG_FUNCPTR (do_uyvy_unbind); unbind_func[PGM_IMAGE_YUYV] = GST_DEBUG_FUNCPTR (do_uyvy_unbind); context = _context; gl = context->gl; } /* Public functions */ PgmTexture * pgm_texture_new (PgmContext *_context) { PgmTexture *texture; /* Initialize the global pointers at first instantiation */ if (G_UNLIKELY (!context)) class_init (_context); /* And instantiate */ texture = g_slice_new0 (PgmTexture); init_texture (texture); return texture; } void pgm_texture_free (PgmTexture *texture) { g_return_if_fail (texture != NULL); dispose_texture (texture); g_slice_free (PgmTexture, texture); texture = NULL; } void pgm_texture_set_buffer (PgmTexture *texture, guchar *buffer, PgmImagePixelFormat csp, guint width, guint height, guint size, guint stride, gboolean share) { free_buffer (texture); texture->storage = PGM_TEXTURE_BUFFER; if (share) { texture->data.buffer = buffer; texture->shared = 1; } else { texture->data.buffer = g_memdup (buffer, size); texture->shared = 0; } texture->width = width; texture->height = height; texture->stride = stride; texture->size = size; texture->width_pot = get_upper_power_of_two (width); texture->height_pot = get_upper_power_of_two (height); texture->csp = csp; update_normalized_size (texture); } void pgm_texture_set_system_buffer (PgmTexture *texture, gconstpointer system_buffer, PgmImagePixelFormat csp, guint width, guint height) { free_buffer (texture); texture->storage = PGM_TEXTURE_SYSTEM_BUFFER; texture->data.systembuffer = pgm_backend_create_system_buffer_object (context->backend, system_buffer, csp); texture->width = width; texture->height = height; texture->csp = csp; texture->norm_width = 1.0f; texture->norm_height = 1.0f; texture->inv_norm_width = 1.0f; texture->inv_norm_height = 1.0f; /* FIXME: The power-of-two size is biased here since in the GLX backend we * use the non-power-of-two extension. If that's not done here, the * GlImage object generates wrong texture coordinates. That has to * be fixed adding good support for non-power-of-two texture in the * plugin. */ texture->width_pot = width; texture->height_pot = height; } void pgm_texture_set_pixbuf (PgmTexture *texture, GdkPixbuf *pixbuf) { free_buffer (texture); texture->storage = PGM_TEXTURE_PIXBUF; texture->data.pixbuf = gdk_pixbuf_ref (pixbuf); texture->width = gdk_pixbuf_get_width (pixbuf); texture->height = gdk_pixbuf_get_height (pixbuf); texture->stride = gdk_pixbuf_get_rowstride (pixbuf); texture->size = texture->stride * texture->height; texture->width_pot = get_upper_power_of_two (texture->width); texture->height_pot = get_upper_power_of_two (texture->height); if (gdk_pixbuf_get_has_alpha (pixbuf)) texture->csp = PGM_IMAGE_RGBA; else texture->csp = PGM_IMAGE_RGB; update_normalized_size (texture); } void pgm_texture_set_gst_buffer (PgmTexture *texture, GstBuffer *gstbuffer, PgmImagePixelFormat csp, guint width, guint height, guint stride) { free_buffer (texture); texture->storage = PGM_TEXTURE_GST_BUFFER; texture->data.gstbuffer = gst_buffer_ref (gstbuffer); texture->size = GST_BUFFER_SIZE (gstbuffer); texture->width = width; texture->width_pot = get_upper_power_of_two (width); texture->height = height; texture->height_pot = get_upper_power_of_two (height); texture->stride = stride; texture->csp = csp; update_normalized_size (texture); } void pgm_texture_update_gst_buffer (PgmTexture *texture, GstBuffer *gstbuffer) { if (texture->data.gstbuffer) gst_buffer_unref (texture->data.gstbuffer); texture->data.gstbuffer = gst_buffer_ref (gstbuffer); texture->storage = PGM_TEXTURE_GST_BUFFER; } void pgm_texture_bind (PgmTexture *texture) { g_return_if_fail (texture != NULL); if (!texture->id) return; bind_func[texture->csp] (texture); /* Push the current texture matrix, and load our matrix */ if (!(texture->flags & PGM_TEXTURE_IDENTITY_MATRIX)) { gl->matrix_mode (PGM_GL_TEXTURE); gl->push_matrix (); gl->load_matrix_f (texture->matrix->m); gl->matrix_mode (PGM_GL_MODELVIEW); } } void pgm_texture_unbind (PgmTexture *texture) { g_return_if_fail (texture != NULL); if (!texture->id) return; unbind_func[texture->csp] (texture); /* Pop our texture matrix from the stack */ if (!(texture->flags & PGM_TEXTURE_IDENTITY_MATRIX)) { gl->matrix_mode (PGM_GL_TEXTURE); gl->pop_matrix (); gl->matrix_mode (PGM_GL_MODELVIEW); } } void pgm_texture_generate (PgmTexture *texture) { pgm_texture_clean (texture); /* The fragment programs doing i420 and yv12 to RGB need three textures */ if (context->feature_mask & PGM_GL_FEAT_PER_PLANE_YCBCR_PROGRAM && (texture->csp == PGM_IMAGE_I420 || texture->csp == PGM_IMAGE_YV12)) texture->count = 3; /* Otherwise RGB formats are directly supported and just need one */ else texture->count = 1; texture->id = g_slice_alloc0 (sizeof (guint) * texture->count); gl->gen_textures (texture->count, texture->id); create_func[texture->csp] (texture); } void pgm_texture_clean (PgmTexture *texture) { if (texture->id) { gl->delete_textures (texture->count, texture->id); g_slice_free1 (sizeof (guint) * texture->count, texture->id); texture->id = NULL; texture->count = 0; } } void pgm_texture_upload (PgmTexture *texture) { void *buffer; if (G_UNLIKELY (!texture->id)) return; switch (texture->storage) { case PGM_TEXTURE_GST_BUFFER: buffer = GST_BUFFER_DATA (texture->data.gstbuffer); break; case PGM_TEXTURE_PIXBUF: buffer = gdk_pixbuf_get_pixels (texture->data.pixbuf); break; case PGM_TEXTURE_BUFFER: buffer = texture->data.buffer; break; default: return; } /* FIXME: This test must not be there! At that point the content must be valid * in every case. The issue is that it rarely appears that a buffer coming * from a GdkPixbuf is NULL, causing a crash in the OpenGL texture update * function. That is a workaround to fix this issue, the real source of the * problem still need to be found though. */ if (G_LIKELY (buffer != NULL)) upload_func[texture->csp] (texture, buffer); free_buffer (texture); } void pgm_texture_update (PgmTexture *texture) { if (!texture->id) return; gl->bind_texture (PGM_GL_TEXTURE_2D, texture->id[0]); set_texture_parameters (texture, NULL); } void pgm_texture_set_matrix (PgmTexture *texture, PgmMat4x4 *matrix) { pgm_mat4x4_set_from_mat4x4 (texture->matrix, matrix); /* Check identity so that we can avoid pushing our texture matrix */ if (!pgm_mat4x4_is_identity (matrix)) { PgmMat4x4 *scale, *transform, *transpose; /* We need to scale, apply the transformation and unscale to hide * the use of power-of-two textures. */ scale = pgm_mat4x4_new_scale_from_scalars (texture->norm_width, texture->norm_height, 1.0f); transform = pgm_mat4x4_multiply_mat4x4 (scale, texture->matrix); pgm_mat4x4_scale_from_scalars (transform, texture->inv_norm_width, texture->inv_norm_height, 1.0f); transpose = pgm_mat4x4_transpose (transform); pgm_mat4x4_set_from_mat4x4 (texture->matrix, transpose); pgm_mat4x4_free (scale); pgm_mat4x4_free (transform); pgm_mat4x4_free (transpose); texture->flags &= ~PGM_TEXTURE_IDENTITY_MATRIX; } else texture->flags |= PGM_TEXTURE_IDENTITY_MATRIX; } pigment-0.3.17/plugins/opengl/pgmglxbackend.c0000644000175000017500000024745611205034416016123 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment OpenGL plugin * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ /* * OpenGL plugin backend for Xlib/GLX. * * It follows several specifications from the X Desktop Group including: * * o the Extended Window Manager Hints * o the XEmbed Protocol Specification * o the Drag-and-Drop Protocol for the X Window System * o the Startup Notification Protocol */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #include #include #include #include #include "pgmglxbackend.h" #include "pgmglviewport.h" GST_DEBUG_CATEGORY_STATIC (pgm_gl_glxbackend_debug); #define GST_CAT_DEFAULT pgm_gl_glxbackend_debug /* Supported XDND version */ #define XDND_PROTOCOL_VERSION 5 /* Supported XEmbed version */ #define XEMBED_PROTOCOL_VERSION 1 /* Flag(s) for _XEMBED_INFO */ #define XEMBED_MAPPED (1 << 0) /* XEmbed messages */ typedef enum { XEMBED_EMBEDDED_NOTIFY = 0, XEMBED_WINDOW_ACTIVATE = 1, XEMBED_WINDOW_DEACTIVATE = 2, XEMBED_REQUEST_FOCUS = 3, XEMBED_FOCUS_IN = 4, XEMBED_FOCUS_OUT = 5, XEMBED_FOCUS_NEXT = 6, XEMBED_FOCUS_PREV = 7, XEMBED_GRAB_KEY = 8, /* Removed from the spec */ XEMBED_UNGRAB_KEY = 9, /* Removed from the spec */ XEMBED_MODALITY_ON = 10, XEMBED_MODALITY_OFF = 11, } XEmbedMessageType; /* Motif function flags */ typedef enum { MWM_FUNC_ALL = (1L << 0), MWM_FUNC_RESIZE = (1L << 1), MWM_FUNC_MOVE = (1L << 2), MWM_FUNC_MINIMIZE = (1L << 3), MWM_FUNC_MAXIMIZE = (1L << 4), MWM_FUNC_CLOSE = (1L << 5) } MwmFunctionFlags; /* Motif hint flags */ typedef enum { MWM_HINTS_DECORATIONS = (1L << 1), MWM_HINTS_FUNCTIONS = (1L << 0) } MwmHintFlags; /* Prototypes */ static gboolean event_prepare (GSource *source, gint *timeout); static gboolean event_check (GSource *source); static gboolean event_dispatch (GSource *source, GSourceFunc callback, gpointer data); /* Event handling functions */ static GSourceFuncs event_funcs = { event_prepare, event_check, event_dispatch, NULL }; /* Motif window management hints */ typedef struct { gulong flags; gulong functions; glong decorations; glong input_mode; gulong status; } MwmHints; /* Map GLX extension names and feature bits */ typedef struct { const gchar *name; gint feature_mask; } ExtensionMap; /* GLX extensions checked at runtime */ static ExtensionMap glx_extensions_map[] = { { "GLX_SGIX_fbconfig", PGM_GLX_FEAT_FBCONFIG }, { "GLX_SGI_video_sync", PGM_GLX_FEAT_VIDEO_SYNC }, { "GLX_SGI_swap_control", PGM_GLX_FEAT_SWAP_CONTROL }, { "GLX_EXT_texture_from_pixmap", PGM_GLX_FEAT_TEXTURE_FROM_PIXMAP }, { NULL, 0 } }; /* GLX functions binding */ static PgmGlxBackendProcAddress glx_proc_address = { (PgmGlxChooseFbconfigFunc) NULL, (PgmGlxGetFbconfigAttribFunc) NULL, (PgmGlxGetVisualFromFbconfigFunc) NULL, (PgmGlxCreateNewContextFunc) NULL, (PgmGlxGetVideoSyncFunc) NULL, (PgmGlxWaitVideoSyncFunc) NULL, (PgmGlxSwapIntervalFunc) NULL, (PgmGlxBindTexImageFunc) NULL, (PgmGlxReleaseTexImageFunc) NULL }; /* X atom index IDs */ typedef enum { ATOM_NET_WM_STATE_FULLSCREEN = 0, ATOM_NET_WM_STATE = 1, ATOM_NET_WM_PING = 2, ATOM_NET_WM_USER_TIME = 3, ATOM_NET_WM_NAME = 4, ATOM_NET_ACTIVE_WINDOW = 5, ATOM_NET_STARTUP_INFO = 6, ATOM_NET_STARTUP_INFO_BEGIN = 7, ATOM_NET_STARTUP_ID = 8, ATOM_XEMBED = 9, ATOM_XEMBED_INFO = 10, ATOM_MOTIF_WM_HINTS = 11, ATOM_UTF8_STRING = 12, ATOM_WM_PROTOCOLS = 13, ATOM_WM_DELETE_WINDOW = 14, ATOM_PGM_SELECTION = 15, ATOM_XDND_AWARE = 16, ATOM_XDND_ENTER = 17, ATOM_XDND_POSITION = 18, ATOM_XDND_DROP = 19, ATOM_XDND_LEAVE = 20, ATOM_XDND_TYPE_LIST = 21, ATOM_XDND_SELECTION = 22, ATOM_XDND_STATUS = 23, ATOM_XDND_FINISHED = 24, ATOM_XDND_ACTION_LINK = 25, ATOM_TEXT_URI_LIST = 26 } XAtomIndexId; /* X atom names */ static const gchar *atom_name[] = { "_NET_WM_STATE_FULLSCREEN", /* 0 */ "_NET_WM_STATE", /* 1 */ "_NET_WM_PING", /* 2 */ "_NET_WM_USER_TIME", /* 3 */ "_NET_WM_NAME", /* 4 */ "_NET_ACTIVE_WINDOW", /* 5 */ "_NET_STARTUP_INFO", /* 6 */ "_NET_STARTUP_INFO_BEGIN", /* 7 */ "_NET_STARTUP_ID", /* 8 */ "_XEMBED", /* 9 */ "_XEMBED_INFO", /* 10 */ "_MOTIF_WM_HINTS", /* 11 */ "UTF8_STRING", /* 12 */ "WM_PROTOCOLS", /* 13 */ "WM_DELETE_WINDOW", /* 14 */ "PGM_SELECTION", /* 15 */ "XdndAware", /* 16 */ "XdndEnter", /* 17 */ "XdndPosition", /* 18 */ "XdndDrop", /* 19 */ "XdndLeave", /* 20 */ "XdndTypeList", /* 21 */ "XdndSelection", /* 22 */ "XdndStatus", /* 23 */ "XdndFinished", /* 24 */ "XdndActionLink", /* 25 */ "text/uri-list" /* 26 */ }; /* Number of atoms, atom strings and index IDs must be kept synchronised! */ static const guint nb_atoms = G_N_ELEMENTS (atom_name); static PgmBackendClass *parent_class = NULL; static int (*old_error_handler) (Display*, XErrorEvent*); static int trapped_error_code = 0; /* Private functions */ /* The X error handler */ static int error_handler (Display *display, XErrorEvent *error) { trapped_error_code = error->error_code; return 0; } /* Push X errors */ static void trap_x_errors (void) { trapped_error_code = 0; old_error_handler = XSetErrorHandler (error_handler); } /* Pop X errors */ static gint untrap_x_errors (void) { XSetErrorHandler (old_error_handler); return trapped_error_code; } /* Retrieve a function pointer given a procedure name */ static inline gpointer get_proc_address (PgmGlxBackend *glxbackend, const gchar *proc_name) { return (gpointer) glXGetProcAddressARB ((const guchar *) proc_name); } /* Check whether an extension is supported by the GLX implementation given * the extension name and the list of supported extensions */ static gboolean has_glx_extension (const gchar *extensions, const gchar *extension_name) { gchar *end; gint ext_name_len = strlen (extension_name); gchar *p = (gchar*) extensions; size_t size; if (!extensions) return FALSE; end = p + strlen (p); while (p < end) { size = strcspn (p, " "); if ((ext_name_len == size) && (strncmp (extension_name, p, size) == 0)) return TRUE; p += size + 1; } return FALSE; } /* Bind the GLX extension proc addresses depending on the features available * at run-time and the GLX version. */ static void bind_glx_extensions (PgmGlxBackend *glxbackend) { PgmGlxBackendProcAddress *glx = glxbackend->glx; /* FBConfig */ if (glxbackend->feature_mask & PGM_GLX_FEAT_FBCONFIG) { if (glxbackend->version >= 1.3f) { glx->choose_fbconfig = (PgmGlxChooseFbconfigFunc) get_proc_address (glxbackend, "glXChooseFBConfig"); glx->get_fbconfig_attrib = (PgmGlxGetFbconfigAttribFunc) get_proc_address (glxbackend, "glXGetFBConfigAttrib"); glx->get_visual_from_fbconfig = (PgmGlxGetVisualFromFbconfigFunc) get_proc_address (glxbackend, "glXGetVisualFromFBConfig"); glx->create_new_context = (PgmGlxCreateNewContextFunc) get_proc_address (glxbackend, "glXCreateNewContext"); } else { glx->choose_fbconfig = (PgmGlxChooseFbconfigFunc) get_proc_address (glxbackend, "glXChooseFBConfigSGIX"); glx->get_fbconfig_attrib = (PgmGlxGetFbconfigAttribFunc) get_proc_address (glxbackend, "glXGetFBConfigAttribSGIX"); glx->get_visual_from_fbconfig = (PgmGlxGetVisualFromFbconfigFunc) get_proc_address (glxbackend, "glXGetVisualFromFBConfigSGIX"); glx->create_new_context = (PgmGlxCreateNewContextFunc) get_proc_address (glxbackend, "glXCreateContextWithConfigSGIX"); } if ((!glx->choose_fbconfig) || (!glx->get_fbconfig_attrib) || (!glx->get_visual_from_fbconfig) || (!glx->create_new_context)) { glxbackend->feature_mask &= ~PGM_GLX_FEAT_FBCONFIG; } } /* Video sync */ if (glxbackend->feature_mask & PGM_GLX_FEAT_VIDEO_SYNC) { glx->get_video_sync = (PgmGlxGetVideoSyncFunc) get_proc_address (glxbackend, "glXGetVideoSyncSGI"); glx->wait_video_sync = (PgmGlxWaitVideoSyncFunc) get_proc_address (glxbackend, "glXWaitVideoSyncSGI"); if ((!glx->get_video_sync) || (!glx->wait_video_sync)) glxbackend->feature_mask &= ~PGM_GLX_FEAT_VIDEO_SYNC; } /* Swap control */ if (glxbackend->feature_mask & PGM_GLX_FEAT_SWAP_CONTROL) { glx->swap_interval = (PgmGlxSwapIntervalFunc) get_proc_address (glxbackend, "glXSwapIntervalSGI"); if (!glx->swap_interval) glxbackend->feature_mask &= ~PGM_GLX_FEAT_SWAP_CONTROL; } /* Texture from pixmap */ if (glxbackend->feature_mask & PGM_GLX_FEAT_TEXTURE_FROM_PIXMAP) { glx->bind_tex_image = (PgmGlxBindTexImageFunc) get_proc_address (glxbackend, "glXBindTexImageEXT"); glx->release_tex_image = (PgmGlxReleaseTexImageFunc) get_proc_address (glxbackend, "glXReleaseTexImageEXT"); if ((!glx->bind_tex_image) || (!glx->release_tex_image)) glxbackend->feature_mask &= ~PGM_GLX_FEAT_TEXTURE_FROM_PIXMAP; } } /* Get the GLX informations and load the extensions */ static gboolean load_glx_extensions (PgmGlxBackend *glxbackend) { gint error_base, event_base; gint major, minor; gint i = 0; /* Are GLX extensions supported? */ if (!glXQueryExtension (glxbackend->dpy, &error_base, &event_base)) { GST_ERROR_OBJECT (glxbackend, "GLX extensions not supported"); return FALSE; } /* Get the GLX server version */ if (!glXQueryVersion (glxbackend->dpy, &major, &minor)) { GST_ERROR_OBJECT (glxbackend, "couldn't query GLX version"); return FALSE; } /* Check minimum GLX version */ glxbackend->version = major + minor / 10.0f; if (major < 1 || (major == 1 && minor < 2)) { GST_ERROR_OBJECT (glxbackend, "GLX version %.1f (1.2 minimum required)", glxbackend->version); return FALSE; } glxbackend->vendor = (const gchar *) glXGetClientString (glxbackend->dpy, GLX_VENDOR); /* ATI's driver emulates GLX 1.3 support */ if (glxbackend->vendor) if (glxbackend->version < 1.3f) if (!strncmp ("ATI", glxbackend->vendor, 3)) glxbackend->version = 1.3f; /* Retrieve and bind supported extensions */ glxbackend->extensions = (const gchar *) glXQueryExtensionsString (glxbackend->dpy, glxbackend->screen); glxbackend->glx = &glx_proc_address; while (glx_extensions_map[i].name) { if (has_glx_extension (glxbackend->extensions, glx_extensions_map[i].name)) glxbackend->feature_mask |= glx_extensions_map[i].feature_mask; i++; } bind_glx_extensions (glxbackend); return TRUE; } /* Retrieve the best framebuffer configuration supported by the OpenGL * implementation that matches our requirements. The configuration is returned * as a visual and FBConfig if supported. The visual and fbconfig returned must * be freed after use. The returned boolean indicates whether the configuration * retrieving succeed or not. * * An ARGB visual could be searched on demand with the "PGM_GL_ARGB_VISUAL" * environment variable. This is sad but ARGB visuals are not correctly * supported by the DRI (the issue will be fixed with redirected direct * rendering and DRI2) and with the NVIDIA proprietary driver there were last * time I tried vertical synchronization issues. */ static gboolean get_framebuffer_configuration (PgmGlxBackend *glxbackend, XVisualInfo **visual, GLXFBConfig **fbconfig, gint *fbconfig_index) { PgmGlxBackendProcAddress *glx = glxbackend->glx; XVisualInfo *_visual = NULL; GLXFBConfig *_fbconfig = NULL; gint _fbconfig_index = -1; gboolean use_argb_visual = FALSE; const gchar *argb_visual; /* Check for PGM_GL_ARGB_VISUAL in the environment */ argb_visual = g_getenv ("PGM_GL_ARGB_VISUAL"); if (argb_visual && *argb_visual != '0') use_argb_visual = TRUE; /* 'GLX_SGIX_fbconfig' is available, let's use FBConfigs */ if (glxbackend->feature_mask & PGM_GLX_FEAT_FBCONFIG) { gint render_event_base, render_error_base, nbconfigs; gint attrib[] = { GLX_DOUBLEBUFFER, True, GLX_RED_SIZE, 1, GLX_GREEN_SIZE, 1, GLX_BLUE_SIZE, 1, GLX_ALPHA_SIZE, 1, GLX_DEPTH_SIZE, 0, GLX_RENDER_TYPE, GLX_RGBA_BIT, GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT, None }; GST_DEBUG_OBJECT (glxbackend, "'GLX_SGIX_fbconfig' is available"); /* Get the FBConfigs available on the system */ _fbconfig = glx->choose_fbconfig (glxbackend->dpy, glxbackend->screen, attrib, &nbconfigs); if (!_fbconfig) GST_WARNING_OBJECT (glxbackend, "couldn't retrieve the fbconfigs"); else GST_DEBUG_OBJECT (glxbackend, "retrieved %d fbconfigs", nbconfigs); /* The user requested an ARGB visual and we have the RENDER extension, * sounds like good conditions to search for such a visual */ if (_fbconfig && use_argb_visual && XRenderQueryExtension (glxbackend->dpy, &render_event_base, &render_error_base)) { XRenderPictFormat *format = NULL; gint i; /* Search for an ARGB visual */ for (i = 0; i < nbconfigs; i++) { _visual = glx->get_visual_from_fbconfig (glxbackend->dpy, _fbconfig[i]); if (!_visual) continue; format = XRenderFindVisualFormat (glxbackend->dpy, _visual->visual); if (!format) { XFree (_visual); continue; } if (format->direct.alphaMask > 0) { GST_INFO_OBJECT (glxbackend, "found an ARGB visual"); glxbackend->feature_mask |= PGM_GLX_FEAT_ARGB_VISUAL; break; } XFree (_visual); } /* If there's no ARGB visual, we use the first visual retrieved */ if (i == nbconfigs) { GST_DEBUG_OBJECT (glxbackend, "couldn't find an ARGB visual"); i = 0; _visual = glx->get_visual_from_fbconfig (glxbackend->dpy, _fbconfig[i]); if (_visual) GST_INFO_OBJECT (glxbackend, "found a RGB visual"); else { GST_ERROR_OBJECT (glxbackend, "couldn't find any visual"); return FALSE; } } _fbconfig_index = i; } else if (_fbconfig) { _visual = glx->get_visual_from_fbconfig (glxbackend->dpy, _fbconfig[0]); if (_visual) GST_INFO_OBJECT (glxbackend, "found a RGB visual"); else { GST_ERROR_OBJECT (glxbackend, "couldn't find any visual"); return FALSE; } _fbconfig_index = 0; } } /* 'GLX_SGIX_fbconfig' not available or the fbconfigs have not been correctly retrieved, let the implementation choose a RGB visual for us */ if (!_fbconfig) { gint attrib[] = { GLX_DOUBLEBUFFER, 1, GLX_RED_SIZE, 1, GLX_GREEN_SIZE, 1, GLX_BLUE_SIZE, 1, GLX_DEPTH_SIZE, 0, GLX_RGBA, None }; GST_DEBUG_OBJECT (glxbackend, "'GLX_SGIX_fbconfig' is not available"); _visual = glXChooseVisual (glxbackend->dpy, glxbackend->screen, attrib); if (_visual) GST_INFO_OBJECT (glxbackend, "found a RGB visual"); else { GST_ERROR_OBJECT (glxbackend, "couldn't find any visual"); return FALSE; } } /* Finally store the retrieved framebuffer configuration */ *visual = _visual; *fbconfig = _fbconfig; *fbconfig_index = _fbconfig_index; return TRUE; } /* Setup the method used for the VBlank syncing */ static void setup_vblank (PgmGlxBackend *glxbackend) { const gchar *variable; /* NVIDIA proprietary driver has an environment variable to automatically * enable VBlank syncing, in the case this variable is defined we just * disable it on Pigment side. */ if (g_getenv ("__GL_SYNC_TO_VBLANK")) { GST_INFO_OBJECT (glxbackend, "__GL_SYNC_TO_VBLANK defined in the " "environment, disabling vblank on pigment side"); glxbackend->vblank_mode = PGM_VBLANK_NONE; return; } /* The PGM_GL_VBLANK environment variable overrides the automatic VBlank * method choice done by Pigment. */ variable = g_getenv ("PGM_GL_VBLANK"); if (variable) { /* VBlank disabled */ if (variable[0] == '0') { GST_INFO_OBJECT (glxbackend, "PGM_GL_VBLANK disables vblank syncing"); glxbackend->vblank_mode = PGM_VBLANK_NONE; } /* VBlank using the GLX_SGI_video_sync extension */ else if (variable[0] == '1') { if (glxbackend->feature_mask & PGM_GLX_FEAT_VIDEO_SYNC) { GST_INFO_OBJECT (glxbackend, "PGM_GL_VBLANK forces use of the " "video_sync extension for vblank syncing"); glxbackend->vblank_mode = PGM_VBLANK_VIDEO_SYNC; } else GST_WARNING_OBJECT (glxbackend, "PGM_GL_VBLANK mode not supported " "by the GLX implementation"); } /* VBlank using the GLX_SGI_swap_control extension */ else if (variable[0] == '2') { if (glxbackend->feature_mask & PGM_GLX_FEAT_SWAP_CONTROL) { GST_INFO_OBJECT (glxbackend, "PGM_GL_VBLANK forces use of the " "swap_control extension for vblank syncing"); glxbackend->vblank_mode = PGM_VBLANK_SWAP_CONTROL; glxbackend->glx->swap_interval (1); } else GST_WARNING_OBJECT (glxbackend, "PGM_GL_VBLANK mode not supported " "by the GLX implementation"); } return; } /* Workaround section for video cards/drivers dealing differently with the * Vertical Blanking Interrupt: * * - With the NVIDIA proprietary driver, with the GeForce 8000 GPUs, the * video_sync extension works much better than for the previous one, that's * good since the swap_control one takes all the CPU in fullscreen mode. * Let's choose that extension for this class of GPUs. * * - With the Intel G33 series, the kernel freezes using swap_control * bad, bad, bad!!! */ if (glxbackend->feature_mask & PGM_GLX_FEAT_VIDEO_SYNC) { pgm_gl_get_string get_string = (pgm_gl_get_string) get_proc_address (glxbackend, "glGetString"); const gchar *renderer = (const gchar*) get_string (GL_RENDERER); if (!strncmp ("GeForce 8", renderer, 9) || !strncmp ("Mesa DRI Intel(R) G33", renderer, 21)) { GST_DEBUG_OBJECT (glxbackend, "Using the video_sync extension for " "vblank syncing"); glxbackend->vblank_mode = PGM_VBLANK_VIDEO_SYNC; return; } } /* Use the swap_control extension by default */ if (glxbackend->feature_mask & PGM_GLX_FEAT_SWAP_CONTROL) { GST_INFO_OBJECT (glxbackend, "Using the swap_control extension for " "vblank syncing"); glxbackend->vblank_mode = PGM_VBLANK_SWAP_CONTROL; glxbackend->glx->swap_interval (1); return; } /* Use the video_sync extension if swap_control's not available */ if (glxbackend->feature_mask & PGM_GLX_FEAT_VIDEO_SYNC) { GST_INFO_OBJECT (glxbackend, "Using the video_sync extension for " "vblank syncing"); glxbackend->vblank_mode = PGM_VBLANK_VIDEO_SYNC; return; } /* Fallback to ... nothing */ GST_WARNING_OBJECT (glxbackend, "No extensions found to enable vblank " "syncing"); glxbackend->vblank_mode = PGM_VBLANK_NONE; } /* Specifies the WM_PROTOCOLS property of the window */ static void set_wm_protocols (PgmGlxBackend *glxbackend) { Atom protocols[2]; protocols[0] = glxbackend->atom[ATOM_WM_DELETE_WINDOW]; protocols[1] = glxbackend->atom[ATOM_NET_WM_PING]; XSetWMProtocols (glxbackend->dpy, glxbackend->win, protocols, 2); } /* Updates the _NET_WM_USER_TIME property of the window */ static void set_wm_user_time (PgmGlxBackend *glxbackend, glong timestamp) { if (timestamp) XChangeProperty (glxbackend->dpy, glxbackend->win, glxbackend->atom[ATOM_NET_WM_USER_TIME], XA_CARDINAL, 32, PropModeReplace, (guchar *) ×tamp, 1); } /* Handles the protocols event and returns an event to push if any */ static PgmEvent * handle_wm_protocols_event (PgmGlxBackend *glxbackend, XEvent *xevent) { PgmEvent *pgmevent = NULL; /* Delete request */ if (xevent->xclient.data.l[0] == glxbackend->atom[ATOM_WM_DELETE_WINDOW] && xevent->xany.window == glxbackend->win) { pgmevent = pgm_event_new (PGM_DELETE); set_wm_user_time (glxbackend, xevent->xclient.data.l[1]); } /* Ping request */ else if (xevent->xclient.data.l[0] == glxbackend->atom[ATOM_NET_WM_PING] && xevent->xany.window == glxbackend->win) { xevent->xclient.window = glxbackend->root; XSendEvent (glxbackend->dpy, glxbackend->root, False, SubstructureRedirectMask | SubstructureNotifyMask, (XEvent *) &xevent->xclient); } return pgmevent; } /* Setup XEmbed informations */ static void set_xembed_info (PgmGlxBackend *glxbackend, guint32 xembed_info) { gint32 info[2]; info[0] = XEMBED_PROTOCOL_VERSION; info[1] = xembed_info; trap_x_errors (); XChangeProperty (glxbackend->dpy, glxbackend->win, glxbackend->atom[ATOM_XEMBED_INFO], glxbackend->atom[ATOM_XEMBED_INFO], 32, PropModeReplace, (guchar*) info, 2); untrap_x_errors (); } /* Send an XEmbed message */ static void send_xembed_message (PgmGlxBackend *glxbackend, glong message, glong detail, glong data1, glong data2) { XClientMessageEvent xclient; memset (&xclient, 0, sizeof (xclient)); xclient.window = glxbackend->embedder; xclient.type = ClientMessage; xclient.message_type = glxbackend->atom[ATOM_XEMBED]; xclient.format = 32; xclient.data.l[0] = CurrentTime; xclient.data.l[1] = message; xclient.data.l[2] = detail; xclient.data.l[3] = data1; xclient.data.l[4] = data2; trap_x_errors (); XSendEvent (glxbackend->dpy, glxbackend->embedder, False, NoEventMask, (XEvent*) &xclient); XSync (glxbackend->dpy, False); untrap_x_errors (); } /* Handle an XEmbed event */ static PgmEvent* handle_xembed_event (PgmGlxBackend *glxbackend, XEvent *xevent) { PgmEvent *pgmevent = NULL; switch (xevent->xclient.data.l[1]) { /* The viewport has just been embedded, let's store the embedded Window * and create an Expose event */ case XEMBED_EMBEDDED_NOTIFY: glxbackend->embedder = xevent->xclient.data.l[3]; set_xembed_info (glxbackend, XEMBED_MAPPED); pgmevent = pgm_event_new (PGM_EXPOSE); break; /* Unused */ case XEMBED_WINDOW_ACTIVATE: case XEMBED_WINDOW_DEACTIVATE: case XEMBED_REQUEST_FOCUS: case XEMBED_FOCUS_IN: case XEMBED_FOCUS_OUT: case XEMBED_FOCUS_NEXT: case XEMBED_FOCUS_PREV: case XEMBED_MODALITY_ON: case XEMBED_MODALITY_OFF: break; default: break; } return pgmevent; } /* Retrieve the drag uri list from the selection */ static gchar** get_xdnd_uri_list (PgmGlxBackend *glxbackend, XEvent *xevent) { guchar *data = NULL; gchar **uri = NULL; gulong nitems, nbytes; gint format; Atom type; XGetWindowProperty (glxbackend->dpy, xevent->xselection.requestor, xevent->xselection.property, 0, 0x1fffffff, False, AnyPropertyType, &type, &format, &nitems, &nbytes, &data); uri = g_uri_list_extract_uris ((gchar*) data); XFree (data); GST_DEBUG_OBJECT (glxbackend, "drag uri list retrieved"); return uri; } /* Clean up xdnd data */ static void cleanup_xdnd_data (PgmGlxBackend *glxbackend) { glxbackend->drag_data_has_uri = FALSE; glxbackend->drag_data_received = FALSE; glxbackend->drag_status = FALSE; glxbackend->drag_source = None; glxbackend->drag_x = -1.0f; glxbackend->drag_y = -1.0f; if (glxbackend->drag_uri) { g_strfreev (glxbackend->drag_uri); glxbackend->drag_uri = NULL; } } /* Send an Xdnd message */ static void send_xdnd_message (PgmGlxBackend *glxbackend, Window dest_window, Atom message, glong data1, glong data2, glong data3, glong data4) { XEvent xevent; /* Build it */ memset (&xevent, 0, sizeof (XEvent)); xevent.xclient.type = ClientMessage; xevent.xclient.message_type = message; xevent.xclient.format = 32; xevent.xclient.window = dest_window; xevent.xclient.data.l[0] = glxbackend->win; xevent.xclient.data.l[1] = data1; xevent.xclient.data.l[2] = data2; xevent.xclient.data.l[3] = data3; xevent.xclient.data.l[4] = data4; /* Then send it */ trap_x_errors (); XSendEvent (glxbackend->dpy, dest_window, False, NoEventMask, (XEvent*) &xevent); XSync (glxbackend->dpy, False); untrap_x_errors (); } /* Indicate the drag source if we accept or refuse a drag */ static void update_xdnd_status (PgmGlxBackend *glxbackend) { /* Accept and request the next XdndPosition */ if (glxbackend->drag_status) { GST_DEBUG_OBJECT (glxbackend, "sending message accepting xdnd drag"); send_xdnd_message (glxbackend, glxbackend->drag_source, glxbackend->atom[ATOM_XDND_STATUS], 1 | 2, 0, 0, glxbackend->atom[ATOM_XDND_ACTION_LINK]); } /* Refuse but request next XdndPosition message */ else { GST_DEBUG_OBJECT (glxbackend, "sending message refusing xdnd drag"); send_xdnd_message (glxbackend, glxbackend->drag_source, glxbackend->atom[ATOM_XDND_STATUS], 2, 0, 0, None); } } /* Handle an XdndEnter event */ static void handle_xdnd_enter_event (PgmGlxBackend *glxbackend, XEvent *xevent) { const gchar *uri_type = "text/uri-list"; guint uri_type_length = 13; gboolean found = FALSE; gchar *data_type; guint i; GST_DEBUG_OBJECT (glxbackend, "initiated xdnd protocol %lu with window 0x%x", (xevent->xclient.data.l[1] & 0xff000000) >> 24, (guint) xevent->xclient.data.l[0]); /* Search for the "text/uri-list" data type in the three available one */ for (i = 2; i < 5; i++) { if (xevent->xclient.data.l[i] == None) continue; data_type = XGetAtomName (glxbackend->dpy, xevent->xclient.data.l[i]); if (!strncmp (data_type, uri_type, uri_type_length)) { found = TRUE; XFree (data_type); break; } XFree (data_type); } /* If we've not found the data type, we check if the source has more than * three data types, then retrieve them and trigger a new search */ if (!found && (xevent->xclient.data.l[1] & 1)) { gulong nitems, after; Atom type, *atoms; guchar *data; gint format; guint i; /* Get the atoms */ XGetWindowProperty (glxbackend->dpy, xevent->xclient.data.l[0], glxbackend->atom[ATOM_XDND_TYPE_LIST], 0, 65536, False, XA_ATOM, &type, &format, &nitems, &after, &data); XSync (glxbackend->dpy, False); atoms = (Atom*) data; /* Search for the good one */ for (i = 0; i < nitems; i++) { if (xevent->xclient.data.l[i] == None) continue; data_type = XGetAtomName (glxbackend->dpy, atoms[i]); if (!strncmp (data_type, uri_type, uri_type_length)) { found = TRUE; XFree (data_type); break; } XFree (data_type); } XFree (atoms); } /* If the uri-list data type is available, we request the data and set up * the drag session correctly */ if (found) { GST_DEBUG_OBJECT (glxbackend, "\"text/uri-list\" drag type available, " "requesting drag data"); XConvertSelection (glxbackend->dpy, glxbackend->atom[ATOM_XDND_SELECTION], glxbackend->atom[ATOM_TEXT_URI_LIST], glxbackend->atom[ATOM_PGM_SELECTION], glxbackend->win, CurrentTime); glxbackend->drag_source = xevent->xclient.data.l[0]; glxbackend->drag_data_has_uri = TRUE; glxbackend->drag_data_received = FALSE; } else { GST_DEBUG_OBJECT (glxbackend, "\"text/uri-list\" drag type unavailable"); glxbackend->drag_data_has_uri = FALSE; } } /* Handle an XdndPosition event */ static PgmEvent* handle_xdnd_position_event (PgmGlxBackend *glxbackend, XEvent *xevent) { PgmEventDnd *pgmevent = NULL; /* We handle this dragging */ if (glxbackend->drag_data_has_uri) { /* If we already received the uri list from the selection */ if (glxbackend->drag_data_received) { gint src_x, src_y, dst_x, dst_y; Window child; /* Translate the mouse position in window coordinates */ src_x = xevent->xclient.data.l[2] >> 16; src_y = xevent->xclient.data.l[2] & 0xffff; XTranslateCoordinates (glxbackend->dpy, glxbackend->root, glxbackend->win, src_x, src_y, &dst_x, &dst_y, &child); /* Store position so that we have it to handle the drop */ glxbackend->drag_x = (gfloat) dst_x; glxbackend->drag_y = (gfloat) dst_y; /* Then build a drag motion event */ pgmevent = (PgmEventDnd*) pgm_event_new (PGM_DRAG_MOTION); pgmevent->time = xevent->xclient.data.l[3]; pgmevent->uri = g_strdupv (glxbackend->drag_uri); pgmevent->x = (gfloat) dst_x; pgmevent->y = (gfloat) dst_y; } update_xdnd_status (glxbackend); } /* We don't handle this dragging, refuse the xdnd session */ else { GST_DEBUG_OBJECT (glxbackend, "sending message refusing xdnd session"); send_xdnd_message (glxbackend, glxbackend->drag_source, glxbackend->atom[ATOM_XDND_STATUS], glxbackend->win, 0, None, None); } return (PgmEvent*) pgmevent; } /* Handle an XdndDrop event */ static PgmEvent* handle_xdnd_drop_event (PgmGlxBackend *glxbackend, XEvent *xevent) { PgmEventDnd *pgmevent = NULL; if (glxbackend->drag_data_received && glxbackend->drag_status) { GST_DEBUG_OBJECT (glxbackend, "drop accepted, finishing xdnd protocol"); pgmevent = (PgmEventDnd*) pgm_event_new (PGM_DRAG_DROP); pgmevent->time = xevent->xclient.data.l[1]; pgmevent->uri = g_strdupv (glxbackend->drag_uri); pgmevent->x = glxbackend->drag_x; pgmevent->y = glxbackend->drag_y; send_xdnd_message (glxbackend, glxbackend->drag_source, glxbackend->atom[ATOM_XDND_FINISHED], 1, None, None, glxbackend->atom[ATOM_XDND_ACTION_LINK]); } else { GST_DEBUG_OBJECT (glxbackend, "drop refused, finishing xdnd protocol"); send_xdnd_message (glxbackend, glxbackend->drag_source, glxbackend->atom[ATOM_XDND_FINISHED], 0, None, None, None); } cleanup_xdnd_data (glxbackend); return (PgmEvent*) pgmevent; } /* Handle an XdndLeave event */ static PgmEvent* handle_xdnd_leave_event (PgmGlxBackend *glxbackend, XEvent *xevent) { PgmEventDnd *pgmevent = NULL; GST_DEBUG_OBJECT (glxbackend, "drag leave, finishing xdnd protocol"); pgmevent = (PgmEventDnd*) pgm_event_new (PGM_DRAG_LEAVE); pgmevent->time = CurrentTime; pgmevent->uri = g_strdupv (glxbackend->drag_uri); pgmevent->x = glxbackend->drag_x; pgmevent->y = glxbackend->drag_y; send_xdnd_message (glxbackend, glxbackend->drag_source, glxbackend->atom[ATOM_XDND_FINISHED], 0, None, None, None); cleanup_xdnd_data (glxbackend); return (PgmEvent*) pgmevent; } /* Send a focus request */ static void send_focus_message (PgmGlxBackend *glxbackend) { XClientMessageEvent xclient; memset (&xclient, 0, sizeof (xclient)); xclient.type = ClientMessage; xclient.window = glxbackend->win; xclient.message_type = glxbackend->atom[ATOM_NET_ACTIVE_WINDOW]; xclient.format = 32; xclient.data.l[0] = 1; xclient.data.l[1] = CurrentTime; xclient.data.l[2] = None; xclient.data.l[3] = 0; xclient.data.l[4] = 0; XSendEvent (glxbackend->dpy, glxbackend->root, False, SubstructureRedirectMask | SubstructureNotifyMask, (XEvent*) &xclient); XSync (glxbackend->dpy, False); } /* Escape string for X messages */ static gchar* escape_for_x_message (const gchar *str) { GString *retval; const char *p; retval = g_string_new (NULL); p = str; while (*p) { switch (*p) { case ' ': case '"': case '\\': g_string_append_c (retval, '\\'); break; } g_string_append_c (retval, *p); ++p; } return g_string_free (retval, FALSE); } /* Initialize the startup notification protocol, filling up the startup id from * the DESKTOP_STARTUP_ID environment variable */ static void init_startup_notification (PgmGlxBackend *glxbackend) { const gchar *startup_id; startup_id = g_getenv ("DESKTOP_STARTUP_ID"); if (startup_id && *startup_id != '\0') { GST_INFO_OBJECT (glxbackend, "DESKTOP_STARTUP_ID=\"%s\"", startup_id); if (!g_utf8_validate (startup_id, -1, NULL)) GST_WARNING_OBJECT (glxbackend, "DESKTOP_STARTUP_ID contains " "invalid UTF-8"); else glxbackend->startup_notification_id = g_strdup (startup_id); /* Clear the environment variable so it won't be inherited by child * processes and confuse things */ g_unsetenv ("DESKTOP_STARTUP_ID"); /* Set the startup id on the leader window so it applies to all windows * we create on this display */ XChangeProperty (glxbackend->dpy, glxbackend->win, glxbackend->atom[ATOM_NET_STARTUP_ID], glxbackend->atom[ATOM_UTF8_STRING], 8, PropModeReplace, (guchar*) startup_id, strlen (startup_id)); } } /* Creates and returns a void cursor from X */ static Cursor get_none_cursor (PgmGlxBackend *backend) { Cursor none = None; gchar none_bits[32]; Pixmap none_pixmap; XColor color; memset (none_bits, 0, sizeof (none_bits)); memset (&color, 0, sizeof (color)); none_pixmap = XCreateBitmapFromData (backend->dpy, backend->win, none_bits, 16, 16); if (none_pixmap != None) { none = XCreatePixmapCursor (backend->dpy, none_pixmap, none_pixmap, &color, &color, 0, 0); XFreePixmap (backend->dpy, none_pixmap); } return none; } /* Frees the current X icon */ static gboolean free_icon (PgmBackend *backend) { PgmGlxBackend *glxbackend = PGM_GLX_BACKEND (backend); XWMHints *old_wm_hints = NULL; old_wm_hints = XGetWMHints (glxbackend->dpy, glxbackend->win); if (old_wm_hints) { if ((old_wm_hints->flags & IconPixmapHint) && old_wm_hints->icon_pixmap) XFreePixmap (glxbackend->dpy, old_wm_hints->icon_pixmap); if ((old_wm_hints->flags & IconMaskHint) && old_wm_hints->icon_mask) XFreePixmap (glxbackend->dpy, old_wm_hints->icon_mask); XFree (old_wm_hints); } return TRUE; } /* Compresses events of the same type */ static void compress_events (PgmGlxBackend *glxbackend, XEvent *xevent) { while (XCheckTypedWindowEvent (glxbackend->dpy, glxbackend->win, xevent->type, xevent)); } /* Update the viewport size and the projection */ static void update_viewport_size (PgmGlxBackend *glxbackend, gint width, gint height) { PgmBackend *backend = PGM_BACKEND (glxbackend); PgmGlViewport *glviewport = backend->context->glviewport; PgmViewport *viewport = PGM_VIEWPORT (glviewport); GST_OBJECT_LOCK (viewport); if (viewport->width != width || viewport->height != height) { viewport->width = width; viewport->height = height; GST_OBJECT_UNLOCK (viewport); pgm_viewport_update_projection (viewport); return; } GST_OBJECT_UNLOCK (viewport); } /* Fill a PgmEventKey giving the corresponding keyboard xevent */ static void translate_key_event (PgmGlxBackend *glxbackend, PgmEventKey *event, XEvent *xevent) { gint index; event->time = xevent->xkey.time; event->modifier = (PgmModifierType) xevent->xkey.state; /* FIXME: This is a really basic support, a lot of keys are not handled */ index = (event->modifier & (PGM_SHIFT_MASK | PGM_CAPSLOCK_MASK)) ? 1 : 0; event->keyval = XKeycodeToKeysym (glxbackend->dpy, xevent->xkey.keycode, index); event->hardware_keycode = xevent->xkey.keycode; } /* Fill a PgmEventMotion giving the corresponding motion xevent */ static void translate_motion_event (PgmGlxBackend *glxbackend, PgmEventMotion *event, XEvent *xevent) { event->time = xevent->xmotion.time; event->x = xevent->xmotion.x; event->y = xevent->xmotion.y; event->pressure = 0; } /* Fill a PgmEventButton giving the corresponding button xevent */ static void translate_button_press_event (PgmGlxBackend *glxbackend, PgmEventButton *event, XEvent *xevent) { event->time = xevent->xbutton.time; event->x = xevent->xbutton.x; event->y = xevent->xbutton.y; event->pressure = 0; } /* Fill a PgmEventScroll giving the corresponding button xevent */ static void translate_scroll_event (PgmGlxBackend *glxbackend, PgmEventScroll *event, XEvent *xevent) { event->time = xevent->xbutton.time; event->x = xevent->xbutton.x; event->y = xevent->xbutton.y; } /* Fill a PgmEventConfigure giving the corresponding configure xevent */ static void translate_configure_event (PgmGlxBackend *glxbackend, PgmEventConfigure *event, XEvent *xevent) { event->x = xevent->xconfigure.x; event->y = xevent->xconfigure.y; event->width = xevent->xconfigure.width; event->height = xevent->xconfigure.height; } /* Create a button event (Release) giving the corresponding button xevent */ static PgmEvent * create_button_release_event (PgmGlxBackend *glxbackend, XEvent *xevent) { PgmEventButton *event; switch (xevent->xbutton.button) { case 1: event = (PgmEventButton *) pgm_event_new (PGM_BUTTON_RELEASE); event->button = PGM_BUTTON_LEFT; break; case 2: event = (PgmEventButton *) pgm_event_new (PGM_BUTTON_RELEASE); event->button = PGM_BUTTON_MIDDLE; break; case 3: event = (PgmEventButton *) pgm_event_new (PGM_BUTTON_RELEASE); event->button = PGM_BUTTON_RIGHT; break; /* No release */ default: return NULL; } event->time = xevent->xbutton.time; event->x = xevent->xbutton.x; event->y = xevent->xbutton.y; event->pressure = 0; return (PgmEvent *) event; } /* Create a button event (Scroll, Press) given an XEvent */ static PgmEvent * create_button_event (PgmGlxBackend *glxbackend, XEvent *xevent) { PgmEvent *event; switch (xevent->xbutton.button) { case 1: event = pgm_event_new (PGM_BUTTON_PRESS); ((PgmEventButton *) event)->button = PGM_BUTTON_LEFT; translate_button_press_event (glxbackend, (PgmEventButton *) event, xevent); break; case 2: event = pgm_event_new (PGM_BUTTON_PRESS); ((PgmEventButton *) event)->button = PGM_BUTTON_MIDDLE; translate_button_press_event (glxbackend, (PgmEventButton *) event, xevent); break; case 3: event = pgm_event_new (PGM_BUTTON_PRESS); ((PgmEventButton *) event)->button = PGM_BUTTON_RIGHT; translate_button_press_event (glxbackend, (PgmEventButton *) event, xevent); break; case 4: event = pgm_event_new (PGM_SCROLL); ((PgmEventScroll *) event)->direction = PGM_SCROLL_UP; translate_scroll_event (glxbackend, (PgmEventScroll *) event, xevent); break; case 5: event = pgm_event_new (PGM_SCROLL); ((PgmEventScroll *) event)->direction = PGM_SCROLL_DOWN; translate_scroll_event (glxbackend, (PgmEventScroll *) event, xevent); break; default: event = NULL; break; } return event; } /* Build and push a viewport state event */ static void push_state_event (PgmBackend *backend, PgmViewportState changed_mask, PgmViewportState state_mask) { PgmGlViewport *glviewport = backend->context->glviewport; PgmViewport *viewport = PGM_VIEWPORT (glviewport); PgmEventState *event; event = (PgmEventState*) pgm_event_new (PGM_STATE); event->changed_mask = changed_mask; event->state_mask = state_mask; pgm_viewport_push_event (viewport, (PgmEvent*) event); } /* Dispatches events pushing them on the GlViewport queue */ static gboolean dispatch_x_events (PgmBackend *backend) { static guint8 button_mask = 0; PgmGlxBackend *glxbackend = PGM_GLX_BACKEND (backend); PgmGlViewport *glviewport = backend->context->glviewport; PgmViewport *viewport = PGM_VIEWPORT (glviewport); if (!XPending (glxbackend->dpy)) return TRUE; while (XEventsQueued (glxbackend->dpy, QueuedAlready)) { PgmEvent *pgmevent = NULL; XEvent xevent; XNextEvent (glxbackend->dpy, &xevent); switch (xevent.type) { /* --- Expose event --- */ case Expose: GST_DEBUG_OBJECT (glxbackend, "Expose event"); compress_events (glxbackend, &xevent); pgmevent = pgm_event_new (PGM_EXPOSE); pgm_context_update (backend->context); pgm_viewport_push_event (viewport, pgmevent); break; /* --- Key press event --- */ case KeyPress: GST_DEBUG_OBJECT (glxbackend, "KeyPress event: (time=%u, state=0x%x, " "keycode=0x%x)", (guint) xevent.xkey.time, xevent.xkey.state, xevent.xkey.keycode); pgmevent = pgm_event_new (PGM_KEY_PRESS); translate_key_event (glxbackend, (PgmEventKey *) pgmevent, &xevent); /* Handles TAB when the Window is embedded, we request a focus * switch to the prev/next widget through the XEmbed protocol */ if (glxbackend->embedder != None) { switch (((PgmEventKey *) pgmevent)->keyval) { case PGM_Tab: send_xembed_message (glxbackend, XEMBED_FOCUS_NEXT, 0, 0, 0); pgm_event_free (pgmevent); continue; case PGM_ISO_Left_Tab: send_xembed_message (glxbackend, XEMBED_FOCUS_PREV, 0, 0, 0); pgm_event_free (pgmevent); continue; default: break; } } set_wm_user_time (glxbackend, xevent.xkey.time); pgm_viewport_push_event (viewport, pgmevent); break; /* --- Key release event --- */ case KeyRelease: GST_DEBUG_OBJECT (glxbackend, "KeyRelease event: (time=%u, " "state=0x%x, keycode=0x%x)", (guint) xevent.xkey.time, xevent.xkey.state, xevent.xkey.keycode); pgmevent = pgm_event_new (PGM_KEY_RELEASE); translate_key_event (glxbackend, (PgmEventKey *) pgmevent, &xevent); pgm_viewport_push_event (viewport, pgmevent); break; /* --- Button press event --- */ case ButtonPress: GST_DEBUG_OBJECT (glxbackend, "ButtonPress event: (time=%u, " "button=%d x=%d y=%d)", (guint) xevent.xbutton.time, xevent.xbutton.button, xevent.xbutton.x, xevent.xbutton.y); /* If the Window is embedded, we request the focus through the * XEmbed protocol */ if (glxbackend->embedder != None) send_xembed_message (glxbackend, XEMBED_REQUEST_FOCUS, 0, 0, 0); pgmevent = create_button_event (glxbackend, &xevent); if (pgmevent) { set_wm_user_time (glxbackend, xevent.xbutton.time); pgm_viewport_push_event (viewport, pgmevent); /* Events here could also be scroll events, so we check it's not * and then grab the pointer */ if (pgmevent->type == PGM_BUTTON_PRESS) { button_mask |= ((PgmEventButton *) pgmevent)->button; XGrabPointer (glxbackend->dpy, glxbackend->win, False, ButtonPressMask | ButtonReleaseMask | PointerMotionMask, GrabModeAsync, GrabModeAsync, None, None, CurrentTime); } } break; /* --- Button release event --- */ case ButtonRelease: GST_DEBUG_OBJECT (glxbackend, "ButtonRelease event: (time=%u, " "button=%d x=%d y=%d)", (guint) xevent.xbutton.time, xevent.xbutton.button, xevent.xbutton.x, xevent.xbutton.y); pgmevent = create_button_release_event (glxbackend, &xevent); if (pgmevent) { pgm_viewport_push_event (viewport, pgmevent); button_mask &= ~((PgmEventButton *) pgmevent)->button; if (button_mask == 0) XUngrabPointer(glxbackend->dpy, CurrentTime); } break; /* --- Motion notify event --- */ case MotionNotify: GST_DEBUG_OBJECT (glxbackend, "MotionNotify event: (time=%u, x=%d, " "y=%d)", (guint) xevent.xmotion.time, xevent.xmotion.x, xevent.xmotion.y); compress_events (glxbackend, &xevent); pgmevent = pgm_event_new (PGM_MOTION_NOTIFY); translate_motion_event (glxbackend, (PgmEventMotion *) pgmevent, &xevent); pgm_viewport_push_event (viewport, pgmevent); break; /* --- Configure notify event --- */ case ConfigureNotify: GST_DEBUG_OBJECT (glxbackend, "ConfigureNotify event: (x=%d, y=%d, " "width=%d, height=%d)", xevent.xconfigure.x, xevent.xconfigure.y, xevent.xconfigure.width, xevent.xconfigure.height); pgmevent = pgm_event_new (PGM_CONFIGURE); translate_configure_event (glxbackend, (PgmEventConfigure *) pgmevent, &xevent); update_viewport_size (glxbackend, ((PgmEventConfigure *) pgmevent)->width, ((PgmEventConfigure *) pgmevent)->height); pgm_viewport_push_event (viewport, pgmevent); break; /* --- Map notify event --- */ case MapNotify: GST_DEBUG_OBJECT (glxbackend, "MapNotify event"); if (glxbackend->state & PGM_VIEWPORT_ICONIFIED) { glxbackend->state &= ~PGM_VIEWPORT_ICONIFIED; push_state_event (backend, PGM_VIEWPORT_ICONIFIED, glxbackend->state); } break; /* --- Unmap notify event --- */ case UnmapNotify: GST_DEBUG_OBJECT (glxbackend, "UnmapNotify event"); if (! (glxbackend->state & PGM_VIEWPORT_ICONIFIED)) { pgm_context_prevent_update (backend->context, TRUE); glxbackend->state |= PGM_VIEWPORT_ICONIFIED; push_state_event (backend, PGM_VIEWPORT_ICONIFIED, glxbackend->state); } break; /* --- Visibility notify event --- */ case VisibilityNotify: GST_DEBUG_OBJECT (glxbackend, "VisibilityNotify event: (state=%d)", xevent.xvisibility.state); if (xevent.xvisibility.state == VisibilityUnobscured || xevent.xvisibility.state == VisibilityPartiallyObscured) pgm_context_prevent_update (backend->context, FALSE); else if (xevent.xvisibility.state == VisibilityFullyObscured) pgm_context_prevent_update (backend->context, TRUE); break; /* --- Selection notify event --- */ case SelectionNotify: GST_DEBUG_OBJECT (glxbackend, "SelectionNotify event: " "(requestor=0x%x)", (guint) xevent.xselection.requestor); glxbackend->drag_uri = get_xdnd_uri_list (glxbackend, &xevent); if (glxbackend->drag_uri) glxbackend->drag_data_received = TRUE; break; /* --- Client message event --- */ case ClientMessage: GST_DEBUG_OBJECT (glxbackend, "ClientMessage event: " "message_type='%s')", XGetAtomName (glxbackend->dpy, xevent.xclient.message_type)); { Atom atom = xevent.xclient.message_type; if (atom == glxbackend->atom[ATOM_WM_PROTOCOLS]) pgmevent = handle_wm_protocols_event (glxbackend, &xevent); else if (atom == glxbackend->atom[ATOM_XEMBED]) pgmevent = handle_xembed_event (glxbackend, &xevent); else if (atom == glxbackend->atom[ATOM_XDND_ENTER]) handle_xdnd_enter_event (glxbackend, &xevent); else if (atom == glxbackend->atom[ATOM_XDND_POSITION]) pgmevent = handle_xdnd_position_event (glxbackend, &xevent); else if (atom == glxbackend->atom[ATOM_XDND_DROP]) pgmevent = handle_xdnd_drop_event (glxbackend, &xevent); else if (atom == glxbackend->atom[ATOM_XDND_LEAVE]) pgmevent = handle_xdnd_leave_event (glxbackend, &xevent); if (pgmevent) pgm_viewport_push_event (viewport, pgmevent); } default: break; } } return TRUE; } /* Events preparing */ static gboolean event_prepare (GSource *source, gint *timeout) { PgmGlxBackendSource *glxbackend_source = (PgmGlxBackendSource *) source; PgmGlxBackend *glxbackend = glxbackend_source->glxbackend; PgmBackend *backend = PGM_BACKEND (glxbackend); gint requested_fps = backend->context->requested_fps; if (XEventsQueued (glxbackend->dpy, QueuedAlready)) return TRUE; /* If there are rendering updates */ if (backend->context->update_tag) { /* If the rendering is blocked on the vblank, we give a timeout of 0 */ if (requested_fps == 0) *timeout = 0; /* If the rendering is done in a timeout, we use the same timeout */ else *timeout = requested_fps; } /* If there are no rendering updates, we poll with no timeout */ else *timeout = -1; return FALSE; } /* Events checking */ static gboolean event_check (GSource *source) { PgmGlxBackendSource *glxbackend_source = (PgmGlxBackendSource *) source; return (glxbackend_source->poll_fd.revents & G_IO_IN) != 0; } /* Events dispatching */ static gboolean event_dispatch (GSource *source, GSourceFunc callback, gpointer data) { if (callback) return callback (data); return FALSE; } /* Add event handling source to the rendering main context */ static gboolean add_event_source (PgmGlxBackend *glxbackend) { PgmBackend *backend = PGM_BACKEND (glxbackend); GMainContext *render_context = backend->context->render_context; PgmGlxBackendSource *source; /* Filter handled events */ XSelectInput (glxbackend->dpy, glxbackend->win, KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask | StructureNotifyMask | ExposureMask | PointerMotionMask | PropertyChangeMask | VisibilityChangeMask); /* Create and initialize the event handling dedicated source */ source = (PgmGlxBackendSource *) g_source_new (&event_funcs, sizeof (PgmGlxBackendSource)); source->poll_fd.fd = ConnectionNumber (glxbackend->dpy); source->poll_fd.events = G_IO_IN; source->glxbackend = glxbackend; g_source_add_poll ((GSource *) source, &source->poll_fd); /* Attach it */ g_source_set_callback ((GSource *) source, (GSourceFunc) dispatch_x_events, glxbackend, NULL); g_source_set_priority ((GSource *) source, G_PRIORITY_DEFAULT-20); glxbackend->event_id = g_source_attach ((GSource *) source, render_context); g_source_unref ((GSource *) source); return TRUE; } /* Switches the window to fullscreen depending on the fullscreen value */ static void set_fullscreen (PgmGlxBackend *glxbackend, gboolean fullscreen) { PgmBackend *backend = PGM_BACKEND (glxbackend); PgmViewport *viewport = PGM_VIEWPORT (backend->context->glviewport); XClientMessageEvent xclient; /* Adapt the viewport size */ if (glxbackend->fullscreen != fullscreen) { if (fullscreen) { glxbackend->windowed_width = viewport->width; glxbackend->windowed_height = viewport->height; update_viewport_size (glxbackend, glxbackend->resolution_width, glxbackend->resolution_height); } else update_viewport_size (glxbackend, glxbackend->windowed_width, glxbackend->windowed_height); } /* And switch the fullscreen state */ xclient.type = ClientMessage; xclient.window = glxbackend->win; xclient.display = glxbackend->dpy; xclient.message_type = glxbackend->atom[ATOM_NET_WM_STATE]; xclient.format = 32; xclient.data.l[0] = fullscreen; xclient.data.l[1] = glxbackend->atom[ATOM_NET_WM_STATE_FULLSCREEN]; xclient.data.l[2] = None; xclient.data.l[3] = 0; xclient.data.l[4] = 0; XSendEvent (glxbackend->dpy, glxbackend->root, False, SubstructureRedirectMask | SubstructureNotifyMask, (XEvent *) &xclient); XSync (glxbackend->dpy, True); } /* PgmBackend methods */ static gboolean pgm_glx_backend_create_window (PgmBackend *backend) { PgmGlxBackend *glxbackend = PGM_GLX_BACKEND (backend); guchar xdnd_version = XDND_PROTOCOL_VERSION; const gchar *indirect; XSetWindowAttributes attr; PgmViewport *viewport; gint width, height; viewport = PGM_VIEWPORT (backend->context->glviewport); glxbackend->dpy = XOpenDisplay (NULL); if (!glxbackend->dpy) { GST_ERROR_OBJECT (glxbackend, "couldn't open default display"); return FALSE; } glxbackend->screen = DefaultScreen (glxbackend->dpy); glxbackend->root = DefaultRootWindow (glxbackend->dpy); if (!load_glx_extensions (glxbackend)) { GST_ERROR_OBJECT (glxbackend, "couldn't load GLX extensions"); return FALSE; } /* Framebuffer configuration retrieving */ if (!get_framebuffer_configuration (glxbackend, &glxbackend->visual, &glxbackend->fbconfig, &glxbackend->fbconfig_index)) { GST_ERROR_OBJECT (glxbackend, "couldn't get framebuffer configuration"); return FALSE; } /* Create the window */ pgm_viewport_get_size (viewport, &width, &height); memset (&attr, 0, sizeof (XSetWindowAttributes)); attr.colormap = XCreateColormap (glxbackend->dpy, glxbackend->root, glxbackend->visual->visual, AllocNone); glxbackend->win = XCreateWindow (glxbackend->dpy, glxbackend->root, 0, 0, width, height, 0, glxbackend->visual->depth, InputOutput, glxbackend->visual->visual, CWBackPixel | CWBorderPixel | CWColormap, &attr); if (!glxbackend->win) { GST_ERROR_OBJECT (glxbackend, "couldn't create window"); return FALSE; } GST_INFO_OBJECT (glxbackend, "created window (id 0x%x)", (guint) glxbackend->win); /* Event source */ if (!add_event_source (glxbackend)) { GST_ERROR_OBJECT (glxbackend, "couldn't add event handling source\n"); return FALSE; } /* Fill X atoms arrays */ glxbackend->atom = g_malloc (nb_atoms * sizeof (Atom)); XInternAtoms (glxbackend->dpy, (gchar**) atom_name, nb_atoms, False, glxbackend->atom); /* X protocols initialization */ set_wm_protocols (glxbackend); set_xembed_info (glxbackend, 0); XChangeProperty (glxbackend->dpy, glxbackend->win, glxbackend->atom[ATOM_XDND_AWARE], XA_ATOM, 32, PropModeReplace, &xdnd_version, 1); /* Create the OpenGL context */ indirect = g_getenv ("PGM_GL_INDIRECT_RENDERING"); if (indirect && *indirect == '1') glxbackend->ctx = glXCreateContext (glxbackend->dpy, glxbackend->visual, NULL, PGM_GL_FALSE); else glxbackend->ctx = glXCreateContext (glxbackend->dpy, glxbackend->visual, NULL, PGM_GL_TRUE); if (!glxbackend->ctx) { GST_ERROR_OBJECT (glxbackend, "couldn't create OpenGL context"); return FALSE; } glXMakeCurrent (glxbackend->dpy, glxbackend->win, glxbackend->ctx); /* Is it a direct rendering context? */ if (glXIsDirect (glxbackend->dpy, glxbackend->ctx)) { GST_INFO_OBJECT (glxbackend, "created OpenGL context (direct rendering)"); glxbackend->feature_mask |= PGM_GLX_FEAT_DIRECT_RENDERING; } else GST_INFO_OBJECT (glxbackend, "created opengl context (indirect rendering)"); /* Init the startup notification protocol */ if (G_LIKELY (!glxbackend->startup_notification_id)) init_startup_notification (glxbackend); setup_vblank (glxbackend); glxbackend->resolution_width = DisplayWidth (glxbackend->dpy, glxbackend->screen); glxbackend->resolution_height = DisplayHeight (glxbackend->dpy, glxbackend->screen); glxbackend->size_mm_width = DisplayWidthMM (glxbackend->dpy, glxbackend->screen); glxbackend->size_mm_height = DisplayHeightMM (glxbackend->dpy, glxbackend->screen); /* X sometimes reports broken size of 1 mm */ if (glxbackend->size_mm_width == 1 || glxbackend->size_mm_height == 1) { glxbackend->size_mm_width = glxbackend->resolution_width; glxbackend->size_mm_height = glxbackend->resolution_height; } glxbackend->none_cursor = get_none_cursor (glxbackend); gdk_pixbuf_xlib_init (glxbackend->dpy, glxbackend->screen); glxbackend->created = TRUE; return TRUE; } static gboolean pgm_glx_backend_destroy_window (PgmBackend *backend) { PgmGlxBackend *glxbackend = PGM_GLX_BACKEND (backend); GST_DEBUG_OBJECT (glxbackend, "destroy_window"); if (glxbackend->created) { /* Clean up X related data */ XFreeCursor (glxbackend->dpy, glxbackend->none_cursor); XFree (glxbackend->fbconfig); glXDestroyContext (glxbackend->dpy, glxbackend->ctx); XFree (glxbackend->visual); XDestroyWindow (glxbackend->dpy, glxbackend->win); XCloseDisplay (glxbackend->dpy); glxbackend->created = FALSE; g_free (glxbackend->atom); glxbackend->atom = NULL; } return TRUE; } static void pgm_glx_backend_set_title (PgmBackend *backend, const gchar *title) { PgmGlxBackend *glxbackend = PGM_GLX_BACKEND (backend); XChangeProperty (glxbackend->dpy, glxbackend->win, glxbackend->atom[ATOM_NET_WM_NAME], glxbackend->atom[ATOM_UTF8_STRING], 8, PropModeReplace, (guchar *) title, strlen (title)); XSync (glxbackend->dpy, False); } static gboolean pgm_glx_backend_set_visibility (PgmBackend *backend, gboolean visible) { PgmGlxBackend *glxbackend = PGM_GLX_BACKEND (backend); PgmViewport *viewport = PGM_VIEWPORT (backend->context->glviewport); if (visible) { XMapWindow (glxbackend->dpy, glxbackend->win); glxbackend->mapped = TRUE; /* If the fullscreen state has changed to FALSE during the hidden period */ /* we need to resize the window to avoid showing it on the whole screen */ if (!glxbackend->fullscreen) { gint width, height; pgm_viewport_get_size (viewport, &width, &height); XResizeWindow (glxbackend->dpy, glxbackend->win, width, height); } /* and then change accordingly the fullscreen state */ set_fullscreen (glxbackend, glxbackend->fullscreen); } else { XUnmapWindow (glxbackend->dpy, glxbackend->win); XSync (glxbackend->dpy, False); glxbackend->mapped = FALSE; } return TRUE; } static gboolean pgm_glx_backend_set_iconified (PgmBackend *backend, gboolean iconified) { PgmGlxBackend *glxbackend = PGM_GLX_BACKEND (backend); if (iconified) { if (glxbackend->mapped) { XIconifyWindow (glxbackend->dpy, glxbackend->win, glxbackend->screen); XSync (glxbackend->dpy, False); } else { glxbackend->state |= PGM_VIEWPORT_ICONIFIED; push_state_event (backend, PGM_VIEWPORT_ICONIFIED, glxbackend->state); } } else { if (glxbackend->mapped) send_focus_message (glxbackend); else { glxbackend->state &= ~PGM_VIEWPORT_ICONIFIED; push_state_event (backend, PGM_VIEWPORT_ICONIFIED, glxbackend->state); } } return TRUE; } static void pgm_glx_backend_focus (PgmBackend *backend) { PgmGlxBackend *glxbackend = PGM_GLX_BACKEND (backend); if (!glxbackend->mapped) pgm_glx_backend_set_visibility (backend, TRUE); send_focus_message (glxbackend); } static gboolean pgm_glx_backend_set_decorated (PgmBackend *backend, gboolean decorated) { PgmGlxBackend *glxbackend = PGM_GLX_BACKEND (backend); MwmHints *hints, new_hints; gulong nitems, bytes_after; guchar *data; gint format; Atom type; /* Create the new hints */ memset (&new_hints, 0, sizeof (new_hints)); new_hints.flags = MWM_HINTS_DECORATIONS; new_hints.decorations = decorated; /* Get the current hints */ XGetWindowProperty (glxbackend->dpy, glxbackend->win, glxbackend->atom[ATOM_MOTIF_WM_HINTS], 0, sizeof (MwmHints) / sizeof (glong), False, AnyPropertyType, &type, &format, &nitems, &bytes_after, &data); /* Set hints with our new hints */ if (type == None) hints = &new_hints; else { hints = (MwmHints*) data; hints->flags |= MWM_HINTS_DECORATIONS; hints->decorations = new_hints.decorations; } /* Change the decorations */ XChangeProperty (glxbackend->dpy, glxbackend->win, glxbackend->atom[ATOM_MOTIF_WM_HINTS], glxbackend->atom[ATOM_MOTIF_WM_HINTS], 32, PropModeReplace, (guchar*) hints, sizeof (MwmHints) / sizeof (long)); if (hints != &new_hints) XFree (hints); /* Send a focus request message so that the window keeps the focus after * the decorations change */ send_focus_message (glxbackend); return TRUE; } static void pgm_glx_backend_swap_buffers (PgmBackend *backend) { PgmGlxBackend *glxbackend = PGM_GLX_BACKEND (backend); glXSwapBuffers (glxbackend->dpy, glxbackend->win); } static gpointer pgm_glx_backend_get_proc_address (PgmBackend *backend, const gchar *proc_name) { PgmGlxBackend *glxbackend = PGM_GLX_BACKEND (backend); return get_proc_address (glxbackend, proc_name); } static gboolean pgm_glx_backend_set_size (PgmBackend *backend, gint width, gint height) { PgmGlxBackend *glxbackend = PGM_GLX_BACKEND (backend); XResizeWindow (glxbackend->dpy, glxbackend->win, width, height); XSync (glxbackend->dpy, False); return FALSE; } static gboolean pgm_glx_backend_set_fullscreen (PgmBackend *backend, gboolean fullscreen) { PgmGlxBackend *glxbackend = PGM_GLX_BACKEND (backend); set_fullscreen (glxbackend, fullscreen); glxbackend->fullscreen = fullscreen; return TRUE; } static void pgm_glx_backend_get_screen_size_mm (PgmBackend *backend, gint *width, gint *height) { PgmGlxBackend *glxbackend = PGM_GLX_BACKEND (backend); *width = glxbackend->size_mm_width; *height = glxbackend->size_mm_height; } static gboolean pgm_glx_backend_set_screen_resolution (PgmBackend *backend, gint width, gint height) { return FALSE; } static void pgm_glx_backend_get_screen_resolution (PgmBackend *backend, gint *width, gint *height) { PgmGlxBackend *glxbackend = PGM_GLX_BACKEND (backend); *width = glxbackend->resolution_width; *height = glxbackend->resolution_height; } static gboolean pgm_glx_backend_build_text_lists (PgmBackend *backend) { PgmGlxBackend *glxbackend = PGM_GLX_BACKEND (backend); PgmContextProcAddress *gl = backend->context->gl; XFontStruct *font; gint first; gint last; glxbackend->text_lists = gl->gen_lists (256); if (!gl->is_list (glxbackend->text_lists)) { GST_WARNING_OBJECT (glxbackend, "unable to build text display lists\n"); return FALSE; } font = XLoadQueryFont (glxbackend->dpy, "7x13bold"); if (!font) { GST_WARNING_OBJECT (glxbackend, "unable to load X font \"7x13bold\"\n"); font = XLoadQueryFont (glxbackend->dpy, "fixed"); if (!font) { GST_ERROR_OBJECT (glxbackend, "unable to load X font \"fixed\"\n"); return FALSE; } } first = font->min_char_or_byte2; last = font->max_char_or_byte2; /* FIXME: Set up an error handler */ glXUseXFont (font->fid, first, last - first + 1, glxbackend->text_lists + first); return TRUE; } static gboolean pgm_glx_backend_destroy_text_lists (PgmBackend *backend) { PgmGlxBackend *glxbackend = PGM_GLX_BACKEND (backend); PgmContextProcAddress *gl = backend->context->gl; if (gl->is_list (glxbackend->text_lists)) gl->delete_lists (glxbackend->text_lists, 256); return TRUE; } static void pgm_glx_backend_raster_text (PgmBackend *backend, const gchar *text, gfloat x, gfloat y, gfloat r, gfloat g, gfloat b) { PgmGlxBackend *glxbackend = PGM_GLX_BACKEND (backend); PgmContextProcAddress *gl = backend->context->gl; gl->load_identity (); gl->bind_texture (PGM_GL_TEXTURE_2D, 0); gl->push_attrib (PGM_GL_LIST_BIT); gl->color_4f (r, g, b, 1.0f); gl->raster_pos_2f (x, y); gl->list_base (glxbackend->text_lists); gl->call_lists (strlen (text), PGM_GL_UNSIGNED_BYTE, (PgmGlUbyte *) text); gl->pop_attrib (); } static void pgm_glx_backend_wait_for_vblank (PgmBackend *backend) { PgmGlxBackend *glxbackend = PGM_GLX_BACKEND (backend); if (glxbackend->vblank_mode == PGM_VBLANK_VIDEO_SYNC) { PgmGlxBackendProcAddress *glx = glxbackend->glx; guint retrace_count; glx->get_video_sync (&retrace_count); glx->wait_video_sync (2, (retrace_count + 1) % 2, &retrace_count); } } static void pgm_glx_backend_notify_startup_complete (PgmBackend *backend) { PgmGlxBackend *glxbackend = PGM_GLX_BACKEND (backend); gchar *dest, *dest_end, *escaped_id, *message; const gchar *src, *src_end; XSetWindowAttributes attrs; XClientMessageEvent xclient; Window win; if (!glxbackend->startup_notification_id) return; /* Create the message string ending the startup sequence */ escaped_id = escape_for_x_message (glxbackend->startup_notification_id); message = g_strdup_printf ("remove: ID=%s", escaped_id); g_free (escaped_id); /* Creates an X window to be used to identify the message uniquely */ attrs.override_redirect = True; attrs.event_mask = PropertyChangeMask | StructureNotifyMask; win = XCreateWindow (glxbackend->dpy, glxbackend->root, -100, -100, 1, 1, 0, CopyFromParent, CopyFromParent, (Visual*) CopyFromParent, CWOverrideRedirect | CWEventMask, &attrs); /* Send the X message, following sample code in the freedesktop startup * notification specification */ memset (&xclient, 0, sizeof (xclient)); xclient.type = ClientMessage; xclient.message_type = glxbackend->atom[ATOM_NET_STARTUP_INFO_BEGIN]; xclient.display = glxbackend->dpy; xclient.window = win; xclient.format = 8; src = message; src_end = message + strlen (message) + 1; while (src != src_end) { dest = &xclient.data.b[0]; dest_end = dest + 20; while (dest != dest_end && src != src_end) { *dest = *src; ++dest; ++src; } while (dest != dest_end) { *dest = 0; ++dest; } XSendEvent (glxbackend->dpy, glxbackend->root, False, PropertyChangeMask, (XEvent*) &xclient); xclient.message_type = glxbackend->atom[ATOM_NET_STARTUP_INFO]; } g_free (message); /* The dedicated window can be destroyed now */ XDestroyWindow (glxbackend->dpy, win); XSync (glxbackend->dpy, False); } static gboolean pgm_glx_backend_set_cursor (PgmBackend *backend, PgmViewportCursor cursor) { PgmGlxBackend *glxbackend = PGM_GLX_BACKEND (backend); switch (cursor) { case PGM_VIEWPORT_LEFT_ARROW: XDefineCursor (glxbackend->dpy, glxbackend->win, XCreateFontCursor (glxbackend->dpy, XC_top_left_arrow)); break; case PGM_VIEWPORT_INHERIT: XDefineCursor (glxbackend->dpy, glxbackend->win, XCreateFontCursor (glxbackend->dpy, XC_top_left_arrow)); break; case PGM_VIEWPORT_NONE: XDefineCursor (glxbackend->dpy, glxbackend->win, glxbackend->none_cursor); break; default: break; } XSync (glxbackend->dpy, False); return TRUE; } static gboolean pgm_glx_backend_set_icon (PgmBackend *backend, GdkPixbuf *icon) { PgmGlxBackend *glxbackend = PGM_GLX_BACKEND (backend); XWMHints wm_hints = { 0 }; Pixmap icon_pixmap = None; Pixmap icon_mask = None; if (icon) gdk_pixbuf_xlib_render_pixmap_and_mask (icon, &icon_pixmap, &icon_mask, 128); else { icon_pixmap = None; icon_mask = None; } free_icon (backend); wm_hints.flags = IconPixmapHint | IconMaskHint; wm_hints.icon_pixmap = icon_pixmap; wm_hints.icon_mask = icon_mask; XSetWMHints (glxbackend->dpy, glxbackend->win, &wm_hints); XSync (glxbackend->dpy, False); return TRUE; } static void pgm_glx_backend_set_drag_status (PgmBackend *backend, gboolean accept) { PgmGlxBackend *glxbackend = PGM_GLX_BACKEND (backend); /* Avoid useless computations */ if (accept == glxbackend->drag_status) return; glxbackend->drag_status = accept; if (G_LIKELY (glxbackend->drag_data_received)) update_xdnd_status (glxbackend); else GST_DEBUG_OBJECT (glxbackend, "no on-going drag"); } static gboolean pgm_glx_backend_is_accelerated (PgmBackend *backend) { PgmGlxBackend *glxbackend = PGM_GLX_BACKEND (backend); return glxbackend->feature_mask & PGM_GLX_FEAT_DIRECT_RENDERING; } static gboolean pgm_glx_backend_is_embeddable (PgmBackend *backend) { /* Supported through the XEmbed implementation */ return TRUE; } static void pgm_glx_backend_get_embedding_id (PgmBackend *backend, gulong *embedding_id) { PgmGlxBackend *glxbackend = PGM_GLX_BACKEND (backend); *embedding_id = glxbackend->win; } static gboolean pgm_glx_backend_has_alpha_component (PgmBackend *backend) { PgmGlxBackend *glxbackend = PGM_GLX_BACKEND (backend); return glxbackend->feature_mask & PGM_GLX_FEAT_ARGB_VISUAL; } static gboolean pgm_glx_backend_has_system_buffer (PgmBackend *backend) { PgmGlxBackend *glxbackend = PGM_GLX_BACKEND (backend); return glxbackend->feature_mask & PGM_GLX_FEAT_TEXTURE_FROM_PIXMAP; } gpointer pgm_glx_backend_create_system_buffer_object (PgmBackend *backend, gconstpointer system_buffer, PgmImagePixelFormat format) { PgmGlxBackend *glxbackend = PGM_GLX_BACKEND (backend); GLXPixmap *glxpixmap = NULL; /* Cards with no support for non-power-of-two textures are not supported, * the plugin already checked that for us */ int attrib[] = { GLX_TEXTURE_TARGET_EXT, GLX_TEXTURE_2D_EXT, GLX_TEXTURE_FORMAT_EXT, 0, GLX_MIPMAP_TEXTURE_EXT, 0, None }; if (!(glxbackend->feature_mask & PGM_GLX_FEAT_TEXTURE_FROM_PIXMAP)) { GST_WARNING_OBJECT (glxbackend, "the GLX implementation does not support " "the GLX_EXT_texture_from_pixmap extension"); goto error; } if (G_UNLIKELY (!glxbackend->fbconfig || !glxbackend->fbconfig[glxbackend->fbconfig_index])) { GST_WARNING_OBJECT (glxbackend, "cannot create a system buffer without " "valid fbconfig"); goto error; } /* Setup the correct RGB or RGBA format */ if (format == PGM_IMAGE_RGB) attrib[3] = GLX_TEXTURE_FORMAT_RGB_EXT; else if (format == PGM_IMAGE_RGBA) attrib[3] = GLX_TEXTURE_FORMAT_RGBA_EXT; else { GST_WARNING_OBJECT (glxbackend, "color space other than RGB and RGBA are " "not accepted for system buffer"); goto error; } glxpixmap = g_slice_new (GLXPixmap); *glxpixmap = glXCreatePixmap (glxbackend->dpy, glxbackend->fbconfig[glxbackend->fbconfig_index], *((Pixmap*) system_buffer), attrib); XSync (glxbackend->dpy, False); error: return glxpixmap; } void pgm_glx_backend_destroy_system_buffer_object (PgmBackend *backend, gpointer system_buffer_object) { PgmGlxBackend *glxbackend = PGM_GLX_BACKEND (backend); g_return_if_fail (system_buffer_object); if (!(glxbackend->feature_mask & PGM_GLX_FEAT_TEXTURE_FROM_PIXMAP)) { GST_WARNING_OBJECT (glxbackend, "the GLX implementation does not support " "the GLX_EXT_texture_from_pixmap extension"); return; } glXDestroyPixmap (glxbackend->dpy, *((GLXPixmap*) system_buffer_object)); g_slice_free (GLXPixmap, system_buffer_object); system_buffer_object = NULL; } void pgm_glx_backend_bind_system_buffer_object (PgmBackend *backend, gconstpointer system_buffer_object) { PgmGlxBackend *glxbackend = PGM_GLX_BACKEND (backend); g_return_if_fail (system_buffer_object); if (!(glxbackend->feature_mask & PGM_GLX_FEAT_TEXTURE_FROM_PIXMAP)) { GST_WARNING_OBJECT (glxbackend, "the GLX implementation does not support " "the GLX_EXT_texture_from_pixmap extension"); return; } glxbackend->glx->bind_tex_image (glxbackend->dpy, *((GLXPixmap*) system_buffer_object), GLX_FRONT_LEFT_EXT, NULL); } void pgm_glx_backend_release_system_buffer_object (PgmBackend *backend, gconstpointer system_buffer_object) { PgmGlxBackend *glxbackend = PGM_GLX_BACKEND (backend); g_return_if_fail (system_buffer_object); if (!(glxbackend->feature_mask & PGM_GLX_FEAT_TEXTURE_FROM_PIXMAP)) { GST_WARNING_OBJECT (glxbackend, "the GLX implementation does not support " "the GLX_EXT_texture_from_pixmap extension"); return; } glxbackend->glx->release_tex_image (glxbackend->dpy, *((GLXPixmap*) system_buffer_object), GLX_FRONT_LEFT_EXT); } /* GObject stuff */ PGM_DEFINE_DYNAMIC_TYPE (PgmGlxBackend, pgm_glx_backend, PGM_TYPE_BACKEND) void pgm_glx_backend_register (GTypeModule *module) { pgm_glx_backend_register_type (module); } static void pgm_glx_backend_dispose (GObject *object) { PgmGlxBackend *glxbackend = PGM_GLX_BACKEND (object); pgm_glx_backend_destroy_text_lists (PGM_BACKEND (glxbackend)); if (glxbackend->created) { free_icon (PGM_BACKEND (glxbackend)); pgm_glx_backend_destroy_window (PGM_BACKEND (glxbackend)); } if (glxbackend->startup_notification_id) { g_free (glxbackend->startup_notification_id); glxbackend->startup_notification_id = NULL; } GST_CALL_PARENT (G_OBJECT_CLASS, dispose, (object)); } static void pgm_glx_backend_class_init (PgmGlxBackendClass *klass) { GObjectClass *gobject_class; PgmBackendClass *backend_class; GST_DEBUG_CATEGORY_INIT (pgm_gl_glxbackend_debug, "pgm_gl_glxbackend", 0, "OpenGL plugin: PgmGlxBackend"); parent_class = g_type_class_peek_parent (klass); gobject_class = G_OBJECT_CLASS (klass); backend_class = PGM_BACKEND_CLASS (klass); /* GObject virtual table */ gobject_class->dispose = GST_DEBUG_FUNCPTR (pgm_glx_backend_dispose); /* PgmBackend virtual table */ backend_class->create_window = GST_DEBUG_FUNCPTR (pgm_glx_backend_create_window); backend_class->destroy_window = GST_DEBUG_FUNCPTR (pgm_glx_backend_destroy_window); backend_class->set_title = GST_DEBUG_FUNCPTR (pgm_glx_backend_set_title); backend_class->set_decorated = GST_DEBUG_FUNCPTR (pgm_glx_backend_set_decorated); backend_class->swap_buffers = GST_DEBUG_FUNCPTR (pgm_glx_backend_swap_buffers); backend_class->get_proc_address = GST_DEBUG_FUNCPTR (pgm_glx_backend_get_proc_address); backend_class->set_size = GST_DEBUG_FUNCPTR (pgm_glx_backend_set_size); backend_class->set_fullscreen = GST_DEBUG_FUNCPTR (pgm_glx_backend_set_fullscreen); backend_class->set_visibility = GST_DEBUG_FUNCPTR (pgm_glx_backend_set_visibility); backend_class->set_iconified = GST_DEBUG_FUNCPTR (pgm_glx_backend_set_iconified); backend_class->focus = GST_DEBUG_FUNCPTR (pgm_glx_backend_focus); backend_class->get_screen_size_mm = GST_DEBUG_FUNCPTR (pgm_glx_backend_get_screen_size_mm); backend_class->set_screen_resolution = GST_DEBUG_FUNCPTR (pgm_glx_backend_set_screen_resolution); backend_class->get_screen_resolution = GST_DEBUG_FUNCPTR (pgm_glx_backend_get_screen_resolution); backend_class->build_text_lists = GST_DEBUG_FUNCPTR (pgm_glx_backend_build_text_lists); backend_class->destroy_text_lists = GST_DEBUG_FUNCPTR (pgm_glx_backend_destroy_text_lists); backend_class->raster_text = GST_DEBUG_FUNCPTR (pgm_glx_backend_raster_text); backend_class->wait_for_vblank = GST_DEBUG_FUNCPTR (pgm_glx_backend_wait_for_vblank); backend_class->notify_startup_complete = GST_DEBUG_FUNCPTR (pgm_glx_backend_notify_startup_complete); backend_class->set_cursor = GST_DEBUG_FUNCPTR (pgm_glx_backend_set_cursor); backend_class->set_icon = GST_DEBUG_FUNCPTR (pgm_glx_backend_set_icon); backend_class->set_drag_status = GST_DEBUG_FUNCPTR (pgm_glx_backend_set_drag_status); backend_class->is_accelerated = GST_DEBUG_FUNCPTR (pgm_glx_backend_is_accelerated); backend_class->is_embeddable = GST_DEBUG_FUNCPTR (pgm_glx_backend_is_embeddable); backend_class->get_embedding_id = GST_DEBUG_FUNCPTR (pgm_glx_backend_get_embedding_id); backend_class->has_alpha_component = GST_DEBUG_FUNCPTR (pgm_glx_backend_has_alpha_component); backend_class->has_system_buffer = GST_DEBUG_FUNCPTR (pgm_glx_backend_has_system_buffer); backend_class->create_system_buffer_object = GST_DEBUG_FUNCPTR (pgm_glx_backend_create_system_buffer_object); backend_class->destroy_system_buffer_object = GST_DEBUG_FUNCPTR (pgm_glx_backend_destroy_system_buffer_object); backend_class->bind_system_buffer_object = GST_DEBUG_FUNCPTR (pgm_glx_backend_bind_system_buffer_object); backend_class->release_system_buffer_object = GST_DEBUG_FUNCPTR (pgm_glx_backend_release_system_buffer_object); } static void pgm_glx_backend_class_finalize (PgmGlxBackendClass *klass) { return; } static void pgm_glx_backend_init (PgmGlxBackend *glxbackend) { glxbackend->dpy = NULL; glxbackend->glx = NULL; glxbackend->visual = NULL; glxbackend->fbconfig = NULL; glxbackend->fbconfig_index = -1; glxbackend->atom = NULL; glxbackend->startup_notification_id = NULL; glxbackend->embedder = None; glxbackend->drag_source = None; glxbackend->drag_data_has_uri = FALSE; glxbackend->drag_data_received = FALSE; glxbackend->drag_x = -1.0f; glxbackend->drag_y = -1.0f; glxbackend->drag_uri = NULL; glxbackend->created = FALSE; glxbackend->fullscreen = FALSE; glxbackend->mapped = FALSE; glxbackend->state = 0; glxbackend->windowed_width = 800; glxbackend->windowed_height = 600; glxbackend->vendor = 0; glxbackend->version = 0.0f; glxbackend->extensions = 0; glxbackend->feature_mask = 0; glxbackend->vblank_mode = PGM_VBLANK_NONE; } /* Public methods */ PgmBackend * pgm_glx_backend_new (PgmContext *context) { PgmBackend *backend; backend = g_object_new (PGM_TYPE_GLX_BACKEND, NULL); GST_DEBUG_OBJECT (PGM_GLX_BACKEND (backend), "created new glxbackend"); backend->context = context; return backend; } pigment-0.3.17/plugins/opengl/pgmtexture.h0000644000175000017500000001267311205034416015515 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment OpenGL plugin * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ #ifndef __PGM_TEXTURE_H__ #define __PGM_TEXTURE_H__ #include #include "pgmcontext.h" #include "pgmgldefs.h" G_BEGIN_DECLS /* Texture locking */ #define PGM_TEXTURE_LOCK(texture) (g_mutex_lock (texture->mutex)) #define PGM_TEXTURE_UNLOCK(texture) (g_mutex_unlock (texture->mutex)) /* Type casting */ #define PGM_TEXTURE(obj) ((PgmTexture*) (obj)) typedef struct _PgmTexture PgmTexture; /* Function pointer types */ typedef void (*PgmTextureUploadFunc) (PgmTexture*, void*); typedef void (*PgmTextureCreateFunc) (PgmTexture*); typedef void (*PgmTextureBindFunc) (PgmTexture*); typedef void (*PgmTextureUnbindFunc) (PgmTexture*); /* Texture flags */ typedef enum { PGM_TEXTURE_IDENTITY_MATRIX = (1 << 0) } PgmTextureFlags; /* Data storage types */ typedef enum { PGM_TEXTURE_CLEAN, PGM_TEXTURE_BUFFER, PGM_TEXTURE_GST_BUFFER, PGM_TEXTURE_PIXBUF, PGM_TEXTURE_SYSTEM_BUFFER } PgmTextureStorageType; struct _PgmTexture { PgmTextureStorageType storage; union { gpointer buffer; GstBuffer *gstbuffer; GdkPixbuf *pixbuf; gpointer systembuffer; } data; PgmImagePixelFormat csp; /* Color space */ gint width; /* Width of the buffer */ gint height; /* Height of the buffer */ gint width_pot; /* Power-of-two width of the buffer */ gint height_pot; /* Power-of-two height of the buffer */ gfloat norm_width; /* width / width_pot */ gfloat norm_height; /* height / height_pot */ gfloat inv_norm_width; /* (width / width_pot)^-1 */ gfloat inv_norm_height; /* (height / height_pot)^-1 */ gint stride; /* Stride of the buffer (not used) */ gint size; /* Size of the buffer in bytes */ /* State flags */ guint8 flags; /* Parameters */ PgmMat4x4 *matrix; PgmGlEnum filter; PgmGlEnum wrap_s; PgmGlEnum wrap_t; /* Number of identifiant */ gint count; /* Identifiant(s) */ guint *id; /* I420 and YV12 planar program values */ guint cbcr_height; guint y_stride, cbcr_stride; guint cb_offset, cr_offset; /* Whether the buffer is shared */ guint8 shared; }; /* create a new texture */ PgmTexture *pgm_texture_new (PgmContext *context); /* Free a texture */ void pgm_texture_free (PgmTexture *texture); /* Set a raw buffer */ void pgm_texture_set_buffer (PgmTexture *texture, guchar *buffer, PgmImagePixelFormat csp, guint width, guint height, guint size, guint stride, gboolean share); /* Set a system buffer */ void pgm_texture_set_system_buffer (PgmTexture *texture, gconstpointer system_buffer, PgmImagePixelFormat csp, guint width, guint height); /* Set a GdkPixbuf */ void pgm_texture_set_pixbuf (PgmTexture *texture, GdkPixbuf *pixbuf); /* Set a GstBuffer */ void pgm_texture_set_gst_buffer (PgmTexture *texture, GstBuffer *gstbuffer, PgmImagePixelFormat csp, guint width, guint height, guint stride); /* Update a GstBuffer */ void pgm_texture_update_gst_buffer (PgmTexture *texture, GstBuffer *gstbuffer); /* Bind the texture */ void pgm_texture_bind (PgmTexture *texture); /* Unbind the texture */ void pgm_texture_unbind (PgmTexture *texture); /* Generate the texture */ void pgm_texture_generate (PgmTexture *texture); /* Clean up the texture */ void pgm_texture_clean (PgmTexture *texture); /* Upload the texture */ void pgm_texture_upload (PgmTexture *texture); /* Update the texture */ void pgm_texture_update (PgmTexture *texture); /* Set the texture matrix */ void pgm_texture_set_matrix (PgmTexture *texture, PgmMat4x4 *matrix); G_END_DECLS #endif /* __PGM_TEXTURE_H__ */ pigment-0.3.17/plugins/opengl/pgmbackend.h0000644000175000017500000002733511205034415015404 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment OpenGL plugin * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ #ifndef __PGM_BACKEND_H__ #define __PGM_BACKEND_H__ /* pgmbackend.h and pgmcontext.h include eachother */ typedef struct _PgmBackend PgmBackend; typedef struct _PgmBackendClass PgmBackendClass; #include #include "pgmcontext.h" G_BEGIN_DECLS #define PGM_TYPE_BACKEND (pgm_backend_get_type ()) #define PGM_BACKEND(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), PGM_TYPE_BACKEND, PgmBackend)) #define PGM_BACKEND_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), PGM_TYPE_BACKEND, PgmBackendClass)) #define PGM_IS_BACKEND(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), PGM_TYPE_BACKEND)) #define PGM_IS_BACKEND_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), PGM_TYPE_BACKEND)) #define PGM_BACKEND_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS((obj), PGM_TYPE_BACKEND, PgmBackendClass)) struct _PgmBackend { GstObject parent; /* Reference to the PgmContext */ PgmContext *context; }; struct _PgmBackendClass { GstObjectClass parent_class; /* virtual methods for subclasses */ /* Create the window */ gboolean (*create_window) (PgmBackend *backend); /* Destroy the window */ gboolean (*destroy_window) (PgmBackend *backend); /* Define the title of the window */ void (*set_title) (PgmBackend *backend, const gchar *title); /* Show or hide the window decorations (titlebar, resize buttons, ...) */ gboolean (*set_decorated) (PgmBackend *backend, gboolean decoration); /* Swap the buffers */ void (*swap_buffers) (PgmBackend *backend); /* Get the address of the OpenGL extension function named proc_name */ gpointer (*get_proc_address) (PgmBackend *backend, const gchar *proc_name); /* Set the window size */ gboolean (*set_size) (PgmBackend *backend, gint width, gint height); /* Set whether the window should be displayed fullscreen */ gboolean (*set_fullscreen) (PgmBackend *backend, gboolean fullscreen); /* Show/Hide (map/unmap) the window */ gboolean (*set_visibility) (PgmBackend *backend, gboolean visible); /* Iconify/Deiconify (minimize/restore) the window */ gboolean (*set_iconified) (PgmBackend *backend, gboolean iconified); /* Show, raise on top and give the keyboard focus to window */ void (*focus) (PgmBackend *backend); /* Retrieve the size of the physical screen in millimeters */ void (*get_screen_size_mm) (PgmBackend *backend, gint *width, gint *height); /* Change the resolution of the desktop */ gboolean (*set_screen_resolution) (PgmBackend *backend, gint width, gint height); /* Retrieve the desktop resolution */ void (*get_screen_resolution) (PgmBackend *backend, gint *width, gint *height); /* Build rasterized text display lists (used for debugging purposes) */ gboolean (*build_text_lists) (PgmBackend *backend); /* Destroy rasterized text display lists (used for debugging purposes) */ gboolean (*destroy_text_lists) (PgmBackend *backend); /* Rasterize a text on the viewport at position (x,y) with the color * (r,g,b,a) */ void (*raster_text) (PgmBackend *backend, const gchar *text, gfloat x, gfloat y, gfloat r, gfloat g, gfloat b); /* Wait for the next VBlank */ void (*wait_for_vblank) (PgmBackend *backend); void (*notify_startup_complete) (PgmBackend *backend); /* Define the specified system cursor */ gboolean (*set_cursor) (PgmBackend *backend, PgmViewportCursor cursor); /* Define the icon */ gboolean (*set_icon) (PgmBackend *backend, GdkPixbuf *icon); /* Accept or refuse an on-going drag */ void (*set_drag_status) (PgmBackend *backend, gboolean accept); /* Retrieve if the OpenGL context is hardware accelerated */ gboolean (*is_accelerated) (PgmBackend *backend); /* Retrieve if the backend can be embedded in another application */ gboolean (*is_embeddable) (PgmBackend *backend); /* Retrieve the ID of the window to use by other application */ void (*get_embedding_id) (PgmBackend *backend, gulong *embedding_id); /* Retrieve if the backend handles alpha clear color */ gboolean (*has_alpha_component) (PgmBackend *backend); /* Define the system messages to filter */ void (*set_message_filter) (PgmBackend *backend, GList *filter); /* Retrieve if the backend supports system buffers */ gboolean (*has_system_buffer) (PgmBackend *backend); /* Create a system buffer object understandable by the backend from a given * system buffer */ gpointer (*create_system_buffer_object) (PgmBackend *backend, gconstpointer system_buffer, PgmImagePixelFormat format); /* Destroy the system buffer object created with create_system_buffer */ void (*destroy_system_buffer_object) (PgmBackend *backend, gpointer system_buffer_object); /* Bind the system buffer object created with create_system_buffer */ void (*bind_system_buffer_object) (PgmBackend *backend, gconstpointer system_buffer_object); /* Release the system buffer object bound with bind_system_buffer */ void (*release_system_buffer_object) (PgmBackend *backend, gconstpointer system_buffer_object); }; GType pgm_backend_get_type (void) G_GNUC_CONST; void pgm_backend_register (GTypeModule *module); gboolean pgm_backend_create_window (PgmBackend *backend); gboolean pgm_backend_destroy_window (PgmBackend *backend); void pgm_backend_set_title (PgmBackend *backend, const gchar *title); gboolean pgm_backend_set_decorated (PgmBackend *backend, gboolean decorated); void pgm_backend_swap_buffers (PgmBackend *backend); gpointer pgm_backend_get_proc_address (PgmBackend *backend, const gchar *proc_name); gboolean pgm_backend_set_size (PgmBackend *backend, gint width, gint height); gboolean pgm_backend_set_fullscreen (PgmBackend *backend, gboolean fullscreen); gboolean pgm_backend_set_visibility (PgmBackend *backend, gboolean visible); gboolean pgm_backend_set_iconified (PgmBackend *backend, gboolean iconified); void pgm_backend_focus (PgmBackend *backend); void pgm_backend_get_screen_size_mm (PgmBackend *backend, gint *width, gint *height); gboolean pgm_backend_set_screen_resolution (PgmBackend *backend, gint width, gint height); void pgm_backend_get_screen_resolution (PgmBackend *backend, gint *width, gint *height); gboolean pgm_backend_build_text_lists (PgmBackend *backend); gboolean pgm_backend_destroy_text_lists (PgmBackend *backend); void pgm_backend_raster_text (PgmBackend *backend, const gchar *text, gfloat x, gfloat y, gfloat r, gfloat g, gfloat b); void pgm_backend_wait_for_vblank (PgmBackend *backend); void pgm_backend_notify_startup_complete (PgmBackend *backend); gboolean pgm_backend_set_cursor (PgmBackend *backend, PgmViewportCursor cursor); gboolean pgm_backend_set_icon (PgmBackend *backend, GdkPixbuf *icon); void pgm_backend_set_drag_status (PgmBackend *backend, gboolean accept); gboolean pgm_backend_is_accelerated (PgmBackend *backend); gboolean pgm_backend_is_embeddable (PgmBackend *backend); void pgm_backend_get_embedding_id (PgmBackend *backend, gulong *embedding_id); gboolean pgm_backend_has_alpha_component (PgmBackend *backend); void pgm_backend_set_message_filter (PgmBackend *backend, GList *filter); gboolean pgm_backend_has_system_buffer (PgmBackend *backend); gpointer pgm_backend_create_system_buffer_object (PgmBackend *backend, gconstpointer system_buffer, PgmImagePixelFormat format); void pgm_backend_destroy_system_buffer_object (PgmBackend *backend, gpointer system_buffer_object); void pgm_backend_bind_system_buffer_object (PgmBackend *backend, gconstpointer system_buffer_object); void pgm_backend_release_system_buffer_object (PgmBackend *backend, gconstpointer system_buffer_object); G_END_DECLS #endif /* __PGM_BACKEND_H__ */ pigment-0.3.17/plugins/opengles/0000777000175000017500000000000011205035135013542 500000000000000pigment-0.3.17/plugins/opengles/pgmglesbackend.h0000644000175000017500000001110111205034416016570 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment OpenGL ES-CM 1.1 plugin * * Copyright © 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ #ifndef __PGM_GLES_BACKEND_H__ #define __PGM_GLES_BACKEND_H__ /* pgmglesbackend.h and pgmglescontext.h include eachother */ typedef struct _PgmGlesBackend PgmGlesBackend; typedef struct _PgmGlesBackendClass PgmGlesBackendClass; #include #include "pgmglescontext.h" G_BEGIN_DECLS #define PGM_TYPE_GLES_BACKEND (pgm_gles_backend_get_type ()) #define PGM_GLES_BACKEND(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), PGM_TYPE_GLES_BACKEND, PgmGlesBackend)) #define PGM_GLES_BACKEND_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), PGM_TYPE_GLES_BACKEND, PgmGlesBackendClass)) #define PGM_IS_GLES_BACKEND(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), PGM_TYPE_GLES_BACKEND)) #define PGM_IS_GLES_BACKEND_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), PGM_TYPE_GLES_BACKEND)) #define PGM_GLES_BACKEND_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS((obj), PGM_TYPE_GLES_BACKEND, PgmGlesBackendClass)) struct _PgmGlesBackend { GstObject parent; PgmGlesContext *context; }; struct _PgmGlesBackendClass { GstObjectClass parent_class; /* virtual methods for subclasses */ /* Create the window */ gboolean (*create_window) (PgmGlesBackend *glesbackend); /* Destroy the window */ gboolean (*destroy_window) (PgmGlesBackend *glesbackend); /* Swap the buffers */ void (*swap_buffers) (PgmGlesBackend *glesbackend); /* Get the address of the OpenGL ES extension function named proc_name */ gpointer (*get_proc_address) (PgmGlesBackend *glesbackend, const gchar *proc_name); /* Show/Hide (map/unmap) the window */ gboolean (*set_visibility) (PgmGlesBackend *glesbackend, gboolean visible); /* Retrieve the size of the physical screen in millimeters */ void (*get_screen_size_mm) (PgmGlesBackend *glesbackend, gint *width, gint *height); /* Retrieve the desktop resolution */ void (*get_screen_resolution) (PgmGlesBackend *glesbackend, gint *width, gint *height); /* Set the screen resolution */ void (*set_screen_resolution) (PgmGlesBackend *glesbackend, gint width, gint height); }; GType pgm_gles_backend_get_type (void) G_GNUC_CONST; void pgm_gles_backend_register (GTypeModule *module); gboolean pgm_gles_backend_create_window (PgmGlesBackend *glesbackend); gboolean pgm_gles_backend_destroy_window (PgmGlesBackend *glesbackend); void pgm_gles_backend_swap_buffers (PgmGlesBackend *glesbackend); gpointer pgm_gles_backend_get_proc_address (PgmGlesBackend *glesbackend, const gchar *proc_name); gboolean pgm_gles_backend_set_visibility (PgmGlesBackend *glesbackend, gboolean visible); void pgm_gles_backend_get_screen_size_mm (PgmGlesBackend *glesbackend, gint *width, gint *height); void pgm_gles_backend_get_screen_resolution (PgmGlesBackend *glesbackend, gint *width, gint *height); void pgm_gles_backend_set_screen_resolution (PgmGlesBackend *glesbackend, gint width, gint height); G_END_DECLS #endif /* __PGM_GLES_BACKEND_H__ */ pigment-0.3.17/plugins/opengles/pgmglesdefs.h0000644000175000017500000003234511205034416016137 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment OpenGL ES-CM 1.1 plugin * * Copyright © 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ #ifndef __PGM_GLES_DEFS_H__ #define __PGM_GLES_DEFS_H__ G_BEGIN_DECLS /* OpenGL ES feature flags */ #define PGM_GLES_FEAT_TEXTURE_FORMAT_BGRA (1L << 0) /* OpenGL ES constant definitions */ #define PGM_GLES_FALSE 0x0000 #define PGM_GLES_TRUE 0x0001 #define PGM_GLES_NO_ERROR 0x0000 #define PGM_GLES_INVALID_OPERATION 0x0502 #define PGM_GLES_VENDOR 0x1F00 #define PGM_GLES_RENDERER 0x1F01 #define PGM_GLES_VERSION 0x1F02 #define PGM_GLES_EXTENSIONS 0x1F03 #define PGM_GLES_UNSIGNED_BYTE 0x1401 #define PGM_GLES_UNSIGNED_SHORT 0x1403 #define PGM_GLES_MODELVIEW 0x1700 #define PGM_GLES_PROJECTION 0x1701 #define PGM_GLES_SHORT 0x1402 #define PGM_GLES_INT 0x1404 #define PGM_GLES_FLOAT 0x1406 #define PGM_GLES_DOUBLE 0x140A #define PGM_GLES_COLOR_BUFFER_BIT 0x00004000 #define PGM_GLES_POINTS 0x0000 #define PGM_GLES_LINES 0x0001 #define PGM_GLES_LINE_LOOP 0x0002 #define PGM_GLES_LINE_STRIP 0x0003 #define PGM_GLES_TRIANGLES 0x0004 #define PGM_GLES_TRIANGLE_STRIP 0x0005 #define PGM_GLES_TRIANGLE_FAN 0x0006 #define PGM_GLES_FRONT 0x0404 #define PGM_GLES_BACK 0x0405 #define PGM_GLES_VERTEX_ARRAY 0x8074 #define PGM_GLES_COLOR_ARRAY 0x8076 #define PGM_GLES_TEXTURE_COORD_ARRAY 0x8078 #define PGM_GLES_CULL_FACE 0x0B44 #define PGM_GLES_POINT_SMOOTH 0x0B10 #define PGM_GLES_LINE_SMOOTH 0x0B20 #define PGM_GLES_MAX_TEXTURE_SIZE 0x0D33 #define PGM_GLES_MAX_VIEWPORT_DIMS 0x0D3A #define PGM_GLES_TEXTURE_2D 0x0DE1 #define PGM_GLES_PROXY_TEXTURE_2D 0x8064 #define PGM_GLES_TEXTURE_WRAP_S 0x2802 #define PGM_GLES_TEXTURE_WRAP_T 0x2803 #define PGM_GLES_TEXTURE_MAG_FILTER 0x2800 #define PGM_GLES_TEXTURE_MIN_FILTER 0x2801 #define PGM_GLES_NEAREST 0x2600 #define PGM_GLES_LINEAR 0x2601 #define PGM_GLES_CLAMP 0x2900 #define PGM_GLES_REPEAT 0x2901 #define PGM_GLES_CLAMP_TO_EDGE 0x812F #define PGM_GLES_NEAREST_MIPMAP_NEAREST 0x2700 #define PGM_GLES_LINEAR_MIPMAP_NEAREST 0x2701 #define PGM_GLES_NEAREST_MIPMAP_LINEAR 0x2702 #define PGM_GLES_LINEAR_MIPMAP_LINEAR 0x2703 #define PGM_GLES_TEXTURE 0x1702 #define PGM_GLES_SRC_COLOR 0x0300 #define PGM_GLES_ALPHA 0x1906 #define PGM_GLES_RGB 0x1907 #define PGM_GLES_RGBA 0x1908 #define PGM_GLES_LUMINANCE 0x1909 #define PGM_GLES_LUMINANCE_ALPHA 0x190A #define PGM_GLES_BGRA 0x80E1 #define PGM_GLES_MODELVIEW_MATRIX 0x0BA6 #define PGM_GLES_PROJECTION_MATRIX 0x0BA7 #define PGM_GLES_TEXTURE_MATRIX 0x0BA8 #define PGM_GLES_ZERO 0x0000 #define PGM_GLES_ONE 0x0001 #define PGM_GLES_SRC_COLOR 0x0300 #define PGM_GLES_ONE_MINUS_SRC_COLOR 0x0301 #define PGM_GLES_SRC_ALPHA 0x0302 #define PGM_GLES_ONE_MINUS_SRC_ALPHA 0x0303 #define PGM_GLES_DST_ALPHA 0x0304 #define PGM_GLES_ONE_MINUS_DST_ALPHA 0x0305 #define PGM_GLES_DST_COLOR 0x0306 #define PGM_GLES_ONE_MINUS_DST_COLOR 0x0307 #define PGM_GLES_SRC_ALPHA_SATURATE 0x0308 #define PGM_GLES_DEPTH_TEST 0x0B71 #define PGM_GLES_BLEND 0x0BE2 #define PGM_GLES_PACK_ALIGNMENT 0x0D05 #define PGM_GLES_UNPACK_ALIGNMENT 0x0CF5 #define PGM_GLES_PERSPECTIVE_CORRECTION_HINT 0x0C50 #define PGM_GLES_FASTEST 0x1101 #define PGM_GLES_NICEST 0x1102 #define PGM_GLES_TEXTURE0 0x84C0 #define PGM_GLES_TEXTURE1 0x84C1 #define PGM_GLES_TEXTURE2 0x84C2 #define PGM_GLES_ACTIVE_TEXTURE 0x84E0 #define PGM_GLES_MAX_TEXTURE_UNITS 0x84E2 /* OpenGL ES type definitions */ typedef unsigned int PgmGlesEnum; typedef unsigned char PgmGlesBoolean; typedef void PgmGlesVoid; typedef int PgmGlesInt; typedef unsigned int PgmGlesUint; typedef int PgmGlesSizei; typedef float PgmGlesFloat; typedef unsigned short PgmGlesUshort; typedef short PgmGlesShort; typedef unsigned int PgmGlesBitfield; typedef float PgmGlesClampf; typedef unsigned char PgmGlesUbyte; /* OpenGL ES function definitions */ typedef PgmGlesVoid (*pgm_gles_enable) (PgmGlesEnum cap); typedef PgmGlesVoid (*pgm_gles_disable) (PgmGlesEnum cap); typedef PgmGlesEnum (*pgm_gles_get_error) (PgmGlesVoid); typedef PgmGlesUbyte* (*pgm_gles_get_string) (PgmGlesEnum name); typedef PgmGlesVoid (*pgm_gles_enable_client_state) (PgmGlesEnum cap); typedef PgmGlesVoid (*pgm_gles_disable_client_state) (PgmGlesEnum cap); typedef PgmGlesVoid (*pgm_gles_vertex_pointer) (PgmGlesInt size, PgmGlesEnum type, PgmGlesSizei stride, const PgmGlesVoid *ptr); typedef PgmGlesVoid (*pgm_gles_color_pointer) (PgmGlesInt size, PgmGlesEnum type, PgmGlesSizei stride, const PgmGlesVoid *ptr); typedef PgmGlesVoid (*pgm_gles_tex_coord_pointer) (PgmGlesInt size, PgmGlesEnum type, PgmGlesSizei stride, const PgmGlesVoid *ptr); typedef PgmGlesVoid (*pgm_gles_draw_arrays) (PgmGlesEnum mode, PgmGlesInt first, PgmGlesSizei count); typedef PgmGlesVoid (*pgm_gles_draw_elements) (PgmGlesEnum mode, PgmGlesSizei count, PgmGlesEnum type, const PgmGlesVoid *indices); typedef PgmGlesVoid (*pgm_gles_color_4f) (PgmGlesUshort red, PgmGlesUshort green, PgmGlesUshort blue, PgmGlesUshort alpha); typedef PgmGlesVoid (*pgm_gles_color_4fv) (const PgmGlesFloat *v); typedef PgmGlesVoid (*pgm_gles_blend_func) (PgmGlesEnum sfactor, PgmGlesEnum dfactor); typedef PgmGlesVoid (*pgm_gles_clear) (PgmGlesBitfield mask); typedef PgmGlesVoid (*pgm_gles_clear_color) (PgmGlesClampf red, PgmGlesClampf green, PgmGlesClampf blue, PgmGlesClampf alpha); typedef PgmGlesVoid (*pgm_gles_matrix_mode) (PgmGlesEnum mode); typedef PgmGlesVoid (*pgm_gles_push_matrix) (PgmGlesVoid); typedef PgmGlesVoid (*pgm_gles_pop_matrix) (PgmGlesVoid); typedef PgmGlesVoid (*pgm_gles_load_identity) (PgmGlesVoid); typedef PgmGlesVoid (*pgm_gles_load_matrix_f) (const PgmGlesFloat *m); typedef PgmGlesVoid (*pgm_gles_viewport) (PgmGlesInt x, PgmGlesInt y, PgmGlesSizei width, PgmGlesSizei height); typedef PgmGlesVoid (*pgm_gles_flush) (PgmGlesVoid); typedef PgmGlesVoid (*pgm_gles_finish) (PgmGlesVoid); typedef PgmGlesVoid (*pgm_gles_frustum_f) (PgmGlesFloat left, PgmGlesFloat right, PgmGlesFloat bottom, PgmGlesFloat top, PgmGlesFloat near_val, PgmGlesFloat far_val); typedef PgmGlesVoid (*pgm_gles_ortho_f) (PgmGlesFloat left, PgmGlesFloat right, PgmGlesFloat bottom, PgmGlesFloat top, PgmGlesFloat near_val, PgmGlesFloat far_val); typedef PgmGlesVoid (*pgm_gles_scale_f) (PgmGlesFloat x, PgmGlesFloat y, PgmGlesFloat z); typedef PgmGlesVoid (*pgm_gles_translate_f) (PgmGlesFloat x, PgmGlesFloat y, PgmGlesFloat z); typedef PgmGlesVoid (*pgm_gles_rotate_f) (PgmGlesFloat angle, PgmGlesFloat x, PgmGlesFloat y, PgmGlesFloat z); typedef PgmGlesVoid (*pgm_gles_hint) (PgmGlesEnum target, PgmGlesEnum mode); typedef PgmGlesVoid (*pgm_gles_shade_model) (PgmGlesEnum mode); typedef PgmGlesVoid (*pgm_gles_read_pixels) (PgmGlesInt x, PgmGlesInt y, PgmGlesSizei width, PgmGlesSizei height, PgmGlesEnum format, PgmGlesEnum type, PgmGlesVoid *pixels); typedef PgmGlesVoid (*pgm_gles_gen_textures) (PgmGlesSizei n, PgmGlesUint *textures); typedef PgmGlesVoid (*pgm_gles_delete_textures) (PgmGlesSizei n, const PgmGlesUint *textures); typedef PgmGlesVoid (*pgm_gles_active_texture) (PgmGlesEnum texture); typedef PgmGlesVoid (*pgm_gles_bind_texture) (PgmGlesEnum target, PgmGlesUint texture); typedef PgmGlesVoid (*pgm_gles_tex_image_2d) (PgmGlesEnum target, PgmGlesInt level, PgmGlesInt internal_format, PgmGlesSizei width, PgmGlesSizei height, PgmGlesInt border, PgmGlesEnum format, PgmGlesEnum type, const PgmGlesVoid *pixels); typedef PgmGlesVoid (*pgm_gles_tex_sub_image_2d) (PgmGlesEnum target, PgmGlesInt level, PgmGlesInt xoffset, PgmGlesInt yoffset, PgmGlesSizei width, PgmGlesSizei height, PgmGlesEnum format, PgmGlesEnum type, const PgmGlesVoid *pixels); typedef PgmGlesVoid (*pgm_gles_tex_parameter_i) (PgmGlesEnum target, PgmGlesEnum pname, PgmGlesInt param); typedef PgmGlesVoid (*pgm_gles_get_integer_v) (PgmGlesEnum pname, PgmGlesInt *params); typedef PgmGlesVoid (*pgm_gles_get_float_v) (PgmGlesEnum pname, PgmGlesFloat *params); G_BEGIN_DECLS #endif /* __PGM_GLES_DEFS_H__ */ pigment-0.3.17/plugins/opengles/pgmglesdrawable.h0000644000175000017500000001111511205034416016767 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment OpenGL ES-CM 1.1 plugin * * Copyright © 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ #ifndef __PGM_GLES_DRAWABLE_H__ #define __PGM_GLES_DRAWABLE_H__ /* pgmglesdrawable.h and pgmglviewport.h include eachother */ typedef struct _PgmGlesDrawable PgmGlesDrawable; typedef struct _PgmGlesDrawableClass PgmGlesDrawableClass; #include #include "pgmglesdefs.h" #include "pgmglesviewport.h" G_BEGIN_DECLS #define PGM_TYPE_GLES_DRAWABLE (pgm_gles_drawable_get_type()) #define PGM_GLES_DRAWABLE(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), PGM_TYPE_GLES_DRAWABLE, PgmGlesDrawable)) #define PGM_GLES_DRAWABLE_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), PGM_TYPE_GLES_DRAWABLE, PgmGlesDrawableClass)) #define PGM_IS_GLES_DRAWABLE(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), PGM_TYPE_GLES_DRAWABLE)) #define PGM_IS_GLES_DRAWABLE_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), PGM_TYPE_GLES_DRAWABLE)) #define PGM_GLES_DRAWABLE_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS((obj), PGM_TYPE_GLES_DRAWABLE, PgmGlesDrawableClass)) /* (1/255) and (1/255)^2 to avoid successive divisions during conversions */ #define INV_255 0.003921568627f #define SQR_INV_255 0.0000153787f /* Flags */ typedef enum { PGM_GLES_DRAWABLE_IDENTITY_MATRIX = (1 << 0) } PgmGlesDrawableFlags; struct _PgmGlesDrawable { GstObject parent; /* Generic drawable to reflect */ PgmDrawable *drawable; /* GlViewport container */ PgmGlesViewport *glesviewport; /* Transformation */ PgmMat4x4 *transformation_matrix; /* Id of the handler connected to the "PgmDrawable::changed" signal */ guint change_handler; /* Position and size in viewport coordinates */ gfloat width, height; gfloat x, y, z; /* Background vertex arrays */ PgmGlesFloat bg_color[16]; PgmGlesFloat bg_vertex[12]; /* Flags */ PgmGlesDrawableFlags flags; }; struct _PgmGlesDrawableClass { GstObjectClass parent_class; /* virtual methods for subclasses */ void (*sync) (PgmGlesDrawable *glesdrawable); void (*draw) (PgmGlesDrawable *glesdrawable); void (*regenerate) (PgmGlesDrawable *glesdrawable); void (*update_projection) (PgmGlesDrawable *glesdrawable); void (*set_visibility) (PgmGlesDrawable *glesdrawable); void (*set_size) (PgmGlesDrawable *glesdrawable); void (*set_position) (PgmGlesDrawable *glesdrawable); void (*set_transformation_matrix) (PgmGlesDrawable *glesdrawable); void (*set_fg_color) (PgmGlesDrawable *glesdrawable); void (*set_bg_color) (PgmGlesDrawable *glesdrawable); void (*set_opacity) (PgmGlesDrawable *glesdrawable); }; GType pgm_gles_drawable_get_type (void) G_GNUC_CONST; void pgm_gles_drawable_register (GTypeModule *module); void pgm_gles_drawable_sync (PgmGlesDrawable *glesdrawable); void pgm_gles_drawable_draw (PgmGlesDrawable *glesdrawable); void pgm_gles_drawable_regenerate (PgmGlesDrawable *glesdrawable); void pgm_gles_drawable_update_projection (PgmGlesDrawable *glesdrawable); void pgm_gles_drawable_set_visibility (PgmGlesDrawable *glesdrawable); void pgm_gles_drawable_set_size (PgmGlesDrawable *glesdrawable); void pgm_gles_drawable_set_position (PgmGlesDrawable *glesdrawable); void pgm_gles_drawable_set_transformation_matrix (PgmGlesDrawable *glesdrawable); void pgm_gles_drawable_set_fg_color (PgmGlesDrawable *glesdrawable); void pgm_gles_drawable_set_bg_color (PgmGlesDrawable *glesdrawable); void pgm_gles_drawable_set_opacity (PgmGlesDrawable *glesdrawable); G_END_DECLS #endif /* __PGM_GLES_DRAWABLE_H__ */ pigment-0.3.17/plugins/opengles/pgmglesbackend.c0000644000175000017500000001207311205034416016574 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment OpenGL ES-CM 1.1 plugin * * Copyright © 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ /* * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include "pgmglesbackend.h" GST_DEBUG_CATEGORY_STATIC (pgm_gles_backend_debug); #define GST_CAT_DEFAULT pgm_gles_backend_debug static GstObjectClass *parent_class = NULL; /* GObject stuff */ PGM_DEFINE_DYNAMIC_TYPE_EXTENDED (PgmGlesBackend, pgm_gles_backend, GST_TYPE_OBJECT, G_TYPE_FLAG_ABSTRACT, {}) void pgm_gles_backend_register (GTypeModule *module) { pgm_gles_backend_register_type (module); } static void pgm_gles_backend_dispose (GObject *object) { GST_CALL_PARENT (G_OBJECT_CLASS, dispose, (object)); } static void pgm_gles_backend_class_init (PgmGlesBackendClass *klass) { GObjectClass *gobject_class = (GObjectClass *) klass; GST_DEBUG_CATEGORY_INIT (pgm_gles_backend_debug, "pgm_gles_backend", 0, "OpenGL ES plugin: PgmGlesBackend"); parent_class = g_type_class_peek_parent (klass); gobject_class->dispose = GST_DEBUG_FUNCPTR (pgm_gles_backend_dispose); } static void pgm_gles_backend_class_finalize (PgmGlesBackendClass *klass) { return; } static void pgm_gles_backend_init (PgmGlesBackend *glesbackend) { GST_DEBUG_OBJECT (glesbackend, "init"); glesbackend->context = NULL; } /* Public methods */ gboolean pgm_gles_backend_create_window (PgmGlesBackend *glesbackend) { PgmGlesBackendClass *klass; g_return_val_if_fail (PGM_IS_GLES_BACKEND (glesbackend), FALSE); klass = PGM_GLES_BACKEND_GET_CLASS (glesbackend); if (klass->create_window) return klass->create_window (glesbackend); return FALSE; } gboolean pgm_gles_backend_destroy_window (PgmGlesBackend *glesbackend) { PgmGlesBackendClass *klass; g_return_val_if_fail (PGM_IS_GLES_BACKEND (glesbackend), FALSE); klass = PGM_GLES_BACKEND_GET_CLASS (glesbackend); if (klass->destroy_window) return klass->destroy_window (glesbackend); return FALSE; } void pgm_gles_backend_swap_buffers (PgmGlesBackend *glesbackend) { PgmGlesBackendClass *klass; g_return_if_fail (PGM_IS_GLES_BACKEND (glesbackend)); klass = PGM_GLES_BACKEND_GET_CLASS (glesbackend); if (klass->swap_buffers) klass->swap_buffers (glesbackend); } gpointer pgm_gles_backend_get_proc_address (PgmGlesBackend *glesbackend, const gchar *proc_name) { PgmGlesBackendClass *klass; g_return_val_if_fail (PGM_IS_GLES_BACKEND (glesbackend), NULL); klass = PGM_GLES_BACKEND_GET_CLASS (glesbackend); if (klass->get_proc_address) return klass->get_proc_address (glesbackend, proc_name); return NULL; } gboolean pgm_gles_backend_set_visibility (PgmGlesBackend *glesbackend, gboolean visibility) { PgmGlesBackendClass *klass; g_return_val_if_fail (PGM_IS_GLES_BACKEND (glesbackend), FALSE); klass = PGM_GLES_BACKEND_GET_CLASS (glesbackend); if (klass->set_visibility) klass->set_visibility (glesbackend, visibility); return FALSE; } void pgm_gles_backend_get_screen_size_mm (PgmGlesBackend *glesbackend, gint *width, gint *height) { PgmGlesBackendClass *klass; g_return_if_fail (PGM_IS_GLES_BACKEND (glesbackend)); klass = PGM_GLES_BACKEND_GET_CLASS (glesbackend); if (klass->get_screen_size_mm) klass->get_screen_size_mm (glesbackend, width, height); } void pgm_gles_backend_get_screen_resolution (PgmGlesBackend *glesbackend, gint *width, gint *height) { PgmGlesBackendClass *klass; g_return_if_fail (PGM_IS_GLES_BACKEND (glesbackend)); klass = PGM_GLES_BACKEND_GET_CLASS (glesbackend); if (klass->get_screen_resolution) klass->get_screen_resolution (glesbackend, width, height); } void pgm_gles_backend_set_screen_resolution (PgmGlesBackend *glesbackend, gint width, gint height) { PgmGlesBackendClass *klass; g_return_if_fail (PGM_IS_GLES_BACKEND (glesbackend)); klass = PGM_GLES_BACKEND_GET_CLASS (glesbackend); if (klass->set_screen_resolution) klass->set_screen_resolution (glesbackend, width, height); } pigment-0.3.17/plugins/opengles/pgmglestexture.h0000644000175000017500000001264711205034416016721 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment OpenGL ES-CM 1.1 plugin * * Copyright © 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ #ifndef __PGM_GLES_TEXTURE_H__ #define __PGM_GLES_TEXTURE_H__ #include #include "pgmglescontext.h" #include "pgmglesdefs.h" G_BEGIN_DECLS /* Texture locking */ #define PGM_GLES_TEXTURE_LOCK(texture) (g_mutex_lock (texture->mutex)) #define PGM_GLES_TEXTURE_UNLOCK(texture) (g_mutex_unlock (texture->mutex)) /* Type casting */ #define PGM_GLES_TEXTURE_CAST(obj) ((PgmGlesTexture*) (obj)) typedef struct _PgmGlesTexture PgmGlesTexture; /* Function pointer types */ typedef void (*PgmGlesTextureUploadFunc) (PgmGlesTexture*, void*); typedef void (*PgmGlesTextureCreateFunc) (PgmGlesTexture*); typedef void (*PgmGlesTextureBindFunc) (PgmGlesTexture*); typedef void (*PgmGlesTextureUnbindFunc) (PgmGlesTexture*); /* Texture flags */ typedef enum { PGM_GLES_TEXTURE_IDENTITY_MATRIX = (1 << 0) } PgmGlesTextureFlags; /* Data storage types */ typedef enum { PGM_GLES_TEXTURE_CLEAN, PGM_GLES_TEXTURE_BUFFER, PGM_GLES_TEXTURE_GST_BUFFER, PGM_GLES_TEXTURE_PIXBUF, } PgmGlesTextureStorageType; struct _PgmGlesTexture { PgmGlesTextureStorageType storage; union { gpointer buffer; GstBuffer *gstbuffer; GdkPixbuf *pixbuf; } data; PgmImagePixelFormat csp; /* Color space */ gint width; /* Width of the buffer */ gint height; /* Height of the buffer */ gint width_pot; /* Power-of-two width of the buffer */ gint height_pot; /* Power-of-two height of the buffer */ gfloat norm_width; /* width / width_pot */ gfloat norm_height; /* height / height_pot */ gfloat inv_norm_width; /* (width / width_pot)^1 */ gfloat inv_norm_height; /* (height / height_pot)^1 */ gint stride; /* Stride of the buffer (not used) */ gint size; /* Size of the buffer in bytes */ /* State flags */ guint8 flags; /* Parameters */ PgmMat4x4 *matrix; PgmGlesEnum filter; PgmGlesEnum wrap_s; PgmGlesEnum wrap_t; PgmGlesEnum format; /* Number of identifiant */ gint count; /* Identifiant(s) */ guint *id; /* Whether the buffer is shared */ guint8 shared; }; /* create a new texture */ PgmGlesTexture *pgm_gles_texture_new (PgmGlesContext *glescontext); /* Free a texture */ void pgm_gles_texture_free (PgmGlesTexture *glestexture); /* Set a raw buffer */ void pgm_gles_texture_set_buffer (PgmGlesTexture *glestexture, guchar *buffer, PgmImagePixelFormat csp, guint width, guint height, guint size, guint stride, gboolean share); /* Set a GdkPixbuf */ void pgm_gles_texture_set_pixbuf (PgmGlesTexture *glestexture, GdkPixbuf *pixbuf); /* Set a GstBuffer */ void pgm_gles_texture_set_gst_buffer (PgmGlesTexture *glestexture, GstBuffer *gstbuffer, PgmImagePixelFormat csp, guint width, guint height, guint stride); /* Update a GstBuffer */ void pgm_gles_texture_update_gst_buffer (PgmGlesTexture *glestexture, GstBuffer *gstbuffer); /* Bind the texture */ void pgm_gles_texture_bind (PgmGlesTexture *glestexture); /* Unbind the texture */ void pgm_gles_texture_unbind (PgmGlesTexture *glestexture); /* Generate the texture */ void pgm_gles_texture_generate (PgmGlesTexture *glestexture); /* Clean up the texture */ void pgm_gles_texture_clean (PgmGlesTexture *glestexture); /* Upload the texture */ void pgm_gles_texture_upload (PgmGlesTexture *glestexture); /* Update the texture */ void pgm_gles_texture_update (PgmGlesTexture *glestexture); /* Set the texture matrix */ void pgm_gles_texture_set_matrix (PgmGlesTexture *glestexture, PgmMat4x4 *matrix); G_END_DECLS #endif /* __PGM_GLES_TEXTURE_H__ */ pigment-0.3.17/plugins/opengles/Makefile.am0000644000175000017500000000206711205034416015520 00000000000000plugindir = @PLUGIN_PATH@ plugin_LTLIBRARIES = libpgmopengles.la libpgmopengles_la_DEPENDENCIES = $(top_builddir)/pgm/libpigment-@PGM_MAJORMINOR@.la libpgmopengles_la_SOURCES = \ pgmgles.c \ pgmglestexture.c \ pgmglescontext.c \ pgmglesbackend.c \ pgmglesdrawable.c \ pgmglesviewport.c \ pgmglesimage.c \ pgmglestext.c if USE_OPENGLES_PC_EMULATION libpgmopengles_la_SOURCES += pgmglesxbackend.c else libpgmopengles_la_SOURCES += pgmgleseglbackend.c endif libpgmopengles_la_CFLAGS = \ $(PGM_OPTION_CFLAGS) \ $(PGM_OBJ_CFLAGS) \ $(PGM_GLES_CFLAGS) libpgmopengles_la_LIBADD = \ $(PGM_OBJ_LIBS) \ $(PGM_GLES_LIBS) libpgmopengles_la_LDFLAGS = $(PGM_PLUGIN_LDFLAGS) noinst_HEADERS = \ pgmglesbackend.h \ pgmglesxbackend.h \ pgmgleseglbackend.h \ pgmglestexture.h \ pgmglescontext.h \ pgmglesdefs.h \ pgmglesdrawable.h \ pgmglesimage.h \ pgmglestext.h \ pgmglesviewport.h CLEANFILES = \ *.gcno \ *.gcda \ *.gcov \ *.gcov.out %.c.gcov: .libs/libpgmopengles_la-%.gcda %.c LANG=C $(GCOV) -b -f -o $^ > $@.out gcov: $(libpgmopengles_la_SOURCES:=.gcov) pigment-0.3.17/plugins/opengles/pgmglesxbackend.c0000644000175000017500000006512611205034416016773 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment OpenGL ES-CM 1.1 plugin * * Copyright © 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ /* * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #include #include #include "pgmglesxbackend.h" #include "pgmglesviewport.h" GST_DEBUG_CATEGORY_STATIC (pgm_gles_xbackend_debug); #define GST_CAT_DEFAULT pgm_gles_xbackend_debug /* Prototypes */ static gboolean event_prepare (GSource *source, gint *timeout); static gboolean event_check (GSource *source); static gboolean event_dispatch (GSource *source, GSourceFunc callback, gpointer data); /* Event handling functions */ static GSourceFuncs event_funcs = { event_prepare, event_check, event_dispatch, NULL }; /* */ typedef struct { EGLint error; const gchar *string; } EglError; /* */ static EglError egl_error_map[] = { { EGL_NOT_INITIALIZED, "not initialized" }, { EGL_BAD_ACCESS, "bad access" }, { EGL_BAD_ALLOC, "bad allocation" }, { EGL_BAD_ATTRIBUTE, "bad attribute" }, { EGL_BAD_CONFIG, "bad configuration" }, { EGL_BAD_CONTEXT, "bad context" }, { EGL_BAD_CURRENT_SURFACE, "bad current surface" }, { EGL_BAD_DISPLAY, "bad display" }, { EGL_BAD_MATCH, "bad match" }, { EGL_BAD_NATIVE_PIXMAP, "bad native pixmap" }, { EGL_BAD_NATIVE_WINDOW, "bad native window" }, { EGL_BAD_PARAMETER, "bad parameter" }, { EGL_BAD_SURFACE, "bad surface" }, { 0, "unknown error" } }; /* X atom index IDs */ typedef enum { ATOM_NET_WM_STATE_FULLSCREEN = 0, ATOM_NET_WM_STATE = 1, ATOM_NET_WM_PING = 2, ATOM_NET_WM_USER_TIME = 3, ATOM_NET_WM_NAME = 4, ATOM_NET_ACTIVE_WINDOW = 5, ATOM_MOTIF_WM_HINTS = 6, ATOM_UTF8_STRING = 7, ATOM_WM_PROTOCOLS = 8, ATOM_WM_DELETE_WINDOW = 9, } XAtomIndexId; /* X atom names */ static const gchar *atom_name[] = { "_NET_WM_STATE_FULLSCREEN", /* 0 */ "_NET_WM_STATE", /* 1 */ "_NET_WM_PING", /* 2 */ "_NET_WM_USER_TIME", /* 3 */ "_NET_WM_NAME", /* 4 */ "_NET_ACTIVE_WINDOW", /* 5 */ "_MOTIF_WM_HINTS", /* 6 */ "UTF8_STRING", /* 7 */ "WM_PROTOCOLS", /* 8 */ "WM_DELETE_WINDOW", /* 9 */ }; /* Number of atoms, atom strings and index IDs must be kept synchronised! */ static const guint nb_atoms = G_N_ELEMENTS (atom_name); static PgmGlesBackendClass *parent_class = NULL; /* Private functions */ /* */ static gboolean get_egl_error (const gchar *function) { guint i = 0; EGLint error; error = eglGetError (); if (error == EGL_SUCCESS) return TRUE; /* Search for the error */ while (egl_error_map[i].error && error != egl_error_map[i].error) i++; /* Then log it */ GST_ERROR ("%s failed: %s\n", function, egl_error_map[i].string); return FALSE; } /* Specifies the WM_PROTOCOLS property of the window */ static void set_wm_protocols (PgmGlesXBackend *glesxbackend) { Atom protocols[2]; protocols[0] = glesxbackend->atom[ATOM_WM_DELETE_WINDOW]; protocols[1] = glesxbackend->atom[ATOM_NET_WM_PING]; XSetWMProtocols (glesxbackend->xdisplay, glesxbackend->win, protocols, 2); } /* Updates the _NET_WM_USER_TIME property of the window */ static void set_wm_user_time (PgmGlesXBackend *glesxbackend, glong timestamp) { if (timestamp) XChangeProperty (glesxbackend->xdisplay, glesxbackend->win, glesxbackend->atom[ATOM_NET_WM_USER_TIME], XA_CARDINAL, 32, PropModeReplace, (guchar *) ×tamp, 1); } /* Handles the protocols event and returns an event to push if any */ static PgmEvent * handle_wm_protocols_event (PgmGlesXBackend *glesxbackend, XEvent *xevent) { PgmEvent *pgmevent = NULL; /* Delete request */ if (xevent->xclient.data.l[0] == glesxbackend->atom[ATOM_WM_DELETE_WINDOW] && xevent->xany.window == glesxbackend->win) { pgmevent = pgm_event_new (PGM_DELETE); set_wm_user_time (glesxbackend, xevent->xclient.data.l[1]); } /* Ping request */ else if (xevent->xclient.data.l[0] == glesxbackend->atom[ATOM_NET_WM_PING] && xevent->xany.window == glesxbackend->win) { xevent->xclient.window = glesxbackend->root; XSendEvent (glesxbackend->xdisplay, glesxbackend->root, False, SubstructureRedirectMask | SubstructureNotifyMask, (XEvent *) &xevent->xclient); } return pgmevent; } /* Compresses events of the same type */ static void compress_events (PgmGlesXBackend *glesxbackend, XEvent *xevent) { while (XCheckTypedWindowEvent (glesxbackend->xdisplay, glesxbackend->win, xevent->type, xevent)); } /* Fill a PgmEventKey giving the corresponding keyboard xevent */ static void translate_key_event (PgmGlesXBackend *glesxbackend, PgmEventKey *event, XEvent *xevent) { gint index; event->time = xevent->xkey.time; event->modifier = (PgmModifierType) xevent->xkey.state; /* FIXME: This is a really basic support, a lot of keys are not handled */ index = (event->modifier & (PGM_SHIFT_MASK | PGM_CAPSLOCK_MASK)) ? 1 : 0; event->keyval = XKeycodeToKeysym (glesxbackend->xdisplay, xevent->xkey.keycode, index); event->hardware_keycode = xevent->xkey.keycode; } /* Fill a PgmEventMotion giving the corresponding motion xevent */ static void translate_motion_event (PgmGlesXBackend *glesxbackend, PgmEventMotion *event, XEvent *xevent) { event->time = xevent->xmotion.time; event->x = xevent->xmotion.x; event->y = xevent->xmotion.y; } /* Fill a PgmEventButton giving the corresponding button xevent */ static void translate_button_press_event (PgmGlesXBackend *glesxbackend, PgmEventButton *event, XEvent *xevent) { event->time = xevent->xbutton.time; event->x = xevent->xbutton.x; event->y = xevent->xbutton.y; } /* Fill a PgmEventScroll giving the corresponding button xevent */ static void translate_scroll_event (PgmGlesXBackend *glesxbackend, PgmEventScroll *event, XEvent *xevent) { event->time = xevent->xbutton.time; event->x = xevent->xbutton.x; event->y = xevent->xbutton.y; } /* Create a button event (Release) giving the corresponding button xevent */ static PgmEvent * create_button_release_event (PgmGlesXBackend *glesxbackend, XEvent *xevent) { PgmEventButton *event; switch (xevent->xbutton.button) { case 1: event = (PgmEventButton *) pgm_event_new (PGM_BUTTON_RELEASE); event->button = PGM_BUTTON_LEFT; break; case 2: event = (PgmEventButton *) pgm_event_new (PGM_BUTTON_RELEASE); event->button = PGM_BUTTON_MIDDLE; break; case 3: event = (PgmEventButton *) pgm_event_new (PGM_BUTTON_RELEASE); event->button = PGM_BUTTON_RIGHT; break; /* No release */ default: return NULL; } event->time = xevent->xbutton.time; event->x = xevent->xbutton.x; event->y = xevent->xbutton.y; return (PgmEvent *) event; } /* Create a button event (Scroll, Press) given an XEvent */ static PgmEvent * create_button_event (PgmGlesXBackend *glesxbackend, XEvent *xevent) { PgmEvent *event; switch (xevent->xbutton.button) { case 1: event = pgm_event_new (PGM_BUTTON_PRESS); ((PgmEventButton *) event)->button = PGM_BUTTON_LEFT; translate_button_press_event (glesxbackend, (PgmEventButton *) event, xevent); break; case 2: event = pgm_event_new (PGM_BUTTON_PRESS); ((PgmEventButton *) event)->button = PGM_BUTTON_MIDDLE; translate_button_press_event (glesxbackend, (PgmEventButton *) event, xevent); break; case 3: event = pgm_event_new (PGM_BUTTON_PRESS); ((PgmEventButton *) event)->button = PGM_BUTTON_RIGHT; translate_button_press_event (glesxbackend, (PgmEventButton *) event, xevent); break; case 4: event = pgm_event_new (PGM_SCROLL); ((PgmEventScroll *) event)->direction = PGM_SCROLL_UP; translate_scroll_event (glesxbackend, (PgmEventScroll *) event, xevent); break; case 5: event = pgm_event_new (PGM_SCROLL); ((PgmEventScroll *) event)->direction = PGM_SCROLL_DOWN; translate_scroll_event (glesxbackend, (PgmEventScroll *) event, xevent); break; default: event = NULL; break; } return event; } /* Dispatches events pushing them on the viewport queue */ static gboolean dispatch_x_events (PgmGlesBackend *glesbackend) { static guint8 button_mask = 0; PgmGlesXBackend *glesxbackend = PGM_GLES_X_BACKEND (glesbackend); PgmGlesViewport *glesviewport = glesbackend->context->glesviewport; PgmViewport *viewport = PGM_VIEWPORT (glesviewport); if (!XPending (glesxbackend->xdisplay)) return TRUE; while (XEventsQueued (glesxbackend->xdisplay, QueuedAlready)) { PgmEvent *pgmevent = NULL; XEvent xevent; XNextEvent (glesxbackend->xdisplay, &xevent); switch (xevent.type) { /* --- Expose event --- */ case Expose: GST_DEBUG_OBJECT (glesxbackend, "Expose event"); compress_events (glesxbackend, &xevent); pgmevent = pgm_event_new (PGM_EXPOSE); pgm_gles_context_update (glesbackend->context); pgm_viewport_push_event (viewport, pgmevent); break; /* --- Key press event --- */ case KeyPress: GST_DEBUG_OBJECT (glesxbackend, "KeyPress event: (time=%u, state=0x%x, " "keycode=0x%x)", xevent.xkey.time, xevent.xkey.state, xevent.xkey.keycode); pgmevent = pgm_event_new (PGM_KEY_PRESS); translate_key_event (glesxbackend, (PgmEventKey *) pgmevent, &xevent); set_wm_user_time (glesxbackend, xevent.xkey.time); pgm_viewport_push_event (viewport, pgmevent); break; /* --- Key release event --- */ case KeyRelease: GST_DEBUG_OBJECT (glesxbackend, "KeyRelease event: (time=%u, " "state=0x%x, keycode=0x%x)", xevent.xkey.time, xevent.xkey.state, xevent.xkey.keycode); pgmevent = pgm_event_new (PGM_KEY_RELEASE); translate_key_event (glesxbackend, (PgmEventKey *) pgmevent, &xevent); pgm_viewport_push_event (viewport, pgmevent); break; /* --- Button press event --- */ case ButtonPress: GST_DEBUG_OBJECT (glesxbackend, "ButtonPress event: (time=%u, " "button=%d x=%d y=%d)", xevent.xbutton.time, xevent.xbutton.button, xevent.xbutton.x, xevent.xbutton.y); pgmevent = create_button_event (glesxbackend, &xevent); if (pgmevent) { set_wm_user_time (glesxbackend, xevent.xbutton.time); pgm_viewport_push_event (viewport, pgmevent); /* Events here could also be scroll events, so we check it's not * and then grab the pointer */ if (pgmevent->type == PGM_BUTTON_PRESS) { button_mask |= ((PgmEventButton *) pgmevent)->button; XGrabPointer (glesxbackend->xdisplay, glesxbackend->win, False, ButtonPressMask | ButtonReleaseMask | PointerMotionMask, GrabModeAsync, GrabModeAsync, None, None, CurrentTime); } } break; /* --- Button release event --- */ case ButtonRelease: GST_DEBUG_OBJECT (glesxbackend, "ButtonRelease event: (time=%u, " "button=%d x=%d y=%d)", xevent.xbutton.time, xevent.xbutton.button, xevent.xbutton.x, xevent.xbutton.y); pgmevent = create_button_release_event (glesxbackend, &xevent); if (pgmevent) { pgm_viewport_push_event (viewport, pgmevent); button_mask &= ~((PgmEventButton *) pgmevent)->button; if (button_mask == 0) XUngrabPointer(glesxbackend->xdisplay, CurrentTime); } break; /* --- Motion notify event --- */ case MotionNotify: GST_DEBUG_OBJECT (glesxbackend, "MotionNotify event: (time=%u, x=%d, " "y=%d)", xevent.xmotion.time, xevent.xmotion.x, xevent.xmotion.y); compress_events (glesxbackend, &xevent); pgmevent = pgm_event_new (PGM_MOTION_NOTIFY); translate_motion_event (glesxbackend, (PgmEventMotion *) pgmevent, &xevent); pgm_viewport_push_event (viewport, pgmevent); break; /* --- Client message event --- */ case ClientMessage: GST_DEBUG_OBJECT (glesxbackend, "ClientMessage event: " "message_type='%s')", XGetAtomName (glesxbackend->xdisplay, xevent.xclient.message_type)); { Atom atom = xevent.xclient.message_type; if (atom == glesxbackend->atom[ATOM_WM_PROTOCOLS]) pgmevent = handle_wm_protocols_event (glesxbackend, &xevent); if (pgmevent) pgm_viewport_push_event (viewport, pgmevent); } default: break; } } return TRUE; } /* Events preparing */ static gboolean event_prepare (GSource *source, gint *timeout) { PgmGlesXBackendSource *glesxbackend_source = (PgmGlesXBackendSource *) source; PgmGlesXBackend *glesxbackend = glesxbackend_source->glesxbackend; PgmGlesBackend *backend = PGM_GLES_BACKEND (glesxbackend); if (XEventsQueued (glesxbackend->xdisplay, QueuedAlready)) return TRUE; *timeout = backend->context->update_tag ? 0 : -1; return FALSE; } /* Events checking */ static gboolean event_check (GSource *source) { PgmGlesXBackendSource *glesxbackend_source = (PgmGlesXBackendSource *) source; return (glesxbackend_source->poll_fd.revents & G_IO_IN) != 0; } /* Events dispatching */ static gboolean event_dispatch (GSource *source, GSourceFunc callback, gpointer data) { if (callback) return callback (data); return FALSE; } /* Add event handling source to the rendering main context */ static gboolean add_event_source (PgmGlesXBackend *glesxbackend) { PgmGlesBackend *glesbackend = PGM_GLES_BACKEND (glesxbackend); GMainContext *render_context = glesbackend->context->render_context; PgmGlesXBackendSource *source; /* Filter handled events */ XSelectInput (glesxbackend->xdisplay, glesxbackend->win, KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask | ExposureMask | PointerMotionMask | PropertyChangeMask); /* Create and initialize the event handling dedicated source */ source = (PgmGlesXBackendSource *) g_source_new (&event_funcs, sizeof (PgmGlesXBackendSource)); source->poll_fd.fd = ConnectionNumber (glesxbackend->xdisplay); source->poll_fd.events = G_IO_IN; source->glesxbackend = glesxbackend; g_source_add_poll ((GSource *) source, &source->poll_fd); /* Attach it */ g_source_set_callback ((GSource *) source, (GSourceFunc) dispatch_x_events, glesxbackend, NULL); g_source_set_priority ((GSource *) source, G_PRIORITY_DEFAULT-20); glesxbackend->event_id = g_source_attach ((GSource *) source, render_context); g_source_unref ((GSource *) source); return TRUE; } /* PgmGlesBackend methods */ static gboolean pgm_gles_x_backend_create_window (PgmGlesBackend *glesbackend) { PgmGlesXBackend *glesxbackend = PGM_GLES_X_BACKEND (glesbackend); const gchar *title = "Pigment OpenGL ES-CM 1.X plugin (PC emulation)"; gint swap_interval = 1; const gchar *env_var; EGLConfig config; gint num_configs; PgmViewport *viewport; gint width, height; XSizeHints *size_hints; gint attrib[] = { EGL_RED_SIZE, 5, EGL_GREEN_SIZE, 6, EGL_BLUE_SIZE, 5, EGL_DEPTH_SIZE, 0, EGL_SURFACE_TYPE, EGL_WINDOW_BIT, EGL_NONE }; GST_DEBUG_OBJECT (glesxbackend, "create_window"); viewport = PGM_VIEWPORT (glesbackend->context->glesviewport); /* Initialize display */ glesxbackend->xdisplay = XOpenDisplay (NULL); if (!glesxbackend->xdisplay) { GST_ERROR_OBJECT (glesxbackend, "couldn't open default display"); return FALSE; } glesxbackend->egldisplay = eglGetDisplay ((NativeDisplayType) glesxbackend->xdisplay); if (glesxbackend->egldisplay == EGL_NO_DISPLAY) { GST_ERROR_OBJECT (glesxbackend, "cannot get a display"); return FALSE; } if (!eglInitialize (glesxbackend->egldisplay, NULL, NULL)) { get_egl_error ("eglInitialize"); return FALSE; } glesxbackend->screen = DefaultScreen (glesxbackend->xdisplay); glesxbackend->root = DefaultRootWindow (glesxbackend->xdisplay); /* Get and log EGL informations */ glesxbackend->vendor = eglQueryString (glesxbackend->egldisplay, EGL_VENDOR); glesxbackend->version = eglQueryString (glesxbackend->egldisplay, EGL_VERSION); glesxbackend->extensions = eglQueryString (glesxbackend->egldisplay, EGL_EXTENSIONS); GST_DEBUG_OBJECT (glesxbackend, "EGL vendor: %s", glesxbackend->vendor); GST_DEBUG_OBJECT (glesxbackend, "EGL version: %s", glesxbackend->version); GST_DEBUG_OBJECT (glesxbackend, "EGL extensions: %s", glesxbackend->extensions); /* Create the window */ pgm_viewport_get_size (viewport, &width, &height); glesxbackend->win = XCreateSimpleWindow (glesxbackend->xdisplay, glesxbackend->root, 0, 0, width, height, 0, 0, BlackPixel (glesxbackend->xdisplay, glesxbackend->screen)); if (!glesxbackend->win) { GST_ERROR_OBJECT (glesxbackend, "couldn't create window"); return FALSE; } /* Create the context and make it current */ if (!eglChooseConfig (glesxbackend->egldisplay, attrib, &config, 1, &num_configs)) { get_egl_error ("eglChooseConfig"); return FALSE; } glesxbackend->surface = eglCreateWindowSurface (glesxbackend->egldisplay, config, (NativeWindowType) glesxbackend->win, NULL); if (!get_egl_error ("eglCreateWindowSurface")) return FALSE; glesxbackend->context = eglCreateContext (glesxbackend->egldisplay, config, EGL_NO_CONTEXT, NULL); if (!get_egl_error ("eglCreateContext")) return FALSE; eglMakeCurrent (glesxbackend->egldisplay, glesxbackend->surface, glesxbackend->surface, glesxbackend->context); if (!get_egl_error ("eglMakeCurrent")) return FALSE; /* Event source */ if (!add_event_source (glesxbackend)) { GST_ERROR_OBJECT (glesxbackend, "couldn't add event handling source\n"); return FALSE; } /* Fill X atoms arrays */ glesxbackend->atom = g_malloc (nb_atoms * sizeof (Atom)); XInternAtoms (glesxbackend->xdisplay, (gchar**) atom_name, nb_atoms, False, glesxbackend->atom); /* Don't allow resizing */ size_hints = XAllocSizeHints (); size_hints->max_width = size_hints->min_width = width; size_hints->max_height = size_hints->min_height = height; size_hints->flags = PMinSize | PMaxSize; XSetWMNormalHints (glesxbackend->xdisplay, glesxbackend->win, size_hints); XFree (size_hints); /* Set the title */ XChangeProperty (glesxbackend->xdisplay, glesxbackend->win, glesxbackend->atom[ATOM_NET_WM_NAME], glesxbackend->atom[ATOM_UTF8_STRING], 8, PropModeReplace, (guchar*) title, strlen (title)); /* Set a hand icon */ /* XDefineCursor (glesxbackend->xdisplay, glesxbackend->win, */ /* XCreateFontCursor (glesxbackend->xdisplay, XC_hand2)); */ /* X protocols initialization */ set_wm_protocols (glesxbackend); glesxbackend->resolution_width = width; glesxbackend->resolution_height = height; glesxbackend->size_mm_width = width; glesxbackend->size_mm_height = height; /* Specify the minimum number of video frame periods per buffer swap, this * is actually how vertical synchronization is handled */ env_var = g_getenv ("PGM_GLES_SWAP_INTERVAL"); if (env_var) swap_interval = atoi (env_var); eglSwapInterval (glesxbackend->egldisplay, swap_interval); GST_DEBUG_OBJECT (glesxbackend, "using a swap interval of %d", swap_interval); glesxbackend->created = TRUE; return TRUE; } static gboolean pgm_gles_x_backend_destroy_window (PgmGlesBackend *glesbackend) { PgmGlesXBackend *glesxbackend = PGM_GLES_X_BACKEND (glesbackend); GST_DEBUG_OBJECT (glesxbackend, "destroy_window"); if (glesxbackend->created) { /* Remove event handling source */ g_source_remove (glesxbackend->event_id); /* Clean EGL related data */ eglMakeCurrent (glesxbackend->egldisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); eglTerminate (glesxbackend->egldisplay); /* Clean up X related data */ XDestroyWindow (glesxbackend->xdisplay, glesxbackend->win); XCloseDisplay (glesxbackend->xdisplay); glesxbackend->created = FALSE; g_free (glesxbackend->atom); glesxbackend->atom = NULL; } return TRUE; } static gboolean pgm_gles_x_backend_set_visibility (PgmGlesBackend *glesbackend, gboolean visible) { PgmGlesXBackend *glesxbackend = PGM_GLES_X_BACKEND (glesbackend); if (visible) XMapWindow (glesxbackend->xdisplay, glesxbackend->win); else XUnmapWindow (glesxbackend->xdisplay, glesxbackend->win); XSync (glesxbackend->xdisplay, False); return TRUE; } static void pgm_gles_x_backend_swap_buffers (PgmGlesBackend *glesbackend) { PgmGlesXBackend *glesxbackend = PGM_GLES_X_BACKEND (glesbackend); eglSwapBuffers (glesxbackend->egldisplay, glesxbackend->surface); } static gpointer pgm_gles_x_backend_get_proc_address (PgmGlesBackend *glesbackend, const gchar *proc_name) { return eglGetProcAddress (proc_name); } static void pgm_gles_x_backend_get_screen_size_mm (PgmGlesBackend *glesbackend, gint *width, gint *height) { PgmGlesXBackend *glesxbackend = PGM_GLES_X_BACKEND (glesbackend); *width = glesxbackend->size_mm_width; *height = glesxbackend->size_mm_height; } static void pgm_gles_x_backend_get_screen_resolution (PgmGlesBackend *glesbackend, gint *width, gint *height) { PgmGlesXBackend *glesxbackend = PGM_GLES_X_BACKEND (glesbackend); *width = glesxbackend->resolution_width; *height = glesxbackend->resolution_height; } /* GObject stuff */ PGM_DEFINE_DYNAMIC_TYPE (PgmGlesXBackend, pgm_gles_x_backend, PGM_TYPE_GLES_BACKEND) static void pgm_gles_x_backend_dispose (GObject *object) { PgmGlesXBackend *glesxbackend = PGM_GLES_X_BACKEND (object); if (glesxbackend->created) pgm_gles_x_backend_destroy_window (PGM_GLES_BACKEND (glesxbackend)); GST_CALL_PARENT (G_OBJECT_CLASS, dispose, (object)); } static void pgm_gles_x_backend_class_init (PgmGlesXBackendClass *klass) { GObjectClass *gobject_class; PgmGlesBackendClass *glesbackend_class; GST_DEBUG_CATEGORY_INIT (pgm_gles_xbackend_debug, "pgm_gles_xbackend", 0, "OpenGL ES plugin: PgmGlesXBackend"); parent_class = g_type_class_peek_parent (klass); gobject_class = G_OBJECT_CLASS (klass); glesbackend_class = PGM_GLES_BACKEND_CLASS (klass); /* GObject virtual table */ gobject_class->dispose = GST_DEBUG_FUNCPTR (pgm_gles_x_backend_dispose); /* PgmGlesBackend virtual table */ glesbackend_class->create_window = GST_DEBUG_FUNCPTR (pgm_gles_x_backend_create_window); glesbackend_class->destroy_window = GST_DEBUG_FUNCPTR (pgm_gles_x_backend_destroy_window); glesbackend_class->swap_buffers = GST_DEBUG_FUNCPTR (pgm_gles_x_backend_swap_buffers); glesbackend_class->get_proc_address = GST_DEBUG_FUNCPTR (pgm_gles_x_backend_get_proc_address); glesbackend_class->set_visibility = GST_DEBUG_FUNCPTR (pgm_gles_x_backend_set_visibility); glesbackend_class->get_screen_size_mm = GST_DEBUG_FUNCPTR (pgm_gles_x_backend_get_screen_size_mm); glesbackend_class->get_screen_resolution = GST_DEBUG_FUNCPTR (pgm_gles_x_backend_get_screen_resolution); } static void pgm_gles_x_backend_class_finalize (PgmGlesXBackendClass *klass) { return; } static void pgm_gles_x_backend_init (PgmGlesXBackend *glesxbackend) { glesxbackend->atom = NULL; glesxbackend->created = FALSE; } /* Public methods */ void pgm_gles_x_backend_register (GTypeModule *module) { pgm_gles_x_backend_register_type (module); } PgmGlesBackend * pgm_gles_x_backend_new (PgmGlesContext *glescontext) { PgmGlesBackend *glesbackend; glesbackend = g_object_new (PGM_TYPE_GLES_X_BACKEND, NULL); GST_DEBUG_OBJECT (PGM_GLES_X_BACKEND (glesbackend), "created new glesxbackend"); glesbackend->context = glescontext; return glesbackend; } pigment-0.3.17/plugins/opengles/pgmglestext.h0000644000175000017500000001124411205034416016175 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment OpenGL ES-CM 1.1 plugin * * Copyright © 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author(s): Loïc Molinari * Mirco Müller */ #ifndef __PGM_GLES_TEXT_H__ #define __PGM_GLES_TEXT_H__ #include #include #include #include "pgmglesdrawable.h" G_BEGIN_DECLS #define PGM_TYPE_GLES_TEXT (pgm_gles_text_get_type()) #define PGM_GLES_TEXT(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), PGM_TYPE_GLES_TEXT, PgmGlesText)) #define PGM_GLES_TEXT_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), PGM_TYPE_GLES_TEXT, PgmGlesTextClass)) #define PGM_IS_GLES_TEXT(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), PGM_TYPE_GLES_TEXT)) #define PGM_IS_GLES_TEXT_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), PGM_TYPE_GLES_TEXT)) #define PGM_GLES_TEXT_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS((obj), PGM_TYPE_GLES_TEXT, PgmGlesTextClass)) typedef struct _PgmGlesText PgmGlesText; typedef struct _PgmGlesTextClass PgmGlesTextClass; struct _PgmGlesText { PgmGlesDrawable parent; /* Pixmap buffer */ guchar *buffer; /* Texture handling */ PgmGlesTexture *texture; /* Pango rendering */ PangoContext *pango_ctx; PangoFontDescription *desc; PangoLayout *layout; /* Cairo backend */ cairo_t *cairo_ctx; cairo_surface_t *surface; cairo_font_options_t *font_options; /* Pixmap size */ guint width, height, size; /* Regeneration boolean */ gboolean size_updated; /* Multi lines */ gboolean multiline; /* Color */ gfloat color[4]; /* Outline conversions */ gfloat outline_color[4]; gfloat outline_width; /* Shadow */ gboolean cast_shadow; gfloat shadow_color[4]; gfloat shadow_offset; gfloat shadow_latitude_factor; gfloat shadow_longitude_factor; /* Vertex arrays */ PgmGlesFloat fg_color[16]; PgmGlesFloat coord[8]; PgmGlesFloat vertex[12]; }; struct _PgmGlesTextClass { PgmGlesDrawableClass parent_class; }; GType pgm_gles_text_get_type (void) G_GNUC_CONST; PgmGlesDrawable *pgm_gles_text_new (PgmDrawable *drawable, PgmGlesViewport *glesviewport); void pgm_gles_text_register (GTypeModule *module); void pgm_gles_text_set_label (PgmGlesText *glestext); void pgm_gles_text_set_markup (PgmGlesText *glestext); void pgm_gles_text_set_font_family (PgmGlesText *glestext); void pgm_gles_text_set_font_height (PgmGlesText *glestext); void pgm_gles_text_set_ellipsize (PgmGlesText *glestext); void pgm_gles_text_set_justify (PgmGlesText *glestext); void pgm_gles_text_set_alignment (PgmGlesText *glestext); void pgm_gles_text_set_wrap (PgmGlesText *glestext); void pgm_gles_text_set_gravity (PgmGlesText *glestext); void pgm_gles_text_set_stretch (PgmGlesText *glestext); void pgm_gles_text_set_style (PgmGlesText *glestext); void pgm_gles_text_set_variant (PgmGlesText *glestext); void pgm_gles_text_set_weight (PgmGlesText *glestext); void pgm_gles_text_set_multiline (PgmGlesText *glestext); void pgm_gles_text_set_line_spacing (PgmGlesText *glestext); void pgm_gles_text_set_color (PgmGlesText *glestext); void pgm_gles_text_set_outline_color (PgmGlesText *glestext); void pgm_gles_text_set_outline_width (PgmGlesText *glestext); void pgm_gles_text_set_cast_shadow (PgmGlesText *glestext); void pgm_gles_text_set_shadow_position (PgmGlesText *glestext); void pgm_gles_text_set_shadow_color (PgmGlesText *glestext); G_END_DECLS #endif /* __PGM_GLES_TEXT_H__ */ pigment-0.3.17/plugins/opengles/pgmgleseglbackend.h0000644000175000017500000000604311205034416017271 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment OpenGL ES-CM 1.1 plugin * * Copyright © 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ #ifndef __PGM_GLES_EGL_BACKEND_H__ #define __PGM_GLES_EGL_BACKEND_H__ #include #include "pgmglesbackend.h" #ifdef HAVE_TSLIB #include #endif /* HAVE_TSLIB */ G_BEGIN_DECLS #define PGM_TYPE_GLES_EGL_BACKEND (pgm_gles_egl_backend_get_type ()) #define PGM_GLES_EGL_BACKEND(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), PGM_TYPE_GLES_EGL_BACKEND, PgmGlesEglBackend)) #define PGM_GLES_EGL_BACKEND_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), PGM_TYPE_GLES_EGL_BACKEND, PgmGlesEglBackendClass)) #define PGM_IS_GLES_EGL_BACKEND(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), PGM_TYPE_GLES_EGL_BACKEND)) #define PGM_IS_GLES_EGL_BACKEND_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), PGM_TYPE_GLES_EGL_BACKEND)) #define PGM_GLES_EGL_BACKEND_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS((obj), PGM_TYPE_GLES_EGL_BACKEND, PgmGlesEglBackendClass)) typedef struct _PgmGlesEglBackend PgmGlesEglBackend; typedef struct _PgmGlesEglBackendClass PgmGlesEglBackendClass; #ifdef HAVE_TSLIB typedef struct _PgmGlesEglBackendSource PgmGlesEglBackendSource; #endif /* HAVE_TSLIB */ struct _PgmGlesEglBackend { PgmGlesBackend parent; /* EGL structures */ EGLDisplay display; EGLSurface surface; EGLContext context; /* EGL informations */ const gchar *vendor; const gchar *extensions; const gchar *version; /* Display informations */ gint resolution_width; gint resolution_height; gint size_mm_width; gint size_mm_height; /* Event source id */ guint event_tag; /* States */ gboolean created; }; struct _PgmGlesEglBackendClass { PgmGlesBackendClass parent_class; }; #ifdef HAVE_TSLIB /* Touch screen event source */ struct _PgmGlesEglBackendSource { GSource source; GPollFD poll_fd; /* Touch screen device */ struct tsdev *ts_device; /* Keep track of the backend */ PgmGlesEglBackend *eglbackend; }; #endif /* HAVE_TSLIB */ GType pgm_gles_egl_backend_get_type (void) G_GNUC_CONST; PgmGlesBackend *pgm_gles_egl_backend_new (PgmGlesContext *glescontext); void pgm_gles_egl_backend_register (GTypeModule *module); G_END_DECLS #endif /* __PGM_GLES_EGL_BACKEND_H__ */ pigment-0.3.17/plugins/opengles/pgmglesxbackend.h0000644000175000017500000000573411205034416016777 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment OpenGL ES-CM 1.1 plugin * * Copyright © 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ #ifndef __PGM_GLES_X_BACKEND_H__ #define __PGM_GLES_X_BACKEND_H__ #include #include #include #include "pgmglesbackend.h" G_BEGIN_DECLS #define PGM_TYPE_GLES_X_BACKEND (pgm_gles_x_backend_get_type ()) #define PGM_GLES_X_BACKEND(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), PGM_TYPE_GLES_X_BACKEND, PgmGlesXBackend)) #define PGM_GLES_X_BACKEND_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), PGM_TYPE_GLES_X_BACKEND, PgmGlesXBackendClass)) #define PGM_IS_GLES_X_BACKEND(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), PGM_TYPE_GLES_X_BACKEND)) #define PGM_IS_GLES_X_BACKEND_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), PGM_TYPE_GLES_X_BACKEND)) #define PGM_GLES_X_BACKEND_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS((obj), PGM_TYPE_GLES_X_BACKEND, PgmGlesXBackendClass)) typedef struct _PgmGlesXBackend PgmGlesXBackend; typedef struct _PgmGlesXBackendClass PgmGlesXBackendClass; typedef struct _PgmGlesXBackendSource PgmGlesXBackendSource; struct _PgmGlesXBackend { PgmGlesBackend parent; /* X connection and window management */ Display *xdisplay; Window win; gint screen; gint root; /* X atoms */ Atom *atom; /* EGL structures */ EGLDisplay egldisplay; EGLSurface surface; EGLContext context; /* EGL informations */ const gchar *vendor; const gchar *extensions; const gchar *version; /* Event handling source id */ guint event_id; /* Screen informations */ gint resolution_width; gint resolution_height; gint size_mm_width; gint size_mm_height; /* States */ gboolean created; }; struct _PgmGlesXBackendClass { PgmGlesBackendClass parent_class; }; /* Event source */ struct _PgmGlesXBackendSource { GSource source; GPollFD poll_fd; /* Keep track of the backend */ PgmGlesXBackend *glesxbackend; }; GType pgm_gles_x_backend_get_type (void) G_GNUC_CONST; PgmGlesBackend *pgm_gles_x_backend_new (PgmGlesContext *glescontext); void pgm_gles_x_backend_register (GTypeModule *module); G_END_DECLS #endif /* __PGM_GLES_X_BACKEND_H__ */ pigment-0.3.17/plugins/opengles/pgmglesimage.h0000644000175000017500000000767611205034416016311 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment OpenGL ES-CM 1.1 plugin * * Copyright © 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ #ifndef __PGM_GLES_IMAGE_H__ #define __PGM_GLES_IMAGE_H__ #include "pgmglesdrawable.h" #include "pgmglestexture.h" G_BEGIN_DECLS #define PGM_TYPE_GLES_IMAGE (pgm_gles_image_get_type()) #define PGM_GLES_IMAGE(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), PGM_TYPE_GLES_IMAGE, PgmGlesImage)) #define PGM_GLES_IMAGE_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), PGM_TYPE_GLES_IMAGE, PgmGlesImageClass)) #define PGM_IS_GLES_IMAGE(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), PGM_TYPE_GLES_IMAGE)) #define PGM_IS_GLES_IMAGE_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), PGM_TYPE_GLES_IMAGE)) #define PGM_GLES_IMAGE_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS((obj), PGM_TYPE_GLES_IMAGE, PgmGlesImageClass)) typedef struct _PgmGlesImage PgmGlesImage; typedef struct _PgmGlesImageClass PgmGlesImageClass; struct _PgmGlesImage { PgmGlesDrawable parent; /* Textures */ PgmGlesTexture *native_texture; PgmGlesTexture *texture; /* Aspect ratios */ gfloat drawable_ratio; gfloat image_ratio; /* Last position */ gfloat last_x, last_y, last_z; /* Alignment coeficients */ gfloat h_align, v_align; /* Drawing condition */ gboolean empty; /* Image vertex arrays */ PgmGlesFloat fg_color[16]; PgmGlesFloat coord[8]; PgmGlesFloat vertex[12]; /* Image border vertex arrays */ PgmGlesFloat border_vertex[36]; PgmGlesFloat border_color[48]; gfloat border_width; }; struct _PgmGlesImageClass { PgmGlesDrawableClass parent_class; }; GType pgm_gles_image_get_type (void) G_GNUC_CONST; PgmGlesDrawable *pgm_gles_image_new (PgmDrawable *drawable, PgmGlesViewport *glesviewport); void pgm_gles_image_register (GTypeModule *module); void pgm_gles_image_clear (PgmGlesImage *glesimage); void pgm_gles_image_set_from_file (PgmGlesImage *glesimage); void pgm_gles_image_set_from_buffer (PgmGlesImage *glesimage); void pgm_gles_image_set_from_gst_buffer (PgmGlesImage *glesimage); void pgm_gles_image_set_from_pixbuf (PgmGlesImage *glesimage); void pgm_gles_image_set_from_image (PgmGlesImage *glesimage); void pgm_gles_image_set_mapping_matrix (PgmGlesImage *glesimage); void pgm_gles_image_set_alignment (PgmGlesImage *glesimage); void pgm_gles_image_set_layout (PgmGlesImage *glesimage); void pgm_gles_image_set_interp (PgmGlesImage *glesimage); void pgm_gles_image_set_wrapping (PgmGlesImage *glesimage); void pgm_gles_image_set_aspect_ratio (PgmGlesImage *glesimage); void pgm_gles_image_set_border_width (PgmGlesImage *glesimage); void pgm_gles_image_set_border_inner_color (PgmGlesImage *glesimage); void pgm_gles_image_set_border_outer_color (PgmGlesImage *glesimage); G_END_DECLS #endif /* __PGM_GLES_IMAGE_H__ */ pigment-0.3.17/plugins/opengles/pgmgleseglbackend.c0000644000175000017500000006173711205034416017277 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment OpenGL ES-CM 1.1 plugin * * Copyright © 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari * Sergi Alvarez */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #if HAVE_GDL #include #include "libgdl.h" #include "EGL/egl.h" #define DEFAULT_WIDTH 1280 #define DEFAULT_HEIGHT 720 #endif #include #include #include #include "pgmgleseglbackend.h" #include "pgmglesviewport.h" /* */ typedef struct { EGLint error; const gchar *string; } EglError; /* */ static EglError egl_error_map[] = { { EGL_NOT_INITIALIZED, "not initialized" }, { EGL_BAD_ACCESS, "bad access" }, { EGL_BAD_ALLOC, "bad allocation" }, { EGL_BAD_ATTRIBUTE, "bad attribute" }, { EGL_BAD_CONFIG, "bad configuration" }, { EGL_BAD_CONTEXT, "bad context" }, { EGL_BAD_CURRENT_SURFACE, "bad current surface" }, { EGL_BAD_DISPLAY, "bad display" }, { EGL_BAD_MATCH, "bad match" }, { EGL_BAD_NATIVE_PIXMAP, "bad native pixmap" }, { EGL_BAD_NATIVE_WINDOW, "bad native window" }, { EGL_BAD_PARAMETER, "bad parameter" }, { EGL_BAD_SURFACE, "bad surface" }, { 0, "unknown error" } }; #ifdef HAVE_TSLIB /* Prototypes */ static gboolean event_prepare (GSource *source, gint *timeout); static gboolean event_check (GSource *source); static gboolean event_dispatch (GSource *source, GSourceFunc callback, gpointer data); /* Touch screen event handling functions */ static GSourceFuncs event_funcs = { event_prepare, event_check, event_dispatch, NULL }; #endif /* HAVE_TSLIB */ GST_DEBUG_CATEGORY_STATIC (pgm_gles_eglbackend_debug); #define GST_CAT_DEFAULT pgm_gles_eglbackend_debug static PgmGlesBackendClass *parent_class = NULL; /* Private functions */ /* */ static gboolean get_egl_error (const gchar *function) { guint i = 0; EGLint error; error = eglGetError (); if (error == EGL_SUCCESS) return TRUE; /* Search for the error */ while (egl_error_map[i].error && error != egl_error_map[i].error) i++; /* Then log it */ GST_ERROR ("%s failed: %s\n", function, egl_error_map[i].string); return FALSE; } #ifdef HAVE_TSLIB /* Events preparing */ static gboolean event_prepare (GSource *source, gint *timeout) { PgmGlesEglBackendSource *eglbackend_source = (PgmGlesEglBackendSource *) source; PgmGlesBackend *backend = PGM_GLES_BACKEND (eglbackend_source->eglbackend); gint requested_fps = backend->context->requested_fps; /* If there are rendering updates */ if (backend->context->update_tag) { /* If the rendering is blocked on the vblank, we give a timeout of 0 */ if (requested_fps == 0) *timeout = 0; /* If the rendering is done in a timeout, we use the same timeout */ else *timeout = requested_fps; } /* If there are no rendering updates, we poll with no timeout */ else *timeout = -1; return FALSE; } /* Events checking */ static gboolean event_check (GSource *source) { PgmGlesEglBackendSource *eglbackend_source = (PgmGlesEglBackendSource *) source; return (eglbackend_source->poll_fd.revents & G_IO_IN) != 0; } /* Events dispatching */ static gboolean event_dispatch (GSource *source, GSourceFunc callback, gpointer data) { PgmGlesEglBackendSource *eglbackend_source = (PgmGlesEglBackendSource*) source; PgmGlesBackend *backend = PGM_GLES_BACKEND (eglbackend_source->eglbackend); PgmGlesViewport *glesviewport = backend->context->glesviewport; PgmViewport *viewport = PGM_VIEWPORT (glesviewport); static gboolean clicked = FALSE; static gint last_x = -1; static gint last_y = -1; struct ts_sample sample; /* Get the event */ while (ts_read (eglbackend_source->ts_device, &sample, 1) > 0) { GST_DEBUG_OBJECT (eglbackend_source->eglbackend, "touchscreen event: " "(time=%ld.%06ld, x=%d y=%d pressure=%d)", sample.tv.tv_sec, sample.tv.tv_usec, sample.x, sample.y, sample.pressure); /* Build the event */ if (sample.pressure) { /* Press */ if (!clicked) { PgmEventButton *pgmevent; pgmevent = (PgmEventButton*) pgm_event_new (PGM_BUTTON_PRESS); pgmevent->time = sample.tv.tv_sec * 1000 + sample.tv.tv_usec * 0.001f; pgmevent->pressure = sample.pressure; pgmevent->button = PGM_BUTTON_LEFT; pgmevent->x = last_x = sample.x; pgmevent->y = last_y = sample.y; clicked = TRUE; pgm_viewport_push_event (viewport, (PgmEvent*) pgmevent); } /* Pressure */ else if (last_x == sample.x && last_y == sample.y) { PgmEventButton *pgmevent; pgmevent = (PgmEventButton*) pgm_event_new (PGM_BUTTON_PRESSURE); pgmevent->time = sample.tv.tv_sec * 1000 + sample.tv.tv_usec * 0.001f; pgmevent->pressure = sample.pressure; pgmevent->button = PGM_BUTTON_LEFT; pgmevent->x = last_x = sample.x; pgmevent->y = last_y = sample.y; pgm_viewport_push_event (viewport, (PgmEvent*) pgmevent); } /* Motion */ else { PgmEventMotion *pgmevent; pgmevent = (PgmEventMotion*) pgm_event_new (PGM_MOTION_NOTIFY); pgmevent->time = sample.tv.tv_sec * 1000 + sample.tv.tv_usec * 0.001f; pgmevent->pressure = sample.pressure; pgmevent->x = last_x = sample.x; pgmevent->y = last_y = sample.y; pgm_viewport_push_event (viewport, (PgmEvent*) pgmevent); } } else { PgmEventButton *pgmevent; pgmevent = (PgmEventButton*) pgm_event_new (PGM_BUTTON_RELEASE); pgmevent->time = sample.tv.tv_sec * 1000 + sample.tv.tv_usec * 0.001f; pgmevent->pressure = sample.pressure; pgmevent->button = PGM_BUTTON_LEFT; pgmevent->x = sample.x; pgmevent->y = sample.y; clicked = FALSE; last_x = -1; last_y = -1; pgm_viewport_push_event (viewport, (PgmEvent*) pgmevent); } } return TRUE; } /* Add touch screen event handling source to the rendering main context */ static gboolean add_event_source (PgmGlesEglBackend *eglbackend) { PgmGlesBackend *glesbackend = PGM_GLES_BACKEND (eglbackend); GMainContext *render_context = glesbackend->context->render_context; PgmGlesEglBackendSource *source; const gchar *device_string; struct tsdev *ts_device; gint flags; gint fd; /* Get the device name in the environment, open and configure it */ device_string = g_getenv ("TSLIB_TSDEVICE"); ts_device = ts_open (device_string, 0); if (!ts_device) { GST_WARNING_OBJECT (eglbackend, "could not open touch screen device: %s", device_string); return FALSE; } if (ts_config (ts_device)) { GST_WARNING_OBJECT (eglbackend, "could not configure touch screen device:" "%s", device_string); ts_close (ts_device); return FALSE; } GST_DEBUG_OBJECT (eglbackend, "configured touch screen device: %s", device_string); /* The touch screen device file descriptor needs to be non-blocking so that * we can flush completely the received events. If we are not doing that, the * release events are not sent when the stylus releases the touchscreen but * at the next pressure. */ fd = ts_fd (ts_device); flags = fcntl (fd, F_GETFL, 0); fcntl (fd, F_SETFL, flags | O_NONBLOCK); /* Create and initialize the touch screen event handling dedicated source */ source = (PgmGlesEglBackendSource *) g_source_new (&event_funcs, sizeof (PgmGlesEglBackendSource)); source->poll_fd.fd = fd; source->poll_fd.events = G_IO_IN; source->ts_device = ts_device; source->eglbackend = eglbackend; g_source_add_poll ((GSource *) source, &source->poll_fd); /* Attach it */ g_source_set_can_recurse ((GSource *) source, TRUE); g_source_set_priority ((GSource *) source, G_PRIORITY_DEFAULT-20); eglbackend->event_tag = g_source_attach ((GSource *) source, render_context); return TRUE; } /* Remove touch screen event handling source from the rendering main context */ static void remove_event_source (PgmGlesEglBackend *eglbackend) { PgmGlesBackend *glesbackend = PGM_GLES_BACKEND (eglbackend); GMainContext *render_context = glesbackend->context->render_context; GSource *source; /* Get the source from the rendering GMainContext */ source = g_main_context_find_source_by_id (render_context, eglbackend->event_tag); /* And remove it */ if (source) { ts_close (((PgmGlesEglBackendSource*) source)->ts_device); g_source_destroy (source); g_source_unref ((GSource *) source); } } #endif /* HAVE_TSLIB */ /* PgmGlesBackend methods */ #if HAVE_GDL #include /* Global pointer to the last initialization of the GLES EGL backend */ static PgmGlesEglBackend *gbackend = NULL; static void sigint_handler(int sig) { static int sigint_called = 0; g_fprintf (stderr, "\n^C\n"); if (sigint_called++) return; if (gbackend != NULL) { eglDestroyContext (gbackend->display, gbackend->context); gbackend->context = NULL; eglDestroySurface (gbackend->display, gbackend->surface); gbackend->surface = NULL; eglMakeCurrent (gbackend->display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); eglTerminate (gbackend->display); gbackend->display = NULL; gdl_close(); } g_fprintf(stderr, "GDL terminated\n"); exit(1); } /* GDL get/set tvmode resolution */ static inline gboolean gdl_tvmode_get_size (gint * width, gint * height) { gboolean ret = FALSE; gdl_display_info_t di; memset (&di, 0, sizeof (di)); /* Read current hardware state */ if (gdl_get_display_info (GDL_DISPLAY_ID_0, &di) != GDL_SUCCESS) { GST_ERROR ("gdl_get_display_info failed"); goto beach; } *width = di.tvmode.width; *height = di.tvmode.height; ret = TRUE; beach: return ret; } static int initialize_gdl(PgmGlesEglBackend *glesbackend, gdl_plane_id_t plane) { PgmGlesBackend *backend = PGM_GLES_BACKEND (glesbackend); PgmGlesViewport *glesviewport = backend->context->glesviewport; gdl_display_info_t di; PgmViewport *viewport = PGM_VIEWPORT (glesviewport); gdl_pixel_format_t pixelFormat = GDL_PF_ARGB_32; gdl_color_space_t colorSpace = GDL_COLOR_SPACE_RGB; gdl_rectangle_t rect; gboolean b_true = TRUE; gdl_ret_t rc = GDL_SUCCESS; gint width, height; int ret = TRUE; gdl_init(0); signal(SIGINT, sigint_handler); if (!gdl_tvmode_get_size (&width, &height)) { /* Write current hardware state */ di.id = GDL_DISPLAY_ID_0; di.gamma = GDL_GAMMA_LINEAR; di.tvmode.refresh = GDL_REFRESH_50; di.tvmode.interlaced = 0; di.tvmode.width = DEFAULT_WIDTH; di.tvmode.height = DEFAULT_HEIGHT; di.color_space = (di.tvmode.width>720) ? GDL_COLOR_SPACE_BT709 : GDL_COLOR_SPACE_BT601; if (gdl_set_display_info (&di) != GDL_SUCCESS) { GST_ERROR ("gdl_set_display_info failed"); goto beach; } gdl_port_set_attr (GDL_PD_ID_HDMI, GDL_PD_ATTR_ID_POWER, &b_true); gdl_port_set_attr (GDL_PD_ID_HDMI, GDL_PD_ATTR_ID_PAR, &b_true); if (!gdl_tvmode_get_size (&width, &height)) ret = FALSE; if (ret == FALSE) { goto beach; } } /* force viewport size to fullscreen */ viewport->width = width; viewport->height = height; viewport->projected_width = width; viewport->projected_height = height; glesviewport->projected_w = width; glesviewport->projected_h = height; rc = gdl_plane_reset(plane); if (rc == GDL_SUCCESS) rc = gdl_plane_config_begin(plane); if (rc == GDL_SUCCESS) rc = gdl_plane_set_attr(GDL_PLANE_SRC_COLOR_SPACE, &colorSpace); if (rc == GDL_SUCCESS) rc = gdl_plane_set_attr(GDL_PLANE_PIXEL_FORMAT, &pixelFormat); rect.origin.x = 0; rect.origin.y = 0; rect.width = width; rect.height = height; if (rc == GDL_SUCCESS) rc = gdl_plane_set_attr(GDL_PLANE_DST_RECT, &rect); if (rc == GDL_SUCCESS) rc = gdl_plane_config_end(GDL_FALSE); else gdl_plane_config_end(GDL_TRUE); if (rc != GDL_SUCCESS) { GST_DEBUG_OBJECT (glesbackend, "GDL configuration failed! GDL error code is 0x%x\n", rc); ret = FALSE; } beach: return ret; } #endif static gboolean pgm_gles_egl_backend_create_window (PgmGlesBackend *glesbackend) { PgmGlesEglBackend *eglbackend = PGM_GLES_EGL_BACKEND (glesbackend); gint swap_interval = 1; const gchar *env_var; EGLConfig config = 0; gint num_configs = 0; gint egl_major, egl_minor; EGLint attrib[] = { EGL_BUFFER_SIZE, EGL_DONT_CARE, EGL_DEPTH_SIZE, 0, EGL_RED_SIZE, 8, EGL_GREEN_SIZE, 8, EGL_BLUE_SIZE, 8, EGL_RENDERABLE_TYPE, EGL_OPENGL_ES_BIT, EGL_NONE }; g_return_val_if_fail (eglbackend != NULL, FALSE); GST_DEBUG_OBJECT (eglbackend, "create_window"); #if HAVE_GDL if (initialize_gdl (eglbackend, GDL_PLANE_ID_UPP_C) == FALSE) { GST_ERROR_OBJECT (eglbackend, "Cannot initialize GDL backend"); goto error_display; } #endif /* Initialize EGL for the default display */ eglbackend->display = eglGetDisplay ((NativeDisplayType) EGL_DEFAULT_DISPLAY); if (eglbackend->display == EGL_NO_DISPLAY) { GST_ERROR_OBJECT (eglbackend, "cannot get a display"); goto error_display; } if (!eglInitialize (eglbackend->display, &egl_major, &egl_minor)) { get_egl_error ("eglInitialize"); goto error; } /* Get and log EGL informations */ GST_DEBUG_OBJECT (eglbackend, "EGL init version: %d.%d", egl_major, egl_minor); eglbackend->vendor = eglQueryString (eglbackend->display, EGL_VENDOR); eglbackend->version = eglQueryString (eglbackend->display, EGL_VERSION); eglbackend->extensions = eglQueryString (eglbackend->display, EGL_EXTENSIONS); GST_DEBUG_OBJECT (eglbackend, "EGL vendor: %s", eglbackend->vendor); GST_DEBUG_OBJECT (eglbackend, "EGL version: %s", eglbackend->version); GST_DEBUG_OBJECT (eglbackend, "EGL extensions: %s", eglbackend->extensions); if (!eglChooseConfig (eglbackend->display, attrib, &config, 1, &num_configs)) { get_egl_error ("eglChooseConfig"); goto error; } GST_DEBUG_OBJECT (eglbackend, "EGL config %d (num=%d)", config, num_configs); /* Create the context and make it current */ #if HAVE_GDL eglbackend->surface = eglCreateWindowSurface (eglbackend->display, config, (NativeWindowType)GDL_PLANE_ID_UPP_C, NULL); gbackend = eglbackend; if (eglBindAPI(EGL_OPENGL_ES_API) == 0) { GST_DEBUG_OBJECT (eglbackend, "eglBindAPI: %s", eglbackend->extensions); goto error; } eglWaitClient(); #else eglbackend->surface = eglCreateWindowSurface (eglbackend->display, config, (NativeWindowType) 0, NULL); #endif if (eglbackend->surface == EGL_NO_SURFACE \ || !get_egl_error ("eglCreateWindowSurface")) goto error; eglbackend->context = eglCreateContext (eglbackend->display, config, NULL, NULL); if (eglbackend->context == EGL_NO_CONTEXT || !get_egl_error ("eglCreateContext")) { goto error; } #ifdef HAVE_TSLIB /* Touch screen event source */ if (!add_event_source (eglbackend)) { GST_ERROR_OBJECT (eglbackend, "couldn't add event handling source\n"); eglMakeCurrent (eglbackend->display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); goto error; } #else eglMakeCurrent (eglbackend->display, eglbackend->surface, eglbackend->surface, eglbackend->context); if (!get_egl_error ("eglMakeCurrent")) { goto error; } #endif /* HAVE_TSLIB */ #if HAVE_GDL /* Get and store the window size, the resolution in this case is the same */ gdl_tvmode_get_size (&eglbackend->resolution_width, &eglbackend->resolution_height); eglbackend->size_mm_width = eglbackend->resolution_width; eglbackend->size_mm_height = eglbackend->resolution_height; #else /* Get and store the window size, the resolution in this case is the same */ eglQuerySurface (eglbackend->display, eglbackend->surface, EGL_WIDTH, &eglbackend->size_mm_width); eglbackend->resolution_width = eglbackend->size_mm_width; eglQuerySurface (eglbackend->display, eglbackend->surface, EGL_HEIGHT, &eglbackend->size_mm_height); eglbackend->resolution_height = eglbackend->size_mm_height; #endif /* Specify the minimum number of video frame periods per buffer swap, this * is actually how vertical synchronization is handled */ env_var = g_getenv ("PGM_GLES_SWAP_INTERVAL"); if (env_var) swap_interval = atoi (env_var); eglSwapInterval (eglbackend->display, swap_interval); GST_DEBUG_OBJECT (eglbackend, "using a swap interval of %d", swap_interval); eglbackend->created = TRUE; return TRUE; error: if (eglbackend->context != EGL_NO_CONTEXT) { eglDestroyContext (eglbackend->display, eglbackend->context); } if (eglbackend->surface != EGL_NO_SURFACE) { eglDestroySurface (eglbackend->display, eglbackend->surface); } eglTerminate (eglbackend->display); error_display: #if HAVE_GDL gdl_close(); #endif return FALSE; } static gboolean pgm_gles_egl_backend_destroy_window (PgmGlesBackend *glesbackend) { PgmGlesEglBackend *eglbackend = PGM_GLES_EGL_BACKEND (glesbackend); GST_DEBUG_OBJECT (eglbackend, "destroy_window"); if (eglbackend->created) { #ifdef HAVE_TSLIB remove_event_source (eglbackend); #endif /* HAVE_TSLIB */ #if 0 /* this makes the hardware crash */ if (eglbackend->context != EGL_NO_CONTEXT) { eglDestroyContext (eglbackend->display, eglbackend->context); } if (eglbackend->surface != EGL_NO_SURFACE) { eglDestroySurface (eglbackend->display, eglbackend->surface); } eglMakeCurrent (eglbackend->display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); #endif eglTerminate (eglbackend->display); eglbackend->created = FALSE; } #if HAVE_GDL gdl_close(); #endif return TRUE; } static gboolean pgm_gles_egl_backend_set_visibility (PgmGlesBackend *glesbackend, gboolean visible) { PgmGlesEglBackend *eglbackend = PGM_GLES_EGL_BACKEND (glesbackend); GST_DEBUG_OBJECT (eglbackend, "set_visibility"); /* FIXME */ return TRUE; } static void pgm_gles_egl_backend_swap_buffers (PgmGlesBackend *glesbackend) { PgmGlesEglBackend *eglbackend = PGM_GLES_EGL_BACKEND (glesbackend); eglSwapBuffers (eglbackend->display, eglbackend->surface); } static gpointer pgm_gles_egl_backend_get_proc_address (PgmGlesBackend *glesbackend, const gchar *proc_name) { return eglGetProcAddress (proc_name); } static void pgm_gles_egl_backend_get_screen_size_mm (PgmGlesBackend *glesbackend, gint *width, gint *height) { PgmGlesEglBackend *eglbackend = PGM_GLES_EGL_BACKEND (glesbackend); *width = eglbackend->size_mm_width; *height = eglbackend->size_mm_height; } static void pgm_gles_egl_backend_set_screen_resolution (PgmGlesBackend *glesbackend, gint width, gint height) { #if HAVE_GDL PgmGlesEglBackend *eglbackend = PGM_GLES_EGL_BACKEND (glesbackend); gdl_rectangle_t rect; gint num_configs = 0; EGLConfig config = 0; EGLint attrib[] = { EGL_BUFFER_SIZE, EGL_DONT_CARE, EGL_DEPTH_SIZE, 0, EGL_RED_SIZE, 8, EGL_GREEN_SIZE, 8, EGL_BLUE_SIZE, 8, EGL_RENDERABLE_TYPE, EGL_OPENGL_ES_BIT, EGL_NONE }; eglbackend->size_mm_width = eglbackend->resolution_width = width; eglbackend->size_mm_height = eglbackend->resolution_height = height; eglMakeCurrent (eglbackend->display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); eglDestroySurface (eglbackend->display, eglbackend->surface); eglbackend->surface = NULL; rect.origin.x = 0; rect.origin.y = 0; rect.width = width; rect.height = height; gdl_plane_config_begin (GDL_PLANE_ID_UPP_C); gdl_plane_set_attr (GDL_PLANE_DST_RECT, &rect); gdl_plane_config_end (GDL_FALSE); if (!eglChooseConfig (eglbackend->display, attrib, &config, 1, &num_configs)) { GST_WARNING_OBJECT (eglbackend, "Cannot get EGL configuration"); } eglbackend->surface = eglCreateWindowSurface (eglbackend->display, config, (NativeWindowType)GDL_PLANE_ID_UPP_C, NULL); if (eglBindAPI (EGL_OPENGL_ES_API) == 0) { GST_WARNING_OBJECT (eglbackend, "Cannot bind OpenGL-ES from EGL"); } eglMakeCurrent (eglbackend->display, eglbackend->surface, eglbackend->surface, eglbackend->context); #endif } static void pgm_gles_egl_backend_get_screen_resolution (PgmGlesBackend *glesbackend, gint *width, gint *height) { PgmGlesEglBackend *eglbackend = PGM_GLES_EGL_BACKEND (glesbackend); *width = eglbackend->resolution_width; *height = eglbackend->resolution_height; } /* GObject stuff */ PGM_DEFINE_DYNAMIC_TYPE (PgmGlesEglBackend, pgm_gles_egl_backend, PGM_TYPE_GLES_BACKEND) void pgm_gles_egl_backend_register (GTypeModule *module) { pgm_gles_egl_backend_register_type (module); } static void pgm_gles_egl_backend_dispose (GObject *object) { PgmGlesEglBackend *eglbackend = PGM_GLES_EGL_BACKEND (object); GST_DEBUG_OBJECT (eglbackend, "dispose"); if (eglbackend->created) pgm_gles_egl_backend_destroy_window (PGM_GLES_BACKEND (eglbackend)); GST_CALL_PARENT (G_OBJECT_CLASS, dispose, (object)); } static void pgm_gles_egl_backend_class_init (PgmGlesEglBackendClass *klass) { GObjectClass *gobject_class; PgmGlesBackendClass *glesbackend_class; GST_DEBUG_CATEGORY_INIT (pgm_gles_eglbackend_debug, "pgm_gles_eglbackend", 0, "OpenGL ES plugin: PgmGlesEglBackend"); parent_class = g_type_class_peek_parent (klass); gobject_class = G_OBJECT_CLASS (klass); glesbackend_class = PGM_GLES_BACKEND_CLASS (klass); /* GObject virtual table */ gobject_class->dispose = GST_DEBUG_FUNCPTR (pgm_gles_egl_backend_dispose); /* PgmGlesBackend virtual table */ glesbackend_class->create_window = GST_DEBUG_FUNCPTR (pgm_gles_egl_backend_create_window); glesbackend_class->destroy_window = GST_DEBUG_FUNCPTR (pgm_gles_egl_backend_destroy_window); glesbackend_class->swap_buffers = GST_DEBUG_FUNCPTR (pgm_gles_egl_backend_swap_buffers); glesbackend_class->get_proc_address = GST_DEBUG_FUNCPTR (pgm_gles_egl_backend_get_proc_address); glesbackend_class->set_visibility = GST_DEBUG_FUNCPTR (pgm_gles_egl_backend_set_visibility); glesbackend_class->get_screen_size_mm = GST_DEBUG_FUNCPTR (pgm_gles_egl_backend_get_screen_size_mm); glesbackend_class->get_screen_resolution = GST_DEBUG_FUNCPTR (pgm_gles_egl_backend_get_screen_resolution); glesbackend_class->set_screen_resolution = GST_DEBUG_FUNCPTR (pgm_gles_egl_backend_set_screen_resolution); } static void pgm_gles_egl_backend_class_finalize (PgmGlesEglBackendClass *klass) { return; } static void pgm_gles_egl_backend_init (PgmGlesEglBackend *eglbackend) { GST_DEBUG_OBJECT (eglbackend, "init"); eglbackend->display = 0; eglbackend->surface = 0; eglbackend->context = 0; eglbackend->created = FALSE; } /* Public methods */ PgmGlesBackend* pgm_gles_egl_backend_new (PgmGlesContext *glescontext) { PgmGlesBackend *glesbackend; glesbackend = g_object_new (PGM_TYPE_GLES_EGL_BACKEND, NULL); GST_DEBUG_OBJECT (PGM_GLES_EGL_BACKEND (glesbackend), "created new eglbackend"); glesbackend->context = glescontext; return glesbackend; } pigment-0.3.17/plugins/opengles/pgmglestext.c0000644000175000017500000011426111205034416016173 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment OpenGL ES-CM 1.1 plugin * * Copyright © 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author(s): Loïc Molinari * Mirco Müller */ /* * PgmGlesText uses the Pango text rendering pipeline to generate a pixmap with * the size of the drawable and then bind it as a texture. Each time a property * is changed, the pixmap is updated. When the drawable size is changed, the * pixmap is reallocated to this new one and then updated. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include "pgmglestext.h" #ifndef HAVE_PANGO_1_16 #ifndef G_OS_WIN32 #include #endif #endif /* This is the offset such that (0xFF << PGM_n_OFFSET) is the mask to access the * nth byte of a guint32 */ #if G_BYTE_ORDER == G_LITTLE_ENDIAN #define BYTE_1_OFFSET 0 #define BYTE_2_OFFSET 8 #define BYTE_3_OFFSET 16 #define BYTE_4_OFFSET 24 #else /* G_BIG_ENDIAN */ #define BYTE_1_OFFSET 24 #define BYTE_2_OFFSET 16 #define BYTE_3_OFFSET 8 #define BYTE_4_OFFSET 0 #endif /* These are the offsets to shift to access the alpha, red, green and blue bytes * in a native endian ARGB value (such as what is given by Cairo) */ #define ARGB_A_OFFSET 24 #define ARGB_R_OFFSET 16 #define ARGB_G_OFFSET 8 #define ARGB_B_OFFSET 0 /* These are the A,R,G,B component byte masks for a native endian ARGB value * (such as what is given by Cairo) */ #define ARGB_A_MASK 0xFF000000 #define ARGB_R_MASK 0x00FF0000 #define ARGB_G_MASK 0x0000FF00 #define ARGB_B_MASK 0x000000FF GST_DEBUG_CATEGORY_STATIC (pgm_gles_text_debug); #define GST_CAT_DEFAULT pgm_gles_text_debug static PgmGlesDrawableClass *parent_class = NULL; /* Private methods */ /* Gets the projected height of the drawable on the viewport at z=0 */ static gfloat get_projected_height (PgmGlesDrawable *glesdrawable, gfloat canvas_height) { PgmGlesViewport *glesviewport = glesdrawable->glesviewport; return (canvas_height * glesviewport->projected_h) / glesviewport->canvas_h; } /* Gets the projected width of the drawable on the viewport at z=0 */ static gfloat get_projected_width (PgmGlesDrawable *glesdrawable, gfloat canvas_width) { PgmGlesViewport *glesviewport = glesdrawable->glesviewport; return (canvas_width * glesviewport->projected_w) / glesviewport->canvas_w; } /* Defines texture coordinates */ static void set_coordinates (PgmGlesText *glestext) { PgmGlesTexture *glestexture = glestext->texture; PgmGlesDrawable *glesdrawable = PGM_GLES_DRAWABLE (glestext); PgmText *text = PGM_TEXT (glesdrawable->drawable); gfloat ratio = ((gfloat) glestexture->height / glestexture->height_pot); gfloat offset; if (glestext->multiline == TRUE) offset = 0.0f; else offset = (1.0f - (text->height / glesdrawable->height)) * ratio * -0.5f; glestext->coord[2] = (PgmGlesFloat) glestexture->width / glestexture->width_pot; glestext->coord[4] = glestext->coord[2]; glestext->coord[1] = offset; glestext->coord[3] = glestext->coord[1]; glestext->coord[5] = (PgmGlesFloat) ratio + offset; glestext->coord[7] = glestext->coord[5]; } /* Stores color depending on PgmText color normalizing components to the range * [0.0; 1.0] */ static void set_color (PgmGlesText *glestext) { PgmGlesDrawable *glesdrawable = PGM_GLES_DRAWABLE (glestext); PgmText *text = PGM_TEXT (glesdrawable->drawable); GST_OBJECT_LOCK (text); glestext->color[0] = text->r * INV_255; glestext->color[1] = text->g * INV_255; glestext->color[2] = text->b * INV_255; glestext->color[3] = text->a * INV_255; GST_OBJECT_UNLOCK (text); } /* Stores outline width depending on PgmText outline width converting it * from canvas coordinates to viewport coordinates */ static void set_outline_width (PgmGlesText *glestext) { PgmGlesDrawable *glesdrawable = PGM_GLES_DRAWABLE (glestext); PgmText *text = PGM_TEXT (glesdrawable->drawable); glestext->outline_width = get_projected_height (glesdrawable, text->outline_width); } /* Stores outline color depending on PgmText color normalizing components to * the range [0.0; 1.0] */ static void set_outline_color (PgmGlesText *glestext) { PgmGlesDrawable *glesdrawable = PGM_GLES_DRAWABLE (glestext); PgmText *text = PGM_TEXT (glesdrawable->drawable); GST_OBJECT_LOCK (text); glestext->outline_color[0] = text->outline_r * INV_255; glestext->outline_color[1] = text->outline_g * INV_255; glestext->outline_color[2] = text->outline_b * INV_255; glestext->outline_color[3] = text->outline_a * INV_255; GST_OBJECT_UNLOCK (text); } /* Stores the shadow casting state */ static void set_cast_shadow (PgmGlesText *glestext) { PgmGlesDrawable *glesdrawable = PGM_GLES_DRAWABLE (glestext); PgmText *text = PGM_TEXT (glesdrawable->drawable); GST_OBJECT_LOCK (text); glestext->cast_shadow = text->cast_shadow; GST_OBJECT_UNLOCK (text); } /* Stores the shadow position */ static void set_shadow_position (PgmGlesText *glestext) { PgmGlesDrawable *glesdrawable = PGM_GLES_DRAWABLE (glestext); PgmText *text = PGM_TEXT (glesdrawable->drawable); GST_OBJECT_LOCK (text); if (text->shadow_position & PGM_TEXT_SHADOW_NORTH) glestext->shadow_longitude_factor = -1.0f; else if (text->shadow_position & PGM_TEXT_SHADOW_SOUTH) glestext->shadow_longitude_factor = 1.0f; else glestext->shadow_longitude_factor = 0.0f; if (text->shadow_position & PGM_TEXT_SHADOW_WEST) glestext->shadow_latitude_factor = -1.0f; else if (text->shadow_position & PGM_TEXT_SHADOW_EAST) glestext->shadow_latitude_factor = 1.0f; else glestext->shadow_latitude_factor = 0.0f; GST_OBJECT_UNLOCK (text); } /* Stores shadow color depending on PgmText color normalizing components to the * range [0.0; 1.0] */ static void set_shadow_color (PgmGlesText *glestext) { PgmGlesDrawable *glesdrawable = PGM_GLES_DRAWABLE (glestext); PgmText *text = PGM_TEXT (glesdrawable->drawable); GST_OBJECT_LOCK (text); glestext->shadow_color[0] = text->shadow_r * INV_255; glestext->shadow_color[1] = text->shadow_g * INV_255; glestext->shadow_color[2] = text->shadow_b * INV_255; glestext->shadow_color[3] = text->shadow_a * INV_255; GST_OBJECT_UNLOCK (text); } /* Defines Pango spacing depending on PgmText line spacing converting it * from canvas coordinates to viewport coordinates */ static void set_line_spacing (PgmGlesText *glestext) { PgmGlesDrawable *glesdrawable = PGM_GLES_DRAWABLE (glestext); PgmText *text = PGM_TEXT (glesdrawable->drawable); gfloat line_spacing; line_spacing = get_projected_height (glesdrawable, text->line_spacing); pango_layout_set_spacing (glestext->layout, pgm_lrintf (line_spacing * PANGO_SCALE)); } /* Calculates the maximum total height of a line of text for the current font * and font height set in glestext. Returns the value in device unit. */ static gfloat get_max_height (PgmGlesText *glestext) { /* FIXME: we use the language of the current locale, but the text we display * may be in another language. */ PangoLanguage *language = NULL; PangoFontMetrics *metrics = NULL; gint ascent, descent; gchar *locale = NULL; #ifdef HAVE_PANGO_1_16 language = pango_language_get_default (); #else #ifdef G_OS_WIN32 locale = g_win32_getlocale (); #else locale = g_strdup (setlocale (LC_CTYPE, NULL)); #endif language = pango_language_from_string (locale); #endif metrics = pango_context_get_metrics (glestext->pango_ctx, glestext->desc, language); ascent = pango_font_metrics_get_ascent (metrics); descent = pango_font_metrics_get_descent (metrics); pango_font_metrics_unref (metrics); g_free (locale); return ((ascent + descent) / ((gfloat) PANGO_SCALE)); } /* Defines Pango font size depending on PgmText height converting it from * canvas coordinates to viewport coordinates. This function depends on * various parameters, including the font set for glestext. When setting many * parameters, it is cautious to set this one last. */ static void set_font_height (PgmGlesText *glestext) { PgmGlesDrawable *glesdrawable = PGM_GLES_DRAWABLE (glestext); PgmText *text = PGM_TEXT (glesdrawable->drawable); /* All the heights here are in device unit. */ gfloat requested_height, wanted_height, max_height, font_ratio; /* text->height is a value in canvas space */ requested_height = get_projected_height (glesdrawable, text->height); /* The "pango height" is something like the height of an M, but we want to set * the maximum height of a line, so we need to calculate the ratio first. */ pango_font_description_set_absolute_size (glestext->desc, requested_height * PANGO_SCALE); max_height = get_max_height (glestext); font_ratio = requested_height / max_height; wanted_height = requested_height * font_ratio; pango_font_description_set_absolute_size (glestext->desc, wanted_height * PANGO_SCALE); pango_layout_set_font_description (glestext->layout, glestext->desc); /* Precompute and store the offset to apply to the shadow based on the font * wanted height, the idea is to increase the offset with the font height. */ glestext->shadow_offset = sqrtf (wanted_height / 16.0f); } /* Defines Pango font family depending on PgmText font family */ static void set_font_family (PgmGlesText *glestext) { PgmGlesDrawable *glesdrawable = PGM_GLES_DRAWABLE (glestext); PgmText *text = PGM_TEXT (glesdrawable->drawable); GST_OBJECT_LOCK (text); pango_font_description_set_family (glestext->desc, text->font_family); pango_layout_set_font_description (glestext->layout, glestext->desc); GST_OBJECT_UNLOCK (text); } /* Defines Pango text/markup depending on PgmText label */ static void set_label (PgmGlesText *glestext) { PgmGlesDrawable *glesdrawable = PGM_GLES_DRAWABLE (glestext); PgmText *text = PGM_TEXT (glesdrawable->drawable); /* FIXME: defining a markup and right after a label keeps the * previous markups on the new label. */ GST_OBJECT_LOCK (text); if (text->use_markup) pango_layout_set_markup (glestext->layout, text->label, -1); else pango_layout_set_text (glestext->layout, text->label, -1); GST_OBJECT_UNLOCK (text); } /* Defines Pango width depending on PgmText width */ static void set_width (PgmGlesText *glestext) { PgmGlesDrawable *glesdrawable = PGM_GLES_DRAWABLE (glestext); /* Mutliline mode */ if (glestext->multiline == TRUE) { PgmViewport *viewport = PGM_VIEWPORT (glesdrawable->glesviewport); gfloat non_square_ratio, size; /* Set the correct width */ size = get_projected_width (glesdrawable, glesdrawable->width); GST_OBJECT_LOCK (viewport); non_square_ratio = 1.0f / viewport->pixel_aspect_ratio; GST_OBJECT_UNLOCK (viewport); pango_layout_set_width (glestext->layout, pgm_lrintf (size * PANGO_SCALE * non_square_ratio)); /* Set the correct height */ size = get_projected_height (glesdrawable, glesdrawable->height); pango_layout_set_height (glestext->layout, pgm_lrintf (size * PANGO_SCALE)); } /* Monoline mode */ else { PgmText *text = PGM_TEXT (glesdrawable->drawable); /* If the text needs to be ellipsized, set the correct width */ if (text->ellipsize != PGM_TEXT_ELLIPSIZE_NONE) { PgmViewport *viewport = PGM_VIEWPORT (glesdrawable->glesviewport); gfloat non_square_ratio, width; /* Set the correct width */ width = get_projected_width (glesdrawable, glesdrawable->width); GST_OBJECT_LOCK (viewport); non_square_ratio = 1.0f / viewport->pixel_aspect_ratio; GST_OBJECT_UNLOCK (viewport); pango_layout_set_width (glestext->layout, pgm_lrintf (width * PANGO_SCALE * non_square_ratio)); } /* Otherwise disable the width */ else pango_layout_set_width (glestext->layout, -1); /* Disable the height */ pango_layout_set_height (glestext->layout, -1); } } /* Stores the multiline state */ static void set_multiline (PgmGlesText *glestext) { PgmGlesDrawable *glesdrawable = PGM_GLES_DRAWABLE (glestext); PgmText *text = PGM_TEXT (glesdrawable->drawable); glestext->multiline = text->multiline; } /* Defines Pango justification depending on PgmText justification */ static void set_justify (PgmGlesText *glestext) { #ifdef HAVE_PANGO_1_16 PgmGlesDrawable *glesdrawable = PGM_GLES_DRAWABLE (glestext); PgmText *text = PGM_TEXT (glesdrawable->drawable); GST_OBJECT_LOCK (text); pango_layout_set_justify (glestext->layout, text->justify); GST_OBJECT_UNLOCK (text); #endif /* HAVE_PANGO_1_16 */ } /* Defines Pango weight depending on PgmText weight */ static void set_weight (PgmGlesText *glestext) { PgmGlesDrawable *glesdrawable = PGM_GLES_DRAWABLE (glestext); PgmText *text = PGM_TEXT (glesdrawable->drawable); switch (text->weight) { case PGM_TEXT_WEIGHT_LIGHT: pango_font_description_set_weight (glestext->desc, PANGO_WEIGHT_LIGHT); break; case PGM_TEXT_WEIGHT_NORMAL: pango_font_description_set_weight (glestext->desc, PANGO_WEIGHT_NORMAL); break; case PGM_TEXT_WEIGHT_BOLD: pango_font_description_set_weight (glestext->desc, PANGO_WEIGHT_BOLD); break; default: break; } pango_layout_set_font_description (glestext->layout, glestext->desc); } /* Defines Pango stretching depending on PgmText stretching */ static void set_stretch (PgmGlesText *glestext) { PgmGlesDrawable *glesdrawable = PGM_GLES_DRAWABLE (glestext); PgmText *text = PGM_TEXT (glesdrawable->drawable); switch (text->stretch) { case PGM_TEXT_STRETCH_CONDENSED: pango_font_description_set_stretch (glestext->desc, PANGO_STRETCH_CONDENSED); break; case PGM_TEXT_STRETCH_NORMAL: pango_font_description_set_stretch (glestext->desc, PANGO_STRETCH_NORMAL); break; case PGM_TEXT_STRETCH_EXPANDED: pango_font_description_set_stretch (glestext->desc, PANGO_STRETCH_EXPANDED); break; default: break; } pango_layout_set_font_description (glestext->layout, glestext->desc); } /* Defines Pango alignment depending on PgmText alignment */ static void set_alignment (PgmGlesText *glestext) { PgmGlesDrawable *glesdrawable = PGM_GLES_DRAWABLE (glestext); PgmText *text = PGM_TEXT (glesdrawable->drawable); switch (text->alignment) { case PGM_TEXT_ALIGN_LEFT: pango_layout_set_alignment (glestext->layout, PANGO_ALIGN_LEFT); break; case PGM_TEXT_ALIGN_CENTER: pango_layout_set_alignment (glestext->layout, PANGO_ALIGN_CENTER); break; case PGM_TEXT_ALIGN_RIGHT: pango_layout_set_alignment (glestext->layout, PANGO_ALIGN_RIGHT); break; default: break; } } /* Defines Pango ellipsizing depending on PgmText ellipsizing */ static void set_ellipsize (PgmGlesText *glestext) { PgmGlesDrawable *glesdrawable = PGM_GLES_DRAWABLE (glestext); PgmText *text = PGM_TEXT (glesdrawable->drawable); switch (text->ellipsize) { case PGM_TEXT_ELLIPSIZE_NONE: pango_layout_set_ellipsize (glestext->layout, PANGO_ELLIPSIZE_NONE); break; case PGM_TEXT_ELLIPSIZE_START: pango_layout_set_ellipsize (glestext->layout, PANGO_ELLIPSIZE_START); break; case PGM_TEXT_ELLIPSIZE_MIDDLE: pango_layout_set_ellipsize (glestext->layout, PANGO_ELLIPSIZE_MIDDLE); break; case PGM_TEXT_ELLIPSIZE_END: pango_layout_set_ellipsize (glestext->layout, PANGO_ELLIPSIZE_END); break; default: break; } } /* Defines Pango wrapping depending on PgmText wrapping */ static void set_wrap (PgmGlesText *glestext) { PgmGlesDrawable *glesdrawable = PGM_GLES_DRAWABLE (glestext); PgmText *text = PGM_TEXT (glesdrawable->drawable); switch (text->wrap) { case PGM_TEXT_WRAP_WORD: pango_layout_set_wrap (glestext->layout, PANGO_WRAP_WORD); break; case PGM_TEXT_WRAP_CHAR: pango_layout_set_wrap (glestext->layout, PANGO_WRAP_CHAR); break; case PGM_TEXT_WRAP_WORD_CHAR: pango_layout_set_wrap (glestext->layout, PANGO_WRAP_WORD_CHAR); break; default: break; } } /* Defines Pango gravity depending on PgmText gravity */ static void set_gravity (PgmGlesText *glestext) { #ifdef HAVE_PANGO_1_16 PgmGlesDrawable *glesdrawable = PGM_GLES_DRAWABLE (glestext); PgmText *text = PGM_TEXT (glesdrawable->drawable); switch (text->gravity) { case PGM_TEXT_GRAVITY_SOUTH: pango_context_set_base_gravity (glestext->pango_ctx, PANGO_GRAVITY_SOUTH); break; case PGM_TEXT_GRAVITY_EAST: pango_context_set_base_gravity (glestext->pango_ctx, PANGO_GRAVITY_EAST); break; case PGM_TEXT_GRAVITY_NORTH: pango_context_set_base_gravity (glestext->pango_ctx, PANGO_GRAVITY_NORTH); break; case PGM_TEXT_GRAVITY_WEST: pango_context_set_base_gravity (glestext->pango_ctx, PANGO_GRAVITY_WEST); break; case PGM_TEXT_GRAVITY_AUTO: pango_context_set_base_gravity (glestext->pango_ctx, PANGO_GRAVITY_AUTO); break; default: break; } #endif /* HAVE_PANGO_1_16 */ } /* Defines Pango style depending on PgmText style */ static void set_style (PgmGlesText *glestext) { PgmGlesDrawable *glesdrawable = PGM_GLES_DRAWABLE (glestext); PgmText *text = PGM_TEXT (glesdrawable->drawable); switch (text->style) { case PGM_TEXT_STYLE_NORMAL: pango_font_description_set_style (glestext->desc, PANGO_STYLE_NORMAL); break; case PGM_TEXT_STYLE_OBLIQUE: pango_font_description_set_style (glestext->desc, PANGO_STYLE_OBLIQUE); break; case PGM_TEXT_STYLE_ITALIC: pango_font_description_set_style (glestext->desc, PANGO_STYLE_ITALIC); break; default: break; } pango_layout_set_font_description (glestext->layout, glestext->desc); } /* Defines Pango variant depending on PgmText variant */ static void set_variant (PgmGlesText *glestext) { PgmGlesDrawable *glesdrawable = PGM_GLES_DRAWABLE (glestext); PgmText *text = PGM_TEXT (glesdrawable->drawable); switch (text->variant) { case PGM_TEXT_VARIANT_NORMAL: pango_font_description_set_variant (glestext->desc, PANGO_VARIANT_NORMAL); break; case PGM_TEXT_VARIANT_SMALL_CAPS: pango_font_description_set_variant (glestext->desc, PANGO_VARIANT_SMALL_CAPS); break; default: break; } pango_layout_set_font_description (glestext->layout, glestext->desc); } /* Update all the properties of the text */ static void update_properties (PgmGlesText *glestext) { set_font_family (glestext); set_weight (glestext); set_stretch (glestext); set_style (glestext); set_variant (glestext); set_alignment (glestext); set_ellipsize (glestext); set_justify (glestext); set_multiline (glestext); set_line_spacing (glestext); set_width (glestext); set_coordinates (glestext); set_wrap (glestext); set_gravity (glestext); set_label (glestext); set_color (glestext); set_outline_width (glestext); set_outline_color (glestext); set_cast_shadow (glestext); set_shadow_position (glestext); set_shadow_color (glestext); set_font_height (glestext); } /* Cairo uses a premultiplied alpha blending function, pigment's not. This * function unpremultiplies the alpha of cairo's native endian ARGB buffer and * converts it to BGRA in memory order. */ static void unpremultiply_alpha (guint32 *buffer, guint32 width, guint32 height) { guint32 size = width * height; guint32 a, r, g, b; guint32 i; for (i = 0; i < size; i++) { a = (buffer[i] & ARGB_A_MASK) >> ARGB_A_OFFSET; if (a == 0) /* optimisation for most common case */ { continue; } else if (a == 255) { /* If the pixel is full alpha, we don't have to change the rgb values, * but we have to convert the pixel from native endian ARGB to memory * BGRA, which is equivalent to little endian ARGB. */ buffer[i] = GUINT32_TO_LE (buffer[i]); } else { r = (((buffer[i] & ARGB_R_MASK) >> ARGB_R_OFFSET) * 255 + a / 2) / a; g = (((buffer[i] & ARGB_G_MASK) >> ARGB_G_OFFSET) * 255 + a / 2) / a; b = (((buffer[i] & ARGB_B_MASK) >> ARGB_B_OFFSET) * 255 + a / 2) / a; /* we write the buffer in BGRA memory order (B in low address, A in * high address) in one memory access */ buffer[i] = b << BYTE_1_OFFSET | g << BYTE_2_OFFSET | r << BYTE_3_OFFSET | a << BYTE_4_OFFSET; } } } /* Allocates the pixmap, the Pango pipeline using a Cairo backend and * generates the texture */ static void create_pixmap (PgmGlesText *glestext) { PgmGlesDrawable *glesdrawable = PGM_GLES_DRAWABLE (glestext); PgmViewport *viewport = PGM_VIEWPORT (glesdrawable->glesviewport); PgmGlesContextTask *task; gfloat sx, sy; /* It's important here to round the floating-point value returned by * get_projected_* using the default "to nearest" rounding mode of the FPU and * not the "truncate" mode implied by the float-to-int cast. It's faster and * allows to get the exact rasterized size required to have a direct texel to * pixel mapping. */ glestext->width = MAX (1, pgm_lrintf (get_projected_width (glesdrawable, glesdrawable->width))); glestext->height = MAX (1, pgm_lrintf (get_projected_height (glesdrawable, glesdrawable->height))); GST_OBJECT_LOCK (viewport); if (viewport->rotation == PGM_VIEWPORT_ROTATION_NONE || viewport->rotation == PGM_VIEWPORT_ROTATION_180) { sx = viewport->pixel_aspect_ratio; sy = 1.0f; } else { sx = 1.0f; sy = viewport->pixel_aspect_ratio; } GST_OBJECT_UNLOCK (viewport); glestext->size = glestext->width * glestext->height * 4; glestext->buffer = (guchar *) g_slice_alloc0 (glestext->size); if (glestext->buffer == NULL) { GST_WARNING_OBJECT (glestext, "Unable to allocate %d bytes", glestext->size); return; } glestext->surface = cairo_image_surface_create_for_data (glestext->buffer, CAIRO_FORMAT_ARGB32, glestext->width, glestext->height, glestext->width * 4); glestext->cairo_ctx = cairo_create (glestext->surface); g_assert (glestext->cairo_ctx != NULL); cairo_set_font_options (glestext->cairo_ctx, glestext->font_options); cairo_scale (glestext->cairo_ctx, sx, sy); glestext->layout = pango_cairo_create_layout (glestext->cairo_ctx); g_assert (glestext->layout != NULL); glestext->pango_ctx = pango_layout_get_context (glestext->layout); g_assert (glestext->pango_ctx != NULL); pgm_gles_texture_set_buffer (glestext->texture, glestext->buffer, PGM_IMAGE_RGBA, glestext->width, glestext->height, glestext->size, 0, TRUE); set_coordinates (glestext); /* And request a texture generation */ task = pgm_gles_context_task_new (PGM_GLES_CONTEXT_GEN_TEXTURE, glestext->texture); pgm_gles_context_push_immediate_task (glesdrawable->glesviewport->context, task); } /* Frees the pixmap and the Cairo backend */ static void free_pixmap (PgmGlesText *glestext) { PgmGlesDrawable *glesdrawable = PGM_GLES_DRAWABLE (glestext); PgmGlesContextTask *task; g_object_unref (glestext->layout); glestext->layout = NULL; cairo_destroy (glestext->cairo_ctx); glestext->cairo_ctx = NULL; cairo_surface_destroy (glestext->surface); glestext->surface = NULL; if (glestext->buffer) { g_slice_free1 (glestext->size, (gpointer) glestext->buffer); glestext->buffer = NULL; } /* Request texture clean up */ task = pgm_gles_context_task_new (PGM_GLES_CONTEXT_CLEAN_TEXTURE, glestext->texture); pgm_gles_context_push_immediate_task (glesdrawable->glesviewport->context, task); } /* Updates text properties and draw it on the pixmap */ static void update_pixmap (PgmGlesText *glestext) { PgmGlesDrawable *glesdrawable = PGM_GLES_DRAWABLE (glestext); PgmGlesContextTask *task; /* Clear the surface */ g_assert (glestext->cairo_ctx != NULL); cairo_set_operator (glestext->cairo_ctx, CAIRO_OPERATOR_SOURCE); cairo_set_source_rgba (glestext->cairo_ctx, 0.0f, 0.0f, 0.0f, 0.0f); cairo_paint (glestext->cairo_ctx); /* Draw the text without shadow */ if (!glestext->cast_shadow) { cairo_set_source_rgba (glestext->cairo_ctx, glestext->color[0], glestext->color[1], glestext->color[2], glestext->color[3]); pango_cairo_show_layout (glestext->cairo_ctx, glestext->layout); } /* Draw the text with a shadow */ else { gdouble tx = glestext->shadow_offset * glestext->shadow_latitude_factor; gdouble ty = glestext->shadow_offset * glestext->shadow_longitude_factor; cairo_set_source_rgba (glestext->cairo_ctx, glestext->shadow_color[0], glestext->shadow_color[1], glestext->shadow_color[2], glestext->shadow_color[3]); cairo_save (glestext->cairo_ctx); cairo_translate (glestext->cairo_ctx, tx, ty); pango_cairo_show_layout (glestext->cairo_ctx, glestext->layout); cairo_translate (glestext->cairo_ctx, -tx, -ty); cairo_set_source_rgba (glestext->cairo_ctx, glestext->color[0], glestext->color[1], glestext->color[2], glestext->color[3]); pango_cairo_show_layout (glestext->cairo_ctx, glestext->layout); } /* And the stroke */ if (glestext->outline_width > 0.0f) { pango_cairo_layout_path (glestext->cairo_ctx, glestext->layout); cairo_set_source_rgba (glestext->cairo_ctx, glestext->outline_color[0], glestext->outline_color[1], glestext->outline_color[2], glestext->outline_color[3]); cairo_set_line_width (glestext->cairo_ctx, glestext->outline_width); cairo_stroke (glestext->cairo_ctx); } #if 0 /* Debugging */ #ifndef WIN32 cairo_surface_write_to_png (glestext->surface, "/tmp/pgmglestext.png"); #else cairo_surface_write_to_png (glestext->surface, "C:\\pgmglestext.png"); #endif /* WIN32 */ #endif /* Get rid of the premultiplied alpha */ unpremultiply_alpha ((guint32*) glestext->buffer, glestext->width, glestext->height); /* Update texture */ pgm_gles_texture_set_buffer (glestext->texture, glestext->buffer, PGM_IMAGE_BGRA, glestext->width, glestext->height, glestext->size, 0, TRUE); /* Request texture upload */ task = pgm_gles_context_task_new (PGM_GLES_CONTEXT_UPLOAD_TEXTURE, glestext->texture); pgm_gles_context_push_deferred_task (glesdrawable->glesviewport->context, task); } /* Do a complete regeneration of a text */ static void regenerate_text (PgmGlesText *glestext) { free_pixmap (glestext); create_pixmap (glestext); update_properties (glestext); update_pixmap (glestext); } /* Update a text by simply generating the new one in the current allocated * memory if the size has not changed. If it has changed, the whole text is * regenerated. */ static void update_text (PgmGlesText *glestext) { if (!glestext->size_updated) update_pixmap (glestext); else { glestext->size_updated = FALSE; regenerate_text (glestext); } } /* PgmGlesDrawable methods */ static void pgm_gles_text_draw (PgmGlesDrawable *glesdrawable) { static PgmGlesUshort indices[] = { 0, 1, 2, 2, 3, 0 }; PgmGlesText *glestext = PGM_GLES_TEXT (glesdrawable); /* Only draw if it's visible */ if (glestext->fg_color[3] != 0.0f) { PgmGlesContextProcAddress *gles = glesdrawable->glesviewport->context->gles; pgm_gles_texture_bind (glestext->texture); gles->enable_client_state (PGM_GLES_VERTEX_ARRAY); gles->enable_client_state (PGM_GLES_COLOR_ARRAY); gles->enable_client_state (PGM_GLES_TEXTURE_COORD_ARRAY); gles->vertex_pointer (3, PGM_GLES_FLOAT, 0, glestext->vertex); gles->color_pointer (4, PGM_GLES_FLOAT, 0, glestext->fg_color); gles->tex_coord_pointer (2, PGM_GLES_FLOAT, 0, glestext->coord); gles->draw_elements (PGM_GLES_TRIANGLES, 6, PGM_GLES_UNSIGNED_SHORT, indices); gles->disable_client_state (PGM_GLES_VERTEX_ARRAY); gles->disable_client_state (PGM_GLES_COLOR_ARRAY); gles->disable_client_state (PGM_GLES_TEXTURE_COORD_ARRAY); pgm_gles_texture_unbind (glestext->texture); } } static void pgm_gles_text_regenerate (PgmGlesDrawable *glesdrawable) { PgmGlesText *glestext = PGM_GLES_TEXT (glesdrawable); if (glestext->size_updated) { regenerate_text (glestext); glestext->size_updated = FALSE; } } static void pgm_gles_text_update_projection (PgmGlesDrawable *glesdrawable) { PgmGlesText *glestext = PGM_GLES_TEXT (glesdrawable); glestext->size_updated = TRUE; } static void pgm_gles_text_set_size (PgmGlesDrawable *glesdrawable) { PgmGlesText *glestext = PGM_GLES_TEXT (glesdrawable); guint32 i; for (i = 0; i < 12; i++) glestext->vertex[i] = glesdrawable->bg_vertex[i]; glestext->size_updated = TRUE; } static void pgm_gles_text_set_position (PgmGlesDrawable *glesdrawable) { PgmGlesText *glestext = PGM_GLES_TEXT (glesdrawable); guint i; for (i = 0; i < 12; i++) glestext->vertex[i] = glesdrawable->bg_vertex[i]; } static void pgm_gles_text_set_fg_color (PgmGlesDrawable *glesdrawable) { PgmGlesText *glestext = PGM_GLES_TEXT (glesdrawable); PgmGlesFloat *fg_color = glestext->fg_color; PgmDrawable *drawable; PgmGlesFloat color[4]; drawable = glesdrawable->drawable; color[0] = drawable->fg_r * INV_255; color[1] = drawable->fg_g * INV_255; color[2] = drawable->fg_b * INV_255; color[3] = drawable->fg_a * drawable->opacity * INV_255; GST_OBJECT_LOCK (drawable); fg_color[0] = color[0]; fg_color[1] = color[1]; fg_color[2] = color[2]; fg_color[3] = color[3]; fg_color[4] = color[0]; fg_color[5] = color[1]; fg_color[6] = color[2]; fg_color[7] = color[3]; fg_color[8] = color[0]; fg_color[9] = color[1]; fg_color[10] = color[2]; fg_color[11] = color[3]; fg_color[12] = color[0]; fg_color[13] = color[1]; fg_color[14] = color[2]; fg_color[15] = color[3]; GST_OBJECT_UNLOCK (drawable); } static void pgm_gles_text_set_opacity (PgmGlesDrawable *glesdrawable) { PgmGlesText *glestext = PGM_GLES_TEXT (glesdrawable); PgmDrawable *drawable; PgmGlesFloat alpha; drawable = glesdrawable->drawable; alpha = drawable->fg_a * drawable->opacity * SQR_INV_255; GST_OBJECT_LOCK (drawable); glestext->fg_color[3] = alpha; glestext->fg_color[7] = alpha; glestext->fg_color[11] = alpha; glestext->fg_color[15] = alpha; GST_OBJECT_UNLOCK (drawable); } static void pgm_gles_text_sync (PgmGlesDrawable *glesdrawable) { PgmGlesText *glestext = PGM_GLES_TEXT (glesdrawable); create_pixmap (glestext); update_properties (glestext); /* Synchronize various other properties */ pgm_gles_text_set_position (glesdrawable); pgm_gles_text_set_fg_color (glesdrawable); update_pixmap (glestext); } /* GObject stuff */ PGM_DEFINE_DYNAMIC_TYPE (PgmGlesText, pgm_gles_text, PGM_TYPE_GLES_DRAWABLE) void pgm_gles_text_register (GTypeModule *module) { pgm_gles_text_register_type (module); } static void pgm_gles_text_dispose (GObject *object) { PgmGlesDrawable *glesdrawable = PGM_GLES_DRAWABLE (object); PgmGlesText *glestext = PGM_GLES_TEXT (object); PgmGlesContextTask *task; free_pixmap (glestext); pango_font_description_free (glestext->desc); glestext->desc = NULL; cairo_font_options_destroy (glestext->font_options); glestext->font_options = NULL; gst_object_unref (glesdrawable->drawable); pgm_gles_context_remove_tasks_with_data (glesdrawable->glesviewport->context, glestext->texture); task = pgm_gles_context_task_new (PGM_GLES_CONTEXT_FREE_TEXTURE, glestext->texture); pgm_gles_context_push_immediate_task (glesdrawable->glesviewport->context, task); glestext->texture = NULL; GST_CALL_PARENT (G_OBJECT_CLASS, dispose, (object)); } static void pgm_gles_text_class_init (PgmGlesTextClass *klass) { GObjectClass *gobject_class; PgmGlesDrawableClass *glesdrawable_class; GST_DEBUG_CATEGORY_INIT (pgm_gles_text_debug, "pgm_gles_text", 0, "OpenGL ES plugin: PgmGlesText"); parent_class = g_type_class_peek_parent (klass); gobject_class = G_OBJECT_CLASS (klass); glesdrawable_class = PGM_GLES_DRAWABLE_CLASS (klass); /* GObject virtual table */ gobject_class->dispose = GST_DEBUG_FUNCPTR (pgm_gles_text_dispose); /* PgmGlesDrawable virtual table */ glesdrawable_class->sync = GST_DEBUG_FUNCPTR (pgm_gles_text_sync); glesdrawable_class->draw = GST_DEBUG_FUNCPTR (pgm_gles_text_draw); glesdrawable_class->regenerate = GST_DEBUG_FUNCPTR (pgm_gles_text_regenerate); glesdrawable_class->update_projection = GST_DEBUG_FUNCPTR (pgm_gles_text_update_projection); glesdrawable_class->set_size = GST_DEBUG_FUNCPTR (pgm_gles_text_set_size); glesdrawable_class->set_position = GST_DEBUG_FUNCPTR (pgm_gles_text_set_position); glesdrawable_class->set_fg_color = GST_DEBUG_FUNCPTR (pgm_gles_text_set_fg_color); glesdrawable_class->set_opacity = GST_DEBUG_FUNCPTR (pgm_gles_text_set_opacity); } static void pgm_gles_text_class_finalize (PgmGlesTextClass *klass) { return; } static void pgm_gles_text_init (PgmGlesText *glestext) { glestext->font_options = cairo_font_options_create (); cairo_font_options_set_antialias (glestext->font_options, CAIRO_ANTIALIAS_SUBPIXEL); glestext->multiline = TRUE; glestext->desc = pango_font_description_new (); /* glestext->size_updated = FALSE; */ } /* Public methods */ PgmGlesDrawable * pgm_gles_text_new (PgmDrawable *drawable, PgmGlesViewport *glesviewport) { PgmGlesDrawable *glesdrawable; PgmGlesText *glestext; glestext = g_object_new (PGM_TYPE_GLES_TEXT, NULL); GST_DEBUG_OBJECT (glestext, "created new glestext"); glestext->texture = pgm_gles_texture_new (glesviewport->context); glestext->texture->filter = PGM_GLES_NEAREST; glesdrawable = PGM_GLES_DRAWABLE (glestext); glesdrawable->drawable = gst_object_ref (drawable); glesdrawable->glesviewport = glesviewport; pgm_gles_viewport_connect_changed_callback (glesviewport, glesdrawable); pgm_gles_drawable_sync (glesdrawable); return glesdrawable; } void pgm_gles_text_set_label (PgmGlesText *glestext) { set_label (glestext); update_text (glestext); } void pgm_gles_text_set_markup (PgmGlesText *glestext) { set_label (glestext); update_text (glestext); } void pgm_gles_text_set_font_family (PgmGlesText *glestext) { set_font_family (glestext); update_text (glestext); } void pgm_gles_text_set_font_height (PgmGlesText *glestext) { set_font_height (glestext); update_text (glestext); } void pgm_gles_text_set_ellipsize (PgmGlesText *glestext) { set_ellipsize (glestext); set_width (glestext); set_coordinates (glestext); update_text (glestext); } void pgm_gles_text_set_justify (PgmGlesText *glestext) { set_justify (glestext); update_text (glestext); } void pgm_gles_text_set_alignment (PgmGlesText *glestext) { set_alignment (glestext); update_text (glestext); } void pgm_gles_text_set_wrap (PgmGlesText *glestext) { set_wrap (glestext); update_text (glestext); } void pgm_gles_text_set_gravity (PgmGlesText *glestext) { set_gravity (glestext); update_text (glestext); } void pgm_gles_text_set_stretch (PgmGlesText *glestext) { set_stretch (glestext); update_text (glestext); } void pgm_gles_text_set_style (PgmGlesText *glestext) { set_style (glestext); update_text (glestext); } void pgm_gles_text_set_variant (PgmGlesText *glestext) { set_variant (glestext); update_text (glestext); } void pgm_gles_text_set_weight (PgmGlesText *glestext) { set_weight (glestext); update_text (glestext); } void pgm_gles_text_set_multiline (PgmGlesText *glestext) { set_multiline (glestext); set_width (glestext); set_coordinates (glestext); update_text (glestext); } void pgm_gles_text_set_line_spacing (PgmGlesText *glestext) { set_line_spacing (glestext); update_text (glestext); } void pgm_gles_text_set_color (PgmGlesText *glestext) { set_color (glestext); update_text (glestext); } void pgm_gles_text_set_outline_color (PgmGlesText *glestext) { set_outline_color (glestext); update_text (glestext); } void pgm_gles_text_set_outline_width (PgmGlesText *glestext) { set_outline_width (glestext); update_text (glestext); } void pgm_gles_text_set_cast_shadow (PgmGlesText *glestext) { set_cast_shadow (glestext); update_text (glestext); } void pgm_gles_text_set_shadow_position (PgmGlesText *glestext) { set_shadow_position (glestext); update_text (glestext); } void pgm_gles_text_set_shadow_color (PgmGlesText *glestext) { set_shadow_color (glestext); update_text (glestext); } pigment-0.3.17/plugins/opengles/pgmglesdrawable.c0000644000175000017500000002610011205034416016762 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment OpenGL ES-CM 1.1 plugin * * Copyright © 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include "pgmglesdrawable.h" GST_DEBUG_CATEGORY_STATIC (pgm_gles_drawable_debug); #define GST_CAT_DEFAULT pgm_gles_drawable_debug static GstObjectClass *parent_class = NULL; /* Private methods */ /* Update the position of the duplicated GL drawable. Since these values are accessed quite often, storing it in the GL drawable avoids putting locks on the generic drawable. */ static void update_position (PgmGlesDrawable *glesdrawable) { PgmDrawable *drawable = glesdrawable->drawable; GST_OBJECT_LOCK (drawable); glesdrawable->x = drawable->x; glesdrawable->y = drawable->y; glesdrawable->z = drawable->z; GST_OBJECT_UNLOCK (drawable); } /* Update the size of the duplicated GL drawable. Since these values are accessed quite often, storing it in the GL drawable avoids putting locks on the generic drawable. */ static void update_size (PgmGlesDrawable *glesdrawable) { PgmDrawable *drawable = glesdrawable->drawable; GST_OBJECT_LOCK (drawable); glesdrawable->width = drawable->width; glesdrawable->height = drawable->height; GST_OBJECT_UNLOCK (drawable); } /* GObject stuff */ PGM_DEFINE_DYNAMIC_TYPE_EXTENDED (PgmGlesDrawable, pgm_gles_drawable, GST_TYPE_OBJECT, G_TYPE_FLAG_ABSTRACT, {}) void pgm_gles_drawable_register (GTypeModule *module) { pgm_gles_drawable_register_type (module); } static void pgm_gles_drawable_dispose (GObject *object) { PgmGlesDrawable *glesdrawable = PGM_GLES_DRAWABLE (object); glesdrawable->drawable = NULL; glesdrawable->glesviewport = NULL; if (glesdrawable->transformation_matrix) pgm_mat4x4_free (glesdrawable->transformation_matrix); GST_CALL_PARENT (G_OBJECT_CLASS, dispose, (object)); } static void pgm_gles_drawable_class_init (PgmGlesDrawableClass *klass) { GObjectClass *gobject_class; GST_DEBUG_CATEGORY_INIT (pgm_gles_drawable_debug, "pgm_gles_drawable", 0, "OpenGL ES plugin: PgmGlesDrawable"); parent_class = g_type_class_peek_parent (klass); gobject_class = G_OBJECT_CLASS (klass); /* GObject virtual table */ gobject_class->dispose = GST_DEBUG_FUNCPTR (pgm_gles_drawable_dispose); } static void pgm_gles_drawable_class_finalize (PgmGlesDrawableClass *klass) { return; } static void pgm_gles_drawable_init (PgmGlesDrawable *glesdrawable) { /* glesdrawable->drawable = NULL; */ /* glesdrawable->glesviewport = NULL; */ /* glesdrawable->transformation_matrix = NULL; */ } /* Public methods */ void pgm_gles_drawable_sync (PgmGlesDrawable *glesdrawable) { PgmGlesDrawableClass *klass; g_return_if_fail (PGM_IS_GLES_DRAWABLE (glesdrawable)); update_size (glesdrawable); pgm_gles_drawable_set_position (glesdrawable); pgm_gles_drawable_set_bg_color (glesdrawable); pgm_gles_drawable_set_transformation_matrix (glesdrawable); klass = PGM_GLES_DRAWABLE_GET_CLASS (glesdrawable); if (klass->sync) klass->sync (glesdrawable); } void pgm_gles_drawable_draw (PgmGlesDrawable *glesdrawable) { static PgmGlesUshort indices[] = { 0, 1, 2, 2, 3, 0 }; PgmGlesDrawableClass *klass; PgmDrawable *drawable; PgmGlesContextProcAddress *gles; gboolean visible; g_return_if_fail (PGM_IS_GLES_DRAWABLE (glesdrawable)); g_return_if_fail (PGM_IS_DRAWABLE (glesdrawable->drawable)); drawable = glesdrawable->drawable; /* Don't draw if not visible, or if the opacity is 0 */ GST_OBJECT_LOCK (drawable); visible = (GST_OBJECT_FLAG_IS_SET (drawable, PGM_DRAWABLE_FLAG_VISIBLE)); if (visible) visible = drawable->opacity; GST_OBJECT_UNLOCK (drawable); if (!visible) return; gles = glesdrawable->glesviewport->context->gles; /* Push and set the modelview matrix for the drawable if needed */ if (!(glesdrawable->flags & PGM_GLES_DRAWABLE_IDENTITY_MATRIX)) { gles->push_matrix (); gles->load_matrix_f (glesdrawable->transformation_matrix->m); } /* Batch background array if it's visible */ if (glesdrawable->bg_color[3] != 0.0f) { gles->bind_texture (PGM_GLES_TEXTURE_2D, 0); gles->enable_client_state (PGM_GLES_VERTEX_ARRAY); gles->vertex_pointer (3, PGM_GLES_FLOAT, 0, glesdrawable->bg_vertex); gles->enable_client_state (PGM_GLES_COLOR_ARRAY); gles->color_pointer (4, PGM_GLES_FLOAT, 0, glesdrawable->bg_color); gles->draw_elements (PGM_GLES_TRIANGLES, 6, PGM_GLES_UNSIGNED_SHORT, indices); gles->disable_client_state (PGM_GLES_VERTEX_ARRAY); gles->disable_client_state (PGM_GLES_COLOR_ARRAY); } klass = PGM_GLES_DRAWABLE_GET_CLASS (glesdrawable); if (klass && klass->draw) klass->draw (glesdrawable); /* Pop the modelview matrix if needed */ if (!(glesdrawable->flags & PGM_GLES_DRAWABLE_IDENTITY_MATRIX)) gles->pop_matrix (); } void pgm_gles_drawable_regenerate (PgmGlesDrawable *glesdrawable) { PgmGlesDrawableClass *klass; g_return_if_fail (PGM_IS_GLES_DRAWABLE (glesdrawable)); klass = PGM_GLES_DRAWABLE_GET_CLASS (glesdrawable); if (klass->regenerate) klass->regenerate (glesdrawable); } void pgm_gles_drawable_update_projection (PgmGlesDrawable *glesdrawable) { PgmGlesDrawableClass *klass; g_return_if_fail (PGM_IS_GLES_DRAWABLE (glesdrawable)); pgm_gles_drawable_set_position (glesdrawable); pgm_gles_drawable_set_size (glesdrawable); klass = PGM_GLES_DRAWABLE_GET_CLASS (glesdrawable); if (klass->update_projection) klass->update_projection (glesdrawable); } void pgm_gles_drawable_set_visibility (PgmGlesDrawable *glesdrawable) { PgmGlesDrawableClass *klass; g_return_if_fail (PGM_IS_GLES_DRAWABLE (glesdrawable)); klass = PGM_GLES_DRAWABLE_GET_CLASS (glesdrawable); if (klass->set_visibility) klass->set_visibility (glesdrawable); } void pgm_gles_drawable_set_size (PgmGlesDrawable *glesdrawable) { PgmGlesDrawableClass *klass; g_return_if_fail (PGM_IS_GLES_DRAWABLE (glesdrawable)); update_size (glesdrawable); glesdrawable->bg_vertex[3] = glesdrawable->bg_vertex[0] + glesdrawable->width; glesdrawable->bg_vertex[6] = glesdrawable->bg_vertex[9] + glesdrawable->width; glesdrawable->bg_vertex[10] = glesdrawable->bg_vertex[1] + glesdrawable->height; glesdrawable->bg_vertex[7] = glesdrawable->bg_vertex[4] + glesdrawable->height; klass = PGM_GLES_DRAWABLE_GET_CLASS (glesdrawable); if (klass->set_size) klass->set_size (glesdrawable); } void pgm_gles_drawable_set_position (PgmGlesDrawable *glesdrawable) { PgmGlesDrawableClass *klass; g_return_if_fail (PGM_IS_GLES_DRAWABLE (glesdrawable)); update_position (glesdrawable); glesdrawable->bg_vertex[0] = glesdrawable->x; glesdrawable->bg_vertex[1] = glesdrawable->y; glesdrawable->bg_vertex[2] = glesdrawable->z; glesdrawable->bg_vertex[3] = glesdrawable->x + glesdrawable->width; glesdrawable->bg_vertex[4] = glesdrawable->y; glesdrawable->bg_vertex[5] = glesdrawable->z; glesdrawable->bg_vertex[6] = glesdrawable->x + glesdrawable->width; glesdrawable->bg_vertex[7] = glesdrawable->y + glesdrawable->height; glesdrawable->bg_vertex[8] = glesdrawable->z; glesdrawable->bg_vertex[9] = glesdrawable->x; glesdrawable->bg_vertex[10] = glesdrawable->y + glesdrawable->height; glesdrawable->bg_vertex[11] = glesdrawable->z; klass = PGM_GLES_DRAWABLE_GET_CLASS (glesdrawable); if (klass->set_position) klass->set_position (glesdrawable); } void pgm_gles_drawable_set_transformation_matrix (PgmGlesDrawable *glesdrawable) { PgmDrawable *drawable = glesdrawable->drawable; PgmGlesDrawableClass *klass; PgmMat4x4 matrix; g_return_if_fail (PGM_IS_GLES_DRAWABLE (glesdrawable)); klass = PGM_GLES_DRAWABLE_GET_CLASS (glesdrawable); /* Store the matrix */ GST_OBJECT_LOCK (drawable); pgm_mat4x4_set_from_mat4x4 (&matrix, drawable->transformation_matrix); GST_OBJECT_UNLOCK (drawable); glesdrawable->transformation_matrix = pgm_mat4x4_transpose (&matrix); /* Check identity so that we can avoid pushing the matrix at rendering */ if (G_UNLIKELY (pgm_mat4x4_is_identity (glesdrawable->transformation_matrix))) glesdrawable->flags |= PGM_GLES_DRAWABLE_IDENTITY_MATRIX; else glesdrawable->flags &= ~PGM_GLES_DRAWABLE_IDENTITY_MATRIX; if (klass->set_transformation_matrix) klass->set_transformation_matrix (glesdrawable); } void pgm_gles_drawable_set_fg_color (PgmGlesDrawable *glesdrawable) { PgmGlesDrawableClass *klass; g_return_if_fail (PGM_IS_GLES_DRAWABLE (glesdrawable)); klass = PGM_GLES_DRAWABLE_GET_CLASS (glesdrawable); if (klass->set_fg_color) klass->set_fg_color (glesdrawable); } void pgm_gles_drawable_set_bg_color (PgmGlesDrawable *glesdrawable) { PgmGlesFloat *bg_color = glesdrawable->bg_color; PgmGlesDrawableClass *klass; PgmDrawable *drawable; PgmGlesFloat color[4]; g_return_if_fail (PGM_IS_GLES_DRAWABLE (glesdrawable)); drawable = glesdrawable->drawable; color[0] = drawable->bg_r * INV_255; color[1] = drawable->bg_g * INV_255; color[2] = drawable->bg_b * INV_255; color[3] = drawable->bg_a * drawable->opacity * INV_255; GST_OBJECT_LOCK (drawable); bg_color[0] = color[0]; bg_color[1] = color[1]; bg_color[2] = color[2]; bg_color[3] = color[3]; bg_color[4] = color[0]; bg_color[5] = color[1]; bg_color[6] = color[2]; bg_color[7] = color[3]; bg_color[8] = color[0]; bg_color[9] = color[1]; bg_color[10] = color[2]; bg_color[11] = color[3]; bg_color[12] = color[0]; bg_color[13] = color[1]; bg_color[14] = color[2]; bg_color[15] = color[3]; GST_OBJECT_UNLOCK (drawable); klass = PGM_GLES_DRAWABLE_GET_CLASS (glesdrawable); if (klass->set_bg_color) klass->set_bg_color (glesdrawable); } void pgm_gles_drawable_set_opacity (PgmGlesDrawable *glesdrawable) { PgmGlesFloat *bg_color = glesdrawable->bg_color; PgmGlesDrawableClass *klass; PgmDrawable *drawable; PgmGlesFloat alpha; g_return_if_fail (PGM_IS_GLES_DRAWABLE (glesdrawable)); klass = PGM_GLES_DRAWABLE_GET_CLASS (glesdrawable); drawable = glesdrawable->drawable; alpha = drawable->bg_a * drawable->opacity * SQR_INV_255; GST_OBJECT_LOCK (drawable); bg_color[3] = alpha; bg_color[7] = alpha; bg_color[11] = alpha; bg_color[15] = alpha; GST_OBJECT_UNLOCK (drawable); if (klass->set_opacity) klass->set_opacity (glesdrawable); } pigment-0.3.17/plugins/opengles/pgmglestexture.c0000644000175000017500000003320111205034416016701 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment OpenGL ES-CM 1.1 plugin * * Copyright © 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ /* * Object used to handle the OpenGL ES texturing. * * FIXME: The behaviour is currently undefined if the user sends us an image * with an unsupported color space (ie a pixel format which is not * returned by pgm_viewport_get_pixel_formats). */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include /* memset */ #include "pgmglestexture.h" GST_DEBUG_CATEGORY_EXTERN (pgm_gles_debug); #define GST_CAT_DEFAULT pgm_gles_debug /* Keep track of the context and OpenGL procedures */ static const PgmGlesContextProcAddress *gles = NULL; static const PgmGlesContext *glescontext = NULL; /* Private functions */ /* Returns number rounded up to the next power of 2. This is the branch-free * implementation detailed in "Hacker's Delight" by Henry S. Warren, Jr. */ static guint get_upper_power_of_two (guint number) { number = number - 1; number = number | (number >> 1); number = number | (number >> 2); number = number | (number >> 4); number = number | (number >> 8); number = number | (number >> 16); return number + 1; } /* Specifies texture parameters of the currently bound texture */ static void set_texture_parameters (PgmGlesTexture *glestexture) { /* Texture wrapping */ gles->tex_parameter_i (PGM_GLES_TEXTURE_2D, PGM_GLES_TEXTURE_WRAP_S, glestexture->wrap_s); gles->tex_parameter_i (PGM_GLES_TEXTURE_2D, PGM_GLES_TEXTURE_WRAP_T, glestexture->wrap_t); /* Texture filtering */ gles->tex_parameter_i (PGM_GLES_TEXTURE_2D, PGM_GLES_TEXTURE_MIN_FILTER, glestexture->filter); gles->tex_parameter_i (PGM_GLES_TEXTURE_2D, PGM_GLES_TEXTURE_MAG_FILTER, glestexture->filter); } /* */ static void create_texture (PgmGlesTexture *glestexture) { guint8 *pixels = g_malloc0 (glestexture->width_pot * glestexture->height_pot * 4); gles->bind_texture (PGM_GLES_TEXTURE_2D, glestexture->id[0]); gles->tex_image_2d (PGM_GLES_TEXTURE_2D, 0, glestexture->format, glestexture->width_pot, glestexture->height_pot, 0, glestexture->format, PGM_GLES_UNSIGNED_BYTE, pixels); set_texture_parameters (glestexture); g_free (pixels); } /* */ static void upload_texture (PgmGlesTexture *glestexture, void *buffer) { gles->bind_texture (PGM_GLES_TEXTURE_2D, glestexture->id[0]); gles->tex_sub_image_2d (PGM_GLES_TEXTURE_2D, 0, 0, 0, glestexture->width, glestexture->height, glestexture->format, PGM_GLES_UNSIGNED_BYTE, buffer); } /* */ static void update_format (PgmGlesTexture *glestexture, PgmImagePixelFormat csp) { if (csp == PGM_IMAGE_RGB) glestexture->format = PGM_GLES_RGB; else if (csp == PGM_IMAGE_RGBA) glestexture->format = PGM_GLES_RGBA; else if (glescontext->feature_mask & PGM_GLES_FEAT_TEXTURE_FORMAT_BGRA && csp == PGM_IMAGE_BGRA) glestexture->format = PGM_GLES_BGRA; else glestexture->format = -1; } /* Update the normalized size fields */ static void update_normalized_size (PgmGlesTexture *texture) { texture->norm_width = (gfloat) texture->width / texture->width_pot; texture->norm_height = (gfloat) texture->height / texture->height_pot; texture->inv_norm_width = 1.0f / texture->norm_width; texture->inv_norm_height = 1.0f / texture->norm_height; } /* Frees the current stored buffer if any */ static void free_buffer (PgmGlesTexture *glestexture) { switch (glestexture->storage) { case PGM_GLES_TEXTURE_GST_BUFFER: if (glestexture->data.gstbuffer) { gst_buffer_unref (glestexture->data.gstbuffer); glestexture->data.gstbuffer = NULL; } break; case PGM_GLES_TEXTURE_PIXBUF: if (glestexture->data.pixbuf) { gdk_pixbuf_unref (glestexture->data.pixbuf); glestexture->data.pixbuf = NULL; } break; case PGM_GLES_TEXTURE_BUFFER: if (glestexture->data.buffer) { if (!glestexture->shared) g_free (glestexture->data.buffer); glestexture->data.buffer = NULL; } break; default: break; } glestexture->storage = PGM_GLES_TEXTURE_CLEAN; } /* Constructor */ static void init_texture (PgmGlesTexture *glestexture) { /* Content */ glestexture->storage = PGM_GLES_TEXTURE_CLEAN; glestexture->data.gstbuffer = NULL; glestexture->width = -1; glestexture->height = -1; glestexture->width_pot = -1; glestexture->height_pot = -1; glestexture->stride = -1; glestexture->size = -1; glestexture->norm_width = -1.0f; glestexture->norm_height = -1.0f; glestexture->inv_norm_width = -1.0f; glestexture->inv_norm_height = -1.0f; glestexture->format = -1; /* Parameters */ glestexture->matrix = pgm_mat4x4_new_identity (); glestexture->filter = PGM_GLES_LINEAR; glestexture->wrap_s = PGM_GLES_CLAMP_TO_EDGE; glestexture->wrap_t = PGM_GLES_CLAMP_TO_EDGE; /* State flags */ glestexture->flags = PGM_GLES_TEXTURE_IDENTITY_MATRIX; /* Indentifiants */ glestexture->id = NULL; glestexture->shared = 0; } /* Destructor */ static void dispose_texture (PgmGlesTexture *glestexture) { free_buffer (glestexture); if (glestexture->id) pgm_gles_texture_clean (glestexture); pgm_mat4x4_free (glestexture->matrix); glestexture->matrix = NULL; } /* Global pointers initialization */ static void class_init (PgmGlesContext *_glescontext) { glescontext = _glescontext; gles = glescontext->gles; } /* Public functions */ PgmGlesTexture * pgm_gles_texture_new (PgmGlesContext *_glescontext) { PgmGlesTexture *glestexture; /* Initialize the global pointers at first instantiation */ if (G_UNLIKELY (!glescontext)) class_init (_glescontext); /* And instantiate */ glestexture = g_slice_new0 (PgmGlesTexture); init_texture (glestexture); return glestexture; } void pgm_gles_texture_free (PgmGlesTexture *glestexture) { g_return_if_fail (glestexture != NULL); dispose_texture (glestexture); g_slice_free (PgmGlesTexture, glestexture); glestexture = NULL; } void pgm_gles_texture_set_buffer (PgmGlesTexture *glestexture, guchar *buffer, PgmImagePixelFormat csp, guint width, guint height, guint size, guint stride, gboolean share) { free_buffer (glestexture); glestexture->storage = PGM_GLES_TEXTURE_BUFFER; if (share) { glestexture->data.buffer = buffer; glestexture->shared = 1; } else { glestexture->data.buffer = g_memdup (buffer, size); glestexture->shared = 0; } glestexture->width = width; glestexture->height = height; glestexture->stride = stride; glestexture->size = size; glestexture->width_pot = get_upper_power_of_two (width); glestexture->height_pot = get_upper_power_of_two (height); glestexture->csp = csp; update_format (glestexture, csp); update_normalized_size (glestexture); } void pgm_gles_texture_set_pixbuf (PgmGlesTexture *glestexture, GdkPixbuf *pixbuf) { free_buffer (glestexture); glestexture->storage = PGM_GLES_TEXTURE_PIXBUF; glestexture->data.pixbuf = gdk_pixbuf_ref (pixbuf); glestexture->width = gdk_pixbuf_get_width (pixbuf); glestexture->height = gdk_pixbuf_get_height (pixbuf); glestexture->stride = gdk_pixbuf_get_rowstride (pixbuf); glestexture->size = glestexture->stride * glestexture->height; glestexture->width_pot = get_upper_power_of_two (glestexture->width); glestexture->height_pot = get_upper_power_of_two (glestexture->height); if (gdk_pixbuf_get_has_alpha (pixbuf)) glestexture->csp = PGM_IMAGE_RGBA; else glestexture->csp = PGM_IMAGE_RGB; update_format (glestexture, glestexture->csp); update_normalized_size (glestexture); } void pgm_gles_texture_set_gst_buffer (PgmGlesTexture *glestexture, GstBuffer *gstbuffer, PgmImagePixelFormat csp, guint width, guint height, guint stride) { free_buffer (glestexture); glestexture->storage = PGM_GLES_TEXTURE_GST_BUFFER; glestexture->data.gstbuffer = gst_buffer_ref (gstbuffer); glestexture->size = GST_BUFFER_SIZE (gstbuffer); glestexture->width = width; glestexture->width_pot = get_upper_power_of_two (width); glestexture->height = height; glestexture->height_pot = get_upper_power_of_two (height); glestexture->stride = stride; glestexture->csp = csp; update_format (glestexture, csp); update_normalized_size (glestexture); } void pgm_gles_texture_update_gst_buffer (PgmGlesTexture *glestexture, GstBuffer *gstbuffer) { if (glestexture->data.gstbuffer) gst_buffer_unref (glestexture->data.gstbuffer); glestexture->data.gstbuffer = gst_buffer_ref (gstbuffer); glestexture->storage = PGM_GLES_TEXTURE_GST_BUFFER; } void pgm_gles_texture_bind (PgmGlesTexture *glestexture) { g_return_if_fail (glestexture != NULL); if (!glestexture->id) return; gles->bind_texture (PGM_GLES_TEXTURE_2D, glestexture->id[0]); /* Push the current texture matrix, and load our matrix */ if (!(glestexture->flags & PGM_GLES_TEXTURE_IDENTITY_MATRIX)) { gles->matrix_mode (PGM_GLES_TEXTURE); gles->push_matrix (); gles->load_matrix_f (glestexture->matrix->m); gles->matrix_mode (PGM_GLES_MODELVIEW); } } void pgm_gles_texture_unbind (PgmGlesTexture *glestexture) { g_return_if_fail (glestexture != NULL); if (!glestexture->id) return; gles->bind_texture (PGM_GLES_TEXTURE_2D, 0); /* Pop our texture matrix from the stack */ if (!(glestexture->flags & PGM_GLES_TEXTURE_IDENTITY_MATRIX)) { gles->matrix_mode (PGM_GLES_TEXTURE); gles->pop_matrix (); gles->matrix_mode (PGM_GLES_MODELVIEW); } } void pgm_gles_texture_generate (PgmGlesTexture *glestexture) { pgm_gles_texture_clean (glestexture); glestexture->id = g_slice_alloc0 (sizeof (guint)); gles->gen_textures (1, glestexture->id); create_texture (glestexture); } void pgm_gles_texture_clean (PgmGlesTexture *glestexture) { if (glestexture->id) { gles->delete_textures (1, glestexture->id); g_slice_free1 (sizeof (guint), glestexture->id); glestexture->id = NULL; } } void pgm_gles_texture_upload (PgmGlesTexture *glestexture) { void *buffer; if (G_UNLIKELY (!glestexture->id)) return; switch (glestexture->storage) { case PGM_GLES_TEXTURE_GST_BUFFER: buffer = GST_BUFFER_DATA (glestexture->data.gstbuffer); break; case PGM_GLES_TEXTURE_PIXBUF: buffer = gdk_pixbuf_get_pixels (glestexture->data.pixbuf); break; case PGM_GLES_TEXTURE_BUFFER: buffer = glestexture->data.buffer; break; default: return; } /* FIXME: This test must not be there! At that point the content must be valid * in every case. The issue is that it rarely appears that a buffer coming * from a GdkPixbuf is NULL, causing a crash in the OpenGL texture update * function. That is a workaround to fix this issue, the real source of the * problem still need to be found though. */ if (G_LIKELY (buffer != NULL)) upload_texture (glestexture, buffer); free_buffer (glestexture); } void pgm_gles_texture_update (PgmGlesTexture *glestexture) { if (!glestexture->id) return; gles->bind_texture (PGM_GLES_TEXTURE_2D, glestexture->id[0]); set_texture_parameters (glestexture); } void pgm_gles_texture_set_matrix (PgmGlesTexture *glestexture, PgmMat4x4 *matrix) { pgm_mat4x4_set_from_mat4x4 (glestexture->matrix, matrix); /* Check identity so that we can avoid pushing our texture matrix */ if (!pgm_mat4x4_is_identity (matrix)) { PgmMat4x4 *scale, *transform, *transpose; /* We need to scale, apply the transformation and unscale to hide * the use of power-of-two textures. */ scale = pgm_mat4x4_new_scale_from_scalars (glestexture->norm_width, glestexture->norm_height, 1.0f); transform = pgm_mat4x4_multiply_mat4x4 (scale, glestexture->matrix); pgm_mat4x4_scale_from_scalars (transform, glestexture->inv_norm_width, glestexture->inv_norm_height, 1.0f); transpose = pgm_mat4x4_transpose (transform); pgm_mat4x4_set_from_mat4x4 (glestexture->matrix, transpose); pgm_mat4x4_free (scale); pgm_mat4x4_free (transform); pgm_mat4x4_free (transpose); glestexture->flags &= ~PGM_GLES_TEXTURE_IDENTITY_MATRIX; } else glestexture->flags |= PGM_GLES_TEXTURE_IDENTITY_MATRIX; } pigment-0.3.17/plugins/opengles/pgmglesimage.c0000644000175000017500000011320111205034416016262 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment OpenGL ES-CM 1.1 plugin * * Copyright © 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include "pgmglesimage.h" GST_DEBUG_CATEGORY_STATIC (pgm_gles_image_debug); #define GST_CAT_DEFAULT pgm_gles_image_debug static PgmGlesDrawableClass *parent_class = NULL; /* Private methods */ /* Computes the image pixel aspect ratio */ static void update_image_ratio (PgmGlesImage *glesimage) { PgmGlesDrawable *glesdrawable = PGM_GLES_DRAWABLE (glesimage); PgmImage *image = PGM_IMAGE (glesdrawable->drawable); GST_OBJECT_LOCK (image); glesimage->image_ratio = (gfloat) image->par_n / image->par_d; GST_OBJECT_UNLOCK (image); } /* Computes the drawable pixel aspect ratio */ static void update_drawable_ratio (PgmGlesImage *glesimage) { PgmGlesDrawable *glesdrawable = PGM_GLES_DRAWABLE (glesimage); if (G_LIKELY (glesdrawable->height != 0.0)) glesimage->drawable_ratio = glesdrawable->width / glesdrawable->height; else glesimage->drawable_ratio = 1.0f; } /* Updates the last position fields with the one from the drawable */ static void update_last_position (PgmGlesImage *glesimage) { PgmGlesDrawable *glesdrawable = PGM_GLES_DRAWABLE (glesimage); glesimage->last_x = glesdrawable->x; glesimage->last_y = glesdrawable->y; glesimage->last_z = glesdrawable->z; } /* Updates the alignment */ static void update_alignment (PgmGlesImage *glesimage) { PgmDrawable *drawable = PGM_GLES_DRAWABLE (glesimage)->drawable; PgmImage *image = PGM_IMAGE (drawable); PgmImageAlignment align; GST_OBJECT_LOCK (image); align = image->align; GST_OBJECT_UNLOCK (image); /* Horizontal alignment */ if (align & PGM_IMAGE_LEFT) glesimage->h_align = 0.0f; else if (align & PGM_IMAGE_RIGHT) glesimage->h_align = 1.0f; else glesimage->h_align = 0.5f; /* Vertical alignment */ if (align & PGM_IMAGE_TOP) glesimage->v_align = 0.0f; else if (align & PGM_IMAGE_BOTTOM) glesimage->v_align = 1.0f; else glesimage->v_align = 0.5f; } /* Updates the interpolation */ static void update_interp (PgmGlesImage *glesimage) { PgmGlesDrawable *glesdrawable = PGM_GLES_DRAWABLE (glesimage); PgmImage *image = PGM_IMAGE (glesdrawable->drawable); PgmGlesTexture *glestexture = glesimage->texture; GST_OBJECT_LOCK (image); if (image->interp == PGM_IMAGE_BILINEAR) glestexture->filter = PGM_GLES_LINEAR; else if (image->interp == PGM_IMAGE_NEAREST) glestexture->filter = PGM_GLES_NEAREST; GST_OBJECT_UNLOCK (image); } /* Updates the wrapping */ static void update_wrapping (PgmGlesImage *glesimage) { PgmGlesDrawable *glesdrawable = PGM_GLES_DRAWABLE (glesimage); PgmImage *image = PGM_IMAGE (glesdrawable->drawable); PgmGlesTexture *glestexture = glesimage->texture; GST_OBJECT_LOCK (image); /* No CLAMP_TO_BORDER in OpenGL ES */ if (image->wrap_s == PGM_IMAGE_CLAMP) glestexture->wrap_s = PGM_GLES_CLAMP_TO_EDGE; else if (image->wrap_s == PGM_IMAGE_REPEAT) glestexture->wrap_s = PGM_GLES_REPEAT; else if (image->wrap_s == PGM_IMAGE_TRANSPARENT) glestexture->wrap_s = PGM_GLES_CLAMP_TO_EDGE; if (image->wrap_t == PGM_IMAGE_CLAMP) glestexture->wrap_t = PGM_GLES_CLAMP_TO_EDGE; else if (image->wrap_t == PGM_IMAGE_REPEAT) glestexture->wrap_t = PGM_GLES_REPEAT; else if (image->wrap_t == PGM_IMAGE_TRANSPARENT) glestexture->wrap_t = PGM_GLES_CLAMP_TO_EDGE; GST_OBJECT_UNLOCK (image); } /* Updates the mapping (texture) matrix */ static void update_mapping_matrix (PgmGlesImage *glesimage) { PgmGlesDrawable *glesdrawable = PGM_GLES_DRAWABLE (glesimage); PgmImage *image = PGM_IMAGE (glesdrawable->drawable); GST_OBJECT_LOCK (image); pgm_gles_texture_set_matrix (glesimage->texture, image->mapping_matrix); GST_OBJECT_UNLOCK (image); } /* Updates the color of the inner border vertices */ static void update_border_inner_color (PgmGlesImage *glesimage) { PgmDrawable *drawable = PGM_GLES_DRAWABLE (glesimage)->drawable; PgmGlesFloat *border_color = glesimage->border_color; PgmImage *image = PGM_IMAGE (drawable); gfloat r, g, b, a; guint i; /* Get the right color components */ GST_OBJECT_LOCK (drawable); r = image->border_inner_r * INV_255; g = image->border_inner_g * INV_255; b = image->border_inner_b * INV_255; a = image->border_inner_a * drawable->opacity * SQR_INV_255; GST_OBJECT_UNLOCK (drawable); /* Then set the color attribute of the inner vertices */ for (i = 4; i < 48; i += 12) { border_color[i+0] = r; border_color[i+1] = g; border_color[i+2] = b; border_color[i+3] = a; } } /* Updates the color of the outer border vertices */ static void update_border_outer_color (PgmGlesImage *glesimage) { PgmDrawable *drawable = PGM_GLES_DRAWABLE (glesimage)->drawable; PgmGlesFloat *border_color = glesimage->border_color; PgmImage *image = PGM_IMAGE (drawable); gfloat r, g, b, a; /* Get the right color components */ GST_OBJECT_LOCK (drawable); r = image->border_outer_r * INV_255; g = image->border_outer_g * INV_255; b = image->border_outer_b * INV_255; a = image->border_outer_a * drawable->opacity * SQR_INV_255; GST_OBJECT_UNLOCK (drawable); /* Then set the color attribute of the outer vertices */ border_color[0] = r; border_color[1] = g; border_color[2] = b; border_color[3] = a; border_color[8] = r; border_color[9] = g; border_color[10] = b; border_color[11] = a; border_color[12] = r; border_color[13] = g; border_color[14] = b; border_color[15] = a; border_color[20] = r; border_color[21] = g; border_color[22] = b; border_color[23] = a; border_color[24] = r; border_color[25] = g; border_color[26] = b; border_color[27] = a; border_color[32] = r; border_color[33] = g; border_color[34] = b; border_color[35] = a; border_color[36] = r; border_color[37] = g; border_color[38] = b; border_color[39] = a; border_color[44] = r; border_color[45] = g; border_color[46] = b; border_color[47] = a; } /* Updates the border vertices */ static void set_border_vertices (PgmGlesImage *glesimage, gfloat border_width, gfloat border_height) { PgmGlesFloat *border_vertex = glesimage->border_vertex; PgmGlesFloat *img_vertex = glesimage->vertex; /* Here is how the border vertices are drawn using a GL_TRIANGLES mode. * Remember that the projection matrix flip the scene vertically and the * representation of this schema in a Pigment scene is inverted along the y * cardinal axis. * * 3-------------2---6 * | | | * 0---10--------1 | * | | | | * | | | | * | 7---------4---5 * | | | * 11--8-------------9 */ /* Vertex 0 */ border_vertex[0] = img_vertex[9] - border_width; border_vertex[1] = img_vertex[10]; border_vertex[2] = img_vertex[11]; /* Vertex 1 */ border_vertex[3] = img_vertex[6]; border_vertex[4] = img_vertex[7]; border_vertex[5] = img_vertex[8]; /* Vertex 2 */ border_vertex[6] = img_vertex[6]; border_vertex[7] = img_vertex[7] + border_height; border_vertex[8] = img_vertex[8]; /* Vertex 3 */ border_vertex[9] = img_vertex[9] - border_width; border_vertex[10] = img_vertex[10] + border_height; border_vertex[11] = img_vertex[11]; /* Vertex 4 */ border_vertex[12] = img_vertex[3]; border_vertex[13] = img_vertex[4]; border_vertex[14] = img_vertex[5]; /* Vertex 5 */ border_vertex[15] = img_vertex[3] + border_width; border_vertex[16] = img_vertex[4]; border_vertex[17] = img_vertex[5]; /* Vertex 6 */ border_vertex[18] = img_vertex[6] + border_width; border_vertex[19] = img_vertex[7] + border_height; border_vertex[20] = img_vertex[8]; /* Vertex 7 */ border_vertex[21] = img_vertex[0]; border_vertex[22] = img_vertex[1]; border_vertex[23] = img_vertex[2]; /* Vertex 8 */ border_vertex[24] = img_vertex[0]; border_vertex[25] = img_vertex[1] - border_height; border_vertex[26] = img_vertex[2]; /* Vertex 9 */ border_vertex[27] = img_vertex[3] + border_width; border_vertex[28] = img_vertex[4] - border_height; border_vertex[29] = img_vertex[5]; /* Vertex 10 */ border_vertex[30] = img_vertex[9]; border_vertex[31] = img_vertex[10]; border_vertex[32] = img_vertex[11]; /* Vertex 11 */ border_vertex[33] = img_vertex[0] - border_width; border_vertex[34] = img_vertex[1] - border_height; border_vertex[35] = img_vertex[2]; } /* Simply copies glesdrawable background vertices */ static void set_image_standard_vertices (PgmGlesImage *glesimage) { PgmGlesDrawable *glesdrawable = PGM_GLES_DRAWABLE (glesimage); PgmGlesFloat *drb_vertex = glesdrawable->bg_vertex; PgmGlesFloat *img_vertex = glesimage->vertex; gfloat border_width, border_height; /* Get the border sizes avoiding overlapped borders */ border_width = MIN (glesimage->border_width, glesdrawable->width / 2.0f); border_height = MIN (glesimage->border_width, glesdrawable->height / 2.0f); /* Copy the drawable vertices applying the border offset */ img_vertex[0] = drb_vertex[0] + border_width; img_vertex[1] = drb_vertex[1] + border_height; img_vertex[2] = drb_vertex[2]; img_vertex[3] = drb_vertex[3] - border_width; img_vertex[4] = img_vertex[1]; img_vertex[5] = drb_vertex[5]; img_vertex[6] = img_vertex[3]; img_vertex[7] = drb_vertex[7] - border_height; img_vertex[8] = drb_vertex[8]; img_vertex[9] = img_vertex[0]; img_vertex[10] = img_vertex[7]; img_vertex[11] = drb_vertex[11]; /* Update the border vertices if necessary */ if (glesimage->border_width > 0.0f) set_border_vertices (glesimage, border_width, border_height); } /* Modifies vertices for the scaled layout */ static void set_image_scaled_vertices (PgmGlesImage *glesimage) { PgmGlesDrawable *glesdrawable = PGM_GLES_DRAWABLE (glesimage); PgmGlesFloat *drb_vertex = glesdrawable->bg_vertex; PgmGlesFloat *img_vertex = glesimage->vertex; gfloat border_width, border_height, offset; /* Drawable width larger than image width */ if (glesimage->drawable_ratio >= glesimage->image_ratio) { offset = glesdrawable->width - glesdrawable->height * glesimage->image_ratio; /* Get the border sizes avoiding overlapped borders */ border_width = MIN (glesimage->border_width, (glesdrawable->width - offset) / 2.0f); border_height = MIN (glesimage->border_width, glesdrawable->height / 2.0f); img_vertex[0] = (drb_vertex[0] + offset * glesimage->h_align) + border_width; img_vertex[1] = drb_vertex[1] + border_height; img_vertex[3] = (drb_vertex[3] - offset * (1.0f - glesimage->h_align)) - border_width; img_vertex[4] = drb_vertex[4] + border_height; img_vertex[6] = img_vertex[3]; img_vertex[7] = drb_vertex[7] - border_height; img_vertex[9] = img_vertex[0]; img_vertex[10] = drb_vertex[10] - border_height; } /* Drawable height larger than image height */ else { offset = glesdrawable->height - glesdrawable->width / glesimage->image_ratio; /* Get the border sizes avoiding overlapped borders */ border_width = MIN (glesimage->border_width, glesdrawable->width / 2.0f); border_height = MIN (glesimage->border_width, (glesdrawable->height - offset) / 2.0f); img_vertex[0] = drb_vertex[0] + border_width; img_vertex[1] = (drb_vertex[1] + offset * glesimage->v_align) + border_height; img_vertex[3] = drb_vertex[3] - border_width; img_vertex[4] = img_vertex[1]; img_vertex[6] = drb_vertex[6] - border_width; img_vertex[7] = (drb_vertex[7] - offset * (1.0f - glesimage->v_align)) - border_height; img_vertex[9] = drb_vertex[9] + border_width; img_vertex[10] = img_vertex[7]; } /* Then simply copy the z position from the background one */ img_vertex[2] = drb_vertex[2]; img_vertex[5] = drb_vertex[5]; img_vertex[8] = drb_vertex[8]; img_vertex[11] = drb_vertex[11]; /* Update the border vertices if necessary */ if (glesimage->border_width > 0.0f) set_border_vertices (glesimage, border_width, border_height); } /* Modifies texture coordinates for the zoomed layout */ static void set_image_zoomed_coordinates (PgmGlesImage *glesimage) { PgmGlesDrawable *glesdrawable = PGM_GLES_DRAWABLE (glesimage); PgmGlesTexture *glestexture = glesimage->texture; gfloat max_s, max_t; gfloat offset; max_s = (gfloat) glestexture->width / glestexture->width_pot; max_t = (gfloat) glestexture->height / glestexture->height_pot; /* Adapt coordinates when drawable width is larger than image width */ if (glesimage->drawable_ratio >= glesimage->image_ratio) { gfloat image_height = glesdrawable->width / glesimage->image_ratio; offset = ((image_height - glesdrawable->height) * max_t) / image_height; glesimage->coord[0] = 0.0f; glesimage->coord[1] = offset * glesimage->v_align; glesimage->coord[2] = max_s; glesimage->coord[3] = glesimage->coord[1]; glesimage->coord[4] = max_s; glesimage->coord[5] = max_t - offset * (1.0f - glesimage->v_align); glesimage->coord[6] = 0.0f; glesimage->coord[7] = glesimage->coord[5]; } /* Adapt coordinates when drawable height is larger than image height */ else { gfloat image_width = glesdrawable->height * glesimage->image_ratio; offset = ((image_width - glesdrawable->width) * max_s) / image_width; glesimage->coord[0] = offset * glesimage->h_align; glesimage->coord[1] = 0.0f; glesimage->coord[2] = max_s - offset * (1.0f - glesimage->h_align); glesimage->coord[3] = 0.0f; glesimage->coord[4] = glesimage->coord[2]; glesimage->coord[5] = max_t; glesimage->coord[6] = glesimage->coord[0]; glesimage->coord[7] = max_t; } } /* Modifies texture coordinates to fill the whole stored texture */ static void set_image_standard_coordinates (PgmGlesImage *glesimage) { PgmGlesTexture *glestexture = glesimage->texture; glesimage->coord[0] = 0.0f; glesimage->coord[1] = 0.0f; glesimage->coord[2] = (gfloat) glestexture->width / glestexture->width_pot; glesimage->coord[3] = 0.0f; glesimage->coord[4] = glesimage->coord[2]; glesimage->coord[5] = (gfloat) glestexture->height / glestexture->height_pot; glesimage->coord[6] = 0.0f; glesimage->coord[7] = glesimage->coord[5]; } /* Adapts properties to a size change depending on the layout */ static void update_layout (PgmGlesImage *glesimage) { PgmDrawable *drawable = PGM_GLES_DRAWABLE (glesimage)->drawable; PgmImage *image = PGM_IMAGE (drawable); PgmImageLayoutType layout; GST_OBJECT_LOCK (image); layout = image->layout; GST_OBJECT_UNLOCK (image); switch (layout) { case PGM_IMAGE_SCALED: case PGM_IMAGE_CENTERED: /* FIXME: Not implemented yet */ case PGM_IMAGE_TILED: /* FIXME: Not implemented yet */ set_image_scaled_vertices (glesimage); set_image_standard_coordinates (glesimage); break; case PGM_IMAGE_ZOOMED: set_image_standard_vertices (glesimage); set_image_zoomed_coordinates (glesimage); break; case PGM_IMAGE_FILLED: set_image_standard_vertices (glesimage); set_image_standard_coordinates (glesimage); break; default: break; } } /* Adapts to a drawable position change */ static void update_vertices_position (PgmGlesImage *glesimage) { PgmGlesDrawable *glesdrawable = PGM_GLES_DRAWABLE (glesimage); PgmGlesFloat *img_vertex = glesimage->vertex; PgmGlesFloat *img_border = glesimage->border_vertex; gfloat x_offset, y_offset, z_offset; guint i; x_offset = glesdrawable->x - glesimage->last_x; y_offset = glesdrawable->y - glesimage->last_y; z_offset = glesdrawable->z - glesimage->last_z; /* Add the offsets to the current vertices */ for (i = 0; i < 12; i += 3) { img_vertex[i] += x_offset; img_vertex[i+1] += y_offset; img_vertex[i+2] += z_offset; } /* Add the offsets to the border vertices, if necessary */ if (glesimage->border_width > 0.0f) for (i = 0; i < 36; i += 3) { img_border[i] += x_offset; img_border[i+1] += y_offset; img_border[i+2] += z_offset; } /* And update the last position with the new one */ update_last_position (glesimage); } /* Update the border_width value stored in the GL image */ static void update_border_width (PgmGlesImage *glesimage) { PgmDrawable *drawable = PGM_GLES_DRAWABLE (glesimage)->drawable; PgmImage *image = PGM_IMAGE (drawable); GST_OBJECT_LOCK (image); glesimage->border_width = image->border_width; GST_OBJECT_UNLOCK (image); } /* Update the image ratio and layout of all the slaves of the given image */ static void update_slaves (PgmGlesImage *glesimage) { PgmGlesDrawable *glesdrawable = PGM_GLES_DRAWABLE (glesimage); PgmGlesViewport *glesviewport = glesdrawable->glesviewport; PgmImage *master = PGM_IMAGE (glesdrawable->drawable); PgmGlesImage *slave; GList *walk; GST_OBJECT_LOCK (master); walk = master->slaves; while (walk) { /* Retrieve the slave glesimage */ GST_OBJECT_LOCK (glesviewport); slave = g_hash_table_lookup (glesviewport->drawable_hash, walk->data); GST_OBJECT_UNLOCK (glesviewport); /* Update slave glesimage parameters */ if (slave) { GST_OBJECT_UNLOCK (master); update_image_ratio (slave); update_layout (slave); GST_OBJECT_LOCK (master); } walk = walk->next; } GST_OBJECT_UNLOCK (master); } /* PgmGlesDrawable methods */ static void pgm_gles_image_draw (PgmGlesDrawable *glesdrawable) { static PgmGlesUshort border_indices[] = { 0, 1, 2, 2, 3, 0, 2, 4, 5, 5, 6, 2, 5, 7, 8, 8, 9, 5, 8, 10, 0, 0, 11, 8 }; static PgmGlesUshort indices[] = { 0, 1, 2, 2, 3, 0 }; PgmGlesImage *glesimage = PGM_GLES_IMAGE (glesdrawable); PgmGlesContextProcAddress *gles; /* Avoid drawing if it's not visible */ if (glesimage->empty || (glesimage->fg_color[3] == 0.0f)) return; gles = glesdrawable->glesviewport->context->gles; gles->enable_client_state (PGM_GLES_VERTEX_ARRAY); gles->enable_client_state (PGM_GLES_COLOR_ARRAY); gles->enable_client_state (PGM_GLES_TEXTURE_COORD_ARRAY); /* Upload vertices and texture coordinates for the image */ gles->vertex_pointer (3, PGM_GLES_FLOAT, 0, glesimage->vertex); gles->color_pointer (4, PGM_GLES_FLOAT, 0, glesimage->fg_color); gles->tex_coord_pointer (2, PGM_GLES_FLOAT, 0, glesimage->coord); /* Draw the image */ pgm_gles_texture_bind (glesimage->texture); gles->draw_elements (PGM_GLES_TRIANGLES, 6, PGM_GLES_UNSIGNED_SHORT, indices); pgm_gles_texture_unbind (glesimage->texture); gles->disable_client_state (PGM_GLES_TEXTURE_COORD_ARRAY); if (glesimage->border_width <= 0.0f) { gles->disable_client_state (PGM_GLES_VERTEX_ARRAY); gles->disable_client_state (PGM_GLES_COLOR_ARRAY); } else { /* Upload vertices and colors for the border */ gles->vertex_pointer (3, PGM_GLES_FLOAT, 0, glesimage->border_vertex); gles->color_pointer (4, PGM_GLES_FLOAT, 0, glesimage->border_color); /* Draw the border */ gles->draw_elements (PGM_GLES_TRIANGLES, 24, PGM_GLES_UNSIGNED_SHORT, border_indices); gles->disable_client_state (PGM_GLES_VERTEX_ARRAY); gles->disable_client_state (PGM_GLES_COLOR_ARRAY); } } static void pgm_gles_image_regenerate (PgmGlesDrawable *glesdrawable) { } static void pgm_gles_image_update_projection (PgmGlesDrawable *glesdrawable) { PgmGlesImage *glesimage = PGM_GLES_IMAGE (glesdrawable); update_image_ratio (glesimage); update_layout (glesimage); } static void pgm_gles_image_set_size (PgmGlesDrawable *glesdrawable) { PgmGlesImage *glesimage = PGM_GLES_IMAGE (glesdrawable); update_drawable_ratio (glesimage); update_layout (glesimage); } static void pgm_gles_image_set_position (PgmGlesDrawable *glesdrawable) { PgmGlesImage *glesimage = PGM_GLES_IMAGE (glesdrawable); update_vertices_position (glesimage); } static void pgm_gles_image_set_fg_color (PgmGlesDrawable *glesdrawable) { PgmGlesImage *glesimage = PGM_GLES_IMAGE (glesdrawable); PgmGlesFloat *fg_color = glesimage->fg_color; PgmDrawable *drawable; PgmGlesFloat color[4]; drawable = glesdrawable->drawable; color[0] = drawable->fg_r * INV_255; color[1] = drawable->fg_g * INV_255; color[2] = drawable->fg_b * INV_255; color[3] = drawable->fg_a * drawable->opacity * INV_255; GST_OBJECT_LOCK (drawable); fg_color[0] = color[0]; fg_color[1] = color[1]; fg_color[2] = color[2]; fg_color[3] = color[3]; fg_color[4] = color[0]; fg_color[5] = color[1]; fg_color[6] = color[2]; fg_color[7] = color[3]; fg_color[8] = color[0]; fg_color[9] = color[1]; fg_color[10] = color[2]; fg_color[11] = color[3]; fg_color[12] = color[0]; fg_color[13] = color[1]; fg_color[14] = color[2]; fg_color[15] = color[3]; GST_OBJECT_UNLOCK (drawable); } static void pgm_gles_image_set_opacity (PgmGlesDrawable *glesdrawable) { PgmGlesImage *glesimage = PGM_GLES_IMAGE (glesdrawable); PgmDrawable *drawable = glesdrawable->drawable; PgmImage *image = PGM_IMAGE (drawable); PgmGlesFloat *border_color = glesimage->border_color; gfloat fg_opacity, border_opacity; guint i; /* Get the opacities */ GST_OBJECT_LOCK (drawable); fg_opacity = drawable->fg_a * drawable->opacity * SQR_INV_255; border_opacity = image->border_inner_a * drawable->opacity * SQR_INV_255; GST_OBJECT_UNLOCK (drawable); /* Image alpha blending */ glesimage->fg_color[3] = fg_opacity; glesimage->fg_color[7] = fg_opacity; glesimage->fg_color[11] = fg_opacity; glesimage->fg_color[15] = fg_opacity; /* Border alpha blending */ for (i = 3; i < 48; i += 4) border_color[i] = border_opacity; } static void pgm_gles_image_sync (PgmGlesDrawable *glesdrawable) { PgmGlesImage *glesimage = PGM_GLES_IMAGE (glesdrawable); PgmImage *image = PGM_IMAGE (glesdrawable->drawable); PgmImageStorageType type; /* Synchronize various properties */ pgm_gles_image_set_fg_color (glesdrawable); update_interp (glesimage); update_wrapping (glesimage); update_alignment (glesimage); update_last_position (glesimage); update_drawable_ratio (glesimage); update_image_ratio (glesimage); update_mapping_matrix (glesimage); update_border_width (glesimage); update_border_inner_color (glesimage); update_border_outer_color (glesimage); GST_OBJECT_LOCK (image); type = image->storage_type; GST_OBJECT_UNLOCK (image); /* Synchronize the buffer */ switch (type) { case PGM_IMAGE_FILE: pgm_gles_image_set_from_file (glesimage); break; case PGM_IMAGE_BUFFER: pgm_gles_image_set_from_buffer (glesimage); break; case PGM_IMAGE_GST_BUFFER: pgm_gles_image_set_from_gst_buffer (glesimage); break; case PGM_IMAGE_PIXBUF: pgm_gles_image_set_from_pixbuf (glesimage); break; case PGM_IMAGE_IMAGE: pgm_gles_image_set_from_image (glesimage); break; case PGM_IMAGE_EMPTY: break; default: break; } } /* GObject stuff */ PGM_DEFINE_DYNAMIC_TYPE (PgmGlesImage, pgm_gles_image, PGM_TYPE_GLES_DRAWABLE) void pgm_gles_image_register (GTypeModule *module) { pgm_gles_image_register_type (module); } static void pgm_gles_image_dispose (GObject *object) { PgmGlesDrawable *glesdrawable = PGM_GLES_DRAWABLE (object); PgmGlesViewport *glesviewport = glesdrawable->glesviewport; PgmGlesImage *glesimage = PGM_GLES_IMAGE (object); PgmImage *master = PGM_IMAGE (glesdrawable->drawable); PgmGlesImage *slave; GList *walk; PgmGlesContextTask *task; /* Clean up the slaves */ GST_OBJECT_LOCK (master); walk = master->slaves; while (walk) { GST_OBJECT_LOCK (glesviewport); slave = g_hash_table_lookup (glesviewport->drawable_hash, walk->data); GST_OBJECT_UNLOCK (glesviewport); if (slave) { slave->empty = TRUE; slave->texture = slave->native_texture; slave->image_ratio = 0.0f; } walk = walk->next; } GST_OBJECT_UNLOCK (master); gst_object_unref (glesdrawable->drawable); pgm_gles_context_remove_tasks_with_data (glesdrawable->glesviewport->context, glesimage->native_texture); task = pgm_gles_context_task_new (PGM_GLES_CONTEXT_FREE_TEXTURE, glesimage->native_texture); pgm_gles_context_push_immediate_task (glesdrawable->glesviewport->context, task); glesimage->native_texture = NULL; glesimage->texture = NULL; GST_CALL_PARENT (G_OBJECT_CLASS, dispose, (object)); } static void pgm_gles_image_class_init (PgmGlesImageClass *klass) { GObjectClass *gobject_class; PgmGlesDrawableClass *glesdrawable_class; GST_DEBUG_CATEGORY_INIT (pgm_gles_image_debug, "pgm_gles_image", 0, "OpenGL ES plugin: PgmGlesImage"); parent_class = g_type_class_peek_parent (klass); gobject_class = G_OBJECT_CLASS (klass); glesdrawable_class = PGM_GLES_DRAWABLE_CLASS (klass); /* GObject virtual table */ gobject_class->dispose = GST_DEBUG_FUNCPTR (pgm_gles_image_dispose); /* PgmGlesDrawable virtual table */ glesdrawable_class->sync = GST_DEBUG_FUNCPTR (pgm_gles_image_sync); glesdrawable_class->draw = GST_DEBUG_FUNCPTR (pgm_gles_image_draw); glesdrawable_class->regenerate = GST_DEBUG_FUNCPTR (pgm_gles_image_regenerate); glesdrawable_class->update_projection = GST_DEBUG_FUNCPTR (pgm_gles_image_update_projection); glesdrawable_class->set_size = GST_DEBUG_FUNCPTR (pgm_gles_image_set_size); glesdrawable_class->set_position = GST_DEBUG_FUNCPTR (pgm_gles_image_set_position); glesdrawable_class->set_fg_color = GST_DEBUG_FUNCPTR (pgm_gles_image_set_fg_color); glesdrawable_class->set_opacity = GST_DEBUG_FUNCPTR (pgm_gles_image_set_opacity); } static void pgm_gles_image_class_finalize (PgmGlesImageClass *klass) { return; } static void pgm_gles_image_init (PgmGlesImage *glesimage) { glesimage->empty = TRUE; /* glesimage->border_width = 0.0f; */ } /* Public methods */ PgmGlesDrawable * pgm_gles_image_new (PgmDrawable *drawable, PgmGlesViewport *glesviewport) { PgmImage *master = PGM_IMAGE (drawable); PgmGlesImage *slave; PgmGlesImage *glesimage; PgmGlesDrawable *glesdrawable; GList *walk; glesimage = g_object_new (PGM_TYPE_GLES_IMAGE, NULL); GST_DEBUG_OBJECT (glesimage, "created new glesimage"); glesimage->native_texture = pgm_gles_texture_new (glesviewport->context); glesimage->texture = glesimage->native_texture; glesdrawable = PGM_GLES_DRAWABLE (glesimage); glesdrawable->drawable = gst_object_ref (drawable); glesdrawable->glesviewport = glesviewport; pgm_gles_viewport_connect_changed_callback (glesviewport, glesdrawable); pgm_gles_drawable_sync (glesdrawable); /* Update the slaves that are in the Canvas */ GST_OBJECT_LOCK (master); walk = master->slaves; while (walk) { GST_OBJECT_LOCK (glesviewport); slave = g_hash_table_lookup (glesviewport->drawable_hash, walk->data); GST_OBJECT_UNLOCK (glesviewport); if (slave) { slave->empty = FALSE; slave->texture = glesimage->texture; update_image_ratio (slave); update_layout (slave); } walk = walk->next; } GST_OBJECT_UNLOCK (master); return glesdrawable; } void pgm_gles_image_clear (PgmGlesImage *glesimage) { PgmGlesDrawable *glesdrawable = PGM_GLES_DRAWABLE (glesimage); PgmGlesContextTask *task = NULL; if (glesimage->empty) return; /* Request texture clean up in case it was not using a master texture */ if (glesimage->texture == glesimage->native_texture) { task = pgm_gles_context_task_new (PGM_GLES_CONTEXT_CLEAN_TEXTURE, glesimage->texture); pgm_gles_context_push_immediate_task (glesdrawable->glesviewport->context, task); } else glesimage->texture = glesimage->native_texture; GST_OBJECT_LOCK (glesimage); glesimage->empty = TRUE; glesimage->image_ratio = 0.0f; GST_OBJECT_UNLOCK (glesimage); } void pgm_gles_image_set_from_file (PgmGlesImage *glesimage) { PgmGlesDrawable *glesdrawable = PGM_GLES_DRAWABLE (glesimage); PgmImage *image = PGM_IMAGE (glesdrawable->drawable); PgmGlesContextTask *task; GST_OBJECT_LOCK (image); if (G_UNLIKELY (!(image->storage_type == PGM_IMAGE_FILE || image->storage_type == PGM_IMAGE_IMAGE))) { GST_OBJECT_UNLOCK (image); return; } if (image->data.file.pixbuf == NULL) { GST_OBJECT_UNLOCK (image); _pgm_image_stored_from_file_load (image); return; } pgm_gles_texture_set_pixbuf (glesimage->texture, image->data.file.pixbuf); pgm_gles_texture_set_matrix (glesimage->texture, image->mapping_matrix); GST_OBJECT_UNLOCK (image); _pgm_image_stored_from_file_free (image); glesimage->empty = FALSE; update_image_ratio (glesimage); update_layout (glesimage); update_slaves (glesimage); task = pgm_gles_context_task_new (PGM_GLES_CONTEXT_GEN_TEXTURE, glesimage->texture); pgm_gles_context_push_immediate_task (glesdrawable->glesviewport->context, task); task = pgm_gles_context_task_new (PGM_GLES_CONTEXT_UPLOAD_TEXTURE, glesimage->texture); pgm_gles_context_push_deferred_task (glesdrawable->glesviewport->context, task); } void pgm_gles_image_set_from_buffer (PgmGlesImage *glesimage) { PgmGlesDrawable *glesdrawable = PGM_GLES_DRAWABLE (glesimage); PgmImage *image = PGM_IMAGE (glesdrawable->drawable); PgmGlesContextTask *task; GST_OBJECT_LOCK (image); if (G_UNLIKELY (!(image->storage_type == PGM_IMAGE_BUFFER || image->storage_type == PGM_IMAGE_IMAGE))) { GST_OBJECT_UNLOCK (image); return; } pgm_gles_texture_set_buffer (glesimage->texture, image->data.buffer.buffer, image->data.buffer.format, image->data.buffer.width, image->data.buffer.height, image->data.buffer.size, image->data.buffer.stride, FALSE); pgm_gles_texture_set_matrix (glesimage->texture, image->mapping_matrix); GST_OBJECT_UNLOCK (image); glesimage->empty = FALSE; update_image_ratio (glesimage); update_layout (glesimage); update_slaves (glesimage); task = pgm_gles_context_task_new (PGM_GLES_CONTEXT_GEN_TEXTURE, glesimage->texture); pgm_gles_context_push_immediate_task (glesdrawable->glesviewport->context, task); task = pgm_gles_context_task_new (PGM_GLES_CONTEXT_UPLOAD_TEXTURE, glesimage->texture); pgm_gles_context_push_deferred_task (glesdrawable->glesviewport->context, task); } void pgm_gles_image_set_from_gst_buffer (PgmGlesImage *glesimage) { PgmGlesDrawable *glesdrawable = PGM_GLES_DRAWABLE (glesimage); PgmImage *image = PGM_IMAGE (glesdrawable->drawable); PgmGlesContextTask *task; /* It's the first time the glesimage receives a GstBuffer, let's set the * texture buffer with its different informations */ if (G_UNLIKELY (glesimage->empty)) { GST_OBJECT_LOCK (image); if (G_UNLIKELY (!(image->storage_type == PGM_IMAGE_GST_BUFFER || image->storage_type == PGM_IMAGE_IMAGE))) { GST_OBJECT_UNLOCK (image); return; } pgm_gles_texture_set_gst_buffer (glesimage->texture, image->data.gst_buffer.gst_buffer, image->data.gst_buffer.format, image->data.gst_buffer.width, image->data.gst_buffer.height, image->data.gst_buffer.stride); pgm_gles_texture_set_matrix (glesimage->texture, image->mapping_matrix); GST_OBJECT_UNLOCK (image); glesimage->empty = FALSE; update_image_ratio (glesimage); update_layout (glesimage); update_slaves (glesimage); task = pgm_gles_context_task_new (PGM_GLES_CONTEXT_GEN_TEXTURE, glesimage->texture); pgm_gles_context_push_immediate_task (glesdrawable->glesviewport->context, task); } /* It's not the first time, so we just need to send the updated buffer */ else { GST_OBJECT_LOCK (image); if (G_UNLIKELY (!(image->storage_type == PGM_IMAGE_GST_BUFFER || image->storage_type == PGM_IMAGE_IMAGE))) { GST_OBJECT_UNLOCK (image); return; } pgm_gles_texture_update_gst_buffer (glesimage->texture, image->data.gst_buffer.gst_buffer); GST_OBJECT_UNLOCK (image); } task = pgm_gles_context_task_new (PGM_GLES_CONTEXT_UPLOAD_TEXTURE, glesimage->texture); pgm_gles_context_push_deferred_task (glesdrawable->glesviewport->context, task); } void pgm_gles_image_set_from_pixbuf (PgmGlesImage *glesimage) { PgmGlesDrawable *glesdrawable = PGM_GLES_DRAWABLE (glesimage); PgmImage *image = PGM_IMAGE (glesdrawable->drawable); PgmGlesContextTask *task; GST_OBJECT_LOCK (image); if (G_UNLIKELY (!(image->storage_type == PGM_IMAGE_PIXBUF || image->storage_type == PGM_IMAGE_IMAGE))) { GST_OBJECT_UNLOCK (image); return; } pgm_gles_texture_set_pixbuf (glesimage->texture, image->data.pixbuf.pixbuf); pgm_gles_texture_set_matrix (glesimage->texture, image->mapping_matrix); GST_OBJECT_UNLOCK (image); glesimage->empty = FALSE; update_image_ratio (glesimage); update_layout (glesimage); update_slaves (glesimage); task = pgm_gles_context_task_new (PGM_GLES_CONTEXT_GEN_TEXTURE, glesimage->texture); pgm_gles_context_push_immediate_task (glesdrawable->glesviewport->context, task); task = pgm_gles_context_task_new (PGM_GLES_CONTEXT_UPLOAD_TEXTURE, glesimage->texture); pgm_gles_context_push_deferred_task (glesdrawable->glesviewport->context, task); } void pgm_gles_image_set_from_image (PgmGlesImage *glesimage) { PgmGlesDrawable *glesdrawable = PGM_GLES_DRAWABLE (glesimage); PgmImage *image = PGM_IMAGE (glesdrawable->drawable); PgmGlesViewport *glesviewport = glesdrawable->glesviewport; PgmGlesImage *master; /* Retrieve the master glesimage */ GST_OBJECT_LOCK (image); if (G_UNLIKELY (image->storage_type != PGM_IMAGE_IMAGE)) { GST_OBJECT_UNLOCK (image); return; } GST_OBJECT_LOCK (glesviewport); master = g_hash_table_lookup (glesviewport->drawable_hash, image->master); GST_OBJECT_UNLOCK (glesviewport); GST_OBJECT_UNLOCK (image); /* And use its texture */ if (master) { glesimage->texture = master->texture; glesimage->empty = FALSE; update_image_ratio (glesimage); update_layout (glesimage); } } void pgm_gles_image_set_mapping_matrix (PgmGlesImage *glesimage) { update_mapping_matrix (glesimage); } void pgm_gles_image_set_alignment (PgmGlesImage *glesimage) { update_alignment (glesimage); update_layout (glesimage); } void pgm_gles_image_set_layout (PgmGlesImage *glesimage) { update_layout (glesimage); } void pgm_gles_image_set_interp (PgmGlesImage *glesimage) { PgmGlesDrawable *glesdrawable = PGM_GLES_DRAWABLE (glesimage); PgmGlesContextTask *task; update_interp (glesimage); task = pgm_gles_context_task_new (PGM_GLES_CONTEXT_UPDATE_TEXTURE, glesimage->texture); pgm_gles_context_push_immediate_task (glesdrawable->glesviewport->context, task); } void pgm_gles_image_set_wrapping (PgmGlesImage *glesimage) { PgmGlesDrawable *glesdrawable = PGM_GLES_DRAWABLE (glesimage); PgmGlesContextTask *task; update_wrapping (glesimage); task = pgm_gles_context_task_new (PGM_GLES_CONTEXT_UPDATE_TEXTURE, glesimage->texture); pgm_gles_context_push_immediate_task (glesdrawable->glesviewport->context, task); } void pgm_gles_image_set_aspect_ratio (PgmGlesImage *glesimage) { update_image_ratio (glesimage); update_layout (glesimage); } void pgm_gles_image_set_border_width (PgmGlesImage *glesimage) { update_border_width (glesimage); update_layout (glesimage); } void pgm_gles_image_set_border_inner_color (PgmGlesImage *glesimage) { update_border_inner_color (glesimage); } void pgm_gles_image_set_border_outer_color (PgmGlesImage *glesimage) { update_border_outer_color (glesimage); } pigment-0.3.17/plugins/opengles/pgmglescontext.c0000644000175000017500000010206411205034416016671 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment OpenGL ES-CM 1.1 plugin * * Copyright © 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ /* * Context class is used to create and handle the OpenGL ES context. It retrieves * the capabilities of the OpenGL ES implementation at runtime and stores the * results in its version, limits and feature mask data. * * It creates a thread dedicated to the rendering. Only this thread communicates * with the native OpenGL libraries for the entire process. It allows the * application side to do blocking operations without stopping the rendering. * * Context handles two task queues for other threads to push operations. The * first queue is used to push tasks that need to be complete as soon as * possible in the rendering thread, the tasks pushed in this queue are called * "immediate tasks". Typical immediate tasks can be for example requests to * change the viewport size or title. The second queue is used to push * tasks that only need to be complete on a viewport update request. Such tasks * are called "deferred tasks". Deferred tasks can be for example texture * uploads or projection matrix updates. The immediate task queue is flushed * each time a task is pushed with the pgm_gles_context_push_immediate_task() * function. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include "pgmglescontext.h" #ifdef G_OS_UNIX #include /* pipe, close */ #endif /* G_OS_UNIX */ #ifdef WIN32 #include #include /* _O_BINARY */ #include /* _pipe, _close */ #define pipe(handle) _pipe(handle, 4096, _O_BINARY) #endif /* WIN32 */ #include /* gl* */ #include /* strlen */ #include /* isdigit */ #include /* tan */ #ifndef HAVE_OPENGLES_PC_EMULATION #include "pgmgleseglbackend.h" #else #include "pgmglesxbackend.h" #endif /* HAVE_OPENGLES_PC_EMULATION */ GST_DEBUG_CATEGORY_EXTERN (pgm_gles_debug); #define GST_CAT_DEFAULT pgm_gles_debug /* Function prototypes */ static void flush_task_queue (PgmGlesContext *glescontext, GList **queue); static void render (PgmGlesContext *glescontext); /* Map OpenGL ES extension names and feature bits */ typedef struct { const gchar *name; gint feature_mask; } ExtensionMap; /* OpenGL ES extensions checked at runtime */ static ExtensionMap gles_extensions_map[] = { { "GL_IMG_texture_format_BGRA8888", PGM_GLES_FEAT_TEXTURE_FORMAT_BGRA }, { NULL, 0 } }; /* OpenGL ES functions binding */ static PgmGlesContextProcAddress gles_proc_address = { /* OpenGL ES 1.1 core functions */ (pgm_gles_enable) glEnable, (pgm_gles_disable) glDisable, (pgm_gles_get_error) glGetError, (pgm_gles_get_string) glGetString, (pgm_gles_enable_client_state) glEnableClientState, (pgm_gles_disable_client_state) glDisableClientState, (pgm_gles_vertex_pointer) glVertexPointer, (pgm_gles_color_pointer) glColorPointer, (pgm_gles_tex_coord_pointer) glTexCoordPointer, (pgm_gles_draw_arrays) glDrawArrays, (pgm_gles_draw_elements) glDrawElements, (pgm_gles_color_4f) glColor4f, (pgm_gles_blend_func) glBlendFunc, (pgm_gles_clear) glClear, (pgm_gles_clear_color) glClearColor, (pgm_gles_matrix_mode) glMatrixMode, (pgm_gles_push_matrix) glPushMatrix, (pgm_gles_pop_matrix) glPopMatrix, (pgm_gles_load_identity) glLoadIdentity, (pgm_gles_load_matrix_f) glLoadMatrixf, (pgm_gles_viewport) glViewport, (pgm_gles_flush) glFlush, (pgm_gles_finish) glFinish, (pgm_gles_frustum_f) glFrustumf, (pgm_gles_ortho_f) glOrthof, (pgm_gles_scale_f) glScalef, (pgm_gles_translate_f) glTranslatef, (pgm_gles_rotate_f) glRotatef, (pgm_gles_hint) glHint, (pgm_gles_shade_model) glShadeModel, (pgm_gles_read_pixels) glReadPixels, (pgm_gles_gen_textures) glGenTextures, (pgm_gles_delete_textures) glDeleteTextures, (pgm_gles_bind_texture) glBindTexture, (pgm_gles_tex_image_2d) glTexImage2D, (pgm_gles_tex_sub_image_2d) glTexSubImage2D, (pgm_gles_tex_parameter_i) glTexParameteri, (pgm_gles_active_texture) glActiveTexture, (pgm_gles_get_integer_v) glGetIntegerv, (pgm_gles_get_float_v) glGetFloatv, /* OpenGL ES extension functions */ /* ... */ }; /* Update OpenGL ES viewport and projection */ static void update_projection (PgmGlesContext *glescontext) { PgmGlesViewport *glesviewport = glescontext->glesviewport; PgmViewport *viewport = PGM_VIEWPORT (glesviewport); PgmGlesContextProcAddress *gles = glescontext->gles; gint projected_width, projected_height; gint projected_x, projected_y; PgmMat4x4 *projection, *transpose; /* Retrieve viewport informations with lock */ GST_OBJECT_LOCK (viewport); projected_width = viewport->projected_width; projected_height = viewport->projected_height; projected_x = viewport->projected_x; projected_y = viewport->projected_y; projection = viewport->projection; GST_OBJECT_UNLOCK (viewport); #if HAVE_GDL gles->viewport (projected_x, projected_y, viewport->width, viewport->height); #else /* Set up viewport */ gles->viewport (projected_x, projected_y, projected_width, projected_height); #endif /* Update projection matrix */ gles->matrix_mode (PGM_GLES_PROJECTION); gles->load_identity (); transpose = pgm_mat4x4_transpose (projection); gles->load_matrix_f (transpose->m); pgm_mat4x4_free (transpose); gles->matrix_mode (PGM_GLES_MODELVIEW); /* Update all the drawables inside the viewport */ pgm_gles_viewport_update_drawable_projection (glesviewport); } /* Set up initial OpenGL ES states */ static void init_opengles_states (PgmGlesContext *glescontext) { PgmGlesContextProcAddress *gles = glescontext->gles; /* Enable texture mapping */ gles->enable (PGM_GLES_TEXTURE_2D); /* Enable blending */ gles->blend_func (PGM_GLES_SRC_ALPHA, PGM_GLES_ONE_MINUS_SRC_ALPHA); gles->enable (PGM_GLES_BLEND); /* Disable depth testing */ gles->disable (PGM_GLES_DEPTH_TEST); } /* Check whether an extension is supported by the OpenGL ES implementation given * the extension name and the list of supported extensions */ static gboolean has_opengl_extension (const gchar *extensions, const gchar *extension_name) { gchar *end; size_t ext_name_len = strlen (extension_name); gchar *p = (gchar*) extensions; size_t size; if (!extensions) return FALSE; end = p + strlen (p); while (p < end) { size = strcspn (p, " "); if ((ext_name_len == size) && (strncmp (extension_name, p, size) == 0)) return TRUE; p += size + 1; } return FALSE; } /* Bind the OpenGL ES extension proc addresses */ static void bind_opengles_extensions (PgmGlesContext *glescontext) { /* No extension functions to bind yet! */ return; } /* Compute the frame rate per second */ static void compute_frame_rate (PgmGlesContext *glescontext) { GTimeVal current_time; gfloat elapsed_time; static guint fps = 0; /* Retrieve current time and compute the time elapsed since the last tick */ g_get_current_time (¤t_time); elapsed_time = (current_time.tv_sec - glescontext->fps_tick_time.tv_sec) + (current_time.tv_usec - glescontext->fps_tick_time.tv_usec) * 0.000001f; /* Is the second elapsed? */ if (elapsed_time >= 1.0f) { glescontext->fps = fps; /* Set the new tick time */ glescontext->fps_tick_time.tv_sec = current_time.tv_sec; glescontext->fps_tick_time.tv_usec = current_time.tv_usec; /* Reset the counter */ fps = 0; } fps++; } /* Viewport update task handler */ static void do_projection (PgmGlesContext *glescontext, gpointer data) { update_projection (glescontext); pgm_gles_context_update (glescontext); } /* Screen resolution changes */ static void do_resolution (PgmGlesContext *context, gpointer data) { gint width, height; GST_OBJECT_LOCK (context->glesviewport); width = PGM_VIEWPORT (context->glesviewport)->width; height = PGM_VIEWPORT (context->glesviewport)->height; GST_OBJECT_UNLOCK (context->glesviewport); pgm_gles_backend_set_screen_resolution (context->backend, width, height); pgm_gles_context_update (context); } /* Alpha blending update task handler */ static void do_alpha_blending (PgmGlesContext *glescontext, gpointer data) { gboolean alpha_blending; GST_OBJECT_LOCK (glescontext->glesviewport); alpha_blending = PGM_VIEWPORT (glescontext->glesviewport)->alpha_blending; GST_OBJECT_UNLOCK (glescontext->glesviewport); if (alpha_blending) glescontext->gles->enable (PGM_GLES_BLEND); else glescontext->gles->disable (PGM_GLES_BLEND); pgm_gles_context_update (glescontext); } /* Visibility update task handler */ static void do_visibility (PgmGlesContext *glescontext, gpointer data) { gboolean visible; GST_OBJECT_LOCK (glescontext->glesviewport); visible = PGM_VIEWPORT (glescontext->glesviewport)->visible; GST_OBJECT_UNLOCK (glescontext->glesviewport); pgm_gles_backend_set_visibility (glescontext->backend, visible); } /* Frame buffer read task handler */ static void do_read_pixels (PgmGlesContext *glescontext, gpointer data) { PgmGlesViewportPixelRectangle *rectangle = (PgmGlesViewportPixelRectangle*) data; PgmGlesContextProcAddress *gles = glescontext->gles; PgmViewport *viewport = PGM_VIEWPORT (glescontext->glesviewport); PgmCanvas *canvas = viewport->canvas; /* Flush the queues ensuring last rendering requests will be completed */ pgm_gles_viewport_flush_update_queue (glescontext->glesviewport); flush_task_queue (glescontext, &glescontext->immediate_task); flush_task_queue (glescontext, &glescontext->deferred_task); /* If there's a canvas we need to invert the projection matrix upside-down. * Note that if there's no canvas bound, the pixels area will be black. */ if (G_LIKELY (canvas)) { gles->matrix_mode (PGM_GLES_PROJECTION); gles->push_matrix (); gles->scale_f (1.0f, -1.0f, 1.0f); gles->translate_f (0.0f, -canvas->height, 0.0f); gles->matrix_mode (PGM_GLES_MODELVIEW); } /* Draw the scene, read it from the back buffer, and clear the back buffer */ render (glescontext); gles->read_pixels (rectangle->x, rectangle->y, rectangle->width, rectangle->height, PGM_GLES_RGBA, PGM_GLES_UNSIGNED_BYTE, rectangle->pixels); gles->clear (PGM_GLES_COLOR_BUFFER_BIT); /* Pop our inverted projection matrix if needed */ if (G_LIKELY (canvas)) { gles->matrix_mode (PGM_GLES_PROJECTION); gles->pop_matrix (); gles->matrix_mode (PGM_GLES_MODELVIEW); } /* Push the read pixels back to the viewport */ pgm_viewport_push_pixels (viewport, rectangle->width, rectangle->height, rectangle->pixels); /* Then finally free the rectangle structure */ g_slice_free (PgmGlesViewportPixelRectangle, rectangle); rectangle = NULL; } /* Texture generation task handler */ static void do_gen_texture (PgmGlesContext *glescontext, gpointer data) { pgm_gles_texture_generate (PGM_GLES_TEXTURE_CAST (data)); } /* Texture clean up task handler */ static void do_clean_texture (PgmGlesContext *glescontext, gpointer data) { pgm_gles_texture_clean (PGM_GLES_TEXTURE_CAST (data)); } /* Texture upload task handler */ static void do_upload_texture (PgmGlesContext *glescontext, gpointer data) { pgm_gles_texture_upload (PGM_GLES_TEXTURE_CAST (data)); } /* Texture update task handler */ static void do_update_texture (PgmGlesContext *glescontext, gpointer data) { pgm_gles_texture_update (PGM_GLES_TEXTURE_CAST (data)); } /* Texture free task handler */ static void do_free_texture (PgmGlesContext *glescontext, gpointer data) { pgm_gles_texture_free (PGM_GLES_TEXTURE_CAST (data)); } /* Copy a layer */ static GList* copy_layer (GList *layer) { GList *new_layer = NULL; if (layer) { GList *last; new_layer = g_slice_new (GList); new_layer->data = g_object_ref (layer->data); new_layer->prev = NULL; last = new_layer; layer = layer->next; while (layer) { last->next = g_slice_new (GList); last->next->prev = last; last = last->next; last->data = g_object_ref (layer->data); layer = layer->next; } last->next = NULL; } return new_layer; } /* Render a layer */ static void render_layer (GList *layer) { GList *walk = layer; while (walk) { PgmGlesDrawable *glesdrawable = (PgmGlesDrawable*) walk->data; pgm_gles_drawable_draw (glesdrawable); g_object_unref (glesdrawable); walk = walk->next; } g_list_free (layer); } /* Traverse the layers and draw each drawable */ static void render (PgmGlesContext *glescontext) { GList *near_layer, *middle_layer, *far_layer; PgmGlesViewport *glesviewport = glescontext->glesviewport; /* Get copies of the layers */ g_mutex_lock (glesviewport->layer_lock); near_layer = copy_layer (glesviewport->near_layer); middle_layer = copy_layer (glesviewport->middle_layer); far_layer = copy_layer (glesviewport->far_layer); g_mutex_unlock (glesviewport->layer_lock); /* Then render each drawable of each layer */ render_layer (far_layer); render_layer (middle_layer); render_layer (near_layer); } /* Push a task in a queue removing a similar one if any */ static void push_task (PgmGlesContext *glescontext, GList **queue, PgmGlesContextTask *task) { GList *_queue = *queue; PgmGlesContextTask *queued_task; PGM_GLES_CONTEXT_LOCK (glescontext); /* Search and remove a similar task from the queue */ while (_queue) { queued_task = PGM_GLES_CONTEXT_TASK (_queue->data); if (queued_task->type == task->type && queued_task->data == task->data) { GList *next = _queue->next; if (_queue->prev) _queue->prev->next = next; else *queue = next; if (next) next->prev = _queue->prev; pgm_gles_context_task_free (PGM_GLES_CONTEXT_TASK (_queue->data)); g_list_free_1 (_queue); _queue = NULL; } else _queue = _queue->next; } /* And prepend the task in the queue */ *queue = g_list_prepend (*queue, task); PGM_GLES_CONTEXT_UNLOCK (glescontext); } /* Removes all the tasks with the given data from a queue */ static void remove_tasks_with_data (PgmGlesContext *glescontext, GList **queue, gconstpointer data) { GList *_queue = *queue; PGM_GLES_CONTEXT_LOCK (glescontext); /* Sequentially search for tasks with the corresponding data and remove * them until the end of the queue */ while (_queue) { if (PGM_GLES_CONTEXT_TASK (_queue->data)->data != data) _queue = _queue->next; else { GList *next = _queue->next; if (_queue->prev) _queue->prev->next = next; else *queue = next; if (next) next->prev = _queue->prev; pgm_gles_context_task_free (PGM_GLES_CONTEXT_TASK (_queue->data)); g_list_free_1 (_queue); _queue = next; } } PGM_GLES_CONTEXT_UNLOCK (glescontext); } /* Frees a task queue with all its remaining tasks */ static void free_task_queue (GList **queue) { GList *walk = *queue; while (walk) { pgm_gles_context_task_free ((PgmGlesContextTask *) walk->data); walk = walk->next; } g_list_free (*queue); *queue = NULL; } /* Flushes a task queue calling the correct handler for each tasks */ static void flush_task_queue (PgmGlesContext *glescontext, GList **queue) { PgmGlesContextTask *task; GList *reversed_queue, *walk; PGM_GLES_CONTEXT_LOCK (glescontext); reversed_queue = g_list_reverse (*queue); *queue = NULL; PGM_GLES_CONTEXT_UNLOCK (glescontext); walk = reversed_queue; while (walk) { task = PGM_GLES_CONTEXT_TASK (walk->data); glescontext->task_func[task->type] (glescontext, task->data); pgm_gles_context_task_free (task); walk = walk->next; } g_list_free (reversed_queue); reversed_queue = NULL; } /* i/o watch callback for immediate tasks */ static gboolean immediate_io_cb (GIOChannel *source, GIOCondition condition, gpointer data) { PgmGlesContext *glescontext = PGM_GLES_CONTEXT (data); gchar buf; g_io_channel_read_chars (source, &buf, 1, NULL, NULL); /* Complete the immediate task queue */ flush_task_queue (glescontext, &glescontext->immediate_task); return TRUE; } /* Update source */ static gboolean update_cb (gpointer data) { PgmGlesContext *glescontext = PGM_GLES_CONTEXT (data); /* User defined update callback */ pgm_viewport_emit_update_pass (PGM_VIEWPORT (glescontext->glesviewport)); /* Check if the viewport has not been disposed by an update pass handler */ if (G_LIKELY (glescontext->glesviewport)) { /* Flush update queue */ pgm_gles_viewport_flush_update_queue (glescontext->glesviewport); /* Flush rendering queues */ flush_task_queue (glescontext, &glescontext->immediate_task); flush_task_queue (glescontext, &glescontext->deferred_task); /* Render the scene */ render (glescontext); pgm_gles_backend_swap_buffers (glescontext->backend); glescontext->gles->clear (PGM_GLES_COLOR_BUFFER_BIT); /* Handle frame rate */ compute_frame_rate (glescontext); return TRUE; } else return FALSE; } /* Update timeout used to remove the update idle after 1 second of inactivity */ static gboolean update_removal_timeout_cb (gpointer data) { PgmGlesContext *glescontext = (PgmGlesContext*) data; GTimeVal current_time; g_get_current_time (¤t_time); g_mutex_lock (glescontext->update_mutex); /* If the elapsed time since the previous update request rises above one * second, remove the auto-update source */ if ((current_time.tv_sec - glescontext->update_timestamp.tv_sec) >= 2) { GSource *source; /* Get the source from the rendering GMainContext and remove it */ source = g_main_context_find_source_by_id (glescontext->render_context, glescontext->update_tag); if (source) g_source_destroy (source); glescontext->update_tag = 0; glescontext->auto_updated = FALSE; glescontext->fps = 0; g_mutex_unlock (glescontext->update_mutex); GST_DEBUG ("removing update source"); /* Remove ourself from the loop */ return FALSE; } g_mutex_unlock (glescontext->update_mutex); return TRUE; } /* Create a pipe and its i/o channels */ static void create_io_channels (gint *fd, GIOChannel **in, GIOChannel **out) { if (pipe (fd) == -1) { GST_ERROR ("cannot create the pipe"); return; } #ifdef WIN32 *in = g_io_channel_win32_new_fd (fd[1]); #else *in = g_io_channel_unix_new (fd[1]); #endif /* WIN32 */ if (!*in) { GST_ERROR ("cannot create the input channel"); return; } #ifdef WIN32 *out = g_io_channel_win32_new_fd (fd[0]); #else *out = g_io_channel_unix_new (fd[0]); #endif /* WIN32 */ if (!*out) { GST_ERROR ("cannot create the output channel"); return; } /* We don't close the fd ourselves because otherwise it deadlocks on windows */ g_io_channel_set_close_on_unref (*in, TRUE); g_io_channel_set_close_on_unref (*out, TRUE); } /* Close a pipe and unref its i/o channels */ static void delete_io_channels (gint *fd, GIOChannel **in, GIOChannel **out) { if (*out) { g_io_channel_unref (*out); *out = NULL; } if (*in) { g_io_channel_unref (*in); *in = NULL; } } /* Write a byte in the given i/o channel */ static inline void write_char (GIOChannel *channel) { if (G_LIKELY (channel)) { g_io_channel_write_chars (channel, "#", 1, NULL, NULL); g_io_channel_flush (channel, NULL); } } /* Add an input watch to a specific context */ static guint add_input_watch (GIOChannel *channel, GIOFunc func, gpointer user_data, GMainContext *context) { GSource *source; guint id; source = g_io_create_watch (channel, G_IO_IN); g_source_set_callback (source, (GSourceFunc) func, user_data, NULL); id = g_source_attach (source, context); g_source_unref (source); return id; } /* Rendering thread entry point, initialize and launch the rendering loop. * FIXME: Correct error handling */ static gpointer render_loop (gpointer data) { PgmGlesContext *glescontext = (PgmGlesContext *) data; PgmGlesContextProcAddress *gles = NULL; const gchar *env_var = NULL; GSource *source; gint i = 0; #ifndef HAVE_OPENGLES_PC_EMULATION glescontext->backend = pgm_gles_egl_backend_new (glescontext); #else glescontext->backend = pgm_gles_x_backend_new (glescontext); #endif /* HAVE_OPENGLES_PC_EMULATION */ pgm_gles_backend_create_window (glescontext->backend); glescontext->gles = gles = &gles_proc_address; /* Retrieve renderer informations */ glescontext->version_string = (const gchar*) gles->get_string (PGM_GLES_VERSION); glescontext->vendor = (const gchar*) gles->get_string (PGM_GLES_VENDOR); glescontext->renderer = (const gchar*) gles->get_string (PGM_GLES_RENDERER); glescontext->extensions = (const gchar*) gles->get_string (PGM_GLES_EXTENSIONS); /* Add some debug info */ GST_INFO ("OpenGL ES vendor: %s", glescontext->vendor); GST_INFO ("OpenGL ES renderer: %s", glescontext->renderer); GST_INFO ("OpenGL ES version: %s", glescontext->version_string); GST_DEBUG ("OpenGL ES extensions: %s", glescontext->extensions); /* Retrieve and bind supported extensions */ while (gles_extensions_map[i].name) { if (has_opengl_extension (glescontext->extensions, gles_extensions_map[i].name)) glescontext->feature_mask |= gles_extensions_map[i].feature_mask; i++; } bind_opengles_extensions (glescontext); /* Maximum texture size */ gles->get_integer_v (PGM_GLES_MAX_TEXTURE_SIZE, &glescontext->max_texture_size); GST_INFO ("OpenGL ES max texture size: %d", glescontext->max_texture_size); /* Init OpenGL ES */ init_opengles_states (glescontext); gles->clear (PGM_GLES_COLOR_BUFFER_BIT); /* Add the immediate source to the rendering thread GMainContext */ glescontext->immediate_tag = add_input_watch (glescontext->immediate_out, (GIOFunc) immediate_io_cb, glescontext, glescontext->render_context); /* Get the framerate requested by the user in the environment */ env_var = g_getenv ("PGM_GLES_FPS"); if (env_var) { gint fps = atoi (env_var); if (fps > 0) { GST_INFO ("Requested FPS: %d", fps); glescontext->requested_fps = 1000 / fps; } } /* Signal application thread that the rendering thread is now initialized */ g_mutex_lock (glescontext->init_mutex); glescontext->initialized = TRUE; g_cond_signal (glescontext->init_cond); g_mutex_unlock (glescontext->init_mutex); /* Enter the main loop */ g_main_loop_run (glescontext->render_loop); /* Dispose immediate source data */ source = g_main_context_find_source_by_id (glescontext->render_context, glescontext->immediate_tag); if (source) g_source_destroy (source); delete_io_channels (glescontext->immediate_fd, &glescontext->immediate_in, &glescontext->immediate_out); glescontext->immediate_in = NULL; glescontext->immediate_out = NULL; /* Free the task queues */ free_task_queue (&glescontext->deferred_task); free_task_queue (&glescontext->immediate_task); /* Clean up rendering thread related data */ pgm_gles_backend_destroy_window (glescontext->backend); gst_object_unref (glescontext->backend); /* Signal application thread that the rendering thread is now finalized, * no need to signal if the context is disposed in the rendering thread */ if (glescontext->fini_signal) { g_mutex_lock (glescontext->fini_mutex); glescontext->finalized = TRUE; g_cond_signal (glescontext->fini_cond); g_mutex_unlock (glescontext->fini_mutex); } return NULL; } /* Initialize context creating the rendering thread */ static gboolean init_gles_context (PgmGlesContext *glescontext) { GError *error = NULL; /* Structure access */ glescontext->mutex = g_mutex_new (); /* Context and loop creation */ glescontext->render_context = g_main_context_new (); glescontext->render_loop = g_main_loop_new (glescontext->render_context, FALSE); /* Initialization lock */ glescontext->init_mutex = g_mutex_new (); glescontext->init_cond = g_cond_new (); glescontext->initialized = FALSE; /* Finalization lock */ glescontext->fini_mutex = g_mutex_new (); glescontext->fini_cond = g_cond_new (); glescontext->fini_signal = FALSE; glescontext->finalized = FALSE; /* Immediate task source */ glescontext->immediate_fd[0] = -1; glescontext->immediate_fd[1] = -1; glescontext->immediate_in = NULL; glescontext->immediate_out = NULL; glescontext->immediate_tag = 0; create_io_channels (glescontext->immediate_fd, &glescontext->immediate_in, &glescontext->immediate_out); /* Task queues */ glescontext->immediate_task = NULL; glescontext->deferred_task = NULL; /* Auto-update */ glescontext->update_mutex = g_mutex_new (); glescontext->auto_updated = FALSE; g_get_current_time (&glescontext->update_timestamp); glescontext->update_tag = 0; glescontext->requested_fps = 0; /* Frame rate */ g_get_current_time (&glescontext->fps_tick_time); glescontext->fps = 0; /* Create rendering thread */ glescontext->render_thread = g_thread_create (render_loop, glescontext, FALSE, &error); if (error != NULL) { GST_ERROR ("couldn't create rendering thread: %s", error->message); return FALSE; } /* Various tasks function binding */ glescontext->task_func[PGM_GLES_CONTEXT_PROJECTION] = GST_DEBUG_FUNCPTR (do_projection); glescontext->task_func[PGM_GLES_CONTEXT_VISIBILITY] = GST_DEBUG_FUNCPTR (do_visibility); glescontext->task_func[PGM_GLES_CONTEXT_ALPHA_BLENDING] = GST_DEBUG_FUNCPTR (do_alpha_blending); glescontext->task_func[PGM_GLES_CONTEXT_READ_PIXELS] = GST_DEBUG_FUNCPTR (do_read_pixels); glescontext->task_func[PGM_GLES_CONTEXT_RESOLUTION] = GST_DEBUG_FUNCPTR (do_resolution); /* Texture related tasks function binding */ glescontext->task_func[PGM_GLES_CONTEXT_GEN_TEXTURE] = GST_DEBUG_FUNCPTR (do_gen_texture); glescontext->task_func[PGM_GLES_CONTEXT_CLEAN_TEXTURE] = GST_DEBUG_FUNCPTR (do_clean_texture); glescontext->task_func[PGM_GLES_CONTEXT_UPLOAD_TEXTURE] = GST_DEBUG_FUNCPTR (do_upload_texture); glescontext->task_func[PGM_GLES_CONTEXT_UPDATE_TEXTURE] = GST_DEBUG_FUNCPTR (do_update_texture); glescontext->task_func[PGM_GLES_CONTEXT_FREE_TEXTURE] = GST_DEBUG_FUNCPTR (do_free_texture); /* Wait for the rendering thread initialization completion */ g_mutex_lock (glescontext->init_mutex); if (!glescontext->initialized) g_cond_wait (glescontext->init_cond, glescontext->init_mutex); g_mutex_unlock (glescontext->init_mutex); return TRUE; } /* Public functions */ PgmGlesContext * pgm_gles_context_new (PgmGlesViewport *glesviewport) { PgmGlesContext *glescontext; gboolean initialized; glescontext = g_slice_new0 (PgmGlesContext); glescontext->glesviewport = glesviewport; initialized = init_gles_context (glescontext); if (!initialized) { g_slice_free (PgmGlesContext, glescontext); glescontext = NULL; } return glescontext; } void pgm_gles_context_free (PgmGlesContext *glescontext) { g_return_if_fail (glescontext != NULL); /* Store whether the context disposition happens in the rendering thread */ glescontext->fini_signal = g_thread_self () != glescontext->render_thread; /* Quit the rendering loop */ g_main_loop_quit (glescontext->render_loop); /* Wait for the rendering thread finalization completion if the context * disposition happens in the rendering thread */ if (glescontext->fini_signal) { g_mutex_lock (glescontext->fini_mutex); if (!glescontext->finalized) g_cond_wait (glescontext->fini_cond, glescontext->fini_mutex); g_mutex_unlock (glescontext->fini_mutex); } /* Free the context */ g_main_loop_unref (glescontext->render_loop); g_main_context_unref (glescontext->render_context); g_mutex_free (glescontext->fini_mutex); g_cond_free (glescontext->fini_cond); g_mutex_free (glescontext->update_mutex); g_mutex_free (glescontext->init_mutex); g_cond_free (glescontext->init_cond); g_mutex_free (glescontext->mutex); g_slice_free (PgmGlesContext, glescontext); } PgmGlesContextTask * pgm_gles_context_task_new (PgmGlesContextTaskType type, gpointer data) { PgmGlesContextTask *task; task = g_slice_new0 (PgmGlesContextTask); task->type = type; task->data = data; return task; } void pgm_gles_context_task_free (PgmGlesContextTask *task) { g_return_if_fail (task != NULL); task->data = NULL; g_slice_free (PgmGlesContextTask, task); } void pgm_gles_context_update (PgmGlesContext *glescontext) { g_return_if_fail (glescontext != NULL); g_mutex_lock (glescontext->update_mutex); /* Get a timestamp of the last update request */ g_get_current_time (&glescontext->update_timestamp); /* Add the auto-update if the rendering loop is stopped */ if (G_UNLIKELY (!glescontext->auto_updated)) { GSource *source; /* Add the update source to the rendering GMainContext. If the user has * not specified a framerate through the PGM_GLES_FPS environment * variable, an idle source blocked on the vsync is attached. Otherwise, * a timeout source with the specified framerate is attached. */ if (G_LIKELY (glescontext->requested_fps == 0)) { GST_DEBUG ("adding update idle source"); source = g_idle_source_new (); g_source_set_priority ((GSource*) source, G_PRIORITY_DEFAULT); } else { GST_DEBUG ("adding update timeout source"); source = g_timeout_source_new (glescontext->requested_fps); } g_source_set_callback (source, update_cb, glescontext, NULL); glescontext->update_tag = g_source_attach (source, glescontext->render_context); g_source_unref (source); /* Add the update removal timeout to the rendering GMainContext */ source = g_timeout_source_new (750); g_source_set_callback (source, update_removal_timeout_cb, glescontext, NULL); g_source_attach (source, glescontext->render_context); g_source_unref (source); /* Mark the render loop as auto-updated */ glescontext->auto_updated = TRUE; } g_mutex_unlock (glescontext->update_mutex); } void pgm_gles_context_push_immediate_task (PgmGlesContext *glescontext, PgmGlesContextTask *task) { g_return_if_fail (glescontext != NULL); push_task (glescontext, &glescontext->immediate_task, task); write_char (glescontext->immediate_in); } void pgm_gles_context_push_deferred_task (PgmGlesContext *glescontext, PgmGlesContextTask *task) { g_return_if_fail (glescontext != NULL); push_task (glescontext, &glescontext->deferred_task, task); } void pgm_gles_context_remove_tasks_with_data (PgmGlesContext *glescontext, gconstpointer data) { g_return_if_fail (glescontext != NULL); remove_tasks_with_data (glescontext, &glescontext->immediate_task, data); remove_tasks_with_data (glescontext, &glescontext->deferred_task, data); } pigment-0.3.17/plugins/opengles/pgmglesviewport.h0000644000175000017500000000734611205034416017100 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment OpenGL ES-CM 1.1 plugin * * Copyright © 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ #ifndef __PGM_GLES_VIEWPORT_H__ #define __PGM_GLES_VIEWPORT_H__ /* pgmglesviewport.h and pgmglescontext.h/pgmglesdrawable.h include eachother */ typedef struct _PgmGlesViewport PgmGlesViewport; typedef struct _PgmGlesViewportClass PgmGlesViewportClass; #include "pgmglescontext.h" #include "pgmglesdrawable.h" G_BEGIN_DECLS #define PGM_TYPE_GLES_VIEWPORT (pgm_gles_viewport_get_type()) #define PGM_GLES_VIEWPORT(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), PGM_TYPE_GLES_VIEWPORT, PgmGlesViewport)) #define PGM_GLES_VIEWPORT_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), PGM_TYPE_GLES_VIEWPORT, PgmGlesViewportClass)) #define PGM_IS_GLES_VIEWPORT(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), PGM_TYPE_GLES_VIEWPORT)) #define PGM_IS_GLES_VIEWPORT_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), PGM_TYPE_GLES_VIEWPORT)) #define PGM_GLES_VIEWPORT_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS((obj), PGM_TYPE_GLES_VIEWPORT, PgmGlesViewportClass)) /* FIXME: Hardly maintainable */ #define PROPERTY_CHANGED_COUNT 46 typedef void (*PgmGlesDrawableChangedFunc) (PgmGlesDrawable *glesdrawable); struct _PgmGlesViewport { PgmViewport parent; /* Canvas bound */ PgmCanvas *canvas; /* PgmGlDrawable layer lists */ GList *far_layer; GList *middle_layer; GList *near_layer; GMutex *layer_lock; /* Update task queue */ GSList *update_queue; GMutex *update_lock; /* PgmDrawable/PgmGlesDrawable lookup hash */ GHashTable *drawable_hash; /* OpenGL ES context */ PgmGlesContext *context; /* Signal handler IDs */ gulong add_handler; gulong remove_handler; gulong reorder_handler; gulong regenerated_handler; /* Projection informations */ gfloat projected_w; gfloat projected_h; gfloat canvas_w; gfloat canvas_h; /* Capacities mask */ gulong capacities; /* Drag status */ gboolean drag_status; }; struct _PgmGlesViewportClass { PgmViewportClass parent_class; /* Drawable changed function pointers */ PgmGlesDrawableChangedFunc changed_func[PROPERTY_CHANGED_COUNT]; }; /* Pixel rectangle */ typedef struct _PgmGlesViewportPixelRectangle { guint x; guint y; guint width; guint height; guint8 *pixels; } PgmGlesViewportPixelRectangle; GType pgm_gles_viewport_get_type (void) G_GNUC_CONST; PgmViewport *pgm_gles_viewport_new (void); void pgm_gles_viewport_register (GTypeModule *module); void pgm_gles_viewport_flush_update_queue (PgmGlesViewport *glesviewport); void pgm_gles_viewport_update_drawable_projection (PgmGlesViewport *glesviewport); void pgm_gles_viewport_connect_changed_callback (PgmGlesViewport *glesviewport, PgmGlesDrawable *glesdrawable); G_END_DECLS #endif /* __PGM_GLES_VIEWPORT_H__ */ pigment-0.3.17/plugins/opengles/Makefile.in0000644000175000017500000010035211205034674015533 00000000000000# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @USE_OPENGLES_PC_EMULATION_TRUE@am__append_1 = pgmglesxbackend.c @USE_OPENGLES_PC_EMULATION_FALSE@am__append_2 = pgmgleseglbackend.c subdir = plugins/opengles DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/as-compiler-flag.m4 \ $(top_srcdir)/common/m4/as-version.m4 \ $(top_srcdir)/common/m4/check.m4 \ $(top_srcdir)/common/m4/gst-args.m4 \ $(top_srcdir)/common/m4/gst-check.m4 \ $(top_srcdir)/common/m4/gst-error.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/libtool.m4 \ $(top_srcdir)/common/m4/ltoptions.m4 \ $(top_srcdir)/common/m4/ltsugar.m4 \ $(top_srcdir)/common/m4/ltversion.m4 \ $(top_srcdir)/common/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(plugindir)" pluginLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(plugin_LTLIBRARIES) am__DEPENDENCIES_1 = am__libpgmopengles_la_SOURCES_DIST = pgmgles.c pgmglestexture.c \ pgmglescontext.c pgmglesbackend.c pgmglesdrawable.c \ pgmglesviewport.c pgmglesimage.c pgmglestext.c \ pgmglesxbackend.c pgmgleseglbackend.c @USE_OPENGLES_PC_EMULATION_TRUE@am__objects_1 = libpgmopengles_la-pgmglesxbackend.lo @USE_OPENGLES_PC_EMULATION_FALSE@am__objects_2 = libpgmopengles_la-pgmgleseglbackend.lo am_libpgmopengles_la_OBJECTS = libpgmopengles_la-pgmgles.lo \ libpgmopengles_la-pgmglestexture.lo \ libpgmopengles_la-pgmglescontext.lo \ libpgmopengles_la-pgmglesbackend.lo \ libpgmopengles_la-pgmglesdrawable.lo \ libpgmopengles_la-pgmglesviewport.lo \ libpgmopengles_la-pgmglesimage.lo \ libpgmopengles_la-pgmglestext.lo $(am__objects_1) \ $(am__objects_2) libpgmopengles_la_OBJECTS = $(am_libpgmopengles_la_OBJECTS) libpgmopengles_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(libpgmopengles_la_CFLAGS) $(CFLAGS) \ $(libpgmopengles_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libpgmopengles_la_SOURCES) DIST_SOURCES = $(am__libpgmopengles_la_SOURCES_DIST) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAIROXLIB_CFLAGS = @CAIROXLIB_CFLAGS@ CAIROXLIB_LIBS = @CAIROXLIB_LIBS@ CAIRO_CFLAGS = @CAIRO_CFLAGS@ CAIRO_LIBS = @CAIRO_LIBS@ CC = @CC@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXEEXT = @EXEEXT@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ GCOV = @GCOV@ GCOV_CFLAGS = @GCOV_CFLAGS@ GCOV_LIBS = @GCOV_LIBS@ GDKPIXBUFXLIB_CFLAGS = @GDKPIXBUFXLIB_CFLAGS@ GDKPIXBUFXLIB_LIBS = @GDKPIXBUFXLIB_LIBS@ GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@ GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ GST_0_10_13_CFLAGS = @GST_0_10_13_CFLAGS@ GST_0_10_13_LIBS = @GST_0_10_13_LIBS@ GST_10_10_CFLAGS = @GST_10_10_CFLAGS@ GST_10_10_LIBS = @GST_10_10_LIBS@ GST_10_11_CFLAGS = @GST_10_11_CFLAGS@ GST_10_11_LIBS = @GST_10_11_LIBS@ GST_10_12_CFLAGS = @GST_10_12_CFLAGS@ GST_10_12_LIBS = @GST_10_12_LIBS@ GST_10_13_CFLAGS = @GST_10_13_CFLAGS@ GST_10_13_LIBS = @GST_10_13_LIBS@ GST_10_14_CFLAGS = @GST_10_14_CFLAGS@ GST_10_14_LIBS = @GST_10_14_LIBS@ GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ GST_BASE_LIBS = @GST_BASE_LIBS@ GST_CFLAGS = @GST_CFLAGS@ GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ GST_CHECK_LIBS = @GST_CHECK_LIBS@ GST_LIBS = @GST_LIBS@ GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ GST_TOOLS_DIR = @GST_TOOLS_DIR@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_GTK_WIDGET = @HAVE_GTK_WIDGET@ HAVE_IMAGING_LIBRARY = @HAVE_IMAGING_LIBRARY@ HAVE_OPENGLES_PLUGIN = @HAVE_OPENGLES_PLUGIN@ HAVE_OPENGL_PLUGIN = @HAVE_OPENGL_PLUGIN@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGLADE_2_0_CFLAGS = @LIBGLADE_2_0_CFLAGS@ LIBGLADE_2_0_LIBS = @LIBGLADE_2_0_LIBS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENGLES_BACKEND = @OPENGLES_BACKEND@ OPENGL_BACKEND = @OPENGL_BACKEND@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ PANGOCAIRO_CFLAGS = @PANGOCAIRO_CFLAGS@ PANGOCAIRO_LIBS = @PANGOCAIRO_LIBS@ PANGO_1_16_CFLAGS = @PANGO_1_16_CFLAGS@ PANGO_1_16_LIBS = @PANGO_1_16_LIBS@ PANGO_CFLAGS = @PANGO_CFLAGS@ PANGO_LIBS = @PANGO_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL_PATH = @PERL_PATH@ PGM_ALL_CFLAGS = @PGM_ALL_CFLAGS@ PGM_ALL_LDFLAGS = @PGM_ALL_LDFLAGS@ PGM_ALL_LIBS = @PGM_ALL_LIBS@ PGM_GLES_CFLAGS = @PGM_GLES_CFLAGS@ PGM_GLES_LIBS = @PGM_GLES_LIBS@ PGM_GL_CFLAGS = @PGM_GL_CFLAGS@ PGM_GL_LIBS = @PGM_GL_LIBS@ PGM_GTKDOC_CFLAGS = @PGM_GTKDOC_CFLAGS@ PGM_LIB_LDFLAGS = @PGM_LIB_LDFLAGS@ PGM_LT_LDFLAGS = @PGM_LT_LDFLAGS@ PGM_LT_VERSION = @PGM_LT_VERSION@ PGM_MAJORMINOR = @PGM_MAJORMINOR@ PGM_OBJ_CFLAGS = @PGM_OBJ_CFLAGS@ PGM_OBJ_LIBS = @PGM_OBJ_LIBS@ PGM_OPTION_CFLAGS = @PGM_OPTION_CFLAGS@ PGM_PLUGIN_LDFLAGS = @PGM_PLUGIN_LDFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PLUGIN_PATH = @PLUGIN_PATH@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XCOMPOSITE_CFLAGS = @XCOMPOSITE_CFLAGS@ XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ XMKMF = @XMKMF@ XRENDER_CFLAGS = @XRENDER_CFLAGS@ XRENDER_LIBS = @XRENDER_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cairo_req = @cairo_req@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ glib_req = @glib_req@ gstreamer_plugins_base_req = @gstreamer_plugins_base_req@ gstreamer_req = @gstreamer_req@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pango_req = @pango_req@ pangocairo_req = @pangocairo_req@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ plugindir = @PLUGIN_PATH@ plugin_LTLIBRARIES = libpgmopengles.la libpgmopengles_la_DEPENDENCIES = $(top_builddir)/pgm/libpigment-@PGM_MAJORMINOR@.la libpgmopengles_la_SOURCES = pgmgles.c pgmglestexture.c \ pgmglescontext.c pgmglesbackend.c pgmglesdrawable.c \ pgmglesviewport.c pgmglesimage.c pgmglestext.c $(am__append_1) \ $(am__append_2) libpgmopengles_la_CFLAGS = \ $(PGM_OPTION_CFLAGS) \ $(PGM_OBJ_CFLAGS) \ $(PGM_GLES_CFLAGS) libpgmopengles_la_LIBADD = \ $(PGM_OBJ_LIBS) \ $(PGM_GLES_LIBS) libpgmopengles_la_LDFLAGS = $(PGM_PLUGIN_LDFLAGS) noinst_HEADERS = \ pgmglesbackend.h \ pgmglesxbackend.h \ pgmgleseglbackend.h \ pgmglestexture.h \ pgmglescontext.h \ pgmglesdefs.h \ pgmglesdrawable.h \ pgmglesimage.h \ pgmglestext.h \ pgmglesviewport.h CLEANFILES = \ *.gcno \ *.gcda \ *.gcov \ *.gcov.out all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/opengles/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/opengles/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(plugindir)" || $(MKDIR_P) "$(DESTDIR)$(plugindir)" @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(plugindir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(plugindir)/$$f"; \ else :; fi; \ done uninstall-pluginLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$p'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$p"; \ done clean-pluginLTLIBRARIES: -test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES) @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libpgmopengles.la: $(libpgmopengles_la_OBJECTS) $(libpgmopengles_la_DEPENDENCIES) $(libpgmopengles_la_LINK) -rpath $(plugindir) $(libpgmopengles_la_OBJECTS) $(libpgmopengles_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpgmopengles_la-pgmgles.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpgmopengles_la-pgmglesbackend.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpgmopengles_la-pgmglescontext.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpgmopengles_la-pgmglesdrawable.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpgmopengles_la-pgmgleseglbackend.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpgmopengles_la-pgmglesimage.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpgmopengles_la-pgmglestext.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpgmopengles_la-pgmglestexture.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpgmopengles_la-pgmglesviewport.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpgmopengles_la-pgmglesxbackend.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libpgmopengles_la-pgmgles.lo: pgmgles.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpgmopengles_la_CFLAGS) $(CFLAGS) -MT libpgmopengles_la-pgmgles.lo -MD -MP -MF $(DEPDIR)/libpgmopengles_la-pgmgles.Tpo -c -o libpgmopengles_la-pgmgles.lo `test -f 'pgmgles.c' || echo '$(srcdir)/'`pgmgles.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpgmopengles_la-pgmgles.Tpo $(DEPDIR)/libpgmopengles_la-pgmgles.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pgmgles.c' object='libpgmopengles_la-pgmgles.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpgmopengles_la_CFLAGS) $(CFLAGS) -c -o libpgmopengles_la-pgmgles.lo `test -f 'pgmgles.c' || echo '$(srcdir)/'`pgmgles.c libpgmopengles_la-pgmglestexture.lo: pgmglestexture.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpgmopengles_la_CFLAGS) $(CFLAGS) -MT libpgmopengles_la-pgmglestexture.lo -MD -MP -MF $(DEPDIR)/libpgmopengles_la-pgmglestexture.Tpo -c -o libpgmopengles_la-pgmglestexture.lo `test -f 'pgmglestexture.c' || echo '$(srcdir)/'`pgmglestexture.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpgmopengles_la-pgmglestexture.Tpo $(DEPDIR)/libpgmopengles_la-pgmglestexture.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pgmglestexture.c' object='libpgmopengles_la-pgmglestexture.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpgmopengles_la_CFLAGS) $(CFLAGS) -c -o libpgmopengles_la-pgmglestexture.lo `test -f 'pgmglestexture.c' || echo '$(srcdir)/'`pgmglestexture.c libpgmopengles_la-pgmglescontext.lo: pgmglescontext.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpgmopengles_la_CFLAGS) $(CFLAGS) -MT libpgmopengles_la-pgmglescontext.lo -MD -MP -MF $(DEPDIR)/libpgmopengles_la-pgmglescontext.Tpo -c -o libpgmopengles_la-pgmglescontext.lo `test -f 'pgmglescontext.c' || echo '$(srcdir)/'`pgmglescontext.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpgmopengles_la-pgmglescontext.Tpo $(DEPDIR)/libpgmopengles_la-pgmglescontext.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pgmglescontext.c' object='libpgmopengles_la-pgmglescontext.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpgmopengles_la_CFLAGS) $(CFLAGS) -c -o libpgmopengles_la-pgmglescontext.lo `test -f 'pgmglescontext.c' || echo '$(srcdir)/'`pgmglescontext.c libpgmopengles_la-pgmglesbackend.lo: pgmglesbackend.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpgmopengles_la_CFLAGS) $(CFLAGS) -MT libpgmopengles_la-pgmglesbackend.lo -MD -MP -MF $(DEPDIR)/libpgmopengles_la-pgmglesbackend.Tpo -c -o libpgmopengles_la-pgmglesbackend.lo `test -f 'pgmglesbackend.c' || echo '$(srcdir)/'`pgmglesbackend.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpgmopengles_la-pgmglesbackend.Tpo $(DEPDIR)/libpgmopengles_la-pgmglesbackend.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pgmglesbackend.c' object='libpgmopengles_la-pgmglesbackend.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpgmopengles_la_CFLAGS) $(CFLAGS) -c -o libpgmopengles_la-pgmglesbackend.lo `test -f 'pgmglesbackend.c' || echo '$(srcdir)/'`pgmglesbackend.c libpgmopengles_la-pgmglesdrawable.lo: pgmglesdrawable.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpgmopengles_la_CFLAGS) $(CFLAGS) -MT libpgmopengles_la-pgmglesdrawable.lo -MD -MP -MF $(DEPDIR)/libpgmopengles_la-pgmglesdrawable.Tpo -c -o libpgmopengles_la-pgmglesdrawable.lo `test -f 'pgmglesdrawable.c' || echo '$(srcdir)/'`pgmglesdrawable.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpgmopengles_la-pgmglesdrawable.Tpo $(DEPDIR)/libpgmopengles_la-pgmglesdrawable.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pgmglesdrawable.c' object='libpgmopengles_la-pgmglesdrawable.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpgmopengles_la_CFLAGS) $(CFLAGS) -c -o libpgmopengles_la-pgmglesdrawable.lo `test -f 'pgmglesdrawable.c' || echo '$(srcdir)/'`pgmglesdrawable.c libpgmopengles_la-pgmglesviewport.lo: pgmglesviewport.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpgmopengles_la_CFLAGS) $(CFLAGS) -MT libpgmopengles_la-pgmglesviewport.lo -MD -MP -MF $(DEPDIR)/libpgmopengles_la-pgmglesviewport.Tpo -c -o libpgmopengles_la-pgmglesviewport.lo `test -f 'pgmglesviewport.c' || echo '$(srcdir)/'`pgmglesviewport.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpgmopengles_la-pgmglesviewport.Tpo $(DEPDIR)/libpgmopengles_la-pgmglesviewport.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pgmglesviewport.c' object='libpgmopengles_la-pgmglesviewport.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpgmopengles_la_CFLAGS) $(CFLAGS) -c -o libpgmopengles_la-pgmglesviewport.lo `test -f 'pgmglesviewport.c' || echo '$(srcdir)/'`pgmglesviewport.c libpgmopengles_la-pgmglesimage.lo: pgmglesimage.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpgmopengles_la_CFLAGS) $(CFLAGS) -MT libpgmopengles_la-pgmglesimage.lo -MD -MP -MF $(DEPDIR)/libpgmopengles_la-pgmglesimage.Tpo -c -o libpgmopengles_la-pgmglesimage.lo `test -f 'pgmglesimage.c' || echo '$(srcdir)/'`pgmglesimage.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpgmopengles_la-pgmglesimage.Tpo $(DEPDIR)/libpgmopengles_la-pgmglesimage.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pgmglesimage.c' object='libpgmopengles_la-pgmglesimage.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpgmopengles_la_CFLAGS) $(CFLAGS) -c -o libpgmopengles_la-pgmglesimage.lo `test -f 'pgmglesimage.c' || echo '$(srcdir)/'`pgmglesimage.c libpgmopengles_la-pgmglestext.lo: pgmglestext.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpgmopengles_la_CFLAGS) $(CFLAGS) -MT libpgmopengles_la-pgmglestext.lo -MD -MP -MF $(DEPDIR)/libpgmopengles_la-pgmglestext.Tpo -c -o libpgmopengles_la-pgmglestext.lo `test -f 'pgmglestext.c' || echo '$(srcdir)/'`pgmglestext.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpgmopengles_la-pgmglestext.Tpo $(DEPDIR)/libpgmopengles_la-pgmglestext.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pgmglestext.c' object='libpgmopengles_la-pgmglestext.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpgmopengles_la_CFLAGS) $(CFLAGS) -c -o libpgmopengles_la-pgmglestext.lo `test -f 'pgmglestext.c' || echo '$(srcdir)/'`pgmglestext.c libpgmopengles_la-pgmglesxbackend.lo: pgmglesxbackend.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpgmopengles_la_CFLAGS) $(CFLAGS) -MT libpgmopengles_la-pgmglesxbackend.lo -MD -MP -MF $(DEPDIR)/libpgmopengles_la-pgmglesxbackend.Tpo -c -o libpgmopengles_la-pgmglesxbackend.lo `test -f 'pgmglesxbackend.c' || echo '$(srcdir)/'`pgmglesxbackend.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpgmopengles_la-pgmglesxbackend.Tpo $(DEPDIR)/libpgmopengles_la-pgmglesxbackend.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pgmglesxbackend.c' object='libpgmopengles_la-pgmglesxbackend.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpgmopengles_la_CFLAGS) $(CFLAGS) -c -o libpgmopengles_la-pgmglesxbackend.lo `test -f 'pgmglesxbackend.c' || echo '$(srcdir)/'`pgmglesxbackend.c libpgmopengles_la-pgmgleseglbackend.lo: pgmgleseglbackend.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpgmopengles_la_CFLAGS) $(CFLAGS) -MT libpgmopengles_la-pgmgleseglbackend.lo -MD -MP -MF $(DEPDIR)/libpgmopengles_la-pgmgleseglbackend.Tpo -c -o libpgmopengles_la-pgmgleseglbackend.lo `test -f 'pgmgleseglbackend.c' || echo '$(srcdir)/'`pgmgleseglbackend.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpgmopengles_la-pgmgleseglbackend.Tpo $(DEPDIR)/libpgmopengles_la-pgmgleseglbackend.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pgmgleseglbackend.c' object='libpgmopengles_la-pgmgleseglbackend.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpgmopengles_la_CFLAGS) $(CFLAGS) -c -o libpgmopengles_la-pgmgleseglbackend.lo `test -f 'pgmgleseglbackend.c' || echo '$(srcdir)/'`pgmgleseglbackend.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(plugindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-pluginLTLIBRARIES install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-pluginLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-pluginLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-pluginLTLIBRARIES \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-pluginLTLIBRARIES %.c.gcov: .libs/libpgmopengles_la-%.gcda %.c LANG=C $(GCOV) -b -f -o $^ > $@.out gcov: $(libpgmopengles_la_SOURCES:=.gcov) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pigment-0.3.17/plugins/opengles/pgmglesviewport.c0000644000175000017500000013070611205034416017070 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment OpenGL ES-CM 1.1 plugin * * Copyright © 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ /* * The plugin duplicates all "generic" Pigment drawables in GLES drawables. The * GLES drawables are stored in layer (lists) inside the GLES viewport object. * The generic layers are duplicated when the user calls * pgm_viewport_set_canvas(). The duplicated GLES drawables are deleted when the * canvas is disposed, when another canvas is bound or when NULL is bound. The * GLES Viewport is connected to the Canvas 'added' and 'removed' signals so * that it can update the GLES drawable layers to reflect the "generic" one. * * The link between the "generic" and the GLES drawable is done through a * dedicated hash-table using the "generic" drawable address as the key and the * GL drawable address as the value. When a "generic" drawable property changes, * it emits the 'changed' signal to which the GLES Viewport is connected. The * handler stores the change as a task in an update queue which is flushed * during the automatic update done in the rendering thread in GLES Context. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include "pgmglesviewport.h" #include "pgmglesimage.h" #include "pgmglestext.h" GST_DEBUG_CATEGORY_STATIC (pgm_gles_viewport_debug); #define GST_CAT_DEFAULT pgm_gles_viewport_debug /* Task types */ typedef enum { TASK_CHANGE, TASK_REORDER, TASK_ADD, TASK_REMOVE, TASK_REGENERATE, LAST_TASK } TaskType; /* Change task */ typedef struct { TaskType type; PgmGlesDrawable *glesdrawable; PgmDrawableProperty property; } TaskChange; /* Reorder task */ typedef struct { TaskType type; PgmGlesDrawable *drawable; PgmDrawableLayer layer; guint order; } TaskReorder; /* Add task */ typedef struct { TaskType type; PgmDrawable *drawable; PgmDrawableLayer layer; guint order; } TaskAdd; /* Remove task */ typedef struct { TaskType type; PgmDrawable *drawable; PgmDrawableLayer layer; } TaskRemove; /* Any task */ typedef struct { TaskType type; } TaskAny; /* Task */ typedef union { TaskType type; TaskAny any; TaskChange change; TaskReorder reorder; TaskAdd add; TaskRemove remove; } Task; /* Task function type definition */ typedef void (*TaskFunc) (PgmGlesViewport *glesviewport, Task *task); /* Task function prototypes */ static void do_task_change (PgmGlesViewport *glesviewport, Task *task); static void do_task_reorder (PgmGlesViewport *glesviewport, Task *task); static void do_task_add (PgmGlesViewport *glesviewport, Task *task); static void do_task_remove (PgmGlesViewport *glesviewport, Task *task); static void do_task_regenerate (PgmGlesViewport *glesviewport, Task *task); /* Callback prototypes */ static void changed_cb (PgmDrawable *drawable, PgmDrawableProperty property, gpointer data); /* Task function array */ static TaskFunc task_func[LAST_TASK] = { do_task_change, do_task_reorder, do_task_add, do_task_remove, do_task_regenerate }; static PgmViewportClass *parent_class = NULL; /* Private functions */ /* Copy a layer taking a ref on each drawable */ static GList* copy_layer (GList *layer) { GList *new_layer = NULL; if (layer) { GList *last; new_layer = g_slice_new (GList); new_layer->data = g_object_ref (layer->data); new_layer->prev = NULL; last = new_layer; layer = layer->next; while (layer) { last->next = g_slice_new (GList); last->next->prev = last; last = last->next; last->data = g_object_ref (layer->data); layer = layer->next; } last->next = NULL; } return new_layer; } /* Create a change task */ static Task* task_change_new (PgmGlesDrawable *glesdrawable, PgmDrawableProperty property) { Task *task; task = g_slice_new (Task); task->change.type = TASK_CHANGE; task->change.glesdrawable = gst_object_ref (glesdrawable); task->change.property = property; return task; } /* Free a change task */ static void task_change_free (Task *task) { g_return_if_fail (task != NULL); gst_object_unref (task->change.glesdrawable); g_slice_free (Task, task); } /* Create a reorder task */ static Task* task_reorder_new (PgmDrawable *drawable, PgmDrawableLayer layer, guint order) { Task *task; task = g_slice_new (Task); task->reorder.type = TASK_REORDER; task->reorder.drawable = gst_object_ref (drawable); task->reorder.layer = layer; task->reorder.order = order; return task; } /* Free a reorder task */ static void task_reorder_free (Task *task) { g_return_if_fail (task != NULL); gst_object_unref (task->reorder.drawable); g_slice_free (Task, task); } /* Create a add task */ static Task* task_add_new (PgmDrawable *drawable, PgmDrawableLayer layer, guint order) { Task *task; task = g_slice_new (Task); task->add.type = TASK_ADD; task->add.drawable = gst_object_ref (drawable); task->add.layer = layer; task->add.order = order; return task; } /* Free a add task */ static void task_add_free (Task *task) { g_return_if_fail (task != NULL); gst_object_unref (task->add.drawable); g_slice_free (Task, task); } /* Create a remove task */ static Task* task_remove_new (PgmDrawable *drawable, PgmDrawableLayer layer) { Task *task; task = g_slice_new (Task); task->remove.type = TASK_REMOVE; task->remove.drawable = gst_object_ref (drawable); task->remove.layer = layer; return task; } /* Free a remove task */ static void task_remove_free (Task *task) { g_return_if_fail (task != NULL); gst_object_unref (task->remove.drawable); g_slice_free (Task, task); } /* Create a new generic task */ static Task* task_any_new (TaskType type) { Task *task; task = g_slice_new (Task); task->any.type = type; return task; } /* Create a new generic task */ static void task_any_free (Task *task) { g_slice_free (Task, task); } /* Free a generic task guessing the type */ static void task_free (Task *task) { switch (task->type) { case TASK_CHANGE: task_change_free (task); break; case TASK_REORDER: task_reorder_free (task); break; case TASK_ADD: task_add_free (task); break; case TASK_REMOVE: task_remove_free (task); break; default: task_any_free (task); break; } } /* Create a GLES drawable from a generic drawable */ static PgmGlesDrawable* gles_drawable_new (PgmGlesViewport *glesviewport, PgmDrawable *drawable) { PgmGlesDrawable *glesdrawable = NULL; /* Create the Glesdrawable depending on the type */ if (PGM_IS_IMAGE (drawable)) { glesdrawable = pgm_gles_image_new (drawable, glesviewport); GST_DEBUG_OBJECT (glesviewport, "created %s", GST_OBJECT_NAME (glesdrawable)); } else if (PGM_IS_TEXT (drawable)) { glesdrawable = pgm_gles_text_new (drawable, glesviewport); GST_DEBUG_OBJECT (glesviewport, "created %s", GST_OBJECT_NAME (glesdrawable)); } else { glesdrawable = NULL; GST_WARNING_OBJECT (glesviewport, "cannot create object from this type"); } /* Make it easily retrievable */ if (glesdrawable) { GST_OBJECT_LOCK (glesviewport); g_hash_table_insert (glesviewport->drawable_hash, drawable, glesdrawable); GST_OBJECT_UNLOCK (glesviewport); } return glesdrawable; } /* Free a GLES drawable */ static void gles_drawable_free (PgmGlesViewport *glesviewport, PgmGlesDrawable *glesdrawable) { GSList *walk, *tmp; Task *task; if (glesdrawable == NULL) return; /* Disconnect from the 'changed' signal and remove it from the hash */ GST_OBJECT_LOCK (glesviewport); GST_OBJECT_LOCK (glesdrawable->drawable); g_signal_handler_disconnect (glesdrawable->drawable, glesdrawable->change_handler); g_hash_table_remove (glesviewport->drawable_hash, glesdrawable->drawable); GST_OBJECT_UNLOCK (glesdrawable->drawable); GST_OBJECT_UNLOCK (glesviewport); /* Remove the glesdrawable from the update queue */ g_mutex_lock (glesviewport->update_lock); walk = glesviewport->update_queue; while (walk) { tmp = walk->next; task = walk->data; /* Remove it only if it's a task dealing with glesdrawable */ if (task->type == TASK_CHANGE) { if (task->change.glesdrawable == glesdrawable) { glesviewport->update_queue = g_slist_delete_link (glesviewport->update_queue, walk); task_change_free (task); } } walk = tmp; } g_mutex_unlock (glesviewport->update_lock); /* Then delete it */ GST_DEBUG_OBJECT (glesviewport, "unreferencing %s", GST_OBJECT_NAME (glesdrawable)); gst_object_unref (glesdrawable); } /* Complete a change task and free it */ static void do_task_change (PgmGlesViewport *glesviewport, Task *task) { PgmGlesViewportClass *klass = PGM_GLES_VIEWPORT_GET_CLASS (glesviewport); klass->changed_func[task->change.property] (task->change.glesdrawable); task_change_free (task); } /* Complete a reorder task and free it */ static void do_task_reorder (PgmGlesViewport *glesviewport, Task *task) { PgmGlesDrawable *glesdrawable; GST_OBJECT_LOCK (glesviewport); glesdrawable = g_hash_table_lookup (glesviewport->drawable_hash, task->reorder.drawable); GST_OBJECT_UNLOCK (glesviewport); if (!glesdrawable) goto removed; g_mutex_lock (glesviewport->layer_lock); switch (task->reorder.layer) { case PGM_DRAWABLE_NEAR: glesviewport->near_layer = g_list_remove (glesviewport->near_layer, glesdrawable); glesviewport->near_layer = g_list_insert (glesviewport->near_layer, glesdrawable, task->reorder.order); break; case PGM_DRAWABLE_MIDDLE: glesviewport->middle_layer = g_list_remove (glesviewport->middle_layer, glesdrawable); glesviewport->middle_layer = g_list_insert (glesviewport->middle_layer, glesdrawable, task->reorder.order); break; case PGM_DRAWABLE_FAR: glesviewport->far_layer = g_list_remove (glesviewport->far_layer, glesdrawable); glesviewport->far_layer = g_list_insert (glesviewport->far_layer, glesdrawable, task->reorder.order); break; default: break; } g_mutex_unlock (glesviewport->layer_lock); removed: task_reorder_free (task); } /* Complete a add task and free it */ static void do_task_add (PgmGlesViewport *glesviewport, Task *task) { PgmGlesDrawable *glesdrawable; glesdrawable = gles_drawable_new (glesviewport, task->add.drawable); g_mutex_lock (glesviewport->layer_lock); switch (task->add.layer) { case PGM_DRAWABLE_NEAR: glesviewport->near_layer = g_list_insert (glesviewport->near_layer, glesdrawable, task->add.order); break; case PGM_DRAWABLE_MIDDLE: glesviewport->middle_layer = g_list_insert (glesviewport->middle_layer, glesdrawable, task->add.order); break; case PGM_DRAWABLE_FAR: glesviewport->far_layer = g_list_insert (glesviewport->far_layer, glesdrawable, task->add.order); break; default: break; } g_mutex_unlock (glesviewport->layer_lock); task_add_free (task); } /* Complete a remove task and free it */ static void do_task_remove (PgmGlesViewport *glesviewport, Task *task) { PgmGlesDrawable *glesdrawable; /* Get the Glesdrawable */ GST_OBJECT_LOCK (glesviewport); glesdrawable = g_hash_table_lookup (glesviewport->drawable_hash, task->remove.drawable); GST_OBJECT_UNLOCK (glesviewport); /* Remove it from the list */ g_mutex_lock (glesviewport->layer_lock); switch (task->remove.layer) { case PGM_DRAWABLE_NEAR: glesviewport->near_layer = g_list_remove (glesviewport->near_layer, glesdrawable); break; case PGM_DRAWABLE_MIDDLE: glesviewport->middle_layer = g_list_remove (glesviewport->middle_layer, glesdrawable); break; case PGM_DRAWABLE_FAR: glesviewport->far_layer = g_list_remove (glesviewport->far_layer, glesdrawable); break; default: break; } g_mutex_unlock (glesviewport->layer_lock); /* And delete it */ gles_drawable_free (glesviewport, glesdrawable); task_remove_free (task); } /* Regenerate a layer */ static void regenerate_layer (GList *layer) { GList *walk = layer; while (walk) { PgmGlesDrawable *glesdrawable = (PgmGlesDrawable*) walk->data; pgm_gles_drawable_regenerate (glesdrawable); g_object_unref (glesdrawable); walk = walk->next; } g_list_free (layer); } /* Complete a regenerate task and free it */ static void do_task_regenerate (PgmGlesViewport *glesviewport, Task *task) { GList *near_layer, *middle_layer, *far_layer; /* Get copies of the layers */ g_mutex_lock (glesviewport->layer_lock); near_layer = copy_layer (glesviewport->near_layer); middle_layer = copy_layer (glesviewport->middle_layer); far_layer = copy_layer (glesviewport->far_layer); g_mutex_unlock (glesviewport->layer_lock); /* Then regenerate each drawable of each layer */ regenerate_layer (far_layer); regenerate_layer (middle_layer); regenerate_layer (near_layer); task_any_free (task); } /* Drawable 'changed' handler */ static void changed_cb (PgmDrawable *drawable, PgmDrawableProperty property, gpointer data) { PgmGlesDrawable *glesdrawable = PGM_GLES_DRAWABLE (data); PgmGlesViewport *glesviewport = glesdrawable->glesviewport; GST_LOG_OBJECT (glesviewport, "drawable_changed_cb"); if (glesviewport) { Task *task; /* Add the change task to the update queue */ g_mutex_lock (glesviewport->update_lock); task = task_change_new (glesdrawable, property); glesviewport->update_queue = g_slist_prepend (glesviewport->update_queue, task); g_mutex_unlock (glesviewport->update_lock); /* Request an update */ pgm_gles_context_update (glesviewport->context); } } /* Canvas 'drawable-added' handler */ static void drawable_added_cb (PgmCanvas *canvas, PgmDrawable *drawable, PgmDrawableLayer layer, gint order, gpointer data) { PgmGlesViewport *glesviewport = PGM_GLES_VIEWPORT (data); Task *task; /* Add the add task in the update queue */ task = task_add_new (drawable, layer, order); g_mutex_lock (glesviewport->update_lock); glesviewport->update_queue = g_slist_prepend (glesviewport->update_queue, task); g_mutex_unlock (glesviewport->update_lock); /* Request an update */ pgm_gles_context_update (glesviewport->context); } /* Canvas 'drawable-removed' handler */ static void drawable_removed_cb (PgmCanvas *canvas, PgmDrawable *drawable, PgmDrawableLayer layer, gpointer data) { PgmGlesViewport *glesviewport = PGM_GLES_VIEWPORT (data); Task *task; /* Add the remove task in the update queue */ task = task_remove_new (drawable, layer); g_mutex_lock (glesviewport->update_lock); glesviewport->update_queue = g_slist_prepend (glesviewport->update_queue, task); g_mutex_unlock (glesviewport->update_lock); /* Request an update */ pgm_gles_context_update (glesviewport->context); } /* Canvas 'drawable-reordered' handler */ static void drawable_reordered_cb (PgmCanvas *canvas, PgmDrawable *drawable, PgmDrawableLayer layer, gint order, gpointer data) { PgmGlesViewport *glesviewport = PGM_GLES_VIEWPORT (data); Task *task; /* Add the reorder task in the update queue */ task = task_reorder_new (drawable, layer, order); g_mutex_lock (glesviewport->update_lock); glesviewport->update_queue = g_slist_prepend (glesviewport->update_queue, task); g_mutex_unlock (glesviewport->update_lock); /* Request an update */ pgm_gles_context_update (glesviewport->context); } /* Canvas 'regenerated' handler */ static void regenerated_cb (PgmCanvas *canvas, gpointer data) { PgmGlesViewport *glesviewport = PGM_GLES_VIEWPORT (data); Task *task; /* Add the regenerate task in the update queue */ task = task_any_new (TASK_REGENERATE); g_mutex_lock (glesviewport->update_lock); glesviewport->update_queue = g_slist_prepend (glesviewport->update_queue, task); g_mutex_unlock (glesviewport->update_lock); /* Request an update */ pgm_gles_context_update (glesviewport->context); } /* Delete all GLES drawable from the given GLES viewport layer list and free it */ static void delete_all_gles_drawable_from_layer (PgmGlesViewport *glesviewport, GList **layer) { GList *walk = *layer; PgmGlesDrawable *glesdrawable; while (walk) { glesdrawable = (PgmGlesDrawable*) walk->data; gles_drawable_free (glesviewport, glesdrawable); walk = walk->next; } GST_OBJECT_LOCK (glesviewport); g_list_free (*layer); *layer = NULL; GST_OBJECT_UNLOCK (glesviewport); } /* Synchronize the drawables from the given canvas creating and adding the * the corresponding GLES drawables in the layers */ static void sync_gles_drawable_from_canvas (PgmGlesViewport *glesviewport, PgmCanvas *canvas) { PgmGlesDrawable *glesdrawable; GList *walk; /* Sync near layer */ walk = canvas->near_layer; while (walk) { glesdrawable = gles_drawable_new (glesviewport, (PgmDrawable*) walk->data); g_mutex_lock (glesviewport->layer_lock); glesviewport->near_layer = g_list_append (glesviewport->near_layer, glesdrawable); g_mutex_unlock (glesviewport->layer_lock); walk = walk->next; } /* Sync middle layer */ walk = canvas->middle_layer; while (walk) { glesdrawable = gles_drawable_new (glesviewport, (PgmDrawable*) walk->data); g_mutex_lock (glesviewport->layer_lock); glesviewport->middle_layer = g_list_append (glesviewport->middle_layer, glesdrawable); g_mutex_unlock (glesviewport->layer_lock); walk = walk->next; } /* Sync far layer */ walk = canvas->far_layer; while (walk) { glesdrawable = gles_drawable_new (glesviewport, (PgmDrawable*) walk->data); g_mutex_lock (glesviewport->layer_lock); glesviewport->far_layer = g_list_append (glesviewport->far_layer, glesdrawable); g_mutex_unlock (glesviewport->layer_lock); walk = walk->next; } } /* Update a layer projection */ static void update_layer_projection (GList *layer) { GList *walk = layer; while (walk) { PgmGlesDrawable *glesdrawable = (PgmGlesDrawable*) walk->data; pgm_gles_drawable_update_projection (glesdrawable); g_object_unref (glesdrawable); walk = walk->next; } g_list_free (layer); } /* PgmViewport methods */ static PgmError pgm_gles_viewport_set_title (PgmViewport *viewport, const gchar *title) { return PGM_ERROR_X; } static PgmError pgm_gles_viewport_show (PgmViewport *viewport) { PgmGlesViewport *glesviewport = PGM_GLES_VIEWPORT (viewport); PgmGlesContextTask *task; task = pgm_gles_context_task_new (PGM_GLES_CONTEXT_VISIBILITY, NULL); pgm_gles_context_push_immediate_task (glesviewport->context, task); return PGM_ERROR_OK; } static PgmError pgm_gles_viewport_hide (PgmViewport *viewport) { PgmGlesViewport *glesviewport = PGM_GLES_VIEWPORT (viewport); PgmGlesContextTask *task; task = pgm_gles_context_task_new (PGM_GLES_CONTEXT_VISIBILITY, NULL); pgm_gles_context_push_immediate_task (glesviewport->context, task); return PGM_ERROR_OK; } static PgmError pgm_gles_viewport_set_decorated (PgmViewport *viewport, gboolean decorated) { return PGM_ERROR_X; } static PgmError pgm_gles_viewport_set_cursor (PgmViewport *viewport, PgmViewportCursor cursor) { return PGM_ERROR_X; } static PgmError pgm_gles_viewport_set_icon (PgmViewport *viewport, GdkPixbuf *icon) { return PGM_ERROR_X; } static PgmError pgm_gles_viewport_set_drag_status (PgmViewport *viewport, gboolean accept) { return PGM_ERROR_X; } static PgmError pgm_gles_viewport_set_size (PgmViewport *viewport, gint width, gint height) { return PGM_ERROR_X; } static PgmError pgm_gles_viewport_set_screen_resolution (PgmViewport *viewport, gint width, gint height) { PgmGlesContextTask *task; PgmGlesViewport *glesviewport = PGM_GLES_VIEWPORT (viewport); task = pgm_gles_context_task_new (PGM_GLES_CONTEXT_RESOLUTION, NULL); pgm_gles_context_push_immediate_task (glesviewport->context, task); return PGM_ERROR_OK; } static PgmError pgm_gles_viewport_set_alpha_blending (PgmViewport *viewport, gboolean alpha_blending) { PgmGlesViewport *glesviewport = PGM_GLES_VIEWPORT (viewport); PgmGlesContextTask *task; task = pgm_gles_context_task_new (PGM_GLES_CONTEXT_ALPHA_BLENDING, NULL); pgm_gles_context_push_immediate_task (glesviewport->context, task); return PGM_ERROR_OK; } static PgmError pgm_gles_viewport_set_opacity (PgmViewport *viewport, guchar opacity) { return PGM_ERROR_X; } static PgmError pgm_gles_viewport_set_fullscreen (PgmViewport *viewport, gboolean fullscreen) { return PGM_ERROR_X; } static PgmError pgm_gles_viewport_get_screen_resolution (PgmViewport *viewport, gint *width, gint *height) { PgmGlesViewport *glesviewport = PGM_GLES_VIEWPORT (viewport); pgm_gles_backend_get_screen_resolution (glesviewport->context->backend, width, height); return PGM_ERROR_OK; } static PgmError pgm_gles_viewport_get_screen_size_mm (PgmViewport *viewport, gint *width, gint *height) { PgmGlesViewport *glesviewport = PGM_GLES_VIEWPORT (viewport); pgm_gles_backend_get_screen_size_mm (glesviewport->context->backend, width, height); return PGM_ERROR_OK; } static PgmError pgm_gles_viewport_set_canvas (PgmViewport *viewport, PgmCanvas *canvas) { PgmGlesViewport *glesviewport = PGM_GLES_VIEWPORT (viewport); /* There's a canvas bound, let's clear associated data */ if (glesviewport->canvas) { GST_OBJECT_LOCK (glesviewport); GST_OBJECT_LOCK (glesviewport->canvas); /* Disconnect handlers */ g_signal_handler_disconnect (glesviewport->canvas, glesviewport->add_handler); g_signal_handler_disconnect (glesviewport->canvas, glesviewport->remove_handler); g_signal_handler_disconnect (glesviewport->canvas, glesviewport->reorder_handler); g_signal_handler_disconnect (glesviewport->canvas, glesviewport->regenerated_handler); GST_OBJECT_UNLOCK (glesviewport->canvas); GST_OBJECT_UNLOCK (glesviewport); /* Delete our hierarchy */ delete_all_gles_drawable_from_layer (glesviewport, &glesviewport->near_layer); delete_all_gles_drawable_from_layer (glesviewport, &glesviewport->middle_layer); delete_all_gles_drawable_from_layer (glesviewport, &glesviewport->far_layer); GST_OBJECT_LOCK (glesviewport); glesviewport->canvas = NULL; GST_OBJECT_UNLOCK (glesviewport); } /* Bind the new canvas if any */ if (canvas) { sync_gles_drawable_from_canvas (glesviewport, canvas); GST_OBJECT_LOCK (glesviewport); GST_OBJECT_LOCK (canvas); /* Connect handlers */ glesviewport->add_handler = g_signal_connect (G_OBJECT (canvas), "drawable-added", G_CALLBACK (drawable_added_cb), (gpointer) glesviewport); glesviewport->remove_handler = g_signal_connect (G_OBJECT (canvas), "drawable-removed", G_CALLBACK (drawable_removed_cb), (gpointer) glesviewport); glesviewport->reorder_handler = g_signal_connect (G_OBJECT (canvas), "drawable-reordered", G_CALLBACK (drawable_reordered_cb), (gpointer) glesviewport); glesviewport->regenerated_handler = g_signal_connect (G_OBJECT (canvas), "regenerated", G_CALLBACK (regenerated_cb), (gpointer) glesviewport); glesviewport->canvas = canvas; GST_OBJECT_UNLOCK (canvas); GST_OBJECT_UNLOCK (glesviewport); } return PGM_ERROR_OK; } static PgmError pgm_gles_viewport_update_projection (PgmViewport *viewport) { PgmGlesViewport *glesviewport = PGM_GLES_VIEWPORT (viewport); PgmGlesContextTask *task; GST_OBJECT_LOCK (viewport); /* Store the projected size */ if (viewport->rotation == PGM_VIEWPORT_ROTATION_NONE || viewport->rotation == PGM_VIEWPORT_ROTATION_180) { glesviewport->projected_w = (gfloat) viewport->projected_width; glesviewport->projected_h = (gfloat) viewport->projected_height; } else { glesviewport->projected_w = (gfloat) viewport->projected_height; glesviewport->projected_h = (gfloat) viewport->projected_width; } /* Store the canvas size */ if (viewport->canvas) { GST_OBJECT_LOCK (viewport->canvas); glesviewport->canvas_w = viewport->canvas->width; glesviewport->canvas_h = viewport->canvas->height; GST_OBJECT_UNLOCK (viewport->canvas); } GST_OBJECT_UNLOCK (viewport); /* And queue the projection update task */ task = pgm_gles_context_task_new (PGM_GLES_CONTEXT_PROJECTION, NULL); pgm_gles_context_push_immediate_task (glesviewport->context, task); return PGM_ERROR_OK; } static PgmError pgm_gles_viewport_get_embedding_id (PgmViewport *viewport, gulong *embedding_id) { return PGM_ERROR_X; } static PgmError pgm_gles_viewport_get_pixel_formats (PgmViewport *viewport, gulong *formats_mask) { PgmGlesViewport *glesviewport = PGM_GLES_VIEWPORT (viewport); GST_OBJECT_LOCK (glesviewport); /* The classic formats supported by all hardware */ *formats_mask = PGM_IMAGE_RGB | PGM_IMAGE_RGBA; if (glesviewport->context->feature_mask & PGM_GLES_FEAT_TEXTURE_FORMAT_BGRA) *formats_mask |= PGM_IMAGE_BGRA; /* BGR, YUYV and UYVY are not supported */ GST_OBJECT_UNLOCK (glesviewport); return PGM_ERROR_OK; } static PgmError pgm_gles_viewport_get_caps_mask (PgmViewport *viewport, gulong *caps_mask) { PgmGlesViewport *glesviewport = PGM_GLES_VIEWPORT (viewport); GST_OBJECT_LOCK (glesviewport); *caps_mask = glesviewport->capacities; GST_OBJECT_UNLOCK (glesviewport); return PGM_ERROR_OK; } static PgmError pgm_gles_viewport_get_max_texture_size (PgmViewport *viewport, guint32 *max_texture_size) { PgmGlesViewport *glesviewport = PGM_GLES_VIEWPORT (viewport); GST_OBJECT_LOCK (glesviewport); *max_texture_size = glesviewport->context->max_texture_size; GST_OBJECT_UNLOCK (glesviewport); return PGM_ERROR_OK; } static PgmError pgm_gles_viewport_get_frame_rate (PgmViewport *viewport, guint *frame_rate) { PgmGlesViewport *glesviewport = PGM_GLES_VIEWPORT (viewport); GST_OBJECT_LOCK (glesviewport); *frame_rate = glesviewport->context->fps; GST_OBJECT_UNLOCK (glesviewport); return PGM_ERROR_OK; } static PgmError pgm_gles_viewport_read_pixels (PgmViewport *viewport, guint x, guint y, guint width, guint height, guint8 *pixels) { PgmGlesViewport *glesviewport = PGM_GLES_VIEWPORT (viewport); PgmGlesViewportPixelRectangle *rectangle = NULL; PgmGlesContextTask *task = NULL; rectangle = g_slice_new (PgmGlesViewportPixelRectangle); if (!rectangle) return PGM_ERROR_X; rectangle->x = x; rectangle->y = y; rectangle->width = width; rectangle->height = height; rectangle->pixels = pixels; task = pgm_gles_context_task_new (PGM_GLES_CONTEXT_READ_PIXELS, rectangle); pgm_gles_context_push_immediate_task (glesviewport->context, task); return PGM_ERROR_OK; } /* GObject stuff */ PGM_DEFINE_DYNAMIC_TYPE (PgmGlesViewport, pgm_gles_viewport, PGM_TYPE_VIEWPORT) void pgm_gles_viewport_register (GTypeModule *module) { pgm_gles_viewport_register_type (module); } static void pgm_gles_viewport_dispose (GObject *object) { PgmGlesViewport *glesviewport = PGM_GLES_VIEWPORT (object); if (glesviewport->canvas) { /* Disconnect handlers */ g_signal_handler_disconnect (glesviewport->canvas, glesviewport->add_handler); g_signal_handler_disconnect (glesviewport->canvas, glesviewport->remove_handler); g_signal_handler_disconnect (glesviewport->canvas, glesviewport->reorder_handler); g_signal_handler_disconnect (glesviewport->canvas, glesviewport->regenerated_handler); /* Delete our hierarchy */ g_mutex_lock (glesviewport->layer_lock); delete_all_gles_drawable_from_layer (glesviewport, &glesviewport->near_layer); delete_all_gles_drawable_from_layer (glesviewport, &glesviewport->middle_layer); delete_all_gles_drawable_from_layer (glesviewport, &glesviewport->far_layer); g_mutex_unlock (glesviewport->layer_lock); } g_mutex_lock (glesviewport->update_lock); g_slist_foreach (glesviewport->update_queue, (GFunc) task_free, NULL); g_slist_free (glesviewport->update_queue); glesviewport->update_queue = NULL; g_mutex_unlock (glesviewport->update_lock); pgm_gles_context_free (glesviewport->context); g_mutex_free (glesviewport->layer_lock); g_mutex_free (glesviewport->update_lock); GST_CALL_PARENT (G_OBJECT_CLASS, dispose, (object)); } static void pgm_gles_viewport_class_init (PgmGlesViewportClass *klass) { GObjectClass *gobject_class; PgmViewportClass *viewport_class; GST_DEBUG_CATEGORY_INIT (pgm_gles_viewport_debug, "pgm_gles_viewport", 0, "OpenGL ES plugin: PgmGlesViewport"); parent_class = g_type_class_peek_parent (klass); gobject_class = G_OBJECT_CLASS (klass); viewport_class = PGM_VIEWPORT_CLASS (klass); /* GObject virtual table */ gobject_class->dispose = GST_DEBUG_FUNCPTR (pgm_gles_viewport_dispose); /* PgmViewport virtual table */ viewport_class->set_title = GST_DEBUG_FUNCPTR (pgm_gles_viewport_set_title); viewport_class->show = GST_DEBUG_FUNCPTR (pgm_gles_viewport_show); viewport_class->hide = GST_DEBUG_FUNCPTR (pgm_gles_viewport_hide); viewport_class->set_decorated = GST_DEBUG_FUNCPTR (pgm_gles_viewport_set_decorated); viewport_class->set_cursor = GST_DEBUG_FUNCPTR (pgm_gles_viewport_set_cursor); viewport_class->set_icon = GST_DEBUG_FUNCPTR (pgm_gles_viewport_set_icon); viewport_class->set_drag_status = GST_DEBUG_FUNCPTR (pgm_gles_viewport_set_drag_status); viewport_class->set_size = GST_DEBUG_FUNCPTR (pgm_gles_viewport_set_size); viewport_class->set_alpha_blending = GST_DEBUG_FUNCPTR (pgm_gles_viewport_set_alpha_blending); viewport_class->set_opacity = GST_DEBUG_FUNCPTR (pgm_gles_viewport_set_opacity); viewport_class->set_fullscreen = GST_DEBUG_FUNCPTR (pgm_gles_viewport_set_fullscreen); viewport_class->get_screen_resolution = GST_DEBUG_FUNCPTR (pgm_gles_viewport_get_screen_resolution); viewport_class->set_screen_resolution = GST_DEBUG_FUNCPTR (pgm_gles_viewport_set_screen_resolution); viewport_class->get_screen_size_mm = GST_DEBUG_FUNCPTR (pgm_gles_viewport_get_screen_size_mm); viewport_class->set_canvas = GST_DEBUG_FUNCPTR (pgm_gles_viewport_set_canvas); viewport_class->update_projection = GST_DEBUG_FUNCPTR (pgm_gles_viewport_update_projection); viewport_class->get_embedding_id = GST_DEBUG_FUNCPTR (pgm_gles_viewport_get_embedding_id); viewport_class->get_pixel_formats = GST_DEBUG_FUNCPTR (pgm_gles_viewport_get_pixel_formats); viewport_class->get_caps_mask = GST_DEBUG_FUNCPTR (pgm_gles_viewport_get_caps_mask); viewport_class->get_max_texture_size = GST_DEBUG_FUNCPTR (pgm_gles_viewport_get_max_texture_size); viewport_class->get_frame_rate = GST_DEBUG_FUNCPTR (pgm_gles_viewport_get_frame_rate); viewport_class->read_pixels = GST_DEBUG_FUNCPTR (pgm_gles_viewport_read_pixels); /* PgmGlesDrawable changed table */ klass->changed_func[PGM_DRAWABLE_VISIBILITY] = GST_DEBUG_FUNCPTR (pgm_gles_drawable_set_visibility); klass->changed_func[PGM_DRAWABLE_SIZE] = GST_DEBUG_FUNCPTR (pgm_gles_drawable_set_size); klass->changed_func[PGM_DRAWABLE_POSITION] = GST_DEBUG_FUNCPTR (pgm_gles_drawable_set_position); klass->changed_func[PGM_DRAWABLE_TRANSFORMATION_MATRIX] = GST_DEBUG_FUNCPTR (pgm_gles_drawable_set_transformation_matrix); klass->changed_func[PGM_DRAWABLE_BG_COLOR] = GST_DEBUG_FUNCPTR (pgm_gles_drawable_set_bg_color); klass->changed_func[PGM_DRAWABLE_FG_COLOR] = GST_DEBUG_FUNCPTR (pgm_gles_drawable_set_fg_color); klass->changed_func[PGM_DRAWABLE_OPACITY] = GST_DEBUG_FUNCPTR (pgm_gles_drawable_set_opacity); klass->changed_func[PGM_DRAWABLE_REGENERATE] = GST_DEBUG_FUNCPTR (pgm_gles_drawable_regenerate); /* PgmGlImage changed table */ klass->changed_func[PGM_IMAGE_DATA_EMPTY] = GST_DEBUG_FUNCPTR ((PgmGlesDrawableChangedFunc) pgm_gles_image_clear); klass->changed_func[PGM_IMAGE_DATA_FILE] = GST_DEBUG_FUNCPTR ((PgmGlesDrawableChangedFunc) pgm_gles_image_set_from_file); klass->changed_func[PGM_IMAGE_DATA_BUFFER] = GST_DEBUG_FUNCPTR ((PgmGlesDrawableChangedFunc) pgm_gles_image_set_from_buffer); klass->changed_func[PGM_IMAGE_DATA_GST_BUFFER] = GST_DEBUG_FUNCPTR ((PgmGlesDrawableChangedFunc) pgm_gles_image_set_from_gst_buffer); klass->changed_func[PGM_IMAGE_DATA_PIXBUF] = GST_DEBUG_FUNCPTR ((PgmGlesDrawableChangedFunc) pgm_gles_image_set_from_pixbuf); klass->changed_func[PGM_IMAGE_DATA_IMAGE] = GST_DEBUG_FUNCPTR ((PgmGlesDrawableChangedFunc) pgm_gles_image_set_from_image); klass->changed_func[PGM_IMAGE_MAPPING_MATRIX] = GST_DEBUG_FUNCPTR ((PgmGlesDrawableChangedFunc) pgm_gles_image_set_mapping_matrix); klass->changed_func[PGM_IMAGE_ALIGNMENT] = GST_DEBUG_FUNCPTR ((PgmGlesDrawableChangedFunc) pgm_gles_image_set_alignment); klass->changed_func[PGM_IMAGE_LAYOUT] = GST_DEBUG_FUNCPTR ((PgmGlesDrawableChangedFunc) pgm_gles_image_set_layout); klass->changed_func[PGM_IMAGE_INTERP] = GST_DEBUG_FUNCPTR ((PgmGlesDrawableChangedFunc) pgm_gles_image_set_interp); klass->changed_func[PGM_IMAGE_WRAPPING] = GST_DEBUG_FUNCPTR ((PgmGlesDrawableChangedFunc) pgm_gles_image_set_wrapping); klass->changed_func[PGM_IMAGE_ASPECT_RATIO] = GST_DEBUG_FUNCPTR ((PgmGlesDrawableChangedFunc) pgm_gles_image_set_aspect_ratio); klass->changed_func[PGM_IMAGE_BORDER_WIDTH] = GST_DEBUG_FUNCPTR ((PgmGlesDrawableChangedFunc) pgm_gles_image_set_border_width); klass->changed_func[PGM_IMAGE_BORDER_INNER_COLOR] = GST_DEBUG_FUNCPTR ((PgmGlesDrawableChangedFunc) pgm_gles_image_set_border_inner_color); klass->changed_func[PGM_IMAGE_BORDER_OUTER_COLOR] = GST_DEBUG_FUNCPTR ((PgmGlesDrawableChangedFunc) pgm_gles_image_set_border_outer_color); /* PgmGlText changed table */ klass->changed_func[PGM_TEXT_LABEL] = GST_DEBUG_FUNCPTR ((PgmGlesDrawableChangedFunc) pgm_gles_text_set_label); klass->changed_func[PGM_TEXT_MARKUP] = GST_DEBUG_FUNCPTR ((PgmGlesDrawableChangedFunc) pgm_gles_text_set_markup); klass->changed_func[PGM_TEXT_FONT_FAMILY] = GST_DEBUG_FUNCPTR ((PgmGlesDrawableChangedFunc) pgm_gles_text_set_font_family); klass->changed_func[PGM_TEXT_HEIGHT] = GST_DEBUG_FUNCPTR ((PgmGlesDrawableChangedFunc) pgm_gles_text_set_font_height); klass->changed_func[PGM_TEXT_ELLIPSIZE] = GST_DEBUG_FUNCPTR ((PgmGlesDrawableChangedFunc) pgm_gles_text_set_ellipsize); klass->changed_func[PGM_TEXT_JUSTIFY] = GST_DEBUG_FUNCPTR ((PgmGlesDrawableChangedFunc) pgm_gles_text_set_justify); klass->changed_func[PGM_TEXT_ALIGNMENT] = GST_DEBUG_FUNCPTR ((PgmGlesDrawableChangedFunc) pgm_gles_text_set_alignment); klass->changed_func[PGM_TEXT_WRAP] = GST_DEBUG_FUNCPTR ((PgmGlesDrawableChangedFunc) pgm_gles_text_set_wrap); klass->changed_func[PGM_TEXT_GRAVITY] = GST_DEBUG_FUNCPTR ((PgmGlesDrawableChangedFunc) pgm_gles_text_set_gravity); klass->changed_func[PGM_TEXT_STRETCH] = GST_DEBUG_FUNCPTR ((PgmGlesDrawableChangedFunc) pgm_gles_text_set_stretch); klass->changed_func[PGM_TEXT_STYLE] = GST_DEBUG_FUNCPTR ((PgmGlesDrawableChangedFunc) pgm_gles_text_set_style); klass->changed_func[PGM_TEXT_VARIANT] = GST_DEBUG_FUNCPTR ((PgmGlesDrawableChangedFunc) pgm_gles_text_set_variant); klass->changed_func[PGM_TEXT_WEIGHT] = GST_DEBUG_FUNCPTR ((PgmGlesDrawableChangedFunc) pgm_gles_text_set_weight); klass->changed_func[PGM_TEXT_MULTILINE] = GST_DEBUG_FUNCPTR ((PgmGlesDrawableChangedFunc) pgm_gles_text_set_multiline); klass->changed_func[PGM_TEXT_LINE_SPACING] = GST_DEBUG_FUNCPTR ((PgmGlesDrawableChangedFunc) pgm_gles_text_set_line_spacing); klass->changed_func[PGM_TEXT_COLOR] = GST_DEBUG_FUNCPTR ((PgmGlesDrawableChangedFunc) pgm_gles_text_set_color); klass->changed_func[PGM_TEXT_OUTLINE_COLOR] = GST_DEBUG_FUNCPTR ((PgmGlesDrawableChangedFunc) pgm_gles_text_set_outline_color); klass->changed_func[PGM_TEXT_OUTLINE_WIDTH] = GST_DEBUG_FUNCPTR ((PgmGlesDrawableChangedFunc) pgm_gles_text_set_outline_width); klass->changed_func[PGM_TEXT_CAST_SHADOW] = GST_DEBUG_FUNCPTR ((PgmGlesDrawableChangedFunc) pgm_gles_text_set_cast_shadow); klass->changed_func[PGM_TEXT_SHADOW_POSITION] = GST_DEBUG_FUNCPTR ((PgmGlesDrawableChangedFunc) pgm_gles_text_set_shadow_position); klass->changed_func[PGM_TEXT_SHADOW_COLOR] = GST_DEBUG_FUNCPTR ((PgmGlesDrawableChangedFunc) pgm_gles_text_set_shadow_color); } static void pgm_gles_viewport_class_finalize (PgmGlesViewportClass *klass) { return; } static void pgm_gles_viewport_init (PgmGlesViewport *glesviewport) { /* Attached canvas */ /* glesviewport->canvas = NULL; */ /* Empty lists */ /* glesviewport->far_layer = NULL; */ /* glesviewport->middle_layer = NULL; */ /* glesviewport->near_layer = NULL; */ glesviewport->layer_lock = g_mutex_new (); /* Update task queue */ /* glesviewport->update_queue = NULL; */ glesviewport->update_lock = g_mutex_new (); /* Create the drawable hash using pointers as keys */ glesviewport->drawable_hash = g_hash_table_new (NULL, NULL); /* Create context */ glesviewport->context = pgm_gles_context_new (glesviewport); /* Signal handlers id */ /* glesviewport->add_handler = 0; */ /* glesviewport->remove_handler = 0; */ /* glesviewport->reorder_handler = 0; */ /* glesviewport->regenerated_handler = 0; */ /* Projection informations */ glesviewport->projected_w = 800; glesviewport->projected_h = 600; glesviewport->canvas_w = 4.0f; glesviewport->canvas_h = 3.0f; /* Fill capacities */ glesviewport->capacities = PGM_VIEWPORT_HARDWARE_ACCELERATION; #ifdef TSLIB glesviewport->capacities &= PGM_VIEWPORT_TOUCHPAD; #endif /* TSLIB */ /* Drag status */ /* glesviewport->drag_status = FALSE; */ } /* Public methods */ PgmViewport * pgm_gles_viewport_new (void) { PgmGlesViewport *glesviewport; glesviewport = g_object_new (PGM_TYPE_GLES_VIEWPORT, NULL); GST_DEBUG_OBJECT (glesviewport, "created new glesviewport"); return PGM_VIEWPORT (glesviewport); } void pgm_gles_viewport_flush_update_queue (PgmGlesViewport *glesviewport) { GSList *copy, *walk; Task *task; /* Get a reverse copy of the update task list, and NULLify it */ g_mutex_lock (glesviewport->update_lock); copy = g_slist_reverse (glesviewport->update_queue); glesviewport->update_queue = NULL; g_mutex_unlock (glesviewport->update_lock); /* Flush the update task list */ walk = copy; while (walk) { task = walk->data; task_func[task->type] (glesviewport, task); walk = walk->next; } g_slist_free (copy); copy = NULL; } void pgm_gles_viewport_update_drawable_projection (PgmGlesViewport *glesviewport) { g_mutex_lock (glesviewport->layer_lock); /* Adapt position and size of all the drawables */ g_list_foreach (glesviewport->near_layer, (GFunc) pgm_gles_drawable_update_projection, NULL); g_list_foreach (glesviewport->middle_layer, (GFunc) pgm_gles_drawable_update_projection, NULL); g_list_foreach (glesviewport->far_layer, (GFunc) pgm_gles_drawable_update_projection, NULL); g_mutex_unlock (glesviewport->layer_lock); } void pgm_gles_viewport_update_drawable_projection (PgmGlesViewport *glesviewport) { GList *near_layer, *middle_layer, *far_layer; /* Get copies of the layers */ g_mutex_lock (glesviewport->layer_lock); near_layer = copy_layer (glesviewport->near_layer); middle_layer = copy_layer (glesviewport->middle_layer); far_layer = copy_layer (glesviewport->far_layer); g_mutex_unlock (glesviewport->layer_lock); /* Then update the projection of each drawable of each layer */ update_layer_projection (far_layer); update_layer_projection (middle_layer); update_layer_projection (near_layer); } /* Connects the GLES drawable to the "changed" signal. Should be called at the * creation of a new GLES drawable to be notified of any change. */ void pgm_gles_viewport_connect_changed_callback (PgmGlesViewport *glesviewport, PgmGlesDrawable *glesdrawable) { PgmDrawable *drawable = glesdrawable->drawable; GST_OBJECT_LOCK (drawable); glesdrawable->change_handler = g_signal_connect (drawable, "changed", G_CALLBACK (changed_cb), (gpointer) glesdrawable); GST_OBJECT_UNLOCK (drawable); } pigment-0.3.17/plugins/opengles/pgmgles.c0000644000175000017500000000421011205034416015256 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment OpenGL ES-CM 1.1 plugin * * Copyright © 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include "pgmglesviewport.h" #include "pgmglesimage.h" #include "pgmglestext.h" #ifndef HAVE_OPENGLES_PC_EMULATION #include "pgmgleseglbackend.h" #else #include "pgmglesxbackend.h" #endif /* HAVE_OPENGLES_PC_EMULATION */ GST_DEBUG_CATEGORY (pgm_gles_debug); #define GST_CAT_DEFAULT pgm_gles_debug /* Private functions */ static gboolean pgm_gles_init (GTypeModule *module) { GST_DEBUG_CATEGORY_INIT (pgm_gles_debug, "pgm_gles", 0, "OpenGL ES-CM 1.1 plugin"); pgm_gles_drawable_register (module); pgm_gles_image_register (module); pgm_gles_text_register (module); pgm_gles_viewport_register (module); pgm_gles_backend_register (module); #ifndef HAVE_OPENGLES_PC_EMULATION pgm_gles_egl_backend_register (module); #else pgm_gles_x_backend_register (module); #endif /* HAVE_OPENGLES_PC_EMULATION */ return TRUE; } /* Pigment plugin entry point */ PGM_PLUGIN_DEFINE ( (PgmPluginInitFunc) pgm_gles_init, NULL, (PgmPluginCreateFunc) pgm_gles_viewport_new, "opengles", VERSION, "An OpenGL ES-CM 1.1 viewport", "LGPL", "https://code.fluendo.com/pigment/trac", "Loïc Molinari " ) pigment-0.3.17/plugins/opengles/pgmglescontext.h0000644000175000017500000001657611205034416016712 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment OpenGL ES-CM 1.1 plugin * * Copyright © 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ #ifndef __PGM_GLES_CONTEXT_H__ #define __PGM_GLES_CONTEXT_H__ /* pgmglescontext.h and pgmglesbackend.h/pgmglesviewport.h include eachother */ typedef struct _PgmGlesContext PgmGlesContext; typedef struct _PgmGlesContextTask PgmGlesContextTask; typedef struct _PgmGlesContextProcAddress PgmGlesContextProcAddress; #include "pgmglestexture.h" #include "pgmglesbackend.h" #include "pgmglesviewport.h" #include "pgmglesdefs.h" G_BEGIN_DECLS /* Context locking */ #define PGM_GLES_CONTEXT_LOCK(context) (g_mutex_lock (context->mutex)) #define PGM_GLES_CONTEXT_UNLOCK(context) (g_mutex_unlock (context->mutex)) /* Type casting */ #define PGM_GLES_CONTEXT(obj) ((PgmGlesContext *) (obj)) #define PGM_GLES_CONTEXT_TASK(obj) ((PgmGlesContextTask *) (obj)) /* Task handler */ typedef void (*PgmGlesContextTaskFunc) (PgmGlesContext *context, gpointer data); /* Task types */ typedef enum { /* Various */ PGM_GLES_CONTEXT_PROJECTION = 0, /* Update viewport and projection matrix */ PGM_GLES_CONTEXT_VISIBILITY, /* Update window visibility */ PGM_GLES_CONTEXT_ALPHA_BLENDING, /* Update alpha blending state */ PGM_GLES_CONTEXT_READ_PIXELS, /* Read frame buffer */ PGM_GLES_CONTEXT_RESOLUTION, /* Update window size */ /* Texture related */ PGM_GLES_CONTEXT_GEN_TEXTURE, /* Generate texture */ PGM_GLES_CONTEXT_CLEAN_TEXTURE, /* Clean up texture */ PGM_GLES_CONTEXT_UPLOAD_TEXTURE, /* Upload texture buffer */ PGM_GLES_CONTEXT_UPDATE_TEXTURE, /* Update texture parameters */ PGM_GLES_CONTEXT_FREE_TEXTURE, /* Free texture */ /* Task types count */ PGM_GLES_CONTEXT_LAST_TASK } PgmGlesContextTaskType; /* Context */ struct _PgmGlesContext { PgmGlesViewport *glesviewport; /* PgmContext structure access mutex */ GMutex *mutex; /* Rendering thread */ GThread *render_thread; GMainContext *render_context; GMainLoop *render_loop; /* Immediate event source */ gint immediate_fd[2]; GIOChannel *immediate_out; GIOChannel *immediate_in; guint immediate_tag; /* Task queues */ GList *immediate_task; GList *deferred_task; /* Auto-update */ GMutex *update_mutex; gboolean auto_updated; GTimeVal update_timestamp; guint update_tag; guint requested_fps; /* Initialization lock */ GMutex *init_mutex; GCond *init_cond; gboolean initialized; /* Finalization lock */ GMutex *fini_mutex; GCond *fini_cond; gboolean fini_signal; gboolean finalized; /* Physical screen informations */ gint screen_width_mm; gint screen_height_mm; /* Limits */ gint max_texture_size; gint max_texture_units; /* Pixel store modes */ gint row_length; gint skip_rows; gint skip_pixels; /* Renderer informations */ const gchar *vendor; const gchar *version_string; const gchar *renderer; const gchar *extensions; gfloat version; /* Features */ gulong feature_mask; /* OpenGL ES backend */ PgmGlesBackend *backend; /* OpenGL ES function pointers */ PgmGlesContextProcAddress *gles; /* Frame rate per second */ GTimeVal fps_tick_time; guint fps; /* Task handlers */ PgmGlesContextTaskFunc task_func[PGM_GLES_CONTEXT_LAST_TASK]; }; /* Task */ struct _PgmGlesContextTask { /* Task type */ PgmGlesContextTaskType type; /* Opaque pointer depending on task type */ gpointer data; }; /* OpenGL ES 1.1 function pointers, used for extensions loading */ struct _PgmGlesContextProcAddress { /* OpenGL ES 1.1 core functions */ pgm_gles_enable enable; pgm_gles_disable disable; pgm_gles_get_error get_error; pgm_gles_get_string get_string; pgm_gles_enable_client_state enable_client_state; pgm_gles_disable_client_state disable_client_state; pgm_gles_vertex_pointer vertex_pointer; pgm_gles_color_pointer color_pointer; pgm_gles_tex_coord_pointer tex_coord_pointer; pgm_gles_draw_arrays draw_arrays; pgm_gles_draw_elements draw_elements; pgm_gles_color_4f color_4f; pgm_gles_blend_func blend_func; pgm_gles_clear clear; pgm_gles_clear_color clear_color; pgm_gles_matrix_mode matrix_mode; pgm_gles_push_matrix push_matrix; pgm_gles_pop_matrix pop_matrix; pgm_gles_load_identity load_identity; pgm_gles_load_matrix_f load_matrix_f; pgm_gles_viewport viewport; pgm_gles_flush flush; pgm_gles_finish finish; pgm_gles_frustum_f frustum_f; pgm_gles_ortho_f ortho_f; pgm_gles_scale_f scale_f; pgm_gles_translate_f translate_f; pgm_gles_rotate_f rotate_f; pgm_gles_hint hint; pgm_gles_shade_model shade_model; pgm_gles_read_pixels read_pixels; pgm_gles_gen_textures gen_textures; pgm_gles_delete_textures delete_textures; pgm_gles_bind_texture bind_texture; pgm_gles_tex_image_2d tex_image_2d; pgm_gles_tex_sub_image_2d tex_sub_image_2d; pgm_gles_tex_parameter_i tex_parameter_i; pgm_gles_active_texture active_texture; pgm_gles_get_integer_v get_integer_v; pgm_gles_get_float_v get_float_v; /* OpenGL ES 1.1 extension functions */ /* ... */ }; /* Create a new context */ PgmGlesContext *pgm_gles_context_new (PgmGlesViewport *glesviewport); /* Free a context */ void pgm_gles_context_free (PgmGlesContext *context); /* Create a new task */ PgmGlesContextTask *pgm_gles_context_task_new (PgmGlesContextTaskType type, gpointer data); /* Free a task */ void pgm_gles_context_task_free (PgmGlesContextTask *task); /* Request a rendering update */ void pgm_gles_context_update (PgmGlesContext *context); /* Push a new task on the immediate queue */ void pgm_gles_context_push_immediate_task (PgmGlesContext *context, PgmGlesContextTask *task); /* Push a new task on the deferred queue */ void pgm_gles_context_push_deferred_task (PgmGlesContext *context, PgmGlesContextTask *task); /* Remove tasks with the given data from the immediate and deferred queues */ void pgm_gles_context_remove_tasks_with_data (PgmGlesContext *context, gconstpointer data); G_END_DECLS #endif /* __PGM_GLES_CONTEXT_H__ */ pigment-0.3.17/tests/0000777000175000017500000000000011205035136011410 500000000000000pigment-0.3.17/tests/interactive/0000777000175000017500000000000011205035136013725 500000000000000pigment-0.3.17/tests/interactive/main.c0000644000175000017500000002136111205034417014735 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment interactive test common routines. * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include #include #if GTK_MAJOR_VERSION > 2 || GTK_MINOR_VERSION >= 12 /* GtkBuilder is only in GTK+ >= 2.12 */ # define USE_GTKBUILDER #else # ifndef HAVE_LIBGLADE_2_0 # error Cannot compile without libglade or a recent GTK+ (>=2.12). # endif # define USE_GLADE #endif #ifdef USE_GLADE #include #endif #include "interactive_tests.h" #define ROOT_WINDOW "root" #define YES_BUTTON "yes" #define NO_BUTTON "no" #define SCREENSHOT_IMAGE "screenshot" #define VIEWPORT_CONTAINER "viewport_container" #ifdef USE_GTKBUILDER # define PGM_INTERACTIVE_TEST_INTERFACE_FILE "interface.xml" #else # define PGM_INTERACTIVE_TEST_INTERFACE_FILE "interface.glade" #endif static test_return_value = FALSE; static int test_argc = 0; static char **test_argv = NULL; guint async_rendering_count = 0; /* exported stuff */ PgmViewport *interactive_test_viewport = NULL; const gchar *pgm_current_test_name = NULL; gboolean pgm_screenshot_mode = FALSE; void pgm_interactive_test_asynchronous_rendering (void) { async_rendering_count += 1; } void pgm_interactive_test_rendering_done (void) { async_rendering_count -= 1; } static gpointer gtk_thread_init (gpointer data) { gtk_main(); } static void do_success (void) { test_return_value = TRUE; gtk_main_quit (); } static void do_fail (void) { test_return_value = FALSE; gtk_main_quit (); } void yes_clicked_callback (GtkButton *button, gpointer data) { do_success (); } void no_clicked_callback (GtkButton *button, gpointer data) { do_fail (); } gboolean root_delete_callback (GtkWidget *widget, GdkEvent *event, gpointer user_data) { do_fail (); return FALSE; } void root_show (GtkWidget *widget, gpointer user_data) { pgm_viewport_show (interactive_test_viewport); } static void screenshot_callback (PgmViewport *viewport, guint width, guint height, gpointer pixels, gpointer user_data) { GdkPixbuf *pixbuf = NULL; gchar *file_name = NULL; file_name = g_strdup_printf ("%s.png", pgm_current_test_name); if (!file_name) { GST_WARNING ("could not create file name for %s", pgm_current_test_name); goto tidy; } pixbuf = gdk_pixbuf_new_from_data (pixels, GDK_COLORSPACE_RGB, TRUE, 8, width, height, width*4, NULL, NULL); if (!pixbuf) { GST_WARNING ("could not create pixbuf for %s", pgm_current_test_name); goto tidy; } gdk_pixbuf_save (pixbuf, file_name, "png", NULL, "compression", "9", NULL); tidy: if (pixbuf) g_object_unref (pixbuf); free (pixels); free (file_name); pgm_main_quit (); } pgm_interactive_test_take_screenshot (gpointer data) { gint width = 0, height = 0; guint8 *pixels = NULL; PgmError ret = PGM_ERROR_OK; PgmViewport *viewport = data; pgm_viewport_get_size (viewport, &width, &height); pixels = malloc (width * height * 4); if (!pixels) { GST_WARNING ("could not create pixel buffer for screenshot"); return FALSE; } while (async_rendering_count) { pgm_main_iteration_do (FALSE); } ret = pgm_viewport_read_pixels (viewport, 0, 0, width, height, pixels); if (PGM_ERROR_OK != ret) { GST_WARNING ("pgm_viewport_read_pixels() returned an error"); free (pixels); return FALSE; } /* the pixel buffer shall be cleaned in the signal callback */ pixels = NULL; return FALSE; } gboolean pgm_interactive_test_ask_user () { GtkImage *screenshot = NULL; GtkWidget *window = NULL; GtkButton *yes = NULL, *no = NULL; GtkContainer *viewport_container = NULL; PgmGtk *embedded_viewport = NULL; test_return_value = FALSE; gchar *image_file = NULL; if (pgm_screenshot_mode) { g_idle_add (pgm_interactive_test_take_screenshot, interactive_test_viewport); pgm_main (); return TRUE; } #ifdef USE_GTKBUILDER GtkBuilder *builder = NULL; builder = gtk_builder_new (); gtk_builder_add_from_file (builder, PGM_INTERACTIVE_TEST_INTERFACE_FILE, NULL); yes = GTK_BUTTON (gtk_builder_get_object (builder, YES_BUTTON)); no = GTK_BUTTON (gtk_builder_get_object (builder, NO_BUTTON)); window = GTK_WIDGET (gtk_builder_get_object (builder, ROOT_WINDOW)); screenshot = GTK_IMAGE (gtk_builder_get_object (builder, SCREENSHOT_IMAGE)); viewport_container = GTK_CONTAINER (gtk_builder_get_object (builder, VIEWPORT_CONTAINER)); #else /* glade */ GladeXML *interface = NULL; interface = glade_xml_new (PGM_INTERACTIVE_TEST_INTERFACE_FILE, NULL, NULL); yes = GTK_BUTTON (glade_xml_get_widget (interface, YES_BUTTON)); no = GTK_BUTTON (glade_xml_get_widget (interface, NO_BUTTON)); window = GTK_WIDGET (glade_xml_get_widget (interface, ROOT_WINDOW)); screenshot = GTK_IMAGE (glade_xml_get_widget (interface, SCREENSHOT_IMAGE)); viewport_container = GTK_CONTAINER (glade_xml_get_widget (interface, VIEWPORT_CONTAINER)); #endif g_signal_connect (GTK_OBJECT (yes), "clicked", G_CALLBACK (yes_clicked_callback), NULL); g_signal_connect (GTK_OBJECT (no), "clicked", G_CALLBACK (no_clicked_callback), NULL); g_signal_connect (GTK_OBJECT (window), "delete-event", G_CALLBACK (root_delete_callback), NULL); g_signal_connect (GTK_OBJECT (window), "show", G_CALLBACK (root_show), NULL); gtk_window_set_title (GTK_WINDOW (window), pgm_current_test_name); image_file = g_strdup_printf ("%s.png", pgm_current_test_name); if (!image_file) { GST_WARNING ("could not create file name for %s", pgm_current_test_name); goto tidy; } if (!screenshot) return FALSE; if (image_file) gtk_image_set_from_file (screenshot, image_file); /* viewport widget */ embedded_viewport = pgm_gtk_new (); pgm_gtk_set_viewport (embedded_viewport, interactive_test_viewport); gtk_container_add (viewport_container, GTK_WIDGET (embedded_viewport)); gtk_widget_show_all (window); gtk_main(); tidy: gtk_widget_destroy (GTK_WIDGET (window)); #ifdef USE_GTKBUILDER g_object_unref (builder); #else /* glade */ #endif free (image_file); return test_return_value; } void pgm_interactive_test_start (void) { fail_unless (NULL == interactive_test_viewport, "viewport is not null"); gtk_init (&test_argc, &test_argv); pgm_init (&test_argc, &test_argv); ASSERT_PGM_SUCCESS (pgm_viewport_factory_make("opengl", &interactive_test_viewport)); ASSERT_PGM_SUCCESS (pgm_viewport_set_size (interactive_test_viewport, 640, 480)); if (pgm_screenshot_mode) { g_signal_connect (G_OBJECT (interactive_test_viewport), "pixels-read", G_CALLBACK (screenshot_callback), NULL); pgm_viewport_hide (interactive_test_viewport); } } void pgm_interactive_test_end (void) { gst_object_unref (interactive_test_viewport); interactive_test_viewport = NULL; pgm_deinit (); } static parse_args(int *argc, char ***argv) { GOptionEntry entries[] = { { "screenshot-mode", 's', 0, G_OPTION_ARG_NONE, &pgm_screenshot_mode, "Take screenshots instead of testing", NULL }, { NULL } }; GOptionContext *context = g_option_context_new (" - launch interactive tests"); g_option_context_add_main_entries (context, entries, NULL); g_option_context_parse (context, argc, argv, NULL); } int main (int argc, char **argv) { int ret = 0, i=0; gst_check_init (&argc, &argv); parse_args (&argc, &argv); test_argc = argc; test_argv = argv; ret = gst_check_run_suite (pgm_text_suite (), "pgm_text_suite", __FILE__); ret += gst_check_run_suite (pgm_image_suite (), "pgm_image_suite", __FILE__); return ret; } pigment-0.3.17/tests/interactive/interactive_tests.h0000644000175000017500000000421311205034417017552 00000000000000#ifndef _PGM_INTERACTIVE_TESTS_H #define _PGM_INTERACTIVE_TESTS_H Suite * pgm_text_suite (void); Suite * pgm_image_suite (void); extern PgmViewport *interactive_test_viewport; extern const gchar *pgm_current_test_name; extern gboolean pgm_screenshot_mode; void pgm_interactive_test_start (void); void pgm_interactive_test_end (void); void pgm_interactive_test_suite_start (void); void pgm_interactive_test_suite_end (void); gboolean pgm_interactive_test_ask_user (void); /* This should be called in the test function if the rendering won't be finished * when the test function returns. * Should be called in the same thread as the test function. */ void pgm_interactive_test_asynchronous_rendering (void); /* In asynchronous rendering (pgm_interactive_test_asynchronous_rendering() has * been called), this function should be called (e.g. by a callback) when the * rendering is done. * Should be called in the same thread as the test function. */ void pgm_interactive_test_rendering_done (void); #define PGM_INTERACTIVE_TESTS_SET_FIXTURES(test_case) \ do{ \ tcase_add_checked_fixture (test_case, pgm_interactive_test_start, \ pgm_interactive_test_end); \ }while(0) #define PGM_START_INTERACTIVE_TEST(test_name) \ PGM_START_TEST (test_name) \ { \ gboolean test_result = FALSE; \ pgm_current_test_name = #test_name; \ pgm_viewport_set_title (interactive_test_viewport, pgm_current_test_name); #define PGM_END_INTERACTIVE_TEST \ test_result = pgm_interactive_test_ask_user(); \ fail_unless (test_result, pgm_current_test_name); \ } \ PGM_END_TEST #endif /* _PGM_INTERACTIVE_TESTS_H */ pigment-0.3.17/tests/interactive/Makefile.am0000644000175000017500000000136011205034417015676 00000000000000include $(top_srcdir)/tests/check/common/common-tests.am .PHONY: screenshots screenshots: interactive_tests @$(TESTS_ENVIRONMENT) \ CK_DEFAULT_TIMEOUT=20 \ ./interactive_tests -s if HAVE_GTK check_PROGRAMS = \ interactive_tests else check-local: echo "You need GTK+ and the GTK+ header files to run these "\ "interactive tests" endif interactive_tests_SOURCES = interactive_tests.h main.c pgmtext.c pgmimage.c if HAVE_LIBGLADE_2_0 AM_CFLAGS += $(LIBGLADE_2_0_CFLAGS) -DHAVE_LIBGLADE_2_0 LDADD += $(LIBGLADE_2_0_LIBS) endif AM_CFLAGS += -DPGM_TEST_IMAGE_FILE=\"$(top_builddir)/examples/pictures/fluendo.png\" -I$(top_builddir)/libs $(GTK_CFLAGS) LDADD += $(top_builddir)/pgm/gtk/libpigment-gtk-@PGM_MAJORMINOR@.la $(GTK_LIBS) pigment-0.3.17/tests/interactive/pgmimage.c0000644000175000017500000001735011205034417015602 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment interactive test using PgmImage. * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include "interactive_tests.h" static void on_image_loaded (PgmImage *image, gpointer user_data) { pgm_interactive_test_rendering_done (); } static PgmDrawable * create_image (guint grid_width, guint grid_height, guint x, guint y) { PgmDrawable *img = NULL; gfloat width = 0.0f, height = 0.0f, space = 0.0f; width = 3.75f / (float) grid_width; height = 2.75f / (float) grid_height; space = 0.25f / (float) (grid_width + 1); pgm_interactive_test_asynchronous_rendering (); img = pgm_image_new (); g_signal_connect (G_OBJECT (img), "pixbuf_loaded", G_CALLBACK (on_image_loaded), NULL); pgm_image_set_from_file (PGM_IMAGE (img), PGM_TEST_IMAGE_FILE, 0); pgm_drawable_set_size (img, width, height); pgm_drawable_set_position (img, space + (width + space) * x, space + (height + space) * y, 0.0f); pgm_drawable_set_bg_color (img, 20, 20, 20, 255); pgm_drawable_show (img); return img; } PGM_START_INTERACTIVE_TEST (test_image_basic) { PgmCanvas *canvas = NULL; PgmDrawable *img = NULL; canvas = pgm_canvas_new (); img = create_image (1, 1, 0, 0); pgm_viewport_set_canvas (interactive_test_viewport, canvas); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, img); } PGM_END_INTERACTIVE_TEST PGM_START_INTERACTIVE_TEST (test_image_alignment_zoomed) { PgmCanvas *canvas = NULL; PgmDrawable *img[9] = { NULL }; guint i = 0; canvas = pgm_canvas_new (); for (i = 0; i< 9; i++) { img[i] = create_image (3, 3, i%3, i/3); pgm_image_set_layout (PGM_IMAGE (img[i]), PGM_IMAGE_ZOOMED); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, img[i]); } pgm_image_set_alignment (PGM_IMAGE (img[0]), PGM_IMAGE_TOP_LEFT); pgm_image_set_alignment (PGM_IMAGE (img[1]), PGM_IMAGE_TOP_CENTER); pgm_image_set_alignment (PGM_IMAGE (img[2]), PGM_IMAGE_TOP_RIGHT); pgm_image_set_alignment (PGM_IMAGE (img[3]), PGM_IMAGE_LEFT); pgm_image_set_alignment (PGM_IMAGE (img[4]), PGM_IMAGE_CENTER); pgm_image_set_alignment (PGM_IMAGE (img[5]), PGM_IMAGE_RIGHT); pgm_image_set_alignment (PGM_IMAGE (img[6]), PGM_IMAGE_BOTTOM_LEFT); pgm_image_set_alignment (PGM_IMAGE (img[7]), PGM_IMAGE_BOTTOM_CENTER); pgm_image_set_alignment (PGM_IMAGE (img[8]), PGM_IMAGE_BOTTOM_RIGHT); pgm_viewport_set_canvas (interactive_test_viewport, canvas); } PGM_END_INTERACTIVE_TEST PGM_START_INTERACTIVE_TEST (test_image_alignment_scaled_horiz) { PgmCanvas *canvas = NULL; PgmDrawable *img[9] = { NULL }; guint i = 0; canvas = pgm_canvas_new (); for (i = 0; i< 9; i++) { img[i] = create_image (3, 3, i%3, i/3); pgm_image_set_layout (PGM_IMAGE (img[i]), PGM_IMAGE_SCALED); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, img[i]); } pgm_image_set_alignment (PGM_IMAGE (img[0]), PGM_IMAGE_TOP_LEFT); pgm_image_set_alignment (PGM_IMAGE (img[1]), PGM_IMAGE_TOP_CENTER); pgm_image_set_alignment (PGM_IMAGE (img[2]), PGM_IMAGE_TOP_RIGHT); pgm_image_set_alignment (PGM_IMAGE (img[3]), PGM_IMAGE_LEFT); pgm_image_set_alignment (PGM_IMAGE (img[4]), PGM_IMAGE_CENTER); pgm_image_set_alignment (PGM_IMAGE (img[5]), PGM_IMAGE_RIGHT); pgm_image_set_alignment (PGM_IMAGE (img[6]), PGM_IMAGE_BOTTOM_LEFT); pgm_image_set_alignment (PGM_IMAGE (img[7]), PGM_IMAGE_BOTTOM_CENTER); pgm_image_set_alignment (PGM_IMAGE (img[8]), PGM_IMAGE_BOTTOM_RIGHT); pgm_viewport_set_canvas (interactive_test_viewport, canvas); } PGM_END_INTERACTIVE_TEST PGM_START_INTERACTIVE_TEST (test_image_alignment_scaled_vert) { PgmCanvas *canvas = NULL; PgmDrawable *img[9] = { NULL }; guint i = 0; canvas = pgm_canvas_new (); for (i = 0; i< 9; i++) { img[i] = create_image (5, 3, (i%3) + 1, i/3); pgm_image_set_layout (PGM_IMAGE (img[i]), PGM_IMAGE_SCALED); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, img[i]); } pgm_image_set_alignment (PGM_IMAGE (img[0]), PGM_IMAGE_TOP_LEFT); pgm_image_set_alignment (PGM_IMAGE (img[1]), PGM_IMAGE_TOP_CENTER); pgm_image_set_alignment (PGM_IMAGE (img[2]), PGM_IMAGE_TOP_RIGHT); pgm_image_set_alignment (PGM_IMAGE (img[3]), PGM_IMAGE_LEFT); pgm_image_set_alignment (PGM_IMAGE (img[4]), PGM_IMAGE_CENTER); pgm_image_set_alignment (PGM_IMAGE (img[5]), PGM_IMAGE_RIGHT); pgm_image_set_alignment (PGM_IMAGE (img[6]), PGM_IMAGE_BOTTOM_LEFT); pgm_image_set_alignment (PGM_IMAGE (img[7]), PGM_IMAGE_BOTTOM_CENTER); pgm_image_set_alignment (PGM_IMAGE (img[8]), PGM_IMAGE_BOTTOM_RIGHT); pgm_viewport_set_canvas (interactive_test_viewport, canvas); } PGM_END_INTERACTIVE_TEST PGM_START_INTERACTIVE_TEST (test_image_layout) { PgmCanvas *canvas = NULL; PgmDrawable *img[3] = { NULL }; guint i = 0; canvas = pgm_canvas_new (); for (i = 0; i< 3; i++) { img[i] = create_image (3, 3, i%3, 1); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, img[i]); } pgm_image_set_layout (PGM_IMAGE (img[0]), PGM_IMAGE_FILLED); pgm_image_set_layout (PGM_IMAGE (img[1]), PGM_IMAGE_SCALED); pgm_image_set_layout (PGM_IMAGE (img[2]), PGM_IMAGE_ZOOMED); pgm_viewport_set_canvas (interactive_test_viewport, canvas); } PGM_END_INTERACTIVE_TEST PGM_START_INTERACTIVE_TEST (test_image_alpha_render) { PgmCanvas *canvas = NULL; PgmDrawable *image[4] = { NULL }; guint i = 0; canvas = pgm_canvas_new (); for (i=0; i<4; i++) { image[i] = create_image (2, 2, i%2, i/2); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, image[i]); pgm_drawable_set_opacity (image[i], i?(64 * i - 1):0); } pgm_viewport_set_canvas (interactive_test_viewport, canvas); } PGM_END_INTERACTIVE_TEST /* This checks that the stuff introduced in r1069 is working */ PGM_START_INTERACTIVE_TEST (test_image_alpha_render_noblend) { PgmCanvas *canvas = NULL; PgmDrawable *image[4] = { NULL }; guint i = 0; pgm_viewport_set_alpha_blending (interactive_test_viewport, FALSE); canvas = pgm_canvas_new (); for (i=0; i<4; i++) { image[i] = create_image (2, 2, i%2, i/2); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, image[i]); pgm_drawable_set_opacity (image[i], i?(64 * i - 1):0); } pgm_viewport_set_canvas (interactive_test_viewport, canvas); } PGM_END_INTERACTIVE_TEST Suite * pgm_image_suite (void) { Suite *s = suite_create ("PgmImage"); TCase *tc_chain = tcase_create ("pgmimage tests"); PGM_INTERACTIVE_TESTS_SET_FIXTURES (tc_chain); tcase_set_timeout (tc_chain, 500); suite_add_tcase (s, tc_chain); tcase_add_test (tc_chain, test_image_basic); tcase_add_test (tc_chain, test_image_alignment_zoomed); tcase_add_test (tc_chain, test_image_alignment_scaled_horiz); tcase_add_test (tc_chain, test_image_alignment_scaled_vert); tcase_add_test (tc_chain, test_image_layout); tcase_add_test (tc_chain, test_image_alpha_render); tcase_add_test (tc_chain, test_image_alpha_render_noblend); return s; } pigment-0.3.17/tests/interactive/pgmtext.c0000644000175000017500000003636611205034417015514 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment interactive test using PgmText. * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /* * FIXME: add tests for line spacing and outline colour. */ #include #include #include "interactive_tests.h" const gchar *lorem_ipsum = "Lorem Ipsum\n" "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod " "tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, " "quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo " "consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse " "cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non " "proident, sunt in culpa qui officia deserunt mollit anim id est laborum."; /* Test that a simple text is displayed correctly */ PGM_START_INTERACTIVE_TEST (test_text_basic) { PgmCanvas *canvas = NULL; PgmDrawable *text = NULL; canvas = pgm_canvas_new (); text = pgm_text_new ("This is some text."); pgm_drawable_set_size (text, 3.5f, 0.25f); pgm_drawable_set_position (text, 0.25f, 2.75f, 0.0f); pgm_drawable_set_fg_color (text, 240, 240, 240, 255); pgm_drawable_set_bg_color (text, 20, 20, 20, 255); pgm_drawable_show (text); pgm_viewport_set_canvas (interactive_test_viewport, canvas); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, text); } PGM_END_INTERACTIVE_TEST; /* Test attributes */ PGM_START_INTERACTIVE_TEST (test_text_attributes) { PgmCanvas *canvas = NULL; PgmDrawable *text = NULL; const gchar *description = "This is normal.\n" "This is monospace \n" "This is bold.\n" "This is underlined.\n" "This is italic.\n" "This is big\n" "This is striken\n" "\nThis is bold italic.\n" "This is bold underlined.\n" "This is italic underlined.\n\n" "This is the ultimate combo.\n" "\nSome utf-8: éàüßčřñ\n" "\nI like maths: an2\n" "Colors: red " "green " "blue " "yellow "; canvas = pgm_canvas_new (); text = pgm_text_new (NULL); pgm_text_set_font_height (PGM_TEXT (text), 1.0f/20.0f); pgm_text_set_markup (PGM_TEXT (text), description); pgm_drawable_set_size (text, 1.75f, 2.5f); pgm_drawable_set_position (text, 1.0f, 0.25f, 0.0f); pgm_drawable_set_fg_color (text, 240, 240, 240, 255); pgm_drawable_set_bg_color (text, 20, 20, 20, 255); pgm_drawable_show (text); pgm_viewport_set_canvas (interactive_test_viewport, canvas); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, text); } PGM_END_INTERACTIVE_TEST; static PgmDrawable * generate_lorem_ipsum_pgm_text(guint div, guint pos) { PgmDrawable *text = pgm_text_new (NULL); fail_unless (NULL != text, "text allocation failed"); gfloat width = 3.75f / div, space = 0.25f / (div+1); gfloat font_height = 0.1f; /* these are the values for which the text fits in the drawable in these * various cases */ switch (div) { case 2: font_height = 1.0f/20.0f; break; case 3: font_height = 1.0f/25.0f; break; case 4: font_height = 1.0f/28.0f; break; } pgm_text_set_font_height (PGM_TEXT (text), font_height); pgm_text_set_markup (PGM_TEXT (text), lorem_ipsum); pgm_drawable_set_size (text, width, 3 - space * 2.0f); pgm_drawable_set_position (text, space + (width + space) * pos, space, 0.0f); pgm_drawable_set_fg_color (text, 240, 240, 240, 255); pgm_drawable_set_bg_color (text, 20, 20, 20, 255); return text; } /* test alignment */ PGM_START_INTERACTIVE_TEST (test_text_alignment) { PgmCanvas *canvas = NULL; PgmDrawable *left = NULL, *right = NULL, *center = NULL; canvas = pgm_canvas_new (); left = generate_lorem_ipsum_pgm_text (3, 0); pgm_text_set_alignment (PGM_TEXT (left), PGM_TEXT_ALIGN_LEFT); pgm_drawable_show (left); center = generate_lorem_ipsum_pgm_text (3, 1); pgm_text_set_alignment (PGM_TEXT (center), PGM_TEXT_ALIGN_CENTER); pgm_drawable_show (center); right = generate_lorem_ipsum_pgm_text (3, 2); pgm_text_set_alignment (PGM_TEXT (right), PGM_TEXT_ALIGN_RIGHT); pgm_drawable_show (right); pgm_viewport_set_canvas (interactive_test_viewport, canvas); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, left); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, center); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, right); } PGM_END_INTERACTIVE_TEST; /* test some font properties (family and height) */ PGM_START_INTERACTIVE_TEST (test_text_font) { PgmCanvas *canvas = NULL; PgmDrawable *left = NULL, *right = NULL; canvas = pgm_canvas_new (); left = generate_lorem_ipsum_pgm_text (2, 0); pgm_text_set_font_family (PGM_TEXT (left), "times"); pgm_drawable_show (left); right = generate_lorem_ipsum_pgm_text (2, 1); pgm_drawable_show (right); pgm_viewport_set_canvas (interactive_test_viewport, canvas); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, left); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, right); } PGM_END_INTERACTIVE_TEST PGM_START_INTERACTIVE_TEST (test_text_ellipsize) { PgmCanvas *canvas = NULL; PgmDrawable *left = NULL, *right = NULL, *middle = NULL; static char *longish = "This is a bit longish isn't it?"; canvas = pgm_canvas_new (); left = pgm_text_new (longish); pgm_text_set_ellipsize (PGM_TEXT (left), PGM_TEXT_ELLIPSIZE_END); pgm_drawable_set_position (left, 0.25f, 0.25f, 0.0f); pgm_drawable_set_size (left, 1.75f, 0.25f); pgm_drawable_set_fg_color (left, 240, 240, 240, 255); pgm_drawable_set_bg_color (left, 20, 20, 20, 255); pgm_drawable_show (left); middle = pgm_text_new (longish); pgm_text_set_ellipsize (PGM_TEXT (middle), PGM_TEXT_ELLIPSIZE_MIDDLE); pgm_drawable_set_position (middle, 1.25f, 1.25f, 0.0f); pgm_drawable_set_size (middle, 1.75f, 0.25f); pgm_drawable_set_fg_color (middle, 240, 240, 240, 255); pgm_drawable_set_bg_color (middle, 20, 20, 20, 255); pgm_drawable_show (middle); right = pgm_text_new (longish); pgm_text_set_ellipsize (PGM_TEXT (right), PGM_TEXT_ELLIPSIZE_START); pgm_drawable_set_position (right, 2.2f, 2.25f, 0.0f); pgm_drawable_set_size (right, 1.75f, 0.25f); pgm_drawable_set_fg_color (right, 240, 240, 240, 255); pgm_drawable_set_bg_color (right, 20, 20, 20, 255); pgm_drawable_show (right); pgm_viewport_set_canvas (interactive_test_viewport, canvas); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, left); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, middle); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, right); } PGM_END_INTERACTIVE_TEST PGM_START_INTERACTIVE_TEST (test_text_justify) { PgmCanvas *canvas = NULL; PgmDrawable *left = NULL, *right = NULL; canvas = pgm_canvas_new (); left = generate_lorem_ipsum_pgm_text (2, 0); pgm_drawable_show (left); right = generate_lorem_ipsum_pgm_text (2, 1); pgm_text_set_justify (PGM_TEXT (right), TRUE); pgm_drawable_show (right); pgm_viewport_set_canvas (interactive_test_viewport, canvas); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, left); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, right); } PGM_END_INTERACTIVE_TEST PGM_START_INTERACTIVE_TEST (test_text_wrap) { PgmCanvas *canvas = NULL; PgmDrawable *left = NULL, *right = NULL, *middle = NULL; const gchar *lorem_ipsum_longword = "Lorem Ipsum\n" "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod " "tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, " "quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo " "consequat. Duis aute irure dolor in " "reprehenderitverylongwordthatmightbetoolong in voluptate velit esse " "cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non " "proident, sunt in culpa qui officia deserunt mollit anim id est laborum."; canvas = pgm_canvas_new (); left = generate_lorem_ipsum_pgm_text (3, 0); pgm_text_set_wrap (PGM_TEXT (left), PGM_TEXT_WRAP_WORD); pgm_text_set_markup (PGM_TEXT (left), lorem_ipsum_longword); pgm_drawable_show (left); middle = generate_lorem_ipsum_pgm_text (3, 1); pgm_text_set_wrap (PGM_TEXT (middle), PGM_TEXT_WRAP_WORD_CHAR); pgm_text_set_markup (PGM_TEXT (middle), lorem_ipsum_longword); pgm_drawable_show (middle); right = generate_lorem_ipsum_pgm_text (3, 2); pgm_text_set_wrap (PGM_TEXT (right), PGM_TEXT_WRAP_CHAR); pgm_text_set_markup (PGM_TEXT (right), lorem_ipsum_longword); pgm_drawable_show (right); pgm_viewport_set_canvas (interactive_test_viewport, canvas); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, left); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, middle); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, right); } PGM_END_INTERACTIVE_TEST PGM_START_INTERACTIVE_TEST (test_text_gravity) { PgmCanvas *canvas = NULL; PgmDrawable *one = NULL, *two = NULL, *three = NULL, *four = NULL; canvas = pgm_canvas_new (); one = generate_lorem_ipsum_pgm_text (4, 0); pgm_text_set_gravity (PGM_TEXT (one), PGM_TEXT_GRAVITY_SOUTH); pgm_drawable_show (one); two = generate_lorem_ipsum_pgm_text (4, 1); pgm_text_set_gravity (PGM_TEXT (two), PGM_TEXT_GRAVITY_EAST); pgm_drawable_show (two); three = generate_lorem_ipsum_pgm_text (4, 2); pgm_text_set_gravity (PGM_TEXT (three), PGM_TEXT_GRAVITY_NORTH); pgm_drawable_show (three); four = generate_lorem_ipsum_pgm_text (4, 3); pgm_text_set_gravity (PGM_TEXT (four), PGM_TEXT_GRAVITY_WEST); pgm_drawable_show (four); pgm_viewport_set_canvas (interactive_test_viewport, canvas); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, one); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, two); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, three); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, four); } PGM_END_INTERACTIVE_TEST; PGM_START_INTERACTIVE_TEST (test_text_style) { PgmCanvas *canvas = NULL; PgmDrawable *left = NULL, *right = NULL, *center = NULL; canvas = pgm_canvas_new (); left = generate_lorem_ipsum_pgm_text (3, 0); pgm_text_set_font_family (PGM_TEXT (left), "times"); pgm_text_set_style (PGM_TEXT (left), PGM_TEXT_STYLE_NORMAL); pgm_drawable_show (left); center = generate_lorem_ipsum_pgm_text (3, 1); pgm_text_set_font_family (PGM_TEXT (center), "times"); pgm_text_set_style (PGM_TEXT (center), PGM_TEXT_STYLE_OBLIQUE); pgm_drawable_show (center); right = generate_lorem_ipsum_pgm_text (3, 2); pgm_text_set_font_family (PGM_TEXT (right), "times"); pgm_text_set_style (PGM_TEXT (right), PGM_TEXT_STYLE_ITALIC); pgm_drawable_show (right); pgm_viewport_set_canvas (interactive_test_viewport, canvas); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, left); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, center); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, right); } PGM_END_INTERACTIVE_TEST; PGM_START_INTERACTIVE_TEST (test_text_variant) { PgmCanvas *canvas = NULL; PgmDrawable *left = NULL, *right = NULL; canvas = pgm_canvas_new (); left = generate_lorem_ipsum_pgm_text (2, 0); pgm_text_set_variant (PGM_TEXT (left), PGM_TEXT_VARIANT_NORMAL); pgm_drawable_show (left); right = generate_lorem_ipsum_pgm_text (2, 1); pgm_text_set_variant (PGM_TEXT (right), PGM_TEXT_VARIANT_SMALL_CAPS); pgm_drawable_show (right); pgm_viewport_set_canvas (interactive_test_viewport, canvas); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, left); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, right); } PGM_END_INTERACTIVE_TEST PGM_START_INTERACTIVE_TEST (test_text_weight) { PgmCanvas *canvas = NULL; PgmDrawable *left = NULL, *right = NULL, *center = NULL; canvas = pgm_canvas_new (); left = generate_lorem_ipsum_pgm_text (3, 0); pgm_text_set_weight (PGM_TEXT (left), PGM_TEXT_WEIGHT_LIGHT); pgm_drawable_show (left); center = generate_lorem_ipsum_pgm_text (3, 1); pgm_text_set_weight (PGM_TEXT (center), PGM_TEXT_WEIGHT_NORMAL); pgm_drawable_show (center); right = generate_lorem_ipsum_pgm_text (3, 2); pgm_text_set_weight (PGM_TEXT (right), PGM_TEXT_WEIGHT_BOLD); pgm_drawable_show (right); pgm_viewport_set_canvas (interactive_test_viewport, canvas); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, left); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, center); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, right); } PGM_END_INTERACTIVE_TEST; PGM_START_INTERACTIVE_TEST (test_text_alpha_render) { PgmCanvas *canvas = NULL; PgmDrawable *text[4] = { NULL }; guint i = 0; canvas = pgm_canvas_new (); for (i=0; i<4; i++) { text[i] = generate_lorem_ipsum_pgm_text (4, i%4); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, text[i]); pgm_drawable_set_opacity (text[i], i?(64 * i - 1):0); pgm_drawable_show (text[i]); } pgm_viewport_set_canvas (interactive_test_viewport, canvas); } PGM_END_INTERACTIVE_TEST /* This checks that the stuff introduced in r1069 is working */ PGM_START_INTERACTIVE_TEST (test_text_alpha_render_noblend) { PgmCanvas *canvas = NULL; PgmDrawable *text[4] = { NULL }; guint i = 0; pgm_viewport_set_alpha_blending (interactive_test_viewport, FALSE); canvas = pgm_canvas_new (); for (i=0; i<4; i++) { text[i] = generate_lorem_ipsum_pgm_text (4, i%4); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, text[i]); pgm_drawable_set_opacity (text[i], i?(64 * i - 1):0); pgm_drawable_show (text[i]); } pgm_viewport_set_canvas (interactive_test_viewport, canvas); } PGM_END_INTERACTIVE_TEST Suite * pgm_text_suite (void) { Suite *s = suite_create ("PgmText"); TCase *tc_chain = tcase_create ("pgmtext tests"); PGM_INTERACTIVE_TESTS_SET_FIXTURES (tc_chain); tcase_set_timeout (tc_chain, 500); suite_add_tcase (s, tc_chain); tcase_add_test (tc_chain, test_text_basic); tcase_add_test (tc_chain, test_text_attributes); tcase_add_test (tc_chain, test_text_alignment); tcase_add_test (tc_chain, test_text_font); tcase_add_test (tc_chain, test_text_ellipsize); tcase_add_test (tc_chain, test_text_justify); tcase_add_test (tc_chain, test_text_wrap); tcase_add_test (tc_chain, test_text_gravity); tcase_add_test (tc_chain, test_text_style); tcase_add_test (tc_chain, test_text_alpha_render); tcase_add_test (tc_chain, test_text_alpha_render_noblend); /* These are deactivated for now since the functions they test do not seem to * do much. */ /* tcase_add_test (tc_chain, test_text_variant); tcase_add_test (tc_chain, test_text_weight); */ return s; } pigment-0.3.17/tests/interactive/Makefile.in0000644000175000017500000006525111205034675015726 00000000000000# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/common/check.mak \ $(top_srcdir)/tests/check/common/common-tests.am @GST_GCOV_ENABLED_TRUE@am__append_1 = $(GCOV_CFLAGS) @GST_GCOV_ENABLED_TRUE@am__append_2 = $(GCOV_LIBS) @HAVE_GTK_TRUE@check_PROGRAMS = interactive_tests$(EXEEXT) @HAVE_LIBGLADE_2_0_TRUE@am__append_3 = $(LIBGLADE_2_0_CFLAGS) -DHAVE_LIBGLADE_2_0 @HAVE_LIBGLADE_2_0_TRUE@am__append_4 = $(LIBGLADE_2_0_LIBS) subdir = tests/interactive ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/as-compiler-flag.m4 \ $(top_srcdir)/common/m4/as-version.m4 \ $(top_srcdir)/common/m4/check.m4 \ $(top_srcdir)/common/m4/gst-args.m4 \ $(top_srcdir)/common/m4/gst-check.m4 \ $(top_srcdir)/common/m4/gst-error.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/libtool.m4 \ $(top_srcdir)/common/m4/ltoptions.m4 \ $(top_srcdir)/common/m4/ltsugar.m4 \ $(top_srcdir)/common/m4/ltversion.m4 \ $(top_srcdir)/common/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = am_interactive_tests_OBJECTS = main.$(OBJEXT) pgmtext.$(OBJEXT) \ pgmimage.$(OBJEXT) interactive_tests_OBJECTS = $(am_interactive_tests_OBJECTS) interactive_tests_LDADD = $(LDADD) am__DEPENDENCIES_1 = @GST_GCOV_ENABLED_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) @HAVE_LIBGLADE_2_0_TRUE@am__DEPENDENCIES_3 = $(am__DEPENDENCIES_1) interactive_tests_DEPENDENCIES = \ $(top_builddir)/pgm/libpigment-@PGM_MAJORMINOR@.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(top_builddir)/tests/check/common/libpgmcheck.a \ $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_3) \ $(top_builddir)/pgm/gtk/libpigment-gtk-@PGM_MAJORMINOR@.la \ $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(interactive_tests_SOURCES) DIST_SOURCES = $(interactive_tests_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAIROXLIB_CFLAGS = @CAIROXLIB_CFLAGS@ CAIROXLIB_LIBS = @CAIROXLIB_LIBS@ CAIRO_CFLAGS = @CAIRO_CFLAGS@ CAIRO_LIBS = @CAIRO_LIBS@ CC = @CC@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXEEXT = @EXEEXT@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ GCOV = @GCOV@ GCOV_CFLAGS = @GCOV_CFLAGS@ GCOV_LIBS = @GCOV_LIBS@ GDKPIXBUFXLIB_CFLAGS = @GDKPIXBUFXLIB_CFLAGS@ GDKPIXBUFXLIB_LIBS = @GDKPIXBUFXLIB_LIBS@ GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@ GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ GST_0_10_13_CFLAGS = @GST_0_10_13_CFLAGS@ GST_0_10_13_LIBS = @GST_0_10_13_LIBS@ GST_10_10_CFLAGS = @GST_10_10_CFLAGS@ GST_10_10_LIBS = @GST_10_10_LIBS@ GST_10_11_CFLAGS = @GST_10_11_CFLAGS@ GST_10_11_LIBS = @GST_10_11_LIBS@ GST_10_12_CFLAGS = @GST_10_12_CFLAGS@ GST_10_12_LIBS = @GST_10_12_LIBS@ GST_10_13_CFLAGS = @GST_10_13_CFLAGS@ GST_10_13_LIBS = @GST_10_13_LIBS@ GST_10_14_CFLAGS = @GST_10_14_CFLAGS@ GST_10_14_LIBS = @GST_10_14_LIBS@ GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ GST_BASE_LIBS = @GST_BASE_LIBS@ GST_CFLAGS = @GST_CFLAGS@ GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ GST_CHECK_LIBS = @GST_CHECK_LIBS@ GST_LIBS = @GST_LIBS@ GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ GST_TOOLS_DIR = @GST_TOOLS_DIR@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_GTK_WIDGET = @HAVE_GTK_WIDGET@ HAVE_IMAGING_LIBRARY = @HAVE_IMAGING_LIBRARY@ HAVE_OPENGLES_PLUGIN = @HAVE_OPENGLES_PLUGIN@ HAVE_OPENGL_PLUGIN = @HAVE_OPENGL_PLUGIN@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGLADE_2_0_CFLAGS = @LIBGLADE_2_0_CFLAGS@ LIBGLADE_2_0_LIBS = @LIBGLADE_2_0_LIBS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENGLES_BACKEND = @OPENGLES_BACKEND@ OPENGL_BACKEND = @OPENGL_BACKEND@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ PANGOCAIRO_CFLAGS = @PANGOCAIRO_CFLAGS@ PANGOCAIRO_LIBS = @PANGOCAIRO_LIBS@ PANGO_1_16_CFLAGS = @PANGO_1_16_CFLAGS@ PANGO_1_16_LIBS = @PANGO_1_16_LIBS@ PANGO_CFLAGS = @PANGO_CFLAGS@ PANGO_LIBS = @PANGO_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL_PATH = @PERL_PATH@ PGM_ALL_CFLAGS = @PGM_ALL_CFLAGS@ PGM_ALL_LDFLAGS = @PGM_ALL_LDFLAGS@ PGM_ALL_LIBS = @PGM_ALL_LIBS@ PGM_GLES_CFLAGS = @PGM_GLES_CFLAGS@ PGM_GLES_LIBS = @PGM_GLES_LIBS@ PGM_GL_CFLAGS = @PGM_GL_CFLAGS@ PGM_GL_LIBS = @PGM_GL_LIBS@ PGM_GTKDOC_CFLAGS = @PGM_GTKDOC_CFLAGS@ PGM_LIB_LDFLAGS = @PGM_LIB_LDFLAGS@ PGM_LT_LDFLAGS = @PGM_LT_LDFLAGS@ PGM_LT_VERSION = @PGM_LT_VERSION@ PGM_MAJORMINOR = @PGM_MAJORMINOR@ PGM_OBJ_CFLAGS = @PGM_OBJ_CFLAGS@ PGM_OBJ_LIBS = @PGM_OBJ_LIBS@ PGM_OPTION_CFLAGS = @PGM_OPTION_CFLAGS@ PGM_PLUGIN_LDFLAGS = @PGM_PLUGIN_LDFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PLUGIN_PATH = @PLUGIN_PATH@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XCOMPOSITE_CFLAGS = @XCOMPOSITE_CFLAGS@ XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ XMKMF = @XMKMF@ XRENDER_CFLAGS = @XRENDER_CFLAGS@ XRENDER_LIBS = @XRENDER_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cairo_req = @cairo_req@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ glib_req = @glib_req@ gstreamer_plugins_base_req = @gstreamer_plugins_base_req@ gstreamer_req = @gstreamer_req@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pango_req = @pango_req@ pangocairo_req = @pangocairo_req@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ LOOPS = 10 # inspect every plugin feature GST_INSPECT = $(GST_TOOLS_DIR)/gst-inspect-$(GST_MAJORMINOR) TESTS_ENVIRONMENT = \ PGM_PLUGIN_PATH=$(top_builddir)/plugins plugindir = $(libdir)/pigment-@PGM_MAJORMINOR@ # the core dumps of some machines have PIDs appended CLEANFILES = core core.* *.gcno *.gcda SUPPRESSIONS = $(top_srcdir)/common/gst.supp TESTS = $(check_PROGRAMS) noinst_HEADERS = AM_CFLAGS = -I$(top_srcdir) -I$(top_builddir)/pgm $(GST_CFLAGS) \ $(CHECK_CFLAGS) $(GDKPIXBUF_CFLAGS) $(am__append_1) \ $(am__append_3) \ -DPGM_TEST_IMAGE_FILE=\"$(top_builddir)/examples/pictures/fluendo.png\" \ -I$(top_builddir)/libs $(GTK_CFLAGS) LDADD = $(top_builddir)/pgm/libpigment-@PGM_MAJORMINOR@.la \ $(GST_CHECK_LIBS) $(GST_LIBS) $(CHECK_LIBS) $(GDKPIXBUF_LIBS) \ $(top_builddir)/tests/check/common/libpgmcheck.a \ $(am__append_2) $(am__append_4) \ $(top_builddir)/pgm/gtk/libpigment-gtk-@PGM_MAJORMINOR@.la \ $(GTK_LIBS) # valgrind testing # these just need valgrind fixing, period VALGRIND_TO_FIX = VALGRIND_IGNORE = # these need fixing because the threads cause segfaults under valgrind TESTS_THREADED = VALGRIND_TESTS_DISABLE = \ $(TESTS_THREADED) \ $(VALGRIND_IGNORE) \ $(VALGRIND_TO_FIX) interactive_tests_SOURCES = interactive_tests.h main.c pgmtext.c pgmimage.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/tests/check/common/common-tests.am $(top_srcdir)/common/check.mak $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/interactive/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/interactive/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done interactive_tests$(EXEEXT): $(interactive_tests_OBJECTS) $(interactive_tests_DEPENDENCIES) @rm -f interactive_tests$(EXEEXT) $(LINK) $(interactive_tests_OBJECTS) $(interactive_tests_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pgmimage.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pgmtext.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ echo "XPASS: $$tst"; \ ;; \ *) \ echo "PASS: $$tst"; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ echo "XFAIL: $$tst"; \ ;; \ *) \ failed=`expr $$failed + 1`; \ echo "FAIL: $$tst"; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ echo "SKIP: $$tst"; \ fi; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ echo "$$dashes"; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done @HAVE_GTK_TRUE@check-local: check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check-local check: check-am all-am: Makefile $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-checkPROGRAMS clean-generic clean-libtool clean-local \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am check-local \ clean clean-checkPROGRAMS clean-generic clean-libtool \ clean-local ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am clean-local-check: for i in `find . -name ".libs" -type d`; do \ rm -rf $$i; \ done # hangs spectacularly on some machines, so let's not do this by default yet @HAVE_VALGRIND_TRUE@check-valgrind: @HAVE_VALGRIND_TRUE@ make valgrind @HAVE_VALGRIND_FALSE@check-valgrind: @HAVE_VALGRIND_FALSE@ @true # run any given test by running make test.check # if the test fails, run it again at at least debug level 2 %.check: % @$(TESTS_ENVIRONMENT) \ CK_DEFAULT_TIMEOUT=20 \ $* || \ $(TESTS_ENVIRONMENT) \ GST_DEBUG=$$GST_DEBUG,*:2 \ CK_DEFAULT_TIMEOUT=20 \ $* # run any given test in a loop %.torture: % @for i in `seq 1 $(LOOPS)`; do \ $(TESTS_ENVIRONMENT) \ CK_DEFAULT_TIMEOUT=20 \ $*; done # run any given test in an infinite loop %.forever: % @while true; do \ $(TESTS_ENVIRONMENT) \ CK_DEFAULT_TIMEOUT=20 \ $* || break; done # valgrind any given test by running make test.valgrind %.valgrind: % $(TESTS_ENVIRONMENT) \ CK_DEFAULT_TIMEOUT=360 \ G_SLICE=always-malloc \ libtool --mode=execute \ $(VALGRIND_PATH) -q \ $(foreach s,$(SUPPRESSIONS),--suppressions=$(s)) \ --tool=memcheck --leak-check=full --trace-children=yes \ --leak-resolution=high --num-callers=20 \ ./$* 2>&1 | tee valgrind.log @if grep "==" valgrind.log > /dev/null 2>&1; then \ rm valgrind.log; \ exit 1; \ fi @rm valgrind.log # valgrind any given test and generate suppressions for it %.valgrind.gen-suppressions: % $(TESTS_ENVIRONMENT) \ CK_DEFAULT_TIMEOUT=60 \ libtool --mode=execute \ $(VALGRIND_PATH) -q \ $(foreach s,$(SUPPRESSIONS),--suppressions=$(s)) \ --tool=memcheck --leak-check=full --trace-children=yes \ --leak-resolution=high --num-callers=20 \ --gen-suppressions=all \ ./$* 2>&1 | tee suppressions.log # valgrind any given test until failure by running make test.valgrind-forever %.valgrind-forever: % @while make $*.valgrind; do \ true; done # gdb any given test by running make test.gdb %.gdb: % $(TESTS_ENVIRONMENT) \ CK_FORK=no \ libtool --mode=execute \ gdb $* # torture tests torture: $(TESTS) -rm test-registry.xml @echo "Torturing tests ..." for i in `seq 1 $(LOOPS)`; do \ make check || \ (echo "Failure after $$i runs"; exit 1) || \ exit 1; \ done @banner="All $(LOOPS) loops passed"; \ dashes=`echo "$$banner" | sed s/./=/g`; \ echo $$dashes; echo $$banner; echo $$dashes # forever tests forever: $(TESTS) -rm test-registry.xml @echo "Forever tests ..." while true; do \ make check || \ (echo "Failure"; exit 1) || \ exit 1; \ done # valgrind all tests valgrind: $(TESTS) @echo "Valgrinding tests ..." @failed=0; \ for t in $(filter-out $(VALGRIND_TESTS_DISABLE),$(TESTS)); do \ make $$t.valgrind; \ if test "$$?" -ne 0; then \ echo "Valgrind error for test $$t"; \ failed=`expr $$failed + 1`; \ whicht="$$whicht $$t"; \ fi; \ done; \ if test "$$failed" -ne 0; then \ echo "$$failed tests had leaks or errors under valgrind:"; \ echo "$$whicht"; \ false; \ fi inspect: @echo "Inspecting features ..." for e in `$(TESTS_ENVIRONMENT) $(GST_INSPECT) | head -n -2 \ | cut -d: -f2`; \ do echo Inspecting $$e; \ $(GST_INSPECT) $$e > /dev/null 2>&1; done help: @echo "make check -- run all checks" @echo "make torture -- run all checks $(LOOPS) times" @echo "make (dir)/(test).check -- run the given check once" @echo "make (dir)/(test).forever -- run the given check forever" @echo "make (dir)/(test).torture -- run the given check $(LOOPS) times" @echo @echo "make (dir)/(test).gdb -- start up gdb for the given test" @echo @echo "make valgrind -- valgrind all tests" @echo "make (dir)/(test).valgrind -- valgrind the given test" @echo "make (dir)/(test).valgrind-forever -- valgrind the given test forever" @echo "make (dir)/(test).valgrind.gen-suppressions -- generate suppressions" @echo " and save to suppressions.log" @echo "make inspect -- inspect all plugin features" # override to _not_ install the test plugins install-pluginLTLIBRARIES: clean-local: clean-local-check .PHONY: screenshots screenshots: interactive_tests @$(TESTS_ENVIRONMENT) \ CK_DEFAULT_TIMEOUT=20 \ ./interactive_tests -s @HAVE_GTK_FALSE@check-local: @HAVE_GTK_FALSE@ echo "You need GTK+ and the GTK+ header files to run these "\ @HAVE_GTK_FALSE@ "interactive tests" # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pigment-0.3.17/tests/README0000644000175000017500000001563011205034417012212 00000000000000This directory contains regression tests, functionality tests, etc check/ unit tests using the check library, non-interactive interactive/ interactive tests misc/ prototypes, random bits, etc A few words about the test framework used in check/ and interactive/: They both use the pgmcheck static library defined in check/common/, which is built at make check. This library depends on check (http://check.sourceforge.net/), as well as on gstcheck, a gstreamer extension to check. Check, gstcheck and pgmcheck provide a few facilities to ease the creation and running of tests. 1. The pgmcheck library 1.1 Running tests To run all non-interactive tests, run "make check" in the main source directory or in tests/. To run only C unit tests, run "make check" in tests/check. If you are interested in a specific set of tests, you can run "make check" in a specific subdirectory of tests/check. If you are only interested in a few specific tests, you can define the PGM_CHECKS environment variable with a comma separated list of tests to run, and run "make check" either in tests/check/ or in a specific subdirectory containing the tests you want to run. For instance: $ cd tests/check/pgm $ make check PGM_CHECKS=test_main,test_version If you want to run all the tests in a given test program, say, foobar, you can run make foobar.check. In the same fashion, you can run make foobar.gdb to run the test program in a debugger. If you are interested in a particular test function you can simply do: $ make foobar.check PGM_CHECKS=test_foo or for debugging: $ make foobar.gdb PGM_CHECKS=test_foo If you want to debug a test without using this facility, you need to know two things: - The framework normaly forks before running each test function, to disable this, you must set the CK_FORK environment variable to no. - If your test program is tests/check/foo/bar, the actual executable is tests/check/foo/.libs/bar. A lt-bar with some libtool automation is provided as well. tests/check/foo/bar is only a shell script. - You are likely to need to run the misc/pgm-uninstalled script before running a test program outside of a make rule. 1.2 Writing tests 1.2.1 Mandatory tests Here are the steps you need to follow to write tests using this framework: - Include tests/check/common/pgmcheck.h and link you program with tests/check/common/libpgmcheck.a (this linkage is done automatically if you include tests/check/common/common-tests.am in your Makefile.am). - Define your test function as follow: PGM_START_TEST (test_foo_bar) { /* function code */ } PGM_END_TEST - Define a test suite containing several related tests: Suite * pgm_suite (void) { Suite *s = suite_create ("Foo"); TCase *tc_chain = tcase_create ("foo tests"); suite_add_tcase (s, tc_chain); tcase_add_test (tc_chain, test_foo_bar); tcase_add_test (tc_chain, test_bar_foo); return s; } 1.2.2 Fixtures Optionally, you can use fixtures to factorise your code. Please see the documentation of check to know more about fixtures. A default set of fixture is defined in libpgmcheck. To use them, you should use the PGM_USE_STANDARD_FIXTURES() macro. 1.2.3 Forks When designing and writing tests, you need to be aware that Check creates a new process (using fork()) for each test function it runs. Therefore, two test functions cannot share data as if they were in the same thread. Also, you have two kinds of fixtures, checked (run for each test function in the same process as the test function), and unchecked (run for each test case in the main process). 2. Unit tests They are in the tests/check/ directory. It does not have any tests in it, but have a few subdirectories containing mainly unit tests: common/ Common Makefile.am routines (in common-tests.am) providing many useful rules as well as handling the linking with pigment and its dependencies. pgm/ Tests on the core of pigment. For the moment, each source file contains tests for a given class in the core. plugins/ Tests for the rendering plugins. +-common/ A static library (libpgmplugintestsuite.a) with a | set of tests to be run on all plugins. If you want to run | these tests on your plugin, create a subdirectory in plugins/, | and add a program in it that is linked against | libpgmplugintestsuite.a and calls plugin_suites_run(), after | having used the macro PGM_TEST_USE_PLUGIN() outside of any | function. The first argument to this macro is the name of the | plugin, the second is the reference count that it adds to | pigment objects (other than PgmViewportFactory). See | plugins/boilerplate/ for an example. +-boilerplate/ A test program running the plugin test suite on the | boilerplate plugin. +-opengl/ Tests for the opengl plugin. This includes the plugin tests suite as well as a few specific tests. 3. Interactive tests 3.1 Running They are in the tests/interactive/ subdirectory. For the moment, there is only one test program that runs several test suites. You should use the PGM_CHECKS environment variable as explained in 1.1 if you want to only run specific tests. The tests written so far are rendering tests, with a GTK+ window showing a screenshot of the expected rendering on the left, and the pigment rendering on the right. The user is asked whether the two renderings are the same. If she answers "Yes", the test passes, else it fails. 3.2 Writing To add a rendering test, you need to write a rendering function, add it to a test suite (or create a new test suite), and ensure that this test suite is run in main.c. If you add a new source file, you need to add it to interactive_tests_SOURCES in Makefile.am, and you need to include interactive_tests.h in your file. Once this is done, run "make check PGM_CHECKS=your_test_name" in the tests/interactive/ directory to test that your rendering is correct. If it is, you can generate a screenshot of your rendering, to display on the left side of the window, by calling "make screenshots PGM_CHECKS=your_test_name". 3.2.1 Rendering function Your rendering function should make use of an already instanciated viewport in the global variable interactive_test_viewport. You need to use PGM_START_INTERACTIVE_TEST() and PGM_END_INTERACTIVE_TEST to define your function. See e.g. test_text_basic at the beginning of tests/interactive/pgmtext.c. 3.2.2 Test suite You need to do as explained in 1.2.1, but you must use the PGM_INTERACTIVE_TESTS_SET_FIXTURES() macro. Again, tests/interactive/pgmtext.c is a good and simple example of how to proceed. 3.2.3 Running a test suite The only thing you should modify in main.c is that if you create a new test suite, you should add a line like: ret += gst_check_run_suite (pgm_foo_suite (), "pgm_foo_suite", __FILE__); near the end of the main() function. pigment-0.3.17/tests/Makefile.am0000644000175000017500000000323011205034417013357 00000000000000EXTRA_DIST = README SUBDIRS = check DIST_SUBDIRS = \ check \ interactive check-interactive: make -C interactive/ check # coverage stuff COVERAGE_DIRS = \ pgm \ plugins/boilerplate \ plugins/opengl COVERAGE_FILES = $(foreach dir,$(COVERAGE_DIRS),$(wildcard $(top_builddir)/$(dir)/*.gcov)) COVERAGE_FILES_REL = $(subst $(top_builddir)/,,$(COVERAGE_FILES)) COVERAGE_OUT_FILES = $(foreach dir,$(COVERAGE_DIRS),$(wildcard $(top_builddir)/$(dir)/*.gcov.out)) COVERAGE_OUT_FILES_REL = $(subst $(top_builddir)/,,$(COVERAGE_OUT_FILES)) debug: echo $(COVERAGE_FILES) echo $(COVERAGE_FILES_REL) .PHONY: coverage if GST_GCOV_ENABLED coverage: for file in `find $(top_builddir) -name '*.gcda'`; do rm $$file; done make check make coverage-report else coverage: echo "You need to configure with --enable-gcov to get coverage data" exit 1 endif coverage-report: rm -rf coverage for dir in $(COVERAGE_DIRS); do \ mkdir -p coverage/$$dir; \ make -C $(top_builddir)/$$dir gcov; \ done for dir in $(COVERAGE_DIRS); do \ files="`ls $(top_builddir)/$$dir/*.gcov.out 2> /dev/null`"; \ if test ! -z "$$files"; then \ perl $(top_srcdir)/tests/tools/coverage/coverage-report.pl \ $(top_builddir)/$$dir/*.gcov.out > \ coverage/$$dir/index.xml; \ xsltproc $(top_srcdir)/tests/tools/coverage/coverage-report.xsl \ coverage/$$dir/index.xml > coverage/$$dir/index.html; \ fi; \ done for file in $(COVERAGE_FILES_REL); do \ echo Generating coverage/$$file.html; \ perl $(top_srcdir)/tests/tools/coverage/coverage-report-entry.pl \ $(top_builddir)/$$file > coverage/$$file.html; \ done pigment-0.3.17/tests/check/0000777000175000017500000000000011205035135012464 500000000000000pigment-0.3.17/tests/check/Makefile.am0000644000175000017500000000003711205034417014436 00000000000000SUBDIRS = common pgm plugins pigment-0.3.17/tests/check/plugins/0000777000175000017500000000000011205035136014146 500000000000000pigment-0.3.17/tests/check/plugins/Makefile.am0000644000175000017500000000011611205034417016115 00000000000000SUBDIRS = common boilerplate if OPENGL_TESTS_ENABLED SUBDIRS += opengl endif pigment-0.3.17/tests/check/plugins/boilerplate/0000777000175000017500000000000011205035136016450 500000000000000pigment-0.3.17/tests/check/plugins/boilerplate/Makefile.am0000644000175000017500000000030511205034417020417 00000000000000include $(top_srcdir)/tests/check/common/common-tests.am check_PROGRAMS = plugin_test_suite plugin_test_suite_LDADD = $(top_builddir)/tests/check/plugins/common/libpgmplugintestsuite.a $(LDADD) pigment-0.3.17/tests/check/plugins/boilerplate/Makefile.in0000644000175000017500000006340011205034675020443 00000000000000# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/common/check.mak \ $(top_srcdir)/tests/check/common/common-tests.am @GST_GCOV_ENABLED_TRUE@am__append_1 = $(GCOV_CFLAGS) @GST_GCOV_ENABLED_TRUE@am__append_2 = $(GCOV_LIBS) check_PROGRAMS = plugin_test_suite$(EXEEXT) subdir = tests/check/plugins/boilerplate ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/as-compiler-flag.m4 \ $(top_srcdir)/common/m4/as-version.m4 \ $(top_srcdir)/common/m4/check.m4 \ $(top_srcdir)/common/m4/gst-args.m4 \ $(top_srcdir)/common/m4/gst-check.m4 \ $(top_srcdir)/common/m4/gst-error.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/libtool.m4 \ $(top_srcdir)/common/m4/ltoptions.m4 \ $(top_srcdir)/common/m4/ltsugar.m4 \ $(top_srcdir)/common/m4/ltversion.m4 \ $(top_srcdir)/common/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = plugin_test_suite_SOURCES = plugin_test_suite.c plugin_test_suite_OBJECTS = plugin_test_suite.$(OBJEXT) am__DEPENDENCIES_1 = @GST_GCOV_ENABLED_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) am__DEPENDENCIES_3 = \ $(top_builddir)/pgm/libpigment-@PGM_MAJORMINOR@.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(top_builddir)/tests/check/common/libpgmcheck.a \ $(am__DEPENDENCIES_2) plugin_test_suite_DEPENDENCIES = $(top_builddir)/tests/check/plugins/common/libpgmplugintestsuite.a \ $(am__DEPENDENCIES_3) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = plugin_test_suite.c DIST_SOURCES = plugin_test_suite.c HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAIROXLIB_CFLAGS = @CAIROXLIB_CFLAGS@ CAIROXLIB_LIBS = @CAIROXLIB_LIBS@ CAIRO_CFLAGS = @CAIRO_CFLAGS@ CAIRO_LIBS = @CAIRO_LIBS@ CC = @CC@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXEEXT = @EXEEXT@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ GCOV = @GCOV@ GCOV_CFLAGS = @GCOV_CFLAGS@ GCOV_LIBS = @GCOV_LIBS@ GDKPIXBUFXLIB_CFLAGS = @GDKPIXBUFXLIB_CFLAGS@ GDKPIXBUFXLIB_LIBS = @GDKPIXBUFXLIB_LIBS@ GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@ GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ GST_0_10_13_CFLAGS = @GST_0_10_13_CFLAGS@ GST_0_10_13_LIBS = @GST_0_10_13_LIBS@ GST_10_10_CFLAGS = @GST_10_10_CFLAGS@ GST_10_10_LIBS = @GST_10_10_LIBS@ GST_10_11_CFLAGS = @GST_10_11_CFLAGS@ GST_10_11_LIBS = @GST_10_11_LIBS@ GST_10_12_CFLAGS = @GST_10_12_CFLAGS@ GST_10_12_LIBS = @GST_10_12_LIBS@ GST_10_13_CFLAGS = @GST_10_13_CFLAGS@ GST_10_13_LIBS = @GST_10_13_LIBS@ GST_10_14_CFLAGS = @GST_10_14_CFLAGS@ GST_10_14_LIBS = @GST_10_14_LIBS@ GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ GST_BASE_LIBS = @GST_BASE_LIBS@ GST_CFLAGS = @GST_CFLAGS@ GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ GST_CHECK_LIBS = @GST_CHECK_LIBS@ GST_LIBS = @GST_LIBS@ GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ GST_TOOLS_DIR = @GST_TOOLS_DIR@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_GTK_WIDGET = @HAVE_GTK_WIDGET@ HAVE_IMAGING_LIBRARY = @HAVE_IMAGING_LIBRARY@ HAVE_OPENGLES_PLUGIN = @HAVE_OPENGLES_PLUGIN@ HAVE_OPENGL_PLUGIN = @HAVE_OPENGL_PLUGIN@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGLADE_2_0_CFLAGS = @LIBGLADE_2_0_CFLAGS@ LIBGLADE_2_0_LIBS = @LIBGLADE_2_0_LIBS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENGLES_BACKEND = @OPENGLES_BACKEND@ OPENGL_BACKEND = @OPENGL_BACKEND@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ PANGOCAIRO_CFLAGS = @PANGOCAIRO_CFLAGS@ PANGOCAIRO_LIBS = @PANGOCAIRO_LIBS@ PANGO_1_16_CFLAGS = @PANGO_1_16_CFLAGS@ PANGO_1_16_LIBS = @PANGO_1_16_LIBS@ PANGO_CFLAGS = @PANGO_CFLAGS@ PANGO_LIBS = @PANGO_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL_PATH = @PERL_PATH@ PGM_ALL_CFLAGS = @PGM_ALL_CFLAGS@ PGM_ALL_LDFLAGS = @PGM_ALL_LDFLAGS@ PGM_ALL_LIBS = @PGM_ALL_LIBS@ PGM_GLES_CFLAGS = @PGM_GLES_CFLAGS@ PGM_GLES_LIBS = @PGM_GLES_LIBS@ PGM_GL_CFLAGS = @PGM_GL_CFLAGS@ PGM_GL_LIBS = @PGM_GL_LIBS@ PGM_GTKDOC_CFLAGS = @PGM_GTKDOC_CFLAGS@ PGM_LIB_LDFLAGS = @PGM_LIB_LDFLAGS@ PGM_LT_LDFLAGS = @PGM_LT_LDFLAGS@ PGM_LT_VERSION = @PGM_LT_VERSION@ PGM_MAJORMINOR = @PGM_MAJORMINOR@ PGM_OBJ_CFLAGS = @PGM_OBJ_CFLAGS@ PGM_OBJ_LIBS = @PGM_OBJ_LIBS@ PGM_OPTION_CFLAGS = @PGM_OPTION_CFLAGS@ PGM_PLUGIN_LDFLAGS = @PGM_PLUGIN_LDFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PLUGIN_PATH = @PLUGIN_PATH@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XCOMPOSITE_CFLAGS = @XCOMPOSITE_CFLAGS@ XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ XMKMF = @XMKMF@ XRENDER_CFLAGS = @XRENDER_CFLAGS@ XRENDER_LIBS = @XRENDER_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cairo_req = @cairo_req@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ glib_req = @glib_req@ gstreamer_plugins_base_req = @gstreamer_plugins_base_req@ gstreamer_req = @gstreamer_req@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pango_req = @pango_req@ pangocairo_req = @pangocairo_req@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ LOOPS = 10 # inspect every plugin feature GST_INSPECT = $(GST_TOOLS_DIR)/gst-inspect-$(GST_MAJORMINOR) TESTS_ENVIRONMENT = \ PGM_PLUGIN_PATH=$(top_builddir)/plugins plugindir = $(libdir)/pigment-@PGM_MAJORMINOR@ # the core dumps of some machines have PIDs appended CLEANFILES = core core.* *.gcno *.gcda SUPPRESSIONS = $(top_srcdir)/common/gst.supp TESTS = $(check_PROGRAMS) noinst_HEADERS = AM_CFLAGS = -I$(top_srcdir) -I$(top_builddir)/pgm $(GST_CFLAGS) \ $(CHECK_CFLAGS) $(GDKPIXBUF_CFLAGS) $(am__append_1) LDADD = $(top_builddir)/pgm/libpigment-@PGM_MAJORMINOR@.la \ $(GST_CHECK_LIBS) $(GST_LIBS) $(CHECK_LIBS) $(GDKPIXBUF_LIBS) \ $(top_builddir)/tests/check/common/libpgmcheck.a \ $(am__append_2) # valgrind testing # these just need valgrind fixing, period VALGRIND_TO_FIX = VALGRIND_IGNORE = # these need fixing because the threads cause segfaults under valgrind TESTS_THREADED = VALGRIND_TESTS_DISABLE = \ $(TESTS_THREADED) \ $(VALGRIND_IGNORE) \ $(VALGRIND_TO_FIX) plugin_test_suite_LDADD = $(top_builddir)/tests/check/plugins/common/libpgmplugintestsuite.a $(LDADD) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/tests/check/common/common-tests.am $(top_srcdir)/common/check.mak $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/check/plugins/boilerplate/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/check/plugins/boilerplate/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done plugin_test_suite$(EXEEXT): $(plugin_test_suite_OBJECTS) $(plugin_test_suite_DEPENDENCIES) @rm -f plugin_test_suite$(EXEEXT) $(LINK) $(plugin_test_suite_OBJECTS) $(plugin_test_suite_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plugin_test_suite.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ echo "XPASS: $$tst"; \ ;; \ *) \ echo "PASS: $$tst"; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ echo "XFAIL: $$tst"; \ ;; \ *) \ failed=`expr $$failed + 1`; \ echo "FAIL: $$tst"; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ echo "SKIP: $$tst"; \ fi; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ echo "$$dashes"; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-checkPROGRAMS clean-generic clean-libtool clean-local \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ clean-checkPROGRAMS clean-generic clean-libtool clean-local \ ctags distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am clean-local-check: for i in `find . -name ".libs" -type d`; do \ rm -rf $$i; \ done # hangs spectacularly on some machines, so let's not do this by default yet @HAVE_VALGRIND_TRUE@check-valgrind: @HAVE_VALGRIND_TRUE@ make valgrind @HAVE_VALGRIND_FALSE@check-valgrind: @HAVE_VALGRIND_FALSE@ @true # run any given test by running make test.check # if the test fails, run it again at at least debug level 2 %.check: % @$(TESTS_ENVIRONMENT) \ CK_DEFAULT_TIMEOUT=20 \ $* || \ $(TESTS_ENVIRONMENT) \ GST_DEBUG=$$GST_DEBUG,*:2 \ CK_DEFAULT_TIMEOUT=20 \ $* # run any given test in a loop %.torture: % @for i in `seq 1 $(LOOPS)`; do \ $(TESTS_ENVIRONMENT) \ CK_DEFAULT_TIMEOUT=20 \ $*; done # run any given test in an infinite loop %.forever: % @while true; do \ $(TESTS_ENVIRONMENT) \ CK_DEFAULT_TIMEOUT=20 \ $* || break; done # valgrind any given test by running make test.valgrind %.valgrind: % $(TESTS_ENVIRONMENT) \ CK_DEFAULT_TIMEOUT=360 \ G_SLICE=always-malloc \ libtool --mode=execute \ $(VALGRIND_PATH) -q \ $(foreach s,$(SUPPRESSIONS),--suppressions=$(s)) \ --tool=memcheck --leak-check=full --trace-children=yes \ --leak-resolution=high --num-callers=20 \ ./$* 2>&1 | tee valgrind.log @if grep "==" valgrind.log > /dev/null 2>&1; then \ rm valgrind.log; \ exit 1; \ fi @rm valgrind.log # valgrind any given test and generate suppressions for it %.valgrind.gen-suppressions: % $(TESTS_ENVIRONMENT) \ CK_DEFAULT_TIMEOUT=60 \ libtool --mode=execute \ $(VALGRIND_PATH) -q \ $(foreach s,$(SUPPRESSIONS),--suppressions=$(s)) \ --tool=memcheck --leak-check=full --trace-children=yes \ --leak-resolution=high --num-callers=20 \ --gen-suppressions=all \ ./$* 2>&1 | tee suppressions.log # valgrind any given test until failure by running make test.valgrind-forever %.valgrind-forever: % @while make $*.valgrind; do \ true; done # gdb any given test by running make test.gdb %.gdb: % $(TESTS_ENVIRONMENT) \ CK_FORK=no \ libtool --mode=execute \ gdb $* # torture tests torture: $(TESTS) -rm test-registry.xml @echo "Torturing tests ..." for i in `seq 1 $(LOOPS)`; do \ make check || \ (echo "Failure after $$i runs"; exit 1) || \ exit 1; \ done @banner="All $(LOOPS) loops passed"; \ dashes=`echo "$$banner" | sed s/./=/g`; \ echo $$dashes; echo $$banner; echo $$dashes # forever tests forever: $(TESTS) -rm test-registry.xml @echo "Forever tests ..." while true; do \ make check || \ (echo "Failure"; exit 1) || \ exit 1; \ done # valgrind all tests valgrind: $(TESTS) @echo "Valgrinding tests ..." @failed=0; \ for t in $(filter-out $(VALGRIND_TESTS_DISABLE),$(TESTS)); do \ make $$t.valgrind; \ if test "$$?" -ne 0; then \ echo "Valgrind error for test $$t"; \ failed=`expr $$failed + 1`; \ whicht="$$whicht $$t"; \ fi; \ done; \ if test "$$failed" -ne 0; then \ echo "$$failed tests had leaks or errors under valgrind:"; \ echo "$$whicht"; \ false; \ fi inspect: @echo "Inspecting features ..." for e in `$(TESTS_ENVIRONMENT) $(GST_INSPECT) | head -n -2 \ | cut -d: -f2`; \ do echo Inspecting $$e; \ $(GST_INSPECT) $$e > /dev/null 2>&1; done help: @echo "make check -- run all checks" @echo "make torture -- run all checks $(LOOPS) times" @echo "make (dir)/(test).check -- run the given check once" @echo "make (dir)/(test).forever -- run the given check forever" @echo "make (dir)/(test).torture -- run the given check $(LOOPS) times" @echo @echo "make (dir)/(test).gdb -- start up gdb for the given test" @echo @echo "make valgrind -- valgrind all tests" @echo "make (dir)/(test).valgrind -- valgrind the given test" @echo "make (dir)/(test).valgrind-forever -- valgrind the given test forever" @echo "make (dir)/(test).valgrind.gen-suppressions -- generate suppressions" @echo " and save to suppressions.log" @echo "make inspect -- inspect all plugin features" # override to _not_ install the test plugins install-pluginLTLIBRARIES: clean-local: clean-local-check # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pigment-0.3.17/tests/check/plugins/boilerplate/plugin_test_suite.c0000644000175000017500000000213211205034417022275 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment unit test for boilerplate plugin * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include PGM_TEST_USE_PLUGIN ("boilerplate", 0) int main (int argc, char **argv) { gst_check_init (&argc, &argv); return plugin_suites_run (); } pigment-0.3.17/tests/check/plugins/common/0000777000175000017500000000000011205035135015435 500000000000000pigment-0.3.17/tests/check/plugins/common/pgmviewportfactory.c0000644000175000017500000002011211205034417021466 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment unit test for pgmviewportfactory.c * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include "pgmplugintestsuite.h" /* test plugin loading */ PGM_START_TEST (test_factory_load) { PgmViewportFactory *factory = NULL; PgmViewport *viewport = NULL; gboolean success; PgmError ret= PGM_ERROR_OK; success = pgm_init_check (NULL, NULL); fail_unless (success, "init_check returned FALSE"); /* Try to load an unavailable plugin */ factory = pgm_viewport_factory_new ("blah blah"); ret = pgm_viewport_factory_create (factory, &viewport); fail_if ( PGM_ERROR_X != ret, "viewport_factory_create did not detect the plugin doesn't exist"); g_object_unref (factory); /* Try to load an available plugin */ factory = pgm_viewport_factory_new (PGM_TEST_PLUGIN); fail_unless (factory != NULL, "viewport_factory_new returned FALSE with our " "plugin"); gst_object_unref (factory); pgm_deinit (); } PGM_END_TEST; PGM_START_TEST (test_factory_multi_load) { PgmViewportFactory *factory1 = NULL, *factory2 = NULL; PgmViewport *viewport = NULL; gboolean success; success = pgm_init_check (NULL, NULL); fail_unless (success, "init_check returned FALSE"); /* Load the plugin */ factory1 = pgm_viewport_factory_new (PGM_TEST_PLUGIN); fail_unless (factory1 != NULL, "viewport_factory_new returned FALSE with our " "plugin"); factory2 = pgm_viewport_factory_new (PGM_TEST_PLUGIN); fail_unless (factory2 != NULL, "viewport_factory_new returned FALSE with our " "plugin on the second call"); fail_unless (factory1 == factory2, "two factories for the same plugin should" "be equal"); ASSERT_OBJECT_REFCOUNT (factory1, "factory1", 3); ASSERT_OBJECT_REFCOUNT (factory2, "factory2", 3); pgm_viewport_factory_create (factory1, &viewport); fail_unless (viewport != NULL, "viewport creation failed"); gst_object_unref (viewport); viewport = NULL; ASSERT_OBJECT_REFCOUNT (factory1, "factory1 after viewport creation/deletion", 3); gst_object_unref (factory1); factory1 = NULL; ASSERT_OBJECT_REFCOUNT (factory2, "factory2 after unref on factory1", 2); gst_object_unref (factory2); factory1 = pgm_viewport_factory_new (PGM_TEST_PLUGIN); fail_unless (factory1 != NULL, "viewport recreation failed"); ASSERT_OBJECT_REFCOUNT (factory1, "factory1", 2); pgm_viewport_factory_create (factory1, &viewport); fail_unless (viewport != NULL, "viewport creation from a recreated factory failed"); gst_object_unref (viewport); viewport = NULL; gst_object_unref (factory1); pgm_deinit (); } PGM_END_TEST; /* test available plugin */ PGM_START_TEST (test_factory_desc) { PgmViewportFactory *factory = NULL; gchar *string = NULL; gboolean success; PgmError ret; success = pgm_init_check (NULL, NULL); fail_unless (success, "init_check returned FALSE"); factory = pgm_viewport_factory_new (PGM_TEST_PLUGIN); fail_unless (factory != NULL, "viewport_factory_new returned FALSE our " "plugin"); /* Check the description */ ret = pgm_viewport_factory_get_description (factory, &string); fail_if (ret != PGM_ERROR_OK, "viewport_factory_get_description error"); if (!g_ascii_strcasecmp (PGM_TEST_PLUGIN, "boilerplate")) { success = !g_ascii_strcasecmp ("A boilerplate viewport used for tests", string); } else if (!g_ascii_strcasecmp (PGM_TEST_PLUGIN, "opengl")) { success = !g_ascii_strcasecmp ("An OpenGL viewport", string); } else { success = TRUE; } fail_unless (success, "plugin returns a bad description"); g_free (string); /* Check the license */ ret = pgm_viewport_factory_get_license (factory, &string); fail_if (ret != PGM_ERROR_OK, "viewport_factory_get_license error"); success = g_ascii_strcasecmp ("LGPL", string); fail_unless (!success, "plugin returns a bad license"); g_free (string); /* Check the origin */ ret = pgm_viewport_factory_get_origin (factory, &string); fail_if (ret != PGM_ERROR_OK, "viewport_factory_get_origin error"); success = g_ascii_strcasecmp ("https://code.fluendo.com/pigment/trac", string); fail_unless (!success, "plugin returns a bad origin"); g_free (string); /* Check the author */ ret = pgm_viewport_factory_get_author (factory, &string); fail_if (ret != PGM_ERROR_OK, "viewport_factory_get_author error"); success = g_ascii_strcasecmp ("Loïc Molinari ", string); fail_unless (!success, "plugin returns a bad author"); g_free (string); gst_object_unref (factory); pgm_deinit (); } PGM_END_TEST; /* test viewport creation with make */ PGM_START_TEST (test_factory_make) { PgmViewport *viewport = NULL; gboolean success; PgmError ret; success = pgm_init_check (NULL, NULL); fail_unless (success, "init_check returned FALSE"); /* Create a viewport with factory_make */ ret = pgm_viewport_factory_make (PGM_TEST_PLUGIN, &viewport); fail_if (ret != PGM_ERROR_OK, "viewport_factory_create error"); fail_unless (PGM_IS_VIEWPORT (viewport), "viewport_factory_create returns " "a bad viewport"); ASSERT_OBJECT_REFCOUNT (viewport, "viewport", 1); gst_object_unref (viewport); pgm_deinit (); } PGM_END_TEST; /* test 2 viewport creations with new/create */ PGM_START_TEST (test_factory_create) { PgmViewportFactory *factory = NULL; PgmViewport *vp1 = NULL, *vp2 = NULL; gboolean success; PgmError ret; success = pgm_init_check (NULL, NULL); fail_unless (success, "init_check returned FALSE"); /* Create the factory */ factory = pgm_viewport_factory_new (PGM_TEST_PLUGIN); fail_unless (factory != NULL, "viewport_factory_new returned FALSE with our " "plugin"); ASSERT_OBJECT_REFCOUNT (factory, "factory", 2); /* Instantiate a first viewport, increase the factory ref count */ ret = pgm_viewport_factory_create (factory, &vp1); fail_if (ret != PGM_ERROR_OK, "viewport_factory_create error"); fail_unless (PGM_IS_VIEWPORT (vp1), "viewport_factory_create returns a bad " "viewport"); ASSERT_OBJECT_REFCOUNT (vp1, "vp1", 1); ASSERT_OBJECT_REFCOUNT (factory, "factory", 3); /* Instantiate a second viewport, increase the factory ref count */ ret = pgm_viewport_factory_create (factory, &vp2); fail_if (ret != PGM_ERROR_OK, "viewport_factory_create error"); fail_unless (PGM_IS_VIEWPORT (vp2), "viewport_factory_create returns a bad " "viewport"); ASSERT_OBJECT_REFCOUNT (vp2, "vp1", 1); ASSERT_OBJECT_REFCOUNT (factory, "factory", 4); /* Unref the viewports */ gst_object_unref (vp1); ASSERT_OBJECT_REFCOUNT (factory, "factory", 3); gst_object_unref (vp2); ASSERT_OBJECT_REFCOUNT (factory, "factory", 2); gst_object_unref (factory); pgm_deinit (); } PGM_END_TEST; Suite * pgm_viewport_factory_suite (void) { Suite *s = suite_create ("PgmViewportFactory"); TCase *tc_chain = tcase_create ("pgmviewportfactory tests"); suite_add_tcase (s, tc_chain); tcase_add_test (tc_chain, test_factory_load); tcase_add_test (tc_chain, test_factory_desc); tcase_add_test (tc_chain, test_factory_make); tcase_add_test (tc_chain, test_factory_create); tcase_add_test (tc_chain, test_factory_multi_load); return s; } pigment-0.3.17/tests/check/plugins/common/Makefile.am0000644000175000017500000000056011205034417017410 00000000000000check_LIBRARIES = libpgmplugintestsuite.a libpgmplugintestsuite_a_SOURCES = pgmplugintestsuite.c pgmplugintestsuite.h pgmcanvas.c pgmviewport.c pgmviewportfactory.c pgmimage.c check-local: $(check_LIBRARIES) AM_CFLAGS = -I$(top_srcdir) -I$(top_builddir)/pgm $(GST_CFLAGS) $(CHECK_CFLAGS) $(GDKPIXBUF_CFLAGS) -D_PGM_IN_PLUGIN_TEST_SUITE AM_CFLAGS += $(GCOV_CFLAGS) pigment-0.3.17/tests/check/plugins/common/pgmimage.c0000644000175000017500000000703211205034417017307 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment unit test for pgmimage.c * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include "pgmplugintestsuite.h" #include #define TEST_IMAGE_FILE "./test-image.png" static gboolean pixbuf_loaded = FALSE; static void on_pixbuf_loaded (PgmImage *image, gpointer data) { pixbuf_loaded = TRUE; } static void generate_image_file (const gchar *name) { GdkPixbuf *pixbuf = NULL; guchar *data = g_malloc (1024 * 1024 * 3); guint i = 0, rowstride = 1024*3; for (i=0; i<1024*1024*3; i+=3) { data[i] = (i / 256) % 0xff; data[i+1] = i % 0xff; data[i+2] = (3 * i + 23) % 0xff; } pixbuf = gdk_pixbuf_new_from_data (data, GDK_COLORSPACE_RGB, FALSE, 8, 1024, 1024, rowstride, NULL, NULL); gdk_pixbuf_save (pixbuf, name, "png", NULL, NULL); g_object_unref (pixbuf); g_free (data); } static void remove_image_file (const gchar *name) { g_unlink (name); } static gpointer thread_init (gpointer data) { pgm_main (); } /* This checks that #162 is fixeed */ PGM_START_TEST (test_image_cloning_delete_master) { PgmViewport *viewport = NULL; PgmCanvas *canvas = NULL; PgmError ret = PGM_ERROR_OK; PgmDrawable *master = NULL, *slave = NULL; GThread *pgm_thread = NULL; ASSERT_PGM_SUCCESS (pgm_viewport_factory_make (PGM_TEST_PLUGIN, &viewport)); ASSERT_PGM_SUCCESS (pgm_viewport_hide (viewport)); canvas = pgm_canvas_new (); fail_unless (NULL != canvas, "canvas creation"); ASSERT_PGM_SUCCESS (pgm_viewport_set_canvas (viewport, canvas)); pgm_thread = g_thread_create ( thread_init, NULL, TRUE, NULL); fail_unless (NULL != pgm_thread, "thread creation"); master = pgm_image_new (); slave = pgm_image_new (); fail_unless (master && slave, "images creation"); pgm_canvas_add_many (canvas, PGM_DRAWABLE_MIDDLE, master, slave, NULL); ASSERT_PGM_SUCCESS (pgm_image_set_from_image ( PGM_IMAGE (slave), PGM_IMAGE (master))); generate_image_file (TEST_IMAGE_FILE); ASSERT_PGM_SUCCESS (pgm_image_set_from_file ( PGM_IMAGE (master), TEST_IMAGE_FILE, 0)); ASSERT_PGM_SUCCESS (pgm_canvas_remove (canvas, master)); fail_if (pixbuf_loaded, "removed master from canvas too late"); remove_image_file (TEST_IMAGE_FILE); pgm_main_quit (); g_thread_join (pgm_thread); gst_object_unref (viewport); } PGM_END_TEST Suite * pgm_image_suite (void) { Suite *s = suite_create ("PgmImage"); TCase *tc_chain = tcase_create ("pgmimage tests"); PGM_USE_STANDARD_FIXTURES (tc_chain); suite_add_tcase (s, tc_chain); tcase_add_test (tc_chain, test_image_cloning_delete_master); return s; } pigment-0.3.17/tests/check/plugins/common/pgmplugintestsuite.c0000644000175000017500000000251411205034417021475 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment unit test for plugins * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include "pgmplugintestsuite.h" int plugin_suites_run (void) { gint ret = 0; ret += gst_check_run_suite (pgm_viewport_factory_suite (), "pgm_viewport_factory", __FILE__); ret += gst_check_run_suite (pgm_viewport_suite (), "pgm_viewport", __FILE__); ret += gst_check_run_suite (pgm_canvas_suite (), "pgm_canvas", __FILE__); ret += gst_check_run_suite (pgm_image_suite (), "pgm_image", __FILE__); return ret; } pigment-0.3.17/tests/check/plugins/common/Makefile.in0000644000175000017500000004347211205034675017440 00000000000000# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/check/plugins/common DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/as-compiler-flag.m4 \ $(top_srcdir)/common/m4/as-version.m4 \ $(top_srcdir)/common/m4/check.m4 \ $(top_srcdir)/common/m4/gst-args.m4 \ $(top_srcdir)/common/m4/gst-check.m4 \ $(top_srcdir)/common/m4/gst-error.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/libtool.m4 \ $(top_srcdir)/common/m4/ltoptions.m4 \ $(top_srcdir)/common/m4/ltsugar.m4 \ $(top_srcdir)/common/m4/ltversion.m4 \ $(top_srcdir)/common/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = ARFLAGS = cru libpgmplugintestsuite_a_AR = $(AR) $(ARFLAGS) libpgmplugintestsuite_a_LIBADD = am_libpgmplugintestsuite_a_OBJECTS = pgmplugintestsuite.$(OBJEXT) \ pgmcanvas.$(OBJEXT) pgmviewport.$(OBJEXT) \ pgmviewportfactory.$(OBJEXT) pgmimage.$(OBJEXT) libpgmplugintestsuite_a_OBJECTS = \ $(am_libpgmplugintestsuite_a_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libpgmplugintestsuite_a_SOURCES) DIST_SOURCES = $(libpgmplugintestsuite_a_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAIROXLIB_CFLAGS = @CAIROXLIB_CFLAGS@ CAIROXLIB_LIBS = @CAIROXLIB_LIBS@ CAIRO_CFLAGS = @CAIRO_CFLAGS@ CAIRO_LIBS = @CAIRO_LIBS@ CC = @CC@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXEEXT = @EXEEXT@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ GCOV = @GCOV@ GCOV_CFLAGS = @GCOV_CFLAGS@ GCOV_LIBS = @GCOV_LIBS@ GDKPIXBUFXLIB_CFLAGS = @GDKPIXBUFXLIB_CFLAGS@ GDKPIXBUFXLIB_LIBS = @GDKPIXBUFXLIB_LIBS@ GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@ GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ GST_0_10_13_CFLAGS = @GST_0_10_13_CFLAGS@ GST_0_10_13_LIBS = @GST_0_10_13_LIBS@ GST_10_10_CFLAGS = @GST_10_10_CFLAGS@ GST_10_10_LIBS = @GST_10_10_LIBS@ GST_10_11_CFLAGS = @GST_10_11_CFLAGS@ GST_10_11_LIBS = @GST_10_11_LIBS@ GST_10_12_CFLAGS = @GST_10_12_CFLAGS@ GST_10_12_LIBS = @GST_10_12_LIBS@ GST_10_13_CFLAGS = @GST_10_13_CFLAGS@ GST_10_13_LIBS = @GST_10_13_LIBS@ GST_10_14_CFLAGS = @GST_10_14_CFLAGS@ GST_10_14_LIBS = @GST_10_14_LIBS@ GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ GST_BASE_LIBS = @GST_BASE_LIBS@ GST_CFLAGS = @GST_CFLAGS@ GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ GST_CHECK_LIBS = @GST_CHECK_LIBS@ GST_LIBS = @GST_LIBS@ GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ GST_TOOLS_DIR = @GST_TOOLS_DIR@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_GTK_WIDGET = @HAVE_GTK_WIDGET@ HAVE_IMAGING_LIBRARY = @HAVE_IMAGING_LIBRARY@ HAVE_OPENGLES_PLUGIN = @HAVE_OPENGLES_PLUGIN@ HAVE_OPENGL_PLUGIN = @HAVE_OPENGL_PLUGIN@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGLADE_2_0_CFLAGS = @LIBGLADE_2_0_CFLAGS@ LIBGLADE_2_0_LIBS = @LIBGLADE_2_0_LIBS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENGLES_BACKEND = @OPENGLES_BACKEND@ OPENGL_BACKEND = @OPENGL_BACKEND@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ PANGOCAIRO_CFLAGS = @PANGOCAIRO_CFLAGS@ PANGOCAIRO_LIBS = @PANGOCAIRO_LIBS@ PANGO_1_16_CFLAGS = @PANGO_1_16_CFLAGS@ PANGO_1_16_LIBS = @PANGO_1_16_LIBS@ PANGO_CFLAGS = @PANGO_CFLAGS@ PANGO_LIBS = @PANGO_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL_PATH = @PERL_PATH@ PGM_ALL_CFLAGS = @PGM_ALL_CFLAGS@ PGM_ALL_LDFLAGS = @PGM_ALL_LDFLAGS@ PGM_ALL_LIBS = @PGM_ALL_LIBS@ PGM_GLES_CFLAGS = @PGM_GLES_CFLAGS@ PGM_GLES_LIBS = @PGM_GLES_LIBS@ PGM_GL_CFLAGS = @PGM_GL_CFLAGS@ PGM_GL_LIBS = @PGM_GL_LIBS@ PGM_GTKDOC_CFLAGS = @PGM_GTKDOC_CFLAGS@ PGM_LIB_LDFLAGS = @PGM_LIB_LDFLAGS@ PGM_LT_LDFLAGS = @PGM_LT_LDFLAGS@ PGM_LT_VERSION = @PGM_LT_VERSION@ PGM_MAJORMINOR = @PGM_MAJORMINOR@ PGM_OBJ_CFLAGS = @PGM_OBJ_CFLAGS@ PGM_OBJ_LIBS = @PGM_OBJ_LIBS@ PGM_OPTION_CFLAGS = @PGM_OPTION_CFLAGS@ PGM_PLUGIN_LDFLAGS = @PGM_PLUGIN_LDFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PLUGIN_PATH = @PLUGIN_PATH@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XCOMPOSITE_CFLAGS = @XCOMPOSITE_CFLAGS@ XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ XMKMF = @XMKMF@ XRENDER_CFLAGS = @XRENDER_CFLAGS@ XRENDER_LIBS = @XRENDER_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cairo_req = @cairo_req@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ glib_req = @glib_req@ gstreamer_plugins_base_req = @gstreamer_plugins_base_req@ gstreamer_req = @gstreamer_req@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pango_req = @pango_req@ pangocairo_req = @pangocairo_req@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ check_LIBRARIES = libpgmplugintestsuite.a libpgmplugintestsuite_a_SOURCES = pgmplugintestsuite.c pgmplugintestsuite.h pgmcanvas.c pgmviewport.c pgmviewportfactory.c pgmimage.c AM_CFLAGS = -I$(top_srcdir) -I$(top_builddir)/pgm $(GST_CFLAGS) \ $(CHECK_CFLAGS) $(GDKPIXBUF_CFLAGS) \ -D_PGM_IN_PLUGIN_TEST_SUITE $(GCOV_CFLAGS) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/check/plugins/common/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/check/plugins/common/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-checkLIBRARIES: -test -z "$(check_LIBRARIES)" || rm -f $(check_LIBRARIES) libpgmplugintestsuite.a: $(libpgmplugintestsuite_a_OBJECTS) $(libpgmplugintestsuite_a_DEPENDENCIES) -rm -f libpgmplugintestsuite.a $(libpgmplugintestsuite_a_AR) libpgmplugintestsuite.a $(libpgmplugintestsuite_a_OBJECTS) $(libpgmplugintestsuite_a_LIBADD) $(RANLIB) libpgmplugintestsuite.a mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pgmcanvas.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pgmimage.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pgmplugintestsuite.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pgmviewport.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pgmviewportfactory.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_LIBRARIES) $(MAKE) $(AM_MAKEFLAGS) check-local check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-checkLIBRARIES clean-generic clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am check-local clean \ clean-checkLIBRARIES clean-generic clean-libtool ctags \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am check-local: $(check_LIBRARIES) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pigment-0.3.17/tests/check/plugins/common/pgmplugintestsuite.h0000644000175000017500000000274111205034417021504 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment unit test for plugins * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include int plugin_suites_run (void); Suite *pgm_viewport_factory_suite (void); Suite *pgm_viewport_suite (void); Suite *pgm_canvas_suite (void); Suite *pgm_image_suite (void); #ifdef _PGM_IN_PLUGIN_TEST_SUITE extern const gchar *pgm_test_plugin; extern const gint pgm_test_plugin_added_ref; # define PGM_TEST_PLUGIN (pgm_test_plugin) # define PGM_TEST_PLUGIN_ADDED_REF (pgm_test_plugin_added_ref) #else # define PGM_TEST_USE_PLUGIN(name, added_ref) \ const gchar *pgm_test_plugin = name; \ const gint pgm_test_plugin_added_ref = added_ref; #endif pigment-0.3.17/tests/check/plugins/common/pgmcanvas.c0000644000175000017500000000436611205034417017507 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment unit test for pgmcanvas.c * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * FIXME: pgm_canvas_regenerate */ #include #include #include "pgmplugintestsuite.h" PGM_START_TEST (test_canvas_get_pixel_formats) { PgmCanvas *canvas = NULL; PgmViewport *viewport = NULL; gulong pixel_formats = 1234567890; canvas = pgm_canvas_new (); fail_if (NULL == canvas, "canvas creation failed"); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_canvas_get_pixel_formats (NULL, &pixel_formats)); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_canvas_get_pixel_formats (canvas, NULL)); ASSERT_PGM_SUCCESS (pgm_canvas_get_pixel_formats (canvas, &pixel_formats)); fail_if (0 != pixel_formats, "unbound canvas reports erroneous supported formats"); ASSERT_PGM_SUCCESS (pgm_viewport_factory_make (PGM_TEST_PLUGIN, &viewport)); ASSERT_PGM_SUCCESS (pgm_viewport_set_canvas (viewport, canvas)); ASSERT_PGM_SUCCESS (pgm_canvas_get_pixel_formats (canvas, &pixel_formats)); fail_if (0 == pixel_formats, "bound canvas reports erroneous supported formats"); gst_object_unref (viewport); gst_object_unref (canvas); } PGM_END_TEST Suite * pgm_canvas_suite (void) { Suite *s = suite_create ("PgmCanvas"); TCase *tc_chain = tcase_create ("pgmcanvas tests"); PGM_USE_STANDARD_FIXTURES (tc_chain); suite_add_tcase (s, tc_chain); tcase_add_test (tc_chain, test_canvas_get_pixel_formats); return s; } pigment-0.3.17/tests/check/plugins/common/pgmviewport.c0000644000175000017500000002713311205034417020110 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment unit test for pgmviewport.c * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include "pgmplugintestsuite.h" /* test default values */ PGM_START_TEST (test_viewport_default_values) { PgmViewport *viewport; PgmError ret; gint width, height; PgmViewportCursor cursor; gboolean fullscreen; GdkPixbuf *icon; ret = pgm_viewport_factory_make (PGM_TEST_PLUGIN, &viewport); fail_if (ret != PGM_ERROR_OK, "viewport_factory_make error"); /* size */ ret = pgm_viewport_get_size (viewport, &width, &height); fail_if (ret != PGM_ERROR_OK, "viewport_get_size error"); fail_if (width != 800 || height != 600, "bad default size"); /* cursor */ ret = pgm_viewport_get_cursor (viewport, &cursor); fail_if (ret != PGM_ERROR_OK, "viewport_get_cursor error"); fail_if (cursor != PGM_VIEWPORT_LEFT_ARROW, "bad default cursor"); /* icon */ ret = pgm_viewport_get_icon (viewport, &icon); fail_if (ret != PGM_ERROR_OK, "viewport_get_icon error"); fail_if (icon != NULL, "bad default icon"); /* fullscreen */ ret = pgm_viewport_get_fullscreen (viewport, &fullscreen); fail_if (ret != PGM_ERROR_OK, "viewport_get_fullscreen error"); fail_if (fullscreen != FALSE, "bad default fullscreen"); gst_object_unref (GST_OBJECT_CAST (viewport)); ASSERT_OBJECT_REFCOUNT (viewport, "viewport", 0); } PGM_END_TEST; /* test set/get correctness */ PGM_START_TEST (test_viewport_set_get_correctness) { PgmViewport *viewport; PgmError ret; gint width, height; PgmViewportCursor cursor; gboolean fullscreen; GdkPixbuf *icon_src, *icon; ret = pgm_viewport_factory_make (PGM_TEST_PLUGIN, &viewport); fail_if (ret != PGM_ERROR_OK, "viewport_factory_make error"); /* size */ ret = pgm_viewport_set_size (viewport, 640, 480); fail_if (ret != PGM_ERROR_OK, "viewport_set_size error"); ret = pgm_viewport_get_size (viewport, &width, &height); fail_if (ret != PGM_ERROR_OK, "viewport_get_size error"); fail_if (width != 640 || height != 480, "size not set"); /* cursor */ ret = pgm_viewport_set_cursor (viewport, PGM_VIEWPORT_NONE); fail_if (ret != PGM_ERROR_OK, "viewport_set_cursor error"); ret = pgm_viewport_get_cursor (viewport, &cursor); fail_if (ret != PGM_ERROR_OK, "viewport_get_cursor error"); fail_if (cursor != PGM_VIEWPORT_NONE, "cursor not set"); /* icon */ icon_src = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, 32, 32); fail_if (icon_src == NULL, "problem in gdk_pixbuf_new"); ret = pgm_viewport_set_icon (viewport, icon_src); fail_if (ret != PGM_ERROR_OK, "viewport_set_icon error"); ret = pgm_viewport_get_icon (viewport, &icon); fail_if (ret != PGM_ERROR_OK, "viewport_get_icon error"); fail_if (icon != icon_src, "icon not set"); /* fullscreen */ ret = pgm_viewport_set_fullscreen (viewport, TRUE); fail_if (ret != PGM_ERROR_OK, "viewport_set_fullscreen error"); ret = pgm_viewport_get_fullscreen (viewport, &fullscreen); fail_if (ret != PGM_ERROR_OK, "viewport_get_fullscreen error"); fail_if (fullscreen != TRUE, "fullscreen not set"); gst_object_unref (GST_OBJECT_CAST (viewport)); } PGM_END_TEST PGM_START_TEST (test_viewport_geometry) { PgmViewport *viewport = NULL; PgmCanvas *canvas = NULL; gfloat v_x, v_y, v_z, c_x, c_y, c_z; ASSERT_PGM_SUCCESS (pgm_viewport_factory_make (PGM_TEST_PLUGIN, &viewport)); canvas = pgm_canvas_new (); fail_if (NULL == canvas, "canvas creation failed"); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_canvas_set_size (NULL, 4, 3)); ASSERT_PGM_SUCCESS (pgm_canvas_set_size (canvas, 4, 3)); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_viewport_set_size (NULL, 640, 480)); ASSERT_PGM_SUCCESS (pgm_viewport_set_size (viewport, 640, 480)); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_viewport_from_canvas (viewport, &v_x, &v_y, &v_z, 1.1f, 2.2f, 3.3f)); ASSERT_PGM_SUCCESS (pgm_viewport_set_canvas (viewport, canvas)); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_viewport_from_canvas (NULL, &v_x, &v_y, &v_z, 1.1f, 2.2f, 3.3f)); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_viewport_from_canvas (viewport, NULL, &v_y, &v_z, 1.1f, 2.2f, 3.3f)); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_viewport_from_canvas (viewport, &v_x, NULL, &v_z, 1.1f, 2.2f, 3.3f)); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_viewport_from_canvas (viewport, &v_x, &v_y, NULL, 1.1f, 2.2f, 3.3f)); ASSERT_PGM_SUCCESS (pgm_viewport_from_canvas (viewport, &v_x, &v_y, &v_z, 1.1f, 2.2f, 3.3f)); ASSERT_PGM_SUCCESS (pgm_viewport_set_canvas (viewport, NULL)); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_viewport_to_canvas (viewport, &c_x, &c_y, &c_z, v_x, v_y, v_z)); ASSERT_PGM_SUCCESS (pgm_viewport_set_canvas (viewport, canvas)); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_viewport_to_canvas (NULL, &c_x, &c_y, &c_z, v_x, v_y, v_z)); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_viewport_to_canvas (viewport, NULL, &c_y, &c_z, v_x, v_y, v_z)); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_viewport_to_canvas (viewport, &c_x, NULL, &c_z, v_x, v_y, v_z)); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_viewport_to_canvas (viewport, &c_x, &c_y, NULL, v_x, v_y, v_z)); ASSERT_PGM_SUCCESS (pgm_viewport_to_canvas (viewport, &c_x, &c_y, &c_z, v_x, v_y, v_z)); ASSERT_PGM_SUCCESS (pgm_viewport_to_canvas (viewport, &c_x, &c_y, &c_z, v_x, v_y, v_z)); fail_unless (fabs (c_x - 1.1f) <= 0.0001, "conversion from canvas then to canvas failed for the x coordinate"); fail_unless (fabs (c_y - 2.2f) <= 0.0001, "conversion from canvas then to canvas failed for the y coordinate"); fail_unless (fabs (c_z - 3.3f) <= 0.0001, "conversion from canvas then to canvas failed for the z coordinate"); gst_object_unref (viewport); } PGM_END_TEST static void on_pixels_read (PgmViewport *viewport, guint width, guint height, gpointer pixels, gpointer user_data) { gboolean *called = (gboolean *) user_data; *called = TRUE; } static gpointer thread_init (gpointer data) { pgm_main (); } /* TODO: have pgm_main running in another thread and check that the callback is * called when it should */ PGM_START_TEST (test_viewport_read_pixels) { PgmViewport *viewport = NULL; guint8 * pixels = NULL; gint width = 0, height = 0; gulong signal_handler = 0; GThread *pgm_thread = NULL; gboolean callback_called = FALSE; ASSERT_PGM_SUCCESS (pgm_viewport_factory_make (PGM_TEST_PLUGIN, &viewport)); ASSERT_PGM_SUCCESS (pgm_viewport_get_size (viewport, &width, &height)); pgm_thread = g_thread_create ( thread_init, NULL, TRUE, NULL); fail_unless (NULL != pgm_thread, "thread creation"); pixels = g_malloc (width * height * 4); /* sleeps to ensure pgm_main() is running */ g_usleep (1000000); /* fails because no signal connected */ ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_viewport_read_pixels (viewport, 0, 0, width, height, pixels)); signal_handler = g_signal_connect (G_OBJECT (viewport), "pixels-read", G_CALLBACK (on_pixels_read), &callback_called); /* param checks */ ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_viewport_read_pixels (NULL, 0, 0, width, height, pixels)); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_viewport_read_pixels (viewport, 0, 0, width, height, NULL)); /* wait for 1 sec for possible callback call */ g_usleep (1000000); fail_if (callback_called, "callback has been called, but it shouldn't have"); ASSERT_PGM_SUCCESS (pgm_viewport_read_pixels (viewport, 0, 0, width, height, pixels)); /* wait for 1 sec for possible callback call */ g_usleep (1000000); fail_unless (callback_called, "callback has not been called"); g_free (pixels); pixels = NULL; pixels = g_malloc (width * height * 4); g_signal_handler_block (G_OBJECT (viewport), signal_handler); /* should fail because there is no unblocked signal handler */ ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_viewport_read_pixels (viewport, 0, 0, width, height, pixels)); g_signal_handler_unblock (G_OBJECT (viewport), signal_handler); ASSERT_PGM_SUCCESS (pgm_viewport_read_pixels (viewport, 0, 0, width, height, pixels)); /* wait for 1 sec for possible callback call */ g_usleep (1000000); fail_unless (callback_called, "callback has not been called"); g_free (pixels); pixels = NULL; pgm_main_quit (); gst_object_unref (viewport); g_thread_join (pgm_thread); } PGM_END_TEST Suite * pgm_viewport_suite (void) { Suite *s = suite_create ("PgmViewport"); TCase *tc_chain = tcase_create ("pgmviewport tests"); tcase_set_timeout (tc_chain, 10); PGM_USE_STANDARD_FIXTURES (tc_chain); suite_add_tcase (s, tc_chain); tcase_add_test (tc_chain, test_viewport_default_values); tcase_add_test (tc_chain, test_viewport_set_get_correctness); tcase_add_test (tc_chain, test_viewport_geometry); tcase_add_test (tc_chain, test_viewport_read_pixels); return s; } pigment-0.3.17/tests/check/plugins/Makefile.in0000644000175000017500000004440611205034674016145 00000000000000# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @OPENGL_TESTS_ENABLED_TRUE@am__append_1 = opengl subdir = tests/check/plugins DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/as-compiler-flag.m4 \ $(top_srcdir)/common/m4/as-version.m4 \ $(top_srcdir)/common/m4/check.m4 \ $(top_srcdir)/common/m4/gst-args.m4 \ $(top_srcdir)/common/m4/gst-check.m4 \ $(top_srcdir)/common/m4/gst-error.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/libtool.m4 \ $(top_srcdir)/common/m4/ltoptions.m4 \ $(top_srcdir)/common/m4/ltsugar.m4 \ $(top_srcdir)/common/m4/ltversion.m4 \ $(top_srcdir)/common/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = common boilerplate opengl DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAIROXLIB_CFLAGS = @CAIROXLIB_CFLAGS@ CAIROXLIB_LIBS = @CAIROXLIB_LIBS@ CAIRO_CFLAGS = @CAIRO_CFLAGS@ CAIRO_LIBS = @CAIRO_LIBS@ CC = @CC@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXEEXT = @EXEEXT@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ GCOV = @GCOV@ GCOV_CFLAGS = @GCOV_CFLAGS@ GCOV_LIBS = @GCOV_LIBS@ GDKPIXBUFXLIB_CFLAGS = @GDKPIXBUFXLIB_CFLAGS@ GDKPIXBUFXLIB_LIBS = @GDKPIXBUFXLIB_LIBS@ GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@ GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ GST_0_10_13_CFLAGS = @GST_0_10_13_CFLAGS@ GST_0_10_13_LIBS = @GST_0_10_13_LIBS@ GST_10_10_CFLAGS = @GST_10_10_CFLAGS@ GST_10_10_LIBS = @GST_10_10_LIBS@ GST_10_11_CFLAGS = @GST_10_11_CFLAGS@ GST_10_11_LIBS = @GST_10_11_LIBS@ GST_10_12_CFLAGS = @GST_10_12_CFLAGS@ GST_10_12_LIBS = @GST_10_12_LIBS@ GST_10_13_CFLAGS = @GST_10_13_CFLAGS@ GST_10_13_LIBS = @GST_10_13_LIBS@ GST_10_14_CFLAGS = @GST_10_14_CFLAGS@ GST_10_14_LIBS = @GST_10_14_LIBS@ GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ GST_BASE_LIBS = @GST_BASE_LIBS@ GST_CFLAGS = @GST_CFLAGS@ GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ GST_CHECK_LIBS = @GST_CHECK_LIBS@ GST_LIBS = @GST_LIBS@ GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ GST_TOOLS_DIR = @GST_TOOLS_DIR@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_GTK_WIDGET = @HAVE_GTK_WIDGET@ HAVE_IMAGING_LIBRARY = @HAVE_IMAGING_LIBRARY@ HAVE_OPENGLES_PLUGIN = @HAVE_OPENGLES_PLUGIN@ HAVE_OPENGL_PLUGIN = @HAVE_OPENGL_PLUGIN@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGLADE_2_0_CFLAGS = @LIBGLADE_2_0_CFLAGS@ LIBGLADE_2_0_LIBS = @LIBGLADE_2_0_LIBS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENGLES_BACKEND = @OPENGLES_BACKEND@ OPENGL_BACKEND = @OPENGL_BACKEND@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ PANGOCAIRO_CFLAGS = @PANGOCAIRO_CFLAGS@ PANGOCAIRO_LIBS = @PANGOCAIRO_LIBS@ PANGO_1_16_CFLAGS = @PANGO_1_16_CFLAGS@ PANGO_1_16_LIBS = @PANGO_1_16_LIBS@ PANGO_CFLAGS = @PANGO_CFLAGS@ PANGO_LIBS = @PANGO_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL_PATH = @PERL_PATH@ PGM_ALL_CFLAGS = @PGM_ALL_CFLAGS@ PGM_ALL_LDFLAGS = @PGM_ALL_LDFLAGS@ PGM_ALL_LIBS = @PGM_ALL_LIBS@ PGM_GLES_CFLAGS = @PGM_GLES_CFLAGS@ PGM_GLES_LIBS = @PGM_GLES_LIBS@ PGM_GL_CFLAGS = @PGM_GL_CFLAGS@ PGM_GL_LIBS = @PGM_GL_LIBS@ PGM_GTKDOC_CFLAGS = @PGM_GTKDOC_CFLAGS@ PGM_LIB_LDFLAGS = @PGM_LIB_LDFLAGS@ PGM_LT_LDFLAGS = @PGM_LT_LDFLAGS@ PGM_LT_VERSION = @PGM_LT_VERSION@ PGM_MAJORMINOR = @PGM_MAJORMINOR@ PGM_OBJ_CFLAGS = @PGM_OBJ_CFLAGS@ PGM_OBJ_LIBS = @PGM_OBJ_LIBS@ PGM_OPTION_CFLAGS = @PGM_OPTION_CFLAGS@ PGM_PLUGIN_LDFLAGS = @PGM_PLUGIN_LDFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PLUGIN_PATH = @PLUGIN_PATH@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XCOMPOSITE_CFLAGS = @XCOMPOSITE_CFLAGS@ XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ XMKMF = @XMKMF@ XRENDER_CFLAGS = @XRENDER_CFLAGS@ XRENDER_LIBS = @XRENDER_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cairo_req = @cairo_req@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ glib_req = @glib_req@ gstreamer_plugins_base_req = @gstreamer_plugins_base_req@ gstreamer_req = @gstreamer_req@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pango_req = @pango_req@ pangocairo_req = @pangocairo_req@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = common boilerplate $(am__append_1) all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/check/plugins/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/check/plugins/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ am__remove_distdir=: \ am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-exec-am: install-html: install-html-recursive install-info: install-info-recursive install-man: install-pdf: install-pdf-recursive install-ps: install-ps-recursive installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ install-strip .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pigment-0.3.17/tests/check/plugins/opengl/0000777000175000017500000000000011205035136015432 500000000000000pigment-0.3.17/tests/check/plugins/opengl/Makefile.am0000644000175000017500000000033011205034417017377 00000000000000include $(top_srcdir)/tests/check/common/common-tests.am check_PROGRAMS = \ plugin_test_suite \ pgmgldrawable plugin_test_suite_LDADD = $(top_builddir)/tests/check/plugins/common/libpgmplugintestsuite.a $(LDADD) pigment-0.3.17/tests/check/plugins/opengl/pgmgldrawable.c0000644000175000017500000001233611205034417020330 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment unit test for OpenGL plugin * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include /* test drawable floating reference on canvas_add/del_* with OpenGL plugin */ PGM_START_TEST (test_opengl_add_del_drawable) { PgmViewport *viewport; PgmViewportFactory *factory; PgmError ret; gboolean success; PgmCanvas *canvas; PgmDrawable *drawable; success = pgm_init_check (NULL, NULL); fail_unless (success, "init_check returned FALSE"); factory = pgm_viewport_factory_new ("opengl"); ret = pgm_viewport_factory_create (factory, &viewport); fail_if (ret != PGM_ERROR_OK, "viewport_factory_create error"); canvas = pgm_canvas_new (); pgm_viewport_set_canvas (viewport, canvas); /* create a new floating drawable with refcount 1 */ drawable = pgm_image_new (); ASSERT_OBJECT_REFCOUNT (drawable, "drawable", 1); fail_unless (GST_OBJECT_IS_FLOATING (drawable), "drawable object is not floating at creation"); /* ref it for ourselves */ gst_object_ref (GST_OBJECT (drawable)); ASSERT_OBJECT_REFCOUNT (drawable, "drawable", 2); /* adding it in the canvas sinks the drawable, plugin takes a ref though */ ret = pgm_canvas_add (canvas, PGM_DRAWABLE_NEAR, drawable); fail_if (ret != PGM_ERROR_OK, "canvas_add error"); /* wait half a sec to be sure the flushing has been completed since it's * asynchronous */ g_usleep (500000); ASSERT_OBJECT_REFCOUNT (drawable, "drawable", 3); fail_if (GST_OBJECT_IS_FLOATING (drawable), "drawable object still floating after being added to the canvas"); /* removing it reduces the refcount */ ret = pgm_canvas_remove (canvas, drawable); fail_if (ret != PGM_ERROR_OK, "canvas_del error"); /* wait half a sec to be sure the flushing has been completed since it's * asynchronous */ g_usleep (500000); ASSERT_OBJECT_REFCOUNT (drawable, "drawable", 1); /* clean up our own reference */ gst_object_unref (GST_OBJECT_CAST (drawable)); gst_object_unref (GST_OBJECT_CAST (canvas)); gst_object_unref (GST_OBJECT_CAST (viewport)); gst_object_unref (GST_OBJECT_CAST (factory)); pgm_deinit (); } PGM_END_TEST /* test drawable floating reference on canvas unref with OpenGL plugin */ PGM_START_TEST (test_opengl_add_drawable_unref_object) { PgmViewport *viewport; PgmViewportFactory *factory; PgmError ret; gboolean success; PgmCanvas *canvas; PgmDrawable *drawable; success = pgm_init_check (NULL, NULL); fail_unless (success, "init_check returned FALSE"); factory = pgm_viewport_factory_new ("opengl"); ret = pgm_viewport_factory_create (factory, &viewport); fail_if (ret != PGM_ERROR_OK, "viewport_factory_create error"); canvas = pgm_canvas_new (); pgm_viewport_set_canvas (viewport, canvas); /* create a new floating drawable with refcount 1 */ drawable = pgm_image_new (); ASSERT_OBJECT_REFCOUNT (drawable, "drawable", 1); fail_unless (GST_OBJECT_IS_FLOATING (drawable), "drawable object is not floating at creation"); /* ref it for ourselves */ gst_object_ref (GST_OBJECT (drawable)); ASSERT_OBJECT_REFCOUNT (drawable, "drawable", 2); /* adding it in the canvas sinks the drawable, plugin takes a ref though */ ret = pgm_canvas_add (canvas, PGM_DRAWABLE_NEAR, drawable); fail_if (ret != PGM_ERROR_OK, "canvas_add_drawable error"); /* wait half a sec to be sure the flushing has been completed since it's * asynchronous */ g_usleep (500000); ASSERT_OBJECT_REFCOUNT (drawable, "drawable", 3); fail_if (GST_OBJECT_IS_FLOATING (drawable), "drawable object still floating after being added to the canvas"); /* unattaching the canvas must decrease the refcount by 1 */ pgm_viewport_set_canvas (viewport, NULL); ASSERT_OBJECT_REFCOUNT (drawable, "drawable", 2); /* unreffing the canvas must decrease the refcount by 1 */ gst_object_unref (GST_OBJECT_CAST (canvas)); ASSERT_OBJECT_REFCOUNT (drawable, "drawable", 1); /* clean up our own reference */ gst_object_unref (GST_OBJECT_CAST (drawable)); pgm_deinit (); } PGM_END_TEST Suite * pgm_opengl_suite (void) { Suite *s = suite_create ("GL+PgmDrawable References"); TCase *tc_chain = tcase_create ("drawable basic ref tests"); tcase_set_timeout(tc_chain, 10); suite_add_tcase (s, tc_chain); tcase_add_test (tc_chain, test_opengl_add_del_drawable); tcase_add_test (tc_chain, test_opengl_add_drawable_unref_object); return s; } GST_CHECK_MAIN (pgm_opengl); pigment-0.3.17/tests/check/plugins/opengl/Makefile.in0000644000175000017500000006463211205034675017435 00000000000000# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/common/check.mak \ $(top_srcdir)/tests/check/common/common-tests.am @GST_GCOV_ENABLED_TRUE@am__append_1 = $(GCOV_CFLAGS) @GST_GCOV_ENABLED_TRUE@am__append_2 = $(GCOV_LIBS) check_PROGRAMS = plugin_test_suite$(EXEEXT) pgmgldrawable$(EXEEXT) subdir = tests/check/plugins/opengl ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/as-compiler-flag.m4 \ $(top_srcdir)/common/m4/as-version.m4 \ $(top_srcdir)/common/m4/check.m4 \ $(top_srcdir)/common/m4/gst-args.m4 \ $(top_srcdir)/common/m4/gst-check.m4 \ $(top_srcdir)/common/m4/gst-error.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/libtool.m4 \ $(top_srcdir)/common/m4/ltoptions.m4 \ $(top_srcdir)/common/m4/ltsugar.m4 \ $(top_srcdir)/common/m4/ltversion.m4 \ $(top_srcdir)/common/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = pgmgldrawable_SOURCES = pgmgldrawable.c pgmgldrawable_OBJECTS = pgmgldrawable.$(OBJEXT) pgmgldrawable_LDADD = $(LDADD) am__DEPENDENCIES_1 = @GST_GCOV_ENABLED_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) pgmgldrawable_DEPENDENCIES = \ $(top_builddir)/pgm/libpigment-@PGM_MAJORMINOR@.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(top_builddir)/tests/check/common/libpgmcheck.a \ $(am__DEPENDENCIES_2) plugin_test_suite_SOURCES = plugin_test_suite.c plugin_test_suite_OBJECTS = plugin_test_suite.$(OBJEXT) am__DEPENDENCIES_3 = \ $(top_builddir)/pgm/libpigment-@PGM_MAJORMINOR@.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(top_builddir)/tests/check/common/libpgmcheck.a \ $(am__DEPENDENCIES_2) plugin_test_suite_DEPENDENCIES = $(top_builddir)/tests/check/plugins/common/libpgmplugintestsuite.a \ $(am__DEPENDENCIES_3) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = pgmgldrawable.c plugin_test_suite.c DIST_SOURCES = pgmgldrawable.c plugin_test_suite.c HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAIROXLIB_CFLAGS = @CAIROXLIB_CFLAGS@ CAIROXLIB_LIBS = @CAIROXLIB_LIBS@ CAIRO_CFLAGS = @CAIRO_CFLAGS@ CAIRO_LIBS = @CAIRO_LIBS@ CC = @CC@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXEEXT = @EXEEXT@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ GCOV = @GCOV@ GCOV_CFLAGS = @GCOV_CFLAGS@ GCOV_LIBS = @GCOV_LIBS@ GDKPIXBUFXLIB_CFLAGS = @GDKPIXBUFXLIB_CFLAGS@ GDKPIXBUFXLIB_LIBS = @GDKPIXBUFXLIB_LIBS@ GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@ GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ GST_0_10_13_CFLAGS = @GST_0_10_13_CFLAGS@ GST_0_10_13_LIBS = @GST_0_10_13_LIBS@ GST_10_10_CFLAGS = @GST_10_10_CFLAGS@ GST_10_10_LIBS = @GST_10_10_LIBS@ GST_10_11_CFLAGS = @GST_10_11_CFLAGS@ GST_10_11_LIBS = @GST_10_11_LIBS@ GST_10_12_CFLAGS = @GST_10_12_CFLAGS@ GST_10_12_LIBS = @GST_10_12_LIBS@ GST_10_13_CFLAGS = @GST_10_13_CFLAGS@ GST_10_13_LIBS = @GST_10_13_LIBS@ GST_10_14_CFLAGS = @GST_10_14_CFLAGS@ GST_10_14_LIBS = @GST_10_14_LIBS@ GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ GST_BASE_LIBS = @GST_BASE_LIBS@ GST_CFLAGS = @GST_CFLAGS@ GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ GST_CHECK_LIBS = @GST_CHECK_LIBS@ GST_LIBS = @GST_LIBS@ GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ GST_TOOLS_DIR = @GST_TOOLS_DIR@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_GTK_WIDGET = @HAVE_GTK_WIDGET@ HAVE_IMAGING_LIBRARY = @HAVE_IMAGING_LIBRARY@ HAVE_OPENGLES_PLUGIN = @HAVE_OPENGLES_PLUGIN@ HAVE_OPENGL_PLUGIN = @HAVE_OPENGL_PLUGIN@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGLADE_2_0_CFLAGS = @LIBGLADE_2_0_CFLAGS@ LIBGLADE_2_0_LIBS = @LIBGLADE_2_0_LIBS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENGLES_BACKEND = @OPENGLES_BACKEND@ OPENGL_BACKEND = @OPENGL_BACKEND@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ PANGOCAIRO_CFLAGS = @PANGOCAIRO_CFLAGS@ PANGOCAIRO_LIBS = @PANGOCAIRO_LIBS@ PANGO_1_16_CFLAGS = @PANGO_1_16_CFLAGS@ PANGO_1_16_LIBS = @PANGO_1_16_LIBS@ PANGO_CFLAGS = @PANGO_CFLAGS@ PANGO_LIBS = @PANGO_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL_PATH = @PERL_PATH@ PGM_ALL_CFLAGS = @PGM_ALL_CFLAGS@ PGM_ALL_LDFLAGS = @PGM_ALL_LDFLAGS@ PGM_ALL_LIBS = @PGM_ALL_LIBS@ PGM_GLES_CFLAGS = @PGM_GLES_CFLAGS@ PGM_GLES_LIBS = @PGM_GLES_LIBS@ PGM_GL_CFLAGS = @PGM_GL_CFLAGS@ PGM_GL_LIBS = @PGM_GL_LIBS@ PGM_GTKDOC_CFLAGS = @PGM_GTKDOC_CFLAGS@ PGM_LIB_LDFLAGS = @PGM_LIB_LDFLAGS@ PGM_LT_LDFLAGS = @PGM_LT_LDFLAGS@ PGM_LT_VERSION = @PGM_LT_VERSION@ PGM_MAJORMINOR = @PGM_MAJORMINOR@ PGM_OBJ_CFLAGS = @PGM_OBJ_CFLAGS@ PGM_OBJ_LIBS = @PGM_OBJ_LIBS@ PGM_OPTION_CFLAGS = @PGM_OPTION_CFLAGS@ PGM_PLUGIN_LDFLAGS = @PGM_PLUGIN_LDFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PLUGIN_PATH = @PLUGIN_PATH@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XCOMPOSITE_CFLAGS = @XCOMPOSITE_CFLAGS@ XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ XMKMF = @XMKMF@ XRENDER_CFLAGS = @XRENDER_CFLAGS@ XRENDER_LIBS = @XRENDER_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cairo_req = @cairo_req@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ glib_req = @glib_req@ gstreamer_plugins_base_req = @gstreamer_plugins_base_req@ gstreamer_req = @gstreamer_req@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pango_req = @pango_req@ pangocairo_req = @pangocairo_req@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ LOOPS = 10 # inspect every plugin feature GST_INSPECT = $(GST_TOOLS_DIR)/gst-inspect-$(GST_MAJORMINOR) TESTS_ENVIRONMENT = \ PGM_PLUGIN_PATH=$(top_builddir)/plugins plugindir = $(libdir)/pigment-@PGM_MAJORMINOR@ # the core dumps of some machines have PIDs appended CLEANFILES = core core.* *.gcno *.gcda SUPPRESSIONS = $(top_srcdir)/common/gst.supp TESTS = $(check_PROGRAMS) noinst_HEADERS = AM_CFLAGS = -I$(top_srcdir) -I$(top_builddir)/pgm $(GST_CFLAGS) \ $(CHECK_CFLAGS) $(GDKPIXBUF_CFLAGS) $(am__append_1) LDADD = $(top_builddir)/pgm/libpigment-@PGM_MAJORMINOR@.la \ $(GST_CHECK_LIBS) $(GST_LIBS) $(CHECK_LIBS) $(GDKPIXBUF_LIBS) \ $(top_builddir)/tests/check/common/libpgmcheck.a \ $(am__append_2) # valgrind testing # these just need valgrind fixing, period VALGRIND_TO_FIX = VALGRIND_IGNORE = # these need fixing because the threads cause segfaults under valgrind TESTS_THREADED = VALGRIND_TESTS_DISABLE = \ $(TESTS_THREADED) \ $(VALGRIND_IGNORE) \ $(VALGRIND_TO_FIX) plugin_test_suite_LDADD = $(top_builddir)/tests/check/plugins/common/libpgmplugintestsuite.a $(LDADD) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/tests/check/common/common-tests.am $(top_srcdir)/common/check.mak $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/check/plugins/opengl/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/check/plugins/opengl/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done pgmgldrawable$(EXEEXT): $(pgmgldrawable_OBJECTS) $(pgmgldrawable_DEPENDENCIES) @rm -f pgmgldrawable$(EXEEXT) $(LINK) $(pgmgldrawable_OBJECTS) $(pgmgldrawable_LDADD) $(LIBS) plugin_test_suite$(EXEEXT): $(plugin_test_suite_OBJECTS) $(plugin_test_suite_DEPENDENCIES) @rm -f plugin_test_suite$(EXEEXT) $(LINK) $(plugin_test_suite_OBJECTS) $(plugin_test_suite_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pgmgldrawable.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plugin_test_suite.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ echo "XPASS: $$tst"; \ ;; \ *) \ echo "PASS: $$tst"; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ echo "XFAIL: $$tst"; \ ;; \ *) \ failed=`expr $$failed + 1`; \ echo "FAIL: $$tst"; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ echo "SKIP: $$tst"; \ fi; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ echo "$$dashes"; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-checkPROGRAMS clean-generic clean-libtool clean-local \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ clean-checkPROGRAMS clean-generic clean-libtool clean-local \ ctags distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am clean-local-check: for i in `find . -name ".libs" -type d`; do \ rm -rf $$i; \ done # hangs spectacularly on some machines, so let's not do this by default yet @HAVE_VALGRIND_TRUE@check-valgrind: @HAVE_VALGRIND_TRUE@ make valgrind @HAVE_VALGRIND_FALSE@check-valgrind: @HAVE_VALGRIND_FALSE@ @true # run any given test by running make test.check # if the test fails, run it again at at least debug level 2 %.check: % @$(TESTS_ENVIRONMENT) \ CK_DEFAULT_TIMEOUT=20 \ $* || \ $(TESTS_ENVIRONMENT) \ GST_DEBUG=$$GST_DEBUG,*:2 \ CK_DEFAULT_TIMEOUT=20 \ $* # run any given test in a loop %.torture: % @for i in `seq 1 $(LOOPS)`; do \ $(TESTS_ENVIRONMENT) \ CK_DEFAULT_TIMEOUT=20 \ $*; done # run any given test in an infinite loop %.forever: % @while true; do \ $(TESTS_ENVIRONMENT) \ CK_DEFAULT_TIMEOUT=20 \ $* || break; done # valgrind any given test by running make test.valgrind %.valgrind: % $(TESTS_ENVIRONMENT) \ CK_DEFAULT_TIMEOUT=360 \ G_SLICE=always-malloc \ libtool --mode=execute \ $(VALGRIND_PATH) -q \ $(foreach s,$(SUPPRESSIONS),--suppressions=$(s)) \ --tool=memcheck --leak-check=full --trace-children=yes \ --leak-resolution=high --num-callers=20 \ ./$* 2>&1 | tee valgrind.log @if grep "==" valgrind.log > /dev/null 2>&1; then \ rm valgrind.log; \ exit 1; \ fi @rm valgrind.log # valgrind any given test and generate suppressions for it %.valgrind.gen-suppressions: % $(TESTS_ENVIRONMENT) \ CK_DEFAULT_TIMEOUT=60 \ libtool --mode=execute \ $(VALGRIND_PATH) -q \ $(foreach s,$(SUPPRESSIONS),--suppressions=$(s)) \ --tool=memcheck --leak-check=full --trace-children=yes \ --leak-resolution=high --num-callers=20 \ --gen-suppressions=all \ ./$* 2>&1 | tee suppressions.log # valgrind any given test until failure by running make test.valgrind-forever %.valgrind-forever: % @while make $*.valgrind; do \ true; done # gdb any given test by running make test.gdb %.gdb: % $(TESTS_ENVIRONMENT) \ CK_FORK=no \ libtool --mode=execute \ gdb $* # torture tests torture: $(TESTS) -rm test-registry.xml @echo "Torturing tests ..." for i in `seq 1 $(LOOPS)`; do \ make check || \ (echo "Failure after $$i runs"; exit 1) || \ exit 1; \ done @banner="All $(LOOPS) loops passed"; \ dashes=`echo "$$banner" | sed s/./=/g`; \ echo $$dashes; echo $$banner; echo $$dashes # forever tests forever: $(TESTS) -rm test-registry.xml @echo "Forever tests ..." while true; do \ make check || \ (echo "Failure"; exit 1) || \ exit 1; \ done # valgrind all tests valgrind: $(TESTS) @echo "Valgrinding tests ..." @failed=0; \ for t in $(filter-out $(VALGRIND_TESTS_DISABLE),$(TESTS)); do \ make $$t.valgrind; \ if test "$$?" -ne 0; then \ echo "Valgrind error for test $$t"; \ failed=`expr $$failed + 1`; \ whicht="$$whicht $$t"; \ fi; \ done; \ if test "$$failed" -ne 0; then \ echo "$$failed tests had leaks or errors under valgrind:"; \ echo "$$whicht"; \ false; \ fi inspect: @echo "Inspecting features ..." for e in `$(TESTS_ENVIRONMENT) $(GST_INSPECT) | head -n -2 \ | cut -d: -f2`; \ do echo Inspecting $$e; \ $(GST_INSPECT) $$e > /dev/null 2>&1; done help: @echo "make check -- run all checks" @echo "make torture -- run all checks $(LOOPS) times" @echo "make (dir)/(test).check -- run the given check once" @echo "make (dir)/(test).forever -- run the given check forever" @echo "make (dir)/(test).torture -- run the given check $(LOOPS) times" @echo @echo "make (dir)/(test).gdb -- start up gdb for the given test" @echo @echo "make valgrind -- valgrind all tests" @echo "make (dir)/(test).valgrind -- valgrind the given test" @echo "make (dir)/(test).valgrind-forever -- valgrind the given test forever" @echo "make (dir)/(test).valgrind.gen-suppressions -- generate suppressions" @echo " and save to suppressions.log" @echo "make inspect -- inspect all plugin features" # override to _not_ install the test plugins install-pluginLTLIBRARIES: clean-local: clean-local-check # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pigment-0.3.17/tests/check/plugins/opengl/plugin_test_suite.c0000644000175000017500000000212011205034417021254 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment unit test for OpenGL plugin * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include PGM_TEST_USE_PLUGIN ("opengl", 1) int main (int argc, char **argv) { gst_check_init (&argc, &argv); return plugin_suites_run (); } pigment-0.3.17/tests/check/pgm/0000777000175000017500000000000011205035135013247 500000000000000pigment-0.3.17/tests/check/pgm/pgmlinearalgebra.c0000644000175000017500000013304611205034417016634 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment unit test for pgmlinearalgebra.c * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include /* test vec3 */ PGM_START_TEST (test_linearalgebra_vec3) { PgmVec3 *v1, *v2, *v3; gfloat a; /* pgm_vec3_new */ v1 = pgm_vec3_new (); fail_if (v1->v[0] != 0.0f || v1->v[1] != 0.0f || v1->v[2] != 0.0f, "pgm_vec3_new error"); pgm_vec3_free (v1); /* pgm_vec3_new_from_scalars */ v1 = pgm_vec3_new_from_scalars (1.0f, 2.0f, 3.0f); fail_if (v1->v[0] != 1.0f || v1->v[1] != 2.0f || v1->v[2] != 3.0f, "pgm_vec3_new_from_scalars error"); pgm_vec3_free (v1); /* pgm_vec3_copy */ v1 = pgm_vec3_new_from_scalars (1.0f, 2.0f, 3.0f); v2 = pgm_vec3_copy (v1); fail_if (v2->v[0] != 1.0f || v2->v[1] != 2.0f || v2->v[2] != 3.0f, "pgm_vec3_copy error"); pgm_vec3_free (v1); pgm_vec3_free (v2); /* pgm_vec3_set_from_scalars */ v1 = pgm_vec3_new (); pgm_vec3_set_from_scalars (v1, 5.0f, 0.5f, 3.5f); fail_if (v1->v[0] != 5.0f || v1->v[1] != 0.5f || v1->v[2] != 3.5f, "pgm_vec3_set_from_scalars error"); pgm_vec3_free (v1); /* pgm_vec3_set_from_vec3 */ v1 = pgm_vec3_new (); v2 = pgm_vec3_new_from_scalars (5.0f, 0.5f, 3.5f); pgm_vec3_set_from_vec3 (v1, v2); fail_if (v1->v[0] != 5.0f || v1->v[1] != 0.5f || v1->v[2] != 3.5f, "pgm_vec3_set_from_vec3 error"); pgm_vec3_free (v1); pgm_vec3_free (v2); /* pgm_vec3_length */ v1 = pgm_vec3_new_from_scalars (5.0f, 0.5f, 3.5f); a = pgm_vec3_length (v1); fail_if (a < 6.12372 || a > 6.12373, "pgm_vec3_length error"); pgm_vec3_free (v1); /* pgm_vec3_normalize */ v1 = pgm_vec3_new_from_scalars (15.1f, 2.7f, 6.2f); v2 = pgm_vec3_normalize (v1); fail_if (v2->v[0] < 0.91265f || v2->v[0] > 0.91266f || v2->v[1] < 0.16319f || v2->v[1] > 0.1632f || v2->v[2] < 0.37473f || v2->v[2] > 0.37474f, "pgm_vec3_normalize error"); pgm_vec3_free (v1); pgm_vec3_free (v2); /* pgm_vec3_dot_product */ v1 = pgm_vec3_new_from_scalars (15.1f, 2.7f, 6.2f); v2 = pgm_vec3_new_from_scalars (5.2f, -5.6f, 16.9f); a = pgm_vec3_dot_product (v1, v2); fail_if (a < 168.18f || a > 168.19f, "pgm_vec3_dot_product error"); pgm_vec3_free (v1); pgm_vec3_free (v2); /* pgm_vec3_cross_product */ v1 = pgm_vec3_new_from_scalars (15.1f, 2.7f, 6.2f); v2 = pgm_vec3_new_from_scalars (5.2f, -5.6f, 16.9f); v3 = pgm_vec3_cross_product (v1, v2); fail_if (v3->v[0] < 80.34f || v3->v[0] > 80.36f || v3->v[1] < -222.96f || v3->v[1] > -222.94f || v3->v[2] < -98.7f || v3->v[2] > -98.5f, "pgm_vec3_cross_product error"); pgm_vec3_free (v1); pgm_vec3_free (v2); pgm_vec3_free (v3); /* pgm_vec3_add_scalar */ v1 = pgm_vec3_new_from_scalars (15.1f, 2.7f, 6.2f); v2 = pgm_vec3_add_scalar (v1, 12.0f); fail_if (v2->v[0] != 27.1f || v2->v[1] != 14.7f || v2->v[2] != 18.2f, "pgm_vec3_add_scalar error"); pgm_vec3_free (v1); pgm_vec3_free (v2); /* pgm_vec3_add_vec3 */ v1 = pgm_vec3_new_from_scalars (15.1f, 2.7f, 6.2f); v2 = pgm_vec3_new_from_scalars (5.2f, -5.6f, 16.9f); v3 = pgm_vec3_add_vec3 (v1, v2); fail_if (v3->v[0] < 20.29f || v3->v[0] > 20.3f || v3->v[1] < -2.95f || v3->v[1] > -2.85f || v3->v[2] < 23.09f || v3->v[2] > 23.1f, "pgm_vec3_add_vec3 error"); pgm_vec3_free (v1); pgm_vec3_free (v2); pgm_vec3_free (v3); /* pgm_vec3_substract_scalar */ v1 = pgm_vec3_new_from_scalars (15.1f, 2.7f, 6.2f); v2 = pgm_vec3_substract_scalar (v1, 1.2f); fail_if (v2->v[0] < 13.89f || v2->v[0] > 13.91f || v2->v[1] < 1.49f || v2->v[1] > 1.51f || v2->v[2] < 4.99f || v2->v[2] > 5.01f, "pgm_vec3_substract_scalar error"); pgm_vec3_free (v1); pgm_vec3_free (v2); /* pgm_vec3_substract_vec3 */ v1 = pgm_vec3_new_from_scalars (15.1f, 2.7f, 6.2f); v2 = pgm_vec3_new_from_scalars (5.2f, -5.6f, 16.9f); v3 = pgm_vec3_substract_vec3 (v1, v2); fail_if (v3->v[0] < 9.89f || v3->v[0] > 9.91f || v3->v[1] < 8.29f || v3->v[1] > 8.31f || v3->v[2] < -10.71f || v3->v[2] > -10.69f, "pgm_vec3_substract_vec3 error"); pgm_vec3_free (v1); pgm_vec3_free (v2); pgm_vec3_free (v3); /* pgm_vec3_multiply_scalar */ v1 = pgm_vec3_new_from_scalars (15.1f, 2.7f, 6.2f); v2 = pgm_vec3_multiply_scalar (v1, 2.5f); fail_if (v2->v[0] != 37.75f || v2->v[1] != 6.75f || v2->v[2] != 15.5f, "pgm_vec3_multiply_scalar error"); pgm_vec3_free (v1); pgm_vec3_free (v2); /* pgm_vec3_multiply_vec3 */ v1 = pgm_vec3_new_from_scalars (15.1f, 2.7f, 6.2f); v2 = pgm_vec3_new_from_scalars (5.2f, -5.6f, 16.9f); v3 = pgm_vec3_multiply_vec3 (v1, v2); fail_if (v3->v[0] < 78.519f || v3->v[0] > 78.52 || v3->v[1] < -15.13f || v3->v[1] > -15.11f || v3->v[2] < 104.779f || v3->v[2] > 104.78f, "pgm_vec3_multiply_vec3 error"); } PGM_END_TEST; /* test vec4 */ PGM_START_TEST (test_linearalgebra_vec4) { PgmVec4 *v1, *v2, *v3; gfloat a; /* pgm_vec4_new */ v1 = pgm_vec4_new (); fail_if (v1->v[0] != 0.0f || v1->v[1] != 0.0f || v1->v[2] != 0.0f || v1->v[3] != 0.0f, "pgm_vec4_new error"); pgm_vec4_free (v1); /* pgm_vec4_new_from_scalars */ v1 = pgm_vec4_new_from_scalars (1.0f, 2.0f, 3.0f, 4.0f); fail_if (v1->v[0] != 1.0f || v1->v[1] != 2.0f || v1->v[2] != 3.0f || v1->v[3] != 4.0f, "pgm_vec4_new_from_scalars error"); pgm_vec4_free (v1); /* pgm_vec4_copy */ v1 = pgm_vec4_new_from_scalars (1.0f, 2.0f, 3.0f, 4.0f); v2 = pgm_vec4_copy (v1); fail_if (v2->v[0] != 1.0f || v2->v[1] != 2.0f || v2->v[2] != 3.0f || v1->v[3] != 4.0f, "pgm_vec4_copy error"); pgm_vec4_free (v1); pgm_vec4_free (v2); /* pgm_vec4_set_from_scalars */ v1 = pgm_vec4_new (); pgm_vec4_set_from_scalars (v1, 5.0f, 0.5f, 3.5f, 6.8f); fail_if (v1->v[0] != 5.0f || v1->v[1] != 0.5f || v1->v[2] != 3.5f || v1->v[3] != 6.8f, "pgm_vec4_set_from_scalars error"); pgm_vec4_free (v1); /* pgm_vec4_set_from_vec4 */ v1 = pgm_vec4_new (); v2 = pgm_vec4_new_from_scalars (5.0f, 0.5f, 3.5f, 6.8); pgm_vec4_set_from_vec4 (v1, v2); fail_if (v1->v[0] != 5.0f || v1->v[1] != 0.5f || v1->v[2] != 3.5f || v1->v[3] != 6.8f, "pgm_vec4_set_from_vec4 error"); pgm_vec4_free (v1); pgm_vec4_free (v2); /* pgm_vec4_length */ v1 = pgm_vec4_new_from_scalars (5.0f, 0.5f, 3.5f, 2.7f); a = pgm_vec4_length (v1); fail_if (a < 6.69253 || a > 6.69254, "pgm_vec4_length error"); pgm_vec4_free (v1); /* pgm_vec4_normalize */ v1 = pgm_vec4_new_from_scalars (15.1f, 2.7f, 6.2f, 3.9f); v2 = pgm_vec4_normalize (v1); fail_if (v2->v[0] < 0.88831f || v2->v[0] > 0.88832f || v2->v[1] < 0.15883f || v2->v[1] > 0.15884f || v2->v[2] < 0.36473f || v2->v[2] > 0.36474f || v2->v[3] < 0.22943f || v2->v[3] > 0.22944f, "pgm_vec4_normalize error"); pgm_vec4_free (v1); pgm_vec4_free (v2); /* pgm_vec4_add_scalar */ v1 = pgm_vec4_new_from_scalars (15.1f, 2.7f, 6.2f, 5.8f); v2 = pgm_vec4_add_scalar (v1, 12.0f); fail_if (v2->v[0] != 27.1f || v2->v[1] != 14.7f || v2->v[2] != 18.2f || v2->v[3] != 17.8f, "pgm_vec4_add_scalar error"); pgm_vec4_free (v1); pgm_vec4_free (v2); /* pgm_vec4_add_vec4 */ v1 = pgm_vec4_new_from_scalars (15.1f, 2.7f, 6.2f, 4.7f); v2 = pgm_vec4_new_from_scalars (5.2f, -5.6f, 16.9f, 6.2f); v3 = pgm_vec4_add_vec4 (v1, v2); fail_if (v3->v[0] < 20.29f || v3->v[0] > 20.3f || v3->v[1] < -2.95f || v3->v[1] > -2.85f|| v3->v[2] < 23.09f || v3->v[2] > 23.1f || v3->v[3] < 10.85f || v3->v[3] > 10.95f, "pgm_vec4_add_vec4 error"); pgm_vec4_free (v1); pgm_vec4_free (v2); pgm_vec4_free (v3); /* pgm_vec4_substract_scalar */ v1 = pgm_vec4_new_from_scalars (15.1f, 2.7f, 6.2f, 5.8f); v2 = pgm_vec4_substract_scalar (v1, 1.2f); fail_if (v2->v[0] < 13.89f || v2->v[0] > 13.91f || v2->v[1] < 1.49f || v2->v[1] > 1.51f || v2->v[2] < 4.99f || v2->v[2] > 5.01f || v2->v[3] < 4.59f || v2->v[3] > 4.61f, "pgm_vec4_substract_scalar error"); pgm_vec4_free (v1); pgm_vec4_free (v2); /* pgm_vec4_substract_vec4 */ v1 = pgm_vec4_new_from_scalars (15.1f, 2.7f, 6.2f, 4.7f); v2 = pgm_vec4_new_from_scalars (5.2f, -5.6f, 16.9f, 6.2f); v3 = pgm_vec4_substract_vec4 (v1, v2); fail_if (v3->v[0] < 9.89f || v3->v[0] > 9.91f || v3->v[1] < 8.29f || v3->v[1] > 8.31f || v3->v[2] < -10.71f || v3->v[2] > -10.69f || v3->v[3] < -1.51f || v3->v[3] > -1.49f, "pgm_vec4_substract_vec4 error"); pgm_vec4_free (v1); pgm_vec4_free (v2); pgm_vec4_free (v3); /* pgm_vec4_multiply_scalar */ v1 = pgm_vec4_new_from_scalars (15.1f, 2.7f, 6.2f, 4.7f); v2 = pgm_vec4_multiply_scalar (v1, 2.5f); fail_if (v2->v[0] != 37.75f || v2->v[1] != 6.75f || v2->v[2] != 15.5f || v2->v[3] != 11.75f, "pgm_vec4_multiply_scalar error"); pgm_vec4_free (v1); pgm_vec4_free (v2); /* pgm_vec4_multiply_vec4 */ v1 = pgm_vec4_new_from_scalars (15.1f, 2.7f, 6.2f, 4.7f); v2 = pgm_vec4_new_from_scalars (5.2f, -5.6f, 16.9f, 6.2f); v3 = pgm_vec4_multiply_vec4 (v1, v2); fail_if (v3->v[0] < 78.519f || v3->v[0] > 78.52 || v3->v[1] < -15.13f || v3->v[1] > -15.11f || v3->v[2] < 104.779f || v3->v[2] > 104.78f || v3->v[3] < 29.135f || v3->v[3] > 29.145f, "pgm_vec4_multiply_vec4 error"); } PGM_END_TEST; /* test mat3x3 */ PGM_START_TEST (test_linearalgebra_mat3x3) { PgmMat3x3 *m1, *m2, *m3; PgmVec3 *v1, *v2, *v3; /* pgm_mat3x3_new */ m1 = pgm_mat3x3_new (); fail_if (m1->m[0] != 0.0f || m1->m[1] != 0.0f || m1->m[2] != 0.0f || m1->m[3] != 0.0f || m1->m[4] != 0.0f || m1->m[5] != 0.0f || m1->m[6] != 0.0f || m1->m[7] != 0.0f || m1->m[8] != 0.0f, "pgm_mat3x3_new error"); pgm_mat3x3_free (m1); /* pgm_mat3x3_new_from_scalars */ m1 = pgm_mat3x3_new_from_scalars (1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f); fail_if (m1->m[0] != 1.0f || m1->m[1] != 2.0f || m1->m[2] != 3.0f || m1->m[3] != 4.0f || m1->m[4] != 5.0f || m1->m[5] != 6.0f || m1->m[6] != 7.0f || m1->m[7] != 8.0f || m1->m[8] != 9.0f, "pgm_mat3x3_new_from_scalars error"); pgm_mat3x3_free (m1); /* pgm_mat3x3_new_from_vectors */ v1 = pgm_vec3_new_from_scalars (1.0f, 2.0f, 3.0f); v2 = pgm_vec3_new_from_scalars (4.0f, 5.0f, 6.0f); v3 = pgm_vec3_new_from_scalars (7.0f, 8.0f, 9.0f); m1 = pgm_mat3x3_new_from_vec3 (v1, v2, v3); fail_if (m1->m[0] != 1.0f || m1->m[1] != 2.0f || m1->m[2] != 3.0f || m1->m[3] != 4.0f || m1->m[4] != 5.0f || m1->m[5] != 6.0f || m1->m[6] != 7.0f || m1->m[7] != 8.0f || m1->m[8] != 9.0f, "pgm_mat3x3_new_from_vec3 error"); pgm_vec3_free (v1); pgm_vec3_free (v2); pgm_vec3_free (v3); pgm_mat3x3_free (m1); /* pgm_mat3x3_new_identity */ m1 = pgm_mat3x3_new_identity (); fail_if (m1->m[0] != 1.0f || m1->m[1] != 0.0f || m1->m[2] != 0.0f || m1->m[3] != 0.0f || m1->m[4] != 1.0f || m1->m[5] != 0.0f || m1->m[6] != 0.0f || m1->m[7] != 0.0f || m1->m[8] != 1.0f, "pgm_mat3x3_new_identity error"); pgm_mat3x3_free (m1); /* pgm_mat3x3_copy */ m1 = pgm_mat3x3_new_from_scalars (1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f); m2 = pgm_mat3x3_copy (m1); fail_if (m2->m[0] != 1.0f || m2->m[1] != 2.0f || m2->m[2] != 3.0f || m2->m[3] != 4.0f || m2->m[4] != 5.0f || m2->m[5] != 6.0f || m2->m[6] != 7.0f || m2->m[7] != 8.0f || m2->m[8] != 9.0f, "pgm_mat3x3_copy error"); pgm_mat3x3_free (m1); pgm_mat3x3_free (m2); /* pgm_mat3x3_set_from_scalars */ m1 = pgm_mat3x3_new (); pgm_mat3x3_set_from_scalars (m1, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f); fail_if (m1->m[0] != 1.0f || m1->m[1] != 2.0f || m1->m[2] != 3.0f || m1->m[3] != 4.0f || m1->m[4] != 5.0f || m1->m[5] != 6.0f || m1->m[6] != 7.0f || m1->m[7] != 8.0f || m1->m[8] != 9.0f, "pgm_mat3x3_set_from_scalars error"); pgm_mat3x3_free (m1); /* pgm_mat3x3_set_from_vec3 */ v1 = pgm_vec3_new_from_scalars (1.0f, 2.0f, 3.0f); v2 = pgm_vec3_new_from_scalars (4.0f, 5.0f, 6.0f); v3 = pgm_vec3_new_from_scalars (7.0f, 8.0f, 9.0f); m1 = pgm_mat3x3_new (); pgm_mat3x3_set_from_vec3 (m1, v1, v2, v3); fail_if (m1->m[0] != 1.0f || m1->m[1] != 2.0f || m1->m[2] != 3.0f || m1->m[3] != 4.0f || m1->m[4] != 5.0f || m1->m[5] != 6.0f || m1->m[6] != 7.0f || m1->m[7] != 8.0f || m1->m[8] != 9.0f, "pgm_mat3x3_set_from_vec3 error"); pgm_vec3_free (v1); pgm_vec3_free (v2); pgm_vec3_free (v3); pgm_mat3x3_free (m1); /* pgm_mat3x3_set_from_mat3x3 */ m1 = pgm_mat3x3_new (); m2 = pgm_mat3x3_new_from_scalars (1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f); pgm_mat3x3_set_from_mat3x3 (m1, m2); fail_if (m1->m[0] != 1.0f || m1->m[1] != 2.0f || m1->m[2] != 3.0f || m1->m[3] != 4.0f || m1->m[4] != 5.0f || m1->m[5] != 6.0f || m1->m[6] != 7.0f || m1->m[7] != 8.0f || m1->m[8] != 9.0f, "pgm_mat3x3_set_from_mat3x3 error"); pgm_mat3x3_free (m1); pgm_mat3x3_free (m2); /* pgm_mat3x3_is_identity */ m1 = pgm_mat3x3_new_identity (); fail_if (!pgm_mat3x3_is_identity (m1), "1st pgm_mat3x3_is_identity error"); pgm_mat3x3_free (m1); m1 = pgm_mat3x3_new (); fail_if (pgm_mat3x3_is_identity (m1), "2nd pgm_mat3x3_is_identity error"); pgm_mat3x3_free (m1); /* FIXME: pgm_mat3x3_inverse */ /* pgm_mat3x3_transpose */ m1 = pgm_mat3x3_new_from_scalars (1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f); m2 = pgm_mat3x3_transpose (m1); fail_if (m2->m[0] != 1.0f || m2->m[1] != 4.0f || m2->m[2] != 7.0f || m2->m[3] != 2.0f || m2->m[4] != 5.0f || m2->m[5] != 8.0f || m2->m[6] != 3.0f || m2->m[7] != 6.0f || m2->m[8] != 9.0f, "pgm_mat3x3_transpose error"); pgm_mat3x3_free (m1); pgm_mat3x3_free (m2); /* pgm_mat3x3_add_scalar */ m1 = pgm_mat3x3_new_from_scalars (1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f); m2 = pgm_mat3x3_add_scalar (m1, 3.5f); fail_if (m2->m[0] != 4.5f || m2->m[1] != 5.5f || m2->m[2] != 6.5f || m2->m[3] != 7.5f || m2->m[4] != 8.5f || m2->m[5] != 9.5f || m2->m[6] != 10.5f || m2->m[7] != 11.5f || m2->m[8] != 12.5f, "pgm_mat3x3_add_scalar error"); pgm_mat3x3_free (m1); pgm_mat3x3_free (m2); /* pgm_mat3x3_add_mat3x3 */ m1 = pgm_mat3x3_new_from_scalars (1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f); m2 = pgm_mat3x3_new_from_scalars (1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f); m3 = pgm_mat3x3_add_mat3x3 (m1, m2); fail_if (m3->m[0] != 2.0f || m3->m[1] != 4.0f || m3->m[2] != 6.0f || m3->m[3] != 8.0f || m3->m[4] != 10.0f || m3->m[5] != 12.0f || m3->m[6] != 14.0f || m3->m[7] != 16.0f || m3->m[8] != 18.0f, "pgm_mat3x3_add_mat3x3 error"); pgm_mat3x3_free (m1); pgm_mat3x3_free (m2); pgm_mat3x3_free (m3); /* pgm_mat3x3_substract_scalar */ m1 = pgm_mat3x3_new_from_scalars (1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f); m2 = pgm_mat3x3_substract_scalar (m1, 0.5f); fail_if (m2->m[0] != 0.5f || m2->m[1] != 1.5f || m2->m[2] != 2.5f || m2->m[3] != 3.5f || m2->m[4] != 4.5f || m2->m[5] != 5.5f || m2->m[6] != 6.5f || m2->m[7] != 7.5f || m2->m[8] != 8.5f, "pgm_mat3x3_substract_scalar error"); pgm_mat3x3_free (m1); pgm_mat3x3_free (m2); /* pgm_mat3x3_substract_mat3x3 */ m1 = pgm_mat3x3_new_from_scalars (1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f); m2 = pgm_mat3x3_new_from_scalars (0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f); m3 = pgm_mat3x3_substract_mat3x3 (m1, m2); fail_if (m3->m[0] != 0.5f || m3->m[1] != 1.5f || m3->m[2] != 2.5f || m3->m[3] != 3.5f || m3->m[4] != 4.5f || m3->m[5] != 5.5f || m3->m[6] != 6.5f || m3->m[7] != 7.5f || m3->m[8] != 8.5f, "pgm_mat3x3_substract_mat3x3 error"); pgm_mat3x3_free (m1); pgm_mat3x3_free (m2); pgm_mat3x3_free (m3); /* pgm_mat3x3_multiply_scalar */ m1 = pgm_mat3x3_new_from_scalars (1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f); m2 = pgm_mat3x3_multiply_scalar (m1, 3.5f); fail_if (m2->m[0] != 3.5f || m2->m[1] != 7.0f || m2->m[2] != 10.5f || m2->m[3] != 14.0f || m2->m[4] != 17.5f || m2->m[5] != 21.0f || m2->m[6] != 24.5f || m2->m[7] != 28.0f || m2->m[8] != 31.5f, "pgm_mat3x3_multiply_scalar error"); pgm_mat3x3_free (m1); pgm_mat3x3_free (m2); /* pgm_mat3x3_multiply_vec3 */ m1 = pgm_mat3x3_new_from_scalars (1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f); v1 = pgm_vec3_new_from_scalars (4.0f, 5.0f, 6.0f); v2 = pgm_mat3x3_multiply_vec3 (m1, v1); fail_if (v2->v[0] != 32.0f || v2->v[1] != 77.0f || v2->v[2] != 122.0f, "pgm_mat3x3_multiply_vec3 error"); pgm_mat3x3_free (m1); pgm_vec3_free (v2); pgm_vec3_free (v1); /* pgm_mat3x3_multiply_mat3x3 */ m1 = pgm_mat3x3_new_from_scalars (1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f); m2 = pgm_mat3x3_new_from_scalars (10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f); m3 = pgm_mat3x3_multiply_mat3x3 (m1, m2); fail_if (m3->m[0] != 84.0f || m3->m[1] != 90.0f || m3->m[2] != 96.0f || m3->m[3] != 201.0f || m3->m[4] != 216.0f || m3->m[5] != 231.0f || m3->m[6] != 318.0f || m3->m[7] != 342.0f || m3->m[8] != 366.0f, "pgm_mat3x3_multiply_mat3x3 error"); pgm_mat3x3_free (m1); pgm_mat3x3_free (m2); pgm_mat3x3_free (m3); } PGM_END_TEST; /* test mat4x4 */ PGM_START_TEST (test_linearalgebra_mat4x4) { PgmMat4x4 *m1, *m2, *m3; PgmVec4 *v1, *v2, *v3, *v4; PgmVec3 *v5; /* pgm_mat4x4_new */ m1 = pgm_mat4x4_new (); fail_if (m1->m[0]!=0.0f || m1->m[1]!=0.0f || m1->m[2]!=0.0f || m1->m[3]!=0.0f || m1->m[4]!=0.0f || m1->m[5]!=0.0f || m1->m[6]!=0.0f || m1->m[7]!=0.0f || m1->m[8]!=0.0f || m1->m[9]!=0.0f || m1->m[10]!=0.0f || m1->m[11]!=0.0f || m1->m[12]!=0.0f || m1->m[13]!=0.0f || m1->m[14]!=0.0f || m1->m[15]!=0.0f, "pgm_mat4x4_new error"); pgm_mat4x4_free (m1); /* pgm_mat4x4_new_from_scalars */ m1 = pgm_mat4x4_new_from_scalars (1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f); fail_if (m1->m[0]!=1.0f || m1->m[1]!=2.0f || m1->m[2]!=3.0f || m1->m[3]!=4.0f || m1->m[4]!=5.0f || m1->m[5]!=6.0f || m1->m[6]!=7.0f || m1->m[7]!=8.0f || m1->m[8]!=9.0f || m1->m[9]!=10.0f || m1->m[10]!=11.0f || m1->m[11]!=12.0f || m1->m[12]!=13.0f || m1->m[13]!=14.0f || m1->m[14]!=15.0f || m1->m[15]!=16.0f, "pgm_mat4x4_new_from_scalars error"); pgm_mat4x4_free (m1); /* pgm_mat4x4_new_from_vec4 */ v1 = pgm_vec4_new_from_scalars (1.0f, 2.0f, 3.0f, 4.0f); v2 = pgm_vec4_new_from_scalars (5.0f, 6.0f, 7.0f, 8.0f); v3 = pgm_vec4_new_from_scalars (9.0f, 10.0f, 11.0f, 12.0f); v4 = pgm_vec4_new_from_scalars (13.0f, 14.0f, 15.0f, 16.0f); m1 = pgm_mat4x4_new_from_vec4 (v1, v2, v3, v4); fail_if (m1->m[0]!=1.0f || m1->m[1]!=2.0f || m1->m[2]!=3.0f || m1->m[3]!=4.0f || m1->m[4]!=5.0f || m1->m[5]!=6.0f || m1->m[6]!=7.0f || m1->m[7]!=8.0f || m1->m[8]!=9.0f || m1->m[9]!=10.0f || m1->m[10]!=11.0f || m1->m[11]!=12.0f || m1->m[12]!=13.0f || m1->m[13]!=14.0f || m1->m[14]!=15.0f || m1->m[15]!=16.0f, "pgm_mat4x4_new_from_vec4 error"); pgm_vec4_free (v1); pgm_vec4_free (v2); pgm_vec4_free (v3); pgm_vec4_free (v4); pgm_mat4x4_free (m1); /* pgm_mat4x4_new_identity */ m1 = pgm_mat4x4_new_identity (); fail_if (m1->m[0]!=1.0f || m1->m[1]!=0.0f || m1->m[2]!=0.0f || m1->m[3]!=0.0f || m1->m[4]!=0.0f || m1->m[5]!=1.0f || m1->m[6]!=0.0f || m1->m[7]!=0.0f || m1->m[8]!=0.0f || m1->m[9]!=0.0f || m1->m[10]!=1.0f || m1->m[11]!=0.0f || m1->m[12]!=0.0f || m1->m[13]!=0.0f || m1->m[14]!=0.0f || m1->m[15]!=1.0f, "pgm_mat4x4_new_identity error"); pgm_mat4x4_free (m1); /* pgm_mat4x4_new_translate_from_vec3 */ v5 = pgm_vec3_new_from_scalars (1.0f, 2.0f, 3.0f); m1 = pgm_mat4x4_new_translate_from_vec3 (v5); fail_if (m1->m[0]!=1.0f || m1->m[1]!=0.0f || m1->m[2]!=0.0f || m1->m[3]!=1.0f || m1->m[4]!=0.0f || m1->m[5]!=1.0f || m1->m[6]!=0.0f || m1->m[7]!=2.0f || m1->m[8]!=0.0f || m1->m[9]!=0.0f || m1->m[10]!=1.0f || m1->m[11]!=3.0f || m1->m[12]!=0.0f || m1->m[13]!=0.0f || m1->m[14]!=0.0f || m1->m[15]!=1.0f, "pgm_mat4x4_new_translate_from_vec3 error"); pgm_vec3_free (v5); pgm_mat4x4_free (m1); /* pgm_mat4x4_new_translate_from_scalars */ m1 = pgm_mat4x4_new_translate_from_scalars (1.0f, 2.0f, 3.0f); fail_if (m1->m[0]!=1.0f || m1->m[1]!=0.0f || m1->m[2]!=0.0f || m1->m[3]!=1.0f || m1->m[4]!=0.0f || m1->m[5]!=1.0f || m1->m[6]!=0.0f || m1->m[7]!=2.0f || m1->m[8]!=0.0f || m1->m[9]!=0.0f || m1->m[10]!=1.0f || m1->m[11]!=3.0f || m1->m[12]!=0.0f || m1->m[13]!=0.0f || m1->m[14]!=0.0f || m1->m[15]!=1.0f, "pgm_mat4x4_new_translate_from_scalars error"); pgm_mat4x4_free (m1); /* pgm_mat4x4_new_scale_from_vec3 */ v5 = pgm_vec3_new_from_scalars (1.0f, 2.0f, 3.0f); m1 = pgm_mat4x4_new_scale_from_vec3 (v5); fail_if (m1->m[0]!=1.0f || m1->m[1]!=0.0f || m1->m[2]!=0.0f || m1->m[3]!=0.0f || m1->m[4]!=0.0f || m1->m[5]!=2.0f || m1->m[6]!=0.0f || m1->m[7]!=0.0f || m1->m[8]!=0.0f || m1->m[9]!=0.0f || m1->m[10]!=3.0f || m1->m[11]!=0.0f || m1->m[12]!=0.0f || m1->m[13]!=0.0f || m1->m[14]!=0.0f || m1->m[15]!=1.0f, "pgm_mat4x4_new_scale_from_vec3 error"); pgm_vec3_free (v5); pgm_mat4x4_free (m1); /* pgm_mat4x4_new_scale_from_scalars */ m1 = pgm_mat4x4_new_scale_from_scalars (1.0f, 2.0f, 3.0f); fail_if (m1->m[0]!=1.0f || m1->m[1]!=0.0f || m1->m[2]!=0.0f || m1->m[3]!=0.0f || m1->m[4]!=0.0f || m1->m[5]!=2.0f || m1->m[6]!=0.0f || m1->m[7]!=0.0f || m1->m[8]!=0.0f || m1->m[9]!=0.0f || m1->m[10]!=3.0f || m1->m[11]!=0.0f || m1->m[12]!=0.0f || m1->m[13]!=0.0f || m1->m[14]!=0.0f || m1->m[15]!=1.0f, "pgm_mat4x4_new_scale_from_scalars error"); pgm_mat4x4_free (m1); /* pgm_mat4x4_new_rotate_x */ m1 = pgm_mat4x4_new_rotate_x (PGM_DEGREES_TO_RADIANS (30.0f)); fail_if (m1->m[0]!=1.0f || m1->m[1]!=0.0f || m1->m[2]!=0.0f || m1->m[3]!=0.0f || m1->m[4]!=0.0f || m1->m[5]<0.866f||m1->m[5]>0.867f || m1->m[6]!=-0.5f || m1->m[7]!=0.0f || m1->m[8]!=0.0f || m1->m[9]!=0.5f || m1->m[10]<0.866f||m1->m[10]>0.867f || m1->m[11]!=0.0f || m1->m[12]!=0.0f || m1->m[13]!=0.0f || m1->m[14]!=0.0f || m1->m[15]!=1.0f, "pgm_mat4x4_new_rotate_x error"); pgm_mat4x4_free (m1); /* pgm_mat4x4_new_rotate_y */ m1 = pgm_mat4x4_new_rotate_y (PGM_DEGREES_TO_RADIANS (30.0f)); fail_if (m1->m[0]<0.866f||m1->m[0]>0.867f || m1->m[1]!=0.0f || m1->m[2]!=0.5f || m1->m[3]!=0.0f || m1->m[4]!=0.0f || m1->m[5]!=1.0f || m1->m[6]!=0.0f || m1->m[7]!=0.0f || m1->m[8]!=-0.5f || m1->m[9]!=0.0f || m1->m[10]<0.866f||m1->m[10]>0.867f || m1->m[11]!=0.0f || m1->m[12]!=0.0f || m1->m[13]!=0.0f || m1->m[14]!=0.0f || m1->m[15]!=1.0f, "pgm_mat4x4_new_rotate_y error"); pgm_mat4x4_free (m1); /* pgm_mat4x4_new_rotate_z */ m1 = pgm_mat4x4_new_rotate_z (PGM_DEGREES_TO_RADIANS (30.0f)); fail_if (m1->m[0]<0.866f||m1->m[0]>0.867f || m1->m[1]!=-0.5f || m1->m[2]!=0.0f || m1->m[3]!=0.0f || m1->m[4]!=0.5f || m1->m[5]<0.866f||m1->m[5]>0.867f || m1->m[6]!=0.0f || m1->m[7]!=0.0f || m1->m[8]!=0.0f || m1->m[9]!=0.0f || m1->m[10]!=1.0f || m1->m[11]!=0.0f || m1->m[12]!=0.0f || m1->m[13]!=0.0f || m1->m[14]!=0.0f || m1->m[15]!=1.0f, "pgm_mat4x4_new_rotate_z error"); pgm_mat4x4_free (m1); /* FIXME: pgm_mat4x4_new_rotate_axis_from_scalars * pgm_mat4x4_new_rotate_axis_from_vec3 */ /* pgm_mat4x4_copy */ m1 = pgm_mat4x4_new_from_scalars (1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f); m2 = pgm_mat4x4_copy (m1); fail_if (m2->m[0]!=1.0f || m2->m[1]!=2.0f || m2->m[2]!=3.0f || m2->m[3]!=4.0f || m2->m[4]!=5.0f || m2->m[5]!=6.0f || m2->m[6]!=7.0f || m2->m[7]!=8.0f || m2->m[8]!=9.0f || m2->m[9]!=10.0f || m2->m[10]!=11.0f || m2->m[11]!=12.0f || m2->m[12]!=13.0f || m2->m[13]!=14.0f || m2->m[14]!=15.0f || m2->m[15]!=16.0f, "pgm_mat4x4_copy error"); pgm_mat4x4_free (m1); pgm_mat4x4_free (m2); /* pgm_mat4x4_set_from_scalars */ m1 = pgm_mat4x4_new (); pgm_mat4x4_set_from_scalars (m1, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f); fail_if (m1->m[0]!=1.0f || m1->m[1]!=2.0f || m1->m[2]!=3.0f || m1->m[3]!=4.0f || m1->m[4]!=5.0f || m1->m[5]!=6.0f || m1->m[6]!=7.0f || m1->m[7]!=8.0f || m1->m[8]!=9.0f || m1->m[9]!=10.0f || m1->m[10]!=11.0f || m1->m[11]!=12.0f || m1->m[12]!=13.0f || m1->m[13]!=14.0f || m1->m[14]!=15.0f || m1->m[15]!=16.0f, "pgm_mat4x4_set_from_scalars error"); pgm_mat4x4_free (m1); /* pgm_mat4x4_set_from_vec4 */ v1 = pgm_vec4_new_from_scalars (1.0f, 2.0f, 3.0f, 4.0f); v2 = pgm_vec4_new_from_scalars (5.0f, 6.0f, 7.0f, 8.0f); v3 = pgm_vec4_new_from_scalars (9.0f, 10.0f, 11.0f, 12.0f); v4 = pgm_vec4_new_from_scalars (13.0f, 14.0f, 15.0f, 16.0f); m1 = pgm_mat4x4_new (); pgm_mat4x4_set_from_vec4 (m1, v1, v2, v3, v4); fail_if (m1->m[0]!=1.0f || m1->m[1]!=2.0f || m1->m[2]!=3.0f || m1->m[3]!=4.0f || m1->m[4]!=5.0f || m1->m[5]!=6.0f || m1->m[6]!=7.0f || m1->m[7]!=8.0f || m1->m[8]!=9.0f || m1->m[9]!=10.0f || m1->m[10]!=11.0f || m1->m[11]!=12.0f || m1->m[12]!=13.0f || m1->m[13]!=14.0f || m1->m[14]!=15.0f || m1->m[15]!=16.0f, "pgm_mat4x4_set_from_vec4 error"); pgm_vec4_free (v1); pgm_vec4_free (v2); pgm_vec4_free (v3); pgm_vec4_free (v4); pgm_mat4x4_free (m1); /* pgm_mat4x4_set_from_mat4x4 */ m1 = pgm_mat4x4_new (); m2 = pgm_mat4x4_new_from_scalars (1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f); pgm_mat4x4_set_from_mat4x4 (m1, m2); fail_if (m1->m[0]!=1.0f || m1->m[1]!=2.0f || m1->m[2]!=3.0f || m1->m[3]!=4.0f || m1->m[4]!=5.0f || m1->m[5]!=6.0f || m1->m[6]!=7.0f || m1->m[7]!=8.0f || m1->m[8]!=9.0f || m1->m[9]!=10.0f || m1->m[10]!=11.0f || m1->m[11]!=12.0f || m1->m[12]!=13.0f || m1->m[13]!=14.0f || m1->m[14]!=15.0f || m1->m[15]!=16.0f, "pgm_mat4x4_set_from_mat4x4 error"); pgm_mat4x4_free (m1); pgm_mat4x4_free (m2); /* pgm_mat4x4_is_identity */ m1 = pgm_mat4x4_new_identity (); fail_if (!pgm_mat4x4_is_identity (m1), "1st pgm_mat4x4_is_identity error"); pgm_mat4x4_free (m1); m1 = pgm_mat4x4_new (); fail_if (pgm_mat4x4_is_identity (m1), "2nd pgm_mat4x4_is_identity error"); pgm_mat4x4_free (m1); /* pgm_mat4x4_transpose */ m1 = pgm_mat4x4_new_from_scalars (1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f); m2 = pgm_mat4x4_transpose (m1); fail_if (m2->m[0]!=1.0f || m2->m[1]!=5.0f || m2->m[2]!=9.0f || m2->m[3]!=13.0f || m2->m[4]!=2.0f || m2->m[5]!=6.0f || m2->m[6]!=10.0f || m2->m[7]!=14.0f || m2->m[8]!=3.0f || m2->m[9]!=7.0f || m2->m[10]!=11.0f || m2->m[11]!=15.0f || m2->m[12]!=4.0f || m2->m[13]!=8.0f || m2->m[14]!=12.0f || m2->m[15]!=16.0f, "pgm_mat4x4_transpose error"); pgm_mat4x4_free (m1); pgm_mat4x4_free (m2); /* pgm_mat4x4_translate_from_vec3 */ m1 = pgm_mat4x4_new_from_scalars (1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f); v5 = pgm_vec3_new_from_scalars (2.0f, 3.0f, 4.0f); pgm_mat4x4_translate_from_vec3 (m1, v5); fail_if (m1->m[0]!=1.0f || m1->m[1]!=2.0f || m1->m[2]!=3.0f || m1->m[3]!=24.0f || m1->m[4]!=5.0f || m1->m[5]!=6.0f || m1->m[6]!=7.0f || m1->m[7]!=64.0f || m1->m[8]!=9.0f || m1->m[9]!=10.0f || m1->m[10]!=11.0f || m1->m[11]!=104.0f || m1->m[12]!=13.0f || m1->m[13]!=14.0f || m1->m[14]!=15.0f || m1->m[15]!=144.0f, "pgm_mat4x4_translate_from_vec3 error"); pgm_mat4x4_free (m1); pgm_vec3_free (v5); /* pgm_mat4x4_translate_from_scalars */ m1 = pgm_mat4x4_new_from_scalars (1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f); pgm_mat4x4_translate_from_scalars (m1, 2.0f, 3.0f, 4.0f); fail_if (m1->m[0]!=1.0f || m1->m[1]!=2.0f || m1->m[2]!=3.0f || m1->m[3]!=24.0f || m1->m[4]!=5.0f || m1->m[5]!=6.0f || m1->m[6]!=7.0f || m1->m[7]!=64.0f || m1->m[8]!=9.0f || m1->m[9]!=10.0f || m1->m[10]!=11.0f || m1->m[11]!=104.0f || m1->m[12]!=13.0f || m1->m[13]!=14.0f || m1->m[14]!=15.0f || m1->m[15]!=144.0f, "pgm_mat4x4_translate_from_scalars error"); pgm_mat4x4_free (m1); /* pgm_mat4x4_scale_from_vec3 */ m1 = pgm_mat4x4_new_from_scalars (1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f); v5 = pgm_vec3_new_from_scalars (2.0f, 3.0f, 4.0f); pgm_mat4x4_scale_from_vec3 (m1, v5); fail_if (m1->m[0]!=2.0f || m1->m[1]!=6.0f || m1->m[2]!=12.0f || m1->m[3]!=4.0f || m1->m[4]!=10.0f || m1->m[5]!=18.0f || m1->m[6]!=28.0f || m1->m[7]!=8.0f || m1->m[8]!=18.0f || m1->m[9]!=30.0f || m1->m[10]!=44.0f || m1->m[11]!=12.0f || m1->m[12]!=26.0f || m1->m[13]!=42.0f || m1->m[14]!=60.0f || m1->m[15]!=16.0f, "pgm_mat4x4_scale_from_vec3 error"); pgm_mat4x4_free (m1); pgm_vec3_free (v5); /* pgm_mat4x4_scale_from_vec3 */ m1 = pgm_mat4x4_new_from_scalars (1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f); pgm_mat4x4_scale_from_scalars (m1, 2.0f, 3.0f, 4.0f); fail_if (m1->m[0]!=2.0f || m1->m[1]!=6.0f || m1->m[2]!=12.0f || m1->m[3]!=4.0f || m1->m[4]!=10.0f || m1->m[5]!=18.0f || m1->m[6]!=28.0f || m1->m[7]!=8.0f || m1->m[8]!=18.0f || m1->m[9]!=30.0f || m1->m[10]!=44.0f || m1->m[11]!=12.0f || m1->m[12]!=26.0f || m1->m[13]!=42.0f || m1->m[14]!=60.0f || m1->m[15]!=16.0f, "pgm_mat4x4_scale_from_scalars error"); pgm_mat4x4_free (m1); /* pgm_mat4x4_rotate_x */ m1 = pgm_mat4x4_new_identity (); pgm_mat4x4_rotate_x (m1, PGM_DEGREES_TO_RADIANS (30.0f)); fail_if (m1->m[0]!=1.0f || m1->m[1]!=0.0f || m1->m[2]!=0.0f || m1->m[3]!=0.0f || m1->m[4]!=0.0f || m1->m[5]<0.866f||m1->m[5]>0.867f || m1->m[6]!=-0.5f || m1->m[7]!=0.0f || m1->m[8]!=0.0f || m1->m[9]!=0.5f || m1->m[10]<0.866f||m1->m[10]>0.867f || m1->m[11]!=0.0f || m1->m[12]!=0.0f || m1->m[13]!=0.0f || m1->m[14]!=0.0f || m1->m[15]!=1.0f, "pgm_mat4x4_rotate_x error"); pgm_mat4x4_free (m1); /* pgm_mat4x4_rotate_y */ m1 = pgm_mat4x4_new_identity (); pgm_mat4x4_rotate_y (m1, PGM_DEGREES_TO_RADIANS (30.0f)); fail_if (m1->m[0]<0.866f||m1->m[0]>0.867f || m1->m[1]!=0.0f || m1->m[2]!=0.5f || m1->m[3]!=0.0f || m1->m[4]!=0.0f || m1->m[5]!=1.0f || m1->m[6]!=0.0f || m1->m[7]!=0.0f || m1->m[8]!=-0.5f || m1->m[9]!=0.0f || m1->m[10]<0.866f||m1->m[10]>0.867f || m1->m[11]!=0.0f || m1->m[12]!=0.0f || m1->m[13]!=0.0f || m1->m[14]!=0.0f || m1->m[15]!=1.0f, "pgm_mat4x4_rotate_y error"); pgm_mat4x4_free (m1); /* pgm_mat4x4_new_rotate_z */ m1 = pgm_mat4x4_new_identity (); pgm_mat4x4_rotate_z (m1, PGM_DEGREES_TO_RADIANS (30.0f)); fail_if (m1->m[0]<0.866f||m1->m[0]>0.867f || m1->m[1]!=-0.5f || m1->m[2]!=0.0f || m1->m[3]!=0.0f || m1->m[4]!=0.5f || m1->m[5]<0.866f||m1->m[5]>0.867f || m1->m[6]!=0.0f || m1->m[7]!=0.0f || m1->m[8]!=0.0f || m1->m[9]!=0.0f || m1->m[10]!=1.0f || m1->m[11]!=0.0f || m1->m[12]!=0.0f || m1->m[13]!=0.0f || m1->m[14]!=0.0f || m1->m[15]!=1.0f, "pgm_mat4x4_rotate_z error"); pgm_mat4x4_free (m1); /* FIXME: pgm_mat4x4_rotate_axis_from_scalars * pgm_mat4x4_rotate_axis_from_vec3 */ /* pgm_mat4x4_add_scalar */ m1 = pgm_mat4x4_new_from_scalars (1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f); m2 = pgm_mat4x4_add_scalar (m1, 3.5f); fail_if (m2->m[0] != 4.5f || m2->m[1] != 5.5f || m2->m[2] != 6.5f || m2->m[3] != 7.5f || m2->m[4] != 8.5f || m2->m[5] != 9.5f || m2->m[6] != 10.5f || m2->m[7] != 11.5f || m2->m[8] != 12.5f || m2->m[9] != 13.5f || m2->m[10] != 14.5f || m2->m[11] != 15.5f || m2->m[12] != 16.5f || m2->m[13] != 17.5f || m2->m[14] != 18.5f || m2->m[15] != 19.5f, "pgm_mat4x4_add_scalar error"); pgm_mat4x4_free (m1); pgm_mat4x4_free (m2); /* pgm_mat4x4_add_mat4x4 */ m1 = pgm_mat4x4_new_from_scalars (1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f); m2 = pgm_mat4x4_new_from_scalars (1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f); m3 = pgm_mat4x4_add_mat4x4 (m1, m2); fail_if (m3->m[0] != 2.0f || m3->m[1] != 4.0f || m3->m[2] != 6.0f || m3->m[3] != 8.0f || m3->m[4] != 10.0f || m3->m[5] != 12.0f || m3->m[6] != 14.0f || m3->m[7] != 16.0f || m3->m[8] != 18.0f || m3->m[9] != 20.0f || m3->m[10] != 22.0f || m3->m[11] != 24.0f || m3->m[12] != 26.0f || m3->m[13] != 28.0f || m3->m[14] != 30.0f || m3->m[15] != 32.0f, "pgm_mat4x4_add_mat4x4 error"); pgm_mat4x4_free (m1); pgm_mat4x4_free (m2); pgm_mat4x4_free (m3); /* pgm_mat4x4_substract_scalar */ m1 = pgm_mat4x4_new_from_scalars (1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f); m2 = pgm_mat4x4_substract_scalar (m1, 0.5f); fail_if (m2->m[0] != 0.5f || m2->m[1] != 1.5f || m2->m[2] != 2.5f || m2->m[3] != 3.5f || m2->m[4] != 4.5f || m2->m[5] != 5.5f || m2->m[6] != 6.5f || m2->m[7] != 7.5f || m2->m[8] != 8.5f || m2->m[9] != 9.5f || m2->m[10] != 10.5f || m2->m[11] != 11.5f || m2->m[12] != 12.5f || m2->m[13] != 13.5f || m2->m[14] != 14.5f || m2->m[15] != 15.5f, "pgm_mat4x4_substract_scalar error"); pgm_mat4x4_free (m1); pgm_mat4x4_free (m2); /* pgm_mat4x4_substract_mat4x4 */ m1 = pgm_mat4x4_new_from_scalars (1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f); m2 = pgm_mat4x4_new_from_scalars (0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f); m3 = pgm_mat4x4_substract_mat4x4 (m1, m2); fail_if (m3->m[0] != 0.5f || m3->m[1] != 1.5f || m3->m[2] != 2.5f || m3->m[3] != 3.5f || m3->m[4] != 4.5f || m3->m[5] != 5.5f || m3->m[6] != 6.5f || m3->m[7] != 7.5f || m3->m[8] != 8.5f || m3->m[9] != 9.5f || m3->m[10] != 10.5f || m3->m[11] != 11.5f || m3->m[12] != 12.5f || m3->m[13] != 13.5f || m3->m[14] != 14.5f || m3->m[15] != 15.5f, "pgm_mat4x4_substract_mat4x4 error"); pgm_mat4x4_free (m1); pgm_mat4x4_free (m2); pgm_mat4x4_free (m3); /* pgm_mat4x4_multiply_scalar */ m1 = pgm_mat4x4_new_from_scalars (1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f); m2 = pgm_mat4x4_multiply_scalar (m1, 5.0f); fail_if (m2->m[0]!=5.0f || m2->m[1]!=10.0f || m2->m[2]!=15.0f || m2->m[3]!=20.0f || m2->m[4]!=25.0f || m2->m[5]!=30.0f || m2->m[6]!=35.0f || m2->m[7]!=40.0f || m2->m[8]!=45.0f || m2->m[9]!=50.0f || m2->m[10]!=55.0f || m2->m[11]!=60.0f || m2->m[12]!=65.0f || m2->m[13]!=70.0f || m2->m[14]!=75.0f || m2->m[15]!=80.0f, "pgm_mat4x4_multiply_scalar error"); pgm_mat4x4_free (m1); /* pgm_mat4x4_multiply_vec4 */ m1 = pgm_mat4x4_new_from_scalars (1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f); v1 = pgm_vec4_new_from_scalars (2.0f, 3.0f, 4.0f, 5.0f); v2 = pgm_mat4x4_multiply_vec4 (m1, v1); fail_if (v2->v[0]!=40.0f || v2->v[1]!=96.0f || v2->v[2]!=152.0f || v2->v[3]!=208.0f, "pgm_mat4x4_multiply_vec4 error"); pgm_vec4_free (v1); pgm_vec4_free (v2); pgm_mat4x4_free (m1); /* pgm_mat4x4_multiply_mat4x4 */ m1 = pgm_mat4x4_new_from_scalars (1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f); m2 = pgm_mat4x4_new_from_scalars (12.0f, 22.0f, 32.0f, 42.0f, 52.0f, 62.0f, 72.0f, 82.0f, 92.0f, 102.0f, 112.0f, 122.0f, 132.0f, 142.0f, 152.0f, 162.0f); m3 = pgm_mat4x4_multiply_mat4x4 (m1, m2); fail_if (m3->m[0]!=920.0f || m3->m[1]!=1020.0f || m3->m[2]!=1120.0f || m3->m[3]!=1220.0f || m3->m[4]!=2072.0f || m3->m[5]!=2332.0f || m3->m[6]!=2592.0f || m3->m[7]!=2852.0f || m3->m[8]!=3224.0f || m3->m[9]!=3644.0f || m3->m[10]!=4064.0f || m3->m[11]!=4484.0f || m3->m[12]!=4376.0f || m3->m[13]!=4956.0f || m3->m[14]!=5536.0f || m3->m[15]!=6116.0f, "pgm_mat4x4_multiply_mat4x4 error"); pgm_mat4x4_free (m1); pgm_mat4x4_free (m2); pgm_mat4x4_free (m3); /* pgm_mat4x4_inverse * M . M^1 = I */ m1 = pgm_mat4x4_new_from_scalars (763.94f, 0.0f, 0.0f, 0.0f, 0.0f, 763.94f, 0.0f, 0.0f, 0.0f, 0.0f, -1.1f, -553.22f, 0.0f, 0.0f, -1.0f, 0.0f); m2 = pgm_mat4x4_inverse (m1); m3 = pgm_mat4x4_multiply_mat4x4 (m1, m2); fail_if (m3->m[0]<0.99f || m3->m[0]>1.01f || m3->m[1]<-0.01f || m3->m[1]>0.01f || m3->m[2]<-0.01f || m3->m[2]>0.01f || m3->m[3]<-0.01f || m3->m[3]>0.01f || m3->m[4]<-0.01f || m3->m[4]>0.01f || m3->m[5]<0.99f || m3->m[5]>1.01f || m3->m[6]<-0.01f || m3->m[6]>0.01f || m3->m[7]<-0.01f || m3->m[7]>0.01f || m3->m[8]<-0.01f || m3->m[8]>0.01f || m3->m[9]<-0.01f || m3->m[9]>0.01f || m3->m[10]<0.99f || m3->m[10]>1.01f || m3->m[11]<-0.01f || m3->m[11]>0.01f || m3->m[12]<-0.01f || m3->m[12]>0.01f || m3->m[13]<-0.01f || m3->m[13]>0.01f || m3->m[14]<-0.01f || m3->m[14]>0.01f || m3->m[15]<0.99f || m3->m[15]>1.01f, "pgm_mat4x4_inverse error"); pgm_mat4x4_free (m1); pgm_mat4x4_free (m2); pgm_mat4x4_free (m3); } PGM_END_TEST; /* test utilities */ PGM_START_TEST (test_linearalgebra_utilities) { PgmVec3 *l1, *l2, *p, *pu, *pv, *i; gboolean belongs; /* 1st pgm_intersection_line_plane test */ l1 = pgm_vec3_new_from_scalars (0.0f, 0.0f, 0.0f); l2 = pgm_vec3_new_from_scalars (0.0f, 0.0f, 1.0f); p = pgm_vec3_new_from_scalars (-0.5f, -0.5f, 1.0f); pu = pgm_vec3_new_from_scalars (1.0f, 0.0f, 0.0f); pv = pgm_vec3_new_from_scalars (0.0f, 1.0f, 0.0f); i = pgm_intersection_line_plane (l1, l2, p, pu, pv); fail_if (!i || i->v[0]!=0.0f || i->v[1]!=0.0f || i->v[2]!=1.0f, "1st pgm_intersection_line_plane test error"); pgm_vec3_free (l1); pgm_vec3_free (l2); pgm_vec3_free (p); pgm_vec3_free (pu); pgm_vec3_free (pv); pgm_vec3_free (i); /* 2nd pgm_intersection_line_plane test */ l1 = pgm_vec3_new_from_scalars (1.0f, 1.0f, 0.5f); l2 = pgm_vec3_new_from_scalars (1.0f, 0.0f, 0.5f); p = pgm_vec3_new_from_scalars (0.0f, 0.0f, 0.0f); pu = pgm_vec3_new_from_scalars (2.0f, 0.0f, 0.0f); pv = pgm_vec3_new_from_scalars (0.0f, 0.0f, 1.0f); i = pgm_intersection_line_plane (l1, l2, p, pu, pv); fail_if (!i || i->v[0]!=1.0f || i->v[1]!=0.0f || i->v[2]!=0.5f, "2nd pgm_intersection_line_plane test error"); pgm_vec3_free (l1); pgm_vec3_free (l2); pgm_vec3_free (p); pgm_vec3_free (pu); pgm_vec3_free (pv); pgm_vec3_free (i); /* 3rd pgm_intersection_line_plane test */ l1 = pgm_vec3_new_from_scalars (1.0f, 1.0f, 0.5f); l2 = pgm_vec3_new_from_scalars (1.0f, 0.0f, 0.5f); p = pgm_vec3_new_from_scalars (0.0f, 0.0f, 0.0f); pu = pgm_vec3_new_from_scalars (20.0f, 0.0f, 0.0f); pv = pgm_vec3_new_from_scalars (0.0f, 0.0f, 5.0f); i = pgm_intersection_line_plane (l1, l2, p, pu, pv); fail_if (!i || i->v[0]!=1.0f || i->v[1]!=0.0f || i->v[2]!=0.5f, "3rd pgm_intersection_line_plane test error"); pgm_vec3_free (l1); pgm_vec3_free (l2); pgm_vec3_free (p); pgm_vec3_free (pu); pgm_vec3_free (pv); pgm_vec3_free (i); /* pgm_point_belongs_rectangle */ p = pgm_vec3_new_from_scalars (-0.5f, -0.5f, 0.0f); pu = pgm_vec3_new_from_scalars (1.0f, 0.0f, 0.0f); pv = pgm_vec3_new_from_scalars (0.0f, 1.0f, 0.0f); i = pgm_vec3_new_from_scalars (0.0f, 0.0f, 0.0f); belongs = pgm_point_belongs_rectangle (i, p, pu, pv); fail_if (belongs != TRUE, "1st pgm_point_belongs_rectangle test error"); pgm_vec3_set_from_scalars (i, 1.0f, 0.0f, 0.0f); belongs = pgm_point_belongs_rectangle (i, p, pu, pv); fail_if (belongs != FALSE, "2nd pgm_point_belongs_rectangle test error"); pgm_vec3_set_from_scalars (i, 0.5f, 0.0f, 0.0f); belongs = pgm_point_belongs_rectangle (i, p, pu, pv); fail_if (belongs != TRUE, "3rd pgm_point_belongs_rectangle test error"); pgm_vec3_set_from_scalars (i, 0.5f, 0.5f, 0.0f); belongs = pgm_point_belongs_rectangle (i, p, pu, pv); fail_if (belongs != TRUE, "4th pgm_point_belongs_rectangle test error"); pgm_vec3_set_from_scalars (p, 1.0f, -1.0f, 0.0f); pgm_vec3_set_from_scalars (pu, 0.0f, 0.0f, 2.0f); pgm_vec3_set_from_scalars (pv, 0.0f, 1.0f, 0.0f); pgm_vec3_set_from_scalars (i, 1.0f, 0.0f, 0.0f); belongs = pgm_point_belongs_rectangle (i, p, pu, pv); fail_if (belongs != TRUE, "5th pgm_point_belongs_rectangle test error"); pgm_vec3_set_from_scalars (i, 1.0f, -0.5f, 1.9f); belongs = pgm_point_belongs_rectangle (i, p, pu, pv); fail_if (belongs != TRUE, "6th pgm_point_belongs_rectangle test error"); pgm_vec3_set_from_scalars (i, 1.0f, -0.5f, 2.1f); belongs = pgm_point_belongs_rectangle (i, p, pu, pv); fail_if (belongs != FALSE, "7th pgm_point_belongs_rectangle test error"); pgm_vec3_set_from_scalars (i, 1.0f, -0.5f, 1.0f); belongs = pgm_point_belongs_rectangle (i, p, pu, pv); fail_if (belongs != TRUE, "8th pgm_point_belongs_rectangle test error"); } PGM_END_TEST; Suite* pgm_linearalgebra_suite (void) { Suite *s = suite_create ("PgmLinearAlgebra"); TCase *tc_chain = tcase_create ("pgmlinearalgebra tests"); suite_add_tcase (s, tc_chain); tcase_add_test (tc_chain, test_linearalgebra_vec3); tcase_add_test (tc_chain, test_linearalgebra_vec4); tcase_add_test (tc_chain, test_linearalgebra_mat3x3); tcase_add_test (tc_chain, test_linearalgebra_mat4x4); tcase_add_test (tc_chain, test_linearalgebra_utilities); return s; } GST_CHECK_MAIN (pgm_linearalgebra); pigment-0.3.17/tests/check/pgm/pgmdrawable.c0000644000175000017500000004436211205034417015627 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment unit test for pgmdrawable.c * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /* FIXME: Not complete */ #include #include /* Fixtures */ static PgmDrawable * drawable = NULL; static void test_drawable_setup (void) { drawable = PGM_DRAWABLE (pgm_image_new ()); fail_if (NULL == drawable, "drawable creation failed\n"); } static void test_drawable_teardown (void) { ASSERT_OBJECT_REFCOUNT (drawable, "drawable", 1); gst_object_unref (drawable); drawable = NULL; } /* test default values */ PGM_START_TEST (test_drawable_default_values) { PgmError ret; gfloat width, height; gfloat x, y, z; guchar r, g, b, a; guchar opacity; /* size */ ret = pgm_drawable_get_size (drawable, &width, &height); fail_if (ret != PGM_ERROR_OK, "drawable_get_size error"); fail_if (width != 1.0f || height != 1.0f, "bad default size"); /* position */ ret = pgm_drawable_get_position (drawable, &x, &y, &z); fail_if (ret != PGM_ERROR_OK, "drawable_get_position error"); fail_if (x != 0.0f || y != 0.0f || z != 0.0f, "bad default position"); /* color */ ret = pgm_drawable_get_fg_color (drawable, &r, &g, &b, &a); fail_if (ret != PGM_ERROR_OK, "drawable_get_fg_color error"); fail_if (r != 0xFF || g != 0xFF || b != 0xFF || a != 0xFF, "bad default color"); /* opacity */ ret = pgm_drawable_get_opacity (drawable, &opacity); fail_if (ret != PGM_ERROR_OK, "drawable_get_opacity error"); fail_if (opacity != 0xFF, "bad default opacity"); } PGM_END_TEST /* test set/get correctness */ PGM_START_TEST (test_drawable_set_get_correctness) { PgmError ret; gfloat width, height; gfloat x, y, z; guchar r, g, b, a; guchar opacity; /* size */ ret = pgm_drawable_set_size (drawable, 55.55f, 66.66f); fail_if (ret != PGM_ERROR_OK, "drawable_set_size error"); ret = pgm_drawable_get_size (drawable, &width, &height); fail_if (ret != PGM_ERROR_OK, "drawable_get_size error"); fail_if (width != 55.55f || height != 66.66f, "size not set"); /* position */ ret = pgm_drawable_set_position (drawable, 1.1f, 2.2f, 3.3f); fail_if (ret != PGM_ERROR_OK, "drawable_set_position error"); ret = pgm_drawable_get_position (drawable, &x, &y, &z); fail_if (ret != PGM_ERROR_OK, "drawable_get_position error"); fail_if (x != 1.1f || y != 2.2f || z != 3.3f, "position not set"); /* color */ ret = pgm_drawable_set_fg_color (drawable, 0xA0, 0xA1, 0xA2, 0xA3); fail_if (ret != PGM_ERROR_OK, "drawable_set_fg_color error"); ret = pgm_drawable_get_fg_color (drawable, &r, &g, &b, &a); fail_if (ret != PGM_ERROR_OK, "drawable_get_fg_color error"); fail_if (r != 0xA0 || g != 0xA1 || b != 0xA2 || a != 0xA3, "color not set"); /* opacity */ ret = pgm_drawable_set_opacity (drawable, 0xAB); fail_if (ret != PGM_ERROR_OK, "drawable_set_opacity error"); ret = pgm_drawable_get_opacity (drawable, &opacity); fail_if (ret != PGM_ERROR_OK, "drawable_get_opacity error"); fail_if (opacity != 0xAB, "opacity not set"); } PGM_END_TEST PGM_START_TEST (test_drawable_set_get_parameters) { gfloat width = 0, height = 0; gfloat x = 0, y = 0, z = 0; guchar r = 0, g = 0, b = 0, a = 0; guchar opacity; /* size */ ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_drawable_set_size (NULL, 55.55f, 66.66f)); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_drawable_set_size (NULL, -55.55f, 66.66f)); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_drawable_set_size (NULL, 55.55f, -66.66f)); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_drawable_set_size (NULL, 55.55f, 0)); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_drawable_set_size (NULL, 0, 66.66f)); ASSERT_PGM_SUCCESS (pgm_drawable_set_size (drawable, 55.55f, 66.66f)); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_drawable_get_size (NULL, &width, &height)); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_drawable_get_size (drawable, NULL, &height)); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_drawable_get_size (drawable, &width, NULL)); ASSERT_PGM_SUCCESS (pgm_drawable_get_size (drawable, &width, &height)); /* position */ ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_drawable_set_position (NULL, 1.1f, 2.2f, 3.3f)); ASSERT_PGM_SUCCESS (pgm_drawable_set_position (drawable, 1.1f, 2.2f, 3.3f)); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_drawable_get_position (NULL, &x, &y, &z)); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_drawable_get_position (drawable, NULL, &y, &z)); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_drawable_get_position (drawable, &x, NULL, &z)); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_drawable_get_position (drawable, &x, &y, NULL)); ASSERT_PGM_SUCCESS (pgm_drawable_get_position (drawable, &x, &y, &z)); /* fg_color */ ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_drawable_set_fg_color (NULL, 0xA0, 0xA1, 0xA2, 0xA3)); ASSERT_PGM_SUCCESS (pgm_drawable_set_fg_color (drawable, 0xA0, 0xA1, 0xA2, 0xA3)); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_drawable_get_fg_color (NULL, &r, &g, &b, &a)); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_drawable_get_fg_color (drawable, NULL, &g, &b, &a)); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_drawable_get_fg_color (drawable, &r, NULL, &b, &a)); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_drawable_get_fg_color (drawable, &r, &g, NULL, &a)); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_drawable_get_fg_color (drawable, &r, &g, &b, NULL)); ASSERT_PGM_SUCCESS (pgm_drawable_get_fg_color (drawable, &r, &g, &b, &a)); /* bg_color */ ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_drawable_set_bg_color (NULL, 0xA0, 0xA1, 0xA2, 0xA3)); ASSERT_PGM_SUCCESS (pgm_drawable_set_bg_color (drawable, 0xA0, 0xA1, 0xA2, 0xA3)); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_drawable_get_bg_color (NULL, &r, &g, &b, &a)); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_drawable_get_bg_color (drawable, NULL, &g, &b, &a)); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_drawable_get_bg_color (drawable, &r, NULL, &b, &a)); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_drawable_get_bg_color (drawable, &r, &g, NULL, &a)); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_drawable_get_bg_color (drawable, &r, &g, &b, NULL)); ASSERT_PGM_SUCCESS (pgm_drawable_get_bg_color (drawable, &r, &g, &b, &a)); /* opacity */ ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_drawable_set_opacity (NULL, 0xAB)); ASSERT_PGM_SUCCESS (pgm_drawable_set_opacity (drawable, 0xAB)); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_drawable_get_opacity (NULL, &opacity)); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_drawable_get_opacity (drawable, NULL)); ASSERT_PGM_SUCCESS (pgm_drawable_get_opacity (drawable, &opacity)); } PGM_END_TEST PGM_START_TEST (test_drawable_visibility) { gboolean visible = TRUE; PgmCanvas *canvas = NULL; canvas = pgm_canvas_new (); fail_if (NULL == canvas, "canvas creation failed"); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_drawable_is_visible (NULL, &visible)); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_drawable_is_visible (drawable, NULL)); ASSERT_PGM_SUCCESS (pgm_drawable_is_visible (drawable, &visible)); /* drawables are hidden by default */ fail_unless_equals_int (visible, FALSE); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_drawable_show (NULL)); ASSERT_PGM_SUCCESS (pgm_drawable_show (drawable)); ASSERT_PGM_SUCCESS (pgm_drawable_is_visible (drawable, &visible)); fail_unless_equals_int (visible, TRUE); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_drawable_hide (NULL)); ASSERT_PGM_SUCCESS (pgm_drawable_hide (drawable)); ASSERT_PGM_SUCCESS (pgm_drawable_is_visible (drawable, &visible)); fail_unless_equals_int (visible, FALSE); gst_object_unref (canvas); } PGM_END_TEST PGM_START_TEST (test_drawable_from_canvas) { PgmCanvas *canvas = NULL; gfloat x, y; canvas = pgm_canvas_new (); fail_if (NULL == canvas, "canvas creation failed"); ASSERT_PGM_SUCCESS (pgm_canvas_set_size (canvas, 4.0f, 3.0f)); ASSERT_PGM_SUCCESS (pgm_drawable_set_size (drawable, 0.7f, 0.5f)); ASSERT_PGM_SUCCESS (pgm_drawable_set_position (drawable, 1.1f, 1.3f, 0.2f)); ASSERT_PGM_SUCCESS (pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, drawable)); ASSERT_PGM_SUCCESS (pgm_drawable_from_canvas (drawable, &x, &y, 0.0f, 0.0f, 0.0f)); fail_unless_similar_float (x, -1.1f); fail_unless_similar_float (y, -1.3f); ASSERT_PGM_SUCCESS (pgm_drawable_from_canvas (drawable, &x, &y, 1.1f, 1.3f, 0.2f)); fail_unless_similar_float (x, 0.0f); fail_unless_similar_float (y, 0.0f); ASSERT_PGM_SUCCESS (pgm_drawable_from_canvas (drawable, &x, &y, 4.0f, 3.0f, 0.0f)); fail_unless_similar_float (x, 2.9f); fail_unless_similar_float (y, 1.7f); ASSERT_PGM_SUCCESS (pgm_drawable_from_canvas (drawable, &x, &y, 1.43f, 1.51f, 0.0f)); fail_unless_similar_float (x, 0.33f); fail_unless_similar_float (y, 0.21f); ASSERT_PGM_SUCCESS (pgm_drawable_from_canvas (drawable, &x, &y, 1.45f, 1.55f, 0.2f)); fail_unless_similar_float (x, 0.35f); fail_unless_similar_float (y, 0.25f); ASSERT_PGM_SUCCESS (pgm_drawable_set_rotation_x (drawable, 0.2f)); ASSERT_PGM_SUCCESS (pgm_drawable_set_rotation_y (drawable, 0.3f)); ASSERT_PGM_SUCCESS (pgm_drawable_set_rotation_z (drawable, 0.4f)); ASSERT_PGM_SUCCESS (pgm_drawable_from_canvas (drawable, &x, &y, 1.45f, 1.55f, 0.2f)); fail_unless_similar_float (x, 0.35f); fail_unless_similar_float (y, 0.25f); ASSERT_PGM_SUCCESS (pgm_drawable_from_canvas (drawable, &x, &y, 0.0f, 0.0f, 0.0f)); fail_unless_similar_float (x, -1.56339322275602f); fail_unless_similar_float (y, -0.63346662177742f); ASSERT_PGM_SUCCESS (pgm_drawable_from_canvas (drawable, &x, &y, 1.1f, 1.3f, 0.2f)); fail_unless_similar_float (x, -0.066906144563908f); fail_unless_similar_float (y, 0.16024943485373f); ASSERT_PGM_SUCCESS (pgm_drawable_from_canvas (drawable, &x, &y, 4.0f, 3.0f, 0.0f)); fail_unless_similar_float (x, 3.26349587675462f); fail_unless_similar_float (y, 0.51794527036626f); ASSERT_PGM_SUCCESS (pgm_drawable_from_canvas (drawable, &x, &y, 1.43f, 1.51f, 0.0f)); fail_unless_similar_float (x, 0.3528524378336f); fail_unless_similar_float (y, 0.16309226923455f); ASSERT_PGM_SUCCESS (pgm_drawable_set_rotation_x (drawable, 0.0f)); ASSERT_PGM_SUCCESS (pgm_drawable_set_rotation_y (drawable, 0.0f)); ASSERT_PGM_SUCCESS (pgm_drawable_set_rotation_z (drawable, 0.0f)); /* drawable belongs now to canvas, but we don't want it to be destroyed */ g_object_ref (drawable); g_object_unref (canvas); } PGM_END_TEST PGM_START_TEST (test_drawable_from_canvas_fail) { PgmCanvas *canvas = NULL; gfloat x, y; canvas = pgm_canvas_new (); fail_if (NULL == canvas, "canvas creation failed"); ASSERT_PGM_SUCCESS (pgm_canvas_set_size (canvas, 4.0f, 3.0f)); ASSERT_PGM_SUCCESS (pgm_drawable_set_size (drawable, 0.7f, 0.5f)); ASSERT_PGM_SUCCESS (pgm_drawable_set_position (drawable, 1.1f, 1.3f, 0.2f)); ASSERT_PGM_SUCCESS (pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, drawable)); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_drawable_from_canvas (NULL, &x, &y, 0.0f, 0.0f, 0.0f)); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_drawable_from_canvas (drawable, NULL, &y, 0.0f, 0.0f, 0.0f)); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_drawable_from_canvas (drawable, &x, NULL, 0.0f, 0.0f, 0.0f)); /* drawable belongs now to canvas, but we don't want it to be destroyed */ g_object_ref (drawable); g_object_unref (canvas); } PGM_END_TEST PGM_START_TEST (test_drawable_to_canvas) { PgmCanvas *canvas = NULL; gfloat x, y, z; canvas = pgm_canvas_new (); fail_if (NULL == canvas, "canvas creation failed"); ASSERT_PGM_SUCCESS (pgm_canvas_set_size (canvas, 4.0f, 3.0f)); ASSERT_PGM_SUCCESS (pgm_drawable_set_size (drawable, 0.7f, 0.5f)); ASSERT_PGM_SUCCESS (pgm_drawable_set_position (drawable, 1.1f, 1.3f, 0.2f)); ASSERT_PGM_SUCCESS (pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, drawable)); ASSERT_PGM_SUCCESS (pgm_drawable_to_canvas (drawable, &x, &y, &z, -1.1f, -1.3f)); fail_unless_similar_float (x, 0.0f); fail_unless_similar_float (y, 0.0f); fail_unless_similar_float (z, 0.2f); ASSERT_PGM_SUCCESS (pgm_drawable_to_canvas (drawable, &x, &y, &z, 0.0f, 0.0f)); fail_unless_similar_float (x, 1.1f); fail_unless_similar_float (y, 1.3f); fail_unless_similar_float (z, 0.2f); ASSERT_PGM_SUCCESS (pgm_drawable_to_canvas (drawable, &x, &y, &z, 2.9f, 1.7f)); fail_unless_similar_float (x, 4.0f); fail_unless_similar_float (y, 3.0f); fail_unless_similar_float (z, 0.2f); ASSERT_PGM_SUCCESS (pgm_drawable_to_canvas (drawable, &x, &y, &z, 0.33f, 0.21f)); fail_unless_similar_float (x, 1.43f); fail_unless_similar_float (y, 1.51f); fail_unless_similar_float (z, 0.2f); ASSERT_PGM_SUCCESS (pgm_drawable_to_canvas (drawable, &x, &y, &z, 0.35f, 0.25f)); fail_unless_similar_float (x, 1.45f); fail_unless_similar_float (y, 1.55f); fail_unless_similar_float (z, 0.2f); ASSERT_PGM_SUCCESS (pgm_drawable_set_rotation_x (drawable, 0.2f)); ASSERT_PGM_SUCCESS (pgm_drawable_set_rotation_y (drawable, 0.3f)); ASSERT_PGM_SUCCESS (pgm_drawable_set_rotation_z (drawable, 0.4f)); ASSERT_PGM_SUCCESS (pgm_drawable_to_canvas (drawable, &x, &y, &z, 0.35f, 0.25f)); fail_unless_similar_float (x, 1.45f); fail_unless_similar_float (y, 1.55f); fail_unless_similar_float (z, 0.2f); ASSERT_PGM_SUCCESS (pgm_drawable_to_canvas (drawable, &x, &y, &z, 0.0f, 0.0f)); fail_unless_similar_float (x, 1.235033276287125f); fail_unless_similar_float (y, 1.177534245662286f); fail_unless_similar_float (z, 0.19234692599082f); ASSERT_PGM_SUCCESS (pgm_drawable_to_canvas (drawable, &x, &y, &z, 0.7f, 0.5f)); fail_unless_similar_float (x, 1.664966723712875f); fail_unless_similar_float (y, 1.922465754337714f); fail_unless_similar_float (z, 0.20765307400918f); ASSERT_PGM_SUCCESS (pgm_drawable_to_canvas (drawable, &x, &y, &z, 1.0f, 1.0f)); fail_unless_similar_float (x, 1.742930900626122f); fail_unless_similar_float (y, 2.493104410428394f); fail_unless_similar_float (z, 0.29871959526294f); ASSERT_PGM_SUCCESS (pgm_drawable_to_canvas (drawable, &x, &y, &z, -1.0f, -0.5f)); fail_unless_similar_float (x, 0.541122875977f); fail_unless_similar_float (y, 0.3018830975483f); fail_unless_similar_float (z, 0.23386105789901f); ASSERT_PGM_SUCCESS (pgm_drawable_set_rotation_x (drawable, 0.0f)); ASSERT_PGM_SUCCESS (pgm_drawable_set_rotation_y (drawable, 0.0f)); ASSERT_PGM_SUCCESS (pgm_drawable_set_rotation_z (drawable, 0.0f)); /* drawable belongs now to canvas, but we don't want it to be destroyed */ g_object_ref (drawable); g_object_unref (canvas); } PGM_END_TEST PGM_START_TEST (test_drawable_to_canvas_fail) { PgmCanvas *canvas = NULL; gfloat x, y, z; canvas = pgm_canvas_new (); fail_if (NULL == canvas, "canvas creation failed"); ASSERT_PGM_SUCCESS (pgm_canvas_set_size (canvas, 4.0f, 3.0f)); ASSERT_PGM_SUCCESS (pgm_drawable_set_size (drawable, 0.7f, 0.5f)); ASSERT_PGM_SUCCESS (pgm_drawable_set_position (drawable, 1.1f, 1.3f, 0.2f)); ASSERT_PGM_SUCCESS (pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, drawable)); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_drawable_to_canvas (NULL, &x, &y, &z, 0.0f, 0.0f)); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_drawable_to_canvas (drawable, NULL, &y, &z, 0.0f, 0.0f)); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_drawable_to_canvas (drawable, &x, NULL, &z, 0.0f, 0.0f)); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_drawable_to_canvas (drawable, &x, &y, NULL, 0.0f, 0.0f)); /* drawable belongs now to canvas, but we don't want it to be destroyed */ g_object_ref (drawable); g_object_unref (canvas); } PGM_END_TEST Suite * pgm_drawable_suite (void) { Suite *s = suite_create ("PgmDrawable"); TCase *tc_chain = tcase_create ("pgmdrawable tests"); PGM_USE_STANDARD_FIXTURES (tc_chain); tcase_add_unchecked_fixture (tc_chain, test_drawable_setup, test_drawable_teardown); suite_add_tcase (s, tc_chain); tcase_add_test (tc_chain, test_drawable_default_values); tcase_add_test (tc_chain, test_drawable_set_get_parameters); tcase_add_test (tc_chain, test_drawable_set_get_correctness); tcase_add_test (tc_chain, test_drawable_visibility); tcase_add_test (tc_chain, test_drawable_from_canvas); tcase_add_test (tc_chain, test_drawable_from_canvas_fail); tcase_add_test (tc_chain, test_drawable_to_canvas); tcase_add_test (tc_chain, test_drawable_to_canvas_fail); return s; } GST_CHECK_MAIN (pgm_drawable); pigment-0.3.17/tests/check/pgm/Makefile.am0000644000175000017500000000023111205034417015215 00000000000000include $(top_srcdir)/tests/check/common/common-tests.am check_PROGRAMS = \ pgm \ pgmcanvas \ pgmdrawable \ pgmimage \ pgmtext \ pgmlinearalgebra pigment-0.3.17/tests/check/pgm/pgm.c0000644000175000017500000000634211205034417014121 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment unit test for pgm.c * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include /* test init twice */ PGM_START_TEST (test_init_twice) { pgm_init (NULL, NULL); pgm_init (NULL, NULL); pgm_deinit (); } PGM_END_TEST; /* test deinit twice */ PGM_START_TEST (test_deinit_twice) { pgm_init (NULL, NULL); pgm_deinit (); pgm_deinit (); } PGM_END_TEST; /* test version functions */ PGM_START_TEST (test_version) { guint major, minor, micro, nano; gchar *version; pgm_version (&major, &minor, µ, &nano); assert_equals_int (major, PGM_VERSION_MAJOR); assert_equals_int (minor, PGM_VERSION_MINOR); assert_equals_int (micro, PGM_VERSION_MICRO); assert_equals_int (nano, PGM_VERSION_NANO); version = pgm_version_string (); fail_if (version == NULL, "version string returns NULL"); g_free (version); /* I assume none of these numbers would reach 282828 ever */ major = minor = micro = nano = 282828; ASSERT_CRITICAL (pgm_version (NULL, &minor, µ, &nano)); assert_equals_int (minor, 282828); assert_equals_int (micro, 282828); assert_equals_int (nano, 282828); ASSERT_CRITICAL (pgm_version (&major, NULL, µ, &nano)); assert_equals_int (major, 282828); assert_equals_int (micro, 282828); assert_equals_int (nano, 282828); ASSERT_CRITICAL (pgm_version (&major, &minor, NULL, &nano)); assert_equals_int (major, 282828); assert_equals_int (minor, 282828); assert_equals_int (nano, 282828); ASSERT_CRITICAL (pgm_version (&major, &minor, µ, NULL)); assert_equals_int (major, 282828); assert_equals_int (minor, 282828); assert_equals_int (micro, 282828); } PGM_END_TEST; gboolean do_quit (gpointer data) { pgm_main_quit (); return FALSE; } gboolean do_call_main (gpointer data) { pgm_main (); pgm_main (); return FALSE; } PGM_START_TEST (test_main) { pgm_init_check (NULL, NULL); g_timeout_add (500, do_quit, NULL); pgm_main (); g_timeout_add (500, do_call_main, NULL); g_timeout_add (1000, do_quit, NULL); pgm_main (); pgm_deinit (); } PGM_END_TEST; Suite * pgm_suite (void) { Suite *s = suite_create ("Pgm"); TCase *tc_chain = tcase_create ("pgm tests"); suite_add_tcase (s, tc_chain); tcase_add_test (tc_chain, test_init_twice); tcase_add_test (tc_chain, test_deinit_twice); tcase_add_test (tc_chain, test_main); tcase_add_test (tc_chain, test_version); return s; } GST_CHECK_MAIN (pgm); pigment-0.3.17/tests/check/pgm/pgmimage.c0000644000175000017500000005452611205034417015133 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment unit test for pgmimage.c * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include #include #include /* Fixture stuff */ #define TEST_IMAGE_FILE "./test-image.png" #define TEST_IMAGE_SMALL_FILE "./test-small-image.png" #define UNEXISTING_FILE "/blah/foo/bar/notexistingfilethatdoesnotexist.png" static void write_image (const gchar *file_name, guint side_size) { GdkPixbuf *pixbuf = NULL; guchar *data = malloc (side_size * side_size * 3); guint i = 0, rowstride = side_size*3; for (i=0; i < side_size * side_size * 3; i+=3) { data[i] = (i / 256) % 0xff; data[i+1] = i % 0xff; data[i+2] = (3 * i + 23) % 0xff; } pixbuf = gdk_pixbuf_new_from_data (data, GDK_COLORSPACE_RGB, FALSE, 8, side_size, side_size, rowstride, NULL, NULL); gdk_pixbuf_save (pixbuf, file_name, "png", NULL, NULL); g_object_unref (pixbuf); } static void test_image_unchecked_setup (void) { write_image (TEST_IMAGE_SMALL_FILE, 16); write_image (TEST_IMAGE_FILE, 1024); } static void test_image_unchecked_teardown (void) { g_unlink (TEST_IMAGE_FILE); g_unlink (TEST_IMAGE_SMALL_FILE); } /* test image master/slave delete */ PGM_START_TEST (test_image_master_slave_del) { PgmError ret; PgmImage *img1, *img2; /* create 2 floating images with refcount 1 */ img1 = PGM_IMAGE (pgm_image_new ()); ASSERT_OBJECT_REFCOUNT (img1, "img1", 1); img2 = PGM_IMAGE (pgm_image_new ()); ASSERT_OBJECT_REFCOUNT (img2, "img2", 1); /* make img1 a slave of img2, refcounts should not change */ ret = pgm_image_set_from_image (img1, img2); fail_if (ret != PGM_ERROR_OK, "image_set_from_image error"); ASSERT_OBJECT_REFCOUNT (img1, "img1", 1); ASSERT_OBJECT_REFCOUNT (img2, "img2", 1); /* del master image, the refcount of the two images are still the same */ ret = pgm_image_clear (img2); fail_if (ret != PGM_ERROR_OK, "image_clear error"); ASSERT_OBJECT_REFCOUNT (img1, "img1", 1); ASSERT_OBJECT_REFCOUNT (img2, "img2", 1); /* stop the slavery */ ret = pgm_image_clear (img1); fail_if (ret != PGM_ERROR_OK, "image_clear error"); ASSERT_OBJECT_REFCOUNT (img1, "img1", 1); ASSERT_OBJECT_REFCOUNT (img2, "img2", 1); /* clean up our references */ gst_object_unref (GST_OBJECT_CAST (img1)); gst_object_unref (GST_OBJECT_CAST (img2)); } PGM_END_TEST; /* test default values */ PGM_START_TEST (test_image_default_values) { PgmError ret; PgmImage *image; PgmImageAlignment alignment; PgmImageLayoutType layout; PgmImageInterpType interp; PgmImageStorageType storage; guint numerator, denominator; image = PGM_IMAGE (pgm_image_new ()); /* alignment */ ret = pgm_image_get_alignment (image, &alignment); fail_if (ret != PGM_ERROR_OK, "image_get_alignment error"); fail_if (alignment != PGM_IMAGE_CENTER, "bad default alignment"); /* aspect style */ ret = pgm_image_get_layout (image, &layout); fail_if (ret != PGM_ERROR_OK, "image_get_layout error"); fail_if (layout != PGM_IMAGE_SCALED, "bad default drawable style"); /* interp */ ret = pgm_image_get_interp (image, &interp); fail_if (ret != PGM_ERROR_OK, "image_get_interp error"); fail_if (interp != PGM_IMAGE_BILINEAR, "bad default interp"); /* aspect-ratio */ ret = pgm_image_get_aspect_ratio (image, &numerator, &denominator); fail_if (ret != PGM_ERROR_OK, "image_get_aspect_ratio error"); fail_if (numerator != 0 || denominator != 1, "bad default aspect-ratio"); /* storage type */ ret = pgm_image_get_storage_type (image, &storage); fail_if (ret != PGM_ERROR_OK, "image_get_storage_type error"); fail_if (storage != PGM_IMAGE_EMPTY, "bad default storage type"); gst_object_unref (GST_OBJECT_CAST (image)); } PGM_END_TEST; /* test set/get correctness */ PGM_START_TEST (test_image_set_get_correctness) { PgmError ret; PgmImage *image; PgmImageAlignment alignment; PgmImageLayoutType layout; PgmImageInterpType interp; guint numerator, denominator; image = PGM_IMAGE (pgm_image_new ()); /* alignment */ ret = pgm_image_set_alignment (image, PGM_IMAGE_BOTTOM); fail_if (ret != PGM_ERROR_OK, "image_set_alignment error"); ret = pgm_image_get_alignment (image, &alignment); fail_if (ret != PGM_ERROR_OK, "image_get_alignment error"); fail_if (alignment != PGM_IMAGE_BOTTOM, "alignment not set"); /* layout type */ ret = pgm_image_set_layout (image, PGM_IMAGE_TILED); fail_if (ret != PGM_ERROR_OK, "image_set_layout error"); ret = pgm_image_get_layout (image, &layout); fail_if (ret != PGM_ERROR_OK, "image_get_layout error"); fail_if (layout != PGM_IMAGE_TILED, "laytout not set"); /* interp */ ret = pgm_image_set_interp (image, PGM_IMAGE_NEAREST); fail_if (ret != PGM_ERROR_OK, "image_set_interp error"); ret = pgm_image_get_interp (image, &interp); fail_if (ret != PGM_ERROR_OK, "image_get_interp error"); fail_if (interp != PGM_IMAGE_NEAREST, "interp not set"); /* aspect-ratio */ ret = pgm_image_set_aspect_ratio (image, 16, 9); fail_if (ret != PGM_ERROR_OK, "image_set_aspect_ratio error"); ret = pgm_image_get_aspect_ratio (image, &numerator, &denominator); fail_if (ret != PGM_ERROR_OK, "image_get_aspect_ratio error"); fail_if (numerator != 16 || denominator != 9, "aspect-ratio not set"); gst_object_unref (GST_OBJECT_CAST (image)); } PGM_END_TEST; PGM_START_TEST (test_image_buffer) { PgmImage *image = NULL; PgmImageStorageType storage = PGM_IMAGE_EMPTY; guchar image_data[192] = { 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc }; image = PGM_IMAGE (pgm_image_new_from_buffer (PGM_IMAGE_RGB, 8, 8, 24, 192, image_data)); fail_if (NULL == image, "pgm_image_new_from_buffer failed"); ASSERT_PGM_SUCCESS (pgm_image_get_storage_type (image, &storage)); fail_unless (PGM_IMAGE_BUFFER == storage, "storage type should be PGM_IMAGE_BUFFER"); ASSERT_PGM_SUCCESS (pgm_image_clear (image)); ASSERT_PGM_SUCCESS (pgm_image_get_storage_type (image, &storage)); fail_unless (PGM_IMAGE_EMPTY == storage, "storage type should be PGM_IMAGE_EMPTY"); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_image_set_from_buffer (NULL, PGM_IMAGE_RGB, 8, 8, 24, 192, image_data)); ASSERT_PGM_SUCCESS (pgm_image_get_storage_type (image, &storage)); fail_unless (PGM_IMAGE_EMPTY == storage, "storage type should be PGM_IMAGE_EMPTY"); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_image_set_from_buffer (image, PGM_IMAGE_RGB, 8, 8, 24, 192, NULL)); ASSERT_PGM_SUCCESS (pgm_image_get_storage_type (image, &storage)); fail_unless (PGM_IMAGE_EMPTY == storage, "storage type should be PGM_IMAGE_EMPTY"); ASSERT_PGM_SUCCESS (pgm_image_set_from_buffer (image, PGM_IMAGE_RGB, 8, 8, 24, 192, image_data)); ASSERT_PGM_SUCCESS (pgm_image_get_storage_type (image, &storage)); fail_unless (PGM_IMAGE_BUFFER == storage, "storage type should be PGM_IMAGE_BUFFER"); gst_object_unref (image); } PGM_END_TEST PGM_START_TEST (test_image_from_file) { PgmImage *image = NULL; PgmImageStorageType storage = PGM_IMAGE_EMPTY; image = PGM_IMAGE (pgm_image_new_from_file (NULL, 0)); fail_if (NULL != image, "created an image for NULL filename"); image = PGM_IMAGE (pgm_image_new_from_file (TEST_IMAGE_FILE, 0)); fail_if (NULL == image, "image creation failed with right params"); ASSERT_PGM_SUCCESS (pgm_image_get_storage_type (image, &storage)); ASSERT_PGM_SUCCESS (pgm_image_clear (image)); ASSERT_PGM_SUCCESS (pgm_image_get_storage_type (image, &storage)); fail_unless (PGM_IMAGE_EMPTY == storage, "storage type should be PGM_IMAGE_EMPTY"); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_image_set_from_file (NULL, TEST_IMAGE_FILE, 0)); ASSERT_PGM_SUCCESS (pgm_image_get_storage_type (image, &storage)); fail_unless (PGM_IMAGE_EMPTY == storage, "storage type should be PGM_IMAGE_EMPTY"); ASSERT_PGM_ERROR (pgm_image_set_from_file (image, NULL, 0)); ASSERT_PGM_SUCCESS (pgm_image_get_storage_type (image, &storage)); fail_unless (PGM_IMAGE_EMPTY == storage, "storage type should be PGM_IMAGE_EMPTY"); ASSERT_PGM_SUCCESS (pgm_image_set_from_file (image, TEST_IMAGE_FILE, 0)); gst_object_unref (image); } PGM_END_TEST static gpointer thread_init (gpointer data) { pgm_main (); } PGM_START_TEST (test_image_dispose_while_loading) { PgmDrawable *image = NULL; GThread *pgm_thread = NULL; pgm_init (NULL, NULL); pgm_thread = g_thread_create ( thread_init, NULL, TRUE, NULL); fail_unless (NULL != pgm_thread, "thread creation"); g_usleep (500000); image = pgm_image_new (); fail_unless (NULL != image, "image creation"); ASSERT_PGM_SUCCESS (pgm_image_set_from_file ( PGM_IMAGE (image), TEST_IMAGE_FILE, 0)); gst_object_unref (image); pgm_main_quit (); g_thread_join (pgm_thread); pgm_deinit (); } PGM_END_TEST static void image_loaded_cb (PgmImage *image, gpointer user_data) { gboolean *image_loaded = user_data; *image_loaded = TRUE; pgm_main_quit (); } PGM_START_TEST (test_image_small_image) { PgmDrawable *image = NULL; GThread *pgm_thread = NULL; gboolean image_loaded = FALSE; pgm_init (NULL, NULL); image = pgm_image_new (); fail_unless (NULL != image, "image creation"); g_signal_connect (image, "file-loaded", G_CALLBACK (image_loaded_cb), &image_loaded); ASSERT_PGM_SUCCESS (pgm_image_set_from_file (PGM_IMAGE (image), TEST_IMAGE_SMALL_FILE, 0)); pgm_main (); fail_unless (image_loaded, "small image loading"); gst_object_unref (image); pgm_deinit (); } PGM_END_TEST PGM_START_TEST (test_image_gst_buffer) { /* FIXME: write gst_buffer tests */ } PGM_END_TEST /* Fight against rounding issues using a threshold comparison of 1 */ #define IMAGE_FROM_DRAWABLE_TEST(x_drb,y_drb,x_img,y_img) \ G_STMT_START { \ ASSERT_PGM_SUCCESS (pgm_image_from_drawable (image, &x, &y, \ x_drb, y_drb)); \ fail_unless (abs (x-x_img) <= 1); \ fail_unless (abs (y-y_img) <= 1); \ } G_STMT_END #define IMAGE_FROM_DRAWABLE_3_TESTS(x1,y1,x2,y2,x3,y3) \ G_STMT_START { \ IMAGE_FROM_DRAWABLE_TEST (0.0f, 0.0f, x1, y1); \ IMAGE_FROM_DRAWABLE_TEST (2.0f, 1.0f, x2, y2); \ IMAGE_FROM_DRAWABLE_TEST (-1.0f, -1.0f, x3, y3); \ } G_STMT_END PGM_START_TEST (test_image_from_drawable) { PgmImage *image; GThread *pgm_thread; gint x, y; guint old_n, old_d; pgm_init (NULL, NULL); pgm_thread = g_thread_create (thread_init, NULL, TRUE, NULL); fail_unless (NULL != pgm_thread, "thread creation"); image = PGM_IMAGE (pgm_image_new_from_file (TEST_IMAGE_FILE, 0)); fail_if (NULL == image, "failed creating image"); g_usleep (500000); /* we hope the image will get loaded in that time */ ASSERT_PGM_SUCCESS (pgm_drawable_set_size (PGM_DRAWABLE (image), 2.0f, 1.0f)); /* filled */ ASSERT_PGM_SUCCESS (pgm_image_set_layout (image, PGM_IMAGE_FILLED)); IMAGE_FROM_DRAWABLE_TEST (0.0f, 0.0f, 0, 0); IMAGE_FROM_DRAWABLE_TEST (2.0f, 1.0f, 1024, 1024); IMAGE_FROM_DRAWABLE_TEST (1.9999f, 0.9999f, 1023, 1023); IMAGE_FROM_DRAWABLE_TEST (4.0f, 2.0f, 2048, 2048); IMAGE_FROM_DRAWABLE_TEST (1.0f, 0.75f, 512, 768); IMAGE_FROM_DRAWABLE_TEST (-1.0f, -1.0f, -512, -1024); /* we trust the stuff to be linear and from now on consider it enough to test * only for (0,0), (2,1) and (-1,-1) with IMAGE_FROM_DRAWABLE_3_TESTS() */ /* scaled */ ASSERT_PGM_SUCCESS (pgm_image_set_layout (image, PGM_IMAGE_SCALED)); ASSERT_PGM_SUCCESS (pgm_image_set_alignment (image, PGM_IMAGE_LEFT)); IMAGE_FROM_DRAWABLE_3_TESTS (0, 0, 2048, 1024, -1024, -1024); ASSERT_PGM_SUCCESS (pgm_image_set_alignment (image, PGM_IMAGE_CENTER)); IMAGE_FROM_DRAWABLE_3_TESTS (-512, 0, 1536, 1024, -1536, -1024); ASSERT_PGM_SUCCESS (pgm_image_set_alignment (image, PGM_IMAGE_RIGHT)); IMAGE_FROM_DRAWABLE_3_TESTS (-1024, 0, 1024, 1024, -2048, -1024); ASSERT_PGM_SUCCESS (pgm_drawable_set_size (PGM_DRAWABLE (image), 1.0f, 2.0f)); ASSERT_PGM_SUCCESS (pgm_image_set_alignment (image, PGM_IMAGE_TOP)); IMAGE_FROM_DRAWABLE_3_TESTS (0, 0, 2048, 1024, -1024, -1024); ASSERT_PGM_SUCCESS (pgm_image_set_alignment (image, PGM_IMAGE_CENTER)); IMAGE_FROM_DRAWABLE_3_TESTS (0, -512, 2048, 512, -1024, -1536); ASSERT_PGM_SUCCESS (pgm_image_set_alignment (image, PGM_IMAGE_BOTTOM)); IMAGE_FROM_DRAWABLE_3_TESTS (0, -1024, 2048, 0, -1024, -2048); /* zoomed */ ASSERT_PGM_SUCCESS (pgm_image_set_layout (image, PGM_IMAGE_ZOOMED)); ASSERT_PGM_SUCCESS (pgm_drawable_set_size (PGM_DRAWABLE (image), 2.0f, 1.0f)); ASSERT_PGM_SUCCESS (pgm_image_set_alignment (image, PGM_IMAGE_TOP)); IMAGE_FROM_DRAWABLE_3_TESTS (0, 0, 1024, 512, -512, -512); ASSERT_PGM_SUCCESS (pgm_image_set_alignment (image, PGM_IMAGE_CENTER)); IMAGE_FROM_DRAWABLE_3_TESTS (0, 256, 1024, 768, -512, -256); ASSERT_PGM_SUCCESS (pgm_image_set_alignment (image, PGM_IMAGE_BOTTOM)); IMAGE_FROM_DRAWABLE_3_TESTS (0, 512, 1024, 1024, -512, 0); ASSERT_PGM_SUCCESS (pgm_drawable_set_size (PGM_DRAWABLE (image), 1.0f, 2.0f)); ASSERT_PGM_SUCCESS (pgm_image_set_alignment (image, PGM_IMAGE_LEFT)); IMAGE_FROM_DRAWABLE_3_TESTS (0, 0, 1024, 512, -512, -512); ASSERT_PGM_SUCCESS (pgm_image_set_alignment (image, PGM_IMAGE_CENTER)); IMAGE_FROM_DRAWABLE_3_TESTS (256, 0, 1280, 512, -256, -512); ASSERT_PGM_SUCCESS (pgm_image_set_alignment (image, PGM_IMAGE_RIGHT)); IMAGE_FROM_DRAWABLE_3_TESTS (512, 0, 1536, 512, 0, -512); /* and now a few tests with changed aspect ratio */ ASSERT_PGM_SUCCESS (pgm_image_get_aspect_ratio (image, &old_n, &old_d)); ASSERT_PGM_SUCCESS (pgm_image_set_aspect_ratio (image, 3, 2)); ASSERT_PGM_SUCCESS (pgm_drawable_set_size (PGM_DRAWABLE (image), 2.0f, 1.0f)); ASSERT_PGM_SUCCESS (pgm_image_set_layout (image, PGM_IMAGE_SCALED)); ASSERT_PGM_SUCCESS (pgm_image_set_alignment (image, PGM_IMAGE_RIGHT)); IMAGE_FROM_DRAWABLE_3_TESTS (-341, 0, 1024, 1024, -1024, -1024); ASSERT_PGM_SUCCESS (pgm_image_set_aspect_ratio (image, old_n, old_d)); gst_object_unref (image); pgm_main_quit (); g_thread_join (pgm_thread); pgm_deinit (); } PGM_END_TEST PGM_START_TEST (test_image_from_drawable_fail) { PgmImage *image; gint x, y; image = PGM_IMAGE (pgm_image_new_from_file (TEST_IMAGE_FILE, 0)); fail_if (NULL == image, "image creation failed"); ASSERT_PGM_ERROR_WITH_CRITICAL ( pgm_image_from_drawable (NULL, &x, &y, 0.0f, 0.0f)); ASSERT_PGM_ERROR_WITH_CRITICAL ( pgm_image_from_drawable (image, NULL, &y, 0.0f, 0.0f)); ASSERT_PGM_ERROR_WITH_CRITICAL ( pgm_image_from_drawable (image, &x, NULL, 0.0f, 0.0f)); gst_object_unref (image); } PGM_END_TEST #define IMAGE_TO_DRAWABLE_TEST(x_image, y_image, x_drawable, y_drawable) \ do { \ ASSERT_PGM_SUCCESS (pgm_image_to_drawable (image, &x, &y, \ x_image, y_image)); \ fail_unless_similar_float (x, x_drawable); \ fail_unless_similar_float (y, y_drawable); \ }while(0) #define IMAGE_TO_DRAWABLE_3_TESTS(x1,y1,x2,y2,x3,y3) \ do { \ IMAGE_TO_DRAWABLE_TEST (0, 0, x1, y1); \ IMAGE_TO_DRAWABLE_TEST (1024, 1024, x2, y2); \ IMAGE_TO_DRAWABLE_TEST (-1024, -512, x3, y3); \ }while(0) PGM_START_TEST (test_image_to_drawable) { PgmImage *image; GThread *pgm_thread; gfloat x, y; guint old_n, old_d; pgm_init (NULL, NULL); pgm_thread = g_thread_create (thread_init, NULL, TRUE, NULL); fail_unless (NULL != pgm_thread, "thread creation"); image = PGM_IMAGE (pgm_image_new_from_file (TEST_IMAGE_FILE, 0)); fail_if (NULL == image, "failed creating image"); g_usleep (500000); /* we hope the image will get loaded in that time */ ASSERT_PGM_SUCCESS (pgm_drawable_set_size (PGM_DRAWABLE (image), 2.0f, 1.0f)); /* filled */ ASSERT_PGM_SUCCESS (pgm_image_set_layout (image, PGM_IMAGE_FILLED)); IMAGE_TO_DRAWABLE_3_TESTS (0.0f, 0.0f, 2.0f, 1.0f, -2.0f, -0.5f); /* scaled */ ASSERT_PGM_SUCCESS (pgm_image_set_layout (image, PGM_IMAGE_SCALED)); ASSERT_PGM_SUCCESS (pgm_image_set_alignment (image, PGM_IMAGE_LEFT)); IMAGE_TO_DRAWABLE_3_TESTS (0.0f, 0.0f, 1.0f, 1.0f, -1.0f, -0.5f); ASSERT_PGM_SUCCESS (pgm_image_set_alignment (image, PGM_IMAGE_CENTER)); IMAGE_TO_DRAWABLE_3_TESTS (0.5f, 0.0f, 1.5f, 1.0f, -0.5f, -0.5f); ASSERT_PGM_SUCCESS (pgm_image_set_alignment (image, PGM_IMAGE_RIGHT)); IMAGE_TO_DRAWABLE_3_TESTS (1.0f, 0.0f, 2.0f, 1.0f, 0.0f, -0.5f); ASSERT_PGM_SUCCESS (pgm_drawable_set_size (PGM_DRAWABLE (image), 1.0f, 2.0f)); ASSERT_PGM_SUCCESS (pgm_image_set_alignment (image, PGM_IMAGE_TOP)); IMAGE_TO_DRAWABLE_3_TESTS (0.0f, 0.0f, 1.0f, 1.0f, -1.0f, -0.5f); ASSERT_PGM_SUCCESS (pgm_image_set_alignment (image, PGM_IMAGE_CENTER)); IMAGE_TO_DRAWABLE_3_TESTS (0.0f, 0.5f, 1.0f, 1.5f, -1.0f, 0.0f); ASSERT_PGM_SUCCESS (pgm_image_set_alignment (image, PGM_IMAGE_BOTTOM)); IMAGE_TO_DRAWABLE_3_TESTS (0.0f, 1.0f, 1.0f, 2.0f, -1.0f, 0.5f); /* zoomed */ ASSERT_PGM_SUCCESS (pgm_image_set_layout (image, PGM_IMAGE_ZOOMED)); ASSERT_PGM_SUCCESS (pgm_image_set_alignment (image, PGM_IMAGE_LEFT)); IMAGE_TO_DRAWABLE_3_TESTS (0.0f, 0.0f, 2.0f, 2.0f, -2.0f, -1.0f); ASSERT_PGM_SUCCESS (pgm_image_set_alignment (image, PGM_IMAGE_CENTER)); IMAGE_TO_DRAWABLE_3_TESTS (-0.5f, 0.0f, 1.5f, 2.0f, -2.5f, -1.0f); ASSERT_PGM_SUCCESS (pgm_image_set_alignment (image, PGM_IMAGE_RIGHT)); IMAGE_TO_DRAWABLE_3_TESTS (-1.0f, 0.0f, 1.0f, 2.0f, -3.0f, -1.0f); ASSERT_PGM_SUCCESS (pgm_drawable_set_size (PGM_DRAWABLE (image), 2.0f, 1.0f)); ASSERT_PGM_SUCCESS (pgm_image_set_alignment (image, PGM_IMAGE_TOP)); IMAGE_TO_DRAWABLE_3_TESTS (0.0f, 0.0f, 2.0f, 2.0f, -2.0f, -1.0f); ASSERT_PGM_SUCCESS (pgm_image_set_alignment (image, PGM_IMAGE_CENTER)); IMAGE_TO_DRAWABLE_3_TESTS (0.0f, -0.5f, 2.0f, 1.5f, -2.0f, -1.5f); ASSERT_PGM_SUCCESS (pgm_image_set_alignment (image, PGM_IMAGE_BOTTOM)); IMAGE_TO_DRAWABLE_3_TESTS (0.0f, -1.0f, 2.0f, 1.0f, -2.0f, -2.0f); /* and now a few tests with changed aspect ratio */ ASSERT_PGM_SUCCESS (pgm_image_get_aspect_ratio (image, &old_n, &old_d)); ASSERT_PGM_SUCCESS (pgm_image_set_aspect_ratio (image, 3, 2)); ASSERT_PGM_SUCCESS (pgm_drawable_set_size (PGM_DRAWABLE (image), 2.0f, 1.0f)); ASSERT_PGM_SUCCESS (pgm_image_set_layout (image, PGM_IMAGE_SCALED)); ASSERT_PGM_SUCCESS (pgm_image_set_alignment (image, PGM_IMAGE_RIGHT)); IMAGE_TO_DRAWABLE_3_TESTS (0.5f, 0.0f, 2.0f, 1.0f, -1.0f, -0.5f); ASSERT_PGM_SUCCESS (pgm_image_set_aspect_ratio (image, old_n, old_d)); gst_object_unref (image); pgm_main_quit (); g_thread_join (pgm_thread); pgm_deinit (); } PGM_END_TEST PGM_START_TEST (test_image_to_drawable_fail) { PgmImage *image; gfloat x, y; image = PGM_IMAGE (pgm_image_new_from_file (TEST_IMAGE_FILE, 0)); fail_if (NULL == image, "image creation failed"); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_image_to_drawable (NULL, &x, &y, 0, 0)); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_image_to_drawable (image, NULL, &y,0, 0)); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_image_to_drawable (image, &x, NULL, 0, 0)); gst_object_unref (image); } PGM_END_TEST Suite * pgm_image_suite (void) { Suite *s = suite_create ("PgmImage"); TCase *tc_chain = tcase_create ("pgmimage tests"); PGM_USE_STANDARD_FIXTURES (tc_chain); tcase_add_unchecked_fixture (tc_chain, test_image_unchecked_setup, test_image_unchecked_teardown); suite_add_tcase (s, tc_chain); tcase_add_test (tc_chain, test_image_master_slave_del); tcase_add_test (tc_chain, test_image_default_values); tcase_add_test (tc_chain, test_image_set_get_correctness); tcase_add_test (tc_chain, test_image_buffer); tcase_add_test (tc_chain, test_image_from_file); tcase_add_test (tc_chain, test_image_dispose_while_loading); tcase_add_test (tc_chain, test_image_small_image); tcase_add_test (tc_chain, test_image_from_drawable); tcase_add_test (tc_chain, test_image_from_drawable_fail); tcase_add_test (tc_chain, test_image_to_drawable); tcase_add_test (tc_chain, test_image_to_drawable_fail); return s; } GST_CHECK_MAIN (pgm_image); pigment-0.3.17/tests/check/pgm/pgmtext.c0000644000175000017500000002474011205034417015030 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment unit test for pgmtext.c * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include /* test default values */ PGM_START_TEST (test_text_default_values) { PgmError ret; PgmText *text; gchar *label; gchar *font_family; gfloat font_height; PgmTextEllipsize ellipsize; gboolean justify; PgmTextAlignment alignment; PgmTextWrap wrap; PgmTextGravity gravity; PgmTextStretch stretch; PgmTextStyle style; PgmTextVariant variant; PgmTextWeight weight; gfloat line_spacing; guchar red; guchar green; guchar blue; guchar alpha; gfloat outline_width; pgm_init (NULL, NULL); text = PGM_TEXT (pgm_text_new ("bla fasel")); ret = pgm_text_get_label (text, &label); fail_if (ret != PGM_ERROR_OK, "text_get_label error"); fail_if (strncmp (label, "bla fasel", 9), "bad default label"); ret = pgm_text_get_font_family (text, &font_family); fail_if (ret != PGM_ERROR_OK, "text_get_font_family error"); fail_if (strncmp (font_family, "Sans", 4), "bad default font-family"); ret = pgm_text_get_font_height (text, &font_height); fail_if (ret != PGM_ERROR_OK, "text_get_font_height error"); fail_if (font_height != 1.0f, "bad default height"); ret = pgm_text_get_ellipsize (text, &ellipsize); fail_if (ret != PGM_ERROR_OK, "text_get_ellipsize error"); fail_if (ellipsize != PGM_TEXT_ELLIPSIZE_NONE, "bad default ellipsize"); ret = pgm_text_get_justify (text, &justify); fail_if (ret != PGM_ERROR_OK, "text_get_justify error"); fail_if (justify != FALSE, "bad default justify"); ret = pgm_text_get_alignment (text, &alignment); fail_if (ret != PGM_ERROR_OK, "text_get_alignment error"); fail_if (alignment != PGM_TEXT_ALIGN_LEFT, "bad default alignment"); ret = pgm_text_get_wrap (text, &wrap); fail_if (ret != PGM_ERROR_OK, "text_get_wrap error"); fail_if (wrap != PGM_TEXT_WRAP_WORD, "bad default wrapping"); ret = pgm_text_get_gravity (text, &gravity); fail_if (ret != PGM_ERROR_OK, "text_get_gravity error"); fail_if (gravity != PGM_TEXT_GRAVITY_AUTO, "bad default gravity"); ret = pgm_text_get_stretch (text, &stretch); fail_if (ret != PGM_ERROR_OK, "text_get_stretch error"); fail_if (stretch != PGM_TEXT_STRETCH_NORMAL, "bad default stretch"); ret = pgm_text_get_style (text, &style); fail_if (ret != PGM_ERROR_OK, "text_get_style error"); fail_if (style != PGM_TEXT_STYLE_NORMAL, "bad default style"); ret = pgm_text_get_variant (text, &variant); fail_if (ret != PGM_ERROR_OK, "text_get_variant error"); fail_if (variant != PGM_TEXT_VARIANT_NORMAL, "bad default variant"); ret = pgm_text_get_weight (text, &weight); fail_if (ret != PGM_ERROR_OK, "text_get_weight error"); fail_if (weight != PGM_TEXT_WEIGHT_NORMAL, "bad default weight"); ret = pgm_text_get_line_spacing (text, &line_spacing); fail_if (ret != PGM_ERROR_OK, "text_get_line_spacing error"); fail_if (line_spacing != 0.0f, "bad default line-spacing"); ret = pgm_text_get_outline_color (text, &red, &green, &blue, &alpha); fail_if (ret != PGM_ERROR_OK, "text_get_outline_color error"); fail_if (red != 0, "bad default outline-color (red)"); fail_if (green != 0, "bad default outline-color (green)"); fail_if (blue != 0, "bad default outline-color (blue)"); fail_if (alpha != 0, "bad default outline-color (alpha)"); ret = pgm_text_get_outline_width (text, &outline_width); fail_if (ret != PGM_ERROR_OK, "text_get_outline_width error"); fail_if (outline_width != 0.0f, "bad default outline-width"); gst_object_unref (GST_OBJECT_CAST (text)); pgm_deinit (); } PGM_END_TEST; /* test set/get correctness */ PGM_START_TEST (test_text_set_get_correctness) { PgmError ret; PgmText *text; const gchar *label = "unit test"; const gchar *markup = "unit test"; gchar *lbl = NULL; const gchar *font_family = "DejaVu Sans"; gchar *family = NULL; gfloat font_height; PgmTextEllipsize ellipsize; gboolean justify; PgmTextAlignment alignment; PgmTextWrap wrap; PgmTextGravity gravity; PgmTextStretch stretch; PgmTextStyle style; PgmTextVariant variant; PgmTextWeight weight; gfloat line_spacing; guchar red; guchar green; guchar blue; guchar alpha; gfloat width; pgm_init (NULL, NULL); text = PGM_TEXT (pgm_text_new ("unit test")); /* label */ ret = pgm_text_set_label (text, label); fail_if (ret != PGM_ERROR_OK, "text_set_label error"); ret = pgm_text_get_label (text, &lbl); fail_if (ret != PGM_ERROR_OK, "text_get_label error"); fail_if (strcmp (lbl, label), "label was wrong"); g_free (lbl); /* markup */ ret = pgm_text_set_markup (text, markup); fail_if (ret != PGM_ERROR_OK, "text_set_markup error"); ret = pgm_text_get_label (text, &lbl); fail_if (ret != PGM_ERROR_OK, "text_get_label error (markup)"); fail_if (strcmp (lbl, markup), "label was wrong (markup)"); g_free (lbl); /* font-family */ ret = pgm_text_set_font_family (text, font_family); fail_if (ret != PGM_ERROR_OK, "text_set_font_family error"); ret = pgm_text_get_font_family (text, &family); fail_if (ret != PGM_ERROR_OK, "text_get_font_family error"); fail_if (strcmp (family, font_family), "font-family was wrong"); g_free (family); /* font-height */ ret = pgm_text_set_font_height (text, 10.0f); fail_if (ret != PGM_ERROR_OK, "text_set_font_height error"); ret = pgm_text_get_font_height (text, &font_height); fail_if (ret != PGM_ERROR_OK, "text_get_font_height error"); fail_if (font_height != 10.0f, "font-height was wrong"); /* ellipsize */ ret = pgm_text_set_ellipsize (text, PGM_TEXT_ELLIPSIZE_END); fail_if (ret != PGM_ERROR_OK, "text_set_ellipsize error"); ret = pgm_text_get_ellipsize (text, &ellipsize); fail_if (ret != PGM_ERROR_OK, "text_get_ellipsize error"); fail_if (ellipsize != PGM_TEXT_ELLIPSIZE_END, "ellipsize was wrong"); /* justify */ ret = pgm_text_set_justify (text, FALSE); fail_if (ret != PGM_ERROR_OK, "text_set_justify error"); ret = pgm_text_get_justify (text, &justify); fail_if (ret != PGM_ERROR_OK, "text_get_justify error"); fail_if (justify != FALSE, "justify was wrong"); /* alignment */ ret = pgm_text_set_alignment (text, PGM_TEXT_ALIGN_CENTER); fail_if (ret != PGM_ERROR_OK, "text_set_alignment error"); ret = pgm_text_get_alignment (text, &alignment); fail_if (ret != PGM_ERROR_OK, "text_get_alignment error"); fail_if (alignment != PGM_TEXT_ALIGN_CENTER, "alignment was wrong"); /* wrapping */ ret = pgm_text_set_wrap (text, PGM_TEXT_WRAP_WORD_CHAR); fail_if (ret != PGM_ERROR_OK, "text_set_wrap error"); ret = pgm_text_get_wrap (text, &wrap); fail_if (ret != PGM_ERROR_OK, "text_get_wrap error"); fail_if (wrap != PGM_TEXT_WRAP_WORD_CHAR, "wrap was wrong"); /* gravity */ ret = pgm_text_set_gravity (text, PGM_TEXT_GRAVITY_WEST); fail_if (ret != PGM_ERROR_OK, "text_set_gravity error"); ret = pgm_text_get_gravity (text, &gravity); fail_if (ret != PGM_ERROR_OK, "text_get_gravity error"); fail_if (gravity != PGM_TEXT_GRAVITY_WEST, "gravity was wrong"); /* stretch */ ret = pgm_text_set_stretch (text, PGM_TEXT_STRETCH_EXPANDED); fail_if (ret != PGM_ERROR_OK, "text_set_stretch error"); ret = pgm_text_get_stretch (text, &stretch); fail_if (ret != PGM_ERROR_OK, "text_get_stretch error"); fail_if (stretch != PGM_TEXT_STRETCH_EXPANDED, "stretch was wrong"); /* style */ ret = pgm_text_set_style (text, PGM_TEXT_STYLE_ITALIC); fail_if (ret != PGM_ERROR_OK, "text_set_style error"); ret = pgm_text_get_style (text, &style); fail_if (ret != PGM_ERROR_OK, "text_get_style error"); fail_if (style != PGM_TEXT_STYLE_ITALIC, "style was wrong"); /* variant */ ret = pgm_text_set_variant (text, PGM_TEXT_VARIANT_SMALL_CAPS); fail_if (ret != PGM_ERROR_OK, "text_set_variant error"); ret = pgm_text_get_variant (text, &variant); fail_if (ret != PGM_ERROR_OK, "text_get_style error"); fail_if (variant != PGM_TEXT_VARIANT_SMALL_CAPS, "variant was wrong"); /* weight */ ret = pgm_text_set_weight (text, PGM_TEXT_WEIGHT_BOLD); fail_if (ret != PGM_ERROR_OK, "text_set_weight error"); ret = pgm_text_get_weight (text, &weight); fail_if (ret != PGM_ERROR_OK, "text_get_weight error"); fail_if (weight != PGM_TEXT_WEIGHT_BOLD, "weight was wrong"); /* line-spacing */ ret = pgm_text_set_line_spacing (text, 15.0f); fail_if (ret != PGM_ERROR_OK, "text_set_line_spacing error"); ret = pgm_text_get_line_spacing (text, &line_spacing); fail_if (ret != PGM_ERROR_OK, "text_get_line_spacing error"); fail_if (line_spacing != 15.0f, "line-spacing was wrong"); /* outline-color */ ret = pgm_text_set_outline_color (text, 64, 128, 255, 128); fail_if (ret != PGM_ERROR_OK, "text_set_outline_color error"); ret = pgm_text_get_outline_color (text, &red, &green, &blue, &alpha); fail_if (ret != PGM_ERROR_OK, "text_get_outline_color error"); fail_if (red != 64, "outline-color (red) was wrong"); fail_if (green != 128, "outline-color (green) was wrong"); fail_if (blue != 255, "outline-color (blue) was wrong"); fail_if (alpha != 128, "outline-color (alpha) was wrong"); /* width */ ret = pgm_text_set_outline_width (text, 3.45f); fail_if (ret != PGM_ERROR_OK, "text_set_outline_width error"); ret = pgm_text_get_outline_width (text, &width); fail_if (ret != PGM_ERROR_OK, "text_get_outline_width error"); fail_if (width != 3.45f, "outline-width was wrong"); gst_object_unref (GST_OBJECT_CAST (text)); pgm_deinit (); } PGM_END_TEST; Suite * pgm_text_suite (void) { Suite *s = suite_create ("PgmText"); TCase *tc_chain = tcase_create ("pgmtext tests"); suite_add_tcase (s, tc_chain); tcase_add_test (tc_chain, test_text_default_values); tcase_add_test (tc_chain, test_text_set_get_correctness); return s; } GST_CHECK_MAIN (pgm_text); pigment-0.3.17/tests/check/pgm/Makefile.in0000644000175000017500000007066211205034674015252 00000000000000# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/common/check.mak \ $(top_srcdir)/tests/check/common/common-tests.am @GST_GCOV_ENABLED_TRUE@am__append_1 = $(GCOV_CFLAGS) @GST_GCOV_ENABLED_TRUE@am__append_2 = $(GCOV_LIBS) check_PROGRAMS = pgm$(EXEEXT) pgmcanvas$(EXEEXT) pgmdrawable$(EXEEXT) \ pgmimage$(EXEEXT) pgmtext$(EXEEXT) pgmlinearalgebra$(EXEEXT) subdir = tests/check/pgm ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/as-compiler-flag.m4 \ $(top_srcdir)/common/m4/as-version.m4 \ $(top_srcdir)/common/m4/check.m4 \ $(top_srcdir)/common/m4/gst-args.m4 \ $(top_srcdir)/common/m4/gst-check.m4 \ $(top_srcdir)/common/m4/gst-error.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/libtool.m4 \ $(top_srcdir)/common/m4/ltoptions.m4 \ $(top_srcdir)/common/m4/ltsugar.m4 \ $(top_srcdir)/common/m4/ltversion.m4 \ $(top_srcdir)/common/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = pgm_SOURCES = pgm.c pgm_OBJECTS = pgm.$(OBJEXT) pgm_LDADD = $(LDADD) am__DEPENDENCIES_1 = @GST_GCOV_ENABLED_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) pgm_DEPENDENCIES = $(top_builddir)/pgm/libpigment-@PGM_MAJORMINOR@.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(top_builddir)/tests/check/common/libpgmcheck.a \ $(am__DEPENDENCIES_2) pgmcanvas_SOURCES = pgmcanvas.c pgmcanvas_OBJECTS = pgmcanvas.$(OBJEXT) pgmcanvas_LDADD = $(LDADD) pgmcanvas_DEPENDENCIES = \ $(top_builddir)/pgm/libpigment-@PGM_MAJORMINOR@.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(top_builddir)/tests/check/common/libpgmcheck.a \ $(am__DEPENDENCIES_2) pgmdrawable_SOURCES = pgmdrawable.c pgmdrawable_OBJECTS = pgmdrawable.$(OBJEXT) pgmdrawable_LDADD = $(LDADD) pgmdrawable_DEPENDENCIES = \ $(top_builddir)/pgm/libpigment-@PGM_MAJORMINOR@.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(top_builddir)/tests/check/common/libpgmcheck.a \ $(am__DEPENDENCIES_2) pgmimage_SOURCES = pgmimage.c pgmimage_OBJECTS = pgmimage.$(OBJEXT) pgmimage_LDADD = $(LDADD) pgmimage_DEPENDENCIES = \ $(top_builddir)/pgm/libpigment-@PGM_MAJORMINOR@.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(top_builddir)/tests/check/common/libpgmcheck.a \ $(am__DEPENDENCIES_2) pgmlinearalgebra_SOURCES = pgmlinearalgebra.c pgmlinearalgebra_OBJECTS = pgmlinearalgebra.$(OBJEXT) pgmlinearalgebra_LDADD = $(LDADD) pgmlinearalgebra_DEPENDENCIES = \ $(top_builddir)/pgm/libpigment-@PGM_MAJORMINOR@.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(top_builddir)/tests/check/common/libpgmcheck.a \ $(am__DEPENDENCIES_2) pgmtext_SOURCES = pgmtext.c pgmtext_OBJECTS = pgmtext.$(OBJEXT) pgmtext_LDADD = $(LDADD) pgmtext_DEPENDENCIES = \ $(top_builddir)/pgm/libpigment-@PGM_MAJORMINOR@.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(top_builddir)/tests/check/common/libpgmcheck.a \ $(am__DEPENDENCIES_2) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = pgm.c pgmcanvas.c pgmdrawable.c pgmimage.c \ pgmlinearalgebra.c pgmtext.c DIST_SOURCES = pgm.c pgmcanvas.c pgmdrawable.c pgmimage.c \ pgmlinearalgebra.c pgmtext.c HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAIROXLIB_CFLAGS = @CAIROXLIB_CFLAGS@ CAIROXLIB_LIBS = @CAIROXLIB_LIBS@ CAIRO_CFLAGS = @CAIRO_CFLAGS@ CAIRO_LIBS = @CAIRO_LIBS@ CC = @CC@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXEEXT = @EXEEXT@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ GCOV = @GCOV@ GCOV_CFLAGS = @GCOV_CFLAGS@ GCOV_LIBS = @GCOV_LIBS@ GDKPIXBUFXLIB_CFLAGS = @GDKPIXBUFXLIB_CFLAGS@ GDKPIXBUFXLIB_LIBS = @GDKPIXBUFXLIB_LIBS@ GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@ GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ GST_0_10_13_CFLAGS = @GST_0_10_13_CFLAGS@ GST_0_10_13_LIBS = @GST_0_10_13_LIBS@ GST_10_10_CFLAGS = @GST_10_10_CFLAGS@ GST_10_10_LIBS = @GST_10_10_LIBS@ GST_10_11_CFLAGS = @GST_10_11_CFLAGS@ GST_10_11_LIBS = @GST_10_11_LIBS@ GST_10_12_CFLAGS = @GST_10_12_CFLAGS@ GST_10_12_LIBS = @GST_10_12_LIBS@ GST_10_13_CFLAGS = @GST_10_13_CFLAGS@ GST_10_13_LIBS = @GST_10_13_LIBS@ GST_10_14_CFLAGS = @GST_10_14_CFLAGS@ GST_10_14_LIBS = @GST_10_14_LIBS@ GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ GST_BASE_LIBS = @GST_BASE_LIBS@ GST_CFLAGS = @GST_CFLAGS@ GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ GST_CHECK_LIBS = @GST_CHECK_LIBS@ GST_LIBS = @GST_LIBS@ GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ GST_TOOLS_DIR = @GST_TOOLS_DIR@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_GTK_WIDGET = @HAVE_GTK_WIDGET@ HAVE_IMAGING_LIBRARY = @HAVE_IMAGING_LIBRARY@ HAVE_OPENGLES_PLUGIN = @HAVE_OPENGLES_PLUGIN@ HAVE_OPENGL_PLUGIN = @HAVE_OPENGL_PLUGIN@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGLADE_2_0_CFLAGS = @LIBGLADE_2_0_CFLAGS@ LIBGLADE_2_0_LIBS = @LIBGLADE_2_0_LIBS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENGLES_BACKEND = @OPENGLES_BACKEND@ OPENGL_BACKEND = @OPENGL_BACKEND@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ PANGOCAIRO_CFLAGS = @PANGOCAIRO_CFLAGS@ PANGOCAIRO_LIBS = @PANGOCAIRO_LIBS@ PANGO_1_16_CFLAGS = @PANGO_1_16_CFLAGS@ PANGO_1_16_LIBS = @PANGO_1_16_LIBS@ PANGO_CFLAGS = @PANGO_CFLAGS@ PANGO_LIBS = @PANGO_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL_PATH = @PERL_PATH@ PGM_ALL_CFLAGS = @PGM_ALL_CFLAGS@ PGM_ALL_LDFLAGS = @PGM_ALL_LDFLAGS@ PGM_ALL_LIBS = @PGM_ALL_LIBS@ PGM_GLES_CFLAGS = @PGM_GLES_CFLAGS@ PGM_GLES_LIBS = @PGM_GLES_LIBS@ PGM_GL_CFLAGS = @PGM_GL_CFLAGS@ PGM_GL_LIBS = @PGM_GL_LIBS@ PGM_GTKDOC_CFLAGS = @PGM_GTKDOC_CFLAGS@ PGM_LIB_LDFLAGS = @PGM_LIB_LDFLAGS@ PGM_LT_LDFLAGS = @PGM_LT_LDFLAGS@ PGM_LT_VERSION = @PGM_LT_VERSION@ PGM_MAJORMINOR = @PGM_MAJORMINOR@ PGM_OBJ_CFLAGS = @PGM_OBJ_CFLAGS@ PGM_OBJ_LIBS = @PGM_OBJ_LIBS@ PGM_OPTION_CFLAGS = @PGM_OPTION_CFLAGS@ PGM_PLUGIN_LDFLAGS = @PGM_PLUGIN_LDFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PLUGIN_PATH = @PLUGIN_PATH@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XCOMPOSITE_CFLAGS = @XCOMPOSITE_CFLAGS@ XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ XMKMF = @XMKMF@ XRENDER_CFLAGS = @XRENDER_CFLAGS@ XRENDER_LIBS = @XRENDER_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cairo_req = @cairo_req@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ glib_req = @glib_req@ gstreamer_plugins_base_req = @gstreamer_plugins_base_req@ gstreamer_req = @gstreamer_req@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pango_req = @pango_req@ pangocairo_req = @pangocairo_req@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ LOOPS = 10 # inspect every plugin feature GST_INSPECT = $(GST_TOOLS_DIR)/gst-inspect-$(GST_MAJORMINOR) TESTS_ENVIRONMENT = \ PGM_PLUGIN_PATH=$(top_builddir)/plugins plugindir = $(libdir)/pigment-@PGM_MAJORMINOR@ # the core dumps of some machines have PIDs appended CLEANFILES = core core.* *.gcno *.gcda SUPPRESSIONS = $(top_srcdir)/common/gst.supp TESTS = $(check_PROGRAMS) noinst_HEADERS = AM_CFLAGS = -I$(top_srcdir) -I$(top_builddir)/pgm $(GST_CFLAGS) \ $(CHECK_CFLAGS) $(GDKPIXBUF_CFLAGS) $(am__append_1) LDADD = $(top_builddir)/pgm/libpigment-@PGM_MAJORMINOR@.la \ $(GST_CHECK_LIBS) $(GST_LIBS) $(CHECK_LIBS) $(GDKPIXBUF_LIBS) \ $(top_builddir)/tests/check/common/libpgmcheck.a \ $(am__append_2) # valgrind testing # these just need valgrind fixing, period VALGRIND_TO_FIX = VALGRIND_IGNORE = # these need fixing because the threads cause segfaults under valgrind TESTS_THREADED = VALGRIND_TESTS_DISABLE = \ $(TESTS_THREADED) \ $(VALGRIND_IGNORE) \ $(VALGRIND_TO_FIX) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/tests/check/common/common-tests.am $(top_srcdir)/common/check.mak $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/check/pgm/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/check/pgm/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done pgm$(EXEEXT): $(pgm_OBJECTS) $(pgm_DEPENDENCIES) @rm -f pgm$(EXEEXT) $(LINK) $(pgm_OBJECTS) $(pgm_LDADD) $(LIBS) pgmcanvas$(EXEEXT): $(pgmcanvas_OBJECTS) $(pgmcanvas_DEPENDENCIES) @rm -f pgmcanvas$(EXEEXT) $(LINK) $(pgmcanvas_OBJECTS) $(pgmcanvas_LDADD) $(LIBS) pgmdrawable$(EXEEXT): $(pgmdrawable_OBJECTS) $(pgmdrawable_DEPENDENCIES) @rm -f pgmdrawable$(EXEEXT) $(LINK) $(pgmdrawable_OBJECTS) $(pgmdrawable_LDADD) $(LIBS) pgmimage$(EXEEXT): $(pgmimage_OBJECTS) $(pgmimage_DEPENDENCIES) @rm -f pgmimage$(EXEEXT) $(LINK) $(pgmimage_OBJECTS) $(pgmimage_LDADD) $(LIBS) pgmlinearalgebra$(EXEEXT): $(pgmlinearalgebra_OBJECTS) $(pgmlinearalgebra_DEPENDENCIES) @rm -f pgmlinearalgebra$(EXEEXT) $(LINK) $(pgmlinearalgebra_OBJECTS) $(pgmlinearalgebra_LDADD) $(LIBS) pgmtext$(EXEEXT): $(pgmtext_OBJECTS) $(pgmtext_DEPENDENCIES) @rm -f pgmtext$(EXEEXT) $(LINK) $(pgmtext_OBJECTS) $(pgmtext_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pgm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pgmcanvas.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pgmdrawable.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pgmimage.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pgmlinearalgebra.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pgmtext.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ echo "XPASS: $$tst"; \ ;; \ *) \ echo "PASS: $$tst"; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ echo "XFAIL: $$tst"; \ ;; \ *) \ failed=`expr $$failed + 1`; \ echo "FAIL: $$tst"; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ echo "SKIP: $$tst"; \ fi; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ echo "$$dashes"; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-checkPROGRAMS clean-generic clean-libtool clean-local \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ clean-checkPROGRAMS clean-generic clean-libtool clean-local \ ctags distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am clean-local-check: for i in `find . -name ".libs" -type d`; do \ rm -rf $$i; \ done # hangs spectacularly on some machines, so let's not do this by default yet @HAVE_VALGRIND_TRUE@check-valgrind: @HAVE_VALGRIND_TRUE@ make valgrind @HAVE_VALGRIND_FALSE@check-valgrind: @HAVE_VALGRIND_FALSE@ @true # run any given test by running make test.check # if the test fails, run it again at at least debug level 2 %.check: % @$(TESTS_ENVIRONMENT) \ CK_DEFAULT_TIMEOUT=20 \ $* || \ $(TESTS_ENVIRONMENT) \ GST_DEBUG=$$GST_DEBUG,*:2 \ CK_DEFAULT_TIMEOUT=20 \ $* # run any given test in a loop %.torture: % @for i in `seq 1 $(LOOPS)`; do \ $(TESTS_ENVIRONMENT) \ CK_DEFAULT_TIMEOUT=20 \ $*; done # run any given test in an infinite loop %.forever: % @while true; do \ $(TESTS_ENVIRONMENT) \ CK_DEFAULT_TIMEOUT=20 \ $* || break; done # valgrind any given test by running make test.valgrind %.valgrind: % $(TESTS_ENVIRONMENT) \ CK_DEFAULT_TIMEOUT=360 \ G_SLICE=always-malloc \ libtool --mode=execute \ $(VALGRIND_PATH) -q \ $(foreach s,$(SUPPRESSIONS),--suppressions=$(s)) \ --tool=memcheck --leak-check=full --trace-children=yes \ --leak-resolution=high --num-callers=20 \ ./$* 2>&1 | tee valgrind.log @if grep "==" valgrind.log > /dev/null 2>&1; then \ rm valgrind.log; \ exit 1; \ fi @rm valgrind.log # valgrind any given test and generate suppressions for it %.valgrind.gen-suppressions: % $(TESTS_ENVIRONMENT) \ CK_DEFAULT_TIMEOUT=60 \ libtool --mode=execute \ $(VALGRIND_PATH) -q \ $(foreach s,$(SUPPRESSIONS),--suppressions=$(s)) \ --tool=memcheck --leak-check=full --trace-children=yes \ --leak-resolution=high --num-callers=20 \ --gen-suppressions=all \ ./$* 2>&1 | tee suppressions.log # valgrind any given test until failure by running make test.valgrind-forever %.valgrind-forever: % @while make $*.valgrind; do \ true; done # gdb any given test by running make test.gdb %.gdb: % $(TESTS_ENVIRONMENT) \ CK_FORK=no \ libtool --mode=execute \ gdb $* # torture tests torture: $(TESTS) -rm test-registry.xml @echo "Torturing tests ..." for i in `seq 1 $(LOOPS)`; do \ make check || \ (echo "Failure after $$i runs"; exit 1) || \ exit 1; \ done @banner="All $(LOOPS) loops passed"; \ dashes=`echo "$$banner" | sed s/./=/g`; \ echo $$dashes; echo $$banner; echo $$dashes # forever tests forever: $(TESTS) -rm test-registry.xml @echo "Forever tests ..." while true; do \ make check || \ (echo "Failure"; exit 1) || \ exit 1; \ done # valgrind all tests valgrind: $(TESTS) @echo "Valgrinding tests ..." @failed=0; \ for t in $(filter-out $(VALGRIND_TESTS_DISABLE),$(TESTS)); do \ make $$t.valgrind; \ if test "$$?" -ne 0; then \ echo "Valgrind error for test $$t"; \ failed=`expr $$failed + 1`; \ whicht="$$whicht $$t"; \ fi; \ done; \ if test "$$failed" -ne 0; then \ echo "$$failed tests had leaks or errors under valgrind:"; \ echo "$$whicht"; \ false; \ fi inspect: @echo "Inspecting features ..." for e in `$(TESTS_ENVIRONMENT) $(GST_INSPECT) | head -n -2 \ | cut -d: -f2`; \ do echo Inspecting $$e; \ $(GST_INSPECT) $$e > /dev/null 2>&1; done help: @echo "make check -- run all checks" @echo "make torture -- run all checks $(LOOPS) times" @echo "make (dir)/(test).check -- run the given check once" @echo "make (dir)/(test).forever -- run the given check forever" @echo "make (dir)/(test).torture -- run the given check $(LOOPS) times" @echo @echo "make (dir)/(test).gdb -- start up gdb for the given test" @echo @echo "make valgrind -- valgrind all tests" @echo "make (dir)/(test).valgrind -- valgrind the given test" @echo "make (dir)/(test).valgrind-forever -- valgrind the given test forever" @echo "make (dir)/(test).valgrind.gen-suppressions -- generate suppressions" @echo " and save to suppressions.log" @echo "make inspect -- inspect all plugin features" # override to _not_ install the test plugins install-pluginLTLIBRARIES: clean-local: clean-local-check # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pigment-0.3.17/tests/check/pgm/pgmcanvas.c0000644000175000017500000006475211205034417015326 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment unit test for pgmcanvas.c * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * FIXME: pgm_canvas_regenerate */ #include #include /* test drawable floating reference on canvas_add/del_* */ PGM_START_TEST (test_canvas_add_del_drawable) { PgmError ret; PgmCanvas *canvas; PgmDrawable *drawable; canvas = pgm_canvas_new (); /* create a new floating drawable with refcount 1 */ drawable = pgm_image_new (); ASSERT_OBJECT_REFCOUNT (drawable, "drawable", 1); fail_unless (GST_OBJECT_IS_FLOATING (drawable), "drawable object is not floating at creation"); /* ref it for ourselves */ gst_object_ref (GST_OBJECT (drawable)); ASSERT_OBJECT_REFCOUNT (drawable, "drawable", 2); /* adding it in the canvas sinks the drawable */ ret = pgm_canvas_add (canvas, PGM_DRAWABLE_NEAR, drawable); fail_if (ret != PGM_ERROR_OK, "canvas_add error"); ASSERT_OBJECT_REFCOUNT (drawable, "drawable", 2); fail_if (GST_OBJECT_IS_FLOATING (drawable), "drawable object still floating after being added to the canvas"); /* removing it reduces the refcount */ ret = pgm_canvas_remove (canvas, drawable); fail_if (ret != PGM_ERROR_OK, "canvas_del error"); ASSERT_OBJECT_REFCOUNT (drawable, "drawable", 1); /* clean up our own reference */ gst_object_unref (GST_OBJECT_CAST (drawable)); gst_object_unref (GST_OBJECT_CAST (canvas)); } PGM_END_TEST PGM_START_TEST (test_canvas_add_del_many) { PgmCanvas *canvas = NULL; PgmDrawable *drawables[10] = {0}; guint i = 0; canvas = pgm_canvas_new (); fail_if (NULL == canvas, "canvas creation failed"); for (i=0; i<10; i++) { drawables[i] = pgm_image_new (); } ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_canvas_add_many (NULL, PGM_DRAWABLE_MIDDLE, drawables[0], drawables[1], drawables[2], NULL)); ASSERT_PGM_SUCCESS (pgm_canvas_add_many (canvas, PGM_DRAWABLE_MIDDLE, NULL)); ASSERT_PGM_SUCCESS (pgm_canvas_add_many (canvas, PGM_DRAWABLE_MIDDLE, drawables[0], drawables[1], drawables[2], drawables[3], drawables[4], drawables[5], drawables[6], drawables[7], drawables[8], drawables[9], NULL)); ASSERT_PGM_ERROR_WITH_CRITICAL (pgm_canvas_remove_many (NULL, drawables[0], NULL)); ASSERT_PGM_SUCCESS (pgm_canvas_remove_many (canvas, NULL)); /* check that the preceding call to remove_many did not remove anything */ for (i=0; i<10; i++) { ASSERT_OBJECT_REFCOUNT (drawables[i], "drawables", 1); } ASSERT_PGM_SUCCESS (pgm_canvas_remove_many (canvas, drawables[0], drawables[1], drawables[2], drawables[3], drawables[4], drawables[5], drawables[6], drawables[7], drawables[8], drawables[9], NULL)); gst_object_unref (canvas); } PGM_END_TEST /* test drawable floating reference on canvas unref */ PGM_START_TEST (test_canvas_add_drawable_unref_object) { PgmError ret; PgmCanvas *canvas; PgmDrawable *drawable; canvas = pgm_canvas_new (); /* create a new floating drawable with refcount 1 */ drawable = pgm_image_new (); ASSERT_OBJECT_REFCOUNT (drawable, "drawable", 1); fail_unless (GST_OBJECT_IS_FLOATING (drawable), "drawable object is not floating at creation"); /* ref it for ourselves */ gst_object_ref (GST_OBJECT (drawable)); ASSERT_OBJECT_REFCOUNT (drawable, "drawable", 2); /* adding it in the canvas sinks the drawable */ ret = pgm_canvas_add (canvas, PGM_DRAWABLE_NEAR, drawable); fail_if (ret != PGM_ERROR_OK, "canvas_add_drawable error"); ASSERT_OBJECT_REFCOUNT (drawable, "drawable", 2); fail_if (GST_OBJECT_IS_FLOATING (drawable), "drawable object still floating after being added to the canvas"); /* unreffing the canvas should clean it up */ gst_object_unref (GST_OBJECT (canvas)); ASSERT_OBJECT_REFCOUNT (drawable, "drawable", 1); /* clean up our own reference */ gst_object_unref (GST_OBJECT_CAST (drawable)); } PGM_END_TEST /* test insertion of z-ordered drawables */ PGM_START_TEST (test_canvas_z_ordered_insertion) { PgmCanvas *canvas = NULL; PgmDrawable *img1, *img2, *img3, *img4, *img5; gboolean success; PgmDrawableLayer layer; gint count; gint order; PgmError ret; canvas = pgm_canvas_new (); img1 = pgm_image_new (); pgm_drawable_set_position (img1, 0.0f, 0.0f, 0.0f); img2 = pgm_image_new (); pgm_drawable_set_position (img2, 0.0f, 0.0f, 1.0f); img3 = pgm_image_new (); pgm_drawable_set_position (img3, 0.0f, 0.0f, 2.0f); img4 = pgm_image_new (); pgm_drawable_set_position (img4, 0.0f, 0.0f, 3.0f); img5 = pgm_image_new (); pgm_drawable_set_position (img5, 0.0f, 0.0f, 4.0f); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, img1); ret = pgm_canvas_get_layer_count (canvas, PGM_DRAWABLE_MIDDLE, &count); fail_if (count != 1, "bad layer count"); ret = pgm_canvas_get_order (canvas, img1, &layer, &order); fail_if (ret != PGM_ERROR_OK, "canvas_get_order error"); fail_if (layer != PGM_DRAWABLE_MIDDLE, "bad drawable layer"); fail_if (order != 0, "bad drawable order"); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, img2); ret = pgm_canvas_get_layer_count (canvas, PGM_DRAWABLE_MIDDLE, &count); fail_if (ret != PGM_ERROR_OK, "canvas_get_layer error"); fail_if (count != 2, "bad layer count"); ret = pgm_canvas_get_order (canvas, img1, &layer, &order); fail_if (ret != PGM_ERROR_OK, "canvas_get_order error"); fail_if (layer != PGM_DRAWABLE_MIDDLE, "bad drawable layer"); fail_if (order != 0, "bad drawable order"); ret = pgm_canvas_get_order (canvas, img2, &layer, &order); fail_if (ret != PGM_ERROR_OK, "canvas_get_order error"); fail_if (layer != PGM_DRAWABLE_MIDDLE, "bad drawable layer"); fail_if (order != 1, "bad drawable order"); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, img3); ret = pgm_canvas_get_layer_count (canvas, PGM_DRAWABLE_MIDDLE, &count); fail_if (ret != PGM_ERROR_OK, "canvas_get_layer error"); fail_if (count != 3, "bad layer count"); ret = pgm_canvas_get_order (canvas, img1, &layer, &order); fail_if (ret != PGM_ERROR_OK, "canvas_get_order error"); fail_if (layer != PGM_DRAWABLE_MIDDLE, "bad drawable layer"); fail_if (order != 0, "bad drawable order"); ret = pgm_canvas_get_order (canvas, img2, &layer, &order); fail_if (ret != PGM_ERROR_OK, "canvas_get_order error"); fail_if (layer != PGM_DRAWABLE_MIDDLE, "bad drawable layer"); fail_if (order != 1, "bad drawable order"); ret = pgm_canvas_get_order (canvas, img3, &layer, &order); fail_if (ret != PGM_ERROR_OK, "canvas_get_order error"); fail_if (layer != PGM_DRAWABLE_MIDDLE, "bad drawable layer"); fail_if (order != 2, "bad drawable order"); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, img4); ret = pgm_canvas_get_layer_count (canvas, PGM_DRAWABLE_MIDDLE, &count); fail_if (ret != PGM_ERROR_OK, "canvas_get_layer error"); fail_if (count != 4, "bad layer count"); ret = pgm_canvas_get_order (canvas, img1, &layer, &order); fail_if (ret != PGM_ERROR_OK, "canvas_get_order error"); fail_if (layer != PGM_DRAWABLE_MIDDLE, "bad drawable layer"); fail_if (order != 0, "bad drawable order"); ret = pgm_canvas_get_order (canvas, img2, &layer, &order); fail_if (ret != PGM_ERROR_OK, "canvas_get_order error"); fail_if (layer != PGM_DRAWABLE_MIDDLE, "bad drawable layer"); fail_if (order != 1, "bad drawable order"); ret = pgm_canvas_get_order (canvas, img3, &layer, &order); fail_if (ret != PGM_ERROR_OK, "canvas_get_order error"); fail_if (layer != PGM_DRAWABLE_MIDDLE, "bad drawable layer"); fail_if (order != 2, "bad drawable order"); ret = pgm_canvas_get_order (canvas, img4, &layer, &order); fail_if (ret != PGM_ERROR_OK, "canvas_get_order error"); fail_if (layer != PGM_DRAWABLE_MIDDLE, "bad drawable layer"); fail_if (order != 3, "bad drawable order"); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, img5); ret = pgm_canvas_get_layer_count (canvas, PGM_DRAWABLE_MIDDLE, &count); fail_if (ret != PGM_ERROR_OK, "canvas_get_layer error"); fail_if (count != 5, "bad layer count"); ret = pgm_canvas_get_order (canvas, img1, &layer, &order); fail_if (ret != PGM_ERROR_OK, "canvas_get_order error"); fail_if (layer != PGM_DRAWABLE_MIDDLE, "bad drawable layer"); fail_if (order != 0, "bad drawable order"); ret = pgm_canvas_get_order (canvas, img2, &layer, &order); fail_if (ret != PGM_ERROR_OK, "canvas_get_order error"); fail_if (layer != PGM_DRAWABLE_MIDDLE, "bad drawable layer"); fail_if (order != 1, "bad drawable order"); ret = pgm_canvas_get_order (canvas, img3, &layer, &order); fail_if (ret != PGM_ERROR_OK, "canvas_get_order error"); fail_if (layer != PGM_DRAWABLE_MIDDLE, "bad drawable layer"); fail_if (order != 2, "bad drawable order"); ret = pgm_canvas_get_order (canvas, img4, &layer, &order); fail_if (ret != PGM_ERROR_OK, "canvas_get_order error"); fail_if (layer != PGM_DRAWABLE_MIDDLE, "bad drawable layer"); fail_if (order != 3, "bad drawable order"); ret = pgm_canvas_get_order (canvas, img5, &layer, &order); fail_if (ret != PGM_ERROR_OK, "canvas_get_order error"); fail_if (layer != PGM_DRAWABLE_MIDDLE, "bad drawable layer"); fail_if (order != 4, "bad drawable order"); gst_object_unref (GST_OBJECT_CAST (canvas)); } PGM_END_TEST /* test insertion of z-misordered drawables */ PGM_START_TEST (test_canvas_z_misordered_insertion) { PgmCanvas *canvas = NULL; PgmDrawable *img1, *img2, *img3, *img4, *img5; gboolean success; PgmDrawableLayer layer; gint count; gint order; PgmError ret; canvas = pgm_canvas_new (); img1 = pgm_image_new (); pgm_drawable_set_position (img1, 0.0f, 0.0f, 1.0f); img2 = pgm_image_new (); pgm_drawable_set_position (img2, 0.0f, 0.0f, 3.0f); img3 = pgm_image_new (); pgm_drawable_set_position (img3, 0.0f, 0.0f, 2.0f); img4 = pgm_image_new (); pgm_drawable_set_position (img4, 0.0f, 0.0f, 0.0f); img5 = pgm_image_new (); pgm_drawable_set_position (img5, 0.0f, 0.0f, 4.0f); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, img1); ret = pgm_canvas_get_layer_count (canvas, PGM_DRAWABLE_MIDDLE, &count); fail_if (count != 1, "bad layer count"); ret = pgm_canvas_get_order (canvas, img1, &layer, &order); fail_if (ret != PGM_ERROR_OK, "canvas_get_order error"); fail_if (layer != PGM_DRAWABLE_MIDDLE, "bad drawable layer"); fail_if (order != 0, "bad drawable order"); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, img2); ret = pgm_canvas_get_layer_count (canvas, PGM_DRAWABLE_MIDDLE, &count); fail_if (ret != PGM_ERROR_OK, "canvas_get_layer error"); fail_if (count != 2, "bad layer count"); ret = pgm_canvas_get_order (canvas, img1, &layer, &order); fail_if (ret != PGM_ERROR_OK, "canvas_get_order error"); fail_if (layer != PGM_DRAWABLE_MIDDLE, "bad drawable layer"); fail_if (order != 0, "bad drawable order"); ret = pgm_canvas_get_order (canvas, img2, &layer, &order); fail_if (ret != PGM_ERROR_OK, "canvas_get_order error"); fail_if (layer != PGM_DRAWABLE_MIDDLE, "bad drawable layer"); fail_if (order != 1, "bad drawable order"); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, img3); ret = pgm_canvas_get_layer_count (canvas, PGM_DRAWABLE_MIDDLE, &count); fail_if (ret != PGM_ERROR_OK, "canvas_get_layer error"); fail_if (count != 3, "bad layer count"); ret = pgm_canvas_get_order (canvas, img1, &layer, &order); fail_if (ret != PGM_ERROR_OK, "canvas_get_order error"); fail_if (layer != PGM_DRAWABLE_MIDDLE, "bad drawable layer"); fail_if (order != 0, "bad drawable order"); ret = pgm_canvas_get_order (canvas, img2, &layer, &order); fail_if (ret != PGM_ERROR_OK, "canvas_get_order error"); fail_if (layer != PGM_DRAWABLE_MIDDLE, "bad drawable layer"); fail_if (order != 2, "bad drawable order"); ret = pgm_canvas_get_order (canvas, img3, &layer, &order); fail_if (ret != PGM_ERROR_OK, "canvas_get_order error"); fail_if (layer != PGM_DRAWABLE_MIDDLE, "bad drawable layer"); fail_if (order != 1, "bad drawable order"); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, img4); ret = pgm_canvas_get_layer_count (canvas, PGM_DRAWABLE_MIDDLE, &count); fail_if (ret != PGM_ERROR_OK, "canvas_get_layer error"); fail_if (count != 4, "bad layer count"); ret = pgm_canvas_get_order (canvas, img1, &layer, &order); fail_if (ret != PGM_ERROR_OK, "canvas_get_order error"); fail_if (layer != PGM_DRAWABLE_MIDDLE, "bad drawable layer"); fail_if (order != 1, "bad drawable order"); ret = pgm_canvas_get_order (canvas, img2, &layer, &order); fail_if (ret != PGM_ERROR_OK, "canvas_get_order error"); fail_if (layer != PGM_DRAWABLE_MIDDLE, "bad drawable layer"); fail_if (order != 3, "bad drawable order"); ret = pgm_canvas_get_order (canvas, img3, &layer, &order); fail_if (ret != PGM_ERROR_OK, "canvas_get_order error"); fail_if (layer != PGM_DRAWABLE_MIDDLE, "bad drawable layer"); fail_if (order != 2, "bad drawable order"); ret = pgm_canvas_get_order (canvas, img4, &layer, &order); fail_if (ret != PGM_ERROR_OK, "canvas_get_order error"); fail_if (layer != PGM_DRAWABLE_MIDDLE, "bad drawable layer"); fail_if (order != 0, "bad drawable order"); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, img5); ret = pgm_canvas_get_layer_count (canvas, PGM_DRAWABLE_MIDDLE, &count); fail_if (ret != PGM_ERROR_OK, "canvas_get_layer error"); fail_if (count != 5, "bad layer count"); ret = pgm_canvas_get_order (canvas, img1, &layer, &order); fail_if (ret != PGM_ERROR_OK, "canvas_get_order error"); fail_if (layer != PGM_DRAWABLE_MIDDLE, "bad drawable layer"); fail_if (order != 1, "bad drawable order"); ret = pgm_canvas_get_order (canvas, img2, &layer, &order); fail_if (ret != PGM_ERROR_OK, "canvas_get_order error"); fail_if (layer != PGM_DRAWABLE_MIDDLE, "bad drawable layer"); fail_if (order != 3, "bad drawable order"); ret = pgm_canvas_get_order (canvas, img3, &layer, &order); fail_if (ret != PGM_ERROR_OK, "canvas_get_order error"); fail_if (layer != PGM_DRAWABLE_MIDDLE, "bad drawable layer"); fail_if (order != 2, "bad drawable order"); ret = pgm_canvas_get_order (canvas, img4, &layer, &order); fail_if (ret != PGM_ERROR_OK, "canvas_get_order error"); fail_if (layer != PGM_DRAWABLE_MIDDLE, "bad drawable layer"); fail_if (order != 0, "bad drawable order"); ret = pgm_canvas_get_order (canvas, img5, &layer, &order); fail_if (ret != PGM_ERROR_OK, "canvas_get_order error"); fail_if (layer != PGM_DRAWABLE_MIDDLE, "bad drawable layer"); fail_if (order != 4, "bad drawable order"); gst_object_unref (GST_OBJECT_CAST (canvas)); } PGM_END_TEST /* test insertion of a drawable in a layer having drawables with the * same z-position */ PGM_START_TEST (test_canvas_add_with_same_z_position) { PgmCanvas *canvas = NULL; PgmDrawable *img1, *img2, *img3, *img4, *img5; gboolean success; PgmDrawableLayer layer; gint order; canvas = pgm_canvas_new (); img1 = pgm_image_new (); pgm_drawable_set_position (img1, 0.0f, 0.0f, 0.0f); img2 = pgm_image_new (); pgm_drawable_set_position (img2, 0.0f, 0.0f, 1.0f); img3 = pgm_image_new (); pgm_drawable_set_position (img3, 0.0f, 0.0f, 1.0f); img4 = pgm_image_new (); pgm_drawable_set_position (img4, 0.0f, 0.0f, 1.0f); img5 = pgm_image_new (); pgm_drawable_set_position (img5, 0.0f, 0.0f, 2.0f); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, img1); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, img2); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, img3); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, img5); /* The order should be 3 after the other drawables with a z-position * of 1.Of */ pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, img4); pgm_canvas_get_order (canvas, img4, &layer, &order); fail_if (order != 3, "bad drawable order"); gst_object_unref (GST_OBJECT_CAST (canvas)); } PGM_END_TEST /* test canvas reordering */ PGM_START_TEST (test_canvas_reordering) { PgmCanvas *canvas = NULL; PgmDrawable *img1, *img2, *img3, *img4, *img5, *img6, *img7, *img8; gboolean success; PgmError ret; PgmDrawableLayer layer; gint order; canvas = pgm_canvas_new (); img1 = pgm_image_new (); pgm_drawable_set_position (img1, 0.0f, 0.0f, 0.0f); img2 = pgm_image_new (); pgm_drawable_set_position (img2, 0.0f, 0.0f, 1.0f); img3 = pgm_image_new (); pgm_drawable_set_position (img3, 0.0f, 0.0f, 2.0f); img4 = pgm_image_new (); pgm_drawable_set_position (img4, 0.0f, 0.0f, 2.0f); img5 = pgm_image_new (); pgm_drawable_set_position (img5, 0.0f, 0.0f, 2.0f); img6 = pgm_image_new (); pgm_drawable_set_position (img6, 0.0f, 0.0f, 3.0f); img7 = pgm_image_new (); pgm_drawable_set_position (img7, 0.0f, 0.0f, 4.0f); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, img1); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, img2); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, img3); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, img4); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, img5); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, img6); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, img7); /* Test different z */ pgm_canvas_set_order (canvas, img6, 1); pgm_canvas_get_order (canvas, img6, &layer, &order); fail_if (order != 5, "drawable order should have not changed"); /* Test same position */ pgm_canvas_set_order (canvas, img6, 5); pgm_canvas_get_order (canvas, img6, &layer, &order); fail_if (order != 5, "drawable order should have not changed"); /* Test out of bound order */ ret = pgm_canvas_set_order (canvas, img6, 10); fail_if (ret != PGM_ERROR_X, "setting an outbound order should return an " "error"); pgm_canvas_get_order (canvas, img6, &layer, &order); fail_if (order != 5, "drawable order should have not changed"); /* Test unbinded drawable */ img8 = pgm_image_new (); ret = pgm_canvas_set_order (canvas, img8, 2); fail_if (ret != PGM_ERROR_X, "setting order with an unbinded drawable " "should return an error"); gst_object_unref (img8); /* Put the last drawable with z=2 at the beginning */ pgm_canvas_set_order (canvas, img5, 2); pgm_canvas_get_order (canvas, img5, &layer, &order); fail_if (order != 2, "drawable order should be 2"); pgm_canvas_get_order (canvas, img3, &layer, &order); fail_if (order != 3, "drawable order should be 3"); pgm_canvas_get_order (canvas, img4, &layer, &order); fail_if (order != 4, "drawable order should be 4"); /* Put the first drawable with z=2 at the end */ pgm_canvas_set_order (canvas, img5, 4); pgm_canvas_get_order (canvas, img5, &layer, &order); fail_if (order != 4, "drawable order should be 4"); pgm_canvas_get_order (canvas, img3, &layer, &order); fail_if (order != 2, "drawable order should be 2"); pgm_canvas_get_order (canvas, img4, &layer, &order); fail_if (order != 3, "drawable order should be 3"); /* Remove drawables with z-position different than 2, to test reordering * at beginning and end of the list */ pgm_canvas_remove (canvas, img1); pgm_canvas_remove (canvas, img2); pgm_canvas_remove (canvas, img6); pgm_canvas_remove (canvas, img7); /* Test correct ordering after remove operations */ pgm_canvas_get_order (canvas, img3, &layer, &order); fail_if (order != 0, "drawable order should be 2"); pgm_canvas_get_order (canvas, img4, &layer, &order); fail_if (order != 1, "drawable order should be 3"); pgm_canvas_get_order (canvas, img5, &layer, &order); fail_if (order != 2, "drawable order should be 4"); /* Put the last drawable at the beginning */ pgm_canvas_set_order (canvas, img5, 0); pgm_canvas_get_order (canvas, img5, &layer, &order); fail_if (order != 0, "drawable order should be 0"); pgm_canvas_get_order (canvas, img3, &layer, &order); fail_if (order != 1, "drawable order should be 1"); pgm_canvas_get_order (canvas, img4, &layer, &order); fail_if (order != 2, "drawable order should be 2"); /* Put the first drawable at the end */ pgm_canvas_set_order (canvas, img5, 2); pgm_canvas_get_order (canvas, img5, &layer, &order); fail_if (order != 2, "drawable order should be 2"); pgm_canvas_get_order (canvas, img3, &layer, &order); fail_if (order != 0, "drawable order should be 0"); pgm_canvas_get_order (canvas, img4, &layer, &order); fail_if (order != 1, "drawable order should be 1"); gst_object_unref (GST_OBJECT_CAST (canvas)); } PGM_END_TEST /* test canvas reordering */ PGM_START_TEST (test_canvas_z_reordering) { PgmCanvas *canvas = NULL; PgmDrawable *img1, *img2, *img3, *img4, *img5; gboolean success; PgmError ret; PgmDrawableLayer layer; gint order; canvas = pgm_canvas_new (); img1 = pgm_image_new (); pgm_drawable_set_position (img1, 0.0f, 0.0f, 0.0f); img2 = pgm_image_new (); pgm_drawable_set_position (img2, 0.0f, 0.0f, 2.0f); img3 = pgm_image_new (); pgm_drawable_set_position (img3, 0.0f, 0.0f, 2.0f); img4 = pgm_image_new (); pgm_drawable_set_position (img4, 0.0f, 0.0f, 4.0f); img5 = pgm_image_new (); pgm_drawable_set_position (img5, 0.0f, 0.0f, 6.0f); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, img1); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, img2); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, img3); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, img4); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, img5); /* Change the z-position to put img5 at order 0 */ pgm_drawable_set_position (img5, 0.0f, 0.0f, -1.0f); pgm_canvas_get_order (canvas, img5, &layer, &order); fail_if (order != 0, "drawable order should be 0"); pgm_canvas_get_order (canvas, img1, &layer, &order); fail_if (order != 1, "drawable order should be 1"); pgm_canvas_get_order (canvas, img2, &layer, &order); fail_if (order != 2, "drawable order should be 2"); pgm_canvas_get_order (canvas, img3, &layer, &order); fail_if (order != 3, "drawable order should be 3"); pgm_canvas_get_order (canvas, img4, &layer, &order); fail_if (order != 4, "drawable order should be 4"); /* Change the z-position to put img5 at order 4 */ pgm_drawable_set_position (img5, 0.0f, 0.0f, 6.0f); pgm_canvas_get_order (canvas, img1, &layer, &order); fail_if (order != 0, "drawable order should be 0"); pgm_canvas_get_order (canvas, img2, &layer, &order); fail_if (order != 1, "drawable order should be 1"); pgm_canvas_get_order (canvas, img3, &layer, &order); fail_if (order != 2, "drawable order should be 2"); pgm_canvas_get_order (canvas, img4, &layer, &order); fail_if (order != 3, "drawable order should be 3"); pgm_canvas_get_order (canvas, img5, &layer, &order); fail_if (order != 4, "drawable order should be 4"); /* Change the z-position to put img5 at order 3 */ pgm_drawable_set_position (img5, 0.0f, 0.0f, 2.0f); pgm_canvas_get_order (canvas, img1, &layer, &order); fail_if (order != 0, "drawable order should be 0"); pgm_canvas_get_order (canvas, img2, &layer, &order); fail_if (order != 1, "drawable order should be 1"); pgm_canvas_get_order (canvas, img3, &layer, &order); fail_if (order != 2, "drawable order should be 2"); pgm_canvas_get_order (canvas, img5, &layer, &order); fail_if (order != 3, "drawable order should be 3"); pgm_canvas_get_order (canvas, img4, &layer, &order); fail_if (order != 4, "drawable order should be 4"); gst_object_unref (GST_OBJECT_CAST (canvas)); } PGM_END_TEST /* test default values */ PGM_START_TEST (test_canvas_default_values) { PgmCanvas *canvas; PgmError ret; gboolean success; gfloat width, height; canvas = pgm_canvas_new (); /* size */ ret = pgm_canvas_get_size (canvas, &width, &height); fail_if (ret != PGM_ERROR_OK, "canvas_get_size error"); fail_if (width != 4.0f || height != 3.0f, "bad default size"); gst_object_unref (GST_OBJECT_CAST (canvas)); } PGM_END_TEST; /* test set/get correctness */ PGM_START_TEST (test_canvas_set_get_correctness) { PgmCanvas *canvas; PgmError ret; gboolean success; gfloat width, height; canvas = pgm_canvas_new (); /* size */ ret = pgm_canvas_set_size (canvas, 16.0f, 9.0f); fail_if (ret != PGM_ERROR_OK, "canvas_set_size error"); ret = pgm_canvas_get_size (canvas, &width, &height); fail_if (ret != PGM_ERROR_OK, "canvas_get_size error"); fail_if (width != 16.0f || height != 9.0f, "size not set"); gst_object_unref (GST_OBJECT_CAST (canvas)); } PGM_END_TEST Suite * pgm_canvas_suite (void) { Suite *s = suite_create ("PgmCanvas"); TCase *tc_chain = tcase_create ("pgmcanvas tests"); PGM_USE_STANDARD_FIXTURES (tc_chain); suite_add_tcase (s, tc_chain); tcase_add_test (tc_chain, test_canvas_add_del_drawable); tcase_add_test (tc_chain, test_canvas_add_del_many); tcase_add_test (tc_chain, test_canvas_add_drawable_unref_object); tcase_add_test (tc_chain, test_canvas_z_ordered_insertion); tcase_add_test (tc_chain, test_canvas_z_misordered_insertion); tcase_add_test (tc_chain, test_canvas_add_with_same_z_position); tcase_add_test (tc_chain, test_canvas_reordering); tcase_add_test (tc_chain, test_canvas_z_reordering); tcase_add_test (tc_chain, test_canvas_default_values); tcase_add_test (tc_chain, test_canvas_set_get_correctness); return s; } GST_CHECK_MAIN (pgm_canvas); pigment-0.3.17/tests/check/common/0000777000175000017500000000000011205035135013754 500000000000000pigment-0.3.17/tests/check/common/pgmcheck.h0000644000175000017500000001172511205034417015632 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment unit test base * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __PGM_CHECK_H__ #define __PGM_CHECK_H__ #include void pgm_check_standard_init (void); void pgm_check_standard_shutdown (void); #define PGM_USE_STANDARD_FIXTURES(test_case) \ do{ \ tcase_add_checked_fixture (test_case, pgm_check_standard_init, \ pgm_check_standard_shutdown); \ }while(0) /* FIXME: use some error description function here when there's one */ #define ASSERT_PGM_SUCCESS(code) \ G_STMT_START { \ PgmError ret = PGM_ERROR_OK; \ ret = (code); \ fail_unless (PGM_ERROR_OK == ret, "%s returned 0x%x " \ "instead of 0x%x (OK)\n", \ #code, ret, PGM_ERROR_OK); \ } G_STMT_END #define ASSERT_PGM_ERROR(code) \ G_STMT_START { \ PgmError ret = PGM_ERROR_OK; \ ret = (code); \ fail_unless (PGM_ERROR_OK != ret, "expected an error but %s " \ "returned 0x%x (OK) \n", \ #code, ret); \ } G_STMT_END /* Use this if code is expected to return an error and call g_warning (). */ #define ASSERT_PGM_ERROR_WITH_WARNING(code) \ G_STMT_START { \ PgmError ret = PGM_ERROR_OK; \ _gst_check_expecting_log = TRUE; \ _gst_check_raised_warning = FALSE; \ ret = (code); \ _fail_unless (_gst_check_raised_warning, __FILE__, __LINE__, \ "Expected g_warning, got nothing", NULL); \ _fail_unless (PGM_ERROR_OK != ret, __FILE__, __LINE__, \ "expected an error but %s returned 0x%x (OK) \n", #code, ret); \ _gst_check_expecting_log = FALSE; \ } G_STMT_END /* Use this if code is expected to return an error and call g_critical () (e.g. * through g_return_if_fail () and friends). */ #define ASSERT_PGM_ERROR_WITH_CRITICAL(code) \ G_STMT_START { \ PgmError ret = PGM_ERROR_OK; \ _gst_check_expecting_log = TRUE; \ _gst_check_raised_critical = FALSE; \ ret = (code); \ _fail_unless (_gst_check_raised_critical, __FILE__, __LINE__, \ "Expected g_critical, got nothing", NULL); \ _fail_unless (PGM_ERROR_OK != ret, __FILE__, __LINE__, \ "expected an error but %s returned 0x%x (OK) \n", #code, ret); \ _gst_check_expecting_log = FALSE; \ } G_STMT_END /* Internal use. */ gboolean _pgm_check_run_test_func (const gchar * func_name); #define PGM_START_TEST(test_name) \ GST_START_TEST (test_name) \ if (!_pgm_check_run_test_func (__func__)) \ return; #define PGM_END_TEST GST_END_TEST #define fail_unless_similar_float(a,b) \ fail_unless (ABS (a-b) < 0.000001f) #endif /* __PGM_CHECK_H__ */ pigment-0.3.17/tests/check/common/pgmcheck.c0000644000175000017500000000347711205034417015632 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment unit test base * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include "pgmcheck.h" #include /* FIXME: maybe we could/should add a fork+main loop here */ void pgm_check_standard_init (void) { pgm_init_check (NULL, NULL); } void pgm_check_standard_shutdown (void) { pgm_deinit (); } /* * returns TRUE if there is no PGM_CHECKS environment variable, or if it is a * comma-separated list containing func_name, FALSE otherwise. */ gboolean _pgm_check_run_test_func (const gchar * func_name) { const gchar *gst_checks; gboolean res = FALSE; gchar **funcs, **f; const gchar *pgm_checks = NULL; pgm_checks = g_getenv ("PGM_CHECKS"); /* no filter specified => run all checks */ if (pgm_checks == NULL || *pgm_checks == '\0') return TRUE; /* only run specified functions */ funcs = g_strsplit (pgm_checks, ",", -1); for (f = funcs; f != NULL && *f != NULL; ++f) { if (strcmp (*f, func_name) == 0) { res = TRUE; break; } } g_strfreev (funcs); return res; } pigment-0.3.17/tests/check/common/Makefile.am0000644000175000017500000000042011205034417015722 00000000000000check_LIBRARIES = libpgmcheck.a libpgmcheck_a_SOURCES = pgmcheck.c pgmcheck.h check-local: $(check_LIBRARIES) AM_CFLAGS = -I$(top_srcdir) -I$(top_builddir)/pgm $(GST_CFLAGS) $(CHECK_CFLAGS) $(GDKPIXBUF_CFLAGS) AM_CFLAGS += $(GCOV_CFLAGS) EXTRA_DIST = common-tests.am pigment-0.3.17/tests/check/common/common-tests.am0000644000175000017500000000210211205034417016634 00000000000000include $(top_srcdir)/common/check.mak TESTS_ENVIRONMENT = \ PGM_PLUGIN_PATH=$(top_builddir)/plugins plugindir = $(libdir)/pigment-@PGM_MAJORMINOR@ # override to _not_ install the test plugins install-pluginLTLIBRARIES: # the core dumps of some machines have PIDs appended CLEANFILES = core core.* *.gcno *.gcda SUPPRESSIONS = $(top_srcdir)/common/gst.supp clean-local: clean-local-check TESTS = $(check_PROGRAMS) noinst_HEADERS = AM_CFLAGS = -I$(top_srcdir) -I$(top_builddir)/pgm $(GST_CFLAGS) $(CHECK_CFLAGS) $(GDKPIXBUF_CFLAGS) LDADD = $(top_builddir)/pgm/libpigment-@PGM_MAJORMINOR@.la \ $(GST_CHECK_LIBS) \ $(GST_LIBS) \ $(CHECK_LIBS) \ $(GDKPIXBUF_LIBS) \ $(top_builddir)/tests/check/common/libpgmcheck.a if GST_GCOV_ENABLED AM_CFLAGS += $(GCOV_CFLAGS) LDADD += $(GCOV_LIBS) endif # valgrind testing # these just need valgrind fixing, period VALGRIND_TO_FIX = VALGRIND_IGNORE = # these need fixing because the threads cause segfaults under valgrind TESTS_THREADED = VALGRIND_TESTS_DISABLE = \ $(TESTS_THREADED) \ $(VALGRIND_IGNORE) \ $(VALGRIND_TO_FIX) pigment-0.3.17/tests/check/common/Makefile.in0000644000175000017500000004217011205034674015750 00000000000000# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/check/common DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/as-compiler-flag.m4 \ $(top_srcdir)/common/m4/as-version.m4 \ $(top_srcdir)/common/m4/check.m4 \ $(top_srcdir)/common/m4/gst-args.m4 \ $(top_srcdir)/common/m4/gst-check.m4 \ $(top_srcdir)/common/m4/gst-error.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/libtool.m4 \ $(top_srcdir)/common/m4/ltoptions.m4 \ $(top_srcdir)/common/m4/ltsugar.m4 \ $(top_srcdir)/common/m4/ltversion.m4 \ $(top_srcdir)/common/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = ARFLAGS = cru libpgmcheck_a_AR = $(AR) $(ARFLAGS) libpgmcheck_a_LIBADD = am_libpgmcheck_a_OBJECTS = pgmcheck.$(OBJEXT) libpgmcheck_a_OBJECTS = $(am_libpgmcheck_a_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libpgmcheck_a_SOURCES) DIST_SOURCES = $(libpgmcheck_a_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAIROXLIB_CFLAGS = @CAIROXLIB_CFLAGS@ CAIROXLIB_LIBS = @CAIROXLIB_LIBS@ CAIRO_CFLAGS = @CAIRO_CFLAGS@ CAIRO_LIBS = @CAIRO_LIBS@ CC = @CC@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXEEXT = @EXEEXT@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ GCOV = @GCOV@ GCOV_CFLAGS = @GCOV_CFLAGS@ GCOV_LIBS = @GCOV_LIBS@ GDKPIXBUFXLIB_CFLAGS = @GDKPIXBUFXLIB_CFLAGS@ GDKPIXBUFXLIB_LIBS = @GDKPIXBUFXLIB_LIBS@ GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@ GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ GST_0_10_13_CFLAGS = @GST_0_10_13_CFLAGS@ GST_0_10_13_LIBS = @GST_0_10_13_LIBS@ GST_10_10_CFLAGS = @GST_10_10_CFLAGS@ GST_10_10_LIBS = @GST_10_10_LIBS@ GST_10_11_CFLAGS = @GST_10_11_CFLAGS@ GST_10_11_LIBS = @GST_10_11_LIBS@ GST_10_12_CFLAGS = @GST_10_12_CFLAGS@ GST_10_12_LIBS = @GST_10_12_LIBS@ GST_10_13_CFLAGS = @GST_10_13_CFLAGS@ GST_10_13_LIBS = @GST_10_13_LIBS@ GST_10_14_CFLAGS = @GST_10_14_CFLAGS@ GST_10_14_LIBS = @GST_10_14_LIBS@ GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ GST_BASE_LIBS = @GST_BASE_LIBS@ GST_CFLAGS = @GST_CFLAGS@ GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ GST_CHECK_LIBS = @GST_CHECK_LIBS@ GST_LIBS = @GST_LIBS@ GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ GST_TOOLS_DIR = @GST_TOOLS_DIR@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_GTK_WIDGET = @HAVE_GTK_WIDGET@ HAVE_IMAGING_LIBRARY = @HAVE_IMAGING_LIBRARY@ HAVE_OPENGLES_PLUGIN = @HAVE_OPENGLES_PLUGIN@ HAVE_OPENGL_PLUGIN = @HAVE_OPENGL_PLUGIN@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGLADE_2_0_CFLAGS = @LIBGLADE_2_0_CFLAGS@ LIBGLADE_2_0_LIBS = @LIBGLADE_2_0_LIBS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENGLES_BACKEND = @OPENGLES_BACKEND@ OPENGL_BACKEND = @OPENGL_BACKEND@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ PANGOCAIRO_CFLAGS = @PANGOCAIRO_CFLAGS@ PANGOCAIRO_LIBS = @PANGOCAIRO_LIBS@ PANGO_1_16_CFLAGS = @PANGO_1_16_CFLAGS@ PANGO_1_16_LIBS = @PANGO_1_16_LIBS@ PANGO_CFLAGS = @PANGO_CFLAGS@ PANGO_LIBS = @PANGO_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL_PATH = @PERL_PATH@ PGM_ALL_CFLAGS = @PGM_ALL_CFLAGS@ PGM_ALL_LDFLAGS = @PGM_ALL_LDFLAGS@ PGM_ALL_LIBS = @PGM_ALL_LIBS@ PGM_GLES_CFLAGS = @PGM_GLES_CFLAGS@ PGM_GLES_LIBS = @PGM_GLES_LIBS@ PGM_GL_CFLAGS = @PGM_GL_CFLAGS@ PGM_GL_LIBS = @PGM_GL_LIBS@ PGM_GTKDOC_CFLAGS = @PGM_GTKDOC_CFLAGS@ PGM_LIB_LDFLAGS = @PGM_LIB_LDFLAGS@ PGM_LT_LDFLAGS = @PGM_LT_LDFLAGS@ PGM_LT_VERSION = @PGM_LT_VERSION@ PGM_MAJORMINOR = @PGM_MAJORMINOR@ PGM_OBJ_CFLAGS = @PGM_OBJ_CFLAGS@ PGM_OBJ_LIBS = @PGM_OBJ_LIBS@ PGM_OPTION_CFLAGS = @PGM_OPTION_CFLAGS@ PGM_PLUGIN_LDFLAGS = @PGM_PLUGIN_LDFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PLUGIN_PATH = @PLUGIN_PATH@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XCOMPOSITE_CFLAGS = @XCOMPOSITE_CFLAGS@ XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ XMKMF = @XMKMF@ XRENDER_CFLAGS = @XRENDER_CFLAGS@ XRENDER_LIBS = @XRENDER_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cairo_req = @cairo_req@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ glib_req = @glib_req@ gstreamer_plugins_base_req = @gstreamer_plugins_base_req@ gstreamer_req = @gstreamer_req@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pango_req = @pango_req@ pangocairo_req = @pangocairo_req@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ check_LIBRARIES = libpgmcheck.a libpgmcheck_a_SOURCES = pgmcheck.c pgmcheck.h AM_CFLAGS = -I$(top_srcdir) -I$(top_builddir)/pgm $(GST_CFLAGS) \ $(CHECK_CFLAGS) $(GDKPIXBUF_CFLAGS) $(GCOV_CFLAGS) EXTRA_DIST = common-tests.am all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/check/common/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/check/common/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-checkLIBRARIES: -test -z "$(check_LIBRARIES)" || rm -f $(check_LIBRARIES) libpgmcheck.a: $(libpgmcheck_a_OBJECTS) $(libpgmcheck_a_DEPENDENCIES) -rm -f libpgmcheck.a $(libpgmcheck_a_AR) libpgmcheck.a $(libpgmcheck_a_OBJECTS) $(libpgmcheck_a_LIBADD) $(RANLIB) libpgmcheck.a mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pgmcheck.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_LIBRARIES) $(MAKE) $(AM_MAKEFLAGS) check-local check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-checkLIBRARIES clean-generic clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am check-local clean \ clean-checkLIBRARIES clean-generic clean-libtool ctags \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am check-local: $(check_LIBRARIES) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pigment-0.3.17/tests/check/Makefile.in0000644000175000017500000004423611205034674014465 00000000000000# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/check DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/as-compiler-flag.m4 \ $(top_srcdir)/common/m4/as-version.m4 \ $(top_srcdir)/common/m4/check.m4 \ $(top_srcdir)/common/m4/gst-args.m4 \ $(top_srcdir)/common/m4/gst-check.m4 \ $(top_srcdir)/common/m4/gst-error.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/libtool.m4 \ $(top_srcdir)/common/m4/ltoptions.m4 \ $(top_srcdir)/common/m4/ltsugar.m4 \ $(top_srcdir)/common/m4/ltversion.m4 \ $(top_srcdir)/common/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAIROXLIB_CFLAGS = @CAIROXLIB_CFLAGS@ CAIROXLIB_LIBS = @CAIROXLIB_LIBS@ CAIRO_CFLAGS = @CAIRO_CFLAGS@ CAIRO_LIBS = @CAIRO_LIBS@ CC = @CC@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXEEXT = @EXEEXT@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ GCOV = @GCOV@ GCOV_CFLAGS = @GCOV_CFLAGS@ GCOV_LIBS = @GCOV_LIBS@ GDKPIXBUFXLIB_CFLAGS = @GDKPIXBUFXLIB_CFLAGS@ GDKPIXBUFXLIB_LIBS = @GDKPIXBUFXLIB_LIBS@ GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@ GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ GST_0_10_13_CFLAGS = @GST_0_10_13_CFLAGS@ GST_0_10_13_LIBS = @GST_0_10_13_LIBS@ GST_10_10_CFLAGS = @GST_10_10_CFLAGS@ GST_10_10_LIBS = @GST_10_10_LIBS@ GST_10_11_CFLAGS = @GST_10_11_CFLAGS@ GST_10_11_LIBS = @GST_10_11_LIBS@ GST_10_12_CFLAGS = @GST_10_12_CFLAGS@ GST_10_12_LIBS = @GST_10_12_LIBS@ GST_10_13_CFLAGS = @GST_10_13_CFLAGS@ GST_10_13_LIBS = @GST_10_13_LIBS@ GST_10_14_CFLAGS = @GST_10_14_CFLAGS@ GST_10_14_LIBS = @GST_10_14_LIBS@ GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ GST_BASE_LIBS = @GST_BASE_LIBS@ GST_CFLAGS = @GST_CFLAGS@ GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ GST_CHECK_LIBS = @GST_CHECK_LIBS@ GST_LIBS = @GST_LIBS@ GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ GST_TOOLS_DIR = @GST_TOOLS_DIR@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_GTK_WIDGET = @HAVE_GTK_WIDGET@ HAVE_IMAGING_LIBRARY = @HAVE_IMAGING_LIBRARY@ HAVE_OPENGLES_PLUGIN = @HAVE_OPENGLES_PLUGIN@ HAVE_OPENGL_PLUGIN = @HAVE_OPENGL_PLUGIN@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGLADE_2_0_CFLAGS = @LIBGLADE_2_0_CFLAGS@ LIBGLADE_2_0_LIBS = @LIBGLADE_2_0_LIBS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENGLES_BACKEND = @OPENGLES_BACKEND@ OPENGL_BACKEND = @OPENGL_BACKEND@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ PANGOCAIRO_CFLAGS = @PANGOCAIRO_CFLAGS@ PANGOCAIRO_LIBS = @PANGOCAIRO_LIBS@ PANGO_1_16_CFLAGS = @PANGO_1_16_CFLAGS@ PANGO_1_16_LIBS = @PANGO_1_16_LIBS@ PANGO_CFLAGS = @PANGO_CFLAGS@ PANGO_LIBS = @PANGO_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL_PATH = @PERL_PATH@ PGM_ALL_CFLAGS = @PGM_ALL_CFLAGS@ PGM_ALL_LDFLAGS = @PGM_ALL_LDFLAGS@ PGM_ALL_LIBS = @PGM_ALL_LIBS@ PGM_GLES_CFLAGS = @PGM_GLES_CFLAGS@ PGM_GLES_LIBS = @PGM_GLES_LIBS@ PGM_GL_CFLAGS = @PGM_GL_CFLAGS@ PGM_GL_LIBS = @PGM_GL_LIBS@ PGM_GTKDOC_CFLAGS = @PGM_GTKDOC_CFLAGS@ PGM_LIB_LDFLAGS = @PGM_LIB_LDFLAGS@ PGM_LT_LDFLAGS = @PGM_LT_LDFLAGS@ PGM_LT_VERSION = @PGM_LT_VERSION@ PGM_MAJORMINOR = @PGM_MAJORMINOR@ PGM_OBJ_CFLAGS = @PGM_OBJ_CFLAGS@ PGM_OBJ_LIBS = @PGM_OBJ_LIBS@ PGM_OPTION_CFLAGS = @PGM_OPTION_CFLAGS@ PGM_PLUGIN_LDFLAGS = @PGM_PLUGIN_LDFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PLUGIN_PATH = @PLUGIN_PATH@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XCOMPOSITE_CFLAGS = @XCOMPOSITE_CFLAGS@ XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ XMKMF = @XMKMF@ XRENDER_CFLAGS = @XRENDER_CFLAGS@ XRENDER_LIBS = @XRENDER_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cairo_req = @cairo_req@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ glib_req = @glib_req@ gstreamer_plugins_base_req = @gstreamer_plugins_base_req@ gstreamer_req = @gstreamer_req@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pango_req = @pango_req@ pangocairo_req = @pangocairo_req@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = common pgm plugins all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/check/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/check/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ am__remove_distdir=: \ am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-exec-am: install-html: install-html-recursive install-info: install-info-recursive install-man: install-pdf: install-pdf-recursive install-ps: install-ps-recursive installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ install-strip .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pigment-0.3.17/tests/Makefile.in0000644000175000017500000004756711205034674013422 00000000000000# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/as-compiler-flag.m4 \ $(top_srcdir)/common/m4/as-version.m4 \ $(top_srcdir)/common/m4/check.m4 \ $(top_srcdir)/common/m4/gst-args.m4 \ $(top_srcdir)/common/m4/gst-check.m4 \ $(top_srcdir)/common/m4/gst-error.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/libtool.m4 \ $(top_srcdir)/common/m4/ltoptions.m4 \ $(top_srcdir)/common/m4/ltsugar.m4 \ $(top_srcdir)/common/m4/ltversion.m4 \ $(top_srcdir)/common/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAIROXLIB_CFLAGS = @CAIROXLIB_CFLAGS@ CAIROXLIB_LIBS = @CAIROXLIB_LIBS@ CAIRO_CFLAGS = @CAIRO_CFLAGS@ CAIRO_LIBS = @CAIRO_LIBS@ CC = @CC@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXEEXT = @EXEEXT@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ GCOV = @GCOV@ GCOV_CFLAGS = @GCOV_CFLAGS@ GCOV_LIBS = @GCOV_LIBS@ GDKPIXBUFXLIB_CFLAGS = @GDKPIXBUFXLIB_CFLAGS@ GDKPIXBUFXLIB_LIBS = @GDKPIXBUFXLIB_LIBS@ GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@ GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ GST_0_10_13_CFLAGS = @GST_0_10_13_CFLAGS@ GST_0_10_13_LIBS = @GST_0_10_13_LIBS@ GST_10_10_CFLAGS = @GST_10_10_CFLAGS@ GST_10_10_LIBS = @GST_10_10_LIBS@ GST_10_11_CFLAGS = @GST_10_11_CFLAGS@ GST_10_11_LIBS = @GST_10_11_LIBS@ GST_10_12_CFLAGS = @GST_10_12_CFLAGS@ GST_10_12_LIBS = @GST_10_12_LIBS@ GST_10_13_CFLAGS = @GST_10_13_CFLAGS@ GST_10_13_LIBS = @GST_10_13_LIBS@ GST_10_14_CFLAGS = @GST_10_14_CFLAGS@ GST_10_14_LIBS = @GST_10_14_LIBS@ GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ GST_BASE_LIBS = @GST_BASE_LIBS@ GST_CFLAGS = @GST_CFLAGS@ GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ GST_CHECK_LIBS = @GST_CHECK_LIBS@ GST_LIBS = @GST_LIBS@ GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ GST_TOOLS_DIR = @GST_TOOLS_DIR@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_GTK_WIDGET = @HAVE_GTK_WIDGET@ HAVE_IMAGING_LIBRARY = @HAVE_IMAGING_LIBRARY@ HAVE_OPENGLES_PLUGIN = @HAVE_OPENGLES_PLUGIN@ HAVE_OPENGL_PLUGIN = @HAVE_OPENGL_PLUGIN@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGLADE_2_0_CFLAGS = @LIBGLADE_2_0_CFLAGS@ LIBGLADE_2_0_LIBS = @LIBGLADE_2_0_LIBS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENGLES_BACKEND = @OPENGLES_BACKEND@ OPENGL_BACKEND = @OPENGL_BACKEND@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ PANGOCAIRO_CFLAGS = @PANGOCAIRO_CFLAGS@ PANGOCAIRO_LIBS = @PANGOCAIRO_LIBS@ PANGO_1_16_CFLAGS = @PANGO_1_16_CFLAGS@ PANGO_1_16_LIBS = @PANGO_1_16_LIBS@ PANGO_CFLAGS = @PANGO_CFLAGS@ PANGO_LIBS = @PANGO_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL_PATH = @PERL_PATH@ PGM_ALL_CFLAGS = @PGM_ALL_CFLAGS@ PGM_ALL_LDFLAGS = @PGM_ALL_LDFLAGS@ PGM_ALL_LIBS = @PGM_ALL_LIBS@ PGM_GLES_CFLAGS = @PGM_GLES_CFLAGS@ PGM_GLES_LIBS = @PGM_GLES_LIBS@ PGM_GL_CFLAGS = @PGM_GL_CFLAGS@ PGM_GL_LIBS = @PGM_GL_LIBS@ PGM_GTKDOC_CFLAGS = @PGM_GTKDOC_CFLAGS@ PGM_LIB_LDFLAGS = @PGM_LIB_LDFLAGS@ PGM_LT_LDFLAGS = @PGM_LT_LDFLAGS@ PGM_LT_VERSION = @PGM_LT_VERSION@ PGM_MAJORMINOR = @PGM_MAJORMINOR@ PGM_OBJ_CFLAGS = @PGM_OBJ_CFLAGS@ PGM_OBJ_LIBS = @PGM_OBJ_LIBS@ PGM_OPTION_CFLAGS = @PGM_OPTION_CFLAGS@ PGM_PLUGIN_LDFLAGS = @PGM_PLUGIN_LDFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PLUGIN_PATH = @PLUGIN_PATH@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XCOMPOSITE_CFLAGS = @XCOMPOSITE_CFLAGS@ XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ XMKMF = @XMKMF@ XRENDER_CFLAGS = @XRENDER_CFLAGS@ XRENDER_LIBS = @XRENDER_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cairo_req = @cairo_req@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ glib_req = @glib_req@ gstreamer_plugins_base_req = @gstreamer_plugins_base_req@ gstreamer_req = @gstreamer_req@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pango_req = @pango_req@ pangocairo_req = @pangocairo_req@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = README SUBDIRS = check DIST_SUBDIRS = \ check \ interactive # coverage stuff COVERAGE_DIRS = \ pgm \ plugins/boilerplate \ plugins/opengl COVERAGE_FILES = $(foreach dir,$(COVERAGE_DIRS),$(wildcard $(top_builddir)/$(dir)/*.gcov)) COVERAGE_FILES_REL = $(subst $(top_builddir)/,,$(COVERAGE_FILES)) COVERAGE_OUT_FILES = $(foreach dir,$(COVERAGE_DIRS),$(wildcard $(top_builddir)/$(dir)/*.gcov.out)) COVERAGE_OUT_FILES_REL = $(subst $(top_builddir)/,,$(COVERAGE_OUT_FILES)) all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ am__remove_distdir=: \ am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-exec-am: install-html: install-html-recursive install-info: install-info-recursive install-man: install-pdf: install-pdf-recursive install-ps: install-ps-recursive installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ install-strip .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am check-interactive: make -C interactive/ check debug: echo $(COVERAGE_FILES) echo $(COVERAGE_FILES_REL) .PHONY: coverage @GST_GCOV_ENABLED_TRUE@coverage: @GST_GCOV_ENABLED_TRUE@ for file in `find $(top_builddir) -name '*.gcda'`; do rm $$file; done @GST_GCOV_ENABLED_TRUE@ make check @GST_GCOV_ENABLED_TRUE@ make coverage-report @GST_GCOV_ENABLED_FALSE@coverage: @GST_GCOV_ENABLED_FALSE@ echo "You need to configure with --enable-gcov to get coverage data" @GST_GCOV_ENABLED_FALSE@ exit 1 coverage-report: rm -rf coverage for dir in $(COVERAGE_DIRS); do \ mkdir -p coverage/$$dir; \ make -C $(top_builddir)/$$dir gcov; \ done for dir in $(COVERAGE_DIRS); do \ files="`ls $(top_builddir)/$$dir/*.gcov.out 2> /dev/null`"; \ if test ! -z "$$files"; then \ perl $(top_srcdir)/tests/tools/coverage/coverage-report.pl \ $(top_builddir)/$$dir/*.gcov.out > \ coverage/$$dir/index.xml; \ xsltproc $(top_srcdir)/tests/tools/coverage/coverage-report.xsl \ coverage/$$dir/index.xml > coverage/$$dir/index.html; \ fi; \ done for file in $(COVERAGE_FILES_REL); do \ echo Generating coverage/$$file.html; \ perl $(top_srcdir)/tests/tools/coverage/coverage-report-entry.pl \ $(top_builddir)/$$file > coverage/$$file.html; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pigment-0.3.17/NEWS0000644000175000017500000005361011205034420010661 00000000000000This is Pigment 0.3.17, "Black Mesa" (May 20, 2009) =================================================== Changes since 0.3.16: * Improved overall performance and memory usage. * Added support to cast shadows under texts. * Added support to align drawables to pixel boundaries. * Added support to retrieve the maximum texture size at runtime. * Highly improved the OpenGL ES 1.1 plugin. * Fixed GCC 4.4 and Sun Studio compilation warnings. Tickets fixed since 0.3.16: * 122 : BadMatch (invalid parameter attributes) on start of any pigment... * 134 : glXUseXFont generates sometimes a BadFont error * 151 : Crash at exit when OpenGL Viewport not disposed * 192 : pgm crash when updating quickly an image with cairo data, and w... * 193 : PNG exported from Inkscape are not loadable * 282 : Segfault at viewport creation * 296 : pigment-0.3.pc should depend on gdk-pixbuf-2.0 * 304 : CRASH libglib-2.0.dll!g_slist_foreach * 305 : CRASH libgobject-2.0.dll!g_type_check_instance_is_a * 308 : pigment crashes when freeing data * 310 : Regression tests failing on FreeBSD * 311 : Text shadow support * 312 : [Win32] Maximization problem * 314 : Support to get the maximum texture size of the plugin * 315 : Add rasterization grid alignment facilities * 317 : Memory leak in PgmGlDrawable * 318 : Memory leak in PgmImageSink * 319 : warnings in pigment * 320 : Deadlock at initialization on Windows 64 bits * 321 : error when building svn 1456 with gcc-4.4.0 API added since 0.3.16: * pgm_text_get_color() function * pgm_text_set_color() function * pgm_text_get_cast_shadow() function * pgm_text_set_cast_shadow() function * pgm_text_get_shadow_position() function * pgm_text_set_shadow_position() function * pgm_text_get_shadow_color() function * pgm_text_set_shadow_color() function * pgm_viewport_get_max_texture_size() function * pgm_canvas_get_pixel_offsets() function * pgm_drawable_get_grid_aligned() function * pgm_drawable_set_grid_aligned() function * PgmTextShadowPosition enum * PgmDrawableProperty::PGM_TEXT_COLOR enum field * PgmDrawableProperty::PGM_TEXT_CAST_SHADOW enum field * PgmDrawableProperty::PGM_TEXT_SHADOW_POSITION enum field * PgmDrawableProperty::PGM_TEXT_SHADOW_COLOR enum field * PgmCanvas::pixel_offset_x struct field * PgmCanvas::pixel_offset_y struct field * PgmDrawable::orig_x struct field * PgmDrawable::orig_y struct field * PgmDrawable::orig_width struct field * PgmDrawable::orig_height struct field * PgmDrawable::grid_aligned struct field This is Pigment 0.3.16, "Leviathan" (April 6, 2009) =================================================== Changes since 0.3.15: * Added multiline and monoline text modes. * Changed the meaning of the text font height so that it's now expressed in canvas coordinates. * Fixed a deadlock at viewport disposition. Tickets fixed since 0.3.15: * 309 : Deadlock with GLib 2.20 at exit API changed since 0.3.15: * pgm_text_get_multiline() function * pgm_text_set_multiline() function * PgmText::multiline struct field This is Pigment 0.3.15, "Storm" (March 12, 2009) ================================================ Changes since 0.3.14: * OpenGL ES 1.1 plugin support for GDL. * Minor bug fixes. Tickets fixed since 0.3.14: * #302 : the pkg-config definitions miss some things. * #303 : TypeError raised when using win32-message-event signal in Pytho... * #307 : Race condition in image loading API changed since 0.3.14: * PgmViewport::win32-message-event signal This is Pigment 0.3.14, "Jazz Brakes" (February 6, 2009) ======================================================== Changes since 0.3.13: * Added support to apply a scaling factor to drawables. * Added support to return a value to the WindowProc for Win32 messages. Tickets fixed since 0.3.13: * #294 : Crash when a PgmText has its size (width or height) set to 0 * #295 : Support for drawable scaling * #298 : "win32-message" signal doesn't handle WinProc LRESULT return va... * #299 : Support for Win32 multimedia keys * #300 : Monitor goes into standby API added since 0.3.13: * pgm_drawable_get_scale() function * pgm_drawable_set_scale() function API changed since 0.3.13: * PgmViewport::win32-message-event signal This is Pigment 0.3.13, "Herbs" (December 9, 2008) ================================================== Changes since 0.3.12: * Added support for drag-and-drop on Windows in the OpenGL plugin. * Fixed potential crash in the picking process. Tickets fixed since 0.3.12: * #289 : [Win32] Drag and drop support * #290 : Crash removing drawable from canvas in picking signals This is Pigment 0.3.12, "Armistice" (November 11, 2008) ======================================================= Changes since 0.3.11: * Improved rendering of text objects. Tickets fixed since 0.3.11: * #283 : pgm_canvas_get_order() does not return an error if used with a ... * #285 : Objects are displayed as a horizontal line (or smaller than the... * #287 : Texts not aligned to pixel boundaries This is Pigment 0.3.11, "Fallacy Method" (October 6, 2008) ========================================================== Changes since 0.3.10: * Added support to prevent rendering when the window is fully obscured or iconified. * Fixed compilation warnings generated by GCC 4.3. Tickets fixed since 0.3.10: * #279 : Pigment fails to compile with gcc 4.3 * #281 : Full CPU usage when the window is iconified This is Pigment 0.3.10, "Commando" (September 29, 2008) ======================================================= Changes since 0.3.9: * Improved video playback performance for Intel 945GM chipsets on windows. Tickets fixed since 0.3.9: * #280 : Slow video playback on Windows with Intel 945GM API added since 0.3.9: * PgmImageWrapping::PGM_IMAGE_TRANSPARENT enum field This is Pigment 0.3.9, "Prototry" (September 16, 2008) ====================================================== Changes since 0.3.8: * Added support to iconify and give focus to viewports. * Added support to track state changes on viewports. * Added fixes to the autotools build files. Tickets fixed since 0.3.8: * #277 : syntax error at configuring in Bash * #278 : Typo in configure.ac HAVE_IMAGING_LIBRARY=="no" API added since 0.3.8: * pgm_viewport_get_iconified() function * pgm_viewport_set_iconified() function * pgm_viewport_focus() function * PgmViewport::state-event signal * PgmEventType::PGM_STATE enum field * PgmViewportState enum * PgmEventState struct API removed since 0.3.8: * Removed PgmViewportClass::get_fullscreen virtual method. This is Pigment 0.3.8, "Large Hadron Collider" (September 10, 2008) =================================================================== Changes since 0.3.7: * Reduced memory comsumption of programs loading images from files. * Added a library dedicated to software image processing. * Deferred image loadings to dedicated thread(s). * Added support for infinite image scrolling effects. * Added support to anti-alias edges of images. Tickets fixed since 0.3.7: * #175 : Image decoding has to be done in dedicated thread(s) * #269 : Pigment build fails with internal linking problems when built w... * #271 : clicked signal emitted at the end of dragging * #273 : Add a drag distance threshold to cover before emitting 'drag-be... * #274 : Add cloning information signals to PgmImage * #275 : Pixbuf allocation must be freed after upload to video memory * #276 : Add a repeat image wrapping mode API added since 0.3.7: * pgm_imaging_linear_alpha_gradient() function * pgm_drawable_get_drag_distance() function * pgm_drawable_set_drag_distance() function * pgm_image_set_from_pixbuf() function * pgm_image_new_from_pixbuf() function * pgm_image_to_pixbuf() function * pgm_image_get_wrapping() function * pgm_image_set_wrapping() function * PgmImage::file-loaded signal * PgmImage::cloned signal * PgmImage::un-cloned signal * PgmImageStorageType::PGM_IMAGE_FILE enum field * PgmDrawableProperty::PGM_IMAGE_DATA_FILE struct field * PgmDrawableProperty::PGM_IMAGE_WRAPPING struct field * PgmImageWrapping enum * PgmImageFile struct API changed since 0.3.7: * Removed PgmImage::pixbuf-loaded signal This is Pigment 0.3.7, "Elecman" (July 28, 2008) ================================================ Changes since 0.3.6: * Added support to get Windows messages from the main loop. * Fixed unit test failing on 64 bits systems. Tickets fixed since 0.3.6: * #267 : Failure in make check's PgmImage suite * #270 : Documentation for "released" signal in Drawable posibly wrong API added since 0.3.6: * pgm_viewport_set_message_filter() function * pgm_viewport_get_message_filter() function * PgmViewport::win32-message-event signal * PgmEventType::PGM_WIN32_MESSAGE enum field * PgmEventWin32Message struct This is Pigment 0.3.6, "Niko Bellic" (July 11, 2008) ==================================================== Changes since 0.3.5: * Added an OpenGL ES-CM 1.1 plugin. * Added support for the GLX texture-from-pixmap extension. * Added support to rotate drawables. * Highly improved Windows support. * Added support to rotate and reflect a canvas. * Added support for pressure events coming from touchscreens. * Added motion, entered and left signals to drawables. * Added support for mouse navigation events in the GStreamer image sink to handle DVD menu elements for instance. * Added support to transform positions from/to viewport, canvas or image coordinate spaces. Tickets fixed since 0.3.5: * #8 : Spline interpolation * #63 : Hardware video overlay * #144 : Segfault while trying to open video * #145 : we can't use in pipeline drawable not added to a canvas * #178 : Enter/leave drawable signals * #208 : implicit animation leaks * #210 : examples on gutsy: `PGM_IS_VIEWPORT (viewport)' failed * #223 : Drawables "released" signal prototype inconsistency * #224 : [repository] The common/ external should be dropped * #235 : pigment locks when windows is out of screen * #239 : Bad error handling: exit(1) in main loop due to glXChooseFBConf... * #244 : support for GLX_EXT_texture_from_pixmap in OpenGL on X11 * #245 : Rotation and reflection of the canvas * #248 : C++ reserved keywords used as structure fields * #251 : Rotation support * #253 : User defined hook in the render thread prior to each rendering * #254 : Process deadlocks at closing on Windows * #255 : Motion, entered and left signals for drawables * #256 : Rotation of drawables are not handled for picking * #257 : Conversion fuctions between canvas, drawable and image spaces * #258 : PgmImageSink should send GstEvents on the pipeline for mouse mo... * #260 : [win32] the window is shown at creation * #262 : Mouse related signals are emitted even if opacity is 0 * #263 : [win32] no possibility to get the win32 windows handle from a p... * #264 : [win32] Fullscreen crashes with Intel chipsets/drivers API added since 0.3.5: * PgmViewportCapacity::PGM_VIEWPORT_TOUCHPAD enum field * PgmEventType::PGM_BUTTON_PRESSURE enum field * PgmEventMotion::pressure struct field * PgmEventButton::pressure struct field * PgmViewport::button-pressure-event signal * PgmDrawable::pressured signal * pgm_image_set_from_system_buffer() function * pgm_image_system_buffer_lock() function * pgm_image_system_buffer_unlock() function * PgmImageSystemBuffer struct * PgmImageStorageType::PGM_IMAGE_SYSTEM_BUFFER struct field * PgmDrawableProperty::PGM_IMAGE_DATA_SYSTEM_BUFFER struct field * PgmDrawableProperty::PGM_IMAGE_SYSTEM_BUFFER_CONTENT struct field * PgmViewportCapacity::PGM_VIEWPORT_X11_SYSTEM_BUFFER struct field * PgmViewportReflection struct * PgmViewportRotation struct * pgm_viewport_set_canvas_rotation() function * pgm_viewport_get_canvas_rotation() function * pgm_viewport_set_canvas_reflection() function * pgm_viewport_get_canvas_reflection() function * pgm_drawable_set_rotation_x() function * pgm_drawable_get_rotation_x() function * pgm_drawable_set_rotation_y() function * pgm_drawable_get_rotation_y() function * pgm_drawable_set_rotation_z() function * pgm_drawable_get_rotation_z() function * pgm_viewport_emit_update_pass() function * PgmViewport::update-pass signal * pgm_drawable_from_canvas() function * pgm_drawable_to_canvas() function * pgm_image_from_drawable() function * pgm_image_to_drawable() function * PgmImageSinkEventMask struct * PgmImageSink::events property * pgm_image_sink_set_events() function * pgm_image_sink_get_events() function API changed since 0.3.5: * PgmDrawable::pressed signal prototype * PgmDrawable::clicked signal prototype * PgmDrawable::drag-begin signal prototype * PgmDrawable::drag-motion signal prototype * PgmDrawable::released signal prototype * PgmViewport::delete-event signal prototype * Removed PgmEventDelete struct This is Pigment 0.3.5, "Jerakeen" (March 3, 2008) ================================================= Changes since 0.3.4: * Highly improved rendering performance of the OpenGL plugin. * Added support for drag and drop on the viewport. * Added support for Freedesktop startup notification in the OpenGL plugin. * Added support for changing the viewport opacity. * Fixed the Xlib/XCB dead lock. * Fixed focus traversal with the GTK+ widget. * Made the text font height proportional to the height of the drawable. Tickets fixed since 0.3.4: * #111 : Fancy fonts rendering with Mesa * #194 : XEmbed focus traversal problems * #214 : Viewport drag and drop support * #170 : Implement the freedesktop's startup notification specification * #176 : Crash with ATI radeon with no direct rendering * #204 : text font height resize support in Group * #215 : Support viewport clear color through the ARGB visuals * #228 : Update idle source output clutters the console output API added since 0.3.4: * pgm_viewport_get_opacity() * pgm_viewport_set_opacity() * pgm_viewport_get_frame_rate() * pgm_viewport_get_alpha_blending() * pgm_viewport_set_alpha_blending() * PgmViewportCapacity::PGM_VIEWPORT_OPACITY * PgmViewport::drag-motion-event signal * PgmViewport::drag-drop-event signal * PgmViewport::drag-leave-event signal * PgmViewport::set_drag_status virtual function * PgmEventType::PGM_DRAG_MOTION field * PgmEventType::PGM_DRAG_DROP field * PgmEventType::PGM_DRAG_LEAVE field * PgmEventDnd structure API changed since 0.3.4: * Removed PGM_VIEWPORT_HAS_CAPS() macro This is Pigment 0.3.4, "Ravenclaw" (January 23, 2008) ===================================================== Changes since 0.3.3: * Plugins can now only be loaded by the Pigment version it is compiled for. * Modified default plugin path including version number. * Added support for removing window decorations. API added since 0.3.3: * pgm_viewport_get_decorated * pgm_viewport_set_decorated API changed since 0.3.3: * PgmPluginDesc::version field * PGM_PLUGIN_DEFINE::version parameter This is Pigment 0.3.3, "Gryffindor" (January 16, 2008) ====================================================== Changes since 0.3.2: * Improved OpenGL plugin rendering performance * Added a GTK+ widget embedding viewport * Added automatic viewport update support * Highly improved linear algebra support * Added image loading from filenames instead of file descriptors * Added image mapping (texturing) matrix support * Added image border support * Added MSVC6 project files * Added Win32/WGL support to the OpenGL plugin * Split the Python binding from the core library * Added manual and interactive tests to check rendering correctness * Increased unit tests code coverage * Improved plugin loading/unloading Tickets fixed since 0.3.2: * #106 : Warnings at gtk-doc build * #123 : PgmImageSink doc should display GObject properties * #124 : ViewportFactory should be a Singleton * #132 : GStreamer logging * #139 : Win32 support * #141 : Font height is not respected * #160 : Build failing on rawhide and gutsy * #162 : Crash when deleting a master too fast * #163 : pigment crashes when I use as master an Image not in the canvas * #168 : Plugins are never properly unloaded * #173 : Add visual (and manual) user test suite * #179 : GTK+ widget * #180 : Support for coverage report * #181 : Updated test framework * #182 : Load an image from a filename * #184 : Viewport from and to canvas functions are erroneous * #185 : New tests and a few bugfixes * #187 : test makefile reorganisation * #188 : tests makefile reorganisation * #189 : core/plugin tests spearation * #190 : Scroll events on drawables * #191 : "button-release-event" not fired when mouse moves outside the v... * #195 : libpigment-gtk not in the documentation * #197 : FDs not freed after async file image loading is finished * #198 : Automatic viewport update * #199 : pgm.Image.set_from_file does not accept files smaller than 1024... * #200 : Occasional segfault when disposing a gl viewport * #203 : Convert linear algebra functions to boxed types * #205 : Texturing matrix manipulation API * #207 : Build failed: "array subscript is not an integer" * #209 : Image borders support * #211 : Python binding split * #213 : Pigment's python binding tends to segfault on x86_64 API added since 0.3.2: * PgmLinearAlgebra objects * PgmViewportCapacity::PGM_VIEWPORT_APPLICATION_EMBEDDING * PgmViewport::pixels-read signal * pgm_viewport_get_embedding_id() * pgm_viewport_read_pixels() * pgm_viewport_push_pixels() * PgmGtk object * pgm_gtk_new() * pgm_gtk_set_viewport() * pgm_gtk_get_viewport() * PgmDrawableProperty::PGM_IMAGE_DATA_PIXBUF * PgmDrawable::scrolled signal * pgm_drawable_regenerate() * PgmImage::pixbuf-loaded signal * PgmImageStorageType::PGM_IMAGE_DATA_PIXBUF * pgm_image_new_from_file() * pgm_image_set_from_file() * pgm_image_set_mapping_matrix() * pgm_image_get_mapping_matrix() * pgm_image_set_border_width() * pgm_image_get_border_width() * pgm_image_set_border_inner_color() * pgm_image_get_border_inner_color() * pgm_image_set_border_outer_color() * pgm_image_get_border_outer_color() * pgm_image_sink_new() * pgm_image_sink_set_image() * pgm_image_sink_get_image() * PgmCanvas::near_layer field * PgmCanvas::middle_layer field * PgmCanvas::far_layer field API changed since 0.3.2: * pgm_viewport_update() * PgmLinearAlgebra functions * Removed PgmImageStorageType::PGM_IMAGE_DATA_FD * Removed PgmImage::fd-loaded signal * Removed pgm_image_new_from_fd() * Removed pgm_image_set_from_fd() * Removed pgm_image_alloc_gst_buffer() * Removed PgmDrawableProperty::PGM_IMAGE_DATA_FD * PgmCanvas::near field * PgmCanvas::middle field * PgmCanvas::far field This is Pigment 0.3.2, "Golondrinas" (October 4, 2007) ====================================================== Changes since 0.3.1: * Highly improved performance * Added mouse picking support * Added many unit tests for memory and refcount checking * Generalized the 4x4 projection matrix for the plugins * Integrated a bunch of linear algebra functions * Added asynchronous image loading with pgm_image_set_from_fd() Tickets fixed since 0.3.1: * #150 : Disables doc install with doc build * #164 : leak fixing in pure python part (animation/group/widgets) + te... * #154 : crash on intel graphic card after a 12 or 13 hours * #165 : small memory leak in event handling * #38 : Enable flag for the compilation of C examples * #140 : Crashes on window's resize * #129 : Key modifiers support * #158 : overlay text over video lets pigment freeze * #153 : Performance degrades when a video is playing * #148 : Mouse support * #115 : Can't display a certain JPG file * #152 : Viewport should report if hardware acceleration is activated o... * #147 : rawhide buildslave fails make check API added since 0.3.1: * PgmLinearAlgebra module * PgmViewportCapacity::HARDWARE_ACCELERATION * pgm_viewport_update_projection() * pgm_viewport_from_canvas() * pgm_viewport_to_canvas() * pgm_image_get_storage_type_type() * PgmDrawable::pressed signal * PgmDrawable::released signal * PgmDrawable::clicked signal * PgmDrawable::double-clicked signal * PgmDrawable::drag-begin signal * PgmDrawable::drag-motion signal * PgmDrawable::drag-end signal * PgmEventKey::modifier field * PgmImage::fd-loaded signal * PgmModifierType API changed since 0.3.1: * Changed PgmButtonType constants * Removed PGM_VIEWPORT_CANVAS() macro pigment-0.3.17/gtk-doc.make0000644000175000017500000001364211150464527012370 00000000000000# -*- mode: makefile -*- #################################### # Everything below here is generic # #################################### if GTK_DOC_USE_LIBTOOL GTKDOC_CC = $(LIBTOOL) --mode=compile $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) GTKDOC_LD = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) GTKDOC_RUN = $(LIBTOOL) --mode=execute else GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) GTKDOC_RUN = sh -c endif # We set GPATH here; this gives us semantics for GNU make # which are more like other make's VPATH, when it comes to # whether a source that is a target of one rule is then # searched for in VPATH/GPATH. # GPATH = $(srcdir) TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE) EXTRA_DIST = \ $(content_files) \ $(HTML_IMAGES) \ $(DOC_MAIN_SGML_FILE) \ $(DOC_MODULE)-sections.txt \ $(DOC_MODULE)-overrides.txt DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \ $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp SCANOBJ_FILES = \ $(DOC_MODULE).args \ $(DOC_MODULE).hierarchy \ $(DOC_MODULE).interfaces \ $(DOC_MODULE).prerequisites \ $(DOC_MODULE).signals REPORT_FILES = \ $(DOC_MODULE)-undocumented.txt \ $(DOC_MODULE)-undeclared.txt \ $(DOC_MODULE)-unused.txt CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) if ENABLE_GTK_DOC all-local: html-build.stamp else all-local: endif docs: html-build.stamp $(REPORT_FILES): sgml-build.stamp #### scan #### scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) @echo 'gtk-doc: Scanning header files' @-chmod -R u+w $(srcdir) cd $(srcdir) && \ gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES) if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \ else \ cd $(srcdir) ; \ for i in $(SCANOBJ_FILES) ; do \ test -f $$i || touch $$i ; \ done \ fi touch scan-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp @true #### templates #### tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt @echo 'gtk-doc: Rebuilding template files' @-chmod -R u+w $(srcdir) cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS) touch tmpl-build.stamp tmpl.stamp: tmpl-build.stamp @true tmpl/*.sgml: @true #### xml #### sgml-build.stamp: tmpl.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files) @echo 'gtk-doc: Building XML' @-chmod -R u+w $(srcdir) cd $(srcdir) && \ gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS) touch sgml-build.stamp sgml.stamp: sgml-build.stamp @true #### html #### html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) @echo 'gtk-doc: Building HTML' @-chmod -R u+w $(srcdir) rm -rf $(srcdir)/html mkdir $(srcdir)/html mkhtml_options=""; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \ if test "$(?)" = "0"; then \ mkhtml_options=--path="$(srcdir)"; \ fi cd $(srcdir)/html && gtkdoc-mkhtml $(mkhtml_options) $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html ) @echo 'gtk-doc: Fixing cross-references' cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) touch html-build.stamp ############## clean-local: rm -f *~ *.bak rm -rf .libs distclean-local: cd $(srcdir) && \ rm -rf xml $(REPORT_FILES) \ $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt maintainer-clean-local: clean cd $(srcdir) && rm -rf xml html install-data-local: installfiles=`echo $(srcdir)/html/*`; \ if test "$$installfiles" = '$(srcdir)/html/*'; \ then echo '-- Nothing to install' ; \ else \ if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ else \ installdir="$(DESTDIR)$(TARGET_DIR)"; \ fi; \ $(mkinstalldirs) $${installdir} ; \ for i in $$installfiles; do \ echo '-- Installing '$$i ; \ $(INSTALL_DATA) $$i $${installdir}; \ done; \ if test -n "$(DOC_MODULE_VERSION)"; then \ mv -f $${installdir}/$(DOC_MODULE).devhelp2 \ $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \ mv -f $${installdir}/$(DOC_MODULE).devhelp \ $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp; \ fi; \ ! which gtkdoc-rebase >/dev/null 2>&1 || \ gtkdoc-rebase --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir} ; \ fi uninstall-local: if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ else \ installdir="$(DESTDIR)$(TARGET_DIR)"; \ fi; \ rm -rf $${installdir} # # Require gtk-doc when making dist # if ENABLE_GTK_DOC dist-check-gtkdoc: else dist-check-gtkdoc: @echo "*** gtk-doc must be installed and enabled in order to make dist" @false endif dist-hook: dist-check-gtkdoc dist-hook-local mkdir $(distdir)/tmpl mkdir $(distdir)/xml mkdir $(distdir)/html -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl -cp $(srcdir)/xml/*.xml $(distdir)/xml cp $(srcdir)/html/* $(distdir)/html -cp $(srcdir)/$(DOC_MODULE).types $(distdir)/ -cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/ cd $(distdir) && rm -f $(DISTCLEANFILES) ! which gtkdoc-rebase >/dev/null 2>&1 || \ gtkdoc-rebase --online --relative --html-dir=$(distdir)/html .PHONY : dist-hook-local docs pigment-0.3.17/AUTHORS0000644000175000017500000000140611205034420011226 00000000000000PIGMENT TEAM ------------ Florian Boucault Alessandro Decina Guillaume Emont Benjamin Kampmann Lionel Martin Loïc Molinari [maintainer] Julien Moutte Philippe Normand Thomas Vander Stichele CONTRIBUTORS ------------ Arek Korbik - AGL/Carbon backend for the OpenGL plugin Colin Laplace - First implementation of the GLX backend Mirco Müller - PgmText API and Pango/Cairo integration in the OpenGL plugin pigment-0.3.17/TODO0000644000175000017500000000032711205034420010647 00000000000000Here is a list of the wished/planned features: * Timing system * Scene graph * Correct error handling * Compositing between drawables * Image filtering effects * Add more plugin pigment-0.3.17/configure.ac0000644000175000017500000004267011205034420012454 00000000000000AC_PREREQ(2.53) dnl *** Pigment package *** dnl When going to/from release please set the nano (4th number) right! dnl Releases only do -Wall, Subversion and prerelease does -Werror too. AC_INIT([Pigment], [0.3.17], [https://code.fluendo.com/pigment/trac/newticket], [pigment]) AG_GST_INIT AC_CONFIG_SRCDIR([pgm/pgm.c]) AC_CONFIG_AUX_DIR([build-aux]) AM_CONFIG_HEADER([config.h]) AM_INIT_AUTOMAKE([1.7 dist-bzip2]) AS_VERSION AS_NANO(PGM_SVN="no", PGM_SVN="yes") AM_MAINTAINER_MODE AC_GNU_SOURCE dnl *** Versioning *** PGM_MAJORMINOR=$PACKAGE_VERSION_MAJOR.$PACKAGE_VERSION_MINOR AC_SUBST(PGM_MAJORMINOR) AC_DEFINE_UNQUOTED(PGM_MAJORMINOR, "PGM_MAJORMINOR", [library major.minor version]) dnl CURRENT, REVISION, AGE dnl - library source changed -> increment REVISION dnl - interfaces added/removed/changed -> increment CURRENT, REVISION = 0 dnl - interfaces added -> increment AGE dnl - interfaces removed -> AGE = 0 PGM_LT_CURRENT=11 PGM_LT_REV=0 PGM_LT_AGE=0 PGM_LT_VERSION="$PGM_LT_CURRENT:$PGM_LT_REV:$PGM_LT_AGE" PGM_LT_LDFLAGS="-version-info $PGM_LT_VERSION" AC_SUBST(PGM_LT_VERSION) AC_SUBST(PGM_LT_LDFLAGS) dnl *** Checks for arguments to configure *** AG_GST_ARG_PROFILING AG_GST_ARG_VALGRIND AG_GST_ARG_GCOV AG_GST_ARG_EXAMPLES dnl define an ERROR_CFLAGS Makefile variable AG_GST_SET_ERROR_CFLAGS($PGM_SVN) dnl We want to have GST_INFO* messages printed when running Subversion builds if test "x[$PGM_SVN]" = "xyes"; then PGM_DEFAULT_LOG_LEVEL=GST_LEVEL_INFO else PGM_DEFAULT_LOG_LEVEL=GST_LEVEL_NONE fi AC_DEFINE_UNQUOTED(PGM_DEFAULT_LOG_LEVEL, $PGM_DEFAULT_LOG_LEVEL, [Default error level to use for logging]) dnl *** Checks for typedefs, structures, functions and programs *** AC_PROG_CC AM_PROG_CC_C_O AC_PROG_LIBTOOL AC_C_CONST AC_C_INLINE AC_CHECK_LIB(m, fabs, AC_DEFINE(HAVE_FABS, 1, [Define to 1 if you have the `fabs' function.])) AC_CHECK_LIB(m, sinf, AC_DEFINE(HAVE_SINF, 1, [Define to 1 if you have the `sinf' function.])) AC_CHECK_LIB(m, cosf, AC_DEFINE(HAVE_COSF, 1, [Define to 1 if you have the `cosf' function.])) AC_CHECK_LIB(m, sincosf, AC_DEFINE(HAVE_SINCOSF, 1, [Define to 1 if you have the `sincosf' function.])) AC_CHECK_LIB(m, lrintf, AC_DEFINE(HAVE_LRINTF, 1, [Define to 1 if you have the `lrintf' function.])) AC_CHECK_LIBM dnl Perl is used in building documentation AC_PATH_PROG(PERL_PATH, perl, no) if test x$PERL_PATH = xno; then AC_MSG_ERROR(Could not find Perl) fi AC_PATH_PROG(VALGRIND_PATH, valgrind, no) AM_CONDITIONAL(HAVE_VALGRIND, test ! "x$VALGRIND_PATH" = "xno") dnl *** Check for host **** AC_CANONICAL_HOST case $host_os in darwin*) HOST_IS_DARWIN="yes" ;; *) HOST_IS_DARWIN="no" ;; esac dnl *** Versions of package requirements *** AC_SUBST(glib_req, 2.8.0) AC_SUBST(gstreamer_req, 0.10.0) AC_SUBST(gstreamer_plugins_base_req, 0.10.0) AC_SUBST(pango_req, 1.20) AC_SUBST(pangocairo_req, 1.20) AC_SUBST(cairo_req, 1.4) dnl *** Core library checks *** GTK_DOC_CHECK([1.3]) PKG_CHECK_MODULES(GLIB, glib-2.0 >= $glib_req) AC_SUBST(GLIB_CFLAGS) AC_SUBST(GLIB_LIBS) GST_MAJORMINOR=0.10 AG_GST_CHECK_GST($GST_MAJORMINOR, [$gstreamer_req]) AG_GST_CHECK_GST_BASE($GST_MAJORMINOR, [$gstreamer_req]) AG_GST_CHECK_GST_PLUGINS_BASE($GST_MAJORMINOR, [$gstreamer_plugins_base_req]) AG_GST_CHECK_GST_CHECK($GST_MAJORMINOR, [$gstreamer_req], no) dnl checks for GStreamer >= 0.10.13 to workaround a bug in older versions which dnl prevent to register static plugins. PKG_CHECK_MODULES(GST_0_10_13, gstreamer-0.10 >= 0.10.13, [HAVE_GST_0_10_13=yes], [HAVE_GST_0_10_13=no]) if test "x$HAVE_GST_0_10_13" = xyes; then AC_DEFINE(HAVE_GST_0_10_13, 1, [Defined to 1 if you have gstreamer-0.10.13]) fi dnl FIXME: Get rid of this by making sure gstreamer-check brings it in dnl check for "check", unit testing library/header. AM_PATH_CHECK(0.9.2, HAVE_CHECK=yes, HAVE_CHECK=no) AM_CONDITIONAL(HAVE_CHECK, test "x$HAVE_CHECK" = "xyes") PKG_CHECK_MODULES(GDKPIXBUF, gdk-pixbuf-2.0) AC_SUBST(GDKPIXBUF_CFLAGS) AC_SUBST(GDKPIXBUF_LIBS) dnl *** Imaging library checks *** AC_ARG_ENABLE(imaging-library, AC_HELP_STRING([--disable-imaging-library], [disable building imaging library]), [ case "${enableval}" in yes) BUILD_IMAGING_LIBRARY=yes ;; no) BUILD_IMAGING_LIBRARY=no ;; *) AC_MSG_ERROR(bad value ${enableval} for --disable-imaging-library) ;; esac ], [BUILD_IMAGING_LIBRARY=yes]) AM_CONDITIONAL(BUILD_IMAGING_LIBRARY, test "x$BUILD_IMAGING_LIBRARY" = "xyes") PKG_CHECK_MODULES(CAIRO, cairo >= [$cairo_req], [HAVE_CAIRO=yes], [HAVE_CAIRO=no]) AM_CONDITIONAL(HAVE_CAIRO, test x$HAVE_CAIRO = xyes) AC_SUBST(CAIRO_CFLAGS) AC_SUBST(CAIRO_LIBS) if test x$HAVE_CAIRO = xyes -a x$BUILD_IMAGING_LIBRARY = xyes; then HAVE_IMAGING_LIBRARY="yes" else HAVE_IMAGING_LIBRARY="no" fi AC_SUBST(HAVE_IMAGING_LIBRARY) AM_CONDITIONAL(USE_IMAGING_LIBRARY, test x$HAVE_CAIRO = xyes -a x$BUILD_IMAGING_LIBRARY = xyes) dnl *** GTK+ widget checks *** AC_ARG_ENABLE(gtk-widget, AC_HELP_STRING([--disable-gtk-widget], [disable building GTK+ widget]), [ case "${enableval}" in yes) BUILD_GTK_WIDGET=yes ;; no) BUILD_GTK_WIDGET=no ;; *) AC_MSG_ERROR(bad value ${enableval} for --disable-gtk-widget) ;; esac ], [BUILD_GTK_WIDGET=yes]) AM_CONDITIONAL(BUILD_GTK_WIDGET, test "x$BUILD_GTK_WIDGET" = "xyes") PKG_CHECK_MODULES(GTK, gtk+-2.0, [HAVE_GTK=yes], [HAVE_GTK=no]) AM_CONDITIONAL(HAVE_GTK, test x$HAVE_GTK = xyes) AC_SUBST(GTK_CFLAGS) AC_SUBST(GTK_LIBS) if test x$HAVE_GTK = xyes -a x$BUILD_GTK_WIDGET = xyes; then HAVE_GTK_WIDGET="yes" else HAVE_GTK_WIDGET="no" fi AC_SUBST(HAVE_GTK_WIDGET) AM_CONDITIONAL(USE_GTK_WIDGET, test x$HAVE_GTK = xyes -a x$BUILD_GTK_WIDGET = xyes) dnl *** Check for X11 *** PKG_CHECK_MODULES(X11, x11, [HAVE_X11=yes], [HAVE_X11=no]) if test x$HAVE_X11 = xno; then AC_PATH_XTRA if test "x$no_x" = xyes; then AC_MSG_NOTICE(X11 development libraries not found); else XLIB_LIBS="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS" XLIB_CFLAGS="$X_CFLAGS" HAVE_X11="yes" fi else XLIB_LIBS="$X11_LIBS" XLIB_CFLAGS="$X11_CFLAGS" fi dnl *** Libraries that depends on X *** PKG_CHECK_MODULES(CAIROXLIB, cairo-xlib, [HAVE_CAIRO_XLIB=yes], [HAVE_CAIRO_XLIB=no]) PKG_CHECK_MODULES(XCOMPOSITE, xcomposite, [HAVE_XCOMPOSITE=yes], [HAVE_XCOMPOSITE=no]) dnl if test x$HAVE_X11 = xno ; then if test x$with_x = xno ; then HAVE_XCOMPOSITE="no" HAVE_CAIRO_XLIB="no" HAVE_OPENGL="no" HAVE_X11="no" fi AM_CONDITIONAL(HAVE_CAIRO_XLIB, test x$HAVE_CAIRO_XLIB = xyes) AM_CONDITIONAL(HAVE_XCOMPOSITE, test x$HAVE_XCOMPOSITE = xyes) AC_SUBST(CAIROXLIB_CFLAGS) AC_SUBST(CAIROXLIB_LIBS) AC_SUBST(XCOMPOSITE_CFLAGS) AC_SUBST(XCOMPOSITE_LIBS) if test x$HOST_IS_DARWIN = xyes; then AC_CHECK_HEADERS([AGL/agl.h], [HAVE_AGL=yes], [HAVE_AGL=no]) else AC_CHECK_HEADERS([GL/glx.h], [HAVE_GLX=yes], [HAVE_GLX=no]) fi AM_CONDITIONAL(USE_AGL, test x$HAVE_AGL = xyes) AM_CONDITIONAL(USE_GLX, test x$HAVE_GLX = xyes) PKG_CHECK_MODULES(PANGO, pango >= [$pango_req], [HAVE_PANGO=yes], [HAVE_PANGO=no]) AC_SUBST(PANGO_CFLAGS) AC_SUBST(PANGO_LIBS) dnl Check for Pango 1.16 to ifdef out gravity related calls PKG_CHECK_MODULES(PANGO_1_16, pango >= 1.16, [HAVE_PANGO_1_16=yes], [HAVE_PANGO_1_16=no]) if test "x$HAVE_PANGO_1_16" = xyes; then AC_DEFINE(HAVE_PANGO_1_16, 1, [Defined to 1 if you have pango-1.16]) fi PKG_CHECK_MODULES(PANGOCAIRO, pangocairo >= [$pangocairo_req], [HAVE_PANGOCAIRO=yes], [HAVE_PANGOCAIRO=no]) AC_SUBST(PANGOCAIRO_CFLAGS) AC_SUBST(PANGOCAIRO_LIBS) dnl *** OpenGL plugin checks *** PKG_CHECK_MODULES(GDKPIXBUFXLIB, gdk-pixbuf-xlib-2.0, [HAVE_GDKPIXBUFXLIB=yes], [HAVE_GDKPIXBUFXLIB=no]) AC_SUBST(GDKPIXBUFXLIB_CFLAGS) AC_SUBST(GDKPIXBUFXLIB_LIBS) PKG_CHECK_MODULES(XRENDER, xrender, [HAVE_XRENDER=yes], [HAVE_XRENDER=no]) AC_SUBST(XRENDER_CFLAGS) AC_SUBST(XRENDER_LIBS) if test x$HOST_IS_DARWIN = xyes; then AC_CHECK_HEADERS([OpenGL/gl.h], [HAVE_GL=yes], [HAVE_GL=no]) if test x$HAVE_GL = xno; then AC_MSG_NOTICE(OSX OpenGL development libraries not found); else GL_LIBS="-framework OpenGL -framework AGL -framework CoreFoundation -framework Carbon" GL_CFLAGS="" fi elif test x$HAVE_X11 = xyes; then AC_CHECK_HEADERS([GL/gl.h], [HAVE_GL=yes], [HAVE_GL=no]) if test x$HAVE_GL = xyes; then GL_LIBS="-lGL" GL_CFLAGS="" fi fi AM_CONDITIONAL(USE_GL, test x$HAVE_GL = xyes) if test x$HAVE_GL = xyes -a x$HAVE_X11 = xyes -a x$HAVE_GDKPIXBUFXLIB = xyes -a x$HAVE_GLX = xyes -a x$HAVE_PANGO = xyes -a x$HAVE_PANGOCAIRO = xyes -a x$HAVE_XRENDER = xyes; then if test x$with_x = xno ; then HAVE_OPENGL_PLUGIN="no" else PGM_GL_LIBS="$XLIB_LIBS $XRENDER_LIBS $GDKPIXBUFXLIB_LIBS $GL_LIBS $PANGO_LIBS $PANGOCAIRO_LIBS" PGM_GL_CFLAGS="$XLIB_CFLAGS $XRENDER_CFLAGS $GDKPIXBUFXLIB_CFLAGS $GL_CFLAGS $PANGO_CFLAGS $PANGOCAIRO_CFLAGS" HAVE_OPENGL_PLUGIN="yes" OPENGL_BACKEND="(Xlib/GLX backend)" AC_SUBST(PGM_GL_CFLAGS) AC_SUBST(PGM_GL_LIBS) fi elif test x$HAVE_GL = xyes -a x$HOST_IS_DARWIN = xyes -a x$HAVE_AGL = xyes -a x$HAVE_PANGO = xyes -a x$HAVE_PANGOCAIRO = xyes; then PGM_GL_LIBS="$GL_LIBS $PANGO_LIBS $PANGOCAIRO_LIBS" PGM_GL_CFLAGS="$GL_CFLAGS $PANGO_CFLAGS $PANGOCAIRO_CFLAGS" HAVE_OPENGL_PLUGIN="yes" OPENGL_BACKEND="(OSX/AGL backend)" AC_SUBST(PGM_GL_CFLAGS) AC_SUBST(PGM_GL_LIBS) else HAVE_OPENGL_PLUGIN="no" OPENGL_BACKEND="" fi AC_SUBST(HAVE_OPENGL_PLUGIN) AC_SUBST(OPENGL_BACKEND) AM_CONDITIONAL(USE_OPENGL, test \( x$HAVE_X11 = xyes -a x$HAVE_GLX = xyes -a x$HAVE_GDKPIXBUFXLIB = xyes \) -o \( x$HOST_IS_DARWIN = xyes -a x$HAVE_AGL = xyes \) -a x$HAVE_GL = xyes -a x$HAVE_PANGO = xyes -a x$HAVE_PANGOCAIRO = xyes -a x$HAVE_XRENDER = xyes) dnl *** OpenGL ES plugin checks *** AC_ARG_ENABLE(opengles-pc-emulation, AC_HELP_STRING([--enable-opengles-pc-emulation], [enable the emulation of OpenGL ES on PC [[default=no]]]), [ case "${enableval}" in yes) OPENGLES_PC_EMULATION=yes ;; no) OPENGLES_PC_EMULATION=no ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-opengles-pc-emulation) ;; esac ], [OPENGLES_PC_EMULATION=no]) AM_CONDITIONAL(USE_OPENGLES_PC_EMULATION, test "x$OPENGLES_PC_EMULATION" = "xyes") if test x$OPENGLES_PC_EMULATION = xyes; then AC_DEFINE(HAVE_OPENGLES_PC_EMULATION, 1, [Defined to 1 if you enabled OpenGL ES PC emulation]) fi AC_CHECK_HEADERS([GLES/egl.h], [HAVE_EGL=yes], [HAVE_EGL=no]) AC_CHECK_HEADERS([GLES/gl.h], [HAVE_GLES=yes], [HAVE_GLES=no]) if test x$HAVE_GLES = xyes; then GLES_LIBS="-lGLES_CM" GLES_CFLAGS="" fi AC_ARG_ENABLE(gdl, AC_HELP_STRING([--enable-gdl], [enable GDL backend support]), [ case "${enableval}" in yes) AC_DEFINE(HAVE_GDL, 1, [GDL]) GLES_LIBS="$GLES_LIBS -lgdl -lEGL -lGLESv2" ;; no) AC_DEFINE(HAVE_GDL, 0, [GDL]) ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-gdl) ;; esac ], AC_DEFINE(HAVE_GDL, 0, [GDL])) AC_ARG_ENABLE(touchscreen, AC_HELP_STRING([--enable-touchscreen], [enable touchscreen support]), [ case "${enableval}" in yes) ENABLE_TOUCHSCREEN=yes ;; no) ENABLE_TOUCHSCREEN=no ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-touchscreen) ;; esac ], [ENABLE_TOUCHSCREEN=yes]) AM_CONDITIONAL(ENABLE_TOUCHSCREEN, test "x$ENABLE_TOUCHSCREEN" = "xyes") PKG_CHECK_MODULES(TSLIB, tslib-0.0, [HAVE_TSLIB=yes], [HAVE_TSLIB=no]) if test x$HAVE_TSLIB = xyes -a x$ENABLE_TOUCHSCREEN = xyes; then AC_DEFINE(HAVE_TSLIB, 1, [Defined to 1 if you have tslib]) fi AC_SUBST(TSLIB_CFLAGS) AC_SUBST(TSLIB_LIBS) if test x$OPENGLES_PC_EMULATION = xyes -a x$HAVE_GLES = xyes -a x$HAVE_X11 = xyes -a x$HAVE_GLX = xyes -a x$HAVE_PANGO = xyes -a x$HAVE_PANGOCAIRO = xyes; then PGM_GLES_LIBS="$XLIB_LIBS $GLES_LIBS $PANGO_LIBS $PANGOCAIRO_LIBS" PGM_GLES_CFLAGS="$XLIB_CFLAGS $GLES_CFLAGS $PANGO_CFLAGS $PANGOCAIRO_CFLAGS" HAVE_OPENGLES_PLUGIN="yes" OPENGLES_BACKEND="(Xlib/GLX PC emulation backend)" AC_SUBST(PGM_GLES_CFLAGS) AC_SUBST(PGM_GLES_LIBS) elif test x$HAVE_EGL = xyes -a x$HAVE_GLES = xyes -a x$HAVE_PANGO = xyes -a x$HAVE_PANGOCAIRO = xyes; then PGM_GLES_LIBS="$GLES_LIBS $PANGO_LIBS $PANGOCAIRO_LIBS $TSLIB_LIBS" PGM_GLES_CFLAGS="$GLES_CFLAGS $PANGO_CFLAGS $PANGOCAIRO_CFLAGS $TSLIB_CFLAGS" HAVE_OPENGLES_PLUGIN="yes" if test "x$HAVE_TSLIB" = xyes -a "x$ENABLE_TOUCHSCREEN" = xyes; then OPENGLES_BACKEND="(EGL backend with tslib)" else OPENGLES_BACKEND="(EGL backend without tslib)" fi AC_SUBST(PGM_GLES_CFLAGS) AC_SUBST(PGM_GLES_LIBS) else HAVE_OPENGLES_PLUGIN="no" OPENGLES_BACKEND="" fi AC_SUBST(HAVE_OPENGLES_PLUGIN) AC_SUBST(OPENGLES_BACKEND) AM_CONDITIONAL(USE_OPENGLES, test \( x$OPENGLES_PC_EMULATION = xyes -a x$HAVE_X11 = xyes -a x$HAVE_GLX = xyes \) -o \( x$HAVE_EGL = xyes \) -a x$HAVE_GLES = xyes -a x$HAVE_PANGO = xyes -a x$HAVE_PANGOCAIRO = xyes) dnl *** Unit tests checks *** dnl Interactive tests uses GtkBuilder, but reverts to libglade if GTK+ < 2.12 PKG_CHECK_MODULES(LIBGLADE_2_0, libglade-2.0, [HAVE_LIBGLADE_2_0=yes], [HAVE_LIBGLADE_2_0=no]) AM_CONDITIONAL(HAVE_LIBGLADE_2_0, test "x$HAVE_LIBGLADE_2_0" = "xyes") AC_SUBST(LIBGLADE_2_0_CFLAGS) AC_SUBST(LIBGLADE_2_0_LIBS) dnl FIXME: enable this by default when pigment runs in XvFB AC_ARG_ENABLE(opengl-tests, AS_HELP_STRING([--enable-opengl-tests], [enable the tests requiring OpenGL [[default=no]]]), enable_opengl_tests=$enableval, enable_opengl_tests=no) AM_CONDITIONAL(OPENGL_TESTS_ENABLED, test x$HAVE_OPENGL_PLUGIN = xyes -a x$enable_opengl_tests = xyes) dnl Check for plugins if test x$HAVE_OPENGL_PLUGIN = xno -a x$HAVE_OPENGLES_PLUGIN = xno ; then AC_MSG_ERROR(No plugin to compile) fi dnl *** Finalize CFLAGS, LDFLAGS, LIBS *** dnl Overview: dnl PGM_OPTION_CFLAGS: common cflags for profiling, debugging, errors, ... dnl PGM_GTKDOC_CFLAGS: flags for gtk-doc scanner dnl PGM_ALL_*: vars shared by all built objects dnl PGM_LIB_LDFLAGS: additional linker flags for all libaries dnl PGM_OBJ_*: additional vars to link to the core (include PGM_ALL_*) dnl PGM_LT_LDFLAGS: library versioning of our libraries dnl PGM_PLUGIN_LDFLAGS: flags to be used for all plugins if test "x$USE_DEBUG" = xyes; then PROFILE_CFLAGS="-g" fi AC_SUBST(PROFILE_CFLAGS) dnl Every flag in PGM_OPTION_CFLAGS can be overridden at make time via e.g. dnl make PROFILE_CFLAGS=''. PGM_OPTION_CFLAGS="\$(ERROR_CFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS)" AC_SUBST(PGM_OPTION_CFLAGS) PGM_ALL_CFLAGS="-I\$(top_srcdir) -I\$(top_builddir)/pgm $GST_CFLAGS $GST_PLUGINS_BASE_CFLAGS $GDKPIXBUF_CFLAGS \$(PGM_OPTION_CFLAGS)" PGM_ALL_LIBS="$GST_LIBS $GST_BASE_LIBS $GST_PLUGINS_BASE_LIBS -lgstvideo-0.10 $GDKPIXBUF_LIBS $LIBM \$(GCOV_LIBS)" PGM_ALL_LDFLAGS="-no-undefined" AC_SUBST(PGM_ALL_CFLAGS) AC_SUBST(PGM_ALL_LIBS) AC_SUBST(PGM_ALL_LDFLAGS) dnl LDFLAGS modifier defining exported symbols from built libraries PGM_LIB_LDFLAGS="-export-symbols-regex \^[_]*\(pgm_\|Pgm\|PGM_\).*" AC_SUBST(PGM_LIB_LDFLAGS) PGM_OBJ_CFLAGS="\$(PGM_ALL_CFLAGS)" PGM_OBJ_LIBS="\$(top_builddir)/pgm/libpigment-$PGM_MAJORMINOR.la \$(PGM_ALL_LIBS)" AC_SUBST(PGM_OBJ_CFLAGS) AC_SUBST(PGM_OBJ_LIBS) dnl LDFLAGS for plugins; includes PGM_ALL_LDFLAGS PGM_PLUGIN_LDFLAGS="-module -avoid-version -export-symbols-regex '^[_]*pgm_plugin_desc\$\$' $PGM_ALL_LDFLAGS" AC_SUBST(PGM_PLUGIN_LDFLAGS) dnl Same as PGM_OPTION_CFLAGS without ERROR_CFLAGS (-Wall -Werror) to avoid dnl breaking the build in debug when there are compilation warnings in the dnl gtk-doc scanner PGM_GTKDOC_CFLAGS="-I\$(top_srcdir) -I\$(top_builddir)/pgm $GST_CFLAGS $GST_PLUGINS_BASE_CFLAGS $GDKPIXBUF_CFLAGS" AC_SUBST(PGM_GTKDOC_CFLAGS) dnl Plugin path AS_AC_EXPAND(PLUGIN_PATH, ${libdir}/pigment-$PGM_MAJORMINOR/$VERSION) AC_SUBST(PLUGIN_PATH) AC_DEFINE_UNQUOTED(PGM_PLUGIN_PATH, "$PLUGIN_PATH", [The path where Pigment plugins are located]) dnl *** Configuration files *** AC_CONFIG_FILES( Makefile pigment.spec pgm/Makefile pgm/pgmversion.h pgm/gtk/Makefile pgm/imaging/Makefile plugins/Makefile plugins/boilerplate/Makefile plugins/opengl/Makefile plugins/opengles/Makefile tests/Makefile tests/check/Makefile tests/check/common/Makefile tests/check/pgm/Makefile tests/check/plugins/Makefile tests/check/plugins/common/Makefile tests/check/plugins/opengl/Makefile tests/check/plugins/boilerplate/Makefile tests/interactive/Makefile examples/Makefile examples/pictures/Makefile docs/Makefile docs/pgm/Makefile docs/pgm/version-short.xml docs/pgm/version-full.xml pkgconfig/Makefile pkgconfig/pigment.pc pkgconfig/pigment-uninstalled.pc pkgconfig/pigment-imaging.pc pkgconfig/pigment-imaging-uninstalled.pc pkgconfig/pigment-gtk.pc pkgconfig/pigment-gtk-uninstalled.pc win32/Makefile win32/common/Makefile win32/vs6/Makefile win32/vs9/Makefile misc/Makefile ) AC_OUTPUT dnl *** Configuration summary *** echo "" echo " Pigment $PACKAGE_VERSION" echo " ===============" echo " Prefix: ${prefix}" echo " Documentation: ${enable_gtk_doc}" echo " OpenGL plugin: ${HAVE_OPENGL_PLUGIN} ${OPENGL_BACKEND}" echo " OpenGL ES plugin: ${HAVE_OPENGLES_PLUGIN} ${OPENGLES_BACKEND}" echo " Imaging library: ${HAVE_IMAGING_LIBRARY}" echo " GTK+ widget: ${HAVE_GTK_WIDGET}" echo " Examples: ${BUILD_EXAMPLES}" pigment-0.3.17/pgm/0000777000175000017500000000000011205035134011027 500000000000000pigment-0.3.17/pgm/pgmenumtypes.h0000644000175000017500000000721411205034716013662 00000000000000 /* Generated data (by glib-mkenums) */ #ifndef __PGM_ENUM_TYPES_H__ #define __PGM_ENUM_TYPES_H__ G_BEGIN_DECLS /* --- ./pgmcommon.h --- */ #define PGM_TYPE_ERROR pgm_error_get_type() GType pgm_error_get_type (void); /* --- ./pgmdrawable.h --- */ #define PGM_TYPE_DRAWABLE_LAYER pgm_drawable_layer_get_type() GType pgm_drawable_layer_get_type (void); #define PGM_TYPE_DRAWABLE_PROPERTY pgm_drawable_property_get_type() GType pgm_drawable_property_get_type (void); #define PGM_TYPE_DRAWABLE_FLAGS pgm_drawable_flags_get_type() GType pgm_drawable_flags_get_type (void); #define PGM_TYPE_DRAWABLE_PICKING_SIGNAL pgm_drawable_picking_signal_get_type() GType pgm_drawable_picking_signal_get_type (void); /* --- ./pgmevents.h --- */ #define PGM_TYPE_EVENT_TYPE pgm_event_type_get_type() GType pgm_event_type_get_type (void); #define PGM_TYPE_MODIFIER_TYPE pgm_modifier_type_get_type() GType pgm_modifier_type_get_type (void); #define PGM_TYPE_BUTTON_TYPE pgm_button_type_get_type() GType pgm_button_type_get_type (void); #define PGM_TYPE_SCROLL_DIRECTION pgm_scroll_direction_get_type() GType pgm_scroll_direction_get_type (void); #define PGM_TYPE_VIEWPORT_STATE pgm_viewport_state_get_type() GType pgm_viewport_state_get_type (void); /* --- ./pgmimage.h --- */ #define PGM_TYPE_IMAGE_ALIGNMENT pgm_image_alignment_get_type() GType pgm_image_alignment_get_type (void); #define PGM_TYPE_IMAGE_LAYOUT_TYPE pgm_image_layout_type_get_type() GType pgm_image_layout_type_get_type (void); #define PGM_TYPE_IMAGE_INTERP_TYPE pgm_image_interp_type_get_type() GType pgm_image_interp_type_get_type (void); #define PGM_TYPE_IMAGE_WRAPPING pgm_image_wrapping_get_type() GType pgm_image_wrapping_get_type (void); #define PGM_TYPE_IMAGE_PIXEL_FORMAT pgm_image_pixel_format_get_type() GType pgm_image_pixel_format_get_type (void); #define PGM_TYPE_IMAGE_STORAGE_TYPE pgm_image_storage_type_get_type() GType pgm_image_storage_type_get_type (void); /* --- ./pgmtext.h --- */ #define PGM_TYPE_TEXT_ELLIPSIZE pgm_text_ellipsize_get_type() GType pgm_text_ellipsize_get_type (void); #define PGM_TYPE_TEXT_ALIGNMENT pgm_text_alignment_get_type() GType pgm_text_alignment_get_type (void); #define PGM_TYPE_TEXT_WRAP pgm_text_wrap_get_type() GType pgm_text_wrap_get_type (void); #define PGM_TYPE_TEXT_GRAVITY pgm_text_gravity_get_type() GType pgm_text_gravity_get_type (void); #define PGM_TYPE_TEXT_STRETCH pgm_text_stretch_get_type() GType pgm_text_stretch_get_type (void); #define PGM_TYPE_TEXT_STYLE pgm_text_style_get_type() GType pgm_text_style_get_type (void); #define PGM_TYPE_TEXT_VARIANT pgm_text_variant_get_type() GType pgm_text_variant_get_type (void); #define PGM_TYPE_TEXT_WEIGHT pgm_text_weight_get_type() GType pgm_text_weight_get_type (void); #define PGM_TYPE_TEXT_SHADOW_POSITION pgm_text_shadow_position_get_type() GType pgm_text_shadow_position_get_type (void); /* --- ./pgmviewport.h --- */ #define PGM_TYPE_VIEWPORT_CURSOR pgm_viewport_cursor_get_type() GType pgm_viewport_cursor_get_type (void); #define PGM_TYPE_VIEWPORT_CAPACITY pgm_viewport_capacity_get_type() GType pgm_viewport_capacity_get_type (void); #define PGM_TYPE_VIEWPORT_ROTATION pgm_viewport_rotation_get_type() GType pgm_viewport_rotation_get_type (void); #define PGM_TYPE_VIEWPORT_REFLECTION pgm_viewport_reflection_get_type() GType pgm_viewport_reflection_get_type (void); /* --- ./pgmlinearalgebra.h --- */ #define PGM_TYPE_MAT4X4_PREDEFINED pgm_mat4x4_predefined_get_type() GType pgm_mat4x4_predefined_get_type (void); /* --- ./pgmimagesink.h --- */ #define PGM_TYPE_IMAGE_SINK_EVENT_MASK pgm_image_sink_event_mask_get_type() GType pgm_image_sink_event_mask_get_type (void); G_END_DECLS #endif /* Generated data ends here */ pigment-0.3.17/pgm/pgmcommon.h0000644000175000017500000000650511205034416013120 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment media rendering library * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author(s): Loïc Molinari * Julien Moutte */ #ifndef __PGM_COMMON_H__ #define __PGM_COMMON_H__ #include #include /* sin, cos, sincos, fabs, fabsf */ G_BEGIN_DECLS /** * PGM_DEGREES_TO_RADIANS: * @theta: an angle in degrees. * * Converts from degrees to radians. */ #define PGM_DEGREES_TO_RADIANS(theta) ((theta) * (G_PI / 180.0f)) /** * PGM_RADIANS_TO_DEGREES: * @theta: an angle in radians. * * Converts from radians to degrees. */ #define PGM_RADIANS_TO_DEGREES(theta) ((theta) * (180.0f / G_PI)) /** * PGM_SINCOS: * @theta: a float representing an angle in radians. * @s: the address of the float where the sine value is going to be stored. * @c: the address of the float where the cosine value is going to be stored. * * Calculates sine and cosine of the angle @theta simultaneously. */ #if HAVE_SINCOSF #define PGM_SINCOS(theta,s,c) sincosf ((theta), (s), (c)) #elif HAVE_SINF && HAVE_COSF #define PGM_SINCOS(theta,s,c) \ G_STMT_START { \ *(s) = sinf (theta); \ *(c) = cosf (theta); \ } G_STMT_END #else #define PGM_SINCOS(theta,s,c) \ G_STMT_START { \ *(s) = (gfloat) sin ((gdouble) theta); \ *(c) = (gfloat) cos ((gdouble) theta); \ } G_STMT_END #endif /* HAVE_SINCOS */ /** * PGM_FABSF: * @x: the floating-point number. * * Calculates the absolute value of float. */ #if HAVE_FABSF #define PGM_FABSF(x) fabsf (x) #else #define PGM_FABSF(x) ((gfloat) fabs (x)) #endif /* HAVE_FABSF */ /** * PgmError: * @PGM_ERROR_X: Generic error code. * @PGM_ERROR_OK: No error occured. * * Every Pigment method returns an error code from that list. */ typedef enum { PGM_ERROR_X, PGM_ERROR_OK } PgmError; /** * pgm_lrintf: * @x: the input floating-point number. * * Round @x to nearest integer using the current FPU rounding mode. On platforms * other than Windows where the C99 lrintf function is not available, the * function reverts to a float-to-int cast which uses the truncate FPU rounding * mode. * * Returns: the rounded nearest integer. */ #if HAVE_LRINTF #define pgm_lrintf(x) lrintf (x) #elif defined (_MSC_VER) gint32 pgm_lrintf (gfloat x); #else #define pgm_lrintf(x) (gint32) (x) #endif G_END_DECLS #endif /* __PGM_COMMON_H__ */ pigment-0.3.17/pgm/pgmlinearalgebra.c0000644000175000017500000024371411205034416014420 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment media rendering library * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author(s): Loïc Molinari * Florian Boucault * * The inverse 4x4 matrix function comes from the Mesa 3D Graphics Library * and is a contribution by Jacques Leroy . */ /** * SECTION:pgmlinearalgebra * @short_description: Various linear algebra objects and utility functions. * * * * Various linear algebra objects and utility functions simplifying the * use of matrice and vector types. * * Notation * * In this documentation, we use the column vector notation for matrices and * matrix operations. That is also the notation used by the *_to_string() * functions, with the exception of pgm_vec3_to_string() and * pgm_vec4_to_string() for practical reasons. * * Memory storage convention * * Pigment matrices are stored in row-major order. This means that rows are * stored one after the other. The difference between addresses of array * cells in increasing rows is larger than addresses of cells in increasing * columns. * * * * Last reviewed on 2008-01-15 (0.3.2) */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include /* debug */ #include /* memcpy */ #include "pgmlinearalgebra.h" #include "pgmcommon.h" /* Horizontal flipping 4x4 matrix */ #define MAT4X4_FLIP_HORIZ_SCALARS \ -1.0f, 0.0f, 0.0f, 1.0f, \ 0.0f, 1.0f, 0.0f, 0.0f, \ 0.0f, 0.0f, 1.0f, 0.0f, \ 0.0f, 0.0f, 0.0f, 1.0f /* Vertical flipping 4x4 matrix */ #define MAT4X4_FLIP_VERT_SCALARS \ 1.0f, 0.0f, 0.0f, 0.0f, \ 0.0f,-1.0f, 0.0f, 1.0f, \ 0.0f, 0.0f, 1.0f, 0.0f, \ 0.0f, 0.0f, 0.0f, 1.0f /* Clockwise rotating 4x4 matrix */ #define MAT4X4_ROTATE_CW_SCALARS \ 0.0f, 1.0f, 0.0f, 0.0f, \ -1.0f, 0.0f, 0.0f, 1.0f, \ 0.0f, 0.0f, 1.0f, 0.0f, \ 0.0f, 0.0f, 0.0f, 1.0f /* Counter-clockwise rotating 4x4 matrix */ #define MAT4X4_ROTATE_CCW_SCALARS \ 0.0f,-1.0f, 0.0f, 1.0f, \ 1.0f, 0.0f, 0.0f, 0.0f, \ 0.0f, 0.0f, 1.0f, 0.0f, \ 0.0f, 0.0f, 0.0f, 1.0f GST_DEBUG_CATEGORY_EXTERN (pgm_debug); #define GST_CAT_DEFAULT pgm_debug /* Private functions */ /* Multiply m1.m2 4x4 matrices putting the result in r */ static void mat4x4_multiply_mat4x4_mat4x4 (PgmMat4x4 *r, const PgmMat4x4 *m1, const PgmMat4x4 *m2) { r->m[0] = m1->m[0]*m2->m[0] + m1->m[1]*m2->m[4] + m1->m[2]*m2->m[8] + m1->m[3]*m2->m[12]; r->m[1] = m1->m[0]*m2->m[1] + m1->m[1]*m2->m[5] + m1->m[2]*m2->m[9] + m1->m[3]*m2->m[13]; r->m[2] = m1->m[0]*m2->m[2] + m1->m[1]*m2->m[6] + m1->m[2]*m2->m[10] + m1->m[3]*m2->m[14]; r->m[3] = m1->m[0]*m2->m[3] + m1->m[1]*m2->m[7] + m1->m[2]*m2->m[11] + m1->m[3]*m2->m[15]; r->m[4] = m1->m[4]*m2->m[0] + m1->m[5]*m2->m[4] + m1->m[6]*m2->m[8] + m1->m[7]*m2->m[12]; r->m[5] = m1->m[4]*m2->m[1] + m1->m[5]*m2->m[5] + m1->m[6]*m2->m[9] + m1->m[7]*m2->m[13]; r->m[6] = m1->m[4]*m2->m[2] + m1->m[5]*m2->m[6] + m1->m[6]*m2->m[10] + m1->m[7]*m2->m[14]; r->m[7] = m1->m[4]*m2->m[3] + m1->m[5]*m2->m[7] + m1->m[6]*m2->m[11] + m1->m[7]*m2->m[15]; r->m[8] = m1->m[8]*m2->m[0] + m1->m[9]*m2->m[4] + m1->m[10]*m2->m[8] + m1->m[11]*m2->m[12]; r->m[9] = m1->m[8]*m2->m[1] + m1->m[9]*m2->m[5] + m1->m[10]*m2->m[9] + m1->m[11]*m2->m[13]; r->m[10] = m1->m[8]*m2->m[2] + m1->m[9]*m2->m[6] + m1->m[10]*m2->m[10] + m1->m[11]*m2->m[14]; r->m[11] = m1->m[8]*m2->m[3] + m1->m[9]*m2->m[7] + m1->m[10]*m2->m[11] + m1->m[11]*m2->m[15]; r->m[12] = m1->m[12]*m2->m[0] + m1->m[13]*m2->m[4] + m1->m[14]*m2->m[8] + m1->m[15]*m2->m[12]; r->m[13] = m1->m[12]*m2->m[1] + m1->m[13]*m2->m[5] + m1->m[14]*m2->m[9] + m1->m[15]*m2->m[13]; r->m[14] = m1->m[12]*m2->m[2] + m1->m[13]*m2->m[6] + m1->m[14]*m2->m[10] + m1->m[15]*m2->m[14]; r->m[15] = m1->m[12]*m2->m[3] + m1->m[13]*m2->m[7] + m1->m[14]*m2->m[11] + m1->m[15]*m2->m[15]; } /* 3-components vector public methods */ GType pgm_vec3_get_type (void) { static GType our_type = 0; if (G_UNLIKELY (!our_type)) our_type = g_boxed_type_register_static ("PgmVec3", (GBoxedCopyFunc) pgm_vec3_copy, (GBoxedFreeFunc) pgm_vec3_free); return our_type; } /** * pgm_vec3_new: * * Creates a new #PgmVec3 with components initialized at 0.0f. * * MT safe. * * Returns: a new #PgmVec3 instance. */ PgmVec3* pgm_vec3_new (void) { PgmVec3 *vec3; vec3 = g_slice_new0 (PgmVec3); GST_DEBUG ("created new vec3(%p:[%.1f, %.1f, %.1f])", vec3, vec3->v[0], vec3->v[1], vec3->v[2]); return vec3; } /** * pgm_vec3_new_from_scalars: * @v0: the 1st component. * @v1: the 2nd component. * @v2: the 3rd component. * * Creates a new #PgmVec3 with components initialized with the given scalars. * * MT safe. * * Returns: a new #PgmVec3 instance. */ PgmVec3* pgm_vec3_new_from_scalars (gfloat v0, gfloat v1, gfloat v2) { PgmVec3 *vec3; vec3 = g_slice_new (PgmVec3); vec3->v[0] = v0; vec3->v[1] = v1; vec3->v[2] = v2; GST_DEBUG ("created new vec3(%p:[%f, %f, %f])", vec3, vec3->v[0], vec3->v[1], vec3->v[2]); return vec3; } /** * pgm_vec3_copy: * @vec3: a #PgmVec3 object. * * Copies @vec3. * * MT safe. * * Returns: a newly allocated #PgmVec3. */ PgmVec3* pgm_vec3_copy (PgmVec3 *vec3) { PgmVec3 *new_vec3; g_return_val_if_fail (vec3 != NULL, NULL); new_vec3 = pgm_vec3_new (); memcpy (new_vec3, vec3, sizeof (PgmVec3)); return new_vec3; } /** * pgm_vec3_free: * @vec3: A #PgmVec3 object. * * Frees all resources used by @vec3. * * MT safe. */ void pgm_vec3_free (PgmVec3 *vec3) { g_return_if_fail (vec3 != NULL); GST_DEBUG ("freeing vec3(%p:[%f, %f, %f])", vec3, vec3->v[0], vec3->v[1], vec3->v[2]); g_slice_free (PgmVec3, vec3); } /** * pgm_vec3_set_from_scalars: * @vec3: A #PgmVec3 object. * @v0: the 1st component. * @v1: the 2nd component. * @v2: the 3rd component. * * Sets the components of @vec3 with the given scalars. * * MT safe. */ void pgm_vec3_set_from_scalars (PgmVec3 *vec3, gfloat v0, gfloat v1, gfloat v2) { g_return_if_fail (vec3 != NULL); vec3->v[0] = v0; vec3->v[1] = v1; vec3->v[2] = v2; } /** * pgm_vec3_set_from_vec3: * @vec3: A #PgmVec3 object. * @v: A #PgmVec3 object. * * Sets the components of @vec3 with the given vector. * * MT safe. */ void pgm_vec3_set_from_vec3 (PgmVec3 *vec3, const PgmVec3 *v) { g_return_if_fail (vec3 != NULL); g_return_if_fail (v != NULL); memcpy (vec3, v, sizeof (PgmVec3)); } /** * pgm_vec3_length: * @vec3: A #PgmVec3 object. * * Retrieves the length of the vector @vec3. * * MT safe. * * Returns: the length of @vec3. */ gfloat pgm_vec3_length (PgmVec3 *vec3) { g_return_val_if_fail (vec3 != NULL, -1.0f); return (gfloat) sqrt (vec3->v[0] * vec3->v[0] + vec3->v[1] * vec3->v[1] + vec3->v[2] * vec3->v[2]); } /** * pgm_vec3_normalize: * @vec3: A #PgmVec3 object. * * Retrieves the normalized @vec3 vector. * * MT safe. * * Returns: the normalized @vec3 vector, or NULL if @vec3 is the zero vector. */ PgmVec3* pgm_vec3_normalize (PgmVec3 *vec3) { gfloat length; g_return_val_if_fail (vec3 != NULL, NULL); length = pgm_vec3_length (vec3); if (length == 0.0f) return NULL; length = 1.0f / length; return pgm_vec3_new_from_scalars (vec3->v[0] * length, vec3->v[1] * length, vec3->v[2] * length); } /** * pgm_vec3_dot_product: * @vec3: A #PgmVec3 object. * @v: A #PgmVec3 object. * * Computes the dot product @vec3 ∙ @v. * * MT safe. * * Returns: the dot product @vec3 ∙ @v. */ gfloat pgm_vec3_dot_product (PgmVec3 *vec3, const PgmVec3 *v) { g_return_val_if_fail (vec3 != NULL, -1.0f); g_return_val_if_fail (v != NULL, -1.0f); return (vec3->v[0] * v->v[0] + vec3->v[1] * v->v[1] + vec3->v[2] * v->v[2]); } /** * pgm_vec3_cross_product: * @vec3: A #PgmVec3 object. * @v: A #PgmVec3 object. * * Computes the dot product @vec3 × @v. * * MT safe. * * Returns: the cross product @vec3 × @v in a newly allocated #PgmVec3. */ PgmVec3* pgm_vec3_cross_product (PgmVec3 *vec3, const PgmVec3 *v) { PgmVec3 *cross; g_return_val_if_fail (vec3 != NULL, NULL); g_return_val_if_fail (v != NULL, NULL); cross = pgm_vec3_new (); cross->v[0] = vec3->v[1] * v->v[2] - vec3->v[2] * v->v[1]; cross->v[1] = vec3->v[2] * v->v[0] - vec3->v[0] * v->v[2]; cross->v[2] = vec3->v[0] * v->v[1] - vec3->v[1] * v->v[0]; return cross; } /** * pgm_vec3_add_scalar: * @vec3: A #PgmVec3 object. * @s: A scalar. * * Computes the sum @vec3 + @s. * * MT safe. * * Returns: the sum @vec3 + @s in a newly allocated #PgmVec3. */ PgmVec3* pgm_vec3_add_scalar (PgmVec3 *vec3, gfloat s) { PgmVec3 *sum; g_return_val_if_fail (vec3 != NULL, NULL); sum = pgm_vec3_new (); sum->v[0] = vec3->v[0] + s; sum->v[1] = vec3->v[1] + s; sum->v[2] = vec3->v[2] + s; return sum; } /** * pgm_vec3_add_vec3: * @vec3: A #PgmVec3 object. * @v: A #PgmVec3 object. * * Computes the sum @vec3 + @v. * * MT safe. * * Returns: the sum @vec3 + @v in a newly allocated #PgmVec3. */ PgmVec3* pgm_vec3_add_vec3 (PgmVec3 *vec3, const PgmVec3 *v) { PgmVec3 *sum; g_return_val_if_fail (vec3 != NULL, NULL); g_return_val_if_fail (v != NULL, NULL); sum = pgm_vec3_new (); sum->v[0] = vec3->v[0] + v->v[0]; sum->v[1] = vec3->v[1] + v->v[1]; sum->v[2] = vec3->v[2] + v->v[2]; return sum; } /** * pgm_vec3_substract_scalar: * @vec3: A #PgmVec3 object. * @s: A scalar. * * Computes the substraction @vec3 - @s. * * MT safe. * * Returns: the substraction @vec3 - @s in a newly allocated #PgmVec3. */ PgmVec3* pgm_vec3_substract_scalar (PgmVec3 *vec3, gfloat s) { PgmVec3 *sub; g_return_val_if_fail (vec3 != NULL, NULL); sub = pgm_vec3_new (); sub->v[0] = vec3->v[0] - s; sub->v[1] = vec3->v[1] - s; sub->v[2] = vec3->v[2] - s; return sub; } /** * pgm_vec3_substract_vec3: * @vec3: A #PgmVec3 object. * @v: A #PgmVec3 object. * * Computes the substraction @vec3 - @v. * * MT safe. * * Returns: the substraction @vec3 - @v in a newly allocated #PgmVec3. */ PgmVec3* pgm_vec3_substract_vec3 (PgmVec3 *vec3, const PgmVec3 *v) { PgmVec3 *sub; g_return_val_if_fail (vec3 != NULL, NULL); g_return_val_if_fail (v != NULL, NULL); sub = pgm_vec3_new (); sub->v[0] = vec3->v[0] - v->v[0]; sub->v[1] = vec3->v[1] - v->v[1]; sub->v[2] = vec3->v[2] - v->v[2]; return sub; } /** * pgm_vec3_multiply_scalar: * @vec3: A #PgmVec3 object. * @s: A scalar. * * Computes the multiplication @vec3 . @s. * * MT safe. * * Returns: the multiplication @vec3 . @s in a newly allocated #PgmVec3. */ PgmVec3* pgm_vec3_multiply_scalar (PgmVec3 *vec3, gfloat s) { PgmVec3 *mult; g_return_val_if_fail (vec3 != NULL, NULL); mult = pgm_vec3_new (); mult->v[0] = s * vec3->v[0]; mult->v[1] = s * vec3->v[1]; mult->v[2] = s * vec3->v[2]; return mult; } /** * pgm_vec3_multiply_vec3: * @vec3: A #PgmVec3 object. * @v: A #PgmVec3 object. * * Computes the component by component multiplication @vec3 . @v. * * MT safe. * * Returns: the component by component multiplication @vec3 . @v in a newly * allocated #PgmVec3. */ PgmVec3* pgm_vec3_multiply_vec3 (PgmVec3 *vec3, const PgmVec3 *v) { PgmVec3 *mult; g_return_val_if_fail (vec3 != NULL, NULL); g_return_val_if_fail (v != NULL, NULL); mult = pgm_vec3_new (); mult->v[0] = vec3->v[0] * v->v[0]; mult->v[1] = vec3->v[1] * v->v[1]; mult->v[2] = vec3->v[2] * v->v[2]; return mult; } /** * pgm_vec3_to_string: * @vec3: A #PgmVec3 object. * * Converts @vec3 to a string representation. * * This function, as well as pgm_vec4_to_string(), returns a representation * of @vec3 in row vector notation. This is practical for most usages since * it fits in one line. * * MT safe. * * Returns: a newly allocated string representing @vec3 as a row. */ gchar* pgm_vec3_to_string (PgmVec3 *vec3) { gchar *string; g_return_val_if_fail (vec3 != NULL, NULL); string = g_strdup_printf ("[%f %f %f]", vec3->v[0], vec3->v[1], vec3->v[2]); return string; } /* 4-components vector public methods */ GType pgm_vec4_get_type (void) { static GType our_type = 0; if (G_UNLIKELY (!our_type)) our_type = g_boxed_type_register_static ("PgmVec4", (GBoxedCopyFunc) pgm_vec4_copy, (GBoxedFreeFunc) pgm_vec4_free); return our_type; } /** * pgm_vec4_new: * * Creates a new #PgmVec4 with components initilized at 0.0f. * * MT safe. * * Returns: a new #PgmVec4 instance. */ PgmVec4* pgm_vec4_new (void) { PgmVec4 *vec4; vec4 = g_slice_new0 (PgmVec4); GST_DEBUG ("created new vec4(%p:[%.1f, %.1f, %.1f, %.1f])", vec4, vec4->v[0], vec4->v[1], vec4->v[2], vec4->v[3]); return vec4; } /** * pgm_vec4_new_from_scalars: * @v0: the 1st component. * @v1: the 2nd component. * @v2: the 3rd component. * @v3: the 4th component. * * Creates a new #PgmVec4 with components initialized with the given scalars. * * MT safe. * * Returns: a new #PgmVec4 instance. */ PgmVec4* pgm_vec4_new_from_scalars (gfloat v0, gfloat v1, gfloat v2, gfloat v3) { PgmVec4 *vec4; vec4 = g_slice_new (PgmVec4); vec4->v[0] = v0; vec4->v[1] = v1; vec4->v[2] = v2; vec4->v[3] = v3; GST_DEBUG ("created new vec4(%p:[%f, %f, %f, %f])", vec4, vec4->v[0], vec4->v[1], vec4->v[2], vec4->v[3]); return vec4; } /** * pgm_vec4_copy: * @vec4: a #PgmVec4 object. * * Copies @vec4. * * MT safe. * * Returns: a newly allocated #PgmVec4. */ PgmVec4* pgm_vec4_copy (PgmVec4 *vec4) { PgmVec4 *new_vec4; g_return_val_if_fail (vec4 != NULL, NULL); new_vec4 = pgm_vec4_new (); memcpy (new_vec4, vec4, sizeof (PgmVec4)); return new_vec4; } /** * pgm_vec4_free: * @vec4: A #PgmVec4 object. * * Frees all resources used by @vec4. * * MT safe. */ void pgm_vec4_free (PgmVec4 *vec4) { g_return_if_fail (vec4 != NULL); GST_DEBUG ("freeing vec4(%p:[%f, %f, %f, %f])", vec4, vec4->v[0], vec4->v[1], vec4->v[2], vec4->v[3]); g_slice_free (PgmVec4, vec4); } /** * pgm_vec4_set_from_scalars: * @vec4: A #PgmVec4 object. * @v0: the 1st component. * @v1: the 2nd component. * @v2: the 3rd component. * @v3: the 4th component. * * Sets the components of @vec4 with the given scalars. * * MT safe. */ void pgm_vec4_set_from_scalars (PgmVec4 *vec4, gfloat v0, gfloat v1, gfloat v2, gfloat v3) { g_return_if_fail (vec4 != NULL); vec4->v[0] = v0; vec4->v[1] = v1; vec4->v[2] = v2; vec4->v[3] = v3; } /** * pgm_vec4_set_from_vec4: * @vec4: A #PgmVec4 object. * @v: A #PgmVec4 object. * * Sets the components of @vec4 with the given vector. * * MT safe. */ void pgm_vec4_set_from_vec4 (PgmVec4 *vec4, const PgmVec4 *v) { g_return_if_fail (vec4 != NULL); g_return_if_fail (v != NULL); memcpy (vec4, v, sizeof (PgmVec4)); } /** * pgm_vec4_length: * @vec4: A #PgmVec4 object. * * Retrieves the length of the vector @vec4. * * MT safe. * * Returns: the length of @vec4. */ gfloat pgm_vec4_length (PgmVec4 *vec4) { g_return_val_if_fail (vec4 != NULL, -1.0f); return (gfloat) sqrt (vec4->v[0] * vec4->v[0] + vec4->v[1] * vec4->v[1] + vec4->v[2] * vec4->v[2] + vec4->v[3] * vec4->v[3]); } /** * pgm_vec4_normalize: * @vec4: A #PgmVec4 object. * * Retrieves the normalized @vec4 vector. * * MT safe. * * Returns: the normalized @vec4 vector, or NULL if @vec4 is the zero vector. */ PgmVec4* pgm_vec4_normalize (PgmVec4 *vec4) { gfloat length; g_return_val_if_fail (vec4 != NULL, NULL); length = pgm_vec4_length (vec4); if (length == 0.0f) return NULL; length = 1.0f / length; return pgm_vec4_new_from_scalars (vec4->v[0] * length, vec4->v[1] * length, vec4->v[2] * length, vec4->v[3] * length); } /** * pgm_vec4_add_scalar: * @vec4: A #PgmVec4 object. * @s: A scalar. * * Computes the sum @vec4 + @s. * * MT safe. * * Returns: the sum @vec4 + @s in a newly allocated #PgmVec4. */ PgmVec4* pgm_vec4_add_scalar (PgmVec4 *vec4, gfloat s) { PgmVec4 *sum; g_return_val_if_fail (vec4 != NULL, NULL); sum = pgm_vec4_new (); sum->v[0] = vec4->v[0] + s; sum->v[1] = vec4->v[1] + s; sum->v[2] = vec4->v[2] + s; sum->v[3] = vec4->v[3] + s; return sum; } /** * pgm_vec4_add_vec4: * @vec4: A #PgmVec4 object. * @v: A #PgmVec4 object. * * Computes the sum @vec4 + @v. * * MT safe. * * Returns: the sum @vec4 + @v in a newly allocated #PgmVec4. */ PgmVec4* pgm_vec4_add_vec4 (PgmVec4 *vec4, const PgmVec4 *v) { PgmVec4 *sum; g_return_val_if_fail (vec4 != NULL, NULL); g_return_val_if_fail (v != NULL, NULL); sum = pgm_vec4_new (); sum->v[0] = vec4->v[0] + v->v[0]; sum->v[1] = vec4->v[1] + v->v[1]; sum->v[2] = vec4->v[2] + v->v[2]; sum->v[3] = vec4->v[3] + v->v[3]; return sum; } /** * pgm_vec4_substract_scalar: * @vec4: A #PgmVec4 object. * @s: A scalar. * * Computes the substraction @vec4 - @s. * * MT safe. * * Returns: the substraction @vec4 - @s in a newly allocated #PgmVec4. */ PgmVec4* pgm_vec4_substract_scalar (PgmVec4 *vec4, gfloat s) { PgmVec4 *sub; g_return_val_if_fail (vec4 != NULL, NULL); sub = pgm_vec4_new (); sub->v[0] = vec4->v[0] - s; sub->v[1] = vec4->v[1] - s; sub->v[2] = vec4->v[2] - s; sub->v[3] = vec4->v[3] - s; return sub; } /** * pgm_vec4_substract_vec4: * @vec4: A #PgmVec4 object. * @v: A #PgmVec4 object. * * Computes the substraction @vec4 - @v. * * MT safe. * * Returns: the substraction @vec4 - @v in a newly allocated #PgmVec4. */ PgmVec4* pgm_vec4_substract_vec4 (PgmVec4 *vec4, const PgmVec4 *v) { PgmVec4 *sub; g_return_val_if_fail (vec4 != NULL, NULL); g_return_val_if_fail (v != NULL, NULL); sub = pgm_vec4_new (); sub->v[0] = vec4->v[0] - v->v[0]; sub->v[1] = vec4->v[1] - v->v[1]; sub->v[2] = vec4->v[2] - v->v[2]; sub->v[3] = vec4->v[3] - v->v[3]; return sub; } /** * pgm_vec4_multiply_scalar: * @vec4: A #PgmVec4 object. * @s: A scalar. * * Computes the multiplication @vec4 . @s. * * MT safe. * * Returns: the multiplication @vec4 . @s in a newly allocated #PgmVec4. */ PgmVec4* pgm_vec4_multiply_scalar (PgmVec4 *vec4, gfloat s) { PgmVec4 *mult; g_return_val_if_fail (vec4 != NULL, NULL); mult = pgm_vec4_new (); mult->v[0] = s * vec4->v[0]; mult->v[1] = s * vec4->v[1]; mult->v[2] = s * vec4->v[2]; mult->v[3] = s * vec4->v[3]; return mult; } /** * pgm_vec4_multiply_vec4: * @vec4: A #PgmVec4 object. * @v: A #PgmVec4 object. * * Computes the component by component multiplication @vec4 . @v. * * MT safe. * * Returns: the component by component multiplication @vec4 . @v in a newly * allocated #PgmVec4. */ PgmVec4* pgm_vec4_multiply_vec4 (PgmVec4 *vec4, const PgmVec4 *v) { PgmVec4 *mult; g_return_val_if_fail (vec4 != NULL, NULL); g_return_val_if_fail (v != NULL, NULL); mult = pgm_vec4_new (); mult->v[0] = vec4->v[0] * v->v[0]; mult->v[1] = vec4->v[1] * v->v[1]; mult->v[2] = vec4->v[2] * v->v[2]; mult->v[3] = vec4->v[3] * v->v[3]; return mult; } /** * pgm_vec4_to_string: * @vec4: A #PgmVec4 object. * * Converts @vec4 to a string representation. * * This function, as well as pgm_vec3_to_string(), returns a representation * of @vec4 in row vector notation. This is practical for most usages since * it fits in one line. * * MT safe. * * Returns: a newly allocated string representing @vec4 as a row. */ gchar* pgm_vec4_to_string (PgmVec4 *vec4) { gchar *string; g_return_val_if_fail (vec4 != NULL, NULL); string = g_strdup_printf ("[%f %f %f %f]", vec4->v[0], vec4->v[1], vec4->v[2], vec4->v[3]); return string; } /* 3x3 matrix public methods */ GType pgm_mat3x3_get_type (void) { static GType our_type = 0; if (G_UNLIKELY (!our_type)) our_type = g_boxed_type_register_static ("PgmMat3x3", (GBoxedCopyFunc) pgm_mat3x3_copy, (GBoxedFreeFunc) pgm_mat3x3_free); return our_type; } /** * pgm_mat3x3_new: * * Creates a new #PgmMat3x3 with components initilized at 0.0f. * * MT safe. * * Returns: a new #PgmMat3x3 instance. */ PgmMat3x3* pgm_mat3x3_new (void) { PgmMat3x3 *mat3x3; mat3x3 = g_slice_new0 (PgmMat3x3); GST_DEBUG ("created new mat3x3(%p:[%.1f, %.1f, %.1f], " "[%.1f, %.1f, %.1f], [%.1f, %.1f, %.1f])", mat3x3, mat3x3->m[0], mat3x3->m[1], mat3x3->m[2], mat3x3->m[3], mat3x3->m[4], mat3x3->m[5], mat3x3->m[6], mat3x3->m[7], mat3x3->m[8]); return mat3x3; } /** * pgm_mat3x3_new_from_scalars: * @v0: the 1st component of the 1st vector. * @v1: the 2nd component of the 1st vector. * @v2: the 3rd component of the 1st vector. * @v3: the 1st component of the 2nd vector. * @v4: the 2nd component of the 2nd vector. * @v5: the 3rd component of the 2nd vector. * @v6: the 1st component of the 3rd vector. * @v7: the 2nd component of the 3rd vector. * @v8: the 3rd component of the 3rd vector. * * Creates a new #PgmMat3x3 with components initialized with the given scalars. * * MT safe. * * Returns: a new #PgmMat3x3 instance. */ PgmMat3x3* pgm_mat3x3_new_from_scalars (gfloat v0, gfloat v1, gfloat v2, gfloat v3, gfloat v4, gfloat v5, gfloat v6, gfloat v7, gfloat v8) { PgmMat3x3 *mat3x3; mat3x3 = g_slice_new (PgmMat3x3); mat3x3->m[0]=v0; mat3x3->m[1]=v1; mat3x3->m[2]=v2; mat3x3->m[3]=v3; mat3x3->m[4]=v4; mat3x3->m[5]=v5; mat3x3->m[6]=v6; mat3x3->m[7]=v7; mat3x3->m[8]=v8; GST_DEBUG ("created new mat3x3(%p:[%f, %f, %f], [%f, %f, %f], [%f, %f, %f])", mat3x3, mat3x3->m[0], mat3x3->m[1], mat3x3->m[2], mat3x3->m[3], mat3x3->m[4], mat3x3->m[5], mat3x3->m[6], mat3x3->m[7], mat3x3->m[8]); return mat3x3; } /** * pgm_mat3x3_new_from_vec3: * @v0: the 1st vector. * @v1: the 2nd vector. * @v2: the 3rd vector. * * Creates a new #PgmMat3x3 with components initialized with the given vectors. * * MT safe. * * Returns: a new #PgmMat3x3 instance. */ PgmMat3x3* pgm_mat3x3_new_from_vec3 (const PgmVec3 *v0, const PgmVec3 *v1, const PgmVec3 *v2) { PgmMat3x3 *mat3x3; g_return_val_if_fail (v0 != NULL, NULL); g_return_val_if_fail (v1 != NULL, NULL); g_return_val_if_fail (v2 != NULL, NULL); mat3x3 = g_slice_new (PgmMat3x3); mat3x3->m[0]=v0->v[0]; mat3x3->m[1]=v0->v[1]; mat3x3->m[2]=v0->v[2]; mat3x3->m[3]=v1->v[0]; mat3x3->m[4]=v1->v[1]; mat3x3->m[5]=v1->v[2]; mat3x3->m[6]=v2->v[0]; mat3x3->m[7]=v2->v[1]; mat3x3->m[8]=v2->v[2]; GST_DEBUG ("created new mat3x3(%p:[%f, %f, %f], [%f, %f, %f], [%f, %f, %f])", mat3x3, mat3x3->m[0], mat3x3->m[1], mat3x3->m[2], mat3x3->m[3], mat3x3->m[4], mat3x3->m[5], mat3x3->m[6], mat3x3->m[7], mat3x3->m[8]); return mat3x3; } /** * pgm_mat3x3_new_identity: * * Creates a new #PgmMat3x3 identity matrix. * * MT safe. * * Returns: a new #PgmMat3x3 instance. */ PgmMat3x3* pgm_mat3x3_new_identity (void) { PgmMat3x3 *mat3x3; mat3x3 = g_slice_new0 (PgmMat3x3); mat3x3->m[0] = 1.0f; mat3x3->m[4] = 1.0f; mat3x3->m[8] = 1.0f; GST_DEBUG ("created new mat3x3(%p:[%.1f, %.1f, %.1f], " "[%.1f, %.1f, %.1f], [%.1f, %.1f, %.1f])", mat3x3, mat3x3->m[0], mat3x3->m[1], mat3x3->m[2], mat3x3->m[3], mat3x3->m[4], mat3x3->m[5], mat3x3->m[6], mat3x3->m[7], mat3x3->m[8]); return mat3x3; } /** * pgm_mat3x3_copy: * @mat3x3: a #PgmMat3x3 object. * * Copies @mat3x3. * * MT safe. * * Returns: a newly allocated #PgmMat3x3. */ PgmMat3x3* pgm_mat3x3_copy (PgmMat3x3 *mat3x3) { PgmMat3x3 *new_mat3x3; g_return_val_if_fail (mat3x3 != NULL, NULL); new_mat3x3 = pgm_mat3x3_new (); memcpy (new_mat3x3, mat3x3, sizeof (PgmMat3x3)); return new_mat3x3; } /** * pgm_mat3x3_free: * @mat3x3: A #PgmMat3x3 object. * * Frees all resources used by @mat3x3. * * MT safe. */ void pgm_mat3x3_free (PgmMat3x3 *mat3x3) { g_return_if_fail (mat3x3 != NULL); GST_DEBUG ("freeing mat3x3(%p:[%f, %f, %f], [%f, %f, %f], [%f, %f, %f])", mat3x3, mat3x3->m[0], mat3x3->m[1], mat3x3->m[2], mat3x3->m[3], mat3x3->m[4], mat3x3->m[5], mat3x3->m[6], mat3x3->m[7], mat3x3->m[8]); g_slice_free (PgmMat3x3, mat3x3); } /** * pgm_mat3x3_set_from_scalars: * @mat3x3: A #PgmMat3x3 object. * @v0: the 1st component of the 1st vector. * @v1: the 2nd component of the 1st vector. * @v2: the 3rd component of the 1st vector. * @v3: the 1st component of the 2nd vector. * @v4: the 2nd component of the 2nd vector. * @v5: the 3rd component of the 2nd vector. * @v6: the 1st component of the 3rd vector. * @v7: the 2nd component of the 3rd vector. * @v8: the 3rd component of the 3rd vector. * * Set the components of @mat3x3 with the given scalars. * * MT safe. */ void pgm_mat3x3_set_from_scalars (PgmMat3x3 *mat3x3, gfloat v0, gfloat v1, gfloat v2, gfloat v3, gfloat v4, gfloat v5, gfloat v6, gfloat v7, gfloat v8) { g_return_if_fail (mat3x3 != NULL); mat3x3->m[0]=v0; mat3x3->m[1]=v1; mat3x3->m[2]=v2; mat3x3->m[3]=v3; mat3x3->m[4]=v4; mat3x3->m[5]=v5; mat3x3->m[6]=v6; mat3x3->m[7]=v7; mat3x3->m[8]=v8; } /** * pgm_mat3x3_set_from_vec3: * @mat3x3: A #PgmMat3x3 object. * @v0: the 1st vector. * @v1: the 1st vector. * @v2: the 1st vector. * * Set the components of @mat3x3 with the given vectors. * * MT safe. */ void pgm_mat3x3_set_from_vec3 (PgmMat3x3 *mat3x3, const PgmVec3 *v0, const PgmVec3 *v1, const PgmVec3 *v2) { g_return_if_fail (mat3x3 != NULL); g_return_if_fail (v0 != NULL); g_return_if_fail (v1 != NULL); g_return_if_fail (v2 != NULL); mat3x3->m[0]=v0->v[0]; mat3x3->m[1]=v0->v[1]; mat3x3->m[2]=v0->v[2]; mat3x3->m[3]=v1->v[0]; mat3x3->m[4]=v1->v[1]; mat3x3->m[5]=v1->v[2]; mat3x3->m[6]=v2->v[0]; mat3x3->m[7]=v2->v[1]; mat3x3->m[8]=v2->v[2]; } /** * pgm_mat3x3_set_from_mat3x3: * @mat3x3: A #PgmMat3x3 object. * @m: A #PgmMat3x3 object. * * Sets the components of @mat3x3 with the given matrix. * * MT safe. */ void pgm_mat3x3_set_from_mat3x3 (PgmMat3x3 *mat3x3, const PgmMat3x3 *m) { g_return_if_fail (mat3x3 != NULL); g_return_if_fail (m != NULL); memcpy (mat3x3, m, sizeof (PgmMat3x3)); } /** * pgm_mat3x3_is_identity: * @mat3x3: A #PgmMat3x3 object. * * Retrieves whether or not @mat3x3 is the identity matrix. * * MT safe. * * Returns: #TRUE if @mat3x3 is the identity matrix, #FALSE otherwise. */ gboolean pgm_mat3x3_is_identity (PgmMat3x3 *mat3x3) { g_return_val_if_fail (mat3x3 != NULL, FALSE); return (mat3x3->m[0]==1.0f && mat3x3->m[1]==0.0f && mat3x3->m[2]==0.0f && mat3x3->m[3]==0.0f && mat3x3->m[4]==1.0f && mat3x3->m[5]==0.0f && mat3x3->m[6]==0.0f && mat3x3->m[7]==0.0f && mat3x3->m[8]==1.0f); } /** * pgm_mat3x3_inverse: * @mat3x3: A #PgmMat3x3 object. * * Retrieves the inverted @mat3x3 matrix. * * MT safe. * * Returns: the inverted @mat3x3 in a newly allocated #PgmMat3x3. */ PgmMat3x3* pgm_mat3x3_inverse (PgmMat3x3 *mat3x3) { /* FIXME */ return NULL; } /** * pgm_mat3x3_transpose: * @mat3x3: A #PgmMat3x3 object. * * Retrieves the transposed @mat3x3 matrix. * * MT safe. * * Returns: the transposed @mat3x3 in a newly allocated #PgmMat3x3. */ PgmMat3x3* pgm_mat3x3_transpose (PgmMat3x3 *mat3x3) { g_return_val_if_fail (mat3x3 != NULL, NULL); return pgm_mat3x3_new_from_scalars (mat3x3->m[0], mat3x3->m[3], mat3x3->m[6], mat3x3->m[1], mat3x3->m[4], mat3x3->m[7], mat3x3->m[2], mat3x3->m[5], mat3x3->m[8]); } /** * pgm_mat3x3_add_scalar: * @mat3x3: A #PgmMat3x3 object. * @s: A scalar. * * Computes the sum @mat3x3 + @s. * * MT safe. * * Returns: the sum @mat3x3 + @s in a newly allocated #PgmMat3x3. */ PgmMat3x3* pgm_mat3x3_add_scalar (PgmMat3x3 *mat3x3, gfloat s) { PgmMat3x3 *sum; g_return_val_if_fail (mat3x3 != NULL, NULL); sum = pgm_mat3x3_new (); sum->m[0] = s + mat3x3->m[0]; sum->m[1] = s + mat3x3->m[1]; sum->m[2] = s + mat3x3->m[2]; sum->m[3] = s + mat3x3->m[3]; sum->m[4] = s + mat3x3->m[4]; sum->m[5] = s + mat3x3->m[5]; sum->m[6] = s + mat3x3->m[6]; sum->m[7] = s + mat3x3->m[7]; sum->m[8] = s + mat3x3->m[8]; return sum; } /** * pgm_mat3x3_add_mat3x3: * @mat3x3: A #PgmMat3x3 object. * @m: A #PgmMat3x3 object. * * Computes the sum @mat3x3 + @m. * * MT safe. * * Returns: the sum @mat3x3 + @m in a newly allocated #PgmMat3x3. */ PgmMat3x3* pgm_mat3x3_add_mat3x3 (PgmMat3x3 *mat3x3, const PgmMat3x3 *m) { PgmMat3x3 *sum; g_return_val_if_fail (mat3x3 != NULL, NULL); g_return_val_if_fail (m != NULL, NULL); sum = pgm_mat3x3_new (); sum->m[0] = m->m[0] + mat3x3->m[0]; sum->m[1] = m->m[1] + mat3x3->m[1]; sum->m[2] = m->m[2] + mat3x3->m[2]; sum->m[3] = m->m[3] + mat3x3->m[3]; sum->m[4] = m->m[4] + mat3x3->m[4]; sum->m[5] = m->m[5] + mat3x3->m[5]; sum->m[6] = m->m[6] + mat3x3->m[6]; sum->m[7] = m->m[7] + mat3x3->m[7]; sum->m[8] = m->m[8] + mat3x3->m[8]; return sum; } /** * pgm_mat3x3_substract_scalar: * @mat3x3: A #PgmMat3x3 object. * @s: A scalar. * * Computes the substraction @mat3x3 - @s. * * MT safe. * * Returns: the substraction @mat3x3 - @s in a newly allocated #PgmMat3x3. */ PgmMat3x3* pgm_mat3x3_substract_scalar (PgmMat3x3 *mat3x3, gfloat s) { PgmMat3x3 *sub; g_return_val_if_fail (mat3x3 != NULL, NULL); sub = pgm_mat3x3_new (); sub->m[0] = mat3x3->m[0] - s; sub->m[1] = mat3x3->m[1] - s; sub->m[2] = mat3x3->m[2] - s; sub->m[3] = mat3x3->m[3] - s; sub->m[4] = mat3x3->m[4] - s; sub->m[5] = mat3x3->m[5] - s; sub->m[6] = mat3x3->m[6] - s; sub->m[7] = mat3x3->m[7] - s; sub->m[8] = mat3x3->m[8] - s; return sub; } /** * pgm_mat3x3_substract_mat3x3: * @mat3x3: A #PgmMat3x3 object. * @m: A #PgmMat3x3 object. * * Computes the substraction @mat3x3 - @m. * * MT safe. * * Returns: the substraction @mat3x3 - @m in a newly allocated #PgmMat3x3. */ PgmMat3x3* pgm_mat3x3_substract_mat3x3 (PgmMat3x3 *mat3x3, const PgmMat3x3 *m) { PgmMat3x3 *sub; g_return_val_if_fail (mat3x3 != NULL, NULL); g_return_val_if_fail (m != NULL, NULL); sub = pgm_mat3x3_new (); sub->m[0] = mat3x3->m[0] - m->m[0]; sub->m[1] = mat3x3->m[1] - m->m[1]; sub->m[2] = mat3x3->m[2] - m->m[2]; sub->m[3] = mat3x3->m[3] - m->m[3]; sub->m[4] = mat3x3->m[4] - m->m[4]; sub->m[5] = mat3x3->m[5] - m->m[5]; sub->m[6] = mat3x3->m[6] - m->m[6]; sub->m[7] = mat3x3->m[7] - m->m[7]; sub->m[8] = mat3x3->m[8] - m->m[8]; return sub; } /** * pgm_mat3x3_multiply_scalar: * @mat3x3: A #PgmMat3x3 object. * @s: A scalar. * * Computes the multiplication @mat3x3 . @s. * * MT safe. * * Returns: the multiplication @mat3x3 . @s in a newly allocated #PgmMat3x3. */ PgmMat3x3* pgm_mat3x3_multiply_scalar (PgmMat3x3 *mat3x3, gfloat s) { PgmMat3x3 *mult; g_return_val_if_fail (mat3x3 != NULL, NULL); mult = pgm_mat3x3_new (); mult->m[0] = s * mat3x3->m[0]; mult->m[1] = s * mat3x3->m[1]; mult->m[2] = s * mat3x3->m[2]; mult->m[3] = s * mat3x3->m[3]; mult->m[4] = s * mat3x3->m[4]; mult->m[5] = s * mat3x3->m[5]; mult->m[6] = s * mat3x3->m[6]; mult->m[7] = s * mat3x3->m[7]; mult->m[8] = s * mat3x3->m[8]; return mult; } /** * pgm_mat3x3_multiply_vec3: * @mat3x3: A #PgmMat3x3 object. * @v: A #PgmVec3 object. * * Computes the multiplication @mat3x3 . @v. * * MT safe. * * Returns: the multiplication @mat3x3 . @v in a newly allocated #PgmVec3. */ PgmVec3* pgm_mat3x3_multiply_vec3 (PgmMat3x3 *mat3x3, const PgmVec3 *v) { PgmMat3x3 *m; PgmVec3 *mult; g_return_val_if_fail (mat3x3 != NULL, NULL); g_return_val_if_fail (v != NULL, NULL); mult = pgm_vec3_new (); m = mat3x3; mult->v[0] = m->m[0]*v->v[0] + m->m[1]*v->v[1] + m->m[2]*v->v[2]; mult->v[1] = m->m[3]*v->v[0] + m->m[4]*v->v[1] + m->m[5]*v->v[2]; mult->v[2] = m->m[6]*v->v[0] + m->m[7]*v->v[1] + m->m[8]*v->v[2]; return mult; } /** * pgm_mat3x3_multiply_mat3x3: * @mat3x3: A #PgmMat3x3 object. * @m: A #PgmMat3x3 object. * * Computes the multiplication @mat3x3 . @m. Note that it is a * post-multiplication of @mat3x3 by @m. * * MT safe. * * Returns: the multiplication @mat3x3 . @m in a newly allocated #PgmMat3x3. */ PgmMat3x3* pgm_mat3x3_multiply_mat3x3 (PgmMat3x3 *mat3x3, const PgmMat3x3 *m) { PgmMat3x3 *mult, *m1; const PgmMat3x3 *m2; g_return_val_if_fail (mat3x3 != NULL, NULL); g_return_val_if_fail (m != NULL, NULL); mult = pgm_mat3x3_new (); m1 = mat3x3; m2 = m; mult->m[0] = m1->m[0]*m2->m[0] + m1->m[1]*m2->m[3] + m1->m[2]*m2->m[6]; mult->m[1] = m1->m[0]*m2->m[1] + m1->m[1]*m2->m[4] + m1->m[2]*m2->m[7]; mult->m[2] = m1->m[0]*m2->m[2] + m1->m[1]*m2->m[5] + m1->m[2]*m2->m[8]; mult->m[3] = m1->m[3]*m2->m[0] + m1->m[4]*m2->m[3] + m1->m[5]*m2->m[6]; mult->m[4] = m1->m[3]*m2->m[1] + m1->m[4]*m2->m[4] + m1->m[5]*m2->m[7]; mult->m[5] = m1->m[3]*m2->m[2] + m1->m[4]*m2->m[5] + m1->m[5]*m2->m[8]; mult->m[6] = m1->m[6]*m2->m[0] + m1->m[7]*m2->m[3] + m1->m[8]*m2->m[6]; mult->m[7] = m1->m[6]*m2->m[1] + m1->m[7]*m2->m[4] + m1->m[8]*m2->m[7]; mult->m[8] = m1->m[6]*m2->m[2] + m1->m[7]*m2->m[5] + m1->m[8]*m2->m[8]; return mult; } /** * pgm_mat3x3_to_string: * @mat3x3: A #PgmMat3x3 object. * * Converts @mat3x3 to a string representation. * * MT safe. * * Returns: a newly allocated string representing @mat3x3. */ gchar* pgm_mat3x3_to_string (PgmMat3x3 *mat3x3) { gchar *string; g_return_val_if_fail (mat3x3 != NULL, NULL); string = g_strdup_printf ("[%f %f %f]\n" "|%f %f %f|\n" "[%f %f %f]", mat3x3->m[0], mat3x3->m[1], mat3x3->m[2], mat3x3->m[3], mat3x3->m[4], mat3x3->m[5], mat3x3->m[6], mat3x3->m[7], mat3x3->m[8]); return string; } /* 4x4 matrix public methods */ GType pgm_mat4x4_get_type (void) { static GType our_type = 0; if (G_UNLIKELY (!our_type)) our_type = g_boxed_type_register_static ("PgmMat4x4", (GBoxedCopyFunc) pgm_mat4x4_copy, (GBoxedFreeFunc) pgm_mat4x4_free); return our_type; } /** * pgm_mat4x4_new: * * Creates a new #PgmMat4x4 with components initilized at 0.0f. * * MT safe. * * Returns: a new #PgmMat4x4 instance. */ PgmMat4x4* pgm_mat4x4_new (void) { PgmMat4x4 *mat4x4; mat4x4 = g_slice_new0 (PgmMat4x4); GST_DEBUG ("created new mat4x4(%p:" "[%.1f, %.1f, %.1f, %.1f], [%.1f, %.1f, %.1f, %.1f], " "[%.1f, %.1f, %.1f, %.1f], [%.1f, %.1f, %.1f, %.1f])", mat4x4, mat4x4->m[0], mat4x4->m[1], mat4x4->m[2], mat4x4->m[3], mat4x4->m[4], mat4x4->m[5], mat4x4->m[6], mat4x4->m[7], mat4x4->m[8], mat4x4->m[9], mat4x4->m[10], mat4x4->m[11], mat4x4->m[12], mat4x4->m[13], mat4x4->m[14], mat4x4->m[15]); return mat4x4; } /** * pgm_mat4x4_new_from_scalars: * @v0: the 1st component of the 1st vector. * @v1: the 2nd component of the 1st vector. * @v2: the 3rd component of the 1st vector. * @v3: the 4th component of the 1st vector. * @v4: the 1st component of the 2nd vector. * @v5: the 2nd component of the 2nd vector. * @v6: the 3rd component of the 2nd vector. * @v7: the 4th component of the 2nd vector. * @v8: the 1st component of the 3rd vector. * @v9: the 2nd component of the 3rd vector. * @v10: the 3rd component of the 3rd vector. * @v11: the 4th component of the 3rd vector. * @v12: the 1st component of the 4th vector. * @v13: the 2nd component of the 4th vector. * @v14: the 3rd component of the 4th vector. * @v15: the 4th component of the 4th vector. * * Creates a new #PgmMat4x4 with components initialized with the given scalars. * * MT safe. * * Returns: a new #PgmMat4x4 instance. */ PgmMat4x4* pgm_mat4x4_new_from_scalars (gfloat v0, gfloat v1, gfloat v2, gfloat v3, gfloat v4, gfloat v5, gfloat v6, gfloat v7, gfloat v8, gfloat v9, gfloat v10, gfloat v11, gfloat v12, gfloat v13, gfloat v14, gfloat v15) { PgmMat4x4 *mat4x4; mat4x4 = g_slice_new (PgmMat4x4); mat4x4->m[0]=v0; mat4x4->m[1]=v1; mat4x4->m[2]=v2; mat4x4->m[3]=v3; mat4x4->m[4]=v4; mat4x4->m[5]=v5; mat4x4->m[6]=v6; mat4x4->m[7]=v7; mat4x4->m[8]=v8; mat4x4->m[9]=v9; mat4x4->m[10]=v10; mat4x4->m[11]=v11; mat4x4->m[12]=v12; mat4x4->m[13]=v13; mat4x4->m[14]=v14; mat4x4->m[15]=v15; GST_DEBUG ("created new mat4x4(%p:" "[%f, %f, %f, %f], [%f, %f, %f, %f], " "[%f, %f, %f, %f], [%f, %f, %f, %f])", mat4x4, mat4x4->m[0], mat4x4->m[1], mat4x4->m[2], mat4x4->m[3], mat4x4->m[4], mat4x4->m[5], mat4x4->m[6], mat4x4->m[7], mat4x4->m[8], mat4x4->m[9], mat4x4->m[10], mat4x4->m[11], mat4x4->m[12], mat4x4->m[13], mat4x4->m[14], mat4x4->m[15]); return mat4x4; } /** * pgm_mat4x4_new_from_vec4: * @v0: the 1st vector. * @v1: the 2nd vector. * @v2: the 3rd vector. * @v3: the 4th vector. * * Creates a new #PgmMat4x4 with components initialized with the given vectors. * * MT safe. * * Returns: a new #PgmMat4x4 instance. */ PgmMat4x4* pgm_mat4x4_new_from_vec4 (const PgmVec4 *v0, const PgmVec4 *v1, const PgmVec4 *v2, const PgmVec4 *v3) { PgmMat4x4 *mat4x4; g_return_val_if_fail (v0 != NULL, NULL); g_return_val_if_fail (v1 != NULL, NULL); g_return_val_if_fail (v2 != NULL, NULL); g_return_val_if_fail (v3 != NULL, NULL); mat4x4 = g_slice_new (PgmMat4x4); mat4x4->m[0]=v0->v[0]; mat4x4->m[1]=v0->v[1]; mat4x4->m[2]=v0->v[2]; mat4x4->m[3]=v0->v[3]; mat4x4->m[4]=v1->v[0]; mat4x4->m[5]=v1->v[1]; mat4x4->m[6]=v1->v[2]; mat4x4->m[7]=v1->v[3]; mat4x4->m[8]=v2->v[0]; mat4x4->m[9]=v2->v[1]; mat4x4->m[10]=v2->v[2]; mat4x4->m[11]=v2->v[3]; mat4x4->m[12]=v3->v[0]; mat4x4->m[13]=v3->v[1]; mat4x4->m[14]=v3->v[2]; mat4x4->m[15]=v3->v[3]; GST_DEBUG ("created new mat4x4(%p:" "[%f, %f, %f, %f], [%f, %f, %f, %f], " "[%f, %f, %f, %f], [%f, %f, %f, %f])", mat4x4, mat4x4->m[0], mat4x4->m[1], mat4x4->m[2], mat4x4->m[3], mat4x4->m[4], mat4x4->m[5], mat4x4->m[6], mat4x4->m[7], mat4x4->m[8], mat4x4->m[9], mat4x4->m[10], mat4x4->m[11], mat4x4->m[12], mat4x4->m[13], mat4x4->m[14], mat4x4->m[15]); return mat4x4; } /** * pgm_mat4x4_new_identity: * * Creates a new #PgmMat4x4 identity matrix. * * MT safe. * * Returns: a new #PgmMat4x4 instance. */ PgmMat4x4* pgm_mat4x4_new_identity (void) { PgmMat4x4 *mat4x4; mat4x4 = g_slice_new0 (PgmMat4x4); mat4x4->m[0] = 1.0f; mat4x4->m[5] = 1.0f; mat4x4->m[10] = 1.0f; mat4x4->m[15] = 1.0f; GST_DEBUG ("created new mat4x4(%p:" "[%.1f, %.1f, %.1f, %.1f], [%.1f, %.1f, %.1f, %.1f], " "[%.1f, %.1f, %.1f, %.1f], [%.1f, %.1f, %.1f, %.1f])", mat4x4, mat4x4->m[0], mat4x4->m[1], mat4x4->m[2], mat4x4->m[3], mat4x4->m[4], mat4x4->m[5], mat4x4->m[6], mat4x4->m[7], mat4x4->m[8], mat4x4->m[9], mat4x4->m[10], mat4x4->m[11], mat4x4->m[12], mat4x4->m[13], mat4x4->m[14], mat4x4->m[15]); return mat4x4; } /** * pgm_mat4x4_new_predefined: * @predefined: The predefined 4x4 matrix. * * Creates a new #PgmMat4x4 matrix corresponding to @predefined. * * MT safe. * * Returns: a new #PgmMat4x4 instance. */ PgmMat4x4* pgm_mat4x4_new_predefined (PgmMat4x4Predefined predefined) { PgmMat4x4 *mat4x4 = NULL; switch (predefined) { case PGM_MAT4X4_FLIP_HORIZONTAL: mat4x4 = pgm_mat4x4_new_from_scalars (MAT4X4_FLIP_HORIZ_SCALARS); break; case PGM_MAT4X4_FLIP_VERTICAL: mat4x4 = pgm_mat4x4_new_from_scalars (MAT4X4_FLIP_VERT_SCALARS); break; case PGM_MAT4X4_ROTATE_CLOCKWISE: mat4x4 = pgm_mat4x4_new_from_scalars (MAT4X4_ROTATE_CW_SCALARS); break; case PGM_MAT4X4_ROTATE_COUNTER_CLOCKWISE: mat4x4 = pgm_mat4x4_new_from_scalars (MAT4X4_ROTATE_CCW_SCALARS); break; default: break; } return mat4x4; } /** * pgm_mat4x4_new_translate_from_vec3: * @t: A #PgmVec3 object representing the translation. * * Creates a new #PgmMat4x4 translation matrix. * * MT safe. * * Returns: a new #PgmMat4x4 instance. */ PgmMat4x4* pgm_mat4x4_new_translate_from_vec3 (const PgmVec3 *t) { PgmMat4x4 *mat4x4; g_return_val_if_fail (t != NULL, NULL); mat4x4 = g_slice_new0 (PgmMat4x4); mat4x4->m[0] = 1.0f; mat4x4->m[3] = t->v[0]; mat4x4->m[5] = 1.0f; mat4x4->m[7] = t->v[1]; mat4x4->m[10] = 1.0f; mat4x4->m[11] = t->v[2]; mat4x4->m[15] = 1.0f; GST_DEBUG ("created new mat4x4(%p:" "[%f, %f, %f, %f], [%f, %f, %f, %f], " "[%f, %f, %f, %f], [%f, %f, %f, %f])", mat4x4, mat4x4->m[0], mat4x4->m[1], mat4x4->m[2], mat4x4->m[3], mat4x4->m[4], mat4x4->m[5], mat4x4->m[6], mat4x4->m[7], mat4x4->m[8], mat4x4->m[9], mat4x4->m[10], mat4x4->m[11], mat4x4->m[12], mat4x4->m[13], mat4x4->m[14], mat4x4->m[15]); return mat4x4; } /** * pgm_mat4x4_new_translate_from_scalars: * @tx: The translation on the x cardinal axis. * @ty: The translation on the y cardinal axis. * @tz: The translation on the z cardinal axis. * * Creates a new #PgmMat4x4 translation matrix. * * MT safe. * * Returns: a new #PgmMat4x4 instance. */ PgmMat4x4* pgm_mat4x4_new_translate_from_scalars (gfloat tx, gfloat ty, gfloat tz) { PgmMat4x4 *mat4x4; mat4x4 = g_slice_new0 (PgmMat4x4); mat4x4->m[0] = 1.0f; mat4x4->m[3] = tx; mat4x4->m[5] = 1.0f; mat4x4->m[7] = ty; mat4x4->m[10] = 1.0f; mat4x4->m[11] = tz; mat4x4->m[15] = 1.0f; GST_DEBUG ("created new mat4x4(%p:" "[%f, %f, %f, %f], [%f, %f, %f, %f], " "[%f, %f, %f, %f], [%f, %f, %f, %f])", mat4x4, mat4x4->m[0], mat4x4->m[1], mat4x4->m[2], mat4x4->m[3], mat4x4->m[4], mat4x4->m[5], mat4x4->m[6], mat4x4->m[7], mat4x4->m[8], mat4x4->m[9], mat4x4->m[10], mat4x4->m[11], mat4x4->m[12], mat4x4->m[13], mat4x4->m[14], mat4x4->m[15]); return mat4x4; } /** * pgm_mat4x4_new_scale_from_vec3: * @s: A #PgmVec3 object representing the scaling. * * Creates a new #PgmMat4x4 scaling matrix. * * MT safe. * * Returns: a new #PgmMat4x4 instance. */ PgmMat4x4* pgm_mat4x4_new_scale_from_vec3 (const PgmVec3 *s) { PgmMat4x4 *mat4x4; g_return_val_if_fail (s != NULL, NULL); mat4x4 = g_slice_new0 (PgmMat4x4); mat4x4->m[0] = s->v[0]; mat4x4->m[5] = s->v[1]; mat4x4->m[10] = s->v[2]; mat4x4->m[15] = 1.0f; GST_DEBUG ("created new mat4x4(%p:" "[%f, %f, %f, %f], [%f, %f, %f, %f], " "[%f, %f, %f, %f], [%f, %f, %f, %f])", mat4x4, mat4x4->m[0], mat4x4->m[1], mat4x4->m[2], mat4x4->m[3], mat4x4->m[4], mat4x4->m[5], mat4x4->m[6], mat4x4->m[7], mat4x4->m[8], mat4x4->m[9], mat4x4->m[10], mat4x4->m[11], mat4x4->m[12], mat4x4->m[13], mat4x4->m[14], mat4x4->m[15]); return mat4x4; } /** * pgm_mat4x4_new_scale_from_scalars: * @sx: The scale on the x cardinal axis. * @sy: The scale on the y cardinal axis. * @sz: The scale on the z cardinal axis. * * Creates a new #PgmMat4x4 scaling matrix. * * MT safe. * * Returns: a new #PgmMat4x4 instance. */ PgmMat4x4* pgm_mat4x4_new_scale_from_scalars (gfloat sx, gfloat sy, gfloat sz) { PgmMat4x4 *mat4x4; mat4x4 = g_slice_new0 (PgmMat4x4); mat4x4->m[0] = sx; mat4x4->m[5] = sy; mat4x4->m[10] = sz; mat4x4->m[15] = 1.0f; GST_DEBUG ("created new mat4x4(%p:" "[%f, %f, %f, %f], [%f, %f, %f, %f], " "[%f, %f, %f, %f], [%f, %f, %f, %f])", mat4x4, mat4x4->m[0], mat4x4->m[1], mat4x4->m[2], mat4x4->m[3], mat4x4->m[4], mat4x4->m[5], mat4x4->m[6], mat4x4->m[7], mat4x4->m[8], mat4x4->m[9], mat4x4->m[10], mat4x4->m[11], mat4x4->m[12], mat4x4->m[13], mat4x4->m[14], mat4x4->m[15]); return mat4x4; } /** * pgm_mat4x4_new_rotate_x: * @angle: The angle of rotation, in radians. * * Creates a new #PgmMat4x4 matrix for a rotation about the x cardinal axis. * * MT safe. * * Returns: a new #PgmMat4x4 instance. */ PgmMat4x4* pgm_mat4x4_new_rotate_x (gfloat angle) { PgmMat4x4 *mat4x4; gfloat s, c; mat4x4 = g_slice_new0 (PgmMat4x4); PGM_SINCOS (angle, &s, &c); mat4x4->m[0] = 1.0f; mat4x4->m[5] = c; mat4x4->m[6] = -s; mat4x4->m[9] = s; mat4x4->m[10] = c; mat4x4->m[15] = 1.0f; GST_DEBUG ("created new mat4x4(%p:" "[%f, %f, %f, %f], [%f, %f, %f, %f], " "[%f, %f, %f, %f], [%f, %f, %f, %f])", mat4x4, mat4x4->m[0], mat4x4->m[1], mat4x4->m[2], mat4x4->m[3], mat4x4->m[4], mat4x4->m[5], mat4x4->m[6], mat4x4->m[7], mat4x4->m[8], mat4x4->m[9], mat4x4->m[10], mat4x4->m[11], mat4x4->m[12], mat4x4->m[13], mat4x4->m[14], mat4x4->m[15]); return mat4x4; } /** * pgm_mat4x4_new_rotate_y: * @angle: The angle of rotation, in radians. * * Creates a new #PgmMat4x4 matrix for a rotation about the y cardinal axis. * * MT safe. * * Returns: a new #PgmMat4x4 instance. */ PgmMat4x4* pgm_mat4x4_new_rotate_y (gfloat angle) { PgmMat4x4 *mat4x4; gfloat s, c; mat4x4 = g_slice_new0 (PgmMat4x4); PGM_SINCOS (angle, &s, &c); mat4x4->m[0] = c; mat4x4->m[2] = s; mat4x4->m[5] = 1.0f; mat4x4->m[8] = -s; mat4x4->m[10] = c; mat4x4->m[15] = 1.0f; GST_DEBUG ("created new mat4x4(%p:" "[%f, %f, %f, %f], [%f, %f, %f, %f], " "[%f, %f, %f, %f], [%f, %f, %f, %f])", mat4x4, mat4x4->m[0], mat4x4->m[1], mat4x4->m[2], mat4x4->m[3], mat4x4->m[4], mat4x4->m[5], mat4x4->m[6], mat4x4->m[7], mat4x4->m[8], mat4x4->m[9], mat4x4->m[10], mat4x4->m[11], mat4x4->m[12], mat4x4->m[13], mat4x4->m[14], mat4x4->m[15]); return mat4x4; } /** * pgm_mat4x4_new_rotate_z: * @angle: The angle of rotation, in radians. * * Creates a new #PgmMat4x4 matrix for a rotation about the z cardinal axis. * * MT safe. * * Returns: a new #PgmMat4x4 instance. */ PgmMat4x4* pgm_mat4x4_new_rotate_z (gfloat angle) { PgmMat4x4 *mat4x4; gfloat s, c; mat4x4 = g_slice_new0 (PgmMat4x4); PGM_SINCOS (angle, &s, &c); mat4x4->m[0] = c; mat4x4->m[1] = -s; mat4x4->m[4] = s; mat4x4->m[5] = c; mat4x4->m[10] = 1.0f; mat4x4->m[15] = 1.0f; GST_DEBUG ("created new mat4x4(%p:" "[%f, %f, %f, %f], [%f, %f, %f, %f], " "[%f, %f, %f, %f], [%f, %f, %f, %f])", mat4x4, mat4x4->m[0], mat4x4->m[1], mat4x4->m[2], mat4x4->m[3], mat4x4->m[4], mat4x4->m[5], mat4x4->m[6], mat4x4->m[7], mat4x4->m[8], mat4x4->m[9], mat4x4->m[10], mat4x4->m[11], mat4x4->m[12], mat4x4->m[13], mat4x4->m[14], mat4x4->m[15]); return mat4x4; } /** * pgm_mat4x4_new_rotate_axis_from_vec3: * @angle: The angle of rotation, in radians. * @axis: A #PgmVec3 object representing the axis of rotation. * * Creates a new #PgmMat4x4 matrix for a rotation about @axis. * * MT safe. * * Returns: a new #PgmMat4x4 instance. */ PgmMat4x4* pgm_mat4x4_new_rotate_axis_from_vec3 (gfloat angle, const PgmVec3 *axis) { PgmMat4x4 *mat4x4; gfloat s, c, a, ax, ay, az; g_return_val_if_fail (axis != NULL, NULL); mat4x4 = g_slice_new0 (PgmMat4x4); PGM_SINCOS (angle, &s, &c); a = 1.0f - c; ax = a * axis->v[0]; ay = a * axis->v[1]; az = a * axis->v[2]; mat4x4->m[0] = ax * axis->v[0] + c; mat4x4->m[1] = ax * axis->v[1] - axis->v[2] * s; mat4x4->m[2] = ax * axis->v[2] + axis->v[1] * s; mat4x4->m[4] = ay * axis->v[0] + axis->v[2] * s; mat4x4->m[5] = ay * axis->v[1] + c; mat4x4->m[6] = ay * axis->v[2] - axis->v[0] * s; mat4x4->m[8] = az * axis->v[0] - axis->v[1] * s; mat4x4->m[9] = az * axis->v[1] + axis->v[0] * s; mat4x4->m[10] = az * axis->v[2] + c; mat4x4->m[15] = 1.0f; GST_DEBUG ("created new mat4x4(%p:" "[%f, %f, %f, %f], [%f, %f, %f, %f], " "[%f, %f, %f, %f], [%f, %f, %f, %f])", mat4x4, mat4x4->m[0], mat4x4->m[1], mat4x4->m[2], mat4x4->m[3], mat4x4->m[4], mat4x4->m[5], mat4x4->m[6], mat4x4->m[7], mat4x4->m[8], mat4x4->m[9], mat4x4->m[10], mat4x4->m[11], mat4x4->m[12], mat4x4->m[13], mat4x4->m[14], mat4x4->m[15]); return mat4x4; } /** * pgm_mat4x4_new_rotate_axis_from_scalars: * @angle: The angle of rotation, in radians. * @axis_x: The x component of the axis of rotation. * @axis_y: The y component of the axis of rotation. * @axis_z: The z component of the axis of rotation. * * Creates a new #PgmMat4x4 matrix for a rotation about the given axis. * * MT safe. * * Returns: a new #PgmMat4x4 instance. */ PgmMat4x4* pgm_mat4x4_new_rotate_axis_from_scalars (gfloat angle, gfloat axis_x, gfloat axis_y, gfloat axis_z) { PgmMat4x4 *mat4x4; gfloat s, c, a, ax, ay, az; mat4x4 = g_slice_new0 (PgmMat4x4); PGM_SINCOS (angle, &s, &c); a = 1.0f - c; ax = a * axis_x; ay = a * axis_y; az = a * axis_z; mat4x4->m[0] = ax * axis_x + c; mat4x4->m[1] = ax * axis_y - axis_z * s; mat4x4->m[2] = ax * axis_z + axis_y * s; mat4x4->m[4] = ay * axis_x + axis_z * s; mat4x4->m[5] = ay * axis_y + c; mat4x4->m[6] = ay * axis_z - axis_x * s; mat4x4->m[8] = az * axis_x - axis_y * s; mat4x4->m[9] = az * axis_y + axis_x * s; mat4x4->m[10] = az * axis_z + c; mat4x4->m[15] = 1.0f; GST_DEBUG ("created new mat4x4(%p:" "[%f, %f, %f, %f], [%f, %f, %f, %f], " "[%f, %f, %f, %f], [%f, %f, %f, %f])", mat4x4, mat4x4->m[0], mat4x4->m[1], mat4x4->m[2], mat4x4->m[3], mat4x4->m[4], mat4x4->m[5], mat4x4->m[6], mat4x4->m[7], mat4x4->m[8], mat4x4->m[9], mat4x4->m[10], mat4x4->m[11], mat4x4->m[12], mat4x4->m[13], mat4x4->m[14], mat4x4->m[15]); return mat4x4; } /** * pgm_mat4x4_copy: * @mat4x4: a #PgmMat4x4 object. * * Copies @mat4x4. * * MT safe. * * Returns: a newly allocated #PgmMat4x4. */ PgmMat4x4* pgm_mat4x4_copy (PgmMat4x4 *mat4x4) { PgmMat4x4 *new_mat4x4; g_return_val_if_fail (mat4x4 != NULL, NULL); new_mat4x4 = pgm_mat4x4_new (); memcpy (new_mat4x4, mat4x4, sizeof (PgmMat4x4)); return new_mat4x4; } /** * pgm_mat4x4_free: * @mat4x4: A #PgmMat4x4 object. * * Frees all resources used by @mat4x4. * * MT safe. */ void pgm_mat4x4_free (PgmMat4x4 *mat4x4) { g_return_if_fail (mat4x4 != NULL); GST_DEBUG ("freeing mat4x4(%p:" "[%f, %f, %f, %f], [%f, %f, %f, %f], " "[%f, %f, %f, %f], [%f, %f, %f, %f])", mat4x4, mat4x4->m[0], mat4x4->m[1], mat4x4->m[2], mat4x4->m[3], mat4x4->m[4], mat4x4->m[5], mat4x4->m[6], mat4x4->m[7], mat4x4->m[8], mat4x4->m[9], mat4x4->m[10], mat4x4->m[11], mat4x4->m[12], mat4x4->m[13], mat4x4->m[14], mat4x4->m[15]); g_slice_free (PgmMat4x4, mat4x4); } /** * pgm_mat4x4_set_from_scalars: * @mat4x4: A #PgmMat4x4 object. * @v0: the 1st component of the 1st vector. * @v1: the 2nd component of the 1st vector. * @v2: the 3rd component of the 1st vector. * @v3: the 4th component of the 1st vector. * @v4: the 1st component of the 2nd vector. * @v5: the 2nd component of the 2nd vector. * @v6: the 3rd component of the 2nd vector. * @v7: the 4th component of the 2nd vector. * @v8: the 1st component of the 3rd vector. * @v9: the 2nd component of the 3rd vector. * @v10: the 3rd component of the 3rd vector. * @v11: the 4th component of the 3rd vector. * @v12: the 1st component of the 4th vector. * @v13: the 2nd component of the 4th vector. * @v14: the 3rd component of the 4th vector. * @v15: the 4th component of the 4th vector. * * Set the components of @mat4x4 with the given scalars. * * MT safe. */ void pgm_mat4x4_set_from_scalars (PgmMat4x4 *mat4x4, gfloat v0, gfloat v1, gfloat v2, gfloat v3, gfloat v4, gfloat v5, gfloat v6, gfloat v7, gfloat v8, gfloat v9, gfloat v10, gfloat v11, gfloat v12, gfloat v13, gfloat v14, gfloat v15) { g_return_if_fail (mat4x4 != NULL); mat4x4->m[0]=v0; mat4x4->m[1]=v1; mat4x4->m[2]=v2; mat4x4->m[3]=v3; mat4x4->m[4]=v4; mat4x4->m[5]=v5; mat4x4->m[6]=v6; mat4x4->m[7]=v7; mat4x4->m[8]=v8; mat4x4->m[9]=v9; mat4x4->m[10]=v10; mat4x4->m[11]=v11; mat4x4->m[12]=v12; mat4x4->m[13]=v13; mat4x4->m[14]=v14; mat4x4->m[15]=v15; } /** * pgm_mat4x4_set_from_vec4: * @mat4x4: A #PgmMat4x4 object. * @v0: the 1st vector. * @v1: the 2nd vector. * @v2: the 3rd vector. * @v3: the 4th vector. * * Set the components of @mat4x4 with the given vectors. * * MT safe. */ void pgm_mat4x4_set_from_vec4 (PgmMat4x4 *mat4x4, const PgmVec4 *v0, const PgmVec4 *v1, const PgmVec4 *v2, const PgmVec4 *v3) { g_return_if_fail (mat4x4 != NULL); g_return_if_fail (v0 != NULL); g_return_if_fail (v1 != NULL); g_return_if_fail (v2 != NULL); g_return_if_fail (v3 != NULL); mat4x4->m[0]=v0->v[0]; mat4x4->m[1]=v0->v[1]; mat4x4->m[2]=v0->v[2]; mat4x4->m[3]=v0->v[3]; mat4x4->m[4]=v1->v[0]; mat4x4->m[5]=v1->v[1]; mat4x4->m[6]=v1->v[2]; mat4x4->m[7]=v1->v[3]; mat4x4->m[8]=v2->v[0]; mat4x4->m[9]=v2->v[1]; mat4x4->m[10]=v2->v[2]; mat4x4->m[11]=v2->v[3]; mat4x4->m[12]=v3->v[0]; mat4x4->m[13]=v3->v[1]; mat4x4->m[14]=v3->v[2]; mat4x4->m[15]=v3->v[3]; } /** * pgm_mat4x4_set_from_mat4x4: * @mat4x4: A #PgmMat4x4 object. * @m: A #PgmMat4x4 object. * * Sets the components of @mat4x4 with the given matrix. * * MT safe. */ void pgm_mat4x4_set_from_mat4x4 (PgmMat4x4 *mat4x4, const PgmMat4x4 *m) { g_return_if_fail (mat4x4 != NULL); g_return_if_fail (m != NULL); memcpy (mat4x4, m, sizeof (PgmMat4x4)); } /** * pgm_mat4x4_is_identity: * @mat4x4: A #PgmMat4x4 object. * * Retrieves whether or not @mat4x4 is the identity matrix. * * MT safe. * * Returns: #TRUE if @mat4x4 is the identity matrix, #FALSE otherwise. */ gboolean pgm_mat4x4_is_identity (PgmMat4x4 *mat4x4) { g_return_val_if_fail (mat4x4 != NULL, FALSE); return (mat4x4->m[0]==1.0f && mat4x4->m[1]==0.0f && mat4x4->m[2]==0.0f && mat4x4->m[3]==0.0f && mat4x4->m[4]==0.0f && mat4x4->m[5]==1.0f && mat4x4->m[6]==0.0f && mat4x4->m[7]==0.0f && mat4x4->m[8]==0.0f && mat4x4->m[9]==0.0f && mat4x4->m[10]==1.0f && mat4x4->m[11]==0.0f && mat4x4->m[12]==0.0f && mat4x4->m[13]==0.0f && mat4x4->m[14]==0.0f && mat4x4->m[15]==1.0f); } /** * pgm_mat4x4_inverse: * @mat4x4: A #PgmMat4x4 object. * * Retrieves the inverted @mat4x4 matrix. * * MT safe. * * Returns: the inverted @mat4x4 in a newly allocated #PgmMat4x4, or NULL if * @mat4x4 is non-invertible (singular). */ PgmMat4x4* pgm_mat4x4_inverse (PgmMat4x4 *mat4x4) { gfloat m0, m1, m2, m3, s; gfloat *r0, *r1, *r2, *r3; gfloat wtmp[4][8]; gfloat *tmp; /* Calculates the inverse matrix by performing the gaussian matrix * reduction with partial pivoting followed by back/substitution with * the loops manually unrolled. */ g_return_val_if_fail (mat4x4 != NULL, NULL); r0 = wtmp[0], r1 = wtmp[1], r2 = wtmp[2], r3 = wtmp[3]; r0[0] = mat4x4->m[0], r0[1] = mat4x4->m[1], r0[2] = mat4x4->m[2], r0[3] = mat4x4->m[3], r0[4] = 1.0, r0[5] = r0[6] = r0[7] = 0.0, r1[0] = mat4x4->m[4], r1[1] = mat4x4->m[5], r1[2] = mat4x4->m[6], r1[3] = mat4x4->m[7], r1[5] = 1.0, r1[4] = r1[6] = r1[7] = 0.0, r2[0] = mat4x4->m[8], r2[1] = mat4x4->m[9], r2[2] = mat4x4->m[10], r2[3] = mat4x4->m[11], r2[6] = 1.0, r2[4] = r2[5] = r2[7] = 0.0, r3[0] = mat4x4->m[12], r3[1] = mat4x4->m[13], r3[2] = mat4x4->m[14], r3[3] = mat4x4->m[15], r3[7] = 1.0, r3[4] = r3[5] = r3[6] = 0.0; /* choose pivot, or die */ if (PGM_FABSF (r3[0]) > PGM_FABSF (r2[0])) { tmp = r3; r3 = r2; r2 = tmp; } if (PGM_FABSF (r2[0]) > PGM_FABSF (r1[0])) { tmp = r2; r2 = r1; r1 = tmp; } if (PGM_FABSF (r1[0]) > PGM_FABSF (r0[0])) { tmp = r1; r1 = r0; r0 = tmp; } if (0.0 == r0[0]) return NULL; /* eliminate first variable */ m1 = r1[0]/r0[0]; m2 = r2[0]/r0[0]; m3 = r3[0]/r0[0]; s = r0[1]; r1[1] -= m1 * s; r2[1] -= m2 * s; r3[1] -= m3 * s; s = r0[2]; r1[2] -= m1 * s; r2[2] -= m2 * s; r3[2] -= m3 * s; s = r0[3]; r1[3] -= m1 * s; r2[3] -= m2 * s; r3[3] -= m3 * s; s = r0[4]; if (s != 0.0) { r1[4] -= m1 * s; r2[4] -= m2 * s; r3[4] -= m3 * s; } s = r0[5]; if (s != 0.0) { r1[5] -= m1 * s; r2[5] -= m2 * s; r3[5] -= m3 * s; } s = r0[6]; if (s != 0.0) { r1[6] -= m1 * s; r2[6] -= m2 * s; r3[6] -= m3 * s; } s = r0[7]; if (s != 0.0) { r1[7] -= m1 * s; r2[7] -= m2 * s; r3[7] -= m3 * s; } /* choose pivot, or die */ if (PGM_FABSF (r3[1]) > PGM_FABSF(r2[1])) { tmp = r3; r3 = r2; r2 = tmp; } if (PGM_FABSF (r2[1]) > PGM_FABSF(r1[1])) { tmp = r2; r2 = r1; r1 = tmp; } if (0.0 == r1[1]) return NULL; /* eliminate second variable */ m2 = r2[1]/r1[1]; m3 = r3[1]/r1[1]; r2[2] -= m2 * r1[2]; r3[2] -= m3 * r1[2]; r2[3] -= m2 * r1[3]; r3[3] -= m3 * r1[3]; s = r1[4]; if (0.0 != s) { r2[4] -= m2 * s; r3[4] -= m3 * s; } s = r1[5]; if (0.0 != s) { r2[5] -= m2 * s; r3[5] -= m3 * s; } s = r1[6]; if (0.0 != s) { r2[6] -= m2 * s; r3[6] -= m3 * s; } s = r1[7]; if (0.0 != s) { r2[7] -= m2 * s; r3[7] -= m3 * s; } /* choose pivot, or die */ if (PGM_FABSF (r3[2]) > PGM_FABSF (r2[2])) { tmp = r3; r3 = r2; r2 = tmp; } if (0.0 == r2[2]) return NULL; /* eliminate third variable */ m3 = r3[2]/r2[2]; r3[3] -= m3 * r2[3], r3[4] -= m3 * r2[4], r3[5] -= m3 * r2[5], r3[6] -= m3 * r2[6], r3[7] -= m3 * r2[7]; /* last check */ if (0.0 == r3[3]) return NULL; /* back substitute row 3 */ s = 1.0f/r3[3]; r3[4] *= s; r3[5] *= s; r3[6] *= s; r3[7] *= s; /* back substitute row 2 */ m2 = r2[3]; s = 1.0F/r2[2]; r2[4] = s * (r2[4] - r3[4] * m2), r2[5] = s * (r2[5] - r3[5] * m2), r2[6] = s * (r2[6] - r3[6] * m2), r2[7] = s * (r2[7] - r3[7] * m2); m1 = r1[3]; r1[4] -= r3[4] * m1, r1[5] -= r3[5] * m1, r1[6] -= r3[6] * m1, r1[7] -= r3[7] * m1; m0 = r0[3]; r0[4] -= r3[4] * m0, r0[5] -= r3[5] * m0, r0[6] -= r3[6] * m0, r0[7] -= r3[7] * m0; /* back substitute row 1 */ m1 = r1[2]; s = 1.0F/r1[1]; r1[4] = s * (r1[4] - r2[4] * m1), r1[5] = s * (r1[5] - r2[5] * m1), r1[6] = s * (r1[6] - r2[6] * m1), r1[7] = s * (r1[7] - r2[7] * m1); m0 = r0[2]; r0[4] -= r2[4] * m0, r0[5] -= r2[5] * m0, r0[6] -= r2[6] * m0, r0[7] -= r2[7] * m0; /* back substitute row 0 */ m0 = r0[1]; s = 1.0F/r0[0]; r0[4] = s * (r0[4] - r1[4] * m0), r0[5] = s * (r0[5] - r1[5] * m0), r0[6] = s * (r0[6] - r1[6] * m0), r0[7] = s * (r0[7] - r1[7] * m0); return pgm_mat4x4_new_from_scalars (r0[4], r0[5], r0[6], r0[7], r1[4], r1[5], r1[6], r1[7], r2[4], r2[5], r2[6], r2[7], r3[4], r3[5], r3[6], r3[7]); } /** * pgm_mat4x4_transpose: * @mat4x4: A #PgmMat4x4 object. * * Retrieves the transposed @mat4x4 matrix. * * MT safe. * * Returns: the transposed @mat4x4 in a newly allocated #PgmMat4x4. */ PgmMat4x4* pgm_mat4x4_transpose (PgmMat4x4 *mat4x4) { g_return_val_if_fail (mat4x4 != NULL, NULL); return pgm_mat4x4_new_from_scalars (mat4x4->m[0], mat4x4->m[4], mat4x4->m[8], mat4x4->m[12], mat4x4->m[1], mat4x4->m[5], mat4x4->m[9], mat4x4->m[13], mat4x4->m[2], mat4x4->m[6], mat4x4->m[10], mat4x4->m[14], mat4x4->m[3], mat4x4->m[7], mat4x4->m[11], mat4x4->m[15]); } /** * pgm_mat4x4_translate_from_vec3: * @mat4x4: A #PgmMat4x4 object. * @t: A #PgmVec3 object representing the translation to apply. * * Post multiplies @mat4x4 by a translation matrix with the product replacing * @mat4x4. * * MT safe. */ void pgm_mat4x4_translate_from_vec3 (PgmMat4x4 *mat4x4, const PgmVec3 *t) { g_return_if_fail (mat4x4 != NULL); g_return_if_fail (t != NULL); mat4x4->m[3] = mat4x4->m[0]*t->v[0] + mat4x4->m[1]*t->v[1] + mat4x4->m[2]*t->v[2] + mat4x4->m[3]; mat4x4->m[7] = mat4x4->m[4]*t->v[0] + mat4x4->m[5]*t->v[1] + mat4x4->m[6]*t->v[2] + mat4x4->m[7]; mat4x4->m[11] = mat4x4->m[8]*t->v[0] + mat4x4->m[9]*t->v[1] + mat4x4->m[10]*t->v[2] + mat4x4->m[11]; mat4x4->m[15] = mat4x4->m[12]*t->v[0] + mat4x4->m[13]*t->v[1] + mat4x4->m[14]*t->v[2] + mat4x4->m[15]; } /** * pgm_mat4x4_translate_from_scalars: * @mat4x4: A #PgmMat4x4 object. * @tx: The translation on the x cardinal axis. * @ty: The translation on the y cardinal axis. * @tz: The translation on the z cardinal axis. * * Post multiplies @mat4x4 by a translation matrix with the product replacing * @mat4x4. * * MT safe. */ void pgm_mat4x4_translate_from_scalars (PgmMat4x4 *mat4x4, gfloat tx, gfloat ty, gfloat tz) { g_return_if_fail (mat4x4 != NULL); mat4x4->m[3] = mat4x4->m[0]*tx + mat4x4->m[1]*ty + mat4x4->m[2]*tz + mat4x4->m[3]; mat4x4->m[7] = mat4x4->m[4]*tx + mat4x4->m[5]*ty + mat4x4->m[6]*tz + mat4x4->m[7]; mat4x4->m[11] = mat4x4->m[8]*tx + mat4x4->m[9]*ty + mat4x4->m[10]*tz + mat4x4->m[11]; mat4x4->m[15] = mat4x4->m[12]*tx + mat4x4->m[13]*ty + mat4x4->m[14]*tz + mat4x4->m[15]; } /** * pgm_mat4x4_scale_from_vec3: * @mat4x4: A #PgmMat4x4 object. * @s: A #PgmVec3 object representing the scale to apply. * * Post multiplies @mat4x4 by a scaling matrix with the product replacing * @mat4x4. * * MT safe. */ void pgm_mat4x4_scale_from_vec3 (PgmMat4x4 *mat4x4, const PgmVec3 *s) { g_return_if_fail (mat4x4 != NULL); g_return_if_fail (s != NULL); mat4x4->m[0] *= s->v[0]; mat4x4->m[1] *= s->v[1]; mat4x4->m[2] *= s->v[2]; mat4x4->m[4] *= s->v[0]; mat4x4->m[5] *= s->v[1]; mat4x4->m[6] *= s->v[2]; mat4x4->m[8] *= s->v[0]; mat4x4->m[9] *= s->v[1]; mat4x4->m[10] *= s->v[2]; mat4x4->m[12] *= s->v[0]; mat4x4->m[13] *= s->v[1]; mat4x4->m[14] *= s->v[2]; } /** * pgm_mat4x4_scale_from_scalars: * @mat4x4: A #PgmMat4x4 object. * @sx: The scale to apply on the x axis. * @sy: The scale to apply on the y axis. * @sz: The scale to apply on the z axis. * * Post multiplies @mat4x4 by a scaling matrix with the product replacing * @mat4x4. * * MT safe. */ void pgm_mat4x4_scale_from_scalars (PgmMat4x4 *mat4x4, gfloat sx, gfloat sy, gfloat sz) { g_return_if_fail (mat4x4 != NULL); mat4x4->m[0] *= sx; mat4x4->m[1] *= sy; mat4x4->m[2] *= sz; mat4x4->m[4] *= sx; mat4x4->m[5] *= sy; mat4x4->m[6] *= sz; mat4x4->m[8] *= sx; mat4x4->m[9] *= sy; mat4x4->m[10] *= sz; mat4x4->m[12] *= sx; mat4x4->m[13] *= sy; mat4x4->m[14] *= sz; } /** * pgm_mat4x4_rotate_x: * @mat4x4: A #PgmMat4x4 object. * @angle: The angle of rotation, in radians. * * Post multiplies @mat4x4 by a rotation matrix with the product replacing * @mat4x4. * * MT safe. */ void pgm_mat4x4_rotate_x (PgmMat4x4 *mat4x4, gfloat angle) { PgmMat4x4 rot, mult; gfloat s, c; g_return_if_fail (mat4x4 != NULL); PGM_SINCOS (angle, &s, &c); rot.m[0]=1.0f; rot.m[1]=0.0f; rot.m[2]=0.0f; rot.m[3]=0.0f; rot.m[4]=0.0f; rot.m[5]=c; rot.m[6]=-s; rot.m[7]=0.0f; rot.m[8]=0.0f; rot.m[9]=s; rot.m[10]=c; rot.m[11]=0.0f; rot.m[12]=0.0f; rot.m[13]=0.0f; rot.m[14]=0.0f; rot.m[15]=1.0f; mat4x4_multiply_mat4x4_mat4x4 (&mult, mat4x4, &rot); pgm_mat4x4_set_from_mat4x4 (mat4x4, &mult); } /** * pgm_mat4x4_rotate_y: * @mat4x4: A #PgmMat4x4 object. * @angle: The angle of rotation, in radians. * * Post multiplies @mat4x4 by a rotation matrix with the product replacing * @mat4x4. * * MT safe. */ void pgm_mat4x4_rotate_y (PgmMat4x4 *mat4x4, gfloat angle) { PgmMat4x4 rot, mult; gfloat s, c; g_return_if_fail (mat4x4 != NULL); PGM_SINCOS (angle, &s, &c); rot.m[0]=c; rot.m[1]=0.0f; rot.m[2]=s; rot.m[3]=0.0f; rot.m[4]=0.0f; rot.m[5]=1.0f; rot.m[6]=0.0f; rot.m[7]=0.0f; rot.m[8]=-s; rot.m[9]=0.0f; rot.m[10]=c; rot.m[11]=0.0f; rot.m[12]=0.0f; rot.m[13]=0.0f; rot.m[14]=0.0f; rot.m[15]=1.0f; mat4x4_multiply_mat4x4_mat4x4 (&mult, mat4x4, &rot); pgm_mat4x4_set_from_mat4x4 (mat4x4, &mult); } /** * pgm_mat4x4_rotate_z: * @mat4x4: A #PgmMat4x4 object. * @angle: The angle of rotation, in radians. * * Post multiplies @mat4x4 by a rotation matrix with the product replacing * @mat4x4. * * MT safe. */ void pgm_mat4x4_rotate_z (PgmMat4x4 *mat4x4, gfloat angle) { PgmMat4x4 rot, mult; gfloat s, c; g_return_if_fail (mat4x4 != NULL); PGM_SINCOS (angle, &s, &c); rot.m[0]=c; rot.m[1]=-s; rot.m[2]=0.0f; rot.m[3]=0.0f; rot.m[4]=s; rot.m[5]=c; rot.m[6]=0.0f; rot.m[7]=0.0f; rot.m[8]=0.0f; rot.m[9]=0.0f; rot.m[10]=1.0f; rot.m[11]=0.0f; rot.m[12]=0.0f; rot.m[13]=0.0f; rot.m[14]=0.0f; rot.m[15]=1.0f; mat4x4_multiply_mat4x4_mat4x4 (&mult, mat4x4, &rot); pgm_mat4x4_set_from_mat4x4 (mat4x4, &mult); } /** * pgm_mat4x4_rotate_axis_from_vec3: * @mat4x4: A #PgmMat4x4 object. * @angle: The angle of rotation, in radians. * @axis: A #PgmVec3 object representing the axis of rotation. * * Post multiplies @mat4x4 by a rotation matrix with the product replacing * @mat4x4. * * MT safe. */ void pgm_mat4x4_rotate_axis_from_vec3 (PgmMat4x4 *mat4x4, gfloat angle, const PgmVec3 *axis) { PgmMat4x4 rot, mult; gfloat s, c, a, ax, ay, az; g_return_if_fail (mat4x4 != NULL); g_return_if_fail (axis != NULL); PGM_SINCOS (angle, &s, &c); a = 1.0f - c; ax = a * axis->v[0]; ay = a * axis->v[1]; az = a * axis->v[2]; rot.m[0] = ax * axis->v[0] + c; rot.m[1] = ax * axis->v[1] - axis->v[2] * s; rot.m[2] = ax * axis->v[2] + axis->v[1] * s; rot.m[3] = 0.0f; rot.m[4] = ay * axis->v[0] + axis->v[2] * s; rot.m[5] = ay * axis->v[1] + c; rot.m[6] = ay * axis->v[2] - axis->v[0] * s; rot.m[7] = 0.0f; rot.m[8] = az * axis->v[0] - axis->v[1] * s; rot.m[9] = az * axis->v[1] + axis->v[0] * s; rot.m[10] = az * axis->v[2] + c; rot.m[11] = 0.0f; rot.m[12] = 0.0f; rot.m[13] = 0.0f; rot.m[14] = 0.0f; rot.m[15] = 1.0f; mat4x4_multiply_mat4x4_mat4x4 (&mult, mat4x4, &rot); pgm_mat4x4_set_from_mat4x4 (mat4x4, &mult); } /** * pgm_mat4x4_rotate_axis_from_scalars: * @mat4x4: A #PgmMat4x4 object. * @angle: The angle of rotation, in radians. * @axis_x: The x component of the axis of rotation. * @axis_y: The y component of the axis of rotation. * @axis_z: The z component of the axis of rotation. * * Post multiplies @mat4x4 by a rotation matrix with the product replacing * @mat4x4. * * MT safe. */ void pgm_mat4x4_rotate_axis_from_scalars (PgmMat4x4 *mat4x4, gfloat angle, gfloat axis_x, gfloat axis_y, gfloat axis_z) { PgmMat4x4 rot, mult; gfloat s, c, a, ax, ay, az; g_return_if_fail (mat4x4 != NULL); PGM_SINCOS (angle, &s, &c); a = 1.0f - c; ax = a * axis_x; ay = a * axis_y; az = a * axis_z; rot.m[0] = ax * axis_x + c; rot.m[1] = ax * axis_y - axis_z * s; rot.m[2] = ax * axis_z + axis_y * s; rot.m[3] = 0.0f; rot.m[4] = ay * axis_x + axis_z * s; rot.m[5] = ay * axis_y + c; rot.m[6] = ay * axis_z - axis_x * s; rot.m[7] = 0.0f; rot.m[8] = az * axis_x - axis_y * s; rot.m[9] = az * axis_y + axis_x * s; rot.m[10] = az * axis_z + c; rot.m[11] = 0.0f; rot.m[12] = 0.0f; rot.m[13] = 0.0f; rot.m[14] = 0.0f; rot.m[15] = 1.0f; mat4x4_multiply_mat4x4_mat4x4 (&mult, mat4x4, &rot); pgm_mat4x4_set_from_mat4x4 (mat4x4, &mult); } /** * pgm_mat4x4_add_scalar: * @mat4x4: A #PgmMat4x4 object. * @s: A scalar. * * Computes the sum @mat4x4 + @s. * * MT safe. * * Returns: the sum @mat4x4 + @s in a newly allocated #PgmMat4x4. */ PgmMat4x4* pgm_mat4x4_add_scalar (PgmMat4x4 *mat4x4, gfloat s) { PgmMat4x4 *sum; g_return_val_if_fail (mat4x4 != NULL, NULL); sum = pgm_mat4x4_new (); sum->m[0] = mat4x4->m[0] + s; sum->m[1] = mat4x4->m[1] + s; sum->m[2] = mat4x4->m[2] + s; sum->m[3] = mat4x4->m[3] + s; sum->m[4] = mat4x4->m[4] + s; sum->m[5] = mat4x4->m[5] + s; sum->m[6] = mat4x4->m[6] + s; sum->m[7] = mat4x4->m[7] + s; sum->m[8] = mat4x4->m[8] + s; sum->m[9] = mat4x4->m[9] + s; sum->m[10] = mat4x4->m[10] + s; sum->m[11] = mat4x4->m[11] + s; sum->m[12] = mat4x4->m[12] + s; sum->m[13] = mat4x4->m[13] + s; sum->m[14] = mat4x4->m[14] + s; sum->m[15] = mat4x4->m[15] + s; return sum; } /** * pgm_mat4x4_add_mat4x4: * @mat4x4: A #PgmMat4x4 object. * @m: A #PgmMat4x4 object. * * Computes the sum @mat4x4 + @m. * * MT safe. * * Returns: the sum @mat4x4 + @m in a newly allocated #PgmMat4x4. */ PgmMat4x4* pgm_mat4x4_add_mat4x4 (PgmMat4x4 *mat4x4, const PgmMat4x4 *m) { PgmMat4x4 *sum; g_return_val_if_fail (mat4x4 != NULL, NULL); g_return_val_if_fail (m != NULL, NULL); sum = pgm_mat4x4_new (); sum->m[0] = mat4x4->m[0] + m->m[0]; sum->m[1] = mat4x4->m[1] + m->m[1]; sum->m[2] = mat4x4->m[2] + m->m[2]; sum->m[3] = mat4x4->m[3] + m->m[3]; sum->m[4] = mat4x4->m[4] + m->m[4]; sum->m[5] = mat4x4->m[5] + m->m[5]; sum->m[6] = mat4x4->m[6] + m->m[6]; sum->m[7] = mat4x4->m[7] + m->m[7]; sum->m[8] = mat4x4->m[8] + m->m[8]; sum->m[9] = mat4x4->m[9] + m->m[9]; sum->m[10] = mat4x4->m[10] + m->m[10]; sum->m[11] = mat4x4->m[11] + m->m[11]; sum->m[12] = mat4x4->m[12] + m->m[12]; sum->m[13] = mat4x4->m[13] + m->m[13]; sum->m[14] = mat4x4->m[14] + m->m[14]; sum->m[15] = mat4x4->m[15] + m->m[15]; return sum; } /** * pgm_mat4x4_substract_scalar: * @mat4x4: A #PgmMat4x4 object. * @s: A scalar. * * Computes the substraction @mat4x4 - @s. * * MT safe. * * Returns: the substraction @mat4x4 - @s in a newly allocated #PgmMat4x4. */ PgmMat4x4* pgm_mat4x4_substract_scalar (PgmMat4x4 *mat4x4, gfloat s) { PgmMat4x4 *sub; g_return_val_if_fail (mat4x4 != NULL, NULL); sub = pgm_mat4x4_new (); sub->m[0] = mat4x4->m[0] - s; sub->m[1] = mat4x4->m[1] - s; sub->m[2] = mat4x4->m[2] - s; sub->m[3] = mat4x4->m[3] - s; sub->m[4] = mat4x4->m[4] - s; sub->m[5] = mat4x4->m[5] - s; sub->m[6] = mat4x4->m[6] - s; sub->m[7] = mat4x4->m[7] - s; sub->m[8] = mat4x4->m[8] - s; sub->m[9] = mat4x4->m[9] - s; sub->m[10] = mat4x4->m[10] - s; sub->m[11] = mat4x4->m[11] - s; sub->m[12] = mat4x4->m[12] - s; sub->m[13] = mat4x4->m[13] - s; sub->m[14] = mat4x4->m[14] - s; sub->m[15] = mat4x4->m[15] - s; return sub; } /** * pgm_mat4x4_substract_mat4x4: * @mat4x4: A #PgmMat4x4 object. * @m: A #PgmMat4x4 object. * * Computes the substraction @mat4x4 - @m. * * MT safe. * * Returns: the substraction @mat4x4 - @m in a newly allocated #PgmMat4x4. */ PgmMat4x4* pgm_mat4x4_substract_mat4x4 (PgmMat4x4 *mat4x4, const PgmMat4x4 *m) { PgmMat4x4 *sub; g_return_val_if_fail (mat4x4 != NULL, NULL); g_return_val_if_fail (m != NULL, NULL); sub = pgm_mat4x4_new (); sub->m[0] = mat4x4->m[0] - m->m[0]; sub->m[1] = mat4x4->m[1] - m->m[1]; sub->m[2] = mat4x4->m[2] - m->m[2]; sub->m[3] = mat4x4->m[3] - m->m[3]; sub->m[4] = mat4x4->m[4] - m->m[4]; sub->m[5] = mat4x4->m[5] - m->m[5]; sub->m[6] = mat4x4->m[6] - m->m[6]; sub->m[7] = mat4x4->m[7] - m->m[7]; sub->m[8] = mat4x4->m[8] - m->m[8]; sub->m[9] = mat4x4->m[9] - m->m[9]; sub->m[10] = mat4x4->m[10] - m->m[10]; sub->m[11] = mat4x4->m[11] - m->m[11]; sub->m[12] = mat4x4->m[12] - m->m[12]; sub->m[13] = mat4x4->m[13] - m->m[13]; sub->m[14] = mat4x4->m[14] - m->m[14]; sub->m[15] = mat4x4->m[15] - m->m[15]; return sub; } /** * pgm_mat4x4_multiply_scalar: * @mat4x4: A #PgmMat4x4 object. * @s: A scalar. * * Computes the multiplication @mat4x4 . @s. * * MT safe. * * Returns: the multiplication @mat4x4 . @s in a newly allocated #PgmMat4x4. */ PgmMat4x4* pgm_mat4x4_multiply_scalar (PgmMat4x4 *mat4x4, gfloat s) { PgmMat4x4 *mult; g_return_val_if_fail (mat4x4 != NULL, NULL); mult = pgm_mat4x4_new (); mult->m[0] = s * mat4x4->m[0]; mult->m[1] = s * mat4x4->m[1]; mult->m[2] = s * mat4x4->m[2]; mult->m[3] = s * mat4x4->m[3]; mult->m[4] = s * mat4x4->m[4]; mult->m[5] = s * mat4x4->m[5]; mult->m[6] = s * mat4x4->m[6]; mult->m[7] = s * mat4x4->m[7]; mult->m[8] = s * mat4x4->m[8]; mult->m[9] = s * mat4x4->m[9]; mult->m[10] = s * mat4x4->m[10]; mult->m[11] = s * mat4x4->m[11]; mult->m[12] = s * mat4x4->m[12]; mult->m[13] = s * mat4x4->m[13]; mult->m[14] = s * mat4x4->m[14]; mult->m[15] = s * mat4x4->m[15]; return mult; } /** * pgm_mat4x4_multiply_vec4: * @mat4x4: A #PgmMat4x4 object. * @v: A #PgmVec4 object. * * Computes the multiplication @mat4x4 . @v. * * MT safe. * * Returns: the multiplication @mat4x4 . @v in a newly allocated #PgmVec4. */ PgmVec4* pgm_mat4x4_multiply_vec4 (PgmMat4x4 *mat4x4, const PgmVec4 *v) { PgmMat4x4 *m; PgmVec4 *mult; g_return_val_if_fail (mat4x4 != NULL, NULL); g_return_val_if_fail (v != NULL, NULL); mult = pgm_vec4_new (); m = mat4x4; mult->v[0] = m->m[0]*v->v[0] + m->m[1]*v->v[1] + m->m[2]*v->v[2] + m->m[3]*v->v[3]; mult->v[1] = m->m[4]*v->v[0] + m->m[5]*v->v[1] + m->m[6]*v->v[2] + m->m[7]*v->v[3]; mult->v[2] = m->m[8]*v->v[0] + m->m[9]*v->v[1] + m->m[10]*v->v[2] + m->m[11]*v->v[3]; mult->v[3] = m->m[12]*v->v[0] + m->m[13]*v->v[1] + m->m[14]*v->v[2] + m->m[15]*v->v[3]; return mult; } /** * pgm_mat4x4_multiply_mat4x4: * @mat4x4: A #PgmMat4x4 object. * @m: A #PgmMat4x4 object. * * Computes the multiplication @mat4x4 . @m. Note that this a * post-multiplication of @mat4x4 by @m. * * MT safe. * * Returns: the multiplication @mat4x4 . @m in a newly allocated #PgmMat4x4. */ PgmMat4x4* pgm_mat4x4_multiply_mat4x4 (PgmMat4x4 *mat4x4, const PgmMat4x4 *m) { PgmMat4x4 *mult; g_return_val_if_fail (mat4x4 != NULL, NULL); g_return_val_if_fail (m != NULL, NULL); mult = pgm_mat4x4_new (); mat4x4_multiply_mat4x4_mat4x4 (mult, mat4x4, m); return mult; } /** * pgm_mat4x4_to_string: * @mat4x4: A #PgmMat4x4 object. * * Converts @mat4x4 to a string representation. * * MT safe. * * Returns: a newly allocated string representing @mat4x4. */ gchar* pgm_mat4x4_to_string (PgmMat4x4 *mat4x4) { gchar *string; g_return_val_if_fail (mat4x4 != NULL, NULL); string = g_strdup_printf ("[%f, %f, %f, %f]\n" "|%f, %f, %f, %f|\n" "|%f, %f, %f, %f|\n" "[%f, %f, %f, %f]", mat4x4->m[0], mat4x4->m[1], mat4x4->m[2], mat4x4->m[3], mat4x4->m[4], mat4x4->m[5], mat4x4->m[6], mat4x4->m[7], mat4x4->m[8], mat4x4->m[9], mat4x4->m[10], mat4x4->m[11], mat4x4->m[12], mat4x4->m[13], mat4x4->m[14], mat4x4->m[15]); return string; } /* Utility functions */ /** * pgm_intersection_line_plane: * @l1: A #PgmVec3 representing a 1st point of the line. * @l2: A #PgmVec3 representing a 2nd point of the line. * @p: A #PgmVec3 representing point of the plane. * @pu: A #PgmVec3 representing a 1st vector colinear to the plane. * @pv: A #PgmVec3 representing a 2nd vector colinear to the plane. * * Retrieves the intersection point of the line defined by @l1 and @l2 with * the plane defined by @p, @pu and @pv. * * @pu and @pv must not be colinear. If the line belongs to the plane then * it's considered as if there is no intersection. * * MT safe. * * Returns: the intersection point in a newly allocated #PgmVec3 if any, #NULL * otherwise. */ PgmVec3* pgm_intersection_line_plane (const PgmVec3 *l1, const PgmVec3 *l2, const PgmVec3 *p, const PgmVec3 *pu, const PgmVec3 *pv) { gfloat normal[3], ma[3], mn[3]; gfloat tmp; g_return_val_if_fail (l1 != NULL, NULL); g_return_val_if_fail (l2 != NULL, NULL); g_return_val_if_fail (p != NULL, NULL); g_return_val_if_fail (pu != NULL, NULL); g_return_val_if_fail (pv != NULL, NULL); /* The vec3 methods are not used to avoid too many memory allocations. This * function being used a lot for the mouse picking, speed is the priority. */ normal[0] = pu->v[1] * pv->v[2] - pu->v[2] * pv->v[1]; normal[1] = pu->v[2] * pv->v[0] - pu->v[0] * pv->v[2]; normal[2] = pu->v[0] * pv->v[1] - pu->v[1] * pv->v[0]; tmp = (gfloat) sqrt (normal[0]*normal[0] + normal[1]*normal[1] + normal[2]*normal[2]); if (tmp == 0.0f) return NULL; tmp = 1.0f / tmp; normal[0] *= tmp; normal[1] *= tmp; normal[2] *= tmp; mn[0] = l2->v[0] - l1->v[0]; mn[1] = l2->v[1] - l1->v[1]; mn[2] = l2->v[2] - l1->v[2]; tmp = normal[0]*mn[0] + normal[1]*mn[1] + normal[2]*mn[2]; if (tmp == 0.0f) return NULL; ma[0] = p->v[0] - l1->v[0]; ma[1] = p->v[1] - l1->v[1]; ma[2] = p->v[2] - l1->v[2]; tmp = (normal[0]*ma[0] + normal[1]*ma[1] + normal[2]*ma[2]) / tmp; return pgm_vec3_new_from_scalars (l1->v[0] + mn[0] * tmp, l1->v[1] + mn[1] * tmp, l1->v[2] + mn[2] * tmp); } /** * pgm_point_belongs_rectangle: * @p: A #PgmVec3 representing the point. * @r: A #PgmVec3 representing the top-left corner position of the rectangle. * @ru: A #PgmVec3 representing the top edge of the rectangle. * @rv: a 3 components vector defining the left edge of the rectangle. * * Retrieves if the point @p belongs to the rectangle defined by the point * @r and the vectors @ru and @rv. * * MT safe. * * Returns: #TRUE if @p belongs to the rectangle, #FALSE otherwise. */ gboolean pgm_point_belongs_rectangle (const PgmVec3 *p, const PgmVec3 *r, const PgmVec3 *ru, const PgmVec3 *rv) { PgmVec3 am; gfloat a, b; g_return_val_if_fail (p != NULL, FALSE); g_return_val_if_fail (r != NULL, FALSE); g_return_val_if_fail (ru != NULL, FALSE); g_return_val_if_fail (rv != NULL, FALSE); pgm_vec3_set_from_scalars (&am, p->v[0] - r->v[0], p->v[1] - r->v[1], p->v[2] - r->v[2]); a = ru->v[0]*am.v[0] + ru->v[1]*am.v[1] + ru->v[2]*am.v[2]; if (a < 0) return FALSE; b = rv->v[0]*am.v[0] + rv->v[1]*am.v[1] + rv->v[2]*am.v[2]; if (b < 0) return FALSE; if (a > ru->v[0]*ru->v[0] + ru->v[1]*ru->v[1] + ru->v[2]*ru->v[2]) return FALSE; if (b > rv->v[0]*rv->v[0] + rv->v[1]*rv->v[1] + rv->v[2]*rv->v[2]) return FALSE; return TRUE; } pigment-0.3.17/pgm/pgmdrawable.c0000644000175000017500000021142411205034416013402 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment media rendering library * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author(s): Loïc Molinari * Julien Moutte */ /** * SECTION:pgmdrawable * @short_description: A base class used for embedding media types. * @see_also: #PgmImage, #PgmText, #PgmCanvas. * * * * #PgmDrawable represents a visual object on which you can embed media types * such as text, images and video, or 2D graphics. It is meant to be a base * abstract class for more specific visual objects such as #PgmImage or * #PgmText. Drawables are not visible until they are added to a #PgmCanvas. * A drawable never knows about physical on screen coordinates such as pixels, * and use floating point canvas coordinates. Drawables are positioned in 3D * and then projected on a #PgmViewport. * * Manipulating drawables * * The base class implements simple drawing methods that are common to the * different subclasses. For example if you want to draw a left aligned green * text you would do something like that: * * Calling drawing functions on a drawable * * pgm_drawable_set_fg_color (text, 0, 255, 0, 255); * pgm_drawable_set_bg_color (text, 255, 0, 0, 255); * pgm_text_set_label (PGM_TEXT (text), "Hello world!"); * * * You are basically using a mix of drawable calls and text calls on the * same object at different level of the object hierarchy. * * Signal connections * * The changed signal is fired * whenever a property of a drawable is changed. There are also signals for * handling mouse picking. For instance, you just need to connect a callback to * the clicked signal to be notified * of a click on a drawable. * * * * Last reviewed on 2007-09-25 (0.3.1) */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include "pgmdrawable.h" #include "pgmcanvas.h" #include "pgmmarshal.h" #include "pgmenumtypes.h" /* Double-click delay in milliseconds */ #define DOUBLE_CLICK_DELAY 250 GST_DEBUG_CATEGORY_STATIC (pgm_drawable_debug); #define GST_CAT_DEFAULT pgm_drawable_debug /* Drawable signals */ enum { CHANGED, PRESSED, PRESSURED, RELEASED, CLICKED, DOUBLE_CLICKED, SCROLLED, DRAG_BEGIN, DRAG_MOTION, DRAG_END, MOTION, ENTERED, LEFT, LAST_SIGNAL }; /* Drawable internal flags */ enum { PGM_DRAWABLE_ROTATED = (1 << 0), PGM_DRAWABLE_SCALED = (1 << 1), PGM_DRAWABLE_PLANE_VECTORS = (1 << 2), PGM_DRAWABLE_ORIGIN = (1 << 3) }; static GstObjectClass *parent_class = NULL; static guint pgm_drawable_signals[LAST_SIGNAL] = { 0 }; /* Private methods */ /* Update the transformation matrix for a new drawable position, size or * rotation. Called with LOCK. */ static void update_transformation_matrix (PgmDrawable *drawable) { gfloat x_offset, y_offset; /* Get the offset to the center of the drawable */ x_offset = drawable->x + drawable->width * 0.5f; y_offset = drawable->y + drawable->height * 0.5f; /* Update the matrix with a translation to the center of the drawable */ pgm_mat4x4_set_from_scalars (drawable->transformation_matrix, drawable->scale, 0.0f, 0.0f, x_offset, 0.0f, drawable->scale, 0.0f, y_offset, 0.0f, 0.0f, drawable->scale, drawable->z, 0.0f, 0.0f, 0.0f, 1.0f); /* Update the rotation from the center */ pgm_mat4x4_rotate_x (drawable->transformation_matrix, drawable->angle_x); pgm_mat4x4_rotate_y (drawable->transformation_matrix, drawable->angle_y); pgm_mat4x4_rotate_z (drawable->transformation_matrix, drawable->angle_z); /* Reset the origin to the upper-left of the viewport */ pgm_mat4x4_translate_from_scalars (drawable->transformation_matrix, -x_offset, -y_offset, -drawable->z); /* drawable->origin and drawable->plane_vector_{i,j} are no longer valid */ drawable->flags &= ~(PGM_DRAWABLE_PLANE_VECTORS | PGM_DRAWABLE_ORIGIN); } /* Update plane_vector_i and plane_vector_j if needed. Called with LOCK. */ static void update_plane_vectors (PgmDrawable *drawable) { PgmVec4 canvas_i, canvas_j; PgmVec4 *drawable_i, *drawable_j; pgm_vec4_set_from_scalars (&canvas_i, 1.0f, 0.0f, 0.0f, 0.0f); pgm_vec4_set_from_scalars (&canvas_j, 0.0f, 1.0f, 0.0f, 0.0f); drawable_i = pgm_mat4x4_multiply_vec4 (drawable->transformation_matrix, &canvas_i); pgm_vec3_set_from_scalars (&drawable->plane_vector_i, drawable_i->v[0], drawable_i->v[1], drawable_i->v[2]); drawable_j = pgm_mat4x4_multiply_vec4 (drawable->transformation_matrix, &canvas_j); pgm_vec3_set_from_scalars (&drawable->plane_vector_j, drawable_j->v[0], drawable_j->v[1], drawable_j->v[2]); drawable->flags |= PGM_DRAWABLE_PLANE_VECTORS; pgm_vec4_free (drawable_i); pgm_vec4_free (drawable_j); } /* Update origin if needed. Called with LOCK. */ static void update_origin (PgmDrawable *drawable) { PgmVec4 position, *origin4; pgm_vec4_set_from_scalars (&position, drawable->x, drawable->y, drawable->z, 1.0f); origin4 = pgm_mat4x4_multiply_vec4 (drawable->transformation_matrix, &position); pgm_vec3_set_from_scalars (&drawable->origin, origin4->v[0], origin4->v[1], origin4->v[2]); drawable->flags |= PGM_DRAWABLE_ORIGIN; pgm_vec4_free (origin4); } /* Check whether or not the drag distance has been covered. * Called with LOCK. */ static gboolean is_drag_distance_covered (PgmDrawable *drawable, PgmEventMotion *event) { guchar x_distance = (guchar) fabs (drawable->viewport_press_point.v[0] - event->x); guchar y_distance = (guchar) fabs (drawable->viewport_press_point.v[1] - event->y); return (x_distance > drawable->drag_distance || y_distance > drawable->drag_distance); } /* Store the intersection between the plane defined by the drawable and a * line given by two points. Returns whether or not the intersection belongs * to the drawable. */ static gboolean get_line_intersection (PgmDrawable *drawable, PgmVec3 *intersection, PgmVec3 *p1, PgmVec3 *p2) { gboolean belongs = FALSE; PgmVec3 *v; gfloat x, y; GST_OBJECT_LOCK (drawable); if (! (drawable->flags & PGM_DRAWABLE_PLANE_VECTORS)) update_plane_vectors (drawable); if (! (drawable->flags & PGM_DRAWABLE_ORIGIN)) update_origin (drawable); GST_OBJECT_UNLOCK (drawable); /* Get intersection with the plane */ v = pgm_intersection_line_plane (p1, p2, &drawable->origin, &drawable->plane_vector_i, &drawable->plane_vector_j); if (!v) return FALSE; /* Store the intersection */ pgm_vec3_set_from_vec3 (intersection, v); /* Test if the intersection belongs to the drawable rectangle */ pgm_drawable_from_canvas (drawable, &x, &y, v->v[0], v->v[1], v->v[2]); belongs = (x >= 0.0f && x <= drawable->width && y >= 0.0f && y <= drawable->height); pgm_vec3_free (v); return belongs; } /* Emit a drawable signal from its index */ static inline gboolean emit_signal (PgmDrawable *drawable, guint signal_index, gfloat x, gfloat y, gfloat z, guint time) { gboolean stop_emission; g_signal_emit (G_OBJECT (drawable), pgm_drawable_signals[signal_index], 0, x, y, z, time, &stop_emission); return stop_emission; } /* Emit the drawable motion signal */ static inline gboolean emit_motion_signal (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, guint time) { GST_DEBUG_OBJECT (drawable, "emitting 'motion' signal"); return emit_signal (drawable, MOTION, x, y, z, time); } /* Emit the drawable entered signal */ static inline gboolean emit_entered_signal (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, guint time) { GST_DEBUG_OBJECT (drawable, "emitting 'entered' signal"); return emit_signal (drawable, ENTERED, x, y, z, time); } /* Emit the drawable left signal */ static inline void emit_left_signal (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, guint time) { GST_DEBUG_OBJECT (drawable, "emitting 'left' signal"); /* We use g_signal_emit() since left doesn't return anything */ g_signal_emit (G_OBJECT (drawable), pgm_drawable_signals[LEFT], 0, x, y, z, time); } /* GObject stuff */ G_DEFINE_ABSTRACT_TYPE (PgmDrawable, pgm_drawable, GST_TYPE_OBJECT); static void pgm_drawable_dispose (GObject *object) { PgmDrawable *drawable = PGM_DRAWABLE (object); pgm_mat4x4_free (drawable->transformation_matrix); GST_CALL_PARENT (G_OBJECT_CLASS, dispose, (object)); } static void pgm_drawable_class_init (PgmDrawableClass *klass) { GObjectClass *gobject_class = (GObjectClass *) klass; parent_class = g_type_class_peek_parent (klass); /** * PgmDrawable::changed: * @drawable: the #PgmDrawable * @property: the #PgmDrawableProperty changed in @drawable * * Will be emitted after @property of @drawable is changed. */ pgm_drawable_signals[CHANGED] = g_signal_new ("changed", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (PgmDrawableClass, changed), NULL, NULL, pgm_marshal_VOID__ENUM, G_TYPE_NONE, 1, PGM_TYPE_DRAWABLE_PROPERTY); /** * PgmDrawable::pressed: * @drawable: the #PgmDrawable * @x: the x coordinate of the point intersecting the click on @drawable * @y: the y coordinate of the point intersecting the click on @drawable * @z: the z coordinate of the point intersecting the click on @drawable * @button: the #PgmButtonType * @time: the timestamp of the button press event * @pressure: the pressure force, set to 0 when not used with a touch screen * * Will be emitted after @drawable is pressed. * * Returns: TRUE to stop other handlers from being invoked for the event. * FALSE to propagate the event further. */ pgm_drawable_signals[PRESSED] = g_signal_new ("pressed", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PgmDrawableClass, pressed), NULL, NULL, pgm_marshal_BOOLEAN__FLOAT_FLOAT_FLOAT_ENUM_UINT_UINT, G_TYPE_BOOLEAN, 6, G_TYPE_FLOAT, G_TYPE_FLOAT, G_TYPE_FLOAT, PGM_TYPE_BUTTON_TYPE, G_TYPE_UINT, G_TYPE_UINT); /** * PgmDrawable::pressured: * @drawable: the #PgmDrawable * @x: the x coordinate of the point intersecting the click on @drawable * @y: the y coordinate of the point intersecting the click on @drawable * @z: the z coordinate of the point intersecting the click on @drawable * @button: the #PgmButtonType * @time: the timestamp of the button press event * @pressure: the pressure force * * Will be emitted after the touch pressure on @drawable change. * * Returns: TRUE to stop other handlers from being invoked for the event. * FALSE to propagate the event further. */ pgm_drawable_signals[PRESSURED] = g_signal_new ("pressured", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PgmDrawableClass, pressured), NULL, NULL, pgm_marshal_BOOLEAN__FLOAT_FLOAT_FLOAT_ENUM_UINT_UINT, G_TYPE_BOOLEAN, 6, G_TYPE_FLOAT, G_TYPE_FLOAT, G_TYPE_FLOAT, PGM_TYPE_BUTTON_TYPE, G_TYPE_UINT, G_TYPE_UINT); /** * PgmDrawable::released: * @drawable: the #PgmDrawable * @x: the x coordinate of the point intersecting the click on @drawable * plane * @y: the y coordinate of the point intersecting the click on @drawable * plane * @z: the z coordinate of the point intersecting the click on @drawable * plane * @button: the #PgmButtonType * @time: the timestamp of the button release event * * Will be emitted after @drawable is released. * * Returns: TRUE to stop other handlers from being invoked for the event. * FALSE to propagate the event further. */ pgm_drawable_signals[RELEASED] = g_signal_new ("released", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PgmDrawableClass, released), NULL, NULL, pgm_marshal_BOOLEAN__FLOAT_FLOAT_FLOAT_ENUM_UINT, G_TYPE_BOOLEAN, 5, G_TYPE_FLOAT, G_TYPE_FLOAT, G_TYPE_FLOAT, PGM_TYPE_BUTTON_TYPE, G_TYPE_UINT); /** * PgmDrawable::clicked: * @drawable: the #PgmDrawable * @x: the x coordinate of the point intersecting the click on @drawable * @y: the y coordinate of the point intersecting the click on @drawable * @z: the z coordinate of the point intersecting the click on @drawable * @button: the #PgmButtonType * @time: the timestamp of the button press event * @pressure: the pressure force, set to 0 when not used with a touch screen * * Will be emitted after @drawable is clicked. * * Returns: TRUE to stop other handlers from being invoked for the event. * FALSE to propagate the event further. */ pgm_drawable_signals[CLICKED] = g_signal_new ("clicked", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PgmDrawableClass, clicked), NULL, NULL, pgm_marshal_BOOLEAN__FLOAT_FLOAT_FLOAT_ENUM_UINT_UINT, G_TYPE_BOOLEAN, 6, G_TYPE_FLOAT, G_TYPE_FLOAT, G_TYPE_FLOAT, PGM_TYPE_BUTTON_TYPE, G_TYPE_UINT, G_TYPE_UINT); /** * PgmDrawable::double-clicked: * @drawable: the #PgmDrawable * @x: the x coordinate of the point intersecting the double-click on * @drawable * @y: the y coordinate of the point intersecting the double-click on * @drawable * @z: the z coordinate of the point intersecting the double-click on * @drawable * @button: the #PgmButtonType * @time: the timestamp of the button press event * * Will be emitted after @drawable is clicked. * * Returns: TRUE to stop other handlers from being invoked for the event. * FALSE to propagate the event further. */ pgm_drawable_signals[DOUBLE_CLICKED] = g_signal_new ("double-clicked", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PgmDrawableClass, double_clicked), NULL, NULL, pgm_marshal_BOOLEAN__FLOAT_FLOAT_FLOAT_ENUM_UINT, G_TYPE_BOOLEAN, 5, G_TYPE_FLOAT, G_TYPE_FLOAT, G_TYPE_FLOAT, PGM_TYPE_BUTTON_TYPE, G_TYPE_UINT); /** * PgmDrawable::scrolled: * @drawable: the #PgmDrawable * @x: the x coordinate of the point intersecting the scroll on @drawable * @y: the y coordinate of the point intersecting the scroll on @drawable * @z: the z coordinate of the point intersecting the scroll on @drawable * @direction: the #PgmScrollDirection * @time: the timestamp of the scroll event * * Will be emitted after @drawable is scrolled. * * Returns: TRUE to stop other handlers from being invoked for the event. * FALSE to propagate the event further. */ pgm_drawable_signals[SCROLLED] = g_signal_new ("scrolled", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PgmDrawableClass, scrolled), NULL, NULL, pgm_marshal_BOOLEAN__FLOAT_FLOAT_FLOAT_ENUM_UINT, G_TYPE_BOOLEAN, 5, G_TYPE_FLOAT, G_TYPE_FLOAT, G_TYPE_FLOAT, PGM_TYPE_SCROLL_DIRECTION, G_TYPE_UINT); /** * PgmDrawable::drag-begin: * @drawable: the #PgmDrawable * @x: the x coordinate of the point intersecting the initial click on * @drawable * @y: the y coordinate of the point intersecting the initial click on * @drawable * @z: the z coordinate of the point intersecting the initial click on * @drawable * @button: the #PgmButtonType * @time: the timestamp of the motion event * @pressure: the pressure force, set to 0 when not used with a touch screen * * Will be emitted after @drawable is initially dragged. You can for instance * use that signal to change @drawable properties or store the intersecting * point for further computations during the "drag-motion" signal emission. * * Returns: TRUE to stop other handlers from being invoked for the event. * FALSE to propagate the event further. */ pgm_drawable_signals[DRAG_BEGIN] = g_signal_new ("drag-begin", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PgmDrawableClass, drag_begin), NULL, NULL, pgm_marshal_BOOLEAN__FLOAT_FLOAT_FLOAT_ENUM_UINT_UINT, G_TYPE_BOOLEAN, 6, G_TYPE_FLOAT, G_TYPE_FLOAT, G_TYPE_FLOAT, PGM_TYPE_BUTTON_TYPE, G_TYPE_UINT, G_TYPE_UINT); /** * PgmDrawable::drag-motion: * @drawable: the #PgmDrawable * @x: the x coordinate of the point intersecting the cursor position on * the dragged @drawable plane * @y: the y coordinate of the point intersecting the cursor position on * the dragged @drawable plane * @z: the z coordinate of the point intersecting the cursor position on * the dragged @drawable plane * @button: the #PgmButtonType * @time: the timestamp of the motion event * @pressure: the pressure force, set to 0 when not used with a touch screen * * Will be emitted after @drawable is dragged. * * Returns: TRUE to stop other handlers from being invoked for the event. * FALSE to propagate the event further. */ pgm_drawable_signals[DRAG_MOTION] = g_signal_new ("drag-motion", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PgmDrawableClass, drag_motion), NULL, NULL, pgm_marshal_BOOLEAN__FLOAT_FLOAT_FLOAT_ENUM_UINT_UINT, G_TYPE_BOOLEAN, 6, G_TYPE_FLOAT, G_TYPE_FLOAT, G_TYPE_FLOAT, PGM_TYPE_BUTTON_TYPE, G_TYPE_UINT, G_TYPE_UINT); /** * PgmDrawable::drag-end: * @drawable: the #PgmDrawable * @x: the x coordinate of the point intersecting the release event on * the dragged @drawable plane * @y: the y coordinate of the point intersecting the release event on * the dragged @drawable plane * @z: the z coordinate of the point intersecting the release event on * the dragged @drawable plane * @button: the #PgmButtonType * @time: the timestamp of the motion event * * Will be emitted after @drawable is released. This signal is emitted on all * the drawables which have received a "drag-begin" signal. * * Returns: TRUE to stop other handlers from being invoked for the event. * FALSE to propagate the event further. */ pgm_drawable_signals[DRAG_END] = g_signal_new ("drag-end", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PgmDrawableClass, drag_end), NULL, NULL, pgm_marshal_BOOLEAN__FLOAT_FLOAT_FLOAT_ENUM_UINT, G_TYPE_BOOLEAN, 5, G_TYPE_FLOAT, G_TYPE_FLOAT, G_TYPE_FLOAT, PGM_TYPE_BUTTON_TYPE, G_TYPE_UINT); /** * PgmDrawable::motion: * @drawable: the #PgmDrawable * @x: the x coordinate of the point intersecting the cursor position on * the @drawable plane * @y: the y coordinate of the point intersecting the cursor position on * the @drawable plane * @z: the z coordinate of the point intersecting the cursor position on * the @drawable plane * @time: the timestamp of the motion event * * Will be emitted when the pointer is moved over @drawable. * * Returns: TRUE to stop other handlers from being invoked for the event. * FALSE to propagate the event further. */ pgm_drawable_signals[MOTION] = g_signal_new ("motion", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PgmDrawableClass, motion), NULL, NULL, pgm_marshal_BOOLEAN__FLOAT_FLOAT_FLOAT_UINT, G_TYPE_BOOLEAN, 4, G_TYPE_FLOAT, G_TYPE_FLOAT, G_TYPE_FLOAT, G_TYPE_UINT); /** * PgmDrawable::entered: * @drawable: the #PgmDrawable * @x: the x coordinate of the point intersecting the cursor position on * the @drawable plane * @y: the y coordinate of the point intersecting the cursor position on * the @drawable plane * @z: the z coordinate of the point intersecting the cursor position on * the @drawable plane * @time: the timestamp of the motion event * * Will be emitted when the pointer enters the @drawable area. * * Returns: TRUE if drawables under @drawable should not be in "entered" state * until the pointer leaves @drawable, FALSE otherwise. */ pgm_drawable_signals[ENTERED] = g_signal_new ("entered", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PgmDrawableClass, motion), NULL, NULL, pgm_marshal_BOOLEAN__FLOAT_FLOAT_FLOAT_UINT, G_TYPE_BOOLEAN, 4, G_TYPE_FLOAT, G_TYPE_FLOAT, G_TYPE_FLOAT, G_TYPE_UINT); /** * PgmDrawable::left: * @drawable: the #PgmDrawable * @x: the x coordinate of the point intersecting the cursor position on * the @drawable plane * @y: the y coordinate of the point intersecting the cursor position on * the @drawable plane * @z: the z coordinate of the point intersecting the cursor position on * the @drawable plane * @time: the timestamp of the motion event * * Will be emitted when the pointer leaves the @drawable area. * */ pgm_drawable_signals[LEFT] = g_signal_new ("left", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PgmDrawableClass, motion), NULL, NULL, pgm_marshal_VOID__FLOAT_FLOAT_FLOAT_UINT, G_TYPE_NONE, 4, G_TYPE_FLOAT, G_TYPE_FLOAT, G_TYPE_FLOAT, G_TYPE_UINT); gobject_class->dispose = GST_DEBUG_FUNCPTR (pgm_drawable_dispose); GST_DEBUG_CATEGORY_INIT (pgm_drawable_debug, "pgm_drawable", 0, "drawable object"); } static void pgm_drawable_init (PgmDrawable *drawable) { /* Layering */ drawable->transformation_matrix = pgm_mat4x4_new_identity (); /* drawable->angle_x = 0.0f; */ /* drawable->angle_y = 0.0f; */ /* drawable->angle_z = 0.0f; */ drawable->layer = PGM_DRAWABLE_UNBOUND; /* Position */ /* drawable->x = 0.0f; */ /* drawable->y = 0.0f; */ /* drawable->z = 0.0f; */ /* drawable->orig_x = 0.0f; */ /* drawable->orig_y = 0.0f; */ /* Size */ drawable->width = 1.0f; drawable->height = 1.0f; drawable->orig_width = 1.0f; drawable->orig_height = 1.0f; drawable->grid_aligned = FALSE; /* Transformation */ drawable->scale = 1.0f; /* Colors */ drawable->fg_r = 255; drawable->fg_g = 255; drawable->fg_b = 255; drawable->fg_a = 255; drawable->bg_r = 255; drawable->bg_g = 255; drawable->bg_b = 255; drawable->bg_a = 255; /* Opacity */ drawable->opacity = 255; /* Private data */ /* pgm_vec3_set_from_scalars (&drawable->origin, 0.0f, 0.0f, 0.0f); */ pgm_vec3_set_from_scalars (&drawable->plane_vector_i, 1.0f, 0.0f, 0.0f); pgm_vec3_set_from_scalars (&drawable->plane_vector_j, 0.0f, 1.0f, 0.0f); /* pgm_vec3_set_from_scalars (&drawable->press_point, 0.0f, 0.0f, 0.0f); */ /* pgm_vec3_set_from_scalars (&drawable->viewport_press_point, 0.0f, 0.0f, 0.0f); */ /* drawable->pressure = 0; */ /* drawable->release_time = 0; */ /* drawable->mouse_over = FALSE; */ /* drawable->drag_mask = 0; */ /* drawable->press_mask = 0; */ /* drawable->release_button = 0; */ drawable->drag_distance = 5; drawable->flags = PGM_DRAWABLE_PLANE_VECTORS | PGM_DRAWABLE_ORIGIN; } /* Public methods */ /** * pgm_drawable_hide: * @drawable: a #PgmDrawable object. * * Makes @drawable invisible. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_drawable_hide (PgmDrawable *drawable) { PgmError ret = PGM_ERROR_OK; PgmDrawableClass *klass; g_return_val_if_fail (PGM_IS_DRAWABLE (drawable), PGM_ERROR_X); GST_OBJECT_LOCK (drawable); GST_OBJECT_FLAG_UNSET (drawable, PGM_DRAWABLE_FLAG_VISIBLE); GST_OBJECT_UNLOCK (drawable); klass = PGM_DRAWABLE_GET_CLASS (drawable); if (klass->hide) ret = klass->hide (drawable); _pgm_drawable_emit_changed (drawable, PGM_DRAWABLE_VISIBILITY); return ret; } /** * pgm_drawable_show: * @drawable: a #PgmDrawable object. * * Makes @drawable visible. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_drawable_show (PgmDrawable *drawable) { PgmError ret = PGM_ERROR_OK; PgmDrawableClass *klass; g_return_val_if_fail (PGM_IS_DRAWABLE (drawable), PGM_ERROR_X); GST_OBJECT_LOCK (drawable); GST_OBJECT_FLAG_SET (drawable, PGM_DRAWABLE_FLAG_VISIBLE); GST_OBJECT_UNLOCK (drawable); klass = PGM_DRAWABLE_GET_CLASS (drawable); if (klass->show) ret = klass->show (drawable); _pgm_drawable_emit_changed (drawable, PGM_DRAWABLE_VISIBILITY); return ret; } /** * pgm_drawable_is_visible: * @drawable: a #PgmDrawable object. * @visible: a pointer to a #gboolean where the visible state of the drawable * is going to be stored. * * Retrieves whether @drawable is visible. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_drawable_is_visible (PgmDrawable *drawable, gboolean *visible) { g_return_val_if_fail (PGM_IS_DRAWABLE (drawable), PGM_ERROR_X); g_return_val_if_fail (visible != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (drawable); *visible = GST_OBJECT_FLAG_IS_SET (drawable, PGM_DRAWABLE_FLAG_VISIBLE); GST_OBJECT_UNLOCK (drawable); return PGM_ERROR_OK; } /** * pgm_drawable_set_size: * @drawable: a #PgmDrawable object. * @width: the width of the canvas. * @height: the height of the canvas. * * Defines @drawable size in canvas units to @width x @height. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_drawable_set_size (PgmDrawable *drawable, gfloat width, gfloat height) { PgmError ret = PGM_ERROR_OK; PgmDrawableClass *klass; PgmCanvas *canvas; g_return_val_if_fail (PGM_IS_DRAWABLE (drawable), PGM_ERROR_X); GST_OBJECT_LOCK (drawable); drawable->orig_width = width = MAX (0.0f, width); drawable->orig_height = height = MAX (0.0f, height); if (drawable->grid_aligned && (canvas = PGM_CANVAS (GST_OBJECT_PARENT (drawable)))) { width = floorf (width / canvas->pixel_offset_x) * canvas->pixel_offset_x; height = floorf (height / canvas->pixel_offset_y) * canvas->pixel_offset_y; } if (width != drawable->width || height != drawable->height) { drawable->width = width; drawable->height = height; /* Update the transformation matrix if the user added transforms */ if (drawable->flags & (PGM_DRAWABLE_ROTATED | PGM_DRAWABLE_SCALED)) update_transformation_matrix (drawable); GST_OBJECT_UNLOCK (drawable); klass = PGM_DRAWABLE_GET_CLASS (drawable); if (klass->set_size) ret = klass->set_size (drawable, width, height); if (drawable->flags & (PGM_DRAWABLE_ROTATED | PGM_DRAWABLE_SCALED)) _pgm_drawable_emit_changed (drawable, PGM_DRAWABLE_TRANSFORMATION_MATRIX); _pgm_drawable_emit_changed (drawable, PGM_DRAWABLE_SIZE); return ret; } GST_OBJECT_UNLOCK (drawable); return ret; } /** * pgm_drawable_get_size: * @drawable: a #PgmDrawable object. * @width: a pointer to a #gfloat where the width of the drawable is going to be * stored. * @height: a pointer to a #gfloat where the height of the drawable is going to * be stored. * * Gets @drawable size in canvas units. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_drawable_get_size (PgmDrawable *drawable, gfloat *width, gfloat *height) { g_return_val_if_fail (PGM_IS_DRAWABLE (drawable), PGM_ERROR_X); g_return_val_if_fail (width != NULL, PGM_ERROR_X); g_return_val_if_fail (height != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (drawable); *width = drawable->orig_width; *height = drawable->orig_height; GST_OBJECT_UNLOCK (drawable); return PGM_ERROR_OK; } /** * pgm_drawable_set_position: * @drawable: a #PgmDrawable object. * @x: the position of @drawable on the x axis. * @y: the position of @drawable on the y axis. * @z: the position of @drawable on the z axis. * * Sets position of @drawable in canvas units. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_drawable_set_position (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z) { PgmError ret = PGM_ERROR_OK; gboolean reordered = FALSE; PgmDrawableClass *klass; PgmCanvas *canvas; g_return_val_if_fail (PGM_IS_DRAWABLE (drawable), PGM_ERROR_X); GST_OBJECT_LOCK (drawable); drawable->flags &= ~PGM_DRAWABLE_ORIGIN; drawable->orig_x = x; drawable->orig_y = y; canvas = PGM_CANVAS (GST_OBJECT_PARENT (drawable)); if (drawable->grid_aligned && canvas != NULL) { x = floorf (x / canvas->pixel_offset_x) * canvas->pixel_offset_x; y = floorf (y / canvas->pixel_offset_y) * canvas->pixel_offset_y; } reordered = (z != drawable->z); if (x != drawable->x || y != drawable->y || reordered) { drawable->x = x; drawable->y = y; drawable->z = z; /* Update the transformation matrix if the user added rotations */ if (drawable->flags & (PGM_DRAWABLE_ROTATED | PGM_DRAWABLE_SCALED)) update_transformation_matrix (drawable); GST_OBJECT_UNLOCK (drawable); klass = PGM_DRAWABLE_GET_CLASS (drawable); if (klass->set_position) ret = klass->set_position (drawable, x, y, z); /* Reorder the drawable inside the canvas in the case that z has changed */ if (reordered && canvas != NULL) _pgm_canvas_update_order (canvas, drawable); if (drawable->flags & (PGM_DRAWABLE_ROTATED | PGM_DRAWABLE_SCALED)) _pgm_drawable_emit_changed (drawable, PGM_DRAWABLE_TRANSFORMATION_MATRIX); _pgm_drawable_emit_changed (drawable, PGM_DRAWABLE_POSITION); return ret; } GST_OBJECT_UNLOCK (drawable); return ret; } /** * pgm_drawable_get_position: * @drawable: a #PgmDrawable object. * @x: a pointer to a #gfloat where the x position of @drawable is going to * be stored. * @y: a pointer to a #gfloat where the y position of @drawable is going to * be stored. * @z: a pointer to a #gfloat where the z position of @drawable is going to * be stored. * * Gets @drawable position in canvas units. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_drawable_get_position (PgmDrawable *drawable, gfloat *x, gfloat *y, gfloat *z) { g_return_val_if_fail (PGM_IS_DRAWABLE (drawable), PGM_ERROR_X); g_return_val_if_fail (x != NULL, PGM_ERROR_X); g_return_val_if_fail (y != NULL, PGM_ERROR_X); g_return_val_if_fail (z != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (drawable); *x = drawable->orig_x; *y = drawable->orig_y; *z = drawable->z; GST_OBJECT_UNLOCK (drawable); return PGM_ERROR_OK; } /** * pgm_drawable_set_rotation_x: * @drawable: a #PgmDrawable object. * @angle: an angle of rotation, in radians. * * Defines the rotation to apply to @drawable on the x axis. The rotation point * is the center of @drawable and the axis is its normal. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_drawable_set_rotation_x (PgmDrawable *drawable, gfloat angle) { g_return_val_if_fail (PGM_IS_DRAWABLE (drawable), PGM_ERROR_X); GST_OBJECT_LOCK (drawable); if (angle == drawable->angle_x) { GST_OBJECT_UNLOCK (drawable); return PGM_ERROR_OK; } drawable->angle_x = angle; update_transformation_matrix (drawable); /* Update flags to avoid further unneeded computations */ if (angle != 0.0f) drawable->flags |= PGM_DRAWABLE_ROTATED; else if (drawable->angle_y == 0.0f && drawable->angle_z == 0.0f) drawable->flags &= ~PGM_DRAWABLE_ROTATED; GST_OBJECT_UNLOCK (drawable); _pgm_drawable_emit_changed (drawable, PGM_DRAWABLE_TRANSFORMATION_MATRIX); return PGM_ERROR_OK; } /** * pgm_drawable_get_rotation_x: * @drawable: a #PgmDrawable object. * @angle: a #gfloat pointer where the x rotation angle is going to be stored. * * Retrieves in @angle the current x rotation angle applied to @drawable. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_drawable_get_rotation_x (PgmDrawable *drawable, gfloat *angle) { g_return_val_if_fail (PGM_IS_DRAWABLE (drawable), PGM_ERROR_X); g_return_val_if_fail (angle != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (drawable); *angle = drawable->angle_x; GST_OBJECT_UNLOCK (drawable); return PGM_ERROR_OK; } /** * pgm_drawable_set_rotation_y: * @drawable: a #PgmDrawable object. * @angle: an angle of rotation, in radians. * * Defines the rotation to apply to @drawable on the y axis. The rotation point * is the center of @drawable and the axis is its normal. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_drawable_set_rotation_y (PgmDrawable *drawable, gfloat angle) { g_return_val_if_fail (PGM_IS_DRAWABLE (drawable), PGM_ERROR_X); GST_OBJECT_LOCK (drawable); if (angle == drawable->angle_y) { GST_OBJECT_UNLOCK (drawable); return PGM_ERROR_OK; } drawable->angle_y = angle; update_transformation_matrix (drawable); /* Update flags to avoid further unneeded computations */ if (angle != 0.0f) drawable->flags |= PGM_DRAWABLE_ROTATED; else if (drawable->angle_x == 0.0f && drawable->angle_z == 0.0f) drawable->flags &= ~PGM_DRAWABLE_ROTATED; GST_OBJECT_UNLOCK (drawable); _pgm_drawable_emit_changed (drawable, PGM_DRAWABLE_TRANSFORMATION_MATRIX); return PGM_ERROR_OK; } /** * pgm_drawable_get_rotation_y: * @drawable: a #PgmDrawable object. * @angle: a #gfloat pointer where the y rotation angle is going to be stored. * * Retrieves in @angle the current y rotation angle applied to @drawable. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_drawable_get_rotation_y (PgmDrawable *drawable, gfloat *angle) { g_return_val_if_fail (PGM_IS_DRAWABLE (drawable), PGM_ERROR_X); g_return_val_if_fail (angle != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (drawable); *angle = drawable->angle_y; GST_OBJECT_UNLOCK (drawable); return PGM_ERROR_OK; } /** * pgm_drawable_set_rotation_z: * @drawable: a #PgmDrawable object. * @angle: an angle of rotation, in radians. * * Defines the rotation to apply to @drawable on the z axis. The rotation point * is the center of @drawable and the axis is its normal. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_drawable_set_rotation_z (PgmDrawable *drawable, gfloat angle) { g_return_val_if_fail (PGM_IS_DRAWABLE (drawable), PGM_ERROR_X); GST_OBJECT_LOCK (drawable); if (angle == drawable->angle_z) { GST_OBJECT_UNLOCK (drawable); return PGM_ERROR_OK; } drawable->angle_z = angle; update_transformation_matrix (drawable); /* Update flags to avoid further unneeded computations */ if (angle != 0.0f) drawable->flags |= PGM_DRAWABLE_ROTATED; else if (drawable->angle_x == 0.0f && drawable->angle_y == 0.0f) drawable->flags &= ~PGM_DRAWABLE_ROTATED; GST_OBJECT_UNLOCK (drawable); _pgm_drawable_emit_changed (drawable, PGM_DRAWABLE_TRANSFORMATION_MATRIX); return PGM_ERROR_OK; } /** * pgm_drawable_get_rotation_z: * @drawable: a #PgmDrawable object. * @angle: a #gfloat pointer where the z rotation angle is going to be stored. * * Retrieves in @angle the current z rotation angle applied to @drawable. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_drawable_get_rotation_z (PgmDrawable *drawable, gfloat *angle) { g_return_val_if_fail (PGM_IS_DRAWABLE (drawable), PGM_ERROR_X); g_return_val_if_fail (angle != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (drawable); *angle = drawable->angle_z; GST_OBJECT_UNLOCK (drawable); return PGM_ERROR_OK; } /** * pgm_drawable_set_scale: * @drawable: a #PgmDrawable object. * @scale: a scale factor. * * Defines the scale to apply to @drawable. The scaling point is the center of * @drawable. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_drawable_set_scale (PgmDrawable *drawable, gfloat scale) { g_return_val_if_fail (PGM_IS_DRAWABLE (drawable), PGM_ERROR_X); GST_OBJECT_LOCK (drawable); if (scale == drawable->scale) { GST_OBJECT_UNLOCK (drawable); return PGM_ERROR_OK; } drawable->scale = scale; update_transformation_matrix (drawable); /* Update flags to avoid further unneeded computations */ if (scale != 1.0f) drawable->flags |= PGM_DRAWABLE_SCALED; else drawable->flags &= ~PGM_DRAWABLE_SCALED; GST_OBJECT_UNLOCK (drawable); _pgm_drawable_emit_changed (drawable, PGM_DRAWABLE_TRANSFORMATION_MATRIX); return PGM_ERROR_OK; } /** * pgm_drawable_get_scale: * @drawable: a #PgmDrawable object. * @scale: a #gfloat pointer where the scale factor is going to be stored. * * Retrieves in @scale the current scale factor applied to @drawable. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_drawable_get_scale (PgmDrawable *drawable, gfloat *scale) { g_return_val_if_fail (PGM_IS_DRAWABLE (drawable), PGM_ERROR_X); g_return_val_if_fail (scale != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (drawable); *scale = drawable->scale; GST_OBJECT_UNLOCK (drawable); return PGM_ERROR_OK; } /** * pgm_drawable_set_fg_color: * @drawable: a #PgmDrawable object. * @r: the red foreground color. * @g: the green foreground color. * @b: the blue foreground color. * @a: the alpha foreground color. * * Set the color used for drawing operations on @drawable to (@r,@g,@b,@a). * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_drawable_set_fg_color (PgmDrawable *drawable, guchar r, guchar g, guchar b, guchar a) { PgmError ret = PGM_ERROR_OK; PgmDrawableClass *klass; g_return_val_if_fail (PGM_IS_DRAWABLE (drawable), PGM_ERROR_X); GST_OBJECT_LOCK (drawable); drawable->fg_r = r; drawable->fg_g = g; drawable->fg_b = b; drawable->fg_a = a; GST_OBJECT_UNLOCK (drawable); klass = PGM_DRAWABLE_GET_CLASS (drawable); if (klass->set_fg_color) ret = klass->set_fg_color (drawable, r, g, b, a); _pgm_drawable_emit_changed (drawable, PGM_DRAWABLE_FG_COLOR); return ret; } /** * pgm_drawable_get_fg_color: * @drawable: a #PgmDrawable object. * @r: a pointer to a #guchar where the red foreground color is going to be * stored. * @g: a pointer to a #guchar where the green foreground color is going to be * stored. * @b: a pointer to a #guchar where the blue foreground color is going to be * stored. * @a: a pointer to a #guchar where the alpha foreground color is going to be * stored. * * Retrieves the color used for drawing operations on @drawable in * (@r,@g,@b,@a). * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_drawable_get_fg_color (PgmDrawable *drawable, guchar *r, guchar *g, guchar *b, guchar *a) { g_return_val_if_fail (PGM_IS_DRAWABLE (drawable), PGM_ERROR_X); g_return_val_if_fail (r != NULL, PGM_ERROR_X); g_return_val_if_fail (g != NULL, PGM_ERROR_X); g_return_val_if_fail (b != NULL, PGM_ERROR_X); g_return_val_if_fail (a != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (drawable); *r = drawable->fg_r; *g = drawable->fg_g; *b = drawable->fg_b; *a = drawable->fg_a; GST_OBJECT_UNLOCK (drawable); return PGM_ERROR_OK; } /** * pgm_drawable_set_bg_color: * @drawable: a #PgmDrawable object. * @r: the red background color. * @g: the green background color. * @b: the blue background color. * @a: the alpha background color. * * Sets the color used to fill the background of @drawable to (@r,@g,@b,@a). * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_drawable_set_bg_color (PgmDrawable *drawable, guchar r, guchar g, guchar b, guchar a) { PgmError ret = PGM_ERROR_OK; PgmDrawableClass *klass; g_return_val_if_fail (PGM_IS_DRAWABLE (drawable), PGM_ERROR_X); GST_OBJECT_LOCK (drawable); drawable->bg_r = r; drawable->bg_g = g; drawable->bg_b = b; drawable->bg_a = a; GST_OBJECT_UNLOCK (drawable); klass = PGM_DRAWABLE_GET_CLASS (drawable); if (klass->set_bg_color) ret = klass->set_bg_color (drawable, r, g, b, a); _pgm_drawable_emit_changed (drawable, PGM_DRAWABLE_BG_COLOR); return ret; } /** * pgm_drawable_get_bg_color: * @drawable: A #PgmDrawable object. * @r: a pointer to a #guchar where the red background color is going to be * stored. * @g: a pointer to a #guchar where the green background color is going to be * stored. * @b: a pointer to a #guchar where the blue background color is going to be * stored. * @a: a pointer to a #guchar where the alpha background color is going to be * stored. * * Retrieves the color used to fill the background of @drawable in * (@r,@g,@b,@a). * * MT safe. * * Returns: A #PgmError indicating success/failure. */ PgmError pgm_drawable_get_bg_color (PgmDrawable *drawable, guchar *r, guchar *g, guchar *b, guchar *a) { g_return_val_if_fail (PGM_IS_DRAWABLE (drawable), PGM_ERROR_X); g_return_val_if_fail (r != NULL, PGM_ERROR_X); g_return_val_if_fail (g != NULL, PGM_ERROR_X); g_return_val_if_fail (b != NULL, PGM_ERROR_X); g_return_val_if_fail (a != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (drawable); *r = drawable->bg_r; *g = drawable->bg_g; *b = drawable->bg_b; *a = drawable->bg_a; GST_OBJECT_UNLOCK (drawable); return PGM_ERROR_OK; } /** * pgm_drawable_set_opacity: * @drawable: a #PgmDrawable object. * @opacity: the opacity of @drawable. * * Defines the opacity of @drawable to @opacity. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_drawable_set_opacity (PgmDrawable *drawable, guchar opacity) { PgmError ret = PGM_ERROR_OK; PgmDrawableClass *klass; g_return_val_if_fail (PGM_IS_DRAWABLE (drawable), PGM_ERROR_X); GST_OBJECT_LOCK (drawable); drawable->opacity = opacity; GST_OBJECT_UNLOCK (drawable); klass = PGM_DRAWABLE_GET_CLASS (drawable); if (klass->set_opacity) ret = klass->set_opacity (drawable, opacity); _pgm_drawable_emit_changed (drawable, PGM_DRAWABLE_OPACITY); return ret; } /** * pgm_drawable_get_opacity: * @drawable: a #PgmDrawable object. * @opacity: a pointer to a #guchar where the opacity is going to be stored. * * Retrieves the opacity of @drawable in @opacity. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_drawable_get_opacity (PgmDrawable *drawable, guchar *opacity) { g_return_val_if_fail (PGM_IS_DRAWABLE (drawable), PGM_ERROR_X); g_return_val_if_fail (opacity != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (drawable); *opacity = drawable->opacity; GST_OBJECT_UNLOCK (drawable); return PGM_ERROR_OK; } /** * pgm_drawable_set_grid_aligned: * @drawable: a #PgmDrawable object. * @aligned: the grid aligned boolean. %FALSE by default. * * Sets whether or not @drawable must be automatically aligned to the pixel * boundaries in the viewport. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_drawable_set_grid_aligned (PgmDrawable *drawable, gboolean aligned) { gfloat x, y, z, w, h; g_return_val_if_fail (PGM_IS_DRAWABLE (drawable), PGM_ERROR_X); GST_OBJECT_LOCK (drawable); if (aligned == drawable->grid_aligned) { GST_OBJECT_UNLOCK (drawable); return PGM_ERROR_OK; } drawable->grid_aligned = aligned; x = drawable->orig_x; y = drawable->orig_y; z = drawable->z; w = drawable->orig_width; h = drawable->orig_height; GST_OBJECT_UNLOCK (drawable); pgm_drawable_set_position (drawable, x, y, z); pgm_drawable_set_size (drawable, w, h); return PGM_ERROR_OK; } /** * pgm_drawable_get_grid_aligned: * @drawable: a #PgmDrawable object. * @aligned: a pointer to a #gboolean where the grid aligned boolean is going to * be stored. * * Gets whether or not @drawable must be automatically aligned to the pixel * boundaries in the viewport. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_drawable_get_grid_aligned (PgmDrawable *drawable, gboolean *aligned) { g_return_val_if_fail (PGM_IS_DRAWABLE (drawable), PGM_ERROR_X); g_return_val_if_fail (aligned != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (drawable); *aligned = drawable->grid_aligned; GST_OBJECT_UNLOCK (drawable); return PGM_ERROR_OK; } /** * pgm_drawable_set_drag_distance: * @drawable: a #PgmDrawable object. * @distance: the drag distance of @drawable. 5 by default. * * Defines the drag distance of @drawable to @distance. The drag distance is the * distance in pixels the user has to cover with a mouse button pressed to * trigger the 'drag-begin' signal. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_drawable_set_drag_distance (PgmDrawable *drawable, guchar distance) { g_return_val_if_fail (PGM_IS_DRAWABLE (drawable), PGM_ERROR_X); GST_OBJECT_LOCK (drawable); drawable->drag_distance = distance; GST_OBJECT_UNLOCK (drawable); return PGM_ERROR_OK; } /** * pgm_drawable_get_drag_distance: * @drawable: a #PgmDrawable object. * @distance: a pointer to a #guchar where the drag distance is going to be * stored. * * Retrieves the drag distance of @drawable in @distance. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_drawable_get_drag_distance (PgmDrawable *drawable, guchar *distance) { g_return_val_if_fail (PGM_IS_DRAWABLE (drawable), PGM_ERROR_X); g_return_val_if_fail (distance != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (drawable); *distance = drawable->drag_distance; GST_OBJECT_UNLOCK (drawable); return PGM_ERROR_OK; } /** * pgm_drawable_regenerate: * @drawable: a #PgmDrawable object. * * Forces a regeneration of the drawable. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_drawable_regenerate (PgmDrawable *drawable) { _pgm_drawable_emit_changed (drawable, PGM_DRAWABLE_REGENERATE); return PGM_ERROR_OK; } /** * pgm_drawable_from_canvas: * @drawable: a #PgmDrawable object. * @x_drawable: where to return the x coordinate in the @drawable plane. * @y_drawable: where to return the y coordinate in the @drawable plane. * @x_canvas: x coordinate in the canvas space. * @y_canvas: y coordinate in the canvas space. * @z_canvas: z coordinate in the canvas space. * * Converts a position in the canvas into its orthogonal projection in the plane * of @drawable, with the (0,0) coordinate in that plane being the upper left * corner of @drawable. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_drawable_from_canvas (PgmDrawable *drawable, gfloat *x_drawable, gfloat *y_drawable, gfloat x_canvas, gfloat y_canvas, gfloat z_canvas) { PgmVec3 v; g_return_val_if_fail (PGM_IS_DRAWABLE (drawable), PGM_ERROR_X); g_return_val_if_fail (NULL != x_drawable, PGM_ERROR_X); g_return_val_if_fail (NULL != y_drawable, PGM_ERROR_X); GST_OBJECT_LOCK (drawable); if (! (drawable->flags & PGM_DRAWABLE_PLANE_VECTORS)) update_plane_vectors (drawable); if (! (drawable->flags & PGM_DRAWABLE_ORIGIN)) update_origin (drawable); /* v is the vector going from the top left corner of the drawable to the * considered point. We project it on the unit vectors along the top and left * sides of the drawable. This is equivalent (but faster) to applying the * inverse of drawable->transformation_matrix to the vector * (x_canvas, y_canvas, z_canvas, 1). */ pgm_vec3_set_from_scalars (&v, x_canvas - drawable->origin.v[0], y_canvas - drawable->origin.v[1], z_canvas - drawable->origin.v[2]); *x_drawable = pgm_vec3_dot_product (&v, &drawable->plane_vector_i); *y_drawable = pgm_vec3_dot_product (&v, &drawable->plane_vector_j); GST_OBJECT_UNLOCK (drawable); return PGM_ERROR_OK; } /** * pgm_drawable_to_canvas: * @drawable: a #PgmDrawable object. * @x_canvas: where to return the x coordinate in the canvas space. * @y_canvas: where to return the y coordinate in the canvas space. * @z_canvas: where to return the z coordinate in the canvas space. * @x_drawable: x coordinate in the @drawable plane. * @y_drawable: y coordinate in the @drawable plane. * * Converts a position in the plane of @drawable into the canvas space. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_drawable_to_canvas (PgmDrawable *drawable, gfloat *x_canvas, gfloat *y_canvas, gfloat *z_canvas, gfloat x_drawable, gfloat y_drawable) { g_return_val_if_fail (PGM_IS_DRAWABLE (drawable), PGM_ERROR_X); g_return_val_if_fail (NULL != x_canvas, PGM_ERROR_X); g_return_val_if_fail (NULL != y_canvas, PGM_ERROR_X); g_return_val_if_fail (NULL != z_canvas, PGM_ERROR_X); GST_OBJECT_LOCK (drawable); if (! (drawable->flags & PGM_DRAWABLE_PLANE_VECTORS)) update_plane_vectors (drawable); if (! (drawable->flags & PGM_DRAWABLE_ORIGIN)) update_origin (drawable); /* The resulting (x_canvas, y_canvas, z_canvas) vector is: * origin + x_drawable * plane_vector_i + y_drawable * plane_vector_j * This is equivalent to applying drawable->transformation_matrix to the * (x_drawable, y_drawable, 0, 1) vector. */ *x_canvas = drawable->origin.v[0] + x_drawable * drawable->plane_vector_i.v[0] + y_drawable * drawable->plane_vector_j.v[0]; *y_canvas = drawable->origin.v[1] + x_drawable * drawable->plane_vector_i.v[1] + y_drawable * drawable->plane_vector_j.v[1]; *z_canvas = drawable->origin.v[2] + x_drawable * drawable->plane_vector_i.v[2] + y_drawable * drawable->plane_vector_j.v[2]; GST_OBJECT_UNLOCK (drawable); return PGM_ERROR_OK; } /* Protected methods */ /** * _pgm_drawable_emit_changed: * @drawable: the #PgmDrawable object. * @property: the #PgmDrawablePoroperty that has changed. * * This function is only used internally by #PgmDrawable and its subclasses to * emit the 'changed' signal on @drawable. * * MT safe. */ void _pgm_drawable_emit_changed (PgmDrawable *drawable, PgmDrawableProperty property) { g_signal_emit (G_OBJECT (drawable), pgm_drawable_signals[CHANGED], 0, property); } /** * _pgm_drawable_do_press_event: * @drawable: the #PgmDrawable object. * @event: the #PgmEventButton. * @p1: the 1st line point in canvas coordinates. * @p2: the 2nd line point in canvas coordinates. * @emission_mask: the mask to inhibit signal emission. * * This function is only used internally in #PgmViewport to propagate mouse * press events to drawables so that they can properly handle and emit the * corresponding picking signals. * * MT safe. */ void _pgm_drawable_do_press_event (PgmDrawable *drawable, PgmEventButton *event, PgmVec3 *p1, PgmVec3 *p2, guint16 *emission_mask) { PgmVec3 intersect; /* Do not process invisible drawables */ if (!GST_OBJECT_FLAG_IS_SET (drawable, PGM_DRAWABLE_FLAG_VISIBLE) || drawable->opacity == 0 || drawable->fg_a == 0) return; /* Update properties and emit the signal if the cursor is over the drawable */ if (get_line_intersection (drawable, &intersect, p1, p2)) { drawable->press_mask |= event->button; pgm_vec3_set_from_vec3 (&drawable->press_point, &intersect); pgm_vec3_set_from_scalars (&drawable->viewport_press_point, event->x, event->y, 0.0f); if (*emission_mask & PGM_DRAWABLE_PICKING_PRESSED) { gboolean stop_emission; GST_DEBUG_OBJECT (drawable, "emitting 'pressed' signal"); g_signal_emit (G_OBJECT (drawable), pgm_drawable_signals[PRESSED], 0, intersect.v[0], intersect.v[1], intersect.v[2], event->button, event->time, event->pressure, &stop_emission); if (stop_emission) *emission_mask &= ~PGM_DRAWABLE_PICKING_PRESSED; } } } /** * _pgm_drawable_do_pressure_event: * @drawable: the #PgmDrawable object. * @event: the #PgmEventButton. * @p1: the 1st line point in canvas coordinates. * @p2: the 2nd line point in canvas coordinates. * @emission_mask: the mask to inhibit signal emission. * * This function is only used internally in #PgmViewport to propagate mouse * pressure change events to drawables so that they can properly handle and * emit the corresponding picking signals. * * MT safe. */ void _pgm_drawable_do_pressure_event (PgmDrawable *drawable, PgmEventButton *event, PgmVec3 *p1, PgmVec3 *p2, guint16 *emission_mask) { /* Do not process invisible drawables */ if ((!GST_OBJECT_FLAG_IS_SET (drawable, PGM_DRAWABLE_FLAG_VISIBLE) || drawable->opacity == 0 || drawable->fg_a == 0) && !drawable->drag_mask) return; /* First check if the button is pressed before going to further computations */ if (drawable->press_mask & event->button) { gboolean stop_emission; PgmVec3 intersect; /* Emit the pressure signal */ if (*emission_mask & PGM_DRAWABLE_PICKING_PRESSURED) { get_line_intersection (drawable, &intersect, p1, p2); GST_DEBUG_OBJECT (drawable, "emitting 'pressured' signal"); g_signal_emit (G_OBJECT (drawable), pgm_drawable_signals[PRESSURED], 0, intersect.v[0], intersect.v[1], intersect.v[2], event->button, event->time, event->pressure, &stop_emission); if (stop_emission) *emission_mask &= ~PGM_DRAWABLE_PICKING_PRESSURED; } drawable->pressure = event->pressure; } } /** * _pgm_drawable_do_release_event: * @drawable: the #PgmDrawable object. * @event: the #PgmEventButton. * @p1: the 1st line point in canvas coordinates. * @p2: the 2nd line point in canvas coordinates. * @emission_mask: the mask to inhibit signal emission. * * This function is only used internally in #PgmViewport to propagate mouse * release events to drawables so that they can properly handle and emit the * corresponding picking signals. * * MT safe. */ void _pgm_drawable_do_release_event (PgmDrawable *drawable, PgmEventButton *event, PgmVec3 *p1, PgmVec3 *p2, guint16 *emission_mask) { /* Do not process invisible drawables */ if ((!GST_OBJECT_FLAG_IS_SET (drawable, PGM_DRAWABLE_FLAG_VISIBLE) || drawable->opacity == 0 || drawable->fg_a == 0) && !drawable->drag_mask) return; /* First check if the button is pressed before going to further computations */ if (drawable->press_mask & event->button) { gboolean cached = FALSE; gboolean picked = FALSE; gboolean stop_emission; PgmVec3 intersect; /* Emit the release signal */ if (*emission_mask & PGM_DRAWABLE_PICKING_RELEASED) { picked = get_line_intersection (drawable, &intersect, p1, p2); cached = TRUE; GST_DEBUG_OBJECT (drawable, "emitting 'released' signal"); g_signal_emit (G_OBJECT (drawable), pgm_drawable_signals[RELEASED], 0, intersect.v[0], intersect.v[1], intersect.v[2], event->button, event->time, &stop_emission); if (stop_emission) *emission_mask &= ~PGM_DRAWABLE_PICKING_RELEASED; } /* Emit a click if the cursor is over the drawable. Take care of not * emitting it if there's an on-going drag. */ if (!(drawable->drag_mask & event->button) && *emission_mask & PGM_DRAWABLE_PICKING_CLICKED) { if (!cached) { picked = get_line_intersection (drawable, &intersect, p1, p2); cached = TRUE; } if (picked) { GST_DEBUG_OBJECT (drawable, "emitting 'clicked' signal"); g_signal_emit (G_OBJECT (drawable), pgm_drawable_signals[CLICKED], 0, intersect.v[0], intersect.v[1], intersect.v[2], event->button, event->time, drawable->pressure, &stop_emission); if (stop_emission) *emission_mask &= ~PGM_DRAWABLE_PICKING_CLICKED; } } /* Emit a double-click if the cursor is over the drawable, the last * released button is the same and the last click happened recently */ if (*emission_mask & PGM_DRAWABLE_PICKING_DOUBLE_CLICKED) { if (!cached) { picked = get_line_intersection (drawable, &intersect, p1, p2); cached = TRUE; } if (picked) { if (drawable->release_button & event->button && event->time - drawable->release_time < DOUBLE_CLICK_DELAY) { GST_DEBUG_OBJECT (drawable, "emitting 'double-clicked' signal"); g_signal_emit (G_OBJECT (drawable), pgm_drawable_signals[DOUBLE_CLICKED], 0, intersect.v[0], intersect.v[1], intersect.v[2], event->button, event->time, &stop_emission); if (stop_emission) *emission_mask &= ~PGM_DRAWABLE_PICKING_DOUBLE_CLICKED; drawable->release_time = 0; drawable->release_button = 0; } else { drawable->release_time = event->time; drawable->release_button |= event->button; } } } /* Emit a drag end if there was an on-going dragging */ if (drawable->drag_mask & event->button) { if (*emission_mask & PGM_DRAWABLE_PICKING_DRAG_END) { if (!cached) get_line_intersection (drawable, &intersect, p1, p2); GST_DEBUG_OBJECT (drawable, "emitting 'drag-end' signal"); g_signal_emit (G_OBJECT (drawable), pgm_drawable_signals[DRAG_END], 0, intersect.v[0], intersect.v[1], intersect.v[2], event->button, event->time, &stop_emission); if (stop_emission) *emission_mask &= ~PGM_DRAWABLE_PICKING_DRAG_END; } drawable->drag_mask &= ~event->button; } drawable->press_mask &= ~event->button; } } /** * _pgm_drawable_do_motion_event: * @drawable: the #PgmDrawable object. * @event: the #PgmEventButton. * @p1: the 1st line point in canvas coordinates. * @p2: the 2nd line point in canvas coordinates. * @emission_mask: the mask to inhibit signal emission. * * This function is only used internally in #PgmViewport to propagate mouse * motion events to drawables so that they can properly handle and emit the * corresponding picking signals. * * MT safe. */ void _pgm_drawable_do_motion_event (PgmDrawable *drawable, PgmEventMotion *event, PgmVec3 *p1, PgmVec3 *p2, guint16 *emission_mask) { gboolean stop_emission; /* Do not process invisible drawables */ if ((!GST_OBJECT_FLAG_IS_SET (drawable, PGM_DRAWABLE_FLAG_VISIBLE) || drawable->opacity == 0 || drawable->fg_a == 0) && !drawable->mouse_over) return; /* Avoid further computations if there's no button pressed */ if (drawable->press_mask) { guint16 button; /* Check for pressed buttons */ for (button = 1; button <= PGM_BUTTON_RIGHT; button <<= 1) { if (drawable->press_mask & button) { /* Emit the drag begin signal if there's no on-going drag */ if (!(drawable->drag_mask & button) && is_drag_distance_covered (drawable, event)) { drawable->drag_mask |= button; if (*emission_mask & PGM_DRAWABLE_PICKING_DRAG_BEGIN) { GST_DEBUG_OBJECT (drawable, "emitting 'drag-begin' signal"); g_signal_emit (G_OBJECT (drawable), pgm_drawable_signals[DRAG_BEGIN], 0, drawable->press_point.v[0], drawable->press_point.v[1], drawable->press_point.v[2], button, event->time, event->pressure, &stop_emission); if (stop_emission) *emission_mask &= ~PGM_DRAWABLE_PICKING_DRAG_BEGIN; } } /* Emit the drag motion signal */ if ((*emission_mask & PGM_DRAWABLE_PICKING_DRAG_MOTION) && (drawable->drag_mask & button)) { PgmVec3 intersect; get_line_intersection (drawable, &intersect, p1, p2); GST_DEBUG_OBJECT (drawable, "emitting 'drag-motion' signal"); g_signal_emit (G_OBJECT (drawable), pgm_drawable_signals[DRAG_MOTION], 0, intersect.v[0], intersect.v[1], intersect.v[2], button, event->time, event->pressure, &stop_emission); if (stop_emission) *emission_mask &= ~PGM_DRAWABLE_PICKING_DRAG_MOTION; } } } } else if (*emission_mask & (PGM_DRAWABLE_PICKING_MOTION | PGM_DRAWABLE_PICKING_ENTERED)) { PgmDrawable *emission_stopper; PgmCanvas *canvas; gboolean on_drawable; PgmVec3 intersect; gfloat x, y, z; /* Get the intersection and the emission stopper */ canvas = PGM_CANVAS (GST_OBJECT_PARENT (drawable)); on_drawable = get_line_intersection (drawable, &intersect, p1, p2); emission_stopper = _pgm_canvas_get_entered_emission_stopper (canvas); /* Store the intersection in local variables */ x = intersect.v[0]; y = intersect.v[1]; z = intersect.v[2]; /* If we're leaving a drawable */ if (!on_drawable && drawable->mouse_over) { emit_left_signal (drawable, x, y, z, event->time); drawable->mouse_over = FALSE; if (emission_stopper == drawable) { _pgm_canvas_set_entered_emission_stopper (canvas, NULL); *emission_mask |= PGM_DRAWABLE_PICKING_ENTERED; } } else if (on_drawable) { /* If drawable is the emission stopper */ if (emission_stopper == drawable) *emission_mask &= ~PGM_DRAWABLE_PICKING_ENTERED; /* If we're entering a drawable */ else if ((*emission_mask & PGM_DRAWABLE_PICKING_ENTERED) && !drawable->mouse_over) { drawable->mouse_over = TRUE; /* If the entered handler returns TRUE, drawables below it can't * be in "entered" state */ if (emit_entered_signal (drawable, x, y, z, event->time)) { _pgm_canvas_set_entered_emission_stopper (canvas, drawable); *emission_mask &= ~PGM_DRAWABLE_PICKING_ENTERED; /* If there was an emission stopper *below* us, emit left on * the old emission stopper */ if (NULL != emission_stopper) { emit_left_signal (emission_stopper, x, y, z, event->time); emission_stopper->mouse_over = FALSE; } } } /* The motion signal emission is here since we want it to be emitted * after the entered signal */ if (*emission_mask & PGM_DRAWABLE_PICKING_MOTION) { if (emit_motion_signal (drawable, x, y, z, event->time)) *emission_mask &= ~PGM_DRAWABLE_PICKING_MOTION; } } } } /** * _pgm_drawable_do_scroll_event: * @drawable: the #PgmDrawable object. * @event: the #PgmEventButton. * @p1: the 1st line point in canvas coordinates. * @p2: the 2nd line point in canvas coordinates. * @emission_mask: the mask to inhibit signal emission. * * This function is only used internally in #PgmViewport to propagate mouse * scroll events to drawables so that they can properly handle and emit the * corresponding picking signals. * * MT safe. */ void _pgm_drawable_do_scroll_event (PgmDrawable *drawable, PgmEventScroll *event, PgmVec3 *p1, PgmVec3 *p2, guint16 *emission_mask) { PgmVec3 intersect; /* Do not process invisible drawables */ if (!GST_OBJECT_FLAG_IS_SET (drawable, PGM_DRAWABLE_FLAG_VISIBLE) || drawable->opacity == 0 || drawable->fg_a == 0) return; /* Update properties and emit the signal if the cursor is over the drawable */ if (get_line_intersection (drawable, &intersect, p1, p2)) { pgm_vec3_set_from_vec3 (&drawable->press_point, &intersect); if (*emission_mask & PGM_DRAWABLE_PICKING_SCROLLED) { gboolean stop_emission; GST_DEBUG_OBJECT (drawable, "emitting 'scrolled' signal"); g_signal_emit (G_OBJECT (drawable), pgm_drawable_signals[SCROLLED], 0, intersect.v[0], intersect.v[1], intersect.v[2], event->direction, event->time, &stop_emission); if (stop_emission) *emission_mask &= ~PGM_DRAWABLE_PICKING_SCROLLED; } } } pigment-0.3.17/pgm/pgmmarshal.c0000644000175000017500000006116511205034716013260 00000000000000 #ifndef __pgm_marshal_MARSHAL_H__ #define __pgm_marshal_MARSHAL_H__ #include G_BEGIN_DECLS #ifdef G_ENABLE_DEBUG #define g_marshal_value_peek_boolean(v) g_value_get_boolean (v) #define g_marshal_value_peek_char(v) g_value_get_char (v) #define g_marshal_value_peek_uchar(v) g_value_get_uchar (v) #define g_marshal_value_peek_int(v) g_value_get_int (v) #define g_marshal_value_peek_uint(v) g_value_get_uint (v) #define g_marshal_value_peek_long(v) g_value_get_long (v) #define g_marshal_value_peek_ulong(v) g_value_get_ulong (v) #define g_marshal_value_peek_int64(v) g_value_get_int64 (v) #define g_marshal_value_peek_uint64(v) g_value_get_uint64 (v) #define g_marshal_value_peek_enum(v) g_value_get_enum (v) #define g_marshal_value_peek_flags(v) g_value_get_flags (v) #define g_marshal_value_peek_float(v) g_value_get_float (v) #define g_marshal_value_peek_double(v) g_value_get_double (v) #define g_marshal_value_peek_string(v) (char*) g_value_get_string (v) #define g_marshal_value_peek_param(v) g_value_get_param (v) #define g_marshal_value_peek_boxed(v) g_value_get_boxed (v) #define g_marshal_value_peek_pointer(v) g_value_get_pointer (v) #define g_marshal_value_peek_object(v) g_value_get_object (v) #else /* !G_ENABLE_DEBUG */ /* WARNING: This code accesses GValues directly, which is UNSUPPORTED API. * Do not access GValues directly in your code. Instead, use the * g_value_get_*() functions */ #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int #define g_marshal_value_peek_char(v) (v)->data[0].v_int #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint #define g_marshal_value_peek_int(v) (v)->data[0].v_int #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint #define g_marshal_value_peek_long(v) (v)->data[0].v_long #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 #define g_marshal_value_peek_enum(v) (v)->data[0].v_long #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong #define g_marshal_value_peek_float(v) (v)->data[0].v_float #define g_marshal_value_peek_double(v) (v)->data[0].v_double #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer #endif /* !G_ENABLE_DEBUG */ /* VOID:VOID (./pgmmarshal.list:27) */ #define pgm_marshal_VOID__VOID g_cclosure_marshal_VOID__VOID /* VOID:ENUM (./pgmmarshal.list:28) */ #define pgm_marshal_VOID__ENUM g_cclosure_marshal_VOID__ENUM /* VOID:BOXED (./pgmmarshal.list:29) */ #define pgm_marshal_VOID__BOXED g_cclosure_marshal_VOID__BOXED /* VOID:UINT (./pgmmarshal.list:30) */ #define pgm_marshal_VOID__UINT g_cclosure_marshal_VOID__UINT /* BOOLEAN:BOXED (./pgmmarshal.list:31) */ extern void pgm_marshal_BOOLEAN__BOXED (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); void pgm_marshal_BOOLEAN__BOXED (GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef gboolean (*GMarshalFunc_BOOLEAN__BOXED) (gpointer data1, gpointer arg_1, gpointer data2); register GMarshalFunc_BOOLEAN__BOXED callback; register GCClosure *cc = (GCClosure*) closure; register gpointer data1, data2; gboolean v_return; g_return_if_fail (return_value != NULL); g_return_if_fail (n_param_values == 2); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_BOOLEAN__BOXED) (marshal_data ? marshal_data : cc->callback); v_return = callback (data1, g_marshal_value_peek_boxed (param_values + 1), data2); g_value_set_boolean (return_value, v_return); } /* LONG:BOXED (./pgmmarshal.list:32) */ extern void pgm_marshal_LONG__BOXED (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); void pgm_marshal_LONG__BOXED (GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef glong (*GMarshalFunc_LONG__BOXED) (gpointer data1, gpointer arg_1, gpointer data2); register GMarshalFunc_LONG__BOXED callback; register GCClosure *cc = (GCClosure*) closure; register gpointer data1, data2; glong v_return; g_return_if_fail (return_value != NULL); g_return_if_fail (n_param_values == 2); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_LONG__BOXED) (marshal_data ? marshal_data : cc->callback); v_return = callback (data1, g_marshal_value_peek_boxed (param_values + 1), data2); g_value_set_long (return_value, v_return); } /* VOID:OBJECT,UINT (./pgmmarshal.list:33) */ extern void pgm_marshal_VOID__OBJECT_UINT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); void pgm_marshal_VOID__OBJECT_UINT (GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef void (*GMarshalFunc_VOID__OBJECT_UINT) (gpointer data1, gpointer arg_1, guint arg_2, gpointer data2); register GMarshalFunc_VOID__OBJECT_UINT callback; register GCClosure *cc = (GCClosure*) closure; register gpointer data1, data2; g_return_if_fail (n_param_values == 3); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_VOID__OBJECT_UINT) (marshal_data ? marshal_data : cc->callback); callback (data1, g_marshal_value_peek_object (param_values + 1), g_marshal_value_peek_uint (param_values + 2), data2); } /* VOID:OBJECT,OBJECT (./pgmmarshal.list:34) */ extern void pgm_marshal_VOID__OBJECT_OBJECT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); void pgm_marshal_VOID__OBJECT_OBJECT (GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef void (*GMarshalFunc_VOID__OBJECT_OBJECT) (gpointer data1, gpointer arg_1, gpointer arg_2, gpointer data2); register GMarshalFunc_VOID__OBJECT_OBJECT callback; register GCClosure *cc = (GCClosure*) closure; register gpointer data1, data2; g_return_if_fail (n_param_values == 3); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_VOID__OBJECT_OBJECT) (marshal_data ? marshal_data : cc->callback); callback (data1, g_marshal_value_peek_object (param_values + 1), g_marshal_value_peek_object (param_values + 2), data2); } /* VOID:OBJECT,OBJECT,INT (./pgmmarshal.list:35) */ extern void pgm_marshal_VOID__OBJECT_OBJECT_INT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); void pgm_marshal_VOID__OBJECT_OBJECT_INT (GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef void (*GMarshalFunc_VOID__OBJECT_OBJECT_INT) (gpointer data1, gpointer arg_1, gpointer arg_2, gint arg_3, gpointer data2); register GMarshalFunc_VOID__OBJECT_OBJECT_INT callback; register GCClosure *cc = (GCClosure*) closure; register gpointer data1, data2; g_return_if_fail (n_param_values == 4); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_VOID__OBJECT_OBJECT_INT) (marshal_data ? marshal_data : cc->callback); callback (data1, g_marshal_value_peek_object (param_values + 1), g_marshal_value_peek_object (param_values + 2), g_marshal_value_peek_int (param_values + 3), data2); } /* BOOLEAN:FLOAT,FLOAT,FLOAT,ENUM,UINT (./pgmmarshal.list:36) */ extern void pgm_marshal_BOOLEAN__FLOAT_FLOAT_FLOAT_ENUM_UINT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); void pgm_marshal_BOOLEAN__FLOAT_FLOAT_FLOAT_ENUM_UINT (GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef gboolean (*GMarshalFunc_BOOLEAN__FLOAT_FLOAT_FLOAT_ENUM_UINT) (gpointer data1, gfloat arg_1, gfloat arg_2, gfloat arg_3, gint arg_4, guint arg_5, gpointer data2); register GMarshalFunc_BOOLEAN__FLOAT_FLOAT_FLOAT_ENUM_UINT callback; register GCClosure *cc = (GCClosure*) closure; register gpointer data1, data2; gboolean v_return; g_return_if_fail (return_value != NULL); g_return_if_fail (n_param_values == 6); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_BOOLEAN__FLOAT_FLOAT_FLOAT_ENUM_UINT) (marshal_data ? marshal_data : cc->callback); v_return = callback (data1, g_marshal_value_peek_float (param_values + 1), g_marshal_value_peek_float (param_values + 2), g_marshal_value_peek_float (param_values + 3), g_marshal_value_peek_enum (param_values + 4), g_marshal_value_peek_uint (param_values + 5), data2); g_value_set_boolean (return_value, v_return); } /* BOOLEAN:FLOAT,FLOAT,FLOAT,ENUM,UINT,UINT (./pgmmarshal.list:37) */ extern void pgm_marshal_BOOLEAN__FLOAT_FLOAT_FLOAT_ENUM_UINT_UINT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); void pgm_marshal_BOOLEAN__FLOAT_FLOAT_FLOAT_ENUM_UINT_UINT (GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef gboolean (*GMarshalFunc_BOOLEAN__FLOAT_FLOAT_FLOAT_ENUM_UINT_UINT) (gpointer data1, gfloat arg_1, gfloat arg_2, gfloat arg_3, gint arg_4, guint arg_5, guint arg_6, gpointer data2); register GMarshalFunc_BOOLEAN__FLOAT_FLOAT_FLOAT_ENUM_UINT_UINT callback; register GCClosure *cc = (GCClosure*) closure; register gpointer data1, data2; gboolean v_return; g_return_if_fail (return_value != NULL); g_return_if_fail (n_param_values == 7); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_BOOLEAN__FLOAT_FLOAT_FLOAT_ENUM_UINT_UINT) (marshal_data ? marshal_data : cc->callback); v_return = callback (data1, g_marshal_value_peek_float (param_values + 1), g_marshal_value_peek_float (param_values + 2), g_marshal_value_peek_float (param_values + 3), g_marshal_value_peek_enum (param_values + 4), g_marshal_value_peek_uint (param_values + 5), g_marshal_value_peek_uint (param_values + 6), data2); g_value_set_boolean (return_value, v_return); } /* BOOLEAN:FLOAT,FLOAT,FLOAT,UINT (./pgmmarshal.list:38) */ extern void pgm_marshal_BOOLEAN__FLOAT_FLOAT_FLOAT_UINT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); void pgm_marshal_BOOLEAN__FLOAT_FLOAT_FLOAT_UINT (GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef gboolean (*GMarshalFunc_BOOLEAN__FLOAT_FLOAT_FLOAT_UINT) (gpointer data1, gfloat arg_1, gfloat arg_2, gfloat arg_3, guint arg_4, gpointer data2); register GMarshalFunc_BOOLEAN__FLOAT_FLOAT_FLOAT_UINT callback; register GCClosure *cc = (GCClosure*) closure; register gpointer data1, data2; gboolean v_return; g_return_if_fail (return_value != NULL); g_return_if_fail (n_param_values == 5); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_BOOLEAN__FLOAT_FLOAT_FLOAT_UINT) (marshal_data ? marshal_data : cc->callback); v_return = callback (data1, g_marshal_value_peek_float (param_values + 1), g_marshal_value_peek_float (param_values + 2), g_marshal_value_peek_float (param_values + 3), g_marshal_value_peek_uint (param_values + 4), data2); g_value_set_boolean (return_value, v_return); } /* VOID:FLOAT,FLOAT,FLOAT,UINT (./pgmmarshal.list:39) */ extern void pgm_marshal_VOID__FLOAT_FLOAT_FLOAT_UINT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); void pgm_marshal_VOID__FLOAT_FLOAT_FLOAT_UINT (GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef void (*GMarshalFunc_VOID__FLOAT_FLOAT_FLOAT_UINT) (gpointer data1, gfloat arg_1, gfloat arg_2, gfloat arg_3, guint arg_4, gpointer data2); register GMarshalFunc_VOID__FLOAT_FLOAT_FLOAT_UINT callback; register GCClosure *cc = (GCClosure*) closure; register gpointer data1, data2; g_return_if_fail (n_param_values == 5); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_VOID__FLOAT_FLOAT_FLOAT_UINT) (marshal_data ? marshal_data : cc->callback); callback (data1, g_marshal_value_peek_float (param_values + 1), g_marshal_value_peek_float (param_values + 2), g_marshal_value_peek_float (param_values + 3), g_marshal_value_peek_uint (param_values + 4), data2); } /* VOID:UINT,UINT,POINTER (./pgmmarshal.list:40) */ extern void pgm_marshal_VOID__UINT_UINT_POINTER (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); void pgm_marshal_VOID__UINT_UINT_POINTER (GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef void (*GMarshalFunc_VOID__UINT_UINT_POINTER) (gpointer data1, guint arg_1, guint arg_2, gpointer arg_3, gpointer data2); register GMarshalFunc_VOID__UINT_UINT_POINTER callback; register GCClosure *cc = (GCClosure*) closure; register gpointer data1, data2; g_return_if_fail (n_param_values == 4); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_VOID__UINT_UINT_POINTER) (marshal_data ? marshal_data : cc->callback); callback (data1, g_marshal_value_peek_uint (param_values + 1), g_marshal_value_peek_uint (param_values + 2), g_marshal_value_peek_pointer (param_values + 3), data2); } G_END_DECLS #endif /* __pgm_marshal_MARSHAL_H__ */ pigment-0.3.17/pgm/pgmimage.h0000644000175000017500000004455211205034416012716 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment media rendering library * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author(s): Loïc Molinari * Julien Moutte */ #ifndef __PGM_IMAGE_H__ #define __PGM_IMAGE_H__ #include #include "pgmdrawable.h" G_BEGIN_DECLS #define PGM_TYPE_IMAGE (pgm_image_get_type ()) #define PGM_IMAGE(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), PGM_TYPE_IMAGE, PgmImage)) #define PGM_IMAGE_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), PGM_TYPE_IMAGE, PgmImageClass)) #define PGM_IS_IMAGE(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), PGM_TYPE_IMAGE)) #define PGM_IS_IMAGE_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), PGM_TYPE_IMAGE)) #define PGM_IMAGE_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS((obj), PGM_TYPE_IMAGE, PgmImageClass)) #define PGM_IMAGE_NB_PIXEL_FORMATS 8 typedef struct _PgmImage PgmImage; typedef struct _PgmImageClass PgmImageClass; /* Data storage */ typedef struct _PgmImageFile PgmImageFile; typedef struct _PgmImageBuffer PgmImageBuffer; typedef struct _PgmImageGstBuffer PgmImageGstBuffer; typedef struct _PgmImageSystemBuffer PgmImageSystemBuffer; typedef struct _PgmImagePixbuf PgmImagePixbuf; typedef union _PgmImageData PgmImageData; /** * PgmImageAlignment: * @PGM_IMAGE_LEFT: Align to the left. * @PGM_IMAGE_CENTER: Align to the center (both vertically and horizontally). * @PGM_IMAGE_RIGHT: Align to the right. * @PGM_IMAGE_TOP: Align to the top. * @PGM_IMAGE_BOTTOM: Align to the bottom. * @PGM_IMAGE_TOP_LEFT: Align to the top left. * @PGM_IMAGE_TOP_CENTER: Align to the top center. * @PGM_IMAGE_TOP_RIGHT: Align to the top right. * @PGM_IMAGE_BOTTOM_LEFT: Align to the bottom left. * @PGM_IMAGE_BOTTOM_CENTER: Align to the bottom center. * @PGM_IMAGE_BOTTOM_RIGHT: Align to the bottom right. * * The possible alignments you can combine. */ typedef enum { PGM_IMAGE_LEFT = (1 << 0), PGM_IMAGE_CENTER = (1 << 1), PGM_IMAGE_RIGHT = (1 << 2), PGM_IMAGE_TOP = (1 << 3), PGM_IMAGE_BOTTOM = (1 << 4), PGM_IMAGE_TOP_LEFT = (PGM_IMAGE_TOP | PGM_IMAGE_LEFT), PGM_IMAGE_TOP_CENTER = (PGM_IMAGE_TOP | PGM_IMAGE_CENTER), PGM_IMAGE_TOP_RIGHT = (PGM_IMAGE_TOP | PGM_IMAGE_RIGHT), PGM_IMAGE_BOTTOM_LEFT = (PGM_IMAGE_BOTTOM | PGM_IMAGE_LEFT), PGM_IMAGE_BOTTOM_CENTER = (PGM_IMAGE_BOTTOM | PGM_IMAGE_CENTER), PGM_IMAGE_BOTTOM_RIGHT = (PGM_IMAGE_BOTTOM | PGM_IMAGE_RIGHT) } PgmImageAlignment; /** * PgmImageLayoutType: * @PGM_IMAGE_FILLED: * Scales the stored image to the whole drawable size ignoring * the pixel-aspect-ratio. * @PGM_IMAGE_SCALED: Scales the stored image to * adapt its size to the drawable one keeping the pixel-aspect-ratio. * @PGM_IMAGE_ZOOMED: * Scales the stored image to the whole drawable size keeping * the pixel-aspect-ratio. It crops the border of the stored image. * @PGM_IMAGE_CENTERED: Centers the stored image in the middle of the * drawable keeping the pixel-aspect-ratio. It crops the image if its size is * bigger than the drawable size. * @PGM_IMAGE_TILED: Repeats the stored image along the drawable. * * The different layout types. */ typedef enum { PGM_IMAGE_FILLED = 0, PGM_IMAGE_SCALED = 1, PGM_IMAGE_ZOOMED = 2, PGM_IMAGE_CENTERED = 3, PGM_IMAGE_TILED = 4 } PgmImageLayoutType; /** * PgmImageInterpType: * @PGM_IMAGE_NEAREST: The nearest neighbour sampling is the fastest and * lowest quality mode. * @PGM_IMAGE_BILINEAR: The bilinear sampling is the slowest and highest * quality mode. * * The different image interpolation types. */ typedef enum { PGM_IMAGE_NEAREST, PGM_IMAGE_BILINEAR } PgmImageInterpType; /** * PgmImageWrapping: * @PGM_IMAGE_CLAMP: The image content is displayed in the mapping range * [0.0, 1.0] and clamped to the last pixel outside it. * @PGM_IMAGE_TRANSPARENT: The image content is displayed in the mapping range * [0.0, 1.0] and discarded outside it. Can be used in combination with the * #PGM_IMAGE_BILINEAR filtering to antialias the edges of images. * @PGM_IMAGE_REPEAT: The image content is displayed in the mapping range * [0.0, 1.0] and repeated infinitely outside it. * * The different image wrapping types. */ typedef enum { PGM_IMAGE_CLAMP, PGM_IMAGE_TRANSPARENT, PGM_IMAGE_REPEAT } PgmImageWrapping; /** * PgmImagePixelFormat: * @PGM_IMAGE_RGB: 24 bits RGB (3 bytes, red 8 @ 16, green 8 @ 8, blue 8 @ 0). * @PGM_IMAGE_BGR: 24 bits BGR (3 bytes, blue 8 @ 16, green 8 @ 8, red 8 @ 0). * @PGM_IMAGE_RGBA: 32 bits RGBA (4 bytes, red 8 @ 24, green 8 @ 16, blue 8 @ 8, * alpha 8 @ 0). * @PGM_IMAGE_BGRA: 32 bits BGRA (4 bytes, blue 8 @ 24, green 8 @ 16, red 8 @ 8, * alpha 8 @ 0). * @PGM_IMAGE_I420: 12 bits YUV (8 bits Y plane followed by 8 bits quarter * size U/V planes). * @PGM_IMAGE_YV12: 12 bits YUV (8 bits Y plane followed by 8 bits quarter * size V/U planes). * @PGM_IMAGE_UYVY: 16 bits YUV (4 bytes / 2 pixels, macropixel contains * YCbYCr [31:0]). * @PGM_IMAGE_YUYV: 16 bits YUV (4 bytes / 2 pixels, macropixel contains * CbYCrY [31:0], duplicate of YUY2). * * The different image pixel formats. */ typedef enum { PGM_IMAGE_RGB = (1 << 0), PGM_IMAGE_BGR = (1 << 1), PGM_IMAGE_RGBA = (1 << 2), PGM_IMAGE_BGRA = (1 << 3), PGM_IMAGE_I420 = (1 << 4), PGM_IMAGE_YV12 = (1 << 5), PGM_IMAGE_UYVY = (1 << 6), PGM_IMAGE_YUYV = (1 << 7) } PgmImagePixelFormat; /** * PgmImageFile: * @pixbuf: the #GdkPixbuf object. * @filename: the file name. * @width: the cached pixbuf width. * @height: the cached pixbuf height. * * The #PgmImageFile structure. */ struct _PgmImageFile { GdkPixbuf *pixbuf; gchar *filename; guint width; guint height; }; /** * PgmImageBuffer: * @buffer: the buffer pointer. * @format: the buffer format. * @width: the buffer width. * @height: the buffer height. * @stride: the buffer stride. * @size: the buffer size. * * The #PgmImageBuffer structure. */ struct _PgmImageBuffer { guint8 *buffer; PgmImagePixelFormat format; guint width; guint height; guint stride; guint size; }; /** * PgmImageGstBuffer: * @gst_buffer: the #GstBuffer object. * @format: the #GstBuffer format. * @width: the #GstBuffer width. * @height: the #GstBuffer height. * @stride: the #GstBuffer stride. * * The #PgmImageGstBuffer structure. */ struct _PgmImageGstBuffer { GstBuffer *gst_buffer; PgmImagePixelFormat format; guint width; guint height; guint stride; }; /** * PgmImagePixbuf: * @pixbuf: the #GdkPixbuf object. * * The #PgmImagePixbuf structure. */ struct _PgmImagePixbuf { GdkPixbuf *pixbuf; }; /** * PgmImageSystemBuffer: * @system_buffer: the system buffer pointer. * @format: the system buffer format. * @width: the system buffer width. * @height: the system buffer height. * * The #PgmImageSystemBuffer structure. */ struct _PgmImageSystemBuffer { gconstpointer system_buffer; PgmImagePixelFormat format; guint width; guint height; }; /** * PgmImageStorageType: * @PGM_IMAGE_EMPTY: no image stored. * @PGM_IMAGE_FILE: a #PgmImageFile is stored. * @PGM_IMAGE_BUFFER: a #PgmImageBuffer is stored. * @PGM_IMAGE_GST_BUFFER: a #PgmImageGstBuffer is stored. * @PGM_IMAGE_PIXBUF: a #PgmImagePixbuf is stored. * @PGM_IMAGE_IMAGE: a #PgmImage is stored. * @PGM_IMAGE_SYSTEM_BUFFER: a #PgmImageSystemBuffer is stored. * * The different storage type. */ typedef enum { PGM_IMAGE_EMPTY, PGM_IMAGE_FILE, PGM_IMAGE_BUFFER, PGM_IMAGE_GST_BUFFER, PGM_IMAGE_PIXBUF, PGM_IMAGE_IMAGE, PGM_IMAGE_SYSTEM_BUFFER } PgmImageStorageType; /** * PgmImageData: * @buffer: the #PgmImageFile structure. * @buffer: the #PgmImageBuffer structure. * @gst_buffer: the #PgmImageGstBuffer structure. * @pixbuf: the #PgmImagePixbuf structure. * @system_buffer: the #PgmImageSystemBuffer structure. * * The stored data depending on the storage type. */ union _PgmImageData { PgmImageFile file; PgmImageBuffer buffer; PgmImageGstBuffer gst_buffer; PgmImagePixbuf pixbuf; PgmImageSystemBuffer system_buffer; }; /** * PgmImage: * @master: the image #PgmImage master. * @slaves: the image list of #PgmImage slaves. * @mapping_matrix: the image mapping matrix. * @storage_type: the currently stored image type. * @data: the image data depending on the type. * @layout: the image layout. * @align: the image alignment. * @interp: the image interpolation. * @wrap_s: the image s wrapping. * @wrap_t: the image t wrapping. * @par_n: the image pixel-aspect-ratio numerator. * @par_d: the image pixel-aspect-ratio denominator. * @border_width: the image border width. * @border_inner_r: the image border outer red color. * @border_inner_g: the image border outer green color. * @border_inner_b: the image border outer blue color. * @border_inner_a: the image border outer alpha color. * @border_outer_r: the image border outer red color. * @border_outer_g: the image border outer green color. * @border_outer_b: the image border outer blue color. * @border_outer_a: the image border outer alpha color. * * The #PgmImage structure. */ struct _PgmImage { /*< private >*/ PgmDrawable parent; /*< public >*/ /* with LOCK */ /* Slavery handling */ PgmImage *master; GList *slaves; PgmMat4x4 *mapping_matrix; /* Image storage */ PgmImageStorageType storage_type; PgmImageData data; /* Image displaying properties */ PgmImageLayoutType layout; PgmImageAlignment align; PgmImageInterpType interp; PgmImageWrapping wrap_s; PgmImageWrapping wrap_t; guint par_n, par_d; /* Image border */ gfloat border_width; guchar border_inner_r; guchar border_inner_g; guchar border_inner_b; guchar border_inner_a; guchar border_outer_r; guchar border_outer_g; guchar border_outer_b; guchar border_outer_a; /*< private >*/ /* Current loader id */ guint16 loader_id; /* Management bit mask */ guint8 flags; }; struct _PgmImageClass { PgmDrawableClass parent_class; /*< private >*/ GThreadPool *pixbuf_loader_pool; /* Signals */ void (*file_loaded) (PgmImage *image); void (*cloned) (PgmImage *image, PgmImage *clone, guint n_clones); void (*un_cloned) (PgmImage *image, guint n_clones); }; /* Public functions */ GType pgm_image_get_type (void); PgmDrawable *pgm_image_new (void); PgmDrawable *pgm_image_new_from_file (const gchar *filename, guint max_size); PgmDrawable *pgm_image_new_from_pixbuf (GdkPixbuf *pixbuf); PgmDrawable *pgm_image_new_from_buffer (PgmImagePixelFormat format, guint width, guint height, guint stride, guint size, gconstpointer data); PgmDrawable *pgm_image_new_from_image (PgmImage *src_image); PgmError pgm_image_set_from_file (PgmImage *image, const gchar *filename, guint max_size); PgmError pgm_image_set_from_pixbuf (PgmImage *image, GdkPixbuf *pixbuf); PgmError pgm_image_set_from_buffer (PgmImage *image, PgmImagePixelFormat format, guint width, guint height, guint stride, guint size, gconstpointer data); PgmError pgm_image_set_from_gst_buffer (PgmImage *image, PgmImagePixelFormat format, guint width, guint height, guint stride, GstBuffer *buffer); PgmError pgm_image_set_from_system_buffer (PgmImage *image, PgmImagePixelFormat format, guint width, guint height, gconstpointer system_buffer); PgmError pgm_image_set_from_image (PgmImage *image, PgmImage *src_image); PgmError pgm_image_to_pixbuf (PgmImage *image, GdkPixbuf **pixbuf); PgmError pgm_image_clear (PgmImage *image); PgmError pgm_image_get_storage_type (PgmImage *image, PgmImageStorageType *storage); PgmError pgm_image_system_buffer_lock (PgmImage *image); PgmError pgm_image_system_buffer_unlock (PgmImage *image); PgmError pgm_image_set_mapping_matrix (PgmImage *image, PgmMat4x4 *mapping_matrix); PgmError pgm_image_get_mapping_matrix (PgmImage *image, PgmMat4x4 **mapping_matrix); PgmError pgm_image_set_alignment (PgmImage *image, PgmImageAlignment align); PgmError pgm_image_get_alignment (PgmImage *image, PgmImageAlignment *align); PgmError pgm_image_set_layout (PgmImage *image, PgmImageLayoutType layout); PgmError pgm_image_get_layout (PgmImage *image, PgmImageLayoutType *layout); PgmError pgm_image_set_interp (PgmImage *image, PgmImageInterpType interp); PgmError pgm_image_get_interp (PgmImage *image, PgmImageInterpType *interp); PgmError pgm_image_set_wrapping (PgmImage *image, PgmImageWrapping wrap_s, PgmImageWrapping wrap_t); PgmError pgm_image_get_wrapping (PgmImage *image, PgmImageWrapping *wrap_s, PgmImageWrapping *wrap_t); PgmError pgm_image_set_aspect_ratio (PgmImage *image, guint numerator, guint denominator); PgmError pgm_image_get_aspect_ratio (PgmImage *image, guint *numerator, guint *denominator); PgmError pgm_image_set_border_width (PgmImage *image, gfloat width); PgmError pgm_image_get_border_width (PgmImage *image, gfloat *width); PgmError pgm_image_set_border_inner_color (PgmImage *image, guchar red, guchar green, guchar blue, guchar alpha); PgmError pgm_image_get_border_inner_color (PgmImage *image, guchar *red, guchar *green, guchar *blue, guchar *alpha); PgmError pgm_image_set_border_outer_color (PgmImage *image, guchar red, guchar green, guchar blue, guchar alpha); PgmError pgm_image_get_border_outer_color (PgmImage *image, guchar *red, guchar *green, guchar *blue, guchar *alpha); PgmError pgm_image_from_drawable (PgmImage *image, gint *x_image, gint *y_image, gfloat x_drawable, gfloat y_drawable); PgmError pgm_image_to_drawable (PgmImage *image, gfloat *x_drawable, gfloat *y_drawable, gint x_image, gint y_image); /* Protected functions */ PgmError _pgm_image_stored_from_file_free (PgmImage *image); PgmError _pgm_image_stored_from_file_load (PgmImage *image); G_END_DECLS #endif /* __PGM_IMAGE_H__ */ pigment-0.3.17/pgm/pgmmarshal.h0000644000175000017500000001327611205034716013265 00000000000000 #ifndef __pgm_marshal_MARSHAL_H__ #define __pgm_marshal_MARSHAL_H__ #include G_BEGIN_DECLS /* VOID:VOID (./pgmmarshal.list:27) */ #define pgm_marshal_VOID__VOID g_cclosure_marshal_VOID__VOID /* VOID:ENUM (./pgmmarshal.list:28) */ #define pgm_marshal_VOID__ENUM g_cclosure_marshal_VOID__ENUM /* VOID:BOXED (./pgmmarshal.list:29) */ #define pgm_marshal_VOID__BOXED g_cclosure_marshal_VOID__BOXED /* VOID:UINT (./pgmmarshal.list:30) */ #define pgm_marshal_VOID__UINT g_cclosure_marshal_VOID__UINT /* BOOLEAN:BOXED (./pgmmarshal.list:31) */ extern void pgm_marshal_BOOLEAN__BOXED (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* LONG:BOXED (./pgmmarshal.list:32) */ extern void pgm_marshal_LONG__BOXED (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* VOID:OBJECT,UINT (./pgmmarshal.list:33) */ extern void pgm_marshal_VOID__OBJECT_UINT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* VOID:OBJECT,OBJECT (./pgmmarshal.list:34) */ extern void pgm_marshal_VOID__OBJECT_OBJECT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* VOID:OBJECT,OBJECT,INT (./pgmmarshal.list:35) */ extern void pgm_marshal_VOID__OBJECT_OBJECT_INT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* BOOLEAN:FLOAT,FLOAT,FLOAT,ENUM,UINT (./pgmmarshal.list:36) */ extern void pgm_marshal_BOOLEAN__FLOAT_FLOAT_FLOAT_ENUM_UINT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* BOOLEAN:FLOAT,FLOAT,FLOAT,ENUM,UINT,UINT (./pgmmarshal.list:37) */ extern void pgm_marshal_BOOLEAN__FLOAT_FLOAT_FLOAT_ENUM_UINT_UINT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* BOOLEAN:FLOAT,FLOAT,FLOAT,UINT (./pgmmarshal.list:38) */ extern void pgm_marshal_BOOLEAN__FLOAT_FLOAT_FLOAT_UINT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* VOID:FLOAT,FLOAT,FLOAT,UINT (./pgmmarshal.list:39) */ extern void pgm_marshal_VOID__FLOAT_FLOAT_FLOAT_UINT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* VOID:UINT,UINT,POINTER (./pgmmarshal.list:40) */ extern void pgm_marshal_VOID__UINT_UINT_POINTER (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); G_END_DECLS #endif /* __pgm_marshal_MARSHAL_H__ */ pigment-0.3.17/pgm/pgm.h0000644000175000017500000000376411205034416011713 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment media rendering library * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author(s): Loïc Molinari * Julien Moutte */ #ifndef __HAVE_PGM_H__ #define __HAVE_PGM_H__ #include "pgmversion.h" #include "pgmviewport.h" #include "pgmcanvas.h" #include "pgmimage.h" #include "pgmtext.h" #include "pgmevents.h" #include "pgmplugin.h" #include "pgmlinearalgebra.h" #include "pgmimagesink.h" #include "pgmenumtypes.h" #include "pgmkeysyms.h" G_BEGIN_DECLS void pgm_init (int *argc, char **argv[]); gboolean pgm_init_check (int *argc, char **argv[]); void pgm_deinit (void); void pgm_version (guint *major, guint *minor, guint *micro, guint *nano); gchar *pgm_version_string (void); gboolean pgm_events_pending (void); void pgm_main (void); void pgm_main_quit (void); void pgm_main_iteration (void); void pgm_main_iteration_do (gboolean blocking); G_END_DECLS #endif /* __HAVE_PGM_H__ */ pigment-0.3.17/pgm/pgmviewportfactory.c0000644000175000017500000002635711205034416015101 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment media rendering library * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author(s): Loïc Molinari * Julien Moutte */ /** * SECTION:pgmviewportfactory * @short_description: A factory creating viewports. * @see_also: #PgmViewport. * * #PgmViewportFactory is used to create instances of #PgmViewport. * * Use the pgm_viewport_factory_new() and pgm_viewport_factory_create() * functions to create viewport instances or use pgm_viewport_factory_make() * as a convenient shortcut. * * The following code example shows you how to create an OpenGL based viewport. * * * Using a viewport factory * * PgmViewportFactory *factory; * PgmViewport *viewport; *   * pgm_init (&argc, &argv); *   * factory = pgm_viewport_factory_new ("opengl"); * pgm_viewport_factory_create (factory, &viewport); * * * * Last reviewed on 2007-04-12 (0.1.5) */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include "pgmviewportfactory.h" GST_DEBUG_CATEGORY_STATIC (pgm_viewport_factory_debug); #define GST_CAT_DEFAULT pgm_viewport_factory_debug static PgmViewportFactoryClass *parent_class = NULL; /* Already created factories*/ static GHashTable *factory_hash = NULL; /* GObject stuff */ static void pgm_viewport_factory_dispose (GObject *object) { PgmViewportFactory *factory = PGM_VIEWPORT_FACTORY (object); if (factory->module) { g_object_unref (factory->module); factory->module = NULL; } GST_CALL_PARENT (G_OBJECT_CLASS, dispose, (object)); } static void pgm_viewport_factory_class_init (PgmViewportFactoryClass *klass) { GObjectClass *gobject_class = (GObjectClass *) klass; parent_class = g_type_class_peek_parent (klass); gobject_class->dispose = GST_DEBUG_FUNCPTR (pgm_viewport_factory_dispose); GST_DEBUG_CATEGORY_INIT (pgm_viewport_factory_debug, "pgm_viewport_factory", 0, "Pigment ViewportFactory object"); } static void pgm_viewport_factory_base_class_init (PgmViewportFactoryClass *klass) { factory_hash = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref); } static void pgm_viewport_factory_base_class_finalize (PgmViewportFactoryClass *klass) { g_hash_table_unref (factory_hash); } static void pgm_viewport_factory_init (PgmViewportFactory *factory) { factory->module = NULL; } GType pgm_viewport_factory_get_type (void) { static GType pgm_viewport_factory_type = 0; if (G_UNLIKELY (pgm_viewport_factory_type == 0)) { static const GTypeInfo viewport_factory_info = { sizeof (PgmViewportFactoryClass), (GBaseInitFunc) pgm_viewport_factory_base_class_init, (GBaseFinalizeFunc) pgm_viewport_factory_base_class_finalize, (GClassInitFunc) pgm_viewport_factory_class_init, NULL, NULL, sizeof (PgmViewportFactory), 0, (GInstanceInitFunc) pgm_viewport_factory_init, NULL }; pgm_viewport_factory_type = g_type_register_static (GST_TYPE_OBJECT, "PgmViewportFactory", &viewport_factory_info, 0); } return pgm_viewport_factory_type; } /* Public methods */ /** * pgm_viewport_factory_new: * @name: the name of the factory to create. * * Creates a new #PgmViewportFactory instance of the given @name. * #PgmViewportFactory is a singleton, if a factory of the given name has * already been created, this constructor returns that one with a incremented * refcount. * This function does not detect if the name passed as argument is an invalid * name (i.e. if there is no plugin of that name). Such an error will only be * detected when trying to use the factory (e.g. with * pgm_viewport_factory_create() or with one of the pgm_viewport_factory_get*() * functions. * * MT safe. * * Returns: a #PgmViewportFactory instance or NULL if an error occurred. */ PgmViewportFactory * pgm_viewport_factory_new (const gchar *name) { PgmViewportFactory *factory = NULL; PgmModule *module = NULL; /* Checks whether we already have a factory of that name. We check if the * factory hash-table exists, since if no factory has been created before, * it is not initialised. */ if (G_LIKELY (factory_hash)) { factory = g_hash_table_lookup (factory_hash, name); if (factory) return gst_object_ref (factory); } module = pgm_module_new (name); /* A plugin has been found */ if (G_LIKELY (module)) { /* Let's create and initialize the factory */ factory = g_object_new (PGM_TYPE_VIEWPORT_FACTORY, NULL); factory->module = module; module = NULL; GST_DEBUG_OBJECT (factory, "Created new viewport factory"); g_hash_table_insert (factory_hash, g_strdup (name), gst_object_ref (factory)); } else GST_WARNING ("Can't find any plugin with name '%s'", name); return factory; } /** * pgm_viewport_factory_get_description: * @factory: a #PgmViewportFactory object. * @description: a pointer to a pointer to a #gchar where the description * string is going to be be stored. g_free() after use. * * Retrieves the description of the viewports managed by @factory in * @description. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_viewport_factory_get_description (PgmViewportFactory *factory, gchar **description) { g_return_val_if_fail (PGM_IS_VIEWPORT_FACTORY (factory), PGM_ERROR_X); g_return_val_if_fail (description != NULL, PGM_ERROR_X); g_return_val_if_fail (factory->module, PGM_ERROR_X); if (!g_type_module_use (G_TYPE_MODULE (factory->module))) return PGM_ERROR_X; GST_OBJECT_LOCK (factory); *description = g_strdup (factory->module->plugin_desc->description); GST_OBJECT_UNLOCK (factory); g_type_module_unuse (G_TYPE_MODULE (factory->module)); return PGM_ERROR_OK; } /** * pgm_viewport_factory_get_license: * @factory: a #PgmViewportFactory object. * @license: a pointer to a pointer to a #gchar where the license string is * going to be be stored. g_free() after use. * * Retrieves the license of the viewports managed by @factory in @license. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_viewport_factory_get_license (PgmViewportFactory *factory, gchar **license) { g_return_val_if_fail (PGM_IS_VIEWPORT_FACTORY (factory), PGM_ERROR_X); g_return_val_if_fail (license != NULL, PGM_ERROR_X); if (!g_type_module_use (G_TYPE_MODULE (factory->module))) return PGM_ERROR_X; GST_OBJECT_LOCK (factory); *license = g_strdup (factory->module->plugin_desc->license); GST_OBJECT_UNLOCK (factory); g_type_module_unuse (G_TYPE_MODULE (factory->module)); return PGM_ERROR_OK; } /** * pgm_viewport_factory_get_origin: * @factory: a #PgmViewportFactory object. * @origin: a pointer to a pointer to a #gchar where the origin string is * going to be be stored. g_free() after use. * * Retrieves the origin of the viewports managed by @factory in @origin. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_viewport_factory_get_origin (PgmViewportFactory *factory, gchar **origin) { g_return_val_if_fail (PGM_IS_VIEWPORT_FACTORY (factory), PGM_ERROR_X); g_return_val_if_fail (origin != NULL, PGM_ERROR_X); if (!g_type_module_use (G_TYPE_MODULE (factory->module))) return PGM_ERROR_X; GST_OBJECT_LOCK (factory); *origin = g_strdup (factory->module->plugin_desc->origin); GST_OBJECT_UNLOCK (factory); g_type_module_unuse (G_TYPE_MODULE (factory->module)); return PGM_ERROR_OK; } /** * pgm_viewport_factory_get_author: * @factory: a #PgmViewportFactory object. * @author: a pointer to a pointer to a #gchar where the author string is * going to be be stored. g_free() after use. * * Retrieves the author of the viewports managed by @factory in @author. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_viewport_factory_get_author (PgmViewportFactory *factory, gchar **author) { g_return_val_if_fail (PGM_IS_VIEWPORT_FACTORY (factory), PGM_ERROR_X); g_return_val_if_fail (author != NULL, PGM_ERROR_X); if (!g_type_module_use (G_TYPE_MODULE (factory->module))) return PGM_ERROR_X; GST_OBJECT_LOCK (factory); *author = g_strdup (factory->module->plugin_desc->author); GST_OBJECT_UNLOCK (factory); g_type_module_unuse (G_TYPE_MODULE (factory->module)); return PGM_ERROR_OK; } /** * pgm_viewport_factory_create: * @factory: a #PgmViewportFactory object. * @viewport: a pointer to a #PgmViewport's pointer where the created viewport * is going to be be stored. * * Creates a new viewport of the type defined by @factory in @viewport. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_viewport_factory_create (PgmViewportFactory *factory, PgmViewport **viewport) { g_return_val_if_fail (PGM_IS_VIEWPORT_FACTORY (factory), PGM_ERROR_X); g_return_val_if_fail (viewport != NULL, PGM_ERROR_X); /* FIXME: we should return a more specific error if the module loading fails */ if (!g_type_module_use (G_TYPE_MODULE (factory->module))) return PGM_ERROR_X; GST_OBJECT_LOCK (factory); *viewport = factory->module->plugin_desc->create (); (*viewport)->factory = gst_object_ref (GST_OBJECT_CAST (factory)); GST_OBJECT_UNLOCK (factory); g_type_module_unuse (G_TYPE_MODULE (factory->module)); GST_DEBUG_OBJECT (*viewport, "created new viewport"); return PGM_ERROR_OK; } /** * pgm_viewport_factory_make: * @name: the name of the viewport to make. * @viewport: a pointer to a #PgmViewport's pointer where the created viewport * is going to be be stored. * * Creates a new viewport of the given @name in @viewport. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_viewport_factory_make (const gchar *name, PgmViewport **viewport) { PgmViewportFactory *factory; g_return_val_if_fail (viewport != NULL, PGM_ERROR_X); factory = pgm_viewport_factory_new (name); g_return_val_if_fail (factory != NULL, PGM_ERROR_X); pgm_viewport_factory_create (factory, viewport); gst_object_unref (GST_OBJECT_CAST (factory)); return PGM_ERROR_OK; } pigment-0.3.17/pgm/Makefile.am0000644000175000017500000000747111205034416013012 00000000000000SUBDIRS = . if USE_IMAGING_LIBRARY SUBDIRS += imaging endif if USE_GTK_WIDGET SUBDIRS += gtk endif MARSHAL_SRC_FILES = pgmmarshal.c MARSHAL_H_FILES = pgmmarshal.h MARSHALFILES = $(MARSHAL_SRC_FILES) $(MARSHAL_H_FILES) ENUM_SRC_FILES = pgmenumtypes.c ENUM_H_FILES = pgmenumtypes.h ENUMFILES = $(ENUM_SRC_FILES) $(ENUM_H_FILES) GLIB_GENMARSHAL=`pkg-config --variable=glib_genmarshal glib-2.0` GLIB_MKENUMS=`pkg-config --variable=glib_mkenums glib-2.0` BUILT_SOURCES = \ $(MARSHALFILES) \ $(ENUMFILES) source_h = \ $(srcdir)/pgm.h \ $(srcdir)/pgmcanvas.h \ $(srcdir)/pgmcommon.h \ $(srcdir)/pgmdrawable.h \ $(srcdir)/pgmevents.h \ $(srcdir)/pgmimage.h \ $(srcdir)/pgmplugin.h \ $(srcdir)/pgmtext.h \ $(srcdir)/pgmviewport.h \ $(srcdir)/pgmviewportfactory.h \ $(srcdir)/pgmlinearalgebra.h \ $(srcdir)/pgmimagesink.h \ $(srcdir)/pgmmodule.h \ $(srcdir)/pgmkeysyms.h \ pgmenumtypes.h pgmincludedir = $(includedir)/pigment-@PGM_MAJORMINOR@/pgm pgminclude_HEADERS = $(source_h) pgmmarshal.h: pgmmarshal.list ( $(GLIB_GENMARSHAL) --prefix=pgm_marshal \ $(srcdir)/pgmmarshal.list --header > pgmmarshal.h ) pgmmarshal.c: pgmmarshal.h ( $(GLIB_GENMARSHAL) --prefix=pgm_marshal \ $(srcdir)/pgmmarshal.list --body --header > pgmmarshal.c ) pgmenumtypes.h: stamp-pgmenumtypes.h @true stamp-pgmenumtypes.h: $(source_h) Makefile $(GLIB_MKENUMS) \ --fhead "#ifndef __PGM_ENUM_TYPES_H__\n" \ --fhead "#define __PGM_ENUM_TYPES_H__\n\n" \ --fhead "G_BEGIN_DECLS\n\n" \ --ftail "G_END_DECLS\n\n" \ --ftail "#endif\n" \ --fprod "/* --- @filename@ --- */\n" \ --eprod "#define PGM_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n" \ --eprod "GType @enum_name@_get_type (void);\n\n" \ $(source_h) >> xgen-ceth \ && (cmp xgen-ceth $(srcdir)/pgmenumtypes.h || cp xgen-ceth pgmenumtypes.h) \ && rm -f xgen-ceth \ && echo timestamp > $(@F) pgmenumtypes.c: pgmenumtypes.h $(GLIB_MKENUMS) \ --fhead "#include \n" \ --fhead "#include \"pgmenumtypes.h\"\n" \ --fprod "\n/* enumerations from \"@filename@\" */" \ --fprod "\n#include \"@filename@\"" \ --vhead "static const G@Type@Value _@enum_name@_values[] = {" \ --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \ --vtail " { 0, NULL, NULL }\n};\n\n" \ --vtail "GType\n@enum_name@_get_type (void)\n{\n" \ --vtail " static GType type = 0;\n\n" \ --vtail " if (!type)\n" \ --vtail " type = g_@type@_register_static (\"@EnumName@\", _@enum_name@_values);\n\n" \ --vtail " return type;\n}\n\n" \ $(source_h) >> xgen-cetc \ && cp xgen-cetc pgmenumtypes.c \ && rm -f xgen-cetc CLEANFILES = \ $(BUILT_SOURCES) \ stamp-pgmenumtypes.h \ *.gcno \ *.gcda \ *.gcov \ *.gcov.out source_c = \ $(srcdir)/pgm.c \ $(srcdir)/pgmcanvas.c \ $(srcdir)/pgmcommon.c \ $(srcdir)/pgmdrawable.c \ $(srcdir)/pgmevents.c \ $(srcdir)/pgmimage.c \ $(srcdir)/pgmtext.c \ $(srcdir)/pgmviewport.c \ $(srcdir)/pgmviewportfactory.c \ $(srcdir)/pgmmodule.c \ $(srcdir)/pgmlinearalgebra.c \ $(srcdir)/pgmimagesink.c \ pgmenumtypes.c libpigment_@PGM_MAJORMINOR@_la_SOURCES = \ $(MARSHAL_SRC_FILES) \ $(source_c) lib_LTLIBRARIES = libpigment-@PGM_MAJORMINOR@.la libpigment_@PGM_MAJORMINOR@_la_CFLAGS = \ $(PGM_OPTION_CFLAGS) \ $(PGM_ALL_CFLAGS) libpigment_@PGM_MAJORMINOR@_la_LIBADD = $(PGM_ALL_LIBS) libpigment_@PGM_MAJORMINOR@_la_LDFLAGS = \ $(PGM_LIB_LDFLAGS) \ $(PGM_ALL_LDFLAGS) \ $(PGM_LT_LDFLAGS) libpigment_@PGM_MAJORMINOR@_includedir = \ $(includedir)/pigment-@PGM_MAJORMINOR@/pgm libpigment_@PGM_MAJORMINOR@_include_HEADERS = \ $(source_h) \ pgmmarshal.h \ pgmenumtypes.h \ pgmversion.h EXTRA_DIST = \ pgmmarshal.list \ pgmversion.h.in DISTCLEANFILES = \ $(MARSHALFILES) \ $(ENUMFILES) \ pgmversion.h %.c.gcov: .libs/libpigment_@PGM_MAJORMINOR@_la-%.gcda %.c LANG=C $(GCOV) -b -f -o $^ > $@.out gcov: $(libpigment_@PGM_MAJORMINOR@_la_SOURCES:=.gcov) pigment-0.3.17/pgm/pgm.c0000644000175000017500000002714611205034416011706 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment media rendering library * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author(s): Loïc Molinari * Julien Moutte */ /** * SECTION:pgm * @short_description: A library to create rich application user interfaces. * @see_also: #PgmViewport, #PgmDrawable. * * * * Pigment is a media rendering library written in C providing an abstraction * layer to easily design GUI (Graphical User Interfaces) like simple games, * media center/set-top box applications, etc. It has a pluggable backend * system so that the same application can run on various hardware and software * platforms using rendering libraries such as OpenGL or DirectFB on * operating systems such as Windows, GNU/Linux or Mac OS X. * * * Pigment has been designed to handle common issues like non square pixels * displays, non square pixels images or video sources, positioning abstraction * and scalable user interface support. Moreover, Pigment is a fully thread safe * library which means that you can call methods on Pigment objects from * multiple threads at the same time even if the rendering backend is not thread * safe itself like some OpenGL implementations are for example. * * Pigment initialization * * The Pigment library has to be initialized * with pgm_init() before it can be used. You should pass pointers to * the main argc and argv variables so that Pigment can process its own command * line options, as shown in the following example. * * * * Initializing the library * * int * main (int argc, char *argv[]) * { * pgm_init (&argc, &argv); * ... * } * * * * * The pgm_deinit() call is used to clean up all internal resources used * by Pigment. * * Pigment version retrieval * * Use pgm_version() to query the library version at runtime or use the * PGM_VERSION_* macros to find the version at compile time. Optionally * pgm_version_string() returns a printable string. * * Pigment programming model * * Pigment is a GUI toolkit based on an event-driven programming model. When the * user is doing nothing, Pigment sits in the main loop and waits for input. * If the user performs some action, like a mouse button click, then the main * loop "wakes up" and delivers an event to Pigment. When a viewport receives * an event, it emits a signal to notify your program that something happened * by invoking functions you connected to the signal with * g_signal_connect(). Functions connected to a signal are often termed * callbacks. When your callbacks are invoked, you would typically take some * action, for example when a key of the keyboard is pressed you might update * the properties of your drawables. After a callback finishes, Pigment will * return to the main loop and await more user input. * * * * Last reviewed on 2007-09-25 (0.3.1) */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #include #include "pgm.h" GST_DEBUG_CATEGORY (pgm_debug); #define GST_CAT_DEFAULT pgm_debug static GMainLoop *main_loop = NULL; static gboolean pgm_initialized = FALSE; /* Private functions */ static void init_logging_element_from_string (const gchar *element) { gchar **array = NULL; char *name = NULL, *debug = NULL; if (!element) return; array = g_strsplit (element, ":", 2); if (!(array && array[0] && array[1])) goto tidy; name = array[0]; debug = array[1]; /* the debug level is only one bit */ if (name && *name && debug && *debug && !debug[1]) { gint debug_level = debug[0] - '0'; gst_debug_set_threshold_for_name (name, debug_level); } tidy: g_free (name); g_free (debug); g_free (array); } static void init_logging (const gchar *debug_list) { gchar **array = NULL; gchar **walk = NULL; array = g_strsplit (debug_list, ",", 0); walk = array; while (walk && *walk) { init_logging_element_from_string (*walk); g_free (*walk); walk++; } g_free (array); } /* Public functions */ /** * pgm_init: * @argc: the address of the @argc parameter of your main function. * @argv: the address of the @argv parameter of your main function. * * Initializes the Pigment library. * * * This function will terminate your program if it was unable to initialize * Pigment for some reason. If you want your program to fall back, * use pgm_init_check() instead. * */ void pgm_init (int *argc, char **argv[]) { if (!pgm_init_check (argc, argv)) { g_print ("Could not initialize Pigment\n"); exit (1); } } /** * pgm_init_check: * @argc: the address of the @argc parameter of your main function. * @argv: the address of the @argv parameter of your main function. * * Initializes the Pigment library without terminating the program if it * was unable to initialize successfully. * * Returns: %TRUE if Pigment was initialized successfully, %FALSE otherwise. */ gboolean pgm_init_check (int *argc, char **argv[]) { const gchar *debug_list = NULL; gchar *pigment_version = NULL; gboolean registered = FALSE; /* If the user gives us PGM_DEBUG, we use its logging request. Otherwise, we * use the default log level which is GST_LEVEL_INFO for Subversion builds and * GST_LEVEL_NONE for release builds. */ debug_list = g_getenv ("PGM_DEBUG"); if (debug_list) init_logging (debug_list); else gst_debug_set_threshold_for_name ("pgm_*", PGM_DEFAULT_LOG_LEVEL); GST_DEBUG_CATEGORY_INIT (pgm_debug, "pgm", 0, "Pigment library"); GST_INFO ("Initializing Pigment"); /* We are already initialized */ if (pgm_initialized) { GST_DEBUG ("Already initialized Pigment"); return TRUE; } /* Initialize GStreamer */ if (!gst_init_check (argc, argv, NULL)) return FALSE; /* Register our image sink. There's a bug in GStreamer with versions older * than 0.10.13 which prevents to register static plugin giving NULL for * the plugin parameter. The fix has been pushed in revision 1.131 of * gstelementfactory.c in the GStreamer repository. */ #ifdef HAVE_GST_0_10_13 registered = gst_element_register (NULL, "pgmimagesink", GST_RANK_NONE, PGM_TYPE_IMAGE_SINK); #else { /* Let's start the hack */ GstPlugin plugin; plugin.desc.name = g_strdup ("NULL"); registered = gst_element_register (&plugin, "pgmimagesink", GST_RANK_NONE, PGM_TYPE_IMAGE_SINK); } #endif /* HAVE_GST_0_10_13 */ if (!registered) { GST_DEBUG ("cannot register the gstreamer image sink"); return FALSE; } GST_DEBUG ("registered the gstreamer image sink"); /* We are now initialized */ pgm_initialized = TRUE; pigment_version = pgm_version_string (); GST_DEBUG ("%s initialized successfully", pigment_version); g_free (pigment_version); return TRUE; } /** * pgm_deinit: * * Deinitializes the Pigment library. This is not going to free Pigment * objects, you need to explicitely unref these objects using * gst_object_unref(). */ void pgm_deinit (void) { GST_INFO ("Deinitializing Pigment"); if (pgm_initialized == TRUE) pgm_initialized = FALSE; } /** * pgm_version: * @major: a pointer to a #guint to store the major version number. * @minor: a pointer to a #guint to store the minor version number. * @micro: a pointer to a #guint to store the micro version number. * @nano: a pointer to a #guint to store the nano version number. * * Gets the version number of the Pigment library. */ void pgm_version (guint *major, guint *minor, guint *micro, guint *nano) { g_return_if_fail (major); g_return_if_fail (minor); g_return_if_fail (micro); g_return_if_fail (nano); *major = PGM_VERSION_MAJOR; *minor = PGM_VERSION_MINOR; *micro = PGM_VERSION_MICRO; *nano = PGM_VERSION_NANO; } /** * pgm_version_string: * * Returns a string that is useful for describing this version of Pigment to * the outside world: user agent strings, logging, etc. * * Returns: a newly allocated string describing this version of Pigment. */ gchar * pgm_version_string (void) { guint major, minor, micro, nano; pgm_version (&major, &minor, µ, &nano); if (nano == 0) return g_strdup_printf ("Pigment %d.%d.%d", major, minor, micro); else if (nano == 1) return g_strdup_printf ("Pigment %d.%d.%d (SVN)", major, minor, micro); else return g_strdup_printf ("Pigment %d.%d.%d (prerelease)", major, minor, micro); } /** * pgm_events_pending: * * Checks if any events are pending. This can be used to update the GUI, while * doing some time intensive computation. * * * Updating the GUI during a long computation. * * // computation going on * ... * while (pgm_events_pending ()) * pgm_main_iteration (); * ... * // computation continued * * * * Returns: %TRUE if any events are pending, %FALSE otherwise. */ gboolean pgm_events_pending (void) { return g_main_context_pending (NULL); } /** * pgm_main: * * Runs the main loop until pgm_main_quit() is called. It's ok to use the GLib * main loop directly instead, though it involves slightly more typing. See * GMainLoop in the GLib documentation. */ void pgm_main (void) { if (G_LIKELY (!main_loop)) { main_loop = g_main_loop_new (NULL, TRUE); GST_DEBUG ("Running the main loop"); g_main_loop_run (main_loop); g_main_loop_unref (main_loop); main_loop = NULL; } else GST_DEBUG ("Cannot nest calls to pgm_main"); } /** * pgm_main_quit: * * Quits the main loop. */ void pgm_main_quit (void) { GST_DEBUG ("Quitting the main loop"); g_main_loop_quit (main_loop); } /** * pgm_main_iteration: * * Runs a single iteration of the main loop. If no events are waiting to be * processed, Pigment will block until the next event is noticed. If you don't * want to block, look at pgm_main_iteration_do() or check if any events are * pending with pgm_events_pending() first. */ void pgm_main_iteration (void) { g_main_context_iteration (NULL, TRUE); } /** * pgm_main_iteration_do: * @blocking: %TRUE if you want Pigment to block if no events are pending. * * Runs a single iteration of the main loop. If no events are available, * either returns or blocks dependent on the value of @blocking. */ void pgm_main_iteration_do (gboolean blocking) { g_main_context_iteration (NULL, blocking); } pigment-0.3.17/pgm/pgmversion.h.in0000644000175000017500000000406111205034416013715 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment media rendering library * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ /** * SECTION:pgmversion * @short_description: Pigment version macros. * * You can use the macros to keep the Pigment version information in * your application. * * Use the pgm_version() function if you want to know which version of * Pigment you are currently linked against. * * The version macros get defined by including "pgm/pgm.h". * * Last reviewed on 2007-04-12 (0.1.5) */ #ifndef __PGM_VERSION_H__ #define __PGM_VERSION_H__ #include G_BEGIN_DECLS /** * PGM_VERSION_MAJOR: * * The major version of Pigment at compile time. */ #define PGM_VERSION_MAJOR (@PACKAGE_VERSION_MAJOR@) /** * PGM_VERSION_MINOR: * * The minor version of Pigment at compile time. */ #define PGM_VERSION_MINOR (@PACKAGE_VERSION_MINOR@) /** * PGM_VERSION_MICRO: * * The micro version of Pigment at compile time. */ #define PGM_VERSION_MICRO (@PACKAGE_VERSION_MICRO@) /** * PGM_VERSION_NANO: * * The nano version of Pigment at compile time. Actual releases have 0, * Subversion versions have 1, prerelease versions have [2-n]. */ #define PGM_VERSION_NANO (@PACKAGE_VERSION_NANO@) G_END_DECLS #endif /* __PGM_VERSION_H__ */ pigment-0.3.17/pgm/pgmmodule.h0000644000175000017500000000416211205034416013112 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment media rendering library * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author(s): Guillaume Emont */ #ifndef __PGM_MODULE_H__ #define __PGM_MODULE_H__ typedef struct _PgmModule PgmModule; typedef struct _PgmModuleClass PgmModuleClass; #include #include #include "pgmplugin.h" G_BEGIN_DECLS #define PGM_TYPE_MODULE (pgm_module_get_type ()) #define PGM_MODULE(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), PGM_TYPE_MODULE, PgmModule)) #define PGM_MODULE_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), PGM_TYPE_MODULE, PgmModuleClass)) #define PGM_IS_MODULE(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), PGM_TYPE_MODULE)) #define PGM_IS_MODULE_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), PGM_TYPE_MODULE)) #define PGM_MODULE_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS((obj), PGM_TYPE_MODULE, PgmModuleClass)) struct _PgmModule { GTypeModule parent; /* All access to this must be made between a call to g_type_module_use() and * g_type_module_unuse() on the considered PgmModule */ PgmPluginDesc *plugin_desc; gchar *name; GModule *handle; }; struct _PgmModuleClass { GTypeModuleClass parent_class; }; GType pgm_module_get_type (void); PgmModule *pgm_module_new (const gchar *name); G_END_DECLS #endif /* __PGM_MODULE_H__ */ pigment-0.3.17/pgm/pgmimage.c0000644000175000017500000017356411205034416012717 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment media rendering library * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author(s): Loïc Molinari * Julien Moutte */ /** * SECTION:pgmimage * @short_description: An image drawable supporting various media. * @see_also: #PgmDrawable, #PgmText, #PgmCanvas. * * * * #PgmImage is a drawable displaying media. It supports various ways of loading * images through buffers, file paths or videos through GStreamer. * * Loading image data * * Image data loading can happen with three different functions: * * * * pgm_image_set_from_buffer() takes a pre-loaded data buffer and sets it as * the currently displayed image. This is useful when you want to use an image * loading library (GdkPixbuf, FreeImage, etc) in your application and just * provide the pixels to #PgmImage for display. The data buffer containing the * pixels is copied internally, you can free the data buffer from the * application side as soon as the function returns. * * * * * pgm_image_set_from_gst_buffer() takes a GStreamer #GstBuffer and sets it as * the currently displayed image. This is mostly used to do video rendering. * There's no copying of the buffer data to optimize performances, indeed the * reference count of the buffer is going to be increased to keep the buffer * around while it's needed for rendering. When you call pgm_image_clear() the * reference to the buffer will be decreased and the buffer can get freed. Note * that this method is used by #PgmSink to render video frames directly in a * #PgmImage when the pipeline is playing. * * * * * pgm_image_set_from_file() takes a path to an image file delegating image * loading to Pigment. Thus the loading is asynchronous and won't block the * Pigment main loop. * * * * * Sharing image data between #PgmImage objects * * pgm_image_set_from_image() is a convenient system to slave an image to * another one. Indeed you might want to load an image data once and then use * it in multiple image objects. In that case this image becomes a slave to the * one that has the image data loaded internally and each time it needs to draw * it will use that data. * * * Layout settings of the drawable are independent from one image to another. * That means that even if two image objects are using the same image, they can * have different colors, different #PgmDrawableLayoutType or different * #PgmDrawableAlignment. * * * Each time a new image data buffer is loaded in the master image object, all * the slave image objects are automatically updated. That means you can render * a video clip in ten different drawables without doing anything else than * slaving nine image objects to the one that's receiving the image data. * * Image data aspect ratio * * This rarely happens with normal images but video rendering often has non * square pixels video frames coming out of the video decoders (DVD, DV cameras, * etc). In that case a calculation has to be done when projecting to the * viewport so that we put in adequation both the pixel aspect ratio and the * source video aspect ratio. You can set the image aspect ratio using * pgm_image_set_aspect_ratio() and be assured that Pigment is going to render * that image correctly on the viewport. * * Benefitting from hardware acceleration * * Depending on the viewport implementation, some #PgmImagePixelFormat (color * space) can be supported or not. When it comes to video rendering, hardware * acceleration is very important and you need to know what kind of pixel * formats are convenient for the rendering backend. you can get a list of * supported (accelerated) pixel formats using * pgm_viewport_get_pixel_formats(). * * * * Last reviewed on 2007-11-08 (0.3.2) */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include "pgmimage.h" #include "pgmmarshal.h" #include /* atoi */ GST_DEBUG_CATEGORY_STATIC (pgm_image_debug); #define GST_CAT_DEFAULT pgm_image_debug /* Image signals */ enum { FILE_LOADED, CLONED, UN_CLONED, LAST_SIGNAL }; /* Structure used by the thread pool to load images */ typedef struct { PgmImage *image; gchar *filename; GdkPixbuf *pixbuf; gboolean emit_signal; guint max_size; guint16 id; } PixbufLoaderData; /* Image internal flags */ enum { PGM_IMAGE_STORED_FROM_FILE_LOADED = (1 << 0), PGM_IMAGE_VISIBLE = (1 << 1) }; static PgmDrawableClass *parent_class = NULL; static guint pgm_image_signals[LAST_SIGNAL] = { 0 }; /* Private methods */ /* Update the ratio of the slaves. Called with Image LOCK. */ static void update_slaves_ratio (PgmImage *image) { PgmImage *slave; GList *walk; walk = image->slaves; while (walk) { slave = walk->data; slave->par_n = image->par_n; slave->par_d = image->par_d; walk = walk->next; } } /* Cancel loading tasks in the thread pool for an image. * Called with Image LOCK. */ static void cancel_async_loading_task (PgmImage *image) { image->loader_id = 0; } /* Get whether or not a loading has been cancelled */ static gboolean is_loading_cancelled (PixbufLoaderData *loader) { PgmImage *image = loader->image; guint id; GST_OBJECT_LOCK (image); id = image->loader_id; GST_OBJECT_UNLOCK (image); return (id != loader->id); } /* Function used by the image loader system to finish the loading in the * Pigment main loop */ static gboolean pixbuf_loaded_from_file (gpointer data) { PixbufLoaderData *loader = (PixbufLoaderData*) data; GdkPixbuf *pixbuf = loader->pixbuf; PgmImage *image = loader->image; /* Check for cancellation before loading */ if (is_loading_cancelled (loader)) { GST_LOG_OBJECT (image, "\"%s\" loading has been cancelled", loader->filename); g_free (loader->filename); goto cancel; } /* Clear the current storage */ pgm_image_clear (image); /* Setup the new storage */ GST_OBJECT_LOCK (image); image->storage_type = PGM_IMAGE_FILE; image->data.file.pixbuf = gdk_pixbuf_ref (pixbuf); image->data.file.filename = loader->filename; image->data.file.width = gdk_pixbuf_get_width (pixbuf); image->data.file.height = gdk_pixbuf_get_height (pixbuf); image->flags |= PGM_IMAGE_STORED_FROM_FILE_LOADED; image->par_n = image->data.file.width; image->par_d = image->data.file.height; update_slaves_ratio (image); GST_OBJECT_UNLOCK (image); /* Emit signals */ if (loader->emit_signal) g_signal_emit (G_OBJECT (image), pgm_image_signals[FILE_LOADED], 0); _pgm_drawable_emit_changed (PGM_DRAWABLE (image), PGM_IMAGE_DATA_FILE); /* Clean up */ cancel: g_slice_free (PixbufLoaderData, loader); g_object_unref (pixbuf); gst_object_unref (image); /* Remove the idle source from the Pigment main loop */ return FALSE; } /* Function used by the thread pool to load images */ static void pixbuf_loader (gpointer data, gpointer user_data) { PixbufLoaderData *loader = (PixbufLoaderData*) data; PgmImage *image = loader->image; /* Check for cancellation before loading */ if (is_loading_cancelled (loader)) { GST_LOG_OBJECT (image, "\"%s\" loading has been cancelled", loader->filename); goto cancel; } /* Load the image with requested scaling keeping the apect-ratio */ loader->pixbuf = gdk_pixbuf_new_from_file_at_size (loader->filename, loader->max_size, loader->max_size, NULL); /* Check validity */ if (loader->pixbuf == NULL) { GST_WARNING_OBJECT (image, "can't load image from \"%s\"", loader->filename); goto cancel; } /* Check for cancellation after loading */ else if (is_loading_cancelled (loader)) { GST_LOG_OBJECT (image, "\"%s\" loading has been cancelled", loader->filename); g_object_unref (loader->pixbuf); goto cancel; } /* Finish the loading in the Pigment main loop */ else { g_idle_add (pixbuf_loaded_from_file, loader); return; } cancel: g_free (loader->filename); g_slice_free (PixbufLoaderData, loader); gst_object_unref (image); } /* Load an image from a file. * FIXME: The static counter is not thread-safe, locking the counter * assignment and incrementation would be safer here. */ static void set_from_file (PgmImage *image, const gchar *filename, guint max_size, gboolean emit_signal) { PixbufLoaderData *loader; static guint counter = 1; /* Create and fill loader data */ loader = g_slice_new (PixbufLoaderData); loader->image = gst_object_ref (image); loader->filename = g_strdup (filename); loader->max_size = (max_size < 1) ? -1 : max_size; loader->emit_signal = emit_signal; GST_OBJECT_LOCK (image); image->loader_id = counter; GST_OBJECT_UNLOCK (image); loader->id = counter; /* Increment counter for the next loader, avoid zero since it's used by * images to cancel loading tasks */ if (G_UNLIKELY (++counter == 0)) counter++; /* Push the loading in the thread pool */ g_thread_pool_push (PGM_IMAGE_GET_CLASS (image)->pixbuf_loader_pool, loader, NULL); } /* Do the actual clearing of image. Called with Image LOCK. */ static PgmError do_clear (PgmImage *image) { g_return_val_if_fail (PGM_IS_IMAGE (image), PGM_ERROR_X); switch (image->storage_type) { case PGM_IMAGE_FILE: GST_DEBUG_OBJECT (image, "Clearing file image"); if (image->flags & PGM_IMAGE_STORED_FROM_FILE_LOADED) { gdk_pixbuf_unref ((GdkPixbuf*) (image->data.file.pixbuf)); image->data.file.pixbuf = NULL; g_free (image->data.file.filename); image->data.file.filename = NULL; image->flags &= ~PGM_IMAGE_STORED_FROM_FILE_LOADED; } break; case PGM_IMAGE_BUFFER: GST_DEBUG_OBJECT (image, "Clearing buffer image"); g_free (image->data.buffer.buffer); image->data.buffer.buffer = NULL; break; case PGM_IMAGE_GST_BUFFER: GST_DEBUG_OBJECT (image, "Clearing GstBuffer image"); gst_buffer_unref (image->data.gst_buffer.gst_buffer); image->data.gst_buffer.gst_buffer = NULL; break; case PGM_IMAGE_PIXBUF: GST_DEBUG_OBJECT (image, "Clearing GdkPixbuf image"); gdk_pixbuf_unref ((GdkPixbuf*) (image->data.pixbuf.pixbuf)); image->data.pixbuf.pixbuf = NULL; break; case PGM_IMAGE_SYSTEM_BUFFER: GST_DEBUG_OBJECT (image, "Clearing system buffer image"); image->data.system_buffer.system_buffer = NULL; break; case PGM_IMAGE_IMAGE: GST_DEBUG_OBJECT (image, "Clearing slaved image"); if (image->master) { PgmImage *master; /* Remove ourself from the master's slave list. */ GST_OBJECT_LOCK (image->master); image->master->slaves = g_list_remove (image->master->slaves, image); master = image->master; GST_OBJECT_UNLOCK (image->master); image->master = NULL; g_signal_emit (G_OBJECT (master), pgm_image_signals[UN_CLONED], 0, g_list_length (master->slaves)); } break; default: break; } image->storage_type = PGM_IMAGE_EMPTY; image->par_n = 0; image->par_d = 1; update_slaves_ratio (image); return PGM_ERROR_OK; } /* Gets the width and height in pixel of the original image buffer. Called * with LOCK. */ static void image_get_buffer_pixel_size (PgmImage *image, guint *width, guint *height) { switch (image->storage_type) { case PGM_IMAGE_FILE: *width = image->data.file.width; *height = image->data.file.height; break; case PGM_IMAGE_BUFFER: *width = image->data.buffer.width; *height = image->data.buffer.height; break; case PGM_IMAGE_GST_BUFFER: *width = image->data.gst_buffer.width; *height = image->data.gst_buffer.height; break; case PGM_IMAGE_PIXBUF: *width = gdk_pixbuf_get_width (image->data.pixbuf.pixbuf); *height = gdk_pixbuf_get_height (image->data.pixbuf.pixbuf); break; case PGM_IMAGE_IMAGE: image_get_buffer_pixel_size (image->master, width, height); break; case PGM_IMAGE_SYSTEM_BUFFER: *width = image->data.system_buffer.width; *height = image->data.system_buffer.height; break; default: *width = *height = 0; } } /* Gets the position of the upper left corner of the image in drawable * coordinates (in x_offset and y_offset), and the resolution of the image, in * pixel per canvas unit. Called with LOCK. */ static void image_get_offset_and_resolution (PgmImage *image, gfloat *x_offset, gfloat *y_offset, gfloat *x_resolution, gfloat *y_resolution) { PgmDrawable *drawable = PGM_DRAWABLE (image); guint image_width, image_height; gboolean image_wider, fill_height; gfloat image_aspect_ratio; image_get_buffer_pixel_size (image, &image_width, &image_height); if (image->layout == PGM_IMAGE_FILLED) { *x_offset = 0; *y_offset = 0; *x_resolution = image_width / drawable->width; *y_resolution = image_height / drawable->height; return; } image_aspect_ratio = ((gfloat) image->par_n) / image->par_d; image_wider = image_aspect_ratio > drawable->width / drawable->height; fill_height = (image->layout == PGM_IMAGE_SCALED && !image_wider) || (image->layout == PGM_IMAGE_ZOOMED && image_wider); /* Resolution */ if (fill_height) { *x_resolution = image_width / (image_aspect_ratio * drawable->height); *y_resolution = image_height / drawable->height; } else /* fill width */ { *x_resolution = image_width / drawable->width; *y_resolution = image_height * image_aspect_ratio / drawable->width; } /* x_offset */ if (!fill_height || image->align & PGM_IMAGE_LEFT) *x_offset = 0; else if (image->align & PGM_IMAGE_RIGHT) *x_offset = drawable->width - image_width / *x_resolution; else /* PGM_IMAGE_CENTER */ *x_offset = 0.5f * (drawable->width - image_width / *x_resolution); /* y_offset */ if (fill_height || image->align & PGM_IMAGE_TOP) *y_offset = 0; else if (image->align & PGM_IMAGE_BOTTOM) *y_offset = drawable->height - image_height / *y_resolution; else /* PGM_IMAGE_CENTER */ *y_offset = 0.5f * (drawable->height - image_height / *y_resolution); } /* PgmImage virtual functions */ static PgmError pgm_image_show (PgmDrawable *drawable) { PgmImage *image = PGM_IMAGE (drawable); gboolean emit = FALSE; /* Flag the object as visible and update the GstBuffer if it's the current * storage */ GST_OBJECT_LOCK (image); image->flags |= PGM_IMAGE_VISIBLE; if (image->storage_type == PGM_IMAGE_GST_BUFFER) emit = TRUE; GST_OBJECT_UNLOCK (image); if (emit) _pgm_drawable_emit_changed (drawable, PGM_IMAGE_DATA_GST_BUFFER); return PGM_ERROR_OK; } static PgmError pgm_image_hide (PgmDrawable *drawable) { PgmImage *image = PGM_IMAGE (drawable); /* Flag the object as not visible, it allows not to emit the changed signal * when a new GstBuffer is set and the drawable is not visible */ GST_OBJECT_LOCK (image); image->flags &= ~PGM_IMAGE_VISIBLE; GST_OBJECT_UNLOCK (image); return PGM_ERROR_OK; } /* GObject stuff */ /* Forward declarations */ static void pgm_image_base_class_init (gpointer g_class); static void pgm_image_base_class_finalize (gpointer g_class); static void pgm_image_class_init (PgmImageClass *klass); static void pgm_image_init (PgmImage *image); GType pgm_image_get_type (void) { static GType image_type = 0; if (G_UNLIKELY (image_type == 0)) { static const GTypeInfo image_info = { sizeof (PgmImageClass), (GBaseInitFunc) pgm_image_base_class_init, (GBaseFinalizeFunc) pgm_image_base_class_finalize, (GClassInitFunc) pgm_image_class_init, NULL, NULL, sizeof (PgmImage), 0, (GInstanceInitFunc) pgm_image_init, NULL }; image_type = g_type_register_static (PGM_TYPE_DRAWABLE, "PgmImage", &image_info, 0); } GST_DEBUG_CATEGORY_INIT (pgm_image_debug, "pgm_image", 0, "Pigment Image object"); return image_type; } static void pgm_image_dispose (GObject *object) { PgmImage *image = PGM_IMAGE (object); /* Image is a master */ if (image->slaves) { GList *copy = NULL, *walk = NULL; /* We need a copy of the slaves list since it gets modified in * pgm_image_clear */ copy = g_list_copy (image->slaves); for (walk = copy; walk; walk = walk->next) pgm_image_clear (walk->data); g_list_free (copy); if (image->slaves) GST_DEBUG_OBJECT (image, "Slave list not completely cleared"); } GST_OBJECT_LOCK (image); do_clear (image); GST_OBJECT_UNLOCK (image); pgm_mat4x4_free (image->mapping_matrix); image->mapping_matrix = NULL; GST_CALL_PARENT (G_OBJECT_CLASS, dispose, (object)); } static void pgm_image_base_class_init (gpointer g_class) { PgmImageClass *klass = PGM_IMAGE_CLASS (g_class); const gchar *env_var = NULL; gint max_threads = 1; /* Get the number of threads to use in the pool from the environment. The * number is 1 by default. This is there to ease us to make a decision on * the default number to use depending on the CPU technology (multi-core, * hyper-threading, ...). */ env_var = g_getenv ("PGM_IMAGE_THREAD_POOL_SIZE"); if (env_var) max_threads = CLAMP (atoi (env_var), 1, 16); klass->pixbuf_loader_pool = g_thread_pool_new (pixbuf_loader, NULL, max_threads, TRUE, NULL); GST_DEBUG ("Image thread pool size: %d", max_threads); } static void pgm_image_base_class_finalize (gpointer g_class) { PgmImageClass *klass = PGM_IMAGE_CLASS (g_class); g_thread_pool_free (klass->pixbuf_loader_pool, TRUE, TRUE); klass->pixbuf_loader_pool = NULL; } static void pgm_image_class_init (PgmImageClass *klass) { GObjectClass *gobject_class = (GObjectClass *) klass; PgmDrawableClass *drawable_class = (PgmDrawableClass *) klass; parent_class = g_type_class_peek_parent (klass); /** * PgmImage::file-loaded: * @image: the #PgmImage * * Will be emitted after @image has finished to load its data from the file * path given in the pgm_image_set_from_file() method. */ pgm_image_signals[FILE_LOADED] = g_signal_new ("file-loaded", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (PgmImageClass, file_loaded), NULL, NULL, pgm_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * PgmImage::cloned: * @image: the #PgmImage * @clone: the cloned #PgmImage * @n_clones: the number of cloned images * * Will be emitted after @image has been cloned by another #PgmImage through * the pgm_image_new_from_image() or pgm_image_set_from_image() functions. */ pgm_image_signals[CLONED] = g_signal_new ("cloned", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (PgmImageClass, cloned), NULL, NULL, pgm_marshal_VOID__OBJECT_UINT, G_TYPE_NONE, 2, PGM_TYPE_IMAGE, G_TYPE_UINT); /** * PgmImage::un-cloned: * @image: the #PgmImage * @n_clones: the number of cloned images * * Will be emitted after @image has got a cloned #PgmImage removed. */ pgm_image_signals[UN_CLONED] = g_signal_new ("un-cloned", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (PgmImageClass, un_cloned), NULL, NULL, pgm_marshal_VOID__UINT, G_TYPE_NONE, 1, G_TYPE_UINT); gobject_class->dispose = GST_DEBUG_FUNCPTR (pgm_image_dispose); drawable_class->show = GST_DEBUG_FUNCPTR (pgm_image_show); drawable_class->hide = GST_DEBUG_FUNCPTR (pgm_image_hide); } static void pgm_image_init (PgmImage *image) { /* Public data */ /* image->master = NULL; */ /* image->slaves = NULL; */ image->mapping_matrix = pgm_mat4x4_new_identity (); /* image->storage_type = PGM_IMAGE_EMPTY; */ image->layout = PGM_IMAGE_SCALED; image->align = PGM_IMAGE_CENTER; image->interp = PGM_IMAGE_BILINEAR; /* image->wrap_s = PGM_IMAGE_CLAMP; */ /* image->wrap_t = PGM_IMAGE_CLAMP; */ /* image->par_n = 0; */ image->par_d = 1; /* image->border_width = 0.0f; */ image->border_inner_r = 255; image->border_inner_g = 255; image->border_inner_b = 255; image->border_inner_a = 255; image->border_outer_r = 255; image->border_outer_g = 255; image->border_outer_b = 255; image->border_outer_a = 255; /* Private data */ /* image->loader_id = 0; */ /* image->flags = 0; */ } /* public methods */ /** * pgm_image_new: * * Creates a new #PgmImage instance. * * MT safe. * * Returns: a new #PgmImage instance. */ PgmDrawable * pgm_image_new (void) { PgmImage *image; image = g_object_new (PGM_TYPE_IMAGE, NULL); GST_DEBUG_OBJECT (image, "created new image"); return PGM_DRAWABLE (image); } /** * pgm_image_new_from_file: * @filename: the filename. * @max_size: the maximum size of the image in pixels before loading it in the * #PgmImage or 0 to not constrain the size. * * Creates a new #PgmImage instance loading an image from the given @filename. * It optionally pre-scales the image so that it has a maximum width and height * of @max_size. * * The loading is done asynchronously, it means that this function returns right * after the image object is created, the loading and decoding of the image * being done in another thread. The * 'file-loaded' signal is emitted from the Pigment main loop (the * thread running pgm_main() or the thread running a #GMainLoop using the * default #GMainContext) once the loading finishes successfully. * * MT safe. * * Returns: a new #PgmImage instance. */ PgmDrawable * pgm_image_new_from_file (const gchar *filename, guint max_size) { PgmImage *image; PgmError ret = PGM_ERROR_OK; image = g_object_new (PGM_TYPE_IMAGE, NULL); GST_DEBUG_OBJECT (image, "created new image from file"); ret = pgm_image_set_from_file (image, filename, max_size); if (PGM_ERROR_OK != ret) { gst_object_unref (image); return NULL; } return PGM_DRAWABLE (image); } /** * pgm_image_new_from_pixbuf: * @pixbuf: the #GdkPixbuf. * * Creates a new #PgmImage instance using @pixbuf as stored image. * * MT safe. * * Returns: a new #PgmImage instance. */ PgmDrawable * pgm_image_new_from_pixbuf (GdkPixbuf *pixbuf) { PgmImage *image; PgmError ret = PGM_ERROR_OK; image = g_object_new (PGM_TYPE_IMAGE, NULL); GST_DEBUG_OBJECT (image, "created new image from pixbuf"); ret = pgm_image_set_from_pixbuf (image, pixbuf); if (PGM_ERROR_OK != ret) { gst_object_unref (image); return NULL; } return PGM_DRAWABLE (image); } /** * pgm_image_new_from_buffer: * @format: the pixel format of the buffer. * @width: the image width in pixels. * @height: the image height in pixels. * @stride: the image rowstride in bytes (number of bytes per line). * @size: the buffer size in bytes. * @data: a pointer to the data buffer. * * Creates a new #PgmImage instance with the image from the given buffer. * * MT safe. * * Returns: a new #PgmImage instance. */ PgmDrawable * pgm_image_new_from_buffer (PgmImagePixelFormat format, guint width, guint height, guint stride, guint size, gconstpointer data) { PgmImage *image; image = g_object_new (PGM_TYPE_IMAGE, NULL); GST_DEBUG_OBJECT (image, "created new image"); pgm_image_set_from_buffer (image, format, width, height, stride, size, data); return PGM_DRAWABLE (image); } /** * pgm_image_new_from_image: * @src_image: a #PgmImage which will be used as the master image. * * Creates a new #PgmImage instance with an image slaved from the * image of @src_image. * * MT safe. * * Returns: a new #PgmImage instance. */ PgmDrawable * pgm_image_new_from_image (PgmImage *src_image) { PgmImage *image; image = g_object_new (PGM_TYPE_IMAGE, NULL); GST_DEBUG_OBJECT (image, "created new image"); pgm_image_set_from_image (image, src_image); return PGM_DRAWABLE (image); } /** * pgm_image_set_from_file: * @image: a #PgmImage object. * @filename: a filename. * @max_size: the maximum size of the image in pixels before loading it in the * #PgmImage or 0 to not constrain the size. * * Loads an image from the file @filename. It optionally pre-scales the image so * it has a maximum width and height of @max_size. * * The loading is done asynchronously, it means that this function returns right * after the image object is created, the loading and decoding of the image * being done in another thread. The * 'pixbuf-loaded' signal is emitted from the Pigment main loop (the * thread running pgm_main() or the thread running a #GMainLoop using the * default #GMainContext) once the loading finishes successfully. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_image_set_from_file (PgmImage *image, const gchar *filename, guint max_size) { g_return_val_if_fail (PGM_IS_IMAGE (image), PGM_ERROR_X); if (filename == NULL) return PGM_ERROR_X; set_from_file (image, filename, max_size, TRUE); return PGM_ERROR_OK; } /** * pgm_image_set_from_pixbuf: * @image: a #PgmImage object. * @pixbuf: the #GdkPixbuf. * Loads an image in @image from a pixbuf. @pixbuf will have its reference * count increased by 1 and will not get freed until the drawable gets cleaned * up or that a new buffer is loaded. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_image_set_from_pixbuf (PgmImage *image, GdkPixbuf *pixbuf) { g_return_val_if_fail (PGM_IS_IMAGE (image), PGM_ERROR_X); g_return_val_if_fail (pixbuf != NULL, PGM_ERROR_X); pgm_image_clear (image); GST_OBJECT_LOCK (image); image->storage_type = PGM_IMAGE_PIXBUF; image->data.pixbuf.pixbuf = gdk_pixbuf_ref (pixbuf); image->par_n = gdk_pixbuf_get_width (pixbuf); image->par_d = gdk_pixbuf_get_height (pixbuf); update_slaves_ratio (image); GST_OBJECT_UNLOCK (image); _pgm_drawable_emit_changed (PGM_DRAWABLE (image), PGM_IMAGE_DATA_PIXBUF); return PGM_ERROR_OK; } /** * pgm_image_set_from_buffer: * @image: a #PgmImage object. * @format: the pixel format of the buffer. * @width: the image width in pixels. * @height: the image height in pixels. * @stride: the rowstride of the image in bytes (number of bytes per line). * @size: the buffer size in bytes. * @data: a pointer to the data buffer. * * Loads an image in @image from an existing buffer using pixel format @format. * If you don't know the rowstride of the image you can set stride to 0. @data * is copied internally you can free it right after the function call returns. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_image_set_from_buffer (PgmImage *image, PgmImagePixelFormat format, guint width, guint height, guint stride, guint size, gconstpointer data) { gpointer _data = NULL; g_return_val_if_fail (PGM_IS_IMAGE (image), PGM_ERROR_X); g_return_val_if_fail (data != NULL, PGM_ERROR_X); /* Let's set the storage data */ GST_OBJECT_LOCK (image); cancel_async_loading_task (image); /* The buffer sent is not the first of this size, it's not needed to call * a clear, just free the buffer. */ if (G_LIKELY (image->storage_type == PGM_IMAGE_BUFFER && image->data.buffer.width == width && image->data.buffer.height == height && image->data.buffer.format == format && image->data.buffer.stride == stride)) { if (G_LIKELY (image->data.buffer.buffer)) g_free (image->data.buffer.buffer); } /* It's the first */ else { /* Let's clear if needed */ if (image->storage_type != PGM_IMAGE_EMPTY) { do_clear (image); GST_OBJECT_UNLOCK (image); _pgm_drawable_emit_changed (PGM_DRAWABLE (image), PGM_IMAGE_DATA_EMPTY); GST_OBJECT_LOCK (image); } /* Store buffer informations */ image->storage_type = PGM_IMAGE_BUFFER; image->data.buffer.format = format; image->data.buffer.width = width; image->data.buffer.height = height; image->data.buffer.stride = stride; image->data.buffer.size = size; /* Store ratio */ image->par_n = width; image->par_d = height; update_slaves_ratio (image); } /* Try to copy the given buffer */ _data = g_memdup (data, size); image->data.buffer.buffer = (guint8 *) _data; GST_OBJECT_UNLOCK (image); _pgm_drawable_emit_changed (PGM_DRAWABLE (image), PGM_IMAGE_DATA_BUFFER); return PGM_ERROR_OK; } /** * pgm_image_set_from_gst_buffer: * @image: a #PgmImage object. * @format: the pixel format of the buffer. * @width: the image width in pixels. * @height: the image height in pixels. * @stride: the rowstride of the image in bytes (number of bytes per line). * @buffer: A #GstBuffer reference containing the video frame. * * Loads an image in @image from an existing #GstBuffer using the pixel format * @format. If you don't know the rowstride of the image you can set stride * to 0. @buffer will have its reference count increased by 1 and will not get * freed until the drawable gets cleaned up or that a new buffer is loaded. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_image_set_from_gst_buffer (PgmImage *image, PgmImagePixelFormat format, guint width, guint height, guint stride, GstBuffer *buffer) { gboolean visible; g_return_val_if_fail (PGM_IS_IMAGE (image), PGM_ERROR_X); g_return_val_if_fail (GST_IS_BUFFER (buffer), PGM_ERROR_X); GST_OBJECT_LOCK (image); visible = image->flags & PGM_IMAGE_VISIBLE; cancel_async_loading_task (image); /* The GstBuffer sent is not the first, it's not needed to call a clear, * just unref the GstBuffer. I mean that the implementation should not be * signaled to clear its allocated size/format for the stream of buffers * since it's really heavy to clear for each new one. */ if (G_LIKELY (image->storage_type == PGM_IMAGE_GST_BUFFER && image->data.gst_buffer.width == width && image->data.gst_buffer.height == height && image->data.gst_buffer.format == format && image->data.gst_buffer.stride == stride)) { if (G_LIKELY (image->data.gst_buffer.gst_buffer)) gst_buffer_unref (image->data.gst_buffer.gst_buffer); } /* It's the first */ else { /* Let's clear if needed */ if (image->storage_type != PGM_IMAGE_EMPTY) { do_clear (image); GST_OBJECT_UNLOCK (image); _pgm_drawable_emit_changed (PGM_DRAWABLE (image), PGM_IMAGE_DATA_EMPTY); GST_OBJECT_LOCK (image); } /* Store buffer informations */ image->storage_type = PGM_IMAGE_GST_BUFFER; image->data.gst_buffer.format = format; image->data.gst_buffer.width = width; image->data.gst_buffer.height = height; image->data.gst_buffer.stride = stride; /* Store ratio */ image->par_n = width; image->par_d = height; update_slaves_ratio (image); } /* Take a ref on the GstBuffer */ image->data.gst_buffer.gst_buffer = gst_buffer_ref (buffer); GST_OBJECT_UNLOCK (image); if (visible) _pgm_drawable_emit_changed (PGM_DRAWABLE (image), PGM_IMAGE_DATA_GST_BUFFER); return PGM_ERROR_OK; } /** * pgm_image_set_from_system_buffer: * @image: a #PgmImage object. * @format: the pixel format of the buffer. * @width: the image width in pixels. * @height: the image height in pixels. * @system_buffer: a pointer to the system buffer. * * Loads an image in @image from an existing system buffer. * * A system buffer depends on the platform, for instance on UNIX with an X11 * server running, @system_buffer can be set to an X11 Pixmap. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_image_set_from_system_buffer (PgmImage *image, PgmImagePixelFormat format, guint width, guint height, gconstpointer system_buffer) { g_return_val_if_fail (PGM_IS_IMAGE (image), PGM_ERROR_X); g_return_val_if_fail (system_buffer != NULL, PGM_ERROR_X); /* Let's set the storage data */ GST_OBJECT_LOCK (image); cancel_async_loading_task (image); /* Let's clear if needed */ if (image->storage_type != PGM_IMAGE_EMPTY) { do_clear (image); GST_OBJECT_UNLOCK (image); _pgm_drawable_emit_changed (PGM_DRAWABLE (image), PGM_IMAGE_DATA_EMPTY); GST_OBJECT_LOCK (image); } /* Store buffer informations */ image->storage_type = PGM_IMAGE_SYSTEM_BUFFER; image->data.system_buffer.format = format; image->data.system_buffer.width = width; image->data.system_buffer.height = height; image->data.system_buffer.system_buffer = system_buffer; /* Store ratio */ image->par_n = width; image->par_d = height; update_slaves_ratio (image); GST_OBJECT_UNLOCK (image); _pgm_drawable_emit_changed (PGM_DRAWABLE (image), PGM_IMAGE_DATA_SYSTEM_BUFFER); return PGM_ERROR_OK; } /** * pgm_image_set_from_image: * @image: a #PgmImage object. * @src_image: the source #PgmImage object to use as a master. * * Slaves @image to @src_image. Every change to @src_image is reflected on * @image until you remove @image from the canvas or you call pgm_image_clear() * on @image. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_image_set_from_image (PgmImage *image, PgmImage *src_image) { PgmError ret = PGM_ERROR_OK; g_return_val_if_fail (PGM_IS_IMAGE (image), PGM_ERROR_X); g_return_val_if_fail (PGM_IS_IMAGE (src_image), PGM_ERROR_X); GST_DEBUG_OBJECT (image, "using image from %s", GST_OBJECT_NAME (src_image)); GST_OBJECT_LOCK (image); /* Do not do anything if the image is already a slave of the source image */ if (G_UNLIKELY (src_image == image->master)) { GST_OBJECT_UNLOCK (image); ret = PGM_ERROR_OK; goto beach; } /* Trying to deadlock us? :) */ if (G_UNLIKELY (image == src_image || image == src_image->master)) { GST_WARNING_OBJECT (image, "trying to do a master/slave loop!"); GST_OBJECT_UNLOCK (image); ret = PGM_ERROR_X; goto beach; } cancel_async_loading_task (image); do_clear (image); GST_OBJECT_UNLOCK (image); _pgm_drawable_emit_changed (PGM_DRAWABLE (image), PGM_IMAGE_DATA_EMPTY); GST_OBJECT_LOCK (image); image->storage_type = PGM_IMAGE_IMAGE; GST_OBJECT_LOCK (src_image); /* The master requested is already a slave */ if (G_UNLIKELY (src_image->master)) { GST_DEBUG_OBJECT (image, "%s is already a slave to %s, using its master", GST_OBJECT_NAME (src_image), GST_OBJECT_NAME (src_image->master)); GST_OBJECT_LOCK (src_image->master); src_image->master->slaves = g_list_append (src_image->master->slaves, image); image->master = src_image->master; GST_OBJECT_UNLOCK (src_image->master); } /* The master requested is not a slave */ else { /* Add ourself to the slave list with an increased reference */ src_image->slaves = g_list_append (src_image->slaves, image); image->master = src_image; } image->par_n = src_image->par_n; image->par_d = src_image->par_d; GST_OBJECT_UNLOCK (src_image); GST_OBJECT_UNLOCK (image); _pgm_drawable_emit_changed (PGM_DRAWABLE (image), PGM_IMAGE_DATA_IMAGE); g_signal_emit (G_OBJECT (image->master), pgm_image_signals[CLONED], 0, image, g_list_length (image->master->slaves)); beach: return ret; } /** * pgm_image_to_pixbuf: * @image: a #PgmImage object. * @pixbuf: a double pointer to #GdkPixbuf. Unref after usage. * * Retrieves a #GdkPixbuf of the image currently stored in @image. * * Only the images stored as pixbuf can be retrieved at the moment, the * conversion for the other storage types is not implemented yet. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_image_to_pixbuf (PgmImage *image, GdkPixbuf **pixbuf) { PgmError ret = PGM_ERROR_X; g_return_val_if_fail (PGM_IS_IMAGE (image), PGM_ERROR_X); g_return_val_if_fail (image != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (image); switch (image->storage_type) { case PGM_IMAGE_PIXBUF: *pixbuf = gdk_pixbuf_ref (image->data.pixbuf.pixbuf); ret = PGM_ERROR_OK; break; /* FIXME: Not implemented yet */ case PGM_IMAGE_FILE: case PGM_IMAGE_IMAGE: case PGM_IMAGE_BUFFER: case PGM_IMAGE_GST_BUFFER: case PGM_IMAGE_SYSTEM_BUFFER: GST_WARNING_OBJECT (image, "Conversion to pixbuf not implemented for raw " "buffers, GStreamer buffers, system buffers and " "cloned images"); break; case PGM_IMAGE_EMPTY: GST_WARNING_OBJECT (image, "Cannot convert empty image to pixbuf"); break; default: break; } GST_OBJECT_UNLOCK (image); return ret; } /** * pgm_image_clear: * @image: a #PgmImage object. * * Removes any image from @image. If @image had some image data loaded, it's * cleared, if there was a #GstBuffer used, it's unreffed and if the @image was * a slave to another it is not anymore. If @image has slave images they all * get cleared but they still are slaves to @image. So if you load a new image * to @image, all the slaves will load it too. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_image_clear (PgmImage *image) { PgmError ret = PGM_ERROR_OK; g_return_val_if_fail (PGM_IS_IMAGE (image), PGM_ERROR_X); GST_OBJECT_LOCK (image); cancel_async_loading_task (image); ret = do_clear (image); GST_OBJECT_UNLOCK (image); _pgm_drawable_emit_changed (PGM_DRAWABLE (image), PGM_IMAGE_DATA_EMPTY); return ret; } /** * pgm_image_get_storage_type: * @image: a #PgmImage object. * @storage: a #PgmImageStorageType where the storage type is going to be * stored. * * Retrieves the type of representation being used by @image to store image * data. If @image has no image data, the return value will be * #PGM_IMAGE_EMPTY. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_image_get_storage_type (PgmImage *image, PgmImageStorageType *storage) { g_return_val_if_fail (PGM_IS_IMAGE (image), PGM_ERROR_X); g_return_val_if_fail (storage != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (image); *storage = image->storage_type; GST_OBJECT_UNLOCK (image); return PGM_ERROR_OK; } /** * pgm_image_system_buffer_lock: * @image: a #PgmImage object. * * Lock the system buffer set as the image content, ensuring the image is not * going to be drawn while the system buffer content changes. This function * guaranties tear free system buffer updates. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_image_system_buffer_lock (PgmImage *image) { g_return_val_if_fail (PGM_IS_IMAGE (image), PGM_ERROR_X); /* FIXME: lock */ return PGM_ERROR_OK; } /** * pgm_image_system_buffer_unlock: * @image: a #PgmImage object. * * Unlock the system buffer set as the image content. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_image_system_buffer_unlock (PgmImage *image) { g_return_val_if_fail (PGM_IS_IMAGE (image), PGM_ERROR_X); /* FIXME: unlock */ _pgm_drawable_emit_changed (PGM_DRAWABLE (image), PGM_IMAGE_SYSTEM_BUFFER_CONTENT); return PGM_ERROR_OK; } /** * pgm_image_set_mapping_matrix: * @image: a #PgmImage object. * @mapping_matrix: a #PgmMat4x4 object. * * Defines the transformation to apply to the stored image when it is rendered. * You can make the stored image slide over the drawable, rotate around it, * stretch and shrink, or any combination of the three. * * Each point in an image can be defined by an (x, y) vector, which we call * the source position, representing the horizontal (x) and vertical (y) * positions (with values between 0 for left/top and 1 for right/bottom). * When the image is drawn on a surface, each point (x, y) is drawn on the * (x', y') coordinate of the surface. We call (x', y') the destination * position. The default mapping matrix is the identity, you have * (x', y') == (x, y). Once you have called the function, the destination * position is calculated by multiplying @mapping_matrix with the source * position vector. To reset the mapping matrix, just set the identity. * * @mapping_matrix is a 4x4 matrix since the source and destination positions * can be represented as 4 coordinate vectors (x, y, z, w) and (x', y', z', w'). * Unless you know what you are doing, you should not worry about z and w, and * arrange for your matrix to leave them unchanged. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_image_set_mapping_matrix (PgmImage *image, PgmMat4x4 *mapping_matrix) { g_return_val_if_fail (PGM_IS_IMAGE (image), PGM_ERROR_X); g_return_val_if_fail (mapping_matrix != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (image); pgm_mat4x4_set_from_mat4x4 (image->mapping_matrix, mapping_matrix); GST_OBJECT_UNLOCK (image); _pgm_drawable_emit_changed (PGM_DRAWABLE (image), PGM_IMAGE_MAPPING_MATRIX); return PGM_ERROR_OK; } /** * pgm_image_get_mapping_matrix: * @image: a #PgmImage object. * @mapping_matrix: a pointer to a #PgmMat4x4 pointer where the mapping matrix * is going to be stored. pgm_mat4x4_free() after use. * * Retrieves in @matrix the current mapping matrix applied to @image. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_image_get_mapping_matrix (PgmImage *image, PgmMat4x4 **mapping_matrix) { g_return_val_if_fail (PGM_IS_IMAGE (image), PGM_ERROR_X); g_return_val_if_fail (mapping_matrix != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (image); *mapping_matrix = pgm_mat4x4_copy (image->mapping_matrix); GST_OBJECT_UNLOCK (image); return PGM_ERROR_OK; } /** * pgm_image_set_alignment: * @image: a #PgmImage object. * @align: a #PgmImageAlignment combination of flags. * * Defines the way @image aligns the stored image. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_image_set_alignment (PgmImage *image, PgmImageAlignment align) { g_return_val_if_fail (PGM_IS_IMAGE (image), PGM_ERROR_X); GST_OBJECT_LOCK (image); image->align = align; GST_OBJECT_UNLOCK (image); _pgm_drawable_emit_changed (PGM_DRAWABLE (image), PGM_IMAGE_ALIGNMENT); return PGM_ERROR_OK; } /** * pgm_image_get_alignment: * @image: a #PgmImage object. * @align: a pointer to a #PgmImageAlignment where alignment flags are going * to be stored. * * Retrieves in @align the way @image aligns the stored image. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_image_get_alignment (PgmImage *image, PgmImageAlignment *align) { g_return_val_if_fail (PGM_IS_IMAGE (image), PGM_ERROR_X); g_return_val_if_fail (align != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (image); *align = image->align; GST_OBJECT_UNLOCK (image); return PGM_ERROR_OK; } /** * pgm_image_set_layout: * @image: a #PgmImage object. * @layout: a #PgmImageLayoutType layout type. * * Defines the way @image layouts its stored image. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_image_set_layout (PgmImage *image, PgmImageLayoutType layout) { g_return_val_if_fail (PGM_IS_IMAGE (image), PGM_ERROR_X); GST_OBJECT_LOCK (image); image->layout = layout; GST_OBJECT_UNLOCK (image); _pgm_drawable_emit_changed (PGM_DRAWABLE (image), PGM_IMAGE_LAYOUT); return PGM_ERROR_OK; } /** * pgm_image_get_layout: * @image: a #PgmImage object. * @layout: a pointer to a #PgmImageLayoutType where the layout type is going * to be stored. * * Retrieves in @layout the way @image layouts its its stored image. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_image_get_layout (PgmImage *image, PgmImageLayoutType *layout) { g_return_val_if_fail (PGM_IS_IMAGE (image), PGM_ERROR_X); g_return_val_if_fail (layout != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (image); *layout = image->layout; GST_OBJECT_UNLOCK (image); return PGM_ERROR_OK; } /** * pgm_image_set_interp: * @image: a #PgmImage object. * @interp: the interpolation type. * * Defines that @image will be rendered using @interp as its interpolation * type. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_image_set_interp (PgmImage *image, PgmImageInterpType interp) { g_return_val_if_fail (PGM_IS_IMAGE (image), PGM_ERROR_X); GST_OBJECT_LOCK (image); image->interp = interp; GST_OBJECT_UNLOCK (image); _pgm_drawable_emit_changed (PGM_DRAWABLE (image), PGM_IMAGE_INTERP); return PGM_ERROR_OK; } /** * pgm_image_get_interp: * @image: a #PgmImage object. * @interp: a pointer to a #PgmImageInterpType where the interpolation type * is going to be stored. * * Retrieves in @interp the current interpolation type of @image. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_image_get_interp (PgmImage *image, PgmImageInterpType *interp) { g_return_val_if_fail (PGM_IS_IMAGE (image), PGM_ERROR_X); g_return_val_if_fail (interp != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (image); *interp = image->interp; GST_OBJECT_UNLOCK (image); return PGM_ERROR_OK; } /** * pgm_image_set_wrapping: * @image: a #PgmImage object. * @wrap_s: the wrapping on the s coordinate. #PGM_IMAGE_REPEAT by default. * @wrap_t: the wrapping on the t coordinate. #PGM_IMAGE_REPEAT by default. * * Sets the horizontal and vertical wrapping modes used for the mapping of * @image. When the mapping matrix is modified, pixels outside the range of the * image content are accessed, the wrapping mode defines the behaviour of the * mapping in that particular case. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_image_set_wrapping (PgmImage *image, PgmImageWrapping wrap_s, PgmImageWrapping wrap_t) { g_return_val_if_fail (PGM_IS_IMAGE (image), PGM_ERROR_X); GST_OBJECT_LOCK (image); image->wrap_s = wrap_s; image->wrap_t = wrap_t; GST_OBJECT_UNLOCK (image); _pgm_drawable_emit_changed (PGM_DRAWABLE (image), PGM_IMAGE_WRAPPING); return PGM_ERROR_OK; } /** * pgm_image_get_wrapping: * @image: a #PgmImage object. * @wrap_s: a pointer to a #PgmImageInterpType where the wrapping mode on the s * coordinate is going to be stored. * @wrap_t: a pointer to a #PgmImageInterpType where the wrapping mode on the t * coordinate is going to be stored. * * Retrieves in @wrap_s and @wrap_t the current wrapping modes of @image. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_image_get_wrapping (PgmImage *image, PgmImageWrapping *wrap_s, PgmImageWrapping *wrap_t) { g_return_val_if_fail (PGM_IS_IMAGE (image), PGM_ERROR_X); g_return_val_if_fail (wrap_s != NULL, PGM_ERROR_X); g_return_val_if_fail (wrap_t != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (image); *wrap_s = image->wrap_s; *wrap_t = image->wrap_t; GST_OBJECT_UNLOCK (image); return PGM_ERROR_OK; } /** * pgm_image_set_aspect_ratio: * @image: a #PgmImage object. * @numerator: the numerator of the aspect ratio fraction. * @denominator: the denominator of the aspect ratio fraction. * * Customizes the aspect ratio of the stored image. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_image_set_aspect_ratio (PgmImage *image, guint numerator, guint denominator) { g_return_val_if_fail (PGM_IS_IMAGE (image), PGM_ERROR_X); GST_OBJECT_LOCK (image); if (numerator == image->par_n && denominator == image->par_d) { GST_OBJECT_UNLOCK (image); return PGM_ERROR_OK; } image->par_n = numerator; image->par_d = MAX (denominator, 1); GST_OBJECT_UNLOCK (image); _pgm_drawable_emit_changed (PGM_DRAWABLE (image), PGM_IMAGE_ASPECT_RATIO); return PGM_ERROR_OK; } /** * pgm_image_get_aspect_ratio: * @image: a #PgmImage object. * @numerator: a pointer to a #guint where the numerator of the aspect ratio * fraction will be stored. * @denominator: a pointer to a #guint where the denominator of the aspect * ratio fraction will be stored. * * Retrieves the aspect ratio of the stored image. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_image_get_aspect_ratio (PgmImage *image, guint *numerator, guint *denominator) { g_return_val_if_fail (PGM_IS_IMAGE (image), PGM_ERROR_X); g_return_val_if_fail (numerator != NULL, PGM_ERROR_X); g_return_val_if_fail (denominator != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (image); *numerator = image->par_n; *denominator = image->par_d; GST_OBJECT_UNLOCK (image); return PGM_ERROR_OK; } /** * pgm_image_set_border_width: * @image: a #PgmImage object. * @width: the border with. 0.0 by default. * * Defines the border width drawn around @image. * * Note that the border is drawn around the image, inside the drawable. When * you change the size of the border, the image will be down-scaled. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_image_set_border_width (PgmImage *image, gfloat width) { g_return_val_if_fail (PGM_IS_IMAGE (image), PGM_ERROR_X); GST_OBJECT_LOCK (image); /* Avoid further computations if the width doesn't change */ if (width == image->border_width) { GST_OBJECT_UNLOCK (image); return PGM_ERROR_OK; } /* Clamp width to [0, MAX_FLOAT] */ image->border_width = MAX (width, 0); GST_OBJECT_UNLOCK (image); _pgm_drawable_emit_changed (PGM_DRAWABLE (image), PGM_IMAGE_BORDER_WIDTH); return PGM_ERROR_OK; } /** * pgm_image_get_border_width: * @image: a #PgmImage object. * @width: a pointer to a #gfloat where the border width will be stored. * * Retrieves the width of the border drawn around #image inside the drawable. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_image_get_border_width (PgmImage *image, gfloat *width) { g_return_val_if_fail (PGM_IS_IMAGE (image), PGM_ERROR_X); g_return_val_if_fail (width != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (image); *width = image->border_width; GST_OBJECT_UNLOCK (image); return PGM_ERROR_OK; } /** * pgm_image_set_border_inner_color: * @image: a #PgmImage object. * @red: the border inner red color. 255 by default. * @green: the border inner green color. 255 by default. * @blue: the border inner blue color. 255 by default. * @alpha: the border inner alpha color. 255 by default. * * Defines the border inner color drawn around @image. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_image_set_border_inner_color (PgmImage *image, guchar red, guchar green, guchar blue, guchar alpha) { g_return_val_if_fail (PGM_IS_IMAGE (image), PGM_ERROR_X); GST_OBJECT_LOCK (image); image->border_inner_r = red; image->border_inner_g = green; image->border_inner_b = blue; image->border_inner_a = alpha; GST_OBJECT_UNLOCK (image); _pgm_drawable_emit_changed (PGM_DRAWABLE (image), PGM_IMAGE_BORDER_INNER_COLOR); return PGM_ERROR_OK; } /** * pgm_image_get_border_inner_color: * @image: a #PgmImage object. * @red: a pointer to a #guchar where the border inner red color will be stored. * @green: a pointer to a #guchar where the border inner green color will be * stored. * @blue: a pointer to a #guchar where the border inner blue color will be * stored. * @alpha: a pointer to a #guchar where the border inner alpha color will be * stored. * * Retrieves the inner color of the border drawn around #image inside the * drawable. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_image_get_border_inner_color (PgmImage *image, guchar *red, guchar *green, guchar *blue, guchar *alpha) { g_return_val_if_fail (PGM_IS_IMAGE (image), PGM_ERROR_X); g_return_val_if_fail (red != NULL, PGM_ERROR_X); g_return_val_if_fail (green != NULL, PGM_ERROR_X); g_return_val_if_fail (blue != NULL, PGM_ERROR_X); g_return_val_if_fail (alpha != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (image); *red = image->border_inner_r; *green = image->border_inner_g; *blue = image->border_inner_b; *alpha = image->border_inner_a; GST_OBJECT_UNLOCK (image); return PGM_ERROR_OK; } /** * pgm_image_set_border_outer_color: * @image: a #PgmImage object. * @red: the border outer red color. 255 by default. * @green: the border outer green color. 255 by default. * @blue: the border outer blue color. 255 by default. * @alpha: the border outer alpha color. 255 by default. * * Defines the border outer color drawn around @image. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_image_set_border_outer_color (PgmImage *image, guchar red, guchar green, guchar blue, guchar alpha) { g_return_val_if_fail (PGM_IS_IMAGE (image), PGM_ERROR_X); GST_OBJECT_LOCK (image); image->border_outer_r = red; image->border_outer_g = green; image->border_outer_b = blue; image->border_outer_a = alpha; GST_OBJECT_UNLOCK (image); _pgm_drawable_emit_changed (PGM_DRAWABLE (image), PGM_IMAGE_BORDER_OUTER_COLOR); return PGM_ERROR_OK; } /** * pgm_image_get_border_outer_color: * @image: a #PgmImage object. * @red: a pointer to a #guchar where the border outer red color will be stored. * @green: a pointer to a #guchar where the border outer green color will be * stored. * @blue: a pointer to a #guchar where the border outer blue color will be * stored. * @alpha: a pointer to a #guchar where the border outer alpha color will be * stored. * * Retrieves the outer color of the border drawn around #image inside the * drawable. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_image_get_border_outer_color (PgmImage *image, guchar *red, guchar *green, guchar *blue, guchar *alpha) { g_return_val_if_fail (PGM_IS_IMAGE (image), PGM_ERROR_X); g_return_val_if_fail (red != NULL, PGM_ERROR_X); g_return_val_if_fail (green != NULL, PGM_ERROR_X); g_return_val_if_fail (blue != NULL, PGM_ERROR_X); g_return_val_if_fail (alpha != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (image); *red = image->border_outer_r; *green = image->border_outer_g; *blue = image->border_outer_b; *alpha = image->border_outer_a; GST_OBJECT_UNLOCK (image); return PGM_ERROR_OK; } /** * pgm_image_from_drawable: * @image: a #PgmImage instance * @x_image: where to return the x coordinate in the @image plane. * @y_image: where to return the y coordinate in the @image plane. * @x_drawable: the x coordinate in drawable space. * @y_drawable: the y coordinate in drawable space. * * Converts a position in drawable space (canvas units, origin at top left of * drawable) into @image space (image pixel units, origin at top left of image). * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_image_from_drawable (PgmImage *image, gint *x_image, gint *y_image, gfloat x_drawable, gfloat y_drawable) { gfloat x_offset, y_offset; gfloat x_resolution, y_resolution; g_return_val_if_fail (PGM_IS_IMAGE (image), PGM_ERROR_X); g_return_val_if_fail (NULL != x_image, PGM_ERROR_X); g_return_val_if_fail (NULL != y_image, PGM_ERROR_X); g_return_val_if_fail (image->layout != PGM_IMAGE_CENTERED || image->layout != PGM_IMAGE_TILED, PGM_ERROR_X); GST_OBJECT_LOCK (image); image_get_offset_and_resolution (image, &x_offset, &y_offset, &x_resolution, &y_resolution); GST_OBJECT_UNLOCK (image); *x_image = (gint) ((x_drawable - x_offset) * x_resolution); *y_image = (gint) ((y_drawable - y_offset) * y_resolution); return PGM_ERROR_OK; } /** * pgm_image_to_drawable: * @image: a #PgmImage instance * @x_drawable: where to return the x coordinate in the @drawable plane. * @y_drawable: where to return the y coordinate in the @drawable plane. * @x_image: the x coordinate in image space. * @y_image: the y coordinate in image space. * * Converts a position in @image space (image pixel units, origin at top left of * image) into drawable space (canvas units, origin at top left of drawable). * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_image_to_drawable (PgmImage *image, gfloat *x_drawable, gfloat *y_drawable, gint x_image, gint y_image) { gfloat x_offset, y_offset; gfloat x_resolution, y_resolution; g_return_val_if_fail (PGM_IS_IMAGE (image), PGM_ERROR_X); g_return_val_if_fail (NULL != x_drawable, PGM_ERROR_X); g_return_val_if_fail (NULL != y_drawable, PGM_ERROR_X); g_return_val_if_fail (image->layout != PGM_IMAGE_CENTERED || image->layout != PGM_IMAGE_TILED, PGM_ERROR_X); GST_OBJECT_LOCK (image); image_get_offset_and_resolution (image, &x_offset, &y_offset, &x_resolution, &y_resolution); GST_OBJECT_UNLOCK (image); *x_drawable = x_offset + x_image / x_resolution; *y_drawable = y_offset + y_image / y_resolution; return PGM_ERROR_OK; } /* Protected functions */ /** * _pgm_image_stored_from_file_free: * @image: a #PgmImage instance * * Free the image buffer allocated by a pgm_image_set_from_file(). Can be used * by a plugin to clean up the central memory after the image buffer has been * sent to the video memory. * * Returns: a #PgmError indicating success/failure. */ PgmError _pgm_image_stored_from_file_free (PgmImage *image) { g_return_val_if_fail (PGM_IS_IMAGE (image), PGM_ERROR_X); GST_OBJECT_LOCK (image); /* Free the pixbuf if current storage has been loaded from a file */ if (image->storage_type == PGM_IMAGE_FILE && image->flags & PGM_IMAGE_STORED_FROM_FILE_LOADED) { gdk_pixbuf_unref ((GdkPixbuf*) (image->data.file.pixbuf)); image->data.file.pixbuf = NULL; image->flags &= ~PGM_IMAGE_STORED_FROM_FILE_LOADED; } GST_OBJECT_UNLOCK (image); return PGM_ERROR_OK; } /** * _pgm_image_stored_from_file_load: * @image: a #PgmImage instance * * Reload the image buffer set through pgm_image_set_from_file(). * * Returns: a #PgmError indicating success/failure. */ PgmError _pgm_image_stored_from_file_load (PgmImage *image) { g_return_val_if_fail (PGM_IS_IMAGE (image), PGM_ERROR_X); GST_OBJECT_LOCK (image); if (image->storage_type != PGM_IMAGE_FILE) { GST_OBJECT_UNLOCK (image); return PGM_ERROR_X; } if (! (image->flags & PGM_IMAGE_STORED_FROM_FILE_LOADED)) { GST_OBJECT_UNLOCK (image); set_from_file (image, image->data.file.filename, MAX (image->data.file.width, image->data.file.height), FALSE); return PGM_ERROR_OK; } GST_OBJECT_UNLOCK (image); return PGM_ERROR_OK; } pigment-0.3.17/pgm/pgmimagesink.c0000644000175000017500000007064511205034416013600 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment GStreamer image sink * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author(s): Loïc Molinari * Julien Moutte */ /** * SECTION:pgmimagesink * @short_description: A GStreamer image sink outputing frames to image * drawables. * @see_also: #PgmImage * * #PgmImageSink is a GStreamer image sink element allowing to build GStreamer * pipelines outputing frames directly to #PgmImage. * * You can explicitly use the pgm_image_sink_new() function to instanciate a * new sink, but you can alos use the standard GStreamer functions using * gst_element_factory_make() or gst_parse_launch(), the factory name of the * sink being "pgmimagesink". * * Internally, the sink is simply outputing GStreamer buffers (#GstBuffer) to * images (#PgmImage) using the pgm_image_set_from_gst_buffer() function. * * Last reviewed on 2008-01-28 (0.3.4) */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include /* Helper functions */ #include #include "pgmimagesink.h" #include "pgmcanvas.h" #include "pgmenumtypes.h" static GstElementDetails pgm_image_sink_details = GST_ELEMENT_DETAILS ("Video Sink", "Sink/Video", "Video output to PgmImage object", "Loïc Molinari , " "Julien Moutte "); static GstStaticPadTemplate pgm_image_sink_template = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, GST_STATIC_CAPS ("video/x-raw-rgb, " "framerate = (fraction) [ 0, MAX ], " "width = (int) [ 1, MAX ], " "height = (int) [ 1, MAX ]; " "video/x-raw-yuv, " "framerate = (fraction) [ 0, MAX ], " "width = (int) [ 1, MAX ], " "height = (int) [ 1, MAX ]")); GST_DEBUG_CATEGORY_STATIC (pgm_image_sink_debug); #define GST_CAT_DEFAULT pgm_image_sink_debug enum { ARG_0, ARG_IMAGE, ARG_EVENTS }; static GstVideoSinkClass *parent_class = NULL; /* Private methods */ /* Called with LOCK */ static void update_caps_from_image (PgmImageSink *sink) { PgmCanvas *canvas = NULL; GstCaps *caps = NULL; gulong pixel_formats = 0; PgmImagePixelFormat format; guint i; /* Unref last caps */ if (G_UNLIKELY (sink->our_caps)) gst_caps_unref (sink->our_caps); /* And init our caps to EMPTY */ sink->our_caps = gst_caps_new_empty (); /* Get the supported pixel formats */ canvas = PGM_CANVAS (GST_OBJECT_PARENT (sink->image)); if (canvas) pgm_canvas_get_pixel_formats (canvas, &pixel_formats); /* Parse the pixel formats mask */ for (i = 0; i < PGM_IMAGE_NB_PIXEL_FORMATS; i++) { format = pixel_formats & (1 << i); if (format == 0) continue; /* Create a caps of the format available */ switch (format) { case PGM_IMAGE_RGB: caps = gst_caps_new_simple ("video/x-raw-rgb", "bpp", G_TYPE_INT, 24, "depth", G_TYPE_INT, 24, "red_mask", G_TYPE_INT, 0x00ff0000, "green_mask", G_TYPE_INT, 0x0000ff00, "blue_mask", G_TYPE_INT, 0x000000ff, "width", GST_TYPE_INT_RANGE, 1, G_MAXINT, "height", GST_TYPE_INT_RANGE, 1, G_MAXINT, "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL); break; case PGM_IMAGE_BGR: caps = gst_caps_new_simple ("video/x-raw-rgb", "bpp", G_TYPE_INT, 24, "depth", G_TYPE_INT, 24, "red_mask", G_TYPE_INT, 0x000000ff, "green_mask", G_TYPE_INT, 0x0000ff00, "blue_mask", G_TYPE_INT, 0x00ff0000, "width", GST_TYPE_INT_RANGE, 1, G_MAXINT, "height", GST_TYPE_INT_RANGE, 1, G_MAXINT, "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL); break; case PGM_IMAGE_RGBA: caps = gst_caps_new_simple ("video/x-raw-rgb", "bpp", G_TYPE_INT, 32, "depth", G_TYPE_INT, 32, "red_mask", G_TYPE_INT, 0xff000000, "green_mask", G_TYPE_INT, 0x00ff0000, "blue_mask", G_TYPE_INT, 0x0000ff00, "alpha_mask", G_TYPE_INT, 0x000000ff, "width", GST_TYPE_INT_RANGE, 1, G_MAXINT, "height", GST_TYPE_INT_RANGE, 1, G_MAXINT, "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL); break; case PGM_IMAGE_BGRA: caps = gst_caps_new_simple ("video/x-raw-rgb", "bpp", G_TYPE_INT, 32, "depth", G_TYPE_INT, 32, "red_mask", G_TYPE_INT, 0x0000ff00, "green_mask", G_TYPE_INT, 0x00ff0000, "blue_mask", G_TYPE_INT, 0xff000000, "alpha_mask", G_TYPE_INT, 0x000000ff, "width", GST_TYPE_INT_RANGE, 1, G_MAXINT, "height", GST_TYPE_INT_RANGE, 1, G_MAXINT, "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL); break; case PGM_IMAGE_I420: caps = gst_caps_new_simple ("video/x-raw-yuv", "format", GST_TYPE_FOURCC, GST_MAKE_FOURCC ('I', '4', '2', '0'), "width", GST_TYPE_INT_RANGE, 1, G_MAXINT, "height", GST_TYPE_INT_RANGE, 1, G_MAXINT, "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL); break; case PGM_IMAGE_YV12: caps = gst_caps_new_simple ("video/x-raw-yuv", "format", GST_TYPE_FOURCC, GST_MAKE_FOURCC ('Y', 'V', '1', '2'), "width", GST_TYPE_INT_RANGE, 1, G_MAXINT, "height", GST_TYPE_INT_RANGE, 1, G_MAXINT, "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL); break; case PGM_IMAGE_UYVY: caps = gst_caps_new_simple ("video/x-raw-yuv", "format", GST_TYPE_FOURCC, GST_MAKE_FOURCC ('U', 'Y', 'V', 'Y'), "width", GST_TYPE_INT_RANGE, 1, G_MAXINT, "height", GST_TYPE_INT_RANGE, 1, G_MAXINT, "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL); break; case PGM_IMAGE_YUYV: caps = gst_caps_new_simple ("video/x-raw-yuv", "format", GST_TYPE_FOURCC, GST_MAKE_FOURCC ('Y', 'U', 'Y', 'V'), "width", GST_TYPE_INT_RANGE, 1, G_MAXINT, "height", GST_TYPE_INT_RANGE, 1, G_MAXINT, "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL); break; default: break; } /* And append it to our caps */ gst_caps_append (sink->our_caps, caps); } } static gboolean update_format_from_caps (PgmImageSink *sink, GstStructure *s) { gboolean ret = FALSE; /* RGB format */ if (gst_structure_has_name (s, "video/x-raw-rgb")) { gint depth, bpp, red_mask, green_mask, blue_mask, alpha_mask; gst_structure_get_int (s, "bpp", &bpp); gst_structure_get_int (s, "depth", &depth); gst_structure_get_int (s, "red_mask", &red_mask); gst_structure_get_int (s, "green_mask", &green_mask); gst_structure_get_int (s, "blue_mask", &blue_mask); switch (depth) { /* RGB or BGR */ case 24: if (red_mask == 0x00ff0000 && green_mask == 0x0000ff00 && blue_mask == 0x000000ff) { sink->format = PGM_IMAGE_RGB; } else if (red_mask == 0x000000ff && green_mask == 0x0000ff00 && blue_mask == 0x00ff0000) { sink->format = PGM_IMAGE_BGR; } else { GST_WARNING_OBJECT (sink, "unsupported RGB 24 bits masks"); } break; /* RGBA or BGRA */ case 32: gst_structure_get_int (s, "alpha_mask", &alpha_mask); if (red_mask == 0xff000000 && green_mask == 0x00ff0000 && blue_mask == 0x0000ff00) { sink->format = PGM_IMAGE_RGBA; } else if (red_mask == 0x0000ff00 && green_mask == 0x00ff0000 && blue_mask == 0xff000000) { sink->format = PGM_IMAGE_BGRA; } else { GST_WARNING_OBJECT (sink, "unsupported RGB 32 bits masks"); goto beach; } break; } } /* YUV format */ else if (gst_structure_has_name (s, "video/x-raw-yuv")) { guint32 fourcc; gst_structure_get_fourcc (s, "format", &fourcc); switch (fourcc) { case GST_MAKE_FOURCC ('I', '4', '2', '0'): case GST_MAKE_FOURCC ('I', 'Y', 'U', 'V'): sink->format = PGM_IMAGE_I420; break; case GST_MAKE_FOURCC ('Y', 'V', '1', '2'): sink->format = PGM_IMAGE_YV12; break; case GST_MAKE_FOURCC ('Y', 'U', 'Y', 'V'): case GST_MAKE_FOURCC ('Y', 'U', 'Y', '2'): case GST_MAKE_FOURCC ('V', '4', '2', '2'): case GST_MAKE_FOURCC ('Y', 'U', 'N', 'V'): sink->format = PGM_IMAGE_YUYV; break; case GST_MAKE_FOURCC ('U', 'Y', 'V', 'Y'): case GST_MAKE_FOURCC ('Y', '4', '2', '2'): case GST_MAKE_FOURCC ('U', 'Y', 'N', 'V'): sink->format = PGM_IMAGE_UYVY; break; default: GST_WARNING_OBJECT (sink, "unsupported YUV format %" GST_FOURCC_FORMAT, GST_FOURCC_ARGS (fourcc)); goto beach; } } /* Unsupported format */ else { GST_WARNING_OBJECT (sink, "unsupported caps name %s", gst_structure_get_name (s)); goto beach; } ret = TRUE; beach: return ret; } static gboolean push_navigation_event (PgmImageSink *image_sink, const gchar *event_name, gfloat x, gfloat y, gfloat z, PgmButtonType button) { gboolean ret = FALSE; GstStructure *structure; GstEvent *event; GstPad *pad; gfloat x_drawable, y_drawable; gint x_image, y_image; guint gst_button; /* Convert from canvas space to image space */ GST_OBJECT_LOCK (image_sink); pgm_drawable_from_canvas (PGM_DRAWABLE (image_sink->image), &x_drawable, &y_drawable, x, y, z); pgm_image_from_drawable (image_sink->image, &x_image, &y_image, x_drawable, y_drawable); GST_OBJECT_UNLOCK (image_sink); /* Convert from Pigment button to GStreamer button */ switch (button) { case PGM_BUTTON_LEFT: gst_button = 1; break; case PGM_BUTTON_MIDDLE: gst_button = 2; break; case PGM_BUTTON_RIGHT: gst_button = 3; break; default: gst_button = 0; } /* Build and push the navigation event upstream */ if (gst_button != 0) structure = gst_structure_new ("application/x-gst-navigation", "event", G_TYPE_STRING, event_name, "pointer_x", G_TYPE_DOUBLE, (gdouble) x_image, "pointer_y", G_TYPE_DOUBLE, (gdouble) y_image, "button", G_TYPE_INT, gst_button, NULL); else structure = gst_structure_new ("application/x-gst-navigation", "event", G_TYPE_STRING, event_name, "pointer_x", G_TYPE_DOUBLE, (gdouble) x_image, "pointer_y", G_TYPE_DOUBLE, (gdouble) y_image, NULL); event = gst_event_new_navigation (structure); pad = gst_element_get_pad (GST_ELEMENT (image_sink), "sink"); ret = gst_pad_push_event (pad, event); return ret; } static gboolean drawable_motion_cb (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, guint time, gpointer user_data) { PgmImageSink *image_sink = PGM_IMAGE_SINK (user_data); return push_navigation_event (image_sink, "mouse-move", x, y, z, 0); } static gboolean drawable_pressed_cb (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, PgmButtonType button, guint time, guint pressure, gpointer user_data) { PgmImageSink *image_sink = PGM_IMAGE_SINK (user_data); return push_navigation_event (image_sink, "mouse-button-press", x, y, z, button); } static gboolean drawable_released_cb (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, PgmButtonType button, guint time, gpointer user_data) { PgmImageSink *image_sink = PGM_IMAGE_SINK (user_data); return push_navigation_event (image_sink, "mouse-button-release", x, y, z, button); } /* Called with LOCK */ static void update_event_mask (PgmImageSink *sink) { if (NULL == sink->image) return; /* Update connection to the motion events */ if ((sink->events & PGM_IMAGE_SINK_MOTION) && !sink->motion_handler) sink->motion_handler = g_signal_connect (sink->image, "motion", G_CALLBACK (drawable_motion_cb), sink); else if (!(sink->events & PGM_IMAGE_SINK_MOTION) && sink->motion_handler) { g_signal_handler_disconnect (sink->image, sink->motion_handler); sink->motion_handler = 0; } /* Update connection to the pressed events */ if ((sink->events & PGM_IMAGE_SINK_PRESSED) && !sink->pressed_handler) sink->pressed_handler = g_signal_connect (sink->image, "pressed", G_CALLBACK (drawable_pressed_cb), sink); else if (!(sink->events & PGM_IMAGE_SINK_PRESSED) && sink->pressed_handler) { g_signal_handler_disconnect (sink->image, sink->pressed_handler); sink->pressed_handler = 0; } /* Update connection to the released events */ if ((sink->events & PGM_IMAGE_SINK_RELEASED) && !sink->released_handler) sink->released_handler = g_signal_connect (sink->image, "released", G_CALLBACK (drawable_released_cb), sink); else if (!(sink->events & PGM_IMAGE_SINK_RELEASED) && sink->released_handler) { g_signal_handler_disconnect (sink->image, sink->released_handler); sink->released_handler = 0; } } /* GstBaseSink methods */ static void pgm_image_sink_get_times (GstBaseSink *bsink, GstBuffer *buf, GstClockTime *start, GstClockTime *end) { PgmImageSink *sink = PGM_IMAGE_SINK (bsink); if (GST_BUFFER_TIMESTAMP_IS_VALID (buf)) { *start = GST_BUFFER_TIMESTAMP (buf); if (GST_BUFFER_DURATION_IS_VALID (buf)) *end = *start + GST_BUFFER_DURATION (buf); else if (sink->framerate_n > 0) *end = *start + gst_util_uint64_scale_int (GST_SECOND, sink->framerate_d, sink->framerate_n); } } static GstFlowReturn pgm_image_sink_show (GstBaseSink *bsink, GstBuffer *buf) { PgmImageSink *sink = PGM_IMAGE_SINK (bsink); GST_OBJECT_LOCK (sink); if (sink->image && buf) { /* Send the GstBuffer */ pgm_image_set_from_gst_buffer (sink->image, sink->format, sink->width, sink->height, sink->stride, buf); /* And specify the pixel-aspect-ratio */ pgm_image_set_aspect_ratio (sink->image, pgm_lrintf ((gfloat) sink->width * ((gfloat) sink->par_n / (gfloat) sink->par_d)), sink->height); } GST_OBJECT_UNLOCK (sink); return GST_FLOW_OK; } static GstCaps * pgm_image_sink_getcaps (GstBaseSink *bsink) { PgmImageSink *sink = PGM_IMAGE_SINK (bsink); GstCaps *caps = NULL; GST_OBJECT_LOCK (sink); /* If we don't have any PgmImage yet, return the template */ if (G_UNLIKELY (!sink->image)) caps = gst_caps_copy (gst_pad_get_pad_template_caps (GST_VIDEO_SINK_PAD (sink))); /* Else we update the capacities of the image's canvas if any and return it */ else { update_caps_from_image (sink); caps = gst_caps_ref (sink->our_caps); } GST_OBJECT_UNLOCK (sink); return caps; } static gboolean pgm_image_sink_setcaps (GstBaseSink *bsink, GstCaps *caps) { PgmImageSink *sink = PGM_IMAGE_SINK (bsink); GstStructure *structure = NULL; GstCaps *intersection = NULL; GstCaps *our_caps = NULL; gboolean ret = FALSE; GST_DEBUG_OBJECT (sink, "setcaps called with %" GST_PTR_FORMAT, caps); GST_OBJECT_LOCK (sink); /* Try intersecting this caps with ours or with pad template if N/A */ if (sink->our_caps) our_caps = sink->our_caps; else /* That gives us no ref */ our_caps = gst_static_pad_template_get_caps (&pgm_image_sink_template); GST_OBJECT_UNLOCK (sink); intersection = gst_caps_intersect (our_caps, caps); GST_DEBUG_OBJECT (sink, "intersection returned %" GST_PTR_FORMAT, intersection); if (gst_caps_is_empty (intersection)) goto beach; /* Now configure ourself with those caps */ structure = gst_caps_get_structure (caps, 0); /* Fill the pixel-aspect-ratio if any */ ret = gst_structure_get_fraction (structure, "pixel-aspect-ratio", &sink->par_n, &sink->par_d); if (!ret) { sink->par_n = 1; sink->par_d = 1; } /* Fill the other necessary properties */ ret = gst_structure_get_int (structure, "width", &sink->width); ret &= gst_structure_get_int (structure, "height", &sink->height); ret &= gst_structure_get_fraction (structure, "framerate", &sink->framerate_n, &sink->framerate_d); if (G_UNLIKELY (!ret)) { GST_WARNING_OBJECT (sink, "incomplete caps structure"); goto beach; } ret = update_format_from_caps (sink, structure); beach: gst_caps_unref (intersection); return ret; } /* GstElement method */ static GstStateChangeReturn pgm_image_sink_change_state (GstElement *element, GstStateChange transition) { GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS; /* switch (transition) */ /* { */ /* default: */ /* break; */ /* } */ ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); if (ret == GST_STATE_CHANGE_FAILURE) return ret; /* switch (transition) */ /* { */ /* default: */ /* break; */ /* } */ return ret; } /* GObject methods */ static void pgm_image_sink_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { PgmImageSink *sink; g_return_if_fail (PGM_IS_IMAGE_SINK (object)); sink = PGM_IMAGE_SINK (object); switch (prop_id) { case ARG_IMAGE: { GST_OBJECT_LOCK (sink); /* Unref last image */ if (G_UNLIKELY (sink->image)) { if (sink->motion_handler) g_signal_handler_disconnect (sink->image, sink->motion_handler); if (sink->pressed_handler) g_signal_handler_disconnect (sink->image, sink->pressed_handler); if (sink->released_handler) g_signal_handler_disconnect (sink->image, sink->released_handler); gst_object_unref (sink->image); } /* And get the new image */ sink->image = gst_object_ref (PGM_IMAGE (g_value_get_object (value))); update_event_mask (sink); GST_OBJECT_UNLOCK (sink); break; } case ARG_EVENTS: { PgmImageSinkEventMask events = g_value_get_flags (value); GST_OBJECT_LOCK (sink); if (events != sink->events) { sink->events = events; update_event_mask (sink); } GST_OBJECT_UNLOCK (sink); break; } default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } static void pgm_image_sink_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { PgmImageSink *sink; g_return_if_fail (PGM_IS_IMAGE_SINK (object)); sink = PGM_IMAGE_SINK (object); switch (prop_id) { case ARG_IMAGE: GST_OBJECT_LOCK (sink); if (sink->image) g_value_set_object (value, sink->image); GST_OBJECT_UNLOCK (sink); break; case ARG_EVENTS: GST_OBJECT_LOCK (sink); g_value_set_flags (value, sink->events); GST_OBJECT_UNLOCK (sink); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } static void pgm_image_sink_dispose (GObject *object) { PgmImageSink *sink = PGM_IMAGE_SINK (object); GST_OBJECT_LOCK (sink); if (sink->image) { if (sink->motion_handler) { g_signal_handler_disconnect (sink->image, sink->motion_handler); sink->motion_handler = 0; } if (sink->pressed_handler) { g_signal_handler_disconnect (sink->image, sink->pressed_handler); sink->pressed_handler = 0; } if (sink->released_handler) { g_signal_handler_disconnect (sink->image, sink->released_handler); sink->released_handler = 0; } gst_object_unref (sink->image); sink->image = NULL; } if (sink->our_caps) { gst_caps_unref (sink->our_caps); sink->our_caps = NULL; } GST_OBJECT_UNLOCK (sink); GST_CALL_PARENT (G_OBJECT_CLASS, dispose, (object)); } static void pgm_image_sink_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); gst_element_class_set_details (element_class, &pgm_image_sink_details); gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&pgm_image_sink_template)); } static void pgm_image_sink_class_init (PgmImageSinkClass *klass) { GObjectClass *gobject_class; GstElementClass *gstelement_class; GstBaseSinkClass *gstbasesink_class; gobject_class = (GObjectClass *) klass; gstelement_class = (GstElementClass *) klass; gstbasesink_class = (GstBaseSinkClass *) klass; parent_class = g_type_class_peek_parent (klass); gobject_class->dispose = GST_DEBUG_FUNCPTR (pgm_image_sink_dispose); gobject_class->set_property = GST_DEBUG_FUNCPTR (pgm_image_sink_set_property); gobject_class->get_property = GST_DEBUG_FUNCPTR (pgm_image_sink_get_property); /** * PgmImageSink:image: * * A #PgmImage on which the sink output video frames. */ g_object_class_install_property (gobject_class, ARG_IMAGE, g_param_spec_object ("image", "PgmImage", "A PgmImage on which the sink output video frames", PGM_TYPE_IMAGE, G_PARAM_READWRITE)); /** * PgmImageSink:events: * * A #PgmImageSinkEventMask specifying what input events should be sent * upstream in the pipeline. */ g_object_class_install_property (gobject_class, ARG_EVENTS, g_param_spec_flags ("events", "PgmImageSinkEventMask", "A mask specifying what input events " "should be sent upstream in the pipeline", PGM_TYPE_IMAGE_SINK_EVENT_MASK, 0, G_PARAM_READWRITE)); gstelement_class->change_state = GST_DEBUG_FUNCPTR (pgm_image_sink_change_state); gstbasesink_class->get_caps = GST_DEBUG_FUNCPTR (pgm_image_sink_getcaps); gstbasesink_class->set_caps = GST_DEBUG_FUNCPTR (pgm_image_sink_setcaps); gstbasesink_class->get_times = GST_DEBUG_FUNCPTR (pgm_image_sink_get_times); gstbasesink_class->preroll = GST_DEBUG_FUNCPTR (pgm_image_sink_show); gstbasesink_class->render = GST_DEBUG_FUNCPTR (pgm_image_sink_show); GST_DEBUG_CATEGORY_INIT (pgm_image_sink_debug, "pgm_image_sink", 0, "pigment image sink gstreamer element"); } static void pgm_image_sink_init (PgmImageSink *sink) { } GType pgm_image_sink_get_type (void) { static GType sink_type = 0; if (G_UNLIKELY (!sink_type)) { static const GTypeInfo sink_info = { sizeof (PgmImageSinkClass), pgm_image_sink_base_init, NULL, (GClassInitFunc) pgm_image_sink_class_init, NULL, NULL, sizeof (PgmImageSink), 0, (GInstanceInitFunc) pgm_image_sink_init, NULL }; sink_type = g_type_register_static (GST_TYPE_VIDEO_SINK, "PgmImageSink", &sink_info, 0); } return sink_type; } /* PgmImageSink methods */ /** * pgm_image_sink_new: * @name: the name of the new image sink. * * Creates a new image sink with the given name. * * Returns: a new #PgmImageSink. */ GstElement* pgm_image_sink_new (const gchar *name) { return gst_element_factory_make ("pgmimagesink", name); } /** * pgm_image_sink_set_image: * @sink: a #PgmImageSink object. * @image: the #PgmImage object. * * Sets @image as the #PgmImage object which will receive the frames * (#GstBuffer) outputed by @sink. * * MT Safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_image_sink_set_image (PgmImageSink *sink, PgmImage *image) { g_return_val_if_fail (PGM_IS_IMAGE_SINK (sink), PGM_ERROR_X); g_return_val_if_fail (PGM_IS_IMAGE (image), PGM_ERROR_X); g_object_set (G_OBJECT (sink), "image", image, NULL); return PGM_ERROR_OK; } /** * pgm_image_sink_get_image: * @sink: a #PgmImageSink object. * @image: a pointer to a #PgmImage pointer where the image will be stored. * Unref after usage. * * Retrieves the #PgmImage object in @image which @sink is using to output its * frames (#GstBuffer). * * MT Safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_image_sink_get_image (PgmImageSink *sink, PgmImage **image) { g_return_val_if_fail (PGM_IS_IMAGE_SINK (sink), PGM_ERROR_X); g_return_val_if_fail (image != NULL, PGM_ERROR_X); *image = gst_object_ref (sink->image); return PGM_ERROR_OK; } /** * pgm_image_sink_set_events: * @sink: a #PgmImageSink object. * @events: a #PgmImageSinkEventMask. * * Sets the mouse events interacting with the currently set image that will be * sent upstream in the pipeline. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_image_sink_set_events (PgmImageSink *sink, PgmImageSinkEventMask events) { g_return_val_if_fail (PGM_IS_IMAGE_SINK (sink), PGM_ERROR_X); g_object_set (sink, "events", events, NULL); return PGM_ERROR_OK; } /** * pgm_image_sink_get_events: * @sink: a #PgmImageSink object. * @events: a #PgmImageSinkEventMask pointer where the event mask will be * stored. * * Retrieves in @events the mouse events sent upstream in the pipeline. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_image_sink_get_events (PgmImageSink *sink, PgmImageSinkEventMask *events) { g_return_val_if_fail (PGM_IS_IMAGE_SINK (sink), PGM_ERROR_X); g_return_val_if_fail (NULL != events, PGM_ERROR_X); g_object_get (sink, "events", events, NULL); return PGM_ERROR_OK; } pigment-0.3.17/pgm/pgmlinearalgebra.h0000644000175000017500000004055511205034416014423 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment media rendering library * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author(s): Loïc Molinari * Florian Boucault */ #ifndef __PGM_LINEAR_ALGEBRA_H__ #define __PGM_LINEAR_ALGEBRA_H__ #include G_BEGIN_DECLS #define PGM_TYPE_VEC3 (pgm_vec3_get_type ()) #define PGM_TYPE_VEC4 (pgm_vec4_get_type ()) #define PGM_TYPE_MAT3X3 (pgm_mat3x3_get_type ()) #define PGM_TYPE_MAT4X4 (pgm_mat4x4_get_type ()) typedef struct _PgmVec3 PgmVec3; typedef struct _PgmVec4 PgmVec4; typedef struct _PgmMat3x3 PgmMat3x3; typedef struct _PgmMat4x4 PgmMat4x4; /** * PgmMat4x4Predefined: * @PGM_MAT4X4_FLIP_HORIZONTAL: Horizontal flipping. * @PGM_MAT4X4_FLIP_VERTICAL: Vertical flipping. * @PGM_MAT4X4_ROTATE_CLOCKWISE: Clockwise rotation. * @PGM_MAT4X4_ROTATE_COUNTER_CLOCKWISE: Counter-clockwise rotation. * * Predefined 4x4 matrices describing several common effects. */ typedef enum { PGM_MAT4X4_FLIP_HORIZONTAL, PGM_MAT4X4_FLIP_VERTICAL, PGM_MAT4X4_ROTATE_CLOCKWISE, PGM_MAT4X4_ROTATE_COUNTER_CLOCKWISE } PgmMat4x4Predefined; /** * PgmVec3: * @v: the 3 components vector array. * * Describes a 3 components vector. */ struct _PgmVec3 { /*< public >*/ gfloat v[3]; }; /** * PgmVec4: * @v: the 4 components vector. * * Describes a 4 components vector. */ struct _PgmVec4 { /*< public >*/ gfloat v[4]; }; /** * PgmMat3x3: * @m: the 3x3 matrix array in row-major order. * * Describes a 3x3 matrix. */ struct _PgmMat3x3 { /*< public >*/ gfloat m[9]; }; /** * PgmMat4x4: * @m: the 4x4 matrix array in row-major order. * * Describes a 4x4 matrix. */ struct _PgmMat4x4 { /*< public >*/ gfloat m[16]; }; /* 3-components vector methods */ GType pgm_vec3_get_type (void); PgmVec3 *pgm_vec3_new (void); PgmVec3 *pgm_vec3_new_from_scalars (gfloat v0, gfloat v1, gfloat v2); PgmVec3 *pgm_vec3_copy (PgmVec3 *vec3); void pgm_vec3_free (PgmVec3 *vec3); void pgm_vec3_set_from_scalars (PgmVec3 *vec3, gfloat v0, gfloat v1, gfloat v2); void pgm_vec3_set_from_vec3 (PgmVec3 *vec3, const PgmVec3 *v); gfloat pgm_vec3_length (PgmVec3 *vec3); PgmVec3 *pgm_vec3_normalize (PgmVec3 *vec3); gfloat pgm_vec3_dot_product (PgmVec3 *vec3, const PgmVec3 *v); PgmVec3 *pgm_vec3_cross_product (PgmVec3 *vec3, const PgmVec3 *v); PgmVec3 *pgm_vec3_add_scalar (PgmVec3 *vec3, gfloat s); PgmVec3 *pgm_vec3_add_vec3 (PgmVec3 *vec3, const PgmVec3 *v); PgmVec3 *pgm_vec3_substract_scalar (PgmVec3 *vec3, gfloat s); PgmVec3 *pgm_vec3_substract_vec3 (PgmVec3 *vec3, const PgmVec3 *v); PgmVec3 *pgm_vec3_multiply_scalar (PgmVec3 *vec3, gfloat s); PgmVec3 *pgm_vec3_multiply_vec3 (PgmVec3 *vec3, const PgmVec3 *v); gchar *pgm_vec3_to_string (PgmVec3 *vec3); /* 4-components vector methods */ GType pgm_vec4_get_type (void); PgmVec4 *pgm_vec4_new (void); PgmVec4 *pgm_vec4_new_from_scalars (gfloat v0, gfloat v1, gfloat v2, gfloat v3); PgmVec4 *pgm_vec4_copy (PgmVec4 *vec4); void pgm_vec4_free (PgmVec4 *vec4); void pgm_vec4_set_from_scalars (PgmVec4 *vec4, gfloat v0, gfloat v1, gfloat v2, gfloat v3); void pgm_vec4_set_from_vec4 (PgmVec4 *vec4, const PgmVec4 *v); gfloat pgm_vec4_length (PgmVec4 *vec4); PgmVec4 *pgm_vec4_normalize (PgmVec4 *vec4); PgmVec4 *pgm_vec4_add_scalar (PgmVec4 *vec4, gfloat s); PgmVec4 *pgm_vec4_add_vec4 (PgmVec4 *vec4, const PgmVec4 *v); PgmVec4 *pgm_vec4_substract_scalar (PgmVec4 *vec4, gfloat s); PgmVec4 *pgm_vec4_substract_vec4 (PgmVec4 *vec4, const PgmVec4 *v); PgmVec4 *pgm_vec4_multiply_scalar (PgmVec4 *vec4, gfloat s); PgmVec4 *pgm_vec4_multiply_vec4 (PgmVec4 *vec4, const PgmVec4 *v); gchar *pgm_vec4_to_string (PgmVec4 *vec4); /* 3x3 matrix methods */ GType pgm_mat3x3_get_type (void); PgmMat3x3 *pgm_mat3x3_new (void); PgmMat3x3 *pgm_mat3x3_new_from_scalars (gfloat v0, gfloat v1, gfloat v2, gfloat v3, gfloat v4, gfloat v5, gfloat v6, gfloat v7, gfloat v8); PgmMat3x3 *pgm_mat3x3_new_from_vec3 (const PgmVec3 *v0, const PgmVec3 *v1, const PgmVec3 *v2); PgmMat3x3 *pgm_mat3x3_new_identity (void); PgmMat3x3 *pgm_mat3x3_copy (PgmMat3x3 *mat3x3); void pgm_mat3x3_free (PgmMat3x3 *mat3x3); void pgm_mat3x3_set_from_scalars (PgmMat3x3 *mat3x3, gfloat v0, gfloat v1, gfloat v2, gfloat v3, gfloat v4, gfloat v5, gfloat v6, gfloat v7, gfloat v8); void pgm_mat3x3_set_from_vec3 (PgmMat3x3 *mat3x3, const PgmVec3 *v0, const PgmVec3 *v1, const PgmVec3 *v2); void pgm_mat3x3_set_from_mat3x3 (PgmMat3x3 *mat3x3, const PgmMat3x3 *m); gboolean pgm_mat3x3_is_identity (PgmMat3x3 *mat3x3); PgmMat3x3 *pgm_mat3x3_inverse (PgmMat3x3 *mat3x3); PgmMat3x3 *pgm_mat3x3_transpose (PgmMat3x3 *mat3x3); PgmMat3x3 *pgm_mat3x3_add_scalar (PgmMat3x3 *mat3x3, gfloat s); PgmMat3x3 *pgm_mat3x3_add_mat3x3 (PgmMat3x3 *mat3x3, const PgmMat3x3 *m); PgmMat3x3 *pgm_mat3x3_substract_scalar (PgmMat3x3 *mat3x3, gfloat s); PgmMat3x3 *pgm_mat3x3_substract_mat3x3 (PgmMat3x3 *mat3x3, const PgmMat3x3 *m); PgmMat3x3 *pgm_mat3x3_multiply_scalar (PgmMat3x3 *mat3x3, gfloat s); PgmVec3 *pgm_mat3x3_multiply_vec3 (PgmMat3x3 *mat3x3, const PgmVec3 *v); PgmMat3x3 *pgm_mat3x3_multiply_mat3x3 (PgmMat3x3 *mat3x3, const PgmMat3x3 *m); gchar *pgm_mat3x3_to_string (PgmMat3x3 *mat3x3); /* 4x4 matrix methods */ GType pgm_mat4x4_get_type (void); PgmMat4x4 *pgm_mat4x4_new (void); PgmMat4x4 *pgm_mat4x4_new_from_scalars (gfloat v0, gfloat v1, gfloat v2, gfloat v3, gfloat v4, gfloat v5, gfloat v6, gfloat v7, gfloat v8, gfloat v9, gfloat v10, gfloat v11, gfloat v12, gfloat v13, gfloat v14, gfloat v15); PgmMat4x4 *pgm_mat4x4_new_from_vec4 (const PgmVec4 *v0, const PgmVec4 *v1, const PgmVec4 *v2, const PgmVec4 *v3); PgmMat4x4 *pgm_mat4x4_new_identity (void); PgmMat4x4 *pgm_mat4x4_new_predefined (PgmMat4x4Predefined predefined); PgmMat4x4 *pgm_mat4x4_new_translate_from_vec3 (const PgmVec3 *t); PgmMat4x4 *pgm_mat4x4_new_translate_from_scalars (gfloat tx, gfloat ty, gfloat tz); PgmMat4x4 *pgm_mat4x4_new_scale_from_vec3 (const PgmVec3 *s); PgmMat4x4 *pgm_mat4x4_new_scale_from_scalars (gfloat sx, gfloat sy, gfloat sz); PgmMat4x4 *pgm_mat4x4_new_rotate_x (gfloat angle); PgmMat4x4 *pgm_mat4x4_new_rotate_y (gfloat angle); PgmMat4x4 *pgm_mat4x4_new_rotate_z (gfloat angle); PgmMat4x4 *pgm_mat4x4_new_rotate_axis_from_vec3 (gfloat angle, const PgmVec3 *axis); PgmMat4x4 *pgm_mat4x4_new_rotate_axis_from_scalars (gfloat angle, gfloat axis_x, gfloat axis_y, gfloat axis_z); PgmMat4x4 *pgm_mat4x4_copy (PgmMat4x4 *mat4x4); void pgm_mat4x4_free (PgmMat4x4 *mat4x4); void pgm_mat4x4_set_from_scalars (PgmMat4x4 *mat4x4, gfloat v0, gfloat v1, gfloat v2, gfloat v3, gfloat v4, gfloat v5, gfloat v6, gfloat v7, gfloat v8, gfloat v9, gfloat v10, gfloat v11, gfloat v12, gfloat v13, gfloat v14, gfloat v15); void pgm_mat4x4_set_from_vec4 (PgmMat4x4 *mat4x4, const PgmVec4 *v0, const PgmVec4 *v1, const PgmVec4 *v2, const PgmVec4 *v3); void pgm_mat4x4_set_from_mat4x4 (PgmMat4x4 *mat4x4, const PgmMat4x4 *m); gboolean pgm_mat4x4_is_identity (PgmMat4x4 *mat4x4); PgmMat4x4 *pgm_mat4x4_inverse (PgmMat4x4 *mat4x4); PgmMat4x4 *pgm_mat4x4_transpose (PgmMat4x4 *mat4x4); void pgm_mat4x4_translate_from_vec3 (PgmMat4x4 *mat4x4, const PgmVec3 *t); void pgm_mat4x4_translate_from_scalars (PgmMat4x4 *mat4x4, gfloat tx, gfloat ty, gfloat tz); void pgm_mat4x4_scale_from_vec3 (PgmMat4x4 *mat4x4, const PgmVec3 *s); void pgm_mat4x4_scale_from_scalars (PgmMat4x4 *mat4x4, gfloat sx, gfloat sy, gfloat sz); void pgm_mat4x4_rotate_x (PgmMat4x4 *mat4x4, gfloat angle); void pgm_mat4x4_rotate_y (PgmMat4x4 *mat4x4, gfloat angle); void pgm_mat4x4_rotate_z (PgmMat4x4 *mat4x4, gfloat angle); void pgm_mat4x4_rotate_axis_from_vec3 (PgmMat4x4 *mat4x4, gfloat angle, const PgmVec3 *axis); void pgm_mat4x4_rotate_axis_from_scalars (PgmMat4x4 *mat4x4, gfloat angle, gfloat axis_x, gfloat axis_y, gfloat axis_z); PgmMat4x4 *pgm_mat4x4_add_scalar (PgmMat4x4 *mat4x4, gfloat s); PgmMat4x4 *pgm_mat4x4_add_mat4x4 (PgmMat4x4 *mat4x4, const PgmMat4x4 *m); PgmMat4x4 *pgm_mat4x4_substract_scalar (PgmMat4x4 *mat4x4, gfloat s); PgmMat4x4 *pgm_mat4x4_substract_mat4x4 (PgmMat4x4 *mat4x4, const PgmMat4x4 *m); PgmMat4x4 *pgm_mat4x4_multiply_scalar (PgmMat4x4 *mat4x4, gfloat s); PgmVec4 *pgm_mat4x4_multiply_vec4 (PgmMat4x4 *mat4x4, const PgmVec4 *v); PgmMat4x4 *pgm_mat4x4_multiply_mat4x4 (PgmMat4x4 *mat4x4, const PgmMat4x4 *m); gchar *pgm_mat4x4_to_string (PgmMat4x4 *mat4x4); /* Utility functions */ PgmVec3 *pgm_intersection_line_plane (const PgmVec3 *l1, const PgmVec3 *l2, const PgmVec3 *p, const PgmVec3 *pu, const PgmVec3 *pv); gboolean pgm_point_belongs_rectangle (const PgmVec3 *p, const PgmVec3 *r, const PgmVec3 *ru, const PgmVec3 *rv); G_END_DECLS #endif /* __PGM_LINEAR_ALGEBRA_H__ */ pigment-0.3.17/pgm/pgmimagesink.h0000644000175000017500000000621611205034416013576 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment GStreamer image sink * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author(s): Loïc Molinari * Julien Moutte */ #ifndef __PGM_IMAGE_SINK_H__ #define __PGM_IMAGE_SINK_H__ #include #include "pgmimage.h" G_BEGIN_DECLS #define PGM_TYPE_IMAGE_SINK (pgm_image_sink_get_type()) #define PGM_IMAGE_SINK(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), PGM_TYPE_IMAGE_SINK, PgmImageSink)) #define PGM_IMAGE_SINK_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), PGM_TYPE_IMAGE_SINK, PgmImageSink)) #define PGM_IS_IMAGE_SINK(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), PGM_TYPE_IMAGE_SINK)) #define PGM_IS_IMAGE_SINK_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass), PGM_TYPE_IMAGE_SINK)) typedef struct _PgmImageSink PgmImageSink; typedef struct _PgmImageSinkClass PgmImageSinkClass; /** * PgmImageSinkEventMask: * @PGM_IMAGE_SINK_MOTION: The motion event flag. * @PGM_IMAGE_SINK_PRESSED: The pressed event flag. * @PGM_IMAGE_SINK_RELEASED: The released event flag. * * The event mask flags. */ typedef enum { PGM_IMAGE_SINK_MOTION = (1 << 0), PGM_IMAGE_SINK_PRESSED = (1 << 1), PGM_IMAGE_SINK_RELEASED = (1 << 2) } PgmImageSinkEventMask; /** * PgmImageSink: * * The opaque #PgmImageSink data structure. */ struct _PgmImageSink { /*< private >*/ GstVideoSink base_element; GstCaps *our_caps; PgmImage *image; PgmImagePixelFormat format; gint framerate_n; gint framerate_d; gint par_n; gint par_d; gint width; gint height; gint stride; gulong motion_handler; gulong pressed_handler; gulong released_handler; guint8 events; }; struct _PgmImageSinkClass { GstVideoSinkClass parent_class; }; GType pgm_image_sink_get_type (void); GstElement *pgm_image_sink_new (const gchar *name); PgmError pgm_image_sink_set_image (PgmImageSink *sink, PgmImage *image); PgmError pgm_image_sink_get_image (PgmImageSink *sink, PgmImage **image); PgmError pgm_image_sink_set_events (PgmImageSink *sink, PgmImageSinkEventMask events); PgmError pgm_image_sink_get_events (PgmImageSink *sink, PgmImageSinkEventMask *events); G_END_DECLS #endif /* __PGM_IMAGE_SINK_H__ */ pigment-0.3.17/pgm/gtk/0000777000175000017500000000000011205035134011614 500000000000000pigment-0.3.17/pgm/gtk/Makefile.am0000644000175000017500000000114611205034416013570 00000000000000lib_LTLIBRARIES = libpigment-gtk-@PGM_MAJORMINOR@.la libpigment_gtk_@PGM_MAJORMINOR@_includedir = $(includedir)/pigment-@PGM_MAJORMINOR@/pgm/gtk libpigment_gtk_@PGM_MAJORMINOR@_include_HEADERS = pgmgtk.h libpigment_gtk_@PGM_MAJORMINOR@_la_SOURCES = pgmgtk.c libpigment_gtk_@PGM_MAJORMINOR@_la_CFLAGS = \ $(PGM_OPTION_CFLAGS) \ $(PGM_OBJ_CFLAGS) \ $(GTK_CFLAGS) libpigment_gtk_@PGM_MAJORMINOR@_la_LIBADD = \ $(PGM_OBJ_LIBS) \ $(GTK_LIBS) libpigment_gtk_@PGM_MAJORMINOR@_la_LDFLAGS = \ $(PGM_LIB_LDFLAGS) \ $(PGM_ALL_LDFLAGS) \ $(PGM_LT_LDFLAGS) CLEANFILES = \ *.gcno \ *.gcda \ *.gcov \ *.gcov.out pigment-0.3.17/pgm/gtk/pgmgtk.c0000644000175000017500000001151211205034416013167 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * GTK+ widget for embedding a Pigment viewport * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ /** * SECTION:pgmgtk * @short_description: A GTK+ widget embedding viewports. * * #PgmGtk is a GTK+ widget allowing to embed a #PgmViewport inside a * GTK+ application. * * Last reviewed on 2007-11-09 (0.3.2) */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include "pgmgtk.h" G_DEFINE_TYPE (PgmGtk, pgm_gtk, GTK_TYPE_SOCKET); /* GtkObject methods */ static void pgm_gtk_size_request (GtkWidget *widget, GtkRequisition *requisition) { requisition->width = 1; requisition->height = 1; } static void pgm_gtk_size_allocate (GtkWidget *widget, GtkAllocation *allocation) { PgmGtk *gtk = PGM_GTK (widget); if (gtk->viewport) pgm_viewport_set_size (gtk->viewport, allocation->width, allocation->height); GTK_WIDGET_CLASS (pgm_gtk_parent_class)->size_allocate (widget, allocation); } static void pgm_gtk_map (GtkWidget *widget) { PgmGtk *gtk = PGM_GTK (widget); if (gtk->viewport) { gtk_socket_add_id (GTK_SOCKET (widget), gtk->embedding_id); pgm_viewport_show (gtk->viewport); } GTK_WIDGET_CLASS (pgm_gtk_parent_class)->map (widget); } static void pgm_gtk_destroy (GtkObject *object) { PgmGtk *gtk = PGM_GTK (object); if (gtk->viewport) { g_object_unref (gtk->viewport); gtk->viewport = NULL; gtk->embedding_id = 0; } GTK_OBJECT_CLASS (pgm_gtk_parent_class)->destroy (object); } /* GObject stuff */ static void pgm_gtk_class_init (PgmGtkClass *klass) { GtkObjectClass *gtkobject_class = GTK_OBJECT_CLASS (klass); GtkWidgetClass *gtkwidget_class = GTK_WIDGET_CLASS (klass); gtkobject_class->destroy = pgm_gtk_destroy; gtkwidget_class->size_request = pgm_gtk_size_request; gtkwidget_class->size_allocate = pgm_gtk_size_allocate; gtkwidget_class->map = pgm_gtk_map; } static void pgm_gtk_init (PgmGtk *gtk) { gtk->viewport = NULL; gtk->embedding_id = 0; /* Viewport handles double-buffering on its own */ gtk_widget_set_double_buffered (GTK_WIDGET (gtk), FALSE); } /* Public methods */ /** * pgm_gtk_new: * * Creates a new #PgmGtk object. * * Returns: a new #PgmGtk instance. */ GtkWidget* pgm_gtk_new (void) { return g_object_new (PGM_TYPE_GTK, NULL); } /** * pgm_gtk_set_viewport: * @gtk: A #PgmGtk object. * @viewport: A #PgmViewport object. * * Embeds @viewport in the GTK+ widget @gtk. @viewport must support application * embedding for the function to success. * * Returns: %TRUE if @viewport has been embedded successfully, %FALSE otherwise. */ gboolean pgm_gtk_set_viewport (PgmGtk *gtk, PgmViewport *viewport) { gulong caps_mask = 0; g_return_val_if_fail (PGM_IS_GTK (gtk), FALSE); /* Clean up if there's already a viewport */ if (gtk->viewport) { g_object_unref (gtk->viewport); gtk->viewport = NULL; gtk->embedding_id = 0; } if (!PGM_IS_VIEWPORT (viewport)) return FALSE; gtk->viewport = g_object_ref (viewport); /* Check if it supports embedding */ pgm_viewport_get_caps_mask (viewport, &caps_mask); if (!(caps_mask & PGM_VIEWPORT_APPLICATION_EMBEDDING)) { g_object_unref (viewport); return FALSE; } /* And finally retrieve the ID */ pgm_viewport_get_embedding_id (gtk->viewport, >k->embedding_id); return TRUE; } /** * pgm_gtk_get_viewport: * @gtk: a #PgmViewport object. * @viewport: a pointer to a #PgmViewport pointer where the @viewport is going * to be stored. Unref after usage. * * Retrieves the @viewport of @gtk. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_gtk_get_viewport (PgmGtk *gtk, PgmViewport **viewport) { g_return_val_if_fail (PGM_IS_GTK (gtk), PGM_ERROR_X); g_return_val_if_fail (viewport != NULL, PGM_ERROR_X); if (gtk->viewport) *viewport = gst_object_ref (GST_OBJECT (gtk->viewport)); else *viewport = NULL; return PGM_ERROR_OK; } pigment-0.3.17/pgm/gtk/pgmgtk.h0000644000175000017500000000407311205034416013200 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * GTK+ widget for embedding a Pigment viewport * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ #ifndef __PGM_GTK_H__ #define __PGM_GTK_H__ #include #include G_BEGIN_DECLS #define PGM_TYPE_GTK (pgm_gtk_get_type ()) #define PGM_GTK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PGM_TYPE_GTK, PgmGtk)) #define PGM_IS_GTK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PGM_TYPE_GTK)) #define PGM_GTK_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), PGM_TYPE_GTK, PgmGtkClass)) #define PGM_IS_GTK_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), PGM_TYPE_GTK)) typedef struct _PgmGtk PgmGtk; typedef struct _PgmGtkClass PgmGtkClass; /** * PgmGtk: * * The opaque #PgmGtk data structure. */ struct _PgmGtk { /*< private >*/ GtkSocket parent; PgmViewport *viewport; gulong embedding_id; }; struct _PgmGtkClass { GtkSocketClass parent_class; }; GType pgm_gtk_get_type (void) G_GNUC_CONST; GtkWidget *pgm_gtk_new (void); gboolean pgm_gtk_set_viewport (PgmGtk *gtk, PgmViewport *viewport); PgmError pgm_gtk_get_viewport (PgmGtk *gtk, PgmViewport **viewport); G_END_DECLS #endif /* __PGM_GTK_H__ */ pigment-0.3.17/pgm/gtk/Makefile.in0000644000175000017500000005444011205034672013612 00000000000000# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = pgm/gtk DIST_COMMON = $(libpigment_gtk_@PGM_MAJORMINOR@_include_HEADERS) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/as-compiler-flag.m4 \ $(top_srcdir)/common/m4/as-version.m4 \ $(top_srcdir)/common/m4/check.m4 \ $(top_srcdir)/common/m4/gst-args.m4 \ $(top_srcdir)/common/m4/gst-check.m4 \ $(top_srcdir)/common/m4/gst-error.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/libtool.m4 \ $(top_srcdir)/common/m4/ltoptions.m4 \ $(top_srcdir)/common/m4/ltsugar.m4 \ $(top_srcdir)/common/m4/ltversion.m4 \ $(top_srcdir)/common/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" \ "$(DESTDIR)$(libpigment_gtk_@PGM_MAJORMINOR@_includedir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = libpigment_gtk_@PGM_MAJORMINOR@_la_DEPENDENCIES = \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am_libpigment_gtk_@PGM_MAJORMINOR@_la_OBJECTS = \ libpigment_gtk_@PGM_MAJORMINOR@_la-pgmgtk.lo libpigment_gtk_@PGM_MAJORMINOR@_la_OBJECTS = \ $(am_libpigment_gtk_@PGM_MAJORMINOR@_la_OBJECTS) libpigment_gtk_@PGM_MAJORMINOR@_la_LINK = $(LIBTOOL) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(libpigment_gtk_@PGM_MAJORMINOR@_la_CFLAGS) $(CFLAGS) \ $(libpigment_gtk_@PGM_MAJORMINOR@_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libpigment_gtk_@PGM_MAJORMINOR@_la_SOURCES) DIST_SOURCES = $(libpigment_gtk_@PGM_MAJORMINOR@_la_SOURCES) libpigment_gtk_@PGM_MAJORMINOR@_includeHEADERS_INSTALL = $(INSTALL_HEADER) HEADERS = $(libpigment_gtk_@PGM_MAJORMINOR@_include_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAIROXLIB_CFLAGS = @CAIROXLIB_CFLAGS@ CAIROXLIB_LIBS = @CAIROXLIB_LIBS@ CAIRO_CFLAGS = @CAIRO_CFLAGS@ CAIRO_LIBS = @CAIRO_LIBS@ CC = @CC@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXEEXT = @EXEEXT@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ GCOV = @GCOV@ GCOV_CFLAGS = @GCOV_CFLAGS@ GCOV_LIBS = @GCOV_LIBS@ GDKPIXBUFXLIB_CFLAGS = @GDKPIXBUFXLIB_CFLAGS@ GDKPIXBUFXLIB_LIBS = @GDKPIXBUFXLIB_LIBS@ GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@ GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ GST_0_10_13_CFLAGS = @GST_0_10_13_CFLAGS@ GST_0_10_13_LIBS = @GST_0_10_13_LIBS@ GST_10_10_CFLAGS = @GST_10_10_CFLAGS@ GST_10_10_LIBS = @GST_10_10_LIBS@ GST_10_11_CFLAGS = @GST_10_11_CFLAGS@ GST_10_11_LIBS = @GST_10_11_LIBS@ GST_10_12_CFLAGS = @GST_10_12_CFLAGS@ GST_10_12_LIBS = @GST_10_12_LIBS@ GST_10_13_CFLAGS = @GST_10_13_CFLAGS@ GST_10_13_LIBS = @GST_10_13_LIBS@ GST_10_14_CFLAGS = @GST_10_14_CFLAGS@ GST_10_14_LIBS = @GST_10_14_LIBS@ GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ GST_BASE_LIBS = @GST_BASE_LIBS@ GST_CFLAGS = @GST_CFLAGS@ GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ GST_CHECK_LIBS = @GST_CHECK_LIBS@ GST_LIBS = @GST_LIBS@ GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ GST_TOOLS_DIR = @GST_TOOLS_DIR@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_GTK_WIDGET = @HAVE_GTK_WIDGET@ HAVE_IMAGING_LIBRARY = @HAVE_IMAGING_LIBRARY@ HAVE_OPENGLES_PLUGIN = @HAVE_OPENGLES_PLUGIN@ HAVE_OPENGL_PLUGIN = @HAVE_OPENGL_PLUGIN@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGLADE_2_0_CFLAGS = @LIBGLADE_2_0_CFLAGS@ LIBGLADE_2_0_LIBS = @LIBGLADE_2_0_LIBS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENGLES_BACKEND = @OPENGLES_BACKEND@ OPENGL_BACKEND = @OPENGL_BACKEND@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ PANGOCAIRO_CFLAGS = @PANGOCAIRO_CFLAGS@ PANGOCAIRO_LIBS = @PANGOCAIRO_LIBS@ PANGO_1_16_CFLAGS = @PANGO_1_16_CFLAGS@ PANGO_1_16_LIBS = @PANGO_1_16_LIBS@ PANGO_CFLAGS = @PANGO_CFLAGS@ PANGO_LIBS = @PANGO_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL_PATH = @PERL_PATH@ PGM_ALL_CFLAGS = @PGM_ALL_CFLAGS@ PGM_ALL_LDFLAGS = @PGM_ALL_LDFLAGS@ PGM_ALL_LIBS = @PGM_ALL_LIBS@ PGM_GLES_CFLAGS = @PGM_GLES_CFLAGS@ PGM_GLES_LIBS = @PGM_GLES_LIBS@ PGM_GL_CFLAGS = @PGM_GL_CFLAGS@ PGM_GL_LIBS = @PGM_GL_LIBS@ PGM_GTKDOC_CFLAGS = @PGM_GTKDOC_CFLAGS@ PGM_LIB_LDFLAGS = @PGM_LIB_LDFLAGS@ PGM_LT_LDFLAGS = @PGM_LT_LDFLAGS@ PGM_LT_VERSION = @PGM_LT_VERSION@ PGM_MAJORMINOR = @PGM_MAJORMINOR@ PGM_OBJ_CFLAGS = @PGM_OBJ_CFLAGS@ PGM_OBJ_LIBS = @PGM_OBJ_LIBS@ PGM_OPTION_CFLAGS = @PGM_OPTION_CFLAGS@ PGM_PLUGIN_LDFLAGS = @PGM_PLUGIN_LDFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PLUGIN_PATH = @PLUGIN_PATH@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XCOMPOSITE_CFLAGS = @XCOMPOSITE_CFLAGS@ XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ XMKMF = @XMKMF@ XRENDER_CFLAGS = @XRENDER_CFLAGS@ XRENDER_LIBS = @XRENDER_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cairo_req = @cairo_req@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ glib_req = @glib_req@ gstreamer_plugins_base_req = @gstreamer_plugins_base_req@ gstreamer_req = @gstreamer_req@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pango_req = @pango_req@ pangocairo_req = @pangocairo_req@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ lib_LTLIBRARIES = libpigment-gtk-@PGM_MAJORMINOR@.la libpigment_gtk_@PGM_MAJORMINOR@_includedir = $(includedir)/pigment-@PGM_MAJORMINOR@/pgm/gtk libpigment_gtk_@PGM_MAJORMINOR@_include_HEADERS = pgmgtk.h libpigment_gtk_@PGM_MAJORMINOR@_la_SOURCES = pgmgtk.c libpigment_gtk_@PGM_MAJORMINOR@_la_CFLAGS = \ $(PGM_OPTION_CFLAGS) \ $(PGM_OBJ_CFLAGS) \ $(GTK_CFLAGS) libpigment_gtk_@PGM_MAJORMINOR@_la_LIBADD = \ $(PGM_OBJ_LIBS) \ $(GTK_LIBS) libpigment_gtk_@PGM_MAJORMINOR@_la_LDFLAGS = \ $(PGM_LIB_LDFLAGS) \ $(PGM_ALL_LDFLAGS) \ $(PGM_LT_LDFLAGS) CLEANFILES = \ *.gcno \ *.gcda \ *.gcov \ *.gcov.out all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu pgm/gtk/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu pgm/gtk/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libpigment-gtk-@PGM_MAJORMINOR@.la: $(libpigment_gtk_@PGM_MAJORMINOR@_la_OBJECTS) $(libpigment_gtk_@PGM_MAJORMINOR@_la_DEPENDENCIES) $(libpigment_gtk_@PGM_MAJORMINOR@_la_LINK) -rpath $(libdir) $(libpigment_gtk_@PGM_MAJORMINOR@_la_OBJECTS) $(libpigment_gtk_@PGM_MAJORMINOR@_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpigment_gtk_@PGM_MAJORMINOR@_la-pgmgtk.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libpigment_gtk_@PGM_MAJORMINOR@_la-pgmgtk.lo: pgmgtk.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpigment_gtk_@PGM_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT libpigment_gtk_@PGM_MAJORMINOR@_la-pgmgtk.lo -MD -MP -MF $(DEPDIR)/libpigment_gtk_@PGM_MAJORMINOR@_la-pgmgtk.Tpo -c -o libpigment_gtk_@PGM_MAJORMINOR@_la-pgmgtk.lo `test -f 'pgmgtk.c' || echo '$(srcdir)/'`pgmgtk.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpigment_gtk_@PGM_MAJORMINOR@_la-pgmgtk.Tpo $(DEPDIR)/libpigment_gtk_@PGM_MAJORMINOR@_la-pgmgtk.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pgmgtk.c' object='libpigment_gtk_@PGM_MAJORMINOR@_la-pgmgtk.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpigment_gtk_@PGM_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o libpigment_gtk_@PGM_MAJORMINOR@_la-pgmgtk.lo `test -f 'pgmgtk.c' || echo '$(srcdir)/'`pgmgtk.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-libpigment_gtk_@PGM_MAJORMINOR@_includeHEADERS: $(libpigment_gtk_@PGM_MAJORMINOR@_include_HEADERS) @$(NORMAL_INSTALL) test -z "$(libpigment_gtk_@PGM_MAJORMINOR@_includedir)" || $(MKDIR_P) "$(DESTDIR)$(libpigment_gtk_@PGM_MAJORMINOR@_includedir)" @list='$(libpigment_gtk_@PGM_MAJORMINOR@_include_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(libpigment_gtk_@PGM_MAJORMINOR@_includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(libpigment_gtk_@PGM_MAJORMINOR@_includedir)/$$f'"; \ $(libpigment_gtk_@PGM_MAJORMINOR@_includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(libpigment_gtk_@PGM_MAJORMINOR@_includedir)/$$f"; \ done uninstall-libpigment_gtk_@PGM_MAJORMINOR@_includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(libpigment_gtk_@PGM_MAJORMINOR@_include_HEADERS)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(libpigment_gtk_@PGM_MAJORMINOR@_includedir)/$$f'"; \ rm -f "$(DESTDIR)$(libpigment_gtk_@PGM_MAJORMINOR@_includedir)/$$f"; \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libpigment_gtk_@PGM_MAJORMINOR@_includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: \ install-libpigment_gtk_@PGM_MAJORMINOR@_includeHEADERS install-dvi: install-dvi-am install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES \ uninstall-libpigment_gtk_@PGM_MAJORMINOR@_includeHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES \ install-libpigment_gtk_@PGM_MAJORMINOR@_includeHEADERS \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-libLTLIBRARIES \ uninstall-libpigment_gtk_@PGM_MAJORMINOR@_includeHEADERS # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pigment-0.3.17/pgm/pgmviewportfactory.h0000644000175000017500000000670511205034416015101 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment media rendering library * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author(s): Loïc Molinari * Julien Moutte * Guillaume Emont */ #ifndef __PGM_VIEWPORT_FACTORY_H__ #define __PGM_VIEWPORT_FACTORY_H__ /* pgmviewportfactory.h and pgmviewport.h include eachother */ typedef struct _PgmViewportFactory PgmViewportFactory; typedef struct _PgmViewportFactoryClass PgmViewportFactoryClass; #include #include #include "pgmcommon.h" #include "pgmplugin.h" #include "pgmviewport.h" #include "pgmmodule.h" G_BEGIN_DECLS #define PGM_TYPE_VIEWPORT_FACTORY (pgm_viewport_factory_get_type ()) #define PGM_VIEWPORT_FACTORY(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), PGM_TYPE_VIEWPORT_FACTORY, PgmViewportFactory)) #define PGM_VIEWPORT_FACTORY_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), PGM_TYPE_VIEWPORT_FACTORY, PgmViewportFactoryClass)) #define PGM_IS_VIEWPORT_FACTORY(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), PGM_TYPE_VIEWPORT_FACTORY)) #define PGM_IS_VIEWPORT_FACTORY_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), PGM_TYPE_VIEWPORT_FACTORY)) #define PGM_VIEWPORT_FACTORY_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS((obj), PGM_TYPE_VIEWPORT_FACTORY, PgmViewportFactoryClass)) /** * PgmViewportFactory: * @module: the dynamically loaded plugin. * @plugin_desc: the viewport plugin description. * * The #PgmViewportFactory opaque structure. */ struct _PgmViewportFactory { /*< private >*/ GstObject parent; PgmModule *module; }; struct _PgmViewportFactoryClass { GstObjectClass parent_class; }; GType pgm_viewport_factory_get_type (void); PgmViewportFactory *pgm_viewport_factory_new (const gchar *name); PgmError pgm_viewport_factory_get_description (PgmViewportFactory *factory, gchar **description); PgmError pgm_viewport_factory_get_license (PgmViewportFactory *factory, gchar **license); PgmError pgm_viewport_factory_get_origin (PgmViewportFactory *factory, gchar **origin); PgmError pgm_viewport_factory_get_author (PgmViewportFactory *factory, gchar **author); PgmError pgm_viewport_factory_create (PgmViewportFactory *factory, PgmViewport **viewport); PgmError pgm_viewport_factory_make (const gchar *name, PgmViewport **viewport); G_END_DECLS #endif /* __PGM_VIEWPORT_FACTORY_H__ */ pigment-0.3.17/pgm/pgmkeysyms.h0000644000175000017500000015000111205034416013323 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment media rendering library * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari * * Based on the gdkkeysyms.h file which is auto-generated from the * XOrg http://cvs.freedesktop.org/xorg/xc/include/keysymdef.h file. */ #ifndef __PGM_KEYSYMS_H__ #define __PGM_KEYSYMS_H__ #define PGM_VoidSymbol 0xffffff #define PGM_BackSpace 0xff08 #define PGM_Tab 0xff09 #define PGM_Linefeed 0xff0a #define PGM_Clear 0xff0b #define PGM_Return 0xff0d #define PGM_Pause 0xff13 #define PGM_Scroll_Lock 0xff14 #define PGM_Sys_Req 0xff15 #define PGM_Escape 0xff1b #define PGM_Delete 0xffff #define PGM_Multi_key 0xff20 #define PGM_Codeinput 0xff37 #define PGM_SingleCandidate 0xff3c #define PGM_MultipleCandidate 0xff3d #define PGM_PreviousCandidate 0xff3e #define PGM_Kanji 0xff21 #define PGM_Muhenkan 0xff22 #define PGM_Henkan_Mode 0xff23 #define PGM_Henkan 0xff23 #define PGM_Romaji 0xff24 #define PGM_Hiragana 0xff25 #define PGM_Katakana 0xff26 #define PGM_Hiragana_Katakana 0xff27 #define PGM_Zenkaku 0xff28 #define PGM_Hankaku 0xff29 #define PGM_Zenkaku_Hankaku 0xff2a #define PGM_Touroku 0xff2b #define PGM_Massyo 0xff2c #define PGM_Kana_Lock 0xff2d #define PGM_Kana_Shift 0xff2e #define PGM_Eisu_Shift 0xff2f #define PGM_Eisu_toggle 0xff30 #define PGM_Kanji_Bangou 0xff37 #define PGM_Zen_Koho 0xff3d #define PGM_Mae_Koho 0xff3e #define PGM_Home 0xff50 #define PGM_Left 0xff51 #define PGM_Up 0xff52 #define PGM_Right 0xff53 #define PGM_Down 0xff54 #define PGM_Prior 0xff55 #define PGM_Page_Up 0xff55 #define PGM_Next 0xff56 #define PGM_Page_Down 0xff56 #define PGM_End 0xff57 #define PGM_Begin 0xff58 #define PGM_Select 0xff60 #define PGM_Print 0xff61 #define PGM_Execute 0xff62 #define PGM_Insert 0xff63 #define PGM_Undo 0xff65 #define PGM_Redo 0xff66 #define PGM_Menu 0xff67 #define PGM_Find 0xff68 #define PGM_Cancel 0xff69 #define PGM_Help 0xff6a #define PGM_Break 0xff6b #define PGM_Mode_switch 0xff7e #define PGM_script_switch 0xff7e #define PGM_Num_Lock 0xff7f #define PGM_KP_Space 0xff80 #define PGM_KP_Tab 0xff89 #define PGM_KP_Enter 0xff8d #define PGM_KP_F1 0xff91 #define PGM_KP_F2 0xff92 #define PGM_KP_F3 0xff93 #define PGM_KP_F4 0xff94 #define PGM_KP_Home 0xff95 #define PGM_KP_Left 0xff96 #define PGM_KP_Up 0xff97 #define PGM_KP_Right 0xff98 #define PGM_KP_Down 0xff99 #define PGM_KP_Prior 0xff9a #define PGM_KP_Page_Up 0xff9a #define PGM_KP_Next 0xff9b #define PGM_KP_Page_Down 0xff9b #define PGM_KP_End 0xff9c #define PGM_KP_Begin 0xff9d #define PGM_KP_Insert 0xff9e #define PGM_KP_Delete 0xff9f #define PGM_KP_Equal 0xffbd #define PGM_KP_Multiply 0xffaa #define PGM_KP_Add 0xffab #define PGM_KP_Separator 0xffac #define PGM_KP_Subtract 0xffad #define PGM_KP_Decimal 0xffae #define PGM_KP_Divide 0xffaf #define PGM_KP_0 0xffb0 #define PGM_KP_1 0xffb1 #define PGM_KP_2 0xffb2 #define PGM_KP_3 0xffb3 #define PGM_KP_4 0xffb4 #define PGM_KP_5 0xffb5 #define PGM_KP_6 0xffb6 #define PGM_KP_7 0xffb7 #define PGM_KP_8 0xffb8 #define PGM_KP_9 0xffb9 #define PGM_F1 0xffbe #define PGM_F2 0xffbf #define PGM_F3 0xffc0 #define PGM_F4 0xffc1 #define PGM_F5 0xffc2 #define PGM_F6 0xffc3 #define PGM_F7 0xffc4 #define PGM_F8 0xffc5 #define PGM_F9 0xffc6 #define PGM_F10 0xffc7 #define PGM_F11 0xffc8 #define PGM_L1 0xffc8 #define PGM_F12 0xffc9 #define PGM_L2 0xffc9 #define PGM_F13 0xffca #define PGM_L3 0xffca #define PGM_F14 0xffcb #define PGM_L4 0xffcb #define PGM_F15 0xffcc #define PGM_L5 0xffcc #define PGM_F16 0xffcd #define PGM_L6 0xffcd #define PGM_F17 0xffce #define PGM_L7 0xffce #define PGM_F18 0xffcf #define PGM_L8 0xffcf #define PGM_F19 0xffd0 #define PGM_L9 0xffd0 #define PGM_F20 0xffd1 #define PGM_L10 0xffd1 #define PGM_F21 0xffd2 #define PGM_R1 0xffd2 #define PGM_F22 0xffd3 #define PGM_R2 0xffd3 #define PGM_F23 0xffd4 #define PGM_R3 0xffd4 #define PGM_F24 0xffd5 #define PGM_R4 0xffd5 #define PGM_F25 0xffd6 #define PGM_R5 0xffd6 #define PGM_F26 0xffd7 #define PGM_R6 0xffd7 #define PGM_F27 0xffd8 #define PGM_R7 0xffd8 #define PGM_F28 0xffd9 #define PGM_R8 0xffd9 #define PGM_F29 0xffda #define PGM_R9 0xffda #define PGM_F30 0xffdb #define PGM_R10 0xffdb #define PGM_F31 0xffdc #define PGM_R11 0xffdc #define PGM_F32 0xffdd #define PGM_R12 0xffdd #define PGM_F33 0xffde #define PGM_R13 0xffde #define PGM_F34 0xffdf #define PGM_R14 0xffdf #define PGM_F35 0xffe0 #define PGM_R15 0xffe0 #define PGM_Shift_L 0xffe1 #define PGM_Shift_R 0xffe2 #define PGM_Control_L 0xffe3 #define PGM_Control_R 0xffe4 #define PGM_Caps_Lock 0xffe5 #define PGM_Shift_Lock 0xffe6 #define PGM_Meta_L 0xffe7 #define PGM_Meta_R 0xffe8 #define PGM_Alt_L 0xffe9 #define PGM_Alt_R 0xffea #define PGM_Super_L 0xffeb #define PGM_Super_R 0xffec #define PGM_Hyper_L 0xffed #define PGM_Hyper_R 0xffee #define PGM_ISO_Lock 0xfe01 #define PGM_ISO_Level2_Latch 0xfe02 #define PGM_ISO_Level3_Shift 0xfe03 #define PGM_ISO_Level3_Latch 0xfe04 #define PGM_ISO_Level3_Lock 0xfe05 #define PGM_ISO_Group_Shift 0xff7e #define PGM_ISO_Group_Latch 0xfe06 #define PGM_ISO_Group_Lock 0xfe07 #define PGM_ISO_Next_Group 0xfe08 #define PGM_ISO_Next_Group_Lock 0xfe09 #define PGM_ISO_Prev_Group 0xfe0a #define PGM_ISO_Prev_Group_Lock 0xfe0b #define PGM_ISO_First_Group 0xfe0c #define PGM_ISO_First_Group_Lock 0xfe0d #define PGM_ISO_Last_Group 0xfe0e #define PGM_ISO_Last_Group_Lock 0xfe0f #define PGM_ISO_Left_Tab 0xfe20 #define PGM_ISO_Move_Line_Up 0xfe21 #define PGM_ISO_Move_Line_Down 0xfe22 #define PGM_ISO_Partial_Line_Up 0xfe23 #define PGM_ISO_Partial_Line_Down 0xfe24 #define PGM_ISO_Partial_Space_Left 0xfe25 #define PGM_ISO_Partial_Space_Right 0xfe26 #define PGM_ISO_Set_Margin_Left 0xfe27 #define PGM_ISO_Set_Margin_Right 0xfe28 #define PGM_ISO_Release_Margin_Left 0xfe29 #define PGM_ISO_Release_Margin_Right 0xfe2a #define PGM_ISO_Release_Both_Margins 0xfe2b #define PGM_ISO_Fast_Cursor_Left 0xfe2c #define PGM_ISO_Fast_Cursor_Right 0xfe2d #define PGM_ISO_Fast_Cursor_Up 0xfe2e #define PGM_ISO_Fast_Cursor_Down 0xfe2f #define PGM_ISO_Continuous_Underline 0xfe30 #define PGM_ISO_Discontinuous_Underline 0xfe31 #define PGM_ISO_Emphasize 0xfe32 #define PGM_ISO_Center_Object 0xfe33 #define PGM_ISO_Enter 0xfe34 #define PGM_dead_grave 0xfe50 #define PGM_dead_acute 0xfe51 #define PGM_dead_circumflex 0xfe52 #define PGM_dead_tilde 0xfe53 #define PGM_dead_macron 0xfe54 #define PGM_dead_breve 0xfe55 #define PGM_dead_abovedot 0xfe56 #define PGM_dead_diaeresis 0xfe57 #define PGM_dead_abovering 0xfe58 #define PGM_dead_doubleacute 0xfe59 #define PGM_dead_caron 0xfe5a #define PGM_dead_cedilla 0xfe5b #define PGM_dead_ogonek 0xfe5c #define PGM_dead_iota 0xfe5d #define PGM_dead_voiced_sound 0xfe5e #define PGM_dead_semivoiced_sound 0xfe5f #define PGM_dead_belowdot 0xfe60 #define PGM_dead_hook 0xfe61 #define PGM_dead_horn 0xfe62 #define PGM_First_Virtual_Screen 0xfed0 #define PGM_Prev_Virtual_Screen 0xfed1 #define PGM_Next_Virtual_Screen 0xfed2 #define PGM_Last_Virtual_Screen 0xfed4 #define PGM_Terminate_Server 0xfed5 #define PGM_AccessX_Enable 0xfe70 #define PGM_AccessX_Feedback_Enable 0xfe71 #define PGM_RepeatKeys_Enable 0xfe72 #define PGM_SlowKeys_Enable 0xfe73 #define PGM_BounceKeys_Enable 0xfe74 #define PGM_StickyKeys_Enable 0xfe75 #define PGM_MouseKeys_Enable 0xfe76 #define PGM_MouseKeys_Accel_Enable 0xfe77 #define PGM_Overlay1_Enable 0xfe78 #define PGM_Overlay2_Enable 0xfe79 #define PGM_AudibleBell_Enable 0xfe7a #define PGM_Pointer_Left 0xfee0 #define PGM_Pointer_Right 0xfee1 #define PGM_Pointer_Up 0xfee2 #define PGM_Pointer_Down 0xfee3 #define PGM_Pointer_UpLeft 0xfee4 #define PGM_Pointer_UpRight 0xfee5 #define PGM_Pointer_DownLeft 0xfee6 #define PGM_Pointer_DownRight 0xfee7 #define PGM_Pointer_Button_Dflt 0xfee8 #define PGM_Pointer_Button1 0xfee9 #define PGM_Pointer_Button2 0xfeea #define PGM_Pointer_Button3 0xfeeb #define PGM_Pointer_Button4 0xfeec #define PGM_Pointer_Button5 0xfeed #define PGM_Pointer_DblClick_Dflt 0xfeee #define PGM_Pointer_DblClick1 0xfeef #define PGM_Pointer_DblClick2 0xfef0 #define PGM_Pointer_DblClick3 0xfef1 #define PGM_Pointer_DblClick4 0xfef2 #define PGM_Pointer_DblClick5 0xfef3 #define PGM_Pointer_Drag_Dflt 0xfef4 #define PGM_Pointer_Drag1 0xfef5 #define PGM_Pointer_Drag2 0xfef6 #define PGM_Pointer_Drag3 0xfef7 #define PGM_Pointer_Drag4 0xfef8 #define PGM_Pointer_Drag5 0xfefd #define PGM_Pointer_EnableKeys 0xfef9 #define PGM_Pointer_Accelerate 0xfefa #define PGM_Pointer_DfltBtnNext 0xfefb #define PGM_Pointer_DfltBtnPrev 0xfefc #define PGM_3270_Duplicate 0xfd01 #define PGM_3270_FieldMark 0xfd02 #define PGM_3270_Right2 0xfd03 #define PGM_3270_Left2 0xfd04 #define PGM_3270_BackTab 0xfd05 #define PGM_3270_EraseEOF 0xfd06 #define PGM_3270_EraseInput 0xfd07 #define PGM_3270_Reset 0xfd08 #define PGM_3270_Quit 0xfd09 #define PGM_3270_PA1 0xfd0a #define PGM_3270_PA2 0xfd0b #define PGM_3270_PA3 0xfd0c #define PGM_3270_Test 0xfd0d #define PGM_3270_Attn 0xfd0e #define PGM_3270_CursorBlink 0xfd0f #define PGM_3270_AltCursor 0xfd10 #define PGM_3270_KeyClick 0xfd11 #define PGM_3270_Jump 0xfd12 #define PGM_3270_Ident 0xfd13 #define PGM_3270_Rule 0xfd14 #define PGM_3270_Copy 0xfd15 #define PGM_3270_Play 0xfd16 #define PGM_3270_Setup 0xfd17 #define PGM_3270_Record 0xfd18 #define PGM_3270_ChangeScreen 0xfd19 #define PGM_3270_DeleteWord 0xfd1a #define PGM_3270_ExSelect 0xfd1b #define PGM_3270_CursorSelect 0xfd1c #define PGM_3270_PrintScreen 0xfd1d #define PGM_3270_Enter 0xfd1e #define PGM_space 0x020 #define PGM_exclam 0x021 #define PGM_quotedbl 0x022 #define PGM_numbersign 0x023 #define PGM_dollar 0x024 #define PGM_percent 0x025 #define PGM_ampersand 0x026 #define PGM_apostrophe 0x027 #define PGM_quoteright 0x027 #define PGM_parenleft 0x028 #define PGM_parenright 0x029 #define PGM_asterisk 0x02a #define PGM_plus 0x02b #define PGM_comma 0x02c #define PGM_minus 0x02d #define PGM_period 0x02e #define PGM_slash 0x02f #define PGM_0 0x030 #define PGM_1 0x031 #define PGM_2 0x032 #define PGM_3 0x033 #define PGM_4 0x034 #define PGM_5 0x035 #define PGM_6 0x036 #define PGM_7 0x037 #define PGM_8 0x038 #define PGM_9 0x039 #define PGM_colon 0x03a #define PGM_semicolon 0x03b #define PGM_less 0x03c #define PGM_equal 0x03d #define PGM_greater 0x03e #define PGM_question 0x03f #define PGM_at 0x040 #define PGM_A 0x041 #define PGM_B 0x042 #define PGM_C 0x043 #define PGM_D 0x044 #define PGM_E 0x045 #define PGM_F 0x046 #define PGM_G 0x047 #define PGM_H 0x048 #define PGM_I 0x049 #define PGM_J 0x04a #define PGM_K 0x04b #define PGM_L 0x04c #define PGM_M 0x04d #define PGM_N 0x04e #define PGM_O 0x04f #define PGM_P 0x050 #define PGM_Q 0x051 #define PGM_R 0x052 #define PGM_S 0x053 #define PGM_T 0x054 #define PGM_U 0x055 #define PGM_V 0x056 #define PGM_W 0x057 #define PGM_X 0x058 #define PGM_Y 0x059 #define PGM_Z 0x05a #define PGM_bracketleft 0x05b #define PGM_backslash 0x05c #define PGM_bracketright 0x05d #define PGM_asciicircum 0x05e #define PGM_underscore 0x05f #define PGM_grave 0x060 #define PGM_quoteleft 0x060 #define PGM_a 0x061 #define PGM_b 0x062 #define PGM_c 0x063 #define PGM_d 0x064 #define PGM_e 0x065 #define PGM_f 0x066 #define PGM_g 0x067 #define PGM_h 0x068 #define PGM_i 0x069 #define PGM_j 0x06a #define PGM_k 0x06b #define PGM_l 0x06c #define PGM_m 0x06d #define PGM_n 0x06e #define PGM_o 0x06f #define PGM_p 0x070 #define PGM_q 0x071 #define PGM_r 0x072 #define PGM_s 0x073 #define PGM_t 0x074 #define PGM_u 0x075 #define PGM_v 0x076 #define PGM_w 0x077 #define PGM_x 0x078 #define PGM_y 0x079 #define PGM_z 0x07a #define PGM_braceleft 0x07b #define PGM_bar 0x07c #define PGM_braceright 0x07d #define PGM_asciitilde 0x07e #define PGM_nobreakspace 0x0a0 #define PGM_exclamdown 0x0a1 #define PGM_cent 0x0a2 #define PGM_sterling 0x0a3 #define PGM_currency 0x0a4 #define PGM_yen 0x0a5 #define PGM_brokenbar 0x0a6 #define PGM_section 0x0a7 #define PGM_diaeresis 0x0a8 #define PGM_copyright 0x0a9 #define PGM_ordfeminine 0x0aa #define PGM_guillemotleft 0x0ab #define PGM_notsign 0x0ac #define PGM_hyphen 0x0ad #define PGM_registered 0x0ae #define PGM_macron 0x0af #define PGM_degree 0x0b0 #define PGM_plusminus 0x0b1 #define PGM_twosuperior 0x0b2 #define PGM_threesuperior 0x0b3 #define PGM_acute 0x0b4 #define PGM_mu 0x0b5 #define PGM_paragraph 0x0b6 #define PGM_periodcentered 0x0b7 #define PGM_cedilla 0x0b8 #define PGM_onesuperior 0x0b9 #define PGM_masculine 0x0ba #define PGM_guillemotright 0x0bb #define PGM_onequarter 0x0bc #define PGM_onehalf 0x0bd #define PGM_threequarters 0x0be #define PGM_questiondown 0x0bf #define PGM_Agrave 0x0c0 #define PGM_Aacute 0x0c1 #define PGM_Acircumflex 0x0c2 #define PGM_Atilde 0x0c3 #define PGM_Adiaeresis 0x0c4 #define PGM_Aring 0x0c5 #define PGM_AE 0x0c6 #define PGM_Ccedilla 0x0c7 #define PGM_Egrave 0x0c8 #define PGM_Eacute 0x0c9 #define PGM_Ecircumflex 0x0ca #define PGM_Ediaeresis 0x0cb #define PGM_Igrave 0x0cc #define PGM_Iacute 0x0cd #define PGM_Icircumflex 0x0ce #define PGM_Idiaeresis 0x0cf #define PGM_ETH 0x0d0 #define PGM_Eth 0x0d0 #define PGM_Ntilde 0x0d1 #define PGM_Ograve 0x0d2 #define PGM_Oacute 0x0d3 #define PGM_Ocircumflex 0x0d4 #define PGM_Otilde 0x0d5 #define PGM_Odiaeresis 0x0d6 #define PGM_multiply 0x0d7 #define PGM_Oslash 0x0d8 #define PGM_Ooblique 0x0d8 #define PGM_Ugrave 0x0d9 #define PGM_Uacute 0x0da #define PGM_Ucircumflex 0x0db #define PGM_Udiaeresis 0x0dc #define PGM_Yacute 0x0dd #define PGM_THORN 0x0de #define PGM_Thorn 0x0de #define PGM_ssharp 0x0df #define PGM_agrave 0x0e0 #define PGM_aacute 0x0e1 #define PGM_acircumflex 0x0e2 #define PGM_atilde 0x0e3 #define PGM_adiaeresis 0x0e4 #define PGM_aring 0x0e5 #define PGM_ae 0x0e6 #define PGM_ccedilla 0x0e7 #define PGM_egrave 0x0e8 #define PGM_eacute 0x0e9 #define PGM_ecircumflex 0x0ea #define PGM_ediaeresis 0x0eb #define PGM_igrave 0x0ec #define PGM_iacute 0x0ed #define PGM_icircumflex 0x0ee #define PGM_idiaeresis 0x0ef #define PGM_eth 0x0f0 #define PGM_ntilde 0x0f1 #define PGM_ograve 0x0f2 #define PGM_oacute 0x0f3 #define PGM_ocircumflex 0x0f4 #define PGM_otilde 0x0f5 #define PGM_odiaeresis 0x0f6 #define PGM_division 0x0f7 #define PGM_oslash 0x0f8 #define PGM_ooblique 0x0f8 #define PGM_ugrave 0x0f9 #define PGM_uacute 0x0fa #define PGM_ucircumflex 0x0fb #define PGM_udiaeresis 0x0fc #define PGM_yacute 0x0fd #define PGM_thorn 0x0fe #define PGM_ydiaeresis 0x0ff #define PGM_Aogonek 0x1a1 #define PGM_breve 0x1a2 #define PGM_Lstroke 0x1a3 #define PGM_Lcaron 0x1a5 #define PGM_Sacute 0x1a6 #define PGM_Scaron 0x1a9 #define PGM_Scedilla 0x1aa #define PGM_Tcaron 0x1ab #define PGM_Zacute 0x1ac #define PGM_Zcaron 0x1ae #define PGM_Zabovedot 0x1af #define PGM_aogonek 0x1b1 #define PGM_ogonek 0x1b2 #define PGM_lstroke 0x1b3 #define PGM_lcaron 0x1b5 #define PGM_sacute 0x1b6 #define PGM_caron 0x1b7 #define PGM_scaron 0x1b9 #define PGM_scedilla 0x1ba #define PGM_tcaron 0x1bb #define PGM_zacute 0x1bc #define PGM_doubleacute 0x1bd #define PGM_zcaron 0x1be #define PGM_zabovedot 0x1bf #define PGM_Racute 0x1c0 #define PGM_Abreve 0x1c3 #define PGM_Lacute 0x1c5 #define PGM_Cacute 0x1c6 #define PGM_Ccaron 0x1c8 #define PGM_Eogonek 0x1ca #define PGM_Ecaron 0x1cc #define PGM_Dcaron 0x1cf #define PGM_Dstroke 0x1d0 #define PGM_Nacute 0x1d1 #define PGM_Ncaron 0x1d2 #define PGM_Odoubleacute 0x1d5 #define PGM_Rcaron 0x1d8 #define PGM_Uring 0x1d9 #define PGM_Udoubleacute 0x1db #define PGM_Tcedilla 0x1de #define PGM_racute 0x1e0 #define PGM_abreve 0x1e3 #define PGM_lacute 0x1e5 #define PGM_cacute 0x1e6 #define PGM_ccaron 0x1e8 #define PGM_eogonek 0x1ea #define PGM_ecaron 0x1ec #define PGM_dcaron 0x1ef #define PGM_dstroke 0x1f0 #define PGM_nacute 0x1f1 #define PGM_ncaron 0x1f2 #define PGM_odoubleacute 0x1f5 #define PGM_udoubleacute 0x1fb #define PGM_rcaron 0x1f8 #define PGM_uring 0x1f9 #define PGM_tcedilla 0x1fe #define PGM_abovedot 0x1ff #define PGM_Hstroke 0x2a1 #define PGM_Hcircumflex 0x2a6 #define PGM_Iabovedot 0x2a9 #define PGM_Gbreve 0x2ab #define PGM_Jcircumflex 0x2ac #define PGM_hstroke 0x2b1 #define PGM_hcircumflex 0x2b6 #define PGM_idotless 0x2b9 #define PGM_gbreve 0x2bb #define PGM_jcircumflex 0x2bc #define PGM_Cabovedot 0x2c5 #define PGM_Ccircumflex 0x2c6 #define PGM_Gabovedot 0x2d5 #define PGM_Gcircumflex 0x2d8 #define PGM_Ubreve 0x2dd #define PGM_Scircumflex 0x2de #define PGM_cabovedot 0x2e5 #define PGM_ccircumflex 0x2e6 #define PGM_gabovedot 0x2f5 #define PGM_gcircumflex 0x2f8 #define PGM_ubreve 0x2fd #define PGM_scircumflex 0x2fe #define PGM_kra 0x3a2 #define PGM_kappa 0x3a2 #define PGM_Rcedilla 0x3a3 #define PGM_Itilde 0x3a5 #define PGM_Lcedilla 0x3a6 #define PGM_Emacron 0x3aa #define PGM_Gcedilla 0x3ab #define PGM_Tslash 0x3ac #define PGM_rcedilla 0x3b3 #define PGM_itilde 0x3b5 #define PGM_lcedilla 0x3b6 #define PGM_emacron 0x3ba #define PGM_gcedilla 0x3bb #define PGM_tslash 0x3bc #define PGM_ENG 0x3bd #define PGM_eng 0x3bf #define PGM_Amacron 0x3c0 #define PGM_Iogonek 0x3c7 #define PGM_Eabovedot 0x3cc #define PGM_Imacron 0x3cf #define PGM_Ncedilla 0x3d1 #define PGM_Omacron 0x3d2 #define PGM_Kcedilla 0x3d3 #define PGM_Uogonek 0x3d9 #define PGM_Utilde 0x3dd #define PGM_Umacron 0x3de #define PGM_amacron 0x3e0 #define PGM_iogonek 0x3e7 #define PGM_eabovedot 0x3ec #define PGM_imacron 0x3ef #define PGM_ncedilla 0x3f1 #define PGM_omacron 0x3f2 #define PGM_kcedilla 0x3f3 #define PGM_uogonek 0x3f9 #define PGM_utilde 0x3fd #define PGM_umacron 0x3fe #define PGM_Babovedot 0x1001e02 #define PGM_babovedot 0x1001e03 #define PGM_Dabovedot 0x1001e0a #define PGM_Wgrave 0x1001e80 #define PGM_Wacute 0x1001e82 #define PGM_dabovedot 0x1001e0b #define PGM_Ygrave 0x1001ef2 #define PGM_Fabovedot 0x1001e1e #define PGM_fabovedot 0x1001e1f #define PGM_Mabovedot 0x1001e40 #define PGM_mabovedot 0x1001e41 #define PGM_Pabovedot 0x1001e56 #define PGM_wgrave 0x1001e81 #define PGM_pabovedot 0x1001e57 #define PGM_wacute 0x1001e83 #define PGM_Sabovedot 0x1001e60 #define PGM_ygrave 0x1001ef3 #define PGM_Wdiaeresis 0x1001e84 #define PGM_wdiaeresis 0x1001e85 #define PGM_sabovedot 0x1001e61 #define PGM_Wcircumflex 0x1000174 #define PGM_Tabovedot 0x1001e6a #define PGM_Ycircumflex 0x1000176 #define PGM_wcircumflex 0x1000175 #define PGM_tabovedot 0x1001e6b #define PGM_ycircumflex 0x1000177 #define PGM_OE 0x13bc #define PGM_oe 0x13bd #define PGM_Ydiaeresis 0x13be #define PGM_overline 0x47e #define PGM_kana_fullstop 0x4a1 #define PGM_kana_openingbracket 0x4a2 #define PGM_kana_closingbracket 0x4a3 #define PGM_kana_comma 0x4a4 #define PGM_kana_conjunctive 0x4a5 #define PGM_kana_middledot 0x4a5 #define PGM_kana_WO 0x4a6 #define PGM_kana_a 0x4a7 #define PGM_kana_i 0x4a8 #define PGM_kana_u 0x4a9 #define PGM_kana_e 0x4aa #define PGM_kana_o 0x4ab #define PGM_kana_ya 0x4ac #define PGM_kana_yu 0x4ad #define PGM_kana_yo 0x4ae #define PGM_kana_tsu 0x4af #define PGM_kana_tu 0x4af #define PGM_prolongedsound 0x4b0 #define PGM_kana_A 0x4b1 #define PGM_kana_I 0x4b2 #define PGM_kana_U 0x4b3 #define PGM_kana_E 0x4b4 #define PGM_kana_O 0x4b5 #define PGM_kana_KA 0x4b6 #define PGM_kana_KI 0x4b7 #define PGM_kana_KU 0x4b8 #define PGM_kana_KE 0x4b9 #define PGM_kana_KO 0x4ba #define PGM_kana_SA 0x4bb #define PGM_kana_SHI 0x4bc #define PGM_kana_SU 0x4bd #define PGM_kana_SE 0x4be #define PGM_kana_SO 0x4bf #define PGM_kana_TA 0x4c0 #define PGM_kana_CHI 0x4c1 #define PGM_kana_TI 0x4c1 #define PGM_kana_TSU 0x4c2 #define PGM_kana_TU 0x4c2 #define PGM_kana_TE 0x4c3 #define PGM_kana_TO 0x4c4 #define PGM_kana_NA 0x4c5 #define PGM_kana_NI 0x4c6 #define PGM_kana_NU 0x4c7 #define PGM_kana_NE 0x4c8 #define PGM_kana_NO 0x4c9 #define PGM_kana_HA 0x4ca #define PGM_kana_HI 0x4cb #define PGM_kana_FU 0x4cc #define PGM_kana_HU 0x4cc #define PGM_kana_HE 0x4cd #define PGM_kana_HO 0x4ce #define PGM_kana_MA 0x4cf #define PGM_kana_MI 0x4d0 #define PGM_kana_MU 0x4d1 #define PGM_kana_ME 0x4d2 #define PGM_kana_MO 0x4d3 #define PGM_kana_YA 0x4d4 #define PGM_kana_YU 0x4d5 #define PGM_kana_YO 0x4d6 #define PGM_kana_RA 0x4d7 #define PGM_kana_RI 0x4d8 #define PGM_kana_RU 0x4d9 #define PGM_kana_RE 0x4da #define PGM_kana_RO 0x4db #define PGM_kana_WA 0x4dc #define PGM_kana_N 0x4dd #define PGM_voicedsound 0x4de #define PGM_semivoicedsound 0x4df #define PGM_kana_switch 0xff7e #define PGM_Farsi_0 0x10006f0 #define PGM_Farsi_1 0x10006f1 #define PGM_Farsi_2 0x10006f2 #define PGM_Farsi_3 0x10006f3 #define PGM_Farsi_4 0x10006f4 #define PGM_Farsi_5 0x10006f5 #define PGM_Farsi_6 0x10006f6 #define PGM_Farsi_7 0x10006f7 #define PGM_Farsi_8 0x10006f8 #define PGM_Farsi_9 0x10006f9 #define PGM_Arabic_percent 0x100066a #define PGM_Arabic_superscript_alef 0x1000670 #define PGM_Arabic_tteh 0x1000679 #define PGM_Arabic_peh 0x100067e #define PGM_Arabic_tcheh 0x1000686 #define PGM_Arabic_ddal 0x1000688 #define PGM_Arabic_rreh 0x1000691 #define PGM_Arabic_comma 0x5ac #define PGM_Arabic_fullstop 0x10006d4 #define PGM_Arabic_0 0x1000660 #define PGM_Arabic_1 0x1000661 #define PGM_Arabic_2 0x1000662 #define PGM_Arabic_3 0x1000663 #define PGM_Arabic_4 0x1000664 #define PGM_Arabic_5 0x1000665 #define PGM_Arabic_6 0x1000666 #define PGM_Arabic_7 0x1000667 #define PGM_Arabic_8 0x1000668 #define PGM_Arabic_9 0x1000669 #define PGM_Arabic_semicolon 0x5bb #define PGM_Arabic_question_mark 0x5bf #define PGM_Arabic_hamza 0x5c1 #define PGM_Arabic_maddaonalef 0x5c2 #define PGM_Arabic_hamzaonalef 0x5c3 #define PGM_Arabic_hamzaonwaw 0x5c4 #define PGM_Arabic_hamzaunderalef 0x5c5 #define PGM_Arabic_hamzaonyeh 0x5c6 #define PGM_Arabic_alef 0x5c7 #define PGM_Arabic_beh 0x5c8 #define PGM_Arabic_tehmarbuta 0x5c9 #define PGM_Arabic_teh 0x5ca #define PGM_Arabic_theh 0x5cb #define PGM_Arabic_jeem 0x5cc #define PGM_Arabic_hah 0x5cd #define PGM_Arabic_khah 0x5ce #define PGM_Arabic_dal 0x5cf #define PGM_Arabic_thal 0x5d0 #define PGM_Arabic_ra 0x5d1 #define PGM_Arabic_zain 0x5d2 #define PGM_Arabic_seen 0x5d3 #define PGM_Arabic_sheen 0x5d4 #define PGM_Arabic_sad 0x5d5 #define PGM_Arabic_dad 0x5d6 #define PGM_Arabic_tah 0x5d7 #define PGM_Arabic_zah 0x5d8 #define PGM_Arabic_ain 0x5d9 #define PGM_Arabic_ghain 0x5da #define PGM_Arabic_tatweel 0x5e0 #define PGM_Arabic_feh 0x5e1 #define PGM_Arabic_qaf 0x5e2 #define PGM_Arabic_kaf 0x5e3 #define PGM_Arabic_lam 0x5e4 #define PGM_Arabic_meem 0x5e5 #define PGM_Arabic_noon 0x5e6 #define PGM_Arabic_ha 0x5e7 #define PGM_Arabic_heh 0x5e7 #define PGM_Arabic_waw 0x5e8 #define PGM_Arabic_alefmaksura 0x5e9 #define PGM_Arabic_yeh 0x5ea #define PGM_Arabic_fathatan 0x5eb #define PGM_Arabic_dammatan 0x5ec #define PGM_Arabic_kasratan 0x5ed #define PGM_Arabic_fatha 0x5ee #define PGM_Arabic_damma 0x5ef #define PGM_Arabic_kasra 0x5f0 #define PGM_Arabic_shadda 0x5f1 #define PGM_Arabic_sukun 0x5f2 #define PGM_Arabic_madda_above 0x1000653 #define PGM_Arabic_hamza_above 0x1000654 #define PGM_Arabic_hamza_below 0x1000655 #define PGM_Arabic_jeh 0x1000698 #define PGM_Arabic_veh 0x10006a4 #define PGM_Arabic_keheh 0x10006a9 #define PGM_Arabic_gaf 0x10006af #define PGM_Arabic_noon_ghunna 0x10006ba #define PGM_Arabic_heh_doachashmee 0x10006be #define PGM_Farsi_yeh 0x10006cc #define PGM_Arabic_farsi_yeh 0x10006cc #define PGM_Arabic_yeh_baree 0x10006d2 #define PGM_Arabic_heh_goal 0x10006c1 #define PGM_Arabic_switch 0xff7e #define PGM_Cyrillic_GHE_bar 0x1000492 #define PGM_Cyrillic_ghe_bar 0x1000493 #define PGM_Cyrillic_ZHE_descender 0x1000496 #define PGM_Cyrillic_zhe_descender 0x1000497 #define PGM_Cyrillic_KA_descender 0x100049a #define PGM_Cyrillic_ka_descender 0x100049b #define PGM_Cyrillic_KA_vertstroke 0x100049c #define PGM_Cyrillic_ka_vertstroke 0x100049d #define PGM_Cyrillic_EN_descender 0x10004a2 #define PGM_Cyrillic_en_descender 0x10004a3 #define PGM_Cyrillic_U_straight 0x10004ae #define PGM_Cyrillic_u_straight 0x10004af #define PGM_Cyrillic_U_straight_bar 0x10004b0 #define PGM_Cyrillic_u_straight_bar 0x10004b1 #define PGM_Cyrillic_HA_descender 0x10004b2 #define PGM_Cyrillic_ha_descender 0x10004b3 #define PGM_Cyrillic_CHE_descender 0x10004b6 #define PGM_Cyrillic_che_descender 0x10004b7 #define PGM_Cyrillic_CHE_vertstroke 0x10004b8 #define PGM_Cyrillic_che_vertstroke 0x10004b9 #define PGM_Cyrillic_SHHA 0x10004ba #define PGM_Cyrillic_shha 0x10004bb #define PGM_Cyrillic_SCHWA 0x10004d8 #define PGM_Cyrillic_schwa 0x10004d9 #define PGM_Cyrillic_I_macron 0x10004e2 #define PGM_Cyrillic_i_macron 0x10004e3 #define PGM_Cyrillic_O_bar 0x10004e8 #define PGM_Cyrillic_o_bar 0x10004e9 #define PGM_Cyrillic_U_macron 0x10004ee #define PGM_Cyrillic_u_macron 0x10004ef #define PGM_Serbian_dje 0x6a1 #define PGM_Macedonia_gje 0x6a2 #define PGM_Cyrillic_io 0x6a3 #define PGM_Ukrainian_ie 0x6a4 #define PGM_Ukranian_je 0x6a4 #define PGM_Macedonia_dse 0x6a5 #define PGM_Ukrainian_i 0x6a6 #define PGM_Ukranian_i 0x6a6 #define PGM_Ukrainian_yi 0x6a7 #define PGM_Ukranian_yi 0x6a7 #define PGM_Cyrillic_je 0x6a8 #define PGM_Serbian_je 0x6a8 #define PGM_Cyrillic_lje 0x6a9 #define PGM_Serbian_lje 0x6a9 #define PGM_Cyrillic_nje 0x6aa #define PGM_Serbian_nje 0x6aa #define PGM_Serbian_tshe 0x6ab #define PGM_Macedonia_kje 0x6ac #define PGM_Ukrainian_ghe_with_upturn 0x6ad #define PGM_Byelorussian_shortu 0x6ae #define PGM_Cyrillic_dzhe 0x6af #define PGM_Serbian_dze 0x6af #define PGM_numerosign 0x6b0 #define PGM_Serbian_DJE 0x6b1 #define PGM_Macedonia_GJE 0x6b2 #define PGM_Cyrillic_IO 0x6b3 #define PGM_Ukrainian_IE 0x6b4 #define PGM_Ukranian_JE 0x6b4 #define PGM_Macedonia_DSE 0x6b5 #define PGM_Ukrainian_I 0x6b6 #define PGM_Ukranian_I 0x6b6 #define PGM_Ukrainian_YI 0x6b7 #define PGM_Ukranian_YI 0x6b7 #define PGM_Cyrillic_JE 0x6b8 #define PGM_Serbian_JE 0x6b8 #define PGM_Cyrillic_LJE 0x6b9 #define PGM_Serbian_LJE 0x6b9 #define PGM_Cyrillic_NJE 0x6ba #define PGM_Serbian_NJE 0x6ba #define PGM_Serbian_TSHE 0x6bb #define PGM_Macedonia_KJE 0x6bc #define PGM_Ukrainian_GHE_WITH_UPTURN 0x6bd #define PGM_Byelorussian_SHORTU 0x6be #define PGM_Cyrillic_DZHE 0x6bf #define PGM_Serbian_DZE 0x6bf #define PGM_Cyrillic_yu 0x6c0 #define PGM_Cyrillic_a 0x6c1 #define PGM_Cyrillic_be 0x6c2 #define PGM_Cyrillic_tse 0x6c3 #define PGM_Cyrillic_de 0x6c4 #define PGM_Cyrillic_ie 0x6c5 #define PGM_Cyrillic_ef 0x6c6 #define PGM_Cyrillic_ghe 0x6c7 #define PGM_Cyrillic_ha 0x6c8 #define PGM_Cyrillic_i 0x6c9 #define PGM_Cyrillic_shorti 0x6ca #define PGM_Cyrillic_ka 0x6cb #define PGM_Cyrillic_el 0x6cc #define PGM_Cyrillic_em 0x6cd #define PGM_Cyrillic_en 0x6ce #define PGM_Cyrillic_o 0x6cf #define PGM_Cyrillic_pe 0x6d0 #define PGM_Cyrillic_ya 0x6d1 #define PGM_Cyrillic_er 0x6d2 #define PGM_Cyrillic_es 0x6d3 #define PGM_Cyrillic_te 0x6d4 #define PGM_Cyrillic_u 0x6d5 #define PGM_Cyrillic_zhe 0x6d6 #define PGM_Cyrillic_ve 0x6d7 #define PGM_Cyrillic_softsign 0x6d8 #define PGM_Cyrillic_yeru 0x6d9 #define PGM_Cyrillic_ze 0x6da #define PGM_Cyrillic_sha 0x6db #define PGM_Cyrillic_e 0x6dc #define PGM_Cyrillic_shcha 0x6dd #define PGM_Cyrillic_che 0x6de #define PGM_Cyrillic_hardsign 0x6df #define PGM_Cyrillic_YU 0x6e0 #define PGM_Cyrillic_A 0x6e1 #define PGM_Cyrillic_BE 0x6e2 #define PGM_Cyrillic_TSE 0x6e3 #define PGM_Cyrillic_DE 0x6e4 #define PGM_Cyrillic_IE 0x6e5 #define PGM_Cyrillic_EF 0x6e6 #define PGM_Cyrillic_GHE 0x6e7 #define PGM_Cyrillic_HA 0x6e8 #define PGM_Cyrillic_I 0x6e9 #define PGM_Cyrillic_SHORTI 0x6ea #define PGM_Cyrillic_KA 0x6eb #define PGM_Cyrillic_EL 0x6ec #define PGM_Cyrillic_EM 0x6ed #define PGM_Cyrillic_EN 0x6ee #define PGM_Cyrillic_O 0x6ef #define PGM_Cyrillic_PE 0x6f0 #define PGM_Cyrillic_YA 0x6f1 #define PGM_Cyrillic_ER 0x6f2 #define PGM_Cyrillic_ES 0x6f3 #define PGM_Cyrillic_TE 0x6f4 #define PGM_Cyrillic_U 0x6f5 #define PGM_Cyrillic_ZHE 0x6f6 #define PGM_Cyrillic_VE 0x6f7 #define PGM_Cyrillic_SOFTSIGN 0x6f8 #define PGM_Cyrillic_YERU 0x6f9 #define PGM_Cyrillic_ZE 0x6fa #define PGM_Cyrillic_SHA 0x6fb #define PGM_Cyrillic_E 0x6fc #define PGM_Cyrillic_SHCHA 0x6fd #define PGM_Cyrillic_CHE 0x6fe #define PGM_Cyrillic_HARDSIGN 0x6ff #define PGM_Greek_ALPHAaccent 0x7a1 #define PGM_Greek_EPSILONaccent 0x7a2 #define PGM_Greek_ETAaccent 0x7a3 #define PGM_Greek_IOTAaccent 0x7a4 #define PGM_Greek_IOTAdieresis 0x7a5 #define PGM_Greek_IOTAdiaeresis 0x7a5 #define PGM_Greek_OMICRONaccent 0x7a7 #define PGM_Greek_UPSILONaccent 0x7a8 #define PGM_Greek_UPSILONdieresis 0x7a9 #define PGM_Greek_OMEGAaccent 0x7ab #define PGM_Greek_accentdieresis 0x7ae #define PGM_Greek_horizbar 0x7af #define PGM_Greek_alphaaccent 0x7b1 #define PGM_Greek_epsilonaccent 0x7b2 #define PGM_Greek_etaaccent 0x7b3 #define PGM_Greek_iotaaccent 0x7b4 #define PGM_Greek_iotadieresis 0x7b5 #define PGM_Greek_iotaaccentdieresis 0x7b6 #define PGM_Greek_omicronaccent 0x7b7 #define PGM_Greek_upsilonaccent 0x7b8 #define PGM_Greek_upsilondieresis 0x7b9 #define PGM_Greek_upsilonaccentdieresis 0x7ba #define PGM_Greek_omegaaccent 0x7bb #define PGM_Greek_ALPHA 0x7c1 #define PGM_Greek_BETA 0x7c2 #define PGM_Greek_GAMMA 0x7c3 #define PGM_Greek_DELTA 0x7c4 #define PGM_Greek_EPSILON 0x7c5 #define PGM_Greek_ZETA 0x7c6 #define PGM_Greek_ETA 0x7c7 #define PGM_Greek_THETA 0x7c8 #define PGM_Greek_IOTA 0x7c9 #define PGM_Greek_KAPPA 0x7ca #define PGM_Greek_LAMDA 0x7cb #define PGM_Greek_LAMBDA 0x7cb #define PGM_Greek_MU 0x7cc #define PGM_Greek_NU 0x7cd #define PGM_Greek_XI 0x7ce #define PGM_Greek_OMICRON 0x7cf #define PGM_Greek_PI 0x7d0 #define PGM_Greek_RHO 0x7d1 #define PGM_Greek_SIGMA 0x7d2 #define PGM_Greek_TAU 0x7d4 #define PGM_Greek_UPSILON 0x7d5 #define PGM_Greek_PHI 0x7d6 #define PGM_Greek_CHI 0x7d7 #define PGM_Greek_PSI 0x7d8 #define PGM_Greek_OMEGA 0x7d9 #define PGM_Greek_alpha 0x7e1 #define PGM_Greek_beta 0x7e2 #define PGM_Greek_gamma 0x7e3 #define PGM_Greek_delta 0x7e4 #define PGM_Greek_epsilon 0x7e5 #define PGM_Greek_zeta 0x7e6 #define PGM_Greek_eta 0x7e7 #define PGM_Greek_theta 0x7e8 #define PGM_Greek_iota 0x7e9 #define PGM_Greek_kappa 0x7ea #define PGM_Greek_lamda 0x7eb #define PGM_Greek_lambda 0x7eb #define PGM_Greek_mu 0x7ec #define PGM_Greek_nu 0x7ed #define PGM_Greek_xi 0x7ee #define PGM_Greek_omicron 0x7ef #define PGM_Greek_pi 0x7f0 #define PGM_Greek_rho 0x7f1 #define PGM_Greek_sigma 0x7f2 #define PGM_Greek_finalsmallsigma 0x7f3 #define PGM_Greek_tau 0x7f4 #define PGM_Greek_upsilon 0x7f5 #define PGM_Greek_phi 0x7f6 #define PGM_Greek_chi 0x7f7 #define PGM_Greek_psi 0x7f8 #define PGM_Greek_omega 0x7f9 #define PGM_Greek_switch 0xff7e #define PGM_leftradical 0x8a1 #define PGM_topleftradical 0x8a2 #define PGM_horizconnector 0x8a3 #define PGM_topintegral 0x8a4 #define PGM_botintegral 0x8a5 #define PGM_vertconnector 0x8a6 #define PGM_topleftsqbracket 0x8a7 #define PGM_botleftsqbracket 0x8a8 #define PGM_toprightsqbracket 0x8a9 #define PGM_botrightsqbracket 0x8aa #define PGM_topleftparens 0x8ab #define PGM_botleftparens 0x8ac #define PGM_toprightparens 0x8ad #define PGM_botrightparens 0x8ae #define PGM_leftmiddlecurlybrace 0x8af #define PGM_rightmiddlecurlybrace 0x8b0 #define PGM_topleftsummation 0x8b1 #define PGM_botleftsummation 0x8b2 #define PGM_topvertsummationconnector 0x8b3 #define PGM_botvertsummationconnector 0x8b4 #define PGM_toprightsummation 0x8b5 #define PGM_botrightsummation 0x8b6 #define PGM_rightmiddlesummation 0x8b7 #define PGM_lessthanequal 0x8bc #define PGM_notequal 0x8bd #define PGM_greaterthanequal 0x8be #define PGM_integral 0x8bf #define PGM_therefore 0x8c0 #define PGM_variation 0x8c1 #define PGM_infinity 0x8c2 #define PGM_nabla 0x8c5 #define PGM_approximate 0x8c8 #define PGM_similarequal 0x8c9 #define PGM_ifonlyif 0x8cd #define PGM_implies 0x8ce #define PGM_identical 0x8cf #define PGM_radical 0x8d6 #define PGM_includedin 0x8da #define PGM_includes 0x8db #define PGM_intersection 0x8dc #define PGM_union 0x8dd #define PGM_logicaland 0x8de #define PGM_logicalor 0x8df #define PGM_partialderivative 0x8ef #define PGM_function 0x8f6 #define PGM_leftarrow 0x8fb #define PGM_uparrow 0x8fc #define PGM_rightarrow 0x8fd #define PGM_downarrow 0x8fe #define PGM_blank 0x9df #define PGM_soliddiamond 0x9e0 #define PGM_checkerboard 0x9e1 #define PGM_ht 0x9e2 #define PGM_ff 0x9e3 #define PGM_cr 0x9e4 #define PGM_lf 0x9e5 #define PGM_nl 0x9e8 #define PGM_vt 0x9e9 #define PGM_lowrightcorner 0x9ea #define PGM_uprightcorner 0x9eb #define PGM_upleftcorner 0x9ec #define PGM_lowleftcorner 0x9ed #define PGM_crossinglines 0x9ee #define PGM_horizlinescan1 0x9ef #define PGM_horizlinescan3 0x9f0 #define PGM_horizlinescan5 0x9f1 #define PGM_horizlinescan7 0x9f2 #define PGM_horizlinescan9 0x9f3 #define PGM_leftt 0x9f4 #define PGM_rightt 0x9f5 #define PGM_bott 0x9f6 #define PGM_topt 0x9f7 #define PGM_vertbar 0x9f8 #define PGM_emspace 0xaa1 #define PGM_enspace 0xaa2 #define PGM_em3space 0xaa3 #define PGM_em4space 0xaa4 #define PGM_digitspace 0xaa5 #define PGM_punctspace 0xaa6 #define PGM_thinspace 0xaa7 #define PGM_hairspace 0xaa8 #define PGM_emdash 0xaa9 #define PGM_endash 0xaaa #define PGM_signifblank 0xaac #define PGM_ellipsis 0xaae #define PGM_doubbaselinedot 0xaaf #define PGM_onethird 0xab0 #define PGM_twothirds 0xab1 #define PGM_onefifth 0xab2 #define PGM_twofifths 0xab3 #define PGM_threefifths 0xab4 #define PGM_fourfifths 0xab5 #define PGM_onesixth 0xab6 #define PGM_fivesixths 0xab7 #define PGM_careof 0xab8 #define PGM_figdash 0xabb #define PGM_leftanglebracket 0xabc #define PGM_decimalpoint 0xabd #define PGM_rightanglebracket 0xabe #define PGM_marker 0xabf #define PGM_oneeighth 0xac3 #define PGM_threeeighths 0xac4 #define PGM_fiveeighths 0xac5 #define PGM_seveneighths 0xac6 #define PGM_trademark 0xac9 #define PGM_signaturemark 0xaca #define PGM_trademarkincircle 0xacb #define PGM_leftopentriangle 0xacc #define PGM_rightopentriangle 0xacd #define PGM_emopencircle 0xace #define PGM_emopenrectangle 0xacf #define PGM_leftsinglequotemark 0xad0 #define PGM_rightsinglequotemark 0xad1 #define PGM_leftdoublequotemark 0xad2 #define PGM_rightdoublequotemark 0xad3 #define PGM_prescription 0xad4 #define PGM_minutes 0xad6 #define PGM_seconds 0xad7 #define PGM_latincross 0xad9 #define PGM_hexagram 0xada #define PGM_filledrectbullet 0xadb #define PGM_filledlefttribullet 0xadc #define PGM_filledrighttribullet 0xadd #define PGM_emfilledcircle 0xade #define PGM_emfilledrect 0xadf #define PGM_enopencircbullet 0xae0 #define PGM_enopensquarebullet 0xae1 #define PGM_openrectbullet 0xae2 #define PGM_opentribulletup 0xae3 #define PGM_opentribulletdown 0xae4 #define PGM_openstar 0xae5 #define PGM_enfilledcircbullet 0xae6 #define PGM_enfilledsqbullet 0xae7 #define PGM_filledtribulletup 0xae8 #define PGM_filledtribulletdown 0xae9 #define PGM_leftpointer 0xaea #define PGM_rightpointer 0xaeb #define PGM_club 0xaec #define PGM_diamond 0xaed #define PGM_heart 0xaee #define PGM_maltesecross 0xaf0 #define PGM_dagger 0xaf1 #define PGM_doubledagger 0xaf2 #define PGM_checkmark 0xaf3 #define PGM_ballotcross 0xaf4 #define PGM_musicalsharp 0xaf5 #define PGM_musicalflat 0xaf6 #define PGM_malesymbol 0xaf7 #define PGM_femalesymbol 0xaf8 #define PGM_telephone 0xaf9 #define PGM_telephonerecorder 0xafa #define PGM_phonographcopyright 0xafb #define PGM_caret 0xafc #define PGM_singlelowquotemark 0xafd #define PGM_doublelowquotemark 0xafe #define PGM_cursor 0xaff #define PGM_leftcaret 0xba3 #define PGM_rightcaret 0xba6 #define PGM_downcaret 0xba8 #define PGM_upcaret 0xba9 #define PGM_overbar 0xbc0 #define PGM_downtack 0xbc2 #define PGM_upshoe 0xbc3 #define PGM_downstile 0xbc4 #define PGM_underbar 0xbc6 #define PGM_jot 0xbca #define PGM_quad 0xbcc #define PGM_uptack 0xbce #define PGM_circle 0xbcf #define PGM_upstile 0xbd3 #define PGM_downshoe 0xbd6 #define PGM_rightshoe 0xbd8 #define PGM_leftshoe 0xbda #define PGM_lefttack 0xbdc #define PGM_righttack 0xbfc #define PGM_hebrew_doublelowline 0xcdf #define PGM_hebrew_aleph 0xce0 #define PGM_hebrew_bet 0xce1 #define PGM_hebrew_beth 0xce1 #define PGM_hebrew_gimel 0xce2 #define PGM_hebrew_gimmel 0xce2 #define PGM_hebrew_dalet 0xce3 #define PGM_hebrew_daleth 0xce3 #define PGM_hebrew_he 0xce4 #define PGM_hebrew_waw 0xce5 #define PGM_hebrew_zain 0xce6 #define PGM_hebrew_zayin 0xce6 #define PGM_hebrew_chet 0xce7 #define PGM_hebrew_het 0xce7 #define PGM_hebrew_tet 0xce8 #define PGM_hebrew_teth 0xce8 #define PGM_hebrew_yod 0xce9 #define PGM_hebrew_finalkaph 0xcea #define PGM_hebrew_kaph 0xceb #define PGM_hebrew_lamed 0xcec #define PGM_hebrew_finalmem 0xced #define PGM_hebrew_mem 0xcee #define PGM_hebrew_finalnun 0xcef #define PGM_hebrew_nun 0xcf0 #define PGM_hebrew_samech 0xcf1 #define PGM_hebrew_samekh 0xcf1 #define PGM_hebrew_ayin 0xcf2 #define PGM_hebrew_finalpe 0xcf3 #define PGM_hebrew_pe 0xcf4 #define PGM_hebrew_finalzade 0xcf5 #define PGM_hebrew_finalzadi 0xcf5 #define PGM_hebrew_zade 0xcf6 #define PGM_hebrew_zadi 0xcf6 #define PGM_hebrew_qoph 0xcf7 #define PGM_hebrew_kuf 0xcf7 #define PGM_hebrew_resh 0xcf8 #define PGM_hebrew_shin 0xcf9 #define PGM_hebrew_taw 0xcfa #define PGM_hebrew_taf 0xcfa #define PGM_Hebrew_switch 0xff7e #define PGM_Thai_kokai 0xda1 #define PGM_Thai_khokhai 0xda2 #define PGM_Thai_khokhuat 0xda3 #define PGM_Thai_khokhwai 0xda4 #define PGM_Thai_khokhon 0xda5 #define PGM_Thai_khorakhang 0xda6 #define PGM_Thai_ngongu 0xda7 #define PGM_Thai_chochan 0xda8 #define PGM_Thai_choching 0xda9 #define PGM_Thai_chochang 0xdaa #define PGM_Thai_soso 0xdab #define PGM_Thai_chochoe 0xdac #define PGM_Thai_yoying 0xdad #define PGM_Thai_dochada 0xdae #define PGM_Thai_topatak 0xdaf #define PGM_Thai_thothan 0xdb0 #define PGM_Thai_thonangmontho 0xdb1 #define PGM_Thai_thophuthao 0xdb2 #define PGM_Thai_nonen 0xdb3 #define PGM_Thai_dodek 0xdb4 #define PGM_Thai_totao 0xdb5 #define PGM_Thai_thothung 0xdb6 #define PGM_Thai_thothahan 0xdb7 #define PGM_Thai_thothong 0xdb8 #define PGM_Thai_nonu 0xdb9 #define PGM_Thai_bobaimai 0xdba #define PGM_Thai_popla 0xdbb #define PGM_Thai_phophung 0xdbc #define PGM_Thai_fofa 0xdbd #define PGM_Thai_phophan 0xdbe #define PGM_Thai_fofan 0xdbf #define PGM_Thai_phosamphao 0xdc0 #define PGM_Thai_moma 0xdc1 #define PGM_Thai_yoyak 0xdc2 #define PGM_Thai_rorua 0xdc3 #define PGM_Thai_ru 0xdc4 #define PGM_Thai_loling 0xdc5 #define PGM_Thai_lu 0xdc6 #define PGM_Thai_wowaen 0xdc7 #define PGM_Thai_sosala 0xdc8 #define PGM_Thai_sorusi 0xdc9 #define PGM_Thai_sosua 0xdca #define PGM_Thai_hohip 0xdcb #define PGM_Thai_lochula 0xdcc #define PGM_Thai_oang 0xdcd #define PGM_Thai_honokhuk 0xdce #define PGM_Thai_paiyannoi 0xdcf #define PGM_Thai_saraa 0xdd0 #define PGM_Thai_maihanakat 0xdd1 #define PGM_Thai_saraaa 0xdd2 #define PGM_Thai_saraam 0xdd3 #define PGM_Thai_sarai 0xdd4 #define PGM_Thai_saraii 0xdd5 #define PGM_Thai_saraue 0xdd6 #define PGM_Thai_sarauee 0xdd7 #define PGM_Thai_sarau 0xdd8 #define PGM_Thai_sarauu 0xdd9 #define PGM_Thai_phinthu 0xdda #define PGM_Thai_maihanakat_maitho 0xdde #define PGM_Thai_baht 0xddf #define PGM_Thai_sarae 0xde0 #define PGM_Thai_saraae 0xde1 #define PGM_Thai_sarao 0xde2 #define PGM_Thai_saraaimaimuan 0xde3 #define PGM_Thai_saraaimaimalai 0xde4 #define PGM_Thai_lakkhangyao 0xde5 #define PGM_Thai_maiyamok 0xde6 #define PGM_Thai_maitaikhu 0xde7 #define PGM_Thai_maiek 0xde8 #define PGM_Thai_maitho 0xde9 #define PGM_Thai_maitri 0xdea #define PGM_Thai_maichattawa 0xdeb #define PGM_Thai_thanthakhat 0xdec #define PGM_Thai_nikhahit 0xded #define PGM_Thai_leksun 0xdf0 #define PGM_Thai_leknung 0xdf1 #define PGM_Thai_leksong 0xdf2 #define PGM_Thai_leksam 0xdf3 #define PGM_Thai_leksi 0xdf4 #define PGM_Thai_lekha 0xdf5 #define PGM_Thai_lekhok 0xdf6 #define PGM_Thai_lekchet 0xdf7 #define PGM_Thai_lekpaet 0xdf8 #define PGM_Thai_lekkao 0xdf9 #define PGM_Hangul 0xff31 #define PGM_Hangul_Start 0xff32 #define PGM_Hangul_End 0xff33 #define PGM_Hangul_Hanja 0xff34 #define PGM_Hangul_Jamo 0xff35 #define PGM_Hangul_Romaja 0xff36 #define PGM_Hangul_Codeinput 0xff37 #define PGM_Hangul_Jeonja 0xff38 #define PGM_Hangul_Banja 0xff39 #define PGM_Hangul_PreHanja 0xff3a #define PGM_Hangul_PostHanja 0xff3b #define PGM_Hangul_SingleCandidate 0xff3c #define PGM_Hangul_MultipleCandidate 0xff3d #define PGM_Hangul_PreviousCandidate 0xff3e #define PGM_Hangul_Special 0xff3f #define PGM_Hangul_switch 0xff7e #define PGM_Hangul_Kiyeog 0xea1 #define PGM_Hangul_SsangKiyeog 0xea2 #define PGM_Hangul_KiyeogSios 0xea3 #define PGM_Hangul_Nieun 0xea4 #define PGM_Hangul_NieunJieuj 0xea5 #define PGM_Hangul_NieunHieuh 0xea6 #define PGM_Hangul_Dikeud 0xea7 #define PGM_Hangul_SsangDikeud 0xea8 #define PGM_Hangul_Rieul 0xea9 #define PGM_Hangul_RieulKiyeog 0xeaa #define PGM_Hangul_RieulMieum 0xeab #define PGM_Hangul_RieulPieub 0xeac #define PGM_Hangul_RieulSios 0xead #define PGM_Hangul_RieulTieut 0xeae #define PGM_Hangul_RieulPhieuf 0xeaf #define PGM_Hangul_RieulHieuh 0xeb0 #define PGM_Hangul_Mieum 0xeb1 #define PGM_Hangul_Pieub 0xeb2 #define PGM_Hangul_SsangPieub 0xeb3 #define PGM_Hangul_PieubSios 0xeb4 #define PGM_Hangul_Sios 0xeb5 #define PGM_Hangul_SsangSios 0xeb6 #define PGM_Hangul_Ieung 0xeb7 #define PGM_Hangul_Jieuj 0xeb8 #define PGM_Hangul_SsangJieuj 0xeb9 #define PGM_Hangul_Cieuc 0xeba #define PGM_Hangul_Khieuq 0xebb #define PGM_Hangul_Tieut 0xebc #define PGM_Hangul_Phieuf 0xebd #define PGM_Hangul_Hieuh 0xebe #define PGM_Hangul_A 0xebf #define PGM_Hangul_AE 0xec0 #define PGM_Hangul_YA 0xec1 #define PGM_Hangul_YAE 0xec2 #define PGM_Hangul_EO 0xec3 #define PGM_Hangul_E 0xec4 #define PGM_Hangul_YEO 0xec5 #define PGM_Hangul_YE 0xec6 #define PGM_Hangul_O 0xec7 #define PGM_Hangul_WA 0xec8 #define PGM_Hangul_WAE 0xec9 #define PGM_Hangul_OE 0xeca #define PGM_Hangul_YO 0xecb #define PGM_Hangul_U 0xecc #define PGM_Hangul_WEO 0xecd #define PGM_Hangul_WE 0xece #define PGM_Hangul_WI 0xecf #define PGM_Hangul_YU 0xed0 #define PGM_Hangul_EU 0xed1 #define PGM_Hangul_YI 0xed2 #define PGM_Hangul_I 0xed3 #define PGM_Hangul_J_Kiyeog 0xed4 #define PGM_Hangul_J_SsangKiyeog 0xed5 #define PGM_Hangul_J_KiyeogSios 0xed6 #define PGM_Hangul_J_Nieun 0xed7 #define PGM_Hangul_J_NieunJieuj 0xed8 #define PGM_Hangul_J_NieunHieuh 0xed9 #define PGM_Hangul_J_Dikeud 0xeda #define PGM_Hangul_J_Rieul 0xedb #define PGM_Hangul_J_RieulKiyeog 0xedc #define PGM_Hangul_J_RieulMieum 0xedd #define PGM_Hangul_J_RieulPieub 0xede #define PGM_Hangul_J_RieulSios 0xedf #define PGM_Hangul_J_RieulTieut 0xee0 #define PGM_Hangul_J_RieulPhieuf 0xee1 #define PGM_Hangul_J_RieulHieuh 0xee2 #define PGM_Hangul_J_Mieum 0xee3 #define PGM_Hangul_J_Pieub 0xee4 #define PGM_Hangul_J_PieubSios 0xee5 #define PGM_Hangul_J_Sios 0xee6 #define PGM_Hangul_J_SsangSios 0xee7 #define PGM_Hangul_J_Ieung 0xee8 #define PGM_Hangul_J_Jieuj 0xee9 #define PGM_Hangul_J_Cieuc 0xeea #define PGM_Hangul_J_Khieuq 0xeeb #define PGM_Hangul_J_Tieut 0xeec #define PGM_Hangul_J_Phieuf 0xeed #define PGM_Hangul_J_Hieuh 0xeee #define PGM_Hangul_RieulYeorinHieuh 0xeef #define PGM_Hangul_SunkyeongeumMieum 0xef0 #define PGM_Hangul_SunkyeongeumPieub 0xef1 #define PGM_Hangul_PanSios 0xef2 #define PGM_Hangul_KkogjiDalrinIeung 0xef3 #define PGM_Hangul_SunkyeongeumPhieuf 0xef4 #define PGM_Hangul_YeorinHieuh 0xef5 #define PGM_Hangul_AraeA 0xef6 #define PGM_Hangul_AraeAE 0xef7 #define PGM_Hangul_J_PanSios 0xef8 #define PGM_Hangul_J_KkogjiDalrinIeung 0xef9 #define PGM_Hangul_J_YeorinHieuh 0xefa #define PGM_Korean_Won 0xeff #define PGM_Armenian_ligature_ew 0x1000587 #define PGM_Armenian_full_stop 0x1000589 #define PGM_Armenian_verjaket 0x1000589 #define PGM_Armenian_separation_mark 0x100055d #define PGM_Armenian_but 0x100055d #define PGM_Armenian_hyphen 0x100058a #define PGM_Armenian_yentamna 0x100058a #define PGM_Armenian_exclam 0x100055c #define PGM_Armenian_amanak 0x100055c #define PGM_Armenian_accent 0x100055b #define PGM_Armenian_shesht 0x100055b #define PGM_Armenian_question 0x100055e #define PGM_Armenian_paruyk 0x100055e #define PGM_Armenian_AYB 0x1000531 #define PGM_Armenian_ayb 0x1000561 #define PGM_Armenian_BEN 0x1000532 #define PGM_Armenian_ben 0x1000562 #define PGM_Armenian_GIM 0x1000533 #define PGM_Armenian_gim 0x1000563 #define PGM_Armenian_DA 0x1000534 #define PGM_Armenian_da 0x1000564 #define PGM_Armenian_YECH 0x1000535 #define PGM_Armenian_yech 0x1000565 #define PGM_Armenian_ZA 0x1000536 #define PGM_Armenian_za 0x1000566 #define PGM_Armenian_E 0x1000537 #define PGM_Armenian_e 0x1000567 #define PGM_Armenian_AT 0x1000538 #define PGM_Armenian_at 0x1000568 #define PGM_Armenian_TO 0x1000539 #define PGM_Armenian_to 0x1000569 #define PGM_Armenian_ZHE 0x100053a #define PGM_Armenian_zhe 0x100056a #define PGM_Armenian_INI 0x100053b #define PGM_Armenian_ini 0x100056b #define PGM_Armenian_LYUN 0x100053c #define PGM_Armenian_lyun 0x100056c #define PGM_Armenian_KHE 0x100053d #define PGM_Armenian_khe 0x100056d #define PGM_Armenian_TSA 0x100053e #define PGM_Armenian_tsa 0x100056e #define PGM_Armenian_KEN 0x100053f #define PGM_Armenian_ken 0x100056f #define PGM_Armenian_HO 0x1000540 #define PGM_Armenian_ho 0x1000570 #define PGM_Armenian_DZA 0x1000541 #define PGM_Armenian_dza 0x1000571 #define PGM_Armenian_GHAT 0x1000542 #define PGM_Armenian_ghat 0x1000572 #define PGM_Armenian_TCHE 0x1000543 #define PGM_Armenian_tche 0x1000573 #define PGM_Armenian_MEN 0x1000544 #define PGM_Armenian_men 0x1000574 #define PGM_Armenian_HI 0x1000545 #define PGM_Armenian_hi 0x1000575 #define PGM_Armenian_NU 0x1000546 #define PGM_Armenian_nu 0x1000576 #define PGM_Armenian_SHA 0x1000547 #define PGM_Armenian_sha 0x1000577 #define PGM_Armenian_VO 0x1000548 #define PGM_Armenian_vo 0x1000578 #define PGM_Armenian_CHA 0x1000549 #define PGM_Armenian_cha 0x1000579 #define PGM_Armenian_PE 0x100054a #define PGM_Armenian_pe 0x100057a #define PGM_Armenian_JE 0x100054b #define PGM_Armenian_je 0x100057b #define PGM_Armenian_RA 0x100054c #define PGM_Armenian_ra 0x100057c #define PGM_Armenian_SE 0x100054d #define PGM_Armenian_se 0x100057d #define PGM_Armenian_VEV 0x100054e #define PGM_Armenian_vev 0x100057e #define PGM_Armenian_TYUN 0x100054f #define PGM_Armenian_tyun 0x100057f #define PGM_Armenian_RE 0x1000550 #define PGM_Armenian_re 0x1000580 #define PGM_Armenian_TSO 0x1000551 #define PGM_Armenian_tso 0x1000581 #define PGM_Armenian_VYUN 0x1000552 #define PGM_Armenian_vyun 0x1000582 #define PGM_Armenian_PYUR 0x1000553 #define PGM_Armenian_pyur 0x1000583 #define PGM_Armenian_KE 0x1000554 #define PGM_Armenian_ke 0x1000584 #define PGM_Armenian_O 0x1000555 #define PGM_Armenian_o 0x1000585 #define PGM_Armenian_FE 0x1000556 #define PGM_Armenian_fe 0x1000586 #define PGM_Armenian_apostrophe 0x100055a #define PGM_Georgian_an 0x10010d0 #define PGM_Georgian_ban 0x10010d1 #define PGM_Georgian_gan 0x10010d2 #define PGM_Georgian_don 0x10010d3 #define PGM_Georgian_en 0x10010d4 #define PGM_Georgian_vin 0x10010d5 #define PGM_Georgian_zen 0x10010d6 #define PGM_Georgian_tan 0x10010d7 #define PGM_Georgian_in 0x10010d8 #define PGM_Georgian_kan 0x10010d9 #define PGM_Georgian_las 0x10010da #define PGM_Georgian_man 0x10010db #define PGM_Georgian_nar 0x10010dc #define PGM_Georgian_on 0x10010dd #define PGM_Georgian_par 0x10010de #define PGM_Georgian_zhar 0x10010df #define PGM_Georgian_rae 0x10010e0 #define PGM_Georgian_san 0x10010e1 #define PGM_Georgian_tar 0x10010e2 #define PGM_Georgian_un 0x10010e3 #define PGM_Georgian_phar 0x10010e4 #define PGM_Georgian_khar 0x10010e5 #define PGM_Georgian_ghan 0x10010e6 #define PGM_Georgian_qar 0x10010e7 #define PGM_Georgian_shin 0x10010e8 #define PGM_Georgian_chin 0x10010e9 #define PGM_Georgian_can 0x10010ea #define PGM_Georgian_jil 0x10010eb #define PGM_Georgian_cil 0x10010ec #define PGM_Georgian_char 0x10010ed #define PGM_Georgian_xan 0x10010ee #define PGM_Georgian_jhan 0x10010ef #define PGM_Georgian_hae 0x10010f0 #define PGM_Georgian_he 0x10010f1 #define PGM_Georgian_hie 0x10010f2 #define PGM_Georgian_we 0x10010f3 #define PGM_Georgian_har 0x10010f4 #define PGM_Georgian_hoe 0x10010f5 #define PGM_Georgian_fi 0x10010f6 #define PGM_Xabovedot 0x1001e8a #define PGM_Ibreve 0x100012c #define PGM_Zstroke 0x10001b5 #define PGM_Gcaron 0x10001e6 #define PGM_Ocaron 0x10001d1 #define PGM_Obarred 0x100019f #define PGM_xabovedot 0x1001e8b #define PGM_ibreve 0x100012d #define PGM_zstroke 0x10001b6 #define PGM_gcaron 0x10001e7 #define PGM_ocaron 0x10001d2 #define PGM_obarred 0x1000275 #define PGM_SCHWA 0x100018f #define PGM_schwa 0x1000259 #define PGM_Lbelowdot 0x1001e36 #define PGM_lbelowdot 0x1001e37 #define PGM_Abelowdot 0x1001ea0 #define PGM_abelowdot 0x1001ea1 #define PGM_Ahook 0x1001ea2 #define PGM_ahook 0x1001ea3 #define PGM_Acircumflexacute 0x1001ea4 #define PGM_acircumflexacute 0x1001ea5 #define PGM_Acircumflexgrave 0x1001ea6 #define PGM_acircumflexgrave 0x1001ea7 #define PGM_Acircumflexhook 0x1001ea8 #define PGM_acircumflexhook 0x1001ea9 #define PGM_Acircumflextilde 0x1001eaa #define PGM_acircumflextilde 0x1001eab #define PGM_Acircumflexbelowdot 0x1001eac #define PGM_acircumflexbelowdot 0x1001ead #define PGM_Abreveacute 0x1001eae #define PGM_abreveacute 0x1001eaf #define PGM_Abrevegrave 0x1001eb0 #define PGM_abrevegrave 0x1001eb1 #define PGM_Abrevehook 0x1001eb2 #define PGM_abrevehook 0x1001eb3 #define PGM_Abrevetilde 0x1001eb4 #define PGM_abrevetilde 0x1001eb5 #define PGM_Abrevebelowdot 0x1001eb6 #define PGM_abrevebelowdot 0x1001eb7 #define PGM_Ebelowdot 0x1001eb8 #define PGM_ebelowdot 0x1001eb9 #define PGM_Ehook 0x1001eba #define PGM_ehook 0x1001ebb #define PGM_Etilde 0x1001ebc #define PGM_etilde 0x1001ebd #define PGM_Ecircumflexacute 0x1001ebe #define PGM_ecircumflexacute 0x1001ebf #define PGM_Ecircumflexgrave 0x1001ec0 #define PGM_ecircumflexgrave 0x1001ec1 #define PGM_Ecircumflexhook 0x1001ec2 #define PGM_ecircumflexhook 0x1001ec3 #define PGM_Ecircumflextilde 0x1001ec4 #define PGM_ecircumflextilde 0x1001ec5 #define PGM_Ecircumflexbelowdot 0x1001ec6 #define PGM_ecircumflexbelowdot 0x1001ec7 #define PGM_Ihook 0x1001ec8 #define PGM_ihook 0x1001ec9 #define PGM_Ibelowdot 0x1001eca #define PGM_ibelowdot 0x1001ecb #define PGM_Obelowdot 0x1001ecc #define PGM_obelowdot 0x1001ecd #define PGM_Ohook 0x1001ece #define PGM_ohook 0x1001ecf #define PGM_Ocircumflexacute 0x1001ed0 #define PGM_ocircumflexacute 0x1001ed1 #define PGM_Ocircumflexgrave 0x1001ed2 #define PGM_ocircumflexgrave 0x1001ed3 #define PGM_Ocircumflexhook 0x1001ed4 #define PGM_ocircumflexhook 0x1001ed5 #define PGM_Ocircumflextilde 0x1001ed6 #define PGM_ocircumflextilde 0x1001ed7 #define PGM_Ocircumflexbelowdot 0x1001ed8 #define PGM_ocircumflexbelowdot 0x1001ed9 #define PGM_Ohornacute 0x1001eda #define PGM_ohornacute 0x1001edb #define PGM_Ohorngrave 0x1001edc #define PGM_ohorngrave 0x1001edd #define PGM_Ohornhook 0x1001ede #define PGM_ohornhook 0x1001edf #define PGM_Ohorntilde 0x1001ee0 #define PGM_ohorntilde 0x1001ee1 #define PGM_Ohornbelowdot 0x1001ee2 #define PGM_ohornbelowdot 0x1001ee3 #define PGM_Ubelowdot 0x1001ee4 #define PGM_ubelowdot 0x1001ee5 #define PGM_Uhook 0x1001ee6 #define PGM_uhook 0x1001ee7 #define PGM_Uhornacute 0x1001ee8 #define PGM_uhornacute 0x1001ee9 #define PGM_Uhorngrave 0x1001eea #define PGM_uhorngrave 0x1001eeb #define PGM_Uhornhook 0x1001eec #define PGM_uhornhook 0x1001eed #define PGM_Uhorntilde 0x1001eee #define PGM_uhorntilde 0x1001eef #define PGM_Uhornbelowdot 0x1001ef0 #define PGM_uhornbelowdot 0x1001ef1 #define PGM_Ybelowdot 0x1001ef4 #define PGM_ybelowdot 0x1001ef5 #define PGM_Yhook 0x1001ef6 #define PGM_yhook 0x1001ef7 #define PGM_Ytilde 0x1001ef8 #define PGM_ytilde 0x1001ef9 #define PGM_Ohorn 0x10001a0 #define PGM_ohorn 0x10001a1 #define PGM_Uhorn 0x10001af #define PGM_uhorn 0x10001b0 #define PGM_EcuSign 0x10020a0 #define PGM_ColonSign 0x10020a1 #define PGM_CruzeiroSign 0x10020a2 #define PGM_FFrancSign 0x10020a3 #define PGM_LiraSign 0x10020a4 #define PGM_MillSign 0x10020a5 #define PGM_NairaSign 0x10020a6 #define PGM_PesetaSign 0x10020a7 #define PGM_RupeeSign 0x10020a8 #define PGM_WonSign 0x10020a9 #define PGM_NewSheqelSign 0x10020aa #define PGM_DongSign 0x10020ab #define PGM_EuroSign 0x20ac #define PGM_zerosuperior 0x1002070 #define PGM_foursuperior 0x1002074 #define PGM_fivesuperior 0x1002075 #define PGM_sixsuperior 0x1002076 #define PGM_sevensuperior 0x1002077 #define PGM_eightsuperior 0x1002078 #define PGM_ninesuperior 0x1002079 #define PGM_zerosubscript 0x1002080 #define PGM_onesubscript 0x1002081 #define PGM_twosubscript 0x1002082 #define PGM_threesubscript 0x1002083 #define PGM_foursubscript 0x1002084 #define PGM_fivesubscript 0x1002085 #define PGM_sixsubscript 0x1002086 #define PGM_sevensubscript 0x1002087 #define PGM_eightsubscript 0x1002088 #define PGM_ninesubscript 0x1002089 #define PGM_partdifferential 0x1002202 #define PGM_emptyset 0x1002205 #define PGM_elementof 0x1002208 #define PGM_notelementof 0x1002209 #define PGM_containsas 0x100220b #define PGM_squareroot 0x100221a #define PGM_cuberoot 0x100221b #define PGM_fourthroot 0x100221c #define PGM_dintegral 0x100222c #define PGM_tintegral 0x100222d #define PGM_because 0x1002235 #define PGM_approxeq 0x1002248 #define PGM_notapproxeq 0x1002247 #define PGM_notidentical 0x1002262 #define PGM_stricteq 0x1002263 #endif /* __PGM_KEYSYMS_H__ */ pigment-0.3.17/pgm/pgmtext.c0000644000175000017500000007776511205034416012627 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment media rendering library * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author(s): Loïc Molinari * Mirco Müller */ /** * SECTION:pgmtext * @short_description: A text drawable. * @see_also: #PgmDrawable, #PgmImage. * * * * #PgmText is a drawable displaying a text with support for multiple lines, * markups and several properties. The specified text is then arranged to fit * inside the drawable size. Fonts are specified through face name and * attributes. The font height is given in canvas coordinates. * * * * FIXME: * • Describe the markup syntax. * • Describe the different capabilities. * * Last reviewed on 2007-05-18 (0.1.5) */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include "pgmtext.h" GST_DEBUG_CATEGORY_STATIC (pgm_text_debug); #define GST_CAT_DEFAULT pgm_text_debug static PgmDrawableClass *parent_class = NULL; /* GObject stuff */ G_DEFINE_TYPE (PgmText, pgm_text, PGM_TYPE_DRAWABLE); static void pgm_text_dispose (GObject *object) { PgmText * text = PGM_TEXT (object); GST_OBJECT_LOCK (text); g_free (text->label); g_free (text->font_family); GST_OBJECT_UNLOCK (text); GST_CALL_PARENT (G_OBJECT_CLASS, dispose, (object)); } static void pgm_text_class_init (PgmTextClass *klass) { GObjectClass *gobject_class = (GObjectClass *) klass; parent_class = g_type_class_peek_parent (klass); gobject_class->dispose = GST_DEBUG_FUNCPTR (pgm_text_dispose); GST_DEBUG_CATEGORY_INIT (pgm_text_debug, "pgm_text", 0, "text object"); } static void pgm_text_init (PgmText* text) { /* Public data */ text->label = g_strdup (""); text->font_family = g_strdup ("Sans"); text->gravity = PGM_TEXT_GRAVITY_AUTO; text->stretch = PGM_TEXT_STRETCH_NORMAL; /* text->style = PGM_TEXT_STYLE_NORMAL; */ /* text->variant = PGM_TEXT_VARIANT_NORMAL; */ text->weight = PGM_TEXT_WEIGHT_NORMAL; text->height = 1.0f; /* text->ellipsize = PGM_TEXT_ELLIPSIZE_NONE; */ /* text->alignment = PGM_TEXT_ALIGN_LEFT; */ /* text->wrap = PGM_TEXT_WRAP_WORD; */ /* text->line_spacing = 0.0f; */ /* text->justify = FALSE; */ text->multiline = TRUE; /* text->cast_shadow = FALSE; */ text->shadow_position = PGM_TEXT_SHADOW_NORTH; text->outline_width = 0.0f; text->r = 255; text->g = 255; text->b = 255; text->a = 255; /* text->shadow_r = 0; */ /* text->shadow_g = 0; */ /* text->shadow_b = 0; */ text->shadow_a = 127; /* text->outline_r = 0; */ /* text->outline_g = 0; */ /* text->outline_b = 0; */ /* text->outline_a = 0; */ /* Private data */ /* text->use_markup = FALSE; */ } /* Public methods */ /** * pgm_text_new: * @markup: the markup string. * * Creates a new #PgmText instance. * * MT safe. * * Returns: a new #PgmText instance. */ PgmDrawable * pgm_text_new (const gchar *markup) { PgmDrawable *drawable; drawable = g_object_new (PGM_TYPE_TEXT, NULL); GST_DEBUG_OBJECT (drawable, "created new text"); pgm_text_set_markup (PGM_TEXT (drawable), markup); pgm_drawable_set_grid_aligned (drawable, TRUE); return drawable; } /** * pgm_text_set_label: * @text: a #PgmText object. * @label: the label string. * * Sets label of @text to @label. @label has to be a NULL-terminated string. * The default label is the empty one "". * * MT safe. * * Returns: A #PgmError indicating success/failure. */ PgmError pgm_text_set_label (PgmText *text, const gchar *label) { g_return_val_if_fail (PGM_IS_TEXT (text), PGM_ERROR_X); GST_OBJECT_LOCK (text); GST_DEBUG_OBJECT (text, "set label to '%s'", label); if (G_UNLIKELY (text->label)) g_free (text->label); text->label = g_strdup (label); text->use_markup = FALSE; GST_OBJECT_UNLOCK (text); _pgm_drawable_emit_changed (PGM_DRAWABLE (text), PGM_TEXT_LABEL); return PGM_ERROR_OK; } /** * pgm_text_set_markup: * @text: a #PgmText object. * @markup: the markup string. * * Sets markup of @text to @markup. @markup has to be a NULL-terminated string. * The default label is the empty one "". * * MT safe. * * Returns: A #PgmError indicating success/failure. */ PgmError pgm_text_set_markup (PgmText *text, const gchar *markup) { g_return_val_if_fail (PGM_IS_TEXT (text), PGM_ERROR_X); GST_OBJECT_LOCK (text); GST_DEBUG_OBJECT (text, "set markup to '%s'", markup); if (G_UNLIKELY (text->label)) g_free (text->label); text->label = g_strdup (markup); text->use_markup = TRUE; GST_OBJECT_UNLOCK (text); _pgm_drawable_emit_changed (PGM_DRAWABLE (text), PGM_TEXT_MARKUP); return PGM_ERROR_OK; } /** * pgm_text_get_label: * @text: a #PgmText object. * @label: a pointer to a pointer to a gchar where the label string will be * stored. g_free() after use. * * Retrieves the current label of @text in @label. If a markup is currently * used, the full markup is retrieved. * * MT safe. * * Returns: A #PgmError indicating success/failure. */ PgmError pgm_text_get_label (PgmText *text, gchar **label) { g_return_val_if_fail (PGM_IS_TEXT (text), PGM_ERROR_X); g_return_val_if_fail (label != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (text); *label = g_strdup (text->label); GST_OBJECT_UNLOCK (text); return PGM_ERROR_OK; } /** * pgm_text_set_font_family: * @text: a #PgmText object. * @font_family: the font-family string. * * Sets the font family of @text to @font_family. The default font family * name is "Sans". * * MT safe. * * Returns: A #PgmError indicating success/failure. */ PgmError pgm_text_set_font_family (PgmText *text, const gchar *font_family) { g_return_val_if_fail (PGM_IS_TEXT (text), PGM_ERROR_X); GST_OBJECT_LOCK (text); if (G_UNLIKELY (text->font_family)) g_free (text->font_family); text->font_family = g_strdup (font_family); GST_OBJECT_UNLOCK (text); _pgm_drawable_emit_changed (PGM_DRAWABLE (text), PGM_TEXT_FONT_FAMILY); return PGM_ERROR_OK; } /** * pgm_text_get_font_family: * @text: a #PgmText object. * @font_family: a pointer to a pointer to a gchar where the font family * string will be stored. g_free() after use. * * Retrieves the current font-family of @text in @label. * * MT safe. * * Returns: A #PgmError indicating success/failure. */ PgmError pgm_text_get_font_family (PgmText *text, gchar **font_family) { g_return_val_if_fail (PGM_IS_TEXT (text), PGM_ERROR_X); g_return_val_if_fail (font_family != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (text); *font_family = g_strdup (text->font_family); GST_OBJECT_UNLOCK (text); return PGM_ERROR_OK; } /** * pgm_text_set_font_height: * @text: a #PgmText object. * @font_height: the text height in canvas coordinates. * * Sets the height of @text to @font_height in canvas coordinates. The default * height is 1.0f. * * MT safe. * * Returns: A #PgmError indicating success/failure. */ PgmError pgm_text_set_font_height (PgmText *text, gfloat font_height) { g_return_val_if_fail (PGM_IS_TEXT (text), PGM_ERROR_X); GST_OBJECT_LOCK (text); text->height = font_height; GST_OBJECT_UNLOCK (text); _pgm_drawable_emit_changed (PGM_DRAWABLE (text), PGM_TEXT_HEIGHT); return PGM_ERROR_OK; } /** * pgm_text_get_font_height: * @text: a #PgmText object. * @font_height: a pointer to a gfloat where the text height is going to be * stored. * * Retrieves the height of @text in @height. * * MT safe. * * Returns: A #PgmError indicating success/failure. */ PgmError pgm_text_get_font_height (PgmText *text, gfloat *font_height) { g_return_val_if_fail (PGM_IS_TEXT (text), PGM_ERROR_X); g_return_val_if_fail (font_height != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (text); *font_height = text->height; GST_OBJECT_UNLOCK (text); return PGM_ERROR_OK; } /** * pgm_text_set_ellipsize: * @text: a #PgmText object. * @ellipsize: the text ellipsizing. * * Sets ellipsizing of @text to @ellipsize. Only takes effect when @text gets * to large to fit the drawable size. The default value is * #PGM_TEXT_ELLIPSIZE_NONE. * * MT safe. * * Returns: A #PgmError indicating success/failure. */ PgmError pgm_text_set_ellipsize (PgmText *text, PgmTextEllipsize ellipsize) { g_return_val_if_fail (PGM_IS_TEXT (text), PGM_ERROR_X); GST_OBJECT_LOCK (text); text->ellipsize = ellipsize; GST_OBJECT_UNLOCK (text); _pgm_drawable_emit_changed (PGM_DRAWABLE (text), PGM_TEXT_ELLIPSIZE); return PGM_ERROR_OK; } /** * pgm_text_get_ellipsize: * @text: a #PgmText object. * @ellipsize: a pointer to a #PgmTextEllipsize where the text ellipsizing is * going to be stored. * * Retrieves the ellipsizing of @text in @ellipsize. * * MT safe. * * Returns: A #PgmError indicating success/failure. */ PgmError pgm_text_get_ellipsize (PgmText *text, PgmTextEllipsize *ellipsize) { g_return_val_if_fail (PGM_IS_TEXT (text), PGM_ERROR_X); g_return_val_if_fail (ellipsize != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (text); *ellipsize = text->ellipsize; GST_OBJECT_UNLOCK (text); return PGM_ERROR_OK; } /** * pgm_text_set_justify: * @text: a #PgmText object. * @justify: the text justification state. * * Enables or not justification of @text. If @justify is #TRUE, text is * expanded to fill the whole drawable width. * * MT safe. * * Returns: A #PgmError indicating success/failure. */ PgmError pgm_text_set_justify (PgmText *text, gboolean justify) { g_return_val_if_fail (PGM_IS_TEXT (text), PGM_ERROR_X); GST_OBJECT_LOCK (text); text->justify = justify; GST_OBJECT_UNLOCK (text); _pgm_drawable_emit_changed (PGM_DRAWABLE (text), PGM_TEXT_JUSTIFY); return PGM_ERROR_OK; } /** * pgm_text_get_justify: * @text: a #PgmText object. * @justify: a pointer to a #gboolean where the justification state is * going to be stored. * * Retrieves the justification state of @text in @justify. * * MT safe. * * Returns: A #PgmError indicating success/failure. */ PgmError pgm_text_get_justify (PgmText *text, gboolean *justify) { g_return_val_if_fail (PGM_IS_TEXT (text), PGM_ERROR_X); g_return_val_if_fail (justify != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (text); *justify = text->justify; GST_OBJECT_UNLOCK (text); return PGM_ERROR_OK; } /** * pgm_text_set_alignment: * @text: a #PgmText object. * @alignment: the text alignment. * * Sets alignment of @text to @alignment. The default value is * #PGM_TEXT_ALIGN_LEFT. * * MT safe. * * Returns: A #PgmError indicating success/failure. */ PgmError pgm_text_set_alignment (PgmText *text, PgmTextAlignment alignment) { g_return_val_if_fail (PGM_IS_TEXT (text), PGM_ERROR_X); GST_OBJECT_LOCK (text); text->alignment = alignment; GST_OBJECT_UNLOCK (text); _pgm_drawable_emit_changed (PGM_DRAWABLE (text), PGM_TEXT_ALIGNMENT); return PGM_ERROR_OK; } /** * pgm_text_get_alignment: * @text: a #PgmText object. * @alignment: a pointer to a #PgmTextAlignment where the text alignment is * going to be stored. * * Retrieves the alignment of @text in @alignment. * * MT safe. * * Returns: A #PgmError indicating success/failure. */ PgmError pgm_text_get_alignment (PgmText *text, PgmTextAlignment *alignment) { g_return_val_if_fail (PGM_IS_TEXT (text), PGM_ERROR_X); g_return_val_if_fail (alignment != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (text); *alignment = text->alignment; GST_OBJECT_UNLOCK (text); return PGM_ERROR_OK; } /** * pgm_text_set_wrap: * @text: a #PgmText object. * @wrap: the text wrapping. * * Sets wrapping of @text to @wrap. The default value is #PGM_TEXT_WRAP_WORD. * * MT safe. * * Returns: A #PgmError indicating success/failure. */ PgmError pgm_text_set_wrap (PgmText *text, PgmTextWrap wrap) { g_return_val_if_fail (PGM_IS_TEXT (text), PGM_ERROR_X); GST_OBJECT_LOCK (text); text->wrap = wrap; GST_OBJECT_UNLOCK (text); _pgm_drawable_emit_changed (PGM_DRAWABLE (text), PGM_TEXT_WRAP); return PGM_ERROR_OK; } /** * pgm_text_get_wrap: * @text: a #PgmText object. * @wrap: a pointer to a #PgmTextWrap where the text wrapping is going to be * stored. * * Retrieves the wrapping of @text in @wrap. * * MT safe. * * Returns: A #PgmError indicating success/failure. */ PgmError pgm_text_get_wrap (PgmText *text, PgmTextWrap *wrap) { g_return_val_if_fail (PGM_IS_TEXT (text), PGM_ERROR_X); g_return_val_if_fail (wrap != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (text); *wrap = text->wrap; GST_OBJECT_UNLOCK (text); return PGM_ERROR_OK; } /** * pgm_text_set_gravity * @text: a #PgmText object. * @gravity: the text gravity. * * Sets gravity of @text to @gravity. The default value is * #PGM_TEXT_GRAVITY_AUTO. * * MT safe. * * Returns: A #PgmError indicating success/failure. */ PgmError pgm_text_set_gravity (PgmText *text, PgmTextGravity gravity) { g_return_val_if_fail (PGM_IS_TEXT (text), PGM_ERROR_X); GST_OBJECT_LOCK (text); text->gravity = gravity; GST_OBJECT_UNLOCK (text); _pgm_drawable_emit_changed (PGM_DRAWABLE (text), PGM_TEXT_GRAVITY); return PGM_ERROR_OK; } /** * pgm_text_get_gravity: * @text: a #PgmText object. * @gravity: a pointer to a #PgmTextGravity where the text gravity is going * to be stored. * * Retrieves the gravity of @text in @gravity. * * MT safe. * * Returns: A #PgmError indicating success/failure. */ PgmError pgm_text_get_gravity (PgmText *text, PgmTextGravity *gravity) { g_return_val_if_fail (PGM_IS_TEXT (text), PGM_ERROR_X); g_return_val_if_fail (gravity != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (text); *gravity = text->gravity; GST_OBJECT_UNLOCK (text); return PGM_ERROR_OK; } /** * pgm_text_set_stretch: * @text: a #PgmText object. * @stretch: the text stretching. * * Sets stretching of @text to @stretch. The default value is * #PGM_TEXT_STRETCH_NORMAL. * * MT safe. * * Returns: A #PgmError indicating success/failure. */ PgmError pgm_text_set_stretch (PgmText *text, PgmTextStretch stretch) { g_return_val_if_fail (PGM_IS_TEXT (text), PGM_ERROR_X); GST_OBJECT_LOCK (text); text->stretch = stretch; GST_OBJECT_UNLOCK (text); _pgm_drawable_emit_changed (PGM_DRAWABLE (text), PGM_TEXT_STRETCH); return PGM_ERROR_OK; } /** * pgm_text_get_stretch: * @text: a #PgmText object. * @stretch: a pointer to a #PgmTextStretch where the text stretching is going * to be stored. * * Retrieves the stretching of @text in @stretch. * * MT safe. * * Returns: A #PgmError indicating success/failure. */ PgmError pgm_text_get_stretch (PgmText *text, PgmTextStretch *stretch) { g_return_val_if_fail (PGM_IS_TEXT (text), PGM_ERROR_X); g_return_val_if_fail (stretch != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (text); *stretch = text->stretch; GST_OBJECT_UNLOCK (text); return PGM_ERROR_OK; } /** * pgm_text_set_style: * @text: a #PgmText object. * @style: the text style. * * Sets style of @text to @style. The default value is #PGM_TEXT_STYLE_NORMAL. * * MT safe. * * Returns: A #PgmError indicating success/failure. */ PgmError pgm_text_set_style (PgmText *text, PgmTextStyle style) { g_return_val_if_fail (PGM_IS_TEXT (text), PGM_ERROR_X); GST_OBJECT_LOCK (text); text->style = style; GST_OBJECT_UNLOCK (text); _pgm_drawable_emit_changed (PGM_DRAWABLE (text), PGM_TEXT_STYLE); return PGM_ERROR_OK; } /** * pgm_text_get_style * @text: a #PgmText object. * @style: a pointer to a #PgmTextStyle where the text style is going to be * stored. * * Retrieves the style of @text in @style. * * MT safe. * * Returns: A #PgmError indicating success/failure. */ PgmError pgm_text_get_style (PgmText *text, PgmTextStyle *style) { g_return_val_if_fail (PGM_IS_TEXT (text), PGM_ERROR_X); g_return_val_if_fail (style != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (text); *style = text->style; GST_OBJECT_UNLOCK (text); return PGM_ERROR_OK; } /** * pgm_text_set_variant: * @text: a #PgmText object. * @variant: the text variant. * * Sets variant of @text to @variant. The default value is * #PGM_TEXT_VARIANT_NORMAL. * * MT safe. * * Returns: A #PgmError indicating success/failure. */ PgmError pgm_text_set_variant (PgmText *text, PgmTextVariant variant) { g_return_val_if_fail (PGM_IS_TEXT (text), PGM_ERROR_X); GST_OBJECT_LOCK (text); text->variant = variant; GST_OBJECT_UNLOCK (text); _pgm_drawable_emit_changed (PGM_DRAWABLE (text), PGM_TEXT_VARIANT); return PGM_ERROR_OK; } /** * pgm_text_get_variant: * @text: a #PgmText object. * @variant: a pointer to a #PgmTextVariant where the text variant is going to * be stored. * * Retrieves the variant of @text in @variant. * * MT safe. * * Returns: A #PgmError indicating success/failure. */ PgmError pgm_text_get_variant (PgmText *text, PgmTextVariant *variant) { g_return_val_if_fail (PGM_IS_TEXT (text), PGM_ERROR_X); g_return_val_if_fail (variant != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (text); *variant = text->variant; GST_OBJECT_UNLOCK (text); return PGM_ERROR_OK; } /** * pgm_text_set_weight: * @text: a #PgmText object. * @weight: the text weight. * * Sets weight of @text to @weight. The default value is * #PGM_TEXT_WEIGHT_NORMAL. * * MT safe. * * Returns: A #PgmError indicating success/failure. */ PgmError pgm_text_set_weight (PgmText *text, PgmTextWeight weight) { g_return_val_if_fail (PGM_IS_TEXT (text), PGM_ERROR_X); GST_OBJECT_LOCK (text); text->weight = weight; GST_OBJECT_UNLOCK (text); _pgm_drawable_emit_changed (PGM_DRAWABLE (text), PGM_TEXT_WEIGHT); return PGM_ERROR_OK; } /** * pgm_text_get_weight: * @text: a #PgmText object. * @weight: a pointer to a #PgmTextWeight where the text weight is going to * be stored. * * Retrieves the weight of @text in @weight. * * MT safe. * * Returns: A #PgmError indicating success/failure. */ PgmError pgm_text_get_weight (PgmText *text, PgmTextWeight *weight) { g_return_val_if_fail (PGM_IS_TEXT (text), PGM_ERROR_X); g_return_val_if_fail (weight != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (text); *weight = text->weight; GST_OBJECT_UNLOCK (text); return PGM_ERROR_OK; } /** * pgm_text_set_line_spacing: * @text: a #PgmText object. * @line_spacing: the line spacing. * * Sets the space between two lines of @text to @line_spacing in canvas * coordinates. The default value is 0.0f. * * MT safe. * * Returns: A #PgmError indicating success/failure. */ PgmError pgm_text_set_line_spacing (PgmText *text, gfloat line_spacing) { g_return_val_if_fail (PGM_IS_TEXT (text), PGM_ERROR_X); GST_OBJECT_LOCK (text); text->line_spacing = MAX (0.0f, line_spacing); GST_OBJECT_UNLOCK (text); _pgm_drawable_emit_changed (PGM_DRAWABLE (text), PGM_TEXT_LINE_SPACING); return PGM_ERROR_OK; } /** * pgm_text_get_line_spacing: * @text: a #PgmText object. * @line_spacing: a pointer to a #gfloat where the line spacing is going to * be stored. * * Retrieves the space between two lines of @text in @line_spacing. * * MT safe. * * Returns: A #PgmError indicating success/failure. */ PgmError pgm_text_get_line_spacing (PgmText *text, gfloat *line_spacing) { g_return_val_if_fail (PGM_IS_TEXT (text), PGM_ERROR_X); g_return_val_if_fail (line_spacing != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (text); *line_spacing = text->line_spacing; GST_OBJECT_UNLOCK (text); return PGM_ERROR_OK; } /** * pgm_text_set_multiline: * @text: a #PgmText object. * @multiline: the multilining state. * * Sets the multilining state of @text to @multiline. When multilining is * disabled, the text is displayed on one line and vertically centered in the * drawable. The default value is #TRUE. * * MT safe. * * Returns: A #PgmError indicating success/failure. */ PgmError pgm_text_set_multiline (PgmText *text, gboolean multiline) { g_return_val_if_fail (PGM_IS_TEXT (text), PGM_ERROR_X); GST_OBJECT_LOCK (text); if (multiline == text->multiline) { GST_OBJECT_UNLOCK (text); return PGM_ERROR_OK; } text->multiline = multiline; GST_OBJECT_UNLOCK (text); _pgm_drawable_emit_changed (PGM_DRAWABLE (text), PGM_TEXT_MULTILINE); return PGM_ERROR_OK; } /** * pgm_text_get_multiline: * @text: a #PgmText object. * @multiline: a pointer to a #gboolean where the multilining state is going to * be stored. * * Retrieves the multilining state of @text in @multiline. * * MT safe. * * Returns: A #PgmError indicating success/failure. */ PgmError pgm_text_get_multiline (PgmText *text, gboolean *multiline) { g_return_val_if_fail (PGM_IS_TEXT (text), PGM_ERROR_X); g_return_val_if_fail (multiline != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (text); *multiline = text->multiline; GST_OBJECT_UNLOCK (text); return PGM_ERROR_OK; } /** * pgm_text_set_color: * @text: a #PgmText object. * @red: the text red color component. * @green: the text green color component. * @blue: the text blue color component. * @alpha: the text alpha color component. * * Sets the color of @text to (@red, @green, @blue, @alpha). * * MT safe. * * Returns: A #PgmError indicating success/failure. */ PgmError pgm_text_set_color (PgmText *text, guchar red, guchar green, guchar blue, guchar alpha) { g_return_val_if_fail (PGM_IS_TEXT (text), PGM_ERROR_X); GST_OBJECT_LOCK (text); text->r = red; text->g = green; text->b = blue; text->a = alpha; GST_OBJECT_UNLOCK (text); _pgm_drawable_emit_changed (PGM_DRAWABLE (text), PGM_TEXT_COLOR); return PGM_ERROR_OK; } /** * pgm_text_get_color: * @text: a #PgmText object. * @red: a pointer to a #guchar where the red color component is going to be * stored. * @green: a pointer to a #guchar where the green color component is going to be * stored. * @blue: a pointer to a #guchar where the blue color component is going to be * stored. * @alpha: a pointer to a #guchar where the alpha color component is going to be * stored. * * Retrieves the color of @text in (@red, @green, @blue, @alpha). * * MT safe. * * Returns: A #PgmError indicating success/failure. */ PgmError pgm_text_get_color (PgmText *text, guchar *red, guchar *green, guchar *blue, guchar *alpha) { g_return_val_if_fail (PGM_IS_TEXT (text), PGM_ERROR_X); g_return_val_if_fail (red != NULL, PGM_ERROR_X); g_return_val_if_fail (green != NULL, PGM_ERROR_X); g_return_val_if_fail (blue != NULL, PGM_ERROR_X); g_return_val_if_fail (alpha != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (text); *red = text->r; *green = text->g; *blue = text->b; *alpha = text->a; GST_OBJECT_UNLOCK (text); return PGM_ERROR_OK; } /** * pgm_text_set_outline_color: * @text: a #PgmText object. * @red: the text outline red color component. * @green: the text outline green color component. * @blue: the text outline blue color component. * @alpha: the text outline alpha color component. * * Sets the outline color of @text to (@red, @green, @blue, @alpha). * * MT safe. * * Returns: A #PgmError indicating success/failure. */ PgmError pgm_text_set_outline_color (PgmText *text, guchar red, guchar green, guchar blue, guchar alpha) { g_return_val_if_fail (PGM_IS_TEXT (text), PGM_ERROR_X); GST_OBJECT_LOCK (text); text->outline_r = red; text->outline_g = green; text->outline_b = blue; text->outline_a = alpha; GST_OBJECT_UNLOCK (text); _pgm_drawable_emit_changed (PGM_DRAWABLE (text), PGM_TEXT_OUTLINE_COLOR); return PGM_ERROR_OK; } /** * pgm_text_get_outline_color: * @text: a #PgmText object. * @red: a pointer to a #guchar where the outline red color component is going * to be stored. * @green: a pointer to a #guchar where the outline green color component is * going to be stored. * @blue: a pointer to a #guchar where the outline blue color component is going * to be stored. * @alpha: a pointer to a #guchar where the outline alpha color component is * going to be stored. * * Retrieves the outline color of @text in (@red, @green, @blue, @alpha). * * MT safe. * * Returns: A #PgmError indicating success/failure. */ PgmError pgm_text_get_outline_color (PgmText *text, guchar *red, guchar *green, guchar *blue, guchar *alpha) { g_return_val_if_fail (PGM_IS_TEXT (text), PGM_ERROR_X); g_return_val_if_fail (red != NULL, PGM_ERROR_X); g_return_val_if_fail (green != NULL, PGM_ERROR_X); g_return_val_if_fail (blue != NULL, PGM_ERROR_X); g_return_val_if_fail (alpha != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (text); *red = text->outline_r; *green = text->outline_g; *blue = text->outline_b; *alpha = text->outline_a; GST_OBJECT_UNLOCK (text); return PGM_ERROR_OK; } /** * pgm_text_set_outline_width: * @text: a #PgmText object. * @width: the text outline width. * * Sets the outline width (thickness) of @text to @width in canvas coordinates. * The default value is 0.0f. * * MT safe. * * Returns: A #PgmError indicating success/failure. */ PgmError pgm_text_set_outline_width (PgmText *text, gfloat width) { g_return_val_if_fail (PGM_IS_TEXT (text), PGM_ERROR_X); GST_OBJECT_LOCK (text); text->outline_width = MAX (0.0f, width); GST_OBJECT_UNLOCK (text); _pgm_drawable_emit_changed (PGM_DRAWABLE (text), PGM_TEXT_OUTLINE_WIDTH); return PGM_ERROR_OK; } /** * pgm_text_get_outline_width: * @text: a #PgmText object. * @width: a pointer to a #gfloat where the text outline width is going to be * stored. * * Retrieves the outline width (thickness) of @text in @width. * * MT safe. * * Returns: A #PgmError indicating success/failure. */ PgmError pgm_text_get_outline_width (PgmText *text, gfloat *width) { g_return_val_if_fail (PGM_IS_TEXT (text), PGM_ERROR_X); g_return_val_if_fail (width != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (text); *width = text->outline_width; GST_OBJECT_UNLOCK (text); return PGM_ERROR_OK; } /** * pgm_text_set_cast_shadow: * @text: a #PgmText object. * @cast_shadow: the shadow casting state. * * Sets the shadow casting state of @text to @cast_shadow. When shadow casting * is enabled, the text is displayed with a shadow behind it. The default value * is #FALSE. * * MT safe. * * Returns: A #PgmError indicating success/failure. */ PgmError pgm_text_set_cast_shadow (PgmText *text, gboolean cast_shadow) { g_return_val_if_fail (PGM_IS_TEXT (text), PGM_ERROR_X); GST_OBJECT_LOCK (text); if (cast_shadow == text->cast_shadow) { GST_OBJECT_UNLOCK (text); return PGM_ERROR_OK; } text->cast_shadow = cast_shadow; GST_OBJECT_UNLOCK (text); _pgm_drawable_emit_changed (PGM_DRAWABLE (text), PGM_TEXT_CAST_SHADOW); return PGM_ERROR_OK; } /** * pgm_text_get_cast_shadow: * @text: a #PgmText object. * @cast_shadow: a pointer to a #gboolean where the shadow casting state is * going to be stored. * * Retrieves the shadow casting state of @text in @cast_shadow. * * MT safe. * * Returns: A #PgmError indicating success/failure. */ PgmError pgm_text_get_cast_shadow (PgmText *text, gboolean *cast_shadow) { g_return_val_if_fail (PGM_IS_TEXT (text), PGM_ERROR_X); g_return_val_if_fail (cast_shadow != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (text); *cast_shadow = text->cast_shadow; GST_OBJECT_UNLOCK (text); return PGM_ERROR_OK; } /** * pgm_text_set_shadow_position: * @text: a #PgmText object. * @position: the text shadow position. * * Sets the shadow position of @text to @position. The default value is * #PGM_TEXT_SHADOW_TOP. * * MT safe. * * Returns: A #PgmError indicating success/failure. */ PgmError pgm_text_set_shadow_position (PgmText *text, PgmTextShadowPosition position) { g_return_val_if_fail (PGM_IS_TEXT (text), PGM_ERROR_X); GST_OBJECT_LOCK (text); text->shadow_position = position; GST_OBJECT_UNLOCK (text); _pgm_drawable_emit_changed (PGM_DRAWABLE (text), PGM_TEXT_SHADOW_POSITION); return PGM_ERROR_OK; } /** * pgm_text_get_shadow_position: * @text: a #PgmText object. * @position: a pointer to a #PgmTextShadowPosition where the text shadow * position is going to be stored. * * Retrieves the shadow position of @text in @position. * * MT safe. * * Returns: A #PgmError indicating success/failure. */ PgmError pgm_text_get_shadow_position (PgmText *text, PgmTextShadowPosition *position) { g_return_val_if_fail (PGM_IS_TEXT (text), PGM_ERROR_X); g_return_val_if_fail (position != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (text); *position = text->shadow_position; GST_OBJECT_UNLOCK (text); return PGM_ERROR_OK; } /** * pgm_text_set_shadow_color: * @text: a #PgmText object. * @red: the text shadow red color component. * @green: the text shadow green color component. * @blue: the text shadow blue color component. * @alpha: the text shadow alpha color component. * * Sets the shadow color of @text to (@red, @green, @blue, @alpha). * * MT safe. * * Returns: A #PgmError indicating success/failure. */ PgmError pgm_text_set_shadow_color (PgmText *text, guchar red, guchar green, guchar blue, guchar alpha) { g_return_val_if_fail (PGM_IS_TEXT (text), PGM_ERROR_X); GST_OBJECT_LOCK (text); text->shadow_r = red; text->shadow_g = green; text->shadow_b = blue; text->shadow_a = alpha; GST_OBJECT_UNLOCK (text); _pgm_drawable_emit_changed (PGM_DRAWABLE (text), PGM_TEXT_SHADOW_COLOR); return PGM_ERROR_OK; } /** * pgm_text_get_shadow_color: * @text: a #PgmText object. * @red: a pointer to a #guchar where the shadow red color component is going * to be stored. * @green: a pointer to a #guchar where the shadow green color component is * going to be stored. * @blue: a pointer to a #guchar where the shadow blue color component is going * to be stored. * @alpha: a pointer to a #guchar where the shadow alpha color component is * going to be stored. * * Retrieves the shadow color of @text in (@red, @green, @blue, @alpha). * * MT safe. * * Returns: A #PgmError indicating success/failure. */ PgmError pgm_text_get_shadow_color (PgmText *text, guchar *red, guchar *green, guchar *blue, guchar *alpha) { g_return_val_if_fail (PGM_IS_TEXT (text), PGM_ERROR_X); g_return_val_if_fail (red != NULL, PGM_ERROR_X); g_return_val_if_fail (green != NULL, PGM_ERROR_X); g_return_val_if_fail (blue != NULL, PGM_ERROR_X); g_return_val_if_fail (alpha != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (text); *red = text->shadow_r; *green = text->shadow_g; *blue = text->shadow_b; *alpha = text->shadow_a; GST_OBJECT_UNLOCK (text); return PGM_ERROR_OK; } pigment-0.3.17/pgm/pgmevents.h0000644000175000017500000003125611205034416013135 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment media rendering library * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ #ifndef __PGM_EVENTS_H__ #define __PGM_EVENTS_H__ /* pgmevents.h and pgmviewport.h include eachother */ typedef struct _PgmEventAny PgmEventAny; typedef struct _PgmEventMotion PgmEventMotion; typedef struct _PgmEventButton PgmEventButton; typedef struct _PgmEventScroll PgmEventScroll; typedef struct _PgmEventKey PgmEventKey; typedef struct _PgmEventExpose PgmEventExpose; typedef struct _PgmEventConfigure PgmEventConfigure; typedef struct _PgmEventDnd PgmEventDnd; typedef struct _PgmEventState PgmEventState; typedef struct _PgmEventWin32Message PgmEventWin32Message; typedef union _PgmEvent PgmEvent; #include #ifdef WIN32 #include #endif /* WIN32 */ G_BEGIN_DECLS #define PGM_TYPE_EVENT (pgm_event_get_type ()) /** * PgmEventType: * @PGM_NOTHING: a special code to indicate a null event. * @PGM_MOTION_NOTIFY: the pointer has entered the window. * @PGM_BUTTON_PRESS: a mouse button has been pressed. * @PGM_DOUBLE_BUTTON_PRESS: a mouse button has been clicked 2 times in a short * period of time. Note that each click also generates a %PGM_BUTTON_PRESS * event. * @PGM_TRIPLE_BUTTON_PRESS: a mouse button has been clicked 3 times in a short * period of time. Note that each click also generates a %PGM_BUTTON_PRESS * event. * @PGM_BUTTON_PRESSURE: a mouse button pressure has changed. * @PGM_BUTTON_RELEASE: a mouse button has been released. * @PGM_KEY_PRESS: a key has been pressed. * @PGM_KEY_RELEASE: a key has been released. * @PGM_EXPOSE: the window has become visible and needs to be redrawn. * @PGM_CONFIGURE: the size or the position of the viewport has changed. * @PGM_DRAG_MOTION: the mouse has moved in the viewport while a drag is in * progress. * @PGM_DRAG_DROP: the mouse has dropped data onto the viewport. * @PGM_DRAG_LEAVE: the mouse has left the viewport while a drag is in progress. * @PGM_SCROLL: the scroll wheel was turned. * @PGM_STATE: the state of a viewport has changed. * @PGM_DELETE: the window manager has requested that the toplevel window be * destroyed, usually when the user clicks on a special icon in the title bar. * @PGM_WIN32_MESSAGE: a Win32 message has been received (Only used on Windows). * * Specifies the type of the event. */ typedef enum { PGM_NOTHING = -1, PGM_MOTION_NOTIFY = 0, PGM_BUTTON_PRESS = 1, PGM_DOUBLE_BUTTON_PRESS = 2, PGM_TRIPLE_BUTTON_PRESS = 3, PGM_BUTTON_PRESSURE = 4, PGM_BUTTON_RELEASE = 5, PGM_KEY_PRESS = 6, PGM_KEY_RELEASE = 7, PGM_EXPOSE = 8, PGM_CONFIGURE = 9, PGM_DRAG_MOTION = 10, PGM_DRAG_DROP = 12, PGM_DRAG_LEAVE = 13, PGM_SCROLL = 14, PGM_STATE = 15, PGM_DELETE = 16, PGM_WIN32_MESSAGE = 17 } PgmEventType; /** * PgmModifierType: * @PGM_SHIFT_MASK: the Shift key. * @PGM_CAPSLOCK_MASK: the Caps Lock. * @PGM_CONTROL_MASK: the Control key. * @PGM_ALT_MASK: the Alt key. * @PGM_NUMLOCK_MASK: the Num Lock. * * A set of bit-flags to indicate the state of modifier keys. Typical modifier * keys are Shift, Control, Alt and CapsLock. */ typedef enum { PGM_SHIFT_MASK = (1 << 0), PGM_CAPSLOCK_MASK = (1 << 1), PGM_CONTROL_MASK = (1 << 2), PGM_ALT_MASK = (1 << 3), PGM_NUMLOCK_MASK = (1 << 4) } PgmModifierType; /** * PgmButtonType: * @PGM_BUTTON_LEFT: the left mouse button. * @PGM_BUTTON_MIDDLE: the middle mouse button. * @PGM_BUTTON_RIGHT: the right mouse button. * * The mouse button type. */ typedef enum { PGM_BUTTON_LEFT = (1 << 0), PGM_BUTTON_MIDDLE = (1 << 1), PGM_BUTTON_RIGHT = (1 << 2) } PgmButtonType; /** * PgmScrollDirection: * @PGM_SCROLL_UP: the scrolling in the upward direction. * @PGM_SCROLL_DOWN: the scrolling in the downward direction. * * The mouse wheel scrolling directions. */ typedef enum { PGM_SCROLL_UP, PGM_SCROLL_DOWN } PgmScrollDirection; /** * PgmViewportState: * @PGM_VIEWPORT_ICONIFIED: The viewport is minimized. * * Specifies the state of a viewport. */ typedef enum { PGM_VIEWPORT_ICONIFIED = (1 << 0) } PgmViewportState; /** * PgmEventAny: * @type: the type of the event. * @source: the source field that can be filled by applications to indicate the * source of the event (mouse, pen, remote control, etc). * * Contains the fields which are common to all event structs. Any event * pointer can safely be cast to a pointer to a #PgmEventAny to access these * fields. */ struct _PgmEventAny { PgmEventType type; guint8 source; }; /** * PgmEventMotion: * @type: the type of the event. * @source: the source field that can be filled by applications to indicate the * source of the event (mouse, pen, remote control, etc). * @time: the time of the event in milliseconds. * @x: the x coordinate of the pointer relative to the window. * @y: the y coordinate of the pointer relative to the window. * @pressure: the pressure force, set to 0 when not used with a touch screen. * * Generated when the pointer moves. */ struct _PgmEventMotion { PgmEventType type; guint8 source; guint32 time; gfloat x, y; guint32 pressure; }; /** * PgmEventButton: * @type: the type of the event. * @source: the source field that can be filled by applications to indicate the * source of the event (mouse, pen, remote control, etc). * @time: the time of the event in milliseconds. * @x: the x coordinate of the pointer relative to the window. * @y: the y coordinate of the pointer relative to the window. * @button: the button which was pressed or released. * @pressure: the pressure force, set to 0 when not used with a touch screen. * * Used for button press and button release events. */ struct _PgmEventButton { PgmEventType type; guint8 source; guint32 time; gfloat x, y; PgmButtonType button; guint32 pressure; }; /** * PgmEventScroll: * @type: the type of the event. * @source: the source field that can be filled by applications to indicate the * source of the event (mouse, pen, remote control, etc). * @time: the time of the event in milliseconds. * @x: the x coordinate of the pointer relative to the window. * @y: the y coordinate of the pointer relative to the window. * @direction: the scroll wheel direction. * * Generated when the mouse wheel is turned. */ struct _PgmEventScroll { PgmEventType type; guint8 source; guint32 time; gfloat x, y; PgmScrollDirection direction; }; /** * PgmEventKey: * @type: the type of the event. * @source: the source field that can be filled by applications to indicate the * source of the event (mouse, pen, remote control, etc). * @time: the time of the event in milliseconds. * @modifier: A bit-mask representing the state of the modifier keys (e.g. * Control, Shift and Alt), see #PgmModifierType. * @keyval: the key that was pressed or released. See the pgm/pgmkeysyms.h * header file for a complete list of Pigment key codes. * @hardware_keycode: the raw code of the key that was pressed or released. * * Describes a key press or key release event. */ struct _PgmEventKey { PgmEventType type; guint8 source; guint32 time; guint modifier; guint keyval; guint16 hardware_keycode; }; /** * PgmEventExpose: * @type: the type of the event. * @source: the source field that can be filled by applications to indicate the * source of the event (mouse, pen, remote control, etc). * * Generated when a window becomes visible and needs to be redrawn. */ struct _PgmEventExpose { PgmEventType type; guint8 source; }; /** * PgmEventConfigure: * @type: the type of the event. * @source: the source field that can be filled by applications to indicate the * source of the event (mouse, pen, remote control, etc). * @x: the new x coordinate of the window. * @y: the new y coordinate of the window. * @width: the new width of the viewport. * @height: the new height of the viewport. * * Generated when a viewport size or position has changed. */ struct _PgmEventConfigure { PgmEventType type; guint8 source; gint x, y; gint width, height; }; /** * PgmEventDnd: * @type: the type of the event. * @source: the source field that can be filled by applications to indicate the * source of the event (mouse, pen, remote control, etc). * @time: the time of the event in milliseconds. * @x: the new x coordinate of the window. * @y: the new y coordinate of the window. * @uri: the list of URI as a #NULL-terminated array of strings. * * Describes a drag motion, drop, or leave event. */ struct _PgmEventDnd { PgmEventType type; guint8 source; guint32 time; gfloat x, y; gchar **uri; }; /** * PgmEventState: * @type: the type of the event. * @source: the source field that can be filled by applications to indicate the * source of the event (mouse, pen, remote control, etc). * @changed_mask: mask specifying what viewport flags have changed. * @state_mask: mask specifying the new viewport flags. * * Generated when the state of a viewport changes. */ struct _PgmEventState { PgmEventType type; guint8 source; PgmViewportState changed_mask; PgmViewportState state_mask; }; #ifdef WIN32 /** * PgmEventWin32Message: * @type: the type of the event. * @source: the source field that can be filled by applications to indicate the * source of the event (mouse, pen, remote control, etc). * @time: the time of the event in milliseconds. * @message: the Win32 message value. * @wparam: additional message information depending on the message value. * @lparam: additional message information depending on the message value. * * Describes a Win32 message. */ struct _PgmEventWin32Message { PgmEventType type; guint8 source; guint32 time; UINT message; WPARAM wparam; LPARAM lparam; }; #endif /* WIN32 */ /** * PgmEvent: * * * The #PgmEvent struct contains a union of all of the event structs, * and allows access to the data fields in a number of ways. * * * The event type is always the first field in all of the event structs, and * can always be accessed with the following code, no matter what type of event * it is: * * * PgmEvent *event; * PgmEventType type; * type = event->type; * * * * * To access other fields of the event structs, the pointer to the event can be * cast to the appropriate event struct pointer, or the union member name can be * used. For example if the event type is %PGM_BUTTON_PRESS then the x coordinate * of the button press can be accessed with: * * * PgmEvent *event; * gfloat x; * x = ((PgmEventButton*) event)->x; * * * or with: * * * PgmEvent *event; * gfloat x; * x = event->button.x; * * * */ union _PgmEvent { PgmEventType type; PgmEventAny any; PgmEventMotion motion; PgmEventButton button; PgmEventScroll scroll; PgmEventKey key; PgmEventExpose expose; PgmEventConfigure configure; PgmEventDnd dnd; PgmEventState state; #ifdef WIN32 PgmEventWin32Message win32_message; #endif /* WIN32 */ }; GType pgm_event_get_type (void); PgmEvent *pgm_event_new (PgmEventType type); PgmEvent *pgm_event_copy (PgmEvent *event); void pgm_event_free (PgmEvent *event); guint32 pgm_keyval_to_unicode (guint keyval) G_GNUC_CONST; G_END_DECLS #endif /* __PGM_EVENTS_H__ */ pigment-0.3.17/pgm/Makefile.in0000644000175000017500000014104511205034672013023 00000000000000# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @USE_IMAGING_LIBRARY_TRUE@am__append_1 = imaging @USE_GTK_WIDGET_TRUE@am__append_2 = gtk subdir = pgm DIST_COMMON = $(libpigment_@PGM_MAJORMINOR@_include_HEADERS) \ $(pgminclude_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/pgmversion.h.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/as-compiler-flag.m4 \ $(top_srcdir)/common/m4/as-version.m4 \ $(top_srcdir)/common/m4/check.m4 \ $(top_srcdir)/common/m4/gst-args.m4 \ $(top_srcdir)/common/m4/gst-check.m4 \ $(top_srcdir)/common/m4/gst-error.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/libtool.m4 \ $(top_srcdir)/common/m4/ltoptions.m4 \ $(top_srcdir)/common/m4/ltsugar.m4 \ $(top_srcdir)/common/m4/ltversion.m4 \ $(top_srcdir)/common/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = pgmversion.h am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" \ "$(DESTDIR)$(libpigment_@PGM_MAJORMINOR@_includedir)" \ "$(DESTDIR)$(pgmincludedir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = libpigment_@PGM_MAJORMINOR@_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am__objects_1 = libpigment_@PGM_MAJORMINOR@_la-pgmmarshal.lo am__objects_2 = libpigment_@PGM_MAJORMINOR@_la-pgm.lo \ libpigment_@PGM_MAJORMINOR@_la-pgmcanvas.lo \ libpigment_@PGM_MAJORMINOR@_la-pgmcommon.lo \ libpigment_@PGM_MAJORMINOR@_la-pgmdrawable.lo \ libpigment_@PGM_MAJORMINOR@_la-pgmevents.lo \ libpigment_@PGM_MAJORMINOR@_la-pgmimage.lo \ libpigment_@PGM_MAJORMINOR@_la-pgmtext.lo \ libpigment_@PGM_MAJORMINOR@_la-pgmviewport.lo \ libpigment_@PGM_MAJORMINOR@_la-pgmviewportfactory.lo \ libpigment_@PGM_MAJORMINOR@_la-pgmmodule.lo \ libpigment_@PGM_MAJORMINOR@_la-pgmlinearalgebra.lo \ libpigment_@PGM_MAJORMINOR@_la-pgmimagesink.lo \ libpigment_@PGM_MAJORMINOR@_la-pgmenumtypes.lo am_libpigment_@PGM_MAJORMINOR@_la_OBJECTS = $(am__objects_1) \ $(am__objects_2) libpigment_@PGM_MAJORMINOR@_la_OBJECTS = \ $(am_libpigment_@PGM_MAJORMINOR@_la_OBJECTS) libpigment_@PGM_MAJORMINOR@_la_LINK = $(LIBTOOL) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(libpigment_@PGM_MAJORMINOR@_la_CFLAGS) $(CFLAGS) \ $(libpigment_@PGM_MAJORMINOR@_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libpigment_@PGM_MAJORMINOR@_la_SOURCES) DIST_SOURCES = $(libpigment_@PGM_MAJORMINOR@_la_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive libpigment_@PGM_MAJORMINOR@_includeHEADERS_INSTALL = $(INSTALL_HEADER) pgmincludeHEADERS_INSTALL = $(INSTALL_HEADER) HEADERS = $(libpigment_@PGM_MAJORMINOR@_include_HEADERS) \ $(pgminclude_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = . imaging gtk DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAIROXLIB_CFLAGS = @CAIROXLIB_CFLAGS@ CAIROXLIB_LIBS = @CAIROXLIB_LIBS@ CAIRO_CFLAGS = @CAIRO_CFLAGS@ CAIRO_LIBS = @CAIRO_LIBS@ CC = @CC@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXEEXT = @EXEEXT@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ GCOV = @GCOV@ GCOV_CFLAGS = @GCOV_CFLAGS@ GCOV_LIBS = @GCOV_LIBS@ GDKPIXBUFXLIB_CFLAGS = @GDKPIXBUFXLIB_CFLAGS@ GDKPIXBUFXLIB_LIBS = @GDKPIXBUFXLIB_LIBS@ GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@ GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ GST_0_10_13_CFLAGS = @GST_0_10_13_CFLAGS@ GST_0_10_13_LIBS = @GST_0_10_13_LIBS@ GST_10_10_CFLAGS = @GST_10_10_CFLAGS@ GST_10_10_LIBS = @GST_10_10_LIBS@ GST_10_11_CFLAGS = @GST_10_11_CFLAGS@ GST_10_11_LIBS = @GST_10_11_LIBS@ GST_10_12_CFLAGS = @GST_10_12_CFLAGS@ GST_10_12_LIBS = @GST_10_12_LIBS@ GST_10_13_CFLAGS = @GST_10_13_CFLAGS@ GST_10_13_LIBS = @GST_10_13_LIBS@ GST_10_14_CFLAGS = @GST_10_14_CFLAGS@ GST_10_14_LIBS = @GST_10_14_LIBS@ GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ GST_BASE_LIBS = @GST_BASE_LIBS@ GST_CFLAGS = @GST_CFLAGS@ GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ GST_CHECK_LIBS = @GST_CHECK_LIBS@ GST_LIBS = @GST_LIBS@ GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ GST_TOOLS_DIR = @GST_TOOLS_DIR@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_GTK_WIDGET = @HAVE_GTK_WIDGET@ HAVE_IMAGING_LIBRARY = @HAVE_IMAGING_LIBRARY@ HAVE_OPENGLES_PLUGIN = @HAVE_OPENGLES_PLUGIN@ HAVE_OPENGL_PLUGIN = @HAVE_OPENGL_PLUGIN@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGLADE_2_0_CFLAGS = @LIBGLADE_2_0_CFLAGS@ LIBGLADE_2_0_LIBS = @LIBGLADE_2_0_LIBS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENGLES_BACKEND = @OPENGLES_BACKEND@ OPENGL_BACKEND = @OPENGL_BACKEND@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ PANGOCAIRO_CFLAGS = @PANGOCAIRO_CFLAGS@ PANGOCAIRO_LIBS = @PANGOCAIRO_LIBS@ PANGO_1_16_CFLAGS = @PANGO_1_16_CFLAGS@ PANGO_1_16_LIBS = @PANGO_1_16_LIBS@ PANGO_CFLAGS = @PANGO_CFLAGS@ PANGO_LIBS = @PANGO_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL_PATH = @PERL_PATH@ PGM_ALL_CFLAGS = @PGM_ALL_CFLAGS@ PGM_ALL_LDFLAGS = @PGM_ALL_LDFLAGS@ PGM_ALL_LIBS = @PGM_ALL_LIBS@ PGM_GLES_CFLAGS = @PGM_GLES_CFLAGS@ PGM_GLES_LIBS = @PGM_GLES_LIBS@ PGM_GL_CFLAGS = @PGM_GL_CFLAGS@ PGM_GL_LIBS = @PGM_GL_LIBS@ PGM_GTKDOC_CFLAGS = @PGM_GTKDOC_CFLAGS@ PGM_LIB_LDFLAGS = @PGM_LIB_LDFLAGS@ PGM_LT_LDFLAGS = @PGM_LT_LDFLAGS@ PGM_LT_VERSION = @PGM_LT_VERSION@ PGM_MAJORMINOR = @PGM_MAJORMINOR@ PGM_OBJ_CFLAGS = @PGM_OBJ_CFLAGS@ PGM_OBJ_LIBS = @PGM_OBJ_LIBS@ PGM_OPTION_CFLAGS = @PGM_OPTION_CFLAGS@ PGM_PLUGIN_LDFLAGS = @PGM_PLUGIN_LDFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PLUGIN_PATH = @PLUGIN_PATH@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XCOMPOSITE_CFLAGS = @XCOMPOSITE_CFLAGS@ XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ XMKMF = @XMKMF@ XRENDER_CFLAGS = @XRENDER_CFLAGS@ XRENDER_LIBS = @XRENDER_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cairo_req = @cairo_req@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ glib_req = @glib_req@ gstreamer_plugins_base_req = @gstreamer_plugins_base_req@ gstreamer_req = @gstreamer_req@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pango_req = @pango_req@ pangocairo_req = @pangocairo_req@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = . $(am__append_1) $(am__append_2) MARSHAL_SRC_FILES = pgmmarshal.c MARSHAL_H_FILES = pgmmarshal.h MARSHALFILES = $(MARSHAL_SRC_FILES) $(MARSHAL_H_FILES) ENUM_SRC_FILES = pgmenumtypes.c ENUM_H_FILES = pgmenumtypes.h ENUMFILES = $(ENUM_SRC_FILES) $(ENUM_H_FILES) GLIB_GENMARSHAL = `pkg-config --variable=glib_genmarshal glib-2.0` GLIB_MKENUMS = `pkg-config --variable=glib_mkenums glib-2.0` BUILT_SOURCES = \ $(MARSHALFILES) \ $(ENUMFILES) source_h = \ $(srcdir)/pgm.h \ $(srcdir)/pgmcanvas.h \ $(srcdir)/pgmcommon.h \ $(srcdir)/pgmdrawable.h \ $(srcdir)/pgmevents.h \ $(srcdir)/pgmimage.h \ $(srcdir)/pgmplugin.h \ $(srcdir)/pgmtext.h \ $(srcdir)/pgmviewport.h \ $(srcdir)/pgmviewportfactory.h \ $(srcdir)/pgmlinearalgebra.h \ $(srcdir)/pgmimagesink.h \ $(srcdir)/pgmmodule.h \ $(srcdir)/pgmkeysyms.h \ pgmenumtypes.h pgmincludedir = $(includedir)/pigment-@PGM_MAJORMINOR@/pgm pgminclude_HEADERS = $(source_h) CLEANFILES = \ $(BUILT_SOURCES) \ stamp-pgmenumtypes.h \ *.gcno \ *.gcda \ *.gcov \ *.gcov.out source_c = \ $(srcdir)/pgm.c \ $(srcdir)/pgmcanvas.c \ $(srcdir)/pgmcommon.c \ $(srcdir)/pgmdrawable.c \ $(srcdir)/pgmevents.c \ $(srcdir)/pgmimage.c \ $(srcdir)/pgmtext.c \ $(srcdir)/pgmviewport.c \ $(srcdir)/pgmviewportfactory.c \ $(srcdir)/pgmmodule.c \ $(srcdir)/pgmlinearalgebra.c \ $(srcdir)/pgmimagesink.c \ pgmenumtypes.c libpigment_@PGM_MAJORMINOR@_la_SOURCES = \ $(MARSHAL_SRC_FILES) \ $(source_c) lib_LTLIBRARIES = libpigment-@PGM_MAJORMINOR@.la libpigment_@PGM_MAJORMINOR@_la_CFLAGS = \ $(PGM_OPTION_CFLAGS) \ $(PGM_ALL_CFLAGS) libpigment_@PGM_MAJORMINOR@_la_LIBADD = $(PGM_ALL_LIBS) libpigment_@PGM_MAJORMINOR@_la_LDFLAGS = \ $(PGM_LIB_LDFLAGS) \ $(PGM_ALL_LDFLAGS) \ $(PGM_LT_LDFLAGS) libpigment_@PGM_MAJORMINOR@_includedir = \ $(includedir)/pigment-@PGM_MAJORMINOR@/pgm libpigment_@PGM_MAJORMINOR@_include_HEADERS = \ $(source_h) \ pgmmarshal.h \ pgmenumtypes.h \ pgmversion.h EXTRA_DIST = \ pgmmarshal.list \ pgmversion.h.in DISTCLEANFILES = \ $(MARSHALFILES) \ $(ENUMFILES) \ pgmversion.h all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu pgm/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu pgm/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh pgmversion.h: $(top_builddir)/config.status $(srcdir)/pgmversion.h.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libpigment-@PGM_MAJORMINOR@.la: $(libpigment_@PGM_MAJORMINOR@_la_OBJECTS) $(libpigment_@PGM_MAJORMINOR@_la_DEPENDENCIES) $(libpigment_@PGM_MAJORMINOR@_la_LINK) -rpath $(libdir) $(libpigment_@PGM_MAJORMINOR@_la_OBJECTS) $(libpigment_@PGM_MAJORMINOR@_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmcanvas.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmcommon.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmdrawable.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmenumtypes.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmevents.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmimage.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmimagesink.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmlinearalgebra.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmmarshal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmmodule.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmtext.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmviewport.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmviewportfactory.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libpigment_@PGM_MAJORMINOR@_la-pgmmarshal.lo: pgmmarshal.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpigment_@PGM_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT libpigment_@PGM_MAJORMINOR@_la-pgmmarshal.lo -MD -MP -MF $(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmmarshal.Tpo -c -o libpigment_@PGM_MAJORMINOR@_la-pgmmarshal.lo `test -f 'pgmmarshal.c' || echo '$(srcdir)/'`pgmmarshal.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmmarshal.Tpo $(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmmarshal.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pgmmarshal.c' object='libpigment_@PGM_MAJORMINOR@_la-pgmmarshal.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpigment_@PGM_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o libpigment_@PGM_MAJORMINOR@_la-pgmmarshal.lo `test -f 'pgmmarshal.c' || echo '$(srcdir)/'`pgmmarshal.c libpigment_@PGM_MAJORMINOR@_la-pgm.lo: $(srcdir)/pgm.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpigment_@PGM_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT libpigment_@PGM_MAJORMINOR@_la-pgm.lo -MD -MP -MF $(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgm.Tpo -c -o libpigment_@PGM_MAJORMINOR@_la-pgm.lo `test -f '$(srcdir)/pgm.c' || echo '$(srcdir)/'`$(srcdir)/pgm.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgm.Tpo $(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgm.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/pgm.c' object='libpigment_@PGM_MAJORMINOR@_la-pgm.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpigment_@PGM_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o libpigment_@PGM_MAJORMINOR@_la-pgm.lo `test -f '$(srcdir)/pgm.c' || echo '$(srcdir)/'`$(srcdir)/pgm.c libpigment_@PGM_MAJORMINOR@_la-pgmcanvas.lo: $(srcdir)/pgmcanvas.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpigment_@PGM_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT libpigment_@PGM_MAJORMINOR@_la-pgmcanvas.lo -MD -MP -MF $(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmcanvas.Tpo -c -o libpigment_@PGM_MAJORMINOR@_la-pgmcanvas.lo `test -f '$(srcdir)/pgmcanvas.c' || echo '$(srcdir)/'`$(srcdir)/pgmcanvas.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmcanvas.Tpo $(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmcanvas.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/pgmcanvas.c' object='libpigment_@PGM_MAJORMINOR@_la-pgmcanvas.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpigment_@PGM_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o libpigment_@PGM_MAJORMINOR@_la-pgmcanvas.lo `test -f '$(srcdir)/pgmcanvas.c' || echo '$(srcdir)/'`$(srcdir)/pgmcanvas.c libpigment_@PGM_MAJORMINOR@_la-pgmcommon.lo: $(srcdir)/pgmcommon.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpigment_@PGM_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT libpigment_@PGM_MAJORMINOR@_la-pgmcommon.lo -MD -MP -MF $(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmcommon.Tpo -c -o libpigment_@PGM_MAJORMINOR@_la-pgmcommon.lo `test -f '$(srcdir)/pgmcommon.c' || echo '$(srcdir)/'`$(srcdir)/pgmcommon.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmcommon.Tpo $(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmcommon.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/pgmcommon.c' object='libpigment_@PGM_MAJORMINOR@_la-pgmcommon.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpigment_@PGM_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o libpigment_@PGM_MAJORMINOR@_la-pgmcommon.lo `test -f '$(srcdir)/pgmcommon.c' || echo '$(srcdir)/'`$(srcdir)/pgmcommon.c libpigment_@PGM_MAJORMINOR@_la-pgmdrawable.lo: $(srcdir)/pgmdrawable.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpigment_@PGM_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT libpigment_@PGM_MAJORMINOR@_la-pgmdrawable.lo -MD -MP -MF $(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmdrawable.Tpo -c -o libpigment_@PGM_MAJORMINOR@_la-pgmdrawable.lo `test -f '$(srcdir)/pgmdrawable.c' || echo '$(srcdir)/'`$(srcdir)/pgmdrawable.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmdrawable.Tpo $(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmdrawable.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/pgmdrawable.c' object='libpigment_@PGM_MAJORMINOR@_la-pgmdrawable.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpigment_@PGM_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o libpigment_@PGM_MAJORMINOR@_la-pgmdrawable.lo `test -f '$(srcdir)/pgmdrawable.c' || echo '$(srcdir)/'`$(srcdir)/pgmdrawable.c libpigment_@PGM_MAJORMINOR@_la-pgmevents.lo: $(srcdir)/pgmevents.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpigment_@PGM_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT libpigment_@PGM_MAJORMINOR@_la-pgmevents.lo -MD -MP -MF $(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmevents.Tpo -c -o libpigment_@PGM_MAJORMINOR@_la-pgmevents.lo `test -f '$(srcdir)/pgmevents.c' || echo '$(srcdir)/'`$(srcdir)/pgmevents.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmevents.Tpo $(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmevents.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/pgmevents.c' object='libpigment_@PGM_MAJORMINOR@_la-pgmevents.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpigment_@PGM_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o libpigment_@PGM_MAJORMINOR@_la-pgmevents.lo `test -f '$(srcdir)/pgmevents.c' || echo '$(srcdir)/'`$(srcdir)/pgmevents.c libpigment_@PGM_MAJORMINOR@_la-pgmimage.lo: $(srcdir)/pgmimage.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpigment_@PGM_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT libpigment_@PGM_MAJORMINOR@_la-pgmimage.lo -MD -MP -MF $(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmimage.Tpo -c -o libpigment_@PGM_MAJORMINOR@_la-pgmimage.lo `test -f '$(srcdir)/pgmimage.c' || echo '$(srcdir)/'`$(srcdir)/pgmimage.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmimage.Tpo $(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmimage.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/pgmimage.c' object='libpigment_@PGM_MAJORMINOR@_la-pgmimage.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpigment_@PGM_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o libpigment_@PGM_MAJORMINOR@_la-pgmimage.lo `test -f '$(srcdir)/pgmimage.c' || echo '$(srcdir)/'`$(srcdir)/pgmimage.c libpigment_@PGM_MAJORMINOR@_la-pgmtext.lo: $(srcdir)/pgmtext.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpigment_@PGM_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT libpigment_@PGM_MAJORMINOR@_la-pgmtext.lo -MD -MP -MF $(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmtext.Tpo -c -o libpigment_@PGM_MAJORMINOR@_la-pgmtext.lo `test -f '$(srcdir)/pgmtext.c' || echo '$(srcdir)/'`$(srcdir)/pgmtext.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmtext.Tpo $(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmtext.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/pgmtext.c' object='libpigment_@PGM_MAJORMINOR@_la-pgmtext.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpigment_@PGM_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o libpigment_@PGM_MAJORMINOR@_la-pgmtext.lo `test -f '$(srcdir)/pgmtext.c' || echo '$(srcdir)/'`$(srcdir)/pgmtext.c libpigment_@PGM_MAJORMINOR@_la-pgmviewport.lo: $(srcdir)/pgmviewport.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpigment_@PGM_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT libpigment_@PGM_MAJORMINOR@_la-pgmviewport.lo -MD -MP -MF $(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmviewport.Tpo -c -o libpigment_@PGM_MAJORMINOR@_la-pgmviewport.lo `test -f '$(srcdir)/pgmviewport.c' || echo '$(srcdir)/'`$(srcdir)/pgmviewport.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmviewport.Tpo $(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmviewport.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/pgmviewport.c' object='libpigment_@PGM_MAJORMINOR@_la-pgmviewport.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpigment_@PGM_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o libpigment_@PGM_MAJORMINOR@_la-pgmviewport.lo `test -f '$(srcdir)/pgmviewport.c' || echo '$(srcdir)/'`$(srcdir)/pgmviewport.c libpigment_@PGM_MAJORMINOR@_la-pgmviewportfactory.lo: $(srcdir)/pgmviewportfactory.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpigment_@PGM_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT libpigment_@PGM_MAJORMINOR@_la-pgmviewportfactory.lo -MD -MP -MF $(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmviewportfactory.Tpo -c -o libpigment_@PGM_MAJORMINOR@_la-pgmviewportfactory.lo `test -f '$(srcdir)/pgmviewportfactory.c' || echo '$(srcdir)/'`$(srcdir)/pgmviewportfactory.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmviewportfactory.Tpo $(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmviewportfactory.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/pgmviewportfactory.c' object='libpigment_@PGM_MAJORMINOR@_la-pgmviewportfactory.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpigment_@PGM_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o libpigment_@PGM_MAJORMINOR@_la-pgmviewportfactory.lo `test -f '$(srcdir)/pgmviewportfactory.c' || echo '$(srcdir)/'`$(srcdir)/pgmviewportfactory.c libpigment_@PGM_MAJORMINOR@_la-pgmmodule.lo: $(srcdir)/pgmmodule.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpigment_@PGM_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT libpigment_@PGM_MAJORMINOR@_la-pgmmodule.lo -MD -MP -MF $(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmmodule.Tpo -c -o libpigment_@PGM_MAJORMINOR@_la-pgmmodule.lo `test -f '$(srcdir)/pgmmodule.c' || echo '$(srcdir)/'`$(srcdir)/pgmmodule.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmmodule.Tpo $(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmmodule.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/pgmmodule.c' object='libpigment_@PGM_MAJORMINOR@_la-pgmmodule.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpigment_@PGM_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o libpigment_@PGM_MAJORMINOR@_la-pgmmodule.lo `test -f '$(srcdir)/pgmmodule.c' || echo '$(srcdir)/'`$(srcdir)/pgmmodule.c libpigment_@PGM_MAJORMINOR@_la-pgmlinearalgebra.lo: $(srcdir)/pgmlinearalgebra.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpigment_@PGM_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT libpigment_@PGM_MAJORMINOR@_la-pgmlinearalgebra.lo -MD -MP -MF $(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmlinearalgebra.Tpo -c -o libpigment_@PGM_MAJORMINOR@_la-pgmlinearalgebra.lo `test -f '$(srcdir)/pgmlinearalgebra.c' || echo '$(srcdir)/'`$(srcdir)/pgmlinearalgebra.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmlinearalgebra.Tpo $(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmlinearalgebra.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/pgmlinearalgebra.c' object='libpigment_@PGM_MAJORMINOR@_la-pgmlinearalgebra.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpigment_@PGM_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o libpigment_@PGM_MAJORMINOR@_la-pgmlinearalgebra.lo `test -f '$(srcdir)/pgmlinearalgebra.c' || echo '$(srcdir)/'`$(srcdir)/pgmlinearalgebra.c libpigment_@PGM_MAJORMINOR@_la-pgmimagesink.lo: $(srcdir)/pgmimagesink.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpigment_@PGM_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT libpigment_@PGM_MAJORMINOR@_la-pgmimagesink.lo -MD -MP -MF $(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmimagesink.Tpo -c -o libpigment_@PGM_MAJORMINOR@_la-pgmimagesink.lo `test -f '$(srcdir)/pgmimagesink.c' || echo '$(srcdir)/'`$(srcdir)/pgmimagesink.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmimagesink.Tpo $(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmimagesink.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/pgmimagesink.c' object='libpigment_@PGM_MAJORMINOR@_la-pgmimagesink.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpigment_@PGM_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o libpigment_@PGM_MAJORMINOR@_la-pgmimagesink.lo `test -f '$(srcdir)/pgmimagesink.c' || echo '$(srcdir)/'`$(srcdir)/pgmimagesink.c libpigment_@PGM_MAJORMINOR@_la-pgmenumtypes.lo: pgmenumtypes.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpigment_@PGM_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT libpigment_@PGM_MAJORMINOR@_la-pgmenumtypes.lo -MD -MP -MF $(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmenumtypes.Tpo -c -o libpigment_@PGM_MAJORMINOR@_la-pgmenumtypes.lo `test -f 'pgmenumtypes.c' || echo '$(srcdir)/'`pgmenumtypes.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmenumtypes.Tpo $(DEPDIR)/libpigment_@PGM_MAJORMINOR@_la-pgmenumtypes.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pgmenumtypes.c' object='libpigment_@PGM_MAJORMINOR@_la-pgmenumtypes.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpigment_@PGM_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o libpigment_@PGM_MAJORMINOR@_la-pgmenumtypes.lo `test -f 'pgmenumtypes.c' || echo '$(srcdir)/'`pgmenumtypes.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-libpigment_@PGM_MAJORMINOR@_includeHEADERS: $(libpigment_@PGM_MAJORMINOR@_include_HEADERS) @$(NORMAL_INSTALL) test -z "$(libpigment_@PGM_MAJORMINOR@_includedir)" || $(MKDIR_P) "$(DESTDIR)$(libpigment_@PGM_MAJORMINOR@_includedir)" @list='$(libpigment_@PGM_MAJORMINOR@_include_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(libpigment_@PGM_MAJORMINOR@_includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(libpigment_@PGM_MAJORMINOR@_includedir)/$$f'"; \ $(libpigment_@PGM_MAJORMINOR@_includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(libpigment_@PGM_MAJORMINOR@_includedir)/$$f"; \ done uninstall-libpigment_@PGM_MAJORMINOR@_includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(libpigment_@PGM_MAJORMINOR@_include_HEADERS)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(libpigment_@PGM_MAJORMINOR@_includedir)/$$f'"; \ rm -f "$(DESTDIR)$(libpigment_@PGM_MAJORMINOR@_includedir)/$$f"; \ done install-pgmincludeHEADERS: $(pgminclude_HEADERS) @$(NORMAL_INSTALL) test -z "$(pgmincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pgmincludedir)" @list='$(pgminclude_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(pgmincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(pgmincludedir)/$$f'"; \ $(pgmincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(pgmincludedir)/$$f"; \ done uninstall-pgmincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(pgminclude_HEADERS)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(pgmincludedir)/$$f'"; \ rm -f "$(DESTDIR)$(pgmincludedir)/$$f"; \ done # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ am__remove_distdir=: \ am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libpigment_@PGM_MAJORMINOR@_includedir)" "$(DESTDIR)$(pgmincludedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-recursive clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-libpigment_@PGM_MAJORMINOR@_includeHEADERS \ install-pgmincludeHEADERS install-dvi: install-dvi-recursive install-exec-am: install-libLTLIBRARIES install-html: install-html-recursive install-info: install-info-recursive install-man: install-pdf: install-pdf-recursive install-ps: install-ps-recursive installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-libLTLIBRARIES \ uninstall-libpigment_@PGM_MAJORMINOR@_includeHEADERS \ uninstall-pgmincludeHEADERS .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ install-strip .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags ctags-recursive \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-libLTLIBRARIES \ install-libpigment_@PGM_MAJORMINOR@_includeHEADERS install-man \ install-pdf install-pdf-am install-pgmincludeHEADERS \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am \ uninstall-libLTLIBRARIES \ uninstall-libpigment_@PGM_MAJORMINOR@_includeHEADERS \ uninstall-pgmincludeHEADERS pgmmarshal.h: pgmmarshal.list ( $(GLIB_GENMARSHAL) --prefix=pgm_marshal \ $(srcdir)/pgmmarshal.list --header > pgmmarshal.h ) pgmmarshal.c: pgmmarshal.h ( $(GLIB_GENMARSHAL) --prefix=pgm_marshal \ $(srcdir)/pgmmarshal.list --body --header > pgmmarshal.c ) pgmenumtypes.h: stamp-pgmenumtypes.h @true stamp-pgmenumtypes.h: $(source_h) Makefile $(GLIB_MKENUMS) \ --fhead "#ifndef __PGM_ENUM_TYPES_H__\n" \ --fhead "#define __PGM_ENUM_TYPES_H__\n\n" \ --fhead "G_BEGIN_DECLS\n\n" \ --ftail "G_END_DECLS\n\n" \ --ftail "#endif\n" \ --fprod "/* --- @filename@ --- */\n" \ --eprod "#define PGM_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n" \ --eprod "GType @enum_name@_get_type (void);\n\n" \ $(source_h) >> xgen-ceth \ && (cmp xgen-ceth $(srcdir)/pgmenumtypes.h || cp xgen-ceth pgmenumtypes.h) \ && rm -f xgen-ceth \ && echo timestamp > $(@F) pgmenumtypes.c: pgmenumtypes.h $(GLIB_MKENUMS) \ --fhead "#include \n" \ --fhead "#include \"pgmenumtypes.h\"\n" \ --fprod "\n/* enumerations from \"@filename@\" */" \ --fprod "\n#include \"@filename@\"" \ --vhead "static const G@Type@Value _@enum_name@_values[] = {" \ --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \ --vtail " { 0, NULL, NULL }\n};\n\n" \ --vtail "GType\n@enum_name@_get_type (void)\n{\n" \ --vtail " static GType type = 0;\n\n" \ --vtail " if (!type)\n" \ --vtail " type = g_@type@_register_static (\"@EnumName@\", _@enum_name@_values);\n\n" \ --vtail " return type;\n}\n\n" \ $(source_h) >> xgen-cetc \ && cp xgen-cetc pgmenumtypes.c \ && rm -f xgen-cetc %.c.gcov: .libs/libpigment_@PGM_MAJORMINOR@_la-%.gcda %.c LANG=C $(GCOV) -b -f -o $^ > $@.out gcov: $(libpigment_@PGM_MAJORMINOR@_la_SOURCES:=.gcov) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pigment-0.3.17/pgm/imaging/0000777000175000017500000000000011205035134012442 500000000000000pigment-0.3.17/pgm/imaging/pgmimaging.h0000644000175000017500000000301411205034416014646 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Software image processing filters * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ #ifndef __PGM_IMAGING_H__ #define __PGM_IMAGING_H__ #include G_BEGIN_DECLS GdkPixbuf *pgm_imaging_linear_alpha_gradient (const GdkPixbuf *pixbuf, gfloat start_x, gfloat start_y, gfloat start_alpha, gfloat end_x, gfloat end_y, gfloat end_alpha); G_END_DECLS #endif /* __PGM_IMAGING_H__ */ pigment-0.3.17/pgm/imaging/Makefile.am0000644000175000017500000000122611205034416014415 00000000000000lib_LTLIBRARIES = libpigment-imaging-@PGM_MAJORMINOR@.la libpigment_imaging_@PGM_MAJORMINOR@_includedir = $(includedir)/pigment-@PGM_MAJORMINOR@/pgm/imaging libpigment_imaging_@PGM_MAJORMINOR@_include_HEADERS = pgmimaging.h libpigment_imaging_@PGM_MAJORMINOR@_la_SOURCES = pgmimaging.c libpigment_imaging_@PGM_MAJORMINOR@_la_CFLAGS = \ $(PGM_OPTION_CFLAGS) \ $(GDKPIXBUF_CFLAGS) \ $(CAIRO_CFLAGS) libpigment_imaging_@PGM_MAJORMINOR@_la_LIBADD = \ $(GDKPIXBUF_LIBS) \ $(CAIRO_LIBS) libpigment_imaging_@PGM_MAJORMINOR@_la_LDFLAGS = \ $(PGM_LIB_LDFLAGS) \ $(PGM_ALL_LDFLAGS) \ $(PGM_LT_LDFLAGS) CLEANFILES = \ *.gcno \ *.gcda \ *.gcov \ *.gcov.out pigment-0.3.17/pgm/imaging/pgmimaging.c0000644000175000017500000002421711205034416014651 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Software image processing filters * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ /** * SECTION:pgmimaging * @short_description: A library to process pixbufs through software filters. * * #PgmImaging is a library providing several software image processing filters. * The functions can be used as CPU (Central Processing Unit) software fallback * when effects can't be applied by Pigment plugins through the GPU (Graphics * Processing Unit). * * Last reviewed on 2008-07-29 (0.3.7) */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include "pgmimaging.h" #include /* Stride alignment in bytes */ #define ARGB32_STRIDE_FOR_WIDTH(w) (((32 * (w) + 7) / 8 + 3) & ~3) /* Private functions */ /* Convert a premultiplied ARGB32 buffer to a GdkPixbuf */ static gboolean pixbuf_from_premultiplied_argb32 (const guint32 *argb32, guint width, guint height, guint stride, GdkPixbuf **pixbuf) { gint dst_stride, stride_uint, dst_stride_uint; GdkPixbuf *dst_pixbuf; guint32 *dst; guint i, j; dst_pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, width, height); if (dst_pixbuf == NULL) return FALSE; dst_stride = gdk_pixbuf_get_rowstride (dst_pixbuf); dst = (guint32*) gdk_pixbuf_get_pixels (dst_pixbuf); dst_stride_uint = dst_stride / 4; stride_uint = stride / 4; for (i = 0; i < height; i++) { for (j = 0; j < width; j++) { guint32 pixel = argb32[i * stride_uint + j]; guint8 a, r, g, b; #if G_BYTE_ORDER == G_LITTLE_ENDIAN a = (pixel & 0xff000000) >> 24; if (a == 0) dst[i * dst_stride_uint + j] = 0; else { r = (((pixel & 0x00ff0000) >> 16) * 255 + a / 2) / a; g = (((pixel & 0x0000ff00) >> 8) * 255 + a / 2) / a; b = ((pixel & 0x000000ff) * 255 + a / 2) / a; dst[i * dst_stride_uint + j] = (a << 24) | (b << 16) | (g << 8) | r; } #else a = pixel & 0x000000ff; if (a == 0) dst[i * dst_stride_uint + j] = 0; else { r = (((pixel & 0x0000ff00) >> 8) * 255 + a / 2) / a; g = (((pixel & 0x00ff0000) >> 16) * 255 + a / 2) / a; b = (((pixel & 0xff000000) >> 24) * 255 + a / 2) / a; dst[i * dst_stride_uint + j] = a | (b << 8) | (g << 16) | (r << 24); } #endif } } *pixbuf = dst_pixbuf; return TRUE; } /* Convert a GdkPixbuf to a premultiplied ARGB32 buffer */ static gboolean premultiplied_argb32_from_pixbuf (const GdkPixbuf *pixbuf, guint32 **argb32, guint *width, guint *height, guint *stride) { guint src_stride, dst_stride, src_width, src_height; guint src_stride_uint, dst_stride_uint; guint32 *src, *dst; guint i, j; src = (guint32*) gdk_pixbuf_get_pixels (pixbuf); src_stride = gdk_pixbuf_get_rowstride (pixbuf); src_width = gdk_pixbuf_get_width (pixbuf); src_height = gdk_pixbuf_get_height (pixbuf); dst_stride = ARGB32_STRIDE_FOR_WIDTH (src_width); dst = (guint32*) g_try_malloc (dst_stride * src_height); if (dst == NULL) return FALSE; src_stride_uint = src_stride / 4; dst_stride_uint = dst_stride / 4; if (gdk_pixbuf_get_has_alpha (pixbuf)) { /* from RGBA, need to pre-multiply by alpha */ for (i = 0; i < src_height; i++) { for (j = 0; j < src_width; j++) { guint32 pixel = src[i * src_stride_uint + j]; guint8 a, b, g, r; #if G_BYTE_ORDER == G_LITTLE_ENDIAN a = (pixel & 0xff000000) >> 24; if (a == 0) dst[i * dst_stride_uint + j] = 0; else { b = (((pixel & 0x00ff0000) >> 16) * a) / 255; g = (((pixel & 0x0000ff00) >> 8) * a) / 255; r = ((pixel & 0x000000ff) * a) / 255; dst[i * dst_stride_uint + j] = (a << 24) | (r << 16) | (g << 8) | b; } #else a = pixel & 0x000000ff; if (a == 0) dst[i * dst_stride_uint + j] = 0; else { b = (((pixel & 0x0000ff00) >> 8) * a) / 255; g = (((pixel & 0x00ff0000) >> 16) * a) / 255; r = (((pixel & 0xff000000) >> 24) * a) / 255; dst[i * dst_stride_uint + j] = a | (r << 8) | (g << 16) | (b << 24); } #endif } } } else { /* From RGB, no need to pre-multiply, just set A to 255 */ for (i = 0; i < src_height; i++) { guchar *s = ((guchar*) src) + i * src_stride; for (j = 0; j < src_width; j++) { guint32 pixel; #if G_BYTE_ORDER == G_LITTLE_ENDIAN pixel = 0xff000000; pixel |= *s++ << 16; pixel |= *s++ << 8; pixel |= *s++; #else pixel = 0x000000ff; pixel |= *s++ << 8; pixel |= *s++ << 16; pixel |= *s++ << 24; #endif dst[i * dst_stride_uint + j] = pixel; } } } *argb32 = dst; *stride = dst_stride; *width = src_width; *height = src_height; return TRUE; } /* Public functions */ /** * pgm_imaging_linear_alpha_gradient: * @pixbuf: A #GdkPixbuf. * @start_x: x coordinate of the start point, in the range [0.0, 1.0]. * @start_y: y coordinate of the start point, in the range [0.0, 1.0]. * @start_alpha: Alpha component at the start point, in the range [0.0, 1.0]. * @end_x: x coordinate of the end point, in the range [0.0, 1.0]. * @end_y: y coordinate of the end point, in the range [0.0, 1.0]. * @end_alpha: Alpha component at the end point, in the range [0.0, 1.0]. * * Creates a new #GdkPixbuf by compositing the alpha channel of @pixbuf with * the linear alpha gradient mask given as parameters. Note that the resulting * pixbuf always contains an alpha channel even if the original @pixbuf does * not. In that case, the alpha channel is automatically added with a default * value of 1.0 corresponding to opaque pixels. * * Returns: A newly-created #GdkPixbuf with a reference count of 1, or %NULL if * not enough memory could be allocated. */ GdkPixbuf* pgm_imaging_linear_alpha_gradient (const GdkPixbuf *pixbuf, gfloat start_x, gfloat start_y, gfloat start_alpha, gfloat end_x, gfloat end_y, gfloat end_alpha) { GdkPixbuf *processed_pixbuf = NULL; cairo_surface_t *image_surface, *dest_surface; guint32 *image_buffer, *dest_buffer; guint width, height, stride; cairo_pattern_t *gradient; cairo_t *cr; gint ret; g_return_val_if_fail (pixbuf != NULL, NULL); /* GdkPixbuf only supports RGB color space at the time this is written and the * function assumes the given pixbufs are in that color space, let's prevent * addition of other spaces in GdkPixbuf. */ g_return_val_if_fail (gdk_pixbuf_get_colorspace (pixbuf) == GDK_COLORSPACE_RGB, NULL); /* Create the image surface from the content of the given pixbuf */ ret = premultiplied_argb32_from_pixbuf (pixbuf, &image_buffer, &width, &height, &stride); if (!ret) goto image_creation_error; image_surface = cairo_image_surface_create_for_data ((guchar*) image_buffer, CAIRO_FORMAT_ARGB32, width, height, stride); /* Create the destination surface */ dest_buffer = g_try_malloc0 (stride * height); if (!dest_buffer) goto dest_creation_error; dest_surface = cairo_image_surface_create_for_data ((guchar*) dest_buffer, CAIRO_FORMAT_ARGB32, width, height, stride); /* Define the linear gradient */ gradient = cairo_pattern_create_linear ((gdouble) start_x, (gdouble) start_y, (gdouble) end_x, (gdouble) end_y); cairo_pattern_add_color_stop_rgba (gradient, 0.0, 0.0, 0.0, 0.0, (gdouble) start_alpha); cairo_pattern_add_color_stop_rgba (gradient, 1.0, 0.0, 0.0, 0.0, (gdouble) end_alpha); /* Composite the final image */ cr = cairo_create (dest_surface); cairo_set_source_surface (cr, image_surface, 0.0, 0.0); cairo_scale (cr, width, height); cairo_mask (cr, gradient); cairo_surface_flush (dest_surface); /* Build the new processed pixbuf */ pixbuf_from_premultiplied_argb32 (dest_buffer, width, height, stride, &processed_pixbuf); /* Clean up */ cairo_destroy (cr); cairo_pattern_destroy (gradient); cairo_surface_destroy (dest_surface); dest_creation_error: cairo_surface_destroy (image_surface); image_creation_error: return processed_pixbuf; } pigment-0.3.17/pgm/imaging/Makefile.in0000644000175000017500000005514311205034672014441 00000000000000# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = pgm/imaging DIST_COMMON = $(libpigment_imaging_@PGM_MAJORMINOR@_include_HEADERS) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/as-compiler-flag.m4 \ $(top_srcdir)/common/m4/as-version.m4 \ $(top_srcdir)/common/m4/check.m4 \ $(top_srcdir)/common/m4/gst-args.m4 \ $(top_srcdir)/common/m4/gst-check.m4 \ $(top_srcdir)/common/m4/gst-error.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/libtool.m4 \ $(top_srcdir)/common/m4/ltoptions.m4 \ $(top_srcdir)/common/m4/ltsugar.m4 \ $(top_srcdir)/common/m4/ltversion.m4 \ $(top_srcdir)/common/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" \ "$(DESTDIR)$(libpigment_imaging_@PGM_MAJORMINOR@_includedir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = libpigment_imaging_@PGM_MAJORMINOR@_la_DEPENDENCIES = \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am_libpigment_imaging_@PGM_MAJORMINOR@_la_OBJECTS = \ libpigment_imaging_@PGM_MAJORMINOR@_la-pgmimaging.lo libpigment_imaging_@PGM_MAJORMINOR@_la_OBJECTS = \ $(am_libpigment_imaging_@PGM_MAJORMINOR@_la_OBJECTS) libpigment_imaging_@PGM_MAJORMINOR@_la_LINK = $(LIBTOOL) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(libpigment_imaging_@PGM_MAJORMINOR@_la_CFLAGS) $(CFLAGS) \ $(libpigment_imaging_@PGM_MAJORMINOR@_la_LDFLAGS) $(LDFLAGS) \ -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libpigment_imaging_@PGM_MAJORMINOR@_la_SOURCES) DIST_SOURCES = $(libpigment_imaging_@PGM_MAJORMINOR@_la_SOURCES) libpigment_imaging_@PGM_MAJORMINOR@_includeHEADERS_INSTALL = $(INSTALL_HEADER) HEADERS = $(libpigment_imaging_@PGM_MAJORMINOR@_include_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAIROXLIB_CFLAGS = @CAIROXLIB_CFLAGS@ CAIROXLIB_LIBS = @CAIROXLIB_LIBS@ CAIRO_CFLAGS = @CAIRO_CFLAGS@ CAIRO_LIBS = @CAIRO_LIBS@ CC = @CC@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXEEXT = @EXEEXT@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ GCOV = @GCOV@ GCOV_CFLAGS = @GCOV_CFLAGS@ GCOV_LIBS = @GCOV_LIBS@ GDKPIXBUFXLIB_CFLAGS = @GDKPIXBUFXLIB_CFLAGS@ GDKPIXBUFXLIB_LIBS = @GDKPIXBUFXLIB_LIBS@ GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@ GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ GST_0_10_13_CFLAGS = @GST_0_10_13_CFLAGS@ GST_0_10_13_LIBS = @GST_0_10_13_LIBS@ GST_10_10_CFLAGS = @GST_10_10_CFLAGS@ GST_10_10_LIBS = @GST_10_10_LIBS@ GST_10_11_CFLAGS = @GST_10_11_CFLAGS@ GST_10_11_LIBS = @GST_10_11_LIBS@ GST_10_12_CFLAGS = @GST_10_12_CFLAGS@ GST_10_12_LIBS = @GST_10_12_LIBS@ GST_10_13_CFLAGS = @GST_10_13_CFLAGS@ GST_10_13_LIBS = @GST_10_13_LIBS@ GST_10_14_CFLAGS = @GST_10_14_CFLAGS@ GST_10_14_LIBS = @GST_10_14_LIBS@ GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ GST_BASE_LIBS = @GST_BASE_LIBS@ GST_CFLAGS = @GST_CFLAGS@ GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ GST_CHECK_LIBS = @GST_CHECK_LIBS@ GST_LIBS = @GST_LIBS@ GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ GST_TOOLS_DIR = @GST_TOOLS_DIR@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_GTK_WIDGET = @HAVE_GTK_WIDGET@ HAVE_IMAGING_LIBRARY = @HAVE_IMAGING_LIBRARY@ HAVE_OPENGLES_PLUGIN = @HAVE_OPENGLES_PLUGIN@ HAVE_OPENGL_PLUGIN = @HAVE_OPENGL_PLUGIN@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGLADE_2_0_CFLAGS = @LIBGLADE_2_0_CFLAGS@ LIBGLADE_2_0_LIBS = @LIBGLADE_2_0_LIBS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENGLES_BACKEND = @OPENGLES_BACKEND@ OPENGL_BACKEND = @OPENGL_BACKEND@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ PANGOCAIRO_CFLAGS = @PANGOCAIRO_CFLAGS@ PANGOCAIRO_LIBS = @PANGOCAIRO_LIBS@ PANGO_1_16_CFLAGS = @PANGO_1_16_CFLAGS@ PANGO_1_16_LIBS = @PANGO_1_16_LIBS@ PANGO_CFLAGS = @PANGO_CFLAGS@ PANGO_LIBS = @PANGO_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL_PATH = @PERL_PATH@ PGM_ALL_CFLAGS = @PGM_ALL_CFLAGS@ PGM_ALL_LDFLAGS = @PGM_ALL_LDFLAGS@ PGM_ALL_LIBS = @PGM_ALL_LIBS@ PGM_GLES_CFLAGS = @PGM_GLES_CFLAGS@ PGM_GLES_LIBS = @PGM_GLES_LIBS@ PGM_GL_CFLAGS = @PGM_GL_CFLAGS@ PGM_GL_LIBS = @PGM_GL_LIBS@ PGM_GTKDOC_CFLAGS = @PGM_GTKDOC_CFLAGS@ PGM_LIB_LDFLAGS = @PGM_LIB_LDFLAGS@ PGM_LT_LDFLAGS = @PGM_LT_LDFLAGS@ PGM_LT_VERSION = @PGM_LT_VERSION@ PGM_MAJORMINOR = @PGM_MAJORMINOR@ PGM_OBJ_CFLAGS = @PGM_OBJ_CFLAGS@ PGM_OBJ_LIBS = @PGM_OBJ_LIBS@ PGM_OPTION_CFLAGS = @PGM_OPTION_CFLAGS@ PGM_PLUGIN_LDFLAGS = @PGM_PLUGIN_LDFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PLUGIN_PATH = @PLUGIN_PATH@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XCOMPOSITE_CFLAGS = @XCOMPOSITE_CFLAGS@ XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ XMKMF = @XMKMF@ XRENDER_CFLAGS = @XRENDER_CFLAGS@ XRENDER_LIBS = @XRENDER_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cairo_req = @cairo_req@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ glib_req = @glib_req@ gstreamer_plugins_base_req = @gstreamer_plugins_base_req@ gstreamer_req = @gstreamer_req@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pango_req = @pango_req@ pangocairo_req = @pangocairo_req@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ lib_LTLIBRARIES = libpigment-imaging-@PGM_MAJORMINOR@.la libpigment_imaging_@PGM_MAJORMINOR@_includedir = $(includedir)/pigment-@PGM_MAJORMINOR@/pgm/imaging libpigment_imaging_@PGM_MAJORMINOR@_include_HEADERS = pgmimaging.h libpigment_imaging_@PGM_MAJORMINOR@_la_SOURCES = pgmimaging.c libpigment_imaging_@PGM_MAJORMINOR@_la_CFLAGS = \ $(PGM_OPTION_CFLAGS) \ $(GDKPIXBUF_CFLAGS) \ $(CAIRO_CFLAGS) libpigment_imaging_@PGM_MAJORMINOR@_la_LIBADD = \ $(GDKPIXBUF_LIBS) \ $(CAIRO_LIBS) libpigment_imaging_@PGM_MAJORMINOR@_la_LDFLAGS = \ $(PGM_LIB_LDFLAGS) \ $(PGM_ALL_LDFLAGS) \ $(PGM_LT_LDFLAGS) CLEANFILES = \ *.gcno \ *.gcda \ *.gcov \ *.gcov.out all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu pgm/imaging/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu pgm/imaging/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libpigment-imaging-@PGM_MAJORMINOR@.la: $(libpigment_imaging_@PGM_MAJORMINOR@_la_OBJECTS) $(libpigment_imaging_@PGM_MAJORMINOR@_la_DEPENDENCIES) $(libpigment_imaging_@PGM_MAJORMINOR@_la_LINK) -rpath $(libdir) $(libpigment_imaging_@PGM_MAJORMINOR@_la_OBJECTS) $(libpigment_imaging_@PGM_MAJORMINOR@_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpigment_imaging_@PGM_MAJORMINOR@_la-pgmimaging.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libpigment_imaging_@PGM_MAJORMINOR@_la-pgmimaging.lo: pgmimaging.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpigment_imaging_@PGM_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT libpigment_imaging_@PGM_MAJORMINOR@_la-pgmimaging.lo -MD -MP -MF $(DEPDIR)/libpigment_imaging_@PGM_MAJORMINOR@_la-pgmimaging.Tpo -c -o libpigment_imaging_@PGM_MAJORMINOR@_la-pgmimaging.lo `test -f 'pgmimaging.c' || echo '$(srcdir)/'`pgmimaging.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpigment_imaging_@PGM_MAJORMINOR@_la-pgmimaging.Tpo $(DEPDIR)/libpigment_imaging_@PGM_MAJORMINOR@_la-pgmimaging.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pgmimaging.c' object='libpigment_imaging_@PGM_MAJORMINOR@_la-pgmimaging.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpigment_imaging_@PGM_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o libpigment_imaging_@PGM_MAJORMINOR@_la-pgmimaging.lo `test -f 'pgmimaging.c' || echo '$(srcdir)/'`pgmimaging.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-libpigment_imaging_@PGM_MAJORMINOR@_includeHEADERS: $(libpigment_imaging_@PGM_MAJORMINOR@_include_HEADERS) @$(NORMAL_INSTALL) test -z "$(libpigment_imaging_@PGM_MAJORMINOR@_includedir)" || $(MKDIR_P) "$(DESTDIR)$(libpigment_imaging_@PGM_MAJORMINOR@_includedir)" @list='$(libpigment_imaging_@PGM_MAJORMINOR@_include_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(libpigment_imaging_@PGM_MAJORMINOR@_includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(libpigment_imaging_@PGM_MAJORMINOR@_includedir)/$$f'"; \ $(libpigment_imaging_@PGM_MAJORMINOR@_includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(libpigment_imaging_@PGM_MAJORMINOR@_includedir)/$$f"; \ done uninstall-libpigment_imaging_@PGM_MAJORMINOR@_includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(libpigment_imaging_@PGM_MAJORMINOR@_include_HEADERS)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(libpigment_imaging_@PGM_MAJORMINOR@_includedir)/$$f'"; \ rm -f "$(DESTDIR)$(libpigment_imaging_@PGM_MAJORMINOR@_includedir)/$$f"; \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libpigment_imaging_@PGM_MAJORMINOR@_includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: \ install-libpigment_imaging_@PGM_MAJORMINOR@_includeHEADERS install-dvi: install-dvi-am install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES \ uninstall-libpigment_imaging_@PGM_MAJORMINOR@_includeHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES \ install-libpigment_imaging_@PGM_MAJORMINOR@_includeHEADERS \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-libLTLIBRARIES \ uninstall-libpigment_imaging_@PGM_MAJORMINOR@_includeHEADERS # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pigment-0.3.17/pgm/pgmcanvas.h0000644000175000017500000001437511205034416013107 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment media rendering library * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author(s): Loïc Molinari * Julien Moutte */ #ifndef __PGM_CANVAS_H__ #define __PGM_CANVAS_H__ #include #include "pgmcommon.h" #include "pgmdrawable.h" G_BEGIN_DECLS #define PGM_TYPE_CANVAS (pgm_canvas_get_type ()) #define PGM_CANVAS(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), PGM_TYPE_CANVAS, PgmCanvas)) #define PGM_CANVAS_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), PGM_TYPE_CANVAS, PgmCanvasClass)) #define PGM_IS_CANVAS(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), PGM_TYPE_CANVAS)) #define PGM_IS_CANVAS_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), PGM_TYPE_CANVAS)) #define PGM_CANVAS_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS((obj), PGM_TYPE_CANVAS, PgmCanvasClass)) typedef struct _PgmCanvas PgmCanvas; typedef struct _PgmCanvasClass PgmCanvasClass; /** * PgmCanvas: * @far_layer: the list of #PgmDrawable in the #PGM_DRAWABLE_FAR layer. * @middle_layer: the list of #PgmDrawable in the #PGM_DRAWABLE_MIDDLE layer. * @near_layer: the list of #PgmDrawable in the #PGM_DRAWABLE_NEAR layer. * @width: the canvas width. * @height: the canvas height. * @pixel_offset_x: the pixel offset on x. * @pixel_offset_y: the pixel offset on y. * @pixel_formats: the pixel formats mask. * * The #PgmCanvas structure. */ struct _PgmCanvas { /*< private >*/ GstObject parent; PgmDrawable *entered_emission_stopper; GHashTable *format_counter; guint nb_formats; /*< public >*/ /* with LOCK */ /* Layer lists */ GList *far_layer; GList *middle_layer; GList *near_layer; /* Canvas size */ gfloat width, height; /* Pixel offsets */ gfloat pixel_offset_x, pixel_offset_y; /* Mask of supported formats */ gulong pixel_formats; }; struct _PgmCanvasClass { GstObjectClass parent_class; /*< private >*/ /* Signals */ void (*drawable_added) (PgmCanvas *canvas, PgmDrawable *drawable, PgmDrawableLayer layer, gint order); void (*drawable_removed) (PgmCanvas *canvas, PgmDrawable *drawable, PgmDrawableLayer layer); void (*drawable_reordered) (PgmCanvas *canvas, PgmDrawable *drawable, PgmDrawableLayer layer); void (*size_changed) (PgmCanvas *canvas); void (*regenerated) (PgmCanvas *canvas); }; GType pgm_canvas_get_type (void); PgmCanvas *pgm_canvas_new (void); PgmError pgm_canvas_set_size (PgmCanvas *canvas, gfloat width, gfloat height); PgmError pgm_canvas_get_size (PgmCanvas *canvas, gfloat *width, gfloat *height); PgmError pgm_canvas_add (PgmCanvas *canvas, PgmDrawableLayer layer, PgmDrawable *drawable); PgmError pgm_canvas_remove (PgmCanvas *canvas, PgmDrawable *drawable); PgmError pgm_canvas_add_many (PgmCanvas *canvas, PgmDrawableLayer layer, PgmDrawable *drawable_1, ...) G_GNUC_NULL_TERMINATED; PgmError pgm_canvas_remove_many (PgmCanvas *canvas, PgmDrawable *drawable_1, ...) G_GNUC_NULL_TERMINATED; PgmError pgm_canvas_set_order (PgmCanvas *canvas, PgmDrawable *drawable, gint order); PgmError pgm_canvas_get_order (PgmCanvas *canvas, PgmDrawable *drawable, PgmDrawableLayer *layer, gint *order); PgmError pgm_canvas_get_layer_count (PgmCanvas *canvas, PgmDrawableLayer layer, gint *count); PgmError pgm_canvas_regenerate (PgmCanvas *canvas); PgmError pgm_canvas_get_pixel_formats (PgmCanvas *canvas, gulong *pixel_formats); PgmError pgm_canvas_get_pixel_offsets (PgmCanvas *canvas, gfloat *x, gfloat *y); /* Protected methods */ void _pgm_canvas_update_order (PgmCanvas *canvas, PgmDrawable *drawable); void _pgm_canvas_update_grid_aligned_drawables (PgmCanvas *canvas); void _pgm_canvas_add_pixel_formats (PgmCanvas *canvas, gulong pixel_formats); void _pgm_canvas_remove_pixel_formats (PgmCanvas *canvas, gulong pixel_formats); PgmDrawable *_pgm_canvas_get_entered_emission_stopper (PgmCanvas *canvas); void _pgm_canvas_set_entered_emission_stopper (PgmCanvas *canvas, PgmDrawable *drawable); G_END_DECLS #endif /* __PGM_CANVAS_H__ */ pigment-0.3.17/pgm/pgmplugin.h0000644000175000017500000001502011205034416013116 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment media rendering library * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author(s): Loïc Molinari * Julien Moutte */ /** * SECTION:pgmplugin * @short_description: Various structs and macros used for plugins handling. * * Various structs and macros used by Pigment for plugins handling. * * Last reviewed on 2007-04-12 (0.1.5) */ #ifndef __PGM_PLUGIN_H__ #define __PGM_PLUGIN_H__ #include "pgmviewport.h" G_BEGIN_DECLS /** * PGM_PLUGIN_PATH_NAME: * * The name of the plugin path environment variable name. */ #define PGM_PLUGIN_PATH_NAME "PGM_PLUGIN_PATH" typedef struct _PgmPluginDesc PgmPluginDesc; /** * PgmPluginInitFunc: * @module: the #GTypeModule to use in the init func to register your types * (with g_type_module_register_type () or #PGM_DEFINE_DYNAMIC_TYPE or * #PGM_DEFINE_DYNAMIC_TYPE_EXTENDED. * * A plugin should provide a pointer to a function of this type in the * #PgmPluginDesc struct. This function will be called to initialize the * plugin. * * Returns: %TRUE if the initialization successes, %FALSE otherwise. */ typedef gboolean (*PgmPluginInitFunc) (GTypeModule *module); /** * PgmPluginShutdownFunc: * @module: the #GTypeModule that was passed to the #PgmPluginInitFunc function. * * A plugin should provide a pointer to a function of this type in the * #PgmPluginDesc struct. This function will be called to shutdown the plugin. * * Returns: %TRUE if the deinitialization successes, %FALSE otherwise. */ typedef gboolean (*PgmPluginShutdownFunc) (GTypeModule *module); /** * PgmPluginCreateFunc: * * A plugin should provide a pointer to a function of this prototype in the * %PgmPluginDesc struct. This function will be called by the user to create * the %PgmViewport. * * Returns: a new #PgmViewport. */ typedef PgmViewport* (*PgmPluginCreateFunc) (void); /** * PgmPluginDesc: * @init: the plugin initialization function pointer. * @shutdown: the plugin shutdown function pointer. * @create: the plugin create function pointer (returning a %PgmViewport). * @name: the plugin name. * @version: the version string of Pigment that plugin was compiled for. * @description: the plugin description. * @license: the plugin license. * @origin: the plugin origin URL. * @author: the plugin author. * * Pigment Plugin description structure. */ struct _PgmPluginDesc { PgmPluginInitFunc init; PgmPluginShutdownFunc shutdown; PgmPluginCreateFunc create; gchar *name; gchar *version; gchar *description; gchar *license; gchar *origin; gchar *author; }; /** * PGM_PLUGIN_DEFINE: * @init: the plugin initialization function pointer. * @shutdown: the plugin shutdown function pointer. * @create: the plugin creation function pointer (returning a %PgmViewport). * @name: the plugin name. * @version: the version string of Pigment that plugin was compiled for. * @description: the plugin description. * @license: the plugin license. * @origin: the plugin origin URL. * @author: the plugin author. * * Utility macro to create a #PgmPluginDesc plugin description structure. * This is the entry point for every Pigment plugin and it is highly * recommended to use this macro to avoid common mistakes maxking entry point * unusable. */ #define PGM_PLUGIN_DEFINE(init,shutdown,create,name,version,description,license,origin,author) \ PgmPluginDesc pgm_plugin_desc = { \ init, shutdown, create, name, version, \ description, license, origin, author \ }; /* These defines are here for compatibility with GLib < 2.13 */ #ifdef G_DEFINE_DYNAMIC_TYPE #define PGM_DEFINE_DYNAMIC_TYPE(TN, t_n, T_P) \ G_DEFINE_DYNAMIC_TYPE(TN, t_n, T_P) #define PGM_DEFINE_DYNAMIC_TYPE_EXTENDED(TN, t_n, T_P, flags, CODE) \ G_DEFINE_DYNAMIC_TYPE_EXTENDED(TN, t_n, T_P, flags, CODE) #else #define PGM_DEFINE_DYNAMIC_TYPE(TN, t_n, T_P) \ PGM_DEFINE_DYNAMIC_TYPE_EXTENDED (TN, t_n, T_P, 0, {}) #define PGM_DEFINE_DYNAMIC_TYPE_EXTENDED(TypeName, type_name, TYPE_PARENT, flags, CODE) \ static void type_name##_init (TypeName *self); \ static void type_name##_class_init (TypeName##Class *klass); \ static void type_name##_class_finalize (TypeName##Class *klass); \ static gpointer type_name##_parent_class = NULL; \ static GType type_name##_type_id = 0; \ static void type_name##_class_intern_init (gpointer klass) \ { \ type_name##_parent_class = g_type_class_peek_parent (klass); \ type_name##_class_init ((TypeName##Class*) klass); \ } \ GType \ type_name##_get_type (void) \ { \ return type_name##_type_id; \ } \ static void \ type_name##_register_type (GTypeModule *type_module) \ { \ GType g_define_type_id; \ const GTypeInfo g_define_type_info = { \ sizeof (TypeName##Class), \ (GBaseInitFunc) NULL, \ (GBaseFinalizeFunc) NULL, \ (GClassInitFunc) type_name##_class_intern_init, \ (GClassFinalizeFunc) type_name##_class_finalize, \ NULL, /* class_data */ \ sizeof (TypeName), \ 0, /* n_preallocs */ \ (GInstanceInitFunc) type_name##_init, \ NULL /* value_table */ \ }; \ type_name##_type_id = g_type_module_register_type (type_module, \ TYPE_PARENT, \ #TypeName, \ &g_define_type_info, \ (GTypeFlags) flags); \ g_define_type_id = type_name##_type_id; \ { CODE ; } \ } #endif /* G_DEFINE_DYNAMIC_TYPE */ G_END_DECLS #endif /* __PGM_PLUGIN_H__ */ pigment-0.3.17/pgm/pgmmarshal.list0000644000175000017500000000263211205034416014000 00000000000000# Possible parameter types: # # VOID indicates no return type, or no extra parameters. If VOID is # used as the parameter list, no additional parameters may be # present. # BOOLEAN for boolean types (gboolean) # CHAR for signed char types (gchar) # UCHAR for unsigned char types (guchar) # INT for signed integer types (gint) # UINT for unsigned integer types (guint) # LONG for signed long integer types (glong) # ULONG for unsigned long integer types (gulong) # INT64 for signed 64bit integer types (gint64) # UINT64 for unsigned 64bit integer types (guint64) # ENUM for enumeration types (gint) # FLAGS for flag enumeration types (guint) # FLOAT for single-precision float types (gfloat) # DOUBLE for double-precision float types (gdouble) # STRING for string types (gchar*) # BOXED for boxed (anonymous but reference counted) types (GBoxed*) # PARAM for GParamSpec or derived types (GParamSpec*) # POINTER for anonymous pointer types (gpointer) # OBJECT for GObject or derived types (GObject*) # NONE deprecated alias for VOID # BOOL deprecated alias for BOOLEAN VOID:VOID VOID:ENUM VOID:BOXED VOID:UINT BOOLEAN:BOXED LONG:BOXED VOID:OBJECT,UINT VOID:OBJECT,OBJECT VOID:OBJECT,OBJECT,INT BOOLEAN:FLOAT,FLOAT,FLOAT,ENUM,UINT BOOLEAN:FLOAT,FLOAT,FLOAT,ENUM,UINT,UINT BOOLEAN:FLOAT,FLOAT,FLOAT,UINT VOID:FLOAT,FLOAT,FLOAT,UINT VOID:UINT,UINT,POINTER pigment-0.3.17/pgm/pgmmodule.c0000644000175000017500000002276311205034416013114 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment media rendering library * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author(s): Guillaume Emont * Loïc Molinari * Julien Moutte */ /** * SECTION:pgmmodule * @short_description: A class to load and unload plugins at runtime. * * * * A #PgmModule object is responsible for loading and unloading plugins at * runtime. Most of the work is done in #GTypeModule from which #PgmModule * inherits. #GTypeModule decides when the plugin must be loaded or unloaded, * and calls pgm_module_load() or pgm_module_unload(). * The #PgmModule object also keeps a reference to the #PgmPluginDesc structure * found in the plugin. All access to pgm_plugin_desc must be made between a * call to g_type_module_use() and a call to g_type_module_unuse(). #PgmModule * is an object internal to Pigment, and should not be used outside of it. It * is only a helper class for #PgmViewportFactory. * * * * Last reviewed on 2007-10-23 (0.3.2) */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include "pgmmodule.h" /* Maximal levels of recursion in the file system to search for plugins */ #define MAX_RECURSION_LEVELS 10 GST_DEBUG_CATEGORY_STATIC (pgm_module_debug); #define GST_CAT_DEFAULT pgm_module_debug G_DEFINE_TYPE (PgmModule, pgm_module, G_TYPE_TYPE_MODULE); /* Private methods */ /* Recursively search for a Pigment plugin name in a directory with a recursion * limit. If a plugin is found it calsl the module's init() function and * returns TRUE with the module's handle and plugin_desc members filled, in the * other case it returns FALSE. */ static gboolean find_plugin (PgmModule *module, const gchar *plugin_directory, gint recursion_level) { GModule *_handle; PgmPluginDesc *_plugin_desc; GDir *dir; const gchar *dir_entry; gchar *filename; gint plugin_name_len; gboolean found; g_return_val_if_fail (module && module->name && *module->name, FALSE); plugin_name_len = strlen (module->name); found = FALSE; /* Open the directory */ dir = g_dir_open (plugin_directory, 0, NULL); if (G_UNLIKELY (!dir)) return FALSE; /* Parse all the files */ while ((dir_entry = g_dir_read_name (dir))) { filename = g_strjoin ("/", plugin_directory, dir_entry, NULL); GST_LOG ("looking for plugin named %s at %s", module->name, dir_entry); /* Check if it's a directory and recurse */ if (g_file_test (filename, G_FILE_TEST_IS_DIR)) { if (recursion_level > 0) { GST_LOG ("found directory, recursing"); found = find_plugin (module, filename, recursion_level - 1); } else GST_LOG ("found directory, but recursion level is too deep"); g_free (filename); /* Break our parsing if a plugin has been found */ if (found) break; else continue; } /* Check if it's a regular file */ if (!g_file_test (filename, G_FILE_TEST_IS_REGULAR)) { GST_LOG ("not a regular file, ignoring"); g_free (filename); continue; } /* Check standard shared library extensions */ if (!g_str_has_suffix (filename, ".so") && !g_str_has_suffix (filename, ".sl") && !g_str_has_suffix (filename, ".dll") && !g_str_has_suffix (filename, ".dynlib")) { GST_LOG ("extension is not recognized as module file, ignoring"); g_free (filename); continue; } /* Open the module */ GST_DEBUG ("opening module %s", dir_entry); _handle = g_module_open (filename, G_MODULE_BIND_LOCAL); if (G_UNLIKELY (!_handle)) { GST_WARNING ("failed loading module: %s", g_module_error ()); g_free (filename); continue; } /* Search our "pgm_plugin_desc" entry point in the plugin */ if (!g_module_symbol (_handle, "pgm_plugin_desc", (gpointer) &_plugin_desc)) { GST_DEBUG ("cannot find plugin entry point, ignoring"); if (G_UNLIKELY (!g_module_close (_handle))) GST_WARNING ("failed closing module %s", filename); _handle = NULL; g_free (filename); continue; } GST_DEBUG ("found plugin entry point"); /* Is it the plugin we are looking for? */ GST_DEBUG ("plugin '%s' version '%s'", _plugin_desc->name, _plugin_desc->version); if (!g_ascii_strncasecmp (_plugin_desc->name, module->name, strlen (module->name)) && !g_ascii_strncasecmp (_plugin_desc->version, VERSION, strlen (VERSION))) { /* Check create function pointer */ if (_plugin_desc->create) { gboolean init_success = TRUE; GST_DEBUG ("using plugin %s", filename); /* Initialize the plugin */ if (_plugin_desc->init) { init_success = FALSE; GST_DEBUG ("calling plugin init func"); init_success = _plugin_desc->init (G_TYPE_MODULE (module)); } if (init_success) { module->handle = _handle; module->plugin_desc = _plugin_desc; g_free (filename); found = TRUE; break; } } else GST_WARNING ("plugin %s has a NULL create function pointer", filename); } /* It's not the plugin we are searching for, let's close the module */ if (G_UNLIKELY (!g_module_close (_handle))) GST_WARNING ("failed closing module %s", filename); _handle = NULL; g_free (filename); } g_dir_close (dir); return found; } /* Calls find_plugin, first on the directories in the PGM_PLUGIN_PATH_NAME * environment variable (if not empty), then on PGM_PLUGIN_PATH. */ static gboolean load_plugin (PgmModule *module) { const gchar *plugin_path = NULL; gboolean found = FALSE; /* Try to get the plugin from the plugin path environment variable */ plugin_path = g_getenv (PGM_PLUGIN_PATH_NAME); if (plugin_path) { gchar **list = NULL; gint i = 0; GST_DEBUG ("PGM_PLUGIN_PATH set to %s", plugin_path); list = g_strsplit (plugin_path, G_SEARCHPATH_SEPARATOR_S, 0); while (list[i] && !found) { found = find_plugin (module, list[i], MAX_RECURSION_LEVELS); i++; } g_strfreev (list); } else GST_DEBUG ("PGM_PLUGIN_PATH not set"); /* Then from our usual plugin path */ if (!found) found = find_plugin (module, PGM_PLUGIN_PATH, MAX_RECURSION_LEVELS); return found; } /* GTypeModule methods */ static gboolean pgm_module_load (GTypeModule *module) { PgmModule *pgm_module = PGM_MODULE (module); g_return_val_if_fail (module, FALSE); g_return_val_if_fail (pgm_module->name && *pgm_module->name, FALSE); return load_plugin (pgm_module); } static void pgm_module_unload (GTypeModule *module) { PgmModule *pgm_module = PGM_MODULE (module); g_return_if_fail (module); g_return_if_fail (pgm_module->handle); if (pgm_module->plugin_desc && pgm_module->plugin_desc->shutdown) pgm_module->plugin_desc->shutdown (G_TYPE_MODULE (pgm_module)); g_module_close (pgm_module->handle); pgm_module->plugin_desc = NULL; pgm_module->handle = NULL; } /* GObject stuff */ static void pgm_module_dispose (GObject *object) { PgmModule *module = PGM_MODULE (object); g_free (module->name); G_OBJECT_CLASS (pgm_module_parent_class)->dispose (object); } static void pgm_module_class_init (PgmModuleClass *klass) { GObjectClass *gobject_class = (GObjectClass *) klass; GTypeModuleClass *parent_class = G_TYPE_MODULE_CLASS (klass); gobject_class->dispose = GST_DEBUG_FUNCPTR (pgm_module_dispose); parent_class->load = GST_DEBUG_FUNCPTR (pgm_module_load); parent_class->unload = GST_DEBUG_FUNCPTR (pgm_module_unload); GST_DEBUG_CATEGORY_INIT (pgm_module_debug, "pgm_module", 0, "pigment modules handling"); } static void pgm_module_init (PgmModule *module) { module->name = NULL; module->handle = NULL; module->plugin_desc = NULL; } /* Public methods */ PgmModule * pgm_module_new (const gchar *name) { PgmModule *module = NULL; if (!(name && *name)) return NULL; module = g_object_new (PGM_TYPE_MODULE, NULL); if (!module) return NULL; module->name = g_strdup (name); g_type_module_set_name (G_TYPE_MODULE (module), module->name); return module; } pigment-0.3.17/pgm/pgmcanvas.c0000644000175000017500000011300111205034416013064 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment media rendering library * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author(s): Loïc Molinari * Julien Moutte */ /** * SECTION:pgmcanvas * @short_description: A virtual positioning class for drawables. * @see_also: #PgmViewport, #PgmDrawable. * * * * A #PgmCanvas object is used as a virtual positioning system for the * #PgmDrawable. It provides Pigment users (application developers using the * library) a very simple and flexible way to build their user interface * without having to worry about visual rendering problems such as non square * pixels, aspect ratio of images or videos, keeping proportional alignment or * spacing between objects when resizing, etc. * * Canvas coordinates * * The origin of the canvas coordinate system corresponds to the upper-left * corner. A canvas can only understand canvas coordinates, and those * coordinates have nothing to do with pixels. This is why the methods you * can call on a canvas always use coordinates with floating numbers. Let's * say you want to draw a user interface with an aspect ratio of 16:9 (which is * nice to do on most wide screen TV of the market). In that case you would for * example set the canvas size to width 16.0 and height 9.0. Every coordinate * and size of the drawables you are going to put on the canvas will use the * same coordinate system. So, if you wanted to put an image in the middle of * the user interface you would compute its position so that its center is at * (8.0, 4.5) on the canvas. You would also define the size of that image using * values of the same scale. For example, the width of the image could be 1.0 * and its height 1.0 thus making appear as a square. * * Link between canvas and viewport * * A canvas is never drawn directly which is why you can use abstract * coordinates to place objects on it. Also, since it is using floating * numbers there is no limit in precision. At some point we still need to * have a visual representation of what is on the canvas, this is what * #PgmViewport does. A canvas can be projected on 0 to n viewport. * * Scalable user interface * * It is entirely the application's responsibility to decide how many drawables * are going to be drawn on the canvas and their size. Using the viewport * information the application can decide which aspect ratio to use and how * many drawables can fit on the canvas while still being easily readable. If * for example the end user (user interface user) steps away from the monitor * and cannot read the text the application can just make the drawables bigger * on the canvas which will automatically get reprojected onto the viewport. * * Rendering layers * * When adding a drawable to a canvas you have to choose a #PgmDrawableLayer * in which that drawable will be stored. The three layers are used to handle a * first control on the drawing order. The first layer drawn is the * %PGM_DRAWABLE_FAR one, all the drawables inside this layer will appear behind * the two others. The second layer drawn is the %PGM_DRAWABLE_MIDDLE one, the * drawables inside this layer will be drawn over the %PGM_DRAWABLE_FAR layer * and behind the %PGM_DRAWABLE_NEAR layer. The third layer drawn is the * %PGM_DRAWABLE_NEAR one, all the drawables inside this layer will be drawn * over the two others. This is useful to make sure that dialog is shown on top * of all the other objects for example or to make sure that no object is going * to go behind the background. Drawables inside a layer are automatically * ordered by Pigment depending on their z coordinate set through * pgm_drawable_set_position(). Pigment also provides a way to reorder * drawables inside a layer that have the same z coordinate thanks to the * pgm_canvas_set_order() function. * * Drawable reference counting * * When a drawable is created it has a floating reference, when you add it to * the canvas, the canvas takes a reference to that drawable and sink the object * reference. That means that the canvas now owns the drawable reference and * you do not need to unref the drawable when cleaning up your objects. Just * unrefing the canvas is going to cleanup all the drawables that were added to * it. Here is an example: * * Create a canvas, add drawables, unref the canvas * * PgmCanvas *canvas = pgm_canvas_new (); * PgmDrawable *drb1 = pgm_text_new ("hello world"); * PgmDrawable *drb2 = pgm_image_new_from_fd (fd, 1024); * PgmDrawable *drb3 = pgm_image_new_from_image (drb2); *   * pgm_canvas_add_many (canvas, PGM_DRAWABLE_MIDDLE, drb1, drb2, drb3, NULL); * gst_object_unref (canvas); // Unref canvas, drb1, drb2 and drb3 * * * * Signal connections * * The drawable-added signal is * fired whenever a new drawable is added to the canvas. Likewise the drawable-removed signal is fired * whenever an drawable is removed from the canvas. The drawable-reordered signal is * fired whenever a drawable is reordered inside the canvas. * * * * Last reviewed on 2007-08-03 (0.3.0) */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include "pgmcanvas.h" #include "pgmimage.h" #include "pgmmarshal.h" #include "pgmenumtypes.h" GST_DEBUG_CATEGORY_STATIC (pgm_canvas_debug); #define GST_CAT_DEFAULT pgm_canvas_debug /* Canvas signals */ enum { DRAWABLE_ADDED, DRAWABLE_REMOVED, DRAWABLE_REORDERED, SIZE_CHANGED, REGENERATED, LAST_SIGNAL }; static GstObjectClass *parent_class = NULL; static guint pgm_canvas_signals[LAST_SIGNAL] = { 0 }; /* Private functions */ /* GCompareFunc used to compare z coordinate */ static gint z_compare (PgmDrawable *drb1, PgmDrawable *drb2) { if (drb1->z < drb2->z) return -1; else return 1; } /* Returns whether or not a drawable from a list needs to be reordered * depending on its z coordinate. */ static gboolean need_ordering_update (GList *list, PgmDrawable *drawable) { list = g_list_find (list, drawable); if (!list) return FALSE; if (!((list->next && drawable->z > PGM_DRAWABLE (list->next->data)->z) || (list->prev && drawable->z < PGM_DRAWABLE (list->prev->data)->z))) return FALSE; return TRUE; } /* Update the position and the size if the grid aligned property is set */ static void update_grid_aligned_drawable (PgmDrawable *drawable) { gboolean aligned; gfloat x, y, z, w, h; GST_OBJECT_LOCK (drawable); aligned = drawable->grid_aligned; x = drawable->orig_x; y = drawable->orig_y; z = drawable->z; w = drawable->orig_width; h = drawable->orig_height; GST_OBJECT_UNLOCK (drawable); if (aligned) { pgm_drawable_set_position (drawable, x, y, z); pgm_drawable_set_size (drawable, w, h); } } /* Calls update_grid_aligned_drawable on a canvas layer */ static void update_grid_aligned_drawables (PgmCanvas *canvas, GList *layer) { GList *copy = NULL, *walk; /* Copy the layer taking ref on drawables with the canvas lock */ GST_OBJECT_LOCK (canvas); walk = layer; while (walk) { copy = g_list_prepend (copy, g_object_ref (walk->data)); walk = walk->next; } GST_OBJECT_UNLOCK (canvas); /* Call update_grid_aligned_drawables on each drawable */ walk = copy; while (walk) { update_grid_aligned_drawable ((PgmDrawable*) walk->data); g_object_unref (walk->data); walk = walk->next; } g_list_free (copy); } /* GObject stuff */ G_DEFINE_TYPE (PgmCanvas, pgm_canvas, GST_TYPE_OBJECT); static void pgm_canvas_dispose (GObject *object) { PgmCanvas *canvas = PGM_CANVAS (object); while (canvas->far_layer) pgm_canvas_remove (canvas, PGM_DRAWABLE (canvas->far_layer->data)); while (canvas->middle_layer) pgm_canvas_remove (canvas, PGM_DRAWABLE (canvas->middle_layer->data)); while (canvas->near_layer) pgm_canvas_remove (canvas, PGM_DRAWABLE (canvas->near_layer->data)); g_hash_table_unref (canvas->format_counter); canvas->format_counter = NULL; GST_CALL_PARENT (G_OBJECT_CLASS, dispose, (object)); } static void pgm_canvas_class_init (PgmCanvasClass *klass) { GObjectClass *gobject_class = (GObjectClass *) klass; parent_class = g_type_class_peek_parent (klass); /** * PgmCanvas::drawable-added: * @canvas: the #PgmCanvas * @drawable: the #PgmDrawable that was added to @canvas * @layer: the #PgmDrawableLayer in which @drawable was added * @order: the order in @layer in which @drawable was added * * Will be emitted after @drawable was added to @canvas. */ pgm_canvas_signals[DRAWABLE_ADDED] = g_signal_new ("drawable-added", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (PgmCanvasClass, drawable_added), NULL, NULL, pgm_marshal_VOID__OBJECT_OBJECT_INT, G_TYPE_NONE, 3, PGM_TYPE_DRAWABLE, PGM_TYPE_DRAWABLE_LAYER, G_TYPE_INT); /** * PgmCanvas::drawable-removed: * @canvas: the #PgmCanvas * @drawable: the #PgmDrawable that was removed from @canvas * @layer: the #PgmDrawableLayer from which @drawable was removed * * Will be emitted after @drawable was removed from @canvas. */ pgm_canvas_signals[DRAWABLE_REMOVED] = g_signal_new ("drawable-removed", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (PgmCanvasClass, drawable_removed), NULL, NULL, pgm_marshal_VOID__OBJECT_OBJECT, G_TYPE_NONE, 2, PGM_TYPE_DRAWABLE, PGM_TYPE_DRAWABLE_LAYER); /** * PgmCanvas::drawable-reordered: * @canvas: the #PgmCanvas * @drawable: the #PgmDrawable that was reordered in @canvas * @layer: the #PgmDrawableLayer in which @drawable was reordered * @order: the new order of @drawable * * Will be emitted after @drawable was reordered in @canvas. */ pgm_canvas_signals[DRAWABLE_REORDERED] = g_signal_new ("drawable-reordered", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (PgmCanvasClass, drawable_reordered), NULL, NULL, pgm_marshal_VOID__OBJECT_OBJECT_INT, G_TYPE_NONE, 3, PGM_TYPE_DRAWABLE, PGM_TYPE_DRAWABLE_LAYER, G_TYPE_INT); /** * PgmCanvas::size-changed: * @canvas: the #PgmCanvas * * Will be emitted after @canvas size was changed. */ pgm_canvas_signals[SIZE_CHANGED] = g_signal_new ("size-changed", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (PgmCanvasClass, size_changed), NULL, NULL, pgm_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * PgmCanvas::regenerated: * @canvas: the #PgmCanvas * * Will be emitted after @canvas received a regeneration request. */ pgm_canvas_signals[REGENERATED] = g_signal_new ("regenerated", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (PgmCanvasClass, regenerated), NULL, NULL, pgm_marshal_VOID__VOID, G_TYPE_NONE, 0); gobject_class->dispose = GST_DEBUG_FUNCPTR (pgm_canvas_dispose); GST_DEBUG_CATEGORY_INIT (pgm_canvas_debug, "pgm_canvas", 0, "canvas object"); } static void pgm_canvas_init (PgmCanvas *canvas) { guint i; /* canvas->entered_emission_stopper = NULL; */ /* Create and insert all the format in the counter hash initialized at 0 */ canvas->format_counter = g_hash_table_new (NULL, NULL); for (i = 0; i < PGM_IMAGE_NB_PIXEL_FORMATS; i++) g_hash_table_insert (canvas->format_counter, GINT_TO_POINTER (1 << i), GINT_TO_POINTER (0)); /* canvas->nb_formats = 0; */ /* canvas->far_layer = NULL; */ /* canvas->middle_layer = NULL; */ /* canvas->near_layer = NULL; */ canvas->width = 4.0f; canvas->height = 3.0f; canvas->pixel_offset_x = 0.005f; /* 4/800 */ canvas->pixel_offset_y = 0.005f; /* 3/600 */ /* canvas->pixel_formats = 0; */ } /* Public methods */ /** * pgm_canvas_new: * * Creates a new #PgmCanvas instance. * * MT safe. * * Returns: a new #PgmCanvas instance. */ PgmCanvas * pgm_canvas_new (void) { PgmCanvas *canvas; canvas = g_object_new (PGM_TYPE_CANVAS, NULL); GST_DEBUG_OBJECT (canvas, "created new canvas"); return canvas; } /** * pgm_canvas_set_size: * @canvas: a #PgmCanvas object. * @width: the canvas width. * @height: the canvas height. * * Sets the @width and @height size of @canvas. These values are not supposed * to be pixels. You are strongly encouraged to use abstract coordinates such as * 16.0x9.0 for a 16:9 interface or 4.0x3.0 for a 4:3 one, etc. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_canvas_set_size (PgmCanvas *canvas, gfloat width, gfloat height) { g_return_val_if_fail (PGM_IS_CANVAS (canvas), PGM_ERROR_X); GST_OBJECT_LOCK (canvas); canvas->width = MAX (1.0f, width); canvas->height = MAX (1.0f, height); GST_OBJECT_UNLOCK (canvas); g_signal_emit (G_OBJECT (canvas), pgm_canvas_signals[SIZE_CHANGED], 0); return PGM_ERROR_OK; } /** * pgm_canvas_get_size: * @canvas: a #PgmCanvas object. * @width: a pointer to a #gfloat where the canvas width is going to * be stored. * @height: a pointer to a #gfloat where the canvas height is going to * be stored. * * Retrieves width and height size of @canvas in @width and @height. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_canvas_get_size (PgmCanvas *canvas, gfloat *width, gfloat *height) { g_return_val_if_fail (PGM_IS_CANVAS (canvas), PGM_ERROR_X); g_return_val_if_fail (width != NULL, PGM_ERROR_X); g_return_val_if_fail (height != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (canvas); *width = canvas->width; *height = canvas->height; GST_OBJECT_UNLOCK (canvas); return PGM_ERROR_OK; } /** * pgm_canvas_add: * @canvas: a #PgmCanvas object. * @layer: a #PgmDrawableLayer to add #drawable into. * @drawable: the #PgmDrawable object to add. * * Adds @drawable to @canvas in @layer. Both @canvas and @drawable reference * counts will be increased by one as they are linking to each other. @drawable * reference will be sink as well so if the object reference was floating it * now belongs to @canvas and you don't have to unref @drawable when cleaning * up your objects. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_canvas_add (PgmCanvas *canvas, PgmDrawableLayer layer, PgmDrawable *drawable) { gint order = 0; g_return_val_if_fail (PGM_IS_CANVAS (canvas), PGM_ERROR_X); g_return_val_if_fail (PGM_IS_DRAWABLE (drawable), PGM_ERROR_X); GST_OBJECT_LOCK (canvas); /* Adds a reference to drawable, sink floating reference if any and set * parent */ if (G_UNLIKELY (!gst_object_set_parent (GST_OBJECT_CAST (drawable), GST_OBJECT_CAST (canvas)))) { GST_OBJECT_UNLOCK (canvas); GST_WARNING_OBJECT (drawable, "drawable already has parent"); return PGM_ERROR_X; } /* Add the drawable to its requested layer at the correct position */ switch (layer) { case PGM_DRAWABLE_FAR: canvas->far_layer = g_list_insert_sorted (canvas->far_layer, drawable, (GCompareFunc) z_compare); order = g_list_index (canvas->far_layer, drawable); break; case PGM_DRAWABLE_MIDDLE: canvas->middle_layer = g_list_insert_sorted (canvas->middle_layer, drawable, (GCompareFunc) z_compare); order = g_list_index (canvas->middle_layer, drawable); break; case PGM_DRAWABLE_NEAR: canvas->near_layer = g_list_insert_sorted (canvas->near_layer, drawable, (GCompareFunc) z_compare); order = g_list_index (canvas->near_layer, drawable); break; default: GST_WARNING_OBJECT (drawable, "has not been assigned to any layer"); goto beach; } GST_OBJECT_LOCK (drawable); drawable->layer = layer; GST_OBJECT_UNLOCK (drawable); GST_OBJECT_UNLOCK (canvas); update_grid_aligned_drawable (drawable); g_signal_emit (G_OBJECT (canvas), pgm_canvas_signals[DRAWABLE_ADDED], 0, drawable, layer, order); return PGM_ERROR_OK; beach: GST_OBJECT_UNLOCK (canvas); return PGM_ERROR_X; } /** * pgm_canvas_remove: * @canvas: a #PgmCanvas object. * @drawable: the #PgmDrawable object to remove. * * Removes @drawable from @canvas. Both @canvas and @drawable reference counts * will be decreased by one as they were referencing each other. In most cases * that means that @drawable is going to be destroyed because @canvas owned the * only reference to it. If you want to reuse @drawable in another canvas or * in another layer you need to take a reference to it before removing it from * @canvas. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_canvas_remove (PgmCanvas *canvas, PgmDrawable *drawable) { PgmDrawableLayer layer; g_return_val_if_fail (PGM_IS_CANVAS (canvas), PGM_ERROR_X); g_return_val_if_fail (PGM_IS_DRAWABLE (drawable), PGM_ERROR_X); GST_DEBUG_OBJECT (canvas, "removing drawable %s from canvas", GST_OBJECT_NAME (drawable)); GST_OBJECT_LOCK (drawable); /* Check if the drawable is in the canvas */ if (G_UNLIKELY (GST_OBJECT_PARENT (drawable) != GST_OBJECT (canvas))) { GST_OBJECT_UNLOCK (drawable); return PGM_ERROR_X; } /* Check if the drawable is already being removed and immediately * return */ if (G_UNLIKELY (GST_OBJECT_FLAG_IS_SET (drawable, PGM_DRAWABLE_FLAG_UNPARENTING))) { GST_OBJECT_UNLOCK (drawable); return PGM_ERROR_X; } GST_OBJECT_FLAG_SET (drawable, PGM_DRAWABLE_FLAG_UNPARENTING); GST_OBJECT_UNLOCK (drawable); GST_OBJECT_LOCK (canvas); /* Remove the drawable from its layer */ switch (drawable->layer) { case PGM_DRAWABLE_FAR: canvas->far_layer = g_list_remove (canvas->far_layer, drawable); break; case PGM_DRAWABLE_MIDDLE: canvas->middle_layer = g_list_remove (canvas->middle_layer, drawable); break; case PGM_DRAWABLE_NEAR: canvas->near_layer = g_list_remove (canvas->near_layer, drawable); break; default: /* We should have a really big problem to take that path */ GST_WARNING_OBJECT (drawable, "does not seem to be part of any layer"); } GST_OBJECT_UNLOCK (canvas); /* we ref here because after the _unparent() the drawable can be disposed * and we still need it to reset the UNPARENTING flag. */ gst_object_ref (drawable); gst_object_unparent (GST_OBJECT_CAST (drawable)); GST_OBJECT_LOCK (drawable); layer = drawable->layer; drawable->layer = PGM_DRAWABLE_UNBOUND; GST_OBJECT_FLAG_UNSET (drawable, PGM_DRAWABLE_FLAG_UNPARENTING); GST_OBJECT_UNLOCK (drawable); /* Drawables are not visible anymore when removed from the canvas */ pgm_drawable_hide (drawable); g_signal_emit (G_OBJECT (canvas), pgm_canvas_signals[DRAWABLE_REMOVED], 0, drawable, layer); /* drawable is really out of our control now */ gst_object_unref (drawable); return PGM_ERROR_OK; } /** * pgm_canvas_add_many: * @canvas: a #PgmCanvas object. * @layer: a #PgmDrawableLayer to add the drawables into. * @drawable_1: the #PgmDrawable object to add. * @...: additional #PgmDrawable objects to add. * * Adds a NULL-terminated list of drawables to @canvas. This function is * equivalent to calling pgm_canvas_add() for each member of the list. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_canvas_add_many (PgmCanvas *canvas, PgmDrawableLayer layer, PgmDrawable *drawable_1, ...) { va_list args; g_return_val_if_fail (PGM_IS_CANVAS (canvas), PGM_ERROR_X); va_start (args, drawable_1); while (drawable_1) { pgm_canvas_add (canvas, layer, drawable_1); drawable_1 = va_arg (args, PgmDrawable *); } va_end (args); return PGM_ERROR_OK; } /** * pgm_canvas_remove_many: * @canvas: a #PgmCanvas object. * @drawable_1: the #PgmDrawable object to remove. * @...: additional #PgmDrawable objects to remove. * * Removes a NULL-terminated list of drawables from @canvas. This function is * equivalent to calling pgm_canvas_remove() for each member of the list. * * MT safe. * * Returns: a #PgmError indicating success/failure. * */ PgmError pgm_canvas_remove_many (PgmCanvas *canvas, PgmDrawable *drawable_1, ...) { va_list args; g_return_val_if_fail (PGM_IS_CANVAS (canvas), PGM_ERROR_X); va_start (args, drawable_1); while (drawable_1) { pgm_canvas_remove (canvas, drawable_1); drawable_1 = va_arg (args, PgmDrawable *); } va_end (args); return PGM_ERROR_OK; } /** * pgm_canvas_set_order: * @canvas: a #PgmCanvas object. * @drawable: the #PgmDrawable to reorder. * @order: the new position of @drawable. * * Defines the ordering of @drawable in its layer at position @order. Since * drawables are ordered function of their z coordinate, set through * pgm_drawable_set_position(), this function is only useful if you want to * reorder drawables at the same z coordinate. If you try to reorder a drawable * inside a layer at an order where the current drawable doesn't have the same * z coordinate, the function will do nothing and return an error. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_canvas_set_order (PgmCanvas *canvas, PgmDrawable *drawable, gint order) { PgmDrawable *data = NULL; GList *list; g_return_val_if_fail (PGM_IS_CANVAS (canvas), PGM_ERROR_X); g_return_val_if_fail (PGM_IS_DRAWABLE (drawable), PGM_ERROR_X); GST_OBJECT_LOCK (canvas); GST_OBJECT_LOCK (drawable); /* Drawable should have canvas as a parent */ if (PGM_CANVAS (GST_OBJECT_PARENT (drawable)) != canvas) { GST_DEBUG_OBJECT (canvas, "canvas is not the parent of '%s'", GST_OBJECT_NAME (drawable)); goto error; } /* Get the layer GList */ switch (drawable->layer) { case PGM_DRAWABLE_NEAR: list = canvas->near_layer; break; case PGM_DRAWABLE_MIDDLE: list = canvas->middle_layer; break; case PGM_DRAWABLE_FAR: list = canvas->far_layer; break; default: /* Wrong layer */ GST_DEBUG_OBJECT (canvas, "'%s' cannot be reordered in this layer", GST_OBJECT_NAME (drawable)); goto error; } /* Get the drawable at the given order */ data = g_list_nth_data (list, order); /* Out of range checking */ if (data == NULL) { GST_DEBUG_OBJECT (canvas, "order is out of range"); goto error; } /* Same position in the list checking */ if (data == drawable) { GST_DEBUG_OBJECT (canvas, "'%s' is already at position %d", GST_OBJECT_NAME (drawable), order); goto nothing_to_do; } /* Same z coordinate checking */ if (data->z != drawable->z) { GST_DEBUG_OBJECT (canvas, "drawable at the requested position doesn't " "have the same z coordinate"); goto nothing_to_do; } /* Reorder the drawable */ list = g_list_remove (list, drawable); list = g_list_insert (list, drawable, order); /* Affect the reordered list to the canvas */ if (drawable->layer == PGM_DRAWABLE_NEAR) canvas->near_layer = list; else if (drawable->layer == PGM_DRAWABLE_MIDDLE) canvas->middle_layer = list; else canvas->far_layer = list; GST_OBJECT_UNLOCK (drawable); GST_OBJECT_UNLOCK (canvas); g_signal_emit (G_OBJECT (canvas), pgm_canvas_signals[DRAWABLE_REORDERED], 0, drawable, drawable->layer, order); return PGM_ERROR_OK; nothing_to_do: GST_OBJECT_UNLOCK (drawable); GST_OBJECT_UNLOCK (canvas); return PGM_ERROR_OK; error: GST_OBJECT_UNLOCK (drawable); GST_OBJECT_UNLOCK (canvas); return PGM_ERROR_X; } /** * pgm_canvas_get_order: * @canvas: a #PgmCanvas object. * @drawable: the #PgmDrawable to retrieve the layering. * @layer: a pointer to a #PgmDrawableLayer in which @drawable layer is going to * be stored. * @order: a pointer to a #gint in which the position of @drawable in the @layer * is going to be stored. * * Retrieves the layering of @drawable. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_canvas_get_order (PgmCanvas *canvas, PgmDrawable *drawable, PgmDrawableLayer *layer, gint *order) { g_return_val_if_fail (PGM_IS_CANVAS (canvas), PGM_ERROR_X); g_return_val_if_fail (PGM_IS_DRAWABLE (drawable), PGM_ERROR_X); g_return_val_if_fail (layer != NULL, PGM_ERROR_X); g_return_val_if_fail (order != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (drawable); GST_OBJECT_LOCK (canvas); if (G_UNLIKELY ((gpointer) GST_OBJECT_PARENT (drawable) != (gpointer) canvas)) { GST_WARNING_OBJECT (canvas, "not the parent of %s", GST_STR_NULL (GST_OBJECT_NAME (drawable))); GST_OBJECT_UNLOCK (drawable); GST_OBJECT_UNLOCK (canvas); return PGM_ERROR_X; } *layer = drawable->layer; GST_OBJECT_UNLOCK (drawable); switch (*layer) { case PGM_DRAWABLE_NEAR: *order = g_list_index (canvas->near_layer, drawable); break; case PGM_DRAWABLE_MIDDLE: *order = g_list_index (canvas->middle_layer, drawable); break; case PGM_DRAWABLE_FAR: *order = g_list_index (canvas->far_layer, drawable); break; default: *order = -1; break; } GST_OBJECT_UNLOCK (canvas); return PGM_ERROR_OK; } /** * pgm_canvas_get_layer_count: * @canvas: a #PgmCanvas object. * @layer: the #PgmDrawableLayer to retrieve the size. * @count: a pointer to a #gint in which the number of drawables in @layer is * going to be stored. * * Retrieves the number of drawables in @layer. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_canvas_get_layer_count (PgmCanvas *canvas, PgmDrawableLayer layer, gint *count) { g_return_val_if_fail (PGM_IS_CANVAS (canvas), PGM_ERROR_X); g_return_val_if_fail (count != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (canvas); switch (layer) { case PGM_DRAWABLE_NEAR: *count = g_list_length (canvas->near_layer); break; case PGM_DRAWABLE_MIDDLE: *count = g_list_length (canvas->middle_layer); break; case PGM_DRAWABLE_FAR: *count = g_list_length (canvas->far_layer); break; default: *count = -1; break; } GST_OBJECT_UNLOCK (canvas); return PGM_ERROR_OK; } /** * pgm_canvas_regenerate: * @canvas: a #PgmCanvas object. * * Affects all the drawables of the #canvas which need to be displayed * at a fixed size. It regenerates those rasterized pixmaps which have * been affected by the #canvas projection. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_canvas_regenerate (PgmCanvas *canvas) { g_return_val_if_fail (PGM_IS_CANVAS (canvas), PGM_ERROR_X); g_signal_emit (G_OBJECT (canvas), pgm_canvas_signals[REGENERATED], 0); return PGM_ERROR_OK; } /** * pgm_canvas_get_pixel_formats: * @canvas: a #PgmCanvas object. * @pixel_formats: a pointer to a #gulong where the mask of supported * #PgmImagePixelFormat is going to be stored. * * Gets the list of the supported pixel formats by @canvas. This is the * intersection of the pixel formats supported by the viewports to which * @canvas is bound. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_canvas_get_pixel_formats (PgmCanvas *canvas, gulong *pixel_formats) { g_return_val_if_fail (PGM_IS_CANVAS (canvas), PGM_ERROR_X); g_return_val_if_fail (pixel_formats != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (canvas); *pixel_formats = canvas->pixel_formats; GST_OBJECT_UNLOCK (canvas); return PGM_ERROR_OK; } /** * pgm_canvas_get_pixel_offsets: * @canvas: a #PgmCanvas object. * @x: a pointer to a #gfloat where the x pixel offset is going to be stored. * @y: a pointer to a #gfloat where the y pixel offset is going to be stored. * * Gets the x and y ratios corresponding to the offsets in canvas coordinates * between two pixels at z=0. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_canvas_get_pixel_offsets (PgmCanvas *canvas, gfloat *x, gfloat *y) { g_return_val_if_fail (PGM_IS_CANVAS (canvas), PGM_ERROR_X); g_return_val_if_fail (x != NULL, PGM_ERROR_X); g_return_val_if_fail (y != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (canvas); *x = canvas->pixel_offset_x; *y = canvas->pixel_offset_y; GST_OBJECT_UNLOCK (canvas); return PGM_ERROR_OK; } /* Protected methods */ /** * _pgm_canvas_update_order: * @canvas: the #PgmCanvas object. * @drawable: the #PgmDrawable to reorder. * * This function is only used internally by pgm_drawable_set_position() to * update the ordering of @drawable inside its layer when the z coordinate is * changed. * * MT safe. */ void _pgm_canvas_update_order (PgmCanvas *canvas, PgmDrawable *drawable) { gint order; g_return_if_fail (PGM_IS_CANVAS (canvas)); g_return_if_fail (PGM_IS_DRAWABLE (drawable)); GST_OBJECT_LOCK (canvas); GST_OBJECT_LOCK (drawable); switch (drawable->layer) { case PGM_DRAWABLE_NEAR: if (!need_ordering_update (canvas->near_layer, drawable)) goto no_update_needed; canvas->near_layer = g_list_remove (canvas->near_layer, drawable); canvas->near_layer = g_list_insert_sorted (canvas->near_layer, drawable, (GCompareFunc) z_compare); order = g_list_index (canvas->near_layer, drawable); break; case PGM_DRAWABLE_MIDDLE: if (!need_ordering_update (canvas->middle_layer, drawable)) goto no_update_needed; canvas->middle_layer = g_list_remove (canvas->middle_layer, drawable); canvas->middle_layer = g_list_insert_sorted (canvas->middle_layer, drawable, (GCompareFunc) z_compare); order = g_list_index (canvas->middle_layer, drawable); break; case PGM_DRAWABLE_FAR: if (!need_ordering_update (canvas->far_layer, drawable)) goto no_update_needed; canvas->far_layer = g_list_remove (canvas->far_layer, drawable); canvas->far_layer = g_list_insert_sorted (canvas->far_layer, drawable, (GCompareFunc) z_compare); order = g_list_index (canvas->far_layer, drawable); break; default: goto no_update_needed; break; } GST_OBJECT_UNLOCK (drawable); GST_OBJECT_UNLOCK (canvas); g_signal_emit (G_OBJECT (canvas), pgm_canvas_signals[DRAWABLE_REORDERED], 0, drawable, drawable->layer, order); return; no_update_needed: GST_OBJECT_UNLOCK (drawable); GST_OBJECT_UNLOCK (canvas); } /** * _pgm_canvas_update_grid_aligned_drawables: * @canvas: a #PgmCanvas object. * * This function is only used internally by pgm_viewport_update_projection() to * realign drawables with the grid aligned property set. */ void _pgm_canvas_update_grid_aligned_drawables (PgmCanvas *canvas) { update_grid_aligned_drawables (canvas, canvas->near_layer); update_grid_aligned_drawables (canvas, canvas->middle_layer); update_grid_aligned_drawables (canvas, canvas->far_layer); } /** * _pgm_canvas_add_pixel_formats: * @canvas: a #PgmCanvas object. * @pixel_formats: the mask of #PgmImagePixelFormat to add. * * This function is only used internally by pgm_viewport_set_canvas() to * update @canvas pixel formats. @canvas pixel formats stores the intersection * of all the viewport pixel formats projecting @canvas. This function adds * a new pixel formats mask to @canvas pixel formats. * * MT safe. */ void _pgm_canvas_add_pixel_formats (PgmCanvas *canvas, gulong pixel_formats) { gulong format; guint count; guint i; GST_OBJECT_LOCK (canvas); canvas->nb_formats++; canvas->pixel_formats = 0; for (i = 0; i < PGM_IMAGE_NB_PIXEL_FORMATS; i++) { format = 1 << i; count = 0; /* If the pixel format is available we update the format counter hash */ if (pixel_formats & format) { count = GPOINTER_TO_INT (g_hash_table_lookup (canvas->format_counter, GINT_TO_POINTER (format))) + 1; g_hash_table_replace (canvas->format_counter, GINT_TO_POINTER (format), GINT_TO_POINTER (count)); } /* If the number of pixel formats added equals the count of the current * format, all the pixel formats added supports the current format, so * that we can add the format to the canvas pixel formats mask. */ if (count == canvas->nb_formats) canvas->pixel_formats |= format; } GST_OBJECT_UNLOCK (canvas); } /** * _pgm_canvas_remove_pixel_formats: * @canvas: a #PgmCanvas object. * @pixel_formats: the mask of #PgmImagePixelFormat to remove. * * This function is only used internally by pgm_viewport_set_canvas() to * update @canvas pixel formats. @canvas pixel formats stores the intersection * of all the viewport pixel formats projecting @canvas. This function removes * a pixel formats mask from the @canvas pixel formats. * * MT safe. */ void _pgm_canvas_remove_pixel_formats (PgmCanvas *canvas, gulong pixel_formats) { gulong format; guint count; guint i; GST_OBJECT_LOCK (canvas); /* We cannot remove a format not applied */ if (G_UNLIKELY (canvas->nb_formats == 0)) { GST_OBJECT_UNLOCK (canvas); return; } canvas->nb_formats--; canvas->pixel_formats = 0; for (i = 0; i < PGM_IMAGE_NB_PIXEL_FORMATS; i++) { format = 1 << i; /* Get the format counter */ count = GPOINTER_TO_INT (g_hash_table_lookup (canvas->format_counter, GINT_TO_POINTER (format))); /* If the pixel format is available we update the format counter hash * decreasing the count value */ if (pixel_formats & format) { count--; g_hash_table_replace (canvas->format_counter, GINT_TO_POINTER (format), GINT_TO_POINTER (count)); } /* And update the pixel format accordingly. The check of a non-zero * count permits to avoid filling the whole mask with 1 when the number * of formats applied is 0. */ if (count && count == canvas->nb_formats) canvas->pixel_formats |= format; } GST_OBJECT_UNLOCK (canvas); } /** * _pgm_canvas_get_entered_emission_stopper: * @canvas: a #PgmCanvas instance. * * This function is only used internally by _pgm_drawable_do_motion_event() to * get the #PgmDrawable::entered emission stopper, that is, the #PgmDrawable * for which the callback connected to #PgmDrawable::entered returned TRUE. * * Returns: a #PgmDrawable instance, without a reference to it. */ PgmDrawable* _pgm_canvas_get_entered_emission_stopper (PgmCanvas *canvas) { PgmDrawable *entered_emission_stopper; g_return_val_if_fail (PGM_IS_CANVAS (canvas), NULL); GST_OBJECT_LOCK (canvas); entered_emission_stopper = canvas->entered_emission_stopper; GST_OBJECT_UNLOCK (canvas); return entered_emission_stopper; } /** * _pgm_canvas_set_entered_emission_stopper: * @canvas: a #PgmCanvas instance. * @drawable: a #PgmCanvas instance. * * This function is only used internally by _pgm_drawable_do_motion_event() to * set the #PgmDrawable::entered emission stopper, that is, the #PgmDrawable * for which the callback connected to #PgmDrawable::entered returned TRUE. * * MT safe. */ void _pgm_canvas_set_entered_emission_stopper (PgmCanvas *canvas, PgmDrawable *drawable) { g_return_if_fail (PGM_IS_CANVAS (canvas)); GST_OBJECT_LOCK (canvas); canvas->entered_emission_stopper = drawable; GST_OBJECT_UNLOCK (canvas); } pigment-0.3.17/pgm/pgmevents.c0000644000175000017500000021223011205034416013121 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment media rendering library * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari * * The keysym/Unicode table comes from a generator in the XTerm source code. * Copyright © 2001 Markus G. Kuhn , University of Cambridge * Richard Verhoeven * * The event data structures are strongly inspired by the GDK event system. */ /** * SECTION:pgmevents * @short_description: Various structs and functions used for events handling. * * Various structs and functions used by Pigment for events handling. * * Last reviewed on 2007-04-12 (0.1.5) */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include "pgmevents.h" static const struct { gushort keysym; gushort ucs; } pgm_keysym_to_unicode_tab[] = { { 0x01a1, 0x0104 }, /* Aogonek Ą LATIN CAPITAL LETTER A WITH OGONEK */ { 0x01a2, 0x02d8 }, /* breve ˘ BREVE */ { 0x01a3, 0x0141 }, /* Lstroke Ł LATIN CAPITAL LETTER L WITH STROKE */ { 0x01a5, 0x013d }, /* Lcaron Ľ LATIN CAPITAL LETTER L WITH CARON */ { 0x01a6, 0x015a }, /* Sacute Ś LATIN CAPITAL LETTER S WITH ACUTE */ { 0x01a9, 0x0160 }, /* Scaron Š LATIN CAPITAL LETTER S WITH CARON */ { 0x01aa, 0x015e }, /* Scedilla Ş LATIN CAPITAL LETTER S WITH CEDILLA */ { 0x01ab, 0x0164 }, /* Tcaron Ť LATIN CAPITAL LETTER T WITH CARON */ { 0x01ac, 0x0179 }, /* Zacute Ź LATIN CAPITAL LETTER Z WITH ACUTE */ { 0x01ae, 0x017d }, /* Zcaron Ž LATIN CAPITAL LETTER Z WITH CARON */ { 0x01af, 0x017b }, /* Zabovedot Ż LATIN CAPITAL LETTER Z WITH DOT ABOVE */ { 0x01b1, 0x0105 }, /* aogonek ą LATIN SMALL LETTER A WITH OGONEK */ { 0x01b2, 0x02db }, /* ogonek ˛ OGONEK */ { 0x01b3, 0x0142 }, /* lstroke ł LATIN SMALL LETTER L WITH STROKE */ { 0x01b5, 0x013e }, /* lcaron ľ LATIN SMALL LETTER L WITH CARON */ { 0x01b6, 0x015b }, /* sacute ś LATIN SMALL LETTER S WITH ACUTE */ { 0x01b7, 0x02c7 }, /* caron ˇ CARON */ { 0x01b9, 0x0161 }, /* scaron š LATIN SMALL LETTER S WITH CARON */ { 0x01ba, 0x015f }, /* scedilla ş LATIN SMALL LETTER S WITH CEDILLA */ { 0x01bb, 0x0165 }, /* tcaron ť LATIN SMALL LETTER T WITH CARON */ { 0x01bc, 0x017a }, /* zacute ź LATIN SMALL LETTER Z WITH ACUTE */ { 0x01bd, 0x02dd }, /* doubleacute ˝ DOUBLE ACUTE ACCENT */ { 0x01be, 0x017e }, /* zcaron ž LATIN SMALL LETTER Z WITH CARON */ { 0x01bf, 0x017c }, /* zabovedot ż LATIN SMALL LETTER Z WITH DOT ABOVE */ { 0x01c0, 0x0154 }, /* Racute Ŕ LATIN CAPITAL LETTER R WITH ACUTE */ { 0x01c3, 0x0102 }, /* Abreve Ă LATIN CAPITAL LETTER A WITH BREVE */ { 0x01c5, 0x0139 }, /* Lacute Ĺ LATIN CAPITAL LETTER L WITH ACUTE */ { 0x01c6, 0x0106 }, /* Cacute Ć LATIN CAPITAL LETTER C WITH ACUTE */ { 0x01c8, 0x010c }, /* Ccaron Č LATIN CAPITAL LETTER C WITH CARON */ { 0x01ca, 0x0118 }, /* Eogonek Ę LATIN CAPITAL LETTER E WITH OGONEK */ { 0x01cc, 0x011a }, /* Ecaron Ě LATIN CAPITAL LETTER E WITH CARON */ { 0x01cf, 0x010e }, /* Dcaron Ď LATIN CAPITAL LETTER D WITH CARON */ { 0x01d0, 0x0110 }, /* Dstroke Đ LATIN CAPITAL LETTER D WITH STROKE */ { 0x01d1, 0x0143 }, /* Nacute Ń LATIN CAPITAL LETTER N WITH ACUTE */ { 0x01d2, 0x0147 }, /* Ncaron Ň LATIN CAPITAL LETTER N WITH CARON */ { 0x01d5, 0x0150 }, /* Odoubleacute Ő LATIN CAPITAL LETTER O WITH DOUBLE ACUTE */ { 0x01d8, 0x0158 }, /* Rcaron Ř LATIN CAPITAL LETTER R WITH CARON */ { 0x01d9, 0x016e }, /* Uring Ů LATIN CAPITAL LETTER U WITH RING ABOVE */ { 0x01db, 0x0170 }, /* Udoubleacute Ű LATIN CAPITAL LETTER U WITH DOUBLE ACUTE */ { 0x01de, 0x0162 }, /* Tcedilla Ţ LATIN CAPITAL LETTER T WITH CEDILLA */ { 0x01e0, 0x0155 }, /* racute ŕ LATIN SMALL LETTER R WITH ACUTE */ { 0x01e3, 0x0103 }, /* abreve ă LATIN SMALL LETTER A WITH BREVE */ { 0x01e5, 0x013a }, /* lacute ĺ LATIN SMALL LETTER L WITH ACUTE */ { 0x01e6, 0x0107 }, /* cacute ć LATIN SMALL LETTER C WITH ACUTE */ { 0x01e8, 0x010d }, /* ccaron č LATIN SMALL LETTER C WITH CARON */ { 0x01ea, 0x0119 }, /* eogonek ę LATIN SMALL LETTER E WITH OGONEK */ { 0x01ec, 0x011b }, /* ecaron ě LATIN SMALL LETTER E WITH CARON */ { 0x01ef, 0x010f }, /* dcaron ď LATIN SMALL LETTER D WITH CARON */ { 0x01f0, 0x0111 }, /* dstroke đ LATIN SMALL LETTER D WITH STROKE */ { 0x01f1, 0x0144 }, /* nacute ń LATIN SMALL LETTER N WITH ACUTE */ { 0x01f2, 0x0148 }, /* ncaron ň LATIN SMALL LETTER N WITH CARON */ { 0x01f5, 0x0151 }, /* odoubleacute ő LATIN SMALL LETTER O WITH DOUBLE ACUTE */ { 0x01f8, 0x0159 }, /* rcaron ř LATIN SMALL LETTER R WITH CARON */ { 0x01f9, 0x016f }, /* uring ů LATIN SMALL LETTER U WITH RING ABOVE */ { 0x01fb, 0x0171 }, /* udoubleacute ű LATIN SMALL LETTER U WITH DOUBLE ACUTE */ { 0x01fe, 0x0163 }, /* tcedilla ţ LATIN SMALL LETTER T WITH CEDILLA */ { 0x01ff, 0x02d9 }, /* abovedot ˙ DOT ABOVE */ { 0x02a1, 0x0126 }, /* Hstroke Ħ LATIN CAPITAL LETTER H WITH STROKE */ { 0x02a6, 0x0124 }, /* Hcircumflex Ĥ LATIN CAPITAL LETTER H WITH CIRCUMFLEX */ { 0x02a9, 0x0130 }, /* Iabovedot İ LATIN CAPITAL LETTER I WITH DOT ABOVE */ { 0x02ab, 0x011e }, /* Gbreve Ğ LATIN CAPITAL LETTER G WITH BREVE */ { 0x02ac, 0x0134 }, /* Jcircumflex Ĵ LATIN CAPITAL LETTER J WITH CIRCUMFLEX */ { 0x02b1, 0x0127 }, /* hstroke ħ LATIN SMALL LETTER H WITH STROKE */ { 0x02b6, 0x0125 }, /* hcircumflex ĥ LATIN SMALL LETTER H WITH CIRCUMFLEX */ { 0x02b9, 0x0131 }, /* idotless ı LATIN SMALL LETTER DOTLESS I */ { 0x02bb, 0x011f }, /* gbreve ğ LATIN SMALL LETTER G WITH BREVE */ { 0x02bc, 0x0135 }, /* jcircumflex ĵ LATIN SMALL LETTER J WITH CIRCUMFLEX */ { 0x02c5, 0x010a }, /* Cabovedot Ċ LATIN CAPITAL LETTER C WITH DOT ABOVE */ { 0x02c6, 0x0108 }, /* Ccircumflex Ĉ LATIN CAPITAL LETTER C WITH CIRCUMFLEX */ { 0x02d5, 0x0120 }, /* Gabovedot Ġ LATIN CAPITAL LETTER G WITH DOT ABOVE */ { 0x02d8, 0x011c }, /* Gcircumflex Ĝ LATIN CAPITAL LETTER G WITH CIRCUMFLEX */ { 0x02dd, 0x016c }, /* Ubreve Ŭ LATIN CAPITAL LETTER U WITH BREVE */ { 0x02de, 0x015c }, /* Scircumflex Ŝ LATIN CAPITAL LETTER S WITH CIRCUMFLEX */ { 0x02e5, 0x010b }, /* cabovedot ċ LATIN SMALL LETTER C WITH DOT ABOVE */ { 0x02e6, 0x0109 }, /* ccircumflex ĉ LATIN SMALL LETTER C WITH CIRCUMFLEX */ { 0x02f5, 0x0121 }, /* gabovedot ġ LATIN SMALL LETTER G WITH DOT ABOVE */ { 0x02f8, 0x011d }, /* gcircumflex ĝ LATIN SMALL LETTER G WITH CIRCUMFLEX */ { 0x02fd, 0x016d }, /* ubreve ŭ LATIN SMALL LETTER U WITH BREVE */ { 0x02fe, 0x015d }, /* scircumflex ŝ LATIN SMALL LETTER S WITH CIRCUMFLEX */ { 0x03a2, 0x0138 }, /* kra ĸ LATIN SMALL LETTER KRA */ { 0x03a3, 0x0156 }, /* Rcedilla Ŗ LATIN CAPITAL LETTER R WITH CEDILLA */ { 0x03a5, 0x0128 }, /* Itilde Ĩ LATIN CAPITAL LETTER I WITH TILDE */ { 0x03a6, 0x013b }, /* Lcedilla Ļ LATIN CAPITAL LETTER L WITH CEDILLA */ { 0x03aa, 0x0112 }, /* Emacron Ē LATIN CAPITAL LETTER E WITH MACRON */ { 0x03ab, 0x0122 }, /* Gcedilla Ģ LATIN CAPITAL LETTER G WITH CEDILLA */ { 0x03ac, 0x0166 }, /* Tslash Ŧ LATIN CAPITAL LETTER T WITH STROKE */ { 0x03b3, 0x0157 }, /* rcedilla ŗ LATIN SMALL LETTER R WITH CEDILLA */ { 0x03b5, 0x0129 }, /* itilde ĩ LATIN SMALL LETTER I WITH TILDE */ { 0x03b6, 0x013c }, /* lcedilla ļ LATIN SMALL LETTER L WITH CEDILLA */ { 0x03ba, 0x0113 }, /* emacron ē LATIN SMALL LETTER E WITH MACRON */ { 0x03bb, 0x0123 }, /* gcedilla ģ LATIN SMALL LETTER G WITH CEDILLA */ { 0x03bc, 0x0167 }, /* tslash ŧ LATIN SMALL LETTER T WITH STROKE */ { 0x03bd, 0x014a }, /* ENG Ŋ LATIN CAPITAL LETTER ENG */ { 0x03bf, 0x014b }, /* eng ŋ LATIN SMALL LETTER ENG */ { 0x03c0, 0x0100 }, /* Amacron Ā LATIN CAPITAL LETTER A WITH MACRON */ { 0x03c7, 0x012e }, /* Iogonek Į LATIN CAPITAL LETTER I WITH OGONEK */ { 0x03cc, 0x0116 }, /* Eabovedot Ė LATIN CAPITAL LETTER E WITH DOT ABOVE */ { 0x03cf, 0x012a }, /* Imacron Ī LATIN CAPITAL LETTER I WITH MACRON */ { 0x03d1, 0x0145 }, /* Ncedilla Ņ LATIN CAPITAL LETTER N WITH CEDILLA */ { 0x03d2, 0x014c }, /* Omacron Ō LATIN CAPITAL LETTER O WITH MACRON */ { 0x03d3, 0x0136 }, /* Kcedilla Ķ LATIN CAPITAL LETTER K WITH CEDILLA */ { 0x03d9, 0x0172 }, /* Uogonek Ų LATIN CAPITAL LETTER U WITH OGONEK */ { 0x03dd, 0x0168 }, /* Utilde Ũ LATIN CAPITAL LETTER U WITH TILDE */ { 0x03de, 0x016a }, /* Umacron Ū LATIN CAPITAL LETTER U WITH MACRON */ { 0x03e0, 0x0101 }, /* amacron ā LATIN SMALL LETTER A WITH MACRON */ { 0x03e7, 0x012f }, /* iogonek į LATIN SMALL LETTER I WITH OGONEK */ { 0x03ec, 0x0117 }, /* eabovedot ė LATIN SMALL LETTER E WITH DOT ABOVE */ { 0x03ef, 0x012b }, /* imacron ī LATIN SMALL LETTER I WITH MACRON */ { 0x03f1, 0x0146 }, /* ncedilla ņ LATIN SMALL LETTER N WITH CEDILLA */ { 0x03f2, 0x014d }, /* omacron ō LATIN SMALL LETTER O WITH MACRON */ { 0x03f3, 0x0137 }, /* kcedilla ķ LATIN SMALL LETTER K WITH CEDILLA */ { 0x03f9, 0x0173 }, /* uogonek ų LATIN SMALL LETTER U WITH OGONEK */ { 0x03fd, 0x0169 }, /* utilde ũ LATIN SMALL LETTER U WITH TILDE */ { 0x03fe, 0x016b }, /* umacron ū LATIN SMALL LETTER U WITH MACRON */ { 0x047e, 0x203e }, /* overline ‾ OVERLINE */ { 0x04a1, 0x3002 }, /* kana_fullstop 。 IDEOGRAPHIC FULL STOP */ { 0x04a2, 0x300c }, /* kana_openingbracket 「 LEFT CORNER BRACKET */ { 0x04a3, 0x300d }, /* kana_closingbracket 」 RIGHT CORNER BRACKET */ { 0x04a4, 0x3001 }, /* kana_comma 、 IDEOGRAPHIC COMMA */ { 0x04a5, 0x30fb }, /* kana_conjunctive ・ KATAKANA MIDDLE DOT */ { 0x04a6, 0x30f2 }, /* kana_WO ヲ KATAKANA LETTER WO */ { 0x04a7, 0x30a1 }, /* kana_a ァ KATAKANA LETTER SMALL A */ { 0x04a8, 0x30a3 }, /* kana_i ィ KATAKANA LETTER SMALL I */ { 0x04a9, 0x30a5 }, /* kana_u ゥ KATAKANA LETTER SMALL U */ { 0x04aa, 0x30a7 }, /* kana_e ェ KATAKANA LETTER SMALL E */ { 0x04ab, 0x30a9 }, /* kana_o ォ KATAKANA LETTER SMALL O */ { 0x04ac, 0x30e3 }, /* kana_ya ャ KATAKANA LETTER SMALL YA */ { 0x04ad, 0x30e5 }, /* kana_yu ュ KATAKANA LETTER SMALL YU */ { 0x04ae, 0x30e7 }, /* kana_yo ョ KATAKANA LETTER SMALL YO */ { 0x04af, 0x30c3 }, /* kana_tsu ッ KATAKANA LETTER SMALL TU */ { 0x04b0, 0x30fc }, /* prolongedsound ー KATAKANA-HIRAGANA PROLONGED SOUND MARK */ { 0x04b1, 0x30a2 }, /* kana_A ア KATAKANA LETTER A */ { 0x04b2, 0x30a4 }, /* kana_I イ KATAKANA LETTER I */ { 0x04b3, 0x30a6 }, /* kana_U ウ KATAKANA LETTER U */ { 0x04b4, 0x30a8 }, /* kana_E エ KATAKANA LETTER E */ { 0x04b5, 0x30aa }, /* kana_O オ KATAKANA LETTER O */ { 0x04b6, 0x30ab }, /* kana_KA カ KATAKANA LETTER KA */ { 0x04b7, 0x30ad }, /* kana_KI キ KATAKANA LETTER KI */ { 0x04b8, 0x30af }, /* kana_KU ク KATAKANA LETTER KU */ { 0x04b9, 0x30b1 }, /* kana_KE ケ KATAKANA LETTER KE */ { 0x04ba, 0x30b3 }, /* kana_KO コ KATAKANA LETTER KO */ { 0x04bb, 0x30b5 }, /* kana_SA サ KATAKANA LETTER SA */ { 0x04bc, 0x30b7 }, /* kana_SHI シ KATAKANA LETTER SI */ { 0x04bd, 0x30b9 }, /* kana_SU ス KATAKANA LETTER SU */ { 0x04be, 0x30bb }, /* kana_SE セ KATAKANA LETTER SE */ { 0x04bf, 0x30bd }, /* kana_SO ソ KATAKANA LETTER SO */ { 0x04c0, 0x30bf }, /* kana_TA タ KATAKANA LETTER TA */ { 0x04c1, 0x30c1 }, /* kana_CHI チ KATAKANA LETTER TI */ { 0x04c2, 0x30c4 }, /* kana_TSU ツ KATAKANA LETTER TU */ { 0x04c3, 0x30c6 }, /* kana_TE テ KATAKANA LETTER TE */ { 0x04c4, 0x30c8 }, /* kana_TO ト KATAKANA LETTER TO */ { 0x04c5, 0x30ca }, /* kana_NA ナ KATAKANA LETTER NA */ { 0x04c6, 0x30cb }, /* kana_NI ニ KATAKANA LETTER NI */ { 0x04c7, 0x30cc }, /* kana_NU ヌ KATAKANA LETTER NU */ { 0x04c8, 0x30cd }, /* kana_NE ネ KATAKANA LETTER NE */ { 0x04c9, 0x30ce }, /* kana_NO ノ KATAKANA LETTER NO */ { 0x04ca, 0x30cf }, /* kana_HA ハ KATAKANA LETTER HA */ { 0x04cb, 0x30d2 }, /* kana_HI ヒ KATAKANA LETTER HI */ { 0x04cc, 0x30d5 }, /* kana_FU フ KATAKANA LETTER HU */ { 0x04cd, 0x30d8 }, /* kana_HE ヘ KATAKANA LETTER HE */ { 0x04ce, 0x30db }, /* kana_HO ホ KATAKANA LETTER HO */ { 0x04cf, 0x30de }, /* kana_MA マ KATAKANA LETTER MA */ { 0x04d0, 0x30df }, /* kana_MI ミ KATAKANA LETTER MI */ { 0x04d1, 0x30e0 }, /* kana_MU ム KATAKANA LETTER MU */ { 0x04d2, 0x30e1 }, /* kana_ME メ KATAKANA LETTER ME */ { 0x04d3, 0x30e2 }, /* kana_MO モ KATAKANA LETTER MO */ { 0x04d4, 0x30e4 }, /* kana_YA ヤ KATAKANA LETTER YA */ { 0x04d5, 0x30e6 }, /* kana_YU ユ KATAKANA LETTER YU */ { 0x04d6, 0x30e8 }, /* kana_YO ヨ KATAKANA LETTER YO */ { 0x04d7, 0x30e9 }, /* kana_RA ラ KATAKANA LETTER RA */ { 0x04d8, 0x30ea }, /* kana_RI リ KATAKANA LETTER RI */ { 0x04d9, 0x30eb }, /* kana_RU ル KATAKANA LETTER RU */ { 0x04da, 0x30ec }, /* kana_RE レ KATAKANA LETTER RE */ { 0x04db, 0x30ed }, /* kana_RO ロ KATAKANA LETTER RO */ { 0x04dc, 0x30ef }, /* kana_WA ワ KATAKANA LETTER WA */ { 0x04dd, 0x30f3 }, /* kana_N ン KATAKANA LETTER N */ { 0x04de, 0x309b }, /* voicedsound ゛ KATAKANA-HIRAGANA VOICED SOUND MARK */ { 0x04df, 0x309c }, /* semivoicedsound ゜ KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK */ { 0x05ac, 0x060c }, /* Arabic_comma ، ARABIC COMMA */ { 0x05bb, 0x061b }, /* Arabic_semicolon ؛ ARABIC SEMICOLON */ { 0x05bf, 0x061f }, /* Arabic_question_mark ؟ ARABIC QUESTION MARK */ { 0x05c1, 0x0621 }, /* Arabic_hamza ء ARABIC LETTER HAMZA */ { 0x05c2, 0x0622 }, /* Arabic_maddaonalef آ ARABIC LETTER ALEF WITH MADDA ABOVE */ { 0x05c3, 0x0623 }, /* Arabic_hamzaonalef أ ARABIC LETTER ALEF WITH HAMZA ABOVE */ { 0x05c4, 0x0624 }, /* Arabic_hamzaonwaw ؤ ARABIC LETTER WAW WITH HAMZA ABOVE */ { 0x05c5, 0x0625 }, /* Arabic_hamzaunderalef إ ARABIC LETTER ALEF WITH HAMZA BELOW */ { 0x05c6, 0x0626 }, /* Arabic_hamzaonyeh ئ ARABIC LETTER YEH WITH HAMZA ABOVE */ { 0x05c7, 0x0627 }, /* Arabic_alef ا ARABIC LETTER ALEF */ { 0x05c8, 0x0628 }, /* Arabic_beh ب ARABIC LETTER BEH */ { 0x05c9, 0x0629 }, /* Arabic_tehmarbuta ة ARABIC LETTER TEH MARBUTA */ { 0x05ca, 0x062a }, /* Arabic_teh ت ARABIC LETTER TEH */ { 0x05cb, 0x062b }, /* Arabic_theh ث ARABIC LETTER THEH */ { 0x05cc, 0x062c }, /* Arabic_jeem ج ARABIC LETTER JEEM */ { 0x05cd, 0x062d }, /* Arabic_hah ح ARABIC LETTER HAH */ { 0x05ce, 0x062e }, /* Arabic_khah خ ARABIC LETTER KHAH */ { 0x05cf, 0x062f }, /* Arabic_dal د ARABIC LETTER DAL */ { 0x05d0, 0x0630 }, /* Arabic_thal ذ ARABIC LETTER THAL */ { 0x05d1, 0x0631 }, /* Arabic_ra ر ARABIC LETTER REH */ { 0x05d2, 0x0632 }, /* Arabic_zain ز ARABIC LETTER ZAIN */ { 0x05d3, 0x0633 }, /* Arabic_seen س ARABIC LETTER SEEN */ { 0x05d4, 0x0634 }, /* Arabic_sheen ش ARABIC LETTER SHEEN */ { 0x05d5, 0x0635 }, /* Arabic_sad ص ARABIC LETTER SAD */ { 0x05d6, 0x0636 }, /* Arabic_dad ض ARABIC LETTER DAD */ { 0x05d7, 0x0637 }, /* Arabic_tah ط ARABIC LETTER TAH */ { 0x05d8, 0x0638 }, /* Arabic_zah ظ ARABIC LETTER ZAH */ { 0x05d9, 0x0639 }, /* Arabic_ain ع ARABIC LETTER AIN */ { 0x05da, 0x063a }, /* Arabic_ghain غ ARABIC LETTER GHAIN */ { 0x05e0, 0x0640 }, /* Arabic_tatweel ـ ARABIC TATWEEL */ { 0x05e1, 0x0641 }, /* Arabic_feh ف ARABIC LETTER FEH */ { 0x05e2, 0x0642 }, /* Arabic_qaf ق ARABIC LETTER QAF */ { 0x05e3, 0x0643 }, /* Arabic_kaf ك ARABIC LETTER KAF */ { 0x05e4, 0x0644 }, /* Arabic_lam ل ARABIC LETTER LAM */ { 0x05e5, 0x0645 }, /* Arabic_meem م ARABIC LETTER MEEM */ { 0x05e6, 0x0646 }, /* Arabic_noon ن ARABIC LETTER NOON */ { 0x05e7, 0x0647 }, /* Arabic_ha ه ARABIC LETTER HEH */ { 0x05e8, 0x0648 }, /* Arabic_waw و ARABIC LETTER WAW */ { 0x05e9, 0x0649 }, /* Arabic_alefmaksura ى ARABIC LETTER ALEF MAKSURA */ { 0x05ea, 0x064a }, /* Arabic_yeh ي ARABIC LETTER YEH */ { 0x05eb, 0x064b }, /* Arabic_fathatan ً ARABIC FATHATAN */ { 0x05ec, 0x064c }, /* Arabic_dammatan ٌ ARABIC DAMMATAN */ { 0x05ed, 0x064d }, /* Arabic_kasratan ٍ ARABIC KASRATAN */ { 0x05ee, 0x064e }, /* Arabic_fatha َ ARABIC FATHA */ { 0x05ef, 0x064f }, /* Arabic_damma ُ ARABIC DAMMA */ { 0x05f0, 0x0650 }, /* Arabic_kasra ِ ARABIC KASRA */ { 0x05f1, 0x0651 }, /* Arabic_shadda ّ ARABIC SHADDA */ { 0x05f2, 0x0652 }, /* Arabic_sukun ْ ARABIC SUKUN */ { 0x06a1, 0x0452 }, /* Serbian_dje ђ CYRILLIC SMALL LETTER DJE */ { 0x06a2, 0x0453 }, /* Macedonia_gje ѓ CYRILLIC SMALL LETTER GJE */ { 0x06a3, 0x0451 }, /* Cyrillic_io ё CYRILLIC SMALL LETTER IO */ { 0x06a4, 0x0454 }, /* Ukrainian_ie є CYRILLIC SMALL LETTER UKRAINIAN IE */ { 0x06a5, 0x0455 }, /* Macedonia_dse ѕ CYRILLIC SMALL LETTER DZE */ { 0x06a6, 0x0456 }, /* Ukrainian_i і CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I */ { 0x06a7, 0x0457 }, /* Ukrainian_yi ї CYRILLIC SMALL LETTER YI */ { 0x06a8, 0x0458 }, /* Cyrillic_je ј CYRILLIC SMALL LETTER JE */ { 0x06a9, 0x0459 }, /* Cyrillic_lje љ CYRILLIC SMALL LETTER LJE */ { 0x06aa, 0x045a }, /* Cyrillic_nje њ CYRILLIC SMALL LETTER NJE */ { 0x06ab, 0x045b }, /* Serbian_tshe ћ CYRILLIC SMALL LETTER TSHE */ { 0x06ac, 0x045c }, /* Macedonia_kje ќ CYRILLIC SMALL LETTER KJE */ { 0x06ad, 0x0491 }, /* Ukrainian_ghe_with_upturn ґ CYRILLIC SMALL LETTER GHE WITH UPTURN */ { 0x06ae, 0x045e }, /* Byelorussian_shortu ў CYRILLIC SMALL LETTER SHORT U */ { 0x06af, 0x045f }, /* Cyrillic_dzhe џ CYRILLIC SMALL LETTER DZHE */ { 0x06b0, 0x2116 }, /* numerosign № NUMERO SIGN */ { 0x06b1, 0x0402 }, /* Serbian_DJE Ђ CYRILLIC CAPITAL LETTER DJE */ { 0x06b2, 0x0403 }, /* Macedonia_GJE Ѓ CYRILLIC CAPITAL LETTER GJE */ { 0x06b3, 0x0401 }, /* Cyrillic_IO Ё CYRILLIC CAPITAL LETTER IO */ { 0x06b4, 0x0404 }, /* Ukrainian_IE Є CYRILLIC CAPITAL LETTER UKRAINIAN IE */ { 0x06b5, 0x0405 }, /* Macedonia_DSE Ѕ CYRILLIC CAPITAL LETTER DZE */ { 0x06b6, 0x0406 }, /* Ukrainian_I І CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I */ { 0x06b7, 0x0407 }, /* Ukrainian_YI Ї CYRILLIC CAPITAL LETTER YI */ { 0x06b8, 0x0408 }, /* Cyrillic_JE Ј CYRILLIC CAPITAL LETTER JE */ { 0x06b9, 0x0409 }, /* Cyrillic_LJE Љ CYRILLIC CAPITAL LETTER LJE */ { 0x06ba, 0x040a }, /* Cyrillic_NJE Њ CYRILLIC CAPITAL LETTER NJE */ { 0x06bb, 0x040b }, /* Serbian_TSHE Ћ CYRILLIC CAPITAL LETTER TSHE */ { 0x06bc, 0x040c }, /* Macedonia_KJE Ќ CYRILLIC CAPITAL LETTER KJE */ { 0x06bd, 0x0490 }, /* Ukrainian_GHE_WITH_UPTURN Ґ CYRILLIC CAPITAL LETTER GHE WITH UPTURN */ { 0x06be, 0x040e }, /* Byelorussian_SHORTU Ў CYRILLIC CAPITAL LETTER SHORT U */ { 0x06bf, 0x040f }, /* Cyrillic_DZHE Џ CYRILLIC CAPITAL LETTER DZHE */ { 0x06c0, 0x044e }, /* Cyrillic_yu ю CYRILLIC SMALL LETTER YU */ { 0x06c1, 0x0430 }, /* Cyrillic_a а CYRILLIC SMALL LETTER A */ { 0x06c2, 0x0431 }, /* Cyrillic_be б CYRILLIC SMALL LETTER BE */ { 0x06c3, 0x0446 }, /* Cyrillic_tse ц CYRILLIC SMALL LETTER TSE */ { 0x06c4, 0x0434 }, /* Cyrillic_de д CYRILLIC SMALL LETTER DE */ { 0x06c5, 0x0435 }, /* Cyrillic_ie е CYRILLIC SMALL LETTER IE */ { 0x06c6, 0x0444 }, /* Cyrillic_ef ф CYRILLIC SMALL LETTER EF */ { 0x06c7, 0x0433 }, /* Cyrillic_ghe г CYRILLIC SMALL LETTER GHE */ { 0x06c8, 0x0445 }, /* Cyrillic_ha х CYRILLIC SMALL LETTER HA */ { 0x06c9, 0x0438 }, /* Cyrillic_i и CYRILLIC SMALL LETTER I */ { 0x06ca, 0x0439 }, /* Cyrillic_shorti й CYRILLIC SMALL LETTER SHORT I */ { 0x06cb, 0x043a }, /* Cyrillic_ka к CYRILLIC SMALL LETTER KA */ { 0x06cc, 0x043b }, /* Cyrillic_el л CYRILLIC SMALL LETTER EL */ { 0x06cd, 0x043c }, /* Cyrillic_em м CYRILLIC SMALL LETTER EM */ { 0x06ce, 0x043d }, /* Cyrillic_en н CYRILLIC SMALL LETTER EN */ { 0x06cf, 0x043e }, /* Cyrillic_o о CYRILLIC SMALL LETTER O */ { 0x06d0, 0x043f }, /* Cyrillic_pe п CYRILLIC SMALL LETTER PE */ { 0x06d1, 0x044f }, /* Cyrillic_ya я CYRILLIC SMALL LETTER YA */ { 0x06d2, 0x0440 }, /* Cyrillic_er р CYRILLIC SMALL LETTER ER */ { 0x06d3, 0x0441 }, /* Cyrillic_es с CYRILLIC SMALL LETTER ES */ { 0x06d4, 0x0442 }, /* Cyrillic_te т CYRILLIC SMALL LETTER TE */ { 0x06d5, 0x0443 }, /* Cyrillic_u у CYRILLIC SMALL LETTER U */ { 0x06d6, 0x0436 }, /* Cyrillic_zhe ж CYRILLIC SMALL LETTER ZHE */ { 0x06d7, 0x0432 }, /* Cyrillic_ve в CYRILLIC SMALL LETTER VE */ { 0x06d8, 0x044c }, /* Cyrillic_softsign ь CYRILLIC SMALL LETTER SOFT SIGN */ { 0x06d9, 0x044b }, /* Cyrillic_yeru ы CYRILLIC SMALL LETTER YERU */ { 0x06da, 0x0437 }, /* Cyrillic_ze з CYRILLIC SMALL LETTER ZE */ { 0x06db, 0x0448 }, /* Cyrillic_sha ш CYRILLIC SMALL LETTER SHA */ { 0x06dc, 0x044d }, /* Cyrillic_e э CYRILLIC SMALL LETTER E */ { 0x06dd, 0x0449 }, /* Cyrillic_shcha щ CYRILLIC SMALL LETTER SHCHA */ { 0x06de, 0x0447 }, /* Cyrillic_che ч CYRILLIC SMALL LETTER CHE */ { 0x06df, 0x044a }, /* Cyrillic_hardsign ъ CYRILLIC SMALL LETTER HARD SIGN */ { 0x06e0, 0x042e }, /* Cyrillic_YU Ю CYRILLIC CAPITAL LETTER YU */ { 0x06e1, 0x0410 }, /* Cyrillic_A А CYRILLIC CAPITAL LETTER A */ { 0x06e2, 0x0411 }, /* Cyrillic_BE Б CYRILLIC CAPITAL LETTER BE */ { 0x06e3, 0x0426 }, /* Cyrillic_TSE Ц CYRILLIC CAPITAL LETTER TSE */ { 0x06e4, 0x0414 }, /* Cyrillic_DE Д CYRILLIC CAPITAL LETTER DE */ { 0x06e5, 0x0415 }, /* Cyrillic_IE Е CYRILLIC CAPITAL LETTER IE */ { 0x06e6, 0x0424 }, /* Cyrillic_EF Ф CYRILLIC CAPITAL LETTER EF */ { 0x06e7, 0x0413 }, /* Cyrillic_GHE Г CYRILLIC CAPITAL LETTER GHE */ { 0x06e8, 0x0425 }, /* Cyrillic_HA Х CYRILLIC CAPITAL LETTER HA */ { 0x06e9, 0x0418 }, /* Cyrillic_I И CYRILLIC CAPITAL LETTER I */ { 0x06ea, 0x0419 }, /* Cyrillic_SHORTI Й CYRILLIC CAPITAL LETTER SHORT I */ { 0x06eb, 0x041a }, /* Cyrillic_KA К CYRILLIC CAPITAL LETTER KA */ { 0x06ec, 0x041b }, /* Cyrillic_EL Л CYRILLIC CAPITAL LETTER EL */ { 0x06ed, 0x041c }, /* Cyrillic_EM М CYRILLIC CAPITAL LETTER EM */ { 0x06ee, 0x041d }, /* Cyrillic_EN Н CYRILLIC CAPITAL LETTER EN */ { 0x06ef, 0x041e }, /* Cyrillic_O О CYRILLIC CAPITAL LETTER O */ { 0x06f0, 0x041f }, /* Cyrillic_PE П CYRILLIC CAPITAL LETTER PE */ { 0x06f1, 0x042f }, /* Cyrillic_YA Я CYRILLIC CAPITAL LETTER YA */ { 0x06f2, 0x0420 }, /* Cyrillic_ER Р CYRILLIC CAPITAL LETTER ER */ { 0x06f3, 0x0421 }, /* Cyrillic_ES С CYRILLIC CAPITAL LETTER ES */ { 0x06f4, 0x0422 }, /* Cyrillic_TE Т CYRILLIC CAPITAL LETTER TE */ { 0x06f5, 0x0423 }, /* Cyrillic_U У CYRILLIC CAPITAL LETTER U */ { 0x06f6, 0x0416 }, /* Cyrillic_ZHE Ж CYRILLIC CAPITAL LETTER ZHE */ { 0x06f7, 0x0412 }, /* Cyrillic_VE В CYRILLIC CAPITAL LETTER VE */ { 0x06f8, 0x042c }, /* Cyrillic_SOFTSIGN Ь CYRILLIC CAPITAL LETTER SOFT SIGN */ { 0x06f9, 0x042b }, /* Cyrillic_YERU Ы CYRILLIC CAPITAL LETTER YERU */ { 0x06fa, 0x0417 }, /* Cyrillic_ZE З CYRILLIC CAPITAL LETTER ZE */ { 0x06fb, 0x0428 }, /* Cyrillic_SHA Ш CYRILLIC CAPITAL LETTER SHA */ { 0x06fc, 0x042d }, /* Cyrillic_E Э CYRILLIC CAPITAL LETTER E */ { 0x06fd, 0x0429 }, /* Cyrillic_SHCHA Щ CYRILLIC CAPITAL LETTER SHCHA */ { 0x06fe, 0x0427 }, /* Cyrillic_CHE Ч CYRILLIC CAPITAL LETTER CHE */ { 0x06ff, 0x042a }, /* Cyrillic_HARDSIGN Ъ CYRILLIC CAPITAL LETTER HARD SIGN */ { 0x07a1, 0x0386 }, /* Greek_ALPHAaccent Ά GREEK CAPITAL LETTER ALPHA WITH TONOS */ { 0x07a2, 0x0388 }, /* Greek_EPSILONaccent Έ GREEK CAPITAL LETTER EPSILON WITH TONOS */ { 0x07a3, 0x0389 }, /* Greek_ETAaccent Ή GREEK CAPITAL LETTER ETA WITH TONOS */ { 0x07a4, 0x038a }, /* Greek_IOTAaccent Ί GREEK CAPITAL LETTER IOTA WITH TONOS */ { 0x07a5, 0x03aa }, /* Greek_IOTAdiaeresis Ϊ GREEK CAPITAL LETTER IOTA WITH DIALYTIKA */ { 0x07a7, 0x038c }, /* Greek_OMICRONaccent Ό GREEK CAPITAL LETTER OMICRON WITH TONOS */ { 0x07a8, 0x038e }, /* Greek_UPSILONaccent Ύ GREEK CAPITAL LETTER UPSILON WITH TONOS */ { 0x07a9, 0x03ab }, /* Greek_UPSILONdieresis Ϋ GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA */ { 0x07ab, 0x038f }, /* Greek_OMEGAaccent Ώ GREEK CAPITAL LETTER OMEGA WITH TONOS */ { 0x07ae, 0x0385 }, /* Greek_accentdieresis ΅ GREEK DIALYTIKA TONOS */ { 0x07af, 0x2015 }, /* Greek_horizbar ― HORIZONTAL BAR */ { 0x07b1, 0x03ac }, /* Greek_alphaaccent ά GREEK SMALL LETTER ALPHA WITH TONOS */ { 0x07b2, 0x03ad }, /* Greek_epsilonaccent έ GREEK SMALL LETTER EPSILON WITH TONOS */ { 0x07b3, 0x03ae }, /* Greek_etaaccent ή GREEK SMALL LETTER ETA WITH TONOS */ { 0x07b4, 0x03af }, /* Greek_iotaaccent ί GREEK SMALL LETTER IOTA WITH TONOS */ { 0x07b5, 0x03ca }, /* Greek_iotadieresis ϊ GREEK SMALL LETTER IOTA WITH DIALYTIKA */ { 0x07b6, 0x0390 }, /* Greek_iotaaccentdieresis ΐ GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS */ { 0x07b7, 0x03cc }, /* Greek_omicronaccent ό GREEK SMALL LETTER OMICRON WITH TONOS */ { 0x07b8, 0x03cd }, /* Greek_upsilonaccent ύ GREEK SMALL LETTER UPSILON WITH TONOS */ { 0x07b9, 0x03cb }, /* Greek_upsilondieresis ϋ GREEK SMALL LETTER UPSILON WITH DIALYTIKA */ { 0x07ba, 0x03b0 }, /* Greek_upsilonaccentdieresis ΰ GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS */ { 0x07bb, 0x03ce }, /* Greek_omegaaccent ώ GREEK SMALL LETTER OMEGA WITH TONOS */ { 0x07c1, 0x0391 }, /* Greek_ALPHA Α GREEK CAPITAL LETTER ALPHA */ { 0x07c2, 0x0392 }, /* Greek_BETA Β GREEK CAPITAL LETTER BETA */ { 0x07c3, 0x0393 }, /* Greek_GAMMA Γ GREEK CAPITAL LETTER GAMMA */ { 0x07c4, 0x0394 }, /* Greek_DELTA Δ GREEK CAPITAL LETTER DELTA */ { 0x07c5, 0x0395 }, /* Greek_EPSILON Ε GREEK CAPITAL LETTER EPSILON */ { 0x07c6, 0x0396 }, /* Greek_ZETA Ζ GREEK CAPITAL LETTER ZETA */ { 0x07c7, 0x0397 }, /* Greek_ETA Η GREEK CAPITAL LETTER ETA */ { 0x07c8, 0x0398 }, /* Greek_THETA Θ GREEK CAPITAL LETTER THETA */ { 0x07c9, 0x0399 }, /* Greek_IOTA Ι GREEK CAPITAL LETTER IOTA */ { 0x07ca, 0x039a }, /* Greek_KAPPA Κ GREEK CAPITAL LETTER KAPPA */ { 0x07cb, 0x039b }, /* Greek_LAMBDA Λ GREEK CAPITAL LETTER LAMDA */ { 0x07cc, 0x039c }, /* Greek_MU Μ GREEK CAPITAL LETTER MU */ { 0x07cd, 0x039d }, /* Greek_NU Ν GREEK CAPITAL LETTER NU */ { 0x07ce, 0x039e }, /* Greek_XI Ξ GREEK CAPITAL LETTER XI */ { 0x07cf, 0x039f }, /* Greek_OMICRON Ο GREEK CAPITAL LETTER OMICRON */ { 0x07d0, 0x03a0 }, /* Greek_PI Π GREEK CAPITAL LETTER PI */ { 0x07d1, 0x03a1 }, /* Greek_RHO Ρ GREEK CAPITAL LETTER RHO */ { 0x07d2, 0x03a3 }, /* Greek_SIGMA Σ GREEK CAPITAL LETTER SIGMA */ { 0x07d4, 0x03a4 }, /* Greek_TAU Τ GREEK CAPITAL LETTER TAU */ { 0x07d5, 0x03a5 }, /* Greek_UPSILON Υ GREEK CAPITAL LETTER UPSILON */ { 0x07d6, 0x03a6 }, /* Greek_PHI Φ GREEK CAPITAL LETTER PHI */ { 0x07d7, 0x03a7 }, /* Greek_CHI Χ GREEK CAPITAL LETTER CHI */ { 0x07d8, 0x03a8 }, /* Greek_PSI Ψ GREEK CAPITAL LETTER PSI */ { 0x07d9, 0x03a9 }, /* Greek_OMEGA Ω GREEK CAPITAL LETTER OMEGA */ { 0x07e1, 0x03b1 }, /* Greek_alpha α GREEK SMALL LETTER ALPHA */ { 0x07e2, 0x03b2 }, /* Greek_beta β GREEK SMALL LETTER BETA */ { 0x07e3, 0x03b3 }, /* Greek_gamma γ GREEK SMALL LETTER GAMMA */ { 0x07e4, 0x03b4 }, /* Greek_delta δ GREEK SMALL LETTER DELTA */ { 0x07e5, 0x03b5 }, /* Greek_epsilon ε GREEK SMALL LETTER EPSILON */ { 0x07e6, 0x03b6 }, /* Greek_zeta ζ GREEK SMALL LETTER ZETA */ { 0x07e7, 0x03b7 }, /* Greek_eta η GREEK SMALL LETTER ETA */ { 0x07e8, 0x03b8 }, /* Greek_theta θ GREEK SMALL LETTER THETA */ { 0x07e9, 0x03b9 }, /* Greek_iota ι GREEK SMALL LETTER IOTA */ { 0x07ea, 0x03ba }, /* Greek_kappa κ GREEK SMALL LETTER KAPPA */ { 0x07eb, 0x03bb }, /* Greek_lambda λ GREEK SMALL LETTER LAMDA */ { 0x07ec, 0x03bc }, /* Greek_mu μ GREEK SMALL LETTER MU */ { 0x07ed, 0x03bd }, /* Greek_nu ν GREEK SMALL LETTER NU */ { 0x07ee, 0x03be }, /* Greek_xi ξ GREEK SMALL LETTER XI */ { 0x07ef, 0x03bf }, /* Greek_omicron ο GREEK SMALL LETTER OMICRON */ { 0x07f0, 0x03c0 }, /* Greek_pi π GREEK SMALL LETTER PI */ { 0x07f1, 0x03c1 }, /* Greek_rho ρ GREEK SMALL LETTER RHO */ { 0x07f2, 0x03c3 }, /* Greek_sigma σ GREEK SMALL LETTER SIGMA */ { 0x07f3, 0x03c2 }, /* Greek_finalsmallsigma ς GREEK SMALL LETTER FINAL SIGMA */ { 0x07f4, 0x03c4 }, /* Greek_tau τ GREEK SMALL LETTER TAU */ { 0x07f5, 0x03c5 }, /* Greek_upsilon υ GREEK SMALL LETTER UPSILON */ { 0x07f6, 0x03c6 }, /* Greek_phi φ GREEK SMALL LETTER PHI */ { 0x07f7, 0x03c7 }, /* Greek_chi χ GREEK SMALL LETTER CHI */ { 0x07f8, 0x03c8 }, /* Greek_psi ψ GREEK SMALL LETTER PSI */ { 0x07f9, 0x03c9 }, /* Greek_omega ω GREEK SMALL LETTER OMEGA */ { 0x08a1, 0x23b7 }, /* leftradical ⎷ RADICAL SYMBOL BOTTOM */ { 0x08a2, 0x250c }, /* topleftradical ┌ BOX DRAWINGS LIGHT DOWN AND RIGHT */ { 0x08a3, 0x2500 }, /* horizconnector ─ BOX DRAWINGS LIGHT HORIZONTAL */ { 0x08a4, 0x2320 }, /* topintegral ⌠ TOP HALF INTEGRAL */ { 0x08a5, 0x2321 }, /* botintegral ⌡ BOTTOM HALF INTEGRAL */ { 0x08a6, 0x2502 }, /* vertconnector │ BOX DRAWINGS LIGHT VERTICAL */ { 0x08a7, 0x23a1 }, /* topleftsqbracket ⎡ LEFT SQUARE BRACKET UPPER CORNER */ { 0x08a8, 0x23a3 }, /* botleftsqbracket ⎣ LEFT SQUARE BRACKET LOWER CORNER */ { 0x08a9, 0x23a4 }, /* toprightsqbracket ⎤ RIGHT SQUARE BRACKET UPPER CORNER */ { 0x08aa, 0x23a6 }, /* botrightsqbracket ⎦ RIGHT SQUARE BRACKET LOWER CORNER */ { 0x08ab, 0x239b }, /* topleftparens ⎛ LEFT PARENTHESIS UPPER HOOK */ { 0x08ac, 0x239d }, /* botleftparens ⎝ LEFT PARENTHESIS LOWER HOOK */ { 0x08ad, 0x239e }, /* toprightparens ⎞ RIGHT PARENTHESIS UPPER HOOK */ { 0x08ae, 0x23a0 }, /* botrightparens ⎠ RIGHT PARENTHESIS LOWER HOOK */ { 0x08af, 0x23a8 }, /* leftmiddlecurlybrace ⎨ LEFT CURLY BRACKET MIDDLE PIECE */ { 0x08b0, 0x23ac }, /* rightmiddlecurlybrace ⎬ RIGHT CURLY BRACKET MIDDLE PIECE */ /* 0x08b1 topleftsummation ? ??? */ /* 0x08b2 botleftsummation ? ??? */ /* 0x08b3 topvertsummationconnector ? ??? */ /* 0x08b4 botvertsummationconnector ? ??? */ /* 0x08b5 toprightsummation ? ??? */ /* 0x08b6 botrightsummation ? ??? */ /* 0x08b7 rightmiddlesummation ? ??? */ { 0x08bc, 0x2264 }, /* lessthanequal ≤ LESS-THAN OR EQUAL TO */ { 0x08bd, 0x2260 }, /* notequal ≠ NOT EQUAL TO */ { 0x08be, 0x2265 }, /* greaterthanequal ≥ GREATER-THAN OR EQUAL TO */ { 0x08bf, 0x222b }, /* integral ∫ INTEGRAL */ { 0x08c0, 0x2234 }, /* therefore ∴ THEREFORE */ { 0x08c1, 0x221d }, /* variation ∝ PROPORTIONAL TO */ { 0x08c2, 0x221e }, /* infinity ∞ INFINITY */ { 0x08c5, 0x2207 }, /* nabla ∇ NABLA */ { 0x08c8, 0x223c }, /* approximate ∼ TILDE OPERATOR */ { 0x08c9, 0x2243 }, /* similarequal ≃ ASYMPTOTICALLY EQUAL TO */ { 0x08cd, 0x21d4 }, /* ifonlyif ⇔ LEFT RIGHT DOUBLE ARROW */ { 0x08ce, 0x21d2 }, /* implies ⇒ RIGHTWARDS DOUBLE ARROW */ { 0x08cf, 0x2261 }, /* identical ≡ IDENTICAL TO */ { 0x08d6, 0x221a }, /* radical √ SQUARE ROOT */ { 0x08da, 0x2282 }, /* includedin ⊂ SUBSET OF */ { 0x08db, 0x2283 }, /* includes ⊃ SUPERSET OF */ { 0x08dc, 0x2229 }, /* intersection ∩ INTERSECTION */ { 0x08dd, 0x222a }, /* union ∪ UNION */ { 0x08de, 0x2227 }, /* logicaland ∧ LOGICAL AND */ { 0x08df, 0x2228 }, /* logicalor ∨ LOGICAL OR */ { 0x08ef, 0x2202 }, /* partialderivative ∂ PARTIAL DIFFERENTIAL */ { 0x08f6, 0x0192 }, /* function ƒ LATIN SMALL LETTER F WITH HOOK */ { 0x08fb, 0x2190 }, /* leftarrow ← LEFTWARDS ARROW */ { 0x08fc, 0x2191 }, /* uparrow ↑ UPWARDS ARROW */ { 0x08fd, 0x2192 }, /* rightarrow → RIGHTWARDS ARROW */ { 0x08fe, 0x2193 }, /* downarrow ↓ DOWNWARDS ARROW */ { 0x09df, 0x2422 }, /* blank ␢ BLANK SYMBOL */ { 0x09e0, 0x25c6 }, /* soliddiamond ◆ BLACK DIAMOND */ { 0x09e1, 0x2592 }, /* checkerboard ▒ MEDIUM SHADE */ { 0x09e2, 0x2409 }, /* ht ␉ SYMBOL FOR HORIZONTAL TABULATION */ { 0x09e3, 0x240c }, /* ff ␌ SYMBOL FOR FORM FEED */ { 0x09e4, 0x240d }, /* cr ␍ SYMBOL FOR CARRIAGE RETURN */ { 0x09e5, 0x240a }, /* lf ␊ SYMBOL FOR LINE FEED */ { 0x09e8, 0x2424 }, /* nl ␤ SYMBOL FOR NEWLINE */ { 0x09e9, 0x240b }, /* vt ␋ SYMBOL FOR VERTICAL TABULATION */ { 0x09ea, 0x2518 }, /* lowrightcorner ┘ BOX DRAWINGS LIGHT UP AND LEFT */ { 0x09eb, 0x2510 }, /* uprightcorner ┐ BOX DRAWINGS LIGHT DOWN AND LEFT */ { 0x09ec, 0x250c }, /* upleftcorner ┌ BOX DRAWINGS LIGHT DOWN AND RIGHT */ { 0x09ed, 0x2514 }, /* lowleftcorner └ BOX DRAWINGS LIGHT UP AND RIGHT */ { 0x09ee, 0x253c }, /* crossinglines ┼ BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL */ { 0x09ef, 0x23ba }, /* horizlinescan1 ⎺ HORIZONTAL SCAN LINE-1 */ { 0x09f0, 0x23bb }, /* horizlinescan3 ⎻ HORIZONTAL SCAN LINE-3 */ { 0x09f1, 0x2500 }, /* horizlinescan5 ─ BOX DRAWINGS LIGHT HORIZONTAL */ { 0x09f2, 0x23bc }, /* horizlinescan7 ⎼ HORIZONTAL SCAN LINE-7 */ { 0x09f3, 0x23bd }, /* horizlinescan9 ⎽ HORIZONTAL SCAN LINE-9 */ { 0x09f4, 0x251c }, /* leftt ├ BOX DRAWINGS LIGHT VERTICAL AND RIGHT */ { 0x09f5, 0x2524 }, /* rightt ┤ BOX DRAWINGS LIGHT VERTICAL AND LEFT */ { 0x09f6, 0x2534 }, /* bott ┴ BOX DRAWINGS LIGHT UP AND HORIZONTAL */ { 0x09f7, 0x252c }, /* topt ┬ BOX DRAWINGS LIGHT DOWN AND HORIZONTAL */ { 0x09f8, 0x2502 }, /* vertbar │ BOX DRAWINGS LIGHT VERTICAL */ { 0x0aa1, 0x2003 }, /* emspace   EM SPACE */ { 0x0aa2, 0x2002 }, /* enspace   EN SPACE */ { 0x0aa3, 0x2004 }, /* em3space   THREE-PER-EM SPACE */ { 0x0aa4, 0x2005 }, /* em4space   FOUR-PER-EM SPACE */ { 0x0aa5, 0x2007 }, /* digitspace   FIGURE SPACE */ { 0x0aa6, 0x2008 }, /* punctspace   PUNCTUATION SPACE */ { 0x0aa7, 0x2009 }, /* thinspace   THIN SPACE */ { 0x0aa8, 0x200a }, /* hairspace   HAIR SPACE */ { 0x0aa9, 0x2014 }, /* emdash — EM DASH */ { 0x0aaa, 0x2013 }, /* endash – EN DASH */ { 0x0aac, 0x2423 }, /* signifblank ␣ OPEN BOX */ { 0x0aae, 0x2026 }, /* ellipsis … HORIZONTAL ELLIPSIS */ { 0x0aaf, 0x2025 }, /* doubbaselinedot ‥ TWO DOT LEADER */ { 0x0ab0, 0x2153 }, /* onethird ⅓ VULGAR FRACTION ONE THIRD */ { 0x0ab1, 0x2154 }, /* twothirds ⅔ VULGAR FRACTION TWO THIRDS */ { 0x0ab2, 0x2155 }, /* onefifth ⅕ VULGAR FRACTION ONE FIFTH */ { 0x0ab3, 0x2156 }, /* twofifths ⅖ VULGAR FRACTION TWO FIFTHS */ { 0x0ab4, 0x2157 }, /* threefifths ⅗ VULGAR FRACTION THREE FIFTHS */ { 0x0ab5, 0x2158 }, /* fourfifths ⅘ VULGAR FRACTION FOUR FIFTHS */ { 0x0ab6, 0x2159 }, /* onesixth ⅙ VULGAR FRACTION ONE SIXTH */ { 0x0ab7, 0x215a }, /* fivesixths ⅚ VULGAR FRACTION FIVE SIXTHS */ { 0x0ab8, 0x2105 }, /* careof ℅ CARE OF */ { 0x0abb, 0x2012 }, /* figdash ‒ FIGURE DASH */ { 0x0abc, 0x2329 }, /* leftanglebracket 〈 LEFT-POINTING ANGLE BRACKET */ { 0x0abd, 0x002e }, /* decimalpoint . FULL STOP */ { 0x0abe, 0x232a }, /* rightanglebracket 〉 RIGHT-POINTING ANGLE BRACKET */ /* 0x0abf marker ? ??? */ { 0x0ac3, 0x215b }, /* oneeighth ⅛ VULGAR FRACTION ONE EIGHTH */ { 0x0ac4, 0x215c }, /* threeeighths ⅜ VULGAR FRACTION THREE EIGHTHS */ { 0x0ac5, 0x215d }, /* fiveeighths ⅝ VULGAR FRACTION FIVE EIGHTHS */ { 0x0ac6, 0x215e }, /* seveneighths ⅞ VULGAR FRACTION SEVEN EIGHTHS */ { 0x0ac9, 0x2122 }, /* trademark ™ TRADE MARK SIGN */ { 0x0aca, 0x2613 }, /* signaturemark ☓ SALTIRE */ /* 0x0acb trademarkincircle ? ??? */ { 0x0acc, 0x25c1 }, /* leftopentriangle ◁ WHITE LEFT-POINTING TRIANGLE */ { 0x0acd, 0x25b7 }, /* rightopentriangle ▷ WHITE RIGHT-POINTING TRIANGLE */ { 0x0ace, 0x25cb }, /* emopencircle ○ WHITE CIRCLE */ { 0x0acf, 0x25af }, /* emopenrectangle ▯ WHITE VERTICAL RECTANGLE */ { 0x0ad0, 0x2018 }, /* leftsinglequotemark ‘ LEFT SINGLE QUOTATION MARK */ { 0x0ad1, 0x2019 }, /* rightsinglequotemark ’ RIGHT SINGLE QUOTATION MARK */ { 0x0ad2, 0x201c }, /* leftdoublequotemark “ LEFT DOUBLE QUOTATION MARK */ { 0x0ad3, 0x201d }, /* rightdoublequotemark ” RIGHT DOUBLE QUOTATION MARK */ { 0x0ad4, 0x211e }, /* prescription ℞ PRESCRIPTION TAKE */ { 0x0ad6, 0x2032 }, /* minutes ′ PRIME */ { 0x0ad7, 0x2033 }, /* seconds ″ DOUBLE PRIME */ { 0x0ad9, 0x271d }, /* latincross ✝ LATIN CROSS */ /* 0x0ada hexagram ? ??? */ { 0x0adb, 0x25ac }, /* filledrectbullet ▬ BLACK RECTANGLE */ { 0x0adc, 0x25c0 }, /* filledlefttribullet ◀ BLACK LEFT-POINTING TRIANGLE */ { 0x0add, 0x25b6 }, /* filledrighttribullet ▶ BLACK RIGHT-POINTING TRIANGLE */ { 0x0ade, 0x25cf }, /* emfilledcircle ● BLACK CIRCLE */ { 0x0adf, 0x25ae }, /* emfilledrect ▮ BLACK VERTICAL RECTANGLE */ { 0x0ae0, 0x25e6 }, /* enopencircbullet ◦ WHITE BULLET */ { 0x0ae1, 0x25ab }, /* enopensquarebullet ▫ WHITE SMALL SQUARE */ { 0x0ae2, 0x25ad }, /* openrectbullet ▭ WHITE RECTANGLE */ { 0x0ae3, 0x25b3 }, /* opentribulletup △ WHITE UP-POINTING TRIANGLE */ { 0x0ae4, 0x25bd }, /* opentribulletdown ▽ WHITE DOWN-POINTING TRIANGLE */ { 0x0ae5, 0x2606 }, /* openstar ☆ WHITE STAR */ { 0x0ae6, 0x2022 }, /* enfilledcircbullet • BULLET */ { 0x0ae7, 0x25aa }, /* enfilledsqbullet ▪ BLACK SMALL SQUARE */ { 0x0ae8, 0x25b2 }, /* filledtribulletup ▲ BLACK UP-POINTING TRIANGLE */ { 0x0ae9, 0x25bc }, /* filledtribulletdown ▼ BLACK DOWN-POINTING TRIANGLE */ { 0x0aea, 0x261c }, /* leftpointer ☜ WHITE LEFT POINTING INDEX */ { 0x0aeb, 0x261e }, /* rightpointer ☞ WHITE RIGHT POINTING INDEX */ { 0x0aec, 0x2663 }, /* club ♣ BLACK CLUB SUIT */ { 0x0aed, 0x2666 }, /* diamond ♦ BLACK DIAMOND SUIT */ { 0x0aee, 0x2665 }, /* heart ♥ BLACK HEART SUIT */ { 0x0af0, 0x2720 }, /* maltesecross ✠ MALTESE CROSS */ { 0x0af1, 0x2020 }, /* dagger † DAGGER */ { 0x0af2, 0x2021 }, /* doubledagger ‡ DOUBLE DAGGER */ { 0x0af3, 0x2713 }, /* checkmark ✓ CHECK MARK */ { 0x0af4, 0x2717 }, /* ballotcross ✗ BALLOT X */ { 0x0af5, 0x266f }, /* musicalsharp ♯ MUSIC SHARP SIGN */ { 0x0af6, 0x266d }, /* musicalflat ♭ MUSIC FLAT SIGN */ { 0x0af7, 0x2642 }, /* malesymbol ♂ MALE SIGN */ { 0x0af8, 0x2640 }, /* femalesymbol ♀ FEMALE SIGN */ { 0x0af9, 0x260e }, /* telephone ☎ BLACK TELEPHONE */ { 0x0afa, 0x2315 }, /* telephonerecorder ⌕ TELEPHONE RECORDER */ { 0x0afb, 0x2117 }, /* phonographcopyright ℗ SOUND RECORDING COPYRIGHT */ { 0x0afc, 0x2038 }, /* caret ‸ CARET */ { 0x0afd, 0x201a }, /* singlelowquotemark ‚ SINGLE LOW-9 QUOTATION MARK */ { 0x0afe, 0x201e }, /* doublelowquotemark „ DOUBLE LOW-9 QUOTATION MARK */ /* 0x0aff cursor ? ??? */ { 0x0ba3, 0x003c }, /* leftcaret < LESS-THAN SIGN */ { 0x0ba6, 0x003e }, /* rightcaret > GREATER-THAN SIGN */ { 0x0ba8, 0x2228 }, /* downcaret ∨ LOGICAL OR */ { 0x0ba9, 0x2227 }, /* upcaret ∧ LOGICAL AND */ { 0x0bc0, 0x00af }, /* overbar ¯ MACRON */ { 0x0bc2, 0x22a5 }, /* downtack ⊥ UP TACK */ { 0x0bc3, 0x2229 }, /* upshoe ∩ INTERSECTION */ { 0x0bc4, 0x230a }, /* downstile ⌊ LEFT FLOOR */ { 0x0bc6, 0x005f }, /* underbar _ LOW LINE */ { 0x0bca, 0x2218 }, /* jot ∘ RING OPERATOR */ { 0x0bcc, 0x2395 }, /* quad ⎕ APL FUNCTIONAL SYMBOL QUAD */ { 0x0bce, 0x22a4 }, /* uptack ⊤ DOWN TACK */ { 0x0bcf, 0x25cb }, /* circle ○ WHITE CIRCLE */ { 0x0bd3, 0x2308 }, /* upstile ⌈ LEFT CEILING */ { 0x0bd6, 0x222a }, /* downshoe ∪ UNION */ { 0x0bd8, 0x2283 }, /* rightshoe ⊃ SUPERSET OF */ { 0x0bda, 0x2282 }, /* leftshoe ⊂ SUBSET OF */ { 0x0bdc, 0x22a2 }, /* lefttack ⊢ RIGHT TACK */ { 0x0bfc, 0x22a3 }, /* righttack ⊣ LEFT TACK */ { 0x0cdf, 0x2017 }, /* hebrew_doublelowline ‗ DOUBLE LOW LINE */ { 0x0ce0, 0x05d0 }, /* hebrew_aleph א HEBREW LETTER ALEF */ { 0x0ce1, 0x05d1 }, /* hebrew_bet ב HEBREW LETTER BET */ { 0x0ce2, 0x05d2 }, /* hebrew_gimel ג HEBREW LETTER GIMEL */ { 0x0ce3, 0x05d3 }, /* hebrew_dalet ד HEBREW LETTER DALET */ { 0x0ce4, 0x05d4 }, /* hebrew_he ה HEBREW LETTER HE */ { 0x0ce5, 0x05d5 }, /* hebrew_waw ו HEBREW LETTER VAV */ { 0x0ce6, 0x05d6 }, /* hebrew_zain ז HEBREW LETTER ZAYIN */ { 0x0ce7, 0x05d7 }, /* hebrew_chet ח HEBREW LETTER HET */ { 0x0ce8, 0x05d8 }, /* hebrew_tet ט HEBREW LETTER TET */ { 0x0ce9, 0x05d9 }, /* hebrew_yod י HEBREW LETTER YOD */ { 0x0cea, 0x05da }, /* hebrew_finalkaph ך HEBREW LETTER FINAL KAF */ { 0x0ceb, 0x05db }, /* hebrew_kaph כ HEBREW LETTER KAF */ { 0x0cec, 0x05dc }, /* hebrew_lamed ל HEBREW LETTER LAMED */ { 0x0ced, 0x05dd }, /* hebrew_finalmem ם HEBREW LETTER FINAL MEM */ { 0x0cee, 0x05de }, /* hebrew_mem מ HEBREW LETTER MEM */ { 0x0cef, 0x05df }, /* hebrew_finalnun ן HEBREW LETTER FINAL NUN */ { 0x0cf0, 0x05e0 }, /* hebrew_nun נ HEBREW LETTER NUN */ { 0x0cf1, 0x05e1 }, /* hebrew_samech ס HEBREW LETTER SAMEKH */ { 0x0cf2, 0x05e2 }, /* hebrew_ayin ע HEBREW LETTER AYIN */ { 0x0cf3, 0x05e3 }, /* hebrew_finalpe ף HEBREW LETTER FINAL PE */ { 0x0cf4, 0x05e4 }, /* hebrew_pe פ HEBREW LETTER PE */ { 0x0cf5, 0x05e5 }, /* hebrew_finalzade ץ HEBREW LETTER FINAL TSADI */ { 0x0cf6, 0x05e6 }, /* hebrew_zade צ HEBREW LETTER TSADI */ { 0x0cf7, 0x05e7 }, /* hebrew_qoph ק HEBREW LETTER QOF */ { 0x0cf8, 0x05e8 }, /* hebrew_resh ר HEBREW LETTER RESH */ { 0x0cf9, 0x05e9 }, /* hebrew_shin ש HEBREW LETTER SHIN */ { 0x0cfa, 0x05ea }, /* hebrew_taw ת HEBREW LETTER TAV */ { 0x0da1, 0x0e01 }, /* Thai_kokai ก THAI CHARACTER KO KAI */ { 0x0da2, 0x0e02 }, /* Thai_khokhai ข THAI CHARACTER KHO KHAI */ { 0x0da3, 0x0e03 }, /* Thai_khokhuat ฃ THAI CHARACTER KHO KHUAT */ { 0x0da4, 0x0e04 }, /* Thai_khokhwai ค THAI CHARACTER KHO KHWAI */ { 0x0da5, 0x0e05 }, /* Thai_khokhon ฅ THAI CHARACTER KHO KHON */ { 0x0da6, 0x0e06 }, /* Thai_khorakhang ฆ THAI CHARACTER KHO RAKHANG */ { 0x0da7, 0x0e07 }, /* Thai_ngongu ง THAI CHARACTER NGO NGU */ { 0x0da8, 0x0e08 }, /* Thai_chochan จ THAI CHARACTER CHO CHAN */ { 0x0da9, 0x0e09 }, /* Thai_choching ฉ THAI CHARACTER CHO CHING */ { 0x0daa, 0x0e0a }, /* Thai_chochang ช THAI CHARACTER CHO CHANG */ { 0x0dab, 0x0e0b }, /* Thai_soso ซ THAI CHARACTER SO SO */ { 0x0dac, 0x0e0c }, /* Thai_chochoe ฌ THAI CHARACTER CHO CHOE */ { 0x0dad, 0x0e0d }, /* Thai_yoying ญ THAI CHARACTER YO YING */ { 0x0dae, 0x0e0e }, /* Thai_dochada ฎ THAI CHARACTER DO CHADA */ { 0x0daf, 0x0e0f }, /* Thai_topatak ฏ THAI CHARACTER TO PATAK */ { 0x0db0, 0x0e10 }, /* Thai_thothan ฐ THAI CHARACTER THO THAN */ { 0x0db1, 0x0e11 }, /* Thai_thonangmontho ฑ THAI CHARACTER THO NANGMONTHO */ { 0x0db2, 0x0e12 }, /* Thai_thophuthao ฒ THAI CHARACTER THO PHUTHAO */ { 0x0db3, 0x0e13 }, /* Thai_nonen ณ THAI CHARACTER NO NEN */ { 0x0db4, 0x0e14 }, /* Thai_dodek ด THAI CHARACTER DO DEK */ { 0x0db5, 0x0e15 }, /* Thai_totao ต THAI CHARACTER TO TAO */ { 0x0db6, 0x0e16 }, /* Thai_thothung ถ THAI CHARACTER THO THUNG */ { 0x0db7, 0x0e17 }, /* Thai_thothahan ท THAI CHARACTER THO THAHAN */ { 0x0db8, 0x0e18 }, /* Thai_thothong ธ THAI CHARACTER THO THONG */ { 0x0db9, 0x0e19 }, /* Thai_nonu น THAI CHARACTER NO NU */ { 0x0dba, 0x0e1a }, /* Thai_bobaimai บ THAI CHARACTER BO BAIMAI */ { 0x0dbb, 0x0e1b }, /* Thai_popla ป THAI CHARACTER PO PLA */ { 0x0dbc, 0x0e1c }, /* Thai_phophung ผ THAI CHARACTER PHO PHUNG */ { 0x0dbd, 0x0e1d }, /* Thai_fofa ฝ THAI CHARACTER FO FA */ { 0x0dbe, 0x0e1e }, /* Thai_phophan พ THAI CHARACTER PHO PHAN */ { 0x0dbf, 0x0e1f }, /* Thai_fofan ฟ THAI CHARACTER FO FAN */ { 0x0dc0, 0x0e20 }, /* Thai_phosamphao ภ THAI CHARACTER PHO SAMPHAO */ { 0x0dc1, 0x0e21 }, /* Thai_moma ม THAI CHARACTER MO MA */ { 0x0dc2, 0x0e22 }, /* Thai_yoyak ย THAI CHARACTER YO YAK */ { 0x0dc3, 0x0e23 }, /* Thai_rorua ร THAI CHARACTER RO RUA */ { 0x0dc4, 0x0e24 }, /* Thai_ru ฤ THAI CHARACTER RU */ { 0x0dc5, 0x0e25 }, /* Thai_loling ล THAI CHARACTER LO LING */ { 0x0dc6, 0x0e26 }, /* Thai_lu ฦ THAI CHARACTER LU */ { 0x0dc7, 0x0e27 }, /* Thai_wowaen ว THAI CHARACTER WO WAEN */ { 0x0dc8, 0x0e28 }, /* Thai_sosala ศ THAI CHARACTER SO SALA */ { 0x0dc9, 0x0e29 }, /* Thai_sorusi ษ THAI CHARACTER SO RUSI */ { 0x0dca, 0x0e2a }, /* Thai_sosua ส THAI CHARACTER SO SUA */ { 0x0dcb, 0x0e2b }, /* Thai_hohip ห THAI CHARACTER HO HIP */ { 0x0dcc, 0x0e2c }, /* Thai_lochula ฬ THAI CHARACTER LO CHULA */ { 0x0dcd, 0x0e2d }, /* Thai_oang อ THAI CHARACTER O ANG */ { 0x0dce, 0x0e2e }, /* Thai_honokhuk ฮ THAI CHARACTER HO NOKHUK */ { 0x0dcf, 0x0e2f }, /* Thai_paiyannoi ฯ THAI CHARACTER PAIYANNOI */ { 0x0dd0, 0x0e30 }, /* Thai_saraa ะ THAI CHARACTER SARA A */ { 0x0dd1, 0x0e31 }, /* Thai_maihanakat ั THAI CHARACTER MAI HAN-AKAT */ { 0x0dd2, 0x0e32 }, /* Thai_saraaa า THAI CHARACTER SARA AA */ { 0x0dd3, 0x0e33 }, /* Thai_saraam ำ THAI CHARACTER SARA AM */ { 0x0dd4, 0x0e34 }, /* Thai_sarai ิ THAI CHARACTER SARA I */ { 0x0dd5, 0x0e35 }, /* Thai_saraii ี THAI CHARACTER SARA II */ { 0x0dd6, 0x0e36 }, /* Thai_saraue ึ THAI CHARACTER SARA UE */ { 0x0dd7, 0x0e37 }, /* Thai_sarauee ื THAI CHARACTER SARA UEE */ { 0x0dd8, 0x0e38 }, /* Thai_sarau ุ THAI CHARACTER SARA U */ { 0x0dd9, 0x0e39 }, /* Thai_sarauu ู THAI CHARACTER SARA UU */ { 0x0dda, 0x0e3a }, /* Thai_phinthu ฺ THAI CHARACTER PHINTHU */ { 0x0dde, 0x0e3e }, /* Thai_maihanakat_maitho ฾ ??? */ { 0x0ddf, 0x0e3f }, /* Thai_baht ฿ THAI CURRENCY SYMBOL BAHT */ { 0x0de0, 0x0e40 }, /* Thai_sarae เ THAI CHARACTER SARA E */ { 0x0de1, 0x0e41 }, /* Thai_saraae แ THAI CHARACTER SARA AE */ { 0x0de2, 0x0e42 }, /* Thai_sarao โ THAI CHARACTER SARA O */ { 0x0de3, 0x0e43 }, /* Thai_saraaimaimuan ใ THAI CHARACTER SARA AI MAIMUAN */ { 0x0de4, 0x0e44 }, /* Thai_saraaimaimalai ไ THAI CHARACTER SARA AI MAIMALAI */ { 0x0de5, 0x0e45 }, /* Thai_lakkhangyao ๅ THAI CHARACTER LAKKHANGYAO */ { 0x0de6, 0x0e46 }, /* Thai_maiyamok ๆ THAI CHARACTER MAIYAMOK */ { 0x0de7, 0x0e47 }, /* Thai_maitaikhu ็ THAI CHARACTER MAITAIKHU */ { 0x0de8, 0x0e48 }, /* Thai_maiek ่ THAI CHARACTER MAI EK */ { 0x0de9, 0x0e49 }, /* Thai_maitho ้ THAI CHARACTER MAI THO */ { 0x0dea, 0x0e4a }, /* Thai_maitri ๊ THAI CHARACTER MAI TRI */ { 0x0deb, 0x0e4b }, /* Thai_maichattawa ๋ THAI CHARACTER MAI CHATTAWA */ { 0x0dec, 0x0e4c }, /* Thai_thanthakhat ์ THAI CHARACTER THANTHAKHAT */ { 0x0ded, 0x0e4d }, /* Thai_nikhahit ํ THAI CHARACTER NIKHAHIT */ { 0x0df0, 0x0e50 }, /* Thai_leksun ๐ THAI DIGIT ZERO */ { 0x0df1, 0x0e51 }, /* Thai_leknung ๑ THAI DIGIT ONE */ { 0x0df2, 0x0e52 }, /* Thai_leksong ๒ THAI DIGIT TWO */ { 0x0df3, 0x0e53 }, /* Thai_leksam ๓ THAI DIGIT THREE */ { 0x0df4, 0x0e54 }, /* Thai_leksi ๔ THAI DIGIT FOUR */ { 0x0df5, 0x0e55 }, /* Thai_lekha ๕ THAI DIGIT FIVE */ { 0x0df6, 0x0e56 }, /* Thai_lekhok ๖ THAI DIGIT SIX */ { 0x0df7, 0x0e57 }, /* Thai_lekchet ๗ THAI DIGIT SEVEN */ { 0x0df8, 0x0e58 }, /* Thai_lekpaet ๘ THAI DIGIT EIGHT */ { 0x0df9, 0x0e59 }, /* Thai_lekkao ๙ THAI DIGIT NINE */ { 0x0ea1, 0x3131 }, /* Hangul_Kiyeog ㄱ HANGUL LETTER KIYEOK */ { 0x0ea2, 0x3132 }, /* Hangul_SsangKiyeog ㄲ HANGUL LETTER SSANGKIYEOK */ { 0x0ea3, 0x3133 }, /* Hangul_KiyeogSios ㄳ HANGUL LETTER KIYEOK-SIOS */ { 0x0ea4, 0x3134 }, /* Hangul_Nieun ㄴ HANGUL LETTER NIEUN */ { 0x0ea5, 0x3135 }, /* Hangul_NieunJieuj ㄵ HANGUL LETTER NIEUN-CIEUC */ { 0x0ea6, 0x3136 }, /* Hangul_NieunHieuh ㄶ HANGUL LETTER NIEUN-HIEUH */ { 0x0ea7, 0x3137 }, /* Hangul_Dikeud ㄷ HANGUL LETTER TIKEUT */ { 0x0ea8, 0x3138 }, /* Hangul_SsangDikeud ㄸ HANGUL LETTER SSANGTIKEUT */ { 0x0ea9, 0x3139 }, /* Hangul_Rieul ㄹ HANGUL LETTER RIEUL */ { 0x0eaa, 0x313a }, /* Hangul_RieulKiyeog ㄺ HANGUL LETTER RIEUL-KIYEOK */ { 0x0eab, 0x313b }, /* Hangul_RieulMieum ㄻ HANGUL LETTER RIEUL-MIEUM */ { 0x0eac, 0x313c }, /* Hangul_RieulPieub ㄼ HANGUL LETTER RIEUL-PIEUP */ { 0x0ead, 0x313d }, /* Hangul_RieulSios ㄽ HANGUL LETTER RIEUL-SIOS */ { 0x0eae, 0x313e }, /* Hangul_RieulTieut ㄾ HANGUL LETTER RIEUL-THIEUTH */ { 0x0eaf, 0x313f }, /* Hangul_RieulPhieuf ㄿ HANGUL LETTER RIEUL-PHIEUPH */ { 0x0eb0, 0x3140 }, /* Hangul_RieulHieuh ㅀ HANGUL LETTER RIEUL-HIEUH */ { 0x0eb1, 0x3141 }, /* Hangul_Mieum ㅁ HANGUL LETTER MIEUM */ { 0x0eb2, 0x3142 }, /* Hangul_Pieub ㅂ HANGUL LETTER PIEUP */ { 0x0eb3, 0x3143 }, /* Hangul_SsangPieub ㅃ HANGUL LETTER SSANGPIEUP */ { 0x0eb4, 0x3144 }, /* Hangul_PieubSios ㅄ HANGUL LETTER PIEUP-SIOS */ { 0x0eb5, 0x3145 }, /* Hangul_Sios ㅅ HANGUL LETTER SIOS */ { 0x0eb6, 0x3146 }, /* Hangul_SsangSios ㅆ HANGUL LETTER SSANGSIOS */ { 0x0eb7, 0x3147 }, /* Hangul_Ieung ㅇ HANGUL LETTER IEUNG */ { 0x0eb8, 0x3148 }, /* Hangul_Jieuj ㅈ HANGUL LETTER CIEUC */ { 0x0eb9, 0x3149 }, /* Hangul_SsangJieuj ㅉ HANGUL LETTER SSANGCIEUC */ { 0x0eba, 0x314a }, /* Hangul_Cieuc ㅊ HANGUL LETTER CHIEUCH */ { 0x0ebb, 0x314b }, /* Hangul_Khieuq ㅋ HANGUL LETTER KHIEUKH */ { 0x0ebc, 0x314c }, /* Hangul_Tieut ㅌ HANGUL LETTER THIEUTH */ { 0x0ebd, 0x314d }, /* Hangul_Phieuf ㅍ HANGUL LETTER PHIEUPH */ { 0x0ebe, 0x314e }, /* Hangul_Hieuh ㅎ HANGUL LETTER HIEUH */ { 0x0ebf, 0x314f }, /* Hangul_A ㅏ HANGUL LETTER A */ { 0x0ec0, 0x3150 }, /* Hangul_AE ㅐ HANGUL LETTER AE */ { 0x0ec1, 0x3151 }, /* Hangul_YA ㅑ HANGUL LETTER YA */ { 0x0ec2, 0x3152 }, /* Hangul_YAE ㅒ HANGUL LETTER YAE */ { 0x0ec3, 0x3153 }, /* Hangul_EO ㅓ HANGUL LETTER EO */ { 0x0ec4, 0x3154 }, /* Hangul_E ㅔ HANGUL LETTER E */ { 0x0ec5, 0x3155 }, /* Hangul_YEO ㅕ HANGUL LETTER YEO */ { 0x0ec6, 0x3156 }, /* Hangul_YE ㅖ HANGUL LETTER YE */ { 0x0ec7, 0x3157 }, /* Hangul_O ㅗ HANGUL LETTER O */ { 0x0ec8, 0x3158 }, /* Hangul_WA ㅘ HANGUL LETTER WA */ { 0x0ec9, 0x3159 }, /* Hangul_WAE ㅙ HANGUL LETTER WAE */ { 0x0eca, 0x315a }, /* Hangul_OE ㅚ HANGUL LETTER OE */ { 0x0ecb, 0x315b }, /* Hangul_YO ㅛ HANGUL LETTER YO */ { 0x0ecc, 0x315c }, /* Hangul_U ㅜ HANGUL LETTER U */ { 0x0ecd, 0x315d }, /* Hangul_WEO ㅝ HANGUL LETTER WEO */ { 0x0ece, 0x315e }, /* Hangul_WE ㅞ HANGUL LETTER WE */ { 0x0ecf, 0x315f }, /* Hangul_WI ㅟ HANGUL LETTER WI */ { 0x0ed0, 0x3160 }, /* Hangul_YU ㅠ HANGUL LETTER YU */ { 0x0ed1, 0x3161 }, /* Hangul_EU ㅡ HANGUL LETTER EU */ { 0x0ed2, 0x3162 }, /* Hangul_YI ㅢ HANGUL LETTER YI */ { 0x0ed3, 0x3163 }, /* Hangul_I ㅣ HANGUL LETTER I */ { 0x0ed4, 0x11a8 }, /* Hangul_J_Kiyeog ᆨ HANGUL JONGSEONG KIYEOK */ { 0x0ed5, 0x11a9 }, /* Hangul_J_SsangKiyeog ᆩ HANGUL JONGSEONG SSANGKIYEOK */ { 0x0ed6, 0x11aa }, /* Hangul_J_KiyeogSios ᆪ HANGUL JONGSEONG KIYEOK-SIOS */ { 0x0ed7, 0x11ab }, /* Hangul_J_Nieun ᆫ HANGUL JONGSEONG NIEUN */ { 0x0ed8, 0x11ac }, /* Hangul_J_NieunJieuj ᆬ HANGUL JONGSEONG NIEUN-CIEUC */ { 0x0ed9, 0x11ad }, /* Hangul_J_NieunHieuh ᆭ HANGUL JONGSEONG NIEUN-HIEUH */ { 0x0eda, 0x11ae }, /* Hangul_J_Dikeud ᆮ HANGUL JONGSEONG TIKEUT */ { 0x0edb, 0x11af }, /* Hangul_J_Rieul ᆯ HANGUL JONGSEONG RIEUL */ { 0x0edc, 0x11b0 }, /* Hangul_J_RieulKiyeog ᆰ HANGUL JONGSEONG RIEUL-KIYEOK */ { 0x0edd, 0x11b1 }, /* Hangul_J_RieulMieum ᆱ HANGUL JONGSEONG RIEUL-MIEUM */ { 0x0ede, 0x11b2 }, /* Hangul_J_RieulPieub ᆲ HANGUL JONGSEONG RIEUL-PIEUP */ { 0x0edf, 0x11b3 }, /* Hangul_J_RieulSios ᆳ HANGUL JONGSEONG RIEUL-SIOS */ { 0x0ee0, 0x11b4 }, /* Hangul_J_RieulTieut ᆴ HANGUL JONGSEONG RIEUL-THIEUTH */ { 0x0ee1, 0x11b5 }, /* Hangul_J_RieulPhieuf ᆵ HANGUL JONGSEONG RIEUL-PHIEUPH */ { 0x0ee2, 0x11b6 }, /* Hangul_J_RieulHieuh ᆶ HANGUL JONGSEONG RIEUL-HIEUH */ { 0x0ee3, 0x11b7 }, /* Hangul_J_Mieum ᆷ HANGUL JONGSEONG MIEUM */ { 0x0ee4, 0x11b8 }, /* Hangul_J_Pieub ᆸ HANGUL JONGSEONG PIEUP */ { 0x0ee5, 0x11b9 }, /* Hangul_J_PieubSios ᆹ HANGUL JONGSEONG PIEUP-SIOS */ { 0x0ee6, 0x11ba }, /* Hangul_J_Sios ᆺ HANGUL JONGSEONG SIOS */ { 0x0ee7, 0x11bb }, /* Hangul_J_SsangSios ᆻ HANGUL JONGSEONG SSANGSIOS */ { 0x0ee8, 0x11bc }, /* Hangul_J_Ieung ᆼ HANGUL JONGSEONG IEUNG */ { 0x0ee9, 0x11bd }, /* Hangul_J_Jieuj ᆽ HANGUL JONGSEONG CIEUC */ { 0x0eea, 0x11be }, /* Hangul_J_Cieuc ᆾ HANGUL JONGSEONG CHIEUCH */ { 0x0eeb, 0x11bf }, /* Hangul_J_Khieuq ᆿ HANGUL JONGSEONG KHIEUKH */ { 0x0eec, 0x11c0 }, /* Hangul_J_Tieut ᇀ HANGUL JONGSEONG THIEUTH */ { 0x0eed, 0x11c1 }, /* Hangul_J_Phieuf ᇁ HANGUL JONGSEONG PHIEUPH */ { 0x0eee, 0x11c2 }, /* Hangul_J_Hieuh ᇂ HANGUL JONGSEONG HIEUH */ { 0x0eef, 0x316d }, /* Hangul_RieulYeorinHieuh ㅭ HANGUL LETTER RIEUL-YEORINHIEUH */ { 0x0ef0, 0x3171 }, /* Hangul_SunkyeongeumMieum ㅱ HANGUL LETTER KAPYEOUNMIEUM */ { 0x0ef1, 0x3178 }, /* Hangul_SunkyeongeumPieub ㅸ HANGUL LETTER KAPYEOUNPIEUP */ { 0x0ef2, 0x317f }, /* Hangul_PanSios ㅿ HANGUL LETTER PANSIOS */ { 0x0ef3, 0x3181 }, /* Hangul_KkogjiDalrinIeung ㆁ HANGUL LETTER YESIEUNG */ { 0x0ef4, 0x3184 }, /* Hangul_SunkyeongeumPhieuf ㆄ HANGUL LETTER KAPYEOUNPHIEUPH */ { 0x0ef5, 0x3186 }, /* Hangul_YeorinHieuh ㆆ HANGUL LETTER YEORINHIEUH */ { 0x0ef6, 0x318d }, /* Hangul_AraeA ㆍ HANGUL LETTER ARAEA */ { 0x0ef7, 0x318e }, /* Hangul_AraeAE ㆎ HANGUL LETTER ARAEAE */ { 0x0ef8, 0x11eb }, /* Hangul_J_PanSios ᇫ HANGUL JONGSEONG PANSIOS */ { 0x0ef9, 0x11f0 }, /* Hangul_J_KkogjiDalrinIeung ᇰ HANGUL JONGSEONG YESIEUNG */ { 0x0efa, 0x11f9 }, /* Hangul_J_YeorinHieuh ᇹ HANGUL JONGSEONG YEORINHIEUH */ { 0x0eff, 0x20a9 }, /* Korean_Won ₩ WON SIGN */ { 0x13a4, 0x20ac }, /* Euro € EURO SIGN */ { 0x13bc, 0x0152 }, /* OE Œ LATIN CAPITAL LIGATURE OE */ { 0x13bd, 0x0153 }, /* oe œ LATIN SMALL LIGATURE OE */ { 0x13be, 0x0178 }, /* Ydiaeresis Ÿ LATIN CAPITAL LETTER Y WITH DIAERESIS */ { 0x20a0, 0x20a0 }, /* EcuSign ₠ EURO-CURRENCY SIGN */ { 0x20a1, 0x20a1 }, /* ColonSign ₡ COLON SIGN */ { 0x20a2, 0x20a2 }, /* CruzeiroSign ₢ CRUZEIRO SIGN */ { 0x20a3, 0x20a3 }, /* FFrancSign ₣ FRENCH FRANC SIGN */ { 0x20a4, 0x20a4 }, /* LiraSign ₤ LIRA SIGN */ { 0x20a5, 0x20a5 }, /* MillSign ₥ MILL SIGN */ { 0x20a6, 0x20a6 }, /* NairaSign ₦ NAIRA SIGN */ { 0x20a7, 0x20a7 }, /* PesetaSign ₧ PESETA SIGN */ { 0x20a8, 0x20a8 }, /* RupeeSign ₨ RUPEE SIGN */ { 0x20a9, 0x20a9 }, /* WonSign ₩ WON SIGN */ { 0x20aa, 0x20aa }, /* NewSheqelSign ₪ NEW SHEQEL SIGN */ { 0x20ab, 0x20ab }, /* DongSign ₫ DONG SIGN */ { 0x20ac, 0x20ac }, /* EuroSign € EURO SIGN */ /* The following items have been added to GDK, and are not in XTerm table */ /* Numeric keypad */ { 0xFF80 , ' ' }, /* Space */ { 0xFFAA , '*' }, /* Multiply */ { 0xFFAB , '+' }, /* Add */ { 0xFFAC , ',' }, /* Separator */ { 0xFFAD , '-' }, /* Subtract */ { 0xFFAE , '.' }, /* Decimal */ { 0xFFAF , '/' }, /* Divide */ { 0xFFB0 , '0' }, /* 0 */ { 0xFFB1 , '1' }, /* 1 */ { 0xFFB2 , '2' }, /* 2 */ { 0xFFB3 , '3' }, /* 3 */ { 0xFFB4 , '4' }, /* 4 */ { 0xFFB5 , '5' }, /* 5 */ { 0xFFB6 , '6' }, /* 6 */ { 0xFFB7 , '7' }, /* 7 */ { 0xFFB8 , '8' }, /* 8 */ { 0xFFB9 , '9' }, /* 9 */ { 0xFFBD , '=' }, /* Equal */ /* End numeric keypad */ }; /** * pgm_event_new: * @type: the type of event. * * Creates a new #PgmEvent of the specified type. * * MT safe. * * Returns: a new #PgmEvent instance. */ PgmEvent * pgm_event_new (PgmEventType type) { PgmEvent *new_event; new_event = g_slice_new0 (PgmEvent); new_event->any.type = type; new_event->any.source = 0; return new_event; } /** * pgm_event_copy: * @event: a #PgmEvent object. * * Copies @event. * * MT safe. * * Returns: a newly allocated #PgmEvent. */ PgmEvent * pgm_event_copy (PgmEvent *event) { PgmEvent *new_event; g_return_val_if_fail (event != NULL, NULL); new_event = pgm_event_new (PGM_NOTHING); *new_event = *event; return new_event; } /** * pgm_event_free: * @event: A #PgmEvent object. * * MT safe. * * Frees all resources used by @event. */ void pgm_event_free (PgmEvent *event) { if (!G_LIKELY (event)) return; switch (event->type) { /* The array of strings need to freed in the case of a Dnd event */ case PGM_DRAG_MOTION: case PGM_DRAG_DROP: case PGM_DRAG_LEAVE: { PgmEventDnd *dnd = (PgmEventDnd*) event; if (dnd->uri) { g_strfreev (dnd->uri); dnd->uri = NULL; } } default: break; } g_slice_free (PgmEvent, event); } GType pgm_event_get_type (void) { static GType our_type = 0; if (!our_type) our_type = g_boxed_type_register_static ("PgmEvent", (GBoxedCopyFunc) pgm_event_copy, (GBoxedFreeFunc) pgm_event_free); return our_type; } /** * pgm_keyval_to_unicode: * @keyval: a Pigment key symbol. * * Converts from a Pigment key symbol to the corresponding ISO10646 (Unicode) * character. * * MT safe. * * Returns: the corresponding unicode character, or 0 if there is no * corresponding one. */ guint32 pgm_keyval_to_unicode (guint keyval) { gint min = 0; gint max = G_N_ELEMENTS (pgm_keysym_to_unicode_tab) - 1; gint mid; /* First check for Latin-1 characters (1:1 mapping) */ if ((keyval >= 0x0020 && keyval <= 0x007e) || (keyval >= 0x00a0 && keyval <= 0x00ff)) return keyval; /* Also check for directly encoded 24-bit UCS characters */ if ((keyval & 0xff000000) == 0x01000000) return keyval & 0x00ffffff; /* Binary search in table */ while (max >= min) { mid = (min + max) / 2; if (pgm_keysym_to_unicode_tab[mid].keysym < keyval) min = mid + 1; else if (pgm_keysym_to_unicode_tab[mid].keysym > keyval) max = mid - 1; else { /* found it */ return pgm_keysym_to_unicode_tab[mid].ucs; } } /* No matching Unicode value found */ return 0; } pigment-0.3.17/pgm/pgmtext.h0000644000175000017500000003374211205034416012617 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment media rendering library * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author(s): Loïc Molinari * Mirco Müller */ #ifndef __PGM_TEXT_H__ #define __PGM_TEXT_H__ #include "pgmdrawable.h" G_BEGIN_DECLS #define PGM_TYPE_TEXT (pgm_text_get_type ()) #define PGM_TEXT(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), PGM_TYPE_TEXT, PgmText)) #define PGM_TEXT_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), PGM_TYPE_TEXT, PgmTextClass)) #define PGM_IS_TEXT(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), PGM_TYPE_TEXT)) #define PGM_IS_TEXT_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), PGM_TYPE_TEXT)) #define PGM_TEXT_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS((obj), PGM_TYPE_TEXT, PgmTextClass)) typedef struct _PgmText PgmText; typedef struct _PgmTextClass PgmTextClass; /** * PgmTextEllipsize: * @PGM_TEXT_ELLIPSIZE_NONE: No ellipsization. * @PGM_TEXT_ELLIPSIZE_START: Omit characters at the start of the text. * @PGM_TEXT_ELLIPSIZE_MIDDLE: Omit characters in the middle of the text. * @PGM_TEXT_ELLIPSIZE_END: Omit characters at the end of the text. * * The different text ellipsizings. */ typedef enum { PGM_TEXT_ELLIPSIZE_NONE, PGM_TEXT_ELLIPSIZE_START, PGM_TEXT_ELLIPSIZE_MIDDLE, PGM_TEXT_ELLIPSIZE_END } PgmTextEllipsize; /** * PgmTextAlignment: * @PGM_TEXT_ALIGN_LEFT: Put all available space on the right. * @PGM_TEXT_ALIGN_CENTER: Center the line within the available space. * @PGM_TEXT_ALIGN_RIGHT: Put all available space on the left. * * The different text alignments. */ typedef enum { PGM_TEXT_ALIGN_LEFT, PGM_TEXT_ALIGN_CENTER, PGM_TEXT_ALIGN_RIGHT } PgmTextAlignment; /** * PgmTextWrap: * @PGM_TEXT_WRAP_WORD: Wrap lines at word boundaries. * @PGM_TEXT_WRAP_CHAR: Wrap lines at character boundaries. * @PGM_TEXT_WRAP_WORD_CHAR: Wrap lines at word boundaries, but fall back to * character boundaries if there is not enough space for a full word. * * The different text wrappings. */ typedef enum { PGM_TEXT_WRAP_WORD, PGM_TEXT_WRAP_CHAR, PGM_TEXT_WRAP_WORD_CHAR } PgmTextWrap; /** * PgmTextGravity: * @PGM_TEXT_GRAVITY_SOUTH: Glyphs stand upright. * @PGM_TEXT_GRAVITY_EAST: Glyphs are rotated 90 degrees clockwise. * @PGM_TEXT_GRAVITY_NORTH: Glyphs are upside-down. * @PGM_TEXT_GRAVITY_WEST: Glyphs are rotated 90 degrees counter-clockwise. * @PGM_TEXT_GRAVITY_AUTO: Gravity is resolved automatically. * * The different text gravities. */ typedef enum { PGM_TEXT_GRAVITY_SOUTH, PGM_TEXT_GRAVITY_EAST, PGM_TEXT_GRAVITY_NORTH, PGM_TEXT_GRAVITY_WEST, PGM_TEXT_GRAVITY_AUTO } PgmTextGravity; /** * PgmTextStretch: * @PGM_TEXT_STRETCH_CONDENSED: Condensed width. * @PGM_TEXT_STRETCH_NORMAL: Normal width. * @PGM_TEXT_STRETCH_EXPANDED: Expanded width. * * The different text stretchings. */ typedef enum { PGM_TEXT_STRETCH_CONDENSED, PGM_TEXT_STRETCH_NORMAL, PGM_TEXT_STRETCH_EXPANDED } PgmTextStretch; /** * PgmTextStyle: * @PGM_TEXT_STYLE_NORMAL: The font is upright. * @PGM_TEXT_STYLE_OBLIQUE: The font is slanted, but in a roman style. * @PGM_TEXT_STYLE_ITALIC: The font is slanted in an italic style. * * The different text styles. */ typedef enum { PGM_TEXT_STYLE_NORMAL, PGM_TEXT_STYLE_OBLIQUE, PGM_TEXT_STYLE_ITALIC } PgmTextStyle; /** * PgmTextVariant: * @PGM_TEXT_VARIANT_NORMAL: Normal font. * @PGM_TEXT_VARIANT_SMALL_CAPS: Font with the lower case characters replaced * by smaller variants of the capital characters. * * The different text variants. */ typedef enum { PGM_TEXT_VARIANT_NORMAL, PGM_TEXT_VARIANT_SMALL_CAPS } PgmTextVariant; /** * PgmTextWeight: * @PGM_TEXT_WEIGHT_LIGHT: The light weight. * @PGM_TEXT_WEIGHT_NORMAL: The normal weight. * @PGM_TEXT_WEIGHT_BOLD: The bold weight. * * The different text weights. */ typedef enum { PGM_TEXT_WEIGHT_LIGHT, PGM_TEXT_WEIGHT_NORMAL, PGM_TEXT_WEIGHT_BOLD } PgmTextWeight; /** * PgmTextShadowPosition: * @PGM_TEXT_SHADOW_NORTH: Shadow casted to the North. * @PGM_TEXT_SHADOW_SOUTH: Shadow casted to the South. * @PGM_TEXT_SHADOW_WEST: Shadow casted to the West. * @PGM_TEXT_SHADOW_EAST: Shadow casted to the East. * @PGM_TEXT_SHADOW_NORTH_WEST: Shadow casted to the North/West. * @PGM_TEXT_SHADOW_NORTH_EAST: Shadow casted to the North/East. * @PGM_TEXT_SHADOW_SOUTH_WEST: Shadow casted to the South/West. * @PGM_TEXT_SHADOW_SOUTH_EAST: Shadow casted to the South/East. * * The text's shadow cast position. */ typedef enum { PGM_TEXT_SHADOW_NORTH = (1 << 0), PGM_TEXT_SHADOW_SOUTH = (1 << 1), PGM_TEXT_SHADOW_WEST = (1 << 2), PGM_TEXT_SHADOW_EAST = (1 << 3), PGM_TEXT_SHADOW_NORTH_WEST = (PGM_TEXT_SHADOW_NORTH | PGM_TEXT_SHADOW_WEST), PGM_TEXT_SHADOW_NORTH_EAST = (PGM_TEXT_SHADOW_NORTH | PGM_TEXT_SHADOW_EAST), PGM_TEXT_SHADOW_SOUTH_WEST = (PGM_TEXT_SHADOW_SOUTH | PGM_TEXT_SHADOW_WEST), PGM_TEXT_SHADOW_SOUTH_EAST = (PGM_TEXT_SHADOW_SOUTH | PGM_TEXT_SHADOW_EAST) } PgmTextShadowPosition; /** * PgmText: * @label: the text label. * @font_family: the text font family. * @gravity: the text gravity. * @stretch: the text stretching. * @style: the text style. * @variant: the text variant. * @weight: the text weight. * @height: the text height in proportion to the drawable height. * @ellipsize: the text ellipsizing. * @alignment: the text alignment. * @wrap: the text wrapping. * @line_spacing: the space between to lines of text in canvas coordinates. * @justify: the text justification. * @multiline: the text multilining. * @cast_shadow: the text shadow casting state. * @shadow_position: the text shadow position. * @outline_width: the text outline width in canvas coordinates. * @r: the text red color component. * @g: the text blue color component. * @b: the text green color component. * @a: the text alpha color component. * @shadow_r: the text shadow red color component. * @shadow_g: the text shadow blue color component. * @shadow_b: the text shadow green color component. * @shadow_a: the text shadow alpha color component. * @outline_r: the text outline red color component. * @outline_g: the text outline blue color component. * @outline_b: the text outline green color component. * @outline_a: the text outline alpha color component. * * The #PgmText structure. */ struct _PgmText { /*< private >*/ PgmDrawable parent; /*< public >*/ /* with LOCK */ /* Label */ gchar *label; /* Font properties */ gchar *font_family; PgmTextGravity gravity; PgmTextStretch stretch; PgmTextStyle style; PgmTextVariant variant; PgmTextWeight weight; gfloat height; /* Text adjustment */ PgmTextEllipsize ellipsize; PgmTextAlignment alignment; PgmTextWrap wrap; gfloat line_spacing; gboolean justify; gboolean multiline; gboolean cast_shadow; PgmTextShadowPosition shadow_position; gfloat outline_width; /* Colors */ guchar r, g, b, a; guchar shadow_r, shadow_g, shadow_b, shadow_a; guchar outline_r, outline_g, outline_b, outline_a; /*< private >*/ gboolean use_markup; }; struct _PgmTextClass { PgmDrawableClass parent_class; }; GType pgm_text_get_type (void); PgmDrawable *pgm_text_new (const gchar *markup); PgmError pgm_text_set_label (PgmText *text, const gchar *label); PgmError pgm_text_set_markup (PgmText *text, const gchar *markup); PgmError pgm_text_get_label (PgmText *text, gchar **label); PgmError pgm_text_set_font_family (PgmText *text, const gchar *font_family); PgmError pgm_text_get_font_family (PgmText *text, gchar **font_family); PgmError pgm_text_set_font_height (PgmText *text, gfloat font_height); PgmError pgm_text_get_font_height (PgmText *text, gfloat *font_height); PgmError pgm_text_set_ellipsize (PgmText *text, PgmTextEllipsize ellipsize); PgmError pgm_text_get_ellipsize (PgmText *text, PgmTextEllipsize *ellipsize); PgmError pgm_text_set_justify (PgmText *text, gboolean justify); PgmError pgm_text_get_justify (PgmText *text, gboolean *justify); PgmError pgm_text_set_alignment (PgmText *text, PgmTextAlignment alignment); PgmError pgm_text_get_alignment (PgmText *text, PgmTextAlignment *alignment); PgmError pgm_text_set_wrap (PgmText *text, PgmTextWrap wrap); PgmError pgm_text_get_wrap (PgmText *text, PgmTextWrap *wrap); PgmError pgm_text_set_gravity (PgmText *text, PgmTextGravity gravity); PgmError pgm_text_get_gravity (PgmText *text, PgmTextGravity *gravity); PgmError pgm_text_set_stretch (PgmText *text, PgmTextStretch stretch); PgmError pgm_text_get_stretch (PgmText *text, PgmTextStretch *stretch); PgmError pgm_text_set_style (PgmText *text, PgmTextStyle style); PgmError pgm_text_get_style (PgmText *text, PgmTextStyle *style); PgmError pgm_text_set_variant (PgmText *text, PgmTextVariant variant); PgmError pgm_text_get_variant (PgmText *text, PgmTextVariant *variant); PgmError pgm_text_set_weight (PgmText *text, PgmTextWeight weight); PgmError pgm_text_get_weight (PgmText *text, PgmTextWeight *weight); PgmError pgm_text_set_line_spacing (PgmText *text, gfloat line_spacing); PgmError pgm_text_get_line_spacing (PgmText *text, gfloat *line_spacing); PgmError pgm_text_set_multiline (PgmText *text, gboolean multiline); PgmError pgm_text_get_multiline (PgmText *text, gboolean *multiline); PgmError pgm_text_set_color (PgmText *text, guchar red, guchar green, guchar blue, guchar alpha); PgmError pgm_text_get_color (PgmText *text, guchar *red, guchar *green, guchar *blue, guchar *alpha); PgmError pgm_text_set_outline_color (PgmText *text, guchar red, guchar green, guchar blue, guchar alpha); PgmError pgm_text_get_outline_color (PgmText *text, guchar *red, guchar *green, guchar *blue, guchar *alpha); PgmError pgm_text_set_outline_width (PgmText *text, gfloat width); PgmError pgm_text_get_outline_width (PgmText *text, gfloat *width); PgmError pgm_text_set_cast_shadow (PgmText *text, gboolean cast_shadow); PgmError pgm_text_get_cast_shadow (PgmText *text, gboolean *cast_shadow); PgmError pgm_text_set_shadow_position (PgmText *text, PgmTextShadowPosition position); PgmError pgm_text_get_shadow_position (PgmText *text, PgmTextShadowPosition *position); PgmError pgm_text_set_shadow_color (PgmText *text, guchar red, guchar green, guchar blue, guchar alpha); PgmError pgm_text_get_shadow_color (PgmText *text, guchar *red, guchar *green, guchar *blue, guchar *alpha); G_END_DECLS #endif /* __PGM_TEXT_H__ */ pigment-0.3.17/pgm/pgmviewport.h0000644000175000017500000005557411205034416013521 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment media rendering library * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author(s): Loïc Molinari * Julien Moutte */ #ifndef __PGM_VIEWPORT_H__ #define __PGM_VIEWPORT_H__ /* pgmviewport.h and pgmviewportfactory.h include each other */ typedef struct _PgmViewport PgmViewport; typedef struct _PgmViewportClass PgmViewportClass; #include #include "pgmcanvas.h" #include "pgmviewportfactory.h" #include "pgmlinearalgebra.h" #include "pgmevents.h" #ifdef WIN32 #include #endif /* WIN32 */ G_BEGIN_DECLS #define PGM_TYPE_VIEWPORT (pgm_viewport_get_type ()) #define PGM_VIEWPORT(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), PGM_TYPE_VIEWPORT, PgmViewport)) #define PGM_VIEWPORT_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), PGM_TYPE_VIEWPORT, PgmViewportClass)) #define PGM_IS_VIEWPORT(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), PGM_TYPE_VIEWPORT)) #define PGM_IS_VIEWPORT_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), PGM_TYPE_VIEWPORT)) #define PGM_VIEWPORT_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS((obj), PGM_TYPE_VIEWPORT, PgmViewportClass)) #define PGM_VIEWPORT_CAST(obj) ((PgmViewport *) (obj)) /** * PgmViewportCursor: * @PGM_VIEWPORT_LEFT_ARROW: Standard left arrow system cursor. * @PGM_VIEWPORT_INHERIT: Inherited cursor from the environment. * @PGM_VIEWPORT_NONE: Hidden cursor. * * Pigment system cursor type. */ typedef enum { PGM_VIEWPORT_LEFT_ARROW = 0, PGM_VIEWPORT_INHERIT = 1, PGM_VIEWPORT_NONE = 2 } PgmViewportCursor; /** * PgmViewportCapacity: * @PGM_VIEWPORT_HARDWARE_ACCELERATION: Supports accelerated rendering thanks * to dedicated hardware. * @PGM_VIEWPORT_APPLICATION_EMBEDDING: Supports embedding into another * application. * @PGM_VIEWPORT_OPACITY: Supports opacity so that compositing managers can * blend the viewport with other applications. * @PGM_VIEWPORT_TOUCHPAD: Supports touchpad so that application can use the * pressure events and parameters. * @PGM_VIEWPORT_X11_SYSTEM_BUFFER: Supports X11 system buffer as image content. * Actually, X11 system buffers are Pixmaps. * * Capacities supported by the viewport. */ typedef enum { PGM_VIEWPORT_HARDWARE_ACCELERATION = (1 << 0), PGM_VIEWPORT_APPLICATION_EMBEDDING = (1 << 1), PGM_VIEWPORT_OPACITY = (1 << 2), PGM_VIEWPORT_TOUCHPAD = (1 << 3), PGM_VIEWPORT_X11_SYSTEM_BUFFER = (1 << 4) } PgmViewportCapacity; /** * PgmViewportRotation: * @PGM_VIEWPORT_ROTATION_NONE: Do not rotate to the canvas. * @PGM_VIEWPORT_ROTATION_90: Rotate the canvas 90° counter-clockwise. * @PGM_VIEWPORT_ROTATION_180: Rotate the canvas 180° counter-clockwise. * @PGM_VIEWPORT_ROTATION_270: Rotate the canvas 270° counter-clockwise. * * The rotation types of the canvas projection. */ typedef enum { PGM_VIEWPORT_ROTATION_NONE = 0, PGM_VIEWPORT_ROTATION_90 = 1, PGM_VIEWPORT_ROTATION_180 = 2, PGM_VIEWPORT_ROTATION_270 = 3 } PgmViewportRotation; /** * PgmViewportReflection: * @PGM_VIEWPORT_REFLECTION_NONE: Do not reflect to the canvas. * @PGM_VIEWPORT_REFLECTION_HORIZONTAL_FLIP: Reflect the canvas horizontally. * @PGM_VIEWPORT_REFLECTION_VERTICAL_FLIP: Reflect the canvas vertically. * * The reflection types of the canvas projection. */ typedef enum { PGM_VIEWPORT_REFLECTION_NONE = 0, PGM_VIEWPORT_REFLECTION_HORIZONTAL_FLIP = 1, PGM_VIEWPORT_REFLECTION_VERTICAL_FLIP = 2 } PgmViewportReflection; /* FIXME: Should not be exported in this header since it's only used * internally. That could be fixed separating public and private * GObject fields (see #183) */ typedef struct __PgmIOWatch _PgmIOWatch; struct __PgmIOWatch { GIOChannel *out; GIOChannel *in; gint fd[2]; gint tag; }; /** * PgmViewport: * @factory: the factory used to instantiate the #PgmViewport. * @canvas: the attached canvas. * @message_filter: the filter of message events. * @title: the viewport title. * @icon: the current icon. * @cursor: the current cursor. * @fullscreen: the fullscreen state. * @visible: the visible state. * @decorated: the decorated state. * @iconified: the iconified state. * @opacity: the opacity. * @alpha_blending: the alpha blending state. * @width: the viewport width. * @height: the viewport height. * @width_mm: the viewport screen width in millimeters. * @height_mm: the viewport screen height in millimeters. * @projection: the 4x4 projection matrix. * @inv_projection: the 4x4 inverse projection matrix. * @projected_x: the attached canvas projected x position. * @projected_y: the attached canvas projected y position. * @projected_width: the attached canvas projected width. * @projected_height: the attached canvas projected height. * @rotation: the rotation of the projected canvas. * @reflection: the reflection of the projected canvas. * @pixel_aspect_ratio: the pixel-aspect-ratio. * @viewport_ratio: the viewport ratio. * @canvas_ratio: the attached canvas ratio with pixel-aspect-ratio correction * applied. * @caps_mask: the viewport mask of supported capacities. * * The #PgmViewport structure. */ struct _PgmViewport { GstObject parent; /*< public >*/ /* with LOCK */ PgmViewportFactory *factory; PgmCanvas *canvas; GList *message_filter; gchar *title; GdkPixbuf *icon; PgmViewportCursor cursor; gboolean fullscreen; gboolean visible; gboolean decorated; gboolean iconified; gboolean alpha_blending; gint width, height; gint width_mm, height_mm; PgmMat4x4 *projection, *inv_projection; gint projected_x, projected_y; gint projected_width, projected_height; PgmViewportRotation rotation; PgmViewportReflection reflection; gfloat pixel_aspect_ratio; gfloat viewport_ratio; gfloat canvas_ratio; gulong caps_mask; guchar opacity; /*< private >*/ /* Watch sources */ _PgmIOWatch *event_watch; GMutex *event_lock; GList *event_list; _PgmIOWatch *pixel_watch; GMutex *pixel_lock; GList *pixel_list; gboolean pixel_watch_up; gboolean event_watch_up; /* Canvas rotation/reflection */ gfloat projection_hflip, projection_vflip; gfloat projection_rotation; /* Signal handler id */ gulong canvas_size_handler; }; /** * PgmViewportClass: * @parent_class: the parent class structure. * @button_press_event: the "button-press-event" signal. * @button_pressure_event: the "button-pressure-event" signal. * @button_release_event: the "button-release-event" signal. * @key_press_event: the "key-press-event" signal. * @key_release_event: the "key-release-event" signal. * @configure_event: the "configure-event" signal. * @delete_event: the "delete-event" signal. * @scroll_event: the "scroll-event" signal. * @motion_notify_event: the "motion-notify-event" signal. * @expose_event: the "expose-event" signal. * @drag_motion_event: the "drag-motion-event" signal. * @drag_drop_event: the "drag-drop-event" signal. * @drag_leave_event: the "drag-leave-event" signal. * @state_event: the "state-event" signal. * @win32_message_event: the "win32-message-event" signal. * @pixels_read: the "pixels-read" signal. * @update_pass: the "update-pass" signal. * @set_title: the set_title virtual method. * @show: the show virtual method. * @hide: the hide virtual method. * @set_decorated: the set_decorated virtual method. * @set_cursor: the set_cursor virtual method. * @set_icon: the set_icon virtual method. * @set_size: the set_size virtual method. * @get_size: the get_size virtual method. * @set_alpha_blending: the set_alpha_blending virtual method. * @set_opacity: the set_opacity virtual method. * @set_fullscreen: the set_fullscreen virtual method. * @set_iconified: the set_iconified virtual method. * @focus: the focus virtual method. * @set_screen_resolution: the set_screen_resolution virtual method. * @get_screen_resolution: the get_screen_resolution virtual method. * @set_screen_size_mm: the set_screen_size_mm virtual method. * @get_screen_size_mm: the get_screen_size_mm virtual method. * @set_canvas: the set_canvas virtual method. * @update_projection: the update_projection virtual method. * @get_embedding_id: the get_embedding_id virtual method. * @get_pixel_formats: the get_pixel_formats virtual method. * @get_caps_mask: the get_caps_mask virtual method. * @get_max_texture_size: the get_max_texture_size virtual method. * @get_frame_rate: the get_frame_rate virtual method. * @set_message_filter: the set_message_filter virtual method. * @read_pixels: the read_pixels virtual method. * @set_drag_status: the set_drag_status virtual method. * * Pigment drawable class. */ struct _PgmViewportClass { GstObjectClass parent_class; /*< public >*/ /* signals */ void (*button_press_event) (PgmViewport *viewport, PgmEventButton *event); void (*button_pressure_event) (PgmViewport *viewport, PgmEventButton *event); void (*button_release_event) (PgmViewport *viewport, PgmEventButton *event); void (*key_press_event) (PgmViewport *viewport, PgmEventKey *event); void (*key_release_event) (PgmViewport *viewport, PgmEventKey *event); void (*configure_event) (PgmViewport *viewport, PgmEventConfigure *event); void (*delete_event) (PgmViewport *viewport, PgmEvent *event); void (*scroll_event) (PgmViewport *viewport, PgmEventScroll *event); void (*motion_notify_event) (PgmViewport *viewport, PgmEventMotion *event); void (*expose_event) (PgmViewport *viewport, PgmEventExpose *event); gboolean (*drag_motion_event) (PgmViewport *viewport, PgmEventDnd *event); void (*drag_drop_event) (PgmViewport *viewport, PgmEventDnd *event); void (*drag_leave_event) (PgmViewport *viewport, PgmEventDnd *event); void (*state_event) (PgmViewport *viewport, PgmEventState *event); #ifdef WIN32 LRESULT (*win32_message_event) (PgmViewport *viewport, PgmEventWin32Message *event); #endif /* WIN32 */ void (*pixels_read) (PgmViewport *viewport, guint width, guint height, gpointer pixels); void (*update_pass) (PgmViewport *viewport); /* virtual methods for subclasses */ PgmError (*set_title) (PgmViewport *viewport, const gchar *title); PgmError (*show) (PgmViewport *viewport); PgmError (*hide) (PgmViewport *viewport); PgmError (*set_decorated) (PgmViewport *viewport, gboolean decorated); PgmError (*set_cursor) (PgmViewport *viewport, PgmViewportCursor cursor); PgmError (*set_icon) (PgmViewport *viewport, GdkPixbuf *icon); PgmError (*set_size) (PgmViewport *viewport, gint width, gint height); PgmError (*get_size) (PgmViewport *viewport, gint *width, gint *height); PgmError (*set_alpha_blending) (PgmViewport *viewport, gboolean alpha_blending); PgmError (*set_opacity) (PgmViewport *viewport, guchar opacity); PgmError (*set_fullscreen) (PgmViewport *viewport, gboolean fullscreen); PgmError (*set_iconified) (PgmViewport *viewport, gboolean iconified); PgmError (*focus) (PgmViewport *viewport); PgmError (*set_screen_resolution) (PgmViewport *viewport, gint width, gint height); PgmError (*get_screen_resolution) (PgmViewport *viewport, gint *width, gint *height); PgmError (*set_screen_size_mm) (PgmViewport *viewport, gint width, gint height); PgmError (*get_screen_size_mm) (PgmViewport *viewport, gint *width, gint *height); PgmError (*set_canvas) (PgmViewport *viewport, PgmCanvas *canvas); PgmError (*update_projection) (PgmViewport *viewport); PgmError (*get_embedding_id) (PgmViewport *viewport, gulong *embedding_id); PgmError (*get_pixel_formats) (PgmViewport *viewport, gulong *formats_mask); PgmError (*get_caps_mask) (PgmViewport *viewport, gulong *caps_mask); PgmError (*get_max_texture_size) (PgmViewport *viewport, guint32 *max_texture_size); PgmError (*get_frame_rate) (PgmViewport *viewport, guint *frame_rate); PgmError (*set_message_filter) (PgmViewport *viewport, GList *filter); PgmError (*read_pixels) (PgmViewport *viewport, guint x, guint y, guint width, guint height, guint8 *pixels); PgmError (*set_drag_status) (PgmViewport *viewport, gboolean accept); }; GType pgm_viewport_get_type (void); PgmError pgm_viewport_set_title (PgmViewport *viewport, const gchar *title); PgmError pgm_viewport_get_title (PgmViewport *viewport, gchar **title); PgmError pgm_viewport_show (PgmViewport *viewport); PgmError pgm_viewport_hide (PgmViewport *viewport); PgmError pgm_viewport_is_visible (PgmViewport *viewport, gboolean *visible); PgmError pgm_viewport_set_decorated (PgmViewport *viewport, gboolean decorated); PgmError pgm_viewport_get_decorated (PgmViewport *viewport, gboolean *decorated); PgmError pgm_viewport_set_cursor (PgmViewport *viewport, PgmViewportCursor cursor); PgmError pgm_viewport_get_cursor (PgmViewport *viewport, PgmViewportCursor *cursor); PgmError pgm_viewport_set_icon (PgmViewport *viewport, GdkPixbuf *icon); PgmError pgm_viewport_get_icon (PgmViewport *viewport, GdkPixbuf **icon); PgmError pgm_viewport_set_size (PgmViewport *viewport, gint width, gint height); PgmError pgm_viewport_get_size (PgmViewport *viewport, gint *width, gint *height); PgmError pgm_viewport_set_alpha_blending (PgmViewport *viewport, gboolean alpha_blending); PgmError pgm_viewport_get_alpha_blending (PgmViewport *viewport, gboolean *alpha_blending); PgmError pgm_viewport_set_opacity (PgmViewport *viewport, guchar opacity); PgmError pgm_viewport_get_opacity (PgmViewport *viewport, guchar *opacity); PgmError pgm_viewport_set_fullscreen (PgmViewport *viewport, gboolean fullscreen); PgmError pgm_viewport_get_fullscreen (PgmViewport *viewport, gboolean *fullscreen); PgmError pgm_viewport_set_iconified (PgmViewport *viewport, gboolean iconified); PgmError pgm_viewport_get_iconified (PgmViewport *viewport, gboolean *iconified); PgmError pgm_viewport_focus (PgmViewport *viewport); PgmError pgm_viewport_set_screen_resolution (PgmViewport *viewport, gint width, gint height); PgmError pgm_viewport_get_screen_resolution (PgmViewport *viewport, gint *width, gint *height); PgmError pgm_viewport_set_screen_size_mm (PgmViewport *viewport, gint width, gint height); PgmError pgm_viewport_get_screen_size_mm (PgmViewport *viewport, gint *width, gint *height); PgmError pgm_viewport_push_event (PgmViewport *viewport, PgmEvent *event); PgmError pgm_viewport_get_canvas (PgmViewport *viewport, PgmCanvas **canvas); PgmError pgm_viewport_set_canvas (PgmViewport *viewport, PgmCanvas *canvas); PgmError pgm_viewport_set_canvas_rotation (PgmViewport *viewport, PgmViewportRotation rotation); PgmError pgm_viewport_get_canvas_rotation (PgmViewport *viewport, PgmViewportRotation *rotation); PgmError pgm_viewport_set_canvas_reflection (PgmViewport *viewport, PgmViewportReflection reflection); PgmError pgm_viewport_get_canvas_reflection (PgmViewport *viewport, PgmViewportReflection *reflection); PgmError pgm_viewport_set_message_filter (PgmViewport *viewport, GList *filter); PgmError pgm_viewport_get_message_filter (PgmViewport *viewport, GList **filter); PgmError pgm_viewport_update_projection (PgmViewport *viewport); PgmError pgm_viewport_to_canvas (PgmViewport *viewport, gfloat *canvas_x, gfloat *canvas_y, gfloat *canvas_z, gfloat viewport_x, gfloat viewport_y, gfloat viewport_z); PgmError pgm_viewport_from_canvas (PgmViewport *viewport, gfloat *viewport_x, gfloat *viewport_y, gfloat *viewport_z, gfloat canvas_x, gfloat canvas_y, gfloat canvas_z); PgmError pgm_viewport_get_embedding_id (PgmViewport *viewport, gulong *embedding_id); PgmError pgm_viewport_get_pixel_formats (PgmViewport *viewport, gulong *formats_mask); PgmError pgm_viewport_get_caps_mask (PgmViewport *viewport, gulong *caps_mask); PgmError pgm_viewport_get_max_texture_size (PgmViewport *viewport, guint32 *max_texture_size); PgmError pgm_viewport_get_frame_rate (PgmViewport *viewport, guint *frame_rate); PgmError pgm_viewport_read_pixels (PgmViewport *viewport, guint x, guint y, guint width, guint height, guint8 *pixels); PgmError pgm_viewport_push_pixels (PgmViewport *viewport, guint width, guint height, guint8 *pixels); PgmError pgm_viewport_emit_update_pass (PgmViewport *viewport); /* Protected methods */ #ifdef WIN32 PgmError _pgm_viewport_push_win32_message (PgmViewport *viewport, PgmEvent *event, gint32 *message_processed, LRESULT *result); #endif /* WIN32 */ G_END_DECLS #endif /* __PGM_VIEWPORT_H__ */ pigment-0.3.17/pgm/pgmenumtypes.c0000644000175000017500000005177211205034716013665 00000000000000 /* Generated data (by glib-mkenums) */ #include #include "pgmenumtypes.h" /* enumerations from "./pgmcommon.h" */ #include "./pgmcommon.h" static const GEnumValue _pgm_error_values[] = { { PGM_ERROR_X, "PGM_ERROR_X", "x" }, { PGM_ERROR_OK, "PGM_ERROR_OK", "ok" }, { 0, NULL, NULL } }; GType pgm_error_get_type (void) { static GType type = 0; if (!type) type = g_enum_register_static ("PgmError", _pgm_error_values); return type; } /* enumerations from "./pgmdrawable.h" */ #include "./pgmdrawable.h" static const GEnumValue _pgm_drawable_layer_values[] = { { PGM_DRAWABLE_UNBOUND, "PGM_DRAWABLE_UNBOUND", "unbound" }, { PGM_DRAWABLE_FAR, "PGM_DRAWABLE_FAR", "far" }, { PGM_DRAWABLE_MIDDLE, "PGM_DRAWABLE_MIDDLE", "middle" }, { PGM_DRAWABLE_NEAR, "PGM_DRAWABLE_NEAR", "near" }, { 0, NULL, NULL } }; GType pgm_drawable_layer_get_type (void) { static GType type = 0; if (!type) type = g_enum_register_static ("PgmDrawableLayer", _pgm_drawable_layer_values); return type; } static const GEnumValue _pgm_drawable_property_values[] = { { PGM_DRAWABLE_VISIBILITY, "PGM_DRAWABLE_VISIBILITY", "drawable-visibility" }, { PGM_DRAWABLE_SIZE, "PGM_DRAWABLE_SIZE", "drawable-size" }, { PGM_DRAWABLE_POSITION, "PGM_DRAWABLE_POSITION", "drawable-position" }, { PGM_DRAWABLE_TRANSFORMATION_MATRIX, "PGM_DRAWABLE_TRANSFORMATION_MATRIX", "drawable-transformation-matrix" }, { PGM_DRAWABLE_BG_COLOR, "PGM_DRAWABLE_BG_COLOR", "drawable-bg-color" }, { PGM_DRAWABLE_FG_COLOR, "PGM_DRAWABLE_FG_COLOR", "drawable-fg-color" }, { PGM_DRAWABLE_OPACITY, "PGM_DRAWABLE_OPACITY", "drawable-opacity" }, { PGM_DRAWABLE_REGENERATE, "PGM_DRAWABLE_REGENERATE", "drawable-regenerate" }, { PGM_IMAGE_DATA_FILE, "PGM_IMAGE_DATA_FILE", "image-data-file" }, { PGM_IMAGE_DATA_BUFFER, "PGM_IMAGE_DATA_BUFFER", "image-data-buffer" }, { PGM_IMAGE_DATA_GST_BUFFER, "PGM_IMAGE_DATA_GST_BUFFER", "image-data-gst-buffer" }, { PGM_IMAGE_DATA_PIXBUF, "PGM_IMAGE_DATA_PIXBUF", "image-data-pixbuf" }, { PGM_IMAGE_DATA_SYSTEM_BUFFER, "PGM_IMAGE_DATA_SYSTEM_BUFFER", "image-data-system-buffer" }, { PGM_IMAGE_DATA_IMAGE, "PGM_IMAGE_DATA_IMAGE", "image-data-image" }, { PGM_IMAGE_DATA_EMPTY, "PGM_IMAGE_DATA_EMPTY", "image-data-empty" }, { PGM_IMAGE_SYSTEM_BUFFER_CONTENT, "PGM_IMAGE_SYSTEM_BUFFER_CONTENT", "image-system-buffer-content" }, { PGM_IMAGE_MAPPING_MATRIX, "PGM_IMAGE_MAPPING_MATRIX", "image-mapping-matrix" }, { PGM_IMAGE_ALIGNMENT, "PGM_IMAGE_ALIGNMENT", "image-alignment" }, { PGM_IMAGE_LAYOUT, "PGM_IMAGE_LAYOUT", "image-layout" }, { PGM_IMAGE_INTERP, "PGM_IMAGE_INTERP", "image-interp" }, { PGM_IMAGE_WRAPPING, "PGM_IMAGE_WRAPPING", "image-wrapping" }, { PGM_IMAGE_ASPECT_RATIO, "PGM_IMAGE_ASPECT_RATIO", "image-aspect-ratio" }, { PGM_IMAGE_BORDER_WIDTH, "PGM_IMAGE_BORDER_WIDTH", "image-border-width" }, { PGM_IMAGE_BORDER_INNER_COLOR, "PGM_IMAGE_BORDER_INNER_COLOR", "image-border-inner-color" }, { PGM_IMAGE_BORDER_OUTER_COLOR, "PGM_IMAGE_BORDER_OUTER_COLOR", "image-border-outer-color" }, { PGM_TEXT_LABEL, "PGM_TEXT_LABEL", "text-label" }, { PGM_TEXT_MARKUP, "PGM_TEXT_MARKUP", "text-markup" }, { PGM_TEXT_FONT_FAMILY, "PGM_TEXT_FONT_FAMILY", "text-font-family" }, { PGM_TEXT_HEIGHT, "PGM_TEXT_HEIGHT", "text-height" }, { PGM_TEXT_ELLIPSIZE, "PGM_TEXT_ELLIPSIZE", "text-ellipsize" }, { PGM_TEXT_JUSTIFY, "PGM_TEXT_JUSTIFY", "text-justify" }, { PGM_TEXT_ALIGNMENT, "PGM_TEXT_ALIGNMENT", "text-alignment" }, { PGM_TEXT_WRAP, "PGM_TEXT_WRAP", "text-wrap" }, { PGM_TEXT_GRAVITY, "PGM_TEXT_GRAVITY", "text-gravity" }, { PGM_TEXT_STRETCH, "PGM_TEXT_STRETCH", "text-stretch" }, { PGM_TEXT_STYLE, "PGM_TEXT_STYLE", "text-style" }, { PGM_TEXT_VARIANT, "PGM_TEXT_VARIANT", "text-variant" }, { PGM_TEXT_WEIGHT, "PGM_TEXT_WEIGHT", "text-weight" }, { PGM_TEXT_MULTILINE, "PGM_TEXT_MULTILINE", "text-multiline" }, { PGM_TEXT_LINE_SPACING, "PGM_TEXT_LINE_SPACING", "text-line-spacing" }, { PGM_TEXT_COLOR, "PGM_TEXT_COLOR", "text-color" }, { PGM_TEXT_OUTLINE_COLOR, "PGM_TEXT_OUTLINE_COLOR", "text-outline-color" }, { PGM_TEXT_OUTLINE_WIDTH, "PGM_TEXT_OUTLINE_WIDTH", "text-outline-width" }, { PGM_TEXT_CAST_SHADOW, "PGM_TEXT_CAST_SHADOW", "text-cast-shadow" }, { PGM_TEXT_SHADOW_POSITION, "PGM_TEXT_SHADOW_POSITION", "text-shadow-position" }, { PGM_TEXT_SHADOW_COLOR, "PGM_TEXT_SHADOW_COLOR", "text-shadow-color" }, { 0, NULL, NULL } }; GType pgm_drawable_property_get_type (void) { static GType type = 0; if (!type) type = g_enum_register_static ("PgmDrawableProperty", _pgm_drawable_property_values); return type; } static const GFlagsValue _pgm_drawable_flags_values[] = { { PGM_DRAWABLE_FLAG_UNPARENTING, "PGM_DRAWABLE_FLAG_UNPARENTING", "unparenting" }, { PGM_DRAWABLE_FLAG_VISIBLE, "PGM_DRAWABLE_FLAG_VISIBLE", "visible" }, { PGM_DRAWABLE_FLAG_LAST, "PGM_DRAWABLE_FLAG_LAST", "last" }, { 0, NULL, NULL } }; GType pgm_drawable_flags_get_type (void) { static GType type = 0; if (!type) type = g_flags_register_static ("PgmDrawableFlags", _pgm_drawable_flags_values); return type; } static const GFlagsValue _pgm_drawable_picking_signal_values[] = { { PGM_DRAWABLE_PICKING_PRESSED, "PGM_DRAWABLE_PICKING_PRESSED", "pressed" }, { PGM_DRAWABLE_PICKING_PRESSURED, "PGM_DRAWABLE_PICKING_PRESSURED", "pressured" }, { PGM_DRAWABLE_PICKING_RELEASED, "PGM_DRAWABLE_PICKING_RELEASED", "released" }, { PGM_DRAWABLE_PICKING_CLICKED, "PGM_DRAWABLE_PICKING_CLICKED", "clicked" }, { PGM_DRAWABLE_PICKING_DOUBLE_CLICKED, "PGM_DRAWABLE_PICKING_DOUBLE_CLICKED", "double-clicked" }, { PGM_DRAWABLE_PICKING_DRAG_BEGIN, "PGM_DRAWABLE_PICKING_DRAG_BEGIN", "drag-begin" }, { PGM_DRAWABLE_PICKING_DRAG_MOTION, "PGM_DRAWABLE_PICKING_DRAG_MOTION", "drag-motion" }, { PGM_DRAWABLE_PICKING_DRAG_END, "PGM_DRAWABLE_PICKING_DRAG_END", "drag-end" }, { PGM_DRAWABLE_PICKING_ENTERED, "PGM_DRAWABLE_PICKING_ENTERED", "entered" }, { PGM_DRAWABLE_PICKING_SCROLLED, "PGM_DRAWABLE_PICKING_SCROLLED", "scrolled" }, { PGM_DRAWABLE_PICKING_MOTION, "PGM_DRAWABLE_PICKING_MOTION", "motion" }, { PGM_DRAWABLE_PICKING_MASK, "PGM_DRAWABLE_PICKING_MASK", "mask" }, { 0, NULL, NULL } }; GType pgm_drawable_picking_signal_get_type (void) { static GType type = 0; if (!type) type = g_flags_register_static ("PgmDrawablePickingSignal", _pgm_drawable_picking_signal_values); return type; } /* enumerations from "./pgmevents.h" */ #include "./pgmevents.h" static const GEnumValue _pgm_event_type_values[] = { { PGM_NOTHING, "PGM_NOTHING", "nothing" }, { PGM_MOTION_NOTIFY, "PGM_MOTION_NOTIFY", "motion-notify" }, { PGM_BUTTON_PRESS, "PGM_BUTTON_PRESS", "button-press" }, { PGM_DOUBLE_BUTTON_PRESS, "PGM_DOUBLE_BUTTON_PRESS", "double-button-press" }, { PGM_TRIPLE_BUTTON_PRESS, "PGM_TRIPLE_BUTTON_PRESS", "triple-button-press" }, { PGM_BUTTON_PRESSURE, "PGM_BUTTON_PRESSURE", "button-pressure" }, { PGM_BUTTON_RELEASE, "PGM_BUTTON_RELEASE", "button-release" }, { PGM_KEY_PRESS, "PGM_KEY_PRESS", "key-press" }, { PGM_KEY_RELEASE, "PGM_KEY_RELEASE", "key-release" }, { PGM_EXPOSE, "PGM_EXPOSE", "expose" }, { PGM_CONFIGURE, "PGM_CONFIGURE", "configure" }, { PGM_DRAG_MOTION, "PGM_DRAG_MOTION", "drag-motion" }, { PGM_DRAG_DROP, "PGM_DRAG_DROP", "drag-drop" }, { PGM_DRAG_LEAVE, "PGM_DRAG_LEAVE", "drag-leave" }, { PGM_SCROLL, "PGM_SCROLL", "scroll" }, { PGM_STATE, "PGM_STATE", "state" }, { PGM_DELETE, "PGM_DELETE", "delete" }, { PGM_WIN32_MESSAGE, "PGM_WIN32_MESSAGE", "win32-message" }, { 0, NULL, NULL } }; GType pgm_event_type_get_type (void) { static GType type = 0; if (!type) type = g_enum_register_static ("PgmEventType", _pgm_event_type_values); return type; } static const GFlagsValue _pgm_modifier_type_values[] = { { PGM_SHIFT_MASK, "PGM_SHIFT_MASK", "shift-mask" }, { PGM_CAPSLOCK_MASK, "PGM_CAPSLOCK_MASK", "capslock-mask" }, { PGM_CONTROL_MASK, "PGM_CONTROL_MASK", "control-mask" }, { PGM_ALT_MASK, "PGM_ALT_MASK", "alt-mask" }, { PGM_NUMLOCK_MASK, "PGM_NUMLOCK_MASK", "numlock-mask" }, { 0, NULL, NULL } }; GType pgm_modifier_type_get_type (void) { static GType type = 0; if (!type) type = g_flags_register_static ("PgmModifierType", _pgm_modifier_type_values); return type; } static const GFlagsValue _pgm_button_type_values[] = { { PGM_BUTTON_LEFT, "PGM_BUTTON_LEFT", "left" }, { PGM_BUTTON_MIDDLE, "PGM_BUTTON_MIDDLE", "middle" }, { PGM_BUTTON_RIGHT, "PGM_BUTTON_RIGHT", "right" }, { 0, NULL, NULL } }; GType pgm_button_type_get_type (void) { static GType type = 0; if (!type) type = g_flags_register_static ("PgmButtonType", _pgm_button_type_values); return type; } static const GEnumValue _pgm_scroll_direction_values[] = { { PGM_SCROLL_UP, "PGM_SCROLL_UP", "up" }, { PGM_SCROLL_DOWN, "PGM_SCROLL_DOWN", "down" }, { 0, NULL, NULL } }; GType pgm_scroll_direction_get_type (void) { static GType type = 0; if (!type) type = g_enum_register_static ("PgmScrollDirection", _pgm_scroll_direction_values); return type; } static const GFlagsValue _pgm_viewport_state_values[] = { { PGM_VIEWPORT_ICONIFIED, "PGM_VIEWPORT_ICONIFIED", "iconified" }, { 0, NULL, NULL } }; GType pgm_viewport_state_get_type (void) { static GType type = 0; if (!type) type = g_flags_register_static ("PgmViewportState", _pgm_viewport_state_values); return type; } /* enumerations from "./pgmimage.h" */ #include "./pgmimage.h" static const GFlagsValue _pgm_image_alignment_values[] = { { PGM_IMAGE_LEFT, "PGM_IMAGE_LEFT", "left" }, { PGM_IMAGE_CENTER, "PGM_IMAGE_CENTER", "center" }, { PGM_IMAGE_RIGHT, "PGM_IMAGE_RIGHT", "right" }, { PGM_IMAGE_TOP, "PGM_IMAGE_TOP", "top" }, { PGM_IMAGE_BOTTOM, "PGM_IMAGE_BOTTOM", "bottom" }, { PGM_IMAGE_TOP_LEFT, "PGM_IMAGE_TOP_LEFT", "top-left" }, { PGM_IMAGE_TOP_CENTER, "PGM_IMAGE_TOP_CENTER", "top-center" }, { PGM_IMAGE_TOP_RIGHT, "PGM_IMAGE_TOP_RIGHT", "top-right" }, { PGM_IMAGE_BOTTOM_LEFT, "PGM_IMAGE_BOTTOM_LEFT", "bottom-left" }, { PGM_IMAGE_BOTTOM_CENTER, "PGM_IMAGE_BOTTOM_CENTER", "bottom-center" }, { PGM_IMAGE_BOTTOM_RIGHT, "PGM_IMAGE_BOTTOM_RIGHT", "bottom-right" }, { 0, NULL, NULL } }; GType pgm_image_alignment_get_type (void) { static GType type = 0; if (!type) type = g_flags_register_static ("PgmImageAlignment", _pgm_image_alignment_values); return type; } static const GEnumValue _pgm_image_layout_type_values[] = { { PGM_IMAGE_FILLED, "PGM_IMAGE_FILLED", "filled" }, { PGM_IMAGE_SCALED, "PGM_IMAGE_SCALED", "scaled" }, { PGM_IMAGE_ZOOMED, "PGM_IMAGE_ZOOMED", "zoomed" }, { PGM_IMAGE_CENTERED, "PGM_IMAGE_CENTERED", "centered" }, { PGM_IMAGE_TILED, "PGM_IMAGE_TILED", "tiled" }, { 0, NULL, NULL } }; GType pgm_image_layout_type_get_type (void) { static GType type = 0; if (!type) type = g_enum_register_static ("PgmImageLayoutType", _pgm_image_layout_type_values); return type; } static const GEnumValue _pgm_image_interp_type_values[] = { { PGM_IMAGE_NEAREST, "PGM_IMAGE_NEAREST", "nearest" }, { PGM_IMAGE_BILINEAR, "PGM_IMAGE_BILINEAR", "bilinear" }, { 0, NULL, NULL } }; GType pgm_image_interp_type_get_type (void) { static GType type = 0; if (!type) type = g_enum_register_static ("PgmImageInterpType", _pgm_image_interp_type_values); return type; } static const GEnumValue _pgm_image_wrapping_values[] = { { PGM_IMAGE_CLAMP, "PGM_IMAGE_CLAMP", "clamp" }, { PGM_IMAGE_TRANSPARENT, "PGM_IMAGE_TRANSPARENT", "transparent" }, { PGM_IMAGE_REPEAT, "PGM_IMAGE_REPEAT", "repeat" }, { 0, NULL, NULL } }; GType pgm_image_wrapping_get_type (void) { static GType type = 0; if (!type) type = g_enum_register_static ("PgmImageWrapping", _pgm_image_wrapping_values); return type; } static const GFlagsValue _pgm_image_pixel_format_values[] = { { PGM_IMAGE_RGB, "PGM_IMAGE_RGB", "rgb" }, { PGM_IMAGE_BGR, "PGM_IMAGE_BGR", "bgr" }, { PGM_IMAGE_RGBA, "PGM_IMAGE_RGBA", "rgba" }, { PGM_IMAGE_BGRA, "PGM_IMAGE_BGRA", "bgra" }, { PGM_IMAGE_I420, "PGM_IMAGE_I420", "i420" }, { PGM_IMAGE_YV12, "PGM_IMAGE_YV12", "yv12" }, { PGM_IMAGE_UYVY, "PGM_IMAGE_UYVY", "uyvy" }, { PGM_IMAGE_YUYV, "PGM_IMAGE_YUYV", "yuyv" }, { 0, NULL, NULL } }; GType pgm_image_pixel_format_get_type (void) { static GType type = 0; if (!type) type = g_flags_register_static ("PgmImagePixelFormat", _pgm_image_pixel_format_values); return type; } static const GEnumValue _pgm_image_storage_type_values[] = { { PGM_IMAGE_EMPTY, "PGM_IMAGE_EMPTY", "empty" }, { PGM_IMAGE_FILE, "PGM_IMAGE_FILE", "file" }, { PGM_IMAGE_BUFFER, "PGM_IMAGE_BUFFER", "buffer" }, { PGM_IMAGE_GST_BUFFER, "PGM_IMAGE_GST_BUFFER", "gst-buffer" }, { PGM_IMAGE_PIXBUF, "PGM_IMAGE_PIXBUF", "pixbuf" }, { PGM_IMAGE_IMAGE, "PGM_IMAGE_IMAGE", "image" }, { PGM_IMAGE_SYSTEM_BUFFER, "PGM_IMAGE_SYSTEM_BUFFER", "system-buffer" }, { 0, NULL, NULL } }; GType pgm_image_storage_type_get_type (void) { static GType type = 0; if (!type) type = g_enum_register_static ("PgmImageStorageType", _pgm_image_storage_type_values); return type; } /* enumerations from "./pgmtext.h" */ #include "./pgmtext.h" static const GEnumValue _pgm_text_ellipsize_values[] = { { PGM_TEXT_ELLIPSIZE_NONE, "PGM_TEXT_ELLIPSIZE_NONE", "none" }, { PGM_TEXT_ELLIPSIZE_START, "PGM_TEXT_ELLIPSIZE_START", "start" }, { PGM_TEXT_ELLIPSIZE_MIDDLE, "PGM_TEXT_ELLIPSIZE_MIDDLE", "middle" }, { PGM_TEXT_ELLIPSIZE_END, "PGM_TEXT_ELLIPSIZE_END", "end" }, { 0, NULL, NULL } }; GType pgm_text_ellipsize_get_type (void) { static GType type = 0; if (!type) type = g_enum_register_static ("PgmTextEllipsize", _pgm_text_ellipsize_values); return type; } static const GEnumValue _pgm_text_alignment_values[] = { { PGM_TEXT_ALIGN_LEFT, "PGM_TEXT_ALIGN_LEFT", "left" }, { PGM_TEXT_ALIGN_CENTER, "PGM_TEXT_ALIGN_CENTER", "center" }, { PGM_TEXT_ALIGN_RIGHT, "PGM_TEXT_ALIGN_RIGHT", "right" }, { 0, NULL, NULL } }; GType pgm_text_alignment_get_type (void) { static GType type = 0; if (!type) type = g_enum_register_static ("PgmTextAlignment", _pgm_text_alignment_values); return type; } static const GEnumValue _pgm_text_wrap_values[] = { { PGM_TEXT_WRAP_WORD, "PGM_TEXT_WRAP_WORD", "word" }, { PGM_TEXT_WRAP_CHAR, "PGM_TEXT_WRAP_CHAR", "char" }, { PGM_TEXT_WRAP_WORD_CHAR, "PGM_TEXT_WRAP_WORD_CHAR", "word-char" }, { 0, NULL, NULL } }; GType pgm_text_wrap_get_type (void) { static GType type = 0; if (!type) type = g_enum_register_static ("PgmTextWrap", _pgm_text_wrap_values); return type; } static const GEnumValue _pgm_text_gravity_values[] = { { PGM_TEXT_GRAVITY_SOUTH, "PGM_TEXT_GRAVITY_SOUTH", "south" }, { PGM_TEXT_GRAVITY_EAST, "PGM_TEXT_GRAVITY_EAST", "east" }, { PGM_TEXT_GRAVITY_NORTH, "PGM_TEXT_GRAVITY_NORTH", "north" }, { PGM_TEXT_GRAVITY_WEST, "PGM_TEXT_GRAVITY_WEST", "west" }, { PGM_TEXT_GRAVITY_AUTO, "PGM_TEXT_GRAVITY_AUTO", "auto" }, { 0, NULL, NULL } }; GType pgm_text_gravity_get_type (void) { static GType type = 0; if (!type) type = g_enum_register_static ("PgmTextGravity", _pgm_text_gravity_values); return type; } static const GEnumValue _pgm_text_stretch_values[] = { { PGM_TEXT_STRETCH_CONDENSED, "PGM_TEXT_STRETCH_CONDENSED", "condensed" }, { PGM_TEXT_STRETCH_NORMAL, "PGM_TEXT_STRETCH_NORMAL", "normal" }, { PGM_TEXT_STRETCH_EXPANDED, "PGM_TEXT_STRETCH_EXPANDED", "expanded" }, { 0, NULL, NULL } }; GType pgm_text_stretch_get_type (void) { static GType type = 0; if (!type) type = g_enum_register_static ("PgmTextStretch", _pgm_text_stretch_values); return type; } static const GEnumValue _pgm_text_style_values[] = { { PGM_TEXT_STYLE_NORMAL, "PGM_TEXT_STYLE_NORMAL", "normal" }, { PGM_TEXT_STYLE_OBLIQUE, "PGM_TEXT_STYLE_OBLIQUE", "oblique" }, { PGM_TEXT_STYLE_ITALIC, "PGM_TEXT_STYLE_ITALIC", "italic" }, { 0, NULL, NULL } }; GType pgm_text_style_get_type (void) { static GType type = 0; if (!type) type = g_enum_register_static ("PgmTextStyle", _pgm_text_style_values); return type; } static const GEnumValue _pgm_text_variant_values[] = { { PGM_TEXT_VARIANT_NORMAL, "PGM_TEXT_VARIANT_NORMAL", "normal" }, { PGM_TEXT_VARIANT_SMALL_CAPS, "PGM_TEXT_VARIANT_SMALL_CAPS", "small-caps" }, { 0, NULL, NULL } }; GType pgm_text_variant_get_type (void) { static GType type = 0; if (!type) type = g_enum_register_static ("PgmTextVariant", _pgm_text_variant_values); return type; } static const GEnumValue _pgm_text_weight_values[] = { { PGM_TEXT_WEIGHT_LIGHT, "PGM_TEXT_WEIGHT_LIGHT", "light" }, { PGM_TEXT_WEIGHT_NORMAL, "PGM_TEXT_WEIGHT_NORMAL", "normal" }, { PGM_TEXT_WEIGHT_BOLD, "PGM_TEXT_WEIGHT_BOLD", "bold" }, { 0, NULL, NULL } }; GType pgm_text_weight_get_type (void) { static GType type = 0; if (!type) type = g_enum_register_static ("PgmTextWeight", _pgm_text_weight_values); return type; } static const GFlagsValue _pgm_text_shadow_position_values[] = { { PGM_TEXT_SHADOW_NORTH, "PGM_TEXT_SHADOW_NORTH", "north" }, { PGM_TEXT_SHADOW_SOUTH, "PGM_TEXT_SHADOW_SOUTH", "south" }, { PGM_TEXT_SHADOW_WEST, "PGM_TEXT_SHADOW_WEST", "west" }, { PGM_TEXT_SHADOW_EAST, "PGM_TEXT_SHADOW_EAST", "east" }, { PGM_TEXT_SHADOW_NORTH_WEST, "PGM_TEXT_SHADOW_NORTH_WEST", "north-west" }, { PGM_TEXT_SHADOW_NORTH_EAST, "PGM_TEXT_SHADOW_NORTH_EAST", "north-east" }, { PGM_TEXT_SHADOW_SOUTH_WEST, "PGM_TEXT_SHADOW_SOUTH_WEST", "south-west" }, { PGM_TEXT_SHADOW_SOUTH_EAST, "PGM_TEXT_SHADOW_SOUTH_EAST", "south-east" }, { 0, NULL, NULL } }; GType pgm_text_shadow_position_get_type (void) { static GType type = 0; if (!type) type = g_flags_register_static ("PgmTextShadowPosition", _pgm_text_shadow_position_values); return type; } /* enumerations from "./pgmviewport.h" */ #include "./pgmviewport.h" static const GEnumValue _pgm_viewport_cursor_values[] = { { PGM_VIEWPORT_LEFT_ARROW, "PGM_VIEWPORT_LEFT_ARROW", "left-arrow" }, { PGM_VIEWPORT_INHERIT, "PGM_VIEWPORT_INHERIT", "inherit" }, { PGM_VIEWPORT_NONE, "PGM_VIEWPORT_NONE", "none" }, { 0, NULL, NULL } }; GType pgm_viewport_cursor_get_type (void) { static GType type = 0; if (!type) type = g_enum_register_static ("PgmViewportCursor", _pgm_viewport_cursor_values); return type; } static const GFlagsValue _pgm_viewport_capacity_values[] = { { PGM_VIEWPORT_HARDWARE_ACCELERATION, "PGM_VIEWPORT_HARDWARE_ACCELERATION", "hardware-acceleration" }, { PGM_VIEWPORT_APPLICATION_EMBEDDING, "PGM_VIEWPORT_APPLICATION_EMBEDDING", "application-embedding" }, { PGM_VIEWPORT_OPACITY, "PGM_VIEWPORT_OPACITY", "opacity" }, { PGM_VIEWPORT_TOUCHPAD, "PGM_VIEWPORT_TOUCHPAD", "touchpad" }, { PGM_VIEWPORT_X11_SYSTEM_BUFFER, "PGM_VIEWPORT_X11_SYSTEM_BUFFER", "x11-system-buffer" }, { 0, NULL, NULL } }; GType pgm_viewport_capacity_get_type (void) { static GType type = 0; if (!type) type = g_flags_register_static ("PgmViewportCapacity", _pgm_viewport_capacity_values); return type; } static const GEnumValue _pgm_viewport_rotation_values[] = { { PGM_VIEWPORT_ROTATION_NONE, "PGM_VIEWPORT_ROTATION_NONE", "none" }, { PGM_VIEWPORT_ROTATION_90, "PGM_VIEWPORT_ROTATION_90", "90" }, { PGM_VIEWPORT_ROTATION_180, "PGM_VIEWPORT_ROTATION_180", "180" }, { PGM_VIEWPORT_ROTATION_270, "PGM_VIEWPORT_ROTATION_270", "270" }, { 0, NULL, NULL } }; GType pgm_viewport_rotation_get_type (void) { static GType type = 0; if (!type) type = g_enum_register_static ("PgmViewportRotation", _pgm_viewport_rotation_values); return type; } static const GEnumValue _pgm_viewport_reflection_values[] = { { PGM_VIEWPORT_REFLECTION_NONE, "PGM_VIEWPORT_REFLECTION_NONE", "none" }, { PGM_VIEWPORT_REFLECTION_HORIZONTAL_FLIP, "PGM_VIEWPORT_REFLECTION_HORIZONTAL_FLIP", "horizontal-flip" }, { PGM_VIEWPORT_REFLECTION_VERTICAL_FLIP, "PGM_VIEWPORT_REFLECTION_VERTICAL_FLIP", "vertical-flip" }, { 0, NULL, NULL } }; GType pgm_viewport_reflection_get_type (void) { static GType type = 0; if (!type) type = g_enum_register_static ("PgmViewportReflection", _pgm_viewport_reflection_values); return type; } /* enumerations from "./pgmlinearalgebra.h" */ #include "./pgmlinearalgebra.h" static const GEnumValue _pgm_mat4x4_predefined_values[] = { { PGM_MAT4X4_FLIP_HORIZONTAL, "PGM_MAT4X4_FLIP_HORIZONTAL", "flip-horizontal" }, { PGM_MAT4X4_FLIP_VERTICAL, "PGM_MAT4X4_FLIP_VERTICAL", "flip-vertical" }, { PGM_MAT4X4_ROTATE_CLOCKWISE, "PGM_MAT4X4_ROTATE_CLOCKWISE", "rotate-clockwise" }, { PGM_MAT4X4_ROTATE_COUNTER_CLOCKWISE, "PGM_MAT4X4_ROTATE_COUNTER_CLOCKWISE", "rotate-counter-clockwise" }, { 0, NULL, NULL } }; GType pgm_mat4x4_predefined_get_type (void) { static GType type = 0; if (!type) type = g_enum_register_static ("PgmMat4x4Predefined", _pgm_mat4x4_predefined_values); return type; } /* enumerations from "./pgmimagesink.h" */ #include "./pgmimagesink.h" static const GFlagsValue _pgm_image_sink_event_mask_values[] = { { PGM_IMAGE_SINK_MOTION, "PGM_IMAGE_SINK_MOTION", "motion" }, { PGM_IMAGE_SINK_PRESSED, "PGM_IMAGE_SINK_PRESSED", "pressed" }, { PGM_IMAGE_SINK_RELEASED, "PGM_IMAGE_SINK_RELEASED", "released" }, { 0, NULL, NULL } }; GType pgm_image_sink_event_mask_get_type (void) { static GType type = 0; if (!type) type = g_flags_register_static ("PgmImageSinkEventMask", _pgm_image_sink_event_mask_values); return type; } /* Generated data ends here */ pigment-0.3.17/pgm/pgmviewport.c0000644000175000017500000026160311205034416013504 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment media rendering library * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author(s): Loïc Molinari * Julien Moutte */ /** * SECTION:pgmviewport * @short_description: An abstract class doing a visual projection of a canvas. * @see_also: #PgmCanvas, #PgmViewportFactory, #PgmDrawable. * * * * A #PgmViewport object is used to do a visual projection of #PgmCanvas object. * Each #PgmDrawable added to the canvas is rendered on the viewport converting * canvas coordinates to display coordinates. Viewport is a base abstract class * from which implementation plugins inherit. You can instantiate several * viewport implementations through a #PgmViewportFactory. A viewport can handle * 0 or 1 canvas, if there's no canvas binded, nothing is projected except * the background color of the viewport. * * Implementation capacities * * Each viewport implementations are based on a dedicated graphical library such * as DirectFB, OpenGL or Direct3D to project the binded canvas. These libraries * can be completely different, some of them being 2d-based generating their * output through blit operations, other being 3d-based generating their output * through a 3d pipeline. Each of them can also optimize part of their rendering * paths thanks to dedicated hardware. These differences can lead to viewport * implementations with different capacities. The result being that some * properties of a drawable could not be correctly projected by some * implementations. You can retrieve the mask capacities handled by a Viewport * at runtime with the pgm_viewport_get_caps_mask() method, and you can get the * list of handled color spaces with pgm_viewport_get_pixel_formats(). * * Event handling * * A viewport is responsible of the event handling. It catches the events * generated by the underlying backend, and converts them building Pigment * events, which are then dispatched through signals. You can connect functions * to these signals using g_signal_connect() , in UI programming these * functions are often called callbacks. Each time an event is generated, the * corresponding signal is emited and all the connected callbacks are called. * * Viewport size * * Practically speaking, the viewport is basically either a window on your * screen or your complete monitor/TV. When you define the size of the viewport, * the implementation will try to change the window size, or the video mode if * you set it to be fullscreen. Some viewport implementation are not able to * obtain the screen size in millimeters and you have to set it, so that the * viewport can calculate the appropriate projections taking in account non * square pixels. * * Recommended usage of viewport size * * Applications are strongly encouraged to use the viewport the following way: * * * * The application initializes Pigment using pgm_init and then try to get * the screen size in millimeters, the screen resolution and the viewport size * (window size or fullscreen size). Looking at those parameters the application * can calculate the pixel aspect ratio of the screen and figure out the visual * aspect ratio of the viewport (4:3, 16:9, etc). * * * * * When the application has defined the visual aspect ratio of the viewport, it * can decide the visual aspect ratio it's going to generate and set the canvas * size accordingly. Let's say for example that the viewport size is a 750x400 * pixels window and that we have square pixels, this is a bit wider than 16:9. * The application decides to generate a 16:9 style user interface and sets the * canvas to 16.0x9.0. The viewport will draw black borders and project that * canvas as a 711x400 pixels large rectangle in the middle of that window. * * * * * If the viewport size changes (window resize), the application can decide to * use another aspect ratio or stick with the current one. * * * * * * * Last reviewed on 2007-06-10 (0.1.5) */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include "pgmviewport.h" #include "pgmimage.h" #include "pgmmarshal.h" #ifdef G_OS_UNIX #include /* pipe, close */ #endif /* G_OS_UNIX */ #ifdef WIN32 #include /* _O_BINARY */ #include /* _pipe, _close */ #define pipe(handle) _pipe(handle, 4096, _O_BINARY) #define close(handle) _close(handle) #endif /* WIN32 */ /* Z zero depth value in the [0.0, 1.0f] range */ #define DEPTH_ZERO_Z 0.68791816f /* Multi-press event constants */ #define MULTI_PRESS_DELAY 250 /* in milliseconds */ #define MULTI_PRESS_DISTANCE 5 /* in pixels */ GST_DEBUG_CATEGORY_STATIC (pgm_viewport_debug); #define GST_CAT_DEFAULT pgm_viewport_debug /* Viewport signals */ enum { BUTTON_PRESS_EVENT, BUTTON_PRESSURE_EVENT, BUTTON_RELEASE_EVENT, KEY_PRESS_EVENT, KEY_RELEASE_EVENT, CONFIGURE_EVENT, DELETE_EVENT, SCROLL_EVENT, MOTION_NOTIFY_EVENT, EXPOSE_EVENT, DRAG_MOTION_EVENT, DRAG_DROP_EVENT, DRAG_LEAVE_EVENT, STATE_EVENT, WIN32_MESSAGE_EVENT, PIXELS_READ, UPDATE_PASS, LAST_SIGNAL }; /* Pixel rectangle */ typedef struct { guint8 *pixels; guint width; guint height; } PixelRectangle; #ifdef WIN32 /* Win32 message */ typedef struct { PgmEventType type; PgmEvent *event; gint32 *message_processed; LRESULT *result; } Win32Message; #endif /* WIN32 */ /* Mouse picking processing function as its defined in pgmdrawable.h */ typedef void (*DoPickingFunc) (PgmDrawable *drawable, PgmEvent *event, PgmVec3 *p1, PgmVec3 *p2, guint16 *emission_mask); static GstObjectClass *parent_class = NULL; static guint pgm_viewport_signals[LAST_SIGNAL] = { 0 }; /* Private functions */ /* Copy a layer reversing it and taking a ref on each drawable */ static GList* copy_layer_reversed (GList *layer) { GList *new_layer = NULL; if (G_LIKELY (layer != NULL)) { /* Create the last entry of the new list */ new_layer = g_slice_new (GList); new_layer->data = g_object_ref (layer->data); new_layer->next = NULL; layer = layer->next; /* Create the previous entries */ while (layer) { new_layer->prev = g_slice_new (GList); new_layer->prev->next = new_layer; new_layer = new_layer->prev; new_layer->data = g_object_ref (layer->data); layer = layer->next; } /* Set the previous pointer if the first entry of the new list to NULL */ new_layer->prev = NULL; } return new_layer; } /* Call a drawable picking function for each drawables in a layer */ static void layer_foreach_do_picking (PgmCanvas *canvas, GList *layer, DoPickingFunc do_picking, PgmEvent *event, PgmVec3 *p1, PgmVec3 *p2, guint16 *emission_mask) { GList *walk; /* Iterate picking on the drawables. Since the user can return TRUE in its * signal handler to prevent further propagation of the drawable picking * signals, the signal emission mask allows to filter signals which still need * to be emitted. The refs taken on each drawable during the copy are released * after use in the loop. */ walk = layer; while (walk && emission_mask) { PgmDrawable *drawable = (PgmDrawable*) walk->data; do_picking (drawable, event, p1, p2, emission_mask); g_object_unref (drawable); walk = walk->next; } g_list_free (layer); } /* Popagate a mouse event to the canvas to process picking */ static void propagate_picking_event (PgmViewport *viewport, PgmEvent *event) { PgmCanvas *canvas = viewport->canvas; PgmEventButton *button = (PgmEventButton*) event; GList *near_layer, *middle_layer, *far_layer; guint16 emission_mask = PGM_DRAWABLE_PICKING_MASK; gfloat x1, y1, z1, x2, y2, z2; PgmVec3 p1, p2; /* Check if there's a canvas bound */ if (G_UNLIKELY (!viewport->canvas)) return; /* Create the picking line in canvas space */ pgm_viewport_to_canvas (viewport, &x1, &y1, &z1, button->x, button->y, 0.0f); pgm_vec3_set_from_scalars (&p1, x1, y1, z1); pgm_viewport_to_canvas (viewport, &x2, &y2, &z2, button->x, button->y, 1.0f); pgm_vec3_set_from_scalars (&p2, x2, y2, z2); /* Get reversed copy of the layers so that we go from the nearest to the * farthest drawables for the picking, the copy takes a ref on each drawable * making sure drawables in the layers are not disposed while picked */ GST_OBJECT_LOCK (canvas); far_layer = copy_layer_reversed (canvas->far_layer); middle_layer = copy_layer_reversed (canvas->middle_layer); near_layer = copy_layer_reversed (canvas->near_layer); GST_OBJECT_UNLOCK (canvas); /* Propagate the picking to each drawables */ switch (event->type) { case PGM_BUTTON_PRESS: layer_foreach_do_picking (canvas, near_layer, (DoPickingFunc) _pgm_drawable_do_press_event, event, &p1, &p2, &emission_mask); layer_foreach_do_picking (canvas, middle_layer, (DoPickingFunc) _pgm_drawable_do_press_event, event, &p1, &p2, &emission_mask); layer_foreach_do_picking (canvas, far_layer, (DoPickingFunc) _pgm_drawable_do_press_event, event, &p1, &p2, &emission_mask); break; case PGM_BUTTON_PRESSURE: layer_foreach_do_picking (canvas, near_layer, (DoPickingFunc) _pgm_drawable_do_pressure_event, event, &p1, &p2, &emission_mask); layer_foreach_do_picking (canvas, middle_layer, (DoPickingFunc) _pgm_drawable_do_pressure_event, event, &p1, &p2, &emission_mask); layer_foreach_do_picking (canvas, far_layer, (DoPickingFunc) _pgm_drawable_do_pressure_event, event, &p1, &p2, &emission_mask); break; case PGM_BUTTON_RELEASE: layer_foreach_do_picking (canvas, near_layer, (DoPickingFunc) _pgm_drawable_do_release_event, event, &p1, &p2, &emission_mask); layer_foreach_do_picking (canvas, middle_layer, (DoPickingFunc) _pgm_drawable_do_release_event, event, &p1, &p2, &emission_mask); layer_foreach_do_picking (canvas, far_layer, (DoPickingFunc) _pgm_drawable_do_release_event, event, &p1, &p2, &emission_mask); break; case PGM_MOTION_NOTIFY: layer_foreach_do_picking (canvas, near_layer, (DoPickingFunc) _pgm_drawable_do_motion_event, event, &p1, &p2, &emission_mask); layer_foreach_do_picking (canvas, middle_layer, (DoPickingFunc) _pgm_drawable_do_motion_event, event, &p1, &p2, &emission_mask); layer_foreach_do_picking (canvas, far_layer, (DoPickingFunc) _pgm_drawable_do_motion_event, event, &p1, &p2, &emission_mask); break; case PGM_SCROLL: emission_mask = PGM_DRAWABLE_PICKING_SCROLLED; layer_foreach_do_picking (canvas, near_layer, (DoPickingFunc) _pgm_drawable_do_scroll_event, event, &p1, &p2, &emission_mask); layer_foreach_do_picking (canvas, middle_layer, (DoPickingFunc) _pgm_drawable_do_scroll_event, event, &p1, &p2, &emission_mask); layer_foreach_do_picking (canvas, far_layer, (DoPickingFunc) _pgm_drawable_do_scroll_event, event, &p1, &p2, &emission_mask); break; default: break; } } /* Emit double and triple button press event if needed */ static void emit_multi_press_event (PgmViewport *viewport, PgmEventButton *event) { PgmEvent *new_event = NULL; /* Delay */ static guint32 first_time = 0; static guint32 second_time = 0; guint32 current_time = event->time; /* Distance */ static gint first_x = 0; static gint first_y = 0; gint current_x = (gint) event->x; gint current_y = (gint) event->y; /* Second click */ if (current_time - first_time < MULTI_PRESS_DELAY && ABS (current_x - first_x) < MULTI_PRESS_DISTANCE && ABS (current_y - first_y) < MULTI_PRESS_DISTANCE) { new_event = pgm_event_copy ((PgmEvent *) event); new_event->type = PGM_DOUBLE_BUTTON_PRESS; g_signal_emit (G_OBJECT (viewport), pgm_viewport_signals[BUTTON_PRESS_EVENT], 0, new_event); pgm_event_free (new_event); second_time = current_time; } /* Third click */ else if (current_time - second_time < MULTI_PRESS_DELAY && ABS (current_x - first_x) < MULTI_PRESS_DISTANCE && ABS (current_y - first_y) < MULTI_PRESS_DISTANCE) { new_event = pgm_event_copy ((PgmEvent *) event); new_event->type = PGM_TRIPLE_BUTTON_PRESS; g_signal_emit (G_OBJECT (viewport), pgm_viewport_signals[BUTTON_PRESS_EVENT], 0, new_event); pgm_event_free (new_event); first_time = 0; second_time = 0; first_x = 0; first_y = 0; } /* First click */ else { first_time = current_time; first_x = current_x; first_y = current_y; } } /* Update the states of the viewport depending on the PgmEventState */ static void update_states (PgmViewport *viewport, PgmViewportState state_mask) { GST_OBJECT_LOCK (viewport); viewport->iconified = state_mask & PGM_VIEWPORT_ICONIFIED; GST_OBJECT_UNLOCK (viewport); } /* IO watch callback for pushed events. It dispatches the events from the queue, * emitting the correct signal for each of them. The queue is then freed. */ static gboolean do_events (GIOChannel *source, GIOCondition condition, gpointer data) { PgmViewport *viewport = PGM_VIEWPORT (data); GList *events, *walk; gchar buf; g_io_channel_read_chars (source, &buf, 1, NULL, NULL); /* Reverse the list since we prepend */ g_mutex_lock (viewport->event_lock); events = g_list_reverse (viewport->event_list); viewport->event_list = NULL; g_mutex_unlock (viewport->event_lock); /* Dispatch all the events from the list */ walk = events; while (walk) { PgmEvent *event = (PgmEvent *) walk->data; switch (event->type) { case PGM_MOTION_NOTIFY: g_signal_emit (G_OBJECT (viewport), pgm_viewport_signals[MOTION_NOTIFY_EVENT], 0, event); propagate_picking_event (viewport, event); break; case PGM_KEY_PRESS: g_signal_emit (G_OBJECT (viewport), pgm_viewport_signals[KEY_PRESS_EVENT], 0, event); break; case PGM_KEY_RELEASE: g_signal_emit (G_OBJECT (viewport), pgm_viewport_signals[KEY_RELEASE_EVENT], 0, event); break; case PGM_SCROLL: g_signal_emit (G_OBJECT (viewport), pgm_viewport_signals[SCROLL_EVENT], 0, event); propagate_picking_event (viewport, event); break; case PGM_BUTTON_PRESS: g_signal_emit (G_OBJECT (viewport), pgm_viewport_signals[BUTTON_PRESS_EVENT], 0, event); emit_multi_press_event (viewport, (PgmEventButton *) event); propagate_picking_event (viewport, event); break; case PGM_BUTTON_PRESSURE: g_signal_emit (G_OBJECT (viewport), pgm_viewport_signals[BUTTON_PRESSURE_EVENT], 0, event); propagate_picking_event (viewport, event); break; case PGM_BUTTON_RELEASE: g_signal_emit (G_OBJECT (viewport), pgm_viewport_signals[BUTTON_RELEASE_EVENT], 0, event); propagate_picking_event (viewport, event); break; case PGM_EXPOSE: g_signal_emit (G_OBJECT (viewport), pgm_viewport_signals[EXPOSE_EVENT], 0, event); break; case PGM_CONFIGURE: g_signal_emit (G_OBJECT (viewport), pgm_viewport_signals[CONFIGURE_EVENT], 0, event); break; case PGM_DRAG_MOTION: { PgmViewportClass *klass = PGM_VIEWPORT_GET_CLASS (viewport); gboolean accepted = FALSE; g_signal_emit (G_OBJECT (viewport), pgm_viewport_signals[DRAG_MOTION_EVENT], 0, event, &accepted); if (klass->set_drag_status) klass->set_drag_status (viewport, accepted); } break; case PGM_DRAG_DROP: g_signal_emit (G_OBJECT (viewport), pgm_viewport_signals[DRAG_DROP_EVENT], 0, event); break; case PGM_DRAG_LEAVE: g_signal_emit (G_OBJECT (viewport), pgm_viewport_signals[DRAG_LEAVE_EVENT], 0, event); break; case PGM_STATE: update_states (viewport, ((PgmEventState *) event)->state_mask); g_signal_emit (G_OBJECT (viewport), pgm_viewport_signals[STATE_EVENT], 0, event); break; case PGM_DELETE: g_signal_emit (G_OBJECT (viewport), pgm_viewport_signals[DELETE_EVENT], 0, event); break; #ifdef WIN32 case PGM_WIN32_MESSAGE: { Win32Message *message = (Win32Message*) event; g_signal_emit (G_OBJECT (viewport), pgm_viewport_signals[WIN32_MESSAGE_EVENT], 0, message->event, (gpointer) message->result); g_atomic_int_set (message->message_processed, 1); event = message->event; g_slice_free (Win32Message, message); } break; #endif /* WIN32 */ default: break; } pgm_event_free (event); walk = walk->next; } g_list_free (events); events = NULL; return TRUE; } /* IO watch callback for pushed pixels */ static gboolean do_pixels (GIOChannel *source, GIOCondition condition, gpointer data) { PgmViewport *viewport = PGM_VIEWPORT (data); GList *walk = NULL, *rectangles = NULL; gchar buf; g_io_channel_read_chars (source, &buf, 1, NULL, NULL); g_mutex_lock (viewport->pixel_lock); rectangles = viewport->pixel_list; viewport->pixel_list = NULL; g_mutex_unlock (viewport->pixel_lock); /* Emit signals for all the pixel areas from the list */ walk = rectangles; while (walk) { PixelRectangle *rectangle = (PixelRectangle*) walk->data; /* Emit "pixels-read" signal with the pixel area */ g_signal_emit (G_OBJECT (viewport), pgm_viewport_signals[PIXELS_READ], 0, rectangle->width, rectangle->height, rectangle->pixels); /* Then free our rectangle */ g_slice_free (PixelRectangle, rectangle); rectangle = NULL; walk = walk->next; } g_list_free (rectangles); rectangles = NULL; return TRUE; } /* Canvas "size-changed" handler */ static void canvas_size_changed_cb (PgmCanvas *canvas, gpointer data) { PgmViewport *viewport = PGM_VIEWPORT (data); pgm_viewport_update_projection (viewport); } /* Create an IO watch */ static _PgmIOWatch* new_io_watch (PgmViewport *viewport, GIOFunc watch_func) { _PgmIOWatch *watch; watch = g_slice_new (_PgmIOWatch); watch->fd[0] = -1; watch->fd[1] = -1; watch->in = NULL; watch->out = NULL; watch->tag = 0; /* Create the pipe */ if (G_UNLIKELY (pipe (watch->fd) == -1)) { GST_ERROR_OBJECT (viewport, "pipe failed"); return NULL; } /* Build an IO channel for reading */ #ifdef WIN32 watch->out = g_io_channel_win32_new_fd (watch->fd[0]); #else watch->out = g_io_channel_unix_new (watch->fd[0]); #endif /* WIN32 */ if (G_UNLIKELY (!watch->out)) { GST_ERROR_OBJECT (viewport, "g_io_channel_unix_new failed"); close (watch->fd[0]); close (watch->fd[1]); return NULL; } /* Build an IO channel for writing */ #ifdef WIN32 watch->in = g_io_channel_win32_new_fd (watch->fd[1]); #else watch->in = g_io_channel_unix_new (watch->fd[1]); #endif /* WIN32 */ if (G_UNLIKELY (!watch->in)) { GST_ERROR_OBJECT (viewport, "g_io_channel_unix_new failed"); g_io_channel_unref (watch->out); close (watch->fd[0]); close (watch->fd[1]); return NULL; } /* We don't close the fd ourselves because otherwise it deadlocks on windows */ g_io_channel_set_close_on_unref (watch->in, TRUE); g_io_channel_set_close_on_unref (watch->out, TRUE); /* Add the watch to dispatch in the main loop using the default GMainContext */ watch->tag = g_io_add_watch (watch->out, G_IO_IN, watch_func, viewport); return watch; } /* Free an IO watch */ static void free_io_watch (_PgmIOWatch *watch) { /* Event data cleaning */ if (G_LIKELY (watch->tag)) { g_source_remove (watch->tag); watch->tag = 0; } if (G_LIKELY (watch->out)) { g_io_channel_unref (watch->out); watch->out = NULL; } if (G_LIKELY (watch->in)) { g_io_channel_unref (watch->in); watch->in = NULL; } g_slice_free (_PgmIOWatch, watch); watch = NULL; } /* GObject stuff */ G_DEFINE_TYPE (PgmViewport, pgm_viewport, GST_TYPE_OBJECT); static void pgm_viewport_dispose (GObject *object) { PgmViewport *viewport = PGM_VIEWPORT (object); /* Frees event handling data */ free_io_watch (viewport->event_watch); g_mutex_free (viewport->event_lock); if (viewport->event_list) { GList *walk = viewport->event_list; while (walk) { pgm_event_free ((PgmEvent*) walk->data); walk = walk->next; } g_list_free (viewport->event_list); viewport->event_list = NULL; } /* Free pixel handling data */ free_io_watch (viewport->pixel_watch); g_mutex_free (viewport->pixel_lock); if (viewport->pixel_list) { GList *walk = viewport->pixel_list; while (walk) { g_slice_free (PixelRectangle, walk->data); walk->data = NULL; walk = walk->next; } g_list_free (viewport->pixel_list); viewport->pixel_list = NULL; } /* Free projection matrices */ pgm_mat4x4_free (viewport->projection); pgm_mat4x4_free (viewport->inv_projection); if (viewport->icon) g_object_unref (viewport->icon); g_free (viewport->title); viewport->title = NULL; if (viewport->message_filter) { g_list_free (viewport->message_filter); viewport->message_filter = NULL; } if (viewport->canvas) gst_object_unref (GST_OBJECT_CAST (viewport->canvas)); gst_object_unref (GST_OBJECT_CAST (viewport->factory)); GST_CALL_PARENT (G_OBJECT_CLASS, dispose, (object)); } static void pgm_viewport_class_init (PgmViewportClass *klass) { GObjectClass *gobject_class = (GObjectClass *) klass; parent_class = g_type_class_peek_parent (klass); /** * PgmViewport::button-press-event: * @viewport: the #PgmViewport * @event: the #PgmEventButton * * Will be emitted on a mouse button press on the @viewport. */ pgm_viewport_signals[BUTTON_PRESS_EVENT] = g_signal_new ("button-press-event", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PgmViewportClass, button_press_event), NULL, NULL, pgm_marshal_VOID__BOXED, G_TYPE_NONE, 1, PGM_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE); /** * PgmViewport::button-pressure-event: * @viewport: the #PgmViewport * @event: the #PgmEventButton * * Will be emitted on a mouse button pressure change on the @viewport. */ pgm_viewport_signals[BUTTON_PRESSURE_EVENT] = g_signal_new ("button-pressure-event", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PgmViewportClass, button_pressure_event), NULL, NULL, pgm_marshal_VOID__BOXED, G_TYPE_NONE, 1, PGM_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE); /** * PgmViewport::button-release-event: * @viewport: the #PgmViewport * @event: the #PgmEventButton * * Will be emitted on a mouse button release on the @viewport. */ pgm_viewport_signals[BUTTON_RELEASE_EVENT] = g_signal_new ("button-release-event", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PgmViewportClass, button_release_event), NULL, NULL, pgm_marshal_VOID__BOXED, G_TYPE_NONE, 1, PGM_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE); /** * PgmViewport::key-press-event: * @viewport: the #PgmViewport * @event: the #PgmEventKey * * Will be emitted on a keyboard press on the @viewport. */ pgm_viewport_signals[KEY_PRESS_EVENT] = g_signal_new ("key-press-event", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PgmViewportClass, key_press_event), NULL, NULL, pgm_marshal_VOID__BOXED, G_TYPE_NONE, 1, PGM_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE); /** * PgmViewport::key-release-event: * @viewport: the #PgmViewport * @event: the #PgmEventKey * * Will be emitted on a keyboard release on the @viewport. */ pgm_viewport_signals[KEY_RELEASE_EVENT] = g_signal_new ("key-release-event", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PgmViewportClass, key_release_event), NULL, NULL, pgm_marshal_VOID__BOXED, G_TYPE_NONE, 1, PGM_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE); /** * PgmViewport::configure-event: * @viewport: the #PgmViewport * @event: the #PgmEventConfigure * * Will be emitted on a @viewport position or size change. */ pgm_viewport_signals[CONFIGURE_EVENT] = g_signal_new ("configure-event", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PgmViewportClass, configure_event), NULL, NULL, pgm_marshal_VOID__BOXED, G_TYPE_NONE, 1, PGM_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE); /** * PgmViewport::delete-event: * @viewport: the #PgmViewport * @event: the #PgmEventDelete * * Will be emitted on a @viewport close request (ie the user clicked the * close button of the window manager). */ pgm_viewport_signals[DELETE_EVENT] = g_signal_new ("delete-event", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PgmViewportClass, delete_event), NULL, NULL, pgm_marshal_VOID__BOXED, G_TYPE_NONE, 1, PGM_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE); /** * PgmViewport::scroll-event: * @viewport: the #PgmViewport * @event: the #PgmEventScroll * * Will be emitted on a mouse scroll on the @viewport. */ pgm_viewport_signals[SCROLL_EVENT] = g_signal_new ("scroll-event", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PgmViewportClass, scroll_event), NULL, NULL, pgm_marshal_VOID__BOXED, G_TYPE_NONE, 1, PGM_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE); /** * PgmViewport::motion-notify-event: * @viewport: the #PgmViewport * @event: the #PgmEventMotion * * Will be emitted on a mouse move on the @viewport. */ pgm_viewport_signals[MOTION_NOTIFY_EVENT] = g_signal_new ("motion-notify-event", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PgmViewportClass, motion_notify_event), NULL, NULL, pgm_marshal_VOID__BOXED, G_TYPE_NONE, 1, PGM_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE); /** * PgmViewport::expose-event: * @viewport: the #PgmViewport * @event: the #PgmEventExpose * * Will be emitted when the @viewport visibility status has changed. */ pgm_viewport_signals[EXPOSE_EVENT] = g_signal_new ("expose-event", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PgmViewportClass, expose_event), NULL, NULL, pgm_marshal_VOID__BOXED, G_TYPE_NONE, 1, PGM_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE); /** * PgmViewport::drag-motion-event: * @viewport: the #PgmViewport * @event: the #PgmEventDnd * * Will be emitted when the user moves the cursor over @viewport during a * drag. The signal handler must determine whether the cursor position is in * a drop zone or not. If it is not in a drop zone, it returns FALSE and the * "drag-drop-event" signal will not be called. Otherwise, the * handler returns TRUE. */ pgm_viewport_signals[DRAG_MOTION_EVENT] = g_signal_new ("drag-motion-event", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PgmViewportClass, drag_motion_event), NULL, NULL, pgm_marshal_BOOLEAN__BOXED, G_TYPE_BOOLEAN, 1, PGM_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE); /** * PgmViewport::drag-drop-event: * @viewport: the #PgmViewport * @event: the #PgmEventDnd * * Will be emitted when the user drops data onto @viewport. Note that you have * to connect a handler to the signal "drag-motion-event" and return TRUE to * accept a drag. This signal is not emitted if a drag has not been accepted. */ pgm_viewport_signals[DRAG_DROP_EVENT] = g_signal_new ("drag-drop-event", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PgmViewportClass, drag_drop_event), NULL, NULL, pgm_marshal_VOID__BOXED, G_TYPE_NONE, 1, PGM_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE); /** * PgmViewport::drag-leave-event: * @viewport: the #PgmViewport * @event: the #PgmEventDnd * * Will be emitted when the user leaves @viewport during a drag. A typical * reason to connect to this signal is to undo things done in * "drag-motion-event". */ pgm_viewport_signals[DRAG_LEAVE_EVENT] = g_signal_new ("drag-leave-event", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PgmViewportClass, drag_leave_event), NULL, NULL, pgm_marshal_VOID__BOXED, G_TYPE_NONE, 1, PGM_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE); /** * PgmViewport::state-event: * @viewport: the #PgmViewport * @event: the #PgmEventState * * Will be emitted when the state of @viewport changes, being a visibility * change, a fullscreen change or an iconification change. */ pgm_viewport_signals[STATE_EVENT] = g_signal_new ("state-event", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PgmViewportClass, state_event), NULL, NULL, pgm_marshal_VOID__BOXED, G_TYPE_NONE, 1, PGM_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE); #ifdef WIN32 /** * PgmViewport::win32-message-event: * @viewport: the #PgmViewport * @event: the #PgmEventWin32Message * * Will be emitted when a Win32 message is received by @viewport. The * signal is emitted only if the message type is in the filter list defined * by pgm_viewport_set_message_filter(). It is prior to all the other * @viewport signal events. * * Returns: the result to be returned by the WindowProc. */ pgm_viewport_signals[WIN32_MESSAGE_EVENT] = g_signal_new ("win32-message-event", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PgmViewportClass, win32_message_event), NULL, NULL, pgm_marshal_LONG__BOXED, G_TYPE_LONG, 1, PGM_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE); #endif /* WIN32 */ /** * PgmViewport::pixels-read: * @viewport: the #PgmViewport * @width: the width of the pixels area * @height: the height of the pixels area * @pixels: the pixels area that has been filled. It has been allocated * by the application and must be freed by the application. * * Will be emitted when pixels have been read following a call to * pgm_viewport_read_pixels(). */ pgm_viewport_signals[PIXELS_READ] = g_signal_new ("pixels-read", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PgmViewportClass, pixels_read), NULL, NULL, pgm_marshal_VOID__UINT_UINT_POINTER, G_TYPE_NONE, 3, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_POINTER); /** * PgmViewport::update-pass: * @viewport: the #PgmViewport * * Will be emitted prior to any rendering pass happening in the Pigment * internal rendering thread. It is highly recommended to update all the * Pigment drawables rendered by @viewport in this signal. It ensures the * best performance and rendering correctness since the object update pass * will be completely synchronized prior to the rendering pass. * * Note that this is the only signal in Pigment which is emitted from another * thread than the one of the Pigment main loop. */ pgm_viewport_signals[UPDATE_PASS] = g_signal_new ("update-pass", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PgmViewportClass, update_pass), NULL, NULL, pgm_marshal_VOID__VOID, G_TYPE_NONE, 0); gobject_class->dispose = GST_DEBUG_FUNCPTR (pgm_viewport_dispose); GST_DEBUG_CATEGORY_INIT (pgm_viewport_debug, "pgm_viewport", 0, "viewport object"); } static void pgm_viewport_init (PgmViewport *viewport) { /* Public data default values */ /* viewport->factory = NULL; */ /* viewport->canvas = NULL; */ /* viewport->message_filter = NULL; */ viewport->title = g_strdup (""); /* viewport->icon = NULL; */ /* viewport->cursor = PGM_VIEWPORT_LEFT_ARROW; */ /* viewport->fullscreen = FALSE; */ /* viewport->visible = FALSE; */ viewport->decorated = TRUE; /* viewport->iconified = FALSE; */ viewport->alpha_blending = TRUE; viewport->width = 800; viewport->height = 600; viewport->width_mm = -1; viewport->height_mm = -1; viewport->projection = pgm_mat4x4_new (); viewport->inv_projection = pgm_mat4x4_new (); /* viewport->projected_x = 0; */ /* viewport->projected_y = 0; */ viewport->projected_width = 800; viewport->projected_height = 600; /* viewport->rotation = PGM_VIEWPORT_ROTATION_NONE; */ /* viewport->reflection = PGM_VIEWPORT_REFLECTION_NONE; */ viewport->pixel_aspect_ratio = 1.0f; viewport->viewport_ratio = 4.0f/3.0f; viewport->canvas_ratio = 4.0f/3.0f; /* viewport->caps_mask = 0; */ viewport->opacity = 255; /* Private data default values */ viewport->event_watch = new_io_watch (viewport, (GIOFunc) do_events); viewport->event_lock = g_mutex_new (); viewport->event_list = NULL; viewport->pixel_watch = new_io_watch (viewport, (GIOFunc) do_pixels); viewport->pixel_lock = g_mutex_new (); viewport->pixel_list = NULL; viewport->event_watch_up = viewport->event_watch && viewport->event_watch->in; viewport->pixel_watch_up = viewport->pixel_watch && viewport->pixel_watch->in; viewport->projection_hflip = 1.0f; viewport->projection_vflip = 1.0f; /* viewport->projection_rotation = 0.0f; */ /* viewport->canvas_size_handler = 0; */ } /** * pgm_viewport_set_title: * @viewport: a #PgmViewport object. * @title: the title. * * Sets the title appearing in the title bar and in the iconified * window list. The string is copied and can be freed when the call returns. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_viewport_set_title (PgmViewport *viewport, const gchar *title) { PgmViewportClass *klass; PgmError ret = PGM_ERROR_OK; g_return_val_if_fail (PGM_IS_VIEWPORT (viewport), PGM_ERROR_X); GST_OBJECT_LOCK (viewport); if (G_UNLIKELY (viewport->title)) g_free (viewport->title); viewport->title = g_strdup (title); GST_OBJECT_UNLOCK (viewport); klass = PGM_VIEWPORT_GET_CLASS (viewport); if (klass->set_title) ret = klass->set_title (viewport, title); return ret; } /** * pgm_viewport_get_title: * @viewport: a #PgmViewport object. * @title: a pointer to a pointer to a gchar where the title string will be * stored. g_free() after use. * * Retrieves the title of @viewport in @title. * * MT safe. * * Returns: A #PgmError indicating success/failure. */ PgmError pgm_viewport_get_title (PgmViewport *viewport, gchar **title) { g_return_val_if_fail (PGM_IS_VIEWPORT (viewport), PGM_ERROR_X); g_return_val_if_fail (title != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (viewport); *title = g_strdup (viewport->title); GST_OBJECT_UNLOCK (viewport); return PGM_ERROR_OK; } /** * pgm_viewport_show: * @viewport: a #PgmViewport object. * * Makes @viewport visible. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_viewport_show (PgmViewport *viewport) { PgmViewportClass *klass; PgmError ret = PGM_ERROR_OK; g_return_val_if_fail (PGM_IS_VIEWPORT (viewport), PGM_ERROR_X); GST_OBJECT_LOCK (viewport); if (viewport->visible == TRUE) { GST_OBJECT_UNLOCK (viewport); return PGM_ERROR_OK; } viewport->visible = TRUE; GST_OBJECT_UNLOCK (viewport); klass = PGM_VIEWPORT_GET_CLASS (viewport); if (klass->show) ret = klass->show (viewport); return ret; } /** * pgm_viewport_hide: * @viewport: a #PgmViewport object. * * Makes @viewport invisible. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_viewport_hide (PgmViewport *viewport) { PgmViewportClass *klass; PgmError ret = PGM_ERROR_OK; g_return_val_if_fail (PGM_IS_VIEWPORT (viewport), PGM_ERROR_X); GST_OBJECT_LOCK (viewport); if (viewport->visible == FALSE) { GST_OBJECT_UNLOCK (viewport); return PGM_ERROR_OK; } viewport->visible = FALSE; GST_OBJECT_UNLOCK (viewport); klass = PGM_VIEWPORT_GET_CLASS (viewport); if (klass->hide) ret = klass->hide (viewport); return ret; } /** * pgm_viewport_is_visible: * @viewport: a #PgmViewport object. * @visible: a pointer to a #gboolean where the visible state of the viewport * is going to be stored. * * Retrieves whether @viewport is visible. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_viewport_is_visible (PgmViewport *viewport, gboolean *visible) { g_return_val_if_fail (PGM_IS_VIEWPORT (viewport), PGM_ERROR_X); g_return_val_if_fail (visible != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (viewport); *visible = viewport->visible; GST_OBJECT_UNLOCK (viewport); return PGM_ERROR_OK; } /** * pgm_viewport_set_decorated: * @viewport: a #PgmViewport object. * @decorated: %TRUE to decorate the viewport. * * By default, viewports should be (depending on the plugin) decorated with a * title bar and resize controls. This function allows to disable these * decorations, creating a borderless viewport. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_viewport_set_decorated (PgmViewport *viewport, gboolean decorated) { PgmViewportClass *klass; PgmError ret = PGM_ERROR_OK; g_return_val_if_fail (PGM_IS_VIEWPORT (viewport), PGM_ERROR_X); GST_OBJECT_LOCK (viewport); viewport->decorated = decorated; GST_OBJECT_UNLOCK (viewport); klass = PGM_VIEWPORT_GET_CLASS (viewport); if (klass->set_decorated) ret = klass->set_decorated (viewport, decorated); return ret; } /** * pgm_viewport_get_decorated: * @viewport: a #PgmViewport object. * @decorated: a pointer the a #gboolean where the decorated state will be * stored. * * Retrieves in @decorated whether @viewport is decorated. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_viewport_get_decorated (PgmViewport *viewport, gboolean *decorated) { g_return_val_if_fail (PGM_IS_VIEWPORT (viewport), PGM_ERROR_X); g_return_val_if_fail (decorated != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (viewport); *decorated = viewport->decorated; GST_OBJECT_UNLOCK (viewport); return PGM_ERROR_OK; } /** * pgm_viewport_set_cursor: * @viewport: a #PgmViewport object. * @cursor: the cursor to set. * * Sets @cursor as the current cursor of @viewport. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_viewport_set_cursor (PgmViewport *viewport, PgmViewportCursor cursor) { PgmViewportClass *klass; PgmError ret = PGM_ERROR_OK; g_return_val_if_fail (PGM_IS_VIEWPORT (viewport), PGM_ERROR_X); GST_OBJECT_LOCK (viewport); if (viewport->cursor == cursor) { GST_OBJECT_UNLOCK (viewport); return ret; } viewport->cursor = cursor; GST_OBJECT_UNLOCK (viewport); klass = PGM_VIEWPORT_GET_CLASS (viewport); if (klass->set_cursor) ret = klass->set_cursor (viewport, cursor); return ret; } /** * pgm_viewport_get_cursor: * @viewport: a #PgmViewport object. * @cursor: a pointer #PgmViewportCursor where the @viewport cursor is going * to be stored. * * Retrieves the @cursor of @viewport. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_viewport_get_cursor (PgmViewport *viewport, PgmViewportCursor *cursor) { g_return_val_if_fail (PGM_IS_VIEWPORT (viewport), PGM_ERROR_X); g_return_val_if_fail (cursor != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (viewport); *cursor = viewport->cursor; GST_OBJECT_UNLOCK (viewport); return PGM_ERROR_OK; } /** * pgm_viewport_set_icon: * @viewport: a #PgmViewport object. * @icon: a #GdkPixbuf object to set as icon for @viewport. * * Sets @icon as the current icon of @viewport (shown by the window manager * e.g. when the @viewport window is minimised). * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_viewport_set_icon (PgmViewport *viewport, GdkPixbuf *icon) { PgmViewportClass *klass; PgmError ret = PGM_ERROR_OK; g_return_val_if_fail (PGM_IS_VIEWPORT (viewport), PGM_ERROR_X); GST_OBJECT_LOCK (viewport); if (viewport->icon == icon) { GST_OBJECT_UNLOCK (viewport); return ret; } if (viewport->icon) g_object_unref (viewport->icon); if (icon) viewport->icon = g_object_ref (icon); else viewport->icon = NULL; GST_OBJECT_UNLOCK (viewport); klass = PGM_VIEWPORT_GET_CLASS (viewport); if (klass->set_icon) ret = klass->set_icon (viewport, icon); return ret; } /** * pgm_viewport_get_icon: * @viewport: a #PgmViewport object. * @icon: a double pointer #GdkPixbuf where the @viewport icon is going * to be stored. Unref after usage. * * Retrieves the @icon of @viewport. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_viewport_get_icon (PgmViewport *viewport, GdkPixbuf **icon) { g_return_val_if_fail (PGM_IS_VIEWPORT (viewport), PGM_ERROR_X); g_return_val_if_fail (icon != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (viewport); if (viewport->icon) *icon = g_object_ref (viewport->icon); else *icon = NULL; GST_OBJECT_UNLOCK (viewport); return PGM_ERROR_OK; } /** * pgm_viewport_set_size: * @viewport: a #PgmViewport object. * @width: the viewport width. * @height: the viewport height. * * Sets @viewport size in pixels to (@width,@height). * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_viewport_set_size (PgmViewport *viewport, gint width, gint height) { PgmViewportClass *klass; PgmError ret = PGM_ERROR_X; g_return_val_if_fail (PGM_IS_VIEWPORT (viewport), PGM_ERROR_X); GST_OBJECT_LOCK (viewport); if (viewport->width == width && viewport->height == height) { GST_OBJECT_UNLOCK (viewport); return PGM_ERROR_OK; } viewport->width = MAX (1, width); viewport->height = MAX (1, height); GST_OBJECT_UNLOCK (viewport); klass = PGM_VIEWPORT_GET_CLASS (viewport); if (klass->set_size) ret = klass->set_size (viewport, viewport->width, viewport->height); pgm_viewport_update_projection (viewport); return ret; } /** * pgm_viewport_get_size: * @viewport: a #PgmViewport object. * @width: a pointer to a #gint where the viewport width in pixels is * going to be stored. * @height: a pointer to a #gint where the viewport height in pixels is * going to be stored. * * Retrieves the size (@width,@height) of @viewport in pixels. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_viewport_get_size (PgmViewport *viewport, gint *width, gint *height) { PgmViewportClass *klass; PgmError ret = PGM_ERROR_OK; g_return_val_if_fail (PGM_IS_VIEWPORT (viewport), PGM_ERROR_X); g_return_val_if_fail (width != NULL, PGM_ERROR_X); g_return_val_if_fail (height != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (viewport); *width = viewport->width; *height = viewport->height; GST_OBJECT_UNLOCK (viewport); klass = PGM_VIEWPORT_GET_CLASS (viewport); if (klass->get_size) ret = klass->get_size (viewport, width, height); return ret; } /** * pgm_viewport_set_alpha_blending: * @viewport: a #PgmViewport object. * @alpha_blending: the alpha blending state. * * Enable or disable alpha blending on @viewport. * * The function is useful to improve the rendering performance. For instance * it can make HD video playback in fullscreen smoother, when no blended * drawables need to be drawn over it. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_viewport_set_alpha_blending (PgmViewport *viewport, gboolean alpha_blending) { PgmError ret = PGM_ERROR_OK; PgmViewportClass *klass; g_return_val_if_fail (PGM_IS_VIEWPORT (viewport), PGM_ERROR_X); GST_OBJECT_LOCK (viewport); if (viewport->alpha_blending == alpha_blending) { GST_OBJECT_UNLOCK (viewport); return ret; } viewport->alpha_blending = alpha_blending; GST_OBJECT_UNLOCK (viewport); klass = PGM_VIEWPORT_GET_CLASS (viewport); if (klass->set_alpha_blending) ret = klass->set_alpha_blending (viewport, alpha_blending); return ret; } /** * pgm_viewport_get_alpha_blending: * @viewport: a #PgmViewport object. * @alpha_blending: a pointer to a #gboolean where the alpha blending state * is going to be stored. * * Retrieves in @alpha_blending the alpha blending state of @viewport. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_viewport_get_alpha_blending (PgmViewport *viewport, gboolean *alpha_blending) { g_return_val_if_fail (PGM_IS_VIEWPORT (viewport), PGM_ERROR_X); g_return_val_if_fail (alpha_blending != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (viewport); *alpha_blending = viewport->alpha_blending; GST_OBJECT_UNLOCK (viewport); return PGM_ERROR_OK; } /** * pgm_viewport_set_opacity: * @viewport: a #PgmViewport object. * @opacity: the opacity between 0 and 255. * * Set the opacity of @viewport. * * Note that this function only works if @viewport supports the * #PGM_VIEWPORT_OPACITY capacity. The opacity is considered by compositing * managers for blending with other applications. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_viewport_set_opacity (PgmViewport *viewport, guchar opacity) { PgmError ret = PGM_ERROR_OK; PgmViewportClass *klass; g_return_val_if_fail (PGM_IS_VIEWPORT (viewport), PGM_ERROR_X); GST_OBJECT_LOCK (viewport); viewport->opacity = opacity; GST_OBJECT_UNLOCK (viewport); klass = PGM_VIEWPORT_GET_CLASS (viewport); if (klass->set_opacity) ret = klass->set_opacity (viewport, opacity); return ret; } /** * pgm_viewport_get_opacity: * @viewport: a #PgmViewport object. * @opacity: a pointer to a #guchar where the opacity is going to be stored. * * Retrieves in @opacity the opacity of @viewport. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_viewport_get_opacity (PgmViewport *viewport, guchar *opacity) { g_return_val_if_fail (PGM_IS_VIEWPORT (viewport), PGM_ERROR_X); g_return_val_if_fail (opacity != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (viewport); *opacity = viewport->opacity; GST_OBJECT_UNLOCK (viewport); return PGM_ERROR_OK; } /** * pgm_viewport_set_fullscreen: * @viewport: a #PgmViewport object. * @fullscreen: the fullscreen state. * * Sets/unsets fullscreen mode of @viewport function of @fullscreen. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_viewport_set_fullscreen (PgmViewport *viewport, gboolean fullscreen) { PgmViewportClass *klass; PgmError ret = PGM_ERROR_OK; g_return_val_if_fail (PGM_IS_VIEWPORT (viewport), PGM_ERROR_X); GST_OBJECT_LOCK (viewport); if (viewport->fullscreen == fullscreen) { GST_OBJECT_UNLOCK (viewport); return PGM_ERROR_OK; } viewport->fullscreen = fullscreen; GST_OBJECT_UNLOCK (viewport); klass = PGM_VIEWPORT_GET_CLASS (viewport); if (klass->set_fullscreen) ret = klass->set_fullscreen (viewport, fullscreen); return ret; } /** * pgm_viewport_get_fullscreen: * @viewport: a #PgmViewport object. * @fullscreen: a pointer to a #gboolean where the fullscreen state is going * to be stored. * * Retrieves the fullscreen state of @viewport in @fullscreen. * * MT safe. * * Returns: A #PgmError indicating success/failure. */ PgmError pgm_viewport_get_fullscreen (PgmViewport *viewport, gboolean *fullscreen) { g_return_val_if_fail (PGM_IS_VIEWPORT (viewport), PGM_ERROR_X); g_return_val_if_fail (fullscreen != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (viewport); *fullscreen = viewport->fullscreen; GST_OBJECT_UNLOCK (viewport); return PGM_ERROR_OK; } /** * pgm_viewport_set_iconified: * @viewport: a #PgmViewport object. * @iconified: %TRUE to iconify the viewport. * * Asks to iconify (i.e. minimize) @viewport depending on the @iconified value. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_viewport_set_iconified (PgmViewport *viewport, gboolean iconified) { PgmViewportClass *klass; PgmError ret = PGM_ERROR_OK; g_return_val_if_fail (PGM_IS_VIEWPORT (viewport), PGM_ERROR_X); GST_OBJECT_LOCK (viewport); if (viewport->iconified == iconified) { GST_OBJECT_UNLOCK (viewport); return PGM_ERROR_OK; } viewport->iconified = iconified; GST_OBJECT_UNLOCK (viewport); klass = PGM_VIEWPORT_GET_CLASS (viewport); if (klass->set_iconified) ret = klass->set_iconified (viewport, iconified); return ret; } /** * pgm_viewport_get_iconified: * @viewport: a #PgmViewport object. * @iconified: a pointer the a #gboolean where the iconified state will be * stored. * * Retrieves in @iconified whether @viewport is iconified. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_viewport_get_iconified (PgmViewport *viewport, gboolean *iconified) { g_return_val_if_fail (PGM_IS_VIEWPORT (viewport), PGM_ERROR_X); g_return_val_if_fail (iconified != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (viewport); *iconified = viewport->iconified; GST_OBJECT_UNLOCK (viewport); return PGM_ERROR_OK; } /** * pgm_viewport_focus: * @viewport: a #PgmViewport object. * * Presents @viewport to the user. This may mean raising the window in the * stacking order, deiconifying it and/or giving it the keyboard focus, possibly * dependent on the user's platform, window manager, and preferences. * * Note that if @viewport is hidden, this function calls pgm_viewport_show() as * well. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_viewport_focus (PgmViewport *viewport) { PgmViewportClass *klass; PgmError ret = PGM_ERROR_OK; g_return_val_if_fail (PGM_IS_VIEWPORT (viewport), PGM_ERROR_X); klass = PGM_VIEWPORT_GET_CLASS (viewport); if (klass->focus) ret = klass->focus (viewport); return ret; } /** * pgm_viewport_set_screen_resolution: * @viewport: a #PgmViewport object. * @width: the screen width in pixels. * @height: the screen height in pixels. * * Sets a new resolution (@width,@height) of @viewport in pixels. This is * changing the video mode or the display resolution so you are strongly * encouraged to restore it to original value when exiting. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_viewport_set_screen_resolution (PgmViewport *viewport, gint width, gint height) { PgmViewportClass *klass; PgmError ret = PGM_ERROR_OK; g_return_val_if_fail (PGM_IS_VIEWPORT (viewport), PGM_ERROR_X); klass = PGM_VIEWPORT_GET_CLASS (viewport); if (klass->set_screen_resolution) ret = klass->set_screen_resolution (viewport, width, height); pgm_viewport_update_projection (viewport); return ret; } /** * pgm_viewport_get_screen_resolution: * @viewport: a #PgmViewport object. * @width: a pointer to a #gint where the screen width in pixels is going to be * stored. * @height: a pointer to a #gint where the screen height in pixels is going to * be stored. * * Retrieves the resolution (@width,@height) of @viewport in pixels. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_viewport_get_screen_resolution (PgmViewport *viewport, gint *width, gint *height) { PgmViewportClass *klass; PgmError ret = PGM_ERROR_OK; g_return_val_if_fail (PGM_IS_VIEWPORT (viewport), PGM_ERROR_X); g_return_val_if_fail (width != NULL, PGM_ERROR_X); g_return_val_if_fail (height != NULL, PGM_ERROR_X); klass = PGM_VIEWPORT_GET_CLASS (viewport); if (klass->get_screen_resolution) ret = klass->get_screen_resolution (viewport, width, height); return ret; } /** * pgm_viewport_set_screen_size_mm: * @viewport: a #PgmViewport object. * @width: the screen width in millimeters. * @height: the screen height in millimeters. * * Sets the physical screen size in millimeters. This is used if the @viewport * implementation cannot retrieve that information by itself. You have to * define the physical ratio of the screen so that @viewport can calculate the * pixel aspect ratio. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_viewport_set_screen_size_mm (PgmViewport *viewport, gint width, gint height) { PgmViewportClass *klass; PgmError ret = PGM_ERROR_OK; g_return_val_if_fail (PGM_IS_VIEWPORT (viewport), PGM_ERROR_X); GST_OBJECT_LOCK (viewport); viewport->width_mm = width; viewport->height_mm = height; GST_OBJECT_UNLOCK (viewport); GST_DEBUG_OBJECT (viewport, "forcing screen size to %d mm x %d mm", width, height); klass = PGM_VIEWPORT_GET_CLASS (viewport); if (klass->set_screen_size_mm) ret = klass->set_screen_size_mm (viewport, width, height); pgm_viewport_update_projection (viewport); return ret; } /** * pgm_viewport_get_screen_size_mm: * @viewport: a #PgmViewport object. * @width: a pointer to a #gint where the screen width in millimeters is going * to be stored. * @height: a pointer to a #gint where the screen height in millimeters is going * to be stored. * * Retrieves the physical (@width,@height) size of @viewport in millimeters. * If the plugin can not provide that information it will return -1 as width * and height. In that case the application should provide the screen size * through pgm_viewport_set_screen_size_mm(). * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_viewport_get_screen_size_mm (PgmViewport *viewport, gint *width, gint *height) { PgmViewportClass *klass; PgmError ret = PGM_ERROR_OK; g_return_val_if_fail (PGM_IS_VIEWPORT (viewport), PGM_ERROR_X); g_return_val_if_fail (width != NULL, PGM_ERROR_X); g_return_val_if_fail (height != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (viewport); /* If we have a screen size defined already (cached or forced), we use it */ if (viewport->width_mm != -1 && viewport->height_mm != -1) { *width = viewport->width_mm; *height = viewport->height_mm; GST_OBJECT_UNLOCK (viewport); GST_LOG_OBJECT (viewport, "screen size %dx%d mm (from cache)", *width, *height); } else { GST_OBJECT_UNLOCK (viewport); klass = PGM_VIEWPORT_GET_CLASS (viewport); /* Otherwise we get it from plugin */ if (klass->get_screen_size_mm) ret = klass->get_screen_size_mm (viewport, width, height); /* If it's a valid size we cache it */ if (*width != -1 && *height != -1) { GST_OBJECT_LOCK (viewport); viewport->width_mm = *width; viewport->height_mm = *height; GST_OBJECT_UNLOCK (viewport); GST_LOG_OBJECT (viewport, "caching screen size %dx%d mm", *width, *height); } } return ret; } /** * pgm_viewport_push_event: * @viewport: a #PgmViewport object. * @event: the #PgmEvent to push. * * Push an event in the list. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_viewport_push_event (PgmViewport *viewport, PgmEvent *event) { g_return_val_if_fail (PGM_IS_VIEWPORT (viewport), PGM_ERROR_X); g_return_val_if_fail (event != NULL, PGM_ERROR_X); g_mutex_lock (viewport->event_lock); viewport->event_list = g_list_prepend (viewport->event_list, event); g_mutex_unlock (viewport->event_lock); if (G_LIKELY (viewport->event_watch_up)) { g_io_channel_write_chars (viewport->event_watch->in, "#", 1, NULL, NULL); g_io_channel_flush (viewport->event_watch->in, NULL); } return PGM_ERROR_OK; } /** * pgm_viewport_set_canvas: * @viewport: a #PgmViewport object. * @canvas: the #PgmCanvas to bind. * * Sets the @canvas to be projected by the @viewport. This function increases * the refcount on the canvas. Any previously set canvas on @viewport is * unreffed. If @canvas is NULL, the previously set canvas is unreffed. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_viewport_set_canvas (PgmViewport *viewport, PgmCanvas *canvas) { PgmViewportClass *klass; PgmCanvas *tmp = NULL; PgmError ret = PGM_ERROR_OK; gulong pixel_formats = 0; g_return_val_if_fail (PGM_IS_VIEWPORT (viewport), PGM_ERROR_X); klass = PGM_VIEWPORT_GET_CLASS (viewport); GST_OBJECT_LOCK (viewport); /* Is it the canvas already binded? If yes just return. */ if (viewport->canvas == canvas) { GST_OBJECT_UNLOCK (viewport); return PGM_ERROR_X; } /* Get the viewport pixel formats */ if (klass->get_pixel_formats) { GST_OBJECT_UNLOCK (viewport); klass->get_pixel_formats (viewport, &pixel_formats); GST_OBJECT_LOCK (viewport); } /* If there was a previous canvas */ if (viewport->canvas) { /* Backup the pointer */ tmp = viewport->canvas; /* And update the previous canvas pixel formats mask */ _pgm_canvas_remove_pixel_formats (tmp, pixel_formats); /* Disconnect "size-changed" handler */ g_signal_handler_disconnect (tmp, viewport->canvas_size_handler); } /* If there's a new canvas */ if (canvas) { /* Bind it taking a refcount */ viewport->canvas = gst_object_ref (GST_OBJECT_CAST (canvas)); /* Update the new canvas pixel formats mask */ _pgm_canvas_add_pixel_formats (canvas, pixel_formats); /* Connect "size-changed" handler */ viewport->canvas_size_handler = g_signal_connect (G_OBJECT (canvas), "size-changed", G_CALLBACK (canvas_size_changed_cb), (gpointer) viewport); } else viewport->canvas = NULL; GST_OBJECT_UNLOCK (viewport); /* Let the plugin do what it needs with the canvas */ if (klass->set_canvas) ret = klass->set_canvas (viewport, canvas); /* And then, unref the previous canvas */ if (tmp) gst_object_unref (GST_OBJECT_CAST (tmp)); pgm_viewport_update_projection (viewport); return PGM_ERROR_OK; } /** * pgm_viewport_get_canvas: * @viewport: a #PgmViewport object. * @canvas: a pointer to #PgmCanvas pointer in which the canvas bound to * @viewport is going to be stored. The refcount of canvas is increased. * * Retrieves the current canvas or NULL if there's no canvas bound. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_viewport_get_canvas (PgmViewport *viewport, PgmCanvas **canvas) { g_return_val_if_fail (PGM_IS_VIEWPORT (viewport), PGM_ERROR_X); g_return_val_if_fail (canvas != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (viewport); if (!viewport->canvas) { GST_LOG_OBJECT (viewport, "no canvas bound"); *canvas = NULL; } else *canvas = gst_object_ref (GST_OBJECT_CAST (viewport->canvas)); GST_OBJECT_UNLOCK (viewport); return PGM_ERROR_OK; } /** * pgm_viewport_set_canvas_rotation: * @viewport: a #PgmViewport object. * @rotation: the #PgmViewportRotation rotation type. * * Affects the way @viewport projects its canvas applying the specified @rotation. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_viewport_set_canvas_rotation (PgmViewport *viewport, PgmViewportRotation rotation) { g_return_val_if_fail (PGM_IS_VIEWPORT (viewport), PGM_ERROR_X); GST_OBJECT_LOCK (viewport); switch (rotation) { case PGM_VIEWPORT_ROTATION_NONE: viewport->projection_rotation = 0.0f; break; case PGM_VIEWPORT_ROTATION_90: viewport->projection_rotation = (gfloat) -G_PI / 2.0f; break; case PGM_VIEWPORT_ROTATION_180: viewport->projection_rotation = (gfloat) G_PI; break; case PGM_VIEWPORT_ROTATION_270: viewport->projection_rotation = (gfloat) G_PI / 2.0; break; default: GST_ERROR_OBJECT (viewport, "unknown viewport rotation type"); GST_OBJECT_UNLOCK (viewport); return PGM_ERROR_X; } viewport->rotation = rotation; GST_OBJECT_UNLOCK (viewport); pgm_viewport_update_projection (viewport); return PGM_ERROR_OK; } /** * pgm_viewport_get_canvas_rotation: * @viewport: a #PgmViewport object. * @rotation: a pointer to #PgmViewportRotation where the current rotation * will be stored. * * Retrieves the current @rotation applied by @viewport on its canvas. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_viewport_get_canvas_rotation (PgmViewport *viewport, PgmViewportRotation *rotation) { g_return_val_if_fail (PGM_IS_VIEWPORT (viewport), PGM_ERROR_X); g_return_val_if_fail (rotation != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (viewport); *rotation = viewport->rotation; GST_OBJECT_UNLOCK (viewport); return PGM_ERROR_OK; } /** * pgm_viewport_set_canvas_reflection: * @viewport: a #PgmViewport object. * @reflection: the #PgmViewportReflection reflection type. * * Affects the way @viewport projects its canvas applying the specified * @reflection. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_viewport_set_canvas_reflection (PgmViewport *viewport, PgmViewportReflection reflection) { g_return_val_if_fail (PGM_IS_VIEWPORT (viewport), PGM_ERROR_X); GST_OBJECT_LOCK (viewport); switch (reflection) { case PGM_VIEWPORT_REFLECTION_NONE: viewport->projection_hflip = 1.0f; viewport->projection_vflip = 1.0f; break; case PGM_VIEWPORT_REFLECTION_HORIZONTAL_FLIP: viewport->projection_hflip = -1.0f; viewport->projection_vflip = 1.0f; break; case PGM_VIEWPORT_REFLECTION_VERTICAL_FLIP: viewport->projection_hflip = 1.0f; viewport->projection_vflip = -1.0f; break; default: GST_ERROR_OBJECT (viewport, "unknown viewport reflection type"); GST_OBJECT_UNLOCK (viewport); return PGM_ERROR_X; } viewport->reflection = reflection; GST_OBJECT_UNLOCK (viewport); pgm_viewport_update_projection (viewport); return PGM_ERROR_OK; } /** * pgm_viewport_get_canvas_reflection: * @viewport: a #PgmViewport object. * @reflection: a pointer to #PgmViewportReflection where the current reflection * will be stored. * * Retrieves the current @reflection applied by @viewport on its canvas. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_viewport_get_canvas_reflection (PgmViewport *viewport, PgmViewportReflection *reflection) { g_return_val_if_fail (PGM_IS_VIEWPORT (viewport), PGM_ERROR_X); g_return_val_if_fail (reflection != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (viewport); *reflection = viewport->reflection; GST_OBJECT_UNLOCK (viewport); return PGM_ERROR_OK; } /** * pgm_viewport_set_message_filter: * @viewport: a #PgmViewport object. * @filter: the #GList containing the message types to filter. * * Sets the list of message types filtered by @viewport for the * "win32-message-events" signal. The previously set filter is discarded. A * NULL @filter is equivalent to a void list. The list is copied internally and * have to be freed by the caller. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_viewport_set_message_filter (PgmViewport *viewport, GList *filter) { PgmViewportClass *klass; PgmError ret = PGM_ERROR_OK; g_return_val_if_fail (PGM_IS_VIEWPORT (viewport), PGM_ERROR_X); GST_OBJECT_LOCK (viewport); if (viewport->message_filter) g_list_free (viewport->message_filter); viewport->message_filter = g_list_copy (filter); GST_OBJECT_UNLOCK (viewport); klass = PGM_VIEWPORT_GET_CLASS (viewport); if (klass->set_message_filter) ret = klass->set_message_filter (viewport, filter); return ret; } /** * pgm_viewport_get_message_filter: * @viewport: a #PgmViewport object. * @filter: a pointer to #GList pointer in which the filter list is going to * be stored. g_list_free() after use. * * Retrieves the current list of message types filtered by @viewport. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_viewport_get_message_filter (PgmViewport *viewport, GList **filter) { g_return_val_if_fail (PGM_IS_VIEWPORT (viewport), PGM_ERROR_X); g_return_val_if_fail (filter != NULL, PGM_ERROR_X); GST_OBJECT_LOCK (viewport); *filter = g_list_copy (viewport->message_filter); GST_OBJECT_UNLOCK (viewport); return PGM_ERROR_OK; } /** * pgm_viewport_update_projection: * @viewport: a #PgmViewport object. * * Update the projection. The projection update is done automatically by * Pigment, this function is only useful for plugin that have changed for * instance the size of the viewport, and want to adapt the projection * accordingly. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_viewport_update_projection (PgmViewport *viewport) { PgmCanvas *canvas = viewport->canvas; PgmError ret = PGM_ERROR_X; PgmViewportClass *klass; gint resolution_width = 0; gint resolution_height = 0; gint screen_width = 0; gint screen_height = 0; gfloat tmp; klass = PGM_VIEWPORT_GET_CLASS (viewport); /* Get resolution and screen size */ pgm_viewport_get_screen_resolution (viewport, &resolution_width, &resolution_height); pgm_viewport_get_screen_size_mm (viewport, &screen_width, &screen_height); if (screen_width == 0 || screen_height == 0 \ || resolution_width == 0 || resolution_height == 0) { GST_DEBUG_OBJECT (viewport, "Invalid width/height of screen"); return ret; } GST_OBJECT_LOCK (viewport); /* Get pixel-aspect-ratio function of the resolution and screen size */ viewport->pixel_aspect_ratio = ((gfloat) resolution_width / resolution_height) * ((gfloat) screen_height / screen_width); /* Get the viewport ratio */ viewport->viewport_ratio = (gfloat) viewport->width / viewport->height; /* Get the canvas ratio depending on the requested rotation */ if (viewport->rotation == PGM_VIEWPORT_ROTATION_NONE || viewport->rotation == PGM_VIEWPORT_ROTATION_180) { if (canvas) { tmp = canvas->width * viewport->pixel_aspect_ratio; viewport->canvas_ratio = tmp / canvas->height; } else viewport->canvas_ratio = 4.0f / 3.0f * viewport->pixel_aspect_ratio; } else { if (canvas) { tmp = canvas->height * viewport->pixel_aspect_ratio; viewport->canvas_ratio = tmp / canvas->width; } else viewport->canvas_ratio = 3.0f / 4.0f * viewport->pixel_aspect_ratio; } /* Get the projected position and size */ if (viewport->viewport_ratio >= viewport->canvas_ratio) { tmp = viewport->width - viewport->height * viewport->canvas_ratio; viewport->projected_x = pgm_lrintf (tmp * 0.5f); viewport->projected_y = 0; viewport->projected_width = pgm_lrintf (viewport->width - tmp); viewport->projected_height = viewport->height; } else { tmp = viewport->height - viewport->width / viewport->canvas_ratio; viewport->projected_x = 0; viewport->projected_y = pgm_lrintf (tmp * 0.5f); viewport->projected_width = viewport->width; viewport->projected_height = pgm_lrintf (viewport->height - tmp); } /* Update projection matrices */ if (canvas) { gfloat x_scale, y_scale; GST_OBJECT_LOCK (canvas); /* FIXME: Explanations really needed here... */ pgm_mat4x4_set_from_scalars (viewport->projection, 763.94f, 0.0f, 0.0f, 0.0f, 0.0f, 763.94f, 0.0f, 0.0f, 0.0f, 0.0f, -1.1f, -553.22f, 0.0f, 0.0f, -1.0f, 0.0f); /* Adapt the scaling variables to the requested rotation */ if (viewport->rotation == PGM_VIEWPORT_ROTATION_NONE || viewport->rotation == PGM_VIEWPORT_ROTATION_180) { x_scale = 2.0f / canvas->width; y_scale = 2.0f / canvas->height; canvas->pixel_offset_x = (gfloat) canvas->width / viewport->projected_width; canvas->pixel_offset_y = (gfloat) canvas->height / viewport->projected_height; } else { x_scale = 2.0f / canvas->height; y_scale = 2.0f / canvas->width; canvas->pixel_offset_x = (gfloat) canvas->width / viewport->projected_height; canvas->pixel_offset_y = (gfloat) canvas->height / viewport->projected_width; } /* Adapt the scaling variables to the requested reflection */ x_scale *= viewport->projection_vflip; y_scale *= viewport->projection_hflip; /* Scale the projection to fit the viewport. The projection is flipped * horizontally because the origin is at the upper-left in Pigment. */ pgm_mat4x4_scale_from_scalars (viewport->projection, x_scale, -y_scale, 1.0f); /* Rotate the canvas with the requested angle */ pgm_mat4x4_rotate_z (viewport->projection, viewport->projection_rotation); /* Then finally translate to the upper-left origin */ pgm_mat4x4_translate_from_scalars (viewport->projection, -canvas->width / 2.0f, -canvas->height / 2.0f, -763.9432905087f); /* Store inverse matrix */ pgm_mat4x4_free (viewport->inv_projection); viewport->inv_projection = pgm_mat4x4_inverse (viewport->projection); GST_OBJECT_UNLOCK (canvas); } GST_OBJECT_UNLOCK (viewport); /* Realign the drawables with the grid aligned property set */ if (canvas) _pgm_canvas_update_grid_aligned_drawables (canvas); /* Let the plugin apply the parameters */ if (klass->update_projection) ret = klass->update_projection (viewport); return ret; } /** * pgm_viewport_from_canvas: * @viewport: a #PgmViewport object. * @viewport_x: a gfloat address to store the projected viewport x component. * @viewport_y: a gfloat address to store the projected viewport y component. * @viewport_z: a gfloat address to store the projected viewport z component. * @canvas_x: the canvas x component to project. * @canvas_y: the canvas y component to project. * @canvas_z: the canvas z component to project. * * Retrieves the projection of a 3-components vector in canvas coordinates on * the viewport in a 3-components vector in viewport coordinates. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_viewport_from_canvas (PgmViewport *viewport, gfloat *viewport_x, gfloat *viewport_y, gfloat *viewport_z, gfloat canvas_x, gfloat canvas_y, gfloat canvas_z) { PgmVec4 *viewport_vec, canvas_vec; g_return_val_if_fail (PGM_IS_VIEWPORT (viewport), PGM_ERROR_X); g_return_val_if_fail (viewport->canvas, PGM_ERROR_X); g_return_val_if_fail (viewport_x && viewport_y && viewport_z, PGM_ERROR_X); GST_OBJECT_LOCK (viewport); /* Convert from world (canvas) coordinates to clipping coordinates */ pgm_vec4_set_from_scalars (&canvas_vec, canvas_x, canvas_y, canvas_z, 1.0f); viewport_vec = pgm_mat4x4_multiply_vec4 (viewport->projection, &canvas_vec); /* Perspective divide, convert from clipping coordinates to NDC */ viewport_vec->v[0] /= viewport_vec->v[3]; viewport_vec->v[1] /= viewport_vec->v[3]; viewport_vec->v[2] /= viewport_vec->v[3]; /* Convert from NDC to viewport coordinates */ *viewport_x = (viewport_vec->v[0] + 1.0f) / 2.0f * viewport->projected_width; *viewport_y = (1.0f - viewport_vec->v[1]) / 2.0f * viewport->projected_height; *viewport_z = (viewport_vec->v[2] + 1.0f) / 2.0f; /* And add the position offset */ *viewport_x += viewport->projected_x; *viewport_y += viewport->projected_y; GST_OBJECT_UNLOCK (viewport); pgm_vec4_free (viewport_vec); return PGM_ERROR_OK; } /** * pgm_viewport_to_canvas: * @viewport: a #PgmViewport object. * @canvas_x: a gfloat address to store the unprojected canvas x component. * @canvas_y: a gfloat address to store the unprojected canvas y component. * @canvas_z: a gfloat address to store the unprojected canvas z component. * @viewport_x: the viewport x component to project. * @viewport_y: the viewport y component to project. * @viewport_z: the viewport z component to project. * * Retrieves the projection of a 3-components vector in viewport coordinates on * the viewport in a 3-components vector in canvas coordinates. The z component * of the viewport being clamped in the range [0.0, 1.0]. * * Note that if you want to get a canvas vector with a z coordinates of 0.0f, * you can give -1.0f to @viewport_z. It can be useful when you want to convert * 2d position in viewport coordinates to canvas coordinates. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_viewport_to_canvas (PgmViewport *viewport, gfloat *canvas_x, gfloat *canvas_y, gfloat *canvas_z, gfloat viewport_x, gfloat viewport_y, gfloat viewport_z) { PgmVec4 *canvas_vec, viewport_vec; g_return_val_if_fail (PGM_IS_VIEWPORT (viewport), PGM_ERROR_X); g_return_val_if_fail (viewport->canvas, PGM_ERROR_X); g_return_val_if_fail (canvas_x && canvas_y && canvas_z, PGM_ERROR_X); /* Get canvas coordinates at z zero */ if (viewport_z == -1.0f) viewport_z = DEPTH_ZERO_Z; else viewport_z = CLAMP (viewport_z, 0.0f, 1.0f); GST_OBJECT_LOCK (viewport); /* Remove the position offset */ pgm_vec4_set_from_scalars (&viewport_vec, viewport_x, viewport_y, viewport_z, 1.0f); viewport_vec.v[0] -= viewport->projected_x; viewport_vec.v[1] -= viewport->projected_y; /* Convert from viewport coordinates to clipping coordinates */ viewport_vec.v[0] = ((2.0f * viewport_vec.v[0]) / viewport->projected_width) - 1.0f; viewport_vec.v[1] = 1.0f - ((2.0f * viewport_vec.v[1]) / viewport->projected_height); viewport_vec.v[2] = (2.0f * viewport_vec.v[2]) - 1.0f; /* Convert from clipping coordinates to world (canvas) coordinates */ canvas_vec = pgm_mat4x4_multiply_vec4 (viewport->inv_projection, &viewport_vec); GST_OBJECT_UNLOCK (viewport); /* No guarantee that w is 1, so rescale appropriately */ *canvas_x = canvas_vec->v[0] / canvas_vec->v[3]; *canvas_y = canvas_vec->v[1] / canvas_vec->v[3]; *canvas_z = canvas_vec->v[2] / canvas_vec->v[3]; pgm_vec4_free (canvas_vec); return PGM_ERROR_OK; } /** * pgm_viewport_get_embedding_id: * @viewport: a #PgmViewport object. * @embedding_id: a pointer to a #gulong where the embedding ID is going to * be stored. * * Gets the embedding ID of @viewport. It can be used by other applications * to embed it. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_viewport_get_embedding_id (PgmViewport *viewport, gulong *embedding_id) { PgmViewportClass *klass; PgmError ret = PGM_ERROR_OK; g_return_val_if_fail (PGM_IS_VIEWPORT (viewport), PGM_ERROR_X); g_return_val_if_fail (embedding_id != NULL, PGM_ERROR_X); klass = PGM_VIEWPORT_GET_CLASS (viewport); if (klass->get_embedding_id) ret = klass->get_embedding_id (viewport, embedding_id); return ret; } /** * pgm_viewport_get_pixel_formats: * @viewport: a #PgmViewport object. * @formats_mask: a pointer to a #gulong where the mask of supported * #PgmImagePixelFormat is going to be stored. * * Gets the list of supported pixel formats of @viewport. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_viewport_get_pixel_formats (PgmViewport *viewport, gulong *formats_mask) { PgmViewportClass *klass; PgmError ret = PGM_ERROR_OK; g_return_val_if_fail (PGM_IS_VIEWPORT (viewport), PGM_ERROR_X); g_return_val_if_fail (formats_mask != NULL, PGM_ERROR_X); klass = PGM_VIEWPORT_GET_CLASS (viewport); if (klass->get_pixel_formats) ret = klass->get_pixel_formats (viewport, formats_mask); return ret; } /** * pgm_viewport_get_caps_mask: * @viewport: a #PgmViewport object. * @caps_mask: a pointer to a #gulong where the mask of #PgmViewportCapacity is * going to be stored. * * Retrieves the mask of supported #PgmViewportCapacity. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_viewport_get_caps_mask (PgmViewport *viewport, gulong *caps_mask) { PgmViewportClass *klass; PgmError ret = PGM_ERROR_OK; g_return_val_if_fail (PGM_IS_VIEWPORT (viewport), PGM_ERROR_X); g_return_val_if_fail (caps_mask != NULL, PGM_ERROR_X); klass = PGM_VIEWPORT_GET_CLASS (viewport); if (klass->get_caps_mask) ret = klass->get_caps_mask (viewport, caps_mask); return ret; } /** * pgm_viewport_get_max_texture_size: * @viewport: a #PgmViewport object. * @max_texture_size: a pointer to a #guint32 where the maximum texture size is * going to be stored. * * Retrieves the maximum texture size. * * MT safe. * * Returns: a #PgmError indicating success/failure. **/ PgmError pgm_viewport_get_max_texture_size (PgmViewport *viewport, guint32 *max_texture_size) { PgmViewportClass *klass; PgmError ret = PGM_ERROR_OK; g_return_val_if_fail (PGM_IS_VIEWPORT (viewport), PGM_ERROR_X); g_return_val_if_fail (max_texture_size != NULL, PGM_ERROR_X); klass = PGM_VIEWPORT_GET_CLASS (viewport); if (klass->get_max_texture_size) ret = klass->get_max_texture_size (viewport, max_texture_size); return ret; } /** * pgm_viewport_get_frame_rate: * @viewport: a #PgmViewport object. * @frame_rate: a pointer to a #guint where the frame rate is going to be * stored. * * Retrieves the frame rate in frames per second of the rendering of the * canvas on @viewport. The value retrieved changes each second, and * represents the number of frames that have been rendered in the previous * second. * * That function could be useful to check the rendering performance on a * system, and for instance tell the user if too many frames are dropped. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_viewport_get_frame_rate (PgmViewport *viewport, guint *frame_rate) { PgmViewportClass *klass; PgmError ret = PGM_ERROR_OK; g_return_val_if_fail (PGM_IS_VIEWPORT (viewport), PGM_ERROR_X); g_return_val_if_fail (frame_rate != NULL, PGM_ERROR_X); klass = PGM_VIEWPORT_GET_CLASS (viewport); if (klass->get_frame_rate) ret = klass->get_frame_rate (viewport, frame_rate); return ret; } /** * pgm_viewport_read_pixels: * @viewport: a #PgmViewport object. * @x: the x coordinate of the first pixel to read from the left of @viewport. * @y: the y coordinate of the first pixel to read from the top of @viewport. * @width: the width of the pixel area to read, corresponds to a single pixel. * @height: the height of the pixel area to read, corresponds to a single pixel. * @pixels: a pre-allocated memory area where the pixels read will be written. * The buffer must be freed by the application, in the "pixels-read" signal * callback for instance. * * Requests the reading of a pixel area in @viewport, starting with the pixel * whose top-left corner is at location (@x, @y) and dimension is * (@width, @height). Once the pixel area is obtained, the "pixels-read" signal * is emitted with the requested pixels stored at location @pixels. The * retrieved pixel area is in the RGBA color space. * * @pixels should be allocated by the application with the necessary size * (width * height * 4) before any call to that function. A callback must be * connected to the "pixels-read" signal before any call to that function. * @x, @y, @width and @height are clamped if their values lie outside @viewport * size. * * MT Safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_viewport_read_pixels (PgmViewport *viewport, guint x, guint y, guint width, guint height, guint8 *pixels) { PgmError ret = PGM_ERROR_OK; PgmViewportClass *klass; gulong handler_id; g_return_val_if_fail (PGM_IS_VIEWPORT (viewport), PGM_ERROR_X); g_return_val_if_fail (pixels != NULL, PGM_ERROR_X); /* A callback must be connected to the "pixels-read" signal */ handler_id = g_signal_handler_find (viewport, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_UNBLOCKED, pgm_viewport_signals[PIXELS_READ], 0, NULL, NULL, NULL); g_return_val_if_fail (handler_id, PGM_ERROR_X); GST_OBJECT_LOCK (viewport); /* x and y are clamped to the viewport size */ x = MIN (x, (guint) viewport->width); y = MIN (y, (guint) viewport->height); /* width and height are clamped to the remaining size */ width = MIN (width, viewport->width - x); height = MIN (height, viewport->height - y); GST_OBJECT_UNLOCK (viewport); klass = PGM_VIEWPORT_GET_CLASS (viewport); if (klass->read_pixels) ret = klass->read_pixels (viewport, x, y, width, height, pixels); return ret; } /** * pgm_viewport_push_pixels: * @viewport: a #PgmViewport object. * @width: the width of the pixel area. * @height: the height of the pixel area. * @pixels: the pixels to push. * * Push a pixel area to @viewport. The function will emit the "pixels-read" * signal from the Pigment main loop with the given pixel area parameters. * * A plugin must call this function for each read_pixels() call that does not * return an error, because the user may free the pixel array in the callback * called from there. * * This function should only be used by plugins. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_viewport_push_pixels (PgmViewport *viewport, guint width, guint height, guint8 *pixels) { PixelRectangle *rectangle; g_return_val_if_fail (PGM_IS_VIEWPORT (viewport), PGM_ERROR_X); g_return_val_if_fail (pixels, PGM_ERROR_X); rectangle = g_slice_new (PixelRectangle); if (!rectangle) return PGM_ERROR_X; rectangle->width = width; rectangle->height = height; rectangle->pixels = pixels; g_mutex_lock (viewport->pixel_lock); viewport->pixel_list = g_list_prepend (viewport->pixel_list, rectangle); g_mutex_unlock (viewport->pixel_lock); if (G_LIKELY (viewport->pixel_watch_up)) { g_io_channel_write_chars (viewport->pixel_watch->in, "#", 1, NULL, NULL); g_io_channel_flush (viewport->pixel_watch->in, NULL); } return PGM_ERROR_OK; } /** * pgm_viewport_emit_update_pass: * @viewport: the #PgmViewport object. * * Emits the 'update-pass' signal on @viewport. * * This function should only be used by plugins. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError pgm_viewport_emit_update_pass (PgmViewport *viewport) { g_return_val_if_fail (PGM_IS_VIEWPORT (viewport), PGM_ERROR_X); g_signal_emit (G_OBJECT (viewport), pgm_viewport_signals[UPDATE_PASS], 0); return PGM_ERROR_OK; } /* Protected methods */ #ifdef WIN32 /** * pgm_viewport_push_win32_message: * @viewport: [self] the #PgmViewport object. * @event: [in] the Win32 message event. * @message_processed: [out] the atomically set condition. * @result: [out] the WinProc result. * * Push a Win32 message event in the list, the message_processed condition has * to be atomiocally set once the result value is set so that the caller can * return from the nested WinProc. * * This function should only be used by plugins. * * MT safe. * * Returns: a #PgmError indicating success/failure. */ PgmError _pgm_viewport_push_win32_message (PgmViewport *viewport, PgmEvent *event, gint32 *message_processed, LRESULT *result) { g_return_val_if_fail (PGM_IS_VIEWPORT (viewport), PGM_ERROR_X); g_return_val_if_fail (event != NULL, PGM_ERROR_X); g_return_val_if_fail (message_processed != NULL, PGM_ERROR_X); g_return_val_if_fail (result != NULL, PGM_ERROR_X); if (G_LIKELY (viewport->event_watch_up)) { Win32Message *message; message = g_slice_new (Win32Message); if (!message) return PGM_ERROR_X; message->type = PGM_WIN32_MESSAGE; message->event = event; message->message_processed = message_processed; message->result = result; g_mutex_lock (viewport->event_lock); viewport->event_list = g_list_prepend (viewport->event_list, message); g_mutex_unlock (viewport->event_lock); g_io_channel_write_chars (viewport->event_watch->in, "#", 1, NULL, NULL); g_io_channel_flush (viewport->event_watch->in, NULL); } else { *result = 0; g_atomic_int_set (message_processed, 1); } return PGM_ERROR_OK; } #endif /* WIN32 */ pigment-0.3.17/pgm/pgmversion.h0000644000175000017500000000373311205034713013315 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment media rendering library * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ /** * SECTION:pgmversion * @short_description: Pigment version macros. * * You can use the macros to keep the Pigment version information in * your application. * * Use the pgm_version() function if you want to know which version of * Pigment you are currently linked against. * * The version macros get defined by including "pgm/pgm.h". * * Last reviewed on 2007-04-12 (0.1.5) */ #ifndef __PGM_VERSION_H__ #define __PGM_VERSION_H__ #include G_BEGIN_DECLS /** * PGM_VERSION_MAJOR: * * The major version of Pigment at compile time. */ #define PGM_VERSION_MAJOR (0) /** * PGM_VERSION_MINOR: * * The minor version of Pigment at compile time. */ #define PGM_VERSION_MINOR (3) /** * PGM_VERSION_MICRO: * * The micro version of Pigment at compile time. */ #define PGM_VERSION_MICRO (17) /** * PGM_VERSION_NANO: * * The nano version of Pigment at compile time. Actual releases have 0, * Subversion versions have 1, prerelease versions have [2-n]. */ #define PGM_VERSION_NANO (0) G_END_DECLS #endif /* __PGM_VERSION_H__ */ pigment-0.3.17/pgm/pgmcommon.c0000644000175000017500000000255511205034416013114 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment media rendering library * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author(s): Loïc Molinari */ /** * SECTION:pgmcommon * @short_description: Various functions used for common tasks. * * Various functions used by Pigment for common tasks. * * Last reviewed on 2009-05-07 (0.3.16) */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include "pgmcommon.h" #if defined (_MSC_VER) gint32 pgm_lrintf (gfloat x) { gint32 i; __asm { fld x fistp i } return i; } #endif /* defined (WIN32) */ pigment-0.3.17/pgm/pgmdrawable.h0000644000175000017500000005577211205034416013423 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment media rendering library * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author(s): Loïc Molinari * Julien Moutte */ #ifndef __PGM_DRAWABLE_H__ #define __PGM_DRAWABLE_H__ #include #include "pgmcommon.h" #include "pgmlinearalgebra.h" #include "pgmevents.h" G_BEGIN_DECLS #define PGM_TYPE_DRAWABLE \ (pgm_drawable_get_type ()) #define PGM_DRAWABLE(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), PGM_TYPE_DRAWABLE, PgmDrawable)) #define PGM_DRAWABLE_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), PGM_TYPE_DRAWABLE, PgmDrawableClass)) #define PGM_IS_DRAWABLE(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), PGM_TYPE_DRAWABLE)) #define PGM_IS_DRAWABLE_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), PGM_TYPE_DRAWABLE)) #define PGM_DRAWABLE_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS((obj), PGM_TYPE_DRAWABLE, PgmDrawableClass)) typedef struct _PgmDrawable PgmDrawable; typedef struct _PgmDrawableClass PgmDrawableClass; /** * PgmDrawableLayer: * @PGM_DRAWABLE_UNBOUND: Not bound to a #Canvas. * @PGM_DRAWABLE_FAR: Layer of drawables drawn behind the other layers. * @PGM_DRAWABLE_MIDDLE: Layer of drawables drawn over the drawables in the * far layer and behind the drawables in the near one. * @PGM_DRAWABLE_NEAR: Layer of drawables drawn over the other layers. * * The rendering layers. */ typedef enum { PGM_DRAWABLE_UNBOUND, PGM_DRAWABLE_FAR, PGM_DRAWABLE_MIDDLE, PGM_DRAWABLE_NEAR } PgmDrawableLayer; /* FIXME: These are not all properties (esp. PGM_DRAWABLE_REGENERATE), could be * an idea to change the name from property to something else * (operation?) */ /** * PgmDrawableProperty: * @PGM_DRAWABLE_VISIBILITY: %PgmDrawable visibility property. * @PGM_DRAWABLE_SIZE: %PgmDrawable size property. * @PGM_DRAWABLE_POSITION: %PgmDrawable position property. * @PGM_DRAWABLE_TRANSFORMATION_MATRIX: %PgmDrawable transformation matrix * property. * @PGM_DRAWABLE_BG_COLOR: %PgmDrawable background color property. * @PGM_DRAWABLE_FG_COLOR: %PgmDrawable foreground color property. * @PGM_DRAWABLE_OPACITY: %PgmDrawable opacity property. * @PGM_DRAWABLE_REGENERATE: %PgmDrawable regenerate property. * @PGM_IMAGE_DATA_FILE: %PgmImage file data property. * @PGM_IMAGE_DATA_BUFFER: %PgmImage buffer data property. * @PGM_IMAGE_DATA_GST_BUFFER: %PgmImage GstBuffer data property. * @PGM_IMAGE_DATA_PIXBUF: %PgmImage GdkPixbuf data property. * @PGM_IMAGE_DATA_SYSTEM_BUFFER: %PgmImage system buffer data property. * @PGM_IMAGE_DATA_IMAGE: %PgmImage image data property. * @PGM_IMAGE_DATA_EMPTY: %PgmImage empty data property. * @PGM_IMAGE_SYSTEM_BUFFER_CONTENT: %PgmImage system buffer content property. * @PGM_IMAGE_MAPPING_MATRIX: %PgmImage mapping matrix data property. * @PGM_IMAGE_ALIGNMENT: %PgmImage alignment property. * @PGM_IMAGE_LAYOUT: %PgmImage layout property. * @PGM_IMAGE_INTERP: %PgmImage interpolation property. * @PGM_IMAGE_WRAPPING: %PgmImage wrapping property. * @PGM_IMAGE_ASPECT_RATIO: %PgmImage aspect-ratio property. * @PGM_IMAGE_BORDER_WIDTH: %PgmImage border width property. * @PGM_IMAGE_BORDER_INNER_COLOR: %PgmImage border inner color property. * @PGM_IMAGE_BORDER_OUTER_COLOR: %PgmImage border outer color property. * @PGM_TEXT_LABEL: %PgmText label property. * @PGM_TEXT_MARKUP: %PgmText markup property. * @PGM_TEXT_FONT_FAMILY: %PgmText font family property. * @PGM_TEXT_HEIGHT: %PgmText height property. * @PGM_TEXT_ELLIPSIZE: %PgmText ellipsize property. * @PGM_TEXT_JUSTIFY: %PgmText justify property. * @PGM_TEXT_ALIGNMENT: %PgmText alignment property. * @PGM_TEXT_WRAP: %PgmText wrap property. * @PGM_TEXT_GRAVITY: %PgmText gravity property. * @PGM_TEXT_STRETCH: %PgmText stretch property. * @PGM_TEXT_STYLE: %PgmText style property. * @PGM_TEXT_VARIANT: %PgmText variant property. * @PGM_TEXT_WEIGHT: %PgmText weight property. * @PGM_TEXT_MULTILINE: %PgmText multiline property. * @PGM_TEXT_LINE_SPACING: %PgmText line spacing property. * @PGM_TEXT_COLOR: %PgmText color property. * @PGM_TEXT_OUTLINE_COLOR: %PgmText outline color property. * @PGM_TEXT_OUTLINE_WIDTH: %PgmText outline width property. * @PGM_TEXT_CAST_SHADOW: %PgmText cast shadow property. * @PGM_TEXT_SHADOW_POSITION: %PgmText shadow position property. * @PGM_TEXT_SHADOW_COLOR: %PgmText shadow color. * * The different properties of the drawables. */ typedef enum { /* PgmDrawable properties */ PGM_DRAWABLE_VISIBILITY = 0, PGM_DRAWABLE_SIZE = 1, PGM_DRAWABLE_POSITION = 2, PGM_DRAWABLE_TRANSFORMATION_MATRIX = 3, PGM_DRAWABLE_BG_COLOR = 4, PGM_DRAWABLE_FG_COLOR = 5, PGM_DRAWABLE_OPACITY = 6, PGM_DRAWABLE_REGENERATE = 7, /* PgmImage properties */ PGM_IMAGE_DATA_FILE = 8, PGM_IMAGE_DATA_BUFFER = 9, PGM_IMAGE_DATA_GST_BUFFER = 10, PGM_IMAGE_DATA_PIXBUF = 11, PGM_IMAGE_DATA_SYSTEM_BUFFER = 12, PGM_IMAGE_DATA_IMAGE = 13, PGM_IMAGE_DATA_EMPTY = 14, PGM_IMAGE_SYSTEM_BUFFER_CONTENT = 15, PGM_IMAGE_MAPPING_MATRIX = 16, PGM_IMAGE_ALIGNMENT = 17, PGM_IMAGE_LAYOUT = 18, PGM_IMAGE_INTERP = 19, PGM_IMAGE_WRAPPING = 20, PGM_IMAGE_ASPECT_RATIO = 21, PGM_IMAGE_BORDER_WIDTH = 22, PGM_IMAGE_BORDER_INNER_COLOR = 23, PGM_IMAGE_BORDER_OUTER_COLOR = 24, /* PgmText properties */ PGM_TEXT_LABEL = 25, PGM_TEXT_MARKUP = 26, PGM_TEXT_FONT_FAMILY = 27, PGM_TEXT_HEIGHT = 28, PGM_TEXT_ELLIPSIZE = 29, PGM_TEXT_JUSTIFY = 30, PGM_TEXT_ALIGNMENT = 31, PGM_TEXT_WRAP = 32, PGM_TEXT_GRAVITY = 33, PGM_TEXT_STRETCH = 34, PGM_TEXT_STYLE = 35, PGM_TEXT_VARIANT = 36, PGM_TEXT_WEIGHT = 37, PGM_TEXT_MULTILINE = 38, PGM_TEXT_LINE_SPACING = 39, PGM_TEXT_COLOR = 40, PGM_TEXT_OUTLINE_COLOR = 41, PGM_TEXT_OUTLINE_WIDTH = 42, PGM_TEXT_CAST_SHADOW = 43, PGM_TEXT_SHADOW_POSITION = 44, PGM_TEXT_SHADOW_COLOR = 45 } PgmDrawableProperty; /** * PgmDrawableFlags: * @PGM_DRAWABLE_FLAG_UNPARENTING: Child is being removed from the parent * canvas. pgm_canvas_del_drawable() on a child already being removed * immediately returns %FALSE. * @PGM_DRAWABLE_FLAG_VISIBLE: Drawable is visible. * @PGM_DRAWABLE_FLAG_LAST: Offset to define more flags. * * The standard flags that a drawable may have. */ typedef enum { PGM_DRAWABLE_FLAG_UNPARENTING = (GST_OBJECT_FLAG_LAST << 0), PGM_DRAWABLE_FLAG_VISIBLE = (GST_OBJECT_FLAG_LAST << 1), /* padding */ PGM_DRAWABLE_FLAG_LAST = (GST_OBJECT_FLAG_LAST << 16) } PgmDrawableFlags; /** * PgmDrawablePickingSignal: * @PGM_DRAWABLE_PICKING_PRESSED: Pressed signal flag. * @PGM_DRAWABLE_PICKING_PRESSURED: Pressured signal flag. * @PGM_DRAWABLE_PICKING_RELEASED: Released signal flag. * @PGM_DRAWABLE_PICKING_CLICKED: Clicked signal flag. * @PGM_DRAWABLE_PICKING_DOUBLE_CLICKED: Double-clicked signal flag. * @PGM_DRAWABLE_PICKING_DRAG_BEGIN: Drag-begin signal flag. * @PGM_DRAWABLE_PICKING_DRAG_MOTION: Drag-motion signal flag. * @PGM_DRAWABLE_PICKING_DRAG_END: Drag-end signal flag. * @PGM_DRAWABLE_PICKING_ENTERED: Entered signal flag. * @PGM_DRAWABLE_PICKING_SCROLLED: Scrolled signal flag. * @PGM_DRAWABLE_PICKING_MOTION: Motion signal flag. * @PGM_DRAWABLE_PICKING_MASK: Mask covering all the flags. * * The mouse picking flags internally used by #PgmViewport. */ typedef enum { PGM_DRAWABLE_PICKING_PRESSED = (1 << 0), PGM_DRAWABLE_PICKING_PRESSURED = (1 << 1), PGM_DRAWABLE_PICKING_RELEASED = (1 << 2), PGM_DRAWABLE_PICKING_CLICKED = (1 << 3), PGM_DRAWABLE_PICKING_DOUBLE_CLICKED = (1 << 4), PGM_DRAWABLE_PICKING_DRAG_BEGIN = (1 << 5), PGM_DRAWABLE_PICKING_DRAG_MOTION = (1 << 6), PGM_DRAWABLE_PICKING_DRAG_END = (1 << 7), PGM_DRAWABLE_PICKING_ENTERED = (1 << 8), PGM_DRAWABLE_PICKING_SCROLLED = (1 << 9), PGM_DRAWABLE_PICKING_MOTION = (1 << 10), PGM_DRAWABLE_PICKING_MASK = 0x7FF } PgmDrawablePickingSignal; /** * PgmDrawable: * @transformation_matrix: the drawable transformation matrix. * @angle_x: the drawable angle of rotation on the x axis. * @angle_y: the drawable angle of rotation on the y axis. * @angle_z: the drawable angle of rotation on the z axis. * @layer: the layer the drawable belongs to. * @x: the drawable position on the x axis. * @y: the drawable position on the y axis. * @z: the drawable position on the z axis. * @orig_x: the drawable original position on the x axis. * @orig_y: the drawable original position on the y axis. * @width: the drawable width. * @height: the drawable height. * @orig_width: the drawable original width. * @orig_height: the drawable original height. * @grid_aligned: the grid aligned boolean. * @scale: the drawable scale factor. * @fg_r: the drawable foreground red color component. * @fg_g: the drawable foreground green color component. * @fg_b: the drawable foreground blue color component. * @fg_a: the drawable foreground alpha color component. * @bg_r: the drawable background red color component. * @bg_g: the drawable background green color component. * @bg_b: the drawable background blue color component. * @bg_a: the drawable background alpha color component. * @opacity: the drawable opacity. * * Pigment drawable abstract base class. */ struct _PgmDrawable { GstObject parent; /*< public >*/ /* Transformation */ PgmMat4x4 *transformation_matrix; gfloat angle_x, angle_y, angle_z; /* Layer */ PgmDrawableLayer layer; /* Position */ gfloat x, y, z; gfloat orig_x, orig_y; /* Scale */ gfloat scale; /* Size */ gfloat width, height; gfloat orig_width, orig_height; gboolean grid_aligned; /* Colors */ guchar fg_r, fg_g, fg_b, fg_a; guchar bg_r, bg_g, bg_b, bg_a; /* Opacity */ guchar opacity; /*< private >*/ /* Position and orientation of the drawable */ PgmVec3 origin; PgmVec3 plane_vector_i; PgmVec3 plane_vector_j; /* Mouse picking */ PgmVec3 press_point; PgmVec3 viewport_press_point; guint32 pressure; guint32 release_time; gboolean mouse_over; guint16 drag_mask; guint16 press_mask; guint16 release_button; guchar drag_distance; /* Flags */ guint8 flags; }; /** * PgmDrawableClass: * @parent_class: the parent class structure. * @changed: the "changed" signal. * @pressed: the "pressed" signal. * @pressured: the "pressured" signal. * @released: the "released" signal. * @clicked: the "clicked" signal. * @double_clicked: the "double-clicked" signal. * @scrolled: the "scrolled" signal. * @drag_begin: the "drag-begin" signal. * @drag_motion: the "drag-motion" signal. * @drag_end: the "drag-end" signal. * @motion: the "motion" signal. * @entered: the "entered" signal. * @left: the "left" signal. * @hide: the hide virtual method. * @show: the show virtual method. * @set_size: the set_size virtual method. * @set_position: the set_position virtual method. * @set_fg_color: the set_fg_color virtual method. * @set_bg_color: the set_bg_color virtual method. * @set_opacity: the set_opacity virtual method. * * The #PgmDrawable structure. */ struct _PgmDrawableClass { GstObjectClass parent_class; /*< public >*/ /* Signals */ void (*changed) (PgmDrawable *drawable, PgmDrawableProperty property); gboolean (*pressed) (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, PgmButtonType button, guint32 time, guint32 pressure); gboolean (*pressured) (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, PgmButtonType button, guint32 time, guint32 pressure); gboolean (*released) (PgmDrawable *drawable, PgmButtonType button, guint32 time); gboolean (*clicked) (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, PgmButtonType button, guint32 time, guint32 pressure); gboolean (*double_clicked) (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, PgmButtonType button, guint32 time); gboolean (*scrolled) (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, PgmScrollDirection direction, guint32 time); gboolean (*drag_begin) (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, PgmButtonType button, guint32 time, guint32 pressure); gboolean (*drag_motion) (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, PgmButtonType button, guint32 time, guint32 pressure); gboolean (*drag_end) (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, PgmButtonType button, guint32 time); gboolean (*motion) (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, guint32 time); gboolean (*entered) (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, guint32 time); gboolean (*left) (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, guint32 time); /* virtual methods for subclasses */ PgmError (*hide) (PgmDrawable *drawable); PgmError (*show) (PgmDrawable *drawable); PgmError (*set_size) (PgmDrawable *drawable, gfloat width, gfloat height); PgmError (*set_position) (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z); PgmError (*set_fg_color) (PgmDrawable *drawable, guchar r, guchar g, guchar b, guchar a); PgmError (*set_bg_color) (PgmDrawable *drawable, guchar r, guchar g, guchar b, guchar a); PgmError (*set_opacity) (PgmDrawable *drawable, guchar opacity); }; GType pgm_drawable_get_type (void); PgmError pgm_drawable_hide (PgmDrawable *drawable); PgmError pgm_drawable_show (PgmDrawable *drawable); PgmError pgm_drawable_is_visible (PgmDrawable *drawable, gboolean *visible); PgmError pgm_drawable_set_size (PgmDrawable *drawable, gfloat width, gfloat height); PgmError pgm_drawable_get_size (PgmDrawable *drawable, gfloat *width, gfloat *height); PgmError pgm_drawable_set_position (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z); PgmError pgm_drawable_get_position (PgmDrawable *drawable, gfloat *x, gfloat *y, gfloat *z); PgmError pgm_drawable_set_rotation_x (PgmDrawable *drawable, gfloat angle); PgmError pgm_drawable_get_rotation_x (PgmDrawable *drawable, gfloat *angle); PgmError pgm_drawable_set_rotation_y (PgmDrawable *drawable, gfloat angle); PgmError pgm_drawable_get_rotation_y (PgmDrawable *drawable, gfloat *angle); PgmError pgm_drawable_set_rotation_z (PgmDrawable *drawable, gfloat angle); PgmError pgm_drawable_get_rotation_z (PgmDrawable *drawable, gfloat *angle); PgmError pgm_drawable_set_scale (PgmDrawable *drawable, gfloat scale); PgmError pgm_drawable_get_scale (PgmDrawable *drawable, gfloat *scale); PgmError pgm_drawable_set_fg_color (PgmDrawable *drawable, guchar r, guchar g, guchar b, guchar a); PgmError pgm_drawable_get_fg_color (PgmDrawable *drawable, guchar *r, guchar *g, guchar *b, guchar *a); PgmError pgm_drawable_set_bg_color (PgmDrawable *drawable, guchar r, guchar g, guchar b, guchar a); PgmError pgm_drawable_get_bg_color (PgmDrawable *drawable, guchar *r, guchar *g, guchar *b, guchar *a); PgmError pgm_drawable_set_opacity (PgmDrawable *drawable, guchar opacity); PgmError pgm_drawable_get_opacity (PgmDrawable *drawable, guchar *opacity); PgmError pgm_drawable_set_grid_aligned (PgmDrawable *drawable, gboolean aligned); PgmError pgm_drawable_get_grid_aligned (PgmDrawable *drawable, gboolean *aligned); PgmError pgm_drawable_set_drag_distance (PgmDrawable *drawable, guchar distance); PgmError pgm_drawable_get_drag_distance (PgmDrawable *drawable, guchar *distance); PgmError pgm_drawable_regenerate (PgmDrawable *drawable); PgmError pgm_drawable_from_canvas (PgmDrawable *drawable, gfloat *x_drawable, gfloat *y_drawable, gfloat x_canvas, gfloat y_canvas, gfloat z_canvas); PgmError pgm_drawable_to_canvas (PgmDrawable *drawable, gfloat *x_canvas, gfloat *y_canvas, gfloat *z_canvas, gfloat x_drawable, gfloat y_drawable); /* Protected methods */ void _pgm_drawable_emit_changed (PgmDrawable *drawable, PgmDrawableProperty property); void _pgm_drawable_do_press_event (PgmDrawable *drawable, PgmEventButton *event, PgmVec3 *p1, PgmVec3 *p2, guint16 *emission_mask); void _pgm_drawable_do_pressure_event (PgmDrawable *drawable, PgmEventButton *event, PgmVec3 *p1, PgmVec3 *p2, guint16 *emission_mask); void _pgm_drawable_do_release_event (PgmDrawable *drawable, PgmEventButton *event, PgmVec3 *p1, PgmVec3 *p2, guint16 *emission_mask); void _pgm_drawable_do_motion_event (PgmDrawable *drawable, PgmEventMotion *event, PgmVec3 *p1, PgmVec3 *p2, guint16 *emission_mask); void _pgm_drawable_do_scroll_event (PgmDrawable *drawable, PgmEventScroll *event, PgmVec3 *p1, PgmVec3 *p2, guint16 *emission_mask); G_END_DECLS #endif /* __PGM_DRAWABLE_H__ */ pigment-0.3.17/common/0000777000175000017500000000000011205035135011535 500000000000000pigment-0.3.17/common/check.mak0000644000175000017500000001050011205034417013216 00000000000000clean-local-check: for i in `find . -name ".libs" -type d`; do \ rm -rf $$i; \ done if HAVE_VALGRIND # hangs spectacularly on some machines, so let's not do this by default yet check-valgrind: make valgrind else check-valgrind: @true endif LOOPS = 10 # run any given test by running make test.check # if the test fails, run it again at at least debug level 2 %.check: % @$(TESTS_ENVIRONMENT) \ CK_DEFAULT_TIMEOUT=20 \ $* || \ $(TESTS_ENVIRONMENT) \ GST_DEBUG=$$GST_DEBUG,*:2 \ CK_DEFAULT_TIMEOUT=20 \ $* # run any given test in a loop %.torture: % @for i in `seq 1 $(LOOPS)`; do \ $(TESTS_ENVIRONMENT) \ CK_DEFAULT_TIMEOUT=20 \ $*; done # run any given test in an infinite loop %.forever: % @while true; do \ $(TESTS_ENVIRONMENT) \ CK_DEFAULT_TIMEOUT=20 \ $* || break; done # valgrind any given test by running make test.valgrind %.valgrind: % $(TESTS_ENVIRONMENT) \ CK_DEFAULT_TIMEOUT=360 \ G_SLICE=always-malloc \ libtool --mode=execute \ $(VALGRIND_PATH) -q \ $(foreach s,$(SUPPRESSIONS),--suppressions=$(s)) \ --tool=memcheck --leak-check=full --trace-children=yes \ --leak-resolution=high --num-callers=20 \ ./$* 2>&1 | tee valgrind.log @if grep "==" valgrind.log > /dev/null 2>&1; then \ rm valgrind.log; \ exit 1; \ fi @rm valgrind.log # valgrind any given test and generate suppressions for it %.valgrind.gen-suppressions: % $(TESTS_ENVIRONMENT) \ CK_DEFAULT_TIMEOUT=60 \ libtool --mode=execute \ $(VALGRIND_PATH) -q \ $(foreach s,$(SUPPRESSIONS),--suppressions=$(s)) \ --tool=memcheck --leak-check=full --trace-children=yes \ --leak-resolution=high --num-callers=20 \ --gen-suppressions=all \ ./$* 2>&1 | tee suppressions.log # valgrind any given test until failure by running make test.valgrind-forever %.valgrind-forever: % @while make $*.valgrind; do \ true; done # gdb any given test by running make test.gdb %.gdb: % $(TESTS_ENVIRONMENT) \ CK_FORK=no \ libtool --mode=execute \ gdb $* # torture tests torture: $(TESTS) -rm test-registry.xml @echo "Torturing tests ..." for i in `seq 1 $(LOOPS)`; do \ make check || \ (echo "Failure after $$i runs"; exit 1) || \ exit 1; \ done @banner="All $(LOOPS) loops passed"; \ dashes=`echo "$$banner" | sed s/./=/g`; \ echo $$dashes; echo $$banner; echo $$dashes # forever tests forever: $(TESTS) -rm test-registry.xml @echo "Forever tests ..." while true; do \ make check || \ (echo "Failure"; exit 1) || \ exit 1; \ done # valgrind all tests valgrind: $(TESTS) @echo "Valgrinding tests ..." @failed=0; \ for t in $(filter-out $(VALGRIND_TESTS_DISABLE),$(TESTS)); do \ make $$t.valgrind; \ if test "$$?" -ne 0; then \ echo "Valgrind error for test $$t"; \ failed=`expr $$failed + 1`; \ whicht="$$whicht $$t"; \ fi; \ done; \ if test "$$failed" -ne 0; then \ echo "$$failed tests had leaks or errors under valgrind:"; \ echo "$$whicht"; \ false; \ fi # inspect every plugin feature GST_INSPECT = $(GST_TOOLS_DIR)/gst-inspect-$(GST_MAJORMINOR) inspect: @echo "Inspecting features ..." for e in `$(TESTS_ENVIRONMENT) $(GST_INSPECT) | head -n -2 \ | cut -d: -f2`; \ do echo Inspecting $$e; \ $(GST_INSPECT) $$e > /dev/null 2>&1; done help: @echo "make check -- run all checks" @echo "make torture -- run all checks $(LOOPS) times" @echo "make (dir)/(test).check -- run the given check once" @echo "make (dir)/(test).forever -- run the given check forever" @echo "make (dir)/(test).torture -- run the given check $(LOOPS) times" @echo @echo "make (dir)/(test).gdb -- start up gdb for the given test" @echo @echo "make valgrind -- valgrind all tests" @echo "make (dir)/(test).valgrind -- valgrind the given test" @echo "make (dir)/(test).valgrind-forever -- valgrind the given test forever" @echo "make (dir)/(test).valgrind.gen-suppressions -- generate suppressions" @echo " and save to suppressions.log" @echo "make inspect -- inspect all plugin features" pigment-0.3.17/common/m4/0000777000175000017500000000000011205035132012052 500000000000000pigment-0.3.17/common/m4/as-version.m40000644000175000017500000000376411205034417014335 00000000000000dnl as-version.m4 0.2.0 dnl autostars m4 macro for versioning dnl Thomas Vander Stichele dnl $Id: as-version.m4,v 1.4 2004/06/01 09:40:05 thomasvs Exp $ dnl AS_VERSION dnl example dnl AS_VERSION dnl this macro dnl - AC_SUBST's PACKAGE_VERSION_MAJOR, _MINOR, _MICRO dnl - AC_SUBST's PACKAGE_VERSION_RELEASE, dnl which can be used for rpm release fields dnl - doesn't call AM_INIT_AUTOMAKE anymore because it prevents dnl maintainer mode from running correctly dnl dnl don't forget to put #undef PACKAGE_VERSION_RELEASE in acconfig.h dnl if you use acconfig.h AC_DEFUN([AS_VERSION], [ PACKAGE_VERSION_MAJOR=`echo AC_PACKAGE_VERSION | cut -d'.' -f1` PACKAGE_VERSION_MINOR=`echo AC_PACKAGE_VERSION | cut -d'.' -f2` PACKAGE_VERSION_MICRO=`echo AC_PACKAGE_VERSION | cut -d'.' -f3` AC_SUBST(PACKAGE_VERSION_MAJOR) AC_SUBST(PACKAGE_VERSION_MINOR) AC_SUBST(PACKAGE_VERSION_MICRO) ]) dnl AS_NANO(ACTION-IF-NO-NANO, [ACTION-IF-NANO]) dnl requires AC_INIT to be called before dnl For projects using a fourth or nano number in your versioning to indicate dnl development or prerelease snapshots, this macro allows the build to be dnl set up differently accordingly. dnl this macro: dnl - parses AC_PACKAGE_VERSION, set by AC_INIT, and extracts the nano number dnl - sets the variable PACKAGE_VERSION_NANO dnl - sets the variable PACKAGE_VERSION_RELEASE, which can be used dnl for rpm release fields dnl - executes ACTION-IF-NO-NANO or ACTION-IF-NANO dnl example: dnl AS_NANO(RELEASE="yes", RELEASE="no") AC_DEFUN([AS_NANO], [ AC_MSG_CHECKING(nano version) NANO=`echo AC_PACKAGE_VERSION | cut -d'.' -f4` if test x"$NANO" = x || test "x$NANO" = "x0" ; then AC_MSG_RESULT([0 (release)]) NANO=0 PACKAGE_VERSION_RELEASE=1 ifelse([$1], , :, [$1]) else AC_MSG_RESULT($NANO) PACKAGE_VERSION_RELEASE=0.`date +%Y%m%d.%H%M%S` ifelse([$2], , :, [$2]) fi PACKAGE_VERSION_NANO=$NANO AC_SUBST(PACKAGE_VERSION_NANO) AC_SUBST(PACKAGE_VERSION_RELEASE) ]) pigment-0.3.17/common/m4/libtool.m40000644000175000017500000077426611205034654013732 00000000000000# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) # serial 56 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. m4_defun([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl _LT_PROG_ECHO_BACKSLASH case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from `configure', and `config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # `config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain="$ac_aux_dir/ltmain.sh" ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the `libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to `config.status' so that its # declaration there will have the same value as in `configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "X$" | $Xsed -e "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags="_LT_TAGS"dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the `libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into `config.status', and then the shell code to quote escape them in # for loops in `config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Fix-up fallback echo if it was mangled by the above quoting rules. case \$lt_ECHO in *'\\\[$]0 --fallback-echo"')dnl " lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` ;; esac _LT_OUTPUT_LIBTOOL_INIT ]) # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) cat >"$CONFIG_LT" <<_LTEOF #! $SHELL # Generated by $as_me. # Run this file to recreate a libtool stub with the current configuration. lt_cl_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ \`$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2008 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test $[#] != 0 do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try \`$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try \`$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. if test "$no_create" != yes; then lt_cl_success=: test "$silent" = yes && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) fi ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # _LT_COPYING _LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) _LT_PROG_XSI_SHELLFNS sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES # -------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(whole_archive_flag_spec, $1)='' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=echo _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" m4_if([$1], [CXX], [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX # ----------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl AC_LINK_IFELSE(AC_LANG_PROGRAM,[ lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], [AC_DIVERT_PUSH(NOTICE)]) $1 AC_DIVERT_POP ])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Add some code to the start of the generated configure script which # will find an echo command which doesn't interpret backslashes. m4_defun([_LT_PROG_ECHO_BACKSLASH], [_LT_SHELL_INIT([ # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$lt_ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;; esac ECHO=${lt_ECHO-echo} if test "X[$]1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X[$]1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then # Yippee, $ECHO works! : else # Restart under the correct shell. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} fi if test "X[$]1" = X--fallback-echo; then # used as fallback echo shift cat <<_LT_EOF [$]* _LT_EOF exit 0 fi # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test -z "$lt_ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if { echo_test_string=`eval $cmd`; } 2>/dev/null && { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null then break fi done fi if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$ECHO" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. ECHO='print -r' elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} else # Try using printf. ECHO='printf %s\n' if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL ECHO="$CONFIG_SHELL [$]0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$CONFIG_SHELL [$]0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "[$]0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} else # Oops. We lost completely, so just stick with echo. ECHO=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. lt_ECHO=$ECHO if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" fi AC_SUBST(lt_ECHO) ]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that does not interpret backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ])# _LT_ENABLE_LOCK # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [AC_CHECK_TOOL(AR, ar, false) test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1]) AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test x"[$]$2" = xyes; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ = "XX$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line __oline__ "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links="nottested" if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", [Define to the sub-directory in which libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[[4-9]]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[123]]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[[3-9]]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([], [sys_lib_dlsearch_path_spec], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program which can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program which can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method == "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi]) if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ const struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= AC_MSG_CHECKING([for $compiler option to produce PIC]) m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC*) # IBM XL 8.0 on PPC _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl*) # IBM XL C 8.0/Fortran 10.1 on PPC _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' ;; linux* | k*bsd*-gnu) _LT_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag= tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi _LT_TAGVAR(link_all_deplibs, $1)=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; freebsd1*) _LT_TAGVAR(ld_shlibs, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" AC_LINK_IFELSE(int foo(void) {}, _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' ) LDFLAGS="$save_LDFLAGS" else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_MSG_CHECKING([whether -lc should be explicitly linked in]) $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then _LT_TAGVAR(archive_cmds_need_lc, $1)=no else _LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], [[If ld is used when linking, flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting ${shlibpath_var} if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [fix_srcfile_path], [1], [Fix the shell variable $srcfile for the compiler]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC="$lt_save_CC" ])# _LT_LANG_C_CONFIG # _LT_PROG_CXX # ------------ # Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ # compiler, we have our own version here. m4_defun([_LT_PROG_CXX], [ pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) AC_PROG_CXX if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi popdef([AC_MSG_ERROR]) ])# _LT_PROG_CXX dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([_LT_PROG_CXX], []) # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [AC_REQUIRE([_LT_PROG_CXX])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd[[12]]*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 will use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; xl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd2*) # C++ shared libraries are fairly broken _LT_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=echo else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(GCC, $1)="$GXX" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ]) dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case $p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue else prev= fi if test "$pre_test_object_deps_done" = no; then case $p in -L* | -R*) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)="${prev}${p}" else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" fi fi ;; *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)="$p" else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)="$p" else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_PROG_F77 # ------------ # Since AC_PROG_F77 is broken, in that it returns the empty string # if there is no fortran compiler, we have our own version here. m4_defun([_LT_PROG_F77], [ pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) AC_PROG_F77 if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi popdef([AC_MSG_ERROR]) ])# _LT_PROG_F77 dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([_LT_PROG_F77], []) # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_REQUIRE([_LT_PROG_F77])dnl AC_LANG_PUSH(Fortran 77) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_F77" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC CC=${F77-"f77"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$G77" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_PROG_FC # ----------- # Since AC_PROG_FC is broken, in that it returns the empty string # if there is no fortran compiler, we have our own version here. m4_defun([_LT_PROG_FC], [ pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) AC_PROG_FC if test -z "$FC" || test "X$FC" = "Xno"; then _lt_disable_FC=yes fi popdef([AC_MSG_ERROR]) ])# _LT_PROG_FC dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([_LT_PROG_FC], []) # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_REQUIRE([_LT_PROG_FC])dnl AC_LANG_PUSH(Fortran) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_FC" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC CC=${FC-"f95"} compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" fi # test "$_lt_disable_FC" != yes AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC="$lt_save_CC" ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC GCC= CC=${RC-"windres"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC="$lt_save_CC" ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) AC_MSG_CHECKING([whether the shell understands "+="]) lt_shell_append=no ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PROG_XSI_SHELLFNS # --------------------- # Bourne and XSI compatible variants of some useful shell functions. m4_defun([_LT_PROG_XSI_SHELLFNS], [case $xsi_shell in yes) cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac } # func_basename file func_basename () { func_basename_result="${1##*/}" } # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}" } # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). func_stripname () { # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"} } # func_opt_split func_opt_split () { func_opt_split_opt=${1%%=*} func_opt_split_arg=${1#*=} } # func_lo2o object func_lo2o () { case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac } # func_xform libobj-or-source func_xform () { func_xform_result=${1%.*}.lo } # func_arith arithmetic-term... func_arith () { func_arith_result=$(( $[*] )) } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=${#1} } _LT_EOF ;; *) # Bourne compatible functions. cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_basename file func_basename () { func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` } dnl func_dirname_and_basename dnl A portable version of this function is already defined in general.m4sh dnl so there is no need for it here. # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; esac } # sed scripts: my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' my_sed_long_arg='1s/^-[[^=]]*=//' # func_opt_split func_opt_split () { func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` } # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` } # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` } # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "$[@]"` } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` } _LT_EOF esac case $lt_shell_append in yes) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$[1]+=\$[2]" } _LT_EOF ;; *) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$[1]=\$$[1]\$[2]" } _LT_EOF ;; esac ]) pigment-0.3.17/common/m4/check.m40000644000175000017500000001335211205034417013316 00000000000000dnl _AM_TRY_CHECK(MINIMUM-VERSION, EXTRA-CFLAGS, EXTRA-LIBS, CHECK-LIB-NAME dnl [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) dnl Test for check, and define CHECK_CFLAGS and CHECK_LIBS dnl Done this way because of the brokenness that is dnl https://launchpad.net/distros/ubuntu/+source/check/+bug/5840 dnl AC_DEFUN([_AM_TRY_CHECK], [ min_check_version=$1 extra_cflags=$2 extra_libs=$3 check_lib_name=$4 CHECK_CFLAGS="$extra_cflags" CHECK_LIBS="$extra_libs -l$check_lib_name" ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $CHECK_CFLAGS" LIBS="$CHECK_LIBS $LIBS" AC_MSG_CHECKING(for check named $check_lib_name - version >= $min_check_version) rm -f conf.check-test dnl unset no_check, since in our second run it would have been set to yes dnl before no_check= AC_TRY_RUN([ #include #include #include int main () { int major, minor, micro; char *tmp_version; system ("touch conf.check-test"); /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = strdup("$min_check_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_check_version"); return 1; } if ((CHECK_MAJOR_VERSION != check_major_version) || (CHECK_MINOR_VERSION != check_minor_version) || (CHECK_MICRO_VERSION != check_micro_version)) { printf("\n*** The check header file (version %d.%d.%d) does not match\n", CHECK_MAJOR_VERSION, CHECK_MINOR_VERSION, CHECK_MICRO_VERSION); printf("*** the check library (version %d.%d.%d).\n", check_major_version, check_minor_version, check_micro_version); return 1; } if ((check_major_version > major) || ((check_major_version == major) && (check_minor_version > minor)) || ((check_major_version == major) && (check_minor_version == minor) && (check_micro_version >= micro))) { return 0; } else { printf("\n*** An old version of check (%d.%d.%d) was found.\n", check_major_version, check_minor_version, check_micro_version); printf("*** You need a version of check being at least %d.%d.%d.\n", major, minor, micro); printf("***\n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the check library and header\n"); printf("*** file is being found. Rerun configure with the --with-check=PATH option\n"); printf("*** to specify the prefix where the correct version was installed.\n"); } return 1; } ],, no_check=yes, [echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" if test "x$no_check" = x ; then AC_MSG_RESULT(yes) ifelse([$5], , :, [$5]) else AC_MSG_RESULT(no) if test -f conf.check-test ; then : else echo "*** Could not run check test program, checking why..." CFLAGS="$CFLAGS $CHECK_CFLAGS" LIBS="$CHECK_LIBS $LIBS" AC_TRY_LINK([ #include #include #include ], , [ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding check. You'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], [ echo "*** The test program failed to compile or link. See the file config.log for" echo "*** the exact error that occured." ]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi CHECK_CFLAGS="" CHECK_LIBS="" rm -f conf.check-test ifelse([$6], , AC_MSG_ERROR([check not found]), [$6]) fi ]) dnl AM_PATH_CHECK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) dnl Test for check, and define CHECK_CFLAGS and CHECK_LIBS dnl AC_DEFUN([AM_PATH_CHECK], [ AC_ARG_WITH(check, [ --with-check=PATH prefix where check is installed [default=auto]]) AC_ARG_WITH(checklibname, AC_HELP_STRING([--with-check-lib-name=NAME], [name of the PIC check library (default=check)])) min_check_version=ifelse([$1], ,0.8.2,$1) if test x$with_check = xno; then AC_MSG_RESULT(disabled) ifelse([$3], , AC_MSG_ERROR([disabling check is not supported]), [$3]) else if test "x$with_check" != x; then CHECK_EXTRA_CFLAGS="-I$with_check/include" CHECK_EXTRA_LIBS="-L$with_check/lib" else CHECK_EXTRA_CFLAGS="" CHECK_EXTRA_LIBS="" fi if test x$with_checklibname = x; then _AM_TRY_CHECK($min_check_version, $CHECK_EXTRA_CFLAGS, $CHECK_EXTRA_LIBS, check_pic, [have_check=true], [have_check=false]) if test x$have_check = xtrue; then ifelse([$2], , :, [$2]) else _AM_TRY_CHECK($min_check_version, $CHECK_EXTRA_CFLAGS, $CHECK_EXTRA_LIBS, check, [have_check=true], [have_check=false]) if test x$have_check = xtrue; then ifelse([$2], , :, [$2]) else ifelse([$3], , AC_MSG_ERROR([check not found]), [$3]) fi fi else _AM_TRY_CHECK($min_check_version, $CHECK_EXTRA_CFLAGS, $CHECK_EXTRA_LIBS, $with_checklibname, [have_check=true], [have_check=false]) if test x$have_check = xtrue; then ifelse([$2], , :, [$2]) else ifelse([$3], , AC_MSG_ERROR([check not found]), [$3]) fi fi AC_SUBST(CHECK_CFLAGS) AC_SUBST(CHECK_LIBS) rm -f conf.check-test fi ]) pigment-0.3.17/common/m4/lt~obsolete.m40000644000175000017500000001311311205034655014612 00000000000000# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 4 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) pigment-0.3.17/common/m4/gst-error.m40000644000175000017500000000500111205034417014155 00000000000000dnl handle various error-related things dnl Thomas Vander Stichele dnl Last modification: 2005-10-16 dnl AG_GST_SET_ERROR_CFLAGS([ADD-WERROR]) dnl AG_GST_SET_LEVEL_DEFAULT([IS-CVS-VERSION]) dnl Sets ERROR_CFLAGS to something the compiler will accept. dnl AC_SUBST them so they are available in Makefile dnl -Wall is added if it is supported dnl -Werror is added if ADD-WERROR is not "no" dnl These flags can be overridden at make time: dnl make ERROR_CFLAGS= AC_DEFUN([AG_GST_SET_ERROR_CFLAGS], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AS_COMPILER_FLAG]) dnl if we support -Wall, set it unconditionally AS_COMPILER_FLAG(-Wall, ERROR_CFLAGS="-Wall", ERROR_CFLAGS="") dnl if asked for, add -Werror if supported if test "x$1" != "xno" then AS_COMPILER_FLAG(-Werror, ERROR_CFLAGS="$ERROR_CFLAGS -Werror") dnl if -Werror isn't suported if test "x$ERROR_CFLAGS" == "x" then dnl try -errwarn=%all,no%E_EMPTY_DECLARATION,no%E_STATEMENT_NOT_REACHED (Sun Forte case) dnl For Forte we need disable "empty declaration" warning produced by un-needed semicolon dnl "statement not reached" disabled because there is g_assert_not_reached () in some places AS_COMPILER_FLAG([-errwarn=%all,no%E_EMPTY_DECLARATION,no%E_STATEMENT_NOT_REACHED], [ERROR_CFLAGS="-errwarn=%all,no%E_EMPTY_DECLARATION,no%E_STATEMENT_NOT_REACHED"]) dnl We are disallowing the new use of extern and inline used together, so that dnl the compiler doesn't freak out on Solaris. AS_COMPILER_FLAG([-features=no%extinl], [ERROR_CFLAGS="$ERROR_CFLAGS -features=no%extinl"]) dnl if this also isn't suported, try only for -errwarn=%all if test "x$ERROR_CFLAGS" == "x" then AS_COMPILER_FLAG(-errwarn=%all, ERROR_CFLAGS="-errwarn=%all") fi fi fi AC_SUBST(ERROR_CFLAGS) AC_MSG_NOTICE([set ERROR_CFLAGS to $ERROR_CFLAGS]) ]) dnl Sets the default error level for debugging messages AC_DEFUN([AG_GST_SET_LEVEL_DEFAULT], [ dnl define correct errorlevel for debugging messages. We want to have dnl GST_ERROR messages printed when running cvs builds if test "x[$1]" = "xyes"; then GST_LEVEL_DEFAULT=GST_LEVEL_ERROR else GST_LEVEL_DEFAULT=GST_LEVEL_NONE fi AC_DEFINE_UNQUOTED(GST_LEVEL_DEFAULT, $GST_LEVEL_DEFAULT, [Default errorlevel to use]) dnl AC_SUBST so we can use it for win32/common/config.h AC_SUBST(GST_LEVEL_DEFAULT) ]) pigment-0.3.17/common/m4/gst.m40000644000175000017500000000036611205034417013037 00000000000000dnl AG_GST_INIT dnl sets up use of GStreamer configure.ac macros dnl all GStreamer autoconf macros are prefixed dnl with AG_GST_ for public macros dnl with _AG_GST_ for private macros AC_DEFUN([AG_GST_INIT], [ m4_pattern_forbid(^_?AG_GST_) ]) pigment-0.3.17/common/m4/as-compiler-flag.m40000644000175000017500000000066311205034417015364 00000000000000dnl as-compiler-flag.m4 0.0.1 dnl autostars m4 macro for detection of compiler flags dnl dnl ds@schleef.org 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 $2 true else $3 true fi AC_MSG_RESULT([$flag_ok]) ]) pigment-0.3.17/common/m4/as-ac-expand.m40000644000175000017500000000210511205034417014474 00000000000000dnl as-ac-expand.m4 0.2.0 dnl autostars m4 macro for expanding directories using configure's prefix dnl thomas@apestaart.org dnl AS_AC_EXPAND(VAR, CONFIGURE_VAR) dnl example dnl AS_AC_EXPAND(SYSCONFDIR, $sysconfdir) dnl will set SYSCONFDIR to /usr/local/etc if prefix=/usr/local AC_DEFUN([AS_AC_EXPAND], [ EXP_VAR=[$1] FROM_VAR=[$2] dnl first expand prefix and exec_prefix if necessary prefix_save=$prefix exec_prefix_save=$exec_prefix dnl if no prefix given, then use /usr/local, the default prefix if test "x$prefix" = "xNONE"; then prefix="$ac_default_prefix" fi dnl if no exec_prefix given, then use prefix if test "x$exec_prefix" = "xNONE"; then exec_prefix=$prefix fi full_var="$FROM_VAR" dnl loop until it doesn't change anymore while true; do new_full_var="`eval echo $full_var`" if test "x$new_full_var" = "x$full_var"; then break; fi full_var=$new_full_var done dnl clean up full_var=$new_full_var AC_SUBST([$1], "$full_var") dnl restore prefix and exec_prefix prefix=$prefix_save exec_prefix=$exec_prefix_save ]) pigment-0.3.17/common/m4/gst-args.m40000644000175000017500000001762311205034417013775 00000000000000dnl configure-time options shared among gstreamer modules dnl AG_GST_ARG_DEBUG dnl AG_GST_ARG_PROFILING dnl AG_GST_ARG_VALGRIND dnl AG_GST_ARG_GCOV dnl AG_GST_ARG_EXAMPLES dnl AG_GST_ARG_WITH_PKG_CONFIG_PATH dnl AG_GST_ARG_WITH_PACKAGE_NAME dnl AG_GST_ARG_WITH_PACKAGE_ORIGIN dnl AG_GST_ARG_WITH_PLUGINS dnl AG_GST_ARG_ENABLE_EXTERNAL dnl AG_GST_ARG_ENABLE_EXPERIMENTAL dnl AG_GST_ARG_ENABLE_BROKEN AC_DEFUN([AG_GST_ARG_DEBUG], [ dnl debugging stuff AC_ARG_ENABLE(debug, AC_HELP_STRING([--disable-debug],[disable addition of -g debugging info]), [ case "${enableval}" in yes) USE_DEBUG=yes ;; no) USE_DEBUG=no ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;; esac ], [USE_DEBUG=yes]) dnl Default value ]) AC_DEFUN([AG_GST_ARG_PROFILING], [ AC_ARG_ENABLE(profiling, AC_HELP_STRING([--enable-profiling], [adds -pg to compiler commandline, for profiling]), [ case "${enableval}" in yes) USE_PROFILING=yes ;; no) USE_PROFILING=no ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-profiling) ;; esac ], [USE_PROFILING=no]) dnl Default value ]) AC_DEFUN([AG_GST_ARG_VALGRIND], [ dnl valgrind inclusion AC_ARG_ENABLE(valgrind, AC_HELP_STRING([--disable-valgrind],[disable run-time valgrind detection]), [ case "${enableval}" in yes) USE_VALGRIND="$USE_DEBUG" ;; no) USE_VALGRIND=no ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-valgrind) ;; esac ], [USE_VALGRIND="$USE_DEBUG"]) dnl Default value VALGRIND_REQ="2.1" if test "x$USE_VALGRIND" = xyes; then PKG_CHECK_MODULES(VALGRIND, valgrind > $VALGRIND_REQ, USE_VALGRIND="yes", [ USE_VALGRIND="no" AC_MSG_RESULT([no]) ]) fi if test "x$USE_VALGRIND" = xyes; then AC_DEFINE(HAVE_VALGRIND, 1, [Define if valgrind should be used]) AC_MSG_NOTICE(Using extra code paths for valgrind) fi ]) AC_DEFUN([AG_GST_ARG_GCOV], [ AC_ARG_ENABLE(gcov, AC_HELP_STRING([--enable-gcov], [compile with coverage profiling instrumentation (gcc only)]), enable_gcov=$enableval, enable_gcov=no) if test x$enable_gcov = xyes ; then if test "x$GCC" != "xyes" then AC_MSG_ERROR([gcov only works if gcc is used]) fi AS_COMPILER_FLAG(["-fprofile-arcs"], [GCOV_CFLAGS="$GCOV_CFLAGS -fprofile-arcs"], true) AS_COMPILER_FLAG(["-ftest-coverage"], [GCOV_CFLAGS="$GCOV_CFLAGS -ftest-coverage"], true) dnl remove any -O flags - FIXME: is this needed ? GCOV_CFLAGS=`echo "$GCOV_CFLAGS" | sed -e 's/-O[[0-9]]*//g'` dnl libtool 1.5.22 and lower strip -fprofile-arcs from the flags dnl passed to the linker, which is a bug; -fprofile-arcs implicitly dnl links in -lgcov, so we do it explicitly here for the same effect GCOV_LIBS=-lgcov AC_SUBST(GCOV_CFLAGS) AC_SUBST(GCOV_LIBS) GCOV=`echo $CC | sed s/gcc/gcov/g` AC_SUBST(GCOV) GST_GCOV_ENABLED=yes AC_DEFINE_UNQUOTED(GST_GCOV_ENABLED, 1, [Defined if gcov is enabled to force a rebuild due to config.h changing]) dnl if gcov is used, we do not want default -O2 CFLAGS if test "x$GST_GCOV_ENABLED" = "xyes" then CFLAGS="-O0" AC_SUBST(CFLAGS) CXXFLAGS="-O0" AC_SUBST(CXXFLAGS) FFLAGS="-O0" AC_SUBST(FFLAGS) CCASFLAGS="-O0" AC_SUBST(CCASFLAGS) AC_MSG_NOTICE([gcov enabled, setting CFLAGS and friends to $CFLAGS]) fi fi AM_CONDITIONAL(GST_GCOV_ENABLED, test x$enable_gcov = xyes) ]) AC_DEFUN([AG_GST_ARG_EXAMPLES], [ AC_ARG_ENABLE(examples, AC_HELP_STRING([--disable-examples], [disable building examples]), [ case "${enableval}" in yes) BUILD_EXAMPLES=yes ;; no) BUILD_EXAMPLES=no ;; *) AC_MSG_ERROR(bad value ${enableval} for --disable-examples) ;; esac ], [BUILD_EXAMPLES=yes]) dnl Default value AM_CONDITIONAL(BUILD_EXAMPLES, test "x$BUILD_EXAMPLES" = "xyes") ]) AC_DEFUN([AG_GST_ARG_WITH_PKG_CONFIG_PATH], [ dnl possibly modify pkg-config path AC_ARG_WITH(pkg-config-path, AC_HELP_STRING([--with-pkg-config-path], [colon-separated list of pkg-config(1) dirs]), [ export PKG_CONFIG_PATH=${withval} AC_MSG_NOTICE(Set PKG_CONFIG_PATH to $PKG_CONFIG_PATH) ]) ]) AC_DEFUN([AG_GST_ARG_WITH_PACKAGE_NAME], [ dnl package name in plugins AC_ARG_WITH(package-name, AC_HELP_STRING([--with-package-name], [specify package name to use in plugins]), [ case "${withval}" in yes) AC_MSG_ERROR(bad value ${withval} for --with-package-name) ;; no) AC_MSG_ERROR(bad value ${withval} for --with-package-name) ;; *) GST_PACKAGE_NAME="${withval}" ;; esac ], [ P=$1 if test "x$P" = "x" then P=$PACKAGE_NAME fi dnl default value if test "x$GST_CVS" = "xyes" then dnl nano >= 1 GST_PACKAGE_NAME="$P CVS/prerelease" else GST_PACKAGE_NAME="$P source release" fi ] ) AC_MSG_NOTICE(Using $GST_PACKAGE_NAME as package name) AC_DEFINE_UNQUOTED(GST_PACKAGE_NAME, "$GST_PACKAGE_NAME", [package name in plugins]) AC_SUBST(GST_PACKAGE_NAME) ]) AC_DEFUN([AG_GST_ARG_WITH_PACKAGE_ORIGIN], [ dnl package origin URL AC_ARG_WITH(package-origin, AC_HELP_STRING([--with-package-origin], [specify package origin URL to use in plugins]), [ case "${withval}" in yes) AC_MSG_ERROR(bad value ${withval} for --with-package-origin) ;; no) AC_MSG_ERROR(bad value ${withval} for --with-package-origin) ;; *) GST_PACKAGE_ORIGIN="${withval}" ;; esac ], [GST_PACKAGE_ORIGIN="[Unknown package origin]"] dnl Default value ) AC_MSG_NOTICE(Using $GST_PACKAGE_ORIGIN as package origin) AC_DEFINE_UNQUOTED(GST_PACKAGE_ORIGIN, "$GST_PACKAGE_ORIGIN", [package origin]) AC_SUBST(GST_PACKAGE_ORIGIN) ]) dnl sets GST_PLUGINS_SELECTED to the list given as an argument, or to dnl GST_PLUGINS_ALL AC_DEFUN([AG_GST_ARG_WITH_PLUGINS], [ AC_ARG_WITH(plugins, AC_HELP_STRING([--with-plugins], [comma-separated list of dependencyless plug-ins to compile]), [ for i in `echo $withval | tr , ' '`; do if echo $GST_PLUGINS_ALL | grep $i > /dev/null then GST_PLUGINS_SELECTED="$GST_PLUGINS_SELECTED $i" else echo "plug-in $i not recognized, ignoring..." fi done], [GST_PLUGINS_SELECTED=$GST_PLUGINS_ALL]) ]) AC_DEFUN([AG_GST_ARG_ENABLE_EXTERNAL], [ AG_GST_CHECK_FEATURE(EXTERNAL, [enable building of plug-ins with external deps],, HAVE_EXTERNAL=yes, enabled, [ AC_MSG_NOTICE(building external plug-ins) BUILD_EXTERNAL="yes" ],[ AC_MSG_WARN(all plug-ins with external dependencies will not be built) BUILD_EXTERNAL="no" ]) # make BUILD_EXTERNAL available to Makefile.am AM_CONDITIONAL(BUILD_EXTERNAL, test "x$BUILD_EXTERNAL" = "xyes") ]) dnl experimental plug-ins; stuff that hasn't had the dust settle yet dnl read 'builds, but might not work' AC_DEFUN([AG_GST_ARG_ENABLE_EXPERIMENTAL], [ AG_GST_CHECK_FEATURE(EXPERIMENTAL, [building of experimental plug-ins],, HAVE_EXPERIMENTAL=yes, enabled, [ AC_MSG_WARN(building experimental plug-ins) BUILD_EXPERIMENTAL="yes" ],[ AC_MSG_NOTICE(not building experimental plug-ins) BUILD_EXPERIMENTAL="no" ]) # make BUILD_EXPERIMENTAL available to Makefile.am AM_CONDITIONAL(BUILD_EXPERIMENTAL, test "x$BUILD_EXPERIMENTAL" = "xyes") ]) dnl broken plug-ins; stuff that doesn't seem to build at the moment AC_DEFUN([AG_GST_ARG_ENABLE_BROKEN], [ AG_GST_CHECK_FEATURE(BROKEN, [enable building of broken plug-ins],, HAVE_BROKEN=yes, disabled, [ AC_MSG_WARN([building broken plug-ins -- no bug reports on these, only patches ...]) ],[ AC_MSG_NOTICE([not building broken plug-ins]) ]) ]) pigment-0.3.17/common/m4/ltsugar.m40000644000175000017500000001042411205034655013723 00000000000000# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59 which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) pigment-0.3.17/common/m4/ltoptions.m40000644000175000017500000002724211205034654014302 00000000000000# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option `$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl `shared' nor `disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [0], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the `shared' and # `disable-shared' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the `static' and # `disable-static' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the `fast-install' # and `disable-fast-install' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the `pic-only' and `no-pic' # LT_INIT options. # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) pigment-0.3.17/common/m4/ltversion.m40000644000175000017500000000127511205034655014273 00000000000000# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # Generated from ltversion.in. # serial 3012 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.2.6]) m4_define([LT_PACKAGE_REVISION], [1.3012]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.2.6' macro_revision='1.3012' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) pigment-0.3.17/common/m4/gst-check.m40000644000175000017500000001221011205034417014101 00000000000000dnl pkg-config-based checks for GStreamer modules and dependency modules dnl generic: dnl AG_GST_PKG_CHECK_MODULES([PREFIX], [WHICH], [REQUIRED]) dnl sets HAVE_[$PREFIX], [$PREFIX]_* dnl AG_GST_CHECK_MODULES([PREFIX], [MODULE], [MINVER], [NAME], [REQUIRED]) dnl sets HAVE_[$PREFIX], [$PREFIX]_* dnl specific: dnl AG_GST_CHECK_GST([MAJMIN], [MINVER], [REQUIRED]) dnl also sets/ACSUBSTs GST_TOOLS_DIR and GST_PLUGINS_DIR dnl AG_GST_CHECK_GST_BASE([MAJMIN], [MINVER], [REQUIRED]) dnl AG_GST_CHECK_GST_GDP([MAJMIN], [MINVER], [REQUIRED]) dnl AG_GST_CHECK_GST_CONTROLLER([MAJMIN], [MINVER], [REQUIRED]) dnl AG_GST_CHECK_GST_CHECK([MAJMIN], [MINVER], [REQUIRED]) dnl AG_GST_CHECK_GST_PLUGINS_BASE([MAJMIN], [MINVER], [REQUIRED]) dnl also sets/ACSUBSTs GSTPB_PLUGINS_DIR AC_DEFUN([AG_GST_PKG_CHECK_MODULES], [ which="[$2]" dnl not required by default, since we use this mostly for plugin deps required=ifelse([$3], , "no", [$3]) PKG_CHECK_MODULES([$1], $which, [ HAVE_[$1]="yes" ], [ HAVE_[$1]="no" AC_MSG_RESULT(no) if test "x$required" = "xyes"; then AC_MSG_ERROR($[$1]_PKG_ERRORS) else AC_MSG_NOTICE($[$1]_PKG_ERRORS) fi ]) dnl AC_SUBST of CFLAGS and LIBS was not done before automake 1.7 dnl It gets done automatically in automake >= 1.7, which we now require ])) AC_DEFUN([AG_GST_CHECK_MODULES], [ module=[$2] minver=[$3] name="[$4]" required=ifelse([$5], , "yes", [$5]) dnl required by default PKG_CHECK_MODULES([$1], $module >= $minver, [ HAVE_[$1]="yes" ], [ HAVE_[$1]="no" AC_MSG_RESULT(no) AC_MSG_NOTICE($[$1]_PKG_ERRORS) if test "x$required" = "xyes"; then AC_MSG_ERROR([no $module >= $minver ($name) found]) else AC_MSG_NOTICE([no $module >= $minver ($name) found]) fi ]) dnl AC_SUBST of CFLAGS and LIBS was not done before automake 1.7 dnl It gets done automatically in automake >= 1.7, which we now require ])) AC_DEFUN([AG_GST_CHECK_GST], [ AG_GST_CHECK_MODULES(GST, gstreamer-[$1], [$2], [GStreamer], [$3]) dnl allow setting before calling this macro to override if test -z $GST_TOOLS_DIR; then GST_TOOLS_DIR=`$PKG_CONFIG --variable=toolsdir gstreamer-[$1]` if test -z $GST_TOOLS_DIR; then AC_MSG_ERROR( [no tools dir set in GStreamer pkg-config file, core upgrade needed.]) fi fi AC_MSG_NOTICE([using GStreamer tools in $GST_TOOLS_DIR]) AC_SUBST(GST_TOOLS_DIR) dnl check for where core plug-ins got installed dnl this is used for unit tests dnl allow setting before calling this macro to override if test -z $GST_PLUGINS_DIR; then GST_PLUGINS_DIR=`$PKG_CONFIG --variable=pluginsdir gstreamer-[$1]` if test -z $GST_PLUGINS_DIR; then AC_MSG_ERROR( [no pluginsdir set in GStreamer pkg-config file, core upgrade needed.]) fi fi AC_MSG_NOTICE([using GStreamer plug-ins in $GST_PLUGINS_DIR]) AC_SUBST(GST_PLUGINS_DIR) dnl Check if gestreamer is 0.10.10 or newer, required to know for dnl printf segment extension. PKG_CHECK_MODULES(GST_10_10, gstreamer-0.10 >= 0.10.10, POST_10_10=1, POST_10_10=0) AC_DEFINE_UNQUOTED(POST_10_10, $POST_10_10, [GStreamer version is >= 0.10.10]) PKG_CHECK_MODULES(GST_10_11, gstreamer-0.10 >= 0.10.11, POST_10_11=1, POST_10_11=0) AC_DEFINE_UNQUOTED(POST_10_11, $POST_10_11, [GStreamer version is >= 0.10.11]) PKG_CHECK_MODULES(GST_10_12, gstreamer-0.10 >= 0.10.12, POST_10_12=1, POST_10_12=0) AC_DEFINE_UNQUOTED(POST_10_12, $POST_10_12, [GStreamer version is >= 0.10.12]) PKG_CHECK_MODULES(GST_10_13, gstreamer-0.10 >= 0.10.13, POST_10_13=1, POST_10_13=0) AC_DEFINE_UNQUOTED(POST_10_13, $POST_10_13, [GStreamer version is >= 0.10.13]) PKG_CHECK_MODULES(GST_10_14, gstreamer-0.10 >= 0.10.14, POST_10_14=1, POST_10_14=0) AC_DEFINE_UNQUOTED(POST_10_14, $POST_10_14, [GStreamer version is >= 0.10.14]) ]) AC_DEFUN([AG_GST_CHECK_GST_BASE], [ AG_GST_CHECK_MODULES(GST_BASE, gstreamer-base-[$1], [$2], [GStreamer Base Libraries], [$3]) ]) AC_DEFUN([AG_GST_CHECK_GST_GDP], [ AG_GST_CHECK_MODULES(GST_GDP, gstreamer-dataprotocol-[$1], [$2], [GStreamer Data Protocol Library], [$3]) ]) AC_DEFUN([AG_GST_CHECK_GST_CONTROLLER], [ AG_GST_CHECK_MODULES(GST_CONTROLLER, gstreamer-controller-[$1], [$2], [GStreamer Controller Library], [$3]) ]) AC_DEFUN([AG_GST_CHECK_GST_CHECK], [ AG_GST_CHECK_MODULES(GST_CHECK, gstreamer-check-[$1], [$2], [GStreamer Check unittest Library], [$3]) ]) AC_DEFUN([AG_GST_CHECK_GST_PLUGINS_BASE], [ AG_GST_CHECK_MODULES(GST_PLUGINS_BASE, gstreamer-plugins-base-[$1], [$2], [GStreamer Base Plug-ins Library], [$3]) dnl check for where base plug-ins got installed dnl this is used for unit tests dnl allow setting before calling this macro to override if test -z $GSTPB_PLUGINS_DIR; then GSTPB_PLUGINS_DIR=`$PKG_CONFIG --variable=pluginsdir gstreamer-plugins-base-[$1]` if test -z $GSTPB_PLUGINS_DIR; then AC_MSG_ERROR( [no pluginsdir set in GStreamer Base Plug-ins pkg-config file]) fi fi AC_MSG_NOTICE([using GStreamer Base Plug-ins in $GSTPB_PLUGINS_DIR]) AC_SUBST(GSTPB_PLUGINS_DIR) ]) pigment-0.3.17/pigment.spec0000644000175000017500000001002011205034713012472 00000000000000%{!?majorminor: %define majorminor 0.3} %{!?gstreamer: %define gstreamer gstreamer} Name: pigment Version: 0.3.17 Release: 1 Summary: Pigment media rendering library Group: Applications/Multimedia License: LGPL URL: https://code.fluendo.com/pigment/trac Source: http://www.fluendo.com/elisa/downloads/pigment/%{name}-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: glib2 >= 2.8.0 Requires: pango >= 1.20 Requires: pangocairo >= 1.20 Requires: %{gstreamer} >= 0.10.0 BuildRequires: glib2-devel >= 2.8.0 BuildRequires: pango-devel >= 1.20 BuildRequires: pangocairo-devel >= 1.20 BuildRequires: libX11-devel BuildRequires: %{gstreamer}-devel >= 0.10.0 BuildRequires: %{gstreamer}-plugins-base-devel >= 0.10.0 BuildRequires: mesa-libGLU-devel BuildRequires: gtk-doc # for gdk-pixbuf BuildRequires: gtk2-devel %description Pigment is a GLib/GObject library designed to easily create rich application user interfaces embedding different media types. Its design allows to use it on several platforms, thanks to a plugin system allowing to choose the underlying graphical API. %package devel Summary: Libraries/include files for Pigment Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: glib2-devel >= 2.8.0 %description devel Pigment is a GLib/GObject library designed to easily create rich application user interfaces embedding different media types. Its design allows to use it on several platforms, thanks to a plugin system allowing to choose the underlying graphical API. This package contains the libraries and includes files necessary to develop applications and plugins using Pigment. %prep %setup -q -n %{name}-%{version} %build %configure --enable-gtk-doc make %install rm -rf $RPM_BUILD_ROOT # Install doc temporarily in order to be included later by rpm %makeinstall docdir="`pwd`/installed-doc" # Do not package .la files find $RPM_BUILD_ROOT%{_libdir} -name "*.la" -exec rm {} \; %clean rm -rf $RPM_BUILD_ROOT %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(-, root, root, -) %doc AUTHORS COPYING INSTALL NEWS README RELEASE TODO ChangeLog %{_libdir}/libpigment-%{majorminor}.so.* %{_libdir}/pigment-%{majorminor}/%{version}/*.so %files devel %defattr(-, root, root, -) %{_includedir}/pigment-%{majorminor}/pgm/*.h %{_includedir}/pigment-%{majorminor}/pgm/gtk/*.h %{_libdir}/libpigment-%{majorminor}.so %{_libdir}/pkgconfig/pigment-%{majorminor}.pc %{_libdir}/pkgconfig/pigment-gtk-%{majorminor}.pc %{_datadir}/gtk-doc/html/pigment %changelog * Mon Jan 21 2008 Loïc Molinari - changed plugin path * Fri Jan 11 2008 Loïc Molinari - updated doc files - changed the description - adapted for the python binding split - added libpigment-gtk * Tue Jan 8 2008 Loïc Molinari - removed the image sink plugin which is now linked statically * Thu Aug 2 2007 Loïc Molinari - adapted to branch 0.3 * Tue Mar 13 2007 Loïc Molinari - adapted to library namespace change - changed description * Fri Feb 16 2007 Loïc Molinari - added libX11-devel and libXrandr-devel build requirements * Thu Feb 01 2007 Loïc Molinari - removed the pygtk2-devel build requirement - removed the libSDL requirement * Thu Jan 04 2007 Thomas Vander Stichele - fix requires - fix URL's - add plugins-base BR - pull in either pygobject2-devel or pygtk2-devel depending on version * Thu Nov 09 2006 Loïc Molinari - changed the license * Thu Nov 09 2006 Thomas Vander Stichele - cleaned up - fixed for 64-bit systems - get versions from configure.ac * Wed Nov 08 2006 Loïc Molinari - added the GStreamer video sink plugin * Thu Oct 31 2006 Christian Schaller - first draft of spec file pigment-0.3.17/build-aux/0000777000175000017500000000000011205035133012135 500000000000000pigment-0.3.17/build-aux/compile0000755000175000017500000000717311205034671013445 00000000000000#! /bin/sh # Wrapper for compilers which do not understand `-c -o'. scriptversion=2005-05-14.22 # Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand `-c -o'. Remove `-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file `INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; esac ofile= cfile= eat= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as `compile cc -o foo foo.c'. # So we strip `-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no `-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # `.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'` # Create the lock directory. # Note: use `[/.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: pigment-0.3.17/build-aux/ltmain.sh0000755000175000017500000073337611205034654013726 00000000000000# Generated from ltmain.m4sh. # ltmain.sh (GNU libtool) 2.2.6 # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, # or obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Usage: $progname [OPTION]... [MODE-ARG]... # # Provide generalized library-building support services. # # --config show all configuration variables # --debug enable verbose shell tracing # -n, --dry-run display commands without modifying any files # --features display basic configuration information and exit # --mode=MODE use operation mode MODE # --preserve-dup-deps don't remove duplicate dependency libraries # --quiet, --silent don't print informational messages # --tag=TAG use configuration variables from tag TAG # -v, --verbose print informational messages (default) # --version print version information # -h, --help print short or long help message # # MODE must be one of the following: # # clean remove files from the build directory # compile compile a source file into a libtool object # execute automatically set library path, then run a program # finish complete the installation of libtool libraries # install install libraries or executables # link create a library or an executable # uninstall remove libraries from an installed directory # # MODE-ARGS vary depending on the MODE. # Try `$progname --help --mode=MODE' for a more detailed description of MODE. # # When reporting a bug, please describe a test case to reproduce it and # include the following information: # # host-triplet: $host # shell: $SHELL # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) # $progname: (GNU libtool) 2.2.6 Debian-2.2.6a-1ubuntu1 # automake: $automake_version # autoconf: $autoconf_version # # Report bugs to . PROGRAM=ltmain.sh PACKAGE=libtool VERSION="2.2.6 Debian-2.2.6a-1ubuntu1" TIMESTAMP="" package_revision=1.3012 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # NLS nuisances: We save the old values to restore during execute mode. # Only set LANG and LC_ALL to C if already set. # These must not be set unconditionally because not all systems understand # e.g. LANG=C (notably SCO). lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${$lt_var+set}\" = set; then save_$lt_var=\$$lt_var $lt_var=C export $lt_var lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done $lt_unset CDPATH : ${CP="cp -f"} : ${ECHO="echo"} : ${EGREP="/bin/grep -E"} : ${FGREP="/bin/grep -F"} : ${GREP="/bin/grep"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SED="/bin/sed"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. exit_status=$EXIT_SUCCESS # Make sure IFS has a sensible default lt_nl=' ' IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` } # Generated shell functions inserted here. # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" # The name of this program: # In the unlikely event $progname began with a '-', it would play havoc with # func_echo (imagine progname=-n), so we prepend ./ in that case: func_dirname_and_basename "$progpath" progname=$func_basename_result case $progname in -*) progname=./$progname ;; esac # Make sure we have an absolute path for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=$func_dirname_result progdir=`cd "$progdir" && pwd` progpath="$progdir/$progname" ;; *) save_IFS="$IFS" IFS=: for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break done IFS="$save_IFS" test -n "$progdir" || progdir=`pwd` progpath="$progdir/$progname" ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='s/\([`"$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. # Since each input `\' is now two `\'s, look for any number of runs of # four `\'s followed by two `\'s and then a '$'. `\' that '$'. bs='\\' bs2='\\\\' bs4='\\\\\\\\' dollar='\$' sed_double_backslash="\ s/$bs4/&\\ /g s/^$bs2$dollar/$bs&/ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g s/\n//g" # Standard options: opt_dry_run=false opt_help=false opt_quiet=false opt_verbose=false opt_warning=: # func_echo arg... # Echo program name prefixed message, along with the current mode # name if it has been set yet. func_echo () { $ECHO "$progname${mode+: }$mode: $*" } # func_verbose arg... # Echo program name prefixed message in verbose mode only. func_verbose () { $opt_verbose && func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_error arg... # Echo program name prefixed message to standard error. func_error () { $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 # bash bug again: : } # func_fatal_error arg... # Echo program name prefixed message to standard error, and exit. func_fatal_error () { func_error ${1+"$@"} exit $EXIT_FAILURE } # func_fatal_help arg... # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { func_error ${1+"$@"} func_fatal_error "$help" } help="Try \`$progname --help' for more information." ## default # func_grep expression filename # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $GREP "$1" "$2" >/dev/null 2>&1 } # func_mkdir_p directory-path # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { my_directory_path="$1" my_dir_list= if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then # Protect directory names starting with `-' case $my_directory_path in -*) my_directory_path="./$my_directory_path" ;; esac # While some portion of DIR does not yet exist... while test ! -d "$my_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. my_dir_list="$my_directory_path:$my_dir_list" # If the last portion added has no slash in it, the list is done case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"` done my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do IFS="$save_mkdir_p_IFS" # mkdir can fail with a `File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$my_dir" 2>/dev/null || : done IFS="$save_mkdir_p_IFS" # Bail out if we (or some other process) failed to create a directory. test -d "$my_directory_path" || \ func_fatal_error "Failed to create \`$1'" fi } # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$opt_dry_run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $MKDIR "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || \ func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi $ECHO "X$my_tmpdir" | $Xsed } # func_quote_for_eval arg # Aesthetically quote ARG to be evaled later. # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT # is double-quoted, suitable for a subsequent eval, whereas # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters # which are still active within double quotes backslashified. func_quote_for_eval () { case $1 in *[\\\`\"\$]*) func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac case $func_quote_for_eval_unquoted_result in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and and variable # expansion for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" ;; *) func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac } # func_quote_for_expand arg # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { case $1 in *[\\\`\"]*) my_arg=`$ECHO "X$1" | $Xsed \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; esac case $my_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") my_arg="\"$my_arg\"" ;; esac func_quote_for_expand_result="$my_arg" } # func_show_eval cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$my_cmd" my_status=$? if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_show_eval_locale cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$lt_user_locale $my_cmd" my_status=$? eval "$lt_safe_locale" if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_version # Echo version message to standard output and exit. func_version () { $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ p }' < "$progpath" exit $? } # func_usage # Echo short help message to standard output and exit. func_usage () { $SED -n '/^# Usage:/,/# -h/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" $ECHO $ECHO "run \`$progname --help | more' for full usage" exit $? } # func_help # Echo long help message to standard output and exit. func_help () { $SED -n '/^# Usage:/,/# Report bugs to/ { s/^# // s/^# *$// s*\$progname*'$progname'* s*\$host*'"$host"'* s*\$SHELL*'"$SHELL"'* s*\$LTCC*'"$LTCC"'* s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ p }' < "$progpath" exit $? } # func_missing_arg argname # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { func_error "missing argument for $1" exit_cmd=exit } exit_cmd=: # Check that we have a working $ECHO. if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then # Yippee, $ECHO works! : else # Restart under the correct shell, and then maybe $ECHO will work. exec $SHELL "$progpath" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # Parse options once, thoroughly. This comes as soon as possible in # the script to make things like `libtool --version' happen quickly. { # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Parse non-mode specific arguments: while test "$#" -gt 0; do opt="$1" shift case $opt in --config) func_config ;; --debug) preserve_args="$preserve_args $opt" func_echo "enabling shell trace mode" opt_debug='set -x' $opt_debug ;; -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break execute_dlfiles="$execute_dlfiles $1" shift ;; --dry-run | -n) opt_dry_run=: ;; --features) func_features ;; --finish) mode="finish" ;; --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break case $1 in # Valid mode arguments: clean) ;; compile) ;; execute) ;; finish) ;; install) ;; link) ;; relink) ;; uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $opt" exit_cmd=exit break ;; esac mode="$1" shift ;; --preserve-dup-deps) opt_duplicate_deps=: ;; --quiet|--silent) preserve_args="$preserve_args $opt" opt_silent=: ;; --verbose| -v) preserve_args="$preserve_args $opt" opt_silent=false ;; --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break preserve_args="$preserve_args $opt $1" func_enable_tag "$1" # tagname is set here shift ;; # Separate optargs to long options: -dlopen=*|--mode=*|--tag=*) func_opt_split "$opt" set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} shift ;; -\?|-h) func_usage ;; --help) opt_help=: ;; --version) func_version ;; -*) func_fatal_help "unrecognized option \`$opt'" ;; *) nonopt="$opt" break ;; esac done case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_duplicate_deps ;; esac # Having warned about all mis-specified options, bail out if # anything was wrong. $exit_cmd $EXIT_FAILURE } # func_check_version_match # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } ## ----------- ## ## Main. ## ## ----------- ## $opt_help || { # Sanity checks first: func_check_version_match if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then func_fatal_configuration "not configured to build any kind of library" fi test -z "$mode" && func_fatal_error "error: you must specify a MODE." # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$execute_dlfiles" && test "$mode" != execute; then func_error "unrecognized option \`-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$progname --help --mode=$mode' for more information." } # func_lalib_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null \ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_unsafe_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if `file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case "$lalib_p_line" in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test "$lalib_p" = yes } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { func_lalib_p "$1" } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_ltwrapper_scriptname_result="" if func_ltwrapper_executable_p "$1"; then func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" fi } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $opt_debug save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$save_ifs eval cmd=\"$cmd\" func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. func_source () { $opt_debug case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $opt_debug if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_quote_for_eval "$arg" CC_quoted="$CC_quoted $func_quote_for_eval_result" done case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_quote_for_eval "$arg" CC_quoted="$CC_quoted $func_quote_for_eval_result" done case "$@ " in " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with \`--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=${1} if test "$build_libtool_libs" = yes; then write_lobj=\'${2}\' else write_lobj=none fi if test "$build_old_libs" = yes; then write_oldobj=\'${3}\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T <?"'"'"' &()|`$[]' \ && func_warning "libobj name \`$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname="$func_basename_result" xdir="$func_dirname_result" lobj=${xdir}$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi removelist="$removelist $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist removelist="$removelist $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test "$build_libtool_libs" = yes; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test "$pic_mode" != no; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir command="$command -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test "$suppress_opt" = yes; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then if test "$pic_mode" != yes; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then command="$command -o $obj" fi # Suppress compiler output if we already did a PIC compilation. command="$command$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test "$need_locks" != no; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test "$mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to building PIC objects only -prefer-non-pic try to building non-PIC objects only -shared do not build a \`.o' file suitable for static linking -static only build a \`.o' file suitable for static linking COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode \`$mode'" ;; esac $ECHO $ECHO "Try \`$progname --help' for more information about other modes." exit $? } # Now that we've collected a possible --mode arg, show help if necessary $opt_help && func_mode_help # func_mode_execute arg... func_mode_execute () { $opt_debug # The first argument is the command name. cmd="$nonopt" test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $execute_dlfiles; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "\`$file' was not linked with \`-export-dynamic'" continue fi func_dirname "$file" "" "." dir="$func_dirname_result" if test -f "$dir/$objdir/$dlname"; then dir="$dir/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir="$func_dirname_result" ;; *) func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -*) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file="$progdir/$program" elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). func_quote_for_eval "$file" args="$args $func_quote_for_eval_result" done if test "X$opt_dry_run" = Xfalse; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" $ECHO "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS fi } test "$mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug libdirs="$nonopt" admincmds= if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for dir do libdirs="$libdirs $dir" done for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || admincmds="$admincmds $cmds" fi done fi # Exit here if they wanted silent mode. $opt_silent && exit $EXIT_SUCCESS $ECHO "X----------------------------------------------------------------------" | $Xsed $ECHO "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done $ECHO $ECHO "If you ever happen to want to link against installed libraries" $ECHO "in a given directory, LIBDIR, you must either use libtool, and" $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'" $ECHO "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable" $ECHO " during execution" fi if test -n "$runpath_var"; then $ECHO " - add LIBDIR to the \`$runpath_var' environment variable" $ECHO " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi $ECHO $ECHO "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual" $ECHO "pages." ;; *) $ECHO "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac $ECHO "X----------------------------------------------------------------------" | $Xsed exit $EXIT_SUCCESS } test "$mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $opt_debug # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. $ECHO "X$nonopt" | $GREP shtool >/dev/null; then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" install_prog="$install_prog$func_quote_for_eval_result" # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= for arg do if test -n "$dest"; then files="$files $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) case " $install_prog " in *[\\\ /]cp\ *) ;; *) prev=$arg ;; esac ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" install_prog="$install_prog $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the \`$prev' option requires an argument" if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else func_dirname_and_basename "$dest" "" "." destdir="$func_dirname_result" destname="$func_basename_result" # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "\`$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "\`$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. staticlibs="$staticlibs $file" ;; *.la) # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) current_libdirs="$current_libdirs $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) future_libdirs="$future_libdirs $libdir" ;; esac fi func_dirname "$file" "/" "" dir="$func_dirname_result" dir="$dir$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"` fi func_warning "relinking \`$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname="$1" shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme="$stripme" case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme="" ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib="$destdir/$realname" func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name="$func_basename_result" instname="$dir/$name"i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest="$destfile" destfile= ;; *) func_fatal_help "cannot copy a libtool object to \`$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script \`$wrapper'" finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no fi done relink_command= func_source "$wrapper" outputname= if test "$fast_install" = no && test -n "$relink_command"; then $opt_dry_run || { if test "$finalize" = yes; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file="$func_basename_result" outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` $opt_silent || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink \`$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file="$outputname" else func_warning "cannot relink \`$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name="$func_basename_result" # Set up the ranlib parameters. oldlib="$destdir/$name" func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run \`$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test "$mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $opt_debug my_outputname="$1" my_originator="$2" my_pic_p="${3-no}" my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms="${my_outputname}S.c" else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${my_outputname}.nm" func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then func_verbose "generating symbol list for \`$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` for progfile in $progfiles; do func_verbose "extracting global C symbols from \`$progfile'" $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $opt_dry_run || { $RM $export_symbols eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from \`$dlprefile'" func_basename "$dlprefile" name="$func_basename_result" $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" } done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms" fi $ECHO >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; " case $host in *cygwin* | *mingw* | *cegcc* ) $ECHO >> "$output_objdir/$my_dlsyms" "\ /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */" lt_dlsym_const= ;; *osf5*) echo >> "$output_objdir/$my_dlsyms" "\ /* This system does not cope well with relocations in const data */" lt_dlsym_const= ;; *) lt_dlsym_const=const ;; esac $ECHO >> "$output_objdir/$my_dlsyms" "\ extern $lt_dlsym_const lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; $lt_dlsym_const lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac $ECHO >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) if test "X$my_pic_p" != Xno; then pic_flag_for_symtable=" $pic_flag" fi ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) symtab_cflags="$symtab_cflags $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' # Transform the symbol file into the correct name. symfileobj="$output_objdir/${my_outputname}S.$objext" case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for \`$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` fi } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. func_win32_libid () { $opt_debug win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then win32_nmres=`eval $NM -f posix -A $1 | $SED -n -e ' 1,100{ / I /{ s,.*,import, p q } }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_extract_an_archive dir oldlib func_extract_an_archive () { $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?' if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $opt_debug my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib="$func_basename_result" my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`basename "$darwin_archive"` darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # func_emit_wrapper_part1 [arg=no] # # Emit the first part of a libtool wrapper script on stdout. # For more information, see the description associated with # func_emit_wrapper(), below. func_emit_wrapper_part1 () { func_emit_wrapper_part1_arg1=no if test -n "$1" ; then func_emit_wrapper_part1_arg1=$1 fi $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='${SED} -e 1s/^X//' sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then ECHO=\"$qecho\" file=\"\$0\" # Make sure echo works. if test \"X\$1\" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then # Yippee, \$ECHO works! : else # Restart under the correct shell, and then maybe \$ECHO will work. exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} fi fi\ " $ECHO "\ # Find the directory that this script lives in. thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` done " } # end: func_emit_wrapper_part1 # func_emit_wrapper_part2 [arg=no] # # Emit the second part of a libtool wrapper script on stdout. # For more information, see the description associated with # func_emit_wrapper(), below. func_emit_wrapper_part2 () { func_emit_wrapper_part2_arg1=no if test -n "$1" ; then func_emit_wrapper_part2_arg1=$1 fi $ECHO "\ # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` export $shlibpath_var " fi # fixup the dll searchpath if we need to. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 fi else # The program doesn't exist. \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # end: func_emit_wrapper_part2 # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory in which it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=no if test -n "$1" ; then func_emit_wrapper_arg1=$1 fi # split this up so that func_emit_cwrapperexe_src # can call each part independently. func_emit_wrapper_part1 "${func_emit_wrapper_arg1}" func_emit_wrapper_part2 "${func_emit_wrapper_arg1}" } # func_to_host_path arg # # Convert paths to host format when used with build tools. # Intended for use with "native" mingw (where libtool itself # is running under the msys shell), or in the following cross- # build environments: # $build $host # mingw (msys) mingw [e.g. native] # cygwin mingw # *nix + wine mingw # where wine is equipped with the `winepath' executable. # In the native mingw case, the (msys) shell automatically # converts paths for any non-msys applications it launches, # but that facility isn't available from inside the cwrapper. # Similar accommodations are necessary for $host mingw and # $build cygwin. Calling this function does no harm for other # $host/$build combinations not listed above. # # ARG is the path (on $build) that should be converted to # the proper representation for $host. The result is stored # in $func_to_host_path_result. func_to_host_path () { func_to_host_path_result="$1" if test -n "$1" ; then case $host in *mingw* ) lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' case $build in *mingw* ) # actually, msys # awkward: cmd appends spaces to result lt_sed_strip_trailing_spaces="s/[ ]*\$//" func_to_host_path_tmp1=`( cmd //c echo "$1" |\ $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ $SED -e "$lt_sed_naive_backslashify"` ;; *cygwin* ) func_to_host_path_tmp1=`cygpath -w "$1"` func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ $SED -e "$lt_sed_naive_backslashify"` ;; * ) # Unfortunately, winepath does not exit with a non-zero # error code, so we are forced to check the contents of # stdout. On the other hand, if the command is not # found, the shell will set an exit code of 127 and print # *an error message* to stdout. So we must check for both # error code of zero AND non-empty stdout, which explains # the odd construction: func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ $SED -e "$lt_sed_naive_backslashify"` else # Allow warning below. func_to_host_path_result="" fi ;; esac if test -z "$func_to_host_path_result" ; then func_error "Could not determine host path corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_path_result="$1" fi ;; esac fi } # end: func_to_host_path # func_to_host_pathlist arg # # Convert pathlists to host format when used with build tools. # See func_to_host_path(), above. This function supports the # following $build/$host combinations (but does no harm for # combinations not listed here): # $build $host # mingw (msys) mingw [e.g. native] # cygwin mingw # *nix + wine mingw # # Path separators are also converted from $build format to # $host format. If ARG begins or ends with a path separator # character, it is preserved (but converted to $host format) # on output. # # ARG is a pathlist (on $build) that should be converted to # the proper representation on $host. The result is stored # in $func_to_host_pathlist_result. func_to_host_pathlist () { func_to_host_pathlist_result="$1" if test -n "$1" ; then case $host in *mingw* ) lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_to_host_pathlist_tmp2="$1" # Once set for this call, this variable should not be # reassigned. It is used in tha fallback case. func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\ $SED -e 's|^:*||' -e 's|:*$||'` case $build in *mingw* ) # Actually, msys. # Awkward: cmd appends spaces to result. lt_sed_strip_trailing_spaces="s/[ ]*\$//" func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\ $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ $SED -e "$lt_sed_naive_backslashify"` ;; *cygwin* ) func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"` func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ $SED -e "$lt_sed_naive_backslashify"` ;; * ) # unfortunately, winepath doesn't convert pathlists func_to_host_pathlist_result="" func_to_host_pathlist_oldIFS=$IFS IFS=: for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do IFS=$func_to_host_pathlist_oldIFS if test -n "$func_to_host_pathlist_f" ; then func_to_host_path "$func_to_host_pathlist_f" if test -n "$func_to_host_path_result" ; then if test -z "$func_to_host_pathlist_result" ; then func_to_host_pathlist_result="$func_to_host_path_result" else func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result" fi fi fi IFS=: done IFS=$func_to_host_pathlist_oldIFS ;; esac if test -z "$func_to_host_pathlist_result" ; then func_error "Could not determine the host path(s) corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This may break if $1 contains DOS-style drive # specifications. The fix is not to complicate the expression # below, but for the user to provide a working wine installation # with winepath so that path translation in the cross-to-mingw # case works properly. lt_replace_pathsep_nix_to_dos="s|:|;|g" func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ $SED -e "$lt_replace_pathsep_nix_to_dos"` fi # Now, add the leading and trailing path separators back case "$1" in :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" ;; esac case "$1" in *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;" ;; esac ;; esac fi } # end: func_to_host_pathlist # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include # define setmode _setmode #else # include # include # ifdef __CYGWIN__ # include # define HAVE_SETENV # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif # endif #endif #include #include #include #include #include #include #include #include #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif #ifdef _MSC_VER # define S_IXUSR _S_IEXEC # define stat _stat # ifndef _INTPTR_T_DEFINED # define intptr_t int # endif #endif #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifdef __CYGWIN__ # define FOPEN_WB "wb" #endif #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) #undef LTWRAPPER_DEBUGPRINTF #if defined DEBUGWRAPPER # define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args static void ltwrapper_debugprintf (const char *fmt, ...) { va_list args; va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } #else # define LTWRAPPER_DEBUGPRINTF(args) #endif const char *program_name = NULL; void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_fatal (const char *message, ...); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_opt_process_env_set (const char *arg); void lt_opt_process_env_prepend (const char *arg); void lt_opt_process_env_append (const char *arg); int lt_split_name_value (const char *arg, char** name, char** value); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); static const char *script_text_part1 = EOF func_emit_wrapper_part1 yes | $SED -e 's/\([\\"]\)/\\\1/g' \ -e 's/^/ "/' -e 's/$/\\n"/' echo ";" cat <"))); for (i = 0; i < newargc; i++) { LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : ""))); } EOF case $host_os in mingw*) cat <<"EOF" /* execv doesn't actually work on mingw as expected on unix */ rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); if (rval == -1) { /* failed to start process */ LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno)); return 127; } return rval; EOF ;; *) cat <<"EOF" execv (lt_argv_zero, newargz); return rval; /* =127, but avoids unused variable warning */ EOF ;; esac cat <<"EOF" } void * xmalloc (size_t num) { void *p = (void *) malloc (num); if (!p) lt_fatal ("Memory exhausted"); return p; } char * xstrdup (const char *string) { return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL; } const char * base_name (const char *name) { const char *base; #if defined (HAVE_DOS_BASED_FILE_SYSTEM) /* Skip over the disk name in MSDOS pathnames. */ if (isalpha ((unsigned char) name[0]) && name[1] == ':') name += 2; #endif for (base = name; *name; name++) if (IS_DIR_SEPARATOR (*name)) base = name + 1; return base; } int check_executable (const char *path) { struct stat st; LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!")); if ((!path) || (!*path)) return 0; if ((stat (path, &st) >= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!")); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char *concat_name; LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n", tmp_pathspec)); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { char *errstr = strerror (errno); lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal ("Could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (strcmp (str, pat) == 0) *str = '\0'; } return str; } static void lt_error_core (int exit_status, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s: %s: ", program_name, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, "FATAL", message, ap); va_end (ap); } void lt_setenv (const char *name, const char *value) { LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", (name ? name : ""), (value ? value : ""))); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else int len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { int orig_value_len = strlen (orig_value); int add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } int lt_split_name_value (const char *arg, char** name, char** value) { const char *p; int len; if (!arg || !*arg) return 1; p = strchr (arg, (int)'='); if (!p) return 1; *value = xstrdup (++p); len = strlen (arg) - strlen (*value); *name = XMALLOC (char, len); strncpy (*name, arg, len-1); (*name)[len - 1] = '\0'; return 0; } void lt_opt_process_env_set (const char *arg) { char *name = NULL; char *value = NULL; if (lt_split_name_value (arg, &name, &value) != 0) { XFREE (name); XFREE (value); lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg); } lt_setenv (name, value); XFREE (name); XFREE (value); } void lt_opt_process_env_prepend (const char *arg) { char *name = NULL; char *value = NULL; char *new_value = NULL; if (lt_split_name_value (arg, &name, &value) != 0) { XFREE (name); XFREE (value); lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg); } new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); XFREE (name); XFREE (value); } void lt_opt_process_env_append (const char *arg) { char *name = NULL; char *value = NULL; char *new_value = NULL; if (lt_split_name_value (arg, &name, &value) != 0) { XFREE (name); XFREE (value); lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg); } new_value = lt_extend_str (getenv (name), value, 1); lt_setenv (name, new_value); XFREE (new_value); XFREE (name); XFREE (value); } void lt_update_exe_path (const char *name, const char *value) { LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", (name ? name : ""), (value ? value : ""))); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ int len = strlen (new_value); while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[len-1] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", (name ? name : ""), (value ? value : ""))); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF } # end: func_emit_cwrapperexe_src # func_mode_link arg... func_mode_link () { $opt_debug case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll which has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=no prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module="${wl}-single_module" func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then dlfiles="$dlfiles $arg" else dlprefiles="$dlprefiles $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" test -f "$arg" \ || func_fatal_error "symbol file \`$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) deplibs="$deplibs $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # moreargs="$moreargs $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file \`$arg' does not exist" fi arg=$save_arg prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) rpath="$rpath $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) xrpath="$xrpath $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds="$arg" prev= continue ;; weak) weak_libs="$weak_libs $arg" prev= continue ;; xcclinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) compiler_flags="$compiler_flags $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "\`-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname '-L' '' "$arg" dir=$func_stripname_result if test -z "$dir"; then if test "$#" -gt 0; then func_fatal_error "require no space between \`-L' and \`$1'" else func_fatal_error "need path for \`-L' option" fi fi # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of \`$dir'" dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "*) ;; *) deplibs="$deplibs -L$dir" lib_search_path="$lib_search_path $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) dllsearchpath="$dllsearchpath:$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework deplibs="$deplibs System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi deplibs="$deplibs $arg" continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot) compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;; esac continue ;; -multi_module) single_module="${wl}-multi_module" continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "\`-no-install' is ignored for $host" func_warning "assuming \`-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" arg="$arg $wl$func_quote_for_eval_result" compiler_flags="$compiler_flags $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" arg="$arg $wl$func_quote_for_eval_result" compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" linker_flags="$linker_flags $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; # -64, -mips[0-9] enable 64-bit mode on the SGI compiler # -r[0-9][0-9]* specifies the processor on the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler # +DA*, +DD* enable 64-bit mode on the HP compiler # -q* pass through compiler args for the IBM compiler # -m*, -t[45]*, -txscale* pass through architecture-specific # compiler args for GCC # -F/path gives path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC # @file GCC response files -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" compiler_flags="$compiler_flags $arg" continue ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; *.$objext) # A standard object. objs="$objs $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. deplibs="$deplibs $arg" old_deplibs="$old_deplibs $arg" continue ;; *.la) # A libtool-controlled library. if test "$prev" = dlfiles; then # This library was specified with -dlopen. dlfiles="$dlfiles $arg" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. dlprefiles="$dlprefiles $arg" prev= else deplibs="$deplibs $arg" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the \`$prevarg' option requires an argument" if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname="$func_basename_result" libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" func_dirname "$output" "/" "" output_objdir="$func_dirname_result$objdir" # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_duplicate_deps ; then case "$libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi libs="$libs $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; esac pre_post_deps="$pre_post_deps $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test "$linkmode,$pass" = "lib,link"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs="$tmp_deplibs" fi if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS%" test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" ;; esac fi if test "$linkmode,$pass" = "lib,dlpreopen"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= case $lib in *.la) func_source "$lib" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"` case " $weak_libs " in *" $deplib_base "*) ;; *) deplibs="$deplibs $deplib" ;; esac done done libs="$dlprefiles" fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else compiler_flags="$compiler_flags $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; esac fi fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then func_warning "\`-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no func_dirname "$lib" "" "." ladir="$func_dirname_result" lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l *.ltframework) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" newlib_search_path="$newlib_search_path $func_stripname_result" ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" newlib_search_path="$newlib_search_path $func_stripname_result" ;; *) func_warning "\`-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then func_stripname '-R' '' "$deplib" dir=$func_stripname_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) lib="$deplib" ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then $ECHO $ECHO "*** Warning: Trying to link with static lib archive $deplib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have" $ECHO "*** because the file extensions .$libext of this argument makes me believe" $ECHO "*** that it is just a static archive that I should not use here." else $ECHO $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi ;; esac continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. newdlprefiles="$newdlprefiles $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else newdlfiles="$newdlfiles $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" fi # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "\`$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir="$func_dirname_result" dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && dlfiles="$dlfiles $dlopen" test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # It is a libtool convenience library, so add in its objects. convenience="$convenience $ladir/$objdir/$old_library" old_convenience="$old_convenience $ladir/$objdir/$old_library" elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_duplicate_deps ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done continue fi # $pass = conv # Get the name of the library we link against. linklib= for l in $old_library $library_names; do linklib="$l" done if test -z "$linklib"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then func_fatal_error "cannot -dlopen a convenience library: \`$lib'" fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. dlprefiles="$dlprefiles $lib $dependency_libs" else newdlfiles="$newdlfiles $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of \`$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir="$ladir" fi ;; esac func_basename "$lib" laname="$func_basename_result" # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$libdir" absdir="$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir" && test "$linkmode" = prog; then func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" fi # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then newdlprefiles="$newdlprefiles $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then newdlprefiles="$newdlprefiles $dir/$dlname" else newdlprefiles="$newdlprefiles $dir/$linklib" fi fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then newlib_search_path="$newlib_search_path $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" newlib_search_path="$newlib_search_path $func_stripname_result" ;; esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_duplicate_deps ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath:" in *"$absdir:"*) ;; *) temp_rpath="$temp_rpath$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded notinst_deplibs="$notinst_deplibs $lib" need_relink=no ;; *) if test "$installed" = no; then notinst_deplibs="$notinst_deplibs $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule="" for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule="$dlpremoduletest" break fi done if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then $ECHO if test "$linkmode" = prog; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname="$1" shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc*) func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" func_basename "$soroot" soname="$func_basename_result" func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from \`$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for \`$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we can not # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null ; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library" ; then $ECHO $ECHO "*** And there doesn't seem to be a static archive available" $ECHO "*** The link will probably fail, sorry" else add="$dir/$old_library" fi elif test -n "$old_library"; then add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && test "$hardcode_minus_L" != yes && test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. $ECHO $ECHO "*** Warning: This system can not link to static lib archive $lib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then $ECHO "*** But as you try to build a module library, libtool will still create " $ECHO "*** a static module, that should work as long as the dlopening application" $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then $ECHO $ECHO "*** However, this would only work if libtool was able to extract symbol" $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" $ECHO "*** not find such a program. So, this module is probably useless." $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) xrpath="$xrpath $temp_xrpath";; esac;; *) temp_deplibs="$temp_deplibs $libdir";; esac done dependency_libs="$temp_deplibs" fi newlib_search_path="$newlib_search_path $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" if $opt_duplicate_deps ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do case $deplib in -L*) path="$deplib" ;; *.la) func_dirname "$deplib" "" "." dir="$func_dirname_result" # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of \`$dir'" absdir="$dir" fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl" ; then depdepl="$absdir/$objdir/$depdepl" darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" path= fi fi ;; *) path="-L$absdir/$objdir" ;; esac else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "\`$deplib' seems to be moved" path="-L$absdir" fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test "$pass" = link; then if test "$linkmode" = "prog"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) lib_search_path="$lib_search_path $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) tmp_libs="$tmp_libs $deplib" ;; esac ;; *) tmp_libs="$tmp_libs $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then tmp_libs="$tmp_libs $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" fi if test "$linkmode" = prog || test "$linkmode" = lib; then dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "\`-R' is ignored for archives" test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "\`-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "\`-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" objs="$objs$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test "$module" = no && \ func_fatal_help "libtool library \`$output' must begin with \`lib'" if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else $ECHO $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" libobjs="$libobjs $objs" fi fi test "$dlself" != no && \ func_warning "\`-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test "$#" -gt 1 && \ func_warning "ignoring multiple \`-rpath's for a libtool library" install_libdir="$1" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "\`-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 shift IFS="$save_ifs" test -n "$7" && \ func_fatal_help "too many parameters to \`-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$1" number_minor="$2" number_revision="$3" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; *) func_fatal_configuration "$modename: unknown library version type \`$version_type'" ;; esac ;; no) current="$1" revision="$2" age="$3" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT \`$current' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION \`$revision' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE \`$age' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE \`$age' is greater than the current interface number \`$current'" func_fatal_error "\`$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current" ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring:${iface}.0" done # Make executables depend on our current version. verstring="$verstring:${current}.0" ;; qnx) major=".$current" versuffix=".$current" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; *) func_fatal_configuration "unknown library version type \`$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then func_warning "undefined symbols not allowed in $host shared libraries" build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi func_generate_dlsyms "$libname" "$libname" "yes" libobjs="$libobjs $symfileobj" test "X$libobjs" = "X " && libobjs= if test "$mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi removelist="$removelist $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then oldlibs="$oldlibs $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"` # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"` # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do temp_xrpath="$temp_xrpath -R$libdir" case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) dlfiles="$dlfiles $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) dlprefiles="$dlprefiles $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework deplibs="$deplibs System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then deplibs="$deplibs -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $ECHO $ECHO "*** Warning: linker path does not have real file for library $a_deplib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have" $ECHO "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) newdeplibs="$newdeplibs $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $ECHO $ECHO "*** Warning: linker path does not have real file for library $a_deplib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have" $ECHO "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \ -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"` done fi if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' | $GREP . >/dev/null; then $ECHO if test "X$deplibs_check_method" = "Xnone"; then $ECHO "*** Warning: inter-library dependencies are not supported in this platform." else $ECHO "*** Warning: inter-library dependencies are not known to be supported." fi $ECHO "*** All declared inter-library dependencies are being dropped." droppeddeps=yes fi ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then $ECHO $ECHO "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" $ECHO "*** a static module, that should work as long as the dlopening" $ECHO "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then $ECHO $ECHO "*** However, this would only work if libtool was able to extract symbol" $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" $ECHO "*** not find such a program. So, this module is probably useless." $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else $ECHO "*** The inter-library dependencies that have been dropped here will be" $ECHO "*** automatically added whenever a program is linked with this library" $ECHO "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then $ECHO $ECHO "*** Since this library must not contain undefined symbols," $ECHO "*** because either the platform does not support them or" $ECHO "*** it was explicitly requested with -no-undefined," $ECHO "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" dep_rpath="$dep_rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname="$1" shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do linknames="$linknames $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols="$output_objdir/$libname.uexp" delfiles="$delfiles $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile if test "x`$SED 1q $export_symbols`" != xEXPORTS; then # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols="$export_symbols" export_symbols= always_export_symbols=yes fi fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" func_len " $cmd" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then func_show_eval "$cmd" 'exit $?' skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' fi if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) tmp_deplibs="$tmp_deplibs $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test "$compiler_needs_object" = yes && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $convenience libobjs="$libobjs $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" linker_flags="$linker_flags $flag" fi # Make a backup of the uninstalled library when relinking if test "$mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output output_la=`$ECHO "X$output" | $Xsed -e "$basename"` # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then output=${output_objdir}/${output_la}.lnkscript func_verbose "creating GNU ld script: $output" $ECHO 'INPUT (' > $output for obj in $save_libobjs do $ECHO "$obj" >> $output done $ECHO ')' >> $output delfiles="$delfiles $output" elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test "$compiler_needs_object" = yes; then firstobj="$1 " shift fi for obj do $ECHO "$obj" >> $output done delfiles="$delfiles $output" output=$firstobj\"$file_list_spec$output\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-${k}.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test "X$objlist" = X || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. eval concat_cmds=\"$reload_cmds $objlist $last_robj\" else # All subsequent reloadable object files will link in # the last one created. eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-${k}.$objext objlist=$obj func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi delfiles="$delfiles $output" else output= fi if ${skipped_export-false}; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi fi test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi if ${skipped_export-false}; then if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi fi libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $dlprefiles libobjs="$libobjs $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "\`-R' is ignored for objects" test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for objects" test -n "$release" && \ func_warning "\`-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object \`$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` else gentop="$output_objdir/${obj}x" generated="$generated $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # Create the old-style object. reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for programs" test -n "$release" && \ func_warning "\`-release' is ignored for programs" test "$preload" = yes \ && test "$dlopen_support" = unknown \ && test "$dlopen_self" = unknown \ && test "$dlopen_self_static" = unknown && \ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) compile_command="$compile_command ${wl}-bind_at_load" finalize_command="$finalize_command ${wl}-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done compile_deplibs="$new_libs" compile_command="$compile_command $compile_deplibs" finalize_command="$finalize_command $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) dllsearchpath="$dllsearchpath:$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" "no" # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=yes case $host in *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; *cegcc) # Disable wrappers for cegcc, we are cross compiling anyway. wrappers_required=no ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; esac if test "$wrappers_required" = no; then # Replace the output file specification. compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' # Delete the generated files. if test -f "$output_objdir/${outputname}S.${objext}"; then func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' fi exit $exit_status fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do rpath="$rpath$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" func_warning "this platform does not like uninstalled shared libraries" func_warning "\`$output' will be relinked during installation" else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` fi # Quote $ECHO for shipping. if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then case $progpath in [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; esac qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"` else qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host" ; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save $symfileobj" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" if test "$preload" = yes && test -f "$symfileobj"; then oldobjs="$oldobjs $symfileobj" fi fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $addlibs oldobjs="$oldobjs $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $dlprefiles oldobjs="$oldobjs $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else $ECHO "copying selected object files to avoid basename conflicts..." gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase="$func_basename_result" case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" oldobjs="$oldobjs $gentop/$newobj" ;; *) oldobjs="$oldobjs $obj" ;; esac done fi eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" newdependency_libs="$newdependency_libs $libdir/$name" ;; *) newdependency_libs="$newdependency_libs $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" newdlfiles="$newdlfiles $libdir/$name" ;; *) newdlfiles="$newdlfiles $lib" ;; esac done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" newdlprefiles="$newdlprefiles $libdir/$name" ;; esac done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlfiles="$newdlfiles $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlprefiles="$newdlprefiles $abs" done dlprefiles="$newdlprefiles" fi $RM $output # place dlname in correct position for cygwin tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that can not go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } { test "$mode" = link || test "$mode" = relink; } && func_mode_link ${1+"$@"} # func_mode_uninstall arg... func_mode_uninstall () { $opt_debug RM="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) RM="$RM $arg"; rmforce=yes ;; -*) RM="$RM $arg" ;; *) files="$files $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= origobjdir="$objdir" for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then objdir="$origobjdir" else objdir="$dir/$origobjdir" fi func_basename "$file" name="$func_basename_result" test "$mode" = uninstall && objdir="$dir" # Remember objdir for removal later, being careful to avoid duplicates if test "$mode" = clean; then case " $rmdirs " in *" $objdir "*) ;; *) rmdirs="$rmdirs $objdir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do rmfiles="$rmfiles $objdir/$n" done test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" case "$mode" in clean) case " $library_names " in # " " in the beginning catches empty $dlname *" $dlname "*) ;; *) rmfiles="$rmfiles $objdir/$dlname" ;; esac test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test "$pic_object" != none; then rmfiles="$rmfiles $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test "$non_pic_object" != none; then rmfiles="$rmfiles $dir/$non_pic_object" fi fi ;; *) if test "$mode" = clean ; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe rmfiles="$rmfiles $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result rmfiles="$rmfiles $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then rmfiles="$rmfiles $objdir/lt-$name" fi if test "X$noexename" != "X$name" ; then rmfiles="$rmfiles $objdir/lt-${noexename}.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done objdir="$origobjdir" # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } { test "$mode" = uninstall || test "$mode" = clean; } && func_mode_uninstall ${1+"$@"} test -z "$mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode \`$mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: # vi:sw=2 pigment-0.3.17/build-aux/config.guess0000755000175000017500000012753411205034654014414 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. timestamp='2008-01-23' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[456]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:[3456]*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; EM64T | authenticamd) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-gnu else echo ${UNAME_MACHINE}-unknown-linux-gnueabi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips64 #undef mips64el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mips64el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips64 #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^LIBC/{ s: ::g p }'`" test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit } test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: pigment-0.3.17/build-aux/depcomp0000755000175000017500000004271311205034671013443 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2007-03-29.01 # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software # Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> $depfile echo >> $depfile # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> $depfile else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # X makedepend shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes ;; esac case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix="`echo $object | sed 's/^.*\././'`" touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. "$@" || exit $? IFS=" " for arg do case "$arg" in "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: pigment-0.3.17/build-aux/config.sub0000755000175000017500000010115311205034654014044 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. timestamp='2008-01-16' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | mt \ | msp430 \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | score \ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; c90) basic_machine=c90-cray os=-unicos ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tile*) basic_machine=tile-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: pigment-0.3.17/build-aux/missing0000755000175000017500000002557711205034671013476 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2006-05-10.23 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). case $1 in lex|yacc) # Not GNU programs, they don't have --version. ;; tar) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $1 in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: pigment-0.3.17/build-aux/install-sh0000755000175000017500000003246411205034654014075 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2006-12-25.00 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # Protect names starting with `-'. case $dst in -*) dst=./$dst;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; -*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: pigment-0.3.17/Makefile.in0000644000175000017500000006017311205034676012246 00000000000000# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(srcdir)/pigment.spec.in $(top_srcdir)/configure AUTHORS \ COPYING ChangeLog INSTALL NEWS TODO build-aux/compile \ build-aux/config.guess build-aux/config.sub build-aux/depcomp \ build-aux/install-sh build-aux/ltmain.sh build-aux/missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/as-compiler-flag.m4 \ $(top_srcdir)/common/m4/as-version.m4 \ $(top_srcdir)/common/m4/check.m4 \ $(top_srcdir)/common/m4/gst-args.m4 \ $(top_srcdir)/common/m4/gst-check.m4 \ $(top_srcdir)/common/m4/gst-error.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/libtool.m4 \ $(top_srcdir)/common/m4/ltoptions.m4 \ $(top_srcdir)/common/m4/ltsugar.m4 \ $(top_srcdir)/common/m4/ltversion.m4 \ $(top_srcdir)/common/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = pigment.spec SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d $(distdir) \ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr $(distdir); }; } DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAIROXLIB_CFLAGS = @CAIROXLIB_CFLAGS@ CAIROXLIB_LIBS = @CAIROXLIB_LIBS@ CAIRO_CFLAGS = @CAIRO_CFLAGS@ CAIRO_LIBS = @CAIRO_LIBS@ CC = @CC@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXEEXT = @EXEEXT@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ GCOV = @GCOV@ GCOV_CFLAGS = @GCOV_CFLAGS@ GCOV_LIBS = @GCOV_LIBS@ GDKPIXBUFXLIB_CFLAGS = @GDKPIXBUFXLIB_CFLAGS@ GDKPIXBUFXLIB_LIBS = @GDKPIXBUFXLIB_LIBS@ GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@ GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ GST_0_10_13_CFLAGS = @GST_0_10_13_CFLAGS@ GST_0_10_13_LIBS = @GST_0_10_13_LIBS@ GST_10_10_CFLAGS = @GST_10_10_CFLAGS@ GST_10_10_LIBS = @GST_10_10_LIBS@ GST_10_11_CFLAGS = @GST_10_11_CFLAGS@ GST_10_11_LIBS = @GST_10_11_LIBS@ GST_10_12_CFLAGS = @GST_10_12_CFLAGS@ GST_10_12_LIBS = @GST_10_12_LIBS@ GST_10_13_CFLAGS = @GST_10_13_CFLAGS@ GST_10_13_LIBS = @GST_10_13_LIBS@ GST_10_14_CFLAGS = @GST_10_14_CFLAGS@ GST_10_14_LIBS = @GST_10_14_LIBS@ GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ GST_BASE_LIBS = @GST_BASE_LIBS@ GST_CFLAGS = @GST_CFLAGS@ GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ GST_CHECK_LIBS = @GST_CHECK_LIBS@ GST_LIBS = @GST_LIBS@ GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ GST_TOOLS_DIR = @GST_TOOLS_DIR@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_GTK_WIDGET = @HAVE_GTK_WIDGET@ HAVE_IMAGING_LIBRARY = @HAVE_IMAGING_LIBRARY@ HAVE_OPENGLES_PLUGIN = @HAVE_OPENGLES_PLUGIN@ HAVE_OPENGL_PLUGIN = @HAVE_OPENGL_PLUGIN@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGLADE_2_0_CFLAGS = @LIBGLADE_2_0_CFLAGS@ LIBGLADE_2_0_LIBS = @LIBGLADE_2_0_LIBS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENGLES_BACKEND = @OPENGLES_BACKEND@ OPENGL_BACKEND = @OPENGL_BACKEND@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ PANGOCAIRO_CFLAGS = @PANGOCAIRO_CFLAGS@ PANGOCAIRO_LIBS = @PANGOCAIRO_LIBS@ PANGO_1_16_CFLAGS = @PANGO_1_16_CFLAGS@ PANGO_1_16_LIBS = @PANGO_1_16_LIBS@ PANGO_CFLAGS = @PANGO_CFLAGS@ PANGO_LIBS = @PANGO_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL_PATH = @PERL_PATH@ PGM_ALL_CFLAGS = @PGM_ALL_CFLAGS@ PGM_ALL_LDFLAGS = @PGM_ALL_LDFLAGS@ PGM_ALL_LIBS = @PGM_ALL_LIBS@ PGM_GLES_CFLAGS = @PGM_GLES_CFLAGS@ PGM_GLES_LIBS = @PGM_GLES_LIBS@ PGM_GL_CFLAGS = @PGM_GL_CFLAGS@ PGM_GL_LIBS = @PGM_GL_LIBS@ PGM_GTKDOC_CFLAGS = @PGM_GTKDOC_CFLAGS@ PGM_LIB_LDFLAGS = @PGM_LIB_LDFLAGS@ PGM_LT_LDFLAGS = @PGM_LT_LDFLAGS@ PGM_LT_VERSION = @PGM_LT_VERSION@ PGM_MAJORMINOR = @PGM_MAJORMINOR@ PGM_OBJ_CFLAGS = @PGM_OBJ_CFLAGS@ PGM_OBJ_LIBS = @PGM_OBJ_LIBS@ PGM_OPTION_CFLAGS = @PGM_OPTION_CFLAGS@ PGM_PLUGIN_LDFLAGS = @PGM_PLUGIN_LDFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PLUGIN_PATH = @PLUGIN_PATH@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XCOMPOSITE_CFLAGS = @XCOMPOSITE_CFLAGS@ XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ XMKMF = @XMKMF@ XRENDER_CFLAGS = @XRENDER_CFLAGS@ XRENDER_LIBS = @XRENDER_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cairo_req = @cairo_req@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ glib_req = @glib_req@ gstreamer_plugins_base_req = @gstreamer_plugins_base_req@ gstreamer_req = @gstreamer_req@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pango_req = @pango_req@ pangocairo_req = @pangocairo_req@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc ACLOCAL_AMFLAGS = -I common/m4 SUBDIRS = \ pgm \ plugins \ tests \ examples \ docs \ pkgconfig \ misc \ win32 MAINTAINERCLEANFILES = \ build-aux/compile \ build-aux/config.guess \ build-aux/config.sub \ build-aux/depcomp \ build-aux/install-sh \ build-aux/ltmain.sh \ build-aux/missing \ Makefile.in \ config.h.in \ configure EXTRA_DIST = \ pigment.spec \ COPYING \ RELEASE all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ cd $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_srcdir) && $(AUTOHEADER) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 pigment.spec: $(top_builddir)/config.status $(srcdir)/pigment.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) test -d $(distdir) || mkdir $(distdir) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ am__remove_distdir=: \ am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ done -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && cd $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile config.h installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr \ distclean-libtool distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-exec-am: install-html: install-html-recursive install-info: install-info-recursive install-man: install-pdf: install-pdf-recursive install-ps: install-ps-recursive installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ install-strip .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ dist-gzip dist-lzma dist-shar dist-tarZ dist-zip distcheck \ distclean distclean-generic distclean-hdr distclean-libtool \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pigment-0.3.17/examples/0000777000175000017500000000000011205035137012065 500000000000000pigment-0.3.17/examples/image.c0000644000175000017500000003200311205034420013217 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment image example * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ #include #include static gboolean iconified = FALSE; static gboolean drawable_pressed_cb (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, PgmButtonType button, guint32 time, guint32 pressure, gpointer data) { g_print ("%s \"pressed\"\n", GST_OBJECT_NAME (drawable)); return FALSE; } static gboolean drawable_pressured_cb (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, PgmButtonType button, guint32 time, guint32 pressure, gpointer data) { g_print ("%s \"pressured\"\n", GST_OBJECT_NAME (drawable)); return FALSE; } static gboolean drawable_released_cb (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, PgmButtonType button, guint32 time, gpointer data) { g_print ("%s \"released\"\n", GST_OBJECT_NAME (drawable)); return FALSE; } static gboolean drawable_clicked_cb (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, PgmButtonType button, guint32 time, guint32 pressure, gpointer data) { g_print ("%s \"clicked\"\n", GST_OBJECT_NAME (drawable)); return FALSE; } static gboolean drawable_double_clicked_cb (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, PgmButtonType button, guint32 time, gpointer data) { g_print ("%s \"double-clicked\"\n", GST_OBJECT_NAME (drawable)); return FALSE; } static gboolean drawable_scrolled_cb (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, PgmScrollDirection direction, guint32 time, gpointer data) { g_print ("%s \"scrolled %s\"\n", GST_OBJECT_NAME (drawable), direction == PGM_SCROLL_DOWN ? "down" : "up"); return TRUE; } static gboolean drawable_drag_begin_cb (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, PgmButtonType button, guint32 time, guint32 pressure, gpointer data) { g_print ("%s \"drag-begin\", (%.2f, %.2f, %.2f), %d, %u, %u\n", GST_OBJECT_NAME (drawable), x, y, z, button, time, pressure); return TRUE; } static gboolean drawable_drag_motion_cb (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, PgmButtonType button, guint32 time, guint32 pressure, gpointer data) { g_print ("%s \"drag-motion\", (%.2f, %.2f, %.2f), %d, %u, %d\n", GST_OBJECT_NAME (drawable), x, y, z, button, time, pressure); return FALSE; } static gboolean drawable_drag_end_cb (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, PgmButtonType button, guint32 time, gpointer data) { g_print ("%s \"drag-end\", (%.2f, %.2f, %.2f), %d, %u\n", GST_OBJECT_NAME (drawable), x, y, z, button, time); return TRUE; } static gboolean drawable_motion_cb (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, guint32 time, gpointer data) { g_print ("%s \"motion\", (%.2f, %.2f, %.2f), %u\n", GST_OBJECT_NAME (drawable), x, y, z, time); return TRUE; } static gboolean drawable_entered_cb (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, guint32 time, gpointer data) { g_print ("%s \"entered\", (%.2f, %.2f, %.2f), %u\n", GST_OBJECT_NAME (drawable), x, y, z, time); pgm_drawable_set_opacity (drawable, 200); return TRUE; } static void drawable_left_cb (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, guint32 time, gpointer data) { g_print ("%s \"left\", (%.2f, %.2f, %.2f), %u\n", GST_OBJECT_NAME (drawable), x, y, z, time); pgm_drawable_set_opacity (drawable, 150); } static void state_event_cb (PgmViewport *viewport, PgmEventState *event, gpointer data) { if (event->state_mask & PGM_VIEWPORT_ICONIFIED) { g_print ("%s iconified\n", GST_OBJECT_NAME (viewport)); iconified = TRUE; } else { g_print ("%s deiconified\n", GST_OBJECT_NAME (viewport)); iconified = FALSE; } } static void keypress_event_cb (PgmViewport *viewport, PgmEventKey *event, gpointer data) { static gboolean fullscreen = FALSE; if (event->type == PGM_KEY_PRESS) { switch (event->keyval) { /* Fullscreen */ case PGM_f: fullscreen = !fullscreen; pgm_viewport_set_fullscreen (viewport, fullscreen); break; /* Iconify */ case PGM_i: iconified = !iconified; pgm_viewport_set_iconified (viewport, iconified); break; /* Quit */ case PGM_q: case PGM_Escape: pgm_main_quit (); break; default: break; } } } int main (int argc, char *argv[]) { const gchar *img_path = "examples/pictures/fluendo.png"; PgmViewport *viewport = NULL; PgmCanvas *canvas; PgmDrawable *img, *img2, *img3; GdkPixbuf *icon; /* Init */ pgm_init (&argc, &argv); /* OpenGL viewport creation */ pgm_viewport_factory_make ("opengl", &viewport); if (!viewport) { g_print ("Cannot create the 'opengl' viewport\n"); return -1; } pgm_viewport_set_title (viewport, "Image"); /* Icon definition */ icon = gdk_pixbuf_new_from_file (img_path, NULL); if (icon) { pgm_viewport_set_icon (viewport, icon); g_object_unref (icon); } else g_print ("Couldn't load icon\n"); /* First image */ img = pgm_image_new_from_file (img_path, 0); pgm_drawable_set_size (img, 1.0f, 1.0f); pgm_drawable_set_position (img, 1.25f, 0.75f, -50.0f); pgm_drawable_set_bg_color (img, 150, 150, 255, 255); pgm_drawable_set_opacity (img, 150); pgm_drawable_show (img); g_signal_connect (G_OBJECT (img), "pressed", G_CALLBACK (drawable_pressed_cb), NULL); g_signal_connect (G_OBJECT (img), "pressured", G_CALLBACK (drawable_pressured_cb), NULL); g_signal_connect (G_OBJECT (img), "released", G_CALLBACK (drawable_released_cb), NULL); g_signal_connect (G_OBJECT (img), "clicked", G_CALLBACK (drawable_clicked_cb), NULL); g_signal_connect (G_OBJECT (img), "double-clicked", G_CALLBACK (drawable_double_clicked_cb), NULL); g_signal_connect (G_OBJECT (img), "scrolled", G_CALLBACK (drawable_scrolled_cb), NULL); g_signal_connect (G_OBJECT (img), "drag-begin", G_CALLBACK (drawable_drag_begin_cb), NULL); g_signal_connect (G_OBJECT (img), "drag-motion", G_CALLBACK (drawable_drag_motion_cb), NULL); g_signal_connect (G_OBJECT (img), "drag-end", G_CALLBACK (drawable_drag_end_cb), NULL); g_signal_connect (G_OBJECT (img), "motion", G_CALLBACK (drawable_motion_cb), NULL); g_signal_connect (G_OBJECT (img), "entered", G_CALLBACK (drawable_entered_cb), NULL); g_signal_connect (G_OBJECT (img), "left", G_CALLBACK (drawable_left_cb), NULL); /* Second image */ img2 = pgm_image_new_from_image (PGM_IMAGE (img)); pgm_drawable_set_size (img2, 1.0f, 1.0f); pgm_drawable_set_position (img2, 1.5f, 1.0f, 0.0f); pgm_drawable_set_bg_color (img2, 255, 150, 150, 255); pgm_drawable_set_opacity (img2, 150); pgm_drawable_show (img2); g_signal_connect (G_OBJECT (img2), "pressed", G_CALLBACK (drawable_pressed_cb), NULL); g_signal_connect (G_OBJECT (img2), "pressured", G_CALLBACK (drawable_pressured_cb), NULL); g_signal_connect (G_OBJECT (img2), "released", G_CALLBACK (drawable_released_cb), NULL); g_signal_connect (G_OBJECT (img2), "clicked", G_CALLBACK (drawable_clicked_cb), NULL); g_signal_connect (G_OBJECT (img2), "double-clicked", G_CALLBACK (drawable_double_clicked_cb), NULL); g_signal_connect (G_OBJECT (img2), "scrolled", G_CALLBACK (drawable_scrolled_cb), NULL); g_signal_connect (G_OBJECT (img2), "drag-begin", G_CALLBACK (drawable_drag_begin_cb), NULL); g_signal_connect (G_OBJECT (img2), "drag-motion", G_CALLBACK (drawable_drag_motion_cb), NULL); g_signal_connect (G_OBJECT (img2), "drag-end", G_CALLBACK (drawable_drag_end_cb), NULL); g_signal_connect (G_OBJECT (img2), "motion", G_CALLBACK (drawable_motion_cb), NULL); g_signal_connect (G_OBJECT (img2), "entered", G_CALLBACK (drawable_entered_cb), NULL); g_signal_connect (G_OBJECT (img2), "left", G_CALLBACK (drawable_left_cb), NULL); /* Third image */ img3 = pgm_image_new_from_image (PGM_IMAGE (img)); pgm_drawable_set_size (img3, 1.0f, 1.0f); pgm_drawable_set_position (img3, 1.75f, 1.25f, 50.0f); pgm_drawable_set_bg_color (img3, 150, 255, 150, 255); pgm_drawable_set_opacity (img3, 150); pgm_drawable_show (img3); g_signal_connect (G_OBJECT (img3), "pressed", G_CALLBACK (drawable_pressed_cb), NULL); g_signal_connect (G_OBJECT (img3), "pressured", G_CALLBACK (drawable_pressured_cb), NULL); g_signal_connect (G_OBJECT (img3), "released", G_CALLBACK (drawable_released_cb), NULL); g_signal_connect (G_OBJECT (img3), "clicked", G_CALLBACK (drawable_clicked_cb), NULL); g_signal_connect (G_OBJECT (img3), "double-clicked", G_CALLBACK (drawable_double_clicked_cb), NULL); g_signal_connect (G_OBJECT (img3), "scrolled", G_CALLBACK (drawable_scrolled_cb), NULL); g_signal_connect (G_OBJECT (img3), "drag-begin", G_CALLBACK (drawable_drag_begin_cb), NULL); g_signal_connect (G_OBJECT (img3), "drag-motion", G_CALLBACK (drawable_drag_motion_cb), NULL); g_signal_connect (G_OBJECT (img3), "drag-end", G_CALLBACK (drawable_drag_end_cb), NULL); g_signal_connect (G_OBJECT (img3), "motion", G_CALLBACK (drawable_motion_cb), NULL); g_signal_connect (G_OBJECT (img3), "entered", G_CALLBACK (drawable_entered_cb), NULL); g_signal_connect (G_OBJECT (img3), "left", G_CALLBACK (drawable_left_cb), NULL); /* Canvas handling */ canvas = pgm_canvas_new (); pgm_viewport_set_canvas (viewport, canvas); pgm_canvas_add_many (canvas, PGM_DRAWABLE_MIDDLE, img, img2, img3, NULL); /* Main loop */ g_signal_connect (G_OBJECT (viewport), "key-press-event", G_CALLBACK (keypress_event_cb), NULL); g_signal_connect (G_OBJECT (viewport), "delete-event", G_CALLBACK (pgm_main_quit), NULL); g_signal_connect (G_OBJECT (viewport), "state-event", G_CALLBACK (state_event_cb), NULL); pgm_viewport_show (viewport); pgm_main (); /* Deinit */ gst_object_unref (canvas); gst_object_unref (viewport); pgm_deinit (); return 0; } pigment-0.3.17/examples/mappingmatrix.c0000644000175000017500000001126511205034420015024 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment mapping matrix example * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ #include static PgmViewport *viewport = NULL; /* Update fps text */ static gboolean update_fps_text_cb (gpointer data) { PgmDrawable *txt = PGM_DRAWABLE (data); gchar *fps_string; guint fps; pgm_viewport_get_frame_rate (viewport, &fps); fps_string = g_strdup_printf ("%d FPS", fps); pgm_text_set_markup (PGM_TEXT (txt), fps_string); g_free (fps_string); return TRUE; } /* Transform the mapping matrix of the image */ static gboolean update_pass_cb (PgmViewport *viewport, gpointer data) { PgmImage *image = PGM_IMAGE (data); static PgmMat4x4 *mapping = NULL; /* Get the current mapping matrix at the first call */ if (G_UNLIKELY (!mapping)) pgm_image_get_mapping_matrix (PGM_IMAGE (image), &mapping); /* Rotate the matrix about 2° around z axis at the center of the image */ pgm_mat4x4_translate_from_scalars (mapping, 0.5f, 0.5f, 0.0f); pgm_mat4x4_rotate_x (mapping, (gfloat) G_PI / 180.0f); pgm_mat4x4_rotate_y (mapping, (gfloat) G_PI / 180.0f); pgm_mat4x4_rotate_z (mapping, (gfloat) G_PI / 180.0f); pgm_mat4x4_translate_from_scalars (mapping, -0.5f, -0.5f, 0.0f); /* Set the new mapping matrix */ pgm_image_set_mapping_matrix (PGM_IMAGE (image), mapping); return TRUE; } /* key-press handler */ static void keypress_event_cb (PgmViewport *viewport, PgmEventKey *event, gpointer data) { static gboolean decorated = TRUE; if (event->type == PGM_KEY_PRESS) { switch (event->keyval) { /* Add/remove window decorations */ case PGM_d: decorated = !decorated; pgm_viewport_set_decorated (viewport, decorated); break; /* Handle quit */ case PGM_q: case PGM_Escape: pgm_main_quit (); break; default: break; } } } /* Entry point */ int main (int argc, char *argv[]) { const gchar *img_path = "examples/pictures/meiko.jpg"; PgmDrawable *img, *txt; PgmCanvas *canvas; /* Init */ pgm_init (&argc, &argv); /* OpenGL viewport creation */ pgm_viewport_factory_make ("opengl", &viewport); if (!viewport) { g_print ("Cannot create the 'opengl' viewport\n"); return -1; } pgm_viewport_set_size (viewport, 600, 600); pgm_viewport_set_title (viewport, "Mapping matrix"); /* Image definition */ img = pgm_image_new_from_file (img_path, 0); pgm_drawable_set_size (img, 400, 400); pgm_drawable_set_position (img, 100, 100, 0); pgm_drawable_set_bg_color (img, 0, 0, 255, 0); pgm_image_set_wrapping (PGM_IMAGE (img), PGM_IMAGE_TRANSPARENT, PGM_IMAGE_TRANSPARENT); pgm_drawable_show (img); /* Text definition */ txt = pgm_text_new ("0 FPS"); pgm_text_set_font_height (PGM_TEXT (txt), 20.0f); pgm_text_set_weight (PGM_TEXT (txt), PGM_TEXT_WEIGHT_BOLD); pgm_drawable_set_size (txt, 300, 20); pgm_drawable_set_position (txt, 10, 0, 0); pgm_drawable_set_bg_color (txt, 0, 0, 0, 0); pgm_drawable_show (txt); /* Canvas handling */ canvas = pgm_canvas_new (); pgm_canvas_set_size (canvas, 600, 600); pgm_viewport_set_canvas (viewport, canvas); pgm_canvas_add_many (canvas, PGM_DRAWABLE_MIDDLE, img, txt, NULL); /* Main loop */ g_signal_connect (G_OBJECT (viewport), "key-press-event", G_CALLBACK (keypress_event_cb), NULL); g_signal_connect (G_OBJECT (viewport), "delete-event", G_CALLBACK (pgm_main_quit), NULL); g_signal_connect (G_OBJECT (viewport), "update-pass", G_CALLBACK (update_pass_cb), img); pgm_viewport_show (viewport); g_timeout_add (1000, update_fps_text_cb, txt); pgm_main (); /* Deinit */ gst_object_unref (canvas); gst_object_unref (viewport); pgm_deinit (); return 0; } pigment-0.3.17/examples/Makefile.am0000644000175000017500000000406511205034420014034 00000000000000SUBDIRS = pictures noinst_PROGRAMS = \ image \ mappingmatrix \ wrapping \ rotations \ text \ video \ viewportopacity \ viewportprojection \ dragndrop image_CFLAGS = $(PGM_OPTION_CFLAGS) $(PGM_OBJ_CFLAGS) image_LDADD = $(PGM_OBJ_LIBS) mappingmatrix_CFLAGS = $(PGM_OPTION_CFLAGS) $(PGM_OBJ_CFLAGS) mappingmatrix_LDADD = $(PGM_OBJ_LIBS) wrapping_CFLAGS = $(PGM_OPTION_CFLAGS) $(PGM_OBJ_CFLAGS) wrapping_LDADD = $(PGM_OBJ_LIBS) rotations_CFLAGS = $(PGM_OPTION_CFLAGS) $(PGM_OBJ_CFLAGS) rotations_LDADD = $(PGM_OBJ_LIBS) text_CFLAGS = $(PGM_OPTION_CFLAGS) $(PGM_OBJ_CFLAGS) text_LDADD = $(PGM_OBJ_LIBS) video_CFLAGS = $(PGM_OPTION_CFLAGS) $(PGM_OBJ_CFLAGS) video_LDADD = $(PGM_OBJ_LIBS) viewportopacity_CFLAGS = $(PGM_OPTION_CFLAGS) $(PGM_OBJ_CFLAGS) viewportopacity_LDADD = $(PGM_OBJ_LIBS) viewportprojection_CFLAGS = $(PGM_OPTION_CFLAGS) $(PGM_OBJ_CFLAGS) viewportprojection_LDADD = $(PGM_OBJ_LIBS) dragndrop_CFLAGS = $(PGM_OPTION_CFLAGS) $(PGM_OBJ_CFLAGS) dragndrop_LDADD = $(PGM_OBJ_LIBS) if HAVE_CAIRO noinst_PROGRAMS += sphere sphere_CFLAGS = $(PGM_OPTION_CFLAGS) $(PGM_OBJ_CFLAGS) $(CAIRO_CFLAGS) sphere_LDADD = $(PGM_OBJ_LIBS) $(CAIRO_LIBS) endif if HAVE_CAIRO_XLIB noinst_PROGRAMS += xpixmapsystembuffer xpixmapsystembuffer_CFLAGS = $(PGM_OPTION_CFLAGS) $(PGM_OBJ_CFLAGS) $(CAIROXLIB_CFLAGS) xpixmapsystembuffer_LDADD = $(PGM_OBJ_LIBS) $(CAIROXLIB_LIBS) if HAVE_XCOMPOSITE noinst_PROGRAMS += xwindowsystembuffer xwindowsystembuffer_CFLAGS = $(PGM_OPTION_CFLAGS) $(PGM_OBJ_CFLAGS) $(CAIROXLIB_CFLAGS) $(XCOMPOSITE_CFLAGS) xwindowsystembuffer_LDADD = $(PGM_OBJ_LIBS) $(CAIROXLIB_LIBS) $(XCOMPOSITE_LIBS) endif endif if USE_IMAGING_LIBRARY noinst_PROGRAMS += imaging imaging_CFLAGS = $(PGM_OPTION_CFLAGS) $(GDKPIXBUF_CFLAGS) -I$(top_srcdir) imaging_LDADD = $(GDKPIXBUF_LIBS) $(top_builddir)/pgm/imaging/libpigment-imaging-@PGM_MAJORMINOR@.la endif if USE_GTK_WIDGET noinst_PROGRAMS += gtk gtk_CFLAGS = $(PGM_OPTION_CFLAGS) $(PGM_OBJ_CFLAGS) $(GTK_CFLAGS) -I$(top_srcdir) gtk_LDADD = $(PGM_OBJ_LIBS) $(GTK_LIBS) $(top_builddir)/pgm/gtk/libpigment-gtk-@PGM_MAJORMINOR@.la endif pigment-0.3.17/examples/wrapping.c0000644000175000017500000000772711205034420014003 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment image wrapping example * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ #include static PgmViewport *viewport = NULL; /* Transform the mapping matrix of the image */ static gboolean update_pass_cb (PgmViewport *viewport, gpointer data) { PgmImage *image = PGM_IMAGE (data); static PgmMat4x4 *mapping = NULL; /* Get the default mapping matrix at the first call and apply a scale on the * x axis to correct the aspect-ratio of the image content distorted by the * filled layout and the size of the image */ if (G_UNLIKELY (!mapping)) { pgm_image_get_mapping_matrix (PGM_IMAGE (image), &mapping); pgm_mat4x4_scale_from_scalars (mapping, 800.0f / 64.0f, 1.0f, 0.0f); } /* Simply translate the matrix on x to apply the effect */ pgm_mat4x4_translate_from_scalars (mapping, -0.005f, 0.0f, 0.0f); /* Set the new mapping matrix */ pgm_image_set_mapping_matrix (PGM_IMAGE (image), mapping); return TRUE; } /* key-press handler */ static void keypress_event_cb (PgmViewport *viewport, PgmEventKey *event, gpointer data) { static gboolean decorated = TRUE; if (event->type == PGM_KEY_PRESS) { switch (event->keyval) { /* Add/remove window decorations */ case PGM_d: decorated = !decorated; pgm_viewport_set_decorated (viewport, decorated); break; /* Handle quit */ case PGM_q: case PGM_Escape: pgm_main_quit (); break; default: break; } } } /* Entry point */ int main (int argc, char *argv[]) { const gchar *img_path = "examples/pictures/line-pattern.png"; PgmDrawable *img; PgmCanvas *canvas; /* Init */ pgm_init (&argc, &argv); /* OpenGL viewport creation */ pgm_viewport_factory_make ("opengl", &viewport); if (!viewport) { g_print ("Cannot create the 'opengl' viewport\n"); return -1; } pgm_viewport_set_size (viewport, 800, 164); pgm_viewport_set_title (viewport, "Image wrapping"); /* Image definition */ img = pgm_image_new_from_file (img_path, 0); pgm_image_set_layout (PGM_IMAGE (img), PGM_IMAGE_FILLED); pgm_image_set_wrapping (PGM_IMAGE (img), PGM_IMAGE_REPEAT, PGM_IMAGE_CLAMP); pgm_drawable_set_position (img, 50, 50, 0); pgm_drawable_set_size (img, 700, 64); pgm_drawable_set_bg_color (img, 0, 0, 0, 0); pgm_drawable_show (img); /* Canvas handling */ canvas = pgm_canvas_new (); pgm_canvas_set_size (canvas, 800, 164); pgm_viewport_set_canvas (viewport, canvas); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, img); /* Main loop */ g_signal_connect (G_OBJECT (viewport), "key-press-event", G_CALLBACK (keypress_event_cb), NULL); g_signal_connect (G_OBJECT (viewport), "delete-event", G_CALLBACK (pgm_main_quit), NULL); g_signal_connect (G_OBJECT (viewport), "update-pass", G_CALLBACK (update_pass_cb), img); pgm_viewport_show (viewport); pgm_main (); /* Deinit */ gst_object_unref (canvas); gst_object_unref (viewport); pgm_deinit (); return 0; } pigment-0.3.17/examples/viewportprojection.c0000644000175000017500000001325511205034420016121 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment viewport projection example * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ #include /* Text regeneration timeout tag */ static guint regenerate_tag = 0; /* Text regeneration handler */ static gboolean regenerate_cb (gpointer data) { PgmDrawable *text = PGM_DRAWABLE (data); pgm_drawable_regenerate (text); regenerate_tag = 0; return FALSE; } /* Configure event handler */ static void configure_event_cb (PgmViewport *viewport, PgmEventConfigure *event, gpointer data) { /* Remove current regeneration timeout */ if (regenerate_tag) g_source_remove (regenerate_tag); /* Then add the new regeneration timeout */ regenerate_tag = g_timeout_add (250, regenerate_cb, data); } /* Key press event handler */ static void keypress_event_cb (PgmViewport *viewport, PgmEventKey *event, gpointer data) { PgmDrawable *text = PGM_DRAWABLE (data); static gboolean fullscreen = FALSE; if (event->type == PGM_KEY_PRESS) { switch (event->keyval) { /* Fullscreen */ case PGM_f: fullscreen = !fullscreen; pgm_viewport_set_fullscreen (viewport, fullscreen); break; case PGM_1: case PGM_KP_1: pgm_viewport_set_canvas_rotation (viewport, PGM_VIEWPORT_ROTATION_NONE); pgm_drawable_regenerate (text); break; case PGM_2: case PGM_KP_2: pgm_viewport_set_canvas_rotation (viewport, PGM_VIEWPORT_ROTATION_90); pgm_drawable_regenerate (text); break; case PGM_3: case PGM_KP_3: pgm_viewport_set_canvas_rotation (viewport, PGM_VIEWPORT_ROTATION_180); pgm_drawable_regenerate (text); break; case PGM_4: case PGM_KP_4: pgm_viewport_set_canvas_rotation (viewport, PGM_VIEWPORT_ROTATION_270); pgm_drawable_regenerate (text); break; case PGM_5: case PGM_KP_5: pgm_viewport_set_canvas_reflection (viewport, PGM_VIEWPORT_REFLECTION_NONE); pgm_drawable_regenerate (text); break; case PGM_6: case PGM_KP_6: pgm_viewport_set_canvas_reflection (viewport, PGM_VIEWPORT_REFLECTION_HORIZONTAL_FLIP); pgm_drawable_regenerate (text); break; case PGM_7: case PGM_KP_7: pgm_viewport_set_canvas_reflection (viewport, PGM_VIEWPORT_REFLECTION_VERTICAL_FLIP); pgm_drawable_regenerate (text); break; /* Quit */ case PGM_q: case PGM_Escape: pgm_main_quit (); break; default: break; } } } /* Entry point */ int main (int argc, char *argv[]) { PgmViewport *viewport = NULL; PgmDrawable *text; PgmCanvas *canvas; /* Init */ pgm_init (&argc, &argv); /* OpenGL viewport creation */ pgm_viewport_factory_make ("opengl", &viewport); if (!viewport) { g_print ("Cannot create the 'opengl' viewport\n"); return -1; } pgm_viewport_set_title (viewport, "Viewport projection"); pgm_viewport_set_size (viewport, 640, 480); /* Text creation */ text = pgm_text_new ("" "Rotation\n" "'1': do not rotate\n" "'2': 90° counter-clockwise rotation\n" "'3': 180° counter-clockwise rotation\n" "'4': 270° counter-clockwise rotation\n" "\n" "Reflection\n" "'5': do not flip\n" "'6': horizontal flip\n" "'7': vertical flip\n" ""); pgm_text_set_font_height (PGM_TEXT (text), 25.0f); pgm_drawable_set_size (text, 600.0f, 400.0f); pgm_drawable_set_position (text, 10.0f, 10.0f, 0.0f); pgm_drawable_set_bg_color (text, 255, 255, 255, 0); pgm_drawable_set_fg_color (text, 225, 225, 255, 185); pgm_drawable_show (text); /* Canvas handling */ canvas = pgm_canvas_new (); pgm_canvas_set_size (canvas, 640.0f, 480.0f); pgm_viewport_set_canvas (viewport, canvas); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, text); /* Main loop */ g_signal_connect (G_OBJECT (viewport), "delete-event", G_CALLBACK (pgm_main_quit), NULL); g_signal_connect (G_OBJECT (viewport), "configure-event", G_CALLBACK (configure_event_cb), text); g_signal_connect (G_OBJECT (viewport), "key-press-event", G_CALLBACK (keypress_event_cb), text); pgm_viewport_show (viewport); pgm_main (); /* Deinit */ gst_object_unref (canvas); gst_object_unref (viewport); pgm_deinit (); return 0; } pigment-0.3.17/examples/video.c0000644000175000017500000001335311205034420013252 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment video example * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ #include static PgmDrawable *img = NULL; static gboolean pressed = FALSE; static gfloat last_x = 0; static gfloat last_y = 0; static void button_press_cb (PgmViewport *viewport, PgmEventButton *event, gpointer data) { if (event->button == PGM_BUTTON_LEFT) { last_x = event->x; last_y = event->y; pressed = TRUE; } } static void button_release_cb (PgmViewport *viewport, PgmEventButton *event, gpointer data) { if (event->button == PGM_BUTTON_LEFT) pressed = FALSE; } static void motion_notify_cb (PgmViewport *viewport, PgmEventMotion *event, gpointer data) { if (pressed) { PgmDrawable *drawable = PGM_DRAWABLE (data); gfloat angle_x, angle_y; pgm_drawable_get_rotation_x (drawable, &angle_x); pgm_drawable_get_rotation_y (drawable, &angle_y); angle_x += (last_y - event->y) / 200.0f; angle_y += (event->x - last_x) / 200.0f; pgm_drawable_set_rotation_x (drawable, angle_x); pgm_drawable_set_rotation_y (drawable, angle_y); last_x = event->x; last_y = event->y; } } static void keypress_event_cb (PgmViewport *viewport, PgmEventKey *event, gpointer data) { static gboolean fullscreen = FALSE; static gboolean visible = TRUE; if (event->type == PGM_KEY_PRESS) { switch (event->keyval) { /* Fullscreen */ case PGM_f: fullscreen = !fullscreen; pgm_viewport_set_fullscreen (viewport, fullscreen); break; /* Show/Hide */ case PGM_v: visible = !visible; if (visible) pgm_drawable_show (img); else pgm_drawable_hide (img); break; /* Quit */ case PGM_q: case PGM_Escape: pgm_main_quit (); break; default: break; } } } int main (int argc, char *argv[]) { PgmViewport *viewport = NULL; PgmCanvas *canvas; GstElement *pipeline, *image_sink; gulong formats; /* Argument check */ if (argc != 2) { g_print ("usage: %s uri\n", argv[0]); return -1; } /* Init */ pgm_init (&argc, &argv); /* OpenGL viewport creation */ pgm_viewport_factory_make ("opengl", &viewport); if (!viewport) { g_print ("Cannot create the 'opengl' viewport\n"); return -1; } pgm_viewport_set_title (viewport, "Video"); pgm_viewport_set_alpha_blending (viewport, FALSE); /* Display supported pixel formats */ pgm_viewport_get_pixel_formats (viewport, &formats); g_print ("Formats supported by 'opengl' viewport:\n" "RGB: %s\nRGBA: %s\nBGR: %s\nBGRA: %s\nI420: %s\nYV12: %s\n" "YUYV: %s\nUYVY: %s\n", (formats & PGM_IMAGE_RGB) != 0 ? "Yes" : "No", (formats & PGM_IMAGE_RGBA) != 0 ? "Yes" : "No", (formats & PGM_IMAGE_BGR) != 0 ? "Yes" : "No", (formats & PGM_IMAGE_BGRA) != 0 ? "Yes" : "No", (formats & PGM_IMAGE_I420) != 0 ? "Yes" : "No", (formats & PGM_IMAGE_YV12) != 0 ? "Yes" : "No", (formats & PGM_IMAGE_YUYV) != 0 ? "Yes" : "No", (formats & PGM_IMAGE_UYVY) != 0 ? "Yes" : "No"); /* Image definition */ img = pgm_image_new (); pgm_drawable_set_size (img, 800.0f, 600.0f); pgm_drawable_set_position (img, 0.0f, 0.0f, 0.0f); pgm_drawable_set_bg_color (img, 0, 0, 0, 0); pgm_drawable_show (img); /* Canvas handling */ canvas = pgm_canvas_new (); pgm_canvas_set_size (canvas, 800, 600); pgm_viewport_set_canvas (viewport, canvas); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, img); /* GStreamer pipeline setup */ pipeline = gst_element_factory_make ("playbin", NULL); image_sink = gst_element_factory_make ("pgmimagesink", NULL); g_object_set (G_OBJECT (pipeline), "uri", argv[1], NULL); g_object_set (G_OBJECT (pipeline), "video-sink", image_sink, NULL); g_object_set (G_OBJECT (image_sink), "image", img, NULL); gst_element_set_state (pipeline, GST_STATE_PLAYING); /* Main loop */ g_signal_connect (G_OBJECT (viewport), "delete-event", G_CALLBACK (pgm_main_quit), NULL); g_signal_connect (G_OBJECT (viewport), "button-press-event", G_CALLBACK (button_press_cb), NULL); g_signal_connect (G_OBJECT (viewport), "button-release-event", G_CALLBACK (button_release_cb), NULL); g_signal_connect (G_OBJECT (viewport), "motion-notify-event", G_CALLBACK (motion_notify_cb), img); g_signal_connect (G_OBJECT (viewport), "key-press-event", G_CALLBACK (keypress_event_cb), NULL); pgm_viewport_show (viewport); pgm_main (); /* Deinit */ gst_object_unref (canvas); gst_object_unref (viewport); pgm_deinit (); return 0; } pigment-0.3.17/examples/sphere.c0000644000175000017500000001350311205034420013427 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment sphere example * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Guillaume Emont */ #include #include #include #include /* Offset added to the sphere */ #define OFFSET 20 /* Take a screenshot of the current viewport content */ static void take_screenshot (PgmViewport *viewport) { gint width = 0, height = 0; guint8 *pixels = NULL; pgm_viewport_get_size (viewport, &width, &height); /* Pixels retrieved are in the RGBA color space. The pixel buffer shall * be cleaned in the 'pixels-read' signal handler. */ pixels = g_malloc (width * height * 4); /* Take a screenshot of the whole viewport */ pgm_viewport_read_pixels (viewport, 0, 0, width, height, pixels); } /* "pixels-read" handler */ static void pixels_read_cb (PgmViewport *viewport, guint width, guint height, gpointer pixels, gpointer data) { GdkPixbuf *pixbuf = NULL; pixbuf = gdk_pixbuf_new_from_data (pixels, GDK_COLORSPACE_RGB, TRUE, 8, width, height, width*4, NULL, NULL); gdk_pixbuf_save (pixbuf, "screenshot.png", "png", NULL, NULL); g_print ("Screenshot saved in './screenshot.png'\n"); g_object_unref (pixbuf); pixbuf = NULL; g_free (pixels); pixels = NULL; } /* Key-press handler */ static void key_press_event_cb (PgmViewport *viewport, PgmEventKey *event, PgmDrawable *drawable) { gfloat x, y, z; pgm_drawable_get_position (drawable, &x, &y, &z); switch (event->keyval) { case PGM_Up: y -= OFFSET; break; case PGM_Down: y += OFFSET; break; case PGM_Left: x -= OFFSET; break; case PGM_Right: x += OFFSET; break; case PGM_s: case PGM_S: z -= OFFSET; break; case PGM_x: case PGM_X: z += OFFSET; break; case PGM_p: case PGM_P: take_screenshot (viewport); break; case PGM_q: case PGM_Q: pgm_main_quit (); return; default: return; } pgm_drawable_set_position (drawable, x, y, z); } /* Allocates a memory buffer in data and draws a gradient sphere with * the Cairo library in it */ PgmError cairo_drawing (guchar **data, gint width, gint height) { PgmError err = PGM_ERROR_OK; cairo_pattern_t *pat = NULL; cairo_surface_t *surface; cairo_t *ctx; if (!data) return PGM_ERROR_X; *data = g_malloc0 (width * height * 4 * sizeof (guchar)); surface = cairo_image_surface_create_for_data (*data, CAIRO_FORMAT_ARGB32, width, height, width * 4); ctx = cairo_create (surface); if (!(surface && ctx)) { err = PGM_ERROR_X; goto tidy; } cairo_scale (ctx, width, height); pat = cairo_pattern_create_radial (0.45, 0.4, 0.1, 0.4, 0.4, 0.5); if (!pat) { err = PGM_ERROR_X; goto tidy; } cairo_pattern_add_color_stop_rgba (pat, 0, 0.8, 0.8, 1, 1); cairo_pattern_add_color_stop_rgba (pat, 1, 0, 0, 1, 1); cairo_set_source (ctx, pat); cairo_arc (ctx, 0.5, 0.5, 0.3, 0, 2 * M_PI); cairo_fill (ctx); tidy: cairo_pattern_destroy (pat); cairo_surface_destroy (surface); cairo_destroy (ctx); return err; } /* Entry point */ int main (int argc, char *argv[]) { PgmError ret = PGM_ERROR_OK; PgmViewport *viewport = NULL; PgmCanvas *canvas; PgmDrawable *img; guchar *data; g_print ("arrows : Move the sphere around\n" "'s' : Zoom out\n" "'x' : Zoom in\n" "'p' : Take a screenshot\n\n"); /* Init */ pgm_init (&argc, &argv); /* OpenGL viewport creation */ pgm_viewport_factory_make ("opengl", &viewport); if (!viewport) { g_print ("Cannot create the 'opengl' viewport\n"); return -1; } pgm_viewport_set_title (viewport, "Cairo sphere"); g_signal_connect (G_OBJECT (viewport), "pixels-read", G_CALLBACK (pixels_read_cb), NULL); /* sphere creation */ ret = cairo_drawing (&data, 400, 400); g_assert (PGM_ERROR_OK == ret); img = pgm_image_new_from_buffer (PGM_IMAGE_BGRA, 400, 400, 400 * 4, 400 * 400 * 4, data); pgm_drawable_set_bg_color (img, 255, 255, 255, 0); pgm_drawable_set_position (img, 200, 100, 0); pgm_drawable_set_size (img, 400, 400); pgm_drawable_show (img); /* Canvas handling */ canvas = pgm_canvas_new (); pgm_canvas_set_size (canvas, 800, 600); pgm_viewport_set_canvas (viewport, canvas); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, PGM_DRAWABLE (img)); /* Main loop */ g_signal_connect (G_OBJECT (viewport), "key-press-event", G_CALLBACK (key_press_event_cb), img); g_signal_connect (G_OBJECT (viewport), "delete-event", G_CALLBACK (pgm_main_quit), NULL); pgm_viewport_show (viewport); pgm_main (); /* Deinit */ g_object_unref (canvas); g_object_unref (viewport); pgm_deinit (); g_free (data); return 0; } pigment-0.3.17/examples/xwindowsystembuffer.c0000644000175000017500000002426311205034420016304 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment X11 windows as image system buffers example * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ #include #include #include #include #include #include #include static PgmDrawable *img1 = NULL; static PgmDrawable *img2 = NULL; static Pixmap *raw_pixmap = NULL; static Pixmap *cairo_pixmap = NULL; static Display *dpy = NULL; static Window raw_window; static Window cairo_window; static void keypress_event_cb (PgmViewport *viewport, PgmEventKey *event, gpointer data) { if (event->type == PGM_KEY_PRESS) { switch (event->keyval) { /* Quit */ case PGM_q: case PGM_Escape: pgm_main_quit (); break; default: break; } } } static gboolean render_raw_xlib_window (gpointer data) { static const gchar *color_string[6] = { "#FF0000", "#00FF00", "#0000FF", "#FFFF00", "#FF00FF", "#00FFFF" }; XColor color[6]; Colormap colormap; unsigned int i; GC gc; colormap = DefaultColormap (dpy, 0); for (i = 0; i < 4; i++) { XParseColor (dpy, colormap, color_string[rand () % 6], &color[i]); XAllocColor (dpy, colormap, &color[i]); } pgm_image_system_buffer_lock (PGM_IMAGE (img1)); gc = XCreateGC (dpy, raw_window, 0, NULL); /* Render */ XSetForeground (dpy, gc, color[0].pixel); XFillRectangle (dpy, raw_window, gc, 0, 0, 175, 175); XSetForeground (dpy, gc, color[1].pixel); XFillRectangle (dpy, raw_window, gc, 175, 0, 350, 175); XSetForeground (dpy, gc, color[2].pixel); XFillRectangle (dpy, raw_window, gc, 0, 175, 175, 350); XSetForeground (dpy, gc, color[3].pixel); XFillRectangle (dpy, raw_window, gc, 175, 175, 350, 350); XFreeGC (dpy, gc); XSync (dpy, False); pgm_image_system_buffer_unlock (PGM_IMAGE (img1)); return TRUE; } static gboolean render_cairo_xlib_window (int screen) { double x1 = 140.0, y1 = 315.0, x2 = 210.0, y2 = 35.0, x3 = 315.0, y3 = 175.0; double x = 35.0, y = 175.0; cairo_surface_t *surface; cairo_t *cr; pgm_image_system_buffer_lock (PGM_IMAGE (img2)); /* Create surface and context */ surface = cairo_xlib_surface_create (dpy, cairo_window, DefaultVisual (dpy, screen), 350, 350); if (!surface) return FALSE; cr = cairo_create (surface); if (!cr) { cairo_surface_destroy (surface); return FALSE; } /* Render */ cairo_set_source_rgba (cr, 1, 1, 1, 1); cairo_paint (cr); cairo_set_source_rgba (cr, 0, 0, 0, 1); cairo_move_to (cr, x, y); cairo_curve_to (cr, x1, y1, x2, y2, x3, y3); cairo_set_line_width (cr, 10.0); cairo_stroke (cr); cairo_set_source_rgba (cr, 1, 0.2, 0.2, 0.6); cairo_set_line_width (cr, 6.0); cairo_move_to (cr,x,y); cairo_line_to (cr,x1,y1); cairo_move_to (cr,x2,y2); cairo_line_to (cr,x3,y3); cairo_stroke (cr); /* Then destroy the surface and context */ cairo_destroy (cr); cairo_surface_destroy (surface); XSync (dpy, False); pgm_image_system_buffer_unlock (PGM_IMAGE (img2)); return TRUE; } static gboolean update_images_opacity (gpointer data) { static gfloat angle = 3.1415f / 2.0f; gfloat opacity; opacity = (((sin (angle) + 1.0f) / 2.0f) * 200.0f) + 55.0f; angle += 0.1f; pgm_drawable_set_opacity (img1, opacity); pgm_drawable_set_opacity (img2, opacity); return TRUE; } int main (int argc, char *argv[]) { PgmDrawable *text1 = NULL, *text2 = NULL; PgmViewport *viewport = NULL; PgmCanvas *canvas = NULL; gulong caps_mask = 0; XSizeHints sizehints; int root, screen; /* Init */ pgm_init (&argc, &argv); /* OpenGL viewport creation */ pgm_viewport_factory_make ("opengl", &viewport); if (!viewport) { g_print ("Cannot create the 'opengl' viewport\n"); return -1; } pgm_viewport_set_size (viewport, 775, 415); pgm_viewport_set_title (viewport, "Xlib windows as image system buffers"); g_signal_connect (G_OBJECT (viewport), "key-press-event", G_CALLBACK (keypress_event_cb), NULL); g_signal_connect (G_OBJECT (viewport), "delete-event", G_CALLBACK (pgm_main_quit), NULL); /* Exit if system buffers are not supported */ pgm_viewport_get_caps_mask (viewport, &caps_mask); if (!(caps_mask & PGM_VIEWPORT_X11_SYSTEM_BUFFER)) { g_print ("X11 system buffer not supported by the OpenGL plugin, your " "graphical card has to support non-power-of-two textures and " "your GLX implementation has to support the texture_from_pixmap " "extension. Try to set the LIBGL_ALWAYS_INDIRECT environment " "variable with Mesa DRI drivers\n"); gst_object_unref (viewport); pgm_deinit (); return -1; } dpy = XOpenDisplay (g_getenv ("DISPLAY")); if (!dpy) { g_print ("couldn't open default display\n"); gst_object_unref (viewport); pgm_deinit (); return -1; } screen = DefaultScreen (dpy); root = RootWindow (dpy, screen); /* Create the X11 raw Window and get a composited X11 Pixmap */ raw_window = XCreateSimpleWindow (dpy, root, 25, 475, 350, 350, XDefaultDepth (dpy, screen), BlackPixel (dpy, screen), WhitePixel (dpy, screen)); sizehints.flags = USSize | USPosition; XSetStandardProperties (dpy, raw_window, "Window rendered with Xlib", "Window rendered with Xlib", None, (char**) NULL, 0, &sizehints); XMapWindow (dpy, raw_window); XSync (dpy, False); XCompositeRedirectWindow (dpy, raw_window, CompositeRedirectAutomatic); raw_pixmap = g_slice_new (Pixmap); *raw_pixmap = XCompositeNameWindowPixmap (dpy, raw_window); /* Create the X11 Cairo Window and get a composited X11 Pixmap */ cairo_window = XCreateSimpleWindow (dpy, root, 400, 475, 350, 350, XDefaultDepth (dpy, screen), BlackPixel (dpy, screen), WhitePixel (dpy, screen)); sizehints.flags = USSize | USPosition; XSetStandardProperties (dpy, cairo_window, "Window rendered with Cairo Xlib", "Window rendered with Cairo Xlib", None, (char**) NULL, 0, &sizehints); XMapWindow (dpy, cairo_window); XSync (dpy, False); XCompositeRedirectWindow (dpy, cairo_window, CompositeRedirectAutomatic); cairo_pixmap = g_slice_new (Pixmap); *cairo_pixmap = XCompositeNameWindowPixmap (dpy, cairo_window); /* 1st text for X11 Window */ text1 = pgm_text_new ("Xlib rendered window:"); pgm_text_set_font_height (PGM_TEXT (text1), 20.0f); pgm_drawable_set_size (text1, 350.0f, 20.0f); pgm_drawable_set_position (text1, 25.0f, 15.0f, 0.0f); pgm_drawable_set_bg_color (text1, 255, 255, 255, 0); pgm_drawable_set_fg_color (text1, 255, 255, 255, 255); pgm_drawable_show (text1); /* 1st image for X11 Window */ img1 = pgm_image_new (); pgm_image_set_from_system_buffer (PGM_IMAGE (img1), PGM_IMAGE_RGB, 350, 350, raw_pixmap); pgm_drawable_set_size (img1, 350.0f, 350.0f); pgm_drawable_set_position (img1, 25.0f, 40.0f, 0.0f); pgm_drawable_set_fg_color (img1, 255, 255, 255, 255); pgm_drawable_set_bg_color (img1, 255, 255, 255, 0); pgm_drawable_show (img1); /* 2nd text for Cairo X11 Window */ text2 = pgm_text_new ("Cairo Xlib rendered window:"); pgm_drawable_set_size (text2, 350.0f, 20.0f); pgm_text_set_font_height (PGM_TEXT (text2), 20.0f); pgm_drawable_set_position (text2, 400.0f, 15.0f, 0.0f); pgm_drawable_set_bg_color (text2, 255, 255, 255, 0); pgm_drawable_set_fg_color (text2, 255, 255, 255, 255); pgm_drawable_show (text2); /* 2nd image for Cairo X11 Window */ img2 = pgm_image_new (); pgm_image_set_from_system_buffer (PGM_IMAGE (img2), PGM_IMAGE_RGB, 350, 350, cairo_pixmap); pgm_drawable_set_size (img2, 350.0f, 350.0f); pgm_drawable_set_position (img2, 400.0f, 40.0f, 0.0f); pgm_drawable_set_fg_color (img2, 255, 255, 255, 255); pgm_drawable_set_bg_color (img2, 255, 255, 255, 0); pgm_drawable_show (img2); srand (time (NULL)); /* Render windows */ if (!render_raw_xlib_window (NULL)) { g_print ("Cannot render the raw xlib pixmap\n"); return -1; } if (!render_cairo_xlib_window (screen)) { g_print ("Cannot render the cairo xlib pixmap\n"); return -1; } /* Canvas handling */ canvas = pgm_canvas_new (); pgm_canvas_set_size (canvas, 775.0f, 415.0f); pgm_viewport_set_canvas (viewport, canvas); pgm_canvas_add_many (canvas, PGM_DRAWABLE_MIDDLE, text1, img1, text2, img2, NULL); /* Add a source to modify the X11 pixmap each 500 ms */ g_timeout_add (500, render_raw_xlib_window, NULL); g_timeout_add (40, update_images_opacity, NULL); /* Main loop */ pgm_viewport_show (viewport); pgm_main (); /* Deinit */ gst_object_unref (canvas); gst_object_unref (viewport); XFreePixmap (dpy, *raw_pixmap); g_slice_free (Pixmap, raw_pixmap); XFreePixmap (dpy, *cairo_pixmap); g_slice_free (Pixmap, cairo_pixmap); XCloseDisplay (dpy); pgm_deinit (); return 0; } pigment-0.3.17/examples/text.c0000644000175000017500000001535411205034420013133 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment text example * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ #include PgmDrawable *txt1, *txt2, *txt3; PgmCanvas *canvas; static void configure_event_cb (PgmViewport *viewport, PgmEventConfigure *event, gpointer data) { pgm_canvas_regenerate (canvas); } static void key_press_event_cb (PgmViewport *viewport, PgmEventKey *event, gpointer data) { /* Switch monoline/multiline */ if (event->keyval == PGM_m) { static gboolean multiline = TRUE; multiline = !multiline; pgm_text_set_multiline (PGM_TEXT (txt1), multiline); pgm_text_set_multiline (PGM_TEXT (txt2), multiline); pgm_text_set_multiline (PGM_TEXT (txt3), multiline); } /* Change ellipsizing */ else if (event->keyval == PGM_e) { static PgmTextEllipsize ellipsize = PGM_TEXT_ELLIPSIZE_NONE; if (ellipsize == PGM_TEXT_ELLIPSIZE_NONE) ellipsize = PGM_TEXT_ELLIPSIZE_END; else ellipsize = PGM_TEXT_ELLIPSIZE_NONE; pgm_text_set_ellipsize (PGM_TEXT (txt1), ellipsize); pgm_text_set_ellipsize (PGM_TEXT (txt2), ellipsize); pgm_text_set_ellipsize (PGM_TEXT (txt3), ellipsize); } /* Change alignment */ else if (event->keyval == PGM_a) { static PgmTextAlignment alignment = PGM_TEXT_ALIGN_LEFT; if (alignment == PGM_TEXT_ALIGN_LEFT) alignment = PGM_TEXT_ALIGN_CENTER; else if (alignment == PGM_TEXT_ALIGN_CENTER) alignment = PGM_TEXT_ALIGN_RIGHT; else alignment = PGM_TEXT_ALIGN_LEFT; pgm_text_set_alignment (PGM_TEXT (txt1), alignment); pgm_text_set_alignment (PGM_TEXT (txt2), alignment); pgm_text_set_alignment (PGM_TEXT (txt3), alignment); } /* Change shadow casting state */ else if (event->keyval == PGM_s) { static gboolean cast_shadow = FALSE; cast_shadow = !cast_shadow; pgm_text_set_cast_shadow (PGM_TEXT (txt1), cast_shadow); pgm_text_set_cast_shadow (PGM_TEXT (txt2), cast_shadow); pgm_text_set_cast_shadow (PGM_TEXT (txt3), cast_shadow); } /* Change shadow casting state */ else if (event->keyval == PGM_p) { static PgmTextShadowPosition shadow_position = PGM_TEXT_SHADOW_NORTH; if (shadow_position == PGM_TEXT_SHADOW_NORTH) shadow_position = PGM_TEXT_SHADOW_NORTH_EAST; else if (shadow_position == PGM_TEXT_SHADOW_NORTH_EAST) shadow_position = PGM_TEXT_SHADOW_EAST; else if (shadow_position == PGM_TEXT_SHADOW_EAST) shadow_position = PGM_TEXT_SHADOW_SOUTH_EAST; else if (shadow_position == PGM_TEXT_SHADOW_SOUTH_EAST) shadow_position = PGM_TEXT_SHADOW_SOUTH; else if (shadow_position == PGM_TEXT_SHADOW_SOUTH) shadow_position = PGM_TEXT_SHADOW_SOUTH_WEST; else if (shadow_position == PGM_TEXT_SHADOW_SOUTH_WEST) shadow_position = PGM_TEXT_SHADOW_WEST; else if (shadow_position == PGM_TEXT_SHADOW_WEST) shadow_position = PGM_TEXT_SHADOW_NORTH_WEST; else if (shadow_position == PGM_TEXT_SHADOW_NORTH_WEST) shadow_position = PGM_TEXT_SHADOW_NORTH; pgm_text_set_shadow_position (PGM_TEXT (txt1), shadow_position); pgm_text_set_shadow_position (PGM_TEXT (txt2), shadow_position); pgm_text_set_shadow_position (PGM_TEXT (txt3), shadow_position); } /* Change fullscreen state */ else if (event->keyval == PGM_f) { static gboolean fullscreen = FALSE; fullscreen = !fullscreen; pgm_viewport_set_fullscreen (viewport, fullscreen); } } int main (int argc, char *argv[]) { static const gchar *label = "Pigment is a 3D scene graph library designed to easily create rich " "application user interfaces"; PgmViewport *viewport = NULL; /* Init */ pgm_init (&argc, &argv); /* OpenGL viewport creation */ pgm_viewport_factory_make ("opengl", &viewport); if (!viewport) { g_print ("Cannot create the 'opengl' viewport\n"); return -1; } pgm_viewport_set_title (viewport, "Text"); /* Text creation */ txt1 = pgm_text_new (NULL); pgm_text_set_markup (PGM_TEXT (txt1), label); pgm_text_set_font_height (PGM_TEXT (txt1), 0.4f); pgm_drawable_set_size (txt1, 1.0f, 2.5f); pgm_drawable_set_position (txt1, 0.25f, 0.25f, 0.0f); pgm_drawable_set_fg_color (txt1, 240, 240, 240, 255); pgm_drawable_set_bg_color (txt1, 120, 120, 120, 255); pgm_drawable_show (txt1); /* Text creation */ txt2 = pgm_text_new (NULL); pgm_text_set_markup (PGM_TEXT (txt2), label); pgm_text_set_font_height (PGM_TEXT (txt2), 0.25f); pgm_drawable_set_size (txt2, 1.0f, 2.5f); pgm_drawable_set_position (txt2, 1.5f, 0.25f, 0.0f); pgm_drawable_set_fg_color (txt2, 240, 240, 240, 255); pgm_drawable_set_bg_color (txt2, 120, 120, 120, 255); pgm_drawable_show (txt2); /* Text creation */ txt3 = pgm_text_new (NULL); pgm_text_set_markup (PGM_TEXT (txt3), label); pgm_text_set_font_height (PGM_TEXT (txt3), 0.1f); pgm_drawable_set_size (txt3, 1.0f, 2.5f); pgm_drawable_set_position (txt3, 2.75f, 0.25f, 0.0f); pgm_drawable_set_fg_color (txt3, 240, 240, 240, 255); pgm_drawable_set_bg_color (txt3, 120, 120, 120, 255); pgm_drawable_show (txt3); /* Canvas handling */ canvas = pgm_canvas_new (); pgm_canvas_set_size (canvas, 4.0f, 3.0f); pgm_viewport_set_canvas (viewport, canvas); pgm_canvas_add_many (canvas, PGM_DRAWABLE_MIDDLE, txt1, txt2, txt3, NULL); /* Main loop */ g_signal_connect (G_OBJECT (viewport), "key-press-event", G_CALLBACK (key_press_event_cb), NULL); g_signal_connect (G_OBJECT (viewport), "delete-event", G_CALLBACK (pgm_main_quit), NULL); g_signal_connect (G_OBJECT (viewport), "configure-event", G_CALLBACK (configure_event_cb), NULL); pgm_viewport_show (viewport); pgm_main (); /* Deinit */ gst_object_unref (canvas); gst_object_unref (viewport); pgm_deinit (); return 0; } pigment-0.3.17/examples/Makefile.in0000644000175000017500000016052411205034672014061 00000000000000# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ noinst_PROGRAMS = image$(EXEEXT) mappingmatrix$(EXEEXT) \ wrapping$(EXEEXT) rotations$(EXEEXT) text$(EXEEXT) \ video$(EXEEXT) viewportopacity$(EXEEXT) \ viewportprojection$(EXEEXT) dragndrop$(EXEEXT) $(am__EXEEXT_1) \ $(am__EXEEXT_2) $(am__EXEEXT_3) $(am__EXEEXT_4) \ $(am__EXEEXT_5) @HAVE_CAIRO_TRUE@am__append_1 = sphere @HAVE_CAIRO_XLIB_TRUE@am__append_2 = xpixmapsystembuffer @HAVE_CAIRO_XLIB_TRUE@@HAVE_XCOMPOSITE_TRUE@am__append_3 = xwindowsystembuffer @USE_IMAGING_LIBRARY_TRUE@am__append_4 = imaging @USE_GTK_WIDGET_TRUE@am__append_5 = gtk subdir = examples DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/as-compiler-flag.m4 \ $(top_srcdir)/common/m4/as-version.m4 \ $(top_srcdir)/common/m4/check.m4 \ $(top_srcdir)/common/m4/gst-args.m4 \ $(top_srcdir)/common/m4/gst-check.m4 \ $(top_srcdir)/common/m4/gst-error.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/libtool.m4 \ $(top_srcdir)/common/m4/ltoptions.m4 \ $(top_srcdir)/common/m4/ltsugar.m4 \ $(top_srcdir)/common/m4/ltversion.m4 \ $(top_srcdir)/common/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @HAVE_CAIRO_TRUE@am__EXEEXT_1 = sphere$(EXEEXT) @HAVE_CAIRO_XLIB_TRUE@am__EXEEXT_2 = xpixmapsystembuffer$(EXEEXT) @HAVE_CAIRO_XLIB_TRUE@@HAVE_XCOMPOSITE_TRUE@am__EXEEXT_3 = xwindowsystembuffer$(EXEEXT) @USE_IMAGING_LIBRARY_TRUE@am__EXEEXT_4 = imaging$(EXEEXT) @USE_GTK_WIDGET_TRUE@am__EXEEXT_5 = gtk$(EXEEXT) PROGRAMS = $(noinst_PROGRAMS) dragndrop_SOURCES = dragndrop.c dragndrop_OBJECTS = dragndrop-dragndrop.$(OBJEXT) am__DEPENDENCIES_1 = dragndrop_DEPENDENCIES = $(am__DEPENDENCIES_1) dragndrop_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(dragndrop_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ gtk_SOURCES = gtk.c gtk_OBJECTS = gtk-gtk.$(OBJEXT) @USE_GTK_WIDGET_TRUE@gtk_DEPENDENCIES = $(am__DEPENDENCIES_1) \ @USE_GTK_WIDGET_TRUE@ $(am__DEPENDENCIES_1) \ @USE_GTK_WIDGET_TRUE@ $(top_builddir)/pgm/gtk/libpigment-gtk-@PGM_MAJORMINOR@.la gtk_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(gtk_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ image_SOURCES = image.c image_OBJECTS = image-image.$(OBJEXT) image_DEPENDENCIES = $(am__DEPENDENCIES_1) image_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(image_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ imaging_SOURCES = imaging.c imaging_OBJECTS = imaging-imaging.$(OBJEXT) @USE_IMAGING_LIBRARY_TRUE@imaging_DEPENDENCIES = \ @USE_IMAGING_LIBRARY_TRUE@ $(am__DEPENDENCIES_1) \ @USE_IMAGING_LIBRARY_TRUE@ $(top_builddir)/pgm/imaging/libpigment-imaging-@PGM_MAJORMINOR@.la imaging_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(imaging_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ mappingmatrix_SOURCES = mappingmatrix.c mappingmatrix_OBJECTS = mappingmatrix-mappingmatrix.$(OBJEXT) mappingmatrix_DEPENDENCIES = $(am__DEPENDENCIES_1) mappingmatrix_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(mappingmatrix_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ rotations_SOURCES = rotations.c rotations_OBJECTS = rotations-rotations.$(OBJEXT) rotations_DEPENDENCIES = $(am__DEPENDENCIES_1) rotations_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(rotations_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ sphere_SOURCES = sphere.c sphere_OBJECTS = sphere-sphere.$(OBJEXT) @HAVE_CAIRO_TRUE@sphere_DEPENDENCIES = $(am__DEPENDENCIES_1) \ @HAVE_CAIRO_TRUE@ $(am__DEPENDENCIES_1) sphere_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(sphere_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ text_SOURCES = text.c text_OBJECTS = text-text.$(OBJEXT) text_DEPENDENCIES = $(am__DEPENDENCIES_1) text_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(text_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ video_SOURCES = video.c video_OBJECTS = video-video.$(OBJEXT) video_DEPENDENCIES = $(am__DEPENDENCIES_1) video_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(video_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ viewportopacity_SOURCES = viewportopacity.c viewportopacity_OBJECTS = viewportopacity-viewportopacity.$(OBJEXT) viewportopacity_DEPENDENCIES = $(am__DEPENDENCIES_1) viewportopacity_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(viewportopacity_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ viewportprojection_SOURCES = viewportprojection.c viewportprojection_OBJECTS = \ viewportprojection-viewportprojection.$(OBJEXT) viewportprojection_DEPENDENCIES = $(am__DEPENDENCIES_1) viewportprojection_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(viewportprojection_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ wrapping_SOURCES = wrapping.c wrapping_OBJECTS = wrapping-wrapping.$(OBJEXT) wrapping_DEPENDENCIES = $(am__DEPENDENCIES_1) wrapping_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(wrapping_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ xpixmapsystembuffer_SOURCES = xpixmapsystembuffer.c xpixmapsystembuffer_OBJECTS = \ xpixmapsystembuffer-xpixmapsystembuffer.$(OBJEXT) @HAVE_CAIRO_XLIB_TRUE@xpixmapsystembuffer_DEPENDENCIES = \ @HAVE_CAIRO_XLIB_TRUE@ $(am__DEPENDENCIES_1) \ @HAVE_CAIRO_XLIB_TRUE@ $(am__DEPENDENCIES_1) xpixmapsystembuffer_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(xpixmapsystembuffer_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ xwindowsystembuffer_SOURCES = xwindowsystembuffer.c xwindowsystembuffer_OBJECTS = \ xwindowsystembuffer-xwindowsystembuffer.$(OBJEXT) @HAVE_CAIRO_XLIB_TRUE@@HAVE_XCOMPOSITE_TRUE@xwindowsystembuffer_DEPENDENCIES = $(am__DEPENDENCIES_1) \ @HAVE_CAIRO_XLIB_TRUE@@HAVE_XCOMPOSITE_TRUE@ $(am__DEPENDENCIES_1) \ @HAVE_CAIRO_XLIB_TRUE@@HAVE_XCOMPOSITE_TRUE@ $(am__DEPENDENCIES_1) xwindowsystembuffer_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(xwindowsystembuffer_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = dragndrop.c gtk.c image.c imaging.c mappingmatrix.c \ rotations.c sphere.c text.c video.c viewportopacity.c \ viewportprojection.c wrapping.c xpixmapsystembuffer.c \ xwindowsystembuffer.c DIST_SOURCES = dragndrop.c gtk.c image.c imaging.c mappingmatrix.c \ rotations.c sphere.c text.c video.c viewportopacity.c \ viewportprojection.c wrapping.c xpixmapsystembuffer.c \ xwindowsystembuffer.c RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAIROXLIB_CFLAGS = @CAIROXLIB_CFLAGS@ CAIROXLIB_LIBS = @CAIROXLIB_LIBS@ CAIRO_CFLAGS = @CAIRO_CFLAGS@ CAIRO_LIBS = @CAIRO_LIBS@ CC = @CC@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXEEXT = @EXEEXT@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ GCOV = @GCOV@ GCOV_CFLAGS = @GCOV_CFLAGS@ GCOV_LIBS = @GCOV_LIBS@ GDKPIXBUFXLIB_CFLAGS = @GDKPIXBUFXLIB_CFLAGS@ GDKPIXBUFXLIB_LIBS = @GDKPIXBUFXLIB_LIBS@ GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@ GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ GST_0_10_13_CFLAGS = @GST_0_10_13_CFLAGS@ GST_0_10_13_LIBS = @GST_0_10_13_LIBS@ GST_10_10_CFLAGS = @GST_10_10_CFLAGS@ GST_10_10_LIBS = @GST_10_10_LIBS@ GST_10_11_CFLAGS = @GST_10_11_CFLAGS@ GST_10_11_LIBS = @GST_10_11_LIBS@ GST_10_12_CFLAGS = @GST_10_12_CFLAGS@ GST_10_12_LIBS = @GST_10_12_LIBS@ GST_10_13_CFLAGS = @GST_10_13_CFLAGS@ GST_10_13_LIBS = @GST_10_13_LIBS@ GST_10_14_CFLAGS = @GST_10_14_CFLAGS@ GST_10_14_LIBS = @GST_10_14_LIBS@ GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ GST_BASE_LIBS = @GST_BASE_LIBS@ GST_CFLAGS = @GST_CFLAGS@ GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ GST_CHECK_LIBS = @GST_CHECK_LIBS@ GST_LIBS = @GST_LIBS@ GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ GST_TOOLS_DIR = @GST_TOOLS_DIR@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_GTK_WIDGET = @HAVE_GTK_WIDGET@ HAVE_IMAGING_LIBRARY = @HAVE_IMAGING_LIBRARY@ HAVE_OPENGLES_PLUGIN = @HAVE_OPENGLES_PLUGIN@ HAVE_OPENGL_PLUGIN = @HAVE_OPENGL_PLUGIN@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGLADE_2_0_CFLAGS = @LIBGLADE_2_0_CFLAGS@ LIBGLADE_2_0_LIBS = @LIBGLADE_2_0_LIBS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENGLES_BACKEND = @OPENGLES_BACKEND@ OPENGL_BACKEND = @OPENGL_BACKEND@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ PANGOCAIRO_CFLAGS = @PANGOCAIRO_CFLAGS@ PANGOCAIRO_LIBS = @PANGOCAIRO_LIBS@ PANGO_1_16_CFLAGS = @PANGO_1_16_CFLAGS@ PANGO_1_16_LIBS = @PANGO_1_16_LIBS@ PANGO_CFLAGS = @PANGO_CFLAGS@ PANGO_LIBS = @PANGO_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL_PATH = @PERL_PATH@ PGM_ALL_CFLAGS = @PGM_ALL_CFLAGS@ PGM_ALL_LDFLAGS = @PGM_ALL_LDFLAGS@ PGM_ALL_LIBS = @PGM_ALL_LIBS@ PGM_GLES_CFLAGS = @PGM_GLES_CFLAGS@ PGM_GLES_LIBS = @PGM_GLES_LIBS@ PGM_GL_CFLAGS = @PGM_GL_CFLAGS@ PGM_GL_LIBS = @PGM_GL_LIBS@ PGM_GTKDOC_CFLAGS = @PGM_GTKDOC_CFLAGS@ PGM_LIB_LDFLAGS = @PGM_LIB_LDFLAGS@ PGM_LT_LDFLAGS = @PGM_LT_LDFLAGS@ PGM_LT_VERSION = @PGM_LT_VERSION@ PGM_MAJORMINOR = @PGM_MAJORMINOR@ PGM_OBJ_CFLAGS = @PGM_OBJ_CFLAGS@ PGM_OBJ_LIBS = @PGM_OBJ_LIBS@ PGM_OPTION_CFLAGS = @PGM_OPTION_CFLAGS@ PGM_PLUGIN_LDFLAGS = @PGM_PLUGIN_LDFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PLUGIN_PATH = @PLUGIN_PATH@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XCOMPOSITE_CFLAGS = @XCOMPOSITE_CFLAGS@ XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ XMKMF = @XMKMF@ XRENDER_CFLAGS = @XRENDER_CFLAGS@ XRENDER_LIBS = @XRENDER_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cairo_req = @cairo_req@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ glib_req = @glib_req@ gstreamer_plugins_base_req = @gstreamer_plugins_base_req@ gstreamer_req = @gstreamer_req@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pango_req = @pango_req@ pangocairo_req = @pangocairo_req@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = pictures image_CFLAGS = $(PGM_OPTION_CFLAGS) $(PGM_OBJ_CFLAGS) image_LDADD = $(PGM_OBJ_LIBS) mappingmatrix_CFLAGS = $(PGM_OPTION_CFLAGS) $(PGM_OBJ_CFLAGS) mappingmatrix_LDADD = $(PGM_OBJ_LIBS) wrapping_CFLAGS = $(PGM_OPTION_CFLAGS) $(PGM_OBJ_CFLAGS) wrapping_LDADD = $(PGM_OBJ_LIBS) rotations_CFLAGS = $(PGM_OPTION_CFLAGS) $(PGM_OBJ_CFLAGS) rotations_LDADD = $(PGM_OBJ_LIBS) text_CFLAGS = $(PGM_OPTION_CFLAGS) $(PGM_OBJ_CFLAGS) text_LDADD = $(PGM_OBJ_LIBS) video_CFLAGS = $(PGM_OPTION_CFLAGS) $(PGM_OBJ_CFLAGS) video_LDADD = $(PGM_OBJ_LIBS) viewportopacity_CFLAGS = $(PGM_OPTION_CFLAGS) $(PGM_OBJ_CFLAGS) viewportopacity_LDADD = $(PGM_OBJ_LIBS) viewportprojection_CFLAGS = $(PGM_OPTION_CFLAGS) $(PGM_OBJ_CFLAGS) viewportprojection_LDADD = $(PGM_OBJ_LIBS) dragndrop_CFLAGS = $(PGM_OPTION_CFLAGS) $(PGM_OBJ_CFLAGS) dragndrop_LDADD = $(PGM_OBJ_LIBS) @HAVE_CAIRO_TRUE@sphere_CFLAGS = $(PGM_OPTION_CFLAGS) $(PGM_OBJ_CFLAGS) $(CAIRO_CFLAGS) @HAVE_CAIRO_TRUE@sphere_LDADD = $(PGM_OBJ_LIBS) $(CAIRO_LIBS) @HAVE_CAIRO_XLIB_TRUE@xpixmapsystembuffer_CFLAGS = $(PGM_OPTION_CFLAGS) $(PGM_OBJ_CFLAGS) $(CAIROXLIB_CFLAGS) @HAVE_CAIRO_XLIB_TRUE@xpixmapsystembuffer_LDADD = $(PGM_OBJ_LIBS) $(CAIROXLIB_LIBS) @HAVE_CAIRO_XLIB_TRUE@@HAVE_XCOMPOSITE_TRUE@xwindowsystembuffer_CFLAGS = $(PGM_OPTION_CFLAGS) $(PGM_OBJ_CFLAGS) $(CAIROXLIB_CFLAGS) $(XCOMPOSITE_CFLAGS) @HAVE_CAIRO_XLIB_TRUE@@HAVE_XCOMPOSITE_TRUE@xwindowsystembuffer_LDADD = $(PGM_OBJ_LIBS) $(CAIROXLIB_LIBS) $(XCOMPOSITE_LIBS) @USE_IMAGING_LIBRARY_TRUE@imaging_CFLAGS = $(PGM_OPTION_CFLAGS) $(GDKPIXBUF_CFLAGS) -I$(top_srcdir) @USE_IMAGING_LIBRARY_TRUE@imaging_LDADD = $(GDKPIXBUF_LIBS) $(top_builddir)/pgm/imaging/libpigment-imaging-@PGM_MAJORMINOR@.la @USE_GTK_WIDGET_TRUE@gtk_CFLAGS = $(PGM_OPTION_CFLAGS) $(PGM_OBJ_CFLAGS) $(GTK_CFLAGS) -I$(top_srcdir) @USE_GTK_WIDGET_TRUE@gtk_LDADD = $(PGM_OBJ_LIBS) $(GTK_LIBS) $(top_builddir)/pgm/gtk/libpigment-gtk-@PGM_MAJORMINOR@.la all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu examples/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done dragndrop$(EXEEXT): $(dragndrop_OBJECTS) $(dragndrop_DEPENDENCIES) @rm -f dragndrop$(EXEEXT) $(dragndrop_LINK) $(dragndrop_OBJECTS) $(dragndrop_LDADD) $(LIBS) gtk$(EXEEXT): $(gtk_OBJECTS) $(gtk_DEPENDENCIES) @rm -f gtk$(EXEEXT) $(gtk_LINK) $(gtk_OBJECTS) $(gtk_LDADD) $(LIBS) image$(EXEEXT): $(image_OBJECTS) $(image_DEPENDENCIES) @rm -f image$(EXEEXT) $(image_LINK) $(image_OBJECTS) $(image_LDADD) $(LIBS) imaging$(EXEEXT): $(imaging_OBJECTS) $(imaging_DEPENDENCIES) @rm -f imaging$(EXEEXT) $(imaging_LINK) $(imaging_OBJECTS) $(imaging_LDADD) $(LIBS) mappingmatrix$(EXEEXT): $(mappingmatrix_OBJECTS) $(mappingmatrix_DEPENDENCIES) @rm -f mappingmatrix$(EXEEXT) $(mappingmatrix_LINK) $(mappingmatrix_OBJECTS) $(mappingmatrix_LDADD) $(LIBS) rotations$(EXEEXT): $(rotations_OBJECTS) $(rotations_DEPENDENCIES) @rm -f rotations$(EXEEXT) $(rotations_LINK) $(rotations_OBJECTS) $(rotations_LDADD) $(LIBS) sphere$(EXEEXT): $(sphere_OBJECTS) $(sphere_DEPENDENCIES) @rm -f sphere$(EXEEXT) $(sphere_LINK) $(sphere_OBJECTS) $(sphere_LDADD) $(LIBS) text$(EXEEXT): $(text_OBJECTS) $(text_DEPENDENCIES) @rm -f text$(EXEEXT) $(text_LINK) $(text_OBJECTS) $(text_LDADD) $(LIBS) video$(EXEEXT): $(video_OBJECTS) $(video_DEPENDENCIES) @rm -f video$(EXEEXT) $(video_LINK) $(video_OBJECTS) $(video_LDADD) $(LIBS) viewportopacity$(EXEEXT): $(viewportopacity_OBJECTS) $(viewportopacity_DEPENDENCIES) @rm -f viewportopacity$(EXEEXT) $(viewportopacity_LINK) $(viewportopacity_OBJECTS) $(viewportopacity_LDADD) $(LIBS) viewportprojection$(EXEEXT): $(viewportprojection_OBJECTS) $(viewportprojection_DEPENDENCIES) @rm -f viewportprojection$(EXEEXT) $(viewportprojection_LINK) $(viewportprojection_OBJECTS) $(viewportprojection_LDADD) $(LIBS) wrapping$(EXEEXT): $(wrapping_OBJECTS) $(wrapping_DEPENDENCIES) @rm -f wrapping$(EXEEXT) $(wrapping_LINK) $(wrapping_OBJECTS) $(wrapping_LDADD) $(LIBS) xpixmapsystembuffer$(EXEEXT): $(xpixmapsystembuffer_OBJECTS) $(xpixmapsystembuffer_DEPENDENCIES) @rm -f xpixmapsystembuffer$(EXEEXT) $(xpixmapsystembuffer_LINK) $(xpixmapsystembuffer_OBJECTS) $(xpixmapsystembuffer_LDADD) $(LIBS) xwindowsystembuffer$(EXEEXT): $(xwindowsystembuffer_OBJECTS) $(xwindowsystembuffer_DEPENDENCIES) @rm -f xwindowsystembuffer$(EXEEXT) $(xwindowsystembuffer_LINK) $(xwindowsystembuffer_OBJECTS) $(xwindowsystembuffer_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dragndrop-dragndrop.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtk-gtk.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/image-image.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imaging-imaging.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mappingmatrix-mappingmatrix.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rotations-rotations.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sphere-sphere.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/text-text.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/video-video.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/viewportopacity-viewportopacity.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/viewportprojection-viewportprojection.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wrapping-wrapping.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xpixmapsystembuffer-xpixmapsystembuffer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xwindowsystembuffer-xwindowsystembuffer.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< dragndrop-dragndrop.o: dragndrop.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dragndrop_CFLAGS) $(CFLAGS) -MT dragndrop-dragndrop.o -MD -MP -MF $(DEPDIR)/dragndrop-dragndrop.Tpo -c -o dragndrop-dragndrop.o `test -f 'dragndrop.c' || echo '$(srcdir)/'`dragndrop.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/dragndrop-dragndrop.Tpo $(DEPDIR)/dragndrop-dragndrop.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dragndrop.c' object='dragndrop-dragndrop.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dragndrop_CFLAGS) $(CFLAGS) -c -o dragndrop-dragndrop.o `test -f 'dragndrop.c' || echo '$(srcdir)/'`dragndrop.c dragndrop-dragndrop.obj: dragndrop.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dragndrop_CFLAGS) $(CFLAGS) -MT dragndrop-dragndrop.obj -MD -MP -MF $(DEPDIR)/dragndrop-dragndrop.Tpo -c -o dragndrop-dragndrop.obj `if test -f 'dragndrop.c'; then $(CYGPATH_W) 'dragndrop.c'; else $(CYGPATH_W) '$(srcdir)/dragndrop.c'; fi` @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/dragndrop-dragndrop.Tpo $(DEPDIR)/dragndrop-dragndrop.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dragndrop.c' object='dragndrop-dragndrop.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dragndrop_CFLAGS) $(CFLAGS) -c -o dragndrop-dragndrop.obj `if test -f 'dragndrop.c'; then $(CYGPATH_W) 'dragndrop.c'; else $(CYGPATH_W) '$(srcdir)/dragndrop.c'; fi` gtk-gtk.o: gtk.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gtk_CFLAGS) $(CFLAGS) -MT gtk-gtk.o -MD -MP -MF $(DEPDIR)/gtk-gtk.Tpo -c -o gtk-gtk.o `test -f 'gtk.c' || echo '$(srcdir)/'`gtk.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/gtk-gtk.Tpo $(DEPDIR)/gtk-gtk.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gtk.c' object='gtk-gtk.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gtk_CFLAGS) $(CFLAGS) -c -o gtk-gtk.o `test -f 'gtk.c' || echo '$(srcdir)/'`gtk.c gtk-gtk.obj: gtk.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gtk_CFLAGS) $(CFLAGS) -MT gtk-gtk.obj -MD -MP -MF $(DEPDIR)/gtk-gtk.Tpo -c -o gtk-gtk.obj `if test -f 'gtk.c'; then $(CYGPATH_W) 'gtk.c'; else $(CYGPATH_W) '$(srcdir)/gtk.c'; fi` @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/gtk-gtk.Tpo $(DEPDIR)/gtk-gtk.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gtk.c' object='gtk-gtk.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gtk_CFLAGS) $(CFLAGS) -c -o gtk-gtk.obj `if test -f 'gtk.c'; then $(CYGPATH_W) 'gtk.c'; else $(CYGPATH_W) '$(srcdir)/gtk.c'; fi` image-image.o: image.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(image_CFLAGS) $(CFLAGS) -MT image-image.o -MD -MP -MF $(DEPDIR)/image-image.Tpo -c -o image-image.o `test -f 'image.c' || echo '$(srcdir)/'`image.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/image-image.Tpo $(DEPDIR)/image-image.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='image.c' object='image-image.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(image_CFLAGS) $(CFLAGS) -c -o image-image.o `test -f 'image.c' || echo '$(srcdir)/'`image.c image-image.obj: image.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(image_CFLAGS) $(CFLAGS) -MT image-image.obj -MD -MP -MF $(DEPDIR)/image-image.Tpo -c -o image-image.obj `if test -f 'image.c'; then $(CYGPATH_W) 'image.c'; else $(CYGPATH_W) '$(srcdir)/image.c'; fi` @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/image-image.Tpo $(DEPDIR)/image-image.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='image.c' object='image-image.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(image_CFLAGS) $(CFLAGS) -c -o image-image.obj `if test -f 'image.c'; then $(CYGPATH_W) 'image.c'; else $(CYGPATH_W) '$(srcdir)/image.c'; fi` imaging-imaging.o: imaging.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(imaging_CFLAGS) $(CFLAGS) -MT imaging-imaging.o -MD -MP -MF $(DEPDIR)/imaging-imaging.Tpo -c -o imaging-imaging.o `test -f 'imaging.c' || echo '$(srcdir)/'`imaging.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/imaging-imaging.Tpo $(DEPDIR)/imaging-imaging.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='imaging.c' object='imaging-imaging.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(imaging_CFLAGS) $(CFLAGS) -c -o imaging-imaging.o `test -f 'imaging.c' || echo '$(srcdir)/'`imaging.c imaging-imaging.obj: imaging.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(imaging_CFLAGS) $(CFLAGS) -MT imaging-imaging.obj -MD -MP -MF $(DEPDIR)/imaging-imaging.Tpo -c -o imaging-imaging.obj `if test -f 'imaging.c'; then $(CYGPATH_W) 'imaging.c'; else $(CYGPATH_W) '$(srcdir)/imaging.c'; fi` @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/imaging-imaging.Tpo $(DEPDIR)/imaging-imaging.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='imaging.c' object='imaging-imaging.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(imaging_CFLAGS) $(CFLAGS) -c -o imaging-imaging.obj `if test -f 'imaging.c'; then $(CYGPATH_W) 'imaging.c'; else $(CYGPATH_W) '$(srcdir)/imaging.c'; fi` mappingmatrix-mappingmatrix.o: mappingmatrix.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mappingmatrix_CFLAGS) $(CFLAGS) -MT mappingmatrix-mappingmatrix.o -MD -MP -MF $(DEPDIR)/mappingmatrix-mappingmatrix.Tpo -c -o mappingmatrix-mappingmatrix.o `test -f 'mappingmatrix.c' || echo '$(srcdir)/'`mappingmatrix.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mappingmatrix-mappingmatrix.Tpo $(DEPDIR)/mappingmatrix-mappingmatrix.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mappingmatrix.c' object='mappingmatrix-mappingmatrix.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mappingmatrix_CFLAGS) $(CFLAGS) -c -o mappingmatrix-mappingmatrix.o `test -f 'mappingmatrix.c' || echo '$(srcdir)/'`mappingmatrix.c mappingmatrix-mappingmatrix.obj: mappingmatrix.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mappingmatrix_CFLAGS) $(CFLAGS) -MT mappingmatrix-mappingmatrix.obj -MD -MP -MF $(DEPDIR)/mappingmatrix-mappingmatrix.Tpo -c -o mappingmatrix-mappingmatrix.obj `if test -f 'mappingmatrix.c'; then $(CYGPATH_W) 'mappingmatrix.c'; else $(CYGPATH_W) '$(srcdir)/mappingmatrix.c'; fi` @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mappingmatrix-mappingmatrix.Tpo $(DEPDIR)/mappingmatrix-mappingmatrix.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mappingmatrix.c' object='mappingmatrix-mappingmatrix.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mappingmatrix_CFLAGS) $(CFLAGS) -c -o mappingmatrix-mappingmatrix.obj `if test -f 'mappingmatrix.c'; then $(CYGPATH_W) 'mappingmatrix.c'; else $(CYGPATH_W) '$(srcdir)/mappingmatrix.c'; fi` rotations-rotations.o: rotations.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rotations_CFLAGS) $(CFLAGS) -MT rotations-rotations.o -MD -MP -MF $(DEPDIR)/rotations-rotations.Tpo -c -o rotations-rotations.o `test -f 'rotations.c' || echo '$(srcdir)/'`rotations.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/rotations-rotations.Tpo $(DEPDIR)/rotations-rotations.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rotations.c' object='rotations-rotations.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rotations_CFLAGS) $(CFLAGS) -c -o rotations-rotations.o `test -f 'rotations.c' || echo '$(srcdir)/'`rotations.c rotations-rotations.obj: rotations.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rotations_CFLAGS) $(CFLAGS) -MT rotations-rotations.obj -MD -MP -MF $(DEPDIR)/rotations-rotations.Tpo -c -o rotations-rotations.obj `if test -f 'rotations.c'; then $(CYGPATH_W) 'rotations.c'; else $(CYGPATH_W) '$(srcdir)/rotations.c'; fi` @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/rotations-rotations.Tpo $(DEPDIR)/rotations-rotations.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rotations.c' object='rotations-rotations.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rotations_CFLAGS) $(CFLAGS) -c -o rotations-rotations.obj `if test -f 'rotations.c'; then $(CYGPATH_W) 'rotations.c'; else $(CYGPATH_W) '$(srcdir)/rotations.c'; fi` sphere-sphere.o: sphere.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sphere_CFLAGS) $(CFLAGS) -MT sphere-sphere.o -MD -MP -MF $(DEPDIR)/sphere-sphere.Tpo -c -o sphere-sphere.o `test -f 'sphere.c' || echo '$(srcdir)/'`sphere.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/sphere-sphere.Tpo $(DEPDIR)/sphere-sphere.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sphere.c' object='sphere-sphere.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sphere_CFLAGS) $(CFLAGS) -c -o sphere-sphere.o `test -f 'sphere.c' || echo '$(srcdir)/'`sphere.c sphere-sphere.obj: sphere.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sphere_CFLAGS) $(CFLAGS) -MT sphere-sphere.obj -MD -MP -MF $(DEPDIR)/sphere-sphere.Tpo -c -o sphere-sphere.obj `if test -f 'sphere.c'; then $(CYGPATH_W) 'sphere.c'; else $(CYGPATH_W) '$(srcdir)/sphere.c'; fi` @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/sphere-sphere.Tpo $(DEPDIR)/sphere-sphere.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sphere.c' object='sphere-sphere.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sphere_CFLAGS) $(CFLAGS) -c -o sphere-sphere.obj `if test -f 'sphere.c'; then $(CYGPATH_W) 'sphere.c'; else $(CYGPATH_W) '$(srcdir)/sphere.c'; fi` text-text.o: text.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(text_CFLAGS) $(CFLAGS) -MT text-text.o -MD -MP -MF $(DEPDIR)/text-text.Tpo -c -o text-text.o `test -f 'text.c' || echo '$(srcdir)/'`text.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/text-text.Tpo $(DEPDIR)/text-text.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='text.c' object='text-text.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(text_CFLAGS) $(CFLAGS) -c -o text-text.o `test -f 'text.c' || echo '$(srcdir)/'`text.c text-text.obj: text.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(text_CFLAGS) $(CFLAGS) -MT text-text.obj -MD -MP -MF $(DEPDIR)/text-text.Tpo -c -o text-text.obj `if test -f 'text.c'; then $(CYGPATH_W) 'text.c'; else $(CYGPATH_W) '$(srcdir)/text.c'; fi` @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/text-text.Tpo $(DEPDIR)/text-text.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='text.c' object='text-text.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(text_CFLAGS) $(CFLAGS) -c -o text-text.obj `if test -f 'text.c'; then $(CYGPATH_W) 'text.c'; else $(CYGPATH_W) '$(srcdir)/text.c'; fi` video-video.o: video.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(video_CFLAGS) $(CFLAGS) -MT video-video.o -MD -MP -MF $(DEPDIR)/video-video.Tpo -c -o video-video.o `test -f 'video.c' || echo '$(srcdir)/'`video.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/video-video.Tpo $(DEPDIR)/video-video.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video.c' object='video-video.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(video_CFLAGS) $(CFLAGS) -c -o video-video.o `test -f 'video.c' || echo '$(srcdir)/'`video.c video-video.obj: video.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(video_CFLAGS) $(CFLAGS) -MT video-video.obj -MD -MP -MF $(DEPDIR)/video-video.Tpo -c -o video-video.obj `if test -f 'video.c'; then $(CYGPATH_W) 'video.c'; else $(CYGPATH_W) '$(srcdir)/video.c'; fi` @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/video-video.Tpo $(DEPDIR)/video-video.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video.c' object='video-video.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(video_CFLAGS) $(CFLAGS) -c -o video-video.obj `if test -f 'video.c'; then $(CYGPATH_W) 'video.c'; else $(CYGPATH_W) '$(srcdir)/video.c'; fi` viewportopacity-viewportopacity.o: viewportopacity.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(viewportopacity_CFLAGS) $(CFLAGS) -MT viewportopacity-viewportopacity.o -MD -MP -MF $(DEPDIR)/viewportopacity-viewportopacity.Tpo -c -o viewportopacity-viewportopacity.o `test -f 'viewportopacity.c' || echo '$(srcdir)/'`viewportopacity.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/viewportopacity-viewportopacity.Tpo $(DEPDIR)/viewportopacity-viewportopacity.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='viewportopacity.c' object='viewportopacity-viewportopacity.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(viewportopacity_CFLAGS) $(CFLAGS) -c -o viewportopacity-viewportopacity.o `test -f 'viewportopacity.c' || echo '$(srcdir)/'`viewportopacity.c viewportopacity-viewportopacity.obj: viewportopacity.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(viewportopacity_CFLAGS) $(CFLAGS) -MT viewportopacity-viewportopacity.obj -MD -MP -MF $(DEPDIR)/viewportopacity-viewportopacity.Tpo -c -o viewportopacity-viewportopacity.obj `if test -f 'viewportopacity.c'; then $(CYGPATH_W) 'viewportopacity.c'; else $(CYGPATH_W) '$(srcdir)/viewportopacity.c'; fi` @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/viewportopacity-viewportopacity.Tpo $(DEPDIR)/viewportopacity-viewportopacity.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='viewportopacity.c' object='viewportopacity-viewportopacity.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(viewportopacity_CFLAGS) $(CFLAGS) -c -o viewportopacity-viewportopacity.obj `if test -f 'viewportopacity.c'; then $(CYGPATH_W) 'viewportopacity.c'; else $(CYGPATH_W) '$(srcdir)/viewportopacity.c'; fi` viewportprojection-viewportprojection.o: viewportprojection.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(viewportprojection_CFLAGS) $(CFLAGS) -MT viewportprojection-viewportprojection.o -MD -MP -MF $(DEPDIR)/viewportprojection-viewportprojection.Tpo -c -o viewportprojection-viewportprojection.o `test -f 'viewportprojection.c' || echo '$(srcdir)/'`viewportprojection.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/viewportprojection-viewportprojection.Tpo $(DEPDIR)/viewportprojection-viewportprojection.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='viewportprojection.c' object='viewportprojection-viewportprojection.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(viewportprojection_CFLAGS) $(CFLAGS) -c -o viewportprojection-viewportprojection.o `test -f 'viewportprojection.c' || echo '$(srcdir)/'`viewportprojection.c viewportprojection-viewportprojection.obj: viewportprojection.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(viewportprojection_CFLAGS) $(CFLAGS) -MT viewportprojection-viewportprojection.obj -MD -MP -MF $(DEPDIR)/viewportprojection-viewportprojection.Tpo -c -o viewportprojection-viewportprojection.obj `if test -f 'viewportprojection.c'; then $(CYGPATH_W) 'viewportprojection.c'; else $(CYGPATH_W) '$(srcdir)/viewportprojection.c'; fi` @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/viewportprojection-viewportprojection.Tpo $(DEPDIR)/viewportprojection-viewportprojection.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='viewportprojection.c' object='viewportprojection-viewportprojection.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(viewportprojection_CFLAGS) $(CFLAGS) -c -o viewportprojection-viewportprojection.obj `if test -f 'viewportprojection.c'; then $(CYGPATH_W) 'viewportprojection.c'; else $(CYGPATH_W) '$(srcdir)/viewportprojection.c'; fi` wrapping-wrapping.o: wrapping.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wrapping_CFLAGS) $(CFLAGS) -MT wrapping-wrapping.o -MD -MP -MF $(DEPDIR)/wrapping-wrapping.Tpo -c -o wrapping-wrapping.o `test -f 'wrapping.c' || echo '$(srcdir)/'`wrapping.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/wrapping-wrapping.Tpo $(DEPDIR)/wrapping-wrapping.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='wrapping.c' object='wrapping-wrapping.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wrapping_CFLAGS) $(CFLAGS) -c -o wrapping-wrapping.o `test -f 'wrapping.c' || echo '$(srcdir)/'`wrapping.c wrapping-wrapping.obj: wrapping.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wrapping_CFLAGS) $(CFLAGS) -MT wrapping-wrapping.obj -MD -MP -MF $(DEPDIR)/wrapping-wrapping.Tpo -c -o wrapping-wrapping.obj `if test -f 'wrapping.c'; then $(CYGPATH_W) 'wrapping.c'; else $(CYGPATH_W) '$(srcdir)/wrapping.c'; fi` @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/wrapping-wrapping.Tpo $(DEPDIR)/wrapping-wrapping.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='wrapping.c' object='wrapping-wrapping.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wrapping_CFLAGS) $(CFLAGS) -c -o wrapping-wrapping.obj `if test -f 'wrapping.c'; then $(CYGPATH_W) 'wrapping.c'; else $(CYGPATH_W) '$(srcdir)/wrapping.c'; fi` xpixmapsystembuffer-xpixmapsystembuffer.o: xpixmapsystembuffer.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xpixmapsystembuffer_CFLAGS) $(CFLAGS) -MT xpixmapsystembuffer-xpixmapsystembuffer.o -MD -MP -MF $(DEPDIR)/xpixmapsystembuffer-xpixmapsystembuffer.Tpo -c -o xpixmapsystembuffer-xpixmapsystembuffer.o `test -f 'xpixmapsystembuffer.c' || echo '$(srcdir)/'`xpixmapsystembuffer.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xpixmapsystembuffer-xpixmapsystembuffer.Tpo $(DEPDIR)/xpixmapsystembuffer-xpixmapsystembuffer.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xpixmapsystembuffer.c' object='xpixmapsystembuffer-xpixmapsystembuffer.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xpixmapsystembuffer_CFLAGS) $(CFLAGS) -c -o xpixmapsystembuffer-xpixmapsystembuffer.o `test -f 'xpixmapsystembuffer.c' || echo '$(srcdir)/'`xpixmapsystembuffer.c xpixmapsystembuffer-xpixmapsystembuffer.obj: xpixmapsystembuffer.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xpixmapsystembuffer_CFLAGS) $(CFLAGS) -MT xpixmapsystembuffer-xpixmapsystembuffer.obj -MD -MP -MF $(DEPDIR)/xpixmapsystembuffer-xpixmapsystembuffer.Tpo -c -o xpixmapsystembuffer-xpixmapsystembuffer.obj `if test -f 'xpixmapsystembuffer.c'; then $(CYGPATH_W) 'xpixmapsystembuffer.c'; else $(CYGPATH_W) '$(srcdir)/xpixmapsystembuffer.c'; fi` @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xpixmapsystembuffer-xpixmapsystembuffer.Tpo $(DEPDIR)/xpixmapsystembuffer-xpixmapsystembuffer.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xpixmapsystembuffer.c' object='xpixmapsystembuffer-xpixmapsystembuffer.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xpixmapsystembuffer_CFLAGS) $(CFLAGS) -c -o xpixmapsystembuffer-xpixmapsystembuffer.obj `if test -f 'xpixmapsystembuffer.c'; then $(CYGPATH_W) 'xpixmapsystembuffer.c'; else $(CYGPATH_W) '$(srcdir)/xpixmapsystembuffer.c'; fi` xwindowsystembuffer-xwindowsystembuffer.o: xwindowsystembuffer.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xwindowsystembuffer_CFLAGS) $(CFLAGS) -MT xwindowsystembuffer-xwindowsystembuffer.o -MD -MP -MF $(DEPDIR)/xwindowsystembuffer-xwindowsystembuffer.Tpo -c -o xwindowsystembuffer-xwindowsystembuffer.o `test -f 'xwindowsystembuffer.c' || echo '$(srcdir)/'`xwindowsystembuffer.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xwindowsystembuffer-xwindowsystembuffer.Tpo $(DEPDIR)/xwindowsystembuffer-xwindowsystembuffer.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xwindowsystembuffer.c' object='xwindowsystembuffer-xwindowsystembuffer.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xwindowsystembuffer_CFLAGS) $(CFLAGS) -c -o xwindowsystembuffer-xwindowsystembuffer.o `test -f 'xwindowsystembuffer.c' || echo '$(srcdir)/'`xwindowsystembuffer.c xwindowsystembuffer-xwindowsystembuffer.obj: xwindowsystembuffer.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xwindowsystembuffer_CFLAGS) $(CFLAGS) -MT xwindowsystembuffer-xwindowsystembuffer.obj -MD -MP -MF $(DEPDIR)/xwindowsystembuffer-xwindowsystembuffer.Tpo -c -o xwindowsystembuffer-xwindowsystembuffer.obj `if test -f 'xwindowsystembuffer.c'; then $(CYGPATH_W) 'xwindowsystembuffer.c'; else $(CYGPATH_W) '$(srcdir)/xwindowsystembuffer.c'; fi` @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xwindowsystembuffer-xwindowsystembuffer.Tpo $(DEPDIR)/xwindowsystembuffer-xwindowsystembuffer.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xwindowsystembuffer.c' object='xwindowsystembuffer-xwindowsystembuffer.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xwindowsystembuffer_CFLAGS) $(CFLAGS) -c -o xwindowsystembuffer-xwindowsystembuffer.obj `if test -f 'xwindowsystembuffer.c'; then $(CYGPATH_W) 'xwindowsystembuffer.c'; else $(CYGPATH_W) '$(srcdir)/xwindowsystembuffer.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ am__remove_distdir=: \ am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(PROGRAMS) installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-exec-am: install-html: install-html-recursive install-info: install-info-recursive install-man: install-pdf: install-pdf-recursive install-ps: install-ps-recursive installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ install-strip .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ clean-noinstPROGRAMS ctags ctags-recursive distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pigment-0.3.17/examples/dragndrop.c0000644000175000017500000002227011205034420014122 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment drag 'n drop example * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ #include #include /* Text regeneration timeout tag */ static guint regenerate_tag = 0; /* pattern color animation timeout tag */ static guint animation_tag = 0; /* Blue component of the pattern foreground color */ static guchar blue_component = 20; /* The GStreamer pipeline */ static GstElement *pipeline = NULL; /* The pattern image mapping matrix */ static PgmMat4x4 *pattern_matrix; /* Accepted extension suffixes, not meant to be used in production... */ static const gchar *extensions[] = { "png", "jpg", "avi", "mpg", "ogg", "mkv", "mov", "wmv", "flv", "mp3", NULL }; /* Decrease color handler */ static gboolean decrease_color_cb (gpointer data) { PgmDrawable *pattern = PGM_DRAWABLE (data); if (blue_component == 20) { animation_tag = 0; return FALSE; } blue_component -= 2; pgm_drawable_set_fg_color (pattern, 20, 20, blue_component, 255); return TRUE; } /* Increase color handler */ static gboolean increase_color_cb (gpointer data) { PgmDrawable *pattern = PGM_DRAWABLE (data); if (blue_component == 120) { animation_tag = 0; return FALSE; } blue_component += 2; pgm_drawable_set_fg_color (pattern, 20, 20, blue_component, 255); return TRUE; } /* Start color animation */ static void start_color_animation (GSourceFunc sourcefunc, gpointer data) { if (animation_tag) g_source_remove (animation_tag); animation_tag = g_timeout_add (10, sourcefunc, data); } /* Drag motion handler */ static gboolean drag_motion_event_cb (PgmViewport *viewport, PgmEventDnd *event, gpointer data) { const gchar **extension = extensions; gchar *uri = *event->uri; /* Check if the file is a media, based on the extension */ while (*extension) { if (g_str_has_suffix (uri, *extension)) { gfloat x, y, z; /* Convert 2d coordinates to canvas coordiantes */ pgm_viewport_to_canvas (viewport, &x, &y, &z, event->x, event->y, -1.0f); /* Only accept the drag if it's on the drop area */ if (x > 75.0f && x < 565.0f && y > 75.0f && y < 405.0f) { start_color_animation (increase_color_cb, data); return TRUE; } } extension++; } start_color_animation (decrease_color_cb, data); return FALSE; } /* Drag drop handler */ static void drag_drop_event_cb (PgmViewport *viewport, PgmEventDnd *event, gpointer data) { start_color_animation (decrease_color_cb, data); /* Set the new pipeline uri, and play the media */ gst_element_set_state (pipeline, GST_STATE_READY); g_object_set (G_OBJECT (pipeline), "uri", *event->uri, NULL); gst_element_set_state (pipeline, GST_STATE_PLAYING); } /* Drag leave handler */ static void drag_leave_event_cb (PgmViewport *viewport, PgmEventDnd *event, gpointer data) { start_color_animation (decrease_color_cb, data); } /* Text regeneration handler */ static gboolean regenerate_cb (gpointer data) { PgmDrawable *text = PGM_DRAWABLE (data); pgm_drawable_regenerate (text); regenerate_tag = 0; return FALSE; } /* Configure event handler */ static void configure_event_cb (PgmViewport *viewport, PgmEventConfigure *event, gpointer data) { /* Remove current regeneration timeout */ if (regenerate_tag) g_source_remove (regenerate_tag); /* Then add the new regeneration timeout */ regenerate_tag = g_timeout_add (300, regenerate_cb, data); } /* Translate the mapping matrix of the pattern */ static gboolean update_pass_cb (PgmViewport *viewport, gpointer data) { PgmImage *image = PGM_IMAGE (data); pgm_mat4x4_translate_from_scalars (pattern_matrix, -0.004f, -0.0025f, 0.0f); pgm_image_set_mapping_matrix (PGM_IMAGE (image), pattern_matrix); return TRUE; } /* Key press event handler */ static void keypress_event_cb (PgmViewport *viewport, PgmEventKey *event, gpointer data) { static gboolean fullscreen = FALSE; if (event->type == PGM_KEY_PRESS) { switch (event->keyval) { /* Fullscreen */ case PGM_f: fullscreen = !fullscreen; pgm_viewport_set_fullscreen (viewport, fullscreen); break; /* Quit */ case PGM_q: case PGM_Escape: pgm_main_quit (); break; default: break; } } } /* Entry point */ int main (int argc, char *argv[]) { PgmViewport *viewport = NULL; PgmDrawable *pattern, *text, *media; GstElement *image_sink, *visualisation; PgmCanvas *canvas; /* Init */ pgm_init (&argc, &argv); /* OpenGL viewport creation */ pgm_viewport_factory_make ("opengl", &viewport); if (!viewport) { g_print ("Cannot create the 'opengl' viewport\n"); return -1; } pgm_viewport_set_title (viewport, "Drag 'n drop"); pgm_viewport_set_size (viewport, 640, 480); /* Pattern creation */ pattern = pgm_image_new_from_file ("examples/pictures/square-pattern.png", 0); pgm_drawable_set_size (pattern, 490.0f, 330.0f); pgm_drawable_set_position (pattern, 75.0f, 75.0f, 0.0f); pgm_drawable_set_bg_color (pattern, 255, 255, 255, 0); pgm_drawable_set_fg_color (pattern, 20, 20, blue_component, 255); pgm_image_set_layout (PGM_IMAGE (pattern), PGM_IMAGE_FILLED); pgm_image_set_wrapping (PGM_IMAGE (pattern), PGM_IMAGE_REPEAT, PGM_IMAGE_REPEAT); pattern_matrix = pgm_mat4x4_new_identity (); pgm_mat4x4_scale_from_scalars (pattern_matrix, 4900.0f / 330.0f, 10.0f, 0.0f); pgm_image_set_mapping_matrix (PGM_IMAGE (pattern), pattern_matrix); pgm_drawable_show (pattern); /* Text creation */ text = pgm_text_new ("" "Drag 'n drop"); pgm_text_set_weight (PGM_TEXT (text), PGM_TEXT_WEIGHT_BOLD); pgm_text_set_alignment (PGM_TEXT (text), PGM_TEXT_ALIGN_CENTER); pgm_text_set_font_height (PGM_TEXT (text), 70.0f); pgm_drawable_set_size (text, 490.0f, 80.0f); pgm_drawable_set_position (text, 75.0f, 200.0f, 0.0f); pgm_drawable_set_bg_color (text, 255, 255, 255, 0); pgm_drawable_set_fg_color (text, 255, 255, 255, 175); pgm_drawable_show (text); /* Media creation */ media = pgm_image_new (); pgm_drawable_set_size (media, 490.0f, 330.0f); pgm_drawable_set_position (media, 75.0f, 75.0f, 0.0f); pgm_drawable_set_bg_color (media, 255, 255, 255, 0); pgm_drawable_set_fg_color (media, 255, 255, 255, 175); pgm_drawable_show (media); /* Canvas handling */ canvas = pgm_canvas_new (); pgm_canvas_set_size (canvas, 640.0f, 480.0f); pgm_viewport_set_canvas (viewport, canvas); pgm_canvas_add_many (canvas, PGM_DRAWABLE_MIDDLE, pattern, text, media, NULL); /* GStreamer pipeline setup */ pipeline = gst_element_factory_make ("playbin", NULL); image_sink = gst_element_factory_make ("pgmimagesink", NULL); visualisation = gst_element_factory_make ("goom", NULL); g_object_set (G_OBJECT (pipeline), "vis-plugin", visualisation, NULL); g_object_set (G_OBJECT (pipeline), "video-sink", image_sink, NULL); g_object_set (G_OBJECT (image_sink), "image", media, NULL); /* Main loop */ g_signal_connect (G_OBJECT (viewport), "delete-event", G_CALLBACK (pgm_main_quit), NULL); g_signal_connect (G_OBJECT (viewport), "configure-event", G_CALLBACK (configure_event_cb), text); g_signal_connect (G_OBJECT (viewport), "key-press-event", G_CALLBACK (keypress_event_cb), NULL); g_signal_connect (G_OBJECT (viewport), "drag-motion-event", G_CALLBACK (drag_motion_event_cb), pattern); g_signal_connect (G_OBJECT (viewport), "drag-drop-event", G_CALLBACK (drag_drop_event_cb), pattern); g_signal_connect (G_OBJECT (viewport), "drag-leave-event", G_CALLBACK (drag_leave_event_cb), pattern); g_signal_connect (G_OBJECT (viewport), "update-pass", G_CALLBACK (update_pass_cb), pattern); pgm_viewport_show (viewport); pgm_main (); /* Deinit */ pgm_mat4x4_free (pattern_matrix); gst_object_unref (canvas); gst_object_unref (viewport); pgm_deinit (); return 0; } pigment-0.3.17/examples/viewportopacity.c0000644000175000017500000001214611205034420015413 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment viewport opacity example. Must be run with the PGM_GL_ARGB_VISUAL * environment variable set to 1 and in a composited desktop with compiz, * xcompmgr, or other. * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ #include #include /* Transform the mapping matrix of the image */ static gboolean transform_mapping_matrix_cb (gpointer data) { PgmImage *image = PGM_IMAGE (data); PgmMat4x4 *mapping = NULL; static float factor = 0.0f; float scale; /* Get the scale factor using a sinusoidal animation */ scale = (float) ((cos (factor) + 4.0) / 3.0); /* Compute the scaling matrix and set the image mapping matrix */ mapping = pgm_mat4x4_new_translate_from_scalars (0.5f, 0.5f, 0.0f); pgm_mat4x4_scale_from_scalars (mapping, scale, scale, 0.0f); pgm_mat4x4_translate_from_scalars (mapping, -0.5f, -0.5f, 0.0f); pgm_image_set_mapping_matrix (PGM_IMAGE (image), mapping); pgm_mat4x4_free (mapping); /* Update the factor for the next animation */ factor += 0.075f; return TRUE; } /* key-press handler */ static void keypress_event_cb (PgmViewport *viewport, PgmEventKey *event, gpointer data) { static gboolean fullscreen = FALSE; static guchar opacity = 0; if (event->type == PGM_KEY_PRESS) { switch (event->keyval) { /* Handle quit */ case PGM_q: case PGM_Escape: pgm_main_quit (); break; /* Fullscreen */ case PGM_f: fullscreen = !fullscreen; pgm_viewport_set_fullscreen (viewport, fullscreen); break; /* Increase viewport opacity */ case PGM_z: opacity = MIN (255, opacity + 5); pgm_viewport_set_opacity (viewport, opacity); break; /* Decrease viewport opacity */ case PGM_a: opacity = MAX (0, opacity - 5); pgm_viewport_set_opacity (viewport, opacity); break; default: break; } } } /* Entry point */ int main (int argc, char *argv[]) { const gchar *img_path = "examples/pictures/star.png"; PgmViewport *viewport = NULL; gulong caps_mask = 0; PgmCanvas *canvas; PgmDrawable *img; /* Init */ pgm_init (&argc, &argv); /* OpenGL viewport creation */ pgm_viewport_factory_make ("opengl", &viewport); if (!viewport) { g_print ("Cannot create the 'opengl' viewport\n"); return -1; } pgm_viewport_set_title (viewport, "Clear color"); pgm_viewport_set_decorated (viewport, FALSE); pgm_viewport_set_opacity (viewport, 0); pgm_viewport_set_size (viewport, 400, 400); /* Output a message if the clear color is not supported */ pgm_viewport_get_caps_mask (viewport, &caps_mask); if (!(caps_mask & PGM_VIEWPORT_OPACITY)) g_print ("WARNING: The viewport opacity modification is not supported. " "The content of your window will not be composited with " "the rest of the desktop. You can enable it setting the " "PGM_GL_ARGB_VISUAL environment variable to 1. Note that at the " "moment, this feature is only available on Linux with the NVIDIA " "proprietary driver.\n\n"); /* Output key options */ g_print ("'a' : Decrease viewport opacity\n" "'z' : Increase viewport opacity\n"); /* Image definition */ img = pgm_image_new_from_file (img_path, 0); pgm_drawable_set_size (img, 400, 400); pgm_drawable_set_position (img, 0, 0, 0); pgm_drawable_set_bg_color (img, 0, 0, 0, 0); pgm_drawable_set_fg_color (img, 255, 255, 255, 200); pgm_drawable_show (img); /* Canvas handling */ canvas = pgm_canvas_new (); pgm_canvas_set_size (canvas, 400, 400); pgm_viewport_set_canvas (viewport, canvas); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, img); /* Main loop */ g_signal_connect (G_OBJECT (viewport), "key-press-event", G_CALLBACK (keypress_event_cb), NULL); g_signal_connect (G_OBJECT (viewport), "delete-event", G_CALLBACK (pgm_main_quit), NULL); pgm_viewport_show (viewport); /* Let's transform the mapping matrix */ g_timeout_add (10, transform_mapping_matrix_cb, img); pgm_main (); /* Deinit */ gst_object_unref (canvas); gst_object_unref (viewport); pgm_deinit (); return 0; } pigment-0.3.17/examples/xpixmapsystembuffer.c0000644000175000017500000002126311205034420016270 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment X11 pixmaps as image system buffers example * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ #include #include #include #include #include static PgmDrawable *img1 = NULL; static PgmDrawable *img2 = NULL; static Pixmap *raw_pixmap = NULL; static Pixmap *cairo_pixmap = NULL; static Display *dpy = NULL; static void keypress_event_cb (PgmViewport *viewport, PgmEventKey *event, gpointer data) { if (event->type == PGM_KEY_PRESS) { switch (event->keyval) { /* Quit */ case PGM_q: case PGM_Escape: pgm_main_quit (); break; default: break; } } } static gboolean render_raw_xlib_pixmap (gpointer data) { static const gchar *color_string[6] = { "#FF0000", "#00FF00", "#0000FF", "#FFFF00", "#FF00FF", "#00FFFF" }; XColor color[6]; Colormap colormap; unsigned int i; GC gc; colormap = DefaultColormap (dpy, 0); for (i = 0; i < 4; i++) { XParseColor (dpy, colormap, color_string[rand () % 6], &color[i]); XAllocColor (dpy, colormap, &color[i]); } pgm_image_system_buffer_lock (PGM_IMAGE (img1)); gc = XCreateGC (dpy, *raw_pixmap, 0, NULL); /* Render */ XSetForeground (dpy, gc, color[0].pixel); XFillRectangle (dpy, *raw_pixmap, gc, 0, 0, 175, 175); XSetForeground (dpy, gc, color[1].pixel); XFillRectangle (dpy, *raw_pixmap, gc, 175, 0, 350, 175); XSetForeground (dpy, gc, color[2].pixel); XFillRectangle (dpy, *raw_pixmap, gc, 0, 175, 175, 350); XSetForeground (dpy, gc, color[3].pixel); XFillRectangle (dpy, *raw_pixmap, gc, 175, 175, 350, 350); XFreeGC (dpy, gc); XSync (dpy, False); pgm_image_system_buffer_unlock (PGM_IMAGE (img1)); return TRUE; } static gboolean render_cairo_xlib_pixmap (int screen) { double x1 = 140.0, y1 = 315.0, x2 = 210.0, y2 = 35.0, x3 = 315.0, y3 = 175.0; double x = 35.0, y = 175.0; cairo_surface_t *surface; cairo_t *cr; pgm_image_system_buffer_lock (PGM_IMAGE (img2)); /* Create surface and context */ surface = cairo_xlib_surface_create (dpy, *cairo_pixmap, DefaultVisual (dpy, screen), 350, 350); if (!surface) return FALSE; cr = cairo_create (surface); if (!cr) { cairo_surface_destroy (surface); return FALSE; } /* Render */ cairo_set_source_rgba (cr, 1, 1, 1, 1); cairo_paint (cr); cairo_set_source_rgba (cr, 0, 0, 0, 1); cairo_move_to (cr, x, y); cairo_curve_to (cr, x1, y1, x2, y2, x3, y3); cairo_set_line_width (cr, 10.0); cairo_stroke (cr); cairo_set_source_rgba (cr, 1, 0.2, 0.2, 0.6); cairo_set_line_width (cr, 6.0); cairo_move_to (cr,x,y); cairo_line_to (cr,x1,y1); cairo_move_to (cr,x2,y2); cairo_line_to (cr,x3,y3); cairo_stroke (cr); /* Then destroy the surface and context */ cairo_destroy (cr); cairo_surface_destroy (surface); XSync (dpy, False); pgm_image_system_buffer_unlock (PGM_IMAGE (img2)); return TRUE; } static gboolean update_images_opacity (gpointer data) { static gfloat angle = 3.1415f / 2.0f; gfloat opacity; opacity = (((sin (angle) + 1.0f) / 2.0f) * 200.0f) + 55.0f; angle += 0.1f; pgm_drawable_set_opacity (img1, opacity); pgm_drawable_set_opacity (img2, opacity); return TRUE; } int main (int argc, char *argv[]) { PgmDrawable *text1 = NULL, *text2 = NULL; PgmViewport *viewport = NULL; PgmCanvas *canvas = NULL; gulong caps_mask = 0; int root, screen; /* Init */ pgm_init (&argc, &argv); /* OpenGL viewport creation */ pgm_viewport_factory_make ("opengl", &viewport); if (!viewport) { g_print ("Cannot create the 'opengl' viewport\n"); return -1; } pgm_viewport_set_size (viewport, 775, 415); pgm_viewport_set_title (viewport, "Xlib pixmaps as image system buffers"); g_signal_connect (G_OBJECT (viewport), "key-press-event", G_CALLBACK (keypress_event_cb), NULL); g_signal_connect (G_OBJECT (viewport), "delete-event", G_CALLBACK (pgm_main_quit), NULL); /* Exit if system buffers are not supported */ pgm_viewport_get_caps_mask (viewport, &caps_mask); if (!(caps_mask & PGM_VIEWPORT_X11_SYSTEM_BUFFER)) { g_print ("X11 system buffer not supported by the OpenGL plugin, your " "graphical card has to support non-power-of-two textures and " "your GLX implementation has to support the texture_from_pixmap " "extension. Try to set the LIBGL_ALWAYS_INDIRECT environment " "variable with Mesa DRI drivers\n"); gst_object_unref (viewport); pgm_deinit (); return -1; } dpy = XOpenDisplay (g_getenv ("DISPLAY")); if (!dpy) { g_print ("couldn't open default display\n"); gst_object_unref (viewport); pgm_deinit (); return -1; } screen = DefaultScreen (dpy); root = RootWindow (dpy, screen); /* Create pixmaps */ raw_pixmap = g_slice_new (Pixmap); *raw_pixmap = XCreatePixmap (dpy, root, 350, 350, 24); cairo_pixmap = g_slice_new (Pixmap); *cairo_pixmap = XCreatePixmap (dpy, root, 350, 350, 24); /* 1st text for X11 Pixmap */ text1 = pgm_text_new ("Xlib rendered pixmap:"); pgm_text_set_font_height (PGM_TEXT (text1), 20.0f); pgm_drawable_set_size (text1, 350.0f, 20.0f); pgm_drawable_set_position (text1, 25.0f, 15.0f, 0.0f); pgm_drawable_set_bg_color (text1, 255, 255, 255, 0); pgm_drawable_set_fg_color (text1, 255, 255, 255, 255); pgm_drawable_show (text1); /* 1st image for X11 Pixmap */ img1 = pgm_image_new (); pgm_image_set_from_system_buffer (PGM_IMAGE (img1), PGM_IMAGE_RGB, 350, 350, raw_pixmap); pgm_drawable_set_size (img1, 350.0f, 350.0f); pgm_drawable_set_position (img1, 25.0f, 40.0f, 0.0f); pgm_drawable_set_fg_color (img1, 255, 255, 255, 255); pgm_drawable_set_bg_color (img1, 255, 255, 255, 0); pgm_drawable_show (img1); /* 2nd text for Cairo X11 Pixmap */ text2 = pgm_text_new ("Cairo Xlib rendered pixmap:"); pgm_text_set_font_height (PGM_TEXT (text2), 20.0f); pgm_drawable_set_size (text2, 350.0f, 20.0f); pgm_drawable_set_position (text2, 400.0f, 15.0f, 0.0f); pgm_drawable_set_bg_color (text2, 255, 255, 255, 0); pgm_drawable_set_fg_color (text2, 255, 255, 255, 255); pgm_drawable_show (text2); /* 2nd image for Cairo X11 Pixmap */ img2 = pgm_image_new (); pgm_image_set_from_system_buffer (PGM_IMAGE (img2), PGM_IMAGE_RGB, 350, 350, cairo_pixmap); pgm_drawable_set_size (img2, 350.0f, 350.0f); pgm_drawable_set_position (img2, 400.0f, 40.0f, 0.0f); pgm_drawable_set_fg_color (img2, 255, 255, 255, 255); pgm_drawable_set_bg_color (img2, 255, 255, 255, 0); pgm_drawable_show (img2); /* Render pixmaps */ if (!render_raw_xlib_pixmap (NULL)) { g_print ("Cannot render the raw xlib pixmap\n"); return -1; } if (!render_cairo_xlib_pixmap (screen)) { g_print ("Cannot render the cairo xlib pixmap\n"); return -1; } /* Canvas handling */ canvas = pgm_canvas_new (); pgm_canvas_set_size (canvas, 775.0f, 415.0f); pgm_viewport_set_canvas (viewport, canvas); pgm_canvas_add_many (canvas, PGM_DRAWABLE_MIDDLE, text1, img1, text2, img2, NULL); /* Add a source to modify the X11 pixmap each 500 ms */ g_timeout_add (500, render_raw_xlib_pixmap, NULL); g_timeout_add (40, update_images_opacity, NULL); /* Main loop */ pgm_viewport_show (viewport); pgm_main (); /* Deinit */ gst_object_unref (canvas); gst_object_unref (viewport); XFreePixmap (dpy, *raw_pixmap); g_slice_free (Pixmap, raw_pixmap); XFreePixmap (dpy, *cairo_pixmap); g_slice_free (Pixmap, cairo_pixmap); XCloseDisplay (dpy); pgm_deinit (); return 0; } pigment-0.3.17/examples/pictures/0000777000175000017500000000000011205035137013723 500000000000000pigment-0.3.17/examples/pictures/meiko.jpg0000644000175000017500000011621711205034420015447 00000000000000JFIFHHExifMM*C  !"$"$CwwE!1A"Qa2q#BRb3$r4CSsc ?DmtLeL极kj#N!t!fΒh3763KKW=c>PZ9IAEvc/GS5ED񆁃 ~E g!Z2.pd[X{|O5|t )k7b`-s܏<JZ%G(F F`n,}<GNՌ&x&`[1%c| +^S\.GZZ!֊(݇ V~ql2ftpDXҳ %n -QY^5UC$TE/5iEP35s^}DpWs*GJ7?KH5/cJJ|`_y֞O2)4G+t ԑmmȐRMXoVr#AyHݥm@6 n y6i Kt k];Z˩5u{=_u2|R3H2j57ՠۅ 855^n8$wkdistꅫc7U`Ȍn"̛9C.Oz[x;cW<9=Bm@[3,Χ0̞5FXX;v`:YT4$Q숫ePKou%qME[WDdŕl! QܒI8 '% ͤ)"a"Ssnc`+稒Zk,)DDvʶ5gp5]n[&aæC 0r46m,oq ٥E49U%tQH|#c' EtQq>OZGP8Q [hU n|WC_/43[#&B**Z`G tE$|Bp1`so;6 \jƆf(i1-.n~/`&n$Jd-=JTEDmIuv:v$qvg6oRҬIԂ (%ca$8.:/pXsꞃɍn8 ?dLI%$QO0"Ŭ&n 5E(U&q=FyEDsbUˑyl{{}q6]K$:ƻ$EEC/Ve ɨHkА|+kQbpx&\%I\.mN: GH-21X~3RP5rUYDzȝDPyQ!v\`-fS%R*i(,L^lkojx irQ+EJ#@3eV$Z\qOKɗNV#Y HEHP^̤eI,ȆnS?fpeTKSSq$FHylLڄI[RxdTB/j!*b(Lq_b;7Z5{ʈLHd i&}_peY%\?4Բ(e곱ŬIT|D|#s@҅k2̩iā {w $URM` ,`/edPo%@JOR ]bYȩ*$hmI27T8N{$\13ZXph-S7)ymPY!eñ'oZ~"&ZJ Y3r'R+ ]%mlS&ܒY؛f;ExY%l 1Q`oIX3 %"j9~͒RǶΤA۱CLI'SwheH3UhRm:}bQ)ko뀯K$I" TJDc=FIQӰ#[$}-<4,ܜ `2kl*K`dm#ee+$t:@2fm݉KQ]PT(Ƒg>#TgjQM4QԨy?YV! \%<5oMO㑀%UHC(\%xf!ü@=0։`OI8 4Z2`\Y!t\,>'qRBQȤ{v%ysy(xZ50Q-C[0=8^(' 1&Ju{m-f+qc ʚHUf!'¯&1zy[6:q)>]4GR>cEB6Y˶ϸV8B*Gu|IrOUAwV;fgf,36M^񻨷5^o^0 OTKSeYUgXT]+r ^퀗'̫ڊ8Y$4ܩ)H]K;^Y*^ @2izFkNk%U>qhНÈs,lJZCF1e[۵ ߋVLzvΆ`%+,Ծssx+6ou5ESH Sa l/ gK q=d1IgD bG(gʳSD<"YR}v=0 J/FT/VbVMk@gki&Ey617&VD/ XScy>gQPJ.l(3 Hc(ti@-}$67l"qWgZzZ vt5Y{|eռ?S[QVTKg:cx4| 9nor.(r.&i9S 7.AqrKyuAVdc8WYœM-7I#1$l7X]C'h+%8xCɢI kXK|obz*CMWr%.ZRoS<@!͢!Ζ'EXjTHE`+4I!%@:f"%Cl6kgđkl:*KIf5Ѐ|"7v]0ʤtUH #+@/X$  ;x~.YSQWS{;G$ cX[H =0u;>S9i55#dNDFpoWlƫ0ʤVҰn`m=}G Ige~wFzunYUR4wI\crpEv`~2J\2쾢 Iy^K]Т:u-q(OpXfU2醎5b7Fn['fO5ji*E<َbSi* q_lTLie-) Ӳbl~v՚Ces?y]eE'q `:I*xLR=ԫ0Rñp{W UShkg* 7,elX^]Ho ').X]Nv"&XΙ=_`>cK@?O/A * ©V?& abl(ʫrl3I,dQT)4_ ] g~Y)Ȧ˲fiaYeىptOC6qIUC U e*z/;`4Ց>gK%*y,Ln[aEQ%$g?{o>f0yD%GV &,84% Y){]ɶ+iQ]2C1 6_|{{@',F p$ opKJ` h jF`='s&nIڽeC<ARL7,R y/bK {WQU>`C`?9l=JJ{c,c׵03YjT)B's3ک@ JVMJ 34$_^ߖ+<`= IM AeY 2#|c`n 0)Km9{`K;0b ``mk'J0msՆ[`= 4{] ,\ opL>196QӧR}4EKUȓM?ᅇQ`pixRi)de&]MTA.0 P$}5pl9A_WM& Eה,IN4༚i +R,V#krVDP`U0癮_*, ELV f9+ A/$D0) tj,4ܭ)QU4w%ƐzҹysT< y a8'h/T7>X7pN< Zlϕ7 Hְ/LE LU31^`w݁Uɸ..⪧ɤzՠcV,WroI|4o&ױvz?L7KF٪<Jg46%q**ZX)㉥]¨ーs-d.:SV >}CI{3 TcGP`\W-9U-F}O$3eQ-jF4J[H4uki?sgt9 !jaߖ6z%q g\y$e8̑jCsl'7)J(o H^1%َ;up Վh# dqUZU ƃ/z:*}ݚX\>%ܓI_WSE8/f;n4 w؃GΙaUoqaSO{6^0e5jY̛jg`!aRR}7cyL1S`2{iL7IM`7w3/MQ GanrcDۮ)"*dEi?Tr ⎒iߦvYq4Vw&CoYm=>/?:ʚHCWFmf\t0QȺ$ Њy]pV%Ǟdɥ퀈{6mʩˠw=,v(RcPF 9Gm |6|uD5:W4si@ H_7Y ڞ/˳MXUޙe1L% ؅` A,T?+"ŎB 7f\-Ut-u-B9Dv Q^A7GT$i$v S3PR *8jJ4MDrjb@ 8stduBQ*b UX[qb:Ok5qGyxgኆ)爵,"94e,Z,mǴoekP,`fߦy}_ե`RW<#F'8|^\ٝKPebZePw L17DҦ@TE(VG95uMC%zZ3$;VAB(o;geU\1tVG4USS@&SKgoۮV3s)J$^+~I&h[DE-:#1HP `&Q(ǰ\s,Qk߮^ͳ/4-sMO* ,0ClGb;7^VhI'mK۶xAZ4 z$K sTaF;Xk|i4e#JCo;z*fՋ01+3(>#\~ƀ&7nL}+ 7#J`(ԫAoЏ,S`a5}0iG6;Ӏ. fV 9YZHQJ@ |b2*2HuR-8 :5H=NfL-gy}0;Jz5JFvu'f8쇇\>ˍF[A LI0YH$X[NmSZ M!%| :m8/8~&Z̾xhI B,4#4STfI 4lX/$L>x'2i8w YMl)Pg+biP|&H'kK"jÁxƊh$.^TvXFYHKAQgf-QcSx8K%ʩ΄*zxʒCVCz4q2_Ny慎*+\'@zſ †ƥ ^k<,=`,?TF;c 6sN|%OTeT1, O+FdI-me'qn\5O9hTK #}'8%(7$9 &2mHehΤ؝>{(x77FQWVA? =pg>ɳ9~oOC,-b6a~H;32b4П{uS3G;rt&&IYE@vJ &Z;&4KBK`UO0ROrIA/WUHm1ʏC3@KIf$/,;70hig:I#ֈ$P0͌Ԍ" i$ߥ ƞgwВN [Y3fY$e3uɽP°MTG`#5!=Jk03<˂rJg*;V\l|#}F+J#u=]3 aIIŬ5hd|A᥎H倨YA$}ߙsog2(j7*TAU KI^&Oe3{=3h꣥}m;2U xo~O>I+%UbT5ylp h2(+\ÚRm!!jg:UY !ͶnnISϲ3."', 瀈$qWTu3JB)wYo`zm/  A 84ucm[4Hi:Vq>m*R 3R䧧V!Һ~$)&ấymK6aXYZ:F oP X5`NEUWBjfBHX6@ lpqo:IGPV+lٔP~c}YOWjn$*|:`$S;Z`#ڗ{?N+fXX騃RP1lf_P>S$ czAxjT =Tie Ht v7 7pTOPqGtpJ6*F^zΟ-7jե8#blt*XibI-ktGPf96_,Z+b.\m,9GuXgZIdyw$cN4IKӢ* ž{QN~=p `PP0_q? e@fNt`6]mgh+oȌJtM/nowWc5f-TB@bjf %a?QR ZښiTIUf;iBc(DQs$2F, -~,qKXՀzvGrv_<_W_瀯,K(54s*9F?i9hNݼ]mMʅXU:UW|z6Ke&kX\y"1{DKZuqSQ(s `fe Q^"s*U+jRvOe6$`6͍<)aۿlpqbwjKxQ܁|$W˔90tf1m_^vIiD`Ѳ=b*aUc_rNyW)%=+8;(fe8 )s$DvP`NYcszzkRyA&fi2JcG;լf/uG *  ӘdHu_<4m|Ln`8xW%8nJ*ZzZe5b[e)-&ASmʲoe.4Nr)( HnX|/l,oZ#@XW::Z !ʢnډ*dC8̣XL*:4.Z K˥je,O\OS_m yYɧ^-v`s*EVT FKV,ܒz`=L]4O0X/LsAj`&@{%Z z#mT,}X~vG:Uz@+qQF-IJU;fP.o`؛C倉QQ,O}2k"qQP<<}[fS.M%9ڗq5us_F :s>[!vi$%J>ͬO`^}EJjxTCǓ^v1۩Oy١3Z 9R܍@A\mZ3![= nmex+>GT⦯)JQk%SRe*ĭ Egf(ۏSƫjw&('3FgyHj)┓P>9/Yɬn yqfPA7۸J*dlq}﷕sy3#^ĤuRahy5]Ͱ@m=i Uz\OݪTp6aDoҰʧ뀎Hծx~cq4#rԬ]ƨ'asMl8(֊n-ghfgB"}jz`*WF"4Tq&i]W +zYy nX7A`5˫cԐ@'?K42 >(o}FQTz)5щЎ]<җ#FoyVԯO8jA)r;|)8 @)(1 35Jt/gRDndo$u+Kօ6s6:*&&}_$f Mfk;2/0|@/}@aQ.˚QVr B#q&k9LMSy(%It]Ve"y?qAqWi) 7eoS`&2,s*a̪( je /tyLxJ/˴5ZT;QOyO||[UV_K[$%N^5cRAR$pCGH U[k"jF){ái%UX>Z̍Eǡrl+\Fx~ 9}2;+KUTM3 W؟/ cV4/Fqj&tF}OC!HV6W,( 0ts<G.?_V[ͽdRЪGL{V[$H-9ztTOiF%8_h],{ ޣ~2IEBrt8icխe@NZ+c~[CX<j(rj)W@e`ۡK\Nh`O6Ak?;L/ { (u(6'q $BY *AQxA[O"Xx @H98 3ˍUn+9%vjk}=e]$=5 y\QTe()V_c}imTRݰ`,wa)UԣO[vV WAvX4qeJx#U$ GSK]-]X.U*j zX %/RFX\LkDZr"f4jW ){nR_riwgϓfKDI0o|"sbryƟٲj}M7?s3ͽQAE=  TF5Wi l\MHrn*n J(b12{i{h}GJFX1 5=|-ʲzǯ(._Eg4]OiIT4iE(:7 g.aL7Q~jht+;`: - b3U0 4jo RG7WP:ȑiҴ3MÿQ|GK#/$6`,@ӦE抩:7p28 2V(a|\GNeXMvdt\)6'K_c-6QU4ÛM7 |nM$WAl8* }0QsO/ʭ -u*;D+%\g0ٛKK`!"12w q|~(3 UDso#C1*TH|18 Wlʋ`,&:Gn5YZ &2)6%Ǩo/7ͽ4m%3*X\|o9Y.IWTDQb.E&`;S >IQq/EUuEQ ͜&!*p`iQ%FSYŜUC{QR8huc/xIf9w+d! i^)ɪ2';SM}: 0 'q}-9Tٔ(e;ك76qq8 ٮ}qtQ>UAlb=dew-1lUx9]Hgn rac;u1W :tz-vNէQ<ϖ\pH4G;tQ?k=+`s^̀_+y*kr<~H' ' ϛÛЬ&@HfKv0CT Xkox&Ua= %drPP&mvOQEߦS SQdUowcTȠ]P%OOJJyU"ñ?\$)T(Ӻ:z73S6t+SB{#hP/{wT̀ ~9fGVL95Z5caGUͻ|* /"HUQ.WB{k?ĶiIs,Zl4O`c,ٍ}nSKX3TE (#kɹw$j\Uk`pe|QqD)fc[-^M US(scr- 3\1SF#ȣW5TNh, { Vlu9bJdt)JVܢX \qAGԹ}#O#-$ɞ3r% ,38?׬3IUD0 Dcr$$ɞEECwXE@UReB,hlWk+`:q0K! 0IR]W%T\V:Q$gT>r{_騒fSyE}uTIKWQ G!; 3 ζW* JġrAWX i&.+Lվx K iе =-93kpܕE@\ o^f,͸6rʨ#KvoץͼKQY_LjPtfu[kuQ!л"n 6<&$8MWASI; '2& ~++[o.o_Vds͘P6 m.V9.H#U̫7o[b,SZhy+f-i, Kc7'e}cUN |f ZRTcνΓ 974 CqڦeiFMxz֮BO,c;WO2pY"R6ӨǧhLL@I-EOML? Gp_B$nf)Uf?$?Y$Pċ\15cdrO0QrM;~ krPdaq~yP2)7aӾf$S9Ԥ?ح`$QQH in"}V㯮IUr-ذ=ob닠g֤L}OSp5\{o6dԉ %#Vc^^x 3h{ ܋Us}hXz~XڷVpC ,,:Pǘ)N <!cFRy` 0csf`g͒8г7 +0kĴy=81i2-li)LAEB/-,: [~OT3'{N&u3NIz\]iZzxgw x}eOgOM_MqWY=f[;4!3vPmj8g? f@.RyP:25 ӀM4&z\ye= GMIIQDhS "؝'~4+R6B2>ȘFSȺe4oMA#Q,kR`#wto4H2IǦ Pi[}`,$Ei+%_瀯SN"44q}mo%4 UБPu2K[69h.\5< $}ȩg"+!Smဂ^ziLr{--0r+ a2beuyecEރ&XXi̿k ҇J/~X 2B' y`3Y-b:mr [ߎE9Wͷa`WI⌷9T5H} 棒S4mPY~Fzљg&FLá~'g(qXҬY=E'̈8 o~0g}T<&5W' 0p,HVg‡*߫ G9ʵOWF R0 {s>^jm{IM#I#TF3H͹g>G<(:˳,gh!KWH!$1XX ]U؀0 }flQS%!1JTSs$?j`2uX0sYtV~o%WTASYJo ,ie˹\EP& Rott,)jj2 Jk0ɾ=ldBǘ>Ljc-lUrI$2`zԌiJTҼN`.-q뀘ELzzDD,I# X T*a 1#v,?`'CM$CXX)〫, #g#E/{ʑdRVEF#\Z߮m΍L2ZNo$ğ"<_q2w])[XlY.#v$v7(+<` M#R[`Gv˸ 'Ӹ8RԼP84Rdbtl]DWlUp*E\5/7k57&F'l:iϦmk6ꬿ,&ucnuo1:}=7X4n.p3:rfD;k[Q L@if:px3ѓg7n[|Oę6MSGMJ -UiW[capp*x=ͲHh@2]ꨐI?_V ϤȨeSSYP>(NZzZTSrJ ff~iR^Jc"-c)6`.v,E*Q+%NhRRӅҐw&>.0(eUMΣRv,j =\zHnz`+$KN 3Z_@hP6bwW; -jh\T3\qj0B|'z$;\Mt~Un#[BfTfqȻmV=dOiɕtq<_fMY~]O] a%*넆%:eBI%Wt?\EE:#r"@Qx^+ VymE$r!T=}lN*^"bq=l~ QCTTǮ*)}pjiQ`l/kv  寧]р )&\tQf6e`>Oso`7bFavh~&445lA :\$tk'\dIH2.OM 49'\iB |*gdDHjnt>cxh/ [#$0 U3SRG Ք0d'G#Lc!$@E>cffǫ۾eL {0d{'Vd(c- k=t0!k~8#Y]`ۭlE m~PdUCΚGv]G h\[Tg "ZҜlWfFE*SED/RU,nVc3~w;Mp-%>[*#vnMwMY6.j$پS$ٕM$ naGզG>P}ZYFX `n k` RVTFo4\R.<Ϯn`UVb7o=uSpQp]_BptZyna 6E"RWFHIap,|x9qJ"UmU d:M >[k_{xPCC%:T q\x2Y+iEr?,vgδ;˂Hfw{'p^0bY퀅Ԫ6n#aq5BAVO o6?jcx䉃Q|Tuɱb7sko֤KRd]tQd|)-7iJ@+.&ّ0 RRNȚzvidr0}f Z r ͒2GSqp P \f +~*LdnkD*{sK UX` Ic|ePʵ4V=iQr_KO\p%5m-\bEԤpSmA$ocYR˕) Y=I78 yf-̳ZaW5]-r l${v0:q W\=Ùl52,Qų;d`/P(cD9W+%mI,P""X V7=A#lʼc,I DXh4ܹ0y=;5=X*eI2z [q>+V&SvVIC@,қ4r-S3id>H̙@4M-E#_ R5NgrѠ$DGKz|x*! > J$v?{ yS"T`Mwvh$yYۙ:Z +-UB."sǑ6I:5Cu* 7P 586sm7XSkJYx^77$F8̤k/5 ǧlZޒ`cSI$@V0s"/%ZF,H7 ý t QeթV'rejJY$ )*̾vvnlz.IQPX O{}p)LӾNc|s 1CIHѡVS2bbvYg:lڀ]}pMXH!~{!aX`z Sckz`.LK d6we0澝.l̵/N +gl+8u#-,N첣Vp ,K%mLSf %gɆ%;r =Djdhd'k`,D-$A`(p:TXk_o oJBQԵI{H~@GxC dey%637bN ʮ)yYar W8Ŷ*D_`xU/0*laQ\ZEuHۦl'Zyk"ccT%#DtQ#kFܳ(Oeqi3d#$7\<Î^fl 0N̅ōH=:ʲ#jcT#[zcĹoU Wu,E7?sf{^Yy y}Ӧcf .WĴn@S(Wة0KE>]/1;l0  =A#c!~/#JQ]I p?K_<BPGan 0\R!V75GHPO Uc^`%$J0tUb{p V0PpE}! ˖T%l^b9-? :Z)#U]/pۨ8 gUM-4N#t[c.` }( V1ö| |O&dq 3hDjKKX[5pN25.]VQAK,8Qy(`9i1=JeQ<.a Qߧ`7N<ƍ$PTK(FEr@ yeyԏ? fT\e[r~I⛇DT4qF-/038l16逯U _ p IQsxzp2Ϋ`=%fYO{SRAژFUR˱b{`dpG]ʭm/(i1f,Y1m zߣ<Š9! ca+H8փ^! щG&hoKm|iVG[`'S%SԘWe`k)E֤ͤ'˿`(@UX1Bm}UHfӠ7YNj#q{ WM[uo_CDTzc"I8,#{9;6+dѭ{K:0T>/Oጦt Ffr7hyZ'njXemF4'O\#e@@^tK+\k/:)Q;`2ϧV|W棙1@ŀ8{*s|fUt9HSc9+2c96FV53!Suʠ[" m==  UU`\) CP)sjy5vpESd:Hm n 4f9>} "*mo{~>ץy, U!=Ԭ>X}WJJ u;؋|1Ty[[u8Y]]PPTU< SSlIuCU5@ҞZ/*DuQu::YbHSae5.۝sQO kNH>wp9d]qk`Nyգ̐`h:W˒~QTnP}j7 nOSTͬ #Ul4HVVTM!BAmv`.LpRpd];߰ 4b݁=Kʆ3FIx|w=?0e4ҋbX%irBV,2{y*di7(N?ͦHcC u*T^(∲B/_?<^#%,$ىQK mQp߆ 6_z_I@LaD~`l7+#n; U,ew78 &I6m!C6 0>-k*Ôd!rF..U\]ŵ>fG.0cu@ %myDn|]KU$rTau6倀 yTCeLOB h+**㬡; n?#y#s**A3U] 18 L,c~:u-Y#JXt  t!G2j,0v9"*jTJ"[LM77(u#I{2 <- U8uQȱ@ʑ;0ocC32꤆\%mQшHEhbo׏*T|TM]@0 ڣ8c޲O_% yjԷHt6'o0FVX_KԲO*B60pYYV*H@,9.>U3)t D_'"ҕ io]] / @OOO xJu>^x,ȲHs@({ ` *-N۩^z@'M)Do,q ,:lg?;[Z95j3,K{ght4qf]1}I: 5"?gԢ4e!+* X#¹:e!IVjX=/;|HCkP:|ϮZu} j!]ZmLbRd`oV*y i@WHr2w6?ad=5ਣ 5E=֋1[LU0+)۱o*EmwAы 76'hJѸGW.U2$Q^6;X[}è'54ӵEPk|@IBhRBsRG` %D< +M378*Q▯9d_o<L첉EZsY5 "G2C5CuEFO0+` ϛ|LdI[T:YeQC`)QGAU$ӪmQ]q0j 4LOQG=` es(مy?8o#4-bž 2HҲdetiTPUM!IcmJFog]R(mk-L1BsmQN6 UAΌ2;K f*`vm'aU,eRB/`nznF[;'ȆIbK:'U 8 80UQ#$ 1)X6U/^q=U<^u q<ŕM?QgUtEƯ_t!,w`STlm&^E'02.zAY`mrp'\Si"`'uv5qOa0ЄX5?!  ΨF r/{*Cll +Ϲ7 :$hnf&;dGzlpzQQF'D|Pp&Y\ZJ:S(YChF5YKAG| nn~x Sb/`#w Cj\#徍zOm;3XIcrO>x *)B[ȏ'56g>_逺f4ʩ {YUY#X;#W ˳KNE$[vǣHBbw H?L(*jثxj!pJXۉi+j VWP;rgefKXRoKFVeDj3zkKOyQ˧&Bhk%HZi)ٕbi9UzvI~p=p2ֳ%⯣ @#x*򔨄jI QNLE}X gǐYeOkW{`L TG1 v\(k)$XKbA,~V2UΤ P@;0=-YFs!z%lO]Xۯa0,˪߮|$ f鵺6".> pJLt񪸲wF,M 5$&!;F؟o/<E?c8 msf @f"3aM)Uf1o`M!VS~_/2nn秦.҇Ԅo*mGU& /x.'|*`fGF X HR.@6e&Sѽ{YJ4k~#/j*cM+N/-$ 4$fF=I 6.m,}(*ۦ`'ɲ:_QO]RT%}Hi >e͙He tL[=;v2VS}f\jV$M!{B:/56WLՄR%D_O\1ZxyM=~oASOfm*K_UIKUѠ:KUT}RH KlFd9%tfuFPmJ S!N L0MTZ¤F 20T5Fthy*H[uP' m UdYsVdUd'xj!;\u"apnMFaĵI )Dq&iuӴȚ\+ilX`"zJ٨+ Hcmn 05,o|4u-PTI|-ofgaX*`vMSIe,@g-|_Of# @Moc1)i#=!gyBeXo<0JpiNutJ5,HPŕiFLLy!y8ժ0 Ғ۶4ّfEEvF =}b|51"Ӧ*WMCo*JxVWu /3G!Xum pGufifYe4NRSp""rzi`5u0hS GB`3(3 2I9/Os3G*Dm6EK{y*tbF|ٚrĎue4s6"$jXB5DaZF*vpW}qqU5fZS*iɊZT܃rXp9aMM`xoy0F}_t-!RL%#u3@]Gcv= SQT<-g)4ߛMqkw]D[p OH̲HRp 94 M -*JT,l16,ҦۑLjk+)+dijf+Ϡ2da8+3>0''ri =R "/ i7x$[oO!9T`pLcUӨ@g- !iE:X2p1$uA Uh]ҢXBI8<9UAbбX7;Wg Ius ]| `(WGU3lQFwP U[*Ml)7*G;*qESp|FJXWmnrJvp4 tfMOxc @&?RQ66P:~MZc>uU _?U8r;pH+${ؑ逊+#jn^x 0 %(aHpyUlĠ5!o|\)mJ# !#si*W6BI8rų h߆)j"SN+D >bG &W>aS,zrK8lˈgrܱ)ࠩS%,~L3Fm a(=p""x [vձ|T-fy5VXANsDgP\:zeo!Lig |1^!8 g~)2NEkb:cAڡHʶPXiQ$:,AKǝ:̎*OeɽPf*3 \)5Plon^2))ZXRԫr,`,KMUtyUC S9Ts/t'qo=p6)zV?8 0È ~G 4u[倽y>b*i[t=y`; q 6}$Hȕ WWn[r^x%!_p?1k}0"BT*z2O{YT")  ?#9H6v|p'[LDm}J~o)0CxB}\[ UAYlps&8Y"b-o_8yG*tb ,LּG5￘Hk Q])KQ{5?E mInpDHݑB W$2RQR7~|?(! "H:)QB;m瀗0WL%CkZ0 <#™W(Lɺ Qs829S4.ST/*93)%T t6pE>M&gOTi# +TxX$A aW O 3686) P4E7@:nv _(*Nͪ+)MrS$f#l du4\gř-~UN(%02Y{FSTsVwScToh#zwGfg,) JeB}<K[n,@/|+s&9YNȺY"^^8ʹ*W "WFQOP'<$X\ik-)LMM3fSG'XDidjj#PۜəQ 䠙1'EgAHʩ*L[0'~M]̩?i ITRE֢\c}. X!xs8h3\ S1*ۨg|3wSr$>и}d4n|45$Toh飉#rNY@N4` MU} O#0a5Vee89NC^&Hot~8 ׆E)fFe=W7R9tg=G*T?yU02+2%c\gǐ̡F͇瀡*bJ(]tOSKi%^/5A*m`< eXB|@fBR]Ze (v_[6̹1Y!&f_9%b :x1_N K=iyUP DHEřl;C)e1O8+v;bM V\`MNgĴM2Aw?֦KuvSQ-YbI rh(rφҊ1O~1o;]wT=~wtA Q@i68sSk(jQᨚjxc(rH ?γ뙟H-:=X6S<8UTSdi>ϒ DSN |+s\/q4SfrFgY*$Ux䱵*A0Uq=&wpSYոeX#V6 .Z|&|9SU$T(W3#ow%daC22:dDG:7Tu;z:ܲ:8 k!;+.NR^JR(1~GpPHTH*1[;`6r숃qIKQ=e=xi&y5e LP8C'7`qni>mV*$=?ª$ efuC]=Nc1#I%5nJn<]׾qsjn֢Ơ]t]+}l\aEQN2̆y%0'K2{ ^sJ"W`9E; mJ{'M-_UqVA5, 4`sc)˘hIz[0W U =,5*g|D+o,m\v aĤr0Q$z HVp~ $K)s ySJeu ; \+q 4Sk߻DH0"DvS 9  Pmo8)&4,ETWƯ7z`:wR"z5k}S1Gw)),icͩHM&7duMGaQIlR{+NbԴdiN~0 tTSEudL4qw nID fsUca -{d3 j2ܟ-0]<"DY}ܓn,ھ,)r`AOU 4hɪJ66YeB*)2"iP0Rݔk&[qv[*Oɫ4J:Yƨ`9mKfQiA𪛍p)ZVn]WVqނ%Ud.5F$U Z5..3)>S2(E2 H/cnd` pKĩ1XnR??2|-ˁvz #[*a]\Ʃz$x’_~ 8 _xO4<0{mP=ޚ+DŜ^oo9+2ژ`!%dH %G>XL-,^Ys,.PA{[OiESAY}=1^tReoܘ'5W#9dRq%La`U Pq}4*#.WFm~0J8*'2)*Fٺ-sk s$exM3p~#~>7S"EMN`愘]ZW'2뺀w 4X$1'mrΧ$i:`h AWFՔ#Ȝh8f4mDJX]8YQmm| u&M͙pJyiʉ &dK{鹿;?i)S:1\S|P薳UmR:O0A yaRSe:f. ~z5i?h8OБtmDT2$@ߎ^1J`EsXܟQQ%JtU*]H 9)fQDqJ´Rjo&OݷB}NOf˘敕=-Y5Lu%t;nl0 hz4y D \x?P9/}I27)MYYRi]bD7Tl 'MKFԎ:M30u\ƥjI` s,ʨ(^2nH[A[0YȊ|iSSɘ}pUuѲRB vñ&mrYx倅+ڛ%gJw A$7;LUlyu[U_ECgs!6*Hƭ0[)i=;[Jw&pI@wf G\pmV5==q5:pMQZDWCƾCO{sdTͰ sE4t9()UռRިP#{(k3ZգK3t8eɠ>&$`QYP4^l 0Sc >l@/Y96$Ew('y*1:xBڂ!BgS T,ϫ2R& amU`EU},21P6 Uh!S.$g _1 >I"{*(;mokߦ g4f-뎍n|JCc`EEh *_mϮ5ٔ<$գZY#SJm{Ñ1piKO Z41Cб&{i|DOmE:FͩŎD#F4wxh9^|ٶwQ'*0rE ĵp=c2\Li=IR"y5WJ$w{F.|ۈjs ۚ38l-`; o`٩S{^XR0qm\Tt4S)u;JkY(68 Y}ԥ$|؜jq, H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3-bKGD pHYs  tIME :+ЪAxIDATxڱ 1A}M ` m{K,l蛼ϷX ?0IENDB`pigment-0.3.17/examples/pictures/line-pattern.png0000644000175000017500000000576011205034420016751 00000000000000PNG  IHDR@@iq pHYs   OiCCPPhotoshop ICC profilexڝSgTS=BKKoR RB&*! J!QEEȠQ, !{kּ> H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3- cHRMz%u0`:o_FIDATx1 CQsCJ("dvz/*{G+Њo  @G#_2Y)3~ şp5@_l|&~7~'%> @ @_HcI "?}>&N0WPxx?}>&N0WPxx]pdIENDB`pigment-0.3.17/examples/pictures/fluendo.png0000644000175000017500000007456611205034420016015 00000000000000PNG  IHDR\rfbKGD pHYs  tIME  W/; IDATxwxy;Ţ;)"(J%Yݲ.[q{K"'.K7q^׸rlUKJHQI ^ͼ3 $Ar纆 .eΜ~C(tQ:JG( :Di ڏ;n /\Ȃ@~-miz!jJP2N.T˄+`4S@?E-QעWZ%+`yF/W~ -0KKVA5 7 ^m>Λe+%(f}C ClkE ?O%(0l&|D5B ðlh+ϘQok%0}`YvټQQ}0bP"9J-Tґk-PZ%Dpjf $J~8, CyU4mPȞ ̝{]+QX'\[\tgJf@ N*`ePuMB/0ahl>`|} -[&:[E7d=4"ૄC}Ki5PCpb?6 4K|nBg `&MUFX~V0+ZL3 ea /F4͡jXQ >dƽT?l ?հf 44:m,us*d` 0Mcp:.Fwwo ju|Ubj(eiLO0g pfwKws!ԝ, *[7CSZS@`Ҁ@0z0eB[݄`aO5;.rT/  &`@€Dd j 僪lBdup1ӕȴvM0}K8r)H BB'mBDԞ*" > bzO7W)/o]>] `З(  &*x91 m1CbD:X9XpMm-%4oTgax1v=\vA੾6Ry/Uk[WT2g~G(U(d~Lo"V^ 7@i`؞`V]6a?Y5]#$K #DNNEdUYι{|d>.V_EUJ'V%P,14kۼዅh2[ vA̘R`Zj%bp-0Tv pH%PIA@eB6 :`&٦' \Z̴[/i}?_OzmA JtM )2TـDỳip1CNnF&i0PpLAT5LC>og;y#f<L eMPu[ 45/Pev >YNN+W[ NXp jF1[;\Pb%8iZ1#BT,ե=-b?/0ܓP%~\ɧ Z˗`b&FL diڀD3 !IZYw~ j֚3U9CNjHN>-7/jVb~7l%tY`Kڿ'ߣiKrC< ~8oEka'ǿڳ}JX9vU/`'o/@drXjf Rxm|Ձ7+FȉIxe #%_2ῙBL$k1sf* SM;UA4~ ޽+$#Z!*eV0-d& T5sB_mߏ_x)go/f:t)WIef!j&Pzďl[?fRּ*fg?c?x sK?%8&(DU2 ӗd×o!c-i;> [v[K0Y 7V 1ۭUN.((?p\aP~/C<|39@)eBTDLra1a;~6{[㷃5pmP wxI |.K95ۢLbN1oc~d>y5\YgA'D>nؽ8RŠJ!?jp۟6r,~v. 0&ZG)o4sB!HuT Q@`<5'>O$!z^x|8h_OpORߨT*w"@/SMQ&KO@q1|.ihZ|UфCpRo\fۿ"D;:~Hf~1IbabHc=lkx2 1;jL<$9]Uz؞~a%_η;w; 8 RJTzF92܀F5Ag ؆A?Q&f>#y&!c1F/ݾ~)rF~?QrV(/-}씄$ k0o`.>ШBRcx~"He~d%iVcҼB7n8kE%cI*1$"ݶm?\w|BjLв4(_07fq׿d Ht4Iʩb9 St*HQN3\NhAzxl ~x!lӅhȈmR+:v"!9,Az cd~] 췄ߎ4~`PG/Ed*& }p&YGfzt>?ss ob <nzO"2?='`nski~bӽ5D,p}-$[s& y^BO$.hO ! 0M,ehzB* dp F|42i<ʓ$v9 OoіQP]$!73p@s;|Vh̓7>VUMC?Y0fϙ\뎮94<Ƕq~1"Z9;D)0>K'Pbʸ[%~6F6>h7z! _[\6lA,Ql2]|#OQD1~G$w[} <[2FC5_'F6oMyS3QXD;32 M 0!$6?jjְ/Nk^qg0uEXh^x^2w 汵Ě7{k|B>Uu_yº ,廬&jYs)v8C-`_@EL*J708G8H/0JjNsO[^>!ISҪ):e5TT)%wG>׀a"8Cz'<(g3'(2,srrҤ8&s,jbY7^H=Ю .',?~V2y0Np5PVhfрcvji)aB4M ( #2Յ /s5y51Lc*oG ʜB9L'<y24$`g;Dy|r0dᅵTsZ ӘΝ e)@I^;L6xlXӾvO5-_W^= w? I;i9N>6p$:l;SL9̣v4*0Ѐ!f`>Jz6W0 M':Iqa%%e A af,Vd Aک*| F1lw S 0$PNTҚ3M h$4%#kcsg$BBk{Ur/9I 2#9:su6muɆqNRCQi`oe@4jǻ+`ru_ 1ba59trDn@G'OEe_%+u2uSLհ ula*USiUi&^Qe-hX\Vqq&@Be&4߇$r?o^ϫ{%nG%[e9K;TBbP]>K FZ#D0mVk!ckÏj :ÌFLN[ cm!\f: A@p}7mAݛhkdC% ʿ<~ؾï_!}S/:瓄K;#XMc/}qG&#d `t`&԰͜M;5Dsrm Uo/#XMomhaOϒ}'LIf#U@0 B|{|@?q-r-)+GS27S]ݎgTE)Ue(x{p6E9\:D@H]T,;%JڧC[4D4ײ{ĥbj1+  b9F>[?߼y>kvYZjzk ) ?McҾ'2%HvTU "w2aVe26a fv2fک)}pgyD?,JGa~ ǸGtbkd*LɚAUKOJd*5<Y? Xڃ+e52ݱ ʚ. J?ލI -PExPM@U.r7 P1_ V> RfŌD*6G l`FR$ۙ (n7zD//N130' kTs37sq jUKR\GXQ 놬MJ[i\f3p뭘|0Uso7!MP)x$AOy u6tT#OS{Y}K h< 3h0T2|;h+g[j9wy_X{gq:d}):yy[:QeHDx7Xamjxܺ#x kfp&\0 (nW\)xUaFHoA9 ԰\uh ʯxW2O-l#[(5 QS`!3[)<eShRi V; c0F|fA#p& \}&iX / &6f|Y,2>I%+~MH"Ac]l7tls!&Ť$盓tpGOH1,-sMi 8!9j~ggYs- ݺC+FroǞ5t ᨤzg ƜӕU)1GJ;YՓ2NY =Q^bC p>p!M# u0{\ @H/?^QˆJS8o(|*ckb:>s?3a7icWr;,:]O߽&38V[%e v -k/`{;P @q}̥@owH!I1l8ANcEQ= Ql~/f|)\ZﶪR3; g~A6XkA;qx*e-QqoXAw/6K ;禉7ERC\|Ѷ~ӣݞ6 ع^ji~wɶ@-+Y,( ?Յݝ* >Txg0D[y?s4:[MwRXbwb9sD"U!hSԲn7ގV  c~202@a47R}-*^IC#0/npAH!79i,JBVFNQo(M|nPPE:L" .^=ܮLp";9t"{XL0jV/@s:s_IB"pd#tƐi 2y5j7R@!ܵ^r1K2Ŵ*Wq|>1) wL*o;w;Ebx$, qC俍r9nVʭq 簳,Ĉqsy-y61[wt}->߬0  K]XMQe' .(?g{'$ۿuϛbg,XϧR$T9 OcN^a=G9pFj$K"طKN 2̀MbNc[yq|~=f +Bⲏ{?tDwݡiu]F@؀AXT|9,E E}&P醑Nr(P*#FRZ@c2[Q',.6e0@tA6ugG$ ; ynЃQa;hTmЊu܎?ʸڅ~ 0v0 Qf;4QHy4 *`aruo!"w= [IhZl0f%~=f OL|N{E7駋NJOz Kb$EΜix]j0bn1ssб jj;$Ē #(cݡ!V5 !Uh{lUfZX#@nyZ0J<,)zuOdk\0n3` vuOzޞǙ=i!NeP s R(Ykp t}6eoFxdp~f; ӗ ymS2#t]7c P鰹6{%˾D؎Ӭ&EA8tM?}MnSAg $Mo7՟TSd *YHT)|m>]L@@Xٛi"W/V?>ݒN]"D H,'ytWK}擻Kmg&oz{7=Gx6!')@[–d~CII RxhX_XX_6YkT4A)tvv2B6cXqZl}&q򺛉A]t4Pq8V p Ш=}8SB7֯jڂjdzH%L  ?/eHKI8= @$k@~Fs,DT:_j顓='N%89ucl{iK$(e; QɜK@2.؃D2f!3C@cs]U7s6GyR P:è~3 [m >qL0h6ᠲ.%e޷ .Ueы34hr, M0B?c-tΔJMݡ1wͦP<T$\?{꜂:C=B6'Ibi9P{ #X%Dèh0tԣ·['];Aj9PY漸L0z S;._>^e'gBc^wXm_R#_z\ΝIVaDNe,`xx5U]33㐞#D <_'/eIryOS$\llO 0.4e,ISla؄̂.X^o`6zG IqPp3v}2?ed6mʨj0ꝽK>`'&C0r5wΪ.W0*N/$oLdGa$g5CCy~z>t"eQ<}l))p~KF\~tNw9NiMS~ڵ3fc@(XL!iڬ#Y1#,-Gs9ܛ7 A~0!2{rɀXn@S-Րew=N E0FA#`ws-c%֪|]L %sN8ixMj ,)=rcŰ񷹯Өg:xG)9Yvg!6RpFXeɀ<-h@uDZw@XM@3Wq rtt{1ClXtlQ-u:L벛U1@ꩴRW'@^n^K VrAZ >*>Q%".0[\Ym@, +TedPf[~A#j.@(k7x_36v{TXe''X:@Aa: ,:V<^e&@=}>ۡ `,J*׶ZS8v83 O$g={vWd Y a]a!8kp!;p}x3/~{(k P$kvF5D=+l&hlcȭ$ek(N)KT'Yd CЯY q~{SC[NQ-?,9ظ(/,6=Ò@ ? U!^";'FtWIBUr/r$`=Ci| #yMT\*t .|Sv(0\0pzXH&A01Bbf^ce( -۩2X f0ysn; }i5mqP L'L54Y8*b j"4 28gsѝf8$Wa 30e~*,O82a[ttCbiK0+0C,l"V_Ϙ!>k^!AIǀw n^7OוC~!N9yF nhσE5phyMZ 9aS8A3T[S^y ZiD9V^&'_O%  axD  aY3l|zt K({G-`a,`->Y2Z+yߒLG%pF lӉ+.ò}<Q_B w_qa^9nzx9 :s]UiڙIBt#XD+>>u9A0˘+d/XI0 !~G@ v'Ah f;! ;`Ẏ&ĀZhc!gSNIb-Wq K|Ic3-o[/O2?D}Puc >@ӠSj s`M%8slj >4ʘJMQP (ej^b=@@w6S`G`d<=/,(@ACWb8, lR7[^~42yMr/qnށa ⇪ka¿U0$vq KK3G7ef 1ЁF=UQceg 4)g6>qAr{тoD&Ͻ7CϏ:KB:Z)x7C}\|燜#-ZÑ4Lc3YA0lA~F}d%ᷳ+cP xeTkVhXqUW\WAL7,as4 |geS rg L@*Q. zـaH+a|<!P A Ic&m[276QQ ,fJ4t+^9G8c:ʡ?Sm*HJ3&@Id! \ ص=;茉 `(؀#0ө#X Q$ mDfLnj?'d*~zC/a;`g9 AQŠk`s/ْM։C(.jY[?$[=b}ϠÜn|KѤd&ȟAm#拌xjP]WsW4#@rx1*se\L gc Z`L#R0,m o?_³qX w½t6{ɍ@1lGle$0Aͅ0j %ы6 90 V] 1Ѱ:ӄ>Y c&L&.d>ͨvlS^rYR~ C]0㎩^vЇly];l'^ OϿpdh#CkC.u5xK-p͋{̡vp41}fjLWFX3 s1-,d5aw-},ܬfrZم-irg;N4pnbaP>Jw Q-ζ(Ǣ 3`B>-8̀@qUi'.]> |EK;Im#h;ND+pwݧ>ߴPL1;z~}fW!la({UK@ԩFWNS8S}&74]RODU=1D;VÇF0&B.`QfHNTĹmqrq7\rk7g=|z*cH3^ؖT'7Œ\{`ligjn&՘vStV(K/Nv )ee 4>t j̷7l|U_Ki:B ReShYq+Hi;R|oI}'`Ҝs8FH(q0jf%Tg<nq(+Ny*!.΃C4#駏q䰩8nxZv42oyMgtb xH#sb:xu]zVBjf`*І&ڸE449ף9݃!QkQif/Ϸy{9i^ٝb@pɭjek~!1aHm*9fi/  U߮ p'xaF7p= |6M_)  W *z Fn&H="Ͻ@V -d icz e+4l` 1i52Nzk9߁VtsppCW26s}֚5,q&T0&T eXC(= - r&yaZ9FLrA#,ꖃJfZ# zu <4tC Q: xtl&͘Zz"1f3C*J\h,Jݿd$b' @w1%I@c3p]`׏_#٢%ј2 Zge=T)P@8N ${ >Xcx@Bau=BŠf\hqÏU\9z=0|;^,[K ,g:-Dr=~ Ŏe4%Cr x"Xf|7xQk *0r~4&7^6huXZڨ֦QBX DaD(CC˫ qF([E7dǠ[?3 nLlO,  YZ/b+VH 0"|Vޜ2L`)P֎n:|cPmcq<@fv{`q~ }1ࢮg\11f J{.rj`  bXc #` CQzps<~w*πA.yX4G׶n=p p~}i 8[I abuXxde 34t@ _< ~|KCw\} ^ $*U`.w7<"sTdno +bN {B^!s92RͯY+aYj|p H8Ck!6 l 3\QJj@˕0!f-7ى[@&={ ֐Zl|7|-?Y=hxHA: w\ۏs%*]Ғp9-#o^ ? 8]W^i3c <V-}O®!gv)[lF;|ð=P\/gd";5F$'V@x9Կx S' I7wϬA>0ڨˣPxrUM+'m׀_w#|7_} I~ypNZ2ng9s EIsf8kS!z̽hm_uFחsO׉Z nӦOW|[8G~O ԟme7 S9|DY\H710M!xilͷ^-:l@bxC34삗z,6 &q c(մtr&$t_ ˝&)+}8;%I~BT̂HȒѓ+6¥+a&=Omss יT1A1& xl DV@եpyp|;xW=$1m}\!}k🿆Cd R`,XH/l7#D"Ls2sD86zyqfʉHia2yQ퇪հl>t=pdQ哧%G(sʙnrM $ᯆ_O)é9 u@|.ۡ8v$ k`AJ^LAXh]_ д hٍ0 2ڃYd z0N% / 6&S̡(Ւ+',f 'u)IsqH*SEL8jhY/I̾Z< !*#Vڢcm^wĚ`Ӱ9~oE02gL{Ⱞ@uLWe>KM%vrlCa rɋZ8r 0f/Y[|+$D,~my}8K!,Ov2޹K߆NɗrR~ؙWp ௴6݃g; 5 #rE ÏP[an%Ԇ.\r[xqnt lpW&wә3O=mO -2#ŰZ1<}9Aʆ!e*VFf\@lzEVlERQxہ.7j*hZSL(e$ S:˪jeYXh\Zx-&k?wpgܝKF>@v+B/ VaaU'ퟥEP[+L! N҆Jp0z{.d.jcpc)jm/)h98HYAMvm,%9 Agڪe xC/N^z(]~i+O90=[ /˯Džs=g atLS {[ Um99M"U֋eoL-g^CБb=b_&<_.}X)k|8y ?-}VE`r񠺛oc54 n(:.b6 AJp̆`Yyӟ_:Xv1 DP~HU_Xyj&.M[-@Q?:!RjD}_N31VgW X ${Kq51x08"~#Ȓ"hn& H: ұ>N)d/wWC^oãd!TӎMRPέDYC 8qܬ(L0 [2}^s{QպRc59`rFfLo'epհRhF8߳"X,duV.m;p"8^Dh,/@`MN~yG"tJ)<h4xb<> ߁lERTp(b!c`*.+&KJ:X]|W+aAx0:1)Z cGY-v 1ƚA)yq [7_G{ܴ9=c|"T*]C=KӢ/"CNwHTl˿h>[j#az̰RSдV0&qsrϨzVNV%ldgcP".'&FolX|_<͏J|tJՑ$8? +)tlR\@[ns'>{T( x:'_K;Sr޿ׇ+ q) *mI?<<*TIP7thdb|yzVC\L!/Vͱx-u;l XJ9 _O&? 0w! b)Ͱ,Gl}|o)蚂Ώ)&l1]]fEEP5T/;ޥICaD"(ESr(dIg)n/BoWH߆iY H'L=/ϝTѴ,8,BVRluFESgR8|~=Dls_=R: 0,!rlq`…0 g%˼*4~mdKaM.%&&5/@} lU=\O`ƕʁJLKOA_Bܲ,t N1$\[^IG[@g~6|Ųuj ]NA׃ĠH)$E$U@51 )' zMb*H"]*g)*^SP$(.Gag2~;$$ހgaR\ ʒ|U`N~AwѶIe0Ej_2* 8-ʊH͖&gaoO'@A yyTݧ*7\eY_X k<%nd?nhZiR'nl ։@c~ YA>7H&f 0"ͬh1_=: <,RCD0]I?=:kBU+?^|*%`6R>!W\n࿮pҚ(Zu}x͠G3ηa@wy:vi7Ú[z7OiG9tn|f3Xt L2<(rw" 禾d@/پ.YCWG;r-,jő ]I^Ұz8Xx{`?O 2;PJDLn.*x/"OVhfm42yOw 2Ct44kg/u]FjcL7IXVZX{|z=[.Лu4SF: ;0 wijt2 !#Vlw-Q@VR W+p1J&dcZ TI!^5ÑfXߠe9T^ U-ް2|> l"{ vNKa-mt;VBy^/=Z V ay ܵBXW:08n,wöp\~^ WJ-u7E:?gj+CaqhLG.#F"qy "Kao ',R^/b-JtZet:-R Z UA w, lq,+OGPE&tq[g'Ǡs+8%F4s/5%t_`UKFܓמ m^pC#)ĊJ.6{/ ^'$}/iYN5M%PZq="|Vx94M%i k lCIED7_ۢM M܀hD2pr:GlD佞T ^;n?ǒ9OC39*z!eP4TDv/ F0LĒ_É>A97轟A +G7 .$zxz["N)ë!lcNUepIXiV5G<5 –VUN>QrUi 7GuADRڟ6gCdkƕ}A]Ք\2 kj`M0^{T7J\ISξg<)d#D.9VZv1<Տ&h}$4:PJ <U&0JFbCU:bjXՉI;R/^brl>"(@Rb;,`'<{TD$@QD*o1*Xc2ݝ@_%|XqlNoD0b~/uJ6෩sLݵKpJs1@!`0佦",mC>/?Ȧ'ag8,u1"rFcd~Oo4DVe(&f _TRưV-׼c6/[M2nۡ9 ej,(A4z0KM++rNCJ}U\TW|=&MD Q vl=_5Bs14`ND\x))\M P5zYk8QJ* A"6R `+K;%KXpQVAęCv ie_ \K9K; LZh2HSXeϔ XC5cXWኋ2_lDŽJǶH_ I.)ji`븓oV7fQ-: b[wdFYnQ \\{B ߉h_§jRhi8@-ɒp =o*@-7q+U?_-q>GI.K`B+_ _w>Q #Hl0?S 80n1=6NftPǕ\n%A~nmcڔF.d944e_Y9T|w9ga990z7u5/ ¥@S2pwhFqϬS6v\l ImCe˚p piDHap)&[4&Q7ߏ 깖iףB@oC:1&*]뤰"#p Hp(߆w|"AX߈OxPbcM?A!"x>dy|vaL>v;|,I%Fn}Y|~}K0MrUIDAT}O{,]M7ݬPB"0&9I;.=X=;/bYT~ #Fdχy~?5A ~<,v |pwB}NM;}Ldtm{ # ꆛ8P> XYH{>>vh#{ m[?,R>h$ ]q-gXL2-df1JȜp}냿n2oC!_ Tgi |&8ȋdo ypא矉1~IbT=23|F,G0sx1FFF<}溊<~x:P?G@x-Pn% zWw0n^gwOJ?ǿ-QJ#}j)f)7,D΄b'ŧv$l;w̞ܛq ^/ h6|gO~i7bDߎbi( ӿ/SmLyz3>,v.p;jC}۷rg3dϋf.~ ǜB9S[aA׈ i%yYmLuZj r aPZnYz'|V`dE\_1,OKbŗm2` wf27}"qc-B#>#},@]aٷ,S7rM;\_όǤ'XͰg/+8}K Bb p= \e4d(7E N M>#5-?>?Elcd',>`ۡ/LɌV7oXGmYD-uj4_h^zo~d5\ǰ<'yWh\7mс(׏Ypl+ήÎ@~@`Ywж?JKw nKx}c0){3Rr˱ FJ ğ 5mM!GDkq@O~#H$4OBlΏ"9u]_GvZMM<)p@^8]1$r|i^?DFBQ1翖XA[h0>9,ddɶ08&Ŭkz|\BX@2@YֆOXF23B3aA=~vxIH} ^~ߣCd4⒊wͬ&>M %d'Rn< jJ_QE9BX _,?_py79ɴ(szzk K=eC:T}Q_dbo;eP u]O?qG$_NKpH.$-'/+2 T)"f?7y{?{z-zB/B[5c0[5|cP3~a q3K?4 dk6 Nw h}G :>_Pi1$)Hw$apL Gc9_N9訍Pb.UT> ?=]`̐3/7SQ.m<%7a I; df<@!Ap,?j۷!CҮ;RtkӇk,Ejt hW8yIųSV9-0J^DKYAi"b4BJ~ɗkC/(l ϶UmuUS@[ֆR׭tqiO,$T+ +5 #Wx/Iة9fjN'6Id$w Tr`gZg;y`K_qKDISv%)\CXVƙ.O/^^W,*o&\ >o(mR׍KO)?Yvv[fd)N7 ͻO{M&5*a 4fP/4gh) LA̿_ y!R}R+zx# w%ѲEyv^@/8:\TUNrs/-0ʾr.Yf g;Lf]<LN&<i3 ef?ȶa0@]YT@rmN{_ *Cq曤Oc7rG%u,#N 5~q_}\80 qTB@sz+6S L٢o I`,`~$2ϗ᪾6ߛ܈M9$~n k%Z}R#LApKs<_ `j ʺ8<(527ͦ ,}'-I1Y'Gje?a3SUΘϻ3 X 3h(\z ] k6E!ж{@(n_ pN'Ŗ# *Oqpݛ2J7 ߤd]<$Or*2x8t*VtU^EN!̳t#4Y[e> "1"6t*?x<2z]e  uIӴiAQ@N|s/'̷~]xu[%EyN<lwT Xi7BtuDd6):?P{4.뀇ݘgٶ ŵޙB?an[g~O 8Evc< B)~{y\F}g{9(K#7FDT@s7%ŋ= /[[+z ~ē,rxȈU4SJe^7iPB4cAyK gZ/Ԓ`V?`4iTc-0ߧ<,L濃gɬ6-\HE1Dv>I"yar-Yl$<}'!73Hp5pjL-Z`Egz)2tb NB,2 R򚠃.ӽ[/ Q@}Vro G v ]$qإ+1óA/R)~'ϓdgpCl@$8'}5i"ZJ0{Z/ZT]mwt ͟_~C=,jrc{|}O&he3?$I/;fp]8p[#F$ݾpy1lyF:yԠx5jݰcdFLPP,a`-Y&+bRyvrPnwDY{G`o?< G!M(\k }Ű!,b{PDž\*VF~H{yro!%DTt&`Gl81PQ YG`p QH!\)RԱV\U yr>tr=a;:#n%6$! j mO/C h^j+ zay吠M͹=W ${ (tĠdž<)&>_@E0P?H+A/CL23tMplE~yϗKmJ)Hʽ)q?GOzg `aP*vg _4]D  ?P@E(rn5W2i)w0En5!\J Nzg8gGȴ:-~`$SStНstm-H2“K ] F!\xä4@ 0 `Ei2B@/q!l[ݪ^!<)%[]!BV!> `)8VІMv%ᵐLgR_Q@KX%pxa4m! LPM+*av9_@x\Ʌ!TSGuP2^!)@x-@PBlbSFϢ"`es+kzq\d5(R4-v?H0ZXi\e(.M4a'WuSN{SQJAv$ ,B/rWqhZƩa,*x#bɫނEd:Lrs#qdB:J1PkIFzx}3"^q&g @x-K#6l+ųׂW@A LJjCՠAh!"y,Q%rIENDB`pigment-0.3.17/examples/pictures/Makefile.in0000644000175000017500000003135011205034672015711 00000000000000# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = examples/pictures DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/as-compiler-flag.m4 \ $(top_srcdir)/common/m4/as-version.m4 \ $(top_srcdir)/common/m4/check.m4 \ $(top_srcdir)/common/m4/gst-args.m4 \ $(top_srcdir)/common/m4/gst-check.m4 \ $(top_srcdir)/common/m4/gst-error.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/libtool.m4 \ $(top_srcdir)/common/m4/ltoptions.m4 \ $(top_srcdir)/common/m4/ltsugar.m4 \ $(top_srcdir)/common/m4/ltversion.m4 \ $(top_srcdir)/common/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAIROXLIB_CFLAGS = @CAIROXLIB_CFLAGS@ CAIROXLIB_LIBS = @CAIROXLIB_LIBS@ CAIRO_CFLAGS = @CAIRO_CFLAGS@ CAIRO_LIBS = @CAIRO_LIBS@ CC = @CC@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXEEXT = @EXEEXT@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ GCOV = @GCOV@ GCOV_CFLAGS = @GCOV_CFLAGS@ GCOV_LIBS = @GCOV_LIBS@ GDKPIXBUFXLIB_CFLAGS = @GDKPIXBUFXLIB_CFLAGS@ GDKPIXBUFXLIB_LIBS = @GDKPIXBUFXLIB_LIBS@ GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@ GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ GST_0_10_13_CFLAGS = @GST_0_10_13_CFLAGS@ GST_0_10_13_LIBS = @GST_0_10_13_LIBS@ GST_10_10_CFLAGS = @GST_10_10_CFLAGS@ GST_10_10_LIBS = @GST_10_10_LIBS@ GST_10_11_CFLAGS = @GST_10_11_CFLAGS@ GST_10_11_LIBS = @GST_10_11_LIBS@ GST_10_12_CFLAGS = @GST_10_12_CFLAGS@ GST_10_12_LIBS = @GST_10_12_LIBS@ GST_10_13_CFLAGS = @GST_10_13_CFLAGS@ GST_10_13_LIBS = @GST_10_13_LIBS@ GST_10_14_CFLAGS = @GST_10_14_CFLAGS@ GST_10_14_LIBS = @GST_10_14_LIBS@ GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ GST_BASE_LIBS = @GST_BASE_LIBS@ GST_CFLAGS = @GST_CFLAGS@ GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ GST_CHECK_LIBS = @GST_CHECK_LIBS@ GST_LIBS = @GST_LIBS@ GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ GST_TOOLS_DIR = @GST_TOOLS_DIR@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_GTK_WIDGET = @HAVE_GTK_WIDGET@ HAVE_IMAGING_LIBRARY = @HAVE_IMAGING_LIBRARY@ HAVE_OPENGLES_PLUGIN = @HAVE_OPENGLES_PLUGIN@ HAVE_OPENGL_PLUGIN = @HAVE_OPENGL_PLUGIN@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGLADE_2_0_CFLAGS = @LIBGLADE_2_0_CFLAGS@ LIBGLADE_2_0_LIBS = @LIBGLADE_2_0_LIBS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENGLES_BACKEND = @OPENGLES_BACKEND@ OPENGL_BACKEND = @OPENGL_BACKEND@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ PANGOCAIRO_CFLAGS = @PANGOCAIRO_CFLAGS@ PANGOCAIRO_LIBS = @PANGOCAIRO_LIBS@ PANGO_1_16_CFLAGS = @PANGO_1_16_CFLAGS@ PANGO_1_16_LIBS = @PANGO_1_16_LIBS@ PANGO_CFLAGS = @PANGO_CFLAGS@ PANGO_LIBS = @PANGO_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL_PATH = @PERL_PATH@ PGM_ALL_CFLAGS = @PGM_ALL_CFLAGS@ PGM_ALL_LDFLAGS = @PGM_ALL_LDFLAGS@ PGM_ALL_LIBS = @PGM_ALL_LIBS@ PGM_GLES_CFLAGS = @PGM_GLES_CFLAGS@ PGM_GLES_LIBS = @PGM_GLES_LIBS@ PGM_GL_CFLAGS = @PGM_GL_CFLAGS@ PGM_GL_LIBS = @PGM_GL_LIBS@ PGM_GTKDOC_CFLAGS = @PGM_GTKDOC_CFLAGS@ PGM_LIB_LDFLAGS = @PGM_LIB_LDFLAGS@ PGM_LT_LDFLAGS = @PGM_LT_LDFLAGS@ PGM_LT_VERSION = @PGM_LT_VERSION@ PGM_MAJORMINOR = @PGM_MAJORMINOR@ PGM_OBJ_CFLAGS = @PGM_OBJ_CFLAGS@ PGM_OBJ_LIBS = @PGM_OBJ_LIBS@ PGM_OPTION_CFLAGS = @PGM_OPTION_CFLAGS@ PGM_PLUGIN_LDFLAGS = @PGM_PLUGIN_LDFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PLUGIN_PATH = @PLUGIN_PATH@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XCOMPOSITE_CFLAGS = @XCOMPOSITE_CFLAGS@ XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ XMKMF = @XMKMF@ XRENDER_CFLAGS = @XRENDER_CFLAGS@ XRENDER_LIBS = @XRENDER_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cairo_req = @cairo_req@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ glib_req = @glib_req@ gstreamer_plugins_base_req = @gstreamer_plugins_base_req@ gstreamer_req = @gstreamer_req@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pango_req = @pango_req@ pangocairo_req = @pangocairo_req@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = \ fluendo.png \ meiko.jpg \ star.png \ line-pattern.png \ square-pattern.png all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/pictures/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu examples/pictures/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pigment-0.3.17/examples/pictures/star.png0000644000175000017500000003712411205034420015317 00000000000000PNG  IHDRxsRGBbKGD pHYs B(xtIME$܋ IDATxy]Uϩ1 aN d) B 8Ԑ5Bk+I}.65@RCTFmTZqݶSJ#Iq d!԰9S&ߵ޿kĚ"!Jd4-]&3O&eC#/_b(H!o2Dٳq p*p9| |;UM%Uµ͉2$c\V;uo S] ߃` "+R D 8Mp DU@3u]Ktyn.U%ED$Oj(qj?~:USD@DD$7>U6tT" "s5 )GGGP" " uIqĝa**\> @qrƛTX:SIN{VDD$NY!VeED$j;uSk%Ta! v4pdX\D@D)l*- " 6̼ DMCGaTg 7;KQ[8j~rU\D@DPԼb=QEDd6u'8`48R*̬lSR-! "Pz7D`ZBD@DC=0 ,0cZBD@Dəgi3hy`.5˚EDDdZ.,Lqjb5 )_̼bszp5L%O`sͼ\-# "S/3Rˈ(rHmQ)M$cE本QuR6֪YDDd6u -z "Stxu?=ZQI7k/Vsb}S'" "2ɱC^yXTK($Yv0?X>q?T% "$Y0ryC1_QIb͌֩DDdd@ܝt%j1 l9n~I=V-& "dKfvLD@DSMJ<u<KDG&nGDDdZּ0"ءq" "/ju -3ZBW{% }љgީQQ3nbD5{X٫eJr}nP2VQs `GN6ϫIDDd&ّ#,V{(/ϦQW- `m ejYكdy8vpOcԲ" "fV-]:؝ꆆWD@DvgyrJ`=a( "$: i}N@ܳej`*{ߗSi:5In֪yEDEj;+ ;xmms|<zԨEDdܒ o43N x7gcjم7# "L%x-PR.Ku@}m!pl " " ElZ@D@Dƭ?@(ȳ*uXyK\D@7u,)]^ jy%{* Tp5HqZsf3"^]}AW4t|Z(Q)JESQ)>7tKEU(Q):@HKpc%".Amm:DDc)*ku$('O. $pNo6 " "E"/as( RdW%8܂2(5mƈ+/nADD 3 rV5֘%uQ)l`I{r[T2(47Tj<Ha3|% p^P;]UQ)식^ ?nCQ)LKnG " ")dr`*,]sfUBD@/1 X1TYRQ)J`Pj*T T+T| R`~Ub:AD@:5qH'" "cɅ7&ye: " "<],Q%^< ,SDD 4hP-=:/( oLԓ{], eJT+;#_2(䥑'˖l'44T Eow߫ƿg ;1Ix\kD ČT>U`L(&lT"$PID0ˌ s rbLEʀ}eOn` p7P路#h͌EY*3rYf NÇ0g˂d͢ul6lId84<q}d"j -efa.'cn( 3!u˒eUa6fU8UwmP鹰=@y0"#Ndf݈<>#=ݥɸKQhTz |9 2́Q`ȱ`|va!GlN! Cmr1FaÆѰ c G0rcG W)8BPMPf &;,+K (@(Ǭr |WUZ_^Sö=h w.6hhH}1V$_0V\wnƿU 5lv\=Sĝ#1p:ЛoR^V*JBʉ 2Vnͭ̍rzQJIWUTZn& 7f, YVXdrw>MswFĩ*V`,؉8o4&_1 N!1#!gSec͝ø|]].4A,`CY?+1w3wExpڊ 5?6 +6t̽w{SXvmDY1"srI}{XdYfq4 sTFHgG?;j"D#э%rt ^k-Px~pZȍ?Q}}uA<}f6͟h"xcexQ.w v3?Pmb l1Fq`fa<3h6ȮGꩨiH 26\as)DQ+B)xidN[)UV,Y`WR{wY(<[sEl.vqOD |XT wž1Q (03f`cn>ؘ%+3gt<84|б` v|>31el༡_|辴ĮCp;JJl28s3ˌٞ^YK1/I/ıRrwܥz=Z /9و^ |bܓ\DžφD"O^5  t].st\Pal<:d̞ *c1%|,S6`g)Gmy( %#E"7g]j =x?Bnpz)FQw5]FDUC6usx7"qi~=y[kKGɒG1$7RDDd&.6v7=W9|B""2ޝ|ͮ#V؀Y:&EDd 狘wO.=Y[Kh\c]#~_j/+1f.ss ""xҜݢ[!>VP;X0w5M]I Zz""2A mqdT(;2ۚXKaǻǀkhUw 4ܐ(x?P&=p-}^;\ЃjF"\Ƿƣf\NjeB9'6h]g ۺ<[x1|Q6R>{5m\""E'1jy"/=o(ql_EDvwb-DQNS}YσHs@ǘeoyϥ#^+㠶Rb7>T!"Rෛv ՖUY4u.5M ; XCBD܍swGTX(YV|zDDSW#_*g {ay[%`K""W2@7ר~SܑbhA|1̶PU}Vܕ&XDJD$wmOcD*Ӛ=J&`"";`lqC4+-I&JGWB""3mad$'=-z֯0uj:K٪Ȍx CO:uɣ*>H=l9êȴk>.ހ`*""26c|)ʡ0;K`%p*PLa;挅\QIbcu16Ǫ"""́_o/ ӾK4@<5t&h[ ^""6|Wc~}L%QQ^ XZWR-C*@qjkqox3P(py 5jVy_uh]\;+}-3mtAbQItG ?irUED/~!y7=ߍq;$T5* P[&@UDDN"˲Ӆ_XkH3*sP H~0sF+5mf҃=[wU)PO:۶taC@Ijs CH z[ت掊L6"l3{r(5w$mYJU30%¿}T%QTUFs1ځUDDo5~d"Veʢ^v Ztׯ k͹ъ3ܸ 8(" ŜO  2ܗoZ,"22wq6i_"5 ),lB+ Ȓ{yEwkuE@ڦMT|aQB("2Mp[,ު~ne`q;Pq_Yf=9d4wdL]71>^i* 1 CB"}};r{zG_ qT9G""2A;[ڟjʡ y(1&,7{w$ gjRQlvX D}sQC@X톮_Ņ$Tٍ;|,feHPАhw qLgR ȩi\bfH`OTV+B,8.h."7gKBtWo"Q‘f~,ߎm!T9רXl(lt2^)D扛B"<ޮ{D@ht"v-~ҬJ" p2:?ŅDnĸ%?jQ=Z]5FhƹX!?@o=* /Ӟ;}M7ɀ. o, ̛wEb}D|!*(~i46ߢcF$v~|/{ZR9D@& 7S"\ ԩ7@d= |=g"@^"b%e UEdF<|@&͝ΰ+ZDUO߈kL#h""SƁ_|&sUK~2{zO*#2nvKp*"7-ZWDj:+58ĨAI]_~Qyq!XHsWf'K/ "{RakexVoavoH/n̪$ AkEX>r\E`ZADH:6m / ss "Si&tJ̬oQD@dyYLYp{* "~u~E!:8XՐO%ˣU QdRr,BՐZnf7t 2XDn`8ΉܵԺ(Lj.VנŬD@d9oR%$u+T Q cϔ8F7HUE@dn>k!y:U% "+[8-$ յJU Q.X jHWE:%(nJ!iJQ}eNT%$ϘÛ:4i(of4O2"[YӐR%D@d_$Bb.Q)D@d/-yݗ DŪ9A*(OcZ`!y1_! "{+sU s~&=8RNmSD@mV%@۩9WD^NCC ,S5@gelJ! "/haE E=q*({O)0`-yZJDvWSBtFٜ9 "u -$)D[Ƿ(XBH*ΊpJ! "㖟9r4@UC v "eeȽ2%Rߠ2ȳ-M 9uo*S%D@R"9*(Hѫo88E9:nP)D@VMCʲnV5HW,jP5D@ fF)bqr4'(HqrU )yI(W)D@4p:Qps" R|]WJH_.i.JGJ(HmRs)fG_ӸEE@Yb)pZO[pYrJ! Rj+QjsgAI]"ѸCa D!밢 kE"_2 Rp(:UBfzFD`!UQV~PbAjAs0p*!^y(HuT uTҳUQQak*UBdSk:L(Hش-z"3#(B$2\UCp Z6ZFǜ^k:5Y(H~sXKSd{ 7t&MMdM7@$OY@*!F ( 7v$l@UCd-3/끤!J ̏T#w1#!8[hE@ЌfwVg ةNEkl*L&uʔi~*ǛJ~ |*{sppE*@bm]C,oR5be$CoPeOTX5VlP%D@mWbp.:r$&/?{۞.t_|*[,T9e#ڊ[YQ%b!n=熻c R g0O4t_e;RYxdv{ڟL5א{[@f,jA$Vr|Ub _?ksr z$0Xk Aϓd%JN3~wib?e&ҹ~Xy9Ì9γ H|,o*P5foE_ߟOQ=! W=&78KkE@%XJ>0zZ'|߳0{h\L5O(H|5wpp12toۏ _it+4.`iΉ*(Hg.ؒ pcHL/t+9R [@$.,Ui_;Z}Fv~/jị3ϼSYK794>HmI<3Sm8* 8'5ʹ8Տ>o 3$~*1m~\B~6fǶD2l;A5ϔK`U QSicT) ؞e}n$ e7k5dvSd}$ϨN*T)5\[g֧⸁T{m.g1Q _5ys*UbjOzj5/itg TSN8!e*(ȴ=x*1%F/toێƼH&}ȨY'UZySdoOCX ,R%&S DT#?k Rhpd[s 2}w)'\`N{| |쉲OjJQVۼ T=rkZv`ހq|YUeV} h=|ӱ䨻iխTvO#+o"/̏_rZEdbVţ^Cwk/_9 TTdT Q GKZUbN?1}I=aDnॼhnQmM `$3mȒvoWƚ*!/e2%& ?i*G BM;a-^Mb xL'DrKݰ #^Bx>эxQ'_x*!D&tG0dGJ;u?!Q4[wyYqgv(+ʔّh?=Sa?߈Q!4.`;yE:#rQy)mƾi~y"jM4 &P03 QWd+@y_="̺w:03OHyOWߡ9 / H3|!yG_:$_掏v/.",ŒLQ!编Lbw'2%΁V *Qa KPVӴE^mփx]z~{oX @_X¹c͋|Ky?'CV7vS|ƜkWK)бك w  ~ $k 5$R}m_{{,|OnV"*w-KnK͢ߡ~W<ہnЂc_j,X#x<_Ź:j{X,od <\L͑apz>qz5w R`$Q=_ˎޖ]لxYU,ZC)6 ) h4ZvҞU+dQ5MOv%1f@,|2)Z4 `߅s[.2?+ps԰" c_7ïOk>2}xx>MdڀxDnQ@"lqWoݼ6>z&8~;ܣ{t<:& Wa~=tl3?{7$zSӐJ8oΓ7N'fM9tmsg-I}ph7X_2#M 11LٰOoi_Zm[08*xS)HY#rcpd7WG֝J #D |Xnj1)2 ,~jnWeFZL Iǁm䦱Sj:pZ{pjLn wZ|߭'j{!7R~S|Wpq\c4TZR od4*n?fW3kZJ@Yr>bi~{WKI1ٱ%{۾aX p^dw[VRlk~x{z[=HL64ڦUgsbI#XvW+I gG%7. nR&MT9\.TaT7w)+HmZf&7:|`G힁k>HD+-=[KG4fL@G'P;?\z۴~PீdZ2VRRPqPg "toO"(R]S逡q W> jU{W̄Z M;٪PCC SkF0ےUEf7ƞ/`*XR &v(0;̚_1 `[=So@oXMC >DnpL`gz$FYs8ywhο/K}m?he{wp N:EGgG%6qT,]DQбHZKEED4i$:ј? "Xɐ;>ၻ_?HNh+?UY`jRj%$5ySgVUJy%;̹ٞi6UW`Kj|GKn%/^=?V[TJ^OCvw/\;"A%Y\û\\m֛saݸZ+OY*k~MRl擛׎j_gzI!dIy^̗DR>4+=ݿ~?]H2OpdPJyovz[\鮤֗da~+?'y?RPQ)YL;)/'?*7}(zhr:$O'FSsi/l'O=x鴏'y"=IK׿æ46c?}{~Raԛ3VijRkZ5ՒV<VNԔjNx03Mc\=T_\V?۪ePI馤)5fڠXxD {2IENDB`pigment-0.3.17/examples/gtk.c0000644000175000017500000001026011205034420012723 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * GTK+ integration example * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ #include #include #include /* Key press handler */ static void keypress_event_cb (PgmViewport *viewport, PgmEventKey *event, gpointer data) { g_print ("Pigment has the keyboard focus\n"); } /* Button press handler */ static void button_clicked_cb (GtkButton *button, gpointer data) { g_print ("GTK+ button clicked\n"); } /* Rotate the image */ static gboolean update_pass_cb (PgmViewport *viewport, gpointer data) { PgmDrawable *drawable = PGM_DRAWABLE (data); static gfloat angle = 0.0f; pgm_drawable_set_rotation_x (drawable, angle); pgm_drawable_set_rotation_y (drawable, angle); pgm_drawable_set_rotation_z (drawable, angle); angle += 0.03; return TRUE; } /* Start rotating the image when the file is loaded */ static void file_loaded_cb (PgmImage *image, gpointer data) { PgmViewport *viewport = PGM_VIEWPORT (data); g_signal_connect (G_OBJECT (viewport), "update_pass", G_CALLBACK (update_pass_cb), image); } int main (int argc, char *argv[]) { GtkWidget *embed, *window, *vbox, *entry, *button; PgmViewport *viewport = NULL; PgmDrawable *img; PgmCanvas *canvas; /* Init */ gtk_init (&argc, &argv); pgm_init (&argc, &argv); /* OpenGL viewport creation */ pgm_viewport_factory_make ("opengl", &viewport); if (!viewport) { g_print ("Cannot create the 'opengl' viewport\n"); return -1; } g_signal_connect (G_OBJECT (viewport), "key-press-event", G_CALLBACK (keypress_event_cb), NULL); /* Scene setup */ img = pgm_image_new_from_file ("examples/pictures/star.png", 0); g_signal_connect (G_OBJECT (img), "file-loaded", G_CALLBACK (file_loaded_cb), viewport); pgm_drawable_set_size (img, 3.0f, 3.0f); pgm_drawable_set_position (img, 0.5f, 0.0f, 0.0f); pgm_drawable_set_bg_color (img, 1.0f, 1.0f, 1.0f, 0.0f); pgm_drawable_show (img); canvas = pgm_canvas_new (); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, img); pgm_viewport_set_canvas (viewport, canvas); /* GTK+ window creation */ window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_title (GTK_WINDOW (window), "GTK+ integration"); gtk_window_resize (GTK_WINDOW (window), 400, 400); gtk_container_set_border_width (GTK_CONTAINER (window), 5); g_signal_connect (G_OBJECT (window), "delete-event", G_CALLBACK (gtk_main_quit), NULL); /*Pigment GTK+ socket setup */ embed = pgm_gtk_new (); pgm_gtk_set_viewport (PGM_GTK (embed), viewport); /* GTK+ interface creation */ button = gtk_button_new_with_label ("GTK+ button"); g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (button_clicked_cb), NULL); entry = gtk_entry_new (); vbox = gtk_vbox_new (FALSE, 5); gtk_container_add (GTK_CONTAINER (window), vbox); gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), embed, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (vbox), entry, FALSE, FALSE, 0); gtk_widget_show_all (GTK_WIDGET (window)); /* Start the mainloop */ gtk_main (); /* Deinit */ gst_object_unref (canvas); gst_object_unref (viewport); pgm_deinit (); return 0; } pigment-0.3.17/examples/imaging.c0000644000175000017500000000300011205034420013543 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment imaging example * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ #include #include int main (int argc, char *argv[]) { GdkPixbuf *src, *dst; /* Argument check */ if (argc != 2) { g_print ("usage: %s imagepath\n", argv[0]); return -1; } g_type_init (); src = gdk_pixbuf_new_from_file (argv[1], NULL); dst = pgm_imaging_linear_alpha_gradient (src, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f); gdk_pixbuf_save (dst, "linear-alpha-gradient.png", "png", NULL, NULL); g_object_unref (src); g_object_unref (dst); return 0; } pigment-0.3.17/examples/rotations.c0000644000175000017500000001372411205034420014170 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment rotations example * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ #include #define X 0 #define Y 1 #define Z 2 static PgmViewport *viewport = NULL; static PgmDrawable *txt[3] = { NULL }; static gboolean rotate[3] = { FALSE }; static gfloat angle[3] = { 0.0f }; static gfloat scale = 1.0f; /* Update the rotation of the image */ static gboolean update_pass_cb (PgmViewport *viewport, gpointer data) { PgmDrawable *drawable = PGM_DRAWABLE (data); pgm_drawable_set_scale (drawable, scale); if (rotate[X]) { pgm_drawable_set_rotation_x (drawable, angle[X]); angle[X] += 0.05f; } if (rotate[Y]) { pgm_drawable_set_rotation_y (drawable, angle[Y]); angle[Y] += 0.05f; } if (rotate[Z]) { pgm_drawable_set_rotation_z (drawable, angle[Z]); angle[Z] += 0.05f; } return TRUE; } /* scroll-event handler */ static void scroll_event_cb (PgmViewport *viewport, PgmEventScroll *event, gpointer data) { if (event->direction == PGM_SCROLL_UP) scale *= 1.1f; else scale *= 0.9f; } /* key-press handler */ static void keypress_event_cb (PgmViewport *viewport, PgmEventKey *event, gpointer data) { static gboolean fullscreen = FALSE; if (event->type == PGM_KEY_PRESS) { switch (event->keyval) { /* Handle quit */ case PGM_q: case PGM_Escape: pgm_main_quit (); break; /* Fullscreen */ case PGM_f: fullscreen = !fullscreen; pgm_viewport_set_fullscreen (viewport, fullscreen); break; case PGM_x: case PGM_X: rotate[X] = !rotate[X]; if (rotate[X]) pgm_text_set_label (PGM_TEXT (txt[X]), "Press 'x': ON"); else pgm_text_set_label (PGM_TEXT (txt[X]), "Press 'x': OFF"); break; case PGM_y: case PGM_Y: rotate[Y] = !rotate[Y]; if (rotate[Y]) pgm_text_set_label (PGM_TEXT (txt[Y]), "Press 'y': ON"); else pgm_text_set_label (PGM_TEXT (txt[Y]), "Press 'y': OFF"); break; case PGM_z: case PGM_Z: rotate[Z] = !rotate[Z]; if (rotate[Z]) pgm_text_set_label (PGM_TEXT (txt[Z]), "Press 'z': ON"); else pgm_text_set_label (PGM_TEXT (txt[Z]), "Press 'z': OFF"); break; default: break; } } } /* Entry point */ int main (int argc, char *argv[]) { const gchar *img_path = "examples/pictures/meiko.jpg"; PgmDrawable *img; PgmCanvas *canvas; /* Init */ pgm_init (&argc, &argv); /* OpenGL viewport creation */ pgm_viewport_factory_make ("opengl", &viewport); if (!viewport) { g_print ("Cannot create the 'opengl' viewport\n"); return -1; } pgm_viewport_set_size (viewport, 600, 600); pgm_viewport_set_title (viewport, "Rotations"); /* Image definition */ img = pgm_image_new_from_file (img_path, 0); pgm_drawable_set_size (img, 400, 400); pgm_drawable_set_position (img, 100, 100, 0); pgm_drawable_set_bg_color (img, 0, 0, 255, 0); pgm_drawable_show (img); /* Text definitions */ txt[X] = pgm_text_new ("Press 'x': OFF"); pgm_text_set_font_height (PGM_TEXT (txt[X]), 20.0f); pgm_text_set_weight (PGM_TEXT (txt[X]), PGM_TEXT_WEIGHT_BOLD); pgm_drawable_set_size (txt[X], 300, 20); pgm_drawable_set_position (txt[X], 10, 0, 0); pgm_drawable_set_bg_color (txt[X], 0, 0, 0, 0); pgm_drawable_show (txt[X]); txt[Y] = pgm_text_new ("Press 'y': OFF"); pgm_text_set_font_height (PGM_TEXT (txt[Y]), 20.0f); pgm_text_set_weight (PGM_TEXT (txt[Y]), PGM_TEXT_WEIGHT_BOLD); pgm_drawable_set_size (txt[Y], 300, 20); pgm_drawable_set_position (txt[Y], 10, 20, 0); pgm_drawable_set_bg_color (txt[Y], 0, 0, 0, 0); pgm_drawable_show (txt[Y]); txt[Z] = pgm_text_new ("Press 'z': OFF"); pgm_text_set_font_height (PGM_TEXT (txt[Z]), 20.0f); pgm_text_set_weight (PGM_TEXT (txt[Z]), PGM_TEXT_WEIGHT_BOLD); pgm_drawable_set_size (txt[Z], 300, 20); pgm_drawable_set_position (txt[Z], 10, 40, 0); pgm_drawable_set_bg_color (txt[Z], 0, 0, 0, 0); pgm_drawable_show (txt[Z]); /* Canvas handling */ canvas = pgm_canvas_new (); pgm_canvas_set_size (canvas, 600, 600); pgm_viewport_set_canvas (viewport, canvas); pgm_canvas_add (canvas, PGM_DRAWABLE_MIDDLE, img); pgm_canvas_add_many (canvas, PGM_DRAWABLE_NEAR, txt[X], txt[Y], txt[Z], NULL); /* Main loop */ g_signal_connect (G_OBJECT (viewport), "scroll-event", G_CALLBACK (scroll_event_cb), NULL); g_signal_connect (G_OBJECT (viewport), "key-press-event", G_CALLBACK (keypress_event_cb), NULL); g_signal_connect (G_OBJECT (viewport), "delete-event", G_CALLBACK (pgm_main_quit), NULL); g_signal_connect (G_OBJECT (viewport), "update_pass", G_CALLBACK (update_pass_cb), img); pgm_viewport_show (viewport); pgm_main (); /* Deinit */ gst_object_unref (canvas); gst_object_unref (viewport); pgm_deinit (); return 0; } pigment-0.3.17/config.h.in0000644000175000017500000001076511205034670012220 00000000000000/* config.h.in. Generated from configure.ac by autoheader. */ /* Defined if gcov is enabled to force a rebuild due to config.h changing */ #undef GST_GCOV_ENABLED /* Define to 1 if you have the header file. */ #undef HAVE_AGL_AGL_H /* Define to 1 if you have the `cosf' function. */ #undef HAVE_COSF /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the `fabs' function. */ #undef HAVE_FABS /* GDL */ #undef HAVE_GDL /* Define to 1 if you have the header file. */ #undef HAVE_GLES_EGL_H /* Define to 1 if you have the header file. */ #undef HAVE_GLES_GL_H /* Define to 1 if you have the header file. */ #undef HAVE_GL_GLX_H /* Define to 1 if you have the header file. */ #undef HAVE_GL_GL_H /* Defined to 1 if you have gstreamer-0.10.13 */ #undef HAVE_GST_0_10_13 /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `lrintf' function. */ #undef HAVE_LRINTF /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Defined to 1 if you enabled OpenGL ES PC emulation */ #undef HAVE_OPENGLES_PC_EMULATION /* Define to 1 if you have the header file. */ #undef HAVE_OPENGL_GL_H /* Defined to 1 if you have pango-1.16 */ #undef HAVE_PANGO_1_16 /* Define to 1 if you have the `sincosf' function. */ #undef HAVE_SINCOSF /* Define to 1 if you have the `sinf' function. */ #undef HAVE_SINF /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Defined to 1 if you have tslib */ #undef HAVE_TSLIB /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define if valgrind should be used */ #undef HAVE_VALGRIND /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Define to 1 if your C compiler doesn't accept -c and -o together. */ #undef NO_MINUS_C_MINUS_O /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Default error level to use for logging */ #undef PGM_DEFAULT_LOG_LEVEL /* library major.minor version */ #undef PGM_MAJORMINOR /* The path where Pigment plugins are located */ #undef PGM_PLUGIN_PATH /* GStreamer version is >= 0.10.10 */ #undef POST_10_10 /* GStreamer version is >= 0.10.11 */ #undef POST_10_11 /* GStreamer version is >= 0.10.12 */ #undef POST_10_12 /* GStreamer version is >= 0.10.13 */ #undef POST_10_13 /* GStreamer version is >= 0.10.14 */ #undef POST_10_14 /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ #endif /* Version number of package */ #undef VERSION /* Define to 1 if the X Window System is missing or not being used. */ #undef X_DISPLAY_MISSING /* Define to 1 if on MINIX. */ #undef _MINIX /* Define to 2 if the system does not provide POSIX.1 features except with this defined. */ #undef _POSIX_1_SOURCE /* Define to 1 if you need to in order for `stat' and other things to work. */ #undef _POSIX_SOURCE /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus #undef inline #endif pigment-0.3.17/win32/0000777000175000017500000000000011205035141011204 500000000000000pigment-0.3.17/win32/Makefile.am0000644000175000017500000000007311205034420013153 00000000000000SUBDIRS = \ common \ vs6 \ vs9 EXTRA_DIST = README.txt pigment-0.3.17/win32/common/0000777000175000017500000000000011205035141012474 500000000000000pigment-0.3.17/win32/common/config.h0000755000175000017500000000225711205034417014044 00000000000000/* Manually modified from config.h generated by autotools */ /* Define to 1 if you have Pango-1.16. */ #define HAVE_PANGO_1_16 1 /* Defined to 1 if you have gstreamer-0.10.13 */ #define HAVE_GST_0_10_13 1 /* Define the 1 if you build Pigment on Windows */ #define HAVE_WGL_H 1 /* Default error level to use for logging */ #define PGM_DEFAULT_LOG_LEVEL GST_LEVEL_NONE /* Version number of package */ #define VERSION "0.3.17" /* Name of package */ #define PACKAGE "pigment" /* Define to the product name of this package */ #define PGM_PRODUCT_NAME "Pigment" /* Define to the company creating this package */ #define PGM_COMPANY_NAME "Fluendo Embedded S.L. " /* Define to the copyright of this package */ #define PGM_LEGAL_COPYRIGHT "Copyright 2006, 2007, 2008 Fluendo Embedded S.L." /* Version number of this package */ #define PGM_VERSION_STRING "0.3.17" /* Pigment major version */ #define PGM_MAJOR_VERSION 0 /* Pigment minor version */ #define PGM_MINOR_VERSION 3 /* Pigment macro version */ #define PGM_MICRO_VERSION 17 /* Pigment nano version */ #define PGM_NANO_VERSION 0 /* The directory where pigment plugins are located */ #define PGM_PLUGIN_PATH "" pigment-0.3.17/win32/common/libpgmopengl.rc0000644000175000017500000000206311205034417015423 00000000000000#include #include "config.h" VS_VERSION_INFO VERSIONINFO FILEVERSION PGM_MAJOR_VERSION,PGM_MINOR_VERSION,PGM_MICRO_VERSION,PGM_NANO_VERSION PRODUCTVERSION PGM_MAJOR_VERSION,PGM_MINOR_VERSION,PGM_MICRO_VERSION,PGM_NANO_VERSION FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L #else FILEFLAGS 0x0L #endif FILEOS 0x4L FILETYPE 0x2L FILESUBTYPE 0x0L BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040904b0" BEGIN VALUE "CompanyName", PGM_COMPANY_NAME VALUE "FileDescription", "Pigment OpenGL plugin" VALUE "FileVersion", PGM_VERSION_STRING VALUE "InternalName", "libpgmopengl" VALUE "LegalCopyright", PGM_LEGAL_COPYRIGHT VALUE "OriginalFilename", "libpgmopengl.dll" VALUE "ProductName", PGM_PRODUCT_NAME VALUE "ProductVersion", PGM_VERSION_STRING END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1200 END END pigment-0.3.17/win32/common/libpigment.def0000755000175000017500000002202711205034417015235 00000000000000EXPORTS _pgm_canvas_update_grid_aligned_drawables _pgm_canvas_add_pixel_formats _pgm_canvas_get_entered_emission_stopper _pgm_canvas_remove_pixel_formats _pgm_canvas_set_entered_emission_stopper _pgm_canvas_update_order _pgm_drawable_do_motion_event _pgm_drawable_do_press_event _pgm_drawable_do_release_event _pgm_drawable_do_scroll_event _pgm_drawable_emit_changed _pgm_image_stored_from_file_free _pgm_image_stored_from_file_load _pgm_viewport_push_win32_message pgm_button_type_get_type pgm_canvas_add pgm_canvas_add_many pgm_canvas_get_layer_count pgm_canvas_get_order pgm_canvas_get_pixel_formats pgm_canvas_get_pixel_offsets pgm_canvas_get_size pgm_canvas_get_type pgm_canvas_new pgm_canvas_regenerate pgm_canvas_remove pgm_canvas_remove_many pgm_canvas_set_order pgm_canvas_set_size pgm_deinit pgm_drawable_flags_get_type pgm_drawable_from_canvas pgm_drawable_get_bg_color pgm_drawable_get_drag_distance pgm_drawable_get_fg_color pgm_drawable_get_grid_aligned pgm_drawable_get_opacity pgm_drawable_get_position pgm_drawable_get_rotation_x pgm_drawable_get_rotation_y pgm_drawable_get_rotation_z pgm_drawable_get_scale pgm_drawable_get_size pgm_drawable_get_type pgm_drawable_hide pgm_drawable_is_visible pgm_drawable_layer_get_type pgm_drawable_picking_signal_get_type pgm_drawable_property_get_type pgm_drawable_regenerate pgm_drawable_set_bg_color pgm_drawable_set_drag_distance pgm_drawable_set_fg_color pgm_drawable_set_grid_aligned pgm_drawable_set_opacity pgm_drawable_set_position pgm_drawable_set_rotation_x pgm_drawable_set_rotation_y pgm_drawable_set_rotation_z pgm_drawable_set_scale pgm_drawable_set_size pgm_drawable_show pgm_drawable_to_canvas pgm_error_get_type pgm_event_copy pgm_event_free pgm_event_get_type pgm_event_new pgm_event_type_get_type pgm_events_pending pgm_image_alignment_get_type pgm_image_clear pgm_image_from_drawable pgm_image_get_alignment pgm_image_get_aspect_ratio pgm_image_get_border_inner_color pgm_image_get_border_outer_color pgm_image_get_border_width pgm_image_get_interp pgm_image_get_layout pgm_image_get_mapping_matrix pgm_image_get_storage_type pgm_image_get_type pgm_image_get_wrapping pgm_image_interp_type_get_type pgm_image_layout_type_get_type pgm_image_new pgm_image_new_from_buffer pgm_image_new_from_file pgm_image_new_from_image pgm_image_new_from_pixbuf pgm_image_pixel_format_get_type pgm_image_set_alignment pgm_image_set_aspect_ratio pgm_image_set_border_inner_color pgm_image_set_border_outer_color pgm_image_set_border_width pgm_image_set_from_buffer pgm_image_set_from_file pgm_image_set_from_gst_buffer pgm_image_set_from_image pgm_image_set_from_pixbuf pgm_image_set_from_system_buffer pgm_image_set_interp pgm_image_set_layout pgm_image_set_mapping_matrix pgm_image_set_wrapping pgm_image_sink_event_mask_get_type pgm_image_sink_get_events pgm_image_sink_get_image pgm_image_sink_get_type pgm_image_sink_new pgm_image_sink_set_events pgm_image_sink_set_image pgm_image_storage_type_get_type pgm_image_system_buffer_lock pgm_image_system_buffer_unlock pgm_image_to_drawable pgm_image_to_pixbuf pgm_image_wrapping_get_type pgm_init pgm_init_check pgm_intersection_line_plane pgm_keyval_to_unicode pgm_lrintf pgm_main pgm_main_iteration pgm_main_iteration_do pgm_main_quit pgm_marshal_BOOLEAN__BOXED pgm_marshal_BOOLEAN__FLOAT_FLOAT_FLOAT_ENUM_UINT pgm_marshal_BOOLEAN__FLOAT_FLOAT_FLOAT_ENUM_UINT_UINT pgm_marshal_BOOLEAN__FLOAT_FLOAT_FLOAT_UINT pgm_marshal_VOID__FLOAT_FLOAT_FLOAT_UINT pgm_marshal_VOID__OBJECT_OBJECT pgm_marshal_VOID__OBJECT_OBJECT_INT pgm_marshal_VOID__UINT_UINT_POINTER pgm_mat3x3_add_mat3x3 pgm_mat3x3_add_scalar pgm_mat3x3_copy pgm_mat3x3_free pgm_mat3x3_get_type pgm_mat3x3_inverse pgm_mat3x3_is_identity pgm_mat3x3_multiply_mat3x3 pgm_mat3x3_multiply_scalar pgm_mat3x3_multiply_vec3 pgm_mat3x3_new pgm_mat3x3_new_from_scalars pgm_mat3x3_new_from_vec3 pgm_mat3x3_new_identity pgm_mat3x3_set_from_mat3x3 pgm_mat3x3_set_from_scalars pgm_mat3x3_set_from_vec3 pgm_mat3x3_substract_mat3x3 pgm_mat3x3_substract_scalar pgm_mat3x3_to_string pgm_mat3x3_transpose pgm_mat4x4_add_mat4x4 pgm_mat4x4_add_scalar pgm_mat4x4_copy pgm_mat4x4_free pgm_mat4x4_get_type pgm_mat4x4_inverse pgm_mat4x4_is_identity pgm_mat4x4_multiply_mat4x4 pgm_mat4x4_multiply_scalar pgm_mat4x4_multiply_vec4 pgm_mat4x4_new pgm_mat4x4_new_from_scalars pgm_mat4x4_new_from_vec4 pgm_mat4x4_new_identity pgm_mat4x4_new_predefined pgm_mat4x4_new_rotate_axis_from_scalars pgm_mat4x4_new_rotate_axis_from_vec3 pgm_mat4x4_new_rotate_x pgm_mat4x4_new_rotate_y pgm_mat4x4_new_rotate_z pgm_mat4x4_new_scale_from_scalars pgm_mat4x4_new_scale_from_vec3 pgm_mat4x4_new_translate_from_scalars pgm_mat4x4_new_translate_from_vec3 pgm_mat4x4_predefined_get_type pgm_mat4x4_rotate_axis_from_scalars pgm_mat4x4_rotate_axis_from_vec3 pgm_mat4x4_rotate_x pgm_mat4x4_rotate_y pgm_mat4x4_rotate_z pgm_mat4x4_scale_from_scalars pgm_mat4x4_scale_from_vec3 pgm_mat4x4_set_from_mat4x4 pgm_mat4x4_set_from_scalars pgm_mat4x4_set_from_vec4 pgm_mat4x4_substract_mat4x4 pgm_mat4x4_substract_scalar pgm_mat4x4_to_string pgm_mat4x4_translate_from_scalars pgm_mat4x4_translate_from_vec3 pgm_mat4x4_transpose pgm_modifier_type_get_type pgm_module_get_type pgm_module_new pgm_point_belongs_rectangle pgm_scroll_direction_get_type pgm_text_alignment_get_type pgm_text_ellipsize_get_type pgm_text_get_alignment pgm_text_get_cast_shadow pgm_text_get_color pgm_text_get_ellipsize pgm_text_get_font_family pgm_text_get_font_height pgm_text_get_gravity pgm_text_get_justify pgm_text_get_label pgm_text_get_line_spacing pgm_text_get_multiline pgm_text_get_outline_color pgm_text_get_outline_width pgm_text_get_shadow_color pgm_text_get_shadow_position pgm_text_get_stretch pgm_text_get_style pgm_text_get_type pgm_text_get_variant pgm_text_get_weight pgm_text_get_wrap pgm_text_gravity_get_type pgm_text_new pgm_text_set_alignment pgm_text_set_cast_shadow pgm_text_set_color pgm_text_set_ellipsize pgm_text_set_font_family pgm_text_set_font_height pgm_text_set_gravity pgm_text_set_justify pgm_text_set_label pgm_text_set_line_spacing pgm_text_set_markup pgm_text_set_multiline pgm_text_set_outline_color pgm_text_set_outline_width pgm_text_set_shadow_color pgm_text_set_shadow_position pgm_text_set_stretch pgm_text_set_style pgm_text_set_variant pgm_text_set_weight pgm_text_set_wrap pgm_text_shadow_position_get_type pgm_text_stretch_get_type pgm_text_style_get_type pgm_text_variant_get_type pgm_text_weight_get_type pgm_text_wrap_get_type pgm_vec3_add_scalar pgm_vec3_add_vec3 pgm_vec3_copy pgm_vec3_cross_product pgm_vec3_dot_product pgm_vec3_free pgm_vec3_get_type pgm_vec3_length pgm_vec3_multiply_scalar pgm_vec3_multiply_vec3 pgm_vec3_new pgm_vec3_new_from_scalars pgm_vec3_normalize pgm_vec3_set_from_scalars pgm_vec3_set_from_vec3 pgm_vec3_substract_scalar pgm_vec3_substract_vec3 pgm_vec3_to_string pgm_vec4_add_scalar pgm_vec4_add_vec4 pgm_vec4_copy pgm_vec4_free pgm_vec4_get_type pgm_vec4_length pgm_vec4_multiply_scalar pgm_vec4_multiply_vec4 pgm_vec4_new pgm_vec4_new_from_scalars pgm_vec4_normalize pgm_vec4_set_from_scalars pgm_vec4_set_from_vec4 pgm_vec4_substract_scalar pgm_vec4_substract_vec4 pgm_vec4_to_string pgm_version pgm_version_string pgm_viewport_capacity_get_type pgm_viewport_cursor_get_type pgm_viewport_emit_update_pass pgm_viewport_factory_create pgm_viewport_factory_get_author pgm_viewport_factory_get_description pgm_viewport_factory_get_license pgm_viewport_factory_get_origin pgm_viewport_factory_get_type pgm_viewport_factory_make pgm_viewport_factory_new pgm_viewport_focus pgm_viewport_from_canvas pgm_viewport_get_alpha_blending pgm_viewport_get_canvas pgm_viewport_get_canvas_reflection pgm_viewport_get_canvas_rotation pgm_viewport_get_caps_mask pgm_viewport_get_max_texture_size pgm_viewport_get_cursor pgm_viewport_get_decorated pgm_viewport_get_embedding_id pgm_viewport_get_frame_rate pgm_viewport_get_fullscreen pgm_viewport_get_icon pgm_viewport_get_iconified pgm_viewport_get_message_filter pgm_viewport_get_opacity pgm_viewport_get_pixel_formats pgm_viewport_get_screen_resolution pgm_viewport_get_screen_size_mm pgm_viewport_get_size pgm_viewport_get_title pgm_viewport_get_type pgm_viewport_hide pgm_viewport_is_visible pgm_viewport_push_event pgm_viewport_push_pixels pgm_viewport_read_pixels pgm_viewport_reflection_get_type pgm_viewport_rotation_get_type pgm_viewport_set_alpha_blending pgm_viewport_set_canvas pgm_viewport_set_canvas_reflection pgm_viewport_set_canvas_rotation pgm_viewport_set_cursor pgm_viewport_set_decorated pgm_viewport_set_fullscreen pgm_viewport_set_icon pgm_viewport_set_iconified pgm_viewport_set_message_filter pgm_viewport_set_opacity pgm_viewport_set_screen_resolution pgm_viewport_set_screen_size_mm pgm_viewport_set_size pgm_viewport_set_title pgm_viewport_show pgm_viewport_state_get_type pgm_viewport_to_canvas pgm_viewport_update_projection pgm_viewport_update_projection pigment-0.3.17/win32/common/Makefile.am0000644000175000017500000000031411205034417014447 00000000000000EXTRA_DIST = \ config.h \ pgmversion.h \ glib-mkenums \ libpgmplugin.def \ libpigment.def \ libpigmentimaging.def \ libpgmboilerplate.rc \ libpgmopengl.rc \ libpigment.rc \ libpigmentimaging.rc pigment-0.3.17/win32/common/glib-mkenums0000755000175000017500000003366711205034417014754 00000000000000#!/bin/perl -w # Adapted script from the GLib to correctly generate code on Win32, # removing EOL regexp stuff. # glib-mkenums.pl # Information about the current enumeration my $flags; # Is enumeration a bitmask? my $option_lowercase_name; # A lower case name to use as part of the *_get_type() function, instead of the one that we guess. # For instance, when an enum uses abnormal capitalization and we can not guess where to put the underscores. my $seenbitshift; # Have we seen bitshift operators? my $enum_prefix; # Prefix for this enumeration my $enumname; # Name for this enumeration my $enumshort; # $enumname without prefix my $enumindex = 0; # Global enum counter my $firstenum = 1; # Is this the first enumeration per file? my @entries; # [ $name, $val ] for each entry sub parse_trigraph { my $opts = shift; my @opts; for $opt (split /\s*,\s*/, $opts) { $opt =~ s/^\s*//; $opt =~ s/\s*$//; my ($key,$val) = $opt =~ /(\w+)(?:=(.+))?/; defined $val or $val = 1; push @opts, $key, $val; } @opts; } sub parse_entries { my $file = shift; my $file_name = shift; my $looking_for_name = 0; while (<$file>) { # read lines until we have no open comments while (m@/\*([^*]|\*(?!/))*$@) { my $new; defined ($new = <$file>) || die "Unmatched comment in $ARGV"; $_ .= $new; } # strip comments w/o options s@/\*(?!<) ([^*]+|\*(?!/))* \*/@@gx; # strip newlines s@\n@ @; # skip empty lines next if m@^\s*$@; if ($looking_for_name) { if (/^\s*(\w+)/) { $enumname = $1; return 1; } } # Handle include files if (/^\#include\s*<([^>]*)>/ ) { my $file= "../$1"; open NEWFILE, $file or die "Cannot open include file $file: $!\n"; if (parse_entries (\*NEWFILE, $NEWFILE)) { return 1; } else { next; } } if (/^\s*\}\s*(\w+)/) { $enumname = $1; $enumindex++; return 1; } if (/^\s*\}/) { $enumindex++; $looking_for_name = 1; next; } if (m@^\s* (\w+)\s* # name (?:=( # value \s*\w+\s*\(.*\)\s* # macro with multiple args | # OR (?:[^,/]|/(?!\*))* # anything but a comma or comment ))?,?\s* (?:/\*< # options (([^*]|\*(?!/))*) >\s*\*/)?,? \s*$ @x) { my ($name, $value, $options) = ($1,$2,$3); if (!defined $flags && defined $value && $value =~ /< output file header\n"; print STDERR " --fprod per input file production\n"; print STDERR " --ftail output file trailer\n"; print STDERR " --eprod per enum text (produced prior to value itarations)\n"; print STDERR " --vhead value header, produced before iterating over enum values\n"; print STDERR " --vprod value text, produced for each enum value\n"; print STDERR " --vtail value tail, produced after iterating over enum values\n"; print STDERR " --comments comment structure\n"; print STDERR " --template file template file\n"; print STDERR " -h, --help show this help message\n"; print STDERR " -v, --version print version informations\n"; print STDERR "Production text substitutions:\n"; print STDERR " \@EnumName\@ PrefixTheXEnum\n"; print STDERR " \@enum_name\@ prefix_the_xenum\n"; print STDERR " \@ENUMNAME\@ PREFIX_THE_XENUM\n"; print STDERR " \@ENUMSHORT\@ THE_XENUM\n"; print STDERR " \@VALUENAME\@ PREFIX_THE_XVALUE\n"; print STDERR " \@valuenick\@ the-xvalue\n"; print STDERR " \@type\@ either enum or flags\n"; print STDERR " \@Type\@ either Enum or Flags\n"; print STDERR " \@TYPE\@ either ENUM or FLAGS\n"; print STDERR " \@filename\@ name of current input file\n"; exit 0; } # production variables: my $fhead = ""; # output file header my $fprod = ""; # per input file production my $ftail = ""; # output file trailer my $eprod = ""; # per enum text (produced prior to value itarations) my $vhead = ""; # value header, produced before iterating over enum values my $vprod = ""; # value text, produced for each enum value my $vtail = ""; # value tail, produced after iterating over enum values # other options my $comment_tmpl = "/* \@comment\@ */"; sub read_template_file { my ($file) = @_; my %tmpl = ('file-header', $fhead, 'file-production', $fprod, 'file-tail', $ftail, 'enumeration-production', $eprod, 'value-header', $vhead, 'value-production', $vprod, 'value-tail', $vtail, 'comment', $comment_tmpl); my $in = 'junk'; open (FILE, $file) || die "Can't open $file: $!\n"; while () { if (/^\/\*\*\*\s+(BEGIN|END)\s+([\w-]+)\s+\*\*\*\//) { if (($in eq 'junk') && ($1 eq 'BEGIN') && (exists($tmpl{$2}))) { $in = $2; next; } elsif (($in eq $2) && ($1 eq 'END') && (exists($tmpl{$2}))) { $in = 'junk'; next; } else { die "Malformed template file $file\n"; } } if (!($in eq 'junk')) { $tmpl{$in} .= $_; } } close (FILE); if (!($in eq 'junk')) { die "Malformed template file $file\n"; } $fhead = $tmpl{'file-header'}; $fprod = $tmpl{'file-production'}; $ftail = $tmpl{'file-tail'}; $eprod = $tmpl{'enumeration-production'}; $vhead = $tmpl{'value-header'}; $vprod = $tmpl{'value-production'}; $vtail = $tmpl{'value-tail'}; $comment_tmpl = $tmpl{'comment'}; } if (!defined $ARGV[0]) { usage; } while ($_ = $ARGV[0], /^-/) { shift; last if /^--$/; if (/^--template$/) { read_template_file (shift); } elsif (/^--fhead$/) { $fhead = $fhead . shift } elsif (/^--fprod$/) { $fprod = $fprod . shift } elsif (/^--ftail$/) { $ftail = $ftail . shift } elsif (/^--eprod$/) { $eprod = $eprod . shift } elsif (/^--vhead$/) { $vhead = $vhead . shift } elsif (/^--vprod$/) { $vprod = $vprod . shift } elsif (/^--vtail$/) { $vtail = $vtail . shift } elsif (/^--comments$/) { $comment_tmpl = shift } elsif (/^--help$/ || /^-h$/) { usage; } elsif (/^--version$/ || /^-v$/) { version; } else { usage; } } # put auto-generation comment { my $comment = $comment_tmpl; $comment =~ s/\@comment\@/Generated data (by glib-mkenums)/; print "\n" . $comment . "\n\n"; } if (length($fhead)) { my $prod = $fhead; $prod =~ s/\@filename\@/$ARGV[0]/g; $prod =~ s/\\a/\a/g; $prod =~ s/\\b/\b/g; $prod =~ s/\\t/\t/g; $prod =~ s/\\n/\n/g; $prod =~ s/\\f/\f/g; chomp ($prod); print "$prod\n"; } while (<>) { if (eof) { close (ARGV); # reset line numbering $firstenum = 1; # Flag to print filename at next enum } # read lines until we have no open comments while (m@/\*([^*]|\*(?!/))*$@) { my $new; defined ($new = <>) || die "Unmatched comment in $ARGV"; $_ .= $new; } # strip comments w/o options s@/\*(?!<) ([^*]+|\*(?!/))* \*/@@gx; if (m@^\s*typedef\s+enum\s* ({)?\s* (?:/\*< (([^*]|\*(?!/))*) >\s*\*/)? \s*({)? @x) { if (defined $2) { my %options = parse_trigraph ($2); next if defined $options{skip}; $enum_prefix = $options{prefix}; $flags = $options{flags}; $option_lowercase_name = $options{lowercase_name}; } else { $enum_prefix = undef; $flags = undef; $option_lowercase_name = undef; } # Didn't have trailing '{' look on next lines if (!defined $1 && !defined $4) { while (<>) { if (s/^\s*\{//) { last; } } } $seenbitshift = 0; @entries = (); # Now parse the entries parse_entries (\*ARGV, $ARGV); # figure out if this was a flags or enums enumeration if (!defined $flags) { $flags = $seenbitshift; } # Autogenerate a prefix if (!defined $enum_prefix) { for (@entries) { my $nick = $_->[1]; if (!defined $nick) { my $name = $_->[0]; if (defined $enum_prefix) { my $tmp = ~ ($name ^ $enum_prefix); ($tmp) = $tmp =~ /(^\xff*)/; $enum_prefix = $enum_prefix & $tmp; } else { $enum_prefix = $name; } } } if (!defined $enum_prefix) { $enum_prefix = ""; } else { # Trim so that it ends in an underscore $enum_prefix =~ s/_[^_]*$/_/; } } else { # canonicalize user defined prefixes $enum_prefix = uc($enum_prefix); $enum_prefix =~ s/-/_/g; $enum_prefix =~ s/(.*)([^_])$/$1$2_/; } for $entry (@entries) { my ($name,$nick) = @{$entry}; if (!defined $nick) { ($nick = $name) =~ s/^$enum_prefix//; $nick =~ tr/_/-/; $nick = lc($nick); @{$entry} = ($name, $nick); } } # Spit out the output # enumname is e.g. GMatchType $enspace = $enumname; $enspace =~ s/^([A-Z][a-z]*).*$/$1/; $enumshort = $enumname; $enumshort =~ s/^[A-Z][a-z]*//; $enumshort =~ s/([^A-Z])([A-Z])/$1_$2/g; $enumshort =~ s/([A-Z][A-Z])([A-Z][0-9a-z])/$1_$2/g; $enumshort = uc($enumshort); $enumlong = uc($enspace) . "_" . $enumshort; $enumsym = lc($enspace) . "_" . lc($enumshort); #The options might override the lower case name if it could not be generated correctly: if (defined($option_lowercase_name)) { $enumsym = $option_lowercase_name; } if ($firstenum) { $firstenum = 0; if (length($fprod)) { my $prod = $fprod; $prod =~ s/\@filename\@/$ARGV/g; $prod =~ s/\\a/\a/g; $prod =~ s/\\b/\b/g; $prod =~ s/\\t/\t/g; $prod =~ s/\\n/\n/g; $prod =~ s/\\f/\f/g; chomp ($prod); print "$prod\n"; } } if (length($eprod)) { my $prod = $eprod; $prod =~ s/\@enum_name\@/$enumsym/g; $prod =~ s/\@EnumName\@/$enumname/g; $prod =~ s/\@ENUMSHORT\@/$enumshort/g; $prod =~ s/\@ENUMNAME\@/$enumlong/g; if ($flags) { $prod =~ s/\@type\@/flags/g; } else { $prod =~ s/\@type\@/enum/g; } if ($flags) { $prod =~ s/\@Type\@/Flags/g; } else { $prod =~ s/\@Type\@/Enum/g; } if ($flags) { $prod =~ s/\@TYPE\@/FLAGS/g; } else { $prod =~ s/\@TYPE\@/ENUM/g; } $prod =~ s/\\a/\a/g; $prod =~ s/\\b/\b/g; $prod =~ s/\\t/\t/g; $prod =~ s/\\n/\n/g; $prod =~ s/\\f/\f/g; chomp ($prod); print "$prod\n"; } if (length($vhead)) { my $prod = $vhead; $prod =~ s/\@enum_name\@/$enumsym/g; $prod =~ s/\@EnumName\@/$enumname/g; $prod =~ s/\@ENUMSHORT\@/$enumshort/g; $prod =~ s/\@ENUMNAME\@/$enumlong/g; if ($flags) { $prod =~ s/\@type\@/flags/g; } else { $prod =~ s/\@type\@/enum/g; } if ($flags) { $prod =~ s/\@Type\@/Flags/g; } else { $prod =~ s/\@Type\@/Enum/g; } if ($flags) { $prod =~ s/\@TYPE\@/FLAGS/g; } else { $prod =~ s/\@TYPE\@/ENUM/g; } $prod =~ s/\\a/\a/g; $prod =~ s/\\b/\b/g; $prod =~ s/\\t/\t/g; $prod =~ s/\\n/\n/g; $prod =~ s/\\f/\f/g; chomp ($prod); print "$prod\n"; } if (length($vprod)) { my $prod = $vprod; $prod =~ s/\\a/\a/g; $prod =~ s/\\b/\b/g; $prod =~ s/\\t/\t/g; $prod =~ s/\\n/\n/g; $prod =~ s/\\f/\f/g; for (@entries) { my ($name,$nick) = @{$_}; my $tmp_prod = $prod; $tmp_prod =~ s/\@VALUENAME\@/$name/g; $tmp_prod =~ s/\@valuenick\@/$nick/g; if ($flags) { $tmp_prod =~ s/\@type\@/flags/g; } else { $tmp_prod =~ s/\@type\@/enum/g; } if ($flags) { $tmp_prod =~ s/\@Type\@/Flags/g; } else { $tmp_prod =~ s/\@Type\@/Enum/g; } if ($flags) { $tmp_prod =~ s/\@TYPE\@/FLAGS/g; } else { $tmp_prod =~ s/\@TYPE\@/ENUM/g; } chomp ($tmp_prod); print "$tmp_prod\n"; } } if (length($vtail)) { my $prod = $vtail; $prod =~ s/\@enum_name\@/$enumsym/g; $prod =~ s/\@EnumName\@/$enumname/g; $prod =~ s/\@ENUMSHORT\@/$enumshort/g; $prod =~ s/\@ENUMNAME\@/$enumlong/g; if ($flags) { $prod =~ s/\@type\@/flags/g; } else { $prod =~ s/\@type\@/enum/g; } if ($flags) { $prod =~ s/\@Type\@/Flags/g; } else { $prod =~ s/\@Type\@/Enum/g; } if ($flags) { $prod =~ s/\@TYPE\@/FLAGS/g; } else { $prod =~ s/\@TYPE\@/ENUM/g; } $prod =~ s/\\a/\a/g; $prod =~ s/\\b/\b/g; $prod =~ s/\\t/\t/g; $prod =~ s/\\n/\n/g; $prod =~ s/\\f/\f/g; chomp ($prod); print "$prod\n"; } } } if (length($ftail)) { my $prod = $ftail; $prod =~ s/\@filename\@/$ARGV/g; $prod =~ s/\\a/\a/g; $prod =~ s/\\b/\b/g; $prod =~ s/\\t/\t/g; $prod =~ s/\\n/\n/g; $prod =~ s/\\f/\f/g; chomp ($prod); print "$prod\n"; } # put auto-generation comment { my $comment = $comment_tmpl; $comment =~ s/\@comment\@/Generated data ends here/; print "\n" . $comment . "\n\n"; } pigment-0.3.17/win32/common/libpigmentimaging.def0000644000175000017500000000005511205034417016563 00000000000000EXPORTS pgm_imaging_linear_alpha_gradient pigment-0.3.17/win32/common/libpigment.rc0000644000175000017500000000210711205034417015075 00000000000000#include #include "config.h" VS_VERSION_INFO VERSIONINFO FILEVERSION PGM_MAJOR_VERSION,PGM_MINOR_VERSION,PGM_MICRO_VERSION,PGM_NANO_VERSION PRODUCTVERSION PGM_MAJOR_VERSION,PGM_MINOR_VERSION,PGM_MICRO_VERSION,PGM_NANO_VERSION FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L #else FILEFLAGS 0x0L #endif FILEOS 0x4L FILETYPE 0x2L FILESUBTYPE 0x0L BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040904b0" BEGIN VALUE "CompanyName", PGM_COMPANY_NAME VALUE "FileDescription", "Library for creating rich user interfaces" VALUE "FileVersion", PGM_VERSION_STRING VALUE "InternalName", "libpigment" VALUE "LegalCopyright", PGM_LEGAL_COPYRIGHT VALUE "OriginalFilename", "libpigment-0.3.dll" VALUE "ProductName", PGM_PRODUCT_NAME VALUE "ProductVersion", PGM_VERSION_STRING END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1200 END END pigment-0.3.17/win32/common/libpigmentimaging.rc0000644000175000017500000000214011205034417016426 00000000000000#include #include "config.h" VS_VERSION_INFO VERSIONINFO FILEVERSION PGM_MAJOR_VERSION,PGM_MINOR_VERSION,PGM_MICRO_VERSION,PGM_NANO_VERSION PRODUCTVERSION PGM_MAJOR_VERSION,PGM_MINOR_VERSION,PGM_MICRO_VERSION,PGM_NANO_VERSION FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L #else FILEFLAGS 0x0L #endif FILEOS 0x4L FILETYPE 0x2L FILESUBTYPE 0x0L BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040904b0" BEGIN VALUE "CompanyName", PGM_COMPANY_NAME VALUE "FileDescription", "Library providing software image processing filters" VALUE "FileVersion", PGM_VERSION_STRING VALUE "InternalName", "libpigmentimaging" VALUE "LegalCopyright", PGM_LEGAL_COPYRIGHT VALUE "OriginalFilename", "libpigment-imaging-0.3.dll" VALUE "ProductName", PGM_PRODUCT_NAME VALUE "ProductVersion", PGM_VERSION_STRING END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1200 END END pigment-0.3.17/win32/common/Makefile.in0000644000175000017500000003150611205034675014475 00000000000000# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = win32/common DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/as-compiler-flag.m4 \ $(top_srcdir)/common/m4/as-version.m4 \ $(top_srcdir)/common/m4/check.m4 \ $(top_srcdir)/common/m4/gst-args.m4 \ $(top_srcdir)/common/m4/gst-check.m4 \ $(top_srcdir)/common/m4/gst-error.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/libtool.m4 \ $(top_srcdir)/common/m4/ltoptions.m4 \ $(top_srcdir)/common/m4/ltsugar.m4 \ $(top_srcdir)/common/m4/ltversion.m4 \ $(top_srcdir)/common/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAIROXLIB_CFLAGS = @CAIROXLIB_CFLAGS@ CAIROXLIB_LIBS = @CAIROXLIB_LIBS@ CAIRO_CFLAGS = @CAIRO_CFLAGS@ CAIRO_LIBS = @CAIRO_LIBS@ CC = @CC@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXEEXT = @EXEEXT@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ GCOV = @GCOV@ GCOV_CFLAGS = @GCOV_CFLAGS@ GCOV_LIBS = @GCOV_LIBS@ GDKPIXBUFXLIB_CFLAGS = @GDKPIXBUFXLIB_CFLAGS@ GDKPIXBUFXLIB_LIBS = @GDKPIXBUFXLIB_LIBS@ GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@ GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ GST_0_10_13_CFLAGS = @GST_0_10_13_CFLAGS@ GST_0_10_13_LIBS = @GST_0_10_13_LIBS@ GST_10_10_CFLAGS = @GST_10_10_CFLAGS@ GST_10_10_LIBS = @GST_10_10_LIBS@ GST_10_11_CFLAGS = @GST_10_11_CFLAGS@ GST_10_11_LIBS = @GST_10_11_LIBS@ GST_10_12_CFLAGS = @GST_10_12_CFLAGS@ GST_10_12_LIBS = @GST_10_12_LIBS@ GST_10_13_CFLAGS = @GST_10_13_CFLAGS@ GST_10_13_LIBS = @GST_10_13_LIBS@ GST_10_14_CFLAGS = @GST_10_14_CFLAGS@ GST_10_14_LIBS = @GST_10_14_LIBS@ GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ GST_BASE_LIBS = @GST_BASE_LIBS@ GST_CFLAGS = @GST_CFLAGS@ GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ GST_CHECK_LIBS = @GST_CHECK_LIBS@ GST_LIBS = @GST_LIBS@ GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ GST_TOOLS_DIR = @GST_TOOLS_DIR@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_GTK_WIDGET = @HAVE_GTK_WIDGET@ HAVE_IMAGING_LIBRARY = @HAVE_IMAGING_LIBRARY@ HAVE_OPENGLES_PLUGIN = @HAVE_OPENGLES_PLUGIN@ HAVE_OPENGL_PLUGIN = @HAVE_OPENGL_PLUGIN@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGLADE_2_0_CFLAGS = @LIBGLADE_2_0_CFLAGS@ LIBGLADE_2_0_LIBS = @LIBGLADE_2_0_LIBS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENGLES_BACKEND = @OPENGLES_BACKEND@ OPENGL_BACKEND = @OPENGL_BACKEND@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ PANGOCAIRO_CFLAGS = @PANGOCAIRO_CFLAGS@ PANGOCAIRO_LIBS = @PANGOCAIRO_LIBS@ PANGO_1_16_CFLAGS = @PANGO_1_16_CFLAGS@ PANGO_1_16_LIBS = @PANGO_1_16_LIBS@ PANGO_CFLAGS = @PANGO_CFLAGS@ PANGO_LIBS = @PANGO_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL_PATH = @PERL_PATH@ PGM_ALL_CFLAGS = @PGM_ALL_CFLAGS@ PGM_ALL_LDFLAGS = @PGM_ALL_LDFLAGS@ PGM_ALL_LIBS = @PGM_ALL_LIBS@ PGM_GLES_CFLAGS = @PGM_GLES_CFLAGS@ PGM_GLES_LIBS = @PGM_GLES_LIBS@ PGM_GL_CFLAGS = @PGM_GL_CFLAGS@ PGM_GL_LIBS = @PGM_GL_LIBS@ PGM_GTKDOC_CFLAGS = @PGM_GTKDOC_CFLAGS@ PGM_LIB_LDFLAGS = @PGM_LIB_LDFLAGS@ PGM_LT_LDFLAGS = @PGM_LT_LDFLAGS@ PGM_LT_VERSION = @PGM_LT_VERSION@ PGM_MAJORMINOR = @PGM_MAJORMINOR@ PGM_OBJ_CFLAGS = @PGM_OBJ_CFLAGS@ PGM_OBJ_LIBS = @PGM_OBJ_LIBS@ PGM_OPTION_CFLAGS = @PGM_OPTION_CFLAGS@ PGM_PLUGIN_LDFLAGS = @PGM_PLUGIN_LDFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PLUGIN_PATH = @PLUGIN_PATH@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XCOMPOSITE_CFLAGS = @XCOMPOSITE_CFLAGS@ XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ XMKMF = @XMKMF@ XRENDER_CFLAGS = @XRENDER_CFLAGS@ XRENDER_LIBS = @XRENDER_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cairo_req = @cairo_req@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ glib_req = @glib_req@ gstreamer_plugins_base_req = @gstreamer_plugins_base_req@ gstreamer_req = @gstreamer_req@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pango_req = @pango_req@ pangocairo_req = @pangocairo_req@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = \ config.h \ pgmversion.h \ glib-mkenums \ libpgmplugin.def \ libpigment.def \ libpigmentimaging.def \ libpgmboilerplate.rc \ libpgmopengl.rc \ libpigment.rc \ libpigmentimaging.rc all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu win32/common/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu win32/common/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pigment-0.3.17/win32/common/libpgmplugin.def0000755000175000017500000000003111205034417015563 00000000000000EXPORTS pgm_plugin_desc pigment-0.3.17/win32/common/pgmversion.h0000755000175000017500000000373311205034417014770 00000000000000/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- * * Pigment media rendering library * * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Loïc Molinari */ /** * SECTION:pgmversion * @short_description: Pigment version macros. * * You can use the macros to keep the Pigment version information in * your application. * * Use the pgm_version() function if you want to know which version of * Pigment you are currently linked against. * * The version macros get defined by including "pgm/pgm.h". * * Last reviewed on 2007-04-12 (0.1.5) */ #ifndef __PGM_VERSION_H__ #define __PGM_VERSION_H__ #include G_BEGIN_DECLS /** * PGM_VERSION_MAJOR: * * The major version of Pigment at compile time. */ #define PGM_VERSION_MAJOR (0) /** * PGM_VERSION_MINOR: * * The minor version of Pigment at compile time. */ #define PGM_VERSION_MINOR (3) /** * PGM_VERSION_MICRO: * * The micro version of Pigment at compile time. */ #define PGM_VERSION_MICRO (17) /** * PGM_VERSION_NANO: * * The nano version of Pigment at compile time. Actual releases have 0, * Subversion versions have 1, prerelease versions have [2-n]. */ #define PGM_VERSION_NANO (0) G_END_DECLS #endif /* __PGM_VERSION_H__ */ pigment-0.3.17/win32/common/libpgmboilerplate.rc0000644000175000017500000000210211205034417016433 00000000000000#include #include "config.h" VS_VERSION_INFO VERSIONINFO FILEVERSION PGM_MAJOR_VERSION,PGM_MINOR_VERSION,PGM_MICRO_VERSION,PGM_NANO_VERSION PRODUCTVERSION PGM_MAJOR_VERSION,PGM_MINOR_VERSION,PGM_MICRO_VERSION,PGM_NANO_VERSION FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L #else FILEFLAGS 0x0L #endif FILEOS 0x4L FILETYPE 0x2L FILESUBTYPE 0x0L BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040904b0" BEGIN VALUE "CompanyName", PGM_COMPANY_NAME VALUE "FileDescription", "Pigment boilerplate plugin" VALUE "FileVersion", PGM_VERSION_STRING VALUE "InternalName", "libpgmboilerplate" VALUE "LegalCopyright", PGM_LEGAL_COPYRIGHT VALUE "OriginalFilename", "libpgmboilerplate.dll" VALUE "ProductName", PGM_PRODUCT_NAME VALUE "ProductVersion", PGM_VERSION_STRING END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1200 END END pigment-0.3.17/win32/README.txt0000644000175000017500000000245611205034420012624 00000000000000Building Pigment on Win32 ------------------------- First you obviously need developer packages for the compile-time dependencies: GLib, GdkPixbuf, GStreamer, etc. You can get pre-built Win32 packages of those libraries at http://www.gimp.org/~tml/gimp/win32/downloads.html. There are two project files for Microsoft Visual Studio 6 and 9 respectively in the win32/vs6 and win32/vs9 directories. Each directories contain project files to launch the graphical environment but also makefiles so that it is possible to batch builds from the command line. You should be aware that MSVC6 is using the C runtime called msvcrt.dll (as well as MinGW) which is installed by default on all Windows versions, but recent MSVC (> 6) are not using that runtime anymore. The new runtimes are distributed with MSVC and should be provided in software distribution packages. The pre-built GLib and its dependencies on Win32 are using the msvcrt.dll runtime, so you need to build all the dependencies with MSVC9 yourself. The problem is that programs must avoid using the different runtimes at the same time. GLib event-based MainLoop is basically doing polling on file descriptors, since on Win32 file descriptors are local to the runtimes, a file descriptor created with a runtime cannot be used by another one. pigment-0.3.17/win32/Makefile.in0000644000175000017500000004425211205034675013207 00000000000000# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = win32 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/as-compiler-flag.m4 \ $(top_srcdir)/common/m4/as-version.m4 \ $(top_srcdir)/common/m4/check.m4 \ $(top_srcdir)/common/m4/gst-args.m4 \ $(top_srcdir)/common/m4/gst-check.m4 \ $(top_srcdir)/common/m4/gst-error.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/libtool.m4 \ $(top_srcdir)/common/m4/ltoptions.m4 \ $(top_srcdir)/common/m4/ltsugar.m4 \ $(top_srcdir)/common/m4/ltversion.m4 \ $(top_srcdir)/common/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAIROXLIB_CFLAGS = @CAIROXLIB_CFLAGS@ CAIROXLIB_LIBS = @CAIROXLIB_LIBS@ CAIRO_CFLAGS = @CAIRO_CFLAGS@ CAIRO_LIBS = @CAIRO_LIBS@ CC = @CC@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXEEXT = @EXEEXT@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ GCOV = @GCOV@ GCOV_CFLAGS = @GCOV_CFLAGS@ GCOV_LIBS = @GCOV_LIBS@ GDKPIXBUFXLIB_CFLAGS = @GDKPIXBUFXLIB_CFLAGS@ GDKPIXBUFXLIB_LIBS = @GDKPIXBUFXLIB_LIBS@ GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@ GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ GST_0_10_13_CFLAGS = @GST_0_10_13_CFLAGS@ GST_0_10_13_LIBS = @GST_0_10_13_LIBS@ GST_10_10_CFLAGS = @GST_10_10_CFLAGS@ GST_10_10_LIBS = @GST_10_10_LIBS@ GST_10_11_CFLAGS = @GST_10_11_CFLAGS@ GST_10_11_LIBS = @GST_10_11_LIBS@ GST_10_12_CFLAGS = @GST_10_12_CFLAGS@ GST_10_12_LIBS = @GST_10_12_LIBS@ GST_10_13_CFLAGS = @GST_10_13_CFLAGS@ GST_10_13_LIBS = @GST_10_13_LIBS@ GST_10_14_CFLAGS = @GST_10_14_CFLAGS@ GST_10_14_LIBS = @GST_10_14_LIBS@ GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ GST_BASE_LIBS = @GST_BASE_LIBS@ GST_CFLAGS = @GST_CFLAGS@ GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ GST_CHECK_LIBS = @GST_CHECK_LIBS@ GST_LIBS = @GST_LIBS@ GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ GST_TOOLS_DIR = @GST_TOOLS_DIR@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_GTK_WIDGET = @HAVE_GTK_WIDGET@ HAVE_IMAGING_LIBRARY = @HAVE_IMAGING_LIBRARY@ HAVE_OPENGLES_PLUGIN = @HAVE_OPENGLES_PLUGIN@ HAVE_OPENGL_PLUGIN = @HAVE_OPENGL_PLUGIN@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGLADE_2_0_CFLAGS = @LIBGLADE_2_0_CFLAGS@ LIBGLADE_2_0_LIBS = @LIBGLADE_2_0_LIBS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENGLES_BACKEND = @OPENGLES_BACKEND@ OPENGL_BACKEND = @OPENGL_BACKEND@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ PANGOCAIRO_CFLAGS = @PANGOCAIRO_CFLAGS@ PANGOCAIRO_LIBS = @PANGOCAIRO_LIBS@ PANGO_1_16_CFLAGS = @PANGO_1_16_CFLAGS@ PANGO_1_16_LIBS = @PANGO_1_16_LIBS@ PANGO_CFLAGS = @PANGO_CFLAGS@ PANGO_LIBS = @PANGO_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL_PATH = @PERL_PATH@ PGM_ALL_CFLAGS = @PGM_ALL_CFLAGS@ PGM_ALL_LDFLAGS = @PGM_ALL_LDFLAGS@ PGM_ALL_LIBS = @PGM_ALL_LIBS@ PGM_GLES_CFLAGS = @PGM_GLES_CFLAGS@ PGM_GLES_LIBS = @PGM_GLES_LIBS@ PGM_GL_CFLAGS = @PGM_GL_CFLAGS@ PGM_GL_LIBS = @PGM_GL_LIBS@ PGM_GTKDOC_CFLAGS = @PGM_GTKDOC_CFLAGS@ PGM_LIB_LDFLAGS = @PGM_LIB_LDFLAGS@ PGM_LT_LDFLAGS = @PGM_LT_LDFLAGS@ PGM_LT_VERSION = @PGM_LT_VERSION@ PGM_MAJORMINOR = @PGM_MAJORMINOR@ PGM_OBJ_CFLAGS = @PGM_OBJ_CFLAGS@ PGM_OBJ_LIBS = @PGM_OBJ_LIBS@ PGM_OPTION_CFLAGS = @PGM_OPTION_CFLAGS@ PGM_PLUGIN_LDFLAGS = @PGM_PLUGIN_LDFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PLUGIN_PATH = @PLUGIN_PATH@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XCOMPOSITE_CFLAGS = @XCOMPOSITE_CFLAGS@ XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ XMKMF = @XMKMF@ XRENDER_CFLAGS = @XRENDER_CFLAGS@ XRENDER_LIBS = @XRENDER_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cairo_req = @cairo_req@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ glib_req = @glib_req@ gstreamer_plugins_base_req = @gstreamer_plugins_base_req@ gstreamer_req = @gstreamer_req@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pango_req = @pango_req@ pangocairo_req = @pangocairo_req@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = \ common \ vs6 \ vs9 EXTRA_DIST = README.txt all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu win32/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu win32/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ am__remove_distdir=: \ am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-exec-am: install-html: install-html-recursive install-info: install-info-recursive install-man: install-pdf: install-pdf-recursive install-ps: install-ps-recursive installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ install-strip .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pigment-0.3.17/win32/vs6/0000777000175000017500000000000011205035141011722 500000000000000pigment-0.3.17/win32/vs6/makefile.mak0000644000175000017500000000070711205034420014110 00000000000000## Makefile for building Pigment with MSVC6 ## Usage: nmake -f makefile.mak [TARGET] PROJECTS = \ libpigment libpgmboilerplate \ libpgmopengl all: sub-all sub-all: for %d in ($(PROJECTS)) do nmake -nologo -f makefile.mak sub-one PROJECT=%d TARGET=all clean: sub-clean sub-clean: for %d in ($(PROJECTS)) do nmake -nologo -f makefile.mak sub-one PROJECT=%d TARGET=clean sub-one: @nmake -nologo -f $(PROJECT).mak $(TARGET) pigment-0.3.17/win32/vs6/libpigment.dsp0000644000175000017500000003132211205034420014500 00000000000000# Microsoft Developer Studio Project File - Name="libpigment" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 CFG=libpigment - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "libpigment.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "libpigment.mak" CFG="libpigment - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "libpigment - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "libpigment - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe MTL=midl.exe RSC=rc.exe !IF "$(CFG)" == "libpigment - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Release" # PROP Intermediate_Dir "Release" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBPIGMENT_EXPORTS" /YX /FD /c # ADD CPP /nologo /MD /W3 /GX /O2 /I "..\common" /I "C:\pigment-build\dev\include" /I "C:\pigment-build\dev\include\glib-2.0" /I "C:\pigment-build\dev\lib\glib-2.0\include" /I "C:\pigment-build\dev\include\gtk-2.0" /I "C:\pigment-build\dev\include\gstreamer-0.10" /I "C:\pigment-build\dev\include\libxml2" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBPIGMENT_EXPORTS" /D "HAVE_CONFIG_H" /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x40c /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glib-2.0.lib gobject-2.0.lib gmodule-2.0.lib libgstreamer-0.10.lib libgstvideo-0.10.lib gdk_pixbuf-2.0.lib /nologo /dll /machine:I386 /out:"Release/libpigment-0.3.dll" /libpath:"C:\pigment-build\dev\lib" !ELSEIF "$(CFG)" == "libpigment - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Debug" # PROP Intermediate_Dir "Debug" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBPIGMENT_EXPORTS" /YX /FD /GZ /c # ADD CPP /nologo /MD /W3 /Gm /GX /ZI /Od /I "..\common" /I "C:\pigment-build\dev\include" /I "C:\pigment-build\dev\include\glib-2.0" /I "C:\pigment-build\dev\lib\glib-2.0\include" /I "C:\pigment-build\dev\include\gtk-2.0" /I "C:\pigment-build\dev\include\gstreamer-0.10" /I "C:\pigment-build\dev\include\libxml2" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBPIGMENT_EXPORTS" /D "HAVE_CONFIG_H" /YX /FD /GZ /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x40c /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glib-2.0.lib gobject-2.0.lib gmodule-2.0.lib libgstreamer-0.10.lib libgstvideo-0.10.lib gdk_pixbuf-2.0.lib /nologo /dll /debug /machine:I386 /out:"Debug/libpigment-0.3.dll" /pdbtype:sept /libpath:"C:\pigment-build\dev\lib" # SUBTRACT LINK32 /nodefaultlib !ENDIF # Begin Target # Name "libpigment - Win32 Release" # Name "libpigment - Win32 Debug" # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File SOURCE=..\common\libpigment.def # End Source File # Begin Source File SOURCE=..\..\pgm\pgm.c # End Source File # Begin Source File SOURCE=..\..\pgm\pgmcanvas.c # End Source File # Begin Source File SOURCE=..\..\pgm\pgmdrawable.c # End Source File # Begin Source File SOURCE=..\..\pgm\pgmenumtypes.c # End Source File # Begin Source File SOURCE=..\..\pgm\pgmevents.c # End Source File # Begin Source File SOURCE=..\..\pgm\pgmimage.c # End Source File # Begin Source File SOURCE=..\..\pgm\pgmimagesink.c # End Source File # Begin Source File SOURCE=..\..\pgm\pgmlinearalgebra.c # End Source File # Begin Source File SOURCE=..\..\pgm\pgmmarshal.c # End Source File # Begin Source File SOURCE=..\..\pgm\pgmmarshal.list !IF "$(CFG)" == "libpigment - Win32 Release" # Begin Custom Build - GLib/GObject code generation InputPath=..\..\pgm\pgmmarshal.list BuildCmds= \ set PATH=%PATH%;C:\pigment-build\dev\bin;C:\pigment-build\dev\lib \ echo Generating GObject marshalling code... \ c:\pigment-build\dev\bin\glib-genmarshal --prefix=pgm_marshal ..\..\pgm\pgmmarshal.list --header > ..\..\pgm\pgmmarshal.h \ c:\pigment-build\dev\bin\glib-genmarshal --prefix=pgm_marshal ..\..\pgm\pgmmarshal.list --body --header > ..\..\pgm\pgmmarshal.c \ echo Generating GObject enum description code... \ C:\pigment-build\dev\perl54\bin\perl ../common/glib-mkenums --fhead "#ifndef __PGM_ENUM_TYPES_H__\n" --fhead "#define __PGM_ENUM_TYPES_H__\n\n" --fhead "G_BEGIN_DECLS\n\n" --ftail "G_END_DECLS\n\n" --ftail "#endif\n" --fprod "/* --- @filename@ --- */\n" --eprod "#define PGM_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n" --eprod "GType @enum_name@_get_type (void);\n\n" "../../pgm/pgm.h" "../../pgm/pgmcanvas.h" "../../pgm/pgmcommon.h" "../../pgm/pgmdrawable.h" "../../pgm/pgmevents.h" "../../pgm/pgmimage.h" "../../pgm/pgmplugin.h" "../../pgm/pgmtext.h" "../../pgm/pgmviewport.h" "../../pgm/pgmviewportfactory.h" "../../pgm/pgmlinearalgebra.h" "../../pgm/pgmkeysyms.h" > ../../pgm\pgmenumtypes.h \ C:\pigment-build\dev\perl54\bin\perl ../common/glib-mkenums --fhead "#include \n" --fhead "#include \"pgmenumtypes.h\"\n" --fprod "\n/* enumerations from \"@filename@\" */" --fprod "\n#include \"@filename@\"" --vhead "static const G@Type@Value _@enum_name@_values[] = {" --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," --vtail " { 0, NULL, NULL }\n};\n\n" --vtail "GType\n@enum_name@_get_type (void)\n{\n" --vtail " static GType type = 0;\n\n" --vtail " if (!type)\n" --vtail " type = g_@type@_register_static (\"@EnumName@\", _@enum_name@_values);\n\n" --vtail " return type;\n}\n\n" "../../pgm/pgm.h" "../../pgm/pgmcanvas.h" "../../pgm/pgmcommon.h" "../../pgm/pgmdrawable.h" "../../pgm/pgmevents.h" "../../pgm/pgmimage.h" "../../pgm/pgmplugin.h" "../../pgm/pgmtext.h" "../../pgm/pgmviewport.h" "../../pgm/pgmviewportfactory.h" "../../pgm/pgmlinearalgebra.h" "../../pgm/pgmkeysyms.h" > ../../pgm\pgmenumtypes.c \ "C:\pigment-build\pigment\pgm\pgmmarshal.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" $(BuildCmds) "C:\pigment-build\pigment\pgm\pgmmarshal.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" $(BuildCmds) "C:\pigment-build\pigment\pgm\pgmenumtypes.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" $(BuildCmds) "C:\pigment-build\pigment\pgm\pgmenumtypes.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" $(BuildCmds) # End Custom Build !ELSEIF "$(CFG)" == "libpigment - Win32 Debug" # Begin Custom Build - GLib/GObject code generation InputPath=..\..\pgm\pgmmarshal.list BuildCmds= \ set PATH=%PATH%;C:\pigment-build\dev\bin;C:\pigment-build\dev\lib \ echo Generating GObject marshalling code... \ c:\pigment-build\dev\bin\glib-genmarshal --prefix=pgm_marshal ..\..\pgm\pgmmarshal.list --header > ..\..\pgm\pgmmarshal.h \ c:\pigment-build\dev\bin\glib-genmarshal --prefix=pgm_marshal ..\..\pgm\pgmmarshal.list --body --header > ..\..\pgm\pgmmarshal.c \ echo Generating GObject enum description code... \ C:\pigment-build\dev\perl54\bin\perl ../common/glib-mkenums --fhead "#ifndef __PGM_ENUM_TYPES_H__\n" --fhead "#define __PGM_ENUM_TYPES_H__\n\n" --fhead "G_BEGIN_DECLS\n\n" --ftail "G_END_DECLS\n\n" --ftail "#endif\n" --fprod "/* --- @filename@ --- */\n" --eprod "#define PGM_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n" --eprod "GType @enum_name@_get_type (void);\n\n" "../../pgm/pgm.h" "../../pgm/pgmcanvas.h" "../../pgm/pgmcommon.h" "../../pgm/pgmdrawable.h" "../../pgm/pgmevents.h" "../../pgm/pgmimage.h" "../../pgm/pgmplugin.h" "../../pgm/pgmtext.h" "../../pgm/pgmviewport.h" "../../pgm/pgmviewportfactory.h" "../../pgm/pgmlinearalgebra.h" "../../pgm/pgmkeysyms.h" > ../../pgm\pgmenumtypes.h \ C:\pigment-build\dev\perl54\bin\perl ../common/glib-mkenums --fhead "#include \n" --fhead "#include \"pgmenumtypes.h\"\n" --fprod "\n/* enumerations from \"@filename@\" */" --fprod "\n#include \"@filename@\"" --vhead "static const G@Type@Value _@enum_name@_values[] = {" --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," --vtail " { 0, NULL, NULL }\n};\n\n" --vtail "GType\n@enum_name@_get_type (void)\n{\n" --vtail " static GType type = 0;\n\n" --vtail " if (!type)\n" --vtail " type = g_@type@_register_static (\"@EnumName@\", _@enum_name@_values);\n\n" --vtail " return type;\n}\n\n" "../../pgm/pgm.h" "../../pgm/pgmcanvas.h" "../../pgm/pgmcommon.h" "../../pgm/pgmdrawable.h" "../../pgm/pgmevents.h" "../../pgm/pgmimage.h" "../../pgm/pgmplugin.h" "../../pgm/pgmtext.h" "../../pgm/pgmviewport.h" "../../pgm/pgmviewportfactory.h" "../../pgm/pgmlinearalgebra.h" "../../pgm/pgmkeysyms.h" > ../../pgm\pgmenumtypes.c \ "C:\pigment-build\pigment\pgm\pgmmarshal.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" $(BuildCmds) "C:\pigment-build\pigment\pgm\pgmmarshal.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" $(BuildCmds) "C:\pigment-build\pigment\pgm\pgmenumtypes.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" $(BuildCmds) "C:\pigment-build\pigment\pgm\pgmenumtypes.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" $(BuildCmds) # End Custom Build !ENDIF # End Source File # Begin Source File SOURCE=..\..\pgm\pgmmodule.c # End Source File # Begin Source File SOURCE=..\..\pgm\pgmtext.c # End Source File # Begin Source File SOURCE=..\..\pgm\pgmviewport.c # End Source File # Begin Source File SOURCE=..\..\pgm\pgmviewportfactory.c # End Source File # End Group # Begin Group "Header Files" # PROP Default_Filter "h;hpp;hxx;hm;inl" # Begin Source File SOURCE=..\..\pgm\pgm.h # End Source File # Begin Source File SOURCE=..\..\pgm\pgmcanvas.h # End Source File # Begin Source File SOURCE=..\..\pgm\pgmcommon.h # End Source File # Begin Source File SOURCE=..\..\pgm\pgmdrawable.h # End Source File # Begin Source File SOURCE=..\..\pgm\pgmenumtypes.h # End Source File # Begin Source File SOURCE=..\..\pgm\pgmevents.h # End Source File # Begin Source File SOURCE=..\..\pgm\pgmimage.h # End Source File # Begin Source File SOURCE=..\..\pgm\pgmimagesink.h # End Source File # Begin Source File SOURCE=..\..\pgm\pgmkeysyms.h # End Source File # Begin Source File SOURCE=..\..\pgm\pgmlinearalgebra.h # End Source File # Begin Source File SOURCE=..\..\pgm\pgmmarshal.h # End Source File # Begin Source File SOURCE=..\..\pgm\pgmmodule.h # End Source File # Begin Source File SOURCE=..\..\pgm\pgmplugin.h # End Source File # Begin Source File SOURCE=..\..\pgm\pgmtext.h # End Source File # Begin Source File SOURCE=..\..\pgm\pgmviewport.h # End Source File # Begin Source File SOURCE=..\..\pgm\pgmviewportfactory.h # End Source File # End Group # Begin Group "Resource Files" # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" # Begin Source File SOURCE=..\common\libpigment.rc !IF "$(CFG)" == "libpigment - Win32 Release" !ELSEIF "$(CFG)" == "libpigment - Win32 Debug" # ADD BASE RSC /l 0x40c /i "\pigment-build\pigment\win32\common" # ADD RSC /l 0x40c /i "\pigment-build\pigment\win32\common" /i "..\common" !ENDIF # End Source File # End Group # End Target # End Project pigment-0.3.17/win32/vs6/libpgmopengl.mak0000644000175000017500000003307211205034420015013 00000000000000# Microsoft Developer Studio Generated NMAKE File, Based on libpgmopengl.dsp !IF "$(CFG)" == "" CFG=libpgmopengl - Win32 Debug !MESSAGE No configuration specified. Defaulting to libpgmopengl - Win32 Debug. !ENDIF !IF "$(CFG)" != "libpgmopengl - Win32 Release" && "$(CFG)" != "libpgmopengl - Win32 Debug" !MESSAGE Invalid configuration "$(CFG)" specified. !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "libpgmopengl.mak" CFG="libpgmopengl - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "libpgmopengl - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "libpgmopengl - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE !ERROR An invalid configuration is specified. !ENDIF !IF "$(OS)" == "Windows_NT" NULL= !ELSE NULL=nul !ENDIF !IF "$(CFG)" == "libpgmopengl - Win32 Release" OUTDIR=.\Release\pigment-0.3 INTDIR=.\Release\pigment-0.3 # Begin Custom Macros OutDir=.\Release\pigment-0.3 # End Custom Macros !IF "$(RECURSE)" == "0" ALL : "$(OUTDIR)\libpgmopengl.dll" !ELSE ALL : "libpigment - Win32 Release" "$(OUTDIR)\libpgmopengl.dll" !ENDIF !IF "$(RECURSE)" == "1" CLEAN :"libpigment - Win32 ReleaseCLEAN" !ELSE CLEAN : !ENDIF -@erase "$(INTDIR)\libpgmopengl.res" -@erase "$(INTDIR)\pgmbackend.obj" -@erase "$(INTDIR)\pgmcontext.obj" -@erase "$(INTDIR)\pgmgl.obj" -@erase "$(INTDIR)\pgmgldrawable.obj" -@erase "$(INTDIR)\pgmglimage.obj" -@erase "$(INTDIR)\pgmgltext.obj" -@erase "$(INTDIR)\pgmglviewport.obj" -@erase "$(INTDIR)\pgmprogram.obj" -@erase "$(INTDIR)\pgmtexture.obj" -@erase "$(INTDIR)\pgmwglbackend.obj" -@erase "$(INTDIR)\vc60.idb" -@erase "$(OUTDIR)\libpgmopengl.dll" -@erase "$(OUTDIR)\libpgmopengl.exp" -@erase "$(OUTDIR)\libpgmopengl.lib" "$(OUTDIR)" : if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" CPP=cl.exe CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "..\common" /I "..\.." /I "C:\pigment-build\dev\include" /I "C:\pigment-build\dev\include\glib-2.0" /I "C:\pigment-build\dev\lib\glib-2.0\include" /I "C:\pigment-build\dev\include\gtk-2.0" /I "C:\pigment-build\dev\include\gstreamer-0.10" /I "C:\pigment-build\dev\include\libxml2" /I "C:\pigment-build\dev\include\cairo" /I "C:\pigment-build\dev\include\pango-1.0" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBPGMOPENGL_EXPORTS" /D "HAVE_CONFIG_H" /Fp"$(INTDIR)\libpgmopengl.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c .c{$(INTDIR)}.obj:: $(CPP) @<< $(CPP_PROJ) $< << .cpp{$(INTDIR)}.obj:: $(CPP) @<< $(CPP_PROJ) $< << .cxx{$(INTDIR)}.obj:: $(CPP) @<< $(CPP_PROJ) $< << .c{$(INTDIR)}.sbr:: $(CPP) @<< $(CPP_PROJ) $< << .cpp{$(INTDIR)}.sbr:: $(CPP) @<< $(CPP_PROJ) $< << .cxx{$(INTDIR)}.sbr:: $(CPP) @<< $(CPP_PROJ) $< << MTL=midl.exe MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 RSC=rc.exe RSC_PROJ=/l 0x409 /fo"$(INTDIR)\libpgmopengl.res" /d "NDEBUG" BSC32=bscmake.exe BSC32_FLAGS=/nologo /o"$(OUTDIR)\libpgmopengl.bsc" BSC32_SBRS= \ LINK32=link.exe LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glib-2.0.lib gobject-2.0.lib libgstreamer-0.10.lib gdk_pixbuf-2.0.lib pango-1.0.lib pangocairo-1.0.lib cairo.lib opengl32.lib /nologo /dll /incremental:no /pdb:"$(OUTDIR)\libpgmopengl.pdb" /machine:I386 /def:"..\common\libpgmplugin.def" /out:"$(OUTDIR)\libpgmopengl.dll" /implib:"$(OUTDIR)\libpgmopengl.lib" /libpath:"Release" /libpath:"C:\pigment-build\dev\lib" DEF_FILE= \ "..\common\libpgmplugin.def" LINK32_OBJS= \ "$(INTDIR)\pgmbackend.obj" \ "$(INTDIR)\pgmcontext.obj" \ "$(INTDIR)\pgmgl.obj" \ "$(INTDIR)\pgmgldrawable.obj" \ "$(INTDIR)\pgmglimage.obj" \ "$(INTDIR)\pgmgltext.obj" \ "$(INTDIR)\pgmglviewport.obj" \ "$(INTDIR)\pgmprogram.obj" \ "$(INTDIR)\pgmtexture.obj" \ "$(INTDIR)\pgmwglbackend.obj" \ "$(INTDIR)\libpgmopengl.res" \ ".\Release\libpigment-0.3.lib" "$(OUTDIR)\libpgmopengl.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) $(LINK32) @<< $(LINK32_FLAGS) $(LINK32_OBJS) << !ELSEIF "$(CFG)" == "libpgmopengl - Win32 Debug" OUTDIR=.\Debug\pigment-0.3 INTDIR=.\Debug\pigment-0.3 # Begin Custom Macros OutDir=.\Debug\pigment-0.3 # End Custom Macros !IF "$(RECURSE)" == "0" ALL : "$(OUTDIR)\libpgmopengl.dll" "$(OUTDIR)\libpgmopengl.bsc" !ELSE ALL : "libpigment - Win32 Debug" "$(OUTDIR)\libpgmopengl.dll" "$(OUTDIR)\libpgmopengl.bsc" !ENDIF !IF "$(RECURSE)" == "1" CLEAN :"libpigment - Win32 DebugCLEAN" !ELSE CLEAN : !ENDIF -@erase "$(INTDIR)\libpgmopengl.res" -@erase "$(INTDIR)\pgmbackend.obj" -@erase "$(INTDIR)\pgmbackend.sbr" -@erase "$(INTDIR)\pgmcontext.obj" -@erase "$(INTDIR)\pgmcontext.sbr" -@erase "$(INTDIR)\pgmgl.obj" -@erase "$(INTDIR)\pgmgl.sbr" -@erase "$(INTDIR)\pgmgldrawable.obj" -@erase "$(INTDIR)\pgmgldrawable.sbr" -@erase "$(INTDIR)\pgmglimage.obj" -@erase "$(INTDIR)\pgmglimage.sbr" -@erase "$(INTDIR)\pgmgltext.obj" -@erase "$(INTDIR)\pgmgltext.sbr" -@erase "$(INTDIR)\pgmglviewport.obj" -@erase "$(INTDIR)\pgmglviewport.sbr" -@erase "$(INTDIR)\pgmprogram.obj" -@erase "$(INTDIR)\pgmprogram.sbr" -@erase "$(INTDIR)\pgmtexture.obj" -@erase "$(INTDIR)\pgmtexture.sbr" -@erase "$(INTDIR)\pgmwglbackend.obj" -@erase "$(INTDIR)\pgmwglbackend.sbr" -@erase "$(INTDIR)\vc60.idb" -@erase "$(INTDIR)\vc60.pdb" -@erase "$(OUTDIR)\libpgmopengl.bsc" -@erase "$(OUTDIR)\libpgmopengl.dll" -@erase "$(OUTDIR)\libpgmopengl.exp" -@erase "$(OUTDIR)\libpgmopengl.ilk" -@erase "$(OUTDIR)\libpgmopengl.pdb" "$(OUTDIR)" : if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" CPP=cl.exe CPP_PROJ=/nologo /MD /W3 /Gm /GX /ZI /Od /I "..\common" /I "..\.." /I "C:\pigment-build\dev\include" /I "C:\pigment-build\dev\include\glib-2.0" /I "C:\pigment-build\dev\lib\glib-2.0\include" /I "C:\pigment-build\dev\include\gtk-2.0" /I "C:\pigment-build\dev\include\gstreamer-0.10" /I "C:\pigment-build\dev\include\libxml2" /I "C:\pigment-build\dev\include\cairo" /I "C:\pigment-build\dev\include\pango-1.0" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBPGMOPENGL_EXPORTS" /D "HAVE_CONFIG_H" /FR"$(INTDIR)\\" /Fp"$(INTDIR)\libpgmopengl.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c .c{$(INTDIR)}.obj:: $(CPP) @<< $(CPP_PROJ) $< << .cpp{$(INTDIR)}.obj:: $(CPP) @<< $(CPP_PROJ) $< << .cxx{$(INTDIR)}.obj:: $(CPP) @<< $(CPP_PROJ) $< << .c{$(INTDIR)}.sbr:: $(CPP) @<< $(CPP_PROJ) $< << .cpp{$(INTDIR)}.sbr:: $(CPP) @<< $(CPP_PROJ) $< << .cxx{$(INTDIR)}.sbr:: $(CPP) @<< $(CPP_PROJ) $< << MTL=midl.exe MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 RSC=rc.exe RSC_PROJ=/l 0x409 /fo"$(INTDIR)\libpgmopengl.res" /d "_DEBUG" BSC32=bscmake.exe BSC32_FLAGS=/nologo /o"$(OUTDIR)\libpgmopengl.bsc" BSC32_SBRS= \ "$(INTDIR)\pgmbackend.sbr" \ "$(INTDIR)\pgmcontext.sbr" \ "$(INTDIR)\pgmgl.sbr" \ "$(INTDIR)\pgmgldrawable.sbr" \ "$(INTDIR)\pgmglimage.sbr" \ "$(INTDIR)\pgmgltext.sbr" \ "$(INTDIR)\pgmglviewport.sbr" \ "$(INTDIR)\pgmprogram.sbr" \ "$(INTDIR)\pgmtexture.sbr" \ "$(INTDIR)\pgmwglbackend.sbr" "$(OUTDIR)\libpgmopengl.bsc" : "$(OUTDIR)" $(BSC32_SBRS) $(BSC32) @<< $(BSC32_FLAGS) $(BSC32_SBRS) << LINK32=link.exe LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glib-2.0.lib gobject-2.0.lib libgstreamer-0.10.lib gdk_pixbuf-2.0.lib pango-1.0.lib pangocairo-1.0.lib cairo.lib opengl32.lib /nologo /dll /incremental:yes /pdb:"$(OUTDIR)\libpgmopengl.pdb" /debug /machine:I386 /def:"..\common\libpgmplugin.def" /out:"$(OUTDIR)\libpgmopengl.dll" /implib:"$(OUTDIR)\libpgmopengl.lib" /pdbtype:sept /libpath:"Debug" /libpath:"C:\pigment-build\dev\lib" DEF_FILE= \ "..\common\libpgmplugin.def" LINK32_OBJS= \ "$(INTDIR)\pgmbackend.obj" \ "$(INTDIR)\pgmcontext.obj" \ "$(INTDIR)\pgmgl.obj" \ "$(INTDIR)\pgmgldrawable.obj" \ "$(INTDIR)\pgmglimage.obj" \ "$(INTDIR)\pgmgltext.obj" \ "$(INTDIR)\pgmglviewport.obj" \ "$(INTDIR)\pgmprogram.obj" \ "$(INTDIR)\pgmtexture.obj" \ "$(INTDIR)\pgmwglbackend.obj" \ "$(INTDIR)\libpgmopengl.res" \ ".\Debug\libpigment-0.3.lib" "$(OUTDIR)\libpgmopengl.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) $(LINK32) @<< $(LINK32_FLAGS) $(LINK32_OBJS) << !ENDIF !IF "$(NO_EXTERNAL_DEPS)" != "1" !IF EXISTS("libpgmopengl.dep") !INCLUDE "libpgmopengl.dep" !ELSE !MESSAGE Warning: cannot find "libpgmopengl.dep" !ENDIF !ENDIF !IF "$(CFG)" == "libpgmopengl - Win32 Release" || "$(CFG)" == "libpgmopengl - Win32 Debug" SOURCE=..\..\plugins\opengl\pgmbackend.c !IF "$(CFG)" == "libpgmopengl - Win32 Release" "$(INTDIR)\pgmbackend.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) !ELSEIF "$(CFG)" == "libpgmopengl - Win32 Debug" "$(INTDIR)\pgmbackend.obj" "$(INTDIR)\pgmbackend.sbr" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) !ENDIF SOURCE=..\..\plugins\opengl\pgmcontext.c !IF "$(CFG)" == "libpgmopengl - Win32 Release" "$(INTDIR)\pgmcontext.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) !ELSEIF "$(CFG)" == "libpgmopengl - Win32 Debug" "$(INTDIR)\pgmcontext.obj" "$(INTDIR)\pgmcontext.sbr" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) !ENDIF SOURCE=..\..\plugins\opengl\pgmgl.c !IF "$(CFG)" == "libpgmopengl - Win32 Release" "$(INTDIR)\pgmgl.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) !ELSEIF "$(CFG)" == "libpgmopengl - Win32 Debug" "$(INTDIR)\pgmgl.obj" "$(INTDIR)\pgmgl.sbr" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) !ENDIF SOURCE=..\..\plugins\opengl\pgmgldrawable.c !IF "$(CFG)" == "libpgmopengl - Win32 Release" "$(INTDIR)\pgmgldrawable.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) !ELSEIF "$(CFG)" == "libpgmopengl - Win32 Debug" "$(INTDIR)\pgmgldrawable.obj" "$(INTDIR)\pgmgldrawable.sbr" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) !ENDIF SOURCE=..\..\plugins\opengl\pgmglimage.c !IF "$(CFG)" == "libpgmopengl - Win32 Release" "$(INTDIR)\pgmglimage.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) !ELSEIF "$(CFG)" == "libpgmopengl - Win32 Debug" "$(INTDIR)\pgmglimage.obj" "$(INTDIR)\pgmglimage.sbr" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) !ENDIF SOURCE=..\..\plugins\opengl\pgmgltext.c !IF "$(CFG)" == "libpgmopengl - Win32 Release" "$(INTDIR)\pgmgltext.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) !ELSEIF "$(CFG)" == "libpgmopengl - Win32 Debug" "$(INTDIR)\pgmgltext.obj" "$(INTDIR)\pgmgltext.sbr" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) !ENDIF SOURCE=..\..\plugins\opengl\pgmglviewport.c !IF "$(CFG)" == "libpgmopengl - Win32 Release" "$(INTDIR)\pgmglviewport.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) !ELSEIF "$(CFG)" == "libpgmopengl - Win32 Debug" "$(INTDIR)\pgmglviewport.obj" "$(INTDIR)\pgmglviewport.sbr" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) !ENDIF SOURCE=..\..\plugins\opengl\pgmprogram.c !IF "$(CFG)" == "libpgmopengl - Win32 Release" "$(INTDIR)\pgmprogram.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) !ELSEIF "$(CFG)" == "libpgmopengl - Win32 Debug" "$(INTDIR)\pgmprogram.obj" "$(INTDIR)\pgmprogram.sbr" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) !ENDIF SOURCE=..\..\plugins\opengl\pgmtexture.c !IF "$(CFG)" == "libpgmopengl - Win32 Release" "$(INTDIR)\pgmtexture.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) !ELSEIF "$(CFG)" == "libpgmopengl - Win32 Debug" "$(INTDIR)\pgmtexture.obj" "$(INTDIR)\pgmtexture.sbr" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) !ENDIF SOURCE=..\..\plugins\opengl\pgmwglbackend.c !IF "$(CFG)" == "libpgmopengl - Win32 Release" "$(INTDIR)\pgmwglbackend.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) !ELSEIF "$(CFG)" == "libpgmopengl - Win32 Debug" "$(INTDIR)\pgmwglbackend.obj" "$(INTDIR)\pgmwglbackend.sbr" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) !ENDIF SOURCE=..\common\libpgmopengl.rc !IF "$(CFG)" == "libpgmopengl - Win32 Release" "$(INTDIR)\libpgmopengl.res" : $(SOURCE) "$(INTDIR)" $(RSC) /l 0x409 /fo"$(INTDIR)\libpgmopengl.res" /i "\pigment-build\pigment\win32\common" /d "NDEBUG" $(SOURCE) !ELSEIF "$(CFG)" == "libpgmopengl - Win32 Debug" "$(INTDIR)\libpgmopengl.res" : $(SOURCE) "$(INTDIR)" $(RSC) /l 0x409 /fo"$(INTDIR)\libpgmopengl.res" /i "\pigment-build\pigment\win32\common" /d "_DEBUG" $(SOURCE) !ENDIF !IF "$(CFG)" == "libpgmopengl - Win32 Release" "libpigment - Win32 Release" : cd "." $(MAKE) /$(MAKEFLAGS) /F ".\libpigment.mak" CFG="libpigment - Win32 Release" cd "." "libpigment - Win32 ReleaseCLEAN" : cd "." $(MAKE) /$(MAKEFLAGS) /F ".\libpigment.mak" CFG="libpigment - Win32 Release" RECURSE=1 CLEAN cd "." !ELSEIF "$(CFG)" == "libpgmopengl - Win32 Debug" "libpigment - Win32 Debug" : cd "." $(MAKE) /$(MAKEFLAGS) /F ".\libpigment.mak" CFG="libpigment - Win32 Debug" cd "." "libpigment - Win32 DebugCLEAN" : cd "." $(MAKE) /$(MAKEFLAGS) /F ".\libpigment.mak" CFG="libpigment - Win32 Debug" RECURSE=1 CLEAN cd "." !ENDIF !ENDIF pigment-0.3.17/win32/vs6/Makefile.am0000644000175000017500000000026711205034420013676 00000000000000EXTRA_DIST = \ image.dsp \ libpgmboilerplate.dsp \ libpgmboilerplate.mak \ libpgmopengl.dsp \ libpgmopengl.mak \ libpigment.dsp \ libpigment.mak \ makefile.mak \ pigment.dsw pigment-0.3.17/win32/vs6/libpgmopengl.dsp0000644000175000017500000001575511205034420015041 00000000000000# Microsoft Developer Studio Project File - Name="libpgmopengl" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 CFG=libpgmopengl - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "libpgmopengl.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "libpgmopengl.mak" CFG="libpgmopengl - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "libpgmopengl - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "libpgmopengl - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe MTL=midl.exe RSC=rc.exe !IF "$(CFG)" == "libpgmopengl - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Release\pigment-0.3" # PROP Intermediate_Dir "Release\pigment-0.3" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBPGMOPENGL_EXPORTS" /YX /FD /c # ADD CPP /nologo /MD /W3 /GX /O2 /I "..\common" /I "..\.." /I "C:\pigment-build\dev\include" /I "C:\pigment-build\dev\include\glib-2.0" /I "C:\pigment-build\dev\lib\glib-2.0\include" /I "C:\pigment-build\dev\include\gtk-2.0" /I "C:\pigment-build\dev\include\gstreamer-0.10" /I "C:\pigment-build\dev\include\libxml2" /I "C:\pigment-build\dev\include\cairo" /I "C:\pigment-build\dev\include\pango-1.0" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBPGMOPENGL_EXPORTS" /D "HAVE_CONFIG_H" /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x40c /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glib-2.0.lib gobject-2.0.lib libgstreamer-0.10.lib gdk_pixbuf-2.0.lib pango-1.0.lib pangocairo-1.0.lib cairo.lib opengl32.lib /nologo /dll /machine:I386 /libpath:"Release" /libpath:"C:\pigment-build\dev\lib" !ELSEIF "$(CFG)" == "libpgmopengl - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Debug\pigment-0.3" # PROP Intermediate_Dir "Debug\pigment-0.3" # PROP Ignore_Export_Lib 1 # PROP Target_Dir "" # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBPGMOPENGL_EXPORTS" /YX /FD /GZ /c # ADD CPP /nologo /MD /W3 /Gm /GX /ZI /Od /I "..\common" /I "..\.." /I "C:\pigment-build\dev\include" /I "C:\pigment-build\dev\include\glib-2.0" /I "C:\pigment-build\dev\lib\glib-2.0\include" /I "C:\pigment-build\dev\include\gtk-2.0" /I "C:\pigment-build\dev\include\gstreamer-0.10" /I "C:\pigment-build\dev\include\libxml2" /I "C:\pigment-build\dev\include\cairo" /I "C:\pigment-build\dev\include\pango-1.0" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBPGMOPENGL_EXPORTS" /D "HAVE_CONFIG_H" /FR /YX /FD /GZ /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x40c /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glib-2.0.lib gobject-2.0.lib libgstreamer-0.10.lib gdk_pixbuf-2.0.lib pango-1.0.lib pangocairo-1.0.lib cairo.lib opengl32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /libpath:"Debug" /libpath:"C:\pigment-build\dev\lib" !ENDIF # Begin Target # Name "libpgmopengl - Win32 Release" # Name "libpgmopengl - Win32 Debug" # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File SOURCE=..\common\libpgmplugin.def # End Source File # Begin Source File SOURCE=..\..\plugins\opengl\pgmbackend.c # End Source File # Begin Source File SOURCE=..\..\plugins\opengl\pgmcontext.c # End Source File # Begin Source File SOURCE=..\..\plugins\opengl\pgmgl.c # End Source File # Begin Source File SOURCE=..\..\plugins\opengl\pgmgldrawable.c # End Source File # Begin Source File SOURCE=..\..\plugins\opengl\pgmglimage.c # End Source File # Begin Source File SOURCE=..\..\plugins\opengl\pgmgltext.c # End Source File # Begin Source File SOURCE=..\..\plugins\opengl\pgmglviewport.c # End Source File # Begin Source File SOURCE=..\..\plugins\opengl\pgmprogram.c # End Source File # Begin Source File SOURCE=..\..\plugins\opengl\pgmtexture.c # End Source File # Begin Source File SOURCE=..\..\plugins\opengl\pgmwglbackend.c # End Source File # End Group # Begin Group "Header Files" # PROP Default_Filter "h;hpp;hxx;hm;inl" # Begin Source File SOURCE=..\..\plugins\opengl\pgmbackend.h # End Source File # Begin Source File SOURCE=..\..\plugins\opengl\pgmcontext.h # End Source File # Begin Source File SOURCE=..\..\plugins\opengl\pgmgldefs.h # End Source File # Begin Source File SOURCE=..\..\plugins\opengl\pgmgldrawable.h # End Source File # Begin Source File SOURCE=..\..\plugins\opengl\pgmglimage.h # End Source File # Begin Source File SOURCE=..\..\plugins\opengl\pgmgltext.h # End Source File # Begin Source File SOURCE=..\..\plugins\opengl\pgmglviewport.h # End Source File # Begin Source File SOURCE=..\..\plugins\opengl\pgmprogram.h # End Source File # Begin Source File SOURCE=..\..\plugins\opengl\pgmtexture.h # End Source File # Begin Source File SOURCE=..\..\plugins\opengl\pgmwglbackend.h # End Source File # End Group # Begin Group "Resource Files" # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" # Begin Source File SOURCE=..\common\libpgmopengl.rc # End Source File # End Group # End Target # End Project pigment-0.3.17/win32/vs6/libpgmboilerplate.mak0000644000175000017500000002051311205034420016025 00000000000000# Microsoft Developer Studio Generated NMAKE File, Based on libpgmboilerplate.dsp !IF "$(CFG)" == "" CFG=libpgmboilerplate - Win32 Debug !MESSAGE No configuration specified. Defaulting to libpgmboilerplate - Win32 Debug. !ENDIF !IF "$(CFG)" != "libpgmboilerplate - Win32 Release" && "$(CFG)" != "libpgmboilerplate - Win32 Debug" !MESSAGE Invalid configuration "$(CFG)" specified. !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "libpgmboilerplate.mak" CFG="libpgmboilerplate - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "libpgmboilerplate - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "libpgmboilerplate - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE !ERROR An invalid configuration is specified. !ENDIF !IF "$(OS)" == "Windows_NT" NULL= !ELSE NULL=nul !ENDIF !IF "$(CFG)" == "libpgmboilerplate - Win32 Release" OUTDIR=.\Release\pigment-0.3 INTDIR=.\Release\pigment-0.3 # Begin Custom Macros OutDir=.\Release\pigment-0.3 # End Custom Macros !IF "$(RECURSE)" == "0" ALL : "$(OUTDIR)\libpgmboilerplate.dll" !ELSE ALL : "libpigment - Win32 Release" "$(OUTDIR)\libpgmboilerplate.dll" !ENDIF !IF "$(RECURSE)" == "1" CLEAN :"libpigment - Win32 ReleaseCLEAN" !ELSE CLEAN : !ENDIF -@erase "$(INTDIR)\libpgmboilerplate.res" -@erase "$(INTDIR)\pgmbp.obj" -@erase "$(INTDIR)\pgmbpviewport.obj" -@erase "$(INTDIR)\vc60.idb" -@erase "$(OUTDIR)\libpgmboilerplate.dll" -@erase "$(OUTDIR)\libpgmboilerplate.exp" -@erase "$(OUTDIR)\libpgmboilerplate.lib" "$(OUTDIR)" : if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" CPP=cl.exe CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "..\common" /I "..\.." /I "C:\pigment-build\dev\include" /I "C:\pigment-build\dev\include\glib-2.0" /I "C:\pigment-build\dev\lib\glib-2.0\include" /I "C:\pigment-build\dev\include\gtk-2.0" /I "C:\pigment-build\dev\include\gstreamer-0.10" /I "C:\pigment-build\dev\include\libxml2" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBPGMBOILERPLATE_EXPORTS" /D "HAVE_CONFIG_H" /Fp"$(INTDIR)\libpgmboilerplate.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c .c{$(INTDIR)}.obj:: $(CPP) @<< $(CPP_PROJ) $< << .cpp{$(INTDIR)}.obj:: $(CPP) @<< $(CPP_PROJ) $< << .cxx{$(INTDIR)}.obj:: $(CPP) @<< $(CPP_PROJ) $< << .c{$(INTDIR)}.sbr:: $(CPP) @<< $(CPP_PROJ) $< << .cpp{$(INTDIR)}.sbr:: $(CPP) @<< $(CPP_PROJ) $< << .cxx{$(INTDIR)}.sbr:: $(CPP) @<< $(CPP_PROJ) $< << MTL=midl.exe MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 RSC=rc.exe RSC_PROJ=/l 0x409 /fo"$(INTDIR)\libpgmboilerplate.res" /d "NDEBUG" BSC32=bscmake.exe BSC32_FLAGS=/nologo /o"$(OUTDIR)\libpgmboilerplate.bsc" BSC32_SBRS= \ LINK32=link.exe LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libpigment-0.3.lib glib-2.0.lib gobject-2.0.lib libgstreamer-0.10.lib /nologo /dll /incremental:no /pdb:"$(OUTDIR)\libpgmboilerplate.pdb" /machine:I386 /def:"..\common\libpgmplugin.def" /out:"$(OUTDIR)\libpgmboilerplate.dll" /implib:"$(OUTDIR)\libpgmboilerplate.lib" /libpath:"Release" /libpath:"C:\pigment-build\dev\lib" DEF_FILE= \ "..\common\libpgmplugin.def" LINK32_OBJS= \ "$(INTDIR)\pgmbp.obj" \ "$(INTDIR)\pgmbpviewport.obj" \ "$(INTDIR)\libpgmboilerplate.res" \ ".\Release\libpigment-0.3.lib" "$(OUTDIR)\libpgmboilerplate.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) $(LINK32) @<< $(LINK32_FLAGS) $(LINK32_OBJS) << !ELSEIF "$(CFG)" == "libpgmboilerplate - Win32 Debug" OUTDIR=.\Debug\pigment-0.3 INTDIR=.\Debug\pigment-0.3 # Begin Custom Macros OutDir=.\Debug\pigment-0.3 # End Custom Macros !IF "$(RECURSE)" == "0" ALL : "$(OUTDIR)\libpgmboilerplate.dll" !ELSE ALL : "libpigment - Win32 Debug" "$(OUTDIR)\libpgmboilerplate.dll" !ENDIF !IF "$(RECURSE)" == "1" CLEAN :"libpigment - Win32 DebugCLEAN" !ELSE CLEAN : !ENDIF -@erase "$(INTDIR)\libpgmboilerplate.res" -@erase "$(INTDIR)\pgmbp.obj" -@erase "$(INTDIR)\pgmbpviewport.obj" -@erase "$(INTDIR)\vc60.idb" -@erase "$(INTDIR)\vc60.pdb" -@erase "$(OUTDIR)\libpgmboilerplate.dll" -@erase "$(OUTDIR)\libpgmboilerplate.exp" -@erase "$(OUTDIR)\libpgmboilerplate.ilk" -@erase "$(OUTDIR)\libpgmboilerplate.lib" -@erase "$(OUTDIR)\libpgmboilerplate.pdb" "$(OUTDIR)" : if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" CPP=cl.exe CPP_PROJ=/nologo /MD /W3 /Gm /GX /ZI /Od /I "..\common" /I "..\.." /I "C:\pigment-build\dev\include" /I "C:\pigment-build\dev\include\glib-2.0" /I "C:\pigment-build\dev\lib\glib-2.0\include" /I "C:\pigment-build\dev\include\gtk-2.0" /I "C:\pigment-build\dev\include\gstreamer-0.10" /I "C:\pigment-build\dev\include\libxml2" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBPGMBOILERPLATE_EXPORTS" /D "HAVE_CONFIG_H" /Fp"$(INTDIR)\libpgmboilerplate.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c .c{$(INTDIR)}.obj:: $(CPP) @<< $(CPP_PROJ) $< << .cpp{$(INTDIR)}.obj:: $(CPP) @<< $(CPP_PROJ) $< << .cxx{$(INTDIR)}.obj:: $(CPP) @<< $(CPP_PROJ) $< << .c{$(INTDIR)}.sbr:: $(CPP) @<< $(CPP_PROJ) $< << .cpp{$(INTDIR)}.sbr:: $(CPP) @<< $(CPP_PROJ) $< << .cxx{$(INTDIR)}.sbr:: $(CPP) @<< $(CPP_PROJ) $< << MTL=midl.exe MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 RSC=rc.exe RSC_PROJ=/l 0x409 /fo"$(INTDIR)\libpgmboilerplate.res" /d "_DEBUG" BSC32=bscmake.exe BSC32_FLAGS=/nologo /o"$(OUTDIR)\libpgmboilerplate.bsc" BSC32_SBRS= \ LINK32=link.exe LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libpigment-0.3.lib glib-2.0.lib gobject-2.0.lib libgstreamer-0.10.lib /nologo /dll /incremental:yes /pdb:"$(OUTDIR)\libpgmboilerplate.pdb" /debug /machine:I386 /def:"..\common\libpgmplugin.def" /out:"$(OUTDIR)\libpgmboilerplate.dll" /implib:"$(OUTDIR)\libpgmboilerplate.lib" /pdbtype:sept /libpath:"Debug" /libpath:"C:\pigment-build\dev\lib" DEF_FILE= \ "..\common\libpgmplugin.def" LINK32_OBJS= \ "$(INTDIR)\pgmbp.obj" \ "$(INTDIR)\pgmbpviewport.obj" \ "$(INTDIR)\libpgmboilerplate.res" \ ".\Debug\libpigment-0.3.lib" "$(OUTDIR)\libpgmboilerplate.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) $(LINK32) @<< $(LINK32_FLAGS) $(LINK32_OBJS) << !ENDIF !IF "$(NO_EXTERNAL_DEPS)" != "1" !IF EXISTS("libpgmboilerplate.dep") !INCLUDE "libpgmboilerplate.dep" !ELSE !MESSAGE Warning: cannot find "libpgmboilerplate.dep" !ENDIF !ENDIF !IF "$(CFG)" == "libpgmboilerplate - Win32 Release" || "$(CFG)" == "libpgmboilerplate - Win32 Debug" SOURCE=..\..\plugins\boilerplate\pgmbp.c "$(INTDIR)\pgmbp.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=..\..\plugins\boilerplate\pgmbpviewport.c "$(INTDIR)\pgmbpviewport.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=..\common\libpgmboilerplate.rc !IF "$(CFG)" == "libpgmboilerplate - Win32 Release" "$(INTDIR)\libpgmboilerplate.res" : $(SOURCE) "$(INTDIR)" $(RSC) /l 0x409 /fo"$(INTDIR)\libpgmboilerplate.res" /i "\pigment-build\pigment\win32\common" /d "NDEBUG" $(SOURCE) !ELSEIF "$(CFG)" == "libpgmboilerplate - Win32 Debug" "$(INTDIR)\libpgmboilerplate.res" : $(SOURCE) "$(INTDIR)" $(RSC) /l 0x409 /fo"$(INTDIR)\libpgmboilerplate.res" /i "\pigment-build\pigment\win32\common" /d "_DEBUG" $(SOURCE) !ENDIF !IF "$(CFG)" == "libpgmboilerplate - Win32 Release" "libpigment - Win32 Release" : cd "." $(MAKE) /$(MAKEFLAGS) /F ".\libpigment.mak" CFG="libpigment - Win32 Release" cd "." "libpigment - Win32 ReleaseCLEAN" : cd "." $(MAKE) /$(MAKEFLAGS) /F ".\libpigment.mak" CFG="libpigment - Win32 Release" RECURSE=1 CLEAN cd "." !ELSEIF "$(CFG)" == "libpgmboilerplate - Win32 Debug" "libpigment - Win32 Debug" : cd "." $(MAKE) /$(MAKEFLAGS) /F ".\libpigment.mak" CFG="libpigment - Win32 Debug" cd "." "libpigment - Win32 DebugCLEAN" : cd "." $(MAKE) /$(MAKEFLAGS) /F ".\libpigment.mak" CFG="libpigment - Win32 Debug" RECURSE=1 CLEAN cd "." !ENDIF !ENDIF pigment-0.3.17/win32/vs6/libpgmboilerplate.dsp0000644000175000017500000001262211205034420016045 00000000000000# Microsoft Developer Studio Project File - Name="libpgmboilerplate" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 CFG=libpgmboilerplate - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "libpgmboilerplate.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "libpgmboilerplate.mak" CFG="libpgmboilerplate - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "libpgmboilerplate - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "libpgmboilerplate - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe MTL=midl.exe RSC=rc.exe !IF "$(CFG)" == "libpgmboilerplate - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Release\pigment-0.3" # PROP Intermediate_Dir "Release\pigment-0.3" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBPGMBOILERPLATE_EXPORTS" /YX /FD /c # ADD CPP /nologo /MD /W3 /GX /O2 /I "..\common" /I "..\.." /I "C:\pigment-build\dev\include" /I "C:\pigment-build\dev\include\glib-2.0" /I "C:\pigment-build\dev\lib\glib-2.0\include" /I "C:\pigment-build\dev\include\gtk-2.0" /I "C:\pigment-build\dev\include\gstreamer-0.10" /I "C:\pigment-build\dev\include\libxml2" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBPGMBOILERPLATE_EXPORTS" /D "HAVE_CONFIG_H" /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x40c /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libpigment-0.3.lib glib-2.0.lib gobject-2.0.lib libgstreamer-0.10.lib /nologo /dll /machine:I386 /libpath:"Release" /libpath:"C:\pigment-build\dev\lib" !ELSEIF "$(CFG)" == "libpgmboilerplate - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Debug\pigment-0.3" # PROP Intermediate_Dir "Debug\pigment-0.3" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBPGMBOILERPLATE_EXPORTS" /YX /FD /GZ /c # ADD CPP /nologo /MD /W3 /Gm /GX /ZI /Od /I "..\common" /I "..\.." /I "C:\pigment-build\dev\include" /I "C:\pigment-build\dev\include\glib-2.0" /I "C:\pigment-build\dev\lib\glib-2.0\include" /I "C:\pigment-build\dev\include\gtk-2.0" /I "C:\pigment-build\dev\include\gstreamer-0.10" /I "C:\pigment-build\dev\include\libxml2" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBPGMBOILERPLATE_EXPORTS" /D "HAVE_CONFIG_H" /YX /FD /GZ /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x40c /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libpigment-0.3.lib glib-2.0.lib gobject-2.0.lib libgstreamer-0.10.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /libpath:"Debug" /libpath:"C:\pigment-build\dev\lib" !ENDIF # Begin Target # Name "libpgmboilerplate - Win32 Release" # Name "libpgmboilerplate - Win32 Debug" # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File SOURCE=..\common\libpgmplugin.def # End Source File # Begin Source File SOURCE=..\..\plugins\boilerplate\pgmbp.c # End Source File # Begin Source File SOURCE=..\..\plugins\boilerplate\pgmbpviewport.c # End Source File # End Group # Begin Group "Header Files" # PROP Default_Filter "h;hpp;hxx;hm;inl" # Begin Source File SOURCE=..\..\plugins\boilerplate\pgmbpviewport.h # End Source File # End Group # Begin Group "Resource Files" # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" # Begin Source File SOURCE=..\common\libpgmboilerplate.rc # End Source File # End Group # End Target # End Project pigment-0.3.17/win32/vs6/Makefile.in0000644000175000017500000003145011205034676013722 00000000000000# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = win32/vs6 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/as-compiler-flag.m4 \ $(top_srcdir)/common/m4/as-version.m4 \ $(top_srcdir)/common/m4/check.m4 \ $(top_srcdir)/common/m4/gst-args.m4 \ $(top_srcdir)/common/m4/gst-check.m4 \ $(top_srcdir)/common/m4/gst-error.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/libtool.m4 \ $(top_srcdir)/common/m4/ltoptions.m4 \ $(top_srcdir)/common/m4/ltsugar.m4 \ $(top_srcdir)/common/m4/ltversion.m4 \ $(top_srcdir)/common/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAIROXLIB_CFLAGS = @CAIROXLIB_CFLAGS@ CAIROXLIB_LIBS = @CAIROXLIB_LIBS@ CAIRO_CFLAGS = @CAIRO_CFLAGS@ CAIRO_LIBS = @CAIRO_LIBS@ CC = @CC@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXEEXT = @EXEEXT@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ GCOV = @GCOV@ GCOV_CFLAGS = @GCOV_CFLAGS@ GCOV_LIBS = @GCOV_LIBS@ GDKPIXBUFXLIB_CFLAGS = @GDKPIXBUFXLIB_CFLAGS@ GDKPIXBUFXLIB_LIBS = @GDKPIXBUFXLIB_LIBS@ GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@ GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ GST_0_10_13_CFLAGS = @GST_0_10_13_CFLAGS@ GST_0_10_13_LIBS = @GST_0_10_13_LIBS@ GST_10_10_CFLAGS = @GST_10_10_CFLAGS@ GST_10_10_LIBS = @GST_10_10_LIBS@ GST_10_11_CFLAGS = @GST_10_11_CFLAGS@ GST_10_11_LIBS = @GST_10_11_LIBS@ GST_10_12_CFLAGS = @GST_10_12_CFLAGS@ GST_10_12_LIBS = @GST_10_12_LIBS@ GST_10_13_CFLAGS = @GST_10_13_CFLAGS@ GST_10_13_LIBS = @GST_10_13_LIBS@ GST_10_14_CFLAGS = @GST_10_14_CFLAGS@ GST_10_14_LIBS = @GST_10_14_LIBS@ GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ GST_BASE_LIBS = @GST_BASE_LIBS@ GST_CFLAGS = @GST_CFLAGS@ GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ GST_CHECK_LIBS = @GST_CHECK_LIBS@ GST_LIBS = @GST_LIBS@ GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ GST_TOOLS_DIR = @GST_TOOLS_DIR@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_GTK_WIDGET = @HAVE_GTK_WIDGET@ HAVE_IMAGING_LIBRARY = @HAVE_IMAGING_LIBRARY@ HAVE_OPENGLES_PLUGIN = @HAVE_OPENGLES_PLUGIN@ HAVE_OPENGL_PLUGIN = @HAVE_OPENGL_PLUGIN@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGLADE_2_0_CFLAGS = @LIBGLADE_2_0_CFLAGS@ LIBGLADE_2_0_LIBS = @LIBGLADE_2_0_LIBS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENGLES_BACKEND = @OPENGLES_BACKEND@ OPENGL_BACKEND = @OPENGL_BACKEND@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ PANGOCAIRO_CFLAGS = @PANGOCAIRO_CFLAGS@ PANGOCAIRO_LIBS = @PANGOCAIRO_LIBS@ PANGO_1_16_CFLAGS = @PANGO_1_16_CFLAGS@ PANGO_1_16_LIBS = @PANGO_1_16_LIBS@ PANGO_CFLAGS = @PANGO_CFLAGS@ PANGO_LIBS = @PANGO_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL_PATH = @PERL_PATH@ PGM_ALL_CFLAGS = @PGM_ALL_CFLAGS@ PGM_ALL_LDFLAGS = @PGM_ALL_LDFLAGS@ PGM_ALL_LIBS = @PGM_ALL_LIBS@ PGM_GLES_CFLAGS = @PGM_GLES_CFLAGS@ PGM_GLES_LIBS = @PGM_GLES_LIBS@ PGM_GL_CFLAGS = @PGM_GL_CFLAGS@ PGM_GL_LIBS = @PGM_GL_LIBS@ PGM_GTKDOC_CFLAGS = @PGM_GTKDOC_CFLAGS@ PGM_LIB_LDFLAGS = @PGM_LIB_LDFLAGS@ PGM_LT_LDFLAGS = @PGM_LT_LDFLAGS@ PGM_LT_VERSION = @PGM_LT_VERSION@ PGM_MAJORMINOR = @PGM_MAJORMINOR@ PGM_OBJ_CFLAGS = @PGM_OBJ_CFLAGS@ PGM_OBJ_LIBS = @PGM_OBJ_LIBS@ PGM_OPTION_CFLAGS = @PGM_OPTION_CFLAGS@ PGM_PLUGIN_LDFLAGS = @PGM_PLUGIN_LDFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PLUGIN_PATH = @PLUGIN_PATH@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XCOMPOSITE_CFLAGS = @XCOMPOSITE_CFLAGS@ XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ XMKMF = @XMKMF@ XRENDER_CFLAGS = @XRENDER_CFLAGS@ XRENDER_LIBS = @XRENDER_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cairo_req = @cairo_req@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ glib_req = @glib_req@ gstreamer_plugins_base_req = @gstreamer_plugins_base_req@ gstreamer_req = @gstreamer_req@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pango_req = @pango_req@ pangocairo_req = @pangocairo_req@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = \ image.dsp \ libpgmboilerplate.dsp \ libpgmboilerplate.mak \ libpgmopengl.dsp \ libpgmopengl.mak \ libpigment.dsp \ libpigment.mak \ makefile.mak \ pigment.dsw all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu win32/vs6/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu win32/vs6/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pigment-0.3.17/win32/vs6/pigment.dsw0000644000175000017500000000307311205034420014022 00000000000000Microsoft Developer Studio Workspace File, Format Version 6.00 # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! ############################################################################### Project: "image"=".\image.dsp" - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ Begin Project Dependency Project_Dep_Name libpigment End Project Dependency Begin Project Dependency Project_Dep_Name libpgmopengl End Project Dependency }}} ############################################################################### Project: "libpgmboilerplate"=".\libpgmboilerplate.dsp" - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ Begin Project Dependency Project_Dep_Name libpigment End Project Dependency }}} ############################################################################### Project: "libpgmopengl"=".\libpgmopengl.dsp" - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ Begin Project Dependency Project_Dep_Name libpigment End Project Dependency }}} ############################################################################### Project: "libpigment"=".\libpigment.dsp" - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ Begin Project Dependency Project_Dep_Name glib End Project Dependency }}} ############################################################################### Global: Package=<5> {{{ }}} Package=<3> {{{ }}} ############################################################################### pigment-0.3.17/win32/vs6/image.dsp0000644000175000017500000001223311205034420013430 00000000000000# Microsoft Developer Studio Project File - Name="image" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Console Application" 0x0103 CFG=image - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "image.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "image.mak" CFG="image - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "image - Win32 Release" (based on "Win32 (x86) Console Application") !MESSAGE "image - Win32 Debug" (based on "Win32 (x86) Console Application") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe RSC=rc.exe !IF "$(CFG)" == "image - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Release" # PROP Intermediate_Dir "Release" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # ADD CPP /nologo /MD /W3 /GX /O2 /I "..\common" /I "..\.." /I "C:\pigment-build\dev\include" /I "C:\pigment-build\dev\include\glib-2.0" /I "C:\pigment-build\dev\lib\glib-2.0\include" /I "C:\pigment-build\dev\include\gtk-2.0" /I "C:\pigment-build\dev\include\gstreamer-0.10" /I "C:\pigment-build\dev\include\libxml2" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # ADD BASE RSC /l 0x40c /d "NDEBUG" # ADD RSC /l 0x40c /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libpigment-0.3.lib glib-2.0.lib gobject-2.0.lib libgstreamer-0.10.lib libgstvideo-0.10.lib gdk_pixbuf-2.0.lib /nologo /subsystem:console /machine:I386 /libpath:"Release" /libpath:"C:\pigment-build\dev\lib" !ELSEIF "$(CFG)" == "image - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "image___Win32_Debug" # PROP BASE Intermediate_Dir "image___Win32_Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Debug" # PROP Intermediate_Dir "Debug" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c # ADD CPP /nologo /MD /W3 /Gm /GX /ZI /Od /I "..\common" /I "..\.." /I "C:\pigment-build\dev\include" /I "C:\pigment-build\dev\include\glib-2.0" /I "C:\pigment-build\dev\lib\glib-2.0\include" /I "C:\pigment-build\dev\include\gtk-2.0" /I "C:\pigment-build\dev\include\gstreamer-0.10" /I "C:\pigment-build\dev\include\libxml2" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c # ADD BASE RSC /l 0x40c /d "_DEBUG" # ADD RSC /l 0x40c /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libpigment-0.3.lib glib-2.0.lib gobject-2.0.lib libgstreamer-0.10.lib libgstvideo-0.10.lib gdk_pixbuf-2.0.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"Debug" /libpath:"C:\pigment-build\dev\lib" !ENDIF # Begin Target # Name "image - Win32 Release" # Name "image - Win32 Debug" # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File SOURCE=..\..\examples\mappingmatrix.c # End Source File # End Group # Begin Group "Header Files" # PROP Default_Filter "h;hpp;hxx;hm;inl" # End Group # Begin Group "Resource Files" # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" # End Group # End Target # End Project pigment-0.3.17/win32/vs6/libpigment.mak0000644000175000017500000003623211205034420014467 00000000000000# Microsoft Developer Studio Generated NMAKE File, Based on libpigment.dsp !IF "$(CFG)" == "" CFG=libpigment - Win32 Debug !MESSAGE No configuration specified. Defaulting to libpigment - Win32 Debug. !ENDIF !IF "$(CFG)" != "libpigment - Win32 Release" && "$(CFG)" != "libpigment - Win32 Debug" !MESSAGE Invalid configuration "$(CFG)" specified. !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "libpigment.mak" CFG="libpigment - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "libpigment - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "libpigment - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE !ERROR An invalid configuration is specified. !ENDIF !IF "$(OS)" == "Windows_NT" NULL= !ELSE NULL=nul !ENDIF !IF "$(CFG)" == "libpigment - Win32 Release" OUTDIR=.\Release INTDIR=.\Release # Begin Custom Macros OutDir=.\Release # End Custom Macros !IF "$(RECURSE)" == "0" ALL : "C:\pigment-build\pigment\pgm\pgmmarshal.h" "C:\pigment-build\pigment\pgm\pgmmarshal.c" "C:\pigment-build\pigment\pgm\pgmenumtypes.h" "C:\pigment-build\pigment\pgm\pgmenumtypes.c" "$(OUTDIR)\libpigment-0.3.dll" !ELSE ALL : "C:\pigment-build\pigment\pgm\pgmmarshal.h" "C:\pigment-build\pigment\pgm\pgmmarshal.c" "C:\pigment-build\pigment\pgm\pgmenumtypes.h" "C:\pigment-build\pigment\pgm\pgmenumtypes.c" "$(OUTDIR)\libpigment-0.3.dll" !ENDIF !IF "$(RECURSE)" == "1" CLEAN : !ELSE CLEAN : !ENDIF -@erase "$(INTDIR)\libpigment.res" -@erase "$(INTDIR)\pgm.obj" -@erase "$(INTDIR)\pgmcanvas.obj" -@erase "$(INTDIR)\pgmdrawable.obj" -@erase "$(INTDIR)\pgmenumtypes.obj" -@erase "$(INTDIR)\pgmevents.obj" -@erase "$(INTDIR)\pgmimage.obj" -@erase "$(INTDIR)\pgmimagesink.obj" -@erase "$(INTDIR)\pgmlinearalgebra.obj" -@erase "$(INTDIR)\pgmmarshal.obj" -@erase "$(INTDIR)\pgmmodule.obj" -@erase "$(INTDIR)\pgmtext.obj" -@erase "$(INTDIR)\pgmviewport.obj" -@erase "$(INTDIR)\pgmviewportfactory.obj" -@erase "$(INTDIR)\vc60.idb" -@erase "$(OUTDIR)\libpigment-0.3.dll" -@erase "$(OUTDIR)\libpigment-0.3.exp" -@erase "$(OUTDIR)\libpigment-0.3.lib" -@erase "C:\pigment-build\pigment\pgm\pgmenumtypes.c" -@erase "C:\pigment-build\pigment\pgm\pgmenumtypes.h" -@erase "C:\pigment-build\pigment\pgm\pgmmarshal.c" -@erase "C:\pigment-build\pigment\pgm\pgmmarshal.h" "$(OUTDIR)" : if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" CPP=cl.exe CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "..\common" /I "C:\pigment-build\dev\include" /I "C:\pigment-build\dev\include\glib-2.0" /I "C:\pigment-build\dev\lib\glib-2.0\include" /I "C:\pigment-build\dev\include\gtk-2.0" /I "C:\pigment-build\dev\include\gstreamer-0.10" /I "C:\pigment-build\dev\include\libxml2" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBPIGMENT_EXPORTS" /D "HAVE_CONFIG_H" /Fp"$(INTDIR)\libpigment.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c .c{$(INTDIR)}.obj:: $(CPP) @<< $(CPP_PROJ) $< << .cpp{$(INTDIR)}.obj:: $(CPP) @<< $(CPP_PROJ) $< << .cxx{$(INTDIR)}.obj:: $(CPP) @<< $(CPP_PROJ) $< << .c{$(INTDIR)}.sbr:: $(CPP) @<< $(CPP_PROJ) $< << .cpp{$(INTDIR)}.sbr:: $(CPP) @<< $(CPP_PROJ) $< << .cxx{$(INTDIR)}.sbr:: $(CPP) @<< $(CPP_PROJ) $< << MTL=midl.exe MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 RSC=rc.exe RSC_PROJ=/l 0x409 /fo"$(INTDIR)\libpigment.res" /d "NDEBUG" BSC32=bscmake.exe BSC32_FLAGS=/nologo /o"$(OUTDIR)\libpigment.bsc" BSC32_SBRS= \ LINK32=link.exe LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glib-2.0.lib gobject-2.0.lib gmodule-2.0.lib libgstreamer-0.10.lib libgstvideo-0.10.lib gdk_pixbuf-2.0.lib /nologo /dll /incremental:no /pdb:"$(OUTDIR)\libpigment-0.3.pdb" /machine:I386 /def:"..\common\libpigment.def" /out:"$(OUTDIR)\libpigment-0.3.dll" /implib:"$(OUTDIR)\libpigment-0.3.lib" /libpath:"C:\pigment-build\dev\lib" DEF_FILE= \ "..\common\libpigment.def" LINK32_OBJS= \ "$(INTDIR)\pgm.obj" \ "$(INTDIR)\pgmcanvas.obj" \ "$(INTDIR)\pgmdrawable.obj" \ "$(INTDIR)\pgmenumtypes.obj" \ "$(INTDIR)\pgmevents.obj" \ "$(INTDIR)\pgmimage.obj" \ "$(INTDIR)\pgmimagesink.obj" \ "$(INTDIR)\pgmlinearalgebra.obj" \ "$(INTDIR)\pgmmarshal.obj" \ "$(INTDIR)\pgmmodule.obj" \ "$(INTDIR)\pgmtext.obj" \ "$(INTDIR)\pgmviewport.obj" \ "$(INTDIR)\pgmviewportfactory.obj" \ "$(INTDIR)\libpigment.res" "$(OUTDIR)\libpigment-0.3.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) $(LINK32) @<< $(LINK32_FLAGS) $(LINK32_OBJS) << !ELSEIF "$(CFG)" == "libpigment - Win32 Debug" OUTDIR=.\Debug INTDIR=.\Debug # Begin Custom Macros OutDir=.\Debug # End Custom Macros !IF "$(RECURSE)" == "0" ALL : "$(OUTDIR)\libpigment-0.3.dll" !ELSE ALL : "$(OUTDIR)\libpigment-0.3.dll" !ENDIF !IF "$(RECURSE)" == "1" CLEAN : !ELSE CLEAN : !ENDIF -@erase "$(INTDIR)\libpigment.res" -@erase "$(INTDIR)\pgm.obj" -@erase "$(INTDIR)\pgmcanvas.obj" -@erase "$(INTDIR)\pgmdrawable.obj" -@erase "$(INTDIR)\pgmenumtypes.obj" -@erase "$(INTDIR)\pgmevents.obj" -@erase "$(INTDIR)\pgmimage.obj" -@erase "$(INTDIR)\pgmimagesink.obj" -@erase "$(INTDIR)\pgmlinearalgebra.obj" -@erase "$(INTDIR)\pgmmarshal.obj" -@erase "$(INTDIR)\pgmmodule.obj" -@erase "$(INTDIR)\pgmtext.obj" -@erase "$(INTDIR)\pgmviewport.obj" -@erase "$(INTDIR)\pgmviewportfactory.obj" -@erase "$(INTDIR)\vc60.idb" -@erase "$(INTDIR)\vc60.pdb" -@erase "$(OUTDIR)\libpigment-0.3.dll" -@erase "$(OUTDIR)\libpigment-0.3.exp" -@erase "$(OUTDIR)\libpigment-0.3.ilk" -@erase "$(OUTDIR)\libpigment-0.3.lib" -@erase "$(OUTDIR)\libpigment-0.3.pdb" "$(OUTDIR)" : if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" CPP=cl.exe CPP_PROJ=/nologo /MD /W3 /Gm /GX /ZI /Od /I "..\common" /I "C:\pigment-build\dev\include" /I "C:\pigment-build\dev\include\glib-2.0" /I "C:\pigment-build\dev\lib\glib-2.0\include" /I "C:\pigment-build\dev\include\gtk-2.0" /I "C:\pigment-build\dev\include\gstreamer-0.10" /I "C:\pigment-build\dev\include\libxml2" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBPIGMENT_EXPORTS" /D "HAVE_CONFIG_H" /Fp"$(INTDIR)\libpigment.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c .c{$(INTDIR)}.obj:: $(CPP) @<< $(CPP_PROJ) $< << .cpp{$(INTDIR)}.obj:: $(CPP) @<< $(CPP_PROJ) $< << .cxx{$(INTDIR)}.obj:: $(CPP) @<< $(CPP_PROJ) $< << .c{$(INTDIR)}.sbr:: $(CPP) @<< $(CPP_PROJ) $< << .cpp{$(INTDIR)}.sbr:: $(CPP) @<< $(CPP_PROJ) $< << .cxx{$(INTDIR)}.sbr:: $(CPP) @<< $(CPP_PROJ) $< << MTL=midl.exe MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 RSC=rc.exe RSC_PROJ=/l 0x409 /fo"$(INTDIR)\libpigment.res" /d "_DEBUG" BSC32=bscmake.exe BSC32_FLAGS=/nologo /o"$(OUTDIR)\libpigment.bsc" BSC32_SBRS= \ LINK32=link.exe LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glib-2.0.lib gobject-2.0.lib gmodule-2.0.lib libgstreamer-0.10.lib libgstvideo-0.10.lib gdk_pixbuf-2.0.lib /nologo /dll /incremental:yes /pdb:"$(OUTDIR)\libpigment-0.3.pdb" /debug /machine:I386 /def:"..\common\libpigment.def" /out:"$(OUTDIR)\libpigment-0.3.dll" /implib:"$(OUTDIR)\libpigment-0.3.lib" /pdbtype:sept /libpath:"C:\pigment-build\dev\lib" DEF_FILE= \ "..\common\libpigment.def" LINK32_OBJS= \ "$(INTDIR)\pgm.obj" \ "$(INTDIR)\pgmcanvas.obj" \ "$(INTDIR)\pgmdrawable.obj" \ "$(INTDIR)\pgmenumtypes.obj" \ "$(INTDIR)\pgmevents.obj" \ "$(INTDIR)\pgmimage.obj" \ "$(INTDIR)\pgmimagesink.obj" \ "$(INTDIR)\pgmlinearalgebra.obj" \ "$(INTDIR)\pgmmarshal.obj" \ "$(INTDIR)\pgmmodule.obj" \ "$(INTDIR)\pgmtext.obj" \ "$(INTDIR)\pgmviewport.obj" \ "$(INTDIR)\pgmviewportfactory.obj" \ "$(INTDIR)\libpigment.res" "$(OUTDIR)\libpigment-0.3.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) $(LINK32) @<< $(LINK32_FLAGS) $(LINK32_OBJS) << !ENDIF !IF "$(NO_EXTERNAL_DEPS)" != "1" !IF EXISTS("libpigment.dep") !INCLUDE "libpigment.dep" !ELSE !MESSAGE Warning: cannot find "libpigment.dep" !ENDIF !ENDIF !IF "$(CFG)" == "libpigment - Win32 Release" || "$(CFG)" == "libpigment - Win32 Debug" SOURCE=..\..\pgm\pgm.c "$(INTDIR)\pgm.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=..\..\pgm\pgmcanvas.c "$(INTDIR)\pgmcanvas.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=..\..\pgm\pgmdrawable.c "$(INTDIR)\pgmdrawable.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=..\..\pgm\pgmenumtypes.c "$(INTDIR)\pgmenumtypes.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=..\..\pgm\pgmevents.c "$(INTDIR)\pgmevents.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=..\..\pgm\pgmimage.c "$(INTDIR)\pgmimage.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=..\..\pgm\pgmimagesink.c "$(INTDIR)\pgmimagesink.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=..\..\pgm\pgmlinearalgebra.c "$(INTDIR)\pgmlinearalgebra.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=..\..\pgm\pgmmarshal.c "$(INTDIR)\pgmmarshal.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=..\..\pgm\pgmmarshal.list !IF "$(CFG)" == "libpigment - Win32 Release" InputPath=..\..\pgm\pgmmarshal.list "..\..\pgm\pgmmarshal.h" "..\..\pgm\pgmmarshal.c" "..\..\pgm\pgmenumtypes.h" "..\..\pgm\pgmenumtypes.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" < ..\..\pgm\pgmmarshal.h c:\pigment-build\dev\bin\glib-genmarshal --prefix=pgm_marshal ..\..\pgm\pgmmarshal.list --body --header > ..\..\pgm\pgmmarshal.c echo Generating GObject enum description code... C:\pigment-build\dev\perl54\bin\perl ../common/glib-mkenums --fhead "#ifndef __PGM_ENUM_TYPES_H__\n" --fhead "#define __PGM_ENUM_TYPES_H__\n\n" --fhead "G_BEGIN_DECLS\n\n" --ftail "G_END_DECLS\n\n" --ftail "#endif\n" --fprod "/* --- @filename@ --- */\n" --eprod "#define PGM_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n" --eprod "GType @enum_name@_get_type (void);\n\n" "../../pgm/pgm.h" "../../pgm/pgmcanvas.h" "../../pgm/pgmcommon.h" "../../pgm/pgmdrawable.h" "../../pgm/pgmevents.h" "../../pgm/pgmimage.h" "../../pgm/pgmplugin.h" "../../pgm/pgmtext.h" "../../pgm/pgmviewport.h" "../../pgm/pgmviewportfactory.h" "../../pgm/pgmlinearalgebra.h" "../../pgm/pgmkeysyms.h" > ../../pgm\pgmenumtypes.h C:\pigment-build\dev\perl54\bin\perl ../common/glib-mkenums --fhead "#include \n" --fhead "#include \"pgmenumtypes.h\"\n" --fprod "\n/* enumerations from \"@filename@\" */" --fprod "\n#include \"@filename@\"" --vhead "static const G@Type@Value _@enum_name@_values[] = {" --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," --vtail " { 0, NULL, NULL }\n};\n\n" --vtail "GType\n@enum_name@_get_type (void)\n{\n" --vtail " static GType type = 0;\n\n" --vtail " if (!type)\n" --vtail " type = g_@type@_register_static (\"@EnumName@\", _@enum_name@_values);\n\n" --vtail " return type;\n}\n\n" "../../pgm/pgm.h" "../../pgm/pgmcanvas.h" "../../pgm/pgmcommon.h" "../../pgm/pgmdrawable.h" "../../pgm/pgmevents.h" "../../pgm/pgmimage.h" "../../pgm/pgmplugin.h" "../../pgm/pgmtext.h" "../../pgm/pgmviewport.h" "../../pgm/pgmviewportfactory.h" "../../pgm/pgmlinearalgebra.h" "../../pgm/pgmkeysyms.h" > ../../pgm\pgmenumtypes.c << !ELSEIF "$(CFG)" == "libpigment - Win32 Debug" InputPath=..\..\pgm\pgmmarshal.list "..\..\pgm\pgmmarshal.h" "..\..\pgm\pgmmarshal.c" "..\..\pgm\pgmenumtypes.h" "..\..\pgm\pgmenumtypes.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" < ..\..\pgm\pgmmarshal.h c:\pigment-build\dev\bin\glib-genmarshal --prefix=pgm_marshal ..\..\pgm\pgmmarshal.list --body --header > ..\..\pgm\pgmmarshal.c echo Generating GObject enum description code... C:\pigment-build\dev\perl54\bin\perl ../common/glib-mkenums --fhead "#ifndef __PGM_ENUM_TYPES_H__\n" --fhead "#define __PGM_ENUM_TYPES_H__\n\n" --fhead "G_BEGIN_DECLS\n\n" --ftail "G_END_DECLS\n\n" --ftail "#endif\n" --fprod "/* --- @filename@ --- */\n" --eprod "#define PGM_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n" --eprod "GType @enum_name@_get_type (void);\n\n" "../../pgm/pgm.h" "../../pgm/pgmcanvas.h" "../../pgm/pgmcommon.h" "../../pgm/pgmdrawable.h" "../../pgm/pgmevents.h" "../../pgm/pgmimage.h" "../../pgm/pgmplugin.h" "../../pgm/pgmtext.h" "../../pgm/pgmviewport.h" "../../pgm/pgmviewportfactory.h" "../../pgm/pgmlinearalgebra.h" "../../pgm/pgmkeysyms.h" > ../../pgm\pgmenumtypes.h C:\pigment-build\dev\perl54\bin\perl ../common/glib-mkenums --fhead "#include \n" --fhead "#include \"pgmenumtypes.h\"\n" --fprod "\n/* enumerations from \"@filename@\" */" --fprod "\n#include \"@filename@\"" --vhead "static const G@Type@Value _@enum_name@_values[] = {" --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," --vtail " { 0, NULL, NULL }\n};\n\n" --vtail "GType\n@enum_name@_get_type (void)\n{\n" --vtail " static GType type = 0;\n\n" --vtail " if (!type)\n" --vtail " type = g_@type@_register_static (\"@EnumName@\", _@enum_name@_values);\n\n" --vtail " return type;\n}\n\n" "../../pgm/pgm.h" "../../pgm/pgmcanvas.h" "../../pgm/pgmcommon.h" "../../pgm/pgmdrawable.h" "../../pgm/pgmevents.h" "../../pgm/pgmimage.h" "../../pgm/pgmplugin.h" "../../pgm/pgmtext.h" "../../pgm/pgmviewport.h" "../../pgm/pgmviewportfactory.h" "../../pgm/pgmlinearalgebra.h" "../../pgm/pgmkeysyms.h" > ../../pgm\pgmenumtypes.c << !ENDIF SOURCE=..\..\pgm\pgmmodule.c "$(INTDIR)\pgmmodule.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=..\..\pgm\pgmtext.c "$(INTDIR)\pgmtext.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=..\..\pgm\pgmviewport.c "$(INTDIR)\pgmviewport.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=..\..\pgm\pgmviewportfactory.c "$(INTDIR)\pgmviewportfactory.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=..\common\libpigment.rc !IF "$(CFG)" == "libpigment - Win32 Release" "$(INTDIR)\libpigment.res" : $(SOURCE) "$(INTDIR)" $(RSC) /l 0x409 /fo"$(INTDIR)\libpigment.res" /i "\pigment-build\pigment\win32\common" /d "NDEBUG" $(SOURCE) !ELSEIF "$(CFG)" == "libpigment - Win32 Debug" "$(INTDIR)\libpigment.res" : $(SOURCE) "$(INTDIR)" $(RSC) /l 0x40c /fo"$(INTDIR)\libpigment.res" /i "\pigment-build\pigment\win32\common" /i "..\common" /d "_DEBUG" $(SOURCE) !ENDIF !IF "$(CFG)" == "libpigment - Win32 Release" !ELSEIF "$(CFG)" == "libpigment - Win32 Debug" !ENDIF !ENDIF pigment-0.3.17/win32/vs9/0000777000175000017500000000000011205035141011725 500000000000000pigment-0.3.17/win32/vs9/example-sphere.vcproj0000644000175000017500000001105411205034417016013 00000000000000 pigment-0.3.17/win32/vs9/pigment.sln0000644000175000017500000002262211205034417014033 00000000000000Microsoft Visual Studio Solution File, Format Version 10.00 # Visual Studio 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpigment-0.3", "libpigment-0.3.vcproj", "{9CFD6F9C-444B-4427-8249-8DB54A4BEBDA}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpigmentimaging-0.3", "libpigmentimaging-0.3.vcproj", "{4364148F-60AF-42A1-9B61-7C2F50F38E19}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpgmboilerplate", "libpgmboilerplate.vcproj", "{DE2D22CC-0DC2-4853-B0F1-34B4318B6B94}" ProjectSection(ProjectDependencies) = postProject {9CFD6F9C-444B-4427-8249-8DB54A4BEBDA} = {9CFD6F9C-444B-4427-8249-8DB54A4BEBDA} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpgmopengl", "libpgmopengl.vcproj", "{AD461B35-1553-4331-89FA-11F4B645AE17}" ProjectSection(ProjectDependencies) = postProject {9CFD6F9C-444B-4427-8249-8DB54A4BEBDA} = {9CFD6F9C-444B-4427-8249-8DB54A4BEBDA} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example-dragndrop", "example-dragndrop.vcproj", "{5557EC65-664E-4CD9-9CB8-DB852FE03A70}" ProjectSection(ProjectDependencies) = postProject {AD461B35-1553-4331-89FA-11F4B645AE17} = {AD461B35-1553-4331-89FA-11F4B645AE17} {9CFD6F9C-444B-4427-8249-8DB54A4BEBDA} = {9CFD6F9C-444B-4427-8249-8DB54A4BEBDA} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example-image", "example-image.vcproj", "{96B711AD-0CA0-483C-A8C4-E6AFAB52D599}" ProjectSection(ProjectDependencies) = postProject {AD461B35-1553-4331-89FA-11F4B645AE17} = {AD461B35-1553-4331-89FA-11F4B645AE17} {9CFD6F9C-444B-4427-8249-8DB54A4BEBDA} = {9CFD6F9C-444B-4427-8249-8DB54A4BEBDA} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example-imaging", "example-imaging.vcproj", "{C07545EE-8688-4551-9701-8D657AB5AE35}" ProjectSection(ProjectDependencies) = postProject {4364148F-60AF-42A1-9B61-7C2F50F38E19} = {4364148F-60AF-42A1-9B61-7C2F50F38E19} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example-mappingmatrix", "example-mappingmatrix.vcproj", "{EE648D69-D51D-4B52-901B-A36BEBB5B553}" ProjectSection(ProjectDependencies) = postProject {AD461B35-1553-4331-89FA-11F4B645AE17} = {AD461B35-1553-4331-89FA-11F4B645AE17} {9CFD6F9C-444B-4427-8249-8DB54A4BEBDA} = {9CFD6F9C-444B-4427-8249-8DB54A4BEBDA} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example-rotations", "example-rotations.vcproj", "{7FEA6B70-DC8F-4EC5-9491-C388EA90E822}" ProjectSection(ProjectDependencies) = postProject {AD461B35-1553-4331-89FA-11F4B645AE17} = {AD461B35-1553-4331-89FA-11F4B645AE17} {9CFD6F9C-444B-4427-8249-8DB54A4BEBDA} = {9CFD6F9C-444B-4427-8249-8DB54A4BEBDA} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example-sphere", "example-sphere.vcproj", "{1AE9AC78-D8F9-4F54-93A4-D01B1F3403AF}" ProjectSection(ProjectDependencies) = postProject {AD461B35-1553-4331-89FA-11F4B645AE17} = {AD461B35-1553-4331-89FA-11F4B645AE17} {9CFD6F9C-444B-4427-8249-8DB54A4BEBDA} = {9CFD6F9C-444B-4427-8249-8DB54A4BEBDA} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example-text", "example-text.vcproj", "{5D0C11F3-87A4-410C-B9E6-DD1262EE66F8}" ProjectSection(ProjectDependencies) = postProject {AD461B35-1553-4331-89FA-11F4B645AE17} = {AD461B35-1553-4331-89FA-11F4B645AE17} {9CFD6F9C-444B-4427-8249-8DB54A4BEBDA} = {9CFD6F9C-444B-4427-8249-8DB54A4BEBDA} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example-video", "example-video.vcproj", "{47C3FF49-FB56-49B5-9158-38932B669E3B}" ProjectSection(ProjectDependencies) = postProject {AD461B35-1553-4331-89FA-11F4B645AE17} = {AD461B35-1553-4331-89FA-11F4B645AE17} {9CFD6F9C-444B-4427-8249-8DB54A4BEBDA} = {9CFD6F9C-444B-4427-8249-8DB54A4BEBDA} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example-viewportopacity", "example-viewportopacity.vcproj", "{1E2168EC-02EA-4F50-B583-C9FCD46FE9C8}" ProjectSection(ProjectDependencies) = postProject {AD461B35-1553-4331-89FA-11F4B645AE17} = {AD461B35-1553-4331-89FA-11F4B645AE17} {9CFD6F9C-444B-4427-8249-8DB54A4BEBDA} = {9CFD6F9C-444B-4427-8249-8DB54A4BEBDA} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example-viewportprojection", "example-viewportprojection.vcproj", "{0189B227-DCC0-4DA2-9700-3F3C880A85EE}" ProjectSection(ProjectDependencies) = postProject {AD461B35-1553-4331-89FA-11F4B645AE17} = {AD461B35-1553-4331-89FA-11F4B645AE17} {9CFD6F9C-444B-4427-8249-8DB54A4BEBDA} = {9CFD6F9C-444B-4427-8249-8DB54A4BEBDA} EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {9CFD6F9C-444B-4427-8249-8DB54A4BEBDA}.Debug|Win32.ActiveCfg = Debug|Win32 {9CFD6F9C-444B-4427-8249-8DB54A4BEBDA}.Debug|Win32.Build.0 = Debug|Win32 {9CFD6F9C-444B-4427-8249-8DB54A4BEBDA}.Release|Win32.ActiveCfg = Release|Win32 {9CFD6F9C-444B-4427-8249-8DB54A4BEBDA}.Release|Win32.Build.0 = Release|Win32 {4364148F-60AF-42A1-9B61-7C2F50F38E19}.Debug|Win32.ActiveCfg = Debug|Win32 {4364148F-60AF-42A1-9B61-7C2F50F38E19}.Debug|Win32.Build.0 = Debug|Win32 {4364148F-60AF-42A1-9B61-7C2F50F38E19}.Release|Win32.ActiveCfg = Release|Win32 {4364148F-60AF-42A1-9B61-7C2F50F38E19}.Release|Win32.Build.0 = Release|Win32 {DE2D22CC-0DC2-4853-B0F1-34B4318B6B94}.Debug|Win32.ActiveCfg = Debug|Win32 {DE2D22CC-0DC2-4853-B0F1-34B4318B6B94}.Debug|Win32.Build.0 = Debug|Win32 {DE2D22CC-0DC2-4853-B0F1-34B4318B6B94}.Release|Win32.ActiveCfg = Release|Win32 {DE2D22CC-0DC2-4853-B0F1-34B4318B6B94}.Release|Win32.Build.0 = Release|Win32 {AD461B35-1553-4331-89FA-11F4B645AE17}.Debug|Win32.ActiveCfg = Debug|Win32 {AD461B35-1553-4331-89FA-11F4B645AE17}.Debug|Win32.Build.0 = Debug|Win32 {AD461B35-1553-4331-89FA-11F4B645AE17}.Release|Win32.ActiveCfg = Release|Win32 {AD461B35-1553-4331-89FA-11F4B645AE17}.Release|Win32.Build.0 = Release|Win32 {5557EC65-664E-4CD9-9CB8-DB852FE03A70}.Debug|Win32.ActiveCfg = Debug|Win32 {5557EC65-664E-4CD9-9CB8-DB852FE03A70}.Debug|Win32.Build.0 = Debug|Win32 {5557EC65-664E-4CD9-9CB8-DB852FE03A70}.Release|Win32.ActiveCfg = Release|Win32 {5557EC65-664E-4CD9-9CB8-DB852FE03A70}.Release|Win32.Build.0 = Release|Win32 {96B711AD-0CA0-483C-A8C4-E6AFAB52D599}.Debug|Win32.ActiveCfg = Debug|Win32 {96B711AD-0CA0-483C-A8C4-E6AFAB52D599}.Debug|Win32.Build.0 = Debug|Win32 {96B711AD-0CA0-483C-A8C4-E6AFAB52D599}.Release|Win32.ActiveCfg = Release|Win32 {96B711AD-0CA0-483C-A8C4-E6AFAB52D599}.Release|Win32.Build.0 = Release|Win32 {C07545EE-8688-4551-9701-8D657AB5AE35}.Debug|Win32.ActiveCfg = Debug|Win32 {C07545EE-8688-4551-9701-8D657AB5AE35}.Debug|Win32.Build.0 = Debug|Win32 {C07545EE-8688-4551-9701-8D657AB5AE35}.Release|Win32.ActiveCfg = Release|Win32 {C07545EE-8688-4551-9701-8D657AB5AE35}.Release|Win32.Build.0 = Release|Win32 {EE648D69-D51D-4B52-901B-A36BEBB5B553}.Debug|Win32.ActiveCfg = Debug|Win32 {EE648D69-D51D-4B52-901B-A36BEBB5B553}.Debug|Win32.Build.0 = Debug|Win32 {EE648D69-D51D-4B52-901B-A36BEBB5B553}.Release|Win32.ActiveCfg = Release|Win32 {EE648D69-D51D-4B52-901B-A36BEBB5B553}.Release|Win32.Build.0 = Release|Win32 {7FEA6B70-DC8F-4EC5-9491-C388EA90E822}.Debug|Win32.ActiveCfg = Debug|Win32 {7FEA6B70-DC8F-4EC5-9491-C388EA90E822}.Debug|Win32.Build.0 = Debug|Win32 {7FEA6B70-DC8F-4EC5-9491-C388EA90E822}.Release|Win32.ActiveCfg = Release|Win32 {7FEA6B70-DC8F-4EC5-9491-C388EA90E822}.Release|Win32.Build.0 = Release|Win32 {1AE9AC78-D8F9-4F54-93A4-D01B1F3403AF}.Debug|Win32.ActiveCfg = Debug|Win32 {1AE9AC78-D8F9-4F54-93A4-D01B1F3403AF}.Debug|Win32.Build.0 = Debug|Win32 {1AE9AC78-D8F9-4F54-93A4-D01B1F3403AF}.Release|Win32.ActiveCfg = Release|Win32 {1AE9AC78-D8F9-4F54-93A4-D01B1F3403AF}.Release|Win32.Build.0 = Release|Win32 {5D0C11F3-87A4-410C-B9E6-DD1262EE66F8}.Debug|Win32.ActiveCfg = Debug|Win32 {5D0C11F3-87A4-410C-B9E6-DD1262EE66F8}.Debug|Win32.Build.0 = Debug|Win32 {5D0C11F3-87A4-410C-B9E6-DD1262EE66F8}.Release|Win32.ActiveCfg = Release|Win32 {5D0C11F3-87A4-410C-B9E6-DD1262EE66F8}.Release|Win32.Build.0 = Release|Win32 {47C3FF49-FB56-49B5-9158-38932B669E3B}.Debug|Win32.ActiveCfg = Debug|Win32 {47C3FF49-FB56-49B5-9158-38932B669E3B}.Debug|Win32.Build.0 = Debug|Win32 {47C3FF49-FB56-49B5-9158-38932B669E3B}.Release|Win32.ActiveCfg = Release|Win32 {47C3FF49-FB56-49B5-9158-38932B669E3B}.Release|Win32.Build.0 = Release|Win32 {1E2168EC-02EA-4F50-B583-C9FCD46FE9C8}.Debug|Win32.ActiveCfg = Debug|Win32 {1E2168EC-02EA-4F50-B583-C9FCD46FE9C8}.Debug|Win32.Build.0 = Debug|Win32 {1E2168EC-02EA-4F50-B583-C9FCD46FE9C8}.Release|Win32.ActiveCfg = Release|Win32 {1E2168EC-02EA-4F50-B583-C9FCD46FE9C8}.Release|Win32.Build.0 = Release|Win32 {0189B227-DCC0-4DA2-9700-3F3C880A85EE}.Debug|Win32.ActiveCfg = Debug|Win32 {0189B227-DCC0-4DA2-9700-3F3C880A85EE}.Debug|Win32.Build.0 = Debug|Win32 {0189B227-DCC0-4DA2-9700-3F3C880A85EE}.Release|Win32.ActiveCfg = Release|Win32 {0189B227-DCC0-4DA2-9700-3F3C880A85EE}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal pigment-0.3.17/win32/vs9/libpigmentimaging-0.3.vcproj0000644000175000017500000001347311205034417017067 00000000000000 pigment-0.3.17/win32/vs9/Makefile.am0000644000175000017500000000064111205034417013703 00000000000000EXTRA_DIST = \ example-dragndrop.vcproj \ example-image.vcproj \ example-imaging.vcproj \ example-mappingmatrix.vcproj \ example-rotations.vcproj \ example-sphere.vcproj \ example-text.vcproj \ example-video.vcproj \ example-viewportopacity.vcproj \ example-viewportprojection.vcproj \ libpgmboilerplate.vcproj \ libpgmopengl.vcproj \ libpigment-0.3.vcproj \ libpigmentimaging-0.3.vcproj \ pigment.sln pigment-0.3.17/win32/vs9/example-rotations.vcproj0000644000175000017500000001070311205034417016547 00000000000000 pigment-0.3.17/win32/vs9/example-video.vcproj0000644000175000017500000001066711205034417015644 00000000000000 pigment-0.3.17/win32/vs9/example-mappingmatrix.vcproj0000644000175000017500000001071711205034417017412 00000000000000 pigment-0.3.17/win32/vs9/libpgmboilerplate.vcproj0000644000175000017500000001425711205034417016601 00000000000000 pigment-0.3.17/win32/vs9/example-image.vcproj0000644000175000017500000001066711205034417015620 00000000000000 pigment-0.3.17/win32/vs9/example-imaging.vcproj0000644000175000017500000001116411205034417016142 00000000000000 pigment-0.3.17/win32/vs9/Makefile.in0000644000175000017500000003202211205034676013721 00000000000000# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = win32/vs9 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/as-compiler-flag.m4 \ $(top_srcdir)/common/m4/as-version.m4 \ $(top_srcdir)/common/m4/check.m4 \ $(top_srcdir)/common/m4/gst-args.m4 \ $(top_srcdir)/common/m4/gst-check.m4 \ $(top_srcdir)/common/m4/gst-error.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/libtool.m4 \ $(top_srcdir)/common/m4/ltoptions.m4 \ $(top_srcdir)/common/m4/ltsugar.m4 \ $(top_srcdir)/common/m4/ltversion.m4 \ $(top_srcdir)/common/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAIROXLIB_CFLAGS = @CAIROXLIB_CFLAGS@ CAIROXLIB_LIBS = @CAIROXLIB_LIBS@ CAIRO_CFLAGS = @CAIRO_CFLAGS@ CAIRO_LIBS = @CAIRO_LIBS@ CC = @CC@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXEEXT = @EXEEXT@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ GCOV = @GCOV@ GCOV_CFLAGS = @GCOV_CFLAGS@ GCOV_LIBS = @GCOV_LIBS@ GDKPIXBUFXLIB_CFLAGS = @GDKPIXBUFXLIB_CFLAGS@ GDKPIXBUFXLIB_LIBS = @GDKPIXBUFXLIB_LIBS@ GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@ GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ GST_0_10_13_CFLAGS = @GST_0_10_13_CFLAGS@ GST_0_10_13_LIBS = @GST_0_10_13_LIBS@ GST_10_10_CFLAGS = @GST_10_10_CFLAGS@ GST_10_10_LIBS = @GST_10_10_LIBS@ GST_10_11_CFLAGS = @GST_10_11_CFLAGS@ GST_10_11_LIBS = @GST_10_11_LIBS@ GST_10_12_CFLAGS = @GST_10_12_CFLAGS@ GST_10_12_LIBS = @GST_10_12_LIBS@ GST_10_13_CFLAGS = @GST_10_13_CFLAGS@ GST_10_13_LIBS = @GST_10_13_LIBS@ GST_10_14_CFLAGS = @GST_10_14_CFLAGS@ GST_10_14_LIBS = @GST_10_14_LIBS@ GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ GST_BASE_LIBS = @GST_BASE_LIBS@ GST_CFLAGS = @GST_CFLAGS@ GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ GST_CHECK_LIBS = @GST_CHECK_LIBS@ GST_LIBS = @GST_LIBS@ GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ GST_TOOLS_DIR = @GST_TOOLS_DIR@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_GTK_WIDGET = @HAVE_GTK_WIDGET@ HAVE_IMAGING_LIBRARY = @HAVE_IMAGING_LIBRARY@ HAVE_OPENGLES_PLUGIN = @HAVE_OPENGLES_PLUGIN@ HAVE_OPENGL_PLUGIN = @HAVE_OPENGL_PLUGIN@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGLADE_2_0_CFLAGS = @LIBGLADE_2_0_CFLAGS@ LIBGLADE_2_0_LIBS = @LIBGLADE_2_0_LIBS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENGLES_BACKEND = @OPENGLES_BACKEND@ OPENGL_BACKEND = @OPENGL_BACKEND@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ PANGOCAIRO_CFLAGS = @PANGOCAIRO_CFLAGS@ PANGOCAIRO_LIBS = @PANGOCAIRO_LIBS@ PANGO_1_16_CFLAGS = @PANGO_1_16_CFLAGS@ PANGO_1_16_LIBS = @PANGO_1_16_LIBS@ PANGO_CFLAGS = @PANGO_CFLAGS@ PANGO_LIBS = @PANGO_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL_PATH = @PERL_PATH@ PGM_ALL_CFLAGS = @PGM_ALL_CFLAGS@ PGM_ALL_LDFLAGS = @PGM_ALL_LDFLAGS@ PGM_ALL_LIBS = @PGM_ALL_LIBS@ PGM_GLES_CFLAGS = @PGM_GLES_CFLAGS@ PGM_GLES_LIBS = @PGM_GLES_LIBS@ PGM_GL_CFLAGS = @PGM_GL_CFLAGS@ PGM_GL_LIBS = @PGM_GL_LIBS@ PGM_GTKDOC_CFLAGS = @PGM_GTKDOC_CFLAGS@ PGM_LIB_LDFLAGS = @PGM_LIB_LDFLAGS@ PGM_LT_LDFLAGS = @PGM_LT_LDFLAGS@ PGM_LT_VERSION = @PGM_LT_VERSION@ PGM_MAJORMINOR = @PGM_MAJORMINOR@ PGM_OBJ_CFLAGS = @PGM_OBJ_CFLAGS@ PGM_OBJ_LIBS = @PGM_OBJ_LIBS@ PGM_OPTION_CFLAGS = @PGM_OPTION_CFLAGS@ PGM_PLUGIN_LDFLAGS = @PGM_PLUGIN_LDFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PLUGIN_PATH = @PLUGIN_PATH@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XCOMPOSITE_CFLAGS = @XCOMPOSITE_CFLAGS@ XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ XMKMF = @XMKMF@ XRENDER_CFLAGS = @XRENDER_CFLAGS@ XRENDER_LIBS = @XRENDER_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cairo_req = @cairo_req@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ glib_req = @glib_req@ gstreamer_plugins_base_req = @gstreamer_plugins_base_req@ gstreamer_req = @gstreamer_req@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pango_req = @pango_req@ pangocairo_req = @pangocairo_req@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = \ example-dragndrop.vcproj \ example-image.vcproj \ example-imaging.vcproj \ example-mappingmatrix.vcproj \ example-rotations.vcproj \ example-sphere.vcproj \ example-text.vcproj \ example-video.vcproj \ example-viewportopacity.vcproj \ example-viewportprojection.vcproj \ libpgmboilerplate.vcproj \ libpgmopengl.vcproj \ libpigment-0.3.vcproj \ libpigmentimaging-0.3.vcproj \ pigment.sln all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu win32/vs9/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu win32/vs9/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pigment-0.3.17/win32/vs9/libpgmopengl.vcproj0000644000175000017500000001776611205034417015573 00000000000000 pigment-0.3.17/win32/vs9/example-viewportopacity.vcproj0000644000175000017500000001072511205034417020001 00000000000000 pigment-0.3.17/win32/vs9/example-text.vcproj0000644000175000017500000001066411205034417015517 00000000000000 pigment-0.3.17/win32/vs9/example-dragndrop.vcproj0000644000175000017500000001070311205034417016505 00000000000000 pigment-0.3.17/win32/vs9/libpigment-0.3.vcproj0000644000175000017500000003206411205034417015530 00000000000000 pigment-0.3.17/win32/vs9/example-viewportprojection.vcproj0000644000175000017500000001073611205034417020507 00000000000000 pigment-0.3.17/pkgconfig/0000777000175000017500000000000011205035141012211 500000000000000pigment-0.3.17/pkgconfig/pigment-gtk.pc.in0000644000175000017500000000052111205034420015301 00000000000000prefix=@prefix@ exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include Name: pigment-gtk-@PGM_MAJORMINOR@ Description: GTK+ widget for embedding Pigment Version: @VERSION@ Libs: -L${libdir} -lpigment-gtk-@PGM_MAJORMINOR@ Cflags: -I${includedir}/pigment-@PGM_MAJORMINOR@ Requires: gtk+-2.0 pigment-@PGM_MAJORMINOR@ pigment-0.3.17/pkgconfig/Makefile.am0000644000175000017500000000131211205034420014155 00000000000000pcfiles = \ pigment-@PGM_MAJORMINOR@.pc \ pigment-gtk-@PGM_MAJORMINOR@.pc \ pigment-imaging-@PGM_MAJORMINOR@.pc pcfiles_uninstalled = \ pigment-@PGM_MAJORMINOR@-uninstalled.pc \ pigment-gtk-@PGM_MAJORMINOR@-uninstalled.pc \ pigment-imaging-@PGM_MAJORMINOR@-uninstalled.pc all-local: $(pcfiles) $(pcfiles_uninstalled) %-@PGM_MAJORMINOR@.pc: %.pc cp $< $@ %-@PGM_MAJORMINOR@-uninstalled.pc: %-uninstalled.pc cp $< $@ pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = $(pcfiles) EXTRA_DIST = \ pigment.pc.in \ pigment-uninstalled.pc.in \ pigment-gtk.pc.in \ pigment-gtk-uninstalled.pc.in \ pigment-imaging.pc.in \ pigment-imaging-uninstalled.pc.in CLEANFILES = $(pcfiles) $(pcfiles_uninstalled) pigment-0.3.17/pkgconfig/pigment-imaging.pc.in0000644000175000017500000000050611205034420016132 00000000000000prefix=@prefix@ exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include Name: pigment-imaging-@PGM_MAJORMINOR@ Description: Software image processing filters Version: @VERSION@ Libs: -L${libdir} -lpigment-imaging-@PGM_MAJORMINOR@ Cflags: -I${includedir}/pigment-@PGM_MAJORMINOR@ Requires: gdk-pixbuf-2.0 pigment-0.3.17/pkgconfig/pigment-uninstalled.pc.in0000644000175000017500000000057311205034420017045 00000000000000prefix= exec_prefix= libdir=${pcfiledir}/.. includedir=${pcfiledir}/.. pluginsdir=${pcfiledir}/.. Name: pigment-@PGM_MAJORMINOR@ uninstalled Description: Pigment media rendering library (uninstalled) Version: @VERSION@ Libs: ${libdir}/pgm/libpigment-@PGM_MAJORMINOR@.la Cflags: -I${includedir} Requires: glib-2.0 >= 2.8 gstreamer-0.10 gdk-pixbuf-2.0 gstreamer-plugins-base-0.10 pigment-0.3.17/pkgconfig/pigment-imaging-uninstalled.pc.in0000644000175000017500000000047711205034420020461 00000000000000prefix= exec_prefix= libdir=${pcfiledir}/.. includedir=${pcfiledir}/.. Name: pigment-imaging-@PGM_MAJORMINOR@ uninstalled Description: Software image processing filters (uninstalled) Version: @VERSION@ Libs: ${libdir}/pgm/imaging/libpigment-imaging-@PGM_MAJORMINOR@.la Cflags: -I${includedir} Requires: gdk-pixbuf-2.0 pigment-0.3.17/pkgconfig/pigment.pc.in0000644000175000017500000000064711205034420014527 00000000000000prefix=@prefix@ exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include/pigment-@PGM_MAJORMINOR@ pluginsdir=${libdir}/pigment-@PGM_MAJORMINOR@/@VERSION@ Name: pigment-@PGM_MAJORMINOR@ Description: Pigment media rendering library Version: @VERSION@ Libs: -L${libdir} -lpigment-@PGM_MAJORMINOR@ Cflags: -I${includedir} Requires: glib-2.0 >= 2.8 gstreamer-0.10 gdk-pixbuf-2.0 gstreamer-plugins-base-0.10 pigment-0.3.17/pkgconfig/Makefile.in0000644000175000017500000003736611205034673014222 00000000000000# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = pkgconfig DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/pigment-gtk-uninstalled.pc.in \ $(srcdir)/pigment-gtk.pc.in \ $(srcdir)/pigment-imaging-uninstalled.pc.in \ $(srcdir)/pigment-imaging.pc.in \ $(srcdir)/pigment-uninstalled.pc.in $(srcdir)/pigment.pc.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/as-compiler-flag.m4 \ $(top_srcdir)/common/m4/as-version.m4 \ $(top_srcdir)/common/m4/check.m4 \ $(top_srcdir)/common/m4/gst-args.m4 \ $(top_srcdir)/common/m4/gst-check.m4 \ $(top_srcdir)/common/m4/gst-error.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/libtool.m4 \ $(top_srcdir)/common/m4/ltoptions.m4 \ $(top_srcdir)/common/m4/ltsugar.m4 \ $(top_srcdir)/common/m4/ltversion.m4 \ $(top_srcdir)/common/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = pigment.pc pigment-uninstalled.pc \ pigment-imaging.pc pigment-imaging-uninstalled.pc \ pigment-gtk.pc pigment-gtk-uninstalled.pc SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(pkgconfigdir)" pkgconfigDATA_INSTALL = $(INSTALL_DATA) DATA = $(pkgconfig_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAIROXLIB_CFLAGS = @CAIROXLIB_CFLAGS@ CAIROXLIB_LIBS = @CAIROXLIB_LIBS@ CAIRO_CFLAGS = @CAIRO_CFLAGS@ CAIRO_LIBS = @CAIRO_LIBS@ CC = @CC@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXEEXT = @EXEEXT@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ GCOV = @GCOV@ GCOV_CFLAGS = @GCOV_CFLAGS@ GCOV_LIBS = @GCOV_LIBS@ GDKPIXBUFXLIB_CFLAGS = @GDKPIXBUFXLIB_CFLAGS@ GDKPIXBUFXLIB_LIBS = @GDKPIXBUFXLIB_LIBS@ GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@ GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ GST_0_10_13_CFLAGS = @GST_0_10_13_CFLAGS@ GST_0_10_13_LIBS = @GST_0_10_13_LIBS@ GST_10_10_CFLAGS = @GST_10_10_CFLAGS@ GST_10_10_LIBS = @GST_10_10_LIBS@ GST_10_11_CFLAGS = @GST_10_11_CFLAGS@ GST_10_11_LIBS = @GST_10_11_LIBS@ GST_10_12_CFLAGS = @GST_10_12_CFLAGS@ GST_10_12_LIBS = @GST_10_12_LIBS@ GST_10_13_CFLAGS = @GST_10_13_CFLAGS@ GST_10_13_LIBS = @GST_10_13_LIBS@ GST_10_14_CFLAGS = @GST_10_14_CFLAGS@ GST_10_14_LIBS = @GST_10_14_LIBS@ GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ GST_BASE_LIBS = @GST_BASE_LIBS@ GST_CFLAGS = @GST_CFLAGS@ GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ GST_CHECK_LIBS = @GST_CHECK_LIBS@ GST_LIBS = @GST_LIBS@ GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ GST_TOOLS_DIR = @GST_TOOLS_DIR@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_GTK_WIDGET = @HAVE_GTK_WIDGET@ HAVE_IMAGING_LIBRARY = @HAVE_IMAGING_LIBRARY@ HAVE_OPENGLES_PLUGIN = @HAVE_OPENGLES_PLUGIN@ HAVE_OPENGL_PLUGIN = @HAVE_OPENGL_PLUGIN@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGLADE_2_0_CFLAGS = @LIBGLADE_2_0_CFLAGS@ LIBGLADE_2_0_LIBS = @LIBGLADE_2_0_LIBS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENGLES_BACKEND = @OPENGLES_BACKEND@ OPENGL_BACKEND = @OPENGL_BACKEND@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ PANGOCAIRO_CFLAGS = @PANGOCAIRO_CFLAGS@ PANGOCAIRO_LIBS = @PANGOCAIRO_LIBS@ PANGO_1_16_CFLAGS = @PANGO_1_16_CFLAGS@ PANGO_1_16_LIBS = @PANGO_1_16_LIBS@ PANGO_CFLAGS = @PANGO_CFLAGS@ PANGO_LIBS = @PANGO_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL_PATH = @PERL_PATH@ PGM_ALL_CFLAGS = @PGM_ALL_CFLAGS@ PGM_ALL_LDFLAGS = @PGM_ALL_LDFLAGS@ PGM_ALL_LIBS = @PGM_ALL_LIBS@ PGM_GLES_CFLAGS = @PGM_GLES_CFLAGS@ PGM_GLES_LIBS = @PGM_GLES_LIBS@ PGM_GL_CFLAGS = @PGM_GL_CFLAGS@ PGM_GL_LIBS = @PGM_GL_LIBS@ PGM_GTKDOC_CFLAGS = @PGM_GTKDOC_CFLAGS@ PGM_LIB_LDFLAGS = @PGM_LIB_LDFLAGS@ PGM_LT_LDFLAGS = @PGM_LT_LDFLAGS@ PGM_LT_VERSION = @PGM_LT_VERSION@ PGM_MAJORMINOR = @PGM_MAJORMINOR@ PGM_OBJ_CFLAGS = @PGM_OBJ_CFLAGS@ PGM_OBJ_LIBS = @PGM_OBJ_LIBS@ PGM_OPTION_CFLAGS = @PGM_OPTION_CFLAGS@ PGM_PLUGIN_LDFLAGS = @PGM_PLUGIN_LDFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PLUGIN_PATH = @PLUGIN_PATH@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XCOMPOSITE_CFLAGS = @XCOMPOSITE_CFLAGS@ XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ XMKMF = @XMKMF@ XRENDER_CFLAGS = @XRENDER_CFLAGS@ XRENDER_LIBS = @XRENDER_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cairo_req = @cairo_req@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ glib_req = @glib_req@ gstreamer_plugins_base_req = @gstreamer_plugins_base_req@ gstreamer_req = @gstreamer_req@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pango_req = @pango_req@ pangocairo_req = @pangocairo_req@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ pcfiles = \ pigment-@PGM_MAJORMINOR@.pc \ pigment-gtk-@PGM_MAJORMINOR@.pc \ pigment-imaging-@PGM_MAJORMINOR@.pc pcfiles_uninstalled = \ pigment-@PGM_MAJORMINOR@-uninstalled.pc \ pigment-gtk-@PGM_MAJORMINOR@-uninstalled.pc \ pigment-imaging-@PGM_MAJORMINOR@-uninstalled.pc pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = $(pcfiles) EXTRA_DIST = \ pigment.pc.in \ pigment-uninstalled.pc.in \ pigment-gtk.pc.in \ pigment-gtk-uninstalled.pc.in \ pigment-imaging.pc.in \ pigment-imaging-uninstalled.pc.in CLEANFILES = $(pcfiles) $(pcfiles_uninstalled) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu pkgconfig/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu pkgconfig/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh pigment.pc: $(top_builddir)/config.status $(srcdir)/pigment.pc.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ pigment-uninstalled.pc: $(top_builddir)/config.status $(srcdir)/pigment-uninstalled.pc.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ pigment-imaging.pc: $(top_builddir)/config.status $(srcdir)/pigment-imaging.pc.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ pigment-imaging-uninstalled.pc: $(top_builddir)/config.status $(srcdir)/pigment-imaging-uninstalled.pc.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ pigment-gtk.pc: $(top_builddir)/config.status $(srcdir)/pigment-gtk.pc.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ pigment-gtk-uninstalled.pc: $(top_builddir)/config.status $(srcdir)/pigment-gtk-uninstalled.pc.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" @list='$(pkgconfig_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) all-local installdirs: for dir in "$(DESTDIR)$(pkgconfigdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-pkgconfigDATA install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-pkgconfigDATA .MAKE: install-am install-strip .PHONY: all all-am all-local check check-am clean clean-generic \ clean-libtool distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-pkgconfigDATA install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am uninstall uninstall-am uninstall-pkgconfigDATA all-local: $(pcfiles) $(pcfiles_uninstalled) %-@PGM_MAJORMINOR@.pc: %.pc cp $< $@ %-@PGM_MAJORMINOR@-uninstalled.pc: %-uninstalled.pc cp $< $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pigment-0.3.17/pkgconfig/pigment-gtk-uninstalled.pc.in0000644000175000017500000000050611205034420017624 00000000000000prefix= exec_prefix= libdir=${pcfiledir}/.. includedir=${pcfiledir}/.. Name: pigment-gtk-@PGM_MAJORMINOR@ uninstalled Description: GTK+ widget for embedding Pigment (uninstalled) Version: @VERSION@ Libs: ${libdir}/pgm/gtk/libpigment-gtk-@PGM_MAJORMINOR@.la Cflags: -I${includedir} Requires: gtk+-2.0 pigment-@PGM_MAJORMINOR@ pigment-0.3.17/RELEASE0000644000175000017500000000243211205034420011161 00000000000000Release notes for Pigment 0.3.17, "Black Mesa" (May 20, 2009). The Pigment team is proud to announce a new release in the 0.3.x series. The 0.3.x series is an unstable series targeted at early adopters wanting to easily create rich application user interfaces. This series does not ensure API nor ABI stability. Features of this release * Improved overall performance and memory usage. * Added support to cast shadows under texts. * Added support to align drawables to pixel boundaries. * Added support to retrieve the maximum texture size at runtime. * Highly improved the OpenGL ES 1.1 plugin. * Fixed GCC 4.4 and Sun Studio compilation warnings. Pigment Homepage More details can be found on the project's Trac: https://code.fluendo.com/pigment/trac Support and Bugs We use Trac's ticket sytem for bug reports and feature requests: https://code.fluendo.com/pigment/trac/newticket Developers Subversion is hosted on https://code.fluendo.com/pigment/svn. All code is in Subversion and can be checked out from there. Interested developers should subscribe to the Pigment mailing list. Contributors to this release * Sergi Alvarez * Brian Cameron * Guillaume Emont * Loïc Molinari * Romain Tartière * Arnout Vandecappelle pigment-0.3.17/ChangeLog0000644000175000017500000117417311205034420011745 00000000000000=== release 0.3.17 === 2009-05-19 Loïc Molinari * plugins/opengl/pgmcontext.c: * plugins/opengles/pgmglescontext.c: Remove the immediate source right after quitting the mainloop. Nullify io channels after clean up. Unref main loop and main context once render thread has been joined. 2009-05-19 Loïc Molinari * plugins/opengl/pgmglimage.c: * plugins/opengl/pgmgltext.c: * plugins/opengl/pgmtexture.c: * plugins/opengl/pgmtexture.h: * plugins/opengles/pgmglesimage.c: * plugins/opengles/pgmglestext.c: * plugins/opengles/pgmglestexture.c: * plugins/opengles/pgmglestexture.h: Copy the buffer of an image set from buffer when giving it to the texture. fixes #192 2009-05-18 Loïc Molinari * pgm/pgmviewport.c: Lock the canvas while getting copies of each layer, then unlock and process picking on each copy. 2009-05-18 Loïc Molinari Patch by: Romain Tartière * tests/check/plugins/common/pgmimage.c: Fixed segfault by allocating memory dynamically for the buffer. fixes #310 2009-05-15 Loïc Molinari * plugins/opengl/pgmglxbackend.c: Fixed GCC 4.4 implicit casts warnings. fixes #321 2009-05-15 Loïc Molinari * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmglviewport.c: * plugins/opengles/pgmglescontext.c: * plugins/opengles/pgmglesviewport.c: Copy the layers for the regeneration and update layout passes that can then be done without locking the layers. 2009-05-14 Sergi Alvarez * plugins/opengles/pgmglesimage.c: Apply a patch from Loïc that fixes a glitch while drawing borders in OpenGL-ES 2009-05-14 Guillaume Emont * pgm/pgmimagesink.c: Learned to code: now use break in switch/case, so that the button can be sent in the navigation event. 2009-05-13 Loïc Molinari * pgm/pgmviewport.c: * plugins/opengl/pgmcontext.c: * plugins/opengles/pgmglescontext.c: Use g_io_channel_win32_new_fd instead of g_io_channel_unix_new on Windows. fixes #320 2009-05-12 Loïc Molinari * examples/video.c: * pgm/pgmimage.c: Don't emit the 'changed' signal when setting a GstBuffer if the drawable is not visible. 2009-05-11 Sergi Alvarez * plugins/opengles/pgmgleseglbackend.c: Fix missing set_size -> set_screen_resolution 2009-05-11 Sergi Alvarez * plugins/opengles/pgmgleseglbackend.c: * plugins/opengles/pgmglesviewport.c: Fix warnings appeared after removing the gst log calls. Use set_screen_resolution instead of set_size (Needs to be fixed). 2009-05-11 Sergi Alvarez * plugins/opengles/pgmgleseglbackend.c: Implement set_size() for the EGL backend to adapt planes and surfaces for the a video resolution. 2009-05-11 Loïc Molinari * plugins/opengl/pgmglviewport.c: * plugins/opengl/pgmglxbackend.c: * plugins/opengles/pgmglesdrawable.c: * plugins/opengles/pgmgleseglbackend.c: * plugins/opengles/pgmglesviewport.c: * plugins/opengles/pgmglesxbackend.c: Removed useless and relatively CPU consuming logging calls. * plugins/opengl/pgmglimage.c: * plugins/opengl/pgmgltext.c: * plugins/opengles/pgmglesimage.c: * plugins/opengles/pgmglestext.c: Removed useless lock. * plugins/opengl/pgmgldrawable.c: Unrolled and optimized loop to set the drawable position. * examples/text.c: Added a fullscreen switch key press handler. * pgm/pgmimagesink.c: * plugins/opengl/pgmwglbackend.c: Removed useless pgm_lrintf. 2009-05-07 Loïc Molinari * plugins/opengl/pgmgltext.c: * plugins/opengles/pgmglestext.c: Use CLAMP_TO_BORDER wrappings for the texts in the OpenGL plugin. Hard code mask values in the defines without using bit shift operators. 2009-05-07 Loïc Molinari * pgm/pgmimagesink.c: * pgm/pgmviewport.c: * plugins/opengl/pgmgltext.c: * plugins/opengl/pgmwglbackend.c: * plugins/opengles/pgmglestext.c: Use pgm_lrintf wherever it makes sense. Surround macro definition with parentheses. 2009-05-07 Loïc Molinari * plugins/opengl/pgmgltext.c: * plugins/opengles/pgmglestext.c: Revert to nearest filtering for the texts. 2009-05-07 Loïc Molinari * configure.ac: * pgm/Makefile.am: * pgm/pgmcommon.c: * pgm/pgmcommon.h: * docs/pgm/pigment-sections.txt: * docs/pgm/tmpl/pgmcommon.sgml: * win32/common/libpigment.def: * win32/vs9/libpigment-0.3.vcproj: Added the pgm_lrintf function with a specific assembly implementation for MSVC. * pgm/pgmdrawable.c: * plugins/opengl/pgmgltext.c: * plugins/opengles/pgmglestext.c: Fixed rounding issues regarding grid alignment. * examples/text.c: Regenerate texts when a configure event is received. 2009-05-06 Sergi Alvarez * plugins/opengles/pgmglescontext.c: * plugins/opengles/pgmgleseglbackend.c: Fix build for EGL backend 2009-05-06 Sergi Alvarez * plugins/opengles/pgmgleseglbackend.c: Powerup HDMI if not already done while initializing GDL for the EGL backend. 2009-05-06 Loïc Molinari Patch by: Brian Cameron * plugins/boilerplate/pgmbpviewport.c: * plugins/opengl/pgmaglbackend.c: * plugins/opengl/pgmbackend.c: * plugins/opengl/pgmgldrawable.c: * plugins/opengl/pgmglimage.c: * plugins/opengl/pgmgltext.c: * plugins/opengl/pgmglviewport.c: * plugins/opengl/pgmglxbackend.c: * plugins/opengl/pgmwglbackend.c: * plugins/opengles/pgmglesbackend.c: * plugins/opengles/pgmglesdrawable.c: * plugins/opengles/pgmgleseglbackend.c: * plugins/opengles/pgmglesimage.c: * plugins/opengles/pgmglestext.c: * plugins/opengles/pgmglesviewport.c: * plugins/opengles/pgmglesxbackend.c: Fixed implicit casts generating warnings on Sun Studio. Removed useless ";" at the end of macros. fixes #319 2009-05-05 Loïc Molinari Patch by: Arnout Vandecappelle * pgm/pgmimagesink.c: Fixed memory leak. fixes #318 2009-05-05 Loïc Molinari Patch by: Arnout Vandecappelle * plugins/opengl/pgmgldrawable.c: * plugins/opengles/pgmglesdrawable.c: Fixed memory leak. fixes #317 2009-05-05 Loïc Molinari * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmcontext.h: * plugins/opengl/pgmglviewport.c: * plugins/opengles/pgmglescontext.c: * plugins/opengles/pgmglescontext.h: * plugins/opengles/pgmglesviewport.c: Updated viewport disposition procedure. Don't join the rendering threads anymore. Allowed viewport disposition in the 'update-pass' signal handlers. 2009-05-04 Loïc Molinari * pgm/pgmdrawable.c: Fixed z reordering regression introduced while adding grid alignment facilities. * plugins/opengl/pgmcontext.c: * plugins/opengles/pgmglescontext.c: Don't use near and far variable names since these are reserved keywords on Windows. * win32/common/libpigment.def: Added missing symbol for Windows build. 2009-05-04 Loïc Molinari * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmgldrawable.c: * plugins/opengl/pgmglimage.c: * plugins/opengl/pgmgltext.c: * plugins/opengl/pgmglviewport.c: * plugins/opengles/pgmglescontext.c: * plugins/opengles/pgmglesdrawable.c: * plugins/opengles/pgmglesimage.c: * plugins/opengles/pgmglestext.c: * plugins/opengles/pgmglesviewport.c: Fixed crashes at viewport clean up. Copy the drawables in the layers taking a ref on each of them before the rendering, then unref each drawable once rendered. The layer lock is only taken for the copies which can potentially increase performance. Removed useless logs generated while rendering a frame. fixes #304, #305, #308 2009-05-04 Loïc Molinari * pgm/pgmcanvas.c: * pgm/pgmcanvas.h: * pgm/pgmcommon.h: * pgm/pgmdrawable.c: * pgm/pgmdrawable.h: * pgm/pgmimage.c: * pgm/pgmimage.h: * pgm/pgmimagesink.c: * pgm/pgmtext.c: * pgm/pgmtext.h: * pgm/pgmviewport.c: * pgm/pgmviewport.h: * pgm/pgmviewportfactory.h: * plugins/opengl/pgmgldrawable.c: * plugins/opengl/pgmgldrawable.h: * plugins/opengl/pgmglimage.c: * plugins/opengl/pgmglimage.h: * plugins/opengl/pgmgltext.c: * plugins/opengl/pgmgltext.h: * plugins/opengl/pgmglviewport.c: * plugins/opengl/pgmglviewport.h: * plugins/opengles/pgmglesdrawable.c: * plugins/opengles/pgmglesdrawable.h: * plugins/opengles/pgmglesimage.c: * plugins/opengles/pgmglesimage.h: * plugins/opengles/pgmglestext.h: * plugins/opengles/pgmglesviewport.c: * plugins/opengles/pgmglesviewport.h: * docs/pgm/pigment-sections.txt: * docs/pgm/tmpl/pgmdrawable.sgml: * docs/pgm/tmpl/pgmimage.sgml: * docs/pgm/tmpl/pgmtext.sgml: * docs/pgm/tmpl/pgmviewport.sgml: Globally reduced sizes of structures. Removed the 16 bytes padding kept for ABI stability at the end of each GObject structures, keeping ABI stability is not possible with pigment-0.3 anyway. Reordered fields within structures sorting them by decreasing sizes, it allows to reduce structure sizes since on most platforms N-byte fields are N-byte aligned by compilers. 2009-05-04 Loïc Molinari * pgm/pgmdrawable.c: Don't lock the canvas while accessing the offset ratios, it's safe and removes potential deadlocks. 2009-04-30 Loïc Molinari * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmgltext.c: * plugins/opengles/pgmglescontext.c: * plugins/opengles/pgmglescontext.h: * plugins/opengles/pgmglesdrawable.c: * plugins/opengles/pgmglesimage.c: * plugins/opengles/pgmglestext.c: * plugins/opengles/pgmglesviewport.c: * plugins/opengles/pgmglesviewport.h: Synced the OpenGL ES plugin with the OpenGL one. 2009-04-30 Loïc Molinari * plugins/opengl/pgmgltext.c: * plugins/opengles/pgmglestext.c: Don't save/restore cairo states to restore a simple translation matrix, simply revert the translation. 2009-04-27 Loïc Molinari * pgm/pgmcanvas.c: * pgm/pgmcanvas.h: * pgm/pgmdrawable.c: * pgm/pgmdrawable.h: * pgm/pgmtext.c: * pgm/pgmviewport.c: Added support to retrieve the offset between two pixels in canvas coordinates. Added support to align drawable vertices to pixel boundaries. Added pgm_canvas_get_pixel_offsets symbol. Added PgmCanvas::pixel_offset_x and PgmCanvas::pixel_offset_y struct fields. Added pgm_drawable_set_grid_aligned and pgm_drawable_get_grid_aligned symbols. Added PgmDrawable::orig_x, PgmDrawable::orig_y, PgmDrawable::orig_width, PgmDrawable::orig_height and PgmDrawable::grid_aligned struct fields. * plugins/opengl/pgmgltext.c: * plugins/opengl/pgmglviewport.c: * plugins/opengl/pgmglviewport.h: Removed support to align vertices to pixel boundaries since it's now done in the core. * docs/pgm/pigment-sections.txt: * docs/pgm/tmpl/pgmcanvas.sgml: * docs/pgm/tmpl/pgmdrawable.sgml: Added doc for the new symbols. * win32/common/libpigment.def: Added new symbols in the Win32 import file. fixes #315 2009-04-27 Loïc Molinari * pgm/pgmviewport.c: * pgm/pgmviewport.h: Added pgm_viewport_get_max_texture_size symbol. * plugins/opengl/pgmglviewport.c: * plugins/opengles/pgmglesviewport.c: Added support for the new symbol. * docs/pgm/pigment-sections.txt: * docs/pgm/tmpl/pgmviewport.sgml: Added doc for the new symbol. * win32/common/libpigment.def: Added symbol in the Win32 import file. fixes #314 2009-04-17 Loïc Molinari * plugins/opengl/pgmwglbackend.c: Handle the maximized state as the restored state. fixes #312 2009-04-16 Sergi Alvarez * configure.ac: Do not pass configure if not plugins can be built. There is no sense to build pigment without backends. 2009-04-15 Sergi Alvarez * plugins/opengles/pgmglescontext.c: * plugins/opengles/pgmgleseglbackend.c: Fix build for OpenGL-ES egl-gdl backend 2009-04-15 Sergi Alvarez * configure.ac: Fix missing 'test' in conditional 2009-04-15 Sergi Alvarez * plugins/opengles/pgmglesbackend.c: * plugins/opengles/pgmglesbackend.h: Added generic trampoline for set_screen_resolution and PGM_GLES_CONTEX_RESOLUTION * plugins/opengles/pgmglescontext.c: * plugins/opengles/pgmglescontext.h: Remove DEFAULT_GDL_WIDTH and DEFAULT_GDL_HEIGHT Added do_resolution callback binded to the PGM_GLES_CONTEXT_RESOLUTION task * plugins/opengles/pgmgleseglbackend.c: * plugins/opengles/pgmgleseglbackend.h: Add singleton for SIGINT handling to avoid dupped destruction. Added get/set tvmode helper functions for the GDL backend Hook set_screen_resolution glesbackend callback for this task * plugins/opengles/pgmglestext.c: Fix build of previous commit * plugins/opengles/pgmglesviewport.c: Added gles_viewport_set_screen_resolution callback to push a PGM_GLES_CONTEXT_RESOLUTION immediate task 2009-04-15 Loïc Molinari * pgm/pgmdrawable.h: * pgm/pgmtext.c: * pgm/pgmtext.h: Added pgm_text_set/get_color, pgm_text_set/get_cast_shadow, pgm_text_set/get_shadow_position, pgm_text_set/get_shadow_color symbols. Added PgmTextShadowPosition enum. Added PgmDrawableProperty::PGM_TEXT_COLOR, PgmDrawableProperty::PGM_TEXT_CAST_SHADOW, PgmDrawableProperty::PGM_TEXT_SHADOW_POSITION, PgmDrawableProperty::PGM_TEXT_SHADOW_COLOR enum fields. * plugins/opengl/pgmgltext.c: * plugins/opengl/pgmgltext.h: * plugins/opengl/pgmglviewport.c: * plugins/opengl/pgmglviewport.h: * plugins/opengles/pgmglestext.c: * plugins/opengles/pgmglestext.h: * plugins/opengles/pgmglesviewport.c: * plugins/opengles/pgmglesviewport.h: Added support for the new symbols in the plugins. * docs/pgm/pigment-sections.txt: * docs/pgm/tmpl/pgmdrawable.sgml: * docs/pgm/tmpl/pgmtext.sgml: Added docs for the new symbols. * examples/text.c: Added example for the new symbols. * win32/common/libpigment.def: Added the new symbols to the Win32 def file. fixes #311 === release 0.3.16 === 2009-04-02 Loïc Molinari * plugins/opengl/pgmprogram.c: Removed workaround for the DRI R300 driver, it's now fixed in Mesa and widely shipped in distributions released in the last 18 months. 2009-04-02 Loïc Molinari * plugins/opengl/pgmglxbackend.c: Fixed attempt to remove a source in the render context using g_source_remove which is removing sources from the main context. Even the right removal code is causing in some conditions deadlocks when used from Python. Then, the source removal is simply not done now, it's not a problem since the mainloop is stopped and the thread joined right after. fixes #309 2009-04-02 Sergi Alvarez * plugins/opengles/pgmglestext.c: Fix 0-dimension pixmaps loading with OpenGL-ES plugin Added some asserts at different points to avoid some NULL pointers 2009-04-01 Sergi Alvarez * cl.pl: Fix warning issue for perl 5.10 avoid uninitialized variables * plugins/opengles/pgmglestext.c: Fix build of OpenGL-ES plugin by removing an unused local variable. 2009-03-31 Loïc Molinari * configure.ac: Bumped Pango dependency requirement to 1.20. * misc/pgm-uninstalled: Added version number in the shell prompt prefix. * pgm/pgmdrawable.h: * pgm/pgmtext.c: * pgm/pgmtext.h: Added pgm_text_set_multiline and pgm_text_set_multiline functions. The meaning of the text's font height has been changed in order to be easier to use, the height is now defined in canvas coordinates. * plugins/opengl/pgmgltext.c: * plugins/opengl/pgmgltext.h: * plugins/opengl/pgmglviewport.c: * plugins/opengl/pgmglviewport.h: * plugins/opengles/pgmglestext.c: * plugins/opengles/pgmglestext.h: * plugins/opengles/pgmglesviewport.c: * plugins/opengles/pgmglesviewport.h: Added support in the plugins for the new symbols. * docs/pgm/pigment-sections.txt: * docs/pgm/tmpl/pgmdrawable.sgml: * docs/pgm/tmpl/pgmevents.sgml: * docs/pgm/tmpl/pgmtext.sgml: Added documentation for the new symbols. Fixed compilation warnings. * examples/dragndrop.c: * examples/mappingmatrix.c: * examples/rotations.c: * examples/text.c: * examples/xpixmapsystembuffer.c: * examples/xwindowsystembuffer.c: Updated examples for the new meaning of the font height. Changed the text example to test the new symbols. * win32/common/libpigment.def: Added new symbols. * win32/vs9/libpgmboilerplate.vcproj: * win32/vs9/libpgmopengl.vcproj: * win32/vs9/libpigment-0.3.vcproj: * win32/vs9/libpigmentimaging-0.3.vcproj: Added def files to be listed in the projects. === release 0.3.15 === 2009-03-12 Loïc Molinari * pkgconfig/pigment-uninstalled.pc.in: * pkgconfig/pigment.pc.in: Added missing dependencies. fixes #302 2009-03-12 Loïc Molinari * pgm/pgmimage.c: Fixed race condition in image loading using set_from_file. * pgm/pgmviewport.c: Make GTK-Doc happy. fixes #307 2009-03-06 Sergi Alvarez * plugins/opengles/pgmglescontext.c: * plugins/opengles/pgmgleseglbackend.c: * plugins/opengles/pgmgleseglbackend.h: Force OpenGL viewport resolution to fit always into the fullscreen defined by the underlying EGL+GDL layer. 2009-03-05 Guillaume Emont * pigment/pgm/pgmmarshal.list: * pigment/pgm/pgmviewport.c: Changed the return type of PgmViewport::win32-message-event to long. fixes #303 2009-02-25 Sergi Alvarez * configure.ac: Link against the correct libraries when using --enable-gdl * pgm/pgmviewport.c: Initialize width and height local variables with 0 * plugins/opengles/pgmgleseglbackend.c: Fix initialization of the GDL bindings for OpenGL ES 1.1. Handle SIGINT to properly deinitialize the egl+gdl contexts. Add some more debugging information in the init Fix width and height with hardcoded values * plugins/opengles/pgmglestext.c: Ensure g_slice_alloc0 is giving us a non-null buffer 2009-02-24 Sergi Alvarez * configure.ac: Disable the build of OpenGL plugin when --with-x=no 2009-02-19 Sergi Alvarez * configure.ac: --with-x=no is now disabling cairo-xlib and xcomposite modules * plugins/opengles/pgmgleseglbackend.c: Fix glib/gprintf include and also include EGL/egl.h 2009-02-12 Sergi Alvarez * configure.ac: Add --enable-gdl configure flag * plugins/opengles/pgmgleseglbackend.c: Initial implementation of the GDL backend for the OpenGL-ES plugin === release 0.3.14 === 2009-02-02 Loïc Molinari Patch by: Florian Boucault * pgm/pgmimage.c: Do not slave an image that's already the slave of the given image. 2009-02-02 Loïc Molinari * pgm/pgmviewport.c: * pgm/pgmviewport.h: * win32/common/libpigment.def: Ifdef'd out Win32 stuff for non-Win32 platforms. Added the _pgm_viewport_push_win32_message function so that plugins can wait and synchronize for the WinProc LRESULT return value from the main thread. * plugins/opengl/pgmwglbackend.c: Implemented support for the WinProc return value in the OpenGL plugin. * pgm/pgmevents.h: Ifdef'd out Win32 stuff for non-Win32 platforms. Changed PgmEventWin32Message fields to use the right Win32 types. * pgm/pgmmarshal.list: Added support for the new "win32-message" signal prototype. fixes #298 2008-12-11 Loïc Molinari * pgm/pgmdrawable.c: * pgm/pgmdrawable.h: * win32/common/libpigment.def: Added the pgm_drawable_[get,set]_scale functions. * docs/pgm/pigment-sections.txt: * docs/pgm/tmpl/pgmdrawable.sgml: Added documentation for the new symbols. * examples/rotations.c: Updated example for the new symbols. fixes #295 2008-12-11 Loïc Molinari * plugins/opengl/pgmgltext.c: Clamped the minimum text size to 1. fixes #294 === release 0.3.13 === 2008-12-05 Loïc Molinari * pgm/pgmimage.c: Fixed wrong GTypeInfo::class_size field initialization. 2008-12-03 Loïc Molinari * win32/vs9/example-dragndrop.vcproj: * win32/vs9/example-image.vcproj: * win32/vs9/example-imaging.vcproj: * win32/vs9/example-mappingmatrix.vcproj: * win32/vs9/example-rotations.vcproj: * win32/vs9/example-sphere.vcproj: * win32/vs9/example-text.vcproj: * win32/vs9/example-video.vcproj: * win32/vs9/example-viewportopacity.vcproj: * win32/vs9/example-viewportprojection.vcproj: * win32/vs9/libpgmboilerplate.vcproj: * win32/vs9/libpgmopengl.vcproj: * win32/vs9/libpigment-0.3.vcproj: * win32/vs9/libpigmentimaging-0.3.vcproj: Generate and copy debug information files in release. 2008-12-02 Loïc Molinari * pgm/pgmviewport.c: Take ref on each drawable copied from layers before processing picking. Merged the layer copying and reversing steps. fixes #290 2008-11-13 Loïc Molinari * plugins/opengl/pgmwglbackend.c: * plugins/opengl/pgmwglbackend.h: * win32/vs9/libpgmopengl.vcproj: Added support for drag-and-drop using the OLE IDropTarget and IDropTargetHelper interfaces. * plugins/opengl/pgmglxbackend.c: Changed the action to link as it is in the Win32 support. fixes #289 === release 0.3.12 === 2008-11-11 Loïc Molinari * pgm/pgmcanvas.c: Added check in pgm_canvas_get_order to test if the given drawable's parent is the canvas. fixes #283 2008-11-10 Loïc Molinari * plugins/opengl/pgmglviewport.c: Fixed implicit casts. 2008-11-07 Loïc Molinari * plugins/opengl/pgmgltext.c: * plugins/opengl/pgmglviewport.c: * plugins/opengl/pgmglviewport.h: Align the text vertices to pixel boundaries so that the texture is rasterized at z=0 as it's been generated. Store the projected size and the canvas size when the projection gets updated to avoid useless computation and locks. Correctly scale the text generated by Cairo depending on the pixel-aspect-ratio and the rotation state of the canvas. Filter all the texts with the nearest neighbour algorithm. * pgm/pgmcanvas.c: Clamped the canvas size setter to 1.0f minimum. * examples/viewportprojection.c: Regenerate the text when the rotation or the reflection are changed. fixes #287 2008-11-07 Loïc Molinari * win32/vs9/libpgmboilerplate.vcproj: * win32/vs9/libpgmopengl.vcproj: Create the destination directory in post-build event if it doesn't exist. 2008-11-03 Loïc Molinari * win32/vs9/libpigment-0.3.vcproj: * win32/vs9/libpigmentimaging-0.3.vcproj: Added the PDB MSVC9 debug files to the files copied in the post-build event step. * win32/common/libpigment.def: Added missing symbols. 2008-10-29 Loïc Molinari * tests/misc/vsync.c: Initialize GLX extension function pointers to NULL. Set up the VBL method after context creation. 2008-10-29 Loïc Molinari * plugins/opengl/pgmglxbackend.c: Correct X11 screen size when broken with size of 1 mm. fixes #285 === release 0.3.11 === 2008-10-06 Loïc Molinari * pgm/pgmviewport.h: Fixed from/to_canvas function prototypes, the viewport_* and canvas_* arguments were swapped. 2008-10-02 Loïc Molinari * configure.ac: * docs/pgm/Makefile.am: Don't add the "-Wall -Werror" flags in debug for the compilation of the gtk-doc scanner to avoid stopping the build with gtk-doc versions generating warnings. * plugins/opengl/pgmprogram.c: Add sprintf format parameter in order to prevent warnings with GCC 4.3. fixes #279 2008-09-30 Loïc Molinari * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmcontext.h: * plugins/opengl/pgmglxbackend.c: * plugins/opengl/pgmwglbackend.c: Prevent updates when the window is iconified or fully obscured. * examples/mappingmatrix.c: Changed wrapping mode to transparent to remove the visible clamping. fixes #281 === release 0.3.10 === 2008-09-29 Loïc Molinari * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmcontext.h: Added a workaround for the Intel 945GM chipset/drivers on Windows to correct a bug in the driver preventing fast texture upload when there's only one texture bound. Yes that's quite weird. fixes #280 2008-09-25 Loïc Molinari * plugins/opengl/pgmwglbackend.c: Defined the window backround color. Set the window NOTOPMOST when going fullscreen. 2008-09-25 Loïc Molinari * pgm/pgmimage.c: * pgm/pgmimage.h: Added the PGM_IMAGE_TRANSPARENT wrapping to PgmImageWrapping. Default wrappings to PGM_IMAGE_CLAMP. * plugins/opengl/pgmglimage.c: * plugins/opengl/pgmtexture.c: * plugins/opengles/pgmglesimage.c: Adapted plugins to the wrapping changes. * docs/pgm/tmpl/pgmimage.sgml: Updated documentation to the wrapping changes. === release 0.3.9 === 2008-09-16 Loïc Molinari Patch by: Jerry Yu * common/m4/as-version.m4: Converted m4 macro to use bash style. fixes #277 2008-09-16 Loïc Molinari Patch by: Loïc Minier * configure.ac: Fixed assignment operator typo. fixes #278 2008-09-16 Loïc Molinari * pgm/pgmevents.h: Added the PgmEventState structure. Added the PGM_STATE field to PgmEventType. Added the PgmViewportState enum. * pgm/pgmviewport.c: * pgm/pgmviewport.h: Added pgm_viewport_[get,set]_iconified functions. Added pgm_viewport_focus function. Added 'state-event' signal. Removed get_fullscreen virtual method. Added checks to avoid setting fullscreen and visiblility if the current state is the one requested. * plugins/boilerplate/pgmbpviewport.c: * plugins/opengl/pgmbackend.c: * plugins/opengl/pgmbackend.h: * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmcontext.h: * plugins/opengl/pgmglviewport.c: * plugins/opengl/pgmglxbackend.c: * plugins/opengl/pgmglxbackend.h: * plugins/opengl/pgmwglbackend.c: * plugins/opengl/pgmwglbackend.h: Added support for the new API to the plugins. * examples/image.c: Added demonstration of the new API functions. * docs/pgm/pigment-sections.txt: * docs/pgm/tmpl/pgmevents.sgml: * docs/pgm/tmpl/pgmviewport.sgml: Updated doc for the new symbols. * win32/common/libpigment.def: Updated symbol list. === release 0.3.8 === 2008-09-10 Loïc Molinari * pgm/pgmimage.c: Test for file name validity in set_from_file. * examples/pictures/Makefile.am: Added new images to the dist. * tests/check/pgm/pgmimage.c: Fixed tests broken by the new system to load images from files. 2008-09-10 Loïc Molinari * plugins/opengl/pgmtexture.c: * plugins/opengles/pgmglestexture.c: Replaced get_upper_power_of_two implementation by a branch-free version. 2008-09-10 Loïc Molinari * pgm/pgmimage.c: * plugins/opengl/pgmtexture.c: Set the default wrapping mode to PGM_IMAGE_REPEAT. 2008-09-10 Loïc Molinari * pgm/pgmdrawable.h: * pgm/pgmimage.c: * pgm/pgmimage.h: Added the pgm_image_[set,get]_wrapping symbols. Added the PgmImageWrapping enumeration. * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmcontext.h: * plugins/opengl/pgmgldefs.h: * plugins/opengl/pgmglimage.c: * plugins/opengl/pgmglimage.h: * plugins/opengl/pgmglviewport.c: * plugins/opengl/pgmglviewport.h: * plugins/opengl/pgmtexture.c: * plugins/opengl/pgmtexture.h: Adapted OpenGL ES plugin to the new wrapping API. Changed clamp wrapping mode to CLAMP_TO_BORDER with a transparent border color so that images are displayed anti-aliased at the edges. * plugins/opengles/pgmglesimage.c: * plugins/opengles/pgmglesimage.h: * plugins/opengles/pgmglestexture.c: * plugins/opengles/pgmglestexture.h: * plugins/opengles/pgmglesviewport.c: * plugins/opengles/pgmglesviewport.h: Adapted OpenGL ES plugin to the new wrapping API. * examples/pictures/line-pattern.png: Renamed pattern.png to line-pattern.png. Changed the image to a simple repeat pattern. * examples/Makefile.am: * examples/pictures/square-pattern.png: * examples/wrapping.c: Added wrapping example demonstrating the new API. * examples/dragndrop.c: Adapted to the new wrapping API. * examples/gtk.c: Adapted to the new PgmImage::file-loaded signal. * docs/pgm/pigment-sections.txt: * docs/pgm/tmpl/pgmdrawable.sgml: * docs/pgm/tmpl/pgmimage.sgml: Updated documentation to the new wrapping API. * win32/common/libpigment.def: Updated symbol list to the new wrapping API. fixes #276 2008-09-09 Loïc Molinari * pgm/pgmdrawable.h: * pgm/pgmimage.c: * pgm/pgmimage.h: Added two new protected functions to the Image API to allow on-demand freeing and reloading if the GdkPixbuf used by the pgm_image_set_from_file function. It allows to reduce a lot memory comsumption of Pigment programs. * plugins/opengl/pgmglimage.c: * plugins/opengl/pgmglimage.h: * plugins/opengl/pgmgltext.c: * plugins/opengl/pgmglviewport.c: * plugins/opengl/pgmglviewport.h: * plugins/opengl/pgmtexture.c: * plugins/opengles/pgmglesimage.c: * plugins/opengles/pgmglesimage.h: * plugins/opengles/pgmglestext.c: * plugins/opengles/pgmglestexture.c: * plugins/opengles/pgmglesviewport.c: * plugins/opengles/pgmglesviewport.h: Adapted plugins to the new API. * docs/pgm/tmpl/pgmdrawable.sgml: * docs/pgm/tmpl/pgmimage.sgml: Updated documentation to the new API. * win32/common/libpigment.def: Adapted symbol list to the new API. fixes #275 2008-09-08 Loïc Molinari * plugins/opengl/pgmcontext.c: Display a message box on Win32 when the plugin can't initialize. 2008-09-08 Loïc Molinari * pgm/pgmdrawable.c: Removed compilation warnings adding explicit casts. 2008-09-08 Loïc Molinari * examples/Makefile.am: * pgm/Makefile.am: * pgm/gtk/Makefile.am: * pgm/imaging/Makefile.am: * plugins/opengl/Makefile.am: * plugins/opengles/Makefile.am: Added the optional CFLAGS to all the makefiles. 2008-09-02 Loïc Molinari * pgm/pgmimage.c: * pgm/pgmimage.h: * pgm/pgmmarshal.list: Added "PgmImage::cloned" and "PgmImage::un-cloned" signals. * docs/pgm/tmpl/pgmimage.sgml: Updated documentation for the new signals. fixes #274 2008-08-14 Loïc Molinari * pgm/pgmdrawable.c: * pgm/pgmdrawable.h: Added a drag distance threshold of 5 to cover before emitting the 'drag-begin' signal. Added pgm_drawable_[get,set]_drag_distance functions to change and retrieve the current drag distance. * win32/common/libpigment.def: * docs/pgm/pigment-sections.txt: * docs/pgm/tmpl/pgmdrawable.sgml: Updated symbol list and documentation for the new functions. #fixes 273 2008-08-13 Loïc Molinari * pgm/pgmdrawable.c: Removed useless local variables. * pgm/pgmviewport.c: Don't clamp z_zero_ndc if we set it ourselves. Added missing lock. 2008-08-13 Loïc Molinari * win32/common/libpigment.def: Sorted symbols alphabetically. 2008-08-11 Loïc Molinari * pgm/imaging/pgmimaging.c: Alloc Cairo destination buffer with bytes set to 0. Flush Cairo image surface before twiddling bits. Perform correct premultipy/unpremultiply alpha operations. 2008-08-08 Loïc Molinari * pgm/pgmimage.c: * pgm/pgmimage.h: Cancel image loading tasks in the thread pool when new image loading are requested. fixes #272 2008-08-07 Loïc Molinari * plugins/opengl/pgmtexture.c: Test validity of a buffer before sending it to video memory. 2008-08-07 Loïc Molinari * pgm/pgmimage.c: The string given to set_from_file has to be copied cause it's still used after the function returns. 2008-08-05 Loïc Molinari * pgm/pgmimage.c: Included stdlib.h for atoi(). 2008-08-05 Loïc Molinari * pgm/pgmimage.c: * pgm/pgmimage.h: * docs/pgm/running.xml: Deferred image loading using a thread pool. The loading is now serialized in other thread(s) and not processed chunk by chunk in the Pigment main loop. fixes #175 2008-08-04 Loïc Molinari * pgm/pgmdrawable.c: Do not emit "clicked" at the end of a drag. fixes #271 2008-08-01 Loïc Molinari * win32/common/Makefile.am: * win32/common/libpigmentimaging.def: * win32/common/libpigmentimaging.rc: * win32/vs9/Makefile.am: * win32/vs9/libpigmentimaging-0.3.vcproj: * win32/vs9/pigment.sln: * win32/vs9/example-imaging.vcproj: Added project files for the new imaging library. * win32/vs9/example-dragndrop.vcproj: * win32/vs9/example-image.vcproj: * win32/vs9/example-mappingmatrix.vcproj: * win32/vs9/example-rotations.vcproj: * win32/vs9/example-sphere.vcproj: * win32/vs9/example-text.vcproj: * win32/vs9/example-video.vcproj: * win32/vs9/example-viewportopacity.vcproj: * win32/vs9/example-viewportprojection.vcproj: * win32/vs9/libpgmboilerplate.vcproj: * win32/vs9/libpgmopengl.vcproj: * win32/vs9/libpigment-0.3.vcproj: Added link optimization options in Release mode. * win32/common/libpigment.def: Added the new pgmimage symbols. * pgm/imaging/pgmimaging.c: * pgm/pgmimage.c: Cosmetic and casting fixes. 2008-08-01 Loïc Molinari * pgm/Makefile.am: * pgm/imaging/Makefile.am: * pgm/imaging/pgmimaging.c: * pgm/imaging/pgmimaging.h: * pkgconfig/Makefile.am: * pkgconfig/pigment-imaging-uninstalled.pc.in: * pkgconfig/pigment-imaging.pc.in: Added new library dedicated to image processing. Added the pgm_imaging_linear_alpha_gradient function. * configure.ac: Added configuration option to disable building of the imaging library. * pgm/pgmimage.c: * pgm/pgmimage.h: Added pgm_image_set_from_pixbuf, pgm_image_new_from_pixbuf and pgm_image_to_pixbuf functions. * docs/pgm/Makefile.am: * docs/pgm/pigment-docs.sgml: * docs/pgm/pigment-sections.txt: * docs/pgm/tmpl/pgmimage.sgml: Adapted documentation for the new imaging library and functions. * examples/Makefile.am: * examples/imaging.c: Added an example demonstrating the imaging library. 2008-07-29 Loïc Molinari * pgm/Makefile.am: * pgm/gtk/Makefile.am: Defined libpigment as a link dependency of libpigment-gtk. * configure.ac: Defined XRender as a link dependency of the X11 OpenGL plugin. fixes #269 === release 0.3.7 === 2008-07-25 Loïc Molinari * plugins/opengl/pgmwglbackend.c: Reduced executed code and stack overhead when no messages are filtered. 2008-07-24 Loïc Molinari * pgm/pgmevents.h: Added a PgmEventWin32Message structure and the PGM_WIN32_MESSAGE event type. * pgm/pgmviewport.c: * pgm/pgmviewport.h: Added pgm_viewport_{set,get}_message_filter functions. Added a "win32-message-event" signal. * plugins/opengl/pgmbackend.c: * plugins/opengl/pgmbackend.h: * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmcontext.h: * plugins/opengl/pgmglviewport.c: * plugins/opengl/pgmwglbackend.c: * plugins/opengl/pgmwglbackend.h: Adapted OpenGL plugin to the new symbols. * docs/pgm/pigment-sections.txt: * docs/pgm/tmpl/pgmevents.sgml: * docs/pgm/tmpl/pgmviewport.sgml: * win32/common/libpigment.def: Adapted documentation and symbol list to new symbols. 2008-07-24 Loïc Molinari * pgm/pgmdrawable.c: Get the canvas only if there's a z-reordering. * pgm/pgmlinearalgebra.c: Documentation fixes. 2008-07-14 Loïc Molinari * tests/check/pgm/pgmimage.c: Fixed unit test on 64 bits systems adding a threshold comparison of 1 to deal with rounding issues. Use G_STMT_* instead of do{;}while(0); in multi-lined macros. fixes #267 === release 0.3.6 === 2008-07-10 Loïc Molinari * plugins/opengles/pgmglesdrawable.c: * plugins/opengles/pgmglesdrawable.h: * plugins/opengles/pgmglesviewport.c: * plugins/opengles/pgmglesviewport.h: Added support for rotations in the OpenGL ES plugin. * README: Added explanations on how to build the OpenGL ES plugin for emulation on X11. 2008-07-10 Loïc Molinari * examples/video.c: Added support for rotating the drawable with the mouse. 2008-07-10 Guillaume Emont * pgm/pgmimagesink.c: * pgm/pgmimagesink.h: Added optional forwarding of motion, pressed and released events to the pipeline. Added the PgmImageSinkEventMask enum. Added the PgmImageSink:events properties of the new PgmImageSinkEventMask type. Added a getter and a setter for PgmImageSink:events. No longer get the object lock on sink in pgm_image_sink_get_image(). * docs/pgm/pigment-sections.txt: * docs/pgm/tmpl/pgmimagesink.sgml: Updated documentation. * win32/common/libpigment.def: Updated definitions. fixes #258 2008-07-10 Guillaume Emont * pgm/pgmdrawable.c: * pgm/pgmdrawable.h: Reworked the algorithm used for PgmDrawable::left, PgmDrawable::entered and PgmDrawable::motion to change the definition of the return value of PgmDrawable::entered into something more useful. Clarified a bit the code for emission of these signals. Removed the return value of PgmDrawable::left. Removed PGM_DRAWABLE_PICKING_LEFT (not used). * pgm/pgmcanvas.c: * pgm/pgmcanvas.h: Added an entered_emission_stopper member used for picking. Added a getter and a setter for this member. * pgm/pgmmarshal.list: Added a marshaller for the new type of PgmDrawable::left. * win32/common/libpigment.def: Added new symbols. * docs/pgm/tmpl/pgmdrawable.sgml: Updated documentation template. * examples/image.c: Made the example change the opacity of an image when it is entered or left. 2008-07-10 Loïc Molinari * plugins/opengl/pgmwglbackend.c: Do not let Windows erase the background when the window is resized. Retrieve the y decoration border size to define the correct deco height. 2008-07-09 Loïc Molinari * plugins/opengl/pgmwglbackend.c: * plugins/opengl/pgmwglbackend.h: Fixed fullscreen crash/flickering with Intel chipsets/drivers. Discarded the mouse move message generated after button up messages. Fixed uninitialized flag in set_size causing random weird behaviours. Removed unused fields in the instance struct. Added logging for the generated Windows messages. Replaced SetWindowLong by SetWindowLongPtr which is compatible with both 32-bit and 64-bit versions of Windows. Changed window class name. * plugins/opengl/pgmcontext.c: Improved comment on how to remove sources in the rendering loop. fixes #264 2008-07-09 Loïc Molinari * win32/vs9/example-dragndrop.vcproj: * win32/vs9/example-image.vcproj: * win32/vs9/example-mappingmatrix.vcproj: * win32/vs9/example-rotations.vcproj: * win32/vs9/example-sphere.vcproj: * win32/vs9/example-text.vcproj: * win32/vs9/example-video.vcproj: * win32/vs9/example-viewportopacity.vcproj: * win32/vs9/example-viewportprojection.vcproj: Generate debug informations in Debug configuration. 2008-07-09 Guillaume Emont * pgm/pgmimage.c: Fixed the handling of vertical PGM_IMAGE_CENTER in pgm_image_from_drawable() and pgm_image_to_drawable(). Fixed an == that should have been an & in handling of PGM_IMAGE_RIGHT for the same functions. * tests/check/pgm/pgmimage.c: Added tests for the fix above. * pgm/pgmimage.h: Clarified documentation of PGM_IMAGE_CENTER. 2008-07-07 Loïc Molinari * plugins/opengl/pgmglxbackend.c: * plugins/opengl/pgmwglbackend.c: * plugins/opengles/pgmgleseglbackend.c: * plugins/opengles/pgmglesxbackend.c: Increased event source priorities in plugin rendering main loops. 2008-07-07 Guillaume Emont * plugins/opengl/pgmcontext.c: Don't use g_source_remove() for sources not in the default main context. fixes #261 2008-07-07 Guillaume Emont * pgm/pgmdrawable.c: * pgm/pgmdrawable.h: Added the PgmDrawable::motion, PgmDrawable::entered and PgmDrawable::left signals. * docs/pgm/tmpl/pgmdrawable.sgml: Updated documentation for these new signals. * examples/image.c: Added the printing of the new signals. fixes #255 2008-07-04 Loïc Molinari * plugins/opengl/pgmwglbackend.c: * plugins/opengl/pgmwglbackend.h: Use a local variable instead of instance one for initial window rect. * win32/common/libpigment.def: Added new missing symbols. 2008-07-04 Loïc Molinari * plugins/opengl/pgmwglbackend.c: Return the window handle as embedding ID. fixes #263 2008-07-03 Loïc Molinari * plugins/opengl/pgmwglbackend.c: * plugins/opengl/pgmwglbackend.h: Use a top most window in fullscreen mode. Do not store the window style. Create the window with an overlapped-window default style. Do not use clip siblings/children styles. Removed the thick frame in non-decorated state. Do not change the decoration state in fullscreen. * examples/viewportopacity.c: * examples/rotations.c: Added fullscreen switch key binding. * pgm/pgmdrawable.c: * pgm/pgmdrawable.h: * pgm/pgmimage.c: Coding style fixes. * win32/common/libpigment.def: Sorted symbols alphabetically. * win32/common/pgmversion.h: Added 2008 to the header. * win32/vs9/example-dragndrop.vcproj: * win32/vs9/example-image.vcproj: * win32/vs9/example-mappingmatrix.vcproj: * win32/vs9/example-rotations.vcproj: * win32/vs9/example-sphere.vcproj: * win32/vs9/example-text.vcproj: * win32/vs9/example-video.vcproj: * win32/vs9/example-viewportopacity.vcproj: * win32/vs9/example-viewportprojection.vcproj: * win32/vs9/libpgmboilerplate.vcproj: * win32/vs9/libpgmopengl.vcproj: * win32/vs9/libpigment-0.3.vcproj: Don't use incremental linking in Debug. 2008-07-04 Guillaume Emont * pgm/pgmdrawable.c: Modified get_line_intersection() so that the drawable transformation is taken into account for picking. fixes #256 2008-07-03 Guillaume Emont * pgm/pgmdrawable.c: Added a clearing of the PGM_DRAWABLE_ORIGIN flag in pgm_drawable_set_position(). 2008-07-03 Guillaume Emont * pgm/pgmdrawable.c: * pgm/pgmdrawable.h: Added pgm_drawable_from_canvas() and pgm_drawable_to_canvas(). * pgm/pgmimage.c: * pgm/pgmimage.h: Added pgm_image_from_drawable() and pgm_image_to_drawable(). * docs/pgm/pigment-sections.txt: * docs/pgm/tmpl/pgmdrawable.sgml: * docs/pgm/tmpl/pgmimage.sgml: Documentation update. * tests/check/common/pgmcheck.h: * tests/check/pgm/pgmdrawable.c: * tests/check/pgm/pgmimage.c: Added tests for the new functions. * pgm/pgmviewport.h: Typo fix in documentation. fixes #257 2008-07-02 Loïc Molinari * pgm/pgmdrawable.c: Do not process picking for transparent drawables. fixes #262 2008-07-02 Loïc Molinari * plugins/opengl/pgmwglbackend.c: * plugins/opengl/pgmwglbackend.h: Do not show the window at its creation. Call SetWindowPos with the SWP_SHOWWINDOW flag bit set only when the window is shown. * examples/image.c: Start in fullscreen. fixes #260 2008-07-02 Loïc Molinari * win32/vs9/Makefile.am: Added MSVC9 project files to the dist. 2008-07-02 Loïc Molinari * examples/viewportopacity.c: * pgm/pgmimagesink.c: Fixed cast warnings. * plugins/opengl/pgmprogram.c: Included stdio.h for sprintf. * plugins/opengl/pgmtexture.h: Fixed typos in comments. * pgm/pgmviewport.c: Use _close instead of close on Windows due to deprecation. Fixed cast warnings. * win32/vs9/example-dragndrop.vcproj: * win32/vs9/example-image.vcproj: * win32/vs9/example-mappingmatrix.vcproj: * win32/vs9/example-rotations.vcproj: * win32/vs9/example-sphere.vcproj: * win32/vs9/example-text.vcproj: * win32/vs9/example-video.vcproj: * win32/vs9/example-viewportopacity.vcproj: * win32/vs9/example-viewportprojection.vcproj: * win32/vs9/libpgmboilerplate.vcproj: * win32/vs9/libpgmopengl.vcproj: * win32/vs9/libpigment-0.3.vcproj: * win32/vs9/pigment.sln: Added MSVC9 solution. * win32/vs8/_pgm.vcproj: * win32/vs8/libgstpgmimagesink.vcproj: * win32/vs8/libpgmboilerplate.vcproj: * win32/vs8/libpgmopengl.vcproj: * win32/vs8/libpigment-0.3.vcproj: * win32/vs8/pigment-image.vcproj: * win32/vs8/pigment.sln: Removed unsupported and broken MSVC8 solution. * win32/README.txt: Updated description of win32 support. * win32/common/libpigment.def: Updated symbol list. 2008-06-25 Loïc Molinari * pgm/pgmviewport.c: * plugins/opengl/pgmcontext.c: Tell the GIOChannels to automatically close the file descriptors when unref'd. It allows Pigment not to directly call close() avoiding deadlocks on Windows systems where GLib creates dedicated threads for IO watches. * plugins/opengles/pgmgleseglbackend.c: Fixed typos in comments. fixes #254 2008-06-25 Loïc Molinari * plugins/opengl/pgmwglbackend.c: Added missing call to wglSwapIntervalEXT() by default if available. Cleaned up coding style. 2008-06-25 Loïc Molinari * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmcontext.h: * plugins/opengl/pgmglviewport.c: Cleaned up rendering thread termination. 2008-06-12 Loïc Molinari * pgm/pgmviewport.c: * pgm/pgmviewport.h: Added the "update-pass" signal the user can use to perform object update prior to each rendering. Added the pgm_viewport_emit_update_pass function. * plugins/opengl/pgmglviewport.c: * plugins/opengles/pgmglesviewport.c: Added support for the 'update-pass' signal in the plugins. Changed the update timeout removal to ensure the update source is not going to be removed. * examples/gtk.c: * examples/mappingmatrix.c: * examples/rotations.c: Adapted examples. * docs/pgm/pigment-sections.txt: * docs/pgm/tmpl/pgmviewport.sgml: * win32/common/libpigment.def: Adapted doc and symbol list. fixes #253 2008-06-09 Loïc Molinari * pgm/pgmdrawable.c: * pgm/pgmdrawable.h: Added support for rotation around the center of the drawables. Added the pgm_drawable_[set,get]_rotation_[x,y,z] functions. * plugins/opengl/pgmgldrawable.c: * plugins/opengl/pgmgldrawable.h: * plugins/opengl/pgmglviewport.c: * plugins/opengl/pgmglviewport.h: Added support for rotations in the plugin. When rendered, each drawable now push its modelview matrix if it's not the identity. * examples/Makefile.am: * examples/rotations.c: Added example demonstrating rotations. * examples/gtk.c: Made the star rotate. * win32/common/libpigment.def: * docs/pgm/pigment-sections.txt: * docs/pgm/tmpl/pgmdrawable.sgml: Updated exports and documentation for the new symbols. fixes #251 2008-06-05 Loïc Molinari * plugins/opengl/pgmglxbackend.c: Changed the default vblank method to video_sync for the Intel G33 GPU series to avoid a kernel freeze... fixes #249 2008-06-02 Loïc Molinari Patch by: Bernhard Kaindl * plugins/opengl/pgmglxbackend.c: Switch to glXChooseVisual if glXChooseFBConfig returned NULL which allows to create a window in that case. * plugins/opengl/pgmcontext.c: Check if the window has been created correctly. Put a g_print instead of a GST_ERROR if the context/window tests don't pass, it's a workaround to put a correct error message in release packages. Waiting for correct error handling in that part of the code. fixes #239 2008-05-26 Loïc Molinari * pgm/pgmevents.h: * pgm/pgmviewport.h: Removed the PgmEventDelete structure, it was containing a delete field which is a C++ keyword. The viewport "delete-event" signal now takes a PgmEvent as parameter instead of a PgmEventDelete. The side effect apart from API breakage is that it's not possible anymore to know the time of a delete event. The new behaviour now mimicks extactly what GTK+ does. * plugins/opengl/pgmaglbackend.c: * plugins/opengl/pgmglxbackend.c: * plugins/opengl/pgmwglbackend.c: * plugins/opengles/pgmglesxbackend.c: Updated the plugins for the PgmEventDelete removing. * docs/pgm/pigment-sections.txt: * docs/pgm/tmpl/pgmevents.sgml: Updated documentation for the PgmEventDelete removing. fixes #248 2008-05-19 Loïc Molinari * pgm/pgmviewport.c: * plugins/opengl/pgmgltext.c: * plugins/opengles/pgmgltext.c: Fixed buggy 90° and 270° rotated projection of the canvas when the viewport ratio is smaller than the canvas ratio. 2008-05-09 Loïc Molinari * configure.ac: * examples/Makefile.am: * examples/xpixmapsystembuffer.c: * examples/xwindowsystembuffer.c: Separated the x11systembuffer.c example in two examples, the first one using X11 pixmaps as system buffers, and the second using X11 windows as system buffers. Added a opacity fading effect on the images. * examples/viewportprojection.c: Added key bindings for the keypad. 2008-05-08 Loïc Molinari * docs/pgm/tmpl/pgmviewport.sgml: * examples/viewportprojection.c: * pgm/pgmviewport.c: * pgm/pgmviewport.h: Removed useless PGM_VIEWPORT_REFLECTION_HORIZONTAL_VERTICAL_FLIP field from PgmViewportReflection. 2008-05-08 Loïc Molinari * pgm/pgmviewport.c: * pgm/pgmviewport.h: Added support to rotate and reflect the projection of a canvas. * examples/Makefile.am: * examples/viewportprojection.c: Added example demonstrating the rotation/reflection functions. * docs/pgm/pigment-sections.txt: * docs/pgm/tmpl/pgmviewport.sgml: Updated docs for the new symbols. * win32/common/libpigment.def: Added the new symbols. fixes #245 2008-05-07 Loïc Molinari * plugins/opengl/pgmglxbackend.c: * plugins/opengl/pgmglxbackend.h: removed glXGetFBConfigs procedure address retrieving since it's not used and returns NULL with some DRI drivers when the LIBGL_ALWAYS_INDIRECT environment variable is set. 2008-05-07 Loïc Molinari * pgm/pgmimage.c: * pgm/pgmimage.h: Added support to map system buffers. Added the pgm_image_set_from_system_buffer, pgm_image_system_buffer_lock and pgm_image_system_buffer_unlock functions. Added the PgmImageSystemBuffer structure. Added PGM_IMAGE_SYSTEM_BUFFER to PgmImageStorageType. * pgm/pgmdrawable.h: Added PGM_IMAGE_DATA_SYSTEM_BUFFER and PGM_IMAGE_SYSTEM_BUFFER_CONTENT to PgmDrawableProperty. * pgm/pgmviewport.h: Added PGM_VIEWPORT_X11_SYSTEM_BUFFER to PgmViewportCapacity. * plugins/opengl/pgmbackend.c: * plugins/opengl/pgmbackend.h: * plugins/opengl/pgmglimage.c: * plugins/opengl/pgmglimage.h: * plugins/opengl/pgmglviewport.c: * plugins/opengl/pgmglviewport.h: * plugins/opengl/pgmglxbackend.c: * plugins/opengl/pgmglxbackend.h: * plugins/opengl/pgmtexture.c: * plugins/opengl/pgmtexture.h: Added support for system buffers through the GLX_EXT_texture_from_pixmap extension. It only works ATM for card/driver with support for non-power-of-two textures. Changed the way framebuffer configurations are retrieved in the GLX backend so that not only the XVisualInfo are returned but also the GLXFBConfig list with the corresponding index. * configure.ac: * examples/Makefile.am: * examples/x11systembuffer.c: Added example demonstrating the use of X11 pixmaps in pigment images. * docs/pgm/pigment-sections.txt: * docs/pgm/tmpl/pgmdrawable.sgml: * docs/pgm/tmpl/pgmimage.sgml: Updated documentation for the system buffers. * win32/common/libpigment.def: Added new symbols for the system buffers. fixes #244 2008-05-02 Loïc Molinari * pgm/pgmimage.c: Fixed copy-pasted code resulting in badly initialized image from buffer. 2008-04-25 Gernot Klimscha * plugins/opengl/pgmwglbackend.c: Added missing storage type for update_viewport_size. Do not resize in WM_SIZE in case of minimization. 2008-04-21 Guillaume Emont * autogen.sh: Told autoreconf (and therefore automake) to ignore portability warning. 2008-04-17 Loïc Molinari * plugins/opengl/pgmglxbackend.c: * plugins/opengles/pgmgleseglbackend.c: Correctly set the event source timeouts in prepare callbacks depending on the rendering source types and state. 2008-04-16 Loïc Molinari * configure.ac: * plugins/opengles/pgmgleseglbackend.c: * plugins/opengles/pgmgleseglbackend.h: * plugins/opengles/pgmglesviewport.c: Added support for tslib. * examples/image.c: Adapted to new drawable signal prototypes. * pgm/pgmmarshal.list: * pgm/pgmdrawable.c: * pgm/pgmdrawable.h: Added a drawable "pressured" signal. Added a pressure parameter to the drawable "pressed", "clicked", "drag-begin", "drag-motion" signals. Added the x, y, z parameters to the drawable "released" signal. Improved documentation. * pgm/pgmevents.h: Added a PGM_BUTTON_PRESSURE event type. Added a pressure field to the motion and button events. * pgm/pgmviewport.c: * pgm/pgmviewport.h: Added a viewport "button-pressure-event" signal. Added a touchpad-aware capacity flag. * plugins/opengl/pgmglxbackend.c: Filled up the pressure field with 0. fixes #223 2008-04-16 Loïc Molinari * docs/pgm/running.xml: Added OpenGL ES plugin environment variable descriptions. 2008-04-14 Guillaume Emont * common/ChangeLog: * common/Makefile.am: * common/check.mak: * common/gettext.patch: * common/glib-gen.mak: * common/gst-autogen.sh: * common/gst.supp: * common/m4/Makefile.am: * common/m4/as-ac-expand.m4: * common/m4/as-compiler-flag.m4: * common/m4/as-version.m4: * common/m4/ax_create_stdint_h.m4: * common/m4/check.m4: * common/m4/gst-arch.m4: * common/m4/gst-args.m4: * common/m4/gst-check.m4: * common/m4/gst-cpu-tune.m4: * common/m4/gst-error.m4: * common/m4/gst-fionread.m4: * common/m4/gst-plugindir.m4: * common/m4/gst-valgrind.m4: * common/m4/gst.m4: * common/release.mak: Dropped common as an svn:externals and added it as a normal directory. fixes #224 2008-04-01 Loïc Molinari Patch by: Gernot Klimscha * plugins/opengl/pgmwglbackend.c: Reduced timeout resize/move value. Removed WM_WINDOWPOSCHANGED handling to avoid recursive main loop iteration warning. 2008-03-27 Guillaume Emont Patch by: Gernot Klimscha * pgm/pgmcanvas.c: * pgm/pgmmodule.c: Fixed format strings. * examples/mappingmatrix.c: * pgm/pgmimagesink.c: * pgm/pgmviewportfactory.c: Added casts. Added the final NULL to some GTypeInfos. * plugins/opengl/pgmwglbackend.c: Added NULLs to message_funcs. Fixed the logic of pgm_wgl_backend_set_visibility(). * win32/common/libpigment.def: Added pgm_viewport_get_frame_rate to the list of symbols to be exported. 2008-03-14 Loïc Molinari * configure.ac: * plugins/Makefile.am: * plugins/opengles/*: Added the OpenGL ES-CM 1.X plugin. * plugins/opengl/pgmglxbackend.h: Removed unused structure field. * plugins/opengl/pgmcontext.c: Made use of PGM_GL_* defines instead of GL_*. * pgm/pgmmodule.c: Get the string length from the requested module plugin name. === release 0.3.5 === 2008-03-03 Loïc Molinari * plugins/opengl/pgmcontext.c: Changed logging level of update add/remove sources to debug. fixes #228 2008-02-29 Loïc Molinari * pgm/pgmdrawable.c: Process a release event when there's an ongoing drag even if the drawable is invisible. 2008-02-26 Loïc Molinari * docs/pgm/running.xml: * plugins/opengl/pgmglxbackend.c: Added the PGM_GL_INDIRECT_RENDERING environment variable to request the creation of an indirectly rendered OpenGL context. 2008-02-25 Loïc Molinari * plugins/opengl/pgmglimage.c: Change the border vertices position in the same time than the drawable vertices. * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmglxbackend.c: * plugins/opengl/pgmwglbackend.c: Disabled and removed depth buffer and depth testing. Pigment 0.3 is 2D and the sorting is done in the CPU. 2008-02-25 Guillaume Emont * tests/interactive/pgmimage.c: * tests/interactive/pgmtext.c: * tests/interactive/test_image_alpha_render.png: * tests/interactive/test_image_alpha_render_noblend.png: * tests/interactive/test_text_alpha_render.png: * tests/interactive/test_text_alpha_render_noblend.png: Added tests on the handling of alpha values, including tests with blending deactivated to check that stuff with alpha 0 isn't rendered (see r1069). 2008-02-25 Guillaume Emont * tests/interactive/pgmtext.c: Changed interactive tests to reflect the font height definition change introduced in r1040. * tests/interactive/test_text_alignment.png: * tests/interactive/test_text_attributes.png: * tests/interactive/test_text_basic.png: * tests/interactive/test_text_font.png: * tests/interactive/test_text_gravity.png: * tests/interactive/test_text_justify.png: * tests/interactive/test_text_style.png: * tests/interactive/test_text_wrap.png: Updated rendering captures to reflect these changes. 2008-02-15 Loïc Molinari * plugins/opengl/pgmgldrawable.c: * plugins/opengl/pgmglimage.c: * plugins/opengl/pgmgltext.c: Do not render primitives when alpha component is 0.0f. 2008-02-12 Loïc Molinari * pgm/pgmviewport.c: * pgm/pgmviewport.h: * win32/common/libpigment.def: * docs/pgm/pigment-sections.txt: * docs/pgm/tmpl/pgmviewport.sgml: Added pgm_viewport_[set,get]_alpha_blending functions. * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmcontext.h: * plugins/opengl/pgmglviewport.c: Implemented the alpha blending functions. * examples/video.c: Disabled alpha blending. 2008-02-11 Loïc Molinari * pgm/pgmevents.c: * pgm/pgmevents.h: Added new event structure PgmEventDnd handling three new type PGM_DRAG_MOTION, PGM_DRAG_DROP and PGM_DRAG_LEAVE. * pgm/pgmmarshal.list: * pgm/pgmviewport.c: * pgm/pgmviewport.h: Added signals "drag-motion-event", "drag-drop-event" and "drag-leave-event" to handle drag and drop. Added virtual function set_drag_status. Clamp z coordinate given to viewport_to_canvas in [0.0, 1.0]. Added possibility to easily convert 2D viewport coordinates to canvas coordinates. * plugins/opengl/pgmaglbackend.c: * plugins/opengl/pgmbackend.c: * plugins/opengl/pgmbackend.h: * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmcontext.h: * plugins/opengl/pgmglviewport.c: * plugins/opengl/pgmglviewport.h: * plugins/opengl/pgmglxbackend.c: * plugins/opengl/pgmglxbackend.h: * plugins/opengl/pgmwglbackend.c: Implemented drag 'n drop support. Simplified X atoms manipulation putting them in a dedicated array. Do not discard event with XSync. * docs/pgm/pigment-sections.txt: * docs/pgm/tmpl/pgmevents.sgml: * docs/pgm/tmpl/pgmviewport.sgml: Updated docs for the new API. * examples/Makefile.am: * examples/dragndrop.c: * examples/pictures/pattern.png: Added drag 'n drop example. 2008-02-08 Guillaume Emont * plugins/opengl/pgmgltext.c: Use setlocale() + pango_language_from_string() instead of pango_language_get_default() if we have pango < 1.16. 2008-02-07 Loïc Molinari * pgm/pgmviewport.c: Moved get_clear_color to get_opacity. * plugins/opengl/pgmcontext.c: Reset FPS value when removing the update source. 2008-02-06 Guillaume Emont * configure.ac: Added -I$(top_builddir)/pgm to PGM_ALL_CFLAGS, needed to allow VPATH builds (and checks) because of generated .h files. 2008-02-06 Loïc Molinari * pgm/pgmviewport.c: * pgm/pgmviewport.h: * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmcontext.h: * plugins/opengl/pgmglviewport.c: * docs/pgm/pigment-sections.txt: * docs/pgm/tmpl/pgmviewport.sgml: Added the pgm_viewport_get_frame_rate function. * examples/mappingmatrix.c: Added an example demonstrating the use of the new function. 2008-02-06 Loïc Molinari * pgm/pgmviewport.c: * pgm/pgmviewport.h: * plugins/opengl/pgmaglbackend.c: * plugins/opengl/pgmbackend.c: * plugins/opengl/pgmbackend.h: * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmcontext.h: * plugins/opengl/pgmglviewport.c: * plugins/opengl/pgmglxbackend.c: * plugins/opengl/pgmwglbackend.c: * win32/common/libpigment.def: * docs/pgm/pigment-sections.txt: * docs/pgm/tmpl/pgmviewport.sgml: Moved PgmViewportCapacity::PGM_VIEWPORT_ALPHA_CLEAR_COLOR to PgmViewportCapacity::PGM_VIEWPORT_OPACITY. Moved pgm_viewport_[get,set]_clear_color to pgm_viewport_[get,set]_opacity. * examples/Makefile.am: * examples/clearcolor.c: * examples/viewportopacity.c: Renamed clearcolor to viewportopacity. 2008-02-06 Loïc Molinari * plugins/opengl/pgmglxbackend.c: * docs/pgm/running.xml: Search a RGB visual by default. ARGB visuals have issues and are for the moment only used on demand with the PGM_GL_ARGB_VISUAL environment variable. * plugins/opengl/pgmprogram.c: * plugins/opengl/pgmcontext.c: Modified logging levels to avoid too many outputs by default. 2008-02-06 Loïc Molinari * plugins/opengl/pgmglxbackend.h: * plugins/opengl/pgmglxbackend.c: Use the glXGetProcAddressARB function instead of glXGetProcAddress since the Linux OpenGL ABI requires that all libGL implementations on Linux statically export glXGetProcAddressARB. Thus NVIDIA's libGL does not export glXGetProcAddress in their old drivers. Added logging showing whether or not the created OpenGL context supports direct rendering. 2008-02-06 Guillaume Emont * pgm/pgmtext.c: * pgm/pgmtext.h: * plugins/opengl/pgmgltext.c: Changed the definition of the font height: now proportional to the height of the drawable. * examples/text.c: * tests/check/pgm/pgmtext.c: Updated example and test to reflect the new text height definition. 2008-02-04 Guillaume Emont * autogen.sh: Ensures we are in the path where the script is (needed for buildbot). 2008-02-04 Guillaume Emont * pgm/pgmtext.c: Fixed a small documentation bug (@height instead of @font_height). 2008-01-31 Loïc Molinari * plugins/opengl/pgmglxbackend.c: Added logging for each X generated events. 2008-01-31 Loïc Molinari * plugins/opengl/pgmglxbackend.c: Moved event handling source addition before XEmbed initialization. handled ISO_Left_Tab to request the previous widget focus. fixes #194 2008-01-31 Guillaume Emont * plugins/opengl/pgmglxbackend.c: * plugins/opengl/pgmglxbackend.h: Merged rendering and event threads, to avoid deadlocks when using Xlib/XCB. Added compression (resampling) of MotionNotify events. * plugins/opengl/pgmcontext.c: Changed the priority of the idle (rendering) update source, so that it has a priority as important as the other sources (we don't need to check for events twice between each frame, do we?). fixes #186 2008-01-30 Loïc Molinari * plugins/opengl/pgmaglbackend.c: * plugins/opengl/pgmbackend.c: * plugins/opengl/pgmbackend.h: * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmglxbackend.c: * plugins/opengl/pgmglxbackend.h: * plugins/opengl/pgmwglbackend.c: Added support for freedesktop's startup notification specification in the OpenGL plugin. fixes #170 2008-01-29 Loïc Molinari * plugins/opengl/pgmcontext.c: Added more logging for OpenGL support. 2008-01-28 Loïc Molinari * pgm/pgmviewport.c: * plugins/opengl/pgmcontext.c: Changed viewport alpha clear color to 255 by default. * examples/clearcolor.c: Set the window title. * examples/gtk.c: Changed the image to star.png. 2008-01-28 Loïc Molinari * pgm/pgmviewport.c: * pgm/pgmviewport.h: * win32/common/libpigment.def: Removed PGM_VIEWPORT_HAS_CAPS broken macro. Added the PGM_VIEWPORT_ALPHA_CLEAR_COLOR capacity to PgmViewportCapacity. Added the pgm_viewport_[get,set]_clear_color functions. * examples/Makefile.am: * examples/clearcolor.c: * examples/pictures/Makefile.am: Added an example demo'ing the new clear color functions. * plugins/opengl/pgmaglbackend.c: * plugins/opengl/pgmbackend.c: * plugins/opengl/pgmbackend.h: * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmcontext.h: * plugins/opengl/pgmgldefs.h: * plugins/opengl/pgmglviewport.c: * plugins/opengl/pgmglxbackend.c: * plugins/opengl/pgmglxbackend.h: * plugins/opengl/pgmwglbackend.c: Changed backend show/hide functions to set_visibility. Used the immediate queue for the set_visibility backend function. Added the glBlendFuncSeparate to the GL loaded functions. Implemented the set_clear_color functions adding ARGB visual support to the GLX backend. * docs/pgm/pigment-sections.txt: * docs/pgm/tmpl/pgmviewport.sgml: Added the new symbols to the documentation. * pgm/pgmimagesink.c: Removed trailing windows EOF. fixes #215 2008-01-25 Loïc Molinari * plugins/opengl/pgmgltext.c: * plugins/opengl/pgmgltext.h: Force subpixel text antialiasing. === release 0.3.4 === 2008-01-22 Loïc Molinari * configure.ac: Correctly check for the sincosf, sinf, cosf and fabs functions. * pgm/pgmcommon.h: Added support in PGM_SINCOS when there's no sinccosf nor sinf/cosf by simply using sin/cos. * pgm/pgmplugin.h: * pgm/pgmmodule.c: Added a version field in the plugin description structure. Adapted the PGM_PLUGIN_DEFINE macro. Test for the correct version string in the module loader. Added logging. * plugins/boilerplate/pgmbp.c: * plugins/opengl/pgmgl.c: Added version paramater to plugin definitions. * examples/gtk.c: * examples/image.c: * examples/mappingmatrix.c: * examples/sphere.c: * examples/text.c: * examples/video.c: Changed gl variable name to viewport. Init viewport to NULL to correctly test for factory_make success. Generalized the factory_make failure displayed error string. 2008-01-21 Loïc Molinari * configure.ac: * pgm/pgmmodule.c: * pigment.spec.in: * pkgconfig/pigment.pc.in: * plugins/boilerplate/Makefile.am: * plugins/opengl/Makefile.am: * win32/common/config.h: Modified plugin path including @VERSION@ since Pigment doesn't guarantee ABI compatibility between core and plugin versions. 2008-01-21 Loïc Molinari * pgm/pgmviewport.c: * pgm/pgmviewport.h: Added the pgm_viewport_[get,set]_decorated functions. * plugins/opengl/pgmaglbackend.c: * plugins/opengl/pgmbackend.c: * plugins/opengl/pgmbackend.h: * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmcontext.h: * plugins/opengl/pgmglviewport.c: * plugins/opengl/pgmglxbackend.c: * plugins/opengl/pgmwglbackend.c: Implemented the set_decorated functions in the OpenGL plugin. * examples/mappingmatrix.c: Added decorations add/remove. * win32/common/libpigment.def: * docs/pgm/pigment-sections.txt: Added new symbols. 2008-01-17 Loïc Molinari * docs/pgm/pigment-docs.sgml: Just print the package version. * plugins/opengl/pgmgltext.c: Added support to write the surface to a PNG on Win32. === release 0.3.3 === 2008-01-16 Loïc Molinari * Makefile.am: * configure.ac: * win32/Makefile.am: * win32/common/Makefile.am: * win32/vs6/Makefile.am: Added win32 files to dist. * examples/image.c: * pgm/pgmimagesink.h: * pgm/pgmlinearalgebra.c: Removed win32 EOF. * win32/README.txt: Added explanations. 2008-01-15 Loïc Molinari * examples/image.c: Added comments. * pgm/pgmimagesink.h: Removed inclusion of pgm/pgm.h adding only needed headers. * pgm/pgmlinearalgebra.c: * pgm/pgmviewport.c: Fixed compilation warnings with MSVC6. * pgm/win32: Adapted MSCV6 configuration files for the Python binding split. 2008-01-15 Loïc Molinari * tests/check/pgm/pgmimage.c: Fixed compilation warning. 2008-01-15 Loïc Molinari * docs/pgm/Makefile.am: Removed unneeded include directories in CFLAGS. Added GTK+ widget files to the rebuild dependency globs. * pgm/pgmlinearalgebra.c: Added description on the notation and convention used. Fixed wrong rotation signs. * tests/check/pgm/pgmlinearalgebra.c: * examples/gtk.c: Adapted to core changes. 2008-01-15 Guillaume Emont * pgm/Makefile.am: Fixed core test coverage reporting. 2008-01-15 Loïc Molinari * configure.ac: Removed unneeded AC_SUBST. Cleaned up commentaries. * plugins/opengl/pgmcontext.c: Added logging specifying the type of update source added. 2008-01-14 Loïc Molinari * configure.ac: * pgm/Makefile.am: * pgm/gtk/Makefile.am: * plugins/boilerplate/Makefile.am: * plugins/opengl/Makefile.am: * docs/pgm/version-full.xml.in: * examples/Makefile.am: * pgm/pgm.c: Simplified the use of the cflags and libs variables. Added check for SVN version using the nano number. Made use of -Werror for SVN builds. Made use of GST_LEVEL_INFO for pgm_* for SVN build. * examples/image.c: * examples/sphere.c: * examples/video.c: * pgm/gtk/pgmgtk.c: Fixed compilation warnings. 2008-01-14 Guillaume Emont * tests/interactive/Makefile.am: Fixed the path to libpigment-gtk. 2008-01-11 Loïc Molinari * examples/gtk.c: Added a rotation to the logo. 2008-01-11 Loïc Molinari Python binding split. fixes #211 2008-01-10 Loïc Molinari * examples/pypgm/Makefile.am: Fixed wrong example name. * examples/pgm/gtk.c: * examples/pypgm/pgmgtk.py: Set border widths to 5. 2008-01-09 Loïc Molinari * pgm/gtk/pgmgtk.c: * pgm/gtk/pgmgtk.h: * docs/pgm/pigment-sections.txt: Added pgm_gtk_get_viewport symbol. * libs/pypgm/pgm/Makefile.am: Force recompilation when pgmgtk.override or pgmgtk.c change. * libs/pypgm/pgm/pgmgtk.defs: * libs/pypgm/pgm/pgmgtk.override: Added the new symbol. Added the viewport field. * examples/pypgm/Makefile.am: * examples/pypgm/pgmgtk.py: Added example integrating Pigment with GTK+ in Python. 2008-01-09 Guillaume Emont * tests/check/common/pgmcheck.c: * tests/check/common/pgmcheck.h: Added PGM_START_TEST / PGM_END_TEST macros, that add support for a PGM_CHECKS environment variable. * tests/check/pgm/pgm.c: * tests/check/pgm/pgmcanvas.c: * tests/check/pgm/pgmdrawable.c: * tests/check/pgm/pgmimage.c: * tests/check/pgm/pgmlinearalgebra.c: * tests/check/pgm/pgmtext.c: * tests/check/plugins/common/pgmcanvas.c: * tests/check/plugins/common/pgmimage.c: * tests/check/plugins/common/pgmviewportfactory.c: * tests/check/plugins/opengl/pgmgldrawable.c: Updated to use PGM_START_TEST / PGM_END_TEST. * tests/check/plugins/common/pgmviewport.c: Updated to use PGM_START_TEST / PGM_END_TEST. Now checks that the callback is called in the test for pgm_viewport_read_pixels(). Also fixed the callback prototype. * tests/README: Added documentation on how to run the tests and how to create new ones. * tests/interactive/interactive_tests.h: * tests/interactive/interface.glade: * tests/interactive/interface.xml: * tests/interactive/main.c: * tests/interactive/pgmimage.c: * tests/interactive/test_image_alignment_scaled_horiz.png: * tests/interactive/test_image_alignment_scaled_vert.png: * tests/interactive/test_image_alignment_zoomed.png: * tests/interactive/test_image_basic.png: * tests/interactive/test_image_layout.png: * tests/interactive/test_text_alignment.png: * tests/interactive/test_text_attributes.png: * tests/interactive/test_text_basic.png: * tests/interactive/test_text_ellipsize.png: * tests/interactive/test_text_font.png: * tests/interactive/test_text_gravity.png: * tests/interactive/test_text_justify.png: * tests/interactive/test_text_style.png: * tests/interactive/test_text_wrap.png: * tests/interactive/Makefile.am: * tests/interactive/pgmtext.c: Added interactive visual tests for real. * configure.ac: Added a check for libglade which is used by interactive tests if GtkBuilder is present (gtk+ < 2.12). * examples/pgm/sphere.c: Use g_malloc0() instead of calloc(), for consistency, esp. with the fact that we use g_free() for that buffer. * pgm/pgmtext.c: Fixed a documentation issue (default font height is 0.1f not 0.25f). * pgm/pgmviewport.c: Added some documentation for plugin writers regarding pgm_viewport_push_pixels(). * plugins/boilerplate/pgmbpviewport.c: Added support for read_pixels() in the boilerplate plugin. 2008-01-09 Loïc Molinari * configure.ac: * pgm/pgm.c: Added a workaround for GStreamer versions older than 0.10.13 which prevent from registering static plugin giving NULL as the plugin parameter. 2008-01-09 Loïc Molinari * configure.ac: * libs/Makefile.am: * libs/pgm/Makefile.am: * libs/pgm/gtk/Makefile.am: * libs/pgm/gtk/pgmgtk.c: * libs/pgm/gtk/pgmgtk.h: * libs/pypgm/pgm/Makefile.am: * examples/pgm/Makefile.am: * pgm/Makefile.am: Moved the pgmgtk external library to a pgm sources subdir. * pgm/gtk/pgmgtk.c: * docs/pgm/pigment-docs.sgml: * docs/pgm/pigment.types: * docs/pgm/pigment-sections.txt: * docs/pgm/Makefile.am: Added PgmGtk to the docs. Improved the pigment description. Added an introduction section. fixes #195 2008-01-08 Loïc Molinari * AUTHORS: Moved Alessandro and Benjamin to the author part. * pigment.spec.in: Removed the pgmimagesink from the package. 2008-01-08 Loïc Molinari * pgm/pgmdrawable.c: Clamped allowed drawable sizes to ([0.0, MAX_FLOAT], [0.0, MAX_FLOAT]). 2008-01-08 Loïc Molinari * pgm/pgmviewport.c: Return a ref of the icon in pgm_viewport_get_icon. * libs/pypgm/pgm/pgmviewport.override: Unref the icon after the returned PyObject creation in Viewport.get_icon. 2008-01-08 Loïc Molinari * configure.ac: * pgm/Makefile.am: * pgm/pgm.c: * pgm/pgm.h: Removed the GStreamer image sink plugin, it is now statically linked to libpigment. Register the statically linked sink in pgm_init. * pgm/pgmimagesink.c: * pgm/pgmimagesink.h: Added pgm_image_sink_new and pgm_image_sink_[get,set]_image symbols. * docs/pgm/Makefile.am: * docs/pgm/pigment-sections.txt: * docs/pgm/pigment.types: * docs/pgm/tmpl/pgmimagesink.sgml: Added docs for the new symbols. * misc/pgm-uninstalled: * tests/pypgm/run.py: * tests/pypgmtools/run.py: Removed the GST_PLUGIN_PATH environment variable definition. fixes #123 2008-01-07 Guillaume Emont * plugins/opengl/pgmgltext.c: Optimised again unpremultiply_alpha(), for cases where alpha is 0 and 255 (there was a performance regression with my previous commit). 2008-01-07 Loïc Molinari * pgm/pgmmarshal.list: * pgm/pgmviewport.c: * pgm/pgmviewport.h: Added pgm_viewport_[read/push]_pixels symbols. Added "pixels-read" signal. Generalized io watch creation/destruction. Removed useless lock in pgm_viewport_dispose. * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmcontext.h: * plugins/opengl/pgmglviewport.c: * plugins/opengl/pgmglviewport.h: Added support for pgm_viewport_read_pixels. * docs/pgm/pigment-sections.txt: * docs/pgm/tmpl/pgmviewport.sgml: Added docs for the new symbols. * tests/check/plugins/common/pgmviewport.c: Added tests for the new symbols. * examples/pgm/Makefile.am: * examples/pgm/sphere.c: Added an example for the read_pixels function. * plugins/opengl/pgmgltext.c: Cosmetic fixes. 2008-01-07 Guillaume Emont * plugins/opengl/pgmgltext.c: Made unpremultiply_alpha() big-endian-proof (hopefully). * examples/pypgm/text.py: Changed the example so that it shows some colours. fixes #81. 2008-01-06 Florian Boucault * pgm/pgmimage.c: pgm_image_clear now cancels any previous set_from_file. 2008-01-06 Florian Boucault * libs/pypgmtools/widgets/grid_ng.py: * libs/pypgmtools/widgets/list_ng.py: Added progressive loading capabilities with a variable number of preloaded items on top of those visible. Do not always relayout on insertion but only when necessary: more efficient. 2008-01-06 Florian Boucault * libs/pypgmtools/widgets/grid_ng.py: * libs/pypgmtools/widgets/list_ng.py: More symetrical approach to compute visible and invisible items. Do not make transparent the item if only one is shown. 2008-01-04 Loïc Molinari * plugins/opengl/pgmglxbackend.c: Logged the x window id. 2008-01-04 Florian Boucault * libs/pypgmtools/widgets/list_ng.py: More generic approach to stopping the deceleration. Fixes cover flow. 2008-01-03 Florian Boucault * libs/pypgmtools/widgets/grid_ng.py: * libs/pypgmtools/widgets/list_ng.py: Stop the deceleration when a drag begins. List dragging resolution raised. 2008-01-03 Florian Boucault * libs/pypgmtools/widgets/grid_ng.py: Merged changes to list_ng from changeset 947 into grid_ng. 2008-01-03 Florian Boucault * libs/pypgmtools/widgets/grid_ng.py: Reverted changeset 946. Needs discussion. 2008-01-03 Alessandro Decina * libs/pypgm/pgm/Makefile.am: Add pgmgtk.c to CLEANFILES. 2008-01-03 Florian Boucault * libs/pypgmtools/widgets/list_ng.py: Moved self._dragging assignments to _drag_begin and _drag_end for more consistency. Factorised code to interrupt deceleration in a separate method which is now called on selected_item__set. 2008-01-03 Benjamin Kampmann * libs/pypgmtools/widgets/grid_ng.py: update the selection part, when needed. fixes a lot of issues 2008-01-03 Loïc Molinari * pgm/pgmdrawable.c: Added logging for mouse picking signal emissions. 2008-01-03 Florian Boucault * libs/pypgmtools/widgets/grid_ng.py: * libs/pypgmtools/widgets/list_ng.py: Drag resolution changed from seconds to milliseconds. Fixes a regression. 2008-01-03 Loïc Molinari * pgm/pgmcanvas.c: Fixed implicit cast warning. 2008-01-03 Florian Boucault * libs/pypgmtools/widgets/grid_ng.py: * libs/pypgmtools/widgets/list_ng.py: Inertia improvement: stop the deceleration if edges are reached. 2008-01-03 Florian Boucault * libs/pypgmtools/widgets/list_ng.py: Set drag_motion_resolution the same as in in Grid. Moved code from Elisa widget ScrolledList for clicking (do_clicked, do_double_clicked). Replaced _compute_drag_position by a simpler and easier to understand range_start_to_selected which is a reciprocal function of selected_item__set. Removed its very frequent calls in dragging. Added inertia like capabilities: while dragging a speed is computed and then used when the dragging ends to fake a deceleration. * libs/pypgmtools/widgets/grid_ng.py: Made the code as similar as possible to list_ng to facilitate maintenance and ease writing a common base class in the future. Direct consequence: same additions and modifications as above. 2008-01-01 Florian Boucault * libs/pypgmtools/widgets/grid_ng.py: * libs/pypgmtools/widgets/list_ng.py: Removed useless time.time calls. Removed unused local variable (old_start). Removed a statement executed twice for no reason. 2007-12-31 Florian Boucault * libs/pypgmtools/utils/image.py: Removed useless commented wrong crashing code. * libs/pypgmtools/utils/maths.py: Sinusoidal interpolation was not reaching the maximal value in 1.0 but in 0.5. * libs/pypgmtools/widgets/grid_ng.py: * libs/pypgmtools/widgets/list_ng.py: Module constant DRAG_THRESHOLD moved to class variable drag_threshold. Factorised widget layout code to a member method layout_widget. 2007-12-31 Florian Boucault * libs/pypgmtools/utils/maths.py: Added sinusoidal interpolation. * libs/pypgmtools/widgets/grid_ng.py: * libs/pypgmtools/widgets/list_ng.py: Invisibility for items now set through their opacity. Fixes extremely annoying bug: items were flickering at random places just before being shown while browsing fast. It was especially visible on slower machines. Root of the issue remains unknown. 2007-12-26 Alessandro Decina * libs/pypgmtools/widgets/grid_ng.py: Fix clicking to handle non int-aligned visible_range_start. Return False and don't emit child-clicked if an empty area of the grid is clicked. 2007-12-22 Florian Boucault * libs/pypgmtools/widgets/sliced_image.py: Parts of the selector should not appear before they are loaded. A widget should never set properties on itself (self.visible = ... is fundamentally wrong). 2007-12-21 Florian Boucault * libs/pypgmtools/widgets/grid_ng.py: * libs/pypgmtools/widgets/list_ng.py: Improved dragging handling. Handles border cases gracefully by applying a simple rule: when the dragging ends the list/grid should not move more than half the size of an item. 2007-12-21 Alessandro Decina * libs/pypgm/pgm/Makefile.am: * libs/pypgm/pgm/__init__.py: * libs/pypgm/pgm/pgmgtk.defs: * libs/pypgm/pgm/pgmgtk.override: * libs/pypgm/pgm/pgmgtkmodule.c: Add bindings for PgmGtk. 2007-12-21 Guillaume Emont * tests/pypgm/test_canvas.py: Fixed the removal tests so that they don't try to work around the bug fixed in my previous commit. 2007-12-21 Loïc Molinari * plugins/opengl/pgmglviewport.c: * plugins/opengl/pgmglviewport.h: Cosmetic fixes. 2007-12-21 Guillaume Emont * pgm/pgmcanvas.c: Now checks that the drawable is in the canvas in pgm_canvas_remove(). 2007-12-21 Loïc Molinari * plugins/opengl/pgmglimage.c: Do not remove one pixel on the bottom and the right side. * plugins/opengl/pgmtexture.c: Initialized the content of the YV12 textures with black. Changed the texture wrapping mode the CLAMP_TO_EDGE so that we don't blend with borders. The issue being that the user sees the clamping when he plays with the mapping matrix. * plugins/opengl/pgmgltext.c: Fixed typo in a commentary. 2007-12-21 Benjamin Kampmann * libs/pypgmtools/widgets/sliced_image.py: make visible after all images got loaded only 2007-12-21 Guillaume Emont * plugins/opengl/pgmgltext.c: Font weight was not updated in update_properties(), meaning it was ignored when seting it before adding the text to the canvas. 2007-12-21 Philippe Normand * examples/pgm/Makefile.am: pgm_gtk headers are in src dir, not build dir. 2007-12-21 Benjamin Kampmann * libs/pypgmtools/widgets/sliced_image.py: now with static size 2007-12-21 Alessandro Decina * libs/pypgmtools/widgets/grid_ng.py: Fix double-click. 2007-12-20 Guillaume Emont * plugins/opengl/pgmglimage.c: * plugins/opengl/pgmgltext.c: * plugins/opengl/pgmglviewport.c: Changed the way we register the "changed" callback in the opengl plugin (fixes a race condition when a drawable property is changed between the creation/sync of the gldrawable and registration of that callback). 2007-12-20 Guillaume Emont * pgm/pgmimage.c: Avoid mixing image and async loader locks. Removed the pixbuf member of the async loader since it is not needed. Now takes a reference to the image in async_loader_read_chunk_cb() to avoid the race condition where the image is disposed before we try to copy the data in it. 2007-12-20 Alessandro Decina * libs/pypgmtools/widgets/grid_ng.py: Set drag_motion_resolution to 0.05 which seems to be a better magic number with the lowest zoom level. 2007-12-20 Lionel Martin * libs/pypgmtools/widgets/grid_ng.py: * libs/pypgmtools/widgets/list_ng.py: update drag_motion resolution to 0.040 2007-12-20 Alessandro Decina * libs/pypgmtools/graph/group.py: * libs/pypgmtools/widgets/list_ng.py: Remove default class closures. 2007-12-20 Lionel Martin * libs/pypgmtools/widgets/grid_ng.py: * libs/pypgmtools/widgets/list_ng.py: drag_motion resolution is now customizable 2007-12-20 Benjamin Kampmann * libs/pypgmtools/timing/implicit.py: allow setting the end_behavior for the controllers 2007-12-20 Loïc Molinari * plugins/opengl/pgmtexture.c: Do not flag as identity the mapping matrix in the clean step. It's asynchronous and could reset a previous mapping matrix. 2007-12-20 Alessandro Decina * libs/pypgmtools/graph/group.py: * libs/pypgmtools/widgets/grid_ng.py: * libs/pypgmtools/widgets/list_ng.py: Move the drag-begin drag-motion drag-end an clicked signals in the Group base class. Add the child-clicked signal to the widgets. 2007-12-20 Florian Boucault * libs/pypgmtools/utils/image.py: Changed the method for allocating the Cairo surface. Fixes crashes. 2007-12-20 Florian Boucault * libs/pypgmtools/widgets/grid_ng.py: Performance improvements. 2007-12-20 Philippe Normand * libs/pypgmtools/utils/image.py: Fixed missing import 2007-12-20 Loïc Molinari * plugins/opengl/pgmglimage.c: Correctly blend the border when the drawable opacity changes. 2007-12-20 Florian Boucault * libs/pypgmtools/utils/image.py: Added a Cairo generated gradient utility function. 2007-12-20 Loïc Molinari * examples/pypgm/border.py: Described bindings on stdout. Fixed title. 2007-12-20 Loïc Molinari * pgm/pgmimage.c: * pgm/pgmimage.h: * pgm/pgmdrawable.h: Added support for borders around images through the pgm_image_[get,set]_border_[width,inner_color,outer_color] symbols. * plugins/opengl/pgmglimage.c: * plugins/opengl/pgmglimage.h: * plugins/opengl/pgmglviewport.c: * plugins/opengl/pgmglviewport.h: Added support for the borders in the OpenGL plugin. * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmcontext.h: * plugins/opengl/pgmgldefs.h: Added new OpenGL definitions. * docs/pgm/pigment-sections.txt: * docs/pgm/tmpl/pgmdrawable.sgml: * docs/pgm/tmpl/pgmimage.sgml: Added docs for the new symbols. * libs/pypgm/pgm/pgm.defs: * libs/pypgm/pgm/pgmimage.override: Added Python binding for the new symbols. * plugins/opengl/pgmgldrawable.c: Do not load the identity before drawing, since the modelview matrix is never modified. fixes #209 2007-12-20 Florian Boucault * libs/pypgmtools/widgets/list_ng.py: Quicker transition to invisible. 2007-12-20 Alessandro Decina * libs/pypgmtools/widgets/list_ng.py: Emit drag events. 2007-12-19 Alessandro Decina * libs/pypgmtools/widgets/grid_ng.py: Emit drag events. 2007-12-19 Alessandro Decina * libs/pypgmtools/widgets/grid_ng.py: * libs/pypgmtools/widgets/list_ng.py: Fix mouse support with touchscreens. 2007-12-19 Florian Boucault * libs/pypgmtools/graph/drawable.py: * libs/pypgmtools/graph/text.py: Removed evil hacks used for Drawable regeneration. This is now part of the public C API. 2007-12-19 Guillaume Emont * pgm/pgmdrawable.c: * pgm/pgmdrawable.h: Added a pgm_drawable_regenerate() function to force the regeneration of a drawable. * plugins/opengl/pgmglviewport.c: * plugins/opengl/pgmglviewport.h: Changed the opengl plugin to handle the new call. * docs/pgm/pigment-sections.txt: * docs/pgm/tmpl/pgmdrawable.sgml: Updated documentation. * libs/pypgm/pgm/pgm.defs: Updated python binding: pgm.Drawable objects now have a regenerate() method. Fixes #116 2007-12-19 Florian Boucault * libs/pypgmtools/widgets/sliced_image.py: Removed crazy spaces. 2007-12-19 Lionel Martin * libs/pypgmtools/widgets/sliced_image.py: _compute_layout() is not called before the loading of all the images 2007-12-19 Florian Boucault * libs/pypgmtools/widgets/Makefile.am: * libs/pypgmtools/widgets/curved_list.py: * libs/pypgmtools/widgets/grid_view.py: * libs/pypgmtools/widgets/image_list.py: * libs/pypgmtools/widgets/inprogress/button.py: * libs/pypgmtools/widgets/inprogress/choice_box.py: * libs/pypgmtools/widgets/inprogress/growing_progressbar.py: * libs/pypgmtools/widgets/inprogress/popup.py: * libs/pypgmtools/widgets/inprogress/text_button.py: * libs/pypgmtools/widgets/inprogress/text_choice_box.py: * libs/pypgmtools/widgets/list.py: * libs/pypgmtools/widgets/ring_list.py: * libs/pypgmtools/widgets/text_list.py: Removed deprecated widgets. 2007-12-18 Loïc Molinari * pgm/pgmlinearalgebra.c: * pgm/pgmlinearalgebra.h: Added pgm_mat4x4_new_predefined function and PgmMAt4x4Predefined enum. Added 4 predefined matrices. * docs/pgm/pigment-sections.txt: * docs/pgm/tmpl/pgmlinearalgebra.sgml: Added docs for the new symbols. * libs/pypgm/pgm/pgm.defs: Added Python binding for the new symbols. 2007-12-18 Alessandro Decina * libs/pypgmtools/widgets/grid_ng.py: * libs/pypgmtools/widgets/list_ng.py: Add mouse drag and click support to the widgets. 2007-12-18 Guillaume Emont * libs/codegen/Makefile.am: * libs/codegen/argtypes.py: * libs/codegen/codegen.py: * libs/codegen/definitions.py: * libs/codegen/defsparser.py: * libs/codegen/docgen.py: * libs/codegen/h2def.py: * libs/codegen/mergedefs.py: * libs/codegen/mkskel.py: * libs/codegen/override.py: * libs/codegen/reversewrapper.py: * libs/codegen/scmexpr.py: Now use the codegen version used in gstreamer's python binding: it has the advantage of adding pyg_begin_allow_threads/pyg_end_allow_threads before/after pigment function calls. * libs/pypgm/pgm/pgm.override: * libs/pypgm/pgm/pgmcanvas.override: * libs/pypgm/pgm/pgmdrawable.override: * libs/pypgm/pgm/pgmimage.override: * libs/pypgm/pgm/pgmtext.override: * libs/pypgm/pgm/pgmviewport.override: * libs/pypgm/pgm/pgmviewportfactory.override: Added pyg_begin_allow_threads / pyg_end_allow_threads before/after pigment function calls. 2007-12-18 Loïc Molinari * libs/pypgm/pgm/pgm.override: Defined Py_ssize_t to int if the Python version is less than 2.5. fixes #207 2007-12-18 Loïc Molinari * plugins/opengl/pgmglimage.c: Update the texture matrix right after a new texture upload so that the matrix for the non power-of-two image is correctly recomputed. * examples/pypgm/mappingmatrix.py: Cleaned up example. * plugins/opengl/pgmtexture.c: Cosmetic fix. 2007-12-17 Loïc Molinari * libs/pypgm/pgm/pgm.defs: * libs/pypgm/pgm/pgmimage.override: Added the get/set_mapping_matrix Python binding. * examples/pypgm/Makefile.am: * examples/pypgm/mappingmatrix.py: Added an example on how to use the mapping matrix in Python. 2007-12-17 Loïc Molinari * libs/pypgm/pgm/Makefile.am: * libs/pypgm/pgm/pgm.defs: * libs/pypgm/pgm/pgm.override: * libs/pypgm/pgm/pgmlinearalgebra.override: Added Python binding for the linear algebra objects and functions. * pgm/pgm.c: Changed debug category to non-static. * pgm/pgmlinearalgebra.c: * pgm/pgmlinearalgebra.h: Changed to use pgm debug category. Added add and substract functions. * docs/pgm/pigment-sections.txt: * docs/pgm/tmpl/pgmlinearalgebra.sgml: Added new linear algebra function to the docs. * tests/check/pgm/pgmlinearalgebra.c: Added new linear algebra function to the unit tests. 2007-12-16 Florian Boucault * libs/pypgmtools/widgets/grid_ng.py: * libs/pypgmtools/widgets/list_ng.py: compute_opacity reimplemented so that border items opacity indicates if there are more items available after them. This works around the lack of drawable compositing. 2007-12-13 Florian Boucault * plugins/opengl/pgmcontext.c: Added debug information. 2007-12-14 Loïc Molinari * libs/pypgm/pgm/pgm.override: Removed leaked ref on the viewport in pgm.viewport_factory_make. 2007-12-13 Loïc Molinari * pgm/pgmimage.c: * pgm/pgmimage.h: Added the pgm_image_set/get_mapping_matrix symbols. * pgm/pgmlinearalgebra.c: * pgm/pgmlinearalgebra.h: * pgm/pgmviewport.c: * pgm/pgmdrawable.h: * pgm/pgmdrawable.c: Added new linear algebra methods. Adapted drawable code. * tests/check/pgm/pgmlinearalgebra.c: Added tests for the new linear algebra functions. * docs/pgm/tmpl/pgmdrawable.sgml: * docs/pgm/tmpl/pgmimage.sgml: * docs/pgm/tmpl/pgmlinearalgebra.sgml: * docs/pgm/pigment-sections.txt: Added new methods to the docs. * examples/pgm/Makefile.am: * examples/pgm/mappingmatrix.c: * examples/pictures/Makefile.am: * examples/pictures/meiko.jpg: Added an example for the mapping matrix. * plugins/opengl/pgmgldefs.h: * plugins/opengl/pgmglimage.c: * plugins/opengl/pgmglimage.h: * plugins/opengl/pgmglviewport.c: * plugins/opengl/pgmglviewport.h: * plugins/opengl/pgmtexture.c: * plugins/opengl/pgmtexture.h: Implemented the texture matrix access support. 2007-12-13 Alessandro Decina * libs/pypgmtools/widgets/Makefile.am: Add const.py. 2007-12-12 Loïc Molinari * pgm/pgmlinearalgebra.c: Simplified implementation using existing linear algebra API. 2007-12-12 Loïc Molinari * pgm/pgmlinearalgebra.c: * pgm/pgmlinearalgebra.h: Changed the whole API using boxed types. * pgm/pgmdrawable.c: * pgm/pgmviewport.c: * pgm/pgmviewport.h: Adapted to the new linear algebra API. Removed default projection matrix from the klass, the initializations are now done in only one place, the update_projection method. * plugins/opengl/pgmcontext.c: Adapted to the new linear algebra API. * tests/check/pgm/Makefile.am: * tests/check/pgm/pgmlinalg.c: * tests/check/pgm/pgmlinearalgebra.c: Moved pgmlinalg.c to pgmlinearalgebra.c. Added unit tests for the new linear algebra API. * docs/pgm/pigment-sections.txt: * docs/pgm/tmpl/pgmlinearalgebra.sgml: Adapted docs to the new linear algebra API. * pgm/pgmmodule.c: Added string.h to avoid compilation warning. fixes #203 2007-12-11 Florian Boucault * libs/pypgmtools/widgets/grid_ng.py: Removed selector management. This will be done in a subclass. 2007-12-11 Guillaume Emont * pgm/pgmimage.c: Ensured async_loader_free() is called with image lock held. 2007-12-11 Guillaume Emont * plugins/opengl/pgmglviewport.c: Now uses the update queue and layer locks in pgm_gl_viewport_dispose() for it to be thread-safe. 2007-12-11 Philippe Normand * libs/pypgmtools/widgets/sliced_image.py: Optional arguments support in constructor 2007-12-10 Florian Boucault * libs/pypgmtools/widgets/grid_ng.py: Rounding error leading to shifting towards the end of the grid. 2007-12-10 Florian Boucault * libs/pypgmtools/widgets/grid_ng.py: * libs/pypgmtools/widgets/list_ng.py: Fixed positioning of the elements for the extreme cases. 2007-12-10 Loïc Molinari * plugins/opengl/pgmprogram.c: Added a workaround to avoid checking ARB fragment program limits for which Mesa returns uninitialized values. 2007-12-10 Philippe Normand * libs/pypgmtools/widgets/grid_ng.py: Adjust visible_range_size correctly if we reach the end of the grid. 2007-12-07 Florian Boucault * libs/pypgmtools/widgets/grid_ng.py: Selector position now works fine even at the end of the grid. 2007-12-07 Guillaume Emont * pgm/pgmimage.c: Added a call to gdk_pixbuf_loader_close() as soon as we now the file is fully loaded. Removed some old commented-out code. * tests/check/pgm/pgmimage.c: Added a test for the loading of small (< 1024 bytes) images. fixes #199 2007-12-07 Guillaume Emont * plugins/opengl/pgmglviewport.c: Fixed a segfault in pgm_gl_viewport_dispose(). The drawables should be cleaned before the update queue, since gl_drawable_free() cleans some stuff from the update queue. 2007-12-07 Guillaume Emont * docs/pgm/version-full.xml.in: * docs/pgm/version-short.xml.in: * configure.ac: * docs/pgm/Makefile.am: * docs/pgm/pigment-docs.sgml: Changed the handling of the version of pigment in the documentation, separated the two variables (full version and major.minor version) in two files, because [gtk-doc | xml | my understanding of them] sucks. This removes the warnings we had when running gtk-doc. fixes #106 2007-12-06 Philippe Normand * libs/pypgmtools/widgets/grid_ng.py: Added selector__get 2007-12-06 Philippe Normand * libs/pypgmtools/widgets/grid_ng.py: Layout selector when orientation is changed 2007-12-06 Guillaume Emont * plugins/opengl/pgmgltext.c: Changed the font height handling so that the chosen font height is the maximum height of a line. * examples/pypgm/text.py: * pgm/pgmtext.c: Updated documentation and example to match with the new font height definition. 2007-12-06 Philippe Normand * libs/pypgmtools/widgets/grid_ng.py: Layout selector when lines number is updated * tests/pypgmtools/run.py: Deactivating list tests until list_ng replaces list. 2007-12-05 Florian Boucault * libs/pypgmtools/widgets/grid_ng.py: * libs/pypgmtools/widgets/list_ng.py: Layout when resized. Better regeneration strategy. 2007-12-05 Florian Boucault * libs/pypgmtools/widgets/list_ng.py: Typo leading to bad resize of elements. * libs/pypgmtools/widgets/sliced_image.py: Setting the size was still buggy. Now tested and fixed. 2007-12-05 Florian Boucault * libs/pypgmtools/widgets/sliced_image.py: Refactored so that: - setting the size works - constructor does not need pictures anymore 2007-12-05 Florian Boucault * libs/pypgmtools/graph/drawable.py: Removed useless code. * libs/pypgmtools/timing/implicit.py: Implicitly animated objects will now be animated even if not visible or with opacity 0. Fixes a long standing issue! 2007-12-05 Loïc Molinari * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmcontext.h: Added an environment variable to specify a custom framerate. Added debug informations. * docs/pgm/running.xml: Updated docs for the new environment variable. * examples/pypgm/timing.py: * examples/pypgm/video.py: Added fullscreen key handler. * plugins/opengl/pgmwglbackend.c: Cosmetic fixes. * win32/vs6/libpigment.dsp: Changed C runtime. 2007-12-05 Florian Boucault * libs/pypgmtools/timing/implicit.py: 'mode' attribute was stored in the wrong object and everything used to break from time to time. * libs/pypgmtools/widgets/list_ng.py: Removed awful hacks. Added 'size' property support. 2007-12-05 Guillaume Emont * plugins/opengl/pgmcontext.c: Added support for a PGM_GL_PROGRAMS environment variable to deactivate all use of vertex/fragment programs. * docs/pgm/running.xml: Documented the PGM_GL_PROGRAMS variable. 2007-12-04 Florian Boucault * libs/pypgmtools/widgets/sliced_image.py: Removed trailing spaces. 2007-12-04 Loïc Molinari * plugins/opengl/pgmaglbackend.c: * plugins/opengl/pgmbackend.c: * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmgl.c: * plugins/opengl/pgmgldrawable.c: * plugins/opengl/pgmglimage.c: * plugins/opengl/pgmgltext.c: * plugins/opengl/pgmglviewport.c: * plugins/opengl/pgmglxbackend.c: * plugins/opengl/pgmtexture.c: * plugins/opengl/pgmwglbackend.c: Put pgmtexture and pgmcontext in the pgm_gl debug category. Changed debug descriptions. * docs/pgm/running.xml: Replaced upper-cases debug categories to lower-cases. * pgm/pgm.c: Cosmetic fixes. 2007-12-03 Florian Boucault * libs/pypgmtools/widgets/list_ng.py: Fixes raised exception upon calling compute_z. Removed dead code. 2007-12-03 Florian Boucault * libs/pypgmtools/widgets/circular_list_ng.py: New circle variant of list ng. * libs/pypgmtools/widgets/list_ng.py: Public methods for computation of items size. Zoom reactivated. 2007-12-03 Guillaume Emont * pgm/pgm.c: * pgm/pgmcanvas.c: * pgm/pgmdrawable.c: * pgm/pgmimage.c: * pgm/pgmimagesink.c: * pgm/pgmlinearalgebra.c: * pgm/pgmmodule.c: * pgm/pgmtext.c: * pgm/pgmviewport.c: * pgm/pgmviewportfactory.c: * plugins/boilerplate/pgmbpviewport.c: * plugins/opengl/pgmaglbackend.c: * plugins/opengl/pgmbackend.c: * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmgl.c: * plugins/opengl/pgmgldrawable.c: * plugins/opengl/pgmglimage.c: * plugins/opengl/pgmgltext.c: * plugins/opengl/pgmglviewport.c: * plugins/opengl/pgmglxbackend.c: * plugins/opengl/pgmprogram.c: * plugins/opengl/pgmtexture.c: * plugins/opengl/pgmwglbackend.c: Added support for a PGM_DEBUG environment variable. Made each object have its own debug category where possible. Renamed some debugging categories. Made debugging categories static where possible. Changed the log level of some messages. * docs/pgm/running.xml: Updated documentation. 2007-12-03 Florian Boucault * libs/pypgmtools/widgets/grid_ng.py: resolution of animation is now the default one (from the implicit animation framework). * libs/pypgmtools/widgets/list_ng.py: resolution of animation is now the default one (from the implicit animation framework). zoom variation deactivated: performance improvement. 2007-12-03 Loïc Molinari * pgm/pgmviewport.c: * pgm/pgmviewport.h: * win32/common/libpigment.def: Removed the pgm_viewport_update symbol. * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmcontext.h: * plugins/opengl/pgmglviewport.c: * plugins/opengl/pgmglxbackend.c: * plugins/opengl/pgmwglbackend.c: Adapted OpenGL plugin. It's now automatically updated when an object property is changed. The rendering thread updates and renders in an idle source blocked on the vertical synchronization. After 500 ms of incativity the idle source is removed. Updated FPS displaying function using a counter incremented at each passes in a second. That's more accurate. * libs/pypgmtools/timing/implicit.py: Reduced to 10 ms the update resolution for implicit animation. It takes a bit more CPU, but it's smoother. * plugins/boilerplate/pgmbpviewport.c: Adapted boilerplate plugin. * docs/pgm/pigment-sections.txt: * docs/pgm/tmpl/pgmviewport.sgml: Adapted docs. * examples/pgm/gtk.c: * examples/pgm/image.c: * examples/pgm/sphere.c: * examples/pgm/text.c: * examples/pgm/video.c: * examples/pypgm/cloning.py: * examples/pypgm/groups.py: * examples/pypgm/image.py: * examples/pypgm/implicit.py: * examples/pypgm/sphere.py: * examples/pypgm/text.py: * examples/pypgm/timing.py: * examples/pypgm/video.py: * examples/pypgm/viewports.py: * examples/pypgm/webcam.py: Adapted examples. * libs/pypgm/pgm/pgm.defs: Adapted Python binding. * libs/pypgmtools/widgets/console.py: * libs/pypgmtools/widgets/curved_list.py: * libs/pypgmtools/widgets/grid_ng.py: * libs/pypgmtools/widgets/grid_view.py: * libs/pypgmtools/widgets/image_list.py: * libs/pypgmtools/widgets/inprogress/button.py: * libs/pypgmtools/widgets/inprogress/choice_box.py: * libs/pypgmtools/widgets/inprogress/growing_progressbar.py: * libs/pypgmtools/widgets/inprogress/popup.py: * libs/pypgmtools/widgets/inprogress/text_button.py: * libs/pypgmtools/widgets/inprogress/text_choice_box.py: * libs/pypgmtools/widgets/list.py: * libs/pypgmtools/widgets/list_ng.py: * libs/pypgmtools/widgets/ring_list.py: * libs/pypgmtools/widgets/scrollbar.py: * libs/pypgmtools/widgets/text_list.py: Adapted Python widgets * tests/check/plugins/opengl/pgmgldrawable.c: * tests/interactive/pgmtext.c: * tests/pypgm/test_viewport.py: Adapted tests. fixes #198 2007-12-03 Philippe Normand * libs/pypgmtools/widgets/sliced_image.py: Make images visible only after they've been loaded to avoid white rectangles being displayed. 2007-11-30 Florian Boucault * libs/pypgmtools/graph/drawable.py: Performance improvement. 2007-11-30 Guillaume Emont * pgm/pgmimage.c: Fix: was unlocking instead of locking. 2007-11-30 Guillaume Emont * pgm/pgmimage.c: Fixed a regression: now we send the changed signal again when clearing an image, so that the plugin is aware of the clearing. 2007-11-30 Philippe Normand * libs/pypgmtools/graph/group.py: * libs/pypgmtools/widgets/list_ng.py: Make use of super() 2007-11-30 Loïc Molinari * examples/pypgm/text-list-widget/bar.png: * examples/pypgm/text-list-widget/bg-green-stripes.png: * examples/pypgm/text-list-widget/bg-green.png: * examples/pypgm/text-list-widget/selector-green.png: * examples/pypgm/text-list-widget/selector.png: * examples/pypgm/text-list-widget/shade.png: * examples/pypgm/text-list-widget/speaker-green-reflection.png: * examples/pypgm/text-list-widget/speaker-green.png: * examples/pypgm/text-list-widget/textlist.py: Removed deprecated example. 2007-11-30 Loïc Molinari * pgm/pgmimage.c: Checked if the pixbuf has been correctly retrieved. 2007-11-29 Florian Boucault * libs/pypgmtools/graph/group.py: Do not remove a drawable from a non existing canvas. * libs/pypgmtools/widgets/grid_ng.py: Renamed from List to Grid. Do not accept a canvas nor a layer in __init__ anymore. * libs/pypgmtools/widgets/list_ng.py: * libs/pypgmtools/widgets/scrollbar.py: * libs/pypgmtools/widgets/sliced_image.py: Do not accept a canvas nor a layer in __init__ anymore. 2007-11-29 Florian Boucault * libs/pypgmtools/graph/group.py: * tests/pypgmtools/test_group.py: * tests/pypgmtools/test_list.py: Added the possibility to create a Group without a Canvas. * libs/pypgmtools/widgets/grid_ng.py: CairoSelector is not available anymore. 2007-11-29 Philippe Normand * libs/pypgmtools/graph/text.py: Hack to regenerate either text or markup 2007-11-29 Philippe Normand * libs/pypgmtools/utils/Makefile.am: * libs/pypgmtools/utils/image.py: * libs/pypgmtools/widgets/Makefile.am: * libs/pypgmtools/widgets/const.py: * libs/pypgmtools/widgets/grid_ng.py: * libs/pypgmtools/widgets/list_ng.py: * libs/pypgmtools/widgets/scrollbar.py: * libs/pypgmtools/widgets/sliced_image.py: Migrating new widgets from elisa/sandbox. 2007-11-29 Philippe Normand * libs/pypgmtools/widgets/Makefile.am: These files exist no more. 2007-11-29 Philippe Normand * libs/pypgmtools/widgets/circular_list.py: * libs/pypgmtools/widgets/dock.py: * libs/pypgmtools/widgets/player_osd.py: * libs/pypgmtools/widgets/slideshow.py: * libs/pypgmtools/widgets/top_level_menu.py: * libs/pypgmtools/widgets/volume_osd.py: Those Elisa specific widgets have moved to Elisa SVN. 2007-11-29 Guillaume Emont * pgm/pgmimage.c: Now frees the asynchronous loader immediately once a file is loaded. 2007-11-28 Loïc Molinari * plugins/opengl/pgmcontext.c: Added debug info on the GL renderer before checking if the correct GL version is supported. 2007-11-28 Loïc Molinari * plugins/opengl/pgmtexture.c: Initialize memory texture content to remove the ugly lines which was sometimes appearing on top and bottom of images with a bilinear filtering. 2007-11-28 Philippe Normand * libs/pypgmtools/utils/classinit.py: GClassInitMeta now inherit from ClassInitMeta 2007-11-28 Loïc Molinari * plugins/opengl/pgmwglbackend.c: Fixed scroll event which was containing the position function of the screen origin. * win32/vs6/libpigment.dsp: Changed libc to multithreaded-dll. 2007-11-28 Loïc Molinari * plugins/opengl/pgmglxbackend.c: Fixed wrong embedder test disabling keyboard event pushing when not embedded. 2007-11-27 Loïc Molinari * configure.ac: * libs/Makefile.am: * libs/pgm/Makefile.am: * libs/pgm/gtk/Makefile.am: * libs/pgm/gtk/pgmgtk.c: * libs/pgm/gtk/pgmgtk.h: Added a GTK+ widget used to embed a PgmViewport. A new library has been created since we don't want a dependency on GTK+ in the core. * pgm/pgmviewport.c: * pgm/pgmviewport.h: Added flag PGM_VIEWPORT_APPLICATION_EMBEDDING in PgmViewportCapacity. Added pgm_viewport_get_embedding_id symbol. * plugins/opengl/pgmbackend.c: * plugins/opengl/pgmbackend.h: * plugins/opengl/pgmglviewport.c: * plugins/opengl/pgmglviewport.h: * plugins/opengl/pgmglxbackend.c: * plugins/opengl/pgmglxbackend.h: * plugins/opengl/pgmwglbackend.c: Implemented the is_embeddable and get_embedding_id methods. Implemented support for the XEmbed specification in the GLX backend. Moved feature flags in the GLX backend from defines to an enum. * examples/pgm/Makefile.am: * examples/pgm/gtk.c: Added an example demonstrating the GTK+ widget integration. * docs/pgm/pigment-docs.sgml: * docs/pgm/pigment-sections.txt: * docs/pgm/pigment.types: * docs/pgm/tmpl/pgmviewport.sgml: Updated doc for the GTK+ widget. Fixed object hierarchy integration. * pkgconfig/Makefile.am: * pkgconfig/pigment-gtk.pc.in: Added the pkg-config file for the new libpigment-gtk library. fixes #179 2007-11-27 Guillaume Emont * pgm/pgmimage.c: Removed references between master and slaves when cloning. Factored image clearing code. * tests/check/pgm/pgmimage.c: Changed refcounts in tests since cloning does not increase refcounts anymore. * plugins/opengl/pgmglimage.c: * plugins/opengl/pgmglimage.h: For cloning, now use ->texture and ->native_texture instead of ->texture and ->master. Only try to map a master texture onto a clone if the master is in the same viewport. fixes #163 2007-11-27 Guillaume Emont * pgm/pgmimage.c: Fixed a race condition in asynchronous image loading. * tests/check/pgm/pgmimage.c: The generated test image is now bigger and generated using gdk-pixbuf. * tests/check/plugins/common/pgmimage.c: Added a forgotten unref. 2007-11-27 Philippe Normand * libs/pypgmtools/graph/drawable.py: * libs/pypgmtools/graph/group.py: * libs/pypgmtools/graph/text.py: API addition in Group and Drawable: regenerate(). Use it to redraw a drawable. 2007-11-27 Philippe Normand * libs/pypgmtools/widgets/top_level_menu.py: No need to redefine metaclass, it's already done in Group 2007-11-27 Florian Boucault * libs/pypgmtools/timing/implicit.py: List of animated attributes can now be passed to the constructor of AnimatedObject. Fixes access to some private attributes specific to AnimatedObject. 2007-11-27 Alessandro Decina * tests/pypgmtools/test_group.py: * tests/pypgmtools/test_image.py: * tests/pypgmtools/test_list.py: Update the tests to pass now that pypgmtools.graph.group.Group is a GObject. 2007-11-27 Philippe Normand * libs/pypgmtools/graph/group.py: * libs/pypgmtools/utils/classinit.py: Made Group a GObject, so we can define signals and maybe use GObject properties in the future. 2007-11-27 Loïc Molinari * examples/pgm/image.c: Changed event timestamp format. 2007-11-26 Loïc Molinari * plugins/opengl/pgmglxbackend.c: Grab the mouse pointer while dragging. fixes #191 2007-11-26 Loïc Molinari * pgm/pgmdrawable.c: Changed wrong "scrolled" signal prototype. * plugins/opengl/pgmglxbackend.c: * examples/pgm/image.c: Scroll directions were inverted. 2007-11-26 Loïc Molinari * pgm/pgmdrawable.c: * pgm/pgmdrawable.h: * pgm/pgmviewport.c: * examples/pgm/image.c: Added "scrolled" signal support to PgmDrawable. Checked the emission mask before going deeper in picking detection. fixes #190 2007-11-26 Loïc Molinari * plugins/opengl/pgmwglbackend.c: Changed depth buffer size to avoid z-fighting. 2007-11-23 Guillaume Emont * tests/check/plugins/common/pgmimage.c: * tests/check/plugins/common/Makefile.am: * tests/check/plugins/common/pgmplugintestsuite.c: * tests/check/plugins/common/pgmplugintestsuite.h: Added a test for #162 in plugin tests. 2007-11-23 Loïc Molinari * plugins/opengl/pgmglxbackend.c: * plugins/opengl/pgmglxbackend.h: Moved function pointer types to CamelCase. 2007-11-23 Loïc Molinari * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmwglbackend.c: * plugins/opengl/pgmwglbackend.h: Added support for VBlank syncing in the Win32/WGL backend. 2007-11-21 Loïc Molinari * plugins/opengl/pgmwglbackend.c: Capture the mouse on button press to get events even when the mouse is outside the client area. 2007-11-21 Loïc Molinari * plugins/opengl/pgmwglbackend.c: * plugins/opengl/pgmwglbackend.h: Added workaround to avoid strange locks when the window is shown. * win32/vs6/pypgm.dsp: * win32/vs6/pypgm.mak: Adapted Python binding project so that the release build works. 2007-11-20 Loïc Molinari * misc/pgm-uninstalled: Removed unused completion stuff. Cleaned up and added comments. 2007-11-19 Philippe Normand * libs/pypgmtools/timing/implicit.py: New method in AnimatedObject to dynamically update animation parameters. 2007-11-15 Philippe Normand * libs/pypgmtools/timing/implicit.py: Expose the object being animated to the API user via the "static_object" read-only property. 2007-11-09 Loïc Molinari * plugins/opengl/pgmgldrawable.c: * plugins/opengl/pgmglimage.c: * plugins/opengl/pgmglimage.h: * plugins/opengl/pgmgltext.c: * plugins/opengl/pgmtexture.c: * plugins/opengl/pgmtexture.h: Removed GL objects locks since update and render pass are now done in the same thread. * plugins/opengl/pgmcontext.c: #ifdef backend selection as it's done everywhere else. 2007-11-08 Loïc Molinari * libs/pypgm/pgm/pgmevent.override: Check for float instead of int for (x, y) event attributes. * tests/pypgm/test_event.py: Give floating-point value to (x, y) event attributes. * tests/pypgm/test_image.py: Removed constructor test since it doesn't take args anymore. 2007-11-08 Loïc Molinari * plugins/opengl/pgmwglbackend.h: * plugins/opengl/pgmwglbackend.c: Added all the necessary features to Win32/WGL backend, wooh! * win32/README.txt: Added description of the win32 support. * win32/common/config.h: * win32/common/libgstpgmimagesink.rc: * win32/common/libpgmboilerplate.rc: * win32/common/libpgmopengl.rc: * win32/common/libpigment.def: * win32/common/libpigment.rc: * win32/common/pypgm.rc: Added win32 files common to the different compilers. * win32/vs6/image.dsp: * win32/vs6/libgstpgmimagesink.dsp: * win32/vs6/libgstpgmimagesink.mak: * win32/vs6/libpgmboilerplate.dsp: * win32/vs6/libpgmboilerplate.mak: * win32/vs6/libpgmopengl.dsp: * win32/vs6/libpgmopengl.mak: * win32/vs6/libpigment.dsp: * win32/vs6/libpigment.mak: * win32/vs6/makefile.mak: * win32/vs6/pigment.dsw: * win32/vs6/pypgm.dsp: * win32/vs6/pypgm.mak: Added MSVC6 project files. * libs/pypgm/pgm/pgmviewport.override: * libs/pypgm/pgm/pgmtext.override: * libs/pypgm/pgm/pgmcanvas.override: * libs/pypgm/pgm/pgmdrawable.override: * libs/pypgm/pgm/pgmmodule.c: * plugins/opengl/pgmgltext.c: * plugins/opengl/pgmcontext.c: * pgm/pgmlinearalgebra.c: * pgm/pgmcommon.h: Removed unused variable. Fixed implicit cast warnings. * libs/pypgm/pgm/pgmevent.override: Switched event position to floating point as in the core. Raise AttributeError in getattr when it's not an event attribute. * libs/pypgm/pgm/pgmimage.override: Simplified constructor, no more arguments can be passed in. Removed set_from_fd, new_from_fd and alloc_gst_buffer methods. Removed unused variables. * libs/pypgm/pgm/pgm.defs: Moved PGM_IMAGE_DATA_FD to PGM_IMAGE_DATA_PIXBUF in DrawableProperty. Removed the set_from_fd and alloc_gst_buffer methods. * plugins/opengl/pgmglviewport.h: * plugins/opengl/pgmglviewport.c: * pgm/pgmviewport.c: * pgm/pgmcanvas.c: * pgm/pgmcanvas.h: Moved near, middle and far variable names to near_layer, middle_layer and far_layer since near and far are MSVC keywords. * pgm/pgmimage.c: * pgm/pgmimage.h: Removed pgm_image_[set_from_fd,new_from_fd,alloc_gst_buffer] functions. Moved "fd-loaded" signal to "pixbuf-loaded" Refactored asynchronous loader to use a stream handle instead of a file descriptor. * plugins/opengl/pgmgl.c: Added use of HAVE_WGL_H define * docs/pgm/pigment-sections.txt: Removed pgm_image_[set_from_fd,new_from_fd,alloc_gst_buffer] symbols. * tests/check/pgm/pgmimage.c: Removed test for pgm_image_set_from_fd. * examples/*: Switched to pgm_viewport_factory_make. Removed unneeded os import for the Python examples. Removed useless tests. * README: Updated dependencies for Ubuntu. fixes #139 2007-11-06 Guillaume Emont * configure.ac: * tests/check/Makefile.am: * tests/check/common-tests.am: * tests/check/common/Makefile.am: * tests/check/common/common-tests.am: * tests/check/common/pgmcheck.c: * tests/check/common/pgmcheck.h: * tests/check/opengl/Makefile.am: * tests/check/opengl/pgmgldrawable.c: * tests/check/pgm/Makefile.am: * tests/check/pgm/pgmcanvas.c: * tests/check/pgm/pgmtext.c: * tests/check/pgm/pgmviewport.c: * tests/check/pgm/pgmviewportfactory.c: * tests/check/plugins/Makefile.am: * tests/check/plugins/boilerplate/Makefile.am: * tests/check/plugins/boilerplate/plugin_test_suite.c: * tests/check/plugins/common/Makefile.am: * tests/check/plugins/common/pgmcanvas.c: * tests/check/plugins/common/pgmplugintestsuite.c: * tests/check/plugins/common/pgmplugintestsuite.h: * tests/check/plugins/common/pgmviewport.c: * tests/check/plugins/common/pgmviewportfactory.c: * tests/check/plugins/opengl/Makefile.am: * tests/check/plugins/opengl/pgmgldrawable.c: * tests/check/plugins/opengl/plugin_test_suite.c: Changed tests/check organisation so that tests for the core and tests for plugins are separated. (new plugins/ directory, opengl/ stuff moved to plugins/opengl, part of pgm/ moved to plugins/common/). Created a libpgmplugintestsuite.a in tests/check/plugins/common/ that regroups tests that should be run against all plugins. 2007-11-05 Guillaume Emont * tests/check/common/Makefile.am: Created a tests/check/common/ directory. * configure.ac: * tests/check/Makefile.am: Reflected the creation of the common/ directory. * tests/check/pgmcheck.c: * tests/check/pgmcheck.h: Moved libpgmcheck.a to common/. * tests/check/common-tests.am: * tests/check/pgm/pgmcanvas.c: * tests/check/pgm/pgmdrawable.c: * tests/check/pgm/pgmimage.c: * tests/check/pgm/pgmviewport.c: Reflected the new location of libpgmcheck.a and pgmcheck.h. 2007-11-02 Florian Boucault * examples/pypgm/timing.py: timeout_add takes a reference to a function. 2007-11-01 Lionel Martin * examples/pypgm/cloning_tests.py: * examples/pypgm/groups.py: * examples/pypgm/implicit.py: * examples/pypgm/ratio_tests.py: * examples/pypgm/stress_clone.py: * examples/pypgm/text-list-widget/textlist.py: * examples/pypgm/timing.py: * examples/pypgm/viewports.py: * libs/pypgmtools/widgets/circular_list.py: * libs/pypgmtools/widgets/curved_list.py: * libs/pypgmtools/widgets/dock.py: * libs/pypgmtools/widgets/grid_view.py: * libs/pypgmtools/widgets/image_list.py: * libs/pypgmtools/widgets/inprogress/button.py: * libs/pypgmtools/widgets/inprogress/choice_box.py: * libs/pypgmtools/widgets/inprogress/growing_progressbar.py: * libs/pypgmtools/widgets/inprogress/popup.py: * libs/pypgmtools/widgets/list.py: * libs/pypgmtools/widgets/progressbar_osd.py: * libs/pypgmtools/widgets/ring_list.py: * libs/pypgmtools/widgets/slideshow.py: * libs/pypgmtools/widgets/top_level_menu.py: changing all the set_from_fd call by set_from_file 2007-10-31 Guillaume Emont * tests/check/common-tests.am: * tests/check/opengl/Makefile.am: These files should have been added in the previous commit. 2007-10-31 Guillaume Emont * configure.ac: * tests/Makefile.am: * tests/check/Makefile.am: * tests/check/pgm/Makefile.am: Reorganised test architecture a bit to allow easy addition of opengl tests. * tests/check/pgm/pgmdrawable.c: Reactivated some fixtures, in unchecked mode so that it runs with old check/gstcheck. 2007-10-26 Guillaume Emont * tests/check/pgmcheck.c: * tests/check/pgmcheck.h: Added test assertion macros (ASSERT_PGM_SUCCESS, ASSERT_PGM_ERROR, ASSERT_PGM_ERROR_WITH_CRITICAL, ASSERT_PGM_ERROR_WITH_WARNING), as well as default fixtures and the PGM_USE_STANDARD_FIXTURES macro. * tests/check/Makefile.am: Reflected the addition of pgmcheck.c, so that tests are linked with pgmcheck.o. * pgm/pgmimage.c: Added a check on the result of pgm_image_set_from_file() in pgm_image_new_from_file(). * pgm/pgmviewport.c: In pgm_viewport_from_canvas() and pgm_viewport_to_canvas(), added checks on parameters, and a check of whether a canvas is bound to the viewport. * plugins/boilerplate/pgmbpviewport.c: Added dummy implementation of pgm_bp_viewport_get_screen_resolution() and pgm_bp_viewport_set_screen_size_mm(). * tests/check/pgm/pgm.c: * tests/check/pgm/pgmcanvas.c: * tests/check/pgm/pgmdrawable.c: * tests/check/pgm/pgmimage.c: * tests/check/pgm/pgmviewport.c: Added new tests. Made some modifications to make use of the new pgmcheck stuff. fixes #184 2007-10-24 Florian Boucault * libs/pypgmtools/widgets/Makefile.am: * libs/pypgmtools/widgets/circular_list.py: New list similar to CurvedList but circular instead of parabolic. * libs/pypgmtools/widgets/list.py: Back to initial behaviour where new animations are appended to previous ones and not replacing them. 2007-10-23 Guillaume Emont * docs/pgm/pigment-sections.txt: * pgm/pgmplugin.h: * plugins/boilerplate/pgmbpviewport.c: * plugins/opengl/pgmaglbackend.c: * plugins/opengl/pgmbackend.c: * plugins/opengl/pgmgldrawable.c: * plugins/opengl/pgmglimage.c: * plugins/opengl/pgmgltext.c: * plugins/opengl/pgmglviewport.c: * plugins/opengl/pgmglxbackend.c: * plugins/opengl/pgmwglbackend.c: Added PGM_DEFINE_DYNAMIC_TYPE and PGM_DEFINE_DYNAMIC_TYPE_EXTENDED, and use them instead of the G_ equivalent, since they are not available on GLib < 2.13 and it's better not to define G_ stuff in pigment. 2007-10-23 Loïc Molinari * docs/pgm/pigment-sections.txt: Added a PgmModule section with its private symbols. Removed PGM_EXPORT from doc symbols. * pgm/pgmdrawable.h: Fixed gtk-doc struct parameter. * pgm/pgmplugin.h: * pgm/pgmmodule.h: * pgm/pgmmodule.c: Added gtk-doc module description using previous description comment. Removed unneeded paddings. * pgm/pgmviewport.c: * plugins/opengl/pgmcontext.c: Moved G_OS_UNIX ifdef after glib.h inclusion. * plugins/opengl/pgmgl.c: Included various headers to avoid warnings. * plugins/opengl/pgmglxbackend.c: Moved type to const to avoid warning. * pgm/pgmviewportfactory.c: * pgm/pgmviewportfactory.h: Cosmetic fixes. 2007-10-22 Loïc Molinari * win32: * win32/README.txt: * win32/vs8: * win32/vs8/libpgmboilerplate.vcproj: * win32/vs8/libpgmboilerplate.rc: * win32/vs8/libpgmopengl.vcproj: * win32/vs8/libgstpgmimagesink.vcproj: * win32/vs8/libpgmopengl.rc: * win32/vs8/libgstpgmimagesink.rc: * win32/vs8/_pgm.vcproj: * win32/vs8/libpigment-0.3.vcproj: * win32/vs8/libpigment-0.3.rc: * win32/vs8/pigment.sln: * win32/common: * win32/common/pgmversion.h: * win32/common/_pgm.def: * win32/common/libgstplugin.def: * win32/common/libpigment-0.3.def: * win32/common/libpgmplugin.def: * win32/common/glib-mkenums: * win32/common/config.h: Added project files for MSVC8. * plugins/boilerplate/pgmbp.c: * plugins/boilerplate/pgmbpviewport.c: Moved all GST_DEBUG() to GST_DEBUG_OBJECT(). * plugins/opengl/pgmtexture.c: Added explicit casts to the void* buffer to make MSVC8 happy. * plugins/opengl/pgmwglbackend.h: * plugins/opengl/pgmwglbackend.c: Implemented basic support for WGL. * plugins/opengl/pgmglxbackend.h: Changed feature mask type from gint to guint. * plugins/opengl/pgmglxbackend.c: * plugins/opengl/pgmglviewport.c: Moved getenv() to g_getenv(). * plugins/opengl/pgmglimage.h: * plugins/opengl/pgmgltext.h: Removed trailing ";". * plugins/opengl/pgmcontext.c: Added preprocessor conditions to support GL backend and file descriptors depending on the compilation platform. * plugins/opengl/pgmbackend.c: Cosmetic fix. * pgm/pgmcommon.h: * docs/pgm/pigment-sections.txt: Removed unneeded preprocessor defintions. * pgm/pgmviewport.c: Added preprocessor conditions to support file descriptors depending on the compilation platform. * README: Added Windows support part. 2007-10-19 Guillaume Emont * pgm/pgmplugin.h: Added a definition of G_DEFINE_TYPE_DYNAMIC and G_DEFINE_TYPE_DYNAMIC_EXTENDED for compatibility with glib < 2.13. 2007-10-19 Guillaume Emont * pgm/Makefile.am: * pgm/pgmmodule.c: * pgm/pgmmodule.h: * pgm/pgmplugin.h: * pgm/pgmviewportfactory.c: * pgm/pgmviewportfactory.h: * docs/pgm/tmpl/pgmplugin.sgml: Added a PgmModule class inheriting from GTypeModule to handle plugins correctly (see #168). Changed PgmPluginInitFunc and PgmPluginShutdownFunc so that they take a GTypeModule in parameter to allow plugins to register dynamic types. * plugins/boilerplate/pgmbp.c: * plugins/boilerplate/pgmbpviewport.c: * plugins/boilerplate/pgmbpviewport.h: * plugins/opengl/pgmaglbackend.c: * plugins/opengl/pgmaglbackend.h: * plugins/opengl/pgmbackend.c: * plugins/opengl/pgmbackend.h: * plugins/opengl/pgmgl.c: * plugins/opengl/pgmgldrawable.c: * plugins/opengl/pgmgldrawable.h: * plugins/opengl/pgmglimage.c: * plugins/opengl/pgmglimage.h: * plugins/opengl/pgmgltext.c: * plugins/opengl/pgmgltext.h: * plugins/opengl/pgmglviewport.c: * plugins/opengl/pgmglviewport.h: * plugins/opengl/pgmglxbackend.c: * plugins/opengl/pgmglxbackend.h: * plugins/opengl/pgmwglbackend.c: * plugins/opengl/pgmwglbackend.h: Updated plugins so that they register their types as dynamic. * tests/check/pgm/pgmviewport.c: * tests/check/pgm/pgmviewportfactory.c: * tests/pypgm/run.py: Reactivated tests that were commented out because of #168. fixes #168 2007-10-19 Loïc Molinari * pgm/pgmimage.c: * pgm/pgmimage.h: Added pgm_image_new_from_file and pgm_image_set_from_file symbols. Moved PgmImageFd storage type to PgmImagePixbuf. * pgm/pgmdrawable.h: Moved PGM_IMAGE_DATA_FD property to PGM_IMAGE_DATA_PIXBUF. * plugins/opengl/pgmglimage.c: * plugins/opengl/pgmglimage.h: * plugins/opengl/pgmglviewport.c: Updated the plugin to support new storage type. * libs/pypgm/pgm/pgm.defs: * libs/pypgm/pgm/pgmimage.override: Added new symbols to the Python binding. * examples/pgm/image.c: * examples/pypgm/image.py: Adapted examples to use new symbols. * docs/pgm/pigment-sections.txt: * docs/pgm/tmpl/pgmdrawable.sgml: * docs/pgm/tmpl/pgmimage.sgml: Added new symbols in doc. fixes #182 2007-10-16 Guillaume Emont * configure.ac: * tests/check/Makefile.am: Disabled opengl tests by default, since these break under xvfb. 2007-10-16 Guillaume Emont * tests/Makefile.am: Added interactive to DIST_SUBDIRS to fix make distcheck. 2007-10-16 Guillaume Emont * tests/check/Makefile.am: * tests/check/opengl/pgmdrawable.c: Re-renamed pgmdrawable.c into pgmgldrawable.c to avoid automake getting confused. 2007-10-16 Guillaume Emont * tests/check/opengl/drawableref.c: * tests/check/opengl/pgmdrawable.c: Renamed drawableref.c to pgmdrawable.c. Changed the default timeout for it to 10 secs, since it can take a while on slow machines. 2007-10-16 Guillaume Emont * tests/check/opengl/drawableref.c: * tests/check/pgm/pgmopengl.c: Moved opengl tests to their own directory. * tests/interactive/Makefile.am: * tests/interactive/pgmtext.c: * tests/Makefile.am: * tests/README: Added an interactive test directory with a first test. * configure.ac: Added support for --disable-opengl-tests for build bot Added tests/interactive/Makefile to the list of makefiles to generate * plugins/boilerplate/Makefile.am: * plugins/opengl/Makefile.am: * tests/check/Makefile.am: Updated some makefiles to have make coverage check the coverage of the plugins as well. Updated tests/check/Makefile.am to conditionally build/launch the opengl tests. 2007-10-10 Guillaume Emont * tests/tools/coverage/coverage-report-entry.pl * tests/tools/coverage/coverage-report.pl * tests/tools/coverage/coverage-report.xsl Added coverage report tools (taken from common/coverage in gstreamer). * configure.ac * pgm/Makefile.am * tests/Makefile.am * tests/check/Makefile.am Changed configure.ac and makefiles to support coverage reports: the call to gcov is now made with LC_ALL=C added a dependency to perl added GCOV_CFLAGS and GCOV_LIBS where needed separated a bit more .h and .c files in pgm/Makefile.am added gcov output to the list of stuff to be cleaned 2007-10-08 Alessandro Decina * tests/pypgmtools/test_group.py: * tests/pypgmtools/test_image.py: * tests/pypgmtools/test_list.py: Fix the tests to pass with pygobject >= 2.13.0. 2007-10-05 Guillaume Emont * pgm/pgmviewportfactory.c: Made PgmViewportFactory a semi-singleton (only one instance per possible plugin). fixes #124 * tests/check/pgm/pgmviewportfactory.c: Added tests for the semi-singleton feature. 2007-10-04 Loïc Molinari * Makefile.am: Added RELEASE file to dist. === release 0.3.2 === 2007-10-03 Loïc Molinari * configure.ac: Updated AC_INIT. 2007-10-03 Loïc Molinari * configure.ac: * plugins/Makefile.am: * tests/check/Makefile.am: Removed checks for the DirectFB plugin, not supported anymore. * tests/pypgm/Makefile.am: Disabled known failure for the next release. 2007-10-03 Loïc Molinari * pgm/pgmdrawable.c: * pgm/pgmdrawable.h: * examples/pgm/image.c: Added PgmDrawable 'double-clicked' signal support. 2007-10-02 Guillaume Emont * pgm/pgmimage.c: Added a g_source_remove in fd_loader_read_chunk_cb() when the loading of a file has failed or is finished. 2007-10-02 Loïc Molinari * docs/Makefile.am: Install documentation even if --enable-gtk-doc not passed. fixes #150 2007-10-02 Loïc Molinari * pgm/pgmimage.c: Correctly clean up the storage data when disposed. * plugins/opengl/pgmglviewport.c: Free the change tasks when removing a GL drawable from the viewport. Clean up everything correctly when the GL viewport is disposed. * tests/check/Makefile.am: * tests/check/pgm/pgmopengl.c: Added unit tests for the OpenGL plugin. 2007-10-02 Philippe Normand * libs/pypgmtools/widgets/volume_osd.py: Made the volume dock a bit wider 2007-10-02 Loïc Molinari * pgm/pgmviewport.c: * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmglviewport.c: Fixed memory leaks. Generalized the use of the walk variable name to iterate through lists. 2007-10-01 Florian Boucault * tests/pypgmtools/test_group.py: * tests/pypgmtools/test_image.py: Added gst refcount checks. 2007-10-01 Guillaume Emont * configure.ac: Added a check for cairo, added examples in the printed summary and fixed a small indentation issue. * examples/pgm/Makefile.am: Added stuff to compile the sphere example if cairo is present. * examples/pgm/sphere.c: New example in C using cairo. Similar to examples/pypgm/sphere.py, but allows the user to move the sphere around with the keyboard. 2007-10-01 Alessandro Decina * configure.ac: Add GST_PLUGINS_BASE_CFLAGS to PGM_CFLAGS. 2007-10-01 Florian Boucault * libs/pypgmtools/graph/group.py: Leak fixed: removing a Group from a Group kept a reference to the parent in the child Group. * libs/pypgmtools/timing/implicit.py: Leak fixed: a reference to the object was kept because the modifiers were not cleaned. I still do not know why: unit tests are needed for the animation framework. * libs/pypgmtools/widgets/list.py: Leak fixed: stopping animations after removal of the implicitely animated objects. Now refuses to insert already inserted objects. Better exception handling. * tests/pypgmtools/Makefile.am: * tests/pypgmtools/run.py: * tests/pypgmtools/test_group.py: * tests/pypgmtools/test_image.py: * tests/pypgmtools/test_list.py: More unit tests concerning refcounting. 2007-10-01 Guillaume Emont * configure.ac: * examples/Makefile.am: Added a --disable-examples flag to give the user the choice not to build examples. Fixes #38. 2007-10-01 Philippe Normand * examples/pypgm/ratio_tests.py: Screen/viewport/canvas ratio tests 2007-09-30 Florian Boucault * libs/pypgmtools/widgets/list.py: Insertion at current index was not acting consistently: currently selected item must remain selected regardless of item insertion/removal. 2007-09-30 Florian Boucault * libs/pypgmtools/widgets/volume_osd.py: Better positioning in height of the text in the volume OSD. 2007-09-29 Lionel Martin * examples/pypgm/cloning_removal_test.py: rename cloning_removal_test.py in cloning_tests.py pigment crashes when you use as master a image not added in a canvas see #163 2007-09-29 Lionel Martin * examples/pypgm/cloning_removal_test.py: * examples/pypgm/stress_clone.py: Add two samples for clone testing Find a bug in cloning : see #162 2007-09-28 Loïc Molinari * pgm/pgmimage.c: Update the ratio of the slaved images when image data change. * plugins/opengl/pgmglimage.c: * plugins/opengl/pgmglimage.h: Use another variable to store the master texture. 2007-09-28 Benjamin Kampmann * libs/pypgmtools/widgets/player_osd.py: corrected time calculating 2007-09-28 Loïc Molinari * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmglviewport.c: * plugins/opengl/pgmglviewport.h: Flush the update queue in the rendering thread and then render. It's much faster, and avoid blocking the application during a Viewport update. Every Pigment calls are now non-blocking, neat! 2007-09-28 Loïc Molinari * plugins/opengl/pgmglxbackend.c: Use swap_control as the default VBlank method for all drivers. 2007-09-27 Loïc Molinari * plugins/opengl/pgmgldrawable.c: Added a type check. * plugins/opengl/pgmglimage.c: * plugins/opengl/pgmgltext.c: Take a ref on the generic drawable at creation and unref when disposing. * plugins/opengl/pgmglviewport.c: Deferred adding and removing of the GL drawable at update time. Fixed a lock. 2007-09-26 Loïc Molinari * tests/check/pgm/pgmimage.c: Checked that errno equals EBADF. 2007-09-26 Loïc Molinari * tests/check/pgm/pgmimage.c: Added a test checking that pgm_image_set_from_fd correctly closes the file descriptor. 2007-09-26 Florian Boucault * pgm/pgmimage.c: Documentation fixed: 'canvas' should read 'image'. 2007-09-25 Loïc Molinari * docs/pgm/pigment.types: * docs/pgm/tmpl/pgmimage.sgml: * pgm/pgmcanvas.c: * pgm/pgmdrawable.c: * pgm/pgmimage.c: * pgm/pgmimage.h: * pgm/pgmviewport.c: Added the "fd-loaded" signal to PgmImage. Added static storage type to pgm_*_signals variables. 2007-09-25 Loïc Molinari * pgm/pgmviewport.c: The wrong canvas instance was given to g_signal_handler_disconnect in set_canvas. * tests/pypgm/test_drawable.py: * tests/pypgm/test_viewport.py: Adapted to API changes. Fixed the build. * FAQ: Removed unused file. * TODO: Updated tasks. 2007-09-25 Florian Boucault * libs/pypgmtools/widgets/top_level_menu.py: Top-level menu labels removed. Fixes Elisa bug #606. 2007-09-25 Loïc Molinari * pgm/pgm.c: * pgm/pgmcanvas.c: * pgm/pgmcommon.h: * pgm/pgmdrawable.c: * pgm/pgmevents.c: * pgm/pgmimage.c: * pgm/pgmimagesink.c: * pgm/pgmlinearalgebra.c: * pgm/pgmplugin.h: * pgm/pgmtext.c: * pgm/pgmversion.h.in: * pgm/pgmviewport.c: * pgm/pgmviewportfactory.c: Doc updates. 2007-09-25 Loïc Molinari * libs/pypgm/pgm/pgmviewport.override: * libs/pypgm/pgm/pgm.defs: * libs/pypgm/pgm/pgmdrawable.override: * libs/pypgm/pgm/pgmevent.override: Added update_projection, from_canvas and to_canvas Viewport methods in the Python binding. * docs/pgm/pigment-sections.txt: * docs/pgm/tmpl/pgmdrawable.sgml: * docs/pgm/tmpl/pgmviewport.sgml: * libs/pypgm/pgm/pgm.defs: * libs/pypgm/pgm/pgmdrawable.override: * libs/pypgm/pgm/pgmviewport.override: * pgm/pgmdrawable.c: * pgm/pgmdrawable.h: * pgm/pgmviewport.c: * pgm/pgmviewport.h: * plugins/boilerplate/pgmbpviewport.c: * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmcontext.h: * plugins/opengl/pgmgldrawable.c: * plugins/opengl/pgmgldrawable.h: * plugins/opengl/pgmglimage.c: * plugins/opengl/pgmgltext.c: * plugins/opengl/pgmglviewport.c: * plugins/opengl/pgmglviewport.h: * tests/check/pgm/pgmviewport.c: Removed useless arc, stroking and shadowing methods from PgmDrawable. Removed SHADOW and STROKE capilility bits from PgmViewport. Removed useless get/set_color methods from PgmViewport. Removed useless PGM_VIEWPORT_CANVAS macro. * pgm/pgmevents.c: * pgm/pgmevents.h: * plugins/opengl/pgmglxbackend.c: Added support for key modifiers. * docs/pgm/tmpl/pgmviewport.sgml: * docs/pgm/pigment-sections.txt: * docs/pgm/tmpl/pgmevents.sgml: Updated docs regarding API changes. * README: Added a description on how to use Pigment uninstalled. * HACKING: Added 80 chars line wrap guideline. Cleaned up. 2007-09-25 Florian Boucault * libs/pypgmtools/widgets/list.py: Fix: pop now returns the removed element. 2007-09-24 Florian Boucault * libs/pypgmtools/widgets/list.py: Fixed the case where the only element of a list was popped. 2007-09-24 Florian Boucault * libs/pypgmtools/widgets/player_osd.py: Fixed title font size with a temporary hack: waiting for fix in PgmText. 2007-09-24 Florian Boucault * libs/pypgmtools/widgets/list.py: FIXME added about handling of negative indexes. Code factorized (_is_visible). Mode switched back to REPLACE: smoother animation. Fixed useless updating on insertion or removal of non visible items. 2007-09-21 Loïc Molinari * README: Moved cairo dependency to the OpenGL plugin section. Added pango OpenGL plugin dependency. * docs/pgm/pigment-sections.txt: Removed protected PgmDrawable symbols. * pgm/Makefile.am: Added pgmversion.h to dist. * pigment.spec.in: Fixed hard-coded Python dependency. * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmglxbackend.c: Removed some UTF-8 characters. 2007-09-20 Loïc Molinari * pgm/pgmcanvas.c: * pgm/pgmdrawable.h: * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmgldrawable.c: * plugins/opengl/pgmglimage.c: * plugins/opengl/pgmgltext.h: * plugins/opengl/pgmgltext.c: * plugins/opengl/pgmglviewport.c: * plugins/opengl/pgmglviewport.h: Improved OpenGL plugin performance using a task queue for the changes to apply, the queue is then flushed at viewport update. Added a lock dedicated to layers access to avoid using Viewport lock. Generalized use of g_list_foreach. 2007-09-20 Loïc Molinari * HACKING: Updated coding guidelines. 2007-09-20 Florian Boucault * libs/pypgmtools/widgets/list.py: Small bugfix. 2007-09-20 Loïc Molinari * pgm/pgmdrawable.c: * pgm/pgmdrawable.h: * pgm/pgmimage.c: * pgm/pgmimage.h: * pgm/pgmtext.c: Added a protected method _pgm_drawable_emit_changed so that subclasses of PgmDrawable can properly emit the 'changed' signal. * pgm/pgmevents.h: * pgm/pgmviewport.h: Added parenthesis around bitfield enum definitions. * pgm/pgmviewportfactory.c: Moved hard-coded max recursion depth value as a define. Reorganized methods in sections. * docs/pgm/pigment-sections.txt: Added protected methods of drawables in the private section. 2007-09-20 Loïc Molinari * pgm/pgm.h: * pgm/Makefile.am: * pgm/pgmlinalg.c: * pgm/pgmlinalg.h: * pgm/pgmlinearalgebra.c: * pgm/pgmlinearalgebra.h: * docs/pgm/tmpl/pgmlinalg.sgml: * docs/pgm/tmpl/pgmlinearalgebra.sgml: * tests/check/pgm/pgmlinalg.c: Added many basic Vec3 functions. Added line-plane intersection function. Added function testing if a point belongs to a rectangle. Moved LinAlg to LinearAlgebra. Added the pgm_mat4x4_inverse symbol. Added the pgm_mat4x4_transpose symbol. Added unit tests. * pgm/pgmviewport.c: * pgm/pgmviewport.h: Generalized the projection system including a 4x4 projection matrix as a public property that plugins can use to do the projection. Added the from/to_canvas symbols to project/unproject vectors between the two coordinates spaces. Added the update_projection symbol to do an explicit update of the projection matrix. Added support for multi-press events. * pgm/pgmcanvas.c: * pgm/pgmdrawable.c: * pgm/pgmdrawable.h: Added the "pressed", "released", "clicked", "double-clicked", "drag-begin", "drag-motion" and "drag-end" signals. Moved PGM_DRAWABLE_UNBINDED to PGM_DRAWABLE_UNBOUND. * pgm/pgmmarshal.list: Added new marshallers for the new signals. Added the list of possible types as a comment. * libs/pypgm/pgm/pgm.defs: * pgm/pgmevents.h: Converted PgmButtonType to use bitfield enum values to make picking implementation easier and faster. * plugins/opengl/pgmgldefs.h: Added PGM_GL_MODELVIEW_MATRIX and PGM_GL_PROJECTION_MATRIX defines. * plugins/opengl/pgmglviewport.c: * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmgldrawable.c: * plugins/opengl/pgmglimage.c: * plugins/opengl/pgmgltext.c: Adapted the plugin to the new projection system. * plugins/opengl/pgmglxbackend.c: Removed multi-press support since it's now in the base viewport class. * configure.ac: * pgm/pgmcommon.h: Added the PGM_FABSF macro. * docs/pgm/pigment-docs.sgml: * docs/pgm/pigment-sections.txt: * docs/pgm/tmpl/pgmdrawable.sgml: * docs/pgm/tmpl/pgmviewport.sgml: Updated docs for the new symbols. fixes #148 2007-09-19 Florian Boucault * README: Grammar mistake fixed. 2007-09-19 Florian Boucault * libs/pypgmtools/timing/implicit.py: Forgotten assignement that was breaking setup_next_animations. 2007-09-18 Florian Boucault * libs/pypgmtools/timing/implicit.py: Syntax fixes. 2007-09-17 Florian Boucault * libs/pypgmtools/timing/implicit.py: Optimisation: do not recreate an animation when the target value is the same. * libs/pypgmtools/widgets/dock.py: Added convenience methods. * libs/pypgmtools/widgets/slideshow.py: Reworked slideshow. * libs/pypgmtools/widgets/top_level_menu.py: Better looking by setting to visible at a different time. 2007-09-14 Loïc Molinari * pgm/pgmimage.c: * pgm/pgmimage.h: Added asynchronous image loading from file descriptor. The image is now loaded in the Pigment main loop by chunks of 1kb. 2007-09-14 Florian Boucault * libs/pypgmtools/widgets/top_level_menu.py: Fixes wrong animation when menu fades out. 2007-09-13 Florian Boucault * libs/pypgmtools/widgets/top_level_menu.py: Nicer selection animation. Fixes a crash. 2007-09-10 Loïc Molinari * pgm/pgmimage.c: * pgm/pgmimage.h: Added the pgm_image_get_storage_type_type symbol. * docs/pgm/pigment-sections.txt: * docs/pgm/tmpl/pgmimage.sgml: Updated doc for the new symbol. * libs/pypgm/pgm/pgm.defs: * libs/pypgm/pgm/pgmimage.override: Update binding for the new symbol. * tests/check/pgm/pgmimage.c: Added test for the new symbol. 2007-09-10 Florian Boucault * libs/pypgmtools/widgets/top_level_menu.py: Improved performances. 2007-09-07 Florian Boucault * libs/pypgmtools/timing/controller.py: end_callback now really called at the end so that it is possible to interact with the controller itself within the callback. * libs/pypgmtools/timing/implicit.py: end_callback added. is_animated method added. * libs/pypgmtools/widgets/slideshow.py: Completely refurbished. 2007-09-06 Florian Boucault * libs/pypgmtools/widgets/dock.py: Big cleanup of the show method. 2007-09-06 Loïc Molinari * pgm/pgmevents.c: Changed copy memory allocation call to use the GSlice allocator. 2007-09-05 Lionel Martin * libs/pypgmtools/widgets/dock.py: add possibility to show the dock all the time 2007-09-05 Loïc Molinari Patch by: Lionel Martin * pgm/pgmviewport.h: * pgm/pgmviewport.c: Added a lock dedicated to event handling. It avoids the need to wait for the viewport lock which is long on high load, leading to delays in event processing. 2007-09-03 Florian Boucault * libs/pypgmtools/widgets/image_transition.py: Do not reload an already loaded picture. Hope it helps. 2007-09-03 Florian Boucault * libs/pypgmtools/widgets/image_transition.py: Nicer transition. 2007-08-31 Loïc Molinari * tests/Makefile.am: * tests/README: * tests/misc/vsync.c: Added program meant to test VBlank syncing mechanisms effectiveness. Added file describing subdirs in tests. Added unit tests in the dist. 2007-08-31 Florian Boucault * docs/pgm/compiling.xml: * docs/pgm/pigment-docs.sgml: * docs/pgm/running.xml: * pgm/pgm.c: * pgm/pgmcanvas.c: * pgm/pgmcommon.h: Documentation review leading to fixes. 2007-08-29 Loïc Molinari * pgm/pgmviewport.h: * plugins/opengl/pgmaglbackend.c: * plugins/opengl/pgmbackend.c: * plugins/opengl/pgmbackend.h: * plugins/opengl/pgmglviewport.c: * plugins/opengl/pgmglxbackend.c: * plugins/opengl/pgmwglbackend.c: * libs/pypgm/pgm/pgmviewport.override: * docs/pgm/tmpl/pgmviewport.sgml: Added the HARDWARE_ACCELERATION caps mask to the viewport. fixes #152 2007-08-28 Loïc Molinari * pgm/Makefile.am: * pgm/pgm.h: * pgm/pgmcommon.h: * pgm/pgmlinalg.c: * pgm/pgmlinalg.h: Added a bunch of maths and linear algebra useful macros and functions. * docs/pgm/pigment-docs.sgml: * docs/pgm/pigment-sections.txt: * docs/pgm/tmpl/pgmcommon.sgml: * docs/pgm/tmpl/pgmlinalg.sgml: Added documentation for the maths and linear algebra functions. * tests/check/Makefile.am: * tests/check/pgm/pgmlinalg.c: Added units tests for the linear algebra functions. * configure.ac: Added AC_GNU_SOURCE and checked for the sincos GNU extension function. Linked libpigment with -lm. * plugins/boilerplate/pgmbpviewport.c: Fixed wrong method prototype. 2007-08-22 Loïc Molinari * libs/pypgm/pgm/pgm.override: * libs/pypgm/pgm/pgmviewport.override: Added correct arg type to overrided function definitions. fixes #147 === release 0.3.1 === 2007-08-03 Loïc Molinari * tests/check/Makefile.am: * tests/check/pgm/pgmrectangle.c: * tests/pypgm/Makefile.am: * tests/pypgm/run.py: * tests/pypgm/test_rectangle.py: Removed unit tests concerning PgmRectangle. 2007-08-03 Loïc Molinari * docs/pgm/pigment-docs.sgml: * docs/pgm/pigment-sections.txt: * docs/pgm/tmpl/pgmdrawable.sgml: * docs/pgm/tmpl/pgmellipse.sgml: * docs/pgm/tmpl/pgmimage.sgml: * docs/pgm/tmpl/pgmimagesink.sgml: * docs/pgm/tmpl/pgmrectangle.sgml: * docs/pgm/tmpl/pgmtext.sgml: * docs/pgm/tmpl/pgmviewportfactory.sgml: * libs/pypgm/pgm/pgm.defs: * pgm/Makefile.am: * pgm/pgm.h: * pgm/pgmcanvas.c: * pgm/pgmcanvas.h: * pgm/pgmdrawable.h: * pgm/pgmellipse.c: * pgm/pgmellipse.h: * pgm/pgmimage.h: * pgm/pgmimagesink.h: * pgm/pgmrectangle.c: * pgm/pgmrectangle.h: * pgm/pgmtext.h: * pgm/pgmviewport.h: * pgm/pgmviewportfactory.h: Removed deprecated Ellipse and Rectangle objects. Documentation fixes. 2007-08-02 Florian Boucault * examples/pictures/dvd-blurred_256x256.png: * examples/pictures/dvd-normal_256x256.png: * examples/pictures/dvd-reflected_256x256.png: * examples/pictures/grid-view-bg-masks.xcf: * examples/pictures/grid-view-bg.png: * examples/pictures/music-blurred_256x256.png: * examples/pictures/music-normal_256x256.png: * examples/pictures/music-reflected_256x256.png: * examples/pictures/photo-blurred_256x256.png: * examples/pictures/photo-normal_256x256.png: * examples/pictures/photo-reflected_256x256.png: * examples/pictures/service-blurred_256x256.png: * examples/pictures/service-normal_256x256.png: * examples/pictures/service-reflected_256x256.png: * examples/pictures/video-blurred_256x256.png: * examples/pictures/video-normal_256x256.png: * examples/pictures/video-reflected_256x256.png: * examples/pypgm/Makefile.am: * libs/pypgmtools/graph/deprecated/element.py: * libs/pypgmtools/graph/deprecated/group.py: * libs/pypgmtools/graph/deprecated/wrappers.py: * libs/pypgmtools/widgets/Makefile.am: * libs/pypgmtools/widgets/button.py: * libs/pypgmtools/widgets/choice_box.py: * libs/pypgmtools/widgets/growing_progressbar.py: * libs/pypgmtools/widgets/image_list.py: * libs/pypgmtools/widgets/pictures/dvd.png: * libs/pypgmtools/widgets/pictures/movie.png: * libs/pypgmtools/widgets/pictures/music.png: * libs/pypgmtools/widgets/pictures/pictures.png: * libs/pypgmtools/widgets/pictures/services.png: * libs/pypgmtools/widgets/popup.py: * libs/pypgmtools/widgets/slideshow.py: * libs/pypgmtools/widgets/text_button.py: * libs/pypgmtools/widgets/text_choice_box.py: Cleanup of pictures and widgets. 2007-08-02 Loïc Molinari * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmglimage.c: * plugins/opengl/pgmgltext.c: Locked GL Viewport during the whole update pass. Fixed #109, #142, #119 Refs #143 2007-08-02 Philippe Normand * tests/pypgm/Makefile.am: * tests/pypgmtools/Makefile.am: Fixed make check for srcdir != builddir 2007-08-02 Philippe Normand * tests/Makefile.am: * tests/pypgm/Makefile.am: * configure.ac: Integrated Python unittests in make check 2007-08-02 Loïc Molinari Patch by: Brian Cameron * configure.ac: * libs/pypgm/pgm/Makefile.am: Made it build on OpenSolaris. refs #131 2007-08-02 Philippe Normand * Makefile.am: * configure.ac: * docs/pgm/Makefile.am: * examples/pgm/Makefile.am: * libs/pypgm/pgm/Makefile.am: * misc/Makefile.am: * pgm/Makefile.am: * plugins/boilerplate/Makefile.am: * plugins/opengl/Makefile.am: * tests/check/Makefile.am: Fixed the build for "make distcheck" and when builddir != srcdir, fixes #99, #100 * tests/pypgm/test_image.py: * tests/pypgm/test_pgm.py: * tests/pypgm/test_viewport.py: Deactivated tests of unused/not-working calls. * libs/pypgm/pgm/pgmviewport.override: Override set_canvas() to allow None argument 2007-08-02 Loïc Molinari * configure.ac: Removed XRandR unused dependency. * pigment.spec.in: Updated for the 0.3. fixes #117 * pgm/pgmviewport.h: Added missing field descriptions. 2007-08-02 Philippe Normand * tests/check/pgm/pgmviewport.c: * tests/check/pgm/pgmviewportfactory.c: Disabled tests using pgm_viewport_factory_make(), refs #105 2007-08-02 Loïc Molinari * plugins/opengl/pgmtexture.c: Added non-NULL checks at bind/unbind steps. 2007-08-02 Loïc Molinari * plugins/opengl/pgmglviewport.c: * plugins/opengl/pgmglviewport.h: Refactored GL drawables sync with generic drawables. Added documentation. 2007-08-01 Loïc Molinari * pgm/pgmdrawable.c: Added lock to access drawable. * plugins/opengl/pgmtexture.c: Added object validity checks. * pgm/pgmcanvas.c: Fixed possible deadlock. * TODO: Updated list. 2007-07-31 Loïc Molinari * plugins/opengl/pgmprogram.c: Added a workaround to fix fp TEX write mask problem in DRI R300. Added the ARB_precision_hint_fastest option in csp programs. 2007-07-31 Philippe Normand * libs/pypgmtools/widgets/player_osd.py: Hide the progress bar when the player can't report the media's length 2007-07-31 Loïc Molinari * pgm/pgmimagesink.c: Update image's canvas caps at the getcaps step. * docs/pgm/running.xml: Removed old render stuff. 2007-07-30 Loïc Molinari * docs/pgm/running.xml: Added description of the OpenGL plugin environment variable. fixes #130 * pgm/pgmcanvas.c: Fixed protected methods documentation. 2007-07-30 Loïc Molinari * pgm/pgmcanvas.c: * pgm/pgmcanvas.h: * pgm/pgmviewport.c: * docs/pgm/pigment-sections.txt: * docs/pgm/tmpl/pgmcanvas.sgml: Added the get_pixel_formats API call. Added the _add_pixel_formats and _remove_pixel_formats protected methods. * pgm/pgmimagesink.c: Made the sink correctly retrieve the image pixel formats. * libs/pypgm/pgm/pgm.defs: * libs/pypgm/pgm/pgmcanvas.override: * libs/pypgm/pgm/pgmviewport.override: Adapted Python binding to the new API. Fixed use of enum instead of flags. * pgm/pgmimage.h: Added constant representating the number of pixel formats. * plugins/opengl/pgmglviewport.c: Fixed misinterpretation of PGM_GL_CSP_PROGRAM environment variable. 2007-07-30 Florian Boucault * libs/pypgmtools/widgets/Makefile.am: * libs/pypgmtools/widgets/player_dock.py: * libs/pypgmtools/widgets/progressbar.py: Cleaned up mess in widgets. Fixes #121 2007-07-30 Loïc Molinari Patch by: Chandan Pitta * libs/pypgm/pgm/pgmimage.override: Added missing argument type 'kwargs' to overrided PgmImage methods. * libs/pypgm/pgm/pgm.defs: Moved the PgmImagePixelFormats definition from enum to flags. 2007-07-30 Loïc Molinari * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmcontext.h: Added fp availablity test for i420/yv12 csp conversion feature. Moved task queues flushing in rendering thread at viewport disposing. * plugins/opengl/pgmglviewport.c: Fixed PGM_GL_CSP_PROGRAM misinterpretation. * plugins/opengl/pgmprogram.c: * plugins/opengl/pgmprogram.h: * plugins/opengl/pgmtexture.c: * plugins/opengl/pgmtexture.h: Refactored fragment program architecture. 2007-07-27 Loïc Molinari * plugins/opengl/Makefile.am: * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmcontext.h: * plugins/opengl/pgmgldefs.h: * plugins/opengl/pgmgldrawable.c: * plugins/opengl/pgmglimage.c: * plugins/opengl/pgmgltext.c: * plugins/opengl/pgmglviewport.c: * plugins/opengl/pgmglxbackend.c: * plugins/opengl/pgmprogram.c: * plugins/opengl/pgmprogram.h: * plugins/opengl/pgmtexture.c: * plugins/opengl/pgmtexture.h: Added architecture for ARB fragment program support. Added support for I420/YV12 csp conversion through fragment programs. Added PGM_GL_CSP_PROGRAM to enable/disable the support of YV12/I420. Replaced the PGM_VBLANK variable name by PGM_GL_VBLANK. * pgm/pgmimagesink.c: Hard-coded negociation of I420 YCbCr formats. * pgm/pgmimage.c: Checked modification before calling vmethod. * docs/pgm/tmpl/pgmviewport.sgml: * pgm/pgmviewport.c: * pgm/pgmviewport.h: * pgm/pgmimage.h: Replaced GList pixel formats retrieving by a bitmask. * libs/pypgm/pgm/pgm.defs: * libs/pypgm/pgm/pgmviewport.override: Modified pixel_formats/caps_mask getter to return a tuple. Added pixel_formats/caps_mask attributes. Removed unused code and fixed warnings. * examples/pgm/video.c: Printed the list of supported pixel formats by the viewport. fixes #30 2007-07-27 Philippe Normand * libs/pypgmtools/widgets/Makefile.am: * libs/pypgmtools/widgets/popup.py: New popup widget.. * libs/pypgmtools/widgets/button.py: * libs/pypgmtools/widgets/choice_box.py: * libs/pypgmtools/widgets/text_button.py: Adapted examples 2007-07-25 Philippe Normand * libs/pypgmtools/widgets/Makefile.am: * libs/pypgmtools/widgets/dock.py: * libs/pypgmtools/widgets/player_osd.py: * libs/pypgmtools/widgets/volume_osd.py: New widget to display player volume in a dock. Also refactored some player_osd code back to dock module, refs #121 2007-07-25 Lionel Martin * libs/pypgmtools/widgets/top_level_menu.py: allow to change images for existing items 2007-07-24 Loïc Molinari * pgm/pgmviewport.c: Fixed typo causing a deadlock when setting the same canvas two consecutive times. 2007-07-21 Philippe Normand * libs/pypgmtools/widgets/player_osd.py: New method: is_visible(), until we can override visible__get() without regression. 2007-07-20 Loïc Molinari Patch by: Guillaume Emont * AUTHORS: * configure.ac: * docs/pgm/pigment-sections.txt: * docs/pgm/tmpl/pgmviewport.sgml: * examples/pgm/image.c: * examples/pypgm/image.py: * libs/pypgm/pgm/pgm.defs: * libs/pypgm/pgm/pgm.override: * libs/pypgm/pgm/pgmviewport.override: * pgm/pgmviewport.c: * pgm/pgmviewport.h: * plugins/boilerplate/pgmbpviewport.c: * plugins/opengl/pgmaglbackend.c: * plugins/opengl/pgmbackend.c: * plugins/opengl/pgmbackend.h: * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmcontext.h: * plugins/opengl/pgmglviewport.c: * plugins/opengl/pgmglxbackend.c: * plugins/opengl/pgmwglbackend.c: * tests/check/pgm/pgmviewport.c: Added support for viewport icon definition. fixes #107 2007-07-20 Philippe Normand * libs/pypgmtools/widgets/player_osd.py: Added 2 new arguments in constructor for volume progress bar (not used yet) 2007-07-16 Loïc Molinari * libs/pypgm/pgm/pgmimage.override: * plugins/opengl/pgmglimage.c: Fixed set_from_buffer. * examples/pypgm/sphere.py: Added an example showing how to integrate Cairo in Pigment. * examples/pypgm/webcam.py: Added an example showing how to display a webcam output with GStreamer. 2007-07-16 Loïc Molinari * plugins/opengl/pgmglimage.c: * plugins/opengl/pgmglviewport.c: Added support for on-the-fly viewport screen_size_mm modification. 2007-07-16 Loïc Molinari * docs/pgm/Makefile.am: * docs/pgm/compiling.xml: * docs/pgm/pigment-docs.sgml: * pgm/pgm.c: * pgm/pgmcanvas.c: * pgm/pgmdrawable.c: * pgm/pgmviewportfactory.c: Added IDs to documentation sections. Added correct version entities to compiling section. fixes #120 2007-07-16 Loïc Molinari * plugins/opengl/pgmglimage.c: * plugins/opengl/pgmgltext.c: Removed the thin lines appearing on the right and bottom of images due to the bilinear filtering applied on texture with texture coordinates lower than 1.0. 2007-07-16 Florian Boucault * libs/pypgmtools/widgets/console.py: Nearly nothing. 2007-07-16 Loïc Molinari * pgm/pgmtext.c: Removed string comparisons to fix odd bugs, will need more investigations. 2007-07-16 Loïc Molinari * plugins/opengl/pgmgl.c: * plugins/opengl/pgmglimage.c: * plugins/opengl/pgmgltext.c: * plugins/opengl/pgmglxbackend.c: * plugins/opengl/pgmglxbackend.h: * plugins/opengl/pgmtexture.c: * plugins/opengl/pgmtexture.h: Fixed race conditions using correct buffer refcounting between application and rendering threads. 2007-07-15 Florian Boucault * pgm/pgmtext.c: * tests/check/pgm/pgmtext.c: Default gravity set to AUTO as it is written in the docs. * libs/pypgm/pgm/pgmimage.override: * tests/pypgm/test_canvas.py: * tests/pypgm/test_drawable.py: * tests/pypgm/test_event.py: * tests/pypgm/test_image.py: * tests/pypgm/test_text.py: * tests/pypgm/test_viewport.py: Many unittests fixed. Some nasty refcounting issues are still remaining. 2007-07-14 Florian Boucault * libs/pypgmtools/timing/controller.py: Fixed exception raised when duration set to 0. 2007-07-13 Florian Boucault * libs/pypgmtools/widgets/grid_view.py: Fix0red. 2007-07-13 Loïc Molinari Patch by: Florian Boucault * docs/pgm/tmpl/pgmimage.sgml: * examples/pgm/image.c: * libs/pypgm/pgm/pgm.defs: * libs/pypgm/pgm/pgmimage.override: * libs/pypgmtools/widgets/image_transition.py: * pgm/pgmimage.c: * pgm/pgmimage.h: Added a max size parameter to the PgmImage set_from_fd/new_from_fd functions. 2007-07-13 Florian Boucault * plugins/opengl/pgmglxbackend.c: Sync to vblank: was testing vendor whereas renderer should be used. 2007-07-12 Florian Boucault * libs/pypgmtools/widgets/top_level_menu.py: Top menu level was still visible. 2007-07-12 Loïc Molinari * plugins/opengl/pgmaglbackend.c: * plugins/opengl/pgmbackend.c: * plugins/opengl/pgmbackend.h: * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmglxbackend.c: * plugins/opengl/pgmglxbackend.h: * plugins/opengl/pgmwglbackend.c: Added support for VBlank syncing. 2007-07-12 Florian Boucault * libs/pypgmtools/widgets/curved_list.py: focused element stacking fixed. * libs/pypgmtools/widgets/grid_view.py: various fixes for elisa's integration. * libs/pypgmtools/widgets/list.py: fg_color set. remove implemented. 2007-07-12 Florian Boucault * libs/pypgmtools/widgets/curved_list.py: Fixed stacking issue. 2007-07-11 Loïc Molinari * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmgldrawable.c: * plugins/opengl/pgmglimage.c: * plugins/opengl/pgmglimage.h: * plugins/opengl/pgmgltext.c: * plugins/opengl/pgmglviewport.c: * plugins/opengl/pgmglviewport.h: * plugins/opengl/pgmglxbackend.c: Added support for non-square-pixels. Fixed custom ratio applied on images. 2007-07-10 Florian Boucaul * libs/pypgmtools/widgets/player_osd.py: PlayerOsd widget implicit animation mode set to REPLACE. 2007-07-10 Loïc Molinari * configure.ac: Bumped API/ABI versions. * plugins/opengl/pgmgldefs.h: Removed useless constants. * pgm/pgmviewport.c: Added a check in set_cursor to call subclass only when necessary. 2007-07-10 Florian Boucault * libs/pypgmtools/widgets/top_level_menu.py: Computations re-done so that the widget fits in a bounding box. 2007-07-09 Loïc Molinari * pgm/pgmimagesink.c: * pgm/pgmimagesink.h: Added support of the pixel-aspect-ratio returned by GStreamer. * pgm/pgmimage.c: Added debug. 2007-07-09 Arek Korbik * misc/pgm-uninstalled: Make pgm-uninistalled more Darwin and developer friendly. 2007-07-09 Arek Korbik * plugins/opengl/pgmaglbackend.c: Add initial version of keyboard handling; create windows hidden initially; implement show/hide methods; cleanup and organize the code a bit. 2007-07-09 Loïc Molinari * pgm/pgmtext.c: Checked empty string and compared same strings before setting a new label/markup. * plugins/opengl/pgmgltext.c: Called correctly set_text or set_markup depending on the string type. fixes #114 2007-07-06 Loïc Molinari * plugins/opengl/pgmglxbackend.c: * plugins/opengl/pgmglxbackend.h: Change the viewport size and update the projection on fullscreen switches. 2007-07-06 Mirco Müller * libs/pypgmtools/widgets/top_level_menu.py: tuned the screen-resolution "awareness" of the included example a bit more 2007-07-06 Florian Boucault * libs/pypgmtools/widgets/top_level_menu.py: Removed useless code. 2007-07-05 Mirco Müller * libs/pypgmtools/widgets/top_level_menu.py: adapted example included in widget to use the fullscreen-feature now by default 2007-07-05 Loïc Molinari * plugins/opengl/pgmglxbackend.c: * plugins/opengl/pgmglxbackend.h: Fixed show/hide and fullscreen state conflicts. 2007-07-05 Florian Boucault * libs/pypgmtools/widgets/list.py: Insert does not do unnecessary update anymore. 2007-07-05 Loïc Molinari Patch by: Mirco Müller * plugins/opengl/pgmglxbackend.c: Fixed fullscreen. * examples/pgm/image.c: Completed example to use fullscreen. 2007-07-05 Loïc Molinari * plugins/opengl/pgmcontext.c: Flush the queues and iterate the context before joining the render loop. 2007-07-05 Florian Boucault * libs/pypgmtools/widgets/list.py: When jumping far from the current selected item, stop sucking CPU. 2007-07-05 Mirco Müller * libs/pypgmtools/widgets/top_level_menu.py: changed the rotation direction for the carousel-mode upon request by the elisa-devs 2007-07-05 Florian Boucault * libs/pypgmtools/widgets/grid_view.py: Fixed: position was missing. 2007-07-05 Loïc Molinari * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmcontext.h: * plugins/opengl/pgmglimage.c: * plugins/opengl/pgmgltext.c: * plugins/opengl/pgmtexture.c: Fixed GL calls being called from other threads than the render one. 2007-07-05 Florian Boucault * libs/pypgmtools/timing/controller.py: Tiny syntax fixes. * libs/pypgmtools/timing/implicit.py: Performance improvements. * libs/pypgmtools/widgets/top_level_menu.py: Update framerate set to 1/15. Commented out some select stuff. 2007-07-05 Mirco Müller * examples/pypgm/video.py: made usage/help-text more verbose and provided an example in the help-text new users have reported problems understanding how it works (what uri means) 2007-07-04 Loïc Molinari * plugins/opengl/pgmcontext.c: Removed duplicate in queues before pushing. 2007-07-04 Loïc Molinari * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmcontext.h: * plugins/opengl/pgmgldrawable.c: * plugins/opengl/pgmglimage.c: * plugins/opengl/pgmgltext.c: * plugins/opengl/pgmtexture.c: * plugins/opengl/pgmtexture.h: Removed all the tasks related to a drawable from the queues when the drawable is freed. 2007-07-04 Florian Boucault * libs/pypgmtools/widgets/curved_list.py: * libs/pypgmtools/widgets/image_list.py: * libs/pypgmtools/widgets/list.py: * libs/pypgmtools/widgets/ring_list.py: * libs/pypgmtools/widgets/text_list.py: Renamed objects to widgets everywhere. Remove position from the __init__. * libs/pypgmtools/widgets/grid_view.py: Renamed entry to widget. Random fixes. * libs/pypgmtools/widgets/top_level_menu.py: Removed opacity and visible from __init__. Random fixes. Commented out change in size and position of the disappearing elements when selected. 2007-07-04 Mirco Müller * libs/pypgmtools/widgets/top_level_menu.py: removed stale testing code and fixed an error with directly setting the focused item 2007-07-04 Mirco Müller * libs/pypgmtools/widgets/top_level_menu.py: added guards for the case of a widget without any items 2007-07-04 Mirco Müller * libs/pypgmtools/widgets/top_level_menu.py: changed the paths to the icons to be relative to the projects root directory 2007-07-04 Mirco Müller * examples/pictures/dvd-*_256x256.png: * examples/pictures/music-*_256x256.png: * examples/pictures/photo-*_256x256.png: * examples/pictures/service-*_256x256.png: * examples/pictures/video-*_256x256.png: some graphical assests for the demo included in the TopLevelMenu widget, the images are based on SVG-icons from the Tango-project and slightly modified using inkscape and gimp 2007-07-04 Mirco Müller * libs/pypgmtools/widgets/top_level_menu.py: rewrite of the TopLevelMenu widget 2007-07-04 Loïc Molinari * AUTHORS: Added Arek Korbik to the contributors. * HACKING: Added the comment part. * libs/pypgm/pgm/pgm.override: * libs/pypgm/pgm/pgmcanvas.override: * plugins/opengl/pgmgldefs.h: Coding guidelines fixes. * pgm/pgmevents.c: * pgm/pgmkeysyms.h: Licensing fixes. 2007-07-03 Arek Korbik * plugins/opengl/pgmaglbackend.c: * plugins/opengl/pgmaglbackend.h: Initial import of the AGL backend implementation. * plugins/opengl/pgmcontext.c (render_loop): Hook AGL check into backend instance creation. * configure.ac: * libs/pypgm/pgm/Makefile.am: * plugins/opengl/Makefile.am: Add OSX/AGL-specific changes to the config files. 2007-07-03 Florian Boucault * libs/pypgmtools/widgets/curved_list.py: * libs/pypgmtools/widgets/grid_view.py: * libs/pypgmtools/widgets/list.py: Now work from pigment root directory. 2007-07-03 Florian Boucault * libs/pypgmtools/timing/implicit.py: More Drawable attributes are now implicitly animated. * libs/pypgmtools/widgets/image_transition.py: Refurbished. 2007-07-02 Loïc Molinari Relicenced from GPL to LGPL. Updated README, TODO and HACKING. Added Benjamin Kampmann in the contributors list. Removed the win32 build files since it's not building anymore. Removed trailing spaces and adapted code to the guidelines. 2007-07-02 Florian Boucault * libs/pypgmtools/widgets/list.py: * libs/pypgmtools/widgets/slideshow.py: DECELERATE transformation used. 2007-07-02 Florian Boucault * libs/pypgmtools/graph/group.py: Better algorithm. 2007-07-01 Florian Boucault * libs/pypgmtools/widgets/ring_list.py: New cool widget. 2007-07-01 Florian Boucault * libs/pypgmtools/widgets/player_dock.py: __main__ was broken. 2007-07-01 Florian Boucault * libs/pypgmtools/widgets/player_dock.py: * libs/pypgmtools/widgets/player_osd.py: Bug fixed: trying to cancel an inactive delayed call. 2007-06-30 Florian Boucault * examples/pypgm/implicit.py: Cleaned up. * examples/pypgm/top_level_menu.py: * libs/pypgmtools/widgets/Makefile.am: Moved to libs/pypgmtools/widgets. * examples/pypgm/Makefile.am: * examples/pypgm/groups.py: Cleaned up a bit and moved to examples/pypgm. 2007-06-30 Florian Boucault * examples/pypgm/Makefile.am: * examples/pypgm/group-tests/implicit.py: * examples/pypgm/implicit.py: * examples/pypgm/cloning.py: * examples/pypgm/image.py: * examples/pypgm/text.py: * examples/pypgm/timing.py: * examples/pypgm/video.py: * examples/pypgm/viewports.py: Moved implicit.py in examples/pypgm. Uniformisation of all the examples for consistency sake. * examples/pypgm/text-list-widget/textlist.py: Fixed. * examples/Makefile.am: * examples/pypgmtools/Makefile.am: * examples/pypgmtools/button.py: * examples/pypgmtools/choice_box.py: * examples/pypgmtools/data/blue.png: * examples/pypgmtools/data/blue_fg.png: * examples/pypgmtools/data/sound-background.png: * examples/pypgmtools/data/sound-up.png: * examples/pypgmtools/growing_progress_bar.py: * examples/pypgmtools/player_dock.py: * examples/pypgmtools/progress_bar.py: * examples/pypgmtools/slideshow.py: * examples/pypgmtools/text_button.py: * examples/pypgmtools/text_choice_box.py: * examples/pypgmtools/top_level_menu.py: * examples/pypgmtools/twslideshow.py: Moved the testing code to __main__ of the widgets. Removed examples/pypgmtools. * libs/pypgmtools/widgets/Makefile.am: * libs/pypgmtools/widgets/button.py: * libs/pypgmtools/widgets/choice_box.py: * libs/pypgmtools/widgets/player_dock.py: * libs/pypgmtools/widgets/player_osd.py: * libs/pypgmtools/widgets/progressbar.py: * libs/pypgmtools/widgets/slideshow.py: * libs/pypgmtools/widgets/text_button.py: * libs/pypgmtools/widgets/text_choice_box.py: * libs/pypgmtools/widgets/text_list.py: Moved the testing code to __main__ of the widgets. Not all of them have been ported to the new event handling. Some of them need pictures to do anything. The __main__ are all quite different and not nice to read. 2007-06-30 Florian Boucault * libs/pypgmtools/widgets/curved_list.py: * libs/pypgmtools/widgets/list.py: Code factorisation, CurvedList now inherits from List. 2007-06-30 Florian Boucault * libs/pypgmtools/timing/implicit.py: Resolution for implicit animation set to 17 by default. 2007-06-29 Florian Boucault * examples/pypgm/group-tests/drawable.py: Fixed against the new mainloop. * libs/pypgmtools/graph/group.py: Workaround in size__set when there is no children. * libs/pypgmtools/widgets/curved_list.py: * libs/pypgmtools/widgets/list.py: Back to the non curved list. Just for Thomas. * libs/pypgmtools/widgets/player_osd.py: Fixed for new size__set in groups. 2007-06-29 Loïc Molinari * pgm/pgmimage.c: * plugins/opengl/pgmglimage.c: Added cloning support. * examples/pypgm/Makefile.am: * examples/pypgm/cloning.py: Added an example for the cloning. 2007-06-29 Florian Boucault * examples/pypgm/group-tests/groups.py: * libs/pypgmtools/graph/group.py: * tests/pypgmtools/test_group.py: size__set added to groups. 2007-06-29 Benjamin Kampmann * examples/pypgmtools/slideshow.py: * examples/pypgmtools/twslideshow.py: updated slideshows to use the new show() of the viewport * libs/pypgmtools/widgets/slideshow.py: updated the API: list__get, list__set, index__set 2007-06-28 Loïc Molinari * docs/pgm/pigment-sections.txt: * examples/pgm/image.c: * examples/pgm/text.c: * examples/pgm/video.c: * examples/pypgm/image.py: * examples/pypgm/text.py: * examples/pypgm/timing.py: * examples/pypgm/video.py: * examples/pypgm/viewports.py: * libs/pypgm/pgm/pgm.defs: * libs/pypgm/pgm/pgmviewport.override: * pgm/pgmdrawable.c: * pgm/pgmviewport.c: * pgm/pgmviewport.h: * plugins/opengl/pgmaglbackend.c: * plugins/opengl/pgmbackend.c: * plugins/opengl/pgmbackend.h: * plugins/opengl/pgmglviewport.c: * plugins/opengl/pgmglxbackend.c: * plugins/opengl/pgmwglbackend.c: Added viewport_show/hide/is_visible API. Don't forget to show your viewport, it's hidden by default! 2007-06-28 Mirco Müller * examples/pypgmtools/top_level_menu.py: added the top-level menu widget, the CHAIN-mode works RING-mode is still broken and not working correctly, for the included example you will need to supply your own images 2007-06-28 Loïc Molinari * plugins/opengl/pgmglviewport.c: Added support for get_screen_size and get_screen_resolution. * plugins/opengl/pgmcontext.c: Removed trailing characters. 2007-06-28 Loïc Molinari * libs/pypgm/pgm/__init__.py: Added the __version__ symbol to the pgm module. * libs/pypgm/pgm/pgmmodule.c: Removed trailing spaces. 2007-06-28 Loïc Molinari * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmcontext.h: * plugins/opengl/pgmgldrawable.c: * plugins/opengl/pgmgldrawable.h: * plugins/opengl/pgmgltext.c: * plugins/opengl/pgmgltext.h: * plugins/opengl/pgmglviewport.c: * plugins/opengl/pgmglviewport.h: * plugins/opengl/pgmglxbackend.c: Adapted the projection when the viewport/canvas are resized. Added text regeneration when the viewport projection changes. * pgm/pgmcanvas.c: * pgm/pgmcanvas.h: Added the 'size-changed' signal. * pgm/pgmevents.h: Removed the time field from the configure event structure. Switched to gint for the configure event position. * examples/pgm/text.c: Updated example to test the configure events. 2007-06-28 Florian Boucault * libs/pypgmtools/widgets/progressbar.py: * examples/pypgmtools/progress_bar.py: * examples/pypgmtools/growing_progress_bar.py: Syntax fixes. Layer added to __init__. * libs/pypgmtools/timing/controller.py: Stop on a stopped animation fixed. * libs/pypgmtools/widgets/dock.py: Syntax fixes. * libs/pypgmtools/widgets/Makefile.am: * libs/pypgmtools/widgets/player_osd.py: * libs/pypgmtools/widgets/progressbar_osd.py: New player on screen display added. * tests/pypgmtools/test_group.py: Syntax fixes. 2007-06-26 Loïc Molinari * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmcontext.h: * plugins/opengl/pgmglimage.c: * plugins/opengl/pgmgltext.c: * plugins/opengl/pgmglviewport.c: * plugins/opengl/pgmglxbackend.c: Changed rendering thread algorithm. It was using a simple do-while approach with a lock and now it uses a GMainLoop with a dedicated GMainContext. There are two event sources to be able to push tasks aimed to be completed immediately or when the application requests an update. It also allows backends to add other event sources. * pgm/pgmviewport.c: Freed the event list after a dispatch. 2007-06-26 Florian Boucault * libs/pypgmtools/widgets/list.py: List widget: gaps removed. 2007-06-25 Loïc Molinari * plugins/opengl/pgmaglbackend.c: * plugins/opengl/pgmwglbackend.c: * plugins/opengl/pgmglxbackend.c: * plugins/opengl/pgmglxbackend.h: * plugins/opengl/pgmbackend.c: * plugins/opengl/pgmbackend.h: * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmcontext.h: Let the backend decides how it wants to handle events. Moved the X events handling thread creation in the GlxBackend. * pgm/pgmevents.h: * docs/pgm/Makefile.am: * docs/pgm/pigment-sections.txt: Removed pgmenumtypes.h from the parsed files. Added missing symbols. 2007-06-25 Loïc Molinari * docs/pgm/pigment-sections.txt: * examples/pgm/image.c: * examples/pgm/text.c: * examples/pypgm/image.py: * examples/pypgm/text.py: * examples/pypgm/viewports.py: * pgm/pgmevents.h: * pgm/pgmviewport.c: * pgm/pgmviewport.h: * plugins/opengl/pgmglxbackend.c: Added the "expose-event". 2007-06-25 Loïc Molinari * libs/pypgmtools/graph/Makefile.am: * libs/pypgmtools/widgets/Makefile.am: Sync'd with directory listing. 2007-06-24 Florian Boucault * examples/pypgm/size_animated_image.py: * libs/pypgmtools/graph/image.py: Removed API breakage: size_pivot removed. * libs/pypgmtools/graph/text.py: Removed API breakage: encode to UTF-8 string removed. * libs/pypgmtools/graph/drawable.py: * libs/pypgmtools/graph/widget_common.py: WidgetCommon renamed to Drawable. 2007-06-22 Florian Boucault * libs/pypgmtools/widgets/list.py: * libs/pypgmtools/widgets/text_list.py: Tweaking the list widgets. 2007-06-22 Florian Boucault * libs/pypgmtools/widgets/player_dock.py: * libs/pypgmtools/widgets/progressbar.py: Animation fixes. 2007-06-22 Loïc Molinari * plugins/opengl/pgmgltext.c: * plugins/opengl/pgmglviewport.c: Fixed a deadlock. 2007-06-22 Mirco Müller * examples/pypgmtools/grid-view-widget/bg-mask-bottom.png: * examples/pypgmtools/grid-view-widget/bg-mask-left.png: * examples/pypgmtools/grid-view-widget/bg-mask-right.png: * examples/pypgmtools/grid-view-widget/bg-mask-top.png: * examples/pypgmtools/grid-view-widget/bg.png: * examples/pypgmtools/grid-view-widget/grid-view-bg-masks.xcf: * examples/pypgmtools/grid-view-widget/grid-view-bg.png: * examples/pypgmtools/grid-view-widget/grid_view.py: * examples/pypgmtools/grid-view-widget/grid_view_test.py: * examples/pypgmtools/grid-view-widget/selector.png: * examples/pypgmtools/grid-view-widget/shade.png: moved all these to examples/pictures * libs/pypgmtools/widgets/grid_view.py: documented, adjusted path to images files used by the included example 2007-06-21 Florian Boucault * examples/pypgmtools/grid-view-widget/grid_view.py: Slashes replaced by os.path.join. 2007-06-21 Mirco Müller * examples/pypgmtools/grid-view-widget/grid_view.py: added get_index() method for convenience added more comments for the public calls and their behaviour made the example contained in the widget code use two command-line arguments so one can pass their own images and videos to the widget (caution: hugestress-test potential for your machine!) 2007-06-21 Florian Boucault * libs/pypgmtools/widgets/list.py: * libs/pypgmtools/widgets/text_list.py: List performance huge boost. Code much clearer. Orientation attribute added (HORIZONTAL or VERTICAL). 2007-06-21 Loïc Molinari * pgm/pgmviewport.c: Fixed a deadlock. * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmtexture.c: Nullified freed sturcture pointers. 2007-06-21 Florian Boucault * libs/pypgmtools/widgets/console.py: New console widget started. * libs/pypgmtools/widgets/dock.py: * libs/pypgmtools/widgets/list.py: * libs/pypgmtools/widgets/player_dock.py: * libs/pypgmtools/widgets/progressbar.py: * libs/pypgmtools/widgets/slideshow.py: Removed useless import. * libs/pypgmtools/widgets/scrollbar.py: Bug fixed: lenght -> length. 2007-06-20 Mirco Müller * examples/pypgmtools/grid-view-widget/bg-mask-bottom.png: * examples/pypgmtools/grid-view-widget/bg-mask-left.png: * examples/pypgmtools/grid-view-widget/bg-mask-right.png: * examples/pypgmtools/grid-view-widget/bg-mask-top.png: updated the mask images for the now working fade-out effect in the GridView * examples/pypgmtools/grid-view-widget/grid_view.py: implemented the fadeout-effect for elements on the edges 2007-06-20 Loïc Molinari * docs/pgm/Makefile.am: * docs/pgm/images/filled_layout.png: * docs/pgm/images/scaled_layout.png: * docs/pgm/images/zoomed_layout.png: * pgm/pgmimage.h: Added images to explain the different layouts. * plugins/opengl/pgmgltext.c: Removed trailing print. * plugins/opengl/pgmglviewport.c: Added locks. 2007-06-20 Loïc Molinari * pgm/pgmcanvas.c: * pgm/pgmcanvas.h: * pgm/pgmmarshal.list: Added the "regenerated" signal called on a regeneration request. * plugins/opengl/pgmgldrawable.c: * plugins/opengl/pgmgldrawable.h: * plugins/opengl/pgmglimage.c: * plugins/opengl/pgmgltext.c: * plugins/opengl/pgmgltext.h: * plugins/opengl/pgmglviewport.c: * plugins/opengl/pgmglviewport.h: Adapted the OpenGL plugin to regenerate text on request. * examples/pypgm/text.py: Removed useless line. 2007-06-18 Mirco Müller * examples/pypgmtools/grid-view-widget/grid_view.py: fixed performance issue, while only navigating on the same page, some clean ups 2007-06-20 Loïc Molinari * plugins/opengl/pgmglviewport.c: Fixed OpenGL plugin gldrawable insertion in layers to be sorted. * examples/pypgm/video.py: Simplified example. 2007-06-20 Loïc Molinari * pgm/pgmdrawable.c: * pgm/pgmmarshal.list: Used an ENUM marshaller instead of INT. 2007-06-20 Loïc Molinari * pgm/pgmcanvas.c: * pgm/pgmcanvas.h: * pgm/pgmdrawable.c: * plugins/opengl/pgmglviewport.c: Added ordering support. Modified set_order API removing the layer. * libs/pypgm/pgm/pgm.defs: Adapted to API change. * tests/check/Makefile.am: * tests/check/pgm/pgmcanvas.c: Unabled and added some unit tests regarding ordering. * tests/check/pgm/pgmtext.c: Adapted to API. * pgm/pgmimage.c: Fixed a deadlock. * misc/pgm-uninstalled: Hard-coded Pigment project variable. Removed version variable. 2007-06-20 Benjamin Kampmann * libs/pypgmtools/widgets/progressbar.py: adding unanimated method jump_to_position * libs/pypgmtools/widgets/player_dock.py: adding seek_position (not animated) * examples/pypgmtools/growing_progress_bar.py: * examples/pypgmtools/player_dock.py: improve the examples to use this * examples/pypgmtools/progress_bar.py: adding a example for the normal progressbar 2007-06-18 Mirco Müller * examples/pypgmtools/grid-view-widget/cover-??.jpg: * examples/pypgmtools/grid-view-widget/cover-??.png: * examples/pypgmtools/grid-view-widget/cover-??_small.png: removed all the cover images from the repository, you will need to supply your own example images/videos to make the GridView-example work * examples/pypgmtools/grid-view-widget/grid_view.py: example for GridView uses external images/videos now 2007-06-18 Mirco Müller * examples/pypgmtools/grid-view-widget moved from examples/pypgm * examples/pypgmtools/grid-view-widget/grid_view.py: extended example to use videos, made changes to the GridView widget in order to be able to pass a gst-pipeline as part of an entry too 2007-06-19 Benjamin Kampmann * examples/pypgmtools/twslideshow.py: * libs/pypgmtools/widgets/slideshow.py: Added a twisted based, automatic slideshow 2007-06-19 Benjamin Kampmann * libs/pypgmtools/widgets/dock.py: some fixes according to close and open problems * examples/pypgmtools/player_dock.py: * libs/pypgmtools/widgets/player_dock.py: player dock is now disappearing when using show() player dock now wants milliseconds (not seconds anymore) 2007-06-19 Philippe Normand * pgm/pgmtext.c: debug informations reporting in pgm_text_set_markup() 2007-06-19 Benjamin Kampmann * libs/pypgmtools/widgets/dock.py: * libs/pypgmtools/widgets/player_dock.py: dock inherits from group now, and player docks inherits from dock 2007-06-19 Florian Boucault * libs/pypgmtools/timing/implicit.py: * libs/pypgmtools/timing/modifier.py: Implicit animation now has two modes: APPEND and REPLACE. APPEND adds the target value to the already existing ones, REPLACE replaces them. 2007-06-18 Mirco Müller * examples/pypgm/grid-view-widget/grid_view.py: made grid-resolution, orientation and scroll_mode dynamically changable even after the widget has been created extended included example to bind the new methods to keys in order to try them out on the fly 2007-06-19 Florian Boucault * libs/pypgmtools/graph/group.py: * tests/pypgmtools/test_group.py: Size read-only property added: compute the bounding box. 2007-06-18 Mirco Müller * examples/pypgm/grid-view-widget/grid_view.py: fixed element-offset update on grid-layout change 2007-06-18 Florian Boucault * libs/pypgmtools/widgets/list.py: * libs/pypgmtools/widgets/text_list.py: Updated to new event handling. Animated cursor added. Show/Hide methods added. 2007-06-18 Benjamin Kampmann * examples/pypgmtools/slideshow.py: * libs/pypgmtools/widgets/Makefile.am: * libs/pypgmtools/widgets/slideshow.py: adding a simple slideshow with fading 2007-06-18 Mirco Müller * examples/pypgm/grid-view-widget/grid_view.py: fixed page-offset update on grid-layout change 2007-06-18 Mirco Müller * examples/pypgm/grid-view-widget/cover-01.png: * examples/pypgm/grid-view-widget/cover-01_small.png: * examples/pypgm/grid-view-widget/cover-02.png: * examples/pypgm/grid-view-widget/cover-02_small.png: * examples/pypgm/grid-view-widget/cover-03.png: * examples/pypgm/grid-view-widget/cover-03_small.png: * examples/pypgm/grid-view-widget/cover-04.png: * examples/pypgm/grid-view-widget/cover-04_small.png: * examples/pypgm/grid-view-widget/cover-05.png: * examples/pypgm/grid-view-widget/cover-05_small.png: * examples/pypgm/grid-view-widget/cover-06.png: * examples/pypgm/grid-view-widget/cover-06_small.png: * examples/pypgm/grid-view-widget/cover-07.png: * examples/pypgm/grid-view-widget/cover-07_small.png: * examples/pypgm/grid-view-widget/cover-08.png: * examples/pypgm/grid-view-widget/cover-08_small.png: * examples/pypgm/grid-view-widget/cover-09.png: * examples/pypgm/grid-view-widget/cover-09_small.png: * examples/pypgm/grid-view-widget/cover-10.png: * examples/pypgm/grid-view-widget/cover-10_small.png: * examples/pypgm/grid-view-widget/cover-11.png: * examples/pypgm/grid-view-widget/cover-11_small.png: * examples/pypgm/grid-view-widget/cover-12.png: * examples/pypgm/grid-view-widget/cover-12_small.png: * examples/pypgm/grid-view-widget/cover-13.png: * examples/pypgm/grid-view-widget/cover-13_small.png: * examples/pypgm/grid-view-widget/cover-14.png: * examples/pypgm/grid-view-widget/cover-14_small.png: * examples/pypgm/grid-view-widget/cover-15.png: * examples/pypgm/grid-view-widget/cover-15_small.png: * examples/pypgm/grid-view-widget/cover-16.png: * examples/pypgm/grid-view-widget/cover-16_small.png: * examples/pypgm/grid-view-widget/cover-17.png: * examples/pypgm/grid-view-widget/cover-17_small.png: * examples/pypgm/grid-view-widget/cover-18.png: * examples/pypgm/grid-view-widget/cover-18_small.png: * examples/pypgm/grid-view-widget/cover-19.png: * examples/pypgm/grid-view-widget/cover-19_small.png: * examples/pypgm/grid-view-widget/cover-20.png: * examples/pypgm/grid-view-widget/cover-20_small.png: * examples/pypgm/grid-view-widget/cover-21.png: * examples/pypgm/grid-view-widget/cover-21_small.png: * examples/pypgm/grid-view-widget/cover-22.png: * examples/pypgm/grid-view-widget/cover-22_small.png: * examples/pypgm/grid-view-widget/cover-23.png: * examples/pypgm/grid-view-widget/cover-23_small.png: * examples/pypgm/grid-view-widget/cover-24.png: * examples/pypgm/grid-view-widget/cover-24_small.png: * examples/pypgm/grid-view-widget/cover-25.png: * examples/pypgm/grid-view-widget/cover-25_small.png: * examples/pypgm/grid-view-widget/cover-26.png: * examples/pypgm/grid-view-widget/cover-26_small.png: * examples/pypgm/grid-view-widget/cover-27.png: * examples/pypgm/grid-view-widget/cover-27_small.png: * examples/pypgm/grid-view-widget/cover-28.png: * examples/pypgm/grid-view-widget/cover-28_small.png: * examples/pypgm/grid-view-widget/cover-29.png: * examples/pypgm/grid-view-widget/cover-29_small.png: * examples/pypgm/grid-view-widget/cover-30.png: * examples/pypgm/grid-view-widget/cover-30_small.png: * examples/pypgm/grid-view-widget/cover-31.jpg: * examples/pypgm/grid-view-widget/cover-31.png: * examples/pypgm/grid-view-widget/cover-31_small.png: * examples/pypgm/grid-view-widget/cover-32.jpg: * examples/pypgm/grid-view-widget/cover-32.png: * examples/pypgm/grid-view-widget/cover-32_small.png: * examples/pypgm/grid-view-widget/cover-33.jpg: * examples/pypgm/grid-view-widget/cover-33.png: * examples/pypgm/grid-view-widget/cover-33_small.png: * examples/pypgm/grid-view-widget/cover-34.jpg: * examples/pypgm/grid-view-widget/cover-34.png: * examples/pypgm/grid-view-widget/cover-34_small.png: * examples/pypgm/grid-view-widget/cover-35.jpg: * examples/pypgm/grid-view-widget/cover-35.png: * examples/pypgm/grid-view-widget/cover-35_small.png: * examples/pypgm/grid-view-widget/cover-36.jpg: * examples/pypgm/grid-view-widget/cover-36.png: * examples/pypgm/grid-view-widget/cover-36_small.png: * examples/pypgm/grid-view-widget/cover-37.jpg: * examples/pypgm/grid-view-widget/cover-37.png: * examples/pypgm/grid-view-widget/cover-37_small.png: * examples/pypgm/grid-view-widget/cover-38.jpg: * examples/pypgm/grid-view-widget/cover-38.png: * examples/pypgm/grid-view-widget/cover-38_small.png: * examples/pypgm/grid-view-widget/cover-39.jpg: * examples/pypgm/grid-view-widget/cover-39.png: * examples/pypgm/grid-view-widget/cover-39_small.png: * examples/pypgm/grid-view-widget/cover-40.jpg: * examples/pypgm/grid-view-widget/cover-40.png: * examples/pypgm/grid-view-widget/cover-40_small.png: * examples/pypgm/grid-view-widget/cover-41.jpg: * examples/pypgm/grid-view-widget/cover-41.png: * examples/pypgm/grid-view-widget/cover-41_small.png: * examples/pypgm/grid-view-widget/cover-42.jpg: * examples/pypgm/grid-view-widget/cover-42.png: * examples/pypgm/grid-view-widget/cover-42_small.png: * examples/pypgm/grid-view-widget/cover-43.jpg: * examples/pypgm/grid-view-widget/cover-43.png: * examples/pypgm/grid-view-widget/cover-43_small.png: * examples/pypgm/grid-view-widget/cover-44.jpg: * examples/pypgm/grid-view-widget/cover-44.png: * examples/pypgm/grid-view-widget/cover-44_small.png: * examples/pypgm/grid-view-widget/cover-45.jpg: * examples/pypgm/grid-view-widget/cover-45.png: * examples/pypgm/grid-view-widget/cover-45_small.png: * examples/pypgm/grid-view-widget/cover-46.jpg: * examples/pypgm/grid-view-widget/cover-46.png: * examples/pypgm/grid-view-widget/cover-46_small.png: * examples/pypgm/grid-view-widget/cover-47.jpg: * examples/pypgm/grid-view-widget/cover-47.png: * examples/pypgm/grid-view-widget/cover-47_small.png: * examples/pypgm/grid-view-widget/cover-48.jpg: * examples/pypgm/grid-view-widget/cover-48.png: * examples/pypgm/grid-view-widget/cover-48_small.png: * examples/pypgm/grid-view-widget/cover-49.jpg: * examples/pypgm/grid-view-widget/cover-49.png: * examples/pypgm/grid-view-widget/cover-49_small.png: * examples/pypgm/grid-view-widget/cover-50.jpg: * examples/pypgm/grid-view-widget/cover-50.png: * examples/pypgm/grid-view-widget/cover-50_small.png: * examples/pypgm/grid-view-widget/cover-51.jpg: * examples/pypgm/grid-view-widget/cover-51.png: * examples/pypgm/grid-view-widget/cover-51_small.png: added some more example image to play with for grid_view.py 2007-06-18 Mirco Müller * examples/pypgm/grid-view-widget/grid_view.py: implemented methods insert(), append() and remove(), made the included example use the new pigment keysyms, added a first version of set_grid() to change the widgets layout on the fly (with preserving the current selection), ripped the static image/cover list 2007-06-18 Loïc Molinari * pgm/pgmimage.c: Fixed deadlock. 2007-06-18 Colin Laplace * examples/pictures/cart_horiz.png: * examples/pictures/cart_horiz_selected.png: * examples/pictures/cart_vert.png: * examples/pictures/cart_vert_selected.png: * examples/pictures/down_cursor.png: * examples/pictures/down_cursor_selected.png: * examples/pictures/left_cursor.png: * examples/pictures/left_cursor_selected.png: * examples/pictures/right_cursor.png: * examples/pictures/right_cursor_selected.png: * examples/pictures/up_cursor.png: * examples/pictures/up_cursor_selected.png: * examples/pypgmtools/Makefile.am: * examples/pypgmtools/button.py: * examples/pypgmtools/choice_box.py: * examples/pypgmtools/text_button.py: * examples/pypgmtools/text_choice_box.py: * libs/pypgmtools/widgets/Makefile.am: * libs/pypgmtools/widgets/choice_box.py: * libs/pypgmtools/widgets/text_button.py: * libs/pypgmtools/widgets/text_choice_box.py: new ChoiceBox and TextChoiceBox Updated all examples to new pigment API Still some problems with ordering and transparency in pigment. 2007-06-18 Benjamin Kampmann * examples/pypgmtools/player_dock.py: fixed problem to the new key-pressed handling 2007-06-18 Benjamin Kampmann * examples/pypgmtools/data/sound-background.png: * examples/pypgmtools/data/sound-up.png: * examples/pypgmtools/player_dock.py: addin a player dock example * libs/pypgmtools/widgets/Makefile.am: * libs/pypgmtools/widgets/dock.py: removed some unusefull stuff from dock.py * libs/pypgmtools/widgets/player_dock.py: Added the player dock 2007-06-18 Loïc Molinari * pgm/Makefile.am: * pgm/pgmkeysyms.h: * pgm/pgmevents.c: * pgm/pgmevents.h: Added the hardware_keycode field in the PgmEventKey strucutre. Removed the bad PgmKeyValue enum adding a function to convert a keysym to its Unicode value. * plugins/opengl/pgmglxbackend.c: * docs/pgm/pigment-sections.txt: * examples/pgm/text.c: * examples/pypgm/video.py: Adapted to the new key API. * configure.ac: * libs/pypgm/Makefile.am: * libs/pypgm/pgm.defs: * libs/pypgm/pgm.override: * libs/pypgm/pgm/Makefile.am: * libs/pypgm/pgm/__init__.py: * libs/pypgm/pgm/keysyms.py: * libs/pypgm/pgm/pgm.defs: * libs/pypgm/pgm/pgm.override: * libs/pypgm/pgm/pgmevent.override: * libs/pypgm/pgm/pgmmodule.c: * libs/pypgm/pgm/pgmtext.override: * libs/pypgm/pgm/pgmviewport.override: * libs/pypgm/pgmcanvas.override: * libs/pypgm/pgmdrawable.override: * libs/pypgm/pgmevent.override: * libs/pypgm/pgmimage.override: * libs/pypgm/pgmmodule.c: * libs/pypgm/pgmtext.override: * libs/pypgm/pgmviewport.override: * libs/pypgm/pgmviewportfactory.override: Coding guidelines fixes. Adapted the binding to the new key API. Converted pgm to a package to easily integrate Python keysyms. * misc/pgm-uninstalled: Adapted PYTHONPATH for the new Python binding package. * plugins/opengl/pgmglimage.c: * plugins/opengl/pgmgltext.c: Checked texture ids validity before texture binding. * pgm/pgm.h: Removed trailing tabs. 2007-06-16 Philippe Normand * libs/pypgm/pgm.override: * libs/pypgm/pgmtext.override: * libs/pypgm/pgmviewport.override: Unicode support in the Python binding. Byte strings are still supported. * examples/pypgm/text.py: Adapted text example to use some unicode 2007-06-15 Mirco Müller * examples/pypgm/text-list-widget/textlist.py: font-size change * libs/pypgmtools/widgets/text_list.py: adapted TextList widget to the new event-handling API (rather the example included in it) 2007-06-15 Thomas Vander Stichele * configure.ac: Rename the variable for the second PANGO check, otherwise it caches the result from the first check. 2007-06-15 Mirco Müller * examples/pypgm/text-list-widget/textlist.py: adapted TextList example to the new event-handling API 2007-06-15 Loïc Molinari Patch by: Zaheer Abbas Merali * pgm/pgmdrawable.c: Fixed wrong GType in "drawable::changed" signal creation. 2007-06-15 Mirco Müller * examples/pypgm/grid-view-widget/cover-18.jpg: * examples/pypgm/grid-view-widget/cover-19.jpg: * examples/pypgm/grid-view-widget/cover-20.jpg: * examples/pypgm/grid-view-widget/cover-21.jpg: * examples/pypgm/grid-view-widget/cover-22.jpg: * examples/pypgm/grid-view-widget/cover-23.jpg: * examples/pypgm/grid-view-widget/cover-24.jpg: * examples/pypgm/grid-view-widget/cover-25.jpg: * examples/pypgm/grid-view-widget/cover-26.jpg: * examples/pypgm/grid-view-widget/cover-27.jpg: * examples/pypgm/grid-view-widget/cover-28.jpg: * examples/pypgm/grid-view-widget/cover-29.jpg: * examples/pypgm/grid-view-widget/cover-30.jpg: forgot to actually add them to the repository 2007-06-15 Mirco Müller * examples/pypgm/grid-view-widget/grid_view.py: made example of GridView use the new event-handling API, tweaked the display of the currently selected item, added a select() method and mapped that to SPACE- and RETURN-key in the example 2007-06-15 Philippe Normand * tests/pypgmtools/test_group.py: * tests/pypgmtools/test_image.py: Fixed unittest scripts 2007-06-15 Loïc Molinari * pgm/pgmmarshal.list: * pgm/pgmviewport.c: * pgm/pgmviewport.h: * libs/pypgm/pgm.defs: * libs/pypgm/pgm.override: * pgm/pgm.c: * pgm/pgm.h: Added the main loop API. Removed pgm_viewport_get_events symbol. Added pgm_viewport_push_event symbol. Added pgm_main, pgm_main_quit, pgm_main_iteration, pgm_main_iteration_do and pgm_events_pending symbols. Added PgmViewport event signals. Added a GSource using pipe to watch for new events. * pgm/pgmevents.c: * pgm/pgmevents.h: * libs/pypgm/pgmevent.override: Added the viewport property. * configure.ac: * pgm/Makefile.am: * pgm/pgmsink.c: * pgm/pgmsink.h: * pgm/pgmimagesink.c: * pgm/pgmimagesink.h: * docs/pgm/pigment-docs.sgml: Renamed pgmsink to pgmimagesink. * docs/pgm/pigment-sections.txt: Added the new main loop symbols. * docs/pgm/pigment.types: Added pigment.types to introspect signals. * examples/pgm/image.c: * examples/pgm/text.c: * examples/pgm/video.c: * examples/pypgm/image.py: * examples/pypgm/text.py: * examples/pypgm/timing.py: * examples/pypgm/video.py: Adapted examples to the main loop API. * examples/pypgm/viewports.py: Added an example to show the use of multiple viewports. * plugins/boilerplate/pgmbpviewport.c: * plugins/opengl/pgmglviewport.c: * plugins/opengl/pgmglviewport.h: * plugins/opengl/pgmglxbackend.c: Adapted plugins to the main loop API. * plugins/opengl/pgmcontext.c: Forced an update at the end of the Context creation. 2007-06-15 Benjamin Kampmann * examples/pypgmtools/Makefile.am: * examples/pypgmtools/data/blue.png: * examples/pypgmtools/data/blue_fg.png: * examples/pypgmtools/growing_progress_bar.py: Adding a example for the growing progress bar * libs/pypgmtools/widgets/progressbar.py: fixing a missing import in progressbar 2007-06-15 Mirco Müller * examples/pypgm/grid-view-widget/grid_view.py: element- and page-wise scrolling works for both top-bottom and left-right GridView orientations 2007-06-15 Benjamin Kampmann * libs/pypgmtools/widgets/progressbar.py: Adding the first version of a growing progress bar 2007-06-15 Loïc Molinari * pgm/pgmviewport.h: Fixed bad parent_class type in PgmViewportClass structure. 2007-06-15 Loïc Molinari * configure.ac: * plugins/opengl/pgmgltext.c: Checked for Pango >= 1.8 minimum for the OpenGL plugin. Checked for Pango >= 1.16 to ifdef out gravity/justification related functions in the OpenGL plugin. 2007-06-15 Loïc Molinari * examples/pypgm/text.py: * libs/pypgm/pgm.defs: * libs/pypgm/pgmtext.override: * pgm/pgmtext.c: * pgm/pgmtext.h: * plugins/opengl/pgmgltext.c: * plugins/opengl/pgmgltext.h: * plugins/opengl/pgmglviewport.c: Moved pgm_text_set_height to pgm_text_set_font_height in order to resolve a conflict in the Python binding with the drawable height property. 2007-06-14 Mirco Müller * examples/pypgm/grid-view-widget/bg-mask-bottom.png: * examples/pypgm/grid-view-widget/bg-mask-left.png: * examples/pypgm/grid-view-widget/bg-mask-right.png: * examples/pypgm/grid-view-widget/bg-mask-top.png: * examples/pypgm/grid-view-widget/bg.png: * examples/pypgm/grid-view-widget/cover-01.jpg: * examples/pypgm/grid-view-widget/cover-02.jpg: * examples/pypgm/grid-view-widget/cover-03.jpg: * examples/pypgm/grid-view-widget/cover-04.jpg: * examples/pypgm/grid-view-widget/cover-05.jpg: * examples/pypgm/grid-view-widget/cover-06.jpg: * examples/pypgm/grid-view-widget/cover-07.jpg: * examples/pypgm/grid-view-widget/cover-08.jpg: * examples/pypgm/grid-view-widget/cover-09.jpg: * examples/pypgm/grid-view-widget/cover-10.jpg: * examples/pypgm/grid-view-widget/cover-11.jpg: * examples/pypgm/grid-view-widget/cover-12.jpg: * examples/pypgm/grid-view-widget/cover-13.jpg: * examples/pypgm/grid-view-widget/cover-14.jpg: * examples/pypgm/grid-view-widget/cover-15.jpg: * examples/pypgm/grid-view-widget/cover-16.jpg: * examples/pypgm/grid-view-widget/cover-17.jpg: * examples/pypgm/grid-view-widget/grid-view-bg-masks.xcf: * examples/pypgm/grid-view-widget/grid-view-bg.png: * examples/pypgm/grid-view-widget/grid_view.py: * examples/pypgm/grid-view-widget/grid_view_test.py: * examples/pypgm/grid-view-widget/selector.png: * examples/pypgm/grid-view-widget/shade.png: added first version of GridView widget, but it's not finished yet... just making sure it's under version-control now Do not touch it yet! 2007-06-14 Colin Laplace * examples/pictures/Makefile.am: * examples/pictures/btn_disabled.png: * examples/pictures/btn_down.png: * examples/pictures/btn_hover.png: * examples/pictures/btn_selected.png: * examples/pictures/btn_up.png: * examples/pictures/cart_horiz.png: * examples/pictures/cart_horiz_selected.png: * examples/pictures/cart_vert.png: * examples/pictures/cart_vert_selected.png: * examples/pictures/down_cursor.png: * examples/pictures/down_cursor_selected.png: * examples/pictures/left_cursor.png: * examples/pictures/left_cursor_selected.png: * examples/pictures/right_cursor.png: * examples/pictures/right_cursor_selected.png: * examples/pictures/up_cursor.png: * examples/pictures/up_cursor_selected.png: * examples/pypgmtools/Makefile.am: * examples/pypgmtools/choice_box.py: * libs/pypgmtools/widgets/Makefile.am: * libs/pypgmtools/widgets/button.py: * libs/pypgmtools/widgets/choice_box.py: * libs/pypgmtools/widgets/text_button.py: ChoiceBox. Weird bug in pigment gives a weird black trace... Cannot find why for now 2007-06-14 Florian Boucault * libs/pypgmtools/graph/group.py: Fixed remove so that it recursively remove the drawables from the canvas. Fixed opacity propagation when a drawable or a group is added. * libs/pypgmtools/widgets/list.py: Fixed elements initial position. 2007-06-14 Loïc Molinari * pgm/pgmimage.c: Added support to retrieve the aspect-ratio of the stored image. 2007-06-14 Benjamin Kampmann * libs/pypgmtools/widgets/Makefile.am: * libs/pypgmtools/widgets/progressbar.py: * libs/pypgmtools/widgets/scrollbar.py: Adding Scrollbar, LinedScrollbar and a Progressbar 2007-06-14 Florian Boucault * libs/pypgmtools/widgets/list.py: * libs/pypgmtools/widgets/text_list.py: Fixed non modifiable font height. 2007-06-14 Loïc Molinari * plugins/opengl/pgmglimage.c: Added the zoomed layout type. Fixed alignment to correctly reset to center. 2007-06-13 Florian Boucault * examples/pypgm/text-list-widget/textlist.py: Selector offset added. * examples/pypgm/video.py: Syntax fixes. * libs/pypgmtools/timing/implicit.py: Fixed: animating attributes when opacity is 0 but animated at the same time. * libs/pypgmtools/widgets/Makefile.am: * libs/pypgmtools/widgets/list.py: * libs/pypgmtools/widgets/text_list.py: TextList is now inheriting from a generic List. 2007-06-13 Colin Laplace * examples/pypgmtools/button.py: * examples/pypgmtools/text_button.py: * libs/pypgmtools/widgets/button.py: * libs/pypgmtools/widgets/text_button.py: new Button and TextButton widgets. the label is currently not shown of the TextButton, because of the lack of ordering support 2007-06-13 Mirco Müller * libs/pypgmtools/widgets/text_list.py: fixed the import from module implicit 2007-06-13 Mirco Müller * libs/pypgmtools/widgets/text_list.py: made the text-list widget use ease-out/decelerate 2007-06-13 Loïc Molinari Patch by: Zaheer Abbas Merali * pgm/pgmdrawable.c: * pgm/pgmmarshal.list: Fixed wrong marshaller for the "drawable::changed" signal. * plugins/opengl/pgmgldrawable.c: Added a condition to not draw if the opacity is 0. 2007-06-12 Florian Boucault * examples/pypgm/text-list-widget/textlist.py: * libs/pypgmtools/timing/modifier.py: * libs/pypgmtools/widgets/text_list.py: TextList code cleanup. 2007-06-12 Mirco Müller * libs/pypgmtools/graph/group.py: * tests/pypgmtools/test_group.py: implemented remove to group and added unit-tests 2007-06-11 Mirco Müller * libs/pypgmtools/widgets/text_list.py: fixed the method insert for "empty widget"-case 2007-06-11 Mirco Müller * libs/pypgmtools/widgets/text_list.py: fixed some issues 2007-06-11 Mirco Müller * examples/pypgm/text-list-widget/textlistwidget.py: hm... I thought I deleted this one * libs/pypgmtools/widgets/Makefile.am: modified to reflect the added widget * libs/pypgmtools/widgets/text_list.py: moved the widget to its designated target-directory 2007-06-11 Mirco Müller * examples/pypgm/text-list-widget/bar.png: * examples/pypgm/text-list-widget/bg-green-stripes.png: * examples/pypgm/text-list-widget/bg-green.png: * examples/pypgm/text-list-widget/selector-green.png: * examples/pypgm/text-list-widget/speaker-green-reflection.png: * examples/pypgm/text-list-widget/speaker-green.png: added some images to create a better mockup showing the feel of elisa as an example * examples/pypgm/text-list-widget/textlist.py: added this file and fixed the animation issues for fast moving up/down, inserting and removing elements in a already shown text-list widget * examples/pypgm/text-list-widget/textlistwidget.py: removed this due the new naming-scheme to be used for widgets 2007-06-11 Florian Boucault * examples/pypgm/group-tests/dock.py: Added video example. 2007-06-11 Loïc Molinari * configure.ac: Modified the GStreamer plugin path variable name. * examples/pgm/image.c: * examples/pgm/text.c: Removed useless unrefs. * examples/pgm/Makefile.am: * examples/pgm/video.c: Added C video example. * examples/pypgm/Makefile.am: * examples/pypgm/video.py: Added Python video example * misc/pgm-uninstalled: Added the PGM_PLUGIN_PATH variable * pgm/pgm.c: Load/unload the GStreamer plugin at init/deinit. * pgm/pgmsink.c: * pgm/pgmsink.h: Adapted to only output RGB buffers ATM. * pgm/pgmimage.c: * plugins/opengl/pgmglimage.c: Added GstBuffer support. 2007-06-11 Florian Boucault * configure.ac: * libs/pypgmtools/Makefile.am: * libs/pypgmtools/widgets/Makefile.am: * libs/pypgmtools/widgets/__init__.py: Added new module: widgets. 2007-06-09 Mirco Müller * examples/pypgm/text-list-widget/bg.png: * examples/pypgm/text-list-widget/selector.png: * examples/pypgm/text-list-widget/shade.png: added these files for visual style bonus * examples/pypgm/text-list-widget/textlistwidget.py: extended the main-function with some bling and added the cursor/selector parameter to the widget 2007-06-08 Mirco Müller * examples/pypgm/text-list-widget/textlistwidget.py: fixed a crash for trying to remove non-existing element 2007-06-08 Mirco Mueller * examples/pypgm/text-list-widget/main.py: removed * examples/pypgm/text-list-widget/textlistwidget.py: included the stuff from main.py in here 2007-06-08 Loïc Molinari * examples/pypgm/timing.py: * libs/pypgmtools/timing/controller.py: Moved Controller interpolation property to transformation. Added the LINEAR, SMOOTH, DECELERATE, ACCELERATE constants. Adapted the timing example. 2007-06-08 Florian Boucault * examples/pypgm/group-tests/dock.py: * examples/pypgm/group-tests/implicit.py: * libs/pypgmtools/timing/implicit.py: New feature for implicit animations: list of target values. Added more parameters from Controller. 2007-06-08 Florian Boucault * examples/pypgm/group-tests/dock.py: Revamped, cleaner, cooler Dock. * libs/pypgmtools/graph/group.py: * libs/pypgmtools/graph/image.py: * libs/pypgmtools/graph/text.py: * tests/pypgmtools/test_group.py: * tests/pypgmtools/test_image.py: Removed __author__ field. * libs/pypgmtools/timing/research/animation: Added new ideas. 2007-06-07 Florian Boucault * examples/pypgm/group-tests/dock.py: prototype in order to validate some ideas. * examples/pypgm/group-tests/drawable.py: implicit animation added. * libs/pypgmtools/graph/group.py: canvas parameter added so that drawables can be added to the canvas. 2007-06-07 Florian Boucault * examples/pypgm/group-tests/drawable.py: Switched to the new groups. * libs/pypgmtools/graph/group.py: Fixed import. 2007-06-07 Florian Boucault * libs/pypgmtools/graph/Makefile.am: * libs/pypgmtools/graph/element.py: * libs/pypgmtools/graph/wrappers.py: * libs/pypgmtools/group.py: * libs/pypgmtools/image.py: * libs/pypgmtools/text.py: Moved new groups to their final place. 2007-06-06 Florian Boucault * examples/pypgm/group-tests/implicit.py: Experiments. * libs/pypgmtools/timing/controller.py: Code factoring. HOLD end behaviour fixed. * libs/pypgmtools/timing/implicit.py: Nicer transitions when new target values are set * libs/pypgmtools/timing/modifier.py: Tabs removed. Timeline now modifiable on the fly. 2007-06-05 Loïc Molinari * plugins/opengl/pgmgltext.c: Optimized unpremultiply alpha buffer pass. * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmcontext.h: Added a locking condition to wait for the rendering thread initialization completion. * pgm/pgm.c: * pgm/pgmcanvas.c: * pgm/pgmellipse.c: * pgm/pgmevents.c: * pgm/pgmimage.c: * pgm/pgmrectangle.c: * pgm/pgmtext.c: * pgm/pgmviewport.c: * pgm/pgmviewportfactory.c: * plugins/opengl/pgmbackend.c: * plugins/opengl/pgmtexture.c: Added config.h in all the files. * examples/pgm/image.c: * examples/pgm/text.c: Fixed to respect the coding guidelines. Added error checks. * HACKING: Removed out-of-date hierarchy explanation. 2007-06-03 Florian Boucault * libs/pypgmtools/graph/element.py: * libs/pypgmtools/graph/group.py: Finally commented. 2007-06-03 Florian Boucault * examples/pgm/image.c: Fails properly if the image file is not to be found. * libs/pypgmtools/graph/element.py: Comments added. * libs/pypgmtools/timing/research/animation: * libs/pypgmtools/timing/research/animation.svg: * libs/pypgmtools/timing/research/implicit.svg: * libs/pypgmtools/timing/research/triggers.svg: Beginning of a thought about the animation framework. 2007-06-02 Florian Boucault * examples/pypgm/group-tests/implicit.py: Removed spaces before opening parenthesis. * libs/pypgmtools/timing/implicit.py: * libs/pypgmtools/graph/wrappers.py: Simpler code. * libs/pypgmtools/timing/Makefile.am: Added implicit.py * libs/pypgmtools/timing/animated_object.py: Deprecated. * libs/pypgmtools/timing/controller.py: Replaced tabs with spaces. 2007-06-02 Florian Boucault * examples/pypgm/group-tests/animated_object.py: * libs/pypgmtools/timing/implicit.py: Moved to pypgmtools. Documentation added. * examples/pypgm/group-tests/group-test.py: * examples/pypgm/group-tests/implicit.py: Adapted to the previous move. * libs/pypgmtools/graph/wrappers.py: 80 columns wrap. 2007-06-01 Loïc Molinari * Makefile.am: * configure.ac: * libs/Makefile.am: * libs/pypgmtools/Makefile.am: * libs/pypgmtools/graph/Makefile.am: * libs/pypgmtools/timing/Makefile.am: * libs/pypgmtools/utils/Makefile.am: * misc/Makefile.am: Added pypgmtools in the dist. Added pgm-uninstall in the dist. * pgm/pgmdrawable.c: * pgm/pgmdrawable.h: * docs/pgm/pigment-sections.txt: * libs/pypgm/pgm.defs: * libs/pypgm/pgmdrawable.override: * plugins/opengl/pgmgldrawable.c: * plugins/opengl/pgmgldrawable.h: * plugins/opengl/pgmglimage.c: * plugins/opengl/pgmgltext.c: * plugins/opengl/pgmglviewport.c: * plugins/opengl/pgmglviewport.h: * plugins/opengl/pgmglxbackend.c: Removed shadow_inner/outer_color keeping one shadow_color. * libs/pypgm/pgmtext.override: Added tp_get for the markup property to fix a warning. * libs/pgm/Makefile.am: * libs/pgm/tk/Makefile.am: * libs/pgm/tk/__init__.py: * libs/pgm/tk/form/Makefile.am: * libs/pgm/tk/form/__init__.py: * libs/pgm/tk/form/color.py: * libs/pgm/tk/form/component.py: * libs/pgm/tk/form/filter.py: * libs/pgm/tk/form/gradient.py: * libs/pgm/tk/form/image.py: * libs/pgm/tk/form/label.py: * libs/pgm/tk/form/media.py: * libs/pgm/tk/form/paint.py: * libs/pgm/tk/form/rectangle.py: * libs/pgm/tk/form/shadow.py: * libs/pgm/tk/form/shape.py: * libs/pgm/tk/form/stroke.py: * libs/pgm/tk/layout/Makefile.am: * libs/pgm/tk/layout/__init__.py: * libs/pgm/tk/layout/group.py: * libs/pgm/tk/layout/leaf.py: * libs/pgm/tk/layout/window.py: * libs/pgm/tk/log.py: * libs/pgm/tk/message/Makefile.am: * libs/pgm/tk/message/__init__.py: * libs/pgm/tk/message/signal.py: * libs/pgm/tk/render.py.in: * libs/pgm/tk/timing/Makefile.am: * libs/pgm/tk/timing/__init__.py: * libs/pgm/tk/timing/controller.py: * libs/pgm/tk/timing/keyframe.py: * libs/pgm/tk/timing/modifier.py: * libs/pgm/tk/util/Makefile.am: * libs/pgm/tk/util/__init__.py: * libs/pgm/tk/util/classinit.py: * libs/pgm/tk/util/discoverer.py: * libs/pgm/tk/util/maths.py: * libs/pgm/tk/util/string_tools.py: * libs/pgm/tk/widget.py: Removed since it's not used anymore. * libs/pypgmtools/group.py: Removed. 2007-06-01 Florian Boucault * examples/pypgm/group-tests/drawable.py: Adapted to new groups. * libs/pypgmtools/graph/element.py: * libs/pypgmtools/graph/group.py: * libs/pypgmtools/graph/wrappers.py: New scene-graph like framework. * libs/pypgmtools/timing/modifier.py: Small fix for a getattribute. 2007-06-01 Loïc Molinari * pgm/pgmdrawable.c: * pgm/pgmdrawable.h: * pgm/pgmimage.c: * pgm/pgmimage.h: * pgm/pgmtext.c: * docs/pgm/pigment-sections.txt: * tests/check/pgm/pgmdrawable.c: * tests/check/pgm/pgmimage.c: * libs/pypgm/pgm.defs: * libs/pypgm/pgmcanvas.override: * libs/pypgm/pgmdrawable.override: * libs/pypgm/pgmimage.override: * plugins/opengl/pgmgldrawable.c: * plugins/opengl/pgmgldrawable.h: * plugins/opengl/pgmglimage.c: * plugins/opengl/pgmglimage.h: * plugins/opengl/pgmglviewport.c: Moved layout_type and alignment from PgmDrawable to PgmImage. Changed set/get_layout_type to set/get_layout. Added layout and alignment to Image tp_get/set Python bindery. 2007-05-31 Loïc Molinari * plugins/opengl/pgmglimage.c: * plugins/opengl/pgmglimage.h: Added support for scaled and filled layout types. Added support for customized pixel aspect ratio. Added support for alignments. * plugins/opengl/pgmgldrawable.c: Fixed set_layout_type which was not calling the correct virtual method. * pgm/pgmimage.c: * tests/check/pgm/pgmimage.c: Made default custom p-a-r values to n=0, d=1. Adapted doc and unit test. 2007-05-30 Philippe Normand * libs/pypgmtools/timing/controller.py: * libs/pypgmtools/timing/modifier.py: * misc/pgm-uninstalled: Import pygst and require 0.10 before importing gst 2007-05-30 Philippe Normand * misc/pgm-uninstalled: A utility shell script stolen from Thomas's MOAP. 2007-05-30 Florian Boucault * examples/pypgm/group-tests/animated_drawable.py: Element class switched to Python-style. * examples/pypgm/group-tests/implicit.py: Exemple of how to use AnimatedDrawable. * examples/pypgm/group-tests/group-test.py: Adapted to use AnimatedDrawable. Removed spaces before parenthesis. * examples/pypgm/group-tests/group.py: No change. 2007-05-29 Loïc Molinari * libs/pypgm/pgmevent.override: Returned an enum from GType instead of just an int in the event getattr for several properties. 2007-05-29 Loïc Molinari * examples/pypgm/Makefile.am: Added timing example in the distribution. * libs/pypgmtools/timing/modifier.py: Added support for sequences to the relative operation. 2007-05-29 Loïc Molinari * libs/pypgmtools/__init__.py: * libs/pypgmtools/group.py: * libs/pypgmtools/timing/__init__.py: * libs/pypgmtools/timing/controller.py: * libs/pypgmtools/timing/keyframe.py: * libs/pypgmtools/timing/modifier.py: * libs/pypgmtools/utils/__init__.py: * libs/pypgmtools/utils/maths.py: Adapted the timing framework to the new architecture (pypgmtools). * examples/pypgm/timing.py: Added an example to test the timing system. 2007-05-28 Loïc Molinari * plugins/opengl/pgmgltext.c: Fixed crash in update_pixmap. Optimized removing of premultiplied alpha, ouf! 2007-05-28 Loïc Molinari * plugins/opengl/pgmaglbackend.c: * plugins/opengl/pgmaglbackend.h: * plugins/opengl/pgmbackend.c: * plugins/opengl/pgmbackend.h: * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmcontext.h: * plugins/opengl/pgmgltext.c: * plugins/opengl/pgmglviewport.c: * plugins/opengl/pgmglxbackend.c: * plugins/opengl/pgmglxbackend.h: * plugins/opengl/pgmwglbackend.c: * plugins/opengl/pgmwglbackend.h: Adapted to the new title API. Added context parameter to backend constructor. Added support for the EWMH specification (_NET_WM_USER_TIME, WM_DELETE_WINDOW, _NET_WM_PING, _NET_WM_NAME, _NET_WM_STATE_FULLSCREEN). Updated the viewport on Expose event. Compressed Expose event on the queue. Pushed scroll/delete events. Initialized support for threads in Xlib. Included offset consideration when pushing multi button events. Simplified window creation. Fixed text_set_size uninitialized text parameters. * examples/pypgm/image.py: Changed viewport title. Added events handling. closed application correctly on delete event. * examples/pypgm/text.py Changed viewport title. Added events handling. Added alignment changes function of button pressed. closed application correctly on delete event. * pgm/pgmevents.h: Updated doc. * pgm/pgmviewport.c: * pgm/pgmviewport.h: * docs/pgm/pigment-sections.txt: Changed set_title API removing the icon_title parameter. Added get_title API. * libs/pypgm/pgm.defs: * libs/pypgm/pgmtext.override: * libs/pypgm/pgmviewport.override: Adapted to the new title API. Added tp_get/set for viewport title/fullscreen properties. * plugins/boilerplate/pgmbpviewport.c: Adapted to the new title API. 2007-05-25 Loïc Molinari * configure.ac: Added pypgm examples. * plugins/opengl/pgmaglbackend.c: * plugins/opengl/pgmaglbackend.h: * plugins/opengl/pgmglxbackend.c: * plugins/opengl/pgmglxbackend.h: * plugins/opengl/pgmwglbackend.c: * plugins/opengl/pgmwglbackend.h: Changed PgmBackend subtype constructors to return PgmBackend*. 2007-05-25 Loïc Molinari * libs/pypgm/pgm.defs: * libs/pypgm/pgmtext.override: Added tp_get/set for PgmText properties. * plugins/opengl/pgmgldrawable.c: * plugins/opengl/pgmglimage.c: * plugins/opengl/pgmgltext.c: Fixed texture binding usage. Textures are now only binded by part needing it and unbinded before part which need to remove it. It avoids bind/unbind superfluous calls, and makes drivers happy. * examples/Makefile.am: Added pypgm examples to be ditributed. * examples/pypgm/text.py: Fixed comments. 2007-05-25 Loïc Molinari * examples/pypgm/Makefile.am: * examples/pypgm/image.py: * examples/pypgm/text.py: Added examples. * libs/pypgm/pgmtext.override: Wrapped constructor to support markup parameter. * pgm/pgmtext.c: * pgm/pgmtext.h: Changed to use set_markup instead of set_label in constructor. * plugins/opengl/pgmglxbackend.c: Cosmetic fix. 2007-05-25 Loïc Molinari * plugins/opengl/pgmglxbackend.c: Added support for double/triple button press events. 2007-05-24 Loïc Molinari Patch by: Mirco Müller * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmgl.c: * plugins/opengl/pgmgldrawable.c: * plugins/opengl/pgmglimage.c: * plugins/opengl/pgmglimage.h: * plugins/opengl/pgmgltext.c: * plugins/opengl/pgmgltext.h: * plugins/opengl/pgmglviewport.c: * plugins/opengl/pgmglxbackend.c: Unbind textures after drawing. Added text support. * configure.ac: Replaces Cairo dependency by PangoCairo. * examples/pgm/Makefile.am: * examples/pgm/text.c: Added text example. * examples/pgm/image.c: Backround color fully transparent. * pgm/pgmtext.c: * tests/check/pgm/pgmtext.c: Changed default height to 0.1f. * plugins/opengl/Makefile.am: * plugins/opengl/pgmgl.h: Added pgmgl.h file to integrate various global useful functions. * plugins/opengl/pgmgldefs.h: Cosmetic fix. * plugins/opengl/pgmbackend.h: Fixed cast compilation warning. 2007-05-22 Loïc Molinari Patch by: Mirco Müller * configure.ac: Included Cairo dependency in the OpenGL plugin. * pgm/pgmtext.c: * pgm/pgmtext.h: Moved outline_width type from gint to gfloat. Added enumeration descriptions. * tests/check/Makefile.am: * tests/check/pgm/pgmtext.c: Added two unit tests for the new PgmText API. 2007-05-22 Loïc Molinari * plugins/opengl/pgmbackend.c: * plugins/opengl/pgmbackend.h: * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmcontext.h: * plugins/opengl/pgmglviewport.c: * plugins/opengl/pgmglxbackend.c: * plugins/opengl/pgmglxbackend.h: * plugins/opengl/pgmtexture.c: Added display lists based text rasterizer. Added event handling in a dedicated thread. * pgm/pgmevents.c: * pgm/pgmevents.h: Moved memory allocation calls to GSlice. * pgm/pgmviewport.c: Mentioned what to free after a call to pgm_viewport_get_events(). 2007-05-21 Loïc Molinari * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmcontext.h: * plugins/opengl/pgmgldefs.h: * plugins/opengl/pgmgldrawable.c: * plugins/opengl/pgmgldrawable.h: * plugins/opengl/pgmglimage.c: * plugins/opengl/pgmglimage.h: * plugins/opengl/pgmglviewport.h: * plugins/opengl/pgmtexture.c: * plugins/opengl/pgmtexture.h: Added RGBA texture support. Added fg_color/opacity/interp handling to PgmGlImage. * configure.ac: * examples/Makefile.am: * examples/pgm/Makefile.am: * examples/pgm/image.c: Added image example. 2007-05-18 Philippe Normand * libs/pypgm/pgm.defs: * libs/pypgm/pgmdrawable.override: * libs/pypgm/pgmtext.override: * tests/pypgm/test_drawable.py: * tests/pypgm/test_rectangle.py: * tests/pypgm/test_text.py: Updated PyPgm with new PgmText API. TODO: constructor and fields. 2007-05-18 Loïc Molinari Patch by: Mirco Müller * AUTHORS: Reorganized. * configure.ac: Added Pango deps for the OpenGL plugin. * docs/pgm/pigment-sections.txt: * pgm/pgmdrawable.h: * pgm/pgmtext.c: * pgm/pgmtext.h: Added the new text API. * plugins/opengl/pgmgltext.c: * plugins/opengl/pgmgltext.h: * plugins/opengl/pgmglviewport.c: * plugins/opengl/pgmglviewport.h: Adapted plugin for the new text API. 2007-05-18 Loïc Molinari * configure.ac: Included GdkPixbuf in PyPgm CFLAGS to fix build. * plugins/opengl/pgmcontext.c: Freed tasks after pop. 2007-05-17 Loïc Molinari * libs/pypgm/pgm.defs: Added PgmDrawableProperty enumeration. * libs/pypgm/pgmimage.override: Removed bad code from the old binding. * pgm/pgmimage.c: * pgm/pgmimage.h: Don't use gpointer but GdkPixbuf to store a pixbuf. * pgm/pgmdrawable.h: * plugins/opengl/Makefile.am: * plugins/opengl/pgmtexture.h: * plugins/opengl/pgmtexture.c: * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmcontext.h: * plugins/opengl/pgmgldrawable.c: * plugins/opengl/pgmgldrawable.h: * plugins/opengl/pgmglimage.c: * plugins/opengl/pgmglimage.h: * plugins/opengl/pgmgltext.c: * plugins/opengl/pgmglviewport.c: * plugins/opengl/pgmglviewport.h: Added texture handling utilities. Use a generic queue of task in context to handle every tasks. Added the visibility property in the "changed" handlers. 2007-05-15 Loïc Molinari * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmcontext.h: * plugins/opengl/pgmgldefs.h: * plugins/opengl/pgmgldrawable.c: * plugins/opengl/pgmglxbackend.c: Added use of vertex arrays to render drawable background. Removed return in void functions. * docs/pgm/pigment-sections.txt: * pgm/pgmcanvas.h: * pgm/pgmdrawable.c: * pgm/pgmdrawable.h: * pgm/pgmimage.c: * pgm/pgmrectangle.c: * pgm/pgmtext.c: Adapted to correctly emit inherited signals from specialized objects. * pgm/Makefile.am: Fixed badly expanded variable. 2007-05-14 Loïc Molinari * docs/pgm/Makefile.am: * docs/pgm/pigment-docs.sgml: * docs/pgm/pigment-sections.txt: * docs/pgm/pigment.hierarchy: Added signals and properties introspection. Removed the hierarchy, not needed anymore. * AUTHORS: Added the different contributors. * examples/Makefile.am: * examples/pgm/Makefile.am: * examples/pgm/dragging.c: * examples/pgm/image.c: * examples/pgm/label.c: * examples/pgm/stream.c: * examples/pgm/test.c: * examples/pgm/version.c: * examples/pgmtk/Makefile.am: * examples/pgmtk/dragging.py: * examples/pgmtk/forms.py: * examples/pgmtk/image.py: * examples/pgmtk/label.py: * examples/pgmtk/layout.py: * examples/pgmtk/move_test.py: * examples/pgmtk/par.py: * examples/pgmtk/resize_test.py: * examples/pgmtk/sizemode.py: * examples/pgmtk/stream.py: * examples/pgmtk/stream_with_twisted.py: * examples/pgmtk/timing.py: * examples/pgmtk/tz_test.py: * examples/pgmtk/visible_size_stream.py: * examples/pgmtk/visualization.py: * examples/pgmtk/window_size.py: * examples/pgmtk/zoomed_stream.py: * examples/pypgm/Makefile.am: * examples/pypgm/image.py: * examples/pypgm/stream.py: * examples/pypgm/test.py: * Makefile.am: * configure.ac: Removed old examples. * libs/pypgm/pgmdrawable.override: Removed useless error check. * pgm/Makefile.am: Changed marshalling namespace. * pgm/pgmmarshal.list: Updated marshallers to match pigment signals. * pgm/pgmcanvas.c: * pgm/pgmcanvas.h: * pgm/pgmdrawable.c: * pgm/pgmdrawable.h: * pgm/pgmimage.c: * pgm/pgmrectangle.c: * pgm/pgmtext.c: * pgm/pgmviewport.c: * pgm/pgmviewport.h: Added signals. * pkgconfig/pigment.pc.in: Removed trailing whitespace. * plugins/Makefile.am: * plugins/opengl/pgmaglbackend.c: * plugins/opengl/pgmaglbackend.h: * plugins/opengl/pgmbackend.c: * plugins/opengl/pgmbackend.h: * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmcontext.h: * plugins/opengl/pgmgl.c: * plugins/opengl/pgmgldrawable.c: * plugins/opengl/pgmgldrawable.h: * plugins/opengl/pgmglimage.c: * plugins/opengl/pgmglimage.h: * plugins/opengl/pgmgltext.c: * plugins/opengl/pgmgltext.h: * plugins/opengl/pgmglviewport.c: * plugins/opengl/pgmglviewport.h: * plugins/opengl/pgmglxbackend.c: * plugins/opengl/pgmglxbackend.h: * plugins/opengl/pgmwglbackend.c: * plugins/opengl/pgmwglbackend.h: Added signal routing, drawable drawing, update system, context loading, GLX support. 2007-05-08 Loïc Molinari * docs/pypgm/src/pypgm-pgmdrawable.sgml: * libs/pypgm/pgm.defs: * libs/pypgm/pgmdrawable.override: Added visible property to PyPGM drawable class. 2007-05-08 Loïc Molinari * Makefile.am: * configure.ac: * docs/Makefile.am: * libs/Makefile.am: Removed Cairo dependency from the OpenGL plugin. Disabled high level Python part. Needs update. Disabled examples compilation. Need update. Disabled pypgm doc build. 2007-05-07 Loïc Molinari * plugins/opengl/Makefile.am: * plugins/opengl/pgmaglbackend.c: * plugins/opengl/pgmbackend.c: * plugins/opengl/pgmbackend.h: * plugins/opengl/pgmcontext.c: * plugins/opengl/pgmcontext.h: * plugins/opengl/pgmgldrawable.c: * plugins/opengl/pgmgldrawable.h: * plugins/opengl/pgmglimage.c: * plugins/opengl/pgmglimage.h: * plugins/opengl/pgmgltext.c: * plugins/opengl/pgmgltext.h: * plugins/opengl/pgmglviewport.c: * plugins/opengl/pgmglviewport.h: * plugins/opengl/pgmglxbackend.c: * plugins/opengl/pgmwglbackend.c: Added the GlDrawable class. Set up the base architecture. Made it compile. * docs/pypgm/src/pypgm-reference.sgml: Updated the section titles. 2007-05-07 Loïc Molinari * docs/pypgm/src/pypgm-pgmcanvas.sgml: * docs/pypgm/src/pypgm-pgmdrawable.sgml: * docs/pypgm/src/pypgm-pgmimage.sgml: * docs/pypgm/src/pypgm-pgmtext.sgml: * docs/pypgm/src/pypgm-pgmviewport.sgml: * docs/pypgm/src/pypgm-reference.sgml: Added properties in the Python binding doc. Changed the bookinfo. * plugins/opengl/pgmglcontext.c: * plugins/opengl/pgmglcontext.h: Moved pgmglcontext to pgmcontext. * plugins/opengl/pgmgldrawable.c: * plugins/opengl/pgmgldrawable.h: Added GL drawable base class. 2007-05-07 Loïc Molinari * docs/pypgm/Makefile: * libs/pypgm/pgm.defs: * libs/pypgm/pgm.override: * libs/pypgm/pgmcanvas.override: * libs/pypgm/pgmdrawable.override: * libs/pypgm/pgmevent.override: * libs/pypgm/pgmimage.override: * libs/pypgm/pgmmodule.c: * libs/pypgm/pgmtext.override: * libs/pypgm/pgmviewport.override: * libs/pypgm/pgmviewportfactory.override: Added properties in the Python binding. * docs/planning/pigment-rewrite.planner: Updated planning. * pgm/pgm.c: Changed version string. * pgm/pgmcanvas.h: Added indexing variables. * pgm/pgmdrawable.c: Fixed wrong variable access. * pgm/pgmimage.c: Fixed 0 p-a-r denominator. * pgm/pgmtext.c: Changed default string to "" instead of NULL. * pgm/pgmviewport.c: * pgm/pgmcanvas.c: * pgm/pgmevents.h: * pgm/pgmviewportfactory.c: Updated doc. * plugins/opengl/README: * plugins/opengl/pgmaglbackend.c: * plugins/opengl/pgmaglbackend.h: * plugins/opengl/pgmbackend.c: * plugins/opengl/pgmbackend.h: * plugins/opengl/pgmgl.c: * plugins/opengl/pgmglcontext.c: * plugins/opengl/pgmglcontext.h: * plugins/opengl/pgmgldefs.h: * plugins/opengl/pgmglimage.c: * plugins/opengl/pgmglimage.h: * plugins/opengl/pgmgltext.c: * plugins/opengl/pgmgltext.h: * plugins/opengl/pgmglviewport.c: * plugins/opengl/pgmglviewport.h: * plugins/opengl/pgmglxbackend.c: * plugins/opengl/pgmglxbackend.h: * plugins/opengl/pgmraglbackend.c: * plugins/opengl/pgmraglbackend.h: * plugins/opengl/pgmrbackend.c: * plugins/opengl/pgmrbackend.h: * plugins/opengl/pgmrgl.c: * plugins/opengl/pgmrgl.h: * plugins/opengl/pgmrgldefs.h: * plugins/opengl/pgmrglimage.c: * plugins/opengl/pgmrglimage.h: * plugins/opengl/pgmrgltext.c: * plugins/opengl/pgmrgltext.h: * plugins/opengl/pgmrglviewport.c: * plugins/opengl/pgmrglviewport.h: * plugins/opengl/pgmrglxbackend.c: * plugins/opengl/pgmrglxbackend.h: * plugins/opengl/pgmrwglbackend.c: * plugins/opengl/pgmrwglbackend.h: * plugins/opengl/pgmwglbackend.c: * plugins/opengl/pgmwglbackend.h: Updated plugin structure. 2007-05-03 Philippe Normand * docs/Makefile.am: * docs/pypgm/Makefile: * docs/pypgm/src/pypgm-hierarchy.sgml: * docs/pypgm/src/pypgm-pgmcanvas.sgml: * docs/pypgm/src/pypgm-pgmdrawable.sgml: * docs/pypgm/src/pypgm-pgmellipse.sgml: * docs/pypgm/src/pypgm-pgmevent.sgml: * docs/pypgm/src/pypgm-pgmimage.sgml: * docs/pypgm/src/pypgm-pgmrectangle.sgml: * docs/pypgm/src/pypgm-pgmtext.sgml: * docs/pypgm/src/pypgm-pgmviewport.sgml: * docs/pypgm/src/pypgm-pgmviewportfactory.sgml: * docs/pypgm/src/pypgm-reference.sgml: * docs/pypgm/var/pypgm.css: * docs/pypgm/xsl/common.xsl: * docs/pypgm/xsl/devhelp.xsl: * docs/pypgm/xsl/html.xsl: * docs/pypgm/xsl/pdf-style.xsl: * docs/pypgm/xsl/pdf.xsl: * docs/pypgm/xsl/ref-html-style.xsl: * docs/pypgm/xsl/tut-html-style.xsl: Initial PyPGM ref doc, needs to be updated with the binding API 2007-05-02 Philippe Normand * libs/pypgm/pgm.defs: * libs/pypgm/pgmimage.override: * tests/pypgm/run.py: * tests/pypgm/test_image.py: Improvements and unittests on Image wrapper, one issue remain with image.alloc_gst_buffer() but i guess this is because it's not implemented in pgm. 2007-04-30 Philippe Normand * libs/pypgm/pgm.defs: * libs/pypgm/pgmimage.override: Wrapped PgmImage, tests remain to be done 2007-04-30 Philippe Normand * libs/pypgm/Makefile.am: * libs/pypgm/pgm.override: * libs/pypgm/pgmcanvas.override: * libs/pypgm/pgmdrawable.override: * libs/pypgm/pgmevent.override: * tests/pypgm/run.py: * tests/pypgm/test_canvas.py: * tests/pypgm/test_drawable.py: * tests/pypgm/test_event.py: * tests/pypgm/test_viewport.py: * tests/pypgm/test_viewport_factory.py: Wrapped & tested Events. Canvas tests are complete (excepted upcoming push_events() tests) * pgm/pgmcanvas.c: * pgm/pgmcanvas.h: fixed layer argument spec in pgm_canvas_get_layer_count * pgm/pgmevents.h: renammed 2BUTTON_PRESS and 3BUTTON_PRESS to DOUBLE_BUTTON_PRESS and TRIPLE_BUTTON_PRESS 2007-04-27 Philippe Normand * libs/pypgm/pgm.defs: * libs/pypgm/pgm.override: * libs/pypgm/pgmcanvas.override: * libs/pypgm/pgmtext.override: * libs/pypgm/pgmviewportfactory.override: * tests/pypgm/pgm_test_case.py: * tests/pypgm/run.py: * tests/pypgm/test_canvas.py: * tests/pypgm/test_drawable.py: * tests/pypgm/test_pgm.py: * tests/pypgm/test_rectangle.py: * tests/pypgm/test_text.py: * tests/pypgm/test_viewport.py: * tests/pypgm/test_viewport_factory.py: More unittests Better refcount management. TODO: Image wrap & test, Events wrap & test, finish Canvas tests 2007-04-26 Philippe Normand * libs/pypgm/Makefile.am: * libs/pypgm/pgm.defs: * libs/pypgm/pgm.override: * libs/pypgm/pgmcanvas.override: * libs/pypgm/pgmdrawable.override: * libs/pypgm/pgmimage.override: * libs/pypgm/pgmtext.override: * libs/pypgm/pgmviewport.override: * libs/pypgm/pgmviewportfactory.override: Splitted pgm.override by class Wrapped all methods of Drawable and finished Viewport * tests/pypgm/run.py: * tests/pypgm/test_canvas.py: * tests/pypgm/test_drawable.py: * tests/pypgm/test_text.py: * tests/pypgm/test_viewport.py: More unittests. 4 failures so far, some segfaults detected! 2007-04-26 Philippe Normand * libs/pypgm/pgm.defs: * libs/pypgm/pgm.override: * libs/pypgm/pgmmodule.c: * pgm/pgmviewport.c: Wrapped PgmViewportFactory, handle init/deint automagically like in pygst * tests/pypgm/pgm_test_case.py: * tests/pypgm/run.py: * tests/pypgm/test_pgm.py: * tests/pypgm/test_viewport.py: * tests/pypgm/test_viewport_factory.py: Added some new tests 2007-04-25 Philippe Normand * libs/pypgm/pgm.defs: * libs/pypgm/pgm.override: Started overriding methods and completed .defs 2007-04-25 Philippe Normand * libs/pypgm/Makefile.am: * libs/pypgm/pgm.defs: * libs/pypgm/pgm.override: Fixed missing symbols of the binding. Now imports \o/ 2007-04-25 Loïc Molinari * pgm/Makefile.am: Included pgmenumtypes.* in compilation. 2007-04-25 Philippe Normand * libs/pypgm/pgm.defs: * libs/pypgm/pgm.override: Fixed compilation errors of the binding 2007-04-24 Philippe Normand * libs/pypgm/Makefile.am: * libs/pypgm/pgm.defs: * libs/pypgm/pgm.override: * libs/pypgm/pgmmodule.c: * libs/pypgm/pgmrendermodule.c: Started fixing compilation errors 2007-04-24 Philippe Normand * libs/pypgm/pgm.defs: * libs/pypgm/pgmrender.defs: * libs/pypgm/pgmrender.override: * tests/pypgm/test_pgm.py: Renamed pgm_render* to pgm* 2007-04-24 Philippe Normand * tests/pypgm/pgm_test_case.py: * tests/pypgm/run.py: * tests/pypgm/test_pgm.py: Preliminary unit-tests for pypgm extension module 2007-04-20 Loïc Molinari * configure.ac: Added GdkPixbuf as a Pigment dependency. * docs/pgm/Makefile.am: * docs/pgm/pigment-docs.sgml: * docs/pgm/pigment-sections.txt: Updated docs. * pgm/Makefile.am: * pgm/pgm.c: * pgm/pgm.h: * pgm/pgmcanvas.c: * pgm/pgmcanvas.h: * pgm/pgmcommon.h: * pgm/pgmdrawable.c: * pgm/pgmdrawable.h: * pgm/pgmellipse.c: * pgm/pgmevents.c: * pgm/pgmevents.h: * pgm/pgmimage.c: * pgm/pgmimage.h: * pgm/pgmplugin.h: * pgm/pgmrectangle.c: * pgm/pgmrectangle.h: * pgm/pgmsink.c: * pgm/pgmtext.c: * pgm/pgmversion.h.in: * pgm/pgmviewport.c: * pgm/pgmviewport.h: * pgm/pgmviewportfactory.c: * pgm/pgmviewportfactory.h: * plugins/Makefile.am: * plugins/boilerplate/Makefile.am: * plugins/boilerplate/pgmbp.c: * plugins/boilerplate/pgmbp.h: * plugins/boilerplate/pgmbpviewport.c: * plugins/boilerplate/pgmbpviewport.h: Made it compile. Handled list of paths for PGM_PLUGIN_PATH. * tests/check/Makefile.am: * tests/check/pgm/pgm.c: * tests/check/pgm/pgmdrawable.c: * tests/check/pgm/pgmimage.c: * tests/check/pgm/pgmrectangle.c: * tests/check/pgm/pgmtext.c: * tests/check/pgm/pgmviewport.c: * tests/check/pgm/pgmviewportfactory.c: Updated unit tests. 2007-04-18 Loïc Molinari * configure.ac: Bumped to 0.1.5.1. * docs/pgm/pigment-sections.txt: * pgm/pgm.c: * pgm/pgmviewport.c: * pgm/pgmviewport.h: Implemented set/get_canvas methods. * pgm/pgmviewportfactory.c: * pgm/pgmviewportfactory.h: Added plugin loading code. 2007-04-16 Loïc Molinari * docs/pgm/running.xml: * docs/planning/pigment-0.1.5.html: * docs/planning/pigment-0.1.5.planner: * docs/planning/pigment-rewrite.html: * docs/planning/pigment-rewrite.planner: * pgm/pgm.c: Updated doc and planning. 2007-04-16 Loïc Molinari * docs/pgm/pigment-sections.txt: * docs/pgm/pigment.hierarchy: * pgm/pgm.c: * pgm/pgm.h: * pgm/pgmdrawable.c: * pgm/pgmdrawable.h: * pgm/pgmviewport.c: * pgm/pgmviewport.h: * pgm/pgmviewportfactory.c: * pgm/pgmviewportfactory.h: Updated doc. * plugins/boilerplate/Makefile.am: * plugins/boilerplate/pgmbp.c: * plugins/boilerplate/pgmbp.h: * plugins/boilerplate/pgmbpviewport.c: * plugins/boilerplate/pgmbpviewport.h: * plugins/boilerplate/pgmrbp.c: * plugins/boilerplate/pgmrbp.h: * plugins/boilerplate/pgmrbpimage.c: * plugins/boilerplate/pgmrbpimage.h: * plugins/boilerplate/pgmrbptext.c: * plugins/boilerplate/pgmrbptext.h: * plugins/boilerplate/pgmrbpviewport.c: * plugins/boilerplate/pgmrbpviewport.h: Updated boilerplate plugin. * tests/check/Makefile.am: * tests/check/pgm/pgm.c: * tests/check/pgm/pgmcanvas.c: * tests/check/pgm/pgmdrawable.c: * tests/check/pgm/pgmimage.c: * tests/check/pgm/pgmrectangle.c: * tests/check/pgm/pgmtext.c: * tests/check/pgm/pgmviewport.c: * tests/check/pgm/pgmviewportfactory.c: Updated unit tests. 2007-04-12 Loïc Molinari * docs/pgm/pigment-sections.txt: * pgm/pgm.c: * pgm/pgm.h: * pgm/pgmcanvas.c: * pgm/pgmcommon.h: * pgm/pgmdrawable.c: * pgm/pgmdrawable.h: * pgm/pgmellipse.c: * pgm/pgmevents.c: * pgm/pgmimage.c: * pgm/pgmimage.h: * pgm/pgmrectangle.c: * pgm/pgmsink.c: * pgm/pgmtext.c: * pgm/pgmtext.h: * pgm/pgmversion.h.in: * pgm/pgmviewport.c: * pgm/pgmviewport.h: * pgm/pgmviewportfactory.c: * pgm/pgmviewportfactory.h: Some more doc updates. * plugins/boilerplate/pgmrbp.c: * plugins/boilerplate/pgmrbp.h: * plugins/boilerplate/pgmrbpviewport.h: First adaptation of the boilerplate plugin. 2007-04-12 Loïc Molinari * docs/pgm/pigment-docs.sgml: * pgm/pgm.c: * pgm/pgm.h: * pgm/pgmcanvas.c: * pgm/pgmcanvas.h: * pgm/pgmdrawable.c: * pgm/pgmdrawable.h: * pgm/pgmellipse.c: * pgm/pgmellipse.h: * pgm/pgmevents.c: * pgm/pgmevents.h: * pgm/pgmimage.c: * pgm/pgmimage.h: * pgm/pgmrectangle.c: * pgm/pgmrectangle.h: * pgm/pgmsink.c: * pgm/pgmtext.c: * pgm/pgmtext.h: * pgm/pgmviewport.c: * pgm/pgmviewport.h: Updated long doc descriptions. 2007-04-11 Loïc Molinari * libs/gstreamer/Makefile.am: Removed the libs/gstreamer directory. 2007-04-11 Loïc Molinari * docs/planning/pigment-0.1.5.html: * docs/planning/pigment-0.1.5.planner: Updated planning. * Makefile.am: * configure.ac: * libs/Makefile.am: * libs/gstreamer/pgmsink.c: * libs/gstreamer/pgmsink.h: Moved GStreamer sink to the pgm lib. * docs/pgm/Makefile.am: * docs/pgm/pigment-docs.sgml: * docs/pgm/pigment-sections.txt: * docs/pgm/pigment.hierarchy: * pgm/Makefile.am: * pgm/pgm.c: * pgm/pgm.h: * pgm/pgmcanvas.c: * pgm/pgmcommon.h: * pgm/pgmdrawable.c: * pgm/pgmdrawable.h: * pgm/pgmevents.c: * pgm/pgmevents.h: * pgm/pgmimage.h: * pgm/pgmsink.c: * pgm/pgmsink.h: * pgm/pgmviewport.c: * pgm/pgmviewport.h: * pgm/pgmviewportfactory.c: * pgm/pgmviewportfactory.h: Updated doc. 2007-03-30 Loïc Molinari * pgm/pgmshadow.c: * pgm/pgmshadow.h: * pgm/pgmstroke.c: * pgm/pgmstroke.h: * pgm/pgmpipe3d-iface.c: * pgm/pgmpipe3d-iface.h: * pgm/pgmlineargradient.c: * pgm/pgmlineargradient.h: * pgm/pgmcolorfilter.c: * pgm/pgmcolorfilter.h: * pgm/pgmalphacomposite.c: * pgm/pgmalphacomposite.h: Removed unneeded interface files. * pgm/Makefile.am: * pgm/pgmcommon.h: * pgm/pgm.c: * pgm/pgm.h: * pgm/pgmviewportfactory.c: * pgm/pgmviewportfactory.h: Little review of the doc. Moved module loading code to viewport factory. * pgm/pgmcanvas.c: * pgm/pgmcanvas.h: Not abstract anymore, added *_new methods, removed vmethod calls. Removed *_drawable suffixes. Renamed group to layer. Renamed z_ordered to middle. Removed get_events method. Added *_many methods. * pgm/pgmdrawable.c: * pgm/pgmdrawable.h: Removed draw method. Added and documented stroke and shadow methods. * pgm/pgmrectangle.c: * pgm/pgmrectangle.h: * pgm/pgmellipse.c: * pgm/pgmellipse.h: Added and documented objects. * pgm/pgmimage.c: * pgm/pgmimage.h: Not abstract anymore, added *_new methods, removed vmethod calls. Renamed del_image to clear. Renamed set_gst_video_buffer to alloc_gst_buffer. * pgm/pgmtext.c: * pgm/pgmtext.h: Not abstract anymore, added *_new methods, removed vmethod calls. * pgm/pgmviewport.c: * pgm/pgmviewport.h: Added and documented set/get_canvas to viewport. Added capacity handling. Removed Canvas inheriting. Added get_events, get_pixel_formats method. 2007-03-19 Loïc Molinari * pgm/pgmalphacomposite-iface.c: * pgm/pgmalphacomposite-iface.h: * pgm/pgmcolorfilter-iface.c: * pgm/pgmcolorfilter-iface.h: * pgm/pgmlineargradient-iface.c: * pgm/pgmlineargradient-iface.h: * pgm/pgmshadow-iface.c: * pgm/pgmshadow-iface.h: * pgm/pgmstroke-iface.c: * pgm/pgmstroke-iface.h: Removed -iface in interface filenames. 2007-03-19 Loïc Molinari * docs/pgm/compiling.xml: * docs/pgm/glossary.xml: * docs/pgm/pigment-docs.sgml: * docs/pgm/running.xml: Added compiling and glossary sections. * pgm/pgm.c: * pgm/pgmalphacomposite-iface.c: * pgm/pgmalphacomposite-iface.h: * pgm/pgmcolorfilter-iface.c: * pgm/pgmcolorfilter-iface.h: * pgm/pgmdrawable.c: * pgm/pgmellipse.c: * pgm/pgmellipse.h: * pgm/pgmgradient-iface.c: * pgm/pgmgradient-iface.h: * pgm/pgmlineargradient-iface.c: * pgm/pgmlineargradient-iface.h: * pgm/pgmrectangle.c: * pgm/pgmrectangle.h: * pgm/pgmstroke-iface.c: * pgm/pgmviewportfactory.c: * pgm/pgmviewportfactory.h: Added new files. 2007-03-16 Loïc Molinari * docs/pgm/pigment-docs.sgml: Added new sections. Merged interfaces with core objects. * pgm/pgmdrawable.h: Implemented bitfield enum values using <<. 2007-03-15 Loïc Molinari * docs/pgm/pigment-docs.sgml: Removed base classes section. Alphabetically ordered classes. * docs/pgm/pigment.hierarchy: Added interfaces. * pgm/pgmimage.c: Added a sentence about the pigmentsink using the set_image_from_gst_buffer method. 2007-03-14 Loïc Molinari Moved docs/reference to docs/pgm. Updated doc. * README: Updated for the new hierarchy. 2007-03-14 Loïc Molinari * pgm/pgm.c: * tests/check/pgm/pgm.c: * tests/check/pgm/pgmcanvas.c: * tests/check/pgm/pgmdrawable.c: * tests/check/pgm/pgmimage.c: * tests/check/pgm/pgmrender.c: * tests/check/pgm/pgmrendercanvas.c: * tests/check/pgm/pgmrenderdrawable.c: * tests/check/pgm/pgmrenderimage.c: * tests/check/pgm/pgmrendertext.c: * tests/check/pgm/pgmrenderviewport.c: * tests/check/pgm/pgmtext.c: * tests/check/pgm/pgmviewport.c: Adapted pgm unit tests to the new namespace. 2007-03-14 Loïc Molinari Adapted build system to the new namespace and hierarchy. 2007-03-14 Loïc Molinari Moved libs/pgm/render/render to pgm. Moved libs/pgm/render/gstreamer to libs/gstreamer. Moved libs/pgm/render/pyrender to libs/pypgm. 2007-03-13 Loïc Molinari Moved pgm to libs/pgm/tk. 2007-03-13 Loïc Molinari * configure.ac: * docs/reference/Makefile.am: * docs/reference/pigment-docs.sgml: * docs/reference/pigment-render-docs.sgml: * docs/reference/pigment-render-overrides.txt: * docs/reference/pigment-render-sections.txt: * docs/reference/pigment-sections.txt: * docs/reference/running.xml: * libs/pgm/render/Makefile.am: * libs/pgm/render/gstreamer/Makefile.am: * libs/pgm/render/gstreamer/pgmrendersink.c: * libs/pgm/render/gstreamer/pgmrendersink.h: * libs/pgm/render/gstreamer/pgmsink.c: * libs/pgm/render/gstreamer/pgmsink.h: * libs/pgm/render/render/Makefile.am: * libs/pgm/render/render/pgm.c: * libs/pgm/render/render/pgm.h: * libs/pgm/render/render/pgmcanvas.c: * libs/pgm/render/render/pgmcanvas.h: * libs/pgm/render/render/pgmcommon.h: * libs/pgm/render/render/pgmdrawable.c: * libs/pgm/render/render/pgmdrawable.h: * libs/pgm/render/render/pgmevents.c: * libs/pgm/render/render/pgmevents.h: * libs/pgm/render/render/pgmgradient-iface.c: * libs/pgm/render/render/pgmgradient-iface.h: * libs/pgm/render/render/pgmimage.c: * libs/pgm/render/render/pgmimage.h: * libs/pgm/render/render/pgmpipe3d-iface.c: * libs/pgm/render/render/pgmpipe3d-iface.h: * libs/pgm/render/render/pgmrender.c: * libs/pgm/render/render/pgmrender.h: * libs/pgm/render/render/pgmrendercanvas.c: * libs/pgm/render/render/pgmrendercanvas.h: * libs/pgm/render/render/pgmrendercommon.h: * libs/pgm/render/render/pgmrenderdrawable.c: * libs/pgm/render/render/pgmrenderdrawable.h: * libs/pgm/render/render/pgmrenderevents.c: * libs/pgm/render/render/pgmrenderevents.h: * libs/pgm/render/render/pgmrendergradient-iface.c: * libs/pgm/render/render/pgmrendergradient-iface.h: * libs/pgm/render/render/pgmrenderimage.c: * libs/pgm/render/render/pgmrenderimage.h: * libs/pgm/render/render/pgmrendermarshal.list: * libs/pgm/render/render/pgmrenderpipe3d-iface.c: * libs/pgm/render/render/pgmrenderpipe3d-iface.h: * libs/pgm/render/render/pgmrendershadow-iface.c: * libs/pgm/render/render/pgmrendershadow-iface.h: * libs/pgm/render/render/pgmrendershape-iface.c: * libs/pgm/render/render/pgmrendershape-iface.h: * libs/pgm/render/render/pgmrenderstroke-iface.c: * libs/pgm/render/render/pgmrenderstroke-iface.h: * libs/pgm/render/render/pgmrendertext.c: * libs/pgm/render/render/pgmrendertext.h: * libs/pgm/render/render/pgmrenderversion.h.in: * libs/pgm/render/render/pgmrenderviewport.c: * libs/pgm/render/render/pgmrenderviewport.h: * libs/pgm/render/render/pgmshadow-iface.c: * libs/pgm/render/render/pgmshadow-iface.h: * libs/pgm/render/render/pgmstroke-iface.c: * libs/pgm/render/render/pgmstroke-iface.h: * libs/pgm/render/render/pgmtext.c: * libs/pgm/render/render/pgmtext.h: * libs/pgm/render/render/pgmversion.h.in: * libs/pgm/render/render/pgmviewport.c: * libs/pgm/render/render/pgmviewport.h: * pigment.spec.in: * pkgconfig/Makefile.am: * pkgconfig/pigment-render.pc.in: * pkgconfig/pigment.pc.in: Changed pgm_render namespace to pgm (first bunch). Moved canvas_del_drawable to canvas_remove_drawable. Indicated coordinates origin in the Canvas documentation. Moved Drawable AspectStyle enum name to LayoutType. Adapted enumeration names in the whole library for consistency. Removed Drawable set/get_color symbols adding the set/get_foreground_color and set/get_background_color ones. Added and implemented drawable_is_visible symbol. Added upper case key codes in the key enumeration. Added the TILED layout type. Moved GStreamer video sink plugin name to libgstpigmentsink.so. 2007-03-09 Loïc Molinari * configure.ac: * docs/reference/Makefile.am: * docs/reference/pigment-render-docs.sgml: * docs/reference/pigment-render-sections.txt: * docs/reference/running.xml: * docs/reference/tmpl/pgmrender.sgml: * docs/reference/tmpl/pgmrendercanvas.sgml: * docs/reference/tmpl/pgmrendercommon.sgml: * docs/reference/tmpl/pgmrenderdrawable.sgml: * docs/reference/tmpl/pgmrenderenumtypes.sgml: * docs/reference/tmpl/pgmrendererror.sgml: * docs/reference/tmpl/pgmrenderevents.sgml: * docs/reference/tmpl/pgmrendergradient-iface.sgml: * docs/reference/tmpl/pgmrenderimage.sgml: * docs/reference/tmpl/pgmrendermarshal.sgml: * docs/reference/tmpl/pgmrendershape-iface.sgml: * docs/reference/tmpl/pgmrendersink.sgml: * docs/reference/tmpl/pgmrenderstroke-iface.sgml: * docs/reference/tmpl/pgmrendertext.sgml: * docs/reference/tmpl/pgmrenderviewport.sgml: * docs/reference/tmpl/pigment-render-unused.sgml: * docs/reference/tmpl/stamp-pgmrenderenumtypes.sgml: * docs/reference/version-entities.xml.in: * docs/reference/version.xml.in: * libs/pgm/render/render/pgmrender.c: * libs/pgm/render/render/pgmrender.h: * libs/pgm/render/render/pgmrendercanvas.c: * libs/pgm/render/render/pgmrendercommon.h: * libs/pgm/render/render/pgmrenderdrawable.h: * libs/pgm/render/render/pgmrenderevents.c: * libs/pgm/render/render/pgmrenderviewport.c: Removed opengles void plugin directory. Updated doc. 2007-03-09 Loïc Molinari * libs/pgm/render/render/pgmrender.h: * libs/pgm/render/render/pgmrender.c: * docs/reference/pigment-render-sections.txt: * docs/reference/tmpl/pgmrender.sgml: Added pgm_render_init_check symbol. Binded a default place holder to the factory functions. * tests/check/render/pgmrender.c: Adapted unit test. 2007-03-08 Loïc Molinari * libs/pgm/render/render/pgmrenderimage.c: Unlock before calling del_image in set_image_from_image to avoid a deadlock. * libs/pgm/render/render/pgmrenderviewport.c: * libs/pgm/render/render/pgmrenderviewport.h: Handled get/set size and default width/height values. * plugins/boilerplate/pgmrbpimage.c: * plugins/boilerplate/pgmrbptext.c: * plugins/boilerplate/pgmrbpviewport.c: Replaced all ERROR_X return values by ERROR_OK. * tests/check/Makefile.am: * tests/check/render/pgmrender.c: * tests/check/render/pgmrendercanvas.c: * tests/check/render/pgmrenderdrawable.c: * tests/check/render/pgmrenderimage.c: * tests/check/render/pgmrendertext.c: * tests/check/render/pgmrenderviewport.c: Updated check infrastructure. Fixed compilation and validation. 2007-03-07 Thomas Vander Stichele * configure.ac: * libs/pgm/render/render/Makefile.am: * tests/check/Makefile.am: * tests/check/render/pgmrender.c: (pgm_render_suite): update check infrastructure 2007-03-07 Thomas Vander Stichele * configure.ac: * tests/check/Makefile.am: Update build. 2007-03-07 Loïc Molinari * libs/pgm/render/render/pgmrenderimage.c: Don't do anything in dispose. * tests/check/render/pgmrendercanvas.c: * tests/check/render/pgmrenderdrawable.c: Added return error code check. * tests/check/render/pgmrenderimage.c: Added a test for image slavery. 2007-03-06 Loïc Molinari * AUTHORS: * README: * TODO: Updated files. * libs/pgm/render/render/pgmrenderimage.c: Called del_image on all the slaves in the dispose. * tests/check/render/pgmrenderimage.c: Added another test for del_image ref counts. 2007-03-06 Julien MOUTTE * libs/pgm/render/render/pgmrenderviewport.c: (pgm_render_viewport_init), (pgm_render_viewport_get_color), (pgm_render_viewport_get_screen_size_mm), (pgm_render_viewport_set_screen_size_mm): * libs/pgm/render/render/pgmrenderviewport.h: Introduce a cache for physical screen size. * plugins/directfb/pgmrenderdfbimage.c: (pgmr_dfb_image_blit_image_real), (pgmr_dfb_image_blit_image), (pgmr_dfb_image_draw), (pgmr_dfb_image_hide), (pgmr_dfb_image_show), (pgmr_dfb_image_set_size), (pgmr_dfb_image_set_position), (pgmr_dfb_image_set_alignment), (pgmr_dfb_image_set_aspect_style), (pgmr_dfb_image_set_color), (pgmr_dfb_image_set_opacity), (pgmr_dfb_image_color_conv), (pgmr_dfb_image_clear_image), (pgmr_dfb_image_load_image), (pgmr_dfb_image_set_image_from_buffer), (pgmr_dfb_image_set_image_from_gst_buffer), (pgmr_dfb_image_set_image_from_image): * plugins/directfb/pgmrenderdfbtext.c: (pgmr_dfb_text_draw), (pgmr_dfb_text_hide), (pgmr_dfb_text_show), (pgmr_dfb_text_set_size), (pgmr_dfb_text_set_position), (pgmr_dfb_text_set_alignment), (pgmr_dfb_text_set_aspect_style), (pgmr_dfb_text_set_color), (pgmr_dfb_text_set_opacity), (pgmr_dfb_text_set_label), (pgmr_dfb_text_set_font), (pgmr_dfb_text_get_size), (pgmr_dfb_text_dispose), (pgmr_dfb_text_class_init): Continue porting. 2007-03-06 Loïc Molinari * common/m4/check.m4: Added check.m4 macros. * tests/check/Makefile.am: * tests/check/render/Makefile.am: * tests/check/render/pgmrender.c: * tests/check/render/pgmrendercanvas.c: * tests/check/render/pgmrenderdrawable.c: * tests/check/render/pgmrenderimage.c: * tests/check/render/pgmrendertext.c: * tests/check/render/pgmrenderviewport.c: Added a first bunch of unit tests. Not built with the autotools ATM. * docs/planning/pigment-0.2.0.html: * docs/planning/pigment-0.2.0.planner: * docs/design/internals.txt: Removed out-of-date documents. * docs/design/pgm_render_class_diagram.dia: * docs/design/pgm_render_class_diagram.png: Added PgmRender dia/png class diagrams. * examples/pyrender/test.py: * examples/render/test.c: * libs/pgm/render/render/pgmrender.c: Replaced "Pigment library" occurences to "Pigment Render library". Check if we are already initialized in pgm_render_init. Log deinitialization of the lib. * libs/pgm/render/render/pgmrendercanvas.c: * libs/pgm/render/render/pgmrenderdrawable.c: * libs/pgm/render/render/pgmrenderimage.c: * libs/pgm/render/render/pgmrendertext.c: * libs/pgm/render/render/pgmrenderviewport.c: Init default values. 2007-03-04 Julien MOUTTE * libs/pgm/render/render/pgmrendercanvas.c: * libs/pgm/render/render/pgmrendercanvas.h: * libs/pgm/render/render/pgmrenderdrawable.c: * libs/pgm/render/render/pgmrenderdrawable.h: Remove some useless _new functions. Indeed those are abstract types, they can't be instantiated. 2007-03-04 Julien MOUTTE * libs/pgm/render/gstreamer/pgmrendersink.c: (pgm_render_sink_get_times), (pgm_render_sink_show), (pgm_render_sink_getcaps), (pgm_render_sink_configure_from_caps), (pgm_render_sink_setcaps), (pgm_render_sink_change_state), (pgm_render_sink_set_property), (pgm_render_sink_get_property), (pgm_render_sink_dispose), (pgm_render_sink_base_init), (pgm_render_sink_class_init), (pgm_render_sink_init), (pgm_render_sink_get_type), (plugin_init): Rewrite pgmrendersink. * libs/pgm/render/gstreamer/pgmrendersink.h: * libs/pgm/render/pyrender/pgmrender.override: Fix a compilation warning. * libs/pgm/render/render/Makefile.am: Renamed pgmrendererror.h * libs/pgm/render/render/pgmrendercanvas.h: * libs/pgm/render/render/pgmrenderdrawable.c: (pgm_render_drawable_get_size), (pgm_render_drawable_get_position), (pgm_render_drawable_get_alignment), (pgm_render_drawable_get_aspect_style), (pgm_render_drawable_get_color), (pgm_render_drawable_get_opacity): * libs/pgm/render/render/pgmrenderdrawable.h: Remove subclass useless subclass methods. * libs/pgm/render/render/pgmrendererror.h: renamed to pgmrendercommon.h * libs/pgm/render/render/pgmrendergradient-iface.h: * libs/pgm/render/render/pgmrenderimage.c: (pgm_render_image_init), (pgm_render_image_set_image_from_gst_buffer), (pgm_render_image_set_image_from_image), (pgm_render_image_del_image), (pgm_render_image_get_interp), (pgm_render_image_get_aspect_ratio): Removed some useless subclass methods and implement master/slave image relation in this class. * libs/pgm/render/render/pgmrenderimage.h: * libs/pgm/render/render/pgmrenderpipe3d-iface.h: * libs/pgm/render/render/pgmrendershadow-iface.h: * libs/pgm/render/render/pgmrendershape-iface.h: * libs/pgm/render/render/pgmrenderstroke-iface.h: Renamed header. * libs/pgm/render/render/pgmrendertext.c: (pgm_render_text_get_label), (pgm_render_text_get_font): * libs/pgm/render/render/pgmrendertext.h: Removed useless subclass methods. * libs/pgm/render/render/pgmrenderviewport.c: (pgm_render_viewport_get_cursor), (pgm_render_viewport_set_screen_size_mm): * libs/pgm/render/render/pgmrenderviewport.h: * plugins/boilerplate/pgmrbpimage.c: (pgmr_boilerplate_image_class_init): * plugins/boilerplate/pgmrbptext.c: (pgmr_boilerplate_text_class_init): * plugins/boilerplate/pgmrbpviewport.c: (pgmr_boilerplate_viewport_class_init): Fix boilerplate according to recent changes * plugins/directfb/pgmrenderdfb.h: * plugins/directfb/pgmrenderdfbimage.c: (pgmr_dfb_image_new), (pgmr_dfb_image_clear_image), (pgmr_dfb_image_load_image), (pgmr_dfb_image_set_image_from_buffer), (pgmr_dfb_image_set_image_from_gst_buffer), (pgmr_dfb_image_set_image_from_drawable), (pgmr_dfb_image_del_image), (pgmr_dfb_image_show), (pgmr_dfb_image_hide), (pgmr_dfb_image_dispose), (pgmr_dfb_image_class_init), (pgmr_dfb_image_init): Continue porting. * plugins/directfb/pgmrenderdfbimage.h: * plugins/directfb/pgmrenderdfbviewport.c: (pgmr_dfb_viewport_new), (pgmr_dfb_viewport_set_canvas_size), (pgmr_dfb_viewport_get_events), (pgmr_dfb_viewport_set_color), (pgmr_dfb_viewport_set_cursor), (pgmr_dfb_viewport_set_size), (pgmr_dfb_viewport_set_fullscreen), (pgmr_dfb_viewport_get_fullscreen), (pgmr_dfb_viewport_set_screen_resolution), (pgmr_dfb_viewport_get_screen_resolution), (pgmr_dfb_viewport_set_screen_size_mm), (pgmr_dfb_viewport_get_screen_size_mm), (pgmr_dfb_viewport_dispose), (pgmr_dfb_viewport_class_init): * plugins/directfb/pgmrenderdfbviewport.h: Continue porting. 2007-03-04 Julien MOUTTE * libs/pgm/render/render/pgmrendererror.h: Add some other common defines to that header. Going to rename it to pgmrendercommon.h 2007-03-03 Julien MOUTTE * docs/reference/tmpl/pgmrendercanvas.sgml: * docs/reference/tmpl/pgmrenderdrawable.sgml: * docs/reference/tmpl/pgmrenderimage.sgml: * docs/reference/tmpl/pgmrendertext.sgml: * docs/reference/tmpl/pgmrenderviewport.sgml: * libs/pgm/render/render/pgmrender.c: * libs/pgm/render/render/pgmrender.h: * libs/pgm/render/render/pgmrendercanvas.c: * libs/pgm/render/render/pgmrenderdrawable.c: * libs/pgm/render/render/pgmrenderimage.c: * libs/pgm/render/render/pgmrendertext.c: * libs/pgm/render/render/pgmrenderviewport.c: Improve docs. 2007-03-03 Julien MOUTTE * docs/design/block_diagram.dia: * docs/design/block_diagram.png: Add some diagrams to the docs. 2007-02-28 Loïc Molinari * libs/pgm/render/render/pgmrendercanvas.c: * libs/pgm/render/render/pgmrenderdrawable.h: Correctly set FLAG_VISIBLE which was overwriting FLAG_UNPARENTING. Changed gst_object_unref func in canvas_dispose to gst_object_unparent. Still might need some locking. * libs/pgm/render/render/pgmrenderimage.c: Added parameters the set/get_interp vtable calls. * examples/render/test.c: Updated example. 2007-02-28 Julien MOUTTE * libs/pgm/render/render/pgmrendercanvas.c: * libs/pgm/render/render/pgmrenderimage.c: (pgm_render_image_set_interp), (pgm_render_image_get_interp): * libs/pgm/render/render/pgmrenderviewport.c: (pgm_render_viewport_set_cursor), (pgm_render_viewport_get_cursor), (pgm_render_viewport_set_fullscreen), (pgm_render_viewport_get_fullscreen): * libs/pgm/render/render/pgmrenderviewport.h: * plugins/directfb/pgmrenderdfbviewport.c: (pgmr_dfb_viewport_set_color), (pgmr_dfb_viewport_set_cursor), (pgm_render_viewport_get_size), (pgmr_dfb_viewport_set_fullscreen), (pgmr_dfb_viewport_get_screen_resolution), (pgmr_dfb_viewport_get_screen_size_mm), (pgmr_dfb_viewport_get_events), (pgmr_dfb_viewport_reorder_drawable): * plugins/directfb/pgmrenderdfbviewport.h: Random fixes. 2007-02-28 Loïc Molinari * plugins/opengl/Makefile.am: * plugins/opengl/pgmraglbackend.c: * plugins/opengl/pgmraglbackend.h: * plugins/opengl/pgmrbackend.c: * plugins/opengl/pgmrbackend.h: * plugins/opengl/pgmrgl.c: * plugins/opengl/pgmrgl.h: * plugins/opengl/pgmrgldefs.h: * plugins/opengl/pgmrglimage.c: * plugins/opengl/pgmrglimage.h: * plugins/opengl/pgmrgltext.c: * plugins/opengl/pgmrgltext.h: * plugins/opengl/pgmrglviewport.c: * plugins/opengl/pgmrglviewport.h: * plugins/opengl/pgmrglxbackend.c: * plugins/opengl/pgmrglxbackend.h: * plugins/opengl/pgmrwglbackend.c: * plugins/opengl/pgmrwglbackend.h: Updated OpenGL plugin. * COPYING: Updated for the new years. * libs/pgm/render/render/pgmrendercanvas.h: Removed trailing _BASE_. * plugins/boilerplate/pgmrbptext.c: Changed parent class from Drawable to Text. 2007-02-26 Loïc Molinari * libs/pgm/render/pyrender/pgmrender.defs: * libs/pgm/render/pyrender/pgmrender.override: Completed pgm_render.init with args handling. Overrided get/set methods with guchar* arguments. Added object name to methods with the same name in a same object hierarchy such as set_viewport_size and set_canvas_size. * plugins/boilerplate/pgmrbpimage.h: * plugins/boilerplate/pgmrbptext.c: * plugins/boilerplate/pgmrbpviewport.c: Fixed typos. * plugins/opengl/Makefile.am: * plugins/opengl/pgmrender-glx.c: * plugins/opengl/pgmrender-glx.h: * plugins/opengl/pgmrender-wgl.c: * plugins/opengl/pgmrender-wgl.h: * plugins/opengl/pgmrendergl1.c: * plugins/opengl/pgmrendergl1.h: * plugins/opengl/pgmrendergl1font.c: * plugins/opengl/pgmrendergl1font.h: * plugins/opengl/pgmrendergl1surface.c: * plugins/opengl/pgmrendergl1surface.h: * plugins/opengl/pgmrendergl1window.c: * plugins/opengl/pgmrendergl1window.h: * plugins/opengl/pgmrgl.c: * plugins/opengl/pgmrgl.h: * plugins/opengl/pgmrglimage.c: * plugins/opengl/pgmrglimage.h: * plugins/opengl/pgmrgltext.c: * plugins/opengl/pgmrgltext.h: * plugins/opengl/pgmrglviewport.c: * plugins/opengl/pgmrglviewport.h: Moved old code to old directory. Started the new OpenGL 1.2 renderer plugin. * examples/render/test.c: Testings 2007-02-26 Loïc Molinari * docs/reference/pigment-render-sections.txt: Removed INV_255. * libs/pgm/render/render/pgmrendercanvas.c: Updated argument alignment. * plugins/boilerplate/pgmrbpviewport.c: Fixed bad virtual table method initialisations. 2007-02-26 Loïc Molinari * configure.ac: * examples/render/Makefile.am: * examples/render/test.c: Added test example. * libs/pgm/render/pyrender/pgmrender.defs: * libs/pgm/render/pyrender/pgmrender.override: Completed pyrender methods/functions coverage. * libs/pgm/render/render/pgmrendercanvas.c: Fixed missing argument in doc's example. * plugins/Makefile.am: * plugins/boilerplate/Makefile.am: * plugins/boilerplate/pgmrbp.c: * plugins/boilerplate/pgmrbp.h: * plugins/boilerplate/pgmrbpimage.c: * plugins/boilerplate/pgmrbpimage.h: * plugins/boilerplate/pgmrbptext.c: * plugins/boilerplate/pgmrbptext.h: * plugins/boilerplate/pgmrbpviewport.c: * plugins/boilerplate/pgmrbpviewport.h: Added boilerplate plugin. 2007-02-23 Loïc Molinari * libs/pgm/render/pyrender/pgmrender.defs: * libs/pgm/render/pyrender/pgmrender.override: * libs/pgm/render/render/pgmrendercanvas.c: * libs/pgm/render/render/pgmrendercanvas.h: * libs/pgm/render/render/pgmrenderdrawable.c: * libs/pgm/render/render/pgmrenderdrawable.h: * libs/pgm/render/render/pgmrenderevents.h: Increase Python binding coverage. Added *_new funcs in Canvas and Drawable for the binding. 2007-02-23 Julien MOUTTE * docs/reference/pigment-render-docs.sgml: Add events to the doc. 2007-02-23 Julien MOUTTE * docs/reference/tmpl/pgmrendererror.sgml: * libs/pgm/render/render/pgmrendererror.h: Fix some doc mistake. 2007-02-23 Julien MOUTTE * docs/reference/pigment-render-sections.txt: * docs/reference/tmpl/pgmrender.sgml: * docs/reference/tmpl/pgmrenderimage.sgml: * docs/reference/tmpl/pigment-render-unused.sgml: * libs/pgm/render/render/pgmrender.h: * libs/pgm/render/render/pgmrendererror.h: * libs/pgm/render/render/pgmrenderevents.h: * libs/pgm/render/render/pgmrenderimage.c: (pgm_render_image_get_pixel_formats), (pgm_render_image_get_gst_video_buffer): * libs/pgm/render/render/pgmrenderimage.h: * libs/pgm/render/render/pgmrenderviewport.h: Increase doc coverage. Modify some API. 2007-02-23 Julien MOUTTE * docs/reference/pigment-render-sections.txt: * docs/reference/tmpl/pgmrenderdrawable.sgml: * docs/reference/tmpl/pgmrenderimage.sgml: * libs/pgm/render/render/pgmrendercanvas.c: * libs/pgm/render/render/pgmrendercanvas.h: * libs/pgm/render/render/pgmrenderdrawable.c: (pgm_render_drawable_init), (pgm_render_drawable_hide), (pgm_render_drawable_show): * libs/pgm/render/render/pgmrenderdrawable.h: * libs/pgm/render/render/pgmrenderimage.c: (pgm_render_image_get_video_buffer): * libs/pgm/render/render/pgmrenderimage.h: * libs/pgm/render/render/pgmrendertext.c: * libs/pgm/render/render/pgmrendertext.h: * libs/pgm/render/render/pgmrenderviewport.h: Lot of new documentation. 2007-02-22 Julien MOUTTE * docs/reference/pigment-render-docs.sgml: * docs/reference/pigment-render-sections.txt: * docs/reference/pigment-render.hierarchy: * docs/reference/tmpl/pgmrender.sgml: * docs/reference/tmpl/pgmrendercanvas.sgml: * docs/reference/tmpl/pgmrenderdrawable.sgml: * docs/reference/tmpl/pgmrenderenumtypes.sgml: * docs/reference/tmpl/pgmrenderimage.sgml: * docs/reference/tmpl/pgmrendermarshal.sgml: * docs/reference/tmpl/pgmrendershadow-iface.sgml: * docs/reference/tmpl/pgmrendertext.sgml: * docs/reference/tmpl/pgmrenderviewport.sgml: * docs/reference/tmpl/pigment-render-unused.sgml: * libs/pgm/render/render/pgmrendercanvas.c: * libs/pgm/render/render/pgmrenderimage.c: * libs/pgm/render/render/pgmrenderviewport.h: More fixes to the docs. 2007-02-22 Julien MOUTTE * docs/reference/tmpl/pgmrenderbasewindow.sgml: * docs/reference/tmpl/pgmrendercanvas.sgml: * docs/reference/tmpl/pgmrenderdrawable.sgml: * docs/reference/tmpl/pgmrenderenumtypes.sgml: * docs/reference/tmpl/pgmrendererror.sgml: * docs/reference/tmpl/pgmrenderimage.sgml: * docs/reference/tmpl/pgmrenderlayout-iface.sgml: * docs/reference/tmpl/pgmrendermedia-iface.sgml: * docs/reference/tmpl/pgmrendertext-iface.sgml: * docs/reference/tmpl/pgmrendertext.sgml: * docs/reference/tmpl/pgmrenderviewport.sgml: * docs/reference/tmpl/pigment-render-unused.sgml: Cleanup. * libs/pgm/render/render/pgmrendercanvas.c: * libs/pgm/render/render/pgmrenderviewport.c: More docs. 2007-02-22 Loïc Molinari * docs/Makefile.am: * docs/reference/Makefile.am: * docs/reference/pigment-render-docs.sgml: * docs/reference/pigment-render-sections.txt: Adapted the doc to the new API. Made render gtk-doc build conditional (enable-gtk-doc). * libs/pgm/render/pyrender/pgmrender.defs: * libs/pgm/render/pyrender/pgmrender.override: * libs/pgm/render/pyrender/pgmrendermodule.c: Started PyRender refactoring. * libs/pgm/render/render/Makefile.am: Removed unneeded interface from build. * libs/pgm/render/render/pgmrender.c: Replaced gst_version to pgm_render_version... * libs/pgm/render/render/pgmrenderimage.c: * libs/pgm/render/render/pgmrenderimage.h: * examples/render/image.c: Replaced set_image to set_image_from_buffer. * examples/render/Makefile.am: Removed stream example from build. * libs/pgm/render/render/pgmrenderpipe3d-iface.c: * libs/pgm/render/render/pgmrenderpipe3d-iface.h: * libs/pgm/render/render/pgmrendershadow-iface.c: * libs/pgm/render/render/pgmrendershadow-iface.h: Documented and adpated to the new coding style. * libs/pgm/render/render/pgmrenderdrawable.h: * libs/pgm/render/render/pgmrendertext.h: * libs/pgm/render/render/pgmrenderviewport.c: Removed *_new. gtk-doc fixes. 2007-02-22 Julien MOUTTE * libs/pgm/render/render/pgmrendercanvas.c: * libs/pgm/render/render/pgmrenderdrawable.c: More docs. 2007-02-22 Julien MOUTTE * examples/render/dragging.c: (main): * examples/render/image.c: (main): * examples/render/label.c: (main): Continue porting examples. * libs/pgm/render/render/pgmrender.c: (find_plugin), (pgm_render_init), (pgm_render_deinit): * libs/pgm/render/render/pgmrender.h: * libs/pgm/render/render/pgmrendercanvas.c: (pgm_render_canvas_set_size), (pgm_render_canvas_add_drawable), (pgm_render_canvas_del_drawable): * libs/pgm/render/render/pgmrendercanvas.h: * libs/pgm/render/render/pgmrenderdrawable.c: * libs/pgm/render/render/pgmrenderdrawable.h: * libs/pgm/render/render/pgmrenderimage.c: * libs/pgm/render/render/pgmrendertext.c: * libs/pgm/render/render/pgmrenderviewport.c: (pgm_render_viewport_set_color), (pgm_render_viewport_get_color): * libs/pgm/render/render/pgmrenderviewport.h: * plugins/directfb/pgmrenderdfb.c: (pgmr_dfb_event_thread), (pgmr_dfb_init): * plugins/directfb/pgmrenderdfbimage.h: * plugins/directfb/pgmrenderdfbtext.h: Flush some more refactoring. 2007-02-22 Julien MOUTTE * examples/render/dragging.c: (is_over_surface), (handle_event), (rotate), (main): * examples/render/image.c: (handle_event), (rotate), (main): * examples/render/label.c: (handle_event), (main): Port some examples * libs/pgm/render/render/pgmrender.c: (pgm_render_init): * libs/pgm/render/render/pgmrender.h: * libs/pgm/render/render/pgmrendercanvas.c: (pgm_render_canvas_class_init): * libs/pgm/render/render/pgmrendercanvas.h: * libs/pgm/render/render/pgmrenderdrawable.c: (pgm_render_drawable_class_init), (pgm_render_drawable_draw), (pgm_render_drawable_hide), (pgm_render_drawable_show), (pgm_render_drawable_set_size), (pgm_render_drawable_get_size), (pgm_render_drawable_set_position), (pgm_render_drawable_get_position), (pgm_render_drawable_set_alignment), (pgm_render_drawable_get_alignment), (pgm_render_drawable_set_aspect_style), (pgm_render_drawable_get_aspect_style), (pgm_render_drawable_set_color), (pgm_render_drawable_get_color), (pgm_render_drawable_set_opacity), (pgm_render_drawable_get_opacity): * libs/pgm/render/render/pgmrenderdrawable.h: * libs/pgm/render/render/pgmrenderimage.c: (pgm_render_image_class_init), (pgm_render_image_set_image), (pgm_render_image_set_image_from_gst_buffer), (pgm_render_image_set_image_from_fd), (pgm_render_image_set_image_from_image), (pgm_render_image_del_image), (pgm_render_image_set_interp), (pgm_render_image_get_interp), (pgm_render_image_get_pixelformats), (pgm_render_image_set_aspect_ratio), (pgm_render_image_get_aspect_ratio): * libs/pgm/render/render/pgmrenderimage.h: * libs/pgm/render/render/pgmrendertext.c: (pgm_render_text_class_init), (pgm_render_text_set_label), (pgm_render_text_get_label), (pgm_render_text_set_font), (pgm_render_text_get_font), (pgm_render_text_get_size): * libs/pgm/render/render/pgmrendertext.h: * libs/pgm/render/render/pgmrenderversion.h.in: * libs/pgm/render/render/pgmrenderviewport.c: (pgm_render_viewport_class_init), (pgm_render_viewport_set_size): * libs/pgm/render/render/pgmrenderviewport.h: Continue refactoring. 2007-02-22 Julien MOUTTE * libs/pgm/render/render/Makefile.am: * libs/pgm/render/render/pgmrender.c: (find_plugin), (pgm_render_init), (pgm_render_deinit): * libs/pgm/render/render/pgmrender.h: * libs/pgm/render/render/pgmrendercanvas.c: (pgm_render_canvas_init), (pgm_render_canvas_set_size), (pgm_render_canvas_get_size): * libs/pgm/render/render/pgmrendercanvas.h: Take away viewport methods in the viewport object. * libs/pgm/render/render/pgmrenderviewport.c: (pgm_render_viewport_dispose), (pgm_render_viewport_class_init), (pgm_render_viewport_init), (pgm_render_viewport_new), (pgm_render_viewport_update), (pgm_render_viewport_set_title), (pgm_render_viewport_set_cursor), (pgm_render_viewport_get_cursor), (pgm_render_viewport_set_viewport_size), (pgm_render_viewport_get_size), (pgm_render_viewport_set_fullscreen), (pgm_render_viewport_get_fullscreen), (pgm_render_viewport_get_screen_resolution), (pgm_render_viewport_set_screen_resolution), (pgm_render_viewport_get_screen_size_mm): * libs/pgm/render/render/pgmrenderviewport.h: Add a viewport object taking away viewport methods from canvas. * plugins/directfb/pgmrenderdfbviewport.c: * plugins/directfb/pgmrenderdfbviewport.h: Inherit from Viewport 2007-02-22 Loïc Molinari * pgm/form/shape.py: * pgm/form/stream.py.in: Removed stream.py to allow GStreamer being fully used and centralized in the application. * configure.ac: Show the nano version in the configuration summary. * libs/pgm/render/render/pgmrenderevents.h: Changed (x,y) mouse position from gdouble to gfloat. 2007-02-21 Julien MOUTTE * libs/pgm/render/render/pgmrender.c: * libs/pgm/render/render/pgmrender.h: * libs/pgm/render/render/pgmrendercanvas.c: (pgm_render_canvas_del_drawable): * libs/pgm/render/render/pgmrenderdrawable.c: (pgm_render_drawable_dispose): * libs/pgm/render/render/pgmrenderimage.c: (pgm_render_image_dispose): * libs/pgm/render/render/pgmrendertext.c: (pgm_render_text_dispose): More compilation fixes. 2007-02-21 Loïc Molinari * autogen.sh: Enabled gtk-doc build by default. * configure.ac: Check the OpenGL plugin dependencies to automatically enable or disable its compilation. Adapted the configuration summary. * plugins/Makefile.am: Made the OpenGL plugin compilation conditional. * libs/pgm/render/render/pgmrender.c: * libs/pgm/render/render/pgmrender.h: * libs/pgm/render/render/pgmrenderversion.h.in: Added the pgm_render_version and pgm_render_version_string symbols. * examples/render/version.c: * examples/render/Makefile.am: Added example to test Render version retrieving. 2007-02-21 Julien MOUTTE * libs/pgm/render/render/Makefile.am: * libs/pgm/render/render/pgmrender.c: (find_plugin), (pgm_render_init): * libs/pgm/render/render/pgmrender.h: * libs/pgm/render/render/pgmrendercanvas.c: (pgm_render_canvas_dispose), (pgm_render_canvas_update_viewport), (pgm_render_canvas_set_viewport_cursor), (pgm_render_canvas_get_viewport_cursor), (pgm_render_canvas_set_viewport_size), (pgm_render_canvas_get_viewport_size), (pgm_render_canvas_set_viewport_fullscreen), (pgm_render_canvas_get_viewport_fullscreen), (pgm_render_canvas_add_drawable), (pgm_render_canvas_del_drawable): * libs/pgm/render/render/pgmrendercanvas.h: * libs/pgm/render/render/pgmrenderdrawable.c: (pgm_render_drawable_dispose), (pgm_render_drawable_init): * libs/pgm/render/render/pgmrenderimage.c: (pgm_render_image_dispose), (pgm_render_image_class_init), (pgm_render_image_init), (pgm_render_image_new): * libs/pgm/render/render/pgmrenderimage.h: * libs/pgm/render/render/pgmrendertext.c: (pgm_render_text_dispose), (pgm_render_text_class_init), (pgm_render_text_init), (pgm_render_text_new): * libs/pgm/render/render/pgmrendertext.h: Make it build and introduce image and text objects. 2007-02-21 Julien MOUTTE * libs/pgm/render/render/pgmrender.h: * libs/pgm/render/render/pgmrendercanvas.c: * libs/pgm/render/render/pgmrendercanvas.h: * libs/pgm/render/render/pgmrenderdrawable.h: * libs/pgm/render/render/pgmrenderimage.h: * libs/pgm/render/render/pgmrenderlayout-iface.c: * libs/pgm/render/render/pgmrenderlayout-iface.h: * libs/pgm/render/render/pgmrendermedia-iface.c: * libs/pgm/render/render/pgmrendermedia-iface.h: * libs/pgm/render/render/pgmrendertext-iface.c: * libs/pgm/render/render/pgmrendertext-iface.h: * libs/pgm/render/render/pgmrendertext.h: Flush some more refactoring. 2007-02-21 Julien MOUTTE * plugins/directfb/Makefile.am: * plugins/directfb/pgmrenderdfb.c: (pgmr_dfb_center_rect), * plugins/directfb/pgmrenderdfb.h: * plugins/directfb/pgmrenderdfbimage.c: (pgmr_dfb_image_new), * plugins/directfb/pgmrenderdfbimage.h: * plugins/directfb/pgmrenderdfbtext.c: (pgmr_dfb_text_new), * plugins/directfb/pgmrenderdfbtext.h: * plugins/directfb/pgmrenderdfbviewport.c: (pgmr_dfb_viewport_new), * plugins/directfb/pgmrenderdfbviewport.h: Start adding the DirectFB backend. 2007-02-21 Julien MOUTTE * libs/pgm/render/render/Makefile.am: * libs/pgm/render/render/pgmrenderbasewindow.c: * libs/pgm/render/render/pgmrenderbasewindow.h: Rename to pgmrendercanvas.[c,h] * libs/pgm/render/render/pgmrenderdrawable.h: Change Order to Group. * libs/pgm/render/render/pgmrendererror.h: Add some error type. 2007-02-21 Julien MOUTTE * libs/pgm/render/render/pgmrenderbasewindow.c: (pgm_render_canvas_dispose), (pgm_render_canvas_class_init), (pgm_render_canvas_init), (pgm_render_canvas_new), (pgm_render_canvas_set_color), (pgm_render_canvas_get_color), (pgm_render_canvas_set_title), (pgm_render_canvas_set_canvas_size), (pgm_render_canvas_get_canvas_size), (pgm_render_canvas_update_viewport), (pgm_render_canvas_set_viewport_cursor), (pgm_render_canvas_get_viewport_cursor), (pgm_render_canvas_set_viewport_size), (pgm_render_canvas_get_viewport_size), (pgm_render_canvas_set_viewport_fullscreen), (pgm_render_canvas_get_viewport_fullscreen), (pgm_render_canvas_get_screen_resolution), (pgm_render_canvas_get_screen_size_mm), (pgm_render_canvas_set_vertical_sync), (pgm_render_canvas_get_vertical_sync), (pgm_render_canvas_get_events), (pgm_render_canvas_add_drawable), (pgm_render_canvas_del_drawable), (pgm_render_canvas_regenerate_drawables): * libs/pgm/render/render/pgmrenderbasewindow.h: Huge refactor of BaseWindow object to become Canvas object. 2007-02-20 Julien MOUTTE * configure.ac: Detect DirectFB and build it, fix some useless check for GLIB and flags that are already pulled in. * libs/pgm/render/gstreamer/pgmrendersink.c: (pgm_render_sink_set_property), (pgm_render_sink_class_init), (pgm_render_sink_init), (pgm_render_sink_finalize), (pgm_render_sink_setcaps): Add some FIXMEs, use GStreamer debugging system. * libs/pgm/render/gstreamer/pgmrendersink.h: * libs/pgm/render/render/pgmrender.c: (find_plugin), (pgm_render_init), (pgm_render_deinit): Bind the module locally, add plugin initialization and shutdown function. * libs/pgm/render/render/pgmrender.h: * libs/pgm/render/render/pgmrenderbasewindow.c: * libs/pgm/render/render/pgmrenderbasewindow.h: Start refactoring API. * libs/pgm/render/render/pgmrenderdrawable.c: (pgm_render_drawable_dispose), (pgm_render_drawable_class_init), (pgm_render_drawable_init), (pgm_render_drawable_draw), (pgm_render_drawable_hide), (pgm_render_drawable_show): Start refactoring API. * libs/pgm/render/render/pgmrenderdrawable.h: * plugins/Makefile.am: Add DirectFB plugin build. * plugins/opengl/pgmrendergl1.c: (pgm_render_gl1_init), (pgm_render_gl1_shutdown): Add plugin init/shutdown functions. * plugins/opengl/pgmrendergl1.h: === release 0.1.5 === 2007-04-12 Loïc Molinari * plugins/opengl/pgmrendergl1window.c: Disabled the use of rasterized text display lists. Disabled FPS showing option. 2007-04-11 Florian Boucault * pgm/timing/modifier.py: Removed offensive output. Changed logging warning level from warn to err in case of wrongly specified properties. 2007-02-22 Loïc Molinari * examples/pictures/Makefile.am: * examples/pictures/mini_fluendo.png: * examples/pictures/mini_fosdem.png: * examples/pigment/fosdem.py: Added an example to demo timing framework at FOSDEM 2007. === release 0.1.4 === 2007-02-16 Loïc Molinari * README: * pigment.spec.in: Updated dependencies. 2007-02-16 Loïc Molinari * plugins/opengl/pgmrendergl1window.c: * plugins/opengl/pgmrendergl1window.h: Added temporary PGM_BROKEN_X_SIZE environment variable to correct broken X physical screen size retrieving with the factor 1.33. 2007-02-15 Loïc Molinari * examples/pigment/label.py: Updated example to show a sinusoidal scaling font effect. * plugins/opengl/pgmrendergl1window.c: Call the render function in main_quit to flush the remaining operations. fixes elisa:#311 2007-02-15 Loïc Molinari * plugins/opengl/pgmrender-glx.c: Added support for the new key codes in the OpenGL plugin. 2007-02-14 Loïc Molinari * pgm/timing/controller.py: * examples/pigment/label.py: Added the INFINITE constant for the repeat_count. Adapted the label example for that. * plugins/opengl/pgmrender-glx.c: Reordered the fullscreen processus. * plugins/opengl/pgmrendergl1font.c: Applied the scale after filling the pixmap to avoid glitches. * plugins/opengl/pgmrendergl1surface.c: Updated the copyright. * plugins/opengl/pgmrendergl1window.c: Removed a _set_scale on a new canvas_size to keep a correct viewport. 2007-02-14 Loïc Molinari * examples/render/label.c: * plugins/opengl/pgmrendergl1font.c: Applied cairo scaling matrix before retrieving text extents. Removed the workaround. 2007-02-14 Florian Boucault * pgm/form/image.py: Useless code. * plugins/opengl/pgmrender-glx.c: Better variable type. 2007-02-13 Julien MOUTTE * libs/pgm/render/render/pgmrenderevents.h: Add keys. 2007-02-13 Loïc Molinari * plugins/opengl/pgmrender-glx.c: Changed the resolution before moving/resizing the window on a fullscreen request. 2007-02-13 Loïc Molinari * plugins/opengl/pgmrendergl1font.c: Don't regenerate labels on demand since it's done on a scale request. 2007-02-13 Loïc Molinari * pgm/layout/window.py: Removed a print. Fixed parameter in fullscreen request. * plugins/opengl/pgmrender-glx.c: Changed bad height param in XRRSetScreenConfig in set_fullscreen. Fixed typo in VIDMOD defines. * plugins/opengl/pgmrendergl1window.c: Added comments. Removed unused stuff. 2007-02-13 Philippe Normand * pgm/layout/window.py: Flushed the pushed event list at the end of the dispatching. 2007-02-13 Loïc Molinari * libs/pgm/render/pyrender/pgmrender.defs: * libs/pgm/render/render/pgmrenderbasewindow.c: * libs/pgm/render/render/pgmrenderbasewindow.h: * plugins/opengl/pgmrender-glx.c: * plugins/opengl/pgmrendergl1window.c: Overrided set_scale_mode to adapt the canvas_size to the window_size in SCREEN_ADJUST scale mode. Added SCREEN_ADJUST scale mode support. * plugins/opengl/pgmrendergl1font.c: Removed useless initilizations. * pgm/layout/window.py: Added SCREEN_ADJUST mode support. Cleaned up unused and commented code. * examples/pigment/par.py: * examples/render/dragging.c: Adapted examples. 2007-02-12 Loïc Molinari * plugins/opengl/pgmrendergl1font.c: Removed the case when text size is upper than layout size. Regenerate text in set_scale. fixes #61 * README: Added libgtk2-dev in the Ubuntu dependency for libgdk-pixbuf. * examples/render/image.c: * examples/render/label.c: Adapted examples. 2007-02-12 Loïc Molinari * libs/pgm/render/render/pgmrenderbasewindow.c: * libs/pgm/render/render/pgmrenderbasewindow.h: Added the set/get_cursor methods. Added the PgmRenderCursor enumeration. * pgm/form/shape.py: Test if media is already in media__set. fixes #93 * libs/pgm/render/pyrender/pgmrender.defs: * libs/pgm/render/pyrender/pgmrender.override: Added the set/get_cursor method. * pgm/layout/window.py: Added scale__get/set methods. Added cursor__get/set methods. Removed unused screen_resolution__get method. * plugins/opengl/pgmrendergl1.h: * plugins/opengl/pgmrender-glx.c: Added the set_cursor backend func. Changed the visual attributes. Set standard properties. * plugins/opengl/pgmrendergl1window.c: * plugins/opengl/pgmrendergl1window.h: Implemented the set_cursor method. fixes #95 Apply the scale factor when the drawable is added. fixes #94 * examples/pigment/image.py: * examples/pigment/par.py: * examples/pigment/timing.py: * examples/render/dragging.c: Added the par example. Adapted for testing. 2007-02-09 Florian Boucault * pgm/layout/group.py: If group invisible, set new children to invisible, otherwise leave them as is. 2007-02-08 Florian Boucault * pgm/form/image.py: Error message using a non existent variable fixed. 2007-02-08 Loïc Molinari * plugins/opengl/pgmrender-glx.c: Added an XFlush at the end of set_title. 2007-02-07 Florian Boucault * pgm/form/image.py: Internal structure moved from (pixels, format, size) to PIL object. 2007-02-06 Loïc Molinari * examples/pigment/label.py: * plugins/opengl/pgmrender-glx.c: * plugins/opengl/pgmrender-glx.h: * plugins/opengl/pgmrendergl1.h: * plugins/opengl/pgmrendergl1window.c: Added support for Sync to VBlank using the GLX_SGI_video_sync extension. fixes #29 2007-02-06 Loïc Molinari * plugins/opengl/pgmrender-glx.c: * plugins/opengl/pgmrender-glx.h: Modified the XSetWindowAttributes to correctly handle size changing and fullscreen mode. * pgm/layout/group.py: Change the visible property of a Widget when added in a Group. * pgm/layout/window.py: Reactivated fullscreen support. Removed unused _add_controller method. * examples/pigment/label.py: * examples/render/label.c: Adapted the examples. 2007-02-04 Philippe Normand * pgm/form/stream.py.in: Temporary workaround for unsupported uri schemes in the discoverer. In this case we assume that the stream is audio-only. 2007-02-03 Philippe Normand * pgm/message/signal.py: Don't connect the same signal receiver twice to a signal 2007-02-02 Loïc Molinari * plugins/opengl/pgmrendergl1.c: * plugins/opengl/pgmrendergl1.h: * plugins/opengl/pgmrendergl1window.c: * plugins/opengl/pgmrendergl1window.h: * plugins/opengl/pgmrender-glx.c: * plugins/opengl/pgmrender-glx.h: * plugins/opengl/pgmrender-sdl.c: * plugins/opengl/pgmrender-sdl.h: Alloc the context structure in the heap. Added the XWindow/GLX backend in place of the SDL one. fixes #71 * plugins/opengl/Makefile.am: * configure.ac: Check for X11, Xrandr and OpenGL. Correctly generate libs and cflags for the OpenGL plugin. fixes #37 * README: Removed the SDL dependency. Added the X11 and Xrandr one. * pigment.spec.in: Removed the SDL dependency. 2007-02-02 Loïc Molinari * libs/pgm/render/render/pgmrenderdrawable.c: * libs/pgm/render/render/pgmrenderdrawable.h: * libs/pgm/render/pyrender/pgmrender.defs: Added the hide/show symbols and the show field. * plugins/opengl/pgmrendergl1window.c: Test the show value before calling draw. * pgm/form/shape.py: * pgm/form/label.py: * pgm/layout/leaf.py: Changed visible__set to call the new hide/show pyrender symbols. * pgm/widget.py: Removed the FIXME and set the correct doc string. * examples/render/dragging.c: * examples/pigment/timing.py: Adapted some examples. fixes #64 2007-02-01 Florian Boucault * pgm/form/image.py: Cleaner with a weaker dependency on PIL and an extra way of creating an Image by passing a pixel buffer. 2007-02-01 Loïc Molinari * pgm/layout/window.py: Removed the add/del/dispatch_controller* public API since it's now handled in the controllers with the GObject MainLoop. Removed the get_events public API since the event dispatching is automatically handled by the window adding a timeout to the mainloop. Removed the start/quit_loop public API adding a main and a main_quit, which respectively start and stop the loop. Added an option to provide an external mainloop to Pigment. For instance using Twisted as in Elisa. * pgm/timing/controller.py: Use the resolution property to update the controller with a timeout added to the default GObject MainLoop. * examples/pigment/dragging.py: * examples/pigment/forms.py: * examples/pigment/image.py: * examples/pigment/label.py: * examples/pigment/layout.py: * examples/pigment/timing.py: * examples/pigment/visualization.py: Updated the examples for the new API. fixes #51 2007-02-01 Loïc Molinari * libs/pgm/render/render/pgmrenderbasewindow.c: Updated the doc of the get_sreen_size_mm symbol. * configure.ac: * pigment.spec.in: Removed the pygtk2 dependency. fixes #83 2007-01-31 Florian Boucault * pgm/form/image.py: Now accepts image from memory. * pgm/form/media.py: Indentation fixes. 2007-01-31 Loïc Molinari * libs/pgm/render/render/pgmrenderbasewindow.c: * libs/pgm/render/render/pgmrenderbasewindow.h: * libs/pgm/render/render/pgmrenderlayout-iface.h: Added set/get_canvas_size symbols. Added the get/set_scale_mode symbols. Added the regenerate_drawables symbol. Added the PgmRenderWindowScaleMode enumeration. Removed the set/get_aspect_correction_factor symbols. Moved the get/set_zoom_factor symbols to get/set_scale. * plugins/opengl/pgmrender-sdl.c: * plugins/opengl/pgmrendergl1.c: * plugins/opengl/pgmrendergl1.h: * plugins/opengl/pgmrendergl1font.c: * plugins/opengl/pgmrendergl1font.h: * plugins/opengl/pgmrendergl1surface.c: * plugins/opengl/pgmrendergl1surface.h: Changed the position of the vertices, function of the window scaling sizes. Regenerate the rasterized bitmap font in the regenerate method using the Cairo scaling transformation matrix. * plugins/opengl/pgmrendergl1window.c: * plugins/opengl/pgmrendergl1window.h: Added fonts and surfaces GList. Removed the old symbols. Implemented the new render window symbols. Switched the font min/mag interpolation type to from nearest to linear. Removed the projection matrix scaling. * pgm/layout/window.py: * pgm/widget.py: Removed all the aspect-ratio stuff adapting the code to the new render API. * libs/pgm/render/pyrender/pgmrender.defs: * libs/pgm/render/pyrender/pgmrender.override Updated the Python binding to the new render API. * examples/pigment/dragging.py: * examples/pigment/label.py: * examples/pyrender/image.py: * examples/render/dragging.c: * examples/render/image.c: * examples/render/label.c: Adapted examples to the new API. fixes #74, #76 2007-01-26 Loïc Molinari * plugins/opengl/pgmrender-sdl.c: * plugins/opengl/pgmrender-sdl.h: * plugins/opengl/pgmrendergl1.h: * plugins/opengl/pgmrendergl1window.c: * plugins/opengl/pgmrendergl1window.h: Added OpenGL display list functions to the proc address list. Added 3 new backend functions to build/raster/destroy text. Added a function to rasterize the FPS string if the PGM_SHOW_FPS environment variable is set to 1. fixes #80 === release 0.1.3 === 2007-01-23 Loïc Molinari * configure.ac: * libs/Makefile.am: * libs/codegen/Makefile.am: Added codegen to the dist. * docs/reference/pigment-render-docs.sgml: Changed date and copyright holder. 2007-01-23 Loïc Molinari * examples/pigment/dragging.py: * examples/pigment/forms.py: * examples/pigment/image.py: * examples/pigment/label.py: * examples/pigment/layout.py: * examples/pigment/stream.py: * examples/pigment/timing.py: * examples/pigment/visible_size_stream.py: * examples/pigment/visualization.py: Fixed window size at creation at (800,600) to behave correctly with the new size mode system. 2007-01-23 Loïc Molinari * pgm/layout/window.py: * plugins/opengl/pgmrender-sdl.c: Sent correct fullscreen size and flags. 2007-01-22 Loïc Molinari * plugins/opengl/pgmrender-sdl.c * plugins/opengl/pgmrender-sdl.h * plugins/opengl/pgmrender-wgl.c * plugins/opengl/pgmrender-wgl.h * plugins/opengl/Makefile.am: * plugins/opengl/pgmrendergl1.c: * plugins/opengl/pgmrendergl1.h: * plugins/opengl/pgmrendergl1surface.c: * plugins/opengl/pgmrendergl1window.c: * plugins/opengl/pgmrendergl1window.h: Added a platform backend layer with support for native Win32 removing the SDL dependency. Added support to detect resolution and screen sizes. * win32/common/config.h: * win32/common/pgmrender.def: * win32/vs8/pgmrender-dragging.vcproj: * win32/vs8/pgmrender-gl.vcproj: * win32/vs8/pgmrender-gstvideosink.vcproj: * win32/vs8/pgmrender-python.vcproj: * win32/vs8/pgmrender.vcproj: Changed Release code optimization to -Ox. Added new Windows/WGL backend. Added new get_screen_size_mm and pgm_render_button_get_type symbols to the def file. Removed set_screen_size from the def file. * libs/pgm/render/pyrender/Makefile.am: * libs/pgm/render/pyrender/pgmrender.defs: * libs/pgm/render/pyrender/pgmrendermodule.c: Added ButtonEvent to the type. Added a license header to the module. Changed codegen path to the pigment included one. Added full support for Win32. * libs/pgm/render/render/pgmrender.h: * libs/pgm/render/render/pgmrenderbasewindow.c: * libs/pgm/render/render/pgmrenderdrawable.c: * libs/pgm/render/render/pgmrenderevents.c: * libs/pgm/render/render/pgmrenderevents.h: * libs/pgm/render/render/pgmrendergradient-iface.c: * libs/pgm/render/render/pgmrenderlayout-iface.c: * libs/pgm/render/render/pgmrendermedia-iface.c: * libs/pgm/render/render/pgmrendermedia-iface.h: * libs/pgm/render/render/pgmrenderpipe3d-iface.c: * libs/pgm/render/render/pgmrendershadow-iface.c: * libs/pgm/render/render/pgmrendershape-iface.c: * libs/pgm/render/render/pgmrenderstroke-iface.c: * libs/pgm/render/render/pgmrendertext-iface.c: Included before for MSVC8 compilation. Added the Button event. * configure.ac: Removed pygtk-2.0 codegen check since we include the lib. * examples/render/dragging.c: Tested fullscreen case. 2007-01-21 Lionel Martin * pgm/layout/window.py: * plugins/opengl/pgmrendergl1window.c: fixing fullscreen and size issues 2007-01-19 Loïc Molinari * examples/render/label.c: * libs/pgm/render/pyrender/pgmrender.defs: * libs/pgm/render/render/pgmrenderbasewindow.c: * libs/pgm/render/render/pgmrenderbasewindow.h: * pgm/layout/window.py: * plugins/opengl/pgmrendergl1window.c: Added width and height parameters to the fullscreen func. 2007-01-19 Lionel Martin * examples/pigment/sizemode.py: * pgm/layout/window.py: * plugins/opengl/pgmrendergl1window.c: add pixel aspec ratio autoadujst mode 2007-01-18 Loïc Molinari * plugins/opengl/pgmrendergl1window.c: Added automatically set aspect correction factor. fixes #66 2007-01-18 Loïc Molinari * libs/pgm/render/pyrender/pgmrender.defs: * libs/pgm/render/pyrender/pgmrender.override: * libs/pgm/render/render/pgmrenderbasewindow.c: * libs/pgm/render/render/pgmrenderbasewindow.h: * pgm/layout/window.py: * plugins/opengl/Makefile.am: * plugins/opengl/pgmrendergl1window.c: * plugins/opengl/pgmrendergl1window.h: Added get_screen_* methods. * examples/pigment/dragging.py: * examples/render/label.c: Added code to test the new get_screen_* methods. * pgm/util/discoverer.py: Added URI check to run on Win32. * README: Corrected package name of the automake requirement. 2007-01-18 Florian Boucault * plugins/opengl/pgmrendergl1window.c: SDL created events now have source set to 0 2007-01-17 Florian Boucault * libs/pgm/render/pyrender/pgmrender.override: * libs/pgm/render/render/pgmrenderevents.c: * libs/pgm/render/render/pgmrenderevents.h: Added common property to all PgmRenderEvents: source. fixes #67 2007-01-15 Loïc Molinari * plugins/opengl/pgmrendergl1window.h * plugins/opengl/pgmrendergl1window.c Changed window title in the rendering thread. Blocked window resize on Win32. Added context creation variable to test before waiting. Added mutex protections around g_cond_* functions. * examples/render/dragging.c * examples/render/label.c Added minimal changes to test stuff on Win32. * libs/pgm/render/pyrender/pgmrendermodule.c Reverted auto-generated code inclusion for WIN32 adding the file in the MSVC8 project. * libs/pgm/render/render/pgmrenderenumtypes.h * libs/pgm/render/render/pgmrenderenumtypes.c * libs/pgm/render/render/pgmrendermarshal.h * libs/pgm/render/render/pgmrendermarshal.c Removed those auto-generated files, the file are now added in the MSVC8 project. * win32/vs8/pgmrender-dragging.vcproj * win32/vs8/pgmrender-gl.vcproj * win32/vs8/pgmrender-gstvideosink.vcproj * win32/vs8/pgmrender-label.vcproj * win32/vs8/pgmrender-python.vcproj * win32/vs8/pgmrender-stream.vcproj * win32/vs8/pgmrender.vcproj * win32/vs8/pigment.sln Added Release configurations. * win32/vs8/README.txt Added a README explaining compilation on Win32 with MSVC8. 2007-01-09 Christian Schaller * EXTRA_DIST some doc files for the RPMS 2007-01-09 Loïc Molinari * win32/vs8 * win32/vs8/pgmrender-dragging.vcproj * win32/vs8/pgmrender-gl.vcproj * win32/vs8/pgmrender-gstvideosink.vcproj * win32/vs8/pgmrender-label.vcproj * win32/vs8/pgmrender-python.vcproj * win32/vs8/pgmrender-stream.vcproj * win32/vs8/pgmrender.vcproj * win32/vs8/pigment.sln Added MSVC8 project files. * win32 * win32/common * win32/common/config.h Added default config.h header. * win32/common/glib-mkenums Added customized glib-mkenums script. * win32/common/pgmrender-gl.def * win32/common/pgmrender-gstvideosink.def * win32/common/pgmrender.def Added def files for the exported symbols. * libs/codegen * libs/codegen/__init__.py * libs/codegen/argtypes.py * libs/codegen/codegen.py * libs/codegen/createdefs.py * libs/codegen/definitions.py * libs/codegen/defsparser.py * libs/codegen/docextract.py * libs/codegen/docgen.py * libs/codegen/h2def.py * libs/codegen/mergedefs.py * libs/codegen/mkskel.py * libs/codegen/override.py * libs/codegen/reversewrapper.py * libs/codegen/scmexpr.py Integrated the pygtk-codegen library in the repository to remove a annoying development dependency and to make development easier on Win32. * libs/pgm/render/gstreamer/pgmrendersink.h Included config.h * libs/pgm/render/pyrender/pgmrender.override Corrected wrong override statement for pgm_render_base_window_get_aspect_correction_factor. All the path of _wrap_pgm_render_event_tp_getattr now return a value. * libs/pgm/render/pyrender/pgmrendermodule.c Included the generated pgmrender.c file in case of _WIN32 and fixed resulting warnings. * libs/pgm/render/render/pgmrender.c * libs/pgm/render/render/pgmrender.h Added correct declspec (dllexport or dllimport) Win32 storage keyword to the factory function pointers. * libs/pgm/render/render/pgmrenderbasewindow.c * libs/pgm/render/render/pgmrenderbasewindow.h * libs/pgm/render/render/pgmrenderdrawable.c * libs/pgm/render/render/pgmrenderdrawable.h * plugins/opengl/pgmrendergl1font.c * plugins/opengl/pgmrendergl1font.h Removed unused GLib private stuff. * libs/pgm/render/render/pgmrenderenumtypes.c * libs/pgm/render/render/pgmrenderenumtypes.h * libs/pgm/render/render/pgmrendermarshal.c * libs/pgm/render/render/pgmrendermarshal.h Added default GLib auto-generated files to be included in the MSVC project. * libs/pgm/render/render/pgmrendertext-iface.c Fixed spelling in the documentation. * plugins/opengl/pgmrendergl1.h Added comments. * plugins/opengl/pgmrendergl1window.c Included config.h. Adapted pointer arithmetic to MSVC8. * examples/render/dragging.c * examples/render/label.c * examples/render/stream.c Removed unistd include to portable g_usleep. * cl.pl Added cl.pl to make easier ChangeLog update. 2007-01-08 Thomas Vander Stichele * pigment.spec.in: add requires make gstreamer overridable 2007-01-05 Thomas Vander Stichele * pgm/util/discoverer.py: Nothing to execute so no shebang line needed. 2007-01-05 Thomas Vander Stichele * pigment.spec.in: change spec file to match 2007-01-05 Thomas Vander Stichele * configure.ac: The pigment video sink uses GStreamer Base Plug-ins libraries, so it should check for them and use them. 2007-01-04 Thomas Vander Stichele * configure.ac: * pigment.spec.in: use AC_SUBST after AC_INIT so that pigment.spec gets proper expansions 2007-01-03 Philippe Normand * pgm/__init__.py: install _() in __builtin__ if it's not already installed. * pgm/form/image.py: Raise a TypeError when an interlaced picture is found... Until PIL supports this kind of pictures. 2007-01-03 Philippe Normand * examples/pigment/image.py: * pgm/form/shape.py: unlock a mutex after a return statement is not very usefull and can lead to a deadlock... 2006-12-28 Lionel Martin * examples/pyrender/stream.py: * pgm/form/shape.py: add mutex protection to media property. Now, media can be acceded throw different thread. === release 0.1.2 === 2006-12-21 Loïc Molinari * docs/reference/tmpl/pgmrenderbasewindow.sgml: * docs/reference/tmpl/pigment-render-unused.sgml: Updated docs. * examples/render/image.c: Added lacking argument. 2006-12-20 Loïc Molinari * examples/render/image.c: * examples/pigment/image.py: * pgm/form/shape.py: Removed silly wrong test. fixes #62 2006-12-19 Loïc Molinari * plugins/opengl/pgmrendergl1surface.c: * plugins/opengl/pgmrendergl1surface.h: Removed the border texels in the texture coordinates of I420 and YV12 media when bilinear filtering is activated. fixes #50 2006-12-18 Loïc Molinari * examples/pigment/image.py: * plugins/opengl/pgmrendergl1surface.c: Correctly set the center of Surface with media. * pgm/layout/window.py: Removed old commented code. Adapted to the coding guidelines. 2006-12-17 Lionel Martin * examples/pigment/stream.py: * examples/pigment/visible_size_stream.py: examples updates * pgm/layout/window.py: add visible_width and height, remove set_visible_size in window 2006-12-15 Loïc Molinari * examples/pigment/image.py: * examples/pigment/zoomed_stream.py: * examples/render/image.c: * libs/pgm/render/pyrender/pgmrender.defs: * libs/pgm/render/pyrender/pgmrender.override: * libs/pgm/render/render/pgmrenderbasewindow.c: * libs/pgm/render/render/pgmrenderbasewindow.h: * libs/pgm/render/render/pgmrenderlayout-iface.c: * libs/pgm/render/render/pgmrenderlayout-iface.h: * pgm/form/shape.py: * pgm/layout/window.py: * plugins/opengl/pgmrendergl1font.c: * plugins/opengl/pgmrendergl1surface.c: * plugins/opengl/pgmrendergl1surface.h: * plugins/opengl/pgmrendergl1window.c: * plugins/opengl/pgmrendergl1window.h: Added support for FILLED aspect style. fixes #54 Added p-a-r correction factor. fixes #33 2006-12-15 Lionel Martin * examples/pigment/stream.py: * examples/pigment/stream_with_twisted.py: * examples/pyrender/stream.py: * examples/render/image.c: update on sample for performance tests * pgm/layout/window.py: * examples/pigment/visible_size_stream.py adding visible_size on resize event adding resize_mode (with auto zoom) to window 2006-12-15 Philippe Normand * pgm/message/signal.py: * pgm/widget.py: Added signal neutralization methods. This is temporary, until the focus system is implemented. 2006-12-14 Loïc Molinari * plugins/opengl/pgmrendergl1window.c: Tested if g_getenv returns NULL. fixes #53 2006-12-13 Loïc Molinari * examples/pigment/zoomed_stream.py: * libs/pgm/render/pyrender/pgmrender.defs: * libs/pgm/render/pyrender/pgmrender.override: * libs/pgm/render/render/pgmrenderbasewindow.c: * libs/pgm/render/render/pgmrenderbasewindow.h: * pgm/layout/window.py: * plugins/opengl/pgmrendergl1window.c: * plugins/opengl/pgmrendergl1window.h: Fixed dump GPU support checking environment variable value. Added the (width, height) zoom factor support. fixes #52 Added the example zoomed_stream.py. 2006-12-12 Loïc Molinari * plugins/opengl/README: Added a README explaining the behavior of the OpenGL plugin. * plugins/opengl/pgmrendergl1window.c: * plugins/opengl/pgmrendergl1window.h: Added the dump GPU support function. 2006-12-12 Loïc Molinari * examples/Makefile.am: * examples/pictures/Makefile.am: * examples/pyrender/Makefile.am: * examples/pigment/Makefile.am: Added EXTRA_DIST to pictures and Python examples. * examples/pigment/visu.py: Renamed to visualization.py. * libs/pgm/render/Makefile.am: * libs/pgm/render/gstreamer/Makefile.am: * libs/pgm/render/gstreamer/pgmrendersink.c: * libs/pgm/render/gstreamer/pgmrendersink.h: * libs/pgm/render/render/Makefile.am: * libs/pgm/render/render/pgmrendersink.c: * libs/pgm/render/render/pgmrendersink.h: Moved the GStreamer sink to a dedicated directory. * pgm/Makefile.am: * pgm/form/Makefile.am: * pgm/layout/Makefile.am: * pgm/message/Makefile.am: * pgm/timing/Makefile.am: Removed trailing spaces. * configure.ac: Added new GStreamer directory and example Makefiles to CONFIG_FILES. === release 0.1.1 === 2006-12-11 Loïc Molinari * plugins/gl1/pgmrendergl1window.c: Reverted shader border offset, still uses too much CPU. 2006-12-11 Loïc Molinari * plugins/gl1/pgmrendergl1window.c: Removed green border lines adding an offset to the coord in shaders. Removed unused bilinear shader code from the compilation. 2006-12-11 Loïc Molinari * examples/render/stream.c: * plugins/gl1/pgmrendergl1surface.c: * plugins/gl1/pgmrendergl1window.c: Switched to fixed func filtering for all the csp conversion shaders. Removed debugging g_print. 2006-12-11 Loïc Molinari * HACKING: Updated C coding guidelines. * libs/pgm/render/render/pgmrenderbasewindow.c: * libs/pgm/render/render/pgmrenderpipe3d-iface.c: * docs/reference/pigment-render-sections.txt: * docs/reference/tmpl/pgmrenderdrawable.sgml: * docs/reference/tmpl/pgmrenderpipe3d-iface.sgml: * docs/reference/tmpl/pigment-render-unused.sgml: Updated documentations. * examples/render/stream.c: Minimized the rendering loop frequency for testing purpose. * plugins/gl1/pgmrendergl1surface.c: * plugins/gl1/pgmrendergl1window.c: Switched to GL fixed pipeline bilinear filter. Works for YV12/I420, still need to be fixed for YUYV/UYVY. 2006-12-11 Loïc Molinari * plugins/gl1/pgmrendergl1window.c: Disabled pixel store modes for packed 16 formats. Removed commented texture create/upload prototypes. 2006-12-11 Loïc Molinari * plugins/gl1/pgmrendergl1window.h: * plugins/gl1/pgmrendergl1window.c: Sent the correct size args to GL *tex_image function. Refactored texture creation/upload code to better respect store modes regarding the different formats. Added function to centralize the setup of texture parameters. Added comments. * libs/pgm/render/render/pgmrender.c: Initialized GStreamer at plugin load time. * libs/pgm/render/render/pgmrenderdrawable.c: Removed useless comments. * examples/render/image.c: Disabled image rotation. * examples/render/stream.c: Changed loop frequency. 2006-12-07 Loïc Molinari * libs/pgm/render/render/pgmrenderdrawable.c: * plugins/gl1/pgmrendergl1.h: * plugins/gl1/pgmrendergl1font.c: * plugins/gl1/pgmrendergl1surface.c: * plugins/gl1/pgmrendergl1surface.h: * plugins/gl1/pgmrendergl1window.c: * plugins/gl1/pgmrendergl1window.h: Completed and activated the color space conversion GLSL shaders. Added support for the blended color when shaders are activated. * libs/pgm/render/render/pgmrendersink.c: * libs/pgm/render/render/pgmrendersink.h: Completed the GStreamer video sink to automatically adapt its caps to the binded Drawable. * examples/pigment/stream.py: * examples/render/stream.c: Adapted the examples to test the shaders. * TODO: Updated the tasks. 2006-12-05 Colin Laplace * examples/pigment/visu.py: New test script for testing GST visualization plugins 2006-12-04 Philippe Normand * configure.ac: * pgm/render.py: * pgm/render.py.in: Added __version__ module attribute to pgm.render 2006-12-01 Loïc Molinari * examples/render/image.c: * examples/render/stream.c: * libs/pgm/render/pyrender/pgmrender.defs: * libs/pgm/render/render/pgmrenderdrawable.c: * libs/pgm/render/render/pgmrenderdrawable.h: * libs/pgm/render/render/pgmrendersink.c: * libs/pgm/render/render/pgmrendersink.h: * plugins/gl1/pgmrendergl1.h: * plugins/gl1/pgmrendergl1surface.c: * plugins/gl1/pgmrendergl1surface.h: * plugins/gl1/pgmrendergl1window.c: * plugins/gl1/pgmrendergl1window.h: Added support for color space conversion fragment shaders using the OpenGL Shading Language. The code is not activated ATM. 2006-11-30 Philippe Normand * pgm/message/signal.py: Added a new parameter to override use of signal registry 2006-11-28 Loïc Molinari * examples/render/image.c: * examples/render/stream.c: * plugins/gl1/pgmrendergl1.h: * plugins/gl1/pgmrendergl1font.c: * plugins/gl1/pgmrendergl1font.h: * plugins/gl1/pgmrendergl1surface.c: * plugins/gl1/pgmrendergl1surface.h: * plugins/gl1/pgmrendergl1window.c: * plugins/gl1/pgmrendergl1window.h: Added OpenGL texture tiling support for the Surface object. Added OpenGL vertex arrays support for the surface media vertices. Added sync/free functions to the render pass. Inverted the projection matrix on the y axis, and removed the code to correctly place the y vertex. * libs/pgm/render/pyrender/pgmrender.override: Fixed an event boxed copy problem generating coredumps. * README: Added gstreamer-python dependency to the FC6 package list. * pgm/form/shape.py: Added BOTTOM_RIGHT at the beginning of all the tests for the relative size property since it's the default value. 2006-11-23 Philippe Normand * pgm/form/label.py: opacity_offset property support * pgm/util/string_tools.py: set codepage to utf-8 2006-11-21 Loïc Molinari * libs/pgm/render/pyrender/pgmrender.override: Removed a DeprecationWarning converting attended kwargs to float. * plugins/gl1/pgmrendergl1window.c: Load glMultiDrawArrays proc instead of glMultiDrawArraysEXT if the OpenGL implementation version is >= 1.4. 2006-11-20 Loïc Molinari * README: Fixed SVN checkout command. * docs/reference/tmpl/pgmrendergradient-iface.sgml: * docs/reference/tmpl/pigment-render-unused.sgml: Updated docs. * plugins/gl1/Makefile.am: Removed GLU dependency. * plugins/gl1/pgmrendergl1.c: * plugins/gl1/pgmrendergl1.h: * plugins/gl1/pgmrendergl1font.c: * plugins/gl1/pgmrendergl1font.h: * plugins/gl1/pgmrendergl1surface.c: * plugins/gl1/pgmrendergl1surface.h: * plugins/gl1/pgmrendergl1window.c: * plugins/gl1/pgmrendergl1window.h: Added OpenGL extensions loading. Added OpenGL feature mask. Added OpenGL max implementation value checking. Added dump of the features. fixes #47 2006-11-17 Christian Schaller * Update spec file for more depenencies * README: Add Fedora requirements 2006-11-16 Philippe Normand * pgm/layout/window.py: size__set/get API inherited from group, fixes #46 2006-11-16 Philippe Normand * examples/pigment/resize_test.py: * pgm/layout/window.py: Use case for context update bug, re #46 2006-11-16 Philippe Normand * examples/pigment/resize_test.py: * libs/pgm/render/pyrender/pgmrender.override: * pgm/form/shape.py: * pgm/layout/window.py: PgmRender configure events support in pyrender and pgm 2006-11-15 Philippe Normand * examples/pigment/dragging.py: * examples/pigment/stream.py: * pgm/form/stream.py.in: Refactoring of stream module. Now using playbin by default. Fixes #13 * pgm/layout/group.py: Cosmetic fix 2006-11-15 Loïc Molinari * README: Updated Dapper/Edgy dependencies. 2006-11-14 Loïc Molinari * docs/planning/pigment-0.2.0.html: * docs/planning/pigment-0.2.0.planner: Updated planning tasks. 2006-11-14 Loïc Molinari * examples/pigment/window_size.py: * libs/pgm/render/render/pgmrenderbasewindow.c: * plugins/gl1/pgmrendergl1window.c: Changed window and GL context size in the rendering thread. Fixes #5. 2006-11-14 Loïc Molinari * libs/pgm/render/pyrender/pgmrender.defs: * libs/pgm/render/render/pgmrendergradient-iface.c: * libs/pgm/render/render/pgmrendergradient-iface.h: Removed unstable symbols in the Gradient interface for 0.2.0. 2006-11-13 Loïc Molinari * README: Updated Dapper/Edgy dependencies. 2006-11-10 Loïc Molinari * plugins/gl1/pgmrendergl1font.c: Added 1 pix shadow in font generation, still need to implement the shadow interface. * examples/pigment/stream.py: Clean up and adapted to new add* API. * examples/render/dragging.c: Fixed add_drawable API change. * examples/render/label.c: Clean up. * examples/render/Makefile.am: * examples/render/stream.c: * plugins/gl1/pgmrendergl1surface.c: Partly fixed the crash video->image->video. * plugins/gl1/pgmrendergl1window.c: * plugins/gl1/pgmrendergl1window.h: Remove the GSource before ending the GMainLoop in quit_loop. 2006-11-09 Loïc Molinari * README: Updated SVN repository address * plugins/gl1/pgmrendergl1font.c: * examples/pigment/label.py: * pgm/form/label.py: Added font x/y alignment. Updated Pigment label example. * pgm/layout/group.py: * pgm/layout/window.py: Added support to add more than one parameter in add* methods. * pigment.spec.in: Changed the license to GPL/Proprietary. 2006-11-09 Loïc Molinari Patch by: Pete Shinners * examples/pyrender/image.py: * examples/pyrender/stream.py: Fix the pyrender examples 2006-11-09 Loïc Molinari * docs/reference/tmpl/pgmrenderbasewindow.sgml: * docs/reference/tmpl/pgmrenderdrawable.sgml: * docs/reference/tmpl/pgmrenderpipe3d-iface.sgml: * docs/reference/tmpl/pgmrendertext-iface.sgml: * docs/reference/tmpl/pigment-render-unused.sgml: First update to the render documentation 2006-11-09 Thomas Vander Stichele * configure.ac: AC_SUBST the required version symbols fix the GLib pkg-config check * pigment.spec.in: clean up the spec file use the required version symbols remove all wrongly copied GStreamer stuff === release 0.1.0 ===