From: Kibum Kim Date: Fri, 6 Jan 2012 15:44:48 +0000 (+0900) Subject: Git init X-Git-Tag: 2.0_alpha~7 X-Git-Url: http://review.tizen.org/git/?p=framework%2Fuifw%2Fe17-extra-modules.git;a=commitdiff_plain;h=4368652419d8685f94abbbe3757ed0c2c0a13e25 Git init --- diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..ed27b4f --- /dev/null +++ b/AUTHORS @@ -0,0 +1,34 @@ +The Rasterman (Carsten Haitzler) +Ibukun Olumuyiwa +Sebastian Dransfeld +HandyAndE (Andrew Williams) +CodeWarrior (Hisham Mardam Bey) +dj2 (Dan Sinclair) +Tilman Sauerbeck +Aleksej Struk +Brian Mattern +devilhorns (Christopher Michael) +/dev/urandom (Viktor Kojouharov) +ilLogict (Chidambar Zinnoury) +Stafford Horne +Cedric Bail +onefang (David Seikel) +okra (Stephen Houston) +Byron Hillis +Ravenlock (Eric Schuele) +ManoWarrior (Luchezar Petkov) +morlenxus (Brian Miculcy) +Toma- (Tom Haste) +k-s (Gustavo Sverzut Barbieri) +Peter van de Werken +Florian Hackenberger +Hannes Janetzek +Mike Blumenkrantz (discomfitor/zmike) +Leif Middelschulte +yoz (Michael Bouchaud) +Gwanglim Lee +Doyoun Kang +Gwangyeong Mun +Duna Oh +Sung-Jin Park +Sangjin Lee diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..7625f00 --- /dev/null +++ b/COPYING @@ -0,0 +1,25 @@ +Copyright notice for Enlightenment: + +Copyright (C) 2000-2011 Carsten Haitzler and various contributors (see AUTHORS) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, +OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/comp-slp/ABOUT-NLS b/comp-slp/ABOUT-NLS new file mode 100644 index 0000000..2f50c66 --- /dev/null +++ b/comp-slp/ABOUT-NLS @@ -0,0 +1,768 @@ +Notes on the Free Translation Project +************************************* + +Free software is going international! The Free Translation Project is +a way to get maintainers of free software, translators, and users all +together, so that will gradually become able to speak many languages. +A few packages already provide translations for their messages. + + If you found this `ABOUT-NLS' file inside a distribution, you may +assume that the distributed package does use GNU `gettext' internally, +itself available at your nearest GNU archive site. But you do _not_ +need to install GNU `gettext' prior to configuring, installing or using +this package with messages translated. + + Installers will find here some useful hints. These notes also +explain how users should proceed for getting the programs to use the +available translations. They tell how people wanting to contribute and +work at translations should contact the appropriate team. + + When reporting bugs in the `intl/' directory or bugs which may be +related to internationalization, you should tell about the version of +`gettext' which is used. The information can be found in the +`intl/VERSION' file, in internationalized packages. + +Quick configuration advice +========================== + +If you want to exploit the full power of internationalization, you +should configure it using + + ./configure --with-included-gettext + +to force usage of internationalizing routines provided within this +package, despite the existence of internationalizing capabilities in the +operating system where this package is being installed. So far, only +the `gettext' implementation in the GNU C library version 2 provides as +many features (such as locale alias, message inheritance, automatic +charset conversion or plural form handling) as the implementation here. +It is also not possible to offer this additional functionality on top +of a `catgets' implementation. Future versions of GNU `gettext' will +very likely convey even more functionality. So it might be a good idea +to change to GNU `gettext' as soon as possible. + + So you need _not_ provide this option if you are using GNU libc 2 or +you have installed a recent copy of the GNU gettext package with the +included `libintl'. + +INSTALL Matters +=============== + +Some packages are "localizable" when properly installed; the programs +they contain can be made to speak your own native language. Most such +packages use GNU `gettext'. Other packages have their own ways to +internationalization, predating GNU `gettext'. + + By default, this package will be installed to allow translation of +messages. It will automatically detect whether the system already +provides the GNU `gettext' functions. If not, the GNU `gettext' own +library will be used. This library is wholly contained within this +package, usually in the `intl/' subdirectory, so prior installation of +the GNU `gettext' package is _not_ required. Installers may use +special options at configuration time for changing the default +behaviour. The commands: + + ./configure --with-included-gettext + ./configure --disable-nls + +will respectively bypass any pre-existing `gettext' to use the +internationalizing routines provided within this package, or else, +_totally_ disable translation of messages. + + When you already have GNU `gettext' installed on your system and run +configure without an option for your new package, `configure' will +probably detect the previously built and installed `libintl.a' file and +will decide to use this. This might be not what is desirable. You +should use the more recent version of the GNU `gettext' library. I.e. +if the file `intl/VERSION' shows that the library which comes with this +package is more recent, you should use + + ./configure --with-included-gettext + +to prevent auto-detection. + + The configuration process will not test for the `catgets' function +and therefore it will not be used. The reason is that even an +emulation of `gettext' on top of `catgets' could not provide all the +extensions of the GNU `gettext' library. + + Internationalized packages have usually many `po/LL.po' files, where +LL gives an ISO 639 two-letter code identifying the language. Unless +translations have been forbidden at `configure' time by using the +`--disable-nls' switch, all available translations are installed +together with the package. However, the environment variable `LINGUAS' +may be set, prior to configuration, to limit the installed set. +`LINGUAS' should then contain a space separated list of two-letter +codes, stating which languages are allowed. + +Using This Package +================== + +As a user, if your language has been installed for this package, you +only have to set the `LANG' environment variable to the appropriate +`LL_CC' combination. Here `LL' is an ISO 639 two-letter language code, +and `CC' is an ISO 3166 two-letter country code. For example, let's +suppose that you speak German and live in Germany. At the shell +prompt, merely execute `setenv LANG de_DE' (in `csh'), +`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash'). +This can be done from your `.login' or `.profile' file, once and for +all. + + You might think that the country code specification is redundant. +But in fact, some languages have dialects in different countries. For +example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The +country code serves to distinguish the dialects. + + The locale naming convention of `LL_CC', with `LL' denoting the +language and `CC' denoting the country, is the one use on systems based +on GNU libc. On other systems, some variations of this scheme are +used, such as `LL' or `LL_CC.ENCODING'. You can get the list of +locales supported by your system for your country by running the command +`locale -a | grep '^LL''. + + Not all programs have translations for all languages. By default, an +English message is shown in place of a nonexistent translation. If you +understand other languages, you can set up a priority list of languages. +This is done through a different environment variable, called +`LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG' +for the purpose of message handling, but you still need to have `LANG' +set to the primary language; this is required by other parts of the +system libraries. For example, some Swedish users who would rather +read translations in German than English for when Swedish is not +available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'. + + Special advice for Norwegian users: The language code for Norwegian +bokma*l changed from `no' to `nb' recently (in 2003). During the +transition period, while some message catalogs for this language are +installed under `nb' and some older ones under `no', it's recommended +for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and +older translations are used. + + In the `LANGUAGE' environment variable, but not in the `LANG' +environment variable, `LL_CC' combinations can be abbreviated as `LL' +to denote the language's main dialect. For example, `de' is equivalent +to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT' +(Portuguese as spoken in Portugal) in this context. + +Translating Teams +================= + +For the Free Translation Project to be a success, we need interested +people who like their own language and write it well, and who are also +able to synergize with other translators speaking the same language. +Each translation team has its own mailing list. The up-to-date list of +teams can be found at the Free Translation Project's homepage, +`http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams" +area. + + If you'd like to volunteer to _work_ at translating messages, you +should become a member of the translating team for your own language. +The subscribing address is _not_ the same as the list itself, it has +`-request' appended. For example, speakers of Swedish can send a +message to `sv-request@li.org', having this message body: + + subscribe + + Keep in mind that team members are expected to participate +_actively_ in translations, or at solving translational difficulties, +rather than merely lurking around. If your team does not exist yet and +you want to start one, or if you are unsure about what to do or how to +get started, please write to `translation@iro.umontreal.ca' to reach the +coordinator for all translator teams. + + The English team is special. It works at improving and uniformizing +the terminology in use. Proven linguistic skill are praised more than +programming skill, here. + +Available Packages +================== + +Languages are not equally supported in all packages. The following +matrix shows the current state of internationalization, as of January +2004. The matrix shows, in regard of each package, for which languages +PO files have been submitted to translation coordination, with a +translation percentage of at least 50%. + + Ready PO files af am ar az be bg bs ca cs da de el en en_GB eo es + +----------------------------------------------------+ + a2ps | [] [] [] [] | + aegis | () | + ant-phone | () | + anubis | | + ap-utils | | + aspell | [] | + bash | [] [] [] [] | + batchelor | | + bfd | [] [] | + binutils | [] [] | + bison | [] [] [] | + bluez-pin | [] [] [] | + clisp | | + clisp | [] [] [] | + console-tools | [] [] | + coreutils | [] [] [] [] | + cpio | [] [] [] | + darkstat | [] () [] | + diffutils | [] [] [] [] [] [] [] | + e2fsprogs | [] [] [] | + enscript | [] [] [] [] | + error | [] [] [] [] [] | + fetchmail | [] () [] [] [] [] | + fileutils | [] [] [] | + findutils | [] [] [] [] [] [] [] | + flex | [] [] [] [] | + fslint | | + gas | [] | + gawk | [] [] [] [] | + gbiff | [] | + gcal | [] | + gcc | [] [] | + gettext | [] [] [] [] [] | + gettext-examples | [] [] [] [] | + gettext-runtime | [] [] [] [] [] | + gettext-tools | [] [] [] | + gimp-print | [] [] [] [] [] | + gliv | | + glunarclock | [] [] | + gnubiff | [] | + gnucash | [] () [] [] | + gnucash-glossary | [] () [] | + gnupg | [] () [] [] [] [] | + gpe-aerial | [] | + gpe-beam | [] [] | + gpe-calendar | [] [] | + gpe-clock | [] [] | + gpe-conf | [] [] | + gpe-contacts | [] [] | + gpe-edit | [] | + gpe-go | [] | + gpe-login | [] [] | + gpe-ownerinfo | [] [] | + gpe-sketchbook | [] [] | + gpe-su | [] [] | + gpe-taskmanager | [] [] | + gpe-timesheet | [] | + gpe-today | [] [] | + gpe-todo | [] [] | + gphoto2 | [] [] [] [] | + gprof | [] [] [] | + gpsdrive | () () () | + gramadoir | [] | + grep | [] [] [] [] [] [] | + gretl | [] | + gtick | [] () | + hello | [] [] [] [] [] [] | + id-utils | [] [] | + indent | [] [] [] [] | + iso_3166 | [] [] [] [] [] [] [] [] [] [] | + iso_3166_1 | [] [] [] [] [] [] | + iso_3166_2 | | + iso_3166_3 | [] | + iso_4217 | [] [] [] [] | + iso_639 | | + jpilot | [] [] [] | + jtag | | + jwhois | [] | + kbd | [] [] [] [] [] | + latrine | () | + ld | [] [] | + libc | [] [] [] [] [] [] | + libgpewidget | [] [] | + libiconv | [] [] [] [] [] | + lifelines | [] () | + lilypond | [] | + lingoteach | | + lingoteach_lessons | () () | + lynx | [] [] [] [] | + m4 | [] [] [] [] | + mailutils | [] [] | + make | [] [] [] | + man-db | [] () [] [] () | + minicom | [] [] [] | + mysecretdiary | [] [] [] | + nano | [] () [] [] [] | + nano_1_0 | [] () [] [] [] | + opcodes | [] | + parted | [] [] [] [] [] | + ptx | [] [] [] [] [] | + python | | + radius | [] | + recode | [] [] [] [] [] [] [] | + rpm | [] [] | + screem | | + scrollkeeper | [] [] [] [] [] [] | + sed | [] [] [] [] [] [] | + sh-utils | [] [] [] | + shared-mime-info | | + sharutils | [] [] [] [] [] [] | + silky | () | + skencil | [] () [] | + sketch | [] () [] | + soundtracker | [] [] [] | + sp | [] | + tar | [] [] [] [] | + texinfo | [] [] [] | + textutils | [] [] [] [] | + tin | () () | + tp-robot | | + tuxpaint | [] [] [] [] [] [] [] | + unicode-han-tra... | | + unicode-transla... | | + util-linux | [] [] [] [] [] | + vorbis-tools | [] [] [] [] | + wastesedge | () | + wdiff | [] [] [] [] | + wget | [] [] [] [] [] [] | + xchat | [] [] [] [] | + xfree86_xkb_xml | [] [] | + xpad | [] | + +----------------------------------------------------+ + af am ar az be bg bs ca cs da de el en en_GB eo es + 4 0 0 1 9 4 1 40 41 60 78 17 1 5 13 68 + + et eu fa fi fr ga gl he hr hu id is it ja ko lg + +-------------------------------------------------+ + a2ps | [] [] [] () () | + aegis | | + ant-phone | [] | + anubis | [] | + ap-utils | [] | + aspell | [] [] | + bash | [] [] | + batchelor | [] [] | + bfd | [] | + binutils | [] [] | + bison | [] [] [] [] | + bluez-pin | [] [] [] [] [] | + clisp | | + clisp | [] | + console-tools | | + coreutils | [] [] [] [] [] [] | + cpio | [] [] [] [] | + darkstat | () [] [] [] | + diffutils | [] [] [] [] [] [] [] | + e2fsprogs | | + enscript | [] [] | + error | [] [] [] [] | + fetchmail | [] | + fileutils | [] [] [] [] [] [] | + findutils | [] [] [] [] [] [] [] [] [] [] [] | + flex | [] [] [] | + fslint | [] | + gas | [] | + gawk | [] [] [] | + gbiff | [] | + gcal | [] | + gcc | [] | + gettext | [] [] [] | + gettext-examples | [] [] | + gettext-runtime | [] [] [] [] [] | + gettext-tools | [] [] [] | + gimp-print | [] [] | + gliv | () | + glunarclock | [] [] [] [] | + gnubiff | [] | + gnucash | () [] | + gnucash-glossary | [] | + gnupg | [] [] [] [] [] [] [] | + gpe-aerial | [] | + gpe-beam | [] | + gpe-calendar | [] [] [] | + gpe-clock | [] | + gpe-conf | [] | + gpe-contacts | [] [] | + gpe-edit | [] [] | + gpe-go | [] | + gpe-login | [] [] | + gpe-ownerinfo | [] [] [] | + gpe-sketchbook | [] | + gpe-su | [] | + gpe-taskmanager | [] | + gpe-timesheet | [] [] [] | + gpe-today | [] [] | + gpe-todo | [] [] | + gphoto2 | [] [] [] | + gprof | [] [] | + gpsdrive | () () () | + gramadoir | [] [] | + grep | [] [] [] [] [] [] [] [] [] [] [] | + gretl | [] [] | + gtick | [] [] [] | + hello | [] [] [] [] [] [] [] [] [] [] [] [] [] | + id-utils | [] [] [] [] | + indent | [] [] [] [] [] [] [] [] [] | + iso_3166 | [] [] [] [] [] [] [] | + iso_3166_1 | [] [] [] [] [] | + iso_3166_2 | | + iso_3166_3 | | + iso_4217 | [] [] [] [] [] [] | + iso_639 | | + jpilot | [] () | + jtag | [] | + jwhois | [] [] [] [] | + kbd | [] | + latrine | [] | + ld | [] | + libc | [] [] [] [] [] [] | + libgpewidget | [] [] [] [] | + libiconv | [] [] [] [] [] [] [] [] [] | + lifelines | () | + lilypond | [] | + lingoteach | [] [] | + lingoteach_lessons | | + lynx | [] [] [] [] | + m4 | [] [] [] [] | + mailutils | | + make | [] [] [] [] [] [] | + man-db | () () | + minicom | [] [] [] [] | + mysecretdiary | [] [] | + nano | [] [] [] [] | + nano_1_0 | [] [] [] [] | + opcodes | [] | + parted | [] [] [] | + ptx | [] [] [] [] [] [] [] | + python | | + radius | [] | + recode | [] [] [] [] [] [] | + rpm | [] [] | + screem | | + scrollkeeper | [] | + sed | [] [] [] [] [] [] [] [] [] | + sh-utils | [] [] [] [] [] [] [] | + shared-mime-info | [] [] [] | + sharutils | [] [] [] [] [] | + silky | () [] () () | + skencil | [] | + sketch | [] | + soundtracker | [] [] | + sp | [] () | + tar | [] [] [] [] [] [] [] [] [] | + texinfo | [] [] [] [] | + textutils | [] [] [] [] [] [] | + tin | [] () | + tp-robot | [] | + tuxpaint | [] [] [] [] [] [] [] [] [] | + unicode-han-tra... | | + unicode-transla... | [] [] | + util-linux | [] [] [] [] () [] | + vorbis-tools | [] | + wastesedge | () | + wdiff | [] [] [] [] [] [] | + wget | [] [] [] [] [] [] [] | + xchat | [] [] [] | + xfree86_xkb_xml | [] [] | + xpad | [] [] | + +-------------------------------------------------+ + et eu fa fi fr ga gl he hr hu id is it ja ko lg + 22 2 1 26 106 28 24 8 10 41 33 1 26 33 12 0 + + lt lv mk mn ms mt nb nl nn no nso pl pt pt_BR ro ru + +-----------------------------------------------------+ + a2ps | [] [] () () [] [] [] | + aegis | () () () | + ant-phone | [] [] | + anubis | [] [] [] [] [] [] | + ap-utils | [] () [] | + aspell | [] | + bash | [] [] [] | + batchelor | [] | + bfd | [] | + binutils | [] | + bison | [] [] [] [] [] | + bluez-pin | [] [] [] | + clisp | | + clisp | [] | + console-tools | [] | + coreutils | [] [] | + cpio | [] [] [] [] [] | + darkstat | [] [] [] [] | + diffutils | [] [] [] [] [] [] | + e2fsprogs | [] | + enscript | [] [] [] [] | + error | [] [] [] | + fetchmail | [] [] () [] | + fileutils | [] [] [] | + findutils | [] [] [] [] [] | + flex | [] [] [] [] | + fslint | [] [] | + gas | | + gawk | [] [] [] | + gbiff | [] [] | + gcal | | + gcc | | + gettext | [] [] [] | + gettext-examples | [] [] [] | + gettext-runtime | [] [] [] [] | + gettext-tools | [] [] | + gimp-print | [] | + gliv | [] [] [] | + glunarclock | [] [] [] [] | + gnubiff | [] | + gnucash | [] [] () [] | + gnucash-glossary | [] [] | + gnupg | [] | + gpe-aerial | [] [] [] [] | + gpe-beam | [] [] [] [] | + gpe-calendar | [] [] [] [] | + gpe-clock | [] [] [] [] | + gpe-conf | [] [] [] [] | + gpe-contacts | [] [] [] [] | + gpe-edit | [] [] [] [] | + gpe-go | [] [] [] | + gpe-login | [] [] [] [] | + gpe-ownerinfo | [] [] [] [] | + gpe-sketchbook | [] [] [] [] | + gpe-su | [] [] [] [] | + gpe-taskmanager | [] [] [] [] | + gpe-timesheet | [] [] [] [] | + gpe-today | [] [] [] [] | + gpe-todo | [] [] [] [] | + gphoto2 | [] | + gprof | [] [] | + gpsdrive | () () [] | + gramadoir | () [] | + grep | [] [] [] [] [] | + gretl | | + gtick | [] [] [] | + hello | [] [] [] [] [] [] [] [] [] [] | + id-utils | [] [] [] [] | + indent | [] [] [] [] | + iso_3166 | [] [] [] | + iso_3166_1 | [] [] | + iso_3166_2 | | + iso_3166_3 | [] | + iso_4217 | [] [] [] [] [] [] [] [] | + iso_639 | [] | + jpilot | () () | + jtag | | + jwhois | [] [] [] [] () | + kbd | [] [] [] | + latrine | [] | + ld | | + libc | [] [] [] [] | + libgpewidget | [] [] [] | + libiconv | [] [] [] [] [] | + lifelines | | + lilypond | | + lingoteach | | + lingoteach_lessons | | + lynx | [] [] [] | + m4 | [] [] [] [] [] | + mailutils | [] [] [] | + make | [] [] [] [] | + man-db | [] | + minicom | [] [] [] [] | + mysecretdiary | [] [] [] | + nano | [] [] [] [] [] | + nano_1_0 | [] [] [] [] [] [] | + opcodes | [] [] | + parted | [] [] [] [] | + ptx | [] [] [] [] [] [] [] [] | + python | | + radius | [] [] | + recode | [] [] [] [] | + rpm | [] [] [] | + screem | | + scrollkeeper | [] [] [] [] [] | + sed | [] [] [] | + sh-utils | [] [] | + shared-mime-info | [] [] | + sharutils | [] [] | + silky | () | + skencil | [] [] | + sketch | [] [] | + soundtracker | | + sp | | + tar | [] [] [] [] [] [] | + texinfo | [] [] [] [] | + textutils | [] [] | + tin | | + tp-robot | [] | + tuxpaint | [] [] [] [] [] [] [] [] | + unicode-han-tra... | | + unicode-transla... | | + util-linux | [] [] [] | + vorbis-tools | [] [] [] | + wastesedge | | + wdiff | [] [] [] [] [] | + wget | [] [] [] | + xchat | [] [] [] | + xfree86_xkb_xml | [] [] | + xpad | [] [] | + +-----------------------------------------------------+ + lt lv mk mn ms mt nb nl nn no nso pl pt pt_BR ro ru + 1 2 0 3 12 0 10 69 6 7 1 40 26 36 76 63 + + sk sl sr sv ta th tr uk ven vi wa xh zh_CN zh_TW zu + +-----------------------------------------------------+ + a2ps | [] [] [] [] | 16 + aegis | | 0 + ant-phone | | 3 + anubis | [] [] | 9 + ap-utils | () | 3 + aspell | | 4 + bash | | 9 + batchelor | | 3 + bfd | [] [] | 6 + binutils | [] [] [] | 8 + bison | [] [] | 14 + bluez-pin | [] [] [] | 14 + clisp | | 0 + clisp | | 5 + console-tools | | 3 + coreutils | [] [] [] [] | 16 + cpio | [] [] | 14 + darkstat | [] [] [] () () | 12 + diffutils | [] [] [] | 23 + e2fsprogs | [] [] | 6 + enscript | [] [] | 12 + error | [] [] [] | 15 + fetchmail | [] [] | 11 + fileutils | [] [] [] [] [] | 17 + findutils | [] [] [] [] [] [] | 29 + flex | [] [] | 13 + fslint | | 3 + gas | [] | 3 + gawk | [] [] | 12 + gbiff | | 4 + gcal | [] [] | 4 + gcc | [] | 4 + gettext | [] [] [] [] [] | 16 + gettext-examples | [] [] [] [] [] | 14 + gettext-runtime | [] [] [] [] [] [] [] [] | 22 + gettext-tools | [] [] [] [] [] [] | 14 + gimp-print | [] [] | 10 + gliv | | 3 + glunarclock | [] [] [] | 13 + gnubiff | | 3 + gnucash | [] [] | 9 + gnucash-glossary | [] [] [] | 8 + gnupg | [] [] [] [] | 17 + gpe-aerial | [] | 7 + gpe-beam | [] | 8 + gpe-calendar | [] [] [] [] | 13 + gpe-clock | [] [] [] | 10 + gpe-conf | [] [] | 9 + gpe-contacts | [] [] [] | 11 + gpe-edit | [] [] [] [] [] | 12 + gpe-go | | 5 + gpe-login | [] [] [] [] [] | 13 + gpe-ownerinfo | [] [] [] [] | 13 + gpe-sketchbook | [] [] | 9 + gpe-su | [] [] [] | 10 + gpe-taskmanager | [] [] [] | 10 + gpe-timesheet | [] [] [] [] | 12 + gpe-today | [] [] [] [] [] | 13 + gpe-todo | [] [] [] [] | 12 + gphoto2 | [] [] [] | 11 + gprof | [] [] | 9 + gpsdrive | [] [] | 3 + gramadoir | [] | 5 + grep | [] [] [] [] | 26 + gretl | | 3 + gtick | | 7 + hello | [] [] [] [] [] | 34 + id-utils | [] [] | 12 + indent | [] [] [] [] | 21 + iso_3166 | [] [] [] [] [] [] [] | 27 + iso_3166_1 | [] [] [] | 16 + iso_3166_2 | | 0 + iso_3166_3 | | 2 + iso_4217 | [] [] [] [] [] [] | 24 + iso_639 | | 1 + jpilot | [] [] [] [] [] | 9 + jtag | [] | 2 + jwhois | () [] [] | 11 + kbd | [] [] | 11 + latrine | | 2 + ld | [] [] | 5 + libc | [] [] [] [] | 20 + libgpewidget | [] [] [] [] | 13 + libiconv | [] [] [] [] [] [] [] [] | 27 + lifelines | [] | 2 + lilypond | [] | 3 + lingoteach | | 2 + lingoteach_lessons | () | 0 + lynx | [] [] [] | 14 + m4 | [] [] | 15 + mailutils | | 5 + make | [] [] [] | 16 + man-db | [] | 5 + minicom | | 11 + mysecretdiary | [] [] | 10 + nano | [] [] [] [] | 17 + nano_1_0 | [] [] [] | 17 + opcodes | [] [] | 6 + parted | [] [] [] | 15 + ptx | [] [] | 22 + python | | 0 + radius | | 4 + recode | [] [] [] | 20 + rpm | [] [] | 9 + screem | [] [] | 2 + scrollkeeper | [] [] [] | 15 + sed | [] [] [] [] [] [] | 24 + sh-utils | [] [] | 14 + shared-mime-info | [] [] | 7 + sharutils | [] [] [] [] | 17 + silky | () | 3 + skencil | [] | 6 + sketch | [] | 6 + soundtracker | [] [] | 7 + sp | [] | 3 + tar | [] [] [] [] [] | 24 + texinfo | [] [] [] | 14 + textutils | [] [] [] [] | 16 + tin | | 1 + tp-robot | | 2 + tuxpaint | [] [] [] [] [] | 29 + unicode-han-tra... | | 0 + unicode-transla... | | 2 + util-linux | [] [] | 15 + vorbis-tools | | 8 + wastesedge | | 0 + wdiff | [] [] [] | 18 + wget | [] [] [] [] [] [] [] [] | 24 + xchat | [] [] [] [] [] | 15 + xfree86_xkb_xml | [] [] [] [] [] | 11 + xpad | | 5 + +-----------------------------------------------------+ + 63 teams sk sl sr sv ta th tr uk ven vi wa xh zh_CN zh_TW zu + 131 domains 47 19 28 83 0 0 59 13 1 1 11 0 22 22 0 1373 + + Some counters in the preceding matrix are higher than the number of +visible blocks let us expect. This is because a few extra PO files are +used for implementing regional variants of languages, or language +dialects. + + For a PO file in the matrix above to be effective, the package to +which it applies should also have been internationalized and +distributed as such by its maintainer. There might be an observable +lag between the mere existence a PO file and its wide availability in a +distribution. + + If January 2004 seems to be old, you may fetch a more recent copy of +this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date +matrix with full percentage details can be found at +`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'. + +Using `gettext' in new packages +=============================== + +If you are writing a freely available program and want to +internationalize it you are welcome to use GNU `gettext' in your +package. Of course you have to respect the GNU Library General Public +License which covers the use of the GNU `gettext' library. This means +in particular that even non-free programs can use `libintl' as a shared +library, whereas only free software can use `libintl' as a static +library or use modified versions of `libintl'. + + Once the sources are changed appropriately and the setup can handle +the use of `gettext' the only thing missing are the translations. The +Free Translation Project is also available for packages which are not +developed inside the GNU project. Therefore the information given above +applies also for every other Free Software Project. Contact +`translation@iro.umontreal.ca' to make the `.pot' files available to +the translation teams. + diff --git a/comp-slp/AUTHORS b/comp-slp/AUTHORS new file mode 100644 index 0000000..dbcd77c --- /dev/null +++ b/comp-slp/AUTHORS @@ -0,0 +1,31 @@ +The Rasterman (Carsten Haitzler) +Ibukun Olumuyiwa +Sebastian Dransfeld +HandyAndE (Andrew Williams) +CodeWarrior (Hisham Mardam Bey) +dj2 (Dan Sinclair) +Tilman Sauerbeck +Aleksej Struk +Brian Mattern +devilhorns (Christopher Michael) +/dev/urandom (Viktor Kojouharov) +ilLogict (Chidambar Zinnoury) +Stafford Horne +Cedric Bail +onefang (David Seikel) +okra (Stephen Houston) +Byron Hillis +Ravenlock (Eric Schuele) +ManoWarrior (Luchezar Petkov) +morlenxus (Brian Miculcy) +Toma- (Tom Haste) +k-s (Gustavo Sverzut Barbieri) +Peter van de Werken +Florian Hackenberger +Hannes Janetzek +Mike Blumenkrantz (discomfitor/zmike) +Leif Middelschulte +yoz (Michael Bouchaud) +Gwanglim Lee +Gwangyeong Mun +Duna Oh diff --git a/comp-slp/COPYING b/comp-slp/COPYING new file mode 100644 index 0000000..7625f00 --- /dev/null +++ b/comp-slp/COPYING @@ -0,0 +1,25 @@ +Copyright notice for Enlightenment: + +Copyright (C) 2000-2011 Carsten Haitzler and various contributors (see AUTHORS) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, +OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/comp-slp/ChangeLog b/comp-slp/ChangeLog new file mode 100644 index 0000000..e69de29 diff --git a/comp-slp/INSTALL b/comp-slp/INSTALL new file mode 100644 index 0000000..8b82ade --- /dev/null +++ b/comp-slp/INSTALL @@ -0,0 +1,291 @@ +Installation Instructions +************************* + +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, +2006, 2007, 2008 Free Software Foundation, Inc. + + This file is free documentation; the Free Software Foundation gives +unlimited permission to copy, distribute and modify it. + +Basic Installation +================== + + Briefly, the shell commands `./configure; make; make install' should +configure, build, and install this package. The following +more-detailed instructions are generic; see the `README' file for +instructions specific to this package. + + 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 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. + + Running `configure' might take a while. 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. + + 6. Often, you can also type `make uninstall' to remove the installed + files again. + +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=c99 CFLAGS=-g 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 can use 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 `..'. + + With a non-GNU `make', it is safer 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. + + On MacOS X 10.5 and later systems, you can create libraries and +executables that work on multiple system types--known as "fat" or +"universal" binaries--by specifying multiple `-arch' options to the +compiler but only a single `-arch' option to the preprocessor. Like +this: + + ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CPP="gcc -E" CXXCPP="g++ -E" + + This is not guaranteed to produce working output in all cases, you +may have to build one architecture at a time and combine the results +using the `lipo' tool if you have problems. + +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. + +Particular systems +================== + + On HP-UX, the default C compiler is not ANSI C compatible. If GNU +CC is not installed, it is recommended to use the following options in +order to use an ANSI C compiler: + + ./configure CC="cc -Ae" + +and if that doesn't work, install pre-built binaries of GCC for HP-UX. + + On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot +parse its `' header file. The option `-nodtk' can be used as +a workaround. If GNU CC is not installed, it is therefore recommended +to try + + ./configure CC="cc" + +and if that doesn't work, try + + ./configure CC="cc -nodtk" + +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). + +Unfortunately, this technique does not work for `CONFIG_SHELL' due to +an Autoconf bug. Until the bug is fixed you can use this workaround: + + CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash + +`configure' Invocation +====================== + + `configure' recognizes the following options to control how it +operates. + +`--help' +`-h' + Print a summary of all of the options to `configure', and exit. + +`--help=short' +`--help=recursive' + Print a summary of the options unique to this package's + `configure', and exit. The `short' variant lists options used + only in the top level, while the `recursive' variant lists options + also present in any nested packages. + +`--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. + +`--prefix=DIR' + Use DIR as the installation prefix. *Note Installation Names:: + for more details, including other options available for fine-tuning + the installation locations. + +`--no-create' +`-n' + Run the configure checks, but stop before creating any output + files. + +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. + diff --git a/comp-slp/Makefile.am b/comp-slp/Makefile.am new file mode 100644 index 0000000..920e222 --- /dev/null +++ b/comp-slp/Makefile.am @@ -0,0 +1,19 @@ +ACLOCAL_AMFLAGS = -I m4 +MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess config.h.in \ + config.sub configure depcomp install-sh ltmain.sh \ + missing module.desktop config.rpath mkinstalldirs + +SUBDIRS = src \ +data + +filesdir = $(datadir) +files_DATA = module.desktop + +EXTRA_DIST = module.desktop.in + +clean-local: + rm -rf module.desktop *~ + +uninstall: + rm -rf $(DESTDIR)$(datadir) + diff --git a/comp-slp/NEWS b/comp-slp/NEWS new file mode 100644 index 0000000..e69de29 diff --git a/comp-slp/README b/comp-slp/README new file mode 100644 index 0000000..e69de29 diff --git a/comp-slp/autogen.sh b/comp-slp/autogen.sh new file mode 100755 index 0000000..67a19c2 --- /dev/null +++ b/comp-slp/autogen.sh @@ -0,0 +1,14 @@ +#!/bin/sh +# Run this to generate all the initial makefiles, etc. + +rm -rf autom4te.cache +rm -f aclocal.m4 ltmain.sh + +#echo "Running autopoint..." ; autopoint -f || : +echo "Running aclocal..." ; aclocal -I m4 $ACLOCAL_FLAGS || exit 1 +echo "Running autoconf..." ; autoconf || exit 1 +echo "Running autoheader..." ; autoheader || exit 1 +echo "Running libtoolize..." ; (libtoolize --copy --automake || glibtoolize --automake) || exit 1 +echo "Running automake..." ; automake --add-missing --copy --gnu || exit 1 + + diff --git a/comp-slp/configure.ac b/comp-slp/configure.ac new file mode 100644 index 0000000..6c355af --- /dev/null +++ b/comp-slp/configure.ac @@ -0,0 +1,69 @@ +dnl Process this file with autoconf to produce a configure script. + +# get rid of that stupid cache mechanism +rm -f config.cache + +AC_INIT(comp-slp, 0.1, gl77.lee@samsung.com) +AC_PREREQ(2.52) +AC_CONFIG_SRCDIR(configure.ac) +AC_CANONICAL_BUILD +AC_CANONICAL_HOST +AC_ISC_POSIX + +AM_INIT_AUTOMAKE(1.8) +AM_CONFIG_HEADER(config.h) +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) + +AC_PROG_CC +AM_PROG_CC_STDC +AM_PROG_CC_C_O +AC_HEADER_STDC +AC_C_CONST +AC_C___ATTRIBUTE__ + +define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl +define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl +AC_PROG_LIBTOOL + +#AM_GNU_GETTEXT([external]) +#AM_GNU_GETTEXT_VERSION(0.14) + +PKG_CHECK_MODULES(ENLIGHTENMENT, [enlightenment,utilX,dlog]) +AC_SUBST(ENLIGHTENMENT_CFLAGS) +AC_SUBST(ENLIGHTENMENT_LIBS) + +AC_CHECK_LIB(dl, dlopen, dlopen_libs=-ldl) +AC_SUBST(dlopen_libs) + +release=$(pkg-config --variable=release enlightenment) +MODULE_ARCH="$host_os-$host_cpu-$release" +AC_SUBST(MODULE_ARCH) +AC_DEFINE_UNQUOTED(MODULE_ARCH, "$MODULE_ARCH", "Module architecture") + +# Find edje_cc +PKG_CHECK_MODULES(EDJE, [edje >= 1.0.0]) +AC_ARG_WITH(edje-cc, + AC_HELP_STRING([--with-edje-cc=PATH], [specify a specific path to edje_cc]), + [ + v=$withval; + EDJE_CC=$v + ],[ + EDJE_CC=$(pkg-config --variable=prefix edje)/bin/edje_cc + ] +) +AC_SUBST(EDJE_CC) +AC_MSG_CHECKING([Which edje_cc to use]) +AC_MSG_RESULT(${EDJE_CC}) + +datadir=$(pkg-config --variable=modules enlightenment)/${PACKAGE} +AC_ARG_ENABLE(homedir-install, + AS_HELP_STRING([--enable-homedir-install], [Install module in homedir]), + [ datadir="${HOME}/.e/e/modules/${PACKAGE}" ] +) + +AC_CONFIG_FILES([Makefile + module.desktop + src/Makefile + data/Makefile]) +AC_OUTPUT + diff --git a/comp-slp/data/Makefile.am b/comp-slp/data/Makefile.am new file mode 100644 index 0000000..ac8afc9 --- /dev/null +++ b/comp-slp/data/Makefile.am @@ -0,0 +1,20 @@ +MAINTAINERCLEANFILES = Makefile.in + +EDJE_CC = @EDJE_CC@ +EDJE_FLAGS = -v \ +-id $(top_srcdir)/data/images + +filesdir = /usr/share/enlightenment/data/themes +files_DATA = \ +shadow.edj + +EXTRA_DIST = \ +shadow.edc + +shadow.edj: Makefile $(EXTRA_DIST) + $(EDJE_CC) $(EDJE_FLAGS) \ + $(top_srcdir)/data/shadow.edc \ + $(top_builddir)/data/shadow.edj + +clean-local: + rm -f *.edj diff --git a/comp-slp/data/common/comp-config.edc b/comp-slp/data/common/comp-config.edc new file mode 100644 index 0000000..a8c822c --- /dev/null +++ b/comp-slp/data/common/comp-config.edc @@ -0,0 +1,11 @@ +#define DEBUG 0 +#define USE_LOGGER 0 + +#define USE_RESIZE_FOR_WND_ROT 1 +#define USE_ORI 1 + +#define DURATION_WND_ROT_PREV_PIXMAP_CLIPPER_HIDE SINUSOIDAL 0.3 +#define DURATION_WND_ROT_PREV_PIXMAP_SWALLOW_HIDE SINUSOIDAL 0.3 + +#define DURATION_WND_ROT_CLIPPER_HIDE_TO_SHOW SINUSOIDAL 0.3 +#define DURATION_WND_ROT_SWALLOW_DEG_TO_ZERO DECELERATE 0.3 diff --git a/comp-slp/data/common/comp-image.edc b/comp-slp/data/common/comp-image.edc new file mode 100644 index 0000000..de76585 --- /dev/null +++ b/comp-slp/data/common/comp-image.edc @@ -0,0 +1,4 @@ +images { + image: "comp-sh1.png" COMP; + image: "bt_glow.png" COMP; +} diff --git a/comp-slp/data/common/comp-part-clipper.edc b/comp-slp/data/common/comp-part-clipper.edc new file mode 100644 index 0000000..a098e35 --- /dev/null +++ b/comp-slp/data/common/comp-part-clipper.edc @@ -0,0 +1,17 @@ +part { name: "clipper"; + type: RECT; + mouse_events: 0; + description { state: "default" 0.0; + visible: 0; + color: 0 0 0 0; + rel1.relative: -1.0 -1.0; + rel1.offset: -9999 -9999; + rel2.relative: 2.0 2.0; + rel2.offset: 9999 9999; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 255; + } +} /* end of part "clipper" */ diff --git a/comp-slp/data/common/comp-part-logger.edc b/comp-slp/data/common/comp-part-logger.edc new file mode 100644 index 0000000..a64d289 --- /dev/null +++ b/comp-slp/data/common/comp-part-logger.edc @@ -0,0 +1,21 @@ +#if USE_LOGGER +part { name: "logger"; + type: TEXTBLOCK; + mouse_events: 0; + scale: 1; + description { state: "default" 0.0; + visible: 0; + color: 0 0 0 0; + rel1.relative: 0.02 0.02; + rel2.relative: 0.98 0.98; + text { + style: "textblock_style"; + } + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 255; + } +} /* end of part "logger" */ +#endif diff --git a/comp-slp/data/common/comp-part-persp.edc b/comp-slp/data/common/comp-part-persp.edc new file mode 100644 index 0000000..dc62382 --- /dev/null +++ b/comp-slp/data/common/comp-part-persp.edc @@ -0,0 +1,18 @@ +part { name: "persp"; + type: RECT; + description { state: "default" 0.0; + min: 1 1; + max: 1 1; + visible: 0; + perspective.zplane: 0; + perspective.focal: 1000; + } + description { state: "zoom-out" 0.0; + inherit: "default" 0.0; + perspective.zplane: -150; + } + description { state: "zoom-in" 0.0; + inherit: "default" 0.0; + perspective.zplane: 150; + } +} /* end of part "persp" */ diff --git a/comp-slp/data/common/comp-part-shower.edc b/comp-slp/data/common/comp-part-shower.edc new file mode 100644 index 0000000..ce2088f --- /dev/null +++ b/comp-slp/data/common/comp-part-shower.edc @@ -0,0 +1,26 @@ +part { name: "shower"; + type: RECT; + mouse_events: 0; + description { state: "default" 0.0; + visible: 0; + rel1.relative: 0 0; + rel1.offset: 0 0; + rel2.relative: 1 1; + map { + on: 1; + perspective_on: 1; + perspective: "persp"; + rotation.z: 0.0; + } + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + rel1.relative: 0 0; + rel2.relative: 1 1; + } + description { state: "invisible" 0.0; + inherit: "default" 0.0; + rel1.relative: 0 0; + rel2.relative: 0 0; + } +} /* end of part "shower" */ diff --git a/comp-slp/data/common/comp-part-swallow-rotation-on-effect-for-win.edc b/comp-slp/data/common/comp-part-swallow-rotation-on-effect-for-win.edc new file mode 100644 index 0000000..ad75b49 --- /dev/null +++ b/comp-slp/data/common/comp-part-swallow-rotation-on-effect-for-win.edc @@ -0,0 +1,64 @@ +description { state: "default-visible" 0.0; + inherit: "default" 0.0; + map { + on: 1; + smooth: 1; + backface_cull: 0; + perspective_on: 1; + perspective: "persp"; + rotation.x: 0; + rotation.y: 0; + rotation.z: 0; + } +} +description { state: "visible-rotation--270" 0.0; + inherit: "default-visible" 0.0; + map.perspective: "persp"; + map.rotation.z: -270; +} +description { state: "visible-rotation--180" 0.0; + inherit: "default-visible" 0.0; + map.perspective: "persp"; + map.rotation.z: -180; +} +description { state: "visible-rotation--90" 0.0; + inherit: "default-visible" 0.0; + map { + on: 1; + smooth: 1; + backface_cull: 0; + perspective_on: 1; + perspective: "persp"; + rotation.x: 0; + rotation.y: 0; + rotation.z: -90; + } +} +description { state: "visible-rotation-0" 0.0; + inherit: "default-visible" 0.0; + map.perspective: "persp"; + map.rotation.z: 0; +} +description { state: "visible-rotation-90" 0.0; + inherit: "default-visible" 0.0; + map { + on: 1; + smooth: 1; + backface_cull: 0; + perspective_on: 1; + perspective: "persp"; + rotation.x: 0; + rotation.y: 0; + rotation.z: 90; + } +} +description { state: "visible-rotation-180" 0.0; + inherit: "default-visible" 0.0; + map.perspective: "persp"; + map.rotation.z: 180; +} +description { state: "visible-rotation-270" 0.0; + inherit: "default-visible" 0.0; + map.perspective: "persp"; + map.rotation.z: 270; +} diff --git a/comp-slp/data/common/comp-part-swallow.edc b/comp-slp/data/common/comp-part-swallow.edc new file mode 100644 index 0000000..2151842 --- /dev/null +++ b/comp-slp/data/common/comp-part-swallow.edc @@ -0,0 +1,22 @@ +part { name: "e.swallow.content"; + type: SWALLOW; + clip_to: "clipper"; + mouse_events: 0; + description { state: "default" 0.0; + rel1.relative: 0 0; + rel1.offset: 0 0; + rel1.to: "shower"; + rel2.relative: 1 1; + rel2.to: "shower"; + map { + on: 1; + perspective_on: 1; + perspective: "persp"; + rotation.z: 0.0; + } + } + description { state: "visible-rot-0" 0.0; inherit: "default" 0.0; map.rotation.z: 0.0; } + description { state: "visible-rot-90" 0.0; inherit: "default" 0.0; map.rotation.z: 90.0; } + description { state: "visible-rot-180" 0.0; inherit: "default" 0.0; map.rotation.z: 180.0; } + description { state: "visible-rot-270" 0.0; inherit: "default" 0.0; map.rotation.z: 270.0; } +} /* end of part "e.swallow.content" */ diff --git a/comp-slp/data/common/comp-prog-hide-rotation-no-effect.edc b/comp-slp/data/common/comp-prog-hide-rotation-no-effect.edc new file mode 100644 index 0000000..59f37e7 --- /dev/null +++ b/comp-slp/data/common/comp-prog-hide-rotation-no-effect.edc @@ -0,0 +1,28 @@ +program { name: "prog-hide-rot-0"; + signal: "e,state,visible,off"; + source: "e.rot.0"; + action: STATE_SET "visible-rot-0" 0.0; + target: "e.swallow.content"; + after : "prog-emit-hide-done"; +} +program { name: "prog-hide-rot-90"; + signal: "e,state,visible,off"; + source: "e.rot.90"; + action: STATE_SET "visible-rot-90" 0.0; + target: "e.swallow.content"; + after : "prog-emit-hide-done"; +} +program { name: "prog-hide-rot-180"; + signal: "e,state,visible,off"; + source: "e.rot.180"; + action: STATE_SET "visible-rot-180" 0.0; + target: "e.swallow.content"; + after : "prog-emit-hide-done"; +} +program { name: "prog-hide-rot-270"; + signal: "e,state,visible,off"; + source: "e.rot.270"; + action: STATE_SET "visible-rot-270" 0.0; + target: "e.swallow.content"; + after : "prog-emit-hide-done"; +} diff --git a/comp-slp/data/common/comp-prog-logger-on-off.edc b/comp-slp/data/common/comp-prog-logger-on-off.edc new file mode 100644 index 0000000..8ae3d48 --- /dev/null +++ b/comp-slp/data/common/comp-prog-logger-on-off.edc @@ -0,0 +1,10 @@ +#if USE_LOGGER +program { name: "prog-logger-enable"; + action: STATE_SET "visible" 0.0; + target: "logger"; +} +program { name: "prog-logger-disable"; + action: STATE_SET "default" 0.0; + target: "logger"; +} +#endif /* end of USE_LOGGER */ diff --git a/comp-slp/data/common/comp-prog-rotation-on-effect-for-win.edc b/comp-slp/data/common/comp-prog-rotation-on-effect-for-win.edc new file mode 100644 index 0000000..d499c15 --- /dev/null +++ b/comp-slp/data/common/comp-prog-rotation-on-effect-for-win.edc @@ -0,0 +1,59 @@ +program { name: "prog-window-rotation--270"; + signal: "e,state,window,rotation,-270"; + source: "e"; + action: STATE_SET "visible-rotation--270" 0.0; + target: "e.swallow.content"; + after: "prog-window-rotation-0-done"; +} +program { name: "prog-window-rotation--180"; + signal: "e,state,window,rotation,-180"; + source: "e"; + action: STATE_SET "visible-rotation--180" 0.0; + target: "e.swallow.content"; + after: "prog-window-rotation-0-done"; +} +program { name: "prog-window-rotation--90"; + signal: "e,state,window,rotation,-90"; + source: "e"; + action: STATE_SET "visible-rotation--90" 0.0; + target: "e.swallow.content"; + after: "prog-window-rotation-0-done"; +} +program { name: "prog-window-rotation-0"; + signal: "e,state,window,rotation,0"; + source: "e"; + action: STATE_SET "visible-rotation-0" 0.0; + target: "e.swallow.content"; + after: "prog-window-rotation-0-done"; +} +program { name: "prog-window-rotation-90"; + signal: "e,state,window,rotation,90"; + source: "e"; + action: STATE_SET "visible-rotation-90" 0.0; + target: "e.swallow.content"; + after: "prog-window-rotation-0-done"; +} +program { name: "prog-window-rotation-180"; + signal: "e,state,window,rotation,180"; + source: "e"; + action: STATE_SET "visible-rotation-180" 0.0; + target: "e.swallow.content"; + after: "prog-window-rotation-0-done"; +} +program { name: "prog-window-rotation-270"; + signal: "e,state,window,rotation,270"; + source: "e"; + action: STATE_SET "visible-rotation-270" 0.0; + target: "e.swallow.content"; + after: "prog-window-rotation-0-done"; +} + +program { name: "prog-window-rotation-0-done"; + action: STATE_SET "visible-rotation-0" 0.0; + target: "e.swallow.content"; + transition: DURATION_WND_ROT_SWALLOW_DEG_TO_ZERO; + after: "prog-emit-window-rotation-done"; +} +program { name: "prog-emit-window-rotation-done"; + action: SIGNAL_EMIT "e,action,window,rotation,done" "e"; +} diff --git a/comp-slp/data/common/comp-prog-rotation-on-no-effect.edc b/comp-slp/data/common/comp-prog-rotation-on-no-effect.edc new file mode 100644 index 0000000..a5979af --- /dev/null +++ b/comp-slp/data/common/comp-prog-rotation-on-no-effect.edc @@ -0,0 +1,36 @@ +program { name: "prog-rot-0"; + signal: "e,state,rotation,on"; + source: "e.rot.0"; + after : "prog-emit-rotation-done"; + script { + set_curr_window_ang(0) + window_rotation(0) + } +} +program { name: "prog-rot-90"; + signal: "e,state,rotation,on"; + source: "e.rot.90"; + after : "prog-emit-rotation-done"; + script { + set_curr_window_ang(90) + window_rotation(0) + } +} +program { name: "prog-rot-180"; + signal: "e,state,rotation,on"; + source: "e.rot.180"; + after : "prog-emit-rotation-done"; + script { + set_curr_window_ang(180) + window_rotation(0) + } +} +program { name: "prog-rot-270"; + signal: "e,state,rotation,on"; + source: "e.rot.270"; + after : "prog-emit-rotation-done"; + script { + set_curr_window_ang(270) + window_rotation(0) + } +} diff --git a/comp-slp/data/common/comp-prog-show-rotation-no-effect.edc b/comp-slp/data/common/comp-prog-show-rotation-no-effect.edc new file mode 100644 index 0000000..09ba778 --- /dev/null +++ b/comp-slp/data/common/comp-prog-show-rotation-no-effect.edc @@ -0,0 +1,48 @@ +program { name: "prog-show-rot-0"; + signal: "e,state,visible,on"; + source: "e.rot.0"; + action: STATE_SET "default" 0.0; + target: "e.swallow.content"; + //after: "prog-emit-show-done"; + after: "prog-emit-rotation-done"; + script { + set_curr_window_ang(0) + window_rotation(0) + } +} +program { name: "prog-show-rot-90"; + signal: "e,state,visible,on"; + source: "e.rot.90"; + action: STATE_SET "default" 0.0; + target: "e.swallow.content"; + //after: "prog-emit-show-done"; + after: "prog-emit-rotation-done"; + script { + set_curr_window_ang(90) + window_rotation(0) + } +} +program { name: "prog-show-rot-180"; + signal: "e,state,visible,on"; + source: "e.rot.180"; + action: STATE_SET "default" 0.0; + target: "e.swallow.content"; + //after: "prog-emit-show-done"; + after: "prog-emit-rotation-done"; + script { + set_curr_window_ang(180) + window_rotation(0) + } +} +program { name: "prog-show-rot-270"; + signal: "e,state,visible,on"; + source: "e.rot.270"; + action: STATE_SET "default" 0.0; + target: "e.swallow.content"; + //after: "prog-emit-show-done"; + after: "prog-emit-rotation-done"; + script { + set_curr_window_ang(270) + window_rotation(0) + } +} diff --git a/comp-slp/data/common/comp-prog-signal-emit.edc b/comp-slp/data/common/comp-prog-signal-emit.edc new file mode 100755 index 0000000..87df5fa --- /dev/null +++ b/comp-slp/data/common/comp-prog-signal-emit.edc @@ -0,0 +1,33 @@ +program { name: "prog-emit-show-done"; + action: SIGNAL_EMIT "e,action,show,done" "e"; +} +program { name: "prog-emit-hide-done"; + action: SIGNAL_EMIT "e,action,hide,done" "e"; +} +program { name: "prog-emit-move-done"; + action: SIGNAL_EMIT "e,action,move,done" "e"; +} +program { name: "prog-emit-restack-done"; + action: SIGNAL_EMIT "e,action,restack,done" "e"; +} +program { name: "prog-emit-raise-above-1-done"; + action: SIGNAL_EMIT "e,action,raise_above1,done" "e"; +} +program { name: "prog-emit-raise-above-2-done"; + action: SIGNAL_EMIT "e,action,raise_above2,done" "e"; +} +program { name: "prog-emit-raise-above-3-done"; + action: SIGNAL_EMIT "e,action,raise_above3,done" "e"; +} +program { name: "prog-emit-raise-above-hide-done"; + action: SIGNAL_EMIT "e,action,raise_above_hide,done" "e"; +} +program { name: "prog-emit-rotation-done"; + action: SIGNAL_EMIT "e,action,rotation,done" "e"; +} +program { name: "prog-emit-bg-show-done"; + action: SIGNAL_EMIT "e,action,background,show,done" "e"; +} +program { name: "prog-emit-bg-hide-done"; + action: SIGNAL_EMIT "e,action,background,hide,done" "e"; +} diff --git a/comp-slp/data/common/comp-script.edc b/comp-slp/data/common/comp-script.edc new file mode 100644 index 0000000..86275ca --- /dev/null +++ b/comp-slp/data/common/comp-script.edc @@ -0,0 +1,96 @@ +/* ----------------------------------------------------------------------------*/ +/* embryo script for logger and rotation */ +/* ----------------------------------------------------------------------------*/ +script { + +#if USE_LOGGER + public logger_enable = 0; + public logno = 0; + + public set_logging(on) { + set_int(logger_enable, on); + } + + public log_msg(Msg_Type:type, ...) { + if (get_int(logger_enable) == 1) { + if (type == MSG_STRING) { + new msg[200]; + getsarg(1, msg, 200); + strcat(msg, "
"); + + new logno_str[10]; + new no = get_int(logno); + snprintf(logno_str, 10, "[%i] ", no); + strprep(msg, logno_str); + + new str[1024]; + get_text(PART:"logger", str, 1024); + + strprep(str, msg); + set_text(PART:"logger", str); + + set_int(logno, no+1); + } + } + } +#endif /* end of USE_LOGGER */ + + public prev_window_ang = 0; + public curr_window_ang = 0; + + public set_curr_window_ang(ang) { + set_int(curr_window_ang, ang); + } + + public window_rotation(do_effect) { + new prev_ang; + new curr_ang; + new diff_ang; + new x, y, w, h; + new rect_w, rect_h; + + prev_ang = get_int(prev_window_ang); + curr_ang = get_int(curr_window_ang); + + get_geometry(PART:"shower", x, y, w, h); + +#if USE_LOGGER + new str[200]; + snprintf(str, 200, "window_rotation() %i,%i %ix%i %i->%i", x, y, w, h, prev_ang, curr_ang); + log_msg(MSG_STRING, str); +#endif /* end of USE_LOGGER */ + + diff_ang = prev_ang - curr_ang; + + if (diff_ang == 180 || diff_ang == -180) { + rect_w = w; + rect_h = h; + } + else if (diff_ang == 0) { + rect_w = w; + rect_h = h; + } + else { + rect_w = h; + rect_h = w; + } + + custom_state(PART:"shower", "default", 0.0); + set_state_val(PART:"shower", STATE_MIN, rect_w, rect_h); + set_state_val(PART:"shower", STATE_MAX, rect_w, rect_h); + set_state_val(PART:"shower", STATE_MAP_ROT_Z, curr_ang*1.0); + set_state(PART:"shower", "custom", 0.0); + + custom_state(PART:"e.swallow.content", "default", 0.0); + if (do_effect) { + set_state_val(PART:"e.swallow.content", STATE_MAP_ROT_Z, prev_ang*1.0); + } + else { + set_state_val(PART:"e.swallow.content", STATE_MAP_ROT_Z, curr_ang*1.0); + } + set_state(PART:"e.swallow.content", "custom", 0.0); + + set_int(prev_window_ang, curr_ang); + } + +} /* end of script */ diff --git a/comp-slp/data/common/comp-style.edc b/comp-slp/data/common/comp-style.edc new file mode 100644 index 0000000..17df5bb --- /dev/null +++ b/comp-slp/data/common/comp-style.edc @@ -0,0 +1,9 @@ +styles { + /* common text block style for logger */ + style { name: "textblock_style"; + base: "font=Sans font_size=20 align=left color=#ff0c0c wrap=word"; + tag: "br" "\n"; + tag: "b" "+ font=Sans:style=Bold"; + tag: "tab" "\t"; + } +} /* end of styles */ diff --git a/comp-slp/data/group/capture_effect.edc b/comp-slp/data/group/capture_effect.edc new file mode 100644 index 0000000..6137d73 --- /dev/null +++ b/comp-slp/data/group/capture_effect.edc @@ -0,0 +1,99 @@ + /*-----------------------------------------------------*/ + /* group "capture_effect" */ + /*-----------------------------------------------------*/ + group { name: "capture_effect"; + images { + image: "capture.png" COMP; + } + parts { + part { name: "clipper"; + type: RECT; + mouse_events: 0; + description { state: "default" 0.0; + visible: 1; + color: 255 255 255 20; + rel1 { + relative: -2.0 -2.0; + offset: -9999 -9999; + } + rel2 { + relative: 2.0 2.0; + offset: 9999 9999; + } + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 128; + } + } + part { name: "shower"; + type: RECT; + mouse_events: 0; + description { state: "default" 0.0; + visible: 0; + rel1 { + relative: -0.6 -0.6; + } + rel2 { + relative: 1.6 1.6; + } + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + rel1 { + relative: 0.0 0.0; + } + rel2 { + relative: 1.0 1.0; + } + } + } + part { name: "capture_image"; + type: IMAGE; + clip_to: "clipper"; + mouse_events: 0; + description { state: "default" 0.0; + image.normal: "capture.png"; + rel1.to: "shower"; + rel2.to: "shower"; + } + description { state: "visible" 0.0; + image.normal: "capture.png"; + rel1.to: "shower"; + rel2.to: "shower"; + } + } + } + programs { + program { name: "capture-effect1"; + signal: "img,state,capture,on"; + source: "img"; + action: STATE_SET "default" 0.0; + target: "clipper"; + target: "shower"; + target: "capture_image"; + after: "capture-effect2"; + } + program { name: "capture-effect2"; + action: STATE_SET "visible" 0.0; + //transition: ACCELERATE 0.15; + transition: DECELERATE 0.15; + target: "clipper"; + target: "shower"; + after: "capture-effect3"; + } + program { name: "capture-effect3"; + action: STATE_SET "default" 0.0; + //transition: DECELERATE 0.15; + transition: ACCELERATE 0.15; + target: "clipper"; + target: "shower"; + after: "capture-effect4"; + } + + program { name: "capture-effect4"; + action: SIGNAL_EMIT "img,capture,show,done" "img"; + } + } + } /* end of group "testgroup" */ diff --git a/comp-slp/data/group/dialog.edc b/comp-slp/data/group/dialog.edc new file mode 100644 index 0000000..9b08bb6 --- /dev/null +++ b/comp-slp/data/group/dialog.edc @@ -0,0 +1,595 @@ +/*-----------------------------------------------------*/ +/* group "dialog" */ +/*-----------------------------------------------------*/ +group { name: "dialog"; + images { + image: "comp-sh1.png" COMP; + image: "bt_glow.png" COMP; + } + parts { + part { name: "clipper"; + type: RECT; + mouse_events: 0; + description { state: "default" 0.0; + visible: 0; + color: 0 0 0 0; + rel1 { + relative: -1.0 -1.0; + offset: -9999 -9999; + } + rel2 { + relative: 2.0 2.0; + offset: 9999 9999; + } + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 255; + } + description { state: "visible" 1.0; + inherit: "visible" 0.0; + } + description { state: "switcher" 0.0; + inherit: "visible" 0.0; + visible: 1; + color: 255 255 255 255; + } + description { state: "default" 1.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 255; + } + description { state: "default" 0.5; + inherit: "default" 0.0; + visible: 0; + color: 0 0 0 0; + } + } + part { name: "shower"; + type: RECT; + mouse_events: 0; + description { state: "default" 0.0; + visible: 0; + rel1 { + relative: 0.35 0.35; + } + rel2 { + relative: 0.65 0.65; + } + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + rel1 { + relative: 0.0 0.0; + offset: 0 0; + } + rel2 { + relative: 1.0 1.0; + } + } + description { state: "visible" 1.0; + inherit: "visible" 0.0; + } + description { state: "switcher" 0.0; + inherit: "default" 0.0; + rel1 { + relative: 0.0 0.0; + offset: 0 0; + } + rel2 { + relative: 1.0 1.0; + } + } + description { state: "indicator_raise_above" 0.0; + inherit : "default" 0.0; + rel1 { + relative: 0.0 0.0; + offset: 0 0; + } + rel2 { + relative: 1.0 1.0; + } + } + description { state: "indicator_raise_above" 0.1; + inherit : "default" 0.0; + rel1 { + relative: 0.0 -1.0; + offset: 0 0; + } + rel2 { + relative: 1.0 0.0; + } + } + } + part { name: "persp"; + type: RECT; + description { state: "default" 0.0; + min: 10 10; + max: 10 10; + visible: 0; + perspective.zplane: 0; + perspective.focal: 1000; + } + description { state: "visible" 1.0; + inherit: "default" 0.0; + perspective.zplane: 0; + perspective.focal: 1000; + } + description { state: "switcher" 0.0; + inherit: "default" 0.0; + perspective.zplane: -500; + perspective.focal: 1000; + } + description { state: "switcher2" 0.0; + inherit: "default" 0.0; + perspective.zplane: -500; + perspective.focal: 1000; + } + } + part { name: "dim"; + type: RECT; + mouse_events: 0; + description { state: "default" 0.0; + visible: 1; + color: 0 0 0 0; + rel1.relative: 0 0; + rel2.relative: 1.0 1.0; + } + description { state: "visible" 0.0; + visible: 1; + color: 0 0 0 180; + rel1.relative: 0 0; + rel2.relative: 1.0 1.0; + } + description { state: "hide" 0.0; + inherit: "default" 0.0; + } + description { state: "switcher" 0.0; + visible: 1; + color: 0 0 0 180; + rel1 { + to: "shower"; + relative: 0.0 0.0; + } + rel2 { + to: "shower"; + relative: 1.0 1.0; + } + map { + on: 1; + smooth: 1; + backface_cull: 0; + perspective_on: 1; + alpha: 1; + rotation { + x: 0; + y: 75; + z: 0; + } + } + perspective { + zplane: -500; + focal: 1000; + } + } + description { state: "switcher2" 0.0; + visible: 1; + color: 0 0 0 180; + rel1 { + to: "shower"; + relative: 0.0 0.0; + } + rel2 { + to: "shower"; + relative: 1.0 1.0; + } + map { + on: 1; + smooth: 1; + backface_cull: 0; + perspective_on: 1; + alpha: 1; + rotation { + x: 0; + y: 45; + z: 0; + } + } + perspective { + zplane: -500; + focal: 1000; + } + } + description { state: "visible" 1.0; + visible: 1; + color: 0 0 0 180; + rel1 { + to: "shower"; + relative: 0.0 0.0; + } + rel2 { + to: "shower"; + relative: 1.0 1.0; + } + map { + on: 1; + smooth: 1; + backface_cull: 0; + perspective_on: 1; + alpha: 1; + rotation { + x: 0; + y: 0; + z: 0; + } + } + perspective { + zplane: 0; + focal: 1000; + } + } + } + part { name: "e.swallow.content"; + type: SWALLOW; + clip_to: "clipper"; + mouse_events: 0; + description { state: "default" 0.0; + rel1 { + to: "shower"; + } + rel2 { + to: "shower"; + } + } + description { state: "default" 1.0; + inherit: "default" 0.0; + rel1.relative: 0 0; + rel2.relative: 1.0 1.0; + } + description { state: "default" 0.5; + inherit: "default" 0.0; + rel1.relative: 0 0; + rel2.relative: 1.0 1.0; + } + description { state: "visible" 1.0; + rel1 { + to: "shower"; + } + rel2 { + to: "shower"; + } + map { + on: 1; + smooth: 1; + backface_cull: 0; + perspective_on: 1; + alpha: 0; + perspective: "persp"; + rotation { + x: 0; + y: 0; + z: 0; + } + } + } + description { state: "switcher" 0.0; + rel1 { + to: "shower"; + } + rel2 { + to: "shower"; + } + map { + on: 1; + smooth: 1; + backface_cull: 0; + perspective_on: 1; + alpha: 1; + perspective: "persp"; + rotation { + x: 0; + y: 75; + z: 0; + } + } + } + description { state: "switcher2" 0.0; + rel1 { + to: "shower"; + } + rel2 { + to: "shower"; + } + map { + on: 1; + smooth: 1; + backface_cull: 0; + perspective_on: 1; + alpha: 1; + perspective: "persp"; + rotation { + x: 0; + y: 45; + z: 0; + } + } + } + } + } + programs { + program { name: "show1"; + signal: "e,state,visible,on"; + source: "e"; + action: STATE_SET "default" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + target: "dim"; + after: "show2_1"; + after: "show2_2"; + } + program { name: "show2_1"; + action: STATE_SET "visible" 0.0; + transition: DECELERATE 0.1; + target: "dim"; + } + program { name: "show2_2"; + action: STATE_SET "visible" 0.0; + transition: DECELERATE 0.2; + target: "clipper"; + target: "shower"; + after : "show3"; + } + program { name: "show3"; + action: SIGNAL_EMIT "e,action,show,done" "e"; + } + program { name: "hide1"; + signal: "e,state,visible,off"; + source: "e"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + target: "dim"; + after: "hide2"; + } + program { name: "hide2"; + action: STATE_SET "default" 0.0; + transition: DECELERATE 0.2; + target: "clipper"; + target: "shower"; + target: "dim"; + after: "hide3"; + } + program { name: "hide3"; + action: SIGNAL_EMIT "e,action,hide,done" "e"; + } + program { name: "raise_above_hide1"; + signal: "e,state,raise_above,off"; + source: "e"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + target: "dim"; + after: "raise_above_hide2"; + } + program { name: "raise_above_hide2"; + action: STATE_SET "default" 0.0; + transition: DECELERATE 0.2; + target: "clipper"; + target: "shower"; + target: "dim"; + after: "raise_above_hide3"; + } + program { name: "raise_above_hide3"; + action: SIGNAL_EMIT "e,action,raise_above_hide,done" "e"; + } + program { name: "raise_above_hide_post_work"; + signal: "e,state,raise_above_post,on"; + source: "e"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + target: "dim"; + } + program { name: "switcher_on"; + signal: "e,state,switcher,on"; + source: "e"; + action: STATE_SET "visible" 1.0; + target: "clipper"; + target: "shower"; + target: "persp"; + target: "e.swallow.content"; + target: "dim"; + after: "switcher_on2"; + } + program { name: "switcher_on2"; + action: STATE_SET "switcher" 0.0; + target: "clipper"; + target: "shower"; + target: "persp"; + target: "e.swallow.content"; + target: "dim"; + after: "switcher_on3"; + } + program { name: "switcher_on3"; + action: STATE_SET "switcher2" 0.0; + target: "e.swallow.content"; + target: "dim"; + transition: LINEAR 0.3; + after: "switcher_on4"; + } + program { name: "switcher_on4"; + action: STATE_SET "visible" 1.0; + target: "clipper"; + target: "shower"; + target: "persp"; + target: "e.swallow.content"; + target: "dim"; + after: "switcher_on5"; + } + program { name: "switcher_on5"; + action: SIGNAL_EMIT "e,action,show,done" "e"; + } + program { name: "switcher_on_top"; + signal: "e,state,switcher_top,on"; + source: "e"; + action: STATE_SET "visible" 1.0; + target: "clipper"; + target: "shower"; + target: "persp"; + target: "e.swallow.content"; + target: "dim"; + after: "switcher_on_top2"; + after: "switcher_on_top2_2"; + } + program { name: "switcher_on_top2"; + action: STATE_SET "switcher" 0.0; + target: "clipper"; + target: "shower"; + target: "persp"; + transition: LINEAR 0.3; + after: "switcher_on_top3"; + } + program { name: "switcher_on_top2_2"; + action: STATE_SET "switcher2" 0.0; + target: "dim"; + target: "e.swallow.content"; + transition: ACCELERATE 0.3; + } + program { name: "switcher_on_top3"; + action: STATE_SET "visible" 1.0; + target: "clipper"; + target: "shower"; + target: "persp"; + target: "dim"; + target: "e.swallow.content"; + after: "switcher_on_top4"; + } + program { name: "switcher_on_top4"; + action: SIGNAL_EMIT "e,action,show,done" "e"; + } + program { name: "raise_above3"; + signal: "e,state,raise_above3,on"; + source: "e"; + action: STATE_SET "indicator_raise_above" 0.0; + target: "shower"; + after: "raise_above3_2"; + } + program { name: "raise_above3_2"; + action : STATE_SET "indicator_raise_above" 0.1; + transition: SINUSOIDAL 0.2; + target: "shower"; + after : "raise_above3_3"; + } + program { name: "raise_above3_3"; + action : STATE_SET "indicator_raise_above" 0.1; + transition: LINEAR 0.16; + target: "shower"; + after : "raise_above3_4"; + } + program { name: "raise_above3_4"; + action : STATE_SET "indicator_raise_above" 0.0; + transition: SINUSOIDAL 0.2; + target: "shower"; + after : "raise_above3_done"; + } + program { name: "raise_above3_done"; + action: SIGNAL_EMIT "e,action,raise_above3,done" "e"; + } + program { name: "show1_noeffect"; + signal: "e,state,visible,on,noeffect"; + source: "e"; + action: STATE_SET "default" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + target: "dim"; + after: "show2_noeffect"; + } + program { name: "show2_noeffect"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + target: "dim"; + after: "show3"; + } + program { name: "hide1_noeffect"; + signal: "e,state,visible,off,noeffect"; + source: "e"; + action: STATE_SET "default" 0.0; + target: "clipper"; + target: "shower"; + target: "dim"; + after: "hide3"; + } + program { name: "show_background1"; + signal: "e,state,background,visible,on"; + source: "e"; + after: "show_background2"; + } + program { name: "show_background2"; + action: SIGNAL_EMIT "e,action,background,show,done" "e"; + } + program { name: "hide_background1"; + signal: "e,state,background,visible,off"; + source: "e"; + after: "hide_background2"; + } + program { name: "hide_background2"; + action: SIGNAL_EMIT "e,action,background,hide,done" "e"; + } + program { name: "show1_custom0"; + signal: "e,state,visible,on,custom0"; + source: "e"; + action: STATE_SET "default" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + target: "dim"; + after: "show2_custom0"; + } + program { name: "show2_custom0"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + target: "dim"; + after: "show3"; + } + program { name: "hide1_custom0"; + signal: "e,state,visible,off,custom0"; + source: "e"; + action: STATE_SET "default" 0.0; + target: "clipper"; + target: "shower"; + target: "dim"; + after: "hide2"; + } + program { name: "show1_custom1"; + signal: "e,state,visible,on,custom1"; + source: "e"; + action: STATE_SET "default" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + target: "dim"; + after: "show2_custom1"; + } + program { name: "show2_custom1"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + target: "dim"; + after: "show3"; + } + program { name: "hide1_custom1"; + signal: "e,state,visible,off,custom1"; + source: "e"; + action: STATE_SET "default" 0.0; + target: "clipper"; + target: "shower"; + target: "dim"; + after: "hide2"; + } + } +} /* end of group "dialog" */ diff --git a/comp-slp/data/group/fake_effect_default.edc b/comp-slp/data/group/fake_effect_default.edc new file mode 100644 index 0000000..f3431d7 --- /dev/null +++ b/comp-slp/data/group/fake_effect_default.edc @@ -0,0 +1,99 @@ +/*-----------------------------------------------------*/ +/* group "fake_effect" */ +/*-----------------------------------------------------*/ +group { name: "fake_effect"; + images { + image: "comp-sh1.png" COMP; + image: "bt_glow.png" COMP; + } + parts { + part { name: "clipper"; + type: RECT; + mouse_events: 0; + description { state: "default" 0.0; + visible: 0; + color: 0 0 0 0; + rel1 { + relative: -1.0 -1.0; + offset: -9999 -9999; + } + rel2 { + relative: 2.0 2.0; + offset: 9999 9999; + } + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 255; + } + } + part { name: "shower"; + type: RECT; + mouse_events: 0; + description { state: "default" 0.0; + visible: 0; + rel1 { + relative: 0.1 0.1; + } + rel2 { + relative: 0.9 0.9; + } + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + rel1 { + relative: 0.0 0.0; + } + rel2 { + relative: 1.0 1.0; + } + } + } + part { name: "fake.swallow.content"; + type: SWALLOW; + clip_to: "clipper"; + mouse_events: 0; + description { state: "default" 0.0; + rel1 { + to: "shower"; + } + rel2 { + to: "shower"; + } + } + } + } + programs { + program { name: "show1"; + signal: "fake,state,visible,on"; + source: "fake"; + action: STATE_SET "default" 0.0; + target: "clipper"; + target: "shower"; + after: "show2"; + } + program { name: "show2"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + transition: DECELERATE 0.1; + after: "show3"; + } + program { name: "show3"; + action: SIGNAL_EMIT "fake,action,show,done" "fake"; + } + program { name: "hide1"; + signal: "fake,state,visible,off"; + source: "fake"; + action: STATE_SET "default" 0.0; + target: "clipper"; + target: "shower"; + transition: DECELERATE 0.2; + after: "hide2"; + } + program { name: "hide2"; + action: SIGNAL_EMIT "fake,action,hide,done" "fake"; + } + } +} /* end of group "fake_effect" */ diff --git a/comp-slp/data/group/fake_effect_fade.edc b/comp-slp/data/group/fake_effect_fade.edc new file mode 100644 index 0000000..09d8c67 --- /dev/null +++ b/comp-slp/data/group/fake_effect_fade.edc @@ -0,0 +1,125 @@ +/*-----------------------------------------------------*/ +/* group "fake_effect_fade" */ +/*-----------------------------------------------------*/ +group { name: "fake_effect_fade"; + images { + image: "comp-sh1.png" COMP; + image: "bt_glow.png" COMP; + } + parts { + part { name: "clipper"; + type: RECT; + mouse_events: 0; + description { state: "default" 0.0; + //visible: 0; + //color: 0 0 0 0; + visible: 1; + //color: 0 0 0 64; + color: 255 255 255 1; + rel1 { + relative: -1.0 -1.0; + offset: -9999 -9999; + } + rel2 { + relative: 2.0 2.0; + offset: 9999 9999; + } + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 255; + } + } + part { name: "shower"; + type: RECT; + mouse_events: 0; + description { state: "default" 0.0; + visible: 0; + rel1 { + //relative: 0.15 0.15; // fake effect start size + //relative: 0.35 0.35; // fake effect start size + relative: 0.45 0.45; // fake effect start size + } + rel2 { + //relative: 0.85 0.85; + //relative: 0.65 0.65; + relative: 0.55 0.55; // fake effect start size + } + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + rel1 { + relative: 0.0 0.0; // fake effect end size + } + rel2 { + relative: 1.0 1.0; + } + } + } + part { name: "fake.swallow.content"; + type: SWALLOW; + clip_to: "clipper"; + mouse_events: 0; + description { state: "default" 0.0; + rel1 { + to: "shower"; + } + rel2 { + to: "shower"; + } + } + } + } + programs { + program { name: "show1"; + signal: "fake,state,visible,on"; + source: "fake"; + action: STATE_SET "default" 0.0; + target: "clipper"; + target: "shower"; + after: "show2"; + } + program { name: "show2"; + action: STATE_SET "default" 0.0; + //transition: LINEAR 0.15; + //transition: LINEAR 0.01; + //transition: LINEAR 0.05; + //transition: LINEAR 0.02; + target: "clipper"; + target: "shower"; + after: "show3"; + } + program { name: "show3"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + //transition: ACCELERATE 0.3; + //transition: DECELERATE 0.3; + //transition: DECELERATE 0.6; + //transition: DECELERATE 0.55; + //transition: DECELERATE 0.58; + //transition: LINEAR 0.58; + transition: DECELERATE 0.42; + //transition: DECELERATE 0.35; + //transition: DECELERATE 0.25; + after: "show4"; + } + program { name: "show4"; + action: SIGNAL_EMIT "fake,action,show,done" "fake"; + } + program { name: "hide1"; + signal: "fake,state,visible,off"; + source: "fake"; + action: STATE_SET "default" 0.0; + target: "clipper"; + target: "shower"; + //transition: DECELERATE 0.3; + transition: DECELERATE 0.35; + after: "hide2"; + } + program { name: "hide2"; + action: SIGNAL_EMIT "fake,action,hide,done" "fake"; + } + } +} /* end of group "fake_effect_fade" */ diff --git a/comp-slp/data/group/fake_effect_twist.edc b/comp-slp/data/group/fake_effect_twist.edc new file mode 100644 index 0000000..d03f9f7 --- /dev/null +++ b/comp-slp/data/group/fake_effect_twist.edc @@ -0,0 +1,174 @@ +/*-----------------------------------------------------*/ +/* group "fake_effect_twist" */ +/*-----------------------------------------------------*/ +group { name: "fake_effect_twist"; + images { + image: "comp-sh1.png" COMP; + image: "bt_glow.png" COMP; + } + parts { + part { name: "clipper"; + type: RECT; + mouse_events: 0; + description { state: "default" 0.0; + visible: 1; + color: 255 255 255 255; + rel1 { + relative: -1.0 -1.0; + offset: -9999 -9999; + } + rel2 { + relative: 2.0 2.0; + offset: 9999 9999; + } + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 255; + } + } + part { name: "shower"; + type: RECT; + mouse_events: 0; + description { state: "default" 0.0; + visible: 0; + rel1 { + relative: 0.0 0.0; + } + rel2 { + relative: 1.0 1.0; + } + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + rel1 { + relative: 0.0 0.0; + } + rel2 { + relative: 1.0 1.0; + } + } + } + part { name: "persp"; + type: RECT; + description { state: "default" 0.0; + min: 10 10; + max: 10 10; + visible: 0; + perspective.zplane: -1500; + perspective.focal: 1000; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + perspective.zplane: 0; + perspective.focal: 1000; + } + } + part { name: "fake.swallow.content"; + type: SWALLOW; + clip_to: "clipper"; + mouse_events: 0; + description { state: "default" 0.0; + rel1 { + to: "shower"; + } + rel2 { + to: "shower"; + } + map { + on: 1; + smooth: 1; + backface_cull: 0; + perspective_on: 1; + alpha: 1; + perspective: "persp"; + rotation { + x: 0; + y: 90; + z: 0; + } + } + } + description { state: "visible" 0.0; + rel1 { + to: "shower"; + } + rel2 { + to: "shower"; + } + map { + on: 1; + smooth: 1; + backface_cull: 0; + perspective_on: 1; + alpha: 1; + perspective: "persp"; + rotation { + x: 0; + y: 0; + z: 0; + } + } + } + } + } + programs { + program { name: "show1"; + signal: "fake,state,visible,on"; + source: "fake"; + action: STATE_SET "default" 0.0; + target: "clipper"; + target: "shower"; + target: "persp"; + target: "fake.swallow.content"; + after: "show2"; + } + program { name: "show2"; + action: STATE_SET "default" 0.0; + target: "clipper"; + target: "shower"; + target: "persp"; + target: "fake.swallow.content"; + after: "show3"; + } + program { name: "show3"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + target: "persp"; + target: "fake.swallow.content"; + //transition: DECELERATE 0.3; + //transition: LINEAR 3; + //transition: DECELERATE 0.8; + transition: ACCELERATE 0.45; + after: "show4"; + } + program { name: "show4"; + action: SIGNAL_EMIT "fake,action,show,done" "fake"; + } + program { name: "hide1"; + signal: "fake,state,visible,off"; + source: "fake"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + target: "persp"; + target: "fake.swallow.content"; + after: "hide2"; + } + program { name: "hide2"; + action: STATE_SET "default" 0.0; + target: "clipper"; + target: "shower"; + target: "persp"; + target: "fake.swallow.content"; + //transition: LINEAR 3; + transition: DECELERATE 0.45; + after: "hide3"; + } + program { name: "hide3"; + action: SIGNAL_EMIT "fake,action,hide,done" "fake"; + } + } +} /* end of group "fake_effect_twist" */ diff --git a/comp-slp/data/group/indicator.edc b/comp-slp/data/group/indicator.edc new file mode 100755 index 0000000..1d2a021 --- /dev/null +++ b/comp-slp/data/group/indicator.edc @@ -0,0 +1,241 @@ +/*-----------------------------------------------------*/ +/* group "indicator" */ +/*-----------------------------------------------------*/ +group { name: "indicator"; + images { + image: "comp-sh1.png" COMP; + image: "bt_glow.png" COMP; + } + parts { + /*------------------------------------------------*/ + part { name: "clipper"; + type: RECT; + mouse_events: 0; + description { state: "default" 0.0; + visible: 0; + color: 0 0 0 0; + rel1.relative: -1.0 -1.0 ; + rel1.offset : -9999 -9999; + rel2.relative: 2.0 2.0 ; + rel2.offset : 9999 9999; + } + description { state: "default" 0.1; + inherit: "default" 0.0; + visible: 0; + color : 0 0 0 0; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 255; + } + } + /*------------------------------------------------*/ + part { name: "shower"; + type: RECT; + mouse_events: 0; + description { state: "default" 0.0; + visible: 0; + rel1.relative: 0 0; + rel1.offset : 0 0; + rel2.relative: 0 0; + } + description { state: "default" 0.1; + inherit: "default" 0.0; + rel1.relative: 0 0; + rel2.relative: 1 1; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + rel1.relative: 0 0; + rel2.relative: 1 1; + } + } + /*------------------------------------------------*/ + part { name: "e.swallow.content"; + type: SWALLOW; + clip_to: "clipper"; + mouse_events: 0; + description { state: "default" 0.0; + rel1.to: "shower"; + rel2.to: "shower"; + } + description { state: "default" 0.1; + inherit: "default" 0.0; + rel1.relative: 0 0; + rel2.relative: 1 1; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + rel1.relative: 0 0; + rel2.relative: 1 1; + } + } + /*------------------------------------------------*/ + } + programs { + /*------------------------------------------------*/ + /* signal emit program */ + /*------------------------------------------------*/ + #include "../common/comp-prog-signal-emit.edc" + + /*------------------------------------------------------------------- + * 0.2 0.15 + *------------------------------------------------------------------- + * [curr] ---> show0 ---> show1 ---> show2 ---> SHOW,DONE + *------------------------------------------------------------------- + * default0.0 default0.1 default0.1 visible0.0 + *------------------------------------------------------------------- + * clipper clipper clipper clipper + * shower shower shower shower + * swallow swallow swallow swallow + *------------------------------------------------------------------- + */ + program { name: "prog-show-0"; + signal: "e,state,visible,on"; + source: "e"; + action: STATE_SET "default" 0.1; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after : "prog-show-1"; + } + program { name: "prog-show-1"; + action: STATE_SET "default" 0.1; + transition: LINEAR 0.2; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after : "prog-show-2"; + } + program { name: "prog-show-2"; + action: STATE_SET "visible" 0.0; + transition: DECELERATE 0.15; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after : "prog-emit-show-done"; + } + /*------------------------------------------------*/ + program { name: "prog-show-noeffect"; + signal: "e,state,visible,on,noeffect"; + source: "e"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after : "prog-emit-show-done"; + } + /*------------------------------------------------*/ + program { name: "prog-show-custom0"; + signal: "e,state,visible,on,custom0"; + source: "e"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after : "prog-emit-show-done"; + } + /*------------------------------------------------*/ + program { name: "prog-show-custom1"; + signal: "e,state,visible,on,custom1"; + source: "e"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after : "prog-emit-show-done"; + } + /*------------------------------------------------ + * 0 + *------------------------------------------------ + * [curr] ---> hide0 ---> HIDE,DONE + *------------------------------------------------ + * visible0.0 default0.1 + *------------------------------------------------ + * clipper clipper + * shower shower + * swallow swallow + *------------------------------------------------ + */ + program { name: "prog-hide-0"; + signal: "e,state,visible,off"; + source: "e"; + action: STATE_SET "default" 0.1; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after : "prog-emit-hide-done"; + } + /*------------------------------------------------*/ + program { name: "prog-hide-noeffect"; + signal: "e,state,visible,off,noeffect"; + source: "e"; + action: STATE_SET "default" 0.1; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after : "prog-emit-hide-done"; + } + /*------------------------------------------------*/ + program { name: "prog-hide-custom0"; + signal: "e,state,visible,off,custom0"; + source: "e"; + action: STATE_SET "default" 0.1; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after : "prog-emit-hide-done"; + } + /*------------------------------------------------*/ + program { name: "prog-hide-custom1"; + signal: "e,state,visible,off,custom1"; + source: "e"; + action: STATE_SET "default" 0.1; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after : "prog-emit-hide-done"; + } + /*------------------------------------------------*/ + program { name: "prog-raise-above-hide"; + signal: "e,state,raise_above,off"; + source: "e"; + action: STATE_SET "default" 0.1; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after : "prog-emit-raise-above-hide-done"; + } + /*------------------------------------------------*/ + program { name: "prog-raise-above-hide-post-work"; + signal: "e,state,raise_above_post,on"; + source: "e"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + } + /*------------------------------------------------*/ + program { name: "prog-show-bg"; + signal: "e,state,background,visible,on"; + source: "e"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after : "prog-emit-bg-show-done"; + } + /*------------------------------------------------*/ + program { name: "prog-hide-bg"; + signal: "e,state,background,visible,off"; + source: "e"; + action: STATE_SET "default" 0.1; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after : "prog-emit-bg-hide-done"; + } + /*------------------------------------------------*/ + } +} /* end of group "indicator" */ diff --git a/comp-slp/data/group/lock_screen.edc b/comp-slp/data/group/lock_screen.edc new file mode 100644 index 0000000..81deca8 --- /dev/null +++ b/comp-slp/data/group/lock_screen.edc @@ -0,0 +1,277 @@ +/*-----------------------------------------------------*/ +/* group "lockscreen" */ +/*-----------------------------------------------------*/ +group { name: "lockscreen"; + images { + image: "comp-sh1.png" COMP; + image: "bt_glow.png" COMP; + } + parts { + part { name: "clipper"; + type: RECT; + mouse_events: 0; + description { state: "default" 0.0; + visible: 0; + color: 0 0 0 0; + rel1.relative: -1.0 -1.0; + rel1.offset: -9999 -9999; + rel2.relative: 2.0 2.0; + rel2.offset: 9999 9999; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 255; + } + description { state: "default" 1.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 255; + } + description { state: "default" 0.5; + inherit: "default" 0.0; + visible: 0; + color: 0 0 0 0; + } + } + part { name: "shower"; + type: RECT; + mouse_events: 0; + description { state: "default" 0.0; + visible: 0; + rel1 { + relative: 0.1 0.1; + offset: 0 0; + } + rel2 { + relative: 0.9 0.9; + } + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + rel1 { + relative: 0.0 0.0; + offset: 0 0; + } + rel2 { + relative: 1.0 1.0; + } + } + description { state: "indicator_raise_above" 0.0; + inherit : "default" 0.0; + rel1 { + relative : 0.0 0.0; + offset: 0 0; + } + rel2 { + relative : 1.0 1.0; + } + } + description { state: "indicator_raise_above" 0.1; + inherit : "default" 0.0; + rel1 { + relative : 0.0 -1.0; + offset: 0 0; + } + rel2 { + relative : 1.0 0.0; + } + } + } + + part { name: "e.swallow.content"; + type: SWALLOW; + clip_to: "clipper"; + mouse_events: 0; + + description { state: "default" 0.0; + rel1 { + to: "shower"; + } + rel2 { + to: "shower"; + } + } + description { state: "default" 1.0; + inherit: "default" 0.0; + rel1.relative: 0 0; + rel2.relative: 1.0 1.0; + } + description { state: "default" 0.5; + inherit: "default" 0.0; + rel1.relative: 0 0; + rel2.relative: 1.0 1.0; + } + } + } + programs { + program { name: "show1"; + signal: "e,state,visible,on"; + source: "e"; + action: STATE_SET "default" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "show2"; + } + program { name: "show2"; + action: STATE_SET "visible" 0.0; + target : "clipper"; + target : "shower"; + after : "show3"; + } + program { name: "show3"; + action: SIGNAL_EMIT "e,action,show,done" "e"; + } + program { name: "hide1"; + signal: "e,state,visible,off"; + source: "e"; + action: STATE_SET "default" 0.0; + transition: DECELERATE 0.2; + target: "clipper"; + target: "shower"; + after: "hide2"; + } + program { name: "hide2"; + action: SIGNAL_EMIT "e,action,hide,done" "e"; + } + program { name: "raise_above_hide1"; + signal: "e,state,raise_above,off"; + source: "e"; + action: STATE_SET "visible" 0.0; + target : "clipper"; + target : "shower"; + after: "raise_above_hide2"; + } + program { name: "raise_above_hide2"; + action: STATE_SET "default" 0.0; + transition: DECELERATE 0.2; + target: "clipper"; + target: "shower"; + after : "raise_above_hide3"; + } + program { name: "raise_above_hide3"; + action: SIGNAL_EMIT "e,action,raise_above_hide,done" "e"; + } + program { name: "raise_above_hide_post_work"; + signal: "e,state,raise_above_post,on"; + source: "e"; + action: STATE_SET "visible" 0.0; + target : "clipper"; + target : "shower"; + } + program { name: "raise_above3"; + signal: "e,state,raise_above3,on"; + source: "e"; + action: STATE_SET "indicator_raise_above" 0.0; + target: "shower"; + after: "raise_above3_2"; + } + program { name: "raise_above3_2"; + action : STATE_SET "indicator_raise_above" 0.1; + transition: SINUSOIDAL 0.2; + target: "shower"; + after : "raise_above3_3"; + } + program { name: "raise_above3_3"; + action : STATE_SET "indicator_raise_above" 0.1; + transition: LINEAR 0.16; + target: "shower"; + after : "raise_above3_4"; + } + program { name: "raise_above3_4"; + action : STATE_SET "indicator_raise_above" 0.0; + transition: SINUSOIDAL 0.2; + target: "shower"; + after : "raise_above3_done"; + } + program { name: "raise_above3_done"; + action: SIGNAL_EMIT "e,action,raise_above3,done" "e"; + } + program { name: "show1_noeffect"; + signal: "e,state,visible,on,noeffect"; + source: "e"; + action: STATE_SET "default" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "show2_noeffect"; + } + program { name: "show2_noeffect"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + after: "show3"; + } + program { name: "hide1_noeffect"; + signal: "e,state,visible,off,noeffect"; + source: "e"; + action: STATE_SET "default" 0.0; + target: "clipper"; + target: "shower"; + after: "hide2"; + } + program { name: "show_background1"; + signal: "e,state,background,visible,on"; + source: "e"; + after: "show_background2"; + } + program { name: "show_background2"; + action: SIGNAL_EMIT "e,action,background,show,done" "e"; + } + program { name: "hide_background1"; + signal: "e,state,background,visible,off"; + source: "e"; + after: "hide_background2"; + } + program { name: "hide_background2"; + action: SIGNAL_EMIT "e,action,background,hide,done" "e"; + } + program { name: "show1_custom0"; + signal: "e,state,visible,on,custom0"; + source: "e"; + action: STATE_SET "default" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "show2_custom0"; + } + program { name: "show2_custom0"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + after: "show3"; + } + program { name: "hide1_custom0"; + signal: "e,state,visible,off,custom0"; + source: "e"; + action: STATE_SET "default" 0.0; + target: "clipper"; + target: "shower"; + after: "hide2"; + } + program { name: "show1_custom1"; + signal: "e,state,visible,on,custom1"; + source: "e"; + action: STATE_SET "default" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "show2_custom1"; + } + program { name: "show2_custom1"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + after: "show3"; + } + program { name: "hide1_custom1"; + signal: "e,state,visible,off,custom1"; + source: "e"; + action: STATE_SET "default" 0.0; + target: "clipper"; + target: "shower"; + after: "hide2"; + } + } +} /* end of group "lockscreen" */ diff --git a/comp-slp/data/group/no_effect.edc b/comp-slp/data/group/no_effect.edc new file mode 100644 index 0000000..614753f --- /dev/null +++ b/comp-slp/data/group/no_effect.edc @@ -0,0 +1,106 @@ +/*-----------------------------------------------------*/ +/* group "no-effect" */ +/*-----------------------------------------------------*/ +group { name: "no-effect"; + #include "../common/comp-config.edc" + #include "../common/comp-script.edc" + #include "../common/comp-image.edc" + parts { + #include "../common/comp-part-clipper.edc" + #include "../common/comp-part-persp.edc" + #include "../common/comp-part-shower.edc" + #include "../common/comp-part-swallow.edc" + #include "../common/comp-part-logger.edc" + } + programs { + #include "../common/comp-prog-signal-emit.edc" + /*------------------------------------------------ + * show/hide and fake show/hide + *-----------------------------------------------*/ + program { name: "prog-clipper-show"; + signal: "e,state,visible,on*"; + source: "*"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + after : "prog-emit-show-done"; + } + program { name: "prog-clipper-hide"; + signal: "e,state,visible,off*"; + source: "*"; + action: STATE_SET "default" 0.0; + target: "clipper"; + after : "prog-emit-hide-done"; + } + program { name: "prog-shower-show"; + signal: "e,state,visible,on*"; + source: "*"; + action: STATE_SET "visible" 0.0; + target: "shower"; + } + program { name: "prog-shower-hide"; + signal: "e,state,visible,off*"; + source: "*"; + action: STATE_SET "invisible" 0.0; + target: "shower"; + } + /*-----------------------------------------------*/ + program { name: "prog-swallow-show"; + signal: "e,state,visible,on*"; + source: "e"; + action: STATE_SET "default" 0.0; + target: "e.swallow.content"; + } + program { name: "prog-swallow-hide"; + signal: "e,state,visible,off*"; + source: "e"; + action: STATE_SET "default" 0.0; + target: "e.swallow.content"; + } + /*------------------------------------------------ + * raise above + *-----------------------------------------------*/ + program { name: "raise_above1"; + signal: "e,state,raise_above1,on"; + source: "e"; + after : "prog-emit-raise-above-1-done"; + } + program { name: "raise_above2"; + signal: "e,state,raise_above2,on"; + source: "e"; + after : "prog-emit-raise-above-2-done"; + } + program { name: "raise_above3"; + signal: "e,state,raise_above3,on"; + source: "e"; + after : "prog-emit-raise-above-3-done"; + } + program { name: "raise_above_hide"; + signal: "e,state,raise_above,off"; + source: "e"; + after : "prog-emit-raise-above-hide-done"; + } + /*------------------------------------------------ + * show/hide background + *-----------------------------------------------*/ + program { name: "show_background1"; + signal: "e,state,background,visible,on"; + source: "e"; + after : "prog-emit-bg-show-done"; + } + program { name: "hide_background1"; + signal: "e,state,background,visible,off"; + source: "e"; + after : "prog-emit-bg-hide-done"; + } + /*------------------------------------------------ + * rotation + *-----------------------------------------------*/ + #include "../common/comp-prog-show-rotation-no-effect.edc" + #include "../common/comp-prog-hide-rotation-no-effect.edc" + #include "../common/comp-prog-rotation-on-no-effect.edc" + /*------------------------------------------------ + * logger + *-----------------------------------------------*/ + #include "../common/comp-prog-logger-on-off.edc" + } +} /* end of group "no-effect" */ diff --git a/comp-slp/data/group/shadow_default.edc b/comp-slp/data/group/shadow_default.edc new file mode 100644 index 0000000..43b1156 --- /dev/null +++ b/comp-slp/data/group/shadow_default.edc @@ -0,0 +1,278 @@ +/*-----------------------------------------------------*/ +/* group "shadow" */ +/*-----------------------------------------------------*/ +group { name: "shadow"; + images { + image: "comp-sh1.png" COMP; + image: "bt_glow.png" COMP; + } + parts { + part { name: "clipper"; + type: RECT; + mouse_events: 0; + description { state: "default" 0.0; + visible: 0; + color: 0 0 0 0; + rel1.relative: -1.0 -1.0; + rel1.offset: -9999 -9999; + rel2.relative: 2.0 2.0; + rel2.offset: 9999 9999; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 255; + } + description { state: "default" 1.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 255; + } + description { state: "default" 0.5; + inherit: "default" 0.0; + visible: 0; + color: 0 0 0 0; + } + } + part { name: "shower"; + type: RECT; + mouse_events: 0; + description { state: "default" 0.0; + visible: 0; + rel1 { + relative: 0.1 0.1; + offset: 0 0; + } + rel2 { + relative: 0.9 0.9; + } + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + rel1 { + relative: 0.0 0.0; + offset: 0 0; + } + rel2 { + relative: 1.0 1.0; + } + } + description { state: "indicator_raise_above" 0.0; + inherit : "default" 0.0; + rel1 { + relative : 0.0 0.0; + offset: 0 0; + } + rel2 { + relative : 1.0 1.0; + } + } + description { state: "indicator_raise_above" 0.1; + inherit : "default" 0.0; + rel1 { + relative : 0.0 -1.0; + offset: 0 0; + } + rel2 { + relative : 1.0 0.0; + } + } + } + + part { name: "e.swallow.content"; + type: SWALLOW; + clip_to: "clipper"; + mouse_events: 0; + + description { state: "default" 0.0; + rel1 { + to: "shower"; + } + rel2 { + to: "shower"; + } + } + description { state: "default" 1.0; + inherit: "default" 0.0; + rel1.relative: 0 0; + rel2.relative: 1.0 1.0; + } + description { state: "default" 0.5; + inherit: "default" 0.0; + rel1.relative: 0 0; + rel2.relative: 1.0 1.0; + } + } + } + programs { + program { name: "show1"; + signal: "e,state,visible,on"; + source: "e"; + action: STATE_SET "default" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "show2"; + } + program { name: "show2"; + action: STATE_SET "visible" 0.0; + transition: DECELERATE 0.1; + target : "clipper"; + target : "shower"; + after : "show3"; + } + program { name: "show3"; + action: SIGNAL_EMIT "e,action,show,done" "e"; + } + program { name: "hide1"; + signal: "e,state,visible,off"; + source: "e"; + action: STATE_SET "default" 0.0; + transition: DECELERATE 0.2; + target: "clipper"; + target: "shower"; + after: "hide2"; + } + program { name: "hide2"; + action: SIGNAL_EMIT "e,action,hide,done" "e"; + } + program { name: "raise_above_hide1"; + signal: "e,state,raise_above,off"; + source: "e"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + after: "raise_above_hide2"; + } + program { name: "raise_above_hide2"; + action: STATE_SET "default" 0.0; + transition: DECELERATE 0.2; + target: "clipper"; + target: "shower"; + after: "raise_above_hide3"; + } + program { name: "raise_above_hide3"; + action: SIGNAL_EMIT "e,action,raise_above_hide,done" "e"; + } + program { name: "raise_above_hide_post_work"; + signal: "e,state,raise_above_post,on"; + source: "e"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + } + program { name: "raise_above3"; + signal: "e,state,raise_above3,on"; + source: "e"; + action: STATE_SET "indicator_raise_above" 0.0; + target: "shower"; + after: "raise_above3_2"; + } + program { name: "raise_above3_2"; + action : STATE_SET "indicator_raise_above" 0.1; + transition: SINUSOIDAL 0.2; + target: "shower"; + after : "raise_above3_3"; + } + program { name: "raise_above3_3"; + action : STATE_SET "indicator_raise_above" 0.1; + transition: LINEAR 0.16; + target: "shower"; + after : "raise_above3_4"; + } + program { name: "raise_above3_4"; + action : STATE_SET "indicator_raise_above" 0.0; + transition: SINUSOIDAL 0.2; + target: "shower"; + after : "raise_above3_done"; + } + program { name: "raise_above3_done"; + action: SIGNAL_EMIT "e,action,raise_above3,done" "e"; + } + program { name: "show1_noeffect"; + signal: "e,state,visible,on,noeffect"; + source: "e"; + action: STATE_SET "default" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "show2_noeffect"; + } + program { name: "show2_noeffect"; + action: STATE_SET "visible" 0.0; + target : "clipper"; + target : "shower"; + after : "show3"; + } + program { name: "hide1_noeffect"; + signal: "e,state,visible,off,noeffect"; + source: "e"; + action: STATE_SET "default" 0.0; + target: "clipper"; + target: "shower"; + after: "hide2"; + } + program { name: "show_background1"; + signal: "e,state,background,visible,on"; + source: "e"; + after: "show_background2"; + } + program { name: "show_background2"; + action: SIGNAL_EMIT "e,action,background,show,done" "e"; + } + program { name: "hide_background1"; + signal: "e,state,background,visible,off"; + source: "e"; + after: "hide_background2"; + } + program { name: "hide_background2"; + action: SIGNAL_EMIT "e,action,background,hide,done" "e"; + } + program { name: "show1_custom0"; + signal: "e,state,visible,on,custom0"; + source: "e"; + action: STATE_SET "default" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "show2_custom0"; + } + program { name: "show2_custom0"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + after: "show3"; + } + program { name: "hide1_custom0"; + signal: "e,state,visible,off,custom0"; + source: "e"; + action: STATE_SET "default" 0.0; + target: "clipper"; + target: "shower"; + after: "hide2"; + } + program { name: "show1_custom1"; + signal: "e,state,visible,on,custom1"; + source: "e"; + action: STATE_SET "default" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "show2_custom1"; + } + program { name: "show2_custom1"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + after: "show3"; + } + program { name: "hide1_custom1"; + signal: "e,state,visible,off,custom1"; + source: "e"; + action: STATE_SET "default" 0.0; + target: "clipper"; + target: "shower"; + after: "hide2"; + } + } +} /* end of group "shadow" */ diff --git a/comp-slp/data/group/shadow_fade.edc b/comp-slp/data/group/shadow_fade.edc new file mode 100644 index 0000000..b05310c --- /dev/null +++ b/comp-slp/data/group/shadow_fade.edc @@ -0,0 +1,438 @@ +/*-----------------------------------------------------*/ +/* group "shadow_fade" */ +/*-----------------------------------------------------*/ +group { name: "shadow_fade"; + #include "../common/comp-config.edc" + parts { + part { name: "clipper"; + type: RECT; + mouse_events: 0; + description { state: "default" 0.0; + visible: 1; + color: 255 255 255 1; + rel1.relative: -1.0 -1.0; + rel1.offset: -9999 -9999; + rel2.relative: 2.0 2.0; + rel2.offset: 9999 9999; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 255; + } + description { state: "background" 0.0; + inherit: "default" 0.0; + visible: 0; + color: 0 0 0 0; + } + description { state: "default" 1.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 255; + } + description { state: "default" 0.5; + inherit: "default" 0.0; + visible: 0; + color: 0 0 0 0; + } + description { state: "custom0" 0.0; + inherit: "default" 0.0; + } + description { state: "custom1" 0.0; + inherit: "default" 0.0; + } + } + + part { name: "shower"; + type: RECT; + mouse_events: 0; + description { state: "default" 0.0; + visible: 0; + rel1.relative: 0.45 0.45; + rel1.offset: 0 0; + rel2.relative: 0.55 0.55; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + rel1.relative: 0 0; + rel1.offset: 0 0; + rel2.relative: 1 1; + } + description { state: "background" 0.0; + inherit: "default" 0.0; + rel1.relative: -0.45 -0.45; // this line indicate background window's size + rel2.relative: 1.45 1.45; // this line indicate background window's size + } + description { state: "indicator_raise_above" 0.0; + inherit : "default" 0.0; + rel1 { + relative : 0.0 0.0; + offset: 0 0; + } + rel2 { + relative : 1.0 1.0; + } + } + description { state: "indicator_raise_above" 0.1; + inherit : "default" 0.0; + rel1 { + relative : 0.0 -1.0; + offset: 0 0; + } + rel2 { + relative : 1.0 0.0; + } + } + description { state: "custom0" 0.0; + inherit: "default" 0.0; + rel1.relative: 0 1; + rel2.relative: 1 2; + } + description { state: "custom1" 0.0; + inherit: "default" 0.0; + rel1.relative: 1 0; + rel2.relative: 2 1; + } + } + part { name: "persp"; + type: RECT; + description { state: "default" 0.0; + min: 1 1; + max: 1 1; + visible: 0; + perspective.zplane: 0; + perspective.focal: 1000; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + perspective.zplane: 0; + } + description { state: "hide" 0.0; + inherit: "default" 0.0; + perspective.zplane: -1500; + } + description { state: "hide" 1.0; + inherit: "default" 0.0; + perspective.zplane: 0; + } + } + part { name: "e.swallow.content"; + type: SWALLOW; + clip_to: "clipper"; + mouse_events: 0; + description { state: "default" 0.0; + rel1.to: "shower"; + rel2.to: "shower"; + map.on: 0; + } + description { state: "default" 1.0; + inherit: "default" 0.0; + rel1.relative: 0 0; + rel2.relative: 1 1; + } + description { state: "default" 0.5; + inherit: "default" 0.0; + rel1.relative: 0 0; + rel2.relative: 1 1; + } + /*-------------------------------------------------------------------*/ + /* window roation state for swallow */ + /* it must be below default state. */ + /*-------------------------------------------------------------------*/ + #include "../common/comp-part-swallow-rotation-on-effect-for-win.edc" + /*-------------------------------------------------------------------*/ + description { state: "visible" 0.0; + rel1.to: "shower"; + rel2.to: "shower"; + map.on: 0; + } + description { state: "background" 0.0; + rel1.to: "shower"; + rel2.to: "shower"; + map.on: 0; + } + description { state: "custom0" 0.0; + rel1.to: "shower"; + rel2.to: "shower"; + map.on: 0; + } + description { state: "custom1" 0.0; + rel1.to: "shower"; + rel2.to: "shower"; + map.on: 0; + } + } + } + programs { + program { name: "show1"; + signal: "e,state,visible,on"; + source: "e"; + action: STATE_SET "default" 0.0; + transition: LINEAR 0.05; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "show2"; + } + // app launching effect + program { name: "show2"; + action: STATE_SET "visible" 0.0; + transition: DECELERATE 0.22; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "show3"; + } + program { name: "show3"; + action: SIGNAL_EMIT "e,action,show,done" "e"; + } + program { name: "hide1"; + signal: "e,state,visible,off"; + source: "e"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "hide2"; + } + program { name: "hide2"; + action: STATE_SET "default" 0.0; + transition: DECELERATE 0.25; + target: "clipper"; + target: "shower"; + after: "hide3"; + } + program { name: "hide3"; + action: SIGNAL_EMIT "e,action,hide,done" "e"; + } + program { name: "raise_above_hide1"; + signal: "e,state,raise_above,off"; + source: "e"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "raise_above_hide2"; + } + program { name: "raise_above_hide2"; + action: STATE_SET "default" 0.0; + transition: DECELERATE 0.25; + target: "clipper"; + target: "shower"; + after: "raise_above_hide4"; + } + program { name: "raise_above_hide4"; + action: SIGNAL_EMIT "e,action,raise_above_hide,done" "e"; + } + program { name: "raise_above_hide_post_work"; + signal: "e,state,raise_above_post,on"; + source: "e"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + } + /*------------------------------------------------------------*/ + /* window roation Program */ + /*------------------------------------------------------------*/ + #include "../common/comp-prog-rotation-on-effect-for-win.edc" + /*------------------------------------------------------------*/ + program { name: "raise_above3"; + signal: "e,state,raise_above3,on"; + source: "e"; + action: STATE_SET "indicator_raise_above" 0.0; + target: "shower"; + after: "raise_above3_2"; + } + program { name: "raise_above3_2"; + action : STATE_SET "indicator_raise_above" 0.1; + transition: SINUSOIDAL 0.2; + target: "shower"; + after : "raise_above3_3"; + } + program { name: "raise_above3_3"; + action : STATE_SET "indicator_raise_above" 0.1; + transition: LINEAR 0.16; + target: "shower"; + after : "raise_above3_4"; + } + program { name: "raise_above3_4"; + action : STATE_SET "indicator_raise_above" 0.0; + transition: SINUSOIDAL 0.2; + target: "shower"; + after : "raise_above3_done"; + } + program { name: "raise_above3_done"; + action: SIGNAL_EMIT "e,action,raise_above3,done" "e"; + } + program { name: "show1_noeffect"; + signal: "e,state,visible,on,noeffect"; + source: "e"; + action: STATE_SET "default" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "show2_noeffect"; + } + program { name: "show2_noeffect"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "show3"; + } + program { name: "hide1_noeffect"; + signal: "e,state,visible,off,noeffect"; + source: "e"; + action: STATE_SET "default" 0.0; + target: "clipper"; + target: "shower"; + after: "hide3"; + } + program { name: "show_background1"; + signal: "e,state,background,visible,on"; + source: "e"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "show_background2"; + } + program { name: "show_background2"; + action: STATE_SET "background" 0.0; + transition: LINEAR 0.32; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "show_background3"; + } + program { name: "show_background3"; + action: STATE_SET "background" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "show_background4"; + } + program { name: "show_background4"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "show_background5"; + } + program { name: "show_background5"; + action: SIGNAL_EMIT "e,action,background,show,done" "e"; + } + program { name: "hide_background1"; + signal: "e,state,background,visible,off"; + source: "e"; + action: STATE_SET "background" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "hide_background2"; + } + program { name: "hide_background2"; + action: STATE_SET "background" 0.0; + transition: LINEAR 0.05; + target: "shower"; + target: "clipper"; + target: "e.swallow.content"; + after: "hide_background3"; + } + program { name: "hide_background3"; + action: STATE_SET "visible" 0.0; + transition: DECELERATE 0.25; + target: "shower"; + target: "clipper"; + target: "e.swallow.content"; + after: "hide_background4"; + } + program { name: "hide_background4"; + action: SIGNAL_EMIT "e,action,background,hide,done" "e"; + } + program { name: "show_fake_background1"; + signal: "e,state,fake,background,visible,on"; + source: "e"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "show_fake_background2"; + } + program { name: "show_fake_background2"; + action: STATE_SET "background" 0.0; + transition: LINEAR 0.55; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "show_background3"; + } + program { name: "show1_custom0"; + signal: "e,state,visible,on,custom0"; + source: "e"; + action: STATE_SET "custom0" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "show2_custom0"; + } + program { name: "show2_custom0"; + action: STATE_SET "visible" 0.0; + transition: DECELERATE 0.6; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "show3"; + } + program { name: "hide1_custom0"; + signal: "e,state,visible,off,custom0"; + source: "e"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "hide2_custom0"; + } + program { name: "hide2_custom0"; + action: STATE_SET "custom0" 0.0; + transition: DECELERATE 0.6; + target: "clipper"; + target: "shower"; + after: "hide3"; + } + program { name: "show1_custom1"; + signal: "e,state,visible,on,custom1"; + source: "e"; + action: STATE_SET "custom1" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "show2_custom1"; + } + program { name: "show2_custom1"; + action: STATE_SET "visible" 0.0; + transition: DECELERATE 0.5; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "show3"; + } + program { name: "hide1_custom1"; + signal: "e,state,visible,off,custom1"; + source: "e"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "hide2_custom1"; + } + program { name: "hide2_custom1"; + action: STATE_SET "custom1" 0.0; + transition: DECELERATE 0.5; + target: "clipper"; + target: "shower"; + after: "hide3"; + } + } +} /* end of group "shadow_fade" */ diff --git a/comp-slp/data/group/shadow_twist.edc b/comp-slp/data/group/shadow_twist.edc new file mode 100644 index 0000000..476ef53 --- /dev/null +++ b/comp-slp/data/group/shadow_twist.edc @@ -0,0 +1,860 @@ +/*-----------------------------------------------------*/ +/* group "shadow_twist" */ +/*-----------------------------------------------------*/ +group { name: "shadow_twist"; + #include "../common/comp-config.edc" + images { + image: "comp-sh1.png" COMP; + image: "bt_glow.png" COMP; + } + parts { + part { name: "clipper"; + type: RECT; + mouse_events: 0; + description { state: "default" 0.0; + visible: 1; + color: 255 255 255 0; + rel1 { + relative: -1.0 -1.0; + offset: -9999 -9999; + } + rel2 { + relative: 2.0 2.0; + offset: 9999 9999; + } + } + description { state: "interval" 0.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 255; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 255; + } + description { state: "foreground" 0.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 255; + } + description { state: "background" 0.0; + inherit: "default" 0.0; + visible: 1; + color: 180 180 180 255; + } + description { state: "switcher" 0.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 255; + } + description { state: "switcher2" 0.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 255; + } + description { state: "hide" 0.0; + inherit: "default" 0.0; + visible: 0; + color: 0 0 0 0; + } + description { state: "default" 1.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 255; + } + description { state: "default" 0.5; + inherit: "default" 0.0; + visible: 0; + color: 0 0 0 0; + } + } + part { name: "shower"; + type: RECT; + mouse_events: 0; + description { state: "default" 0.0; + visible: 0; + rel1 { + relative: 0.0 0.0; + } + rel2 { + relative: 1.0 1.0; + } + } + description { state: "interval" 0.0; + visible: 0; + rel1 { + relative: 0.0 0.0; + } + rel2 { + relative: 1.0 1.0; + } + } + description { state: "switcher" 0.0; + visible: 0; + rel1 { + relative: 0.0 0.0; + } + rel2 { + relative: 1.0 1.0; + } + } + description { state: "switcher2" 0.0; + inherit: "switcher" 0.0; + } + description { state: "visible" 0.0; + visible: 0; + rel1 { + relative: 0.0 0.0; + } + rel2 { + relative: 1.0 1.0; + } + } + description { state: "foreground" 0.0; + inherit: "default" 0.0; + } + description { state: "background" 0.0; + visible: 0; + rel1 { + relative: 0.10 0.10; + } + rel2 { + relative: 0.90 0.90; + } + } + description { state: "hide" 0.0; + inherit: "default" 0.0; + rel1 { + relative: 0.0 0.0; + } + rel2 { + relative: 1.0 1.0; + } + } + description { state: "indicator_raise_above" 0.0; + inherit : "default" 0.0; + rel1 { + relative: 0.0 0.0; + } + rel2 { + relative: 1.0 1.0; + } + } + description { state: "indicator_raise_above" 0.1; + inherit : "default" 0.0; + rel1 { + relative: 0.0 -1.0; + } + rel2 { + relative: 1.0 0.0; + } + } + } + part { name: "persp"; + type: RECT; + description { state: "default" 0.0; + min: 10 10; + max: 10 10; + visible: 0; + perspective.zplane: -1500; + perspective.focal: 1000; + } + description { state: "interval" 0.0; + inherit: "default" 0.0; + perspective.zplane: -750; + perspective.focal: 1000; + } + description { state: "switcher" 0.0; + inherit: "default" 0.0; + perspective.zplane: -500; + perspective.focal: 1000; + } + description { state: "switcher2" 0.0; + inherit: "default" 0.0; + perspective.zplane: -500; + perspective.focal: 1000; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + perspective.zplane: 0; + perspective.focal: 1000; + } + description { state: "hide" 0.0; + inherit: "default" 0.0; + perspective.zplane: -1500; + perspective.focal: 1000; + } + } + part { name: "e.swallow.content"; + type: SWALLOW; + clip_to: "clipper"; + mouse_events: 0; + description { state: "default" 0.0; + rel1 { + to: "shower"; + relative: 0.0 0.0; + } + rel2 { + to: "shower"; + relative: 1.0 1.0; + } + map { + on: 1; + smooth: 1; + backface_cull: 0; + perspective_on: 1; + alpha: 1; + perspective: "persp"; + rotation { + x: 0; + y: 90; + z: 0; + } + } + } + description { state: "interval" 0.0; + rel1 { + to: "shower"; + relative: 0.0 0.0; + } + rel2 { + to: "shower"; + relative: 1.0 1.0; + } + map { + on: 1; + smooth: 1; + backface_cull: 0; + perspective_on: 1; + alpha: 1; + perspective: "persp"; + rotation { + x: 0; + y: 30; + z: 0; + } + } + } + description { state: "switcher" 0.0; + rel1 { + to: "shower"; + relative: 0.0 0.0; + } + rel2 { + to: "shower"; + relative: 1.0 1.0; + } + map { + on: 1; + smooth: 1; + backface_cull: 0; + perspective_on: 1; + alpha: 1; + perspective: "persp"; + rotation { + x: 0; + y: 75; + z: 0; + } + } + } + description { state: "switcher2" 0.0; + rel1 { + to: "shower"; + relative: 0.0 0.0; + } + rel2 { + to: "shower"; + relative: 1.0 1.0; + } + map { + on: 1; + smooth: 1; + backface_cull: 0; + perspective_on: 1; + alpha: 1; + perspective: "persp"; + rotation { + x: 0; + y: 45; + z: 0; + } + } + } + description { state: "visible" 0.0; + rel1 { + to: "shower"; + relative: 0.0 0.0; + } + rel2 { + to: "shower"; + relative: 1.0 1.0; + } + map { + on: 1; + smooth: 1; + backface_cull: 0; + perspective_on: 1; + alpha: 1; + perspective: "persp"; + rotation { + x: 0; + y: 0; + z: 0; + } + } + } + description { state: "hide" 0.0; + rel1 { + to: "shower"; + relative: 0.0 0.0; + } + rel2 { + to: "shower"; + relative: 1.0 1.0; + } + map { + on: 1; + smooth: 1; + backface_cull: 0; + perspective_on: 1; + alpha: 1; + perspective: "persp"; + rotation { + x: 0; + y: 90; + z: 0; + } + } + } + description { state: "visible" 1.0; + inherit: "visible" 0.0; + rel1 { + to: "shower"; + } + rel2 { + to: "shower"; + } + map.on: 0; + } + description { state: "foreground" 0.0; + rel1 { + to: "shower"; + relative: 0.0 0.0; + } + rel2 { + to: "shower"; + relative: 1.0 1.0; + } + map.on: 0; + } + description { state: "background" 0.0; + inherit: "foreground" 0.0; + } + description { state: "default" 1.0; + inherit: "visible" 1.0; + rel1.relative: 0 0; + rel2.relative: 1.0 1.0; + } + description { state: "default" 0.5; + inherit: "visible" 1.0; + rel1.relative: 0 0; + rel2.relative: 1.0 1.0; + } + /*-------------------------------------------------------------------*/ + /* window roation state for swallow */ + /* it must be below default state. */ + /*-------------------------------------------------------------------*/ + #include "../common/comp-part-swallow-rotation-on-effect-for-win.edc" + /*-------------------------------------------------------------------*/ + } + } + programs { + program { name: "show1"; + signal: "e,state,visible,on"; + source: "e"; + action: STATE_SET "default" 0.0; + target: "clipper"; + target: "shower"; + target: "persp"; + target: "e.swallow.content"; + after: "show2"; + } + program { name: "show2"; + action: STATE_SET "interval" 0.0; + target: "clipper"; + target: "shower"; + target: "persp"; + target: "e.swallow.content"; + transition: LINEAR 0.2; + after: "show3"; + } + program { name: "show3"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + target: "persp"; + target: "e.swallow.content"; + transition: LINEAR 0.1; + after: "show4"; + } + program { name: "show4"; + action: SIGNAL_EMIT "e,action,show,done" "e"; + } + program { name: "hide1"; + signal: "e,state,visible,off"; + source: "e"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + target: "persp"; + target: "e.swallow.content"; + after: "hide2"; + } + program { name: "hide2"; + action: STATE_SET "interval" 0.0; + target: "clipper"; + target: "shower"; + target: "persp"; + target: "e.swallow.content"; + transition: LINEAR 0.1; + after: "hide3"; + } + program { name: "hide3"; + action: STATE_SET "default" 0.0; + target: "clipper"; + target: "shower"; + target: "persp"; + target: "e.swallow.content"; + transition: LINEAR 0.2; + after: "hide4"; + } + program { name: "hide4"; + action: SIGNAL_EMIT "e,action,hide,done" "e"; + } + program { name: "raise_above_hide1"; + signal: "e,state,raise_above,off"; + source: "e"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + target: "persp"; + target: "e.swallow.content"; + after: "raise_above_hide2"; + } + program { name: "raise_above_hide2"; + action: STATE_SET "interval" 0.0; + target: "clipper"; + target: "shower"; + target: "persp"; + target: "e.swallow.content"; + transition: LINEAR 0.1; + after: "raise_above_hide3"; + } + program { name: "raise_above_hide3"; + action: STATE_SET "default" 0.0; + target: "clipper"; + target: "shower"; + target: "persp"; + target: "e.swallow.content"; + transition: LINEAR 0.2; + after: "raise_above_hide4"; + } + program { name: "raise_above_hide4"; + action: SIGNAL_EMIT "e,action,raise_above_hide,done" "e"; + } + program { name: "raise_above_hide_post_work"; + signal: "e,state,raise_above_post,on"; + source: "e"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + target: "persp"; + target: "e.swallow.content"; + } + program { name: "switcher_on"; + signal: "e,state,switcher,on"; + source: "e"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + target: "persp"; + target: "e.swallow.content"; + after: "switcher_on2"; + } + program { name: "switcher_on2"; + action: STATE_SET "switcher" 0.0; + target: "clipper"; + target: "shower"; + target: "persp"; + target: "e.swallow.content"; + after: "switcher_on3"; + } + program { name: "switcher_on3"; + action: STATE_SET "switcher2" 0.0; + target: "e.swallow.content"; + transition: LINEAR 0.3; + after: "switcher_on4"; + } + program { name: "switcher_on4"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + target: "persp"; + target: "e.swallow.content"; + after: "switcher_on5"; + } + program { name: "switcher_on5"; + action: SIGNAL_EMIT "e,action,show,done" "e"; + } + program { name: "switcher_on_top"; + signal: "e,state,switcher_top,on"; + source: "e"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + target: "persp"; + target: "e.swallow.content"; + after: "switcher_on_top2"; + after: "switcher_on_top2_2"; + } + program { name: "switcher_on_top2"; + action: STATE_SET "switcher" 0.0; + target: "clipper"; + target: "shower"; + target: "persp"; + transition: LINEAR 0.3; + after: "switcher_on_top3"; + } + program { name: "switcher_on_top2_2"; + action: STATE_SET "switcher2" 0.0; + target: "e.swallow.content"; + transition: ACCELERATE 0.3; + } + program { name: "switcher_on_top3"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + target: "persp"; + target: "e.swallow.content"; + after: "switcher_on_top4"; + } + program { name: "switcher_on_top4"; + action: SIGNAL_EMIT "e,action,show,done" "e"; + } + program { name: "raise_above3"; + signal: "e,state,raise_above3,on"; + source: "e"; + action: STATE_SET "indicator_raise_above" 0.0; + target: "shower"; + after: "raise_above3_2"; + } + program { name: "raise_above3_2"; + action: STATE_SET "indicator_raise_above" 0.1; + transition: SINUSOIDAL 0.2; + target: "shower"; + after: "raise_above3_3"; + } + program { name: "raise_above3_3"; + action: STATE_SET "indicator_raise_above" 0.1; + transition: LINEAR 0.16; + target: "shower"; + after: "raise_above3_4"; + } + program { name: "raise_above3_4"; + action: STATE_SET "indicator_raise_above" 0.0; + transition: SINUSOIDAL 0.2; + target: "shower"; + after: "raise_above3_done"; + } + program { name: "raise_above3_done"; + action: SIGNAL_EMIT "e,action,raise_above3,done" "e"; + } + program { name: "show1_noeffect"; + signal: "e,state,visible,on,noeffect"; + source: "e"; + action: STATE_SET "default" 0.0; + target: "clipper"; + target: "shower"; + target: "persp"; + target: "e.swallow.content"; + after: "show2_noeffect"; + } + program { name: "show2_noeffect"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + target: "persp"; + target: "e.swallow.content"; + after: "show4"; + } + program { name: "hide1_noeffect"; + signal: "e,state,visible,off,noeffect"; + source: "e"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + target: "persp"; + target: "e.swallow.content"; + after: "hide2_noeffect"; + } + program { name: "hide2_noeffect"; + action: STATE_SET "hide" 0.0; + target: "clipper"; + target: "shower"; + target: "persp"; + target: "e.swallow.content"; + after: "hide3"; + } + program { name: "show_background1"; + signal: "e,state,background,visible,on"; + source: "e"; + action: STATE_SET "foreground" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "show_background2"; + } + program { name: "show_background2"; + action: STATE_SET "background" 0.0; + transition: LINEAR 0.3; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "show_background3"; + } + program { name: "show_background3"; + action: STATE_SET "background" 0.0; + transition: LINEAR 0.1; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "show_background4"; + } + program { name: "show_background4"; + action: STATE_SET "foreground" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "show_background5"; + } + program { name: "show_background5"; + action: SIGNAL_EMIT "e,action,background,show,done" "e"; + } + program { name: "hide_background1"; + signal: "e,state,background,visible,off"; + source: "e"; + action: STATE_SET "foreground" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "hide_background2"; + } + program { name: "hide_background2"; + action: STATE_SET "background" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "hide_background3"; + } + program { name: "hide_background3"; + action: STATE_SET "foreground" 0.0; + transition: LINEAR 0.3; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "hide_background4"; + } + program { name: "hide_background4"; + action: SIGNAL_EMIT "e,action,background,hide,done" "e"; + } + program { name: "show1_custom0"; + signal: "e,state,visible,on,custom0"; + source: "e"; + action: STATE_SET "default" 0.0; + target: "clipper"; + target: "shower"; + target: "persp"; + target: "e.swallow.content"; + after: "show2_custom0"; + } + program { name: "show2_custom0"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + target: "persp"; + target: "e.swallow.content"; + after: "show3"; + } + program { name: "hide1_custom0"; + signal: "e,state,visible,off,custom0"; + source: "e"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + target: "persp"; + target: "e.swallow.content"; + after: "hide2_custom0"; + } + program { name: "hide2_custom0"; + action: STATE_SET "hide" 0.0; + target: "clipper"; + target: "shower"; + target: "persp"; + target: "e.swallow.content"; + after: "hide3"; + } + program { name: "show1_custom1"; + signal: "e,state,visible,on,custom1"; + source: "e"; + action: STATE_SET "default" 0.0; + target: "clipper"; + target: "shower"; + target: "persp"; + target: "e.swallow.content"; + after: "show2_custom1"; + } + program { name: "show2_custom1"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + target: "persp"; + target: "e.swallow.content"; + after: "show3"; + } + program { name: "hide1_custom1"; + signal: "e,state,visible,off,custom1"; + source: "e"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + target: "persp"; + target: "e.swallow.content"; + after: "hide2_custom1"; + } + program { name: "hide2_custom1"; + action: STATE_SET "hide" 0.0; + target: "clipper"; + target: "shower"; + target: "persp"; + target: "e.swallow.content"; + after: "hide3"; + } + program { name: "fake_show_background1"; + signal: "e,state,fake,background,visible,on"; + source: "e"; + action: STATE_SET "foreground" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "fake_show_background2"; + } + program { name: "fake_show_background2"; + action: STATE_SET "background" 0.0; + transition: LINEAR 0.44; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "fake_show_background3"; + } + program { name: "fake_show_background3"; + action: STATE_SET "foreground" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "fake_show_background4"; + } + program { name: "fake_show_background4"; + action: SIGNAL_EMIT "e,action,background,show,done" "e"; + } + program { name: "fake_hide_background1"; + signal: "e,state,fake,background,visible,off"; + source: "e"; + action: STATE_SET "foreground" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "fake_hide_background2"; + } + program { name: "fake_hide_background2"; + action: STATE_SET "background" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "fake_hide_background3"; + } + program { name: "fake_hide_background3"; + action: STATE_SET "foreground" 0.0; + transition: LINEAR 0.44; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "fake_hide_background4"; + } + program { name: "fake_hide_background4"; + action: SIGNAL_EMIT "e,action,background,hide,done" "e"; + } + /*------------------------------------------------------------*/ + /* window roation Program */ + /*------------------------------------------------------------*/ + #include "../common/comp-prog-rotation-on-effect-for-win.edc" + /*------------------------------------------------------------*/ + program { name: "prog-window-rotation-default--270"; + signal: "e,state,window,rotation,-270"; + source: "e"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + target: "persp"; + } + program { name: "prog-window-rotation-default--180"; + signal: "e,state,window,rotation,-180"; + source: "e"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + target: "persp"; + } + program { name: "prog-window-rotation-default--90"; + signal: "e,state,window,rotation,-90"; + source: "e"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + target: "persp"; + } + program { name: "prog-window-rotation-default-0"; + signal: "e,state,window,rotation,0"; + source: "e"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + target: "persp"; + } + program { name: "prog-window-rotation-default-90"; + signal: "e,state,window,rotation,90"; + source: "e"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + target: "persp"; + } + program { name: "prog-window-rotation-default-180"; + signal: "e,state,window,rotation,180"; + source: "e"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + target: "persp"; + } + program { name: "prog-window-rotation-default-270"; + signal: "e,state,window,rotation,270"; + source: "e"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + target: "persp"; + } + } +} /* end of group "shadow_twist" */ diff --git a/comp-slp/data/group/task_switcher.edc b/comp-slp/data/group/task_switcher.edc new file mode 100644 index 0000000..4e26c0d --- /dev/null +++ b/comp-slp/data/group/task_switcher.edc @@ -0,0 +1,306 @@ +/*-----------------------------------------------------*/ +/* group "taskmgr" */ +/*-----------------------------------------------------*/ +group { name: "taskmgr"; + images { + image: "comp-sh1.png" COMP; + image: "bt_glow.png" COMP; + } + parts { + part { name: "clipper"; + type: RECT; + mouse_events: 0; + description { state: "default" 0.0; + visible: 1; + color: 255 255 255 255; + rel1 { + relative: -1.0 -1.0; + offset: -9999 -9999; + } + rel2 { + relative: 2.0 2.0; + offset: 9999 9999; + } + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 255; + } + } + part { name: "shower"; + type: RECT; + mouse_events: 0; + description { state: "default" 0.0; + visible: 0; + rel1 { + relative: 0.0 1.0; + } + rel2 { + relative: 1.0 2.0; + } + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + rel1 { + relative: 0.0 0.0; + } + rel2 { + relative: 1.0 1.0; + } + } + description { state: "indicator_raise_above" 0.0; + inherit : "default" 0.0; + rel1 { + relative : 0.0 0.0; + offset: 0 0; + } + rel2 { + relative : 1.0 1.0; + } + } + description { state: "indicator_raise_above" 0.1; + inherit : "default" 0.0; + rel1 { + relative : 0.0 -1.0; + offset: 0 0; + } + rel2 { + relative : 1.0 0.0; + } + } + } + part { name: "e.swallow.content"; + type: SWALLOW; + clip_to: "clipper"; + mouse_events: 0; + + description { state: "default" 0.0; + rel1 { + to: "shower"; + } + rel2 { + to: "shower"; + } + } + description { state: "visible" 0.0; + rel1 { + to: "shower"; + } + rel2 { + to: "shower"; + } + } + } + } + programs { + program { name: "show1"; + signal: "e,state,visible,on"; + source: "e"; + action: STATE_SET "default" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "show2"; + } + program { name: "show2"; + action: STATE_SET "visible" 0.0; + transition: LINEAR 0.3; + target : "clipper"; + target : "shower"; + target: "e.swallow.content"; + after : "show3"; + } + program { name: "show3"; + action: SIGNAL_EMIT "e,action,show,done" "e"; + } + program { name: "hide1"; + signal: "e,state,visible,off"; + source: "e"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "hide2"; + } + program { name: "hide2"; + action: STATE_SET "default" 0.0; + transition: LINEAR 0.66; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "hide3"; + } + program { name: "hide3"; + action: SIGNAL_EMIT "e,action,hide,done" "e"; + } + program { name: "raise_above_hide1"; + signal: "e,state,raise_above,off"; + source: "e"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "raise_above_hide2"; + } + program { name: "raise_above_hide2"; + action: STATE_SET "default" 0.0; + transition: LINEAR 0.66; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "raise_above_hide3"; + } + program { name: "raise_above_hide3"; + action: SIGNAL_EMIT "e,action,raise_above_hide,done" "e"; + } + program { name: "raise_above_hide_post_work"; + signal: "e,state,raise_above_post,on"; + source: "e"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + } + program { name: "raise_above3"; + signal: "e,state,raise_above3,on"; + source: "e"; + action: STATE_SET "indicator_raise_above" 0.0; + target: "shower"; + after: "raise_above3_2"; + } + program { name: "raise_above3_2"; + action : STATE_SET "indicator_raise_above" 0.1; + transition: SINUSOIDAL 0.3; + target: "shower"; + after : "raise_above3_3"; + } + program { name: "raise_above3_3"; + action : STATE_SET "indicator_raise_above" 0.1; + transition: LINEAR 0.25; + target: "shower"; + after : "raise_above3_4"; + } + program { name: "raise_above3_4"; + action : STATE_SET "indicator_raise_above" 0.0; + transition: SINUSOIDAL 0.3; + target: "shower"; + after : "raise_above3_done"; + } + program { name: "raise_above3_done"; + action: SIGNAL_EMIT "e,action,raise_above3,done" "e"; + } + program { name: "show1_noeffect"; + signal: "e,state,visible,on,noeffect"; + source: "e"; + action: STATE_SET "default" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "show2_noeffect"; + } + program { name: "show2_noeffect"; + action: STATE_SET "visible" 0.0; + target : "clipper"; + target : "shower"; + target: "e.swallow.content"; + after : "show3"; + } + program { name: "hide1_noeffect"; + signal: "e,state,visible,off,noeffect"; + source: "e"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "hide2_noeffect"; + } + program { name: "hide2_noeffect"; + action: STATE_SET "default" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "hide3"; + } + program { name: "show_background1"; + signal: "e,state,background,visible,on"; + source: "e"; + after: "show_background2"; + } + program { name: "show_background2"; + action: SIGNAL_EMIT "e,action,background,show,done" "e"; + } + program { name: "hide_background1"; + signal: "e,state,background,visible,off"; + source: "e"; + after: "hide_background2"; + } + program { name: "hide_background2"; + action: SIGNAL_EMIT "e,action,background,hide,done" "e"; + } + program { name: "show1_custom0"; + signal: "e,state,visible,on,custom0"; + source: "e"; + action: STATE_SET "default" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "show2_custom0"; + } + program { name: "show2_custom0"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "show3"; + } + program { name: "hide1_custom0"; + signal: "e,state,visible,off,custom0"; + source: "e"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "hide2_custom0"; + } + program { name: "hide2_custom0"; + action: STATE_SET "default" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "hide3"; + } + program { name: "show1_custom1"; + signal: "e,state,visible,on,custom1"; + source: "e"; + action: STATE_SET "default" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "show2_custom1"; + } + program { name: "show2_custom1"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "show3"; + } + program { name: "hide1_custom1"; + signal: "e,state,visible,off,custom1"; + source: "e"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "hide2_custom1"; + } + program { name: "hide2_custom1"; + action: STATE_SET "default" 0.0; + target: "clipper"; + target: "shower"; + target: "e.swallow.content"; + after: "hide3"; + } + } +} /* end of group "taskmgr" */ diff --git a/comp-slp/data/group/wnd_rot_prev_pixmap.edc b/comp-slp/data/group/wnd_rot_prev_pixmap.edc new file mode 100644 index 0000000..79a4509 --- /dev/null +++ b/comp-slp/data/group/wnd_rot_prev_pixmap.edc @@ -0,0 +1,290 @@ +/*-----------------------------------------------------*/ +/* group "wnd_rot_prev_pixmap" */ +/*-----------------------------------------------------*/ +group { name: "wnd_rot_prev_pixmap"; + #include "../common/comp-script.edc" + parts { + part { name: "clipper"; + type: RECT; + mouse_events: 0; + description { state: "default" 0.0; + visible: 0; + color: 0 0 0 0; + rel1.relative: -1.0 -1.0; + rel1.offset: -9999 -9999; + rel2.relative: 2.0 2.0; + rel2.offset: 9999 9999; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 0; + color: 255 255 255 255; + } + description { state: "hide" 0.0; + inherit: "default" 0.0; + visible: 0; + color: 255 255 255 128; + } + } /* end of part "clipper" */ + part { name: "persp"; + type: RECT; + description { state: "default" 0.0; + min: 1 1; + max: 1 1; + visible: 0; + perspective.zplane: 0; + perspective.focal: 1000; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + perspective.zplane: 0; + } + description { state: "hide" 0.0; + inherit: "default" 0.0; + perspective.zplane: 0; + } + } /* end of part "persp" */ + part { name: "shower"; + type: RECT; + mouse_events: 0; + description { state: "default" 0.0; + visible: 0; + rel1.relative: 0.0 0.0; + rel2.relative: 1.0 1.0; + } + } /* end of part "shower" */ + part { name: "e.swallow.content"; + type: SWALLOW; + clip_to: "clipper"; + mouse_events: 0; + description { state: "default" 0.0; + rel1.to: "shower"; + rel2.to: "shower"; + map { + on: 1; + smooth: 1; + backface_cull: 0; + perspective_on: 1; + alpha: 1; + perspective: "persp"; + rotation.x: 0.0; + rotation.y: 0.0; + rotation.z: 0.0; + } + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + map.rotation.z: 0.0; + } + description { state: "visible-rot--270" 0.0; + inherit: "default" 0.0; + map.perspective: "persp"; + map.rotation.z: -270.0; + } + description { state: "visible-rot--180" 0.0; + inherit: "default" 0.0; + map.perspective: "persp"; +#if USE_ORI + map.rotation.z: -180.0; +#else + map.rotation.z: -45.0; +#endif + } + description { state: "visible-rot--90" 0.0; + inherit: "default" 0.0; + map.perspective: "persp"; +#if USE_ORI + map.rotation.z: -90.0; +#else + map.rotation.z: -22.0; +#endif + rel1.offset: 160 -160; + rel2.offset: 160 -160; + } + description { state: "visible-rot-0" 0.0; + inherit: "default" 0.0; + map.perspective: "persp"; + map.rotation.z: 0.0; + } + description { state: "visible-rot-90" 0.0; + inherit: "default" 0.0; + map.perspective: "persp"; +#if USE_ORI + map.rotation.z: 90.0; +#else + map.rotation.z: 22.0; +#endif + rel1.offset: -160 -160; + rel2.offset: -160 -160; + } + description { state: "visible-rot-180" 0.0; + inherit: "default" 0.0; + map.perspective: "persp"; +#if USE_ORI + map.rotation.z: 180.0; +#else + map.rotation.z: 45.0; +#endif + } + description { state: "visible-rot-270" 0.0; + inherit: "default" 0.0; + map.perspective: "persp"; + map.rotation.z: 270.0; + } + } /* end of part "swallow" */ + #include "../common/comp-part-logger.edc" + } /* end of parts */ + programs { + // ------------------------------------------------ + program { name: "prog-clipper-show"; + signal: "e,state,visible,on"; + source: "e"; + action: STATE_SET "default" 0.0; + target: "clipper"; + after: "prog-clipper-show-done"; + } + program { name: "prog-clipper-show-done"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + } + program { name: "prog-clipper-hide"; + signal: "e,state,visible,off"; + source: "*"; + action: STATE_SET "visible" 0.0; + target: "clipper"; + target: "persp"; + after: "prog-clipper-hide-done"; + } + program { name: "prog-clipper-hide-done"; + action: STATE_SET "hide" 0.0; + transition: DURATION_WND_ROT_PREV_PIXMAP_CLIPPER_HIDE; + target: "clipper"; + target: "persp"; + } + // ------------------------------------------------ + program { name: "prog-emit-show-done"; + action: SIGNAL_EMIT "e,action,show,done" "e"; + } + program { name: "prog-emit-window-rotation-done"; + action: SIGNAL_EMIT "e,action,window,rotation,done" "e"; + } + program { name: "prog-swallow-show"; + signal: "e,state,visible,on"; + source: "e"; + action: STATE_SET "default" 0.0; + target: "e.swallow.content"; + after: "prog-swallow-show-done"; + } + program { name: "prog-swallow-show-done"; + action: STATE_SET "visible" 0.0; + target: "e.swallow.content"; + after: "prog-emit-show-done"; + } + program { name: "prog-swallow-show-rotation-180"; + signal: "e,state,visible,on"; + source: "e.rot.180"; + action: STATE_SET "default" 0.0; + target: "e.swallow.content"; + after: "prog-swallow-show-rotation-180-done"; + } + program { name: "prog-swallow-show-rotation-180-done"; + action: STATE_SET "visible-rot-180" 0.0; + target: "e.swallow.content"; + after: "prog-emit-show-done"; + } + // ------------------------------------------------ + program { name: "prog-swallow-hide-rotation--270"; + signal: "e,state,visible,off"; + source: "e.rot.-270"; + action: STATE_SET "visible" 0.0; + target: "e.swallow.content"; + after: "prog-swallow-hide-rotation--270-done"; + } + program { name: "prog-swallow-hide-rotation--270-done"; + action: STATE_SET "visible-rot--270" 0.0; + transition: DURATION_WND_ROT_PREV_PIXMAP_SWALLOW_HIDE; + target: "e.swallow.content"; + after: "prog-emit-window-rotation-done"; + } + program { name: "prog-swallow-hide-rotation--180"; + signal: "e,state,visible,off"; + source: "e.rot.-180"; + action: STATE_SET "visible" 0.0; + target: "e.swallow.content"; + after: "prog-swallow-hide-rotation--180-done"; + } + program { name: "prog-swallow-hide-rotation--180-done"; + action: STATE_SET "visible-rot--180" 0.0; + transition: DURATION_WND_ROT_PREV_PIXMAP_SWALLOW_HIDE; + target: "e.swallow.content"; + after: "prog-emit-window-rotation-done"; + } + program { name: "prog-swallow-hide-rotation--90"; + signal: "e,state,visible,off"; + source: "e.rot.-90"; + action: STATE_SET "visible" 0.0; + target: "e.swallow.content"; + after: "prog-swallow-hide-rotation--90-done"; + } + program { name: "prog-swallow-hide-rotation--90-done"; + action: STATE_SET "visible-rot--90" 0.0; + transition: DURATION_WND_ROT_PREV_PIXMAP_SWALLOW_HIDE; + target: "e.swallow.content"; + after: "prog-emit-window-rotation-done"; + } + + program { name: "prog-swallow-hide-rotation-0"; + signal: "e,state,visible,off"; + source: "e.rot.0"; + action: STATE_SET "visible" 0.0; + target: "e.swallow.content"; + after: "prog-swallow-hide-rotation-0-done"; + } + program { name: "prog-swallow-hide-rotation-0-done"; + action: STATE_SET "visible-rot-0" 0.0; + transition: DURATION_WND_ROT_PREV_PIXMAP_SWALLOW_HIDE; + target: "e.swallow.content"; + after: "prog-emit-window-rotation-done"; + } + program { name: "prog-swallow-hide-rotation-90"; + signal: "e,state,visible,off"; + source: "e.rot.90"; + action: STATE_SET "visible" 0.0; + target: "e.swallow.content"; + after: "prog-swallow-hide-rotation-90-done"; + } + program { name: "prog-swallow-hide-rotation-90-done"; + action: STATE_SET "visible-rot-90" 0.0; + transition: DURATION_WND_ROT_PREV_PIXMAP_SWALLOW_HIDE; + target: "e.swallow.content"; + after: "prog-emit-window-rotation-done"; + } + program { name: "prog-swallow-hide-rotation-180"; + signal: "e,state,visible,off"; + source: "e.rot.180"; + action: STATE_SET "visible" 0.0; + target: "e.swallow.content"; + after: "prog-swallow-hide-rotation-180-done"; + } + program { name: "prog-swallow-hide-rotation-180-done"; + action: STATE_SET "visible-rot-180" 0.0; + transition: DURATION_WND_ROT_PREV_PIXMAP_SWALLOW_HIDE; + target: "e.swallow.content"; + after: "prog-emit-window-rotation-done"; + } + program { name: "prog-swallow-hide-rotation-270"; + signal: "e,state,visible,off"; + source: "e.rot.270"; + action: STATE_SET "visible" 0.0; + target: "e.swallow.content"; + after: "prog-swallow-hide-rotation-270-done"; + } + program { name: "prog-swallow-hide-rotation-270-done"; + action: STATE_SET "visible-rot-270" 0.0; + transition: DURATION_WND_ROT_PREV_PIXMAP_SWALLOW_HIDE; + target: "e.swallow.content"; + after: "prog-emit-window-rotation-done"; + } + // ------------------------------------------------ + } /* end of programs */ +} /* end of group "wnd_rot_prev_pixmap" */ diff --git a/comp-slp/data/images/bt_glow.png b/comp-slp/data/images/bt_glow.png new file mode 100644 index 0000000..25891a1 Binary files /dev/null and b/comp-slp/data/images/bt_glow.png differ diff --git a/comp-slp/data/images/capture.png b/comp-slp/data/images/capture.png new file mode 100644 index 0000000..cbf6918 Binary files /dev/null and b/comp-slp/data/images/capture.png differ diff --git a/comp-slp/data/images/comp-sh1.png b/comp-slp/data/images/comp-sh1.png new file mode 100644 index 0000000..a57568f Binary files /dev/null and b/comp-slp/data/images/comp-sh1.png differ diff --git a/comp-slp/data/shadow.edc b/comp-slp/data/shadow.edc new file mode 100644 index 0000000..e98ef51 --- /dev/null +++ b/comp-slp/data/shadow.edc @@ -0,0 +1,70 @@ +#include "common/comp-style.edc" + +collections { + + /*-----------------------------------------------------*/ + /* group "shadow" */ + /*-----------------------------------------------------*/ + #include "group/shadow_default.edc" + + /*-----------------------------------------------------*/ + /* group "shadow_twist" */ + /*-----------------------------------------------------*/ + #include "group/shadow_twist.edc" + + /*-----------------------------------------------------*/ + /* group "wnd_rot_prev_pixmap" */ + /*-----------------------------------------------------*/ + #include "group/wnd_rot_prev_pixmap.edc" + + /*-----------------------------------------------------*/ + /* group "shadow_fade" */ + /*-----------------------------------------------------*/ + #include "group/shadow_fade.edc" + + /*-----------------------------------------------------*/ + /* group "taskmgr" */ + /*-----------------------------------------------------*/ + #include "group/task_switcher.edc" + + /*-----------------------------------------------------*/ + /* group "lockscreen" */ + /*-----------------------------------------------------*/ + #include "group/lock_screen.edc" + + /*-----------------------------------------------------*/ + /* group "dialog" */ + /*-----------------------------------------------------*/ + #include "group/dialog.edc" + + /*-----------------------------------------------------*/ + /* group "indicator" */ + /*-----------------------------------------------------*/ + #include "group/indicator.edc" + + /*-----------------------------------------------------*/ + /* group "no-effect" */ + /*-----------------------------------------------------*/ + #include "group/no_effect.edc" + + /*-----------------------------------------------------*/ + /* group "fake_effect" */ + /*-----------------------------------------------------*/ + #include "group/fake_effect_default.edc" + + /*-----------------------------------------------------*/ + /* group "fake_effect_twist" */ + /*-----------------------------------------------------*/ + #include "group/fake_effect_twist.edc" + + /*-----------------------------------------------------*/ + /* group "fake_effect_fade" */ + /*-----------------------------------------------------*/ + #include "group/fake_effect_fade.edc" + + /*-----------------------------------------------------*/ + /* group "capture_effect" */ + /*-----------------------------------------------------*/ + #include "group/capture_effect.edc" + +} /* end of collections */ diff --git a/comp-slp/m4/ac_attribute.m4 b/comp-slp/m4/ac_attribute.m4 new file mode 100644 index 0000000..23479a9 --- /dev/null +++ b/comp-slp/m4/ac_attribute.m4 @@ -0,0 +1,47 @@ +dnl Copyright (C) 2004-2008 Kim Woelders +dnl Copyright (C) 2008 Vincent Torri +dnl That code is public domain and can be freely used or copied. +dnl Originally snatched from somewhere... + +dnl Macro for checking if the compiler supports __attribute__ + +dnl Usage: AC_C___ATTRIBUTE__ +dnl call AC_DEFINE for HAVE___ATTRIBUTE__ and __UNUSED__ +dnl if the compiler supports __attribute__, HAVE___ATTRIBUTE__ is +dnl defined to 1 and __UNUSED__ is defined to __attribute__((unused)) +dnl otherwise, HAVE___ATTRIBUTE__ is not defined and __UNUSED__ is +dnl defined to nothing. + +AC_DEFUN([AC_C___ATTRIBUTE__], +[ + +AC_MSG_CHECKING([for __attribute__]) + +AC_CACHE_VAL([ac_cv___attribute__], + [AC_TRY_COMPILE( + [ +#include + +int func(int x); +int foo(int x __attribute__ ((unused))) +{ + exit(1); +} + ], + [], + [ac_cv___attribute__="yes"], + [ac_cv___attribute__="no"] + )]) + +AC_MSG_RESULT($ac_cv___attribute__) + +if test "x${ac_cv___attribute__}" = "xyes" ; then + AC_DEFINE([HAVE___ATTRIBUTE__], [1], [Define to 1 if your compiler has __attribute__]) + AC_DEFINE([__UNUSED__], [__attribute__((unused))], [Macro declaring a function argument to be unused]) + else + AC_DEFINE([__UNUSED__], [], [Macro declaring a function argument to be unused]) +fi + +]) + +dnl End of ac_attribute.m4 diff --git a/comp-slp/m4/libtool.m4 b/comp-slp/m4/libtool.m4 new file mode 100644 index 0000000..4ceb7f1 --- /dev/null +++ b/comp-slp/m4/libtool.m4 @@ -0,0 +1,7309 @@ +# 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], +[_$0(m4_quote(m4_default([$1], [[, ]])), + m4_quote(m4_if([$2], [], + m4_quote(lt_decl_tag_varnames), + m4_quote(m4_shift($@)))), + m4_split(m4_normalize(m4_quote(_LT_TAGS))))]) +m4_define([_lt_decl_varnames_tagged], [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" + if test "$GCC" = "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*) + # 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 + +#ifdef __cplusplus +extern "C" void exit (int); +#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 ()); + + exit (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*) + 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_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*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + 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*) + # 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' + ;; + +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_name_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 + ;; + +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*) + 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*) + 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*) + # 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 IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + _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' + ;; + icpc* | ecpc* ) + # Intel C++ + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _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*) + ;; + *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*) + # 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 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)='-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*) + # 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 + icc* | ecc* | ifort*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _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*) + _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' + ;; + *) + _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*) + # 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*) + # _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' ;; + 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*) + 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 + 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 + + # 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*) + # 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 ${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*) + 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 + + # 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*) + # _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_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 +]) diff --git a/comp-slp/m4/ltoptions.m4 b/comp-slp/m4/ltoptions.m4 new file mode 100644 index 0000000..e970119 --- /dev/null +++ b/comp-slp/m4/ltoptions.m4 @@ -0,0 +1,368 @@ +# 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*) + 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])]) diff --git a/comp-slp/m4/ltsugar.m4 b/comp-slp/m4/ltsugar.m4 new file mode 100644 index 0000000..9000a05 --- /dev/null +++ b/comp-slp/m4/ltsugar.m4 @@ -0,0 +1,123 @@ +# 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 +]) diff --git a/comp-slp/m4/ltversion.m4 b/comp-slp/m4/ltversion.m4 new file mode 100644 index 0000000..f3c5309 --- /dev/null +++ b/comp-slp/m4/ltversion.m4 @@ -0,0 +1,23 @@ +# 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 3017 ltversion.m4 +# This file is part of GNU Libtool + +m4_define([LT_PACKAGE_VERSION], [2.2.6b]) +m4_define([LT_PACKAGE_REVISION], [1.3017]) + +AC_DEFUN([LTVERSION_VERSION], +[macro_version='2.2.6b' +macro_revision='1.3017' +_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) +_LT_DECL(, macro_revision, 0) +]) diff --git a/comp-slp/m4/lt~obsolete.m4 b/comp-slp/m4/lt~obsolete.m4 new file mode 100644 index 0000000..637bb20 --- /dev/null +++ b/comp-slp/m4/lt~obsolete.m4 @@ -0,0 +1,92 @@ +# 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])]) diff --git a/comp-slp/module.desktop.in b/comp-slp/module.desktop.in new file mode 100644 index 0000000..58accc0 --- /dev/null +++ b/comp-slp/module.desktop.in @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=Link +Name=Illume2 +Icon=e-module-illume2 +X-Enlightenment-ModuleType=system +Comment= +Comment[fr]= +Comment[it]= diff --git a/comp-slp/src/Makefile.am b/comp-slp/src/Makefile.am new file mode 100644 index 0000000..fa32f7a --- /dev/null +++ b/comp-slp/src/Makefile.am @@ -0,0 +1,42 @@ +MAINTAINERCLEANFILES = Makefile.in +MODULE = comp-slp + +#EDJE_CC = @edje_cc@ +#EDJE_FLAGS = -v \ +# @EDJE_DEF@ + +# data files for the module +filesdir = $(libdir)/enlightenment/modules/$(MODULE) + +EXTRA_DIST = $(files_DATA) + +# the module .so file +INCLUDES = -I. \ + -I$(top_srcdir) \ + -I$(top_srcdir)/src \ + @ENLIGHTENMENT_CFLAGS@ + +pkgdir = $(libdir)/enlightenment/modules/$(MODULE)/$(MODULE_ARCH) +pkg_LTLIBRARIES = module.la +module_la_SOURCES = e_mod_main.c \ + e_mod_main.h \ + e_mod_config.c \ + e_mod_config.h \ + e_mod_comp_data.h \ + e_mod_comp.c \ + e_mod_comp.h \ + e_mod_comp_update.c \ + e_mod_comp_update.h \ + e_mod_comp_rotation.c \ + e_mod_comp_rotation.h \ + e_mod_comp_policy.c \ + e_mod_comp_effect.c \ + e_mod_comp_animation.c \ + e_mod_comp_animation.h + +module_la_LIBADD = @ENLIGHTENMENT_LIBS@ @dlopen_libs@ +module_la_LDFLAGS = -module -avoid-version +module_la_DEPENDENCIES = $(top_builddir)/config.h + +uninstall: + rm -rf $(DESTDIR)$(libdir)/enlightenment/modules/$(MODULE) diff --git a/comp-slp/src/e-module-comp-slp.edj b/comp-slp/src/e-module-comp-slp.edj new file mode 100644 index 0000000..2c1f4d2 Binary files /dev/null and b/comp-slp/src/e-module-comp-slp.edj differ diff --git a/comp-slp/src/e_mod_comp.c b/comp-slp/src/e_mod_comp.c new file mode 100644 index 0000000..e81da4f --- /dev/null +++ b/comp-slp/src/e_mod_comp.c @@ -0,0 +1,5765 @@ +////////////////////////////////////////////////////////////////////////// +// +// TODO (no specific order): +// 1. abstract evas object and compwin so we can duplicate the object N times +// in N canvases - for winlist, everything, pager etc. too +// 2. implement "unmapped composite cache" -> N pixels worth of unmapped +// windows to be fully composited. only the most active/recent. +// 3. for unmapped windows - when window goes out of unmapped comp cachew +// make a miniature copy (1/4 width+height?) and set property on window +// with pixmap id +// 8. obey transparent property +// 9. shortcut lots of stuff to draw inside the compositor - shelf, +// wallpaper, efm - hell even menus and anything else in e (this is what +// e18 was mostly about) +// 10. fullscreen windows need to be able to bypass compositing *seems buggy* +// +////////////////////////////////////////////////////////////////////////// + +/* Local Include */ +#include "e.h" +#include "e_mod_main.h" +#include "e_mod_comp.h" +#include "e_mod_comp_update.h" +#include "e_mod_comp_rotation.h" +#include "e_mod_comp_data.h" +#include "e_mod_comp_animation.h" +#include "config.h" + +/* Global Include */ +#include +#include +#include + +/* debug infos */ +#if COMP_LOGGER_BUILD_ENABLE +typedef struct _Comp_Logger Comp_Logger; +struct _Comp_Logger +{ + int logger_type; + char logger_dump_file[256]; +}; +int comp_logger_type = LT_NOTHING; +#define STR_ATOM_CM_LOG "_E_COMP_LOG" +Ecore_X_Atom ATOM_CM_LOG = 0; +#define STR_ATOM_CM_LOG_DUMP_DONE "_E_COMP_LOG_DUMP_DONE" +Ecore_X_Atom ATOM_CM_LOG_DUMP_DONE = 0; +#endif + +/* Macros */ +#define OVER_FLOW 4 +#define _WND_REQUEST_ANGLE_IDX 0 +#define _WND_CURR_ANGLE_IDX 1 +#define STR_ATOM_FAKE_LAUNCH_IMAGE "_E_COMP_FAKE_LAUNCH_IMAGE" +#define STR_ATOM_FAKE_LAUNCH "_E_COMP_FAKE_LAUNCH" +#define STR_ATOM_NET_CM_EFFECT_ENABLE "_NET_CM_EFFECT_ENABLE" +#define STR_ATOM_NET_CM_WINDOW_EFFECT_ENABLE "_NET_CM_WINDOW_EFFECT_ENABLE" +#define STR_ATOM_NET_CM_WINDOW_EFFECT_CLIENT_STATE "_NET_CM_WINDOW_EFFECT_CLIENT_STATE" +#define STR_ATOM_NET_CM_WINDOW_EFFECT_STATE "_NET_CM_WINDOW_EFFECT_STATE" +#define STR_ATOM_NET_CM_WINDOW_EFFECT_TYPE "_NET_CM_WINDOW_EFFECT_TYPE" +#define STR_ATOM_NET_CM_EFFECT_DEFAULT "_NET_CM_EFFECT_DEFAULT" +#define STR_ATOM_NET_CM_EFFECT_NONE "_NET_CM_EFFECT_NONE" +#define STR_ATOM_NET_CM_EFFECT_CUSTOM0 "_NET_CM_EFFECT_CUSTOM0" +#define STR_ATOM_NET_CM_EFFECT_CUSTOM1 "_NET_CM_EFFECT_CUSTOM1" +#define STR_ATOM_NET_CM_EFFECT_CUSTOM2 "_NET_CM_EFFECT_CUSTOM2" +#define STR_ATOM_NET_CM_EFFECT_CUSTOM3 "_NET_CM_EFFECT_CUSTOM3" +#define STR_ATOM_NET_CM_EFFECT_CUSTOM4 "_NET_CM_EFFECT_CUSTOM4" +#define STR_ATOM_NET_CM_EFFECT_CUSTOM5 "_NET_CM_EFFECT_CUSTOM5" +#define STR_ATOM_NET_CM_EFFECT_CUSTOM6 "_NET_CM_EFFECT_CUSTOM6" +#define STR_ATOM_NET_CM_EFFECT_CUSTOM7 "_NET_CM_EFFECT_CUSTOM7" +#define STR_ATOM_NET_CM_EFFECT_CUSTOM8 "_NET_CM_EFFECT_CUSTOM8" +#define STR_ATOM_NET_CM_EFFECT_CUSTOM9 "_NET_CM_EFFECT_CUSTOM9" +#define STR_ATOM_OVERAY_WINDOW "_E_COMP_OVERAY_WINDOW" +#define STR_ATOM_X_HIBERNATION_STATE "X_HIBERNATION_STATE" +#define STR_ATOM_X_SCREEN_ROTATION "X_SCREEN_ROTATION" +#define STR_ATOM_CM_LOCK_SCREEN "_E_COMP_LOCK_SCREEN" +#define STR_ATOM_CM_PIXMAP_ROTATION_SUPPORTED "_E_COMP_PIXMAP_ROTATION_SUPPORTED" +#define STR_ATOM_CM_PIXMAP_ROTATION_STATE "_E_COMP_PIXMAP_ROTATION_STATE" +#define STR_ATOM_CM_PIXMAP_ROTATION_BEGIN "_E_COMP_PIXMAP_ROTATION_BEGIN" +#define STR_ATOM_CM_PIXMAP_ROTATION_BEGIN_DONE "_E_COMP_PIXMAP_ROTATION_BEGIN_DONE" +#define STR_ATOM_CM_PIXMAP_ROTATION_END "_E_COMP_PIXMAP_ROTATION_END" +#define STR_ATOM_CM_PIXMAP_ROTATION_END_DONE "_E_COMP_PIXMAP_ROTATION_END_DONE" +#define STR_ATOM_CM_PIXMAP_ROTATION_REQUEST "_E_COMP_PIXMAP_ROTATION_REQUEST" +#define STR_ATOM_CM_PIXMAP_ROTATION_REQUEST_DONE "_E_COMP_PIXMAP_ROTATION_REQUEST_DONE" +#define STR_ATOM_CM_PIXMAP_ROTATION_RESIZE_PIXMAP "_E_COMP_PIXMAP_ROTATION_RESIZE_PIXMAP" +#define STR_ATOM_CAPTURE_EFFECT "_E_COMP_CAPTURE_EFFECT" + +/* static global variables */ +static Eina_List *handlers = NULL; +static Eina_List *compositors = NULL; +static Eina_Hash *windows = NULL; +static Eina_Hash *borders = NULL; +static Eina_Hash *damages = NULL; +static E_Comp *_comp = NULL; + +/* global variables */ +Ecore_X_Atom ATOM_FAKE_LAUNCH = 0; +Ecore_X_Atom ATOM_FAKE_LAUNCH_IMAGE = 0; +Ecore_X_Atom ATOM_EFFECT_ENABLE = 0; +Ecore_X_Atom ATOM_WINDOW_EFFECT_ENABLE = 0; +Ecore_X_Atom ATOM_WINDOW_EFFECT_CLIENT_STATE = 0; +Ecore_X_Atom ATOM_WINDOW_EFFECT_STATE = 0; +Ecore_X_Atom ATOM_WINDOW_EFFECT_TYPE = 0; +Ecore_X_Atom ATOM_EFFECT_DEFAULT = 0; +Ecore_X_Atom ATOM_EFFECT_NONE = 0; +Ecore_X_Atom ATOM_EFFECT_CUSTOM0 = 0; +Ecore_X_Atom ATOM_EFFECT_CUSTOM1 = 0; +Ecore_X_Atom ATOM_EFFECT_CUSTOM2 = 0; +Ecore_X_Atom ATOM_EFFECT_CUSTOM3 = 0; +Ecore_X_Atom ATOM_EFFECT_CUSTOM4 = 0; +Ecore_X_Atom ATOM_EFFECT_CUSTOM5 = 0; +Ecore_X_Atom ATOM_EFFECT_CUSTOM6 = 0; +Ecore_X_Atom ATOM_EFFECT_CUSTOM7 = 0; +Ecore_X_Atom ATOM_EFFECT_CUSTOM8 = 0; +Ecore_X_Atom ATOM_EFFECT_CUSTOM9 = 0; +Ecore_X_Atom ATOM_OVERAY_WINDOW = 0; +Ecore_X_Atom ATOM_X_HIBERNATION_STATE = 0; +Ecore_X_Atom ATOM_X_SCREEN_ROTATION = 0; +Ecore_X_Atom ATOM_CM_LOCK_SCREEN = 0; +Ecore_X_Atom ATOM_CM_PIXMAP_ROTATION_SUPPORTED = 0; +Ecore_X_Atom ATOM_CM_PIXMAP_ROTATION_STATE = 0; +Ecore_X_Atom ATOM_CM_PIXMAP_ROTATION_BEGIN = 0; +Ecore_X_Atom ATOM_CM_PIXMAP_ROTATION_BEGIN_DONE = 0; +Ecore_X_Atom ATOM_CM_PIXMAP_ROTATION_END = 0; +Ecore_X_Atom ATOM_CM_PIXMAP_ROTATION_END_DONE = 0; +Ecore_X_Atom ATOM_CM_PIXMAP_ROTATION_REQUEST = 0; +Ecore_X_Atom ATOM_CM_PIXMAP_ROTATION_REQUEST_DONE = 0; +Ecore_X_Atom ATOM_CM_PIXMAP_ROTATION_RESIZE_PIXMAP= 0; +Ecore_X_Atom ATOM_CAPTURE_EFFECT = 0; + +/* static functions */ +static void _e_mod_comp_set (E_Comp *c); +E_Comp * _e_mod_comp_get (void); +static void _e_mod_comp_render_queue (E_Comp *c); +static void _e_mod_comp_win_damage (E_Comp_Win *cw, int x, int y, int w, int h, Eina_Bool dmg); +static void _e_mod_comp_win_del (E_Comp_Win *cw); +static void _e_mod_comp_win_real_hide (E_Comp_Win *cw); +static void _e_mod_comp_win_hide (E_Comp_Win *cw); +static void _e_mod_comp_win_configure (E_Comp_Win *cw, int x, int y, int w, int h, int border); +static void _e_mod_comp_screen_lock (E_Comp *c); +static void _e_mod_comp_screen_unlock (E_Comp *c); +static Eina_Bool _e_mod_comp_screen_lock_timeout (void *data); +static void _e_mod_comp_screen_lock_func (void *data, E_Manager *man __UNUSED__); +static void _e_mod_comp_screen_unlock_func (void *data, E_Manager *man __UNUSED__); +static Eina_Bool _e_mod_comp_win_rotation_begin_timeout (void *data); +static Eina_Bool _e_mod_comp_win_rotation_end_timeout (void *data); +static Eina_Bool _e_mod_comp_win_damage_timeout (void *data); +static void _e_mod_comp_win_raise (E_Comp_Win *cw); +static void _e_mod_comp_win_lower (E_Comp_Win *cw); +static void _e_mod_comp_win_unredirect (E_Comp_Win *cw); +static E_Comp_Win * _e_mod_comp_win_find (Ecore_X_Window win); +static Eina_Bool _e_mod_comp_win_add_damage (E_Comp_Win *cw, Ecore_X_Damage damage); +static Eina_Bool _e_mod_comp_win_del_damage (E_Comp_Win *cw, Ecore_X_Damage damage); +static E_Comp_Win * _e_mod_comp_border_client_find (Ecore_X_Window win); +static void _e_mod_comp_win_recreate_shobj (E_Comp_Win *cw); +static void _e_mod_comp_win_cb_setup (E_Comp_Win *cw); +static Eina_Bool _e_mod_comp_is_next_win_stack (E_Comp_Win *cw, E_Comp_Win *cw2); +static Eina_Bool _e_mod_comp_get_edje_error (E_Comp_Win *cw); +static void _e_mod_comp_atom_init (void); +static Eina_Bool _e_mod_comp_cb_update (E_Comp *c); +static Ecore_X_Window _e_mod_comp_win_get_client_xid (E_Comp_Win *cw); +static Eina_Bool _e_mod_comp_win_is_border (E_Comp_Win *cw); + +/* non-static functions */ +void _e_mod_comp_done_defer (E_Comp_Win *cw); +void _e_mod_comp_cb_pending_after (void *data __UNUSED__, E_Manager *man __UNUSED__, E_Manager_Comp_Source *src); +E_Comp * _e_mod_comp_find (Ecore_X_Window root); +Eina_Bool _e_mod_comp_fake_launch_timeout (void *data); +void _e_mod_comp_win_render_queue (E_Comp_Win *cw); +void _e_mod_comp_send_window_effect_client_state (E_Comp_Win *cw, Eina_Bool effect_state); +Eina_Bool _e_mod_comp_win_check_visible (E_Comp_Win *cw); +Eina_Bool _e_mod_comp_win_check_visible3 (E_Comp_Win *cw); +E_Comp_Win * _e_mod_comp_win_transient_parent_find (E_Comp_Win * cw); +E_Comp_Win * _e_mod_comp_win_find_background_win (E_Comp_Win * cw); +E_Comp_Win * _e_mod_comp_win_find_by_indicator (E_Comp *c); +E_Comp_Win * _e_mod_comp_win_find_fake_background_win (E_Comp *c); +void _e_mod_comp_disable_touch_event_block (E_Comp *c); +void _e_mod_comp_enable_touch_event_block (E_Comp *c); +void _e_mod_comp_win_inc_animating (E_Comp_Win *cw); +void _e_mod_comp_win_dec_animating (E_Comp_Win *cw); +void ecore_x_e_comp_dri_buff_flip_supported_set (Ecore_X_Window root, Eina_Bool enabled); // TODO + +/* extern functions */ +extern Eina_Bool _e_mod_comp_is_quickpanel_window (E_Border *bd); +extern Eina_Bool _e_mod_comp_is_task_manager_window (E_Border *bd); +extern Eina_Bool _e_mod_comp_is_live_magazine_window (E_Border *bd); +extern Eina_Bool _e_mod_comp_is_lock_screen_window (E_Border *bd); +extern Eina_Bool _e_mod_comp_is_indicator_window (E_Border *bd); +extern Eina_Bool _e_mod_comp_is_isf_main_window (E_Border *bd); +extern Eina_Bool _e_mod_comp_is_isf_sub_window (E_Border *bd); +extern Eina_Bool _e_mod_comp_is_normal_window (E_Border *bd); +extern Eina_Bool _e_mod_comp_is_tooltip_window (E_Border *bd); +extern Eina_Bool _e_mod_comp_is_combo_window (E_Border *bd); +extern Eina_Bool _e_mod_comp_is_dnd_window (E_Border *bd); +extern Eina_Bool _e_mod_comp_is_desktop_window (E_Border *bd); +extern Eina_Bool _e_mod_comp_is_toolbar_window (E_Border *bd); +extern Eina_Bool _e_mod_comp_is_menu_window (E_Border *bd); +extern Eina_Bool _e_mod_comp_is_splash_window (E_Border *bd); +extern Eina_Bool _e_mod_comp_is_drop_down_menu_window (E_Border *bd); +extern Eina_Bool _e_mod_comp_is_notification_window (E_Border *bd); +extern Eina_Bool _e_mod_comp_is_utility_window (E_Border *bd); +extern Eina_Bool _e_mod_comp_is_popup_menu_window (E_Border *bd); +extern Eina_Bool _e_mod_comp_is_dialog_window (E_Border *bd); +extern void _e_mod_comp_window_effect_policy (E_Comp_Win *cw); +extern Eina_Bool _e_mod_comp_window_restack_policy (E_Comp_Win *cw, E_Comp_Win *cw2); +extern Eina_Bool _e_mod_comp_window_rotation_policy (E_Comp_Win *cw); +extern int _e_mod_comp_shadow_policy (E_Comp_Win *cw); +extern void _e_mod_comp_window_show_effect (E_Comp_Win *cw); +extern void _e_mod_comp_window_hide_effect (E_Comp_Win *cw); +extern void _e_mod_comp_window_restack_effect (E_Comp_Win *cw, E_Comp_Win *cw2); +extern void _e_mod_comp_disable_effect_stage (E_Comp *c); +extern Eina_Bool _e_mod_comp_fake_show (Ecore_X_Event_Client_Message *ev); +extern Eina_Bool _e_mod_comp_fake_hide (Ecore_X_Event_Client_Message *ev); +extern void _e_mod_comp_disable_fake_launch (E_Comp *c); +extern E_Comp_Effect_Type _e_mod_comp_get_effect_type (Ecore_X_Atom *atom); +extern void _e_mod_comp_window_lower_effect (E_Comp_Win *cw, E_Comp_Win *cw2); + +Eina_Bool +_e_mod_comp_capture_effect( Ecore_X_Event_Client_Message *ev ) +{ + E_Comp *c = NULL; + + if ( ev == NULL ) return ECORE_CALLBACK_PASS_ON; + c = _e_mod_comp_find(ev->win); + if (!c) return ECORE_CALLBACK_PASS_ON; + + evas_object_show(c->capture_effect_obj); + evas_object_raise(c->capture_effect_obj); + edje_object_signal_emit(c->capture_effect_obj, "img,state,capture,on", "img"); + + return ECORE_CALLBACK_PASS_ON; +} + +static void +_e_mod_comp_capture_effect_show_done(void *data, + Evas_Object *obj __UNUSED__, + const char *emission __UNUSED__, + const char *source __UNUSED__) +{ + E_Comp *c = (E_Comp*)data; + if ( !c ) return; + evas_object_hide(c->capture_effect_obj); +} + +static Eina_Bool +_e_mod_comp_get_edje_error(E_Comp_Win *cw) +{ + int error = EDJE_LOAD_ERROR_NONE; + + if ((error = edje_object_load_error_get(cw->shobj)) != EDJE_LOAD_ERROR_NONE) + { + Ecore_X_Window win = _e_mod_comp_win_get_client_xid(cw); + switch(error) + { + case EDJE_LOAD_ERROR_GENERIC: fprintf(stderr, "[E17-comp] EDJE_LOAD_ERROR_GENERIC! win:0x%08x\n", win); break; + case EDJE_LOAD_ERROR_DOES_NOT_EXIST: fprintf(stderr, "[E17-comp] EDJE_LOAD_ERROR_DOES_NOT_EXIST! win:0x%08x\n", win); break; + case EDJE_LOAD_ERROR_PERMISSION_DENIED: fprintf(stderr, "[E17-comp] EDJE_LOAD_ERROR_PERMISSION_DENIED! win:0x%08x\n", win); break; + case EDJE_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED: fprintf(stderr, "[E17-comp] EDJE_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED! win:0x%08x\n", win); break; + case EDJE_LOAD_ERROR_CORRUPT_FILE: fprintf(stderr, "[E17-comp] EDJE_LOAD_ERROR_CORRUPT_FILE! win:0x%08x\n", win); break; + case EDJE_LOAD_ERROR_UNKNOWN_FORMAT: fprintf(stderr, "[E17-comp] EDJE_LOAD_ERROR_UNKNOWN_FORMAT! win:0x%08x\n", win); break; + case EDJE_LOAD_ERROR_INCOMPATIBLE_FILE: fprintf(stderr, "[E17-comp] EDJE_LOAD_ERROR_INCOMPATIBLE_FILE! win:0x%08x\n", win); break; + case EDJE_LOAD_ERROR_UNKNOWN_COLLECTION: fprintf(stderr, "[E17-comp] EDJE_LOAD_ERROR_UNKNOWN_COLLECTION! win:0x%08x\n", win); break; + case EDJE_LOAD_ERROR_RECURSIVE_REFERENCE: fprintf(stderr, "[E17-comp] EDJE_LOAD_ERROR_RECURSIVE_REFERENCE! win:0x%08x\n", win); break; + default: + break; + } + return EINA_FALSE; + } + + return EINA_TRUE; +} + +static Ecore_X_Window +_e_mod_comp_win_get_client_xid(E_Comp_Win *cw) +{ + if (!cw) return 0; + if (cw->bd) return cw->bd->client.win; + else return cw->win; +} + +static Eina_Bool +_e_mod_comp_win_is_border(E_Comp_Win *cw) +{ + if (!cw) return EINA_FALSE; + if (cw->bd) return EINA_TRUE; + else return EINA_FALSE; +} + +static void +_e_mod_comp_fps_update(E_Comp *c) +{ + if (_comp_mod->conf->fps_show) + { + if (!c->fps_bg) + { + c->fps_bg = evas_object_rectangle_add(c->evas); + evas_object_color_set(c->fps_bg, 0, 0, 0, 128); + evas_object_layer_set(c->fps_bg, EVAS_LAYER_MAX); + evas_object_show(c->fps_bg); + + c->fps_fg = evas_object_text_add(c->evas); + evas_object_text_font_set(c->fps_fg, "Sans", 10); + evas_object_text_text_set(c->fps_fg, "???"); + evas_object_color_set(c->fps_fg, 255, 255, 255, 255); + evas_object_layer_set(c->fps_fg, EVAS_LAYER_MAX); + evas_object_show(c->fps_fg); + } + } + else + { + if (c->fps_fg) + { + evas_object_del(c->fps_fg); + c->fps_fg = NULL; + } + if (c->fps_bg) + { + evas_object_del(c->fps_bg); + c->fps_bg = NULL; + } + } +} + +static void +_e_mod_comp_fps_toggle(void) +{ + if (_comp_mod) + { + Eina_List *l; + E_Comp *c; + + if (_comp_mod->conf->fps_show) + { + _comp_mod->conf->fps_show = 0; + e_config_save_queue(); + } + else + { + _comp_mod->conf->fps_show = 1; + e_config_save_queue(); + } + EINA_LIST_FOREACH(compositors, l, c) _e_mod_comp_cb_update(c); + } +} + +char* +_e_mod_comp_get_atom_name(Ecore_X_Atom a) +{ + if (!a) return NULL; + + if (ECORE_X_ATOM_E_COMP_SYNC_DRAW_DONE && a == ECORE_X_ATOM_E_COMP_SYNC_DRAW_DONE ) return "SYNC_DRAW_DONE"; + else if (ECORE_X_ATOM_E_COMP_SYNC_COUNTER && a == ECORE_X_ATOM_E_COMP_SYNC_COUNTER ) return "SYNC_COUNTER"; + else if (ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE && a == ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE) return "WIN_ROT_ANGLE"; + else if (ECORE_X_ATOM_NET_WM_WINDOW_OPACITY && a == ECORE_X_ATOM_NET_WM_WINDOW_OPACITY ) return "WM_WINDOW_OPACITY"; + else if (ATOM_EFFECT_ENABLE && a == ATOM_EFFECT_ENABLE ) return "CM_EFFECT_ENABLE"; + else if (ATOM_WINDOW_EFFECT_ENABLE && a == ATOM_WINDOW_EFFECT_ENABLE ) return "WINDOW_EFFECT_ENABLE"; + else if (ATOM_WINDOW_EFFECT_CLIENT_STATE && a == ATOM_WINDOW_EFFECT_CLIENT_STATE ) return "EFFECT_CLIENT_STATE"; + else if (ATOM_WINDOW_EFFECT_STATE && a == ATOM_WINDOW_EFFECT_STATE ) return "EFFECT_STATE"; + else if (ATOM_WINDOW_EFFECT_TYPE && a == ATOM_WINDOW_EFFECT_TYPE ) return "EFFECT_TYPE"; + else if (ATOM_EFFECT_DEFAULT && a == ATOM_EFFECT_DEFAULT ) return "EFFECT_DEFAULT"; + else if (ATOM_EFFECT_NONE && a == ATOM_EFFECT_NONE ) return "EFFECT_NONE"; + else if (ATOM_EFFECT_CUSTOM0 && a == ATOM_EFFECT_CUSTOM0 ) return "EFFECT_CUSTOM0"; + else if (ATOM_EFFECT_CUSTOM1 && a == ATOM_EFFECT_CUSTOM1 ) return "EFFECT_CUSTOM1"; + else if (ATOM_EFFECT_CUSTOM2 && a == ATOM_EFFECT_CUSTOM2 ) return "EFFECT_CUSTOM2"; + else if (ATOM_EFFECT_CUSTOM3 && a == ATOM_EFFECT_CUSTOM3 ) return "EFFECT_CUSTOM3"; + else if (ATOM_EFFECT_CUSTOM4 && a == ATOM_EFFECT_CUSTOM4 ) return "EFFECT_CUSTOM4"; + else if (ATOM_EFFECT_CUSTOM5 && a == ATOM_EFFECT_CUSTOM5 ) return "EFFECT_CUSTOM5"; + else if (ATOM_EFFECT_CUSTOM6 && a == ATOM_EFFECT_CUSTOM6 ) return "EFFECT_CUSTOM6"; + else if (ATOM_EFFECT_CUSTOM7 && a == ATOM_EFFECT_CUSTOM7 ) return "EFFECT_CUSTOM7"; + else if (ATOM_EFFECT_CUSTOM8 && a == ATOM_EFFECT_CUSTOM8 ) return "EFFECT_CUSTOM8"; + else if (ATOM_EFFECT_CUSTOM9 && a == ATOM_EFFECT_CUSTOM9 ) return "EFFECT_CUSTOM9"; + else if (ATOM_FAKE_LAUNCH_IMAGE && a == ATOM_FAKE_LAUNCH_IMAGE ) return "FAKE_LAUNCH_IMAGE"; + else if (ATOM_FAKE_LAUNCH && a == ATOM_FAKE_LAUNCH ) return "FAKE_LAUNCH"; + else if (ATOM_CM_LOCK_SCREEN && a == ATOM_CM_LOCK_SCREEN ) return "LOCK_SCREEN"; + else if (ATOM_CM_PIXMAP_ROTATION_SUPPORTED && a == ATOM_CM_PIXMAP_ROTATION_SUPPORTED ) return "PIX_ROT_SUPPORTED"; + else if (ATOM_CM_PIXMAP_ROTATION_STATE && a == ATOM_CM_PIXMAP_ROTATION_STATE ) return "PIX_ROT_STATE"; + else if (ATOM_CM_PIXMAP_ROTATION_BEGIN && a == ATOM_CM_PIXMAP_ROTATION_BEGIN ) return "PIX_ROT_BEGIN"; + else if (ATOM_CM_PIXMAP_ROTATION_BEGIN_DONE && a == ATOM_CM_PIXMAP_ROTATION_BEGIN_DONE ) return "PIX_ROT_BEGIN_DONE"; + else if (ATOM_CM_PIXMAP_ROTATION_END && a == ATOM_CM_PIXMAP_ROTATION_END ) return "PIX_ROT_END"; + else if (ATOM_CM_PIXMAP_ROTATION_END_DONE && a == ATOM_CM_PIXMAP_ROTATION_END_DONE ) return "PIX_ROT_END_DONE"; + else if (ATOM_CM_PIXMAP_ROTATION_REQUEST && a == ATOM_CM_PIXMAP_ROTATION_REQUEST ) return "PIX_ROT_REQUEST"; + else if (ATOM_CM_PIXMAP_ROTATION_REQUEST_DONE && a == ATOM_CM_PIXMAP_ROTATION_REQUEST_DONE ) return "PIX_ROT_REQUEST_DONE"; + else if (ATOM_CM_PIXMAP_ROTATION_RESIZE_PIXMAP && a == ATOM_CM_PIXMAP_ROTATION_RESIZE_PIXMAP ) return "PIX_ROT_RESIZE_PIXMAP"; + else if (ATOM_OVERAY_WINDOW && a == ATOM_OVERAY_WINDOW ) return "OVERAY_WINDOW"; + else if (ATOM_X_HIBERNATION_STATE && a == ATOM_X_HIBERNATION_STATE ) return "HIBERNATION_STATE"; + else if (ATOM_X_SCREEN_ROTATION && a == ATOM_X_SCREEN_ROTATION ) return "SCREEN_ROTATION"; +#if COMP_LOGGER_BUILD_ENABLE + else if (ATOM_CM_LOG && a == ATOM_CM_LOG ) return "CM_LOG"; + else if (ATOM_CM_LOG_DUMP_DONE && a == ATOM_CM_LOG_DUMP_DONE ) return "CM_LOG_DUMP_DONE"; +#endif /* COMP_LOGGER_BUILD_ENABLE */ + + return NULL; +} + +Eina_Bool +_e_mod_comp_rotation_release(E_Comp_Win *cw) +{ + if (!cw || !cw->rotating || !cw->rotobj) return EINA_FALSE; + + L(LT_EVENT_X, + "[COMP] %31s w:0x%08x bd:%s release rotobj. animating:%d\n", + "PIX_ROT", _e_mod_comp_win_get_client_xid(cw), + cw->bd ? "O" : "X", cw->animating); + + if (cw->animating) + { + cw->delete_me = 1; + return EINA_TRUE; + } + + cw->rotating = EINA_FALSE; + + Ecore_X_Damage damage; + damage = e_mod_comp_rotation_get_damage(cw->rotobj); + if (damage) _e_mod_comp_win_del_damage(cw, damage); + + e_mod_comp_rotation_end(cw->rotobj); + e_mod_comp_rotation_free(cw->rotobj); + cw->rotobj = NULL; + + e_mod_comp_rotation_done_send + (_e_mod_comp_win_get_client_xid(cw), + ATOM_CM_PIXMAP_ROTATION_END_DONE); + + L(LT_EVENT_X, + "[COMP] %31s w:0x%08x send END_DONE.\n", + "PIX_ROT", _e_mod_comp_win_get_client_xid(cw)); + + return EINA_TRUE; +} + +static int +_e_mod_comp_rotation_handle_message(Ecore_X_Event_Client_Message *ev) +{ + Ecore_X_Atom type = ev->message_type; + Ecore_X_Window win; + E_Comp_Win *cw = NULL; + + cw = _e_mod_comp_border_client_find(ev->win); + if (!cw) + { + cw = _e_mod_comp_win_find(ev->win); + if (!cw) return 0; + } + + win = ev->win; + + if (type == ATOM_CM_PIXMAP_ROTATION_BEGIN) + { + L(LT_EVENT_X, + "[COMP] %31s w:0x%08x bd:%d c:0x%08x cw:%p\n", + "PIX_ROT", win, _e_mod_comp_win_is_border(cw), + _e_mod_comp_win_get_client_xid(cw), cw); + + if (cw->rotating || cw->rotobj) + { + L(LT_EVENT_X, + "[COMP] %31s w:0x%08x invalid BEGIN_REQUEST. rotating:%d rotobj:%p\n", + "PIX_ROT", ev->win, cw->rotating, cw->rotobj); + return 0; + } + + L(LT_EVENT_X, + "[COMP] %31s w:0x%08x BEGIN_REQUEST.\n", + "PIX_ROT", ev->win); + + cw->rotobj = e_mod_comp_rotation_new(); + if (!cw->rotobj) return 0; + + cw->rotating = EINA_TRUE; + + edje_object_part_unswallow(cw->shobj, cw->obj); + _e_mod_comp_win_unredirect(cw); + + e_mod_comp_rotation_done_send + (win, ATOM_CM_PIXMAP_ROTATION_BEGIN_DONE); + + L(LT_EVENT_X, + "[COMP] %31s w:0x%08x send BEGIN_DONE.\n", + "PIX_ROT", ev->win); + } + else if (type == ATOM_CM_PIXMAP_ROTATION_END) + { + L(LT_EVENT_X, + "[COMP] %31s w:0x%08x bd:%d c:0x%08x cw:%p\n", + "PIX_ROT", win, _e_mod_comp_win_is_border(cw), + _e_mod_comp_win_get_client_xid(cw), cw); + + if (!cw->rotating || !cw->rotobj) + { + L(LT_EVENT_X, + "[COMP] %31s w:0x%08x invalid END_REQUEST. rotating:%d rotobj:%p\n", + "PIX_ROT", ev->win, cw->rotating, cw->rotobj); + return 0; + } + + _e_mod_comp_win_dec_animating(cw); + + L(LT_EVENT_X, + "[COMP] %31s w:0x%08x end END_REQUEST. release rotobj.\n", + "PIX_ROT", ev->win); + + _e_mod_comp_rotation_release(cw); + } + else if (type == ATOM_CM_PIXMAP_ROTATION_REQUEST) + { + L(LT_EVENT_X, + "[COMP] %31s w:0x%08x bd:%d c:0x%08x cw:%p\n", + "PIX_ROT", win, _e_mod_comp_win_is_border(cw), + _e_mod_comp_win_get_client_xid(cw), cw); + + if (!cw->rotating || !cw->rotobj) + { + L(LT_EVENT_X, + "[COMP] %31s w:0x%08x invalid ROTATION_REQUEST. rotating:%d rotobj:%p\n", + "PIX_ROT", ev->win, cw->rotating, cw->rotobj); + return 0; + } + + L(LT_EVENT_X, + "[COMP] %31s w:0x%08x ROTATION_REQUEST.\n", + "PIX_ROT", ev->win); + + Ecore_X_Damage damage; + damage = e_mod_comp_rotation_get_damage(cw->rotobj); + if (damage) _e_mod_comp_win_del_damage(cw, damage); + + if (cw->obj) + edje_object_part_unswallow(cw->shobj, cw->obj); + else + { + if (!cw->c) + { + L(LT_EVENT_X, + "[COMP] %31s w:0x%08x can't create cw->obj. cw->c:NULL\n", + "PIX_ROT", ev->win); + return 0; + } + + cw->obj = evas_object_image_filled_add(cw->c->evas); + evas_object_image_colorspace_set(cw->obj, EVAS_COLORSPACE_ARGB8888); + + if (cw->argb) + evas_object_image_alpha_set(cw->obj, 1); + else + evas_object_image_alpha_set(cw->obj, 0); + + evas_object_show(cw->obj); + evas_object_pass_events_set(cw->obj, 1); + + L(LT_EVENT_X, + "[COMP] %31s w:0x%08x create cw->obj:%p (alpha:%d).\n", + "PIX_ROT", ev->win, cw->obj, cw->argb); + } + + if (!e_mod_comp_rotation_request(cw->rotobj, + ev, + cw->c->evas, + cw->shobj, + cw->obj, + cw->vis, + cw->x, cw->y, cw->w, cw->h)) + { + L(LT_EVENT_X, + "[COMP] %31s w:0x%08x e_mod_comp_rotation_request() failed.\n", + "PIX_ROT", ev->win); + return 0; + } + + e_mod_comp_update_resize(cw->up, cw->w, cw->h); + e_mod_comp_update_add(cw->up, 0, 0, cw->w, cw->h); + + cw->native = 1; + + damage = e_mod_comp_rotation_get_damage(cw->rotobj); + if (!damage) return 0; + _e_mod_comp_win_add_damage(cw, damage); + e_mod_comp_rotation_done_send(win, ATOM_CM_PIXMAP_ROTATION_REQUEST_DONE); + + L(LT_EVENT_X, + "[COMP] %31s w:0x%08x send ROTATION_DONE.\n", + "PIX_ROT", ev->win); + } + else + return 0; + + return 1; +} + +static Eina_Bool +_e_mod_comp_win_add_damage(E_Comp_Win *cw, + Ecore_X_Damage damage) +{ + return eina_hash_add(damages, e_util_winid_str_get(damage), cw); +} + +static Eina_Bool +_e_mod_comp_win_del_damage(E_Comp_Win *cw, + Ecore_X_Damage damage) +{ + return eina_hash_del(damages, e_util_winid_str_get(damage), cw); +} + +static Eina_Bool +_e_mod_comp_win_get_prop_angle(Ecore_X_Window win, + int *req, + int *curr) +{ + Eina_Bool res = EINA_FALSE; + int ret, count; + int angle[2] = {-1, -1}; + unsigned char* prop_data = NULL; + + ret = ecore_x_window_prop_property_get(win, + ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE, + ECORE_X_ATOM_CARDINAL, + 32, + &prop_data, + &count); + if (ret <= 0) + { + if (prop_data) free(prop_data); + return res; + } + if (ret && prop_data) + { + memcpy (&angle, prop_data, sizeof (int)*count); + if (count == 2) res = EINA_TRUE; + } + + if (prop_data) free(prop_data); + + *req = angle[_WND_REQUEST_ANGLE_IDX]; + *curr = angle[_WND_CURR_ANGLE_IDX]; + + if (angle[0] == -1 && angle[1] == -1) res = EINA_FALSE; + + L(LT_EVENT_X, "[COMP] %31s %d=>%d count:%d res:%s\n", \ + "rot_prop_get", \ + angle[_WND_CURR_ANGLE_IDX], \ + angle[_WND_REQUEST_ANGLE_IDX], \ + count, + res ? "Ture" : "False"); + + return res; +} + +Eina_Bool +_e_mod_comp_win_check_visible(E_Comp_Win *cw) +{ + Eina_Bool visible = EINA_FALSE; + E_Comp_Win *check_cw = NULL; + + EINA_INLIST_REVERSE_FOREACH(cw->c->wins, check_cw) + { + if (check_cw->x == 0 && + check_cw->y == 0 && + check_cw->w == cw->c->man->w && + check_cw->h == cw->c->man->h) + { + if (check_cw == cw) + { + visible = EINA_TRUE; + break; + } + if (!check_cw->visible ) continue; + if ( check_cw->defer_hide) continue; + if ( check_cw->invalid ) continue; + if ( check_cw->input_only) continue; + if ( check_cw->argb ) continue; + break; + } + } + return visible; +} + +Eina_Bool +_e_mod_comp_win_check_visible2(E_Comp_Win *cw) +{ + E_Comp_Win *find_cw = NULL; + E_Comp *c = NULL; + + Ecore_X_Region VisibleRegion = 0; + Ecore_X_Region CurrentRegion = 0; + Ecore_X_Region ResultRegion = 0; + + Ecore_X_Rectangle *rects = NULL; + Ecore_X_Rectangle bounds = { 0, 0, 0, 0 }; + + int num_rects = 0; + + Ecore_X_Rectangle screen_rect = { 0, 0, cw->c->man->w, cw->c->man->h }; + Ecore_X_Rectangle window_rect; + + Eina_Bool visible = EINA_FALSE; + + c = cw->c; + + if (((!cw->visible) + || (cw->defer_hide) + || (cw->invalid) + || (cw->input_only) + || (!E_INTERSECTS(0, 0, c->man->w, c->man->h, + cw->x, cw->y, cw->w, cw->h)))) + { + return visible; + } + + VisibleRegion = ecore_x_region_new(&screen_rect, 1); + + EINA_INLIST_REVERSE_FOREACH(cw->c->wins, find_cw) + { + if (cw == find_cw) + { + rects = NULL; + num_rects = 0; + + window_rect.x = find_cw->x; + window_rect.y = find_cw->y; + window_rect.width = find_cw->w; + window_rect.height = find_cw->h; + CurrentRegion = ecore_x_region_new(&window_rect, 1); + + ResultRegion = ecore_x_region_new(&screen_rect, 1); + // result = visible intersect current + ecore_x_region_intersect(ResultRegion, VisibleRegion, CurrentRegion); + rects = ecore_x_region_fetch(ResultRegion, &num_rects, &bounds); + + if (num_rects > 0) + { + visible = EINA_TRUE; + break; + } + else + { + visible = EINA_FALSE; + break; + } + } + else if (((!find_cw->visible) + || (find_cw->defer_hide) + || (find_cw->invalid) + || (find_cw->input_only) + || (find_cw->argb) // this code may cause bug. + || (!E_INTERSECTS(0, 0, c->man->w, c->man->h, + cw->x, cw->y, cw->w, cw->h)))) + { + continue; + } + else + { + rects = NULL; + num_rects = 0; + + window_rect.x = find_cw->x; + window_rect.y = find_cw->y; + window_rect.width = find_cw->w; + window_rect.height = find_cw->h; + + CurrentRegion = ecore_x_region_new(&window_rect, 1); + ResultRegion = ecore_x_region_new(&screen_rect, 1); + + // result = visible - current + ecore_x_region_subtract (ResultRegion, VisibleRegion, CurrentRegion); + rects = ecore_x_region_fetch (ResultRegion, &num_rects, &bounds); + + if (num_rects == 0) + { + visible = EINA_FALSE; + break; + } + else + { + ecore_x_region_copy(VisibleRegion, ResultRegion); + if (rects) free(rects); + ecore_x_region_free(ResultRegion); + ecore_x_region_free(CurrentRegion); + } + } + } + + if (rects) free(rects); + ecore_x_region_free(ResultRegion); + ecore_x_region_free(CurrentRegion); + ecore_x_region_free(VisibleRegion); + + return visible; +} + +Eina_Bool +_e_mod_comp_win_check_visible3(E_Comp_Win *cw) +{ + Eina_Bool visible = EINA_FALSE; + E_Comp_Win *check_cw = NULL; + + EINA_INLIST_REVERSE_FOREACH(cw->c->wins, check_cw) + { + if (check_cw->x == 0 && + check_cw->y == 0 && + check_cw->w == cw->c->man->w && + check_cw->h == cw->c->man->h && + !check_cw->input_only && + !check_cw->invalid ) + { + if (check_cw == cw) + { + visible = EINA_TRUE; + break; + } + } + } + return visible; +} + +static Eina_Bool +_e_mod_comp_prop_window_rotation(Ecore_X_Event_Window_Property *ev) +{ + E_Comp_Win *cw = NULL; + int req_angle = -1; + int cur_angle = -1; + + L(LT_EVENT_X, + "[COMP] %31s\n", "PROP_ILLUME_ROT_WND_ANG"); + + cw = _e_mod_comp_border_client_find(ev->win); + if (!cw) + { + cw = _e_mod_comp_win_find(ev->win); + if (!cw) + { + Ecore_X_Sync_Counter counter = ecore_x_e_comp_sync_counter_get(ev->win); + ecore_x_e_comp_sync_cancel_send(ev->win); + if (counter) ecore_x_sync_counter_inc(counter, 1); + return EINA_FALSE; + } + } + + // if window's rotation effect type is NONE, + // then do not show rotation effect. + // just return from here + if (cw->rotation_effect == COMP_EFFECT_NONE) + { + if (cw->counter) + ecore_x_sync_counter_inc(cw->counter, 1); + else + { + cw->counter = ecore_x_e_comp_sync_counter_get(_e_mod_comp_win_get_client_xid(cw)); + if (cw->counter) ecore_x_sync_counter_inc(cw->counter, 1); + } + return EINA_FALSE; + } + + if (!_e_mod_comp_win_get_prop_angle(_e_mod_comp_win_get_client_xid(cw), + &req_angle, + &cur_angle)) + { + if (cw->counter) + ecore_x_sync_counter_inc(cw->counter, 1); + else + { + cw->counter = ecore_x_e_comp_sync_counter_get(_e_mod_comp_win_get_client_xid(cw)); + if (cw->counter) ecore_x_sync_counter_inc(cw->counter, 1); + } + return EINA_FALSE; + } + + if (req_angle == cur_angle) + { + // candidate window of keypad requests rotation with same angles. + if (cw->counter) + ecore_x_sync_counter_inc(cw->counter, 1); + else + { + cw->counter = ecore_x_e_comp_sync_counter_get(_e_mod_comp_win_get_client_xid(cw)); + if (cw->counter) ecore_x_sync_counter_inc(cw->counter, 1); + } + return EINA_FALSE; + } + + if (_e_mod_comp_window_rotation_policy(cw)) + { + cw->req_ang = req_angle; + cw->cur_ang = cur_angle; + cw->ready_win_rot_effect = EINA_TRUE; + if (cw->win_rot_timeout) + { + ecore_timer_del(cw->win_rot_timeout); + cw->win_rot_timeout = NULL; + } + cw->win_rot_timeout = ecore_timer_add(4.0f, + _e_mod_comp_win_rotation_begin_timeout, + cw); + if (cw->counter) + ecore_x_sync_counter_inc(cw->counter, 1); + else + { + cw->counter = ecore_x_e_comp_sync_counter_get(_e_mod_comp_win_get_client_xid(cw)); + if (cw->counter) ecore_x_sync_counter_inc(cw->counter, 1); + } + + L(LT_EVENT_X, + "[COMP] %31s:%p\n", + "win_rot_timeout", + cw->win_rot_timeout); + } + else + { + cw->req_ang = req_angle; + cw->cur_ang = req_angle; + cw->ready_win_rot_effect = EINA_FALSE; + if (cw->counter) + ecore_x_sync_counter_inc(cw->counter, 1); + else + { + cw->counter = ecore_x_e_comp_sync_counter_get(_e_mod_comp_win_get_client_xid(cw)); + if (cw->counter) ecore_x_sync_counter_inc(cw->counter, 1); + } + } + + L(LT_EVENT_X, + "[COMP] %31s %d\n", + "ready_effect", + cw->ready_win_rot_effect); + + return EINA_TRUE; +} + +static Eina_Bool +_e_mod_comp_win_rotation_begin(E_Comp_Win *cw, Eina_Bool timeout) +{ + cw->ready_win_rot_effect = EINA_FALSE; + + L(LT_EVENT_X, + "[COMP] %31s timeout:%d\n", + "win_rot_begin", timeout); + + if (cw->win_rot_timeout) + { + ecore_timer_del(cw->win_rot_timeout); + cw->win_rot_timeout = NULL; + } + + if (cw->rotation_effect == COMP_EFFECT_NONE) return EINA_TRUE; + else + { + switch (cw->req_ang - cw->cur_ang) + { + case -270: edje_object_signal_emit(cw->shobj, "e,state,window,rotation,90", "e"); break; + case -180: edje_object_signal_emit(cw->shobj, "e,state,window,rotation,180", "e"); break; + case -90: edje_object_signal_emit(cw->shobj, "e,state,window,rotation,-90", "e"); break; + case 0: edje_object_signal_emit(cw->shobj, "e,state,window,rotation,0", "e"); break; + case 90: edje_object_signal_emit(cw->shobj, "e,state,window,rotation,90", "e"); break; + case 180: edje_object_signal_emit(cw->shobj, "e,state,window,rotation,-180", "e"); break; + case 270: edje_object_signal_emit(cw->shobj, "e,state,window,rotation,-90", "e"); break; + default : edje_object_signal_emit(cw->shobj, "e,state,window,rotation,0", "e"); break; + } + } + cw->win_rot_effect = 1; + _e_mod_comp_win_inc_animating(cw); + + if (timeout) + { + if (!cw->update) + { + if (cw->update_timeout) + { + ecore_timer_del(cw->update_timeout); + cw->update_timeout = NULL; + } + cw->update = 1; + cw->c->updates = eina_list_append(cw->c->updates, cw); + } + cw->drawme = 1; + _e_mod_comp_win_render_queue(cw); + if (cw->counter) + ecore_x_sync_counter_inc(cw->counter, 1); + else + { + cw->counter = ecore_x_e_comp_sync_counter_get(_e_mod_comp_win_get_client_xid(cw)); + if (cw->counter) ecore_x_sync_counter_inc(cw->counter, 1); + } + } + + // TODO: remove argb check code for the ticker window + if (!cw->argb) + { + evas_object_stack_below(cw->c->bg_img, cw->shobj); + cw->c->use_bg_img = 1; + } + + cw->win_rot_timeout = ecore_timer_add(4.0f, + _e_mod_comp_win_rotation_end_timeout, + cw); + + return EINA_TRUE; +} + +static void +_e_mod_comp_win_rotation_done(void *data, + Evas_Object *obj __UNUSED__, + const char *emission __UNUSED__, + const char *source __UNUSED__) +{ + E_Comp_Win *cw = (E_Comp_Win*)data; + if (!cw) return; + + if (cw->win_rot_timeout) + { + ecore_timer_del(cw->win_rot_timeout); + cw->win_rot_timeout = NULL; + } + + if ( !cw->show_done ) cw->show_done = EINA_TRUE; + evas_object_stack_below(cw->c->bg_img, evas_object_bottom_get(cw->c->evas)); + cw->c->use_bg_img = 0; + cw->win_rot_effect = 0; + + L(LT_EVENT_X, + "[COMP] %31s %s w:0x%08x\n", + "EFFECT", "WIN_ROT_DONE", + _e_mod_comp_win_get_client_xid(cw)); + + _e_mod_comp_done_defer(cw); +} + +static Eina_Bool +_e_mod_comp_win_rotation_release(E_Comp_Win *cw) +{ + cw->ready_win_rot_effect = EINA_FALSE; + cw->req_ang = 0; + cw->cur_ang = 0; + + if (cw->win_rot_timeout) + { + ecore_timer_del(cw->win_rot_timeout); + cw->win_rot_timeout = NULL; + } + return EINA_TRUE; +} + +void +_e_mod_comp_send_window_effect_client_state(E_Comp_Win *cw, + Eina_Bool state) +{ + Ecore_X_Window win = 0; + long d[5] = { 0L, 0L, 0L, 0L, 0L }; + if (!cw) return; + + win = _e_mod_comp_win_get_client_xid(cw); + if (!win) return; + + if (state) d[0] = 1L; + else d[1] = 1L; + + ecore_x_client_message32_send + (win, ATOM_WINDOW_EFFECT_CLIENT_STATE, + StructureNotifyMask, d[0], d[1], d[2], d[3], d[4]); +} + +static Eina_Bool +_e_mod_comp_is_next_win_stack(E_Comp_Win *cw, + E_Comp_Win *cw2) +{ + Eina_Inlist *wins_list; + if (!cw || !cw2) return EINA_FALSE; + + while ((wins_list = EINA_INLIST_GET(cw)->prev) != NULL) + { + cw = _EINA_INLIST_CONTAINER(cw, wins_list); + if (cw == cw2) + { + return EINA_TRUE; + } + } + return EINA_FALSE; +} + +E_Comp_Win * +_e_mod_comp_win_find_by_indicator(E_Comp *c) +{ + E_Comp_Win *cw; + EINA_INLIST_FOREACH(c->wins, cw) + { + if (_e_mod_comp_is_indicator_window(cw->bd)) return cw; + } + return NULL; +} + +#ifdef _MAKE_ATOM +# undef _MAKE_ATOM +#endif + +#define _MAKE_ATOM(a, s) \ + do { \ + a = ecore_x_atom_get(s); \ + if (!a) \ + fprintf(stderr, \ + "[E-comp] ##s creation failed.\n"); \ + } while(0) + +static void +_e_mod_comp_atom_init(void) +{ + _MAKE_ATOM(ATOM_FAKE_LAUNCH_IMAGE, STR_ATOM_FAKE_LAUNCH_IMAGE ); + _MAKE_ATOM(ATOM_FAKE_LAUNCH, STR_ATOM_FAKE_LAUNCH ); + _MAKE_ATOM(ATOM_EFFECT_ENABLE, STR_ATOM_NET_CM_EFFECT_ENABLE ); + _MAKE_ATOM(ATOM_WINDOW_EFFECT_ENABLE, STR_ATOM_NET_CM_WINDOW_EFFECT_ENABLE ); + _MAKE_ATOM(ATOM_WINDOW_EFFECT_CLIENT_STATE, STR_ATOM_NET_CM_WINDOW_EFFECT_CLIENT_STATE); + _MAKE_ATOM(ATOM_WINDOW_EFFECT_STATE, STR_ATOM_NET_CM_WINDOW_EFFECT_STATE ); + _MAKE_ATOM(ATOM_WINDOW_EFFECT_TYPE, STR_ATOM_NET_CM_WINDOW_EFFECT_TYPE ); + _MAKE_ATOM(ATOM_EFFECT_DEFAULT, STR_ATOM_NET_CM_EFFECT_DEFAULT ); + _MAKE_ATOM(ATOM_EFFECT_NONE, STR_ATOM_NET_CM_EFFECT_NONE ); + _MAKE_ATOM(ATOM_EFFECT_CUSTOM0, STR_ATOM_NET_CM_EFFECT_CUSTOM0 ); + _MAKE_ATOM(ATOM_EFFECT_CUSTOM1, STR_ATOM_NET_CM_EFFECT_CUSTOM1 ); + _MAKE_ATOM(ATOM_EFFECT_CUSTOM2, STR_ATOM_NET_CM_EFFECT_CUSTOM2 ); + _MAKE_ATOM(ATOM_EFFECT_CUSTOM3, STR_ATOM_NET_CM_EFFECT_CUSTOM3 ); + _MAKE_ATOM(ATOM_EFFECT_CUSTOM4, STR_ATOM_NET_CM_EFFECT_CUSTOM4 ); + _MAKE_ATOM(ATOM_EFFECT_CUSTOM5, STR_ATOM_NET_CM_EFFECT_CUSTOM5 ); + _MAKE_ATOM(ATOM_EFFECT_CUSTOM6, STR_ATOM_NET_CM_EFFECT_CUSTOM6 ); + _MAKE_ATOM(ATOM_EFFECT_CUSTOM7, STR_ATOM_NET_CM_EFFECT_CUSTOM7 ); + _MAKE_ATOM(ATOM_EFFECT_CUSTOM8, STR_ATOM_NET_CM_EFFECT_CUSTOM8 ); + _MAKE_ATOM(ATOM_EFFECT_CUSTOM9, STR_ATOM_NET_CM_EFFECT_CUSTOM9 ); + _MAKE_ATOM(ATOM_OVERAY_WINDOW, STR_ATOM_OVERAY_WINDOW ); + _MAKE_ATOM(ATOM_X_HIBERNATION_STATE, STR_ATOM_X_HIBERNATION_STATE ); + _MAKE_ATOM(ATOM_CM_LOCK_SCREEN, STR_ATOM_CM_LOCK_SCREEN ); + _MAKE_ATOM(ATOM_CM_PIXMAP_ROTATION_SUPPORTED, STR_ATOM_CM_PIXMAP_ROTATION_SUPPORTED ); + _MAKE_ATOM(ATOM_CM_PIXMAP_ROTATION_STATE, STR_ATOM_CM_PIXMAP_ROTATION_STATE ); + _MAKE_ATOM(ATOM_CM_PIXMAP_ROTATION_BEGIN, STR_ATOM_CM_PIXMAP_ROTATION_BEGIN ); + _MAKE_ATOM(ATOM_CM_PIXMAP_ROTATION_BEGIN_DONE, STR_ATOM_CM_PIXMAP_ROTATION_BEGIN_DONE ); + _MAKE_ATOM(ATOM_CM_PIXMAP_ROTATION_END, STR_ATOM_CM_PIXMAP_ROTATION_END ); + _MAKE_ATOM(ATOM_CM_PIXMAP_ROTATION_END_DONE, STR_ATOM_CM_PIXMAP_ROTATION_END_DONE ); + _MAKE_ATOM(ATOM_CM_PIXMAP_ROTATION_REQUEST, STR_ATOM_CM_PIXMAP_ROTATION_REQUEST ); + _MAKE_ATOM(ATOM_CM_PIXMAP_ROTATION_REQUEST_DONE, STR_ATOM_CM_PIXMAP_ROTATION_REQUEST_DONE ); + _MAKE_ATOM(ATOM_CM_PIXMAP_ROTATION_RESIZE_PIXMAP, STR_ATOM_CM_PIXMAP_ROTATION_RESIZE_PIXMAP ); + _MAKE_ATOM(ATOM_X_SCREEN_ROTATION, STR_ATOM_X_SCREEN_ROTATION ); + _MAKE_ATOM(ATOM_CAPTURE_EFFECT, STR_ATOM_CAPTURE_EFFECT ); +#if COMP_LOGGER_BUILD_ENABLE + _MAKE_ATOM(ATOM_CM_LOG, STR_ATOM_CM_LOG ); + _MAKE_ATOM(ATOM_CM_LOG_DUMP_DONE, STR_ATOM_CM_LOG_DUMP_DONE ); +#endif +} + +void +_e_mod_comp_cb_pending_after(void *data __UNUSED__, + E_Manager *man __UNUSED__, + E_Manager_Comp_Source *src) +{ + E_Comp_Win *cw = (E_Comp_Win *)src; + cw->pending_count--; + if (!cw->delete_pending) return; + if (cw->pending_count == 0) + { + free(cw); + } +} + +static void +_e_mod_comp_set(E_Comp *c) +{ + if (_comp) + { + fprintf(stderr, + "[E17-comp] %s(%d) E_Comp setup failed.\n", + __func__, __LINE__); + return; + } + _comp = c; +} + +E_Comp * +_e_mod_comp_get(void) +{ + return _comp; +} + +static void +_e_mod_comp_dump_cw_stack(Eina_Bool to_file, + const char *name) +{ + E_Comp *c; + E_Comp_Win *cw; + double val; + const char *file, *group; + int x, y, w, h, i = 1; + FILE *fs = stderr; + + c = _e_mod_comp_get(); + if (!c) return; + + if ((to_file) && (name)) + { + fs = fopen(name, "w"); + if (!fs) + { + fprintf(stderr, "can't open %s file.\n", name); + fs = stderr; + to_file = EINA_FALSE; + } + } + + fprintf(fs, "B-------------------------------------------------------------------------------------------------------------------------------------\n"); + fprintf(fs, " No WinID shobj x y w h ex ey ew eh W S O clipper shower swallow group st \n"); + fprintf(fs, "--------------------------------------------------------------------------------------------------------------------------------------\n"); + fprintf(fs, " c->bg_img : %s 0x%08x\n", evas_object_visible_get(c->bg_img) ? "O" : "X", (unsigned int)c->bg_img); + fprintf(fs, "--------------------------------------------------------------------------------------------------------------------------------------\n"); + + EINA_INLIST_REVERSE_FOREACH(c->wins, cw) + { + edje_object_file_get(cw->shobj, &file, &group); + evas_object_geometry_get(cw->shobj, &x, &y, &w, &h); + fprintf(fs, + " %2d 0x%07x 0x%08x %4d %4d %4d %4d %4d %4d %4d %4d %s %s %s %10.10s %.1f %10.10s %.1f %10.10s %.1f %15.15s %d\n", + i, + _e_mod_comp_win_get_client_xid(cw), + (unsigned int)cw->shobj, + cw->x, cw->y, cw->w, cw->h, + x, y, w, h, + cw->visible ? "O" : "X", + evas_object_visible_get(cw->shobj) ? "O" : "X", + evas_object_visible_get(cw->obj) ? "O" : "X", + edje_object_part_state_get(cw->shobj, "clipper", &val), val, + edje_object_part_state_get(cw->shobj, "shower", &val), val, + edje_object_part_state_get(cw->shobj, "e.swallow.content", &val), val, + group, cw->effect_stage); + i++; + } + + i = 1; + fprintf(fs, "--------------------------------------------------------------------------------------------------------------------------------------\n"); + EINA_INLIST_REVERSE_FOREACH(c->wins, cw) + { + if (!cw) break; + file = group = NULL; + edje_object_file_get(cw->shobj, + &file, &group); + fprintf(fs, + " %2d 0x%07x %s\n", + i, _e_mod_comp_win_get_client_xid(cw), + file); + i++; + } + + i = 1; + fprintf(fs, "--------------------------------------------------------------------------------------------------------------------------------------\n"); + fprintf(fs, " No WinID shobj obj found_o x y w h ex ey ew eh | W S O\n"); + fprintf(fs, "--------------------------------------------------------------------------------------------------------------------------------------\n"); + Evas_Object *o = evas_object_top_get(c->evas); + Eina_Bool found = 0; + Ecore_X_Window cid = 0; + char *wname = NULL, *wclas = NULL; + int pid = 0; + while (o) + { + EINA_INLIST_REVERSE_FOREACH(c->wins, cw) + { + if (!cw) break; + if (cw->shobj == o) + { + found = 1; + cid = _e_mod_comp_win_get_client_xid(cw); + ecore_x_icccm_name_class_get(cid, &wname, &wclas); + ecore_x_netwm_pid_get(cid, &pid); + break; + } + } + + evas_object_geometry_get(o, &x, &y, &w, &h); + + if (found && cw->visible) + { + fprintf(fs, + " %2d 0x%07x 0x%08x 0x%08x 0x%08x %4d,%4d %4dx%4d %4d,%4d %4dx%4d | %s %s %s %4d, %s, %s\n", + i, + _e_mod_comp_win_get_client_xid(cw), + (unsigned int)cw->shobj, + (unsigned int)cw->obj, + (unsigned int)o, + cw->x, cw->y, cw->w, cw->h, + x, y, w, h, + cw->visible ? "O" : "X", + evas_object_visible_get(cw->shobj) ? "O" : "X", + evas_object_visible_get(o) ? "O" : "X", + pid, wname, wclas); + } + else if (o == c->bg_img) + { + fprintf(fs, + " %2d %31.31s 0x%08x %19.19s %4d,%4d %4dx%4d | %s <-- bg_img\n", + i, " ", (unsigned int)o, " ", x, y, w, h, evas_object_visible_get(o) ? "O" : "X"); + } + else if (evas_object_visible_get(o)) + { + if (found) + { + fprintf(fs, + " %2d 0x%07x 0x%08x 0x%08x 0x%08x %4d,%4d %4dx%4d %4d,%4d %4dx%4d | %s %s %s %4d, %s, %s\n", + i, + _e_mod_comp_win_get_client_xid(cw), + (unsigned int)cw->shobj, + (unsigned int)cw->obj, + (unsigned int)o, + cw->x, cw->y, cw->w, cw->h, + x, y, w, h, + cw->visible ? "O" : "X", + evas_object_visible_get(cw->shobj) ? "O" : "X", + evas_object_visible_get(o) ? "O" : "X", + pid, wname, wclas); + } + else + { + fprintf(fs, + " %2d %31.31s 0x%08x %19.19s %4d,%4d %4dx%4d | %s\n", + i, " ", (unsigned int)o, " ", x, y, w, h, + evas_object_visible_get(o) ? "O" : "X"); + } + } + + o = evas_object_below_get(o); + + if (wname) free(wname); + if (wclas) free(wclas); + wname = wclas = NULL; + pid = cid = 0; + found = 0; + i++; + } + fprintf(fs, "E-------------------------------------------------------------------------------------------------------------------------------------\n"); + fflush(fs); + + if (to_file) fclose(fs); +} + +static E_Comp_Win * +_e_mod_comp_fullscreen_check(E_Comp *c) +{ + E_Comp_Win *cw; + if (!c->wins) return NULL; + EINA_INLIST_REVERSE_FOREACH(c->wins, cw) + { + if ((!cw->visible) || (cw->input_only) || (cw->invalid)) + continue; + if ((cw->x == 0) && (cw->y == 0) + && ((cw->x + cw->w) >= c->man->w) + && ((cw->y + cw->h) >= c->man->h) + && (!cw->argb) && (!cw->shaped)) + { + return cw; + } + return NULL; + } + return NULL; +} + +static inline Eina_Bool +_e_mod_comp_shaped_check(int w, + int h, + const Ecore_X_Rectangle *rects, + int num) +{ + if ((!rects) || (num < 1)) return EINA_FALSE; + if (num > 1) return EINA_TRUE; + if ((rects[0].x == 0) && (rects[0].y == 0) && + ((int)(rects[0].width) == w) && ((int)(rects[0].height) == h)) + return EINA_FALSE; + return EINA_TRUE; +} + +static inline Eina_Bool +_e_mod_comp_win_shaped_check(const E_Comp_Win *cw, + const Ecore_X_Rectangle *rects, + int num) +{ + return _e_mod_comp_shaped_check(cw->w, cw->h, rects, num); +} + +static void +_e_mod_comp_win_shape_rectangles_apply(E_Comp_Win *cw, + const Ecore_X_Rectangle *rects, + int num) +{ + Eina_List *l; + Evas_Object *o; + int i; + + if (!_e_mod_comp_win_shaped_check(cw, rects, num)) + { + rects = NULL; + } + if (rects) + { + unsigned int *pix, *p; + unsigned char *spix, *sp; + int w, h, px, py; + + evas_object_image_size_get(cw->obj, &w, &h); + if ((w > 0) && (h > 0)) + { + if (cw->native) + { + fprintf(stderr, + "BUGGER: shape with native surface. cw=%p\n", + cw); + return; + } + + evas_object_image_native_surface_set(cw->obj, NULL); + evas_object_image_alpha_set(cw->obj, 1); + EINA_LIST_FOREACH(cw->obj_mirror, l, o) + { + evas_object_image_native_surface_set(o, NULL); + evas_object_image_alpha_set(o, 1); + } + pix = evas_object_image_data_get(cw->obj, 1); + if (pix) + { + spix = calloc(w * h, sizeof(unsigned char)); + if (spix) + { + for (i = 0; i < num; i++) + { + int rx, ry, rw, rh; + + rx = rects[i].x; ry = rects[i].y; + rw = rects[i].width; rh = rects[i].height; + E_RECTS_CLIP_TO_RECT(rx, ry, rw, rh, 0, 0, w, h); + sp = spix + (w * ry) + rx; + for (py = 0; py < rh; py++) + { + for (px = 0; px < rw; px++) + { + *sp = 0xff; sp++; + } + sp += w - rw; + } + } + sp = spix; + p = pix; + for (py = 0; py < h; py++) + { + for (px = 0; px < w; px++) + { + unsigned int mask, imask; + mask = ((unsigned int)(*sp)) << 24; + imask = mask >> 8; + imask |= imask >> 8; + imask |= imask >> 8; + *p = mask | (*p & imask); + sp++; + p++; + } + } + free(spix); + } + evas_object_image_data_set(cw->obj, pix); + evas_object_image_data_update_add(cw->obj, 0, 0, w, h); + EINA_LIST_FOREACH(cw->obj_mirror, l, o) + { + evas_object_image_data_set(o, pix); + evas_object_image_data_update_add(o, 0, 0, w, h); + } + } + } + } + else + { + if (cw->shaped) + { + unsigned int *pix, *p; + int w, h, px, py; + + evas_object_image_size_get(cw->obj, &w, &h); + if ((w > 0) && (h > 0)) + { + if (cw->native) + { + fprintf(stderr, + "BUGGER: shape with native surface? cw=%p\n", + cw); + return; + } + + evas_object_image_alpha_set(cw->obj, 0); + EINA_LIST_FOREACH(cw->obj_mirror, l, o) + { + evas_object_image_alpha_set(o, 1); + } + pix = evas_object_image_data_get(cw->obj, 1); + if (pix) + { + p = pix; + for (py = 0; py < h; py++) + { + for (px = 0; px < w; px++) + *p |= 0xff000000; + } + } + evas_object_image_data_set(cw->obj, pix); + evas_object_image_data_update_add(cw->obj, 0, 0, w, h); + EINA_LIST_FOREACH(cw->obj_mirror, l, o) + { + evas_object_image_data_set(o, pix); + evas_object_image_data_update_add(o, 0, 0, w, h); + } + + } + } + // dont need to fix alpha chanel as blending + // should be totally off here regardless of + // alpha channel content + } +} + +static void +_e_mod_comp_win_free_xim(E_Comp_Win *cw) +{ + if (cw->xim) + { + evas_object_image_data_set(cw->obj, NULL); + ecore_x_image_free(cw->xim); + cw->xim = NULL; + } +} + +static void +_e_mod_comp_win_update(E_Comp_Win *cw) +{ + Eina_List *l; + Evas_Object *o; + E_Update_Rect *r; + int i; + + if (_comp_mod->conf->grab) ecore_x_grab(); + cw->update = 0; + + if (cw->rotating) + { + if (cw->needpix) + { + cw->needpix = 0; + cw->pw = cw->w; + cw->ph = cw->h; + } + + if (cw->resize_hide) cw->resize_hide = EINA_FALSE; + + Eina_Bool res; + res = e_mod_comp_rotation_update(cw->rotobj, + cw->up, + cw->x, cw->y, + cw->w, cw->h, + cw->border); + if (res) + { + if ((cw->visible) && (cw->dmg_updates > 0)) + { + Evas_Object *shobj = e_mod_comp_rotation_get_shobj(cw->rotobj); + if (shobj) + { + if (!evas_object_visible_get(shobj)) + { + evas_object_show(cw->obj); + evas_object_show(shobj); + e_mod_comp_rotation_show_effect(cw->rotobj); + _e_mod_comp_win_inc_animating(cw); + + } + else if(e_mod_comp_rotation_angle_is_changed(cw->rotobj)) + { + e_mod_comp_rotation_request_effect(cw->rotobj); + _e_mod_comp_win_inc_animating(cw); + } + } + } + } + if (_comp_mod->conf->grab) ecore_x_ungrab(); + return; + } + + if (cw->argb) + { + if (cw->rects) + { + free(cw->rects); + cw->rects = NULL; + cw->rects_num = 0; + } + } + else + { + if (cw->shape_changed) + { + if (cw->rects) + { + free(cw->rects); + cw->rects = NULL; + cw->rects_num = 0; + } + ecore_x_pixmap_geometry_get(cw->win, NULL, NULL, &(cw->w), &(cw->h)); + cw->rects = ecore_x_window_shape_rectangles_get(cw->win, &(cw->rects_num)); + if (cw->rects) + { + int int_w, int_h; + for (i = 0; i < cw->rects_num; i++) + { + int_w = (int)cw->rects[i].width; + int_h = (int)cw->rects[i].height; + E_RECTS_CLIP_TO_RECT(cw->rects[i].x, + cw->rects[i].y, + int_w, + int_h, + 0, 0, cw->w, cw->h); + cw->rects[i].width = (unsigned int)int_w; + cw->rects[i].height = (unsigned int)int_h; + } + } + if (!_e_mod_comp_win_shaped_check(cw, cw->rects, cw->rects_num)) + { + free(cw->rects); + cw->rects = NULL; + cw->rects_num = 0; + } + if ((cw->rects) && (!cw->shaped)) cw->shaped = 1; + else if ((!cw->rects) && (cw->shaped)) cw->shaped = 0; + } + } + + if ((cw->needpix) && (cw->dmg_updates <= 0)) + { + if (_comp_mod->conf->grab) ecore_x_ungrab(); + return; + } + + if ((!cw->pixmap) || (cw->needpix)) + { + Ecore_X_Pixmap pm; + pm = ecore_x_composite_name_window_pixmap_get(cw->win); + if (pm) + { + Ecore_X_Pixmap oldpm; + + cw->needpix = 0; + if (cw->xim) cw->needxim = 1; + oldpm = cw->pixmap; + cw->pixmap = pm; + + if (cw->pixmap) + { + ecore_x_pixmap_geometry_get(cw->pixmap, NULL, NULL, &(cw->pw), &(cw->ph)); + // pixmap's size is not equal with window's size case + if (!((cw->pw == cw->w) && (cw->ph == cw->h))) + { + L(LT_EFFECT, + "[COMP] pixmap is not prepared yet!! win: 0x%07x \n", + cw->win); + cw->pw = cw->w; + cw->ph = cw->h; + cw->pixmap = oldpm; + cw->needpix = 1; + ecore_x_pixmap_free(pm); + if (_comp_mod->conf->grab) ecore_x_ungrab(); + return; + } + } + else + { + cw->pw = 0; + cw->ph = 0; + } + if ((cw->pw <= 0) || (cw->ph <= 0)) + { + if (cw->native) + { + evas_object_image_native_surface_set(cw->obj, NULL); + cw->native = 0; + EINA_LIST_FOREACH(cw->obj_mirror, l, o) + { + evas_object_image_native_surface_set(o, NULL); + } + } + if (cw->pixmap) + { + ecore_x_pixmap_free(cw->pixmap); + cw->pixmap = 0; + } + cw->pw = 0; + cw->ph = 0; + } + ecore_x_e_comp_pixmap_set(cw->win, cw->pixmap); + cw->native = 0; + e_mod_comp_update_resize(cw->up, cw->pw, cw->ph); + e_mod_comp_update_add(cw->up, 0, 0, cw->pw, cw->ph); + if (oldpm) + { + if (cw->native) + { + cw->native = 0; + if (!((cw->pw > 0) && (cw->ph > 0))) + { + evas_object_image_native_surface_set(cw->obj, NULL); + EINA_LIST_FOREACH(cw->obj_mirror, l, o) + { + evas_object_image_native_surface_set(o, NULL); + } + } + } + ecore_x_pixmap_free(oldpm); + } + } + } + + if (!((cw->pw > 0) && (cw->ph > 0))) + { + if (_comp_mod->conf->grab) ecore_x_ungrab(); + return; + } + + // update obj geometry when task switcher is not open + // or task switcher is open and new window is added + cw->defer_move_resize = EINA_FALSE; + if ( !cw->c->switcher_animating || + !cw->c->switcher || + (cw->c->switcher && !cw->first_show_worked) || + (cw->c->switcher && cw->win_type == WIN_INDICATOR)) + { + evas_object_move(cw->shobj, cw->x, cw->y); + evas_object_resize(cw->shobj, + cw->pw + (cw->border * 2), + cw->ph + (cw->border * 2)); + } + else + { + cw->defer_move_resize = EINA_TRUE; + } + + if ((cw->c->gl) + && (_comp_mod->conf->texture_from_pixmap) + && (!cw->shaped) + && (!cw->rects)) + { + evas_object_image_size_set(cw->obj, cw->pw, cw->ph); + EINA_LIST_FOREACH(cw->obj_mirror, l, o) + { + evas_object_image_size_set(o, cw->pw, cw->ph); + } + if (!cw->native) + { + Evas_Native_Surface ns; + + ns.version = EVAS_NATIVE_SURFACE_VERSION; + ns.type = EVAS_NATIVE_SURFACE_X11; + ns.data.x11.visual = cw->vis; + ns.data.x11.pixmap = cw->pixmap; + evas_object_image_native_surface_set(cw->obj, &ns); + cw->native = 1; + EINA_LIST_FOREACH(cw->obj_mirror, l, o) + { + evas_object_image_native_surface_set(o, &ns); + } + } + + r = e_mod_comp_update_rects_get(cw->up); + if (r) + { + e_mod_comp_update_clear(cw->up); + for (i = 0; r[i].w > 0; i++) + { + int x, y, w, h; + x = r[i].x; y = r[i].y; + w = r[i].w; h = r[i].h; + evas_object_image_data_update_add(cw->obj, x, y, w, h); + EINA_LIST_FOREACH(cw->obj_mirror, l, o) + { + evas_object_image_data_update_add(o, x, y, w, h); + } + + } + free(r); + } + else + cw->update = 1; + } + else + { + if (cw->native) + { + evas_object_image_native_surface_set(cw->obj, NULL); + EINA_LIST_FOREACH(cw->obj_mirror, l, o) + { + evas_object_image_native_surface_set(o, NULL); + } + cw->native = 0; + } + if (cw->needxim) + { + cw->needxim = 0; + if (cw->xim) + { + evas_object_image_size_set(cw->obj, 1, 1); + evas_object_image_data_set(cw->obj, NULL); + EINA_LIST_FOREACH(cw->obj_mirror, l, o) + { + evas_object_image_size_set(o, 1, 1); + evas_object_image_data_set(o, NULL); + } + ecore_x_image_free(cw->xim); + cw->xim = NULL; + } + } + if (!cw->xim) + { + if ((cw->xim = ecore_x_image_new(cw->pw, cw->ph, cw->vis, cw->depth))) + e_mod_comp_update_add(cw->up, 0, 0, cw->pw, cw->ph); + } + r = e_mod_comp_update_rects_get(cw->up); + if (r) + { + Eina_Bool get_image_failed = 0; + if (cw->xim) + { + unsigned int *pix; + pix = ecore_x_image_data_get(cw->xim, NULL, NULL, NULL); + evas_object_image_data_set(cw->obj, pix); + evas_object_image_size_set(cw->obj, cw->pw, cw->ph); + EINA_LIST_FOREACH(cw->obj_mirror, l, o) + { + evas_object_image_data_set(o, pix); + evas_object_image_size_set(o, cw->pw, cw->ph); + } + + e_mod_comp_update_clear(cw->up); + for (i = 0; r[i].w > 0; i++) + { + int x, y, w, h; + x = r[i].x; y = r[i].y; + w = r[i].w; h = r[i].h; + if (!ecore_x_image_get(cw->xim, cw->pixmap, x, y, x, y, w, h)) + { + e_mod_comp_update_add(cw->up, x, y, w, h); + cw->update = 1; + get_image_failed = 1; + } + else + { + pix = ecore_x_image_data_get(cw->xim, NULL, NULL, NULL); + evas_object_image_data_set(cw->obj, pix); + evas_object_image_data_update_add(cw->obj, x, y, w, h); + EINA_LIST_FOREACH(cw->obj_mirror, l, o) + { + evas_object_image_data_set(o, pix); + evas_object_image_data_update_add(o, x, y, w, h); + } + } + } + } + free(r); + + if (!get_image_failed) + { + if (cw->shaped) + _e_mod_comp_win_shape_rectangles_apply(cw, + cw->rects, + cw->rects_num); + else + { + if (cw->shape_changed) + _e_mod_comp_win_shape_rectangles_apply(cw, + cw->rects, + cw->rects_num); + } + } + cw->shape_changed = 0; + } + else + cw->update = 1; + } + + if (cw->resize_hide) + { + evas_object_show(cw->shobj); + cw->resize_hide = EINA_FALSE; + } + + if ((!cw->rotating) + && (!cw->update) + && (cw->visible) + && (cw->dmg_updates >= 1)) + { + if (!evas_object_visible_get(cw->shobj) + && !(cw->animate_hide)) + { + if (!cw->hidden_override) + evas_object_show(cw->shobj); + + L(LT_EFFECT, + "[COMP] WIN_EFFECT : Show signal Emit -> win:0x%08x\n", + cw->win); + + _e_mod_comp_window_show_effect(cw); + } + } + + if (cw->ready_win_rot_effect) + _e_mod_comp_win_rotation_begin(cw, EINA_FALSE); + + if (_comp_mod->conf->grab) ecore_x_ungrab(); +} + +static void +_e_mod_comp_pre_swap(void *data, + Evas *e __UNUSED__) +{ + E_Comp *c = data; + L(LT_EVENT_X, "[COMP] %15.15s\n", "SWAP"); + if (_comp_mod->conf->grab) + { + if (c->grabbed) + { + ecore_x_ungrab(); + c->grabbed = 0; + } + } +} + +static Eina_Bool +_e_mod_comp_cb_delayed_update_timer(void *data) +{ + E_Comp *c = data; + _e_mod_comp_render_queue(c); + c->new_up_timer = NULL; + return ECORE_CALLBACK_CANCEL; +} + +static Eina_Bool +_e_mod_comp_cb_update(E_Comp *c) +{ + Eina_List *l; + Evas_Object *o; + E_Comp_Win *cw; + Eina_List *new_updates = NULL; // for failed pixmap fetches - get them next frame + Eina_List *update_done = NULL; + + c->update_job = NULL; + if (c->nocomp) goto nocomp; + if (_comp_mod->conf->grab) + { + ecore_x_grab(); + ecore_x_sync(); + c->grabbed = 1; + } + EINA_LIST_FREE(c->updates, cw) + { + if (!cw) continue; + if (_comp_mod->conf->efl_sync) + { + if (((cw->counter) && (cw->drawme)) || (!cw->counter)) + { + _e_mod_comp_win_update(cw); + if (cw->drawme) + update_done = eina_list_append(update_done, cw); + cw->drawme = 0; + } + else + cw->update = 0; + } + else + _e_mod_comp_win_update(cw); + if (cw->update) + new_updates = eina_list_append(new_updates, cw); + } + + _e_mod_comp_fps_update(c); + if (_comp_mod->conf->fps_show) + { + char buf[128]; + double fps = 0.0, t, dt; + int i; + Evas_Coord x = 0, y = 0, w = 0, h = 0; + E_Zone *z; + + t = ecore_time_get(); + + if (_comp_mod->conf->fps_average_range < 1) + _comp_mod->conf->fps_average_range = 30; + else if (_comp_mod->conf->fps_average_range > 120) + _comp_mod->conf->fps_average_range = 120; + + dt = t - c->frametimes[_comp_mod->conf->fps_average_range - 1]; + + if (dt > 0.0) fps = (double)_comp_mod->conf->fps_average_range / dt; + else fps = 0.0; + + if (fps > 0.0) snprintf(buf, sizeof(buf), "FPS: %1.1f", fps); + else snprintf(buf, sizeof(buf), "N/A"); + + for (i = 121; i >= 1; i--) c->frametimes[i] = c->frametimes[i - 1]; + c->frametimes[0] = t; + c->frameskip++; + + if (c->frameskip >= _comp_mod->conf->fps_average_range) + { + c->frameskip = 0; + evas_object_text_text_set(c->fps_fg, buf); + } + + evas_object_geometry_get(c->fps_fg, NULL, NULL, &w, &h); + + w += 8; + h += 8; + z = e_util_zone_current_get(c->man); + + if (z) + { + switch (_comp_mod->conf->fps_corner) + { + case 3: // bottom-right + x = z->x + z->w - w; + y = z->y + z->h - h; + break; + case 2: // bottom-left + x = z->x; + y = z->y + z->h - h; + break; + case 1: // top-right + x = z->x + z->w - w; + y = z->y; + break; + default: // 0 // top-left + x = z->x; + y = z->y; + break; + } + } + evas_object_move(c->fps_bg, x, y); + evas_object_resize(c->fps_bg, w, h); + evas_object_move(c->fps_fg, x + 4, y + 4); + } + + if (_comp_mod->conf->lock_fps) + { + ecore_evas_manual_render(c->ee); + } + if (_comp_mod->conf->efl_sync) + { + EINA_LIST_FREE(update_done, cw) + { + if (!cw) continue; + ecore_x_sync_counter_inc(cw->counter, 1); + } + } + if (_comp_mod->conf->grab) + { + if (c->grabbed) + { + c->grabbed = 0; + ecore_x_ungrab(); + } + } + if (new_updates) + { + if (c->new_up_timer) ecore_timer_del(c->new_up_timer); + c->new_up_timer = + ecore_timer_add(0.001, _e_mod_comp_cb_delayed_update_timer, c); + } + c->updates = new_updates; + if (!c->animating) c->render_overflow--; + +nocomp: + cw = _e_mod_comp_fullscreen_check(c); + if (cw) + { + if (_comp_mod->conf->nocomp_fs) + { + if (!c->nocomp) + { + printf("NOCOMP!\n"); + printf("kill comp %x\n", cw->win); + c->nocomp = 1; + c->render_overflow = OVER_FLOW; + ecore_x_window_hide(c->win); + cw->nocomp = 1; + if (cw->redirected) + { + printf("^^^^ undirect1 %x\n", cw->win); + ecore_x_composite_unredirect_window(cw->win, ECORE_X_COMPOSITE_UPDATE_MANUAL); + cw->redirected = 0; + cw->pw = 0; + cw->ph = 0; + } + if (cw->pixmap) + { + ecore_x_pixmap_free(cw->pixmap); + cw->pixmap = 0; + cw->pw = 0; + cw->ph = 0; + ecore_x_e_comp_pixmap_set(cw->win, cw->pixmap); + } + if (cw->xim) + { + evas_object_image_size_set(cw->obj, 1, 1); + evas_object_image_data_set(cw->obj, NULL); + EINA_LIST_FOREACH(cw->obj_mirror, l, o) + { + evas_object_image_size_set(o, 1, 1); + evas_object_image_data_set(o, NULL); + } + ecore_x_image_free(cw->xim); + cw->xim = NULL; + } + if (cw->damage) + { + Ecore_X_Region parts; + + eina_hash_del(damages, e_util_winid_str_get(cw->damage), cw); + parts = ecore_x_region_new(NULL, 0); + ecore_x_damage_subtract(cw->damage, 0, parts); + ecore_x_region_free(parts); + ecore_x_damage_free(cw->damage); + cw->damage = 0; + } + if (cw->update_timeout) + { + ecore_timer_del(cw->update_timeout); + cw->update_timeout = NULL; + } + if (cw->update) + { + cw->update = 0; + cw->c->updates = eina_list_remove(cw->c->updates, cw); + } + if (cw->counter) + { + printf("nosync\n"); + Ecore_X_Window _win = _e_mod_comp_win_get_client_xid(cw); + ecore_x_e_comp_sync_cancel_send(_win); + ecore_x_sync_counter_inc(cw->counter, 1); + } + _e_mod_comp_render_queue(c); + } + } + } + else + { + if (c->nocomp) + { + printf("COMP!\n"); + c->nocomp = 0; + c->render_overflow = OVER_FLOW; + ecore_x_window_show(c->win); + EINA_INLIST_FOREACH(c->wins, cw) + { + if (!cw->nocomp) continue; + cw->nocomp = 0; + printf("restore comp %x --- %x\n", cw->win, cw->pixmap); + if (cw->pixmap) ecore_x_pixmap_free(cw->pixmap); + cw->pixmap = 0; + cw->pw = 0; + cw->ph = 0; + cw->native = 0; + if (!cw->damage) + { + cw->damage = ecore_x_damage_new + (cw->win, ECORE_X_DAMAGE_REPORT_DELTA_RECTANGLES); + eina_hash_add(damages, e_util_winid_str_get(cw->damage), cw); + } + if (!cw->redirected) + { + printf("^^^^ redirect2 %x\n", cw->win); + printf(" redr\n"); + ecore_x_composite_redirect_window(cw->win, ECORE_X_COMPOSITE_UPDATE_MANUAL); + cw->pixmap = ecore_x_composite_name_window_pixmap_get(cw->win); + if (cw->pixmap) + ecore_x_pixmap_geometry_get(cw->pixmap, NULL, NULL, &(cw->pw), &(cw->ph)); + else + { + cw->pw = 0; + cw->ph = 0; + } + printf(" %x %ix%i\n", cw->pixmap, cw->pw, cw->ph); + if ((cw->pw <= 0) || (cw->ph <= 0)) + { + ecore_x_pixmap_free(cw->pixmap); + cw->pixmap = 0; + } + ecore_x_e_comp_pixmap_set(cw->win, cw->pixmap); + cw->redirected = 1; + cw->dmg_updates = 0; + e_mod_comp_update_resize(cw->up, cw->pw, cw->ph); + e_mod_comp_update_add(cw->up, 0, 0, cw->pw, cw->ph); + } + if (cw->visible) + { + if (!cw->hidden_override) evas_object_show(cw->shobj); + // no need for effect + cw->pending_count++; + e_manager_comp_event_src_visibility_send + (cw->c->man, (E_Manager_Comp_Source *)cw, + _e_mod_comp_cb_pending_after, cw->c); + + } + _e_mod_comp_win_render_queue(cw); + if (cw->counter) + { + Ecore_X_Window _win = _e_mod_comp_win_get_client_xid(cw); + ecore_x_e_comp_sync_begin_send(_win); + } + } + } + } + + if (c->render_overflow <= 0) + { + c->render_overflow = 0; + if (c->render_animator) c->render_animator = NULL; + return ECORE_CALLBACK_CANCEL; + } + return ECORE_CALLBACK_RENEW; +} + +static void +_e_mod_comp_cb_job(void *data) +{ + _e_mod_comp_cb_update(data); +} + +static Eina_Bool +_e_mod_comp_cb_animator(void *data) +{ + return _e_mod_comp_cb_update(data); +} + +static void +_e_mod_comp_render_queue(E_Comp *c) +{ + if (_comp_mod->conf->lock_fps) + { + if (c->render_animator) + { + c->render_overflow = OVER_FLOW; + return; + } + c->render_animator = ecore_animator_add(_e_mod_comp_cb_animator, c); + } + else + { + if (c->update_job) + { + ecore_job_del(c->update_job); + c->update_job = NULL; + c->render_overflow = 0; + } + c->update_job = ecore_job_add(_e_mod_comp_cb_job, c); + } +} + +void +_e_mod_comp_win_render_queue(E_Comp_Win *cw) +{ + _e_mod_comp_render_queue(cw->c); +} + +E_Comp * +_e_mod_comp_find(Ecore_X_Window root) +{ + Eina_List *l; + E_Comp *c; + + // fixme: use hash if compositors list > 4 + EINA_LIST_FOREACH(compositors, l, c) + { + if (!c) continue; + if (c->man->root == root) return c; + } + return NULL; +} + +static E_Comp_Win * +_e_mod_comp_win_find(Ecore_X_Window win) +{ + return eina_hash_find(windows, e_util_winid_str_get(win)); +} + +static E_Comp_Win * +_e_mod_comp_border_client_find(Ecore_X_Window win) +{ + return eina_hash_find(borders, e_util_winid_str_get(win)); +} + +static E_Comp_Win * +_e_mod_comp_win_damage_find(Ecore_X_Damage damage) +{ + return eina_hash_find(damages, e_util_winid_str_get(damage)); +} + +static Eina_Bool +_e_mod_comp_win_is_borderless(E_Comp_Win *cw) +{ + if (!cw->bd) return 1; + if ((cw->bd->client.border.name) && + (!strcmp(cw->bd->client.border.name, "borderless"))) + return 1; + return 0; +} + +Eina_Bool +_e_mod_comp_fake_launch_timeout(void *data) +{ + E_Comp *c = (E_Comp*)data; + E_Comp_Win *background_cw = NULL; + E_Comp_Win *find_cw = NULL; + + if (!c->fake_launch_state) return 0; + + if (c->fake_launch_timeout) + { + ecore_timer_del(c->fake_launch_timeout); + c->fake_launch_timeout = NULL; + } + + c->fake_launch_state = EINA_FALSE; + c->fake_win = 0; + c->fake_launch_done = EINA_FALSE; + + // background hide effect + background_cw = _e_mod_comp_win_find_fake_background_win(c); + if (background_cw) + { + EINA_INLIST_FOREACH(c->wins, find_cw) + { + if ((find_cw->invalid) + || (find_cw->input_only) + || (find_cw->win == background_cw->win) + || _e_mod_comp_is_indicator_window(find_cw->bd)) + { + continue; + } + else + { + if (evas_object_visible_get(find_cw->shobj)) + { + // do hide window which is not related window animation effect. + find_cw->animate_hide = EINA_TRUE; + evas_object_hide(find_cw->shobj); + } + } + } + + //show background image when background show animation is emitted. + evas_object_stack_below(c->bg_img, evas_object_bottom_get(c->evas)); + + background_cw->animate_hide = EINA_FALSE; + + edje_object_signal_emit(background_cw->shobj, + "e,state,background,visible,off", + "e"); + L(LT_EFFECT, + "[COMP] WIN_EFFECT : Background Show Effect signal Emit -> win:0x%08x\n", + background_cw->win); + + _e_mod_comp_win_inc_animating(background_cw); + } + + // background show effect + edje_object_signal_emit(c->fake_img_shobj, + "fake,state,visible,off", + "fake"); + L(LT_EFFECT, + "[COMP] WIN_EFFECT : Fake Hide signal Emit\n"); + + return 0; +} + +static void +_e_mod_comp_screen_lock(E_Comp *c) +{ + if (!_comp_mod || !c) return; + if (!_comp_mod->conf->use_lock_screen) return; + if (c->lock_screen == 1) return; + if (c->lock_screen_timeout) return; + + if (!_comp_mod->conf->lock_fps) + ecore_evas_manual_render_set(c->ee, 1); + + c->lock_screen_timeout = ecore_timer_add(_comp_mod->conf->max_lock_screen_time, + _e_mod_comp_screen_lock_timeout, + c); + c->lock_screen = 1; +} + +static void +_e_mod_comp_screen_unlock(E_Comp *c) +{ + E_Comp_Win *cw; + + if (!_comp_mod || !c) return; + if (!_comp_mod->conf->use_lock_screen) return; + if (c->lock_screen == 0) return; + if (c->lock_screen_timeout) + { + ecore_timer_del(c->lock_screen_timeout); + c->lock_screen_timeout = NULL; + } + + ///////////////////////////////////////////////////////// + // To ensure the correct screen appearance + // 1. remove all cw->update_timeout + // 2. clear c->update_job + // 3. clear c->updates using _e_mod_comp_cb_update() + // 4. swap buffer + ///////////////////////////////////////////////////////// + + // remove all cw->update_timeout + EINA_INLIST_REVERSE_FOREACH(c->wins, cw) + { + if ((!cw->visible) || (cw->input_only) || (cw->invalid)) + continue; + if (cw->counter && cw->update_timeout) + { + cw->update = 0; + _e_mod_comp_win_damage_timeout((void*)cw); + } + } + + // clear c->update_job + if (c->update_job) + { + ecore_job_del(c->update_job); + c->update_job = NULL; + c->render_overflow = 0; + } + + // clear c->updates + if (c->updates) _e_mod_comp_cb_update(c); + + ecore_evas_manual_render(c->ee); + + if (!_comp_mod->conf->lock_fps) + ecore_evas_manual_render_set(c->ee, 0); + + c->lock_screen = 0; +} + +static Eina_Bool +_e_mod_comp_screen_lock_timeout(void *data) +{ + E_Comp *c = (E_Comp*)data; + _e_mod_comp_screen_unlock(c); + return ECORE_CALLBACK_CANCEL; +} + +static Eina_Bool +_e_mod_comp_win_rotation_begin_timeout(void *data) +{ + E_Comp_Win *cw = (E_Comp_Win*)data; + if (!cw) return EINA_FALSE; + + fprintf(stderr, "[E17-comp] %s(%d) w:0x%08x\n", + __func__, __LINE__, + _e_mod_comp_win_get_client_xid(cw)); + + _e_mod_comp_win_rotation_begin(cw, EINA_TRUE); + + return ECORE_CALLBACK_CANCEL; +} + +static Eina_Bool +_e_mod_comp_win_rotation_end_timeout(void *data) +{ + E_Comp_Win *cw = (E_Comp_Win*)data; + if (!cw) return EINA_FALSE; + + fprintf(stderr,"[E17-comp] %s(%d) w:0x%08x\n", + __func__, __LINE__, + _e_mod_comp_win_get_client_xid(cw)); + + _e_mod_comp_win_rotation_done((void*)cw, + NULL, + NULL, + NULL); + + return ECORE_CALLBACK_CANCEL; +} + +static Eina_Bool +_e_mod_comp_win_damage_timeout(void *data) +{ + E_Comp_Win *cw = data; + + if (!cw->update) + { + if (cw->update_timeout) + { + ecore_timer_del(cw->update_timeout); + cw->update_timeout = NULL; + } + cw->update = 1; + cw->c->updates = eina_list_append(cw->c->updates, cw); + } + cw->drawme = 1; + _e_mod_comp_win_render_queue(cw); + if (cw->update_timeout) + { + ecore_timer_del(cw->update_timeout); + cw->update_timeout = NULL; + } + return ECORE_CALLBACK_CANCEL; +} + +static void +_e_mod_comp_object_del(void *data, + void *obj) +{ + E_Comp_Win *cw = data; + + _e_mod_comp_win_render_queue(cw); + + _e_mod_comp_rotation_release(cw); + + if (obj == cw->bd) + { + if (cw->counter) + { + Ecore_X_Window _w = _e_mod_comp_win_get_client_xid(cw); + ecore_x_e_comp_sync_cancel_send(_w); + ecore_x_sync_counter_inc(cw->counter, 1); + } + if (cw->bd) eina_hash_del(borders, e_util_winid_str_get(cw->bd->client.win), cw); + cw->bd = NULL; + evas_object_data_del(cw->shobj, "border"); + } + else if (obj == cw->pop) + { + cw->pop = NULL; + evas_object_data_del(cw->shobj, "popup"); + } + else if (obj == cw->menu) + { + cw->menu = NULL; + evas_object_data_del(cw->shobj, "menu"); + } + if (cw->dfn) + { + e_object_delfn_del(obj, cw->dfn); + cw->dfn = NULL; + } +} + +void +_e_mod_comp_done_defer(E_Comp_Win *cw) +{ + _e_mod_comp_win_dec_animating(cw); + + if (cw->defer_raise == EINA_TRUE) + { + L(LT_EFFECT, + "[COMP] w:0x%08x force win to raise. bd:%s\n", + _e_mod_comp_win_get_client_xid(cw), + cw->bd ? "O" : "X"); + + E_Comp_Win *_cw; + EINA_INLIST_FOREACH(cw->c->wins, _cw) + { + evas_object_raise(_cw->shobj); + if (cw->c->use_bg_img && _cw->win_rot_effect) + { + evas_object_stack_below(cw->c->bg_img, _cw->shobj); + } + } + cw->defer_raise = EINA_FALSE; + edje_object_signal_emit(cw->shobj, + "e,state,raise_above_post,on", + "e"); + } + cw->force = 1; + if (cw->defer_hide) + { + L(LT_EVENT_X, + "[COMP] %31s w:0x%08x force win to hide. bd:%s\n", + "EDJ_DONE", _e_mod_comp_win_get_client_xid(cw), + cw->bd ? "O" : "X"); + + _e_mod_comp_win_hide(cw); + } + cw->force = 1; + if (cw->delete_me) + { + L(LT_EVENT_X, + "[COMP] %31s w:0x%08x force win to delete. bd:%s\n", + "EDJ_DONE", _e_mod_comp_win_get_client_xid(cw), + cw->bd ? "O" : "X"); + + _e_mod_comp_win_del(cw); + } + else cw->force = 0; +} + +static void +_e_mod_comp_show_done(void *data, + Evas_Object *obj __UNUSED__, + const char *emission __UNUSED__, + const char *source __UNUSED__) +{ + E_Comp_Win *cw = data; + + LOG(LOG_DEBUG, "LAUNCH", "[e17:Application:Launching:done]"); + L(LT_EFFECT, + "[COMP] WIN_EFFECT : Show done -> win:0x%08x\n", + cw->win); + + if ((cw->win_type == WIN_TASK_MANAGER) + && (cw->c->switcher == EINA_TRUE)) + { + int i = 0; + Evas_Coord x, y, w, h; + E_Comp_Win *_cw; + cw->c->switcher_animating = EINA_FALSE; + EINA_INLIST_REVERSE_FOREACH(cw->c->wins, _cw) + { + if ((_cw->visible == 1) + && evas_object_visible_get(_cw->shobj) + && evas_object_visible_get(_cw->obj) + && !_e_mod_comp_is_indicator_window(_cw->bd)) + { + evas_object_geometry_get(_cw->shobj, + &x, &y, &w, &h); + if (w == _cw->c->screen_w + && h == _cw->c->screen_h) + { + i++; + // return all windows to original position + evas_object_move(_cw->shobj, 0, 0); + } + if ( _cw->defer_move_resize ) + { + evas_object_move(_cw->shobj, _cw->x, _cw->y ); + evas_object_resize(_cw->shobj, _cw->pw + (_cw->border * 2), + _cw->ph + (_cw->border * 2)); + _cw->defer_move_resize = EINA_FALSE; + } + } + } + _e_mod_comp_disable_effect_stage(_e_mod_comp_get()); + } + cw->show_done = EINA_TRUE; + _e_mod_comp_done_defer(cw); +} + +static void +_e_mod_comp_hide_done(void *data, + Evas_Object *obj __UNUSED__, + const char *emission __UNUSED__, + const char *source __UNUSED__) +{ + E_Comp_Win *cw = data; + + L(LT_EFFECT, + "[COMP] WIN_EFFECT : Hide done -> win:0x%08x\n", + cw->win); + + if ((cw->win_type == WIN_TASK_MANAGER) + && (cw->c->switcher)) + { + E_Comp_Win *_cw; + cw->c->switcher_animating = EINA_FALSE; + if (cw->c->selected_pos > 0) cw->c->selected_pos = 0; + // task switcher is closed + cw->c->switcher = EINA_FALSE; + _e_mod_comp_disable_effect_stage(_e_mod_comp_get()); + + EINA_INLIST_REVERSE_FOREACH(cw->c->wins, _cw) + { + if ( (_cw->visible == 1) + && evas_object_visible_get(_cw->shobj) + && !_e_mod_comp_is_indicator_window(_cw->bd) + && (_cw->defer_move_resize == EINA_TRUE) ) + { + evas_object_move(_cw->shobj, _cw->x, _cw->y ); + evas_object_resize(_cw->shobj, _cw->pw + (_cw->border * 2), + _cw->ph + (_cw->border * 2)); + _cw->defer_move_resize = EINA_FALSE; + } + } + } + + cw->show_done = EINA_FALSE; + _e_mod_comp_done_defer(cw); +} + +static void +_e_mod_comp_raise_above_hide_done(void *data, + Evas_Object *obj __UNUSED__, + const char *emission __UNUSED__, + const char *source __UNUSED__) +{ + E_Comp_Win *cw = data; + L(LT_EFFECT, + "[COMP] WIN_EFFECT : Raise Above Hide done -> win:0x%08x\n", + cw->win); + if (!cw) return; + _e_mod_comp_disable_effect_stage(_e_mod_comp_get()); + _e_mod_comp_done_defer(cw); +} + +static void +_e_mod_comp_fake_show_done(void *data, + Evas_Object *obj __UNUSED__, + const char *emission __UNUSED__, + const char *source __UNUSED__) +{ + E_Comp *c = data; + E_Comp_Win* cw = NULL; + + L(LT_EFFECT, + "[COMP] FAKE_EFFECT : FAKE Show done\n"); + + c->fake_launch_done = EINA_TRUE; + if ((c->fake_win != 0) + && (c->fake_launch_state)) + { + cw = _e_mod_comp_win_find(c->fake_win); + if (cw) + { + // send_noeffect_signal + edje_object_signal_emit(cw->shobj, + "e,state,visible,on,noeffect", + "e"); + _e_mod_comp_disable_fake_launch(cw->c); + } + } +} + +static void +_e_mod_comp_fake_hide_done(void *data, + Evas_Object *obj __UNUSED__, + const char *emission __UNUSED__, + const char *source __UNUSED__) +{ + E_Comp *c = data; + + L(LT_EFFECT, + "[COMP] FAKE_EFFECT : Hide done \n"); + + _e_mod_comp_disable_touch_event_block(c); + + evas_object_hide(c->fake_img_shobj); + edje_object_part_unswallow(c->fake_img_shobj, c->fake_img_obj); + evas_object_del(c->fake_img_obj); + + utilx_ungrab_key(ecore_x_display_get(), c->win, KEY_SELECT); + utilx_ungrab_key(ecore_x_display_get(), c->win, KEY_VOLUMEUP); + utilx_ungrab_key(ecore_x_display_get(), c->win, KEY_VOLUMEDOWN); + utilx_ungrab_key(ecore_x_display_get(), c->win, KEY_CAMERA); +} + +static void +_e_mod_comp_background_show_done(void *data, + Evas_Object *obj __UNUSED__, + const char *emission __UNUSED__, + const char *source __UNUSED__) +{ + E_Comp_Win *cw = data; + + L(LT_EFFECT, + "[COMP] WIN_EFFECT : Background Show done -> win:0x%08x\n", + cw->win); + + cw->effect_stage = EINA_FALSE; + _e_mod_comp_disable_effect_stage(cw->c); + + L(LT_EFFECT, + "[COMP] WIN_EFFECT : Background Show done (Background show animate_hide window) -> win:0x%08x\n", + cw->win); + + _e_mod_comp_done_defer(cw); +} + +static void +_e_mod_comp_background_hide_done(void *data, + Evas_Object *obj __UNUSED__, + const char *emission __UNUSED__, + const char *source __UNUSED__) +{ + E_Comp_Win *cw = data; + + L(LT_EFFECT, + "[COMP] WIN_EFFECT : Background Hide done -> win:0x%08x\n", + cw->win); + + cw->effect_stage = EINA_FALSE; + _e_mod_comp_disable_effect_stage(cw->c); + + L(LT_EFFECT, + "[COMP] WIN_EFFECT : Background Hide done (Background hide animate_hide window) -> win:0x%08x\n", + cw->win); + + _e_mod_comp_done_defer(cw); +} + +// if Border is not existed then, return itself. +// otherwise, return itself or parent. +E_Comp_Win * +_e_mod_comp_win_transient_parent_find(E_Comp_Win *cw) +{ + Ecore_X_Window transient_parent; + E_Comp_Win *parent_cw = NULL; + E_Border *bd = NULL; + if (cw->bd) + { + bd = cw->bd; + do { + transient_parent = bd->win; + bd = bd->parent; + } while (bd); + + parent_cw = _e_mod_comp_win_find(transient_parent); + return parent_cw; + } + return cw; +} + +E_Comp_Win * +_e_mod_comp_win_find_background_win(E_Comp_Win *cw) +{ + Eina_Inlist *wins_list; + E_Comp_Win *find_cw = cw; + if (!find_cw) return NULL; + + while ((wins_list = EINA_INLIST_GET(find_cw)->prev) != NULL) + { + find_cw = _EINA_INLIST_CONTAINER(find_cw, wins_list); + if ((find_cw->w == find_cw->c->man->w) && + (find_cw->h == find_cw->c->man->h) && + (find_cw->x == 0) && + (find_cw->y == 0) && + (find_cw->visible) && + (find_cw->invalid == EINA_FALSE) && + (find_cw->input_only == EINA_FALSE)) + { + return find_cw; + } + } + return NULL; +} + +E_Comp_Win * +_e_mod_comp_win_find_fake_background_win(E_Comp *c) +{ + E_Comp_Win *find_cw = NULL; + if (!c) return NULL; + + EINA_INLIST_REVERSE_FOREACH(c->wins, find_cw) + { + if ((find_cw->w == c->man->w) && + (find_cw->h == c->man->h) && + (find_cw->x == 0) && + (find_cw->y == 0) && + (find_cw->visible) && + (find_cw->invalid == EINA_FALSE) && + (find_cw->input_only == EINA_FALSE)) + { + return find_cw; + } + } + return NULL; +} + +static void +_e_mod_comp_win_sync_setup(E_Comp_Win *cw, + Ecore_X_Window win) +{ + if (!_comp_mod->conf->efl_sync) return; + if (cw->bd) + { + if (_e_mod_comp_win_is_borderless(cw) + || (_comp_mod->conf->loose_sync)) + cw->counter = ecore_x_e_comp_sync_counter_get(win); + else + { + ecore_x_e_comp_sync_cancel_send(win); + cw->counter = 0; + } + } + else + cw->counter = ecore_x_e_comp_sync_counter_get(win); + + if (cw->counter) + { + if (cw->bd) + { + E_Comp_Win *client_cw = _e_mod_comp_win_find(win); + if (client_cw && + client_cw->counter == cw->counter) + { + ecore_x_sync_counter_inc(cw->counter, 1); + return; + } + } + + ecore_x_e_comp_sync_begin_send(win); + ecore_x_sync_counter_inc(cw->counter, 1); + } +} + +static void +_e_mod_comp_win_shadow_setup(E_Comp_Win *cw) +{ + Evas_Object *o; + Eina_List *l; + int ok = 0; + char buf[PATH_MAX]; + + evas_object_image_smooth_scale_set(cw->obj, _comp_mod->conf->smooth_windows); + EINA_LIST_FOREACH(cw->obj_mirror, l, o) + { + evas_object_image_smooth_scale_set(o, _comp_mod->conf->smooth_windows); + } + + if (_comp_mod->conf->shadow_file) + { + ok = _e_mod_comp_shadow_policy(cw); + } + + if (!ok) + { + fprintf(stdout, + "[E17-comp] EDC Animation isn't loaded! win:0x%08x %s(%d) file:%s\n", + cw->win, __func__, __LINE__, _comp_mod->conf->shadow_file); + + _e_mod_comp_get_edje_error(cw); + + if (_comp_mod->conf->shadow_style) + { + snprintf(buf, sizeof(buf), "e/comp/%s", _comp_mod->conf->shadow_style); + ok = e_theme_edje_object_set(cw->shobj, + "base/theme/borders", + buf); + } + if (!ok) + { + ok = e_theme_edje_object_set(cw->shobj, + "base/theme/borders", + "e/comp/default"); + } + } + // fallback to local shadow.edj - will go when default theme supports this + if (!ok) + { + fprintf(stdout, + "[E17-comp] EDC Animation isn't loaded! win:0x%08x %s(%d)\n", + cw->win, __func__, __LINE__); + _e_mod_comp_get_edje_error(cw); + snprintf(buf, sizeof(buf), "%s/shadow.edj", e_module_dir_get(_comp_mod->module)); + ok = edje_object_file_set(cw->shobj, buf, "shadow"); + } + if (!edje_object_part_swallow(cw->shobj, + "e.swallow.content", + cw->obj)) + { + fprintf(stdout, + "[E17-comp] Window pixmap didn't swalloed! win:0x%08x %s(%d)\n", + cw->win, __func__, __LINE__); + } + + _e_mod_comp_get_edje_error(cw); + edje_object_signal_emit(cw->shobj, + "e,state,shadow,off", + "e"); + + if (cw->bd) + { + if (cw->bd->focused) + edje_object_signal_emit(cw->shobj, + "e,state,focus,on", + "e"); + if (cw->bd->client.icccm.urgent) + edje_object_signal_emit(cw->shobj, + "e,state,urgent,on", + "e"); + } +} + +static Evas_Object * +_e_mod_comp_win_mirror_add(E_Comp_Win *cw) +{ + Evas_Object *o; + + if (!cw->c) return NULL; + + o = evas_object_image_filled_add(cw->c->evas); + evas_object_image_colorspace_set(o, EVAS_COLORSPACE_ARGB8888); + cw->obj_mirror = eina_list_append(cw->obj_mirror, o); + + if ((cw->pixmap) && (cw->pw > 0) && (cw->ph > 0)) + { + unsigned int *pix; + Eina_Bool alpha; + int w, h; + + alpha = evas_object_image_alpha_get(cw->obj); + evas_object_image_size_get(cw->obj, &w, &h); + + evas_object_image_alpha_set(o, alpha); + + if (cw->shaped) + { + pix = evas_object_image_data_get(cw->obj, 0); + evas_object_image_data_set(o, pix); + evas_object_image_size_set(o, w, h); + evas_object_image_data_set(o, pix); + evas_object_image_data_update_add(o, 0, 0, w, h); + } + else + { + if (cw->native) + { + Evas_Native_Surface ns; + + ns.version = EVAS_NATIVE_SURFACE_VERSION; + ns.type = EVAS_NATIVE_SURFACE_X11; + ns.data.x11.visual = cw->vis; + ns.data.x11.pixmap = cw->pixmap; + evas_object_image_size_set(o, w, h); + evas_object_image_native_surface_set(o, &ns); + evas_object_image_data_update_add(o, 0, 0, w, h); + } + else + { + pix = ecore_x_image_data_get(cw->xim, NULL, NULL, NULL); + evas_object_image_data_set(o, pix); + evas_object_image_size_set(o, w, h); + evas_object_image_data_set(o, pix); + evas_object_image_data_update_add(o, 0, 0, w, h); + } + } + evas_object_image_size_set(o, w, h); + evas_object_image_data_update_add(o, 0, 0, w, h); + } + + return o; +} + + +static E_Comp_Win * +_e_mod_comp_win_add(E_Comp *c, + Ecore_X_Window win) +{ + Ecore_X_Window_Attributes att; + E_Comp_Win *cw; + + cw = calloc(1, sizeof(E_Comp_Win)); + if (!cw) return NULL; + + cw->win = win; + cw->c = c; + cw->bd = e_border_find_by_window(cw->win); + cw->resize_hide = EINA_FALSE; + cw->animate_hide = EINA_FALSE; + cw->animatable = EINA_TRUE; + cw->first_show_worked = EINA_FALSE; + cw->show_done = EINA_FALSE; + cw->effect_stage = EINA_FALSE; + cw->win_type = WIN_NORMAL; + cw->defer_move_resize = EINA_FALSE; + //cw->ready_hide_effect = EINA_FALSE; + + _e_mod_comp_window_effect_policy(cw); + + if (_comp_mod->conf->grab) ecore_x_grab(); + if (cw->bd) + { + eina_hash_add(borders, e_util_winid_str_get(cw->bd->client.win), cw); + cw->dfn = e_object_delfn_add(E_OBJECT(cw->bd), + _e_mod_comp_object_del, cw); + + if (_e_mod_comp_is_normal_window(cw->bd) ) cw->win_type = WIN_NORMAL; + else if (_e_mod_comp_is_quickpanel_window(cw->bd) ) cw->win_type = WIN_QUICKPANEL; + else if (_e_mod_comp_is_task_manager_window(cw->bd) ) cw->win_type = WIN_TASK_MANAGER; + else if (_e_mod_comp_is_live_magazine_window(cw->bd) ) cw->win_type = WIN_LIVE_MAGAZINE; + else if (_e_mod_comp_is_lock_screen_window(cw->bd) ) cw->win_type = WIN_LOCK_SCREEN; + else if (_e_mod_comp_is_indicator_window(cw->bd) ) cw->win_type = WIN_INDICATOR; + else if (_e_mod_comp_is_isf_main_window(cw->bd) ) cw->win_type = WIN_ISF_MAIN; + else if (_e_mod_comp_is_isf_sub_window(cw->bd) ) cw->win_type = WIN_ISF_SUB; + else if (_e_mod_comp_is_tooltip_window(cw->bd) ) cw->win_type = WIN_TOOLTIP; + else if (_e_mod_comp_is_combo_window(cw->bd) ) cw->win_type = WIN_COMBO; + else if (_e_mod_comp_is_dnd_window(cw->bd) ) cw->win_type = WIN_DND; + else if (_e_mod_comp_is_desktop_window(cw->bd) ) cw->win_type = WIN_DESKTOP; + else if (_e_mod_comp_is_toolbar_window(cw->bd) ) cw->win_type = WIN_TOOLBAR; + else if (_e_mod_comp_is_menu_window(cw->bd) ) cw->win_type = WIN_MENU; + else if (_e_mod_comp_is_splash_window(cw->bd) ) cw->win_type = WIN_SPLASH; + else if (_e_mod_comp_is_drop_down_menu_window(cw->bd)) cw->win_type = WIN_DROP_DOWN_MENU; + else if (_e_mod_comp_is_notification_window(cw->bd) ) cw->win_type = WIN_NOTIFICATION; + else if (_e_mod_comp_is_utility_window(cw->bd) ) cw->win_type = WIN_UTILITY; + else if (_e_mod_comp_is_popup_menu_window(cw->bd) ) cw->win_type = WIN_POPUP_MENU; + else if (_e_mod_comp_is_dialog_window(cw->bd) ) cw->win_type = WIN_DIALOG; + } + else + { + cw->pop = e_popup_find_by_window(cw->win); + if (cw->pop) + cw->dfn = e_object_delfn_add(E_OBJECT(cw->pop), + _e_mod_comp_object_del, cw); + else + { + cw->menu = e_menu_find_by_window(cw->win); + if (cw->menu) + cw->dfn = e_object_delfn_add(E_OBJECT(cw->menu), + _e_mod_comp_object_del, cw); + else + { + char *netwm_title = NULL; + cw->title = ecore_x_icccm_title_get(cw->win); + if (ecore_x_netwm_name_get(cw->win, &netwm_title)) + { + if (cw->title) free(cw->title); + cw->title = netwm_title; + } + ecore_x_icccm_name_class_get(cw->win, &cw->name, &cw->clas); + cw->role = ecore_x_icccm_window_role_get(cw->win); + if (!ecore_x_netwm_window_type_get(cw->win, &cw->primary_type)) + cw->primary_type = ECORE_X_WINDOW_TYPE_UNKNOWN; + } + } + } + // fixme: could use bd/pop/menu for this too + memset((&att), 0, sizeof(Ecore_X_Window_Attributes)); + if (!ecore_x_window_attributes_get(cw->win, &att)) + { + free(cw); + if (_comp_mod->conf->grab) ecore_x_ungrab(); + return NULL; + } + + if ((!att.input_only) && + ((att.depth != 24) && (att.depth != 32))) + { + printf("WARNING: window 0x%x not 24/32bpp -> %ibpp\n", + cw->win, att.depth); + cw->invalid = 1; + } + cw->input_only = att.input_only; + cw->override = att.override; + cw->vis = att.visual; + cw->depth = att.depth; + cw->argb = ecore_x_window_argb_get(cw->win); + + eina_hash_add(windows, e_util_winid_str_get(cw->win), cw); + cw->inhash = 1; + if ((!cw->input_only) && (!cw->invalid)) + { + Ecore_X_Rectangle *rects; + int num; + + cw->damage = ecore_x_damage_new + (cw->win, ECORE_X_DAMAGE_REPORT_DELTA_RECTANGLES); + eina_hash_add(damages, e_util_winid_str_get(cw->damage), cw); + cw->shobj = edje_object_add(c->evas); + if (!cw->c->use_bg_img) + { + evas_object_stack_below(cw->c->bg_img, evas_object_bottom_get(cw->c->evas)); + } + cw->obj = evas_object_image_filled_add(c->evas); + evas_object_image_colorspace_set(cw->obj, EVAS_COLORSPACE_ARGB8888); + + if (cw->argb) evas_object_image_alpha_set(cw->obj, 1); + else evas_object_image_alpha_set(cw->obj, 0); + + _e_mod_comp_win_shadow_setup(cw); + _e_mod_comp_win_cb_setup(cw); + + evas_object_show(cw->obj); + ecore_x_window_shape_events_select(cw->win, 1); + rects = ecore_x_window_shape_rectangles_get(cw->win, &num); + if (rects) + { + int i; + if (rects) + { + int int_w, int_h; + for (i = 0; i < num; i++) + { + int_w = (int)rects[i].width; + int_h = (int)rects[i].height; + E_RECTS_CLIP_TO_RECT(rects[i].x, rects[i].y, + int_w, int_h, + 0, 0, att.w, att.h); + rects[i].width = (unsigned int)int_w; + rects[i].height = (unsigned int)int_h; + } + } + if (!_e_mod_comp_shaped_check(att.w, att.h, rects, num)) + { + free(rects); + rects = NULL; + } + if (rects) + { + cw->shape_changed = 1; + free(rects); + } + } + if (cw->bd) evas_object_data_set(cw->shobj, "border", cw->bd); + else if (cw->pop) evas_object_data_set(cw->shobj, "popup", cw->pop); + else if (cw->menu) evas_object_data_set(cw->shobj, "menu", cw->menu); + + evas_object_pass_events_set(cw->obj, 1); + + cw->pending_count++; + e_manager_comp_event_src_add_send + (cw->c->man, (E_Manager_Comp_Source *)cw, + _e_mod_comp_cb_pending_after, cw->c); + } + else + { + cw->shobj = evas_object_rectangle_add(c->evas); + evas_object_color_set(cw->shobj, 0, 0, 0, 0); + } + evas_object_pass_events_set(cw->shobj, 1); + evas_object_data_set(cw->shobj, "win", + (void *)((unsigned long)cw->win)); + evas_object_data_set(cw->shobj, "src", cw); + + c->wins_invalid = 1; + c->wins = eina_inlist_append(c->wins, EINA_INLIST_GET(cw)); + cw->up = e_mod_comp_update_new(); + e_mod_comp_update_tile_size_set(cw->up, 32, 32); + // for software: + e_mod_comp_update_policy_set + (cw->up, E_UPDATE_POLICY_HALF_WIDTH_OR_MORE_ROUND_UP_TO_FULL_WIDTH); + if (((!cw->input_only) && (!cw->invalid)) && (cw->override)) + { + cw->redirected = 1; + cw->dmg_updates = 0; + } + if (_comp_mod->conf->grab) ecore_x_ungrab(); + return cw; +} + +static void +_e_mod_comp_win_del(E_Comp_Win *cw) +{ + int pending_count; + Eina_List *l; + Evas_Object *o; + + // while win_hide animation is progressing, at that time win_del is called, + // background window effect is may not work fully. + // so, explicit call disable effect stage function. + if (cw->effect_stage) + _e_mod_comp_disable_effect_stage(cw->c); + + if (cw->animating) + { + cw->c->animating--; + cw->animating = 0; + _e_mod_comp_send_window_effect_client_state(cw, EINA_FALSE); + } + + if ((!cw->input_only) && (!cw->invalid)) + { + cw->pending_count++; + e_manager_comp_event_src_del_send + (cw->c->man, (E_Manager_Comp_Source *)cw, + _e_mod_comp_cb_pending_after, cw->c); + } + + e_mod_comp_update_free(cw->up); + _e_mod_comp_rotation_release(cw); + + // release window rotation stuffs + _e_mod_comp_win_rotation_release(cw); + + if (cw->rects) + { + free(cw->rects); + cw->rects = NULL; + } + if (cw->update_timeout) + { + ecore_timer_del(cw->update_timeout); + cw->update_timeout = NULL; + } + if (cw->dfn) + { + if (cw->bd) + { + eina_hash_del(borders, e_util_winid_str_get(cw->bd->client.win), cw); + e_object_delfn_del(E_OBJECT(cw->bd), cw->dfn); + cw->bd = NULL; + } + else if (cw->pop) + { + e_object_delfn_del(E_OBJECT(cw->pop), cw->dfn); + cw->pop = NULL; + } + else if (cw->menu) + { + e_object_delfn_del(E_OBJECT(cw->menu), cw->dfn); + cw->menu = NULL; + } + cw->dfn = NULL; + } + if (cw->pixmap) + { + if (cw->native) + { + cw->native = 0; + evas_object_image_native_surface_set(cw->obj, NULL); + EINA_LIST_FOREACH(cw->obj_mirror, l, o) + { + evas_object_image_native_surface_set(o, NULL); + } + } + + ecore_x_pixmap_free(cw->pixmap); + cw->pixmap = 0; + cw->pw = 0; + cw->ph = 0; + ecore_x_e_comp_pixmap_set(cw->win, cw->pixmap); + _e_mod_comp_win_free_xim(cw); + } + if (cw->redirected) + { + cw->redirected = 0; + cw->pw = 0; + cw->ph = 0; + } + if (cw->update) + { + cw->update = 0; + cw->c->updates = eina_list_remove(cw->c->updates, cw); + } + if (cw->obj_mirror) + { + Evas_Object *_o; + EINA_LIST_FREE(cw->obj_mirror, _o) + { + if (!_o) continue; + if (cw->xim) evas_object_image_data_set(_o, NULL); + evas_object_del(_o); + } + } + if (cw->xim) + { + evas_object_image_data_set(cw->obj, NULL); + ecore_x_image_free(cw->xim); + cw->xim = NULL; + } + if (cw->obj) + { + evas_object_del(cw->obj); + cw->obj = NULL; + } + if (cw->shobj) + { + evas_object_del(cw->shobj); + cw->shobj = NULL; + } + if (cw->inhash) + eina_hash_del(windows, e_util_winid_str_get(cw->win), cw); + if (cw->damage) + { + Ecore_X_Region parts; + + eina_hash_del(damages, e_util_winid_str_get(cw->damage), cw); + parts = ecore_x_region_new(NULL, 0); + ecore_x_damage_subtract(cw->damage, 0, parts); + ecore_x_region_free(parts); + ecore_x_damage_free(cw->damage); + cw->damage = 0; + } + if (cw->title) free(cw->title); + if (cw->name) free(cw->name); + if (cw->clas) free(cw->clas); + if (cw->role) free(cw->role); + cw->c->wins_invalid = 1; + cw->c->wins = eina_inlist_remove(cw->c->wins, EINA_INLIST_GET(cw)); + pending_count = cw->pending_count; + memset(cw, 0, sizeof(E_Comp_Win)); + cw->pending_count = pending_count; + cw->delete_pending = 1; + if (cw->pending_count > 0) return; + free(cw); +} + +static void +_e_mod_comp_win_show(E_Comp_Win *cw) +{ + Eina_List *l; + Evas_Object *o; + + // if win_hide was showed then immediatly win_show() function is called. case. + if (cw->defer_hide == 1) cw->defer_hide = 0; + if (cw->visible) return; + cw->visible = 1; + _e_mod_comp_win_configure(cw, + cw->hidden.x, cw->hidden.y, + cw->w, cw->h, + cw->border); + if ((cw->input_only) || (cw->invalid)) return; + + if (cw->bd) + _e_mod_comp_win_sync_setup(cw, cw->bd->client.win); + else + _e_mod_comp_win_sync_setup(cw, cw->win); + + if (cw->real_hid) + { + cw->real_hid = 0; + if (cw->native) + { + evas_object_image_native_surface_set(cw->obj, NULL); + cw->native = 0; + EINA_LIST_FOREACH(cw->obj_mirror, l, o) + { + evas_object_image_native_surface_set(o, NULL); + } + } + if (cw->pixmap) + { + ecore_x_pixmap_free(cw->pixmap); + cw->pixmap = 0; + cw->pw = 0; + cw->ph = 0; + ecore_x_e_comp_pixmap_set(cw->win, cw->pixmap); + } + if (cw->xim) + { + evas_object_image_size_set(cw->obj, 1, 1); + evas_object_image_data_set(cw->obj, NULL); + ecore_x_image_free(cw->xim); + cw->xim = NULL; + _e_mod_comp_win_free_xim(cw); + EINA_LIST_FOREACH(cw->obj_mirror, l, o) + { + evas_object_image_size_set(o, 1, 1); + evas_object_image_data_set(o, NULL); + } + } + if (cw->redirected) + { + cw->redirected = 0; + cw->pw = 0; + cw->ph = 0; + } + } + + if ((!cw->redirected) || (!cw->pixmap)) + { + if (!cw->pixmap) cw->pixmap = ecore_x_composite_name_window_pixmap_get(cw->win); + L(LT_EVENT_X, + "[COMP]\t\tSHOW ecore_x_composite_name_window_pixmap_get() pixmap:0x%08x after redirect\n", + cw->pixmap); + if (cw->pixmap) + ecore_x_pixmap_geometry_get(cw->pixmap, NULL, NULL, &(cw->pw), &(cw->ph)); + else + { + cw->pw = 0; + cw->ph = 0; + } + if ((cw->pw <= 0) || (cw->ph <= 0)) + { + if (cw->pixmap) + { + ecore_x_pixmap_free(cw->pixmap); + cw->pixmap = 0; + cw->needpix = 1; + L(LT_EVENT_X, + "[COMP]\t\tSHOW free pixmap: 0x%08x invalid pixmap size.\n", + cw->pixmap); + } + } + cw->redirected = 1; + + e_mod_comp_update_resize(cw->up, cw->pw, cw->ph); + e_mod_comp_update_add(cw->up, 0, 0, cw->pw, cw->ph); + + evas_object_image_size_set(cw->obj, cw->pw, cw->ph); + EINA_LIST_FOREACH(cw->obj_mirror, l, o) + { + evas_object_image_size_set(o, cw->pw, cw->ph); + } + + L(LT_EVENT_X, + "[COMP]\t\tSHOW redirect win pixmap:0x%08x %3dx%3d\n", + cw->pixmap, cw->pw, cw->ph); + + ecore_x_e_comp_pixmap_set(cw->win, cw->pixmap); + } + + if (cw->dmg_updates >= 1) + { + if ((cw->c->gl) && (_comp_mod->conf->texture_from_pixmap)) + { + if (!cw->pixmap) + cw->pixmap = ecore_x_composite_name_window_pixmap_get(cw->win); + + if (cw->pixmap) + { + ecore_x_pixmap_geometry_get(cw->pixmap, + NULL, NULL, + &(cw->pw), &(cw->ph)); + } + else + { + cw->pw = 0; + cw->ph = 0; + } + + if ((cw->pw <= 0) || (cw->ph <= 0)) + { + if (cw->pixmap) + ecore_x_pixmap_free(cw->pixmap); + cw->pixmap = 0; + cw->needpix = 1; + L(LT_EVENT_X, + "[COMP]\t\tSHOW free pixmap: 0x%08x invalid pixmap size.\n", + cw->pixmap); + } + else + { + ecore_x_e_comp_pixmap_set(cw->win, cw->pixmap); + evas_object_image_size_set(cw->obj, cw->pw, cw->ph); + EINA_LIST_FOREACH(cw->obj_mirror, l, o) + { + evas_object_image_size_set(o, cw->pw, cw->ph); + } + if (!cw->native) + { + Evas_Native_Surface ns; + ns.version = EVAS_NATIVE_SURFACE_VERSION; + ns.type = EVAS_NATIVE_SURFACE_X11; + ns.data.x11.visual = cw->vis; + ns.data.x11.pixmap = cw->pixmap; + evas_object_image_native_surface_set(cw->obj, &ns); + + EINA_LIST_FOREACH(cw->obj_mirror, l, o) + { + evas_object_image_native_surface_set(o, &ns); + } + + evas_object_image_data_update_add(cw->obj, 0, 0, cw->pw, cw->ph); + cw->native = 1; + } + } + } + + if (cw->pixmap) + { + cw->defer_hide = 0; + if (!cw->hidden_override) + { + if ( cw->defer_move_resize ) + { + evas_object_move(cw->shobj, cw->x, cw->y ); + evas_object_resize(cw->shobj, cw->pw + (cw->border * 2), + cw->ph + (cw->border * 2)); + cw->defer_move_resize = EINA_FALSE; + } + evas_object_show(cw->shobj); + } + L(LT_EVENT_X, + "[COMP]\t\tSHOW evas_object_show()\n"); + L(LT_EFFECT, + "[COMP] WIN_EFFECT : Show signal Emit -> win:0x%08x\n", + cw->win); + _e_mod_comp_window_show_effect(cw); + } + } + _e_mod_comp_win_render_queue(cw); +} + +static void +_e_mod_comp_win_unredirect(E_Comp_Win *cw) +{ + if (!cw->visible) return; + if ((cw->input_only) || (cw->invalid)) return; + + if (cw->obj) + { + evas_object_hide(cw->obj); + evas_object_del(cw->obj); + cw->obj = NULL; + } + if (cw->update_timeout) + { + ecore_timer_del(cw->update_timeout); + cw->update_timeout = NULL; + } + if (cw->native) + { + evas_object_image_native_surface_set(cw->obj, NULL); + cw->native = 0; + } + if (cw->pixmap) + { + ecore_x_pixmap_free(cw->pixmap); + cw->pixmap = 0; + cw->pw = 0; + cw->ph = 0; + } + if (cw->xim) + { + evas_object_image_size_set(cw->obj, 1, 1); + evas_object_image_data_set(cw->obj, NULL); + ecore_x_image_free(cw->xim); + cw->xim = NULL; + } + if (cw->redirected) + { + ecore_x_composite_unredirect_window(cw->win, ECORE_X_COMPOSITE_UPDATE_MANUAL); + cw->redirected = 0; + } + if (cw->damage) + { + _e_mod_comp_win_del_damage(cw, cw->damage); + ecore_x_damage_subtract(cw->damage, 0, 0); + ecore_x_damage_free(cw->damage); + cw->damage = 0; + } +} + +static void +_e_mod_comp_win_real_hide(E_Comp_Win *cw) +{ + if (cw->bd) + { + _e_mod_comp_win_hide(cw); + return; + } + cw->real_hid = 1; + _e_mod_comp_win_hide(cw); +} + +static void +_e_mod_comp_win_hide(E_Comp_Win *cw) +{ + Eina_List *l; + Evas_Object *o; + + if ((!cw->visible) && (!cw->defer_hide)) return; + cw->visible = 0; + if ((cw->input_only) || (cw->invalid)) return; + + /* release window rotation stuffs */ + _e_mod_comp_win_rotation_release(cw); + + if (cw->rotating) + { + if (!cw->force) + { + cw->defer_hide = 1; + e_mod_comp_rotation_end_effect(cw->rotobj); + + _e_mod_comp_win_inc_animating(cw); + + cw->pending_count++; + + L(LT_EVENT_X, + "[COMP] %31s w:0x%08x hide rotobj. bd:%s force:%d defer_hide:%d\n", + "PIX_ROT", _e_mod_comp_win_get_client_xid(cw), + cw->bd ? "O" : "X", cw->force, cw->defer_hide); + return; + } + else + { + cw->animating = 0; + cw->defer_hide = 0; + _e_mod_comp_rotation_release(cw); + } + } + + if (cw->force == 0) + { + cw->defer_hide = 1; + _e_mod_comp_window_hide_effect(cw); + return; + } + cw->defer_hide = 0; + cw->force = 0; + evas_object_hide(cw->shobj); + + Ecore_X_Window _w = _e_mod_comp_win_get_client_xid(cw); + if (cw->update_timeout) + { + ecore_timer_del(cw->update_timeout); + cw->update_timeout = NULL; + } + if (_comp_mod->conf->keep_unmapped) + { + if (_comp_mod->conf->send_flush) ecore_x_e_comp_flush_send(_w); + if (_comp_mod->conf->send_dump) ecore_x_e_comp_dump_send(_w); + return; + } + + if (cw->native) + { + evas_object_image_native_surface_set(cw->obj, NULL); + cw->native = 0; + EINA_LIST_FOREACH(cw->obj_mirror, l, o) + { + evas_object_image_native_surface_set(o, NULL); + } + } + if (cw->pixmap) + { + ecore_x_pixmap_free(cw->pixmap); + cw->pixmap = 0; + cw->pw = 0; + cw->ph = 0; + ecore_x_e_comp_pixmap_set(cw->win, cw->pixmap); + } + if (cw->xim) + { + evas_object_image_size_set(cw->obj, 1, 1); + evas_object_image_data_set(cw->obj, NULL); + ecore_x_image_free(cw->xim); + cw->xim = NULL; + EINA_LIST_FOREACH(cw->obj_mirror, l, o) + { + evas_object_image_size_set(o, 1, 1); + evas_object_image_data_set(o, NULL); + } + } + if (cw->redirected) + { + cw->redirected = 0; + cw->pw = 0; + cw->ph = 0; + } + _e_mod_comp_win_render_queue(cw); + if (_comp_mod->conf->send_flush) ecore_x_e_comp_flush_send(_w); + if (_comp_mod->conf->send_dump) ecore_x_e_comp_dump_send(_w); +} + +static void +_e_mod_comp_win_raise_above(E_Comp_Win *cw, + E_Comp_Win *cw2) +{ + Eina_Bool show_stack_before = EINA_FALSE; + Eina_Bool show_stack_after = EINA_FALSE; + Eina_Bool real_show_stack_effect = EINA_TRUE; + + E_Comp_Win *lower_background = NULL; + + L(LT_EFFECT, + "[COMP] WIN_EFFECT : Raise Above [0x%x] <- [0x%x]\n", + _e_mod_comp_win_get_client_xid(cw), + _e_mod_comp_win_get_client_xid(cw2)); + + if (cw->c->switcher) + { + int i = 0; + Evas_Coord x, y, w, h; + E_Comp_Win *find_cw; + EINA_INLIST_REVERSE_FOREACH(cw->c->wins, find_cw) + { + if (find_cw->visible + && evas_object_visible_get(find_cw->shobj) + && evas_object_visible_get(find_cw->obj) + && (find_cw->win_type != WIN_INDICATOR) + && (find_cw->win_type != WIN_TASK_MANAGER)) + { + evas_object_geometry_get( find_cw->shobj, &x, &y, &w, &h ); + if ( w == find_cw->c->screen_w && h == find_cw->c->screen_h ) + { + i++; + if (find_cw == cw) + { + cw->c->selected_pos = i; + break; + } + } + } + } + } + + cw->c->wins_invalid = 1; + + lower_background = _e_mod_comp_win_find_background_win(cw); + //real show effect check 1 + show_stack_before = _e_mod_comp_is_next_win_stack(cw, cw2); + + cw->c->wins = eina_inlist_remove(cw->c->wins, + EINA_INLIST_GET(cw)); + cw->c->wins = eina_inlist_append_relative(cw->c->wins, + EINA_INLIST_GET(cw), + EINA_INLIST_GET(cw2)); + //real show effect check 2 + show_stack_after = _e_mod_comp_is_next_win_stack(cw, cw2); + + if (show_stack_before == show_stack_after) + real_show_stack_effect = EINA_FALSE; + + // indicate slide up and down, save current position, size, color + if ( ( _e_mod_comp_window_restack_policy(cw, cw2) == EINA_TRUE) + && ( real_show_stack_effect == EINA_TRUE) + && ( cw->first_show_worked == EINA_TRUE) ) + { + _e_mod_comp_window_restack_effect(cw, cw2); + } + else if ( ( _e_mod_comp_window_restack_policy(cw, lower_background) == EINA_TRUE ) + && ( real_show_stack_effect == EINA_FALSE) + && ( cw->show_done == EINA_TRUE) + && ( _e_mod_comp_win_check_visible2(cw) == EINA_FALSE ) ) + // && ( cw->ready_hide_effect == EINA_TRUE) ) + { + _e_mod_comp_window_lower_effect(cw, lower_background); + } + else + { + evas_object_stack_above(cw->shobj, cw2->shobj); + + // for no-effect window + if ( (cw->visible == EINA_TRUE) + && (cw->first_show_worked == EINA_TRUE ) ) + { + edje_object_signal_emit(cw->shobj, + "e,state,visible,on,noeffect", + "e"); + L(LT_EFFECT, + "[COMP] WIN_EFFECT : Raise above(for no-effect window) signal Emit -> win:0x%08x\n", + cw->win); + _e_mod_comp_win_inc_animating(cw); + } + } + + _e_mod_comp_win_render_queue(cw); + cw->pending_count++; + e_manager_comp_event_src_config_send + (cw->c->man, (E_Manager_Comp_Source *)cw, + _e_mod_comp_cb_pending_after, cw->c); +} + +static void +_e_mod_comp_win_raise(E_Comp_Win *cw) +{ + cw->c->wins = eina_inlist_remove(cw->c->wins, EINA_INLIST_GET(cw)); + cw->c->wins = eina_inlist_append(cw->c->wins, EINA_INLIST_GET(cw)); + + evas_object_raise(cw->shobj); + _e_mod_comp_win_render_queue(cw); +} + +static void +_e_mod_comp_win_lower(E_Comp_Win *cw) +{ + cw->c->wins_invalid = 1; + cw->c->wins = eina_inlist_remove(cw->c->wins, EINA_INLIST_GET(cw)); + cw->c->wins = eina_inlist_prepend(cw->c->wins, EINA_INLIST_GET(cw)); + + evas_object_lower(cw->shobj); + _e_mod_comp_win_render_queue(cw); + cw->pending_count++; + e_manager_comp_event_src_config_send + (cw->c->man, (E_Manager_Comp_Source *)cw, + _e_mod_comp_cb_pending_after, cw->c); +} + +static void +_e_mod_comp_win_configure(E_Comp_Win *cw, + int x, int y, + int w, int h, + int border) +{ + if (cw->rotating && cw->rotobj) + { + if (!((w == cw->w) && (h == cw->h))) + { + Ecore_X_Window win = _e_mod_comp_win_get_client_xid(cw); + + L(LT_EVENT_X, + "[COMP] %31s w:0x%08x bd:%s resize.\n", + "PIX_ROT", win, cw->bd ? "O" : "X"); + + _e_mod_comp_win_recreate_shobj(cw); + e_mod_comp_rotation_done_send(win, ATOM_CM_PIXMAP_ROTATION_RESIZE_PIXMAP); + + L(LT_EVENT_X, + "[COMP] %31s w:0x%08x send ROTATION_RESIZE_PIXMAP.\n", + "PIX_ROT", win); + } + } + + if (!((w == cw->w) && (h == cw->h))) + { + cw->w = w; + cw->h = h; + cw->needpix = 1; + cw->dmg_updates = 0; + } + + if (!cw->visible) + { + cw->hidden.x = x; + cw->hidden.y = y; + cw->border = border; + } + else + { + if (!((x == cw->x) && (y == cw->y))) + { + cw->x = x; + cw->y = y; + if (!cw->needpix) + evas_object_move(cw->shobj, cw->x, cw->y); + } + cw->hidden.x = x; + cw->hidden.y = y; + } + + if (cw->border != border) + { + cw->border = border; + evas_object_resize(cw->shobj, + cw->pw + (cw->border * 2), + cw->ph + (cw->border * 2)); + } + cw->hidden.w = cw->w; + cw->hidden.h = cw->h; + if ((cw->input_only) || (cw->invalid) || (cw->needpix)) return; + _e_mod_comp_win_render_queue(cw); + cw->pending_count++; + e_manager_comp_event_src_config_send + (cw->c->man, (E_Manager_Comp_Source *)cw, + _e_mod_comp_cb_pending_after, cw->c); +} + +static void +_e_mod_comp_win_damage(E_Comp_Win *cw, + int x, int y, + int w, int h, + Eina_Bool dmg) +{ + if ((cw->input_only) || (cw->invalid)) return; + if ((dmg) && (cw->rotating)) + { + e_mod_comp_rotation_damage(cw->rotobj); + cw->dmg_updates++; + } + else if ((dmg) && (cw->damage)) + { + Ecore_X_Region parts; + parts = ecore_x_region_new(NULL, 0); + ecore_x_damage_subtract(cw->damage, 0, parts); + ecore_x_region_free(parts); + cw->dmg_updates++; + } + e_mod_comp_update_add(cw->up, x, y, w, h); + if (dmg) + { + if (cw->counter) + { + if (!cw->update_timeout) + cw->update_timeout = ecore_timer_add + (ecore_animator_frametime_get() * 600, + _e_mod_comp_win_damage_timeout, cw); + return; + } + } + + /* to fix noise window appearing when non-EFL's window is showing, + * add a check code that checks and skips first damage. + * first damage is generated by the X server when copying image of the + * root window. - gl77.lee 110208 + */ + if ((dmg) + && !(cw->rotating) + && (cw->dmg_updates <= 1)) + { + if (!(cw->needpix)) + { + L(LT_EVENT_X, + "[COMP] %31s w:0x%08x bd:%s skip first damage.\n", + "X_DAMAGE", _e_mod_comp_win_get_client_xid(cw), + cw->bd ? "O" : "X"); + return; + } + } + + if (!cw->update) + { + cw->update = 1; + cw->c->updates = eina_list_append(cw->c->updates, cw); + } + _e_mod_comp_win_render_queue(cw); +} + +static void +_e_mod_comp_win_reshape(E_Comp_Win *cw) +{ + if (cw->shape_changed) return; + cw->shape_changed = 1; + if (!cw->update) + { + cw->update = 1; + cw->c->updates = eina_list_append(cw->c->updates, cw); + } + e_mod_comp_update_add(cw->up, 0, 0, cw->w, cw->h); + _e_mod_comp_win_render_queue(cw); +} + +static Eina_Bool +_e_mod_comp_create(void *data __UNUSED__, + int type __UNUSED__, + void *event) +{ + Ecore_X_Event_Window_Create *ev = event; + E_Comp_Win *cw; + E_Comp *c = _e_mod_comp_find(ev->parent); + if (!c) return ECORE_CALLBACK_PASS_ON; + if (_e_mod_comp_win_find(ev->win)) return ECORE_CALLBACK_PASS_ON; + if (c->win == ev->win) return ECORE_CALLBACK_PASS_ON; + if (c->ee_win == ev->win) return ECORE_CALLBACK_PASS_ON; + L(LT_EVENT_X, + "[COMP] ev:%15.15s w:0x%08x\n", + "X_CREATE", ev->win); + cw = _e_mod_comp_win_add(c, ev->win); + if (cw) + _e_mod_comp_win_configure(cw, + ev->x, ev->y, + ev->w, ev->h, + ev->border); + return ECORE_CALLBACK_PASS_ON; +} + +static Eina_Bool +_e_mod_comp_destroy(void *data __UNUSED__, + int type __UNUSED__, + void *event) +{ + Ecore_X_Event_Window_Destroy *ev = event; + E_Comp_Win *cw = _e_mod_comp_win_find(ev->win); + if (!cw) return ECORE_CALLBACK_PASS_ON; + if (_e_mod_comp_win_is_border(cw)) return ECORE_CALLBACK_PASS_ON; + L(LT_EVENT_X, + "[COMP] ev:%15.15s w:0x%08x bd:%d c:0x%08x cw:%p\n", + "X_DESTROY", ev->win, _e_mod_comp_win_is_border(cw), + _e_mod_comp_win_get_client_xid(cw), cw); + if (cw->animating) cw->delete_me = 1; + else _e_mod_comp_win_del(cw); + return ECORE_CALLBACK_PASS_ON; +} + +static Eina_Bool +_e_mod_comp_show(void *data __UNUSED__, + int type __UNUSED__, + void *event) +{ + Ecore_X_Event_Window_Show *ev = event; + E_Comp_Win *cw = _e_mod_comp_win_find(ev->win); + if (!cw) return ECORE_CALLBACK_PASS_ON; + if (cw->visible) return ECORE_CALLBACK_PASS_ON; + if (_e_mod_comp_win_is_border(cw)) return ECORE_CALLBACK_PASS_ON; + L(LT_EVENT_X, + "[COMP] ev:%15.15s w:0x%08x bd:%d c:0x%08x cw:%p\n", + "X_SHOW", ev->win, _e_mod_comp_win_is_border(cw), + _e_mod_comp_win_get_client_xid(cw), cw); + _e_mod_comp_win_show(cw); + return ECORE_CALLBACK_PASS_ON; +} + +static Eina_Bool +_e_mod_comp_hide(void *data __UNUSED__, + int type __UNUSED__, + void *event) +{ + Ecore_X_Event_Window_Hide *ev = event; + E_Comp_Win *cw = _e_mod_comp_win_find(ev->win); + if (!cw) return ECORE_CALLBACK_PASS_ON; + if (!cw->visible) return ECORE_CALLBACK_PASS_ON; + if (_e_mod_comp_win_is_border(cw)) return ECORE_CALLBACK_PASS_ON; + L(LT_EVENT_X, + "[COMP] ev:%15.15s w:0x%08x bd:%d c:0x%08x cw:%p\n", + "X_HIDE", ev->win, _e_mod_comp_win_is_border(cw), + _e_mod_comp_win_get_client_xid(cw), cw); + _e_mod_comp_win_real_hide(cw); + return ECORE_CALLBACK_PASS_ON; +} + +static Eina_Bool +_e_mod_comp_reparent(void *data __UNUSED__, + int type __UNUSED__, + void *event) +{ + Ecore_X_Event_Window_Reparent *ev = event; + E_Comp_Win *cw = _e_mod_comp_win_find(ev->win); + if (!cw) return ECORE_CALLBACK_PASS_ON; + L(LT_EVENT_X, + "[COMP] ev:%15.15s w:0x%08x bd:%d c:0x%08x cw:%p TO rw:0x%08x\n", + "X_REPARENT", ev->win, _e_mod_comp_win_is_border(cw), + _e_mod_comp_win_get_client_xid(cw), cw, ev->parent); + if (ev->parent != cw->c->man->root) + { + L(LT_EVENT_X, "[COMP] %31s w:0x%08x\n", "DEL", ev->win); + _e_mod_comp_win_del(cw); + } + + return ECORE_CALLBACK_PASS_ON; +} + +static Eina_Bool +_e_mod_comp_configure(void *data __UNUSED__, + int type __UNUSED__, + void *event) +{ + Ecore_X_Event_Window_Configure *ev = event; + E_Comp_Win *cw = _e_mod_comp_win_find(ev->win); + if (!cw) return ECORE_CALLBACK_PASS_ON; + L(LT_EVENT_X, + "[COMP] ev:%15.15s w:0x%08x bd:%d c:0x%08x cw:%p %4d %4d %3dx%3d\n", + "X_CONFIGURE", ev->win, _e_mod_comp_win_is_border(cw), + _e_mod_comp_win_get_client_xid(cw), cw, ev->x, ev->y, ev->w, ev->h); + if (ev->abovewin == 0) + { + if (EINA_INLIST_GET(cw)->prev) + { + L(LT_EVENT_X, + "[COMP] %31s w:0x%08x\n", + "LOWER", ev->win); + + _e_mod_comp_win_lower(cw); + } + } + else + { + E_Comp_Win *cw2 = _e_mod_comp_win_find(ev->abovewin); + if (cw2) + { + E_Comp_Win *cw3 = (E_Comp_Win *)(EINA_INLIST_GET(cw)->prev); + if (cw3 != cw2) + { + L(LT_EVENT_X, + "[COMP] %31s above_w:0x%08x\n", + "RAISE_ABOVE", ev->abovewin); + + _e_mod_comp_win_raise_above(cw, cw2); + } + } + } + + if (!((cw->x == ev->x) && (cw->y == ev->y)) && + ((cw->w == ev->w) && (cw->h == ev->h)) && + _e_mod_comp_win_is_border(cw)) + { + return ECORE_CALLBACK_PASS_ON; + } + + if (!((cw->x == ev->x) && (cw->y == ev->y) && + (cw->w == ev->w) && (cw->h == ev->h) && + (cw->border == ev->border))) + { + _e_mod_comp_win_configure(cw, + ev->x, ev->y, + ev->w, ev->h, + ev->border); + } + return ECORE_CALLBACK_PASS_ON; +} + +static Eina_Bool +_e_mod_comp_stack(void *data __UNUSED__, + int type __UNUSED__, + void *event) +{ + Ecore_X_Event_Window_Stack *ev = event; + E_Comp_Win *cw = _e_mod_comp_win_find(ev->win); + L(LT_EVENT_X, + "[COMP] ev:%15.15s w:0x%08x bd:%d c:0x%08x cw:%p\n", + "X_STACK", ev->win, _e_mod_comp_win_is_border(cw), _e_mod_comp_win_get_client_xid(cw), cw); + if (!cw) return ECORE_CALLBACK_PASS_ON; + if (ev->detail == ECORE_X_WINDOW_STACK_ABOVE) _e_mod_comp_win_raise(cw); + else _e_mod_comp_win_lower(cw); + return ECORE_CALLBACK_PASS_ON; +} + +static Eina_Bool +_e_mod_comp_prop_effect_state(Ecore_X_Event_Window_Property *ev __UNUSED__) +{ + E_Comp *c; + unsigned int val = 0; + int ret = -1; + + c = _e_mod_comp_get(); + if (!c) + { + fprintf(stderr, + "[E17-comp] _e_mod_comp_prop_effect_state failed.\n"); + return EINA_FALSE; + } + + ret = ecore_x_window_prop_card32_get(c->man->root, + ATOM_EFFECT_ENABLE, + &val, 1); + if (ret == -1) return EINA_FALSE; + + L(LT_EVENT_X, + "[COMP] %31s propval:%d\n", + "PROP_COMP_EFFECT_STATE", val); + + if (val != 0) + { + c->animatable = EINA_TRUE; + _comp_mod->conf->default_window_effect = 1; + e_config_domain_save("module.comp-slp", + _comp_mod->conf_edd, + _comp_mod->conf); + } + else + { + c->animatable = EINA_FALSE; + _comp_mod->conf->default_window_effect = 0; + e_config_domain_save("module.comp-slp", + _comp_mod->conf_edd, + _comp_mod->conf); + } + + L(LT_EVENT_X, + "[COMP] %31s c->animatable:%d\n", + "ATOM_WINDOW_EFFECT_ENABLE", + c->animatable); + + return EINA_TRUE; +} + +static Eina_Bool +_e_mod_comp_prop_window_effect_state(Ecore_X_Event_Window_Property *ev) +{ + E_Comp_Win *cw = NULL; + unsigned int val = 0; + int ret = -1; + + ret = ecore_x_window_prop_card32_get(ev->win, + ATOM_WINDOW_EFFECT_ENABLE, + &val, + 1); + if (ret == -1) return EINA_FALSE; + + L(LT_EVENT_X, + "[COMP] %31s propval:%d\n", + "PROP_COMP_EFFECT_STATE", val); + + cw = _e_mod_comp_win_find(ev->win); + if (cw) cw->animatable = val; + else + { + cw = _e_mod_comp_border_client_find(ev->win); + if (!cw) return EINA_FALSE; + cw->animatable = val; + } + + L(LT_EVENT_X, + "[COMP] %31s cw->animatable:%d\n", + "ATOM_WINDOW_EFFECT_ENABLE", + cw->animatable); + + return EINA_TRUE; +} + +static Eina_Bool +_e_mod_comp_prop_effect_style(Ecore_X_Event_Window_Property *ev) +{ + E_Comp_Win *cw = NULL; + Ecore_X_Atom *atoms = NULL; + int num = 0; + + num = ecore_x_window_prop_atom_list_get(ev->win, + ATOM_WINDOW_EFFECT_TYPE, + &atoms); + + if (num != 6) + { + if (num > 0) free(atoms); + return EINA_FALSE; + } + + L(LT_EVENT_X, + "[COMP] %31s \n", + "PROP_COMP_EFFECT_STYLE"); + + cw = _e_mod_comp_win_find(ev->win); + if (cw) + { + cw->show_effect = _e_mod_comp_get_effect_type(&atoms[0]); + cw->hide_effect = _e_mod_comp_get_effect_type(&atoms[1]); + cw->restack_effect = _e_mod_comp_get_effect_type(&atoms[2]); + cw->rotation_effect = _e_mod_comp_get_effect_type(&atoms[3]); + cw->focusin_effect = _e_mod_comp_get_effect_type(&atoms[4]); + cw->focusout_effect = _e_mod_comp_get_effect_type(&atoms[5]); + } + else + { + cw = _e_mod_comp_border_client_find(ev->win); + if (!cw) + { + if (num > 0) free(atoms); + return EINA_FALSE; + } + cw->show_effect = _e_mod_comp_get_effect_type(&atoms[0]); + cw->hide_effect = _e_mod_comp_get_effect_type(&atoms[1]); + cw->restack_effect = _e_mod_comp_get_effect_type(&atoms[2]); + cw->rotation_effect = _e_mod_comp_get_effect_type(&atoms[3]); + cw->focusin_effect = _e_mod_comp_get_effect_type(&atoms[4]); + cw->focusout_effect = _e_mod_comp_get_effect_type(&atoms[5]); + } + + if (num > 0) free(atoms); + + return EINA_TRUE; +} + + +#if COMP_LOGGER_BUILD_ENABLE +static Eina_Bool +_e_mod_comp_prop_log(Ecore_X_Event_Window_Property *ev) +{ + int ret = -1; + int count; + unsigned char* prop_data = NULL; + Comp_Logger comp_log_info; + + comp_log_info.logger_type = 0; + memset(comp_log_info.logger_dump_file, '\0', 256 * sizeof(char) ); + + ret = ecore_x_window_prop_property_get(ev->win, + ATOM_CM_LOG, + ECORE_X_ATOM_CARDINAL, + 32, + &prop_data, + &count); + if (ret == -1) + { + if (prop_data) free(prop_data); + return EINA_FALSE; + } + if ((ret > 0) && prop_data) + { + fprintf(stdout, + "[E17-comp] %s(%d) comp_logger_type: ", + __func__, __LINE__); + + if (comp_logger_type == LT_NOTHING) fprintf(stdout, "LT_NOTHING "); + else if (comp_logger_type == LT_ALL ) fprintf(stdout, "LT_ALL " ); + else fprintf(stdout, "%d ", comp_logger_type); + + fprintf(stdout, "-> "); + + memcpy(&comp_log_info, prop_data, sizeof(Comp_Logger) ); + comp_logger_type = comp_log_info.logger_type; + + if (comp_logger_type == LT_NOTHING ) fprintf(stdout, "LT_NOTHING\n"); + else if (comp_logger_type == LT_ALL ) fprintf(stdout, "LT_ALL\n" ); + else fprintf(stdout, "%d\n", comp_logger_type); + + if (comp_logger_type == LT_CREATE) + { + _e_mod_comp_dump_cw_stack(EINA_FALSE, NULL); + _e_mod_comp_fps_toggle(); + } + if ( ( comp_logger_type == LT_DUMP ) + && ( strlen(comp_log_info.logger_dump_file) > 0 ) ) + { + _e_mod_comp_dump_cw_stack(EINA_TRUE, comp_log_info.logger_dump_file); + + ecore_x_client_message32_send (ecore_x_window_root_first_get(), + ATOM_CM_LOG_DUMP_DONE, + ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, + 0, 0, 0, 0, 0); + } + if(prop_data) free(prop_data); + return EINA_TRUE; + } + return EINA_FALSE; +} +#endif /* COMP_LOGGER_BUILD_ENABLE */ + +static Eina_Bool +_e_mod_comp_prop_opacity(Ecore_X_Event_Window_Property *ev) +{ + E_Comp_Win *cw = NULL; + unsigned int val = 0; + int ret = -1; + + cw = _e_mod_comp_win_find(ev->win); + if (!cw) + { + cw = _e_mod_comp_border_client_find(ev->win); + if (!cw) return EINA_FALSE; + } + + ret = ecore_x_window_prop_card32_get(cw->win, + ECORE_X_ATOM_NET_WM_WINDOW_OPACITY, + &val, 1); + if (ret == -1) return EINA_FALSE; + + cw->use_opacity = EINA_TRUE; + cw->opacity = (val >> 24); + evas_object_color_set(cw->shobj, + cw->opacity, + cw->opacity, + cw->opacity, + cw->opacity); + return EINA_TRUE; + +} + +static Eina_Bool +_e_mod_comp_prop_sync_counter(Ecore_X_Event_Window_Property *ev) +{ + E_Comp_Win *cw = NULL; + cw = _e_mod_comp_win_find(ev->win); + if (!cw) cw = _e_mod_comp_border_client_find(ev->win); + + Ecore_X_Sync_Counter counter = ecore_x_e_comp_sync_counter_get(ev->win); + if (cw) + { + if (cw->counter != counter) + { + Ecore_X_Window _w = _e_mod_comp_win_get_client_xid(cw); + if (cw->counter) + { + ecore_x_e_comp_sync_cancel_send(_w); + ecore_x_sync_counter_inc(cw->counter, 1); + } + cw->counter = counter; + if (cw->counter) + { + ecore_x_sync_counter_inc(cw->counter, 1); + ecore_x_e_comp_sync_begin_send(_w); + } + } + } + else + { + if (counter) ecore_x_sync_counter_inc(counter, 1); + } + return EINA_TRUE; +} + +static Eina_Bool +_e_mod_comp_property(void *data __UNUSED__, + int type __UNUSED__, + void *event __UNUSED__) +{ + Ecore_X_Event_Window_Property *ev = event; + Ecore_X_Atom a = 0; + if (!ev) return ECORE_CALLBACK_PASS_ON; + if (!ev->atom) return ECORE_CALLBACK_PASS_ON; + if (!_e_mod_comp_get_atom_name(ev->atom)) return ECORE_CALLBACK_PASS_ON; + a = ev->atom; + + L(LT_EVENT_X, + "[COMP] ev:%15.15s w:0x%08x atom:%s\n", + "X_PROPERTY", ev->win, + _e_mod_comp_get_atom_name(a)); + + if (a == ECORE_X_ATOM_E_COMP_SYNC_COUNTER ) _e_mod_comp_prop_sync_counter(ev); + else if (a == ATOM_EFFECT_ENABLE ) _e_mod_comp_prop_effect_state(ev); + else if (a == ATOM_WINDOW_EFFECT_ENABLE ) _e_mod_comp_prop_window_effect_state(ev); + else if (a == ATOM_WINDOW_EFFECT_TYPE ) _e_mod_comp_prop_effect_style(ev); + else if (a == ECORE_X_ATOM_NET_WM_WINDOW_OPACITY ) _e_mod_comp_prop_opacity(ev); + else if (a == ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE) _e_mod_comp_prop_window_rotation(ev); +#if COMP_LOGGER_BUILD_ENABLE + else if (a == ATOM_CM_LOG ) _e_mod_comp_prop_log(ev); +#endif /* COMP_LOGGER_BUILD_ENABLE */ + + return ECORE_CALLBACK_PASS_ON; +} + +static Eina_Bool +_e_mod_comp_msg_sync_draw_done(Ecore_X_Event_Client_Message *ev) +{ + E_Comp_Win *cw = NULL; + int v = 0, w = 0, h = 0; + cw = _e_mod_comp_border_client_find(ev->data.l[0]); + v = ev->data.l[1]; + w = ev->data.l[2]; + h = ev->data.l[3]; + if (cw) + { + if (!cw->bd) return EINA_FALSE; + if ((Ecore_X_Window)(ev->data.l[0]) != cw->bd->client.win) return EINA_FALSE; + } + else + { + cw = _e_mod_comp_win_find(ev->data.l[0]); + if (!cw || (ev->data.l[0] != (int)cw->win)) + { + Ecore_X_Sync_Counter counter = ecore_x_e_comp_sync_counter_get(ev->win); + ecore_x_e_comp_sync_cancel_send(ev->win); + if (counter) ecore_x_sync_counter_inc(counter, 1); + L(LT_EVENT_X, + "[COMP] ev:%15.15s w:0x%08x type:%s !cw v%d %03dx%03d\n", + "X_CLIENT_MSG", ev->win, "SYNC_DRAW_DONE", v, w, h); + return EINA_FALSE; + } + } + if (!cw->counter) + { + cw->counter = ecore_x_e_comp_sync_counter_get(_e_mod_comp_win_get_client_xid(cw)); + if (cw->counter) + { + ecore_x_sync_counter_inc(cw->counter, 1); + ecore_x_e_comp_sync_begin_send(_e_mod_comp_win_get_client_xid(cw)); + } + L(LT_EVENT_X, + "[COMP] ev:%15.15s w:0x%08x type:%s !cw->counter v%d %03dx%03d\n", + "X_CLIENT_MSG", _e_mod_comp_win_get_client_xid(cw), + "SYNC_DRAW_DONE", v, w, h); + return EINA_FALSE; + } + + if (!cw->update) + { + if (cw->update_timeout) + { + ecore_timer_del(cw->update_timeout); + cw->update_timeout = NULL; + } + cw->update = 1; + cw->c->updates = eina_list_append(cw->c->updates, cw); + } + cw->drawme = 1; + + L(LT_EVENT_X, + "[COMP] ev:%15.15s w:0x%08x type:%s v%d %03dx%03d\n", + "X_CLIENT_MSG", _e_mod_comp_win_get_client_xid(cw), + "SYNC_DRAW_DONE", v, w, h); + + _e_mod_comp_win_render_queue(cw); + return EINA_TRUE; +} + +Eina_Bool +_e_mod_comp_hib_leave(void) +{ + E_Comp *c = _e_mod_comp_get(); + Config *cfg = NULL; + + if (!c || !_comp_mod) + { + fprintf(stderr, + "[E17-comp] _e_mod_comp_hib_leave failed.\n"); + return ECORE_CALLBACK_PASS_ON; + } + + cfg = e_config_domain_load("module.comp-slp", + _comp_mod->conf_edd); + if (!cfg) + return ECORE_CALLBACK_PASS_ON; + + if (cfg->default_window_effect != c->animatable) + { + if (cfg->default_window_effect) + { + c->animatable = EINA_TRUE; + _comp_mod->conf->default_window_effect = 1; + } + else + { + c->animatable = EINA_FALSE; + _comp_mod->conf->default_window_effect = 0; + } + ecore_x_window_prop_card32_set + (c->man->root, ATOM_EFFECT_ENABLE, + (unsigned int *)(&(_comp_mod->conf->default_window_effect)), 1); + } + + if (cfg->shadow_file) + eina_stringshare_del(cfg->shadow_file); + if (cfg->shadow_style) + eina_stringshare_del(cfg->shadow_style); + + free(cfg); + return ECORE_CALLBACK_PASS_ON; +} + +static Eina_Bool +_e_mod_comp_message(void *data __UNUSED__, + int type __UNUSED__, + void *event) +{ + Ecore_X_Event_Client_Message *ev = event; + + if (ev->format != 32) + return ECORE_CALLBACK_PASS_ON; + + if (ev->message_type == ECORE_X_ATOM_E_COMP_SYNC_DRAW_DONE) + { + _e_mod_comp_msg_sync_draw_done(ev); + return ECORE_CALLBACK_PASS_ON; + } + + if (_e_mod_comp_rotation_handle_message(ev)) + { + return ECORE_CALLBACK_PASS_ON; + } + + if (_comp_mod->conf->use_lock_screen) + { + if (ev->message_type == ATOM_CM_LOCK_SCREEN) + { + E_Comp *c = _e_mod_comp_find(ev->win); + if (!c) + return ECORE_CALLBACK_PASS_ON; + if (ev->data.l[0] == 1) + _e_mod_comp_screen_lock(c); + else if (ev->data.l[0] == 0) + _e_mod_comp_screen_unlock(c); + return ECORE_CALLBACK_PASS_ON; + } + } + + if ((ev->message_type == ATOM_FAKE_LAUNCH) + && (ev->data.l[0] == 1)) + { + return _e_mod_comp_fake_show(ev); + } + + if ((ev->message_type == ATOM_FAKE_LAUNCH) + && (ev->data.l[0] == 0)) + { + return _e_mod_comp_fake_hide(ev); + } + + if ((ev->message_type == ATOM_X_HIBERNATION_STATE) + && (ev->data.l[0] == 0)) + { + return _e_mod_comp_hib_leave(); + } + + if (ev->message_type == ATOM_CAPTURE_EFFECT) + { + return _e_mod_comp_capture_effect(ev); + } + + return ECORE_CALLBACK_PASS_ON; +} + +static Eina_Bool +_e_mod_comp_shape(void *data __UNUSED__, + int type __UNUSED__, + void *event) +{ + Ecore_X_Event_Window_Shape *ev = event; + E_Comp_Win *cw = _e_mod_comp_win_find(ev->win); + if (!cw) return ECORE_CALLBACK_PASS_ON; + if (ev->type != ECORE_X_SHAPE_BOUNDING) return ECORE_CALLBACK_PASS_ON; + L(LT_EVENT_X, + "[COMP] ev:%15.15s w:0x%08x bd:%d c:0x%08x cw:%p\n", + "X_SHAPE", ev->win, _e_mod_comp_win_is_border(cw), _e_mod_comp_win_get_client_xid(cw), cw); + _e_mod_comp_win_reshape(cw); + return ECORE_CALLBACK_PASS_ON; +} + +static Eina_Bool +_e_mod_comp_damage(void *data __UNUSED__, + int type __UNUSED__, + void *event) +{ + Ecore_X_Event_Damage *ev = event; + E_Comp_Win *cw = _e_mod_comp_win_damage_find(ev->damage); + + L(LT_EVENT_X, + "[COMP] ev:%15.15s w:0x%08x bd:%d c:0x%08x cw:%p %4d %4d %3dx%3d\n", + "X_DAMAGE", ev->drawable, _e_mod_comp_win_is_border(cw), + _e_mod_comp_win_get_client_xid(cw), cw, + ev->area.x, ev->area.y, ev->area.width, ev->area.height); + + if (!cw) + { + L(LT_EVENT_X, + "[COMP] ev:%15.15s w:0x%08x bd:%d c:0x%08x cw:%p %4d %4d %3dx%3d ERR1\n", + "X_DAMAGE", ev->drawable, _e_mod_comp_win_is_border(cw), + _e_mod_comp_win_get_client_xid(cw), cw, + ev->area.x, ev->area.y, ev->area.width, ev->area.height); + + cw = _e_mod_comp_border_client_find(ev->drawable); + + if (!cw) + { + L(LT_EVENT_X,"[COMP] ev:%15.15s w:0x%08x bd:%d c:0x%08x cw:%p %4d %4d %3dx%3d ERR2\n", + "X_DAMAGE", ev->drawable, _e_mod_comp_win_is_border(cw), + _e_mod_comp_win_get_client_xid(cw), cw, + ev->area.x, ev->area.y, ev->area.width, ev->area.height); + return ECORE_CALLBACK_PASS_ON; + } + } + + _e_mod_comp_win_damage(cw, + ev->area.x, ev->area.y, + ev->area.width, ev->area.height, 1); + return ECORE_CALLBACK_PASS_ON; +} + +static Eina_Bool +_e_mod_comp_damage_win(void *data __UNUSED__, + int type __UNUSED__, + void *event) +{ + Ecore_X_Event_Window_Damage *ev = event; + Eina_List *l; + E_Comp *c; + + // fixme: use hash if compositors list > 4 + EINA_LIST_FOREACH(compositors, l, c) + { + if (!c) continue; + if (ev->win == c->ee_win) + { + // expose on comp win - init win or some other bypass win did it + _e_mod_comp_render_queue(c); + break; + } + } + return ECORE_CALLBACK_PASS_ON; +} + +static Eina_Bool +_e_mod_comp_randr(void *data __UNUSED__, + int type __UNUSED__, + __UNUSED__ void *event) +{ + Eina_List *l; + E_Comp *c; + + L(LT_EVENT_X, + "[COMP] ev:%15.15s\n", + "E_CONTNR_RESIZE"); + + EINA_LIST_FOREACH(compositors, l, c) + { + if (!c) continue; + ecore_evas_resize(c->ee, + c->man->w, + c->man->h); + } + return ECORE_CALLBACK_PASS_ON; +} + +static Eina_Bool +_e_mod_comp_bd_add(void *data __UNUSED__, + int type __UNUSED__, + void *event) +{ + E_Event_Border_Add *ev = event; + E_Comp_Win *cw; + E_Comp* c = _e_mod_comp_find(ev->border->zone->container->manager->root); + L(LT_EVENT_X, + "[COMP] ev:%15.15s w:0x%08x\n", + "BD_ADD", ev->border->win); + if (!c) return ECORE_CALLBACK_PASS_ON; + if (_e_mod_comp_win_find(ev->border->win)) return ECORE_CALLBACK_PASS_ON; + if (c->win == ev->border->win) return ECORE_CALLBACK_PASS_ON; + if (c->ee_win == ev->border->win) return ECORE_CALLBACK_PASS_ON; + cw = _e_mod_comp_win_add(c, ev->border->win); + if (cw) + _e_mod_comp_win_configure(cw, + ev->border->x, + ev->border->y, + ev->border->w, + ev->border->h, + ev->border->client.initial_attributes.border); + + if ( ev->border->internal && ev->border->visible ) + _e_mod_comp_win_show(cw); + + return ECORE_CALLBACK_PASS_ON; +} + +static Eina_Bool +_e_mod_comp_bd_del(void *data __UNUSED__, + int type __UNUSED__, + void *event) +{ + E_Event_Border_Remove *ev = event; + E_Comp_Win *cw = _e_mod_comp_win_find(ev->border->win); + L(LT_EVENT_X, + "[COMP] ev:%15.15s w:0x%08x\n", + "BD_DEL", ev->border->win); + if (!cw) return ECORE_CALLBACK_PASS_ON; + if (cw->bd == ev->border) _e_mod_comp_object_del(cw, ev->border); + if (cw->animating) cw->delete_me = 1; + else _e_mod_comp_win_del(cw); + return ECORE_CALLBACK_PASS_ON; +} + +static Eina_Bool +_e_mod_comp_bd_show(void *data __UNUSED__, + int type __UNUSED__, + void *event) +{ + E_Event_Border_Show *ev = event; + E_Comp_Win *cw = _e_mod_comp_win_find(ev->border->win); + L(LT_EVENT_X, + "[COMP] ev:%15.15s w:0x%08x\n", + "BD_SHOW", ev->border->win); + if (!cw) return ECORE_CALLBACK_PASS_ON; + if (cw->visible) return ECORE_CALLBACK_PASS_ON; + _e_mod_comp_win_show(cw); + return ECORE_CALLBACK_PASS_ON; +} + +static Eina_Bool +_e_mod_comp_bd_hide(void *data __UNUSED__, + int type __UNUSED__, + void *event) +{ + E_Event_Border_Hide *ev = event; + E_Comp_Win *cw = _e_mod_comp_win_find(ev->border->win); + L(LT_EVENT_X, + "[COMP] ev:%15.15s w:0x%08x\n", + "BD_HIDE", ev->border->win); + if (!cw) return ECORE_CALLBACK_PASS_ON; + if (!cw->visible) return ECORE_CALLBACK_PASS_ON; + _e_mod_comp_win_hide(cw); + return ECORE_CALLBACK_PASS_ON; +} + +static Eina_Bool +_e_mod_comp_bd_move(void *data __UNUSED__, + int type __UNUSED__, + void *event) +{ + E_Event_Border_Move *ev = event; + E_Comp_Win *cw = _e_mod_comp_win_find(ev->border->win); + if (!cw) return ECORE_CALLBACK_PASS_ON; + + L(LT_EVENT_X, + "[COMP] ev:%15.15s w:0x%08x cw->x: %d, cw->y: %d, cw->visible: %d, \ + cw->hidden.x: %d, cw->hidden.y: %d, ev->x: %d, ev->y: %d\n", + "BD_MOVE", ev->border->win, cw->x, cw->y, cw->visible, + cw->hidden.x, cw->hidden.y, ev->border->x, ev->border->y); + + if (!((cw->x == ev->border->x) && (cw->y == ev->border->y)) + && cw->visible) + { + _e_mod_comp_win_configure(cw, + ev->border->x, + ev->border->y, + ev->border->w, + ev->border->h, + 0); + } + else if (!((cw->hidden.x == ev->border->x) && (cw->hidden.y == ev->border->y)) + && !cw->visible) + { + _e_mod_comp_win_configure(cw, + ev->border->x, + ev->border->y, + ev->border->w, + ev->border->h, + 0); + } + return ECORE_CALLBACK_PASS_ON; +} + +static Eina_Bool +_e_mod_comp_bd_resize(void *data __UNUSED__, + int type __UNUSED__, + void *event) +{ + E_Event_Border_Resize *ev = event; + E_Comp_Win *cw = _e_mod_comp_win_find(ev->border->win); + L(LT_EVENT_X, + "[COMP] ev:%15.15s w:0x%08x\n", + "BD_RESIZE", ev->border->win); + if (!cw) return ECORE_CALLBACK_PASS_ON; + if ((cw->w == ev->border->w) && (cw->h == ev->border->h)) + return ECORE_CALLBACK_PASS_ON; + _e_mod_comp_win_configure(cw, + cw->x, cw->y, + ev->border->w, ev->border->h, + cw->border); + return ECORE_CALLBACK_PASS_ON; +} + +static Eina_Bool +_e_mod_comp_bd_iconify(void *data __UNUSED__, + int type __UNUSED__, + void *event) +{ + E_Event_Border_Iconify *ev = event; + E_Comp_Win *cw = _e_mod_comp_win_find(ev->border->win); + L(LT_EVENT_BD, + "[COMP] ev:%15.15s w:0x%08x\n", + "BD_ICONIFY", ev->border->win); + if (!cw) return ECORE_CALLBACK_PASS_ON; + // fimxe: special iconfiy anim + return ECORE_CALLBACK_PASS_ON; +} + +static Eina_Bool +_e_mod_comp_bd_uniconify(void *data __UNUSED__, + int type __UNUSED__, + void *event) +{ + E_Event_Border_Uniconify *ev = event; + E_Comp_Win *cw = _e_mod_comp_win_find(ev->border->win); + L(LT_EVENT_BD, + "[COMP] ev:%15.15s w:0x%08x\n", + "BD_UNICONIFY", ev->border->win); + if (!cw) return ECORE_CALLBACK_PASS_ON; + // fimxe: special uniconfiy anim + return ECORE_CALLBACK_PASS_ON; +} + +static Eina_Bool +_e_mod_comp_bd_urgent_change(void *data __UNUSED__, + int type __UNUSED__, + void *event) +{ + E_Event_Border_Urgent_Change *ev = event; + E_Comp_Win *cw = _e_mod_comp_win_find(ev->border->win); + L(LT_EVENT_BD, + "[COMP] ev:%15.15s w:0x%08x\n", + "BD_URGENTCHANGE", ev->border->win); + if (!cw) return ECORE_CALLBACK_PASS_ON; + if (cw->bd->client.icccm.urgent) + edje_object_signal_emit(cw->shobj, "e,state,urgent,on", "e"); + else + edje_object_signal_emit(cw->shobj, "e,state,urgent,off", "e"); + return ECORE_CALLBACK_PASS_ON; +} + +static Eina_Bool +_e_mod_comp_bd_focus_in(void *data __UNUSED__, + int type __UNUSED__, + void *event) +{ + E_Event_Border_Focus_In *ev = event; + E_Comp_Win *cw = _e_mod_comp_win_find(ev->border->win); + L(LT_EVENT_BD, + "[COMP] ev:%15.15s w:0x%08x\n", + "BD_FOCUS_IN", ev->border->win); + if (!cw) return ECORE_CALLBACK_PASS_ON; + edje_object_signal_emit(cw->shobj, "e,state,focus,on", "e"); + return ECORE_CALLBACK_PASS_ON; +} + +static Eina_Bool +_e_mod_comp_bd_focus_out(void *data __UNUSED__, + int type __UNUSED__, + void *event) +{ + E_Event_Border_Focus_Out *ev = event; + E_Comp_Win *cw = _e_mod_comp_win_find(ev->border->win); + L(LT_EVENT_BD, + "[COMP] ev:%15.15s w:0x%08x\n", + "BD_FOCUS_OUT", ev->border->win); + if (!cw) return ECORE_CALLBACK_PASS_ON; + edje_object_signal_emit(cw->shobj, "e,state,focus,off", "e"); + return ECORE_CALLBACK_PASS_ON; +} + +static Eina_Bool +_e_mod_comp_bd_property(void *data __UNUSED__, + int type __UNUSED__, + void *event) +{ + E_Event_Border_Property *ev = event; + E_Comp_Win *cw = _e_mod_comp_win_find(ev->border->win); + L(LT_EVENT_BD, + "[COMP] ev:%15.15s w:0x%08x\n", + "BD_PROPERTY", ev->border->win); + if (!cw) return ECORE_CALLBACK_PASS_ON; + // fimxe: other properties? + return ECORE_CALLBACK_PASS_ON; +} + +static Eina_Bool +_e_mod_comp_key_down(void *data __UNUSED__, + int type __UNUSED__, + void *event) +{ + Ecore_Event_Key *ev = event; + + if ((!strcmp(ev->keyname, "Home")) && + (ev->modifiers & ECORE_EVENT_MODIFIER_SHIFT) && + (ev->modifiers & ECORE_EVENT_MODIFIER_CTRL) && + (ev->modifiers & ECORE_EVENT_MODIFIER_ALT)) + { + if (_comp_mod) + { + _e_mod_config_free(_comp_mod->module); + _e_mod_config_new(_comp_mod->module); + e_config_save(); + e_module_disable(_comp_mod->module); + e_config_save(); + e_sys_action_do(E_SYS_RESTART, NULL); + } + } + return ECORE_CALLBACK_PASS_ON; +} + +static Evas * +_e_mod_comp_evas_get_func(void *data, + E_Manager *man __UNUSED__) +{ + E_Comp *c = data; + return c->evas; +} + +static void +_e_mod_comp_update_func(void *data, + E_Manager *man __UNUSED__) +{ + E_Comp *c = data; + _e_mod_comp_render_queue(c); +} + +static const Eina_List * +_e_mod_comp_src_list_get_func(void *data, + E_Manager *man __UNUSED__) +{ + E_Comp *c = data; + E_Comp_Win *cw; + + if (!c->wins) return NULL; + if (c->wins_invalid) + { + c->wins_invalid = 0; + if (c->wins_list) eina_list_free(c->wins_list); + c->wins_list = NULL; + EINA_INLIST_FOREACH(c->wins, cw) + { + if ((cw->shobj) && (cw->obj)) + c->wins_list = eina_list_append(c->wins_list, cw); + } + } + return c->wins_list; +} + +static Evas_Object * +_e_mod_comp_src_image_get_func(void *data __UNUSED__, + E_Manager *man __UNUSED__, + E_Manager_Comp_Source *src) +{ + E_Comp_Win *cw = (E_Comp_Win *)src; + if (!cw->c) return NULL; + return cw->obj; +} + +static Evas_Object * +_e_mod_comp_src_shadow_get_func(void *data __UNUSED__, + E_Manager *man __UNUSED__, + E_Manager_Comp_Source *src) +{ + E_Comp_Win *cw = (E_Comp_Win *)src; + if (!cw->c) return NULL; + return cw->shobj; +} + +static Evas_Object * +_e_mod_comp_src_image_mirror_add_func(void *data __UNUSED__, + E_Manager *man __UNUSED__, + E_Manager_Comp_Source *src) +{ + E_Comp_Win *cw = (E_Comp_Win *)src; + if (!cw->c) return NULL; + return _e_mod_comp_win_mirror_add(cw); +} + +static Eina_Bool +_e_mod_comp_src_visible_get_func(void *data __UNUSED__, + E_Manager *man __UNUSED__, + E_Manager_Comp_Source *src) +{ + E_Comp_Win *cw = (E_Comp_Win *)src; + if (!cw->c) return 0; + return cw->visible; +} + +static void +_e_mod_comp_src_hidden_set_func(void *data __UNUSED__, + E_Manager *man __UNUSED__, + E_Manager_Comp_Source *src, + Eina_Bool hidden) +{ + E_Comp_Win *cw = (E_Comp_Win *)src; + if (!cw->c) return; + if (cw->hidden_override == hidden) return; + cw->hidden_override = hidden; + if (cw->bd) + e_border_comp_hidden_set(cw->bd, + cw->hidden_override); + if (cw->visible) + { + if (cw->hidden_override) + evas_object_hide(cw->shobj); + else + evas_object_show(cw->shobj); + } + else + { + if (cw->hidden_override) + evas_object_hide(cw->shobj); + } +} + +static Eina_Bool +_e_mod_comp_src_hidden_get_func(void *data __UNUSED__, + E_Manager *man __UNUSED__, + E_Manager_Comp_Source *src) +{ + E_Comp_Win *cw = (E_Comp_Win *)src; + if (!cw->c) return 0; + return cw->hidden_override; +} + +static void +_e_mod_comp_screen_lock_func(void *data, + E_Manager *man __UNUSED__) +{ + E_Comp *c = data; + _e_mod_comp_screen_lock(c); +} + +static void +_e_mod_comp_screen_unlock_func(void *data, + E_Manager *man __UNUSED__) +{ + E_Comp *c = data; + _e_mod_comp_screen_unlock(c); +} + +static int +_e_mod_comp_get_screen_angle(Ecore_X_Window root) +{ + int ret = -1, ang = 0; + unsigned int val = 0; + Ecore_X_Display* dpy = ecore_x_display_get(); + if (!dpy) return 0; + if (!ATOM_X_SCREEN_ROTATION) return 0; + + ret = ecore_x_window_prop_card32_get(root, ATOM_X_SCREEN_ROTATION, &val, 1); + if (ret == -1) return 0; + + switch (val) + { + case 1: ang = 0; break; + case 2: ang = 90; break; + case 4: ang = 180; break; + case 8: ang = 270; break; + default: ang = 0; break; + } + + return ang; +} + +static E_Comp * +_e_mod_comp_add(E_Manager *man) +{ + E_Comp *c; + Ecore_X_Window *wins; + Ecore_X_Window_Attributes att; + int i, num; + int ok = 0; + + c = calloc(1, sizeof(E_Comp)); + if (!c) return NULL; + + if (_comp_mod->conf->vsync) + { + e_util_env_set("__GL_SYNC_TO_VBLANK", "1"); + } + else + { + e_util_env_set("__GL_SYNC_TO_VBLANK", NULL); + } + + ecore_x_e_comp_sync_supported_set(man->root, _comp_mod->conf->efl_sync); + + c->man = man; + c->win = ecore_x_composite_render_window_enable(man->root); + if (!c->win) + { + e_util_dialog_internal + (_("Compositor Error"), + _("Your screen does not support the compositor
" + "overlay window. This is needed for it to
" + "function.")); + free(c); + return NULL; + } + + memset((&att), 0, sizeof(Ecore_X_Window_Attributes)); + ecore_x_window_attributes_get(c->win, &att); + + if ((att.depth != 24) && (att.depth != 32)) + { + e_util_dialog_internal + (_("Compositor Error"), + _("Your screen is not in 24/32bit display mode.
" + "This is required to be your default depth
" + "setting for the compositor to work properly.")); + ecore_x_composite_render_window_disable(c->win); + free(c); + return NULL; + } + + if (c->man->num == 0) e_alert_composite_win = c->win; + + if (_comp_mod->conf->engine == E_EVAS_ENGINE_GL_X11) + { + int opt[20]; + int opt_i = 0; + + c->screen_w = man->w; + c->screen_h = man->h; + c->screen_ang = _e_mod_comp_get_screen_angle(c->man->root); + + if (0 != c->screen_ang) + { + c->screen_rotation = EINA_TRUE; + if (0 != (c->screen_ang % 180)) + { + c->screen_w = man->h; + c->screen_h = man->w; + } + } + + if (_comp_mod->conf->indirect) + { + opt[opt_i] = ECORE_EVAS_GL_X11_OPT_INDIRECT; + opt_i++; + opt[opt_i] = 1; + opt_i++; + } + if (_comp_mod->conf->vsync) + { + opt[opt_i] = ECORE_EVAS_GL_X11_OPT_VSYNC; + opt_i++; + opt[opt_i] = 1; + opt_i++; + } + if (opt_i > 0) + { + opt[opt_i] = ECORE_EVAS_GL_X11_OPT_NONE; + c->ee = ecore_evas_gl_x11_options_new + (NULL, c->win, 0, 0, c->screen_w, c->screen_h, opt); + } + if (!c->ee) + c->ee = ecore_evas_gl_x11_new(NULL, c->win, 0, 0, c->screen_w, c->screen_h); + if (c->ee) + { + c->gl = 1; + ecore_evas_gl_x11_pre_post_swap_callback_set + (c->ee, c, _e_mod_comp_pre_swap, NULL); + } + } + if (!c->ee) + c->ee = ecore_evas_software_x11_new(NULL, c->win, 0, 0, man->w, man->h); + + ecore_evas_comp_sync_set(c->ee, 0); + ecore_evas_manual_render_set(c->ee, _comp_mod->conf->lock_fps); + c->evas = ecore_evas_get(c->ee); + ecore_evas_show(c->ee); + + if (c->screen_rotation) + ecore_evas_rotation_with_resize_set(c->ee, c->screen_ang); + + c->ee_win = ecore_evas_window_get(c->ee); + ecore_x_screen_is_composited_set(c->man->num, c->ee_win); + + ecore_x_e_comp_dri_buff_flip_supported_set + (c->man->root, _comp_mod->conf->dri_buff_flip); + + ecore_x_composite_redirect_subwindows + (c->man->root, ECORE_X_COMPOSITE_UPDATE_MANUAL); + + wins = ecore_x_window_children_get(c->man->root, &num); + if (wins) + { + for (i = 0; i < num; i++) + { + E_Comp_Win *cw; + int x, y, w, h, border; + char *wname = NULL, *wclass = NULL; + + ecore_x_icccm_name_class_get(wins[i], &wname, &wclass); + if ((man->initwin == wins[i]) || + ((wname) && (wclass) && (!strcmp(wname, "E")) && + (!strcmp(wclass, "Init_Window")))) + { + free(wname); + free(wclass); + ecore_x_window_reparent(wins[i], c->win, 0, 0); + ecore_x_sync(); + continue; + } + if (wname) free(wname); + if (wclass) free(wclass); + wname = wclass = NULL; + cw = _e_mod_comp_win_add(c, wins[i]); + if (!cw) continue; + ecore_x_window_geometry_get(cw->win, &x, &y, &w, &h); + border = ecore_x_window_border_width_get(cw->win); + if (wins[i] == c->win) continue; + _e_mod_comp_win_configure(cw, x, y, w, h, border); + if (ecore_x_window_visible_get(wins[i])) + _e_mod_comp_win_show(cw); + } + free(wins); + } + + ecore_x_window_key_grab(c->man->root, + "Home", + ECORE_EVENT_MODIFIER_SHIFT | + ECORE_EVENT_MODIFIER_CTRL | + ECORE_EVENT_MODIFIER_ALT, 0); + + + c->bg_img = evas_object_rectangle_add(c->evas); + evas_object_color_set(c->bg_img, 0, 0, 0, 255); + + evas_object_stack_below(c->bg_img, evas_object_bottom_get(c->evas)); + evas_object_show(c->bg_img); + evas_object_move(c->bg_img, 0, 0); + evas_object_resize(c->bg_img, c->man->w, c->man->h); // resize to root window's width, height + + c->fake_img_shobj = NULL; + c->fake_img_shobj = edje_object_add(c->evas); + ok = edje_object_file_set(c->fake_img_shobj, _comp_mod->conf->shadow_file, "fake_effect_twist"); + if (!ok) + { + fprintf(stdout, + "[E17-comp] FAKE IMG EDC Animation isn't loaded!\n"); + } + + edje_object_signal_callback_add(c->fake_img_shobj, + "fake,action,hide,done", + "fake", + _e_mod_comp_fake_hide_done, c); + + evas_object_move(c->fake_img_shobj, 0, 0); + evas_object_resize(c->fake_img_shobj, c->man->w, c->man->h); + c->fake_launch_state = EINA_FALSE; + + c->fake_launch_timeout = NULL; + c->fake_win = 0; + c->fake_launch_done = EINA_FALSE; + + edje_object_signal_callback_add(c->fake_img_shobj, + "fake,action,show,done", + "fake", + _e_mod_comp_fake_show_done, c); + + c->capture_effect_obj = NULL; + c->capture_effect_obj = edje_object_add(c->evas); + ok = edje_object_file_set(c->capture_effect_obj, _comp_mod->conf->shadow_file, "capture_effect"); + if (!ok) + { + fprintf(stdout, + "[E17-comp] CAPTURE EFFECT EDC Animation isn't loaded!\n"); + } + edje_object_signal_callback_add(c->capture_effect_obj, + "img,capture,show,done", + "img", + _e_mod_comp_capture_effect_show_done, c); + + evas_object_move(c->capture_effect_obj, 0, 0); + evas_object_resize(c->capture_effect_obj, c->man->w, c->man->h); + + c->switcher_animating = EINA_FALSE; + + c->comp.data = c; + c->comp.func.evas_get = _e_mod_comp_evas_get_func; + c->comp.func.update = _e_mod_comp_update_func; + c->comp.func.src_list_get = _e_mod_comp_src_list_get_func; + c->comp.func.src_image_get = _e_mod_comp_src_image_get_func; + c->comp.func.src_shadow_get = _e_mod_comp_src_shadow_get_func; + c->comp.func.src_image_mirror_add = _e_mod_comp_src_image_mirror_add_func; + c->comp.func.src_visible_get = _e_mod_comp_src_visible_get_func; + c->comp.func.src_hidden_set = _e_mod_comp_src_hidden_set_func; + c->comp.func.src_hidden_get = _e_mod_comp_src_hidden_get_func; + c->comp.func.screen_lock = _e_mod_comp_screen_lock_func; + c->comp.func.screen_unlock = _e_mod_comp_screen_unlock_func; + + e_manager_comp_set(c->man, &(c->comp)); + + return c; +} + +static void +_e_mod_comp_del(E_Comp *c) +{ + E_Comp_Win *cw; + + e_manager_comp_set(c->man, NULL); + + ecore_x_window_key_ungrab(c->man->root, + "Home", + ECORE_EVENT_MODIFIER_SHIFT | + ECORE_EVENT_MODIFIER_CTRL | + ECORE_EVENT_MODIFIER_ALT, 0); + if (c->grabbed) + { + c->grabbed = 0; + ecore_x_ungrab(); + } + if (c->fps_fg) + { + evas_object_del(c->fps_fg); + c->fps_fg = NULL; + } + if (c->fps_bg) + { + evas_object_del(c->fps_bg); + c->fps_bg = NULL; + } + ecore_x_screen_is_composited_set(c->man->num, 0); + while (c->wins) + { + cw = (E_Comp_Win *)(c->wins); + if (cw->counter) + { + ecore_x_sync_counter_free(cw->counter); + cw->counter = 0; + } + cw->force = 1; + _e_mod_comp_win_hide(cw); + cw->force = 1; + _e_mod_comp_win_del(cw); + } + ecore_evas_free(c->ee); + ecore_x_composite_unredirect_subwindows + (c->man->root, ECORE_X_COMPOSITE_UPDATE_MANUAL); + ecore_x_composite_render_window_disable(c->win); + if (c->man->num == 0) e_alert_composite_win = 0; + if (c->render_animator) ecore_animator_del(c->render_animator); + if (c->new_up_timer) ecore_timer_del(c->new_up_timer); + if (c->update_job) ecore_job_del(c->update_job); + if (c->wins_list) eina_list_free(c->wins_list); + + ecore_x_e_comp_dri_buff_flip_supported_set(c->man->root, 0); + + ecore_x_e_comp_sync_supported_set(c->man->root, 0); + free(c); +} + +Eina_Bool +e_mod_comp_init(void) +{ + Eina_List *l; + E_Manager *man; + E_Comp *comp = NULL; + unsigned int effect_enable = 0; + unsigned int window_effect_state = 0; + + windows = eina_hash_string_superfast_new(NULL); + borders = eina_hash_string_superfast_new(NULL); + damages = eina_hash_string_superfast_new(NULL); + + handlers = eina_list_append(handlers, ecore_event_handler_add(ECORE_X_EVENT_WINDOW_CREATE, _e_mod_comp_create, NULL)); + handlers = eina_list_append(handlers, ecore_event_handler_add(ECORE_X_EVENT_WINDOW_DESTROY, _e_mod_comp_destroy, NULL)); + handlers = eina_list_append(handlers, ecore_event_handler_add(ECORE_X_EVENT_WINDOW_SHOW, _e_mod_comp_show, NULL)); + handlers = eina_list_append(handlers, ecore_event_handler_add(ECORE_X_EVENT_WINDOW_HIDE, _e_mod_comp_hide, NULL)); + handlers = eina_list_append(handlers, ecore_event_handler_add(ECORE_X_EVENT_WINDOW_REPARENT, _e_mod_comp_reparent, NULL)); + handlers = eina_list_append(handlers, ecore_event_handler_add(ECORE_X_EVENT_WINDOW_CONFIGURE, _e_mod_comp_configure, NULL)); + handlers = eina_list_append(handlers, ecore_event_handler_add(ECORE_X_EVENT_WINDOW_STACK, _e_mod_comp_stack, NULL)); + handlers = eina_list_append(handlers, ecore_event_handler_add(ECORE_X_EVENT_WINDOW_PROPERTY, _e_mod_comp_property, NULL)); + handlers = eina_list_append(handlers, ecore_event_handler_add(ECORE_X_EVENT_CLIENT_MESSAGE, _e_mod_comp_message, NULL)); + handlers = eina_list_append(handlers, ecore_event_handler_add(ECORE_X_EVENT_WINDOW_SHAPE, _e_mod_comp_shape, NULL)); + handlers = eina_list_append(handlers, ecore_event_handler_add(ECORE_X_EVENT_DAMAGE_NOTIFY, _e_mod_comp_damage, NULL)); + handlers = eina_list_append(handlers, ecore_event_handler_add(ECORE_X_EVENT_WINDOW_DAMAGE, _e_mod_comp_damage_win, NULL)); + handlers = eina_list_append(handlers, ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, _e_mod_comp_key_down, NULL)); + handlers = eina_list_append(handlers, ecore_event_handler_add(E_EVENT_CONTAINER_RESIZE, _e_mod_comp_randr, NULL)); + handlers = eina_list_append(handlers, ecore_event_handler_add(E_EVENT_BORDER_ADD, _e_mod_comp_bd_add, NULL)); + handlers = eina_list_append(handlers, ecore_event_handler_add(E_EVENT_BORDER_REMOVE, _e_mod_comp_bd_del, NULL)); + handlers = eina_list_append(handlers, ecore_event_handler_add(E_EVENT_BORDER_SHOW, _e_mod_comp_bd_show, NULL)); + handlers = eina_list_append(handlers, ecore_event_handler_add(E_EVENT_BORDER_HIDE, _e_mod_comp_bd_hide, NULL)); + handlers = eina_list_append(handlers, ecore_event_handler_add(E_EVENT_BORDER_MOVE, _e_mod_comp_bd_move, NULL)); + handlers = eina_list_append(handlers, ecore_event_handler_add(E_EVENT_BORDER_RESIZE, _e_mod_comp_bd_resize, NULL)); + handlers = eina_list_append(handlers, ecore_event_handler_add(E_EVENT_BORDER_ICONIFY, _e_mod_comp_bd_iconify, NULL)); + handlers = eina_list_append(handlers, ecore_event_handler_add(E_EVENT_BORDER_UNICONIFY, _e_mod_comp_bd_uniconify, NULL)); + handlers = eina_list_append(handlers, ecore_event_handler_add(E_EVENT_BORDER_URGENT_CHANGE, _e_mod_comp_bd_urgent_change, NULL)); + handlers = eina_list_append(handlers, ecore_event_handler_add(E_EVENT_BORDER_FOCUS_IN, _e_mod_comp_bd_focus_in, NULL)); + handlers = eina_list_append(handlers, ecore_event_handler_add(E_EVENT_BORDER_FOCUS_OUT, _e_mod_comp_bd_focus_out, NULL)); + handlers = eina_list_append(handlers, ecore_event_handler_add(E_EVENT_BORDER_PROPERTY, _e_mod_comp_bd_property, NULL)); + + _e_mod_comp_atom_init(); + + EINA_LIST_FOREACH(e_manager_list(), l, man) + { + E_Comp *c; + c = _e_mod_comp_add(man); + if (c) compositors = eina_list_append(compositors, c); + if (c) _e_mod_comp_set(c); + } + + comp = _e_mod_comp_get(); + if (comp) + { + if (_comp_mod->conf->default_window_effect) + effect_enable = 1; + else + effect_enable = 0; + + ecore_x_window_prop_card32_set(comp->man->root, + ATOM_EFFECT_ENABLE, + &effect_enable, 1); + ecore_x_window_prop_card32_set(comp->man->root, + ATOM_WINDOW_EFFECT_STATE, + &window_effect_state, 1); + ecore_x_window_prop_property_set(comp->man->root, + ATOM_OVERAY_WINDOW, + ECORE_X_ATOM_WINDOW, + 32, &comp->win, 1); + } + + ecore_animator_frametime_set(1.0f/60.0f); + ecore_x_sync(); + return 1; +} + +void +e_mod_comp_shutdown(void) +{ + E_Comp *c; + + EINA_LIST_FREE(compositors, c) _e_mod_comp_del(c); + + E_FREE_LIST(handlers, ecore_event_handler_del); + + eina_hash_free(damages); + eina_hash_free(windows); + eina_hash_free(borders); + + _e_mod_comp_set(NULL); +} + +void +e_mod_comp_shadow_set(void) +{ + Eina_List *l; + E_Comp *c; + + EINA_LIST_FOREACH(compositors, l, c) + { + E_Comp_Win *cw; + if (!c) continue; + ecore_evas_manual_render_set(c->ee, _comp_mod->conf->lock_fps); + EINA_INLIST_FOREACH(c->wins, cw) + { + if ((cw->shobj) && (cw->obj)) + { + _e_mod_comp_win_shadow_setup(cw); + if (cw->visible) + { + L(LT_EFFECT, + "[COMP] WIN_EFFECT : Show signal Emit (e_mod_comp_shadow_set()) -> win:0x%08x\n", + cw->win); + + if (cw->animatable) + edje_object_signal_emit(cw->shobj, + "e,state,visible,on", + "e"); + else + edje_object_signal_emit(cw->shobj, + "e,state,visible,on,noeffect", + "e"); + + _e_mod_comp_win_inc_animating(cw); + cw->pending_count++; + e_manager_comp_event_src_visibility_send + (cw->c->man, (E_Manager_Comp_Source *)cw, + _e_mod_comp_cb_pending_after, cw->c); + } + } + } + } +} + +E_Comp * +e_mod_comp_manager_get(E_Manager *man) +{ + return _e_mod_comp_find(man->root); +} + +E_Comp_Win * +e_mod_comp_win_find_by_window(E_Comp *c, + Ecore_X_Window win) +{ + E_Comp_Win *cw; + + EINA_INLIST_FOREACH(c->wins, cw) + { + if (cw->win == win) return cw; + } + return NULL; +} + +E_Comp_Win * +e_mod_comp_win_find_by_border(E_Comp *c, + E_Border *bd) +{ + E_Comp_Win *cw; + + EINA_INLIST_FOREACH(c->wins, cw) + { + if (cw->bd == bd) return cw; + } + return NULL; +} + +E_Comp_Win * +e_mod_comp_win_find_by_popup(E_Comp *c, + E_Popup *pop) +{ + E_Comp_Win *cw; + + EINA_INLIST_FOREACH(c->wins, cw) + { + if (cw->pop == pop) return cw; + } + return NULL; +} + +E_Comp_Win * +e_mod_comp_win_find_by_menu(E_Comp *c, + E_Menu *menu) +{ + E_Comp_Win *cw; + + EINA_INLIST_FOREACH(c->wins, cw) + { + if (cw->menu == menu) return cw; + } + return NULL; +} + +Evas_Object * +e_mod_comp_win_evas_object_get(E_Comp_Win *cw) +{ + if (!cw) return NULL; + return cw->obj; +} + +Evas_Object * +e_mod_comp_win_mirror_object_add(Evas *e __UNUSED__, + E_Comp_Win *cw __UNUSED__) +{ + return NULL; +} + +static void +_e_mod_comp_win_cb_setup(E_Comp_Win *cw) +{ + edje_object_signal_callback_add(cw->shobj, "e,action,show,done", "e", _e_mod_comp_show_done, cw); + edje_object_signal_callback_add(cw->shobj, "e,action,hide,done", "e", _e_mod_comp_hide_done, cw); + edje_object_signal_callback_add(cw->shobj, "e,action,background,show,done", "e", _e_mod_comp_background_show_done, cw); + edje_object_signal_callback_add(cw->shobj, "e,action,background,hide,done", "e", _e_mod_comp_background_hide_done, cw); + edje_object_signal_callback_add(cw->shobj, "e,action,window,rotation,done", "e", _e_mod_comp_win_rotation_done, cw); + edje_object_signal_callback_add(cw->shobj, "e,action,raise_above_hide,done","e", _e_mod_comp_raise_above_hide_done,cw); +} + +static void +_e_mod_comp_win_recreate_shobj(E_Comp_Win *cw) +{ + /* backup below obj */ + Eina_Bool bottom = EINA_FALSE; + + Evas_Object *below_obj = evas_object_below_get(cw->shobj); + if (!below_obj) + { + if (evas_object_bottom_get(cw->c->evas) == cw->shobj) + { + L(LT_EVENT_X, + "[COMP] %31s w:0x%08x bd:%s shobj is bottom.\n", + "PIX_ROT", _e_mod_comp_win_get_client_xid(cw), + cw->bd ? "O" : "X"); + bottom = EINA_TRUE; + } + } + + if (cw->obj) + { + evas_object_hide(cw->obj); + evas_object_del(cw->obj); + cw->obj = NULL; + } + if (cw->shobj) + { + evas_object_hide(cw->obj); + evas_object_del(cw->shobj); + cw->shobj = NULL; + } + + cw->shobj = edje_object_add(cw->c->evas); + cw->obj = evas_object_image_filled_add(cw->c->evas); + evas_object_image_colorspace_set(cw->obj, EVAS_COLORSPACE_ARGB8888); + + if (cw->argb) + evas_object_image_alpha_set(cw->obj, 1); + else + evas_object_image_alpha_set(cw->obj, 0); + + _e_mod_comp_win_shadow_setup(cw); + _e_mod_comp_win_cb_setup(cw); + + evas_object_show(cw->obj); + evas_object_pass_events_set(cw->obj, 1); + evas_object_pass_events_set(cw->shobj, 1); + + /* restore stack */ + if (bottom) + below_obj = evas_object_below_get(cw->shobj); + + evas_object_stack_above(cw->shobj, below_obj); + L(LT_EVENT_X, + "[COMP] %31s w:0x%08x bd:%s shobj restore stack.\n", + "PIX_ROT", _e_mod_comp_win_get_client_xid(cw), + cw->bd ? "O" : "X"); +} + +void +_e_mod_comp_enable_touch_event_block(E_Comp *c) +{ + if (!c) return; + if (!c->win) return; + + ecore_x_window_shape_input_rectangle_set(c->win, 0, 0, c->man->w, c->man->h ); +} + +void +_e_mod_comp_disable_touch_event_block(E_Comp *c) +{ + if (!c) return; + if (!c->win) return; + + ecore_x_window_shape_input_rectangle_set(c->win, -1, -1, 1, 1 ); +} + +void +_e_mod_comp_win_inc_animating(E_Comp_Win *cw) +{ + if (!cw->animating) + { + cw->c->animating++; + // send current effect status is starting. + _e_mod_comp_send_window_effect_client_state(cw, EINA_TRUE); + cw->animating = 1; + } + else + { + // if previous effect is not done case + cw->c->animating--; + cw->animating = 0; + // send previous effect status is done + _e_mod_comp_send_window_effect_client_state(cw, EINA_FALSE); + cw->c->animating++; + cw->animating = 1; + // send current effect status is starting. + _e_mod_comp_send_window_effect_client_state(cw, EINA_TRUE); + } + _e_mod_comp_win_render_queue(cw); +} + +void +_e_mod_comp_win_dec_animating(E_Comp_Win *cw) +{ + if (cw->animating) cw->c->animating--; + cw->animating = 0; + + _e_mod_comp_send_window_effect_client_state(cw, EINA_FALSE); + _e_mod_comp_win_render_queue(cw); +} diff --git a/comp-slp/src/e_mod_comp.h b/comp-slp/src/e_mod_comp.h new file mode 100644 index 0000000..94ffece --- /dev/null +++ b/comp-slp/src/e_mod_comp.h @@ -0,0 +1,12 @@ +#ifdef E_TYPEDEFS +#else +#ifndef E_MOD_COMP_H +#define E_MOD_COMP_H + +Eina_Bool e_mod_comp_init (void); +void e_mod_comp_shutdown (void); + +void e_mod_comp_shadow_set (void); + +#endif +#endif diff --git a/comp-slp/src/e_mod_comp_animation.c b/comp-slp/src/e_mod_comp_animation.c new file mode 100644 index 0000000..c2a71c3 --- /dev/null +++ b/comp-slp/src/e_mod_comp_animation.c @@ -0,0 +1,185 @@ +#include "e_mod_comp_animation.h" + +void on_animate_done(void *data) +{ + E_Comp_Win *cw = data; + + L(LT_EFFECT, + "[COMP] WIN_EFFECT : Animate done -> win:0x%08x\n", + cw->win); + if (cw->transfer != NULL) + { + L(LT_EFFECT, + "[COMP] w:0x%08x force win to delete transfer animators. bd:%s\n", + cw->win, cw->bd ? "O" : "X"); + evas_object_map_enable_set(cw->transfer->obj, EINA_FALSE); + evas_object_move(cw->transfer->obj, 0,0); + + if(cw->transfer->animator) ecore_animator_del(cw->transfer->animator); + cw->transfer->animator = NULL; + cw->c->transfer_list = eina_list_remove(cw->c->transfer_list, cw->transfer); + free(cw->transfer); + cw->transfer = NULL; + } + _e_mod_comp_done_defer(cw); +} + +Eina_Bool +on_animate_rotate_top(void *data) +{ + E_Comp_Transfer *transfer; + double elapsed_time; + + E_Comp_Win *cw = data; + if (!(transfer = cw->transfer)) return ECORE_CALLBACK_CANCEL; + elapsed_time = ecore_loop_time_get() - transfer->begin_time ; + if (elapsed_time > transfer->duration) elapsed_time = transfer->duration; + + float frame = elapsed_time / transfer->duration; + evas_object_move(transfer->obj, transfer->from + (transfer->len * frame) , 0); + + Evas_Coord x, y, w, h; + Evas_Map* map; + float half_w, half_h; + float degree; + + map = evas_map_new( 4 ); + if( map == NULL ) return ECORE_CALLBACK_CANCEL; + evas_map_smooth_set( map, EINA_TRUE ); + evas_map_util_points_populate_from_object_full( map, transfer->obj, 0 ); + evas_object_geometry_get( transfer->obj, &x, &y, &w, &h ); + half_w = (float) w * 0.5; + half_h = (float) h * 0.5; + degree = ROTATE_ANGLE_BEGIN + (ROTATE_ANGLE_TOP * frame); + evas_map_util_3d_rotate( map, 0, degree, 0, x + half_w, y + half_h, 0 ); + evas_map_util_3d_perspective( map, x + half_w, y + half_h, (-500) + 500 * frame, 1000 ); + evas_object_map_enable_set( transfer->obj, EINA_TRUE ); + evas_object_map_set( transfer->obj, map ); + evas_map_free( map ); + + if (elapsed_time == transfer->duration) + { + if(cw->animating == 1) + { + cw->animating = 0; + } + on_animate_done(cw); + return ECORE_CALLBACK_CANCEL; + } + return ECORE_CALLBACK_RENEW; +} + + +Eina_Bool +on_animate_rotate_left(void *data) +{ + E_Comp_Transfer *transfer; + double elapsed_time; + + E_Comp_Win *cw = data; + if (!(transfer = cw->transfer)) return ECORE_CALLBACK_CANCEL; + elapsed_time = ecore_loop_time_get() - transfer->begin_time ; + if (elapsed_time > transfer->duration) elapsed_time = transfer->duration; + + float frame = elapsed_time / transfer->duration; + evas_object_move(transfer->obj, transfer->from , 0); + + Evas_Coord x, y, w, h; + Evas_Map* map; + float half_w, half_h; + float degree; + + map = evas_map_new( 4 ); + if( map == NULL ) return ECORE_CALLBACK_CANCEL; + evas_map_smooth_set( map, EINA_TRUE ); + evas_map_util_points_populate_from_object_full( map, transfer->obj, 0 ); + evas_object_geometry_get( transfer->obj, &x, &y, &w, &h ); + half_w = (float) w * 0.5; + half_h = (float) h * 0.5; + degree = ROTATE_ANGLE_BEGIN + (ROTATE_ANGLE_LEFT * frame); + evas_map_util_3d_rotate( map, 0, degree, 0, x + half_w, y + half_h, 0 ); + evas_map_util_3d_perspective( map, x + half_w, y + half_h, -500, 1000 ); + evas_object_map_enable_set( transfer->obj, EINA_TRUE ); + evas_object_map_set( transfer->obj, map ); + evas_map_free( map ); + + if (elapsed_time == transfer->duration) + { + if(cw->animating == 1) + { + cw->animating = 0; + } + on_animate_done(cw); + return ECORE_CALLBACK_CANCEL; + } + return ECORE_CALLBACK_RENEW; +} + +Eina_Bool +on_animate_translate(void *data) +{ + E_Comp_Transfer *transfer; + double elapsed_time; + + E_Comp_Win *cw = data; + if (!(transfer = cw->transfer)) return ECORE_CALLBACK_CANCEL; + elapsed_time = ecore_loop_time_get() - transfer->begin_time ; + if (elapsed_time > transfer->duration) elapsed_time = transfer->duration; + + float frame = elapsed_time / transfer->duration; + float translate_x = transfer->from + (transfer->len * frame); + evas_object_move(transfer->obj, translate_x , 0); + + Evas_Coord x, y, w, h; + Evas_Map* map; + float half_w, half_h; + float degree; + + map = evas_map_new( 4 ); + if( map == NULL ) return ECORE_CALLBACK_CANCEL; + evas_map_smooth_set( map, EINA_TRUE ); + evas_map_util_points_populate_from_object_full( map, transfer->obj, 0 ); + evas_object_geometry_get( transfer->obj, &x, &y, &w, &h ); + half_w = (float) w * 0.5; + half_h = (float) h * 0.5; + degree = 70.0f; + evas_map_util_3d_rotate( map, 0, degree, 0, x + half_w, y + half_h, 0 ); + evas_map_util_3d_perspective( map, x + half_w, y + half_h, -500, 1000 ); + evas_object_map_enable_set( transfer->obj, EINA_TRUE ); + evas_object_map_set( transfer->obj, map ); + evas_map_free( map ); + + if (elapsed_time == transfer->duration) + { + + E_Comp_Transfer * rotate; + rotate = calloc(1, sizeof(E_Comp_Transfer)); + if (!rotate) return ECORE_CALLBACK_CANCEL; + rotate->obj = transfer->obj; + rotate->duration = SWITCHER_DURATION_ROTATE; + rotate->begin_time = ecore_loop_time_get(); + rotate->from = transfer->from + transfer->len; + if(transfer->selected == EINA_TRUE) + { + rotate->len = -(rotate->from); + rotate->animator = ecore_animator_add(on_animate_rotate_top, cw); + } + else + { + rotate->len = 0; + rotate->animator = ecore_animator_add(on_animate_rotate_left, cw); + } + if (transfer->animator) ecore_animator_del(transfer->animator); + transfer->animator = NULL; + E_Comp *c = _e_mod_comp_get(); + c->transfer_list = eina_list_remove(c->transfer_list, cw->transfer); + free(cw->transfer); + cw->transfer = NULL; + + cw->transfer = rotate; + c->transfer_list = eina_list_append(c->transfer_list, rotate); + + return ECORE_CALLBACK_CANCEL; + } + return ECORE_CALLBACK_RENEW; +} diff --git a/comp-slp/src/e_mod_comp_animation.h b/comp-slp/src/e_mod_comp_animation.h new file mode 100644 index 0000000..ab9ceae --- /dev/null +++ b/comp-slp/src/e_mod_comp_animation.h @@ -0,0 +1,37 @@ +#ifdef E_TYPEDEFS +#else +#ifndef E_MOD_COMP_ANIMATION_H +#define E_MOD_COMP_ANIMATION_H + +#include "e_mod_comp_data.h" + +#if COMP_LOGGER_BUILD_ENABLE +extern int comp_logger_type ; +extern Ecore_X_Atom ATOM_CM_LOG ; +#endif + +#define SWITCHER_DURATION_TOP 0.66 // sum of SWITCHER_DURATION_TRANSLATE and SWITCHER_DURATION_ROTATE +#define SWITCHER_DURATION_TRANSLATE 0.33 +#define SWITCHER_DURATION_ROTATE 0.33 +#define WINDOW_SPACE 100 +#define ROTATE_ANGLE_BEGIN 70 +#define ROTATE_ANGLE_TOP -70 +#define ROTATE_ANGLE_LEFT -30 + +struct _E_Comp_Transfer { + Evas_Object* obj; + float from, len; + double begin_time; + double duration; + Ecore_Animator *animator; + Eina_Bool selected; +}; + +void _e_mod_comp_done_defer (E_Comp_Win *cw); +E_Comp *_e_mod_comp_get (void); +Eina_Bool on_animate_rotate_top (void *data); +Eina_Bool on_animate_rotate_left (void *data); +Eina_Bool on_animate_translate (void *data); + +#endif +#endif diff --git a/comp-slp/src/e_mod_comp_data.h b/comp-slp/src/e_mod_comp_data.h new file mode 100644 index 0000000..284a41c --- /dev/null +++ b/comp-slp/src/e_mod_comp_data.h @@ -0,0 +1,247 @@ +#ifdef E_TYPEDEFS +#else +#ifndef E_MOD_COMP_DATA_H +#define E_MOD_COMP_DATA_H + +#include "e.h" +#include "e_mod_main.h" +#include "e_mod_comp.h" +#include "e_mod_comp_update.h" +#include "e_mod_comp_rotation.h" +//#include "e_mod_comp_animation.h" +#include "config.h" + +typedef struct _E_Comp_Transfer E_Comp_Transfer; +typedef enum _E_Comp_Effect_Type E_Comp_Effect_Type; +typedef enum _E_Comp_Win_Type E_Comp_Win_Type; +typedef struct _E_Comp E_Comp; +typedef struct _E_Comp_Win E_Comp_Win; + +enum _E_Comp_Effect_Type +{ + COMP_EFFECT_DEFAULT, + COMP_EFFECT_NONE, + COMP_EFFECT_CUSTOM0, + COMP_EFFECT_CUSTOM1, + COMP_EFFECT_CUSTOM2, + COMP_EFFECT_CUSTOM3, + COMP_EFFECT_CUSTOM4, + COMP_EFFECT_CUSTOM5, + COMP_EFFECT_CUSTOM6, + COMP_EFFECT_CUSTOM7, + COMP_EFFECT_CUSTOM8, + COMP_EFFECT_CUSTOM9 +}; +enum _E_Comp_Win_Type +{ + WIN_NORMAL, + WIN_QUICKPANEL, + WIN_TASK_MANAGER, + WIN_LIVE_MAGAZINE, + WIN_LOCK_SCREEN, + WIN_INDICATOR, + WIN_ISF_MAIN, + WIN_ISF_SUB, + WIN_TOOLTIP, + WIN_COMBO, + WIN_DND, + WIN_DESKTOP, + WIN_TOOLBAR, + WIN_MENU, + WIN_SPLASH, + WIN_DROP_DOWN_MENU, + WIN_NOTIFICATION, + WIN_UTILITY, + WIN_POPUP_MENU, + WIN_DIALOG +}; + +struct _E_Comp +{ + Ecore_X_Window win; + Ecore_Evas *ee; + Ecore_X_Window ee_win; + Evas *evas; + E_Manager *man; + Eina_Inlist *wins; + Eina_List *wins_list; + Eina_List *updates; + Ecore_Timer *lock_screen_timeout; // max time between block and unblock screen event + Ecore_Animator *render_animator; + Ecore_Job *update_job; + Ecore_Timer *new_up_timer; + int animating; + int render_overflow; + + E_Manager_Comp comp; + + Eina_Bool gl : 1; + Eina_Bool grabbed : 1; + Eina_Bool nocomp : 1; + Eina_Bool wins_invalid : 1; + Eina_Bool lock_screen : 1; + Eina_Bool screen_rotation : 1; + + int screen_w; + int screen_h; + int screen_ang; + + Evas_Object *bg_img; + char *fake_launch_name; + char *fake_launch_image; + Evas_Object *fake_img_obj; // fake image object + Evas_Object *fake_img_shobj; // fake image shadow object + Eina_Bool fake_launch_state: 1; + int fake_img_w; + int fake_img_h; + Ecore_Timer *fake_launch_timeout; // max time between show, hide fake launch + Eina_Bool fake_launch_done: 1; // fake launch edje object got effect done or not. + Ecore_X_Window fake_win; // this represent fake effect's real window id. + + Eina_Bool animatable : 1; // if this valuse is true then window can show animaton. otherwise, window can not show animation effect. + + Evas_Object *fps_bg; + Evas_Object *fps_fg; + double frametimes[122]; + int frameskip; + + Eina_Bool switcher : 1; // task switcher is open + Eina_Bool switcher_obscured : 1; //task switcher is obscured + Eina_Bool switcher_animating : 1; //task switcher is animating + int selected_pos; // selected window's position when task switcher is open + Eina_List *transfer_list; + Eina_Bool effect_stage : 1; + Eina_Bool use_bg_img : 1; + Evas_Object *capture_effect_obj; // capture effect's object +}; + +struct _E_Comp_Win +{ + EINA_INLIST; + + E_Comp *c; // parent compositor + Ecore_X_Window win; // raw window - for menus etc. + E_Border *bd; // if its a border - later + E_Popup *pop; // if its a popup - later + E_Menu *menu; // if it is a menu - later + int x, y, w, h; // geometry + struct { + int x, y, w, h; // hidden geometry (used when its unmapped and re-instated on map) + } hidden; + int pw, ph; // pixmap w/h + int border; // border width + Ecore_X_Pixmap pixmap; // the compositing pixmap + Ecore_X_Damage damage; // damage region + Ecore_X_Visual vis; // window visual + int depth; // window depth + Evas_Object *obj; // composite object + Evas_Object *shobj; // shadow object + Eina_List *obj_mirror; // extra mirror objects + Ecore_X_Image *xim; // x image - software fallback + E_Update *up; // update handler + E_Object_Delfn *dfn; // delete function handle for objects being tracked + Ecore_X_Sync_Counter counter; // sync counter for syncronised drawing + Ecore_Timer *update_timeout; // max time between damage and "done" event + int dmg_updates; // num of damage event updates since a redirect + Ecore_X_Rectangle *rects; // shape rects... if shaped :( + int rects_num; // num rects above + + E_Comp_Rotation *rotobj; // for pixmap rotation + Ecore_Timer *win_rot_timeout; // timer for window rotation + int req_ang; // request window rotation angle + int cur_ang; // current window rotation angle + Ecore_X_Pixmap cache_pixmap; // the cached pixmap (1/nth the dimensions) + int cache_w, cache_h; // cached pixmap size + int update_count; // how many updates have happend to this win + double last_visible_time; // last time window was visible + double last_draw_time; // last time window was damaged + + int pending_count; // pending event count + + unsigned int opacity; // opacity set with _NET_WM_WINDOW_OPACITY + Eina_Bool use_opacity; + + char *title, *name, *clas, *role; // fetched for override-redirect windowa + Ecore_X_Window_Type primary_type; // fetched for override-redirect windowa + + Eina_Bool delete_pending : 1; // delete pendig + Eina_Bool hidden_override : 1; // hidden override + + Eina_Bool animating : 1; // it's busy animating - defer hides/dels + Eina_Bool force : 1; // force del/hide even if animating + Eina_Bool defer_hide : 1; // flag to get hide to work on deferred hide + Eina_Bool delete_me : 1; // delete me! + + Eina_Bool visible : 1; // is visible + Eina_Bool input_only : 1; // is input_only + Eina_Bool override : 1; // is override-redirect + Eina_Bool argb : 1; // is argb + Eina_Bool shaped : 1; // is shaped + Eina_Bool update : 1; // has updates to fetch + Eina_Bool redirected : 1; // has updates to fetch + Eina_Bool shape_changed : 1; // shape changed + Eina_Bool native : 1; // native + Eina_Bool drawme : 1; // drawme flag fo syncing rendering + Eina_Bool invalid : 1; // invalid depth used - just use as marker + Eina_Bool nocomp : 1; // nocomp applied + Eina_Bool animate_hide : 1 ; // if window animation effect is occured, do hide unrelated window. -> use evas_object_hide() + Eina_Bool animatable : 1; // if this valuse is true then window can show animaton. otherwise, window can not show animation effect. + Eina_Bool rotating : 1 ; // for rotating + Eina_Bool resize_hide : 1; // if window do resize event received, set this valuse true; and check win_update() + Eina_Bool ready_win_rot_effect : 1; // for window rotation effect + Eina_Bool win_rot_effect : 1; // for window rotation effect + Eina_Bool needpix : 1; // need new pixmap + Eina_Bool needxim : 1; // need new xim + Eina_Bool real_hid : 1; // last hide was a real window unmap + Eina_Bool inhash : 1; // is in the windows hash + Eina_Bool first_show_worked : 1 ; // check for first show of shobj + Eina_Bool show_done : 1 ; // check for show is done + //Eina_Bool ready_hide_effect : 1; // check for hide effect is available + Eina_Bool effect_stage: 1; // check for if background window is hided or not. + + E_Comp_Effect_Type show_effect; // indicate show effect type + E_Comp_Effect_Type hide_effect; // indicate hide effect type + E_Comp_Effect_Type restack_effect; // indicate restack effect type + E_Comp_Effect_Type rotation_effect; // indicate rotation effect type + E_Comp_Effect_Type focusin_effect; // indicate focus in effect type + E_Comp_Effect_Type focusout_effect; // indicate focus out effect type + + Eina_Bool defer_raise; // flag to defer to raise + Eina_Bool defer_move_resize; // flag to defer to move_resize for shobj + E_Comp_Win_Type win_type; + E_Comp_Transfer *transfer; +}; + +#if 0 +#define DBG(f, x...) printf(f, ##x) +#else +#define DBG(f, x...) +#endif + + +#define COMP_LOGGER_BUILD_ENABLE 1 + +#if COMP_LOGGER_BUILD_ENABLE +# define LT_NOTHING 0x0000 +# define LT_EVENT_X 0x0001 +# define LT_EVENT_BD 0x0002 +# define LT_CREATE 0x0004 +# define LT_CONFIGURE 0x0008 +# define LT_DAMAGE 0x0010 +# define LT_DRAW 0x0020 +# define LT_SYNC 0x0040 +# define LT_EFFECT 0x0080 +# define LT_DUMP 0x0100 +# define LT_ALL 0xFFFF + +# include +# define L( type, fmt, args... ) { \ + if( comp_logger_type & type ) printf( fmt, ##args ); \ +} +#else +# define L( ... ) { ; } +#endif /* COMP_LOGGER_BUILD_ENABLE */ + + +#endif +#endif diff --git a/comp-slp/src/e_mod_comp_effect.c b/comp-slp/src/e_mod_comp_effect.c new file mode 100644 index 0000000..d3bfbb6 --- /dev/null +++ b/comp-slp/src/e_mod_comp_effect.c @@ -0,0 +1,1045 @@ +#include "e.h" +#include "e_mod_main.h" +#include "e_mod_comp.h" +#include "e_mod_comp_data.h" +#include "e_mod_comp_animation.h" +#include "config.h" +#include + +#if COMP_LOGGER_BUILD_ENABLE +extern int comp_logger_type ; +extern Ecore_X_Atom ATOM_CM_LOG ; +#endif + +extern Ecore_X_Atom ATOM_EFFECT_ENABLE ; +extern Ecore_X_Atom ATOM_EFFECT_DEFAULT ; +extern Ecore_X_Atom ATOM_EFFECT_NONE ; +extern Ecore_X_Atom ATOM_EFFECT_CUSTOM0 ; +extern Ecore_X_Atom ATOM_EFFECT_CUSTOM1 ; +extern Ecore_X_Atom ATOM_EFFECT_CUSTOM2 ; +extern Ecore_X_Atom ATOM_EFFECT_CUSTOM3 ; +extern Ecore_X_Atom ATOM_EFFECT_CUSTOM4 ; +extern Ecore_X_Atom ATOM_EFFECT_CUSTOM5 ; +extern Ecore_X_Atom ATOM_EFFECT_CUSTOM6 ; +extern Ecore_X_Atom ATOM_EFFECT_CUSTOM7 ; +extern Ecore_X_Atom ATOM_EFFECT_CUSTOM8 ; +extern Ecore_X_Atom ATOM_EFFECT_CUSTOM9 ; +extern Ecore_X_Atom ATOM_FAKE_LAUNCH_IMAGE ; + +extern E_Comp_Win * _e_mod_comp_win_transient_parent_find (E_Comp_Win * cw); +extern E_Comp_Win * _e_mod_comp_win_find_background_win (E_Comp_Win * cw); + +extern E_Comp * _e_mod_comp_find (Ecore_X_Window root); +extern void _e_mod_comp_win_render_queue (E_Comp_Win *cw); +extern void _e_mod_comp_send_window_effect_client_state( E_Comp_Win *cw, Eina_Bool effect_state); +extern Eina_Bool _e_mod_comp_is_application_launch (E_Border *bd); +extern Eina_Bool _e_mod_comp_is_application_close (E_Border *bd); +extern E_Comp_Win * _e_mod_comp_win_find_by_indicator (E_Comp *c ); +extern Eina_Bool _e_mod_comp_is_isf_main_window (E_Border *bd); +extern Eina_Bool _e_mod_comp_is_isf_sub_window (E_Border *bd); +extern Eina_Bool _e_mod_comp_is_utility_window (E_Border *bd); +extern Eina_Bool _e_mod_comp_is_indicator_window (E_Border *bd); +extern Eina_Bool _e_mod_comp_is_tooltip_window (E_Border *bd); +extern Eina_Bool _e_mod_comp_is_combo_window (E_Border *bd); +extern Eina_Bool _e_mod_comp_is_dnd_window (E_Border *bd); +extern Eina_Bool _e_mod_comp_is_popup_menu_window (E_Border *bd); +extern Eina_Bool _e_mod_comp_is_task_manager_window (E_Border *bd); +extern Eina_Bool _e_mod_comp_is_live_magazine_window (E_Border *bd); +extern Eina_Bool _e_mod_comp_is_lock_screen_window (E_Border *bd); +extern Eina_Bool _e_mod_comp_is_menu_window (E_Border *bd); +extern Eina_Bool _e_mod_comp_is_drop_down_menu_window (E_Border *bd); +extern Eina_Bool _e_mod_comp_is_splash_window (E_Border *bd); +extern E_Comp_Win * _e_mod_comp_win_find_fake_background_win (E_Comp *c); +extern void _e_mod_comp_cb_pending_after (void *data __UNUSED__, E_Manager *man __UNUSED__, E_Manager_Comp_Source *src); +extern Eina_Bool _e_mod_comp_fake_launch_timeout (void *data); +extern Eina_Bool _e_mod_comp_win_check_visible (E_Comp_Win *cw); +extern Eina_Bool _e_mod_comp_win_check_visible3 (E_Comp_Win *cw); +extern void _e_mod_comp_disable_touch_event_block (E_Comp *c); +extern void _e_mod_comp_enable_touch_event_block (E_Comp *c); +extern void _e_mod_comp_win_inc_animating (E_Comp_Win *cw); +extern void _e_mod_comp_win_dec_animating (E_Comp_Win *cw); +static void _e_mod_comp_background_show_effect (E_Comp_Win *cw); +static void _e_mod_comp_background_hide_effect (E_Comp_Win *cw); +static void _e_mod_comp_enable_effect_stage (E_Comp_Win *actor_cw, E_Comp_Win *actor_cw2); +void _e_mod_comp_disable_fake_launch (E_Comp *c); + +void _e_mod_comp_window_show_effect (E_Comp_Win *cw); +void _e_mod_comp_window_hide_effect (E_Comp_Win *cw); +void _e_mod_comp_window_restack_effect (E_Comp_Win *cw, E_Comp_Win *cw2); +void _e_mod_comp_disable_effect_stage (E_Comp *c); +Eina_Bool _e_mod_comp_fake_show (Ecore_X_Event_Client_Message *ev); +Eina_Bool _e_mod_comp_fake_hide (Ecore_X_Event_Client_Message *ev ); +E_Comp_Effect_Type _e_mod_comp_get_effect_type (Ecore_X_Atom *atom); +Eina_Bool _e_mod_comp_win_check_visible2 (E_Comp_Win *cw); +void _e_mod_comp_background_show_effect_for_switcher( E_Comp_Win *cw ); +void _e_mod_comp_background_hide_effect_for_switcher( E_Comp_Win *cw ); +void _e_mod_comp_window_lower_effect (E_Comp_Win *cw, E_Comp_Win *cw2); + +E_Comp_Effect_Type +_e_mod_comp_get_effect_type(Ecore_X_Atom *atom) +{ + if ( *atom == ATOM_EFFECT_DEFAULT ) return COMP_EFFECT_DEFAULT; + else if ( *atom == ATOM_EFFECT_NONE ) return COMP_EFFECT_NONE; + else if ( *atom == ATOM_EFFECT_CUSTOM0 ) return COMP_EFFECT_CUSTOM0; + else if ( *atom == ATOM_EFFECT_CUSTOM1 ) return COMP_EFFECT_CUSTOM1; + else if ( *atom == ATOM_EFFECT_CUSTOM2 ) return COMP_EFFECT_CUSTOM2; + else if ( *atom == ATOM_EFFECT_CUSTOM3 ) return COMP_EFFECT_CUSTOM3; + else if ( *atom == ATOM_EFFECT_CUSTOM4 ) return COMP_EFFECT_CUSTOM4; + else if ( *atom == ATOM_EFFECT_CUSTOM5 ) return COMP_EFFECT_CUSTOM5; + else if ( *atom == ATOM_EFFECT_CUSTOM6 ) return COMP_EFFECT_CUSTOM6; + else if ( *atom == ATOM_EFFECT_CUSTOM7 ) return COMP_EFFECT_CUSTOM7; + else if ( *atom == ATOM_EFFECT_CUSTOM8 ) return COMP_EFFECT_CUSTOM8; + else if ( *atom == ATOM_EFFECT_CUSTOM9 ) return COMP_EFFECT_CUSTOM9; + else return COMP_EFFECT_DEFAULT; +} + +static void +_e_mod_comp_enable_effect_stage(E_Comp_Win *actor_cw, E_Comp_Win *actor_cw2) +{ + E_Comp_Win *find_cw = NULL; + Eina_Inlist *wins_list; + + if ( ( actor_cw == NULL ) || ( actor_cw2 == NULL ) ) return; + + actor_cw->effect_stage = EINA_TRUE; + actor_cw->c->effect_stage = EINA_TRUE; + + find_cw = actor_cw; + + while ( (wins_list = EINA_INLIST_GET(find_cw)->prev ) != NULL ) + { + find_cw = _EINA_INLIST_CONTAINER(find_cw, wins_list ); + if ( find_cw == NULL ) + { + fprintf( stdout, "[E17-comp] WIN_EFFECT : _e_mod_comp_enable_effect_stage() error ( find_cw == NULL ) ! \n"); + return; + } + + if ( (find_cw->invalid ) || ( find_cw->input_only ) || ( find_cw->win == actor_cw->win ) + || (find_cw->win == actor_cw2->win ) || ( _e_mod_comp_is_indicator_window( find_cw->bd ) == EINA_TRUE ) ) + { + ; + } + else + { + if (evas_object_visible_get(find_cw->shobj)) + { + find_cw->animate_hide = EINA_TRUE; // do hide window which is not related window animation effect. + evas_object_hide(find_cw->shobj); + } + } + } + //show background image when background show animation is emitted. + evas_object_stack_below(actor_cw->c->bg_img, evas_object_bottom_get(actor_cw->c->evas) ); + + if ( (actor_cw->animate_hide == EINA_TRUE ) + && !evas_object_visible_get(actor_cw->shobj) ) + { + evas_object_show(actor_cw->shobj); + actor_cw->animate_hide = EINA_FALSE; + } + + if ( (actor_cw2->animate_hide == EINA_TRUE ) + && !evas_object_visible_get(actor_cw2->shobj) ) + { + evas_object_show(actor_cw2->shobj); + actor_cw->animate_hide = EINA_FALSE; + } + +} + +static void _e_mod_comp_background_show_effect(E_Comp_Win *cw) +{ + E_Comp_Win *background_cw = NULL; + + background_cw = _e_mod_comp_win_find_background_win(cw); + + if ( background_cw ) + { + _e_mod_comp_enable_effect_stage(cw, background_cw); + + edje_object_signal_emit(background_cw->shobj, "e,state,background,visible,on", "e"); + L( LT_EFFECT, "[COMP] WIN_EFFECT : Background Show Effect signal Emit -> win:0x%08x\n",background_cw->win); + + _e_mod_comp_win_inc_animating(background_cw); + } +} + +static void _e_mod_comp_background_hide_effect(E_Comp_Win *cw) +{ + E_Comp_Win *background_cw = NULL; + + background_cw = _e_mod_comp_win_find_background_win(cw); + + if ( background_cw ) + { + _e_mod_comp_enable_effect_stage(cw, background_cw); + + edje_object_signal_emit(background_cw->shobj, "e,state,background,visible,off", "e"); + L( LT_EFFECT, "[COMP] WIN_EFFECT : Background Hide Effect signal Emit -> win:0x%08x\n",background_cw->win); + + _e_mod_comp_win_inc_animating(background_cw); + } +} + +void +_e_mod_comp_background_show_effect_for_switcher( E_Comp_Win *cw ) +{ + if(!cw) return; + if( cw->c->animatable == EINA_FALSE) return; + + if ( cw->c->effect_stage == EINA_TRUE) + { + E_Comp_Win *find_cw; + EINA_INLIST_FOREACH(cw->c->wins, find_cw) + { + if (find_cw->defer_raise == EINA_TRUE) _e_mod_comp_done_defer(find_cw); + } + _e_mod_comp_disable_effect_stage(cw->c); + } + + cw->c->switcher = EINA_TRUE; + + int i = 0; + Evas_Coord x, y, w, h; + E_Comp_Win *_cw; + EINA_INLIST_REVERSE_FOREACH(cw->c->wins, _cw) + { + if ( (_cw->visible == 1) && (evas_object_visible_get(_cw->shobj) == 1) && (evas_object_visible_get(_cw->obj) == 1) && + (_cw->win_type != WIN_INDICATOR) && (_cw->win_type != WIN_TASK_MANAGER)) + { + evas_object_geometry_get( _cw->shobj, &x, &y, &w, &h ); + if( w == _cw->c->screen_w && h == _cw->c->screen_h) + { + i++; + evas_object_move(_cw->shobj, (i+1) * (-WINDOW_SPACE) + (_cw->c->screen_w), 0); // move all windows to each stack position + if(i == 1) + { + edje_object_signal_emit(_cw->shobj, "e,state,switcher_top,on", "e"); // top window + L( LT_EFFECT, "[COMP] WIN_EFFECT : Task Switcher Top signal Emit -> win:0x%08x\n",_cw->win); + _e_mod_comp_win_inc_animating(_cw); + } + else + { + edje_object_signal_emit(_cw->shobj, "e,state,switcher,on", "e"); // left of top window + L( LT_EFFECT, "[COMP] WIN_EFFECT : Task Switcher Left signal Emit -> win:0x%08x\n",_cw->win); + _e_mod_comp_win_inc_animating(_cw); + } + } + else + { + _cw->animate_hide = EINA_TRUE; + evas_object_hide(_cw->shobj); + } + } + } +} + +void +_e_mod_comp_background_hide_effect_for_switcher( E_Comp_Win *cw ) +{ + if(!cw) return; + if( cw->c->animatable == EINA_FALSE) return; + + if ( cw->c->effect_stage == EINA_TRUE) + { + E_Comp_Win *find_cw; + EINA_INLIST_FOREACH(cw->c->wins, find_cw) + { + if (find_cw->defer_raise == EINA_TRUE) _e_mod_comp_done_defer(find_cw); + } + _e_mod_comp_disable_effect_stage(cw->c); + } + + Eina_List *l; + E_Comp_Transfer *tr; + EINA_LIST_FOREACH (cw->c->transfer_list, l, tr) + { + if (!tr) continue; + if(tr->animator) ecore_animator_del(tr->animator); + tr->animator = NULL; + cw->c->transfer_list = eina_list_remove (cw->c->transfer_list, tr); + free(tr); + } + int i = 0; + Evas_Coord x, y, w, h; + E_Comp_Win *_cw; + EINA_INLIST_REVERSE_FOREACH(cw->c->wins, _cw) + { + if ( (_cw->visible == 1) && (evas_object_visible_get(_cw->shobj) == 1) && (evas_object_visible_get(_cw->obj) == 1) && + (_cw->win_type != WIN_INDICATOR) && (_cw->win_type != WIN_TASK_MANAGER)) + { + evas_object_geometry_get( _cw->shobj, &x, &y, &w, &h ); + if ( w == _cw->c->screen_w && h == _cw->c->screen_h ) + { + i++; + L( LT_EFFECT, "[COMP] WIN_EFFECT : Task Switcher Hide effect start -> win:0x%08x\n",_cw->win); + _e_mod_comp_win_inc_animating(_cw); + if(_cw->c->selected_pos == 0 || _cw->c->selected_pos == 1) // if window is not selected, skip translation stage and do rotation stage + { + E_Comp_Transfer * rotate; + rotate = calloc(1, sizeof(E_Comp_Transfer)); + if (!rotate) return; + rotate->from = i * (- WINDOW_SPACE) + (_cw->c->screen_w -100); + rotate->obj = _cw->shobj; + rotate->duration = SWITCHER_DURATION_TOP; + rotate->begin_time = ecore_loop_time_get(); + rotate->selected = EINA_FALSE; + if(i == 1) // top window + { + rotate->len = -(rotate->from); + rotate->animator = ecore_animator_add(on_animate_rotate_top, _cw); + } + else // left of top window + { + rotate->len = 0; + rotate->animator = ecore_animator_add(on_animate_rotate_left, _cw); + } + _cw->transfer = rotate; + _cw->c->transfer_list = eina_list_append (_cw->c->transfer_list, _cw->transfer); + } + else // if certain window is selected, do translation stage and rotation stage + { + E_Comp_Transfer * translate; + translate = calloc(1, sizeof(E_Comp_Transfer)); + if (!translate) return; + if(i == 1) // top window + { + translate->selected = EINA_TRUE; + translate->from = cw->c->selected_pos * (-WINDOW_SPACE) + (_cw->c->screen_w -100); + } + else // left of top window + { + translate->selected = EINA_FALSE; + if(_cw->c->selected_pos >= i) // if left of top window is selected, other windows's position is adjusted + translate->from = (i-1) * (-WINDOW_SPACE) + (_cw->c->screen_w -100); + else + translate->from = i * (-WINDOW_SPACE) + (_cw->c->screen_w -100); + } + translate->len = (_cw->c->selected_pos - 1) * WINDOW_SPACE; + translate->obj = _cw->shobj; + translate->begin_time = ecore_loop_time_get(); + translate->duration = SWITCHER_DURATION_TRANSLATE; + translate->animator = ecore_animator_add(on_animate_translate, _cw); + _cw->transfer = translate; + _cw->c->transfer_list = eina_list_append (_cw->c->transfer_list, _cw->transfer); + } + } + else + { + _cw->animate_hide = EINA_TRUE; + evas_object_hide(_cw->shobj); + } + } + } +} +void +_e_mod_comp_window_show_effect( E_Comp_Win *cw ) +{ + if ( cw ) + { + //cw->ready_hide_effect = EINA_TRUE; + if ( cw->first_show_worked == EINA_FALSE ) + cw->first_show_worked = EINA_TRUE; + + if ( (cw->c->fake_launch_state == EINA_TRUE) && ( cw->c->fake_win == 0) + && ( (cw->x == 0) && (cw->y == 0) && (cw->w == cw->c->man->w) && (cw->h == cw->c->man->h) ) + && ( cw->bd->client.netwm.type == ECORE_X_WINDOW_TYPE_NORMAL) ) + { + if ( cw->c->fake_launch_done == EINA_TRUE ) + { + edje_object_signal_emit(cw->shobj, "e,state,visible,on,noeffect", "e"); // send_noeffect_signal + _e_mod_comp_disable_fake_launch(cw->c); + } + else + { + cw->c->fake_win = cw->win; + return; + } + } + else + { +#if 0 + if ( !_e_mod_comp_win_check_visible2(cw) ) + { + edje_object_signal_emit(cw->shobj, "e,state,visible,on,noeffect", "e"); + } + else +#endif + if (cw->c->animatable == EINA_FALSE ) + { + edje_object_signal_emit(cw->shobj, "e,state,visible,on,noeffect", "e"); + } + else if ( cw->animatable == EINA_FALSE ) + { + edje_object_signal_emit(cw->shobj, "e,state,visible,on,noeffect", "e"); + } + else if (cw->show_effect == COMP_EFFECT_DEFAULT ) + { + if ( _e_mod_comp_is_application_launch(cw->bd) ) + { + _e_mod_comp_background_show_effect(cw); + } + edje_object_signal_emit(cw->shobj, "e,state,visible,on", "e"); + } + else if ( cw->show_effect == COMP_EFFECT_NONE ) + { + edje_object_signal_emit(cw->shobj, "e,state,visible,on,noeffect", "e"); + } + else if ( cw->show_effect == COMP_EFFECT_CUSTOM0 ) + { + edje_object_signal_emit(cw->shobj, "e,state,visible,on,custom0", "e"); + } + else if ( cw->show_effect == COMP_EFFECT_CUSTOM1 ) + { + edje_object_signal_emit(cw->shobj, "e,state,visible,on,custom1", "e"); + } +#if 0 + else if ( COMP_EFFECT_CUSTOM0 ) + { + edje_signal_emit ( custom0_effect ) + } +#endif + else + { + edje_object_signal_emit(cw->shobj, "e,state,visible,on", "e"); + } + } + L( LT_EFFECT, "[COMP] WIN_EFFECT : Show effect signal Emit -> win:0x%08x\n",cw->win); + _e_mod_comp_win_inc_animating(cw); + + cw->pending_count++; + e_manager_comp_event_src_visibility_send(cw->c->man, (E_Manager_Comp_Source *)cw, _e_mod_comp_cb_pending_after, cw->c); + + if (!cw->bd) return; + if (cw->win_type == WIN_TASK_MANAGER) + { + cw->c->switcher_animating = EINA_TRUE; + _e_mod_comp_background_show_effect_for_switcher(cw); + } + } +} + +void +_e_mod_comp_window_hide_effect( E_Comp_Win *cw ) +{ + if ( cw ) + { + //cw->ready_hide_effect = EINA_FALSE; +#if 0 + if ( _e_mod_comp_win_check_visible2(cw) ) + { + if ( cw->animating ) + { + return; + } + else + { + edje_object_signal_emit(cw->shobj, "e,state,visible,off,noeffect", "e"); + } + } +#endif + if ( !_e_mod_comp_win_check_visible3(cw) ) + { + edje_object_signal_emit(cw->shobj, "e,state,visible,off,noeffect", "e"); + } + else + { + if ( cw->c->animatable == EINA_FALSE ) + { + edje_object_signal_emit(cw->shobj, "e,state,visible,off,noeffect", "e"); + } + else if ( cw->animatable == EINA_FALSE ) + { + edje_object_signal_emit(cw->shobj, "e,state,visible,off,noeffect", "e"); + } + else if (cw->hide_effect == COMP_EFFECT_DEFAULT ) + { + if ( !cw->animating && _e_mod_comp_is_application_close(cw->bd) ) + { + _e_mod_comp_background_hide_effect(cw); + } + edje_object_signal_emit(cw->shobj, "e,state,visible,off", "e"); + } + else if ( cw->hide_effect == COMP_EFFECT_NONE ) + { + edje_object_signal_emit(cw->shobj, "e,state,visible,off,noeffect", "e"); + } + else if ( cw->hide_effect == COMP_EFFECT_CUSTOM0 ) + { + edje_object_signal_emit(cw->shobj, "e,state,visible,off,custom0", "e"); + } + else if ( cw->hide_effect == COMP_EFFECT_CUSTOM1 ) + { + edje_object_signal_emit(cw->shobj, "e,state,visible,off,custom1", "e"); + } +#if 0 + else if ( COMP_EFFECT_CUSTOM0 ) + { + edje_signal_emit ( custom0_effect ) + } +#endif + else + { + edje_object_signal_emit(cw->shobj, "e,state,visible,off", "e"); + } + } + L( LT_EFFECT, "[COMP] WIN_EFFECT : Hide effect signal Emit -> win:0x%08x\n",cw->win); + _e_mod_comp_win_inc_animating(cw); + + cw->pending_count++; + e_manager_comp_event_src_visibility_send (cw->c->man, (E_Manager_Comp_Source *)cw, _e_mod_comp_cb_pending_after, cw->c); + + if (!cw->bd) return; + if (cw->win_type == WIN_TASK_MANAGER) + { + cw->c->switcher_animating = EINA_TRUE; + cw->c->switcher_obscured = !_e_mod_comp_win_check_visible(cw); + if(!cw->c->switcher_obscured) + { + _e_mod_comp_background_hide_effect_for_switcher(cw); + } + else + { + L( LT_EFFECT, "[COMP] WIN_EFFECT : Task Manager is obscured. Nothing to do -> win:0x%08x\n",cw->win); + } + } + } +} + +void +_e_mod_comp_window_restack_effect(E_Comp_Win *cw, + E_Comp_Win *cw2) +{ + E_Comp_Win *cw3, *anim_cw; + Eina_Inlist *wins_list; + + if (!cw || !cw2) return; + + L(LT_EFFECT, + "[COMP] WIN_EFFECT : Raise Above \n"); + + cw3 = _e_mod_comp_win_find_by_indicator(cw->c); + anim_cw = cw2; + + while (anim_cw->defer_hide + || !(anim_cw->x == 0 && anim_cw->y == 0 + && anim_cw->w == anim_cw->c->man->w + && anim_cw->h == anim_cw->c->man->h) + || _e_mod_comp_is_isf_main_window(anim_cw->bd) + || _e_mod_comp_is_isf_sub_window(anim_cw->bd) + || _e_mod_comp_is_utility_window(anim_cw->bd) + || _e_mod_comp_is_indicator_window(anim_cw->bd) + || _e_mod_comp_is_tooltip_window(anim_cw->bd) + || _e_mod_comp_is_combo_window(anim_cw->bd) + || _e_mod_comp_is_dnd_window(anim_cw->bd) + || _e_mod_comp_is_popup_menu_window(anim_cw->bd) + || _e_mod_comp_is_task_manager_window(anim_cw->bd) + || _e_mod_comp_is_lock_screen_window(anim_cw->bd) + || _e_mod_comp_is_menu_window(anim_cw->bd) + || _e_mod_comp_is_drop_down_menu_window(anim_cw->bd) + || _e_mod_comp_is_splash_window(anim_cw->bd)) + + { + wins_list = EINA_INLIST_GET(anim_cw)->prev; + if (!wins_list) return; + + anim_cw = _EINA_INLIST_CONTAINER(anim_cw, wins_list); + if (!anim_cw) return; + } + + if (!anim_cw->visible) return; + + // if task switcher is open, just set defer_raise + // and do jump effect in _e_mod_comp_window_hide_effect + if (cw->c->switcher) + { + E_Comp_Win *find_cw; + EINA_INLIST_REVERSE_FOREACH(cw->c->wins, find_cw) + { + if ( find_cw->win_type == WIN_TASK_MANAGER ) + cw->c->switcher_obscured = !_e_mod_comp_win_check_visible(find_cw); + } + } + if (cw->c->switcher && !cw->c->switcher_obscured) + { + L(LT_EFFECT, + "[COMP] WIN_EFFECT : Raise above Emit (Task Switcher) -> win:0x%08x\n", + cw->win); + + cw->defer_raise = EINA_TRUE; + if (eina_list_count(cw->c->transfer_list) > 0) + { + L(LT_EFFECT, + "[COMP] WIN_EFFECT : previous Transfer_list is cleaned up. num: %d\n", + eina_list_count(cw->c->transfer_list)); + Eina_List *l; + E_Comp_Transfer *tr; + EINA_LIST_FOREACH (cw->c->transfer_list, l, tr) + { + if (!tr) continue; + if(tr->animator) ecore_animator_del(tr->animator); + tr->animator = NULL; + cw->c->transfer_list = eina_list_remove (cw->c->transfer_list, tr); + free(tr); + } + int i = 0; + Evas_Coord x, y, w, h; + E_Comp_Win *_cw; + EINA_INLIST_REVERSE_FOREACH(cw->c->wins, _cw) + { + if (_cw->visible + && evas_object_visible_get(_cw->shobj) + && evas_object_visible_get(_cw->obj) + && (_cw->win_type != WIN_INDICATOR) && (_cw->win_type != WIN_TASK_MANAGER)) + { + evas_object_geometry_get(_cw->shobj, &x, &y, &w, &h); + if (w == _cw->c->screen_w && h == _cw->c->screen_h) + { + i++; + L( LT_EFFECT, "[COMP] WIN_EFFECT : Task Switcher Hide effect start -> win:0x%08x\n",_cw->win); + _e_mod_comp_win_inc_animating(_cw); + // if window is not selected, skip translation stage + // and do rotation stage + if (_cw->c->selected_pos == 0 || _cw->c->selected_pos == 1) + { + E_Comp_Transfer *rotate; + rotate = calloc(1, sizeof(E_Comp_Transfer)); + if (!rotate) return; + rotate->from = i * (- WINDOW_SPACE) + (_cw->c->screen_w -100); + rotate->obj = _cw->shobj; + rotate->duration = SWITCHER_DURATION_TOP; + rotate->begin_time = ecore_loop_time_get(); + rotate->selected = EINA_FALSE; + if (i == 1) + { + // top window + rotate->len = -(rotate->from);; + rotate->animator = ecore_animator_add(on_animate_rotate_top, _cw); + } + else + { + // left of top window + rotate->len = 0; + rotate->animator = ecore_animator_add(on_animate_rotate_left, _cw); + } + _cw->transfer = rotate; + _cw->c->transfer_list = eina_list_append(_cw->c->transfer_list, _cw->transfer); + } + else + { + // if certain window is selected, + // do translation stage and rotation stage + E_Comp_Transfer *translate; + translate = calloc(1, sizeof(E_Comp_Transfer)); + if (!translate) return; + if(i == 1) + { + // top window + translate->selected = EINA_TRUE; + translate->from = _cw->c->selected_pos * (-WINDOW_SPACE) + (_cw->c->screen_w -100); + } + else + { + // left of top window + translate->selected = EINA_FALSE; + if (_cw->c->selected_pos >= i) + { + // if left of top window is selected, + // other windows's position is adjusted + translate->from = (i-1) * (-WINDOW_SPACE) + (_cw->c->screen_w -100); + } + else + translate->from = i * (-WINDOW_SPACE) + (_cw->c->screen_w -100); + } + translate->len = (_cw->c->selected_pos - 1) * WINDOW_SPACE; + translate->obj = _cw->shobj; + translate->begin_time = ecore_loop_time_get(); + translate->duration = SWITCHER_DURATION_TRANSLATE; + translate->animator = ecore_animator_add(on_animate_translate, _cw); + _cw->transfer = translate; + _cw->c->transfer_list = eina_list_append (_cw->c->transfer_list, _cw->transfer); + } + } + } + } + } + } + else + { + if (_e_mod_comp_is_application_launch(cw->bd)) + { + evas_object_stack_above(cw->shobj, cw2->shobj); + L(LT_EFFECT, + "[COMP] WIN_EFFECT : Raise above signal1 Emit -> win:0x%08x\n", + cw->win); + + _e_mod_comp_enable_effect_stage(anim_cw, cw); + + edje_object_signal_emit(anim_cw->shobj, + "e,state,background,visible,on", + "e"); + _e_mod_comp_win_inc_animating(anim_cw); + + edje_object_signal_emit(cw->shobj, + "e,state,visible,on", + "e"); + + _e_mod_comp_win_inc_animating(cw); + } + else if (_e_mod_comp_is_application_close(anim_cw->bd)) + { + cw->defer_raise = EINA_TRUE; + anim_cw->defer_raise = EINA_TRUE; + L(LT_EFFECT, + "[COMP] WIN_EFFECT : Raise above signal2 Emit -> win:0x%08x\n", + anim_cw->win); + + _e_mod_comp_enable_effect_stage(cw, anim_cw); + + edje_object_signal_emit(anim_cw->shobj, + "e,state,raise_above,off", + "e"); + _e_mod_comp_win_inc_animating(anim_cw); + + edje_object_signal_emit(cw->shobj, + "e,state,background,visible,off", + "e"); + + _e_mod_comp_win_inc_animating(cw); + } + else + { + evas_object_stack_above(cw->shobj, cw2->shobj); + + L(LT_EFFECT, + "[COMP] WIN_EFFECT : Raise above signal1 Emit -> win:0x%08x\n", + cw->win); + + edje_object_signal_emit(cw->shobj, "e,state,visible,on", "e"); + _e_mod_comp_win_inc_animating(cw); + } + } + + if (cw3) + { + if (!(cw3->invalid) && (cw3->visible)) + { + // if cw is indicator then, send indicator move effect + if (cw3->animate_hide + && !evas_object_visible_get(cw3->shobj)) + { + evas_object_show(cw3->shobj); + cw3->animate_hide = EINA_FALSE; + } + } + } + + L(LT_EFFECT, + "[COMP] WIN_EFFECT : Animation raise above [0x%x] abv [0x%x]\n", + cw->win, anim_cw->win); +} + +void +_e_mod_comp_disable_effect_stage( E_Comp *c ) +{ + E_Comp_Win *find_cw = NULL; + + if ( c == NULL ) return ; + + L( LT_EFFECT, "[COMP] WIN_EFFECT : _e_mod_comp_disable_effect_stage() \n"); + c->effect_stage = EINA_FALSE; + EINA_INLIST_FOREACH(c->wins, find_cw) + { + if ( find_cw->invalid ) + { + find_cw->animate_hide = EINA_FALSE; // Do recovery state of window visibility ( when was window animation effect occured, unrelated window was hid. ) + continue; + } + else if (find_cw->input_only ) + { + find_cw->animate_hide = EINA_FALSE; // Do recovery state of window visibility ( when was window animation effect occured, unrelated window was hid. ) + continue; + } + else if ( find_cw->visible == 0 ) + { + find_cw->animate_hide = EINA_FALSE; // Do recovery state of window visibility ( when was window animation effect occured, unrelated window was hid. ) + continue; + } + else if ( (find_cw->animate_hide == EINA_FALSE) && evas_object_visible_get(find_cw->shobj) ) + { + continue; + } + else if ( (find_cw->first_show_worked == EINA_FALSE ) && !evas_object_visible_get(find_cw->shobj) ) + { + continue; + } + else + { + find_cw->animate_hide = EINA_FALSE; // Do recovery state of window visibility ( when was window animation effect occured, unrelated window was hid. ) + evas_object_show(find_cw->shobj); + } + } +} + +Eina_Bool +_e_mod_comp_fake_show(Ecore_X_Event_Client_Message *ev ) +{ + int grab_result; + unsigned int effect_enable = 0; + + char *fake_img_file = NULL; + E_Comp *c = NULL; + E_Comp_Win *cw = NULL; + E_Comp_Win *background_cw = NULL; + E_Comp_Win *find_cw = NULL; // for animate_hide window + + if ( ev == NULL ) return ECORE_CALLBACK_PASS_ON; + + c = _e_mod_comp_find(ev->win); + if (!c) return ECORE_CALLBACK_PASS_ON; + L( LT_EFFECT, "[COMP] Message - ATOM_FAKE_LAUNCH : Show EFFECT\n"); + + effect_enable = 0; + ecore_x_window_prop_card32_get(c->man->root, ATOM_EFFECT_ENABLE, &effect_enable, 1); + if ( effect_enable == 0 ) // if effect_enable is 0 ,then do not show fake image + return ECORE_CALLBACK_PASS_ON; + + // if previous fake is running, then don't launch fake show + if ( c->fake_launch_state == EINA_TRUE ) return ECORE_CALLBACK_PASS_ON; + + // grab hardware key when fake launch effect is running + grab_result = utilx_grab_key(ecore_x_display_get(), c->win , KEY_SELECT, EXCLUSIVE_GRAB); + + if (EXCLUSIVE_GRABBED_ALREADY == grab_result) + { + printf("Failed to grab a key (keyname=%s) for EXCLUSIVE_GRAB !\n", KEY_SELECT); + return ECORE_CALLBACK_PASS_ON; + } + + grab_result = utilx_grab_key(ecore_x_display_get(), c->win , KEY_VOLUMEUP , EXCLUSIVE_GRAB); + if (EXCLUSIVE_GRABBED_ALREADY == grab_result) + { + printf("Failed to grab a key (keyname=%s) for EXCLUSIVE_GRAB !\n", KEY_VOLUMEUP ); + return ECORE_CALLBACK_PASS_ON; + } + + grab_result = utilx_grab_key(ecore_x_display_get(), c->win ,KEY_VOLUMEDOWN, EXCLUSIVE_GRAB); + if (EXCLUSIVE_GRABBED_ALREADY == grab_result) + { + printf("Failed to grab a key (keyname=%s) for EXCLUSIVE_GRAB !\n", KEY_VOLUMEDOWN); + return ECORE_CALLBACK_PASS_ON; + } + + grab_result = utilx_grab_key(ecore_x_display_get(), c->win , KEY_CAMERA, EXCLUSIVE_GRAB); + if (EXCLUSIVE_GRABBED_ALREADY == grab_result) + { + printf("Failed to grab a key (keyname=%s) for EXCLUSIVE_GRAB !\n", KEY_CAMERA); + return ECORE_CALLBACK_PASS_ON; + } + + c->fake_launch_state = EINA_TRUE; + c->fake_img_obj = evas_object_image_add(c->evas); + fake_img_file = ecore_x_window_prop_string_get(ev->win, ATOM_FAKE_LAUNCH_IMAGE); + if (fake_img_file == NULL) + { + fprintf(stdout,"[COMP] Message - ATOM_FAKE_LAUNCH_IMAGE NAME is NULL\n"); + c->fake_launch_state = EINA_FALSE; + utilx_ungrab_key(ecore_x_display_get(), c->win , KEY_SELECT); + utilx_ungrab_key(ecore_x_display_get(), c->win , KEY_VOLUMEUP); + utilx_ungrab_key(ecore_x_display_get(), c->win , KEY_VOLUMEDOWN); + utilx_ungrab_key(ecore_x_display_get(), c->win , KEY_CAMERA); + return ECORE_CALLBACK_PASS_ON; + } + + evas_object_image_file_set(c->fake_img_obj, fake_img_file, NULL ); + + if ( evas_object_image_load_error_get (c->fake_img_obj) != EVAS_LOAD_ERROR_NONE ) + { + printf("Failed to Load Fake Launch Image : %s !\n", fake_img_file); + c->fake_launch_state = EINA_FALSE; + free(fake_img_file); + utilx_ungrab_key(ecore_x_display_get(), c->win , KEY_SELECT); + utilx_ungrab_key(ecore_x_display_get(), c->win , KEY_VOLUMEUP); + utilx_ungrab_key(ecore_x_display_get(), c->win , KEY_VOLUMEDOWN); + utilx_ungrab_key(ecore_x_display_get(), c->win , KEY_CAMERA); + return ECORE_CALLBACK_PASS_ON; + } + free(fake_img_file); + + evas_object_image_size_get(c->fake_img_obj, &(c->fake_img_w), &(c->fake_img_h) ); + evas_object_image_fill_set(c->fake_img_obj, 0, 0, c->fake_img_w, c->fake_img_h); + evas_object_image_filled_set(c->fake_img_obj, EINA_TRUE); + if (!edje_object_part_swallow(c->fake_img_shobj, "fake.swallow.content", c->fake_img_obj)) + fprintf( stdout, "[E17-comp] Fake Image didn't swallowed!\n"); + + evas_object_show(c->fake_img_obj); + + cw = _e_mod_comp_win_find_by_indicator(c); + + if (cw == NULL) + { + fprintf( stdout, "[E17-comp] FAKE_EFFECT : ( indicator window == NULL) !\n"); + evas_object_raise(c->fake_img_shobj); + } + else + { + evas_object_stack_below(c->fake_img_shobj, cw->shobj); + } + + // background show effect + background_cw = _e_mod_comp_win_find_fake_background_win(c); + if ( background_cw ) + { + EINA_INLIST_FOREACH(c->wins, find_cw) + { + if ( (find_cw->invalid ) || ( find_cw->input_only ) || (find_cw->win == background_cw->win ) || ( _e_mod_comp_is_indicator_window( find_cw->bd ) == EINA_TRUE ) ) + { + continue; + } + else + { + if (evas_object_visible_get(find_cw->shobj)) + { + find_cw->animate_hide = EINA_TRUE; // do hide window which is not related window animation effect. + evas_object_hide(find_cw->shobj); + } + } + } + //show background image when background show animation is emitted. + evas_object_stack_below(c->bg_img, evas_object_bottom_get(c->evas) ); + + background_cw->animate_hide = EINA_FALSE; + + edje_object_signal_emit(background_cw->shobj, "e,state,fake,background,visible,on", "e"); + L( LT_EFFECT, "[COMP] WIN_EFFECT : FAKE Background Show Effect signal Emit -> win:0x%08x\n",background_cw->win); + + _e_mod_comp_win_inc_animating(background_cw); + + } + + // background show effect + evas_object_show(c->fake_img_shobj); + edje_object_signal_emit(c->fake_img_shobj, "fake,state,visible,on", "fake"); + L( LT_EFFECT, "[COMP] WIN_EFFECT : Fake Show signal Emit\n"); + + //fake hide timer add + c->fake_launch_timeout = ecore_timer_add( 10.0f , _e_mod_comp_fake_launch_timeout, c); // 10.0f --> 10 sec + + _e_mod_comp_enable_touch_event_block(c); + + return ECORE_CALLBACK_PASS_ON; +} + +Eina_Bool +_e_mod_comp_fake_hide(Ecore_X_Event_Client_Message *ev ) +{ + unsigned int effect_enable = 0; + + E_Comp *c = NULL; + E_Comp_Win *background_cw = NULL; + E_Comp_Win *find_cw = NULL; // for animate_hide window + + if ( ev == NULL ) return ECORE_CALLBACK_PASS_ON; + c = _e_mod_comp_find(ev->win); + + if (!c) return ECORE_CALLBACK_PASS_ON; + + effect_enable = 0; + ecore_x_window_prop_card32_get(c->man->root, ATOM_EFFECT_ENABLE, &effect_enable, 1); + if ( effect_enable == 0 ) // if effect_enable is 0 ,then do not show fake image + return ECORE_CALLBACK_PASS_ON; + + L( LT_EFFECT, "[COMP] Message - ATOM_FAKE_LAUNCH : Hide EFFECT win:0x08%x\n", ev->win); + if (c->fake_launch_state == EINA_TRUE) + { + if (c->fake_launch_timeout) // del fake launch timeout timer + { + ecore_timer_del(c->fake_launch_timeout); + c->fake_launch_timeout = NULL; + } + + // background hide effect + background_cw = _e_mod_comp_win_find_fake_background_win(c); + if ( background_cw ) + { + EINA_INLIST_FOREACH(c->wins, find_cw) + { + if ( (find_cw->invalid ) || ( find_cw->input_only ) || (find_cw->win == background_cw->win ) || ( _e_mod_comp_is_indicator_window( find_cw->bd ) == EINA_TRUE ) ) + { + continue; + } + else + { + if (evas_object_visible_get(find_cw->shobj)) + { + find_cw->animate_hide = EINA_TRUE; // do hide window which is not related window animation effect. + evas_object_hide(find_cw->shobj); + } + } + } + //show background image when background show animation is emitted. + evas_object_stack_below(c->bg_img, evas_object_bottom_get(c->evas) ); + + background_cw->animate_hide = EINA_FALSE; + + edje_object_signal_emit(background_cw->shobj, "e,state,background,visible,off", "e"); + L( LT_EFFECT, "[COMP] WIN_EFFECT : Background Show Effect signal Emit -> win:0x%08x\n",background_cw->win); + + _e_mod_comp_win_inc_animating(background_cw); + + } + // background show effect + + edje_object_signal_emit(c->fake_img_shobj, "fake,state,visible,off", "fake"); + L( LT_EFFECT, "[COMP] WIN_EFFECT : Fake Hide signal Emit\n"); + } + return ECORE_CALLBACK_PASS_ON; +} + +void +_e_mod_comp_disable_fake_launch( E_Comp *c) +{ + if ( c ) + { + if ( c->fake_launch_state == EINA_TRUE ) + { + c->fake_launch_state = EINA_FALSE; + c->fake_win = 0; + c->fake_launch_done = EINA_FALSE; + + _e_mod_comp_disable_touch_event_block(c); + + utilx_ungrab_key(ecore_x_display_get(), c->win , KEY_SELECT); + utilx_ungrab_key(ecore_x_display_get(), c->win , KEY_VOLUMEUP); + utilx_ungrab_key(ecore_x_display_get(), c->win , KEY_VOLUMEDOWN); + utilx_ungrab_key(ecore_x_display_get(), c->win , KEY_CAMERA); + + if ( c->fake_launch_timeout ) // del fake launch timeout timer + { + ecore_timer_del(c->fake_launch_timeout); + c->fake_launch_timeout = NULL; + } + + evas_object_hide(c->fake_img_shobj); + edje_object_part_unswallow( c->fake_img_shobj, c->fake_img_obj ); + evas_object_del(c->fake_img_obj); + } + } +} + +void _e_mod_comp_window_lower_effect(E_Comp_Win *cw, E_Comp_Win *cw2) +{ + cw->defer_raise = EINA_TRUE; + + if ( _e_mod_comp_is_application_close(cw->bd) ) + { + _e_mod_comp_enable_effect_stage(cw2, cw); + edje_object_signal_emit(cw2->shobj, "e,state,background,visible,off", "e"); + L( LT_EFFECT, "[COMP] WIN_EFFECT : Background Hide Effect signal Emit -> win:0x%08x\n",cw2->win); + _e_mod_comp_win_inc_animating(cw2); + } + edje_object_signal_emit(cw->shobj, "e,state,raise_above,off", "e"); + L( LT_EFFECT, "[COMP] WIN_EFFECT : Raise Above Hide Effect signal Emit -> win:0x%08x\n",cw->win); + _e_mod_comp_win_inc_animating(cw); +} diff --git a/comp-slp/src/e_mod_comp_policy.c b/comp-slp/src/e_mod_comp_policy.c new file mode 100644 index 0000000..086e7f5 --- /dev/null +++ b/comp-slp/src/e_mod_comp_policy.c @@ -0,0 +1,581 @@ +#include "e.h" +#include "e_mod_main.h" +#include "e_mod_comp.h" +#include "e_mod_comp_data.h" +#include "config.h" + +#if COMP_LOGGER_BUILD_ENABLE +extern int comp_logger_type ; +extern Ecore_X_Atom ATOM_CM_LOG ; +#endif + +extern Ecore_X_Atom ATOM_EFFECT_ENABLE ; +extern Ecore_X_Atom ATOM_WINDOW_EFFECT_ENABLE ; +extern Ecore_X_Atom ATOM_WINDOW_EFFECT_CLIENT_STATE; +extern Ecore_X_Atom ATOM_WINDOW_EFFECT_STATE ; +extern Ecore_X_Atom ATOM_WINDOW_EFFECT_TYPE ; +extern Ecore_X_Atom ATOM_EFFECT_DEFAULT ; +extern Ecore_X_Atom ATOM_EFFECT_NONE ; +extern Ecore_X_Atom ATOM_EFFECT_CUSTOM0 ; +extern Ecore_X_Atom ATOM_EFFECT_CUSTOM1 ; +extern Ecore_X_Atom ATOM_EFFECT_CUSTOM2 ; +extern Ecore_X_Atom ATOM_EFFECT_CUSTOM3 ; +extern Ecore_X_Atom ATOM_EFFECT_CUSTOM4 ; +extern Ecore_X_Atom ATOM_EFFECT_CUSTOM5 ; +extern Ecore_X_Atom ATOM_EFFECT_CUSTOM6 ; +extern Ecore_X_Atom ATOM_EFFECT_CUSTOM7 ; +extern Ecore_X_Atom ATOM_EFFECT_CUSTOM8 ; +extern Ecore_X_Atom ATOM_EFFECT_CUSTOM9 ; + +extern E_Comp_Win * _e_mod_comp_win_transient_parent_find (E_Comp_Win * cw); +extern E_Comp_Effect_Type _e_mod_comp_get_effect_type (Ecore_X_Atom *atom); +extern Eina_Bool _e_mod_comp_win_check_visible (E_Comp_Win *cw); + +Eina_Bool _e_mod_comp_is_quickpanel_window (E_Border *bd); +Eina_Bool _e_mod_comp_is_task_manager_window (E_Border *bd); +Eina_Bool _e_mod_comp_is_live_magazine_window (E_Border * bd); +Eina_Bool _e_mod_comp_is_lock_screen_window (E_Border *bd); +Eina_Bool _e_mod_comp_is_indicator_window (E_Border *bd); +Eina_Bool _e_mod_comp_is_isf_main_window (E_Border *bd); +Eina_Bool _e_mod_comp_is_isf_sub_window (E_Border *bd); +Eina_Bool _e_mod_comp_is_normal_window (E_Border *bd); +Eina_Bool _e_mod_comp_is_tooltip_window (E_Border *bd); +Eina_Bool _e_mod_comp_is_combo_window (E_Border *bd); +Eina_Bool _e_mod_comp_is_dnd_window (E_Border *bd); +Eina_Bool _e_mod_comp_is_desktop_window (E_Border *bd); +Eina_Bool _e_mod_comp_is_toolbar_window (E_Border *bd); +Eina_Bool _e_mod_comp_is_menu_window (E_Border *bd); +Eina_Bool _e_mod_comp_is_splash_window (E_Border *bd); +Eina_Bool _e_mod_comp_is_drop_down_menu_window (E_Border *bd); +Eina_Bool _e_mod_comp_is_notification_window (E_Border *bd); +Eina_Bool _e_mod_comp_is_utility_window (E_Border *bd); +Eina_Bool _e_mod_comp_is_popup_menu_window (E_Border *bd); +Eina_Bool _e_mod_comp_is_dialog_window (E_Border *bd); + +Eina_Bool _e_mod_comp_is_application_launch (E_Border *bd); +Eina_Bool _e_mod_comp_is_application_close (E_Border *bd); + +void _e_mod_comp_window_effect_policy (E_Comp_Win *cw); +Eina_Bool _e_mod_comp_window_restack_policy (E_Comp_Win *cw, E_Comp_Win *cw2); +Eina_Bool _e_mod_comp_window_rotation_policy (E_Comp_Win *cw); +int _e_mod_comp_shadow_policy (E_Comp_Win *cw); + +Eina_Bool +_e_mod_comp_is_quickpanel_window(E_Border *bd) +{ + const char *name = NULL; + const char *clas = NULL; + + if (!bd) return EINA_FALSE; + + name = bd->client.icccm.name; + clas = bd->client.icccm.class; + if ( clas == NULL ) return EINA_FALSE; + if ( strncmp(clas,"QUICKPANEL",strlen("QUICKPANEL")) != 0 ) return EINA_FALSE; + if ( bd->client.netwm.type != ECORE_X_WINDOW_TYPE_NORMAL ) return EINA_FALSE; + + return EINA_TRUE; +} + +Eina_Bool +_e_mod_comp_is_task_manager_window(E_Border *bd) +{ + const char *name = NULL; + const char *clas = NULL; + + if (!bd) return EINA_FALSE; + + name = bd->client.icccm.name; + clas = bd->client.icccm.class; + + if ( clas == NULL ) return EINA_FALSE; + if ( strncmp(clas,"TASK_MANAGER",strlen("TASK_MANAGER")) != 0 ) return EINA_FALSE; + if ( name == NULL ) return EINA_FALSE; + if ( strncmp(name,"TASK_MANAGER",strlen("TASK_MANAGER")) != 0 ) return EINA_FALSE; + if ( bd->client.netwm.type != ECORE_X_WINDOW_TYPE_NOTIFICATION ) return EINA_FALSE; + + return EINA_TRUE; +} + +Eina_Bool +_e_mod_comp_is_live_magazine_window(E_Border *bd) +{ + const char *name = NULL; + const char *clas = NULL; + + if (!bd) return EINA_FALSE; + + name = bd->client.icccm.name; + clas = bd->client.icccm.class; + + if ( clas == NULL ) return EINA_FALSE; + if ( strncmp(clas,"live-magazine",strlen("live-magazine")) != 0 ) return EINA_FALSE; + if ( name == NULL ) return EINA_FALSE; + if ( strncmp(name,"Live magazine",strlen("Live magazine")) != 0 ) return EINA_FALSE; + if ( bd->client.netwm.type != ECORE_X_WINDOW_TYPE_NORMAL ) return EINA_FALSE; + + return EINA_TRUE; +} + +Eina_Bool +_e_mod_comp_is_lock_screen_window(E_Border *bd) +{ + const char *name = NULL; + const char *clas = NULL; + + if (!bd) return EINA_FALSE; + + name = bd->client.icccm.name; + clas = bd->client.icccm.class; + + if ( clas == NULL ) return EINA_FALSE; + if ( strncmp(clas,"LOCK_SCREEN",strlen("LOCK_SCREEN")) != 0 ) return EINA_FALSE; + if ( name == NULL ) return EINA_FALSE; + if ( strncmp(name,"LOCK_SCREEN",strlen("LOCK_SCREEN")) != 0 ) return EINA_FALSE; + if ( bd->client.netwm.type != ECORE_X_WINDOW_TYPE_NOTIFICATION ) return EINA_FALSE; + + return EINA_TRUE; +} + +Eina_Bool +_e_mod_comp_is_indicator_window(E_Border *bd) +{ + const char *name = NULL; + const char *clas = NULL; + + if (!bd) return EINA_FALSE; + + name = bd->client.icccm.name; + clas = bd->client.icccm.class; + + if ( clas == NULL ) return EINA_FALSE; + if ( strncmp(clas,"INDICATOR",strlen("INDICATOR")) != 0 ) return EINA_FALSE; + if ( name == NULL ) return EINA_FALSE; + if ( strncmp(name,"INDICATOR",strlen("INDICATOR")) != 0 ) return EINA_FALSE; + if ( bd->client.netwm.type != ECORE_X_WINDOW_TYPE_DOCK ) return EINA_FALSE; + + return EINA_TRUE; +} + +Eina_Bool +_e_mod_comp_is_isf_main_window(E_Border *bd) +{ + const char *name = NULL; + const char *clas = NULL; + + if (!bd) return EINA_FALSE; + + name = bd->client.icccm.name; + clas = bd->client.icccm.class; + + if ( clas == NULL ) return EINA_FALSE; + if ( strncmp(clas,"ISF",strlen("ISF")) != 0 ) return EINA_FALSE; + if ( name == NULL ) return EINA_FALSE; + if ( strncmp(name,"Virtual Keyboard",strlen("Virtual Keyboard")) != 0 ) return EINA_FALSE; + if ( bd->client.netwm.type != ECORE_X_WINDOW_TYPE_NORMAL ) return EINA_FALSE; + + return EINA_TRUE; +} + +Eina_Bool +_e_mod_comp_is_isf_sub_window(E_Border *bd) +{ + const char *name = NULL; + const char *clas = NULL; + + if (!bd) return EINA_FALSE; + + name = bd->client.icccm.name; + clas = bd->client.icccm.class; + + if ( clas == NULL ) return EINA_FALSE; + if ( strncmp(clas,"ISF",strlen("ISF")) != 0 ) return EINA_FALSE; + if ( bd->client.netwm.type != ECORE_X_WINDOW_TYPE_NORMAL ) return EINA_FALSE; + if ( name == NULL ) return EINA_FALSE; + if ( (strncmp(name,"Key Magnifier",strlen("Key Magnifier")) == 0 ) + || (strncmp(name,"Prediction Window",strlen("Prediction Window")) == 0 ) + || (strncmp(name,"Setting Window",strlen("Setting Window")) == 0 ) + || (strncmp(name,"ISF Popup",strlen("ISF Popup")) == 0 ) ) return EINA_TRUE; + return EINA_FALSE; +} + +Eina_Bool +_e_mod_comp_is_normal_window(E_Border *bd) +{ + const char *clas = NULL; + + if (!bd) return EINA_FALSE; + + clas = bd->client.icccm.class; + + if ( clas == NULL ) return EINA_FALSE; + if ( strncmp(clas,"NORMAL_WINDOW",strlen("NORMAL_WINDOW")) != 0 ) return EINA_FALSE; + + if ( ( bd->client.netwm.type == ECORE_X_WINDOW_TYPE_NORMAL) + || ( bd->client.netwm.type == ECORE_X_WINDOW_TYPE_UNKNOWN ) ) return EINA_TRUE; + + return EINA_FALSE; +} + +Eina_Bool +_e_mod_comp_is_tooltip_window(E_Border *bd) +{ + + if (!bd) return EINA_FALSE; + + if ( bd->client.netwm.type != ECORE_X_WINDOW_TYPE_TOOLTIP ) return EINA_FALSE; + + return EINA_TRUE; +} + +Eina_Bool +_e_mod_comp_is_combo_window(E_Border *bd) +{ + + if (!bd) return EINA_FALSE; + + if ( bd->client.netwm.type != ECORE_X_WINDOW_TYPE_COMBO ) return EINA_FALSE; + + return EINA_TRUE; +} + +Eina_Bool +_e_mod_comp_is_dnd_window(E_Border *bd) +{ + + if (!bd) return EINA_FALSE; + + if ( bd->client.netwm.type != ECORE_X_WINDOW_TYPE_DND ) return EINA_FALSE; + + return EINA_TRUE; +} + +Eina_Bool +_e_mod_comp_is_desktop_window(E_Border *bd) +{ + + if (!bd) return EINA_FALSE; + + if ( bd->client.netwm.type != ECORE_X_WINDOW_TYPE_DESKTOP ) return EINA_FALSE; + + return EINA_TRUE; +} + +Eina_Bool +_e_mod_comp_is_toolbar_window(E_Border *bd) +{ + + if (!bd) return EINA_FALSE; + + if ( bd->client.netwm.type != ECORE_X_WINDOW_TYPE_TOOLBAR ) return EINA_FALSE; + + return EINA_TRUE; +} + +Eina_Bool +_e_mod_comp_is_menu_window(E_Border *bd) +{ + + if (!bd) return EINA_FALSE; + + if ( bd->client.netwm.type != ECORE_X_WINDOW_TYPE_MENU ) return EINA_FALSE; + + return EINA_TRUE; +} + +Eina_Bool +_e_mod_comp_is_splash_window(E_Border *bd) +{ + + if (!bd) return EINA_FALSE; + + if ( bd->client.netwm.type != ECORE_X_WINDOW_TYPE_SPLASH ) return EINA_FALSE; + + return EINA_TRUE; +} + +Eina_Bool +_e_mod_comp_is_drop_down_menu_window(E_Border *bd) +{ + + if (!bd) return EINA_FALSE; + + if ( bd->client.netwm.type != ECORE_X_WINDOW_TYPE_DROPDOWN_MENU ) return EINA_FALSE; + + return EINA_TRUE; +} + +Eina_Bool +_e_mod_comp_is_notification_window(E_Border *bd) +{ + + if (!bd) return EINA_FALSE; + + if ( bd->client.netwm.type != ECORE_X_WINDOW_TYPE_NOTIFICATION ) return EINA_FALSE; + + return EINA_TRUE; +} + +Eina_Bool +_e_mod_comp_is_utility_window(E_Border *bd) +{ + + if (!bd) return EINA_FALSE; + + if ( bd->client.netwm.type != ECORE_X_WINDOW_TYPE_UTILITY ) return EINA_FALSE; + + return EINA_TRUE; +} + +Eina_Bool +_e_mod_comp_is_popup_menu_window(E_Border *bd) +{ + + if (!bd) return EINA_FALSE; + + if ( bd->client.netwm.type != ECORE_X_WINDOW_TYPE_POPUP_MENU ) return EINA_FALSE; + + return EINA_TRUE; +} + +Eina_Bool +_e_mod_comp_is_dialog_window(E_Border *bd) +{ + + if (!bd) return EINA_FALSE; + + if ( bd->client.netwm.type != ECORE_X_WINDOW_TYPE_DIALOG ) return EINA_FALSE; + + return EINA_TRUE; +} + +Eina_Bool +_e_mod_comp_is_application_launch(E_Border *bd) +{ + if (!bd) return EINA_FALSE; + if ( _e_mod_comp_is_quickpanel_window(bd) ) return EINA_FALSE; + if ( _e_mod_comp_is_task_manager_window(bd) ) return EINA_FALSE; + if ( _e_mod_comp_is_lock_screen_window(bd) ) return EINA_FALSE; + if ( _e_mod_comp_is_indicator_window(bd) ) return EINA_FALSE; + if ( _e_mod_comp_is_isf_main_window(bd) ) return EINA_FALSE; + if ( _e_mod_comp_is_isf_sub_window(bd) ) return EINA_FALSE; + if ( _e_mod_comp_is_normal_window(bd) ) return EINA_FALSE; + if ( _e_mod_comp_is_tooltip_window(bd) ) return EINA_FALSE; + if ( _e_mod_comp_is_combo_window(bd) ) return EINA_FALSE; + if ( _e_mod_comp_is_dnd_window(bd) ) return EINA_FALSE; + if ( _e_mod_comp_is_desktop_window(bd) ) return EINA_FALSE; + if ( _e_mod_comp_is_toolbar_window(bd) ) return EINA_FALSE; + if ( _e_mod_comp_is_menu_window(bd) ) return EINA_FALSE; + if ( _e_mod_comp_is_splash_window(bd) ) return EINA_FALSE; + if ( _e_mod_comp_is_drop_down_menu_window(bd) ) return EINA_FALSE; + if ( _e_mod_comp_is_notification_window(bd) ) return EINA_FALSE; + if ( _e_mod_comp_is_utility_window(bd) ) return EINA_FALSE; + if ( _e_mod_comp_is_popup_menu_window(bd) ) return EINA_FALSE; + if ( _e_mod_comp_is_dialog_window(bd) ) return EINA_FALSE; + if (_e_mod_comp_is_live_magazine_window(bd)) return EINA_FALSE; + return EINA_TRUE; +} + +Eina_Bool +_e_mod_comp_is_application_close(E_Border *bd) +{ + if (!bd) return EINA_FALSE; + if ( _e_mod_comp_is_quickpanel_window(bd) ) return EINA_FALSE; + if ( _e_mod_comp_is_task_manager_window(bd) ) return EINA_FALSE; + if ( _e_mod_comp_is_lock_screen_window(bd) ) return EINA_FALSE; + if ( _e_mod_comp_is_indicator_window(bd) ) return EINA_FALSE; + if ( _e_mod_comp_is_isf_main_window(bd) ) return EINA_FALSE; + if ( _e_mod_comp_is_isf_sub_window(bd) ) return EINA_FALSE; + if ( _e_mod_comp_is_normal_window(bd) ) return EINA_FALSE; + if ( _e_mod_comp_is_tooltip_window(bd) ) return EINA_FALSE; + if ( _e_mod_comp_is_combo_window(bd) ) return EINA_FALSE; + if ( _e_mod_comp_is_dnd_window(bd) ) return EINA_FALSE; + if ( _e_mod_comp_is_desktop_window(bd) ) return EINA_FALSE; + if ( _e_mod_comp_is_toolbar_window(bd) ) return EINA_FALSE; + if ( _e_mod_comp_is_menu_window(bd) ) return EINA_FALSE; + if ( _e_mod_comp_is_splash_window(bd) ) return EINA_FALSE; + if ( _e_mod_comp_is_drop_down_menu_window(bd) ) return EINA_FALSE; + if ( _e_mod_comp_is_notification_window(bd) ) return EINA_FALSE; + if ( _e_mod_comp_is_utility_window(bd) ) return EINA_FALSE; + if ( _e_mod_comp_is_popup_menu_window(bd) ) return EINA_FALSE; + if ( _e_mod_comp_is_dialog_window(bd) ) return EINA_FALSE; + if (_e_mod_comp_is_live_magazine_window(bd)) return EINA_FALSE; + return EINA_TRUE; +} + +void _e_mod_comp_window_effect_policy( E_Comp_Win *cw ) +{ + unsigned int effect_enable = 0; + int num = 0; + Ecore_X_Atom *atoms = NULL; + Ecore_X_Window win; + + unsigned int val = 0; + int ret = -1; + + if ( cw->bd) + win = cw->bd->client.win; + else + win = cw->win; + + ret = ecore_x_window_prop_card32_get(win, ATOM_WINDOW_EFFECT_ENABLE, &val, 1); + if ( ret != -1 ) + { + cw->animatable = val; + } + else + { + effect_enable = 1; + cw->animatable = effect_enable; + ecore_x_window_prop_card32_set(win, ATOM_WINDOW_EFFECT_ENABLE, &effect_enable, 1); + } + + num = ecore_x_window_prop_atom_list_get(win, ATOM_WINDOW_EFFECT_TYPE, &atoms); + if ( num != 6 ) + { + Ecore_X_Atom window_effect_type_list[] = {ATOM_EFFECT_DEFAULT,ATOM_EFFECT_DEFAULT,ATOM_EFFECT_DEFAULT,ATOM_EFFECT_DEFAULT,ATOM_EFFECT_DEFAULT,ATOM_EFFECT_DEFAULT}; + + cw->show_effect = COMP_EFFECT_DEFAULT; + cw->hide_effect = COMP_EFFECT_DEFAULT; + cw->restack_effect = COMP_EFFECT_DEFAULT; + cw->rotation_effect = COMP_EFFECT_DEFAULT; + cw->focusin_effect = COMP_EFFECT_DEFAULT; + cw->focusout_effect = COMP_EFFECT_DEFAULT; + + ecore_x_window_prop_atom_set(win,ATOM_WINDOW_EFFECT_TYPE, window_effect_type_list , 6 ); + } + else + { + cw->show_effect = _e_mod_comp_get_effect_type(&atoms[0]); + cw->hide_effect = _e_mod_comp_get_effect_type(&atoms[1]); + cw->restack_effect = _e_mod_comp_get_effect_type(&atoms[2]); + cw->rotation_effect = _e_mod_comp_get_effect_type(&atoms[3]); + cw->focusin_effect = _e_mod_comp_get_effect_type(&atoms[4]); + cw->focusout_effect = _e_mod_comp_get_effect_type(&atoms[5]); + } + + if ( num > 0 ) free(atoms); +} + +Eina_Bool +_e_mod_comp_window_restack_policy(E_Comp_Win *cw, + E_Comp_Win *cw2) +{ + if ( cw == NULL || cw2 == NULL ) return EINA_FALSE; + + if (!(cw->c->animatable) + || !(cw->visible) + || !(cw2->visible) + || !(cw->animatable) + || (cw->restack_effect == COMP_EFFECT_NONE) + || !(cw->x == 0 && cw->y == 0 + && cw->w == cw->c->man->w + && cw->h == cw->c->man->h) + ) + { + return EINA_FALSE; + } + + E_Comp_Win *tp = _e_mod_comp_win_transient_parent_find(cw); + E_Comp_Win *tp2 = _e_mod_comp_win_transient_parent_find(cw2); + if ((tp) && (tp2) && (tp->win == tp2->win)) + { + return EINA_FALSE; + } + + if (!_e_mod_comp_is_isf_main_window(cw->bd) + && !_e_mod_comp_is_isf_sub_window(cw->bd) + && !_e_mod_comp_is_utility_window(cw->bd) + && !_e_mod_comp_is_indicator_window(cw->bd) + && !_e_mod_comp_is_indicator_window(cw2->bd) + && !_e_mod_comp_is_tooltip_window(cw->bd) + && !_e_mod_comp_is_combo_window(cw->bd) + && !_e_mod_comp_is_dnd_window(cw->bd) + && !_e_mod_comp_is_popup_menu_window(cw->bd) + && !_e_mod_comp_is_normal_window(cw->bd) + && !_e_mod_comp_is_quickpanel_window(cw->bd)) + { + return EINA_TRUE; + } + + return EINA_FALSE; +} + +Eina_Bool _e_mod_comp_window_rotation_policy( E_Comp_Win *cw ) +{ + + Eina_Bool supported_group = EINA_TRUE; + const char *file = NULL; + const char *group = NULL; + + if (!cw) return EINA_FALSE; + + edje_object_file_get(cw->shobj, &file, &group); + if ( ( strcmp(group, "shadow_fade") != 0 ) + && ( strcmp(group, "shadow_twist") !=0 ) ) + { + supported_group = EINA_FALSE; + } + + if ( ( cw->visible ) && ( cw->bd ) && ( supported_group == EINA_TRUE ) + && ( _e_mod_comp_win_check_visible(cw) == EINA_TRUE ) + + && ( cw->animatable == EINA_TRUE ) + && ( cw->rotation_effect != COMP_EFFECT_NONE ) + + && ( evas_object_visible_get(cw->shobj) == EINA_TRUE ) + && ( _e_mod_comp_is_indicator_window(cw->bd) == EINA_FALSE ) + && ( _e_mod_comp_is_isf_main_window(cw->bd) == EINA_FALSE ) + && ( _e_mod_comp_is_isf_sub_window(cw->bd) == EINA_FALSE ) + && ( _e_mod_comp_is_quickpanel_window(cw->bd) == EINA_FALSE ) + && ( _e_mod_comp_is_normal_window(cw->bd) == EINA_FALSE ) + && ( _e_mod_comp_is_task_manager_window(cw->bd) == EINA_FALSE ) + && ( _e_mod_comp_is_lock_screen_window(cw->bd) == EINA_FALSE ) + && ( _e_mod_comp_is_tooltip_window(cw->bd) == EINA_FALSE ) + && ( _e_mod_comp_is_combo_window(cw->bd) == EINA_FALSE ) + && ( _e_mod_comp_is_dnd_window(cw->bd) == EINA_FALSE ) + && ( _e_mod_comp_is_popup_menu_window(cw->bd) == EINA_FALSE ) + && ( _e_mod_comp_is_utility_window(cw->bd) == EINA_FALSE ) + && ( _e_mod_comp_is_dialog_window(cw->bd) == EINA_FALSE ) + && ( cw->c->animatable == EINA_TRUE) ) + { + return EINA_TRUE; + } + else + { + return EINA_FALSE; + } +} + +int +_e_mod_comp_shadow_policy( E_Comp_Win *cw ) +{ + int ok = 0; + + if ( cw == NULL ) return ok; + else + { + if (_e_mod_comp_is_quickpanel_window(cw->bd)) ok = edje_object_file_set(cw->shobj, _comp_mod->conf->shadow_file, "no-effect" ); + else if (_e_mod_comp_is_task_manager_window(cw->bd)) ok = edje_object_file_set(cw->shobj, _comp_mod->conf->shadow_file, "taskmgr" ); + else if (_e_mod_comp_is_lock_screen_window(cw->bd)) ok = edje_object_file_set(cw->shobj, _comp_mod->conf->shadow_file, "lockscreen" ); + else if (_e_mod_comp_is_indicator_window(cw->bd)) ok = edje_object_file_set(cw->shobj, _comp_mod->conf->shadow_file, "indicator" ); + else if (_e_mod_comp_is_isf_main_window(cw->bd)) ok = edje_object_file_set(cw->shobj, _comp_mod->conf->shadow_file, "shadow" ); + else if (_e_mod_comp_is_isf_sub_window(cw->bd)) ok = edje_object_file_set(cw->shobj, _comp_mod->conf->shadow_file, "shadow" ); + else if (_e_mod_comp_is_normal_window(cw->bd)) ok = edje_object_file_set(cw->shobj, _comp_mod->conf->shadow_file, "shadow" ); + else if (_e_mod_comp_is_tooltip_window(cw->bd)) ok = edje_object_file_set(cw->shobj, _comp_mod->conf->shadow_file, "shadow" ); + else if (_e_mod_comp_is_combo_window(cw->bd)) ok = edje_object_file_set(cw->shobj, _comp_mod->conf->shadow_file, "no-effect" ); + else if (_e_mod_comp_is_dnd_window(cw->bd)) ok = edje_object_file_set(cw->shobj, _comp_mod->conf->shadow_file, "no-effect" ); + else if (_e_mod_comp_is_desktop_window(cw->bd)) ok = edje_object_file_set(cw->shobj, _comp_mod->conf->shadow_file, "no-effect" ); + else if (_e_mod_comp_is_toolbar_window(cw->bd)) ok = edje_object_file_set(cw->shobj, _comp_mod->conf->shadow_file, "no-effect" ); + else if (_e_mod_comp_is_menu_window(cw->bd)) ok = edje_object_file_set(cw->shobj, _comp_mod->conf->shadow_file, "no-effect" ); + else if (_e_mod_comp_is_splash_window(cw->bd)) ok = edje_object_file_set(cw->shobj, _comp_mod->conf->shadow_file, "no-effect" ); + else if (_e_mod_comp_is_drop_down_menu_window(cw->bd)) ok = edje_object_file_set(cw->shobj, _comp_mod->conf->shadow_file, "no-effect" ); + else if (_e_mod_comp_is_notification_window(cw->bd)) ok = edje_object_file_set(cw->shobj, _comp_mod->conf->shadow_file, "dialog" ); + else if (_e_mod_comp_is_utility_window(cw->bd)) ok = edje_object_file_set(cw->shobj, _comp_mod->conf->shadow_file, "no-effect" ); + else if (_e_mod_comp_is_popup_menu_window(cw->bd)) ok = edje_object_file_set(cw->shobj, _comp_mod->conf->shadow_file, "shadow" ); + else if (_e_mod_comp_is_dialog_window(cw->bd)) ok = edje_object_file_set(cw->shobj, _comp_mod->conf->shadow_file, "dialog" ); + else ok = edje_object_file_set(cw->shobj, _comp_mod->conf->shadow_file, "shadow_twist"); + } + return ok; +} + diff --git a/comp-slp/src/e_mod_comp_rotation.c b/comp-slp/src/e_mod_comp_rotation.c new file mode 100644 index 0000000..9ad76b3 --- /dev/null +++ b/comp-slp/src/e_mod_comp_rotation.c @@ -0,0 +1,402 @@ +#include "e.h" +#include "e_mod_main.h" +#include "e_mod_comp_update.h" +#include "e_mod_comp_rotation.h" +#include "config.h" + +#include +#include + +struct _E_Comp_Rotation +{ + unsigned int angle; + Evas_Object *shobj; + Evas_Object *obj; + Ecore_X_Pixmap pixmap; + Ecore_X_Damage damage; + int pw, ph; + Eina_Bool force; + Eina_Bool defer_show; + Eina_Bool defer_hide; + Eina_Bool angle_changed; +}; + +E_Comp_Rotation * +e_mod_comp_rotation_new(void) +{ + E_Comp_Rotation *rot = NULL; + rot = calloc(1, sizeof(E_Comp_Rotation)); + return rot; +} + +void +e_mod_comp_rotation_free(E_Comp_Rotation *rot) +{ + if (rot) free(rot); +} + +Eina_Bool +e_mod_comp_rotation_begin(E_Comp_Rotation *rot) +{ + if (!rot) return EINA_FALSE; + return EINA_TRUE; +} + +void +e_mod_comp_rotation_show_effect(E_Comp_Rotation *rot) +{ + if (!rot) return; + switch (rot->angle) + { + case 0: edje_object_signal_emit(rot->shobj, "e,state,visible,on", "e.rot.0" ); break; + case 90: edje_object_signal_emit(rot->shobj, "e,state,visible,on", "e.rot.90" ); break; + case 180: edje_object_signal_emit(rot->shobj, "e,state,visible,on", "e.rot.180"); break; + case 270: edje_object_signal_emit(rot->shobj, "e,state,visible,on", "e.rot.270"); break; + default: + break; + } + + rot->angle_changed = EINA_FALSE; +} + +void +e_mod_comp_rotation_end_effect(E_Comp_Rotation *rot) +{ + if (!rot) return; + switch (rot->angle) + { + case 0: edje_object_signal_emit(rot->shobj, "e,state,visible,off", "e.rot.0" ); break; + case 90: edje_object_signal_emit(rot->shobj, "e,state,visible,off", "e.rot.90" ); break; + case 180: edje_object_signal_emit(rot->shobj, "e,state,visible,off", "e.rot.180"); break; + case 270: edje_object_signal_emit(rot->shobj, "e,state,visible,off", "e.rot.270"); break; + default: + break; + } +} + +void +e_mod_comp_rotation_request_effect(E_Comp_Rotation *rot) +{ + if (!rot) return; + switch (rot->angle) + { + case 0: edje_object_signal_emit(rot->shobj, "e,state,rotation,on", "e.rot.0" ); break; + case 90: edje_object_signal_emit(rot->shobj, "e,state,rotation,on", "e.rot.90" ); break; + case 180: edje_object_signal_emit(rot->shobj, "e,state,rotation,on", "e.rot.180"); break; + case 270: edje_object_signal_emit(rot->shobj, "e,state,rotation,on", "e.rot.270"); break; + default: + break; + } + + rot->angle_changed = EINA_FALSE; +} + +Eina_Bool +e_mod_comp_rotation_end(E_Comp_Rotation *rot) +{ + if (!rot) return EINA_FALSE; + + rot->obj = NULL; + rot->shobj = NULL; + + if (rot->pixmap) + { + // Never free the proxy pixmap which is created and removed by the client. + // ecore_x_pixmap_free(rot->pixmap); + rot->pixmap = 0; + rot->pw = 0; + rot->ph = 0; + } + + if (rot->damage) + { + ecore_x_damage_subtract(rot->damage, 0, 0); + ecore_x_damage_free(rot->damage); + rot->damage = 0; + } + + return EINA_TRUE; +} + + +Eina_Bool +e_mod_comp_rotation_request(E_Comp_Rotation* rot, + Ecore_X_Event_Client_Message *ev, + Evas *evas, + Evas_Object *shobj, + Evas_Object *obj, + Ecore_X_Visual win_vis, + int win_x __UNUSED__, int win_y __UNUSED__, + int win_w, int win_h ) +{ + unsigned int angle; + Ecore_X_Pixmap pixmap; + Ecore_X_Damage damage; + int pw, ph; + + if (!rot || !ev || !evas || !shobj || !obj || win_w <= 0 || win_h <= 0) + { + fprintf(stderr, "[E17-comp] %s() failed. invalid args. " \ + "rot:%p ev:%p evas:%p shobj:%p obj:%p %dx%d\n", + __func__, rot, ev, evas, shobj, obj, win_w, win_h); + return EINA_FALSE; + } + + // -------------------------------------------------------------- + // check angle and pixmap + // -------------------------------------------------------------- + angle = (unsigned int)ev->data.l[0]; + if ((angle % 90) || ((angle / 90) >= 4)) + { + fprintf(stderr, "[E17-comp] invalid angle:%d\n", angle); + return EINA_FALSE; + } + + // -------------------------------------------------------------- + // create proxy pixmap stuffs + // -------------------------------------------------------------- + pixmap = (Ecore_X_Pixmap)ev->data.l[1]; + + if (pixmap == None) + { + fprintf(stderr, "[E17-comp] %s() invalid pixmap:NULL\n", __func__ ); + return EINA_FALSE; + } + + ecore_x_pixmap_geometry_get(pixmap, NULL, NULL, &pw, &ph); + + if ((angle == rot->angle) && (pixmap == rot->pixmap)) + { + return EINA_TRUE; + } + + damage = ecore_x_damage_new(pixmap, ECORE_X_DAMAGE_REPORT_DELTA_RECTANGLES); + + // -------------------------------------------------------------- + // swallow evas obj + // -------------------------------------------------------------- + int res = edje_object_part_swallow(shobj, "e.swallow.content", obj); + if (!res) + { + // TODO: release evas objs + fprintf(stdout, "[E17-comp] pixmap:0x%08x swallow failed.\n", pixmap); + return EINA_FALSE; + } + + if ((angle == 90) || (angle == 270)) + evas_object_image_size_set(obj, win_h, win_w); + else if ((angle == 0) || (angle == 180)) + evas_object_image_size_set(obj, win_w, win_h); + + evas_object_image_native_surface_set(obj, NULL); + + Evas_Native_Surface ns; + ns.version = EVAS_NATIVE_SURFACE_VERSION; + ns.type = EVAS_NATIVE_SURFACE_X11; + ns.data.x11.visual = win_vis; + ns.data.x11.pixmap = pixmap; + evas_object_image_native_surface_set(obj, &ns); + + + // -------------------------------------------------------------- + // setup + // -------------------------------------------------------------- + if (rot->pixmap) + { + // Never free the proxy pixmap which is created and removed by the client. + // ecore_x_pixmap_free(rot->pixmap); + rot->pixmap = 0; + rot->pw = 0; + rot->ph = 0; + } + + if (rot->damage) + { + ecore_x_damage_subtract(rot->damage, 0, 0); + ecore_x_damage_free(rot->damage); + rot->damage = 0; + } + + // TODO: if shobj already exists ?? + rot->angle = angle; + rot->shobj = shobj; + rot->obj = obj; + rot->pixmap = pixmap; + rot->damage = damage; + rot->pw = pw; + rot->ph = ph; + rot->angle_changed = EINA_TRUE; + + return EINA_TRUE; +} + +Eina_Bool +e_mod_comp_rotation_damage(E_Comp_Rotation *rot) +{ + if (!rot || !rot->damage) return EINA_FALSE; + ecore_x_damage_subtract(rot->damage, 0, 0); + return EINA_TRUE; +} + +Eina_Bool +e_mod_comp_rotation_resize(E_Comp_Rotation *rot, + Evas *evas, + Evas_Object *shobj, + Evas_Object *obj, + Ecore_X_Visual win_vis, + int win_x __UNUSED__, int win_y __UNUSED__, + int win_w, int win_h ) +{ + unsigned int angle; + Ecore_X_Pixmap pixmap; + Ecore_X_Damage damage; + int pw, ph; + + if (!rot || !evas || !shobj || !obj || win_w <= 0 || win_h <= 0) + { + fprintf(stderr, "[E17-comp] %s() failed. invalid args. " \ + "rot:%p evas:%p shobj:%p obj:%p %dx%d\n", + __func__, rot, evas, shobj, obj, win_w, win_h); + return EINA_FALSE; + } + + angle = rot->angle; + pixmap = rot->pixmap; + ecore_x_pixmap_geometry_get(pixmap, NULL, NULL, &pw, &ph); + damage = ecore_x_damage_new(pixmap, ECORE_X_DAMAGE_REPORT_DELTA_RECTANGLES); + + // -------------------------------------------------------------- + // swallow evas obj + // -------------------------------------------------------------- + int res = edje_object_part_swallow(shobj, "e.swallow.content", obj); + if (!res) + { + // TODO: release evas objs + fprintf(stdout, "[E17-comp] pixmap:0x%08x swallow failed.\n", pixmap); + return EINA_FALSE; + } + + evas_object_image_native_surface_set(obj, NULL); + + if ((angle == 90) || (angle == 270)) evas_object_image_size_set(obj, win_h, win_w); + else if ((angle == 0) || (angle == 180)) evas_object_image_size_set(obj, win_w, win_h); + + + Evas_Native_Surface ns; + ns.version = EVAS_NATIVE_SURFACE_VERSION; + ns.type = EVAS_NATIVE_SURFACE_X11; + ns.data.x11.visual = win_vis; + ns.data.x11.pixmap = pixmap; + evas_object_image_native_surface_set(obj, &ns); + evas_object_image_data_update_add(obj, 0, 0, win_w, win_h); + + + // -------------------------------------------------------------- + // setup + // -------------------------------------------------------------- + if (rot->damage) + { + ecore_x_damage_subtract(rot->damage, 0, 0); + ecore_x_damage_free(rot->damage); + rot->damage = 0; + } + + rot->angle = angle; + rot->shobj = shobj; + rot->obj = obj; + rot->pixmap = pixmap; + rot->damage = damage; + rot->pw = pw; + rot->ph = ph; + rot->angle_changed = EINA_TRUE; + + return EINA_TRUE; +} + +Eina_Bool +e_mod_comp_rotation_update(E_Comp_Rotation *rot, + E_Update *up, + int win_x, int win_y, + int win_w, int win_h, + int border_w ) +{ + E_Update_Rect *r; + + if (!rot || !up || win_w <= 0 || win_h <= 0) + { + fprintf(stderr, "%s(%d) invalid args. rot:%p up:%p win_w:%d win_h:%d\n", + __func__, __LINE__, rot, up, win_w, win_h); + return EINA_FALSE; + } + + evas_object_move(rot->shobj, win_x, win_y); + evas_object_resize(rot->shobj, + win_w + (border_w * 2), + win_h + (border_w * 2)); + + r = e_mod_comp_update_rects_get(up); + if (r) + { + e_mod_comp_update_clear(up); + evas_object_image_data_update_add(rot->obj, win_x, win_y, win_w, win_h); + free(r); + } + else + return EINA_FALSE; + + return EINA_TRUE; +} + +Ecore_X_Damage +e_mod_comp_rotation_get_damage(E_Comp_Rotation *rot) +{ + if (!rot) return 0; + return rot->damage; +} + +Evas_Object * +e_mod_comp_rotation_get_shobj(E_Comp_Rotation *rot) +{ + if (!rot) return NULL; + return rot->shobj; +} + +unsigned int +e_mod_comp_rotation_get_angle(E_Comp_Rotation *rot) +{ + if (!rot) return 0; + return rot->angle; +} + +Eina_Bool +e_mod_comp_rotation_angle_is_changed(E_Comp_Rotation *rot) +{ + if (!rot) return EINA_FALSE; + return rot->angle_changed; +} + +Eina_Bool +e_mod_comp_rotation_done_send(Ecore_X_Window win, + Ecore_X_Atom type) +{ + static Ecore_X_Display *dpy = NULL; + XEvent xev; + + if (!dpy) dpy = ecore_x_display_get(); + + xev.xclient.type = ClientMessage; + xev.xclient.display = dpy; + xev.xclient.window = win; + xev.xclient.message_type = type; + xev.xclient.format = 32; + xev.xclient.data.l[0] = win; + xev.xclient.data.l[1] = 0; + xev.xclient.data.l[2] = 0; + xev.xclient.data.l[3] = 0; + xev.xclient.data.l[4] = 0; + + XSendEvent(dpy, win, False, + NoEventMask, + &xev); + return EINA_TRUE; +} diff --git a/comp-slp/src/e_mod_comp_rotation.h b/comp-slp/src/e_mod_comp_rotation.h new file mode 100644 index 0000000..f29702b --- /dev/null +++ b/comp-slp/src/e_mod_comp_rotation.h @@ -0,0 +1,45 @@ +#ifdef E_TYPEDEFS +#else +#ifndef E_MOD_COMP_ROTATION_H +#define E_MOD_COMP_ROTATION_H + +typedef struct _E_Comp_Rotation E_Comp_Rotation; + +E_Comp_Rotation *e_mod_comp_rotation_new (void); +void e_mod_comp_rotation_free (E_Comp_Rotation *rot); +Eina_Bool e_mod_comp_rotation_begin (E_Comp_Rotation *rot); +Eina_Bool e_mod_comp_rotation_end (E_Comp_Rotation *rot); +Eina_Bool e_mod_comp_rotation_request (E_Comp_Rotation* rot, + Ecore_X_Event_Client_Message *ev, + Evas *evas, + Evas_Object *shobj, + Evas_Object *obj, + Ecore_X_Visual win_vis, + int win_x, int win_y, + int win_w, int win_h ); +Eina_Bool e_mod_comp_rotation_damage (E_Comp_Rotation *rot); +Eina_Bool e_mod_comp_rotation_update (E_Comp_Rotation *rot, + E_Update *up, + int win_x, int win_y, + int win_w, int win_h, + int border_w ); +Eina_Bool e_mod_comp_rotation_resize (E_Comp_Rotation *rot, + Evas *evas, + Evas_Object *shobj, + Evas_Object *obj, + Ecore_X_Visual win_vis, + int win_x, int win_y, + int win_w, int win_h ); +Ecore_X_Damage e_mod_comp_rotation_get_damage (E_Comp_Rotation *rot); +Evas_Object *e_mod_comp_rotation_get_shobj (E_Comp_Rotation *rot); +unsigned int e_mod_comp_rotation_get_angle (E_Comp_Rotation *rot); +Eina_Bool e_mod_comp_rotation_angle_is_changed (E_Comp_Rotation *rot); + +Eina_Bool e_mod_comp_rotation_done_send (Ecore_X_Window win, Ecore_X_Atom type); + +void e_mod_comp_rotation_show_effect (E_Comp_Rotation *rot); +void e_mod_comp_rotation_end_effect (E_Comp_Rotation *rot); +void e_mod_comp_rotation_request_effect (E_Comp_Rotation *rot); + +#endif +#endif diff --git a/comp-slp/src/e_mod_comp_update.c b/comp-slp/src/e_mod_comp_update.c new file mode 100644 index 0000000..e52d7b0 --- /dev/null +++ b/comp-slp/src/e_mod_comp_update.c @@ -0,0 +1,225 @@ +#include "e.h" +#include "e_mod_main.h" +#include "e_mod_comp_update.h" + +static void +_e_mod_comp_tiles_alloc(E_Update *up) +{ + if (up->tiles) return; + up->tiles = calloc(up->tw * up->th, sizeof(unsigned char)); +} + +E_Update * +e_mod_comp_update_new(void) +{ + E_Update *up; + + up = calloc(1, sizeof(E_Update)); + up->tsw = 32; + up->tsh = 32; + up->pol = E_UPDATE_POLICY_RAW; + return up; +} + +void +e_mod_comp_update_free(E_Update *up) +{ + if (!up) return; + if (up->tiles) free(up->tiles); + free(up); +} + +void +e_mod_comp_update_policy_set(E_Update *up, E_Update_Policy pol) +{ + up->pol = pol; +} + +void +e_mod_comp_update_tile_size_set(E_Update *up, int tsw, int tsh) +{ + if ((up->tsw == tsw) && (up->tsh == tsh)) return; + up->tsw = tsw; + up->tsh = tsh; + e_mod_comp_update_clear(up); +} + +void +e_mod_comp_update_resize(E_Update *up, int w, int h) +{ + unsigned char *ptiles = up->tiles, *p, *pp; + int ptw, pth, x, y; + + if ((up->w == w) && (up->h == h)) return; + + ptw = up->tw; + pth = up->th; + ptiles = up->tiles; + + up->w = w; + up->h = h; + up->tw = (up->w + up->tsw - 1) / up->tsw; + up->th = (up->h + up->tsh - 1) / up->tsh; + up->tiles = NULL; + _e_mod_comp_tiles_alloc(up); + if ((ptiles) && (up->tiles)) + { + if (pth <= up->th) + { + for (y = 0; y < pth; y++) + { + p = up->tiles + (y * up->tw); + pp = ptiles + (y * ptw); + if (ptw <= up->tw) for (x = 0; x < ptw; x++) *p++ = *pp++; + else for (x = 0; x < up->tw; x++) *p++ = *pp++; + } + } + else + { + for (y = 0; y < up->th; y++) + { + p = up->tiles + (y * up->tw); + pp = ptiles + (y * ptw); + if (ptw <= up->tw) for (x = 0; x < ptw; x++) *p++ = *pp++; + else for (x = 0; x < up->tw; x++) *p++ = *pp++; + } + } + } + free(ptiles); +} + +void +e_mod_comp_update_add(E_Update *up, int x, int y, int w, int h) +{ + int tx, ty, txx, tyy, xx, yy; + unsigned char *t, *t2; + + if ((w <= 0) || (h <= 0)) return; + if ((up->tw <= 0) || (up->th <= 0)) return; + + _e_mod_comp_tiles_alloc(up); + + E_RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, up->w, up->h); + if ((w <= 0) || (h <= 0)) return; + + switch (up->pol) + { + case E_UPDATE_POLICY_RAW: + break; + case E_UPDATE_POLICY_HALF_WIDTH_OR_MORE_ROUND_UP_TO_FULL_WIDTH: + if (w > (up->w / 2)) + { + x = 0; + w = up->w; + } + break; + default: + break; + } + + tx = x / up->tsw; + ty = y / up->tsh; + txx = (x + w - 1) / up->tsw; + tyy = (y + h - 1) / up->tsh; + t = up->tiles + (ty * up->tw) + tx; + for (yy = ty; yy <= tyy; yy++) + { + t2 = t; + for (xx = tx; xx <= txx; xx++) + { + *t2 = 1; + t2++; + } + t += up->tw; + } +} + +E_Update_Rect * +e_mod_comp_update_rects_get(E_Update *up) +{ + E_Update_Rect *r; + int ri = 0; + int x, y; + unsigned char *t, *t2, *t3; + + if (!up->tiles) return NULL; + r = calloc((up->tw * up->th) + 1, sizeof(E_Update_Rect)); + if (!r) return NULL; + t = up->tiles; + for (y = 0; y < up->th; y++) + { + for (x = 0; x < up->tw; x++) + { + if (*t) + { + int can_expand_x = 1, can_expand_y = 1; + int xx = 0, yy = 0; + + t2 = t + 1; + while (can_expand_x) + { + xx++; + if ((x + xx) >= up->tw) can_expand_x = 0; + else if (!*t2) can_expand_x = 0; + if (can_expand_x) *t2 = 0; + t2++; + } + t3 = t; + while (can_expand_y) + { + int i; + + yy++; + t3 += up->tw; + if ((y + yy) >= up->th) can_expand_y = 0; + if (can_expand_y) + { + t2 = t3; + for (i = 0; i < xx; i++) + { + if (!*t2) + { + can_expand_y = 0; + break; + } + t2++; + } + } + if (can_expand_y) + { + t2 = t3; + for (i = 0; i < xx; i++) + { + *t2 = 0; + t2++; + } + } + } + *t = 0; + r[ri].x = x * up->tsw; + r[ri].y = y * up->tsh; + r[ri].w = xx * up->tsw; + r[ri].h = yy * up->tsh; + if ((r[ri].x + r[ri].w) > up->w) r[ri].w = up->w - r[ri].x; + if ((r[ri].y + r[ri].h) > up->h) r[ri].h = up->h - r[ri].y; + if ((r[ri].w <= 0) || (r[ri].h <= 0)) r[ri].w = 0; + else ri++; + x += xx - 1; + t += xx - 1; + } + t++; + } + } + return r; +} + +void +e_mod_comp_update_clear(E_Update *up) +{ + if (up->tiles) + { + free(up->tiles); + up->tiles = NULL; + } +} + diff --git a/comp-slp/src/e_mod_comp_update.h b/comp-slp/src/e_mod_comp_update.h new file mode 100644 index 0000000..a26d681 --- /dev/null +++ b/comp-slp/src/e_mod_comp_update.h @@ -0,0 +1,38 @@ +#ifdef E_TYPEDEFS +#else +#ifndef E_MOD_COMP_UPDATE_H +#define E_MOD_COMP_UPDATE_H + +typedef struct _E_Update E_Update; +typedef struct _E_Update_Rect E_Update_Rect; +typedef enum _E_Update_Policy +{ + E_UPDATE_POLICY_RAW, + E_UPDATE_POLICY_HALF_WIDTH_OR_MORE_ROUND_UP_TO_FULL_WIDTH, +} E_Update_Policy; + +struct _E_Update_Rect +{ + int x, y, w, h; +}; + +struct _E_Update +{ + int w, h; + int tw, th; + int tsw, tsh; + unsigned char *tiles; + E_Update_Policy pol; +}; + +E_Update *e_mod_comp_update_new (void); +void e_mod_comp_update_free (E_Update *up); +void e_mod_comp_update_policy_set (E_Update *up, E_Update_Policy pol); +void e_mod_comp_update_tile_size_set (E_Update *up, int tsw, int tsh); +void e_mod_comp_update_resize (E_Update *up, int w, int h); +void e_mod_comp_update_add (E_Update *up, int x, int y, int w, int h); +E_Update_Rect *e_mod_comp_update_rects_get (E_Update *up); +void e_mod_comp_update_clear (E_Update *up); + +#endif +#endif diff --git a/comp-slp/src/e_mod_config.c b/comp-slp/src/e_mod_config.c new file mode 100644 index 0000000..8df43f1 --- /dev/null +++ b/comp-slp/src/e_mod_config.c @@ -0,0 +1,1257 @@ +#include "e.h" +#include "e_mod_main.h" +#include "e_mod_config.h" +#include "e_mod_comp.h" + +typedef struct _E_Demo_Style_Item +{ + Evas_Object *preview; + Evas_Object *frame; + Evas_Object *livethumb; + Evas_Object *layout; + Evas_Object *border; + Evas_Object *client; +} E_Demo_Style_Item; + +typedef struct _Match_Config +{ + Match match; + E_Config_Dialog *cfd; + char *title, *name, *clas, *role; + int borderless, dialog, accepts_focus, vkbd, quickpanel, argb, fullscreen, modal; +} Match_Config; + +struct _E_Config_Dialog_Data +{ + int use_shadow; + int engine; + int indirect; + int texture_from_pixmap; + int smooth_windows; + int lock_fps; + int efl_sync; + int loose_sync; + int grab; + int vsync; + + const char *shadow_style; + + struct { + Eina_List *popups; + Eina_List *borders; + Eina_List *overrides; + Eina_List *menus; + int changed; + } match; + + Evas_Object *popups_il; + Evas_Object *borders_il; + Evas_Object *overrides_il; + Evas_Object *menus_il; + + Evas_Object *edit_il; + + int keep_unmapped; + int max_unmapped_pixels; + int max_unmapped_time; + int min_unmapped_time; + int send_flush; + int send_dump; + int nocomp_fs; + int fps_show; + int fps_corner; + int fps_average_range; +}; + + +/* Protos */ +static void *_create_data (E_Config_Dialog *cfd); +static void _free_data (E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata); +static Evas_Object *_basic_create_widgets (E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata); +static int _basic_apply_data (E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata); + +E_Config_Dialog * +e_int_config_comp_module(E_Container *con, const char *params __UNUSED__) +{ + E_Config_Dialog *cfd; + E_Config_Dialog_View *v; + char buf[4096]; + Mod *mod = _comp_mod; + + if (e_config_dialog_find("E", "appearance/comp")) return NULL; + v = E_NEW(E_Config_Dialog_View, 1); + + v->create_cfdata = _create_data; + v->free_cfdata = _free_data; + v->basic.apply_cfdata = _basic_apply_data; + v->basic.create_widgets = _basic_create_widgets; + + snprintf(buf, sizeof(buf), "%s/e-module-comp-slp.edj", + e_module_dir_get(mod->module)); + cfd = e_config_dialog_new(con, + _("Composite Settings"), + "E", "appearance/comp", + buf, 0, v, mod); + mod->config_dialog = cfd; + return cfd; +} + +static void +_match_dup(Match *m, Match_Config *m2) +{ + m2->match = *m; + if (m2->match.title) m2->match.title = eina_stringshare_add(m2->match.title); + if (m2->match.name) m2->match.name = eina_stringshare_add(m2->match.name); + if (m2->match.clas) m2->match.clas = eina_stringshare_add(m2->match.clas); + if (m2->match.role) m2->match.role = eina_stringshare_add(m2->match.role); + if (m2->match.shadow_style) m2->match.shadow_style = eina_stringshare_add(m2->match.shadow_style); +} + +static void * +_create_data(E_Config_Dialog *cfd) +{ + E_Config_Dialog_Data *cfdata; + Eina_List *l; + Match *m; + Match_Config *m2; + + cfdata = E_NEW(E_Config_Dialog_Data, 1); + + cfdata->use_shadow = _comp_mod->conf->use_shadow; + cfdata->engine = _comp_mod->conf->engine; + if ((cfdata->engine != E_EVAS_ENGINE_SOFTWARE_X11) && + (cfdata->engine != E_EVAS_ENGINE_GL_X11)) + cfdata->engine = E_EVAS_ENGINE_SOFTWARE_X11; + cfdata->indirect = _comp_mod->conf->indirect; + cfdata->texture_from_pixmap = _comp_mod->conf->texture_from_pixmap; + cfdata->smooth_windows = _comp_mod->conf->smooth_windows; + cfdata->lock_fps = _comp_mod->conf->lock_fps; + cfdata->efl_sync = _comp_mod->conf->efl_sync; + cfdata->loose_sync = _comp_mod->conf->loose_sync; + cfdata->grab = _comp_mod->conf->grab; + cfdata->vsync = _comp_mod->conf->vsync; + if (_comp_mod->conf->shadow_style) + cfdata->shadow_style = eina_stringshare_add(_comp_mod->conf->shadow_style); + + cfdata->keep_unmapped = _comp_mod->conf->keep_unmapped; + cfdata->max_unmapped_pixels = _comp_mod->conf->max_unmapped_pixels; + cfdata->max_unmapped_time = _comp_mod->conf->max_unmapped_time; + cfdata->min_unmapped_time = _comp_mod->conf->min_unmapped_time; + cfdata->send_flush = _comp_mod->conf->send_flush; + cfdata->send_dump = _comp_mod->conf->send_dump; + cfdata->nocomp_fs = _comp_mod->conf->nocomp_fs; + cfdata->fps_show = _comp_mod->conf->fps_show; + cfdata->fps_corner = _comp_mod->conf->fps_corner; + cfdata->fps_average_range = _comp_mod->conf->fps_average_range; + if (cfdata->fps_average_range < 1) cfdata->fps_average_range = 30; + else if (cfdata->fps_average_range > 120) cfdata->fps_average_range = 120; + + EINA_LIST_FOREACH(_comp_mod->conf->match.popups, l, m) + { + m2 = E_NEW(Match_Config, 1); + _match_dup(m, m2); + m2->cfd = cfd; + cfdata->match.popups = eina_list_append(cfdata->match.popups, m2); + } + + EINA_LIST_FOREACH(_comp_mod->conf->match.borders, l, m) + { + m2 = E_NEW(Match_Config, 1); + _match_dup(m, m2); + m2->cfd = cfd; + cfdata->match.borders = eina_list_append(cfdata->match.borders, m2); + } + + EINA_LIST_FOREACH(_comp_mod->conf->match.overrides, l, m) + { + m2 = E_NEW(Match_Config, 1); + _match_dup(m, m2); + m2->cfd = cfd; + cfdata->match.overrides = eina_list_append(cfdata->match.overrides, m2); + } + + EINA_LIST_FOREACH(_comp_mod->conf->match.menus, l, m) + { + m2 = E_NEW(Match_Config, 1); + _match_dup(m, m2); + m2->cfd = cfd; + cfdata->match.menus = eina_list_append(cfdata->match.menus, m2); + } + + return cfdata; +} + +static void +_match_free(Match_Config *m) +{ + if (m->match.title) eina_stringshare_del(m->match.title); + if (m->match.name) eina_stringshare_del(m->match.name); + if (m->match.clas) eina_stringshare_del(m->match.clas); + if (m->match.role) eina_stringshare_del(m->match.role); + if (m->match.shadow_style) eina_stringshare_del(m->match.shadow_style); + if (m->title) free(m->title); + if (m->name) free(m->name); + if (m->clas) free(m->clas); + if (m->role) free(m->role); + free(m); +} + +static void +_free_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata) +{ + Match_Config *m; + + _comp_mod->config_dialog = NULL; + if (cfdata->shadow_style) eina_stringshare_del(cfdata->shadow_style); + EINA_LIST_FREE(cfdata->match.popups, m) + { + _match_free(m); + } + EINA_LIST_FREE(cfdata->match.borders, m) + { + _match_free(m); + } + EINA_LIST_FREE(cfdata->match.overrides, m) + { + _match_free(m); + } + EINA_LIST_FREE(cfdata->match.menus, m) + { + _match_free(m); + } + free(cfdata); +} + +static void +_shadow_changed(void *data, Evas_Object *obj, void *event_info __UNUSED__) +{ + E_Config_Dialog_Data *cfdata = data; + Evas_Object *orec0; + Eina_List *style_list; + const E_Demo_Style_Item *it; + const Eina_List *l; + + orec0 = evas_object_name_find(evas_object_evas_get(obj), "style_shadows"); + style_list = evas_object_data_get(orec0, "list"); + EINA_LIST_FOREACH(style_list, l, it) + { + if (!it) continue; + if (cfdata->use_shadow) + edje_object_signal_emit(it->preview, "e,state,shadow,on", "e"); + else + edje_object_signal_emit(it->preview, "e,state,shadow,off", "e"); + } +} + +static Eina_Bool +_style_demo(void *data) +{ + Eina_List *style_shadows, *l; + int demo_state; + const E_Demo_Style_Item *it; + + demo_state = (int)evas_object_data_get(data, "style_demo_state"); + demo_state = (demo_state + 1) % 4; + evas_object_data_set(data, "style_demo_state", (void *)demo_state); + + style_shadows = evas_object_data_get(data, "style_shadows"); + EINA_LIST_FOREACH(style_shadows, l, it) + { + if (!it) continue; + + Evas_Object *ob = it->preview; + Evas_Object *of = it->frame; + + switch (demo_state) + { + case 0: + edje_object_signal_emit(ob, "e,state,visible,on", "e"); + edje_object_signal_emit(ob, "e,state,focus,on", "e"); + edje_object_part_text_set(of, "e.text.label", _("Visible")); + break; + + case 1: + edje_object_signal_emit(ob, "e,state,focus,off", "e"); + edje_object_part_text_set(of, "e.text.label", _("Focus-Out")); + break; + + case 2: + edje_object_signal_emit(ob, "e,state,focus,on", "e"); + edje_object_part_text_set(of, "e.text.label", _("Focus-In")); + break; + + case 3: + edje_object_signal_emit(ob, "e,state,visible,off", "e"); + edje_object_part_text_set(of, "e.text.label", _("Hidden")); + break; + + default: + break; + } + } + return ECORE_CALLBACK_RENEW; +} + +static void +_style_selector_del(void *data __UNUSED__, Evas *e, Evas_Object *o, void *event_info __UNUSED__) +{ + Eina_List *style_shadows, *style_list; + Ecore_Timer *timer; + Evas_Object *orec0; + + orec0 = evas_object_name_find(e, "style_shadows"); + style_list = evas_object_data_get(orec0, "list"); + + style_shadows = evas_object_data_get(o, "style_shadows"); + if (style_shadows) + { + E_Demo_Style_Item *ds_it; + + EINA_LIST_FREE(style_shadows, ds_it) + { + style_list = eina_list_remove(style_list, ds_it); + + evas_object_del(ds_it->client); + evas_object_del(ds_it->border); + evas_object_del(ds_it->frame); + evas_object_del(ds_it->preview); + evas_object_del(ds_it->layout); + evas_object_del(ds_it->livethumb); + free(ds_it); + } + evas_object_data_set(o, "style_shadows", NULL); + } + + timer = evas_object_data_get(o, "style_timer"); + if (timer) + { + ecore_timer_del(timer); + evas_object_data_set(o, "style_timer", NULL); + } + + evas_object_data_set(orec0, "list", style_list); +} + +static Evas_Object * +_style_selector(Evas *evas, int use_shadow, const char **source) +{ + Evas_Object *oi, *ob, *oo, *obd, *orec, *oly, *orec0; + Eina_List *styles, *l, *style_shadows = NULL, *style_list; + char *style; + int n, sel; + Evas_Coord wmw, wmh; + Ecore_Timer *timer; + + orec0 = evas_object_name_find(evas, "style_shadows"); + style_list = evas_object_data_get(orec0, "list"); + oi = e_widget_ilist_add(evas, 80, 80, source); + evas_object_event_callback_add(oi, EVAS_CALLBACK_DEL, + _style_selector_del, oi); + sel = 0; + styles = e_theme_comp_list(); + n = 0; + EINA_LIST_FOREACH(styles, l, style) + { + E_Demo_Style_Item *ds_it; + char buf[PATH_MAX]; + + ds_it = malloc(sizeof(E_Demo_Style_Item)); + + ob = e_livethumb_add(evas); + ds_it->livethumb = ob; + e_livethumb_vsize_set(ob, 240, 240); + + oly = e_layout_add(e_livethumb_evas_get(ob)); + ds_it->layout = ob; + e_layout_virtual_size_set(oly, 240, 240); + e_livethumb_thumb_set(ob, oly); + evas_object_show(oly); + + oo = edje_object_add(e_livethumb_evas_get(ob)); + ds_it->preview = oo; + snprintf(buf, sizeof(buf), "e/comp/%s", style); + e_theme_edje_object_set(oo, "base/theme/borders", buf); + e_layout_pack(oly, oo); + e_layout_child_move(oo, 39, 39); + e_layout_child_resize(oo, 162, 162); + if (use_shadow) edje_object_signal_emit(oo, "e,state,shadow,on", "e"); + edje_object_signal_emit(oo, "e,state,visible,on", "e"); + evas_object_show(oo); + + ds_it->frame = edje_object_add(evas); + e_theme_edje_object_set + (ds_it->frame, "base/theme/modules/comp", "e/modules/comp/preview"); + edje_object_part_swallow(ds_it->frame, "e.swallow.preview", ob); + evas_object_show(ds_it->frame); + style_shadows = eina_list_append(style_shadows, ds_it); + + obd = edje_object_add(e_livethumb_evas_get(ob)); + ds_it->border = obd; + e_theme_edje_object_set(obd, "base/theme/borders", + "e/widgets/border/default/border"); + edje_object_part_text_set(obd, "e.text.title", _("Title")); + edje_object_signal_emit(obd, "e,state,focused", "e"); + edje_object_part_swallow(oo, "e.swallow.content", obd); + evas_object_show(obd); + + orec = evas_object_rectangle_add(e_livethumb_evas_get(ob)); + ds_it->client = orec; + evas_object_color_set(orec, 255, 255, 255, 255); + edje_object_part_swallow(obd, "e.swallow.client", orec); + evas_object_show(orec); + + e_widget_ilist_append(oi, ds_it->frame, style, NULL, NULL, style); + evas_object_show(ob); + if (*source) + { + if (!strcmp(*source, style)) sel = n; + } + n++; + + style_list = eina_list_append(style_list, ds_it); + } + evas_object_data_set(orec0, "list", style_list); + evas_object_data_set(oi, "style_shadows", style_shadows); + timer = ecore_timer_add(3.0, _style_demo, oi); + evas_object_data_set(oi, "style_timer", timer); + evas_object_data_set(oi, "style_demo_state", (void *)1); + e_widget_size_min_get(oi, &wmw, &wmh); + e_widget_size_min_set(oi, 160, 100); + e_widget_ilist_selected_set(oi, sel); + e_widget_ilist_go(oi); + + return oi; +} + +static void +_match_sel(void *data __UNUSED__) +{ +// Match_Config *m = data; +// E_Config_Dialog *cfd = m->cfd; +} + +const char * +_match_label_get(Match_Config *m) +{ + const char *name; + + name = _("Unknown"); + if (m->match.shadow_style) name = m->match.shadow_style; + if (m->match.role) name = m->match.role; + if (m->match.clas) name = m->match.clas; + if (m->match.name) name = m->match.name; + if (m->match.title) name = m->match.title; + return name; +} + +static void +_match_ilist_append(Evas_Object *il, Match_Config *m, int pos, int pre) +{ + const char *name = _match_label_get(m); + if (pos == -1) + e_widget_ilist_append(il, NULL, name, _match_sel, m, NULL); + else + { + if (pre) + e_widget_ilist_prepend_relative(il, NULL, name, _match_sel, m, NULL, pos); + else + e_widget_ilist_append_relative(il, NULL, name, _match_sel, m, NULL, pos); + } +} + +static void +_match_list_up(Eina_List **list, Match_Config *m) +{ + Eina_List *l, *lp; + + l = eina_list_data_find_list(*list, m); + if (!l) return; + lp = l->prev; + *list = eina_list_remove_list(*list, l); + if (lp) *list = eina_list_prepend_relative_list(*list, m, lp); + else *list = eina_list_prepend(*list, m); +} + +static void +_match_list_down(Eina_List **list, Match_Config *m) +{ + Eina_List *l, *lp; + + l = eina_list_data_find_list(*list, m); + if (!l) return; + lp = l->next; + *list = eina_list_remove_list(*list, l); + if (lp) *list = eina_list_append_relative_list(*list, m, lp); + else *list = eina_list_append(*list, m); +} + +static void +_match_list_del(Eina_List **list, Match_Config *m) +{ + Eina_List *l, *lp; + + l = eina_list_data_find_list(*list, m); + if (!l) return; + lp = l->next; + *list = eina_list_remove_list(*list, l); +} + +static void +_edit_ok(void *d1, void *d2) +{ + Match_Config *m = d1; + Evas_Object *of = d2; + Evas_Object *il; + int n; + + if (m->match.title) eina_stringshare_del(m->match.title); + m->match.title = NULL; + if (m->title) + { + if (m->title[0]) m->match.title = eina_stringshare_add(m->title); + free(m->title); + m->title = NULL; + } + if (m->match.name) eina_stringshare_del(m->match.name); + m->match.name = NULL; + if (m->name) + { + if (m->name[0]) m->match.name = eina_stringshare_add(m->name); + free(m->name); + m->name = NULL; + } + if (m->match.clas) eina_stringshare_del(m->match.clas); + m->match.clas = NULL; + if (m->clas) + { + if (m->clas[0]) m->match.clas = eina_stringshare_add(m->clas); + free(m->clas); + m->clas = NULL; + } + if (m->match.role) eina_stringshare_del(m->match.role); + m->match.role = NULL; + if (m->role) + { + if (m->role[0]) m->match.role = eina_stringshare_add(m->role); + free(m->role); + m->role = NULL; + } + m->match.borderless = m->borderless; + m->match.dialog = m->dialog; + m->match.accepts_focus = m->accepts_focus; + m->match.vkbd = m->vkbd; + m->match.quickpanel = m->quickpanel; + m->match.argb = m->argb; + m->match.fullscreen = m->fullscreen; + m->match.modal = m->modal; + + il = m->cfd->cfdata->edit_il; + n = e_widget_ilist_selected_get(il); + e_widget_ilist_nth_label_set(il, n, _match_label_get(m)); + + evas_object_del(of); +} + +static void +_create_edit_frame(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data *cfdata, Match_Config *m) +{ + Evas_Object *tab, *of, *oi, *lb, *en, *bt, *tb, *tab2, *o, *sf, *li; + E_Radio_Group *rg; + int row; + + tab = evas_object_name_find(evas, "dia_table"); + of = e_widget_frametable_add(evas, _("Edit Match"), 0); + + tb = e_widget_toolbook_add(evas, 48 * e_scale, 48 * e_scale); + + tab2 = e_widget_table_add(evas, 0); + if (cfdata->edit_il == cfdata->borders_il) + { + if (m->match.title) m->title = strdup(m->match.title); + else m->title = NULL; + lb = e_widget_label_add(evas, _("Title")); + e_widget_table_object_append(tab2, lb, 0, 0, 1, 1, 1, 0, 0, 0); + en = e_widget_entry_add(evas, &(m->title), NULL, NULL, NULL); + e_widget_table_object_append(tab2, en, 1, 0, 1, 1, 1, 0, 1, 0); + } + if ((cfdata->edit_il == cfdata->borders_il) || + (cfdata->edit_il == cfdata->overrides_il) || + (cfdata->edit_il == cfdata->popups_il)) + { + if (m->match.name) m->name = strdup(m->match.name); + else m->name = NULL; + lb = e_widget_label_add(evas, _("Name")); + e_widget_table_object_append(tab2, lb, 0, 1, 1, 1, 1, 0, 0, 0); + en = e_widget_entry_add(evas, &(m->name), NULL, NULL, NULL); + e_widget_table_object_append(tab2, en, 1, 1, 1, 1, 1, 0, 1, 0); + } + if ((cfdata->edit_il == cfdata->borders_il) || + (cfdata->edit_il == cfdata->overrides_il)) + { + if (m->match.clas) m->clas = strdup(m->match.clas); + else m->clas = NULL; + lb = e_widget_label_add(evas, _("Class")); + e_widget_table_object_append(tab2, lb, 0, 2, 1, 1, 1, 0, 0, 0); + en = e_widget_entry_add(evas, &(m->clas), NULL, NULL, NULL); + e_widget_table_object_append(tab2, en, 1, 2, 1, 1, 1, 0, 1, 0); + } + if (cfdata->edit_il == cfdata->borders_il) + { + if (m->match.role) m->role = strdup(m->match.role); + else m->role = NULL; + lb = e_widget_label_add(evas, _("Role")); + e_widget_table_object_append(tab2, lb, 0, 3, 1, 1, 1, 0, 0, 0); + en = e_widget_entry_add(evas, &(m->role), NULL, NULL, NULL); + e_widget_table_object_append(tab2, en, 1, 3, 1, 1, 1, 0, 1, 0); + } + e_widget_toolbook_page_append(tb, NULL, _("Names"), tab2, 1, 1, 1, 1, 0.5, 0.0); + + if ((cfdata->edit_il == cfdata->borders_il) || + (cfdata->edit_il == cfdata->overrides_il)) + { + Evas_Coord mw, mh; + + rg = e_widget_radio_group_new(&m->match.primary_type); + + li = e_widget_list_add(evas, 1, 0); + + o = e_widget_radio_add(evas, _("Unused"), ECORE_X_WINDOW_TYPE_UNKNOWN, rg); + e_widget_list_object_append(li, o, 1, 0, 0.0); + + o = e_widget_radio_add(evas, _("Combo"), ECORE_X_WINDOW_TYPE_COMBO, rg); + e_widget_list_object_append(li, o, 1, 0, 0.0); + o = e_widget_radio_add(evas, _("Desktop"), ECORE_X_WINDOW_TYPE_DESKTOP, rg); + e_widget_list_object_append(li, o, 1, 0, 0.0); + o = e_widget_radio_add(evas, _("Dialog"), ECORE_X_WINDOW_TYPE_DIALOG, rg); + e_widget_list_object_append(li, o, 1, 0, 0.0); + o = e_widget_radio_add(evas, _("Dock"), ECORE_X_WINDOW_TYPE_DOCK, rg); + e_widget_list_object_append(li, o, 1, 0, 0.0); + o = e_widget_radio_add(evas, _("Drag and Drop"), ECORE_X_WINDOW_TYPE_DND, rg); + e_widget_list_object_append(li, o, 1, 0, 0.0); + o = e_widget_radio_add(evas, _("Menu"), ECORE_X_WINDOW_TYPE_MENU, rg); + e_widget_list_object_append(li, o, 1, 0, 0.0); + o = e_widget_radio_add(evas, _("Menu (Dropdown)"), ECORE_X_WINDOW_TYPE_DROPDOWN_MENU, rg); + e_widget_list_object_append(li, o, 1, 0, 0.0); + o = e_widget_radio_add(evas, _("Menu (Popup)"), ECORE_X_WINDOW_TYPE_POPUP_MENU, rg); + e_widget_list_object_append(li, o, 1, 0, 0.0); + o = e_widget_radio_add(evas, _("Normal"), ECORE_X_WINDOW_TYPE_NORMAL, rg); + e_widget_list_object_append(li, o, 1, 0, 0.0); + o = e_widget_radio_add(evas, _("Notification"), ECORE_X_WINDOW_TYPE_NOTIFICATION, rg); + e_widget_list_object_append(li, o, 1, 0, 0.0); + o = e_widget_radio_add(evas, _("Splash"), ECORE_X_WINDOW_TYPE_SPLASH, rg); + e_widget_list_object_append(li, o, 1, 0, 0.0); + o = e_widget_radio_add(evas, _("Toolbar"), ECORE_X_WINDOW_TYPE_TOOLBAR, rg); + e_widget_list_object_append(li, o, 1, 0, 0.0); + o = e_widget_radio_add(evas, _("Tooltip"), ECORE_X_WINDOW_TYPE_TOOLTIP, rg); + e_widget_list_object_append(li, o, 1, 0, 0.0); + o = e_widget_radio_add(evas, _("Utility"), ECORE_X_WINDOW_TYPE_UTILITY, rg); + e_widget_list_object_append(li, o, 1, 0, 0.0); + + e_widget_size_min_get(li, &mw, &mh); + evas_object_resize(li, mw, mh); + + sf = e_widget_scrollframe_simple_add(evas, li); + e_widget_toolbook_page_append(tb, NULL, _("Types"), sf, 1, 1, 1, 1, 0.5, 0.0); + } + + m->borderless = m->match.borderless; + m->dialog = m->match.dialog; + m->accepts_focus = m->match.accepts_focus; + m->vkbd = m->match.vkbd; + m->quickpanel = m->match.quickpanel; + m->argb = m->match.argb; + m->fullscreen = m->match.fullscreen; + m->modal = m->match.modal; + + row = 0; + tab2 = e_widget_table_add(evas, 0); + lb = e_widget_label_add(evas, _("Unused")); + e_widget_table_object_append(tab2, lb, 1, row, 1, 1, 0, 0, 0, 0); + lb = e_widget_label_add(evas, _("On")); + e_widget_table_object_append(tab2, lb, 2, row, 1, 1, 0, 0, 0, 0); + lb = e_widget_label_add(evas, _("Off")); + e_widget_table_object_append(tab2, lb, 3, row, 1, 1, 0, 0, 0, 0); + row++; + + if (cfdata->edit_il == cfdata->borders_il) + { + lb = e_widget_label_add(evas, _("Borderless")); + e_widget_table_object_append(tab2, lb, 0, row, 1, 1, 1, 0, 1, 0); + rg = e_widget_radio_group_new(&m->borderless); + o = e_widget_radio_add(evas, NULL, 0, rg); + e_widget_table_object_append(tab2, o, 1, row, 1, 1, 0, 0, 0, 0); + o = e_widget_radio_add(evas, NULL, 1, rg); + e_widget_table_object_append(tab2, o, 2, row, 1, 1, 0, 0, 0, 0); + o = e_widget_radio_add(evas, NULL, -1, rg); + e_widget_table_object_append(tab2, o, 3, row, 1, 1, 0, 0, 0, 0); + row++; + } + if (cfdata->edit_il == cfdata->borders_il) + { + lb = e_widget_label_add(evas, _("Dialog")); + e_widget_table_object_append(tab2, lb, 0, row, 1, 1, 1, 0, 1, 0); + rg = e_widget_radio_group_new(&m->dialog); + o = e_widget_radio_add(evas, NULL, 0, rg); + e_widget_table_object_append(tab2, o, 1, row, 1, 1, 0, 0, 0, 0); + o = e_widget_radio_add(evas, NULL, 1, rg); + e_widget_table_object_append(tab2, o, 2, row, 1, 1, 0, 0, 0, 0); + o = e_widget_radio_add(evas, NULL, -1, rg); + e_widget_table_object_append(tab2, o, 3, row, 1, 1, 0, 0, 0, 0); + row++; + } + if (cfdata->edit_il == cfdata->borders_il) + { + lb = e_widget_label_add(evas, _("Accepts Focus")); + e_widget_table_object_append(tab2, lb, 0, row, 1, 1, 1, 0, 1, 0); + rg = e_widget_radio_group_new(&m->accepts_focus); + o = e_widget_radio_add(evas, NULL, 0, rg); + e_widget_table_object_append(tab2, o, 1, row, 1, 1, 0, 0, 0, 0); + o = e_widget_radio_add(evas, NULL, 1, rg); + e_widget_table_object_append(tab2, o, 2, row, 1, 1, 0, 0, 0, 0); + o = e_widget_radio_add(evas, NULL, -1, rg); + e_widget_table_object_append(tab2, o, 3, row, 1, 1, 0, 0, 0, 0); + row++; + } + if (cfdata->edit_il == cfdata->borders_il) + { + lb = e_widget_label_add(evas, _("Virtual Keyboard")); + e_widget_table_object_append(tab2, lb, 0, row, 1, 1, 1, 0, 1, 0); + rg = e_widget_radio_group_new(&m->vkbd); + o = e_widget_radio_add(evas, NULL, 0, rg); + e_widget_table_object_append(tab2, o, 1, row, 1, 1, 0, 0, 0, 0); + o = e_widget_radio_add(evas, NULL, 1, rg); + e_widget_table_object_append(tab2, o, 2, row, 1, 1, 0, 0, 0, 0); + o = e_widget_radio_add(evas, NULL, -1, rg); + e_widget_table_object_append(tab2, o, 3, row, 1, 1, 0, 0, 0, 0); + row++; + } + if (cfdata->edit_il == cfdata->borders_il) + { + lb = e_widget_label_add(evas, _("Quick Panel")); + e_widget_table_object_append(tab2, lb, 0, row, 1, 1, 1, 0, 1, 0); + rg = e_widget_radio_group_new(&m->quickpanel); + o = e_widget_radio_add(evas, NULL, 0, rg); + e_widget_table_object_append(tab2, o, 1, row, 1, 1, 0, 0, 0, 0); + o = e_widget_radio_add(evas, NULL, 1, rg); + e_widget_table_object_append(tab2, o, 2, row, 1, 1, 0, 0, 0, 0); + o = e_widget_radio_add(evas, NULL, -1, rg); + e_widget_table_object_append(tab2, o, 3, row, 1, 1, 0, 0, 0, 0); + row++; + } + lb = e_widget_label_add(evas, _("ARGB")); + e_widget_table_object_append(tab2, lb, 0, row, 1, 1, 1, 0, 1, 0); + rg = e_widget_radio_group_new(&m->argb); + o = e_widget_radio_add(evas, NULL, 0, rg); + e_widget_table_object_append(tab2, o, 1, row, 1, 1, 0, 0, 0, 0); + o = e_widget_radio_add(evas, NULL, 1, rg); + e_widget_table_object_append(tab2, o, 2, row, 1, 1, 0, 0, 0, 0); + o = e_widget_radio_add(evas, NULL, -1, rg); + e_widget_table_object_append(tab2, o, 3, row, 1, 1, 0, 0, 0, 0); + row++; + if (cfdata->edit_il == cfdata->borders_il) + { + lb = e_widget_label_add(evas, _("Fullscreen")); + e_widget_table_object_append(tab2, lb, 0, row, 1, 1, 1, 0, 1, 0); + rg = e_widget_radio_group_new(&m->fullscreen); + o = e_widget_radio_add(evas, NULL, 0, rg); + e_widget_table_object_append(tab2, o, 1, row, 1, 1, 0, 0, 0, 0); + o = e_widget_radio_add(evas, NULL, 1, rg); + e_widget_table_object_append(tab2, o, 2, row, 1, 1, 0, 0, 0, 0); + o = e_widget_radio_add(evas, NULL, -1, rg); + e_widget_table_object_append(tab2, o, 3, row, 1, 1, 0, 0, 0, 0); + row++; + } + if (cfdata->edit_il == cfdata->borders_il) + { + lb = e_widget_label_add(evas, _("Modal")); + e_widget_table_object_append(tab2, lb, 0, row, 1, 1, 1, 0, 1, 0); + rg = e_widget_radio_group_new(&m->modal); + o = e_widget_radio_add(evas, NULL, 0, rg); + e_widget_table_object_append(tab2, o, 1, row, 1, 1, 0, 0, 0, 0); + o = e_widget_radio_add(evas, NULL, 1, rg); + e_widget_table_object_append(tab2, o, 2, row, 1, 1, 0, 0, 0, 0); + o = e_widget_radio_add(evas, NULL, -1, rg); + e_widget_table_object_append(tab2, o, 3, row, 1, 1, 0, 0, 0, 0); + row++; + } + e_widget_toolbook_page_append(tb, NULL, _("Flags"), tab2, 1, 1, 1, 1, 0.5, 0.0); + + oi = _style_selector(evas, cfdata->use_shadow, &(m->match.shadow_style)); + e_widget_toolbook_page_append(tb, NULL, _("Style"), oi, 1, 1, 1, 1, 0.5, 0.0); + + e_widget_frametable_object_append(of, tb, 0, 0, 1, 1, 1, 1, 1, 1); + e_widget_toolbook_page_show(tb, 0); + + bt = e_widget_button_add(evas, _("OK"), NULL, _edit_ok, m, of); + e_widget_frametable_object_append(of, bt, 0, 1, 1, 1, 0, 0, 0, 0); + + e_widget_table_object_append(tab, of, 0, 0, 1, 1, 1, 0, 1, 0); +} + +static void +_but_up(void *d1, void *d2) +{ + E_Config_Dialog *cfd = d1; + Evas_Object *il = d2; + Match_Config *m; + int n; + + e_widget_ilist_freeze(il); + n = e_widget_ilist_selected_get(il); + if (n < 1) return; + m = e_widget_ilist_nth_data_get(il, n); + e_widget_ilist_remove_num(il, n); + n--; + _match_ilist_append(il, m, n, 1); + e_widget_ilist_nth_show(il, n, 0); + e_widget_ilist_selected_set(il, n); + e_widget_ilist_thaw(il); + e_widget_ilist_go(il); + _match_list_up(&(cfd->cfdata->match.popups), m); + _match_list_up(&(cfd->cfdata->match.borders), m); + _match_list_up(&(cfd->cfdata->match.overrides), m); + _match_list_up(&(cfd->cfdata->match.menus), m); + cfd->cfdata->match.changed = 1; +} + +static void +_but_down(void *d1, void *d2) +{ + E_Config_Dialog *cfd = d1; + Evas_Object *il = d2; + Match_Config *m; + int n; + + e_widget_ilist_freeze(il); + n = e_widget_ilist_selected_get(il); + if (n >= (e_widget_ilist_count(il) - 1)) return; + m = e_widget_ilist_nth_data_get(il, n); + e_widget_ilist_remove_num(il, n); + _match_ilist_append(il, m, n, 0); + e_widget_ilist_nth_show(il, n + 1, 0); + e_widget_ilist_selected_set(il, n + 1); + e_widget_ilist_thaw(il); + e_widget_ilist_go(il); + _match_list_down(&(cfd->cfdata->match.popups), m); + _match_list_down(&(cfd->cfdata->match.borders), m); + _match_list_down(&(cfd->cfdata->match.overrides), m); + _match_list_down(&(cfd->cfdata->match.menus), m); + cfd->cfdata->match.changed = 1; +} + +static void +_but_add(void *d1, void *d2) +{ + E_Config_Dialog *cfd = d1; + Evas_Object *il = d2; + Match_Config *m; + int n; + + m = E_NEW(Match_Config, 1); + m->cfd = cfd; + m->match.title = NULL; + m->match.name = NULL; + m->match.clas = NULL; + m->match.role = NULL; + m->match.shadow_style = eina_stringshare_add("default"); + + if (il == cfd->cfdata->popups_il) + cfd->cfdata->match.popups = eina_list_append(cfd->cfdata->match.popups, m); + else if (il == cfd->cfdata->borders_il) + cfd->cfdata->match.borders = eina_list_append(cfd->cfdata->match.borders, m); + else if (il == cfd->cfdata->overrides_il) + cfd->cfdata->match.overrides = eina_list_append(cfd->cfdata->match.overrides, m); + else if (il == cfd->cfdata->menus_il) + cfd->cfdata->match.menus = eina_list_append(cfd->cfdata->match.menus, m); + e_widget_ilist_freeze(il); + _match_ilist_append(il, m, -1, 0); + e_widget_ilist_thaw(il); + e_widget_ilist_go(il); + n = e_widget_ilist_count(il); + e_widget_ilist_nth_show(il, n, 0); + e_widget_ilist_selected_set(il, n); + + cfd->cfdata->edit_il = il; + _create_edit_frame(cfd, evas_object_evas_get(il), cfd->cfdata, m); + cfd->cfdata->match.changed = 1; +} + +static void +_but_del(void *d1, void *d2) +{ + E_Config_Dialog *cfd = d1; + Evas_Object *il = d2; + Match_Config *m; + int n; + + e_widget_ilist_freeze(il); + n = e_widget_ilist_selected_get(il); + m = e_widget_ilist_nth_data_get(il, n); + e_widget_ilist_remove_num(il, n); + e_widget_ilist_thaw(il); + e_widget_ilist_go(il); + _match_list_del(&(cfd->cfdata->match.popups), m); + _match_list_del(&(cfd->cfdata->match.borders), m); + _match_list_del(&(cfd->cfdata->match.overrides), m); + _match_list_del(&(cfd->cfdata->match.menus), m); + _match_free(m); + cfd->cfdata->match.changed = 1; +} + +static void +_but_edit(void *d1, void *d2) +{ + E_Config_Dialog *cfd = d1; + Evas_Object *il = d2; + int n; + Match_Config *m; + + n = e_widget_ilist_selected_get(il); + m = e_widget_ilist_nth_data_get(il, n); + + cfd->cfdata->edit_il = il; + _create_edit_frame(cfd, evas_object_evas_get(il), cfd->cfdata, m); + cfd->cfdata->match.changed = 1; +} + +static Evas_Object * +_create_match_editor(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata __UNUSED__, Eina_List **matches, Evas_Object **il_ret) +{ + Evas_Object *tab, *il, *bt; + Match_Config *m; + Eina_List *l; + + tab = e_widget_table_add(evas, 0); + + il = e_widget_ilist_add(evas, 16, 16, NULL); + e_widget_size_min_set(il, 160, 100); + + EINA_LIST_FOREACH(*matches, l, m) + { + _match_ilist_append(il, m, -1, 0); + } + + e_widget_ilist_go(il); + e_widget_table_object_append(tab, il, 0, 0, 1, 5, 1, 1, 1, 1); + + bt = e_widget_button_add(evas, _("Up"), NULL, _but_up, cfd, il); + e_widget_table_object_append(tab, bt, 1, 0, 1, 1, 1, 1, 0, 0); + bt = e_widget_button_add(evas, _("Down"), NULL, _but_down, cfd, il); + e_widget_table_object_append(tab, bt, 1, 1, 1, 1, 1, 1, 0, 0); + bt = e_widget_button_add(evas, _("Add"), NULL, _but_add, cfd, il); + e_widget_table_object_append(tab, bt, 1, 2, 1, 1, 1, 1, 0, 0); + bt = e_widget_button_add(evas, _("Del"), NULL, _but_del, cfd, il); + e_widget_table_object_append(tab, bt, 1, 3, 1, 1, 1, 1, 0, 0); + bt = e_widget_button_add(evas, _("Edit"), NULL, _but_edit, cfd, il); + e_widget_table_object_append(tab, bt, 1, 4, 1, 1, 1, 1, 0, 0); + + *il_ret = il; + + return tab; +} + +static Evas_Object * +_create_styles_toolbook(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata) +{ + Evas_Object *tb, *oi, *il; + + tb = e_widget_toolbook_add(evas, 48 * e_scale, 48 * e_scale); + + oi = _style_selector(evas, cfdata->use_shadow, &(cfdata->shadow_style)); + e_widget_toolbook_page_append(tb, NULL, _("Default"), oi, 1, 1, 1, 1, 0.5, 0.0); + + oi = _create_match_editor(cfd, evas, cfdata, &(cfdata->match.borders), &il); + cfdata->borders_il = il; + e_widget_toolbook_page_append(tb, NULL, _("Apps"), oi, 1, 1, 1, 1, 0.5, 0.0); + + oi = _create_match_editor(cfd, evas, cfdata, &(cfdata->match.popups), &il); + cfdata->popups_il = il; + e_widget_toolbook_page_append(tb, NULL, _("E"), oi, 1, 1, 1, 1, 0.5, 0.0); + + oi = _create_match_editor(cfd, evas, cfdata, &(cfdata->match.overrides), &il); + cfdata->overrides_il = il; + e_widget_toolbook_page_append(tb, NULL, _("Over"), oi, 1, 1, 1, 1, 0.5, 0.0); + + oi = _create_match_editor(cfd, evas, cfdata, &(cfdata->match.menus), &il); + cfdata->menus_il = il; + e_widget_toolbook_page_append(tb, NULL, _("Menus"), oi, 1, 1, 1, 1, 0.5, 0.0); + + e_widget_toolbook_page_show(tb, 0); + + return tb; +} + +static Evas_Object * +_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata) +{ + Evas_Object *ob, *ol, *ol2, *of, *otb, *oi, *orec0, *tab; + E_Radio_Group *rg; + + orec0 = evas_object_rectangle_add(evas); + evas_object_name_set(orec0, "style_shadows"); + + tab = e_widget_table_add(evas, 0); + evas_object_name_set(tab, "dia_table"); + + otb = e_widget_toolbook_add(evas, 48 * e_scale, 48 * e_scale); + + ol = e_widget_list_add(evas, 0, 0); + ob = e_widget_check_add(evas, _("Shadows"), &(cfdata->use_shadow)); + evas_object_smart_callback_add(ob, "changed", _shadow_changed, cfdata); + e_widget_list_object_append(ol, ob, 1, 0, 0.5); + ob = e_widget_check_add(evas, _("Limit framerate"), &(cfdata->lock_fps)); + e_widget_list_object_append(ol, ob, 1, 0, 0.5); + ob = e_widget_check_add(evas, _("Smooth scaling"), &(cfdata->smooth_windows)); + e_widget_list_object_append(ol, ob, 1, 0, 0.5); + + of = e_widget_frametable_add(evas, _("Styles"), 0); + e_widget_frametable_content_align_set(of, 0.5, 0.5); + oi = _create_styles_toolbook(cfd, evas, cfdata); + e_widget_frametable_object_append(of, oi, 0, 0, 1, 1, 1, 1, 1, 1); + e_widget_list_object_append(ol, of, 1, 1, 0.5); + + e_widget_toolbook_page_append(otb, NULL, _("Effects"), ol, 1, 1, 1, 1, 0.5, 0.0); + + ol = e_widget_list_add(evas, 0, 0); + ob = e_widget_check_add(evas, _("Sync screen (VBlank)"), &(cfdata->vsync)); + e_widget_list_object_append(ol, ob, 1, 1, 0.5); + ob = e_widget_check_add(evas, _("Sync windows"), &(cfdata->efl_sync)); + e_widget_list_object_append(ol, ob, 1, 1, 0.5); + ob = e_widget_check_add(evas, _("Loose sync"), &(cfdata->loose_sync)); + e_widget_list_object_append(ol, ob, 1, 1, 0.5); + ob = e_widget_check_add(evas, _("Grab Server during draw"), &(cfdata->grab)); + e_widget_list_object_append(ol, ob, 1, 1, 0.5); + e_widget_toolbook_page_append(otb, NULL, _("Sync"), ol, 0, 0, 0, 0, 0.5, 0.0); + + ol = e_widget_list_add(evas, 0, 0); + rg = e_widget_radio_group_new(&(cfdata->engine)); + ob = e_widget_radio_add(evas, _("Software"), E_EVAS_ENGINE_SOFTWARE_X11, rg); + e_widget_list_object_append(ol, ob, 1, 1, 0.5); + if (ecore_evas_engine_type_supported_get(ECORE_EVAS_ENGINE_OPENGL_X11)) + { + ob = e_widget_radio_add(evas, _("OpenGL"), E_EVAS_ENGINE_GL_X11, rg); + e_widget_list_object_append(ol, ob, 1, 1, 0.5); + + of = e_widget_framelist_add(evas, _("OpenGL options"), 0); + e_widget_framelist_content_align_set(of, 0.5, 0.0); + ob = e_widget_check_add(evas, _("Texture from pixmap"), &(cfdata->texture_from_pixmap)); + e_widget_framelist_object_append(of, ob); + ob = e_widget_check_add(evas, _("Indirect OpenGL"), &(cfdata->indirect)); + e_widget_framelist_object_append(of, ob); + e_widget_list_object_append(ol, of, 1, 1, 0.5); + } + e_widget_toolbook_page_append(otb, NULL, _("Engine"), ol, 0, 0, 0, 0, 0.5, 0.0); + + ol = e_widget_list_add(evas, 0, 0); + ob = e_widget_check_add(evas, _("Send flush"), &(cfdata->send_flush)); + e_widget_list_object_append(ol, ob, 1, 1, 0.5); + ob = e_widget_check_add(evas, _("Send dump"), &(cfdata->send_dump)); + e_widget_list_object_append(ol, ob, 1, 1, 0.5); + ob = e_widget_check_add(evas, _("Don't composite fullscreen"), &(cfdata->nocomp_fs)); + e_widget_list_object_append(ol, ob, 1, 1, 0.5); + ob = e_widget_check_add(evas, _("Keep hidden windows"), &(cfdata->keep_unmapped)); + e_widget_list_object_append(ol, ob, 1, 1, 0.5); + of = e_widget_frametable_add(evas, _("Maximum hidden pixels"), 0); + e_widget_frametable_content_align_set(of, 0.5, 0.5); + rg = e_widget_radio_group_new(&(cfdata->max_unmapped_pixels)); + ob = e_widget_radio_add(evas, _("1M"), 1 * 1024, rg); + e_widget_frametable_object_append(of, ob, 0, 0, 1, 1, 1, 1, 0, 0); + ob = e_widget_radio_add(evas, _("2M"), 2 * 1024, rg); + e_widget_frametable_object_append(of, ob, 0, 1, 1, 1, 1, 1, 0, 0); + ob = e_widget_radio_add(evas, _("4M"), 4 * 1024, rg); + e_widget_frametable_object_append(of, ob, 0, 2, 1, 1, 1, 1, 0, 0); + ob = e_widget_radio_add(evas, _("8M"), 8 * 1024, rg); + e_widget_frametable_object_append(of, ob, 1, 0, 1, 1, 1, 1, 0, 0); + ob = e_widget_radio_add(evas, _("16M"), 16 * 1024, rg); + e_widget_frametable_object_append(of, ob, 1, 1, 1, 1, 1, 1, 0, 0); + ob = e_widget_radio_add(evas, _("32M"), 32 * 1024, rg); + e_widget_frametable_object_append(of, ob, 1, 2, 1, 1, 1, 1, 0, 0); + ob = e_widget_radio_add(evas, _("64M"), 64 * 1024, rg); + e_widget_frametable_object_append(of, ob, 2, 0, 1, 1, 1, 1, 0, 0); + ob = e_widget_radio_add(evas, _("128M"), 128 * 1024, rg); + e_widget_frametable_object_append(of, ob, 2, 1, 1, 1, 1, 1, 0, 0); + ob = e_widget_radio_add(evas, _("256M"), 256 * 1024, rg); + e_widget_frametable_object_append(of, ob, 2, 2, 1, 1, 1, 1, 0, 0); + e_widget_list_object_append(ol, of, 1, 1, 0.5); + e_widget_toolbook_page_append(otb, NULL, _("Memory"), ol, 0, 0, 0, 0, 0.5, 0.0); + + ol = e_widget_list_add(evas, 0, 0); + ol2 = e_widget_list_add(evas, 1, 1); + of = e_widget_framelist_add(evas, _("Min hidden"), 0); + e_widget_framelist_content_align_set(of, 0.5, 0.0); + rg = e_widget_radio_group_new(&(cfdata->min_unmapped_time)); + ob = e_widget_radio_add(evas, _("30 Seconds"), 30, rg); + e_widget_framelist_object_append(of, ob); + ob = e_widget_radio_add(evas, _("1 Minute"), 60, rg); + e_widget_framelist_object_append(of, ob); + ob = e_widget_radio_add(evas, _("5 Minutes"), 5 * 60, rg); + e_widget_framelist_object_append(of, ob); + ob = e_widget_radio_add(evas, _("30 Minutes"), 30 * 60, rg); + e_widget_framelist_object_append(of, ob); + ob = e_widget_radio_add(evas, _("2 Hours"), 2 * 3600, rg); + e_widget_framelist_object_append(of, ob); + ob = e_widget_radio_add(evas, _("10 Hours"), 10 * 3600, rg); + e_widget_framelist_object_append(of, ob); + ob = e_widget_radio_add(evas, _("Forever"), 0, rg); + e_widget_framelist_object_append(of, ob); + e_widget_list_object_append(ol2, of, 1, 1, 0.5); + of = e_widget_framelist_add(evas, _("Max hidden"), 0); + e_widget_framelist_content_align_set(of, 0.5, 0.0); + rg = e_widget_radio_group_new(&(cfdata->max_unmapped_time)); + ob = e_widget_radio_add(evas, _("30 Seconds"), 30, rg); + e_widget_framelist_object_append(of, ob); + ob = e_widget_radio_add(evas, _("1 Minute"), 60, rg); + e_widget_framelist_object_append(of, ob); + ob = e_widget_radio_add(evas, _("5 Minutes"), 5 * 60, rg); + e_widget_framelist_object_append(of, ob); + ob = e_widget_radio_add(evas, _("30 Minutes"), 30 * 60, rg); + e_widget_framelist_object_append(of, ob); + ob = e_widget_radio_add(evas, _("2 Hours"), 2 * 3600, rg); + e_widget_framelist_object_append(of, ob); + ob = e_widget_radio_add(evas, _("10 Hours"), 10 * 3600, rg); + e_widget_framelist_object_append(of, ob); + ob = e_widget_radio_add(evas, _("Forever"), 0, rg); + e_widget_framelist_object_append(of, ob); + e_widget_list_object_append(ol2, of, 1, 1, 0.5); + e_widget_list_object_append(ol, ol2, 1, 1, 0.5); + e_widget_toolbook_page_append(otb, NULL, _("Timeouts"), ol, 0, 0, 0, 0, 0.5, 0.0); + + e_widget_toolbook_page_show(otb, 0); + + e_dialog_resizable_set(cfd->dia, 1); + + e_widget_table_object_append(tab, otb, 0, 0, 1, 1, 1, 1, 1, 1); + return tab; +} + +static void +_match_list_free(Eina_List *list) +{ + Match *m; + + EINA_LIST_FREE(list, m) + { + if (m->title) eina_stringshare_del(m->title); + if (m->name) eina_stringshare_del(m->name); + if (m->clas) eina_stringshare_del(m->clas); + if (m->role) eina_stringshare_del(m->role); + if (m->shadow_style) eina_stringshare_del(m->shadow_style); + free(m); + } +} + +static void +_match_dup2(Match_Config *m2, Match *m) +{ + *m = m2->match; + if (m->title) m->title = eina_stringshare_add(m->title); + if (m->name) m->name = eina_stringshare_add(m->name); + if (m->clas) m->clas = eina_stringshare_add(m->clas); + if (m->role) m->role = eina_stringshare_add(m->role); + if (m->shadow_style) m->shadow_style = eina_stringshare_add(m->shadow_style); +} + +static int +_basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata) +{ + if ((cfdata->use_shadow != _comp_mod->conf->use_shadow) || + (cfdata->lock_fps != _comp_mod->conf->lock_fps) || + (cfdata->smooth_windows != _comp_mod->conf->smooth_windows) || + (cfdata->grab != _comp_mod->conf->grab) || + (cfdata->keep_unmapped != _comp_mod->conf->keep_unmapped) || + (cfdata->nocomp_fs != _comp_mod->conf->nocomp_fs) || + (cfdata->shadow_style != _comp_mod->conf->shadow_style) || + (cfdata->max_unmapped_pixels != _comp_mod->conf->max_unmapped_pixels) || + (cfdata->max_unmapped_time != _comp_mod->conf->max_unmapped_time) || + (cfdata->min_unmapped_time != _comp_mod->conf->min_unmapped_time) || + (cfdata->send_flush != _comp_mod->conf->send_flush) || + (cfdata->send_dump != _comp_mod->conf->send_dump) || + (cfdata->match.changed) + ) + { + if (cfdata->match.changed) + { + Eina_List *l; + Match *m; + Match_Config *m2; + + _match_list_free(_comp_mod->conf->match.popups); + _match_list_free(_comp_mod->conf->match.borders); + _match_list_free(_comp_mod->conf->match.overrides); + _match_list_free(_comp_mod->conf->match.menus); + + _comp_mod->conf->match.popups = NULL; + _comp_mod->conf->match.borders = NULL; + _comp_mod->conf->match.overrides = NULL; + _comp_mod->conf->match.menus = NULL; + + EINA_LIST_FOREACH(cfdata->match.popups, l, m2) + { + m = E_NEW(Match, 1); + _match_dup2(m2, m); + _comp_mod->conf->match.popups = + eina_list_append(_comp_mod->conf->match.popups, m); + } + EINA_LIST_FOREACH(cfdata->match.borders, l, m2) + { + m = E_NEW(Match, 1); + _match_dup2(m2, m); + _comp_mod->conf->match.borders = + eina_list_append(_comp_mod->conf->match.borders, m); + } + EINA_LIST_FOREACH(cfdata->match.overrides, l, m2) + { + m = E_NEW(Match, 1); + _match_dup2(m2, m); + _comp_mod->conf->match.overrides = + eina_list_append(_comp_mod->conf->match.overrides, m); + } + EINA_LIST_FOREACH(cfdata->match.menus, l, m2) + { + m = E_NEW(Match, 1); + _match_dup2(m2, m); + _comp_mod->conf->match.menus = + eina_list_append(_comp_mod->conf->match.menus, m); + } + cfdata->match.changed = 0; + } + _comp_mod->conf->use_shadow = cfdata->use_shadow; + _comp_mod->conf->lock_fps = cfdata->lock_fps; + _comp_mod->conf->smooth_windows = cfdata->smooth_windows; + _comp_mod->conf->grab = cfdata->grab; + _comp_mod->conf->keep_unmapped = cfdata->keep_unmapped; + _comp_mod->conf->nocomp_fs = cfdata->nocomp_fs; + _comp_mod->conf->max_unmapped_pixels = cfdata->max_unmapped_pixels; + _comp_mod->conf->max_unmapped_time = cfdata->max_unmapped_time; + _comp_mod->conf->min_unmapped_time = cfdata->min_unmapped_time; + _comp_mod->conf->send_flush = cfdata->send_flush; + _comp_mod->conf->send_dump = cfdata->send_dump; + if (_comp_mod->conf->shadow_style) + eina_stringshare_del(_comp_mod->conf->shadow_style); + _comp_mod->conf->shadow_style = NULL; + if (cfdata->shadow_style) + _comp_mod->conf->shadow_style = eina_stringshare_add(cfdata->shadow_style); + e_mod_comp_shadow_set(); + } + if ((cfdata->engine != _comp_mod->conf->engine) || + (cfdata->indirect != _comp_mod->conf->indirect) || + (cfdata->texture_from_pixmap != _comp_mod->conf->texture_from_pixmap) || + (cfdata->efl_sync != _comp_mod->conf->efl_sync) || + (cfdata->loose_sync != _comp_mod->conf->loose_sync) || + (cfdata->vsync != _comp_mod->conf->vsync)) + { + E_Action *a; + + _comp_mod->conf->engine = cfdata->engine; + _comp_mod->conf->indirect = cfdata->indirect; + _comp_mod->conf->texture_from_pixmap = cfdata->texture_from_pixmap; + _comp_mod->conf->efl_sync = cfdata->efl_sync; + _comp_mod->conf->loose_sync = cfdata->loose_sync; + _comp_mod->conf->vsync = cfdata->vsync; + + a = e_action_find("restart"); + if ((a) && (a->func.go)) a->func.go(NULL, NULL); + } + e_config_save_queue(); + return 1; +} diff --git a/comp-slp/src/e_mod_config.h b/comp-slp/src/e_mod_config.h new file mode 100644 index 0000000..929ac4e --- /dev/null +++ b/comp-slp/src/e_mod_config.h @@ -0,0 +1,7 @@ +#ifdef E_TYPEDEFS +#else +#ifndef E_MOD_CONFIG_H +#define E_MOD_CONFIG_H +E_Config_Dialog *e_int_config_comp_module(E_Container *con, const char *params __UNUSED__); +#endif +#endif diff --git a/comp-slp/src/e_mod_main.c b/comp-slp/src/e_mod_main.c new file mode 100644 index 0000000..e6eecd0 --- /dev/null +++ b/comp-slp/src/e_mod_main.c @@ -0,0 +1,301 @@ +#include "e.h" +#include "e_mod_main.h" +#include "e_mod_config.h" +#include "e_mod_comp.h" + +/* module private routines */ +Mod *_comp_mod = NULL; + +/* public module routines. all modules must have these */ +EAPI E_Module_Api e_modapi = +{ + E_MODULE_API_VERSION, + "Composite" +}; + +EAPI void * +e_modapi_init(E_Module *m) +{ + Mod *mod; + char buf[4096]; + + mod = calloc(1, sizeof(Mod)); + m->data = mod; + + mod->module = m; + snprintf(buf, sizeof(buf), "%s/e-module-comp-slp.edj", e_module_dir_get(m)); + e_configure_registry_category_add("appearance", 10, _("Look"), NULL, + "preferences-appearance"); + e_configure_registry_item_add("appearance/comp", 120, _("Composite"), NULL, + buf, e_int_config_comp_module); + + mod->conf_match_edd = E_CONFIG_DD_NEW("Comp_Match", Match); +#undef T +#undef D +#define T Match +#define D mod->conf_match_edd + E_CONFIG_VAL(D, T, title, STR); + E_CONFIG_VAL(D, T, name, STR); + E_CONFIG_VAL(D, T, clas, STR); + E_CONFIG_VAL(D, T, role, STR); + E_CONFIG_VAL(D, T, primary_type, INT); + E_CONFIG_VAL(D, T, borderless, CHAR); + E_CONFIG_VAL(D, T, dialog, CHAR); + E_CONFIG_VAL(D, T, accepts_focus, CHAR); + E_CONFIG_VAL(D, T, vkbd, CHAR); + E_CONFIG_VAL(D, T, quickpanel, CHAR); + E_CONFIG_VAL(D, T, argb, CHAR); + E_CONFIG_VAL(D, T, fullscreen, CHAR); + E_CONFIG_VAL(D, T, modal, CHAR); + E_CONFIG_VAL(D, T, shadow_style, STR); + + mod->conf_edd = E_CONFIG_DD_NEW("Comp_Config", Config); +#undef T +#undef D +#define T Config +#define D mod->conf_edd + E_CONFIG_VAL(D, T, use_shadow, UCHAR); + E_CONFIG_VAL(D, T, shadow_file, STR); + E_CONFIG_VAL(D, T, shadow_style, STR); + E_CONFIG_VAL(D, T, engine, INT); + E_CONFIG_VAL(D, T, indirect, UCHAR); + E_CONFIG_VAL(D, T, texture_from_pixmap, UCHAR); + E_CONFIG_VAL(D, T, lock_fps, UCHAR); + E_CONFIG_VAL(D, T, efl_sync, UCHAR); + E_CONFIG_VAL(D, T, loose_sync, UCHAR); + E_CONFIG_VAL(D, T, grab, UCHAR); + E_CONFIG_VAL(D, T, vsync, UCHAR); + E_CONFIG_VAL(D, T, keep_unmapped, UCHAR); + E_CONFIG_VAL(D, T, send_flush, UCHAR); + E_CONFIG_VAL(D, T, send_dump, UCHAR); + E_CONFIG_VAL(D, T, nocomp_fs, UCHAR); + E_CONFIG_VAL(D, T, smooth_windows, UCHAR); + E_CONFIG_VAL(D, T, max_unmapped_pixels, INT); + E_CONFIG_VAL(D, T, max_unmapped_time, INT); + E_CONFIG_VAL(D, T, min_unmapped_time, INT); + E_CONFIG_VAL(D, T, use_lock_screen, UCHAR); + E_CONFIG_VAL(D, T, max_lock_screen_time, FLOAT); + E_CONFIG_VAL(D, T, dri_buff_flip, UCHAR); + E_CONFIG_VAL(D, T, default_window_effect, UCHAR); + E_CONFIG_VAL(D, T, fps_average_range, INT); + E_CONFIG_VAL(D, T, fps_corner, UCHAR); + E_CONFIG_VAL(D, T, fps_show, UCHAR); + E_CONFIG_LIST(D, T, match.popups, mod->conf_match_edd); + E_CONFIG_LIST(D, T, match.borders, mod->conf_match_edd); + E_CONFIG_LIST(D, T, match.overrides, mod->conf_match_edd); + E_CONFIG_LIST(D, T, match.menus, mod->conf_match_edd); + + mod->conf = e_config_domain_load("module.comp-slp", mod->conf_edd); + if (!mod->conf) + { + mod->conf = E_NEW(Config, 1); + mod->conf->use_shadow = 0; + mod->conf->shadow_file = NULL; + mod->conf->shadow_style = eina_stringshare_add("default"); + mod->conf->engine = E_EVAS_ENGINE_GL_X11; + mod->conf->indirect = 0; + mod->conf->texture_from_pixmap = 1; + mod->conf->lock_fps = 0; + mod->conf->efl_sync = 1; + mod->conf->loose_sync = 1; + mod->conf->grab = 0; + mod->conf->vsync = 1; + mod->conf->keep_unmapped = 1; + mod->conf->send_flush = 1; // implement + mod->conf->send_dump = 0; // implement + mod->conf->nocomp_fs = 0; // buggy + mod->conf->smooth_windows = 0; + mod->conf->max_unmapped_pixels = 32 * 1024; // implement + mod->conf->max_unmapped_time = 10 * 3600; // implement + mod->conf->min_unmapped_time = 5 * 60; // implement + mod->conf->use_lock_screen = 1; + mod->conf->max_lock_screen_time = 2.0f; + mod->conf->dri_buff_flip = 1; + mod->conf->default_window_effect = 1; + + /* make shadow file path */ + mod->conf->shadow_file = calloc(4096, sizeof(unsigned char)); + if (mod->conf->shadow_file) + { + snprintf((char*)(mod->conf->shadow_file), 4096 * sizeof(unsigned char), "%s/data/themes/shadow.edj", e_prefix_data_get() ); + fprintf(stdout, "[E17-comp] shadow file path: %s\n", mod->conf->shadow_file); + } + + /* save default configuration to comp.cfg file - yigl 100518 */ + e_modapi_save(m); + + // FIXME: add some default matches + } + + mod->conf->match.popups = NULL; + mod->conf->match.borders = NULL; + mod->conf->match.overrides = NULL; + mod->conf->match.menus = NULL; + // disable config allocation from open source - yigl 100607 +#if 0 + if (!mod->conf) _e_mod_config_new(m); +#endif + + if (!e_config->use_composite) + { + e_config->use_composite = 1; + e_config_save_queue(); + } + + _comp_mod = mod; + + if (!e_mod_comp_init()) + { + // FIXME: handle if comp init fails + } + + e_module_priority_set(m, -1000); + return mod; +} + +void +_e_mod_config_new(E_Module *m) +{ + Mod *mod = m->data; + Match *mat; + + mod->conf = E_NEW(Config, 1); + mod->conf->use_shadow = 1; + mod->conf->shadow_file = NULL; + mod->conf->shadow_style = eina_stringshare_add("default"); + mod->conf->engine = E_EVAS_ENGINE_SOFTWARE_X11; + mod->conf->indirect = 0; + mod->conf->texture_from_pixmap = 0; + mod->conf->lock_fps = 0; + mod->conf->efl_sync = 1; + mod->conf->loose_sync = 1; + mod->conf->grab = 0; + mod->conf->vsync = 1; + mod->conf->keep_unmapped = 1; + mod->conf->send_flush = 1; // implement + mod->conf->send_dump = 0; // implement + mod->conf->nocomp_fs = 0; // buggy + mod->conf->smooth_windows = 0; + mod->conf->max_unmapped_pixels = 32 * 1024; // implement + mod->conf->max_unmapped_time = 10 * 3600; // implement + mod->conf->min_unmapped_time = 5 * 60; // implement + mod->conf->use_lock_screen = 1; + mod->conf->max_lock_screen_time = 2.0f; + mod->conf->dri_buff_flip = 1; + mod->conf->default_window_effect = 1; + mod->conf->fps_average_range = 30; + mod->conf->fps_corner = 0; + mod->conf->fps_show = 0; + + mod->conf->match.popups = NULL; + mat = E_NEW(Match, 1); + mod->conf->match.popups = eina_list_append(mod->conf->match.popups, mat); + mat->name = eina_stringshare_add("shelf"); + mat->shadow_style = eina_stringshare_add("still"); + mat = E_NEW(Match, 1); + mod->conf->match.popups = eina_list_append(mod->conf->match.popups, mat); + mat->shadow_style = eina_stringshare_add("popup"); + + mod->conf->match.borders = NULL; + + mod->conf->match.overrides = NULL; + mat = E_NEW(Match, 1); + mod->conf->match.overrides = eina_list_append(mod->conf->match.overrides, mat); + mat->name = eina_stringshare_add("E"); + mat->clas = eina_stringshare_add("Background_Window"); + mat->shadow_style = eina_stringshare_add("none"); + mat = E_NEW(Match, 1); + mod->conf->match.overrides = eina_list_append(mod->conf->match.overrides, mat); + mat->primary_type = ECORE_X_WINDOW_TYPE_DROPDOWN_MENU; + mat->shadow_style = eina_stringshare_add("menu"); + mat = E_NEW(Match, 1); + mod->conf->match.overrides = eina_list_append(mod->conf->match.overrides, mat); + mat->primary_type = ECORE_X_WINDOW_TYPE_POPUP_MENU; + mat->shadow_style = eina_stringshare_add("menu"); + mat = E_NEW(Match, 1); + mod->conf->match.overrides = eina_list_append(mod->conf->match.overrides, mat); + mat->primary_type = ECORE_X_WINDOW_TYPE_COMBO; + mat->shadow_style = eina_stringshare_add("menu"); + mat = E_NEW(Match, 1); + mod->conf->match.overrides = eina_list_append(mod->conf->match.overrides, mat); + mat->primary_type = ECORE_X_WINDOW_TYPE_TOOLTIP; + mat->shadow_style = eina_stringshare_add("menu"); + mat = E_NEW(Match, 1); + mod->conf->match.overrides = eina_list_append(mod->conf->match.overrides, mat); + mat->shadow_style = eina_stringshare_add("popup"); + + mod->conf->match.menus = NULL; + mat = E_NEW(Match, 1); + mod->conf->match.menus = eina_list_append(mod->conf->match.menus, mat); + mat->shadow_style = eina_stringshare_add("menu"); +} + +static void +_match_list_free(Eina_List *list) +{ + Match *m; + + EINA_LIST_FREE(list, m) + { + if ( m ) + { + if (m->title) eina_stringshare_del(m->title); + if (m->name) eina_stringshare_del(m->name); + if (m->clas) eina_stringshare_del(m->clas); + if (m->role) eina_stringshare_del(m->role); + if (m->shadow_style) eina_stringshare_del(m->shadow_style); + free(m); + } + } +} + +void +_e_mod_config_free(E_Module *m) +{ + Mod *mod = m->data; + + if (mod->conf->shadow_file) eina_stringshare_del(mod->conf->shadow_file); + if (mod->conf->shadow_style) eina_stringshare_del(mod->conf->shadow_style); + + _match_list_free(mod->conf->match.popups); + _match_list_free(mod->conf->match.borders); + _match_list_free(mod->conf->match.overrides); + _match_list_free(mod->conf->match.menus); + + free(mod->conf); + mod->conf = NULL; +} + +EAPI int +e_modapi_shutdown(E_Module *m) +{ + Mod *mod = m->data; + + e_mod_comp_shutdown(); + + e_configure_registry_item_del("appearance/comp"); + e_configure_registry_category_del("appearance"); + + if (mod->config_dialog) + { + e_object_del(E_OBJECT(mod->config_dialog)); + mod->config_dialog = NULL; + } + _e_mod_config_free(m); + + E_CONFIG_DD_FREE(mod->conf_match_edd); + E_CONFIG_DD_FREE(mod->conf_edd); + free(mod); + + if (mod == _comp_mod) _comp_mod = NULL; + + return 1; +} + +EAPI int +e_modapi_save(E_Module *m) +{ + Mod *mod = m->data; + e_config_domain_save("module.comp-slp", mod->conf_edd, mod->conf); + return 1; +} diff --git a/comp-slp/src/e_mod_main.h b/comp-slp/src/e_mod_main.h new file mode 100644 index 0000000..c8655ae --- /dev/null +++ b/comp-slp/src/e_mod_main.h @@ -0,0 +1,97 @@ +#ifndef E_MOD_MAIN_H +#define E_MOD_MAIN_H + +#ifdef HAVE_GETTEXT +#define _(str) gettext(str) +#define d_(str, dom) dgettext(PACKAGE dom, str) +#else +#define _(str) (str) +#define d_(str, dom) (str) +#endif + +typedef struct _Config Config; +typedef struct _Mod Mod; + +typedef struct _Match Match; + +struct _Config +{ + unsigned char use_shadow; + const char *shadow_file; + const char *shadow_style; + int engine; + unsigned char indirect; + unsigned char texture_from_pixmap; + unsigned char lock_fps; + unsigned char loose_sync; + unsigned char efl_sync; + unsigned char grab; + unsigned char vsync; + unsigned char keep_unmapped; + unsigned char send_flush; + unsigned char send_dump; + unsigned char nocomp_fs; + unsigned char smooth_windows; + int max_unmapped_pixels; + int max_unmapped_time; + int min_unmapped_time; + unsigned char use_lock_screen; + float max_lock_screen_time; + unsigned char dri_buff_flip; + unsigned char default_window_effect; + int fps_average_range; + unsigned char fps_corner; + unsigned char fps_show; + + struct { + Eina_List *popups; // used for e popups + Eina_List *borders; // used for borders + Eina_List *overrides; // used for client menus, tooltips etc. + Eina_List *menus; // used for e menus + } match; +}; + +struct _Mod +{ + E_Module *module; + + E_Config_DD *conf_edd; + E_Config_DD *conf_match_edd; + Config *conf; + + E_Config_Dialog *config_dialog; +}; + +struct _Match +{ + const char *title; // glob - used for borders, NULL if not to be used + const char *name; // glob - used for borders, overrides, popups, NULL if not to be used + const char *clas; // glob - used for borders, overrides, NULL if not to be used + const char *role; // glob - used for borders + + int primary_type; // Ecore_X_Window_Type - used for borders, overrides, first one found - ECORE_X_WINDOW_TYPE_UNKNOWN if not to be used + char borderless; // used for borders, 0 == dont use, 1 == borderless, -1 == not borderless + char dialog; // used for borders, 0 == don't use, 1 == dialog, -1 == not dialog + char accepts_focus; // used for borders, 0 == don't use, 1 == accepts focus, -1 == does not accept focus + char vkbd; // used for borders, 0 == don't use, 1 == is vkbd, -1 == not vkbd + char quickpanel; // used for borders, 0 == don't use, 1 == is quickpanel, -1 == not quickpanel + char argb; // used for borders, overrides, popups, menus, 0 == don't use, 1 == is argb, -1 == not argb + char fullscreen; // used for borders, 0 == don't use, 1 == is fullscreen, -1 == not fullscreen + char modal; // used for borders, 0 == don't use, 1 == is modal, -1 == not modal + + const char *shadow_style; // shadow style to use +}; + +extern Mod *_comp_mod; + +EAPI extern E_Module_Api e_modapi; + +EAPI void *e_modapi_init (E_Module *m); +EAPI int e_modapi_shutdown (E_Module *m); +EAPI int e_modapi_save (E_Module *m); +EAPI int e_modapi_info (E_Module *m); + +void _e_mod_config_new(E_Module *m); +void _e_mod_config_free(E_Module *m); + +#endif diff --git a/comp-slp/src/module.desktop.in b/comp-slp/src/module.desktop.in new file mode 100644 index 0000000..a0e9af9 --- /dev/null +++ b/comp-slp/src/module.desktop.in @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=Link +Name=Composite +Icon=e-module-comp-slp +Comment= +Comment[fr]= +Comment[it]= +X-Enlightenment-ModuleType=appearance diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..6e716f6 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,1140 @@ +e17-extra-modules (0.1-126) unstable; urgency=low + + * Remove accessibility module + * Git: slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-126 + + -- Sung-Jin Park Wed, 28 Dec 2011 14:32:33 +0900 + +e17-extra-modules (0.1-125) unstable; urgency=low + + * [ILLUME2] Bug fix + - Modify code to check return value of getting window angle property + - This change is related with JIRA S1-107 + * Git: slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-125 + + -- Doyoun Kang Sun, 11 Dec 2011 07:00:00 +0900 + +e17-extra-modules (0.1-124) unstable; urgency=low + + * [ILLUME2] Apply new quickpanel UX + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-124 + + -- Doyoun Kang Thu, 08 Dec 2011 20:29:04 +0900 + +e17-extra-modules (0.1-123) unstable; urgency=low + + * [ILLUME2] Bug fix + - Add code to check the border is deleted or not when a illume makes the border info structure. + - Remove code to check the notification window or not in _policy_border_add(). + - These changes are related with GUMI testing verification problem No.28,29. + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-123 + + -- Doyoun Kang Thu, 08 Dec 2011 16:46:31 +0900 + +e17-extra-modules (0.1-122) unstable; urgency=low + + * [ILLUME2] Change code to find top window using e_container's stack instead of raise_stack + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-122 + + -- Doyoun Kang Thu, 08 Dec 2011 14:16:02 +0900 + +e17-extra-modules (0.1-121) unstable; urgency=low + + * [ILLUME2] Add code to change level of extra mini-controller windows + when the indicator stack is changed. + - This change is related with CQ H0100137855 + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-121 + + -- Doyoun Kang Tue, 06 Dec 2011 11:32:21 +0900 + +e17-extra-modules (0.1-120) unstable; urgency=low + + * [ILLUME2] Add code to control extra mini-controller windows + - This change is related with GUMI testing verification proble No.44 + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-120 + + -- Doyoun Kang Sun, 04 Dec 2011 20:27:33 +0900 + +e17-extra-modules (0.1-119) unstable; urgency=low + + * [ILLUME2] Bug fix + 1. Doesn't check root angle in _policy_root_angle_set() - CQ H0100137755 + 2. Add error handling code in _policy_window_rotation_angle_get() - Gumi Verification No.170 + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-119 + + -- Doyoun Kang Fri, 02 Dec 2011 00:49:19 +0900 + +e17-extra-modules (0.1-118) unstable; urgency=low + + * [ILLUME2] Changed code + - Doesn't find and set focus to the top window when a indicator's stack is changed + - This change is related with CQ H0100137365 + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-118 + + -- Doyoun Kang Wed, 30 Nov 2011 13:08:48 +0900 + +e17-extra-modules (0.1-117) unstable; urgency=low + + * [keyrouter] Change key combination for screen shot + from HOME key + POWWER key to VOLUMEDOWN key + POWER key + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-117 + + -- Sung-Jin Park Thu, 24 Nov 2011 13:15:31 +0900 + +e17-extra-modules (0.1-116) unstable; urgency=low + + * [COMP] Add Capture Effect + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-116 + + -- Gwangyeong Mun Wed, 23 Nov 2011 18:25:23 +0900 + +e17-extra-modules (0.1-115) unstable; urgency=low + + * [COMP] setup sync counter on show to resolve CQ H0100137005 + * [keyrouter] Rollback the following changes + : Change key combination from KEY_SELECT+KEY_POWER to KEY_VOLUMEDOWN+KEY_POWER + * [keyrouter & accessibility] Remove build-warnings and SVACE wanrings. + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-115 + + -- Sung-Jin Park Wed, 23 Nov 2011 09:09:53 +0900 + +e17-extra-modules (0.1-114) unstable; urgency=low + + * [accessibility] Modify accessibility module to use ecore x gesture APIs/callbacks + instead of using Xgesture library directly + * [ILLUME2] Bug fix for quickpanel stack + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-114 + + -- Sung-Jin Park Mon, 21 Nov 2011 15:47:26 +0900 + +e17-extra-modules (0.1-113) unstable; urgency=low + + * [COMP] fix raise above bug + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-113 + + -- Gwanglim Lee Thu, 17 Nov 2011 17:00:41 +0900 + +e17-extra-modules (0.1-112) unstable; urgency=low + + * [ILLUME2] Remove code to set _e_config_save_block + - this will make to save configuration files + * [COMP] Change indicator effect to simple fade in/out + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-112 + + -- Doyoun Kang Wed, 16 Nov 2011 21:00:00 +0900 + +e17-extra-modules (0.1-111) unstable; urgency=low + + * [ILLUME2] fix bug for notification stack + - add code to check notification level and re-arrange notification stack. + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-111 + + -- Doyoun Kang Wed, 09 Nov 2011 19:27:33 +0900 + +e17-extra-modules (0.1-110) unstable; urgency=low + + * [COMP] fix problem which is doing rotation effect without black background + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-110 + + -- Gwanglim Lee Wed, 09 Nov 2011 13:43:19 +0900 + +e17-extra-modules (0.1-109) unstable; urgency=low + + * [COMP] fix sync counter lockup problem with application which maps + and unmaps a window rapidly + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-109 + + -- Gwanglim Lee Fri, 04 Nov 2011 14:03:00 +0900 + +e17-extra-modules (0.1-108) unstable; urgency=low + + * [ILLUME2] Add code to set _e_config_save_block + - this will block to save configuration files + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-108 + + -- Doyoun Kang Thu, 03 Nov 2011 17:02:31 +0900 + +e17-extra-modules (0.1-107) unstable; urgency=low + + * [ILLUME2] change code to set root angle property + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-107 + + -- Doyoun Kang Wed, 26 Oct 2011 19:18:01 +0900 + +e17-extra-modules (0.1-106) unstable; urgency=low + + * [ILLUME2] change code for hibernation + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-106 + + -- Doyoun Kang Fri, 21 Oct 2011 14:32:11 +0900 + +e17-extra-modules (0.1-105) unstable; urgency=low + + * [keyrouter] Add device_list and modify device_add/device_remove function to handle xinput device properly. + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-105 + + -- Sung-Jin Park Tue, 18 Oct 2011 17:29:32 +0900 + +e17-extra-modules (0.1-104) unstable; urgency=low + + * [keyrouter] Fix a bug related to accessibility feature(HighContrast) + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-104 + + -- Sung-Jin Park Fri, 14 Oct 2011 15:59:58 +0900 + +e17-extra-modules (0.1-103) unstable; urgency=low + + * [ILLUME2] Bug fix - Remove code to resize UTILITY type window + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-103 + + -- Doyoun Kang Thu, 13 Oct 2011 20:42:51 +0900 + +e17-extra-modules (0.1-102) unstable; urgency=low + + * [keyrouter] Modify _e_keyrouter_device_add()/_e_keyrouter_device_remove() for handling dynamically added H/W keys properly + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-102 + + -- Sung-Jin Park Thu, 13 Oct 2011 11:16:13 +0900 + +e17-extra-modules (0.1-101) unstable; urgency=low + + * [keyrouter] Fix two CQ defects:rotation fix, remove unused two keys + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-101 + + -- Sung-Jin Park Thu, 13 Oct 2011 10:38:30 +0900 + +e17-extra-modules (0.1-100) unstable; urgency=low + + * [keyrouter] 1. Add key definitions and routines for Earjack/BT Headset/Multimedia keys + 2. Fix DeliverDeviceKeyEvents() to deliver KeyPress/KeyRelease event in a same manner + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-100 + + -- Sung-Jin Park Tue, 11 Oct 2011 09:46:39 +0900 + +e17-extra-modules (0.1-99) unstable; urgency=low + + * [keyrouter] Apply hardkey emulation menu(mouse menu) both for landscape and portrait mode + * [ILLUME2] removed code saving ilde lock window handle + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-99 + + -- Sung-Jin Park Thu, 06 Oct 2011 12:30:15 +0900 + +e17-extra-modules (0.1-98) unstable; urgency=low + + * [keyrouter] Fix an error related to mouse right button action on hardkey emulation menu(mouse menu) + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-98 + + -- Gwangyeong Mun Tue, 04 Oct 2011 16:31:16 +0900 + +e17-extra-modules (0.1-97) unstable; urgency=low + + * [COMP] Fix Raise Above Animation + Details: Show white frame while closing application animation. + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-97 + + -- Gwangyeong Mun Tue, 04 Oct 2011 11:16:29 +0900 + +e17-extra-modules (0.1-96) unstable; urgency=low + + * [accessibility] Add a new module + * Remove spec file for rpm packaging + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-96 + + -- Sung-Jin Park Fri, 30 Sep 2011 10:05:01 +0900 + +e17-extra-modules (0.1-95) unstable; urgency=low + + * [COMP] moved atom_init function before compositor init function + * [ILLUME2] remove temporary code for avoiding 3d limitation + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-95 + + -- Doyoun Kang Tue, 27 Sep 2011 16:29:27 +0900 + +e17-extra-modules (0.1-94) unstable; urgency=low + + * [COMP] fix restack effect animation + * [ILLUME2] add code to check opaque property while calculating window's visibility. + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-94 + + -- Doyoun Kang Fri, 23 Sep 2011 09:52:11 +0900 + +e17-extra-modules (0.1-93) unstable; urgency=low + + * [COMP] fix animation policy : raise_above -> hide effect + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-93 + + -- Gwangyeong Mun Wed, 21 Sep 2011 22:42:56 +0900 + +e17-extra-modules (0.1-92) unstable; urgency=low + + * [COMP]Fix e_dialog disappearance problem. + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-92 + + -- Gwangyeong Mun Wed, 21 Sep 2011 21:22:53 +0900 + +e17-extra-modules (0.1-91) unstable; urgency=low + + * [keyrouter] Add overridable EXCLUSIVE_GRAB mode (OR_EXCLUSIVE) + * [COMP] fix quickpanel window's size is not correct case. + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-91 + + -- Gwangyeong Mun Wed, 21 Sep 2011 15:12:50 +0900 + +e17-extra-modules (0.1-90) unstable; urgency=low + + * [keyrouter] 1. Enable e17 keybinding for non-grabbed HW Keys + 2. Prevent bug fix - not freed char* was in code + * [COMP] remove dependencies of Xlib & Xlib_ext + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-90 + + -- Sung-Jin Park Tue, 20 Sep 2011 20:57:16 +0900 + +e17-extra-modules (0.1-89) unstable; urgency=low + + * [COMP] fix Restack Effect - add restack effect's exception handling code + * [ILLUME2] fix internal stack bug + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-89 + + -- Gwangyeong Mun Sun, 18 Sep 2011 08:35:05 +0900 + +e17-extra-modules (0.1-88) unstable; urgency=low + + * [COMP] 1. Add Logging to File Feature + 2. resolve defects from Prevent report - resource leak, unsigned_compare, thread safety issue + * [ILLUME2] 1. Add code to save debug information to file + 2. Fix code detected by prevent + * [keyrouter] Modify Keygrab_Status() to leave keygrab status log in a log file + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-88 + + -- Gwangyeong Mun Fri, 16 Sep 2011 13:23:33 +0900 + +e17-extra-modules (0.1-87) unstable; urgency=low + + * [ILLUME2] 1. Bug fix - incorrect visibility when the lock screen is shown. + 2. Add code to use dlog when a active window is changed. + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-87 + + -- Doyoun Kang Thu, 08 Sep 2011 16:36:47 +0900 + +e17-extra-modules (0.1-86) unstable; urgency=low + + * [COMP] added E_EVENT_BORDER_RESIZE event handling codes to fix border resize bug + * [COMP] fix quickpanel disappearance problem + Problem: when does task switcher show, window resize is not permitted. + Solution : use defer_window_move_resize flag + * [ILLUME2] patch code to resize quickpanel window when a target is rotated + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-86 + + -- Doyoun Kang Wed, 07 Sep 2011 23:02:12 +0900 + +e17-extra-modules (0.1-85) unstable; urgency=low + + * [ILLUME2] Change code to recalculate visibility when lock screen is shown. + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-85 + + -- Doyoun Kang Wed, 07 Sep 2011 13:03:33 +0900 + +e17-extra-modules (0.1-84) unstable; urgency=low + + * [COMP] Fix isf's small window does not show problem. + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-84 + + -- Gwangyeong Mun Tue, 06 Sep 2011 23:38:11 +0900 + +e17-extra-modules (0.1-83) unstable; urgency=low + + * [ILLUME2-SLP] Patch code for 3D driver limitation + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-83 + + -- Doyoun Kang Mon, 05 Sep 2011 23:34:19 +0900 + +e17-extra-modules (0.1-82) unstable; urgency=low + + * [COMP] fix window's position for task manager's jump effect + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-82 + + -- Duna Oh Mon, 05 Sep 2011 17:50:27 +0900 + +e17-extra-modules (0.1-81) unstable; urgency=low + + * [COMP] fix lower effect's check routine + : check effect window's visibility + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-81 + + -- Gwangyeong Mun Fri, 26 Aug 2011 14:04:27 +0900 + +e17-extra-modules (0.1-80) unstable; urgency=low + + * [COMP] changed _e_mod_comp_get_screen_angle to avoid creation of + X_SCREEN_ROTATION atom if it doesn't exist. + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-80 + + -- Gwanglim Lee Thu, 25 Aug 2011 21:36:48 +0900 + +e17-extra-modules (0.1-79) unstable; urgency=low + + * [COMP] 1. move cleanup code of jump effect to on_animate_done(). + 2. apply Jump effect to all active windows, not just windows below task manager. + 3. don't apply Jump effect when task manager is obscured. + 4. fix noeffect bug of task_switcher.edc + 5. Add Lower Effect + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-79 + + -- Gwangyeong Mun Wed, 24 Aug 2011 21:07:43 +0900 + +e17-extra-modules (0.1-78) unstable; urgency=low + + * [ILLUME2] Patch code to calculate window's visibility when a window stack is changed (especially lower) + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-78 + + -- Doyoun Kang Tue, 23 Aug 2011 21:13:01 +0900 + +e17-extra-modules (0.1-77) unstable; urgency=low + + * [ILLUME2] 1.Patch code to update border info list correctly + 2.Change code to handle a transient_for window + [ILLUME2][QP] Fix crash problem - Add code to delete mini controller when a hidden mini controller is destroyed. + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-77 + + -- Doyoun Kang Tue, 23 Aug 2011 15:55:17 +0900 + +e17-extra-modules (0.1-76) unstable; urgency=low + + * [keyrouter] Check external keyboard is attached at booting time + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-76 + + -- Sung-Jin Park Mon, 22 Aug 2011 14:01:52 +0900 + +e17-extra-modules (0.1-75) unstable; urgency=low + + * [COMP] fix Rotation Effect's bug + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-75 + + -- Gwangyeong Mun Fri, 19 Aug 2011 15:56:58 +0900 + +e17-extra-modules (0.1-74) unstable; urgency=low + + * [ILLUME2][QP] Add code to restack quickpanel window when it is added + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-74 + + -- Doyoun Kang Thu, 18 Aug 2011 14:51:35 +0900 + +e17-extra-modules (0.1-73) unstable; urgency=low + + * [COMP] Fix Animation( EDC )'s NoEffect Program + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-73 + + -- Gwangyeong Mun Fri, 12 Aug 2011 18:46:59 +0900 + +e17-extra-modules (0.1-72) unstable; urgency=low + + * 1. Update License + 2. Change module name (illume2-slp, comp-slp) + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-72 + + -- Doyoun Kang Wed, 10 Aug 2011 23:12:11 +0900 + +e17-extra-modules (0.1-71) unstable; urgency=low + + * [ILLUME2][QP] Add code to close quickpanel when the HOME key is pressed. + [COMP] Fix code to update indicator when task manager is open. + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-71 + + -- Doyoun Kang Thu, 08 Aug 2011 14:24:41 +0900 + +e17-extra-modules (0.1-70) unstable; urgency=low + + * [ILLUME2] Add mini controller feature. + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-70 + + -- Doyoun Kang Thu, 04 Aug 2011 14:08:32 +0900 + +e17-extra-modules (0.1-69) unstable; urgency=low + + * Package upload + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-69 + + -- Gwanglim Lee Sun, 31 Jul 2011 01:33:50 +0900 + +e17-extra-modules (0.1-68) unstable; urgency=low + + * [COMP] 1. fix no-effect window disappearing problem. + 2. code cleanup (indentation, padding, whitespaces) + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-68 + + -- Gwanglim Lee Sun, 31 Jul 2011 01:06:52 +0900 + +e17-extra-modules (0.1-67) unstable; urgency=low + + * [COMP] 1. fix to update window when task manager is open and new + window is added. + 2. fix the bug when task manager's hide effect is called before + selected window's restack effect. + 3. add transparency to show/hide effect. + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-67 + + -- Gwanglim Lee Wed, 27 Jul 2011 20:35:47 +0900 + +e17-extra-modules (0.1-66) unstable; urgency=low + + * [COMP] 1. Remove unused files + 2. Modify code for new UX more clearly + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-66 + + -- Duna Oh Wed, 20 Jul 2011 16:45:03 +0900 + +e17-extra-modules (0.1-65) unstable; urgency=low + + * [COMP] 1. fixed a restack problem + 2. fixed a crash problem while showing jump effect + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-65 + + -- Gwanglim Lee Wed, 20 Jul 2011 04:15:03 +0900 + +e17-extra-modules (0.1-64) unstable; urgency=low + + * [ILLUME2] Add code to change and send visibility notify event + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-64 + + -- Doyoun Kang Mon, 18 Jul 2011 16:00:35 +0900 + +e17-extra-modules (0.1-63) unstable; urgency=low + + * [COMP] 1. new UX interaction (VI prototype) - open/close, open task switcher, jump + 2. modify indentation + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-63 + + -- Duna Oh Wed, 13 Jul 2011 14:49:12 +0900 + +e17-extra-modules (0.1-62) unstable; urgency=low + + * Remove Conflicts and Replaces fields in debian/control file + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-62 + + -- Doyoun Kang Fri, 08 Jul 2011 15:43:01 +0900 + +e17-extra-modules (0.1-61) unstable; urgency=low + + * Repackaging according to upgrade e17 + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-61 + + -- Doyoun Kang Tue, 05 Jul 2011 16:15:41 +0900 + +e17-extra-modules (0.1-60) unstable; urgency=low + + * [SBS] Add debian/jobs file to support parallel builds + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-60 + + -- Doyoun Kang Thu, 30 Jun 2011 10:56:12 +0900 + +e17-extra-modules (0.1-59) unstable; urgency=low + + * [COMP] 1. Add dlog info for app launch time + 2. Fix to use bd_del instead of win_destroy in border window delelete case. + 3. Fix bug - don't show window when the comp get event ( BD_HIDE -> BD_SHOW , and keep_unmapped is disabled) + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-59 + + -- Gwangyeong Mun Thu, 16 Jun 2011 13:43:51 +0900 + +e17-extra-modules (0.1-58) unstable; urgency=low + + * [ILLUME2] Fix code detected by SVACE + [COMP] Modify usage of Compositor's black background image + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-58 + + -- Gwangyeong Mun Tue, 07 Jun 2011 21:28:31 +0900 + +e17-extra-modules (0.1-57) unstable; urgency=low + + * [ILLUME2] 1. Add APIs for checking notification/utility type. + 2. Remove unused files (e_mod_kbd.c/h, e_mod_kbd_device.c/h) + 3. Code cleanup + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-57 + + -- Doyoun Kang Thu, 2 Jun 2011 11:31:24 +0900 + +e17-extra-modules (0.1-56) unstable; urgency=low + + * [ILLUME2] changed code to rotate quickpanel when it is shown. + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-56 + + -- Doyoun Kang Fri, 27 May 2011 13:47:57 +0900 + +e17-extra-modules (0.1-55) unstable; urgency=low + + * [COMP] 1. fixed named pixmap handling to get rid of resize artifact. + 2. moved emit code to _e_mod_comp_win_update() for rotation effect. + 3. add opacity, change fps_average_range value (12 to 30) + + [ILLUME2] 1. changed width of border for handling SGX driver bug. + 2. modified _policy_border_resize() to add visible border to lock list. + + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-55 + + -- Gwangyeong Mun Wed, 25 May 2011 21:51:04 +0900 + +e17-extra-modules (0.1-54) unstable; urgency=low + + * [ILLUME2] 1. Change feature (livepanel -> quickpanel) + 2. Remove dependency with appcore + 3. Change quickpanel images + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-54 + + -- Doyoun Kang Fri, 13 May 2011 11:17:23 +0900 + +e17-extra-modules (0.1-53) unstable; urgency=low + + * [COMP] 1. enable dynamically global effect on/off by root window's property + 2. add hib feature. - when does compositor run in hib mode, compositor could load compositor's effect configuration info by X_HIBERNATION_STATE client message. + 3. add fps info which is controled by e_comp_util + 4. merge e17 comp source to support configurable vsync interval + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-53 + + -- Doyoun Kang Thu, 12 May 2011 21:06:56 +0900 + +e17-extra-modules (0.1-52) unstable; urgency=low + + * [ILLUME2] Bug fix - Modified code for handling desktop files + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-52 + + -- Doyoun Kang Wed, 27 Apr 2011 19:52:18 +0900 + +e17-extra-modules (0.1-51) unstable; urgency=low + + * [keyrouter] Add a property/handler for enabling/disabling mouse cursor + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-51 + + -- Sung-Jin Park Wed, 27 Apr 2011 17:15:45 +0900 + +e17-extra-modules (0.1-50) unstable; urgency=low + + * Rollback + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-50 + + -- Doyoun Kang Tue, 26 Apr 2011 22:06:11 +0900 + +e17-extra-modules (0.1-49) unstable; urgency=low + + * [ILLUME2] Bug fix - Modified code for handling desktop files + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-49 + + -- Doyoun Kang Tue, 26 Apr 2011 18:05:42 +0900 + +e17-extra-modules (0.1-48) unstable; urgency=low + + * Adjust quickpanel window height + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-48 + + -- SaeNa Kim Mon, 25 Apr 2011 19:55:42 +0900 + +e17-extra-modules (0.1-47) unstable; urgency=low + + * [ILLUME2-QP] delete codes for hiding quickpanel in mouse_move_calback func + * [KEYROUTER] Sets PropertyNotifyMask as soon as a window is created + * [PACKAGING] Repackaging according to E17 patch (upstream svn rev.58622) + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-47 + + -- Doyoun Kang Thu, 14 Apr 2011 16:42:35 +0900 + +e17-extra-modules (0.1-46) unstable; urgency=low + + * [COMP] fix screen rotation bug + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-46 + + -- Gwangyeong Mun Sun, 10 Apr 2011 17:23:32 +0900 + +e17-extra-modules (0.1-45) unstable; urgency=low + + * [ILLUME2-QP] Adjust mouse event (LIVE_PANEL_THRESHOLD_Y) for hiding quickpanel + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-45 + + -- SaeNa Kim Thu, 07 Apr 2011 16:39:11 +0900 + +e17-extra-modules (0.1-44) unstable; urgency=low + + * [ILLUME2-QP] apply NBEAT UX + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-44 + + -- SaeNa Kim Tue, 05 Apr 2011 10:38:55 +0900 + +e17-extra-modules (0.1-43) unstable; urgency=low + + * [keyrouter] Fix _e_keyrouter_cb_window_create() to check a window's + property even when a window is created + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-43 + + -- Sung-Jin Park Mon, 04 Apr 2011 21:25:10 +0900 + +e17-extra-modules (0.1-42) unstable; urgency=low + + * Repackaging according to E17 patch (svn rev.58169) + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-42 + + -- Doyoun Kang Wed, 30 Mar 2011 10:46:43 +0900 + +e17-extra-modules (0.1-41) unstable; urgency=low + + * [ILLUME2] Change indicator's level when active window's type is changed to NORMAL from NOTIFICATION + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-41 + + -- Doyoun Kang Sun, 27 Mar 2011 18:26:56 +0900 + +e17-extra-modules (0.1-40) unstable; urgency=low + + * Delete policy for indicator rotation + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-40 + + -- SaeNa Kim Fri, 25 Mar 2011 11:54:27 +0900 + +e17-extra-modules (0.1-39) unstable; urgency=low + + * E17 upgrade - svn rev.57458 + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-39 + + -- Doyoun Kang Wed, 23 Mar 2011 19:56:19 +0900 + +e17-extra-modules (0.1-38) unstable; urgency=low + + * [keyrouter] Fix DeliverDeviceKeyEvents() for deliverying key(s) grabbed in SHARED_GRAB_MODE + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-38 + + -- Sung-Jin Park Wed, 23 Mar 2011 15:40:05 +0900 + +e17-extra-modules (0.1-37) unstable; urgency=low + + * [ILLUME2][QP] Patch quickpanel code according to changing efreet + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-37 + + -- Doyoun Kang Wed, 16 Mar 2011 18:47:39 +0900 + +e17-extra-modules (0.1-36) unstable; urgency=low + + * [ILLUME2] Change code to enable stack_trim in arm environment only + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-36 + + -- Doyoun Kang Tue, 15 Mar 2011 22:41:05 +0900 + +e17-extra-modules (0.1-35) unstable; urgency=low + + * [ILLUME2] Add malloc_trim and stack_trim + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-35 + + -- Doyoun Kang Fri, 11 Mar 2011 10:33:58 +0900 + +e17-extra-modules (0.1-34) unstable; urgency=low + + * [ILLUME2] Change indicator and quickpanel's layer + * [COMP] Remove build warning + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-34 + + -- Doyoun Kang Sat, 05 Mar 2011 14:25:43 +0900 + +e17-extra-modules (0.1-33) unstable; urgency=low + + * [keyrouter] Remove warning and unused function + * [ILLUME2] Remove build warning + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-33 + + -- Sung-Jin Park Wed, 02 Mar 2011 19:35:25 +0900 + +e17-extra-modules (0.1-32) unstable; urgency=low + + * [ILLUME2] Add code to change the window's notification level if it's transient_for window is notication type + * [COMP] Change policy of restack effect + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-32 + + -- Doyoun Kang Fri, 25 Feb 2011 15:56:44 +0900 + +e17-extra-modules (0.1-31) unstable; urgency=low + + * [wmready] Add code to create .wm_ready file + * [ILLUME2-QP] Add configuration value for quickpanel's launching timer + * [ILLUME2] PNG optimization + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-31 + + -- Doyoun Kang Wed, 23 Feb 2011 08:59:00 +0900 + +e17-extra-modules (0.1-30) unstable; urgency=low + + * [keyrouter] Modify _e_keyrouter_device_add() and _e_keyrouter_set_keyboard_exist() + to update keymap when a new keyboard device is added + * [keyrouter] Fix code not to make OVERRUN_STATIC detected by prevent + * [keyrouter] Remove whitespaces + * [ILLUME2,COMP] Fix code detected by prevent + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-30 + + -- Sung-Jin Park Wed, 16 Feb 2011 10:00:44 +0900 + +e17-extra-modules (0.1-29) unstable; urgency=low + + * [ILLUME2-QP] rollback livepanel + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-29 + + -- SaeNa Kim Tue, 15 Feb 2011 15:56:34 +0900 + +e17-extra-modules (0.1-28) unstable; urgency=low + + * [COMP] Disable Demo Feature : Live Magazine & Menu-Screen Demo Animation + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-28 + + -- Gwangyeong Mun Mon, 14 Feb 2011 14:56:31 +0900 + +e17-extra-modules (0.1-27) unstable; urgency=low + + * [COMP] Change Animation : Live Magazine & Menu-Screen Demo Animation + - Comp wait for completion of Menu-screen or Live Magazine 's restack + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-27 + + -- Gwangyeong Mun Wed, 09 Feb 2011 20:58:43 +0900 + +e17-extra-modules (0.1-26) unstable; urgency=low + + * [ILLUME2-QP] Temporal modification for MWC demo - displaying only quickpanel + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-26 + + -- SaeNa Kim Wed, 09 Feb 2011 15:23:06 +0900 + +e17-extra-modules (0.1-25) unstable; urgency=low + + * [COMP] fix problem which is noise window appearing when non-EFL's window + is showing. to fix it, add a check code that checks and skips first damage. + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-25 + + -- Gwanglim Lee Tue, 08 Feb 2011 22:52:24 +0900 + +e17-extra-modules (0.1-24) unstable; urgency=low + + * [COMP] Add Demo Feature : Live Magazine & Menu-Screen Demo Animation + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-24 + + -- Gwangyeong Mun Tue, 08 Feb 2011 14:15:27 +0900 + +e17-extra-modules (0.1-23) unstable; urgency=low + + * [COMP] FIXME: When Screen is rotated by Comp. EDJE Map doesn't work correctly. so prevent rotation effect. It's temporal code. + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-23 + + -- Gwangyeong Mun Mon, 07 Feb 2011 12:04:07 +0900 + +e17-extra-modules (0.1-22) unstable; urgency=low + + * [keyrouter] + 1. Add XI_HierarchyChanged event handler + 2. Add _e_keyrouter_set_keyboard_exist() to set the property for the + existence of external keyboard + 3. Modify _e_keyrouter_set_mouse_exist() to set the property for the + existence of external mouse + 4. Add _e_keyrouter_device_add/remove() + 5. Add _e_keyrouter_is_relative_device() to check a device is relative + device or not + 6. Remove a check statement of property atomXMouseExist in + _e_keyrouter_cb_window_property() + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-22 + + -- Sung-Jin Park Tue, 01 Feb 2011 13:36:11 +0900 + +e17-extra-modules (0.1-21) unstable; urgency=low + + * [keyrouter] + 1. Modify mouse-rbutton-popup to grab button 1 only when the popup was shown and to ungrab button 1 when the popup was disappeared + 2. Fix popup size and remove un-needed line + 3. Put most of global variables into keyrouter structure as member variables + 4. Fix/remove warnging lines when compiling keyrouter module + 5. Modify mouse-rbutton-popup to grab button 1 only when the popup was shown and to ungrab button 1 when the popup was disappeared + 6. Fix popup size and remove un-needed line + 7. Add NULL check of keyrouter.popup and remove unnecessary space and lines + 8. Add XI2 device hierarchy event handler for addition/removal of keyboard and pointer devices + * [COMP] + 1. Add feature No rotation Effect ( which is implemented by CUSTOM effectc / rotatation property change ) + 2. Add Show / Hide Effect: Custom0, Custom1 + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-21 + + -- Gwangyeong Mun Mon, 31 Jan 2011 17:03:56 +0900 + +e17-extra-modules (0.1-20) unstable; urgency=low + + * [COMP] apply screen rotation + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-20 + + -- Gwanglim Lee Sat, 22 Jan 2011 21:49:51 +0900 + +e17-extra-modules (0.1-19) unstable; urgency=low + + * [ILLUME2][QP] Add code to hide quickpanel when a END_KEY is pressed + [ILLUME2] Add code to lock/unlock screen + [ILLUME2] Patch code for split screen + [COMP] Add export function for e17 module + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-19 + + -- Doyoun Kang Thu, 20 Jan 2011 14:11:50 +0900 + +e17-extra-modules (0.1-18) unstable; urgency=low + + * [ILLUME2][QP] 1.Change code to create/destroy a E_Popup when the quickpanel is shown/hidden. + 2.Replace _e_mod_quickpanel_hide to e_mod_quickpanel_hide. + * [ILLUME2] Change code for split screen + - change default slot id of window to E_ILLUME_SLOT_ID_NONE. + - change code to split window only when all slots are occupied. + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-18 + + -- Doyoun Kang Mon, 17 Jan 2011 13:30:36 +0900 + +e17-extra-modules (0.1-17) unstable; urgency=low + + * [COMP] Fix Effect's Black Screen disapearing case + details: while comp shows Application Launching Effect, if comp get rotation event. + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-17 + + -- Gwangyeong Mun Thu, 13 Jan 2011 21:04:55 +0900 + +e17-extra-modules (0.1-16) unstable; urgency=low + + * [ILLUME2] Change code for handling full-screen state window + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-16 + + -- Doyoun Kang Wed, 12 Jan 2011 14:56:26 +0900 + +e17-extra-modules (0.1-15) unstable; urgency=low + + * [keyrouter] Add mouse rbutton popup implementation + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-15 + + -- Sung-Jin Park Wed, 12 Jan 2011 13:45:33 +0900 + +e17-extra-modules (0.1-14) unstable; urgency=low + + * [COMP] change fake effect's window policy + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-14 + + -- Gwangyeong Mun Tue, 11 Jan 2011 17:38:44 +0900 + +e17-extra-modules (0.1-13) unstable; urgency=low + + * [ILLUME2] Add code to check indicator's layer when a indicator is created. + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-13 + + -- Doyoun Kang Sat, 08 Jan 2011 13:10:48 +0900 + +e17-extra-modules (0.1-12) unstable; urgency=low + + * [ILLUME2] 1.Add code to update indicator's layer in handling ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE property. + 2.Add code to set indicator's geometry to root window. + 3.Change indicator's rotation logic. + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-12 + + -- Doyoun Kang Fri, 07 Jan 2011 17:41:19 +0900 + +e17-extra-modules (0.1-11) unstable; urgency=low + + * [ILLUME2] Bug fix - change notification stack in handling configure request + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-11 + + -- Doyoun Kang Thu, 06 Jan 2011 11:33:22 +0900 + +e17-extra-modules (0.1-10) unstable; urgency=low + + * [keyrouter][wmready] Add COPYING and AUTHORS files + * [ILLUME2-QP] Bugfix - file path mismatch of startup desktop in .order file + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-10 + + -- SaeNa Kim Wed, 05 Jan 2011 15:42:32 +0900 + +e17-extra-modules (0.1-9) unstable; urgency=low + + * [ILLUME2] Add code for HDMI rotation + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-9 + + -- Doyoun Kang Wed, 05 Jan 2011 09:32:49 +0900 + +e17-extra-modules (0.1-8) unstable; urgency=low + + * [ILLUME2] 1. Add feature - logger + 2. Code cleanup + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-8 + + -- Doyoun Kang Mon, 03 Jan 2011 13:23:04 +0900 + +e17-extra-modules (0.1-7) unstable; urgency=low + + * [ILLUME2] Bug fix for notification stack + * [ILLUME2] Add -i option to the vconftool command + * [ILLUME2-QP] Bug fix for Livepanel touch event + * [WMREADY] Add -i option to the vconftool command + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-7 + + -- Doyoun Kang Wed, 29 Dec 2010 19:18:46 +0900 + +e17-extra-modules (0.1-6) unstable; urgency=low + + * [KEYROUTER] Modify rules and .install file to install omitted scripts in keyrouter/scripts + * [ILLUME2][WMREADY] Change code to use /usr/bin/vconftool for security + * [ILLUME2] Change code to include active window's handle in client message when a root angle is changed + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-6 + + -- Doyoun Kang Fri, 24 Dec 2010 15:36:48 +0900 + +e17-extra-modules (0.1-5) unstable; urgency=low + + * [ILLUME2] Add feature to calculate visibility + [COMP ] Add code to set the overlay window handle to root property + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-5 + + -- Doyoun Kang Thu, 23 Dec 2010 10:56:56 +0900 + +e17-extra-modules (0.1-4) unstable; urgency=low + + * [COMP] add custom effect feature + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-4 + + -- Gwangyeong Mun Wed, 22 Dec 2010 18:11:43 +0900 + +e17-extra-modules (0.1-3) unstable; urgency=low + + * [ILLUME2-QP] change code to use e_border_stack_below + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-3 + + -- Doyoun Kang Sat, 18 Dec 2010 15:01:02 +0900 + +e17-extra-modules (0.1-2) unstable; urgency=low + + * [ILLUME2-QP] quickpanel_launcher - make dependency with appcore + * [COMP] fix double free problem on xlib backend + * [e17-extra-modules] Add omitted files and add a dependency on libappcore-efl-dev + * [ILLUME2-QP] Bugfix for H0100114260 - Add draw_done property to _E_Quickpanel_Item + * [COMP] use native surface version, type + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-2 + + -- Doyoun Kang Wed, 15 Dec 2010 12:15:36 +0900 + +e17-extra-modules (0.1-1) unstable; urgency=low + + * Initial release for e17-extra-modules (illume2, comp, keyrouter, wmready) + * Git: 165.213.180.234:slp/pkgs/e/e17-extra-modules + * Tag: e17-extra-modules_0.1-1 + + -- Doyoun Kang Thu, 02 Dec 2010 13:57:28 +0900 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..7ed6ff8 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +5 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..eda3627 --- /dev/null +++ b/debian/control @@ -0,0 +1,21 @@ +Source: e17-extra-modules +Priority: extra +Maintainer: Doyoun Kang , Gwanglim Lee , Gwangyeong Mun , Sangjin Lee , Sung-Jin Park , Duna Oh +Build-Depends: debhelper (>= 5), e17-dev, libslp-utilx-dev, libelm-dev, dlog-dev +Standards-Version: 3.8.3 +Section: libs + +Package: e17-extra-modules +Section: libs +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: The E17 Extra Modules + The E17 extra modules consists of modules made by SAMSUNG. + +Package: e17-extra-modules-dbg +Section: libs +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: The debug version of E17 Extra Modules + The E17 extra modules consists of modules made by SAMSUNG. + diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..a0a8577 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,500 @@ +The contents of this package were downloaded from +http://xorg.freedesktop.org/releases/individual/app/ +It contains the bitmap, x11perf, xcalc, xclock, xcursorgen, xload, xmag, +xmore, xwud, oclock, xbiff, xclipboard, xconsole, xditview, xeyes, xgc, xlogo, +xman and xwd applications. + +bitmap: + Copyright 1988, 1993, 1998 The Open Group + + Permission to use, copy, modify, distribute, and sell this software and its + documentation for any purpose is hereby granted without fee, provided that + the above copyright notice appear in all copies and that both that + copyright notice and this permission notice appear in supporting + documentation. + + 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 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR + OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name of The Open Group shall + not be used in advertising or otherwise to promote the sale, use or + other dealings in this Software without prior written authorization + from The Open Group. + +oclock: + Copyright 1989, 1998 The Open Group + + Permission to use, copy, modify, distribute, and sell this software and its + documentation for any purpose is hereby granted without fee, provided that + the above copyright notice appear in all copies and that both that + copyright notice and this permission notice appear in supporting + documentation. + + 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 + OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name of The Open Group shall not be + used in advertising or otherwise to promote the sale, use or other dealings + in this Software without prior written authorization from The Open Group. + +x11perf: + Copyright 1988, 1989 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + + Permission to use, copy, modify, and distribute this software and its + documentation for any purpose and without fee is hereby granted, + provided that the above copyright notice appear in all copies and that + both that copyright notice and this permission notice appear in + supporting documentation, and that the name of Digital not be + used in advertising or publicity pertaining to distribution of the + software without specific, written prior permission. + + DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING + ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL + DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR + ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, + WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, + ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS + SOFTWARE. + +xbiff: + Copyright (c) 1988 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 CONNECTION 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 dealings in this Software without prior written authorization + from the X Consortium. + +xcalc: + Copyright (c) 1989 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 CONNECTION 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 dealings in this Software without prior written authorization + from the X Consortium. + + */ + /* $XFree86$ */ + + /* + * xcalc.c - a hand calculator for the X Window system + * + * Original Author: John H. Bradley, University of Pennsylvania + * (bradley@cis.upenn.edu) March, 1987 + * RPN mode added and port to X11 by Mark Rosenstein, MIT Project Athena + * Rewritten to be an Xaw and Xt client by Donna Converse, MIT X Consortium + */ + +xclipboard: + Copyright 1989, 1998 The Open Group + + Permission to use, copy, modify, distribute, and sell this software and its + documentation for any purpose is hereby granted without fee, provided that + the above copyright notice appear in all copies and that both that + copyright notice and this permission notice appear in supporting + documentation. + + 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 + OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name of The Open Group shall not be + used in advertising or otherwise to promote the sale, use or other dealings + in this Software without prior written authorization from The Open Group. + * * + * Author: Ralph Swick, DEC/Project Athena + * Updated for R4: Chris D. Peterson, MIT X Consortium. + * Reauthored by: Keith Packard, MIT X Consortium. + +xclock: + * xclock -- Hacked from Tony Della Fera's much hacked clock program. + * + * "-strftime" option added by George Belotsky, Open Light Software Inc. + */ + + /* + Copyright 1989, 1998 The Open Group + + Permission to use, copy, modify, distribute, and sell this software and its + documentation for any purpose is hereby granted without fee, provided that + the above copyright notice appear in all copies and that both that + copyright notice and this permission notice appear in supporting + documentation. + + 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 + OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name of The Open Group shall not be + used in advertising or otherwise to promote the sale, use or other dealings + in this Software without prior written authorization from The Open Group. + +xconsole: + Copyright 1990, 1998 The Open Group + + Permission to use, copy, modify, distribute, and sell this software and its + documentation for any purpose is hereby granted without fee, provided that + the above copyright notice appear in all copies and that both that + copyright notice and this permission notice appear in supporting + documentation. + + 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 + OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name of The Open Group shall not be + used in advertising or otherwise to promote the sale, use or other dealings + in this Software without prior written authorization from The Open Group. + * + * Author: Keith Packard, MIT X Consortium + */ + +xcursorgen: + Copyright (C) 2002 Manish Singh + + Permission to use, copy, modify, distribute, and sell this software and its + documentation for any purpose is hereby granted without fee, provided that + the above copyright notice appear in all copies and that both that + copyright notice and this permission notice appear in supporting + documentation, and that the name of Manish Singh not be used in + advertising or publicity pertaining to distribution of the software without + specific, written prior permission. Manish Singh makes no + representations about the suitability of this software for any purpose. It + is provided "as is" without express or implied warranty. + + MANISH SINGH DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + EVENT SHALL MANISH SINGH BE LIABLE FOR ANY SPECIAL, INDIRECT OR + CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + PERFORMANCE OF THIS SOFTWARE. + +xditview: + Copyright (c) 1991 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 CONNECTION 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 dealings in this Software without prior written authorization + from the X Consortium. + +xeyes: + Copyright (c) 1991 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 CONNECTION 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 dealings in this Software without prior written authorization + from the X Consortium. + +xgc: + Copyright (c) 1991 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 CONNECTION 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 dealings in this Software without prior written authorization + from the X Consortium. + +xload: + Copyright (c) 1989 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 CONNECTION 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 dealings in this Software without prior written authorization + from the X Consortium. + +xlogo: + Copyright 1989, 1998 The Open Group + + Permission to use, copy, modify, distribute, and sell this software and its + documentation for any purpose is hereby granted without fee, provided that + the above copyright notice appear in all copies and that both that + copyright notice and this permission notice appear in supporting + documentation. + + 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 + OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name of The Open Group shall not be + used in advertising or otherwise to promote the sale, use or other dealings + in this Software without prior written authorization from The Open Group. + +xmag: + Copyright 1991, 1998 The Open Group + + Permission to use, copy, modify, distribute, and sell this software and its + documentation for any purpose is hereby granted without fee, provided that + the above copyright notice appear in all copies and that both that + copyright notice and this permission notice appear in supporting + documentation. + + 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 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR + OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name of The Open Group shall + not be used in advertising or otherwise to promote the sale, use or + other dealings in this Software without prior written authorization + from The Open Group. + +xman: + Copyright (c) 1987, 1988 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 CONNECTION 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 dealings in this Software without prior written authorization + from the X Consortium. + + Author: Chris D. Peterson, MIT Project Athena + Created: October 22, 1987 + +xmore: + Copyright 2004 Roland Mainz + + Permission to use, copy, modify, distribute, and sell this software and its + documentation for any purpose is hereby granted without fee, provided that + the above copyright notice appear in all copies and that both that + copyright notice and this permission notice appear in supporting + documentation. + + 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 + OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name of The Open Group shall not be + used in advertising or otherwise to promote the sale, use or other dealings + in this Software without prior written authorization from The Open Group. + +xwd: + Copyright 1987, 1998 The Open Group + + Permission to use, copy, modify, distribute, and sell this software and its + documentation for any purpose is hereby granted without fee, provided that + the above copyright notice appear in all copies and that both that + copyright notice and this permission notice appear in supporting + documentation. + + 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 + OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name of The Open Group shall not be + used in advertising or otherwise to promote the sale, use or other dealings + in this Software without prior written authorization from The Open Group. + +xwud: + Copyright 1985, 1986, 1988, 1998 The Open Group + + Permission to use, copy, modify, distribute, and sell this software and its + documentation for any purpose is hereby granted without fee, provided that + the above copyright notice appear in all copies and that both that + copyright notice and this permission notice appear in supporting + documentation. + + 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 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR + OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name of The Open Group shall + not be used in advertising or otherwise to promote the sale, use or + other dealings in this Software without prior written authorization + from The Open Group. diff --git a/debian/e17-extra-modules.install b/debian/e17-extra-modules.install new file mode 100755 index 0000000..7369737 --- /dev/null +++ b/debian/e17-extra-modules.install @@ -0,0 +1,7 @@ +usr/lib/enlightenment/modules/*/*/*.so +usr/lib/enlightenment/modules/*/*.desktop +usr/lib/enlightenment/modules/*/e-module-*.edj +usr/lib/enlightenment/modules/illume2-slp/policies +usr/lib/enlightenment/modules/illume2-slp/quickpanel.edj +usr/bin/* +usr/share/enlightenment/data/themes/shadow.edj diff --git a/debian/jobs b/debian/jobs new file mode 100755 index 0000000..e69de29 diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..0694d47 --- /dev/null +++ b/debian/rules @@ -0,0 +1,115 @@ +#!/usr/bin/make -f +# debian/rules for the Debian xutils package. +# Copyright © 2004 Scott James Remnant +# Copyright © 2005 Daniel Stone +# Copyright © 2005 David Nusinow + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# set this to the name of the main shlib's binary package +PACKAGE = e17-extra-modules +PREFIX ?= /usr + +#include debian/xsfbs/xsfbs.mk + +# This package contains multiple modules as shipped by upstream. Each module is # contained in a subdirectory in the root dir of the package. You must list each +# subdirectory explicitly so that the build system knows what to build +DEF_SUBDIRS=comp-slp illume2-slp keyrouter wmready +SUBDIRS=$(DEF_SUBDIRS) +BUILD_STAMPS = $(addprefix $(STAMP_DIR)/build-,$(SUBDIRS)) + +CFLAGS = -Wall -g -fPIC -rdynamic +CXXFLAGS += -fPIC +LDFLAGS += -Wl,--hash-style=both -Wl,--as-needed -Wl,--rpath=$(PREFIX)/lib + +# Machine name +MACHINE_NAME=$(shell uname -m) + +ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif +ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) + NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) + MAKEFLAGS += -j$(NUMJOBS) +endif + +ifeq ($(MACHINE_NAME), arm) + CFLAGS += -D_ENV_ARM +endif + +DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE)) + confflags += --build=$(DEB_HOST_GNU_TYPE) +else + confflags += --build=$(DEB_HOST_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) +endif + +build: + >$@ + for FILE in $(SUBDIRS); do \ + mkdir -p "$$FILE"-obj-$(DEB_BUILD_GNU_TYPE) ; \ + cd "$$FILE" && ./autogen.sh && cd ..; \ + cd "$$FILE"-obj-$(DEB_BUILD_GNU_TYPE) && ../"$$FILE"/configure --prefix=/usr CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" && $(MAKE) || exit ; \ + cd ..; \ + done + >$@ + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + + rm -f config.cache config.log config.status + rm -f */config.cache */config.log */config.status + rm -f conftest* */conftest* + rm -rf autom4te.cache */autom4te.cache + rm -rf *-obj-* + rm -f build + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + +ifneq (,$(filter keyrouter,$(SUBDIRS))) + mkdir -p $(CURDIR)/debian/tmp/usr/bin + cp -af $(CURDIR)/keyrouter/scripts/* $(CURDIR)/debian/tmp/usr/bin/ +endif + for FILE in $(SUBDIRS); do \ + cd "$$FILE"-obj-$(DEB_BUILD_GNU_TYPE) && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install ; \ + cd ..; \ + done + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + + dh_installdocs + dh_install --sourcedir=debian/tmp --list-missing + dh_installmenu + dh_installchangelogs + dh_link + dh_strip --dbg-package=$(PACKAGE)-dbg + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info + dh_gencontrol + dh_md5sums + dh_builddeb + +# Build architecture-independent files here. +binary-indep: build install +# Nothing to do + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install diff --git a/illume2-slp/ABOUT-NLS b/illume2-slp/ABOUT-NLS new file mode 100644 index 0000000..2f50c66 --- /dev/null +++ b/illume2-slp/ABOUT-NLS @@ -0,0 +1,768 @@ +Notes on the Free Translation Project +************************************* + +Free software is going international! The Free Translation Project is +a way to get maintainers of free software, translators, and users all +together, so that will gradually become able to speak many languages. +A few packages already provide translations for their messages. + + If you found this `ABOUT-NLS' file inside a distribution, you may +assume that the distributed package does use GNU `gettext' internally, +itself available at your nearest GNU archive site. But you do _not_ +need to install GNU `gettext' prior to configuring, installing or using +this package with messages translated. + + Installers will find here some useful hints. These notes also +explain how users should proceed for getting the programs to use the +available translations. They tell how people wanting to contribute and +work at translations should contact the appropriate team. + + When reporting bugs in the `intl/' directory or bugs which may be +related to internationalization, you should tell about the version of +`gettext' which is used. The information can be found in the +`intl/VERSION' file, in internationalized packages. + +Quick configuration advice +========================== + +If you want to exploit the full power of internationalization, you +should configure it using + + ./configure --with-included-gettext + +to force usage of internationalizing routines provided within this +package, despite the existence of internationalizing capabilities in the +operating system where this package is being installed. So far, only +the `gettext' implementation in the GNU C library version 2 provides as +many features (such as locale alias, message inheritance, automatic +charset conversion or plural form handling) as the implementation here. +It is also not possible to offer this additional functionality on top +of a `catgets' implementation. Future versions of GNU `gettext' will +very likely convey even more functionality. So it might be a good idea +to change to GNU `gettext' as soon as possible. + + So you need _not_ provide this option if you are using GNU libc 2 or +you have installed a recent copy of the GNU gettext package with the +included `libintl'. + +INSTALL Matters +=============== + +Some packages are "localizable" when properly installed; the programs +they contain can be made to speak your own native language. Most such +packages use GNU `gettext'. Other packages have their own ways to +internationalization, predating GNU `gettext'. + + By default, this package will be installed to allow translation of +messages. It will automatically detect whether the system already +provides the GNU `gettext' functions. If not, the GNU `gettext' own +library will be used. This library is wholly contained within this +package, usually in the `intl/' subdirectory, so prior installation of +the GNU `gettext' package is _not_ required. Installers may use +special options at configuration time for changing the default +behaviour. The commands: + + ./configure --with-included-gettext + ./configure --disable-nls + +will respectively bypass any pre-existing `gettext' to use the +internationalizing routines provided within this package, or else, +_totally_ disable translation of messages. + + When you already have GNU `gettext' installed on your system and run +configure without an option for your new package, `configure' will +probably detect the previously built and installed `libintl.a' file and +will decide to use this. This might be not what is desirable. You +should use the more recent version of the GNU `gettext' library. I.e. +if the file `intl/VERSION' shows that the library which comes with this +package is more recent, you should use + + ./configure --with-included-gettext + +to prevent auto-detection. + + The configuration process will not test for the `catgets' function +and therefore it will not be used. The reason is that even an +emulation of `gettext' on top of `catgets' could not provide all the +extensions of the GNU `gettext' library. + + Internationalized packages have usually many `po/LL.po' files, where +LL gives an ISO 639 two-letter code identifying the language. Unless +translations have been forbidden at `configure' time by using the +`--disable-nls' switch, all available translations are installed +together with the package. However, the environment variable `LINGUAS' +may be set, prior to configuration, to limit the installed set. +`LINGUAS' should then contain a space separated list of two-letter +codes, stating which languages are allowed. + +Using This Package +================== + +As a user, if your language has been installed for this package, you +only have to set the `LANG' environment variable to the appropriate +`LL_CC' combination. Here `LL' is an ISO 639 two-letter language code, +and `CC' is an ISO 3166 two-letter country code. For example, let's +suppose that you speak German and live in Germany. At the shell +prompt, merely execute `setenv LANG de_DE' (in `csh'), +`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash'). +This can be done from your `.login' or `.profile' file, once and for +all. + + You might think that the country code specification is redundant. +But in fact, some languages have dialects in different countries. For +example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The +country code serves to distinguish the dialects. + + The locale naming convention of `LL_CC', with `LL' denoting the +language and `CC' denoting the country, is the one use on systems based +on GNU libc. On other systems, some variations of this scheme are +used, such as `LL' or `LL_CC.ENCODING'. You can get the list of +locales supported by your system for your country by running the command +`locale -a | grep '^LL''. + + Not all programs have translations for all languages. By default, an +English message is shown in place of a nonexistent translation. If you +understand other languages, you can set up a priority list of languages. +This is done through a different environment variable, called +`LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG' +for the purpose of message handling, but you still need to have `LANG' +set to the primary language; this is required by other parts of the +system libraries. For example, some Swedish users who would rather +read translations in German than English for when Swedish is not +available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'. + + Special advice for Norwegian users: The language code for Norwegian +bokma*l changed from `no' to `nb' recently (in 2003). During the +transition period, while some message catalogs for this language are +installed under `nb' and some older ones under `no', it's recommended +for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and +older translations are used. + + In the `LANGUAGE' environment variable, but not in the `LANG' +environment variable, `LL_CC' combinations can be abbreviated as `LL' +to denote the language's main dialect. For example, `de' is equivalent +to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT' +(Portuguese as spoken in Portugal) in this context. + +Translating Teams +================= + +For the Free Translation Project to be a success, we need interested +people who like their own language and write it well, and who are also +able to synergize with other translators speaking the same language. +Each translation team has its own mailing list. The up-to-date list of +teams can be found at the Free Translation Project's homepage, +`http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams" +area. + + If you'd like to volunteer to _work_ at translating messages, you +should become a member of the translating team for your own language. +The subscribing address is _not_ the same as the list itself, it has +`-request' appended. For example, speakers of Swedish can send a +message to `sv-request@li.org', having this message body: + + subscribe + + Keep in mind that team members are expected to participate +_actively_ in translations, or at solving translational difficulties, +rather than merely lurking around. If your team does not exist yet and +you want to start one, or if you are unsure about what to do or how to +get started, please write to `translation@iro.umontreal.ca' to reach the +coordinator for all translator teams. + + The English team is special. It works at improving and uniformizing +the terminology in use. Proven linguistic skill are praised more than +programming skill, here. + +Available Packages +================== + +Languages are not equally supported in all packages. The following +matrix shows the current state of internationalization, as of January +2004. The matrix shows, in regard of each package, for which languages +PO files have been submitted to translation coordination, with a +translation percentage of at least 50%. + + Ready PO files af am ar az be bg bs ca cs da de el en en_GB eo es + +----------------------------------------------------+ + a2ps | [] [] [] [] | + aegis | () | + ant-phone | () | + anubis | | + ap-utils | | + aspell | [] | + bash | [] [] [] [] | + batchelor | | + bfd | [] [] | + binutils | [] [] | + bison | [] [] [] | + bluez-pin | [] [] [] | + clisp | | + clisp | [] [] [] | + console-tools | [] [] | + coreutils | [] [] [] [] | + cpio | [] [] [] | + darkstat | [] () [] | + diffutils | [] [] [] [] [] [] [] | + e2fsprogs | [] [] [] | + enscript | [] [] [] [] | + error | [] [] [] [] [] | + fetchmail | [] () [] [] [] [] | + fileutils | [] [] [] | + findutils | [] [] [] [] [] [] [] | + flex | [] [] [] [] | + fslint | | + gas | [] | + gawk | [] [] [] [] | + gbiff | [] | + gcal | [] | + gcc | [] [] | + gettext | [] [] [] [] [] | + gettext-examples | [] [] [] [] | + gettext-runtime | [] [] [] [] [] | + gettext-tools | [] [] [] | + gimp-print | [] [] [] [] [] | + gliv | | + glunarclock | [] [] | + gnubiff | [] | + gnucash | [] () [] [] | + gnucash-glossary | [] () [] | + gnupg | [] () [] [] [] [] | + gpe-aerial | [] | + gpe-beam | [] [] | + gpe-calendar | [] [] | + gpe-clock | [] [] | + gpe-conf | [] [] | + gpe-contacts | [] [] | + gpe-edit | [] | + gpe-go | [] | + gpe-login | [] [] | + gpe-ownerinfo | [] [] | + gpe-sketchbook | [] [] | + gpe-su | [] [] | + gpe-taskmanager | [] [] | + gpe-timesheet | [] | + gpe-today | [] [] | + gpe-todo | [] [] | + gphoto2 | [] [] [] [] | + gprof | [] [] [] | + gpsdrive | () () () | + gramadoir | [] | + grep | [] [] [] [] [] [] | + gretl | [] | + gtick | [] () | + hello | [] [] [] [] [] [] | + id-utils | [] [] | + indent | [] [] [] [] | + iso_3166 | [] [] [] [] [] [] [] [] [] [] | + iso_3166_1 | [] [] [] [] [] [] | + iso_3166_2 | | + iso_3166_3 | [] | + iso_4217 | [] [] [] [] | + iso_639 | | + jpilot | [] [] [] | + jtag | | + jwhois | [] | + kbd | [] [] [] [] [] | + latrine | () | + ld | [] [] | + libc | [] [] [] [] [] [] | + libgpewidget | [] [] | + libiconv | [] [] [] [] [] | + lifelines | [] () | + lilypond | [] | + lingoteach | | + lingoteach_lessons | () () | + lynx | [] [] [] [] | + m4 | [] [] [] [] | + mailutils | [] [] | + make | [] [] [] | + man-db | [] () [] [] () | + minicom | [] [] [] | + mysecretdiary | [] [] [] | + nano | [] () [] [] [] | + nano_1_0 | [] () [] [] [] | + opcodes | [] | + parted | [] [] [] [] [] | + ptx | [] [] [] [] [] | + python | | + radius | [] | + recode | [] [] [] [] [] [] [] | + rpm | [] [] | + screem | | + scrollkeeper | [] [] [] [] [] [] | + sed | [] [] [] [] [] [] | + sh-utils | [] [] [] | + shared-mime-info | | + sharutils | [] [] [] [] [] [] | + silky | () | + skencil | [] () [] | + sketch | [] () [] | + soundtracker | [] [] [] | + sp | [] | + tar | [] [] [] [] | + texinfo | [] [] [] | + textutils | [] [] [] [] | + tin | () () | + tp-robot | | + tuxpaint | [] [] [] [] [] [] [] | + unicode-han-tra... | | + unicode-transla... | | + util-linux | [] [] [] [] [] | + vorbis-tools | [] [] [] [] | + wastesedge | () | + wdiff | [] [] [] [] | + wget | [] [] [] [] [] [] | + xchat | [] [] [] [] | + xfree86_xkb_xml | [] [] | + xpad | [] | + +----------------------------------------------------+ + af am ar az be bg bs ca cs da de el en en_GB eo es + 4 0 0 1 9 4 1 40 41 60 78 17 1 5 13 68 + + et eu fa fi fr ga gl he hr hu id is it ja ko lg + +-------------------------------------------------+ + a2ps | [] [] [] () () | + aegis | | + ant-phone | [] | + anubis | [] | + ap-utils | [] | + aspell | [] [] | + bash | [] [] | + batchelor | [] [] | + bfd | [] | + binutils | [] [] | + bison | [] [] [] [] | + bluez-pin | [] [] [] [] [] | + clisp | | + clisp | [] | + console-tools | | + coreutils | [] [] [] [] [] [] | + cpio | [] [] [] [] | + darkstat | () [] [] [] | + diffutils | [] [] [] [] [] [] [] | + e2fsprogs | | + enscript | [] [] | + error | [] [] [] [] | + fetchmail | [] | + fileutils | [] [] [] [] [] [] | + findutils | [] [] [] [] [] [] [] [] [] [] [] | + flex | [] [] [] | + fslint | [] | + gas | [] | + gawk | [] [] [] | + gbiff | [] | + gcal | [] | + gcc | [] | + gettext | [] [] [] | + gettext-examples | [] [] | + gettext-runtime | [] [] [] [] [] | + gettext-tools | [] [] [] | + gimp-print | [] [] | + gliv | () | + glunarclock | [] [] [] [] | + gnubiff | [] | + gnucash | () [] | + gnucash-glossary | [] | + gnupg | [] [] [] [] [] [] [] | + gpe-aerial | [] | + gpe-beam | [] | + gpe-calendar | [] [] [] | + gpe-clock | [] | + gpe-conf | [] | + gpe-contacts | [] [] | + gpe-edit | [] [] | + gpe-go | [] | + gpe-login | [] [] | + gpe-ownerinfo | [] [] [] | + gpe-sketchbook | [] | + gpe-su | [] | + gpe-taskmanager | [] | + gpe-timesheet | [] [] [] | + gpe-today | [] [] | + gpe-todo | [] [] | + gphoto2 | [] [] [] | + gprof | [] [] | + gpsdrive | () () () | + gramadoir | [] [] | + grep | [] [] [] [] [] [] [] [] [] [] [] | + gretl | [] [] | + gtick | [] [] [] | + hello | [] [] [] [] [] [] [] [] [] [] [] [] [] | + id-utils | [] [] [] [] | + indent | [] [] [] [] [] [] [] [] [] | + iso_3166 | [] [] [] [] [] [] [] | + iso_3166_1 | [] [] [] [] [] | + iso_3166_2 | | + iso_3166_3 | | + iso_4217 | [] [] [] [] [] [] | + iso_639 | | + jpilot | [] () | + jtag | [] | + jwhois | [] [] [] [] | + kbd | [] | + latrine | [] | + ld | [] | + libc | [] [] [] [] [] [] | + libgpewidget | [] [] [] [] | + libiconv | [] [] [] [] [] [] [] [] [] | + lifelines | () | + lilypond | [] | + lingoteach | [] [] | + lingoteach_lessons | | + lynx | [] [] [] [] | + m4 | [] [] [] [] | + mailutils | | + make | [] [] [] [] [] [] | + man-db | () () | + minicom | [] [] [] [] | + mysecretdiary | [] [] | + nano | [] [] [] [] | + nano_1_0 | [] [] [] [] | + opcodes | [] | + parted | [] [] [] | + ptx | [] [] [] [] [] [] [] | + python | | + radius | [] | + recode | [] [] [] [] [] [] | + rpm | [] [] | + screem | | + scrollkeeper | [] | + sed | [] [] [] [] [] [] [] [] [] | + sh-utils | [] [] [] [] [] [] [] | + shared-mime-info | [] [] [] | + sharutils | [] [] [] [] [] | + silky | () [] () () | + skencil | [] | + sketch | [] | + soundtracker | [] [] | + sp | [] () | + tar | [] [] [] [] [] [] [] [] [] | + texinfo | [] [] [] [] | + textutils | [] [] [] [] [] [] | + tin | [] () | + tp-robot | [] | + tuxpaint | [] [] [] [] [] [] [] [] [] | + unicode-han-tra... | | + unicode-transla... | [] [] | + util-linux | [] [] [] [] () [] | + vorbis-tools | [] | + wastesedge | () | + wdiff | [] [] [] [] [] [] | + wget | [] [] [] [] [] [] [] | + xchat | [] [] [] | + xfree86_xkb_xml | [] [] | + xpad | [] [] | + +-------------------------------------------------+ + et eu fa fi fr ga gl he hr hu id is it ja ko lg + 22 2 1 26 106 28 24 8 10 41 33 1 26 33 12 0 + + lt lv mk mn ms mt nb nl nn no nso pl pt pt_BR ro ru + +-----------------------------------------------------+ + a2ps | [] [] () () [] [] [] | + aegis | () () () | + ant-phone | [] [] | + anubis | [] [] [] [] [] [] | + ap-utils | [] () [] | + aspell | [] | + bash | [] [] [] | + batchelor | [] | + bfd | [] | + binutils | [] | + bison | [] [] [] [] [] | + bluez-pin | [] [] [] | + clisp | | + clisp | [] | + console-tools | [] | + coreutils | [] [] | + cpio | [] [] [] [] [] | + darkstat | [] [] [] [] | + diffutils | [] [] [] [] [] [] | + e2fsprogs | [] | + enscript | [] [] [] [] | + error | [] [] [] | + fetchmail | [] [] () [] | + fileutils | [] [] [] | + findutils | [] [] [] [] [] | + flex | [] [] [] [] | + fslint | [] [] | + gas | | + gawk | [] [] [] | + gbiff | [] [] | + gcal | | + gcc | | + gettext | [] [] [] | + gettext-examples | [] [] [] | + gettext-runtime | [] [] [] [] | + gettext-tools | [] [] | + gimp-print | [] | + gliv | [] [] [] | + glunarclock | [] [] [] [] | + gnubiff | [] | + gnucash | [] [] () [] | + gnucash-glossary | [] [] | + gnupg | [] | + gpe-aerial | [] [] [] [] | + gpe-beam | [] [] [] [] | + gpe-calendar | [] [] [] [] | + gpe-clock | [] [] [] [] | + gpe-conf | [] [] [] [] | + gpe-contacts | [] [] [] [] | + gpe-edit | [] [] [] [] | + gpe-go | [] [] [] | + gpe-login | [] [] [] [] | + gpe-ownerinfo | [] [] [] [] | + gpe-sketchbook | [] [] [] [] | + gpe-su | [] [] [] [] | + gpe-taskmanager | [] [] [] [] | + gpe-timesheet | [] [] [] [] | + gpe-today | [] [] [] [] | + gpe-todo | [] [] [] [] | + gphoto2 | [] | + gprof | [] [] | + gpsdrive | () () [] | + gramadoir | () [] | + grep | [] [] [] [] [] | + gretl | | + gtick | [] [] [] | + hello | [] [] [] [] [] [] [] [] [] [] | + id-utils | [] [] [] [] | + indent | [] [] [] [] | + iso_3166 | [] [] [] | + iso_3166_1 | [] [] | + iso_3166_2 | | + iso_3166_3 | [] | + iso_4217 | [] [] [] [] [] [] [] [] | + iso_639 | [] | + jpilot | () () | + jtag | | + jwhois | [] [] [] [] () | + kbd | [] [] [] | + latrine | [] | + ld | | + libc | [] [] [] [] | + libgpewidget | [] [] [] | + libiconv | [] [] [] [] [] | + lifelines | | + lilypond | | + lingoteach | | + lingoteach_lessons | | + lynx | [] [] [] | + m4 | [] [] [] [] [] | + mailutils | [] [] [] | + make | [] [] [] [] | + man-db | [] | + minicom | [] [] [] [] | + mysecretdiary | [] [] [] | + nano | [] [] [] [] [] | + nano_1_0 | [] [] [] [] [] [] | + opcodes | [] [] | + parted | [] [] [] [] | + ptx | [] [] [] [] [] [] [] [] | + python | | + radius | [] [] | + recode | [] [] [] [] | + rpm | [] [] [] | + screem | | + scrollkeeper | [] [] [] [] [] | + sed | [] [] [] | + sh-utils | [] [] | + shared-mime-info | [] [] | + sharutils | [] [] | + silky | () | + skencil | [] [] | + sketch | [] [] | + soundtracker | | + sp | | + tar | [] [] [] [] [] [] | + texinfo | [] [] [] [] | + textutils | [] [] | + tin | | + tp-robot | [] | + tuxpaint | [] [] [] [] [] [] [] [] | + unicode-han-tra... | | + unicode-transla... | | + util-linux | [] [] [] | + vorbis-tools | [] [] [] | + wastesedge | | + wdiff | [] [] [] [] [] | + wget | [] [] [] | + xchat | [] [] [] | + xfree86_xkb_xml | [] [] | + xpad | [] [] | + +-----------------------------------------------------+ + lt lv mk mn ms mt nb nl nn no nso pl pt pt_BR ro ru + 1 2 0 3 12 0 10 69 6 7 1 40 26 36 76 63 + + sk sl sr sv ta th tr uk ven vi wa xh zh_CN zh_TW zu + +-----------------------------------------------------+ + a2ps | [] [] [] [] | 16 + aegis | | 0 + ant-phone | | 3 + anubis | [] [] | 9 + ap-utils | () | 3 + aspell | | 4 + bash | | 9 + batchelor | | 3 + bfd | [] [] | 6 + binutils | [] [] [] | 8 + bison | [] [] | 14 + bluez-pin | [] [] [] | 14 + clisp | | 0 + clisp | | 5 + console-tools | | 3 + coreutils | [] [] [] [] | 16 + cpio | [] [] | 14 + darkstat | [] [] [] () () | 12 + diffutils | [] [] [] | 23 + e2fsprogs | [] [] | 6 + enscript | [] [] | 12 + error | [] [] [] | 15 + fetchmail | [] [] | 11 + fileutils | [] [] [] [] [] | 17 + findutils | [] [] [] [] [] [] | 29 + flex | [] [] | 13 + fslint | | 3 + gas | [] | 3 + gawk | [] [] | 12 + gbiff | | 4 + gcal | [] [] | 4 + gcc | [] | 4 + gettext | [] [] [] [] [] | 16 + gettext-examples | [] [] [] [] [] | 14 + gettext-runtime | [] [] [] [] [] [] [] [] | 22 + gettext-tools | [] [] [] [] [] [] | 14 + gimp-print | [] [] | 10 + gliv | | 3 + glunarclock | [] [] [] | 13 + gnubiff | | 3 + gnucash | [] [] | 9 + gnucash-glossary | [] [] [] | 8 + gnupg | [] [] [] [] | 17 + gpe-aerial | [] | 7 + gpe-beam | [] | 8 + gpe-calendar | [] [] [] [] | 13 + gpe-clock | [] [] [] | 10 + gpe-conf | [] [] | 9 + gpe-contacts | [] [] [] | 11 + gpe-edit | [] [] [] [] [] | 12 + gpe-go | | 5 + gpe-login | [] [] [] [] [] | 13 + gpe-ownerinfo | [] [] [] [] | 13 + gpe-sketchbook | [] [] | 9 + gpe-su | [] [] [] | 10 + gpe-taskmanager | [] [] [] | 10 + gpe-timesheet | [] [] [] [] | 12 + gpe-today | [] [] [] [] [] | 13 + gpe-todo | [] [] [] [] | 12 + gphoto2 | [] [] [] | 11 + gprof | [] [] | 9 + gpsdrive | [] [] | 3 + gramadoir | [] | 5 + grep | [] [] [] [] | 26 + gretl | | 3 + gtick | | 7 + hello | [] [] [] [] [] | 34 + id-utils | [] [] | 12 + indent | [] [] [] [] | 21 + iso_3166 | [] [] [] [] [] [] [] | 27 + iso_3166_1 | [] [] [] | 16 + iso_3166_2 | | 0 + iso_3166_3 | | 2 + iso_4217 | [] [] [] [] [] [] | 24 + iso_639 | | 1 + jpilot | [] [] [] [] [] | 9 + jtag | [] | 2 + jwhois | () [] [] | 11 + kbd | [] [] | 11 + latrine | | 2 + ld | [] [] | 5 + libc | [] [] [] [] | 20 + libgpewidget | [] [] [] [] | 13 + libiconv | [] [] [] [] [] [] [] [] | 27 + lifelines | [] | 2 + lilypond | [] | 3 + lingoteach | | 2 + lingoteach_lessons | () | 0 + lynx | [] [] [] | 14 + m4 | [] [] | 15 + mailutils | | 5 + make | [] [] [] | 16 + man-db | [] | 5 + minicom | | 11 + mysecretdiary | [] [] | 10 + nano | [] [] [] [] | 17 + nano_1_0 | [] [] [] | 17 + opcodes | [] [] | 6 + parted | [] [] [] | 15 + ptx | [] [] | 22 + python | | 0 + radius | | 4 + recode | [] [] [] | 20 + rpm | [] [] | 9 + screem | [] [] | 2 + scrollkeeper | [] [] [] | 15 + sed | [] [] [] [] [] [] | 24 + sh-utils | [] [] | 14 + shared-mime-info | [] [] | 7 + sharutils | [] [] [] [] | 17 + silky | () | 3 + skencil | [] | 6 + sketch | [] | 6 + soundtracker | [] [] | 7 + sp | [] | 3 + tar | [] [] [] [] [] | 24 + texinfo | [] [] [] | 14 + textutils | [] [] [] [] | 16 + tin | | 1 + tp-robot | | 2 + tuxpaint | [] [] [] [] [] | 29 + unicode-han-tra... | | 0 + unicode-transla... | | 2 + util-linux | [] [] | 15 + vorbis-tools | | 8 + wastesedge | | 0 + wdiff | [] [] [] | 18 + wget | [] [] [] [] [] [] [] [] | 24 + xchat | [] [] [] [] [] | 15 + xfree86_xkb_xml | [] [] [] [] [] | 11 + xpad | | 5 + +-----------------------------------------------------+ + 63 teams sk sl sr sv ta th tr uk ven vi wa xh zh_CN zh_TW zu + 131 domains 47 19 28 83 0 0 59 13 1 1 11 0 22 22 0 1373 + + Some counters in the preceding matrix are higher than the number of +visible blocks let us expect. This is because a few extra PO files are +used for implementing regional variants of languages, or language +dialects. + + For a PO file in the matrix above to be effective, the package to +which it applies should also have been internationalized and +distributed as such by its maintainer. There might be an observable +lag between the mere existence a PO file and its wide availability in a +distribution. + + If January 2004 seems to be old, you may fetch a more recent copy of +this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date +matrix with full percentage details can be found at +`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'. + +Using `gettext' in new packages +=============================== + +If you are writing a freely available program and want to +internationalize it you are welcome to use GNU `gettext' in your +package. Of course you have to respect the GNU Library General Public +License which covers the use of the GNU `gettext' library. This means +in particular that even non-free programs can use `libintl' as a shared +library, whereas only free software can use `libintl' as a static +library or use modified versions of `libintl'. + + Once the sources are changed appropriately and the setup can handle +the use of `gettext' the only thing missing are the translations. The +Free Translation Project is also available for packages which are not +developed inside the GNU project. Therefore the information given above +applies also for every other Free Software Project. Contact +`translation@iro.umontreal.ca' to make the `.pot' files available to +the translation teams. + diff --git a/illume2-slp/AUTHORS b/illume2-slp/AUTHORS new file mode 100644 index 0000000..22d3ba7 --- /dev/null +++ b/illume2-slp/AUTHORS @@ -0,0 +1,31 @@ +The Rasterman (Carsten Haitzler) +Ibukun Olumuyiwa +Sebastian Dransfeld +HandyAndE (Andrew Williams) +CodeWarrior (Hisham Mardam Bey) +dj2 (Dan Sinclair) +Tilman Sauerbeck +Aleksej Struk +Brian Mattern +devilhorns (Christopher Michael) +/dev/urandom (Viktor Kojouharov) +ilLogict (Chidambar Zinnoury) +Stafford Horne +Cedric Bail +onefang (David Seikel) +okra (Stephen Houston) +Byron Hillis +Ravenlock (Eric Schuele) +ManoWarrior (Luchezar Petkov) +morlenxus (Brian Miculcy) +Toma- (Tom Haste) +k-s (Gustavo Sverzut Barbieri) +Peter van de Werken +Florian Hackenberger +Hannes Janetzek +Mike Blumenkrantz (discomfitor/zmike) +Leif Middelschulte +yoz (Michael Bouchaud) +Doyoun Kang +Gwanglim Lee +Sangjin Lee diff --git a/illume2-slp/COPYING b/illume2-slp/COPYING new file mode 100644 index 0000000..7625f00 --- /dev/null +++ b/illume2-slp/COPYING @@ -0,0 +1,25 @@ +Copyright notice for Enlightenment: + +Copyright (C) 2000-2011 Carsten Haitzler and various contributors (see AUTHORS) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, +OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/illume2-slp/ChangeLog b/illume2-slp/ChangeLog new file mode 100644 index 0000000..e69de29 diff --git a/illume2-slp/INSTALL b/illume2-slp/INSTALL new file mode 100644 index 0000000..8b82ade --- /dev/null +++ b/illume2-slp/INSTALL @@ -0,0 +1,291 @@ +Installation Instructions +************************* + +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, +2006, 2007, 2008 Free Software Foundation, Inc. + + This file is free documentation; the Free Software Foundation gives +unlimited permission to copy, distribute and modify it. + +Basic Installation +================== + + Briefly, the shell commands `./configure; make; make install' should +configure, build, and install this package. The following +more-detailed instructions are generic; see the `README' file for +instructions specific to this package. + + 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 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. + + Running `configure' might take a while. 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. + + 6. Often, you can also type `make uninstall' to remove the installed + files again. + +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=c99 CFLAGS=-g 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 can use 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 `..'. + + With a non-GNU `make', it is safer 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. + + On MacOS X 10.5 and later systems, you can create libraries and +executables that work on multiple system types--known as "fat" or +"universal" binaries--by specifying multiple `-arch' options to the +compiler but only a single `-arch' option to the preprocessor. Like +this: + + ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CPP="gcc -E" CXXCPP="g++ -E" + + This is not guaranteed to produce working output in all cases, you +may have to build one architecture at a time and combine the results +using the `lipo' tool if you have problems. + +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. + +Particular systems +================== + + On HP-UX, the default C compiler is not ANSI C compatible. If GNU +CC is not installed, it is recommended to use the following options in +order to use an ANSI C compiler: + + ./configure CC="cc -Ae" + +and if that doesn't work, install pre-built binaries of GCC for HP-UX. + + On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot +parse its `' header file. The option `-nodtk' can be used as +a workaround. If GNU CC is not installed, it is therefore recommended +to try + + ./configure CC="cc" + +and if that doesn't work, try + + ./configure CC="cc -nodtk" + +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). + +Unfortunately, this technique does not work for `CONFIG_SHELL' due to +an Autoconf bug. Until the bug is fixed you can use this workaround: + + CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash + +`configure' Invocation +====================== + + `configure' recognizes the following options to control how it +operates. + +`--help' +`-h' + Print a summary of all of the options to `configure', and exit. + +`--help=short' +`--help=recursive' + Print a summary of the options unique to this package's + `configure', and exit. The `short' variant lists options used + only in the top level, while the `recursive' variant lists options + also present in any nested packages. + +`--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. + +`--prefix=DIR' + Use DIR as the installation prefix. *Note Installation Names:: + for more details, including other options available for fine-tuning + the installation locations. + +`--no-create' +`-n' + Run the configure checks, but stop before creating any output + files. + +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. + diff --git a/illume2-slp/Makefile.am b/illume2-slp/Makefile.am new file mode 100644 index 0000000..1d96c03 --- /dev/null +++ b/illume2-slp/Makefile.am @@ -0,0 +1,18 @@ +ACLOCAL_AMFLAGS = -I m4 +MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess config.h.in \ + config.sub configure depcomp install-sh ltmain.sh \ + missing module.desktop config.rpath mkinstalldirs + +SUBDIRS = src + +filesdir = $(datadir) +files_DATA = module.desktop + +EXTRA_DIST = module.desktop.in + +clean-local: + rm -rf module.desktop *~ + +uninstall: + rm -rf $(DESTDIR)$(datadir) + diff --git a/illume2-slp/NEWS b/illume2-slp/NEWS new file mode 100644 index 0000000..e69de29 diff --git a/illume2-slp/README b/illume2-slp/README new file mode 100644 index 0000000..e69de29 diff --git a/illume2-slp/autogen.sh b/illume2-slp/autogen.sh new file mode 100755 index 0000000..67a19c2 --- /dev/null +++ b/illume2-slp/autogen.sh @@ -0,0 +1,14 @@ +#!/bin/sh +# Run this to generate all the initial makefiles, etc. + +rm -rf autom4te.cache +rm -f aclocal.m4 ltmain.sh + +#echo "Running autopoint..." ; autopoint -f || : +echo "Running aclocal..." ; aclocal -I m4 $ACLOCAL_FLAGS || exit 1 +echo "Running autoconf..." ; autoconf || exit 1 +echo "Running autoheader..." ; autoheader || exit 1 +echo "Running libtoolize..." ; (libtoolize --copy --automake || glibtoolize --automake) || exit 1 +echo "Running automake..." ; automake --add-missing --copy --gnu || exit 1 + + diff --git a/illume2-slp/configure.ac b/illume2-slp/configure.ac new file mode 100644 index 0000000..be5dc5f --- /dev/null +++ b/illume2-slp/configure.ac @@ -0,0 +1,74 @@ +dnl Process this file with autoconf to produce a configure script. + +# get rid of that stupid cache mechanism +rm -f config.cache + +AC_INIT(illume2-slp, 0.1, doyoun.kang@samsung.com) +AC_PREREQ(2.52) +AC_CONFIG_SRCDIR(configure.ac) +AC_CANONICAL_BUILD +AC_CANONICAL_HOST +AC_ISC_POSIX + +AM_INIT_AUTOMAKE(1.8) +AM_CONFIG_HEADER(config.h) +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) + +AC_PROG_CC +AM_PROG_CC_STDC +AM_PROG_CC_C_O +AC_HEADER_STDC +AC_C_CONST +AC_C___ATTRIBUTE__ + +define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl +define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl +AC_PROG_LIBTOOL + +#AM_GNU_GETTEXT([external]) +#AM_GNU_GETTEXT_VERSION(0.14) + +PKG_CHECK_MODULES(ENLIGHTENMENT, [enlightenment, + utilX, + elementary, + dlog]) +AC_SUBST(ENLIGHTENMENT_CFLAGS) +AC_SUBST(ENLIGHTENMENT_LIBS) + +AC_CHECK_LIB(dl, dlopen, dlopen_libs=-ldl) +AC_SUBST(dlopen_libs) + +release=$(pkg-config --variable=release enlightenment) +MODULE_ARCH="$host_os-$host_cpu-$release" +AC_SUBST(MODULE_ARCH) +AC_DEFINE_UNQUOTED(MODULE_ARCH, "$MODULE_ARCH", "Module architecture") + +# Find edje_cc +PKG_CHECK_MODULES(EDJE, [edje >= 1.0.0]) +AC_ARG_WITH(edje-cc, + AC_HELP_STRING([--with-edje-cc=PATH], [specify a specific path to edje_cc]), + [ + v=$withval; + EDJE_CC=$v + ],[ + EDJE_CC=$(pkg-config --variable=prefix edje)/bin/edje_cc + ] +) +AC_SUBST(EDJE_CC) +AC_MSG_CHECKING([Which edje_cc to use]) +AC_MSG_RESULT(${EDJE_CC}) + +datadir=$(pkg-config --variable=modules enlightenment)/${PACKAGE} +AC_ARG_ENABLE(homedir-install, + AS_HELP_STRING([--enable-homedir-install], [Install module in homedir]), + [ datadir="${HOME}/.e/e/modules/${PACKAGE}" ] +) + +AC_CONFIG_FILES([Makefile + module.desktop + src/Makefile + src/images/Makefile + src/policies/Makefile + src/policies/illume/Makefile]) +AC_OUTPUT + diff --git a/illume2-slp/m4/ac_attribute.m4 b/illume2-slp/m4/ac_attribute.m4 new file mode 100644 index 0000000..23479a9 --- /dev/null +++ b/illume2-slp/m4/ac_attribute.m4 @@ -0,0 +1,47 @@ +dnl Copyright (C) 2004-2008 Kim Woelders +dnl Copyright (C) 2008 Vincent Torri +dnl That code is public domain and can be freely used or copied. +dnl Originally snatched from somewhere... + +dnl Macro for checking if the compiler supports __attribute__ + +dnl Usage: AC_C___ATTRIBUTE__ +dnl call AC_DEFINE for HAVE___ATTRIBUTE__ and __UNUSED__ +dnl if the compiler supports __attribute__, HAVE___ATTRIBUTE__ is +dnl defined to 1 and __UNUSED__ is defined to __attribute__((unused)) +dnl otherwise, HAVE___ATTRIBUTE__ is not defined and __UNUSED__ is +dnl defined to nothing. + +AC_DEFUN([AC_C___ATTRIBUTE__], +[ + +AC_MSG_CHECKING([for __attribute__]) + +AC_CACHE_VAL([ac_cv___attribute__], + [AC_TRY_COMPILE( + [ +#include + +int func(int x); +int foo(int x __attribute__ ((unused))) +{ + exit(1); +} + ], + [], + [ac_cv___attribute__="yes"], + [ac_cv___attribute__="no"] + )]) + +AC_MSG_RESULT($ac_cv___attribute__) + +if test "x${ac_cv___attribute__}" = "xyes" ; then + AC_DEFINE([HAVE___ATTRIBUTE__], [1], [Define to 1 if your compiler has __attribute__]) + AC_DEFINE([__UNUSED__], [__attribute__((unused))], [Macro declaring a function argument to be unused]) + else + AC_DEFINE([__UNUSED__], [], [Macro declaring a function argument to be unused]) +fi + +]) + +dnl End of ac_attribute.m4 diff --git a/illume2-slp/m4/libtool.m4 b/illume2-slp/m4/libtool.m4 new file mode 100644 index 0000000..4ceb7f1 --- /dev/null +++ b/illume2-slp/m4/libtool.m4 @@ -0,0 +1,7309 @@ +# 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], +[_$0(m4_quote(m4_default([$1], [[, ]])), + m4_quote(m4_if([$2], [], + m4_quote(lt_decl_tag_varnames), + m4_quote(m4_shift($@)))), + m4_split(m4_normalize(m4_quote(_LT_TAGS))))]) +m4_define([_lt_decl_varnames_tagged], [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" + if test "$GCC" = "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*) + # 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 + +#ifdef __cplusplus +extern "C" void exit (int); +#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 ()); + + exit (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*) + 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_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*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + 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*) + # 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' + ;; + +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_name_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 + ;; + +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*) + 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*) + 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*) + # 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 IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + _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' + ;; + icpc* | ecpc* ) + # Intel C++ + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _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*) + ;; + *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*) + # 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 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)='-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*) + # 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 + icc* | ecc* | ifort*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _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*) + _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' + ;; + *) + _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*) + # 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*) + # _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' ;; + 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*) + 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 + 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 + + # 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*) + # 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 ${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*) + 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 + + # 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*) + # _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_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 +]) diff --git a/illume2-slp/m4/ltoptions.m4 b/illume2-slp/m4/ltoptions.m4 new file mode 100644 index 0000000..e970119 --- /dev/null +++ b/illume2-slp/m4/ltoptions.m4 @@ -0,0 +1,368 @@ +# 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*) + 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])]) diff --git a/illume2-slp/m4/ltsugar.m4 b/illume2-slp/m4/ltsugar.m4 new file mode 100644 index 0000000..9000a05 --- /dev/null +++ b/illume2-slp/m4/ltsugar.m4 @@ -0,0 +1,123 @@ +# 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 +]) diff --git a/illume2-slp/m4/ltversion.m4 b/illume2-slp/m4/ltversion.m4 new file mode 100644 index 0000000..f3c5309 --- /dev/null +++ b/illume2-slp/m4/ltversion.m4 @@ -0,0 +1,23 @@ +# 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 3017 ltversion.m4 +# This file is part of GNU Libtool + +m4_define([LT_PACKAGE_VERSION], [2.2.6b]) +m4_define([LT_PACKAGE_REVISION], [1.3017]) + +AC_DEFUN([LTVERSION_VERSION], +[macro_version='2.2.6b' +macro_revision='1.3017' +_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) +_LT_DECL(, macro_revision, 0) +]) diff --git a/illume2-slp/m4/lt~obsolete.m4 b/illume2-slp/m4/lt~obsolete.m4 new file mode 100644 index 0000000..637bb20 --- /dev/null +++ b/illume2-slp/m4/lt~obsolete.m4 @@ -0,0 +1,92 @@ +# 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])]) diff --git a/illume2-slp/module.desktop.in b/illume2-slp/module.desktop.in new file mode 100644 index 0000000..54c4fd7 --- /dev/null +++ b/illume2-slp/module.desktop.in @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=Link +Name=Illume2-slp +Icon=e-module-illume2-slp +X-Enlightenment-ModuleType=system +Comment= +Comment[fr]= +Comment[it]= diff --git a/illume2-slp/src/Makefile.am b/illume2-slp/src/Makefile.am new file mode 100644 index 0000000..1925cf9 --- /dev/null +++ b/illume2-slp/src/Makefile.am @@ -0,0 +1,82 @@ +MAINTAINERCLEANFILES = Makefile.in +MODULE = illume2-slp +SUBDIRS = images policies + +EDJE_CC = @EDJE_CC@ +EDJE_FLAGS = -v -id $(top_srcdir)/src/images + +# data files for the module +filesdir = $(libdir)/enlightenment/modules/$(MODULE) +files_DATA = \ + e-module-$(MODULE).edj \ + quickpanel.edj + + +EXTRA_DIST = \ + e-module-$(MODULE).edc \ + quickpanel.edc \ + $(top_srcdir)/src/images/*.png + + +# the module .so file +INCLUDES = -I. \ + -I$(top_srcdir) \ + -I$(top_srcdir)/src/ \ + -I$(includedir) \ + @ENLIGHTENMENT_CFLAGS@ + +pkgdir = $(libdir)/enlightenment/modules/$(MODULE)/$(MODULE_ARCH) +pkg_LTLIBRARIES = module.la + +module_la_SOURCES = \ + e_illume.h \ + e_illume.c \ + e_illume_private.h \ + e_mod_config_policy.h \ + e_mod_config_policy.c \ + e_mod_select_window.h \ + e_mod_select_window.c \ + e_mod_config_windows.h \ + e_mod_config_windows.c \ + e_mod_config_animation.h \ + e_mod_config_animation.c \ + e_mod_quickpanel.h \ + e_mod_quickpanel.c \ + e_mod_policy.h \ + e_mod_policy.c \ + e_mod_config.h \ + e_mod_config.c \ + e_mod_main.h \ + e_mod_main.c + +module_la_LIBADD = @dlopen_libs@ +module_la_CFLAGS = @ENLIGHTENMENT_CFLAGS@ +module_la_LDFLAGS = -module -avoid-version @ENLIGHTENMENT_LIBS@ +module_la_DEPENDENCIES = $(top_builddir)/config.h +module_la_LIBTOOLFLAGS = --tag=disable-static + + +e-module-$(MODULE).edj: Makefile $(EXTRA_DIST) + $(EDJE_CC) $(EDJE_FLAGS) \ + $(top_srcdir)/src/e-module-$(MODULE).edc \ + $(top_builddir)/src/e-module-$(MODULE).edj + +quickpanel.edj: Makefile $(EXTRA_DIST) + $(EDJE_CC) $(EDJE_FLAGS) \ + $(top_srcdir)/src/quickpanel.edc \ + $(top_builddir)/src/quickpanel.edj + +.PHONY: doc + +# Documentation + +doc: + @echo "entering doc/" + make -C doc doc + +clean-local: + rm -f *.edj + +uninstall: + rm -rf $(DESTDIR)$(libdir)/enlightenment/modules/$(MODULE) + rm -rf $(DESTDIR)$(libdir)/enlightenment/modules/$(MODULE)/policies diff --git a/illume2-slp/src/e-module-illume2-slp.edc b/illume2-slp/src/e-module-illume2-slp.edc new file mode 100644 index 0000000..8b408f9 --- /dev/null +++ b/illume2-slp/src/e-module-illume2-slp.edc @@ -0,0 +1,25 @@ +collections +{ + group + { + images.image: "module_icon.png" COMP; + name: "icon"; + max: 128 128; + parts + { + part + { + name: "icon"; + type: IMAGE; + mouse_events: 0; + description + { + state: "default" 0.0; + aspect: 1.0 1.0; + aspect_preference: BOTH; + image.normal: "module_icon.png"; + } + } + } + } +} diff --git a/illume2-slp/src/e_illume.c b/illume2-slp/src/e_illume.c new file mode 100644 index 0000000..d8f6910 --- /dev/null +++ b/illume2-slp/src/e_illume.c @@ -0,0 +1,707 @@ +#include "e_illume_private.h" +#include "e_mod_config.h" + +/** + * @defgroup E_Illume_Main_Group Illume API Information + * + * The following group defines variables, structures, and functions available + * to a policy. + */ + + +extern void e_mod_quickpanel_show(E_Illume_Quickpanel *qp, int isAni); +extern void e_mod_quickpanel_hide(E_Illume_Quickpanel *qp, int isAni); + +/** + * Returns the @ref E_Illume_Config_Zone structure for a specific zone. + * + * @param id The id of the E_Zone. + * @return The @ref E_Illume_Config_Zone structure for this zone. + * + * @note This function will return a new @ref E_Illume_Config_Zone structure + * if none exists. This new @ref E_Illume_Config_Zone will be added to the + * existing list of @ref E_Illume_Config_Zone structures automatically. + * + * @ingroup E_Illume_Config_Group + */ +EAPI E_Illume_Config_Zone * +e_illume_zone_config_get(int id) +{ + Eina_List *l; + E_Illume_Config_Zone *cz = NULL; + + /* loop existing zone configs and look for this id */ + EINA_LIST_FOREACH(_e_illume_cfg->policy.zones, l, cz) + { + if (!cz) continue; + if (cz->id != id) continue; + return cz; + } + + /* we did not find an existing one for this zone, so create a new one */ + cz = E_NEW(E_Illume_Config_Zone, 1); + if (!cz) return NULL; + + cz->id = id; + cz->mode.dual = 0; + cz->mode.side = 0; + + /* add it to the list */ + _e_illume_cfg->policy.zones = + eina_list_append(_e_illume_cfg->policy.zones, cz); + + /* save it in config */ + e_mod_illume_config_save(); + + /* return a fallback */ + return cz; +} + +/** + * Determine if a given border is an Indicator window. + * + * @param bd The border to test. + * @return EINA_TRUE if it is an Indicator window, EINA_FALSE otherwise. + * + * @note If @p bd is NULL then this function will return EINA_FALSE. + * + * @note It is assumed that Indicator windows are of type + * ECORE_X_WINDOW_TYPE_DOCK. + * + * @ingroup E_Illume_Main_Group + */ +EAPI Eina_Bool +e_illume_border_is_indicator(E_Border *bd) +{ + /* make sure we have a border */ + if (!bd) return EINA_FALSE; + + /* indicator windows should be set to dock type, so check for that */ + if (bd->client.netwm.type != ECORE_X_WINDOW_TYPE_DOCK) return EINA_FALSE; + + /* we have a dock window, check against any matches in config */ + + /* check if we are matching on name */ + if (_e_illume_cfg->policy.indicator.match.name) + { + if ((bd->client.icccm.name) && + (!strcmp(bd->client.icccm.name, + _e_illume_cfg->policy.indicator.name))) + return EINA_TRUE; + } + + /* check if we are matching on class */ + if (_e_illume_cfg->policy.indicator.match.class) + { + if ((bd->client.icccm.class) && + (!strcmp(bd->client.icccm.class, + _e_illume_cfg->policy.indicator.class))) + return EINA_TRUE; + } + + /* check if we are matching on title */ + if (_e_illume_cfg->policy.indicator.match.title) + { + const char *title; + + title = e_border_name_get(bd); + if (!strcmp(title, _e_illume_cfg->policy.indicator.title)) + return EINA_TRUE; + } + + /* return a fallback */ + return EINA_FALSE; +} + + +/** + * Determine if a given border is a Keyboard window. + * + * @param bd The border to test. + * @return EINA_TRUE if it is a Keyboard window, EINA_FALSE otherwise. + * + * @note If @p bd is NULL then this function will return EINA_FALSE. + * + * @ingroup E_Illume_Main_Group + */ +EAPI Eina_Bool +e_illume_border_is_keyboard(E_Border *bd) +{ + /* make sure we have a border */ + if (!bd) return EINA_FALSE; + + /* check for specific flag first */ + if (bd->client.vkbd.vkbd) return EINA_TRUE; + + /* legacy code from illume 1 */ + if ((bd->client.icccm.name) && + ((!strcmp(bd->client.icccm.name, "multitap-pad"))) && + (bd->client.netwm.state.skip_taskbar) && + (bd->client.netwm.state.skip_pager)) + return EINA_TRUE; + + /* check if we are matching on name */ + if (_e_illume_cfg->policy.vkbd.match.name) + { + if ((bd->client.icccm.name) && + (!strcmp(bd->client.icccm.name, + _e_illume_cfg->policy.vkbd.name))) + return EINA_TRUE; + } + + /* check if we are matching on class */ + if (_e_illume_cfg->policy.vkbd.match.class) + { + if ((bd->client.icccm.class) && + (!strcmp(bd->client.icccm.class, + _e_illume_cfg->policy.vkbd.class))) + return EINA_TRUE; + } + + /* check if we are matching on title */ + if (_e_illume_cfg->policy.vkbd.match.title) + { + const char *title; + + title = e_border_name_get(bd); + if (!strcmp(title, _e_illume_cfg->policy.vkbd.title)) + return EINA_TRUE; + } + + /* return a fallback */ + return EINA_FALSE; +} + + +/** + * Determine if a given border is a dialog. + * + * @param bd The border to test. + * @return EINA_TRUE if it is a dialog, EINA_FALSE otherwise. + * + * @note If @p bd is NULL then this function will return EINA_FALSE. + * + * @ingroup E_Illume_Main_Group + */ +EAPI Eina_Bool +e_illume_border_is_dialog(E_Border *bd) +{ + /* make sure we have a border */ + if (!bd) return EINA_FALSE; + + /* check actual type */ + if (bd->client.netwm.type == ECORE_X_WINDOW_TYPE_DIALOG) return EINA_TRUE; + + /* check for client leader */ + /* NB: disabled currently as some GTK windows set this even tho they are + * not a dialog. */ + // if (bd->client.icccm.client_leader) return EINA_TRUE; + + /* NB: may or may not need to handle these. Needs Testing */ + if (bd->client.netwm.extra_types) + printf("\t\tBorder has extra types: %s\n", bd->client.icccm.class); + + /* return a fallback */ + return EINA_FALSE; +} + +/** + * Determine if a given border is a QT VCLSalFrame. + * + * @param bd The border to test. + * @return EINA_TRUE if it is a VCLSalFrame, EINA_FALSE otherwise. + * + * @note If @p bd is NULL then this function will return EINA_FALSE. + * + * @ingroup E_Illume_Main_Group + */ +EAPI Eina_Bool +e_illume_border_is_qt_frame(E_Border *bd) +{ + /* make sure we have a border */ + if (!bd) return EINA_FALSE; + + /* make sure we have the icccm name and compare it */ + if ((bd->client.icccm.name) && + (!strncmp(bd->client.icccm.name, "VCLSalFrame", 11))) + return EINA_TRUE; + + /* return a fallback */ + return EINA_FALSE; +} + +/** + * Determine if a given border is a fullscreen window. + * + * @param bd The border to test. + * @return EINA_TRUE if it is fullscreen, EINA_FALSE otherwise. + * + * @note If @p bd is NULL then this function will return EINA_FALSE. + * + * @ingroup E_Illume_Main_Group + */ +EAPI Eina_Bool +e_illume_border_is_fullscreen(E_Border *bd) +{ + /* make sure we have a border */ + if (!bd) return EINA_FALSE; + + /* check for fullscreen */ + if ((bd->fullscreen) || (bd->need_fullscreen)) return EINA_TRUE; + + /* return a fallback */ + return EINA_FALSE; +} + +/** + * Determine if a given border is an illume conformant window. + * + * @param bd The border to test. + * @return EINA_TRUE if it is conformant, EINA_FALSE otherwise. + * + * @note If @p bd is NULL then this function will return EINA_FALSE. + * + * @ingroup E_Illume_Main_Group + */ +EAPI Eina_Bool +e_illume_border_is_conformant(E_Border *bd) +{ + /* make sure we have a border */ + if (!bd) return EINA_FALSE; + + /* return if it is conformant or not */ + return bd->client.illume.conformant.conformant; +} + +/** + * Determine if a given border is a quickpanel window. + * + * @param bd The border to test. + * @return EINA_TRUE if it is a quickpanel, EINA_FALSE otherwise. + * + * @note If @p bd is NULL then this function will return EINA_FALSE. + * + * @ingroup E_Illume_Main_Group + */ +EAPI Eina_Bool +e_illume_border_is_quickpanel(E_Border *bd) +{ + /* make sure we have a border */ + if (!bd) return EINA_FALSE; + + /* return if it is a quickpanel or not */ + return bd->client.illume.quickpanel.quickpanel; +} + + +EAPI Eina_Bool +e_illume_border_is_lock_screen(E_Border *bd) +{ + const char *name = NULL; + const char *clas = NULL; + + if (!bd) return EINA_FALSE; + + name = bd->client.icccm.name; + clas = bd->client.icccm.class; + + if ( clas == NULL ) return EINA_FALSE; + if ( strncmp(clas,"LOCK_SCREEN",strlen("LOCK_SCREEN")) != 0 ) return EINA_FALSE; + if ( name == NULL ) return EINA_FALSE; + if ( strncmp(name,"LOCK_SCREEN",strlen("LOCK_SCREEN")) != 0 ) return EINA_FALSE; + if ( bd->client.netwm.type != ECORE_X_WINDOW_TYPE_NOTIFICATION ) return EINA_FALSE; + + return EINA_TRUE; +} + +EAPI Eina_Bool +e_illume_border_is_notification (E_Border* bd) +{ + int i; + + /* make sure we have a border */ + if (!bd) return EINA_FALSE; + + /* check actual type */ + if (bd->client.netwm.type == ECORE_X_WINDOW_TYPE_NOTIFICATION) return EINA_TRUE; + + for (i=0; iclient.netwm.extra_types_num; i++) + { + if (bd->client.netwm.extra_types[i] == ECORE_X_WINDOW_TYPE_NOTIFICATION) + return EINA_TRUE; + } + + return EINA_FALSE; +} + +EAPI Eina_Bool +e_illume_border_is_utility (E_Border* bd) +{ + int i; + + /* make sure we have a border */ + if (!bd) return EINA_FALSE; + + /* check actual type */ + if (bd->client.netwm.type == ECORE_X_WINDOW_TYPE_UTILITY) return EINA_TRUE; + + for (i=0; iclient.netwm.extra_types_num; i++) + { + if (bd->client.netwm.extra_types[i] == ECORE_X_WINDOW_TYPE_UTILITY) + return EINA_TRUE; + } + + return EINA_FALSE; +} + +EAPI Eina_Bool +e_illume_border_is_sliding_win(E_Border *bd) +{ + /* make sure we have a border */ + if (!bd) return EINA_FALSE; + + /* check if we are matching on name */ + if (_e_illume_cfg->policy.indicator.match.name) + { + if ((bd->client.icccm.name) && + (!strcmp(bd->client.icccm.name, + "Illume-Sliding-Win"))) + return EINA_TRUE; + } + + /* check if we are matching on class */ + if ((bd->client.icccm.class) && + (!strcmp(bd->client.icccm.class, + "Illume-Sliding-Win"))) + return EINA_TRUE; + + + /* check if we are matching on title */ + { + const char *title; + + title = e_border_name_get(bd); + if (!strcmp(title, "Illume Sliding Win")) + return EINA_TRUE; + } + + /* return a fallback */ + return EINA_FALSE; +} + + +/** + * Retrieves the minimum space required to display this border. + * + * @param bd The border to get the minium space for. + * @param w Pointer to an integer into which the width is to be stored. + * @param h Pointer to an integer into which the height is to be stored. + * + * @note if @p bd is NULL then @p w and @p h will return @c 0. + * + * @ingroup E_Illume_Main_Group + */ +EAPI void +e_illume_border_min_get(E_Border *bd, int *w, int *h) +{ + if (w) *w = 0; + if (h) *h = 0; + if (!bd) return; + + if (w) + { + if (bd->client.icccm.base_w > bd->client.icccm.min_w) + *w = bd->client.icccm.base_w; + else + *w = bd->client.icccm.min_w; + } + if (h) + { + if (bd->client.icccm.base_h > bd->client.icccm.min_h) + *h = bd->client.icccm.base_h; + else + *h = bd->client.icccm.min_h; + } +} + +/** + * Retrieves a border, given an x and y coordinate, from a zone. + * + * @param zone The zone. + * @param x The X coordinate to check for border at. + * @param y The Y coordinate to check for border at. + * + * @note if @p zone is NULL then this function will return NULL. + * + * @warning Both X and Y coordinates are required to reliably detect a border. + * + * @ingroup E_Illume_Main_Group + */ +EAPI E_Border * +e_illume_border_at_xy_get(E_Zone *zone, int x, int y) +{ + Eina_List *l; + E_Border *bd; + + /* make sure we have a zone */ + if (!zone) return NULL; + + /* loop the border client list */ + /* NB: We use e_border_client_list here, rather than + * e_container_border_list, because e_border_client_list is faster. + * This is done in reverse order so we get the most recent border first */ + EINA_LIST_REVERSE_FOREACH(e_border_client_list(), l, bd) + { + if (!bd) continue; + + /* check zone and skip borders not on this zone */ + if (bd->zone != zone) continue; + + /* skip invisibles */ + if (!bd->visible) continue; + + /* check position against given coordinates */ + if ((bd->x != x) || (bd->y != y)) continue; + + /* filter out borders we don't want */ + if (e_illume_border_is_indicator(bd)) continue; + if (e_illume_border_is_keyboard(bd)) continue; + if (e_illume_border_is_quickpanel(bd)) continue; + + /* found one, return it */ + return bd; + } + + /* return a fallback */ + return NULL; +} + +/** + * Retrieve the parent of a given dialog. + * + * @param bd The border to get the parent of. + * @return The border's parent, or NULL if no parent exists. + * + * @note If @p bd is NULL then this function will return NULL. + * + * @ingroup E_Illume_Main_Group + */ +EAPI E_Border * +e_illume_border_parent_get(E_Border *bd) +{ + /* make sure we have a border */ + if (!bd) return NULL; + + /* check for border's parent */ + if (bd->parent) return bd->parent; + + /* NB: TEST CODE - may need to check bd->leader here */ + if (bd->leader) + printf("\tDialog Has Leader: %s\n", bd->client.icccm.name); + + /* check for transient */ + if (bd->client.icccm.transient_for) + { + /* try to find this borders parent */ + return e_border_find_by_client_window(bd->client.icccm.transient_for); + } + else if (bd->client.icccm.client_leader) + { + /* NB: using client_leader as parent. THIS NEEDS THOROUGH TESTING !! */ + return e_border_find_by_client_window(bd->client.icccm.client_leader); + } + + /* return a fallback */ + return NULL; +} + +/** + * Show a given border. + * + * @param bd The border to show. + * + * @note If @p bd is NULL then this function will return. + * + * @ingroup E_Illume_Main_Group + */ +EAPI void +e_illume_border_show(E_Border *bd) +{ + /* make sure we have a border */ + if (!bd) return; + + e_border_uniconify(bd); + e_border_raise(bd); + e_border_show(bd); + return; +} + +/** + * Hide a given border. + * + * @param bd The border to hide. + * + * @note If @p bd is NULL then this function will return. + * + * @ingroup E_Illume_Main_Group + */ +EAPI void +e_illume_border_hide(E_Border *bd) +{ + /* make sure we have a border */ + if (!bd) return; + + e_border_iconify(bd); + return; +} + +/** + * Retrieve the Indicator window on a given zone. + * + * @param zone The zone. + * @return The Indicator border, or NULL if no Indicator exists. + * + * @note If @p zone is NULL then this function will return NULL. + * + * @ingroup E_Illume_Main_Group + */ +EAPI E_Border * +e_illume_border_indicator_get(E_Zone *zone) +{ + Eina_List *l; + E_Border *bd; + + /* make sure we have a zone */ + if (!zone) return NULL; + + /* loop the border client list */ + /* NB: We use e_border_client_list here, rather than + * e_container_border_list, because e_border_client_list is faster */ + EINA_LIST_FOREACH(e_border_client_list(), l, bd) + { + if (!bd) continue; + + /* check zone and skip borders not on this zone */ + if (bd->zone != zone) continue; + + /* skip borders that are not indicators */ + if (!e_illume_border_is_indicator(bd)) continue; + + /* found one, return it */ + return bd; + } + + /* return a fallback */ + return NULL; +} + +/** + * Retrieves the current position of the Indicator window. + * + * @param zone The zone on which to retrieve the Indicator position. + * @param x Pointer to an integer into which the left is to be stored. + * @param y Pointer to an integer into which the top is to be stored. + * + * @note if @p zone is NULL then @p x, @p y, @p w, and @p h will return @c 0. + * + * @ingroup E_Illume_Main_Group + */ +EAPI void +e_illume_border_indicator_pos_get(E_Zone *zone, int *x, int *y) +{ + E_Border *ind; + + if (x) *x = 0; + if (y) *y = 0; + + /* make sure we have a zone */ + if (!zone) return; + + /* set default values */ + if (x) *x = zone->x; + if (y) *y = zone->y; + + /* try and get the Indicator on this zone */ + if (!(ind = e_illume_border_indicator_get(zone))) return; + + /* return Indicator position(s) */ + if (x) *x = ind->x; + if (y) *y = ind->y; +} + +/** + * Retrieve the Illume Quickpanel on a given zone. + * + * @param zone The zone on which to retrieve the Quickpanel. + * @return The @ref E_Illume_Quickpanel on this zone, or NULL if none exists. + * + * @note If @p zone is NULL then this function will return NULL. + * + * @ingroup E_Illume_Quickpanel_Group + */ +EAPI E_Illume_Quickpanel * +e_illume_quickpanel_by_zone_get(E_Zone *zone) +{ + E_Illume_Quickpanel *qp; + Eina_List *l; + + /* make sure we have a zone */ + if (!zone) return NULL; + + /* loop the list of quickpanels, looking for one on this zone */ + EINA_LIST_FOREACH(_e_illume_qps, l, qp) + { + if (!qp) continue; + if (qp->zone == zone) return qp; + } + + /* return a fallback */ + return NULL; +} + + +EAPI Eina_List* +e_illume_quickpanel_get (void) +{ + return _e_illume_qps; +} + + +/** + * Show the Illume Quickpanel on a given zone. + * + * @param zone The zone on which to show the Quickpanel. + * + * @note If @p zone is NULL then this function will return. + * + * @ingroup E_Illume_Quickpanel_Group + */ +EAPI void +e_illume_quickpanel_show(E_Zone *zone, int isAni) +{ + E_Illume_Quickpanel *qp; + if (!zone) return; + + qp = e_illume_quickpanel_by_zone_get (zone); + e_mod_quickpanel_show(qp, isAni); +} + +/** + * Hide the Illume Quickpanel on a given zone. + * + * @param zone The zone on which to hide the Quickpanel. + * + * @note If @p zone is NULL then this function will return. + * + * @ingroup E_Illume_Quickpanel_Group + */ +EAPI void +e_illume_quickpanel_hide(E_Zone *zone, int isAni) +{ + E_Illume_Quickpanel *qp; + if (!zone) return; + + qp = e_illume_quickpanel_by_zone_get (zone); + e_mod_quickpanel_hide(qp, isAni); +} + diff --git a/illume2-slp/src/e_illume.h b/illume2-slp/src/e_illume.h new file mode 100644 index 0000000..1b9c4a5 --- /dev/null +++ b/illume2-slp/src/e_illume.h @@ -0,0 +1,378 @@ +#ifndef E_ILLUME_H +# define E_ILLUME_H + +#ifdef HAVE_GETTEXT +#define _(str) gettext(str) +#define d_(str, dom) dgettext(PACKAGE dom, str) +#else +#define _(str) (str) +#define d_(str, dom) (str) +#endif + +/** + * @file e_illume.h + * + * This header provides the various defines, structures and functions that + * make writing Illume policies easier. + * + * For details on the available functions, see @ref E_Illume_Main_Group. + * + * For details on the configuration structure, see @ref E_Illume_Config_Group. + * + * For details on the Policy API, see @ref E_Illume_Policy_Group. + * + * For details on quickpanels, see @ref E_Illume_Quickpanel_Group. + */ + +/* include standard E header */ +# include "e.h" + +/* define all of our typedefs */ +typedef struct _E_Illume_Policy_Api E_Illume_Policy_Api; +typedef struct _E_Illume_Policy E_Illume_Policy; +typedef struct _E_Illume_Config E_Illume_Config; +typedef struct _E_Illume_Config_Zone E_Illume_Config_Zone; +typedef struct _E_Illume_Quickpanel E_Illume_Quickpanel; +typedef struct _E_Illume_Quickpanel_Info E_Illume_Quickpanel_Info; + +typedef enum _E_Illume_Quickpanel_Ani_Type +{ + E_ILLUME_QUICKPANEL_ANI_NONE, + E_ILLUME_QUICKPANEL_ANI_SHOW, + E_ILLUME_QUICKPANEL_ANI_HIDE +} E_Illume_Quickpanel_Ani_Type; + +/** + * @def E_ILLUME_POLICY_API_VERSION + * @brief Current version of the Policy API that is supported by the Illume + * module. + * + * @warning Policies not written to match this version will fail to load. + * + * @ingroup E_Illume_Policy_Group + */ +# define E_ILLUME_POLICY_API_VERSION 2 + +/** + * @brief structure for policy API. + * + * @details When Illume tries to load a policy, it will check for the + * existince of this structure. If it is not found, the policy will fail + * to load. + * + * @warning This structure is required for Illume to load a policy. + * + * @ingroup E_Illume_Policy_Group + */ +struct _E_Illume_Policy_Api +{ + int version; + /**< The version of this policy. */ + + const char *name; + /**< The name of this policy. */ + const char *label; + /**< The label of this policy that will be displayed in the Policy Selection dialog. */ +}; + +/** + * @brief structure for policy + * + * This structure actually holds the policy functions that Illume will call + * at the appropriate times. + * + * @ingroup E_Illume_Policy_Group + */ +struct _E_Illume_Policy +{ + E_Object e_obj_inherit; + + E_Illume_Policy_Api *api; + /**< pointer to the @ref E_Illume_Policy_Api structure. + * @warning Policies are required to implement this or they will fail to + * load. */ + + void *handle; + + struct + { + void *(*init) (E_Illume_Policy *p); + /**< pointer to the function that Illume will call to initialize this + * policy. Typically, a policy would set the pointers to the functions + * that it supports in here. + * @warning Policies are required to implement this function. */ + + int (*shutdown) (E_Illume_Policy *p); + /**< pointer to the function that Illume will call to shutdown this + * policy. Typically, a policy would do any cleanup that it needs to + * do in here. + * @warning Policies are required to implement this function. */ + + void (*border_add) (E_Border *bd); + /**< pointer to the function that Illume will call when a new border + * gets added. @note This function is optional. */ + + void (*border_del) (E_Border *bd); + /**< pointer to the function that Illume will call when a border gets + * deleted. @note This function is optional. */ + + void (*border_focus_in) (E_Border *bd); + /**< pointer to the function that Illume will call when a border gets + * focus. @note This function is optional. */ + + void (*border_focus_out) (E_Border *bd); + /**< pointer to the function that Illume will call when a border loses + * focus. @note This function is optional. */ + + void (*border_activate) (E_Border *bd); + /**< pointer to the function that Illume will call when a border gets + * an activate message. @note This function is optional. */ + + void (*border_post_fetch) (E_Border *bd); + /**< pointer to the function that Illume will call when E signals a + * border post fetch. @note This function is optional. */ + + void (*border_post_assign) (E_Border *bd); + /**< pointer to the function that Illume will call when E signals a + * border post assign. @note This function is optional. */ + + void (*border_show) (E_Border *bd); + /**< pointer to the function that Illume will call when a border gets + * shown. @note This function is optional. */ + + void (*zone_layout) (E_Zone *zone); + /**< pointer to the function that Illume will call when a Zone needs + * to update it's layout. @note This function is optional. */ + + void (*zone_move_resize) (E_Zone *zone); + /**< pointer to the function that Illume will call when a Zone gets + * moved or resized. @note This function is optional. */ + + void (*zone_mode_change) (E_Zone *zone, Ecore_X_Atom mode); + /**< pointer to the function that Illume will call when the layout + * mode of a Zone changes. @note This function is optional. */ + + void (*zone_close) (E_Zone *zone); + /**< pointer to the function that Illume will call when the user has + * requested a border get closed. This is usually signaled from the + * Softkey window. @note This function is optional. */ + + void (*drag_start) (E_Border *bd); + /**< pointer to the function that Illume will call when the user has + * started to drag the Indicator/Softkey windows. + * @note This function is optional. */ + + void (*drag_end) (E_Border *bd); + /**< pointer to the function that Illume will call when the user has + * stopped draging the Indicator/Softkey windows. + * @note This function is optional. */ + + void (*focus_back) (E_Zone *zone); + /**< pointer to the function that Illume will call when the user has + * requested to cycle the focused border backwards. This is typically + * signalled from the Softkey window. + * @note This function is optional. */ + + void (*focus_forward) (E_Zone *zone); + /**< pointer to the function that Illume will call when the user has + * requested to cycle the focused border forward. This is typically + * signalled from the Softkey window. + * @note This function is optional. */ + + void (*property_change) (Ecore_X_Event_Window_Property *event); + /**< pointer to the function that Illume will call when properties + * change on a window. @note This function is optional. */ + + void (*window_focus_in) (Ecore_X_Event_Window_Focus_In *event); + + void (*border_restack_request) (E_Border* bd, E_Border* sibling, int mode); + void (*border_stack) (E_Event_Border_Stack* ev); + + void (*border_post_new_border) (E_Border *bd); + + void (*border_pre_fetch) (E_Border *bd); + void (*window_configure_request) (Ecore_X_Event_Window_Configure_Request *event); + + /* for visibility */ + void (*window_create) (Ecore_X_Event_Window_Create *event); + void (*window_destroy) (Ecore_X_Event_Window_Destroy *event); + void (*window_reparent) (Ecore_X_Event_Window_Reparent *event); + void (*window_show) (Ecore_X_Event_Window_Show *event); + void (*window_hide) (Ecore_X_Event_Window_Hide *event); + void (*window_configure) (Ecore_X_Event_Window_Configure *event); + + void (*window_sync_draw_done) (Ecore_X_Event_Client_Message *event); + void (*quickpanel_state_change) (Ecore_X_Event_Client_Message *event); + } funcs; +}; + + +/** + * @brief structure for Illume configuration. + * + * @ingroup E_Illume_Config_Group + */ +struct _E_Illume_Config +{ + int version; + + struct + { + struct + { + int duration; + /**< integer specifying the amount of time it takes for an + * animation to complete. */ + } vkbd, quickpanel; + } animation; + + struct + { + const char *name; + /**< the name of the currently active/selected policy. */ + struct + { + const char *class; + /**< The window class to match on */ + const char *name; + /**< The window name to match on */ + const char *title; + /**< The window title to match on */ + int type; + /**< The window type to match on */ + struct + { + int class; + /**< flag to indicate if we should match on class */ + int name; + /**< flag to indicate if we should match on name */ + int title; + /**< flag to indicate if we should match on title */ + int type; + /**< flag to indicate if we should match on type */ + } match; + } vkbd, indicator, softkey, home; + Eina_List *zones; + } policy; + + Eina_Bool use_mem_trim; +}; + +/** + * @brief structure for Illume zone configuration. + * + * @ingroup E_Illume_Config_Group + */ +struct _E_Illume_Config_Zone +{ + int id; + struct + { + int dual; + /**< integer specifying whice mode we are in (0 == single application mode, 1 == dual application mode) */ + int side; + /**< interger specifying if we layout windows in top/bottom or left/right when in dual mode */ + } mode; + + /* NB: These are not configurable by user...just placeholders */ + struct + { + int size; + } vkbd, indicator, softkey; +}; + +struct _E_Illume_Quickpanel_Info +{ + E_Border *bd; + Eina_Bool draw_done; + int angle; + + /* for mini controller */ + Eina_Bool mini_controller; +}; + +/** + * @brief structure for Illume Quickpanels. + * + * @ingroup E_Illume_Quickpanel_Group + */ +struct _E_Illume_Quickpanel +{ + E_Object e_obj_inherit; + + E_Zone *zone; + /**< the current zone on which this quickpanel belongs */ + Eina_List *borders; + /**< a list of borders that this quickpanel contains */ + Ecore_Timer *timer; + Ecore_Animator *animator; + Ecore_Event_Handler *key_hdl; + double start, len; + struct + { + int size, isize, adjust, adjust_start, adjust_end, dir; + } vert, horiz; + + int angle; + int ani_type; + + unsigned char visible; + /**< flag to indicate if the quickpanel is currently visible */ + + E_Popup *popup; + Ecore_Evas *ee; + Evas *evas; + + Evas_Coord down_x, down_y; + int down_adjust; + Eina_Bool dragging : 1; + Eina_Bool down : 1; + Eina_Bool horiz_style : 1; + + Evas_Object *ly_base; + Eina_Bool hide_trigger; + + int popup_len; + int item_pos_y; + int threshold_y, move_x_min; + double scale; + E_Border *ind; + + Eina_Bool is_lock; + Eina_List *hidden_mini_controllers; +}; + + +/* define function prototypes that policies can use */ +EAPI E_Illume_Config_Zone *e_illume_zone_config_get(int id); + +/* general functions */ +EAPI Eina_Bool e_illume_border_is_indicator(E_Border *bd); +EAPI Eina_Bool e_illume_border_is_keyboard(E_Border *bd); +EAPI Eina_Bool e_illume_border_is_dialog(E_Border *bd); +EAPI Eina_Bool e_illume_border_is_qt_frame(E_Border *bd); +EAPI Eina_Bool e_illume_border_is_fullscreen(E_Border *bd); +EAPI Eina_Bool e_illume_border_is_conformant(E_Border *bd); +EAPI Eina_Bool e_illume_border_is_quickpanel(E_Border *bd); +EAPI Eina_Bool e_illume_border_is_lock_screen(E_Border *bd); +EAPI Eina_Bool e_illume_border_is_notification(E_Border *bd); +EAPI Eina_Bool e_illume_border_is_utility(E_Border *bd); +EAPI Eina_Bool e_illume_border_is_sliding_win(E_Border *bd); + +EAPI void e_illume_border_min_get(E_Border *bd, int *w, int *h); +EAPI E_Border *e_illume_border_at_xy_get(E_Zone *zone, int x, int y); +EAPI E_Border *e_illume_border_parent_get(E_Border *bd); +EAPI void e_illume_border_show(E_Border *bd); +EAPI void e_illume_border_hide(E_Border *bd); + +/* indicator functions */ +EAPI E_Border *e_illume_border_indicator_get(E_Zone *zone); +EAPI void e_illume_border_indicator_pos_get(E_Zone *zone, int *x, int *y); + +/* quickpanel functions */ +EAPI E_Illume_Quickpanel *e_illume_quickpanel_by_zone_get(E_Zone *zone); +EAPI Eina_List* e_illume_quickpanel_get (void); +EAPI void e_illume_quickpanel_show(E_Zone *zone, int isAni); +EAPI void e_illume_quickpanel_hide(E_Zone *zone, int isAni); + +#endif diff --git a/illume2-slp/src/e_illume_private.h b/illume2-slp/src/e_illume_private.h new file mode 100644 index 0000000..b7d0a75 --- /dev/null +++ b/illume2-slp/src/e_illume_private.h @@ -0,0 +1,21 @@ +#ifndef E_ILLUME_PRIVATE_H +# define E_ILLUME_PRIVATE_H + +# include "e_illume.h" + +/* define policy object type */ +# define E_ILLUME_POLICY_TYPE 0xE0b200b + +/* external variable to store list of quickpanels */ +extern Eina_List *_e_illume_qps; + +/* external variable to store active config */ +extern E_Illume_Config *_e_illume_cfg; + +/* external variable to store module directory */ +extern const char *_e_illume_mod_dir; + +/* external event for policy changes */ +extern int E_ILLUME_POLICY_EVENT_CHANGE; + +#endif diff --git a/illume2-slp/src/e_mod_config.c b/illume2-slp/src/e_mod_config.c new file mode 100644 index 0000000..ac7c59e --- /dev/null +++ b/illume2-slp/src/e_mod_config.c @@ -0,0 +1,262 @@ +#include "e_illume_private.h" +#include "e_mod_config.h" +#include "e_mod_config_animation.h" +#include "e_mod_config_windows.h" +#include "e_mod_config_policy.h" + +/* local function prototypes */ +static void _e_mod_illume_config_free(void); +static void _e_mod_illume_config_new(void); + +/* local variables */ +static E_Config_DD *_il_conf_edd = NULL; +static E_Config_DD *_il_conf_zone_edd = NULL; + +/* external variables */ +E_Illume_Config *_e_illume_cfg = NULL; + +int +e_mod_illume_config_init(void) +{ + /* create config structure for zones */ + _il_conf_zone_edd = E_CONFIG_DD_NEW("Illume_Config_Zone", E_Illume_Config_Zone); +#undef T +#undef D +#define T E_Illume_Config_Zone +#define D _il_conf_zone_edd + E_CONFIG_VAL(D, T, id, INT); + E_CONFIG_VAL(D, T, mode.dual, INT); + E_CONFIG_VAL(D, T, mode.side, INT); + + /* create config structure for module */ + _il_conf_edd = E_CONFIG_DD_NEW("Illume_Config", E_Illume_Config); +#undef T +#undef D +#define T E_Illume_Config +#define D _il_conf_edd + E_CONFIG_VAL(D, T, version, INT); + E_CONFIG_VAL(D, T, animation.vkbd.duration, INT); + E_CONFIG_VAL(D, T, animation.quickpanel.duration, INT); + E_CONFIG_VAL(D, T, policy.name, STR); + E_CONFIG_VAL(D, T, policy.vkbd.class, STR); + E_CONFIG_VAL(D, T, policy.vkbd.name, STR); + E_CONFIG_VAL(D, T, policy.vkbd.title, STR); + E_CONFIG_VAL(D, T, policy.vkbd.type, INT); + E_CONFIG_VAL(D, T, policy.vkbd.match.class, INT); + E_CONFIG_VAL(D, T, policy.vkbd.match.name, INT); + E_CONFIG_VAL(D, T, policy.vkbd.match.title, INT); + E_CONFIG_VAL(D, T, policy.vkbd.match.type, INT); + E_CONFIG_VAL(D, T, policy.indicator.class, STR); + E_CONFIG_VAL(D, T, policy.indicator.name, STR); + E_CONFIG_VAL(D, T, policy.indicator.title, STR); + E_CONFIG_VAL(D, T, policy.indicator.type, INT); + E_CONFIG_VAL(D, T, policy.indicator.match.class, INT); + E_CONFIG_VAL(D, T, policy.indicator.match.name, INT); + E_CONFIG_VAL(D, T, policy.indicator.match.title, INT); + E_CONFIG_VAL(D, T, policy.indicator.match.type, INT); + E_CONFIG_VAL(D, T, policy.softkey.class, STR); + E_CONFIG_VAL(D, T, policy.softkey.name, STR); + E_CONFIG_VAL(D, T, policy.softkey.title, STR); + E_CONFIG_VAL(D, T, policy.softkey.type, INT); + E_CONFIG_VAL(D, T, policy.softkey.match.class, INT); + E_CONFIG_VAL(D, T, policy.softkey.match.name, INT); + E_CONFIG_VAL(D, T, policy.softkey.match.title, INT); + E_CONFIG_VAL(D, T, policy.softkey.match.type, INT); + E_CONFIG_VAL(D, T, policy.home.class, STR); + E_CONFIG_VAL(D, T, policy.home.name, STR); + E_CONFIG_VAL(D, T, policy.home.title, STR); + E_CONFIG_VAL(D, T, policy.home.type, INT); + E_CONFIG_VAL(D, T, policy.home.match.class, INT); + E_CONFIG_VAL(D, T, policy.home.match.name, INT); + E_CONFIG_VAL(D, T, policy.home.match.title, INT); + E_CONFIG_VAL(D, T, policy.home.match.type, INT); + E_CONFIG_LIST(D, T, policy.zones, _il_conf_zone_edd); + E_CONFIG_VAL(D, T, use_mem_trim, UCHAR); + + /* attempt to load existing configuration */ + _e_illume_cfg = e_config_domain_load("module.illume2-slp", _il_conf_edd); + + /* check version */ + if ((_e_illume_cfg) && ((_e_illume_cfg->version >> 16) < IL_CONFIG_MAJOR)) + _e_mod_illume_config_free(); + + /* create new config if we need to */ + if (!_e_illume_cfg) _e_mod_illume_config_new(); + + /* setup category for config panel */ + e_configure_registry_category_add("illume", 0, _("Illume"), NULL, "preferences-illume"); + + /* add config items to category */ + e_configure_registry_generic_item_add("illume/policy", 0, _("Policy"), + NULL, "preferences-profiles", + e_mod_illume_config_policy_show); + e_configure_registry_generic_item_add("illume/animation", 0, _("Animation"), + NULL, "preferences-transitions", + e_mod_illume_config_animation_show); + e_configure_registry_generic_item_add("illume/windows", 0, _("Windows"), + NULL, "preferences-winlist", + e_mod_illume_config_windows_show); + + return 1; +} + +int +e_mod_illume_config_shutdown(void) +{ + /* destroy config item entries */ + e_configure_registry_item_del("illume/windows"); + e_configure_registry_item_del("illume/animation"); + e_configure_registry_item_del("illume/policy"); + + /* destroy config category */ + e_configure_registry_category_del("illume"); + + /* free config structure */ + _e_mod_illume_config_free(); + + /* free data descriptors */ + E_CONFIG_DD_FREE(_il_conf_zone_edd); + E_CONFIG_DD_FREE(_il_conf_edd); + + return 1; +} + +int +e_mod_illume_config_save(void) +{ + return e_config_domain_save("module.illume2-slp", _il_conf_edd, _e_illume_cfg); +} + +/* local functions */ +static void +_e_mod_illume_config_free(void) +{ + E_Illume_Config_Zone *cz; + + /* check for config */ + if (!_e_illume_cfg) return; + + /* cleanup any stringshares */ + if (_e_illume_cfg->policy.name) + eina_stringshare_del(_e_illume_cfg->policy.name); + _e_illume_cfg->policy.name = NULL; + + if (_e_illume_cfg->policy.vkbd.class) + eina_stringshare_del(_e_illume_cfg->policy.vkbd.class); + _e_illume_cfg->policy.vkbd.class = NULL; + if (_e_illume_cfg->policy.vkbd.name) + eina_stringshare_del(_e_illume_cfg->policy.vkbd.name); + _e_illume_cfg->policy.vkbd.name = NULL; + if (_e_illume_cfg->policy.vkbd.title) + eina_stringshare_del(_e_illume_cfg->policy.vkbd.title); + _e_illume_cfg->policy.vkbd.title = NULL; + + if (_e_illume_cfg->policy.indicator.class) + eina_stringshare_del(_e_illume_cfg->policy.indicator.class); + _e_illume_cfg->policy.indicator.class = NULL; + if (_e_illume_cfg->policy.indicator.name) + eina_stringshare_del(_e_illume_cfg->policy.indicator.name); + _e_illume_cfg->policy.indicator.name = NULL; + if (_e_illume_cfg->policy.indicator.title) + eina_stringshare_del(_e_illume_cfg->policy.indicator.title); + _e_illume_cfg->policy.indicator.title = NULL; + + if (_e_illume_cfg->policy.softkey.class) + eina_stringshare_del(_e_illume_cfg->policy.softkey.class); + _e_illume_cfg->policy.softkey.class = NULL; + if (_e_illume_cfg->policy.softkey.name) + eina_stringshare_del(_e_illume_cfg->policy.softkey.name); + _e_illume_cfg->policy.softkey.name = NULL; + if (_e_illume_cfg->policy.softkey.title) + eina_stringshare_del(_e_illume_cfg->policy.softkey.title); + _e_illume_cfg->policy.softkey.title = NULL; + + if (_e_illume_cfg->policy.home.class) + eina_stringshare_del(_e_illume_cfg->policy.home.class); + _e_illume_cfg->policy.home.class = NULL; + if (_e_illume_cfg->policy.home.name) + eina_stringshare_del(_e_illume_cfg->policy.home.name); + _e_illume_cfg->policy.home.name = NULL; + if (_e_illume_cfg->policy.home.title) + eina_stringshare_del(_e_illume_cfg->policy.home.title); + _e_illume_cfg->policy.home.title = NULL; + + /* free configured zones */ + EINA_LIST_FREE(_e_illume_cfg->policy.zones, cz) + E_FREE(cz); + + /* free config structure */ + E_FREE(_e_illume_cfg); +} + +static void +_e_mod_illume_config_new(void) +{ + E_Illume_Config_Zone *cz; + + /* create initial config */ + _e_illume_cfg = E_NEW(E_Illume_Config, 1); + _e_illume_cfg->version = 0; + _e_illume_cfg->animation.vkbd.duration = 1000; + _e_illume_cfg->animation.quickpanel.duration = 700; + _e_illume_cfg->policy.name = eina_stringshare_add("illume"); + + _e_illume_cfg->policy.vkbd.class = eina_stringshare_add("Virtual-Keyboard"); + _e_illume_cfg->policy.vkbd.name = eina_stringshare_add("Virtual-Keyboard"); + _e_illume_cfg->policy.vkbd.title = eina_stringshare_add("Virtual Keyboard"); + _e_illume_cfg->policy.vkbd.type = ECORE_X_WINDOW_TYPE_NORMAL; + _e_illume_cfg->policy.vkbd.match.class = 0; + _e_illume_cfg->policy.vkbd.match.name = 1; + _e_illume_cfg->policy.vkbd.match.title = 1; + _e_illume_cfg->policy.vkbd.match.type = 0; + + _e_illume_cfg->policy.indicator.class = + eina_stringshare_add("Illume-Indicator"); + _e_illume_cfg->policy.indicator.name = + eina_stringshare_add("Illume-Indicator"); + _e_illume_cfg->policy.indicator.title = + eina_stringshare_add("Illume Indicator"); + _e_illume_cfg->policy.indicator.type = ECORE_X_WINDOW_TYPE_DOCK; + _e_illume_cfg->policy.indicator.match.class = 0; + _e_illume_cfg->policy.indicator.match.name = 1; + _e_illume_cfg->policy.indicator.match.title = 1; + _e_illume_cfg->policy.indicator.match.type = 0; + + _e_illume_cfg->policy.softkey.class = + eina_stringshare_add("Illume-Softkey"); + _e_illume_cfg->policy.softkey.name = + eina_stringshare_add("Illume-Softkey"); + _e_illume_cfg->policy.softkey.title = + eina_stringshare_add("Illume Softkey"); + _e_illume_cfg->policy.softkey.type = ECORE_X_WINDOW_TYPE_DOCK; + _e_illume_cfg->policy.softkey.match.class = 0; + _e_illume_cfg->policy.softkey.match.name = 1; + _e_illume_cfg->policy.softkey.match.title = 1; + _e_illume_cfg->policy.softkey.match.type = 0; + + _e_illume_cfg->policy.home.class = eina_stringshare_add("Illume-Home"); + _e_illume_cfg->policy.home.name = eina_stringshare_add("Illume-Home"); + _e_illume_cfg->policy.home.title = eina_stringshare_add("Illume Home"); + _e_illume_cfg->policy.home.type = ECORE_X_WINDOW_TYPE_NORMAL; + _e_illume_cfg->policy.home.match.class = 0; + _e_illume_cfg->policy.home.match.name = 1; + _e_illume_cfg->policy.home.match.title = 1; + _e_illume_cfg->policy.home.match.type = 0; + + _e_illume_cfg->use_mem_trim = EINA_TRUE; + + /* create config for initial zone */ + cz = E_NEW(E_Illume_Config_Zone, 1); + cz->id = 0; + cz->mode.dual = 0; + cz->mode.side = 0; + + /* add zone config to main config structure */ + _e_illume_cfg->policy.zones = + eina_list_append(_e_illume_cfg->policy.zones, cz); + + /* add any new config variables here */ + /* if ((_e_illume_cfg->version & 0xffff) < 1) */ + + _e_illume_cfg->version = ((IL_CONFIG_MAJOR << 16) | IL_CONFIG_MINOR); +} diff --git a/illume2-slp/src/e_mod_config.h b/illume2-slp/src/e_mod_config.h new file mode 100644 index 0000000..b88886d --- /dev/null +++ b/illume2-slp/src/e_mod_config.h @@ -0,0 +1,11 @@ +#ifndef E_MOD_CONFIG_H +# define E_MOD_CONFIG_H + +# define IL_CONFIG_MAJOR 0 +# define IL_CONFIG_MINOR 1 + +int e_mod_illume_config_init(void); +int e_mod_illume_config_shutdown(void); +int e_mod_illume_config_save(void); + +#endif diff --git a/illume2-slp/src/e_mod_config_animation.c b/illume2-slp/src/e_mod_config_animation.c new file mode 100644 index 0000000..82c25f3 --- /dev/null +++ b/illume2-slp/src/e_mod_config_animation.c @@ -0,0 +1,127 @@ +#include "e_illume_private.h" +#include "e_mod_config_animation.h" + +/* local function prototypes */ +static void *_e_mod_illume_config_animation_create(E_Config_Dialog *cfd); +static void _e_mod_illume_config_animation_free(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata); +static Evas_Object *_e_mod_illume_config_animation_ui(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata); +static void _e_mod_illume_config_animation_change(void *data, Evas_Object *obj, void *event); +static Eina_Bool _e_mod_illume_config_animation_timeout(void *data); + +/* local variables */ +Ecore_Timer *_anim_change_timer = NULL; + +void +e_mod_illume_config_animation_show(E_Container *con, const char *params __UNUSED__) +{ + E_Config_Dialog *cfd; + E_Config_Dialog_View *v; + + if (e_config_dialog_find("E", "_config_illume_animation_settings")) return; + + v = E_NEW(E_Config_Dialog_View, 1); + if (!v) return; + + v->create_cfdata = _e_mod_illume_config_animation_create; + v->free_cfdata = _e_mod_illume_config_animation_free; + v->basic.create_widgets = _e_mod_illume_config_animation_ui; + v->basic_only = 1; + v->normal_win = 1; + v->scroll = 1; + + cfd = e_config_dialog_new(con, _("Animation Settings"), "E", + "_config_illume_animation_settings", + "enlightenment/animation_settings", 0, v, NULL); + if (!cfd) return; + + e_dialog_resizable_set(cfd->dia, 1); +} + +/* local function prototypes */ +static void * +_e_mod_illume_config_animation_create(E_Config_Dialog *cfd __UNUSED__) +{ + return NULL; +} + +static void +_e_mod_illume_config_animation_free(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata __UNUSED__) +{ + if (_anim_change_timer) ecore_timer_del(_anim_change_timer); + _anim_change_timer = NULL; +} + +static Evas_Object * +_e_mod_illume_config_animation_ui(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data *cfdata __UNUSED__) +{ + Evas_Object *list, *of, *ow; + E_Radio_Group *rg; + + list = e_widget_list_add(evas, 0, 0); + + of = e_widget_framelist_add(evas, _("Keyboard"), 0); + rg = e_widget_radio_group_new(&(_e_illume_cfg->animation.vkbd.duration)); + ow = e_widget_radio_add(evas, _("Slow"), 2000, rg); + e_widget_framelist_object_append(of, ow); + evas_object_smart_callback_add(ow, "changed", + _e_mod_illume_config_animation_change, NULL); + ow = e_widget_radio_add(evas, _("Medium"), 1000, rg); + e_widget_framelist_object_append(of, ow); + evas_object_smart_callback_add(ow, "changed", + _e_mod_illume_config_animation_change, NULL); + ow = e_widget_radio_add(evas, _("Fast"), 500, rg); + e_widget_framelist_object_append(of, ow); + evas_object_smart_callback_add(ow, "changed", + _e_mod_illume_config_animation_change, NULL); + ow = e_widget_radio_add(evas, _("Very Fast"), 250, rg); + e_widget_framelist_object_append(of, ow); + evas_object_smart_callback_add(ow, "changed", + _e_mod_illume_config_animation_change, NULL); + ow = e_widget_radio_add(evas, _("Off"), 0, rg); + e_widget_framelist_object_append(of, ow); + evas_object_smart_callback_add(ow, "changed", + _e_mod_illume_config_animation_change, NULL); + e_widget_list_object_append(list, of, 1, 0, 0.0); + + of = e_widget_framelist_add(evas, _("Quickpanel"), 0); + rg = e_widget_radio_group_new(&(_e_illume_cfg->animation.quickpanel.duration)); + ow = e_widget_radio_add(evas, _("Slow"), 2000, rg); + e_widget_framelist_object_append(of, ow); + evas_object_smart_callback_add(ow, "changed", + _e_mod_illume_config_animation_change, NULL); + ow = e_widget_radio_add(evas, _("Medium"), 1000, rg); + e_widget_framelist_object_append(of, ow); + evas_object_smart_callback_add(ow, "changed", + _e_mod_illume_config_animation_change, NULL); + ow = e_widget_radio_add(evas, _("Fast"), 500, rg); + e_widget_framelist_object_append(of, ow); + evas_object_smart_callback_add(ow, "changed", + _e_mod_illume_config_animation_change, NULL); + ow = e_widget_radio_add(evas, _("Very Fast"), 250, rg); + e_widget_framelist_object_append(of, ow); + evas_object_smart_callback_add(ow, "changed", + _e_mod_illume_config_animation_change, NULL); + ow = e_widget_radio_add(evas, _("Off"), 0, rg); + e_widget_framelist_object_append(of, ow); + evas_object_smart_callback_add(ow, "changed", + _e_mod_illume_config_animation_change, NULL); + e_widget_list_object_append(list, of, 1, 0, 0.0); + + return list; +} + +static void +_e_mod_illume_config_animation_change(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__) +{ + if (_anim_change_timer) ecore_timer_del(_anim_change_timer); + _anim_change_timer = + ecore_timer_add(0.5, _e_mod_illume_config_animation_timeout, data); +} + +static Eina_Bool +_e_mod_illume_config_animation_timeout(void *data __UNUSED__) +{ + e_config_save_queue(); + _anim_change_timer = NULL; + return ECORE_CALLBACK_CANCEL; +} diff --git a/illume2-slp/src/e_mod_config_animation.h b/illume2-slp/src/e_mod_config_animation.h new file mode 100644 index 0000000..c8d6d23 --- /dev/null +++ b/illume2-slp/src/e_mod_config_animation.h @@ -0,0 +1,6 @@ +#ifndef E_MOD_CONFIG_ANIMATION_H +# define E_MOD_CONFIG_ANIMATION_H + +void e_mod_illume_config_animation_show(E_Container *con, const char *params __UNUSED__); + +#endif diff --git a/illume2-slp/src/e_mod_config_policy.c b/illume2-slp/src/e_mod_config_policy.c new file mode 100644 index 0000000..b486d9d --- /dev/null +++ b/illume2-slp/src/e_mod_config_policy.c @@ -0,0 +1,182 @@ +#include "e_illume_private.h" +#include "e_mod_config_policy.h" + +/* local function prototypes */ +static void *_e_mod_illume_config_policy_create(E_Config_Dialog *cfd); +static void _e_mod_illume_config_policy_free(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata); +static Evas_Object *_e_mod_illume_config_policy_ui(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata); +static void _e_mod_illume_config_policy_list_changed(void *data); +static Eina_Bool _e_mod_illume_config_policy_change_timeout(void *data); +static Eina_List *_e_mod_illume_config_policy_policies_get(void); +static void _e_mod_illume_config_policy_policy_free(E_Illume_Policy *p); + +/* local variables */ +Ecore_Timer *_policy_change_timer = NULL; +const char *_policy_name = NULL; + +void +e_mod_illume_config_policy_show(E_Container *con, const char *params __UNUSED__) +{ + E_Config_Dialog *cfd; + E_Config_Dialog_View *v; + + if (e_config_dialog_find("E", "_config_illume_policy")) return; + + v = E_NEW(E_Config_Dialog_View, 1); + if (!v) return; + + v->create_cfdata = _e_mod_illume_config_policy_create; + v->free_cfdata = _e_mod_illume_config_policy_free; + v->basic.create_widgets = _e_mod_illume_config_policy_ui; + v->basic_only = 1; + v->normal_win = 1; + v->scroll = 1; + cfd = e_config_dialog_new(con, _("Policy"), "E", "_config_illume_policy", + "enlightenment/policy", 0, v, NULL); + if (!cfd) return; + e_dialog_resizable_set(cfd->dia, 1); +} + +/* local functions */ +static void * +_e_mod_illume_config_policy_create(E_Config_Dialog *cfd __UNUSED__) +{ + return NULL; +} + +static void +_e_mod_illume_config_policy_free(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata __UNUSED__) +{ + if (_policy_change_timer) ecore_timer_del(_policy_change_timer); + _policy_change_timer = NULL; +} + +static Evas_Object * +_e_mod_illume_config_policy_ui(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data *cfdata __UNUSED__) +{ + Evas_Object *list, *ow; + Eina_List *policies; + E_Illume_Policy *p; + int i = 0, sel = 0; + + list = e_widget_list_add(evas, 0, 0); + ow = e_widget_ilist_add(evas, 24, 24, &(_policy_name)); + e_widget_ilist_selector_set(ow, 1); + evas_event_freeze(evas); + edje_freeze(); + e_widget_ilist_freeze(ow); + e_widget_ilist_clear(ow); + e_widget_ilist_go(ow); + + policies = _e_mod_illume_config_policy_policies_get(); + if (policies) + { + EINA_LIST_FREE(policies, p) + { + if (!p) + { + i++; + continue; + } + + e_widget_ilist_append(ow, NULL, strdup(p->api->label), + _e_mod_illume_config_policy_list_changed, NULL, + strdup(p->api->name)); + + if ((_e_illume_cfg->policy.name) && + (!strcmp(_e_illume_cfg->policy.name, p->api->name))) + sel = i; + + e_object_del(E_OBJECT(p)); + i++; + } + } + + e_widget_size_min_set(ow, 100, 200); + e_widget_ilist_go(ow); + e_widget_ilist_selected_set(ow, sel); + e_widget_ilist_thaw(ow); + edje_thaw(); + evas_event_thaw(evas); + e_widget_list_object_append(list, ow, 1, 0, 0.0); + return list; +} + +static void +_e_mod_illume_config_policy_list_changed(void *data) +{ + if (_e_illume_cfg->policy.name) + eina_stringshare_del(_e_illume_cfg->policy.name); + if (_policy_name) + _e_illume_cfg->policy.name = eina_stringshare_add(_policy_name); + if (_policy_change_timer) ecore_timer_del(_policy_change_timer); + _policy_change_timer = + ecore_timer_add(0.5, _e_mod_illume_config_policy_change_timeout, data); +} + +static Eina_Bool +_e_mod_illume_config_policy_change_timeout(void *data __UNUSED__) +{ + e_config_save_queue(); + _policy_change_timer = NULL; + ecore_event_add(E_ILLUME_POLICY_EVENT_CHANGE, NULL, NULL, NULL); + return ECORE_CALLBACK_CANCEL; +} + +static Eina_List * +_e_mod_illume_config_policy_policies_get(void) +{ + Eina_List *l = NULL, *files; + char dir[PATH_MAX], *file; + + snprintf(dir, sizeof(dir), "%s/policies", _e_illume_mod_dir); + + if (!(files = ecore_file_ls(dir))) return NULL; + + EINA_LIST_FREE(files, file) + { + E_Illume_Policy *p; + + if (!strstr(file, ".so")) continue; + snprintf(dir, sizeof(dir),"%s/policies/%s", _e_illume_mod_dir, file); + + p = E_OBJECT_ALLOC(E_Illume_Policy, E_ILLUME_POLICY_TYPE, + _e_mod_illume_config_policy_policy_free); + if (!p) continue; + + p->handle = dlopen(dir, RTLD_NOW | RTLD_GLOBAL); + if (!p->handle) + { + e_object_del(E_OBJECT(p)); + continue; + } + p->api = dlsym(p->handle, "e_illume_policy_api"); + if (!p->api) + { + e_object_del(E_OBJECT(p)); + continue; + } + if (p->api->version < E_ILLUME_POLICY_API_VERSION) + { + e_object_del(E_OBJECT(p)); + continue; + } + free(file); + l = eina_list_append(l, p); + } + + return l; +} + +static void +_e_mod_illume_config_policy_policy_free(E_Illume_Policy *p) +{ + if (!p) return; + + p->api = NULL; + + if (p->handle) dlclose(p->handle); + p->handle = NULL; + + E_FREE(p); +} diff --git a/illume2-slp/src/e_mod_config_policy.h b/illume2-slp/src/e_mod_config_policy.h new file mode 100644 index 0000000..46a4310 --- /dev/null +++ b/illume2-slp/src/e_mod_config_policy.h @@ -0,0 +1,6 @@ +#ifndef E_MOD_CONFIG_POLICY_H +# define E_MOD_CONFIG_POLICY_H + +void e_mod_illume_config_policy_show(E_Container *con, const char *params __UNUSED__); + +#endif diff --git a/illume2-slp/src/e_mod_config_windows.c b/illume2-slp/src/e_mod_config_windows.c new file mode 100644 index 0000000..03db315 --- /dev/null +++ b/illume2-slp/src/e_mod_config_windows.c @@ -0,0 +1,221 @@ +#include "e_illume_private.h" +#include "e_mod_config_windows.h" +#include "e_mod_select_window.h" + +/* local function prototypes */ +static void *_e_mod_illume_config_windows_create(E_Config_Dialog *cfd); +static void _e_mod_illume_config_windows_free(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata); +static Evas_Object *_e_mod_illume_config_windows_ui(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata); +static void _e_mod_illume_config_windows_check_changed(void *data, Evas_Object *obj, void *event); +static void _e_mod_illume_config_windows_change(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__); +static Eina_Bool _e_mod_illume_config_windows_change_timeout(void *data __UNUSED__); +static void _e_mod_illume_config_windows_select_home(void *data __UNUSED__, void *data2 __UNUSED__); +static void _e_mod_illume_config_windows_select_vkbd(void *data __UNUSED__, void *data2 __UNUSED__); +static void _e_mod_illume_config_windows_select_softkey(void *data __UNUSED__, void *data2 __UNUSED__); +static void _e_mod_illume_config_windows_select_indicator(void *data __UNUSED__, void *data2 __UNUSED__); + +/* local variables */ +Ecore_Timer *_windows_change_timer = NULL; + +/* public functions */ +void +e_mod_illume_config_windows_show(E_Container *con, const char *params __UNUSED__) +{ + E_Config_Dialog *cfd; + E_Config_Dialog_View *v; + + if (e_config_dialog_find("E", "_config_illume_windows_settings")) return; + + v = E_NEW(E_Config_Dialog_View, 1); + if (!v) return; + + v->create_cfdata = _e_mod_illume_config_windows_create; + v->free_cfdata = _e_mod_illume_config_windows_free; + v->basic.create_widgets = _e_mod_illume_config_windows_ui; + v->basic_only = 1; + v->normal_win = 1; + v->scroll = 1; + cfd = e_config_dialog_new(con, _("Window Settings"), "E", + "_config_illume_windows_settings", + "preferences-system-windows", 0, v, NULL); + if (!cfd) return; + e_dialog_resizable_set(cfd->dia, 1); +} + +/* local function prototypes */ +static void * +_e_mod_illume_config_windows_create(E_Config_Dialog *cfd __UNUSED__) +{ + return NULL; +} + +static void +_e_mod_illume_config_windows_free(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata __UNUSED__) +{ + if (_windows_change_timer) ecore_timer_del(_windows_change_timer); + _windows_change_timer = NULL; +} + +static Evas_Object * +_e_mod_illume_config_windows_ui(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data *cfdata __UNUSED__) +{ + Evas_Object *list, *of, *ow; + + list = e_widget_list_add(evas, 0, 0); + + of = e_widget_framelist_add(evas, _("Home"), 0); + ow = e_widget_button_add(evas, _("Select Window"), NULL, + _e_mod_illume_config_windows_select_home, NULL, NULL); + e_widget_framelist_object_append(of, ow); + ow = e_widget_check_add(evas, _("Match Window Class"), + &_e_illume_cfg->policy.home.match.class); + e_widget_framelist_object_append(of, ow); + evas_object_smart_callback_add(ow, "changed", + _e_mod_illume_config_windows_check_changed, NULL); + ow = e_widget_check_add(evas, _("Match Window Name"), + &_e_illume_cfg->policy.home.match.name); + e_widget_framelist_object_append(of, ow); + evas_object_smart_callback_add(ow, "changed", + _e_mod_illume_config_windows_check_changed, NULL); + ow = e_widget_check_add(evas, _("Match Window Title"), + &_e_illume_cfg->policy.home.match.title); + e_widget_framelist_object_append(of, ow); + evas_object_smart_callback_add(ow, "changed", + _e_mod_illume_config_windows_check_changed, NULL); + ow = e_widget_check_add(evas, _("Match Window Type"), + &_e_illume_cfg->policy.home.match.type); + e_widget_framelist_object_append(of, ow); + evas_object_smart_callback_add(ow, "changed", + _e_mod_illume_config_windows_check_changed, NULL); + e_widget_list_object_append(list, of, 1, 0, 0.0); + + of = e_widget_framelist_add(evas, _("Indicator"), 0); + ow = e_widget_button_add(evas, _("Select Window"), NULL, + _e_mod_illume_config_windows_select_indicator, NULL, NULL); + e_widget_framelist_object_append(of, ow); + ow = e_widget_check_add(evas, _("Match Window Class"), + &_e_illume_cfg->policy.indicator.match.class); + e_widget_framelist_object_append(of, ow); + evas_object_smart_callback_add(ow, "changed", + _e_mod_illume_config_windows_check_changed, NULL); + ow = e_widget_check_add(evas, _("Match Window Name"), + &_e_illume_cfg->policy.indicator.match.name); + e_widget_framelist_object_append(of, ow); + evas_object_smart_callback_add(ow, "changed", + _e_mod_illume_config_windows_check_changed, NULL); + ow = e_widget_check_add(evas, _("Match Window Title"), + &_e_illume_cfg->policy.indicator.match.title); + e_widget_framelist_object_append(of, ow); + evas_object_smart_callback_add(ow, "changed", + _e_mod_illume_config_windows_check_changed, NULL); + ow = e_widget_check_add(evas, _("Match Window Type"), + &_e_illume_cfg->policy.indicator.match.type); + e_widget_framelist_object_append(of, ow); + evas_object_smart_callback_add(ow, "changed", + _e_mod_illume_config_windows_check_changed, NULL); + e_widget_list_object_append(list, of, 1, 0, 0.0); + + of = e_widget_framelist_add(evas, _("Keyboard"), 0); + ow = e_widget_button_add(evas, _("Select Window"), NULL, + _e_mod_illume_config_windows_select_vkbd, NULL, NULL); + e_widget_framelist_object_append(of, ow); + ow = e_widget_check_add(evas, _("Match Window Class"), + &_e_illume_cfg->policy.vkbd.match.class); + e_widget_framelist_object_append(of, ow); + evas_object_smart_callback_add(ow, "changed", + _e_mod_illume_config_windows_check_changed, NULL); + ow = e_widget_check_add(evas, _("Match Window Name"), + &_e_illume_cfg->policy.vkbd.match.name); + e_widget_framelist_object_append(of, ow); + evas_object_smart_callback_add(ow, "changed", + _e_mod_illume_config_windows_check_changed, NULL); + ow = e_widget_check_add(evas, _("Match Window Title"), + &_e_illume_cfg->policy.vkbd.match.title); + e_widget_framelist_object_append(of, ow); + evas_object_smart_callback_add(ow, "changed", + _e_mod_illume_config_windows_check_changed, NULL); + ow = e_widget_check_add(evas, _("Match Window Type"), + &_e_illume_cfg->policy.vkbd.match.type); + e_widget_framelist_object_append(of, ow); + evas_object_smart_callback_add(ow, "changed", + _e_mod_illume_config_windows_check_changed, NULL); + e_widget_list_object_append(list, of, 1, 0, 0.0); + + of = e_widget_framelist_add(evas, _("Softkey"), 0); + ow = e_widget_button_add(evas, _("Select Window"), NULL, + _e_mod_illume_config_windows_select_softkey, NULL, NULL); + e_widget_framelist_object_append(of, ow); + ow = e_widget_check_add(evas, _("Match Window Class"), + &_e_illume_cfg->policy.softkey.match.class); + e_widget_framelist_object_append(of, ow); + evas_object_smart_callback_add(ow, "changed", + _e_mod_illume_config_windows_check_changed, NULL); + ow = e_widget_check_add(evas, _("Match Window Name"), + &_e_illume_cfg->policy.softkey.match.name); + e_widget_framelist_object_append(of, ow); + evas_object_smart_callback_add(ow, "changed", + _e_mod_illume_config_windows_check_changed, NULL); + ow = e_widget_check_add(evas, _("Match Window Title"), + &_e_illume_cfg->policy.softkey.match.title); + e_widget_framelist_object_append(of, ow); + evas_object_smart_callback_add(ow, "changed", + _e_mod_illume_config_windows_check_changed, NULL); + ow = e_widget_check_add(evas, _("Match Window Type"), + &_e_illume_cfg->policy.softkey.match.type); + e_widget_framelist_object_append(of, ow); + evas_object_smart_callback_add(ow, "changed", + _e_mod_illume_config_windows_check_changed, NULL); + e_widget_list_object_append(list, of, 1, 0, 0.0); + + return list; +} + +static void +_e_mod_illume_config_windows_check_changed(void *data, Evas_Object *obj, void *event) +{ + _e_mod_illume_config_windows_change(data, obj, event); +} + +static void +_e_mod_illume_config_windows_change(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__) +{ + if (_windows_change_timer) ecore_timer_del(_windows_change_timer); + _windows_change_timer = + ecore_timer_add(0.5, _e_mod_illume_config_windows_change_timeout, data); +} + +static Eina_Bool +_e_mod_illume_config_windows_change_timeout(void *data __UNUSED__) +{ + e_config_save_queue(); + _windows_change_timer = NULL; + return ECORE_CALLBACK_CANCEL; +} + +static void +_e_mod_illume_config_windows_select_home(void *data __UNUSED__, void *data2 __UNUSED__) +{ + if (e_config_dialog_find("E", "_config_illume_select_window")) return; + e_mod_illume_config_select_window(E_ILLUME_SELECT_WINDOW_TYPE_HOME); +} + +static void +_e_mod_illume_config_windows_select_vkbd(void *data __UNUSED__, void *data2 __UNUSED__) +{ + if (e_config_dialog_find("E", "_config_illume_select_window")) return; + e_mod_illume_config_select_window(E_ILLUME_SELECT_WINDOW_TYPE_VKBD); +} + +static void +_e_mod_illume_config_windows_select_softkey(void *data __UNUSED__, void *data2 __UNUSED__) +{ + if (e_config_dialog_find("E", "_config_illume_select_window")) return; + e_mod_illume_config_select_window(E_ILLUME_SELECT_WINDOW_TYPE_SOFTKEY); +} + +static void +_e_mod_illume_config_windows_select_indicator(void *data __UNUSED__, void *data2 __UNUSED__) +{ + if (e_config_dialog_find("E", "_config_illume_select_window")) return; + e_mod_illume_config_select_window(E_ILLUME_SELECT_WINDOW_TYPE_INDICATOR); +} diff --git a/illume2-slp/src/e_mod_config_windows.h b/illume2-slp/src/e_mod_config_windows.h new file mode 100644 index 0000000..1d251ad --- /dev/null +++ b/illume2-slp/src/e_mod_config_windows.h @@ -0,0 +1,6 @@ +#ifndef E_MOD_CONFIG_WINDOWS_H +# define E_MOD_CONFIG_WINDOWS_H + +void e_mod_illume_config_windows_show(E_Container *con, const char *params __UNUSED__); + +#endif diff --git a/illume2-slp/src/e_mod_main.c b/illume2-slp/src/e_mod_main.c new file mode 100644 index 0000000..40eb2ad --- /dev/null +++ b/illume2-slp/src/e_mod_main.c @@ -0,0 +1,161 @@ +#include "e_illume_private.h" +#include "e_mod_main.h" +#include "e_mod_config.h" +#include "e_mod_policy.h" +#include "e_mod_quickpanel.h" + +/* NB: Initially I had done this rewrite with eina_logging enabled, but it + * degraded performance so much that it was just not worth it. So now this + * module just uses printfs on the console to report things */ + +/* external variables */ +const char *_e_illume_mod_dir = NULL; +Eina_List *_e_illume_qps = NULL; + +EAPI E_Module_Api e_modapi = { E_MODULE_API_VERSION, "Illume2" }; + +EAPI void * +e_modapi_init(E_Module *m) +{ + Eina_List *ml, *cl, *zl; + E_Manager *man; + E_Container *con; + E_Zone *zone; + Ecore_X_Window *zones; + int zcount = 0; + + /* check if illume is loaded and bail out if it is. + * Illume1 and illume2 both cannot be loaded @ the same time */ + if (e_module_find("illume")) return NULL; + if (e_module_find("illume2")) return NULL; + + /* set module priority so we load first */ + e_module_priority_set(m, 100); + + /* set module directory variable */ + _e_illume_mod_dir = eina_stringshare_add(m->dir); + + /* try to initialize the config subsystem */ + if (!e_mod_illume_config_init()) + { + /* clear module directory variable */ + if (_e_illume_mod_dir) eina_stringshare_del(_e_illume_mod_dir); + _e_illume_mod_dir = NULL; + + return NULL; + } + + /* try to initialize the policy subsystem */ + if (!e_mod_policy_init()) + { + /* shutdown the config subsystem */ + e_mod_illume_config_shutdown(); + + /* clear module directory variable */ + if (_e_illume_mod_dir) eina_stringshare_del(_e_illume_mod_dir); + _e_illume_mod_dir = NULL; + + return NULL; + } + + /* initialize the quickpanel subsystem */ + e_mod_quickpanel_init(); + + /* loop zones and get count */ + EINA_LIST_FOREACH(e_manager_list(), ml, man) + { + if (!man) continue; + EINA_LIST_FOREACH(man->containers, cl, con) + { + if (!con) continue; + EINA_LIST_FOREACH(con->zones, zl, zone) + zcount++; + } + } + + /* allocate enough zones */ + zones = calloc(zcount, sizeof(Ecore_X_Window)); + if (!zones) + { + /* shutdown quickpanel */ + e_mod_quickpanel_shutdown(); + + /* shutdown the config subsystem */ + e_mod_illume_config_shutdown(); + + /* clear module directory variable */ + if (_e_illume_mod_dir) eina_stringshare_del(_e_illume_mod_dir); + _e_illume_mod_dir = NULL; + + return NULL; + } + + zcount = 0; + + /* loop the zones and create quickpanels for each one */ + EINA_LIST_FOREACH(e_manager_list(), ml, man) + { + if (!man) continue; + EINA_LIST_FOREACH(man->containers, cl, con) + { + if (!con) continue; + EINA_LIST_FOREACH(con->zones, zl, zone) + { + if (!zone) continue; + E_Illume_Quickpanel *qp; + + /* set zone window in list of zones */ + zones[zcount] = zone->black_win; + + /* increment zone count */ + zcount++; + + /* try to create a new quickpanel for this zone */ + if (!(qp = e_mod_quickpanel_new(zone))) continue; + + /* append new qp to list */ + _e_illume_qps = eina_list_append(_e_illume_qps, qp); + } + } + /* set the zone list on this root. This is needed for some + * elm apps like elm_indicator so that they know how many + * indicators to create at startup */ + ecore_x_e_illume_zone_list_set(man->root, zones, zcount); + } + + /* free zones variable */ + free(zones); + + return m; +} + +EAPI int +e_modapi_shutdown(E_Module *m __UNUSED__) +{ + E_Illume_Quickpanel *qp; + + /* delete the quickpanels */ + EINA_LIST_FREE(_e_illume_qps, qp) + e_object_del(E_OBJECT(qp)); + + /* shutdown the quickpanel subsystem */ + e_mod_quickpanel_shutdown(); + + /* shutdown the policy subsystem */ + e_mod_policy_shutdown(); + + /* shutdown the config subsystem */ + e_mod_illume_config_shutdown(); + + /* clear module directory variable */ + if (_e_illume_mod_dir) eina_stringshare_del(_e_illume_mod_dir); + _e_illume_mod_dir = NULL; + + return 1; +} + +EAPI int +e_modapi_save(E_Module *m __UNUSED__) +{ + return e_mod_illume_config_save(); +} diff --git a/illume2-slp/src/e_mod_main.h b/illume2-slp/src/e_mod_main.h new file mode 100644 index 0000000..f415823 --- /dev/null +++ b/illume2-slp/src/e_mod_main.h @@ -0,0 +1,10 @@ +#ifndef E_MOD_MAIN_H +# define E_MOD_MAIN_H + +EAPI extern E_Module_Api e_modapi; + +EAPI void *e_modapi_init(E_Module *m); +EAPI int e_modapi_shutdown(E_Module *m); +EAPI int e_modapi_save(E_Module *m); + +#endif diff --git a/illume2-slp/src/e_mod_policy.c b/illume2-slp/src/e_mod_policy.c new file mode 100644 index 0000000..9ba9402 --- /dev/null +++ b/illume2-slp/src/e_mod_policy.c @@ -0,0 +1,789 @@ +#include "e_illume_private.h" +#include "e_mod_policy.h" + +/* local function prototypes */ +static char *_e_mod_policy_find(void); +static int _e_mod_policy_load(char *file); +static void _e_mod_policy_handlers_add(void); +static void _e_mod_policy_hooks_add(void); +static void _e_mod_policy_cb_free(E_Illume_Policy *p); +static Eina_Bool _e_mod_policy_cb_border_add(void *data __UNUSED__, int type __UNUSED__, void *event); +static Eina_Bool _e_mod_policy_cb_border_del(void *data __UNUSED__, int type __UNUSED__, void *event); +static Eina_Bool _e_mod_policy_cb_border_focus_in(void *data __UNUSED__, int type __UNUSED__, void *event); +static Eina_Bool _e_mod_policy_cb_border_focus_out(void *data __UNUSED__, int type __UNUSED__, void *event); +static Eina_Bool _e_mod_policy_cb_border_show(void *data __UNUSED__, int type __UNUSED__, void *event); +static Eina_Bool _e_mod_policy_cb_zone_move_resize(void *data __UNUSED__, int type __UNUSED__, void *event); +static Eina_Bool _e_mod_policy_cb_client_message(void *data __UNUSED__, int type __UNUSED__, void *event); +static Eina_Bool _e_mod_policy_cb_window_property(void *data __UNUSED__, int type __UNUSED__, void *event); +static Eina_Bool _e_mod_policy_cb_policy_change(void *data __UNUSED__, int type, void *event __UNUSED__); +static Eina_Bool _e_mod_policy_cb_window_configure_request (void *data __UNUSED__, int type __UNUSED__, void *event); + +static void _e_mod_policy_cb_hook_post_fetch(void *data __UNUSED__, void *data2); +static void _e_mod_policy_cb_hook_post_assign(void *data __UNUSED__, void *data2); +static void _e_mod_policy_cb_hook_layout(void *data __UNUSED__, void *data2 __UNUSED__); +static void _e_mod_policy_cb_hook_post_new_border (void *data __UNUSED__, void *data2); +static void _e_mod_policy_cb_hook_pre_fetch(void *data __UNUSED__, void *data2); + +static Eina_Bool _e_mod_policy_cb_window_focus_in(void *data __UNUSED__, int type __UNUSED__, void *event); + +static int _e_mod_policy_init_atom (void); +static Eina_Bool _e_mod_policy_cb_border_stack(void *data __UNUSED__, int type __UNUSED__, void *event); + +/* for visibility */ +static Eina_Bool _e_mod_policy_cb_window_create (void *data __UNUSED__, int type __UNUSED__, void *event); +static Eina_Bool _e_mod_policy_cb_window_destroy (void *data __UNUSED__, int type __UNUSED__, void *event); +static Eina_Bool _e_mod_policy_cb_window_reparent (void *data __UNUSED__, int type __UNUSED__, void *event); +static Eina_Bool _e_mod_policy_cb_window_show (void *data __UNUSED__, int type __UNUSED__, void *event); +static Eina_Bool _e_mod_policy_cb_window_hide (void *data __UNUSED__, int type __UNUSED__, void *event); +static Eina_Bool _e_mod_policy_cb_window_configure (void *data __UNUSED__, int type __UNUSED__, void *event); + +/* local variables */ +static E_Illume_Policy *_policy = NULL; +static Eina_List *_policy_hdls = NULL, *_policy_hooks = NULL; +Ecore_X_Atom E_ILLUME_BORDER_WIN_RESTACK; + +/* external variables */ +int E_ILLUME_POLICY_EVENT_CHANGE = 0; + +int +e_mod_policy_init(void) +{ + Eina_List *ml; + E_Manager *man; + char *file; + + if (!_e_mod_policy_init_atom()) + { + /* creating atom failed, bail out */ + printf ("Cannot create atom\n"); + return 0; + } + + /* try to find the policy specified in config */ + if (!(file = _e_mod_policy_find())) + { + printf("Cannot find policy\n"); + return 0; + } + + /* attempt to load policy */ + if (!_e_mod_policy_load(file)) + { + /* loading policy failed, bail out */ + printf("Cannot load policy: %s\n", file); + if (file) free(file); + return 0; + } + + /* create new event for policy changes */ + E_ILLUME_POLICY_EVENT_CHANGE = ecore_event_type_new(); + + /* add our event handlers */ + _e_mod_policy_handlers_add(); + + /* add our border hooks */ + _e_mod_policy_hooks_add(); + + /* loop the root windows */ + EINA_LIST_FOREACH(e_manager_list(), ml, man) + { + Eina_List *cl; + E_Container *con; + + if (!man) continue; + + /* loop the containers */ + EINA_LIST_FOREACH(man->containers, cl, con) + { + Eina_List *zl; + E_Zone *zone; + + if (!con) continue; + + /* loop the zones */ + EINA_LIST_FOREACH(con->zones, zl, zone) + { + E_Illume_Config_Zone *cz; + Ecore_X_Illume_Mode mode = ECORE_X_ILLUME_MODE_SINGLE; + + if (!zone) continue; + + /* check for zone config */ + if (!(cz = e_illume_zone_config_get(zone->id))) + continue; + + /* set mode on this zone */ + if (cz->mode.dual == 0) + mode = ECORE_X_ILLUME_MODE_SINGLE; + else + { + if ((cz->mode.dual == 1) && (cz->mode.side == 0)) + mode = ECORE_X_ILLUME_MODE_DUAL_TOP; + else if ((cz->mode.dual == 1) && (cz->mode.side == 1)) + mode = ECORE_X_ILLUME_MODE_DUAL_LEFT; + } + ecore_x_e_illume_mode_set(zone->black_win, mode); + } + } + } + + if (file) free(file); + return 1; +} + +int +e_mod_policy_shutdown(void) +{ + Ecore_Event_Handler *hdl; + E_Border_Hook *hook; + + /* remove the ecore event handlers */ + EINA_LIST_FREE(_policy_hdls, hdl) + ecore_event_handler_del(hdl); + + /* remove the border hooks */ + EINA_LIST_FREE(_policy_hooks, hook) + e_border_hook_del(hook); + + /* destroy the policy if it exists */ + if (_policy) e_object_del(E_OBJECT(_policy)); + + /* reset event type */ + E_ILLUME_POLICY_EVENT_CHANGE = 0; + + return 1; +} + +/* local functions */ +static char * +_e_mod_policy_find(void) +{ + Eina_List *files; + char buff[PATH_MAX], dir[PATH_MAX], *file; + + snprintf(buff, sizeof(buff), "%s.so", _e_illume_cfg->policy.name); + snprintf(dir, sizeof(dir), "%s/policies", _e_illume_mod_dir); + + /* try to list all files in this directory */ + if (!(files = ecore_file_ls(dir))) return NULL; + + /* loop the returned files */ + EINA_LIST_FREE(files, file) + { + /* compare file with needed .so */ + if (!strcmp(file, buff)) + { + snprintf(dir, sizeof(dir), "%s/policies/%s", + _e_illume_mod_dir, file); + break; + } + free(file); + } + if (file) free(file); + else + { + /* if we did not find the requested policy, use a fallback */ + snprintf(dir, sizeof(dir), "%s/policies/illume.so", _e_illume_mod_dir); + } + + return strdup(dir); +} + +static int +_e_mod_policy_load(char *file) +{ + /* safety check */ + if (!file) return 0; + + /* delete existing policy first */ + if (_policy) e_object_del(E_OBJECT(_policy)); + + /* try to create our new policy object */ + _policy = + E_OBJECT_ALLOC(E_Illume_Policy, E_ILLUME_POLICY_TYPE, + _e_mod_policy_cb_free); + if (!_policy) + { + printf("Failed to allocate new policy object\n"); + return 0; + } + + /* attempt to open the .so */ + if (!(_policy->handle = dlopen(file, (RTLD_NOW | RTLD_GLOBAL)))) + { + /* cannot open the .so file, bail out */ + printf("Cannot open policy: %s\n", ecore_file_file_get(file)); + printf("\tError: %s\n", dlerror()); + e_object_del(E_OBJECT(_policy)); + return 0; + } + + /* clear any existing errors in dynamic loader */ + dlerror(); + + /* try to link to the needed policy api functions */ + _policy->api = dlsym(_policy->handle, "e_illume_policy_api"); + _policy->funcs.init = dlsym(_policy->handle, "e_illume_policy_init"); + _policy->funcs.shutdown = dlsym(_policy->handle, "e_illume_policy_shutdown"); + + /* check that policy supports needed functions */ + if ((!_policy->api) || (!_policy->funcs.init) || (!_policy->funcs.shutdown)) + { + /* policy doesn't support needed functions, bail out */ + printf("Policy does not support needed functions: %s\n", + ecore_file_file_get(file)); + printf("\tError: %s\n", dlerror()); + e_object_del(E_OBJECT(_policy)); + return 0; + } + + /* check policy api version */ + if (_policy->api->version < E_ILLUME_POLICY_API_VERSION) + { + /* policy is too old, bail out */ + printf("Policy is too old: %s\n", ecore_file_file_get(file)); + e_object_del(E_OBJECT(_policy)); + return 0; + } + + /* try to initialize the policy */ + if (!_policy->funcs.init(_policy)) + { + /* init failed, bail out */ + printf("Policy failed to initialize: %s\n", ecore_file_file_get(file)); + e_object_del(E_OBJECT(_policy)); + return 0; + } + + return 1; +} + +static void +_e_mod_policy_handlers_add(void) +{ + _policy_hdls = + eina_list_append(_policy_hdls, + ecore_event_handler_add(E_EVENT_BORDER_ADD, + _e_mod_policy_cb_border_add, NULL)); + _policy_hdls = + eina_list_append(_policy_hdls, + ecore_event_handler_add(E_EVENT_BORDER_REMOVE, + _e_mod_policy_cb_border_del, NULL)); + _policy_hdls = + eina_list_append(_policy_hdls, + ecore_event_handler_add(E_EVENT_BORDER_FOCUS_IN, + _e_mod_policy_cb_border_focus_in, + NULL)); + _policy_hdls = + eina_list_append(_policy_hdls, + ecore_event_handler_add(E_EVENT_BORDER_FOCUS_OUT, + _e_mod_policy_cb_border_focus_out, + NULL)); + _policy_hdls = + eina_list_append(_policy_hdls, + ecore_event_handler_add(E_EVENT_BORDER_SHOW, + _e_mod_policy_cb_border_show, + NULL)); + + _policy_hdls = + eina_list_append(_policy_hdls, + ecore_event_handler_add(E_EVENT_BORDER_STACK, + _e_mod_policy_cb_border_stack, + NULL)); + + _policy_hdls = + eina_list_append(_policy_hdls, + ecore_event_handler_add(E_EVENT_ZONE_MOVE_RESIZE, + _e_mod_policy_cb_zone_move_resize, + NULL)); + _policy_hdls = + eina_list_append(_policy_hdls, + ecore_event_handler_add(ECORE_X_EVENT_CLIENT_MESSAGE, + _e_mod_policy_cb_client_message, + NULL)); + _policy_hdls = + eina_list_append(_policy_hdls, + ecore_event_handler_add(ECORE_X_EVENT_WINDOW_PROPERTY, + _e_mod_policy_cb_window_property, + NULL)); + _policy_hdls = + eina_list_append(_policy_hdls, + ecore_event_handler_add(E_ILLUME_POLICY_EVENT_CHANGE, + _e_mod_policy_cb_policy_change, + NULL)); + + _policy_hdls = + eina_list_append(_policy_hdls, + ecore_event_handler_add(ECORE_X_EVENT_WINDOW_FOCUS_IN, + _e_mod_policy_cb_window_focus_in, + NULL)); + + /* for visibility */ + _policy_hdls = + eina_list_append(_policy_hdls, + ecore_event_handler_add(ECORE_X_EVENT_WINDOW_CREATE, + _e_mod_policy_cb_window_create, + NULL)); + _policy_hdls = + eina_list_append(_policy_hdls, + ecore_event_handler_add(ECORE_X_EVENT_WINDOW_DESTROY, + _e_mod_policy_cb_window_destroy, + NULL)); + _policy_hdls = + eina_list_append(_policy_hdls, + ecore_event_handler_add(ECORE_X_EVENT_WINDOW_REPARENT, + _e_mod_policy_cb_window_reparent, + NULL)); + _policy_hdls = + eina_list_append(_policy_hdls, + ecore_event_handler_add(ECORE_X_EVENT_WINDOW_SHOW, + _e_mod_policy_cb_window_show, + NULL)); + _policy_hdls = + eina_list_append(_policy_hdls, + ecore_event_handler_add(ECORE_X_EVENT_WINDOW_HIDE, + _e_mod_policy_cb_window_hide, + NULL)); + _policy_hdls = + eina_list_append(_policy_hdls, + ecore_event_handler_add(ECORE_X_EVENT_WINDOW_CONFIGURE, + _e_mod_policy_cb_window_configure, + NULL)); + + _policy_hdls = + eina_list_append(_policy_hdls, + ecore_event_handler_add(ECORE_X_EVENT_WINDOW_CONFIGURE_REQUEST, + _e_mod_policy_cb_window_configure_request, + NULL)); + +} + +static void +_e_mod_policy_hooks_add(void) +{ + _policy_hooks = + eina_list_append(_policy_hooks, + e_border_hook_add(E_BORDER_HOOK_EVAL_POST_FETCH, + _e_mod_policy_cb_hook_post_fetch, NULL)); + _policy_hooks = + eina_list_append(_policy_hooks, + e_border_hook_add(E_BORDER_HOOK_EVAL_POST_BORDER_ASSIGN, + _e_mod_policy_cb_hook_post_assign, NULL)); + _policy_hooks = + eina_list_append(_policy_hooks, + e_border_hook_add(E_BORDER_HOOK_CONTAINER_LAYOUT, + _e_mod_policy_cb_hook_layout, NULL)); + _policy_hooks = + eina_list_append(_policy_hooks, + e_border_hook_add(E_BORDER_HOOK_EVAL_POST_NEW_BORDER, + _e_mod_policy_cb_hook_post_new_border, NULL)); + _policy_hooks = + eina_list_append(_policy_hooks, + e_border_hook_add(E_BORDER_HOOK_EVAL_PRE_FETCH, + _e_mod_policy_cb_hook_pre_fetch, NULL)); +} + +static void +_e_mod_policy_cb_free(E_Illume_Policy *p) +{ + if (!p) return; + + /* tell the policy to shutdown */ + if (p->funcs.shutdown) p->funcs.shutdown(p); + p->funcs.shutdown = NULL; + + p->funcs.init = NULL; + p->api = NULL; + + /* close the linked .so */ + if (p->handle) dlclose(p->handle); + p->handle = NULL; + + E_FREE(p); +} + +static Eina_Bool +_e_mod_policy_cb_border_add(void *data __UNUSED__, int type __UNUSED__, void *event) +{ + E_Event_Border_Add *ev; + + ev = event; + + ecore_x_window_prop_window_set (ev->border->win, ECORE_X_ATOM_E_USER_CREATED_WINDOW, &(ev->border->client.win), 1); + ecore_x_window_prop_window_set (ev->border->client.win, ECORE_X_ATOM_E_PARENT_BORDER_WINDOW, &(ev->border->win), 1); + + if ((_policy) && (_policy->funcs.border_add)) + _policy->funcs.border_add(ev->border); + + return ECORE_CALLBACK_PASS_ON; +} + +static Eina_Bool +_e_mod_policy_cb_border_del(void *data __UNUSED__, int type __UNUSED__, void *event) +{ + E_Event_Border_Remove *ev; + + ev = event; + + ecore_x_window_prop_property_del(ev->border->client.win, ECORE_X_ATOM_E_PARENT_BORDER_WINDOW); + + if ((_policy) && (_policy->funcs.border_del)) + _policy->funcs.border_del(ev->border); + + return ECORE_CALLBACK_PASS_ON; +} + +static Eina_Bool +_e_mod_policy_cb_border_focus_in(void *data __UNUSED__, int type __UNUSED__, void *event) +{ + E_Event_Border_Focus_In *ev; + + ev = event; + if ((_policy) && (_policy->funcs.border_focus_in)) + _policy->funcs.border_focus_in(ev->border); + + return ECORE_CALLBACK_PASS_ON; +} + +static Eina_Bool +_e_mod_policy_cb_border_focus_out(void *data __UNUSED__, int type __UNUSED__, void *event) +{ + E_Event_Border_Focus_Out *ev; + + ev = event; + if ((_policy) && (_policy->funcs.border_focus_out)) + _policy->funcs.border_focus_out(ev->border); + + return ECORE_CALLBACK_PASS_ON; +} + +static Eina_Bool +_e_mod_policy_cb_border_show(void *data __UNUSED__, int type __UNUSED__, void *event) +{ + E_Event_Border_Show *ev; + + ev = event; + if ((_policy) && (_policy->funcs.border_show)) + _policy->funcs.border_show(ev->border); + + return ECORE_CALLBACK_PASS_ON; +} + +static Eina_Bool +_e_mod_policy_cb_zone_move_resize(void *data __UNUSED__, int type __UNUSED__, void *event) +{ + E_Event_Zone_Move_Resize *ev; + + ev = event; + if ((_policy) && (_policy->funcs.zone_move_resize)) + _policy->funcs.zone_move_resize(ev->zone); + + return ECORE_CALLBACK_PASS_ON; +} + +static Eina_Bool +_e_mod_policy_cb_client_message(void *data __UNUSED__, int type __UNUSED__, void *event) +{ + Ecore_X_Event_Client_Message *ev; + + ev = event; + if (ev->message_type == ECORE_X_ATOM_NET_ACTIVE_WINDOW) + { + E_Border *bd; + + if (!(bd = e_border_find_by_client_window(ev->win))) return ECORE_CALLBACK_PASS_ON; + if ((_policy) && (_policy->funcs.border_activate)) + _policy->funcs.border_activate(bd); + } + else if (ev->message_type == ECORE_X_ATOM_E_ILLUME_MODE) + { + E_Zone *zone; + + if (!(zone = e_util_zone_window_find(ev->win))) return ECORE_CALLBACK_PASS_ON; + if ((_policy) && (_policy->funcs.zone_mode_change)) + _policy->funcs.zone_mode_change(zone, ev->data.l[0]); + } + else if (ev->message_type == ECORE_X_ATOM_E_ILLUME_CLOSE) + { + E_Zone *zone; + + if (!(zone = e_util_zone_window_find(ev->win))) return ECORE_CALLBACK_PASS_ON; + if ((_policy) && (_policy->funcs.zone_close)) + _policy->funcs.zone_close(zone); + } + else if (ev->message_type == ECORE_X_ATOM_E_ILLUME_FOCUS_BACK) + { + E_Zone *zone; + + if (!(zone = e_util_zone_window_find(ev->win))) return ECORE_CALLBACK_PASS_ON; + if ((_policy) && (_policy->funcs.focus_back)) + _policy->funcs.focus_back(zone); + } + else if (ev->message_type == ECORE_X_ATOM_E_ILLUME_FOCUS_FORWARD) + { + E_Zone *zone; + + if (!(zone = e_util_zone_window_find(ev->win))) return ECORE_CALLBACK_PASS_ON; + if ((_policy) && (_policy->funcs.focus_forward)) + _policy->funcs.focus_forward(zone); + } + else if (ev->message_type == ECORE_X_ATOM_E_ILLUME_DRAG_START) + { + E_Border *bd; + + if (!(bd = e_border_find_by_client_window(ev->win))) return ECORE_CALLBACK_PASS_ON; + if ((_policy) && (_policy->funcs.drag_start)) + _policy->funcs.drag_start(bd); + } + else if (ev->message_type == ECORE_X_ATOM_E_ILLUME_DRAG_END) + { + E_Border *bd; + + if (!(bd = e_border_find_by_client_window(ev->win))) return ECORE_CALLBACK_PASS_ON; + if ((_policy) && (_policy->funcs.drag_end)) + _policy->funcs.drag_end(bd); + } + else if (ev->message_type == E_ILLUME_BORDER_WIN_RESTACK) + { + E_Border *bd; + E_Border *bd_sibling; + + if (!(bd = e_border_find_by_client_window(ev->win))) return 1; + if (!(bd_sibling = e_border_find_by_client_window((Ecore_X_Window) ev->data.l[0]))) return 1; + + if ((_policy) && (_policy->funcs.border_restack_request)) + _policy->funcs.border_restack_request(bd, bd_sibling, ev->data.l[1]); + } + else if (ev->message_type == ECORE_X_ATOM_E_COMP_SYNC_DRAW_DONE) + { + if ((_policy) && (_policy->funcs.window_sync_draw_done)) + _policy->funcs.window_sync_draw_done(ev); + } + else if (ev->message_type == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE) + { + if ((_policy) && (_policy->funcs.quickpanel_state_change)) + _policy->funcs.quickpanel_state_change(ev); + } + + return ECORE_CALLBACK_PASS_ON; +} + +static Eina_Bool +_e_mod_policy_cb_window_property(void *data __UNUSED__, int type __UNUSED__, void *event) +{ + Ecore_X_Event_Window_Property *ev; + + ev = event; + if ((_policy) && (_policy->funcs.property_change)) + _policy->funcs.property_change(ev); + + return ECORE_CALLBACK_PASS_ON; +} + +static Eina_Bool +_e_mod_policy_cb_policy_change(void *data __UNUSED__, int type, void *event __UNUSED__) +{ + char *file; + + if (type != E_ILLUME_POLICY_EVENT_CHANGE) return ECORE_CALLBACK_PASS_ON; + + /* find policy specified in config */ + if (!(file = _e_mod_policy_find())) return ECORE_CALLBACK_PASS_ON; + + /* try to load the policy */ + _e_mod_policy_load(file); + + if (file) free(file); + + return ECORE_CALLBACK_PASS_ON; +} + +static void +_e_mod_policy_cb_hook_post_fetch(void *data __UNUSED__, void *data2) +{ + E_Border *bd; + + if (!(bd = data2)) return; + if ((_policy) && (_policy->funcs.border_post_fetch)) + _policy->funcs.border_post_fetch(bd); +} + +static void +_e_mod_policy_cb_hook_post_assign(void *data __UNUSED__, void *data2) +{ + E_Border *bd; + + if (!(bd = data2)) return; + if ((_policy) && (_policy->funcs.border_post_assign)) + _policy->funcs.border_post_assign(bd); +} + +static void +_e_mod_policy_cb_hook_post_new_border (void *data __UNUSED__, void *data2) +{ + E_Border *bd; + + if (!(bd = data2)) return; + if ((_policy) && (_policy->funcs.border_post_new_border)) + _policy->funcs.border_post_new_border(bd); +} + +static void _e_mod_policy_cb_hook_pre_fetch(void *data __UNUSED__, void *data2) +{ + E_Border *bd; + + if (!(bd = data2)) return; + if ((_policy) && (_policy->funcs.border_pre_fetch)) + _policy->funcs.border_pre_fetch(bd); +} + +static Eina_Bool +_e_mod_policy_cb_window_configure_request (void *data __UNUSED__, int type __UNUSED__, void *event) +{ + Ecore_X_Event_Window_Configure_Request* ev = event; + E_Border *bd; + + if (!(bd = e_border_find_by_client_window(ev->win))) return ECORE_CALLBACK_PASS_ON; + if ((_policy) && (_policy->funcs.window_configure_request)) + _policy->funcs.window_configure_request(ev); + + return ECORE_CALLBACK_PASS_ON; +} + +static void +_e_mod_policy_cb_hook_layout(void *data __UNUSED__, void *data2 __UNUSED__) +{ + E_Zone *zone; + E_Border *bd; + Eina_List *zl = NULL, *l; + + /* loop through border list and find what changed */ + EINA_LIST_FOREACH(e_border_client_list(), l, bd) + { + if (!bd) continue; + if ((bd->new_client) || (bd->pending_move_resize) || + (bd->changes.pos) || (bd->changes.size) || (bd->changes.visible) || + (bd->need_shape_export) || (bd->need_shape_merge)) + { + /* NB: this border changed. add it's zone to list of what needs + * updating. This is done so we do not waste cpu cycles + * updating zones where nothing changed */ + if (!eina_list_data_find(zl, bd->zone)) + zl = eina_list_append(zl, bd->zone); + } + } + l = eina_list_free(l); + + /* loop the zones that need updating and call the policy update function */ + EINA_LIST_FREE(zl, zone) + { + if ((_policy) && (_policy->funcs.zone_layout)) + _policy->funcs.zone_layout(zone); + } + zl = eina_list_free(zl); +} + +static Eina_Bool +_e_mod_policy_cb_window_focus_in(void *data __UNUSED__, int type __UNUSED__, void *event) +{ + Ecore_X_Event_Window_Focus_In *ev; + + ev = event; + if ((_policy) && (_policy->funcs.window_focus_in)) + _policy->funcs.window_focus_in(ev); + + return ECORE_CALLBACK_PASS_ON; +} + +static int +_e_mod_policy_init_atom (void) +{ + E_ILLUME_BORDER_WIN_RESTACK = ecore_x_atom_get ("_E_ILLUME_RESTACK_WINDOW"); + if (!E_ILLUME_BORDER_WIN_RESTACK) + { + fprintf (stderr, "[ILLUME2] Critical Error!!! Cannot create _E_ILLUME_RESTACK_WINDOW Atom...\n"); + return 0; + } + + return 1; +} + +static Eina_Bool +_e_mod_policy_cb_border_stack(void *data __UNUSED__, int type __UNUSED__, void *event) +{ + E_Event_Border_Stack *ev; + + ev = event; + if ((_policy) && (_policy->funcs.border_stack)) + _policy->funcs.border_stack(ev); + + return ECORE_CALLBACK_PASS_ON; +} + +/* for visibility */ +static Eina_Bool +_e_mod_policy_cb_window_create (void *data __UNUSED__, int type __UNUSED__, void *event) +{ + Ecore_X_Event_Window_Create* ev = event; + + if ((_policy) && (_policy->funcs.window_create)) + _policy->funcs.window_create(ev); + + return ECORE_CALLBACK_PASS_ON; +} + +static Eina_Bool +_e_mod_policy_cb_window_destroy (void *data __UNUSED__, int type __UNUSED__, void *event) +{ + Ecore_X_Event_Window_Destroy* ev = event; + + if ((_policy) && (_policy->funcs.window_destroy)) + _policy->funcs.window_destroy(ev); + + return ECORE_CALLBACK_PASS_ON; +} + +static Eina_Bool +_e_mod_policy_cb_window_reparent (void *data __UNUSED__, int type __UNUSED__, void *event) +{ + Ecore_X_Event_Window_Reparent* ev = event; + + if ((_policy) && (_policy->funcs.window_reparent)) + _policy->funcs.window_reparent(ev); + + return ECORE_CALLBACK_PASS_ON; +} + +static Eina_Bool +_e_mod_policy_cb_window_show (void *data __UNUSED__, int type __UNUSED__, void *event) +{ + Ecore_X_Event_Window_Show* ev = event; + + if ((_policy) && (_policy->funcs.window_show)) + _policy->funcs.window_show(ev); + + return ECORE_CALLBACK_PASS_ON; +} + +static Eina_Bool +_e_mod_policy_cb_window_hide (void *data __UNUSED__, int type __UNUSED__, void *event) +{ + Ecore_X_Event_Window_Hide* ev = event; + + if ((_policy) && (_policy->funcs.window_hide)) + _policy->funcs.window_hide(ev); + + return ECORE_CALLBACK_PASS_ON; +} + +static Eina_Bool +_e_mod_policy_cb_window_configure (void *data __UNUSED__, int type __UNUSED__, void *event) +{ + Ecore_X_Event_Window_Configure* ev = event; + + if ((_policy) && (_policy->funcs.window_configure)) + _policy->funcs.window_configure(ev); + + return ECORE_CALLBACK_PASS_ON; +} + diff --git a/illume2-slp/src/e_mod_policy.h b/illume2-slp/src/e_mod_policy.h new file mode 100644 index 0000000..29b61e5 --- /dev/null +++ b/illume2-slp/src/e_mod_policy.h @@ -0,0 +1,7 @@ +#ifndef E_MOD_POLICY_H +# define E_MOD_POLICY_H + +int e_mod_policy_init(void); +int e_mod_policy_shutdown(void); + +#endif diff --git a/illume2-slp/src/e_mod_quickpanel.c b/illume2-slp/src/e_mod_quickpanel.c new file mode 100644 index 0000000..644a752 --- /dev/null +++ b/illume2-slp/src/e_mod_quickpanel.c @@ -0,0 +1,1895 @@ +#include "e_illume_private.h" +#include "e_mod_quickpanel.h" +#include "utilX.h" + +#define HD_WIDTH (720) +#define HD_HEIGHT (1280) +#define QUICK_PANEL_SCALE_GET(s) ((double)s / HD_HEIGHT) +#define QUICK_PANEL_REL_Y ((double)50 / HD_HEIGHT) //0.05; +#define QUICK_PANEL_THRESHOLD_Y ((double)10 / HD_HEIGHT)//0.15; +#define QUICK_PANEL_THRESHOLD_MIN ((double)30 / HD_WIDTH)//0.0625; + +/* for mini controller */ +#define MINI_CONTROLLER_PRIORITY 200 +#define POPUP_HANDLER_SIZE 50 + +/* local function prototypes */ +static Eina_Bool _e_mod_quickpanel_atom_init (void); + +static Eina_Bool _e_mod_quickpanel_cb_client_message(void *data __UNUSED__, int type __UNUSED__, void *event); +static Eina_Bool _e_mod_quickpanel_cb_border_add(void *data __UNUSED__, int type __UNUSED__, void *event); +static Eina_Bool _e_mod_quickpanel_cb_border_remove(void *data __UNUSED__, int type __UNUSED__, void *event); +static Eina_Bool _e_mod_quickpanel_cb_border_resize(void *data __UNUSED__, int type __UNUSED__, void *event); +static Eina_Bool _e_mod_quickpanel_cb_property (void *data __UNUSED__, int type __UNUSED__, void *event); + +static void _e_mod_quickpanel_cb_post_fetch(void *data __UNUSED__, void *data2); +static void _e_mod_quickpanel_cb_free(E_Illume_Quickpanel *qp); +static void _e_mod_quickpanel_slide(E_Illume_Quickpanel *qp, int visible, double len); +static Eina_Bool _e_mod_quickpanel_cb_animate(void *data); +static void _e_mod_quickpanel_position_update(E_Illume_Quickpanel *qp); +static void _e_mod_quickpanel_animate_down(E_Illume_Quickpanel *qp); +static void _e_mod_quickpanel_animate_up(E_Illume_Quickpanel *qp); + +static void _e_quickpanel_position_update(E_Illume_Quickpanel *qp); +static int _e_quickpanel_priority_sort_cb (const void* d1, const void* d2); +static void _e_quickpanel_after_animate (E_Illume_Quickpanel* qp); +static int _e_mod_quickpanel_root_angle_get (E_Illume_Quickpanel* qp); + +static int _e_mod_quickpanel_bg_layout_add(E_Illume_Quickpanel *qp); +static int _e_mod_quickpanel_bg_layout_del(E_Illume_Quickpanel *qp); + +static void _e_mod_quickpanel_cb_event_mouse_down(void *data, Evas *e, Evas_Object *obj, void *event_info); +static void _e_mod_quickpanel_cb_event_mouse_up(void *data, Evas *e, Evas_Object *obj, void *event_info); +static void _e_mod_quickpanel_cb_event_mouse_move(void *data, Evas *e, Evas_Object *obj, void *event_info); + +static void _e_mod_quickpanel_send_message (E_Illume_Quickpanel *qp, Ecore_X_Illume_Quickpanel_State state); + +static void _e_mod_quickpanel_border_show (E_Illume_Quickpanel* qp, E_Border* bd); +static void _e_mod_quickpanel_border_hide (E_Border* bd); + +static Eina_Bool _e_mod_quickpanel_popup_new (E_Illume_Quickpanel* qp); +static void _e_mod_quickpanel_popup_del (E_Illume_Quickpanel* qp); +static Eina_Bool _e_mod_quickpanel_popup_update (E_Illume_Quickpanel* qp); + +static Eina_Bool _e_mod_quickpanel_cb_key_down (void *data, int type __UNUSED__, void *event); + +static void _e_mod_quickpanel_hib_enter (void); +static void _e_mod_quickpanel_hib_leave (void); + +static void _e_mod_quickpanel_check_lock_screen (E_Illume_Quickpanel* qp); +static E_Illume_Quickpanel_Info* _e_mod_quickpanel_current_mini_controller_get (E_Illume_Quickpanel* qp); +static void _e_mod_quickpanel_window_list_set (E_Illume_Quickpanel* qp); + +static void _e_mod_quickpanel_extra_panel_show(E_Illume_Quickpanel *qp); +static void _e_mod_quickpanel_extra_panel_hide(E_Illume_Quickpanel *qp); + +/* local variables */ +static Eina_List *_qp_hdls = NULL; +static E_Border_Hook *_qp_hook = NULL; + +static Ecore_X_Atom effect_state_atom = 0; +static Ecore_X_Atom hibernation_state_atom = 0; + +static Ecore_X_Atom mini_controller_win_atom = 0; +static Ecore_X_Atom quickpanel_list_atom = 0; + +int e_mod_quickpanel_init(void) +{ + /* add handlers for messages we are interested in */ + _qp_hdls = + eina_list_append(_qp_hdls, + ecore_event_handler_add(ECORE_X_EVENT_CLIENT_MESSAGE, + _e_mod_quickpanel_cb_client_message, + NULL)); + _qp_hdls = + eina_list_append(_qp_hdls, + ecore_event_handler_add(E_EVENT_BORDER_ADD, + _e_mod_quickpanel_cb_border_add, + NULL)); + _qp_hdls = + eina_list_append(_qp_hdls, + ecore_event_handler_add(E_EVENT_BORDER_REMOVE, + _e_mod_quickpanel_cb_border_remove, + NULL)); + + _qp_hdls = + eina_list_append(_qp_hdls, + ecore_event_handler_add(E_EVENT_BORDER_RESIZE, + _e_mod_quickpanel_cb_border_resize, + NULL)); + + _qp_hdls = + eina_list_append(_qp_hdls, + ecore_event_handler_add(ECORE_X_EVENT_WINDOW_PROPERTY, + _e_mod_quickpanel_cb_property, + NULL)); + + /* add hook for new borders so we can test for qp borders */ + _qp_hook = e_border_hook_add(E_BORDER_HOOK_EVAL_PRE_POST_FETCH, + _e_mod_quickpanel_cb_post_fetch, NULL); + + + /* init atoms */ + _e_mod_quickpanel_atom_init(); + + return 1; +} + +int e_mod_quickpanel_shutdown(void) +{ + Ecore_Event_Handler *hdl; + + /* delete the event handlers */ + EINA_LIST_FREE(_qp_hdls, hdl) + ecore_event_handler_del(hdl); + + /* delete the border hook */ + if (_qp_hook) e_border_hook_del(_qp_hook); + _qp_hook = NULL; + + return 1; +} + +E_Illume_Quickpanel *e_mod_quickpanel_new(E_Zone *zone) +{ + E_Illume_Quickpanel *qp; + char str_scale[128]; + + /* try to allocate a new quickpanel object */ + qp = E_OBJECT_ALLOC(E_Illume_Quickpanel, E_ILLUME_QP_TYPE, + _e_mod_quickpanel_cb_free); + if (!qp) return NULL; + + /* set quickpanel zone */ + qp->visible = 0; + qp->zone = zone; + qp->vert.dir = 0; + qp->horiz_style = 0; + + qp->item_pos_y = (double)zone->h * QUICK_PANEL_REL_Y; + qp->threshold_y = (double)zone->h * QUICK_PANEL_THRESHOLD_Y; + qp->move_x_min = (double)zone->w * QUICK_PANEL_THRESHOLD_MIN; + + qp->scale = QUICK_PANEL_SCALE_GET(qp->zone->h); + if(qp->scale == 0) qp->scale = 1; + + /* FIXME */ + snprintf(str_scale, 127, "%lf", qp->scale); + e_util_env_set ("ELM_SCALE", str_scale); + + qp->key_hdl = NULL; + + return qp; +} + + +void e_mod_quickpanel_show(E_Illume_Quickpanel *qp, int isAni) +{ + int duration; + + if (!qp) return; + + if (qp->ani_type == E_ILLUME_QUICKPANEL_ANI_HIDE) + { + if (qp->visible) qp->visible = 0; + else qp->visible = 1; + } + else if (qp->ani_type == E_ILLUME_QUICKPANEL_ANI_SHOW) + { + return; + } + + /* delete the animator if it exists */ + if (qp->animator) ecore_animator_del(qp->animator); + qp->animator = NULL; + + /* delete any existing timer */ + if (qp->timer) ecore_timer_del(qp->timer); + qp->timer = NULL; + + /* if it's already visible, or has no borders to show, then get out */ + //if ((qp->visible) || (!qp->borders)) return; + if (qp->visible) + { + qp->ani_type = E_ILLUME_QUICKPANEL_ANI_NONE; + return; + } + + if (_e_mod_quickpanel_popup_new(qp) == EINA_FALSE) return; + + qp->ani_type = E_ILLUME_QUICKPANEL_ANI_SHOW; + + if (qp->angle == 0 || qp->angle == 180) + qp->popup_len = qp->popup->h; + else + qp->popup_len = qp->popup->w; + + duration = _e_illume_cfg->animation.quickpanel.duration; + + /* grab the height of the indicator */ + if (!qp->ind) qp->vert.isize = 0; + else + { + if (qp->angle == 0 || qp->angle == 180) + { + qp->vert.isize = qp->ind->h; + } + else + { + qp->vert.isize = qp->ind->w; + } + } + + /* check animation duration */ + if (duration <= 0 || !isAni) + { + Eina_List *l; + E_Illume_Quickpanel_Info *panel; + int ny = 0, nx = 0; + + ny = qp->vert.isize; + if (qp->vert.dir == 1) ny = 0; + + _e_quickpanel_after_animate (qp); + + // FIXME: shouldnt have special case - just call anim with adjust @ end + // also don't use e_border_fx_offset but actuall;y move bd + /* if we are not animating, just show the borders */ + if (qp->horiz_style) + { + EINA_LIST_FOREACH(qp->borders, l, panel) + { + if (!panel) continue; + if (!panel->bd->visible) _e_mod_quickpanel_border_show(qp, panel->bd); + if (qp->vert.dir == 0) + { + e_border_fx_offset(panel->bd, qp->horiz.adjust + nx, ny); + nx += panel->bd->w; + } + else + { + nx -= panel->bd->w; + e_border_fx_offset(panel->bd, qp->horiz.adjust + nx, ny); + } + } + } + else + { + EINA_LIST_FOREACH(qp->borders, l, panel) + { + if (!panel) continue; + if (!panel->bd->visible) _e_mod_quickpanel_border_show(qp, panel->bd); + if (qp->vert.dir == 0) + { + if (qp->angle == 0) + { + e_border_move (panel->bd, qp->horiz.adjust, ny); + ny += panel->bd->h; + } + else if (qp->angle == 180) + { + ny += panel->bd->h; + e_border_move (panel->bd, qp->horiz.adjust, qp->zone->h - ny); + } + else if (qp->angle == 90) + { + e_border_move (panel->bd, ny, qp->horiz.adjust); + ny += panel->bd->w; + } + else if (qp->angle == 270) + { + ny += panel->bd->w; + e_border_move (panel->bd, qp->zone->w - ny, qp->horiz.adjust); + } + } + else + { + ny -= panel->bd->h; + e_border_fx_offset(panel->bd, qp->horiz.adjust, ny); + } + } + } + } + else + { + if (!qp->popup->visible) + { + e_popup_show(qp->popup); + + if (qp->ind) + { + /* restack popup win under the bottom quickpanel win */ + ecore_x_window_configure (qp->popup->evas_win, + ECORE_X_WINDOW_CONFIGURE_MASK_SIBLING | ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE, + 0, 0, 0, 0, 0, + qp->ind->win, ECORE_X_WINDOW_STACK_BELOW); + } + } + _e_mod_quickpanel_slide(qp, 1, (double)duration / 1000.0); + } +} + + +void e_mod_quickpanel_hide(E_Illume_Quickpanel *qp, int isAni) +{ + int duration; + + if (!qp) return; + if (!qp->popup) return; + + if (qp->ani_type == E_ILLUME_QUICKPANEL_ANI_SHOW) + { + if (qp->visible) qp->visible = 0; + else qp->visible = 1; + } + else if (qp->ani_type == E_ILLUME_QUICKPANEL_ANI_HIDE) + { + return; + } + + /* delete the animator if it exists */ + if (qp->animator) ecore_animator_del(qp->animator); + qp->animator = NULL; + + /* delete the timer if it exists */ + if (qp->timer) ecore_timer_del(qp->timer); + qp->timer = NULL; + + /* if it's not visible, we can't hide it */ + if (!qp->visible) + { + qp->ani_type = E_ILLUME_QUICKPANEL_ANI_NONE; + return; + } + + qp->ani_type = E_ILLUME_QUICKPANEL_ANI_HIDE; + + if (qp->angle == 0 || qp->angle == 180) + qp->popup_len = qp->popup->h; + else + qp->popup_len = qp->popup->w; + + duration = _e_illume_cfg->animation.quickpanel.duration; + + _e_mod_quickpanel_extra_panel_hide(qp); + + if (duration <= 0 || !isAni) + { + qp->vert.adjust = 0; + _e_quickpanel_after_animate (qp); + } + else + { + _e_mod_quickpanel_slide(qp, 0, (double)duration / 1000.0); + } +} + +/* local functions */ +static Eina_Bool _e_mod_quickpanel_atom_init (void) +{ + effect_state_atom = ecore_x_atom_get ("_NET_CM_WINDOW_EFFECT_ENABLE"); + if( !effect_state_atom) + { + fprintf (stderr, "[ILLUME2][QP] Critical Error!!! Cannot create _NET_CM_WINDOW_EFFECT_ENABLE Atom...\n"); + return EINA_FALSE; + } + + hibernation_state_atom = ecore_x_atom_get ("X_HIBERNATION_STATE"); + if( !hibernation_state_atom) + { + fprintf (stderr, "[ILLUME2][QP] Critical Error!!! Cannot create X_HIBERNATION_STATE Atom...\n"); + return EINA_FALSE; + } + + mini_controller_win_atom = ecore_x_atom_get ("_E_ILLUME_MINI_CONTROLLER_WINDOW"); + if( !mini_controller_win_atom) + { + fprintf (stderr, "[ILLUME2][QP] Critical Error!!! Cannot create _E_ILLUME_MINI_CONTROLLER_WINDOW Atom...\n"); + return EINA_FALSE; + } + + quickpanel_list_atom = ecore_x_atom_get ("_E_ILLUME_QUICKPANEL_WINDOW_LIST"); + if( !quickpanel_list_atom) + { + fprintf (stderr, "[ILLUME2][QP] Critical Error!!! Cannot create _E_ILLUME_QUICKPANEL_WINDOW_LIST Atom...\n"); + return EINA_FALSE; + } + + return EINA_TRUE; +} + +static Eina_Bool _e_mod_quickpanel_cb_client_message(void *data __UNUSED__, int type __UNUSED__, void *event) +{ + Ecore_X_Event_Client_Message *ev = event; + E_Zone *zone; + E_Illume_Quickpanel *qp; + E_Border *bd; + + if (ev->message_type == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE) + { + if ((zone = e_util_zone_window_find(ev->win))) + { + if ((qp = e_illume_quickpanel_by_zone_get(zone))) + { + if (ev->data.l[0] == (int)ECORE_X_ATOM_E_ILLUME_QUICKPANEL_OFF) + e_mod_quickpanel_hide(qp, 1); + else + e_mod_quickpanel_show(qp, 1); + } + } + } + else if (ev->message_type == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE_TOGGLE) + { + if ((zone = e_util_zone_window_find(ev->win))) + { + if ((qp = e_illume_quickpanel_by_zone_get(zone))) + { + if (qp->visible) + e_mod_quickpanel_hide(qp, 1); + else + e_mod_quickpanel_show(qp, 1); + } + } + } + else if (ev->message_type == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_POSITION_UPDATE) + { + if (!(bd = e_border_find_by_client_window(ev->win))) + return ECORE_CALLBACK_PASS_ON; + if (!(qp = e_illume_quickpanel_by_zone_get(bd->zone))) + return ECORE_CALLBACK_PASS_ON; + _e_mod_quickpanel_position_update(qp); + } + /* for hibernation state */ + else if (ev->message_type == hibernation_state_atom) + { + if (ev->data.l[0] == 1) + _e_mod_quickpanel_hib_enter(); + else + _e_mod_quickpanel_hib_leave(); + } + else if (ev->message_type == ECORE_X_ATOM_E_COMP_SYNC_DRAW_DONE) + { + Eina_List *l; + E_Illume_Quickpanel_Info *panel; + + if (!(bd = e_border_find_by_client_window(ev->win))) + return ECORE_CALLBACK_PASS_ON; + if (!(qp = e_illume_quickpanel_by_zone_get(bd->zone))) + return ECORE_CALLBACK_PASS_ON; + + EINA_LIST_FOREACH(qp->borders, l, panel) + { + if (!panel) continue; + + if (panel->bd->client.win == ev->win) + { + panel->draw_done = EINA_TRUE; + break; + } + } + } + return ECORE_CALLBACK_PASS_ON; +} + + +static void _e_mod_quickpanel_size_adjust(E_Illume_Quickpanel *qp) +{ + Eina_List *l; + E_Illume_Quickpanel_Info *panel; + + // FIXME: copy & pasted in _e_mod_quickpanel_cb_border_resize() too - make fn + qp->horiz.size = 0; + if (qp->horiz_style) + { + EINA_LIST_FOREACH(qp->borders, l, panel) + { + if (!panel) continue; + + if (qp->is_lock) + { + if (!panel->mini_controller) continue; + } + + //if (panel->bd->h > qp->vert.size) qp->vert.size = bd->h; + qp->horiz.size += panel->bd->w; + } + } + else + { + qp->vert.size = qp->vert.isize; + + EINA_LIST_FOREACH(qp->borders, l, panel) + { + if (!panel) continue; + + if (qp->is_lock) + { + if (!panel->mini_controller) continue; + } + + if (qp->angle == 0 || qp->angle == 180) + { + if (panel->bd->w > qp->horiz.size) qp->horiz.size = panel->bd->w; + qp->vert.size += panel->bd->h; + } + else + { + if (panel->bd->w > qp->horiz.size) qp->horiz.size = panel->bd->w; + qp->vert.size += panel->bd->w; + } + } + } +} + + +static Eina_Bool _e_mod_quickpanel_cb_border_add(void *data __UNUSED__, int type __UNUSED__, void *event) +{ + E_Event_Border_Add *ev; + E_Illume_Quickpanel *qp; + E_Zone *zone; + E_Illume_Quickpanel_Info *panel = NULL; + int priority_major; + + ev = event; + + if (e_illume_border_is_indicator (ev->border)) + { + if ((qp = e_illume_quickpanel_by_zone_get(ev->border->zone))) + { + qp->ind = ev->border; + } + return ECORE_CALLBACK_PASS_ON; + } + + if (!ev->border->client.illume.quickpanel.quickpanel) + return ECORE_CALLBACK_PASS_ON; + + if (!(zone = ev->border->zone)) return ECORE_CALLBACK_PASS_ON; + + /* if this border should be on a different zone, get requested zone */ + if ((int)zone->num != ev->border->client.illume.quickpanel.zone) + { + E_Container *con; + int zn = 0; + + /* find this zone */ + if (!(con = e_container_current_get(e_manager_current_get()))) + return ECORE_CALLBACK_PASS_ON; + zn = ev->border->client.illume.quickpanel.zone; + zone = e_util_container_zone_number_get(con->num, zn); + if (!zone) zone = e_util_container_zone_number_get(con->num, 0); + if (!zone) return ECORE_CALLBACK_PASS_ON; + } + + if (!(qp = e_illume_quickpanel_by_zone_get(zone))) + return ECORE_CALLBACK_PASS_ON; + + // Disable effect of the quickpanel window + ecore_x_icccm_window_role_set (ev->border->client.win, "NORMAL_WINDOW"); + + if (ev->border->zone != zone) + e_border_zone_set(ev->border, zone); + + int iy; + e_illume_border_indicator_pos_get(zone, NULL, &iy); + + if ((ev->border->x != zone->x) || (ev->border->y != iy - zone->h)) + e_border_move(ev->border, zone->x, iy - zone->h); + + panel = calloc(1, sizeof(E_Illume_Quickpanel_Info)); + if(panel == NULL) + { + //perror("Failed to alloc memory!"); + return ECORE_CALLBACK_PASS_ON; + } + + /* add this border to QP border collection */ + panel->draw_done = EINA_FALSE; + panel->bd = ev->border; + + /* for mini controller */ + priority_major = ecore_x_e_illume_quickpanel_priority_major_get (panel->bd->client.win); + if (priority_major == MINI_CONTROLLER_PRIORITY) + { + Eina_List* l; + E_Illume_Quickpanel_Info* temp; + + panel->mini_controller = EINA_TRUE; + + EINA_LIST_FOREACH(qp->borders, l, temp) + { + if (!temp) continue; + + if (temp->mini_controller == EINA_TRUE) + { + qp->borders = eina_list_remove_list(qp->borders, l); + // add panel to hidden mini controller list + qp->hidden_mini_controllers = eina_list_prepend (qp->hidden_mini_controllers, temp); + _e_mod_quickpanel_border_hide(temp->bd); + break; + } + } + + // set mini controller atom to root window + ecore_x_window_prop_window_set(qp->zone->container->manager->root, mini_controller_win_atom, &panel->bd->client.win, 1); + } + else + { + panel->mini_controller = EINA_FALSE; + } + + qp->borders = eina_list_sorted_insert (qp->borders, _e_quickpanel_priority_sort_cb, panel); + _e_mod_quickpanel_window_list_set (qp); + + if (!qp->visible) + { + ecore_x_e_illume_quickpanel_state_send(panel->bd->client.win, ECORE_X_ILLUME_QUICKPANEL_STATE_OFF); + if (qp->ind) e_border_stack_below (ev->border, qp->ind); + /* hide this border */ + _e_mod_quickpanel_border_hide(ev->border); + } + else + { + _e_mod_quickpanel_size_adjust(qp); + _e_quickpanel_position_update (qp); + if (!qp->is_lock || panel->mini_controller) + _e_mod_quickpanel_border_show (qp, panel->bd); + } + + return ECORE_CALLBACK_PASS_ON; +} + +static Eina_Bool _e_mod_quickpanel_cb_border_remove(void *data __UNUSED__, int type __UNUSED__, void *event) +{ + E_Event_Border_Remove *ev; + E_Illume_Quickpanel *qp; + E_Zone *zone; + Eina_List *l; + E_Illume_Quickpanel_Info *panel; + Eina_Bool is_hidden_mini_controller; + Eina_Bool update_mini_controller; + + ev = event; + + if (e_illume_border_is_indicator (ev->border)) + { + if ((qp = e_illume_quickpanel_by_zone_get(ev->border->zone))) + { + qp->ind = NULL; + + // qp will be hidden when the indicator is removed + if (qp->visible) e_mod_quickpanel_hide (qp, 1); + } + return ECORE_CALLBACK_PASS_ON; + } + + if (!ev->border->client.illume.quickpanel.quickpanel) + return ECORE_CALLBACK_PASS_ON; + + if (!(zone = ev->border->zone)) return ECORE_CALLBACK_PASS_ON; + + /* if this border should be on a different zone, get requested zone */ + if ((int)zone->num != ev->border->client.illume.quickpanel.zone) + { + E_Container *con; + int zn = 0; + + /* find this zone */ + if (!(con = e_container_current_get(e_manager_current_get()))) + return ECORE_CALLBACK_PASS_ON; + zn = ev->border->client.illume.quickpanel.zone; + zone = e_util_container_zone_number_get(con->num, zn); + if (!zone) zone = e_util_container_zone_number_get(con->num, 0); + if (!zone) return ECORE_CALLBACK_PASS_ON; + } + + if (!(qp = e_illume_quickpanel_by_zone_get(zone))) + return ECORE_CALLBACK_PASS_ON; + + is_hidden_mini_controller = EINA_FALSE; + update_mini_controller = EINA_FALSE; + + /* for mini controller */ + if (qp->hidden_mini_controllers) + { + EINA_LIST_FOREACH(qp->hidden_mini_controllers, l, panel) + { + if (!panel) continue; + + if (panel->bd == ev->border) + { + qp->hidden_mini_controllers = eina_list_remove(qp->hidden_mini_controllers, panel); + free (panel); + is_hidden_mini_controller = EINA_TRUE; + break; + } + } + } + + /* remove this border to QP border collection */ + if (qp->borders && !is_hidden_mini_controller) + { + EINA_LIST_FOREACH(qp->borders, l, panel) + { + if (!panel) continue; + + if (panel->bd == ev->border) + { + qp->borders = eina_list_remove(qp->borders, panel); + + if (panel->mini_controller) + { + // set the flag to update mini controller + update_mini_controller = EINA_TRUE; + } + + free(panel); + break; + } + } + } + + if (update_mini_controller) + { + // add first hidden mini controller to qp's border list + if (qp->hidden_mini_controllers) + { + E_Illume_Quickpanel_Info *new_panel; + new_panel = eina_list_nth (qp->hidden_mini_controllers, 0); + + if (new_panel) + { + qp->hidden_mini_controllers = eina_list_remove(qp->hidden_mini_controllers, new_panel); + + // set mini controller atom to root window + ecore_x_window_prop_window_set (qp->zone->container->manager->root, mini_controller_win_atom, &new_panel->bd->client.win, 1); + + qp->borders = eina_list_sorted_insert (qp->borders, _e_quickpanel_priority_sort_cb, new_panel); + + if (qp->visible) _e_mod_quickpanel_border_show (qp, new_panel->bd); + } + else + { + // remove mini controller atom + ecore_x_window_prop_property_del (qp->zone->container->manager->root, mini_controller_win_atom); + } + } + else + { + // remove mini controller atom + ecore_x_window_prop_property_del (qp->zone->container->manager->root, mini_controller_win_atom); + } + } + + _e_mod_quickpanel_window_list_set (qp); + + _e_mod_quickpanel_size_adjust(qp); + _e_quickpanel_position_update (qp); + + return ECORE_CALLBACK_PASS_ON; +} + +static Eina_Bool _e_mod_quickpanel_cb_border_resize(void *data __UNUSED__, int type __UNUSED__, void *event) +{ + E_Event_Border_Resize *ev; + E_Illume_Quickpanel *qp; + + ev = event; + if (!ev->border->client.illume.quickpanel.quickpanel) + return ECORE_CALLBACK_PASS_ON; + if (!(qp = e_illume_quickpanel_by_zone_get(ev->border->zone))) + return ECORE_CALLBACK_PASS_ON; + + _e_mod_quickpanel_size_adjust(qp); + _e_quickpanel_position_update (qp); + + return ECORE_CALLBACK_PASS_ON; +} + +static int _e_mod_quickpanel_root_angle_get (E_Illume_Quickpanel* qp) +{ + int ret; + int count; + int angle = 0; + unsigned char *prop_data = NULL; + + if (!qp) return 0; + + ret = ecore_x_window_prop_property_get (qp->zone->container->manager->root, ECORE_X_ATOM_E_ILLUME_ROTATE_ROOT_ANGLE, ECORE_X_ATOM_CARDINAL, 32, &prop_data, &count); + if (ret && prop_data) + memcpy (&angle, prop_data, sizeof (int)); + + if (prop_data) free (prop_data); + + return angle; +} + +static Eina_Bool _e_mod_quickpanel_cb_property (void *data __UNUSED__, int type __UNUSED__, void *event) +{ + Ecore_X_Event_Window_Property *ev; + + ev = event; + if (ev->atom == ECORE_X_ATOM_E_ILLUME_ROTATE_ROOT_ANGLE) + { + E_Illume_Quickpanel *qp; + E_Zone* zone; + int old_angle; + + zone = e_util_zone_current_get(e_manager_current_get()); + if (zone) + { + qp = e_illume_quickpanel_by_zone_get (zone); + if (qp) + { + if (qp->visible) + { + old_angle = qp->angle; + qp->angle = _e_mod_quickpanel_root_angle_get (qp); + + if (qp->angle != old_angle) + { + _e_mod_quickpanel_popup_update (qp); + } + } + } + } + } + + return ECORE_CALLBACK_PASS_ON; +} + +static void _e_mod_quickpanel_cb_post_fetch(void *data __UNUSED__, void *data2) +{ + E_Border *bd; + + if (!(bd = data2)) return; + if (!bd->client.illume.quickpanel.quickpanel) return; + bd->stolen = 1; +} + +static void _e_mod_quickpanel_cb_free(E_Illume_Quickpanel *qp) +{ + E_Illume_Quickpanel_Info *panel; + Eina_List *l; + + if (!qp) return; + + /* delete the animator if it exists */ + if (qp->animator) ecore_animator_del(qp->animator); + qp->animator = NULL; + + /* delete the timer if it exists */ + if (qp->timer) ecore_timer_del(qp->timer); + qp->timer = NULL; + + /* delete the key handler */ + if (qp->key_hdl) ecore_event_handler_del (qp->key_hdl); + qp->key_hdl = NULL; + + if (qp->borders) + { + EINA_LIST_FOREACH(qp->borders, l, panel) + { + qp->borders = eina_list_remove(qp->borders, panel); + if (panel) + { + panel->bd->stolen = 0; + free(panel); + } + } + } + + if (qp->hidden_mini_controllers) + { + EINA_LIST_FOREACH(qp->hidden_mini_controllers, l, panel) + { + qp->hidden_mini_controllers = eina_list_remove(qp->hidden_mini_controllers, panel); + free(panel); + } + } + + _e_mod_quickpanel_window_list_set (qp); + _e_mod_quickpanel_popup_del (qp); + + /* free the structure */ + E_FREE(qp); +} + +static void _e_mod_quickpanel_slide(E_Illume_Quickpanel *qp, int visible, double len) +{ + if (!qp) return; + qp->start = ecore_loop_time_get(); + qp->len = len; + qp->vert.adjust_start = qp->vert.adjust; + qp->vert.adjust_end = 0; + if (qp->vert.dir == 0) + { + if (visible) qp->vert.adjust_end = qp->vert.size; + } + else + { + if (visible) qp->vert.adjust_end = -qp->vert.size; + } + + if (!qp->animator) + qp->animator = ecore_animator_add(_e_mod_quickpanel_cb_animate, qp); + _e_mod_quickpanel_cb_animate(qp); +} + +static void _e_quickpanel_after_animate (E_Illume_Quickpanel* qp) +{ + Eina_List *l; + E_Illume_Quickpanel_Info *panel; + + if (!qp) return; + + qp->animator = NULL; + + if (qp->visible) + { + EINA_LIST_FOREACH(qp->borders, l, panel) + { + if (!panel) continue; + if (panel->bd->visible) _e_mod_quickpanel_border_hide(panel->bd); + } + qp->visible = 0; + + e_popup_hide(qp->popup); + + // send message to quickpanel borders + _e_mod_quickpanel_send_message (qp, ECORE_X_ILLUME_QUICKPANEL_STATE_OFF); + + _e_mod_quickpanel_popup_del (qp); + } + else + { + qp->visible = 1; + + if (!qp->popup->visible) + { + e_popup_show(qp->popup); + + if (qp->ind) + { + /* restack popup win under the bottom quickpanel win */ + ecore_x_window_configure (qp->popup->evas_win, + ECORE_X_WINDOW_CONFIGURE_MASK_SIBLING | ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE, + 0, 0, 0, 0, 0, + qp->ind->win, ECORE_X_WINDOW_STACK_BELOW); + } + } + + _e_mod_quickpanel_extra_panel_show(qp); + + // send message to quickpanel borders + _e_mod_quickpanel_send_message (qp, ECORE_X_ILLUME_QUICKPANEL_STATE_ON); + } + + qp->down = 0; + qp->ani_type = E_ILLUME_QUICKPANEL_ANI_NONE; +} + +static Eina_Bool _e_mod_quickpanel_cb_animate(void *data) +{ + E_Illume_Quickpanel *qp; + double t, v, diff = 1.0; + + if (!(qp = data)) return ECORE_CALLBACK_CANCEL; + t = (ecore_loop_time_get() - qp->start); + if (t > qp->len) t = qp->len; + if (qp->len > 0.0) + { + v = (t / qp->len); + v = (1.0 - v); + v = (v * v * v * v); + v = (1.0 - v); + } + else + { + t = qp->len; + v = 1.0; + } + + diff = 1.0 - v; + qp->vert.adjust = ((qp->vert.adjust_end * v) + + (qp->vert.adjust_start * diff)); + + if (qp->vert.dir == 0) _e_mod_quickpanel_animate_down(qp); + else _e_mod_quickpanel_animate_up(qp); + + if (qp->visible) + { + int x, y; + + if (qp->angle == 0) + { + x = qp->zone->x; + y = qp->zone->y - qp->popup_len + (qp->popup_len * diff); + } + else if (qp->angle == 180) + { + x = qp->zone->x; + y = qp->zone->h - qp->zone->y - (qp->popup_len * diff); + } + else if (qp->angle == 90) + { + x = qp->zone->x - qp->popup_len + (qp->popup_len * diff); + y = qp->zone->y; + } + else if (qp->angle == 270) + { + x = qp->zone->w - qp->zone->x - (qp->popup_len * diff); + y = qp->zone->y; + } + else + { + // error!!! + x = qp->zone->x; + y = qp->zone->y - qp->popup_len + (qp->popup_len * diff); + } + e_popup_move(qp->popup, x, y); + } + else + { + int x, y; + + if (qp->angle == 0) + { + x = qp->zone->x; + y = qp->zone->y - qp->popup_len + (qp->popup_len * v); + } + else if (qp->angle == 180) + { + x = qp->zone->x; + y = qp->zone->h - qp->zone->y - (qp->popup_len * v); + } + else if (qp->angle == 90) + { + x = qp->zone->x - qp->popup_len + (qp->popup_len * v); + y = qp->zone->y; + } + else if (qp->angle == 270) + { + x = qp->zone->w - qp->zone->x - (qp->popup_len * v); + y = qp->zone->y; + } + else + { + // error!!! + x = qp->zone->x; + y = qp->zone->y - qp->popup_len + (qp->popup_len * v); + } + e_popup_move(qp->popup, x, y); + } + + if (t == qp->len) + { + _e_quickpanel_after_animate (qp); + return ECORE_CALLBACK_CANCEL; + } + + return ECORE_CALLBACK_RENEW; +} + +static void _e_mod_quickpanel_position_update(E_Illume_Quickpanel *qp) +{ + Eina_List *l; + E_Illume_Quickpanel_Info *panel; + int iy = 0; + + if (!qp) return; + if (!qp->visible) return; + if (!qp->zone) return; + + e_illume_border_indicator_pos_get(qp->zone, NULL, &iy); + + EINA_LIST_FOREACH(qp->borders, l, panel) + { + if (!panel) continue; + + // TODO: check for landscape mode + e_border_move(panel->bd, qp->zone->x, iy); + } + + qp->vert.dir = 0; + if ((iy + qp->vert.isize + qp->vert.size) > qp->zone->h) qp->vert.dir = 1; +} + +static void _e_mod_quickpanel_animate_down(E_Illume_Quickpanel *qp) +{ + Eina_List *l; + E_Illume_Quickpanel_Info *panel; + int pbh = 0, pbw = 0; + + if (!qp) return; + + if (qp->horiz_style) + { + int p = 0; + + if (qp->vert.size > 0) + { + p = (qp->vert.adjust * (qp->vert.size + qp->vert.isize)) + / qp->vert.size + qp->item_pos_y; + } + + EINA_LIST_FOREACH(qp->borders, l, panel) + { + if (!panel) continue; + + /* don't adjust borders that are being deleted */ + if (e_object_is_del(E_OBJECT(panel->bd))) continue; + + if (qp->is_lock) + { + if (!panel->mini_controller) continue; + } + + e_border_move(panel->bd, qp->horiz.adjust + pbw, p - qp->vert.size); + + pbw += qp->zone->w; + + if (qp->down == 0) + { + if (!qp->visible) + { + if (!panel->bd->visible) + { + _e_mod_quickpanel_border_show(qp, panel->bd); + } + } + } + } + } + else + { + int p = 0; + int h = 0; + + if (qp->vert.size > 0) + p = (qp->vert.adjust * (qp->vert.size + qp->vert.isize)) + / qp->vert.size; + EINA_LIST_FOREACH(qp->borders, l, panel) + { + if (!panel) continue; + + /* don't adjust borders that are being deleted */ + if (e_object_is_del(E_OBJECT(panel->bd))) continue; + + if (qp->is_lock) + { + if (!panel->mini_controller) continue; + } + + if (qp->angle == 0) + { + h = p - qp->vert.size + pbh; + e_border_move(panel->bd, qp->horiz.adjust, h); + pbh += panel->bd->h; + } + else if (qp->angle == 180) + { + pbh += panel->bd->h; + h = qp->zone->h - p + qp->vert.size - pbh; + e_border_move(panel->bd, qp->horiz.adjust, h); + } + else if (qp->angle == 90) + { + h = p - qp->vert.size + pbh; + e_border_move(panel->bd, h, qp->horiz.adjust); + pbh += panel->bd->w; + } + else if (qp->angle == 270) + { + pbh += panel->bd->w; + h = qp->zone->w - p + qp->vert.size - pbh; + e_border_move(panel->bd, h, qp->horiz.adjust); + } + + if (qp->down == 0) + { + if (!qp->visible) + { + if (!panel->bd->visible) + { + _e_mod_quickpanel_border_show(qp, panel->bd); + } + } + } + } + } +} + +static void _e_mod_quickpanel_animate_up(E_Illume_Quickpanel *qp) +{ + Eina_List *l; + E_Illume_Quickpanel_Info *panel; + int pbh = 0, pbw = 0; + + if (!qp) return; + // FIXME: repeat of whats in _e_mod_quickpanel_animate_down() but for sliding + // vertially up form an indicator @ screen bottom. fix to make it 1 fn + pbh = qp->vert.size; + + if (qp->horiz_style) + { + EINA_LIST_FOREACH(qp->borders, l, panel) + { + if (!panel) continue; + + /* don't adjust borders that are being deleted */ + if (e_object_is_del(E_OBJECT(panel->bd))) continue; + pbw -= panel->bd->w; + e_border_fx_offset(panel->bd, (qp->horiz.adjust + pbw), qp->vert.adjust); + + if (!qp->visible) + { + if (!panel->bd->visible) _e_mod_quickpanel_border_show(qp, panel->bd); + } + else + { + if (panel->bd->visible) _e_mod_quickpanel_border_hide(panel->bd); + } + } + } + else + { + EINA_LIST_FOREACH(qp->borders, l, panel) + { + if (!panel) continue; + + /* don't adjust borders that are being deleted */ + if (e_object_is_del(E_OBJECT(panel->bd))) continue; + pbh -= panel->bd->h; + e_border_fx_offset(panel->bd, qp->horiz.adjust, (qp->vert.adjust + pbh)); + + if (!qp->visible) + { + if (!panel->bd->visible) _e_mod_quickpanel_border_show(qp, panel->bd); + } + else + { + if (panel->bd->visible) _e_mod_quickpanel_border_hide(panel->bd); + } + } + } +} + + +static int _e_mod_quickpanel_bg_layout_del(E_Illume_Quickpanel *qp) +{ + if(qp == NULL) return -1; + + if(qp->ly_base) + { + evas_object_del(qp->ly_base); + qp->ly_base = NULL; + } + return 0; +} + +static int _e_mod_quickpanel_bg_layout_add(E_Illume_Quickpanel *qp) +{ + Evas_Object *eo; + + qp->ly_base = edje_object_add(qp->evas); + if (!qp->ly_base) return -1; + + // set background file + edje_object_scale_set(qp->ly_base, qp->scale); + edje_object_file_set(qp->ly_base, EDJ_FILE, "e/modules/illume2-slp/quickpanel/base"); + evas_object_resize(qp->ly_base, qp->zone->w, qp->zone->h); + + /* Add quickpanel handle bar object */ + eo = (Evas_Object*)edje_object_part_object_get(qp->ly_base, "quickpanel_handle_event"); + if (!eo) goto failed; + evas_object_event_callback_add(eo, EVAS_CALLBACK_MOUSE_DOWN, + _e_mod_quickpanel_cb_event_mouse_down, qp); + evas_object_event_callback_add(eo, EVAS_CALLBACK_MOUSE_UP, + _e_mod_quickpanel_cb_event_mouse_up, qp); + evas_object_event_callback_add(eo, EVAS_CALLBACK_MOUSE_MOVE, + _e_mod_quickpanel_cb_event_mouse_move, qp); + + e_popup_edje_bg_object_set(qp->popup, qp->ly_base); + + evas_object_show(qp->ly_base); + return 0; +failed: + _e_mod_quickpanel_bg_layout_del(qp); + return -1; +} + + +static void _e_mod_quickpanel_send_message (E_Illume_Quickpanel *qp, Ecore_X_Illume_Quickpanel_State state) +{ + Eina_List* l; + E_Illume_Quickpanel_Info* panel; + + if (qp == NULL) return; + + EINA_LIST_FOREACH(qp->borders, l, panel) + { + if (!panel) continue; + ecore_x_e_illume_quickpanel_state_send(panel->bd->client.win, state); + } + + /* send quickpanel state message to the indicator */ + if (qp->ind) + ecore_x_e_illume_quickpanel_state_send(qp->ind->client.win, state); +} + +static void _e_mod_quickpanel_cb_event_mouse_down(void *data, Evas *e, Evas_Object *obj, void *event_info) +{ + Evas_Event_Mouse_Down *ev = event_info; + E_Illume_Quickpanel *qp = data; + if (ev->button != 1) return; + // do not allow mouse event while the quickpanel is showing/hiding + if (qp->animator) return; + + qp->down = 1; + qp->down_x = ev->canvas.x; + qp->down_y = ev->canvas.y; + qp->down_adjust = qp->horiz.adjust; + qp->dragging = 0; + + qp->hide_trigger = 0; +} + + +static void _e_mod_quickpanel_cb_event_mouse_up(void *data, Evas *e, Evas_Object *obj, void *event_info) +{ + Evas_Event_Mouse_Up *ev = event_info; + E_Illume_Quickpanel *qp = data; + if (ev->button != 1) return; + if (qp->down == 0) return; + + qp->down = 0; + + // do not allow mouse event while the quickpanel is showing/hiding + if (qp->animator) return; + + int dy; + if (qp->hide_trigger == 1) + { + dy = qp->down_y - ev->canvas.y; + // check again delta y position. + if(dy > qp->threshold_y) + { + // we need to hide quickpanel + if (qp->visible) e_mod_quickpanel_hide(qp, 1); + } + + qp->hide_trigger = 0; + return; + } +} + +static void _e_mod_quickpanel_cb_event_mouse_move(void *data, Evas *e, Evas_Object *obj, void *event_info) +{ + Evas_Event_Mouse_Move *ev = event_info; + E_Illume_Quickpanel *qp = data; + + // do not allow mouse event while the quickpanel is showing/hiding + if (qp->animator) return; + + if (!qp->down) return; + + if (!qp->dragging) + { + int dx, dy; + + dx = ev->cur.canvas.x - qp->down_x; + dy = ev->cur.canvas.y - qp->down_y; + + if (((dx * dx) > (qp->move_x_min * qp->move_x_min)) && (!qp->hide_trigger)) + { + qp->dragging = 1; + } + else + { + if(!qp->hide_trigger) + { + dy = qp->down_y - ev->cur.canvas.y; + if(dy > qp->threshold_y) + { + qp->hide_trigger = 1; + } + } + return; + } + } +} + +static void _e_mod_quickpanel_border_show (E_Illume_Quickpanel* qp, E_Border* bd) +{ + if (!qp) return; + + /* make sure we have a border */ + if (!bd) return; + + e_border_show (bd); + if (qp->ind) + { + e_border_stack_below (bd, qp->ind); + } +} + + +static void _e_mod_quickpanel_border_hide (E_Border* bd) +{ + /* make sure we have a border */ + if (!bd) return; + e_border_hide (bd, 2); +} + + +static Eina_Bool _e_mod_quickpanel_popup_new (E_Illume_Quickpanel* qp) +{ + if (!qp) return EINA_FALSE; + + if (qp->popup) return EINA_TRUE; + + qp->angle = _e_mod_quickpanel_root_angle_get(qp); + _e_mod_quickpanel_check_lock_screen(qp); + + // FIXME: qp->zone->h height - should adapt to MAX of qp->zone->h or + // max height needed to fit talles qp child + qp->popup = e_popup_new (qp->zone, + qp->zone->x, qp->zone->y - qp->zone->h, + qp->zone->w, qp->zone->h); + if (!qp->popup) return EINA_FALSE; + + e_popup_name_set(qp->popup, "quickpanel"); + e_popup_layer_set(qp->popup, 151); + qp->ee = qp->popup->ecore_evas; + qp->evas = qp->popup->evas; + + ecore_x_netwm_window_type_set(qp->popup->evas_win, ECORE_X_WINDOW_TYPE_DOCK); + + // disable effect + int state = 0; + ecore_x_window_prop_property_set (qp->popup->evas_win, effect_state_atom, ECORE_X_ATOM_CARDINAL, 32, &state, 1); + + _e_mod_quickpanel_bg_layout_add(qp); + if (!_e_mod_quickpanel_popup_update (qp)) + { + // send message to quickpanel borders + _e_mod_quickpanel_send_message (qp, ECORE_X_ILLUME_QUICKPANEL_STATE_OFF); + _e_mod_quickpanel_popup_del (qp); + return EINA_FALSE; + } + _e_mod_quickpanel_size_adjust(qp); + + if (!qp->key_hdl) + { + qp->key_hdl = ecore_event_handler_add (ECORE_EVENT_KEY_DOWN, _e_mod_quickpanel_cb_key_down, qp); + } + utilx_grab_key (ecore_x_display_get(), qp->popup->evas_win, KEY_END, TOP_POSITION_GRAB); + utilx_grab_key (ecore_x_display_get(), qp->popup->evas_win, KEY_SELECT, TOP_POSITION_GRAB); + + return EINA_TRUE; +} + +static void _e_mod_quickpanel_popup_del (E_Illume_Quickpanel* qp) +{ + if (!qp) return; + if (!qp->popup) return; + + if (qp->key_hdl) + { + ecore_event_handler_del (qp->key_hdl); + qp->key_hdl = NULL; + } + utilx_ungrab_key (ecore_x_display_get(), qp->popup->evas_win, KEY_END); + utilx_ungrab_key (ecore_x_display_get(), qp->popup->evas_win, KEY_SELECT); + + _e_mod_quickpanel_bg_layout_del(qp); + + e_object_del (E_OBJECT(qp->popup)); + qp->popup = NULL; +} + +static Eina_Bool _e_mod_quickpanel_popup_update (E_Illume_Quickpanel* qp) +{ + if (!qp) return EINA_FALSE; + if (!qp->popup) return EINA_FALSE; + + int w, h, extra_h; + int tx, ty; + + if (qp->is_lock) + { + E_Illume_Quickpanel_Info* mini_controller; + mini_controller = _e_mod_quickpanel_current_mini_controller_get (qp); + if (mini_controller) + { + w = mini_controller->bd->w; + h = mini_controller->bd->h; + } + else + { + return EINA_FALSE; + } + } + else + { + w = qp->zone->w; + h = qp->zone->h; + } + + // check current angle + if(qp->angle == 0 || qp->angle == 180) + { + // FIXME: POPUP_HANDLER_SIZE will be changed + if (qp->ind) extra_h = qp->ind->h + POPUP_HANDLER_SIZE * qp->scale; + else extra_h = POPUP_HANDLER_SIZE * qp->scale; + + if (!qp->is_lock) + { + e_popup_resize (qp->popup, w, h); + evas_object_resize (qp->ly_base, w, h); + } + else + { + if (qp->angle == 0) + e_popup_resize (qp->popup, w, h + extra_h); + else + { + tx = qp->zone->x; + ty = qp->zone->h - (h + extra_h); + e_popup_move_resize (qp->popup, tx, ty, w, h + extra_h); + } + + evas_object_resize (qp->ly_base, w, h + extra_h); + } + } + else + { + // FIXME: POPUP_HANDLER_SIZE will be changed + if (qp->ind) extra_h = qp->ind->w + POPUP_HANDLER_SIZE * qp->scale; + else extra_h = POPUP_HANDLER_SIZE * qp->scale; + + if (!qp->is_lock) + { + e_popup_resize (qp->popup, w, h); + evas_object_resize (qp->ly_base, h, w); + } + else + { + if (qp->angle == 90) + e_popup_resize (qp->popup, w + extra_h, h); + else + { + tx = qp->zone->w - (w + extra_h); + ty = qp->zone->y; + e_popup_move_resize (qp->popup, tx, ty, w + extra_h, h); + } + + evas_object_resize( qp->ly_base, h, w + extra_h); + } + } + ecore_evas_rotation_with_resize_set(qp->popup->ecore_evas, qp->angle); + + return EINA_TRUE; +} + +static Eina_Bool _e_mod_quickpanel_cb_key_down (void *data, int type __UNUSED__, void *event) +{ + Ecore_Event_Key*ev; + E_Illume_Quickpanel *qp; + + ev = event; + if (!(qp = data)) return ECORE_CALLBACK_PASS_ON; + + if ((strcmp (ev->keyname, KEY_END) == 0) || + (strcmp (ev->keyname, KEY_SELECT) == 0)) + { + e_illume_quickpanel_hide (qp->zone, 1); + } + + return ECORE_CALLBACK_PASS_ON; +} + +static int +_e_quickpanel_priority_sort_cb (const void* d1, const void* d2) +{ + int priority1, priority2, ret; + const E_Illume_Quickpanel_Info *panel1, *panel2; + + const E_Border* border1 = NULL; + const E_Border* border2 = NULL; + + if(!d1) return(1); + if(!d2) return(-1); + + panel1 = d1; + panel2 = d2; + + border1 = panel1->bd; + border2 = panel2->bd; + + priority1 = ecore_x_e_illume_quickpanel_priority_major_get (border1->client.win); + priority2 = ecore_x_e_illume_quickpanel_priority_major_get (border2->client.win); + + ret = priority2 - priority1; + if (ret == 0) + { + /* check minor priority if major priorities are same. */ + priority1 = ecore_x_e_illume_quickpanel_priority_minor_get (border1->client.win); + priority2 = ecore_x_e_illume_quickpanel_priority_minor_get (border2->client.win); + ret = priority2 - priority1; + } + + return ret; +} + +static void +_e_quickpanel_position_update(E_Illume_Quickpanel *qp) +{ + Eina_List *l; + E_Illume_Quickpanel_Info *panel; + int ty = 0; + + if (!qp) return; + + if (qp->borders) + { + if (qp->visible) + { + int nx = 0; + + ty = qp->vert.isize; + if (qp->vert.dir == 1) ty = 0; + + // FIXME: shouldnt have special case - just call anim with adjust @ end + // also don't use e_border_fx_offset but actuall;y move bd + /* if we are not animating, just show the borders */ + if (qp->horiz_style) + { + EINA_LIST_FOREACH(qp->borders, l, panel) + { + if (!panel) continue; + + if (qp->is_lock) + { + if (!panel->mini_controller) continue; + } + + if (!panel->bd->visible) _e_mod_quickpanel_border_show(qp, panel->bd); + if (qp->vert.dir == 0) + { + e_border_fx_offset(panel->bd, qp->horiz.adjust + nx, ty); + nx += panel->bd->w; + } + else + { + nx -= panel->bd->w; + e_border_fx_offset(panel->bd, qp->horiz.adjust + nx, ty); + } + } + } + else + { + EINA_LIST_FOREACH(qp->borders, l, panel) + { + if (!panel) continue; + + if (qp->is_lock) + { + if (!panel->mini_controller) continue; + } + + if (!panel->bd->visible) _e_mod_quickpanel_border_show(qp, panel->bd); + if (qp->vert.dir == 0) + { + if (qp->angle == 0) + { + e_border_move (panel->bd, qp->horiz.adjust, ty); + ty += panel->bd->h; + } + else if (qp->angle == 180) + { + ty += panel->bd->h; + e_border_move (panel->bd, qp->horiz.adjust, qp->zone->h - ty); + } + else if (qp->angle == 90) + { + e_border_move (panel->bd, ty, qp->horiz.adjust); + ty += panel->bd->w; + } + else if (qp->angle == 270) + { + ty += panel->bd->w; + e_border_move (panel->bd, qp->zone->w - ty, qp->horiz.adjust); + } + } + else + { + ty -= panel->bd->h; + e_border_fx_offset(panel->bd, qp->horiz.adjust, ty); + } + } + } + + _e_mod_quickpanel_popup_update (qp); + qp->vert.adjust = ty; + } + else + { + qp->vert.adjust = 0; + } + } + + if (qp->animator) + { + if (qp->ani_type == E_ILLUME_QUICKPANEL_ANI_SHOW) + { + qp->vert.adjust_end = qp->vert.size; + } + } +} + +static void _e_mod_quickpanel_hib_enter (void) +{ + efreet_mime_shutdown(); + efreet_shutdown(); +} + +static void _e_mod_quickpanel_hib_leave (void) +{ + efreet_init(); + efreet_mime_init(); +} + +static void _e_mod_quickpanel_check_lock_screen (E_Illume_Quickpanel* qp) +{ + Ecore_X_Window active_win; + E_Border* active_bd; + int ret; + + if (!qp) return; + + qp->is_lock = EINA_FALSE; + + ret = ecore_x_window_prop_xid_get(qp->zone->container->manager->root, + ECORE_X_ATOM_NET_ACTIVE_WINDOW, + ECORE_X_ATOM_WINDOW, + &active_win, 1); + + if ((ret == 1) && active_win) + { + active_bd = e_border_find_by_client_window (active_win); + if (active_bd) + { + if (e_illume_border_is_lock_screen(active_bd)) + qp->is_lock = EINA_TRUE; + } + } +} + +static E_Illume_Quickpanel_Info* _e_mod_quickpanel_current_mini_controller_get (E_Illume_Quickpanel* qp) +{ + E_Illume_Quickpanel_Info* panel; + Eina_List* l; + + if (!qp) return NULL; + + if (qp->borders) + { + EINA_LIST_FOREACH (qp->borders, l, panel) + { + if (!panel) continue; + + if (panel->mini_controller) + { + return panel; + } + } + } + + return NULL; +} + +static void _e_mod_quickpanel_window_list_set (E_Illume_Quickpanel* qp) +{ + unsigned int num, i; + Ecore_X_Window *quickpanels = NULL; + E_Illume_Quickpanel_Info* panel; + Eina_List* l; + + if (!qp) return; + + num = eina_list_count (qp->borders); + if (num < 1) + { + ecore_x_window_prop_window_set (qp->zone->container->manager->root, quickpanel_list_atom, + NULL, 0); + return; + } + + quickpanels = calloc (num, sizeof(Ecore_X_Window)); + if (!quickpanels) + return; + + i = 0; + EINA_LIST_FOREACH (qp->borders, l, panel) + { + if (!panel) continue; + + if (panel->bd) + { + quickpanels[i++] = panel->bd->client.win; + } + } + + ecore_x_window_prop_window_set (qp->zone->container->manager->root, quickpanel_list_atom, + quickpanels, i); + + E_FREE(quickpanels); +} + +static void +_e_mod_quickpanel_extra_panel_show(E_Illume_Quickpanel *qp) +{ + Eina_List *l; + E_Border *mini_bd; + E_Illume_Quickpanel_Info *panel; + int x,y,w,h; + + if (!qp) return; + + mini_bd = NULL; + EINA_LIST_FOREACH(qp->borders, l, panel) + { + if (!panel) continue; + + if (panel->mini_controller == EINA_TRUE) + { + mini_bd = panel->bd; + break; + } + } + + if (!mini_bd) return; + + x = mini_bd->x; + y = mini_bd->y; + w = mini_bd->w; + h = mini_bd->h; + + if (qp->hidden_mini_controllers) + { + EINA_LIST_FOREACH(qp->hidden_mini_controllers, l, panel) + { + if (!panel) continue; + if (!panel->bd) continue; + + e_border_move_resize(panel->bd, x, y, w, h); + e_border_show(panel->bd); + e_border_stack_below(panel->bd, mini_bd); + } + } + +} + +static void +_e_mod_quickpanel_extra_panel_hide(E_Illume_Quickpanel *qp) +{ + Eina_List *l; + E_Illume_Quickpanel_Info *panel; + + if (!qp) return; + + if (qp->hidden_mini_controllers) + { + EINA_LIST_FOREACH(qp->hidden_mini_controllers, l, panel) + { + if (!panel) continue; + if (!panel->bd) continue; + + e_border_hide(panel->bd, 2); + } + } + +} + diff --git a/illume2-slp/src/e_mod_quickpanel.h b/illume2-slp/src/e_mod_quickpanel.h new file mode 100644 index 0000000..1767160 --- /dev/null +++ b/illume2-slp/src/e_mod_quickpanel.h @@ -0,0 +1,16 @@ +#ifndef E_MOD_QUICKPANEL_H +# define E_MOD_QUICKPANEL_H + +# define E_ILLUME_QP_TYPE 0xE1b0990 + +#define ILLUME_PREFIX "/usr/lib/enlightenment/modules/illume2-slp/" +#define EDJ_FILE ILLUME_PREFIX"/quickpanel.edj" + +int e_mod_quickpanel_init(void); +int e_mod_quickpanel_shutdown(void); + +E_Illume_Quickpanel *e_mod_quickpanel_new(E_Zone *zone); +void e_mod_quickpanel_show(E_Illume_Quickpanel *qp, int isAni); +void e_mod_quickpanel_hide(E_Illume_Quickpanel *qp, int isAni); + +#endif diff --git a/illume2-slp/src/e_mod_select_window.c b/illume2-slp/src/e_mod_select_window.c new file mode 100644 index 0000000..21e6bf6 --- /dev/null +++ b/illume2-slp/src/e_mod_select_window.c @@ -0,0 +1,244 @@ +#include "e_illume_private.h" +#include "e_mod_select_window.h" + +/* local function prototypes */ +static void *_e_mod_illume_config_select_window_create_data(E_Config_Dialog *cfd); +static void _e_mod_illume_config_select_window_free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata); +static Evas_Object *_e_mod_illume_config_select_window_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata); +static void _e_mod_illume_config_select_window_list_changed(void *data); +static Eina_Bool _e_mod_illume_config_select_window_change_timeout(void *data); +static int _e_mod_illume_config_select_window_match(E_Border *bd); + +/* local variables */ +E_Illume_Select_Window_Type stype; +Ecore_Timer *_sw_change_timer = NULL; + +/* public functions */ +void +e_mod_illume_config_select_window(E_Illume_Select_Window_Type type) +{ + E_Config_Dialog *cfd; + E_Config_Dialog_View *v; + + if (e_config_dialog_find("E", "_config_illume_select_window")) return; + + v = E_NEW(E_Config_Dialog_View, 1); + if (!v) return; + + stype = type; + v->create_cfdata = _e_mod_illume_config_select_window_create_data; + v->free_cfdata = _e_mod_illume_config_select_window_free_data; + v->basic.create_widgets = _e_mod_illume_config_select_window_create; + v->basic_only = 1; + v->normal_win = 1; + v->scroll = 1; + cfd = e_config_dialog_new(e_container_current_get(e_manager_current_get()), + _("Select Home Window"), "E", + "_config_illume_select_window", + "enlightenment/windows", 0, v, NULL); + if (!cfd) return; + e_dialog_resizable_set(cfd->dia, 1); +} + +static void * +_e_mod_illume_config_select_window_create_data(E_Config_Dialog *cfd __UNUSED__) +{ + return NULL; +} + +static void +_e_mod_illume_config_select_window_free_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata __UNUSED__) +{ + if (_sw_change_timer) ecore_timer_del(_sw_change_timer); + _sw_change_timer = NULL; +} + +static Evas_Object * +_e_mod_illume_config_select_window_create(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data *cfdata __UNUSED__) +{ + Evas_Object *list, *ow; + Eina_List *bds, *l; + E_Zone *zone; + int i, sel = -1; + + zone = e_util_zone_current_get(e_manager_current_get()); + list = e_widget_list_add(evas, 0, 0); + ow = e_widget_ilist_add(evas, 24, 24, NULL); + e_widget_ilist_selector_set(ow, 1); + evas_event_freeze(evas); + edje_freeze(); + e_widget_ilist_freeze(ow); + e_widget_ilist_clear(ow); + e_widget_ilist_go(ow); + + if ((bds = e_border_client_list())) + { + for (i = 0, l = bds; l; l = l->next, i++) + { + E_Border *bd; + const char *name; + + if (!(bd = l->data)) continue; + if (bd->zone != zone) continue; + if (e_object_is_del(E_OBJECT(bd))) continue; + if (!(name = e_border_name_get(bd))) continue; + if (_e_mod_illume_config_select_window_match(bd)) sel = i; + e_widget_ilist_append(ow, NULL, name, + _e_mod_illume_config_select_window_list_changed, + bd, name); + } + } + + e_widget_size_min_set(ow, 100, 200); + e_widget_ilist_go(ow); + if (sel >= 0) e_widget_ilist_selected_set(ow, sel); + e_widget_ilist_thaw(ow); + edje_thaw(); + evas_event_thaw(evas); + e_widget_list_object_append(list, ow, 1, 0, 0.0); + return list; +} + +static void +_e_mod_illume_config_select_window_list_changed(void *data) +{ + E_Border *bd; + Ecore_X_Window_Type wtype; + char *title, *name, *class; + + if (!(bd = data)) return; + title = ecore_x_icccm_title_get(bd->client.win); + ecore_x_icccm_name_class_get(bd->client.win, &name, &class); + ecore_x_netwm_window_type_get(bd->client.win, &wtype); + + switch (stype) + { + case E_ILLUME_SELECT_WINDOW_TYPE_HOME: + eina_stringshare_replace(&_e_illume_cfg->policy.home.title, title); + eina_stringshare_replace(&_e_illume_cfg->policy.home.class, class); + eina_stringshare_replace(&_e_illume_cfg->policy.home.name, name); + break; + case E_ILLUME_SELECT_WINDOW_TYPE_VKBD: + eina_stringshare_replace(&_e_illume_cfg->policy.vkbd.title, title); + eina_stringshare_replace(&_e_illume_cfg->policy.vkbd.class, class); + eina_stringshare_replace(&_e_illume_cfg->policy.vkbd.name, name); + break; + case E_ILLUME_SELECT_WINDOW_TYPE_SOFTKEY: + eina_stringshare_replace(&_e_illume_cfg->policy.softkey.title, title); + eina_stringshare_replace(&_e_illume_cfg->policy.softkey.class, class); + eina_stringshare_replace(&_e_illume_cfg->policy.softkey.name, name); + break; + case E_ILLUME_SELECT_WINDOW_TYPE_INDICATOR: + eina_stringshare_replace(&_e_illume_cfg->policy.indicator.title, title); + eina_stringshare_replace(&_e_illume_cfg->policy.indicator.class, class); + eina_stringshare_replace(&_e_illume_cfg->policy.indicator.name, name); + break; + } + + if (title) free(title); + if (name) free(name); + if (class) free(class); + + if (_sw_change_timer) ecore_timer_del(_sw_change_timer); + _sw_change_timer = + ecore_timer_add(0.5, _e_mod_illume_config_select_window_change_timeout, data); +} + +static Eina_Bool +_e_mod_illume_config_select_window_change_timeout(__UNUSED__ void *data) +{ + e_config_save_queue(); + _sw_change_timer = NULL; + return ECORE_CALLBACK_CANCEL; +} + +static int +_e_mod_illume_config_select_window_match(E_Border *bd) +{ + Ecore_X_Window_Type wtype; + char *title, *name, *class; + int match = 0; + + if (!bd) return 0; + title = ecore_x_icccm_title_get(bd->client.win); + ecore_x_icccm_name_class_get(bd->client.win, &name, &class); + ecore_x_netwm_window_type_get(bd->client.win, &wtype); + + switch (stype) + { + case E_ILLUME_SELECT_WINDOW_TYPE_HOME: + if (_e_illume_cfg->policy.home.match.title) + { + if ((title) && (!strcmp(title, _e_illume_cfg->policy.home.title))) + match = 1; + } + if (_e_illume_cfg->policy.home.match.name) + { + if ((name) && (!strcmp(name, _e_illume_cfg->policy.home.name))) + match = 1; + } + if (_e_illume_cfg->policy.home.match.class) + { + if ((class) && (!strcmp(class, _e_illume_cfg->policy.home.class))) + match = 1; + } + break; + case E_ILLUME_SELECT_WINDOW_TYPE_VKBD: + if (_e_illume_cfg->policy.vkbd.match.title) + { + if ((title) && (!strcmp(title, _e_illume_cfg->policy.vkbd.title))) + match = 1; + } + if (_e_illume_cfg->policy.vkbd.match.name) + { + if ((name) && (!strcmp(name, _e_illume_cfg->policy.vkbd.name))) + match = 1; + } + if (_e_illume_cfg->policy.vkbd.match.class) + { + if ((class) && (!strcmp(class, _e_illume_cfg->policy.vkbd.class))) + match = 1; + } + break; + case E_ILLUME_SELECT_WINDOW_TYPE_SOFTKEY: + if (_e_illume_cfg->policy.softkey.match.title) + { + if ((title) && (!strcmp(title, _e_illume_cfg->policy.softkey.title))) + match = 1; + } + if (_e_illume_cfg->policy.softkey.match.name) + { + if ((name) && (!strcmp(name, _e_illume_cfg->policy.softkey.name))) + match = 1; + } + if (_e_illume_cfg->policy.softkey.match.class) + { + if ((class) && (!strcmp(class, _e_illume_cfg->policy.softkey.class))) + match = 1; + } + break; + case E_ILLUME_SELECT_WINDOW_TYPE_INDICATOR: + if (_e_illume_cfg->policy.indicator.match.title) + { + if ((title) && (!strcmp(title, _e_illume_cfg->policy.indicator.title))) + match = 1; + } + if (_e_illume_cfg->policy.indicator.match.name) + { + if ((name) && (!strcmp(name, _e_illume_cfg->policy.indicator.name))) + match = 1; + } + if (_e_illume_cfg->policy.indicator.match.class) + { + if ((class) && (!strcmp(class, _e_illume_cfg->policy.indicator.class))) + match = 1; + } + break; + } + + if (title) free(title); + if (name) free(name); + if (class) free(class); + + return match; +} diff --git a/illume2-slp/src/e_mod_select_window.h b/illume2-slp/src/e_mod_select_window.h new file mode 100644 index 0000000..781d909 --- /dev/null +++ b/illume2-slp/src/e_mod_select_window.h @@ -0,0 +1,15 @@ +#ifndef E_MOD_SELECT_WINDOW_H +#define E_MOD_SELECT_WINDOW_H + +typedef enum _E_Illume_Select_Window_Type E_Illume_Select_Window_Type; +enum _E_Illume_Select_Window_Type +{ + E_ILLUME_SELECT_WINDOW_TYPE_HOME, + E_ILLUME_SELECT_WINDOW_TYPE_VKBD, + E_ILLUME_SELECT_WINDOW_TYPE_SOFTKEY, + E_ILLUME_SELECT_WINDOW_TYPE_INDICATOR +}; + +void e_mod_illume_config_select_window(E_Illume_Select_Window_Type type); + +#endif diff --git a/illume2-slp/src/images/Makefile.am b/illume2-slp/src/images/Makefile.am new file mode 100644 index 0000000..d958251 --- /dev/null +++ b/illume2-slp/src/images/Makefile.am @@ -0,0 +1,3 @@ +MAINTAINERCLEANFILES = Makefile.in + +EXTRA_DIST = module_icon.png split-h.png diff --git a/illume2-slp/src/images/RQ02_IMG_Handler.png b/illume2-slp/src/images/RQ02_IMG_Handler.png new file mode 100644 index 0000000..e389064 Binary files /dev/null and b/illume2-slp/src/images/RQ02_IMG_Handler.png differ diff --git a/illume2-slp/src/images/RQ02_IMG_Handler_arrow.png b/illume2-slp/src/images/RQ02_IMG_Handler_arrow.png new file mode 100644 index 0000000..2b8df41 Binary files /dev/null and b/illume2-slp/src/images/RQ02_IMG_Handler_arrow.png differ diff --git a/illume2-slp/src/images/module_icon.png b/illume2-slp/src/images/module_icon.png new file mode 100644 index 0000000..cbd54af Binary files /dev/null and b/illume2-slp/src/images/module_icon.png differ diff --git a/illume2-slp/src/policies/Makefile.am b/illume2-slp/src/policies/Makefile.am new file mode 100644 index 0000000..e433fce --- /dev/null +++ b/illume2-slp/src/policies/Makefile.am @@ -0,0 +1,2 @@ +MAINTAINERCLEANFILES = Makefile.in +SUBDIRS = illume diff --git a/illume2-slp/src/policies/illume/Makefile.am b/illume2-slp/src/policies/illume/Makefile.am new file mode 100644 index 0000000..1b4d1cc --- /dev/null +++ b/illume2-slp/src/policies/illume/Makefile.am @@ -0,0 +1,30 @@ +MAINTAINERCLEANFILES = Makefile.in +MODULE = illume2-slp +POLICY = illume + +# the module .so file +INCLUDES = -I.. \ + -I$(top_srcdir) \ + -I$(top_srcdir)/src/ \ + -I$(top_srcdir)/src/policies/$(POLICY) \ + -I$(includedir) \ + @ENLIGHTENMENT_CFLAGS@ + +plugindir = $(libdir)/enlightenment/modules/$(MODULE)/policies + +illumedir = $(plugindir) +illume_LTLIBRARIES = illume.la +illume_la_SOURCES = \ + policy.h \ + policy.c \ + illume.h \ + illume.c \ + policy_util.h \ + policy_util.c + +illume_la_LIBADD = +illume_la_CFLAGS = @ENLIGHTENMENT_CFLAGS@ +illume_la_LDFLAGS = -module -avoid-version @ENLIGHTENMENT_LIBS@ +illume_la_DEPENDENCIES = $(top_builddir)/config.h +illume_la_LIBTOOLFLAGS = --tag=disable-static + diff --git a/illume2-slp/src/policies/illume/illume.c b/illume2-slp/src/policies/illume/illume.c new file mode 100644 index 0000000..d7d36eb --- /dev/null +++ b/illume2-slp/src/policies/illume/illume.c @@ -0,0 +1,104 @@ +#include "e_illume.h" +#include "illume.h" +#include "policy.h" + +EAPI E_Illume_Policy_Api e_illume_policy_api = +{ + /* version, name, label */ + E_ILLUME_POLICY_API_VERSION, "illume", "Illume" +}; + +EAPI int +e_illume_policy_init(E_Illume_Policy *p) +{ + /* tell the policy what functions we support */ + p->funcs.border_add = _policy_border_add; + p->funcs.border_del = _policy_border_del; + p->funcs.border_focus_in = _policy_border_focus_in; + p->funcs.border_focus_out = _policy_border_focus_out; + p->funcs.border_activate = _policy_border_activate; + p->funcs.border_post_fetch = _policy_border_post_fetch; + p->funcs.border_post_assign = _policy_border_post_assign; + p->funcs.border_show = _policy_border_show; + p->funcs.zone_layout = _policy_zone_layout; + p->funcs.zone_move_resize = _policy_zone_move_resize; + p->funcs.zone_mode_change = _policy_zone_mode_change; + p->funcs.zone_close = _policy_zone_close; + p->funcs.drag_start = _policy_drag_start; + p->funcs.drag_end = _policy_drag_end; + p->funcs.focus_back = _policy_focus_back; + p->funcs.focus_forward = _policy_focus_forward; + p->funcs.property_change = _policy_property_change; + + p->funcs.window_focus_in = _policy_window_focus_in; + + p->funcs.border_restack_request = _policy_border_stack_change; + p->funcs.border_stack = _policy_border_stack; + + p->funcs.border_post_new_border = _policy_border_post_new_border; + p->funcs.border_pre_fetch = _policy_border_pre_fetch; + + p->funcs.window_configure_request = _policy_window_configure_request; + + /* for visibility */ + p->funcs.window_create = _policy_window_create; + p->funcs.window_destroy = _policy_window_destroy; + p->funcs.window_reparent = _policy_window_reparent; + p->funcs.window_show = _policy_window_show; + p->funcs.window_hide = _policy_window_hide; + p->funcs.window_configure = _policy_window_configure; + + p->funcs.window_sync_draw_done = _policy_window_sync_draw_done; + p->funcs.quickpanel_state_change = _policy_quickpanel_state_change; + + if (!_policy_init()) + return 0; + + return 1; +} + +EAPI int +e_illume_policy_shutdown(E_Illume_Policy *p) +{ + p->funcs.border_add = NULL; + p->funcs.border_del = NULL; + p->funcs.border_focus_in = NULL; + p->funcs.border_focus_out = NULL; + p->funcs.border_activate = NULL; + p->funcs.border_post_fetch = NULL; + p->funcs.border_post_assign = NULL; + p->funcs.border_show = NULL; + p->funcs.zone_layout = NULL; + p->funcs.zone_move_resize = NULL; + p->funcs.zone_mode_change = NULL; + p->funcs.zone_close = NULL; + p->funcs.drag_start = NULL; + p->funcs.drag_end = NULL; + p->funcs.focus_back = NULL; + p->funcs.focus_forward = NULL; + p->funcs.property_change = NULL; + + p->funcs.window_focus_in = NULL; + + p->funcs.border_restack_request = NULL; + p->funcs.border_stack = NULL; + + p->funcs.border_post_new_border = NULL; + p->funcs.border_pre_fetch = NULL; + + p->funcs.window_configure_request = NULL; + + /* for visibility */ + p->funcs.window_create = NULL; + p->funcs.window_destroy = NULL; + p->funcs.window_reparent = NULL; + p->funcs.window_show = NULL; + p->funcs.window_hide = NULL; + p->funcs.window_configure = NULL; + + p->funcs.window_sync_draw_done = NULL; + p->funcs.quickpanel_state_change = NULL; + + _policy_fin(); + return 1; +} diff --git a/illume2-slp/src/policies/illume/illume.h b/illume2-slp/src/policies/illume/illume.h new file mode 100644 index 0000000..d7d975b --- /dev/null +++ b/illume2-slp/src/policies/illume/illume.h @@ -0,0 +1,9 @@ +#ifndef _ILLUME_H +# define _ILLUME_H + +EAPI extern E_Illume_Policy_Api e_illume_policy_api; + +EAPI int e_illume_policy_init(E_Illume_Policy *p); +EAPI int e_illume_policy_shutdown(E_Illume_Policy *p); + +#endif diff --git a/illume2-slp/src/policies/illume/policy.c b/illume2-slp/src/policies/illume/policy.c new file mode 100644 index 0000000..35315f2 --- /dev/null +++ b/illume2-slp/src/policies/illume/policy.c @@ -0,0 +1,4062 @@ +#include "e_illume_private.h" +#include "policy_util.h" +#include "policy.h" +#include "dlog.h" + +#if 1 // for visibility +#include +#endif + +/* NB: DIALOG_USES_PIXEL_BORDER is an experiment in setting dialog windows + * to use the 'pixel' type border. This is done because some dialogs, + * when shown, blend into other windows too much. Pixel border adds a + * little distinction between the dialog window and an app window. + * Disable if this is not wanted */ +//#define DIALOG_USES_PIXEL_BORDER 1 + +/* for screen lock */ +#define SCREEN_LOCK_TIMEOUT 2.5 + +/* for debugging */ +#define ILLUME2_DEBUG 0 +#if ILLUME2_DEBUG +#define ILLUME2_TRACE printf +#else +#define ILLUME2_TRACE(...) +#endif + +typedef struct _E_Illume_Print_Info +{ + unsigned int type; + char file_name[256]; +} E_Illume_Print_Info; + + +#define COMP_MODULE_CONTROL + + +/*****************************/ +/* local function prototypes */ +/*****************************/ +static void _policy_border_set_focus(E_Border *bd); +static void _policy_border_move(E_Border *bd, int x, int y); +static void _policy_border_resize(E_Border *bd, int w, int h); +static void _policy_border_show_below(E_Border *bd); +static void _policy_zone_layout_update(E_Zone *zone); +static void _policy_zone_layout_indicator(E_Border *bd, E_Illume_Config_Zone *cz); +static void _policy_zone_layout_quickpanel(E_Border *bd); +static void _policy_zone_layout_keyboard(E_Border *bd, E_Illume_Config_Zone *cz); +static void _policy_zone_layout_fullscreen(E_Border *bd); +static void _policy_zone_layout_dialog(E_Border *bd, E_Illume_Config_Zone *cz); +static void _policy_zone_layout_sliding_win(E_Border *bd, E_Illume_Config_Zone *cz); + +static int _policy_window_rotation_angle_get(Ecore_X_Window win); +static Ecore_X_Window _policy_active_window_get(Ecore_X_Window root); +static int _policy_border_indicator_state_get(E_Border *bd); + +static void _policy_layout_quickpanel_rotate (E_Illume_Quickpanel* qp, int angle); + +static E_Illume_Border_Info* _policy_get_border_info (E_Border* bd); +static E_Illume_Border_Info* _policy_add_border_info_list (E_Border* bd); +static void _policy_delete_border_info_list (E_Border* bd); +static int _policy_compare_cb_border (E_Illume_Border_Info* data1, E_Illume_Border_Info* data2); + +static void _policy_zone_layout_app_single_new (E_Illume_Border_Info* bd_info, E_Illume_Config_Zone* cz); +static void _policy_zone_layout_app_dual_top_new (E_Illume_Border_Info* bd_info, E_Illume_Config_Zone* cz); +static void _policy_zone_layout_app_dual_left_new (E_Illume_Border_Info* bd_info, E_Illume_Config_Zone* cz); +static void _policy_zone_layout_app_dual_custom_new (E_Illume_Border_Info* bd_info, E_Illume_Config_Zone* cz); + +static int _policy_border_get_notification_level (Ecore_X_Window win); +static void _policy_border_update_notification_stack (E_Border* bd, int level, Eina_Bool check_focus); + +/* for screen lock */ +static void _policy_request_screen_lock (E_Manager* man); +static void _policy_request_screen_unlock (E_Manager* man); +static void _policy_border_add_block_list (E_Border* bd); +static void _policy_border_remove_block_list (E_Border* bd); + +static void _policy_change_quickpanel_layer (E_Illume_Quickpanel* qp, E_Border* indi_bd, int layer, int level); +static void _policy_change_indicator_layer (E_Border* indi_bd, int layer, int level); + +/* for property change */ +static void _policy_property_window_state_change (Ecore_X_Event_Window_Property *event); +static void _policy_property_indicator_geometry_change (Ecore_X_Event_Window_Property *event); +static void _policy_property_keyboard_geometry_change (Ecore_X_Event_Window_Property *event); +static void _policy_property_virtual_keyboard_state_change (Ecore_X_Event_Window_Property *event); +static void _policy_property_sliding_win_geometry_change (Ecore_X_Event_Window_Property *event); +static void _policy_property_sliding_win_state_change (Ecore_X_Event_Window_Property *event); +static void _policy_property_indicator_geometry_change (Ecore_X_Event_Window_Property *event); +static void _policy_property_enlightenment_scale_change (Ecore_X_Event_Window_Property *event); +static void _policy_property_rotate_win_angle_change (Ecore_X_Event_Window_Property *event); +static void _policy_property_indicator_state_change (Ecore_X_Event_Window_Property *event); +static void _policy_property_active_win_change (Ecore_X_Event_Window_Property *event); +static void _policy_property_win_type_change (Ecore_X_Event_Window_Property *event); +static void _policy_property_rotate_root_angle_change (Ecore_X_Event_Window_Property *event); +static void _policy_property_notification_level_change (Ecore_X_Event_Window_Property *event); +static void _policy_property_overlay_win_change (Ecore_X_Event_Window_Property *event); +static void _policy_property_window_opaque_change (Ecore_X_Event_Window_Property *event); + +static int _policy_property_window_opaque_get (Ecore_X_Window win); + + +/* for debugging */ +void _policy_border_list_print (Ecore_X_Window win); + +#if ILLUME_LOGGER_BUILD_ENABLE +static Eina_Bool _policy_property_illume_log_change (Ecore_X_Event_Window_Property *ev); +#endif /* ILLUME_LOGGER_BUILD_ENABLE */ + +#ifdef COMP_MODULE_CONTROL +static void _policy_property_composite_module_change (Ecore_X_Event_Window_Property *ev); +#endif + +#if 1 // for visibility +static void _policy_manage_xwins (E_Manager* man); +static E_Illume_XWin_Info* _policy_xwin_info_find (Ecore_X_Window win); +static Eina_Bool _policy_xwin_info_add (Ecore_X_Window win); +static Eina_Bool _policy_xwin_info_delete (Ecore_X_Window win); + +static void _policy_send_visibility_notify (Ecore_X_Window win, int visibility); +static void _policy_calculate_visibility (Ecore_X_Window win); +#endif // visibility + +static E_Illume_XWin_Info* _policy_find_next_visible_window (E_Illume_XWin_Info* xwin_info); +static void _policy_root_angle_set (Ecore_X_Window root, Ecore_X_Window win); +static void _policy_change_root_angle_by_border_angle (E_Border* bd); +static void _policy_indicator_angle_change (E_Border* indi_bd, int angle); + + +/*******************/ +/* local variables */ +/*******************/ + +/* for active/deactive message */ +static Ecore_X_Window g_active_win = 0; +static Ecore_X_Window g_active_pid = 0; + +/* for rotation */ +int g_root_angle = 0; +Ecore_X_Window g_rotated_win = 0; + +/* for focus stack */ +static Eina_List *_pol_focus_stack; + +/* for border information */ +static Eina_List* e_border_info_list = NULL; + +/* for screen lock */ +static E_Illume_Screen_Lock_Info* g_screen_lock_info; +static Ecore_X_Atom E_ILLUME_ATOM_SCREEN_LOCK; + +/* for notification level */ +static Ecore_X_Atom E_ILLUME_ATOM_NOTIFICATION_LEVEL; + +/* for active/deactive message */ +static Ecore_X_Atom E_ILLUME_ATOM_ACTIVATE_WINDOW; +static Ecore_X_Atom E_ILLUME_ATOM_DEACTIVATE_WINDOW; + +/* for visibility */ +static Ecore_X_Atom E_ILLUME_ATOM_OVERAY_WINDOW; +static Ecore_X_Atom E_ILLUME_ATOM_WINDOW_OPAQUE; + +/* for debugging */ +static Ecore_X_Atom E_ILLUME_ATOM_STACK_DISPLAY; +static Ecore_X_Atom E_ILLUME_ATOM_STACK_DISPLAY_DONE; + +/* for logger */ +#if ILLUME_LOGGER_BUILD_ENABLE +static int _illume_logger_type = LT_NOTHING; +static Ecore_X_Atom E_ILLUME_ATOM_ILLUME_LOG; +#endif /* ILLUME_LOGGER_BUILD_ENABLE */ + + #ifdef COMP_MODULE_CONTROL +static Ecore_X_Atom E_ILLUME_ATOM_COMP_MODULE_ENABLED; +#endif + +#if 1 // for visibility +static Eina_Hash* _e_illume_xwin_info_hash = NULL; +static Eina_Inlist* _e_illume_xwin_info_list = NULL; +static Ecore_X_Window _e_overlay_win = 0; +static int _g_root_width; +static int _g_root_height; +#endif + +/* local functions */ +static void +_policy_border_set_focus(E_Border *bd) +{ + if (!bd) return; + + /* if focus is locked out then get out */ + if (bd->lock_focus_out) return; + + /* make sure the border can accept or take focus */ + if ((bd->client.icccm.accepts_focus) || (bd->client.icccm.take_focus)) + { + /* check E's focus settings */ + if ((e_config->focus_setting == E_FOCUS_NEW_WINDOW) || + ((bd->parent) && + ((e_config->focus_setting == E_FOCUS_NEW_DIALOG) || + ((bd->parent->focused) && + (e_config->focus_setting == E_FOCUS_NEW_DIALOG_IF_OWNER_FOCUSED))))) + { + /* if the border was hidden due to layout, we need to unhide */ + if (!bd->visible) e_illume_border_show(bd); + + /* if the border is iconified then uniconify */ + if (bd->iconic) + { + /* if the user is allowed to uniconify, then do it */ + if (!bd->lock_user_iconify) e_border_uniconify(bd); + } + + /* if we can raise the border do it */ + if (!bd->lock_user_stacking) e_border_raise(bd); + + /* focus the border */ + e_border_focus_set(bd, 1, 1); + + /* NB: since we skip needless border evals when container layout + * is called (to save cpu cycles), we need to + * signal this border that it's focused so that the edj gets + * updated. + * + * This is potentially useless as THIS policy + * makes all windows borderless anyway, but it's in here for + * completeness + e_border_focus_latest_set(bd); + if (bd->bg_object) + edje_object_signal_emit(bd->bg_object, "e,state,focused", "e"); + if (bd->icon_object) + edje_object_signal_emit(bd->icon_object, "e,state,focused", "e"); + e_focus_event_focus_in(bd); + */ + } + } +} + +static void +_policy_border_move(E_Border *bd, int x, int y) +{ + if (!bd) return; + + /* NB: Qt uses a weird window type called 'VCLSalFrame' that needs to + * have bd->placed set else it doesn't position correctly... + * this could be a result of E honoring the icccm request position, + * not sure */ + + e_border_move (bd, x, y); +} + +static void +_policy_border_resize(E_Border *bd, int w, int h) +{ + if (!bd) return; + + if (bd->visible) + _policy_border_add_block_list(bd); + + e_border_resize (bd, w, h); +} + +static void +_policy_border_show_below(E_Border *bd) +{ + Eina_List *l; + E_Border *prev; + int pos = 0, i; + + // printf("Show Borders Below: %s %d %d\n", + // bd->client.icccm.class, bd->x, bd->y); + + if (!bd) return; + + if (bd->client.icccm.transient_for) + { + if ((prev = e_border_find_by_client_window(bd->client.icccm.transient_for))) + { + _policy_border_set_focus(prev); + return; + } + } + + /* determine layering position */ + if (bd->layer <= 0) pos = 0; + else if ((bd->layer > 0) && (bd->layer <= 50)) pos = 1; + else if ((bd->layer > 50) && (bd->layer <= 100)) pos = 2; + else if ((bd->layer > 100) && (bd->layer <= 150)) pos = 3; + else if ((bd->layer > 150) && (bd->layer <= 200)) pos = 4; + else pos = 5; + + /* Find the windows below this one */ + for (i = pos; i >= 2; i--) + { + E_Border *b; + + EINA_LIST_REVERSE_FOREACH(bd->zone->container->layers[i].clients, l, b) + { + if (!b) continue; + + /* skip if it's the same border */ + if (b == bd) continue; + + /* skip if it's not on this zone */ + if (b->zone != bd->zone) continue; + + /* skip special borders */ + if (e_illume_border_is_indicator(b)) continue; + if (e_illume_border_is_keyboard(b)) continue; + if (e_illume_border_is_quickpanel(b)) continue; + if (e_illume_border_is_sliding_win(b)) continue; + + if ((bd->fullscreen) || (bd->need_fullscreen)) + { + _policy_border_set_focus(b); + return; + } + else + { + /* need to check x/y position */ + if (E_CONTAINS(bd->x, bd->y, bd->w, bd->h, + b->x, b->y, b->w, b->h)) + { + _policy_border_set_focus(b); + return; + } + } + } + } + + /* if we reach here, then there is a problem with showing a window below + * this one, so show previous window in stack */ + EINA_LIST_REVERSE_FOREACH(_pol_focus_stack, l, prev) + { + if (!prev) continue; + if (prev->zone != bd->zone) continue; + _policy_border_set_focus(prev); + return; + } +} + +static void +_policy_zone_layout_update(E_Zone *zone) +{ + Eina_List *l; + E_Border *bd; + + if (!zone) return; + + EINA_LIST_FOREACH(e_border_client_list(), l, bd) + { + if (!bd) continue; + + /* skip borders not on this zone */ + if (bd->zone != zone) continue; + + /* skip special windows */ + if (e_illume_border_is_keyboard(bd)) continue; + if (e_illume_border_is_quickpanel(bd)) continue; + + /* signal a changed pos here so layout gets updated */ + bd->changes.pos = 1; + bd->changed = 1; + } +} + +static void +_policy_zone_layout_indicator(E_Border *bd, E_Illume_Config_Zone *cz) +{ + ILLUME2_TRACE ("[ILLUME2] %s (%d) win = %x\n", __func__, __LINE__, bd->client.win); + + if ((!bd) || (!cz)) return; + + /* grab minimum indicator size */ + //e_illume_border_min_get(bd, NULL, &cz->indicator.size); + + /* no point in doing anything here if indicator is hidden */ + if ((!bd->new_client) && (!bd->visible)) return; + + /* if we are dragging, then skip it for now */ + if (bd->client.illume.drag.drag) + { + /* when dragging indicator, we need to trigger a layout update */ + _policy_zone_layout_update(bd->zone); + return; + } + + /* lock indicator window from dragging if we need to */ + if ((cz->mode.dual == 1) && (cz->mode.side == 0)) + ecore_x_e_illume_drag_locked_set(bd->client.win, 0); + else + ecore_x_e_illume_drag_locked_set(bd->client.win, 1); + + /* make sure it's the required width & height */ + int rotation = _policy_window_rotation_angle_get(bd->client.win); + if(rotation == -1) return; + + ILLUME2_TRACE ("ILLUME2] INDICATOR'S ANGLE = %d\n", rotation); + + // check indicator's rotation info and then set it's geometry + if (rotation == 0 || rotation == 180) + { + ecore_x_e_illume_indicator_geometry_set(bd->zone->black_win, bd->x, bd->y, bd->w, bd->h); + ecore_x_e_illume_indicator_geometry_set(bd->zone->container->manager->root, bd->x, bd->y, bd->w, bd->h); + } + else + { + ecore_x_e_illume_indicator_geometry_set(bd->zone->black_win, bd->zone->x, bd->zone->y, bd->h, bd->w); + ecore_x_e_illume_indicator_geometry_set(bd->zone->container->manager->root, bd->zone->x, bd->zone->y, bd->h, bd->w); + } +} + +static void +_policy_zone_layout_quickpanel(E_Border *bd) +{ + if (!bd) return; + +/* + int rotation; + rotation = _policy_window_rotation_angle_get (bd->client.win); + ILLUME2_TRACE ("[ILLUME2-QUICKPANEL] _policy_zone_layout_quickpanel..(%d) rotation angle = %d\n", __LINE__, rotation); + + if (rotation == 0 || rotation == 180) + { + if ((bd->w != bd->zone->w)) + { + ILLUME2_TRACE ("[ILLUME2-QUICKPANEL] CHANGE QUICK-PANEL SIZE to Portrait..(%d) old (%d, %d) new (%d, %d)\n", __LINE__, bd->w, bd->h, bd->zone->w, bd->h); + _policy_border_resize(bd, bd->zone->w, bd->h); + } + } + else + { + if ((bd->h != bd->zone->h)) + { + ILLUME2_TRACE ("[ILLUME2-QUICKPANEL] CHANGE QUICK-PANEL SIZE to Landscape..(%d) old (%d, %d) new (%d, %d)\n", __LINE__, bd->w, bd->h, bd->w, bd->zone->h); + _policy_border_resize(bd, bd->w, bd->zone->h); + } + } +*/ +} + +static void +_policy_zone_layout_keyboard(E_Border *bd, E_Illume_Config_Zone *cz) +{ + if ((!bd) || (!cz)) return; + + /* no point in adjusting size or position if it's not visible */ + if (!bd->visible) return; + + /* set layer if needed */ + if (bd->client.icccm.transient_for == 0) + { + if (bd->layer != POL_KEYBOARD_LAYER) + e_border_layer_set(bd, POL_KEYBOARD_LAYER); + } +} + + +static void +_policy_zone_layout_fullscreen(E_Border *bd) +{ + // printf("\tLayout Fullscreen: %s\n", bd->client.icccm.name); + + if (!bd) return; + + /* make sure it's the required width & height */ + if ((bd->w != bd->zone->w) || (bd->h != bd->zone->h)) + _policy_border_resize(bd, bd->zone->w, bd->zone->h); + + /* set layer if needed */ + if (bd->layer != POL_FULLSCREEN_LAYER) + e_border_layer_set(bd, POL_FULLSCREEN_LAYER); +} + +static void +_policy_zone_layout_dialog(E_Border *bd, E_Illume_Config_Zone *cz) +{ + E_Border *parent; + int mw, mh, nx, ny; + + // printf("\tLayout Dialog: %s\n", bd->client.icccm.name); + + /* NB: This policy ignores any ICCCM requested positions and centers the + * dialog on it's parent (if it exists) or on the zone */ + + if ((!bd) || (!cz)) return; + + /* no point in adjusting size or position if it's not visible */ + if (!bd->visible) return; + + /* grab minimum size */ + e_illume_border_min_get(bd, &mw, &mh); + + /* make sure it fits in this zone */ + if (mw > bd->zone->w) mw = bd->zone->w; + if (mh > bd->zone->h) mh = bd->zone->h; + + if (mw < bd->w) mw = bd->w; + if (mh < bd->h) mh = bd->h; + + /* try to get this dialog's parent if it exists */ + parent = e_illume_border_parent_get(bd); + + /* if we have no parent, or we are in dual mode, then center on zone */ + /* NB: we check dual mode because if we are in dual mode, dialogs tend to + * be too small to be useful when positioned on the parent, so center + * on zone. We could check their size first here tho */ + if ((!parent) || (cz->mode.dual == 1)) + { + /* no parent or dual mode, center on screen */ + nx = (bd->zone->x + ((bd->zone->w - mw) / 2)); + ny = (bd->zone->y + ((bd->zone->h - mh) / 2)); + } + else + { + /* NB: there is an assumption here that the parent has already been + * layed out on screen. This could be bad. Needs Testing */ + + /* make sure we are not larger than the parent window */ + if (mw > parent->w) mw = parent->w; + if (mh > parent->h) mh = parent->h; + + /* center on parent */ + nx = (parent->x + ((parent->w - mw) / 2)); + ny = (parent->y + ((parent->h - mh) / 2)); + } + + /* make sure it's the required width & height */ + if ((bd->w != mw) || (bd->h != mh)) + { + _policy_border_resize(bd, mw, mh); + } + + /* make sure it's in the correct position */ + if ((bd->x != nx) || (bd->y != ny)) + _policy_border_move(bd, nx, ny); + + /* set layer if needed */ + if (bd->layer != POL_DIALOG_LAYER) e_border_layer_set(bd, POL_DIALOG_LAYER); +} + +static void +_policy_zone_layout_sliding_win(E_Border *bd, E_Illume_Config_Zone *cz) +{ + /* no point in adjusting size or position if it's not visible */ + if (!bd->visible) return; + + /* set layer if needed */ + if (bd->layer != POL_SLIDING_WIN_LAYER) + e_border_layer_set(bd, POL_SLIDING_WIN_LAYER); +} + +/* policy functions */ +void +_policy_border_add(E_Border *bd) +{ + // printf("Border added: %s\n", bd->client.icccm.class); + + if (!bd) return; + + /* NB: this call sets an atom on the window that specifices the zone. + * the logic here is that any new windows created can access the zone + * window by a 'get' call. This is useful for elementary apps as they + * normally would not have access to the zone window. Typical use case + * is for indicator & softkey windows so that they can send messages + * that apply to their respective zone only. Example: softkey sends close + * messages (or back messages to cycle focus) that should pertain just + * to it's current zone */ + ecore_x_e_illume_zone_set(bd->client.win, bd->zone->black_win); + + ILLUME2_TRACE ("[ILLUME2-NEW] %s(%d)... bd = %x\n", __func__, __LINE__, bd->client.win); + // 1. create border_info + E_Illume_Border_Info* bd_info = NULL; + bd_info = _policy_get_border_info(bd); + if (bd_info == NULL) + bd_info = _policy_add_border_info_list (bd); + + if (bd_info) + { + bd_info->opaque = _policy_property_window_opaque_get (bd->client.win); + } + + /* ignore stolen borders. These are typically quickpanel or keyboards */ + if (bd->stolen) + { + if (bd->client.illume.quickpanel.quickpanel) + { + E_Border* indi_bd; + E_Illume_Border_Info* indi_bd_info = NULL; + + /* try to get the Indicator on this zone */ + if ((indi_bd = e_illume_border_indicator_get (bd->zone))) + { + if ((indi_bd_info = _policy_get_border_info (indi_bd))) + { + if (bd_info) bd_info->level = indi_bd_info->level; + } + } + } + return; + } + + /* Add this border to our focus stack if it can accept or take focus */ + if ((bd->client.icccm.accepts_focus) || (bd->client.icccm.take_focus)) + _pol_focus_stack = eina_list_append(_pol_focus_stack, bd); + + if (e_illume_border_is_indicator(bd)) + _policy_zone_layout_update(bd->zone); + else + { + /* set focus on new border if we can */ + _policy_border_set_focus(bd); + } + + if (e_illume_border_is_indicator (bd)) + { + E_Illume_Config_Zone *cz; + cz = e_illume_zone_config_get(bd->zone->id); + if (cz) + { + ILLUME2_TRACE ("[ILLUME2] ADD INDICATOR WINDOW... win = %x, Save indicator's size = %d!!!\n", bd->client.win, bd->h); + cz->indicator.size = bd->h; + } + + int is_show = 0; + if (g_active_win) + { + E_Border* active_bd = NULL; + active_bd = e_border_find_by_client_window (g_active_win); + if (active_bd) + { + is_show = _policy_border_indicator_state_get (active_bd); + if (e_illume_border_is_notification (active_bd)) + { + int level; + E_Illume_Border_Info* active_bd_info; + active_bd_info = _policy_get_border_info (active_bd); + if (active_bd_info) + { + level = active_bd_info->level; + } + else + { + level = 250; + } + L (LT_NOTIFICATION, "[ILLUME2][NOTIFICATION] %s(%d)... Update indicator's layer to NOTIFICATON.. level = %d\n", __func__, __LINE__, level); + _policy_change_indicator_layer (bd, POL_NOTIFICATION_LAYER, level); + } + } + } + + if (is_show != 1) + { + e_border_hide (bd, 2); + } + } +} + +void +_policy_border_del(E_Border *bd) +{ + // printf("Border deleted: %s\n", bd->client.icccm.class); + E_Illume_XWin_Info* xwin_info; + Eina_Bool is_rotated_win = EINA_FALSE; + + if (!bd) return; + + /* if this is a fullscreen window, than we need to show indicator window */ + /* NB: we could use the e_illume_border_is_fullscreen function here + * but we save ourselves a function call this way */ + if ((bd->fullscreen) || (bd->need_fullscreen)) + { + E_Border *indi_bd; + + /* try to get the Indicator on this zone */ + if ((indi_bd = e_illume_border_indicator_get(bd->zone))) + { + /* we have the indicator, show it if needed */ + if (!indi_bd->visible) e_illume_border_show(indi_bd); + } + } + + if (e_illume_border_is_sliding_win(bd)) + { + ecore_x_e_illume_sliding_win_state_set (bd->zone->black_win, 0); + } + + /* remove from our focus stack */ + if ((bd->client.icccm.accepts_focus) || (bd->client.icccm.take_focus)) + _pol_focus_stack = eina_list_remove(_pol_focus_stack, bd); + + if (g_rotated_win == bd->client.win) + { + is_rotated_win = EINA_TRUE; + g_rotated_win = 0; + } + + xwin_info = _policy_xwin_info_find (bd->win); + if (xwin_info) + { + if (is_rotated_win) + { + if (xwin_info->argb && !xwin_info->bd_info->opaque) + { + E_Illume_XWin_Info* next_xwin_info = NULL; + next_xwin_info = _policy_find_next_visible_window (xwin_info); + L (LT_ANGLE, "[ILLUME2][ANGLE] %s(%d).. next_win:%x\n", __func__, __LINE__, next_xwin_info ? (unsigned int)next_xwin_info->bd_info->border->client.win : (unsigned int)NULL); + if (next_xwin_info) + { + L (LT_ANGLE, "[ILLUME2][ANGLE] %s(%d).. CALL _policy_change_root_angle_by_border_angle!!! win:%x\n", __func__, __LINE__, next_xwin_info->bd_info->border->client.win); + _policy_change_root_angle_by_border_angle (next_xwin_info->bd_info->border); + } + else + { + L (LT_ANGLE, "[ILLUME2][ANGLE] %s(%d)... CALL _policy_root_angle_set.. win:%x\n", __func__, __LINE__, (unsigned int)NULL); + _policy_root_angle_set (bd->zone->container->manager->root, 0); + } + + } + } + + xwin_info->bd_info = NULL; + } + + _policy_delete_border_info_list (bd); + + if (g_screen_lock_info->is_lock) + _policy_border_remove_block_list (bd); + + if (e_illume_border_is_indicator(bd)) + { + E_Illume_Config_Zone *cz; + + /* get the config for this zone */ + cz = e_illume_zone_config_get(bd->zone->id); + if (cz) cz->indicator.size = 0; + _policy_zone_layout_update(bd->zone); + } + else + { + /* show the border below this one */ + _policy_border_show_below(bd); + } + + if (e_illume_border_is_lock_screen(bd)) + { + if (_e_illume_cfg->use_mem_trim) + { + /* heap and stack trim */ + e_illume_util_mem_trim(); + } + } +} + +void +_policy_border_focus_in(E_Border *bd __UNUSED__) +{ + // printf("Border focus in: %s\n", bd->client.icccm.name); +} + +void +_policy_border_focus_out(E_Border *bd) +{ + // printf("Border focus out: %s\n", bd->client.icccm.name); + + if (!bd) return; + + /* NB: if we got this focus_out event on a deleted border, we check if + * it is a transient (child) of another window. If it is, then we + * transfer focus back to the parent window */ + if (e_object_is_del(E_OBJECT(bd))) + { + if (e_illume_border_is_dialog(bd)) + { + E_Border *parent; + + if ((parent = e_illume_border_parent_get(bd))) + _policy_border_set_focus(parent); + } + } +} + +void +_policy_border_activate(E_Border *bd) +{ + // printf("Border Activate: %s\n", bd->client.icccm.name); + int level; + E_Illume_Border_Info* bd_info = NULL; + + if (!bd) return; + + /* NB: stolen borders may or may not need focus call...have to test */ + if (bd->stolen) return; + + /* NB: We cannot use our set_focus function here because it does, + * occasionally fall through wrt E's focus policy, so cherry pick the good + * parts and use here :) */ + + /* if the border is iconified then uniconify if allowed */ + if ((bd->iconic) && (!bd->lock_user_iconify)) + e_border_uniconify(bd); + + ILLUME2_TRACE ("[ILLUME2] _policy_border_activate.. (%d) ACTIVE WIN = %x\n", __LINE__, bd->client.win); + + if (e_illume_border_is_notification (bd)) + { + // create border_info + bd_info = _policy_get_border_info(bd); + if (bd_info == NULL) return; + + level = _policy_border_get_notification_level (bd->client.win); + L (LT_NOTIFICATION, "[ILLUME2][NOTIFICATION] %s(%d)... win (%x) is notification window... level = %d\n", __func__, __LINE__, bd->client.win, level); + _policy_border_update_notification_stack (bd, level, EINA_TRUE); + } + + /* NB: since we skip needless border evals when container layout + * is called (to save cpu cycles), we need to + * signal this border that it's focused so that the edj gets + * updated. + * + * This is potentially useless as THIS policy + * makes all windows borderless anyway, but it's in here for + * completeness + e_border_focus_latest_set(bd); + if (bd->bg_object) + edje_object_signal_emit(bd->bg_object, "e,state,focused", "e"); + if (bd->icon_object) + edje_object_signal_emit(bd->icon_object, "e,state,focused", "e"); + e_focus_event_focus_in(bd); + */ +} + +void +_policy_border_post_fetch(E_Border *bd) +{ + // printf("Border post fetch\n"); + + if (!bd) return; + + /* NB: for this policy we disable all remembers set on a border */ + if (bd->remember) e_remember_del(bd->remember); + bd->remember = NULL; + + /* set this border to borderless */ +#ifdef DIALOG_USES_PIXEL_BORDER + if ((e_illume_border_is_dialog(bd)) && (e_illume_border_parent_get(bd))) + eina_stringshare_replace(&bd->bordername, "pixel"); + else + bd->borderless = 1; +#else + bd->borderless = 1; +#endif + + /* tell E the border has changed */ + bd->client.border.changed = 1; +} + + +void +_policy_border_post_new_border(E_Border *bd) +{ + int level; + E_Illume_Border_Info* bd_info = NULL; + + if (bd->new_client) + { + if (e_illume_border_is_notification (bd)) + { + // create border_info + bd_info = _policy_get_border_info(bd); + if (bd_info == NULL) + bd_info = _policy_add_border_info_list (bd); + + level = _policy_border_get_notification_level (bd->client.win); + L (LT_NOTIFICATION, "[ILLUME2][NOTIFICATION] %s(%d)... win (%x) is notification window... level = %d\n", __func__, __LINE__, bd->client.win, level); + _policy_border_update_notification_stack (bd, level, EINA_TRUE); + } + } +} + + +void +_policy_border_pre_fetch(E_Border *bd) +{ + if (!bd) return; + + /* Below code are same to _e_border_eval0 in e_border.c. + But we added code to handle notification window */ + if (bd->client.icccm.fetch.transient_for) + { + /* TODO: What do to if the transient for isn't mapped yet? */ + E_Border *bd_parent = NULL; + + bd->client.icccm.transient_for = ecore_x_icccm_transient_for_get(bd->client.win); + if (bd->client.icccm.transient_for) + { + bd_parent = e_border_find_by_client_window(bd->client.icccm.transient_for); + } + + /* If we already have a parent, remove it */ + if (bd->parent) + { + bd->parent->transients = eina_list_remove(bd->parent->transients, bd); + if (bd->parent->modal == bd) bd->parent->modal = NULL; + bd->parent = NULL; + } + + if (bd_parent) + { + if (bd_parent != bd) + { + bd_parent->transients = eina_list_append(bd_parent->transients, bd); + bd->parent = bd_parent; + e_border_layer_set(bd, bd->parent->layer); + + if ((e_config->modal_windows) && (bd->client.netwm.state.modal)) + bd->parent->modal = bd; + + if (e_config->focus_setting == E_FOCUS_NEW_DIALOG || + (bd->parent->focused && (e_config->focus_setting == E_FOCUS_NEW_DIALOG_IF_OWNER_FOCUSED))) + bd->take_focus = 1; + + /* handles notification window stack */ + if (e_illume_border_is_notification (bd_parent) || bd_parent->layer == POL_NOTIFICATION_LAYER) + { + int level; + E_Illume_Border_Info* bd_info; + E_Illume_Border_Info* parent_bd_info; + + bd_info = _policy_get_border_info(bd); + if (bd_info == NULL) + bd_info = _policy_add_border_info_list (bd); + + parent_bd_info = _policy_get_border_info (bd_parent); + if (parent_bd_info) + { + level = parent_bd_info->level; + } + else + { + level = _policy_border_get_notification_level (bd_parent->client.win); + } + L (LT_NOTIFICATION, "[ILLUME2][NOTIFICATION] %s(%d)... win (%x) is notification window... level = %d\n", __func__, __LINE__, bd->client.win, level); + _policy_border_update_notification_stack (bd, level, EINA_TRUE); + } + } + else + { + if (e_illume_border_is_notification (bd_parent) || bd_parent->layer == POL_NOTIFICATION_LAYER) + { + int level; + E_Illume_Border_Info* bd_info; + E_Illume_Border_Info* parent_bd_info; + + bd_info = _policy_get_border_info(bd); + if (bd_info == NULL) + bd_info = _policy_add_border_info_list (bd); + + parent_bd_info = _policy_get_border_info (bd_parent); + if (parent_bd_info) + { + level = parent_bd_info->level; + } + else + { + level = _policy_border_get_notification_level (bd_parent->client.win); + } + L (LT_NOTIFICATION, "[ILLUME2][NOTIFICATION] %s(%d)... win (%x) is notification window... level = %d\n", __func__, __LINE__, bd->client.win, level); + _policy_border_update_notification_stack (bd, level, EINA_TRUE); + } + } + } + bd->client.icccm.fetch.transient_for = 0; + } +} + +void +_policy_border_post_assign(E_Border *bd) +{ + // printf("Border post assign\n"); + + if (!bd) return; + + bd->internal_no_remember = 1; + + /* do not allow client to change these properties */ + bd->lock_client_shade = 1; + bd->lock_client_maximize = 1; + + /* do not allow the user to change these properties */ + bd->lock_user_location = 1; + bd->lock_user_size = 1; + bd->lock_user_shade = 1; + + /* clear any centered states */ + /* NB: this is mainly needed for E's main config dialog */ + bd->client.e.state.centered = 0; + + /* lock the border type so user/client cannot change */ + bd->lock_border = 1; + + if (e_illume_border_is_utility (bd)) + { + ILLUME2_TRACE ("[ILLUME2-NEW] %s(%d)... win(%x) is UTILITY type.. SET REQUEST_POS!!!\n", __func__, __LINE__, bd->client.win); + bd->client.icccm.request_pos = 1; + } + +} + +void +_policy_border_show(E_Border *bd) +{ + if (!bd) return; + + /* make sure we have a name so that we don't handle windows like E's root */ + if (!bd->client.icccm.name) return; + + // printf("Border Show: %s\n", bd->client.icccm.class); + + /* trap for special windows so we can ignore hides below them */ + if (e_illume_border_is_indicator(bd)) return; + if (e_illume_border_is_quickpanel(bd)) return; + if (e_illume_border_is_keyboard(bd)) return; + if (e_illume_border_is_sliding_win(bd)) + { + ecore_x_e_illume_sliding_win_state_set (bd->zone->black_win, 1); + ecore_x_e_illume_sliding_win_geometry_set (bd->zone->black_win, bd->x, bd->y, bd->w, bd->h); + return; + } +} + +void +_policy_zone_layout(E_Zone *zone) +{ + E_Illume_Config_Zone *cz; + Eina_List *l; + E_Border *bd; + + // printf("Zone Layout: %d\n", zone->id); + + if (!zone) return; + + /* get the config for this zone */ + cz = e_illume_zone_config_get(zone->id); + if (!cz) return; + + /* loop through border list and update layout */ + E_Illume_Border_Info* bd_info; + EINA_LIST_FOREACH(e_border_info_list, l, bd_info) + { + if (!bd_info) continue; + + bd = bd_info->border; + + /* skip borders that are being deleted */ + if (e_object_is_del(E_OBJECT(bd))) continue; + + /* skip borders not on this zone */ + if (bd->zone != zone) continue; + + /* only update layout for this border if it really needs it */ + if ((!bd->new_client) && (!bd->changes.pos) && (!bd->changes.size) && + (!bd->changes.visible) && (!bd->pending_move_resize) && + (!bd->need_shape_export) && (!bd->need_shape_merge)) continue; + + /* are we laying out an indicator ? */ + if (e_illume_border_is_indicator(bd)) + _policy_zone_layout_indicator(bd, cz); + + /* are we layout out a quickpanel ? */ + else if (e_illume_border_is_quickpanel(bd)) + _policy_zone_layout_quickpanel(bd); + + /* are we laying out a keyboard ? */ + else if (e_illume_border_is_keyboard(bd)) + _policy_zone_layout_keyboard(bd, cz); + + /* are we laying out a fullscreen window ? */ + /* NB: we could use the e_illume_border_is_fullscreen function here + * but we save ourselves a function call this way. */ + else if ((bd->fullscreen) || (bd->need_fullscreen)) + _policy_zone_layout_fullscreen(bd); + + /* are we laying out a dialog ? */ + else if (e_illume_border_is_dialog(bd)) + _policy_zone_layout_dialog(bd, cz); + + else if (e_illume_border_is_sliding_win(bd)) + _policy_zone_layout_sliding_win(bd, cz); + + /* must be an app */ + else + { + /* are we in single mode ? */ + if (!cz->mode.dual) + _policy_zone_layout_app_single_new (bd_info, cz); + else + { + /* we are in dual-mode, check orientation */ + if (cz->mode.side == 0) + { + int ty; + + /* grab the indicator position so we can tell if it + * is in a custom position or not (user dragged it) */ + e_illume_border_indicator_pos_get(bd->zone, NULL, &ty); + if (ty <= bd->zone->y) + _policy_zone_layout_app_dual_top_new (bd_info, cz); + else + _policy_zone_layout_app_dual_custom_new (bd_info, cz); + } + else + _policy_zone_layout_app_dual_left_new (bd_info, cz); + } + } + } +} + +void +_policy_zone_move_resize(E_Zone *zone) +{ + Eina_List *l; + E_Border *bd; + + // printf("Zone move resize\n"); + + if (!zone) return; + + EINA_LIST_FOREACH(e_border_client_list(), l, bd) + { + if (!bd) continue; + /* skip borders not on this zone */ + if (bd->zone != zone) continue; + + /* signal a changed pos here so layout gets updated */ + bd->changes.pos = 1; + bd->changed = 1; + } +} + +void +_policy_zone_mode_change(E_Zone *zone, Ecore_X_Atom mode) +{ + E_Illume_Config_Zone *cz; + E_Border *bd; + + // printf("Zone mode change: %d\n", zone->id); + + if (!zone) return; + + /* get the config for this zone */ + cz = e_illume_zone_config_get(zone->id); + if (!cz) return; + + /* update config with new mode */ + if (mode == ECORE_X_ATOM_E_ILLUME_MODE_SINGLE) + cz->mode.dual = 0; + else + { + cz->mode.dual = 1; + if (mode == ECORE_X_ATOM_E_ILLUME_MODE_DUAL_TOP) + cz->mode.side = 0; + else if (mode == ECORE_X_ATOM_E_ILLUME_MODE_DUAL_LEFT) + cz->mode.side = 1; + } + e_config_save_queue(); + + /* lock indicator window from dragging if we need to */ + bd = e_illume_border_indicator_get(zone); + if (bd) + { + /* only dual-top mode can drag */ + if ((cz->mode.dual == 1) && (cz->mode.side == 0)) + { + /* only set locked if we need to */ + if (bd->client.illume.drag.locked != 0) + ecore_x_e_illume_drag_locked_set(bd->client.win, 0); + } + else + { + /* only set locked if we need to */ + if (bd->client.illume.drag.locked != 1) + ecore_x_e_illume_drag_locked_set(bd->client.win, 1); + } + } + + /* Need to trigger a layout update here */ + _policy_zone_layout_update(zone); +} + +void +_policy_zone_close(E_Zone *zone) +{ + E_Border *bd; + + // printf("Zone close\n"); + + if (!zone) return; + + /* make sure we have a focused border */ + if (!(bd = e_border_focused_get())) return; + + /* make sure focused border is on this zone */ + if (bd->zone != zone) return; + + /* close this border */ + e_border_act_close_begin(bd); +} + +void +_policy_drag_start(E_Border *bd) +{ + // printf("Drag start\n"); + + if (!bd) return; + + /* ignore stolen borders */ + if (bd->stolen) return; + + /* set property on this border to say we are dragging */ + ecore_x_e_illume_drag_set(bd->client.win, 1); + + /* set property on zone window that a drag is happening */ + ecore_x_e_illume_drag_set(bd->zone->black_win, 1); +} + +void +_policy_drag_end(E_Border *bd) +{ + // printf("Drag end\n"); + + if (!bd) return; + + /* ignore stolen borders */ + if (bd->stolen) return; + + /* set property on this border to say we are done dragging */ + ecore_x_e_illume_drag_set(bd->client.win, 0); + + /* set property on zone window that a drag is finished */ + ecore_x_e_illume_drag_set(bd->zone->black_win, 0); +} + +void +_policy_focus_back(E_Zone *zone) +{ + Eina_List *l, *fl = NULL; + E_Border *bd, *fbd; + + if (!zone) return; + if (eina_list_count(_pol_focus_stack) < 1) return; + + // printf("Focus back\n"); + + EINA_LIST_FOREACH(_pol_focus_stack, l, bd) + { + if (!bd) continue; + if (bd->zone != zone) continue; + fl = eina_list_append(fl, bd); + } + + if (!(fbd = e_border_focused_get())) return; + if (fbd->parent) return; + + EINA_LIST_REVERSE_FOREACH(fl, l, bd) + { + if ((fbd) && (bd == fbd)) + { + E_Border *b; + + if ((l->next) && (b = l->next->data)) + { + _policy_border_set_focus(b); + break; + } + else + { + /* we've reached the end of the list. Set focus to first */ + if ((b = eina_list_nth(fl, 0))) + { + _policy_border_set_focus(b); + break; + } + } + } + } + eina_list_free(fl); +} + +void +_policy_focus_forward(E_Zone *zone) +{ + Eina_List *l, *fl = NULL; + E_Border *bd, *fbd; + + if (!zone) return; + if (eina_list_count(_pol_focus_stack) < 1) return; + + // printf("Focus forward\n"); + + EINA_LIST_FOREACH(_pol_focus_stack, l, bd) + { + if (!bd) continue; + if (bd->zone != zone) continue; + fl = eina_list_append(fl, bd); + } + + if (!(fbd = e_border_focused_get())) return; + if (fbd->parent) return; + + EINA_LIST_FOREACH(fl, l, bd) + { + if ((fbd) && (bd == fbd)) + { + E_Border *b; + + if ((l->next) && (b = l->next->data)) + { + _policy_border_set_focus(b); + break; + } + else + { + /* we've reached the end of the list. Set focus to first */ + if ((b = eina_list_nth(fl, 0))) + { + _policy_border_set_focus(b); + break; + } + } + } + } + eina_list_free(fl); +} + +/* enable/disable composite module - 100320 yigl */ +#ifdef COMP_MODULE_CONTROL +static void +_policy_property_composite_module_change(Ecore_X_Event_Window_Property *ev) +{ + int ret, count; + int enable = 0; + int current_enabled = 0; + unsigned char* prop_data = NULL; + E_Module* comp = NULL; + + ret = ecore_x_window_prop_property_get (ev->win, E_ILLUME_ATOM_COMP_MODULE_ENABLED, ECORE_X_ATOM_CARDINAL, 32, &prop_data, &count); + if( ret && prop_data ) + { + memcpy (&enable, prop_data, sizeof (int)); + fprintf( stdout, "[E17-illume2-slp] %s(%d) enable: %s ", __func__, __LINE__, enable ? "true" : "false" ); + + comp = e_module_find ("comp-slp"); + if( comp ) + { + current_enabled = e_module_enabled_get(comp); + fprintf( stdout, "current: %s ", current_enabled ? "true" : "false" ); + + if( current_enabled && !enable ) + { + fprintf( stdout, "e_module_disable(comp-slp) " ); + e_module_disable(comp); + } + else if( !current_enabled && enable ) + { + fprintf( stdout, "e_module_enable(comp-slp) " ); + e_module_enable(comp); + } + else + { + fprintf( stdout, "skip... " ); + } + + fprintf( stdout, "\n" ); + } + else + { + fprintf( stderr, "\n[E17-illume2-slp] %s(%d) can't find comp module.\n", __func__, __LINE__ ); + } + } + + if (prop_data) free (prop_data); + +} +#endif + + +static void _policy_property_window_state_change (Ecore_X_Event_Window_Property *event) +{ + E_Border *bd, *indi_bd; + + if (!(bd = e_border_find_by_client_window(event->win))) return; + + /* not interested in stolen or invisible borders */ + if ((bd->stolen) || (!bd->visible)) return; + + /* make sure the border has a name or class */ + /* NB: this check is here because some E borders get State Changes + * but do not have a name/class associated with them. Not entirely sure + * which ones they are, but I would guess Managers, Containers, or Zones. + * At any rate, we're not interested in those types of borders */ + if ((!bd->client.icccm.name) || (!bd->client.icccm.class)) return; + + /* NB: If we have reached this point, then it should be a fullscreen + * border that has toggled fullscreen on/off */ + + /* if the window is not active window, then it doesn't need to hande indicator */ + if (g_active_win != bd->client.win) return; + + /* try to get the Indicator on this zone */ + if (!(indi_bd = e_illume_border_indicator_get(bd->zone))) return; + + /* if we are fullscreen, hide the indicator...else we show it */ + /* NB: we could use the e_illume_border_is_fullscreen function here + * but we save ourselves a function call this way */ + if ((bd->fullscreen) || (bd->need_fullscreen)) + { + if (indi_bd->visible) e_border_hide(indi_bd, 2); + } + else + { + int indi_show = _policy_border_indicator_state_get(bd); + if (indi_show == 1) + { + if (!indi_bd->visible) e_border_show(indi_bd); + } + } + +} + +static void _policy_property_indicator_geometry_change (Ecore_X_Event_Window_Property *event) +{ + Eina_List *l; + E_Zone *zone; + E_Border *bd; + int x, y, w, h; + + /* make sure this property changed on a zone */ + if (!(zone = e_util_zone_window_find(event->win))) return; + + /* get the geometry */ + if (!(bd = e_illume_border_indicator_get(zone))) return; + x = bd->x; + y = bd->y; + w = bd->w; + h = bd->h; + + /* look for conformant borders */ + EINA_LIST_FOREACH(e_border_client_list(), l, bd) + { + if (!bd) continue; + if (bd->zone != zone) continue; + if (!e_illume_border_is_conformant(bd)) continue; + /* set indicator geometry on conformant window */ + /* NB: This is needed so that conformant apps get told about + * the indicator size/position...else they have no way of + * knowing that the geometry has been updated */ + ecore_x_e_illume_indicator_geometry_set(bd->client.win, x, y, w, h); + } +} + +static void _policy_property_keyboard_geometry_change (Ecore_X_Event_Window_Property *event) +{ + Eina_List *l; + E_Zone *zone; + E_Border *bd; + int x, y, w, h; + + /* make sure this property changed on a zone */ + if (!(zone = e_util_zone_window_find(event->win))) return; + + ecore_x_e_illume_keyboard_geometry_get(zone->black_win, &x, &y, &w, &h); + + /* look for conformant borders */ + EINA_LIST_FOREACH(e_border_client_list(), l, bd) + { + if (!bd) continue; + if (bd->zone != zone) continue; + if (!e_illume_border_is_conformant(bd)) continue; + /* set keyboard geometry on conformant window */ + /* NB: This is needed so that conformant apps get told about + * the keyboard size/position...else they have no way of + * knowing that the geometry has been updated */ + ecore_x_e_illume_keyboard_geometry_set(bd->client.win, x, y, w, h); + } +} + +static void _policy_property_virtual_keyboard_state_change (Ecore_X_Event_Window_Property *event) +{ + Eina_List *l; + E_Zone *zone; + Ecore_X_Virtual_Keyboard_State state; + E_Border *bd; + + /* make sure this property changed on a zone */ + if (!(zone = e_util_zone_window_find(event->win))) return; + + state = ecore_x_e_virtual_keyboard_state_get (zone->black_win); + + /* look for conformant borders */ + EINA_LIST_FOREACH(e_border_client_list(), l, bd) + { + if (!bd) continue; + if (bd->zone != zone) continue; + if (!e_illume_border_is_conformant(bd)) continue; + /* set keyboard state on conformant window */ + /* NB: This is needed so that conformant apps get told about + * the keyboard state...else they have no way of + * knowing that the state of keyboard has been updated */ + ecore_x_e_virtual_keyboard_state_set (bd->client.win, state); + } +} + +static void _policy_property_sliding_win_geometry_change (Ecore_X_Event_Window_Property *event) +{ + Eina_List *l; + E_Zone *zone; + E_Border *bd; + int x, y, w, h; + + /* make sure this property changed on a zone */ + if (!(zone = e_util_zone_window_find(event->win))) return; + + ecore_x_e_illume_sliding_win_geometry_get(zone->black_win, &x, &y, &w, &h); + + /* look for conformant borders */ + EINA_LIST_FOREACH(e_border_client_list(), l, bd) + { + if (!bd) continue; + if (bd->zone != zone) continue; + if (e_illume_border_is_indicator(bd)) continue; + if (e_illume_border_is_keyboard(bd)) continue; + if (e_illume_border_is_quickpanel(bd)) continue; + + ecore_x_e_illume_sliding_win_geometry_set(bd->client.win, x, y, w, h); + } +} + +static void _policy_property_sliding_win_state_change (Ecore_X_Event_Window_Property *event) +{ + Eina_List *l; + E_Zone *zone; + E_Border *bd; + int is_visible; + + /* make sure this property changed on a zone */ + if (!(zone = e_util_zone_window_find(event->win))) return; + + is_visible = ecore_x_e_illume_sliding_win_state_get (zone->black_win); + + /* look for conformant borders */ + EINA_LIST_FOREACH(e_border_client_list(), l, bd) + { + if (!bd) continue; + if (bd->zone != zone) continue; + if (e_illume_border_is_indicator(bd)) continue; + if (e_illume_border_is_keyboard(bd)) continue; + if (e_illume_border_is_quickpanel(bd)) continue; + + ecore_x_e_illume_sliding_win_state_set (bd->client.win, is_visible); + } +} + +static void _policy_property_enlightenment_scale_change (Ecore_X_Event_Window_Property *event) +{ + Eina_List *ml; + E_Manager *man; + + EINA_LIST_FOREACH(e_manager_list(), ml, man) + { + Eina_List *cl; + E_Container *con; + + if (!man) continue; + if (event->win != man->root) continue; + EINA_LIST_FOREACH(man->containers, cl, con) + { + Eina_List *zl; + E_Zone *zone; + + if (!con) continue; + EINA_LIST_FOREACH(con->zones, zl, zone) + _policy_zone_layout_update(zone); + } + } +} + +static void _policy_property_rotate_win_angle_change (Ecore_X_Event_Window_Property *event) +{ + E_Border* bd; + E_Illume_XWin_Info* xwin_info; + + L (LT_ANGLE, "[ILLUME2][ANGLE] %s(%d).. win:%x\n", __func__, __LINE__, event->win); + + if (!(bd = e_border_find_by_client_window(event->win))) return; + + xwin_info = _policy_xwin_info_find (bd->win); + if (xwin_info) + { + if (xwin_info->visibility == E_ILLUME_VISIBILITY_UNOBSCURED) + { + L (LT_ANGLE, "[ILLUME2][ANGLE] %s(%d).. CALL _policy_change_root_angle_by_border_angle!!! win:%x\n", __func__, __LINE__, bd->client.win); + _policy_change_root_angle_by_border_angle (bd); + } + } +} + +static void _policy_property_indicator_state_change (Ecore_X_Event_Window_Property *event) +{ + E_Border *bd, *indi_bd; + Ecore_X_Window active_win; + + if (!(bd = e_border_find_by_client_window(event->win))) return; + + indi_bd = e_illume_border_indicator_get (bd->zone); + if (!indi_bd) return; + + active_win = _policy_active_window_get(bd->zone->container->manager->root); + if (active_win == bd->client.win) + { + int indi_show = _policy_border_indicator_state_get(bd); + if (indi_show == 1) + { + ILLUME2_TRACE ("[ILLUME2] Get ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE (%d) SHOW Indicator... bd = %x\n", __LINE__, event->win); + e_border_show(indi_bd); + + if (e_illume_border_is_notification (bd)) + { + int level; + E_Illume_Border_Info* active_bd_info; + active_bd_info = _policy_get_border_info (bd); + if (active_bd_info) + { + level = active_bd_info->level; + } + else + { + level = 250; + } + L (LT_NOTIFICATION, "[ILLUME2][NOTIFICATION] %s(%d)... Notification Win:%x, Update Indicator's layer to NOTIFICATION.. level = %d\n", __func__, __LINE__, bd->client.win, level); + _policy_change_indicator_layer (indi_bd, POL_NOTIFICATION_LAYER, level); + } + } + else if (indi_show == 0) + { + ILLUME2_TRACE ("[ILLUME2] Get ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE (%d) HIDE Indicator... bd = %x\n", __LINE__, event->win); + e_border_hide(indi_bd, 2); + } + } +} + +static void _policy_property_active_win_change (Ecore_X_Event_Window_Property *event) +{ + Ecore_X_Window active_win; + int indi_show; + E_Border* active_border; + E_Border* indi_bd; + + active_win = _policy_active_window_get(event->win); + if (active_win) + { + active_border = e_border_find_by_client_window (active_win); + } + else + { + active_border = NULL; + } + + /* for active/deactive message */ + if (active_win != g_active_win) + { + int active_pid ; + if (active_border) + active_pid = active_border->client.netwm.pid; + else + active_pid = 0; + + // 1. send deactive event to g_active_win + ecore_x_client_message32_send (g_active_win, E_ILLUME_ATOM_DEACTIVATE_WINDOW, + ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, active_win, active_pid, g_active_win, g_active_pid, 0); + + // 2. send active event to active_win + ecore_x_client_message32_send (active_win, E_ILLUME_ATOM_ACTIVATE_WINDOW, + ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, active_win, active_pid, g_active_win, g_active_pid, 0); + + // for debug... + printf ("\n=========================================================================================\n"); + if (active_border) + { + printf ("[WM] Active window is changed. OLD(win:%x,pid:%d) --> NEW(win:%x,pid:%d,name:%s)\n", g_active_win, g_active_pid, active_win, active_pid, active_border->client.netwm.name); + LOG(LOG_DEBUG, "LAUNCH", "[WM] Active window is changed. OLD(win:%x,pid:%d) --> NEW(win:%x,pid:%d,name:%s)", g_active_win, g_active_pid, active_win, active_pid, active_border->client.netwm.name); + } + else + { + printf ("[WM] Active window is changed. OLD(win:%x,pid:%d) --> NEW(win:%x,pid:%d,name:NULL)\n", g_active_win, g_active_pid, active_win, active_pid); + LOG(LOG_DEBUG, "LAUNCH", "[WM] Active window is changed. OLD(win:%x,pid:%d) --> NEW(win:%x,pid:%d,name:NULL)", g_active_win, g_active_pid, active_win, active_pid); + } + printf ("=========================================================================================\n\n"); + g_active_win = active_win; + g_active_pid = active_pid; + } + + if (active_border) + { + indi_bd = e_illume_border_indicator_get (active_border->zone); + if (indi_bd) + { + /* if the active window is full screen, then hide indicator */ + if (active_border->fullscreen || active_border->need_fullscreen) + { + e_border_hide (indi_bd, 2); + return; + } + + indi_show = _policy_border_indicator_state_get(active_border); + if (indi_show == 1) + { + // if border is notification, the indicator's layer is changed + if (e_illume_border_is_notification (active_border)) + { + int level; + E_Illume_Border_Info* active_bd_info; + active_bd_info = _policy_get_border_info (active_border); + if (active_bd_info) + { + level = active_bd_info->level; + } + else + { + level = 250; + } + L (LT_NOTIFICATION, "[ILLUME2][NOTIFICATION] %s(%d)... Notification Win:%x, Update Indicator's layer to NOTIFICATION.. level = %d\n", __func__, __LINE__, indi_bd->client.win, level); + _policy_change_indicator_layer (indi_bd, POL_NOTIFICATION_LAYER, level); + } + else + { + L (LT_NOTIFICATION, "[ILLUME2][NOTIFICATION] %s(%d)... Notification Win:%x, Update Indicator's layer to NOTIFICATION.. level = %d\n", __func__, __LINE__, indi_bd->client.win, 50); + _policy_change_indicator_layer (indi_bd, POL_INDICATOR_LAYER, 50); + } + + ILLUME2_TRACE ("[ILLUME2] Get ECORE_X_ATOM_NET_ACTIVE_WINDOW (%d) SHOW Indicator... bd = %x\n", __LINE__, active_win); + e_border_show(indi_bd); + } + else if (indi_show == 0) + { + ILLUME2_TRACE ("[ILLUME2] Get ECORE_X_ATOM_NET_ACTIVE_WINDOW (%d) HIDE Indicator... bd = %x\n", __LINE__, active_win); + e_border_hide(indi_bd, 2); + } + } + + ILLUME2_TRACE ("[ILLUME2] ACTIVE WINDOW... (%d) active win = %x HIDE quickpanel\n", __LINE__, active_win); + e_illume_quickpanel_hide (active_border->zone, 0); + } +} + +static void _policy_property_win_type_change (Ecore_X_Event_Window_Property *event) +{ + E_Border *bd; + int level; + + if (!(bd = e_border_find_by_client_window(event->win))) return; + + e_hints_window_type_get (bd); + if (bd->client.netwm.type == ECORE_X_WINDOW_TYPE_NOTIFICATION) + { + ILLUME2_TRACE ("[ILLUME2-NEW] %s(%d)... WINDOW TYPE is CHANGED to NOTIFICATION!!!!! win = %x\n", __func__, __LINE__, bd->client.win); + if (bd->layer != POL_NOTIFICATION_LAYER) + e_border_layer_set(bd, POL_NOTIFICATION_LAYER); + + level = _policy_border_get_notification_level (bd->client.win); + L (LT_NOTIFICATION, "[ILLUME2][NOTIFICATION] %s(%d)... win (%x) is notification window... level = %d\n", __func__, __LINE__, bd->client.win, level); + _policy_border_update_notification_stack (bd, level, EINA_TRUE); + + if (_policy_active_window_get (bd->zone->container->manager->root) == bd->client.win) + { + int show_indi; + E_Border* indi_bd; + + indi_bd = e_illume_border_indicator_get(bd->zone); + if (indi_bd) + { + show_indi = _policy_border_indicator_state_get (bd); + if (show_indi == 1) + { + L (LT_NOTIFICATION, "[ILLUME2][NOTIFICATION] %s(%d)... Notification Win:%x, Update Indicator's layer to NOTIFICATION.. level = %d\n", __func__, __LINE__, indi_bd->client.win, level); + _policy_change_indicator_layer (indi_bd, POL_NOTIFICATION_LAYER, level); + } + } + } + } + else if (bd->client.netwm.type == ECORE_X_WINDOW_TYPE_NORMAL) + { + ILLUME2_TRACE ("[ILLUME2-NEW] %s(%d)... WINDOW TYPE is CHANGED to NORMAL!!!!! win = %x\n", __func__, __LINE__, bd->client.win); + if (bd->layer != POL_APP_LAYER) + { + if ( (!e_illume_border_is_quickpanel(bd)) && + (!e_illume_border_is_keyboard(bd))) + { + e_border_layer_set(bd, POL_APP_LAYER); + } + } + + if (_policy_active_window_get (bd->zone->container->manager->root) == bd->client.win) + { + int show_indi; + E_Border* indi_bd; + + indi_bd = e_illume_border_indicator_get(bd->zone); + if (indi_bd) + { + show_indi = _policy_border_indicator_state_get (bd); + if (show_indi == 1) + { + L (LT_NOTIFICATION, "[ILLUME2][NOTIFICATION] %s(%d)... Notification Win:%x, Update Indicator's layer to NOTIFICATION.. level = %d\n", __func__, __LINE__, indi_bd->client.win, 50); + _policy_change_indicator_layer (indi_bd, POL_INDICATOR_LAYER, 50); + } + } + } + } + else if (bd->client.netwm.type == ECORE_X_WINDOW_TYPE_UTILITY) + { + bd->client.icccm.request_pos = 1; + + if (bd->layer != POL_APP_LAYER) + e_border_layer_set(bd, POL_APP_LAYER); + } + +} + +static void _policy_property_rotate_root_angle_change (Ecore_X_Event_Window_Property *event) +{ + E_Border* bd; + E_Border* indi_bd; + int ret; + int count; + int angle = 0; + unsigned char *prop_data = NULL; + E_Zone* zone; + + ret = ecore_x_window_prop_property_get (event->win, ECORE_X_ATOM_E_ILLUME_ROTATE_ROOT_ANGLE, ECORE_X_ATOM_CARDINAL, 32, &prop_data, &count); + if( ret && prop_data ) + memcpy (&angle, prop_data, sizeof (int)); + + if (prop_data) free (prop_data); + + L (LT_ANGLE, "[ILLUME2][ANGLE] %s(%d).. ROOT ANGLE CHANGED... angle = %d\n", __func__, __LINE__, angle); + Ecore_X_Window active_win; + active_win = _policy_active_window_get(event->win); + + bd = e_border_find_by_client_window(active_win); + + if (bd) zone = bd->zone; + else zone = e_util_container_zone_number_get (0, 0); + + if (zone) + { + // send client message to all visible windows + if (g_root_angle != angle) + { + indi_bd = e_illume_border_indicator_get(zone); + if (indi_bd) + { + _policy_indicator_angle_change (indi_bd, angle); + } + + Eina_List *l; + E_Border* bd_temp; + + EINA_LIST_FOREACH(e_border_client_list(), l, bd_temp) + { + if (!bd_temp) continue; + if (!bd_temp->visible) continue; + + L (LT_ANGLE, "[ILLUME2][ANGLE] %s(%d)... win = %x.. SEND client Event with angle = %d\n", __func__, __LINE__, bd_temp->client.win, angle); + ecore_x_client_message32_send (bd_temp->client.win, ECORE_X_ATOM_E_ILLUME_ROTATE_ROOT_ANGLE, + ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, angle, g_active_win, 0, 0, 0); + } + + e_illume_util_hdmi_rotation (event->win, angle); + } + } + + g_root_angle = angle; +} + +static void _policy_property_notification_level_change (Ecore_X_Event_Window_Property *event) +{ + /* + 0. Check if border is exist or not + 1. Check if a window is notification or not + 2. Get and Set level + 3. Change Stack + */ + L (LT_NOTIFICATION, "[ILLUME2][NOTIFICATION] %s(%d)... E_ILLUME_ATOM_NOTIFICATION_LEVEL property!!! win = %x\n", __func__, __LINE__, event->win); + + E_Border* bd; + int level; + + // 0. + if (!(bd = e_border_find_by_client_window(event->win))) + { + L (LT_NOTIFICATION, "[ILLUME2][NOTIFICATION] %s(%d)... Win (%x) doesn't have border... So return..\n", __func__, __LINE__, event->win); + return; + } + + // 1. + if (!e_illume_border_is_notification (bd)) + { + L (LT_NOTIFICATION, "[ILLUME2][NOTIFICATION] %s(%d)... Win (%x) gets NOTIFICATION_LEVEL notifiy... But this is NOT notification window... IGNORE!!!!!\n", __func__, __LINE__, bd->client.win); + return; + } + + // 2. + level = _policy_border_get_notification_level (bd->client.win); + L (LT_NOTIFICATION, "[ILLUME2][NOTIFICATION] %s(%d)... Win (%x) is notification window... level = %d\n", __func__, __LINE__, bd->client.win, level); + + // 3. + _policy_border_update_notification_stack (bd, level, EINA_TRUE); + + // 4. + if (_policy_active_window_get (bd->zone->container->manager->root) == bd->client.win) + { + int show_indi; + E_Border* indi_bd; + + indi_bd = e_illume_border_indicator_get(bd->zone); + if (indi_bd) + { + show_indi = _policy_border_indicator_state_get (bd); + if (show_indi == 1) + { + L (LT_NOTIFICATION, "[ILLUME2][NOTIFICATION] %s(%d)... Notification Win:%x, Update Indicator's layer to NOTIFICATION.. level = %d\n", __func__, __LINE__, indi_bd->client.win, level); + _policy_change_indicator_layer (indi_bd, POL_NOTIFICATION_LAYER, level); + } + } + } +} + +static void _policy_property_overlay_win_change (Ecore_X_Event_Window_Property *event) +{ + int ret; + int count; + unsigned char* prop_data = NULL; + + ret = ecore_x_window_prop_property_get (event->win, E_ILLUME_ATOM_OVERAY_WINDOW, ECORE_X_ATOM_WINDOW, 32, &prop_data, &count); + if( ret && prop_data ) + memcpy (&_e_overlay_win, prop_data, sizeof (ECORE_X_ATOM_WINDOW)); + + if (prop_data) free (prop_data); + + L (LT_XWIN, "[ILLUME2][XWIN] %s(%d)... OVERAY_WINDOW:%x\n", __func__, __LINE__, _e_overlay_win); + _policy_xwin_info_delete (_e_overlay_win); +} + +static int _policy_property_window_opaque_get (Ecore_X_Window win) +{ + int ret; + int count; + int is_opaque = 0; + unsigned char* prop_data = NULL; + + ret = ecore_x_window_prop_property_get (win, E_ILLUME_ATOM_WINDOW_OPAQUE, ECORE_X_ATOM_CARDINAL, 32, &prop_data, &count); + if( ret && prop_data ) + memcpy (&is_opaque, prop_data, sizeof (ECORE_X_ATOM_CARDINAL)); + + if (prop_data) free (prop_data); + + return is_opaque; +} + +static void _policy_property_window_opaque_change (Ecore_X_Event_Window_Property *event) +{ + E_Border* bd; + E_Illume_Border_Info* bd_info; + + if (!(bd = e_border_find_by_client_window(event->win))) return; + + // get border info + bd_info = _policy_get_border_info (bd); + if (!bd_info) return; + + // set current property + bd_info->opaque = _policy_property_window_opaque_get (event->win); + + // recalculate visibility + _policy_calculate_visibility (bd_info->border->win); +} + +void +_policy_property_change(Ecore_X_Event_Window_Property *event) +{ + // printf("Property Change\n"); + + /* we are interested in state changes here */ + if (event->atom == ECORE_X_ATOM_NET_WM_STATE) + { + _policy_property_window_state_change (event); + } + else if (event->atom == ECORE_X_ATOM_E_ILLUME_INDICATOR_GEOMETRY) + { + _policy_property_indicator_geometry_change (event); + } + else if (event->atom == ECORE_X_ATOM_E_ILLUME_KEYBOARD_GEOMETRY) + { + _policy_property_keyboard_geometry_change (event); + } + else if (event->atom == ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_STATE) + { + _policy_property_virtual_keyboard_state_change (event); + } + else if (event->atom == ECORE_X_ATOM_E_ILLUME_SLIDING_WIN_GEOMETRY) + { + _policy_property_sliding_win_geometry_change (event); + } + else if (event->atom == ECORE_X_ATOM_E_ILLUME_SLIDING_WIN_STATE) + { + _policy_property_sliding_win_state_change (event); + } + else if (event->atom == ATM_ENLIGHTENMENT_SCALE) + { + _policy_property_enlightenment_scale_change (event); + } + else if (event->atom == ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE) + { + _policy_property_rotate_win_angle_change (event); + } + else if (event->atom == ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE) + { + _policy_property_indicator_state_change (event); + } + else if (event->atom == ECORE_X_ATOM_NET_ACTIVE_WINDOW) + { + _policy_property_active_win_change (event); + } + else if (event->atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE) + { + _policy_property_win_type_change (event); + } + else if (event->atom == E_ILLUME_ATOM_STACK_DISPLAY) + { + _policy_border_list_print (event->win); + } + else if (event->atom == ECORE_X_ATOM_E_ILLUME_ROTATE_ROOT_ANGLE) + { + _policy_property_rotate_root_angle_change (event); + } + else if (event->atom == E_ILLUME_ATOM_NOTIFICATION_LEVEL) + { + _policy_property_notification_level_change (event); + } + /* for visibility */ + else if (event->atom == E_ILLUME_ATOM_OVERAY_WINDOW) + { + _policy_property_overlay_win_change (event); + } + else if (event->atom == E_ILLUME_ATOM_WINDOW_OPAQUE) + { + _policy_property_window_opaque_change (event); + } +#if ILLUME_LOGGER_BUILD_ENABLE + else if (event->atom == E_ILLUME_ATOM_ILLUME_LOG) + { + _policy_property_illume_log_change (event); + } +#endif + /* enable/disable composite module - 100320 yigl */ +#ifdef COMP_MODULE_CONTROL + else if (event->atom == E_ILLUME_ATOM_COMP_MODULE_ENABLED) + { + _policy_property_composite_module_change (event); + } +#endif +} + + +void +_policy_border_list_print (Ecore_X_Window win) +{ + Eina_List* border_list; + Eina_List *l; + E_Border *bd; + E_Border* temp_bd = NULL; + int i, ret, count; + E_Illume_Print_Info info; + unsigned char* prop_data = NULL; + FILE* out; + + info.type = 0; + memset (info.file_name, 0, 256); + + ret = ecore_x_window_prop_property_get (win, E_ILLUME_ATOM_STACK_DISPLAY, ECORE_X_ATOM_CARDINAL, 32, &prop_data, &count); + if( ret && prop_data ) + memcpy (&info, prop_data, sizeof (E_Illume_Print_Info)); + + if (prop_data) free (prop_data); + + out = fopen (info.file_name, "w+"); + if (out == NULL) out = stderr; + + if ((info.type & PT_STACK) == PT_STACK) + { + border_list = e_border_client_list(); + if (border_list) + { + i = 1; + fprintf (out, "--------------------------------BORDER INFO--------------------------------------------------\n" ); + fprintf (out, " No Border ClientWin w h x y layer visible WinName\n" ); + fprintf (out, "---------------------------------------------------------------------------------------------\n" ); + + EINA_LIST_FOREACH(border_list, l, bd) + { + if (!bd) continue; + if (temp_bd == NULL) temp_bd = bd; + + fprintf (out, "%3i 0x%07x 0x%07x %4i %4i %4i %4i %5i %5i %-30s \n", + i++, bd->win, bd->client.win, bd->w, bd->h, bd->x, bd->y, bd->layer, bd->visible, bd->client.netwm.name); + } + fprintf (out, "---------------------------------------------------------------------------------------------\n" ); + } + ecore_x_flush(); + + E_Illume_Border_Info* bd_info; + if (e_border_info_list) + { + i = 1; + fprintf (out, "--------------------------------ILLUME BORDER INFO------------------------------------------------------------------\n" ); + fprintf (out, " No Border ClientWin w h x y isKBD layer level WinName\n" ); + fprintf (out, "--------------------------------------------------------------------------------------------------------------------\n" ); + + EINA_LIST_FOREACH(e_border_info_list, l, bd_info) + { + if (!bd_info) continue; + fprintf (out, "%3i 0x%07x 0x%07x %4i %4i %4i %4i %3i %5i %5i %-30s \n", + i++, bd_info->border->win, bd_info->border->client.win, bd_info->border->w, bd_info->border->h, bd_info->border->x, bd_info->border->y, + bd_info->border->client.vkbd.vkbd, bd_info->border->layer, bd_info->level, bd_info->border->client.netwm.name); + } + fprintf (out, "--------------------------------------------------------------------------------------------------------------------\n" ); + } + ecore_x_flush(); + + if (temp_bd == NULL) goto finish; + + E_Border_List *bl; + + fprintf (out, "\n\n-------------------------------- E17 STACK INFO--------------------------------------------\n" ); + fprintf (out, " No Border ClientWin w h x y layer visible WinName\n" ); + fprintf (out, "---------------------------------------------------------------------------------------------\n" ); + + i = 1; + bl = e_container_border_list_last(temp_bd->zone->container); + while ((bd = e_container_border_list_prev(bl))) + { + fprintf (out, "%3i 0x%07x 0x%07x %4i %4i %4i %4i %5i %5i %-30s \n", + i++, bd->win, bd->client.win, bd->w, bd->h, bd->x, bd->y, bd->layer, bd->visible, bd->client.netwm.name); + } + e_container_border_list_free(bl); + fprintf (out, "---------------------------------------------------------------------------------------------\n\n" ); + } + + /* for visibility */ + if ((info.type & PT_VISIBILITY) == PT_VISIBILITY) + { + Eina_Inlist* xwin_info_list; + E_Illume_XWin_Info *xwin_info; + + xwin_info_list = _e_illume_xwin_info_list; + if (xwin_info_list) + { + i = 1; + fprintf (out, "--------------------------------BORDER INFO--------------------------------------------------\n" ); + fprintf (out, " No Win w h x y depth viewable visibility is_border(Client Win)\n" ); + fprintf (out, "---------------------------------------------------------------------------------------------\n" ); + + EINA_INLIST_REVERSE_FOREACH (xwin_info_list, xwin_info) + { + if (xwin_info->bd_info) + { + if (xwin_info->bd_info->border) + { + fprintf (out, "%3i 0x%07x %4i %4i %4i %4i %5i %5i %5i yes(0x%07x)\n", + i++, xwin_info->id, xwin_info->attr.w, xwin_info->attr.h, xwin_info->attr.x, xwin_info->attr.y, xwin_info->attr.depth, xwin_info->attr.visible, xwin_info->visibility, xwin_info->bd_info->border->client.win); + } + else + { + fprintf (out, "%3i 0x%07x %4i %4i %4i %4i %5i %5i %5i no(NULL)\n", + i++, xwin_info->id, xwin_info->attr.w, xwin_info->attr.h, xwin_info->attr.x, xwin_info->attr.y, xwin_info->attr.depth, xwin_info->attr.visible, xwin_info->visibility); + } + } + else + { + fprintf (out, "%3i 0x%07x %4i %4i %4i %4i %5i %5i %5i no(NULL)\n", + i++, xwin_info->id, xwin_info->attr.w, xwin_info->attr.h, xwin_info->attr.x, xwin_info->attr.y, xwin_info->attr.depth, xwin_info->attr.visible, xwin_info->visibility); + } + } + fprintf (out, "---------------------------------------------------------------------------------------------\n" ); + } + + ecore_x_flush(); + } + +finish: + + fprintf (out, "--------------------------------GLOBAL INFO--------------------------------------------------\n" ); + fprintf (out, "g_rotated_win:%x (g_root_angle:%d)\n", g_rotated_win, g_root_angle); + fprintf (out, "g_active_win:%x (pid:%d, angle:%d)\n", g_active_win, g_active_pid, _policy_window_rotation_angle_get(g_active_win)); + fprintf (out, "---------------------------------------------------------------------------------------------\n" ); + + if (out != stderr) + { + fflush (out); + fclose (out); + } + + ecore_x_client_message32_send (ecore_x_window_root_first_get(), E_ILLUME_ATOM_STACK_DISPLAY_DONE, + ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, + 0, 0, 0, 0, 0); +} + + +static int +_policy_window_rotation_angle_get(Ecore_X_Window win) +{ + Atom type_ret = 0; + int ret, size_ret = 0; + unsigned long num_ret = 0, bytes = 0; + unsigned char *prop_ret = NULL; + Ecore_X_Display *dpy; + int angle; + + dpy = ecore_x_display_get(); + + if (!win) + win = ecore_x_window_root_first_get(); + + ret = XGetWindowProperty(dpy, win, ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE, 0, LONG_MAX, + False, ECORE_X_ATOM_CARDINAL, &type_ret, &size_ret, + &num_ret, &bytes, &prop_ret); + + if (ret == E_ERROR_CODE_SUCCESS) + { + if (prop_ret && num_ret) + angle = ((int *)prop_ret)[0]; + else + angle = 0; + } + else + { + angle = -1; + } + + if (prop_ret) XFree(prop_ret); + + return angle; +} + + +static Ecore_X_Window +_policy_active_window_get(Ecore_X_Window root) +{ + Ecore_X_Window win; + int ret; + + ret = ecore_x_window_prop_xid_get(root, + ECORE_X_ATOM_NET_ACTIVE_WINDOW, + ECORE_X_ATOM_WINDOW, + &win, 1); + + if ((ret == 1) && win) + return win; + else + return 0; +} + +static int +_policy_border_indicator_state_get(E_Border *bd) +{ + int ret; + int count; + int show = -1; + unsigned char* prop_data = NULL; + + ret = ecore_x_window_prop_property_get (bd->client.win, ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE, ECORE_X_ATOM_CARDINAL, 32, &prop_data, &count); + if( ret && prop_data ) + memcpy (&show, prop_data, sizeof (int)); + + if (prop_data) free (prop_data); + + return show; +} + +static void _policy_layout_quickpanel_rotate (E_Illume_Quickpanel* qp, int angle) +{ + E_Border* bd; + Eina_List *bd_list; + E_Illume_Quickpanel_Info *panel; + + if (!qp) return; + + int diff, temp; + + // pass 1 - resize window + EINA_LIST_FOREACH(qp->borders, bd_list, panel) + { + if (!panel) continue; + if (panel->angle == angle) continue; + + if (panel->angle > angle) diff = panel->angle - angle; + else diff = angle - panel->angle; + + bd = panel->bd; + + if (angle == 0 || angle == 180) + { + if (diff == 90 || diff == 270) + { + temp = bd->w; + ILLUME2_TRACE ("[ILLUME2-QUICKPANEL] Portrait quick panel...(%d) quick win = %x old (%d, %d) new (%d, %d)\n", __LINE__, bd->client.win, bd->w, bd->h, bd->zone->w, temp); + _policy_border_resize (bd, bd->zone->w, temp); + } + else + ILLUME2_TRACE ("[ILLUME2-QUICKPANEL] Portrait quick panel...(%d) quick win = %x.. But size is not change\n", __LINE__, bd->client.win); + } + else + { + if (diff == 90 || diff == 270) + { + temp = bd->h; + ILLUME2_TRACE ("[ILLUME2-QUICKPANEL] Landscape quick panel...(%d) quick win = %x old (%d, %d) new (%d, %d)\n", __LINE__, bd->client.win, bd->w, bd->h, temp, bd->zone->h); + _policy_border_resize (bd, temp, bd->zone->h); + } + else + ILLUME2_TRACE ("[ILLUME2-QUICKPANEL] Landscape quick panel...(%d) quick win = %x.. But size is not change\n", __LINE__, bd->client.win); + } + } + + // pass 2 - send client message + EINA_LIST_FOREACH(qp->borders, bd_list, panel) + { + if (!panel) continue; + if (panel->angle == angle) continue; + + if (panel->angle > angle) diff = panel->angle - angle; + else diff = angle - panel->angle; + + bd = panel->bd; + + ILLUME2_TRACE ("[ILLUME2-QUICKPANEL] SEND CLIENT MESSAGE TO QUICKPANEL!!!!(%d) win:%x, angle = %d\n", __LINE__, bd->client.win, angle); + ecore_x_client_message32_send (bd->client.win, ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE, + ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, + angle, 0, 0, 0, 0); + + panel->angle = angle; + } +} + +void +_policy_window_focus_in(Ecore_X_Event_Window_Focus_In *event) +{ + ILLUME2_TRACE("[ILLUME2-FOCUS] _policy_window_focus_in... win = %x\n", event->win); + + E_Border *bd; + + if (e_config->focus_policy == E_FOCUS_CLICK) return; + + if (!(bd = e_border_find_by_client_window(event->win))) return; + + if (e_illume_border_is_indicator (bd)) + { + Eina_List *ml, *cl; + E_Manager *man; + E_Container *con; + + EINA_LIST_FOREACH(e_manager_list(), ml, man) + { + if (!man) continue; + EINA_LIST_FOREACH(man->containers, cl, con) + { + E_Border_List *bl; + E_Border *temp_bd; + + // send focus to top-level window. + bl = e_container_border_list_last(con); + while ((temp_bd = e_container_border_list_prev(bl))) + { + if (temp_bd->client.icccm.accepts_focus && temp_bd->visible) + { + /* focus the border */ + e_border_focus_set(temp_bd, 1, 1); + e_container_border_list_free(bl); + return; + } + } + e_container_border_list_free(bl); + } + } + } +} + + +void _policy_border_stack_change (E_Border* bd, E_Border* sibling, int stack_mode) +{ + L (LT_STACK, "[ILLUME2][STACK] %s(%d)... win = %x, sibling = %x, stack mode = %d\n", __func__, __LINE__, bd->client.win, sibling->client.win, stack_mode); + + if (bd->layer != sibling->layer) + { + L (LT_STACK, "[ILLUME2][STACK] %s(%d)... Sibling layer is different!!! win = %x (layer = %d), sibling = %x (layer = %d)\n", __func__, __LINE__, bd->client.win, bd->layer, sibling->client.win, sibling->layer); + return; + } + + L (LT_STACK, "[ILLUME2][STACK] %s(%d)... Restack Window.. win = %x, sibling = %x, stack_mode = %d\n", __func__, __LINE__, bd->win, sibling->win, stack_mode); + if (stack_mode == E_ILLUME_STACK_ABOVE) + { + L (LT_STACK, "[ILLUME2][STACK] %s(%d)... STACK CHANGE with ABOVE... win:%x, above_win:%x\n", __func__, __LINE__, bd->client.win, sibling->client.win); + e_border_stack_above (bd, sibling); + } + else if (stack_mode == E_ILLUME_STACK_BELOW) + { + L (LT_STACK, "[ILLUME2][STACK] %s(%d)... STACK CHANGE with BELOW... win:%x, below_win:%x\n", __func__, __LINE__, bd->client.win, sibling->client.win); + e_border_stack_below (bd, sibling); + } +} + + +int _policy_atom_init (void) +{ + /* Notification Level Atom */ + E_ILLUME_ATOM_NOTIFICATION_LEVEL = ecore_x_atom_get ("_E_ILLUME_NOTIFICATION_LEVEL"); + if (!E_ILLUME_ATOM_NOTIFICATION_LEVEL) + { + fprintf (stderr, "[ILLUME2] Critical Error!!! Cannot create _E_ILLUME_NOTIFICATION_LEVEL Atom...\n"); + return 0; + } + + /* for active/deactive message */ + E_ILLUME_ATOM_ACTIVATE_WINDOW = ecore_x_atom_get ("_X_ILLUME_ACTIVATE_WINDOW"); + if (!E_ILLUME_ATOM_ACTIVATE_WINDOW) + { + fprintf (stderr, "[ILLUME2] Critical Error!!! Cannot create _X_ILLUME_ACTIVATE_WINDOW Atom...\n"); + return 0; + } + + E_ILLUME_ATOM_DEACTIVATE_WINDOW = ecore_x_atom_get ("_X_ILLUME_DEACTIVATE_WINDOW"); + if (!E_ILLUME_ATOM_DEACTIVATE_WINDOW) + { + fprintf (stderr, "[ILLUME2] Critical Error!!! Cannot create _X_ILLUME_DEACTIVATE_WINDOW Atom...\n"); + return 0; + } + + /* for visibility */ + E_ILLUME_ATOM_OVERAY_WINDOW = ecore_x_atom_get ("_E_COMP_OVERAY_WINDOW"); + if (!E_ILLUME_ATOM_OVERAY_WINDOW) + { + fprintf (stderr, "[ILLUME2] Critical Error!!! Cannot create _E_COMP_OVERAY_WINDOW Atom...\n"); + return 0; + } + + E_ILLUME_ATOM_STACK_DISPLAY = ecore_x_atom_get ("_E_ILLUME_PRINT_BORDER_WIN_STACK"); + if (!E_ILLUME_ATOM_STACK_DISPLAY) + { + fprintf (stderr, "[ILLUME2] Critical Error!!! Cannot create _E_ILLUME_PRINT_BORDER_WIN_STACK Atom...\n"); + return 0; + } + + E_ILLUME_ATOM_STACK_DISPLAY_DONE = ecore_x_atom_get ("_E_ILLUME_PRINT_BORDER_WIN_STACK_DONE"); + if (!E_ILLUME_ATOM_STACK_DISPLAY_DONE) + { + fprintf (stderr, "[ILLUME2] Critical Error!!! Cannot create _E_ILLUME_PRINT_BORDER_WIN_STACK_DONE Atom...\n"); + return 0; + } + + E_ILLUME_ATOM_WINDOW_OPAQUE = ecore_x_atom_get ("_E_ILLUME_WINDOW_REGION_OPAQUE"); + if (!E_ILLUME_ATOM_WINDOW_OPAQUE) + { + fprintf (stderr, "[ILLUME2] Critical Error!!! Cannot create _E_ILLUME_WINDOW_REGION_OPAQUE Atom...\n"); + return 0; + } + +#ifdef COMP_MODULE_CONTROL + E_ILLUME_ATOM_COMP_MODULE_ENABLED = ecore_x_atom_get ("_E_COMP_ENABLE"); + if(!E_ILLUME_ATOM_COMP_MODULE_ENABLED) + { + fprintf (stderr, "[ILLUME2] Critical Error!!! Cannot create _E_COMP_ENABLE Atom...\n"); + return 0; + } +#endif + +#if ILLUME_LOGGER_BUILD_ENABLE + E_ILLUME_ATOM_ILLUME_LOG = ecore_x_atom_get ("_E_ILLUME_LOG"); + if(!E_ILLUME_ATOM_ILLUME_LOG) + { + fprintf (stderr, "[ILLUME2] Critical Error!!! Cannot create _E_ILLUME_LOG Atom...\n"); + return 0; + } +#endif /* ILLUME_LOGGER_BUILD_ENABLE */ + + // for screen lock + E_ILLUME_ATOM_SCREEN_LOCK = ecore_x_atom_get ("_E_COMP_LOCK_SCREEN"); + if(!E_ILLUME_ATOM_SCREEN_LOCK) + { + fprintf (stderr, "[ILLUME2] Critical Error!!! Cannot create _E_COMP_LOCK_SCREEN Atom...\n"); + return 0; + } + + return 1; +} + + +int _policy_init (void) +{ + Eina_List *ml; + E_Manager *man; + + g_screen_lock_info = (E_Illume_Screen_Lock_Info*) malloc (sizeof (E_Illume_Screen_Lock_Info)); + if (!g_screen_lock_info) return 0; + + g_screen_lock_info->is_lock = 0; + g_screen_lock_info->man = NULL; + g_screen_lock_info->blocked_list = NULL; + g_screen_lock_info->lock_timer = NULL; + + /* for visibility */ + _e_illume_xwin_info_hash = eina_hash_string_superfast_new(NULL); + EINA_LIST_FOREACH(e_manager_list(), ml, man) + { + _policy_manage_xwins (man); + } + + // initialize atom + if (!_policy_atom_init()) + { + eina_hash_free (_e_illume_xwin_info_hash); + free (g_screen_lock_info); + return 0; + } + + return 1; +} + + +void _policy_fin (void) +{ + /* for visibility */ + eina_hash_free (_e_illume_xwin_info_hash); + + if (g_screen_lock_info->blocked_list) eina_list_free (g_screen_lock_info->blocked_list); + g_screen_lock_info->blocked_list = NULL; + + if (g_screen_lock_info->is_lock == 1) + { + _policy_request_screen_unlock (g_screen_lock_info->man); + + g_screen_lock_info->man = NULL; + g_screen_lock_info->is_lock = 0; + } + + free (g_screen_lock_info); +} + +static int +_policy_compare_cb_border (E_Illume_Border_Info* data1, E_Illume_Border_Info* data2) +{ + if (data1 && data2) + { + if (data1->border == data2->border) + return 0; + } + + return 1; +} + + +static E_Illume_Border_Info* +_policy_get_border_info (E_Border* bd) +{ + ILLUME2_TRACE ("[ILLUME2-NEW] %s(%d)... bd = %x, bd's client = %x\n", __func__, __LINE__, bd, bd->client.win); + E_Illume_Border_Info tmp_win; + tmp_win.border = bd; + return (E_Illume_Border_Info*) eina_list_search_unsorted ( + e_border_info_list, EINA_COMPARE_CB(_policy_compare_cb_border), &tmp_win); +} + + +static E_Illume_Border_Info* _policy_add_border_info_list (E_Border* bd) +{ + ILLUME2_TRACE ("[ILLUME2-NEW] %s(%d)... bd = %x, bd's client = %x\n", __func__, __LINE__, bd, bd->client.win); + + if (e_object_is_del(E_OBJECT(bd))) return NULL; + + E_Illume_Border_Info* bd_info = (E_Illume_Border_Info*) malloc (sizeof (E_Illume_Border_Info)); + if (!bd_info) + { + fprintf (stderr, "[ILLUME_SS] Critical Error... Fail to create memory... (%s:%d)\n", __func__, __LINE__); + return NULL; + } + bd_info->pid = bd->client.netwm.pid; + bd_info->border = bd; + + // set level + bd_info->level = 50; + + // could find bd_info of ev->stack.. there is no bd_info yet... + Eina_List *l = NULL; + E_Illume_Border_Info *temp_bd_info = NULL; + + EINA_LIST_FOREACH(e_border_info_list, l, temp_bd_info) + { + if (!temp_bd_info) continue; + if (bd_info->border->layer >= temp_bd_info->border->layer) + break; + } + + if (temp_bd_info) + { + e_border_info_list = eina_list_prepend_relative(e_border_info_list, bd_info, temp_bd_info); + L (LT_STACK, "[ILLUME2][STACK] %s(%d)... changed to [ bd(win:%x) -> other(win:%x) ]\n", __func__, __LINE__, bd->client.win, temp_bd_info->border->client.win); + } + else + { + e_border_info_list = eina_list_append (e_border_info_list, bd_info); + L (LT_STACK, "[ILLUME2][STACK] %s(%d)... changed to [ ---> bd(win:%x) ]\n", __func__, __LINE__, bd->client.win); + } + + return bd_info; +} + + +static void _policy_delete_border_info_list (E_Border* bd) +{ + ILLUME2_TRACE ("[ILLUME2-NEW] %s(%d)... bd = %x, bd's client = %x\n", __func__, __LINE__, bd, bd->client.win); + E_Illume_Border_Info* bd_info = _policy_get_border_info (bd); + + if (bd_info == NULL) + { + ILLUME2_TRACE ("[ILLUME2-NEW] %s(%d)... There is no border in the list... bd = %x, bd's client = %x\n", __func__, __LINE__, bd, bd->client.win); + return; + } + + e_border_info_list = eina_list_remove (e_border_info_list, bd_info); + L (LT_STACK, "[ILLUME2][STACK] %s(%d)... remove bd(win:%x)\n", __func__, __LINE__, bd->client.win); + free (bd_info); +} + + +static int +_policy_zone_layout_app_layer_check (E_Border* bd) +{ + Ecore_X_Window_Type *types = NULL; + int num, i, layer; + + if (!bd) return POL_APP_LAYER; + + layer = POL_APP_LAYER; + + num = ecore_x_netwm_window_types_get(bd->client.win, &types); + if (num) + { + i = 0; + for (i=0; i< num; i++) + { + if (types[i] == ECORE_X_WINDOW_TYPE_NOTIFICATION) + layer = POL_NOTIFICATION_LAYER; + } + + free (types); + } + + if (bd->client.netwm.state.stacking == E_STACKING_BELOW) + { + ILLUME2_TRACE ("[ILLUME2-NEW] %s(%d)... WIN:%x is BELOW state.. Change layer to 50\n", __func__, __LINE__, bd->client.win); + layer = POL_STATE_BELOW_LAYER; + } + else if (bd->client.netwm.state.stacking == E_STACKING_ABOVE) + { + ILLUME2_TRACE ("[ILLUME2-NEW] %s(%d)... WIN:%x is ABOVE state.. Change layer to 150\n", __func__, __LINE__, bd->client.win); + layer = POL_STATE_ABOVE_LAYER; + } + + return layer; +} + + +static void +_policy_zone_layout_app_layer_set (E_Border* bd, int new_layer) +{ + if (!bd) return; + + /* if a window sets transient_for property, it sets same layer to parent window */ + if (bd->client.icccm.transient_for != 0) + { + E_Border *bd_parent = NULL; + bd_parent = e_border_find_by_client_window (bd->client.icccm.transient_for); + if (bd_parent) + { + if (bd->layer != bd_parent->layer) + e_border_layer_set (bd, bd_parent->layer); + } + } + else + { + if (bd->layer != new_layer) + e_border_layer_set(bd, new_layer); + } +} + +static void +_policy_zone_layout_app_single_new (E_Illume_Border_Info* bd_info, E_Illume_Config_Zone *cz) +{ + E_Border* bd; + int layer; + + ILLUME2_TRACE ("[ILLUME2-NEW] %s(%d)... LAYOUT_SINGLE... bd_info's border = %x, client win = %x\n", __func__, __LINE__, bd_info->border, bd_info->border->client.win); + + bd = bd_info->border; + if (!bd) + { + fprintf (stderr, "[ILLUME2] fatal error! (%s) There is no border!\n", __func__); + return; + } + + if ((!bd->new_client) && (!bd->visible)) return; + + layer = _policy_zone_layout_app_layer_check (bd); + + /* check if user defined position */ + if (bd->client.icccm.request_pos) + { + _policy_zone_layout_app_layer_set (bd, layer); + return; + } + + /* resize if needed */ + if ((bd->w != bd->zone->w) || (bd->h != bd->zone->h)) + _policy_border_resize(bd, bd->zone->w, bd->zone->h); + + if ((bd->x != bd->zone->x) || (bd->y != bd->zone->y)) + _policy_border_move(bd, bd->zone->x, bd->zone->y); + + /* set layer if needed */ + _policy_zone_layout_app_layer_set (bd, layer); +} + + +static void +_policy_zone_layout_app_dual_top_new (E_Illume_Border_Info* bd_info, E_Illume_Config_Zone *cz) +{ + E_Border* bd; + E_Border* temp_bd; + int ny, nh; + int layer; + + ILLUME2_TRACE ("[ILLUME2-NEW] %s(%d)... LAYOUT_DUAL_TOP... bd_info's border = %x, client win = %x\n", __func__, __LINE__, bd_info->border, bd_info->border->client.win); + + bd = bd_info->border; + + if (!bd || !cz) return; + if ((!bd->new_client) && (!bd->visible)) return; + + layer = _policy_zone_layout_app_layer_check (bd); + + // check if user defined position + if (bd->client.icccm.request_pos) + { + _policy_zone_layout_app_layer_set (bd, layer); + return; + } + + /* set a default Y position */ + ny = (bd->zone->y + cz->indicator.size); + nh = ((bd->zone->h - cz->indicator.size - cz->softkey.size) / 2); + + /* see if there is a border already there. if so, check placement based on + * virtual keyboard usage */ + temp_bd = e_illume_border_at_xy_get(bd->zone, bd->zone->x, ny); + if ((temp_bd) && (temp_bd != bd)) ny = temp_bd->y + nh; + + /* resize if needed */ + if ((bd->w != bd->zone->w) || (bd->h != nh)) + _policy_border_resize(bd, bd->zone->w, nh); + + /* move to correct position (relative to zone) if needed */ + if ((bd->x != bd->zone->x) || (bd->y != ny)) + _policy_border_move(bd, bd->zone->x, ny); + + /* set layer if needed */ + _policy_zone_layout_app_layer_set (bd, layer); +} + + +static void +_policy_zone_layout_app_dual_left_new (E_Illume_Border_Info* bd_info, E_Illume_Config_Zone *cz) +{ + E_Border* bd; + E_Border* temp_bd; + int ky, kh, nx, nw; + int layer; + + ILLUME2_TRACE ("[ILLUME2-NEW] %s(%d)... LAYOUT_DUAL_LEFT... bd_info's border = %x, client win = %x\n", __func__, __LINE__, bd_info->border, bd_info->border->client.win); + + bd = bd_info->border; + + if (!bd || !cz) return; + if ((!bd->new_client) && (!bd->visible)) return; + + layer = _policy_zone_layout_app_layer_check (bd); + + // check if user defined position + if (bd->client.icccm.request_pos) + { + _policy_zone_layout_app_layer_set (bd, layer); + return; + } + + /* set some defaults */ + nx = bd->zone->x; + nw = (bd->zone->w / 2); + + ky = bd->zone->y + cz->indicator.size; + kh = bd->zone->h - cz->indicator.size - cz->softkey.size; + + /* see if there is a border already there. if so, place at right */ + temp_bd = e_illume_border_at_xy_get(bd->zone, nx, (ky + bd->zone->h / 2)); + if ((temp_bd) && (bd != temp_bd)) nx = temp_bd->x + nw; + + /* resize if needed */ + if ((bd->w != nw) || (bd->h != kh)) + _policy_border_resize(bd, nw, kh); + + /* move to correct position (relative to zone) if needed */ + if ((bd->x != nx) || (bd->y != ky)) + _policy_border_move(bd, nx, ky); + + /* set layer if needed */ + _policy_zone_layout_app_layer_set (bd, layer); +} + + +static void +_policy_zone_layout_app_dual_custom_new (E_Illume_Border_Info* bd_info, E_Illume_Config_Zone *cz) +{ + E_Border* bd; + E_Border *app; + int iy, ny, nh; + + ILLUME2_TRACE ("[ILLUME2-NEW] %s(%d)... LAYOUT_DUAL_CUSTOM... bd_info's border = %x, client win = %x\n", __func__, __LINE__, bd_info->border, bd_info->border->client.win); + + bd = bd_info->border; + if (!bd) + { + fprintf (stderr, "[ILLUME2] fatal error! (%s) There is no border!\n", __func__); + return; + } + + if ((!bd->new_client) && (!bd->visible)) return; + + /* grab indicator position */ + e_illume_border_indicator_pos_get(bd->zone, NULL, &iy); + + /* set a default position */ + ny = bd->zone->y; + nh = iy; + + app = e_illume_border_at_xy_get(bd->zone, bd->zone->x, bd->zone->y); + if (app) + { + if (bd != app) + { + ny = (iy + cz->indicator.size); + nh = ((bd->zone->y + bd->zone->h) - ny - cz->softkey.size); + } + } + + /* make sure it's the required width & height */ + if ((bd->w != bd->zone->w) || (bd->h != nh)) + _policy_border_resize(bd, bd->zone->w, nh); + + /* move to correct position (relative to zone) if needed */ + if ((bd->x != bd->zone->x) || (bd->y != ny)) + _policy_border_move(bd, bd->zone->x, ny); + + /* set layer if needed */ + if (bd->layer != POL_APP_LAYER) + e_border_layer_set(bd, POL_APP_LAYER); +} + +static int _policy_border_get_notification_level (Ecore_X_Window win) +{ + int ret; + int num; + int level = 50; + unsigned char* prop_data = NULL; + + ret = ecore_x_window_prop_property_get (win, E_ILLUME_ATOM_NOTIFICATION_LEVEL, ECORE_X_ATOM_CARDINAL, 32, &prop_data, &num); + if( ret && prop_data ) + memcpy (&level, prop_data, sizeof (int)); + + if (prop_data) free (prop_data); + + return level; +} + +static void _update_notification_stack (E_Illume_Border_Info* bd_info, int level) +{ + Eina_List* l; + E_Border* temp_bd; + E_Border* below_bd; + E_Border* upper_bd; + E_Illume_Border_Info* temp_bd_info; + E_Illume_Border_Info* below_bd_info; + E_Illume_Border_Info* upper_bd_info; + + below_bd = NULL; + upper_bd = NULL; + below_bd_info = NULL; + upper_bd_info = NULL; + + EINA_LIST_FOREACH(e_border_info_list, l, temp_bd_info) + { + if (!temp_bd_info) continue; + + temp_bd = temp_bd_info->border; + + /* skip borders not on this zone */ + if (temp_bd->layer != POL_NOTIFICATION_LAYER) continue; + if (temp_bd == bd_info->border) continue; + + if (temp_bd_info->level <= level) + { + // find below border + below_bd = temp_bd; + below_bd_info = temp_bd_info; + + L (LT_NOTIFICATION, "[ILLUME2][NOTIFICATION] %s(%d)... Stack Change!!! (Top) Win (%x) -> Sibling (%x) (Bottom)\n", __func__, __LINE__, bd_info->border->client.win, below_bd->client.win); + + _policy_border_stack_change (bd_info->border, below_bd, E_ILLUME_STACK_ABOVE); + + e_border_info_list = eina_list_remove (e_border_info_list, bd_info); + e_border_info_list = eina_list_prepend_relative (e_border_info_list, bd_info, below_bd_info); + L (LT_STACK, "[ILLUME2][STACK] %s(%d)... changed to [ bd(win:%x) -> other(win:%x) ]\n", __func__, __LINE__, bd_info->border->client.win, below_bd_info->border->client.win); + return; + } + else + { + upper_bd = temp_bd; + upper_bd_info = temp_bd_info; + } + } + + if (upper_bd_info) + { + L (LT_NOTIFICATION, "[ILLUME2][NOTIFICATION] %s(%d)... Stack Change!!! (Top) Sibling (%x) -> Win (%x) (Bottom)\n", __func__, __LINE__, upper_bd->client.win, bd_info->border->client.win); + + _policy_border_stack_change (bd_info->border, upper_bd, E_ILLUME_STACK_BELOW); + + e_border_info_list = eina_list_remove (e_border_info_list, bd_info); + e_border_info_list = eina_list_append_relative (e_border_info_list, bd_info, upper_bd_info); + L (LT_STACK, "[ILLUME2][STACK] %s(%d)... changed to [ other(win:%x) -> bd(win:%x) ]\n", __func__, __LINE__, upper_bd_info->border->client.win, bd_info->border->client.win); + } + else + { + L (LT_NOTIFICATION, "[ILLUME2][NOTIFICATION] %s(%d)... Stack Change!!! Sibling is NULL.. So no operation..\n", __func__, __LINE__); + } +} + + +/* find new focus window */ +static void +_policy_border_focus_top_stack_set (E_Border* bd) +{ + E_Border *temp_bd; + int root_w, root_h; + + root_w = bd->zone->w; + root_h = bd->zone->h; + + E_Border_List *bl; + bl = e_container_border_list_last(bd->zone->container); + while ((temp_bd = e_container_border_list_prev(bl))) + { + if (!temp_bd) continue; + if ((temp_bd->x >= root_w) || (temp_bd->y >= root_h)) continue; + if (((temp_bd->x + temp_bd->w) <= 0) || ((temp_bd->y + temp_bd->h) <= 0)) continue; + + if ((!temp_bd->iconic) && (temp_bd->visible) && (temp_bd->desk == bd->desk) && + (temp_bd->client.icccm.accepts_focus || temp_bd->client.icccm.take_focus) && + (temp_bd->client.netwm.type != ECORE_X_WINDOW_TYPE_DOCK) && + (temp_bd->client.netwm.type != ECORE_X_WINDOW_TYPE_TOOLBAR) && + (temp_bd->client.netwm.type != ECORE_X_WINDOW_TYPE_MENU) && + (temp_bd->client.netwm.type != ECORE_X_WINDOW_TYPE_SPLASH) && + (temp_bd->client.netwm.type != ECORE_X_WINDOW_TYPE_DESKTOP)) + { + if (!temp_bd->focused) + { + /* this border is the top of the latest stack */ + e_border_focus_set (temp_bd, 1, 1); + } + break; + } + } + e_container_border_list_free(bl); +} + + +static void _policy_border_update_notification_stack (E_Border* bd, int level, Eina_Bool check_focus) +{ + E_Illume_Border_Info* bd_info = NULL; + + if (!bd) return; + + bd_info = _policy_get_border_info(bd); + if (bd_info == NULL) return; + + L (LT_NOTIFICATION, "[ILLUME2][NOTIFICATION] %s(%d)... Update Stack!!! Win (%x). old level = %d new level = %d\n", __func__, __LINE__, bd->client.win, bd_info->level, level); + bd_info->level = level; + + /* + 1. find first high notification win + 2. place new win on the found win + */ + _update_notification_stack (bd_info, level); + + /* for notification level stack - consider transient_for window */ + E_Border *child; + Eina_List *l; + + if (e_config->transient.raise && e_config->transient.lower) + { + EINA_LIST_REVERSE_FOREACH(bd->transients, l, child) + { + if (!child) continue; + + /* Don't stack iconic transients. If the user wants these shown, + * thats another option. + */ + if ((!child->iconic) && (child->visible)) + { + L (LT_NOTIFICATION, "[ILLUME2][NOTIFICATION] %s(%d)... win (%x) is notification window... level = %d\n", __func__, __LINE__, child->client.win, level); + _policy_border_update_notification_stack (child, level, EINA_FALSE); + } + } + } + + if (check_focus) + { + if (e_config->focus_setting == E_FOCUS_NEW_WINDOW_IF_TOP_STACK) + _policy_border_focus_top_stack_set(bd); + } +} + + +static E_Illume_Border_Info* _policy_border_find_next_notification_border_info (E_Illume_Border_Info* bd_info) +{ + Eina_List *l; + E_Illume_Border_Info *temp_bd_info; + + if (!bd_info) return NULL; + + EINA_LIST_FOREACH(e_border_info_list, l, temp_bd_info) + { + if (!temp_bd_info) continue; + + if (temp_bd_info == bd_info) + { + l = eina_list_next(l); + if (!l) return NULL; + return eina_list_data_get(l); + } + + if (temp_bd_info->border->layer != POL_NOTIFICATION_LAYER) + return NULL; + } + + return NULL; +} + + +void _policy_border_stack (E_Event_Border_Stack *event) +{ + E_Event_Border_Stack* ev; + E_Illume_Border_Info* bd_info; + E_Illume_Border_Info* stack_bd_info; + + ev = event; + + L (LT_STACK, "[ILLUME2][STACK] %s(%d)... bd(win:%x), stack(win:%x), stack type: %d\n", __func__, __LINE__, ev->border->client.win, ev->stack ? (unsigned int)ev->stack->client.win:(unsigned int)NULL, ev->type); + + bd_info = _policy_get_border_info(ev->border); + if (bd_info == NULL) + { + bd_info = _policy_add_border_info_list (ev->border); + if (!bd_info) return; + } + + if (ev->stack) + { + stack_bd_info = _policy_get_border_info(ev->stack); + } + else + { + stack_bd_info = NULL; + } + + if (ev->type == E_STACKING_ABOVE) + { + if (ev->stack) + { + if (stack_bd_info) + { + e_border_info_list = eina_list_remove (e_border_info_list, bd_info); + e_border_info_list = eina_list_prepend_relative (e_border_info_list, bd_info, stack_bd_info); + L (LT_STACK, "[ILLUME2][STACK] %s(%d)... changed to [ bd(win:%x) -> stack(win:%x) ]\n", __func__, __LINE__, ev->border->client.win, ev->stack->client.win); + + if (ev->border->layer == POL_NOTIFICATION_LAYER) + { + E_Illume_Border_Info* next_bd_info; + + next_bd_info = _policy_border_find_next_notification_border_info (bd_info); + if (next_bd_info) + { + if (bd_info->level < next_bd_info->level) + { + L (LT_NOTIFICATION, "[ILLUME2][NOTIFICATION] %s(%d)... RESTACK... bd(win:%x) level:%d.. stack(win:%x) level:%d..\n", __func__, __LINE__, ev->border->client.win, bd_info->level, ev->stack->client.win, stack_bd_info->level); + _policy_border_stack_change (bd_info->border, next_bd_info->border, E_ILLUME_STACK_BELOW); + } + } + } + } + else + { + // could find bd_info of ev->stack.. there is no bd_info yet... + Eina_List *l = NULL; + E_Illume_Border_Info *temp_bd_info; + + EINA_LIST_FOREACH(e_border_info_list, l, temp_bd_info) + { + if (!temp_bd_info) continue; + if (bd_info->border->layer >= temp_bd_info->border->layer) + break; + } + + if (bd_info != temp_bd_info) + { + e_border_info_list = eina_list_remove (e_border_info_list, bd_info); + e_border_info_list = eina_list_prepend_relative(e_border_info_list, bd_info, temp_bd_info); + L (LT_STACK, "[ILLUME2][STACK] %s(%d)... changed to [ bd(win:%x) -> other(win:%x).. No stack(win:%x) info ]\n", __func__, __LINE__, ev->border->client.win, temp_bd_info ? (unsigned int)temp_bd_info->border->client.win:(unsigned int)NULL, ev->stack->client.win); + } + } + } + else + { + e_border_info_list = eina_list_remove (e_border_info_list, bd_info); + e_border_info_list = eina_list_append (e_border_info_list, bd_info); + L (LT_STACK, "[ILLUME2][STACK] %s(%d)... changed to [ ---> bd(win:%x) ]\n", __func__, __LINE__, ev->border->client.win); + } + } + else if (ev->type == E_STACKING_BELOW) + { + if (ev->stack) + { + if (stack_bd_info) + { + e_border_info_list = eina_list_remove (e_border_info_list, bd_info); + e_border_info_list = eina_list_append_relative (e_border_info_list, bd_info, stack_bd_info); + L (LT_STACK, "[ILLUME2][STACK] %s(%d)... changed to [ stack(win:%x) -> bd(win:%x) ]\n", __func__, __LINE__, ev->stack->client.win, ev->border->client.win); + + if (ev->border->layer == POL_NOTIFICATION_LAYER) + { + E_Illume_Border_Info* next_bd_info; + + next_bd_info = _policy_border_find_next_notification_border_info (bd_info); + if (next_bd_info) + { + if (bd_info->level < next_bd_info->level) + { + L (LT_NOTIFICATION, "[ILLUME2][NOTIFICATION] %s(%d)... RESTACK... bd(win:%x) level:%d.. stack(win:%x) level:%d..\n", __func__, __LINE__, ev->border->client.win, bd_info->level, ev->stack->client.win, stack_bd_info->level); + _policy_border_stack_change (bd_info->border, next_bd_info->border, E_ILLUME_STACK_BELOW); + } + } + } + } + else + { + // could find bd_info of ev->stack.. there is no bd_info yet... + Eina_List *l = NULL; + E_Illume_Border_Info *temp_bd_info; + + EINA_LIST_FOREACH(e_border_info_list, l, temp_bd_info) + { + if (!temp_bd_info) continue; + if (bd_info->border->layer >= temp_bd_info->border->layer) + break; + } + + if (bd_info != temp_bd_info) + { + e_border_info_list = eina_list_remove (e_border_info_list, bd_info); + e_border_info_list = eina_list_prepend_relative(e_border_info_list, bd_info, temp_bd_info); + L (LT_STACK, "[ILLUME2][STACK] %s(%d)... changed to [ bd(win:%x) -> other(win:%x).. No stack(win:%x) info ]\n", __func__, __LINE__, ev->border->client.win, temp_bd_info ? (unsigned int)temp_bd_info->border->client.win:(unsigned int)NULL, ev->stack->client.win); + } + } + } + else + { + e_border_info_list = eina_list_remove (e_border_info_list, bd_info); + e_border_info_list = eina_list_prepend (e_border_info_list, bd_info); + L (LT_STACK, "[ILLUME2][STACK] %s(%d)... changed to [ bd(win:%x) ---> ]\n", __func__, __LINE__, ev->border->client.win); + } + } + else + { + ILLUME2_TRACE ("[ILLUME2-NEW] %s(%d)... Unknown type... border (%x), win (%x), type = %d\n", __func__, __LINE__, ev->border, ev->border->client.win, ev->type); + } + + /*restack indicator when a active window stack is changed */ + if (ev->border->client.win == g_active_win) + { + E_Border* indi_bd; + indi_bd = e_illume_border_indicator_get (ev->border->zone); + if (indi_bd) + { + E_Illume_Border_Info* indi_bd_info; + indi_bd_info = _policy_get_border_info(indi_bd); + if (indi_bd_info) + { + if (indi_bd->layer == POL_NOTIFICATION_LAYER) + { + L (LT_NOTIFICATION, "[ILLUME2][NOTIFICATION] %s(%d)... Notification Win:%x, Update Indicator's layer to NOTIFICATION.. level = %d\n", __func__, __LINE__, indi_bd->client.win, indi_bd_info->level); + _policy_change_indicator_layer (indi_bd, indi_bd->layer, indi_bd_info->level); + } + } + } + } + + ev->border->changes.pos = 1; + ev->border->changed = 1; + + return; +} + + +static void _policy_change_quickpanel_layer (E_Illume_Quickpanel* qp, E_Border* indi_bd, int layer, int level) +{ + Eina_List *bd_list; + E_Illume_Quickpanel_Info *panel; + E_Illume_Border_Info* bd_info; + + if (!qp) return; + + EINA_LIST_FOREACH(qp->borders, bd_list, panel) + { + if (!panel) continue; + if (e_object_is_del(E_OBJECT(panel->bd))) continue; + + bd_info = _policy_get_border_info(panel->bd); + if (bd_info) + { + bd_info->level = level; + e_border_stack_below (panel->bd, indi_bd); + } + } + + EINA_LIST_FOREACH(qp->hidden_mini_controllers, bd_list, panel) + { + if (!panel) continue; + if (e_object_is_del(E_OBJECT(panel->bd))) continue; + + bd_info = _policy_get_border_info(panel->bd); + if (bd_info) + { + bd_info->level = level; + e_border_stack_below (panel->bd, indi_bd); + } + } + +} + +/* Recommend to use this function when targer border is viewable, activate and show indicator */ +static void _policy_change_indicator_layer (E_Border* indi_bd, int layer, int level) +{ + // the indicator's layer is changed to layer with level + E_Illume_Border_Info* indi_bd_info; + E_Illume_Quickpanel* qp; + + indi_bd_info = _policy_get_border_info(indi_bd); + if (indi_bd_info) + { + indi_bd_info->level = level; + } + + if (indi_bd->layer != layer) + e_border_layer_set(indi_bd, layer); + + L (LT_NOTIFICATION, "[ILLUME2][NOTIFICATION] %s(%d)... win (%x) is notification window... level = %d\n", __func__, __LINE__, indi_bd->client.win, level); + _policy_border_update_notification_stack (indi_bd, level, EINA_FALSE); + + if ((qp = e_illume_quickpanel_by_zone_get(indi_bd->zone))) + { + _policy_change_quickpanel_layer (qp, indi_bd, layer, level); + } +} + + +/* for visibility */ +static void +_policy_send_visibility_notify (Ecore_X_Window win, int visibility) +{ + XEvent event; + + event.type = VisibilityNotify; + event.xvisibility.display = ecore_x_display_get(); + event.xvisibility.send_event = EINA_TRUE; + event.xvisibility.state = visibility; + event.xvisibility.window = win; + + XSendEvent(event.xvisibility.display + , event.xvisibility.window + , False + , VisibilityChangeMask, &event); +} + +static void +_policy_calculate_visibility (Ecore_X_Window win) +{ + // 1. calculates window's region until the windos which is placed on the target window + // 2. set and send state of the target window's visiblity + // 3. calculate a visibility of window which is placed under the target window + // - when a fully obscured window is found. then all rest windows are fully obscured + + Ecore_X_XRegion* region; + Ecore_X_XRegion* temp_region; + Ecore_X_Rectangle rect, temp_rect; + Eina_Inlist* xwin_info_list; + E_Illume_XWin_Info* xwin_info; + Eina_Bool placed; + int is_fully_obscured; + int old_vis; + int is_opaque; + + xwin_info = NULL; + is_opaque = 0; + rect.x = 0; + rect.y = 0; + rect.width = _g_root_width; + rect.height = _g_root_height; + + L (LT_VISIBILITY, "[ILLUME2][VISIBILITY] Change win:%x... root_width:%d, root_height:%d\n", win, _g_root_width, _g_root_height); + + // create screen size's region + region = ecore_x_xregion_new(); + ecore_x_xregion_union_rect (region, region, &rect); + + xwin_info_list = _e_illume_xwin_info_list; + + // + // 1. calculates window's region until the windos which is placed on the target window + // + L (LT_VISIBILITY, "[ILLUME2][VISIBILITY] PASS-----1\n"); + if (xwin_info_list) + { + EINA_INLIST_REVERSE_FOREACH (xwin_info_list, xwin_info) + { + L (LT_VISIBILITY, "[ILLUME2][VISIBILITY] xwin_info(win:%x, (%d, %d, %d x %d)\n", xwin_info->id, xwin_info->attr.x, xwin_info->attr.y, xwin_info->attr.w, xwin_info->attr.h); + is_opaque = 0; + if (xwin_info->id == win) break; + + // skip unmapped window + if (xwin_info->attr.visible == 0) continue; + if (xwin_info->bd_info) + { + // skip unvisible border + if (xwin_info->bd_info->border && !xwin_info->bd_info->border->visible) continue; + + // check opaque + is_opaque = xwin_info->bd_info->opaque; + } + + if ((!xwin_info->argb) || + (is_opaque)) + { + temp_rect.x = xwin_info->attr.x; + temp_rect.y = xwin_info->attr.y; + temp_rect.width = xwin_info->attr.w; + temp_rect.height = xwin_info->attr.h; + + temp_region = ecore_x_xregion_new(); + ecore_x_xregion_union_rect (temp_region, temp_region, &temp_rect); + ecore_x_xregion_subtract (region, region, temp_region); + ecore_x_xregion_free (temp_region); + } + } + } + + if (xwin_info == NULL) + { + L (LT_VISIBILITY, "[ILLUME2][VISIBILITY] BAD.... current border is not in the raise_Stack...\n"); + ecore_x_xregion_free (region); + return; + } + + is_fully_obscured = 0; + + // + // 2. set and send state of the target window's visiblity + // 3. calculate a visibility of window which is placed under the target window + // - when a fully obscured window is found. then all rest windows are fully obscured + // + L (LT_VISIBILITY, "[ILLUME2][VISIBILITY] PASS-----2,3\n"); + if (xwin_info_list) + { + for (; xwin_info; xwin_info = (EINA_INLIST_GET(xwin_info)->prev ? _EINA_INLIST_CONTAINER(xwin_info, EINA_INLIST_GET(xwin_info)->prev) : NULL)) + { + is_opaque = 0; + old_vis = xwin_info->visibility; + + // skip unmapped window + if (xwin_info->attr.visible == 0) continue; + if (xwin_info->bd_info) + { + // skip unvisible border + if (xwin_info->bd_info->border && !xwin_info->bd_info->border->visible) continue; + + // check opaque + is_opaque = xwin_info->bd_info->opaque; + } + + if (is_fully_obscured) + { + L (LT_VISIBILITY, "[ILLUME2][VISIBILITY] Win:%x is FULLY OBSCURED...\n", xwin_info->id); + + /* if temp_bd's visibility is not fully obscured, then set and send event */ + xwin_info->visibility = E_ILLUME_VISIBILITY_FULLY_OBSCURED; + + if (old_vis != xwin_info->visibility) + { + // send event + if (xwin_info->bd_info && xwin_info->bd_info->border) + { + L (LT_VISIBILITY, "[ILLUME2][VISIBILITY] SEND VISIBILITY NOTIFY (Line:%d)... win:%x (old:%d -> new:%d)\n", __LINE__, xwin_info->bd_info->border->client.win, old_vis, xwin_info->visibility); + _policy_send_visibility_notify (xwin_info->bd_info->border->client.win, xwin_info->visibility); + } + } + + continue; + } + + temp_rect.x = xwin_info->attr.x; + temp_rect.y = xwin_info->attr.y; + temp_rect.width = xwin_info->attr.w; + temp_rect.height = xwin_info->attr.h; + + L (LT_VISIBILITY, "[ILLUME2][VISIBILITY] xwin_info(win:%x, (%d, %d, %d x %d)\n", xwin_info->id, xwin_info->attr.x, xwin_info->attr.y, xwin_info->attr.w, xwin_info->attr.h); + placed = ecore_x_xregion_rect_contain (region, &temp_rect); + if (placed == EINA_TRUE) + { + // Unobscured or partially obscured + L (LT_VISIBILITY, "[ILLUME2][VISIBILITY] Win:%x is UN-OBSCURED...\n", xwin_info->id); + xwin_info->visibility = E_ILLUME_VISIBILITY_UNOBSCURED; + } + else + { + // Fully obscured + L (LT_VISIBILITY, "[ILLUME2][VISIBILITY] Win:%x is Fully OBSCURED...\n", xwin_info->id); + xwin_info->visibility = E_ILLUME_VISIBILITY_FULLY_OBSCURED; + } + + if (old_vis != xwin_info->visibility) + { + // send event + if (xwin_info->bd_info && xwin_info->bd_info->border) + { + L (LT_VISIBILITY, "[ILLUME2][VISIBILITY] SEND VISIBILITY NOTIFY (Line:%d)... win:%x (old:%d -> new:%d)\n", __LINE__, xwin_info->bd_info->border->client.win, old_vis, xwin_info->visibility); + _policy_send_visibility_notify (xwin_info->bd_info->border->client.win, xwin_info->visibility); + + if (xwin_info->visibility == E_ILLUME_VISIBILITY_UNOBSCURED) + { + L (LT_ANGLE, "[ILLUME2][ANGLE] %s(%d).. CALL _policy_change_root_angle_by_border_angle!!! win:%x\n", __func__, __LINE__, xwin_info->bd_info->border->client.win); + _policy_change_root_angle_by_border_angle (xwin_info->bd_info->border); + } + } + } + + if ((!xwin_info->argb) || + (is_opaque)) + { + temp_region = ecore_x_xregion_new(); + ecore_x_xregion_union_rect (temp_region, temp_region, &temp_rect); + ecore_x_xregion_subtract (region, region, temp_region); + ecore_x_xregion_free (temp_region); + + if (ecore_x_xregion_is_empty (region) == EINA_TRUE) + { + L (LT_VISIBILITY, "[ILLUME2][VISIBILITY] region is empty... Rest Windows are FULLY OBSCURED...\n"); + is_fully_obscured = 1; + } + } + } + } + + ecore_x_xregion_free (region); +} + + +static E_Illume_XWin_Info* +_policy_xwin_info_find (Ecore_X_Window win) +{ + return eina_hash_find(_e_illume_xwin_info_hash, e_util_winid_str_get(win)); +} + + +static void +_policy_manage_xwins (E_Manager* man) +{ + Ecore_X_Window *windows; + int wnum; + int i; + + windows = ecore_x_window_children_get(man->root, &wnum); + if (windows) + { + for (i = 0; i < wnum; i++) + _policy_xwin_info_add(windows[i]); + + free(windows); + } + + ecore_x_window_size_get (man->root, &_g_root_width, &_g_root_height); +} + + +static Eina_Bool +_policy_xwin_info_add (Ecore_X_Window win) +{ + E_Border* bd; + + if (win == _e_overlay_win) return EINA_FALSE; + + E_Illume_XWin_Info* xwin_info = _policy_xwin_info_find (win); + if (xwin_info) + { + L (LT_XWIN, "[ILLUME2][XWIN] %s(%d).. win:%x EXIST in the list...\n", __func__, __LINE__, win); + return EINA_FALSE; + } + + xwin_info = (E_Illume_XWin_Info*) malloc (sizeof (E_Illume_XWin_Info)); + if (!xwin_info) + { + L (LT_XWIN, "[ILLUME2][XWIN] (%s:%d).. Critical Error... Fail to create memory... \n", __func__, __LINE__); + return EINA_FALSE; + } + + xwin_info->id = win; + xwin_info->visibility = E_ILLUME_VISIBILITY_FULLY_OBSCURED; + + if (!ecore_x_window_attributes_get(win, &xwin_info->attr)) + { + free (xwin_info); + return EINA_FALSE; + } + + bd = e_border_find_by_window (win); + xwin_info->bd_info = _policy_get_border_info(bd); + xwin_info->argb = ecore_x_window_argb_get (win); + + eina_hash_add(_e_illume_xwin_info_hash, e_util_winid_str_get(xwin_info->id), xwin_info); + _e_illume_xwin_info_list = eina_inlist_append(_e_illume_xwin_info_list, EINA_INLIST_GET(xwin_info)); + + return EINA_TRUE; +} + + +static Eina_Bool +_policy_xwin_info_delete (Ecore_X_Window win) +{ + E_Illume_XWin_Info* xwin_info = _policy_xwin_info_find (win); + if (xwin_info == NULL) + { + L (LT_XWIN, "[ILLUME2][XWIN] %s(%d).. No win:%x in the list...\n", __func__, __LINE__, win); + return EINA_FALSE; + } + + _e_illume_xwin_info_list = eina_inlist_remove(_e_illume_xwin_info_list, EINA_INLIST_GET(xwin_info)); + eina_hash_del(_e_illume_xwin_info_hash, e_util_winid_str_get(xwin_info->id), xwin_info); + + free (xwin_info); + + return EINA_TRUE; +} + + +void _policy_window_create (Ecore_X_Event_Window_Create *event) +{ + L (LT_XWIN, "[ILLUME2][XWIN] %s(%d).. win:%x...\n", __func__, __LINE__, event->win); + + _policy_xwin_info_add (event->win); +} + + +void _policy_window_destroy (Ecore_X_Event_Window_Destroy *event) +{ + L (LT_XWIN, "[ILLUME2][XWIN] %s(%d).. win:%x...\n", __func__, __LINE__, event->win); + + _policy_xwin_info_delete (event->win); +} + + +void _policy_window_reparent (Ecore_X_Event_Window_Reparent *event) +{ + L (LT_XWIN, "[ILLUME2][XWIN] %s(%d).. win:%x...\n", __func__, __LINE__, event->win); + + if (event->parent == ecore_x_window_root_first_get()) + _policy_xwin_info_add (event->win); + else + _policy_xwin_info_delete (event->win); +} + + +void _policy_window_show (Ecore_X_Event_Window_Show *event) +{ + L (LT_XWIN, "[ILLUME2][XWIN] %s(%d).. win:%x...\n", __func__, __LINE__, event->win); + + E_Illume_XWin_Info* xwin_info = _policy_xwin_info_find (event->win); + if (xwin_info == NULL) + { + L (LT_XWIN, "[ILLUME2][XWIN] %s(%d).. No win:%x in the list...\n", __func__, __LINE__, event->win); + return ; + } + + xwin_info->attr.visible = 1; + + _policy_calculate_visibility (event->win); +} + + +void _policy_window_hide (Ecore_X_Event_Window_Hide *event) +{ + L (LT_XWIN, "[ILLUME2][XWIN] %s(%d).. win:%x...\n", __func__, __LINE__, event->win); + + E_Illume_XWin_Info* xwin_info = _policy_xwin_info_find (event->win); + if (xwin_info == NULL) + { + L (LT_XWIN, "[ILLUME2][XWIN] %s(%d).. No win:%x in the list...\n", __func__, __LINE__, event->win); + return; + } + + xwin_info->attr.visible = 0; + + _policy_calculate_visibility (event->win); +} + + +void _policy_window_configure (Ecore_X_Event_Window_Configure *event) +{ + Eina_Inlist* l; + E_Illume_XWin_Info* xwin_info; + E_Illume_XWin_Info* old_above_xwin_info; + E_Illume_XWin_Info* new_above_xwin_info; + E_Illume_XWin_Info* temp_xwin_info; + int check_visibility; + Ecore_X_Window target_win; + + L (LT_XWIN, "[ILLUME2][XWIN] %s(%d).. win:%x...\n", __func__, __LINE__, event->win); + + xwin_info = NULL; + old_above_xwin_info = NULL; + new_above_xwin_info = NULL; + check_visibility = 0; + target_win = event->win; + + xwin_info = _policy_xwin_info_find (event->win); + if (xwin_info == NULL) + { + L (LT_XWIN, "[ILLUME2][XWIN] %s(%d).. No win:%x in the list...\n", __func__, __LINE__, event->win); + return; + } + + if ((xwin_info->attr.x != event->x) || + (xwin_info->attr.y != event->y) || + (xwin_info->attr.w != event->w) || + (xwin_info->attr.h != event->h)) + check_visibility = 1; + + xwin_info->attr.x = event->x; + xwin_info->attr.y = event->y; + xwin_info->attr.w = event->w; + xwin_info->attr.h = event->h; + + if ((l = EINA_INLIST_GET(xwin_info)->prev) != NULL) + { + old_above_xwin_info = EINA_INLIST_CONTAINER_GET (l, E_Illume_XWin_Info); + } + + new_above_xwin_info = _policy_xwin_info_find (event->abovewin); + + if (old_above_xwin_info != new_above_xwin_info) + { + // find target win + if (old_above_xwin_info) + { + temp_xwin_info = old_above_xwin_info; + for (; temp_xwin_info; temp_xwin_info = (EINA_INLIST_GET(temp_xwin_info)->prev ? _EINA_INLIST_CONTAINER(temp_xwin_info, EINA_INLIST_GET(temp_xwin_info)->prev) : NULL)) + { + if (temp_xwin_info == new_above_xwin_info) + { + target_win = old_above_xwin_info->id; + break; + } + } + } + check_visibility = 1; + } + + _e_illume_xwin_info_list = eina_inlist_remove (_e_illume_xwin_info_list, EINA_INLIST_GET(xwin_info)); + if (new_above_xwin_info) + _e_illume_xwin_info_list = eina_inlist_append_relative (_e_illume_xwin_info_list, EINA_INLIST_GET(xwin_info), EINA_INLIST_GET(new_above_xwin_info)); + else + _e_illume_xwin_info_list = eina_inlist_prepend (_e_illume_xwin_info_list, EINA_INLIST_GET(xwin_info)); + + if (check_visibility == 1) + _policy_calculate_visibility (target_win); +} + + +void _policy_window_configure_request (Ecore_X_Event_Window_Configure_Request *event) +{ + E_Border *bd; + Ecore_X_Event_Window_Configure_Request *e; + + e = event; + bd = e_border_find_by_client_window(e->win); + if (!bd) return; + + if (!bd->lock_client_stacking) + { + if ((e->value_mask & ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE) && + (e->value_mask & ECORE_X_WINDOW_CONFIGURE_MASK_SIBLING)) + { + if (bd->layer == POL_NOTIFICATION_LAYER) + { + E_Illume_Border_Info* bd_info; + bd_info = _policy_get_border_info(bd); + if (bd_info) + { + L (LT_NOTIFICATION, "[ILLUME2][NOTIFICATION] %s(%d)... Win (%x) is notification layer... level = %d\n", __func__, __LINE__, bd->client.win, bd_info->level); + _policy_border_update_notification_stack (bd, bd_info->level, EINA_TRUE); + } + } + + if (e_config->focus_setting == E_FOCUS_NEW_WINDOW_IF_TOP_STACK) + { + if (bd->visible && (bd->client.icccm.accepts_focus || bd->client.icccm.take_focus)) + _policy_border_focus_top_stack_set (bd); + } + } + else if (e->value_mask & ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE) + { + if (bd->layer == POL_NOTIFICATION_LAYER) + { + E_Illume_Border_Info* bd_info; + bd_info = _policy_get_border_info(bd); + if (bd_info) + { + L (LT_NOTIFICATION, "[ILLUME2][NOTIFICATION] %s(%d)... Win (%x) is notification layer... level = %d\n", __func__, __LINE__, bd->client.win, bd_info->level); + _policy_border_update_notification_stack (bd, bd_info->level, EINA_TRUE); + } + } + + if (e_config->focus_setting == E_FOCUS_NEW_WINDOW_IF_TOP_STACK) + { + if (bd->visible && (bd->client.icccm.accepts_focus || bd->client.icccm.take_focus)) + _policy_border_focus_top_stack_set(bd); + } + } + } +} + + +#if ILLUME_LOGGER_BUILD_ENABLE +static Eina_Bool +_policy_property_illume_log_change (Ecore_X_Event_Window_Property *ev) +{ + int ret, count; + unsigned int info_type; + unsigned char* prop_data = NULL; + + info_type = 0; + ret = ecore_x_window_prop_property_get (ev->win, E_ILLUME_ATOM_ILLUME_LOG, ECORE_X_ATOM_CARDINAL, 32, &prop_data, &count); + if( ret && prop_data ) + { + fprintf(stdout, "[E17-ILLUME2] %s(%d) _illume_logger_type: ", __func__, __LINE__); + + if (_illume_logger_type == LT_NOTHING) fprintf (stdout, "LT_NOTHING "); + else if (_illume_logger_type == LT_ALL) fprintf (stdout, "LT_ALL " ); + else + { + if ((_illume_logger_type & LT_STACK) == LT_STACK) fprintf (stdout, "LT_STACK, "); + if ((_illume_logger_type & LT_NOTIFICATION) == LT_NOTIFICATION) fprintf (stdout, "LT_NOTIFICATION, "); + if ((_illume_logger_type & LT_NOTIFICATION_LEVEL) == LT_NOTIFICATION_LEVEL) fprintf (stdout, "LT_NOTIFICATION_LEVEL, "); + if ((_illume_logger_type & LT_VISIBILITY) == LT_VISIBILITY) fprintf (stdout, "LT_VISIBILITY, "); + if ((_illume_logger_type & LT_LOCK_SCREEN) == LT_LOCK_SCREEN) fprintf (stdout, "LT_LOCK_SCREEN, "); + if ((_illume_logger_type & LT_ANGLE) == LT_ANGLE) fprintf (stdout, "LT_ANGLE, "); + } + + fprintf(stdout, "-> "); + + memcpy (&_illume_logger_type, prop_data, sizeof(unsigned int)); + + if (_illume_logger_type == LT_NOTHING ) fprintf (stdout, "LT_NOTHING\n"); + else if (_illume_logger_type == LT_ALL ) fprintf (stdout, "LT_ALL\n" ); + else + { + if ((_illume_logger_type & LT_STACK) == LT_STACK) fprintf (stdout, "LT_STACK, "); + if ((_illume_logger_type & LT_NOTIFICATION) == LT_NOTIFICATION) fprintf (stdout, "LT_NOTIFICATION, "); + if ((_illume_logger_type & LT_NOTIFICATION_LEVEL) == LT_NOTIFICATION_LEVEL) fprintf (stdout, "LT_NOTIFICATION_LEVEL, "); + if ((_illume_logger_type & LT_VISIBILITY) == LT_VISIBILITY) fprintf (stdout, "LT_VISIBILITY, "); + if ((_illume_logger_type & LT_LOCK_SCREEN) == LT_LOCK_SCREEN) fprintf (stdout, "LT_LOCK_SCREEN, "); + if ((_illume_logger_type & LT_ANGLE) == LT_ANGLE) fprintf (stdout, "LT_ANGLE, "); + + fprintf (stdout, "\n"); + } + } + + if (prop_data) free (prop_data); + + return EINA_TRUE; +} +#endif /* ILLUME_LOGGER_BUILD_ENABLE */ + + +void _policy_window_sync_draw_done (Ecore_X_Event_Client_Message* event) +{ + E_Border* bd; + + if (g_screen_lock_info->is_lock) + { + if (!(bd = e_border_find_by_client_window(event->win))) return; + + _policy_border_remove_block_list (bd); + } +} + + +void _policy_quickpanel_state_change (Ecore_X_Event_Client_Message* event) +{ + E_Zone* zone; + E_Illume_Quickpanel *qp; + + if ((zone = e_util_zone_window_find(event->win))) + { + if ((qp = e_illume_quickpanel_by_zone_get(zone))) + { + if (event->data.l[0] == (int)ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ON) + { + _policy_layout_quickpanel_rotate (qp, g_root_angle); + } + } + } +} + + +static Eina_Bool _policy_screen_lock_timeout (void *data) +{ + L (LT_LOCK_SCREEN, "[ILLUME2][LOCK] %s(%d)... LOCK SCREEN TIME-OUT!!!\n", __func__, __LINE__); + E_Manager* man = (E_Manager*)data; + + if (g_screen_lock_info->blocked_list) eina_list_free (g_screen_lock_info->blocked_list); + g_screen_lock_info->blocked_list = NULL; + + if (g_screen_lock_info->is_lock == 1) + { + _policy_request_screen_unlock (man); + + g_screen_lock_info->man = NULL; + g_screen_lock_info->is_lock = 0; + } + + return ECORE_CALLBACK_CANCEL; +} + + +static void _policy_request_screen_lock (E_Manager* man) +{ + L (LT_LOCK_SCREEN, "[ILLUME2][LOCK] %s(%d)... LOCK SCREEN!!! manager:%p\n", __func__, __LINE__, man); + if (!man) return; + + if (!g_screen_lock_info->lock_timer) + { + g_screen_lock_info->lock_timer = ecore_timer_add (SCREEN_LOCK_TIMEOUT, + _policy_screen_lock_timeout, + man); + } + + if (man->comp && man->comp->func.screen_lock) + man->comp->func.screen_lock (man->comp->data, man); +} + + +static void _policy_request_screen_unlock (E_Manager* man) +{ + L (LT_LOCK_SCREEN, "[ILLUME2][LOCK] %s(%d)... UN-LOCK SCREEN!!! manager:%p\n", __func__, __LINE__, man); + int is_lock; + + if (g_screen_lock_info->lock_timer) + { + ecore_timer_del (g_screen_lock_info->lock_timer); + g_screen_lock_info->lock_timer = NULL; + } + + is_lock = 0; + ecore_x_client_message32_send (man->root, E_ILLUME_ATOM_SCREEN_LOCK, ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, is_lock, 0, 0, 0, 0); + + /* Above code could be replaced with following code later + if (!man) return; + + if (man->comp && man->comp->func.screen_unlock) + man->comp->func.screen_unlock (man->comp->data, man); + */ + +} + + +static void _policy_border_add_block_list (E_Border* bd) +{ + if (!bd) return; + + if (g_screen_lock_info->is_lock == 0) + { + g_screen_lock_info->is_lock = 1; + g_screen_lock_info->man = bd->zone->container->manager; + + _policy_request_screen_lock (g_screen_lock_info->man); + } + + if (bd->zone->container->manager != g_screen_lock_info->man) return; + + L (LT_LOCK_SCREEN, "[ILLUME2][LOCK] %s(%d)... ADD to the block list. Win:%x\n", __func__, __LINE__, bd->client.win); + g_screen_lock_info->blocked_list = eina_list_append (g_screen_lock_info->blocked_list, bd); + +} + + +static void _policy_border_remove_block_list (E_Border* bd) +{ + if (!bd) return; + + if (bd->zone->container->manager != g_screen_lock_info->man) return; + + L (LT_LOCK_SCREEN, "[ILLUME2][LOCK] %s(%d)... REMOVE from the block list. Win:%x\n", __func__, __LINE__, bd->client.win); + g_screen_lock_info->blocked_list = eina_list_remove (g_screen_lock_info->blocked_list, bd); + + if (g_screen_lock_info->blocked_list == NULL) + { + _policy_request_screen_unlock (g_screen_lock_info->man); + + g_screen_lock_info->man = NULL; + g_screen_lock_info->is_lock = 0; + } +} + +static E_Illume_XWin_Info* +_policy_find_next_visible_window (E_Illume_XWin_Info* xwin_info) +{ + E_Illume_XWin_Info* next_xwin_info = NULL; + E_Border* temp_bd; + int root_w, root_h; + + root_w = xwin_info->bd_info->border->zone->w; + root_h = xwin_info->bd_info->border->zone->h; + + next_xwin_info = EINA_INLIST_GET(xwin_info)->prev ? _EINA_INLIST_CONTAINER(xwin_info, EINA_INLIST_GET(xwin_info)->prev) : NULL; + + for (; next_xwin_info; next_xwin_info = (EINA_INLIST_GET(next_xwin_info)->prev ? _EINA_INLIST_CONTAINER(next_xwin_info, EINA_INLIST_GET(next_xwin_info)->prev) : NULL)) + { + // skip non-border window + if (!next_xwin_info->bd_info) continue; + if (!next_xwin_info->bd_info->border) continue; + + temp_bd = next_xwin_info->bd_info->border; + + if ((temp_bd->x >= root_w) || (temp_bd->y >= root_h)) continue; + if (((temp_bd->x + temp_bd->w) <= 0) || ((temp_bd->y + temp_bd->h) <= 0)) continue; + if ((temp_bd->iconic) || (!temp_bd->visible)) continue; + + if (e_illume_border_is_indicator(temp_bd)) continue; + if (e_illume_border_is_keyboard(temp_bd)) continue; + if (e_illume_border_is_quickpanel(temp_bd)) continue; + + break; + } + + return next_xwin_info; +} + +static void +_policy_root_angle_set (Ecore_X_Window root, Ecore_X_Window win) +{ + int angle; + + if(win) + { + angle = _policy_window_rotation_angle_get(win); + if(angle == -1) return; + } + else + angle = g_root_angle; + L (LT_ANGLE, "[ILLUME2][ANGLE] %s(%d).. old_win:%x -> new_win:%x, old angle:%d -> new_angle:%d\n", __func__, __LINE__, g_rotated_win, win, g_root_angle, angle); + + g_rotated_win = win; + + L (LT_ANGLE, "[ILLUME2][ANGLE] %s(%d).. SET ROOT ANGLE... angle:%d\n\n", __func__, __LINE__, angle); + // set root window property + ecore_x_window_prop_property_set (root, ECORE_X_ATOM_E_ILLUME_ROTATE_ROOT_ANGLE, ECORE_X_ATOM_CARDINAL, 32, &angle, 1); + } + +static void +_policy_change_root_angle_by_border_angle (E_Border* bd) +{ + L (LT_ANGLE, "[ILLUME2][ANGLE] %s(%d)... win:%x\n", __func__, __LINE__, bd ? (unsigned int)bd->client.win:(unsigned int)NULL); + if (!bd) return; + + // ignore the angle of special borders - like indicator, keyboard, quickpanel, etc. + if (e_illume_border_is_indicator(bd)) return; + if (e_illume_border_is_keyboard(bd)) return; + if (e_illume_border_is_quickpanel(bd)) return; + + L (LT_ANGLE, "[ILLUME2][ANGLE] %s(%d)... CALL _policy_root_angle_set.. win:%x\n", __func__, __LINE__, bd->client.win); + _policy_root_angle_set (bd->zone->container->manager->root, bd->client.win); +} + +static void +_policy_indicator_angle_change (E_Border* indi_bd, int angle) +{ + L (LT_ANGLE, "[ILLUME2][ANGLE] %s(%d)... indicator:%x\n", __func__, __LINE__, indi_bd ? (unsigned int)indi_bd->client.win:(unsigned int)NULL); + if (!indi_bd) return; + + int old_angle = _policy_window_rotation_angle_get (indi_bd->client.win); + if(old_angle == -1) return; + + L (LT_ANGLE, "[ILLUME2][ANGLE] %s(%d)... old_angle:%d, new_angle:%d\n", __func__, __LINE__, old_angle, angle); + if (old_angle != angle) + { + int angles[2]; + angles[0] = angle; + angles[1] = old_angle; + ecore_x_window_prop_property_set(indi_bd->client.win, + ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE, + ECORE_X_ATOM_CARDINAL, + 32, + &angles, + 2); + + ecore_x_client_message32_send (indi_bd->client.win, ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE, + ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, + angle, 0, 0, 0, 0); + + E_Illume_Quickpanel *qp; + qp = e_illume_quickpanel_by_zone_get (indi_bd->zone); + if (qp) + { + if (qp->visible) + _policy_layout_quickpanel_rotate (qp, angle); + } + } +} + diff --git a/illume2-slp/src/policies/illume/policy.h b/illume2-slp/src/policies/illume/policy.h new file mode 100644 index 0000000..782174c --- /dev/null +++ b/illume2-slp/src/policies/illume/policy.h @@ -0,0 +1,123 @@ +#ifndef _POLICY_H +# define _POLICY_H + +/* define layer values here so we don't have to grep through code to change */ +/* layer level 5 (201~) */ +# define POL_NOTIFICATION_LAYER 240 +# define POL_INDICATOR_LAYER 240 + +/* layer level 4 (151~200) */ +# define POL_QUICKPANEL_LAYER 160 + +/* layer level 3 (101~150) */ +# define POL_STATE_ABOVE_LAYER 150 +# define POL_ACTIVATE_LAYER 145 +# define POL_FULLSCREEN_LAYER 140 +# define POL_DIALOG_LAYER 120 +# define POL_SPLASH_LAYER 120 +# define POL_SOFTKEY_LAYER 110 + +/* layer level 2 (51~100) */ +# define POL_SLIDING_WIN_LAYER 100 +# define POL_KEYBOARD_LAYER 100 +# define POL_CONFORMANT_LAYER 100 +# define POL_APP_LAYER 100 +# define POL_HOME_LAYER 90 + +/* layer level 1 (1~50) */ +# define POL_STATE_BELOW_LAYER 50 + +typedef struct _E_Illume_Border_Info E_Illume_Border_Info; +typedef struct _E_Illume_Screen_Lock_Info E_Illume_Screen_Lock_Info; +typedef struct _E_Illume_XWin_Info E_Illume_XWin_Info; + +/* for stack change */ +typedef enum _E_Illume_Stack_Mode +{ + E_ILLUME_STACK_ABOVE = 0, + E_ILLUME_STACK_BELOW = 1, + E_ILLUME_STACK_TOPIF = 2, + E_ILLUME_STACK_BOTTOMIF = 3, + E_ILLUME_STACK_OPPOSITE = 4, +} E_Illume_Stack_Mode; + +/* for visibility state */ +typedef enum _E_Illume_Visibility_State +{ + E_ILLUME_VISIBILITY_UNOBSCURED = 0, // VisibilityUnobscured + E_ILLUME_VISIBILITY_PARTIALLY_OBSCURED = 1, // VisibilityPartiallyObscured + E_ILLUME_VISIBILITY_FULLY_OBSCURED = 2, // VisibilityFullyObscured +} E_Illume_Visibility_State; + +/* for border information */ +struct _E_Illume_Border_Info +{ + int pid; + int level; + int opaque; + E_Border* border; +}; + +/* for screen lock */ +struct _E_Illume_Screen_Lock_Info +{ + int is_lock; + E_Manager* man; + Eina_List* blocked_list; + Ecore_Timer* lock_timer; +}; + +/* for visibility */ +struct _E_Illume_XWin_Info +{ + EINA_INLIST; + + Ecore_X_Window id; + Ecore_X_Window_Attributes attr; + int argb; + int visibility; + E_Illume_Border_Info* bd_info; +}; + +void _policy_border_add(E_Border *bd); +void _policy_border_del(E_Border *bd); +void _policy_border_focus_in(E_Border *bd); +void _policy_border_focus_out(E_Border *bd); +void _policy_border_activate(E_Border *bd); +void _policy_border_post_fetch(E_Border *bd); +void _policy_border_post_assign(E_Border *bd); +void _policy_border_show(E_Border *bd); +void _policy_zone_layout(E_Zone *zone); +void _policy_zone_move_resize(E_Zone *zone); +void _policy_zone_mode_change(E_Zone *zone, Ecore_X_Atom mode); +void _policy_zone_close(E_Zone *zone); +void _policy_drag_start(E_Border *bd); +void _policy_drag_end(E_Border *bd); +void _policy_focus_back(E_Zone *zone); +void _policy_focus_forward(E_Zone *zone); +void _policy_property_change(Ecore_X_Event_Window_Property *event); + +void _policy_window_focus_in(Ecore_X_Event_Window_Focus_In *event); + +void _policy_border_stack_change (E_Border* bd, E_Border* sibling, int stack_mode); +void _policy_border_stack (E_Event_Border_Stack *ev); + +void _policy_border_post_new_border(E_Border *bd); +void _policy_border_pre_fetch(E_Border *bd); + +void _policy_window_configure_request (Ecore_X_Event_Window_Configure_Request *event); + +int _policy_init (void); +void _policy_fin (void); + +/* for visibility */ +void _policy_window_create (Ecore_X_Event_Window_Create *event); +void _policy_window_destroy (Ecore_X_Event_Window_Destroy *event); +void _policy_window_reparent (Ecore_X_Event_Window_Reparent *event); +void _policy_window_show (Ecore_X_Event_Window_Show *event); +void _policy_window_hide (Ecore_X_Event_Window_Hide *event); +void _policy_window_configure (Ecore_X_Event_Window_Configure *event); + +void _policy_window_sync_draw_done (Ecore_X_Event_Client_Message* event); +void _policy_quickpanel_state_change (Ecore_X_Event_Client_Message* event); +#endif diff --git a/illume2-slp/src/policies/illume/policy_util.c b/illume2-slp/src/policies/illume/policy_util.c new file mode 100644 index 0000000..0887db3 --- /dev/null +++ b/illume2-slp/src/policies/illume/policy_util.c @@ -0,0 +1,103 @@ +#include "e_illume_private.h" +#include "policy_util.h" + +/* for malloc trim and stack trim */ +#include +#include +#include +#include + +#define GETSP() ({ unsigned int sp; asm volatile ("mov %0,sp " : "=r"(sp) ); sp;}) +#define BUF_SIZE 256 +#define PAGE_SIZE (1 << 12) +#define _ALIGN_UP(addr,size) (((addr)+((size)-1))&(~((size)-1))) +#define _ALIGN_DOWN(addr,size) ((addr)&(~((size)-1))) +#define PAGE_ALIGN(addr) _ALIGN_DOWN(addr, PAGE_SIZE) + + +/* for HDMI rotation */ +#include +#include +#include + +#define HDMI_DEV_NODE "/dev/video14" +#define HDMI_BUF_SIZE 128 + +static int _e_illume_util_marshalize_string (char* buf, int num, char* srcs[]); + +static Ecore_X_Atom _atom_hdmi = 0; + + +/* for malloc trim and stack trim */ +void e_illume_util_mem_trim (void) +{ + malloc_trim(0); +} + + +/* for HDMI rotation */ +void e_illume_util_hdmi_rotation (Ecore_X_Window root, int angle) +{ + Ecore_X_Display *dpy; + RROutput output; + char hdmi_commands[HDMI_BUF_SIZE]; + char buf[5]; + int buf_len; + int i; + char* x_control[] = {"illume2", "rotation", buf, NULL }; + + if (access(HDMI_DEV_NODE, F_OK) == 0) + { + if (!_atom_hdmi) + _atom_hdmi = ecore_x_atom_get ("X_RR_PROPERTY_REMOTE_CONTROLLER"); + + if(!_atom_hdmi) + { + fprintf (stderr, "[ILLUME2] Critical Error!!! Cannot create X_RR_PROPERTY_REMOTE_CONTROLLER Atom...\n"); + return; + } + + dpy = ecore_x_display_get(); + + memset (hdmi_commands, 0, sizeof(hdmi_commands)); + memset (buf, 0, sizeof(buf)); + + output = 0; + XRRScreenResources* res = XRRGetScreenResources (dpy, root); + if (res && (res->noutput != 0)) + { + for (i=0; inoutput; i++) + { + output = res->outputs[i]; + } + + snprintf (buf, sizeof(buf)-1, "%d", angle); + buf_len = _e_illume_util_marshalize_string (hdmi_commands, 3, x_control); + + XRRChangeOutputProperty(dpy, output, _atom_hdmi, XA_CARDINAL, 8, PropModeReplace, (unsigned char *)hdmi_commands, buf_len); + } + else + { + printf("[ILLUME2]Error.. Cannot get screen resource.\n"); + } + } +} + +static int _e_illume_util_marshalize_string (char* buf, int num, char* srcs[]) +{ + int i; + char * p = buf; + + for (i=0; i +#define L( type, fmt, args... ) { \ + if( _illume_logger_type & type ) printf( fmt, ##args ); \ +} +#else +#define L( ... ) { ; } +#endif /* ILLUME_LOGGER_BUILD_ENABLE */ + +#endif // _POLICY_UTIL_H diff --git a/illume2-slp/src/quickpanel.edc b/illume2-slp/src/quickpanel.edc new file mode 100644 index 0000000..91a722b --- /dev/null +++ b/illume2-slp/src/quickpanel.edc @@ -0,0 +1,140 @@ +#define WIDTH 720 +#define HEIGHT 1280 + +/* Default colors */ +#define BLACK_COLOR 0 0 0 255 +#define TRANSPARENT 0 0 0 0 + +images { + image: "RQ02_IMG_Handler.png" COMP; + image: "RQ02_IMG_Handler_arrow.png" COMP; +} + +collections { + group { name, "e/modules/illume2-slp/quickpanel/base"; + parts { + part { + name, "base"; + type, RECT; + mouse_events, 0; + description { + state, "default" 0.0; + color, BLACK_COLOR; + } + } + part { + name, "quickpanel_bg"; + type, RECT; + mouse_events, 0; + description { + state, "default" 0.0; + rel1 { relative, 0.0 0.0; to, "base"; } + rel2 { relative, 1.0 1.0; to, "base"; } + color, 25 25 25 255; + } + } + + part { + name, "top_padding"; + type, RECT; + mouse_events, 0; + scale, 1; + description { + state, "default" 0.0; + min, 0 50; + fixed, 0 1; + align, 0.5 0.0; + rel1 { relative, 0.0 0.0; to, "base"; } + rel2 { relative, 1.0 0.0; to, "base"; } + color, TRANSPARENT; + } + } + + part { + name, "contents"; + type, SWALLOW; + mouse_events, 1; + description { + state, "default" 0.0; + rel1 { relative, 0.0 1.0; to, "top_padding"; } + rel2 { relative, 1.0 0.0; to, "bottom_padding"; } + } + } + + part { + name, "bottom_padding"; + type, RECT; + mouse_events, 0; + scale, 1; + description { + state, "default" 0.0; + min, 0 50; + fixed, 0 1; + align, 0.5 1.0; + rel1 { relative, 0.0 1.0; to, "base"; } + rel2 { relative, 1.0 1.0; to, "base"; } + color, TRANSPARENT; + } + } + + part { + name, "quickpanel_handle"; + type, IMAGE; + mouse_events, 0; + description { + state, "default" 0.0; + rel1.to, "bottom_padding"; + rel2.to, "bottom_padding"; + image { + normal: "RQ02_IMG_Handler.png"; + } + } + } + + part { + name, "quickpanel_handle_arrow_bottom"; + type, IMAGE; + mouse_events, 0; + scale, 1; + description { + state, "default" 0.0; + min, 0 19; + fixed, 0 1; + align, 0.5 1.0; + rel1 { relative, 0.0 1.0; to, "base"; } + rel2 { relative, 1.0 1.0; to, "base"; } + color, TRANSPARENT; + } + } + + part { + name, "quickpanel_handle_arrow"; + type, IMAGE; + mouse_events, 0; + scale, 1; + description { + state, "default" 0.0; + min: 45 13; + fixed: 1 1; + align, 0.5 1.0; + rel1 { relative: 0.5 0.0; to, "quickpanel_handle_arrow_bottom"; } + rel2 { relative: 0.5 0.0; to, "quickpanel_handle_arrow_bottom"; } + image { + normal: "RQ02_IMG_Handler_arrow.png"; + } + } + } + + part { + name, "quickpanel_handle_event"; + type, RECT; + mouse_events, 1; + description { + state, "default" 0.0; + rel1.to, "bottom_padding"; + rel2.to, "bottom_padding"; + color, TRANSPARENT; + } + } + } +} diff --git a/keyrouter/AUTHORS b/keyrouter/AUTHORS new file mode 100644 index 0000000..e903784 --- /dev/null +++ b/keyrouter/AUTHORS @@ -0,0 +1,2 @@ +Sung-Jin Park +Sangjin Lee diff --git a/keyrouter/COPYING b/keyrouter/COPYING new file mode 100644 index 0000000..7625f00 --- /dev/null +++ b/keyrouter/COPYING @@ -0,0 +1,25 @@ +Copyright notice for Enlightenment: + +Copyright (C) 2000-2011 Carsten Haitzler and various contributors (see AUTHORS) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, +OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/keyrouter/Makefile b/keyrouter/Makefile new file mode 100644 index 0000000..ba08a85 --- /dev/null +++ b/keyrouter/Makefile @@ -0,0 +1,683 @@ +# Makefile.in generated by automake 1.10.2 from Makefile.am. +# Makefile. Generated from Makefile.in by configure. + +# 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. + + + + +pkgdatadir = $(datadir)/e17-extra-module-keyrouter +pkglibdir = $(libdir)/e17-extra-module-keyrouter +pkgincludedir = $(includedir)/e17-extra-module-keyrouter +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 = arm-unknown-linux-gnueabi +host_triplet = arm-unknown-linux-gnueabi +subdir = . +DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/config.h.in \ + $(srcdir)/module.desktop.in $(top_srcdir)/configure \ + config.guess config.sub depcomp install-sh ltmain.sh missing +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(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 = module.desktop +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 +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)$(filesdir)" +filesDATA_INSTALL = $(INSTALL_DATA) +DATA = $(files_DATA) +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 +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print +ACLOCAL = ${SHELL} /home/root/share/git_workspace/e17-extra-modules/e17-extra-module-keyrouter/missing --run aclocal-1.10 +AMTAR = ${SHELL} /home/root/share/git_workspace/e17-extra-modules/e17-extra-module-keyrouter/missing --run tar +AR = ar +AUTOCONF = ${SHELL} /home/root/share/git_workspace/e17-extra-modules/e17-extra-module-keyrouter/missing --run autoconf +AUTOHEADER = ${SHELL} /home/root/share/git_workspace/e17-extra-modules/e17-extra-module-keyrouter/missing --run autoheader +AUTOMAKE = ${SHELL} /home/root/share/git_workspace/e17-extra-modules/e17-extra-module-keyrouter/missing --run automake-1.10 +AWK = gawk +CC = gcc +CCDEPMODE = depmode=gcc3 +CFLAGS = -Wall -g -fPIC -rdynamic -O2 +CPP = gcc -E +CPPFLAGS = +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +DSYMUTIL = +DUMPBIN = +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = /scratchbox/tools/bin/grep -E +ENLIGHTENMENT_CFLAGS = -DUSE_E_CONFIG_H -I/usr/include/enlightenment -I/usr/include/efreet -I/usr/include/eina-0 -I/usr/include/eina-0/eina -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/fribidi -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/lua5.1 +ENLIGHTENMENT_LIBS = -levas -lecore -lecore_x -lecore_evas -lecore_con -lecore_ipc -lecore_file -leet -ledje -lefreet -lefreet_mime -leina -ldbus-1 -ledbus -lehal +EXEEXT = +FGREP = /scratchbox/tools/bin/grep -F +GREP = /scratchbox/tools/bin/grep +INSTALL = /scratchbox/tools/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +LD = /scratchbox/compilers/arm-linux-gnueabi-gcc4.4.1-glibc2.11.1/arm-none-linux-gnueabi/bin/ld +LDFLAGS = -Wl,--hash-style=both -Wl,--rpath=/usr/lib +LIBOBJS = +LIBS = +LIBTOOL = $(SHELL) $(top_builddir)/libtool +LIPO = +LN_S = ln -s +LTLIBOBJS = +MAKEINFO = ${SHELL} /home/root/share/git_workspace/e17-extra-modules/e17-extra-module-keyrouter/missing --run makeinfo +MKDIR_P = /scratchbox/tools/bin/mkdir -p +MODULE_ARCH = linux-gnueabi-arm-ver-pre-svn-06 +NM = /scratchbox/compilers/bin/nm -B +NMEDIT = +OBJEXT = o +OTOOL = +OTOOL64 = +PACKAGE = e17-extra-module-keyrouter +PACKAGE_BUGREPORT = sj76.park@samsung.com +PACKAGE_NAME = e17-extra-module-keyrouter +PACKAGE_STRING = e17-extra-module-keyrouter 0.1 +PACKAGE_TARNAME = e17-extra-module-keyrouter +PACKAGE_VERSION = 0.1 +PATH_SEPARATOR = : +PKG_CONFIG = /scratchbox/tools/bin/pkg-config +RANLIB = ranlib +SED = /scratchbox/tools/bin/sed +SET_MAKE = +SHELL = /bin/sh +STRIP = strip +VERSION = 0.1 +abs_builddir = /home/root/share/git_workspace/e17-extra-modules/e17-extra-module-keyrouter +abs_srcdir = /home/root/share/git_workspace/e17-extra-modules/e17-extra-module-keyrouter +abs_top_builddir = /home/root/share/git_workspace/e17-extra-modules/e17-extra-module-keyrouter +abs_top_srcdir = /home/root/share/git_workspace/e17-extra-modules/e17-extra-module-keyrouter +ac_ct_CC = gcc +ac_ct_DUMPBIN = +am__include = include +am__leading_dot = . +am__quote = +am__tar = ${AMTAR} chof - "$$tardir" +am__untar = ${AMTAR} xf - +bindir = ${exec_prefix}/bin +build = arm-unknown-linux-gnueabi +build_alias = +build_cpu = arm +build_os = linux-gnueabi +build_vendor = unknown +builddir = . +datadir = /usr/lib/enlightenment/modules/e17-extra-module-keyrouter +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +host = arm-unknown-linux-gnueabi +host_alias = +host_cpu = arm +host_os = linux-gnueabi +host_vendor = unknown +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = $(SHELL) /home/root/share/git_workspace/e17-extra-modules/e17-extra-module-keyrouter/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +lt_ECHO = echo +mandir = ${datarootdir}/man +mkdir_p = /scratchbox/tools/bin/mkdir -p +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr +program_transform_name = s,x,x, +psdir = ${docdir} +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = ${prefix}/etc +target_alias = +top_builddir = . +top_srcdir = . + +# maintainer-clean removes everything +MAINTAINERCLEANFILES = aclocal.m4 compile config.sub config.guess config.h.in \ + configure depcomp install-sh ltmain.sh Makefile.in missing + +SUBDIRS = src +filesdir = $(datadir) +files_DATA = module.desktop +EXTRA_DIST = module.desktop.in +all: config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +.SUFFIXES: +am--refresh: + @: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ + cd $(srcdir) && $(AUTOMAKE) --foreign \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign 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: $(am__configure_deps) + cd $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): $(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: $(am__configure_deps) + cd $(top_srcdir) && $(AUTOHEADER) + rm -f stamp-h1 + touch $@ + +distclean-hdr: + -rm -f config.h stamp-h1 +module.desktop: $(top_builddir)/config.status $(srcdir)/module.desktop.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 +install-filesDATA: $(files_DATA) + @$(NORMAL_INSTALL) + test -z "$(filesdir)" || $(MKDIR_P) "$(DESTDIR)$(filesdir)" + @list='$(files_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(filesDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(filesdir)/$$f'"; \ + $(filesDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(filesdir)/$$f"; \ + done + +uninstall-filesDATA: + @$(NORMAL_UNINSTALL) + @list='$(files_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(filesdir)/$$f'"; \ + rm -f "$(DESTDIR)$(filesdir)/$$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) 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 + $(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 $(DATA) config.h +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(filesdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-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 clean-local 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-filesDATA + +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: uninstall-filesDATA + +.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 clean-local 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-filesDATA \ + 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 uninstall-filesDATA + + +clean-local: + rm -rf module.desktop + +uninstall: + rm -rf $(DESTDIR)$(datadir) +# 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: diff --git a/keyrouter/Makefile.am b/keyrouter/Makefile.am new file mode 100644 index 0000000..1041b42 --- /dev/null +++ b/keyrouter/Makefile.am @@ -0,0 +1,18 @@ +# maintainer-clean removes everything +MAINTAINERCLEANFILES = aclocal.m4 compile config.sub config.guess config.h.in \ + configure depcomp install-sh ltmain.sh Makefile.in missing + +SUBDIRS = src + +filesdir = $(datadir) +files_DATA = module.desktop + +EXTRA_DIST = module.desktop.in + +clean-local: + rm -rf module.desktop + +uninstall: + rm -rf $(DESTDIR)$(datadir) + + diff --git a/keyrouter/autogen.sh b/keyrouter/autogen.sh new file mode 100755 index 0000000..5a30991 --- /dev/null +++ b/keyrouter/autogen.sh @@ -0,0 +1,10 @@ +#!/bin/sh +# Run this to generate all the initial makefiles, etc. + +set -x +aclocal +autoconf +libtoolize --copy --force +autoheader +automake --foreign --add-missing --copy + diff --git a/keyrouter/configure.ac b/keyrouter/configure.ac new file mode 100644 index 0000000..9019cc0 --- /dev/null +++ b/keyrouter/configure.ac @@ -0,0 +1,114 @@ +# +# Note ) +# +# AC_DEFINE(VARIABLE, VALUE, DESCRIPTION) +# output the following to config.h +# /* DESCRIPTION */ +# #define VARIABLE VALUE +# +# AC_SUBST(VARIABLE, [VALUE]) +# define $(VARIABLE) as VALUE in Makefile + +dnl ======================================================================== +# initialization +dnl ======================================================================== +AC_INIT([e17-extra-module-keyrouter], [0.1], [sj76.park@samsung.com]) + +# check for tools needed by automake generated Makefiles +# -Wall : Turn all warnings on. +# -Werror: report warings as errors. +# foreign: relax some GNU standard requirements +#AM_INIT_AUTOMAKE([-Wall -Werror foreign]) +AM_INIT_AUTOMAKE([-Wall foreign]) + +dnl ======================================================================== +# checks for programs +dnl ======================================================================== +AC_PROG_CC +AC_DISABLE_STATIC +AC_PROG_LIBTOOL + +dnl ======================================================================== +# checks for libraries +dnl ======================================================================== + +dnl ======================================================================== +# checks for header files +dnl ======================================================================== +#AC_HEADER_STDC +AC_CHECK_HEADERS([math.h fcntl.h stdlib.h string.h unistd.h]) + +dnl ======================================================================== +# checks for typedefs, structures, and compiler characteristics +AC_C_CONST + +dnl ======================================================================== +# checks for library functions +dnl ======================================================================== +#AC_FUNC_MALLOC +AC_FUNC_MMAP +AC_CHECK_FUNCS([memset munmap strcasecmp strdup]) + +dnl ======================================================================== +# checks for pkg-config +dnl ======================================================================== +PKG_PROG_PKG_CONFIG + + +dnl ======================================================================== +# checks for pkg-config +dnl ======================================================================== +PKG_CHECK_MODULES(ENLIGHTENMENT, enlightenment) +ENLIGHTENMENT_CFLAGS="${ENLIGHTENMENT_CFLAGS} -D_GNU_SOURCE " +AC_SUBST(ENLIGHTENMENT_CFLAGS) +AC_SUBST(ENLIGHTENMENT_LIBS) + +# Find edje_cc +#PKG_CHECK_MODULES(EDJE, [edje >= 0.5.0]) +#AC_ARG_WITH(edje-cc, +# AC_HELP_STRING([--with-edje-cc=PATH], [specify a specific path to edje_cc]), +# [ +# v=$withval; +# EDJE_CC=$v +# ], +# [ +# EDJE_CC=$(pkg-config --variable=prefix edje)/bin/edje_cc +# ] +#) +#AC_SUBST(EDJE_CC) +#AC_MSG_CHECKING([Which edje_cc to use]) +#AC_MSG_RESULT(${EDJE_CC}) + + +dnl ======================================================================= + +release=$(pkg-config --variable=release enlightenment) +MODULE_ARCH="$host_os-$host_cpu-$release" +AC_SUBST(MODULE_ARCH) +AC_DEFINE_UNQUOTED(MODULE_ARCH, "$MODULE_ARCH", "Module architecture") + +datadir=$(pkg-config --variable=modules enlightenment)/${PACKAGE} +AC_ARG_ENABLE(homedir-install, + AS_HELP_STRING([--enable-homedir-install], [Install module in homedir]), + [ datadir="${HOME}/.e/e/modules/${PACKAGE}" ] +) + +dnl ======================================================================== +# output files +dnl ======================================================================== + +# create HEADER for all HEADER.in. +# HEADERS contain definitions made with AC_DEFINE. +# the following command will create config.h from config.h.in +AC_CONFIG_HEADERS([config.h]) + +# create FILE for all FILE.in. +# FILES contains definitions made with AC_SUBST. +AC_CONFIG_FILES([ + Makefile + src/Makefile + module.desktop + ]) + +AC_OUTPUT + diff --git a/keyrouter/module.desktop.in b/keyrouter/module.desktop.in new file mode 100755 index 0000000..305fc5b --- /dev/null +++ b/keyrouter/module.desktop.in @@ -0,0 +1,31 @@ +[Desktop Entry] +Type=Link +Name=Keyrouter +Name[cs]= +Name[de]= +Name[eo]= +Name[es]= +Name[fr]= +Name[hu]= +Name[it]= +Name[ja]= +Name[pt]= +Name[pt_BR]= +Name[tr]= +Name[zh_CN]= +Name[zh_TW]= +Icon=e-module-clock +Comment=Keyrouter
Samsung Keyrouter. +Comment[cs]= +Comment[de]= +Comment[eo]= +Comment[es]= +Comment[fr]= +Comment[hu]= +Comment[it]= +Comment[ja]= +Comment[pt]= +Comment[pt_BR]= +Comment[tr]= +Comment[zh_CN]= +Comment[zh_TW]= diff --git a/keyrouter/scripts/keygrab_status b/keyrouter/scripts/keygrab_status new file mode 100755 index 0000000..f661d67 --- /dev/null +++ b/keyrouter/scripts/keygrab_status @@ -0,0 +1,11 @@ +#!/bin/sh + +if [ "$1" = "" ]; then + VAL="1" +else + VAL="$1" +fi + +if [ -x /usr/bin/xprop ]; then + xprop -root -f _GRAB_STATUS 32c -set _GRAB_STATUS ${VAL} & +fi diff --git a/keyrouter/scripts/set_keygrab b/keyrouter/scripts/set_keygrab new file mode 100755 index 0000000..8b3d22d --- /dev/null +++ b/keyrouter/scripts/set_keygrab @@ -0,0 +1,61 @@ +#!/bin/sh + +if [ "$1" != "-id" ]; then + echo "Usage> set_keygrab -id " + echo " ex> set_keygrab -id 0x1600002 HOME TOP_POSITION" + echo " key> SEND, HOME, END, POWER, VOLUME_UP, VOLUME_DOWN, HALF_SHUTER, FULL_SHUTTER" + echo " grab_mode> EXCLUSIVE, TOP_POSITION, SHARED, EMPTY" + exit 1 +fi + +winid=$2 +key_name=$3 +grab_mode=$4 + +if [ "${key_name}" = "HOME" ]; then + key=140 +elif [ "${key_name}" = "SEND" ]; then + key=177 +elif [ "${key_name}" = "END" ]; then + key=182 +elif [ "${key_name}" = "POWER" ]; then + key=124 +elif [ "${key_name}" = "VOLUME_UP" ]; then + key=123 +elif [ "${key_name}" = "VOLUME_DOWN" ]; then + key=122 +elif [ "${key_name}" = "HALF_SHUTTER" ]; then + key=179 +else + key=220 +fi + +if [ "${grab_mode}" = "TOP_POSITION" ]; then + grab="61440" +elif [ "${grab_mode}" = "SHARED" ]; then + grab="3840" +elif [ "${grab_mode}" = "EXCLUSIVE" ]; then + grab="983040" +else + grab="0" +fi +let "grab += key" +#grab_hex=`echo 0xf8c | awk '{printf "%d\n", $1}'` +grab_hex=${grab} + +echo "Setting grabbing the key(${key_name}) @ ${grab_mode} mode on window(${winid}) == start ==" + +echo "xprop -id ${winid} -f _GRAB_KEY 32c -set _GRAB_KEY ${grab_hex}" +xprop -id ${winid} -f _GRAB_KEY 32c -set _GRAB_KEY ${grab_hex} + +if [ "${grab_mode}" = "EMPTY" ]; then + echo "xprop -root -f _GRAB_EXCL_WIN_KEYCODE 32c -set _GRAB_EXCL_WIN_KEYCODE 0" + xprop -root -f _GRAB_EXCL_WIN_KEYCODE 32c -set _GRAB_EXCL_WIN_KEYCODE 0 +fi + +if [ "${grab_mode}" = "EXCLUSIVE" ]; then + echo "xprop -root -f _GRAB_EXCL_WIN_KEYCODE 32c -set _GRAB_EXCL_WIN_KEYCODE ${key}" + xprop -root -f _GRAB_EXCL_WIN_KEYCODE 32c -set _GRAB_EXCL_WIN_KEYCODE ${key} +fi + +echo "Setting grabbing the key(${key_name}) @ ${grab_mode} mode on window(${winid}) == end ==" diff --git a/keyrouter/src/.deps/module_la-e_mod_main.Plo b/keyrouter/src/.deps/module_la-e_mod_main.Plo new file mode 100644 index 0000000..da55462 --- /dev/null +++ b/keyrouter/src/.deps/module_la-e_mod_main.Plo @@ -0,0 +1,999 @@ +module_la-e_mod_main.lo: e_mod_main.c /usr/include/enlightenment/e.h \ + ../config.h /usr/include/features.h /usr/include/bits/predefs.h \ + /usr/include/sys/cdefs.h /usr/include/bits/wordsize.h \ + /usr/include/gnu/stubs.h /usr/include/stdio.h \ + /scratchbox/compilers/arm-linux-gnueabi-gcc4.4.1-glibc2.11.1/bin/../lib/gcc/arm-none-linux-gnueabi/4.4.1/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/typesizes.h \ + /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ + /scratchbox/compilers/arm-linux-gnueabi-gcc4.4.1-glibc2.11.1/bin/../lib/gcc/arm-none-linux-gnueabi/4.4.1/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/bits/stdio.h /usr/include/stdlib.h /usr/include/sys/types.h \ + /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/bits/byteswap.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/bits/time.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/alloca.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/string.h \ + /usr/include/xlocale.h /usr/include/bits/string.h \ + /usr/include/bits/string2.h /usr/include/sys/stat.h \ + /usr/include/bits/stat.h /usr/include/sys/time.h \ + /usr/include/sys/param.h /usr/include/limits.h \ + /scratchbox/compilers/arm-linux-gnueabi-gcc4.4.1-glibc2.11.1/bin/../lib/gcc/arm-none-linux-gnueabi/4.4.1/include-fixed/limits.h \ + /usr/include/bits/posix1_lim.h /usr/include/bits/local_lim.h \ + /usr/include/linux/limits.h /usr/include/bits/posix2_lim.h \ + /usr/include/linux/param.h /usr/include/asm/param.h /usr/include/utime.h \ + /usr/include/dlfcn.h /usr/include/bits/dlfcn.h /usr/include/math.h \ + /usr/include/bits/huge_val.h /usr/include/bits/huge_valf.h \ + /usr/include/bits/huge_vall.h /usr/include/bits/inf.h \ + /usr/include/bits/nan.h /usr/include/bits/mathdef.h \ + /usr/include/bits/mathcalls.h /usr/include/bits/mathinline.h \ + /usr/include/fnmatch.h /usr/include/ctype.h /usr/include/dirent.h \ + /usr/include/bits/dirent.h /usr/include/pwd.h /usr/include/grp.h \ + /usr/include/glob.h /usr/include/locale.h /usr/include/bits/locale.h \ + /usr/include/libintl.h /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + /usr/include/inttypes.h /usr/include/stdint.h /usr/include/bits/wchar.h \ + /usr/include/execinfo.h /usr/include/setjmp.h /usr/include/bits/setjmp.h \ + /usr/include/eina-0/Eina.h /usr/include/eina-0/eina_config.h \ + /usr/include/eina-0/eina/eina_types.h /usr/include/eina-0/eina_config.h \ + /usr/include/eina-0/eina/eina_main.h \ + /usr/include/eina-0/eina/eina_types.h /usr/include/eina-0/eina/eina_fp.h \ + /usr/include/eina-0/eina/eina_inline_f32p32.x \ + /usr/include/eina-0/eina/eina_inline_f16p16.x \ + /usr/include/eina-0/eina/eina_inline_f8p24.x \ + /usr/include/eina-0/eina/eina_inline_fp.x \ + /usr/include/eina-0/eina/eina_rectangle.h \ + /usr/include/eina-0/eina/eina_inline_rectangle.x \ + /usr/include/eina-0/eina/eina_inlist.h \ + /usr/include/eina-0/eina/eina_iterator.h \ + /usr/include/eina-0/eina/eina_magic.h \ + /usr/include/eina-0/eina/eina_accessor.h \ + /usr/include/eina-0/eina/eina_file.h \ + /usr/include/eina-0/eina/eina_array.h \ + /usr/include/eina-0/eina/eina_error.h \ + /usr/include/eina-0/eina/eina_inline_array.x \ + /usr/include/eina-0/eina/eina_list.h \ + /usr/include/eina-0/eina/eina_inline_list.x \ + /usr/include/eina-0/eina/eina_hash.h \ + /usr/include/eina-0/eina/eina_inline_hash.x \ + /usr/include/eina-0/eina/eina_trash.h \ + /usr/include/eina-0/eina/eina_inline_trash.x \ + /usr/include/eina-0/eina/eina_lalloc.h \ + /usr/include/eina-0/eina/eina_module.h \ + /usr/include/eina-0/eina/eina_mempool.h \ + /usr/include/eina-0/eina/eina_module.h \ + /usr/include/eina-0/eina/eina_inline_mempool.x \ + /usr/include/eina-0/eina/eina_error.h \ + /usr/include/eina-0/eina/eina_log.h \ + /usr/include/eina-0/eina/eina_inline_log.x \ + /usr/include/eina-0/eina/eina_array.h \ + /usr/include/eina-0/eina/eina_stringshare.h \ + /usr/include/eina-0/eina/eina_inline_stringshare.x \ + /usr/include/eina-0/eina/eina_magic.h \ + /usr/include/eina-0/eina/eina_counter.h \ + /usr/include/eina-0/eina/eina_rbtree.h \ + /usr/include/eina-0/eina/eina_inline_rbtree.x \ + /usr/include/eina-0/eina/eina_accessor.h \ + /usr/include/eina-0/eina/eina_iterator.h \ + /usr/include/eina-0/eina/eina_benchmark.h \ + /usr/include/eina-0/eina/eina_convert.h \ + /usr/include/eina-0/eina/eina_fp.h /usr/include/eina-0/eina/eina_cpu.h \ + /usr/include/eina-0/eina/eina_tiler.h \ + /usr/include/eina-0/eina/eina_rectangle.h \ + /usr/include/eina-0/eina/eina_inline_tiler.x \ + /usr/include/eina-0/eina/eina_safety_checks.h \ + /usr/include/eina-0/eina/eina_log.h \ + /usr/include/eina-0/eina/eina_hamster.h \ + /usr/include/eina-0/eina/eina_matrixsparse.h \ + /usr/include/eina-0/eina/eina_str.h \ + /usr/include/eina-0/eina/eina_inline_str.x \ + /usr/include/eina-0/eina/eina_strbuf.h \ + /usr/include/eina-0/eina/eina_quadtree.h \ + /usr/include/eina-0/eina/eina_inlist.h /usr/include/Evas.h \ + /usr/include/Evas_Engine_Buffer.h /usr/include/Ecore.h \ + /usr/include/Ecore_X.h /usr/include/Ecore_X_Atoms.h \ + /usr/include/Ecore_X_Cursor.h /usr/include/Ecore_Evas.h \ + /usr/include/Ecore_Getopt.h /usr/include/Ecore_Input.h \ + /usr/include/Ecore_Input_Evas.h /usr/include/Ecore_Con.h \ + /usr/include/libgen.h /usr/include/netdb.h /usr/include/netinet/in.h \ + /usr/include/sys/socket.h /usr/include/sys/uio.h /usr/include/bits/uio.h \ + /usr/include/bits/socket.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/rpc/netdb.h \ + /usr/include/bits/netdb.h /usr/include/Ecore_Ipc.h \ + /usr/include/Ecore_File.h /usr/include/Eet.h /usr/include/Edje.h \ + /scratchbox/compilers/arm-linux-gnueabi-gcc4.4.1-glibc2.11.1/bin/../lib/gcc/arm-none-linux-gnueabi/4.4.1/include/float.h \ + /usr/include/efreet/Efreet.h /usr/include/efreet/efreet_base.h \ + /usr/include/efreet/efreet_ini.h /usr/include/efreet/efreet_icon.h \ + /usr/include/efreet/efreet_desktop.h /usr/include/efreet/efreet_menu.h \ + /usr/include/efreet/efreet_utils.h /usr/include/efreet/efreet_uri.h \ + /usr/include/efreet/Efreet_Mime.h /usr/include/E_DBus.h \ + /usr/include/dbus-1.0/dbus/dbus.h \ + /usr/lib/dbus-1.0/include/dbus/dbus-arch-deps.h \ + /usr/include/dbus-1.0/dbus/dbus-macros.h \ + /usr/include/dbus-1.0/dbus/dbus-address.h \ + /usr/include/dbus-1.0/dbus/dbus-types.h \ + /usr/include/dbus-1.0/dbus/dbus-errors.h \ + /usr/include/dbus-1.0/dbus/dbus-bus.h \ + /usr/include/dbus-1.0/dbus/dbus-connection.h \ + /usr/include/dbus-1.0/dbus/dbus-memory.h \ + /usr/include/dbus-1.0/dbus/dbus-message.h \ + /usr/include/dbus-1.0/dbus/dbus-shared.h \ + /usr/include/dbus-1.0/dbus/dbus-misc.h \ + /usr/include/dbus-1.0/dbus/dbus-pending-call.h \ + /usr/include/dbus-1.0/dbus/dbus-protocol.h \ + /usr/include/dbus-1.0/dbus/dbus-server.h \ + /usr/include/dbus-1.0/dbus/dbus-signature.h \ + /usr/include/dbus-1.0/dbus/dbus-threads.h /usr/include/E_Hal.h \ + /usr/include/enlightenment/e_includes.h \ + /usr/include/enlightenment/e_mmx.h /usr/include/enlightenment/e_object.h \ + /usr/include/enlightenment/e_user.h \ + /usr/include/enlightenment/e_manager.h \ + /usr/include/enlightenment/e_path.h /usr/include/enlightenment/e_ipc.h \ + /usr/include/enlightenment/e_error.h \ + /usr/include/enlightenment/e_container.h \ + /usr/include/enlightenment/e_zone.h /usr/include/enlightenment/e_desk.h \ + /usr/include/enlightenment/e_border.h \ + /usr/include/enlightenment/e_pointer.h \ + /usr/include/enlightenment/e_config.h \ + /usr/include/enlightenment/e_config_data.h \ + /usr/include/enlightenment/e_menu.h /usr/include/enlightenment/e_icon.h \ + /usr/include/enlightenment/e_box.h \ + /usr/include/enlightenment/e_flowlayout.h \ + /usr/include/enlightenment/e_editable.h \ + /usr/include/enlightenment/e_entry.h /usr/include/enlightenment/e_init.h \ + /usr/include/enlightenment/e_int_menus.h \ + /usr/include/enlightenment/e_module.h \ + /usr/include/enlightenment/e_atoms.h \ + /usr/include/enlightenment/e_utils.h \ + /usr/include/enlightenment/e_canvas.h \ + /usr/include/enlightenment/e_focus.h \ + /usr/include/enlightenment/e_place.h \ + /usr/include/enlightenment/e_resist.h \ + /usr/include/enlightenment/e_startup.h \ + /usr/include/enlightenment/e_hints.h \ + /usr/include/enlightenment/e_signals.h \ + /usr/include/enlightenment/e_xinerama.h \ + /usr/include/enlightenment/e_table.h \ + /usr/include/enlightenment/e_layout.h \ + /usr/include/enlightenment/e_font.h /usr/include/enlightenment/e_intl.h \ + /usr/include/enlightenment/e_intl_data.h \ + /usr/include/enlightenment/e_theme.h /usr/include/enlightenment/e_dnd.h \ + /usr/include/enlightenment/e_bindings.h \ + /usr/include/enlightenment/e_moveresize.h \ + /usr/include/enlightenment/e_actions.h \ + /usr/include/enlightenment/e_popup.h \ + /usr/include/enlightenment/e_gadcon_popup.h \ + /usr/include/enlightenment/e_ipc_codec.h \ + /usr/include/enlightenment/e_test.h \ + /usr/include/enlightenment/e_prefix.h \ + /usr/include/enlightenment/e_datastore.h \ + /usr/include/enlightenment/e_msg.h /usr/include/enlightenment/e_alert.h \ + /usr/include/enlightenment/e_maximize.h \ + /usr/include/enlightenment/e_grabinput.h \ + /usr/include/enlightenment/e_bg.h \ + /usr/include/enlightenment/e_remember.h \ + /usr/include/enlightenment/e_win.h /usr/include/enlightenment/e_pan.h \ + /usr/include/enlightenment/e_dialog.h \ + /usr/include/enlightenment/e_configure.h \ + /usr/include/enlightenment/e_about.h \ + /usr/include/enlightenment/e_theme_about.h \ + /usr/include/enlightenment/e_widget.h \ + /usr/include/enlightenment/e_widget_check.h \ + /usr/include/enlightenment/e_widget_radio.h \ + /usr/include/enlightenment/e_widget_framelist.h \ + /usr/include/enlightenment/e_widget_list.h \ + /usr/include/enlightenment/e_widget_button.h \ + /usr/include/enlightenment/e_widget_label.h \ + /usr/include/enlightenment/e_widget_frametable.h \ + /usr/include/enlightenment/e_widget_table.h \ + /usr/include/enlightenment/e_widget_entry.h \ + /usr/include/enlightenment/e_widget_image.h \ + /usr/include/enlightenment/e_config_dialog.h \ + /usr/include/enlightenment/e_int_border_locks.h \ + /usr/include/enlightenment/e_thumb.h \ + /usr/include/enlightenment/e_int_border_remember.h \ + /usr/include/enlightenment/e_eap_editor.h \ + /usr/include/enlightenment/e_scrollframe.h \ + /usr/include/enlightenment/e_int_border_menu.h \ + /usr/include/enlightenment/e_ilist.h \ + /usr/include/enlightenment/e_livethumb.h \ + /usr/include/enlightenment/e_widget_ilist.h \ + /usr/include/enlightenment/e_widget_config_list.h \ + /usr/include/enlightenment/e_slider.h \ + /usr/include/enlightenment/e_widget_slider.h \ + /usr/include/enlightenment/e_desklock.h \ + /usr/include/enlightenment/e_screensaver.h \ + /usr/include/enlightenment/e_dpms.h \ + /usr/include/enlightenment/e_int_config_modules.h \ + /usr/include/enlightenment/e_exehist.h \ + /usr/include/enlightenment/e_color_class.h \ + /usr/include/enlightenment/e_widget_textblock.h \ + /usr/include/enlightenment/e_stolen.h \ + /usr/include/enlightenment/e_gadcon.h \ + /usr/include/enlightenment/e_shelf.h \ + /usr/include/enlightenment/e_widget_preview.h \ + /usr/include/enlightenment/e_int_shelf_config.h \ + /usr/include/enlightenment/e_int_gadcon_config.h \ + /usr/include/enlightenment/e_confirm_dialog.h \ + /usr/include/enlightenment/e_int_border_prop.h \ + /usr/include/enlightenment/e_entry_dialog.h \ + /usr/include/enlightenment/e_fm.h \ + /usr/include/enlightenment/e_fm_shared.h \ + /usr/include/enlightenment/e_fm_op_registry.h \ + /usr/include/enlightenment/e_widget_scrollframe.h \ + /usr/include/enlightenment/e_sha1.h \ + /usr/include/enlightenment/e_widget_fsel.h \ + /usr/include/enlightenment/e_fm_mime.h \ + /usr/include/enlightenment/e_color.h \ + /usr/include/enlightenment/e_spectrum.h \ + /usr/include/enlightenment/e_widget_spectrum.h \ + /usr/include/enlightenment/e_widget_cslider.h \ + /usr/include/enlightenment/e_widget_color_well.h \ + /usr/include/enlightenment/e_widget_csel.h \ + /usr/include/enlightenment/e_color_dialog.h \ + /usr/include/enlightenment/e_sys.h \ + /usr/include/enlightenment/e_obj_dialog.h \ + /usr/include/enlightenment/e_filereg.h \ + /usr/include/enlightenment/e_widget_aspect.h \ + /usr/include/enlightenment/e_widget_deskpreview.h \ + /usr/include/enlightenment/e_fm_prop.h \ + /usr/include/enlightenment/e_mouse.h \ + /usr/include/enlightenment/e_order.h /usr/include/enlightenment/e_exec.h \ + /usr/include/enlightenment/e_widget_font_preview.h \ + /usr/include/enlightenment/e_fm_custom.h \ + /usr/include/enlightenment/e_msgbus.h \ + /usr/include/enlightenment/e_toolbar.h \ + /usr/include/enlightenment/e_int_toolbar_config.h \ + /usr/include/enlightenment/e_powersave.h \ + /usr/include/enlightenment/e_slidesel.h \ + /usr/include/enlightenment/e_slidecore.h \ + /usr/include/enlightenment/e_widget_flist.h \ + /usr/include/enlightenment/e_fm_op.h \ + /usr/include/enlightenment/e_scale.h \ + /usr/include/enlightenment/e_widget_toolbar.h \ + /usr/include/enlightenment/e_widget_toolbook.h \ + /usr/include/enlightenment/e_acpi.h e_mod_main.h /usr/include/X11/Xlib.h \ + /usr/include/X11/X.h /usr/include/X11/Xfuncproto.h \ + /usr/include/X11/Xosdefs.h /usr/include/X11/Xatom.h \ + /usr/include/X11/extensions/XInput.h /usr/include/X11/extensions/XI.h \ + /usr/include/X11/extensions/XInput2.h /usr/include/X11/extensions/XI2.h \ + /usr/include/X11/extensions/Xge.h /usr/include/X11/extensions/XIproto.h \ + /usr/include/X11/Xproto.h /usr/include/X11/Xmd.h \ + /usr/include/X11/Xprotostr.h /usr/include/utilX.h + +/usr/include/enlightenment/e.h: + +../config.h: + +/usr/include/features.h: + +/usr/include/bits/predefs.h: + +/usr/include/sys/cdefs.h: + +/usr/include/bits/wordsize.h: + +/usr/include/gnu/stubs.h: + +/usr/include/stdio.h: + +/scratchbox/compilers/arm-linux-gnueabi-gcc4.4.1-glibc2.11.1/bin/../lib/gcc/arm-none-linux-gnueabi/4.4.1/include/stddef.h: + +/usr/include/bits/types.h: + +/usr/include/bits/typesizes.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/scratchbox/compilers/arm-linux-gnueabi-gcc4.4.1-glibc2.11.1/bin/../lib/gcc/arm-none-linux-gnueabi/4.4.1/include/stdarg.h: + +/usr/include/bits/stdio_lim.h: + +/usr/include/bits/sys_errlist.h: + +/usr/include/bits/stdio.h: + +/usr/include/stdlib.h: + +/usr/include/sys/types.h: + +/usr/include/time.h: + +/usr/include/endian.h: + +/usr/include/bits/endian.h: + +/usr/include/bits/byteswap.h: + +/usr/include/sys/select.h: + +/usr/include/bits/select.h: + +/usr/include/bits/sigset.h: + +/usr/include/bits/time.h: + +/usr/include/sys/sysmacros.h: + +/usr/include/bits/pthreadtypes.h: + +/usr/include/alloca.h: + +/usr/include/unistd.h: + +/usr/include/bits/posix_opt.h: + +/usr/include/bits/confname.h: + +/usr/include/getopt.h: + +/usr/include/string.h: + +/usr/include/xlocale.h: + +/usr/include/bits/string.h: + +/usr/include/bits/string2.h: + +/usr/include/sys/stat.h: + +/usr/include/bits/stat.h: + +/usr/include/sys/time.h: + +/usr/include/sys/param.h: + +/usr/include/limits.h: + +/scratchbox/compilers/arm-linux-gnueabi-gcc4.4.1-glibc2.11.1/bin/../lib/gcc/arm-none-linux-gnueabi/4.4.1/include-fixed/limits.h: + +/usr/include/bits/posix1_lim.h: + +/usr/include/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/bits/posix2_lim.h: + +/usr/include/linux/param.h: + +/usr/include/asm/param.h: + +/usr/include/utime.h: + +/usr/include/dlfcn.h: + +/usr/include/bits/dlfcn.h: + +/usr/include/math.h: + +/usr/include/bits/huge_val.h: + +/usr/include/bits/huge_valf.h: + +/usr/include/bits/huge_vall.h: + +/usr/include/bits/inf.h: + +/usr/include/bits/nan.h: + +/usr/include/bits/mathdef.h: + +/usr/include/bits/mathcalls.h: + +/usr/include/bits/mathinline.h: + +/usr/include/fnmatch.h: + +/usr/include/ctype.h: + +/usr/include/dirent.h: + +/usr/include/bits/dirent.h: + +/usr/include/pwd.h: + +/usr/include/grp.h: + +/usr/include/glob.h: + +/usr/include/locale.h: + +/usr/include/bits/locale.h: + +/usr/include/libintl.h: + +/usr/include/errno.h: + +/usr/include/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/signal.h: + +/usr/include/bits/signum.h: + +/usr/include/bits/siginfo.h: + +/usr/include/bits/sigaction.h: + +/usr/include/bits/sigcontext.h: + +/usr/include/asm/sigcontext.h: + +/usr/include/bits/sigstack.h: + +/usr/include/bits/sigthread.h: + +/usr/include/inttypes.h: + +/usr/include/stdint.h: + +/usr/include/bits/wchar.h: + +/usr/include/execinfo.h: + +/usr/include/setjmp.h: + +/usr/include/bits/setjmp.h: + +/usr/include/eina-0/Eina.h: + +/usr/include/eina-0/eina_config.h: + +/usr/include/eina-0/eina/eina_types.h: + +/usr/include/eina-0/eina_config.h: + +/usr/include/eina-0/eina/eina_main.h: + +/usr/include/eina-0/eina/eina_types.h: + +/usr/include/eina-0/eina/eina_fp.h: + +/usr/include/eina-0/eina/eina_inline_f32p32.x: + +/usr/include/eina-0/eina/eina_inline_f16p16.x: + +/usr/include/eina-0/eina/eina_inline_f8p24.x: + +/usr/include/eina-0/eina/eina_inline_fp.x: + +/usr/include/eina-0/eina/eina_rectangle.h: + +/usr/include/eina-0/eina/eina_inline_rectangle.x: + +/usr/include/eina-0/eina/eina_inlist.h: + +/usr/include/eina-0/eina/eina_iterator.h: + +/usr/include/eina-0/eina/eina_magic.h: + +/usr/include/eina-0/eina/eina_accessor.h: + +/usr/include/eina-0/eina/eina_file.h: + +/usr/include/eina-0/eina/eina_array.h: + +/usr/include/eina-0/eina/eina_error.h: + +/usr/include/eina-0/eina/eina_inline_array.x: + +/usr/include/eina-0/eina/eina_list.h: + +/usr/include/eina-0/eina/eina_inline_list.x: + +/usr/include/eina-0/eina/eina_hash.h: + +/usr/include/eina-0/eina/eina_inline_hash.x: + +/usr/include/eina-0/eina/eina_trash.h: + +/usr/include/eina-0/eina/eina_inline_trash.x: + +/usr/include/eina-0/eina/eina_lalloc.h: + +/usr/include/eina-0/eina/eina_module.h: + +/usr/include/eina-0/eina/eina_mempool.h: + +/usr/include/eina-0/eina/eina_module.h: + +/usr/include/eina-0/eina/eina_inline_mempool.x: + +/usr/include/eina-0/eina/eina_error.h: + +/usr/include/eina-0/eina/eina_log.h: + +/usr/include/eina-0/eina/eina_inline_log.x: + +/usr/include/eina-0/eina/eina_array.h: + +/usr/include/eina-0/eina/eina_stringshare.h: + +/usr/include/eina-0/eina/eina_inline_stringshare.x: + +/usr/include/eina-0/eina/eina_magic.h: + +/usr/include/eina-0/eina/eina_counter.h: + +/usr/include/eina-0/eina/eina_rbtree.h: + +/usr/include/eina-0/eina/eina_inline_rbtree.x: + +/usr/include/eina-0/eina/eina_accessor.h: + +/usr/include/eina-0/eina/eina_iterator.h: + +/usr/include/eina-0/eina/eina_benchmark.h: + +/usr/include/eina-0/eina/eina_convert.h: + +/usr/include/eina-0/eina/eina_fp.h: + +/usr/include/eina-0/eina/eina_cpu.h: + +/usr/include/eina-0/eina/eina_tiler.h: + +/usr/include/eina-0/eina/eina_rectangle.h: + +/usr/include/eina-0/eina/eina_inline_tiler.x: + +/usr/include/eina-0/eina/eina_safety_checks.h: + +/usr/include/eina-0/eina/eina_log.h: + +/usr/include/eina-0/eina/eina_hamster.h: + +/usr/include/eina-0/eina/eina_matrixsparse.h: + +/usr/include/eina-0/eina/eina_str.h: + +/usr/include/eina-0/eina/eina_inline_str.x: + +/usr/include/eina-0/eina/eina_strbuf.h: + +/usr/include/eina-0/eina/eina_quadtree.h: + +/usr/include/eina-0/eina/eina_inlist.h: + +/usr/include/Evas.h: + +/usr/include/Evas_Engine_Buffer.h: + +/usr/include/Ecore.h: + +/usr/include/Ecore_X.h: + +/usr/include/Ecore_X_Atoms.h: + +/usr/include/Ecore_X_Cursor.h: + +/usr/include/Ecore_Evas.h: + +/usr/include/Ecore_Getopt.h: + +/usr/include/Ecore_Input.h: + +/usr/include/Ecore_Input_Evas.h: + +/usr/include/Ecore_Con.h: + +/usr/include/libgen.h: + +/usr/include/netdb.h: + +/usr/include/netinet/in.h: + +/usr/include/sys/socket.h: + +/usr/include/sys/uio.h: + +/usr/include/bits/uio.h: + +/usr/include/bits/socket.h: + +/usr/include/bits/sockaddr.h: + +/usr/include/asm/socket.h: + +/usr/include/asm/sockios.h: + +/usr/include/bits/in.h: + +/usr/include/rpc/netdb.h: + +/usr/include/bits/netdb.h: + +/usr/include/Ecore_Ipc.h: + +/usr/include/Ecore_File.h: + +/usr/include/Eet.h: + +/usr/include/Edje.h: + +/scratchbox/compilers/arm-linux-gnueabi-gcc4.4.1-glibc2.11.1/bin/../lib/gcc/arm-none-linux-gnueabi/4.4.1/include/float.h: + +/usr/include/efreet/Efreet.h: + +/usr/include/efreet/efreet_base.h: + +/usr/include/efreet/efreet_ini.h: + +/usr/include/efreet/efreet_icon.h: + +/usr/include/efreet/efreet_desktop.h: + +/usr/include/efreet/efreet_menu.h: + +/usr/include/efreet/efreet_utils.h: + +/usr/include/efreet/efreet_uri.h: + +/usr/include/efreet/Efreet_Mime.h: + +/usr/include/E_DBus.h: + +/usr/include/dbus-1.0/dbus/dbus.h: + +/usr/lib/dbus-1.0/include/dbus/dbus-arch-deps.h: + +/usr/include/dbus-1.0/dbus/dbus-macros.h: + +/usr/include/dbus-1.0/dbus/dbus-address.h: + +/usr/include/dbus-1.0/dbus/dbus-types.h: + +/usr/include/dbus-1.0/dbus/dbus-errors.h: + +/usr/include/dbus-1.0/dbus/dbus-bus.h: + +/usr/include/dbus-1.0/dbus/dbus-connection.h: + +/usr/include/dbus-1.0/dbus/dbus-memory.h: + +/usr/include/dbus-1.0/dbus/dbus-message.h: + +/usr/include/dbus-1.0/dbus/dbus-shared.h: + +/usr/include/dbus-1.0/dbus/dbus-misc.h: + +/usr/include/dbus-1.0/dbus/dbus-pending-call.h: + +/usr/include/dbus-1.0/dbus/dbus-protocol.h: + +/usr/include/dbus-1.0/dbus/dbus-server.h: + +/usr/include/dbus-1.0/dbus/dbus-signature.h: + +/usr/include/dbus-1.0/dbus/dbus-threads.h: + +/usr/include/E_Hal.h: + +/usr/include/enlightenment/e_includes.h: + +/usr/include/enlightenment/e_mmx.h: + +/usr/include/enlightenment/e_object.h: + +/usr/include/enlightenment/e_user.h: + +/usr/include/enlightenment/e_manager.h: + +/usr/include/enlightenment/e_path.h: + +/usr/include/enlightenment/e_ipc.h: + +/usr/include/enlightenment/e_error.h: + +/usr/include/enlightenment/e_container.h: + +/usr/include/enlightenment/e_zone.h: + +/usr/include/enlightenment/e_desk.h: + +/usr/include/enlightenment/e_border.h: + +/usr/include/enlightenment/e_pointer.h: + +/usr/include/enlightenment/e_config.h: + +/usr/include/enlightenment/e_config_data.h: + +/usr/include/enlightenment/e_menu.h: + +/usr/include/enlightenment/e_icon.h: + +/usr/include/enlightenment/e_box.h: + +/usr/include/enlightenment/e_flowlayout.h: + +/usr/include/enlightenment/e_editable.h: + +/usr/include/enlightenment/e_entry.h: + +/usr/include/enlightenment/e_init.h: + +/usr/include/enlightenment/e_int_menus.h: + +/usr/include/enlightenment/e_module.h: + +/usr/include/enlightenment/e_atoms.h: + +/usr/include/enlightenment/e_utils.h: + +/usr/include/enlightenment/e_canvas.h: + +/usr/include/enlightenment/e_focus.h: + +/usr/include/enlightenment/e_place.h: + +/usr/include/enlightenment/e_resist.h: + +/usr/include/enlightenment/e_startup.h: + +/usr/include/enlightenment/e_hints.h: + +/usr/include/enlightenment/e_signals.h: + +/usr/include/enlightenment/e_xinerama.h: + +/usr/include/enlightenment/e_table.h: + +/usr/include/enlightenment/e_layout.h: + +/usr/include/enlightenment/e_font.h: + +/usr/include/enlightenment/e_intl.h: + +/usr/include/enlightenment/e_intl_data.h: + +/usr/include/enlightenment/e_theme.h: + +/usr/include/enlightenment/e_dnd.h: + +/usr/include/enlightenment/e_bindings.h: + +/usr/include/enlightenment/e_moveresize.h: + +/usr/include/enlightenment/e_actions.h: + +/usr/include/enlightenment/e_popup.h: + +/usr/include/enlightenment/e_gadcon_popup.h: + +/usr/include/enlightenment/e_ipc_codec.h: + +/usr/include/enlightenment/e_test.h: + +/usr/include/enlightenment/e_prefix.h: + +/usr/include/enlightenment/e_datastore.h: + +/usr/include/enlightenment/e_msg.h: + +/usr/include/enlightenment/e_alert.h: + +/usr/include/enlightenment/e_maximize.h: + +/usr/include/enlightenment/e_grabinput.h: + +/usr/include/enlightenment/e_bg.h: + +/usr/include/enlightenment/e_remember.h: + +/usr/include/enlightenment/e_win.h: + +/usr/include/enlightenment/e_pan.h: + +/usr/include/enlightenment/e_dialog.h: + +/usr/include/enlightenment/e_configure.h: + +/usr/include/enlightenment/e_about.h: + +/usr/include/enlightenment/e_theme_about.h: + +/usr/include/enlightenment/e_widget.h: + +/usr/include/enlightenment/e_widget_check.h: + +/usr/include/enlightenment/e_widget_radio.h: + +/usr/include/enlightenment/e_widget_framelist.h: + +/usr/include/enlightenment/e_widget_list.h: + +/usr/include/enlightenment/e_widget_button.h: + +/usr/include/enlightenment/e_widget_label.h: + +/usr/include/enlightenment/e_widget_frametable.h: + +/usr/include/enlightenment/e_widget_table.h: + +/usr/include/enlightenment/e_widget_entry.h: + +/usr/include/enlightenment/e_widget_image.h: + +/usr/include/enlightenment/e_config_dialog.h: + +/usr/include/enlightenment/e_int_border_locks.h: + +/usr/include/enlightenment/e_thumb.h: + +/usr/include/enlightenment/e_int_border_remember.h: + +/usr/include/enlightenment/e_eap_editor.h: + +/usr/include/enlightenment/e_scrollframe.h: + +/usr/include/enlightenment/e_int_border_menu.h: + +/usr/include/enlightenment/e_ilist.h: + +/usr/include/enlightenment/e_livethumb.h: + +/usr/include/enlightenment/e_widget_ilist.h: + +/usr/include/enlightenment/e_widget_config_list.h: + +/usr/include/enlightenment/e_slider.h: + +/usr/include/enlightenment/e_widget_slider.h: + +/usr/include/enlightenment/e_desklock.h: + +/usr/include/enlightenment/e_screensaver.h: + +/usr/include/enlightenment/e_dpms.h: + +/usr/include/enlightenment/e_int_config_modules.h: + +/usr/include/enlightenment/e_exehist.h: + +/usr/include/enlightenment/e_color_class.h: + +/usr/include/enlightenment/e_widget_textblock.h: + +/usr/include/enlightenment/e_stolen.h: + +/usr/include/enlightenment/e_gadcon.h: + +/usr/include/enlightenment/e_shelf.h: + +/usr/include/enlightenment/e_widget_preview.h: + +/usr/include/enlightenment/e_int_shelf_config.h: + +/usr/include/enlightenment/e_int_gadcon_config.h: + +/usr/include/enlightenment/e_confirm_dialog.h: + +/usr/include/enlightenment/e_int_border_prop.h: + +/usr/include/enlightenment/e_entry_dialog.h: + +/usr/include/enlightenment/e_fm.h: + +/usr/include/enlightenment/e_fm_shared.h: + +/usr/include/enlightenment/e_fm_op_registry.h: + +/usr/include/enlightenment/e_widget_scrollframe.h: + +/usr/include/enlightenment/e_sha1.h: + +/usr/include/enlightenment/e_widget_fsel.h: + +/usr/include/enlightenment/e_fm_mime.h: + +/usr/include/enlightenment/e_color.h: + +/usr/include/enlightenment/e_spectrum.h: + +/usr/include/enlightenment/e_widget_spectrum.h: + +/usr/include/enlightenment/e_widget_cslider.h: + +/usr/include/enlightenment/e_widget_color_well.h: + +/usr/include/enlightenment/e_widget_csel.h: + +/usr/include/enlightenment/e_color_dialog.h: + +/usr/include/enlightenment/e_sys.h: + +/usr/include/enlightenment/e_obj_dialog.h: + +/usr/include/enlightenment/e_filereg.h: + +/usr/include/enlightenment/e_widget_aspect.h: + +/usr/include/enlightenment/e_widget_deskpreview.h: + +/usr/include/enlightenment/e_fm_prop.h: + +/usr/include/enlightenment/e_mouse.h: + +/usr/include/enlightenment/e_order.h: + +/usr/include/enlightenment/e_exec.h: + +/usr/include/enlightenment/e_widget_font_preview.h: + +/usr/include/enlightenment/e_fm_custom.h: + +/usr/include/enlightenment/e_msgbus.h: + +/usr/include/enlightenment/e_toolbar.h: + +/usr/include/enlightenment/e_int_toolbar_config.h: + +/usr/include/enlightenment/e_powersave.h: + +/usr/include/enlightenment/e_slidesel.h: + +/usr/include/enlightenment/e_slidecore.h: + +/usr/include/enlightenment/e_widget_flist.h: + +/usr/include/enlightenment/e_fm_op.h: + +/usr/include/enlightenment/e_scale.h: + +/usr/include/enlightenment/e_widget_toolbar.h: + +/usr/include/enlightenment/e_widget_toolbook.h: + +/usr/include/enlightenment/e_acpi.h: + +e_mod_main.h: + +/usr/include/X11/Xlib.h: + +/usr/include/X11/X.h: + +/usr/include/X11/Xfuncproto.h: + +/usr/include/X11/Xosdefs.h: + +/usr/include/X11/Xatom.h: + +/usr/include/X11/extensions/XInput.h: + +/usr/include/X11/extensions/XI.h: + +/usr/include/X11/extensions/XInput2.h: + +/usr/include/X11/extensions/XI2.h: + +/usr/include/X11/extensions/Xge.h: + +/usr/include/X11/extensions/XIproto.h: + +/usr/include/X11/Xproto.h: + +/usr/include/X11/Xmd.h: + +/usr/include/X11/Xprotostr.h: + +/usr/include/utilX.h: diff --git a/keyrouter/src/Makefile b/keyrouter/src/Makefile new file mode 100644 index 0000000..30f930a --- /dev/null +++ b/keyrouter/src/Makefile @@ -0,0 +1,500 @@ +# Makefile.in generated by automake 1.10.2 from Makefile.am. +# src/Makefile. Generated from Makefile.in by configure. + +# 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. + + + + +pkgdatadir = $(datadir)/e17-extra-module-keyrouter +pkglibdir = $(libdir)/e17-extra-module-keyrouter +pkgincludedir = $(includedir)/e17-extra-module-keyrouter +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 = arm-unknown-linux-gnueabi +host_triplet = arm-unknown-linux-gnueabi +subdir = src +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(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)$(pkgdir)" +pkgLTLIBRARIES_INSTALL = $(INSTALL) +LTLIBRARIES = $(pkg_LTLIBRARIES) +am_module_la_OBJECTS = module_la-e_mod_main.lo +module_la_OBJECTS = $(am_module_la_OBJECTS) +module_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(module_la_CFLAGS) \ + $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I. -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/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 = $(module_la_SOURCES) +DIST_SOURCES = $(module_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = ${SHELL} /home/root/share/git_workspace/e17-extra-modules/e17-extra-module-keyrouter/missing --run aclocal-1.10 +AMTAR = ${SHELL} /home/root/share/git_workspace/e17-extra-modules/e17-extra-module-keyrouter/missing --run tar +AR = ar +AUTOCONF = ${SHELL} /home/root/share/git_workspace/e17-extra-modules/e17-extra-module-keyrouter/missing --run autoconf +AUTOHEADER = ${SHELL} /home/root/share/git_workspace/e17-extra-modules/e17-extra-module-keyrouter/missing --run autoheader +AUTOMAKE = ${SHELL} /home/root/share/git_workspace/e17-extra-modules/e17-extra-module-keyrouter/missing --run automake-1.10 +AWK = gawk +CC = gcc +CCDEPMODE = depmode=gcc3 +CFLAGS = -Wall -g -fPIC -rdynamic -O2 +CPP = gcc -E +CPPFLAGS = +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +DSYMUTIL = +DUMPBIN = +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = /scratchbox/tools/bin/grep -E +ENLIGHTENMENT_CFLAGS = -DUSE_E_CONFIG_H -I/usr/include/enlightenment -I/usr/include/efreet -I/usr/include/eina-0 -I/usr/include/eina-0/eina -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/fribidi -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/lua5.1 +ENLIGHTENMENT_LIBS = -levas -lecore -lecore_x -lecore_evas -lecore_con -lecore_ipc -lecore_file -leet -ledje -lefreet -lefreet_mime -leina -ldbus-1 -ledbus -lehal +EXEEXT = +FGREP = /scratchbox/tools/bin/grep -F +GREP = /scratchbox/tools/bin/grep +INSTALL = /scratchbox/tools/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +LD = /scratchbox/compilers/arm-linux-gnueabi-gcc4.4.1-glibc2.11.1/arm-none-linux-gnueabi/bin/ld +LDFLAGS = -Wl,--hash-style=both -Wl,--rpath=/usr/lib +LIBOBJS = +LIBS = +LIBTOOL = $(SHELL) $(top_builddir)/libtool +LIPO = +LN_S = ln -s +LTLIBOBJS = +MAKEINFO = ${SHELL} /home/root/share/git_workspace/e17-extra-modules/e17-extra-module-keyrouter/missing --run makeinfo +MKDIR_P = /scratchbox/tools/bin/mkdir -p +MODULE_ARCH = linux-gnueabi-arm-ver-pre-svn-06 +NM = /scratchbox/compilers/bin/nm -B +NMEDIT = +OBJEXT = o +OTOOL = +OTOOL64 = +PACKAGE = e17-extra-module-keyrouter +PACKAGE_BUGREPORT = sj76.park@samsung.com +PACKAGE_NAME = e17-extra-module-keyrouter +PACKAGE_STRING = e17-extra-module-keyrouter 0.1 +PACKAGE_TARNAME = e17-extra-module-keyrouter +PACKAGE_VERSION = 0.1 +PATH_SEPARATOR = : +PKG_CONFIG = /scratchbox/tools/bin/pkg-config +RANLIB = ranlib +SED = /scratchbox/tools/bin/sed +SET_MAKE = +SHELL = /bin/sh +STRIP = strip +VERSION = 0.1 +abs_builddir = /home/root/share/git_workspace/e17-extra-modules/e17-extra-module-keyrouter/src +abs_srcdir = /home/root/share/git_workspace/e17-extra-modules/e17-extra-module-keyrouter/src +abs_top_builddir = /home/root/share/git_workspace/e17-extra-modules/e17-extra-module-keyrouter +abs_top_srcdir = /home/root/share/git_workspace/e17-extra-modules/e17-extra-module-keyrouter +ac_ct_CC = gcc +ac_ct_DUMPBIN = +am__include = include +am__leading_dot = . +am__quote = +am__tar = ${AMTAR} chof - "$$tardir" +am__untar = ${AMTAR} xf - +bindir = ${exec_prefix}/bin +build = arm-unknown-linux-gnueabi +build_alias = +build_cpu = arm +build_os = linux-gnueabi +build_vendor = unknown +builddir = . +datadir = /usr/lib/enlightenment/modules/e17-extra-module-keyrouter +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +host = arm-unknown-linux-gnueabi +host_alias = +host_cpu = arm +host_os = linux-gnueabi +host_vendor = unknown +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = $(SHELL) /home/root/share/git_workspace/e17-extra-modules/e17-extra-module-keyrouter/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +lt_ECHO = echo +mandir = ${datarootdir}/man +mkdir_p = /scratchbox/tools/bin/mkdir -p +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr +program_transform_name = s,x,x, +psdir = ${docdir} +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = ${prefix}/etc +target_alias = +top_builddir = .. +top_srcdir = .. +MAINTAINERCLEANFILES = Makefile.in +MODULE = e17-extra-module-keyrouter +#LDFLAGS += -lvconf -lappfwk + +#CPPFLAGS = \ +# -I. \ +# -I$(includedir) \ +# -I$(includedir)/enlightenment + +# the module .so file +#INCLUDES = -I. \ +# -I$(includedir) +# -I$(includedir)/enlightenment \ +# @e_cflags@ +pkgdir = $(libdir)/enlightenment/modules/$(MODULE)/$(MODULE_ARCH) +pkg_LTLIBRARIES = module.la +module_la_SOURCES = e_mod_main.c \ + e_mod_main.h + +module_la_LIBADD = +module_la_CFLAGS = -DUSE_E_CONFIG_H -I/usr/include/enlightenment -I/usr/include/efreet -I/usr/include/eina-0 -I/usr/include/eina-0/eina -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/fribidi -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/lua5.1 +module_la_LDFLAGS = -module -avoid-version -levas -lecore -lecore_x -lecore_evas -lecore_con -lecore_ipc -lecore_file -leet -ledje -lefreet -lefreet_mime -leina -ldbus-1 -ledbus -lehal +module_la_DEPENDENCIES = $(top_builddir)/config.h +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(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) --foreign src/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/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: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" + @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pkgLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(pkgdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pkgLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(pkgdir)/$$f"; \ + else :; fi; \ + done + +uninstall-pkgLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$p'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$p"; \ + done + +clean-pkgLTLIBRARIES: + -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) + @list='$(pkg_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 +module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) + $(module_la_LINK) -rpath $(pkgdir) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +include ./$(DEPDIR)/module_la-e_mod_main.Plo + +.c.o: + $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(COMPILE) -c $< + +.c.obj: + $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` + mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: + $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +# source='$<' object='$@' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LTCOMPILE) -c -o $@ $< + +module_la-e_mod_main.lo: e_mod_main.c + $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_la_CFLAGS) $(CFLAGS) -MT module_la-e_mod_main.lo -MD -MP -MF $(DEPDIR)/module_la-e_mod_main.Tpo -c -o module_la-e_mod_main.lo `test -f 'e_mod_main.c' || echo '$(srcdir)/'`e_mod_main.c + mv -f $(DEPDIR)/module_la-e_mod_main.Tpo $(DEPDIR)/module_la-e_mod_main.Plo +# source='e_mod_main.c' object='module_la-e_mod_main.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_la_CFLAGS) $(CFLAGS) -c -o module_la-e_mod_main.lo `test -f 'e_mod_main.c' || echo '$(srcdir)/'`e_mod_main.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) +installdirs: + for dir in "$(DESTDIR)$(pkgdir)"; 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: + +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-am + +clean-am: clean-generic clean-libtool clean-pkgLTLIBRARIES \ + 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-pkgLTLIBRARIES + +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-pkgLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-pkgLTLIBRARIES 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-pkgLTLIBRARIES 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-pkgLTLIBRARIES + + +#uninstall: +# rm -rf $(DESTDIR)$(libdir)/enlightenment/modules/$(MODULE) +# 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: diff --git a/keyrouter/src/Makefile.am b/keyrouter/src/Makefile.am new file mode 100644 index 0000000..96d6dcf --- /dev/null +++ b/keyrouter/src/Makefile.am @@ -0,0 +1,27 @@ +MAINTAINERCLEANFILES = Makefile.in +MODULE = e17-extra-module-keyrouter + +LDFLAGS += +#LDFLAGS += -lvconf -lappfwk + +#CPPFLAGS = \ +# -I. \ +# -I$(includedir) \ +# -I$(includedir)/enlightenment + +# the module .so file +#INCLUDES = -I. \ +# -I$(includedir) +# -I$(includedir)/enlightenment \ +# @e_cflags@ +pkgdir = $(libdir)/enlightenment/modules/$(MODULE)/$(MODULE_ARCH) +pkg_LTLIBRARIES = module.la +module_la_SOURCES = e_mod_main.c \ + e_mod_main.h +module_la_LIBADD = +module_la_CFLAGS = @ENLIGHTENMENT_CFLAGS@ +module_la_LDFLAGS = -module -avoid-version @ENLIGHTENMENT_LIBS@ +module_la_DEPENDENCIES = $(top_builddir)/config.h + +#uninstall: +# rm -rf $(DESTDIR)$(libdir)/enlightenment/modules/$(MODULE) diff --git a/keyrouter/src/e_mod_main.c b/keyrouter/src/e_mod_main.c new file mode 100755 index 0000000..032b1bf --- /dev/null +++ b/keyrouter/src/e_mod_main.c @@ -0,0 +1,3162 @@ +#include "e.h" +#include "e_mod_main.h" +#include + +/* this is needed to advertise a label for the module IN the code (not just + * the .desktop file) but more specifically the api version it was compiled + * for so E can skip modules that are compiled for an incorrect API version + * safely) */ + EAPI E_Module_Api e_modapi = +{ + E_MODULE_API_VERSION, + "Keyrouter Module of Window Manager" +}; + +KeyRouter keyrouter; + +EAPI void* +e_modapi_init (E_Module* m) +{ + if( !_e_keyrouter_init() ) + { + printf("[keyrouter][%s] Failed @ _e_keyrouter_init()..!\n", __FUNCTION__); + return NULL; + } + + //Adding Event Handlers +#ifdef _F_USE_XI_GRABDEVICE_ + keyrouter.e_event_generic_handler = ecore_event_handler_add(ECORE_X_EVENT_GENERIC, (Ecore_Event_Handler_Cb)_e_keyrouter_cb_event_generic, NULL); +#else//_F_USE_XI_GRABDEVICE_ + keyrouter.e_event_generic_handler = ecore_event_handler_add(ECORE_X_EVENT_GENERIC, (Ecore_Event_Handler_Cb)_e_keyrouter_cb_event_generic, NULL); + keyrouter.e_event_any_handler = ecore_event_handler_add(ECORE_X_EVENT_ANY, (Ecore_Event_Handler_Cb)_e_keyrouter_cb_event_any, NULL); +#endif//_F_USE_XI_GRABDEVICE_ + //e_border_add_handler = ecore_event_handler_add(E_EVENT_BORDER_ADD, _e_keyrouter_cb_e_border_add, NULL); + keyrouter.e_window_property_handler = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_PROPERTY, (Ecore_Event_Handler_Cb)_e_keyrouter_cb_window_property, NULL); + keyrouter.e_border_stack_handler = ecore_event_handler_add(E_EVENT_BORDER_STACK, (Ecore_Event_Handler_Cb)_e_keyrouter_cb_e_border_stack, NULL); + keyrouter.e_border_remove_handler = ecore_event_handler_add(E_EVENT_BORDER_REMOVE, (Ecore_Event_Handler_Cb)_e_keyrouter_cb_e_border_remove, NULL); + keyrouter.e_window_create_handler = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_CREATE, (Ecore_Event_Handler_Cb)_e_keyrouter_cb_window_create, NULL); + keyrouter.e_window_destroy_handler = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_DESTROY, (Ecore_Event_Handler_Cb)_e_keyrouter_cb_window_destroy, NULL); + keyrouter.e_window_configure_handler = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_CONFIGURE,(Ecore_Event_Handler_Cb)_e_keyrouter_cb_window_configure, NULL); + keyrouter.e_window_stack_handler = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_STACK, (Ecore_Event_Handler_Cb)_e_keyrouter_cb_window_stack, NULL); + + if( !keyrouter.e_window_stack_handler ) printf("[keyrouter][%s] Failed to add ECORE_X_EVENT_WINDOW_STACK handler\n", __FUNCTION__); + if( !keyrouter.e_window_configure_handler ) printf("[keyrouter][%s] Failed to add ECORE_X_EVENT_WINDOW_CONFIGURE handler\n", __FUNCTION__); + if( !keyrouter.e_window_destroy_handler ) printf("[keyrouter][%s] Failed to add ECORE_X_EVENT_WINDOW_DESTROY handler\n", __FUNCTION__); + if( !keyrouter.e_window_create_handler ) printf("[keyrouter][%s] Failed to add ECORE_X_EVENT_WINDOW_CREATE handler\n", __FUNCTION__); + //if( !e_border_add_handler ) printf("[keyrouter][%s] Failed to add E_EVENT_BORDER_ADD handler\n", __FUNCTION__); + if( !keyrouter.e_window_property_handler ) printf("[keyrouter][%s] Failed to add ECORE_X_EVENT_WINDOW_PROPERTY handler\n", __FUNCTION__); + if( !keyrouter.e_border_stack_handler ) printf("[keyrouter][%s] Failed to add E_EVENT_BORDER_STACK handler\n", __FUNCTION__); + if( !keyrouter.e_border_remove_handler ) printf("[keyrouter][%s] Failed to add E_EVENT_BORDER_REMOVE handler\n", __FUNCTION__); +#ifdef _F_USE_XI_GRABDEVICE_ + if( !keyrouter.e_event_generic_handler ) printf("[keyrouter][%s] Failed to add ECORE_X_EVENT_GENERIC handler\n", __FUNCTION__); +#else//_F_USE_XI_GRABDEVICE_ + if( !keyrouter.e_event_any_handler ) printf("[keyrouter][%s] Failed to add ECORE_X_EVENT_ANY handler\n", __FUNCTION__); +#endif//_F_USE_XI_GRABDEVICE_ + + return m; +} + +EAPI int +e_modapi_shutdown (E_Module* m) +{ + //Removing Event Handlers +#ifdef _F_USE_XI_GRABDEVICE_ + ecore_event_handler_del(keyrouter.e_event_generic_handler); +#else//_F_USE_XI_GRABDEVICE_ + ecore_event_handler_del(keyrouter.e_event_generic_handler); + ecore_event_handler_del(keyrouter.e_event_any_handler); +#endif//_F_USE_XI_GRABDEVICE_ + //ecore_event_handler_del(e_border_add_handler); + ecore_event_handler_del(keyrouter.e_window_property_handler); + ecore_event_handler_del(keyrouter.e_border_stack_handler); + ecore_event_handler_del(keyrouter.e_border_remove_handler); + ecore_event_handler_del(keyrouter.e_window_create_handler); + ecore_event_handler_del(keyrouter.e_window_destroy_handler); + ecore_event_handler_del(keyrouter.e_window_configure_handler); + ecore_event_handler_del(keyrouter.e_window_stack_handler); + + keyrouter.e_window_stack_handler = NULL; + keyrouter.e_window_configure_handler = NULL; + keyrouter.e_window_destroy_handler = NULL; + keyrouter.e_window_create_handler = NULL; + //keyrouter.e_border_add_handler = NULL; + keyrouter.e_window_property_handler = NULL; + keyrouter.e_border_stack_handler = NULL; + keyrouter.e_border_remove_handler = NULL; +#ifdef _F_USE_XI_GRABDEVICE_ + keyrouter.e_event_generic_handler = NULL; +#else//_F_USE_XI_GRABDEVICE_ + keyrouter.e_event_any_handler = NULL; +#endif//_F_USE_XI_GRABDEVICE_ + + _e_keyrouter_fini(); + + return 1; +} + +EAPI int +e_modapi_save (E_Module* m) +{ + /* Do Something */ + return 1; +} + +static void +_e_keyrouter_x_input_init(void) +{ + int event, error; + int major = 2, minor = 0; + + if( !XQueryExtension(keyrouter.disp, "XInputExtension", &keyrouter.xi2_opcode, &event, &error) ) + { + printf("[keyrouter][%s] XInput Extension isn't supported.\n", __FUNCTION__); + keyrouter.xi2_opcode = -1; + return; + } + + if( XIQueryVersion(keyrouter.disp, &major, &minor) == BadRequest ) + { + printf("[keyrouter][%s] Failed to query XI version.\n", __FUNCTION__); + keyrouter.xi2_opcode = -1; + return; + } + + /* Set up MPX events */ + memset(&keyrouter.eventmask_0, 0L, sizeof(XIEventMask)); + keyrouter.eventmask_all.deviceid = keyrouter.eventmask_part.deviceid = XIAllDevices; + keyrouter.eventmask_all.mask_len = keyrouter.eventmask_part.mask_len = XIMaskLen(XI_RawMotion); + keyrouter.eventmask_all.mask = calloc(keyrouter.eventmask_all.mask_len, sizeof(char)); + keyrouter.eventmask_part.mask= calloc(keyrouter.eventmask_part.mask_len, sizeof(char)); + + /* Events we want to listen for all */ + XISetMask(keyrouter.eventmask_all.mask, XI_DeviceChanged); + XISetMask(keyrouter.eventmask_all.mask, XI_HierarchyChanged); + XISetMask(keyrouter.eventmask_all.mask, XI_PropertyEvent); + XISetMask(keyrouter.eventmask_all.mask, XI_ButtonPress); + XISetMask(keyrouter.eventmask_all.mask, XI_ButtonRelease); + + /* Events we want to listen for a part */ + XISetMask(keyrouter.eventmask_part.mask, XI_DeviceChanged); + XISetMask(keyrouter.eventmask_part.mask, XI_HierarchyChanged); + XISetMask(keyrouter.eventmask_part.mask, XI_PropertyEvent); + + /* select XI events for a part */ + XISelectEvents(keyrouter.disp, keyrouter.rootWin, &keyrouter.eventmask_part, 1); + +#ifdef _F_USE_XI_GRABDEVICE_ + /* Set up MPX events */ + memset(&keyrouter.eventmask_0, 0L, sizeof(XIEventMask)); + + keyrouter.eventmask.deviceid = XIAllDevices;//or XIAllMasterDevices + keyrouter.eventmask.mask_len = sizeof(keyrouter.mask); + keyrouter.eventmask.mask = keyrouter.mask; + + /* Events we want to listen for */ + XISetMask(keyrouter.mask, XI_KeyPress); + XISetMask(keyrouter.mask, XI_KeyRelease); + + gev = (XEvent *)malloc(sizeof(XEvent)); + gcookie = (XGenericEventCookie *)malloc(sizeof(XGenericEventCookie)); + + if( !gev || !gcookie ) + { + fprintf(stderr, "[keyrouter][%s] Failed to allocate memory for XEvent/XGenericEventCookie !\n", __FUNCTION__); + return; + } + + gcookie->type = GenericEvent; + gcookie->extension = xi2_opcode; + gcookie->display = gev->xany.display = keyrouter.disp; +#endif +} + +#ifndef _F_USE_XI_GRABDEVICE_ +static int +_e_keyrouter_cb_event_any(void *data, int ev_type, void *event) +{ + XEvent *ev = (XEvent *)event; + XDeviceKeyEvent *xdevkey = (XDeviceKeyEvent *)ev; + + int type = ev->xcookie.type; + + if( type == keyrouter.DeviceKeyPress ) + { +#ifdef __DEBUG__ + printf("[keyrouter][%s] DeviceKeyPress (type = %d, keycode = %d)\n", __FUNCTION__, type, xdevkey->keycode); +#endif + ev->type = KeyPress; + } + else if( type == keyrouter.DeviceKeyRelease ) + { +#ifdef __DEBUG__ + printf("[keyrouter][%s] DeviceKeyRelease (type = %d, keycode = %d)\n", __FUNCTION__, type, xdevkey->keycode); +#endif + ev->type = KeyRelease; + } + else if( type == ButtonPress && ev->xbutton.button == 3) + { +#ifdef __DEBUG__ + fprintf(stderr, "[keyrouter][%s] Mouse Right ButtonPress (type = %d, button=%d, x_root=%d, y_root=%d, x=%d, y=%d)\n", __FUNCTION__, type, ev->xbutton.button, + ev->xbutton.x_root, ev->xbutton.y_root, ev->xbutton.x, ev->xbutton.y); +#endif + if( !keyrouter.popup ) + { + keyrouter.popup_rootx = ev->xbutton.x_root; + keyrouter.popup_rooty = ev->xbutton.y_root; + keyrouter.rbutton_pressed_on_popup = 0; + popup_show(); + } + + return 1; + } + else + return 1; + + ev->xany.display = keyrouter.disp; + ev->xkey.keycode = xdevkey->keycode; + ev->xkey.time = xdevkey->time; + + //KeyRelease handling for key composition + if( ev->type == KeyRelease ) + { + if( keyrouter.modkey.composited ) + { + if( keyrouter.modkey.idx_mod == IsModKey(ev) ) + { + //deliver the key + DeliverDeviceKeyEvents(ev, 0); + + //send cancel key release + DeliverDeviceKeyEvents(ev, keyrouter.modkey.cancel_key.keycode); + keyrouter.modkey.composited -= 1; + } + else if(IsCompKey(ev) ) + { + keyrouter.modkey.composited -= 2; + } + + if( keyrouter.modkey.composited <= 0) + { + ResetModKeyInfo(); + } + else + { + fprintf(stderr, "[keyrouter][%s] NOT ALL RELEASED modkey.composited=%d)\n", __FUNCTION__, keyrouter.modkey.composited); + } + + return 1; + } + else + { + //deliver the key + DeliverDeviceKeyEvents(ev, 0); + + ResetModKeyInfo(); + return 1; + } + } + + //KeyPress handling for key composition + if( ev->type == KeyPress ) + { +#ifdef __DEBUG__ + fprintf(stderr, "\n[keyrouter][%s] KeyPress (keycode:%d)\n", __FUNCTION__, ev->xkey.keycode); +#endif//__DEBUG__ + + if( !keyrouter.modkey.set ) + { + //check modifier key + keyrouter.modkey.idx_mod = IsModKey(ev); + + if( keyrouter.modkey.idx_mod ) + { + fprintf(stderr, "\n[keyrouter][%s] Modifier Key ! (keycode=%d)\n", __FUNCTION__, ev->xkey.keycode); + keyrouter.modkey.set = 1; + keyrouter.modkey.time = ev->xkey.time; + } + else + ResetModKeyInfo(); + + //deliver the key + DeliverDeviceKeyEvents(ev, 0); + return 1; + } + + keyrouter.modkey.composited = IsKeyComposited(ev); + + if( keyrouter.modkey.composited ) + { + fprintf(stderr, "\n[keyrouter][%s] Composition Key ! (keycode=%d)\n", __FUNCTION__, ev->xkey.keycode); + + //send cancel key press to Modifier Key-grabbed window(s) + ev->xkey.keycode = keyrouter.modkey.keys[keyrouter.modkey.idx_mod-1].keycode; + DeliverDeviceKeyEvents(ev, keyrouter.modkey.cancel_key.keycode); + + //Do Action : ex> send ClientMessage to root window + DoKeyCompositionAction(); + return 1; + } + + //deliver the key + DeliverDeviceKeyEvents(ev, 0); + + ResetModKeyInfo(); + return 1; + } + + return 1; +} +#else//_F_USE_XI_GRABDEVICE_ +static int +_e_keyrouter_cb_event_generic(void *data, int ev_type, void *event) +{ + Ecore_X_Event_Generic *e = (Ecore_X_Event_Generic *)event; + XIDeviceEvent *evData = (XIDeviceEvent *)(e->data); + + if( e->extension != keyrouter.xi2_opcode || ( e->evtype != XI_KeyPress && e->evtype != XI_KeyRelease )) + { + fprintf(stderr, "[keyrouter][%s] Invalid event !(extension:%d, evtype:%d)\n", __FUNCTION__, e->extension, e->evtype); + return 1; + } + + if( !evData ) + { + fprintf(stderr, "[keyrouter][%s] e->data is NULL !\n", __FUNCTION__); + return 1; + } + + if( evData->send_event ) + { + return 0; + } + + keyrouter.gcookie->data = (XIDeviceEvent *)malloc(sizeof(XIDeviceEvent)); + + if( !keyrouter.gcookie->data ) + { + fprintf(stderr, "[keyrouter][%s] Failed to allocate memory for XIDeviceEvent !\n", __FUNCTION__); + return 1; + } + +#ifdef __DEBUG__ + fprintf(stderr, "[keyrouter][%s] evData->deviceid=%d, evData->sourceid=%d\n", __FUNCTION__, evData->deviceid, evData->sourceid); +#endif + + evData->deviceid = 3;//Virtual Core Keyboard + evData->child = None; + + //KeyPress or KeyRelease + keyrouter.gev->type = e->evtype; + keyrouter.gev->xkey.keycode = evData->detail; + + //XI_KeyPress or XI_KeyRelease + keyrouter.gcookie->evtype = e->evtype; + keyrouter.gcookie->cookie = e->cookie; + memcpy(keyrouter.gcookie->data, e->data, sizeof(XIDeviceEvent)); + +#ifdef __DEBUG__ + fprintf(stderr, "[keyrouter][%s] cookie->type=%d, cookie->extension=%d, cookie->evtype=%d, cookie->cookie=%d\n", __FUNCTION__, keyrouter.gcookie->type, keyrouter.gcookie->extension, keyrouter.gcookie->evtype, keyrouter.gcookie->cookie); + switch( keyrouter.gcookie->evtype ) + { + case XI_KeyPress: + fprintf(stderr, "[keyrouter][%s] XI_KeyPress!\n", __FUNCTION__); + break; + + case XI_KeyRelease: + fprintf(stderr, "[keyrouter][%s] XI_KeyRelease!\n", __FUNCTION__); + break; + } +#endif + + DeliverKeyEvents(keyrouter.gev, keyrouter.gcookie); + +out: + if( keyrouter.gcookie->data ) + free( keyrouter.gcookie->data ); + + return 1; +} +#endif//_F_USE_XI_GRABDEVICE_ + +static int +_e_keyrouter_cb_event_generic(void *data, int ev_type, void *event) +{ + Ecore_X_Event_Generic *e = (Ecore_X_Event_Generic *)event; + XIDeviceEvent *evData = (XIDeviceEvent *)(e->data); + + if( e->extension != keyrouter.xi2_opcode ) + { + fprintf(stderr, "[keyrouter][%s] Invalid event !(extension:%d, evtype:%d)\n", __FUNCTION__, e->extension, e->evtype); + return 1; + } + + if( !evData || evData->send_event ) + { + fprintf(stderr, "[keyrouter][%s] Generic event data is not available or the event was sent via XSendEvent (and will be ignored) !\n", __FUNCTION__); + return 1; + } + + switch( e->evtype ) + { + case XI_HierarchyChanged: + _e_keyrouter_xi2_device_hierarchy_handler((XIHierarchyEvent *)evData); + break; + + case XI_ButtonRelease: + if( evData->detail != 1 && evData->detail != 3 ) + break; + + if( keyrouter.popup && evData->child != keyrouter.popup->evas_win ) + { + if( !keyrouter.rbutton_pressed_on_popup ) + popup_destroy(); + else + keyrouter.rbutton_pressed_on_popup = 0; + } + break; + } + + return 1; +} + +static int +_e_keyrouter_cb_window_create(void *data, int ev_type, void *ev) +{ + Ecore_X_Window_Attributes att; + Ecore_X_Event_Window_Create *e = ev; + + //Check if current window is TOP-level window or not + if( !e || keyrouter.rootWin != e->parent || !e->win ) + return 1; + + //Setting PropertyChangeMask and SubstructureNotifyMask for TOP-level window (e->win) + ecore_x_window_attributes_get(e->win, &att); + XSelectInput(keyrouter.disp, e->win, att.event_mask.mine | PropertyChangeMask | StructureNotifyMask); + XSync(keyrouter.disp, False); + +#ifdef __DEBUG__ + printf("[keyrouter][%s] TOP-level window ! (id=0x%x, parent=0x%x, override=%d)\n", __FUNCTION__, e->win, e->parent, e->override); +#endif + + int ret = 0, count = 0; + int i, result, keycode, grab_mode; + unsigned int *prop_data = NULL; + + //Get the window property using the atom + ret = ecore_x_window_prop_property_get (e->win, keyrouter.atomGrabKey, ECORE_X_ATOM_CARDINAL, 32, (unsigned char **)&prop_data, &count); + + if( !ret || !prop_data ) + goto out; + + //property¸¦ º¸°í list¿¡ add + for( i=0 ; i < count ; i++ ) + { + grab_mode = prop_data[i] & GRAB_MODE_MASK; + keycode = prop_data[i] & (~GRAB_MODE_MASK); + +#ifdef __DEBUG__ + printf("[keyrouter][%s] prop_data[%d] = %d, keycode = %d(hex:%x), grab_mode = %d(hex:%x)\n", __FUNCTION__, i, (int)(prop_data[i]), keycode, keycode, grab_mode, grab_mode); +#endif + + result = AddWindowToDeliveryList(e->win, keycode, grab_mode, 1); + + if( result ) + { + fprintf(stderr, "[keyrouter][%s] Failed to add window (0x%x) to delivery list ! keycode=%x, grab_mode=0x%X\n", __FUNCTION__, e->win, keycode, grab_mode); + goto out; + } + } + +out: + if(prop_data) free(prop_data); + return 1; + } + +static int +_e_keyrouter_cb_window_property(void *data, int ev_type, void *ev) +{ + Ecore_X_Event_Window_Property *e = ev; + + int ret = 0, count = 0; + unsigned int *prop_data = NULL; + + int res = -1; + unsigned int ret_val = 0; + + //check and rotate popup menu + if( e->atom == ECORE_X_ATOM_E_ILLUME_ROTATE_ROOT_ANGLE && e->win == keyrouter.rootWin ) + { + res = ecore_x_window_prop_card32_get(e->win, ECORE_X_ATOM_E_ILLUME_ROTATE_ROOT_ANGLE, &ret_val, 1); + + if( res == 1 ) + { + if( keyrouter.popup_angle != ret_val ) + { + keyrouter.popup_angle = ret_val; + if( !keyrouter.popup ) goto out; + popup_update(); + } + } + + goto out; + } + + //check and enable/disable mouse cursor + if( e->atom == keyrouter.atomXMouseCursorEnable && e->win == keyrouter.rootWin ) + { + res = ecore_x_window_prop_card32_get(e->win, keyrouter.atomXMouseCursorEnable, &ret_val, 1); + + if( 1 == res ) + _e_keyrouter_mouse_cursor_enable(ret_val); + + goto out; + } + + if( e->atom == keyrouter.atomDeviceStatus && e->win == keyrouter.rootWin ) + { + res = ecore_x_window_prop_card32_get(e->win, keyrouter.atomDeviceStatus, &ret_val, 1); + + if( res == 1 ) + { + Device_Status(ret_val); + } + + goto out; + } + + if( e->atom == keyrouter.atomGrabStatus && e->win == keyrouter.rootWin ) + { + res = ecore_x_window_prop_card32_get(e->win, keyrouter.atomGrabStatus, &ret_val, 1); + + if( res == 1 ) + { + Keygrab_Status(ret_val); + } + + goto out; + } + + //See the client window has interesting atom (_atomGrabKey) + if( e->atom != keyrouter.atomGrabKey) + goto out; + +#ifdef __DEBUG__ + printf("[keyrouter][%s] PropertyNotify received (Client Window = 0x%x, Atom = %d)\n", __FUNCTION__, e->win, e->atom); +#endif + + //Get the window property using the atom + ret = ecore_x_window_prop_property_get (e->win, e->atom, ECORE_X_ATOM_CARDINAL, 32, (unsigned char **)&prop_data, &count); + + if( !ret || !prop_data ) + { +#ifdef __DEBUG__ + printf("[keyrouter][%s] Failed to get window property OR window property is empty ! (window = 0x%x)\n", __FUNCTION__, e->win); +#endif + RemoveWindowDeliveryList(e->win, 0, 0); + goto out; + } + +#ifdef __DEBUG__ + PrintKeyDeliveryList(); +#endif + + RemoveWindowDeliveryList(e->win, 0, 0); + +#ifdef __DEBUG__ + PrintKeyDeliveryList(); +#endif + + int i, result; + int keycode; + int grab_mode; + + //property¸¦ º¸°í list¿¡ add + for( i=0 ; i < count ; i++ ) + { + grab_mode = prop_data[i] & GRAB_MODE_MASK; + keycode = prop_data[i] & (~GRAB_MODE_MASK); + +#ifdef __DEBUG__ + printf("[keyrouter][%s] prop_data[%d] = %d, keycode = %d(hex:%x), grab_mode = %d(hex:%x)\n", __FUNCTION__, i, (int)(prop_data[i]), keycode, keycode, grab_mode, grab_mode); +#endif + +#ifdef __DEBUG__ + PrintKeyDeliveryList(); +#endif + result = AddWindowToDeliveryList(e->win, keycode, grab_mode, 1); + + if( result ) + { + fprintf(stderr, "[keyrouter][%s] Failed to add window (0x%x) to delivery list ! keycode=%x, grab_mode=0x%X\n", __FUNCTION__, e->win, keycode, grab_mode); + goto out; + } + +#ifdef __DEBUG__ + PrintKeyDeliveryList(); +#endif + } + +out: + if(prop_data) free(prop_data); + return 1; +} + +static int +_e_keyrouter_cb_e_border_stack(void *data, int ev_type, void *ev) +{ + E_Event_Border_Stack *e = ev; + + if(!e->border) + return 1; + +#ifdef __DEBUG__ + printf("[keyrouter][%s] E_EVENT_BORDER_STACK received (e->border->win = 0x%x, Client window = 0x%x) !\n", __FUNCTION__, e->border->win, e->border->client.win); +#endif + + keyrouter.isWindowStackChanged = 1; + + if( e->type == E_STACKING_ABOVE ) + { +#ifdef __DEBUG__ + printf("[keyrouter][%s] == TOP == (window : 0x%x)\n", __FUNCTION__, e->border->client.win); +#endif + AdjustTopPositionDeliveryList(e->border->client.win, 1); +#ifdef __DEBUG__ + PrintKeyDeliveryList(); +#endif + } + else + { +#ifdef __DEBUG__ + printf("[keyrouter][%s] == NO TOP == (window : 0x%x)\n", __FUNCTION__, e->border->client.win); +#endif + AdjustTopPositionDeliveryList(e->border->client.win, 0); +#ifdef __DEBUG__ + PrintKeyDeliveryList(); +#endif + } + + return 1; +} + +static int +_e_keyrouter_cb_e_border_remove(void *data, int ev_type, void *ev) +{ + int ret = 0; + unsigned int ret_val = 0; + + E_Event_Border_Remove *e = ev; + + if(!e->border) + return 1; + else + { + ret = ecore_x_window_prop_card32_get(e->border->client.win, E_ATOM_MANAGED, &ret_val, 1); + + if( ret != 1 ) + { +#ifdef __DEBUG__ + printf("[keyrouter][%s] E_EVENT_BORDER_REMOVE ! Client Window is destroyed !(window : 0x%x)\n", __FUNCTION__, e->border->client.win); +#endif + keyrouter.isWindowStackChanged = 1; + RemoveWindowDeliveryList(e->border->client.win, 0, 1); + return 1; + } + + if( ret_val == 1 ) + { +#ifdef __DEBUG__ + printf("[keyrouter][%s] E_EVENT_BORDER_REMOVE ! Client Window is destroyed !(window : 0x%x)\n", __FUNCTION__, e->border->client.win); +#endif + keyrouter.isWindowStackChanged = 1; + RemoveWindowDeliveryList(e->border->client.win, 0, 1); + return 1; + } + + if( ret_val == 0 ) + { +#ifdef __DEBUG__ + printf("[keyrouter][%s] E_EVENT_BORDER_REMOVE ! Client Window is hidden !(window : 0x%x)\n", __FUNCTION__, e->border->client.win); +#endif + keyrouter.isWindowStackChanged = 1; + RemoveWindowDeliveryList(e->border->client.win, 0, 1); + return 1; + } + } + + return 1; +} + +static int +_e_keyrouter_cb_window_destroy(void *data, int ev_type, void *ev) +{ + E_Border *bd; + Ecore_X_Event_Window_Destroy *e = ev; + + //Skip for client windows which have border as their parents + bd = e_border_find_by_client_window(e->win); + if( bd ) + return 1; + +#ifdef __DEBUG__ + printf("[keyrouter][%s] DestroyNotify received (Top-level Window = 0x%x, event_win = 0x%x) !\n", __FUNCTION__, e->win, e->event_win); +#endif + + keyrouter.isWindowStackChanged = 1; + RemoveWindowDeliveryList(e->win, 0, 1); + + return 1; +} + +static int +_e_keyrouter_cb_window_configure(void *data, int ev_type, void *ev) +{ + E_Border *bd; + Ecore_X_Event_Window_Configure *e = ev; + + //Skip for client windows which have border as their parents + bd = e_border_find_by_client_window(e->win); + if( bd ) + return 1; + + if( keyrouter.rootWin != e->event_win ) + return 1; + +#ifdef __DEBUG__ + printf("[keyrouter][%s] ConfigureNotify received (Top-level Window = 0x%x, above win = 0x%x, event win = 0x%x, override = %d, from_wm = %d)\n", __FUNCTION__, e->win, e->abovewin, e->event_win, e->override, e->from_wm); +#endif + + keyrouter.isWindowStackChanged = 1; + AdjustTopPositionDeliveryList(e->win, !!e->abovewin); + + return 1; +} + +static int +_e_keyrouter_cb_window_stack(void *data, int ev_type, void *ev) +{ + E_Border *bd; + Ecore_X_Event_Window_Stack *e = ev; + + //Skip for client windows which have border as their parents + bd = e_border_find_by_client_window(e->win); + if( bd ) + return 1; + + if( keyrouter.rootWin != e->event_win ) + return 1; + +#ifdef __DEBUG__ + printf("[keyrouter][%s] CirculateNotify received (Top-level Window = 0x%x, event_win = 0x%x, detail = %d)\n", __FUNCTION__, e->win, e->event_win, e->detail); +#endif + + keyrouter.isWindowStackChanged = 1; + AdjustTopPositionDeliveryList(e->win, !e->detail); + + return 1; +} + +//e17 bindings functions and action callbacks + +static int +_e_keyrouter_modifiers(E_Binding_Modifier modifiers) +{ + int mod = 0; + + if (modifiers & E_BINDING_MODIFIER_SHIFT) mod |= ECORE_EVENT_MODIFIER_SHIFT; + if (modifiers & E_BINDING_MODIFIER_CTRL) mod |= ECORE_EVENT_MODIFIER_CTRL; + if (modifiers & E_BINDING_MODIFIER_ALT) mod |= ECORE_EVENT_MODIFIER_ALT; + if (modifiers & E_BINDING_MODIFIER_WIN) mod |= ECORE_EVENT_MODIFIER_WIN; + /* see comment in e_bindings on numlock + if (modifiers & ECORE_X_LOCK_NUM) mod |= ECORE_X_LOCK_NUM; + */ + + return mod; +} + +static void _e_keyrouter_do_bound_key_action(XEvent *xev) +{ + Ecore_Event_Key *ev; + int keycode = xev->xkey.keycode; + + if( !keyrouter.HardKeys[keycode].bind ) + { + fprintf(stderr, "[keyrouter][do_bound_key_action] bind info of key(%d) is NULL !\n", keycode); + return; + } + + ev = malloc(sizeof(Ecore_Event_Key)); + + if( !ev ) + { + fprintf(stderr, "[keyrouter][do_bound_key_action] Failed to allocate memory for Ecore_Event_Key !\n"); + return; + } + + ev->keyname = (char *)malloc(strlen(keyrouter.HardKeys[keycode].bind->key)+1); + ev->key = (char *)malloc(strlen(keyrouter.HardKeys[keycode].bind->key)+1); + + if( !ev->keyname || !ev->key ) + { + fprintf(stderr, "[keyrouter][do_bound_key_action] Failed to allocate memory for key name !\n"); + return; + } + + strncpy((char *)ev->keyname, keyrouter.HardKeys[keycode].bind->key, strlen(keyrouter.HardKeys[keycode].bind->key)+1); + strncpy((char *)ev->key, keyrouter.HardKeys[keycode].bind->key, strlen(keyrouter.HardKeys[keycode].bind->key)+1); + + ev->compose = NULL; + ev->string = NULL; + ev->modifiers = 0; + ev->timestamp = xev->xkey.time; + ev->event_window = xev->xkey.window; + ev->root_window = xev->xkey.root; + ev->same_screen = xev->xkey.same_screen; + ev->window = xev->xkey.subwindow ? xev->xkey.subwindow : xev->xkey.window; + + if( xev->type == KeyPress ) + e_bindings_key_down_event_handle(keyrouter.HardKeys[keycode].bind->ctxt, NULL, ev); + else + e_bindings_key_up_event_handle(keyrouter.HardKeys[keycode].bind->ctxt, NULL, ev); +} + +static void _e_keyrouter_xi2_device_hierarchy_handler(XIHierarchyEvent *event) +{ + int i; + + if( event->flags & XIDeviceEnabled || event->flags & XIDeviceDisabled ) + { + for( i = 0 ; i < event->num_info ; i++ ) + { + if( event->info[i].flags & XIDeviceEnabled ) + { + _e_keyrouter_device_add(event->info[i].deviceid, event->info[i].use); + } + else if( event->info[i].flags & XIDeviceDisabled ) + { + _e_keyrouter_device_remove(event->info[i].deviceid, event->info[i].use); + } + } + } +} + +static int _e_keyrouter_is_relative_device(int deviceid) +{ + char *tmp = NULL; + Atom act_type; + unsigned long nitems, bytes_after; + unsigned char *data, *ptr; + int j, act_format, ret = 0; + + if (XIGetProperty(keyrouter.disp, deviceid, keyrouter.atomPointerType, 0, 1000, False, + XA_ATOM, &act_type, &act_format, + &nitems, &bytes_after, &data) != Success) + { + fprintf(stderr, "[keyrouter][%s] Failed to get XI2 device property !(deviceid=%d)\n", __FUNCTION__, deviceid); + return -1; + } + + if( !nitems ) + goto out; + + ptr = data; + + for (j = 0; j < nitems; j++) + { + switch(act_type) + { + case XA_ATOM: + { + Atom atomTemp = *(Atom*)ptr; + tmp = XGetAtomName(keyrouter.disp, atomTemp); + if( atomTemp && strcasestr(tmp, "Rel X") ) + { + ret = 1; + goto out; + } + } + break; + } + + ptr += act_format/8; + } + +out: + if( data ) + XFree(data); + if( tmp ) + XFree(tmp); + + return ret; +} + +static void _e_keyrouter_device_add(int id, int type) +{ + int ndevices; + XIDeviceInfo *info = NULL; + + if( type == XISlavePointer ) + { + if( !_e_keyrouter_is_relative_device(id ) ) + return; + + info = XIQueryDevice(keyrouter.disp, id, &ndevices); + + if( !info || ndevices <= 0 ) + { + fprintf(stderr, "[keyrouter][%s] There is no queried XI device. (device id=%d, type=%d)\n", __FUNCTION__, id, type); + goto out; + } + + E_Keyrouter_Device_Info *data = malloc(sizeof(E_Keyrouter_Device_Info)); + + if( !data ) + { + fprintf(stderr, "[keyrouter][%s] Failed to allocate memory for device info !\n", __FUNCTION__); + goto out; + } + + data->id = id; + data->name = eina_stringshare_add(info->name); + data->type = E_KEYROUTER_MOUSE; + + keyrouter.device_list = eina_list_append(keyrouter.device_list, data); + keyrouter.num_pointer_devices++; + + if( keyrouter.num_pointer_devices == 1 ) + _e_keyrouter_set_mouse_exist(1, 1); + + fprintf(stderr, "[keyrouter][%s] Slave pointer device (id=%d, name=%s, num_pointer_devices=%d) was added/enabled !\n", + __FUNCTION__, id, info->name, keyrouter.num_pointer_devices); + } + else if( type == XISlaveKeyboard ) + { + info = XIQueryDevice(keyrouter.disp, id, &ndevices); + + if( !info || ndevices <= 0 ) + { + fprintf(stderr, "[keyrouter][%s] There is no queried XI device. (device id=%d, type=%d)\n", __FUNCTION__, id, type); + goto out; + } + + E_Keyrouter_Device_Info *data = malloc(sizeof(E_Keyrouter_Device_Info)); + + if( !data ) + { + fprintf(stderr, "[keyrouter][%s] Failed to allocate memory for device info !\n", __FUNCTION__); + goto out; + } + + if( strcasestr(info->name, "keyboard") && !strcasestr(info->name, "XTEST" ) )//keyboard + { + data->id = id; + data->name = eina_stringshare_add(info->name); + data->type = E_KEYROUTER_KEYBOARD; + + keyrouter.device_list = eina_list_append(keyrouter.device_list, data); + keyrouter.num_keyboard_devices++; + + if( keyrouter.num_keyboard_devices >= 1 ) + _e_keyrouter_set_keyboard_exist((unsigned int)keyrouter.num_keyboard_devices, 1); + + fprintf(stderr, "[keyrouter][%s] Slave keyboard device (id=%d, name=%s, num_keyboard_devices=%d) was added/enabled !\n", + __FUNCTION__, id, info->name, keyrouter.num_keyboard_devices); + } + else//HW key + { + int result = GrabKeyDevice(keyrouter.rootWin, NULL, id); + + if( !result ) + { + fprintf(stderr, "[keyrouter][%s] Failed to grab key device (id = %d, result = %d)\n", __FUNCTION__, id, result); + goto out; + } + else + { + fprintf(stderr, "[keyrouter][%s] Slave key device (id=%d, name=%s) was added !\n", __FUNCTION__, id, info->name); + detachSlave(id); + } + + data->type = E_KEYROUTER_HWKEY; + data->id = id; + data->name = eina_stringshare_add(info->name); + + keyrouter.device_list = eina_list_append(keyrouter.device_list, data); + } + } + +out: + if( info ) XIFreeDeviceInfo(info); +} + +static void _e_keyrouter_device_remove(int id, int type) +{ + Eina_List* l; + E_Keyrouter_Device_Info *data; + + if( !keyrouter.device_list ) + { + fprintf(stderr, "[keyrouter][%s] device list is empty ! something's wrong ! (id=%d, type=%d)\n", __FUNCTION__, id, type); + goto out; + } + + EINA_LIST_FOREACH(keyrouter.device_list, l, data) + { + if( data && data->id == id ) + { + switch( data->type ) + { + case E_KEYROUTER_HWKEY: + fprintf(stderr, "[keyrouter][%s] Slave key device (id=%d, name=%s, type=%d) was removed/disabled !\n", + __FUNCTION__, id, data->name, type); + + keyrouter.device_list = eina_list_remove(keyrouter.device_list, data); + free(data); + goto out; + + case E_KEYROUTER_KEYBOARD: + keyrouter.num_keyboard_devices--; + + if( keyrouter.num_keyboard_devices <= 0 ) + { + keyrouter.num_keyboard_devices = 0; + _e_keyrouter_set_keyboard_exist(0, 0); + } + + fprintf(stderr, "[keyrouter][%s] Slave keyboard device (id=%d, name=%s, type=%d, num_keyboard_devices=%d) was removed/disabled !\n", + __FUNCTION__, id, data->name, type, keyrouter.num_keyboard_devices); + + keyrouter.device_list = eina_list_remove(keyrouter.device_list, data); + free(data); + goto out; + + case E_KEYROUTER_MOUSE: + keyrouter.num_pointer_devices--; + + if( keyrouter.num_pointer_devices <= 0 ) + { + keyrouter.num_pointer_devices = 0; + _e_keyrouter_set_mouse_exist(0, 1); + } + + fprintf(stderr, "[keyrouter][%s] Slave pointer device (id=%d, name=%s, type=%d, num_pointer_devices=%d) was removed/disabled !\n", + __FUNCTION__, id, data->name, type, keyrouter.num_pointer_devices); + + keyrouter.device_list = eina_list_remove(keyrouter.device_list, data); + free(data); + goto out; + + default: + fprintf(stderr, "[keyrouter][%s] Unknown type of device ! (id=%d, type=%d, name=%s, device type=%d)\n", + __FUNCTION__, data->id, type, data->name, data->type); + keyrouter.device_list = eina_list_remove(keyrouter.device_list, data); + free(data); + goto out; + } + } + } + +out: + return; +} + +static void _e_keyrouter_mouse_cursor_enable(unsigned int val) +{ + if( !val ) + { + keyrouter.num_pointer_devices--; + if( keyrouter.num_pointer_devices <= 0 ) + { + keyrouter.num_pointer_devices = 0; + _e_keyrouter_set_mouse_exist(0, 0); + } + } + else if( 1 == val ) + { + keyrouter.num_pointer_devices++; + if( keyrouter.num_pointer_devices == 1 ) + _e_keyrouter_set_mouse_exist(1, 0); + } +} + +static void _e_keyrouter_set_mouse_exist(unsigned int val, int propset) +{ + if( !val ) + { + system("/usr/bin/xberc cursor_enable 0"); + if( propset ) ecore_x_window_prop_card32_set(keyrouter.rootWin, keyrouter.atomXMouseExist, &val, 1); + } + else if( 1 == val ) + { + system("/usr/bin/xberc cursor_enable 1"); + if( propset ) ecore_x_window_prop_card32_set(keyrouter.rootWin, keyrouter.atomXMouseExist, &val, 1); + } + else + fprintf(stderr, "[keyrouter][%s] Invalid value for enabling cursor !(val=%d)\n", __FUNCTION__, val); +} + +static void _e_keyrouter_set_keyboard_exist(unsigned int val, int is_connected) +{ + ecore_x_window_prop_card32_set(keyrouter.rootWin, keyrouter.atomXExtKeyboardExist, &val, 1); + + if( !is_connected ) + return; + + system("/usr/bin/xmodmap /opt/etc/X11/Xmodmap"); +} + +static E_Zone* _e_keyrouter_get_zone() +{ + Eina_List *ml; + E_Manager *man; + E_Zone *zone = NULL; + + if( keyrouter.zone ) + return keyrouter.zone; + + EINA_LIST_FOREACH(e_manager_list(), ml, man) + { + if (man) + { + Eina_List *cl; + E_Container *con; + + EINA_LIST_FOREACH(man->containers, cl, con) + { + if (con) + { + Eina_List *zl; + E_Zone *z; + + EINA_LIST_FOREACH(con->zones, zl, z) + { + if (z) zone = z; + } + } + } + } + } + + return zone; +} + +int _e_keyrouter_init() +{ + int ret = 1; + int grab_result; + //int (*m_old_error)(Display *, XErrorEvent *); + + _e_keyrouter_structure_init(); + keyrouter.disp = NULL; + keyrouter.disp = ecore_x_display_get(); + + if( !keyrouter.disp ) + { + fprintf(stderr, "[keyrouter] Failed to open display..!\n"); + ret = 0; + goto out; + } + + keyrouter.rootWin = DefaultRootWindow(keyrouter.disp); + + _e_keyrouter_x_input_init(); + + InitGrabKeyDevices(); + _e_keyrouter_bindings_init(); + + keyrouter.atomDeviceStatus = ecore_x_atom_get(STR_ATOM_DEVICE_STATUS); + keyrouter.atomGrabStatus = ecore_x_atom_get(STR_ATOM_GRAB_STATUS); + keyrouter.atomGrabKey = ecore_x_atom_get(STR_ATOM_GRAB_KEY); + keyrouter.atomGrabExclWin = ecore_x_atom_get(STR_ATOM_GRAB_EXCL_WIN); + keyrouter.atomGrabORExclWin = ecore_x_atom_get(STR_ATOM_GRAB_OR_EXCL_WIN); + keyrouter.atomXMouseExist = ecore_x_atom_get(PROP_X_MOUSE_EXIST); + keyrouter.atomXMouseCursorEnable = ecore_x_atom_get(PROP_X_MOUSE_CURSOR_ENABLE); + keyrouter.atomXExtKeyboardExist = ecore_x_atom_get(PROP_X_EXT_KEYBOARD_EXIST); + keyrouter.atomPointerType = ecore_x_atom_get(PROP_X_EVDEV_AXIS_LABELS); + + keyrouter.zone = _e_keyrouter_get_zone(); + if( !keyrouter.zone ) + { + fprintf(stderr, "[keyrouter] Failed to get zone !\n"); + ret = 0; + goto out; + } + + ecore_x_window_button_grab(keyrouter.rootWin, 3, ECORE_X_EVENT_MASK_MOUSE_DOWN | + ECORE_X_EVENT_MASK_MOUSE_UP | + ECORE_X_EVENT_MASK_MOUSE_MOVE, 0, 1); + +#ifndef _F_USE_XI_GRABDEVICE_ + grab_result = GrabKeyDevices(keyrouter.rootWin); + + if( !grab_result ) + { + fprintf(stderr, "[keyrouter] Failed to GrabDevices() !\n"); + ret = 0; + goto out; + } + + keyrouter.DeviceKeyPress = keyrouter.nInputEvent[INPUTEVENT_KEY_PRESS]; + keyrouter.DeviceKeyRelease = keyrouter.nInputEvent[INPUTEVENT_KEY_RELEASE]; +#else//_F_USE_XI_GRABDEVICE_ + grab_result = GrabXIKeyDevices(); + + if( !grab_result ) + { + fprintf(stderr, "[keyrouter] Failed to GrabXIKeyDevices() !\n"); + ret = 0; + goto out; + } +#endif//_F_USE_XI_GRABDEVICE_ + + memset(&keyrouter.modkey, 0L, sizeof(keyrouter.modkey)); + InitModKeys(); + InitHardKeyCodes(); + + BuildKeyGrabList(keyrouter.rootWin); + +out: + return ret; +} + +void _e_keyrouter_fini() +{ +#ifndef _F_USE_XI_GRABDEVICE_ + UngrabKeyDevices(); +#else + UngrabXIKeyDevices(); +#endif +} + +static void _e_keyrouter_structure_init() +{ + memset(&keyrouter, 0L, sizeof(keyrouter)); + + keyrouter.fplog = stderr; + keyrouter.DeviceKeyPress = -1; + keyrouter.DeviceKeyRelease = -1; + keyrouter.xi2_opcode = -1; + keyrouter.isWindowStackChanged = 1; + keyrouter.popup_angle = 0; + keyrouter.toggle = 0; + keyrouter.device_list = NULL; + keyrouter.num_pointer_devices = 0; + keyrouter.num_keyboard_devices = 0; + keyrouter.num_hwkey_devices = 0; + + keyrouter.atomXMouseExist = None; + keyrouter.atomXMouseCursorEnable = None; + keyrouter.atomXExtKeyboardExist = None; + keyrouter.atomGrabKey = None; + keyrouter.atomDeviceStatus = None; + keyrouter.atomGrabStatus = None; + keyrouter.atomGrabExclWin = None; + keyrouter.atomGrabORExclWin = None; +} + +static void _e_keyrouter_bindings_init() +{ + int i; + int keycode; + KeySym ksym; + + for( i = 0 ; i < NUM_HWKEYS ; i++ ) + { + if( HWKeys[i] ) + { + ksym = XStringToKeysym(HWKeys[i]); + + if( ksym ) + keycode = XKeysymToKeycode(keyrouter.disp, ksym); + else + keycode = 0; + + if( !keycode || keycode >= 255 ) + { +#ifdef __DEBUG__ + fprintf(stderr, "[keyrouter][%s] Failed to get keycode from keyname(=%s),(i=%d) !\n", __FUNCTION__, HWKeys[i], i); +#endif//__DEBUG__ + continue; + } + + //get bound key information + keyrouter.HardKeys[keycode].bind = e_bindings_key_find(HWKeys[i], E_BINDING_MODIFIER_NONE, 1); + + if( !keyrouter.HardKeys[keycode].bind || strcmp(keyrouter.HardKeys[keycode].bind->key, HWKeys[i]) ) + { +#ifdef __DEBUG__ + fprintf(stderr, "[keyrouter][%s] Failed to get bound key using e_bindings_key_find() (keyname=%s)!\n", __FUNCTION__, HWKeys[i]); +#endif//__DEBUG__ + continue; + } + + //ungrab bound key(s) + ecore_x_window_key_ungrab(keyrouter.rootWin, keyrouter.HardKeys[keycode].bind->key, + _e_keyrouter_modifiers(keyrouter.HardKeys[keycode].bind->mod), keyrouter.HardKeys[keycode].bind->any_mod); + + fprintf(stderr, "[keyrouter][bindings_init] %s (keycode:%d) was bound !!\n", keyrouter.HardKeys[keycode].bind->key, keycode); + } + else + break; + } +} + +static int GetItemFromWindow(Window win, const char* atom_name, unsigned int **key_list) +{ + Atom ret_type; + int ret_format; + unsigned long nr_item = 0; + unsigned long sz_remains_data; + Atom grabKey; + + grabKey = XInternAtom(keyrouter.disp, atom_name, False); + + if (XGetWindowProperty(keyrouter.disp, win, grabKey, 0, 0x7fffffff, False, XA_CARDINAL, + &ret_type, &ret_format, &nr_item, + &sz_remains_data, (unsigned char **)key_list) != Success) + { + nr_item = 0; + } + + return nr_item; +} + +static void BuildKeyGrabList(Window root) +{ + Window tmp; + Window *childwins = NULL; + unsigned int num_children; + register unsigned int i, j; + int grab_mode, keycode; + unsigned int *key_list = NULL; + int n_items = 0; + + XGrabServer(keyrouter.disp); + XQueryTree(keyrouter.disp, root, &tmp, &tmp, &childwins, &num_children); + XUngrabServer(keyrouter.disp); + + for( i=0 ; i < num_children; i++ ) + { +#ifdef __DEBUG__ + printf("[keyrouter][%s] window = 0x%X\n", __FUNCTION__, (int)(childwins[i])); +#endif + BuildKeyGrabList(childwins[i]); + + n_items = GetItemFromWindow(childwins[i], STR_ATOM_GRAB_KEY, &key_list); + if( n_items ) + { + for( j=0 ; j < n_items ; j++ ) + { + grab_mode = key_list[j] & GRAB_MODE_MASK; + keycode = key_list[j] & (~GRAB_MODE_MASK); +#ifdef __DEBUG__ + printf("[keyrouter][%s] window = 0x%x, grab_mode = 0x%X, keycode = %d\n", __FUNCTION__, (int)(childwins[i]), grab_mode, keycode); +#endif + AddWindowToDeliveryList(childwins[i], keycode, grab_mode, 1); + } + } + } + + if( key_list ) XFree(key_list); + if( num_children ) XFree(childwins); +} + +static void InitGrabKeyDevices() +{ + memset(keyrouter.HardKeys, (int)NULL, sizeof(keyrouter.HardKeys)); +} + +#ifndef _F_USE_XI_GRABDEVICE_ +//Function for getting device pointer through device name +static int GrabKeyDevice(Window win, + const char* DeviceName, + const int DeviceID) +{ + int result; + XEventClass eventList[32]; + XEventClass cls; + + XDevice* pDev = NULL; + + pDev = XOpenDevice(keyrouter.disp, DeviceID); + + if( !pDev ) + { + fprintf(stderr, "[keyrouter][%s] Fail to open the device (id=%d) !\n", __FUNCTION__, DeviceID); + goto out; + } + + /* key events */ + DeviceKeyPress(pDev, keyrouter.nInputEvent[INPUTEVENT_KEY_PRESS], cls); + if( cls ) eventList[INPUTEVENT_KEY_PRESS] = cls; + DeviceKeyRelease(pDev, keyrouter.nInputEvent[INPUTEVENT_KEY_RELEASE], cls); + if( cls ) eventList[INPUTEVENT_KEY_RELEASE] = cls; + + result = XGrabDevice(keyrouter.disp, pDev, win, False, INPUTEVENT_KEY_RELEASE+1, eventList, GrabModeAsync, GrabModeAsync, CurrentTime); + + if( result ) + { + fprintf(stderr, "[keyrouter][%s] Fail to grab the device (error=%d, id=%d) !\n", __FUNCTION__, result, DeviceID); + if( pDev ) XCloseDevice(keyrouter.disp, pDev); + goto out; + } + + return 1; + +out: + return 0; +} + +static void detachSlave(int DeviceID) +{ + XIDetachSlaveInfo detach; + detach.type = XIDetachSlave; + detach.deviceid = DeviceID; + + XIChangeHierarchy(keyrouter.disp, (XIAnyHierarchyChangeInfo*)&detach, 1); +} + +static int GrabKeyDevices(Window win) +{ + int i, ndevices, result; + XIDeviceInfo *dev, *info = NULL; + + info = XIQueryDevice(keyrouter.disp, XIAllDevices, &ndevices); + + if( !info ) + { + fprintf(stderr, "[keyrouter][%s] There is no queried XI device.\n", __FUNCTION__); + return 0; + } + + for( i = 0; i < ndevices ; i++ ) + { + dev = &info[i]; + if( XISlaveKeyboard == dev->use ) + { + if( strcasestr(dev->name, "keyboard") ) + { + if( strcasestr(dev->name, "XTEST" ) ) + { + continue; + } + else + { + E_Keyrouter_Device_Info *data = malloc(sizeof(E_Keyrouter_Device_Info)); + + if( !data ) + continue; + + data->id = dev->deviceid; + data->name = eina_stringshare_add(dev->name); + data->type = E_KEYROUTER_KEYBOARD; + keyrouter.device_list = eina_list_append(keyrouter.device_list, data); + keyrouter.num_keyboard_devices++; + if( keyrouter.num_keyboard_devices >= 1 ) + _e_keyrouter_set_keyboard_exist((unsigned int)keyrouter.num_keyboard_devices, 1); + continue; + } + } + + result = GrabKeyDevice(win, dev->name, dev->deviceid); + + if( !result ) + { + fprintf(stderr, "[keyrouter][%s] Failed to grab key device (name = %s, result = %d)\n", __FUNCTION__, dev->name, result); + continue; + } + + E_Keyrouter_Device_Info *data = malloc(sizeof(E_Keyrouter_Device_Info)); + + if( data ) + { + data->id = dev->deviceid; + data->name = eina_stringshare_add(dev->name); + data->type = E_KEYROUTER_HWKEY; + keyrouter.device_list = eina_list_append(keyrouter.device_list, data); + keyrouter.num_hwkey_devices++; + } + + detachSlave(dev->deviceid); + } + else if(XISlavePointer == dev->use ) + { + if( strcasestr(dev->name, "XTEST" ) ) + continue; + + if( _e_keyrouter_is_relative_device(dev->deviceid) ) + { + E_Keyrouter_Device_Info *data = malloc(sizeof(E_Keyrouter_Device_Info)); + + if( !data ) + continue; + + data->id = dev->deviceid; + data->name = eina_stringshare_add(dev->name); + data->type = E_KEYROUTER_MOUSE; + keyrouter.device_list = eina_list_append(keyrouter.device_list, data); + keyrouter.num_pointer_devices++; + if( keyrouter.num_pointer_devices == 1 ) + _e_keyrouter_set_mouse_exist(1, 1); + } + else + { + E_Keyrouter_Device_Info *data = malloc(sizeof(E_Keyrouter_Device_Info)); + + if( !data ) + continue; + + data->id = dev->deviceid; + data->name = eina_stringshare_add(dev->name); + data->type = E_KEYROUTER_TOUCHSCREEN; + keyrouter.device_list = eina_list_append(keyrouter.device_list, data); + } + } + } + + XIFreeDeviceInfo(info); + + return 1; +} + +static void reattachSlave(int slave, int master) +{ + XIAttachSlaveInfo attach; + + attach.type = XIAttachSlave; + attach.deviceid = slave; + attach.new_master = master; + + XIChangeHierarchy(keyrouter.disp, (XIAnyHierarchyChangeInfo*)&attach, 1); +} +static void UngrabKeyDevices() +{ + int i, ndevices; + XIDeviceInfo *dev, *info = NULL; + XDevice* pDev = NULL; + + info = XIQueryDevice(keyrouter.disp, XIAllDevices, &ndevices); + + if( !info ) + { + fprintf(stderr, "[keyrouter][%s] There is no queried XI device.\n", __FUNCTION__); + return; + } + + for( i = 0; i < ndevices ; i++ ) + { + dev = &info[i]; + + if( XIFloatingSlave != dev->use ) + continue; + + if( dev->num_classes > 1 )//only for Floated SlaveKeyboard + continue; + + pDev = XOpenDevice(keyrouter.disp, dev->deviceid); + + if( !pDev ) + continue; + + XUngrabDevice(keyrouter.disp, pDev, CurrentTime); + + reattachSlave(dev->deviceid, 3);//reattach to Virtual Core Keyboard + } + + XIFreeDeviceInfo(info); +} +#else//_F_USE_XI_GRABDEVICE_ +static int GrabXIKeyDevices() +{ + int i, ndevices, result; + XIDeviceInfo *dev, *info = NULL; + + info = XIQueryDevice(keyrouter.disp, XIAllDevices, &ndevices); + + if( !info ) + { + fprintf(stderr, "[keyrouter][%s] There is no queried XI device.\n", __FUNCTION__); + return 0; + } + + XISelectEvents(keyrouter.disp, keyrouter.rootWin, &keyrouter.eventmask, 1); + for( i = 0; i < ndevices ; i++ ) + { + dev = &info[i]; + + if( XISlaveKeyboard == dev->use ) + { + + if( strcasestr(dev->name, "keyboard") ) + continue; + + if( strcasestr(dev->name, "XTEST" ) ) + continue; + + result = XIGrabDevice(keyrouter.disp, dev->deviceid, keyrouter.rootWin, CurrentTime, None, + GrabModeAsync, GrabModeAsync, False, &keyrouter.eventmask); + + if( result ) + { + fprintf(stderr, "[gesture][%s] Failed to grab xi device (id = %d, result = %d)\n", __FUNCTION__, dev->deviceid, result); + continue; + } + } + } + + XIFreeDeviceInfo(info); + + return 1; +} + +static void UngrabXIKeyDevices() +{ + int i, ndevices, result; + XIDeviceInfo *dev, *info = NULL; + + info = XIQueryDevice(keyrouter.disp, XIAllDevices, &ndevices); + + if( !info ) + { + fprintf(stderr, "[keyrouter][%s] There is no queried XI device.\n", __FUNCTION__); + return 0; + } + + XISelectEvents(keyrouter.disp, keyrouter.rootWin, &keyrouter.eventmask_0, 1); + for( i = 0; i < ndevices ; i++ ) + { + dev = &info[i]; + if( XISlaveKeyboard == dev->use ) + { + if( strcasestr(dev->name, "keyboard") ) + continue; + + if( strcasestr(dev->name, "XTEST" ) ) + continue; + + result = XIUngrabDevice(keyrouter.disp, dev->deviceid, CurrentTime); + + if( result ) + { + fprintf(stderr, "[keyrouter][%s] Failed to ungrab xi device (id=%d, result=%d)\n", __FUNCTION__, dev->deviceid, result); + continue; + } + } + } + + XIFreeDeviceInfo(info); +} +#endif + +static void PrintKeyDeliveryList() +{ + int index; + char *keyname = NULL; + +#ifdef __DEBUG__ + printf("[keyrouter][%s] ============ start =================\n", __FUNCTION__); +#endif + + for( index=0 ; index < MAX_HARDKEYS ; index++ ) + { + if( keyrouter.HardKeys[index].keycode == 0 )//empty + continue; + + fprintf(keyrouter.fplog, "\n"); + keyname = XKeysymToString(XKeycodeToKeysym(keyrouter.disp, index, 0)); + + if( !keyname ) + { +#ifdef __DEBUG__ + fprintf(keyrouter.fplog, "[keyrouter][%s] Failed to get string from xkeysym via xkeycode(%d) !\n", __FUNCTION__, index); +#endif + continue; + } + + if( !strncmp(keyname, KEY_VOLUMEDOWN, LEN_KEY_VOLUMEDOWN) ) + fprintf(keyrouter.fplog, "[ KEY_VOLUMEDOWN : %s : %d ]\n", keyname, index); + else if( !strncmp(keyname, KEY_VOLUMEUP, LEN_KEY_VOLUMEUP) ) + fprintf(keyrouter.fplog, "[ KEY_VOLUMEUP : %s : %d ]\n", keyname, index); + else if( !strncmp(keyname, KEY_PAUSE, LEN_KEY_PAUSE) ) + fprintf(keyrouter.fplog, "[ KEY_PAUSE : %s : %d ]\n", keyname, index); + else if( !strncmp(keyname, KEY_SEND, LEN_KEY_SEND) ) + fprintf(keyrouter.fplog, "[ KEY_SEND : %s : %d ]\n", keyname, index); + else if( !strncmp(keyname, KEY_SELECT, LEN_KEY_SELECT) ) + fprintf(keyrouter.fplog, "[ KEY_SELECT : %s : %d ]\n", keyname, index); + else if( !strncmp(keyname, KEY_END, LEN_KEY_END) ) + fprintf(keyrouter.fplog, "[ KEY_END : %s : %d ]\n", keyname, index); + else if( !strncmp(keyname, KEY_POWER, LEN_KEY_POWER) ) + fprintf(keyrouter.fplog, "[ KEY_POWER : %s : %d ]\n", keyname, index); + else if( !strncmp(keyname, KEY_CAMERA, LEN_KEY_CAMERA) ) + fprintf(keyrouter.fplog, "[ KEY_CAMERA : %s : %d ]\n", keyname, index); + else if( !strncmp(keyname, KEY_CONFIG, LEN_KEY_CONFIG) ) + fprintf(keyrouter.fplog, "[ KEY_CONFIG : %s : %d ]\n", keyname, index); + else if( !strncmp(keyname, KEY_PLAYCD, LEN_KEY_PLAYCD) ) + fprintf(keyrouter.fplog, "[ KEY_PLAYCD : %s : %d ]\n", keyname, index); + else if( !strncmp(keyname, KEY_STOPCD, LEN_KEY_STOPCD) ) + fprintf(keyrouter.fplog, "[ KEY_STOPCD : %s : %d ]\n", keyname, index); + else if( !strncmp(keyname, KEY_PAUSECD, LEN_KEY_PAUSECD) ) + fprintf(keyrouter.fplog, "[ KEY_PAUSECD : %s : %d ]\n", keyname, index); + else if( !strncmp(keyname, KEY_NEXTSONG, LEN_KEY_NEXTSONG) ) + fprintf(keyrouter.fplog, "[ KEY_NEXTSONG : %s : %d ]\n", keyname, index); + else if( !strncmp(keyname, KEY_PREVIOUSSONG, LEN_KEY_PREVIOUSSONG) ) + fprintf(keyrouter.fplog, "[ KEY_PREVIOUSSONG : %s : %d ]\n", keyname, index); + else if( !strncmp(keyname, KEY_REWIND, LEN_KEY_REWIND) ) + fprintf(keyrouter.fplog, "[ KEY_REWIND : %s : %d ]\n", keyname, index); + else if( !strncmp(keyname, KEY_FASTFORWARD, LEN_KEY_FASTFORWARD) ) + fprintf(keyrouter.fplog, "[ KEY_FASTFORWARD : %s : %d ]\n", keyname, index); + else + fprintf(keyrouter.fplog, "[ UNKNOWN : %d ]\n", keyrouter.HardKeys[index].keycode); + + //Print EXCLUSIVE mode of grab + if( NULL != keyrouter.HardKeys[index].excl_ptr ) + fprintf(keyrouter.fplog, "== EXCLUSIVE : Window(0x%X)\n", (int)(keyrouter.HardKeys[index].excl_ptr->wid)); + else + fprintf(keyrouter.fplog, "== EXCLUSIVE : None\n"); + + //Print OR_EXCLUSIVE mode of grab + if( NULL != keyrouter.HardKeys[index].or_excl_ptr ) + fprintf(keyrouter.fplog, "== OR_EXCLUSIVE : Window(0x%X)\n", (int)(keyrouter.HardKeys[index].or_excl_ptr->wid)); + else + fprintf(keyrouter.fplog, "== OR_EXCLUSIVE : None\n"); + + //Print TOP_POSITION mode of grab + if( NULL != keyrouter.HardKeys[index].top_ptr ) + { + keylist_node* top_ptr; + top_ptr = keyrouter.HardKeys[index].top_ptr; + fprintf(keyrouter.fplog, "== TOP_POSITION : "); + + do + { + fprintf(keyrouter.fplog, "Window(0x%X) -> ", (unsigned int)(top_ptr->wid)); + top_ptr = top_ptr->next; + } while( top_ptr ); + fprintf(keyrouter.fplog, "None\n"); + } + else + { + fprintf(keyrouter.fplog, "== TOP_POSITION : None\n"); + } + + //Print SHARED mode of grab + if( NULL != keyrouter.HardKeys[index].shared_ptr ) + { + keylist_node* shared_ptr; + shared_ptr = keyrouter.HardKeys[index].shared_ptr; + fprintf(keyrouter.fplog, "== SHARED : "); + + do + { + fprintf(keyrouter.fplog, "Window(0x%X) -> ", (unsigned int)(shared_ptr->wid)); + shared_ptr = shared_ptr->next; + } while( shared_ptr ); + fprintf(keyrouter.fplog, "None\n"); + } + else + { + fprintf(keyrouter.fplog, "== SHARED : None\n"); + } + } + + return; +} + +static int RemoveWindowDeliveryList(Window win, int isTopPositionMode, int UnSetExclusiveProperty) +{ + + int index; + int mode_count = 0; + + //Remove win from EXCLUSIVE, TOP_POSITION and SHARED grab list ! + //If isTopPosition is true, remove win only from TOP_POSITION grab list ! + for( index=0 ; index < MAX_HARDKEYS ; index++ ) + { + if( keyrouter.HardKeys[index].keycode == 0 )//empty + continue; + + if( isTopPositionMode ) + { + //Check & Delete TOP_POSITION mode of grab + if( NULL != keyrouter.HardKeys[index].top_ptr ) + { + int flags = 0; + keylist_node* current; + keylist_node* next_current; + + current = keyrouter.HardKeys[index].top_ptr; + next_current = current->next; + + do + { + if( win == keyrouter.HardKeys[index].top_ptr->wid ) + { + if( current->next ) + keyrouter.HardKeys[index].top_ptr = current->next; + else + { + keyrouter.HardKeys[index].top_ptr = NULL; + keyrouter.HardKeys[index].top_tail = NULL; + mode_count += TOP_GRAB_MODE; + } + + if( current ) + free(current); + flags = 1; +#ifdef __DEBUG__ + printf("[keyrouter][%s] window (0x%x) was found and removed @ keyrouter.HardKeys[%d].top_ptr (head) !\n", __FUNCTION__, (int)win, index); +#endif + break; + } + + if( NULL == next_current ) + { + break; + } + + if( win == next_current->wid ) + { + if( next_current->next ) + current->next = next_current->next; + else + { + current->next = NULL; + keyrouter.HardKeys[index].top_tail = current; + } + + if( next_current ) + free(next_current); + flags = 1; +#ifdef __DEBUG__ + printf("[keyrouter][%s] window (0x%x) was found and removed @ keyrouter.HardKeys[%d].top_ptr (normal node) !\n", __FUNCTION__, (int)win, index); +#endif + break; + } + + current = next_current; + next_current = next_current->next; + + } while( NULL != next_current ); + + if( flags ) + { + continue; + } + } + } + else//isTopPositionMode == 0 + { + //Check & Delete EXCLUSIVE mode of grab + if( NULL != keyrouter.HardKeys[index].excl_ptr ) + { + if( win == keyrouter.HardKeys[index].excl_ptr->wid ) + { +#ifdef __DEBUG__ + printf("[keyrouter][%s] window (0x%x) was found and removed @ keyrouter.HardKeys[%d].excl_ptr !\n", __FUNCTION__, (int)win, index); +#endif + if( UnSetExclusiveProperty ) + { +#ifdef __DEBUG__ + printf("[keyrouter][%s] Before call UnSetExclusiveGrabInfoToRootWindow() !\n", __FUNCTION__); + UnSetExclusiveGrabInfoToRootWindow(keyrouter.HardKeys[index].keycode, EXCLUSIVE_GRAB); + printf("[keyrouter][%s] After call UnSetExclusiveGrabInfoToRootWindow() !\n", __FUNCTION__); +#else + UnSetExclusiveGrabInfoToRootWindow(keyrouter.HardKeys[index].keycode, EXCLUSIVE_GRAB); +#endif + } + + if( keyrouter.HardKeys[index].excl_ptr ) + free(keyrouter.HardKeys[index].excl_ptr); + keyrouter.HardKeys[index].excl_ptr = NULL; + mode_count += EXCL_GRAB_MODE; + continue;//need to check another keycode + } + } + + //Check & Delete OR_EXCLUSIVE mode of grab + if( NULL != keyrouter.HardKeys[index].or_excl_ptr ) + { + if( win == keyrouter.HardKeys[index].or_excl_ptr->wid ) + { +#ifdef __DEBUG__ + printf("[keyrouter][%s] window (0x%x) was found and removed @ keyrouter.HardKeys[%d].or_excl_ptr !\n", __FUNCTION__, (int)win, index); +#endif + if( UnSetExclusiveProperty ) + { +#ifdef __DEBUG__ + printf("[keyrouter][%s] Before call UnSetExclusiveGrabInfoToRootWindow() !\n", __FUNCTION__); + UnSetExclusiveGrabInfoToRootWindow(keyrouter.HardKeys[index].keycode, OR_EXCLUSIVE_GRAB); + printf("[keyrouter][%s] After call UnSetExclusiveGrabInfoToRootWindow() !\n", __FUNCTION__); +#else + UnSetExclusiveGrabInfoToRootWindow(keyrouter.HardKeys[index].keycode, OR_EXCLUSIVE_GRAB); +#endif + } + + if( keyrouter.HardKeys[index].or_excl_ptr ) + free(keyrouter.HardKeys[index].or_excl_ptr); + keyrouter.HardKeys[index].or_excl_ptr = NULL; + mode_count += OR_EXCL_GRAB_MODE; + continue;//need to check another keycode + } + } + + //Check & Delete TOP_POSITION mode of grab + if( NULL != keyrouter.HardKeys[index].top_ptr ) + { + int flags = 0; + keylist_node* current; + keylist_node* next_current; + + current = keyrouter.HardKeys[index].top_ptr; + next_current = current->next; + + do + { + if( win == keyrouter.HardKeys[index].top_ptr->wid ) + { + if( current->next ) + keyrouter.HardKeys[index].top_ptr = current->next; + else + { + keyrouter.HardKeys[index].top_ptr = NULL; + keyrouter.HardKeys[index].top_tail = NULL; + mode_count += TOP_GRAB_MODE; + } + + if( current ) + free(current); + flags = 1; +#ifdef __DEBUG__ + printf("[keyrouter][%s] window (0x%x) was found and removed @ keyrouter.HardKeys[%d].top_ptr (head) !\n", __FUNCTION__, (int)win, index); +#endif + break; + } + + if( NULL == next_current ) + { + break; + } + + if( win == next_current->wid ) + { + if( next_current->next ) + current->next = next_current->next; + else + { + current->next = NULL; + keyrouter.HardKeys[index].top_tail = current; + } + + if( next_current ) + free(next_current); + flags = 1; +#ifdef __DEBUG__ + printf("[keyrouter][%s] window (0x%x) was found and removed @ keyrouter.HardKeys[%d].top_ptr (normal node) !\n", __FUNCTION__, (int)win, index); +#endif + break; + } + + current = next_current; + next_current = next_current->next; + + } while( NULL != next_current ); + + if( flags ) + { + continue; + } + } + + //Check & Delete SHARED mode of grab + if( NULL != keyrouter.HardKeys[index].shared_ptr ) + { + int flags = 0; + keylist_node* current; + keylist_node* next_current; + + current = keyrouter.HardKeys[index].shared_ptr; + next_current = current->next; + + do + { + if( win == keyrouter.HardKeys[index].shared_ptr->wid ) + { + if( current->next ) + keyrouter.HardKeys[index].shared_ptr = current->next; + else + { + keyrouter.HardKeys[index].shared_ptr = NULL; + mode_count += SHARED_GRAB_MODE; + } + + if( current ) + free(current); + flags = 1; +#ifdef __DEBUG__ + printf("[keyrouter][%s] window (0x%x) was found and removed @ keyrouter.HardKeys[%d].shared_ptr (head) !\n", __FUNCTION__, (int)win, index); +#endif + break; + } + + if( NULL == next_current ) + { + break; + } + + if( win == next_current->wid ) + { + if( next_current->next ) + current->next = next_current->next; + else + { + current->next = NULL; + } + + if( next_current ) + free(next_current); + flags = 1; +#ifdef __DEBUG__ + printf("[keyrouter][%s] window (0x%x) was found and removed @ keyrouter.HardKeys[%d].shared_ptr (normal node) !\n", __FUNCTION__, (int)win, index); +#endif + break; + } + + current = next_current; + next_current = next_current->next; + + } while( NULL != next_current ); + + if( flags ) + { + continue; + } + } + } + } + + return 0; +} + +static void UnSetExclusiveGrabInfoToRootWindow(int keycode, int grab_mode) +{ + int i; + int cnt = 0; + unsigned int *key_list = NULL; + int *new_key_list = NULL; + + Atom ret_type; + int ret_format; + unsigned long nr_item; + unsigned long sz_remains_data; + Window ex_grabwin; + + if( grab_mode == EXCLUSIVE_GRAB ) + { + if( keyrouter.atomGrabExclWin == None ) + keyrouter.atomGrabExclWin = XInternAtom(keyrouter.disp, STR_ATOM_GRAB_EXCL_WIN, False); + ex_grabwin = keyrouter.atomGrabExclWin; + } + else if( grab_mode == OR_EXCLUSIVE_GRAB ) + { + if( keyrouter.atomGrabORExclWin == None ) + keyrouter.atomGrabORExclWin = XInternAtom(keyrouter.disp, STR_ATOM_GRAB_OR_EXCL_WIN, False); + ex_grabwin = keyrouter.atomGrabORExclWin; + } + else + return; + + if (XGetWindowProperty(keyrouter.disp, keyrouter.rootWin, + ex_grabwin, 0, 0x7fffffff, False, XA_CARDINAL, + &ret_type, &ret_format, &nr_item, &sz_remains_data, (unsigned char **)&key_list) != Success) + { + nr_item = 0; + } + + if (nr_item == 0) + { + fprintf(stderr, "[keyrouter][%s] keycode = %d\n", __FUNCTION__, keycode); + goto out; + } + + for( i=0 ; i < nr_item ; i++ ) + { + if( key_list[i] == keycode )//&& grab_mode == EXCLUSIVE_GRAB ) + { + continue; + } + cnt++; + } + +#ifdef __DEBUG__ + fprintf(stderr, "[keyrouter][%s] cnt = %d, nr_item = %d\n", __FUNCTION__, cnt, (int)nr_item); +#endif + + if( 0 < cnt ) + { + new_key_list = malloc(sizeof(int)*cnt); + cnt = 0; + } + else + new_key_list = NULL; + + if( !new_key_list ) + { + //fprintf(stderr, "[keyrouter][%s] Fail to allocation memory for new_key_list ! \n", __FUNCTION__); + XDeleteProperty(keyrouter.disp, keyrouter.rootWin, ex_grabwin); + XSync(keyrouter.disp, False); + goto out; + } + + for( i=0 ; i < nr_item ; i++ ) + { + if( key_list[i] == keycode )//&& grab_mode == EXCLUSIVE_GRAB ) + { + continue; + } + else + new_key_list[cnt++] = key_list[i]; + } + + if (new_key_list) { + XChangeProperty(keyrouter.disp, keyrouter.rootWin, ex_grabwin, XA_CARDINAL, 32, + PropModeReplace, (unsigned char *)new_key_list, cnt); + } + else { + XDeleteProperty(keyrouter.disp, keyrouter.rootWin, ex_grabwin); + } + XSync(keyrouter.disp, False); + +out: + if(new_key_list) + free(new_key_list); + if( key_list ) + XFree(key_list); + return; +} + +static int AddWindowToDeliveryList(Window win, int keycode, const int grab_mode, const int IsOnTop) +{ + int ret = 0; + int index = keycode; + keylist_node *backup_ptr = NULL; + + if( index >= MAX_HARDKEYS ) + { + fprintf(stderr, "[keyrouter][%s] Error ! index of keyrouter.HardKeys must be smaller than %d (index=%d)!)\n", __FUNCTION__, MAX_HARDKEYS, index); + ret = -1; + goto out; + } + + keylist_node* ptr = NULL; + keyrouter.HardKeys[index].keycode = keycode; + switch( grab_mode ) + { + case EXCLUSIVE_GRAB: + if( NULL != keyrouter.HardKeys[index].excl_ptr ) + { + fprintf(stderr, "[keyrouter][%s] keyrouter.HardKeys[%d].Keycode(%d) was EXCLUSIVELY grabbed already by window(0x%x) !\n", __FUNCTION__, index, keycode, (int)(keyrouter.HardKeys[index].excl_ptr->wid)); + ret = -1; + goto out; + } + + ptr = (keylist_node*)malloc(sizeof(keylist_node)); + if( !ptr ) + { + fprintf(stderr, "[keyrouter][%s] Failed to allocate memory for adding excl_ptr!\n", __FUNCTION__); + ret = -1; + goto out; + } + + ptr->wid = win; + ptr->next = NULL; + keyrouter.HardKeys[index].excl_ptr = ptr; + +#ifdef __DEBUG__ + printf("[keyrouter][%s] window(0x%x) was added to EXCLUSVE mode list (keyrouter.HardKeys[%d]) !\n", __FUNCTION__, (int)win, index); +#endif + break; + + case OR_EXCLUSIVE_GRAB: + if( NULL != keyrouter.HardKeys[index].or_excl_ptr ) + { + fprintf(stderr, "[keyrouter][%s] keyrouter.HardKeys[%d].Keycode(%d) was OR_EXCLUSIVELY grabbed already by window(0x%x) !\n", __FUNCTION__, index, keycode, (unsigned int)(keyrouter.HardKeys[index].or_excl_ptr->wid)); + fprintf(stderr, "[keyrouter][%s] Now it will be overridden by a new window(0x%x) !\n", __FUNCTION__, (unsigned int)win); + backup_ptr = keyrouter.HardKeys[index].or_excl_ptr; + } + + ptr = (keylist_node*)malloc(sizeof(keylist_node)); + if( !ptr ) + { + fprintf(stderr, "[keyrouter][%s] Failed to allocate memory for adding excl_ptr!\n", __FUNCTION__); + ret = -1; + goto out; + } + + ptr->wid = win; + ptr->next = NULL; + keyrouter.HardKeys[index].or_excl_ptr = ptr; + if( backup_ptr ) + free(backup_ptr); + +#ifdef __DEBUG__ + printf("[keyrouter][%s] window(0x%x) was added to OR_EXCLUSVE mode list (keyrouter.HardKeys[%d]) !\n", __FUNCTION__, (int)win, index); +#endif + break; + + case TOP_POSITION_GRAB: + ptr = (keylist_node*)malloc(sizeof(keylist_node)); + if( !ptr ) + { + fprintf(stderr, "[keyrouter][%s] Failed to allocate memory for adding top_ptr!\n", __FUNCTION__); + ret = -1; + goto out; + } + +#ifdef __DEBUG__ + printf("[keyrouter][%s] window(0x%x) was added to TOP_POSITION mode list (keyrouter.HardKeys[%d]) !\n", __FUNCTION__, (int)win, index); +#endif + + ptr->wid = win; + ptr->next = NULL; + + if( NULL == keyrouter.HardKeys[index].top_ptr )//µ¥ÀÌÅÍ ¾øÀ½ + { + keyrouter.HardKeys[index].top_tail = keyrouter.HardKeys[index].top_ptr = ptr; + break; + } + + if( IsOnTop ) + { + ptr->next = keyrouter.HardKeys[index].top_ptr; + keyrouter.HardKeys[index].top_ptr = ptr; + } + else + { + keyrouter.HardKeys[index].top_tail->next = ptr; + keyrouter.HardKeys[index].top_tail = ptr; + } + break; + + case SHARED_GRAB: + ptr = (keylist_node*)malloc(sizeof(keylist_node)); + if( !ptr ) + { + fprintf(stderr, "[keyrouter][%s] Failed to allocate memory for adding shared_ptr!\n", __FUNCTION__); + ret = -1; + goto out; + } + + ptr->wid = win; + if( NULL != keyrouter.HardKeys[index].shared_ptr )//µ¥ÀÌÅÍ Á¸Àç + { + ptr->next = keyrouter.HardKeys[index].shared_ptr; + keyrouter.HardKeys[index].shared_ptr = ptr; + } + else//µ¥ÀÌÅÍ ¾øÀ½ + { + ptr->next = NULL; + keyrouter.HardKeys[index].shared_ptr = ptr; + } +#ifdef __DEBUG__ + printf("[keyrouter][%s] window(0x%x) was added to SHARED mode list (keyrouter.HardKeys[%d]) !\n", __FUNCTION__, (int)win, index); +#endif + break; + + default: + fprintf(stderr, "[keyrouter][%s] Unknown mode of grab ! (grab_mode=0x%X)\n", __FUNCTION__, grab_mode); + ret = -1; + break; + } + +out: + + return ret; +} + +static int AdjustTopPositionDeliveryList(Window win, int IsOnTop) +{ + Atom ret_type; + int ret_format; + unsigned long nr_item = 0; + unsigned long sz_remains_data; + unsigned int *key_list = NULL; + + int i, result; + int grab_mode, keycode; + + if (keyrouter.atomGrabKey == None) { + keyrouter.atomGrabKey = XInternAtom(keyrouter.disp, STR_ATOM_GRAB_KEY, False); + } + + if ( Success != (result = XGetWindowProperty(keyrouter.disp, win, keyrouter.atomGrabKey, 0, 0x7fffffff, False, XA_CARDINAL, + &ret_type, &ret_format, &nr_item, + &sz_remains_data,(unsigned char **)&key_list) ) ) + { + fprintf(stderr, "[keyrouter][%s] Failed to get window property from %s ! (result = %d)\n", __FUNCTION__, STR_ATOM_GRAB_KEY, result); + RemoveWindowDeliveryList(win, 1, 0); + goto out; + } + + if( 0 == nr_item ) + { + RemoveWindowDeliveryList(win, 1, 0); + goto out; + } + + RemoveWindowDeliveryList(win, 1, 0); + + for( i=0 ; i < nr_item ; i++ ) + { + grab_mode = key_list[i] & GRAB_MODE_MASK; + + if( TOP_POSITION_GRAB != grab_mode ) + continue; + + keycode = key_list[i] & (~GRAB_MODE_MASK); + result = AddWindowToDeliveryList(win, keycode, TOP_POSITION_GRAB, IsOnTop); + + if( result ) + { + fprintf(stderr, "[keyrouter][%s] Failed to add window (0x%x) to delivery list ! keycode=%x, grab_mode=0x%X\n", __FUNCTION__, (int)win, keycode, grab_mode); + goto out; + } + } + +out: + if( key_list ) + XFree(key_list); + return 0; +} + +static int IsGrabbed(unsigned int keycode) +{ + int index = keycode; + + if( keyrouter.HardKeys[index].keycode == 0 )//empty + { +#ifdef __DEBUG__ + printf("[keyrouter][%s] keyrouter.HardKeys[%d].keycode is 0\n", __FUNCTION__, index); +#endif + goto out; + } + + if( keyrouter.HardKeys[index].keycode != keycode ) + { + fprintf(stderr, "[keyrouter][%s] Error ! (keyrouter.HardKeys[%d].keycode must be equal to keycode(%d) !\n", __FUNCTION__, index, keycode); + goto out; + } + + if( NULL != keyrouter.HardKeys[index].excl_ptr ) + { +#ifdef __DEBUG__ + printf("[keyrouter][%s] keyrouter.HardKeys[%d] is grabbed @ EXCLUSIVE mode by window(0x%x)\n", __FUNCTION__, index, (int)(keyrouter.HardKeys[index].excl_ptr->wid)); +#endif + index |= EXCLUSIVE_GRAB; + } + else if( NULL != keyrouter.HardKeys[index].or_excl_ptr ) + { +#ifdef __DEBUG__ + printf("[keyrouter][%s] keyrouter.HardKeys[%d] is grabbed @ OR_EXCLUSIVE mode by window(0x%x)\n", __FUNCTION__, index, (int)(keyrouter.HardKeys[index].or_excl_ptr->wid)); +#endif + index |= OR_EXCLUSIVE_GRAB; + } + else if( NULL != keyrouter.HardKeys[index].top_ptr ) + { +#ifdef __DEBUG__ + printf("[keyrouter][%s] keyrouter.HardKeys[%d] is grabbed @ TOP_POSITION mode by window(0x%x)\n", __FUNCTION__, index, (int)(keyrouter.HardKeys[index].top_ptr->wid)); +#endif + index |= TOP_POSITION_GRAB; + } + else if( NULL != keyrouter.HardKeys[index].shared_ptr ) + { +#ifdef __DEBUG__ + printf("[keyrouter][%s] keyrouter.HardKeys[%d] is grabbed @ SHARED mode by window(0x%x)\n", __FUNCTION__, index, (int)(keyrouter.HardKeys[index].shared_ptr->wid)); +#endif + index |= SHARED_GRAB; + } + else + { +#ifdef __DEBUG__ + printf("[keyrouter][%s] keyrouter.HardKeys[%d] has keycode(%d) but not grabbed !\n", __FUNCTION__, index, keycode); +#endif + index = -1; + } + return index; + +out: + return -1; +} + +static int IsWindowTopVisibleWithoutInputFocus(Window win, Window focus) +{ + Window root_win, parent_win; + unsigned int num_children; + Window *child_list; + + int i; + XWindowAttributes win_attributes; + E_Border *bd; + + if( !XQueryTree(keyrouter.disp, keyrouter.rootWin, &root_win, &parent_win, &child_list, &num_children) ) + { + fprintf(stderr, "[keyrouter][%s] Failed to query window tree !\n", __FUNCTION__); + return 0; + } + + /* Make the wininfo list */ + for (i = (int)num_children - 1; i >= 0; i--) + { + // 1. check map status of window + /* figure out whether the window is mapped or not */ + XGetWindowAttributes(keyrouter.disp, child_list[i], &win_attributes); + + // 2. return if map status is 0 or border's visible is 0 + if( win_attributes.map_state == 0 ) + continue; + + // 3. check window is border or not + bd = e_border_find_by_window(child_list[i]); + + if( bd )//child_list[i] is border + {//if the window is client window, check hint +#ifdef __DEBUG__ + fprintf(stderr, "[keyrouter][%s] bd is NOT NULL!(child_list[%d]=0x%x, bd->win=0x%x, bd->client.win=0x%x, win=0x%x)\n", + __FUNCTION__, i, (unsigned int)child_list[i], bd->win, bd->client.win, (unsigned int)win); +#endif + + if( !bd->visible ) + continue; + if( (bd->x >= bd->zone->w) || (bd->y >= bd->zone->h) ) + continue; + if( ((bd->x + bd->w) <= 0) || ((bd->y + bd->h) <= 0) ) + continue; + + if( bd->client.win == win ) + { +#ifdef __DEBUG__ + fprintf(stderr, "[keyrouter][%s][CLIENTWIN] Target win(0x%x) is above focus win(0x%x)\n", __FUNCTION__, (unsigned int)win, (unsigned int)focus); +#endif + return 1; + } + + if( bd->client.win == focus ) + { +#ifdef __DEBUG__ + fprintf(stderr, "[keyrouter][%s][CLIENTWIN] Target win(0x%x) is below focus win(0x%x)\n", __FUNCTION__, (unsigned int)win, (unsigned int)focus); +#endif + return 0; + } + } + else//child_list[i] is override-redirected window + {//if the window is not client window, it will be a border window or a override-redirected window then check the equality of the windows +#ifdef __DEBUG__ + fprintf(stderr, "[keyrouter][%s] bd is NULL!(child_list[%d]=0x%x, win=0x%x)\n", + __FUNCTION__, i, (unsigned int)child_list[i], (unsigned int)win); +#endif + + if( child_list[i] == win ) + { +#ifdef __DEBUG__ + fprintf(stderr, "[keyrouter][%s][WIN] Target win(0x%x) is above focus win(0x%x)\n", __FUNCTION__, (unsigned int)win, (unsigned int)focus); +#endif + return 1; + } + + if( child_list[i] == focus ) + { +#ifdef __DEBUG__ + fprintf(stderr, "[keyrouter][%s][WIN] Target win(0x%x) is below focus win(0x%x)\n", __FUNCTION__, (unsigned int)win, (unsigned int)focus); +#endif + return 0; + } + } + } + + return 0; +} + +#ifdef _F_USE_XI_GRABDEVICE_ +static void DeliverKeyEvents(XEvent *xev, XGenericEventCookie *cookie) +{ + int index, rel_index, count; + int revert_to_return; + Window focus_window; + keylist_node* ptr = NULL; + XIDeviceEvent *xiData = (XIDeviceEvent *)cookie->data; + + index = IsGrabbed(xev->xkey.keycode); + rel_index = index & (~GRAB_MODE_MASK); + rel_index = xev->xkey.keycode; + XGetInputFocus(keyrouter.disp, &focus_window, &revert_to_return); + + if( xev->type == KeyRelease ) + { + switch( keyrouter.HardKeys[rel_index].lastmode ) + { + case NONE_GRAB_MODE: + xiData->event = xev->xkey.window = keyrouter.HardKeys[rel_index].lastwid; + XSendEvent(keyrouter.disp, xev->xkey.window, False, NoEventMask, xev); + XSendEvent(keyrouter.disp, xev->xkey.window, False, NoEventMask, cookie);//XI2 + fprintf(stderr, "[keyrouter][%s] Non-grabbed key! Deliver KeyRelease/XI_KeyRelease (keycode:%d) to %s window (0x%x) !\n", __FUNCTION__, xev->xkey.keycode, (xev->xkey.window==focus_window) ? "focus":"", xev->xkey.window); + break; + + case EXCL_GRAB_MODE: + xiData->event = xev->xkey.window = keyrouter.HardKeys[rel_index].lastwid; + XSendEvent(keyrouter.disp, xev->xkey.window, False, NoEventMask, xev); + XSendEvent(keyrouter.disp, xev->xkey.window, False, NoEventMask, cookie);//XI2 + fprintf(stderr, "[keyrouter][%s] EXCLUSIVE mode of grab ! Deliver KeyRelease/XI_KeyRelease (keycode:%d) to window (0x%x) !\n", __FUNCTION__, xev->xkey.keycode, (int)xev->xkey.window); + break; + + case OR_EXCL_GRAB_MODE: + xiData->event = xev->xkey.window = keyrouter.HardKeys[rel_index].lastwid; + XSendEvent(keyrouter.disp, xev->xkey.window, False, NoEventMask, xev); + XSendEvent(keyrouter.disp, xev->xkey.window, False, NoEventMask, cookie);//XI2 + fprintf(stderr, "[keyrouter][%s] OR_EXCLUSIVE mode of grab ! Deliver KeyRelease/XI_KeyRelease (keycode:%d) to window (0x%x) !\n", __FUNCTION__, xev->xkey.keycode, (int)xev->xkey.window); + break; + + case TOP_GRAB_MODE: + xiData->event = xev->xkey.window = keyrouter.HardKeys[rel_index].lastwid; + XSendEvent(keyrouter.disp, xev->xkey.window, False, NoEventMask, xev); + XSendEvent(keyrouter.disp, xev->xkey.window, False, NoEventMask, cookie);//XI2 + fprintf(stderr, "[keyrouter][%s] TOP_POSITION mode of grab ! Deliver KeyRelease/XI_KeyRelease (keycode:%d) to window (0x%x) !\n", __FUNCTION__, xev->xkey.keycode, (int)xev->xkey.window); + break; + + case SHARED_GRAB_MODE: + if( !keyrouter.HardKeys[rel_index].num_shared_wins ) + break; + + for( count = 0 ; count < keyrouter.HardKeys[rel_index].num_shared_wins ; count++ ) + { + xiData->event = xev->xkey.window = keyrouter.HardKeys[rel_index].shared_wins[count]; + XSendEvent(keyrouter.disp, xev->xkey.window, False, NoEventMask, xev); + XSendEvent(keyrouter.disp, xev->xkey.window, False, NoEventMask, cookie);//XI2 + fprintf(stderr, "[keyrouter][%s] Non-grabbed or SHARED mode of grab ! Deliver KeyRelease/XI_KeyRelease (keycode:%d) to window (0x%x) !\n", __FUNCTION__, xev->xkey.keycode, (int)xev->xkey.window); + } + break; + + default: + fprintf(stderr, "[[keyrouter][%s] Unknown case (keycode:%d)!\n", __FUNCTION__, xev->xkey.keycode); + } + + return; + } + + // Is Grabbed ? + if( index < 0 )//Code for non-grabbed key + { + //Deliver to focus window + xiData->event = xev->xkey.window = focus_window; + + if( xev->type == KeyPress ) + { + XSendEvent(keyrouter.disp, xev->xkey.window, False, NoEventMask, xev); + XSendEvent(keyrouter.disp, xev->xkey.window, False, NoEventMask, cookie);//XI2 + fprintf(stderr, "[keyrouter][%s] Non-grabbed key! Deliver KeyPress/XI_KeyPress (keycode:%d) to focus window (0x%x) !\n", __FUNCTION__, xev->xkey.keycode, (int)focus_window); + + keyrouter.HardKeys[xev->xkey.keycode].lastwid = xev->xkey.window; + keyrouter.HardKeys[xev->xkey.keycode].lastmode = NONE_GRAB_MODE; + } + + return; + } + + int grab_mode = index & GRAB_MODE_MASK; + index &= ~GRAB_MODE_MASK; + + switch( grab_mode ) + { + case EXCLUSIVE_GRAB: + // Is Grab Mode equal to EXCLUSIVE ? + xiData->event = xev->xkey.window = keyrouter.HardKeys[index].excl_ptr->wid; + XSendEvent(keyrouter.disp, xev->xkey.window, False, NoEventMask, xev); + XSendEvent(keyrouter.disp, xev->xkey.window, False, NoEventMask, cookie);//XI2 + + if( xev->type == KeyPress ) + { + fprintf(stderr, "[keyrouter][%s] EXCLUSIVE mode of grab ! Deliver KeyPress/XI_KeyPress (keycode:%d) to window (0x%x) !\n", __FUNCTION__, xev->xkey.keycode, (int)xev->xkey.window); + keyrouter.HardKeys[index].lastwid = xev->xkey.window; + keyrouter.HardKeys[index].lastmode = EXCL_GRAB_MODE; + } + break; + + case OR_EXCLUSIVE_GRAB: + // Is Grab Mode equal to OR_EXCLUSIVE ? + xiData->event = xev->xkey.window = keyrouter.HardKeys[index].or_excl_ptr->wid; + XSendEvent(keyrouter.disp, xev->xkey.window, False, NoEventMask, xev); + XSendEvent(keyrouter.disp, xev->xkey.window, False, NoEventMask, cookie);//XI2 + + if( xev->type == KeyPress ) + { + fprintf(stderr, "[keyrouter][%s] OR_EXCLUSIVE mode of grab ! Deliver KeyPress/XI_KeyPress (keycode:%d) to window (0x%x) !\n", __FUNCTION__, xev->xkey.keycode, (int)xev->xkey.window); + keyrouter.HardKeys[index].lastwid = xev->xkey.window; + keyrouter.HardKeys[index].lastmode = OR_EXCL_GRAB_MODE; + } + break; + + case TOP_POSITION_GRAB: + if( focus_window != keyrouter.HardKeys[index].top_ptr->wid ) + { +#ifdef __DEBUG__ + fprintf(stderr, "[keyrouter][%s] isWindowStackChanged = %d\n", __FUNCTION__, isWindowStackChanged); +#endif + if( isWindowStackChanged ) + resTopVisibleCheck = IsWindowTopVisibleWithoutInputFocus(keyrouter.HardKeys[index].top_ptr->wid, focus_window); + + if( !resTopVisibleCheck ) + goto shared_delivery; + + if( isWindowStackChanged ) + isWindowStackChanged = 0; + } + + // Is Grab Mode equal to TOP_POSITION ? + xiData->event = xev->xkey.window = keyrouter.HardKeys[index].top_ptr->wid; + XSendEvent(keyrouter.disp, xev->xkey.window, False, NoEventMask, xev); + XSendEvent(keyrouter.disp, xev->xkey.window, False, NoEventMask, cookie);//XI2 + + if( xev->type == KeyPress ) + { + fprintf(stderr, "[keyrouter][%s] TOP_POSITION mode of grab ! Deliver KeyPress/XI_KeyPress (keycode:%d) to window (0x%x) !\n", __FUNCTION__, xev->xkey.keycode, (int)xev->xkey.window); + keyrouter.HardKeys[index].lastwid = xev->xkey.window; + keyrouter.HardKeys[index].lastmode = TOP_GRAB_MODE; + } + break; + + case SHARED_GRAB: +shared_delivery: + keyrouter.HardKeys[index].lastwid = None; + keyrouter.HardKeys[index].lastmode = SHARED_GRAB_MODE; + for( ptr=keyrouter.HardKeys[index].shared_ptr ; (NULL != ptr) ; ptr=ptr->next ) + { + xiData->event = xev->xkey.window = ptr->wid; + XSendEvent(keyrouter.disp, xev->xkey.window, False, NoEventMask, xev); + XSendEvent(keyrouter.disp, xev->xkey.window, False, NoEventMask, cookie);//XI2 + + if( xev->type == KeyPress ) + fprintf(stderr, "[keyrouter][%s] SHARED mode of grab ! Deliver KeyPress/XI_KeyPress (keycode:%d) to window (0x%x) !\n", __FUNCTION__, xev->xkey.keycode, (int)xev->xkey.window); + } + + for( ptr=keyrouter.HardKeys[index].shared_ptr ; (NULL != ptr) ; ptr=ptr->next ) + { + if( ptr->wid == focus_window ) + { + is_focus_window_in_shared_list = 1; + break; + } + } + + if( !is_focus_window_in_shared_list ) + { + xiData->event = xev->xkey.window = focus_window; + if( isWindowStackChanged ) + BackedupSharedWins(index, focus_window); + + if( xev->type == KeyPress ) + { + XSendEvent(keyrouter.disp, xev->xkey.window, False, NoEventMask, xev); + XSendEvent(keyrouter.disp, xev->xkey.window, False, NoEventMask, cookie);//XI2 + fprintf(stderr, "[keyrouter][%s] Deliver KeyPress/XI_KeyPress (keycode:%d) to focus window (0x%x)!\n", __FUNCTION__, xev->xkey.keycode, xev->xkey.window); + } + } + else + if( isWindowStackChanged ) + BackedupSharedWins(index, None); + + if( isWindowStackChanged ) + isWindowStackChanged = 0; + break; + + default: + fprintf(stderr, "[keyrouter][%s] Unknown mode of grab (mode = %d, index = %d, keycode = %d)\n", __FUNCTION__, grab_mode, index, xev->xkey.keycode); + break; + } +} +#else//_F_USE_XI_GRABDEVICE_ +static void DeliverDeviceKeyEvents(XEvent *xev, int replace_key) +{ + int index; + int revert_to_return; + Window focus_window; + keylist_node* ptr = NULL; + + index = IsGrabbed(xev->xkey.keycode); + + if( index < 0 && keyrouter.HardKeys[xev->xkey.keycode].bind ) + { + fprintf(stderr, "[keyrouter][DeliverDeviceKeyEvents] key(keycode=%d, name=%s) was bound !\n", + xev->xkey.keycode, keyrouter.HardKeys[xev->xkey.keycode].bind->key); + _e_keyrouter_do_bound_key_action(xev); + return; + } + + XGetInputFocus(xev->xany.display, &focus_window, &revert_to_return); + + if( replace_key ) + xev->xkey.keycode = replace_key; + + // Is Grabbed ? + if( index < 0 )//Code for non-grabbed key + { + //Deliver to focus window + xev->xkey.window = focus_window; + + XTestFakeKeyEvent(xev->xany.display, xev->xkey.keycode, (xev->type==KeyPress) ? True : False, CurrentTime); + fprintf(stderr, "[keyrouter][%s] Non-grabbed key! Deliver %s (keycode:%d) to focus window (0x%x) !\n", __FUNCTION__, (xev->type == KeyPress) ? "KeyPress" : "KeyRelease", xev->xkey.keycode, (int)focus_window); + return; + } + + int grab_mode = index & GRAB_MODE_MASK; + index &= ~GRAB_MODE_MASK; + + switch( grab_mode ) + { + case EXCLUSIVE_GRAB: + // Is Grab Mode equal to EXCLUSIVE ? + xev->xkey.window = keyrouter.HardKeys[index].excl_ptr->wid; + XSendEvent(xev->xany.display, xev->xkey.window, False, NoEventMask, xev); + fprintf(stderr, "[keyrouter][%s] EXCLUSIVE mode of grab ! Deliver %s (keycode:%d) to window (0x%x) !\n", __FUNCTION__, (xev->type == KeyPress) ? "KeyPress" : "KeyRelease", xev->xkey.keycode, (int)xev->xkey.window); + break; + + case OR_EXCLUSIVE_GRAB: + // Is Grab Mode equal to OR_EXCLUSIVE ? + xev->xkey.window = keyrouter.HardKeys[index].or_excl_ptr->wid; + XSendEvent(xev->xany.display, xev->xkey.window, False, NoEventMask, xev); + fprintf(stderr, "[keyrouter][%s] OR_EXCLUSIVE mode of grab ! Deliver %s (keycode:%d) to window (0x%x) !\n", __FUNCTION__, (xev->type == KeyPress) ? "KeyPress" : "KeyRelease", xev->xkey.keycode, (int)xev->xkey.window); + break; + + case TOP_POSITION_GRAB: + if( focus_window != keyrouter.HardKeys[index].top_ptr->wid ) + { +#ifdef __DEBUG__ + fprintf(stderr, "[keyrouter][%s] isWindowStackChanged = %d\n", __FUNCTION__, keyrouter.isWindowStackChanged); +#endif + if( keyrouter.isWindowStackChanged ) + keyrouter.resTopVisibleCheck = IsWindowTopVisibleWithoutInputFocus(keyrouter.HardKeys[index].top_ptr->wid, focus_window); + + if( !keyrouter.resTopVisibleCheck ) + goto shared_delivery; + + if( keyrouter.isWindowStackChanged ) + keyrouter.isWindowStackChanged = 0; + } + + // Is Grab Mode equal to TOP_POSITION ? + xev->xkey.window = keyrouter.HardKeys[index].top_ptr->wid; + XSendEvent(xev->xany.display, xev->xkey.window, False, NoEventMask, xev); + fprintf(stderr, "[keyrouter][%s] TOP_POSITION mode of grab ! Deliver %s (keycode:%d) to window (0x%x) !\n", __FUNCTION__, (xev->type == KeyPress) ? "KeyPress" : "KeyRelease", xev->xkey.keycode, (int)xev->xkey.window); + break; + + case SHARED_GRAB: +shared_delivery: + //Deliver to focus_window first + xev->xkey.window = focus_window; + XTestFakeKeyEvent(xev->xany.display, xev->xkey.keycode, (xev->type==KeyPress) ? True : False, CurrentTime); + fprintf(stderr, "[keyrouter][%s] Deliver %s (keycode:%d) to focus window (0x%x)!\n", __FUNCTION__, (xev->type == KeyPress) ? "KeyPress" : "KeyRelease", xev->xkey.keycode, (unsigned int)xev->xkey.window); + + //Deliver to shared grabbed window(s) + for( ptr=keyrouter.HardKeys[index].shared_ptr ; (NULL != ptr) ; ptr=ptr->next ) + { + if( ptr->wid == focus_window ) + continue; + xev->xkey.window = ptr->wid; + XSendEvent(xev->xany.display, xev->xkey.window, False, NoEventMask, xev); + fprintf(stderr, "[keyrouter][%s] SHARED mode of grab ! Deliver %s (keycode:%d) to window (0x%x) !\n", __FUNCTION__, (xev->type == KeyPress) ? "KeyPress" : "KeyRelease", xev->xkey.keycode, (int)xev->xkey.window); + } + break; + + default: + fprintf(stderr, "[keyrouter][%s] Unknown mode of grab (mode = %d, index = %d, keycode = %d)\n", __FUNCTION__, grab_mode, index, xev->xkey.keycode); + break; + } +} +#endif//_F_USE_XI_GRABDEVICE_ + +static void _e_keyrouter_popup_btn_down_cb(void *data) +{ + char *label = (char*)data; + keyrouter.rbutton_pressed_on_popup = 1; + _e_keyrouter_do_hardkey_emulation(label, KeyPress, 0); +} + +static void _e_keyrouter_popup_btn_up_cb(void *data) +{ + char *label = (char*)data; + keyrouter.rbutton_pressed_on_popup = 0; + _e_keyrouter_do_hardkey_emulation(label, KeyRelease, 1); +} + +static void _e_keyrouter_do_hardkey_emulation(const char *label, unsigned int key_event, unsigned int on_release) +{ + if( !label ) + return; + + int i; + char buf[128]; + XEvent xev; + + for( i = 0 ; i < 3 ; i++ ) + { + if( !strcmp(label, btns_label[i]) ) + { + xev.xany.display = keyrouter.disp; + xev.xkey.keycode = keyrouter.btn_keys[i]; + xev.xkey.time = 0; + + xev.xkey.type = key_event; + DeliverDeviceKeyEvents(&xev, 0); + goto out; + } + } + + if( on_release && !strcmp(label, btns_label[3]) )//Rotate Screen + { + keyrouter.toggle %= 4; + sprintf(buf, "/usr/bin/vconftool set -t int memory/sensor/10001 %d", keyrouter.toggle+1); + fprintf(stderr, "[keyrouter][rotation] %s\n", buf); + system (buf); + } + +out: + return; +} + +static void InitHardKeyCodes() +{ + keyrouter.btn_keys[0] = XKeysymToKeycode(keyrouter.disp, XStringToKeysym(KEY_VOLUMEUP)); + keyrouter.btn_keys[1] = XKeysymToKeycode(keyrouter.disp, XStringToKeysym(KEY_VOLUMEDOWN)); + keyrouter.btn_keys[2] = XKeysymToKeycode(keyrouter.disp, XStringToKeysym(KEY_SELECT)); +} + +static void popup_destroy() +{ + if( !keyrouter.popup ) + return; + + ecore_x_pointer_ungrab(); + XISelectEvents(keyrouter.disp, keyrouter.rootWin, &keyrouter.eventmask_part, 1); + + e_popup_hide(keyrouter.popup); + e_object_del( E_OBJECT (keyrouter.popup)); + keyrouter.popup = NULL; +} + +static void popup_update() +{ + popup_destroy(); + popup_show(); +} + +static void popup_show() +{ + if( keyrouter.popup ) + { + fprintf(stderr, "[keyrouter][%s] popup is already displayed...\n", __FUNCTION__); + return; + } + + if( !keyrouter.zone ) + { + fprintf(stderr, "[keyrouter][%s] popup couldn't be displayed because zone is null !\n", __FUNCTION__); + return; + } + + int i; + int posx, posy; + int state = 0; + static Ecore_X_Atom effect_state_atom = 0; + + switch( keyrouter.popup_angle ) + { + case 0: keyrouter.toggle = 3; break; + case 90: keyrouter.toggle = 2; break; + case 180: keyrouter.toggle = 0; break; + case 270: keyrouter.toggle = 1; break; + } + + //creating and showing popup + if( keyrouter.popup_angle == 0 || keyrouter.popup_angle == 180 ) + keyrouter.popup = e_popup_new(keyrouter.zone, 0, 0, POPUP_MENU_WIDTH, POPUP_MENU_HEIGHT); + else + keyrouter.popup = e_popup_new(keyrouter.zone, 0, 0, POPUP_MENU_HEIGHT, POPUP_MENU_WIDTH); + + if( !keyrouter.popup ) + { + fprintf(stderr, "[keyrouter][%s] Failed on e_popup_new() !\n", __FUNCTION__); + return; + } + + keyrouter.popup_bg = evas_object_rectangle_add(keyrouter.popup->evas); + + if( !keyrouter.popup_bg ) + { + fprintf(stderr, "[keyrouter][%s] Fail to call evas_object_rectangle_add() !\n", __FUNCTION__); + popup_destroy(); + return; + } + + evas_object_resize(keyrouter.popup_bg, POPUP_MENU_WIDTH, POPUP_MENU_HEIGHT); + evas_object_color_set(keyrouter.popup_bg, 0, 0, 0, 255); + evas_object_show(keyrouter.popup_bg); + + e_popup_name_set(keyrouter.popup, "R-Click Popup"); + e_popup_layer_set(keyrouter.popup, 240); + + posx = keyrouter.popup_rootx; + posy = keyrouter.popup_rooty; + + if( keyrouter.popup_angle == 0 || keyrouter.popup_angle == 180 ) + { + if( (keyrouter.popup_rootx+POPUP_MENU_WIDTH) >= keyrouter.zone->w ) + { + posx -= POPUP_MENU_WIDTH; + keyrouter.rbutton_pressed_on_popup = 1; + } + if( (keyrouter.popup_rooty+POPUP_MENU_HEIGHT) >= keyrouter.zone->h ) + { + posy -= POPUP_MENU_HEIGHT; + keyrouter.rbutton_pressed_on_popup = 1; + } + e_popup_move(keyrouter.popup, posx, posy); + } + else + { + if( (keyrouter.popup_rootx+POPUP_MENU_HEIGHT) >= keyrouter.zone->w ) + { + posx -= POPUP_MENU_HEIGHT; + keyrouter.rbutton_pressed_on_popup = 1; + } + if( (keyrouter.popup_rooty+POPUP_MENU_WIDTH) >= keyrouter.zone->h ) + { + posy -= POPUP_MENU_WIDTH; + keyrouter.rbutton_pressed_on_popup = 1; + } + e_popup_move(keyrouter.popup, posx, posy); + } + + e_popup_show(keyrouter.popup); + + XISelectEvents(keyrouter.disp, keyrouter.rootWin, &keyrouter.eventmask_all, 1); + + if( !ecore_x_pointer_grab(keyrouter.popup->evas_win) ) + fprintf(stderr, "[keyrouter][%s] Failed to grab pointer !\n", __FUNCTION__); + + //effect disable for popup + effect_state_atom = ecore_x_atom_get ("_NET_CM_WINDOW_EFFECT_ENABLE"); + + if( !effect_state_atom) + fprintf(stderr, "[keyrouter][%s] Cannot find _NET_CM_WINDOW_EFFECT_ENABLE atom...\n", __FUNCTION__); + + ecore_x_window_prop_property_set(keyrouter.popup->evas_win, effect_state_atom, ECORE_X_ATOM_CARDINAL, 32, &state, 1); + + for( i = 0 ; i < 4 ; i++ ) + { + keyrouter.popup_btns[i] = NULL; + //creating event handlers of contents of popup + + keyrouter.popup_btns[i] = e_widget_button_add(evas_object_evas_get(keyrouter.popup_bg), btns_label[i], NULL, NULL, NULL, NULL); + evas_object_event_callback_add(keyrouter.popup_btns[i], EVAS_CALLBACK_MOUSE_DOWN, (Evas_Object_Event_Cb)_e_keyrouter_popup_btn_down_cb, btns_label[i]); + evas_object_event_callback_add(keyrouter.popup_btns[i], EVAS_CALLBACK_MOUSE_UP, (Evas_Object_Event_Cb)_e_keyrouter_popup_btn_up_cb, btns_label[i]); + + evas_object_move(keyrouter.popup_btns[i], 0, i*30); + evas_object_resize(keyrouter.popup_btns[i], POPUP_MENU_WIDTH, 30); + evas_object_show(keyrouter.popup_btns[i]); + } + + if( keyrouter.popup_angle != 0 ) + ecore_evas_rotation_with_resize_set(keyrouter.popup->ecore_evas, keyrouter.popup_angle); + + return; +} + +static void Device_Status(unsigned int val) +{ + if( 1 == val ) + { + keyrouter.fplog = stderr; + } + else if( 2 == val ) + { + keyrouter.fplog = fopen(KEYROUTER_LOG_FILE, "w+"); + + if( keyrouter.fplog < 0 ) + { + fprintf(stderr, "[keyrouter][Device_Status] Failed to open file (%s) !\n", KEYROUTER_LOG_FILE); + keyrouter.fplog = (struct FILE *)stderr; + } + } + + fprintf(keyrouter.fplog, "\n[keyrouter] - Device Status = Start =====================\n"); + + if( keyrouter.device_list ) + { + Eina_List* l; + E_Keyrouter_Device_Info *data; + + EINA_LIST_FOREACH(keyrouter.device_list, l, data) + { + if( data ) + { + fprintf(keyrouter.fplog, "Device id : %d Name : %s\n", data->id, data->name); + switch( data->type ) + { + case E_KEYROUTER_HWKEY: + fprintf(keyrouter.fplog, "¦¦Device type : H/W Key\n"); + break; + + case E_KEYROUTER_KEYBOARD: + fprintf(keyrouter.fplog, "¦¦Device type : Keyboard\n"); + break; + + case E_KEYROUTER_MOUSE: + fprintf(keyrouter.fplog, "¦¦Device type : Mouse\n"); + break; + + case E_KEYROUTER_TOUCHSCREEN: + fprintf(keyrouter.fplog, "¦¦Device type : Touchscreen\n"); + break; + + default: + fprintf(keyrouter.fplog, "¦¦Device type : Unknown\n"); + } + } + } + } + else + { + fprintf(keyrouter.fplog, "No input devices...\n"); + } + + fprintf(keyrouter.fplog, "\n[keyrouter] - Device Status = End =====================\n"); + + if( keyrouter.fplog != stderr ) + { + fflush(keyrouter.fplog); + fclose(keyrouter.fplog); + keyrouter.fplog = (struct FILE *)stderr; + } +} + +static void Keygrab_Status(unsigned int val) +{ + if( 1 == val ) + { + keyrouter.fplog = (struct FILE *)stderr; + } + else if( 2 == val ) + { + keyrouter.fplog = fopen(KEYROUTER_LOG_FILE, "w+"); + + if( keyrouter.fplog < 0 ) + { + fprintf(stderr, "[keyrouter][Keygrab_Status] Failed to open file (%s) !\n", KEYROUTER_LOG_FILE); + keyrouter.fplog = (struct FILE *)stderr; + } + } + + fprintf(keyrouter.fplog, "\n[keyrouter] - Grab Status = Start =====================\n"); + PrintKeyDeliveryList(); + fprintf(keyrouter.fplog, "\n[keyrouter] - Grab Status = End =====================\n"); + + if( keyrouter.fplog != stderr ) + { + fflush(keyrouter.fplog); + fclose(keyrouter.fplog); + keyrouter.fplog = (struct FILE *)stderr; + } +} + +static void InitModKeys() +{ + keyrouter.modkey.keys[0].keysym = XStringToKeysym(KEY_POWER); + keyrouter.modkey.keys[0].keycode = XKeysymToKeycode(keyrouter.disp, keyrouter.modkey.keys[0].keysym); + keyrouter.modkey.keys[1].keysym = XStringToKeysym(KEY_VOLUMEDOWN); + keyrouter.modkey.keys[1].keycode = XKeysymToKeycode(keyrouter.disp, keyrouter.modkey.keys[1].keysym); + keyrouter.modkey.cancel_key.keysym = XStringToKeysym(KEY_CANCEL); + keyrouter.modkey.cancel_key.keycode = XKeysymToKeycode(keyrouter.disp, keyrouter.modkey.cancel_key.keysym); + + fprintf(stderr, "[keyrouter][%s] Modifier Key=%s (keycode:%d)\n", __FUNCTION__, KEY_POWER, keyrouter.modkey.keys[0].keycode); + fprintf(stderr, "[keyrouter][%s] Composited Key=%s (keycode:%d)\n", __FUNCTION__, KEY_VOLUMEDOWN, keyrouter.modkey.keys[1].keycode); + fprintf(stderr, "[keyrouter][%s] Cancel Key=%s (keycode:%d)\n", __FUNCTION__, KEY_CANCEL, keyrouter.modkey.cancel_key.keycode); +#ifdef __DEBUG__ + fprintf(stderr, "[keyrouter][%s] modkey.composited=%d, modkey.set=%d, modkey.time=%d\n", __FUNCTION__, keyrouter.modkey.composited, keyrouter.modkey.set, (int)keyrouter.modkey.time); + fprintf(stderr, "[keyrouter][%s] modkey.idx_mod=%d, modkey.idx_comp=%d\n", __FUNCTION__, keyrouter.modkey.idx_mod, keyrouter.modkey.idx_comp); +#endif//__DEBUG__ +} + +static void ResetModKeyInfo() +{ +#ifdef __DEBUG__ + fprintf(stderr, "[keyrouter][%s] Current Mod Key Info\n", __FUNCTION__); + fprintf(stderr, "[keyrouter][%s] modkey.set=%d, modkey.composited=%d, modkey.time=%d, modkey.idx_mod=%d, modkey.idx_comp=%d\n", + __FUNCTION__, keyrouter.modkey.set, keyrouter.modkey.composited, (int)keyrouter.modkey.time, keyrouter.modkey.idx_mod, keyrouter.modkey.idx_comp); +#endif + keyrouter.modkey.set = keyrouter.modkey.composited = keyrouter.modkey.time = keyrouter.modkey.idx_mod = keyrouter.modkey.idx_comp = 0; +#ifdef __DEBUG__ + fprintf(stderr, "[keyrouter][%s] Reset Mod Key Info\n", __FUNCTION__); +#endif +} + +static int IsModKey(XEvent *ev) +{ + int i; + + for( i = 0 ; i < NUM_COMPOSITION_KEY ; i++ ) + if( ev->xkey.keycode == keyrouter.modkey.keys[i].keycode ) + return (i+1); + + return 0; +} + +static int IsCompKey(XEvent *ev) +{ + if( ev->xkey.keycode == keyrouter.modkey.keys[keyrouter.modkey.idx_mod%NUM_COMPOSITION_KEY].keycode ) + return 4; + + return 0; +} + +static int IsKeyComposited(XEvent *ev) +{ + if( (ev->xkey.keycode == keyrouter.modkey.keys[keyrouter.modkey.idx_mod%NUM_COMPOSITION_KEY].keycode) + && (ev->xkey.time <= (keyrouter.modkey.time + KEY_COMPOSITION_TIME)) ) + return 3; + + return 0; +} + +static void DoKeyCompositionAction() +{ + XEvent xev; + Atom xkey_composition_atom = None; + + Window win; + int revert_to; + +#if 1//def __DEBUG__ + fprintf(stderr, "\n[keyrouter][%s] Do Key Composition Action : ClientMessage to RootWindow!\n", __FUNCTION__); +#endif + + xkey_composition_atom = XInternAtom (keyrouter.disp, STR_ATOM_XKEY_COMPOSITION, False); + + XGetInputFocus(keyrouter.disp, &win, &revert_to); + fprintf(stderr, "[keyrouter][%s] win=0x%x\n", __FUNCTION__, (unsigned int)win); + + if( win ) + xev.xclient.window = win; + else + xev.xclient.window = keyrouter.rootWin; + xev.xclient.type = ClientMessage; + xev.xclient.message_type = xkey_composition_atom; + xev.xclient.format = 32; + xev.xclient.data.l[0] = keyrouter.modkey.keys[0].keycode; + xev.xclient.data.l[1] = keyrouter.modkey.keys[1].keycode; + xev.xclient.data.l[2] = 0; + xev.xclient.data.l[3] = 0; + xev.xclient.data.l[4] = 0; + + XSendEvent(keyrouter.disp, keyrouter.rootWin, False, StructureNotifyMask, &xev); + XSync(keyrouter.disp, False); +} + +// End of a file + diff --git a/keyrouter/src/e_mod_main.h b/keyrouter/src/e_mod_main.h new file mode 100755 index 0000000..c43f2df --- /dev/null +++ b/keyrouter/src/e_mod_main.h @@ -0,0 +1,298 @@ +#ifndef __E_MOD_MAIN_H__ +#define __E_MOD_MAIN_H__ + +#include +#include +#include +#include +#include +#include +#include +#include + +//maximum number of hardkeys +#define MAX_HARDKEYS 255 + +#define POPUP_MENU_WIDTH 95 +#define POPUP_MENU_HEIGHT 120 + +//grab modes +#define NONE_GRAB_MODE 0 +#define OR_EXCL_GRAB_MODE 1 +#define EXCL_GRAB_MODE 2 +#define TOP_GRAB_MODE 3 +#define SHARED_GRAB_MODE 4 +#define ALL_GRAB_MODE 10 + +#define STR_ATOM_DEVICE_STATUS "_DEVICE_STATUS" +#define STR_ATOM_GRAB_STATUS "_GRAB_STATUS" +#define PROP_X_MOUSE_CURSOR_ENABLE "X Mouse Cursor Enable" +#define PROP_X_MOUSE_EXIST "X Mouse Exist" +#define PROP_X_EXT_KEYBOARD_EXIST "X External Keyboard Exist" +#define PROP_X_EVDEV_AXIS_LABELS "Axis Labels" + +//key composition for screen capture +#define NUM_COMPOSITION_KEY 2 +#define KEY_COMPOSITION_TIME 300 +#define STR_ATOM_XKEY_COMPOSITION "_XKEY_COMPOSITION" + +#define KEYROUTER_LOG_FILE "/opt/var/log/keygrab_status.txt" + +typedef struct _keylist_node +{ + Window wid; + struct _keylist_node* next; +} keylist_node; + +typedef struct +{ + int keycode; + char* keyname; + E_Binding_Key *bind; + Window lastwid; + int lastmode; + keylist_node* or_excl_ptr; + keylist_node* excl_ptr; + keylist_node* top_ptr; + keylist_node* top_tail; + keylist_node* shared_ptr; + Window *shared_wins; + int num_shared_wins; +} GrabbedKey; + +//Enumeration for getting KeyClass +enum +{ + INPUTEVENT_KEY_PRESS, + INPUTEVENT_KEY_RELEASE, + INPUTEVENT_MAX +}; + +typedef struct _kinfo +{ + KeySym keysym; + unsigned int keycode; +} kinfo; + +typedef struct _ModifierKey +{ + int set; + int composited; + int idx_mod; + int idx_comp; + Time time; + kinfo cancel_key; + kinfo keys[NUM_COMPOSITION_KEY]; +} ModifierKey; + +const char *btns_label[] = { + "Volume Up", + "Volume Down", + "Go Home", + "Rotate" +}; + +#define NUM_HWKEYS 17 +const char *HWKeys[] = { + KEY_VOLUMEUP, + KEY_VOLUMEDOWN, + KEY_CAMERA, + KEY_CONFIG, + KEY_POWER, + KEY_PAUSE, + KEY_CANCEL, + KEY_SEND, + KEY_SELECT, + KEY_END, + KEY_PLAYCD, + KEY_STOPCD, + KEY_PAUSECD, + KEY_NEXTSONG, + KEY_PREVIOUSSONG, + KEY_REWIND, + KEY_FASTFORWARD +}; + +typedef enum +{ + E_KEYROUTER_HWKEY= 1, + E_KEYROUTER_KEYBOARD, + E_KEYROUTER_MOUSE, + E_KEYROUTER_TOUCHSCREEN +} KeyrouterDeviceType; + +typedef struct _E_Keyrouter_Device_Info E_Keyrouter_Device_Info; + +struct _E_Keyrouter_Device_Info +{ + int id; + const char *name; + KeyrouterDeviceType type; +}; + +//global variables will be the member variables of keyrouter structure +typedef struct _tag_keyrouter +{ + Ecore_X_Display* disp; + Ecore_X_Window rootWin; + + //screen capture related variables + ModifierKey modkey; + + //mouse rbutton popup related variables + int toggle; + int rbutton_pressed_on_popup; + int popup_angle; + int popup_rootx; + int popup_rooty; + + E_Zone *zone; + E_Popup *popup; + Evas_Object *popup_btns[4]; + Evas_Object* popup_bg; + unsigned int btn_keys[3]; + + //number of connected pointer and keyboard devices + int num_pointer_devices; + int num_keyboard_devices; + int num_hwkey_devices; + + Eina_List *device_list; + + //XInput extension 1 related variables + int DeviceKeyPress; + int DeviceKeyRelease; + int nInputEvent[INPUTEVENT_MAX]; + + //XInput extension 2 related variables + int xi2_opcode; + XIEventMask eventmask_all; + XIEventMask eventmask_part; + XIEventMask eventmask_0; + + GrabbedKey HardKeys[MAX_HARDKEYS]; + int isWindowStackChanged; + int resTopVisibleCheck; + + struct FILE *fplog; + + //atoms + Atom atomPointerType; + Atom atomXMouseExist; + Atom atomXMouseCursorEnable; + Atom atomXExtKeyboardExist; + Atom atomGrabKey; + Atom atomGrabStatus; + Atom atomDeviceStatus; + Atom atomGrabExclWin; + Atom atomGrabORExclWin; + +#ifdef _F_USE_XI_GRABDEVICE_ + XEvent *gev; + XGenericEventCookie *gcookie; +#endif + + //event handlers + Ecore_Event_Handler *e_window_property_handler; + Ecore_Event_Handler *e_border_stack_handler; + Ecore_Event_Handler *e_border_remove_handler; + Ecore_Event_Handler *e_window_create_handler; + Ecore_Event_Handler *e_window_destroy_handler; + Ecore_Event_Handler *e_window_configure_handler; + Ecore_Event_Handler *e_window_stack_handler; +#ifdef _F_USE_XI_GRABDEVICE_ + Ecore_Event_Handler *e_event_generic_handler; +#else//_F_USE_XI_GRABDEVICE_ + Ecore_Event_Handler *e_event_generic_handler; + Ecore_Event_Handler *e_event_any_handler; +#endif//_F_USE_XI_GRABDEVICE_ +} KeyRouter; + +//function prototypes +EAPI extern E_Module_Api e_modapi; +EAPI void* e_modapi_init (E_Module* m); +EAPI int e_modapi_shutdown (E_Module* m); +EAPI int e_modapi_save (E_Module* m); + +static int _e_keyrouter_init(); +static void _e_keyrouter_fini(); +static void _e_keyrouter_structure_init(); +static void _e_keyrouter_bindings_init(); +static void _e_keyrouter_x_input_init(void); + +//event handlers +#ifdef _F_USE_XI_GRABDEVICE_ +static int _e_keyrouter_cb_event_generic(void *data, int ev_type, void *ev); +#else//_F_USE_XI_GRABDEVICE_ +static int _e_keyrouter_cb_event_generic(void *data, int ev_type, void *event); +static int _e_keyrouter_cb_event_any(void *data, int ev_type, void *ev); +#endif//_F_USE_XI_GRABDEVICE_ +//static int _e_keyrouter_cb_e_border_add(void *data, int ev_type, void *ev); +static int _e_keyrouter_cb_window_property(void *data, int ev_type, void *ev); +static int _e_keyrouter_cb_e_border_stack(void *data, int ev_type, void *ev); +static int _e_keyrouter_cb_e_border_remove(void *data, int ev_type, void *ev); +static int _e_keyrouter_cb_window_create(void *data, int ev_type, void *ev); +static int _e_keyrouter_cb_window_destroy(void *data, int ev_type, void *ev); +static int _e_keyrouter_cb_window_configure(void *data, int ev_type, void *ev); +static int _e_keyrouter_cb_window_stack(void *data, int ev_type, void *ev); +static void _e_keyrouter_xi2_device_hierarchy_handler(XIHierarchyEvent *event); +static int _e_keyrouter_is_relative_device(int deviceid); +static void _e_keyrouter_device_add(int id, int type); +static void _e_keyrouter_device_remove(int id, int type); +static void _e_keyrouter_set_keyboard_exist(unsigned int val, int is_connected); +static void _e_keyrouter_set_mouse_exist(unsigned int val, int propset); +static void _e_keyrouter_mouse_cursor_enable(unsigned int val); + +//e17 bindings functions and action callbacks +static int _e_keyrouter_modifiers(E_Binding_Modifier modifiers); +static void _e_keyrouter_do_bound_key_action(XEvent *xev); + +#ifdef _F_USE_XI_GRABDEVICE_ +static void DeliverKeyEvents(XEvent *xev, XGenericEventCookie *cookie); +#else//_F_USE_XI_GRABDEVICE_ +//static void DeliverDeviceKeyEvents(XEvent *xev); +static void DeliverDeviceKeyEvents(XEvent *xev, int replace_key); +#endif//_F_USE_XI_GRABDEVICE_ + +static void InitGrabKeyDevices(); +#ifdef _F_USE_XI_GRABDEVICE_ +static int GrabXIKeyDevices(); +static void UngrabXIKeyDevices(); +#else//_F_USE_XI_GRABDEVICE_ +static int GrabKeyDevices(Window win); +static void UngrabKeyDevices(); +#endif//_F_USE_XI_GRABDEVICE_ + +//functions related to mouse rbutton popup +static void InitHardKeyCodes(); +static E_Zone* _e_keyrouter_get_zone(); +static void popup_update(); +static void popup_show(); +static void popup_destroy(); +static void _e_keyrouter_do_hardkey_emulation(const char *label, unsigned int key_event, unsigned int on_release); + +//functions related to key composition for screen capture +static void InitModKeys(); +static void ResetModKeyInfo(); +static int IsModKey(XEvent *ev); +static int IsCompKey(XEvent *ev); +static int IsKeyComposited(XEvent *ev); +static void DoKeyCompositionAction(); + +static void UnSetExclusiveGrabInfoToRootWindow(int keycode, int grab_mode); +static int AdjustTopPositionDeliveryList(Window win, int IsOnTop); +static int AddWindowToDeliveryList(Window win, int keycode, const int grab_mode, const int IsOnTop); +static int RemoveWindowDeliveryList(Window win, int isTopPositionMode, int UnSetExclusiveProperty); +static int GetItemFromWindow(Window win, const char* atom_name, unsigned int **key_list); + +static int IsGrabbed(unsigned int keycode); +static void detachSlave(int DeviceID); +static void reattachSlave(int slave, int master); +static void Keygrab_Status(unsigned int val); +static void Device_Status(unsigned int val); +static void PrintKeyDeliveryList(); +static void BuildKeyGrabList(Window root); +static int GrabKeyDevice(Window win, const char* DeviceName, const int DeviceID); + +#endif//__E_MOD_MAIN_H__ + diff --git a/packaging/e17-extra-modules.spec b/packaging/e17-extra-modules.spec new file mode 100644 index 0000000..8570e99 --- /dev/null +++ b/packaging/e17-extra-modules.spec @@ -0,0 +1,64 @@ +Name: e17-extra-modules +Summary: The E17 Extra Modules The E17 extra modules consists of modules made by SAMSUNG +Version: 0.1 +Release: 1 +Group: TO_BE/FILLED_IN +License: TO BE FILLED IN +Source0: %{name}-%{version}.tar.gz +BuildRequires: pkgconfig(enlightenment) +BuildRequires: pkgconfig(utilX) +BuildRequires: pkgconfig(elementary) +BuildRequires: pkgconfig(dlog) +BuildRequires: pkgconfig(x11) +BuildRequires: pkgconfig(xextproto) +BuildRequires: pkgconfig(xfixes) +BuildRequires: pkgconfig(xext) +BuildRequires: pkgconfig(edje) +BuildRequires: pkgconfig(xrandr) +BuildRequires: pkgconfig(evas) +BuildRequires: pkgconfig(xi) +BuildRequires: pkgconfig(xtst) +BuildRequires: embryo-bin +BuildRequires: edje-bin +Requires: libX11 + +%description +The E17 Extra Modules The E17 extra modules consists of modules made by SAMSUNG. + +%prep +%setup -q + + +%build + +export CFLAGS+=" -Wall -g -fPIC -rdynamic" +export LDFLAGS+=" -Wl,--hash-style=both -Wl,--as-needed -Wl,--rpath=/usr/lib" + +%ifarch %{arm} +export CFLAGS+=" -D_ENV_ARM" +%endif + + +for FILE in comp-slp illume2-slp keyrouter wmready +do + (cd $FILE && ./autogen.sh && ./configure --prefix=/usr && make ) +done + + +%install +rm -rf %{buildroot} + +for FILE in comp-slp illume2-slp keyrouter wmready +do + (cd $FILE && make install DESTDIR=%{buildroot} ) +done + +find %{buildroot}/usr/lib/enlightenment/modules -name *.la | xargs rm + +%files +%defattr(-,root,root,-) +%{_libdir}/enlightenment/modules/comp-slp/* +%{_libdir}/enlightenment/modules/illume2-slp/* +%{_libdir}/enlightenment/modules/e17-extra-module-keyrouter/* +%{_libdir}/enlightenment/modules/e17-extra-module-wmready/* +%{_datadir}/enlightenment/data/* diff --git a/wmready/AUTHORS b/wmready/AUTHORS new file mode 100644 index 0000000..00d5ec7 --- /dev/null +++ b/wmready/AUTHORS @@ -0,0 +1,2 @@ +Doyoun Kang +Sangjin Lee diff --git a/wmready/COPYING b/wmready/COPYING new file mode 100644 index 0000000..7625f00 --- /dev/null +++ b/wmready/COPYING @@ -0,0 +1,25 @@ +Copyright notice for Enlightenment: + +Copyright (C) 2000-2011 Carsten Haitzler and various contributors (see AUTHORS) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, +OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/wmready/Makefile.am b/wmready/Makefile.am new file mode 100644 index 0000000..1041b42 --- /dev/null +++ b/wmready/Makefile.am @@ -0,0 +1,18 @@ +# maintainer-clean removes everything +MAINTAINERCLEANFILES = aclocal.m4 compile config.sub config.guess config.h.in \ + configure depcomp install-sh ltmain.sh Makefile.in missing + +SUBDIRS = src + +filesdir = $(datadir) +files_DATA = module.desktop + +EXTRA_DIST = module.desktop.in + +clean-local: + rm -rf module.desktop + +uninstall: + rm -rf $(DESTDIR)$(datadir) + + diff --git a/wmready/autogen.sh b/wmready/autogen.sh new file mode 100755 index 0000000..5a30991 --- /dev/null +++ b/wmready/autogen.sh @@ -0,0 +1,10 @@ +#!/bin/sh +# Run this to generate all the initial makefiles, etc. + +set -x +aclocal +autoconf +libtoolize --copy --force +autoheader +automake --foreign --add-missing --copy + diff --git a/wmready/configure.ac b/wmready/configure.ac new file mode 100644 index 0000000..136c3b0 --- /dev/null +++ b/wmready/configure.ac @@ -0,0 +1,114 @@ +# authored by Doyoun.kang +# +# Note ) +# +# AC_DEFINE(VARIABLE, VALUE, DESCRIPTION) +# output the following to config.h +# /* DESCRIPTION */ +# #define VARIABLE VALUE +# +# AC_SUBST(VARIABLE, [VALUE]) +# define $(VARIABLE) as VALUE in Makefile + +dnl ======================================================================== +# initialization +dnl ======================================================================== +AC_INIT([e17-extra-module-wmready], [0.1], [doyoun.kang@samsung.com]) + +# check for tools needed by automake generated Makefiles +# -Wall : Turn all warnings on. +# -Werror: report warings as errors. +# foreign: relax some GNU standard requirements +#AM_INIT_AUTOMAKE([-Wall -Werror foreign]) +AM_INIT_AUTOMAKE([-Wall foreign]) + +dnl ======================================================================== +# checks for programs +dnl ======================================================================== +AC_PROG_CC +AC_DISABLE_STATIC +AC_PROG_LIBTOOL + +dnl ======================================================================== +# checks for libraries +dnl ======================================================================== + +dnl ======================================================================== +# checks for header files +dnl ======================================================================== +#AC_HEADER_STDC +AC_CHECK_HEADERS([math.h fcntl.h stdlib.h string.h unistd.h]) + +dnl ======================================================================== +# checks for typedefs, structures, and compiler characteristics +AC_C_CONST + +dnl ======================================================================== +# checks for library functions +dnl ======================================================================== +#AC_FUNC_MALLOC +AC_FUNC_MMAP +AC_CHECK_FUNCS([memset munmap strcasecmp strdup]) + +dnl ======================================================================== +# checks for pkg-config +dnl ======================================================================== +PKG_PROG_PKG_CONFIG + + +dnl ======================================================================== +# checks for pkg-config +dnl ======================================================================== +PKG_CHECK_MODULES(ENLIGHTENMENT, enlightenment) +AC_SUBST(ENLIGHTENMENT_CFLAGS) +AC_SUBST(ENLIGHTENMENT_LIBS) + +# Find edje_cc +#PKG_CHECK_MODULES(EDJE, [edje >= 0.5.0]) +#AC_ARG_WITH(edje-cc, +# AC_HELP_STRING([--with-edje-cc=PATH], [specify a specific path to edje_cc]), +# [ +# v=$withval; +# EDJE_CC=$v +# ], +# [ +# EDJE_CC=$(pkg-config --variable=prefix edje)/bin/edje_cc +# ] +#) +#AC_SUBST(EDJE_CC) +#AC_MSG_CHECKING([Which edje_cc to use]) +#AC_MSG_RESULT(${EDJE_CC}) + + +dnl ======================================================================= + +release=$(pkg-config --variable=release enlightenment) +MODULE_ARCH="$host_os-$host_cpu-$release" +AC_SUBST(MODULE_ARCH) +AC_DEFINE_UNQUOTED(MODULE_ARCH, "$MODULE_ARCH", "Module architecture") + +datadir=$(pkg-config --variable=modules enlightenment)/${PACKAGE} +AC_ARG_ENABLE(homedir-install, + AS_HELP_STRING([--enable-homedir-install], [Install module in homedir]), + [ datadir="${HOME}/.e/e/modules/${PACKAGE}" ] +) + +dnl ======================================================================== +# output files +dnl ======================================================================== + +# create HEADER for all HEADER.in. +# HEADERS contain definitions made with AC_DEFINE. +# the following command will create config.h from config.h.in +AC_CONFIG_HEADERS([config.h]) + +# create FILE for all FILE.in. +# FILES contains definitions made with AC_SUBST. +AC_CONFIG_FILES([ + Makefile + src/Makefile + module.desktop + ]) + +AC_OUTPUT + diff --git a/wmready/module.desktop.in b/wmready/module.desktop.in new file mode 100755 index 0000000..c7b0681 --- /dev/null +++ b/wmready/module.desktop.in @@ -0,0 +1,31 @@ +[Desktop Entry] +Type=Link +Name=WMready +Name[cs]= +Name[de]= +Name[eo]= +Name[es]= +Name[fr]= +Name[hu]= +Name[it]= +Name[ja]= +Name[pt]= +Name[pt_BR]= +Name[tr]= +Name[zh_CN]= +Name[zh_TW]= +Icon=e-module-clock +Comment=WMready
Samsung WMready. +Comment[cs]= +Comment[de]= +Comment[eo]= +Comment[es]= +Comment[fr]= +Comment[hu]= +Comment[it]= +Comment[ja]= +Comment[pt]= +Comment[pt_BR]= +Comment[tr]= +Comment[zh_CN]= +Comment[zh_TW]= diff --git a/wmready/src/Makefile.am b/wmready/src/Makefile.am new file mode 100644 index 0000000..4fb5413 --- /dev/null +++ b/wmready/src/Makefile.am @@ -0,0 +1,27 @@ +MAINTAINERCLEANFILES = Makefile.in +MODULE = e17-extra-module-wmready + +LDFLAGS += +#LDFLAGS += -lvconf -lappfwk + +#CPPFLAGS = \ +# -I. \ +# -I$(includedir) \ +# -I$(includedir)/enlightenment + +# the module .so file +#INCLUDES = -I. \ +# -I$(includedir) +# -I$(includedir)/enlightenment \ +# @e_cflags@ +pkgdir = $(libdir)/enlightenment/modules/$(MODULE)/$(MODULE_ARCH) +pkg_LTLIBRARIES = module.la +module_la_SOURCES = e_mod_main.c \ + e_mod_main.h +module_la_LIBADD = +module_la_CFLAGS = @ENLIGHTENMENT_CFLAGS@ +module_la_LDFLAGS = -module -avoid-version @ENLIGHTENMENT_LIBS@ +module_la_DEPENDENCIES = $(top_builddir)/config.h + +#uninstall: +# rm -rf $(DESTDIR)$(libdir)/enlightenment/modules/$(MODULE) diff --git a/wmready/src/e_mod_main.c b/wmready/src/e_mod_main.c new file mode 100644 index 0000000..87575ec --- /dev/null +++ b/wmready/src/e_mod_main.c @@ -0,0 +1,102 @@ +#include "e.h" +#include "e_mod_main.h" + +static int _e_wmready_init (void); +static void _e_wmready_fin (void); +static void _e_wmready_proc_hibernation (void); +static void _e_wmready_set_ready_flag (void); +static Eina_Bool _e_wmready_cb_timer(void *data); + +static Ecore_Timer *_wmready_timer = NULL; + +/* this is needed to advertise a label for the module IN the code (not just + * the .desktop file) but more specifically the api version it was compiled + * for so E can skip modules that are compiled for an incorrect API version + * safely) */ +EAPI E_Module_Api e_modapi = +{ + E_MODULE_API_VERSION, "I'm Ready Module of Window Manager" +}; + +EAPI void* +e_modapi_init (E_Module* m) +{ + if( !_e_wmready_init() ) + { + printf("[wmready][%s] Failed @ _e_wmready_init()..!\n", __FUNCTION__); + return NULL; + } + + _e_wmready_proc_hibernation(); + _e_wmready_set_ready_flag(); + + return m; +} + +EAPI int +e_modapi_shutdown (E_Module* m) +{ + _e_wmready_fin(); + + return 1; +} + +EAPI int +e_modapi_save (E_Module* m) +{ + /* Do Something */ + return 1; +} + +static int _e_wmready_init (void) +{ + int ret = 1; + return ret; +} + +static void _e_wmready_fin (void) +{ +} + +static void _e_wmready_proc_hibernation (void) +{ + Eina_Bool is_hib; + E_Powersave_Mode mode; + + is_hib = ecore_file_exists ("/opt/etc/.hib_capturing"); + mode = e_powersave_mode_get(); + + if (is_hib == EINA_TRUE) + { + if (mode != E_POWERSAVE_MODE_NONE) + { + e_powersave_mode_set (E_POWERSAVE_MODE_NONE); + } + + _wmready_timer = ecore_timer_add(1.0, _e_wmready_cb_timer, NULL); + } + else + { + if (mode != E_POWERSAVE_MODE_LOW) + { + e_powersave_mode_set (E_POWERSAVE_MODE_LOW); + } + } +} + +static Eina_Bool _e_wmready_cb_timer(void *data) +{ + // set flag for hibernation + system ("/usr/bin/vconftool set -t int \"memory/hibernation/xserver_ready\" 1 -i -f"); + + // set power save mode to LOW + e_powersave_mode_set (E_POWERSAVE_MODE_LOW); + + return ECORE_CALLBACK_CANCEL; +} + +static void _e_wmready_set_ready_flag (void) +{ + system ("/bin/touch /tmp/.wm_ready"); +} + diff --git a/wmready/src/e_mod_main.h b/wmready/src/e_mod_main.h new file mode 100644 index 0000000..61074af --- /dev/null +++ b/wmready/src/e_mod_main.h @@ -0,0 +1,12 @@ +#ifndef __E_MOD_MAIN_H__ +#define __E_MOD_MAIN_H__ + +EAPI extern E_Module_Api e_modapi; + +EAPI void* e_modapi_init (E_Module* m); +EAPI int e_modapi_shutdown (E_Module* m); +EAPI int e_modapi_save (E_Module* m); + + +#endif//__E_MOD_MAIN_H__ +