--- /dev/null
+The Rasterman (Carsten Haitzler) <raster@rasterman.com>
+Ibukun Olumuyiwa <ibukun@computer.org>
+Sebastian Dransfeld <sd@tango.flipp.net>
+HandyAndE (Andrew Williams) <andy@handyande.co.uk>
+CodeWarrior (Hisham Mardam Bey) <hisham@hisham.cc>
+dj2 (Dan Sinclair) <dj2@everburning.com>
+Tilman Sauerbeck <tilman@code-monkey.de>
+Aleksej Struk <astruk@gmail.com>
+Brian Mattern <rephorm@rephorm.com>
+devilhorns (Christopher Michael) <devilhorns@comcast.net>
+/dev/urandom (Viktor Kojouharov) <vkojouharov@gmail.com>
+ilLogict (Chidambar Zinnoury) <illogict@online.fr>
+Stafford Horne <shorne@softhome.net>
+Cedric Bail <cedric.bail@free.fr>
+onefang (David Seikel) <onefang@gmail.com>
+okra (Stephen Houston) <smhouston88@gmail.com>
+Byron Hillis <metrics@score5.org>
+Ravenlock (Eric Schuele) <e.schuele@computer.org>
+ManoWarrior (Luchezar Petkov) <luchezar.petkov@gmail.com>
+morlenxus (Brian Miculcy) <morlenxus@gmx.net>
+Toma- (Tom Haste) <tomhaste@gmail.com>
+k-s (Gustavo Sverzut Barbieri) <barbieri@profusion.mobi>
+Peter van de Werken <pwerken-e@a-eskwadraat.nl>
+Florian Hackenberger <florian@hackenberger.at>
+Hannes Janetzek <hannes.janetzek@gmail.com>
+Mike Blumenkrantz (discomfitor/zmike) <mike@zentific.com>
+Leif Middelschulte <leif.middelschulte@gmail.com>
+yoz (Michael Bouchaud) <michael.bouchaud@gmail.com>
+Gwanglim Lee <gl77.lee@samsung.com>
+Doyoun Kang <doyoun.kang@samsung.com>
+Gwangyeong Mun <kk.moon@samsung.com>
+Duna Oh <duna.oh@samsung.com>
+Sung-Jin Park <sj76.park@samsung.com>
+Sangjin Lee <lsj119@samsung.com>
--- /dev/null
+Copyright notice for Enlightenment:
+
+Copyright (C) 2000-2012 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.
--- /dev/null
+Copyright notice for Flora-licensed files:
+
+The following file is copyrighted by Samsung Electronics Co., Ltd
+and licensed under Flora License, Version 1.
+- devicemgr/src/sf_rotation_devicemgr.c
+
+Copyright (C) 2013 Samsung Electronics Co., Ltd All rights reserved.
+
+Flora License
+
+Version 1.0, April, 2013
+
+http://floralicense.org/license/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction,
+and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by
+the copyright owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and
+all other entities that control, are controlled by, or are
+under common control with that entity. For the purposes of
+this definition, "control" means (i) the power, direct or indirect,
+to cause the direction or management of such entity,
+whether by contract or otherwise, or (ii) ownership of fifty percent (50%)
+or more of the outstanding shares, or (iii) beneficial ownership of
+such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity
+exercising permissions granted by this License.
+
+"Source" form shall mean the preferred form for making modifications,
+including but not limited to software source code, documentation source,
+and configuration files.
+
+"Object" form shall mean any form resulting from mechanical
+transformation or translation of a Source form, including but
+not limited to compiled object code, generated documentation,
+and conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or Object form,
+made available under the License, as indicated by a copyright notice
+that is included in or attached to the work (an example is provided
+in the Appendix below).
+
+"Derivative Works" shall mean any work, whether in Source or Object form,
+that is based on (or derived from) the Work and for which the editorial
+revisions, annotations, elaborations, or other modifications represent,
+as a whole, an original work of authorship. For the purposes of this License,
+Derivative Works shall not include works that remain separable from,
+or merely link (or bind by name) to the interfaces of, the Work and
+Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the original
+version of the Work and any modifications or additions to that Work or
+Derivative Works thereof, that is intentionally submitted to Licensor
+for inclusion in the Work by the copyright owner or by an individual or
+Legal Entity authorized to submit on behalf of the copyright owner.
+For the purposes of this definition, "submitted" means any form of
+electronic, verbal, or written communication sent to the Licensor or
+its representatives, including but not limited to communication on
+electronic mailing lists, source code control systems, and issue
+tracking systems that are managed by, or on behalf of, the Licensor
+for the purpose of discussing and improving the Work, but excluding
+communication that is conspicuously marked or otherwise designated
+in writing by the copyright owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity
+on behalf of whom a Contribution has been received by Licensor and
+subsequently incorporated within the Work.
+
+"Tizen Certified Platform" shall mean a software platform that complies
+with the standards set forth in the Tizen Compliance Specification
+and passes the Tizen Compliance Tests as defined from time to time
+by the Tizen Technical Steering Group and certified by the Tizen
+Association or its designated agent.
+
+2. Grant of Copyright License. Subject to the terms and conditions of
+this License, each Contributor hereby grants to You a perpetual,
+worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+copyright license to reproduce, prepare Derivative Works of,
+publicly display, publicly perform, sublicense, and distribute the
+Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of
+this License, each Contributor hereby grants to You a perpetual,
+worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+(except as stated in this section) patent license to make, have made,
+use, offer to sell, sell, import, and otherwise transfer the Work
+solely as incorporated into a Tizen Certified Platform, where such
+license applies only to those patent claims licensable by such
+Contributor that are necessarily infringed by their Contribution(s)
+alone or by combination of their Contribution(s) with the Work solely
+as incorporated into a Tizen Certified Platform to which such
+Contribution(s) was submitted. If You institute patent litigation
+against any entity (including a cross-claim or counterclaim
+in a lawsuit) alleging that the Work or a Contribution incorporated
+within the Work constitutes direct or contributory patent infringement,
+then any patent licenses granted to You under this License for that
+Work shall terminate as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the
+Work or Derivative Works thereof pursuant to the copyright license
+above, in any medium, with or without modifications, and in Source or
+Object form, provided that You meet the following conditions:
+
+ 1. You must give any other recipients of the Work or Derivative Works
+ a copy of this License; and
+ 2. You must cause any modified files to carry prominent notices stating
+ that You changed the files; and
+ 3. You must retain, in the Source form of any Derivative Works that
+ You distribute, all copyright, patent, trademark, and attribution
+ notices from the Source form of the Work, excluding those notices
+ that do not pertain to any part of the Derivative Works; and
+ 4. If the Work includes a "NOTICE" text file as part of its distribution,
+ then any Derivative Works that You distribute must include a readable
+ copy of the attribution notices contained within such NOTICE file,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works, in at least one of the following places:
+ within a NOTICE text file distributed as part of the Derivative Works;
+ within the Source form or documentation, if provided along with the
+ Derivative Works; or, within a display generated by the Derivative Works,
+ if and wherever such third-party notices normally appear.
+ The contents of the NOTICE file are for informational purposes only
+ and do not modify the License.
+
+You may add Your own attribution notices within Derivative Works
+that You distribute, alongside or as an addendum to the NOTICE text
+from the Work, provided that such additional attribution notices
+cannot be construed as modifying the License. You may add Your own
+copyright statement to Your modifications and may provide additional or
+different license terms and conditions for use, reproduction, or
+distribution of Your modifications, or for any such Derivative Works
+as a whole, provided Your use, reproduction, and distribution of
+the Work otherwise complies with the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise,
+any Contribution intentionally submitted for inclusion in the Work
+by You to the Licensor shall be under the terms and conditions of
+this License, without any additional terms or conditions.
+Notwithstanding the above, nothing herein shall supersede or modify
+the terms of any separate license agreement you may have executed
+with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade
+names, trademarks, service marks, or product names of the Licensor,
+except as required for reasonable and customary use in describing the
+origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or
+agreed to in writing, Licensor provides the Work (and each
+Contributor provides its Contributions) on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+implied, including, without limitation, any warranties or conditions
+of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+PARTICULAR PURPOSE. You are solely responsible for determining the
+appropriateness of using or redistributing the Work and assume any
+risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory,
+whether in tort (including negligence), contract, or otherwise,
+unless required by applicable law (such as deliberate and grossly
+negligent acts) or agreed to in writing, shall any Contributor be
+liable to You for damages, including any direct, indirect, special,
+incidental, or consequential damages of any character arising as a
+result of this License or out of the use or inability to use the
+Work (including but not limited to damages for loss of goodwill,
+work stoppage, computer failure or malfunction, or any and all
+other commercial damages or losses), even if such Contributor
+has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing
+the Work or Derivative Works thereof, You may choose to offer,
+and charge a fee for, acceptance of support, warranty, indemnity,
+or other liability obligations and/or rights consistent with this
+License. However, in accepting such obligations, You may act only
+on Your own behalf and on Your sole responsibility, not on behalf
+of any other Contributor, and only if You agree to indemnify,
+defend, and hold each Contributor harmless for any liability
+incurred by, or claims asserted against, such Contributor by reason
+of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Flora License to your work
+
+To apply the Flora License to your work, attach the following
+boilerplate notice, with the fields enclosed by brackets "[]"
+replaced with your own identifying information. (Don't include
+the brackets!) The text should be enclosed in the appropriate
+comment syntax for the file format. We also recommend that a
+file or class name and description of purpose be included on the
+same "printed page" as the copyright notice for easier
+identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Flora License, Version 1.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://floralicense.org/license/
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
--- /dev/null
+Except as noted, this software is licensed under BSD license.
+Please, see the COPYING file for BSD License terms and conditions.
+
+Several source codes may have its original copyright owner and/or
+be licensed under other than BSD License, say, Flora License, Version 1.
+Please, see the COPYING.Flora for Flora License terms and conditions.
--- /dev/null
+Sung-Jin Park <sj76.park@samsung.com>
+Sangjin Lee <lsj119@samsung.com>
--- /dev/null
+Copyright notice for Enlightenment:
+
+Copyright (C) 2000-2012 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.
--- /dev/null
+# 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)
+
+
--- /dev/null
+#!/bin/sh
+# Run this to generate all the initial makefiles, etc.
+
+set -x
+aclocal
+autoconf
+libtoolize --copy --force
+autoheader
+automake --foreign --add-missing --copy
+
--- /dev/null
+# authored by Sung-Jin Park <sj76.park@samsung.com>
+#
+# 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-accessibility], [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
+
+#PKG_CHECK_MODULES(GESTUREPROTO, gestureproto)
+#PKG_CHECK_MODULES(GESTURELIB, xgesture)
+
+dnl ========================================================================
+# checks for pkg-config
+dnl ========================================================================
+#PKG_CHECK_MODULES(ENLIGHTENMENT, [enlightenment, gestureproto, xgesture])
+PKG_CHECK_MODULES(ENLIGHTENMENT, [enlightenment])
+ENLIGHTENMENT_CFLAGS="${ENLIGHTENMENT_CFLAGS} "
+AC_SUBST(ENLIGHTENMENT_CFLAGS)
+AC_SUBST(ENLIGHTENMENT_LIBS)
+
+
+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
+
--- /dev/null
+[Desktop Entry]
+Type=Link
+Name=Accessibility
+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=<title>Accessibility</title><br>Samsung Accessibility.
+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]=
--- /dev/null
+MAINTAINERCLEANFILES = Makefile.in
+MODULE = e17-extra-module-accessibility
+
+LDFLAGS +=
+
+#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 \
+ e_mod_config.c \
+ e_mod_config.h \
+ e_accessibility_privates.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)
--- /dev/null
+
+#ifndef _E_ACCESSIBILITY_PRIVATE_H_
+#define _E_ACCESSIBILITY_PRIVATE_H_
+
+#include "e.h"
+
+#define E_ACCESSIBILITY_CFG_PATH "/opt/share/.e/e/config/samsung/"
+#define E_ACCESSIBILITY_CFG "module.accessibility-tizen"
+
+#define DEFAULT_SCREEN_WIDTH 480
+#define DEFAULT_SCREEN_HEIGHT 800
+
+typedef struct _E_Accessibility_Config E_Accessibility_Config;
+typedef struct _E_Accessibility_Config_Grab E_Accessibility_Config_Grab;
+
+/* external variable to store active config */
+extern E_Accessibility_Config *_e_accessibility_cfg;
+
+/**
+ * @brief structure for Accessibility configuration.
+ *
+ * @ingroup E_Accessibility_Config_Group
+ */
+struct _E_Accessibility_Config
+{
+ struct
+ {
+ double scale_factor;
+ /**< scale factor */
+ int scale_threshold;
+ /**< scale threshold */
+ double max_scale;
+ /**< maximun scale factor */
+ double min_scale;
+ /**< minimum scale factor */
+ double current_scale;
+ /**< current scale factor */
+
+ int width;
+ /**< width to be magnified */
+ int height;
+ /**< height to be magnified */
+ int offset_x;
+ /**< top left x coordinates of magnified area */
+ int offset_y;
+ /**< top left y coordinates of magnified area */
+ Eina_Bool isZoomUIEnabled;
+ /**< ZoomUI enable/disable status */
+ Eina_List *grabs;
+ /** < gesture event list to be grabbed */
+ } ZoomUI;
+
+ struct
+ {
+ Eina_Bool isHighContrastEnabled;
+ /**< HighContrast enable/disable status */
+ } HighContrast;
+};
+
+/**
+ * @brief structure for Accessibility Grab configuration.
+ *
+ * @ingroup E_Accessibility_Config_Group
+ */
+struct _E_Accessibility_Config_Grab
+{
+ const char *event_name;
+ /**< gesture event name what you want to grab */
+ int num_finger;
+ /**< integer specifying number of finger what you're interested in */
+ const char *desc;
+ /**< purpose of grabbing event */
+};
+
+#endif//_E_ACCESSIBILITY_PRIVATE_H_
+
--- /dev/null
+\r
+#include "e_accessibility_privates.h"\r
+#include "e_mod_config.h"\r
+\r
+/* local variables */\r
+static E_Config_DD *_acc_conf_edd = NULL;\r
+static E_Config_DD *_acc_conf_grab_edd = NULL;\r
+\r
+static void _e_mod_accessibility_config_free(void);\r
+static void _e_mod_accessibility_config_new(void);\r
+\r
+/* external variables */\r
+E_Accessibility_Config *_e_accessibility_cfg = NULL;\r
+\r
+int\r
+e_mod_accessibility_config_init(void)\r
+{\r
+ /* create config structure for zones */\r
+ _acc_conf_grab_edd = E_CONFIG_DD_NEW("Accessibility_Config_Grab", E_Accessibility_Config_Grab);\r
+\r
+#undef T\r
+#undef D\r
+#define T E_Accessibility_Config_Grab\r
+#define D _acc_conf_grab_edd\r
+ E_CONFIG_VAL(D, T, event_name, STR);\r
+ E_CONFIG_VAL(D, T, num_finger, INT);\r
+ E_CONFIG_VAL(D, T, desc, STR);\r
+\r
+ /* create config structure for module */\r
+ _acc_conf_edd = E_CONFIG_DD_NEW("Accessibility_Config", E_Accessibility_Config);\r
+\r
+#undef T\r
+#undef D\r
+#define T E_Accessibility_Config\r
+#define D _acc_conf_edd\r
+ E_CONFIG_VAL(D, T, ZoomUI.scale_factor, DOUBLE);\r
+ E_CONFIG_VAL(D, T, ZoomUI.scale_threshold, INT);\r
+ E_CONFIG_VAL(D, T, ZoomUI.max_scale, DOUBLE);\r
+ E_CONFIG_VAL(D, T, ZoomUI.min_scale, DOUBLE);\r
+ E_CONFIG_VAL(D, T, ZoomUI.current_scale, DOUBLE);\r
+ E_CONFIG_VAL(D, T, ZoomUI.width, INT);\r
+ E_CONFIG_VAL(D, T, ZoomUI.height, INT);\r
+ E_CONFIG_VAL(D, T, ZoomUI.offset_x, INT);\r
+ E_CONFIG_VAL(D, T, ZoomUI.offset_y, INT);\r
+ E_CONFIG_VAL(D, T, ZoomUI.isZoomUIEnabled, UCHAR);\r
+ E_CONFIG_LIST(D, T, ZoomUI.grabs, _acc_conf_grab_edd);\r
+ E_CONFIG_VAL(D, T, HighContrast.isHighContrastEnabled, UCHAR);\r
+\r
+ /* attempt to load existing configuration */\r
+ _e_accessibility_cfg = e_config_domain_load(E_ACCESSIBILITY_CFG, _acc_conf_edd);\r
+\r
+ /* create new config if we need to */\r
+ if (!_e_accessibility_cfg)\r
+ {\r
+ _e_mod_accessibility_config_new();\r
+ e_mod_accessibility_config_save();\r
+ fprintf(stderr, "[e_acc][config] Config file for e_accessibility was made/stored !\n");\r
+ }\r
+ else\r
+ {\r
+ fprintf(stderr, "[e_acc][config] Config file for e_accessibility was loaded successfully !\n");\r
+ }\r
+\r
+ return 1;\r
+}\r
+\r
+int\r
+e_mod_accessibility_config_shutdown(void)\r
+{\r
+ /* free config structure */\r
+ _e_mod_accessibility_config_free();\r
+\r
+ /* free data descriptors */\r
+ E_CONFIG_DD_FREE(_acc_conf_grab_edd);\r
+ E_CONFIG_DD_FREE(_acc_conf_edd);\r
+\r
+ return 1;\r
+}\r
+\r
+int\r
+e_mod_accessibility_config_save(void)\r
+{\r
+ return e_config_domain_save(E_ACCESSIBILITY_CFG, _acc_conf_edd, _e_accessibility_cfg);\r
+}\r
+\r
+/* local functions */\r
+static void\r
+_e_mod_accessibility_config_free(void)\r
+{\r
+ Eina_List *l;\r
+ E_Accessibility_Config_Grab *data;\r
+\r
+ /* check for config */\r
+ if (!_e_accessibility_cfg) return;\r
+\r
+ /* cleanup any stringshares */\r
+ EINA_LIST_FOREACH(_e_accessibility_cfg->ZoomUI.grabs, l, data)\r
+ {\r
+ if (data)\r
+ {\r
+ eina_stringshare_del(data->event_name);\r
+ eina_stringshare_del(data->desc);\r
+ }\r
+ }\r
+ /* free configured grabs */\r
+ eina_list_free(_e_accessibility_cfg->ZoomUI.grabs);\r
+\r
+ /* free config structure */\r
+ E_FREE(_e_accessibility_cfg);\r
+}\r
+\r
+static void\r
+_e_mod_accessibility_config_new(void)\r
+{\r
+ E_Accessibility_Config_Grab *cgz_2_tap;\r
+\r
+ int screenWidth = 0;\r
+ int screenHeight = 0;\r
+ ecore_x_screen_size_get(ecore_x_default_screen_get(),\r
+ &screenWidth, &screenHeight);\r
+\r
+ if( !screenWidth && !screenHeight )\r
+ {\r
+ screenWidth = DEFAULT_SCREEN_WIDTH;\r
+ screenHeight = DEFAULT_SCREEN_HEIGHT;\r
+ }\r
+\r
+ /* create initial config */\r
+ _e_accessibility_cfg = E_NEW(E_Accessibility_Config, 1);\r
+ _e_accessibility_cfg->ZoomUI.scale_factor = 0.25;\r
+ _e_accessibility_cfg->ZoomUI.scale_threshold = 3;\r
+ _e_accessibility_cfg->ZoomUI.max_scale = 7.0;\r
+ _e_accessibility_cfg->ZoomUI.min_scale = 1.2;\r
+ _e_accessibility_cfg->ZoomUI.current_scale = 2.0;\r
+ _e_accessibility_cfg->ZoomUI.width = (int)(screenWidth / _e_accessibility_cfg->ZoomUI.current_scale);\r
+ _e_accessibility_cfg->ZoomUI.height = (int)(screenHeight / _e_accessibility_cfg->ZoomUI.current_scale);\r
+ _e_accessibility_cfg->ZoomUI.offset_x = 0;\r
+ _e_accessibility_cfg->ZoomUI.offset_y = 0;\r
+ _e_accessibility_cfg->ZoomUI.isZoomUIEnabled = EINA_FALSE;\r
+ _e_accessibility_cfg->HighContrast.isHighContrastEnabled = EINA_FALSE;\r
+\r
+ /* create config for initial grab */\r
+ /* add grabs config to main config structure */\r
+ cgz_2_tap = E_NEW(E_Accessibility_Config_Grab, 1);\r
+\r
+ cgz_2_tap->num_finger = 2;\r
+ cgz_2_tap->event_name = eina_stringshare_add("tap");\r
+ cgz_2_tap->desc = eina_stringshare_add("2 finger tap event for zooming in/out");\r
+\r
+ _e_accessibility_cfg->ZoomUI.grabs = eina_list_append(_e_accessibility_cfg->ZoomUI.grabs, cgz_2_tap);\r
+}\r
+\r
--- /dev/null
+\r
+#ifndef _E_MOD_CONFIG_H_\r
+#define _E_MOD_CONFIG_H_\r
+\r
+/* local function prototypes */\r
+int e_mod_accessibility_config_init(void);\r
+int e_mod_accessibility_config_shutdown(void);\r
+int e_mod_accessibility_config_save(void);\r
+\r
+#endif//_E_MOD_CONFIG_H_\r
+\r
--- /dev/null
+
+#include "e_accessibility_privates.h"
+#include "e_mod_main.h"
+#include "e_mod_config.h"
+#include <string.h>
+
+char *strcasestr(const char *s, const char *find);
+Accessibility e_accessibility;
+
+/* 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,
+ "Accessibility Module of Window Manager"
+};
+
+EAPI void*
+e_modapi_init(E_Module* m)
+{
+ if( !_e_accessibility_init() )
+ {
+ printf("[e_accessibility][%s] Failed @ _e_accessibility_init()..!\n", __FUNCTION__);
+ return NULL;
+ }
+
+ e_accessibility.window_property_handler = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_PROPERTY, (Ecore_Event_Handler_Cb)_e_accessibility_cb_window_property, NULL);
+ if( !e_accessibility.window_property_handler ) printf("[e_accessibility][%s] Failed to add ECORE_X_EVENT_WINDOW_PROPERTY handler\n", __FUNCTION__);
+
+ if (e_accessibility.gesture_supported )
+ {
+ e_accessibility.gesture_tap_handler = ecore_event_handler_add(ECORE_X_EVENT_GESTURE_NOTIFY_TAP, (Ecore_Event_Handler_Cb)_e_accessibility_gesture_tap_handler, NULL);
+ e_accessibility.gesture_pan_handler = ecore_event_handler_add(ECORE_X_EVENT_GESTURE_NOTIFY_PAN, (Ecore_Event_Handler_Cb)_e_accessibility_gesture_pan_handler, NULL);
+ e_accessibility.gesture_pinchrotation_handler = ecore_event_handler_add(ECORE_X_EVENT_GESTURE_NOTIFY_PINCHROTATION, (Ecore_Event_Handler_Cb)_e_accessibility_gesture_pinchrotation_handler, NULL);
+
+ if( !e_accessibility.gesture_tap_handler ) printf("[e_accessibility][%s] Failed to add ECORE_X_EVENT_GESTURE_NOTIFY_TAP handler\n", __FUNCTION__);
+ if( !e_accessibility.gesture_pan_handler ) printf("[e_accessibility][%s] Failed to add ECORE_X_EVENT_GESTURE_NOTIFY_PAN handler\n", __FUNCTION__);
+ if( !e_accessibility.gesture_pinchrotation_handler ) printf("[e_accessibility][%s] Failed to add ECORE_X_EVENT_GESTURE_NOTIFY_PINCHROTATION handler\n", __FUNCTION__);
+ }
+
+ return m;
+}
+
+EAPI int
+e_modapi_shutdown(E_Module* m)
+{
+ ecore_event_handler_del(e_accessibility.window_property_handler);
+ e_accessibility.window_property_handler = NULL;
+
+ if (e_accessibility.gesture_supported )
+ {
+ if (e_accessibility.gesture_tap_handler) ecore_event_handler_del(e_accessibility.gesture_tap_handler);
+ if (e_accessibility.gesture_pan_handler) ecore_event_handler_del(e_accessibility.gesture_pan_handler);
+ if (e_accessibility.gesture_pinchrotation_handler) ecore_event_handler_del(e_accessibility.gesture_pinchrotation_handler);
+
+ e_accessibility.gesture_tap_handler = NULL;
+ e_accessibility.gesture_pan_handler = NULL;
+ e_accessibility.gesture_pinchrotation_handler = NULL;
+ }
+
+ _e_accessibility_fini();
+
+ return 1;
+}
+
+EAPI int
+e_modapi_save(E_Module* m)
+{
+ /* Do Something */
+ return e_mod_accessibility_config_save();
+}
+
+static int _e_accessibility_init(void)
+{
+ int res, ret = 1;
+
+ memset(&e_accessibility, 0, sizeof(Accessibility));
+
+ e_accessibility.disp = ecore_x_display_get();
+
+ if( !e_accessibility.disp )
+ {
+ fprintf(stderr, "\e[32m[e_accessibility] Failed to open display..!\e[0m\n");
+ ret = 0;
+ goto out;
+ }
+
+ e_accessibility.rootWin = ecore_x_window_root_first_get();
+
+ e_accessibility.accGrabWin = ecore_x_window_new(e_accessibility.rootWin, -1, -1, 1, 1);
+
+ if( !e_accessibility.accGrabWin )
+ {
+ fprintf(stderr, "[e_accessibility] Failed to create a new window for grabbing gesture event(s) !\n");
+ ret = 0;
+ goto out;
+ }
+
+ e_accessibility.atomZoomUI = ecore_x_atom_get(E_PROP_ACCESSIBILITY_ZOOM_UI);
+ e_accessibility.atomHighContrast = ecore_x_atom_get(E_PROP_ACCESSIBILITY_HIGH_CONTRAST);
+ e_accessibility.atomRROutput = ecore_x_atom_get(E_PROP_XRROUTPUT);
+ e_accessibility.atomInputTransform = ecore_x_atom_get(EVDEVMULTITOUCH_PROP_TRANSFORM);
+ e_accessibility.atomFloat = ecore_x_atom_get(XATOM_FLOAT);
+
+ e_accessibility.zone = _e_accessibility_get_zone();
+ if( !e_accessibility.zone )
+ {
+ fprintf(stderr, "[e_accessibility] Failed to get zone !\n");
+ ret = 0;
+ goto out;
+ }
+
+ ecore_x_screen_size_get(ecore_x_default_screen_get(),
+ &e_accessibility.ZoomUI.screenWidth,
+ &e_accessibility.ZoomUI.screenHeight);
+
+ if( !e_accessibility.ZoomUI.screenWidth && !e_accessibility.ZoomUI.screenHeight )
+ {
+ e_accessibility.ZoomUI.screenWidth = DEFAULT_SCREEN_WIDTH;
+ e_accessibility.ZoomUI.screenHeight = DEFAULT_SCREEN_HEIGHT;
+ }
+
+ e_accessibility.gesture_supported = ecore_x_gesture_supported();
+ if (!e_accessibility.gesture_supported)
+ {
+ fprintf(stderr, "[e_accessibility] X Gesture Extension is not supported !\n");
+ }
+
+ res = _e_accessibility_xinput_init();
+ if( !res )
+ {
+ fprintf(stderr, "[e_accessibility] Failed to initialize XInput Extension !\n");
+ ret =0;
+ goto out;
+ }
+
+ _e_accessibility_init_input();
+ _e_accessibility_init_output();
+
+ res = _e_accessibility_get_configuration();
+
+ if( !res )
+ {
+ fprintf(stderr, "[e_accessibility] Failed to get configureation from %s.cfg file!\n", E_ACCESSIBILITY_CFG);
+ ret =0;
+ goto out;
+ }
+
+out:
+ return ret;
+}
+
+static void _e_accessibility_fini(void)
+{
+ /* shutdown the config subsystem */
+ e_mod_accessibility_config_shutdown();
+}
+
+static int _e_accessibility_xinput_init(void)
+{
+ int event, error;
+ int major = 2, minor = 0;
+
+ if( !XQueryExtension(e_accessibility.disp, "XInputExtension", &e_accessibility.xi2_opcode, &event, &error) )
+ {
+ printf("[e_accessibility][%s] XInput Extension isn't supported.\n", __FUNCTION__);
+ goto fail;
+ }
+
+ if( XIQueryVersion(e_accessibility.disp, &major, &minor) == BadRequest )
+ {
+ printf("[e_accessibility][%s] Failed to query XI version.\n", __FUNCTION__);
+ goto fail;
+ }
+
+ return 1;
+
+fail:
+ e_accessibility.xi2_opcode = -1;
+ return 0;
+}
+
+static int
+_e_accessibility_gesture_tap_handler(void *data, int ev_type, void *ev)
+{
+ Ecore_X_Event_Gesture_Notify_Tap *e = ev;
+
+#ifdef __DEBUG__
+ fprintf(stderr, "\n[e_accessibility][GE] %d Finger %s Event !\n", e->num_fingers, (e->tap_repeat==2) ? "Double Tap" : "Tap");
+ fprintf(stderr, "subevent = %d\n", e->subtype);
+ fprintf(stderr, "num of finger=%d\n", e->num_fingers);
+ fprintf(stderr, "tap repeat=%d\n", e->tap_repeat);
+ fprintf(stderr, "window=0x%x\n", e->win);
+ fprintf(stderr, "cx:%d, cy:%d\n", e->cx, e->cy);
+ fprintf(stderr, "time=%d, interval=%d\n", e->time, e->interval);
+#endif
+
+ //Use only double-tap event(s)
+ if( e->tap_repeat != 2 )
+ return 1;
+
+ if( e_accessibility.isZoomUIEnabled && e->num_fingers == 2 )//toggle zoom in/out
+ {
+ if( e_accessibility.ZoomUI.status == ZOOM_OUT )
+ {
+ e_accessibility.ZoomUI.status = ZOOM_IN;
+ fprintf(stderr, "[e_accessibility][tap] current_scale=%.3f\n", e_accessibility.ZoomUI.current_scale);
+ if (!_e_accessiblity_gesture_grab_by_event_name("pinchrotation", 2, EINA_TRUE))
+ {
+ fprintf(stderr, "[e_acc][gesture_tap_handler][Grab] Failed to grab gesture for ZoomUI ! (name=pinchrotation, num_finger=2)\n");
+ }
+ if (!_e_accessiblity_gesture_grab_by_event_name("pan", 2, EINA_TRUE))
+ {
+ fprintf(stderr, "[e_acc][gesture_tap_handler][Grab] Failed to grab gesture for ZoomUI ! (name=pan, num_finger=2)\n");
+ }
+ }
+ else
+ {
+ e_accessibility.ZoomUI.status = ZOOM_OUT;
+ fprintf(stderr, "[e_accessibility][tap] current_scale=1.0f\n");
+ if (!_e_accessiblity_gesture_grab_by_event_name("pinchrotation", 2, EINA_FALSE))
+ {
+ fprintf(stderr, "[e_acc][gesture_tap_handler][Ungrab] Failed to ungrab gesture for ZoomUI ! (name=pinchrotation, num_finger=2)\n");
+ }
+ if (!_e_accessiblity_gesture_grab_by_event_name("pan", 2, EINA_FALSE))
+ {
+ fprintf(stderr, "[e_acc][gesture_tap_handler][Ungrab] Failed to ungrab gesture for ZoomUI ! (name=pan, num_finger=2)\n");
+ }
+ }
+
+ _e_accessibility_ZoomUI_update();
+ _e_accessibility_update_input_transform_matrix();
+ }
+
+ return 1;
+}
+
+static int
+_e_accessibility_gesture_pan_handler(void *data, int ev_type, void *ev)
+{
+ Ecore_X_Event_Gesture_Notify_Pan *e = ev;
+
+ int width, height;
+ int offset_x, offset_y;
+ static int retry_count = 0;
+
+#ifdef __DEBUG__
+ fprintf(stderr, "\n[e_accessibility][GE] %d Finger Pan Event !\n", e->num_fingers);
+ fprintf(stderr, "subevent = %d\n", e->subtype);
+ fprintf(stderr, "num of finger=%d\n", e->num_fingers);
+ fprintf(stderr, "window=0x%x\n", e->win);
+ fprintf(stderr, "direction=%d\n", e->direction);
+ fprintf(stderr, "distance=%d\n", e->distance);
+ fprintf(stderr, "duration=%d\n", e->duration);
+ fprintf(stderr, "dx:%d, dy:%d\n", e->dx, e->dy);
+ fprintf(stderr, "time=%d\n", e->time);
+#endif
+
+ //Use only two finger pan event(s)
+ //Use only when ZoomUI.status is ZOOM_IN
+ if ((e->num_fingers != 2) || (e_accessibility.ZoomUI.status == ZOOM_OUT))
+ return 1;
+
+ switch (e->subtype)
+ {
+ case ECORE_X_GESTURE_BEGIN:
+ break;
+
+ case ECORE_X_GESTURE_UPDATE:
+ if (e_accessibility.ZoomUI.status == ZOOM_SCALE_ADJUST) return 1;
+
+ retry_count++;
+ if ((e_accessibility.ZoomUI.status != ZOOM_PAN) && (retry_count >= 10)) e_accessibility.ZoomUI.status = ZOOM_PAN;
+
+ offset_x = e_accessibility.ZoomUI.offset_x -e->dx;
+ offset_y = e_accessibility.ZoomUI.offset_y -e->dy;
+
+ if (offset_x < 0) offset_x = 0;
+ if (offset_y < 0) offset_y = 0;
+
+ if ((offset_x + e_accessibility.ZoomUI.width) >= e_accessibility.ZoomUI.screenWidth)
+ offset_x = e_accessibility.ZoomUI.screenWidth - e_accessibility.ZoomUI.width;
+ if ((offset_y + e_accessibility.ZoomUI.height) >= e_accessibility.ZoomUI.screenHeight)
+ offset_y = e_accessibility.ZoomUI.screenHeight - e_accessibility.ZoomUI.height;
+
+ if (e_accessibility.ZoomUI.offset_x != offset_x || e_accessibility.ZoomUI.offset_y != offset_y)
+ {
+ e_accessibility.ZoomUI.offset_x = offset_x;
+ e_accessibility.ZoomUI.offset_y = offset_y;
+ }
+ else
+ {
+ return 1;
+ }
+
+ _e_accessibility_ZoomUI_update();
+ break;
+
+ case ECORE_X_GESTURE_END:
+ e_accessibility.tmatrix[0] = (float)e_accessibility.ZoomUI.current_scale;
+ e_accessibility.tmatrix[4] = (float)e_accessibility.ZoomUI.current_scale;
+ e_accessibility.tmatrix[2] = (float)e_accessibility.ZoomUI.offset_x * e_accessibility.tmatrix[0] * (-1);
+ e_accessibility.tmatrix[5] = (float)e_accessibility.ZoomUI.offset_y * e_accessibility.tmatrix[4] * (-1);
+ _e_accessibility_update_input_transform_matrix();
+
+ e_accessibility.ZoomUI.status = ZOOM_IN;
+ retry_count = 0;
+
+ //update current information to configuration file
+ //if if makes overhead, comment on the following function
+ _e_accessibility_update_configuration();
+ break;
+
+ case ECORE_X_GESTURE_DONE:
+ break;
+ }
+
+ return 1;
+}
+
+static int
+_e_accessibility_gesture_pinchrotation_handler(void *data, int ev_type, void *ev)
+{
+ Ecore_X_Event_Gesture_Notify_PinchRotation *e = ev;
+
+ int width, height;
+ int offset_x, offset_y;
+ int diff_cx, diff_cy;
+
+ static int base_dist;
+ static int base_cx;
+ static int base_cy;
+ static int retry_count = 0;
+ static int diff_dist = 0;
+ static int acc_evcount = 0;
+ static int sign_toggle_count = 0;
+ static int prev_diff_dist = 0;
+ double diff_scale;
+
+#ifdef __DEBUG__
+ fprintf(stderr, "\n[e_accessibility][GE] %d Finger pinchrotation Event !\n", e->num_fingers);
+ fprintf(stderr, "subevent = %d\n", e->subtype);
+ fprintf(stderr, "num of finger=%d\n", e->num_fingers);
+ fprintf(stderr, "window=0x%x\n", e->win);
+ fprintf(stderr, "zoom=%.3f\n", e->zoom);
+ fprintf(stderr, "distance=%d\n", e->distance);
+ fprintf(stderr, "angle=%.3f\n", e->angle);
+ fprintf(stderr, "cx:%d, cy:%d\n", e->cx, e->cy);
+ fprintf(stderr, "time=%d\n", e->time);
+#endif
+
+ if ((e->num_fingers != 2) || (e_accessibility.ZoomUI.status == ZOOM_OUT))
+ return 1;
+
+ switch (e->subtype)
+ {
+ case ECORE_X_GESTURE_BEGIN:
+ base_dist = e->distance;
+ base_cx = e->cx;
+ base_cy = e->cy;
+ break;
+
+ case ECORE_X_GESTURE_UPDATE:
+ if (e_accessibility.ZoomUI.status == ZOOM_PAN) return 1;
+
+ prev_diff_dist = diff_dist;
+ diff_dist = e->distance - base_dist;
+ diff_cx = ABS(base_cx - e->cx);
+ diff_cy = ABS(base_cy - e->cy);
+ base_cx = e->cx;
+ base_cy = e->cy;
+ acc_evcount++;
+
+ if ((e_accessibility.ZoomUI.status == ZOOM_IN) && (retry_count++ < 10))
+ {
+ if (ABS(diff_dist) >= 7) e_accessibility.ZoomUI.status = ZOOM_SCALE_ADJUST;
+ else if ((diff_cx+diff_cy) >= 10) e_accessibility.ZoomUI.status = ZOOM_PAN;
+ return 1;
+ }
+
+ if (((diff_cx+diff_cy) >= 15)) return 1;
+ if (ABS(diff_dist) < 5) return 1;
+ if ((prev_diff_dist * diff_dist) < 0) sign_toggle_count++;
+ if ((acc_evcount < 30) && (acc_evcount >= 10) && (sign_toggle_count >=3))
+ {
+ e_accessibility.ZoomUI.status = ZOOM_PAN;
+ return 1;
+ }
+
+ diff_scale = e_accessibility.ZoomUI.scale_factor * (ABS(diff_dist)%e_accessibility.ZoomUI.scale_threshold);
+ diff_scale = (double)diff_scale*0.5;
+
+ base_dist = e->distance;
+
+ if( diff_dist > 0 )//scale up//enlarge zoom area
+ {
+ e_accessibility.ZoomUI.current_scale += diff_scale;
+ }
+ else//scale down//shrink zoom area
+ {
+ e_accessibility.ZoomUI.current_scale -= diff_scale;
+ }
+
+ if (e_accessibility.ZoomUI.current_scale < e_accessibility.ZoomUI.min_scale)
+ e_accessibility.ZoomUI.current_scale = e_accessibility.ZoomUI.min_scale;
+ if (e_accessibility.ZoomUI.current_scale > e_accessibility.ZoomUI.max_scale)
+ e_accessibility.ZoomUI.current_scale = e_accessibility.ZoomUI.max_scale;
+
+ width = (int)(e_accessibility.ZoomUI.screenWidth / e_accessibility.ZoomUI.current_scale);
+ height = (int)(e_accessibility.ZoomUI.screenHeight / e_accessibility.ZoomUI.current_scale);
+
+ offset_x = e_accessibility.ZoomUI.offset_x + ((e_accessibility.ZoomUI.width - width)/2);// - e->cx;
+ offset_y = e_accessibility.ZoomUI.offset_y + ((e_accessibility.ZoomUI.height - height)/2);// - e->cy;
+
+ if (offset_x < 0) offset_x = 0;
+ if (offset_y < 0) offset_y = 0;
+
+ if ((offset_x + width) >= e_accessibility.ZoomUI.screenWidth)
+ offset_x = e_accessibility.ZoomUI.screenWidth - width;
+ if ((offset_y + height) >= e_accessibility.ZoomUI.screenHeight)
+ offset_y = e_accessibility.ZoomUI.screenHeight - height;
+
+ if (e_accessibility.ZoomUI.offset_x != offset_x || e_accessibility.ZoomUI.offset_y != offset_y ||
+ e_accessibility.ZoomUI.width != width || e_accessibility.ZoomUI.height != height)
+ {
+ e_accessibility.ZoomUI.offset_x = offset_x;
+ e_accessibility.ZoomUI.offset_y = offset_y;
+ e_accessibility.ZoomUI.width = width;
+ e_accessibility.ZoomUI.height = height;
+ }
+ else
+ {
+ return 1;
+ }
+
+ _e_accessibility_ZoomUI_update();
+ break;
+
+ case ECORE_X_GESTURE_END:
+ _e_accessibility_update_input_transform_matrix();
+
+ e_accessibility.ZoomUI.status = ZOOM_IN;
+ retry_count = sign_toggle_count = acc_evcount = diff_dist =0;
+
+ //update current information to configuration file
+ //if if makes overhead, comment on the following function
+ _e_accessibility_update_configuration();
+ break;
+
+ case ECORE_X_GESTURE_DONE:
+ break;
+ }
+
+ return 1;
+}
+
+static int
+_e_accessibility_cb_window_property(void *data, int ev_type, void *ev)
+{
+ Ecore_X_Event_Window_Property *e = ev;
+
+ int res = -1;
+ unsigned int ret_val = 0;
+
+ if( !e || e->win != e_accessibility.rootWin )
+ {
+ return 1;
+ }
+
+ //check and enable/disable accessibility feature(s)
+ if( e->atom == e_accessibility.atomZoomUI ) //Zoom UI
+ {
+ res = ecore_x_window_prop_card32_get(e->win, e_accessibility.atomZoomUI, &ret_val, 1);
+
+ if( res != 1 )
+ goto out;
+
+ if( ret_val != e_accessibility.isZoomUIEnabled )
+ {
+ e_accessibility.isZoomUIEnabled = ret_val;
+ if( e_accessibility.isZoomUIEnabled )//enable
+ {
+ _e_accessibility_enable_feature(E_ACCESSIBILITY_ZOOM_UI);
+ }
+ else//disable
+ {
+ _e_accessibility_disable_feature(E_ACCESSIBILITY_ZOOM_UI);
+ }
+ }
+ }
+ else if( e->atom == e_accessibility.atomHighContrast )//High Contrast
+ {
+ res = ecore_x_window_prop_card32_get(e->win, e_accessibility.atomHighContrast, &ret_val, 1);
+
+ if( res != 1 )
+ goto out;
+
+ if( ret_val != e_accessibility.isHighContrastEnabled )
+ {
+ e_accessibility.isHighContrastEnabled = ret_val;
+ if( e_accessibility.isHighContrastEnabled )//enable
+ {
+ _e_accessibility_enable_feature(E_ACCESSIBILITY_HIGH_CONTRAST);
+ }
+ else//disable
+ {
+ _e_accessibility_disable_feature(E_ACCESSIBILITY_HIGH_CONTRAST);
+ }
+ }
+ }
+
+out:
+ return 1;
+}
+
+static void
+_e_accessibility_enable_feature(AccessibilityFeatureType featureType)
+{
+ switch( featureType )
+ {
+ case E_ACCESSIBILITY_ZOOM_UI:
+ _e_accessibility_update_configuration();
+ _e_accessibility_feature_grab_gestures(E_ACCESSIBILITY_ZOOM_UI, EINA_TRUE);
+ break;
+
+ case E_ACCESSIBILITY_HIGH_CONTRAST:
+ _e_accessibility_HighContrast_update(1);
+ _e_accessibility_update_configuration();
+ break;
+
+ default:
+ fprintf(stderr, "[e_accessibility][%s] Unknown feature type (=%d)\n", __FUNCTION__, (int)featureType);
+ }
+}
+
+static void
+_e_accessibility_disable_feature(AccessibilityFeatureType featureType)
+{
+ switch( featureType )
+ {
+ case E_ACCESSIBILITY_ZOOM_UI:
+ e_accessibility.isZoomUIEnabled = 0;
+ if( e_accessibility.ZoomUI.status == ZOOM_IN )
+ {
+ e_accessibility.ZoomUI.status = ZOOM_OUT;
+ _e_accessibility_ZoomUI_update();
+ _e_accessibility_update_input_transform_matrix();
+ }
+ _e_accessibility_update_configuration();
+ _e_accessibility_feature_grab_gestures(E_ACCESSIBILITY_ZOOM_UI, EINA_FALSE);
+ break;
+
+ case E_ACCESSIBILITY_HIGH_CONTRAST:
+ _e_accessibility_HighContrast_update(0);
+ _e_accessibility_update_configuration();
+ break;
+
+ default:
+ fprintf(stderr, "[e_accessibility][%s] Unknown feature type (=%d)\n", __FUNCTION__, (int)featureType);
+ }
+}
+
+static void
+_e_accessibility_ZoomUI_update(void)
+{
+ if( e_accessibility.ZoomUI.status == ZOOM_IN )
+ {
+ _e_accessibility_zoom_in();
+ }
+ else if( e_accessibility.ZoomUI.status == ZOOM_OUT )
+ {
+ _e_accessibility_zoom_out();
+ }
+ else
+ {
+ _e_accessibility_zoom_in();
+ }
+}
+
+static void
+_e_accessibility_HighContrast_update(Eina_Bool enable)
+{
+ if( enable )
+ {
+ char* cmds[] = {"e_accessibility", "accessibility", "-n", "1", NULL };
+ e_accessibility.rroutput_buf_len = _e_accessibility_marshalize_string (e_accessibility.rroutput_buf, 4, cmds);
+
+ XRRChangeOutputProperty(e_accessibility.disp, e_accessibility.output, e_accessibility.atomRROutput, XA_CARDINAL, 8, PropModeReplace, (unsigned char *)e_accessibility.rroutput_buf, e_accessibility.rroutput_buf_len);
+ XSync(e_accessibility.disp, False);
+
+ fprintf(stderr, "[e_accessibility] High Contrast On !\n");
+ }
+ else
+ {
+ char* cmds[] = {"e_accessibility", "accessibility", "-n", "0", NULL };
+ e_accessibility.rroutput_buf_len = _e_accessibility_marshalize_string (e_accessibility.rroutput_buf, 4, cmds);
+
+ XRRChangeOutputProperty(e_accessibility.disp, e_accessibility.output, e_accessibility.atomRROutput, XA_CARDINAL, 8, PropModeReplace, (unsigned char *)e_accessibility.rroutput_buf, e_accessibility.rroutput_buf_len);
+ XSync(e_accessibility.disp, False);
+
+ fprintf(stderr, "[e_accessibility] High Contrast Off !\n");
+ }
+}
+
+static int
+_e_accessibility_get_configuration(void)
+{
+ if( !e_mod_accessibility_config_init() )
+ {
+ fprintf(stderr, "[e_acc][get_configuration] Failed @ e_mod_accessibility_config_init()..!\n");
+ return 0;
+ }
+
+ e_accessibility.ZoomUI.scale_factor = _e_accessibility_cfg->ZoomUI.scale_factor;
+ e_accessibility.ZoomUI.scale_threshold = _e_accessibility_cfg->ZoomUI.scale_threshold;
+ e_accessibility.ZoomUI.max_scale = _e_accessibility_cfg->ZoomUI.max_scale;
+ e_accessibility.ZoomUI.min_scale = _e_accessibility_cfg->ZoomUI.min_scale;
+ e_accessibility.ZoomUI.current_scale = _e_accessibility_cfg->ZoomUI.current_scale;
+
+ e_accessibility.ZoomUI.width = _e_accessibility_cfg->ZoomUI.width;
+ e_accessibility.ZoomUI.height = _e_accessibility_cfg->ZoomUI.height;
+ e_accessibility.ZoomUI.offset_x = _e_accessibility_cfg->ZoomUI.offset_x;
+ e_accessibility.ZoomUI.offset_y = _e_accessibility_cfg->ZoomUI.offset_y;
+
+ memset(e_accessibility.tmatrix, 0, sizeof(e_accessibility.tmatrix));
+ e_accessibility.tmatrix[8] = 1.0f;
+ e_accessibility.tmatrix[0] = (float)e_accessibility.ZoomUI.current_scale;
+ e_accessibility.tmatrix[4] = (float)e_accessibility.ZoomUI.current_scale;
+ e_accessibility.tmatrix[2] = (float)e_accessibility.ZoomUI.offset_x * e_accessibility.tmatrix[0] * (-1);
+ e_accessibility.tmatrix[5] = (float)e_accessibility.ZoomUI.offset_y * e_accessibility.tmatrix[4] * (-1);
+
+ e_accessibility.isZoomUIEnabled = _e_accessibility_cfg->ZoomUI.isZoomUIEnabled;
+ e_accessibility.isHighContrastEnabled = _e_accessibility_cfg->HighContrast.isHighContrastEnabled;
+
+ if( e_accessibility.atomZoomUI )
+ {
+ ecore_x_window_prop_card32_set(e_accessibility.rootWin, e_accessibility.atomZoomUI, (unsigned int *)&e_accessibility.isZoomUIEnabled, 1);
+ if( e_accessibility.isZoomUIEnabled)
+ {
+ _e_accessibility_feature_grab_gestures(E_ACCESSIBILITY_ZOOM_UI, EINA_TRUE);
+ }
+ }
+
+ if( e_accessibility.atomHighContrast )
+ {
+ ecore_x_window_prop_card32_set(e_accessibility.rootWin, e_accessibility.atomHighContrast, (unsigned int *)&e_accessibility.isHighContrastEnabled, 1);
+ if( e_accessibility.isHighContrastEnabled )
+ {
+ _e_accessibility_enable_feature(E_ACCESSIBILITY_HIGH_CONTRAST);
+ }
+ }
+
+ return 1;
+}
+
+static int
+_e_accessibility_update_configuration(void)
+{
+ _e_accessibility_cfg->ZoomUI.scale_factor = e_accessibility.ZoomUI.scale_factor;
+ _e_accessibility_cfg->ZoomUI.scale_threshold = e_accessibility.ZoomUI.scale_threshold;
+ _e_accessibility_cfg->ZoomUI.max_scale = e_accessibility.ZoomUI.max_scale;
+ _e_accessibility_cfg->ZoomUI.min_scale = e_accessibility.ZoomUI.min_scale;
+ _e_accessibility_cfg->ZoomUI.current_scale = e_accessibility.ZoomUI.current_scale;
+
+ _e_accessibility_cfg->ZoomUI.width = e_accessibility.ZoomUI.width;
+ _e_accessibility_cfg->ZoomUI.height = e_accessibility.ZoomUI.height;
+ _e_accessibility_cfg->ZoomUI.offset_x = e_accessibility.ZoomUI.offset_x;
+ _e_accessibility_cfg->ZoomUI.offset_y = e_accessibility.ZoomUI.offset_y;
+
+ _e_accessibility_cfg->ZoomUI.isZoomUIEnabled = e_accessibility.isZoomUIEnabled;
+ _e_accessibility_cfg->HighContrast.isHighContrastEnabled = e_accessibility.isHighContrastEnabled;
+
+ e_mod_accessibility_config_save();
+
+ return 1;
+}
+
+static void _e_accessibility_feature_grab_gestures(AccessibilityFeatureType featureType, Eina_Bool isGrab)
+{
+ Eina_List *l;
+ E_Accessibility_Config_Grab *cgz;
+
+ switch( featureType )
+ {
+ case E_ACCESSIBILITY_ZOOM_UI:
+ EINA_LIST_FOREACH(_e_accessibility_cfg->ZoomUI.grabs, l, cgz)
+ {
+ if (cgz)
+ {
+ if (!_e_accessiblity_gesture_grab_by_event_name(cgz->event_name, cgz->num_finger, isGrab))
+ {
+ fprintf(stderr, "[e_acc][feature_grab_gestures][%s] Failed to grab gesture for ZoomUI ! (name=%s, num_finger=%d)\n",
+ (isGrab ? "Grab" : "Ungrab"), cgz->event_name, cgz->num_finger);
+ }
+ }
+ }
+ break;
+
+ default:
+ fprintf(stderr, "[e_accessibility][%s] Unknown feature type (=%d)\n", __FUNCTION__, (int)featureType);
+ }
+}
+
+static Eina_Bool _e_accessiblity_gesture_grab_by_event_name(const char *event_name, const int num_finger, Eina_Bool isGrab)
+{
+ Ecore_X_Gesture_Event_Type eventType;
+
+ if( strcasestr(event_name, "pan") )
+ {
+ eventType = ECORE_X_GESTURE_EVENT_PAN;
+ fprintf(stderr, "[e_accessibility][%s] %d Pan gesture will be (un)grabbed !\n", __FUNCTION__, num_finger);
+ }
+ else if( strcasestr(event_name, "pinchrotation") )
+ {
+ eventType = ECORE_X_GESTURE_EVENT_PINCHROTATION;
+ fprintf(stderr, "[e_accessibility][%s] %d PinchRotation gesture will be (un)grabbed !\n", __FUNCTION__, num_finger);
+ }
+ else if( strcasestr(event_name, "tap") )
+ {
+ eventType = ECORE_X_GESTURE_EVENT_TAP;
+ fprintf(stderr, "[e_accessibility][%s] %d Tap gesture will be (un)grabbed !\n", __FUNCTION__, num_finger);
+ }
+ else
+ {
+ fprintf(stderr, "[e_acc][gesture_grab_by_event_name] Unknown event name(=%s)\n", event_name);
+ return EINA_FALSE;
+ }
+
+ return _e_accessiblity_gesture_grab(eventType, num_finger, isGrab);
+}
+
+static Eina_Bool _e_accessiblity_gesture_grab(Ecore_X_Gesture_Event_Type eventType, int num_finger, Eina_Bool isGrab)
+{
+ Eina_Bool status = EINA_FALSE;
+
+ if (isGrab)
+ {
+ status = ecore_x_gesture_event_grab(e_accessibility.accGrabWin, eventType, num_finger);
+
+ if (!status)
+ {
+ fprintf(stderr, "[e_accessibility][gesture_grab] Failed to grab gesture event ! (eventType=%d, num_finger=%d)\n", eventType, num_finger);
+ }
+ }
+ else
+ {
+ status = ecore_x_gesture_event_ungrab(e_accessibility.accGrabWin, eventType, num_finger);
+
+ if (!status)
+ {
+ fprintf(stderr, "[e_accessibility][gesture_grab] Failed to ungrab gesture event ! (eventType=%d, num_finger=%d)\n", eventType, num_finger);
+ }
+ }
+
+ return status;
+}
+
+static E_Zone* _e_accessibility_get_zone(void)
+{
+ Eina_List *ml;
+ E_Manager *man;
+ E_Zone* zone = NULL;
+
+ if (e_accessibility.zone)
+ return e_accessibility.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;
+}
+
+static void _e_accessibility_zoom_in(void)
+{
+ char info[64];
+
+ sprintf(info, "%dx%d+%d+%d", e_accessibility.ZoomUI.width, e_accessibility.ZoomUI.height,
+ e_accessibility.ZoomUI.offset_x, e_accessibility.ZoomUI.offset_y);
+
+ char* cmds[] = {"e_accessibility", "accessibility", "-scale", "1", info, NULL };
+ e_accessibility.rroutput_buf_len = _e_accessibility_marshalize_string (e_accessibility.rroutput_buf, 5, cmds);
+
+ XRRChangeOutputProperty(e_accessibility.disp, e_accessibility.output, e_accessibility.atomRROutput, XA_CARDINAL, 8, PropModeReplace, (unsigned char *)e_accessibility.rroutput_buf, e_accessibility.rroutput_buf_len);
+ XSync(e_accessibility.disp, False);
+}
+
+static void _e_accessibility_zoom_out()
+{
+ char* cmds[] = {"e_accessibility", "accessibility", "-scale", "0", NULL };
+ e_accessibility.rroutput_buf_len = _e_accessibility_marshalize_string (e_accessibility.rroutput_buf, 4, cmds);
+
+ XRRChangeOutputProperty(e_accessibility.disp, e_accessibility.output, e_accessibility.atomRROutput, XA_CARDINAL, 8, PropModeReplace, (unsigned char *)e_accessibility.rroutput_buf, e_accessibility.rroutput_buf_len);
+ XSync(e_accessibility.disp, False);
+}
+
+static int _e_accessibility_marshalize_string (char* buf, int num, char* srcs[])
+{
+ int i;
+ char * p = buf;
+
+ for (i=0; i<num; i++)
+ {
+ p += sprintf (p, srcs[i]);
+ *p = '\0';
+ p++;
+ }
+
+ *p = '\0';
+ p++;
+
+ return (p - buf);
+}
+
+static void _e_accessibility_init_output(void)
+{
+ int i;
+
+ XRRScreenResources* res = XRRGetScreenResources (e_accessibility.disp, e_accessibility.rootWin);
+ e_accessibility.output = 0;
+
+ XRROutputInfo *output_info = NULL;
+
+ if( res && (res->noutput != 0) )
+ {
+
+ for( i = 0; i < res->noutput; i++ )
+ {
+ output_info = XRRGetOutputInfo(e_accessibility.disp, res, res->outputs[i]);
+
+ if ((output_info) && !(strcmp(output_info->name, "LVDS1")))
+ {
+ e_accessibility.output = res->outputs[i];
+
+ if ( output_info )
+ XRRFreeOutputInfo(output_info);
+ break;
+ }
+
+ if ( output_info )
+ XRRFreeOutputInfo(output_info);
+ }
+ }
+
+ if( !e_accessibility.output )
+ {
+ fprintf(stderr, "[e_accessibility][_e_accessibility_init_output] Failed to init output !\n");
+ }
+}
+
+static void _e_accessibility_init_input(void)
+{
+ int i, idx = 0;
+ int ndevices;
+ XIDeviceInfo *dev, *info = NULL;
+
+ if( e_accessibility.xi2_opcode < 0 )
+ {
+ fprintf(stderr, "[e_accessibility][%s] Failed to initialize input !\n", __FUNCTION__);
+ return;
+ }
+
+ info = XIQueryDevice(e_accessibility.disp, XIAllDevices, &ndevices);
+
+ if( !info )
+ {
+ fprintf(stderr, "[e_accessibility][%s] There is no queried XI device.\n", __FUNCTION__);
+ return;
+ }
+
+ for( i = 0; i < ndevices ; i++ )
+ {
+ dev = &info[i];
+
+ if( XISlavePointer == dev->use || XIFloatingSlave == dev->use )
+ {
+ //skip XTEST Pointer
+ if( strcasestr(dev->name, "XTEST" ) || !strcasestr(dev->name, "touch") )
+ continue;
+
+ e_accessibility.touch_deviceid[idx] = dev->deviceid;
+ idx++;
+ }
+ }
+
+ XIFreeDeviceInfo(info);
+
+}
+
+static void _e_accessibility_update_input_transform_matrix(void)
+{
+ int i;
+ static float identity_matrix[] = { 1.0f, 0, 0, 0, 1.0f, 0, 0, 0, 1.0f };
+
+ if( e_accessibility.ZoomUI.status == ZOOM_OUT )
+ {
+ XIChangeProperty(e_accessibility.disp, e_accessibility.touch_deviceid[0], e_accessibility.atomInputTransform,
+ e_accessibility.atomFloat, 32, PropModeReplace, (unsigned char*)&identity_matrix, 9);
+ }
+ else
+ {
+ for( i = 0 ; i < 3 ; i++ )
+ {
+ XIChangeProperty(e_accessibility.disp, e_accessibility.touch_deviceid[i], e_accessibility.atomInputTransform,
+ e_accessibility.atomFloat, 32, PropModeReplace, (unsigned char*)&e_accessibility.tmatrix[0], 9);
+ }
+ }
+}
+
--- /dev/null
+#ifndef __E_MOD_MAIN_H__
+#define __E_MOD_MAIN_H__
+
+#include <X11/Xlib.h>
+#include <X11/Xatom.h>
+#include <X11/extensions/XInput2.h>
+#include <X11/extensions/XI2.h>
+#include <X11/extensions/XIproto.h>
+#include <X11/extensions/Xrandr.h>
+
+#define MAX_MT_DEVICES 3
+#define EVDEVMULTITOUCH_PROP_TRANSFORM "EvdevMultitouch Transform Matrix"
+#ifndef XATOM_FLOAT
+#define XATOM_FLOAT "FLOAT"
+#endif
+#ifndef ABS
+#define ABS(x) (((x) < 0) ? -(x) : (x))
+#endif
+
+#define E_PROP_ACCESSIBILITY_ZOOM_UI "_E_ACC_ENABLE_ZOOM_UI_"
+#define E_PROP_ACCESSIBILITY_HIGH_CONTRAST "_E_ACC_ENABLE_HIGH_CONTRAST_"
+#define E_PROP_XRROUTPUT "X_RR_PROPERTY_REMOTE_CONTROLLER"
+
+typedef int XFixed;
+typedef double XDouble;
+#define XDoubleToFixed(f) ((XFixed) ((f) * 65536))
+#define XFixedToDouble(f) (((XDouble) (f)) / 65536)
+
+typedef enum
+{
+ E_ACCESSIBILITY_ZOOM_UI = 1,
+ E_ACCESSIBILITY_HIGH_CONTRAST
+} AccessibilityFeatureType;
+
+typedef enum
+{
+ ZOOM_OUT,
+ ZOOM_SCALE_ADJUST,
+ ZOOM_OUT_PROGRESS,
+ ZOOM_IN,
+ ZOOM_IN_PROGRESS,
+ ZOOM_PAN
+} ZoomUIStatusType;
+
+typedef struct
+{
+ int width;
+ int height;
+ int offset_x;
+ int offset_y;
+ int screenWidth;
+ int screenHeight;
+ double max_scale;
+ double min_scale;
+ double current_scale;
+ double scale_factor;
+ int scale_threshold;
+
+ ZoomUIStatusType status;
+} structZoomUI;
+
+typedef struct _accessibility_
+{
+ Ecore_X_Display* disp;
+ Ecore_X_Window rootWin;
+ Ecore_X_Window accGrabWin;
+ E_Zone *zone;
+
+ Ecore_X_Atom atomZoomUI;
+ Ecore_X_Atom atomHighContrast;
+ Ecore_X_Atom atomRROutput;
+ Ecore_X_Atom atomInputTransform;
+ Ecore_X_Atom atomFloat;
+
+ RROutput output;
+ char rroutput_buf[256];
+ int rroutput_buf_len;
+
+ int isZoomUIEnabled;
+ int isHighContrastEnabled;
+ structZoomUI ZoomUI;
+
+ Ecore_Event_Handler *window_property_handler;
+ Ecore_Event_Handler *gesture_tap_handler;
+ Ecore_Event_Handler *gesture_pan_handler;
+ Ecore_Event_Handler *gesture_pinchrotation_handler;
+
+ //XGesture extension related variable(s)
+ Eina_Bool gesture_supported;
+
+ //XInput extension related variable(s)
+ int xi2_opcode;
+ int touch_deviceid[MAX_MT_DEVICES];
+ float tmatrix[9];
+} Accessibility;
+
+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_accessibility_init(void);
+static void _e_accessibility_fini(void);
+
+static int _e_accessibility_xinput_init(void);
+
+static int _e_accessibility_gesture_tap_handler(void *data, int ev_type, void *ev);
+static int _e_accessibility_gesture_pan_handler(void *data, int ev_type, void *ev);
+static int _e_accessibility_gesture_pinchrotation_handler(void *data, int ev_type, void *ev);
+static int _e_accessibility_cb_window_property(void *data, int ev_type, void *ev);
+
+static void _e_accessibility_enable_feature(AccessibilityFeatureType featureType);
+static void _e_accessibility_disable_feature(AccessibilityFeatureType featureType);
+
+static void _e_accessibility_ZoomUI_update(void);
+static void _e_accessibility_HighContrast_update(Eina_Bool enable);
+
+static int _e_accessibility_get_configuration(void);
+static int _e_accessibility_update_configuration(void);
+static void _e_accessibility_feature_grab_gestures(AccessibilityFeatureType featureType, Eina_Bool isGrab);
+static Eina_Bool _e_accessiblity_gesture_grab_by_event_name(const char *event_name, const int num_finger, Eina_Bool isGrab);
+static Eina_Bool _e_accessiblity_gesture_grab(Ecore_X_Gesture_Event_Type eventType, int num_finger, Eina_Bool isGrab);
+
+static E_Zone* _e_accessibility_get_zone(void);
+
+static void _e_accessibility_zoom_in(void);
+static void _e_accessibility_zoom_out(void);
+static int _e_accessibility_marshalize_string (char* buf, int num, char* srcs[]);
+static void _e_accessibility_init_output(void);
+static void _e_accessibility_init_input(void);
+
+static void _e_accessibility_update_input_transform_matrix(void);
+
+#endif//__E_MOD_MAIN_H__
+
--- /dev/null
+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.
+
--- /dev/null
+The Rasterman (Carsten Haitzler) <raster@rasterman.com>
+Ibukun Olumuyiwa <ibukun@computer.org>
+Sebastian Dransfeld <sd@tango.flipp.net>
+HandyAndE (Andrew Williams) <andy@handyande.co.uk>
+CodeWarrior (Hisham Mardam Bey) <hisham@hisham.cc>
+dj2 (Dan Sinclair) <dj2@everburning.com>
+Tilman Sauerbeck <tilman@code-monkey.de>
+Aleksej Struk <astruk@gmail.com>
+Brian Mattern <rephorm@rephorm.com>
+devilhorns (Christopher Michael) <devilhorns@comcast.net>
+/dev/urandom (Viktor Kojouharov) <vkojouharov@gmail.com>
+ilLogict (Chidambar Zinnoury) <illogict@online.fr>
+Stafford Horne <shorne@softhome.net>
+Cedric Bail <cedric.bail@free.fr>
+onefang (David Seikel) <onefang@gmail.com>
+okra (Stephen Houston) <smhouston88@gmail.com>
+Byron Hillis <metrics@score5.org>
+Ravenlock (Eric Schuele) <e.schuele@computer.org>
+ManoWarrior (Luchezar Petkov) <luchezar.petkov@gmail.com>
+morlenxus (Brian Miculcy) <morlenxus@gmx.net>
+Toma- (Tom Haste) <tomhaste@gmail.com>
+k-s (Gustavo Sverzut Barbieri) <barbieri@profusion.mobi>
+Peter van de Werken <pwerken-e@a-eskwadraat.nl>
+Florian Hackenberger <florian@hackenberger.at>
+Hannes Janetzek <hannes.janetzek@gmail.com>
+Mike Blumenkrantz (discomfitor/zmike) <mike@zentific.com>
+Leif Middelschulte <leif.middelschulte@gmail.com>
+yoz (Michael Bouchaud) <michael.bouchaud@gmail.com>
+Gwanglim Lee <gl77.lee@samsung.com>
+Gwangyeong Mun <kk.moon@samsung.com>
+Duna Oh <duna.oh@samsung.com>
--- /dev/null
+Copyright notice for Enlightenment:
+
+Copyright (C) 2000-2012 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.
--- /dev/null
+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 `<wchar.h>' 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.
+
--- /dev/null
+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)
+
--- /dev/null
+#!/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
+
+
--- /dev/null
+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-tizen, 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,pixman-1])
+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
+
--- /dev/null
+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
--- /dev/null
+#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
--- /dev/null
+images {
+ image: "comp-sh1.png" COMP;
+ image: "bt_glow.png" COMP;
+}
--- /dev/null
+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" */
--- /dev/null
+#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
--- /dev/null
+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" */
--- /dev/null
+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" */
--- /dev/null
+description { state: "default-visible" 0.0;\r
+ inherit: "default" 0.0;\r
+ map {\r
+ on: 1;\r
+ smooth: 1;\r
+ backface_cull: 0;\r
+ perspective_on: 1;\r
+ perspective: "persp";\r
+ rotation.x: 0;\r
+ rotation.y: 0;\r
+ rotation.z: 0;\r
+ }\r
+}\r
+description { state: "visible-rotation--270" 0.0;\r
+ inherit: "default-visible" 0.0;\r
+ map.perspective: "persp";\r
+ map.rotation.z: -270;\r
+}\r
+description { state: "visible-rotation--180" 0.0;\r
+ inherit: "default-visible" 0.0;\r
+ map.perspective: "persp";\r
+ map.rotation.z: -180;\r
+}\r
+description { state: "visible-rotation--90" 0.0;\r
+ inherit: "default-visible" 0.0;\r
+ map {\r
+ on: 1;\r
+ smooth: 1;\r
+ backface_cull: 0;\r
+ perspective_on: 1;\r
+ perspective: "persp";\r
+ rotation.x: 0;\r
+ rotation.y: 0;\r
+ rotation.z: -90;\r
+ }\r
+}\r
+description { state: "visible-rotation-0" 0.0;\r
+ inherit: "default-visible" 0.0;\r
+ map.perspective: "persp";\r
+ map.rotation.z: 0;\r
+}\r
+description { state: "visible-rotation-90" 0.0;\r
+ inherit: "default-visible" 0.0;\r
+ map {\r
+ on: 1;\r
+ smooth: 1;\r
+ backface_cull: 0;\r
+ perspective_on: 1;\r
+ perspective: "persp";\r
+ rotation.x: 0;\r
+ rotation.y: 0;\r
+ rotation.z: 90;\r
+ }\r
+}\r
+description { state: "visible-rotation-180" 0.0;\r
+ inherit: "default-visible" 0.0;\r
+ map.perspective: "persp";\r
+ map.rotation.z: 180;\r
+}\r
+description { state: "visible-rotation-270" 0.0;\r
+ inherit: "default-visible" 0.0;\r
+ map.perspective: "persp";\r
+ map.rotation.z: 270;\r
+}\r
--- /dev/null
+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" */
--- /dev/null
+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";
+}
--- /dev/null
+#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 */
--- /dev/null
+program { name: "prog-window-rotation--270";\r
+ signal: "e,state,window,rotation,-270";\r
+ source: "e";\r
+ action: STATE_SET "visible-rotation--270" 0.0;\r
+ target: "e.swallow.content";\r
+ after: "prog-window-rotation-0-done";\r
+}\r
+program { name: "prog-window-rotation--180";\r
+ signal: "e,state,window,rotation,-180";\r
+ source: "e";\r
+ action: STATE_SET "visible-rotation--180" 0.0;\r
+ target: "e.swallow.content";\r
+ after: "prog-window-rotation-0-done";\r
+}\r
+program { name: "prog-window-rotation--90";\r
+ signal: "e,state,window,rotation,-90";\r
+ source: "e";\r
+ action: STATE_SET "visible-rotation--90" 0.0;\r
+ target: "e.swallow.content";\r
+ after: "prog-window-rotation-0-done";\r
+}\r
+program { name: "prog-window-rotation-0";\r
+ signal: "e,state,window,rotation,0";\r
+ source: "e";\r
+ action: STATE_SET "visible-rotation-0" 0.0;\r
+ target: "e.swallow.content";\r
+ after: "prog-window-rotation-0-done";\r
+}\r
+program { name: "prog-window-rotation-90";\r
+ signal: "e,state,window,rotation,90";\r
+ source: "e";\r
+ action: STATE_SET "visible-rotation-90" 0.0;\r
+ target: "e.swallow.content";\r
+ after: "prog-window-rotation-0-done";\r
+}\r
+program { name: "prog-window-rotation-180";\r
+ signal: "e,state,window,rotation,180";\r
+ source: "e";\r
+ action: STATE_SET "visible-rotation-180" 0.0;\r
+ target: "e.swallow.content";\r
+ after: "prog-window-rotation-0-done";\r
+}\r
+program { name: "prog-window-rotation-270";\r
+ signal: "e,state,window,rotation,270";\r
+ source: "e";\r
+ action: STATE_SET "visible-rotation-270" 0.0;\r
+ target: "e.swallow.content";\r
+ after: "prog-window-rotation-0-done";\r
+}\r
+\r
+program { name: "prog-window-rotation-0-done";\r
+ action: STATE_SET "visible-rotation-0" 0.0;\r
+ target: "e.swallow.content";\r
+ transition: DURATION_WND_ROT_SWALLOW_DEG_TO_ZERO;\r
+ after: "prog-emit-window-rotation-done";\r
+}\r
+program { name: "prog-emit-window-rotation-done";\r
+ action: SIGNAL_EMIT "e,action,window,rotation,done" "e";\r
+}\r
--- /dev/null
+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)
+ }
+}
--- /dev/null
+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)
+ }
+}
--- /dev/null
+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";
+}
--- /dev/null
+/* ----------------------------------------------------------------------------*/
+/* 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, "<br>");
+
+ 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 */
--- /dev/null
+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 */
--- /dev/null
+/*-----------------------------------------------------*/
+/* group "app_tray" */
+/*-----------------------------------------------------*/
+group { name: "app_tray";
+ images {
+ image: "comp-sh1.png" COMP;
+ image: "bt_glow.png" COMP;
+ }
+ parts {
+ part { name: "clipper";
+ type: RECT;
+ 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;
+ 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";
+
+ 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 "app_tray" */
--- /dev/null
+ /*-----------------------------------------------------*/
+ /* 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" */
--- /dev/null
+/*-----------------------------------------------------*/
+/* 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 127;
+ 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" */
--- /dev/null
+/*-----------------------------------------------------*/\r
+/* group "fake_effect" */\r
+/*-----------------------------------------------------*/\r
+group { name: "fake_effect";\r
+ images {\r
+ image: "comp-sh1.png" COMP;\r
+ image: "bt_glow.png" COMP;\r
+ }\r
+ parts {\r
+ part { name: "clipper";\r
+ type: RECT;\r
+ mouse_events: 0;\r
+ description { state: "default" 0.0;\r
+ visible: 0;\r
+ color: 0 0 0 0;\r
+ rel1 {\r
+ relative: -1.0 -1.0;\r
+ offset: -9999 -9999;\r
+ }\r
+ rel2 {\r
+ relative: 2.0 2.0;\r
+ offset: 9999 9999;\r
+ }\r
+ }\r
+ description { state: "visible" 0.0;\r
+ inherit: "default" 0.0;\r
+ visible: 1;\r
+ color: 255 255 255 255;\r
+ }\r
+ }\r
+ part { name: "shower";\r
+ type: RECT;\r
+ mouse_events: 0;\r
+ description { state: "default" 0.0;\r
+ visible: 0;\r
+ rel1 {\r
+ relative: 0.1 0.1;\r
+ }\r
+ rel2 {\r
+ relative: 0.9 0.9;\r
+ }\r
+ }\r
+ description { state: "visible" 0.0;\r
+ inherit: "default" 0.0;\r
+ rel1 {\r
+ relative: 0.0 0.0;\r
+ }\r
+ rel2 {\r
+ relative: 1.0 1.0;\r
+ }\r
+ }\r
+ }\r
+ part { name: "fake.swallow.content";\r
+ type: SWALLOW;\r
+ clip_to: "clipper";\r
+ mouse_events: 0;\r
+ description { state: "default" 0.0;\r
+ rel1 {\r
+ to: "shower";\r
+ }\r
+ rel2 {\r
+ to: "shower";\r
+ }\r
+ }\r
+ }\r
+ }\r
+ programs {\r
+ program { name: "show1";\r
+ signal: "fake,state,visible,on";\r
+ source: "fake";\r
+ action: STATE_SET "default" 0.0;\r
+ target: "clipper";\r
+ target: "shower";\r
+ after: "show2";\r
+ }\r
+ program { name: "show2";\r
+ action: STATE_SET "visible" 0.0;\r
+ target: "clipper";\r
+ target: "shower";\r
+ transition: DECELERATE 0.1;\r
+ after: "show3";\r
+ }\r
+ program { name: "show3";\r
+ action: SIGNAL_EMIT "fake,action,show,done" "fake";\r
+ }\r
+ program { name: "hide1";\r
+ signal: "fake,state,visible,off";\r
+ source: "fake";\r
+ action: STATE_SET "default" 0.0;\r
+ target: "clipper";\r
+ target: "shower";\r
+ transition: DECELERATE 0.2;\r
+ after: "hide2";\r
+ }\r
+ program { name: "hide2";\r
+ action: SIGNAL_EMIT "fake,action,hide,done" "fake";\r
+ }\r
+ }\r
+} /* end of group "fake_effect" */\r
--- /dev/null
+/*-----------------------------------------------------*/\r
+/* group "fake_effect_fade" */\r
+/*-----------------------------------------------------*/\r
+group { name: "fake_effect_fade";\r
+ images {\r
+ image: "comp-sh1.png" COMP;\r
+ image: "bt_glow.png" COMP;\r
+ }\r
+ parts {\r
+ part { name: "clipper";\r
+ type: RECT;\r
+ mouse_events: 1;\r
+ description { state: "default" 0.0;\r
+ visible: 0;\r
+ color: 255 255 255 255;\r
+ rel1 {\r
+ relative: -1.0 -1.0;\r
+ offset: -9999 -9999;\r
+ }\r
+ rel2 {\r
+ relative: 2.0 2.0;\r
+ offset: 9999 9999;\r
+ }\r
+ }\r
+ description { state: "visible" 0.0;\r
+ inherit: "default" 0.0;\r
+ visible: 1;\r
+ color: 255 255 255 255;\r
+ }\r
+ description { state: "default-180" 0.0;\r
+ visible: 0;\r
+ color: 255 255 255 255;\r
+ rel1 {\r
+ relative: -1.0 -1.0;\r
+ offset: -9999 -9999;\r
+ }\r
+ rel2 {\r
+ relative: 2.0 2.0;\r
+ offset: 9999 9999;\r
+ }\r
+ }\r
+ description { state: "visible-180" 0.0;\r
+ inherit: "default" 0.0;\r
+ visible: 1;\r
+ color: 255 255 255 255;\r
+ }\r
+ description { state: "default-90" 0.0;\r
+ visible: 0;\r
+ color: 255 255 255 255;\r
+ rel1 {\r
+ relative: -1.0 -1.0;\r
+ offset: -9999 -9999;\r
+ }\r
+ rel2 {\r
+ relative: 2.0 2.0;\r
+ offset: 9999 9999;\r
+ }\r
+ }\r
+ description { state: "visible-90" 0.0;\r
+ inherit: "default" 0.0;\r
+ visible: 1;\r
+ color: 255 255 255 255;\r
+ }\r
+ description { state: "default-270" 0.0;\r
+ visible: 0;\r
+ color: 255 255 255 255;\r
+ rel1 {\r
+ relative: -1.0 -1.0;\r
+ offset: -9999 -9999;\r
+ }\r
+ rel2 {\r
+ relative: 2.0 2.0;\r
+ offset: 9999 9999;\r
+ }\r
+ }\r
+ description { state: "visible-270" 0.0;\r
+ inherit: "default" 0.0;\r
+ visible: 1;\r
+ color: 255 255 255 255;\r
+ }\r
+\r
+ }\r
+ part { name: "persp";\r
+ type: RECT;\r
+ description { state: "default" 0.0;\r
+ min: 10 10;\r
+ max: 10 10;\r
+ visible: 0;\r
+ perspective.zplane: 0;\r
+ perspective.focal: 1000;\r
+ }\r
+ description { state: "visible" 0.0;\r
+ inherit: "default" 0.0;\r
+ perspective.zplane: 0;\r
+ perspective.focal: 1000;\r
+ }\r
+ description { state: "default-180" 0.0;\r
+ min: 10 10;\r
+ max: 10 10;\r
+ visible: 0;\r
+ perspective.zplane: 0;\r
+ perspective.focal: 1000;\r
+ }\r
+ description { state: "visible-180" 0.0;\r
+ inherit: "default-180" 0.0;\r
+ perspective.zplane: 0;\r
+ perspective.focal: 1000;\r
+ }\r
+ description { state: "default-90" 0.0;\r
+ min: 10 10;\r
+ max: 10 10;\r
+ visible: 0;\r
+ perspective.zplane: 0;\r
+ perspective.focal: 1000;\r
+ }\r
+ description { state: "visible-90" 0.0;\r
+ inherit: "default-90" 0.0;\r
+ perspective.zplane: 0;\r
+ perspective.focal: 1000;\r
+ }\r
+ description { state: "default-270" 0.0;\r
+ min: 10 10;\r
+ max: 10 10;\r
+ visible: 0;\r
+ perspective.zplane: 0;\r
+ perspective.focal: 1000;\r
+ }\r
+ description { state: "visible-270" 0.0;\r
+ inherit: "default-270" 0.0;\r
+ perspective.zplane: 0;\r
+ perspective.focal: 1000;\r
+ }\r
+ }\r
+ part { name: "shower";\r
+ type: RECT;\r
+ mouse_events: 0;\r
+ description { state: "default" 0.0;\r
+ visible: 0;\r
+ rel1 {\r
+ relative: 0.45 0.45; // fake effect start size\r
+ }\r
+ rel2 {\r
+ relative: 0.55 0.55; // fake effect start size\r
+ }\r
+ }\r
+ description { state: "visible" 0.0;\r
+ inherit: "default" 0.0;\r
+ rel1 {\r
+ relative: 0.0 0.0; // fake effect end size\r
+ }\r
+ rel2 {\r
+ relative: 1.0 1.0;\r
+ }\r
+ }\r
+ description { state: "default-180" 0.0;\r
+ visible: 0;\r
+ rel1 {\r
+ relative: 0.45 0.45; // fake effect start size\r
+ }\r
+ rel2 {\r
+ relative: 0.55 0.55; // fake effect start size\r
+ }\r
+ }\r
+ description { state: "visible-180" 0.0;\r
+ inherit: "default-180" 0.0;\r
+ rel1 {\r
+ relative: 0.0 0.0; // fake effect end size\r
+ }\r
+ rel2 {\r
+ relative: 1.0 1.0;\r
+ }\r
+ }\r
+ description { state: "default-90" 0.0;\r
+ visible: 0;\r
+ rel1 {\r
+ relative: 0.45 0.45; // fake effect start size\r
+ }\r
+ rel2 {\r
+ relative: 0.55 0.55; // fake effect start size\r
+ }\r
+ }\r
+ description { state: "visible-90" 0.0;\r
+ inherit: "default-90" 0.0;\r
+ rel1 {\r
+ relative: 0.0 0.0; // fake effect end size\r
+ }\r
+ rel2 {\r
+ relative: 1.0 1.0;\r
+ }\r
+ }\r
+ description { state: "default-270" 0.0;\r
+ visible: 0;\r
+ rel1 {\r
+ relative: 0.45 0.45; // fake effect start size\r
+ }\r
+ rel2 {\r
+ relative: 0.55 0.55; // fake effect start size\r
+ }\r
+ }\r
+ description { state: "visible-270" 0.0;\r
+ inherit: "default-270" 0.0;\r
+ rel1 {\r
+ relative: 0.0 0.0; // fake effect end size\r
+ }\r
+ rel2 {\r
+ relative: 1.0 1.0;\r
+ }\r
+ }\r
+ }\r
+ part { name: "fake.swallow.content";\r
+ type: SWALLOW;\r
+ clip_to: "clipper";\r
+ mouse_events: 0;\r
+ description { state: "default" 0.0;\r
+ rel1 {\r
+ to: "shower";\r
+ }\r
+ rel2 {\r
+ to: "shower";\r
+ }\r
+ map {\r
+ on: 1;\r
+ smooth: 0;\r
+ backface_cull: 0;\r
+ perspective_on: 1;\r
+ alpha: 0;\r
+ perspective: "persp";\r
+ rotation {\r
+ x: 0;\r
+ y: 0;\r
+ z: 0;\r
+ }\r
+ }\r
+ }\r
+ description { state: "visible" 0.0;\r
+ rel1 {\r
+ to: "shower";\r
+ }\r
+ rel2 {\r
+ to: "shower";\r
+ }\r
+ map {\r
+ on: 1;\r
+ smooth: 0;\r
+ backface_cull: 0;\r
+ perspective_on: 1;\r
+ alpha: 0;\r
+ perspective: "persp";\r
+ rotation {\r
+ x: 0;\r
+ y: 0;\r
+ z: 0;\r
+ }\r
+ }\r
+ }\r
+ description { state: "default-180" 0.0;\r
+ rel1 {\r
+ to: "shower";\r
+ }\r
+ rel2 {\r
+ to: "shower";\r
+ }\r
+ map {\r
+ on: 1;\r
+ smooth: 0;\r
+ backface_cull: 0;\r
+ perspective_on: 1;\r
+ alpha: 0;\r
+ perspective: "persp";\r
+ rotation {\r
+ x: 0;\r
+ y: 0;\r
+ z: 180;\r
+ }\r
+ }\r
+ }\r
+ description { state: "visible-180" 0.0;\r
+ rel1 {\r
+ to: "shower";\r
+ }\r
+ rel2 {\r
+ to: "shower";\r
+ }\r
+ map {\r
+ on: 1;\r
+ smooth: 0;\r
+ backface_cull: 0;\r
+ perspective_on: 1;\r
+ alpha: 0;\r
+ perspective: "persp";\r
+ rotation {\r
+ x: 0;\r
+ y: 0;\r
+ z: 180;\r
+ }\r
+ }\r
+ }\r
+ description { state: "default-90" 0.0;\r
+ rel1 {\r
+ to: "shower";\r
+ }\r
+ rel2 {\r
+ to: "shower";\r
+ }\r
+ map {\r
+ on: 1;\r
+ smooth: 1;\r
+ backface_cull: 0;\r
+ perspective_on: 1;\r
+ alpha: 0;\r
+ perspective: "persp";\r
+ rotation {\r
+ x: 0;\r
+ y: 0;\r
+ z: 270;\r
+ }\r
+ }\r
+ }\r
+ description { state: "visible-90" 0.0;\r
+ rel1 {\r
+ to: "shower";\r
+ }\r
+ rel2 {\r
+ to: "shower";\r
+ }\r
+ map {\r
+ on: 1;\r
+ smooth: 1;\r
+ backface_cull: 0;\r
+ perspective_on: 1;\r
+ alpha: 0;\r
+ perspective: "persp";\r
+ rotation {\r
+ x: 0;\r
+ y: 0;\r
+ z: 270;\r
+ }\r
+ }\r
+ }\r
+ description { state: "default-270" 0.0;\r
+ rel1 {\r
+ to: "shower";\r
+ }\r
+ rel2 {\r
+ to: "shower";\r
+ }\r
+ map {\r
+ on: 1;\r
+ smooth: 1;\r
+ backface_cull: 0;\r
+ perspective_on: 1;\r
+ alpha: 0;\r
+ perspective: "persp";\r
+ rotation {\r
+ x: 0;\r
+ y: 0;\r
+ z: 90;\r
+ }\r
+ }\r
+ }\r
+ description { state: "visible-270" 0.0;\r
+ rel1 {\r
+ to: "shower";\r
+ }\r
+ rel2 {\r
+ to: "shower";\r
+ }\r
+ map {\r
+ on: 1;\r
+ smooth: 1;\r
+ backface_cull: 0;\r
+ perspective_on: 1;\r
+ alpha: 0;\r
+ perspective: "persp";\r
+ rotation {\r
+ x: 0;\r
+ y: 0;\r
+ z: 90;\r
+ }\r
+ }\r
+ }\r
+ }\r
+ part { name: "fake.swallow.indicator";\r
+ type: SWALLOW;\r
+ clip_to: "clipper";\r
+ mouse_events: 0;\r
+ description { state: "default" 0.0;\r
+ rel1 {\r
+ to: "shower";\r
+ relative: 0.0 0.0;\r
+ }\r
+ rel2 {\r
+ to: "shower";\r
+ relative: 1.0 0.05;\r
+ }\r
+ }\r
+ description { state: "visible" 0.0;\r
+ min: 0 60;\r
+ max: 999999 60;\r
+ align: 0.5 0.0;\r
+ rel1 {\r
+ to: "shower";\r
+ relative: 0.0 0.0; // fake effect end size\r
+ }\r
+ rel2 {\r
+ to: "shower";\r
+ relative: 1.0 0.0;\r
+ }\r
+ }\r
+ description { state: "default-180" 0.0;\r
+ rel1 {\r
+ to: "shower";\r
+ relative: 0.0 0.95;\r
+ }\r
+ rel2 {\r
+ to: "shower";\r
+ relative: 1.0 1.0;\r
+ }\r
+ map {\r
+ on: 1;\r
+ smooth: 1;\r
+ backface_cull: 0;\r
+ perspective_on: 1;\r
+ alpha: 1;\r
+ perspective: "persp";\r
+ rotation {\r
+ x: 0;\r
+ y: 0;\r
+ z: 180;\r
+ }\r
+ }\r
+ }\r
+ description { state: "visible-180" 0.0;\r
+ min: 0 60;\r
+ max: 999999 60;\r
+ align: 0.5 1.0;\r
+ rel1 {\r
+ to: "shower";\r
+ relative: 0.0 1.0; // fake effect end size\r
+ }\r
+ rel2 {\r
+ to: "shower";\r
+ relative: 1.0 1.0;\r
+ }\r
+ map {\r
+ on: 1;\r
+ smooth: 1;\r
+ backface_cull: 0;\r
+ perspective_on: 1;\r
+ alpha: 1;\r
+ perspective: "persp";\r
+ rotation {\r
+ x: 0;\r
+ y: 0;\r
+ z: 180;\r
+ }\r
+ }\r
+ }\r
+ description { state: "default-90" 0.0;\r
+ rel1 {\r
+ to: "shower";\r
+ relative: 0.0 0.0;\r
+ }\r
+ rel2 {\r
+ to: "shower";\r
+ relative: 1.0 0.05;\r
+ }\r
+ map {\r
+ on: 1;\r
+ smooth: 1;\r
+ backface_cull: 0;\r
+ perspective_on: 1;\r
+ alpha: 1;\r
+ perspective: "persp";\r
+ rotation {\r
+ center: "shower";\r
+ x: 0;\r
+ y: 0;\r
+ z: 270;\r
+ }\r
+ }\r
+ }\r
+ description { state: "visible-90" 0.0;\r
+ min: 0 60;\r
+ max: 999999 60;\r
+ align: 0.5 0.0;\r
+ rel1 {\r
+ to: "shower";\r
+ relative: 0.0 0.0; // fake effect end size\r
+ }\r
+ rel2 {\r
+ to: "shower";\r
+ relative: 1.0 0.0;\r
+ }\r
+ map {\r
+ on: 1;\r
+ smooth: 1;\r
+ backface_cull: 0;\r
+ perspective_on: 1;\r
+ alpha: 1;\r
+ perspective: "persp";\r
+ rotation {\r
+ center: "shower";\r
+ x: 0;\r
+ y: 0;\r
+ z: 270;\r
+ }\r
+ }\r
+ }\r
+ description { state: "default-270" 0.0;\r
+ rel1 {\r
+ to: "shower";\r
+ relative: 0.0 0.0;\r
+ }\r
+ rel2 {\r
+ to: "shower";\r
+ relative: 1.0 0.05;\r
+ }\r
+ map {\r
+ on: 1;\r
+ smooth: 1;\r
+ backface_cull: 0;\r
+ perspective_on: 1;\r
+ alpha: 1;\r
+ perspective: "persp";\r
+ rotation {\r
+ center: "shower";\r
+ x: 0;\r
+ y: 0;\r
+ z: 90;\r
+ }\r
+ }\r
+ }\r
+ description { state: "visible-270" 0.0;\r
+ min: 0 60;\r
+ max: 999999 60;\r
+ align: 0.5 0.0;\r
+ rel1 {\r
+ to: "shower";\r
+ relative: 0.0 0.0; // fake effect end size\r
+ }\r
+ rel2 {\r
+ to: "shower";\r
+ relative: 1.0 0.0;\r
+ }\r
+ map {\r
+ on: 1;\r
+ smooth: 1;\r
+ backface_cull: 0;\r
+ perspective_on: 1;\r
+ alpha: 1;\r
+ perspective: "persp";\r
+ rotation {\r
+ center: "shower";\r
+ x: 0;\r
+ y: 0;\r
+ z: 90;\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }\r
+ programs {\r
+ program { name: "show1";\r
+ signal: "fake,state,visible,on";\r
+ source: "fake";\r
+ action: STATE_SET "default" 0.0;\r
+ target: "clipper";\r
+ target: "shower";\r
+ target: "fake.swallow.content";\r
+ target: "fake.swallow.indicator";\r
+ after: "show2";\r
+ }\r
+ program { name: "show2";\r
+ action: STATE_SET "visible" 0.0;\r
+ target: "clipper";\r
+ target: "shower";\r
+ target: "fake.swallow.content";\r
+ target: "fake.swallow.indicator";\r
+ transition: DECELERATE 0.3;\r
+ after: "show3";\r
+ }\r
+ program { name: "show3";\r
+ action: SIGNAL_EMIT "fake,action,show,done" "fake";\r
+ }\r
+ program { name: "reverse1";\r
+ signal: "fake,state,visible,180,on";\r
+ source: "fake";\r
+ action: STATE_SET "default-180" 0.0;\r
+ target: "clipper";\r
+ target: "shower";\r
+ target: "fake.swallow.content";\r
+ target: "fake.swallow.indicator";\r
+ after: "reverse2";\r
+ }\r
+ program { name: "reverse2";\r
+ action: STATE_SET "visible-180" 0.0;\r
+ target: "clipper";\r
+ target: "shower";\r
+ target: "fake.swallow.content";\r
+ target: "fake.swallow.indicator";\r
+ transition: DECELERATE 0.3;\r
+ after: "show3";\r
+ }\r
+ program { name: "rotation-right1";\r
+ signal: "fake,state,visible,90,on";\r
+ source: "fake";\r
+ action: STATE_SET "default-90" 0.0;\r
+ target: "clipper";\r
+ target: "shower";\r
+ target: "fake.swallow.content";\r
+ target: "fake.swallow.indicator";\r
+ after: "rotation-right2";\r
+ }\r
+ program { name: "rotation-right2";\r
+ action: STATE_SET "visible-90" 0.0;\r
+ target: "clipper";\r
+ target: "shower";\r
+ target: "fake.swallow.content";\r
+ target: "fake.swallow.indicator";\r
+ transition: DECELERATE 0.3;\r
+ after: "show3";\r
+ }\r
+ program { name: "rotation-left1";\r
+ signal: "fake,state,visible,270,on";\r
+ source: "fake";\r
+ action: STATE_SET "default-270" 0.0;\r
+ target: "clipper";\r
+ target: "shower";\r
+ target: "fake.swallow.content";\r
+ target: "fake.swallow.indicator";\r
+ after: "rotation-left2";\r
+ }\r
+ program { name: "rotation-left2";\r
+ action: STATE_SET "visible-270" 0.0;\r
+ target: "clipper";\r
+ target: "shower";\r
+ target: "fake.swallow.content";\r
+ target: "fake.swallow.indicator";\r
+ transition: DECELERATE 0.3;\r
+ after: "show3";\r
+ }\r
+ program { name: "hide1";\r
+ signal: "fake,state,visible,off";\r
+ source: "fake";\r
+ action: STATE_SET "default" 0.0;\r
+ target: "clipper";\r
+ target: "shower";\r
+ target: "fake.swallow.indicator";\r
+ target: "fake.swallow.content";\r
+ transition: DECELERATE 0.4;\r
+ after: "hide2";\r
+ }\r
+ program { name: "hide2";\r
+ action: SIGNAL_EMIT "fake,action,hide,done" "fake";\r
+ }\r
+ program { name: "hide-reverse1";\r
+ signal: "fake,state,visible,180,off";\r
+ source: "fake";\r
+ action: STATE_SET "default-180" 0.0;\r
+ target: "clipper";\r
+ target: "shower";\r
+ target: "fake.swallow.indicator";\r
+ target: "fake.swallow.content";\r
+ transition: DECELERATE 0.4;\r
+ after: "hide2";\r
+ }\r
+ program { name: "hide-rotate-right1";\r
+ signal: "fake,state,visible,90,off";\r
+ source: "fake";\r
+ action: STATE_SET "default-90" 0.0;\r
+ target: "clipper";\r
+ target: "shower";\r
+ target: "fake.swallow.indicator";\r
+ target: "fake.swallow.content";\r
+ transition: DECELERATE 0.4;\r
+ after: "hide2";\r
+ }\r
+ program { name: "hide-rotate-left1";\r
+ signal: "fake,state,visible,270,off";\r
+ source: "fake";\r
+ action: STATE_SET "default-270" 0.0;\r
+ target: "clipper";\r
+ target: "shower";\r
+ target: "fake.swallow.indicator";\r
+ target: "fake.swallow.content";\r
+ transition: DECELERATE 0.4;\r
+ after: "hide2";\r
+ }\r
+ program { name: "show_noeffect1";\r
+ signal: "fake,state,visible,on,noeffect";\r
+ source: "fake";\r
+ action: STATE_SET "visible" 0.0;\r
+ target: "clipper";\r
+ target: "shower";\r
+ target: "fake.swallow.content";\r
+ target: "fake.swallow.indicator";\r
+ after: "show3";\r
+ }\r
+ program { name: "reverse_noeffect1";\r
+ signal: "fake,state,visible,180,on,noeffect";\r
+ source: "fake";\r
+ action: STATE_SET "visible-180" 0.0;\r
+ target: "clipper";\r
+ target: "shower";\r
+ target: "fake.swallow.content";\r
+ target: "fake.swallow.indicator";\r
+ after: "show3";\r
+ }\r
+ program { name: "right_rotate_noeffect1";\r
+ signal: "fake,state,visible,90,on,noeffect";\r
+ source: "fake";\r
+ action: STATE_SET "visible-90" 0.0;\r
+ target: "clipper";\r
+ target: "shower";\r
+ target: "fake.swallow.content";\r
+ target: "fake.swallow.indicator";\r
+ after: "show3";\r
+ }\r
+ program { name: "left_rotate_noeffect1";\r
+ signal: "fake,state,visible,270,on,noeffect";\r
+ source: "fake";\r
+ action: STATE_SET "visible-270" 0.0;\r
+ target: "clipper";\r
+ target: "shower";\r
+ target: "fake.swallow.content";\r
+ target: "fake.swallow.indicator";\r
+ after: "show3";\r
+ }\r
+ program { name: "hide_noeffect1";\r
+ signal: "fake,state,visible,off,noeffect";\r
+ source: "fake";\r
+ action: STATE_SET "default" 0.0;\r
+ target: "clipper";\r
+ target: "shower";\r
+ target: "fake.swallow.indicator";\r
+ target: "fake.swallow.content";\r
+ after: "hide2";\r
+ }\r
+ }\r
+} /* end of group "fake_effect_fade" */\r
--- /dev/null
+/*-----------------------------------------------------*/\r
+/* group "fake_effect_twist" */\r
+/*-----------------------------------------------------*/\r
+group { name: "fake_effect_twist";\r
+ images {\r
+ image: "comp-sh1.png" COMP;\r
+ image: "bt_glow.png" COMP;\r
+ }\r
+ parts {\r
+ part { name: "clipper";\r
+ type: RECT;\r
+ mouse_events: 0;\r
+ description { state: "default" 0.0;\r
+ visible: 1;\r
+ color: 255 255 255 255;\r
+ rel1 {\r
+ relative: -1.0 -1.0;\r
+ offset: -9999 -9999;\r
+ }\r
+ rel2 {\r
+ relative: 2.0 2.0;\r
+ offset: 9999 9999;\r
+ }\r
+ }\r
+ description { state: "visible" 0.0;\r
+ inherit: "default" 0.0;\r
+ visible: 1;\r
+ color: 255 255 255 255;\r
+ }\r
+ }\r
+ part { name: "shower";\r
+ type: RECT;\r
+ mouse_events: 0;\r
+ description { state: "default" 0.0;\r
+ visible: 0;\r
+ rel1 {\r
+ relative: 0.0 0.0;\r
+ }\r
+ rel2 {\r
+ relative: 1.0 1.0;\r
+ }\r
+ }\r
+ description { state: "visible" 0.0;\r
+ inherit: "default" 0.0;\r
+ rel1 {\r
+ relative: 0.0 0.0;\r
+ }\r
+ rel2 {\r
+ relative: 1.0 1.0;\r
+ }\r
+ }\r
+ }\r
+ part { name: "persp";\r
+ type: RECT;\r
+ description { state: "default" 0.0;\r
+ min: 10 10;\r
+ max: 10 10;\r
+ visible: 0;\r
+ perspective.zplane: -1500;\r
+ perspective.focal: 1000;\r
+ }\r
+ description { state: "visible" 0.0;\r
+ inherit: "default" 0.0;\r
+ perspective.zplane: 0;\r
+ perspective.focal: 1000;\r
+ }\r
+ }\r
+ part { name: "fake.swallow.content";\r
+ type: SWALLOW;\r
+ clip_to: "clipper";\r
+ mouse_events: 0;\r
+ description { state: "default" 0.0;\r
+ rel1 {\r
+ to: "shower";\r
+ }\r
+ rel2 {\r
+ to: "shower";\r
+ }\r
+ map {\r
+ on: 1;\r
+ smooth: 1;\r
+ backface_cull: 0;\r
+ perspective_on: 1;\r
+ alpha: 1;\r
+ perspective: "persp";\r
+ rotation {\r
+ x: 0;\r
+ y: 90;\r
+ z: 0;\r
+ }\r
+ }\r
+ }\r
+ description { state: "visible" 0.0;\r
+ rel1 {\r
+ to: "shower";\r
+ }\r
+ rel2 {\r
+ to: "shower";\r
+ }\r
+ map {\r
+ on: 1;\r
+ smooth: 1;\r
+ backface_cull: 0;\r
+ perspective_on: 1;\r
+ alpha: 1;\r
+ perspective: "persp";\r
+ rotation {\r
+ x: 0;\r
+ y: 0;\r
+ z: 0;\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }\r
+ programs {\r
+ program { name: "show1";\r
+ signal: "fake,state,visible,on";\r
+ source: "fake";\r
+ action: STATE_SET "default" 0.0;\r
+ target: "clipper";\r
+ target: "shower";\r
+ target: "persp";\r
+ target: "fake.swallow.content";\r
+ after: "show2";\r
+ }\r
+ program { name: "show2";\r
+ action: STATE_SET "default" 0.0;\r
+ target: "clipper";\r
+ target: "shower";\r
+ target: "persp";\r
+ target: "fake.swallow.content";\r
+ after: "show3";\r
+ }\r
+ program { name: "show3";\r
+ action: STATE_SET "visible" 0.0;\r
+ target: "clipper";\r
+ target: "shower";\r
+ target: "persp";\r
+ target: "fake.swallow.content";\r
+ //transition: DECELERATE 0.3;\r
+ //transition: LINEAR 3;\r
+ //transition: DECELERATE 0.8;\r
+ transition: ACCELERATE 0.45;\r
+ after: "show4";\r
+ }\r
+ program { name: "show4";\r
+ action: SIGNAL_EMIT "fake,action,show,done" "fake";\r
+ }\r
+ program { name: "hide1";\r
+ signal: "fake,state,visible,off";\r
+ source: "fake";\r
+ action: STATE_SET "visible" 0.0;\r
+ target: "clipper";\r
+ target: "shower";\r
+ target: "persp";\r
+ target: "fake.swallow.content";\r
+ after: "hide2";\r
+ }\r
+ program { name: "hide2";\r
+ action: STATE_SET "default" 0.0;\r
+ target: "clipper";\r
+ target: "shower";\r
+ target: "persp";\r
+ target: "fake.swallow.content";\r
+ //transition: LINEAR 3;\r
+ transition: DECELERATE 0.45;\r
+ after: "hide3";\r
+ }\r
+ program { name: "hide3";\r
+ action: SIGNAL_EMIT "fake,action,hide,done" "fake";\r
+ }\r
+ }\r
+} /* end of group "fake_effect_twist" */\r
--- /dev/null
+/*-----------------------------------------------------*/
+/* group "home_screen" */
+/*-----------------------------------------------------*/
+group { name: "home_screen";
+ #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.25 0.25;
+ rel1.offset: 0 0;
+ rel2.relative: 0.75 0.75;
+ }
+ 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 "background" 0.0;
+ target: "clipper";
+ target: "shower";
+ target: "e.swallow.content";
+ after: "show2";
+ }
+ program { name: "show2";
+ action: STATE_SET "background" 0.0;
+ transition: LINEAR 0.0415;
+ target: "shower";
+ target: "clipper";
+ target: "e.swallow.content";
+ after: "show3";
+ }
+ program { name: "show3";
+ action: STATE_SET "visible" 0.0;
+ transition: DECELERATE 0.35;
+ target: "shower";
+ target: "clipper";
+ target: "e.swallow.content";
+ 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: "e.swallow.content";
+ after: "hide2";
+ }
+ program { name: "hide2";
+ action: STATE_SET "background" 0.0;
+ transition: LINEAR 0.35;
+ target: "clipper";
+ target: "shower";
+ target: "e.swallow.content";
+ after: "hide3";
+ }
+ program { name: "hide3";
+ action: STATE_SET "background" 0.0;
+ target: "clipper";
+ target: "shower";
+ target: "e.swallow.content";
+ after: "hide4";
+ }
+ program { name: "hide4";
+ action: STATE_SET "default" 0.0;
+ target: "clipper";
+ target: "shower";
+ after: "hide5";
+ }
+ program { name: "hide5";
+ action: STATE_SET "visible" 0.0;
+ target: "e.swallow.content";
+ after: "hide6";
+ }
+ program { name: "hide6";
+ action: SIGNAL_EMIT "e,action,hide,done" "e";
+ }
+ program { name: "raise_above_show1";
+ signal: "e,state,raise_above,on";
+ source: "e";
+ action: STATE_SET "background" 0.0;
+ target: "clipper";
+ target: "shower";
+ target: "e.swallow.content";
+ after: "raise_above_show2";
+ }
+ program { name: "raise_above_show2";
+ action: STATE_SET "background" 0.0;
+ transition: LINEAR 0.0415;
+ target: "shower";
+ target: "clipper";
+ target: "e.swallow.content";
+ after: "raise_above_show3";
+ }
+ program { name: "raise_above_show3";
+ action: STATE_SET "visible" 0.0;
+ transition: DECELERATE 0.35;
+ target: "shower";
+ target: "clipper";
+ target: "e.swallow.content";
+ after: "raise_above_show4";
+ }
+ program { name: "raise_above_show4";
+ action: SIGNAL_EMIT "e,action,raise_above_show,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.35;
+ target: "clipper";
+ target: "shower";
+ after: "raise_above_hide3";
+ }
+ program { name: "raise_above_hide3";
+ action: STATE_SET "default" 0.0;
+ transition: LINEAR 0.2;
+ 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.166;
+ target: "shower";
+ after : "raise_above3_3";
+ }
+ program { name: "raise_above3_3";
+ action : STATE_SET "indicator_raise_above" 0.1;
+ transition: LINEAR 0.1328;
+ target: "shower";
+ after : "raise_above3_4";
+ }
+ program { name: "raise_above3_4";
+ action : STATE_SET "indicator_raise_above" 0.0;
+ transition: SINUSOIDAL 0.166;
+ 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.2656;
+ 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;
+ target: "shower";
+ target: "clipper";
+ target: "e.swallow.content";
+ after: "hide_background3";
+ }
+ program { name: "hide_background3";
+ action: STATE_SET "visible" 0.0;
+ transition: DECELERATE 0.35;
+ 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.4565;
+ 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" */
--- /dev/null
+/*-----------------------------------------------------*/
+/* group "indicator" */
+/*-----------------------------------------------------*/
+group { name: "indicator";
+ images {
+ image: "comp-sh1.png" COMP;
+ image: "bt_glow.png" COMP;
+ }
+ parts {
+ /*------------------------------------------------*/
+ part { name: "clipper";
+ type: RECT;
+ 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: "default,0" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ color : 255 255 255 0;
+ }
+ description { state: "default,90" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ color : 255 255 255 0;
+ }
+ description { state: "default,180" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ color : 255 255 255 0;
+ }
+ description { state: "default,270" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ color : 255 255 255 0;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ color: 255 255 255 255;
+ }
+ }
+ /*------------------------------------------------*/
+ part { name: "shower";
+ type: RECT;
+ 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: "default,0" 0.0;
+ inherit: "default" 0.0;
+ rel1.relative: 0 -1;
+ rel2.relative: 1 0;
+ }
+ description { state: "default,90" 0.0;
+ inherit: "default" 0.0;
+ rel1.relative: -1 0;
+ rel2.relative: 0 1;
+ }
+ description { state: "default,180" 0.0;
+ inherit: "default" 0.0;
+ rel1.relative: 0 1;
+ rel2.relative: 1 2;
+ }
+ description { state: "default,270" 0.0;
+ inherit: "default" 0.0;
+ rel1.relative: 1 0;
+ rel2.relative: 2 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";
+ 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: "default,0" 0.0;
+ inherit: "default" 0.0;
+ rel1.relative: 0 0;
+ rel2.relative: 1 1;
+ }
+ description { state: "default,90" 0.0;
+ inherit: "default" 0.0;
+ rel1.relative: 0 0;
+ rel2.relative: 1 1;
+ }
+ description { state: "default,180" 0.0;
+ inherit: "default" 0.0;
+ rel1.relative: 0 0;
+ rel2.relative: 1 1;
+ }
+ description { state: "default,270" 0.0;
+ 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";
+ }
+ /*-------------------------------------------------------------------
+ * 0.15
+ *-------------------------------------------------------------------
+ * [curr] ---> custom0-show0 ---> custom0-show1 ---> SHOW,DONE
+ *-------------------------------------------------------------------
+ * default0.0 default,0 0.0 visible0.0
+ *-------------------------------------------------------------------
+ * clipper clipper clipper
+ * shower shower shower
+ * swallow swallow swallow
+ *-------------------------------------------------------------------
+ */
+ program { name: "prog-show-custom0,0-0";
+ signal: "e,state,visible,on,custom0,0";
+ source: "e";
+ action: STATE_SET "default,0" 0.0;
+ target: "clipper";
+ target: "shower";
+ target: "e.swallow.content";
+ after : "prog-show-custom0,0-1";
+ }
+ program { name: "prog-show-custom0,0-1";
+ 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-custom0,90-0";
+ signal: "e,state,visible,on,custom0,90";
+ source: "e";
+ action: STATE_SET "default,90" 0.0;
+ target: "clipper";
+ target: "shower";
+ target: "e.swallow.content";
+ after : "prog-show-custom0,90-1";
+ }
+ program { name: "prog-show-custom0,90-1";
+ 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-custom0,180-0";
+ signal: "e,state,visible,on,custom0,180";
+ source: "e";
+ action: STATE_SET "default,180" 0.0;
+ target: "clipper";
+ target: "shower";
+ target: "e.swallow.content";
+ after : "prog-show-custom0,180-1";
+ }
+ program { name: "prog-show-custom0,180-1";
+ 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-custom0,270-0";
+ signal: "e,state,visible,on,custom0,270";
+ source: "e";
+ action: STATE_SET "default,270" 0.0;
+ target: "clipper";
+ target: "shower";
+ target: "e.swallow.content";
+ after : "prog-show-custom0,270-1";
+ }
+ program { name: "prog-show-custom0,270-1";
+ 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-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";
+ }
+ /*-------------------------------------------------------------------------------------
+ * 0.15
+ *-------------------------------------------------------------------------------------
+ * [curr] ---> custom0-hide0 ---> custom0-hide1 ---> custom0-hide1 ---> HIDE,DONE
+ *-------------------------------------------------------------------------------------
+ * visible0.0 visible0.0 default,0 0.0 default0.1
+ *-------------------------------------------------------------------------------------
+ * clipper clipper clipper clipper
+ * shower shower shower shower
+ * swallow swallow swallow swallow
+ *-------------------------------------------------------------------------------------
+ */
+ program { name: "prog-hide-custom0,0-0";
+ signal: "e,state,visible,off,custom0,0";
+ source: "e";
+ action: STATE_SET "visible" 0.0;
+ target: "clipper";
+ target: "shower";
+ target: "e.swallow.content";
+ after : "prog-hide-custom0,0-1";
+ }
+ program { name: "prog-hide-custom0,0-1";
+ action: STATE_SET "default,0" 0.0;
+ transition: DECELERATE 0.15;
+ target: "clipper";
+ target: "shower";
+ target: "e.swallow.content";
+ after : "prog-hide-custom0,0-2";
+ }
+ program { name: "prog-hide-custom0,0-2";
+ action: STATE_SET "default" 0.1;
+ target: "clipper";
+ target: "shower";
+ target: "e.swallow.content";
+ after : "prog-emit-hide-done";
+ }
+ program { name: "prog-hide-custom0,90-0";
+ signal: "e,state,visible,off,custom0,90";
+ source: "e";
+ action: STATE_SET "visible" 0.0;
+ target: "clipper";
+ target: "shower";
+ target: "e.swallow.content";
+ after : "prog-hide-custom0,90-1";
+ }
+ program { name: "prog-hide-custom0,90-1";
+ action: STATE_SET "default,90" 0.0;
+ transition: DECELERATE 0.15;
+ target: "clipper";
+ target: "shower";
+ target: "e.swallow.content";
+ after : "prog-hide-custom0,90-2";
+ }
+ program { name: "prog-hide-custom0,90-2";
+ action: STATE_SET "default" 0.1;
+ target: "clipper";
+ target: "shower";
+ target: "e.swallow.content";
+ after : "prog-emit-hide-done";
+ }
+ program { name: "prog-hide-custom0,180-0";
+ signal: "e,state,visible,off,custom0,180";
+ source: "e";
+ action: STATE_SET "visible" 0.0;
+ target: "clipper";
+ target: "shower";
+ target: "e.swallow.content";
+ after : "prog-hide-custom0,180-1";
+ }
+ program { name: "prog-hide-custom0,180-1";
+ action: STATE_SET "default,180" 0.0;
+ transition: DECELERATE 0.15;
+ target: "clipper";
+ target: "shower";
+ target: "e.swallow.content";
+ after : "prog-hide-custom0,180-2";
+ }
+ program { name: "prog-hide-custom0,180-2";
+ action: STATE_SET "default" 0.1;
+ target: "clipper";
+ target: "shower";
+ target: "e.swallow.content";
+ after : "prog-emit-hide-done";
+ }
+ program { name: "prog-hide-custom0,270-0";
+ signal: "e,state,visible,off,custom0,270";
+ source: "e";
+ action: STATE_SET "visible" 0.0;
+ target: "clipper";
+ target: "shower";
+ target: "e.swallow.content";
+ after : "prog-hide-custom0,270-1";
+ }
+ program { name: "prog-hide-custom0,270-1";
+ action: STATE_SET "default,270" 0.0;
+ transition: DECELERATE 0.15;
+ target: "clipper";
+ target: "shower";
+ target: "e.swallow.content";
+ after : "prog-hide-custom0,270-2";
+ }
+ program { name: "prog-hide-custom0,270-2";
+ 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" */
--- /dev/null
+/*-------------------------------------------------------*/
+/* group "keyboard" */
+/*-------------------------------------------------------*/
+ group { name: "keyboard";
+ 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: "default-noeffect" 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.0 1.0;
+ rel2.relative: 1.0 2.0;
+ }
+ description { state: "default-noeffect" 0.0;
+ visible: 0;
+ rel1.relative: 0.0 0.0;
+ rel2.relative: 1.0 1.0;
+ }
+ description { state: "default-angle-90" 0.0;
+ visible: 0;
+ rel1.relative: 1.0 0.0;
+ rel2.relative: 2.0 1.0;
+ }
+ description { state: "default-angle-180" 0.0;
+ visible: 0;
+ rel1.relative: 0.0 -1.0;
+ rel2.relative: 1.0 0.0;
+ }
+ description { state: "default-angle-270" 0.0;
+ visible: 0;
+ rel1.relative: -1.0 0.0;
+ rel2.relative: 0.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: "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;
+ }
+ }
+ description { state: "default-noeffect" 0.0;
+ rel1.to: "shower";
+ rel2.to: "shower";
+ }
+ description { state: "visible" 0.0;
+ rel1{
+ to: "shower";
+ relative: 0.0 0.0;
+ }
+ rel2{
+ to: "shower";
+ relative: 1.0 1.0;
+ }
+ }
+ }
+ }
+ programs {
+/*-------------------------------------------------------------------------*/
+/* Show Effect Program */
+/*-------------------------------------------------------------------------*/
+ program { name: "show-default-0";
+ signal: "e,state,visible,on";
+ source: "e";
+ action: STATE_SET "default" 0.0;
+ target: "clipper";
+ target: "shower";
+ target: "e.swallow.content";
+ after: "show-default-1";
+ }
+ program { name: "show-angle-0";
+ signal: "e,state,window,angle,0";
+ source: "e";
+ action: STATE_SET "default" 0.0;
+ target: "clipper";
+ target: "shower";
+ after: "show-default-1";
+ }
+ program { name: "show-angle-90";
+ signal: "e,state,window,angle,90";
+ source: "e";
+ action: STATE_SET "default-angle-90" 0.0;
+ target: "clipper";
+ target: "shower";
+ after: "show-default-1";
+ }
+ program { name: "show-angle-180";
+ signal: "e,state,window,angle,180";
+ source: "e";
+ action: STATE_SET "default-angle-180" 0.0;
+ target: "clipper";
+ target: "shower";
+ after: "show-default-1";
+ }
+ program { name: "show-angle-270";
+ signal: "e,state,window,angle,270";
+ source: "e";
+ action: STATE_SET "default-angle-270" 0.0;
+ target: "clipper";
+ target: "shower";
+ after: "show-default-1";
+ }
+ program { name: "show-default-1";
+ action: STATE_SET "visible" 0.0;
+ transition: LINEAR 0.2;
+ target: "clipper";
+ target: "shower";
+ target: "e.swallow.content";
+ after: "show-done";
+ }
+ program { name: "show-done";
+ action: SIGNAL_EMIT "e,action,rotation,done" "e";
+ }
+ program { name: "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: "show2_noeffect";
+ }
+ program { name: "show2_noeffect";
+ action: SIGNAL_EMIT "e,action,show,done" "e";
+ }
+/*-------------------------------------------------------------------------*/
+/* Hide Effect Program */
+/*-------------------------------------------------------------------------*/
+ program { name: "hide-default";
+ signal: "e,state,visible,off";
+ source: "e";
+ action: STATE_SET "visible" 0.0;
+ target: "clipper";
+ target: "shower";
+ target: "e.swallow.content";
+ after : "hide-effect-default";
+ }
+ program { name: "hide-effect-default";
+ action: STATE_SET "default" 0.0;
+ target: "clipper";
+ target: "shower";
+ target: "e.swallow.content";
+ transition: LINEAR 0.2;
+ after : "hide-done";
+ }
+ program { name: "hide-angle-0";
+ signal: "e,state,visible,off,angle,0";
+ source: "e";
+ action: STATE_SET "visible" 0.0;
+ target: "clipper";
+ target: "shower";
+ target: "e.swallow.content";
+ after : "hide-effect-angle-0";
+ }
+ program { name: "hide-angle-90";
+ signal: "e,state,visible,off,angle,90";
+ source: "e";
+ action: STATE_SET "visible" 0.0;
+ target: "clipper";
+ target: "shower";
+ target: "e.swallow.content";
+ after : "hide-effect-angle-90";
+ }
+ program { name: "hide-angle-180";
+ signal: "e,state,visible,off,angle,180";
+ source: "e";
+ action: STATE_SET "visible" 0.0;
+ target: "clipper";
+ target: "shower";
+ target: "e.swallow.content";
+ after : "hide-effect-angle-180";
+ }
+ program { name: "hide-angle-270";
+ signal: "e,state,visible,off,angle,270";
+ source: "e";
+ action: STATE_SET "visible" 0.0;
+ target: "clipper";
+ target: "shower";
+ target: "e.swallow.content";
+ after : "hide-effect-angle-270";
+ }
+ program { name: "hide-effect-angle-0";
+ action: STATE_SET "default" 0.0;
+ target: "clipper";
+ target: "shower";
+ target: "e.swallow.content";
+ transition: LINEAR 0.2;
+ after: "hide-done";
+ }
+ program { name: "hide-effect-angle-90";
+ action: STATE_SET "default-angle-90" 0.0;
+ target: "clipper";
+ target: "shower";
+ target: "e.swallow.content";
+ transition: LINEAR 0.2;
+ after : "hide-done";
+ }
+ program { name: "hide-effect-angle-180";
+ action: STATE_SET "default-angle-180" 0.0;
+ target: "clipper";
+ target: "shower";
+ target: "e.swallow.content";
+ transition: LINEAR 0.2;
+ after : "hide-done";
+ }
+ program { name: "hide-effect-angle-270";
+ action: STATE_SET "default-angle-270" 0.0;
+ target: "clipper";
+ target: "shower";
+ target: "e.swallow.content";
+ transition: LINEAR 0.2;
+ after : "hide-done";
+ }
+ program { name: "hide_noeffect";
+ signal: "e,state,visible,off,noeffect";
+ source: "e";
+ action: STATE_SET "default" 0.0;
+ target: "clipper";
+ target: "shower";
+ after: "hide-done";
+ }
+ program { name: "hide-done";
+ action: SIGNAL_EMIT "e,action,hide,done" "e";
+ }
+/*-------------------------------------------------------------------------*/
+/* STACKING Effect Program */
+/*-------------------------------------------------------------------------*/
+ program { name: "raise_above_show1";
+ signal: "e,state,raise_above,on";
+ source: "e";
+ action: STATE_SET "visible" 0.0;
+ target: "clipper";
+ target: "shower";
+ target: "e.swallow.content";
+ after: "raise_above_show2";
+ }
+ program { name: "raise_above_show2";
+ action: SIGNAL_EMIT "e,action,raise_above_show,done" "e";
+ }
+ program { name: "raise_above_hide1";
+ signal: "e,state,raise_above,off";
+ source: "e";
+ action: STATE_SET "default" 0.0;
+ target: "clipper";
+ target: "shower";
+ after: "raise_above_hide2";
+ }
+ program { name: "raise_above_hide2";
+ action: SIGNAL_EMIT "e,action,raise_above_hide,done" "e";
+ }
+ }
+} /* end of group "keyboard" */
--- /dev/null
+/*-----------------------------------------------------*/
+/* 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" */
--- /dev/null
+/*-----------------------------------------------------*/
+/* 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" */
--- /dev/null
+/*-----------------------------------------------------*/
+/* group "quickpanel" */
+/*-----------------------------------------------------*/
+group { name: "quickpanel";
+ images {
+ image: "comp-sh1.png" COMP;
+ image: "bt_glow.png" COMP;
+ }
+ parts {
+ part { name: "clipper";
+ type: RECT;
+ 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;
+ 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";
+
+ 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 "quickpanel" */
--- /dev/null
+/*-----------------------------------------------------*/
+/* 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" */
--- /dev/null
+/*-----------------------------------------------------*/
+/* 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;
+ }
+ description { state: "hide" 0.0;
+ inherit: "default" 0.0;
+ }
+ }
+
+ part { name: "shower";
+ type: RECT;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ visible: 0;
+ rel1.relative: 0.25 0.25;
+ rel1.offset: 0 0;
+ rel2.relative: 0.75 0.75;
+ }
+ 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;
+ }
+ description { state: "hide" 0.0;
+ inherit: "default" 0.0;
+ rel1.relative: 0.15 0.15;
+ rel1.offset: 0 0;
+ rel2.relative: 0.85 0.85;
+ }
+ }
+ 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;
+ 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.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 "hide" 0.0;
+ transition: DECELERATE 0.4;
+ target: "clipper";
+ target: "shower";
+ after: "hide3";
+ }
+ program { name: "hide3";
+ action: STATE_SET "default" 0.0;
+ target: "clipper";
+ target: "shower";
+ after: "hide4";
+ }
+ program { name: "hide4";
+ action: SIGNAL_EMIT "e,action,hide,done" "e";
+ }
+ program { name: "raise_above_show1";
+ signal: "e,state,raise_above,on";;
+ source: "e";
+ action: STATE_SET "default" 0.0;
+ target: "clipper";
+ target: "shower";
+ target: "e.swallow.content";
+ after: "raise_above_show2";
+ }
+ // app launching effect
+ program { name: "raise_above_show2";
+ action: STATE_SET "visible" 0.0;
+ transition: DECELERATE 0.3;
+ target: "clipper";
+ target: "shower";
+ target: "e.swallow.content";
+ after: "raise_above_show3";
+ }
+ program { name: "raise_above_show3";
+ action: SIGNAL_EMIT "e,action,raise_above_show,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.32;
+ target: "clipper";
+ target: "shower";
+ after: "raise_above_hide3";
+ }
+ program { name: "raise_above_hide3";
+ action: STATE_SET "default" 0.0;
+ transition: LINEAR 0.2;
+ 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.166;
+ target: "shower";
+ after : "raise_above3_3";
+ }
+ program { name: "raise_above3_3";
+ action : STATE_SET "indicator_raise_above" 0.1;
+ transition: LINEAR 0.1328;
+ target: "shower";
+ after : "raise_above3_4";
+ }
+ program { name: "raise_above3_4";
+ action : STATE_SET "indicator_raise_above" 0.0;
+ transition: SINUSOIDAL 0.166;
+ 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.2656;
+ 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.0415;
+ target: "shower";
+ target: "clipper";
+ target: "e.swallow.content";
+ after: "hide_background3";
+ }
+ program { name: "hide_background3";
+ action: STATE_SET "visible" 0.0;
+ transition: DECELERATE 0.2075;
+ 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.4565;
+ 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" */
--- /dev/null
+/*-----------------------------------------------------*/
+/* 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: "shadow";
+ mouse_events: 0;
+ clip_to: "clipper";
+ description { state: "default" 0.0;
+ image {
+ normal: "comp-sh1.png";
+ border: 12 12 12 12;
+ middle: 0;
+ }
+ fill.smooth: 0;
+ rel1 {
+ to: "e.swallow.content";
+ relative: 0.0 0.0;
+ offset: -12 -12;
+ }
+ rel2 {
+ to: "e.swallow.content";
+ relative: 1.0 1.0;
+ offset: 11 11;
+ }
+ }
+ description { state: "hidden" 0.0;
+ inherit: "default" 0.0;
+ visible: 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.bgcontent";
+ type: SWALLOW;
+ clip_to: "clipper";
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ rel1.to: "shower";
+ rel1.relative: 0.0 0.0;
+ rel2.to: "shower";
+ rel2.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";
+ rel1.relative: 0.0 0.0;
+ rel2.to: "shower";
+ rel2.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";
+ rel1.relative: 0.0 0.0;
+ rel2.to: "shower";
+ rel2.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";
+ rel1.relative: 0.0 0.0;
+ rel2.to: "shower";
+ rel2.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";
+ rel1.relative: 0.0 0.0;
+ rel2.to: "shower";
+ rel2.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";
+ rel1.relative: 0.0 0.0;
+ rel2.to: "shower";
+ rel2.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";
+ rel1.relative: 0.0 0.0;
+ rel2.to: "shower";
+ rel2.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 0.0;
+ rel2.relative: 1.0 1.0;
+ }
+ description { state: "default" 0.5;
+ inherit: "visible" 1.0;
+ rel1.relative: 0.0 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"
+ /*-------------------------------------------------------------------*/
+ }
+ 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: "shadow-on";
+ signal: "e,state,shadow,on";
+ source: "e";
+ action: STATE_SET "default" 0.0;
+ target: "shadow";
+ }
+ program { name: "shadow-off";
+ signal: "e,state,shadow,off";
+ source: "e";
+ action: STATE_SET "hidden" 0.0;
+ target: "shadow";
+ }
+ 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";
+ target: "e.swallow.bgcontent";
+ after: "show2";
+ }
+ program { name: "show2";
+ action: STATE_SET "interval" 0.0;
+ target: "clipper";
+ target: "shower";
+ target: "persp";
+ target: "e.swallow.content";
+ target: "e.swallow.bgcontent";
+ 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";
+ target: "e.swallow.bgcontent";
+ 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";
+ target: "e.swallow.bgcontent";
+ after: "hide2";
+ }
+ program { name: "hide2";
+ action: STATE_SET "interval" 0.0;
+ target: "clipper";
+ target: "shower";
+ target: "persp";
+ target: "e.swallow.content";
+ target: "e.swallow.bgcontent";
+ 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";
+ target: "e.swallow.bgcontent";
+ 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";
+ target: "e.swallow.bgcontent";
+ 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";
+ target: "e.swallow.bgcontent";
+ 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";
+ target: "e.swallow.bgcontent";
+ 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";
+ target: "e.swallow.bgcontent";
+ }
+ 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";
+ target: "e.swallow.bgcontent";
+ after: "switcher_on2";
+ }
+ program { name: "switcher_on2";
+ action: STATE_SET "switcher" 0.0;
+ target: "clipper";
+ target: "shower";
+ target: "persp";
+ target: "e.swallow.content";
+ target: "e.swallow.bgcontent";
+ after: "switcher_on3";
+ }
+ program { name: "switcher_on3";
+ action: STATE_SET "switcher2" 0.0;
+ target: "e.swallow.content";
+ target: "e.swallow.bgcontent";
+ 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";
+ target: "e.swallow.bgcontent";
+ 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";
+ target: "e.swallow.bgcontent";
+ 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";
+ target: "e.swallow.bgcontent";
+ 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";
+ target: "e.swallow.bgcontent";
+ 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";
+ target: "e.swallow.bgcontent";
+ after: "show2_noeffect";
+ }
+ program { name: "show2_noeffect";
+ action: STATE_SET "visible" 0.0;
+ target: "clipper";
+ target: "shower";
+ target: "persp";
+ target: "e.swallow.content";
+ target: "e.swallow.bgcontent";
+ 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";
+ target: "e.swallow.bgcontent";
+ after: "hide2_noeffect";
+ }
+ program { name: "hide2_noeffect";
+ action: STATE_SET "hide" 0.0;
+ target: "clipper";
+ target: "shower";
+ target: "persp";
+ target: "e.swallow.content";
+ target: "e.swallow.bgcontent";
+ 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";
+ target: "e.swallow.bgcontent";
+ 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";
+ target: "e.swallow.bgcontent";
+ 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";
+ target: "e.swallow.bgcontent";
+ after: "show_background4";
+ }
+ program { name: "show_background4";
+ action: STATE_SET "foreground" 0.0;
+ target: "clipper";
+ target: "shower";
+ target: "e.swallow.content";
+ target: "e.swallow.bgcontent";
+ 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";
+ target: "e.swallow.bgcontent";
+ after: "hide_background2";
+ }
+ program { name: "hide_background2";
+ action: STATE_SET "background" 0.0;
+ target: "clipper";
+ target: "shower";
+ target: "e.swallow.content";
+ target: "e.swallow.bgcontent";
+ 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";
+ target: "e.swallow.bgcontent";
+ 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";
+ target: "e.swallow.bgcontent";
+ after: "show2_custom0";
+ }
+ program { name: "show2_custom0";
+ action: STATE_SET "visible" 0.0;
+ target: "clipper";
+ target: "shower";
+ target: "persp";
+ target: "e.swallow.content";
+ target: "e.swallow.bgcontent";
+ 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";
+ target: "e.swallow.bgcontent";
+ after: "hide2_custom0";
+ }
+ program { name: "hide2_custom0";
+ action: STATE_SET "hide" 0.0;
+ target: "clipper";
+ target: "shower";
+ target: "persp";
+ target: "e.swallow.content";
+ target: "e.swallow.bgcontent";
+ 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";
+ target: "e.swallow.bgcontent";
+ after: "show2_custom1";
+ }
+ program { name: "show2_custom1";
+ action: STATE_SET "visible" 0.0;
+ target: "clipper";
+ target: "shower";
+ target: "persp";
+ target: "e.swallow.content";
+ target: "e.swallow.bgcontent";
+ 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";
+ target: "e.swallow.bgcontent";
+ after: "hide2_custom1";
+ }
+ program { name: "hide2_custom1";
+ action: STATE_SET "hide" 0.0;
+ target: "clipper";
+ target: "shower";
+ target: "persp";
+ target: "e.swallow.content";
+ target: "e.swallow.bgcontent";
+ 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";
+ target: "e.swallow.bgcontent";
+ 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";
+ target: "e.swallow.bgcontent";
+ after: "fake_show_background3";
+ }
+ program { name: "fake_show_background3";
+ action: STATE_SET "foreground" 0.0;
+ target: "clipper";
+ target: "shower";
+ target: "e.swallow.content";
+ target: "e.swallow.bgcontent";
+ 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";
+ target: "e.swallow.bgcontent";
+ after: "fake_hide_background2";
+ }
+ program { name: "fake_hide_background2";
+ action: STATE_SET "background" 0.0;
+ target: "clipper";
+ target: "shower";
+ target: "e.swallow.content";
+ target: "e.swallow.bgcontent";
+ 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";
+ target: "e.swallow.bgcontent";
+ 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" */
--- /dev/null
+/*-----------------------------------------------------*/
+/* 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;
+ }
+ description { state: "background" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ color: 180 180 180 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: "background" 0.0;
+ inherit: "default" 0.0;
+ rel1.relative: 0.1 0.1;
+ rel2.relative: 0.9 0.9;
+ }
+ 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";
+ }
+ /*-------------------------------------------------------------------
+ * 0.3 0.1
+ *-------------------------------------------------------------------
+ * visible --> background --> background --> visible
+ *-------------------------------------------------------------------
+ * clipper
+ * shower
+ *-------------------------------------------------------------------
+ */
+ program { name: "show_background1";
+ signal: "e,state,background,visible,on";
+ source: "e";
+ action: STATE_SET "visible" 0.0;
+ target: "clipper";
+ target: "shower";
+ after: "show_background2";
+ }
+ program { name: "show_background2";
+ action: STATE_SET "background" 0.0;
+ transition: LINEAR 0.3;
+ target: "clipper";
+ target: "shower";
+ after: "show_background3";
+ }
+ program { name: "show_background3";
+ action: STATE_SET "background" 0.0;
+ transition: LINEAR 0.1;
+ target: "clipper";
+ target: "shower";
+ after: "show_background4";
+ }
+ program { name: "show_background4";
+ action: STATE_SET "visible" 0.0;
+ target: "clipper";
+ target: "shower";
+ 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";
+ 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" */
--- /dev/null
+/*-----------------------------------------------------*/\r
+/* group "wnd_rot_prev_pixmap" */\r
+/*-----------------------------------------------------*/\r
+group { name: "wnd_rot_prev_pixmap";\r
+ #include "../common/comp-script.edc"\r
+ parts {\r
+ part { name: "clipper";\r
+ type: RECT;\r
+ mouse_events: 0;\r
+ description { state: "default" 0.0;\r
+ visible: 0;\r
+ color: 0 0 0 0;\r
+ rel1.relative: -1.0 -1.0;\r
+ rel1.offset: -9999 -9999;\r
+ rel2.relative: 2.0 2.0;\r
+ rel2.offset: 9999 9999;\r
+ }\r
+ description { state: "visible" 0.0;\r
+ inherit: "default" 0.0;\r
+ visible: 0;\r
+ color: 255 255 255 255;\r
+ }\r
+ description { state: "hide" 0.0;\r
+ inherit: "default" 0.0;\r
+ visible: 0;\r
+ color: 255 255 255 128;\r
+ }\r
+ } /* end of part "clipper" */\r
+ part { name: "persp";\r
+ type: RECT;\r
+ description { state: "default" 0.0;\r
+ min: 1 1;\r
+ max: 1 1;\r
+ visible: 0;\r
+ perspective.zplane: 0;\r
+ perspective.focal: 1000;\r
+ }\r
+ description { state: "visible" 0.0;\r
+ inherit: "default" 0.0;\r
+ perspective.zplane: 0;\r
+ }\r
+ description { state: "hide" 0.0;\r
+ inherit: "default" 0.0;\r
+ perspective.zplane: 0;\r
+ }\r
+ } /* end of part "persp" */\r
+ part { name: "shower";\r
+ type: RECT;\r
+ mouse_events: 0;\r
+ description { state: "default" 0.0;\r
+ visible: 0;\r
+ rel1.relative: 0.0 0.0;\r
+ rel2.relative: 1.0 1.0;\r
+ }\r
+ } /* end of part "shower" */\r
+ part { name: "e.swallow.content";\r
+ type: SWALLOW;\r
+ clip_to: "clipper";\r
+ mouse_events: 0;\r
+ description { state: "default" 0.0;\r
+ rel1.to: "shower";\r
+ rel2.to: "shower";\r
+ map {\r
+ on: 1;\r
+ smooth: 1;\r
+ backface_cull: 0;\r
+ perspective_on: 1;\r
+ alpha: 1;\r
+ perspective: "persp";\r
+ rotation.x: 0.0;\r
+ rotation.y: 0.0;\r
+ rotation.z: 0.0;\r
+ }\r
+ }\r
+ description { state: "visible" 0.0;\r
+ inherit: "default" 0.0;\r
+ map.rotation.z: 0.0;\r
+ }\r
+ description { state: "visible-rot--270" 0.0;\r
+ inherit: "default" 0.0;\r
+ map.perspective: "persp";\r
+ map.rotation.z: -270.0;\r
+ }\r
+ description { state: "visible-rot--180" 0.0;\r
+ inherit: "default" 0.0;\r
+ map.perspective: "persp";\r
+#if USE_ORI\r
+ map.rotation.z: -180.0;\r
+#else\r
+ map.rotation.z: -45.0;\r
+#endif\r
+ }\r
+ description { state: "visible-rot--90" 0.0;\r
+ inherit: "default" 0.0;\r
+ map.perspective: "persp";\r
+#if USE_ORI\r
+ map.rotation.z: -90.0;\r
+#else\r
+ map.rotation.z: -22.0;\r
+#endif\r
+ rel1.offset: 160 -160;\r
+ rel2.offset: 160 -160;\r
+ }\r
+ description { state: "visible-rot-0" 0.0;\r
+ inherit: "default" 0.0;\r
+ map.perspective: "persp";\r
+ map.rotation.z: 0.0;\r
+ }\r
+ description { state: "visible-rot-90" 0.0;\r
+ inherit: "default" 0.0;\r
+ map.perspective: "persp";\r
+#if USE_ORI\r
+ map.rotation.z: 90.0;\r
+#else\r
+ map.rotation.z: 22.0;\r
+#endif\r
+ rel1.offset: -160 -160;\r
+ rel2.offset: -160 -160;\r
+ }\r
+ description { state: "visible-rot-180" 0.0;\r
+ inherit: "default" 0.0;\r
+ map.perspective: "persp";\r
+#if USE_ORI\r
+ map.rotation.z: 180.0;\r
+#else\r
+ map.rotation.z: 45.0;\r
+#endif\r
+ }\r
+ description { state: "visible-rot-270" 0.0;\r
+ inherit: "default" 0.0;\r
+ map.perspective: "persp";\r
+ map.rotation.z: 270.0;\r
+ }\r
+ } /* end of part "swallow" */\r
+ #include "../common/comp-part-logger.edc"\r
+ } /* end of parts */\r
+ programs {\r
+ // ------------------------------------------------\r
+ program { name: "prog-clipper-show";\r
+ signal: "e,state,visible,on";\r
+ source: "e";\r
+ action: STATE_SET "default" 0.0;\r
+ target: "clipper";\r
+ after: "prog-clipper-show-done";\r
+ }\r
+ program { name: "prog-clipper-show-done";\r
+ action: STATE_SET "visible" 0.0;\r
+ target: "clipper";\r
+ }\r
+ program { name: "prog-clipper-hide";\r
+ signal: "e,state,visible,off";\r
+ source: "*";\r
+ action: STATE_SET "visible" 0.0;\r
+ target: "clipper";\r
+ target: "persp";\r
+ after: "prog-clipper-hide-done";\r
+ }\r
+ program { name: "prog-clipper-hide-done";\r
+ action: STATE_SET "hide" 0.0;\r
+ transition: DURATION_WND_ROT_PREV_PIXMAP_CLIPPER_HIDE;\r
+ target: "clipper";\r
+ target: "persp";\r
+ }\r
+ // ------------------------------------------------\r
+ program { name: "prog-emit-show-done";\r
+ action: SIGNAL_EMIT "e,action,show,done" "e";\r
+ }\r
+ program { name: "prog-emit-window-rotation-done";\r
+ action: SIGNAL_EMIT "e,action,window,rotation,done" "e";\r
+ }\r
+ program { name: "prog-swallow-show";\r
+ signal: "e,state,visible,on";\r
+ source: "e";\r
+ action: STATE_SET "default" 0.0;\r
+ target: "e.swallow.content";\r
+ after: "prog-swallow-show-done";\r
+ }\r
+ program { name: "prog-swallow-show-done";\r
+ action: STATE_SET "visible" 0.0;\r
+ target: "e.swallow.content";\r
+ after: "prog-emit-show-done";\r
+ }\r
+ program { name: "prog-swallow-show-rotation-180";\r
+ signal: "e,state,visible,on";\r
+ source: "e.rot.180";\r
+ action: STATE_SET "default" 0.0;\r
+ target: "e.swallow.content";\r
+ after: "prog-swallow-show-rotation-180-done";\r
+ }\r
+ program { name: "prog-swallow-show-rotation-180-done";\r
+ action: STATE_SET "visible-rot-180" 0.0;\r
+ target: "e.swallow.content";\r
+ after: "prog-emit-show-done";\r
+ }\r
+ // ------------------------------------------------\r
+ program { name: "prog-swallow-hide-rotation--270";\r
+ signal: "e,state,visible,off";\r
+ source: "e.rot.-270";\r
+ action: STATE_SET "visible" 0.0;\r
+ target: "e.swallow.content";\r
+ after: "prog-swallow-hide-rotation--270-done";\r
+ }\r
+ program { name: "prog-swallow-hide-rotation--270-done";\r
+ action: STATE_SET "visible-rot--270" 0.0;\r
+ transition: DURATION_WND_ROT_PREV_PIXMAP_SWALLOW_HIDE;\r
+ target: "e.swallow.content";\r
+ after: "prog-emit-window-rotation-done";\r
+ }\r
+ program { name: "prog-swallow-hide-rotation--180";\r
+ signal: "e,state,visible,off";\r
+ source: "e.rot.-180";\r
+ action: STATE_SET "visible" 0.0;\r
+ target: "e.swallow.content";\r
+ after: "prog-swallow-hide-rotation--180-done";\r
+ }\r
+ program { name: "prog-swallow-hide-rotation--180-done";\r
+ action: STATE_SET "visible-rot--180" 0.0;\r
+ transition: DURATION_WND_ROT_PREV_PIXMAP_SWALLOW_HIDE;\r
+ target: "e.swallow.content";\r
+ after: "prog-emit-window-rotation-done";\r
+ }\r
+ program { name: "prog-swallow-hide-rotation--90";\r
+ signal: "e,state,visible,off";\r
+ source: "e.rot.-90";\r
+ action: STATE_SET "visible" 0.0;\r
+ target: "e.swallow.content";\r
+ after: "prog-swallow-hide-rotation--90-done";\r
+ }\r
+ program { name: "prog-swallow-hide-rotation--90-done";\r
+ action: STATE_SET "visible-rot--90" 0.0;\r
+ transition: DURATION_WND_ROT_PREV_PIXMAP_SWALLOW_HIDE;\r
+ target: "e.swallow.content";\r
+ after: "prog-emit-window-rotation-done";\r
+ }\r
+\r
+ program { name: "prog-swallow-hide-rotation-0";\r
+ signal: "e,state,visible,off";\r
+ source: "e.rot.0";\r
+ action: STATE_SET "visible" 0.0;\r
+ target: "e.swallow.content";\r
+ after: "prog-swallow-hide-rotation-0-done";\r
+ }\r
+ program { name: "prog-swallow-hide-rotation-0-done";\r
+ action: STATE_SET "visible-rot-0" 0.0;\r
+ transition: DURATION_WND_ROT_PREV_PIXMAP_SWALLOW_HIDE;\r
+ target: "e.swallow.content";\r
+ after: "prog-emit-window-rotation-done";\r
+ }\r
+ program { name: "prog-swallow-hide-rotation-90";\r
+ signal: "e,state,visible,off";\r
+ source: "e.rot.90";\r
+ action: STATE_SET "visible" 0.0;\r
+ target: "e.swallow.content";\r
+ after: "prog-swallow-hide-rotation-90-done";\r
+ }\r
+ program { name: "prog-swallow-hide-rotation-90-done";\r
+ action: STATE_SET "visible-rot-90" 0.0;\r
+ transition: DURATION_WND_ROT_PREV_PIXMAP_SWALLOW_HIDE;\r
+ target: "e.swallow.content";\r
+ after: "prog-emit-window-rotation-done";\r
+ }\r
+ program { name: "prog-swallow-hide-rotation-180";\r
+ signal: "e,state,visible,off";\r
+ source: "e.rot.180";\r
+ action: STATE_SET "visible" 0.0;\r
+ target: "e.swallow.content";\r
+ after: "prog-swallow-hide-rotation-180-done";\r
+ }\r
+ program { name: "prog-swallow-hide-rotation-180-done";\r
+ action: STATE_SET "visible-rot-180" 0.0;\r
+ transition: DURATION_WND_ROT_PREV_PIXMAP_SWALLOW_HIDE;\r
+ target: "e.swallow.content";\r
+ after: "prog-emit-window-rotation-done";\r
+ }\r
+ program { name: "prog-swallow-hide-rotation-270";\r
+ signal: "e,state,visible,off";\r
+ source: "e.rot.270";\r
+ action: STATE_SET "visible" 0.0;\r
+ target: "e.swallow.content";\r
+ after: "prog-swallow-hide-rotation-270-done";\r
+ }\r
+ program { name: "prog-swallow-hide-rotation-270-done";\r
+ action: STATE_SET "visible-rot-270" 0.0;\r
+ transition: DURATION_WND_ROT_PREV_PIXMAP_SWALLOW_HIDE;\r
+ target: "e.swallow.content";\r
+ after: "prog-emit-window-rotation-done";\r
+ }\r
+ // ------------------------------------------------\r
+ } /* end of programs */\r
+} /* end of group "wnd_rot_prev_pixmap" */\r
--- /dev/null
+#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 "app_tray" */
+ /*-----------------------------------------------------*/
+ #include "group/app_tray.edc"
+
+ /*-----------------------------------------------------*/
+ /* group "quickpanel" */
+ /*-----------------------------------------------------*/
+ #include "group/quickpanel.edc"
+
+ /*-----------------------------------------------------*/
+ /* group "dialog" */
+ /*-----------------------------------------------------*/
+ #include "group/dialog.edc"
+
+ /*-----------------------------------------------------*/
+ /* group "indicator" */
+ /*-----------------------------------------------------*/
+ #include "group/indicator.edc"
+
+ /*-----------------------------------------------------*/
+ /* group "home_screen" */
+ /*-----------------------------------------------------*/
+ #include "group/home_screen.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"
+
+ /*-----------------------------------------------------*/
+ /* group "keyboard" */
+ /*-----------------------------------------------------*/
+ #include "group/keyboard.edc"
+
+} /* end of collections */
--- /dev/null
+dnl Copyright (C) 2004-2008 Kim Woelders
+dnl Copyright (C) 2008 Vincent Torri <vtorri at univ-evry dot fr>
+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 <stdlib.h>
+
+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
--- /dev/null
+# 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:
+#
+# <var>='`$ECHO "X$<var>" | $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 <bug-libtool@gnu.org>."
+
+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 <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#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<name>.so
+ # instead of lib<name>.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 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break
+ ;;
+ *)
+ test "$with_gnu_ld" != yes && break
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+else
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+ AC_MSG_RESULT($LD)
+else
+ AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+_LT_PATH_LD_GNU
+AC_SUBST([LD])
+
+_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
+])# LT_PATH_LD
+
+# Old names:
+AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
+AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_LD], [])
+dnl AC_DEFUN([AC_PROG_LD], [])
+
+
+# _LT_PATH_LD_GNU
+#- --------------
+m4_defun([_LT_PATH_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac])
+with_gnu_ld=$lt_cv_prog_gnu_ld
+])# _LT_PATH_LD_GNU
+
+
+# _LT_CMD_RELOAD
+# --------------
+# find reload flag for linker
+# -- PORTME Some linkers may need a different reload flag.
+m4_defun([_LT_CMD_RELOAD],
+[AC_CACHE_CHECK([for $LD option to reload object files],
+ lt_cv_ld_reload_flag,
+ [lt_cv_ld_reload_flag='-r'])
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+ darwin*)
+ if test "$GCC" = yes; then
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+ else
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ fi
+ ;;
+esac
+_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
+_LT_DECL([], [reload_cmds], [2])dnl
+])# _LT_CMD_RELOAD
+
+
+# _LT_CHECK_MAGIC_METHOD
+# ----------------------
+# how to check for library dependencies
+# -- PORTME fill in with the dynamic library characteristics
+m4_defun([_LT_CHECK_MAGIC_METHOD],
+[m4_require([_LT_DECL_EGREP])
+AC_CACHE_CHECK([how to recognize dependent libraries],
+lt_cv_deplibs_check_method,
+[lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix[[4-9]]*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+beos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+bsdi[[45]]*)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ ;;
+
+cygwin*)
+ # func_win32_libid is a shell function defined in ltmain.sh
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ ;;
+
+mingw* | pw32*)
+ # Base MSYS/MinGW do not provide the 'file' command needed by
+ # func_win32_libid shell function, so use a weaker test based on 'objdump',
+ # unless we find 'file', for example because we are cross-compiling.
+ if ( file / ) >/dev/null 2>&1; then
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ else
+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ fi
+ ;;
+
+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 <jrb3@best.com> 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 <jrb3@best.com> 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
+])
--- /dev/null
+# 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])])
--- /dev/null
+# 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
+])
--- /dev/null
+# 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)
+])
--- /dev/null
+# 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])])
--- /dev/null
+[Desktop Entry]
+Type=Link
+Name=Illume2
+Icon=e-module-illume2
+X-Enlightenment-ModuleType=system
+Comment=
+Comment[fr]=
+Comment[it]=
--- /dev/null
+MAINTAINERCLEANFILES = Makefile.in
+MODULE = comp-tizen
+
+#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_comp_animation.c \
+ e_mod_comp_animation.h \
+ e_mod_comp_atoms.c \
+ e_mod_comp_atoms.h \
+ e_mod_comp_bg_win.c \
+ e_mod_comp_bg_win.h \
+ e_mod_comp_cfdata.c \
+ e_mod_comp_cfdata.h \
+ e_mod_comp.c \
+ e_mod_comp.h \
+ e_mod_comp_canvas.c \
+ e_mod_comp_canvas.h \
+ e_mod_comp_debug.c \
+ e_mod_comp_debug.h \
+ e_mod_comp_effect.c \
+ e_mod_comp_effect.h \
+ e_mod_comp_effect_image_launch.c \
+ e_mod_comp_effect_image_launch.h \
+ e_mod_comp_effect_tm.c \
+ e_mod_comp_effect_tm.h \
+ e_mod_comp_effect_win_rotation.c \
+ e_mod_comp_effect_win_rotation.h \
+ e_mod_comp_hw_ov_win.c \
+ e_mod_comp_hw_ov_win.h \
+ e_mod_comp_object.c \
+ e_mod_comp_object.h \
+ e_mod_comp_policy.c \
+ e_mod_comp_policy.h \
+ e_mod_comp_screen.c \
+ e_mod_comp_screen.h \
+ e_mod_comp_shared_types.h \
+ e_mod_comp_update.c \
+ e_mod_comp_update.h \
+ e_mod_comp_util.c \
+ e_mod_comp_util.h \
+ e_mod_comp_win_type.c \
+ e_mod_comp_win_type.h \
+ e_mod_comp_win_shape_input.c \
+ e_mod_comp_win_shape_input.h \
+ e_mod_config.c \
+ e_mod_config.h \
+ e_mod_main.c \
+ e_mod_main.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)
--- /dev/null
+#include "e_mod_comp.h"
+#include "e_mod_comp_atoms.h"
+#include "e_mod_comp_debug.h"
+#ifdef USE_DLOG
+#include <dlog.h>
+#endif
+
+#define OVER_FLOW 2
+
+//////////////////////////////////////////////////////////////////////////
+//
+// 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 cache
+// 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*
+//
+//////////////////////////////////////////////////////////////////////////
+
+/* 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 functions */
+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 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 E_Comp_Win *_e_mod_comp_win_find(Ecore_X_Window win);
+static E_Comp_Win *_e_mod_comp_border_client_find(Ecore_X_Window win);
+static Eina_Bool _e_mod_comp_cb_update(E_Comp *c);
+static Eina_Bool _e_mod_comp_win_is_border(E_Comp_Win *cw);
+static void _e_mod_comp_cb_pending_after(void *data, E_Manager *man, E_Manager_Comp_Source *src);
+static E_Comp *_e_mod_comp_find(Ecore_X_Window root);
+static void _e_mod_comp_win_render_queue(E_Comp_Win *cw);
+static Evas_Object *_e_mod_comp_win_mirror_add(E_Comp_Win *cw);
+static void _e_mod_comp_cb_win_mirror_del(void *data, Evas *e, Evas_Object *obj, void *event_info);
+static void _e_mod_comp_src_hidden_set_func(void *data, E_Manager *man, E_Manager_Comp_Source *src, Eina_Bool hidden);
+static Eina_Bool _e_mod_comp_prop_window_use_dri2_get(Ecore_X_Window win);
+static Eina_Bool _e_mod_comp_prop_use_dri2(Ecore_X_Event_Window_Property *ev);
+
+///////////////////////////////////////////////////////////////////////////////////
+EINTERN Eina_Bool
+e_mod_comp_comp_event_src_visibility_send(E_Comp_Win *cw)
+{
+ E_CHECK_RETURN(cw, 0);
+ E_CHECK_RETURN(cw->c, 0);
+ E_CHECK_RETURN(cw->c->man, 0);
+
+ 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);
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_comp_win_is_border(E_Comp_Win *cw)
+{
+ E_CHECK_RETURN(cw, 0);
+ if (cw->bd) return EINA_TRUE;
+ else return EINA_FALSE;
+}
+
+EINTERN 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;
+ }
+ else
+ {
+ _comp_mod->conf->fps_show = 1;
+ }
+ e_config_save_queue();
+ EINA_LIST_FOREACH(compositors, l, c) _e_mod_comp_cb_update(c);
+ }
+}
+
+EINTERN Eina_Bool
+e_mod_comp_win_add_damage(E_Comp_Win *cw,
+ Ecore_X_Damage dmg)
+{
+ E_CHECK_RETURN(cw, 0);
+ E_CHECK_RETURN(dmg, 0);
+ return eina_hash_add(damages, e_util_winid_str_get(dmg), cw);
+}
+
+EINTERN Eina_Bool
+e_mod_comp_win_del_damage(E_Comp_Win *cw,
+ Ecore_X_Damage dmg)
+{
+ E_CHECK_RETURN(cw, 0);
+ E_CHECK_RETURN(dmg, 0);
+ return eina_hash_del(damages, e_util_winid_str_get(dmg), cw);
+}
+
+static 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;
+ E_Comp *c = (E_Comp *)data;
+
+ cw->pending_count--;
+ if (!cw->delete_pending) return;
+ if (cw->pending_count == 0)
+ {
+ E_Comp_Canvas *canvas = NULL;
+ Eina_List *l = NULL;
+ if (_comp_mod->conf->nocomp_fs && c)
+ {
+ EINA_LIST_FOREACH(c->canvases, l, canvas)
+ {
+ if (canvas->nocomp.end.cw == cw)
+ {
+ if (canvas->nocomp.end.timer)
+ {
+ ecore_timer_del(canvas->nocomp.end.timer);
+ canvas->nocomp.end.timer = NULL;
+ }
+ e_mod_comp_canvas_nocomp_dispose(canvas);
+ break;
+ }
+ }
+ }
+ free(cw);
+ }
+}
+
+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, *ll;
+ Evas_Object *o;
+ E_Comp_Object *co;
+ int i;
+
+ if (!_e_mod_comp_win_shaped_check(cw, rects, num))
+ {
+ rects = NULL;
+ }
+ EINA_LIST_FOREACH(cw->objs, l, co)
+ {
+ if (rects)
+ {
+ unsigned int *pix, *p;
+ unsigned char *spix, *sp;
+ int w, h, px, py;
+
+ evas_object_image_size_get(co->img, &w, &h);
+ if ((w > 0) && (h > 0))
+ {
+ if (co->native) return;
+ evas_object_image_native_surface_set(co->img, NULL);
+ evas_object_image_alpha_set(co->img, 1);
+ EINA_LIST_FOREACH(co->img_mirror, ll, o)
+ {
+ evas_object_image_native_surface_set(o, NULL);
+ evas_object_image_alpha_set(o, 1);
+ }
+
+ pix = evas_object_image_data_get(co->img, 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(co->img, pix);
+ evas_object_image_data_update_add(co->img, 0, 0, w, h);
+ EINA_LIST_FOREACH(co->img_mirror, ll, 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(co->img, &w, &h);
+ if ((w > 0) && (h > 0))
+ {
+ if (co->native) return;
+ evas_object_image_alpha_set(co->img, 0);
+ EINA_LIST_FOREACH(co->img_mirror, l, o)
+ {
+ evas_object_image_alpha_set(o, 1);
+ }
+ pix = evas_object_image_data_get(co->img, 1);
+ if (pix)
+ {
+ p = pix;
+ for (py = 0; py < h; py++)
+ {
+ for (px = 0; px < w; px++)
+ *p |= 0xff000000;
+ }
+ }
+ evas_object_image_data_set(co->img, pix);
+ evas_object_image_data_update_add(co->img, 0, 0, w, h);
+ EINA_LIST_FOREACH(co->img_mirror, ll, 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_update(E_Comp_Win *cw)
+{
+ E_Update_Rect *r;
+ int i;
+
+ e_mod_comp_x_grab_set(cw->c, EINA_TRUE);
+ cw->update = 0;
+
+ 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)
+ {
+ for (i = 0; i < cw->rects_num; i++)
+ {
+ E_RECTS_CLIP_TO_RECT(cw->rects[i].x,
+ cw->rects[i].y,
+ cw->rects[i].width,
+ cw->rects[i].height,
+ 0, 0, cw->w, cw->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))
+ {
+ e_mod_comp_x_grab_set(cw->c, EINA_FALSE);
+ return;
+ }
+
+ if ((!cw->pixmap) || (cw->needpix))
+ {
+ Ecore_X_Pixmap pm = 0;
+ // named pixmap of the nocomp window will be updated in
+ // nocomp_dispose function after the damage event
+ if (cw->nocomp)
+ {
+ e_mod_comp_x_grab_set(cw->c, EINA_FALSE);
+ return;
+ }
+ pm = ecore_x_composite_name_window_pixmap_get(cw->win);
+ if (pm)
+ {
+ Ecore_X_Pixmap oldpm;
+ cw->needpix = 0;
+ e_mod_comp_win_comp_objs_needxim_set(cw, 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)))
+ {
+ cw->pw = cw->w;
+ cw->ph = cw->h;
+ cw->pixmap = oldpm;
+ cw->needpix = 1;
+ ecore_x_pixmap_free(pm);
+ e_mod_comp_x_grab_set(cw->c, EINA_FALSE);
+ return;
+ }
+ if ((cw->pw > 0) && (cw->ph > 0))
+ e_mod_comp_win_comp_objs_img_resize(cw, cw->pw, cw->ph);
+ }
+ else
+ {
+ cw->pw = 0;
+ cw->ph = 0;
+ }
+ if ((cw->pw <= 0) || (cw->ph <= 0))
+ {
+ e_mod_comp_win_comp_objs_img_deinit(cw);
+ 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);
+ e_mod_comp_win_comp_objs_native_set(cw, 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) ecore_x_pixmap_free(oldpm);
+ }
+ }
+
+ if (!((cw->pw > 0) && (cw->ph > 0)))
+ {
+ e_mod_comp_x_grab_set(cw->c, EINA_FALSE);
+ 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) ||
+ ((cw->c->switcher) && (!cw->first_show_worked)) ||
+ ((cw->c->switcher) && TYPE_INDICATOR_CHECK(cw)))
+ {
+ if (!cw->move_lock)
+ e_mod_comp_win_comp_objs_move(cw, cw->x, cw->y);
+ e_mod_comp_win_comp_objs_resize(cw,
+ 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))
+ {
+ e_mod_comp_win_comp_objs_img_size_set(cw, cw->pw, cw->ph);
+ e_mod_comp_win_comp_objs_img_init(cw);
+
+ r = e_mod_comp_update_rects_get(cw->up);
+ if (r)
+ {
+ 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;
+ e_mod_comp_win_comp_objs_img_data_update_add(cw, x, y, w, h);
+ }
+ e_mod_comp_update_clear(cw->up);
+ free(r);
+ }
+ }
+ else
+ {
+ Eina_List *l, *ll;
+ E_Comp_Object *co;
+ Evas_Object *o;
+ EINA_LIST_FOREACH(cw->objs, l, co)
+ {
+ if (co->native)
+ {
+ evas_object_image_native_surface_set(co->img, NULL);
+ EINA_LIST_FOREACH(co->img_mirror, ll, o)
+ {
+ evas_object_image_native_surface_set(o, NULL);
+ }
+ co->native = 0;
+ }
+ if (co->needxim)
+ {
+ co->needxim = 0;
+ if (co->xim)
+ {
+ evas_object_image_size_set(co->img, 1, 1);
+ evas_object_image_data_set(co->img, NULL);
+ EINA_LIST_FOREACH(co->img_mirror, ll, o)
+ {
+ evas_object_image_size_set(o, 1, 1);
+ evas_object_image_data_set(o, NULL);
+ }
+ ecore_x_image_free(co->xim);
+ co->xim = NULL;
+ }
+ }
+ if (!co->xim)
+ {
+ if ((co->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_LIST_FOREACH(cw->objs, l, co)
+ {
+ if (co->xim)
+ {
+ unsigned int *pix;
+
+ pix = ecore_x_image_data_get(co->xim, NULL, NULL, NULL);
+ evas_object_image_data_set(co->img, pix);
+ evas_object_image_size_set(co->img, cw->pw, cw->ph);
+ EINA_LIST_FOREACH(co->img_mirror, ll, 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(co->xim, cw->pixmap, x, y, x, y, w, h))
+ {
+ e_mod_comp_update_add(cw->up, x, y, w, h);
+ cw->update = 1;
+ }
+ else
+ {
+ // why do we neeed these 2? this smells wrong
+ pix = ecore_x_image_data_get(co->xim, NULL, NULL, NULL);
+ evas_object_image_data_set(co->img, pix);
+ evas_object_image_data_update_add(co->img, x, y, w, h);
+ EINA_LIST_FOREACH(co->img_mirror, ll, o)
+ {
+ evas_object_image_data_set(o, pix);
+ evas_object_image_data_update_add(o, x, y, w, h);
+ }
+ }
+ }
+ }
+ }
+ free(r);
+ 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;
+ }
+ }
+
+ e_mod_comp_win_comp_objs_show(cw);
+ e_mod_comp_effect_win_rotation_handler_update(cw);
+ e_mod_comp_x_grab_set(cw->c, EINA_FALSE);
+}
+
+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)
+{
+ E_Comp_Win *cw;
+ Eina_List *l;
+ E_Comp_Canvas *canvas = NULL;
+ Eina_List *new_updates = NULL;
+ Eina_List *update_done = NULL;
+
+ c->update_job = NULL;
+
+ if (_comp_mod->conf->nocomp_fs)
+ {
+ EINA_LIST_FOREACH(c->canvases, l, canvas)
+ {
+ if (canvas->nocomp.mode != E_NOCOMP_MODE_RUN) continue;
+ cw = e_mod_comp_canvas_fullscreen_check(canvas);
+ if ((!cw) || (cw != canvas->nocomp.cw) ||
+ (canvas->nocomp.force_composite))
+ {
+ L(LT_EVENT_X,
+ "COMP|%31s|new_w:0x%08x|nocomp.cw:0x%08x canvas:%d\n",
+ "NOCOMP_END", cw ? e_mod_comp_util_client_xid_get(cw) : 0,
+ e_mod_comp_util_client_xid_get(canvas->nocomp.cw),
+ canvas->num);
+
+ e_mod_comp_canvas_nocomp_end(canvas);
+ }
+ }
+ }
+
+ e_mod_comp_x_grab_set(c, EINA_TRUE);
+
+ 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);
+ }
+
+ if (_comp_mod->conf->efl_sync)
+ {
+ EINA_LIST_FREE(update_done, cw)
+ {
+ if (!cw) continue;
+ ecore_x_sync_counter_inc(cw->counter, 1);
+ cw->sync_info.val++;
+
+ L(LT_EVENT_X,
+ "COMP|%31.31s|w:0x%08x|done:%d val:%d\n",
+ "INC", e_mod_comp_util_client_xid_get(cw),
+ cw->sync_info.done_count, cw->sync_info.val);
+ }
+ }
+ e_mod_comp_win_shape_input_update(c);
+ e_mod_comp_x_grab_set(c, EINA_FALSE);
+ 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--;
+
+ e_mod_comp_effect_signal_flush();
+
+ 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);
+ }
+}
+
+static void
+_e_mod_comp_win_render_queue(E_Comp_Win *cw)
+{
+ _e_mod_comp_render_queue(cw->c);
+}
+
+static E_Comp *
+_e_mod_comp_find(Ecore_X_Window root)
+{
+ Eina_List *l;
+ E_Comp *c;
+ 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));
+}
+
+/* wrapper function for external file */
+EINTERN E_Comp_Win *
+e_mod_comp_win_find(Ecore_X_Window win)
+{
+ return _e_mod_comp_win_find(win);
+}
+
+EINTERN E_Comp_Win *
+e_mod_comp_border_client_find(Ecore_X_Window win)
+{
+ return _e_mod_comp_border_client_find(win);
+}
+
+EINTERN E_Comp *
+e_mod_comp_find(Ecore_X_Window win)
+{
+ E_CHECK_RETURN(win, 0);
+ return _e_mod_comp_find(win);
+}
+
+EINTERN void
+e_mod_comp_render_queue(E_Comp *c)
+{
+ E_CHECK(c);
+ _e_mod_comp_render_queue(c);
+}
+
+EINTERN void
+e_mod_comp_win_render_queue(E_Comp_Win *cw)
+{
+ E_CHECK(cw);
+ _e_mod_comp_win_render_queue(cw);
+}
+
+EINTERN Eina_Bool
+e_mod_comp_win_damage_timeout(void *data)
+{
+ E_CHECK_RETURN(data, 0);
+ return _e_mod_comp_win_damage_timeout(data);
+}
+
+EINTERN Eina_Bool
+e_mod_comp_cb_update(E_Comp *c)
+{
+ E_CHECK_RETURN(c, 0);
+ return _e_mod_comp_cb_update(c);
+}
+
+EINTERN Evas_Object *
+e_mod_comp_win_mirror_add(E_Comp_Win *cw)
+{
+ E_CHECK_RETURN(cw, 0);
+ return _e_mod_comp_win_mirror_add(cw);
+}
+
+EINTERN void
+e_mod_comp_cb_win_mirror_del(void *data,
+ Evas *e,
+ Evas_Object *obj,
+ void *event_info)
+{
+ E_CHECK(data);
+ _e_mod_comp_cb_win_mirror_del(data,
+ e,
+ obj,
+ event_info);
+}
+
+EINTERN void
+e_mod_comp_src_hidden_set_func(void *data,
+ E_Manager *man,
+ E_Manager_Comp_Source *src,
+ Eina_Bool hidden)
+{
+ _e_mod_comp_src_hidden_set_func(data, man, src, hidden);
+}
+
+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;
+}
+
+static Eina_Bool
+_e_mod_comp_win_damage_timeout(void *data)
+{
+ E_Comp_Win *cw = data;
+ E_CHECK_RETURN(cw, 0);
+
+ 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 = (E_Comp_Win *)data;
+ E_CHECK(cw);
+
+ _e_mod_comp_win_render_queue(cw);
+
+ if (obj == cw->bd)
+ {
+ if (cw->counter)
+ {
+ Ecore_X_Window _w = e_mod_comp_util_client_xid_get(cw);
+ ecore_x_e_comp_sync_cancel_send(_w);
+ ecore_x_sync_counter_inc(cw->counter, 1);
+ cw->sync_info.val++;
+ }
+ if (cw->bd) eina_hash_del(borders, e_util_winid_str_get(cw->bd->client.win), cw);
+ cw->bd = NULL;
+ e_mod_comp_win_comp_objs_data_del(cw, "border");
+ }
+ else if (obj == cw->pop)
+ {
+ cw->pop = NULL;
+ e_mod_comp_win_comp_objs_data_del(cw, "popup");
+ }
+ else if (obj == cw->menu)
+ {
+ cw->menu = NULL;
+ e_mod_comp_win_comp_objs_data_del(cw, "menu");
+ }
+ if (cw->dfn)
+ {
+ e_object_delfn_del(obj, cw->dfn);
+ cw->dfn = NULL;
+ }
+}
+
+EINTERN void
+e_mod_comp_done_defer(E_Comp_Win *cw)
+{
+ E_CHECK(cw);
+ e_mod_comp_effect_disable_stage(cw->c, cw);
+ e_mod_comp_effect_animating_set(cw->c, cw, EINA_FALSE);
+
+ if (cw->defer_raise)
+ {
+ L(LT_EFFECT,
+ "[COMP] w:0x%08x force win to raise. bd:%s\n",
+ e_mod_comp_util_client_xid_get(cw),
+ cw->bd ? "O" : "X");
+
+ E_Comp_Win *_cw;
+ EINA_INLIST_FOREACH(cw->c->wins, _cw)
+ {
+ if (!_cw) continue;
+ e_mod_comp_win_comp_objs_raise(_cw);
+ Eina_Bool run = e_mod_comp_effect_win_roation_run_check(_cw->eff_winrot);
+ if (!run) continue;
+
+ Eina_List *l, *ll;
+ E_Comp_Canvas *canvas;
+ E_Comp_Object *co;
+ EINA_LIST_FOREACH(_cw->c->canvases, l, canvas)
+ {
+ if (!canvas) continue;
+ if (!canvas->use_bg_img) continue;
+ EINA_LIST_FOREACH(_cw->objs, ll, co)
+ {
+ if (!co) continue;
+ if (co->canvas == canvas)
+ {
+ evas_object_stack_below(canvas->bg_img,
+ co->shadow);
+ }
+ }
+ }
+ }
+ cw->defer_raise = EINA_FALSE;
+ e_mod_comp_effect_signal_add
+ (cw, NULL, "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_util_client_xid_get(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_util_client_xid_get(cw),
+ cw->bd ? "O" : "X");
+
+ _e_mod_comp_win_del(cw);
+ }
+ else cw->force = 0;
+
+ e_mod_comp_effect_signal_flush();
+}
+
+static void
+_e_mod_comp_show_done(void *data,
+ Evas_Object *obj,
+ const char *emission __UNUSED__,
+ const char *source __UNUSED__)
+{
+ E_Comp_Win *cw = (E_Comp_Win *)data;
+ E_CHECK(cw);
+
+#ifdef USE_DLOG
+ LOG(LOG_DEBUG, "LAUNCH",
+ "[e17:Application:Launching:done] win:0x%07x name:%s",
+ cw->bd ? cw->bd->client.win : cw->win,
+ cw->bd ? cw->bd->client.netwm.name : NULL);
+#endif
+
+ L(LT_EFFECT,
+ "[COMP] %18.18s w:0x%08x %s\n", "SIGNAL",
+ e_mod_comp_util_client_xid_get(cw),
+ "SHOW_DONE");
+
+ e_mod_comp_effect_signal_del(cw, obj, "show,done");
+
+ cw->show_done = EINA_TRUE;
+ e_mod_comp_done_defer(cw);
+}
+
+static void
+_e_mod_comp_hide_done(void *data,
+ Evas_Object *obj,
+ const char *emission __UNUSED__,
+ const char *source __UNUSED__)
+{
+ E_Comp_Win *cw = (E_Comp_Win *)data;
+ E_CHECK(cw);
+
+ L(LT_EFFECT,
+ "[COMP] %18.18s w:0x%08x %s\n", "SIGNAL",
+ e_mod_comp_util_client_xid_get(cw),
+ "HIDE_DONE");
+
+ e_mod_comp_effect_signal_del(cw, obj, "hide,done");
+
+ cw->show_done = EINA_FALSE;
+ e_mod_comp_done_defer(cw);
+}
+
+static void
+_e_mod_comp_raise_above_show_done(void *data,
+ Evas_Object *obj,
+ const char *emission __UNUSED__,
+ const char *source __UNUSED__)
+{
+ E_Comp_Win *cw = data;
+ E_CHECK(cw);
+
+ L(LT_EFFECT,
+ "[COMP] %18.18s w:0x%08x %s\n", "SIGNAL",
+ e_mod_comp_util_client_xid_get(cw),
+ "RAISE_SHOW_DONE");
+
+ e_mod_comp_effect_signal_del(cw, obj, "raise,show,done");
+
+ e_mod_comp_done_defer(cw);
+}
+
+static void
+_e_mod_comp_raise_above_hide_done(void *data,
+ Evas_Object *obj,
+ const char *emission __UNUSED__,
+ const char *source __UNUSED__)
+{
+ E_Comp_Win *cw = data;
+ E_CHECK(cw);
+
+ L(LT_EFFECT,
+ "[COMP] %18.18s w:0x%08x %s\n", "SIGNAL",
+ e_mod_comp_util_client_xid_get(cw),
+ "RAISE_HIDE_DONE");
+
+ e_mod_comp_effect_signal_del(cw, obj, "raise,hide,done");
+
+ e_mod_comp_done_defer(cw);
+}
+
+static void
+_e_mod_comp_background_show_done(void *data,
+ Evas_Object *obj,
+ const char *emission __UNUSED__,
+ const char *source __UNUSED__)
+{
+ E_Comp_Win *cw = data;
+ E_CHECK(cw);
+
+ L(LT_EFFECT,
+ "[COMP] %18.18s w:0x%08x %s\n", "SIGNAL",
+ e_mod_comp_util_client_xid_get(cw),
+ "BG_SHOW_DONE");
+
+ e_mod_comp_effect_signal_del(cw, obj, "bg,show,done");
+
+ e_mod_comp_done_defer(cw);
+}
+
+static void
+_e_mod_comp_background_hide_done(void *data,
+ Evas_Object *obj,
+ const char *emission __UNUSED__,
+ const char *source __UNUSED__)
+{
+ E_Comp_Win *cw = data;
+ E_CHECK(cw);
+
+ L(LT_EFFECT,
+ "[COMP] %18.18s w:0x%08x %s\n", "SIGNAL",
+ e_mod_comp_util_client_xid_get(cw),
+ "BG_HIDE_DONE");
+
+ e_mod_comp_effect_signal_del(cw, obj, "bg,hide,done");
+
+ e_mod_comp_done_defer(cw);
+}
+
+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);
+ cw->sync_info.val++;
+ return;
+ }
+ }
+
+ ecore_x_e_comp_sync_begin_send(win);
+ ecore_x_sync_counter_inc(cw->counter, 1);
+ cw->sync_info.val++;
+ }
+}
+
+EINTERN void
+e_mod_comp_win_shadow_setup(E_Comp_Win *cw,
+ E_Comp_Object *co)
+{
+ Evas_Object *o;
+ int ok = 0;
+ char buf[PATH_MAX];
+ Eina_List *l;
+
+ evas_object_image_smooth_scale_set(co->img, _comp_mod->conf->smooth_windows);
+ EINA_LIST_FOREACH(co->img_mirror, l, o)
+ {
+ evas_object_image_smooth_scale_set(o, _comp_mod->conf->smooth_windows);
+ }
+
+ if (_comp_mod->conf->shadow_file)
+ ok = edje_object_file_set
+ (co->shadow, _comp_mod->conf->shadow_file,
+ e_mod_comp_policy_win_shadow_group_get(cw));
+
+ if (!ok)
+ {
+ fprintf(stdout, "[E17-comp] EDC file ERROR win:0x%08x %s(%d) f:%s\n",
+ cw->win, __func__, __LINE__, _comp_mod->conf->shadow_file);
+ e_mod_comp_debug_edje_error_get
+ (co->shadow, e_mod_comp_util_client_xid_get(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(co->shadow,
+ "base/theme/borders",
+ buf);
+ }
+ if (!ok)
+ {
+ ok = e_theme_edje_object_set(co->shadow,
+ "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 file ERROR win:0x%08x %s(%d)\n",
+ cw->win, __func__, __LINE__);
+ e_mod_comp_debug_edje_error_get
+ (co->shadow, e_mod_comp_util_client_xid_get(cw));
+ snprintf(buf, sizeof(buf), "%s/shadow.edj",
+ e_module_dir_get(_comp_mod->module));
+ ok = edje_object_file_set(co->shadow, buf, "shadow");
+ }
+ if (!edje_object_part_swallow(co->shadow,
+ "e.swallow.content",
+ co->img))
+ {
+ fprintf(stdout, "[E17-comp] EDC swallow ERROR win:0x%08x %s(%d)\n",
+ cw->win, __func__, __LINE__);
+ }
+
+ e_mod_comp_debug_edje_error_get
+ (co->shadow, e_mod_comp_util_client_xid_get(cw));
+
+ e_mod_comp_effect_signal_add
+ (cw, NULL, "e,state,shadow,off", "e");
+
+ if (cw->bd)
+ {
+ if (cw->bd->focused)
+ e_mod_comp_effect_signal_add
+ (cw, NULL, "e,state,focus,on", "e");
+ if (cw->bd->client.icccm.urgent)
+ e_mod_comp_effect_signal_add
+ (cw, NULL, "e,state,urgent,on", "e");
+ }
+}
+
+static void
+_e_mod_comp_cb_win_mirror_del(void *data,
+ Evas *e,
+ Evas_Object *obj,
+ void *event_info __UNUSED__)
+{
+ E_Comp_Win *cw = (E_Comp_Win *)data;
+ E_Comp_Object *co;
+ Eina_List *l;
+ E_CHECK(cw);
+
+ EINA_LIST_FOREACH(cw->objs, l, co)
+ {
+ if (co->canvas->evas == e)
+ {
+ co->img_mirror = eina_list_remove(co->img_mirror, obj);
+ break;
+ }
+ }
+}
+
+static Evas_Object *
+_e_mod_comp_win_mirror_add(E_Comp_Win *cw)
+{
+ Evas_Object *o;
+ Eina_List *l;
+ E_Comp_Object *co;
+ E_Zone *z;
+
+ E_CHECK_RETURN(cw->c, 0);
+
+ if (cw->bd) z = cw->bd->zone;
+ else z = e_util_zone_current_get(cw->c->man);
+ EINA_LIST_FOREACH(cw->objs, l, co)
+ {
+ if ((_comp_mod->conf->canvas_per_zone) &&
+ ((co->zone) != (z)))
+ continue;
+
+ o = evas_object_image_filled_add(co->canvas->evas);
+ evas_object_image_colorspace_set(o, EVAS_COLORSPACE_ARGB8888);
+ co->img_mirror = eina_list_append(co->img_mirror, o);
+ evas_object_image_smooth_scale_set(o, _comp_mod->conf->smooth_windows);
+
+ evas_object_event_callback_add(o, EVAS_CALLBACK_DEL,
+ _e_mod_comp_cb_win_mirror_del, cw);
+
+ if ((cw->pixmap) && (cw->pw > 0) && (cw->ph > 0))
+ {
+ unsigned int *pix;
+ Eina_Bool alpha;
+ int w, h;
+
+ alpha = evas_object_image_alpha_get(co->img);
+ evas_object_image_size_get(co->img, &w, &h);
+
+ evas_object_image_alpha_set(o, alpha);
+
+ if (cw->shaped)
+ {
+ pix = evas_object_image_data_get(co->img, 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 (co->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
+ {
+ if (!co->xim)
+ {
+ evas_object_del(o);
+ return NULL;
+ }
+ pix = ecore_x_image_data_get(co->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);
+ }
+ evas_object_stack_above(o, co->shadow);
+ return o;
+ }
+ return NULL;
+}
+
+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;
+ Eina_List *l;
+ E_Comp_Object *co;
+
+ cw = E_NEW(E_Comp_Win, 1);
+ E_CHECK_RETURN(cw, 0);
+ cw->win = win;
+ cw->c = c;
+ cw->opacity = 255.0;
+ cw->bd = e_border_find_by_window(cw->win);
+ e_mod_comp_x_grab_set(c, EINA_TRUE);
+ 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);
+ }
+ else if ((cw->pop = e_popup_find_by_window(cw->win)))
+ {
+ cw->dfn = e_object_delfn_add(E_OBJECT(cw->pop),
+ _e_mod_comp_object_del, cw);
+ cw->show_ready = 1;
+ }
+ else if ((cw->menu = e_menu_find_by_window(cw->win)))
+ {
+ cw->dfn = e_object_delfn_add(E_OBJECT(cw->menu),
+ _e_mod_comp_object_del, cw);
+ cw->show_ready = 1;
+ }
+ 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;
+ }
+
+ e_mod_comp_win_type_setup(cw);
+ memset((&att), 0, sizeof(Ecore_X_Window_Attributes));
+ if (!ecore_x_window_attributes_get(cw->win, &att))
+ {
+ free(cw);
+ e_mod_comp_x_grab_set(c, EINA_FALSE);
+ 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->objs = e_mod_comp_win_comp_objs_add(cw);
+ if (!cw->objs)
+ {
+ free(cw);
+ e_mod_comp_x_grab_set(c, EINA_FALSE);
+ return NULL;
+ }
+
+ E_Comp_Canvas *canvas;
+ EINA_LIST_FOREACH(c->canvases, l, canvas)
+ {
+ if (!canvas) continue;
+ if (canvas->use_bg_img) continue;
+ evas_object_lower(canvas->bg_img);
+ }
+
+ EINA_LIST_FOREACH(cw->objs, l, co)
+ {
+ if (!co) continue;
+ e_mod_comp_win_shadow_setup(cw, co);
+ e_mod_comp_win_cb_setup(cw, co);
+ if (co->img) evas_object_show(co->img);
+ }
+
+ ecore_x_window_shape_events_select(cw->win, 1);
+ rects = ecore_x_window_shape_rectangles_get(cw->win, &num);
+ if (rects)
+ {
+ int i;
+ for (i = 0; i < num; i++)
+ E_RECTS_CLIP_TO_RECT(rects[i].x, rects[i].y,
+ rects[i].width, rects[i].height,
+ 0, 0, att.w, att.h);
+ if (_e_mod_comp_shaped_check(att.w, att.h, rects, num))
+ cw->shape_changed = 1;
+
+ free(rects);
+ }
+
+ if (cw->bd) e_mod_comp_win_comp_objs_data_set(cw, "border", cw->bd);
+ else if (cw->pop)
+ e_mod_comp_win_comp_objs_data_set(cw, "popup", cw->pop);
+ else if (cw->menu)
+ e_mod_comp_win_comp_objs_data_set(cw, "menu", cw->menu);
+
+ e_mod_comp_win_comp_objs_img_pass_events_set(cw, 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->objs = e_mod_comp_win_comp_objs_add(cw);
+ if (!cw->objs)
+ {
+ free(cw);
+ e_mod_comp_x_grab_set(c, EINA_FALSE);
+ return NULL;
+ }
+ }
+ e_mod_comp_win_comp_objs_pass_events_set(cw, 1);
+ e_mod_comp_win_comp_objs_data_set(cw, "win",
+ (void *)((unsigned long)cw->win));
+ e_mod_comp_win_comp_objs_data_set(cw, "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;
+ }
+
+ cw->eff_type = e_mod_comp_effect_type_new();
+ if (cw->eff_type)
+ {
+ e_mod_comp_effect_type_setup
+ (cw->eff_type,
+ e_mod_comp_util_client_xid_get(cw));
+ }
+
+ e_mod_comp_x_grab_set(c, EINA_FALSE);
+ return cw;
+}
+
+static void
+_e_mod_comp_win_del(E_Comp_Win *cw)
+{
+ int pending_count;
+
+ e_mod_comp_effect_jobs_clean(cw, NULL, NULL);
+
+ // 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_effect_disable_stage(cw->c, cw);
+
+ if (cw->animating)
+ e_mod_comp_effect_animating_set(cw->c, cw, EINA_FALSE);
+
+ if (cw->shape_input)
+ {
+ e_mod_comp_win_shape_input_free(cw->shape_input);
+ cw->shape_input = NULL;
+ }
+
+ 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_effect_win_rotation_handler_release(cw);
+ e_mod_comp_bg_win_handler_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)
+ {
+ e_mod_comp_win_comp_objs_img_deinit(cw);
+
+ 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_comp_objs_xim_free(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);
+ }
+ e_mod_comp_win_comp_objs_del(cw, cw->objs);
+ 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);
+ if (cw->eff_type)
+ {
+ e_mod_comp_effect_type_free(cw->eff_type);
+ cw->eff_type = NULL;
+ }
+ if (cw->ov_obj)
+ {
+ evas_object_hide(cw->ov_obj);
+ evas_object_del(cw->ov_obj);
+ cw->ov_obj = NULL;
+ }
+ if (cw->ov_xim)
+ {
+ ecore_x_image_free(cw->ov_xim);
+ cw->ov_xim = NULL;
+ }
+ 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)
+{
+ Ecore_X_Window win;
+
+ // 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;
+ e_mod_comp_win_comp_objs_img_deinit(cw);
+ 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);
+ }
+ e_mod_comp_win_comp_objs_xim_free(cw);
+ 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);
+ 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;
+ }
+ }
+ 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);
+
+ e_mod_comp_win_comp_objs_img_size_set(cw, 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;
+ }
+ else
+ {
+ ecore_x_e_comp_pixmap_set(cw->win, cw->pixmap);
+ e_mod_comp_win_comp_objs_img_size_set(cw, cw->pw, cw->ph);
+ e_mod_comp_win_comp_objs_img_init(cw);
+ }
+ }
+
+ if (cw->pixmap)
+ {
+ cw->defer_hide = 0;
+ if (!cw->hidden_override)
+ {
+ if (cw->defer_move_resize)
+ {
+ if (!cw->move_lock)
+ e_mod_comp_win_comp_objs_move(cw, cw->x, cw->y);
+ e_mod_comp_win_comp_objs_resize(cw,
+ cw->pw + (cw->border * 2),
+ cw->ph + (cw->border * 2));
+ cw->defer_move_resize = EINA_FALSE;
+ }
+ e_mod_comp_win_comp_objs_force_show(cw);
+ }
+ }
+ }
+ e_mod_comp_bg_win_handler_show(cw);
+
+ win = e_mod_comp_util_client_xid_get(cw);
+ cw->use_dri2 = _e_mod_comp_prop_window_use_dri2_get(win);
+
+ e_mod_comp_win_shape_input_invalid_set(cw->c, 1);
+ _e_mod_comp_win_render_queue(cw);
+}
+
+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)
+{
+ Ecore_X_Window _w;
+
+ if ((!cw->visible) && (!cw->defer_hide)) return;
+
+ e_mod_comp_win_shape_input_invalid_set(cw->c, 1);
+
+ cw->visible = 0;
+ if ((cw->input_only) || (cw->invalid)) return;
+
+ e_mod_comp_effect_win_rotation_handler_release(cw);
+
+ if (!cw->force)
+ {
+ cw->defer_hide = 1;
+ if (STATE_INSET_CHECK(cw))
+ e_mod_comp_effect_signal_add
+ (cw, NULL, "e,state,shadow,off", "e");
+ e_mod_comp_effect_win_hide(cw);
+ return;
+ }
+
+ Eina_List *l;
+ E_Comp_Object *co;
+ EINA_LIST_FOREACH(cw->objs, l, co)
+ {
+ if (!co) continue;
+ e_mod_comp_effect_signal_del(cw,
+ co->shadow,
+ "hide,done");
+ }
+
+ cw->defer_hide = 0;
+ cw->force = 0;
+ e_mod_comp_win_comp_objs_hide(cw);
+
+ if (cw->update_timeout)
+ {
+ ecore_timer_del(cw->update_timeout);
+ cw->update_timeout = NULL;
+ }
+ if (_comp_mod->conf->keep_unmapped)
+ {
+ goto finish;
+ }
+
+ e_mod_comp_win_comp_objs_img_deinit(cw);
+ 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);
+ }
+
+ e_mod_comp_win_comp_objs_xim_free(cw);
+
+ if (cw->redirected)
+ {
+ cw->redirected = 0;
+ cw->pw = 0;
+ cw->ph = 0;
+ }
+
+finish:
+ _e_mod_comp_win_render_queue(cw);
+ _w = e_mod_comp_util_client_xid_get(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 v1, v2;
+ Eina_Bool raise = EINA_FALSE;
+ Eina_Bool lower = EINA_FALSE;
+ E_Comp_Win *below;
+
+ v1 = e_mod_comp_util_win_visible_get(cw);
+ below = e_mod_comp_util_win_below_get(cw, 0);
+
+ cw->c->wins_invalid = 1;
+ 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));
+ v2 = e_mod_comp_util_win_visible_get(cw);
+
+ if ((v1) && (!v2))
+ lower = e_mod_comp_policy_win_lower_check(cw, below);
+ else if ((!v1) && (v2))
+ raise = e_mod_comp_policy_win_restack_check(cw, cw2);
+
+ L(LT_EFFECT,
+ "[COMP] %18.18s w:0x%08x w2:0x%08x wb:0x%08x [fs%d sd%d v%d v%d l%d r%d]\n", "EFF",
+ e_mod_comp_util_client_xid_get(cw),
+ e_mod_comp_util_client_xid_get(cw2),
+ e_mod_comp_util_client_xid_get(below),
+ cw->first_show_worked, cw->show_done,
+ v1, v2, lower, raise);
+
+ if ((raise))
+ {
+ e_mod_comp_effect_win_restack(cw, cw2);
+ }
+ else if ((lower))
+ {
+ e_mod_comp_effect_win_lower(cw, below);
+ }
+ else
+ {
+ e_mod_comp_win_comp_objs_stack_above(cw, cw2);
+ }
+
+ _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));
+
+ e_mod_comp_win_comp_objs_raise(cw);
+ _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));
+
+ e_mod_comp_win_comp_objs_lower(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_configure(E_Comp_Win *cw,
+ int x, int y,
+ int w, int h,
+ int border)
+{
+ Eina_Bool geo_changed = EINA_FALSE;
+ if (!((w == cw->w) && (h == cw->h)))
+ {
+ cw->w = w;
+ cw->h = h;
+ cw->needpix = 1;
+ cw->dmg_updates = 0;
+ geo_changed = EINA_TRUE;
+ }
+
+ 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;
+ geo_changed = EINA_TRUE;
+ if (!cw->needpix && !cw->move_lock)
+ e_mod_comp_win_comp_objs_move(cw, cw->x, cw->y);
+ }
+ cw->hidden.x = x;
+ cw->hidden.y = y;
+ }
+
+ if (cw->border != border)
+ {
+ cw->border = border;
+ geo_changed = EINA_TRUE;
+ e_mod_comp_win_comp_objs_resize(cw,
+ cw->pw + (cw->border * 2),
+ cw->ph + (cw->border * 2));
+ }
+ cw->hidden.w = cw->w;
+ cw->hidden.h = cw->h;
+ if (geo_changed)
+ {
+ e_mod_comp_win_shape_input_invalid_set(cw->c, 1);
+
+ if (_comp_mod->conf->nocomp_fs)
+ {
+ Eina_List *l = NULL;
+ E_Comp_Canvas *canvas = NULL;
+ EINA_LIST_FOREACH(cw->c->canvases, l, canvas)
+ {
+ if (canvas->nocomp.mode != E_NOCOMP_MODE_RUN) continue;
+ if (canvas->nocomp.cw != cw) continue;
+
+ L(LT_EVENT_X,
+ "COMP|%31s|new_w:0x%08x|nocomp.cw:0x%08x canvas:%d\n",
+ "NOCOMP_END X_CONFIGURE", e_mod_comp_util_client_xid_get(cw),
+ e_mod_comp_util_client_xid_get(canvas->nocomp.cw),
+ canvas->num);
+
+ e_mod_comp_canvas_nocomp_end(canvas);
+ }
+ }
+ }
+ 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)
+{
+ Eina_List *l;
+ E_Comp_Canvas *canvas;
+
+ if ((cw->input_only) || (cw->invalid)) return;
+ 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++;
+ }
+
+ if ((_comp_mod->conf->nocomp_fs) &&
+ (cw->nocomp))
+ {
+ EINA_LIST_FOREACH(cw->c->canvases, l, canvas)
+ {
+ if (canvas->nocomp.mode != E_NOCOMP_MODE_END) continue;
+ if (canvas->nocomp.end.cw != cw) continue;
+ if (canvas->nocomp.end.dmg_updates > cw->dmg_updates) continue;
+ e_mod_comp_canvas_nocomp_dispose(canvas);
+ }
+ }
+
+ 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
+ (_comp_mod->conf->damage_timeout,
+ _e_mod_comp_win_damage_timeout, cw);
+ return;
+ }
+ }
+
+ if ((dmg) &&
+ (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_util_client_xid_get(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;
+ Eina_List *l;
+ E_Comp_Win *cw;
+ E_Comp_Canvas *canvas;
+ 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;
+ EINA_LIST_FOREACH(c->canvases, l, canvas)
+ {
+ if (canvas->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;
+ 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_util_client_xid_get(cw), cw);
+ if (!cw->c->nocomp && 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_util_client_xid_get(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_util_client_xid_get(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_util_client_xid_get(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);
+ Eina_Bool need_shape_merge = EINA_FALSE;
+ 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_util_client_xid_get(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);
+ need_shape_merge = EINA_TRUE;
+ }
+ }
+ 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|bd:%d above_w:0x%08x\n",
+ "RAISE_ABOVE", _e_mod_comp_win_is_border(cw2),
+ e_mod_comp_util_client_xid_get(cw2));
+
+ _e_mod_comp_win_raise_above(cw, cw2);
+ need_shape_merge = EINA_TRUE;
+ }
+ }
+ }
+
+ if (need_shape_merge)
+ {
+ e_mod_comp_win_shape_input_invalid_set(cw->c, 1);
+ _e_mod_comp_win_render_queue(cw);
+ }
+
+ 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_util_client_xid_get(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;
+ int ret;
+
+ c = e_mod_comp_util_get();
+ E_CHECK_RETURN(c, 0);
+
+ ret = ecore_x_window_prop_card32_get
+ (c->man->root, ATOM_EFFECT_ENABLE, &val, 1);
+ E_CHECK_RETURN((ret >= 0), 0);
+
+ if (val != 0)
+ {
+ c->animatable = EINA_TRUE;
+ if (_comp_mod->conf->default_window_effect != 1)
+ {
+ _comp_mod->conf->default_window_effect = 1;
+ e_config_domain_save("module.comp-tizen",
+ _comp_mod->conf_edd,
+ _comp_mod->conf);
+
+ }
+ }
+ else
+ {
+ c->animatable = EINA_FALSE;
+ if (_comp_mod->conf->default_window_effect != 0)
+ {
+ _comp_mod->conf->default_window_effect = 0;
+ e_config_domain_save("module.comp-tizen",
+ _comp_mod->conf_edd,
+ _comp_mod->conf);
+ }
+ }
+
+ L(LT_EVENT_X,
+ "COMP|%31s|c->animatable:%d\n",
+ "ATOM_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;
+ Ecore_X_Window w = 0;
+ E_CHECK_RETURN(ev, 0);
+
+ cw = _e_mod_comp_win_find(ev->win);
+ if (!cw)
+ {
+ cw = _e_mod_comp_border_client_find(ev->win);
+ E_CHECK_RETURN(cw, 0);
+ }
+
+ E_CHECK_RETURN(cw->eff_type, 0);
+
+ w = e_mod_comp_util_client_xid_get(cw);
+ e_mod_comp_effect_state_setup(cw->eff_type, w);
+
+ 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_Window w = 0;
+ E_CHECK_RETURN(ev, 0);
+
+ cw = _e_mod_comp_win_find(ev->win);
+ if (!cw)
+ {
+ cw = _e_mod_comp_border_client_find(ev->win);
+ E_CHECK_RETURN(cw, 0);
+ }
+
+ E_CHECK_RETURN(cw->eff_type, 0);
+
+ w = e_mod_comp_util_client_xid_get(cw);
+ e_mod_comp_effect_style_setup(cw->eff_type, w);
+
+ return EINA_TRUE;
+}
+
+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);
+ E_CHECK_RETURN(cw, 0);
+ }
+
+ ret = ecore_x_window_prop_card32_get
+ (cw->win, ECORE_X_ATOM_NET_WM_WINDOW_OPACITY, &val, 1);
+ E_CHECK_RETURN((ret > 0), 0);
+
+ cw->opacity = (val >> 24);
+
+ Eina_List *l;
+ E_Comp_Object *co;
+ EINA_LIST_FOREACH(cw->objs, l, co)
+ {
+ evas_object_color_set(co->shadow,
+ cw->opacity,
+ cw->opacity,
+ cw->opacity,
+ cw->opacity);
+ }
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_comp_prop_illume_window_state(Ecore_X_Event_Window_Property *ev)
+{
+ E_Comp_Win *cw = NULL;
+ unsigned int state;
+
+ cw = _e_mod_comp_border_client_find(ev->win);
+ E_CHECK_RETURN(cw, 0);
+ E_CHECK_RETURN((cw->bd), 0);
+
+ state = cw->bd->client.illume.win_state.state;
+ switch (state)
+ {
+ case ECORE_X_ILLUME_WINDOW_STATE_FLOATING:
+ e_mod_comp_effect_signal_add
+ (cw, NULL, "e,state,shadow,on", "e");
+ break;
+ case ECORE_X_ILLUME_WINDOW_STATE_NORMAL:
+ default:
+ e_mod_comp_effect_signal_add
+ (cw, NULL, "e,state,shadow,off", "e");
+ break;
+ }
+ 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_util_client_xid_get(cw);
+ if (cw->counter)
+ {
+ ecore_x_e_comp_sync_cancel_send(_w);
+ ecore_x_sync_counter_inc(cw->counter, 1);
+ cw->sync_info.val++;
+ }
+ cw->counter = counter;
+ if (cw->counter)
+ {
+ ecore_x_sync_counter_inc(cw->counter, 1);
+ ecore_x_e_comp_sync_begin_send(_w);
+ cw->sync_info.val = 1;
+ }
+ }
+ }
+ else
+ {
+ if (counter) ecore_x_sync_counter_inc(counter, 1);
+ }
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_comp_prop_window_use_dri2_get(Ecore_X_Window win)
+{
+ unsigned int val = 0;
+ int ret = ecore_x_window_prop_card32_get(win,
+ ATOM_X_WIN_USE_DRI2,
+ &val,
+ 1);
+ if (ret == -1) return EINA_FALSE;
+
+ return val ? EINA_TRUE : EINA_FALSE;
+}
+
+static Eina_Bool
+_e_mod_comp_prop_use_dri2(Ecore_X_Event_Window_Property *ev)
+{
+ E_Comp_Win *cw = NULL;
+ Ecore_X_Window win;
+ cw = _e_mod_comp_win_find(ev->win);
+ if (!cw)
+ {
+ cw = _e_mod_comp_border_client_find(ev->win);
+ E_CHECK_RETURN(cw, 0);
+ }
+
+ win = e_mod_comp_util_client_xid_get(cw);
+ cw->use_dri2 = _e_mod_comp_prop_window_use_dri2_get(win);
+
+ 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_atoms_name_get(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_atoms_name_get(a));
+
+ if (a == ECORE_X_ATOM_E_COMP_SYNC_COUNTER ) _e_mod_comp_prop_sync_counter(ev);
+ else if (a == ATOM_X_WIN_USE_DRI2 ) _e_mod_comp_prop_use_dri2(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_WINDOW_STATE ) _e_mod_comp_prop_illume_window_state(ev);
+ else if (a == ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE) e_mod_comp_effect_win_rotation_handler_prop(ev);
+ else if (a == ECORE_X_ATOM_WM_CLASS ) e_mod_comp_win_type_handler_prop(ev);
+ else if (a == ATOM_NET_CM_WINDOW_BACKGROUND ) e_mod_comp_bg_win_handler_prop(ev);
+ else if (a == ATOM_CM_LOG ) e_mod_comp_debug_prop_handle(ev);
+
+ 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)
+ {
+ cw->sync_info.version = v;
+ 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_util_client_xid_get(cw));
+ if (cw->counter)
+ {
+ ecore_x_sync_counter_inc(cw->counter, 1);
+ ecore_x_e_comp_sync_begin_send(e_mod_comp_util_client_xid_get(cw));
+ cw->sync_info.val = 1;
+ cw->sync_info.done_count = 1;
+ }
+ 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_util_client_xid_get(cw),
+ "SYNC_DRAW_DONE", v, w, h);
+ return EINA_FALSE;
+ }
+
+ if ((_comp_mod->conf->efl_sync) &&
+ (_comp_mod->conf->nocomp_fs) &&
+ (cw->nocomp))
+ {
+ ecore_x_sync_counter_inc(cw->counter, 1);
+ cw->update = 0;
+ cw->drawme = 0;
+ cw->sync_info.done_count++;
+ cw->sync_info.val++;
+
+ L(LT_EVENT_X,
+ "COMP|ev:%15.15s|w:0x%08x|type:%s v%d %03dx%03d NOCOMP INC done:%d val:%d\n",
+ "X_CLIENT_MSG", e_mod_comp_util_client_xid_get(cw),
+ "SYNC_DRAW_DONE", v, w, h, cw->sync_info.done_count,
+ cw->sync_info.val);
+
+ return EINA_TRUE;
+ }
+
+ 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;
+ cw->sync_info.done_count++;
+
+ L(LT_EVENT_X,
+ "COMP|ev:%15.15s|w:0x%08x|type:%s v%d %03dx%03d\n",
+ "X_CLIENT_MSG", e_mod_comp_util_client_xid_get(cw),
+ "SYNC_DRAW_DONE", v, w, h);
+
+ _e_mod_comp_win_render_queue(cw);
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_comp_hib_leave(Ecore_X_Event_Client_Message *ev)
+{
+ E_Comp *c;
+ Config *cfg;
+
+ E_CHECK_RETURN(ev, 0);
+ E_CHECK_RETURN((ev->data.l[0] == 0), 0);
+ E_CHECK_RETURN(_comp_mod, 0);
+
+ c = _e_mod_comp_find(ev->win);
+ E_CHECK_RETURN(c, 0);
+
+ cfg = e_config_domain_load("module.comp-tizen",
+ _comp_mod->conf_edd);
+ E_CHECK_RETURN(cfg, 0);
+
+ 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 EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_comp_message(void *data __UNUSED__,
+ int type __UNUSED__,
+ void *event)
+{
+ Ecore_X_Event_Client_Message *ev;
+ Ecore_X_Atom t;
+ E_Comp *c;
+ ev = (Ecore_X_Event_Client_Message *)event;
+ c = e_mod_comp_util_get();
+
+ E_CHECK_RETURN(c, 0);
+ E_CHECK_RETURN(ev, 0);
+ E_CHECK_RETURN((ev->format == 32), 0);
+
+ t = ev->message_type;
+
+ if (t == ECORE_X_ATOM_E_COMP_SYNC_DRAW_DONE) _e_mod_comp_msg_sync_draw_done(ev);
+ else if (t == ATOM_CM_LOCK_SCREEN ) e_mod_comp_screen_lock_handler_message(ev);
+ else if (t == ATOM_X_HIBERNATION_STATE ) _e_mod_comp_hib_leave(ev);
+ else if (t == ATOM_IMAGE_LAUNCH_FILE ) e_mod_comp_effect_image_launch_handler_message(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_util_client_xid_get(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_util_client_xid_get(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_util_client_xid_get(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_util_client_xid_get(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, *ll;
+ E_Comp *c;
+ E_Comp_Canvas *canvas;
+
+ L(LT_EVENT_X, "COMP|ev:%15.15s|w:0x%08x\n", "WINDOW_DAMAGE", ev->win);
+
+ // fixme: use hash if compositors list > 4
+ EINA_LIST_FOREACH(compositors, l, c)
+ {
+ if (!c) continue;
+ EINA_LIST_FOREACH(c->canvases, ll, canvas)
+ {
+ if (!canvas) continue;
+ if (ev->win == canvas->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__,
+ void *event __UNUSED__)
+{
+ Eina_List *l;
+ E_Comp *c;
+ E_Comp_Canvas *canvas;
+
+ L(LT_EVENT_X,
+ "COMP|ev:%15.15s\n",
+ "E_CONTNR_RESIZE");
+
+ if (_comp_mod->conf->canvas_per_zone)
+ return ECORE_CALLBACK_PASS_ON;
+
+ EINA_LIST_FOREACH(compositors, l, c)
+ {
+ if (!c) continue;
+ canvas = eina_list_data_get(c->canvases);
+ if (!canvas) continue;
+ ecore_evas_resize(canvas->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;
+ Eina_List *l;
+ E_Comp_Win *cw;
+ E_Comp_Canvas *canvas;
+ E_Comp* c = _e_mod_comp_find(ev->border->zone->container->manager->root);
+
+ L(LT_EVENT_X,
+ "COMP|ev:%15.15s|w:0x%08x|c:0x%08x\n", "BD_ADD",
+ ev->border->win, ev->border->client.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;
+ EINA_LIST_FOREACH(c->canvases, l, canvas)
+ {
+ if (canvas->ee_win == ev->border->win) return ECORE_CALLBACK_PASS_ON;
+ }
+ cw = _e_mod_comp_win_add(c, ev->border->win);
+ if (!cw) return ECORE_CALLBACK_PASS_ON;
+
+ _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);
+
+ if (!ev->border->borderless)
+ e_mod_comp_effect_signal_add(cw, NULL, "e,state,shadow,on", "e");
+
+ 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|c:0x%08x\n", "BD_DEL",
+ ev->border->win, ev->border->client.win);
+
+ if (!cw) return ECORE_CALLBACK_PASS_ON;
+ if (cw->bd == ev->border)
+ {
+ if (!ev->border->borderless)
+ e_mod_comp_effect_signal_add(cw, NULL, "e,state,shadow,off", "e");
+
+ _e_mod_comp_object_del(cw, ev->border);
+ }
+ 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|c:0x%08x\n", "BD_SHOW",
+ ev->border->win, ev->border->client.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|c:0x%08x\n", "BD_HIDE",
+ ev->border->win, ev->border->client.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|c:0x%08x v:%d \
+ cw[%d,%d] hidden[%d,%d] ev[%d,%d]\n", "BD_MOVE",
+ ev->border->win, ev->border->client.win, cw->visible,
+ cw->x, cw->y, 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|c:0x%08x ev:%4dx%4d\n",
+ "BD_RESIZE", ev->border->win, ev->border->client.win,
+ ev->border->w, ev->border->h);
+
+ 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_X,
+ "COMP|ev:%15.15s|w:0x%08x|c:0x%08x\n", "BD_ICONIFY",
+ ev->border->win, ev->border->client.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_X,
+ "COMP|ev:%15.15s|w:0x%08x|c:0x%08x\n", "BD_UNICONIFY",
+ ev->border->win, ev->border->client.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_X, "COMP|ev:%15.15s|w:0x%08x\n",
+ "URGENT_CHANGE", ev->border ? ev->border->win : 0);
+
+ if (!cw) return ECORE_CALLBACK_PASS_ON;
+ if (cw->bd->client.icccm.urgent)
+ e_mod_comp_effect_signal_add(cw, NULL, "e,state,urgent,on", "e");
+ else
+ e_mod_comp_effect_signal_add(cw, NULL, "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_X,
+ "COMP|ev:%15.15s|w:0x%08x|c:0x%08x\n", "BD_FOCUS_IN",
+ ev->border->win, ev->border->client.win);
+
+ if (!cw) return ECORE_CALLBACK_PASS_ON;
+ e_mod_comp_effect_signal_add(cw, NULL, "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_X,
+ "COMP|ev:%15.15s|w:0x%08x|c:0x%08x\n", "BD_FOCUS_OUT",
+ ev->border->win, ev->border->client.win);
+
+ if (!cw) return ECORE_CALLBACK_PASS_ON;
+ e_mod_comp_effect_signal_add(cw, NULL, "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);
+ 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 = (Ecore_Event_Key *)event;
+ E_CHECK_RETURN(ev, 0);
+
+ 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 = (E_Comp *)data;
+ Eina_List *l;
+ E_Comp_Canvas *canvas;
+ E_Zone *z;
+ E_CHECK_RETURN(c, 0);
+
+ z = e_util_zone_current_get(c->man);
+ EINA_LIST_FOREACH(c->canvases, l, canvas)
+ {
+ if (!_comp_mod->conf->canvas_per_zone)
+ return canvas->evas;
+ else if ((canvas->zone) && (canvas->zone == z))
+ return canvas->evas;
+ }
+ return NULL;
+}
+
+static void
+_e_mod_comp_update_func(void *data,
+ E_Manager *man __UNUSED__)
+{
+ E_Comp *c = (E_Comp *)data;
+ E_CHECK(c);
+ _e_mod_comp_render_queue(c);
+}
+
+static E_Manager_Comp_Source *
+_e_mod_comp_src_get_func(void *data __UNUSED__,
+ E_Manager *man __UNUSED__,
+ Ecore_X_Window win)
+{
+ return (E_Manager_Comp_Source *)_e_mod_comp_win_find(win);
+}
+
+static const Eina_List *
+_e_mod_comp_src_list_get_func(void *data,
+ E_Manager *man __UNUSED__)
+{
+ E_Comp *c = (E_Comp *)data;
+ E_Comp_Win *cw;
+ Eina_List *l;
+ E_Comp_Object *co;
+ E_CHECK_RETURN(c, 0);
+ E_CHECK_RETURN(c->wins, 0);
+
+ // source list should always be updated if multi-canvas is enabled.
+ if (_comp_mod->conf->canvas_per_zone)
+ {
+ if (c->wins_invalid) c->wins_invalid = 0;
+ if (c->wins_list)
+ {
+ eina_list_free(c->wins_list);
+ c->wins_list = NULL;
+ }
+ E_Zone *z = e_util_zone_current_get(c->man);
+ EINA_INLIST_FOREACH(c->wins, cw)
+ {
+ EINA_LIST_FOREACH(cw->objs, l, co)
+ {
+ if ((co->shadow) && (co->img) && (z == co->zone))
+ c->wins_list = eina_list_append(c->wins_list, cw);
+ }
+ }
+ }
+ else
+ {
+ 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)
+ {
+ EINA_LIST_FOREACH(cw->objs, l, co)
+ {
+ if ((co->shadow) && (co->img))
+ 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,
+ E_Manager *man __UNUSED__,
+ E_Manager_Comp_Source *src)
+{
+ E_Comp *c = (E_Comp *)data;
+ E_Comp_Win *cw = (E_Comp_Win *)src;
+ Eina_List *l;
+ E_Comp_Object *co;
+ E_Zone *z;
+ E_CHECK_RETURN(cw, 0);
+ E_CHECK_RETURN(cw->c, 0);
+
+ if (cw->bd) z = cw->bd->zone;
+ else z = e_util_zone_current_get(c->man);
+ EINA_LIST_FOREACH(cw->objs, l, co)
+ {
+ if (!_comp_mod->conf->canvas_per_zone)
+ return co->img;
+ else if ((co->zone) && (co->zone == z))
+ return co->img;
+ }
+ return NULL;
+}
+
+static Evas_Object *
+_e_mod_comp_src_shadow_get_func(void *data,
+ E_Manager *man __UNUSED__,
+ E_Manager_Comp_Source *src)
+{
+ E_Comp *c = (E_Comp *)data;
+ E_Comp_Win *cw = (E_Comp_Win *)src;
+ Eina_List *l;
+ E_Comp_Object *co;
+ E_Zone *z;
+ E_CHECK_RETURN(cw, 0);
+ E_CHECK_RETURN(cw->c, 0);
+
+ if (cw->bd) z = cw->bd->zone;
+ else z = e_util_zone_current_get(c->man);
+ EINA_LIST_FOREACH(cw->objs, l, co)
+ {
+ if (!_comp_mod->conf->canvas_per_zone)
+ return co->shadow;
+ else if ((co->zone) && (co->zone == z))
+ return co->shadow;
+ }
+ return NULL;
+}
+
+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;
+ Eina_List *l = NULL;
+ E_Comp_Canvas *canvas = NULL;
+ E_CHECK_RETURN(cw, 0);
+ E_CHECK_RETURN(cw->c, 0);
+ E_CHECK_GOTO(_comp_mod->conf->nocomp_fs, end);
+
+ EINA_LIST_FOREACH(cw->c->canvases, l, canvas)
+ {
+ if (canvas->nocomp.mode != E_NOCOMP_MODE_RUN) continue;
+ if (cw != canvas->nocomp.cw) continue;
+
+ L(LT_EVENT_X,
+ "COMP|%31s|new_w:0x%08x|nocomp.cw:0x%08x canvas:%d\n",
+ "NOCOMP_END MIRROR_ADD", cw ? e_mod_comp_util_client_xid_get(cw) : 0,
+ e_mod_comp_util_client_xid_get(canvas->nocomp.cw),
+ canvas->num);
+
+ e_mod_comp_canvas_nocomp_end(canvas);
+ }
+end:
+ 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;
+ E_CHECK_RETURN(cw, 0);
+ E_CHECK_RETURN(cw->c, 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;
+ Eina_List *l;
+ E_Comp_Object *co;
+ E_CHECK(cw);
+ E_CHECK(cw->c);
+ if (cw->hidden_override == hidden) return;
+ cw->hidden_override = hidden;
+ if (cw->bd)
+ e_border_comp_hidden_set(cw->bd,
+ cw->hidden_override);
+ EINA_LIST_FOREACH(cw->objs, l, co)
+ {
+ if (cw->visible)
+ {
+ if (cw->hidden_override)
+ evas_object_hide(co->shadow);
+ else if (!cw->bd ||
+ (cw->bd->visible && cw->show_done))
+ evas_object_show(co->shadow);
+ }
+ else
+ {
+ if (cw->hidden_override)
+ evas_object_hide(co->shadow);
+ }
+ }
+}
+
+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;
+ E_CHECK_RETURN(cw, 0);
+ E_CHECK_RETURN(cw->c, 0);
+ return cw->hidden_override;
+}
+
+static E_Popup *
+_e_mod_comp_src_popup_get_func(void *data __UNUSED__,
+ E_Manager *man __UNUSED__,
+ E_Manager_Comp_Source *src)
+{
+ E_Comp_Win *cw = (E_Comp_Win *)src;
+ E_CHECK_RETURN(cw, 0);
+ E_CHECK_RETURN(cw->c, 0);
+ return cw->pop;
+}
+
+static E_Border *
+_e_mod_comp_src_border_get_func(void *data __UNUSED__,
+ E_Manager *man __UNUSED__,
+ E_Manager_Comp_Source *src)
+{
+ E_Comp_Win *cw = (E_Comp_Win *)src;
+ E_CHECK_RETURN(cw, 0);
+ E_CHECK_RETURN(cw->c, 0);
+ return cw->bd;
+}
+
+static Ecore_X_Window
+_e_mod_comp_src_window_get_func(void *data __UNUSED__,
+ E_Manager *man __UNUSED__,
+ E_Manager_Comp_Source *src)
+{
+ E_Comp_Win *cw = (E_Comp_Win *)src;
+ E_CHECK_RETURN(cw, 0);
+ E_CHECK_RETURN(cw->c, 0);
+ return cw->win;
+}
+
+static Eina_Bool
+_e_mod_comp_src_input_region_set_func(void *data __UNUSED__,
+ E_Manager *man __UNUSED__,
+ E_Manager_Comp_Source *src,
+ int x,
+ int y,
+ int w,
+ int h)
+{
+ E_Comp_Win *cw = (E_Comp_Win *)src;
+ Eina_Bool res = EINA_FALSE;
+ E_CHECK_RETURN(cw, 0);
+ E_CHECK_RETURN(cw->c, 0);
+
+ if (!cw->shape_input)
+ cw->shape_input = e_mod_comp_win_shape_input_new(cw);
+ E_CHECK_RETURN(cw->shape_input, 0);
+
+ res = e_mod_comp_win_shape_input_rect_set(cw->shape_input, x, y, w, h);
+ E_CHECK_RETURN(res, 0);
+
+ e_mod_comp_win_shape_input_invalid_set(cw->c, 1);
+ _e_mod_comp_win_render_queue(cw);
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_comp_input_region_set_func(void *data __UNUSED__,
+ E_Manager *man __UNUSED__,
+ int x,
+ int y,
+ int w,
+ int h)
+{
+ E_Comp *c = e_mod_comp_util_get();
+ Eina_Bool res = EINA_FALSE;
+ E_CHECK_RETURN(c, 0);
+
+ if (!c->shape_input)
+ c->shape_input = e_mod_comp_shape_input_new();
+ E_CHECK_RETURN(c->shape_input, 0);
+
+ res = e_mod_comp_win_shape_input_rect_set(c->shape_input, x, y, w, h);
+ E_CHECK_RETURN(res, 0);
+
+ e_mod_comp_win_shape_input_invalid_set(c, 1);
+ _e_mod_comp_render_queue(c);
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_comp_src_move_lock_func(void *data __UNUSED__,
+ E_Manager *man __UNUSED__,
+ E_Manager_Comp_Source *src)
+{
+ E_Comp_Win *cw = (E_Comp_Win *)src;
+ E_CHECK_RETURN(cw, 0);
+ E_CHECK_RETURN(cw->c, 0);
+
+ cw->move_lock = EINA_TRUE;
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_comp_src_move_unlock_func(void *data __UNUSED__,
+ E_Manager *man __UNUSED__,
+ E_Manager_Comp_Source *src)
+{
+ E_Comp_Win *cw = (E_Comp_Win *)src;
+ E_CHECK_RETURN(cw, 0);
+ E_CHECK_RETURN(cw->c, 0);
+
+ cw->move_lock = EINA_FALSE;
+ e_mod_comp_win_comp_objs_move(cw, cw->x, cw->y);
+ return EINA_TRUE;
+}
+
+static void
+_e_mod_comp_composite_mode_set(void *data,
+ E_Manager *man __UNUSED__,
+ E_Zone *zone,
+ Eina_Bool set)
+{
+ E_Comp *c = (E_Comp *)data;
+ E_Comp_Canvas *canvas;
+ Eina_List *l;
+
+ E_CHECK(_comp_mod->conf->nocomp_fs);
+ E_CHECK(c);
+
+ EINA_LIST_FOREACH(c->canvases, l, canvas)
+ {
+ if (!canvas) continue;
+ if (canvas->zone == zone)
+ {
+ if (set)
+ {
+ canvas->nocomp.comp_ref++;
+
+ e_mod_comp_hw_ov_win_msg_show
+ (E_COMP_LOG_TYPE_NOCOMP,
+ ">> %d COMP REQUEST ref:%d", canvas->num,
+ canvas->nocomp.comp_ref);
+
+ if (!canvas->nocomp.force_composite)
+ {
+ canvas->nocomp.force_composite = set;
+ e_mod_comp_hw_ov_win_msg_show
+ (E_COMP_LOG_TYPE_NOCOMP,
+ ">> %d COMP REQUEST", canvas->num);
+
+ if (canvas->nocomp.cw)
+ {
+ canvas->nocomp.cw->update = 1;
+ c->updates = eina_list_append(c->updates, canvas->nocomp.cw);
+ _e_mod_comp_win_render_queue(canvas->nocomp.cw);
+ }
+ else
+ {
+ _e_mod_comp_render_queue(c);
+ }
+ }
+ }
+ else
+ {
+ canvas->nocomp.comp_ref--;
+ if (canvas->nocomp.comp_ref < 0)
+ canvas->nocomp.comp_ref = 0;
+
+ e_mod_comp_hw_ov_win_msg_show
+ (E_COMP_LOG_TYPE_NOCOMP,
+ ">> %d NOCOMP REQUEST ref:%d", canvas->num,
+ canvas->nocomp.comp_ref);
+
+ if ((canvas->nocomp.comp_ref == 0) &&
+ (canvas->nocomp.force_composite))
+ {
+ canvas->nocomp.force_composite = EINA_FALSE;
+ e_mod_comp_hw_ov_win_msg_show
+ (E_COMP_LOG_TYPE_NOCOMP,
+ ">> %d NOCOMP REQUEST", canvas->num);
+ }
+ }
+ break;
+ }
+ }
+}
+
+static Eina_Bool
+_e_mod_comp_composite_mode_get(void *data,
+ E_Manager *man __UNUSED__,
+ E_Zone *zone)
+{
+ E_Comp *c = (E_Comp *)data;
+ E_Comp_Canvas *canvas;
+ Eina_List *l;
+
+ E_CHECK_RETURN(_comp_mod->conf->nocomp_fs, 1);
+ E_CHECK_RETURN(c, 1);
+
+ EINA_LIST_FOREACH(c->canvases, l, canvas)
+ {
+ if (!canvas) continue;
+ if (canvas->zone == zone)
+ {
+ if (canvas->nocomp.mode == E_NOCOMP_MODE_RUN)
+ return EINA_FALSE;
+ else
+ return EINA_TRUE;
+ }
+ }
+ return EINA_TRUE;
+}
+
+static void
+_e_mod_comp_src_shadow_show_func(void *data,
+ E_Manager *man __UNUSED__,
+ E_Manager_Comp_Source *src)
+{
+ E_Comp_Win *cw = (E_Comp_Win *)src;
+ E_CHECK(cw);
+ E_CHECK(cw->c);
+
+ _e_mod_comp_win_show(cw);
+}
+
+static void
+_e_mod_comp_src_shadow_hide_func(void *data,
+ E_Manager *man __UNUSED__,
+ E_Manager_Comp_Source *src)
+{
+ E_Comp_Win *cw = (E_Comp_Win *)src;
+ E_CHECK(cw);
+ E_CHECK(cw->c);
+
+ _e_mod_comp_win_hide(cw);
+}
+
+static E_Comp *
+_e_mod_comp_add(E_Manager *man)
+{
+ E_Comp *c;
+ Ecore_X_Window *wins;
+ Ecore_X_Window_Attributes att;
+ Eina_Bool res;
+ int i, num;
+
+ E_Container *con;
+ E_Zone *zone;
+ E_Comp_Canvas *canvas;
+ Eina_List *l, *ll;
+
+ c = E_NEW(E_Comp, 1);
+ E_CHECK_RETURN(c, NULL);
+
+ res = ecore_x_screen_is_composited(man->num);
+ if (res)
+ {
+ e_util_dialog_internal
+ (_("Compositor Error"),
+ _("Another compositor is already running<br>"
+ "on your screen."));
+ free(c);
+ return NULL;
+ }
+
+ c->cm_selection = ecore_x_window_input_new(man->root, 0, 0, 1, 1);
+ if (!c->cm_selection)
+ {
+ free(c);
+ return NULL;
+ }
+ ecore_x_screen_is_composited_set(man->num, c->cm_selection);
+
+ 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<br>"
+ "overlay window. This is needed for it to<br>"
+ "function."));
+ E_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.<br>"
+ "This is required to be your default depth<br>"
+ "setting for the compositor to work properly."));
+ ecore_x_composite_render_window_disable(c->win);
+ E_FREE(c);
+ return NULL;
+ }
+
+ if (c->man->num == 0) e_alert_composite_win = c->win;
+
+ e_mod_comp_screen_lock_init(&(c->lock));
+
+ if (_comp_mod->conf->canvas_per_zone)
+ {
+ EINA_LIST_FOREACH(man->containers, l, con)
+ {
+ EINA_LIST_FOREACH(con->zones, ll, zone)
+ {
+ if (!zone) continue;
+ canvas = e_mod_comp_canvas_add(c, zone);
+ if (!canvas)
+ {
+ ecore_x_composite_render_window_disable(c->win);
+ E_FREE(c);
+ return NULL;
+ }
+
+ }
+ }
+ }
+ else
+ {
+ canvas = e_mod_comp_canvas_add(c, NULL);
+ if (!canvas)
+ {
+ ecore_x_composite_render_window_disable(c->win);
+ E_FREE(c);
+ return NULL;
+ }
+ }
+
+ if (_comp_mod->conf->keyboard_effect) c->keyboard_effect = EINA_TRUE;
+ if (_comp_mod->conf->defer_raise_effect) c->defer_raise_effect = EINA_TRUE;
+ if (_comp_mod->conf->fake_image_launch) c->fake_image_launch = EINA_TRUE;
+
+ 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);
+ ecore_x_window_key_grab
+ (c->man->root, "F",
+ ECORE_EVENT_MODIFIER_SHIFT |
+ ECORE_EVENT_MODIFIER_CTRL |
+ ECORE_EVENT_MODIFIER_ALT, 0);
+
+ 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_get = _e_mod_comp_src_get_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.src_window_get = _e_mod_comp_src_window_get_func;
+ c->comp.func.src_border_get = _e_mod_comp_src_border_get_func;
+ c->comp.func.src_popup_get = _e_mod_comp_src_popup_get_func;
+ c->comp.func.screen_lock = e_mod_comp_screen_lock_func;
+ c->comp.func.screen_unlock = e_mod_comp_screen_unlock_func;
+ c->comp.func.src_input_region_set = _e_mod_comp_src_input_region_set_func;
+ c->comp.func.input_region_set = _e_mod_comp_input_region_set_func;
+ c->comp.func.src_move_lock = _e_mod_comp_src_move_lock_func;
+ c->comp.func.src_move_unlock = _e_mod_comp_src_move_unlock_func;
+ c->comp.func.composite_mode_set = _e_mod_comp_composite_mode_set;
+ c->comp.func.composite_mode_get = _e_mod_comp_composite_mode_get;
+ c->comp.func.src_shadow_show = _e_mod_comp_src_shadow_show_func;
+ c->comp.func.src_shadow_hide = _e_mod_comp_src_shadow_hide_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_Comp_Canvas *canvas;
+
+ e_manager_comp_set(c->man, NULL);
+
+ ecore_x_window_key_ungrab
+ (c->man->root, "F",
+ ECORE_EVENT_MODIFIER_SHIFT |
+ ECORE_EVENT_MODIFIER_CTRL |
+ ECORE_EVENT_MODIFIER_ALT, 0);
+ ecore_x_window_key_ungrab
+ (c->man->root, "Home",
+ ECORE_EVENT_MODIFIER_SHIFT |
+ ECORE_EVENT_MODIFIER_CTRL |
+ ECORE_EVENT_MODIFIER_ALT, 0);
+
+ e_mod_comp_x_grab_set(c, EINA_FALSE);
+
+ if((c->fake_image_launch) && (c->eff_img))
+ e_mod_comp_effect_image_launch_free(c->eff_img);
+
+ while (c->wins)
+ {
+ cw = (E_Comp_Win *)(c->wins);
+ if (cw->counter)
+ {
+ ecore_x_sync_counter_free(cw->counter);
+ cw->counter = 0;
+ cw->sync_info.val = 0;
+ }
+ cw->force = 1;
+ _e_mod_comp_win_hide(cw);
+ cw->force = 1;
+ _e_mod_comp_win_del(cw);
+ }
+
+ EINA_LIST_FREE(c->canvases, canvas) e_mod_comp_canvas_del(canvas);
+ c->canvases = NULL;
+
+ 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_window_free(c->cm_selection);
+ ecore_x_e_comp_sync_supported_set(c->man->root, 0);
+ ecore_x_screen_is_composited_set(c->man->num, 0);
+ e_mod_comp_win_shape_input_free(c->shape_input);
+
+ free(c);
+}
+
+///////////////////////////////////////////////////////////////////////////////////////////
+static Eina_Bool
+_e_mod_comp_zone_move_resize(void *data __UNUSED__,
+ int type __UNUSED__,
+ void *event)
+{
+ E_Event_Zone_Move_Resize *ev = (E_Event_Zone_Move_Resize *)event;
+ Eina_List *l, *ll;
+ E_Comp *c;
+ E_Comp_Canvas *canvas;
+ if (!(ev && ev->zone))
+ return ECORE_CALLBACK_PASS_ON;
+
+ if (!_comp_mod->conf->canvas_per_zone)
+ return ECORE_CALLBACK_PASS_ON;
+
+ L(LT_EVENT_X,
+ "COMP|ev:%15.15s\n",
+ "E_ZONE_MOVE_RESIZE");
+
+ EINA_LIST_FOREACH(compositors, l, c)
+ {
+ if (!c) continue;
+ EINA_LIST_FOREACH(c->canvases, ll, canvas)
+ {
+ if (!canvas) continue;
+ if (canvas->zone != ev->zone) continue;
+ if (!((ev->zone->x == canvas->x) &&
+ (ev->zone->y == canvas->y)))
+ {
+ canvas->x = ev->zone->x;
+ canvas->y = ev->zone->y;
+ ecore_evas_move(canvas->ee,
+ canvas->x,
+ canvas->y);
+ }
+ if (!((ev->zone->w == canvas->w) &&
+ (ev->zone->h == canvas->h)))
+ {
+ canvas->w = ev->zone->w;
+ canvas->h = ev->zone->h;
+ ecore_evas_resize(canvas->ee,
+ canvas->w,
+ canvas->h);
+ }
+ break;
+ }
+ }
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+static Eina_Bool
+_e_mod_comp_zone_add(void *data __UNUSED__,
+ int type __UNUSED__,
+ void *event)
+{
+ E_Event_Zone_Add *ev = (E_Event_Zone_Add *)event;
+ Eina_List *l, *ll;
+ E_Comp *c;
+ E_Comp_Canvas *canvas;
+ E_Comp_Win *cw;
+ E_Comp_Object *co;
+ Eina_Bool found = EINA_FALSE;
+ if ((!ev) || (!ev->zone) ||
+ (!ev->zone->container))
+ {
+ return ECORE_CALLBACK_PASS_ON;
+ }
+ if (!_comp_mod->conf->canvas_per_zone)
+ {
+ return ECORE_CALLBACK_PASS_ON;
+ }
+
+ EINA_LIST_FOREACH(compositors, l, c)
+ {
+ EINA_LIST_FOREACH(c->canvases, ll, canvas)
+ {
+ if (canvas->zone == ev->zone)
+ {
+ found = EINA_TRUE;
+ break;
+ }
+ }
+ }
+
+ if (found) return ECORE_CALLBACK_PASS_ON;
+
+ L(LT_EVENT_X,
+ "COMP|ev:%15.15s\n",
+ "E_ZONE_ADD");
+
+ EINA_LIST_FOREACH(compositors, l, c)
+ {
+ if ((!c) || (c->man != ev->zone->container->manager))
+ {
+ continue;
+ }
+
+ canvas = e_mod_comp_canvas_add(c, ev->zone);
+ if (!canvas) return ECORE_CALLBACK_PASS_ON;
+
+ ecore_x_window_shape_rectangle_add(c->win,
+ canvas->zone->x,
+ canvas->zone->y,
+ canvas->zone->w,
+ canvas->zone->h);
+ ecore_x_sync();
+
+ EINA_INLIST_FOREACH(c->wins, cw)
+ {
+ Eina_Bool found = EINA_FALSE;
+ Eina_List *lll;
+ E_Comp_Canvas *_canvas;
+ EINA_LIST_FOREACH(c->canvases, lll, _canvas)
+ {
+ if (_canvas->ee_win == cw->win)
+ {
+ found = 1;
+ break;
+ }
+ }
+
+ co = e_mod_comp_obj_add(cw, canvas);
+ if (!co) continue;
+
+ cw->objs = eina_list_append(cw->objs, co);
+
+ if ((!cw->input_only) && (!cw->invalid))
+ {
+ e_mod_comp_win_shadow_setup(cw, co);
+ e_mod_comp_win_cb_setup(cw, co);
+ evas_object_show(co->img);
+
+ if (cw->bd) evas_object_data_set(co->shadow, "border", cw->bd);
+ else if (cw->pop)
+ evas_object_data_set(co->shadow, "popup", cw->pop);
+ else if (cw->menu)
+ evas_object_data_set(co->shadow, "menu", cw->menu);
+
+ evas_object_pass_events_set(co->img, 1);
+ }
+
+ evas_object_pass_events_set(co->shadow, 1);
+ evas_object_data_set(co->shadow, "win",
+ (void *)((unsigned long)cw->win));
+ evas_object_data_set(co->shadow, "src", cw);
+
+ int zx = 0, zy = 0;
+ zx = co->zone->x;
+ zy = co->zone->y;
+ evas_object_move(co->shadow, cw->x - zx, cw->y - zy);
+ evas_object_resize(co->shadow, cw->pw, cw->ph);
+
+ if (cw->visible)
+ {
+ evas_object_image_size_set(co->img, cw->pw, cw->ph);
+ Evas_Object *o;
+ EINA_LIST_FOREACH(co->img_mirror, ll, o)
+ {
+ evas_object_image_size_set(o, cw->pw, cw->ph);
+ }
+ if ((cw->dmg_updates >= 1))
+ {
+ cw->defer_hide = 0;
+ if (!cw->hidden_override)
+ evas_object_show(co->shadow);
+ edje_object_signal_emit(co->shadow, "e,state,visible,on", "e");
+ if (!cw->animating)
+ {
+ cw->c->animating++;
+ }
+ cw->animating = 1;
+ _e_mod_comp_win_render_queue(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);
+ }
+ }
+ } // end of eina_inlist
+ }
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+static Eina_Bool
+_e_mod_comp_zone_del(void *data __UNUSED__,
+ int type __UNUSED__,
+ void *event)
+{
+ E_Event_Zone_Del *ev = (E_Event_Zone_Del *)event;
+ Eina_List *l, *ll, *lll;
+ E_Comp *c;
+ E_Comp_Canvas *canvas;
+ E_Comp_Win *cw;
+ E_Comp_Object *co;
+ if (!ev || !ev->zone)
+ {
+ return ECORE_CALLBACK_PASS_ON;
+ }
+ if (!_comp_mod->conf->canvas_per_zone)
+ {
+ return ECORE_CALLBACK_PASS_ON;
+ }
+
+ L(LT_EVENT_X,
+ "COMP|ev:%15.15s\n",
+ "E_ZONE_DEL");
+
+ EINA_LIST_FOREACH(compositors, l, c)
+ {
+ EINA_LIST_FOREACH(c->canvases, ll, canvas)
+ {
+ if (canvas->zone != ev->zone) continue;
+ EINA_INLIST_REVERSE_FOREACH(c->wins, cw)
+ {
+ EINA_LIST_FOREACH(cw->objs, lll, co)
+ {
+ if (co->zone != ev->zone) continue;
+ cw->objs = eina_list_remove(cw->objs, co);
+ e_mod_comp_obj_del(co);
+ }
+ }
+
+ ecore_x_window_shape_rectangle_subtract(c->win,
+ canvas->zone->x,
+ canvas->zone->y,
+ canvas->zone->w,
+ canvas->zone->h);
+ ecore_x_sync();
+
+ c->canvases = eina_list_remove(c->canvases, canvas);
+ e_mod_comp_canvas_del(canvas);
+ break;
+ }
+ }
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+//////////////////////////////////////////////////////////////////////////
+
+Eina_Bool
+e_mod_comp_init(void)
+{
+ Eina_List *l;
+ E_Manager *man;
+ unsigned int effect = 0;
+ int res = 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));
+ handlers = eina_list_append(handlers, ecore_event_handler_add(E_EVENT_ZONE_MOVE_RESIZE, _e_mod_comp_zone_move_resize, NULL));
+ handlers = eina_list_append(handlers, ecore_event_handler_add(E_EVENT_ZONE_ADD, _e_mod_comp_zone_add, NULL));
+ handlers = eina_list_append(handlers, ecore_event_handler_add(E_EVENT_ZONE_DEL, _e_mod_comp_zone_del, NULL));
+
+ res = e_mod_comp_atoms_init();
+ E_CHECK_RETURN(res, 0);
+
+ res = e_mod_comp_win_type_init();
+ E_CHECK_RETURN(res, 0);
+
+ res = e_mod_comp_policy_init();
+ E_CHECK_RETURN(res, 0);
+
+ if (!ecore_x_composite_query())
+ {
+ e_util_dialog_internal
+ (_("Compositor Error"),
+ _("Your X Display does not support the XComposite extension<br>"
+ "or Ecore was built without XComposite support.<br>"
+ "Note that for composite support you will also need<br>"
+ "XRender and XFixes support in X11 and Ecore."));
+ return 0;
+ }
+ if (!ecore_x_damage_query())
+ {
+ e_util_dialog_internal
+ (_("Compositor Error"),
+ _("Your screen does not support the XDamage extension<br>"
+ "or Ecore was built without XDamage support."));
+ return 0;
+ }
+
+ EINA_LIST_FOREACH(e_manager_list(), l, man)
+ {
+ E_Comp *c;
+ if (!man) continue;
+ c = _e_mod_comp_add(man);
+ if (c)
+ {
+ int w, h;
+ if (c->fake_image_launch)
+ {
+ c->evas = _e_mod_comp_evas_get_func(c, c->man);
+ ecore_x_window_size_get(c->win, &w, &h);
+ c->eff_img = e_mod_comp_effect_image_launch_new(c->evas, w, h);
+ }
+ compositors = eina_list_append(compositors, c);
+ e_mod_comp_util_set(c, man);
+ ecore_animator_frametime_set(1.0f/60.0f);
+
+ if (_comp_mod->conf->default_window_effect) effect = 1;
+ ecore_x_window_prop_card32_set
+ (c->man->root, ATOM_EFFECT_ENABLE,
+ &effect, 1);
+ ecore_x_window_prop_property_set
+ (c->man->root, ATOM_OVERAY_WINDOW,
+ ECORE_X_ATOM_WINDOW, 32, &c->win, 1);
+ }
+ }
+ 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);
+
+ if (damages) eina_hash_free(damages);
+ if (windows) eina_hash_free(windows);
+ if (borders) eina_hash_free(borders);
+ damages = NULL;
+ windows = NULL;
+ borders = NULL;
+
+ e_mod_comp_policy_shutdown();
+ e_mod_comp_win_type_shutdown();
+ e_mod_comp_atoms_shutdown();
+
+ e_mod_comp_util_set(NULL, NULL);
+}
+
+void
+e_mod_comp_shadow_set(void)
+{
+ Eina_List *l, *ll;
+ E_Comp *c;
+ E_Comp_Object *co;
+
+ EINA_LIST_FOREACH(compositors, l, c)
+ {
+ if (!c) continue;
+ E_Comp_Win *cw;
+ EINA_INLIST_FOREACH(c->wins, cw)
+ {
+ if (!cw) continue;
+ Eina_Bool animatable = EINA_FALSE;
+ Eina_Bool pending = EINA_TRUE;
+ e_mod_comp_win_type_setup(cw);
+ EINA_LIST_FOREACH(cw->objs, ll, co)
+ {
+ if (!co) continue;
+ if ((co->shadow) && (co->img))
+ {
+ e_mod_comp_win_shadow_setup(cw, co);
+
+ if (cw->visible)
+ edje_object_signal_emit(co->shadow, "e,state,visible,on", "e");
+ else
+ {
+ pending = EINA_FALSE;
+ }
+ }
+ else
+ pending = EINA_FALSE;
+ }
+ animatable = e_mod_comp_effect_state_get(cw->eff_type);
+ if (animatable)
+ e_mod_comp_effect_signal_add
+ (cw, NULL, "e,state,visible,on", "e");
+ else
+ e_mod_comp_effect_signal_add
+ (cw, NULL, "e,state,visible,on,noeffect", "e");
+
+ if (_comp_mod->conf->use_shadow)
+ {
+ if (cw->bd)
+ {
+ if (!cw->bd->borderless)
+ e_mod_comp_effect_signal_add(cw, NULL, "e,state,shadow,on", "e");
+ }
+ }
+
+ e_mod_comp_comp_event_src_visibility_send(cw);
+ }
+ }
+}
+
+EINTERN void
+e_mod_comp_win_cb_setup(E_Comp_Win *cw,
+ E_Comp_Object *co)
+{
+ edje_object_signal_callback_add(co->shadow, "e,action,show,done", "e", _e_mod_comp_show_done, cw);
+ edje_object_signal_callback_add(co->shadow, "e,action,hide,done", "e", _e_mod_comp_hide_done, cw);
+ edje_object_signal_callback_add(co->shadow, "e,action,background,show,done", "e", _e_mod_comp_background_show_done, cw);
+ edje_object_signal_callback_add(co->shadow, "e,action,background,hide,done", "e", _e_mod_comp_background_hide_done, cw);
+ edje_object_signal_callback_add(co->shadow, "e,action,raise_above_show,done","e", _e_mod_comp_raise_above_show_done,cw);
+ edje_object_signal_callback_add(co->shadow, "e,action,raise_above_hide,done","e", _e_mod_comp_raise_above_hide_done,cw);
+}
+
+EINTERN void
+e_mod_comp_x_grab_set(E_Comp *c,
+ Eina_Bool grab)
+{
+ E_CHECK(_comp_mod->conf->grab);
+ E_CHECK(c);
+ E_CHECK((c->grabbed != grab));
+ if (grab)
+ ecore_x_grab();
+ else
+ ecore_x_ungrab();
+ c->grabbed = grab;
+}
+
+EINTERN void
+e_mod_comp_explicit_show_done(E_Comp_Win *cw)
+{
+ E_CHECK(cw);
+ _e_mod_comp_show_done((void*)cw, NULL, NULL, NULL);
+}
+
+EINTERN void
+e_mod_comp_explicit_hide_done(E_Comp_Win *cw)
+{
+ E_CHECK(cw);
+ _e_mod_comp_hide_done((void*)cw, NULL, NULL, NULL);
+}
+
+EINTERN void
+e_mod_comp_explicit_raise_above_show_done(E_Comp_Win *cw)
+{
+ E_CHECK(cw);
+ _e_mod_comp_raise_above_show_done((void*)cw, NULL, NULL, NULL);
+}
+
+EINTERN void
+e_mod_comp_explicit_raise_above_hide_done(E_Comp_Win *cw)
+{
+ E_CHECK(cw);
+ _e_mod_comp_raise_above_hide_done((void*)cw, NULL, NULL, NULL);
+}
+
+EINTERN void
+e_mod_comp_explicit_background_show_done(E_Comp_Win *cw)
+{
+ E_CHECK(cw);
+ _e_mod_comp_background_show_done((void*)cw, NULL, NULL, NULL);
+}
+
+EINTERN void
+e_mod_comp_explicit_background_hide_done(E_Comp_Win *cw)
+{
+ E_CHECK(cw);
+ _e_mod_comp_background_hide_done((void*)cw, NULL, NULL, NULL);
+}
--- /dev/null
+#ifdef E_TYPEDEFS
+#else
+#ifndef E_MOD_COMP_H
+#define E_MOD_COMP_H
+
+#include "e_mod_comp_shared_types.h"
+
+EINTERN Eina_Bool e_mod_comp_init(void);
+EINTERN void e_mod_comp_shutdown(void);
+EINTERN void e_mod_comp_shadow_set(void);
+
+EINTERN void e_mod_comp_done_defer(E_Comp_Win *cw);
+EINTERN Eina_Bool e_mod_comp_win_add_damage(E_Comp_Win *cw, Ecore_X_Damage dmg);
+EINTERN Eina_Bool e_mod_comp_win_del_damage(E_Comp_Win *cw, Ecore_X_Damage dmg);
+EINTERN E_Comp_Win *e_mod_comp_win_find(Ecore_X_Window win);
+EINTERN E_Comp_Win *e_mod_comp_border_client_find(Ecore_X_Window win);
+EINTERN Eina_Bool e_mod_comp_comp_event_src_visibility_send(E_Comp_Win *cw);
+EINTERN void e_mod_comp_win_shadow_setup(E_Comp_Win *cw, E_Comp_Object *co);
+EINTERN void e_mod_comp_win_cb_setup(E_Comp_Win *cw, E_Comp_Object *co);
+EINTERN void e_mod_comp_fps_toggle(void);
+EINTERN E_Comp *e_mod_comp_find(Ecore_X_Window win);
+EINTERN void e_mod_comp_win_render_queue(E_Comp_Win *cw);
+EINTERN void e_mod_comp_render_queue(E_Comp *c);
+EINTERN Eina_Bool e_mod_comp_win_damage_timeout(void *data);
+EINTERN Eina_Bool e_mod_comp_cb_update(E_Comp *c);
+EINTERN Evas_Object *e_mod_comp_win_mirror_add(E_Comp_Win *cw);
+EINTERN void e_mod_comp_cb_win_mirror_del(void *data, Evas *e, Evas_Object *obj, void *event_info);
+EINTERN void e_mod_comp_src_hidden_set_func(void *data, E_Manager *man, E_Manager_Comp_Source *src, Eina_Bool hidden);
+EINTERN void e_mod_comp_x_grab_set(E_Comp *c, Eina_Bool grab);
+EINTERN void e_mod_comp_explicit_show_done(E_Comp_Win *cw);
+EINTERN void e_mod_comp_explicit_hide_done(E_Comp_Win *cw);
+EINTERN void e_mod_comp_explicit_raise_above_show_done(E_Comp_Win *cw);
+EINTERN void e_mod_comp_explicit_raise_above_hide_done(E_Comp_Win *cw);
+EINTERN void e_mod_comp_explicit_background_show_done(E_Comp_Win *cw);
+EINTERN void e_mod_comp_explicit_background_hide_done(E_Comp_Win *cw);
+
+#endif
+#endif
--- /dev/null
+#include "e_mod_comp_shared_types.h"
+#include "e_mod_comp_debug.h"
+#include "e_mod_comp.h"
+
+/* local subsystem functions */
+static void _e_mod_comp_animation_done(void *data);
+
+/* local subsystem globals */
+static Eina_List *transfers = NULL;
+
+/* externally accessible functions */
+EINTERN E_Comp_Transfer *
+e_mod_comp_animation_transfer_new(void)
+{
+ E_Comp_Transfer *tr;
+ tr = E_NEW(E_Comp_Transfer, 1);
+ transfers = eina_list_append(transfers, tr);
+ return tr;
+}
+
+EINTERN void
+e_mod_comp_animation_transfer_free(E_Comp_Transfer *tr)
+{
+ E_Comp_Win *cw = NULL;
+ E_CHECK(tr);
+ transfers = eina_list_remove(transfers, tr);
+ if (tr->animator)
+ ecore_animator_del(tr->animator);
+ tr->animator = NULL;
+ if (tr->obj)
+ {
+ cw = evas_object_data_get(tr->obj, "src");
+ if (cw) cw->transfer = NULL;
+ }
+ tr->obj = NULL;
+ E_FREE(tr);
+}
+
+EINTERN Eina_Bool
+e_mod_comp_animation_on_rotate_top(void *data)
+{
+ E_Comp_Transfer *transfer;
+ double elapsed_time;
+
+ E_Comp_Win *cw = data;
+ E_CHECK_RETURN(cw, 0);
+ if (!(transfer = cw->transfer)) return EINA_FALSE;
+ 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);
+ E_CHECK_RETURN(map, 0);
+ 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;
+ }
+ _e_mod_comp_animation_done(cw);
+ return EINA_FALSE;
+ }
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_comp_animation_on_rotate_left(void *data)
+{
+ E_Comp_Transfer *transfer;
+ double elapsed_time;
+
+ E_Comp_Win *cw = data;
+ if (!cw) return EINA_FALSE;
+ if (!(transfer = cw->transfer)) return EINA_FALSE;
+ 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);
+ E_CHECK_RETURN(map, 0);
+ 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)
+ {
+ cw->animating = 0;
+ _e_mod_comp_animation_done(cw);
+ return EINA_FALSE;
+ }
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_comp_animation_on_translate(void *data)
+{
+ E_Comp_Win *cw;
+ E_Comp_Transfer *transfer, *rotate;
+ Evas_Coord x, y, w, h;
+ Evas_Map* map;
+ float half_w, half_h;
+ float degree, frame, translate_x;
+ double elapsed_time;
+
+ cw = (E_Comp_Win *)data;
+ E_CHECK_RETURN(cw, 0);
+
+ transfer = cw->transfer;
+ E_CHECK_RETURN(transfer, 0);
+
+ elapsed_time = ecore_loop_time_get() - transfer->begin_time;
+ if (elapsed_time > transfer->duration) elapsed_time = transfer->duration;
+
+ frame = elapsed_time / transfer->duration;
+ translate_x = transfer->from + (transfer->len * frame);
+ evas_object_move(transfer->obj, translate_x , 0);
+
+ map = evas_map_new(4);
+ E_CHECK_RETURN(map, 0);
+
+ 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) return EINA_TRUE;
+
+ rotate = e_mod_comp_animation_transfer_new();
+ E_CHECK_RETURN(rotate, 0);
+
+ 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)
+ {
+ rotate->len = -(rotate->from);
+ rotate->animator = ecore_animator_add(e_mod_comp_animation_on_rotate_top, cw);
+ }
+ else
+ {
+ rotate->len = 0;
+ rotate->animator = ecore_animator_add(e_mod_comp_animation_on_rotate_left, cw);
+ }
+ if (transfer->animator) ecore_animator_del(transfer->animator);
+ transfer->animator = NULL;
+
+ e_mod_comp_animation_transfer_free(cw->transfer);
+ cw->transfer = rotate;
+ return EINA_FALSE;
+}
+
+EINTERN Eina_Bool
+e_mod_comp_animation_transfer_list_clear(void)
+{
+ E_Comp_Transfer *tr;
+ E_CHECK_RETURN(transfers, 0);
+ EINA_LIST_FREE(transfers, tr)
+ {
+ if (!tr) continue;
+ e_mod_comp_animation_transfer_free(tr);
+ }
+ transfers = NULL;
+ return EINA_TRUE;
+}
+
+/* local subsystem functions */
+static void
+_e_mod_comp_animation_done(void *data)
+{
+ E_Comp_Win *cw = (E_Comp_Win *)data;
+ E_CHECK(cw);
+
+ L(LT_EFFECT, "[COMP] %18.18s w:0x%08x %s cw->transfer:%p\n",
+ "EFF", e_mod_comp_util_client_xid_get(cw),
+ "ANIMATE_DONE", cw->transfer);
+
+ E_CHECK_GOTO(cw->transfer, postjob);
+
+ evas_object_map_enable_set(cw->transfer->obj, EINA_FALSE);
+ evas_object_move(cw->transfer->obj, 0,0);
+
+ e_mod_comp_animation_transfer_free(cw->transfer);
+ cw->transfer = NULL;
+
+postjob:
+ e_mod_comp_done_defer(cw);
+}
--- /dev/null
+#ifdef E_TYPEDEFS
+#else
+#ifndef E_MOD_COMP_ANIMATION_H
+#define E_MOD_COMP_ANIMATION_H
+
+#define SWITCHER_DURATION_TRANSLATE (0.33)
+#define SWITCHER_DURATION_ROTATE (0.33)
+#define SWITCHER_DURATION_TOP ((SWITCHER_DURATION_TRANSLATE) + (SWITCHER_DURATION_ROTATE))
+#define WINDOW_SPACE (100)
+#define ROTATE_ANGLE_BEGIN (70)
+#define ROTATE_ANGLE_TOP (-70)
+#define ROTATE_ANGLE_LEFT (-30)
+
+typedef struct _E_Comp_Transfer E_Comp_Transfer;
+
+struct _E_Comp_Transfer
+{
+ Evas_Object *obj;
+ float from;
+ float len;
+ double begin_time;
+ double duration;
+ Ecore_Animator *animator;
+ Eina_Bool selected;
+};
+
+/* transfer functions */
+EINTERN E_Comp_Transfer *e_mod_comp_animation_transfer_new(void);
+EINTERN void e_mod_comp_animation_transfer_free(E_Comp_Transfer *tr);
+EINTERN Eina_Bool e_mod_comp_animation_transfer_list_clear(void);
+
+/* animation functions */
+EINTERN Eina_Bool e_mod_comp_animation_on_rotate_top(void *data);
+EINTERN Eina_Bool e_mod_comp_animation_on_rotate_left(void *data);
+EINTERN Eina_Bool e_mod_comp_animation_on_translate(void *data);
+
+#endif
+#endif
--- /dev/null
+#include "e.h"
+#include "e_mod_comp_atoms.h"
+#include "e_mod_comp_debug.h"
+
+/* atoms */
+EINTERN Ecore_X_Atom ATOM_CM_LOG = 0;
+EINTERN Ecore_X_Atom ATOM_CM_LOG_DUMP_DONE = 0;
+EINTERN Ecore_X_Atom ATOM_IMAGE_LAUNCH = 0;
+EINTERN Ecore_X_Atom ATOM_IMAGE_LAUNCH_FILE = 0;
+EINTERN Ecore_X_Atom ATOM_EFFECT_ENABLE = 0;
+EINTERN Ecore_X_Atom ATOM_WINDOW_EFFECT_ENABLE = 0;
+EINTERN Ecore_X_Atom ATOM_WINDOW_EFFECT_CLIENT_STATE = 0;
+EINTERN Ecore_X_Atom ATOM_WINDOW_EFFECT_TYPE = 0;
+EINTERN Ecore_X_Atom ATOM_EFFECT_DEFAULT = 0;
+EINTERN Ecore_X_Atom ATOM_EFFECT_NONE = 0;
+EINTERN Ecore_X_Atom ATOM_EFFECT_CUSTOM0 = 0;
+EINTERN Ecore_X_Atom ATOM_EFFECT_CUSTOM1 = 0;
+EINTERN Ecore_X_Atom ATOM_EFFECT_CUSTOM2 = 0;
+EINTERN Ecore_X_Atom ATOM_EFFECT_CUSTOM3 = 0;
+EINTERN Ecore_X_Atom ATOM_EFFECT_CUSTOM4 = 0;
+EINTERN Ecore_X_Atom ATOM_EFFECT_CUSTOM5 = 0;
+EINTERN Ecore_X_Atom ATOM_EFFECT_CUSTOM6 = 0;
+EINTERN Ecore_X_Atom ATOM_EFFECT_CUSTOM7 = 0;
+EINTERN Ecore_X_Atom ATOM_EFFECT_CUSTOM8 = 0;
+EINTERN Ecore_X_Atom ATOM_EFFECT_CUSTOM9 = 0;
+EINTERN Ecore_X_Atom ATOM_OVERAY_WINDOW = 0;
+EINTERN Ecore_X_Atom ATOM_X_HIBERNATION_STATE = 0;
+EINTERN Ecore_X_Atom ATOM_X_SCREEN_ROTATION = 0;
+EINTERN Ecore_X_Atom ATOM_X_WIN_USE_DRI2 = 0;
+EINTERN Ecore_X_Atom ATOM_X_WIN_HW_OV_SHOW = 0;
+EINTERN Ecore_X_Atom ATOM_CM_LOCK_SCREEN = 0;
+EINTERN Ecore_X_Atom ATOM_CM_PIXMAP_ROTATION_SUPPORTED = 0;
+EINTERN Ecore_X_Atom ATOM_CM_PIXMAP_ROTATION_STATE = 0;
+EINTERN Ecore_X_Atom ATOM_CM_PIXMAP_ROTATION_BEGIN = 0;
+EINTERN Ecore_X_Atom ATOM_CM_PIXMAP_ROTATION_BEGIN_DONE = 0;
+EINTERN Ecore_X_Atom ATOM_CM_PIXMAP_ROTATION_END = 0;
+EINTERN Ecore_X_Atom ATOM_CM_PIXMAP_ROTATION_END_DONE = 0;
+EINTERN Ecore_X_Atom ATOM_CM_PIXMAP_ROTATION_REQUEST = 0;
+EINTERN Ecore_X_Atom ATOM_CM_PIXMAP_ROTATION_REQUEST_DONE = 0;
+EINTERN Ecore_X_Atom ATOM_CM_PIXMAP_ROTATION_RESIZE_PIXMAP = 0;
+EINTERN Ecore_X_Atom ATOM_CAPTURE_EFFECT = 0;
+EINTERN Ecore_X_Atom ATOM_NET_CM_WINDOW_BACKGROUND = 0;
+
+/* local subsystem globals */
+static Eina_Hash *atoms_hash = NULL;
+
+static const char *atom_names[] = {
+ "_E_COMP_LOG",
+ "_E_COMP_LOG_DUMP_DONE",
+ "_E_COMP_FAKE_LAUNCH",
+ "_E_COMP_FAKE_LAUNCH_IMAGE",
+ "_NET_CM_EFFECT_ENABLE",
+ "_NET_CM_WINDOW_EFFECT_ENABLE",
+ "_NET_CM_WINDOW_EFFECT_CLIENT_STATE",
+ "_NET_CM_WINDOW_EFFECT_TYPE",
+ "_NET_CM_EFFECT_DEFAULT",
+ "_NET_CM_EFFECT_NONE",
+ "_NET_CM_EFFECT_CUSTOM0",
+ "_NET_CM_EFFECT_CUSTOM1",
+ "_NET_CM_EFFECT_CUSTOM2",
+ "_NET_CM_EFFECT_CUSTOM3",
+ "_NET_CM_EFFECT_CUSTOM4",
+ "_NET_CM_EFFECT_CUSTOM5",
+ "_NET_CM_EFFECT_CUSTOM6",
+ "_NET_CM_EFFECT_CUSTOM7",
+ "_NET_CM_EFFECT_CUSTOM8",
+ "_NET_CM_EFFECT_CUSTOM9",
+ "_E_COMP_OVERAY_WINDOW",
+ "X_HIBERNATION_STATE",
+ "X_SCREEN_ROTATION",
+ "X_WIN_USE_DRI2",
+ "X_WIN_HW_OV_SHOW",
+ "_E_COMP_LOCK_SCREEN",
+ "_E_COMP_PIXMAP_ROTATION_SUPPORTED",
+ "_E_COMP_PIXMAP_ROTATION_STATE",
+ "_E_COMP_PIXMAP_ROTATION_BEGIN",
+ "_E_COMP_PIXMAP_ROTATION_BEGIN_DONE",
+ "_E_COMP_PIXMAP_ROTATION_END",
+ "_E_COMP_PIXMAP_ROTATION_END_DONE",
+ "_E_COMP_PIXMAP_ROTATION_REQUEST",
+ "_E_COMP_PIXMAP_ROTATION_REQUEST_DONE",
+ "_E_COMP_PIXMAP_ROTATION_RESIZE_PIXMAP",
+ "_E_COMP_CAPTURE_EFFECT",
+ "_NET_CM_WINDOW_BACKGROUND"
+};
+
+static const char *external_atom_names[] = {
+ "SYNC_DRAW_DONE",
+ "SYNC_COUNTER",
+ "WIN_ROT_ANGLE",
+ "ILLUME_WIN_STATE",
+ "WM_WINDOW_OPACITY",
+ "WM_CLASS"
+};
+
+/* externally accessible functions */
+EINTERN int
+e_mod_comp_atoms_init(void)
+{
+ Ecore_X_Atom *atoms = NULL;
+ int n = 0, i = 0, res = 0;
+
+ if (!atoms_hash) atoms_hash = eina_hash_string_superfast_new(NULL);
+ E_CHECK_RETURN(atoms_hash, 0);
+
+ n = (sizeof(atom_names) / sizeof(char *));
+
+ atoms = E_NEW(Ecore_X_Atom, n);
+ E_CHECK_GOTO(atoms, cleanup);
+
+ ecore_x_atoms_get(atom_names, n, atoms);
+
+ ATOM_CM_LOG = atoms[i++];
+ ATOM_CM_LOG_DUMP_DONE = atoms[i++];
+ ATOM_IMAGE_LAUNCH = atoms[i++];
+ ATOM_IMAGE_LAUNCH_FILE = atoms[i++];
+ ATOM_EFFECT_ENABLE = atoms[i++];
+ ATOM_WINDOW_EFFECT_ENABLE = atoms[i++];
+ ATOM_WINDOW_EFFECT_CLIENT_STATE = atoms[i++];
+ ATOM_WINDOW_EFFECT_TYPE = atoms[i++];
+ ATOM_EFFECT_DEFAULT = atoms[i++];
+ ATOM_EFFECT_NONE = atoms[i++];
+ ATOM_EFFECT_CUSTOM0 = atoms[i++];
+ ATOM_EFFECT_CUSTOM1 = atoms[i++];
+ ATOM_EFFECT_CUSTOM2 = atoms[i++];
+ ATOM_EFFECT_CUSTOM3 = atoms[i++];
+ ATOM_EFFECT_CUSTOM4 = atoms[i++];
+ ATOM_EFFECT_CUSTOM5 = atoms[i++];
+ ATOM_EFFECT_CUSTOM6 = atoms[i++];
+ ATOM_EFFECT_CUSTOM7 = atoms[i++];
+ ATOM_EFFECT_CUSTOM8 = atoms[i++];
+ ATOM_EFFECT_CUSTOM9 = atoms[i++];
+ ATOM_OVERAY_WINDOW = atoms[i++];
+ ATOM_X_HIBERNATION_STATE = atoms[i++];
+ ATOM_X_SCREEN_ROTATION = atoms[i++];
+ ATOM_X_WIN_USE_DRI2 = atoms[i++];
+ ATOM_X_WIN_HW_OV_SHOW = atoms[i++];
+ ATOM_CM_LOCK_SCREEN = atoms[i++];
+ ATOM_CM_PIXMAP_ROTATION_SUPPORTED = atoms[i++];
+ ATOM_CM_PIXMAP_ROTATION_STATE = atoms[i++];
+ ATOM_CM_PIXMAP_ROTATION_BEGIN = atoms[i++];
+ ATOM_CM_PIXMAP_ROTATION_BEGIN_DONE = atoms[i++];
+ ATOM_CM_PIXMAP_ROTATION_END = atoms[i++];
+ ATOM_CM_PIXMAP_ROTATION_END_DONE = atoms[i++];
+ ATOM_CM_PIXMAP_ROTATION_REQUEST = atoms[i++];
+ ATOM_CM_PIXMAP_ROTATION_REQUEST_DONE = atoms[i++];
+ ATOM_CM_PIXMAP_ROTATION_RESIZE_PIXMAP = atoms[i++];
+ ATOM_CAPTURE_EFFECT = atoms[i++];
+ ATOM_NET_CM_WINDOW_BACKGROUND = atoms[i++];
+
+ for (i = 0; i < n; i++)
+ {
+ E_CHECK_GOTO(atoms[i], cleanup);
+ eina_hash_add(atoms_hash,
+ e_util_winid_str_get(atoms[i]),
+ atom_names[i]);
+ }
+
+ i = 0;
+ eina_hash_add(atoms_hash, e_util_winid_str_get(ECORE_X_ATOM_E_COMP_SYNC_DRAW_DONE), external_atom_names[i++]);
+ eina_hash_add(atoms_hash, e_util_winid_str_get(ECORE_X_ATOM_E_COMP_SYNC_COUNTER), external_atom_names[i++]);
+ eina_hash_add(atoms_hash, e_util_winid_str_get(ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE), external_atom_names[i++]);
+ eina_hash_add(atoms_hash, e_util_winid_str_get(ECORE_X_ATOM_E_ILLUME_WINDOW_STATE), external_atom_names[i++]);
+ eina_hash_add(atoms_hash, e_util_winid_str_get(ECORE_X_ATOM_NET_WM_WINDOW_OPACITY), external_atom_names[i++]);
+ eina_hash_add(atoms_hash, e_util_winid_str_get(ECORE_X_ATOM_WM_CLASS), external_atom_names[i++]);
+
+ res = 1;
+
+cleanup:
+ if (atoms) E_FREE(atoms);
+ return res;
+}
+
+EINTERN int
+e_mod_comp_atoms_shutdown(void)
+{
+ if (atoms_hash) eina_hash_free(atoms_hash);
+ atoms_hash = NULL;
+ return 1;
+}
+
+EINTERN const char *
+e_mod_comp_atoms_name_get(Ecore_X_Atom a)
+{
+ E_CHECK_RETURN(a, NULL);
+ return eina_hash_find(atoms_hash,
+ e_util_winid_str_get(a));
+}
--- /dev/null
+#ifdef E_TYPEDEFS
+#else
+#ifndef E_MOD_COMP_ATOMS_H
+#define E_MOD_COMP_ATOMS_H
+
+extern EINTERN Ecore_X_Atom ATOM_CM_LOG;
+extern EINTERN Ecore_X_Atom ATOM_CM_LOG_DUMP_DONE;
+extern EINTERN Ecore_X_Atom ATOM_IMAGE_LAUNCH;
+extern EINTERN Ecore_X_Atom ATOM_IMAGE_LAUNCH_FILE;
+extern EINTERN Ecore_X_Atom ATOM_EFFECT_ENABLE;
+extern EINTERN Ecore_X_Atom ATOM_WINDOW_EFFECT_ENABLE;
+extern EINTERN Ecore_X_Atom ATOM_WINDOW_EFFECT_CLIENT_STATE;
+extern EINTERN Ecore_X_Atom ATOM_WINDOW_EFFECT_STATE;
+extern EINTERN Ecore_X_Atom ATOM_WINDOW_EFFECT_TYPE;
+extern EINTERN Ecore_X_Atom ATOM_EFFECT_DEFAULT;
+extern EINTERN Ecore_X_Atom ATOM_EFFECT_NONE;
+extern EINTERN Ecore_X_Atom ATOM_EFFECT_CUSTOM0;
+extern EINTERN Ecore_X_Atom ATOM_EFFECT_CUSTOM1;
+extern EINTERN Ecore_X_Atom ATOM_EFFECT_CUSTOM2;
+extern EINTERN Ecore_X_Atom ATOM_EFFECT_CUSTOM3;
+extern EINTERN Ecore_X_Atom ATOM_EFFECT_CUSTOM4;
+extern EINTERN Ecore_X_Atom ATOM_EFFECT_CUSTOM5;
+extern EINTERN Ecore_X_Atom ATOM_EFFECT_CUSTOM6;
+extern EINTERN Ecore_X_Atom ATOM_EFFECT_CUSTOM7;
+extern EINTERN Ecore_X_Atom ATOM_EFFECT_CUSTOM8;
+extern EINTERN Ecore_X_Atom ATOM_EFFECT_CUSTOM9;
+extern EINTERN Ecore_X_Atom ATOM_OVERAY_WINDOW;
+extern EINTERN Ecore_X_Atom ATOM_X_HIBERNATION_STATE;
+extern EINTERN Ecore_X_Atom ATOM_X_SCREEN_ROTATION;
+extern EINTERN Ecore_X_Atom ATOM_X_WIN_USE_DRI2;
+extern EINTERN Ecore_X_Atom ATOM_X_WIN_HW_OV_SHOW;
+extern EINTERN Ecore_X_Atom ATOM_CM_LOCK_SCREEN;
+extern EINTERN Ecore_X_Atom ATOM_CM_PIXMAP_ROTATION_SUPPORTED;
+extern EINTERN Ecore_X_Atom ATOM_CM_PIXMAP_ROTATION_STATE;
+extern EINTERN Ecore_X_Atom ATOM_CM_PIXMAP_ROTATION_BEGIN;
+extern EINTERN Ecore_X_Atom ATOM_CM_PIXMAP_ROTATION_BEGIN_DONE;
+extern EINTERN Ecore_X_Atom ATOM_CM_PIXMAP_ROTATION_END;
+extern EINTERN Ecore_X_Atom ATOM_CM_PIXMAP_ROTATION_END_DONE;
+extern EINTERN Ecore_X_Atom ATOM_CM_PIXMAP_ROTATION_REQUEST;
+extern EINTERN Ecore_X_Atom ATOM_CM_PIXMAP_ROTATION_REQUEST_DONE;
+extern EINTERN Ecore_X_Atom ATOM_CM_PIXMAP_ROTATION_RESIZE_PIXMAP;
+extern EINTERN Ecore_X_Atom ATOM_CAPTURE_EFFECT;
+extern EINTERN Ecore_X_Atom ATOM_NET_CM_WINDOW_BACKGROUND;
+
+EINTERN int e_mod_comp_atoms_init(void);
+EINTERN int e_mod_comp_atoms_shutdown(void);
+EINTERN const char *e_mod_comp_atoms_name_get(Ecore_X_Atom a);
+
+#endif
+#endif
--- /dev/null
+#include "e_mod_comp_shared_types.h"
+#include "e_mod_comp.h"
+#include "e_mod_comp_atoms.h"
+#include "e_mod_comp_debug.h"
+
+typedef enum _E_Comp_BG_Win_State
+{
+ E_COMP_BG_WIN_STATE_NONE = 0,
+ E_COMP_BG_WIN_STATE_PARENT,
+ E_COMP_BG_WIN_STATE_CHILD,
+ E_COMP_BG_WIN_STATE_CHILD_WAIT_FOR_DAMAGE
+} E_Comp_BG_Win_State;
+
+struct _E_Comp_BG_Win
+{
+ E_Comp_BG_Win_State state;
+ Evas_Object *obj;
+ int x, y, w, h;
+ Eina_Bool hidden;
+ struct {
+ Ecore_X_Window parent;
+ Ecore_X_Window child;
+ Ecore_X_Window self;
+ } win;
+};
+
+/* local subsystem functions */
+static void _e_mod_comp_bg_win_fg_free(E_Comp_BG_Win *fg, E_Comp_Win *cw);
+static void _e_mod_comp_bg_win_bg_free(E_Comp_BG_Win *bg, E_Comp_Win *cw);
+static Eina_Bool _e_mod_comp_bg_win_get_prop(Ecore_X_Window win, Ecore_X_Window *wins);
+static Eina_Bool _e_mod_comp_bg_win_setup(E_Comp_Win *cw, E_Comp_Win *cw2);
+static Eina_Bool _e_mod_comp_bg_win_obj_set(E_Comp_Win *cw);
+
+/* externally accessible functions */
+EINTERN E_Comp_BG_Win *
+e_mod_comp_bg_win_new(void)
+{
+ E_Comp_BG_Win *bg;
+ bg = E_NEW(E_Comp_BG_Win, 1);
+ return bg;
+}
+
+EINTERN void
+e_mod_comp_bg_win_free(E_Comp_BG_Win *bg)
+{
+ E_Comp_Win *cw;
+ E_CHECK(bg);
+ if (bg->obj) evas_object_del(bg->obj);
+ bg->obj = NULL;
+
+ cw = e_mod_comp_win_find(bg->win.self);
+ switch (bg->state)
+ {
+ case E_COMP_BG_WIN_STATE_PARENT:
+ _e_mod_comp_bg_win_fg_free(bg, cw);
+ break;
+ case E_COMP_BG_WIN_STATE_CHILD:
+ case E_COMP_BG_WIN_STATE_CHILD_WAIT_FOR_DAMAGE:
+ _e_mod_comp_bg_win_bg_free(bg, cw);
+ break;
+ default:
+ break;
+ }
+
+ memset(bg, 0, sizeof(E_Comp_BG_Win));
+ E_FREE(bg);
+}
+
+EINTERN Eina_Bool
+e_mod_comp_bg_win_handler_prop(Ecore_X_Event_Window_Property *ev)
+{
+ Eina_Bool res = EINA_FALSE;
+ E_Comp_Win *cw[2];
+ Ecore_X_Window wins[2];
+ int i;
+
+ res = _e_mod_comp_bg_win_get_prop(ev->win, wins);
+ E_CHECK_RETURN(res, 0);
+
+ for (i = 0; i < 2; i++)
+ {
+ cw[i] = e_mod_comp_win_find(wins[i]);
+ if (!cw[i])
+ {
+ cw[i] = e_mod_comp_border_client_find(wins[i]);
+ E_CHECK_RETURN(cw[i], 0);
+ }
+ }
+
+ res = _e_mod_comp_bg_win_setup(cw[0], cw[1]);
+ E_CHECK_RETURN(res, 0);
+
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_comp_bg_win_handler_release(E_Comp_Win *cw)
+{
+ E_CHECK_RETURN(cw, 0);
+ E_CHECK_RETURN(cw->bgwin, 0);
+ e_mod_comp_bg_win_free(cw->bgwin);
+ cw->bgwin = NULL;
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_comp_bg_win_handler_show(E_Comp_Win *cw)
+{
+ Eina_Bool res = EINA_FALSE;
+ E_Comp_Win *cw2;
+ Ecore_X_Window wins[2];
+
+ res = _e_mod_comp_bg_win_get_prop
+ (e_mod_comp_util_client_xid_get(cw), wins);
+ E_CHECK_RETURN(res, 0);
+
+ cw2 = e_mod_comp_win_find(wins[1]);
+ if (!cw2)
+ {
+ cw2 = e_mod_comp_border_client_find(wins[1]);
+ E_CHECK_RETURN(cw2, 0);
+ }
+
+ res = _e_mod_comp_bg_win_setup(cw, cw2);
+ E_CHECK_RETURN(res, 0);
+
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_comp_bg_win_handler_update(E_Comp_Win *cw)
+{
+ E_Comp_Win *fgcw;
+ Eina_Bool res;
+ E_CHECK_RETURN(cw, 0);
+ E_CHECK_RETURN(cw->bgwin, 0);
+ E_CHECK_RETURN(cw->bgwin->win.parent, 0);
+ if (cw->bgwin->state != E_COMP_BG_WIN_STATE_CHILD_WAIT_FOR_DAMAGE)
+ {
+ return EINA_FALSE;
+ }
+
+ fgcw = e_mod_comp_win_find(cw->bgwin->win.parent);
+ E_CHECK_RETURN(fgcw, 0);
+
+ res = _e_mod_comp_bg_win_obj_set(fgcw);
+ E_CHECK_RETURN(res, 0);
+
+ cw->bgwin->state = E_COMP_BG_WIN_STATE_CHILD;
+
+ return EINA_TRUE;
+}
+
+/* local subsystem functions */
+static void
+_e_mod_comp_bg_win_fg_free(E_Comp_BG_Win *fg,
+ E_Comp_Win *cw)
+{
+ E_Comp_BG_Win *bg;
+ E_Comp_Win *bgcw, *fgcw;
+ E_CHECK(fg->win.child);
+
+ bgcw = e_mod_comp_win_find(fg->win.child);
+ E_CHECK(bgcw);
+
+ bg = bgcw->bgwin;
+ E_CHECK(bg);
+ E_CHECK(bg->win.parent);
+
+ fgcw = e_mod_comp_win_find(bg->win.parent);
+ E_CHECK(fgcw);
+
+ E_CHECK(fgcw == cw);
+
+ bg->win.parent = 0;
+}
+
+static void
+_e_mod_comp_bg_win_bg_free(E_Comp_BG_Win *bg,
+ E_Comp_Win *cw)
+{
+ E_Comp_BG_Win *fg;
+ E_Comp_Win *fgcw, *bgcw;
+ E_CHECK(bg->win.parent);
+
+ fgcw = e_mod_comp_win_find(bg->win.parent);
+ E_CHECK(fgcw);
+
+ fg = fgcw->bgwin;
+ E_CHECK(fg);
+ E_CHECK(fg->win.child);
+
+ bgcw = e_mod_comp_win_find(fg->win.child);
+ E_CHECK(bgcw);
+
+ E_CHECK(bgcw == cw);
+
+ fg->win.child = 0;
+
+ e_mod_comp_bg_win_free(fg);
+}
+
+static Eina_Bool
+_e_mod_comp_bg_win_get_prop(Ecore_X_Window win,
+ Ecore_X_Window *wins)
+{
+ Eina_Bool res = EINA_FALSE;
+ int ret, cnt;
+ unsigned char *data = NULL;
+ ret = ecore_x_window_prop_property_get
+ (win, ATOM_NET_CM_WINDOW_BACKGROUND,
+ ECORE_X_ATOM_CARDINAL, 32, &data, &cnt);
+ E_CHECK_GOTO((ret > 0), cleanup);
+ E_CHECK_GOTO((data && (cnt == 2)), cleanup);
+
+ memcpy(wins, data, sizeof(Ecore_X_Window) * cnt);
+
+ L(LT_EVENT_X,
+ "COMP|%31s|w1:0x%08x|w2:0x%08x\n",
+ "BGWIN_GET", wins[0], wins[1]);
+
+ res = EINA_TRUE;
+
+cleanup:
+ if (data) E_FREE(data);
+ return res;
+}
+
+static Eina_Bool
+_e_mod_comp_bg_win_setup(E_Comp_Win *cw,
+ E_Comp_Win *cw2)
+{
+ Eina_Bool res = EINA_FALSE;
+
+ if (TYPE_BG_CHECK(cw) ||
+ !TYPE_BG_CHECK(cw2) ||
+ (cw == cw2))
+ {
+ L(LT_EVENT_X,
+ "COMP|%31s|invalid wins w1:0x%08x(%d) w2:0x%08x(%d)\n",
+ "BGWIN_GET",
+ e_mod_comp_util_client_xid_get(cw), cw->win_type,
+ e_mod_comp_util_client_xid_get(cw2), cw2->win_type);
+ return EINA_FALSE;
+ }
+
+ if (cw->bgwin)
+ e_mod_comp_bg_win_free(cw->bgwin);
+
+ cw->bgwin = e_mod_comp_bg_win_new();
+ E_CHECK_GOTO(cw->bgwin, cleanup);
+ cw->bgwin->state = E_COMP_BG_WIN_STATE_PARENT;
+
+ if (!cw2->bgwin)
+ {
+ cw2->bgwin = e_mod_comp_bg_win_new();
+ E_CHECK_GOTO(cw2->bgwin, cleanup);
+
+ e_mod_comp_src_hidden_set_func
+ (NULL, NULL, (E_Manager_Comp_Source *)cw2, 1);
+
+ cw2->bgwin->hidden = EINA_TRUE;
+ }
+
+ cw->bgwin->win.child = cw2->win;
+ cw2->bgwin->win.parent = cw->win;
+ if (cw2->dmg_updates <= 1)
+ {
+ cw2->bgwin->state = E_COMP_BG_WIN_STATE_CHILD_WAIT_FOR_DAMAGE;
+ res = EINA_TRUE;
+ goto cleanup;
+ }
+
+ cw2->bgwin->state = E_COMP_BG_WIN_STATE_CHILD;
+
+ res = _e_mod_comp_bg_win_obj_set(cw);
+ E_CHECK_GOTO(res, cleanup);
+
+ res = EINA_TRUE;
+
+cleanup:
+ if (!res && cw->bgwin)
+ {
+ e_mod_comp_bg_win_free(cw->bgwin);
+ cw->bgwin = NULL;
+ }
+ return res;
+}
+
+static Eina_Bool
+_e_mod_comp_bg_win_obj_set(E_Comp_Win *cw)
+{
+ Eina_List *l;
+ E_Comp_Object *co;
+ E_Comp_Win *cw2;
+ Evas *evas;
+ Eina_Bool res = EINA_FALSE, set = EINA_FALSE;
+ E_CHECK_RETURN(cw->bgwin, 0);
+
+ cw2 = e_mod_comp_win_find(cw->bgwin->win.child);
+ E_CHECK_RETURN(cw2, 0);
+
+ cw->bgwin->x = 0;
+ cw->bgwin->y = 0;
+ cw->bgwin->w = cw2->pw;
+ cw->bgwin->h = cw2->ph;
+ cw->bgwin->obj = e_mod_comp_win_mirror_add(cw2);
+ E_CHECK_GOTO(cw->bgwin->obj, finish);
+
+ evas = evas_object_evas_get(cw->bgwin->obj);
+ E_CHECK_GOTO(evas, finish);
+ EINA_LIST_FOREACH(cw->objs, l, co)
+ {
+ if (!co) continue;
+ if (evas == evas_object_evas_get(co->shadow))
+ {
+ res = edje_object_part_swallow
+ (co->shadow, "e.swallow.bgcontent",
+ cw->bgwin->obj);
+ E_CHECK_GOTO(res, finish);
+ set = EINA_TRUE;
+ }
+ }
+ E_CHECK_GOTO(set, finish);
+
+ if (cw2->bgwin &&
+ !cw2->bgwin->hidden)
+ {
+ e_mod_comp_src_hidden_set_func
+ (NULL, NULL, (E_Manager_Comp_Source *)cw2, 1);
+ cw2->bgwin->hidden = EINA_TRUE;
+ }
+
+ e_mod_comp_win_render_queue(cw);
+
+ res = EINA_TRUE;
+
+finish:
+ return res;
+}
--- /dev/null
+#ifdef E_TYPEDEFS
+#else
+#ifndef E_MOD_COMP_BG_WIN_H
+#define E_MOD_COMP_BG_WIN_H
+
+typedef struct _E_Comp_BG_Win E_Comp_BG_Win;
+
+/* background window setup and handler functions */
+EINTERN E_Comp_BG_Win *e_mod_comp_bg_win_new(void);
+EINTERN void e_mod_comp_bg_win_free(E_Comp_BG_Win *bg);
+EINTERN Eina_Bool e_mod_comp_bg_win_handler_prop(Ecore_X_Event_Window_Property *ev);
+EINTERN Eina_Bool e_mod_comp_bg_win_handler_release(E_Comp_Win *cw);
+EINTERN Eina_Bool e_mod_comp_bg_win_handler_show(E_Comp_Win *cw);
+EINTERN Eina_Bool e_mod_comp_bg_win_handler_update(E_Comp_Win *cw);
+
+#endif
+#endif
--- /dev/null
+#include "e_mod_comp_shared_types.h"
+#include "e_mod_comp_debug.h"
+#include "e_mod_comp.h"
+
+/* static global variables */
+static int _canvas_num = 0;
+
+/* local subsystem functions */
+static void _fps_update(E_Comp_Canvas *canvas);
+static void _pre_swap(void *data, Evas *e);
+static void _post_swap(void *data, Evas *e);
+static Eina_Bool _nocomp_prepare_timeout(void *data);
+static Eina_Bool _nocomp_end_timeout(void *data);
+
+/* externally accessible functions */
+EINTERN E_Comp_Canvas *
+e_mod_comp_canvas_add(E_Comp *c,
+ E_Zone *zone)
+{
+ E_Comp_Canvas *canvas;
+ int x, y, w, h;
+ E_CHECK_RETURN(c, 0);
+
+ canvas = E_NEW(E_Comp_Canvas, 1);
+ E_CHECK_RETURN(canvas, 0);
+
+ if (zone)
+ {
+ x = zone->x;
+ y = zone->y;
+ w = zone->w;
+ h = zone->h;
+ }
+ else
+ {
+ x = 0;
+ y = 0;
+ w = c->man->w;
+ h = c->man->h;
+ }
+
+ if (_comp_mod->conf->engine == ENGINE_GL)
+ {
+ int opt[20];
+ int opt_i = 0;
+
+ 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;
+ canvas->ee = ecore_evas_gl_x11_options_new(NULL, c->win, x, y, w, h, opt);
+ }
+ if (!canvas->ee)
+ canvas->ee = ecore_evas_gl_x11_new(NULL, c->win, x, y, w, h);
+ if (canvas->ee)
+ {
+ c->gl = 1;
+ ecore_evas_gl_x11_pre_post_swap_callback_set(canvas->ee,
+ c,
+ _pre_swap,
+ _post_swap);
+ }
+ }
+ if (!canvas->ee)
+ {
+ if (_comp_mod->conf->engine == ENGINE_GL)
+ {
+ e_util_dialog_internal
+ (_("Compositor Warning"),
+ _("Your screen does not support OpenGL.<br>"
+ "Falling back to software engine."));
+ }
+
+ canvas->ee = ecore_evas_software_x11_new(NULL, c->win, x, y, w, h);
+ }
+ if (!canvas->ee)
+ {
+ e_util_dialog_internal
+ (_("Compositor Error"),
+ _("Failed to initialize Ecore Evas."));
+ goto error_cleanup;
+ }
+
+ canvas->x = x;
+ canvas->y = y;
+ canvas->w = w;
+ canvas->h = h;
+
+ canvas->comp = c;
+ canvas->num = _canvas_num++;
+
+ ecore_evas_comp_sync_set(canvas->ee, 0);
+ canvas->evas = ecore_evas_get(canvas->ee);
+
+ canvas->bg_img = evas_object_rectangle_add(canvas->evas);
+ evas_object_color_set(canvas->bg_img, 0, 0, 0, 255);
+ evas_object_stack_below(canvas->bg_img, evas_object_bottom_get(canvas->evas));
+ evas_object_show(canvas->bg_img);
+ evas_object_move(canvas->bg_img, 0, 0);
+ evas_object_resize(canvas->bg_img, w, h);
+
+ ecore_evas_show(canvas->ee);
+
+ canvas->ee_win = ecore_evas_window_get(canvas->ee);
+ canvas->zone = zone;
+
+ // comp can create only one ecore_evas for H/W overlay window
+ // this limit will be removed later
+ if ((_comp_mod->conf->use_hw_ov) &&
+ ((!zone) || (zone->num == 0)) &&
+ (!c->use_hw_ov))
+ {
+ canvas->ov = e_mod_comp_hw_ov_win_new(c->win, x, y, w, h);
+ if (canvas->ov)
+ {
+ c->use_hw_ov = EINA_TRUE;
+ e_mod_comp_hw_ov_win_root_set(canvas->ov, c->man->root);
+ }
+ }
+
+ c->canvases = eina_list_append(c->canvases, canvas);
+
+ return canvas;
+
+error_cleanup:
+ if (canvas->ee)
+ ecore_evas_free(canvas->ee);
+
+ memset(canvas, 0, sizeof(E_Comp_Canvas));
+ E_FREE(canvas);
+
+ return NULL;
+}
+
+EINTERN void
+e_mod_comp_canvas_del(E_Comp_Canvas *canvas)
+{
+ if (canvas->fps.fg)
+ {
+ evas_object_del(canvas->fps.fg);
+ canvas->fps.fg = NULL;
+ }
+ if (canvas->fps.bg)
+ {
+ evas_object_del(canvas->fps.bg);
+ canvas->fps.bg = NULL;
+ }
+ if (canvas->bg_img)
+ {
+ evas_object_del(canvas->bg_img);
+ canvas->bg_img = NULL;
+ }
+ if (canvas->ov)
+ {
+ e_mod_comp_hw_ov_win_free(canvas->ov);
+ canvas->ov = NULL;
+ canvas->comp->use_hw_ov = EINA_FALSE;
+ }
+ ecore_evas_gl_x11_pre_post_swap_callback_set(canvas->ee, NULL, NULL, NULL);
+ ecore_evas_manual_render(canvas->ee);
+ ecore_evas_free(canvas->ee);
+ memset(canvas, 0, sizeof(E_Comp_Canvas));
+ E_FREE(canvas);
+}
+
+EINTERN E_Comp_Win *
+e_mod_comp_canvas_fullscreen_check(E_Comp_Canvas *canvas)
+{
+ E_Comp *c = canvas->comp;
+ E_Comp_Win *cw = NULL;
+
+ if (c->fake_image_launch)
+ {
+ Eina_Bool res = e_mod_comp_effect_image_launch_running_check(c->eff_img);
+ E_CHECK_RETURN(!res, NULL);
+ }
+
+ E_CHECK_RETURN(c->wins, NULL);
+ E_CHECK_RETURN(_comp_mod->conf->nocomp_fs, NULL);
+
+ EINA_INLIST_REVERSE_FOREACH(c->wins, cw)
+ {
+ if (cw->move_lock)
+ return NULL;
+
+ if ((!cw->visible) ||
+ (cw->input_only) ||
+ (cw->invalid))
+ {
+ continue;
+ }
+ if (!E_INTERSECTS(canvas->x, canvas->y, canvas->w, canvas->h,
+ cw->x, cw->y, cw->w, cw->h))
+ {
+ continue;
+ }
+ if (REGION_EQUAL_TO_CANVAS(cw, canvas) &&
+ (!cw->argb) &&
+ (!cw->shaped) &&
+ (cw->dmg_updates >= 1) &&
+ (!cw->show_ready) &&
+ (cw->show_done) &&
+ (cw->use_dri2))
+ return cw;
+ else
+ return NULL;
+ }
+ return NULL;
+}
+
+EINTERN void
+e_mod_comp_canvas_nocomp_prepare(E_Comp_Canvas *canvas,
+ E_Comp_Win *cw)
+{
+ E_CHECK(canvas);
+ E_CHECK(cw);
+ E_CHECK(canvas->nocomp.mode == E_NOCOMP_MODE_NONE);
+
+ canvas->nocomp.mode = E_NOCOMP_MODE_PREPARE;
+ canvas->nocomp.prepare.cw = cw;
+ canvas->nocomp.prepare.timer = ecore_timer_add(2.0f,
+ _nocomp_prepare_timeout,
+ canvas);
+}
+
+EINTERN Eina_Bool
+e_mod_comp_canvas_nocomp_begin(E_Comp_Canvas *canvas)
+{
+ E_Comp *c = NULL;
+ E_Comp_Win *cw = NULL;
+
+ E_CHECK_RETURN(canvas, EINA_FALSE);
+ c = canvas->comp;
+ E_CHECK_RETURN(c, EINA_FALSE);
+ cw = canvas->nocomp.prepare.cw;
+ E_CHECK_RETURN(cw, EINA_FALSE);
+
+ L(LT_EVENT_X,
+ "COMP|%31s|w:0x%08x|canvas:%d dmg:%d\n",
+ "NOCOMP_BEGIN", e_mod_comp_util_client_xid_get(cw),
+ canvas->num, cw->dmg_updates);
+
+ e_mod_comp_hw_ov_win_msg_show
+ (E_COMP_LOG_TYPE_NOCOMP,
+ ">> %d NOCOMP 0x%x dmg:%d",
+ canvas->num,
+ e_mod_comp_util_client_xid_get(cw),
+ cw->dmg_updates);
+
+ ecore_x_grab();
+
+ if (cw->redirected)
+ {
+ ecore_x_composite_unredirect_window(cw->win, ECORE_X_COMPOSITE_UPDATE_MANUAL);
+ cw->redirected = 0;
+ }
+
+ if (cw->damage)
+ {
+ Ecore_X_Region parts;
+ e_mod_comp_win_del_damage(cw, cw->damage);
+ 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;
+ }
+
+ e_mod_comp_win_comp_objs_img_deinit(cw);
+ if (cw->pixmap)
+ {
+ ecore_x_pixmap_free(cw->pixmap);
+ cw->pixmap = 0;
+ ecore_x_e_comp_pixmap_set(cw->win, cw->pixmap);
+ }
+
+ ecore_x_window_shape_rectangle_subtract(c->win,
+ canvas->x,
+ canvas->y,
+ canvas->w,
+ canvas->h);
+ ecore_x_sync();
+ ecore_x_ungrab();
+
+ ecore_evas_manual_render_set(canvas->ee, 1);
+ c->nocomp = 1;
+ //c->render_overflow = OVER_FLOW;
+ canvas->nocomp.mode = E_NOCOMP_MODE_RUN;
+ canvas->nocomp.cw = cw;
+ canvas->nocomp.prepare.cw = NULL;
+
+ if (canvas->nocomp.prepare.timer)
+ {
+ ecore_timer_del(canvas->nocomp.prepare.timer);
+ canvas->nocomp.prepare.timer = NULL;
+ }
+
+ if (cw->update_timeout)
+ {
+ ecore_timer_del(cw->update_timeout);
+ cw->update_timeout = NULL;
+ }
+
+ cw->nocomp = 1;
+ cw->pw = 0;
+ cw->ph = 0;
+ cw->needpix = 1;
+
+ e_mod_comp_win_shape_input_invalid_set(c, 1);
+ e_mod_comp_win_render_queue(cw);
+
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_comp_canvas_nocomp_end(E_Comp_Canvas *canvas)
+{
+ E_Comp *c = NULL;
+ E_Comp_Win *cw = NULL;
+
+ E_CHECK_RETURN(_comp_mod->conf->nocomp_fs, EINA_FALSE);
+
+ c = canvas->comp;
+ E_CHECK_RETURN(c, EINA_FALSE);
+
+ cw = canvas->nocomp.cw;
+ E_CHECK_RETURN(cw, EINA_FALSE);
+
+ L(LT_EVENT_X,
+ "COMP|%31s|nocomp.cw:0x%08x canvas:%d\n",
+ "NOCOMP_END", e_mod_comp_util_client_xid_get(cw),
+ canvas->num);
+
+ e_mod_comp_hw_ov_win_msg_show
+ (E_COMP_LOG_TYPE_NOCOMP,
+ ">> %d COMP 0x%x",
+ canvas->num,
+ e_mod_comp_util_client_xid_get(cw));
+
+ ecore_x_grab();
+ if (!cw->damage)
+ {
+ cw->damage = ecore_x_damage_new
+ (cw->win, ECORE_X_DAMAGE_REPORT_DELTA_RECTANGLES);
+ e_mod_comp_win_add_damage(cw, cw->damage);
+ }
+
+ ecore_x_window_shape_rectangle_add(c->win,
+ canvas->x,
+ canvas->y,
+ canvas->w,
+ canvas->h);
+ if (!cw->redirected)
+ {
+ ecore_x_composite_redirect_window(cw->win,
+ ECORE_X_COMPOSITE_UPDATE_MANUAL);
+ cw->redirected = 1;
+ }
+ ecore_x_sync();
+ ecore_x_ungrab();
+
+ canvas->nocomp.mode = E_NOCOMP_MODE_END;
+ canvas->nocomp.end.cw = cw;
+ canvas->nocomp.cw = NULL;
+ canvas->nocomp.end.dmg_updates = cw->dmg_updates + 2;
+
+ if (canvas->nocomp.end.timer)
+ {
+ ecore_timer_del(canvas->nocomp.end.timer);
+ canvas->nocomp.end.timer = NULL;
+ }
+ canvas->nocomp.end.timer = ecore_timer_add(2.0f,
+ _nocomp_end_timeout,
+ canvas);
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_comp_canvas_nocomp_dispose(E_Comp_Canvas *canvas)
+{
+ E_Comp *c = NULL;
+ E_Comp_Win *cw = NULL;
+ Ecore_X_Pixmap pm;
+ E_Update_Rect *r;
+ int i;
+
+ E_CHECK_RETURN(_comp_mod->conf->nocomp_fs, EINA_FALSE);
+ E_CHECK_RETURN((canvas->nocomp.mode == E_NOCOMP_MODE_END), EINA_FALSE);
+
+ c = canvas->comp;
+ E_CHECK_RETURN(c, EINA_FALSE);
+
+ cw = canvas->nocomp.end.cw;
+ E_CHECK_RETURN(cw, EINA_FALSE);
+ E_CHECK_GOTO(cw->win, finish);
+
+ if (canvas->nocomp.end.timer)
+ {
+ ecore_timer_del(canvas->nocomp.end.timer);
+ canvas->nocomp.end.timer = NULL;
+ }
+
+ pm = ecore_x_composite_name_window_pixmap_get(cw->win);
+ if (pm)
+ {
+ Ecore_X_Pixmap oldpm;
+ cw->needpix = 0;
+ e_mod_comp_win_comp_objs_needxim_set(cw, 1);
+ oldpm = cw->pixmap;
+ cw->pixmap = pm;
+ if (cw->pixmap)
+ {
+ ecore_x_pixmap_geometry_get(cw->pixmap, NULL, NULL, &(cw->pw), &(cw->ph));
+ if (!((cw->pw == cw->w) && (cw->ph == cw->h)))
+ {
+ cw->pw = cw->w;
+ cw->ph = cw->h;
+ cw->pixmap = oldpm;
+ cw->needpix = 1;
+ ecore_x_pixmap_free(pm);
+ }
+ if ((cw->pw > 0) && (cw->ph > 0))
+ e_mod_comp_win_comp_objs_img_resize(cw, cw->pw, cw->ph);
+ }
+ else
+ {
+ cw->pw = 0;
+ cw->ph = 0;
+ }
+ if ((cw->pw <= 0) || (cw->ph <= 0))
+ {
+ e_mod_comp_win_comp_objs_img_deinit(cw);
+ 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);
+ e_mod_comp_win_comp_objs_native_set(cw, 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) ecore_x_pixmap_free(oldpm);
+ }
+ if ((cw->c->gl)
+ && (_comp_mod->conf->texture_from_pixmap)
+ && (!cw->shaped)
+ && (!cw->rects))
+ {
+ e_mod_comp_win_comp_objs_img_size_set(cw, cw->pw, cw->ph);
+ e_mod_comp_win_comp_objs_img_init(cw);
+ r = e_mod_comp_update_rects_get(cw->up);
+ if (r)
+ {
+ 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;
+ e_mod_comp_win_comp_objs_img_data_update_add(cw, x, y, w, h);
+ }
+ e_mod_comp_update_clear(cw->up);
+ free(r);
+ }
+ }
+
+ cw->nocomp = 0;
+ e_mod_comp_win_render_queue(cw);
+
+finish:
+ ecore_evas_manual_render_set(canvas->ee, 0);
+ canvas->nocomp.end.cw = NULL;
+ canvas->nocomp.end.dmg_updates = 0;
+ canvas->nocomp.mode = E_NOCOMP_MODE_NONE;
+ c->nocomp = 0;
+
+ return EINA_TRUE;
+}
+
+/* local subsystem functions */
+static void
+_fps_update(E_Comp_Canvas *canvas)
+{
+ char buf[128];
+ double fps = 0.0, t, dt;
+ int i;
+ Evas_Coord x = 0, y = 0, w = 0, h = 0;
+ E_Zone *z;
+
+ if (!_comp_mod->conf->fps_show) return;
+
+ 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 - canvas->fps.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), "FPS: N/A");
+
+ for (i = 121; i >= 1; i--) canvas->fps.frametimes[i] = canvas->fps.frametimes[i - 1];
+ canvas->fps.frametimes[0] = t;
+ canvas->fps.frameskip++;
+
+ if (canvas->fps.frameskip >= _comp_mod->conf->fps_average_range)
+ {
+ canvas->fps.frameskip = 0;
+ evas_object_text_text_set(canvas->fps.fg, buf);
+ }
+
+ evas_object_geometry_get(canvas->fps.fg, NULL, NULL, &w, &h);
+
+ w += 8;
+ h += 8;
+
+ z = canvas->zone;
+ if (z)
+ {
+ switch (_comp_mod->conf->fps_corner)
+ {
+ case 3: // bottom-right
+ x = z->w - w;
+ y = z->h - h;
+ break;
+ case 2: // bottom-left
+ x = 0;
+ y = z->y + z->h - h;
+ break;
+ case 1: // top-right
+ x = z->w - w;
+ y = z->y;
+ break;
+ default: // 0 // top-left
+ x = 0;
+ y = z->y;
+ break;
+ }
+ }
+ evas_object_move(canvas->fps.bg, x, y);
+ evas_object_resize(canvas->fps.bg, w, h);
+ evas_object_move(canvas->fps.fg, x + 4, y + 4);
+}
+
+static void
+_pre_swap(void *data,
+ Evas *e)
+{
+ E_Comp *c = (E_Comp *)data;
+ Eina_List *l;
+ E_Comp_Canvas *canvas;
+ E_CHECK(c);
+
+ e_mod_comp_x_grab_set(c, EINA_FALSE);
+
+ EINA_LIST_FOREACH(c->canvases, l, canvas)
+ {
+ if (!canvas) continue;
+ if (canvas->evas != e) continue;
+
+ L(LT_EVENT_X, "COMP|%31s|canvas:%d\n", "PRE_SWAP",
+ canvas->zone ? canvas->zone->num : -1);
+
+ e_mod_comp_hw_ov_win_msg_show
+ (E_COMP_LOG_TYPE_SWAP,
+ "%d %d SWAP a%d m%d",
+ canvas->num,
+ canvas->nocomp.mode,
+ canvas->animation.num,
+ ecore_evas_manual_render_get(canvas->ee));
+
+ if (_comp_mod->conf->fps_show)
+ {
+ if (!canvas->fps.bg)
+ {
+ canvas->fps.bg = evas_object_rectangle_add(canvas->evas);
+ evas_object_color_set(canvas->fps.bg, 0, 0, 0, 128);
+ evas_object_layer_set(canvas->fps.bg, EVAS_LAYER_MAX);
+ evas_object_show(canvas->fps.bg);
+ }
+ if (!canvas->fps.fg)
+ {
+ canvas->fps.fg = evas_object_text_add(canvas->evas);
+ evas_object_text_font_set(canvas->fps.fg, "Sans", 30);
+ evas_object_text_text_set(canvas->fps.fg, "FPS: 0.0");
+ evas_object_color_set(canvas->fps.fg, 255, 255, 255, 255);
+ evas_object_layer_set(canvas->fps.fg, EVAS_LAYER_MAX);
+ evas_object_show(canvas->fps.fg);
+ }
+ _fps_update(canvas);
+ }
+ else
+ {
+ if (canvas->fps.fg)
+ {
+ evas_object_del(canvas->fps.fg);
+ canvas->fps.fg = NULL;
+ }
+ if (canvas->fps.bg)
+ {
+ evas_object_del(canvas->fps.bg);
+ canvas->fps.bg = NULL;
+ }
+ }
+ }
+}
+
+static void
+_post_swap(void *data,
+ Evas *e)
+{
+ E_Comp *c = (E_Comp *)data;
+ E_CHECK(c);
+ E_CHECK(_comp_mod->conf->nocomp_fs);
+
+ Eina_List *l = NULL;
+ E_Comp_Canvas *canvas = NULL;
+ E_Comp_Win *cw = NULL;
+ EINA_LIST_FOREACH(c->canvases, l, canvas)
+ {
+ if (canvas->evas != e) continue;
+ if (canvas->nocomp.mode != E_NOCOMP_MODE_NONE) continue;
+ if (canvas->nocomp.force_composite) continue;
+ if (canvas->animation.run) continue;
+
+ cw = e_mod_comp_canvas_fullscreen_check(canvas);
+ if (!cw) continue;
+
+ e_mod_comp_canvas_nocomp_prepare(canvas, cw);
+ }
+}
+
+static Eina_Bool
+_nocomp_prepare_timeout(void *data)
+{
+ E_Comp_Canvas *canvas = (E_Comp_Canvas *)data;
+ E_Comp_Win *cw;
+ E_CHECK_RETURN(canvas, ECORE_CALLBACK_CANCEL);
+
+ if (canvas->nocomp.prepare.timer)
+ {
+ ecore_timer_del(canvas->nocomp.prepare.timer);
+ canvas->nocomp.prepare.timer = NULL;
+ }
+
+ if ((canvas->nocomp.force_composite)||
+ (canvas->animation.run))
+ {
+ canvas->nocomp.prepare.cw = NULL;
+ canvas->nocomp.mode = E_NOCOMP_MODE_NONE;
+ return ECORE_CALLBACK_CANCEL;
+ }
+
+ cw = e_mod_comp_canvas_fullscreen_check(canvas);
+ if (!cw)
+ {
+ canvas->nocomp.prepare.cw = NULL;
+ canvas->nocomp.mode = E_NOCOMP_MODE_NONE;
+ return ECORE_CALLBACK_CANCEL;
+ }
+ else if (cw != canvas->nocomp.prepare.cw)
+ {
+ canvas->nocomp.prepare.cw = cw;
+ canvas->nocomp.prepare.timer = ecore_timer_add(2.0f,
+ _nocomp_prepare_timeout,
+ canvas);
+ return ECORE_CALLBACK_CANCEL;
+ }
+
+ e_mod_comp_canvas_nocomp_begin(canvas);
+
+ return ECORE_CALLBACK_CANCEL;
+}
+
+static Eina_Bool
+_nocomp_end_timeout(void *data)
+{
+ E_Comp_Canvas *canvas = (E_Comp_Canvas *)data;
+ if (canvas->nocomp.end.timer)
+ {
+ ecore_timer_del(canvas->nocomp.end.timer);
+ canvas->nocomp.end.timer = NULL;
+ }
+ e_mod_comp_canvas_nocomp_dispose(canvas);
+ return ECORE_CALLBACK_CANCEL;
+}
--- /dev/null
+#ifdef E_TYPEDEFS
+#else
+#ifndef E_MOD_COMP_CANVAS_H
+#define E_MOD_COMP_CANVAS_H
+
+typedef struct _E_Comp_Canvas E_Comp_Canvas;
+
+typedef enum _E_Nocomp_Mode
+{
+ E_NOCOMP_MODE_NONE,
+ E_NOCOMP_MODE_PREPARE,
+ E_NOCOMP_MODE_BEGIN,
+ E_NOCOMP_MODE_RUN,
+ E_NOCOMP_MODE_END,
+ E_NOCOMP_MODE_DISPOSE
+} E_Nocomp_Mode;
+
+struct _E_Comp_Canvas
+{
+ E_Comp *comp;
+ E_Zone *zone; // NULL if we have a single big canvas for all screens
+ Ecore_Evas *ee;
+ Ecore_X_Window ee_win;
+ Evas *evas;
+ int x, y, w, h; // geometry
+ int num;
+ struct {
+ Evas_Object *bg;
+ Evas_Object *fg;
+ double frametimes[122];
+ int frameskip;
+ } fps;
+ struct {
+ E_Nocomp_Mode mode;
+ E_Comp_Win *cw;
+ Eina_Bool force_composite;
+ int comp_ref; // indicates the number of modules using composite mode
+ struct {
+ E_Comp_Win *cw;
+ Ecore_Timer *timer;
+ } prepare;
+ struct {
+ E_Comp_Win *cw;
+ Ecore_Timer *timer;
+ int dmg_updates;
+ } end;
+ } nocomp;
+ struct {
+ Eina_Bool run;
+ int num;
+ } animation;
+ Evas_Object *bg_img;
+ Eina_Bool use_bg_img : 1;
+ E_Comp_HW_Ov_Win *ov;
+};
+
+EINTERN E_Comp_Canvas *e_mod_comp_canvas_add(E_Comp *c, E_Zone *zone);
+EINTERN void e_mod_comp_canvas_del(E_Comp_Canvas *canvas);
+EINTERN E_Comp_Win *e_mod_comp_canvas_fullscreen_check(E_Comp_Canvas *canvas);
+EINTERN void e_mod_comp_canvas_nocomp_prepare(E_Comp_Canvas *canvas, E_Comp_Win *cw);
+EINTERN Eina_Bool e_mod_comp_canvas_nocomp_begin(E_Comp_Canvas *canvas);
+EINTERN Eina_Bool e_mod_comp_canvas_nocomp_end(E_Comp_Canvas *canvas);
+EINTERN Eina_Bool e_mod_comp_canvas_nocomp_dispose(E_Comp_Canvas *canvas);
+
+#endif
+#endif
--- /dev/null
+#include "e.h"
+#include "e_mod_main.h"
+#include "e_mod_comp_cfdata.h"
+
+EAPI void
+e_mod_comp_cfdata_edd_init(E_Config_DD **conf_edd, E_Config_DD **match_edd)
+{
+ *match_edd = E_CONFIG_DD_NEW("Comp_Match", Match);
+#undef T
+#undef D
+#define T Match
+#define D *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);
+
+ *conf_edd = E_CONFIG_DD_NEW("Comp_Config", Config);
+#undef T
+#undef D
+#define T Config
+#define D *conf_edd
+ 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, 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, fps_average_range, INT);
+ E_CONFIG_VAL(D, T, fps_corner, UCHAR);
+ E_CONFIG_VAL(D, T, fps_show, UCHAR);
+ E_CONFIG_VAL(D, T, use_shadow, UCHAR);
+ 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, loose_sync, UCHAR);
+ E_CONFIG_VAL(D, T, efl_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, first_draw_delay, DOUBLE);
+ E_CONFIG_VAL(D, T, canvas_per_zone, UCHAR);
+ E_CONFIG_VAL(D, T, use_lock_screen, UCHAR);
+ E_CONFIG_VAL(D, T, default_window_effect, UCHAR);
+ E_CONFIG_VAL(D, T, keyboard_effect, UCHAR);
+ E_CONFIG_VAL(D, T, fake_image_launch, UCHAR);
+ E_CONFIG_VAL(D, T, fake_launch_layer, INT);
+ E_CONFIG_VAL(D, T, defer_raise_effect, UCHAR);
+ E_CONFIG_VAL(D, T, max_lock_screen_time, DOUBLE);
+ E_CONFIG_VAL(D, T, damage_timeout, DOUBLE);
+ E_CONFIG_VAL(D, T, use_hw_ov, UCHAR);
+ E_CONFIG_VAL(D, T, debug_info_show, UCHAR);
+ E_CONFIG_VAL(D, T, max_debug_msgs, INT);
+ E_CONFIG_VAL(D, T, debug_type_nocomp, UCHAR);
+ E_CONFIG_VAL(D, T, debug_type_swap, UCHAR);
+ E_CONFIG_VAL(D, T, debug_type_effect, UCHAR);
+ E_CONFIG_LIST(D, T, match.popups, *match_edd);
+ E_CONFIG_LIST(D, T, match.borders, *match_edd);
+ E_CONFIG_LIST(D, T, match.overrides, *match_edd);
+ E_CONFIG_LIST(D, T, match.menus, *match_edd);
+}
+
+EAPI Config *
+e_mod_comp_cfdata_config_new(void)
+{
+ Config *cfg;
+ Match *mat;
+
+ cfg = E_NEW(Config, 1);
+
+ cfg->shadow_file = calloc(4096, sizeof(unsigned char));
+ if (cfg->shadow_file)
+ {
+ snprintf((char *)(cfg->shadow_file),
+ 4096 * sizeof(unsigned char),
+ "%s/data/themes/shadow.edj",
+ e_prefix_data_get());
+ fprintf(stdout,
+ "[E17-comp] shadow file path: %s\n",
+ cfg->shadow_file);
+ }
+
+ cfg->shadow_style = eina_stringshare_add("default");
+ cfg->engine = ENGINE_GL;
+ cfg->max_unmapped_pixels = 32 * 1024; // implement
+ cfg->max_unmapped_time = 10 * 3600; // implement
+ cfg->min_unmapped_time = 5 * 60; // implement
+ cfg->fps_average_range = 30;
+ cfg->fps_corner = 0;
+ cfg->fps_show = 0;
+ cfg->use_shadow = 0;
+ cfg->indirect = 0;
+ cfg->texture_from_pixmap = 1;
+ cfg->lock_fps = 0;
+ cfg->loose_sync = 1;
+ cfg->efl_sync = 1;
+ cfg->grab = 0;
+ cfg->vsync = 1;
+ cfg->keep_unmapped = 1;
+ cfg->send_flush = 1; // implement
+ cfg->send_dump = 1; // implement
+ cfg->nocomp_fs = 0; // buggy
+ cfg->smooth_windows = 0; // 1 if gl, 0 if not
+ cfg->first_draw_delay = 0.15;
+
+ cfg->canvas_per_zone = 1;
+ cfg->use_lock_screen = 1;
+ cfg->default_window_effect = 0;
+ cfg->keyboard_effect = 0;
+ cfg->fake_image_launch = 0;
+ cfg->fake_launch_layer = 0;
+ cfg->defer_raise_effect = 0;
+ cfg->max_lock_screen_time = 2.0;
+ cfg->damage_timeout = 10.0;
+ cfg->use_hw_ov = 0;
+ cfg->debug_info_show = 0;
+ cfg->max_debug_msgs = 1;
+ cfg->debug_type_nocomp = 1;
+ cfg->debug_type_swap = 0;
+ cfg->debug_type_effect = 0;
+
+ cfg->match.popups = NULL;
+ mat = E_NEW(Match, 1);
+ cfg->match.popups = eina_list_append(cfg->match.popups, mat);
+ mat->name = eina_stringshare_add("shelf");
+ mat->shadow_style = eina_stringshare_add("popup");
+ mat = E_NEW(Match, 1);
+ cfg->match.popups = eina_list_append(cfg->match.popups, mat);
+ mat->shadow_style = eina_stringshare_add("popup");
+
+ cfg->match.borders = NULL;
+
+ cfg->match.overrides = NULL;
+ mat = E_NEW(Match, 1);
+ cfg->match.overrides = eina_list_append(cfg->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);
+ cfg->match.overrides = eina_list_append(cfg->match.overrides, mat);
+ mat->name = eina_stringshare_add("E");
+ mat->clas = eina_stringshare_add("everything");
+ mat->shadow_style = eina_stringshare_add("everything");
+ mat = E_NEW(Match, 1);
+ cfg->match.overrides = eina_list_append(cfg->match.overrides, mat);
+ mat->primary_type = ECORE_X_WINDOW_TYPE_DROPDOWN_MENU;
+ mat->shadow_style = eina_stringshare_add("menu");
+ mat = E_NEW(Match, 1);
+ cfg->match.overrides = eina_list_append(cfg->match.overrides, mat);
+ mat->primary_type = ECORE_X_WINDOW_TYPE_POPUP_MENU;
+ mat->shadow_style = eina_stringshare_add("menu");
+ mat = E_NEW(Match, 1);
+ cfg->match.overrides = eina_list_append(cfg->match.overrides, mat);
+ mat->primary_type = ECORE_X_WINDOW_TYPE_COMBO;
+ mat->shadow_style = eina_stringshare_add("menu");
+ mat = E_NEW(Match, 1);
+ cfg->match.overrides = eina_list_append(cfg->match.overrides, mat);
+ mat->primary_type = ECORE_X_WINDOW_TYPE_TOOLTIP;
+ mat->shadow_style = eina_stringshare_add("menu");
+ mat = E_NEW(Match, 1);
+ cfg->match.overrides = eina_list_append(cfg->match.overrides, mat);
+ mat->shadow_style = eina_stringshare_add("popup");
+
+ cfg->match.menus = NULL;
+ mat = E_NEW(Match, 1);
+ cfg->match.menus = eina_list_append(cfg->match.menus, mat);
+ mat->shadow_style = eina_stringshare_add("menu");
+
+ return cfg;
+}
+
+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);
+ }
+}
+
+EAPI void
+e_mod_cfdata_config_free(Config *cfg)
+{
+ if (cfg->shadow_file) eina_stringshare_del(cfg->shadow_file);
+ if (cfg->shadow_style) eina_stringshare_del(cfg->shadow_style);
+
+ _match_list_free(cfg->match.popups);
+ _match_list_free(cfg->match.borders);
+ _match_list_free(cfg->match.overrides);
+ _match_list_free(cfg->match.menus);
+
+ free(cfg);
+}
+
--- /dev/null
+#ifndef E_MOD_COMP_CFDATA_H
+#define E_MOD_COMP_CFDATA_H
+
+typedef struct _Config Config;
+typedef struct _Match Match;
+
+struct _Config
+{
+ const char *shadow_file;
+ const char *shadow_style;
+ int engine;
+ int max_unmapped_pixels;
+ int max_unmapped_time;
+ int min_unmapped_time;
+ int fps_average_range;
+ unsigned char fps_corner;
+ unsigned char fps_show;
+ unsigned char use_shadow;
+ 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;
+ double first_draw_delay;
+ unsigned char canvas_per_zone;
+ unsigned char use_lock_screen;
+ unsigned char default_window_effect;
+ unsigned char keyboard_effect;
+ unsigned char fake_image_launch;
+ int fake_launch_layer;
+ unsigned char defer_raise_effect;
+ double max_lock_screen_time;
+ double damage_timeout;
+ unsigned char use_hw_ov;
+ unsigned char debug_info_show;
+ int max_debug_msgs;
+ int debug_type_nocomp;
+ int debug_type_swap;
+ int debug_type_effect;
+
+ 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 _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
+
+ const char *shadow_style; // shadow style to use
+
+ 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
+};
+
+EAPI void e_mod_comp_cfdata_edd_init(E_Config_DD **conf_edd, E_Config_DD **match_edd);
+EAPI Config *e_mod_comp_cfdata_config_new(void);
+EAPI void e_mod_cfdata_config_free(Config *cfg);
+
+#endif
--- /dev/null
+#include "e_mod_comp_shared_types.h"
+#include "e_mod_comp.h"
+#include "e_mod_comp_atoms.h"
+#include "e_mod_comp_debug.h"
+
+typedef struct _E_Mod_Comp_Log_Info
+{
+ int type;
+ char file[256];
+} E_Mod_Comp_Log_Info;
+
+/* local subsystem functions */
+static void
+_e_mod_comp_debug_wins_info_dump(E_Comp *c,
+ FILE *fs)
+{
+ E_Comp_Win *cw;
+ Ecore_X_Window cid = 0;
+ char *wname = NULL, *wclas = NULL;
+ int pid = 0, i = 0;
+ char buf[4096], buf2[4096], buf3[4096];
+ Eina_Bool res;
+
+ fprintf(fs, "B-----------------------------------------------------------------------------------------------------------------------------\n");
+ fprintf(fs, " NO WINDOW (CLIENT) V x y w h PIXMAP pw ph | v VAL DMGs DONE | PID WNAME WCLASS\n");
+ fprintf(fs, "------------------------------------------------------------------------------------------------------------------------------\n");
+
+ EINA_INLIST_REVERSE_FOREACH(c->wins, cw)
+ {
+ cid = e_mod_comp_util_client_xid_get(cw);
+ ecore_x_icccm_name_class_get(cid, &wname, &wclas);
+ res = ecore_x_netwm_pid_get(cid, &pid);
+ if (!res) pid = 0;
+
+ memset(buf, 0, sizeof(buf));
+ memset(buf2, 0, sizeof(buf2));
+ memset(buf3, 0, sizeof(buf3));
+
+ if (cw->bd)
+ snprintf(buf, sizeof(buf), "0x%07x", cw->bd->client.win);
+
+ if (cw->pixmap)
+ snprintf(buf2, sizeof(buf2), "0x%07x", cw->pixmap);
+
+ if (cw->sync_info.val)
+ snprintf(buf3, sizeof(buf3), "%d %4d %4d %4d",
+ cw->sync_info.version,
+ cw->sync_info.val,
+ cw->dmg_updates,
+ cw->sync_info.done_count);
+
+ fprintf(fs,
+ " %3d 0x%07x %9s %s %5d %5d %4d %4d %9s %4d %4d | %16s | %d %d %d %d %d %d |%4d %s %s\n",
+ i,
+ cw->win,
+ buf,
+ cw->visible ? "v" : " ",
+ cw->x, cw->y, cw->w, cw->h,
+ buf2,
+ cw->pw, cw->ph,
+ buf3,
+ cw->argb,
+ cw->shaped,
+ cw->show_ready,
+ cw->show_done,
+ cw->animating,
+ cw->use_dri2,
+ pid,
+ wname ? wname : "",
+ wclas ? wclas : "");
+
+ if (wname) free(wname);
+ if (wclas) free(wclas);
+ wname = wclas = NULL;
+ pid = cid = 0;
+ i++;
+ }
+ fprintf(fs, "E-----------------------------------------------------------------------------------------------------------------------------\n");
+}
+
+static void
+_e_mod_comp_debug_canvas_info_dump(E_Comp *c,
+ E_Comp_Canvas *canvas,
+ FILE *fs)
+{
+ Eina_List *l;
+ E_Comp_Object *co, *_co = NULL;
+ E_Comp_Win *cw, *_cw = NULL;
+ int x, y, w, h, i = 1;
+ const char *file = NULL, *group = NULL;
+ double val = 0.0;
+ fprintf(fs, "B-----------------------------------------------------------------------------------------------------------------------------\n");
+ fprintf(fs, " canvas->zone:%p num:%d %d,%d %dx%d\n",
+ canvas->zone, canvas->zone->num,
+ canvas->zone->x, canvas->zone->y,
+ canvas->zone->w, canvas->zone->h);
+ fprintf(fs, " c->nocomp:%d use_hw_ov:%d\n", c->nocomp, c->use_hw_ov);
+ fprintf(fs, " canvas->nocomp mode:%d force_composite:%d(ref:%d)\n", canvas->nocomp.mode, canvas->nocomp.force_composite, canvas->nocomp.comp_ref);
+ fprintf(fs, " canvas->nocomp cw:0x%08x\n", e_mod_comp_util_client_xid_get(canvas->nocomp.cw));
+ fprintf(fs, " canvas->animation run:%d num:%d\n", canvas->animation.run, canvas->animation.num);
+ fprintf(fs, " H/W ov win:%p\n", canvas->ov);
+ fprintf(fs, " Canvas Manual Render State: %d\n", ecore_evas_manual_render_get(canvas->ee));
+ fprintf(fs, "------------------------------------------------------------------------------------------------------------------------------\n");
+
+ fprintf(fs, "--------------------------------------------------------------------------------------------------------------------------------------\n");
+ fprintf(fs, " NO WinID shobj obj found_o ex ey ew eh | W S O | V SYNC DMG DONE |\n");
+ fprintf(fs, "--------------------------------------------------------------------------------------------------------------------------------------\n");
+ Evas_Object *o = evas_object_top_get(canvas->evas);
+ Eina_Bool found = 0;
+ while (o)
+ {
+ EINA_INLIST_REVERSE_FOREACH(c->wins, cw)
+ {
+ if (!cw) break;
+ EINA_LIST_FOREACH(cw->objs, l, co)
+ {
+ if (!co) continue;
+ if (co->canvas != canvas) continue;
+ if (co->shadow == o)
+ {
+ found = 1;
+ _co = co;
+ _cw = cw;
+ break;
+ }
+ }
+ }
+
+ if (found && _co && _cw && _cw->visible)
+ {
+ edje_object_file_get(_co->shadow, &file, &group);
+ evas_object_geometry_get(o, &x, &y, &w, &h);
+
+ fprintf(fs,
+ " %2d 0x%07x %p %p %p %4d %4d %4dx%4d %s %s|%s|%s %.1f|%s %.1f|%s %.1f\n",
+ i, _cw->win, _co->shadow, _co->img, o, x, y, w, h,
+ evas_object_visible_get(_co->shadow) ? "v" : "",
+ _cw->hidden_override ? "HIDDEN" : "",
+ group,
+ edje_object_part_state_get(_co->shadow, "clipper", &val), val,
+ edje_object_part_state_get(_co->shadow, "shower", &val), val,
+ edje_object_part_state_get(_co->shadow, "e.swallow.content", &val), val);
+ }
+
+ o = evas_object_below_get(o);
+ found = 0;
+ _co = NULL;
+ _cw = NULL;
+ file = NULL;
+ group = NULL;
+ val = 0.0;
+ i++;
+ }
+}
+
+/* externally accessible globals */
+EINTERN int logtype = LT_NOTHING;
+
+/* externally accessible functions */
+EINTERN Eina_Bool
+e_mod_comp_debug_info_dump(Eina_Bool to_file,
+ const char *name)
+{
+ E_Comp *c;
+ E_Comp_Canvas *canvas;
+ Eina_List *l;
+ FILE *fs = stderr;
+
+ c = e_mod_comp_util_get();
+ E_CHECK_RETURN(c, 0);
+
+ 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;
+ }
+ }
+
+ _e_mod_comp_debug_wins_info_dump(c, fs);
+
+ EINA_LIST_FOREACH(c->canvases, l, canvas)
+ {
+ if (!canvas) continue;
+ _e_mod_comp_debug_canvas_info_dump(c, canvas, fs);
+ }
+
+ if (to_file)
+ {
+ fflush(fs);
+ fclose(fs);
+ }
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_comp_debug_edje_error_get(Evas_Object *o,
+ Ecore_X_Window win)
+{
+ int err = EDJE_LOAD_ERROR_NONE;
+ E_CHECK_RETURN(o, 0);
+
+ if ((err = edje_object_load_error_get(o)) != EDJE_LOAD_ERROR_NONE)
+ {
+ switch (err)
+ {
+ 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;
+}
+
+EINTERN Eina_Bool
+e_mod_comp_debug_prop_handle(Ecore_X_Event_Window_Property *ev)
+{
+ Eina_Bool res = EINA_FALSE;
+ E_Mod_Comp_Log_Info info = {LT_NOTHING, {0,}};
+ unsigned char* data = NULL;
+ int ret, n;
+
+ E_CHECK_RETURN(ev, 0);
+ E_CHECK_RETURN(ev->win, 0);
+
+ ret = ecore_x_window_prop_property_get
+ (ev->win, ATOM_CM_LOG, ECORE_X_ATOM_CARDINAL,
+ 32, &data, &n);
+ E_CHECK_GOTO((ret != -1), cleanup);
+ E_CHECK_GOTO(((ret > 0) && (data)), cleanup);
+
+ memcpy(&info, data, sizeof(E_Mod_Comp_Log_Info));
+ logtype = info.type;
+
+ fprintf(stdout, "[COMP] logtupe:0x%08x\n", logtype);
+
+ if (logtype == LT_CREATE)
+ {
+ e_mod_comp_debug_info_dump(EINA_FALSE, NULL);
+ }
+ else if (logtype == LT_CONFIGURE)
+ {
+ int enable = e_configure_registry_exists("appearance/comp");
+ if (enable)
+ {
+ E_Comp *c = e_mod_comp_util_get();
+ E_CHECK_RETURN(c, 0);
+ e_scale_update();
+ e_configure_registry_call("appearance/comp",
+ e_container_current_get(c->man),
+ NULL);
+ }
+ }
+ else if (logtype == LT_DRAW)
+ {
+ E_Comp *c = e_mod_comp_util_get();
+ E_Comp_Canvas *canvas;
+ Eina_List *l = NULL;
+ char msg[4096], buf[2048];
+
+ snprintf(msg, sizeof(msg), "This is a test dialog for debugging purpose.");
+
+ EINA_LIST_FOREACH(c->canvases, l, canvas)
+ {
+ snprintf(buf, sizeof(buf),
+ "<br>"
+ "Zone[%d] %d,%d %dx%d<br>"
+ "%s 0x%x F:%d(%d) A:%d(%d)",
+ canvas->zone->num,
+ canvas->zone->x,
+ canvas->zone->y,
+ canvas->zone->w,
+ canvas->zone->h,
+ (canvas->nocomp.mode == E_NOCOMP_MODE_RUN) ? "No composite" : "Composite",
+ e_mod_comp_util_client_xid_get(canvas->nocomp.cw),
+ canvas->nocomp.force_composite,
+ canvas->nocomp.comp_ref,
+ canvas->animation.run,
+ canvas->animation.num);
+
+ strcat(msg, buf);
+ }
+ e_util_dialog_internal("Enlightenment Rendering Mode", msg);
+ }
+
+ if ((logtype == LT_DUMP) &&
+ (strlen(info.file) > 0))
+ {
+ e_mod_comp_debug_info_dump(EINA_TRUE, info.file);
+ ecore_x_client_message32_send
+ (ev->win, ATOM_CM_LOG_DUMP_DONE,
+ ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
+ 0, 0, 0, 0, 0);
+ }
+
+ res = EINA_TRUE;
+
+cleanup:
+ if (data) E_FREE(data);
+ return res;
+}
+
+#if COMP_DEBUG_PIXMAP
+# ifdef ecore_x_composite_name_window_pixmap_get
+# undef ecore_x_composite_name_window_pixmap_get
+# endif
+EINTERN Ecore_X_Pixmap
+e_mod_comp_debug_name_window_pixmap_get(Ecore_X_Window w,
+ const char *f,
+ const int l)
+{
+ Ecore_X_Pixmap p = 0;
+ Ecore_X_Window win = 0;
+ E_Border *bd = NULL;
+
+ p = ecore_x_composite_name_window_pixmap_get(w);
+ bd = e_border_find_by_window(w);
+ if (bd) win = bd->client.win;
+ fprintf(stderr,
+ "[COMP] %30.30s|%04d 0x%08x NEW PIXMAP 0x%x\n",
+ f, l, win, p);
+ return p;
+}
+#endif /* COMP_DEBUG_PIXMAP */
--- /dev/null
+#ifdef E_TYPEDEFS
+#else
+#ifndef E_MOD_COMP_DEBUG_H
+#define E_MOD_COMP_DEBUG_H
+
+#define E_CHECK(x) do {if (!(x)) return; } while(0)
+#define E_CHECK_RETURN(x, r) do {if (!(x)) return (r);} while(0)
+#define E_CHECK_GOTO(x, l) do {if (!(x)) goto l; } while(0)
+
+#define COMP_LOG_BUILD_ENABLE 1
+
+#if COMP_LOG_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
+
+extern EINTERN int logtype;
+
+# include <stdarg.h>
+# define L(t, f, x...) { \
+ if (logtype & t) \
+ { \
+ if (t == LT_EVENT_X) \
+ printf("|%1.5f|", ecore_time_unix_get()); \
+ printf(f, ##x); \
+ } \
+}
+#else
+# define L(...) { ; }
+#endif /* COMP_LOG_BUILD_ENABLE */
+
+#define COMP_DEBUG_PIXMAP 0
+
+#if COMP_DEBUG_PIXMAP
+EINTERN Ecore_X_Pixmap e_mod_comp_debug_name_window_pixmap_get(Ecore_X_Window w, const char *f, const int l);
+
+#define ecore_x_composite_name_window_pixmap_get(w) \
+ e_mod_comp_debug_name_window_pixmap_get(w, __func__, __LINE__)
+
+#define ecore_x_pixmap_free(p) { \
+ ecore_x_pixmap_free(p); \
+ fprintf(stderr, \
+ "[COMP] %30.30s|%04d 0x%08x FREE PIXMAP 0x%x\n", \
+ __func__, __LINE__, e_mod_comp_util_client_xid_get(cw), p); \
+}
+#endif /* COMP_DEBUG_PIXMAP */
+
+EINTERN Eina_Bool e_mod_comp_debug_info_dump(Eina_Bool to_file, const char *name);
+EINTERN Eina_Bool e_mod_comp_debug_edje_error_get(Evas_Object *o, Ecore_X_Window win);
+EINTERN Eina_Bool e_mod_comp_debug_prop_handle(Ecore_X_Event_Window_Property *ev);
+
+#endif
+#endif
--- /dev/null
+#include "e_mod_comp_shared_types.h"
+#include "e_mod_comp.h"
+#include "e_mod_comp_atoms.h"
+#include "e_mod_comp_debug.h"
+#include "e_mod_comp_effect_tm.h"
+#include <X11/Xlib.h>
+
+struct _E_Comp_Effect_Type
+{
+ Eina_Bool animatable : 1; // if this valuse is true then window can show animaton.
+ E_Comp_Effect_Style show; // indicate show effect type
+ E_Comp_Effect_Style hide; // indicate hide effect type
+ E_Comp_Effect_Style restack; // indicate restack effect type
+ E_Comp_Effect_Style rotation; // indicate rotation effect type
+ E_Comp_Effect_Style focusin; // indicate focus in effect type
+ E_Comp_Effect_Style focusout; // indicate focus out effect type
+};
+
+struct _E_Comp_Effect_Job
+{
+ Evas_Object *o;
+ E_Comp_Canvas *canvas;
+ Ecore_X_Window win;
+ char emission[1024];
+ char src[1024];
+ Eina_Bool emitted;
+ Eina_Bool wait_previous_effect_done;
+};
+
+static Eina_List *effect_jobs = NULL;
+
+/* local subsystem functions */
+static E_Comp_Effect_Style _effect_style_get(Ecore_X_Atom a);
+static void _bg_show(E_Comp_Win *cw);
+static void _bg_hide(E_Comp_Win *cw);
+static void _effect_stage_enable(E_Comp_Win *cw, E_Comp_Win *cw2);
+static Eina_Bool _state_send(E_Comp_Win *cw, Eina_Bool state);
+static Eina_Bool _effect_animating_check(const char *emission);
+static Ecore_X_Window _comp_win_xid_get(E_Comp_Win *cw);
+static Eina_Bool _effect_signal_del_intern(E_Comp_Win *cw, Evas_Object *obj, const char *name, Eina_Bool clean_all);
+
+/* externally accessible functions */
+EINTERN Eina_Bool
+e_mod_comp_effect_signal_del(E_Comp_Win *cw,
+ Evas_Object *obj,
+ const char *name)
+{
+ return _effect_signal_del_intern(cw, obj, name, EINA_FALSE);
+}
+
+EINTERN Eina_Bool
+e_mod_comp_effect_jobs_clean(E_Comp_Win *cw,
+ Evas_Object *obj,
+ const char *name)
+{
+ return _effect_signal_del_intern(cw, obj, name, EINA_TRUE);
+}
+
+EINTERN Eina_Bool
+e_mod_comp_effect_signal_flush(void)
+{
+ E_Comp_Effect_Job *job;
+ Eina_List *l;
+ E_Comp_Win *cw;
+
+ EINA_LIST_FOREACH(effect_jobs, l, job)
+ {
+ if (!job) continue;
+ if (job->emitted) continue;
+
+ if ((job->win) && (job->canvas))
+ {
+ if ((cw = e_mod_comp_win_find(job->win)))
+ {
+ if (cw->animating)
+ {
+ job->wait_previous_effect_done = EINA_TRUE;
+ continue;
+ }
+ else
+ {
+ if (strncmp(job->emission, "e,state,raise_above_post,on", sizeof("e,state,raise_above_post,on")) == 0)
+ {
+ // special contonl this signal
+ edje_object_signal_emit(job->o, job->emission, job->src);
+ effect_jobs = eina_list_remove(effect_jobs, job);
+ E_FREE(job);
+ }
+ else
+ {
+ e_mod_comp_effect_animating_set(cw->c, cw, EINA_TRUE);
+ job->canvas->animation.run = 1;
+ job->canvas->animation.num++;
+ job->emitted = EINA_TRUE;
+
+ if (job->wait_previous_effect_done)
+ {
+ // do check effectable & signal emit
+ // or send_done and do not send signal emit
+ if ((strncmp(job->emission, "e,state,visible,on", sizeof("e,state,visible,on")) == 0) ||
+ /* e,state,window,angle is used for keyboard show effect */
+ (strncmp(job->emission, "e,state,window,angle", sizeof("e,state,window,angle")) == 0) ||
+ (strncmp(job->emission, "e,state,visible,off", sizeof("e,state,visible,off")) == 0))
+ {
+ // do effect signal emit
+ edje_object_signal_emit(job->o, job->emission, job->src);
+ }
+ else if (strncmp(job->emission, "e,state,background,visible,off", sizeof("e,state,background,visible,off")) == 0)
+ {
+ e_mod_comp_explicit_background_hide_done(cw);
+ }
+ else if (strncmp(job->emission, "e,state,background,visible,on", sizeof("e,state,background,visible,on")) == 0)
+ {
+ e_mod_comp_explicit_background_show_done(cw);
+ }
+ else if (strncmp(job->emission, "e,state,window,rotation,", sizeof("e,state,window,rotation,")) == 0)
+ {
+ e_mod_comp_explicit_win_rotation_done(cw);
+ }
+ else if (strncmp(job->emission, "e,state,raise_above,on", sizeof("e,state,raise_above,on")) == 0)
+ {
+ e_mod_comp_explicit_raise_above_show_done(cw);
+ }
+ else if (strncmp(job->emission, "e,state,raise_above,off", sizeof("e,state,raise_above,off")) == 0)
+ {
+ e_mod_comp_explicit_raise_above_hide_done(cw);
+ }
+ }
+ else
+ {
+ edje_object_signal_emit(job->o, job->emission, job->src);
+ }
+ }
+ }
+ }
+ else
+ {
+ // if cw is not exist then clear effect job
+ effect_jobs = eina_list_remove(effect_jobs, job);
+ E_FREE(job);
+ }
+ }
+ else
+ { // effect for not window ex) capture. etc...
+ edje_object_signal_emit(job->o, job->emission, job->src);
+ effect_jobs = eina_list_remove(effect_jobs, job);
+ E_FREE(job);
+ }
+ }
+
+ return 1;
+}
+
+EINTERN E_Comp_Effect_Type *
+e_mod_comp_effect_type_new(void)
+{
+ E_Comp_Effect_Type *t;
+ t = E_NEW(E_Comp_Effect_Type, 1);
+ E_CHECK_RETURN(t, 0);
+ t->animatable = EINA_TRUE;
+ return t;
+}
+
+EINTERN void
+e_mod_comp_effect_type_free(E_Comp_Effect_Type *type)
+{
+ E_CHECK(type);
+ E_FREE(type);
+}
+
+EINTERN Eina_Bool
+e_mod_comp_effect_type_setup(E_Comp_Effect_Type *type,
+ Ecore_X_Window win)
+{
+ E_CHECK_RETURN(type, 0);
+ E_CHECK_RETURN(win, 0);
+
+ e_mod_comp_effect_state_setup(type, win);
+ e_mod_comp_effect_style_setup(type, win);
+
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_comp_effect_state_setup(E_Comp_Effect_Type *type,
+ 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;
+ Eina_Bool is_ok;
+
+ E_CHECK_RETURN(type, 0);
+ E_CHECK_RETURN(win, 0);
+
+ dpy = ecore_x_display_get();
+ ret = XGetWindowProperty(dpy, win, ATOM_WINDOW_EFFECT_ENABLE, 0, LONG_MAX,
+ False, ECORE_X_ATOM_CARDINAL, &type_ret, &size_ret,
+ &num_ret, &bytes, &prop_ret);
+ if (ret == 0) // success
+ {
+ if (prop_ret && num_ret)
+ {
+ type->animatable = prop_ret[0];
+ is_ok = EINA_TRUE;
+ }
+ else
+ is_ok = EINA_FALSE;
+ }
+ else // error
+ {
+ is_ok = EINA_FALSE;
+ }
+
+ if (prop_ret) XFree(prop_ret);
+ return is_ok;
+}
+
+EINTERN Eina_Bool
+e_mod_comp_effect_state_get(E_Comp_Effect_Type *type)
+{
+ E_CHECK_RETURN(type, 0);
+ return type->animatable;
+}
+
+EINTERN Eina_Bool
+e_mod_comp_effect_style_setup(E_Comp_Effect_Type *type,
+ Ecore_X_Window win)
+{
+ Ecore_X_Atom *atoms = NULL;
+ Eina_Bool res = EINA_FALSE;
+ int num = 0;
+
+ E_CHECK_RETURN(type, 0);
+ E_CHECK_RETURN(win, 0);
+
+ num = ecore_x_window_prop_atom_list_get
+ (win, ATOM_WINDOW_EFFECT_TYPE, &atoms);
+ E_CHECK_GOTO((num == 6), cleanup);
+ E_CHECK_GOTO(atoms, cleanup);
+
+ type->show = _effect_style_get(atoms[0]);
+ type->hide = _effect_style_get(atoms[1]);
+ type->restack = _effect_style_get(atoms[2]);
+ type->rotation = _effect_style_get(atoms[3]);
+ type->focusin = _effect_style_get(atoms[4]);
+ type->focusout = _effect_style_get(atoms[5]);
+
+ res = EINA_TRUE;
+
+cleanup:
+ if (atoms) E_FREE(atoms);
+ return res;
+}
+
+EINTERN E_Comp_Effect_Style
+e_mod_comp_effect_style_get(E_Comp_Effect_Type *type,
+ E_Comp_Effect_Kind kind)
+{
+ E_Comp_Effect_Style res;
+ E_CHECK_RETURN(type, E_COMP_EFFECT_STYLE_NONE);
+ switch (kind)
+ {
+ case E_COMP_EFFECT_KIND_SHOW: res = type->show; break;
+ case E_COMP_EFFECT_KIND_HIDE: res = type->hide; break;
+ case E_COMP_EFFECT_KIND_RESTACK: res = type->restack; break;
+ case E_COMP_EFFECT_KIND_ROTATION: res = type->rotation; break;
+ case E_COMP_EFFECT_KIND_FOCUSIN: res = type->focusin; break;
+ case E_COMP_EFFECT_KIND_FOCUSOUT: res = type->focusout; break;
+ default: res = E_COMP_EFFECT_STYLE_NONE; break;
+ }
+ return res;
+}
+
+EINTERN void
+e_mod_comp_effect_win_show(E_Comp_Win *cw)
+{
+ E_Comp_Effect_Style st;
+ Eina_Bool animatable, launch;
+ char emission[64];
+ E_CHECK(cw);
+ E_CHECK(cw->c);
+
+ cw->first_show_worked = EINA_TRUE;
+
+ animatable = e_mod_comp_effect_state_get(cw->eff_type);
+ st = e_mod_comp_effect_style_get
+ (cw->eff_type,
+ E_COMP_EFFECT_KIND_SHOW);
+
+ if (cw->c->fake_image_launch)
+ {
+ if ((e_mod_comp_effect_image_launch_window_check(cw->c->eff_img, cw)) &&
+ (e_mod_comp_effect_image_launch_running_check(cw->c->eff_img)))
+ {
+ if (e_mod_comp_effect_image_launch_fake_show_done_check(cw->c->eff_img))
+ {
+ e_mod_comp_effect_image_launch_disable(cw->c->eff_img);
+ e_mod_comp_effect_signal_add(cw, NULL, "e,state,visible,on,noeffect", "e");
+ goto postjob;
+ }
+ else
+ e_mod_comp_effect_image_launch_window_set(cw->c->eff_img, cw->win);
+ return;
+ }
+ }
+
+ if (!cw->c->animatable ||
+ !animatable)
+ {
+ e_mod_comp_effect_signal_add
+ (cw, NULL, "e,state,visible,on,noeffect", "e");
+ goto postjob;
+ }
+
+ switch (st)
+ {
+ case E_COMP_EFFECT_STYLE_DEFAULT:
+ launch = e_mod_comp_policy_app_launch_check(cw);
+ if (launch) _bg_show(cw);
+
+ if (TYPE_KEYBOARD_CHECK(cw))
+ {
+ if (cw->c->keyboard_effect)
+ {
+ if (e_mod_comp_effect_win_angle_get(cw))
+ {
+ snprintf(emission, sizeof(emission),
+ "e,state,window,angle,%d", cw->angle);
+ e_mod_comp_effect_signal_add(cw, NULL, emission, "e");
+ }
+ else
+ e_mod_comp_effect_signal_add
+ (cw, NULL, "e,state,window,angle,0", "e");
+ }
+ else
+ e_mod_comp_effect_signal_add
+ (cw, NULL, "e,state,visible,on,noeffect", "e");
+ }
+ else
+ e_mod_comp_effect_signal_add
+ (cw, NULL, "e,state,visible,on", "e");
+ break;
+ case E_COMP_EFFECT_STYLE_NONE:
+ e_mod_comp_effect_signal_add
+ (cw, NULL, "e,state,visible,on,noeffect", "e");
+ break;
+ case E_COMP_EFFECT_STYLE_CUSTOM0:
+ if (TYPE_INDICATOR_CHECK(cw))
+ {
+ switch (cw->angle)
+ {
+ case 90:
+ e_mod_comp_effect_signal_add
+ (cw, NULL, "e,state,visible,on,custom0,90", "e");
+ break;
+ case 180:
+ e_mod_comp_effect_signal_add
+ (cw, NULL, "e,state,visible,on,custom0,180", "e");
+ break;
+ case 270:
+ e_mod_comp_effect_signal_add
+ (cw, NULL, "e,state,visible,on,custom0,270", "e");
+ break;
+ case 0:
+ default:
+ e_mod_comp_effect_signal_add
+ (cw, NULL, "e,state,visible,on,custom0,0", "e");
+ break;
+ }
+ }
+ else
+ {
+ e_mod_comp_effect_signal_add
+ (cw, NULL, "e,state,visible,on,custom0", "e");
+ }
+ break;
+ case E_COMP_EFFECT_STYLE_CUSTOM1:
+ e_mod_comp_effect_signal_add
+ (cw, NULL, "e,state,visible,on,custom1", "e");
+ break;
+ default:
+ e_mod_comp_effect_signal_add
+ (cw, NULL, "e,state,visible,on", "e");
+ break;
+ }
+
+postjob:
+ e_mod_comp_comp_event_src_visibility_send(cw);
+}
+
+EINTERN Eina_Bool
+e_mod_comp_effect_win_hide(E_Comp_Win *cw)
+{
+ E_Comp_Effect_Style st;
+ Eina_Bool animatable, close;
+ char emission[64];
+ E_CHECK_RETURN(cw, 0);
+ E_CHECK_RETURN(cw->c, 0);
+ E_CHECK_RETURN((!cw->input_only), 0);
+ E_CHECK_RETURN((!cw->invalid), 0);
+
+ animatable = e_mod_comp_effect_state_get(cw->eff_type);
+ st = e_mod_comp_effect_style_get
+ (cw->eff_type,
+ E_COMP_EFFECT_KIND_HIDE);
+
+ if ((!cw->c->animatable) ||
+ (!animatable))
+ {
+ e_mod_comp_effect_signal_add
+ (cw, NULL, "e,state,visible,off,noeffect", "e");
+ goto postjob;
+ }
+
+ switch (st)
+ {
+ case E_COMP_EFFECT_STYLE_DEFAULT:
+ close = e_mod_comp_policy_app_close_check(cw);
+ if (!cw->animating && close)
+ _bg_hide(cw);
+ if (TYPE_KEYBOARD_CHECK(cw))
+ {
+ if (cw->c->keyboard_effect)
+ {
+ if (e_mod_comp_effect_win_angle_get(cw))
+ {
+ snprintf(emission, sizeof(emission), "e,state,visible,off,angle,%d", cw->angle);
+ e_mod_comp_effect_signal_add(cw, NULL, emission, "e");
+ }
+ else
+ e_mod_comp_effect_signal_add
+ (cw, NULL, "e,state,visible,off,angle,0", "e");
+ }
+ else
+ e_mod_comp_effect_signal_add
+ (cw, NULL, "e,state,visible,off,noeffect", "e");
+ }
+ else
+ e_mod_comp_effect_signal_add
+ (cw, NULL, "e,state,visible,off", "e");
+ break;
+ case E_COMP_EFFECT_STYLE_NONE:
+ e_mod_comp_effect_signal_add
+ (cw, NULL, "e,state,visible,off,noeffect", "e");
+ break;
+ case E_COMP_EFFECT_STYLE_CUSTOM0:
+ if (TYPE_INDICATOR_CHECK(cw))
+ {
+ switch (cw->angle)
+ {
+ case 90:
+ e_mod_comp_effect_signal_add
+ (cw, NULL, "e,state,visible,off,custom0,90", "e");
+ break;
+ case 180:
+ e_mod_comp_effect_signal_add
+ (cw, NULL, "e,state,visible,off,custom0,180", "e");
+ break;
+ case 270:
+ e_mod_comp_effect_signal_add
+ (cw, NULL, "e,state,visible,off,custom0,270", "e");
+ break;
+ case 0:
+ default:
+ e_mod_comp_effect_signal_add
+ (cw, NULL, "e,state,visible,off,custom0,0", "e");
+ break;
+ }
+ }
+ else
+ {
+ e_mod_comp_effect_signal_add
+ (cw, NULL, "e,state,visible,off,custom0", "e");
+ }
+ break;
+ case E_COMP_EFFECT_STYLE_CUSTOM1:
+ e_mod_comp_effect_signal_add
+ (cw, NULL, "e,state,visible,off,custom1", "e");
+ break;
+ default:
+ e_mod_comp_effect_signal_add
+ (cw, NULL, "e,state,visible,off", "e");
+ break;
+ }
+
+postjob:
+ e_mod_comp_comp_event_src_visibility_send(cw);
+ return EINA_TRUE;
+}
+
+EINTERN void
+e_mod_comp_effect_win_restack(E_Comp_Win *cw,
+ E_Comp_Win *cw2)
+{
+ E_Comp_Win *_cw = cw2;
+ Eina_Inlist *l;
+
+ E_CHECK(cw);
+ E_CHECK(cw2);
+
+ L(LT_EFFECT,
+ "[COMP] %18.18s w:0x%08x %s tm:%d tm->obscured:%d\n",
+ "EFF", e_mod_comp_util_client_xid_get(cw),
+ "RAISE_ABOVE", cw->c->switcher,
+ cw->c->switcher_obscured);
+
+ while (_cw->defer_hide || !(REGION_EQUAL_TO_ROOT(_cw)) ||
+ _cw->input_only || _cw->invalid ||
+ !(TYPE_NORMAL_CHECK(_cw) || TYPE_HOME_CHECK(_cw) ||
+ TYPE_TASKMANAGER_CHECK(_cw)))
+ {
+ l = EINA_INLIST_GET(_cw)->prev;
+ E_CHECK(l);
+ _cw = _EINA_INLIST_CONTAINER(_cw, l);
+ E_CHECK(_cw);
+ }
+ E_CHECK(_cw->visible);
+
+ if (e_mod_comp_policy_app_launch_check(cw))
+ {
+ e_mod_comp_win_comp_objs_stack_above(cw, cw2);
+ _effect_stage_enable(_cw, cw);
+ e_mod_comp_effect_signal_add
+ (_cw, NULL,
+ "e,state,background,visible,on", "e");
+ e_mod_comp_effect_signal_add
+ (cw, NULL, "e,state,raise_above,on", "e");
+ }
+ else if (e_mod_comp_policy_app_close_check(_cw))
+ {
+ if (cw->c->defer_raise_effect)
+ {
+ cw->defer_raise = EINA_TRUE;
+ _cw->defer_raise = EINA_TRUE;
+ }
+ else
+ e_mod_comp_win_comp_objs_stack_above(cw, cw2);
+
+ _effect_stage_enable(cw, _cw);
+ e_mod_comp_effect_signal_add
+ (_cw, NULL, "e,state,raise_above,off", "e");
+ e_mod_comp_effect_signal_add
+ (cw, NULL, "e,state,background,visible,off", "e");
+ }
+ else
+ {
+ e_mod_comp_win_comp_objs_stack_above(cw, cw2);
+ e_mod_comp_effect_signal_add
+ (cw, NULL, "e,state,raise_above,on", "e");
+ }
+}
+
+EINTERN void
+e_mod_comp_effect_win_lower(E_Comp_Win *cw,
+ E_Comp_Win *cw2)
+{
+ Eina_Bool close = EINA_FALSE;
+ E_CHECK(cw);
+ E_CHECK(cw2);
+
+ cw->defer_raise = EINA_TRUE;
+
+ close = e_mod_comp_policy_app_close_check(cw);
+ if (close)
+ {
+ _effect_stage_enable(cw2, cw);
+ e_mod_comp_effect_signal_add
+ (cw2, NULL, "e,state,background,visible,off", "e");
+ }
+
+ e_mod_comp_effect_signal_add
+ (cw, NULL, "e,state,raise_above,off", "e");
+}
+
+EINTERN void
+e_mod_comp_effect_disable_stage(E_Comp *c,
+ E_Comp_Win *cw)
+{
+ E_Comp_Win *_cw;
+ E_Comp_Object *co;
+ Eina_List *l;
+ E_CHECK(c);
+
+ if (cw)
+ {
+ if (!cw->effect_stage) return;
+ cw->effect_stage = 0;
+ }
+
+ E_CHECK(c->effect_stage);
+ c->effect_stage = EINA_FALSE;
+
+ EINA_INLIST_FOREACH(c->wins, _cw)
+ {
+ if (!_cw) continue;
+ if ((_cw->invalid) || (_cw->input_only) ||
+ (!_cw->visible))
+ {
+ // Do recovery state of window visibility
+ // when was window animation effect occured,
+ // unrelated window was hided.
+ _cw->animate_hide = EINA_FALSE;
+ continue;
+ }
+
+ EINA_LIST_FOREACH(_cw->objs, l, co)
+ {
+ if (!co) continue;
+ if (!_cw->animate_hide &&
+ evas_object_visible_get(co->shadow))
+ {
+ continue;
+ }
+ if (!_cw->first_show_worked &&
+ !evas_object_visible_get(co->shadow))
+ {
+ continue;
+ }
+ if (!cw->hidden_override && cw->show_done)
+ evas_object_show(co->shadow);
+ }
+ _cw->animate_hide = 0;
+ }
+}
+
+#define _CHECK(c, s, e) { \
+ if (!strncmp(s, e, strlen(s))) \
+ { \
+ L(LT_EFFECT, \
+ "[COMP] %18.18s w:0x%08x %s\n", \
+ "SIGNAL", \
+ e_mod_comp_util_client_xid_get(c), \
+ e); \
+ } \
+}
+
+EINTERN Eina_Bool
+e_mod_comp_effect_signal_add(E_Comp_Win *cw,
+ Evas_Object *o,
+ const char *emission,
+ const char *src)
+
+{
+ Eina_List *l;
+ E_Comp *c = NULL;
+ E_Comp_Object *co;
+ E_Comp_Effect_Job *job;
+ size_t len;
+
+ E_CHECK_RETURN((cw || o), 0);
+ E_CHECK_RETURN(emission, 0);
+ E_CHECK_RETURN(src, 0);
+
+ if (cw)
+ {
+ c = cw->c;
+
+ E_CHECK_GOTO(_effect_animating_check(emission), finish);
+
+ EINA_LIST_FOREACH(cw->objs, l, co)
+ {
+ if (!co) continue;
+ if (!co->shadow) continue;
+
+ job = E_NEW(E_Comp_Effect_Job, 1);
+ if (!job) continue;
+
+ job->o = co->shadow;
+ job->win = _comp_win_xid_get(cw);
+ job->canvas = co->canvas;
+
+ len = sizeof(job->emission);
+ strncpy(job->emission, emission, len);
+ job->emission[len-1] = '\0';
+
+ len = sizeof(job->src);
+ strncpy(job->src, src, len);
+ job->src[len-1] = '\0';
+
+ effect_jobs = eina_list_append(effect_jobs, job);
+
+ e_mod_comp_hw_ov_win_msg_show
+ (E_COMP_LOG_TYPE_EFFECT,
+ "SIG_ADD 0x%x %s",
+ e_mod_comp_util_client_xid_get(cw),
+ emission);
+ }
+ }
+ else
+ {
+ job = E_NEW(E_Comp_Effect_Job, 1);
+ if (job)
+ {
+ job->o = o;
+
+ len = sizeof(job->emission);
+ strncpy(job->emission, emission, len);
+ job->emission[len-1] = '\0';
+
+ len = sizeof(job->src);
+ strncpy(job->src, src, len);
+ job->src[len-1] = '\0';
+
+ effect_jobs = eina_list_append(effect_jobs, job);
+ }
+ }
+
+ e_mod_comp_effect_signal_flush();
+
+finish:
+
+ if (!(logtype & LT_EFFECT)) return EINA_TRUE;
+
+ _CHECK(cw, "e,state,visible,on", emission);
+ _CHECK(cw, "e,state,visible,on,noeffect", emission);
+ _CHECK(cw, "e,state,visible,on,custom0", emission);
+ _CHECK(cw, "e,state,visible,on,custom0,0", emission);
+ _CHECK(cw, "e,state,visible,on,custom0,90", emission);
+ _CHECK(cw, "e,state,visible,on,custom0,180", emission);
+ _CHECK(cw, "e,state,visible,on,custom0,270", emission);
+ _CHECK(cw, "e,state,visible,on,custom1", emission);
+ _CHECK(cw, "e,state,visible,off", emission);
+ _CHECK(cw, "e,state,visible,off,noeffect", emission);
+ _CHECK(cw, "e,state,visible,off,custom0", emission);
+ _CHECK(cw, "e,state,visible,off,custom0,0", emission);
+ _CHECK(cw, "e,state,visible,off,custom0,90", emission);
+ _CHECK(cw, "e,state,visible,off,custom0,180",emission);
+ _CHECK(cw, "e,state,visible,off,custom0,270",emission);
+ _CHECK(cw, "e,state,visible,off,custom1", emission);
+ _CHECK(cw, "e,state,background,visible,on", emission);
+ _CHECK(cw, "e,state,background,visible,off", emission);
+ _CHECK(cw, "e,state,raise_above,off", emission);
+ _CHECK(cw, "e,state,raise_above_post,on", emission);
+ _CHECK(cw, "e,state,switcher_top,on", emission);
+ _CHECK(cw, "e,state,switcher,on", emission);
+ _CHECK(cw, "e,state,shadow,on", emission);
+ _CHECK(cw, "e,state,shadow,off", emission);
+ _CHECK(cw, "e,state,focus,on", emission);
+ _CHECK(cw, "e,state,focus,off", emission);
+ _CHECK(cw, "e,state,urgent,on", emission);
+ _CHECK(cw, "e,state,urgent,off", emission);
+ _CHECK(cw, "e,state,window,rotation,90", emission);
+ _CHECK(cw, "e,state,window,rotation,180", emission);
+ _CHECK(cw, "e,state,window,rotation,0", emission);
+ _CHECK(cw, "e,state,window,rotation,-180", emission);
+ _CHECK(cw, "e,state,window,rotation,-90", emission);
+ _CHECK(cw, "e,state,rotation,on", emission);
+ _CHECK(cw, "img,state,capture,on", emission);
+ _CHECK(cw, "e,state,window,angle,0", emission);
+ _CHECK(cw, "e,state,window,angle,90", emission);
+ _CHECK(cw, "e,state,window,angle,180", emission);
+ _CHECK(cw, "e,state,window,angle,270", emission);
+ _CHECK(cw, "e,state,visible,off,angle,0", emission);
+ _CHECK(cw, "e,state,visible,off,angle,90", emission);
+ _CHECK(cw, "e,state,visible,off,angle,180", emission);
+ _CHECK(cw, "e,state,visible,off,angle,270", emission);
+
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_comp_effect_animating_set(E_Comp *c,
+ E_Comp_Win *cw,
+ Eina_Bool set)
+{
+ Eina_Bool state;
+ E_CHECK_RETURN(c, 0);
+ E_CHECK_GOTO(cw, postjob);
+
+ if (set)
+ {
+ if (cw->animating)
+ {
+ c->animating--;
+ _state_send(cw, EINA_FALSE);
+ }
+ state = EINA_TRUE;
+ }
+ else
+ {
+ state = EINA_FALSE;
+ }
+
+ cw->animating = state;
+ _state_send(cw, state);
+
+postjob:
+ if (set) c->animating++;
+ else c->animating--;
+ return EINA_TRUE;
+}
+
+/* local subsystem functions */
+static E_Comp_Effect_Style
+_effect_style_get(Ecore_X_Atom a)
+{
+ E_CHECK_RETURN(a, E_COMP_EFFECT_STYLE_NONE);
+
+ if (a == ATOM_EFFECT_DEFAULT) return E_COMP_EFFECT_STYLE_DEFAULT;
+ else if (a == ATOM_EFFECT_NONE ) return E_COMP_EFFECT_STYLE_NONE;
+ else if (a == ATOM_EFFECT_CUSTOM0) return E_COMP_EFFECT_STYLE_CUSTOM0;
+ else if (a == ATOM_EFFECT_CUSTOM1) return E_COMP_EFFECT_STYLE_CUSTOM1;
+ else if (a == ATOM_EFFECT_CUSTOM2) return E_COMP_EFFECT_STYLE_CUSTOM2;
+ else if (a == ATOM_EFFECT_CUSTOM3) return E_COMP_EFFECT_STYLE_CUSTOM3;
+ else if (a == ATOM_EFFECT_CUSTOM4) return E_COMP_EFFECT_STYLE_CUSTOM4;
+ else if (a == ATOM_EFFECT_CUSTOM5) return E_COMP_EFFECT_STYLE_CUSTOM5;
+ else if (a == ATOM_EFFECT_CUSTOM6) return E_COMP_EFFECT_STYLE_CUSTOM6;
+ else if (a == ATOM_EFFECT_CUSTOM7) return E_COMP_EFFECT_STYLE_CUSTOM7;
+ else if (a == ATOM_EFFECT_CUSTOM8) return E_COMP_EFFECT_STYLE_CUSTOM8;
+ else if (a == ATOM_EFFECT_CUSTOM9) return E_COMP_EFFECT_STYLE_CUSTOM9;
+
+ return E_COMP_EFFECT_STYLE_NONE;
+}
+
+static void
+_bg_show(E_Comp_Win *cw)
+{
+ E_Comp_Win *bg_cw = NULL;
+ bg_cw = e_mod_comp_util_win_below_get(cw, 0);
+ E_CHECK(bg_cw);
+
+ _effect_stage_enable(cw, bg_cw);
+ e_mod_comp_effect_signal_add
+ (bg_cw, NULL,
+ "e,state,background,visible,on", "e");
+}
+
+static void
+_bg_hide(E_Comp_Win *cw)
+{
+ E_Comp_Win *bg_cw = NULL;
+ bg_cw = e_mod_comp_util_win_below_get(cw, 0);
+ E_CHECK(bg_cw);
+
+ _effect_stage_enable(cw, bg_cw);
+ e_mod_comp_effect_signal_add
+ (bg_cw, NULL,
+ "e,state,background,visible,off", "e");
+}
+
+static void
+_effect_stage_enable(E_Comp_Win *cw,
+ E_Comp_Win *cw2)
+{
+ E_Comp_Win *_cw = cw;
+ Eina_Inlist *l;
+ E_Comp_Canvas *canvas;
+ Eina_List *ll;
+ E_Comp_Object *co;
+ Eina_Bool visible = 0;
+ E_CHECK(cw);
+ E_CHECK(cw2);
+
+ // do hide window which is not related window animation effect.
+ while ((l = EINA_INLIST_GET(_cw)->prev) != NULL)
+ {
+ visible = 0;
+ _cw = _EINA_INLIST_CONTAINER(_cw, l);
+ E_CHECK(_cw);
+ if ((_cw->invalid) || (_cw->input_only) ||
+ (_cw->win == cw->win) ||
+ (_cw->win == cw2->win) ||
+ TYPE_INDICATOR_CHECK(_cw))
+ {
+ continue;
+ }
+
+ EINA_LIST_FOREACH(_cw->objs, ll, co)
+ {
+ if (!co) continue;
+ if (evas_object_visible_get(co->shadow))
+ {
+ visible = 1;
+ break;
+ }
+ }
+ if (!visible) continue;
+
+ _cw->animate_hide = EINA_TRUE;
+
+ EINA_LIST_FOREACH(_cw->objs, ll, co)
+ {
+ if (!co) continue;
+ evas_object_hide(co->shadow);
+ }
+ }
+
+ EINA_LIST_FOREACH(cw->c->canvases, ll, canvas)
+ {
+ if (!canvas) continue;
+ if (canvas->use_bg_img) continue;
+ evas_object_lower(canvas->bg_img);
+ }
+
+ EINA_LIST_FOREACH(cw->objs, ll, co)
+ {
+ if (!co) continue;
+ if (!cw->hidden_override && cw->show_done)
+ evas_object_show(co->shadow);
+ }
+ EINA_LIST_FOREACH(cw2->objs, ll, co)
+ {
+ if (!co) continue;
+ if (!cw2->hidden_override && cw2->show_done)
+ evas_object_show(co->shadow);
+ }
+
+ cw->animate_hide = EINA_FALSE;
+ cw2->animate_hide = EINA_FALSE;
+ cw->effect_stage = EINA_TRUE;
+ cw->c->effect_stage = EINA_TRUE;
+}
+
+static Eina_Bool
+_state_send(E_Comp_Win *cw,
+ Eina_Bool state)
+{
+ long d[5] = {0L, 0L, 0L, 0L, 0L};
+ Ecore_X_Window win;
+ E_CHECK_RETURN(cw, 0);
+
+ win = e_mod_comp_util_client_xid_get(cw);
+ E_CHECK_RETURN(win, 0);
+
+ if (state) d[0] = 1L;
+ else d[1] = 1L;
+
+ ecore_x_client_message32_send
+ (win, ATOM_WINDOW_EFFECT_CLIENT_STATE,
+ ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
+ d[0], d[1], d[2], d[3], d[4]);
+
+ return EINA_TRUE;
+}
+
+#define _STR_CHECK(s1,s2) (!(strncmp(s1, s2, strlen(s2))))
+
+static Eina_Bool
+_effect_animating_check(const char *emission)
+{
+ Eina_Bool ret = EINA_TRUE;
+ E_CHECK_RETURN(emission, 0);
+
+ if (_STR_CHECK(emission, "e,state,shadow,on"))
+ ret = EINA_FALSE;
+ else if (_STR_CHECK(emission, "e,state,shadow,off"))
+ ret = EINA_FALSE;
+ else if (_STR_CHECK(emission, "e,state,focus,on"))
+ ret = EINA_FALSE;
+ else if (_STR_CHECK(emission, "e,state,focus,off"))
+ ret = EINA_FALSE;
+ else if (_STR_CHECK(emission, "e,state,urgent,on"))
+ ret = EINA_FALSE;
+ else if (_STR_CHECK(emission, "e,state,urgent,off"))
+ ret = EINA_FALSE;
+ else
+ ret = EINA_TRUE;
+
+ return ret;
+}
+
+static Ecore_X_Window
+_comp_win_xid_get(E_Comp_Win *cw)
+{
+ E_CHECK_RETURN(cw, 0);
+ return cw->win;
+}
+
+static Eina_Bool
+_effect_signal_del_intern(E_Comp_Win *cw,
+ Evas_Object *obj,
+ const char *name,
+ Eina_Bool clean_all)
+{
+ E_Comp_Effect_Job *job;
+ Eina_List *l;
+ EINA_LIST_FOREACH(effect_jobs, l, job)
+ {
+ if (!job) continue;
+ if (!job->emitted) continue;
+ if (!job->win) continue;
+ if (!job->canvas) continue;
+
+ if (job->win == _comp_win_xid_get(cw))
+ {
+ job->canvas->animation.num--;
+
+ if (job->canvas->animation.num <= 0)
+ {
+ job->canvas->animation.run = 0;
+ job->canvas->animation.num = 0;
+ }
+
+ e_mod_comp_hw_ov_win_msg_show
+ (E_COMP_LOG_TYPE_EFFECT,
+ "SIG_DEL 0x%x %s",
+ job->win, job->emission);
+
+ effect_jobs = eina_list_remove(effect_jobs, job);
+
+ E_FREE(job);
+
+ if (!clean_all) break;
+ }
+ }
+ return EINA_TRUE;
+}
--- /dev/null
+#ifdef E_TYPEDEFS
+#else
+#ifndef E_MOD_COMP_EFFECT_H
+#define E_MOD_COMP_EFFECT_H
+
+typedef enum _E_Comp_Effect_Style E_Comp_Effect_Style;
+typedef enum _E_Comp_Effect_Kind E_Comp_Effect_Kind;
+typedef struct _E_Comp_Effect_Type E_Comp_Effect_Type;
+typedef struct _E_Comp_Effect_Job E_Comp_Effect_Job;
+
+enum _E_Comp_Effect_Style
+{
+ E_COMP_EFFECT_STYLE_DEFAULT = 0,
+ E_COMP_EFFECT_STYLE_NONE,
+ E_COMP_EFFECT_STYLE_CUSTOM0,
+ E_COMP_EFFECT_STYLE_CUSTOM1,
+ E_COMP_EFFECT_STYLE_CUSTOM2,
+ E_COMP_EFFECT_STYLE_CUSTOM3,
+ E_COMP_EFFECT_STYLE_CUSTOM4,
+ E_COMP_EFFECT_STYLE_CUSTOM5,
+ E_COMP_EFFECT_STYLE_CUSTOM6,
+ E_COMP_EFFECT_STYLE_CUSTOM7,
+ E_COMP_EFFECT_STYLE_CUSTOM8,
+ E_COMP_EFFECT_STYLE_CUSTOM9
+};
+
+enum _E_Comp_Effect_Kind
+{
+ E_COMP_EFFECT_KIND_SHOW = 0,
+ E_COMP_EFFECT_KIND_HIDE,
+ E_COMP_EFFECT_KIND_RESTACK,
+ E_COMP_EFFECT_KIND_ROTATION,
+ E_COMP_EFFECT_KIND_FOCUSIN,
+ E_COMP_EFFECT_KIND_FOCUSOUT
+};
+
+/* window effect type functions */
+EINTERN E_Comp_Effect_Type *e_mod_comp_effect_type_new(void);
+EINTERN void e_mod_comp_effect_type_free(E_Comp_Effect_Type *type);
+EINTERN Eina_Bool e_mod_comp_effect_type_setup(E_Comp_Effect_Type *type, Ecore_X_Window win);
+EINTERN Eina_Bool e_mod_comp_effect_state_setup(E_Comp_Effect_Type *type, Ecore_X_Window win);
+EINTERN Eina_Bool e_mod_comp_effect_state_get(E_Comp_Effect_Type *type);
+EINTERN Eina_Bool e_mod_comp_effect_style_setup(E_Comp_Effect_Type *type, Ecore_X_Window win);
+EINTERN E_Comp_Effect_Style e_mod_comp_effect_style_get(E_Comp_Effect_Type *type, E_Comp_Effect_Kind kind);
+
+/* window effect functions */
+EINTERN void e_mod_comp_effect_win_show(E_Comp_Win *cw);
+EINTERN Eina_Bool e_mod_comp_effect_win_hide(E_Comp_Win *cw);
+EINTERN void e_mod_comp_effect_win_restack(E_Comp_Win *cw, E_Comp_Win *cw2);
+EINTERN void e_mod_comp_effect_win_lower(E_Comp_Win *cw, E_Comp_Win *cw2);
+EINTERN void e_mod_comp_effect_disable_stage(E_Comp *c, E_Comp_Win *cw);
+EINTERN Eina_Bool e_mod_comp_effect_signal_add(E_Comp_Win *cw, Evas_Object *o, const char *emission, const char *src);
+EINTERN Eina_Bool e_mod_comp_effect_signal_del(E_Comp_Win *cw, Evas_Object *obj, const char *name);
+EINTERN Eina_Bool e_mod_comp_effect_jobs_clean(E_Comp_Win *cw, Evas_Object *obj, const char *name);
+EINTERN Eina_Bool e_mod_comp_effect_signal_flush(void);
+EINTERN Eina_Bool e_mod_comp_effect_animating_set(E_Comp *c, E_Comp_Win *cw, Eina_Bool set);
+
+#endif
+#endif
--- /dev/null
+#include "e_mod_comp_shared_types.h"
+#include "e_mod_comp.h"
+#include "e_mod_comp_atoms.h"
+#include "e_mod_comp_debug.h"
+#include "e_mod_comp_effect_image_launch.h"
+
+struct _E_Comp_Effect_Image_Launch
+{
+ Eina_Bool running : 1;
+ Eina_Bool fake_image_show_done : 1; // image launch edje object got effect done or not.
+ Evas_Object *obj; // image object
+ Evas_Object *shobj; // image shadow object
+ Ecore_Timer *timeout; // max time between show, hide image launch
+ Ecore_X_Window win; // this represent image launch effect's real window id.
+ int w, h; // width and height of image object
+ int rot; // rotation angle
+ int indicator_show; // indicator enable / disable flag
+ Evas_Object* indicator_obj; // plugin indicator object
+ Evas_Object* layer_obj; // evas_object between normal layer with float layer
+};
+
+/* local subsystem functions */
+static void _show_done(void *data, Evas_Object *obj, const char *emission, const char *source);
+static void _hide_done(void *data, Evas_Object *obj, const char *emission, const char *source);
+static Eina_Bool _launch_timeout(void *data);
+static void _invisible_win_hide(E_Comp_Win *cw, Eina_Bool show);
+static E_Comp_Win *_bg_win_get(void);
+static E_Comp_Win *_appinapp_bottom_win_get(E_Comp_Win *normal_top);
+
+/* local subsystem globals */
+
+/* externally accessible functions */
+EINTERN E_Comp_Effect_Image_Launch *
+e_mod_comp_effect_image_launch_new(Evas *e,
+ int w, int h)
+{
+ E_Comp_Effect_Image_Launch *eff;
+ int ok = 0;
+
+ E_Container *con;
+ E_Comp_Win *layers_cw = NULL;
+ Eina_List *ll;
+ E_Comp_Object *co;
+ int layer;
+
+ E_CHECK_RETURN(e, NULL);
+
+ eff = E_NEW(E_Comp_Effect_Image_Launch, 1);
+ E_CHECK_RETURN(eff, NULL);
+
+ eff->shobj = edje_object_add(e);
+ E_CHECK_GOTO(eff->shobj, error);
+
+ //indicator_comp
+ Ecore_Evas *ee;
+ ee = ecore_evas_ecore_evas_get(e);
+ E_CHECK_GOTO(ee, error);
+ eff->indicator_obj = ecore_evas_extn_plug_new(ee);
+ E_CHECK_GOTO(eff->indicator_obj, error);
+
+ ok = edje_object_file_set
+ (eff->shobj,
+ _comp_mod->conf->shadow_file,
+ "fake_effect_fade");
+ E_CHECK_GOTO(ok, error);
+
+ eff->w = w;
+ eff->h = h;
+
+ evas_object_move(eff->shobj, 0, 0);
+ evas_object_resize(eff->shobj, w, h);
+
+ eff->obj = evas_object_image_add(e);
+ E_CHECK_GOTO(eff->obj, error);
+
+ edje_object_signal_callback_add
+ (eff->shobj, "fake,action,hide,done", "fake",
+ _hide_done, eff);
+
+ edje_object_signal_callback_add
+ (eff->shobj, "fake,action,show,done", "fake",
+ _show_done, eff);
+
+ // check fake image object stack (Choice proper layer)
+ eff->layer_obj = NULL;
+ layer = _comp_mod->conf->fake_launch_layer;
+ con = e_container_current_get(e_manager_current_get());
+ if ((con) && (layer))
+ layers_cw = e_mod_comp_win_find(con->layers[layer].win);
+
+ if (layers_cw)
+ {
+ EINA_LIST_FOREACH(layers_cw->objs, ll, co)
+ {
+ if (!co) continue;
+ eff->layer_obj = co->shadow;
+ }
+ }
+
+ return eff;
+
+error:
+ e_mod_comp_effect_image_launch_free(eff);
+ return NULL;
+}
+
+EINTERN void
+e_mod_comp_effect_image_launch_free(E_Comp_Effect_Image_Launch *eff)
+{
+ E_CHECK(eff);
+ if (eff->shobj) evas_object_del(eff->shobj);
+ if (eff->obj) evas_object_del(eff->obj);
+ E_FREE(eff);
+}
+
+EINTERN Eina_Bool
+e_mod_comp_effect_image_launch_handler_message(Ecore_X_Event_Client_Message *ev)
+{
+ E_Comp_Effect_Image_Launch *eff;
+ E_Comp *c = NULL;
+ char *file = NULL;
+
+ E_CHECK_RETURN(ev, 0);
+
+ c = e_mod_comp_find(ev->win);
+ E_CHECK_RETURN(c, 0);
+ E_CHECK_RETURN(c->fake_image_launch, 0);
+
+ eff = c->eff_img;
+ E_CHECK_RETURN(eff, 0);
+
+ eff->rot = ev->data.l[1]; //rotation value
+ eff->indicator_show = ev->data.l[2]; //indicator flag value
+
+ if (ev->data.l[0] == 0)
+ {
+ e_mod_comp_effect_image_launch_hide(eff);
+ }
+ else if (ev->data.l[0] == 1)
+ {
+ file = ecore_x_window_prop_string_get
+ (ev->win, ATOM_IMAGE_LAUNCH_FILE);
+ E_CHECK_RETURN(file, 0);
+
+ e_mod_comp_effect_image_launch_show(eff, file);
+ E_FREE(file);
+ }
+
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_comp_effect_image_launch_show(E_Comp_Effect_Image_Launch *eff,
+ const char *file)
+{
+ E_Comp *c = e_mod_comp_util_get();
+ E_Comp_Win *bg_cw = NULL;
+ Eina_Bool grabbed;
+ Evas_Load_Error err;
+ Eina_Bool res;
+ int img_w, img_h;
+ Eina_List *ll;
+ E_Comp_Object *co;
+ E_Comp_Win *bottom_appinapp_cw = NULL;
+
+ E_CHECK_RETURN(eff, 0);
+ E_CHECK_RETURN(file, 0);
+ E_CHECK_RETURN(c, 0);
+
+ grabbed = e_mod_comp_util_grab_key_set(EINA_TRUE);
+ E_CHECK_RETURN(grabbed, 0);
+
+ eff->running = EINA_TRUE;
+
+ //fake image part
+ evas_object_image_file_set(eff->obj, file, NULL);
+ err = evas_object_image_load_error_get(eff->obj);
+ E_CHECK_GOTO(err == EVAS_LOAD_ERROR_NONE, error);
+
+ evas_object_image_size_get(eff->obj, &(img_w), &(img_h));
+ evas_object_image_fill_set(eff->obj, 0, 0, img_w, img_h);
+ evas_object_image_filled_set(eff->obj, EINA_TRUE);
+
+ evas_object_show(eff->obj);
+
+ res = edje_object_part_swallow
+ (eff->shobj, "fake.swallow.content", eff->obj);
+ E_CHECK_GOTO(res, error);
+
+ if ((eff->rot == 0) || (eff->rot == 180))//portrait mode
+ {
+ evas_object_move(eff->shobj, 0, 0);
+ evas_object_resize(eff->shobj, eff->w, eff->h);
+
+ //get indicator object
+ if (eff->indicator_show)
+ {
+ if (!ecore_evas_extn_plug_connect(eff->indicator_obj, "elm_indicator_portrait", 0, EINA_FALSE))
+ eff->indicator_show = 0;
+ }
+ }
+ else //landscape mode
+ {
+ evas_object_move(eff->shobj, (eff->w - eff->h)/2, (eff->h - eff->w)/2);
+ evas_object_resize(eff->shobj, eff->h, eff->w);
+
+ //get indicator object
+ if (eff->indicator_show)
+ {
+ if (!ecore_evas_extn_plug_connect(eff->indicator_obj, "elm_indicator_landscape", 0, EINA_FALSE))
+ eff->indicator_show = 0;
+ }
+ }
+
+ if (eff->indicator_show)
+ {
+ evas_object_show(eff->indicator_obj);
+ res = edje_object_part_swallow
+ (eff->shobj, "fake.swallow.indicator", eff->indicator_obj);
+ E_CHECK_GOTO(res, error);
+ }
+
+ // background hide effect
+ if(c->animatable)
+ {
+ bg_cw = _bg_win_get();
+ if (bg_cw)
+ {
+ _invisible_win_hide(bg_cw, EINA_TRUE);
+ }
+ }
+
+ // set position of fake launch image
+ if (eff->layer_obj)
+ {
+ evas_object_stack_above(eff->shobj, eff->layer_obj);
+ }
+ else
+ {
+ bottom_appinapp_cw = _appinapp_bottom_win_get(bg_cw);
+
+ if (bottom_appinapp_cw)
+ {
+ EINA_LIST_FOREACH(bottom_appinapp_cw->objs, ll, co)
+ {
+ if (!co) continue;
+ evas_object_stack_below(eff->shobj, co->shadow);
+ }
+ }
+ else
+ evas_object_raise(eff->shobj);
+ }
+
+ evas_object_show(eff->shobj);
+
+ if (c->animatable)
+ {
+ switch (eff->rot)
+ {
+ case 90:
+ e_mod_comp_effect_signal_add
+ (NULL, eff->shobj,
+ "fake,state,visible,90,on", "fake");
+ break;
+ case 180:
+ e_mod_comp_effect_signal_add
+ (NULL, eff->shobj,
+ "fake,state,visible,180,on", "fake");
+ break;
+ case 270:
+ e_mod_comp_effect_signal_add
+ (NULL, eff->shobj,
+ "fake,state,visible,270,on", "fake");
+ break;
+ default:
+ e_mod_comp_effect_signal_add
+ (NULL, eff->shobj,
+ "fake,state,visible,on", "fake");
+ break;
+ }
+ }
+ else
+ {
+ switch (eff->rot)
+ {
+ case 90:
+ e_mod_comp_effect_signal_add
+ (NULL, eff->shobj,
+ "fake,state,visible,90,on,noeffect", "fake");
+ break;
+ case 180:
+ e_mod_comp_effect_signal_add
+ (NULL, eff->shobj,
+ "fake,state,visible,180,on,noeffect", "fake");
+ break;
+ case 270:
+ e_mod_comp_effect_signal_add
+ (NULL, eff->shobj,
+ "fake,state,visible,270,on,noeffect", "fake");
+ break;
+ default:
+ e_mod_comp_effect_signal_add
+ (NULL, eff->shobj,
+ "fake,state,visible,on,noeffect", "fake");
+ break;
+ }
+ }
+ eff->timeout = ecore_timer_add(10.0f, _launch_timeout, eff);
+ e_mod_comp_util_screen_input_region_set(EINA_TRUE);
+
+ e_mod_comp_render_queue(c);
+ return EINA_TRUE;
+
+error:
+ eff->running = EINA_FALSE;
+ if (grabbed)
+ e_mod_comp_util_grab_key_set(EINA_FALSE);
+ return EINA_FALSE;
+}
+
+EINTERN Eina_Bool
+e_mod_comp_effect_image_launch_hide(E_Comp_Effect_Image_Launch *eff)
+{
+ E_Comp *c = e_mod_comp_util_get();
+ E_Comp_Win *bg_cw = NULL;
+ E_CHECK_RETURN(c, 0);
+ E_CHECK_RETURN(eff, 0);
+
+ if (eff->timeout)
+ ecore_timer_del(eff->timeout);
+ eff->timeout = NULL;
+
+ // background hide effect
+ if(c->animatable)
+ {
+ bg_cw = _bg_win_get();
+ if (bg_cw)
+ {
+ _invisible_win_hide(bg_cw, EINA_FALSE);
+ }
+ }
+
+ if (c->animatable)
+ {
+ switch (eff->rot)
+ {
+ case 90:
+ e_mod_comp_effect_signal_add
+ (NULL, eff->shobj,
+ "fake,state,visible,90,off", "fake");
+ break;
+ case 180:
+ e_mod_comp_effect_signal_add
+ (NULL, eff->shobj,
+ "fake,state,visible,180,off", "fake");
+ break;
+ case 270:
+ e_mod_comp_effect_signal_add
+ (NULL, eff->shobj,
+ "fake,state,visible,270,off", "fake");
+ break;
+ default:
+ e_mod_comp_effect_signal_add
+ (NULL, eff->shobj,
+ "fake,state,visible,off", "fake");
+ break;
+ }
+ }
+ else
+ e_mod_comp_effect_signal_add
+ (NULL, eff->shobj,
+ "fake,state,visible,off,noeffect", "fake");
+
+ e_mod_comp_render_queue(c);
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_comp_effect_image_launch_window_check(E_Comp_Effect_Image_Launch *eff, E_Comp_Win *cw)
+{
+ E_CHECK_RETURN(eff, 0);
+ E_CHECK_RETURN(eff->running, 0);
+ E_CHECK_RETURN(cw, 0);
+ E_CHECK_RETURN(cw->bd, 0);
+
+ if ( REGION_EQUAL_TO_ROOT(cw) && TYPE_NORMAL_CHECK(cw))
+ {
+ return EINA_TRUE;
+ }
+ return EINA_FALSE;
+}
+
+EINTERN Eina_Bool
+e_mod_comp_effect_image_launch_running_check(E_Comp_Effect_Image_Launch *eff)
+{
+ E_CHECK_RETURN(eff, 0);
+ return eff->running;
+}
+
+EINTERN Eina_Bool
+e_mod_comp_effect_image_launch_fake_show_done_check(E_Comp_Effect_Image_Launch *eff)
+{
+ E_CHECK_RETURN(eff, 0);
+ return eff->fake_image_show_done;
+}
+
+EINTERN Eina_Bool
+e_mod_comp_effect_image_launch_window_set(E_Comp_Effect_Image_Launch *eff,
+ Ecore_X_Window w)
+{
+ E_CHECK_RETURN(eff, 0);
+ E_CHECK_RETURN(w, 0);
+ eff->win = w;
+ return EINA_TRUE;
+}
+
+EINTERN void
+e_mod_comp_effect_image_launch_disable(E_Comp_Effect_Image_Launch *eff)
+{
+ E_CHECK(eff);
+ E_CHECK(eff->running);
+
+ eff->running = EINA_FALSE;
+ eff->fake_image_show_done= EINA_FALSE;
+ eff->win = 0;
+
+ e_mod_comp_util_screen_input_region_set(EINA_FALSE);
+ e_mod_comp_util_grab_key_set(EINA_FALSE);
+
+ E_Comp *c = e_mod_comp_util_get();
+ if (c)
+ e_mod_comp_win_shape_input_update(c);
+
+ if (eff->timeout)
+ ecore_timer_del(eff->timeout);
+ eff->timeout = NULL;
+
+ if (eff->indicator_show)
+ {
+ edje_object_part_unswallow(eff->shobj, eff->indicator_obj);
+ evas_object_hide(eff->indicator_obj);
+ }
+ edje_object_part_unswallow(eff->shobj, eff->obj);
+
+ evas_object_hide(eff->shobj);
+ evas_object_hide(eff->obj);
+}
+
+static E_Comp_Win *
+_appinapp_bottom_win_get(E_Comp_Win *normal_top)
+{
+ E_Comp *c = e_mod_comp_util_get();
+ E_Comp_Win *cw = NULL;
+ E_Comp_Win *_cw = NULL;
+ E_CHECK_RETURN(c, 0);
+ Ecore_X_Window win = 0;
+
+ if (normal_top)
+ win = normal_top->win;
+
+ EINA_INLIST_REVERSE_FOREACH(c->wins, cw)
+ {
+ if((cw->win) == (win)) break;
+ if (!(cw->bd)) continue;
+
+ if(cw->bd->client.illume.win_state.state == ECORE_X_ILLUME_WINDOW_STATE_FLOATING)
+ _cw = cw;
+ }
+ return _cw;
+}
+
+
+static E_Comp_Win *
+_bg_win_get(void)
+{
+ E_Comp *c = e_mod_comp_util_get();
+ E_Comp_Win *cw = NULL;
+ E_CHECK_RETURN(c, 0);
+
+ EINA_INLIST_REVERSE_FOREACH(c->wins, cw)
+ {
+ if ((cw->visible) &&
+ (REGION_EQUAL_TO_ROOT(cw)) &&
+ (!cw->invalid) && (!cw->input_only) &&
+ (TYPE_NORMAL_CHECK(cw)))
+ {
+ return cw;
+ }
+ if(TYPE_HOME_CHECK(cw))
+ return cw;
+ }
+ return NULL;
+}
+
+
+static void
+_show_done(void *data,
+ Evas_Object *obj __UNUSED__,
+ const char *emission __UNUSED__,
+ const char *source __UNUSED__)
+{
+ E_Comp_Win *cw;
+ E_Comp_Effect_Image_Launch *eff;
+ eff = (E_Comp_Effect_Image_Launch *)data;
+ E_CHECK(eff);
+
+ eff->fake_image_show_done = EINA_TRUE;
+
+ E_CHECK(eff->win);
+
+ cw = e_mod_comp_win_find(eff->win);
+ E_CHECK(cw);
+
+ e_mod_comp_effect_signal_add
+ (cw, NULL, "e,state,visible,on,noeffect", "e");
+ e_mod_comp_comp_event_src_visibility_send(cw);
+ e_mod_comp_effect_image_launch_disable(eff);
+
+ e_mod_comp_win_render_queue(cw);
+}
+
+static void
+_hide_done(void *data,
+ Evas_Object *obj __UNUSED__,
+ const char *emission __UNUSED__,
+ const char *source __UNUSED__)
+{
+ E_Comp_Effect_Image_Launch *eff;
+ eff = (E_Comp_Effect_Image_Launch *)data;
+ E_CHECK(eff);
+
+ e_mod_comp_util_screen_input_region_set(EINA_FALSE);
+ e_mod_comp_util_grab_key_set(EINA_FALSE);
+
+ if (eff->indicator_show)
+ {
+ edje_object_part_unswallow(eff->shobj, eff->indicator_obj);
+ evas_object_hide(eff->indicator_obj);
+ }
+ edje_object_part_unswallow(eff->shobj, eff->obj);
+ evas_object_hide(eff->shobj);
+ evas_object_hide(eff->obj);
+}
+
+static Eina_Bool
+_launch_timeout(void *data)
+{
+ E_Comp_Effect_Image_Launch *eff;
+ E_Comp *c = e_mod_comp_util_get();
+ E_Comp_Win *bg_cw = NULL;
+ eff = (E_Comp_Effect_Image_Launch *)data;
+
+ E_CHECK_RETURN(c, 0);
+ E_CHECK_RETURN(eff, 0);
+
+ if (eff->timeout)
+ ecore_timer_del(eff->timeout);
+ eff->timeout = NULL;
+
+ eff->running = EINA_FALSE;
+ eff->win = 0;
+ eff->fake_image_show_done = EINA_FALSE;
+
+ // background hide effect
+ bg_cw = _bg_win_get();
+ if (bg_cw)
+ {
+ _invisible_win_hide(bg_cw, EINA_FALSE);
+ }
+
+ if (c->animatable)
+ {
+ switch (eff->rot)
+ {
+ case 90:
+ e_mod_comp_effect_signal_add
+ (NULL, eff->shobj,
+ "fake,state,visible,90,off", "fake");
+ break;
+ case 180:
+ e_mod_comp_effect_signal_add
+ (NULL, eff->shobj,
+ "fake,state,visible,180,off", "fake");
+ break;
+ case 270:
+ e_mod_comp_effect_signal_add
+ (NULL, eff->shobj,
+ "fake,state,visible,270,off", "fake");
+ break;
+ default:
+ e_mod_comp_effect_signal_add
+ (NULL, eff->shobj,
+ "fake,state,visible,off", "fake");
+ break;
+ }
+ }
+ else
+ e_mod_comp_effect_signal_add
+ (NULL, eff->shobj,
+ "fake,state,visible,off,noeffect", "fake");
+
+ e_mod_comp_render_queue(c);
+
+ return EINA_FALSE;
+}
+
+static void
+_invisible_win_hide(E_Comp_Win *cw,
+ Eina_Bool show)
+{
+ E_Comp *c = e_mod_comp_util_get();
+ Eina_List *ll;
+ E_Comp_Object *co;
+ Eina_Bool visible = 0;
+ E_Comp_Canvas *canvas;
+ E_Comp_Win *_cw = cw;
+ Eina_Inlist *l;
+
+ E_CHECK(cw);
+ E_CHECK(c);
+
+ while ((l = EINA_INLIST_GET(_cw)->prev) != NULL)
+ {
+ visible = 0;
+ _cw = _EINA_INLIST_CONTAINER(_cw, l);
+ E_CHECK(_cw);
+ if ((!_cw) ||
+ (_cw->invalid) ||
+ (_cw->input_only) ||
+ (_cw->win == cw->win) ||
+ TYPE_INDICATOR_CHECK(_cw))
+ {
+ continue;
+ }
+
+ EINA_LIST_FOREACH(_cw->objs, ll, co)
+ {
+ if (!co) continue;
+ if (evas_object_visible_get(co->shadow))
+ {
+ visible = 1;
+ break;
+ }
+ }
+ if (!visible) continue;
+
+ // do hide window which is not related window animation effect.
+ _cw->animate_hide = EINA_TRUE;
+ EINA_LIST_FOREACH(_cw->objs, ll, co)
+ {
+ if (!co) continue;
+ evas_object_hide(co->shadow);
+ }
+ }
+
+ EINA_LIST_FOREACH(cw->c->canvases, ll, canvas)
+ {
+ if (!canvas) continue;
+ if (canvas->use_bg_img) continue;
+ evas_object_lower(canvas->bg_img);
+ }
+
+ EINA_LIST_FOREACH(cw->objs, ll, co)
+ {
+ if (!co) continue;
+ if (!cw->hidden_override && cw->show_done)
+ evas_object_show(co->shadow);
+ }
+
+ cw->animate_hide = EINA_FALSE;
+ cw->c->effect_stage = EINA_TRUE;
+
+ if (show)
+ {
+ if (c->animatable)
+ e_mod_comp_effect_signal_add
+ (cw, NULL,
+ "e,state,background,visible,on", "e");
+ else
+ e_mod_comp_effect_signal_add
+ (cw, NULL,
+ "e,state,background,visible,on,noeffect", "e");
+ }
+ else
+ {
+ if (c->animatable)
+ e_mod_comp_effect_signal_add
+ (cw, NULL,
+ "e,state,background,visible,off", "e");
+ else
+ e_mod_comp_effect_signal_add
+ (cw, NULL,
+ "e,state,background,visible,off,noeffect", "e");
+ }
+}
--- /dev/null
+#ifdef E_TYPEDEFS
+#else
+#ifndef E_MOD_COMP_EFFECT_IMAGE_LAUNCH_H
+#define E_MOD_COMP_EFFECT_IMAGE_LAUNCH_H
+
+typedef struct _E_Comp_Effect_Image_Launch E_Comp_Effect_Image_Launch;
+
+/* image launch effect functions */
+EINTERN E_Comp_Effect_Image_Launch *e_mod_comp_effect_image_launch_new(Evas *e, int w, int h);
+EINTERN void e_mod_comp_effect_image_launch_free(E_Comp_Effect_Image_Launch *eff);
+EINTERN Eina_Bool e_mod_comp_effect_image_launch_handler_message(Ecore_X_Event_Client_Message *ev);
+EINTERN Eina_Bool e_mod_comp_effect_image_launch_show(E_Comp_Effect_Image_Launch *eff, const char *file);
+EINTERN Eina_Bool e_mod_comp_effect_image_launch_hide(E_Comp_Effect_Image_Launch *eff);
+EINTERN Eina_Bool e_mod_comp_effect_image_launch_window_check(E_Comp_Effect_Image_Launch *eff, E_Comp_Win *cw);
+EINTERN Eina_Bool e_mod_comp_effect_image_launch_running_check(E_Comp_Effect_Image_Launch *eff);
+EINTERN Eina_Bool e_mod_comp_effect_image_launch_fake_show_done_check(E_Comp_Effect_Image_Launch *eff);
+EINTERN Eina_Bool e_mod_comp_effect_image_launch_window_set(E_Comp_Effect_Image_Launch *eff, Ecore_X_Window w);
+EINTERN void e_mod_comp_effect_image_launch_disable(E_Comp_Effect_Image_Launch *eff);
+
+#endif
+#endif
--- /dev/null
+#include "e_mod_comp_shared_types.h"
+#include "e_mod_comp.h"
+#include "e_mod_comp_debug.h"
+#include "e_mod_comp_effect_screen_capture.h"
+
+struct _E_Comp_Effect_Screen_Capture
+{
+ Evas_Object *obj;
+ struct {
+ int x, y, w, h;
+ } geom;
+};
+
+/* local subsystem functions */
+static void _show_done(void *data, Evas_Object *obj, const char *emission, const char *source);
+
+/* screen capture effect functions */
+EINTERN E_Comp_Effect_Screen_Capture *
+e_mod_comp_effect_screen_capture_new(Evas *evas,
+ int w, int h)
+{
+ E_Comp_Effect_Screen_Capture *cap;
+ int ok;
+
+ E_CHECK_RETURN(evas, 0);
+ E_CHECK_RETURN((w <= 0), 0);
+ E_CHECK_RETURN((h <= 0), 0);
+ E_CHECK_RETURN(_comp_mod, 0);
+ E_CHECK_RETURN(_comp_mod->conf, 0);
+
+ cap = E_NEW(E_Comp_Effect_Screen_Capture, 1);
+ E_CHECK_RETURN(cap, 0);
+
+ cap->geom.x = 0;
+ cap->geom.y = 0;
+ cap->geom.w = w;
+ cap->geom.h = h;
+
+ cap->obj = edje_object_add(evas);
+ E_CHECK_GOTO(cap->obj, error);
+
+ ok = edje_object_file_set(cap->obj,
+ _comp_mod->conf->shadow_file,
+ "capture_effect");
+ E_CHECK_GOTO(ok, error);
+
+ evas_object_move(cap->obj, 0, 0);
+ evas_object_resize(cap->obj, w, h);
+
+ edje_object_signal_callback_add
+ (cap->obj, "img,capture,show,done", "img", _show_done, cap);
+
+ return cap;
+
+error:
+ if (cap)
+ {
+ if (cap->obj)
+ {
+ e_mod_comp_debug_edje_error_get(cap->obj, 0);
+ evas_object_del(cap->obj);
+ cap->obj = NULL;
+ }
+ E_FREE(cap);
+ }
+ return NULL;
+}
+
+EINTERN void
+e_mod_comp_effect_screen_capture_free(E_Comp_Effect_Screen_Capture *cap)
+{
+ E_CHECK(cap);
+ if (evas_object_visible_get(cap->obj))
+ evas_object_hide(cap->obj);
+ E_FREE(cap);
+}
+
+EINTERN Eina_Bool
+e_mod_comp_effect_screen_capture_handler_message(Ecore_X_Event_Client_Message *ev)
+{
+ E_Comp *c;
+ Evas_Object *o;
+ E_CHECK_RETURN(ev, 0);
+
+ c = e_mod_comp_find(ev->win);
+ E_CHECK_RETURN(c, 0);
+ E_CHECK_RETURN(c->animatable, 0);
+ E_CHECK_RETURN(c->eff_cap, 0);
+
+ o = c->eff_cap->obj;
+ E_CHECK_RETURN(o, 0);
+
+ evas_object_show(o);
+ evas_object_raise(o);
+ e_mod_comp_effect_signal_add
+ (NULL, o, "img,state,capture,on", "img");
+
+ return EINA_TRUE;
+}
+
+/* local subsystem functions */
+static void
+_show_done(void *data,
+ Evas_Object *obj __UNUSED__,
+ const char *emission __UNUSED__,
+ const char *source __UNUSED__)
+{
+ E_Comp_Effect_Screen_Capture *cap;
+ cap = (E_Comp_Effect_Screen_Capture *)data;
+ E_CHECK(cap);
+
+ e_mod_comp_effect_animating_set(NULL, NULL, EINA_FALSE);
+
+ if (evas_object_visible_get(cap->obj))
+ evas_object_hide(cap->obj);
+}
--- /dev/null
+#ifdef E_TYPEDEFS
+#else
+#ifndef E_MOD_COMP_EFFECT_SCREEN_CAPTURE_H
+#define E_MOD_COMP_EFFECT_SCREEN_CAPTURE_H
+
+typedef struct _E_Comp_Effect_Screen_Capture E_Comp_Effect_Screen_Capture;
+
+/* screen capture effect functions */
+EINTERN E_Comp_Effect_Screen_Capture *e_mod_comp_effect_screen_capture_new(Evas *evas, int w, int h);
+EINTERN void e_mod_comp_effect_screen_capture_free(E_Comp_Effect_Screen_Capture *cap);
+EINTERN Eina_Bool e_mod_comp_effect_screen_capture_handler_message(Ecore_X_Event_Client_Message *ev);
+
+#endif
+#endif
--- /dev/null
+#include "e_mod_comp_shared_types.h"
+#include "e_mod_comp.h"
+#include "e_mod_comp_debug.h"
+#include "e_mod_comp_effect_tm.h"
+
+/* local subsystem functions */
+static void _defer_raise_clear(void);
+static Eina_Bool _valid_win_check(E_Comp_Win *cw);
+static Eina_Bool _win_size_check(E_Comp_Win *cw);
+static Eina_Bool _win_bg_item_init(E_Comp *c);
+
+/* local subsystem globals */
+
+/* externally accessible functions */
+EINTERN Eina_Bool
+e_mod_comp_effect_tm_bg_show(E_Comp_Win *cw)
+{
+ E_Comp_Win *_cw;
+ E_Comp_Object *co;
+ int i = 0, _x = 0;
+
+ E_CHECK_RETURN(cw, 0);
+ E_CHECK_RETURN(cw->c, 0);
+ E_CHECK_RETURN(cw->c->animatable, 0);
+
+ _defer_raise_clear();
+ e_mod_comp_animation_transfer_list_clear();
+ cw->c->switcher_animating = EINA_TRUE;
+ cw->c->selected_pos = 0;
+
+ L(LT_EFFECT, "[COMP] %18.18s w:0x%08x %s\n", "EFF",
+ e_mod_comp_util_client_xid_get(cw), "BG_SHOW_TM");
+
+ EINA_INLIST_REVERSE_FOREACH(cw->c->wins, _cw)
+ {
+ if (!_cw) continue;
+ if (!_win_size_check(_cw)) continue;
+ if (!_valid_win_check(_cw)) continue;
+
+ i++;
+
+ L(LT_EFFECT, "[COMP] %18.18s w:0x%08x %s [%d]\n", "EFF",
+ e_mod_comp_util_client_xid_get(_cw), "BG_SHOW_TM", i);
+
+ // move all windows to each stack position
+ _x = (i + 1) * (-WINDOW_SPACE) + (_cw->c->man->w);
+ co = eina_list_data_get(cw->objs);
+ if (!co) continue;
+ evas_object_move(co->shadow, _x, 0);
+
+ if (i == 1)
+ {
+ // top window
+ e_mod_comp_effect_signal_add
+ (_cw, NULL, "e,state,switcher_top,on", "e");
+ }
+ else
+ {
+ // left of top window
+ e_mod_comp_effect_signal_add
+ (_cw, NULL, "e,state,switcher,on", "e");
+ }
+ }
+
+ cw->c->switcher = EINA_TRUE;
+ cw->c->switcher_obscured = !(e_mod_comp_util_win_visible_get(cw));
+
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_comp_effect_tm_bg_hide(E_Comp_Win *cw)
+{
+ E_CHECK_RETURN(cw, 0);
+ E_CHECK_RETURN(cw->c, 0);
+ E_CHECK_RETURN(cw->c->animatable, 0);
+
+ if (cw->c->switcher_obscured) return EINA_TRUE;
+
+ e_mod_comp_animation_transfer_list_clear();
+ cw->c->switcher_animating = EINA_TRUE;
+
+ L(LT_EFFECT, "[COMP] %18.18s w:0x%08x %s\n", "EFF",
+ e_mod_comp_util_client_xid_get(cw), "BG_HIDE_TM");
+
+ _win_bg_item_init(cw->c);
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_comp_effect_tm_state_update(E_Comp *c)
+{
+ E_Comp_Win *_cw;
+ E_CHECK_RETURN(c->switcher, 0);
+ Eina_Bool res = EINA_FALSE;
+
+ // if task switcher is open, just set defer_raise
+ // and do jump effect in _e_mod_comp_window_hide_effect
+ EINA_INLIST_REVERSE_FOREACH(c->wins, _cw)
+ {
+ if (!_cw) continue;
+ if (TYPE_TASKMANAGER_CHECK(_cw))
+ {
+ // just return without visibility update
+ // while task switcher is closing
+ if (_cw->defer_hide) break;
+ if (_cw->c->switcher_animating) break;
+
+ c->switcher_obscured = !(e_mod_comp_util_win_visible_get(_cw));
+ res = EINA_TRUE;
+ break;
+ }
+ }
+
+ L(LT_EFFECT, "[COMP] %18.18s tm:%d obscured:%d\n",
+ "EFF", c->switcher, c->switcher_obscured);
+
+ return res;
+}
+
+EINTERN Eina_Bool
+e_mod_comp_effect_tm_raise_above(E_Comp_Win *cw,
+ E_Comp_Win *cw2)
+{
+ Eina_Bool raise;
+ E_CHECK_RETURN(cw, 0);
+ E_CHECK_RETURN(cw->c, 0);
+
+ cw->defer_raise = EINA_TRUE;
+ raise = e_mod_comp_policy_win_restack_check(cw, cw2);
+ E_CHECK_RETURN(raise, 0);
+
+ cw->c->switcher_animating = EINA_TRUE;
+
+ e_mod_comp_animation_transfer_list_clear();
+
+ L(LT_EFFECT, "[COMP] %18.18s w:0x%08x %s sel:%d defer_raise:1\n",
+ "EFF", e_mod_comp_util_client_xid_get(cw), "RAISE_ABOVE_TM",
+ cw->c->selected_pos);
+
+ _win_bg_item_init(cw->c);
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_comp_effect_tm_handler_show_done(E_Comp_Win *cw)
+{
+ E_CHECK_RETURN(cw, 0);
+ E_Comp_Win *_cw;
+
+ cw->c->switcher_animating = EINA_FALSE;
+
+ EINA_INLIST_REVERSE_FOREACH(cw->c->wins, _cw)
+ {
+ if (!_cw) continue;
+ if (!_cw->visible) continue;
+ e_mod_comp_win_comp_objs_move(_cw, _cw->x, _cw->y);
+ e_mod_comp_win_comp_objs_resize(_cw,
+ _cw->pw + (_cw->border * 2),
+ _cw->ph + (_cw->border * 2));
+ _cw->defer_move_resize = EINA_FALSE;
+ }
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_comp_effect_tm_handler_hide_done(E_Comp_Win *cw)
+{
+ E_CHECK_RETURN(cw, 0);
+ E_Comp_Win *_cw;
+ if (cw->c->selected_pos > 0) cw->c->selected_pos = 0;
+
+ // task switcher is closed
+ cw->c->switcher = EINA_FALSE;
+ cw->c->switcher_obscured = EINA_TRUE;
+ cw->c->switcher_animating = EINA_FALSE;
+
+ EINA_INLIST_FOREACH(cw->c->wins, _cw)
+ {
+ if (!_cw) continue;
+ if (!_cw->visible) continue;
+ if (!_cw->defer_move_resize) continue;
+ e_mod_comp_win_comp_objs_move(_cw, _cw->x, _cw->y);
+ e_mod_comp_win_comp_objs_resize(_cw,
+ _cw->pw + (_cw->border * 2),
+ _cw->ph + (_cw->border * 2));
+ _cw->defer_move_resize = EINA_FALSE;
+ L(LT_EFFECT, "[COMP] %18.18s w:0x%08x %s\n", "EFF",
+ e_mod_comp_util_client_xid_get(_cw), "HIDE_DONE_BG_ITEM");
+ }
+
+ _defer_raise_clear();
+
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_comp_effect_tm_handler_raise_above_pre(E_Comp_Win *cw,
+ E_Comp_Win *cw2)
+{
+ E_CHECK_RETURN(cw, 0);
+ int i = 0;
+ E_Comp_Win *_cw;
+
+ E_CHECK_RETURN(cw, 0);
+ E_CHECK_RETURN(cw->c, 0);
+ E_CHECK_RETURN(cw->c->man, 0);
+ E_CHECK_RETURN(cw->c->switcher, 0);
+
+ e_mod_comp_effect_tm_state_update(cw->c);
+ E_CHECK_RETURN((!cw->c->switcher_obscured), 0);
+
+ EINA_INLIST_REVERSE_FOREACH(cw->c->wins, _cw)
+ {
+ if ((_cw->visible) &&
+ (!TYPE_INDICATOR_CHECK(cw)) &&
+ (!TYPE_TASKMANAGER_CHECK(cw)) &&
+ SIZE_EQUAL_TO_ROOT(_cw))
+ {
+ i++;
+ if (_cw == cw)
+ {
+ cw->c->selected_pos = i;
+ break;
+ }
+ }
+ }
+
+ L(LT_EFFECT, "[COMP] %18.18s w:0x%08x sel:%d\n", "EFF",
+ e_mod_comp_util_client_xid_get(cw), cw->c->selected_pos);
+
+ cw->c->wins_invalid = 1;
+ 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));
+ return EINA_TRUE;
+}
+
+/* local subsystem functions */
+static void
+_defer_raise_clear(void)
+{
+ E_Comp *c = e_mod_comp_util_get();
+ E_Comp_Win *cw;
+ E_CHECK(c);
+
+ EINA_INLIST_FOREACH(c->wins, cw)
+ {
+ if (!cw) continue;
+ if (cw->defer_raise)
+ {
+ L(LT_EFFECT, "[COMP] %18.18s w:0x%08x %s\n",
+ "EFF", e_mod_comp_util_client_xid_get(cw),
+ "TM_DEFER_RAISE_CLEAR");
+ e_mod_comp_done_defer(cw);
+ }
+ }
+ e_mod_comp_effect_disable_stage(c, NULL);
+}
+
+static Eina_Bool
+_valid_win_check(E_Comp_Win *cw)
+{
+ E_Comp_Object *co = eina_list_data_get(cw->objs);
+ E_CHECK_RETURN(co, 0);
+ if (cw->visible &&
+ evas_object_visible_get(co->shadow) &&
+ evas_object_visible_get(co->img) &&
+ !(TYPE_INDICATOR_CHECK(cw)) &&
+ !(TYPE_QUICKPANEL_CHECK(cw)) &&
+ !(TYPE_TASKMANAGER_CHECK(cw)) &&
+ !(STATE_INSET_CHECK(cw)))
+ {
+ return EINA_TRUE;
+ }
+ return EINA_FALSE;
+}
+
+static Eina_Bool
+_win_size_check(E_Comp_Win *cw)
+{
+ if (SIZE_EQUAL_TO_ROOT(cw))
+ return EINA_TRUE;
+
+ if (!TYPE_NORMAL_CHECK(cw))
+ return EINA_FALSE;
+
+ cw->animate_hide = EINA_TRUE;
+ e_mod_comp_win_comp_objs_hide(cw);
+ return EINA_FALSE;
+}
+
+static Eina_Bool
+_win_bg_item_init(E_Comp *c)
+{
+ E_Comp_Win *_cw;
+ E_Comp_Transfer *tr;
+ E_Comp_Object *co;
+ int i = 0;
+
+ EINA_INLIST_REVERSE_FOREACH(c->wins, _cw)
+ {
+ if (!_cw) continue;
+ if (!_win_size_check(_cw)) continue;
+ if (!_valid_win_check(_cw)) continue;
+
+ i++;
+
+ L(LT_EFFECT, "[COMP] %18.18s w:0x%08x %s [%d/%d]\n", "EFF",
+ e_mod_comp_util_client_xid_get(_cw), "ADD_TM_BG_ITEM",
+ i, c->selected_pos);
+
+ e_mod_comp_effect_animating_set(c, _cw, EINA_TRUE);
+
+ tr = e_mod_comp_animation_transfer_new();
+ E_CHECK_GOTO(tr, error);
+
+ _cw->transfer = tr;
+ co = eina_list_data_get(_cw->objs);
+ if (!co) continue;
+ tr->obj = co->shadow;
+
+ if ((c->selected_pos == 0) ||
+ (c->selected_pos == 1))
+ {
+ // if window is not selected, skip translation stage
+ // and do rotation stage
+ tr->from = i * (- WINDOW_SPACE) + (c->man->w -100);
+ tr->duration = SWITCHER_DURATION_TOP;
+ tr->begin_time = ecore_loop_time_get();
+ if (i == 1)
+ {
+ // top window
+ tr->len = -(tr->from);
+ tr->animator = ecore_animator_add
+ (e_mod_comp_animation_on_rotate_top, _cw);
+ }
+ else
+ {
+ // left of top window
+ tr->len = 0;
+ tr->animator = ecore_animator_add
+ (e_mod_comp_animation_on_rotate_left, _cw);
+ }
+ }
+ else
+ {
+ // if certain window is selected, do translation stage
+ // and rotation stage
+ tr->len = (c->selected_pos - 1) * WINDOW_SPACE;
+ tr->begin_time = ecore_loop_time_get();
+ tr->duration = SWITCHER_DURATION_TRANSLATE;
+ tr->animator = ecore_animator_add(e_mod_comp_animation_on_translate, _cw);
+ if (i == 1)
+ {
+ // top window
+ tr->selected = EINA_TRUE;
+ tr->from = c->selected_pos * (-WINDOW_SPACE) + (c->man->w -100);
+ }
+ else
+ {
+ // left of top window
+ // if left of top window is selected,
+ // other windows's position is adjusted
+ if (c->selected_pos >= i)
+ tr->from = (i-1) * (-WINDOW_SPACE) + (c->man->w -100);
+ else
+ tr->from = i * (-WINDOW_SPACE) + (c->man->w -100);
+ }
+ }
+ }
+
+ return EINA_TRUE;
+
+error:
+ e_mod_comp_animation_transfer_list_clear();
+ return EINA_FALSE;
+}
--- /dev/null
+#ifdef E_TYPEDEFS
+#else
+#ifndef E_MOD_COMP_EFFECT_TM_H
+#define E_MOD_COMP_EFFECT_TM_H
+
+/* effect functions for taskmanager */
+EINTERN Eina_Bool e_mod_comp_effect_tm_bg_show(E_Comp_Win *cw);
+EINTERN Eina_Bool e_mod_comp_effect_tm_bg_hide(E_Comp_Win *cw);
+EINTERN Eina_Bool e_mod_comp_effect_tm_state_update(E_Comp *c);
+EINTERN Eina_Bool e_mod_comp_effect_tm_raise_above(E_Comp_Win *cw, E_Comp_Win *cw2);
+EINTERN Eina_Bool e_mod_comp_effect_tm_handler_show_done(E_Comp_Win *cw);
+EINTERN Eina_Bool e_mod_comp_effect_tm_handler_hide_done(E_Comp_Win *cw);
+EINTERN Eina_Bool e_mod_comp_effect_tm_handler_raise_above_pre(E_Comp_Win *cw, E_Comp_Win *cw2);
+
+#endif
+#endif
--- /dev/null
+#include "e_mod_comp_shared_types.h"
+#include "e_mod_comp.h"
+#include "e_mod_comp_atoms.h"
+#include "e_mod_comp_debug.h"
+#include "e_mod_comp_effect_win_rotation.h"
+
+#define _WND_REQUEST_ANGLE_IDX 0
+#define _WND_CURR_ANGLE_IDX 1
+
+struct _E_Comp_Effect_Win_Rotation
+{
+ Eina_Bool ready : 1;
+ Eina_Bool run : 1;
+ Ecore_Timer *timeout;
+ struct {
+ int req;
+ int cur;
+ } ang;
+};
+
+/* local subsystem functions */
+static Eina_Bool _win_rotation_begin(E_Comp_Win *cw, Eina_Bool timeout);
+static void _win_rotation_done(void *data, Evas_Object *obj, const char *emission, const char *source);
+static Eina_Bool _angle_get(Ecore_X_Window win, int *req, int *curr);
+static Eina_Bool _begin_timeout(void *data);
+static Eina_Bool _end_timeout(void *data);
+
+/* externally accessible functions */
+EINTERN E_Comp_Effect_Win_Rotation *
+e_mod_comp_effect_win_rotation_new(void)
+{
+ E_Comp_Effect_Win_Rotation *r;
+ r = E_NEW(E_Comp_Effect_Win_Rotation, 1);
+ r->ang.req = -1;
+ r->ang.cur = -1;
+ return r;
+}
+
+EINTERN void
+e_mod_comp_effect_win_rotation_free(E_Comp_Effect_Win_Rotation *r)
+{
+ E_CHECK(r);
+ if (r->timeout) ecore_timer_del(r->timeout);
+ r->timeout = NULL;
+ E_FREE(r);
+}
+
+EINTERN Eina_Bool
+e_mod_comp_effect_win_roation_run_check(E_Comp_Effect_Win_Rotation *r)
+{
+ E_CHECK_RETURN(r, 0);
+ return r->run;
+}
+
+EINTERN Eina_Bool
+e_mod_comp_effect_win_rotation_handler_prop(Ecore_X_Event_Window_Property *ev)
+{
+ E_Comp_Win *cw = NULL;
+ E_Comp_Effect_Style st;
+ int req_angle = -1;
+ int cur_angle = -1;
+ Eina_Bool res, effect;
+ Ecore_X_Sync_Counter counter;
+ Ecore_X_Window win;
+ E_Comp_Effect_Win_Rotation *r;
+
+ E_CHECK_RETURN(ev, 0);
+ E_CHECK_RETURN(ev->win, 0);
+
+ 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) return EINA_FALSE;
+ }
+
+ win = e_mod_comp_util_client_xid_get(cw);
+ st = e_mod_comp_effect_style_get
+ (cw->eff_type,
+ E_COMP_EFFECT_KIND_ROTATION);
+
+ if (st == E_COMP_EFFECT_STYLE_NONE)
+ {
+ return EINA_FALSE;
+ }
+
+ res = _angle_get(win, &req_angle, &cur_angle);
+ if (!res) return EINA_FALSE;
+
+ cw->angle = req_angle;
+ cw->angle %= 360;
+
+ if (req_angle == cur_angle) return EINA_FALSE;
+
+ effect = e_mod_comp_policy_win_rotation_effect_check(cw);
+ if (!effect) return EINA_FALSE;
+
+ if (!cw->eff_winrot)
+ {
+ cw->eff_winrot = e_mod_comp_effect_win_rotation_new();
+ if (!cw->eff_winrot) return EINA_FALSE;
+ Eina_List *l;
+ E_Comp_Object *co;
+ EINA_LIST_FOREACH(cw->objs, l, co)
+ {
+ if (!co) continue;
+ edje_object_signal_callback_add
+ (co->shadow, "e,action,window,rotation,done",
+ "e", _win_rotation_done, cw);
+ }
+ }
+
+ r = cw->eff_winrot;
+ r->ready = EINA_TRUE;
+ r->ang.req = req_angle;
+ r->ang.cur = cur_angle;
+ if (r->timeout) ecore_timer_del(r->timeout);
+ r->timeout = ecore_timer_add(4.0f, _begin_timeout, cw);
+
+ L(LT_EVENT_X, "COMP|%31s|%d\n",
+ "ready", r->ready);
+
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_comp_effect_win_rotation_handler_update(E_Comp_Win *cw)
+{
+ E_CHECK_RETURN(cw, 0);
+ E_CHECK_RETURN(cw->eff_winrot, 0);
+ E_CHECK_RETURN(cw->eff_winrot->ready, 0);
+
+ return _win_rotation_begin(cw, EINA_FALSE);
+}
+
+EINTERN Eina_Bool
+e_mod_comp_effect_win_rotation_handler_release(E_Comp_Win *cw)
+{
+ E_CHECK_RETURN(cw, 0);
+ E_CHECK_RETURN(cw->eff_winrot, 0);
+ e_mod_comp_effect_win_rotation_free(cw->eff_winrot);
+ cw->eff_winrot = NULL;
+ return EINA_TRUE;
+}
+
+/* local subsystem functions */
+static Eina_Bool
+_win_rotation_begin(E_Comp_Win *cw,
+ Eina_Bool timeout)
+{
+ E_Comp_Effect_Win_Rotation *r;
+ Eina_List *l, *ll;
+ E_Comp_Canvas *canvas;
+ E_Comp_Object *co;
+ E_CHECK_RETURN(cw, 0);
+ E_CHECK_RETURN(cw->eff_winrot, 0);
+
+ r = cw->eff_winrot;
+ r->ready = EINA_FALSE;
+
+ L(LT_EVENT_X,
+ "COMP|%31s|timeout:%d\n",
+ "win_rot_begin", timeout);
+
+ if (r->timeout)
+ {
+ ecore_timer_del(r->timeout);
+ r->timeout = NULL;
+ }
+
+ switch (r->ang.req - r->ang.cur)
+ {
+ case -270: e_mod_comp_effect_signal_add(cw, NULL, "e,state,window,rotation,90", "e"); break;
+ case -180: e_mod_comp_effect_signal_add(cw, NULL, "e,state,window,rotation,180", "e"); break;
+ case -90: e_mod_comp_effect_signal_add(cw, NULL, "e,state,window,rotation,-90", "e"); break;
+ case 0: e_mod_comp_effect_signal_add(cw, NULL, "e,state,window,rotation,0", "e"); break;
+ case 90: e_mod_comp_effect_signal_add(cw, NULL, "e,state,window,rotation,90", "e"); break;
+ case 180: e_mod_comp_effect_signal_add(cw, NULL, "e,state,window,rotation,-180", "e"); break;
+ case 270: e_mod_comp_effect_signal_add(cw, NULL, "e,state,window,rotation,-90", "e"); break;
+ default : e_mod_comp_effect_signal_add(cw, NULL, "e,state,window,rotation,0", "e"); break;
+ }
+
+ r->run = EINA_TRUE;
+
+ 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->argb)
+ {
+ EINA_LIST_FOREACH(cw->c->canvases, l, canvas)
+ {
+ if (!canvas) continue;
+ EINA_LIST_FOREACH(cw->objs, ll, co)
+ {
+ if (!co) continue;
+ if (co->canvas == canvas)
+ {
+ evas_object_stack_below(canvas->bg_img,
+ co->shadow);
+ canvas->use_bg_img = 1;
+ }
+ }
+ }
+ }
+
+ r->timeout = ecore_timer_add(4.0f, _end_timeout, cw);
+ return EINA_TRUE;
+}
+
+static void
+_win_rotation_done(void *data,
+ Evas_Object *obj __UNUSED__,
+ const char *emission __UNUSED__,
+ const char *source __UNUSED__)
+{
+ E_Comp_Effect_Win_Rotation *r;
+ E_Comp_Win *cw = (E_Comp_Win*)data;
+ Eina_List *l, *ll;
+ E_Comp_Canvas *canvas;
+ E_Comp_Object *co;
+ E_CHECK(cw);
+ E_CHECK(cw->eff_winrot);
+
+ r = cw->eff_winrot;
+ if (r->timeout)
+ {
+ ecore_timer_del(r->timeout);
+ r->timeout = NULL;
+ }
+
+ if (!cw->show_done) cw->show_done = EINA_TRUE;
+
+ EINA_LIST_FOREACH(cw->c->canvases, l, canvas)
+ {
+ if (!canvas) continue;
+ EINA_LIST_FOREACH(cw->objs, ll, co)
+ {
+ if (!co) continue;
+ if (co->canvas == canvas)
+ {
+ evas_object_stack_below(canvas->bg_img,
+ evas_object_bottom_get(canvas->evas));
+ canvas->use_bg_img = 0;
+ }
+ }
+ }
+
+ r->run = EINA_FALSE;
+
+ e_mod_comp_effect_signal_del(cw, obj, "rotation,done");
+
+ e_mod_comp_done_defer(cw);
+}
+
+static Eina_Bool
+_angle_get(Ecore_X_Window win,
+ int *req,
+ int *curr)
+{
+ Eina_Bool res = EINA_FALSE;
+ int ret, count;
+ int angle[2] = {-1, -1};
+ unsigned char* data = NULL;
+
+ E_CHECK_RETURN(win, 0);
+ E_CHECK_RETURN(req, 0);
+ E_CHECK_RETURN(curr, 0);
+
+ ret = ecore_x_window_prop_property_get
+ (win, ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE,
+ ECORE_X_ATOM_CARDINAL, 32, &data, &count);
+ if (ret <= 0)
+ {
+ if (data) E_FREE(data);
+ return res;
+ }
+
+ if (ret && data)
+ {
+ memcpy(&angle, data, sizeof (int)*count);
+ if (count == 2) res = EINA_TRUE;
+ }
+
+ if (data) E_FREE(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;
+}
+
+static Eina_Bool
+_begin_timeout(void *data)
+{
+ E_Comp_Win *cw = (E_Comp_Win*)data;
+ E_CHECK_RETURN(cw, 0);
+ fprintf(stderr, "[E17-comp] %s(%d) w:0x%08x\n",
+ __func__, __LINE__,
+ e_mod_comp_util_client_xid_get(cw));
+ _win_rotation_begin(cw, EINA_TRUE);
+ return ECORE_CALLBACK_CANCEL;
+}
+
+static Eina_Bool
+_end_timeout(void *data)
+{
+ E_Comp_Win *cw = (E_Comp_Win*)data;
+ E_CHECK_RETURN(cw, 0);
+ fprintf(stderr,"[E17-comp] %s(%d) w:0x%08x\n",
+ __func__, __LINE__,
+ e_mod_comp_util_client_xid_get(cw));
+ _win_rotation_done((void*)cw, NULL, NULL, NULL);
+ return ECORE_CALLBACK_CANCEL;
+}
+
+EINTERN Eina_Bool
+e_mod_comp_effect_win_angle_get(E_Comp_Win *cw)
+{
+ E_Comp_Effect_Style st;
+ int req_angle = -1;
+ int cur_angle = -1;
+ Eina_Bool res;
+ Ecore_X_Window win;
+ E_CHECK_RETURN(cw, 0);
+
+ win = e_mod_comp_util_client_xid_get(cw);
+ st = e_mod_comp_effect_style_get
+ (cw->eff_type,
+ E_COMP_EFFECT_KIND_ROTATION);
+
+ if (st == E_COMP_EFFECT_STYLE_NONE)
+ return EINA_FALSE;
+
+ res = _angle_get(win, &req_angle, &cur_angle);
+ if (!res)
+ return EINA_FALSE;
+
+ cw->angle = req_angle;
+ cw->angle %= 360;
+
+ return EINA_TRUE;
+}
+
+EINTERN void
+e_mod_comp_explicit_win_rotation_done(E_Comp_Win *cw)
+{
+ E_CHECK(cw);
+ _win_rotation_done((void*)cw, NULL, NULL, NULL);
+}
--- /dev/null
+#ifdef E_TYPEDEFS
+#else
+#ifndef E_MOD_COMP_EFFECT_WIN_ROTATION_H
+#define E_MOD_COMP_EFFECT_WIN_ROTATION_H
+
+typedef struct _E_Comp_Effect_Win_Rotation E_Comp_Effect_Win_Rotation;
+
+/* window rotation effect and handler functions */
+EINTERN E_Comp_Effect_Win_Rotation *e_mod_comp_effect_win_rotation_new(void);
+EINTERN void e_mod_comp_effect_win_rotation_free(E_Comp_Effect_Win_Rotation *r);
+EINTERN Eina_Bool e_mod_comp_effect_win_roation_run_check(E_Comp_Effect_Win_Rotation *r);
+EINTERN Eina_Bool e_mod_comp_effect_win_rotation_handler_prop(Ecore_X_Event_Window_Property *ev);
+EINTERN Eina_Bool e_mod_comp_effect_win_rotation_handler_update(E_Comp_Win *cw);
+EINTERN Eina_Bool e_mod_comp_effect_win_rotation_handler_release(E_Comp_Win *cw);
+EINTERN Eina_Bool e_mod_comp_effect_win_angle_get(E_Comp_Win *cw);
+EINTERN void e_mod_comp_explicit_win_rotation_done(E_Comp_Win *cw);
+
+#endif
+#endif
--- /dev/null
+#include "e_mod_comp_shared_types.h"
+#include "e_mod_comp.h"
+#include "e_mod_comp_atoms.h"
+#include "e_mod_comp_debug.h"
+
+typedef struct _E_Comp_Log
+{
+ E_Comp_Log_Type type;
+ int repeat;
+ Evas_Object *o;
+ Evas_Object *bg;
+ char str[256];
+} E_Comp_Log;
+
+struct _E_Comp_HW_Ov_Win
+{
+ Ecore_X_Window ee_win;
+ Ecore_Evas *ee;
+ Evas *evas;
+ Evas_Object *bg;
+ int x, y, w, h;
+
+ Ecore_X_Window root;
+
+ Eina_Bool on;
+
+ // debugging info
+ struct {
+ int num;
+ Eina_List *list;
+ } info;
+};
+
+/* local subsystem globals */
+static E_Comp_HW_Ov_Win *ov_win = NULL;
+
+/* local subsystem functions */
+static void _hw_ov_win_power_set(E_Comp_HW_Ov_Win *ov, Eina_Bool set);
+static Eina_Bool _hw_ov_win_update(E_Comp_HW_Ov_Win *ov, E_Comp_Win *cw);
+
+/* externally accessible functions */
+EINTERN E_Comp_HW_Ov_Win *
+e_mod_comp_hw_ov_win_new(Ecore_X_Window parent,
+ int x,
+ int y,
+ int w,
+ int h)
+{
+ E_Comp_HW_Ov_Win *ov = NULL;
+ Eina_Bool res = EINA_FALSE;
+
+ E_CHECK_GOTO(parent, finish);
+
+ ov = E_NEW(E_Comp_HW_Ov_Win, 1);
+ E_CHECK_GOTO(ov, finish);
+
+ ov->ee = ecore_evas_software_x11_new(NULL, parent, x, y, w, h);
+ E_CHECK_GOTO(ov->ee, finish);
+
+ ov->ee_win = ecore_evas_window_get(ov->ee);;
+ E_CHECK_GOTO(ov->ee_win, finish);
+
+ ov->evas = ecore_evas_get(ov->ee);
+ E_CHECK_GOTO(ov->evas, finish);
+
+ ecore_x_composite_redirect_window(ov->ee_win, ECORE_X_COMPOSITE_UPDATE_MANUAL);
+ ecore_evas_comp_sync_set(ov->ee, 0);
+ ecore_evas_show(ov->ee);
+
+ ov->bg = evas_object_rectangle_add(ov->evas);
+ E_CHECK_GOTO(ov->bg, finish);
+
+ evas_object_render_op_set(ov->bg, EVAS_RENDER_COPY);
+ evas_object_layer_set(ov->bg, EVAS_LAYER_MIN);
+ evas_object_color_set(ov->bg, 0, 0, 0, 0);
+ evas_object_move(ov->bg, 0, 0);
+ evas_object_resize(ov->bg, w, h);
+ evas_object_show(ov->bg);
+ _hw_ov_win_power_set(ov, EINA_FALSE);
+
+ // comp has to unset shape input mask for the H/W overlay window
+ // to receive input event.
+ ecore_x_window_shape_input_rectangle_set(ov->ee_win, -1, -1, 1, 1);
+
+ ov->x = x;
+ ov->y = y;
+ ov->w = w;
+ ov->h = h;
+
+ ov_win = ov;
+
+ res = EINA_TRUE;
+
+finish:
+ if (!res && ov)
+ {
+ if (ov->ee)
+ {
+ ecore_evas_free(ov->ee);
+ ov->ee = NULL;
+ }
+ E_FREE(ov);
+ ov = NULL;
+ }
+ return ov;
+}
+
+EINTERN void
+e_mod_comp_hw_ov_win_msg_config_update(void)
+{
+ E_Comp_Log *log;
+
+ E_CHECK(ov_win);
+ E_CHECK(_comp_mod->conf->use_hw_ov);
+ E_CHECK(_comp_mod->conf->debug_info_show);
+
+ EINA_LIST_FREE(ov_win->info.list, log)
+ {
+ evas_object_hide(log->o);
+ evas_object_hide(log->bg);
+ evas_object_del(log->o);
+ evas_object_del(log->bg);
+ memset(log, 0, sizeof(E_Comp_Log));
+ E_FREE(log);
+ }
+}
+
+#ifdef _LOG_TYPE_CHECK
+# undef _LOG_TYPE_CHECK
+#endif
+# define _LOG_TYPE_CHECK(a, b) \
+ ((_comp_mod->conf->debug_type_##a) && \
+ (E_COMP_LOG_TYPE_##b == type))
+
+EINTERN void
+e_mod_comp_hw_ov_win_msg_show(E_Comp_Log_Type type,
+ const char *f,
+ ...)
+{
+ E_Comp_Log *log, *prev_log;
+ Evas_Object *bg, *o;
+ Evas_Coord w = 0, h = 0;
+ Eina_List *l;
+ int num, y;
+ char buf[256], str[256];
+ va_list args;
+
+ E_CHECK(ov_win);
+ E_CHECK(_comp_mod->conf->use_hw_ov);
+ E_CHECK(_comp_mod->conf->debug_info_show);
+ E_CHECK(_comp_mod->conf->max_debug_msgs >= 1);
+ E_CHECK(type > E_COMP_LOG_TYPE_DEFAULT);
+ E_CHECK(type < E_COMP_LOG_TYPE_MAX);
+
+ if (!(_LOG_TYPE_CHECK(nocomp, NOCOMP) ||
+ _LOG_TYPE_CHECK(swap, SWAP) ||
+ _LOG_TYPE_CHECK(effect, EFFECT)))
+ {
+ return;
+ }
+
+ va_start(args, f);
+ vsprintf(buf, f, args);
+ va_end(args);
+
+ /* check if previous log is same type, just increment repeat value */
+ num = eina_list_count(ov_win->info.list);
+ if (num >= 1)
+ {
+ log = eina_list_nth(ov_win->info.list, num - 1);
+ if ((log) && (log->type == type) &&
+ (!strcmp(buf, log->str)))
+ {
+ sprintf(str, "%04d|%s %d",
+ ov_win->info.num++,
+ log->str,
+ log->repeat++);
+ evas_object_text_text_set(log->o, str);
+ return;
+ }
+ }
+
+ log = E_NEW(E_Comp_Log, 1);
+ E_CHECK(log);
+
+ log->type = type;
+ strcpy(log->str, buf);
+ sprintf(str, "%04d|%s", ov_win->info.num++, log->str);
+
+ if (num < _comp_mod->conf->max_debug_msgs)
+ {
+ bg = evas_object_rectangle_add(ov_win->evas);
+ evas_object_layer_set(bg, EVAS_LAYER_MAX);
+ evas_object_render_op_set(bg, EVAS_RENDER_COPY);
+ evas_object_color_set(bg, 30, 30, 30, 128);
+ evas_object_show(bg);
+
+ o = evas_object_text_add(ov_win->evas);
+ evas_object_text_font_set(o, "Sans", 28);
+ evas_object_text_text_set(o, str);
+ evas_object_layer_set(o, EVAS_LAYER_MAX);
+ evas_object_render_op_set(o, EVAS_RENDER_COPY);
+ evas_object_color_set(o, 200, 200, 200, 255);
+ evas_object_show(o);
+
+ log->bg = bg;
+ log->o = o;
+ }
+ else
+ {
+ prev_log = eina_list_nth(ov_win->info.list, 0);
+ if (!prev_log)
+ {
+ E_FREE(log);
+ return;
+ }
+ log->bg = prev_log->bg;
+ log->o = prev_log->o;
+ ov_win->info.list = eina_list_remove(ov_win->info.list, prev_log);
+ E_FREE(prev_log);
+
+ evas_object_text_text_set(log->o, str);
+ }
+
+ ov_win->info.list = eina_list_append(ov_win->info.list, log);
+
+ y = ov_win->h - 40;
+ EINA_LIST_REVERSE_FOREACH(ov_win->info.list, l, log)
+ {
+ if (!log) continue;
+ evas_object_geometry_get(log->o, NULL, NULL, &w, &h);
+ evas_object_move(log->bg, 0, y - 1);
+ evas_object_resize(log->bg, w + 2, h + 2);
+ evas_object_move(log->o, 1, y);
+ y -= (h+2);
+ }
+}
+
+EINTERN void
+e_mod_comp_hw_ov_win_free(E_Comp_HW_Ov_Win *ov)
+{
+ E_Comp_Log *log;
+ E_CHECK(ov);
+
+ _hw_ov_win_power_set(ov, EINA_FALSE);
+
+ EINA_LIST_FREE(ov->info.list, log)
+ {
+ evas_object_hide(log->o);
+ evas_object_hide(log->bg);
+ evas_object_del(log->o);
+ evas_object_del(log->bg);
+ memset(log, 0, sizeof(E_Comp_Log));
+ E_FREE(log);
+ }
+ if (ov->bg)
+ {
+ evas_object_del(ov->bg);
+ ov->bg = NULL;
+ }
+ if (ov->ee)
+ {
+ ecore_evas_free(ov->ee);
+ ov->ee = NULL;
+ }
+ memset(ov, 0, sizeof(E_Comp_HW_Ov_Win));
+ E_FREE(ov);
+
+ ov_win = NULL;
+}
+
+EINTERN void
+e_mod_comp_hw_ov_win_show(E_Comp_HW_Ov_Win *ov,
+ E_Comp_Win *cw)
+{
+ E_CHECK(ov);
+ E_CHECK(cw);
+ E_CHECK(cw->visible);
+ E_CHECK(cw->dmg_updates >= 1);
+
+ _hw_ov_win_update(ov, cw);
+}
+
+EINTERN void
+e_mod_comp_hw_ov_win_hide(E_Comp_HW_Ov_Win *ov,
+ E_Comp_Win *cw)
+{
+ E_CHECK(ov);
+ E_CHECK(cw);
+ E_CHECK(!cw->visible);
+
+ _hw_ov_win_power_set(ov, EINA_FALSE);
+
+ if (cw->ov_obj)
+ {
+ evas_object_hide(cw->ov_obj);
+ evas_object_del(cw->ov_obj);
+ cw->ov_obj = NULL;
+ }
+
+ if (cw->ov_xim)
+ {
+ ecore_x_image_free(cw->ov_xim);
+ cw->ov_xim = NULL;
+ }
+ cw->ov.w = 0;
+ cw->ov.h = 0;
+}
+
+EINTERN void
+e_mod_comp_hw_ov_win_obj_show(E_Comp_HW_Ov_Win *ov,
+ E_Comp_Win *cw)
+{
+ Eina_Bool visible;
+
+ if (cw->ov_obj)
+ {
+ visible = evas_object_visible_get(cw->ov_obj);
+ if (!visible)
+ {
+ Eina_Bool res = _hw_ov_win_update(ov, cw);
+ if (res)
+ {
+ evas_object_show(cw->ov_obj);
+ _hw_ov_win_power_set(ov, EINA_TRUE);
+ }
+ }
+ }
+}
+
+EINTERN void
+e_mod_comp_hw_ov_win_obj_hide(E_Comp_HW_Ov_Win *ov,
+ E_Comp_Win *cw)
+{
+ Eina_Bool visible;
+ if (cw->ov_obj)
+ {
+ visible = evas_object_visible_get(cw->ov_obj);
+ if (visible)
+ {
+ _hw_ov_win_power_set(ov, EINA_FALSE);
+ evas_object_hide(cw->ov_obj);
+ }
+ }
+}
+
+
+
+EINTERN Eina_Bool
+e_mod_comp_hw_ov_win_update(E_Comp_HW_Ov_Win *ov,
+ E_Comp_Win *cw)
+{
+ E_CHECK_RETURN(ov, EINA_FALSE);
+ E_CHECK_RETURN(cw, EINA_FALSE);
+
+ Eina_Bool res = _hw_ov_win_update(ov, cw);
+ if (!res)
+ {
+ // we will be trying to get image again at next update.
+ cw->update = 1;
+ cw->c->updates = eina_list_append(cw->c->updates, cw);
+ e_mod_comp_win_render_queue(cw);
+ }
+
+ return res;
+}
+
+EINTERN void
+e_mod_comp_hw_ov_win_root_set(E_Comp_HW_Ov_Win *ov,
+ Ecore_X_Window root)
+{
+ E_CHECK(ov);
+ ov->root = root;
+}
+
+/* local subsystem functions */
+static void
+_hw_ov_win_power_set(E_Comp_HW_Ov_Win *ov,
+ Eina_Bool set)
+{
+ if (set)
+ {
+ if (!ov->on)
+ {
+ // power on
+ e_mod_comp_util_fb_visible_set(set);
+ ov->on = EINA_TRUE;
+ }
+ }
+ else
+ {
+ if (ov->on)
+ {
+ // power off
+ e_mod_comp_util_fb_visible_set(set);
+ ov->on = EINA_FALSE;
+ }
+ }
+}
+
+static Eina_Bool
+_hw_ov_win_update(E_Comp_HW_Ov_Win *ov,
+ E_Comp_Win *cw)
+{
+ Eina_Bool visible = EINA_FALSE;
+ Eina_Bool get = EINA_FALSE;
+ unsigned char *pix = NULL;
+
+ if (!cw->pixmap || cw->pw <= 0 || cw->ph <= 0 || cw->needpix)
+ {
+ cw->ov.w = 0;
+ cw->ov.h = 0;
+ if (cw->ov_xim) ecore_x_image_free(cw->ov_xim);
+ cw->ov_xim = NULL;
+ return EINA_FALSE;
+ }
+
+ if (cw->pixmap && cw->pw > 0 && cw->ph > 0)
+ {
+ if (!cw->ov_xim)
+ {
+ cw->ov_xim = ecore_x_image_new(cw->pw, cw->ph, cw->vis, cw->depth);
+ if (!cw->ov_xim) return EINA_FALSE;
+
+ cw->ov.w = cw->pw;
+ cw->ov.h = cw->ph;
+ }
+ else if (cw->ov.w != cw->pw || cw->ov.h != cw->ph)
+ {
+ if (cw->ov_xim) ecore_x_image_free(cw->ov_xim);
+ cw->ov_xim = ecore_x_image_new(cw->pw, cw->ph, cw->vis, cw->depth);
+ if (!cw->ov_xim)
+ {
+ cw->ov.w = 0;
+ cw->ov.h = 0;
+ return EINA_FALSE;
+ }
+ cw->ov.w = cw->pw;
+ cw->ov.h = cw->ph;
+ }
+ }
+
+ if (cw->pixmap && cw->pw > 0 && cw->ph > 0 && cw->ov_xim &&
+ !cw->ov_obj && cw->visible)
+ {
+ cw->ov_obj = evas_object_image_filled_add(ov->evas);
+ if (!cw->ov_obj) return EINA_FALSE;
+ evas_object_image_content_hint_set(cw->ov_obj, EVAS_IMAGE_CONTENT_HINT_DYNAMIC);
+ evas_object_image_colorspace_set(cw->ov_obj, EVAS_COLORSPACE_ARGB8888);
+ evas_object_image_size_set(cw->ov_obj, cw->pw, cw->ph);
+ if (cw->argb) evas_object_image_alpha_set(cw->ov_obj, 1);
+ else evas_object_image_alpha_set(cw->ov_obj, 0);
+ evas_object_image_fill_set(cw->ov_obj, 0, 0, cw->pw, cw->ph);
+ evas_object_resize(cw->ov_obj, cw->pw, cw->ph);
+ evas_object_render_op_set(cw->ov_obj, EVAS_RENDER_COPY);
+ evas_object_color_set(cw->ov_obj, 255, 255, 255, 255);
+ evas_object_show(cw->ov_obj);
+ _hw_ov_win_power_set(ov, EINA_TRUE);
+ }
+
+ if (cw->ov_obj && cw->visible)
+ {
+ visible = evas_object_visible_get(cw->ov_obj);
+ if (!visible)
+ {
+ evas_object_show(cw->ov_obj);
+ _hw_ov_win_power_set(ov, EINA_TRUE);
+ }
+ }
+
+ if (cw->ov_xim && cw->ov_obj && cw->visible)
+ {
+ pix = ecore_x_image_data_get(cw->ov_xim, NULL, NULL, NULL);
+ evas_object_image_data_set(cw->ov_obj, pix);
+ evas_object_image_size_set(cw->ov_obj, cw->pw, cw->ph);
+
+ get = ecore_x_image_get(cw->ov_xim, cw->pixmap,
+ 0, 0, 0, 0,
+ cw->pw, cw->ph);
+
+ if (!get)
+ {
+ e_mod_comp_update_add(cw->up, 0, 0, cw->pw, cw->ph);
+ return EINA_FALSE;
+ }
+
+ evas_object_move(cw->ov_obj, cw->x, cw->y);
+ evas_object_resize(cw->ov_obj, cw->pw, cw->ph);
+
+ int bpl, rows, bpp;
+ pix = ecore_x_image_data_get(cw->ov_xim, &bpl, &rows, &bpp);
+ if (pix)
+ {
+ evas_data_argb_unpremul((unsigned int *)pix,
+ (unsigned int)bpl * (unsigned int)rows / bpp);
+ evas_object_image_data_set(cw->ov_obj, pix);
+ evas_object_image_data_update_add(cw->ov_obj, 0, 0, cw->pw, cw->ph);
+ }
+ }
+ return EINA_TRUE;
+}
--- /dev/null
+#ifdef E_TYPEDEFS
+#else
+#ifndef E_MOD_COMP_HW_OV_WIN_H
+#define E_MOD_COMP_HW_OV_WIN_H
+
+typedef enum _E_Comp_Log_Type E_Comp_Log_Type;
+typedef struct _E_Comp_HW_Ov_Win E_Comp_HW_Ov_Win;
+
+enum _E_Comp_Log_Type
+{
+ E_COMP_LOG_TYPE_DEFAULT = 0,
+ E_COMP_LOG_TYPE_NOCOMP,
+ E_COMP_LOG_TYPE_SWAP,
+ E_COMP_LOG_TYPE_EFFECT,
+ E_COMP_LOG_TYPE_MAX
+};
+
+/* HW overlay window setup and handler functions */
+EINTERN E_Comp_HW_Ov_Win *e_mod_comp_hw_ov_win_new(Ecore_X_Window parent,
+ int x,
+ int y,
+ int w,
+ int h);
+EINTERN void e_mod_comp_hw_ov_win_free(E_Comp_HW_Ov_Win *ov);
+EINTERN Eina_Bool e_mod_comp_hw_ov_win_update(E_Comp_HW_Ov_Win *ov,
+ E_Comp_Win *cw);
+EINTERN void e_mod_comp_hw_ov_win_show(E_Comp_HW_Ov_Win *ov,
+ E_Comp_Win *cw);
+EINTERN void e_mod_comp_hw_ov_win_hide(E_Comp_HW_Ov_Win *ov,
+ E_Comp_Win *cw);
+EINTERN void e_mod_comp_hw_ov_win_msg_config_update(void);
+EINTERN void e_mod_comp_hw_ov_win_msg_show(E_Comp_Log_Type type,
+ const char *f,
+ ...);
+EINTERN void e_mod_comp_hw_ov_win_root_set(E_Comp_HW_Ov_Win *ov,
+ Ecore_X_Window root);
+EINTERN void e_mod_comp_hw_ov_win_obj_show(E_Comp_HW_Ov_Win *ov,
+ E_Comp_Win *cw);
+EINTERN void e_mod_comp_hw_ov_win_obj_hide(E_Comp_HW_Ov_Win *ov,
+ E_Comp_Win *cw);
+#endif
+#endif
--- /dev/null
+#include "e_mod_comp_shared_types.h"
+#include "e_mod_comp_debug.h"
+#include "e_mod_comp.h"
+
+#define _F_BORDER_CLIP_TO_ZONE_ 1
+
+/* externally accessible functions */
+EINTERN E_Comp_Object *
+e_mod_comp_obj_add(E_Comp_Win *cw,
+ E_Comp_Canvas *canvas)
+{
+ E_Comp_Object *co;
+ co = E_NEW(E_Comp_Object, 1);
+ E_CHECK_RETURN(co, 0);
+ if ((!cw->input_only) && (!cw->invalid))
+ {
+ co->shadow = edje_object_add(canvas->evas);
+ co->img = evas_object_image_filled_add(canvas->evas);
+ evas_object_image_colorspace_set(co->img, EVAS_COLORSPACE_ARGB8888);
+ if (cw->argb) evas_object_image_alpha_set(co->img, 1);
+ else evas_object_image_alpha_set(co->img, 0);
+ }
+ else
+ {
+ co->shadow = evas_object_rectangle_add(canvas->evas);
+ evas_object_color_set(co->shadow, 0, 0, 0, 0);
+ }
+
+ co->canvas = canvas;
+ co->zone = canvas->zone;
+ return co;
+}
+
+EINTERN void
+e_mod_comp_obj_del(E_Comp_Object *co)
+{
+ if (co->img_mirror)
+ {
+ Evas_Object *o;
+ EINA_LIST_FREE(co->img_mirror, o)
+ {
+ if (co->xim) evas_object_image_data_set(o, NULL);
+ evas_object_event_callback_del(o, EVAS_CALLBACK_DEL,
+ e_mod_comp_cb_win_mirror_del);
+ evas_object_del(o);
+ }
+ }
+ if (co->xim)
+ {
+ evas_object_image_data_set(co->img, NULL);
+ ecore_x_image_free(co->xim);
+ co->xim = NULL;
+ }
+ if (co->clipper)
+ {
+ evas_object_del(co->clipper);
+ co->clipper = NULL;
+ }
+ if (co->img)
+ {
+ evas_object_del(co->img);
+ co->img = NULL;
+ }
+ if (co->shadow)
+ {
+ evas_object_del(co->shadow);
+ co->shadow = NULL;
+ }
+ E_FREE(co);
+}
+
+EINTERN Eina_List *
+e_mod_comp_win_comp_objs_add(E_Comp_Win *cw)
+{
+ Eina_List *l, *objs = NULL;
+ E_Comp_Canvas *canvas;
+ E_Comp_Object *co;
+
+ EINA_LIST_FOREACH(cw->c->canvases, l, canvas)
+ {
+ co = e_mod_comp_obj_add(cw, canvas);
+ if (!co)
+ {
+ e_mod_comp_win_comp_objs_del(cw, objs);
+ return NULL;
+ }
+ objs = eina_list_append(objs, co);
+ }
+ return objs;
+}
+
+EINTERN void
+e_mod_comp_win_comp_objs_del(E_Comp_Win *cw,
+ Eina_List *objs)
+{
+ E_Comp_Object *co;
+ EINA_LIST_FREE(objs, co) e_mod_comp_obj_del(co);
+}
+
+EINTERN void
+e_mod_comp_win_comp_objs_move(E_Comp_Win *cw,
+ int x,
+ int y)
+{
+ Eina_List *l;
+ E_Comp_Object *co;
+ EINA_LIST_FOREACH(cw->objs, l, co)
+ {
+ int zx = 0, zy = 0;
+ if (!co) continue;
+ if (!co->shadow) continue;
+ if (co->zone)
+ {
+ zx = co->zone->x;
+ zy = co->zone->y;
+ }
+ evas_object_move(co->shadow, x - zx, y - zy);
+
+#ifdef _F_BORDER_CLIP_TO_ZONE_
+ if ((cw->visible) && (cw->bd) && (co->zone) &&
+ (!cw->input_only) && (!cw->invalid) &&
+ E_INTERSECTS(co->zone->x, co->zone->y,
+ co->zone->w, co->zone->h,
+ cw->x, cw->y, cw->w, cw->h))
+ {
+ if (!(E_CONTAINS(co->zone->x, co->zone->y,
+ co->zone->w, co->zone->h,
+ cw->x, cw->y, cw->w, cw->h)))
+ {
+ int _x, _y, _w, _h;
+ _x = x - zx; _y = y - zy;
+ _w = cw->pw; _h = cw->ph;
+
+ E_RECTS_CLIP_TO_RECT(_x, _y, _w, _h,
+ 0, 0, co->zone->w, co->zone->h);
+ if (!co->clipper)
+ {
+ co->clipper = evas_object_rectangle_add(co->canvas->evas);
+ evas_object_clip_set(co->shadow, co->clipper);
+ /* check to see if a given object exists on the zone which is
+ * equal to its border. if it is, the clipper will be shown.
+ * otherwise, the clipper will be invisible.
+ */
+ if (cw->bd->zone == co->zone)
+ evas_object_show(co->clipper);
+ }
+ evas_object_move(co->clipper, _x, _y);
+ evas_object_resize(co->clipper, _w, _h);
+ }
+ else
+ {
+ if (co->clipper)
+ {
+ evas_object_hide(co->clipper);
+ evas_object_clip_unset(co->shadow);
+ evas_object_del(co->clipper);
+ co->clipper = NULL;
+ }
+ }
+ }
+#endif
+ }
+}
+
+EINTERN void
+e_mod_comp_win_comp_objs_resize(E_Comp_Win *cw,
+ int w,
+ int h)
+{
+ Eina_List *l;
+ E_Comp_Object *co;
+ EINA_LIST_FOREACH(cw->objs, l, co)
+ {
+ if (!co) continue;
+ if (!co->shadow) continue;
+ evas_object_resize(co->shadow, w, h);
+ }
+}
+
+EINTERN void
+e_mod_comp_win_comp_objs_img_resize(E_Comp_Win *cw,
+ int w,
+ int h)
+{
+ Eina_List *l;
+ E_Comp_Object *co;
+ EINA_LIST_FOREACH(cw->objs, l, co)
+ {
+ if (!co) continue;
+ if (!co->img) continue;
+ evas_object_resize(co->img, w, h);
+ }
+}
+
+EINTERN void
+e_mod_comp_win_comp_objs_img_init(E_Comp_Win *cw)
+{
+ Eina_List *l, *ll;
+ E_Comp_Object *co;
+ Evas_Object *o;
+ EINA_LIST_FOREACH(cw->objs, l, co)
+ {
+ if (!co) continue;
+ if (co->native) continue;
+ 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(co->img, &ns);
+ EINA_LIST_FOREACH(co->img_mirror, ll, o)
+ {
+ evas_object_image_native_surface_set(o, &ns);
+ }
+ evas_object_image_data_update_add(co->img, 0, 0, cw->pw, cw->ph);
+ co->native = 1;
+ }
+}
+
+EINTERN void
+e_mod_comp_win_comp_objs_img_deinit(E_Comp_Win *cw)
+{
+ Eina_List *l, *ll;
+ E_Comp_Object *co;
+ Evas_Object *o;
+ EINA_LIST_FOREACH(cw->objs, l, co)
+ {
+ if (!co) continue;
+ if (!co->native) continue;
+ evas_object_image_native_surface_set(co->img, NULL);
+ co->native = 0;
+ EINA_LIST_FOREACH(co->img_mirror, ll, o)
+ {
+ if (!o) continue;
+ evas_object_image_native_surface_set(o, NULL);
+ }
+ }
+}
+
+EINTERN void
+e_mod_comp_win_comp_objs_xim_free(E_Comp_Win *cw)
+{
+ Eina_List *l, *ll;
+ E_Comp_Object *co;
+ Evas_Object *o;
+ EINA_LIST_FOREACH(cw->objs, l, co)
+ {
+ if (!co) continue;
+ if (!co->xim) continue;
+ evas_object_image_size_set(co->img, 1, 1);
+ evas_object_image_data_set(co->img, NULL);
+ ecore_x_image_free(co->xim);
+ co->xim = NULL;
+ EINA_LIST_FOREACH(co->img_mirror, ll, o)
+ {
+ evas_object_image_size_set(o, 1, 1);
+ evas_object_image_data_set(o, NULL);
+ }
+ }
+}
+
+EINTERN void
+e_mod_comp_win_comp_objs_img_pass_events_set(E_Comp_Win *cw,
+ Eina_Bool set)
+{
+ Eina_List *l;
+ E_Comp_Object *co;
+ EINA_LIST_FOREACH(cw->objs, l, co)
+ {
+ if (!co) continue;
+ if (!co->img) continue;
+ evas_object_pass_events_set(co->img, set);
+ }
+}
+
+EINTERN void
+e_mod_comp_win_comp_objs_pass_events_set(E_Comp_Win *cw,
+ Eina_Bool set)
+{
+ Eina_List *l;
+ E_Comp_Object *co;
+ EINA_LIST_FOREACH(cw->objs, l, co)
+ {
+ if (!co) continue;
+ if (!co->shadow) continue;
+ evas_object_pass_events_set(co->shadow, set);
+ }
+}
+
+EINTERN void
+e_mod_comp_win_comp_objs_img_alpha_set(E_Comp_Win *cw,
+ Eina_Bool alpha)
+{
+ Eina_List *l, *ll;
+ E_Comp_Object *co;
+ Evas_Object *o;
+ EINA_LIST_FOREACH(cw->objs, l, co)
+ {
+ if (!co) continue;
+ if (!co->img) continue;
+ evas_object_image_alpha_set(co->img, alpha);
+ EINA_LIST_FOREACH(co->img_mirror, ll, o)
+ {
+ evas_object_image_alpha_set(o, alpha);
+ }
+ }
+}
+
+EINTERN void
+e_mod_comp_win_comp_objs_img_size_set(E_Comp_Win *cw,
+ int w,
+ int h)
+{
+ Eina_List *l, *ll;
+ E_Comp_Object *co;
+ Evas_Object *o;
+ EINA_LIST_FOREACH(cw->objs, l, co)
+ {
+ if (!co) continue;
+ if (!co->img) continue;
+ evas_object_image_size_set(co->img, w, h);
+ EINA_LIST_FOREACH(co->img_mirror, ll, o)
+ {
+ evas_object_image_size_set(o, w, h);
+ }
+ }
+}
+
+EINTERN void
+e_mod_comp_win_comp_objs_img_data_update_add(E_Comp_Win *cw,
+ int x,
+ int y,
+ int w,
+ int h)
+{
+ Eina_List *l, *ll;
+ E_Comp_Object *co;
+ Evas_Object *o;
+ EINA_LIST_FOREACH(cw->objs, l, co)
+ {
+ if (!co) continue;
+ if (!co->img) continue;
+
+ /* viewport culling:
+ * Do nothing if an object is not located on E_Zone.
+ * A given object should not be marked if it is located on
+ * outer viewport. The evas doesn't perform viewport culling
+ * correctly.
+ */
+ if ((cw->visible) &&
+ !((cw->input_only) && (cw->invalid)) &&
+ E_INTERSECTS(co->zone->x, co->zone->y,
+ co->zone->w, co->zone->h,
+ cw->x, cw->y, cw->w, cw->h))
+ {
+ evas_object_image_data_update_add(co->img, x, y, w, h);
+ }
+
+ EINA_LIST_FOREACH(co->img_mirror, ll, o)
+ {
+ evas_object_image_data_update_add(o, x, y, w, h);
+ }
+ }
+}
+
+EINTERN void
+e_mod_comp_win_comp_objs_needxim_set(E_Comp_Win *cw,
+ Eina_Bool need)
+{
+ Eina_List *l;
+ E_Comp_Object *co;
+ EINA_LIST_FOREACH(cw->objs, l, co)
+ {
+ if (!co) continue;
+ if (need && co->xim) co->needxim = EINA_TRUE;
+ }
+}
+
+EINTERN void
+e_mod_comp_win_comp_objs_native_set(E_Comp_Win *cw,
+ Eina_Bool native)
+{
+ Eina_List *l;
+ E_Comp_Object *co;
+ EINA_LIST_FOREACH(cw->objs, l, co)
+ {
+ if (!co) continue;
+ co->native = native;
+ }
+}
+
+EINTERN void
+e_mod_comp_win_comp_objs_data_del(E_Comp_Win *cw,
+ const char *key)
+{
+ Eina_List *l;
+ E_Comp_Object *co;
+ EINA_LIST_FOREACH(cw->objs, l, co)
+ {
+ if (!co) continue;
+ evas_object_data_del(co->shadow, key);
+ }
+}
+
+EINTERN void
+e_mod_comp_win_comp_objs_data_set(E_Comp_Win *cw,
+ const char *key,
+ const void *data)
+{
+ Eina_List *l;
+ E_Comp_Object *co;
+ EINA_LIST_FOREACH(cw->objs, l, co)
+ {
+ if (!co) continue;
+ if (!co->shadow) continue;
+ evas_object_data_set(co->shadow, key, data);
+ }
+}
+
+EINTERN void
+e_mod_comp_win_comp_objs_show(E_Comp_Win *cw)
+{
+ Eina_List *l;
+ E_Comp_Object *co;
+ Eina_Bool eff = EINA_FALSE;
+ EINA_LIST_FOREACH(cw->objs, l, co)
+ {
+ if (!co) continue;
+ if ((!cw->update) &&
+ (cw->visible) &&
+ (cw->dmg_updates >= 1))
+ {
+ if (!evas_object_visible_get(co->shadow) &&
+ !(cw->animate_hide))
+ {
+ if (!cw->hidden_override)
+ evas_object_show(co->shadow);
+ else
+ e_mod_comp_bg_win_handler_update(cw);
+
+ if (!cw->hidden_override)
+ eff = EINA_TRUE;
+ }
+ }
+ }
+
+ if (eff) e_mod_comp_effect_win_show(cw);
+}
+
+/**
+ * It is possible that the WM can receive a border show event immediatly
+ * after getting a border hide event such as indicator hide/show.
+ * In that case, if we use e_mod_comp_win_objs_show() function then we
+ * don't append showing EDJE signal because a shadow object of given window
+ * is still visible state. The hide_done callback can make object to hide.
+ * Thus the WM has to append showing EDJE signal into the job queue
+ * to show a shadow object of given window.
+ */
+EINTERN void
+e_mod_comp_win_comp_objs_force_show(E_Comp_Win *cw)
+{
+ Eina_List *l;
+ E_Comp_Object *co;
+ Eina_Bool eff = EINA_FALSE;
+ EINA_LIST_FOREACH(cw->objs, l, co)
+ {
+ if (!co) continue;
+ if (!cw->animate_hide)
+ {
+ if (!cw->hidden_override)
+ {
+ if (!evas_object_visible_get(co->shadow))
+ evas_object_show(co->shadow);
+ eff = EINA_TRUE;
+ }
+ else
+ e_mod_comp_bg_win_handler_update(cw);
+ }
+ }
+
+ if (eff) e_mod_comp_effect_win_show(cw);
+}
+
+EINTERN void
+e_mod_comp_win_comp_objs_hide(E_Comp_Win *cw)
+{
+ Eina_List *l;
+ E_Comp_Object *co;
+ EINA_LIST_FOREACH(cw->objs, l, co)
+ {
+ if (!co) continue;
+ if (!co->shadow) continue;
+ evas_object_hide(co->shadow);
+ }
+}
+
+EINTERN void
+e_mod_comp_win_comp_objs_raise(E_Comp_Win *cw)
+{
+ Eina_List *l;
+ E_Comp_Object *co;
+ EINA_LIST_FOREACH(cw->objs, l, co)
+ {
+ if (!co) continue;
+ evas_object_raise(co->shadow);
+ }
+}
+
+EINTERN void
+e_mod_comp_win_comp_objs_lower(E_Comp_Win *cw)
+{
+ Eina_List *l;
+ E_Comp_Object *co;
+ EINA_LIST_FOREACH(cw->objs, l, co)
+ {
+ if (!co) continue;
+ evas_object_lower(co->shadow);
+ }
+}
+
+EINTERN void
+e_mod_comp_win_comp_objs_stack_above(E_Comp_Win *cw,
+ E_Comp_Win *cw2)
+{
+ Eina_List *l, *ll;
+ E_Comp_Object *co, *co2;
+ EINA_LIST_FOREACH(cw->objs, l, co)
+ {
+ EINA_LIST_FOREACH(cw2->objs, ll, co2)
+ {
+ if (co->zone == co2->zone)
+ {
+ evas_object_stack_above(co->shadow,
+ co2->shadow);
+ }
+ }
+ }
+}
--- /dev/null
+#ifdef E_TYPEDEFS
+#else
+#ifndef E_MOD_COMP_OBJECT_H
+#define E_MOD_COMP_OBJECT_H
+
+typedef struct _E_Comp_Object E_Comp_Object;
+
+struct _E_Comp_Object
+{
+ E_Comp_Canvas *canvas;
+ E_Zone *zone;
+
+ Evas_Object *img; // composite image object
+ Evas_Object *shadow; // shadow object
+ Eina_List *img_mirror; // extra mirror image objects
+ Ecore_X_Image *xim; // x image - software fallback
+
+ Evas_Object *clipper;
+
+ Eina_Bool native : 1; // native
+ Eina_Bool needxim : 1; // need new xim
+};
+
+EINTERN E_Comp_Object *e_mod_comp_obj_add(E_Comp_Win *cw, E_Comp_Canvas *canvas);
+EINTERN void e_mod_comp_obj_del(E_Comp_Object *co);
+
+EINTERN Eina_List *e_mod_comp_win_comp_objs_add(E_Comp_Win *cw);
+EINTERN void e_mod_comp_win_comp_objs_del(E_Comp_Win *cw, Eina_List *objs);
+EINTERN void e_mod_comp_win_comp_objs_move(E_Comp_Win *cw, int x, int y);
+EINTERN void e_mod_comp_win_comp_objs_resize(E_Comp_Win *cw, int w, int h);
+EINTERN void e_mod_comp_win_comp_objs_img_resize(E_Comp_Win *cw, int w, int h);
+EINTERN void e_mod_comp_win_comp_objs_img_init(E_Comp_Win *cw);
+EINTERN void e_mod_comp_win_comp_objs_img_deinit(E_Comp_Win *cw);
+EINTERN void e_mod_comp_win_comp_objs_xim_free(E_Comp_Win *cw);
+EINTERN void e_mod_comp_win_comp_objs_img_pass_events_set(E_Comp_Win *cw, Eina_Bool set);
+EINTERN void e_mod_comp_win_comp_objs_pass_events_set(E_Comp_Win *cw, Eina_Bool set);
+EINTERN void e_mod_comp_win_comp_objs_img_alpha_set(E_Comp_Win *cw, Eina_Bool alpha);
+EINTERN void e_mod_comp_win_comp_objs_img_size_set(E_Comp_Win *cw, int w, int h);
+EINTERN void e_mod_comp_win_comp_objs_img_data_update_add(E_Comp_Win *cw, int x, int y, int w, int h);
+EINTERN void e_mod_comp_win_comp_objs_needxim_set(E_Comp_Win *cw, Eina_Bool need);
+EINTERN void e_mod_comp_win_comp_objs_native_set(E_Comp_Win *cw, Eina_Bool native);
+EINTERN void e_mod_comp_win_comp_objs_data_del(E_Comp_Win *cw, const char *key);
+EINTERN void e_mod_comp_win_comp_objs_data_set(E_Comp_Win *cw, const char *key, const void *data);
+EINTERN void e_mod_comp_win_comp_objs_show(E_Comp_Win *cw);
+EINTERN void e_mod_comp_win_comp_objs_force_show(E_Comp_Win *cw);
+EINTERN void e_mod_comp_win_comp_objs_hide(E_Comp_Win *cw);
+EINTERN void e_mod_comp_win_comp_objs_raise(E_Comp_Win *cw);
+EINTERN void e_mod_comp_win_comp_objs_lower(E_Comp_Win *cw);
+EINTERN void e_mod_comp_win_comp_objs_stack_above(E_Comp_Win *cw, E_Comp_Win *cw2);
+
+#endif
+#endif
--- /dev/null
+#include "e_mod_comp_shared_types.h"
+#include "e_mod_comp.h"
+#include "e_mod_comp_debug.h"
+#include "e_mod_comp_policy.h"
+
+/* local subsystem functions */
+static E_Comp_Win *_transient_parent_find(E_Comp_Win *cw);
+
+/* local subsystem globals */
+static Eina_Hash *shadow_hash = NULL;
+
+/* externally accessible functions */
+EINTERN int
+e_mod_comp_policy_init(void)
+{
+ if (!shadow_hash) shadow_hash = eina_hash_string_superfast_new(NULL);
+
+ eina_hash_add(shadow_hash, e_util_winid_str_get(E_COMP_WIN_TYPE_UNKNOWN), "shadow" );
+ eina_hash_add(shadow_hash, e_util_winid_str_get(E_COMP_WIN_TYPE_DESKTOP), "no-effect" );
+ eina_hash_add(shadow_hash, e_util_winid_str_get(E_COMP_WIN_TYPE_DOCK), "shadow_fade");
+ eina_hash_add(shadow_hash, e_util_winid_str_get(E_COMP_WIN_TYPE_TOOLBAR), "no-effect" );
+ eina_hash_add(shadow_hash, e_util_winid_str_get(E_COMP_WIN_TYPE_MENU), "no-effect" );
+ eina_hash_add(shadow_hash, e_util_winid_str_get(E_COMP_WIN_TYPE_UTILITY), "no-effect" );
+ eina_hash_add(shadow_hash, e_util_winid_str_get(E_COMP_WIN_TYPE_SPLASH), "no-effect" );
+ eina_hash_add(shadow_hash, e_util_winid_str_get(E_COMP_WIN_TYPE_DIALOG), "dialog" );
+ eina_hash_add(shadow_hash, e_util_winid_str_get(E_COMP_WIN_TYPE_NORMAL), "shadow_fade");
+ eina_hash_add(shadow_hash, e_util_winid_str_get(E_COMP_WIN_TYPE_DROPDOWN_MENU), "no-effect" );
+ eina_hash_add(shadow_hash, e_util_winid_str_get(E_COMP_WIN_TYPE_POPUP_MENU), "shadow" );
+ eina_hash_add(shadow_hash, e_util_winid_str_get(E_COMP_WIN_TYPE_TOOLTIP), "shadow" );
+ eina_hash_add(shadow_hash, e_util_winid_str_get(E_COMP_WIN_TYPE_NOTIFICATION), "dialog" );
+ eina_hash_add(shadow_hash, e_util_winid_str_get(E_COMP_WIN_TYPE_COMBO), "no-effect" );
+ eina_hash_add(shadow_hash, e_util_winid_str_get(E_COMP_WIN_TYPE_DND), "no-effect" );
+ eina_hash_add(shadow_hash, e_util_winid_str_get(E_COMP_WIN_TYPE_MENUSCREEN), "home_screen");
+ eina_hash_add(shadow_hash, e_util_winid_str_get(E_COMP_WIN_TYPE_QUICKPANEL_BASE),"quickpanel" );
+ eina_hash_add(shadow_hash, e_util_winid_str_get(E_COMP_WIN_TYPE_QUICKPANEL), "quickpanel" );
+ eina_hash_add(shadow_hash, e_util_winid_str_get(E_COMP_WIN_TYPE_TASKMANAGER), "taskmgr" );
+ eina_hash_add(shadow_hash, e_util_winid_str_get(E_COMP_WIN_TYPE_LIVEMAGAZINE), "home_screen");
+ eina_hash_add(shadow_hash, e_util_winid_str_get(E_COMP_WIN_TYPE_LOCKSCREEN), "lockscreen" );
+ eina_hash_add(shadow_hash, e_util_winid_str_get(E_COMP_WIN_TYPE_INDICATOR), "indicator" );
+ eina_hash_add(shadow_hash, e_util_winid_str_get(E_COMP_WIN_TYPE_TICKERNOTI), "dialog" );
+ eina_hash_add(shadow_hash, e_util_winid_str_get(E_COMP_WIN_TYPE_DEBUGGING_INFO), "no-effect" );
+ eina_hash_add(shadow_hash, e_util_winid_str_get(E_COMP_WIN_TYPE_APPTRAY), "app_tray" );
+ eina_hash_add(shadow_hash, e_util_winid_str_get(E_COMP_WIN_TYPE_BACKGROUND), "no-effect" );
+ eina_hash_add(shadow_hash, e_util_winid_str_get(E_COMP_WIN_TYPE_ISF_KEYBOARD), "keyboard" );
+ eina_hash_add(shadow_hash, e_util_winid_str_get(E_COMP_WIN_TYPE_ISF_SUB), "shadow" );
+
+ return 1;
+}
+
+EINTERN int
+e_mod_comp_policy_shutdown(void)
+{
+ if (shadow_hash) eina_hash_free(shadow_hash);
+ shadow_hash = NULL;
+ return 1;
+}
+
+EINTERN Eina_Bool
+e_mod_comp_policy_app_launch_check(E_Comp_Win *cw)
+{
+ E_CHECK_RETURN(cw, 0);
+ if (TYPE_NORMAL_CHECK(cw) && SIZE_EQUAL_TO_ROOT(cw))
+ return EINA_TRUE;
+ return EINA_FALSE;
+}
+
+EINTERN Eina_Bool
+e_mod_comp_policy_app_close_check(E_Comp_Win *cw)
+{
+ E_CHECK_RETURN(cw, 0);
+ if (TYPE_NORMAL_CHECK(cw) && SIZE_EQUAL_TO_ROOT(cw))
+ return EINA_TRUE;
+ return EINA_FALSE;
+}
+
+EINTERN Eina_Bool
+e_mod_comp_policy_win_restack_check(E_Comp_Win *cw,
+ E_Comp_Win *cw2)
+{
+ E_Comp_Effect_Style st;
+ Eina_Bool animatable;
+ E_Comp_Win_Type type;
+ E_Comp_Win *tp, *tp2;
+
+ E_CHECK_RETURN(cw, 0);
+ E_CHECK_RETURN(cw2, 0);
+ E_CHECK_RETURN(cw->c, 0);
+
+ type = e_mod_comp_win_type_get(cw);
+ animatable = e_mod_comp_effect_state_get(cw->eff_type);
+ st = e_mod_comp_effect_style_get
+ (cw->eff_type,
+ E_COMP_EFFECT_KIND_RESTACK);
+
+ if ((!cw->c->animatable) ||
+ (!cw->visible) ||
+ (!animatable) ||
+ (st == E_COMP_EFFECT_STYLE_NONE) ||
+ (!REGION_EQUAL_TO_ROOT(cw)))
+ {
+ return EINA_FALSE;
+ }
+
+ tp = _transient_parent_find(cw);
+ tp2 = _transient_parent_find(cw2);
+ if ((tp) && (tp2) && (tp->win == tp2->win))
+ {
+ return EINA_FALSE;
+ }
+
+ if ((type == E_COMP_WIN_TYPE_NORMAL) ||
+ (type == E_COMP_WIN_TYPE_MENUSCREEN) ||
+ (type == E_COMP_WIN_TYPE_TASKMANAGER) ||
+ (type == E_COMP_WIN_TYPE_LIVEMAGAZINE))
+ {
+ return EINA_TRUE;
+ }
+
+ return EINA_FALSE;
+}
+
+EINTERN Eina_Bool
+e_mod_comp_policy_win_lower_check(E_Comp_Win *cw,
+ E_Comp_Win *cw2)
+{
+ E_Comp_Effect_Style st1, st2;
+ Eina_Bool animatable1, animatable2;
+ E_Comp_Win *tp, *tp2;
+
+ E_CHECK_RETURN(cw, 0);
+ E_CHECK_RETURN(cw2, 0);
+ E_CHECK_RETURN(cw->c, 0);
+ E_CHECK_RETURN(cw->c->animatable, 0);
+ E_CHECK_RETURN(cw->visible, 0);
+ E_CHECK_RETURN(cw2->visible, 0);
+ if (!REGION_EQUAL_TO_ROOT(cw)) return EINA_FALSE;
+ if (!REGION_EQUAL_TO_ROOT(cw2)) return EINA_FALSE;
+
+ animatable1 = e_mod_comp_effect_state_get(cw->eff_type);
+ animatable2 = e_mod_comp_effect_state_get(cw2->eff_type);
+ E_CHECK_RETURN(animatable1, 0);
+ E_CHECK_RETURN(animatable2, 0);
+
+ if ((!TYPE_NORMAL_CHECK(cw)) &&
+ (!TYPE_NORMAL_CHECK(cw2)))
+ {
+ return EINA_FALSE;
+ }
+
+ if ((!TYPE_NORMAL_CHECK(cw)) &&
+ (!TYPE_HOME_CHECK(cw2)))
+ {
+ return EINA_FALSE;
+ }
+
+ st1 = e_mod_comp_effect_style_get
+ (cw->eff_type, E_COMP_EFFECT_KIND_RESTACK);
+ st2 = e_mod_comp_effect_style_get
+ (cw2->eff_type, E_COMP_EFFECT_KIND_RESTACK);
+ E_CHECK_RETURN((st1 != E_COMP_EFFECT_STYLE_NONE), 0);
+ E_CHECK_RETURN((st2 != E_COMP_EFFECT_STYLE_NONE), 0);
+
+ tp = _transient_parent_find(cw);
+ tp2 = _transient_parent_find(cw2);
+ if ((tp) && (tp2) && (tp->win == tp2->win))
+ {
+ return EINA_FALSE;
+ }
+
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_comp_policy_win_rotation_effect_check(E_Comp_Win *cw)
+{
+ E_Comp_Effect_Style st;
+ Eina_Bool animatable;
+ const char *file, *group;
+ E_Comp_Object *co;
+
+ E_CHECK_RETURN(cw, 0);
+ E_CHECK_RETURN(cw->c, 0);
+ E_CHECK_RETURN(cw->c->animatable, 0);
+ E_CHECK_RETURN(cw->visible, 0);
+ E_CHECK_RETURN(cw->bd, 0);
+ E_CHECK_RETURN(cw->objs, 0);
+
+ if ((_comp_mod->conf->nocomp_fs) &&
+ (cw->c->nocomp))
+ {
+ return EINA_FALSE;
+ }
+
+ animatable = e_mod_comp_effect_state_get(cw->eff_type);
+ E_CHECK_RETURN(animatable, 0);
+
+ co = eina_list_data_get(cw->objs);
+ E_CHECK_RETURN(co, 0);
+
+ edje_object_file_get(co->shadow, &file, &group);
+ if ((strcmp(group, "shadow_fade") != 0) &&
+ (strcmp(group, "shadow_twist") !=0))
+ {
+ return EINA_FALSE;
+ }
+
+ st = e_mod_comp_effect_style_get
+ (cw->eff_type,
+ E_COMP_EFFECT_KIND_ROTATION);
+ if (st == E_COMP_EFFECT_STYLE_NONE)
+ return EINA_FALSE;
+
+ if ((e_mod_comp_util_win_visible_get(cw)) &&
+ (evas_object_visible_get(co->shadow)) &&
+ TYPE_NORMAL_CHECK(cw))
+ {
+ return EINA_TRUE;
+ }
+ return EINA_FALSE;
+}
+
+EINTERN char *
+e_mod_comp_policy_win_shadow_group_get(E_Comp_Win *cw)
+{
+ E_Comp_Win_Type type;
+ E_CHECK_RETURN(cw, 0);
+ type = e_mod_comp_win_type_get(cw);
+ return eina_hash_find(shadow_hash, e_util_winid_str_get(type));
+}
+
+/* local subsystem functions */
+static E_Comp_Win *
+_transient_parent_find(E_Comp_Win *cw)
+{
+ // if Border is not existed then, return itself.
+ // otherwise, return itself or parent.
+ 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;
+}
--- /dev/null
+#ifdef E_TYPEDEFS
+#else
+#ifndef E_MOD_COMP_POLICY_H
+#define E_MOD_COMP_POLICY_H
+
+EINTERN int e_mod_comp_policy_init(void);
+EINTERN int e_mod_comp_policy_shutdown(void);
+EINTERN Eina_Bool e_mod_comp_policy_app_launch_check(E_Comp_Win *cw);
+EINTERN Eina_Bool e_mod_comp_policy_app_close_check (E_Comp_Win *cw);
+EINTERN Eina_Bool e_mod_comp_policy_win_restack_check(E_Comp_Win *cw, E_Comp_Win *cw2);
+EINTERN Eina_Bool e_mod_comp_policy_win_lower_check(E_Comp_Win *cw, E_Comp_Win *cw2);
+EINTERN Eina_Bool e_mod_comp_policy_win_rotation_effect_check(E_Comp_Win *cw);
+EINTERN char *e_mod_comp_policy_win_shadow_group_get(E_Comp_Win *cw);
+
+#endif
+#endif
--- /dev/null
+#include "e.h"
+#include "e_mod_comp_shared_types.h"
+#include "e_mod_comp_atoms.h"
+#include "e_mod_comp_debug.h"
+#include "e_mod_comp.h"
+#include "e_mod_comp_screen.h"
+
+/* local subsystem functions */
+static int _screen_angle_get(Ecore_X_Window root);
+static void _screen_lock(E_Comp *c);
+static void _screen_unlock(E_Comp *c);
+static Eina_Bool _screen_lock_timeout(void *data);
+
+/* externally accessible functions */
+EINTERN Eina_Bool
+e_mod_comp_screen_rotation_init(E_Comp_Screen_Rotation *r,
+ Ecore_X_Window root,
+ int w, int h)
+{
+ E_CHECK_RETURN(r, 0);
+ E_CHECK_RETURN(root, 0);
+ E_CHECK_RETURN((w > 0), 0);
+ E_CHECK_RETURN((h > 0), 0);
+
+ r->enabled = EINA_FALSE;
+ r->scr_w = w;
+ r->scr_h = h;
+ r->angle = _screen_angle_get(root);
+
+ if (0 != r->angle)
+ {
+ r->enabled = EINA_TRUE;
+ if (0 != (r->angle % 180))
+ {
+ r->scr_w = h;
+ r->scr_h = w;
+ }
+ }
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_comp_screen_lock_init(E_Comp_Screen_Lock *l)
+{
+ E_CHECK_RETURN(l, 0);
+ l->locked = EINA_FALSE;
+ l->timeout = NULL;
+ return EINA_FALSE;
+}
+
+EINTERN Eina_Bool
+e_mod_comp_screen_lock_handler_message(Ecore_X_Event_Client_Message *ev)
+{
+ E_Comp *c;
+ E_CHECK_RETURN(ev, 0);
+ E_CHECK_RETURN(_comp_mod->conf->use_lock_screen, 0);
+
+ L(LT_EVENT_X, "COMP|ev:%15.15s MSG\n",
+ ev->data.l[0] ? "SCREEN_LOCK" : "SCREEN_UNLOCK");
+
+ c = e_mod_comp_find(ev->win);
+ E_CHECK_RETURN(c, 0);
+
+ if (ev->data.l[0] == 0) _screen_unlock(c);
+ else if (ev->data.l[0] == 1) _screen_lock(c);
+
+ return EINA_TRUE;
+}
+
+EINTERN void
+e_mod_comp_screen_lock_func(void *data,
+ E_Manager *man __UNUSED__)
+{
+ E_Comp *c = (E_Comp *)data;
+ E_CHECK(c);
+
+ L(LT_EVENT_X, "COMP|ev:%15.15s FUNC\n", "SCREEN_LOCK");
+
+ _screen_lock(c);
+}
+
+EINTERN void
+e_mod_comp_screen_unlock_func(void *data,
+ E_Manager *man __UNUSED__)
+{
+ E_Comp *c = (E_Comp *)data;
+ E_CHECK(c);
+
+ L(LT_EVENT_X, "COMP|ev:%15.15s FUNC\n", "SCREEN_UNLOCK");
+
+ _screen_unlock(c);
+}
+
+/* local subsystem functions */
+static int
+_screen_angle_get(Ecore_X_Window root)
+{
+ int ret = -1, ang = 0;
+ unsigned int val = 0;
+ Ecore_X_Display* dpy = ecore_x_display_get();
+ E_CHECK_RETURN(dpy, 0);
+ E_CHECK_RETURN(ATOM_X_SCREEN_ROTATION, 0);
+
+ ret = ecore_x_window_prop_card32_get
+ (root, ATOM_X_SCREEN_ROTATION, &val, 1);
+ E_CHECK_RETURN((ret > 0), 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 void
+_screen_lock(E_Comp *c)
+{
+ Eina_List *l;
+ E_Comp_Canvas *canvas;
+
+ E_CHECK(_comp_mod);
+ E_CHECK(_comp_mod->conf->use_lock_screen);
+ E_CHECK(c->lock.locked != 1);
+ E_CHECK(!c->lock.timeout);
+
+ if (!_comp_mod->conf->lock_fps)
+ {
+ EINA_LIST_FOREACH(c->canvases, l, canvas)
+ {
+ if (!canvas) continue;
+ ecore_evas_manual_render_set(canvas->ee, 1);
+ }
+ }
+
+ c->lock.timeout = ecore_timer_add
+ (_comp_mod->conf->max_lock_screen_time,
+ _screen_lock_timeout, c);
+
+ c->lock.locked = EINA_TRUE;
+}
+
+static void
+_screen_unlock(E_Comp *c)
+{
+ Eina_List *l;
+ E_Comp_Canvas *canvas;
+ E_Comp_Win *cw;
+
+ E_CHECK(_comp_mod);
+ E_CHECK(_comp_mod->conf->use_lock_screen);
+ E_CHECK(c->lock.locked);
+ if (c->lock.timeout)
+ {
+ ecore_timer_del(c->lock.timeout);
+ c->lock.timeout = NULL;
+ }
+
+ // remove all cw->update_timeout
+ EINA_INLIST_REVERSE_FOREACH(c->wins, cw)
+ {
+ if (!cw) continue;
+ 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);
+
+ EINA_LIST_FOREACH(c->canvases, l, canvas)
+ {
+ if (!canvas) continue;
+
+ if ((canvas->nocomp.mode == E_NOCOMP_MODE_NONE)
+ || (canvas->nocomp.mode == E_NOCOMP_MODE_PREPARE))
+ {
+ ecore_evas_manual_render(canvas->ee);
+
+ if (!_comp_mod->conf->lock_fps)
+ ecore_evas_manual_render_set(canvas->ee, 0);
+ }
+ }
+
+ c->lock.locked = 0;
+}
+
+static Eina_Bool
+_screen_lock_timeout(void *data)
+{
+ E_Comp *c = (E_Comp*)data;
+ E_CHECK_RETURN(c, 0);
+
+ L(LT_EVENT_X, "COMP|ev:%15.15s TIMEOUT\n", "SCREEN_UNLOCK");
+
+ _screen_unlock(c);
+ return EINA_TRUE;
+}
--- /dev/null
+#ifdef E_TYPEDEFS
+#else
+#ifndef E_MOD_COMP_SCREEN_H
+#define E_MOD_COMP_SCREEN_H
+
+typedef struct _E_Comp_Screen_Rotation E_Comp_Screen_Rotation;
+typedef struct _E_Comp_Screen_Lock E_Comp_Screen_Lock;
+
+struct _E_Comp_Screen_Rotation
+{
+ Eina_Bool enabled : 1;
+ int angle;
+ int scr_w;
+ int scr_h;
+};
+
+struct _E_Comp_Screen_Lock
+{
+ Eina_Bool locked : 1;
+ Ecore_Timer *timeout;
+};
+
+EINTERN Eina_Bool e_mod_comp_screen_rotation_init(E_Comp_Screen_Rotation *r, Ecore_X_Window root, int w, int h);
+EINTERN Eina_Bool e_mod_comp_screen_lock_init(E_Comp_Screen_Lock *l);
+EINTERN Eina_Bool e_mod_comp_screen_lock_handler_message(Ecore_X_Event_Client_Message *ev);
+EINTERN void e_mod_comp_screen_lock_func(void *data, E_Manager *man);
+EINTERN void e_mod_comp_screen_unlock_func(void *data, E_Manager *man);
+
+#endif
+#endif
--- /dev/null
+#ifdef E_TYPEDEFS
+#else
+#ifndef E_MOD_COMP_SHARED_TYPES_H
+#define E_MOD_COMP_SHARED_TYPES_H
+
+typedef struct _E_Comp E_Comp;
+typedef struct _E_Comp_Win E_Comp_Win;
+
+#include "e.h"
+#include "e_mod_main.h"
+#include "e_mod_comp_update.h"
+#include "e_mod_comp_hw_ov_win.h"
+#include "e_mod_comp_canvas.h"
+#include "e_mod_comp_object.h"
+#include "e_mod_comp_policy.h"
+#include "e_mod_comp_animation.h"
+#include "e_mod_comp_effect_win_rotation.h"
+#include "e_mod_comp_effect_tm.h"
+#include "e_mod_comp_effect.h"
+#include "e_mod_comp_win_type.h"
+#include "e_mod_comp_screen.h"
+#include "e_mod_comp_win_shape_input.h"
+#include "e_mod_comp_bg_win.h"
+#include "e_mod_comp_util.h"
+#include "e_mod_comp_effect_image_launch.h"
+
+#ifdef _F_USE_EXTN_DIALOG_
+# define e_util_dialog_internal e_util_extn_dialog_show
+#endif
+
+struct _E_Comp
+{
+ Ecore_X_Window win; // COW
+ E_Manager *man;
+ Eina_Inlist *wins;
+ Eina_List *wins_list;
+ Eina_List *updates;
+ Ecore_Animator *render_animator;
+ Ecore_Job *update_job;
+ Ecore_Timer *new_up_timer;
+ int animating;
+ int render_overflow;
+ E_Manager_Comp comp;
+ Ecore_X_Window cm_selection;
+ Eina_List *canvases; // list of E_Comp_Canvas
+ Eina_Bool gl : 1;
+ Eina_Bool grabbed : 1;
+ Eina_Bool nocomp : 1;
+ Eina_Bool wins_invalid : 1;
+
+ // added for tizen
+ Eina_Bool animatable : 1; // if this value is true then window can show animaton. otherwise, window can not show animation effect.
+ Eina_Bool switcher : 1; // task switcher is open
+ Eina_Bool switcher_obscured : 1; //task switcher is obscured
+ Eina_Bool switcher_animating : 1; // task switcher effect is running
+ int selected_pos; // selected window's position when task switcher is open
+ Eina_Bool effect_stage : 1;
+ E_Comp_Screen_Lock lock;
+ E_Comp_Screen_Rotation rotation;
+ Eina_Bool need_shape_merge;
+ Eina_Bool use_hw_ov; // use H/W overlay window for primary screen
+ Eina_Bool keyboard_effect : 1; // True: Compositor Show Keyborad Window Effect / False: Compositor do not show keyboard window effect
+ Eina_Bool defer_raise_effect : 1; // True : Compositor defer evas object restack on window effect
+ Eina_Bool fake_image_launch : 1; // True : Enable Fake Image Launch feature
+
+ // fake image launch
+ E_Comp_Effect_Image_Launch *eff_img;
+ Evas *evas;
+
+ E_Comp_Win_Shape_Input *shape_input; // Comp's Global Shape input region
+};
+
+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
+ Eina_List *objs; // list of E_Comp_Object
+ 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
+ Ecore_Timer *ready_timeout; // max time on show (new window draw) to wait for window contents to be ready if sync protocol not handled. this is fallback.
+ 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
+ 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
+ char *title, *name, *clas, *role; // fetched for override-redirect windowa
+ Ecore_X_Window_Type primary_type; // fetched for override-redirect windowa
+ unsigned char misses; // number of sync misses
+ struct {
+ int version; // version of efl sync
+ int val; // sync value
+ int done_count; // draw done event count
+ } sync_info;
+ 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 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 needpix : 1; // need new pixmap
+ Eina_Bool real_hid : 1; // last hide was a real window unmap
+ Eina_Bool inhash : 1; // is in the windows hash
+ Eina_Bool show_ready : 1; // is this window ready for its first show
+ Eina_Bool show_anim : 1; // ran show animation
+ Eina_Bool use_dri2 : 1;
+
+ Eina_Bool animate_hide : 1 ; // if window animation effect is occured, do hide unrelated window. -> use evas_object_hide()
+ Eina_Bool resize_hide : 1; // if window do resize event received, set this valuse true; and check win_update()
+ Eina_Bool first_show_worked : 1 ; // check for first show of shobj
+ Eina_Bool show_done : 1 ; // check for show is done
+ Eina_Bool effect_stage: 1; // check for if background window is hided or not.
+ Eina_Bool defer_raise; // flag to defer to raise
+ Eina_Bool defer_move_resize; // flag to defer to move_resize for shobj
+ E_Comp_Effect_Type *eff_type;
+ E_Comp_Effect_Win_Rotation *eff_winrot; // image launch effect
+ E_Comp_Win_Type win_type;
+ E_Comp_Transfer *transfer;
+ E_Comp_Win_Shape_Input *shape_input;
+ E_Comp_BG_Win *bgwin;
+ Eina_Bool move_lock : 1; // lock / unlock evas_object's move. evas_object represents window.
+ int angle; // window's current angle property
+
+ // ov object
+ Ecore_X_Image *ov_xim;
+ Evas_Object *ov_obj;
+ struct
+ {
+ int x, y, w, h;
+ } ov;
+};
+
+#endif
+#endif
--- /dev/null
+#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, *p, *pp;
+ int ptw, pth, x, y;
+
+ if ((!up) || ((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;
+ }
+}
+
--- /dev/null
+#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
--- /dev/null
+#include <utilX.h>
+#include "e_mod_comp_shared_types.h"
+#include "e_mod_comp_debug.h"
+
+/* local subsystem globals */
+static E_Comp *_c = NULL;
+
+/* externally accessible functions */
+EINTERN void
+e_mod_comp_util_set(E_Comp *c,
+ E_Manager *man __UNUSED__)
+{
+ _c = c;
+}
+
+EINTERN E_Comp *
+e_mod_comp_util_get(void)
+{
+ return _c;
+}
+
+EINTERN Eina_Bool
+e_mod_comp_util_grab_key_set(Eina_Bool grab)
+{
+ E_Comp *c = NULL;
+ Ecore_X_Display *d = NULL;
+ Ecore_X_Window w;
+ int r[4] = { -1, };
+ int i = 0;
+
+ c = e_mod_comp_util_get();
+ E_CHECK_RETURN(c, 0);
+
+ d = ecore_x_display_get();
+ E_CHECK_RETURN(d, 0);
+
+ w = c->win;
+ E_CHECK_RETURN(w, 0);
+
+ if (grab)
+ {
+ r[0] = utilx_grab_key(d, w, KEY_SELECT, EXCLUSIVE_GRAB);
+ r[1] = utilx_grab_key(d, w, KEY_VOLUMEUP, EXCLUSIVE_GRAB);
+ r[2] = utilx_grab_key(d, w, KEY_VOLUMEDOWN, EXCLUSIVE_GRAB);
+ r[3] = utilx_grab_key(d, w, KEY_CAMERA, EXCLUSIVE_GRAB);
+
+ for (i = 0; i < 4; i++)
+ {
+ if (r[i] != 0) goto grab_failed;
+ }
+ }
+ else
+ {
+ utilx_ungrab_key(d, w, KEY_SELECT);
+ utilx_ungrab_key(d, w, KEY_VOLUMEUP);
+ utilx_ungrab_key(d, w, KEY_VOLUMEDOWN);
+ utilx_ungrab_key(d, w, KEY_CAMERA);
+ }
+
+ return EINA_TRUE;
+
+grab_failed:
+ utilx_ungrab_key(d, w, KEY_SELECT);
+ utilx_ungrab_key(d, w, KEY_VOLUMEUP);
+ utilx_ungrab_key(d, w, KEY_VOLUMEDOWN);
+ utilx_ungrab_key(d, w, KEY_CAMERA);
+ return EINA_FALSE;
+}
+
+EINTERN Eina_Bool
+e_mod_comp_util_screen_input_region_set(Eina_Bool set)
+{
+ E_Comp *c = e_mod_comp_util_get();
+ int x = -1, y = -1, w = 1, h = 1;
+ E_CHECK_RETURN(c, 0);
+
+ if (set)
+ {
+ x = y = 0;
+ w = c->man->w;
+ h = c->man->h;
+ }
+
+ ecore_x_window_shape_input_rectangle_set(c->win,
+ x, y, w, h);
+
+ return EINA_TRUE;
+}
+
+EINTERN E_Comp_Win *
+e_mod_comp_util_win_normal_get(void)
+{
+ E_Comp *c = e_mod_comp_util_get();
+ E_Comp_Win *cw = NULL;
+ E_CHECK_RETURN(c, 0);
+
+ EINA_INLIST_REVERSE_FOREACH(c->wins, cw)
+ {
+ if (!cw) continue;
+ if ((cw->visible) &&
+ (REGION_EQUAL_TO_ROOT(cw)) &&
+ (!cw->invalid) && (!cw->input_only) &&
+ TYPE_NORMAL_CHECK(cw))
+ {
+ return cw;
+ }
+ }
+ return NULL;
+}
+
+EINTERN E_Comp_Win *
+e_mod_comp_util_win_below_get(E_Comp_Win *cw,
+ Eina_Bool normal_check)
+{
+ Eina_Inlist *l;
+ E_Comp_Win *_cw = cw;
+ E_CHECK_RETURN(_cw, NULL);
+
+ while ((l = EINA_INLIST_GET(_cw)->prev))
+ {
+ _cw = _EINA_INLIST_CONTAINER(_cw, l);
+ if ((_cw) && (_cw->visible) &&
+ (!_cw->invalid) &&
+ (!_cw->input_only) &&
+ (!TYPE_APPTRAY_CHECK(_cw)) &&
+ REGION_EQUAL_TO_ROOT(_cw))
+ {
+ if (normal_check)
+ {
+ if (TYPE_NORMAL_CHECK(_cw))
+ return _cw;
+ else
+ return NULL;
+ }
+ else
+ return _cw;
+ }
+ }
+ return NULL;
+}
+
+EINTERN Eina_Bool
+e_mod_comp_util_win_below_check(E_Comp_Win *cw,
+ E_Comp_Win *cw2)
+{
+ Eina_Inlist *wins_list;
+ E_CHECK_RETURN(cw, 0);
+ E_CHECK_RETURN(cw2, 0);
+
+ 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;
+}
+
+EINTERN Eina_Bool
+e_mod_comp_util_win_visible_get(E_Comp_Win *cw)
+{
+ Eina_Bool v = EINA_FALSE;
+ E_Comp_Win *_cw = NULL;
+
+ E_CHECK_RETURN(cw, 0);
+ E_CHECK_RETURN(cw->visible, 0);
+ E_CHECK_RETURN(!(cw->invalid), 0);
+ E_CHECK_RETURN(!(cw->input_only), 0);
+ E_CHECK_RETURN(!(cw->defer_hide), 0);
+ E_CHECK_RETURN(cw->c, 0);
+ E_CHECK_RETURN(cw->c->man, 0);
+
+ if (!E_INTERSECTS
+ (0, 0, cw->c->man->w, cw->c->man->h,
+ cw->x, cw->y, cw->w, cw->h))
+ {
+ return v;
+ }
+
+ EINA_INLIST_REVERSE_FOREACH(cw->c->wins, _cw)
+ {
+ if (!_cw) continue;
+ if ((_cw->visible) && REGION_EQUAL_TO_ROOT(_cw) &&
+ !(_cw->input_only) && !(_cw->invalid))
+ {
+ if (_cw == cw) return EINA_TRUE;
+ else if (!TYPE_HOME_CHECK(_cw) && _cw->argb) continue;
+ else return EINA_FALSE;
+ }
+ }
+ return v;
+}
+
+EINTERN Ecore_X_Window
+e_mod_comp_util_client_xid_get(E_Comp_Win *cw)
+{
+ E_CHECK_RETURN(cw, 0);
+ if (cw->bd) return cw->bd->client.win;
+ else return cw->win;
+}
+
+EINTERN void
+e_mod_comp_util_fb_visible_set(Eina_Bool set)
+{
+ Ecore_X_Display *d = ecore_x_display_get();
+ E_CHECK(d);
+
+ utilx_set_fb_visible(d, UTILX_FB_TYPE_OVERLAY,
+ set ? True : False);
+}
--- /dev/null
+#ifdef E_TYPEDEFS
+#else
+#ifndef E_MOD_COMP_UTIL_H
+#define E_MOD_COMP_UTIL_H
+
+/* check whether region of given window is equal to root */
+#define REGION_EQUAL_TO_ROOT(a) \
+ (((a)->x == 0) && ((a)->y == 0) && \
+ (((a)->w) == ((a)->c->man->w)) && \
+ (((a)->h) == ((a)->c->man->h)))
+
+#define SIZE_EQUAL_TO_ROOT(a) \
+ ((((a)->w) == ((a)->c->man->w)) && \
+ (((a)->h) == ((a)->c->man->h)))
+
+#define REGION_EQUAL_TO_ZONE(a, z) \
+ ((((a)->x) == ((z)->x)) && \
+ (((a)->y) == ((z)->y)) && \
+ (((a)->w) == ((z)->w)) && \
+ (((a)->h) == ((z)->h)))
+
+#define REGION_EQUAL_TO_CANVAS(a, c) \
+ ((((a)->x) == ((c)->x)) && \
+ (((a)->y) == ((c)->y)) && \
+ (((a)->w) == ((c)->w)) && \
+ (((a)->h) == ((c)->h)))
+
+#define STATE_INSET_CHECK(a) \
+ ((a->bd) && \
+ (a->bd->client.illume.win_state.state == ECORE_X_ILLUME_WINDOW_STATE_FLOATING))
+
+EINTERN void e_mod_comp_util_set(E_Comp *c, E_Manager *man);
+EINTERN E_Comp *e_mod_comp_util_get(void);
+EINTERN Eina_Bool e_mod_comp_util_grab_key_set(Eina_Bool grab);
+EINTERN Eina_Bool e_mod_comp_util_screen_input_region_set(Eina_Bool set);
+EINTERN E_Comp_Win *e_mod_comp_util_win_normal_get(void);
+EINTERN E_Comp_Win *e_mod_comp_util_win_below_get(E_Comp_Win *cw, Eina_Bool normal_check);
+EINTERN Eina_Bool e_mod_comp_util_win_below_check(E_Comp_Win *cw, E_Comp_Win *cw2);
+EINTERN Eina_Bool e_mod_comp_util_win_visible_get(E_Comp_Win *cw);
+EINTERN Ecore_X_Window e_mod_comp_util_client_xid_get(E_Comp_Win *cw);
+EINTERN void e_mod_comp_util_fb_visible_set(Eina_Bool set);
+
+#endif
+#endif
--- /dev/null
+#include "e_mod_comp_shared_types.h"
+#include "e_mod_comp_debug.h"
+#include <pixman.h>
+
+// input shape geometry (used on Move Module,
+// Compositor receives input evevnt from this region.)
+struct _E_Comp_Win_Shape_Input
+{
+ int x, y, w, h;
+};
+
+/* local subsystem functions */
+
+/* externally accessible functions */
+EINTERN Eina_Bool
+e_mod_comp_win_shape_input_update(E_Comp *c)
+{
+ E_Comp_Win *_cw = NULL;
+ Eina_List *l = NULL;
+ E_Comp_Canvas *canvas = NULL;
+
+ pixman_region32_t vis_part;
+ pixman_region32_t win_part;
+ pixman_region32_t cur_part;
+ pixman_region32_t res_part;
+
+ pixman_region32_t input_part;
+ pixman_region32_t cur_input_part;
+ pixman_region32_t res_input_part;
+ pixman_region32_t sum_input_part;
+ pixman_region32_t comp_input_part;
+
+ pixman_box32_t *input_rects;
+
+ Ecore_X_Rectangle *input_shape_rects = NULL;
+
+ int num_rects = 0;
+ int num_input_rects = 0;
+ int i = 0;
+
+ pixman_box32_t screen_rect;
+ pixman_box32_t window_rect;
+ pixman_box32_t input_rect;
+
+ E_CHECK_RETURN(c, EINA_FALSE);
+ E_CHECK_RETURN(c->need_shape_merge, EINA_FALSE);
+
+ pixman_region32_init(&vis_part);
+ pixman_region32_init(&win_part);
+ pixman_region32_init(&cur_part);
+ pixman_region32_init(&res_part);
+ pixman_region32_init(&input_part);
+ pixman_region32_init(&cur_input_part);
+ pixman_region32_init(&res_input_part);
+ pixman_region32_init(&sum_input_part);
+ pixman_region32_init(&comp_input_part);
+
+ screen_rect.x1 = 0;
+ screen_rect.y1 = 0;
+ screen_rect.x2 = c->man->w;
+ screen_rect.y2 = c->man->h;
+
+ pixman_region32_init_rects(&vis_part, &screen_rect, 1);
+ pixman_region32_init_rect(&sum_input_part, 0, 0, 0, 0);
+
+ EINA_INLIST_REVERSE_FOREACH(c->wins, _cw)
+ {
+ if (!_cw) continue;
+ if ((!_cw->visible) || (_cw->defer_hide) ||
+ (_cw->invalid) ||
+ (!E_INTERSECTS(0, 0, c->man->w, c->man->h,
+ _cw->x, _cw->y, _cw->w, _cw->h)))
+ {
+ continue;
+ }
+ if (TYPE_DEBUGGING_INFO_CHECK(_cw)) continue;
+
+ num_rects = 0;
+
+ window_rect.x1 = _cw->x;
+ window_rect.y1 = _cw->y;
+ window_rect.x2 = window_rect.x1 + _cw->w;
+ window_rect.y2 = window_rect.y1 + _cw->h;
+
+ if (_cw->shape_input)
+ {
+ input_rect.x1 = window_rect.x1 + _cw->shape_input->x;
+ input_rect.y1 = window_rect.y1 + _cw->shape_input->y;
+ input_rect.x2 = input_rect.x1 + _cw->shape_input->w;
+ input_rect.y2 = input_rect.y1 + _cw->shape_input->h;
+ }
+ else
+ {
+ input_rect.x1 = window_rect.x1;
+ input_rect.y1 = window_rect.y1;
+ input_rect.x2 = input_rect.x1;
+ input_rect.y2 = input_rect.y1;
+ }
+
+ pixman_region32_init_rects(&input_part, &input_rect, 1);
+ pixman_region32_init_rect(&cur_input_part, 0, 0, 0, 0);
+ pixman_region32_init_rect(&res_input_part, 0, 0, 0, 0);
+ pixman_region32_init_rect(&cur_part, 0, 0, 0, 0);
+ pixman_region32_init_rects(&win_part, &window_rect, 1);
+ pixman_region32_init_rects(&res_part, &screen_rect, 1);
+
+ // current_visible_window = window (intersect) screen visible part
+ pixman_region32_intersect(&cur_part, &win_part, &vis_part);
+
+ // current_input = current_visible_window (intersect) input
+ pixman_region32_intersect(&cur_input_part, &cur_part, &input_part);
+
+ // result_input = sum_input
+ // sum_input = result_input + current_input
+ pixman_region32_copy(&res_input_part, &sum_input_part);
+ pixman_region32_union(&sum_input_part, &res_input_part, &cur_input_part);
+
+ // result = visible - window
+ pixman_region32_subtract(&res_part, &vis_part, &win_part);
+ pixman_region32_rectangles(&res_part, &num_rects);
+
+ if (num_rects == 0) break;
+
+ pixman_region32_copy(&vis_part, &res_part);
+ }
+
+ if ((c->shape_input) // comp's global shape input region apply
+ && (E_INTERSECTS(0, 0, c->man->w, c->man->h,
+ c->shape_input->x, c->shape_input->y,
+ c->shape_input->w, c->shape_input->h)))
+ {
+ pixman_region32_init_rect(&comp_input_part,
+ c->shape_input->x,
+ c->shape_input->y,
+ c->shape_input->w,
+ c->shape_input->h);
+
+ pixman_region32_copy(&res_input_part, &sum_input_part);
+ pixman_region32_union(&sum_input_part, &res_input_part, &comp_input_part);
+ }
+
+ input_rects = pixman_region32_rectangles(&sum_input_part, &num_input_rects);
+
+ if (num_input_rects)
+ {
+ input_shape_rects = E_NEW(Ecore_X_Rectangle, num_input_rects);
+ for (i = 0; i < num_input_rects; i++)
+ {
+ input_shape_rects[i].x = input_rects[i].x1;
+ input_shape_rects[i].y = input_rects[i].y1;
+ input_shape_rects[i].width = input_rects[i].x2 - input_rects[i].x1;
+ input_shape_rects[i].height = input_rects[i].y2 - input_rects[i].y1;
+ }
+
+ if (_comp_mod->conf->nocomp_fs)
+ {
+ /* set shape before setting shape input */
+ EINA_LIST_FOREACH(c->canvases, l, canvas)
+ {
+ if ((canvas) &&
+ (canvas->nocomp.mode == E_NOCOMP_MODE_RUN))
+ {
+ ecore_x_window_shape_rectangles_set
+ (c->win, input_shape_rects, num_input_rects);
+ break;
+ }
+ }
+
+ /* for the xv */
+ if ((input_shape_rects) && (num_input_rects == 1))
+ {
+ canvas = (E_Comp_Canvas *)eina_list_nth(c->canvases, 0);
+ if ((canvas) &&
+ (input_shape_rects[0].x == canvas->x) &&
+ (input_shape_rects[0].y == canvas->y) &&
+ (input_shape_rects[0].width == canvas->w) &&
+ (input_shape_rects[0].height == canvas->h))
+ {
+ ecore_x_window_shape_rectangle_subtract(c->win,
+ (canvas->w / 2) - 16,
+ (canvas->h / 2) - 16,
+ 16, 16);
+ }
+ }
+ }
+
+ ecore_x_window_shape_input_rectangles_set(c->win,
+ input_shape_rects,
+ num_input_rects);
+ if (input_shape_rects) E_FREE(input_shape_rects);
+ }
+ else
+ {
+ ecore_x_window_shape_input_rectangle_set(c->win, -1, -1, 1, 1);
+ }
+
+ pixman_region32_fini(&vis_part);
+ pixman_region32_fini(&win_part);
+ pixman_region32_fini(&cur_part);
+ pixman_region32_fini(&res_part);
+ pixman_region32_fini(&input_part);
+ pixman_region32_fini(&cur_input_part);
+ pixman_region32_fini(&res_input_part);
+ pixman_region32_fini(&sum_input_part);
+ pixman_region32_fini(&comp_input_part);
+
+ c->need_shape_merge = EINA_FALSE;
+ return EINA_TRUE;
+}
+
+EINTERN E_Comp_Win_Shape_Input *
+e_mod_comp_shape_input_new(void)
+{
+ E_Comp_Win_Shape_Input *input;
+ input = E_NEW(E_Comp_Win_Shape_Input, 1);
+ return input;
+}
+
+EINTERN E_Comp_Win_Shape_Input *
+e_mod_comp_win_shape_input_new(E_Comp_Win *cw)
+{
+ Eina_List *l;
+ E_Comp_Object *co;
+
+ E_CHECK_RETURN(cw, 0);
+
+ EINA_LIST_FOREACH(cw->objs, l, co)
+ {
+ if (!co->img) return NULL;
+ if (!co->shadow) return NULL;
+ }
+
+ EINA_LIST_FOREACH(cw->objs, l, co)
+ {
+ evas_object_pass_events_set(co->img, EINA_FALSE);
+ evas_object_pass_events_set(co->shadow, EINA_FALSE);
+ }
+ return e_mod_comp_shape_input_new();
+}
+
+EINTERN void
+e_mod_comp_win_shape_input_free(E_Comp_Win_Shape_Input *input)
+{
+ E_CHECK(input);
+ E_FREE(input);
+}
+
+EINTERN Eina_Bool
+e_mod_comp_win_shape_input_rect_set(E_Comp_Win_Shape_Input *input,
+ int x,
+ int y,
+ int w,
+ int h)
+{
+ E_CHECK_RETURN(input, EINA_FALSE);
+
+ if (((input->x == x) && (input->y == y) &&
+ (input->w == w) && (input->h == h)))
+ {
+ return EINA_FALSE;
+ }
+
+ input->x = x;
+ input->y = y;
+ input->w = w;
+ input->h = h;
+
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_comp_win_shape_input_invalid_set(E_Comp *c,
+ Eina_Bool set)
+{
+ E_CHECK_RETURN(c, EINA_FALSE);
+ c->need_shape_merge = set;
+ return EINA_TRUE;
+}
--- /dev/null
+#ifdef E_TYPEDEFS
+#else
+#ifndef E_MOD_COMP_WIN_SHAPE_INPUT_H
+#define E_MOD_COMP_WIN_SHAPE_INPUT_H
+
+typedef struct _E_Comp_Win_Shape_Input E_Comp_Win_Shape_Input;
+
+/* shape input region functions */
+EINTERN E_Comp_Win_Shape_Input *e_mod_comp_shape_input_new(void);
+EINTERN E_Comp_Win_Shape_Input *e_mod_comp_win_shape_input_new(E_Comp_Win *cw);
+EINTERN void e_mod_comp_win_shape_input_free(E_Comp_Win_Shape_Input *input);
+EINTERN Eina_Bool e_mod_comp_win_shape_input_rect_set(E_Comp_Win_Shape_Input *input, int x, int y, int w, int h);
+EINTERN Eina_Bool e_mod_comp_win_shape_input_invalid_set(E_Comp *c, Eina_Bool set);
+EINTERN Eina_Bool e_mod_comp_win_shape_input_update(E_Comp *c);
+
+#endif
+#endif
--- /dev/null
+#include "e_mod_comp_shared_types.h"
+#include "e_mod_comp.h"
+#include "e_mod_comp_debug.h"
+
+typedef enum _E_Comp_Win_Class_Type
+{
+ E_COMP_WIN_CLASS_TYPE_UNKNOWN = 0,
+ E_COMP_WIN_CLASS_TYPE_NORMAL,
+ E_COMP_WIN_CLASS_TYPE_MENUSCREEN,
+ E_COMP_WIN_CLASS_TYPE_QUICKPANEL_BASE,
+ E_COMP_WIN_CLASS_TYPE_QUICKPANEL,
+ E_COMP_WIN_CLASS_TYPE_TASKMANAGER,
+ E_COMP_WIN_CLASS_TYPE_LIVEMAGAZINE,
+ E_COMP_WIN_CLASS_TYPE_LOCKSCREEN,
+ E_COMP_WIN_CLASS_TYPE_INDICATOR,
+ E_COMP_WIN_CLASS_TYPE_TICKERNOTI,
+ E_COMP_WIN_CLASS_TYPE_DEBUGGING_INFO,
+ E_COMP_WIN_CLASS_TYPE_APPTRAY,
+ E_COMP_WIN_CLASS_TYPE_BACKGROUND,
+ E_COMP_WIN_CLASS_TYPE_ISF,
+} E_Comp_Win_Class_Type;
+
+typedef enum _E_Comp_Win_Name_Type
+{
+ E_COMP_WIN_NAME_TYPE_UNKNOWN = 0,
+ E_COMP_WIN_NAME_TYPE_NORMAL,
+ E_COMP_WIN_NAME_TYPE_MENUSCREEN,
+ E_COMP_WIN_NAME_TYPE_QUICKPANEL_BASE,
+ E_COMP_WIN_NAME_TYPE_QUICKPANEL,
+ E_COMP_WIN_NAME_TYPE_TASKMANAGER,
+ E_COMP_WIN_NAME_TYPE_LIVEMAGAZINE,
+ E_COMP_WIN_NAME_TYPE_LOCKSCREEN,
+ E_COMP_WIN_NAME_TYPE_INDICATOR,
+ E_COMP_WIN_NAME_TYPE_TICKERNOTI,
+ E_COMP_WIN_NAME_TYPE_APPTRAY,
+ E_COMP_WIN_NAME_TYPE_BACKGROUND,
+ E_COMP_WIN_NAME_TYPE_ISF_KEYBOARD,
+ E_COMP_WIN_NAME_TYPE_ISF_SUB,
+} E_Comp_Win_Name_Type;
+
+/* local subsystem functions */
+static E_Comp_Win_Type _ecore_type_to_e_comp_type(Ecore_X_Window_Type t);
+
+/* local subsystem globals */
+static const char *win_class[] =
+{
+ "NORMAL_WINDOW",
+ "MENU_SCREEN",
+ "QUICKPANEL_BASE",
+ "QUICKPANEL",
+ "TASK_MANAGER",
+ "LIVE_MAGAZINE",
+ "LOCK_SCREEN",
+ "INDICATOR",
+ "tickernoti-syspopup",
+ "DEBUGGING_INFO",
+ "APP_TRAY",
+ "BACKGROUND",
+ "ISF",
+};
+
+static const char *win_name[] =
+{
+ "NORMAL_WINDOW",
+ "com.samsung.menu-screen",
+ "QUICKPANEL_BASE",
+ "QUICKPANEL",
+ "TASK_MANAGER",
+ "Live Magazine",
+ "LOCK_SCREEN",
+ "INDICATOR",
+ "noti-window",
+ "APP_TRAY",
+ "BACKGROUND",
+ // E_COMP_WIN_NAME_TYPE_ISF_KEYBOARD
+ "Virtual Keyboard",
+ // E_COMP_WIN_NAME_TYPE_ISF_SUB
+ "Key Magnifier",
+ "Prediction Window",
+ "Setting Window",
+ "ISF Popup",
+};
+
+static E_Comp_Win_Class_Type win_class_vals[] =
+{
+ E_COMP_WIN_CLASS_TYPE_NORMAL,
+ E_COMP_WIN_CLASS_TYPE_MENUSCREEN,
+ E_COMP_WIN_CLASS_TYPE_QUICKPANEL_BASE,
+ E_COMP_WIN_CLASS_TYPE_QUICKPANEL,
+ E_COMP_WIN_CLASS_TYPE_TASKMANAGER,
+ E_COMP_WIN_CLASS_TYPE_LIVEMAGAZINE,
+ E_COMP_WIN_CLASS_TYPE_LOCKSCREEN,
+ E_COMP_WIN_CLASS_TYPE_INDICATOR,
+ E_COMP_WIN_CLASS_TYPE_TICKERNOTI,
+ E_COMP_WIN_CLASS_TYPE_DEBUGGING_INFO,
+ E_COMP_WIN_CLASS_TYPE_APPTRAY,
+ E_COMP_WIN_CLASS_TYPE_BACKGROUND,
+ E_COMP_WIN_CLASS_TYPE_ISF
+};
+
+static E_Comp_Win_Class_Type win_name_vals[] =
+{
+ E_COMP_WIN_NAME_TYPE_NORMAL,
+ E_COMP_WIN_NAME_TYPE_MENUSCREEN,
+ E_COMP_WIN_NAME_TYPE_QUICKPANEL_BASE,
+ E_COMP_WIN_NAME_TYPE_QUICKPANEL,
+ E_COMP_WIN_NAME_TYPE_TASKMANAGER,
+ E_COMP_WIN_NAME_TYPE_LIVEMAGAZINE,
+ E_COMP_WIN_NAME_TYPE_LOCKSCREEN,
+ E_COMP_WIN_NAME_TYPE_INDICATOR,
+ E_COMP_WIN_NAME_TYPE_TICKERNOTI,
+ E_COMP_WIN_NAME_TYPE_APPTRAY,
+ E_COMP_WIN_NAME_TYPE_BACKGROUND,
+ E_COMP_WIN_NAME_TYPE_ISF_KEYBOARD,
+ E_COMP_WIN_NAME_TYPE_ISF_SUB
+};
+
+static Eina_Hash *class_hash = NULL;
+static Eina_Hash *names_hash = NULL;
+
+/* externally accessible functions */
+EINTERN int
+e_mod_comp_win_type_init(void)
+{
+ int i, n;
+ if (!class_hash) class_hash = eina_hash_string_superfast_new(NULL);
+ if (!names_hash) names_hash = eina_hash_string_superfast_new(NULL);
+
+ n = (sizeof(win_class) / sizeof(char *));
+ for (i = 0; i < n; i++)
+ {
+ eina_hash_add
+ (class_hash, win_class[i],
+ &win_class_vals[i]);
+ }
+
+ n = (sizeof(win_name) / sizeof(char *));
+ for (i = 0; i < n; i++)
+ {
+ if (i >= E_COMP_WIN_NAME_TYPE_ISF_SUB)
+ {
+ eina_hash_add
+ (names_hash, win_name[i],
+ &win_name_vals[E_COMP_WIN_NAME_TYPE_ISF_SUB-1]);
+ }
+ else
+ {
+ eina_hash_add
+ (names_hash,
+ win_name[i], &win_name_vals[i]);
+ }
+ }
+
+ return 1;
+}
+
+EINTERN int
+e_mod_comp_win_type_shutdown(void)
+{
+ if (class_hash) eina_hash_free(class_hash);
+ if (names_hash) eina_hash_free(names_hash);
+
+ names_hash = NULL;
+ class_hash = NULL;
+
+ return 1;
+}
+
+EINTERN Eina_Bool
+e_mod_comp_win_type_setup(E_Comp_Win *cw)
+{
+ Ecore_X_Window_Type wtype = ECORE_X_WINDOW_TYPE_UNKNOWN;
+ E_Comp_Win_Class_Type ctype = E_COMP_WIN_CLASS_TYPE_UNKNOWN;
+ E_Comp_Win_Name_Type ntype = E_COMP_WIN_NAME_TYPE_UNKNOWN;
+ E_Comp_Win_Type res = E_COMP_WIN_TYPE_UNKNOWN;
+ E_Comp_Win_Class_Type *pctype = NULL;
+ E_Comp_Win_Name_Type *pntype = NULL;
+ char *clas = NULL, *name = NULL;
+
+ E_CHECK_RETURN(cw, 0);
+
+ if (cw->bd)
+ {
+ wtype = cw->bd->client.netwm.type;
+ if (cw->bd->internal)
+ ecore_x_icccm_name_class_get(cw->bd->client.win, &name, &clas);
+ else
+ {
+ clas = (char *)cw->bd->client.icccm.class;
+ name = (char *)cw->bd->client.icccm.name;
+ }
+ }
+ else
+ ecore_x_icccm_name_class_get(cw->win, &name, &clas);
+
+ if (clas)
+ {
+ pctype = eina_hash_find(class_hash, clas);
+ if (pctype) ctype = *pctype;
+ }
+ if (name)
+ {
+ pntype = eina_hash_find(names_hash, name);
+ if (pntype) ntype = *pntype;
+ }
+
+ switch (ctype)
+ {
+ case E_COMP_WIN_CLASS_TYPE_MENUSCREEN:
+ res = E_COMP_WIN_TYPE_MENUSCREEN;
+ break;
+ case E_COMP_WIN_CLASS_TYPE_QUICKPANEL_BASE:
+ res = E_COMP_WIN_TYPE_QUICKPANEL_BASE;
+ break;
+ case E_COMP_WIN_CLASS_TYPE_QUICKPANEL:
+ res = E_COMP_WIN_TYPE_QUICKPANEL;
+ break;
+ case E_COMP_WIN_CLASS_TYPE_TASKMANAGER:
+ if (ntype == E_COMP_WIN_NAME_TYPE_TASKMANAGER)
+ res = E_COMP_WIN_TYPE_TASKMANAGER;
+ break;
+ case E_COMP_WIN_CLASS_TYPE_LIVEMAGAZINE:
+ if ((ntype == E_COMP_WIN_NAME_TYPE_LIVEMAGAZINE) &&
+ (wtype == ECORE_X_WINDOW_TYPE_NORMAL))
+ res = E_COMP_WIN_TYPE_LIVEMAGAZINE;
+ break;
+ case E_COMP_WIN_CLASS_TYPE_LOCKSCREEN:
+ if ((ntype == E_COMP_WIN_NAME_TYPE_LOCKSCREEN) &&
+ (wtype == ECORE_X_WINDOW_TYPE_NOTIFICATION))
+ res = E_COMP_WIN_TYPE_LOCKSCREEN;
+ break;
+ case E_COMP_WIN_CLASS_TYPE_INDICATOR:
+ if ((ntype == E_COMP_WIN_NAME_TYPE_INDICATOR) &&
+ (wtype == ECORE_X_WINDOW_TYPE_DOCK))
+ res = E_COMP_WIN_TYPE_INDICATOR;
+ break;
+ case E_COMP_WIN_CLASS_TYPE_TICKERNOTI:
+ if ((ntype == E_COMP_WIN_NAME_TYPE_TICKERNOTI) &&
+ (wtype == ECORE_X_WINDOW_TYPE_NOTIFICATION))
+ res = E_COMP_WIN_TYPE_TICKERNOTI;
+ break;
+ case E_COMP_WIN_CLASS_TYPE_DEBUGGING_INFO:
+ res = E_COMP_WIN_TYPE_DEBUGGING_INFO;
+ break;
+ case E_COMP_WIN_CLASS_TYPE_ISF:
+ if (wtype != ECORE_X_WINDOW_TYPE_NORMAL)
+ break;
+ else if (ntype == E_COMP_WIN_NAME_TYPE_ISF_KEYBOARD)
+ res = E_COMP_WIN_TYPE_ISF_KEYBOARD;
+ else if (ntype == E_COMP_WIN_NAME_TYPE_ISF_SUB)
+ res = E_COMP_WIN_TYPE_ISF_SUB;
+ break;
+ case E_COMP_WIN_CLASS_TYPE_NORMAL:
+ if ((wtype == ECORE_X_WINDOW_TYPE_NORMAL) ||
+ (wtype == ECORE_X_WINDOW_TYPE_UNKNOWN))
+ res = E_COMP_WIN_TYPE_NORMAL;
+ break;
+ case E_COMP_WIN_CLASS_TYPE_APPTRAY:
+ if (ntype == E_COMP_WIN_NAME_TYPE_APPTRAY)
+ res = E_COMP_WIN_TYPE_APPTRAY;
+ case E_COMP_WIN_CLASS_TYPE_BACKGROUND:
+ if (ntype == E_COMP_WIN_NAME_TYPE_BACKGROUND)
+ res = E_COMP_WIN_TYPE_BACKGROUND;
+ break;
+ default:
+ break;
+ }
+
+ if (res == E_COMP_WIN_TYPE_UNKNOWN)
+ res = _ecore_type_to_e_comp_type(wtype);
+
+ if (!cw->bd ||
+ (cw->bd && cw->bd->internal))
+ {
+ if (name) E_FREE(name);
+ if (clas) E_FREE(clas);
+ }
+
+ cw->win_type = res;
+ return EINA_TRUE;
+}
+
+EINTERN E_Comp_Win_Type
+e_mod_comp_win_type_get(E_Comp_Win *cw)
+{
+ E_CHECK_RETURN(cw, E_COMP_WIN_TYPE_UNKNOWN);
+ return cw->win_type;
+}
+
+EINTERN Eina_Bool
+e_mod_comp_win_type_handler_prop(Ecore_X_Event_Window_Property *ev)
+{
+ E_Comp_Win *cw;
+ E_CHECK_RETURN(ev, 0);
+ E_CHECK_RETURN(ev->win, 0);
+
+ L(LT_EVENT_X, "COMP|%31s\n", "PROP_WM_CLASS");
+
+ cw = e_mod_comp_border_client_find(ev->win);
+ if (cw) return EINA_TRUE;
+
+ cw = e_mod_comp_win_find(ev->win);
+ E_CHECK_RETURN(cw, 0);
+ E_CHECK_RETURN((!cw->bd), 0);
+
+ e_mod_comp_win_type_setup(cw);
+ return EINA_TRUE;
+}
+
+/* local subsystem functions */
+static E_Comp_Win_Type
+_ecore_type_to_e_comp_type(Ecore_X_Window_Type t)
+{
+ E_Comp_Win_Type r = E_COMP_WIN_TYPE_UNKNOWN;
+ switch (t)
+ {
+ case ECORE_X_WINDOW_TYPE_NORMAL: r = E_COMP_WIN_TYPE_NORMAL; break;
+ case ECORE_X_WINDOW_TYPE_TOOLTIP: r = E_COMP_WIN_TYPE_TOOLTIP; break;
+ case ECORE_X_WINDOW_TYPE_COMBO: r = E_COMP_WIN_TYPE_COMBO; break;
+ case ECORE_X_WINDOW_TYPE_DND: r = E_COMP_WIN_TYPE_DND; break;
+ case ECORE_X_WINDOW_TYPE_DESKTOP: r = E_COMP_WIN_TYPE_DESKTOP; break;
+ case ECORE_X_WINDOW_TYPE_TOOLBAR: r = E_COMP_WIN_TYPE_TOOLBAR; break;
+ case ECORE_X_WINDOW_TYPE_MENU: r = E_COMP_WIN_TYPE_MENU; break;
+ case ECORE_X_WINDOW_TYPE_SPLASH: r = E_COMP_WIN_TYPE_SPLASH; break;
+ case ECORE_X_WINDOW_TYPE_DROPDOWN_MENU: r = E_COMP_WIN_TYPE_DROPDOWN_MENU; break;
+ case ECORE_X_WINDOW_TYPE_NOTIFICATION: r = E_COMP_WIN_TYPE_NOTIFICATION; break;
+ case ECORE_X_WINDOW_TYPE_UTILITY: r = E_COMP_WIN_TYPE_UTILITY; break;
+ case ECORE_X_WINDOW_TYPE_POPUP_MENU: r = E_COMP_WIN_TYPE_POPUP_MENU; break;
+ case ECORE_X_WINDOW_TYPE_DIALOG: r = E_COMP_WIN_TYPE_DIALOG; break;
+ default:
+ r = E_COMP_WIN_TYPE_NORMAL;
+ break;
+ }
+ return r;
+}
--- /dev/null
+#ifdef E_TYPEDEFS
+#else
+#ifndef E_MOD_COMP_WIN_TYPE_H
+#define E_MOD_COMP_WIN_TYPE_H
+
+#define TYPE_NORMAL_CHECK(a) \
+ ((a)->win_type == E_COMP_WIN_TYPE_NORMAL)
+
+#define TYPE_INDICATOR_CHECK(a) \
+ ((a)->win_type == E_COMP_WIN_TYPE_INDICATOR)
+
+#define TYPE_TICKERNOTI_CHECK(a) \
+ ((a)->win_type == E_COMP_WIN_TYPE_TICKERNOTI)
+
+#define TYPE_DEBUGGING_INFO_CHECK(a) \
+ ((a)->win_type == E_COMP_WIN_TYPE_DEBUGGING_INFO)
+
+#define TYPE_TASKMANAGER_CHECK(a) \
+ ((a)->win_type == E_COMP_WIN_TYPE_TASKMANAGER)
+
+#define TYPE_HOME_CHECK(a) \
+ (((a)->win_type == E_COMP_WIN_TYPE_MENUSCREEN) || \
+ ((a)->win_type == E_COMP_WIN_TYPE_LIVEMAGAZINE))
+
+#define TYPE_QUICKPANEL_CHECK(a) \
+ (((a)->win_type == E_COMP_WIN_TYPE_QUICKPANEL_BASE) || \
+ ((a)->win_type == E_COMP_WIN_TYPE_QUICKPANEL))
+
+#define TYPE_BG_CHECK(a) \
+ ((a)->win_type == E_COMP_WIN_TYPE_BACKGROUND)
+
+#define TYPE_KEYBOARD_CHECK(a) \
+ ((a)->win_type == E_COMP_WIN_TYPE_ISF_KEYBOARD)
+
+#define TYPE_APPTRAY_CHECK(a) \
+ ((a)->win_type == E_COMP_WIN_TYPE_APPTRAY)
+
+typedef enum _E_Comp_Win_Type
+{
+ E_COMP_WIN_TYPE_UNKNOWN = 0,
+ E_COMP_WIN_TYPE_DESKTOP,
+ E_COMP_WIN_TYPE_DOCK,
+ E_COMP_WIN_TYPE_TOOLBAR,
+ E_COMP_WIN_TYPE_MENU,
+ E_COMP_WIN_TYPE_UTILITY,
+ E_COMP_WIN_TYPE_SPLASH,
+ E_COMP_WIN_TYPE_DIALOG,
+ E_COMP_WIN_TYPE_NORMAL,
+ E_COMP_WIN_TYPE_DROPDOWN_MENU,
+ E_COMP_WIN_TYPE_POPUP_MENU,
+ E_COMP_WIN_TYPE_TOOLTIP,
+ E_COMP_WIN_TYPE_NOTIFICATION,
+ E_COMP_WIN_TYPE_COMBO,
+ E_COMP_WIN_TYPE_DND,
+ /* added type */
+ E_COMP_WIN_TYPE_MENUSCREEN,
+ E_COMP_WIN_TYPE_QUICKPANEL_BASE,
+ E_COMP_WIN_TYPE_QUICKPANEL,
+ E_COMP_WIN_TYPE_TASKMANAGER,
+ E_COMP_WIN_TYPE_LIVEMAGAZINE,
+ E_COMP_WIN_TYPE_LOCKSCREEN,
+ E_COMP_WIN_TYPE_INDICATOR,
+ E_COMP_WIN_TYPE_TICKERNOTI,
+ E_COMP_WIN_TYPE_DEBUGGING_INFO,
+ E_COMP_WIN_TYPE_APPTRAY,
+ E_COMP_WIN_TYPE_BACKGROUND,
+ E_COMP_WIN_TYPE_ISF_KEYBOARD,
+ E_COMP_WIN_TYPE_ISF_SUB,
+} E_Comp_Win_Type;
+
+/* comp window type functions */
+EINTERN int e_mod_comp_win_type_init(void);
+EINTERN int e_mod_comp_win_type_shutdown(void);
+EINTERN Eina_Bool e_mod_comp_win_type_setup(E_Comp_Win *cw);
+EINTERN E_Comp_Win_Type e_mod_comp_win_type_get(E_Comp_Win *cw);
+EINTERN Eina_Bool e_mod_comp_win_type_handler_prop(Ecore_X_Event_Window_Property *ev);
+
+#endif
+#endif
--- /dev/null
+#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;
+ int 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 fake_image_launch;
+ 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;
+ double first_draw_delay;
+
+ int canvas_per_zone;
+ int use_hw_ov;
+ int debug_info_show;
+ int max_debug_msgs;
+ int debug_type_nocomp;
+ int debug_type_swap;
+ int debug_type_effect;
+};
+
+/* 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-tizen.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 != ENGINE_SW) &&
+ (cfdata->engine != ENGINE_GL))
+ cfdata->engine = ENGINE_SW;
+ 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->fake_image_launch = _comp_mod->conf->fake_image_launch;
+ 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 = 12;
+ else if (cfdata->fps_average_range > 120)
+ cfdata->fps_average_range = 120;
+ cfdata->first_draw_delay = _comp_mod->conf->first_draw_delay;
+
+ cfdata->canvas_per_zone = _comp_mod->conf->canvas_per_zone;
+ cfdata->use_hw_ov = _comp_mod->conf->use_hw_ov;
+ cfdata->debug_info_show = _comp_mod->conf->debug_info_show;
+ cfdata->max_debug_msgs = _comp_mod->conf->max_debug_msgs;
+ cfdata->debug_type_nocomp = _comp_mod->conf->debug_type_nocomp;
+ cfdata->debug_type_swap = _comp_mod->conf->debug_type_swap;
+ cfdata->debug_type_effect = _comp_mod->conf->debug_type_effect;
+
+ 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 = (long)evas_object_data_get(data, "style_demo_state");
+ demo_state = (demo_state + 1) % 4;
+ evas_object_data_set(data, "style_demo_state", (void *)(long)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;
+ const char *str;
+ 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);
+
+ EINA_LIST_FREE(styles, str)
+ eina_stringshare_del(str);
+
+ return oi;
+}
+
+static void
+_match_sel(void *data __UNUSED__)
+{
+// Match_Config *m = data;
+// E_Config_Dialog *cfd = m->cfd;
+}
+
+static const char *
+_match_type_label_get(int type)
+{
+ if (ECORE_X_WINDOW_TYPE_UNKNOWN == type)
+ return _("Unused");
+ if (ECORE_X_WINDOW_TYPE_COMBO == type)
+ return _("Combo");
+ if (ECORE_X_WINDOW_TYPE_DESKTOP == type)
+ return _("Desktop");
+ if (ECORE_X_WINDOW_TYPE_DIALOG == type)
+ return _("Dialog");
+ if (ECORE_X_WINDOW_TYPE_DOCK == type)
+ return _("Dock");
+ if (ECORE_X_WINDOW_TYPE_DND == type)
+ return _("Drag and Drop");
+ if (ECORE_X_WINDOW_TYPE_MENU == type)
+ return _("Menu");
+ if (ECORE_X_WINDOW_TYPE_DROPDOWN_MENU == type)
+ return _("Menu (Dropdown)");
+ if (ECORE_X_WINDOW_TYPE_POPUP_MENU == type)
+ return _("Menu (Popup)");
+ if (ECORE_X_WINDOW_TYPE_NORMAL == type)
+ return _("Normal");
+ if (ECORE_X_WINDOW_TYPE_NOTIFICATION == type)
+ return _("Notification");
+ if (ECORE_X_WINDOW_TYPE_SPLASH == type)
+ return _("Splash");
+ if (ECORE_X_WINDOW_TYPE_TOOLBAR == type)
+ return _("Toolbar");
+ if (ECORE_X_WINDOW_TYPE_TOOLTIP == type)
+ return _("Tooltip");
+ if (ECORE_X_WINDOW_TYPE_UTILITY == type)
+ return _("Utility");
+
+ return _("Unused");
+}
+
+static char *
+_match_label_get(Match_Config *m)
+{
+ char *label;
+ Eina_Strbuf *buf = eina_strbuf_new();
+
+ if (m->match.title)
+ {
+ eina_strbuf_append(buf, _("Title:"));
+ eina_strbuf_append(buf, m->match.title);
+ eina_strbuf_append(buf, _(" / "));
+ }
+ if (m->match.primary_type)
+ {
+ eina_strbuf_append(buf, _("Type:"));
+ eina_strbuf_append(buf, _match_type_label_get(m->match.primary_type));
+ eina_strbuf_append(buf, _(" / "));
+ }
+ if (m->match.name)
+ {
+ eina_strbuf_append(buf, _("Name:"));
+ eina_strbuf_append(buf, m->match.name);
+ eina_strbuf_append(buf, _(" / "));
+ }
+ if (m->match.clas)
+ {
+ eina_strbuf_append(buf, _("Class:"));
+ eina_strbuf_append(buf, m->match.clas);
+ eina_strbuf_append(buf, _(" / "));
+ }
+ if (m->match.role)
+ {
+ eina_strbuf_append(buf, _("Role:"));
+ eina_strbuf_append(buf, m->match.role);
+ eina_strbuf_append(buf, _(" / "));
+ }
+ if (m->match.shadow_style)
+ {
+ eina_strbuf_append(buf, _("Style:"));
+ eina_strbuf_append(buf, m->match.shadow_style);
+ }
+
+ if (!eina_strbuf_length_get(buf))
+ return _("Unknown");
+
+ label = strdup(eina_strbuf_string_get(buf));
+ eina_strbuf_free(buf);
+
+ return label;
+}
+
+static void
+_match_ilist_append(Evas_Object *il,
+ Match_Config *m,
+ int pos,
+ int pre)
+{
+ 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);
+ }
+ E_FREE(name);
+}
+
+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);
+ _match_free(m);
+}
+
+static void
+_cb_dialog_resize(void *data,
+ Evas *e __UNUSED__,
+ Evas_Object *obj,
+ void *event_info __UNUSED__)
+{
+ Evas_Object *bg, *of;
+ int x, y, w, h;
+
+ of = data;
+ bg = evas_object_data_get(of, "bg");
+ evas_object_geometry_get(obj, &x, &y, &w, &h);
+
+ evas_object_move(bg, x, y);
+ evas_object_resize(bg, w, h);
+ evas_object_move(of, x, y);
+ evas_object_resize(of, w, h);
+}
+
+static void
+_edit_ok(void *d1,
+ void *d2)
+{
+ Match_Config *m = d1;
+ Evas_Object *dia, *bg, *of = d2;
+ Evas_Object *il;
+ char *label;
+ 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);
+ label = _match_label_get(m);
+ e_widget_ilist_nth_label_set(il, n, label);
+ E_FREE(label);
+ bg = evas_object_data_get(of, "bg");
+ dia = evas_object_data_get(of, "dia");
+
+ evas_object_event_callback_del(dia, EVAS_CALLBACK_RESIZE, _cb_dialog_resize);
+ evas_object_del(bg);
+ evas_object_del(of);
+}
+
+static void
+_create_edit_frame(E_Config_Dialog *cfd,
+ Evas *evas,
+ E_Config_Dialog_Data *cfdata,
+ Match_Config *m)
+{
+ Evas_Object *of, *oi, *lb, *en, *bt, *tb, *tab2, *o, *sf, *li;
+ E_Radio_Group *rg;
+ int row;
+ int x, y, w, h;
+
+ o = edje_object_add(evas);
+ e_theme_edje_object_set(o, "base/theme/dialog", "e/widgets/dialog/main");
+ evas_object_geometry_get(cfd->dia->bg_object, &x, &y, &w, &h);
+ evas_object_move(o, x, y);
+ evas_object_resize(o, w, h);
+ evas_object_show(o);
+
+ of = e_widget_frametable_add(evas, _("Edit Match"), 0);
+ evas_object_data_set(of, "bg", o);
+ evas_object_data_set(of, "dia", cfd->dia->bg_object);
+ evas_object_move(of, x, y);
+ evas_object_resize(of, w, h);
+ evas_object_show(of);
+
+ evas_object_event_callback_add(cfd->dia->bg_object, EVAS_CALLBACK_RESIZE,
+ _cb_dialog_resize, of);
+
+ 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);
+}
+
+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);
+ if (!m)
+ {
+ e_widget_ilist_thaw(il);
+ return;
+ }
+ 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);
+ if (!m)
+ {
+ e_widget_ilist_thaw(il);
+ return;
+ }
+ 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 - 1, 0);
+ e_widget_ilist_selected_set(il, n - 1);
+
+ 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);
+ if (!m)
+ {
+ e_widget_ilist_thaw(il);
+ return;
+ }
+ 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);
+ 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);
+ if (!m) return;
+
+ 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);
+ ob = e_widget_check_add(evas, _("Fake image launch"), &(cfdata->fake_image_launch));
+ 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);
+ ob = e_widget_label_add(evas, _("Initial draw timeout for newly mapped windows"));
+ e_widget_list_object_append(ol, ob, 1, 1, 0.5);
+ ob = e_widget_slider_add(evas, 1, 0, _("%1.2f Seconds"), 0.01, 0.5, 0.01, 0, &(cfdata->first_draw_delay), NULL, 150);
+ 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"), ENGINE_SW, rg);
+ e_widget_list_object_append(ol, ob, 1, 1, 0.5);
+ if (!getenv("ECORE_X_NO_XLIB"))
+ {
+ if (ecore_evas_engine_type_supported_get(ECORE_EVAS_ENGINE_OPENGL_X11))
+ {
+ ob = e_widget_radio_add(evas, _("OpenGL"), ENGINE_GL, 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_label_add(evas, _("Ctrl+Alt+Shift+Home resets compositor"));
+ e_widget_framelist_object_append(of, ob);
+ ob = e_widget_check_add(evas, _("Indirect OpenGL (EXPERIMENTAL)"), &(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);
+
+ ///////////////////////////////////////////
+ ol = e_widget_list_add(evas, 0, 0);
+
+ ob = e_widget_check_add(evas, _("Show Framerate"), &(cfdata->fps_show));
+ e_widget_list_object_append(ol, ob, 1, 1, 0.5);
+ ob = e_widget_label_add(evas, _("Rolling average frame count"));
+ e_widget_list_object_append(ol, ob, 1, 1, 0.5);
+ ob = e_widget_slider_add(evas, 1, 0, _("%1.0f Frames"), 1, 120, 1, 0,
+ NULL, &(cfdata->fps_average_range), 240);
+ e_widget_list_object_append(ol, ob, 1, 1, 0.5);
+
+ of = e_widget_frametable_add(evas, _("Corner"), 0);
+ e_widget_frametable_content_align_set(of, 0.5, 0.5);
+ rg = e_widget_radio_group_new(&(cfdata->fps_corner));
+ ob = e_widget_radio_icon_add(evas, "Top Left", "preferences-position-top-left",
+ 24, 24, 0, rg);
+ e_widget_frametable_object_append(of, ob, 0, 0, 1, 1, 1, 1, 1, 1);
+ ob = e_widget_radio_icon_add(evas, "Top Right", "preferences-position-top-right",
+ 24, 24, 1, rg);
+ e_widget_frametable_object_append(of, ob, 1, 0, 1, 1, 1, 1, 1, 1);
+ ob = e_widget_radio_icon_add(evas, "Bottom Left", "preferences-position-bottom-left",
+ 24, 24, 2, rg);
+ e_widget_frametable_object_append(of, ob, 0, 1, 1, 1, 1, 1, 1, 1);
+ ob = e_widget_radio_icon_add(evas, "Bottom Right", "preferences-position-bottom-right",
+ 24, 24, 3, rg);
+ e_widget_frametable_object_append(of, ob, 1, 1, 1, 1, 1, 1, 1, 1);
+ e_widget_list_object_append(ol, of, 1, 1, 0.5);
+
+ e_widget_toolbook_page_append(otb, NULL, _("Debug"), ol, 0, 0, 0, 0, 0.5, 0.0);
+
+ ///////////////////////////////////////////
+ ol = e_widget_list_add(evas, 0, 0);
+ ob = e_widget_check_add(evas, _("Evas canvas per zone"), &(cfdata->canvas_per_zone));
+ e_widget_list_object_append(ol, ob, 1, 1, 0.5);
+
+ ob = e_widget_check_add(evas, _("H/W overlay window"), &(cfdata->use_hw_ov));
+ e_widget_list_object_append(ol, ob, 1, 1, 0.5);
+
+ ob = e_widget_check_add(evas, _("Show Log"), &(cfdata->debug_info_show));
+ e_widget_list_object_append(ol, ob, 1, 1, 0.5);
+ ob = e_widget_label_add(evas, _("Maximum number of log messages"));
+ e_widget_list_object_append(ol, ob, 1, 1, 0.5);
+ ob = e_widget_slider_add(evas, 1, 0, _("%1.0f Messages"), 1, 30, 1, 0,
+ NULL, &(cfdata->max_debug_msgs), 240);
+ e_widget_list_object_append(ol, ob, 1, 1, 0.5);
+ ob = e_widget_label_add(evas, _("Log Type"));
+ e_widget_list_object_append(ol, ob, 1, 1, 0.5);
+ ob = e_widget_check_add(evas, _("COMP <-> NOCOMP"), &(cfdata->debug_type_nocomp));
+ e_widget_list_object_append(ol, ob, 1, 1, 0.5);
+ ob = e_widget_check_add(evas, _("SWAP"), &(cfdata->debug_type_swap));
+ e_widget_list_object_append(ol, ob, 1, 1, 0.5);
+ ob = e_widget_check_add(evas, _("EFFECT"), &(cfdata->debug_type_effect));
+ e_widget_list_object_append(ol, ob, 1, 1, 0.5);
+
+ e_widget_toolbook_page_append(otb, NULL, _("Mobile"), 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->fake_image_launch != _comp_mod->conf->fake_image_launch) ||
+ (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->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) ||
+ (cfdata->first_draw_delay != _comp_mod->conf->first_draw_delay) ||
+ (cfdata->canvas_per_zone != _comp_mod->conf->canvas_per_zone) ||
+ (cfdata->use_hw_ov != _comp_mod->conf->use_hw_ov) ||
+ (cfdata->debug_info_show != _comp_mod->conf->debug_info_show) ||
+ (cfdata->max_debug_msgs != _comp_mod->conf->max_debug_msgs) ||
+ (cfdata->debug_type_nocomp != _comp_mod->conf->debug_type_nocomp) ||
+ (cfdata->debug_type_swap != _comp_mod->conf->debug_type_swap) ||
+ (cfdata->debug_type_effect != _comp_mod->conf->debug_type_effect) ||
+ (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->fake_image_launch = cfdata->fake_image_launch;
+ _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;
+ _comp_mod->conf->fps_show = cfdata->fps_show;
+ _comp_mod->conf->fps_corner = cfdata->fps_corner;
+ _comp_mod->conf->fps_average_range = cfdata->fps_average_range;
+ _comp_mod->conf->first_draw_delay = cfdata->first_draw_delay;
+ _comp_mod->conf->canvas_per_zone = cfdata->canvas_per_zone;
+ _comp_mod->conf->use_hw_ov = cfdata->use_hw_ov;
+ _comp_mod->conf->debug_info_show = cfdata->debug_info_show;
+ _comp_mod->conf->max_debug_msgs = cfdata->max_debug_msgs;
+ _comp_mod->conf->debug_type_nocomp = cfdata->debug_type_nocomp;
+ _comp_mod->conf->debug_type_swap = cfdata->debug_type_swap;
+ _comp_mod->conf->debug_type_effect = cfdata->debug_type_effect;
+ 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();
+ e_mod_comp_hw_ov_win_msg_config_update();
+ }
+ 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;
+}
--- /dev/null
+#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
--- /dev/null
+#include "e.h"
+#include "e_mod_main.h"
+#include "e_mod_config.h"
+#include "e_mod_comp.h"
+
+//static Ecore_Event_Handler *init_done_handler = NULL;
+
+//static int
+//_e_init_done(void *data, int type, void *event)
+//{
+// ecore_event_handler_del(init_done_handler);
+// init_done_handler = NULL;
+// if (!e_mod_comp_init())
+// {
+// // FIXME: handle if comp init fails
+// }
+// return 1;
+//}
+
+/* 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-tizen.edj", e_module_dir_get(m));
+ e_configure_registry_category_add("appearance", 10, _("Look"), NULL,
+ "preferences-look");
+ e_configure_registry_item_add("appearance/comp", 120, _("Composite"), NULL,
+ buf, e_int_config_comp_module);
+
+ e_mod_comp_cfdata_edd_init(&(mod->conf_edd),
+ &(mod->conf_match_edd));
+
+ mod->conf = e_config_domain_load("module.comp-tizen", mod->conf_edd);
+ if (!mod->conf) _e_mod_config_new(m);
+
+ if (!e_config->use_composite)
+ {
+ e_config->use_composite = 1;
+ e_config_save_queue();
+ }
+
+ /* XXX: disabled dropshadow module when comp is running */
+ {
+ Eina_List *l;
+ E_Module *m2;
+ EINA_LIST_FOREACH(e_module_list(), l, m2)
+ {
+ if (m2->enabled && (!strcmp(m2->name, "dropshadow")))
+ e_module_disable(m2);
+ }
+ }
+
+ /* XXX: update old configs. add config versioning */
+ if (mod->conf->first_draw_delay == 0)
+ mod->conf->first_draw_delay = 0.20;
+
+ _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;
+ mod->conf = e_mod_comp_cfdata_config_new();
+}
+
+void
+_e_mod_config_free(E_Module *m)
+{
+ Mod *mod = m->data;
+
+ e_mod_cfdata_config_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-tizen", mod->conf_edd, mod->conf);
+ return 1;
+}
--- /dev/null
+#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
+
+#include "e_mod_comp_cfdata.h"
+
+typedef struct _Mod Mod;
+
+struct _Mod
+{
+ E_Module *module;
+
+ E_Config_DD *conf_edd;
+ E_Config_DD *conf_match_edd;
+ Config *conf;
+
+ E_Config_Dialog *config_dialog;
+};
+
+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);
+
+#define ENGINE_SW 1
+#define ENGINE_GL 2
+
+
+/**
+ * @addtogroup Optional_Look
+ * @{
+ *
+ * @defgroup Module_Comp Comp (Composite Manager)
+ *
+ * Implements the X11 Composite Manager to support alpha blend,
+ * semi-transparent windows and drop shadow. Does support animations
+ * and effects such as coloring unfocused windows.
+ *
+ * @}
+ */
+
+#endif
--- /dev/null
+[Desktop Entry]
+Type=Link
+Name=Composite
+Icon=e-module-comp-tizen
+Comment=
+Comment[fr]=
+Comment[it]=
+X-Enlightenment-ModuleType=appearance
--- /dev/null
+Sung-Jin Park <sj76.park@samsung.com>
+SooChan Lim <sc1.lim@samsung.com>
+Sangjin Lee <lsj119@samsung.com>
--- /dev/null
+Copyright notice for Enlightenment:
+
+Copyright (C) 2000-2012 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.
--- /dev/null
+# 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)
+
+
--- /dev/null
+#!/bin/sh
+# Run this to generate all the initial makefiles, etc.
+
+set -x
+aclocal
+autoconf
+libtoolize --copy --force
+autoheader
+automake --foreign --add-missing --copy
+
--- /dev/null
+# authored by Sung-Jin Park <sj76.park@samsung.com>
+#
+# 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-devicemgr], [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
+
+#PKG_CHECK_MODULES(GESTUREPROTO, gestureproto)
+#PKG_CHECK_MODULES(GESTURELIB, xgesture)
+
+dnl ========================================================================
+# checks for pkg-config
+dnl ========================================================================
+#PKG_CHECK_MODULES(ENLIGHTENMENT, [enlightenment, gestureproto, xgesture])
+PKG_CHECK_MODULES(ENLIGHTENMENT, [enlightenment, sensor, vconf])
+ENLIGHTENMENT_CFLAGS="${ENLIGHTENMENT_CFLAGS} "
+AC_SUBST(ENLIGHTENMENT_CFLAGS)
+AC_SUBST(ENLIGHTENMENT_LIBS)
+
+
+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
+
--- /dev/null
+[Desktop Entry]
+Type=Link
+Name=DeviceMgr
+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-skel
+Comment=<title>DeviceMgr</title><br>DeviceMgr.
+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]=
--- /dev/null
+MAINTAINERCLEANFILES = Makefile.in
+MODULE = e17-extra-module-devicemgr
+
+LDFLAGS +=
+
+#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 \
+ e_mod_config.c \
+ e_mod_config.h \
+ e_devicemgr_privates.h \
+ e_mod_scrnconf.c \
+ e_mod_scrnconf.h \
+ scrnconf_devicemgr.c \
+ scrnconf_devicemgr.h \
+ e_mod_drv.c \
+ e_mod_drv.h \
+ virt_monitor_devicemgr.h \
+ hib_devicemgr.h \
+ sf_rotation_devicemgr.c \
+ sf_rotation_devicemgr.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)
--- /dev/null
+
+#ifndef _E_DEVICEMGR_PRIVATE_H_
+#define _E_DEVICEMGR_PRIVATE_H_
+
+#include "e.h"
+
+#define E_DEVICEMGR_CFG_PATH "/opt/share/.e/e/config/samsung/"
+#define E_DEVICEMGR_CFG "module.devicemgr-tizen"
+
+/* atoms */
+#define STR_ATOM_DEVICEMGR_CFG "_DEVICEMGR_CFG"
+
+typedef enum
+{
+ DEVICEMGR_CFG_POPUP,
+ DEVICEMGR_CFG_DEFAULT_DISPMODE,
+} DEVICEMGR_CFG;
+
+typedef struct _E_Devicemgr_Config E_Devicemgr_Config;
+
+/* external variable to store active config */
+extern E_Devicemgr_Config *_e_devicemgr_cfg;
+
+/**
+ * @brief structure for Devicemgr configuration.
+ *
+ * @ingroup E_Devicemgr_Config_Group
+ */
+struct _E_Devicemgr_Config
+{
+ struct
+ {
+ int enable;
+ /**< enable screen configuration */
+ int default_dispmode;
+ /**< default display mode */
+ Eina_Bool isPopUpEnabled;
+ /**< popup enable/disable status */
+ } ScrnConf;
+};
+
+#endif//_E_DEVICEMGR_PRIVATE_H_
+
--- /dev/null
+\r
+#include "e_devicemgr_privates.h"\r
+#include "e_mod_config.h"\r
+#include "scrnconf_devicemgr.h"\r
+\r
+/* local variables */\r
+static E_Config_DD *_devicemgr_conf_edd = NULL;\r
+\r
+static void _e_mod_devicemgr_config_free(void);\r
+static void _e_mod_devicemgr_config_new(void);\r
+\r
+/* external variables */\r
+E_Devicemgr_Config *_e_devicemgr_cfg = NULL;\r
+\r
+int\r
+e_mod_devicemgr_config_init(void)\r
+{\r
+ /* create config structure for module */\r
+ _devicemgr_conf_edd = E_CONFIG_DD_NEW("Devicemgr_Config", E_Devicemgr_Config);\r
+\r
+#undef T\r
+#undef D\r
+#define T E_Devicemgr_Config\r
+#define D _devicemgr_conf_edd\r
+ E_CONFIG_VAL(D, T, ScrnConf.enable, UCHAR);\r
+ E_CONFIG_VAL(D, T, ScrnConf.default_dispmode, INT);\r
+ E_CONFIG_VAL(D, T, ScrnConf.isPopUpEnabled, UCHAR);\r
+\r
+ /* attempt to load existing configuration */\r
+ _e_devicemgr_cfg = e_config_domain_load(E_DEVICEMGR_CFG, _devicemgr_conf_edd);\r
+\r
+ /* create new config if we need to */\r
+ if (!_e_devicemgr_cfg)\r
+ {\r
+ _e_mod_devicemgr_config_new();\r
+ e_mod_devicemgr_config_save();\r
+ fprintf(stderr, "[e_devicemgr][config] Config file for e_devicemgr was made/stored !\n");\r
+ }\r
+ else\r
+ {\r
+ fprintf(stderr, "[e_devicemgr][config] Config file for e_devicemgr was loaded successfully !\n");\r
+ }\r
+\r
+ return 1;\r
+}\r
+\r
+int\r
+e_mod_devicemgr_config_shutdown(void)\r
+{\r
+ /* free config structure */\r
+ _e_mod_devicemgr_config_free();\r
+\r
+ /* free data descriptors */\r
+ E_CONFIG_DD_FREE(_devicemgr_conf_edd);\r
+\r
+ return 1;\r
+}\r
+\r
+int\r
+e_mod_devicemgr_config_save(void)\r
+{\r
+ return e_config_domain_save(E_DEVICEMGR_CFG, _devicemgr_conf_edd, _e_devicemgr_cfg);\r
+}\r
+\r
+/* local functions */\r
+static void\r
+_e_mod_devicemgr_config_free(void)\r
+{\r
+ /* check for config */\r
+ if (!_e_devicemgr_cfg) return;\r
+\r
+ /* free config structure */\r
+ E_FREE(_e_devicemgr_cfg);\r
+}\r
+\r
+static void\r
+_e_mod_devicemgr_config_new(void)\r
+{\r
+ /* create initial config */\r
+ _e_devicemgr_cfg = E_NEW(E_Devicemgr_Config, 1);\r
+ _e_devicemgr_cfg->ScrnConf.enable = EINA_TRUE;\r
+ _e_devicemgr_cfg->ScrnConf.default_dispmode = UTILX_SCRNCONF_DISPMODE_CLONE;\r
+ _e_devicemgr_cfg->ScrnConf.isPopUpEnabled = EINA_FALSE;\r
+}\r
+\r
--- /dev/null
+\r
+#ifndef _E_MOD_CONFIG_H_\r
+#define _E_MOD_CONFIG_H_\r
+\r
+/* local function prototypes */\r
+int e_mod_devicemgr_config_init(void);\r
+int e_mod_devicemgr_config_shutdown(void);\r
+int e_mod_devicemgr_config_save(void);\r
+\r
+#endif//_E_MOD_CONFIG_H_\r
+\r
--- /dev/null
+#include "e.h"
+#include "e_randr.h"
+#include "e_mod_main.h"
+#include "e_mod_drv.h"
+
+#define STR_XRR_LVDS_FUNCTION "XRR_PROPERTY_LVDS_FUNCTION"
+
+#ifdef _MAKE_ATOM
+# undef _MAKE_ATOM
+#endif
+
+#define _MAKE_ATOM(a, s) \
+ do { \
+ a = ecore_x_atom_get (s); \
+ if (!a) \
+ fprintf (stderr, \
+ "[E-devmgr] ##s creation failed.\n"); \
+ } while (0)
+
+/* lvds function */
+typedef enum
+{
+ XRR_OUTPUT_LVDS_FUNC_NULL, /* null */
+ XRR_OUTPUT_LVDS_FUNC_INIT_VIRTUAL, /* virutal output connect/disconnect */
+ XRR_OUTPUT_LVDS_FUNC_HIBERNATION, /* hibernation on / off */
+ XRR_OUTPUT_LVDS_FUNC_ACCESSIBLILITY, /* accessibility */
+} XRROutputPropLvdsFunc;
+
+
+void
+e_mod_drv_virt_mon_set (int cmd)
+{
+ printf ("[DeviceMgr]: set the virtual output connect/disconnect\n");
+
+ E_Randr_Output_Info *output_info = NULL;
+ Eina_List *l_output;
+ Eina_Bool found_output = EINA_FALSE;
+ Ecore_X_Randr_Output output_xid[1] = {0};
+ Ecore_X_Atom lvds_func;
+ int value[2];
+
+ EINA_LIST_FOREACH (e_randr_screen_info.rrvd_info.randr_info_12->outputs, l_output, output_info)
+ {
+ if (output_info == NULL)
+ continue;
+
+ if (!strcmp (output_info->name, "LVDS1"))
+ {
+ output_xid[0] = output_info->xid;
+ found_output = EINA_TRUE;
+ }
+ }
+
+ if (!found_output)
+ {
+ fprintf (stderr, "[DeviceMgr]: fail to initialize the virtual output\n");
+ goto set_fail;
+ }
+
+ ecore_x_grab ();
+
+ _MAKE_ATOM (lvds_func, STR_XRR_LVDS_FUNCTION);
+
+ value[0] = XRR_OUTPUT_LVDS_FUNC_INIT_VIRTUAL;
+ value[1] = cmd;
+
+ /* no ecore x API for XRRChangeOutputProperty */
+ XRRChangeOutputProperty (ecore_x_display_get (), output_xid[0], lvds_func, XA_INTEGER, 32,
+ PropModeReplace, (unsigned char *)&value, 2);
+
+ /* replay through XSendMessage */
+
+ ecore_x_ungrab ();
+ ecore_x_sync ();
+ return;
+
+set_fail:
+ ecore_x_ungrab ();
+}
+
+void
+e_mod_drv_hib_set (int cmd)
+{
+ printf ("[DeviceMgr]: set the hibernation on/off\n");
+
+ E_Randr_Output_Info *output_info = NULL;
+ Eina_List *l_output;
+ Eina_Bool found_output = EINA_FALSE;
+ Ecore_X_Randr_Output output_xid[1] = {0};
+ Ecore_X_Atom lvds_func;
+ int value[2];
+
+ EINA_LIST_FOREACH (e_randr_screen_info.rrvd_info.randr_info_12->outputs, l_output, output_info)
+ {
+ if (output_info == NULL)
+ continue;
+
+ if (!strcmp (output_info->name, "LVDS1"))
+ {
+ output_xid[0] = output_info->xid;
+ found_output = EINA_TRUE;
+ }
+ }
+
+ if (!found_output)
+ {
+ fprintf (stderr, "[DeviceMgr]: fail to initialize the virtual output\n");
+ goto set_fail;
+ }
+
+ ecore_x_grab ();
+
+ _MAKE_ATOM (lvds_func, STR_XRR_LVDS_FUNCTION);
+
+ value[0] = XRR_OUTPUT_LVDS_FUNC_HIBERNATION;
+ value[1] = cmd;
+
+ /* no ecore x API for XRRChangeOutputProperty */
+ XRRChangeOutputProperty (ecore_x_display_get (), output_xid[0], lvds_func, XA_INTEGER, 32,
+ PropModeReplace, (unsigned char *)&value, 2);
+
+ /* replay through XSendMessage */
+
+ ecore_x_ungrab ();
+ ecore_x_sync ();
+ return;
+
+set_fail:
+ ecore_x_ungrab ();
+}
+
--- /dev/null
+#ifndef E_MOD_DRV_H
+#define E_MOD_DRV_H
+
+void e_mod_drv_virt_mon_set (int cmd);
+
+void e_mod_drv_hib_set (int cmd);
+
+#endif // E_MOD_DRV_H
+
--- /dev/null
+
+#include "e.h"
+#include "e_devicemgr_privates.h"
+#include "e_mod_main.h"
+#include "e_mod_config.h"
+#include <string.h>
+
+#define E_MOD_SCRNCONF_CHK_RET(cond, val) {if (!(cond)) { fprintf (stderr, "[%s] : '%s' failed.\n", __func__, #cond); return val; }}
+#define E_MOD_SCRNCONF_CHK_GOTO(cond, dst) {if (!(cond)) { fprintf (stderr, "[%s] : '%s' failed.\n", __func__, #cond); goto dst; }}
+
+extern char *strcasestr(const char *s, const char *find);
+DeviceMgr e_devicemgr;
+static Eina_Bool e_mod_set_disp_clone = EINA_FALSE;
+
+static int _e_devicemgr_init (void);
+static void _e_devicemgr_fini (void);
+static int _e_devicemgr_get_configuration (void);
+static int _e_devicemgr_update_configuration (void);
+
+static int _e_devicemgr_cb_crtc_change (void *data, int type, void *ev);
+static int _e_devicemgr_cb_output_change (void *data, int type, void *ev);
+static int _e_devicemgr_cb_output_property (void *data, int type, void *ev);
+static int _e_devicemgr_cb_client_message (void* data, int type, void* event);
+
+/* 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,
+ "DeviceMgr Module of Window Manager"
+};
+
+EAPI void*
+e_modapi_init(E_Module* m)
+{
+ if (!_e_devicemgr_init())
+ {
+ printf("[e_devicemgr][%s] Failed @ _e_devicemgr_init()..!\n", __FUNCTION__);
+ return NULL;
+ }
+
+ /* add handlers */
+ e_devicemgr.client_message_handler = ecore_event_handler_add (ECORE_X_EVENT_CLIENT_MESSAGE, (Ecore_Event_Handler_Cb)_e_devicemgr_cb_client_message, NULL);
+ e_devicemgr.window_property_handler = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_PROPERTY, (Ecore_Event_Handler_Cb)_e_devicemgr_cb_window_property, NULL);
+ e_devicemgr.event_generic_handler = ecore_event_handler_add(ECORE_X_EVENT_GENERIC, (Ecore_Event_Handler_Cb)_e_devicemgr_cb_event_generic, NULL);
+ e_devicemgr.zone_add_handler = ecore_event_handler_add(E_EVENT_ZONE_ADD, (Ecore_Event_Handler_Cb)_e_devicemgr_cb_zone_add, NULL);
+ e_devicemgr.zone_del_handler = ecore_event_handler_add(E_EVENT_ZONE_DEL, (Ecore_Event_Handler_Cb)_e_devicemgr_cb_zone_del, NULL);
+
+ if (!e_devicemgr.window_property_handler) printf("[e_devicemgr][%s] Failed to add ECORE_X_EVENT_WINDOW_PROPERTY handler\n", __FUNCTION__);
+ if (!e_devicemgr.event_generic_handler) printf("[e_devicemgr][%s] Failed to add ECORE_X_EVENT_GENERIC handler\n", __FUNCTION__);
+ if (!e_devicemgr.zone_add_handler) printf("[e_devicemgr][%s] Failed to add E_EVENT_ZONE_ADD handler\n", __FUNCTION__);
+ if (!e_devicemgr.zone_del_handler) printf("[e_devicemgr][%s] Failed to add E_EVENT_ZONE_DEL handler\n", __FUNCTION__);
+
+ if (e_devicemgr.scrnconf_enable)
+ {
+ e_devicemgr.randr_crtc_handler = ecore_event_handler_add (ECORE_X_EVENT_RANDR_CRTC_CHANGE, (Ecore_Event_Handler_Cb)_e_devicemgr_cb_crtc_change, NULL);
+ e_devicemgr.randr_output_handler = ecore_event_handler_add (ECORE_X_EVENT_RANDR_OUTPUT_CHANGE, (Ecore_Event_Handler_Cb)_e_devicemgr_cb_output_change, NULL);
+ e_devicemgr.randr_output_property_handler = ecore_event_handler_add (ECORE_X_EVENT_RANDR_OUTPUT_PROPERTY_NOTIFY, (Ecore_Event_Handler_Cb)_e_devicemgr_cb_output_property, NULL);
+
+ if (!e_devicemgr.randr_crtc_handler) printf ("[e_devicemgr][%s] Failed to add ECORE_X_EVENT_RANDR_CRTC_CHANGE handler\n", __FUNCTION__);
+ if (!e_devicemgr.randr_output_handler) printf ("[e_devicemgr][%s] Failed to add ECORE_X_EVENT_RANDR_OUTPUT_CHANGE handler\n", __FUNCTION__);
+ if (!e_devicemgr.randr_output_property_handler) printf ("[e_devicemgr][%s] Failed to add ECORE_X_EVENT_RANDR_OUTPUT_PROPERTY_NOTIFY handler\n", __FUNCTION__);
+ }
+
+ return m;
+}
+
+EAPI int
+e_modapi_shutdown(E_Module* m)
+{
+ ecore_event_handler_del (e_devicemgr.randr_crtc_handler);
+ ecore_event_handler_del (e_devicemgr.randr_output_handler);
+ ecore_event_handler_del (e_devicemgr.randr_output_property_handler);
+ ecore_event_handler_del(e_devicemgr.window_property_handler);
+ ecore_event_handler_del(e_devicemgr.event_generic_handler);
+ ecore_event_handler_del(e_devicemgr.zone_add_handler);
+ ecore_event_handler_del(e_devicemgr.zone_del_handler);
+ e_devicemgr.window_property_handler = NULL;
+ e_devicemgr.event_generic_handler = NULL;
+ e_devicemgr.zone_add_handler = NULL;
+ e_devicemgr.zone_del_handler = NULL;
+
+ e_devicemgr.randr_crtc_handler = NULL;
+ e_devicemgr.randr_output_handler = NULL;
+ e_devicemgr.randr_output_property_handler = NULL;
+ _e_devicemgr_fini();
+
+ return 1;
+}
+
+EAPI int
+e_modapi_save(E_Module* m)
+{
+ /* Do Something */
+ return 1;
+}
+
+static int
+_e_devicemgr_init(void)
+{
+ unsigned int val = 1;
+ int res, ret = 1;
+
+ memset(&e_devicemgr, 0, sizeof(DeviceMgr));
+
+ e_devicemgr.disp = ecore_x_display_get();
+
+ if (!e_devicemgr.disp)
+ {
+ fprintf(stderr, "\e[32m[e_devicemgr] Failed to open display..!\e[0m\n");
+ ret = 0;
+ goto out;
+ }
+
+ e_devicemgr.rootWin = ecore_x_window_root_first_get();
+
+ /* init data structure */
+ e_devicemgr.vcp_id = -1;
+ e_devicemgr.vcp_xtest_pointer_id = -1;
+ e_devicemgr.vck_xtest_keyboard_id = -1;
+ e_devicemgr.new_master_pointer_id = -1;
+ e_devicemgr.virtual_touchpad_id = -1;
+ e_devicemgr.virtual_multitouch_done = 1;
+ e_devicemgr.device_list = NULL;
+ e_devicemgr.atomRROutput = ecore_x_atom_get(E_PROP_XRROUTPUT);
+ e_devicemgr.atomDeviceName = ecore_x_atom_get(E_PROP_DEVICE_NAME);
+ e_devicemgr.atomDeviceList = ecore_x_atom_get(E_PROP_DEVICE_LIST);
+ e_devicemgr.atomXMouseExist = ecore_x_atom_get(E_PROP_X_MOUSE_EXIST);
+ e_devicemgr.atomXMouseCursorEnable = ecore_x_atom_get(E_PROP_X_MOUSE_CURSOR_ENABLE);
+ e_devicemgr.atomXExtKeyboardExist = ecore_x_atom_get(E_PROP_X_EXT_KEYBOARD_EXIST);
+ e_devicemgr.atomHWKbdInputStarted = ecore_x_atom_get(E_PROP_HW_KEY_INPUT_STARTED);
+ e_devicemgr.atomAxisLabels = ecore_x_atom_get(E_PROP_X_EVDEV_AXIS_LABELS);
+ e_devicemgr.atomVirtualTouchpadConfineRegion = ecore_x_atom_get(E_PROP_VIRTUAL_TOUCHPAD_CONFINE_REGION);
+ e_devicemgr.atomVirtualTouchpad = ecore_x_atom_get(E_PROP_VIRTUAL_TOUCHPAD);
+ e_devicemgr.atomVirtualTouchpadInt = ecore_x_atom_get(E_PROP_VIRTUAL_TOUCHPAD_INT);
+ e_devicemgr.atomDeviceMgrInputWindow = ecore_x_atom_get(E_PROP_DEVICEMGR_INPUTWIN);
+ e_devicemgr.atomTouchInput = ecore_x_atom_get(E_PROP_TOUCH_INPUT);
+ e_devicemgr.atomScrnConfDispModeSet = ecore_x_atom_get(STR_ATOM_SCRNCONF_DISPMODE_SET);
+ e_devicemgr.atomVirtMonReq = ecore_x_atom_get(STR_ATOM_VIRT_MONITOR_REQUEST);
+ e_devicemgr.atomHibReq = ecore_x_atom_get(STR_ATOM_HIB_REQUEST);
+ e_devicemgr.atomDevMgrCfg = ecore_x_atom_get(STR_ATOM_DEVICEMGR_CFG);
+ e_devicemgr.atomFloat = ecore_x_atom_get(XATOM_FLOAT);
+ e_devicemgr.atomInputTransform = ecore_x_atom_get(EVDEVMULTITOUCH_PROP_TRANSFORM);
+
+ ecore_x_window_prop_card32_set(e_devicemgr.rootWin, e_devicemgr.atomTouchInput, &val, 1);
+ memset(&e_devicemgr.virtual_touchpad_area_info, -1, sizeof(e_devicemgr.virtual_touchpad_area_info));
+ memset(&e_devicemgr.virtual_multitouch_id, -1, sizeof(e_devicemgr.virtual_multitouch_id));
+ e_devicemgr.virtual_touchpad_pointed_window = 0;
+ e_devicemgr.zones = NULL;
+
+ e_devicemgr.input_window = ecore_x_window_input_new(e_devicemgr.rootWin, -1, -1, 1, 1);
+
+ if (!e_devicemgr.input_window)
+ {
+ fprintf(stderr, "[e_devicemgr] Failed to create input_window !\n");
+ }
+ else
+ {
+ fprintf(stderr, "[e_devicemgr] Succeed to create input_window (0x%x)!\n", e_devicemgr.input_window);
+ ecore_x_window_prop_property_set(e_devicemgr.rootWin, e_devicemgr.atomDeviceMgrInputWindow, ECORE_X_ATOM_WINDOW, 32, &e_devicemgr.input_window, 1);
+ }
+
+ res = _e_devicemgr_xinput_init();
+ if (!res)
+ {
+ fprintf(stderr, "[e_devicemgr] Failed to initialize XInput Extension !\n");
+ ret =0;
+ goto out;
+ }
+
+ res = _e_devicemgr_xkb_init();
+ if (!res)
+ {
+ fprintf(stderr, "[e_devicemgr] Failed to initialize XKB Extension !\n");
+ ret = 0;
+ goto out;
+ }
+
+ e_mod_scrnconf_external_init();
+
+ _e_devicemgr_init_transform_matrix();
+ _e_devicemgr_init_input();
+ _e_devicemgr_init_output();
+
+ res = _e_devicemgr_get_configuration();
+ if (!res)
+ {
+ fprintf(stderr, "[e_devicemgr] Failed to get configuration from %s.cfg file !\n", E_DEVICEMGR_CFG);
+ ret =0;
+ goto out;
+ }
+
+ e_mod_scrnconf_container_bg_canvas_visible_set(EINA_FALSE);
+ if(EINA_FALSE == e_mod_sf_rotation_init())
+ {
+ fprintf(stderr, "[e_devicemgr] Failed to init rotation!\n");
+ }
+
+out:
+ return ret;
+}
+
+static void
+_e_devicemgr_fini(void)
+{
+ if(EINA_FALSE == e_mod_sf_rotation_deinit())
+ {
+ fprintf(stderr, "[e_devicemgr] Failed to deinit rotation!\n");
+ }
+
+ e_mod_devicemgr_config_shutdown();
+}
+
+
+static void
+_get_preferred_size (int sc_output, int *preferred_w, int *preferred_h)
+{
+ if (sc_output == SC_EXT_OUTPUT_HDMI)
+ {
+ *preferred_w = e_devicemgr.hdmi_preferred_w;
+ *preferred_h = e_devicemgr.hdmi_preferred_h;
+ }
+ else if (sc_output == SC_EXT_OUTPUT_VIRTUAL)
+ {
+ *preferred_w = e_devicemgr.virtual_preferred_w;
+ *preferred_h = e_devicemgr.virtual_preferred_h;
+ }
+ else
+ {
+ *preferred_w = 0;
+ *preferred_h = 0;
+ }
+}
+
+static int
+_e_devicemgr_cb_crtc_change (void *data, int type, void *ev)
+{
+ if (type == ECORE_X_EVENT_RANDR_CRTC_CHANGE)
+ {
+ //fprintf (stderr, "[scrn-conf]: Crtc Change!: \n");
+ //Ecore_X_Event_Randr_Crtc_Change *event = (Ecore_X_Event_Randr_Crtc_Change *)ev;
+ /* available information:
+ struct _Ecore_X_Event_Randr_Crtc_Change
+ {
+ Ecore_X_Window win;
+ Ecore_X_Randr_Crtc crtc;
+ Ecore_X_Randr_Mode mode;
+ Ecore_X_Randr_Orientation orientation;
+ int x;
+ int y;
+ int width;
+ int height;
+ };
+ */
+ }
+
+ return EINA_TRUE;
+}
+
+static int
+_e_devicemgr_cb_output_change (void *data, int type, void *ev)
+{
+ int sc_output = 0;
+ int sc_res = 0;
+ int sc_stat = 0;
+ int preferred_w =0, preferred_h = 0;
+
+ if (type == ECORE_X_EVENT_RANDR_OUTPUT_CHANGE)
+ {
+ //fprintf (stderr, "[scrn-conf]: Output Change!: \n");
+ Ecore_X_Event_Randr_Output_Change *event = (Ecore_X_Event_Randr_Output_Change *)ev;
+ /* available information:
+ struct _Ecore_X_Event_Randr_Output_Change
+ {
+ Ecore_X_Window win;
+ Ecore_X_Randr_Output output;
+ Ecore_X_Randr_Crtc crtc;
+ Ecore_X_Randr_Mode mode;
+ Ecore_X_Randr_Orientation orientation;
+ Ecore_X_Randr_Connection_Status connection;
+ Ecore_X_Render_Subpixel_Order subpixel_order;
+ };
+ */
+ fprintf (stderr, "[DeviceMgr]: Output Connection!: %d (connected = %d, disconnected = %d, unknown %d)\n",
+ event->connection, ECORE_X_RANDR_CONNECTION_STATUS_CONNECTED, ECORE_X_RANDR_CONNECTION_STATUS_DISCONNECTED, ECORE_X_RANDR_CONNECTION_STATUS_UNKNOWN);
+
+ /* check status of a output */
+ if (event->connection == ECORE_X_RANDR_CONNECTION_STATUS_CONNECTED &&
+ event->crtc == 0 &&
+ event->mode == 0)
+ {
+ /* if display mode is set by the client message, ignore output conncetion */
+ if (e_mod_set_disp_clone)
+ {
+ /* reset flag to default */
+ e_mod_set_disp_clone = EINA_FALSE;
+ return EINA_TRUE;
+ }
+
+ sc_stat = e_mod_scrnconf_external_get_status();
+ if (sc_stat == UTILX_SCRNCONF_STATUS_CONNECT ||
+ sc_stat == UTILX_SCRNCONF_STATUS_ACTIVE)
+ {
+ fprintf (stderr, "[DeviceMgr] : external monitor status is already connected \n");
+ return 1;
+ }
+
+ /* set the output of the external monitor */
+ sc_output = e_mod_scrnconf_external_get_output_from_xid (event->output);
+ E_MOD_SCRNCONF_CHK_RET (sc_output != SC_EXT_OUTPUT_NULL, 1);
+ e_mod_scrnconf_external_set_output (sc_output);
+
+ /* set the resolution of the external monitor */
+ _get_preferred_size (sc_output, &preferred_w, &preferred_h);
+ sc_res = e_mod_scrnconf_external_get_default_res (sc_output, preferred_w, preferred_h);
+ E_MOD_SCRNCONF_CHK_GOTO (sc_res != SC_EXT_RES_NULL, fail);
+ e_mod_scrnconf_external_set_res (sc_res);
+
+ /* set the default display mode of the external monitor */
+ if (e_devicemgr.default_dispmode == UTILX_SCRNCONF_DISPMODE_CLONE ||
+ e_devicemgr.default_dispmode == UTILX_SCRNCONF_DISPMODE_EXTENDED)
+ {
+
+ if (!e_mod_scrnconf_external_set_dispmode (sc_output, e_devicemgr.default_dispmode, sc_res))
+ {
+ e_mod_scrnconf_external_set_status (UTILX_SCRNCONF_STATUS_CONNECT);
+ /* generate dialog */
+ if (e_devicemgr.isPopUpEnabled)
+ e_mod_scrnconf_external_dialog_new (sc_output);
+ goto fail;
+ }
+
+ e_mod_scrnconf_external_set_status (UTILX_SCRNCONF_STATUS_ACTIVE);
+ }
+ else
+ {
+ e_mod_scrnconf_external_set_status (UTILX_SCRNCONF_STATUS_CONNECT);
+ }
+
+ /* generate dialog */
+ if (e_devicemgr.isPopUpEnabled)
+ e_mod_scrnconf_external_dialog_new (sc_output);
+
+ e_mod_scrnconf_external_send_current_status();
+ }
+ else if (event->connection == ECORE_X_RANDR_CONNECTION_STATUS_DISCONNECTED)
+ {
+ /* if display mode is set by the client message, ignore output disconnected */
+ if (e_mod_set_disp_clone)
+ return EINA_TRUE;
+
+ /* set the output of the external monitor */
+ sc_output = e_mod_scrnconf_external_get_output_from_xid (event->output);
+ E_MOD_SCRNCONF_CHK_RET (sc_output != SC_EXT_OUTPUT_NULL, 1);
+
+ e_mod_scrnconf_external_reset (sc_output);
+
+ e_mod_scrnconf_external_send_current_status();
+
+ /* if dialog is still showing, destroy dialog */
+ e_mod_scrnconf_external_dialog_free();
+
+ e_mod_scrnconf_container_bg_canvas_visible_set(EINA_FALSE);
+ }
+ else if (event->connection == ECORE_X_RANDR_CONNECTION_STATUS_UNKNOWN)
+ {
+ /* if dialog is still showing, destroy dialog */
+ e_mod_scrnconf_external_dialog_free();
+
+ if (e_devicemgr.default_dispmode == UTILX_SCRNCONF_DISPMODE_EXTENDED)
+ {
+ e_mod_scrnconf_container_bg_canvas_visible_set(EINA_TRUE);
+ }
+ }
+
+ }
+
+ return EINA_TRUE;
+
+fail:
+ e_mod_scrnconf_external_reset (sc_output);
+ return EINA_TRUE;
+}
+
+static int
+_e_devicemgr_cb_output_property (void *data, int type, void *ev)
+{
+ if (type == ECORE_X_EVENT_RANDR_OUTPUT_PROPERTY_NOTIFY)
+ {
+ //fprintf (stderr, "[scrn-conf]: Output Property Notify!: \n");
+ //Ecore_X_Event_Randr_Output_Property_Notify *event = (Ecore_X_Event_Randr_Output_Property_Notify *)ev;
+ /* available information:
+ struct _Ecore_X_Event_Randr_Output_Property_Notify
+ {
+ Ecore_X_Window win;
+ Ecore_X_Randr_Output output;
+ Ecore_X_Atom property;
+ Ecore_X_Time time;
+ Ecore_X_Randr_Property_Change state;
+ };
+ */
+ }
+
+ return EINA_TRUE;
+}
+
+static int
+_e_devicemgr_cb_client_message (void* data, int type, void* event)
+{
+ Ecore_X_Event_Client_Message* ev = event;
+ int req = 0;
+ int sc_dispmode = 0;
+ int sc_res = 0;
+ int sc_stat = 0;
+ int sc_output = 0;
+ int preferred_w = 0, preferred_h = 0;
+ int pos[2];
+ int cx, cy;
+ int x1, y1, x2, y2;
+ int w, h, px = 0, py = 0;
+ int vw, vh, pw = 0, ph = 0;
+ int region[5];
+ int pos_rootx, pos_rooty;
+
+ if (ev->message_type == e_devicemgr.atomVirtualTouchpadInt)
+ {
+ if (e_devicemgr.num_zones < 2)
+ {
+ ecore_x_client_message32_send(e_devicemgr.virtual_touchpad_window, e_devicemgr.atomVirtualTouchpadInt,
+ ECORE_X_EVENT_MASK_NONE, E_VIRTUAL_TOUCHPAD_SHUTDOWN, 0, 0, 0, 0);
+ return 1;
+ }
+
+ if (ev->data.l[0] == E_VIRTUAL_TOUCHPAD_NEED_TO_INIT)
+ {
+ ecore_x_client_message32_send(e_devicemgr.virtual_touchpad_window, e_devicemgr.atomVirtualTouchpadInt,
+ ECORE_X_EVENT_MASK_NONE, E_VIRTUAL_TOUCHPAD_DO_INIT, 0, 0, 0, 0);
+ }
+ else if (ev->data.l[0] == E_VIRTUAL_TOUCHPAD_AREA_INFO)
+ {
+ e_devicemgr.virtual_touchpad_area_info[0] = ev->data.l[1];
+ e_devicemgr.virtual_touchpad_area_info[1] = ev->data.l[2];
+ e_devicemgr.virtual_touchpad_area_info[2] = ev->data.l[3];
+ e_devicemgr.virtual_touchpad_area_info[3] = ev->data.l[4];
+ fprintf(stderr, "[e_devicemgr][cb_client_message] virtual_touchpad_area_info=%d %d %d %d\n",
+ e_devicemgr.virtual_touchpad_area_info[0], e_devicemgr.virtual_touchpad_area_info[1],
+ e_devicemgr.virtual_touchpad_area_info[2], e_devicemgr.virtual_touchpad_area_info[3]);
+ }
+ else if (ev->data.l[0] == E_VIRTUAL_TOUCHPAD_WINDOW)
+ {
+ e_devicemgr.virtual_touchpad_window = (Ecore_X_Window)ev->data.l[1];
+ fprintf(stderr, "[e_devicemgr][cb_client_message] virtual_touchpad_window=0x%x\n", e_devicemgr.virtual_touchpad_window);
+ }
+ else if (ev->data.l[0] == E_VIRTUAL_TOUCHPAD_CONFINE_SET)
+ {
+ _e_devicemgr_set_confine_information(e_devicemgr.virtual_touchpad_id, _e_devicemgr_get_nth_zone(2), EINA_TRUE, NULL, EINA_FALSE, EINA_TRUE);
+ fprintf(stderr, "[e_devicemgr][cb_client_message] E_VIRTUAL_TOUCHPAD_CONFINE_SET\n");
+ }
+ else if (ev->data.l[0] == E_VIRTUAL_TOUCHPAD_CONFINE_UNSET)
+ {
+ _e_devicemgr_set_confine_information(e_devicemgr.virtual_touchpad_id, NULL, EINA_FALSE, NULL, EINA_FALSE, EINA_FALSE);
+ fprintf(stderr, "[e_devicemgr][cb_client_message] E_VIRTUAL_TOUCHPAD_CONFINE_UNSET\n");
+ }
+ else if (ev->data.l[0] == E_VIRTUAL_TOUCHPAD_MT_BEGIN)
+ {
+ fprintf(stderr, "[e_devicemgr][cb_client_message] E_VIRTUAL_TOUCHPAD_MT_BEGIN !virtual_multitouch_done=%d\n", e_devicemgr.virtual_multitouch_done);
+
+ if (0 != e_devicemgr.virtual_touchpad_pointed_window)
+ {
+ XISetClientPointer(e_devicemgr.disp, e_devicemgr.virtual_touchpad_pointed_window, e_devicemgr.virtual_touchpad_id);
+ XSync(e_devicemgr.disp, 0);
+ ecore_x_pointer_xy_get(e_devicemgr.virtual_touchpad_pointed_window, &pos[0], &pos[1]);
+ fprintf(stderr, "[e_devicemgr][_cb_client_message] cursor pos x=%d, y=%d\n", pos[0], pos[1]);
+
+ if (pos[0] < 0 || pos[1] < 0 ) return 1;
+
+ e_devicemgr.virtual_multitouch_done = 0;
+
+ x1 = e_devicemgr.virtual_touchpad_pointed_window_info[0];
+ y1 = e_devicemgr.virtual_touchpad_pointed_window_info[1];
+ w = e_devicemgr.virtual_touchpad_pointed_window_info[2];
+ h = e_devicemgr.virtual_touchpad_pointed_window_info[3];
+
+ x2 = x1+w;
+ y2 = y1+h;
+ cx = x1 + pos[0];
+ cy = y1 + pos[1];
+
+ if (INSIDE(cx, cy, x1, y1, x1+(w/2), y1+(h/2)))
+ {
+ printf("[_client_message] 1st box (x1=%d, y1=%d, x2=%d, y2=%d)!\n", x1, y1, x1+(w/2), y1+(h/2));
+ pw = pos[0]*2;
+ ph = pos[1]*2;
+ px = x1;
+ py = y1;
+ printf("[_client_message] 1st box (effective area = %d, %d, %d, %d)!\n", px, py, pw, ph);
+ }
+ else if (INSIDE(cx, cy, x1+(w/2), y1, x2, y1+(h/2)))
+ {
+ printf("[_client_message] 2nd box (x1=%d, y1=%d, x2=%d, y2=%d)!\n", x1+(w/2), y1, x2, y1+(h/2));
+ pw = (w-pos[0])*2;
+ ph = pos[1]*2;
+ px = x2-pw;
+ py = y1;
+ printf("[_client_message] 2nd box (effective area = %d, %d, %d, %d)!\n", px, py, pw, ph);
+ }
+ else if (INSIDE(cx, cy, x1, y1+(h/2), x1+(w/2), y2))
+ {
+ printf("[_client_message] 3rd box (x1=%d, y1=%d, x2=%d, y2=%d)!\n", x1, y1+(h/2), x1+(w/2), y2);
+ pw = pos[0]*2;
+ ph = (h-pos[1])*2;
+ px = x1;
+ py = y2-ph;
+ printf("[_client_message] 3rd box (effective area = %d, %d, %d, %d)!\n", px, py, pw, ph);
+ }
+ else if (INSIDE(cx, cy, x1+(w/2), y1+(h/2), x2, y2))
+ {
+ printf("[_client_message] 4th box (x1=%d, y1=%d, x2=%d, y2=%d)!\n", x1+(w/2), y1+(h/2), x2, y2);
+ pw = (w-pos[0])*2;
+ ph = (h-pos[1])*2;
+ px = x2-pw;
+ py = y2-ph;
+ printf("[_client_message] 4th box (effective area = %d, %d, %d, %d)!\n", px, py, pw, ph);
+ }
+ else
+ {
+ printf("[_client_message] !!! pointer is not in 4 boxes !!!\n");
+ }
+
+ vw = e_devicemgr.virtual_touchpad_area_info[2] -e_devicemgr.virtual_touchpad_area_info[0];
+ vh = e_devicemgr.virtual_touchpad_area_info[3] -e_devicemgr.virtual_touchpad_area_info[1];
+
+ if (vw > pw) e_devicemgr.tmatrix[0] = (float)vw/pw;
+ else e_devicemgr.tmatrix[0] = (float)pw/vw;
+ if (vh > ph) e_devicemgr.tmatrix[4] = (float)vh/ph;
+ else e_devicemgr.tmatrix[4] = (float)ph/vh;
+
+ e_devicemgr.virtual_touchpad_cursor_pos[0] = pos[0];
+ e_devicemgr.virtual_touchpad_cursor_pos[1] = pos[1];
+ e_devicemgr.tmatrix[2] = (float)px*e_devicemgr.tmatrix[0]*(-1);
+ e_devicemgr.tmatrix[5] = (float)py*e_devicemgr.tmatrix[4]*(-1);
+ _e_devicemgr_update_input_transform_matrix(EINA_FALSE);
+
+ region[0] = e_devicemgr.virtual_touchpad_pointed_window_info[0] + 10;
+ region[1] = e_devicemgr.virtual_touchpad_pointed_window_info[1] + 10;
+ region[2] = e_devicemgr.virtual_touchpad_pointed_window_info[2] - 20;
+ region[3] = e_devicemgr.virtual_touchpad_pointed_window_info[3] - 20;
+ region[4] = 0;
+ _e_devicemgr_set_confine_information(e_devicemgr.virtual_touchpad_id, NULL, EINA_TRUE, ®ion[0], EINA_FALSE, EINA_TRUE);
+ ecore_x_client_message32_send(e_devicemgr.virtual_touchpad_window, e_devicemgr.atomVirtualTouchpadInt,
+ ECORE_X_EVENT_MASK_NONE, E_VIRTUAL_TOUCHPAD_MT_MATRIX_SET_DONE, 0, 0, 0, 0);
+ }
+ }
+ else if (ev->data.l[0] == E_VIRTUAL_TOUCHPAD_MT_END)
+ {
+ e_devicemgr.virtual_multitouch_done = 1;
+ fprintf(stderr, "[e_devicemgr][cb_client_message] E_VIRTUAL_TOUCHPAD_MT_END !virtual_multitouch_done=%d\n", e_devicemgr.virtual_multitouch_done);
+ if (0 != e_devicemgr.virtual_touchpad_pointed_window)
+ {
+ _e_devicemgr_set_confine_information(e_devicemgr.virtual_touchpad_id, NULL, EINA_FALSE, NULL, EINA_FALSE, EINA_FALSE);
+ //_e_devicemgr_set_confine_information(e_devicemgr.virtual_touchpad_id, _e_devicemgr_get_nth_zone(2), EINA_TRUE, NULL, EINA_FALSE);
+ if (e_devicemgr.virtual_touchpad_cursor_pos[0] >= 0 && e_devicemgr.virtual_touchpad_cursor_pos[1] >= 0)
+ {
+ pos_rootx = e_devicemgr.virtual_touchpad_cursor_pos[0] + e_devicemgr.virtual_touchpad_pointed_window_info[0];
+ pos_rooty = e_devicemgr.virtual_touchpad_cursor_pos[1] + e_devicemgr.virtual_touchpad_pointed_window_info[1];
+ ecore_x_pointer_warp(e_devicemgr.virtual_touchpad_pointed_window, e_devicemgr.virtual_touchpad_cursor_pos[0], e_devicemgr.virtual_touchpad_cursor_pos[1]);
+ e_devicemgr.virtual_touchpad_cursor_pos[0] = -1;
+ e_devicemgr.virtual_touchpad_cursor_pos[1] = -1;
+ }
+ }
+ }
+
+ return 1;
+ }
+
+ if (ev->message_type == e_devicemgr.atomScrnConfDispModeSet)
+ {
+ sc_dispmode = (int)ev->data.s[0];
+
+ sc_stat = e_mod_scrnconf_external_get_status();
+ if (sc_stat == UTILX_SCRNCONF_STATUS_NULL)
+ {
+ fprintf (stderr, "[DeviceMgr] : external monitor is not connected \n");
+ return 1;
+ }
+
+ if (sc_dispmode == e_mod_scrnconf_external_get_dispmode())
+ {
+ fprintf (stderr, "[DeviceMgr] : the same dispmode is already set \n");
+ return 1;
+ }
+
+ sc_output = e_mod_scrnconf_external_get_output();
+ E_MOD_SCRNCONF_CHK_RET(sc_output != SC_EXT_OUTPUT_NULL, 1);
+
+ _get_preferred_size (sc_output, &preferred_w, &preferred_h);
+ sc_res = e_mod_scrnconf_external_get_default_res (sc_output, preferred_w, preferred_h);
+ E_MOD_SCRNCONF_CHK_RET(sc_res != SC_EXT_RES_NULL, 1);
+
+ if (!e_mod_scrnconf_external_set_dispmode (sc_output, sc_dispmode, sc_res))
+ {
+ fprintf (stderr, "[DeviceMgr] : fail to get external output \n");
+ return 1;
+ }
+
+ e_mod_scrnconf_external_set_status (UTILX_SCRNCONF_STATUS_ACTIVE);
+ e_mod_scrnconf_external_send_current_status();
+
+ /* if disp_mode is set by the client message, set clone flag for preventing
+ the output disconnect/connect */
+ if (sc_dispmode == UTILX_SCRNCONF_DISPMODE_CLONE)
+ e_mod_set_disp_clone = EINA_TRUE;
+ }
+ else if (ev->message_type == e_devicemgr.atomVirtMonReq)
+ {
+ req = (int)ev->data.s[0];
+ e_devicemgr.virtual_preferred_w = (int)ev->data.s[1];
+ e_devicemgr.virtual_preferred_h = (int)ev->data.s[2];
+
+ /* deal with edid data */
+ e_mod_drv_virt_mon_set (req);
+ }
+ else if (ev->message_type == e_devicemgr.atomHibReq)
+ {
+ req = (int)ev->data.s[0];
+ }
+ else if (ev->message_type == e_devicemgr.atomDevMgrCfg)
+ {
+ Eina_Bool set_popup = EINA_FALSE;
+ req = (int)ev->data.s[0];
+ if (req == DEVICEMGR_CFG_POPUP)
+ {
+ set_popup = (Eina_Bool)ev->data.s[1];
+ e_devicemgr.isPopUpEnabled = set_popup;
+ _e_devicemgr_cfg->ScrnConf.isPopUpEnabled = set_popup;
+ }
+ else if (req == DEVICEMGR_CFG_DEFAULT_DISPMODE)
+ {
+ sc_dispmode = (int)ev->data.s[1];
+ e_devicemgr.default_dispmode = sc_dispmode;
+ _e_devicemgr_cfg->ScrnConf.default_dispmode = sc_dispmode;
+ }
+ else
+ {
+ return 1;
+ }
+
+ /* update deivcemgr configuration */
+ _e_devicemgr_update_configuration();
+ }
+ else
+ {
+ ;
+ }
+
+ return 1;
+}
+
+static int
+_e_devicemgr_xinput_init(void)
+{
+ int event, error;
+ int major = 2, minor = 0;
+
+ if (!XQueryExtension(e_devicemgr.disp, "XInputExtension", &e_devicemgr.xi2_opcode, &event, &error))
+ {
+ printf("[e_devicemgr][%s] XInput Extension isn't supported.\n", __FUNCTION__);
+ goto fail;
+ }
+
+ if (XIQueryVersion(e_devicemgr.disp, &major, &minor) == BadRequest)
+ {
+ printf("[e_devicemgr][%s] Failed to query XI version.\n", __FUNCTION__);
+ goto fail;
+ }
+
+ memset(&e_devicemgr.eventmask, 0L, sizeof(XIEventMask));
+ e_devicemgr.eventmask.deviceid = XIAllDevices;
+ e_devicemgr.eventmask.mask_len = XIMaskLen(XI_RawMotion);
+ e_devicemgr.eventmask.mask = calloc(e_devicemgr.eventmask.mask_len, sizeof(char));
+
+ /* Events we want to listen for all */
+ XISetMask(e_devicemgr.eventmask.mask, XI_DeviceChanged);
+ XISetMask(e_devicemgr.eventmask.mask, XI_HierarchyChanged);
+ XISelectEvents(e_devicemgr.disp, e_devicemgr.rootWin, &e_devicemgr.eventmask, 1);
+
+ return 1;
+
+fail:
+ e_devicemgr.xi2_opcode = -1;
+ return 0;
+}
+
+static int
+_e_devicemgr_xkb_init(void)
+{
+ int xkb_opcode, xkb_event, xkb_error;
+ int xkb_lmaj = XkbMajorVersion;
+ int xkb_lmin = XkbMinorVersion;
+
+ if (!(XkbLibraryVersion(&xkb_lmaj, &xkb_lmin)
+ && XkbQueryExtension(e_devicemgr.disp, &xkb_opcode, &xkb_event, &xkb_error, &xkb_lmaj, &xkb_lmin)))
+ {
+ fprintf(stderr, "[e_devicemgr][xkb_init] Failed to initialize XKB extension !\n");
+ e_devicemgr.xkb_available = EINA_FALSE;
+ return 0;
+ }
+
+ e_devicemgr.xkb_available = EINA_TRUE;
+ return 1;
+}
+
+static int
+_e_devicemgr_cb_window_property(void *data, int ev_type, void *ev)
+{
+ int res;
+ unsigned int ret_val = 0;
+ Ecore_X_Event_Window_Property *e = ev;
+
+ if (e->atom == e_devicemgr.atomDeviceList && e->win == e_devicemgr.rootWin)
+ {
+ res = ecore_x_window_prop_card32_get(e->win, e_devicemgr.atomDeviceList, &ret_val, 1);
+
+ if (res == 1) _e_devicemgr_show_device_list(ret_val);
+ goto out;
+ }
+
+ if (e->atom == e_devicemgr.atomVirtualTouchpad && e->win == e_devicemgr.rootWin)
+ {
+ res = ecore_x_window_prop_card32_get(e->win, e_devicemgr.atomVirtualTouchpad, &ret_val, 1);
+
+ if (res == 1 && e_devicemgr.virtual_touchpad_id > 0)
+ {
+ ecore_x_client_message32_send(e_devicemgr.virtual_touchpad_window, e_devicemgr.atomVirtualTouchpadInt,
+ ECORE_X_EVENT_MASK_NONE, E_VIRTUAL_TOUCHPAD_SHUTDOWN, 0, 0, 0, 0);
+ }
+ goto out;
+ }
+
+out:
+ return 1;
+}
+
+static int
+_e_devicemgr_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 != e_devicemgr.xi2_opcode)
+ {
+ fprintf(stderr, "[e_devicemgr][%s] Invalid event !(extension:%d, evtype:%d)\n", __FUNCTION__, e->extension, e->evtype);
+ return 1;
+ }
+
+ if (!evData || evData->send_event)
+ {
+ fprintf(stderr, "[e_devicemgr][%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_devicemgr_xi2_device_hierarchy_handler((XIHierarchyEvent *)evData);
+ break;
+
+ case XI_DeviceChanged:
+ _e_devicemgr_xi2_device_changed_handler((XIDeviceChangedEvent *)evData);
+ break;
+ }
+
+ return 1;
+}
+
+static int
+_e_devicemgr_cb_zone_add(void *data, int ev_type, void *event)
+{
+ E_Event_Zone_Add *ev;
+ E_Zone *zone;
+ Eina_List *l;
+
+ ev = event;
+ zone = ev->zone;
+ if (!zone || !zone->name) return 1;
+
+ l = eina_list_data_find_list(e_devicemgr.zones, zone);
+ if (l)
+ {
+ fprintf(stderr, "[e_devicemgr][zone_add] zone exists already in zone list !\n");
+ return 1;
+ }
+
+ fprintf(stderr, "[e_devicemgr][zone_add] z->name=%s, z->w=%d, z->h=%d, z->x=%d, z->y=%d\n",
+ zone->name, zone->w, zone->h, zone->x, zone->y);
+ fprintf(stderr, "[e_devicemgr][zone_add] z->useful_geometry.w=%d, z->useful_geometry.h=%d, z->useful_geometry.x=%d, z->useful_geometry.y=%d\n",
+ zone->useful_geometry.w, zone->useful_geometry.h, zone->useful_geometry.x, zone->useful_geometry.y);
+
+ e_devicemgr.zones = eina_list_append(e_devicemgr.zones, zone);
+ e_devicemgr.num_zones++;
+
+ fprintf(stderr, "[e_devicemgr][zone_add] num_zones=%d\n", e_devicemgr.num_zones);
+
+ return 1;
+}
+
+static int
+_e_devicemgr_cb_zone_del(void *data, int ev_type, void *event)
+{
+ E_Event_Zone_Del *ev;
+ E_Zone *zone;
+ Eina_List *l;
+
+ ev = event;
+ zone = ev->zone;
+ if (!zone || !zone->name) return 1;
+
+ fprintf(stderr, "[e_devicemgr][zone_del] z->name=%s, z->w=%d, z->h=%d, z->x=%d, z->y=%d\n",
+ zone->name, zone->w, zone->h, zone->x, zone->y);
+ fprintf(stderr, "[e_devicemgr][zone_del] z->useful_geometry.w=%d, z->useful_geometry.h=%d, z->useful_geometry.x=%d, z->useful_geometry.y=%d\n",
+ zone->useful_geometry.w, zone->useful_geometry.h, zone->useful_geometry.x, zone->useful_geometry.y);
+
+ if (e_devicemgr.num_zones < 2)//basic zone + additional zone(s)
+ {
+ fprintf(stderr, "[e_devicemgr][zone_del] Zone list needs to be checked into !\n");
+ return 1;
+ }
+
+ l = eina_list_data_find_list(e_devicemgr.zones, zone);
+ if (!l)
+ {
+ fprintf(stderr, "[e_devicemgr][zone_del] zone doesn't exist in zone list !\n");
+ return 1;
+ }
+
+ if (e_devicemgr.num_zones == 2 && e_devicemgr.virtual_touchpad_id > 0)
+ {
+ ecore_x_client_message32_send(e_devicemgr.virtual_touchpad_window, e_devicemgr.atomVirtualTouchpadInt,
+ ECORE_X_EVENT_MASK_NONE, E_VIRTUAL_TOUCHPAD_SHUTDOWN, 0, 0, 0, 0);
+ }
+
+ e_devicemgr.zones = eina_list_remove(e_devicemgr.zones, zone);
+ e_devicemgr.num_zones--;
+
+ fprintf(stderr, "[e_devicemgr][zone_del] num_zones=%d\n", e_devicemgr.num_zones);
+
+ return 1;
+}
+
+static void
+_e_devicemgr_hook_border_resize_end(void *data, void *border)
+{
+ E_Border *bd = (E_Border *)border;
+ if (!bd) return;
+
+ e_devicemgr.virtual_touchpad_pointed_window_info[0] = bd->x + bd->client_inset.l;
+ e_devicemgr.virtual_touchpad_pointed_window_info[1] = bd->y + bd->client_inset.t;
+ e_devicemgr.virtual_touchpad_pointed_window_info[2] = bd->client.w;
+ e_devicemgr.virtual_touchpad_pointed_window_info[3] = bd->client.h;
+
+ fprintf(stderr, "[e_devicemgr][hook_border_resize_end] application win=0x%x, px=%d, py=%d, pw=%d, ph=%d\n", bd->client.win,
+ e_devicemgr.virtual_touchpad_pointed_window_info[0], e_devicemgr.virtual_touchpad_pointed_window_info[1],
+ e_devicemgr.virtual_touchpad_pointed_window_info[2], e_devicemgr.virtual_touchpad_pointed_window_info[3]);
+}
+
+static void
+_e_devicemgr_hook_border_move_end(void *data, void *border)
+{
+ E_Border *bd = (E_Border *)border;
+ if (!bd) return;
+
+ e_devicemgr.virtual_touchpad_pointed_window_info[0] = bd->x + bd->client_inset.l;
+ e_devicemgr.virtual_touchpad_pointed_window_info[1] = bd->y + bd->client_inset.t;
+ e_devicemgr.virtual_touchpad_pointed_window_info[2] = bd->client.w;
+ e_devicemgr.virtual_touchpad_pointed_window_info[3] = bd->client.h;
+
+ fprintf(stderr, "[e_devicemgr][hook_border_move_end] application win=0x%x, px=%d, py=%d, pw=%d, ph=%d\n", bd->client.win,
+ e_devicemgr.virtual_touchpad_pointed_window_info[0], e_devicemgr.virtual_touchpad_pointed_window_info[1],
+ e_devicemgr.virtual_touchpad_pointed_window_info[2], e_devicemgr.virtual_touchpad_pointed_window_info[3]);
+}
+
+static Eina_Bool
+_e_devicemgr_cb_mouse_in(void *data, int type, void *event)
+{
+ int px, py;
+ int pw, ph;
+ int vw, vh;
+ E_Border *bd;
+ unsigned int val = 0;
+ Ecore_X_Event_Mouse_In *ev = event;
+
+ if (!e_devicemgr.virtual_multitouch_done) return ECORE_CALLBACK_PASS_ON;
+
+ bd = e_border_find_by_window(ev->event_win);
+ if (!bd)
+ {
+ if (e_devicemgr.rootWin == ecore_x_window_parent_get(ev->event_win))
+ {
+
+ if (!e_devicemgr.virtual_multitouch_done && e_devicemgr.virtual_touchpad_pointed_window != 0)
+ return ECORE_CALLBACK_PASS_ON;
+
+ //fprintf(stderr, "[e_devicemgr][cb_mouse_in] bd is null but enlightenment window ! (ev->event_win=0x%x)\n", ev->event_win);
+ e_devicemgr.virtual_touchpad_pointed_window = 0;
+ ecore_x_client_message32_send(e_devicemgr.virtual_touchpad_window, e_devicemgr.atomVirtualTouchpadInt,
+ ECORE_X_EVENT_MASK_NONE, E_VIRTUAL_TOUCHPAD_POINTED_WINDOW, 0, 0, 0, 0);
+ _e_devicemgr_update_input_transform_matrix(EINA_TRUE/* reset */);
+ return ECORE_CALLBACK_PASS_ON;
+ }
+
+ //fprintf(stderr, "[e_devicemgr][cb_mouse_in] bd is null ! (ev->event_win=0x%x)\n", ev->event_win);
+ return ECORE_CALLBACK_PASS_ON;
+ }
+
+ if (bd->zone->id == 0)
+ {
+ //fprintf(stderr, "[e_devicemgr][cb_mouse_in] zone->id=%d (ev->event_win=0x%x)\n", bd->zone->id, ev->event_win);
+ return ECORE_CALLBACK_PASS_ON;
+ }
+
+ //fprintf(stderr, "[e_devicemgr][cb_mouse_in] bd zone->id=%d, win=0x%x, x=%d, y=%d, w=%d, h=%d\n", bd->zone->id, bd->win, bd->x, bd->y, bd->w, bd->h);
+ //fprintf(stderr, "[e_devicemgr][cb_mouse_in] bd->client win=0x%x, x=%d, y=%d, w=%d, h=%d\n", bd->client.win, bd->client.x, bd->client.y, bd->client.w, bd->client.h);
+
+ e_devicemgr.virtual_touchpad_pointed_window_info[0] = bd->x + bd->client_inset.l;
+ e_devicemgr.virtual_touchpad_pointed_window_info[1] = bd->y + bd->client_inset.t;
+ e_devicemgr.virtual_touchpad_pointed_window_info[2] = bd->client.w;
+ e_devicemgr.virtual_touchpad_pointed_window_info[3] = bd->client.h;
+ e_devicemgr.virtual_touchpad_pointed_window = bd->client.win;
+
+ fprintf(stderr, "[e_devicemgr][cb_mouse_in] application win=0x%x, px=%d, py=%d, pw=%d, ph=%d\n", bd->client.win,
+ e_devicemgr.virtual_touchpad_pointed_window_info[0], e_devicemgr.virtual_touchpad_pointed_window_info[1],
+ e_devicemgr.virtual_touchpad_pointed_window_info[2], e_devicemgr.virtual_touchpad_pointed_window_info[3]);
+ ecore_x_client_message32_send(e_devicemgr.virtual_touchpad_window, e_devicemgr.atomVirtualTouchpadInt,
+ ECORE_X_EVENT_MASK_NONE, E_VIRTUAL_TOUCHPAD_POINTED_WINDOW,
+ e_devicemgr.virtual_touchpad_pointed_window, 0, 0, 0);
+
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+static Eina_Bool
+_e_devicemgr_get_zones(void)
+{
+ Eina_List *ml;
+ E_Manager *man;
+
+ if (e_devicemgr.zones)
+ return EINA_FALSE;
+
+ 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)
+ {
+ fprintf(stderr, "[e_devicemgr][_e_devicemgr_get_zones] z->name=%s, z->w=%d, z->h=%d, z->x=%d, z->y=%d\n",
+ z->name, z->w, z->h, z->x, z->y);
+ fprintf(stderr, "[e_devicemgr][_e_devicemgr_get_zones] z->useful_geometry.w=%d, z->useful_geometry.h=%d, z->useful_geometry.x=%d, z->useful_geometry.y=%d\n",
+ z->useful_geometry.w, z->useful_geometry.h, z->useful_geometry.x, z->useful_geometry.y);
+ e_devicemgr.zones = eina_list_append(e_devicemgr.zones, z);
+ e_devicemgr.num_zones++;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return (e_devicemgr.zones) ? EINA_TRUE : EINA_FALSE;
+}
+
+static int
+_e_devicemgr_marshalize_string (char* buf, int num, char* srcs[])
+{
+ int i;
+ char * p = buf;
+
+ for (i=0; i<num; i++)
+ {
+ p += sprintf (p, srcs[i]);
+ *p = '\0';
+ p++;
+ }
+
+ *p = '\0';
+ p++;
+
+ return (p - buf);
+}
+
+static void
+_e_devicemgr_init_output(void)
+{
+ int i;
+ XRROutputInfo *output_info = NULL;
+
+
+ XRRScreenResources* res = XRRGetScreenResources (e_devicemgr.disp, e_devicemgr.rootWin);
+ e_devicemgr.output = 0;
+
+ if (res && (res->noutput != 0))
+ {
+ for ( i = 0 ; i <res->noutput ; i++ )
+ {
+ output_info = XRRGetOutputInfo(e_devicemgr.disp, res, res->outputs[i]);
+ if (output_info && output_info->name && !strncmp(output_info->name, "LVDS1", 5))
+ {
+ e_devicemgr.output = res->outputs[i];
+ fprintf(stderr, "[e_devicemgr][_e_devicemgr_init_output] LVDS1 was found !\n");
+ XRRFreeOutputInfo(output_info);
+ break;
+ }
+ else
+ {
+ e_devicemgr.output = res->outputs[i];
+ fprintf(stderr, "[e_devicemgr][_e_devicemgr_init_output] LVDS1 was not found yet !\n");
+ }
+
+ if (output_info) XRRFreeOutputInfo(output_info);
+ }
+ }
+
+ if (!e_devicemgr.output)
+ {
+ fprintf(stderr, "[e_devicemgr][_e_devicemgr_init_output] Failed to init output !\n");
+ }
+}
+
+static void
+_e_devicemgr_init_transform_matrix(void)
+{
+ memset(e_devicemgr.tmatrix, 0, sizeof(e_devicemgr.tmatrix));
+
+ e_devicemgr.tmatrix[8] = 1.0f;
+ e_devicemgr.tmatrix[0] = 1.0f;
+ e_devicemgr.tmatrix[4] = 1.0f;
+}
+
+static void
+_e_devicemgr_init_input(void)
+{
+ int i;
+ int ndevices;
+ XIDeviceInfo *dev, *info = NULL;
+ DeviceMgr_Device_Info *data = NULL;
+
+ if (e_devicemgr.xi2_opcode < 0)
+ {
+ fprintf(stderr, "[e_devicemgr][%s] Failed to initialize input !\n", __FUNCTION__);
+ return;
+ }
+
+ info = XIQueryDevice(e_devicemgr.disp, XIAllDevices, &ndevices);
+
+ if (!info)
+ {
+ fprintf(stderr, "[e_devicemgr][%s] There is no queried XI device.\n", __FUNCTION__);
+ return;
+ }
+
+ for (i = 0; i < ndevices ; i++)
+ {
+ dev = &info[i];
+
+ switch (dev->use)
+ {
+ case XISlavePointer:
+ if (strcasestr(dev->name, "Virtual core XTEST pointer"))
+ {
+ e_devicemgr.vcp_xtest_pointer_id = dev->deviceid;
+ continue;
+ }
+ if (strcasestr(dev->name, "XTEST")) continue;
+ if (strcasestr(dev->name, "keyboard")) goto handle_keyboard;
+
+ data = malloc(sizeof(DeviceMgr_Device_Info));
+
+ if (!data)
+ {
+ fprintf(stderr, "[e_devicemgr][%s] Failed to allocate memory for device info !\n", __FUNCTION__);
+ goto out;
+ }
+
+ data->id = dev->deviceid;
+ data->name = eina_stringshare_add(dev->name);
+ if (1==_e_devicemgr_check_device_type(dev->deviceid, E_DEVICEMGR_TOUCHSCREEN, dev->name))
+ {
+ //Now we have a touchscreen device.
+ data->type = E_DEVICEMGR_TOUCHSCREEN;
+ e_devicemgr.device_list = eina_list_append(e_devicemgr.device_list, data);
+ e_devicemgr.num_touchscreen_devices++;
+ fprintf(stderr, "[e_devicemgr][%s] Slave touchscreen device (id=%d, name=%s, num_touchscreen_devices=%d) was added/enabled !\n",
+ __FUNCTION__, dev->deviceid, dev->name, e_devicemgr.num_touchscreen_devices);
+ }
+ else
+ {
+ //Now we have a mouse.
+ data->type = E_DEVICEMGR_MOUSE;
+ e_devicemgr.device_list = eina_list_append(e_devicemgr.device_list, data);
+ e_devicemgr.num_pointer_devices++;
+
+ if (1==e_devicemgr.num_pointer_devices) _e_devicemgr_set_mouse_exist(1, 1);
+ fprintf(stderr, "[e_devicemgr][%s] Slave pointer device (id=%d, name=%s, num_pointer_devices=%d) was added/enabled !\n",
+ __FUNCTION__, dev->deviceid, dev->name, e_devicemgr.num_pointer_devices);
+ }
+ break;
+
+ case XISlaveKeyboard:
+ if (strcasestr(dev->name, "Virtual core XTEST keyboard"))
+ {
+ e_devicemgr.vck_xtest_keyboard_id = dev->deviceid;
+ continue;
+ }
+
+ if (strcasestr(dev->name, "XTEST")) continue;
+handle_keyboard:
+ data = malloc(sizeof(DeviceMgr_Device_Info));
+
+ if (!data)
+ {
+ fprintf(stderr, "[e_devicemgr][%s] Failed to allocate memory for device info !\n", __FUNCTION__);
+ goto out;
+ }
+
+ if (strcasestr(dev->name, "keyboard") && !strcasestr(dev->name, "XTEST" ))//keyboard
+ {
+ //Now we have a keyboard device
+ data->id = dev->deviceid;
+ data->name = eina_stringshare_add(dev->name);
+ data->type = E_DEVICEMGR_KEYBOARD;
+
+ e_devicemgr.device_list = eina_list_append(e_devicemgr.device_list, data);
+ e_devicemgr.num_keyboard_devices++;
+ _e_devicemgr_lockmodifier_set();
+
+ if (e_devicemgr.num_keyboard_devices >= 1)
+ {
+ _e_devicemgr_set_keyboard_exist((unsigned int)e_devicemgr.num_keyboard_devices, 1);
+ }
+
+ fprintf(stderr, "[e_devicemgr][%s] Slave keyboard device (id=%d, name=%s, num_keyboard_devices=%d) was added/enabled !\n",
+ __FUNCTION__, dev->deviceid, dev->name, e_devicemgr.num_keyboard_devices);
+ }
+ else//HW key
+ {
+ data->type = E_DEVICEMGR_HWKEY;
+ data->id = dev->deviceid;
+ data->name = eina_stringshare_add(dev->name);
+
+ e_devicemgr.device_list = eina_list_append(e_devicemgr.device_list, data);
+ e_devicemgr.num_hwkey_devices++;
+ }
+ break;
+
+ case XIFloatingSlave:
+ break;
+
+ case XIMasterPointer:
+ fprintf(stderr, "[e_devicemgr][%s] XIMasterPointer (VCP) (id=%d, name=%s)\n", __FUNCTION__, dev->deviceid, dev->name);
+ e_devicemgr.vcp_id = dev->deviceid;
+ break;
+
+ case XIMasterKeyboard:
+ fprintf(stderr, "[e_devicemgr][%s] XIMasterKeyboard (VCK) (id=%d, name=%s)\n", __FUNCTION__, dev->deviceid, dev->name);
+ e_devicemgr.vck_id = dev->deviceid;
+ break;
+ }
+ }
+
+out:
+ XIFreeDeviceInfo(info);
+}
+
+static void
+_e_devicemgr_xi2_device_changed_handler(XIDeviceChangedEvent *event)
+{
+ if (event->reason == XISlaveSwitch)
+ {
+ //fprintf(stderr, "[e_devicemgr][device_change_handler] XISlaveSwitch (deviceid:%d, sourceid:%d) !\n", event->deviceid, event->sourceid);
+ _e_devicemgr_slave_switched(event->deviceid, event->sourceid);
+ }
+ else if (event->reason == XIDeviceChange)
+ {
+ //fprintf(stderr, "[e_devicemgr][device_change_handler] XIDeviceChange (deviceid:%d, sourceid:%d) !\n", event->deviceid, event->sourceid);
+ _e_devicemgr_device_changed(event->deviceid, event->sourceid);
+ }
+}
+
+static void
+_e_devicemgr_xi2_device_hierarchy_handler(XIHierarchyEvent *event)
+{
+ int i;
+
+ if (event->flags & XIMasterAdded || event->flags & XIMasterRemoved)
+ {
+ //fprintf(stderr, "[e_devicemgr][hierarchy_handler] XIMasterAdded or XIMasterRemoved !\n");
+ for( i = 0 ; i < event->num_info ; i++ )
+ {
+ if (event->info[i].flags & XIMasterAdded)
+ {
+ //fprintf(stderr, "[e_devicemgr][hierarchy_handler] XIMasterAdded ! (id=%d, use=%d)\n", event->info[i].deviceid, event->info[i].use);
+ _e_devicemgr_master_pointer_added(event->info[i].deviceid);
+ }
+ else if (event->info[i].flags & XIMasterRemoved)
+ {
+ //fprintf(stderr, "[e_devicemgr][hierarchy_handler] XIMasterRemoved ! (id=%d, use=%d)\n", event->info[i].deviceid, event->info[i].use);
+ _e_devicemgr_master_pointer_removed(event->info[i].deviceid);
+ }
+ }
+ }
+
+ if (event->flags & XIDeviceEnabled || event->flags & XIDeviceDisabled)
+ {
+ //fprintf(stderr, "[e_devicemgr][hierarchy_handler] XIDeviceEnabled or XIDeviceDisabled !\n");
+ for( i = 0 ; i < event->num_info ; i++ )
+ {
+ if (event->info[i].flags & XIDeviceEnabled)
+ {
+ //fprintf(stderr, "[e_devicemgr][hierarchy_handler] XIDeviceEnabled ! (id=%d, use=%d)\n", event->info[i].deviceid, event->info[i].use);
+ _e_devicemgr_device_enabled(event->info[i].deviceid, event->info[i].use);
+ }
+ else if (event->info[i].flags & XIDeviceDisabled)
+ {
+ //fprintf(stderr, "[e_devicemgr][hierarchy_handler] XIDeviceDisabled ! (id=%d, use=%d)\n", event->info[i].deviceid, event->info[i].use);
+ _e_devicemgr_device_disabled(event->info[i].deviceid, event->info[i].use);
+ }
+ }
+ }
+}
+
+static int
+_e_devicemgr_check_device_type(int deviceid, DeviceMgrDeviceType type, const char* devname)
+{
+ char *tmp = NULL;
+ Atom act_type;
+ unsigned long nitems, bytes_after;
+ unsigned char *data, *ptr;
+ int j, act_format, ret = 0;
+
+ if (type != E_DEVICEMGR_TOUCHSCREEN && type != E_DEVICEMGR_MOUSE) return 0;
+
+ if (XIGetProperty(e_devicemgr.disp, deviceid, e_devicemgr.atomAxisLabels, 0, 1000, False,
+ XA_ATOM, &act_type, &act_format,
+ &nitems, &bytes_after, &data) != Success)
+ {
+ fprintf(stderr, "[e_devicemgr][check_device_type] Failed to get XI2 device property !(deviceid=%d)\n", deviceid);
+ goto out;
+ }
+
+ if (!nitems) goto out;
+
+ ptr = data;
+
+ for (j = 0; j < nitems; j++)
+ {
+ switch(act_type)
+ {
+ case XA_ATOM:
+ {
+ Ecore_X_Atom atomTemp = *(Ecore_X_Atom*)ptr;
+ if (!atomTemp) goto out;
+
+ tmp = ecore_x_atom_name_get(atomTemp);
+ if ((type == E_DEVICEMGR_TOUCHSCREEN) && (strcasestr(tmp, "Abs X") || strcasestr(tmp, "Abs MT Position X")) && !strcasestr(devname, "maru"))
+ {
+ ret = 1;
+ goto out;
+ }
+ else if (type == E_DEVICEMGR_MOUSE && strcasestr(tmp, "Rel X"))
+ {
+ ret = 1;
+ goto out;
+ }
+ }
+ break;
+ }
+
+ ptr += act_format/8;
+ }
+
+out:
+ if (data) XFree(data);
+ if (tmp) free(tmp);
+
+ return ret;
+}
+
+static void
+_e_devicemgr_device_enabled(int id, int type)
+{
+ int ndevices;
+ XIDeviceInfo *info = NULL;
+ DeviceMgr_Device_Info *data = NULL;
+
+ info = XIQueryDevice(e_devicemgr.disp, id, &ndevices);
+
+ if (!info || ndevices <= 0)
+ {
+ fprintf(stderr, "[e_devicemgr][%s] There is no queried XI device. (device id=%d, type=%d)\n", __FUNCTION__, id, type);
+ goto out;
+ }
+
+ switch(info->use)
+ {
+ case XISlavePointer:
+ if (strcasestr(info->name, "XTEST")) goto out;
+ if (strcasestr(info->name, "keyboard")) goto handle_keyboard;
+
+ data = malloc(sizeof(DeviceMgr_Device_Info));
+
+ if (!data)
+ {
+ fprintf(stderr, "[e_devicemgr][%s] Failed to allocate memory for device info !\n", __FUNCTION__);
+ goto out;
+ }
+
+ data->id = id;
+ data->name = eina_stringshare_add(info->name);
+
+ if (1==_e_devicemgr_check_device_type(id, E_DEVICEMGR_TOUCHSCREEN, info->name))
+ {
+ //Now we have a touchscreen device.
+ data->type = E_DEVICEMGR_TOUCHSCREEN;
+ if (strcasestr(data->name, "virtual") && strcasestr(data->name, "multitouch"))
+ {
+ _e_devicemgr_virtual_multitouch_helper_init(id);
+ }
+ e_devicemgr.device_list = eina_list_append(e_devicemgr.device_list, data);
+ e_devicemgr.num_touchscreen_devices++;
+ fprintf(stderr, "[e_devicemgr][%s] Slave touchscreen device (id=%d, name=%s, num_touchscreen_devices=%d) was added/enabled !\n",
+ __FUNCTION__, id, info->name, e_devicemgr.num_touchscreen_devices);
+ }
+ else
+ {
+ //Now we have a mouse.
+ data->type = E_DEVICEMGR_MOUSE;
+ e_devicemgr.device_list = eina_list_append(e_devicemgr.device_list, data);
+ e_devicemgr.num_pointer_devices++;
+ if (1==e_devicemgr.num_pointer_devices) _e_devicemgr_set_mouse_exist(1, 1);
+ fprintf(stderr, "[e_devicemgr][%s] Slave pointer device (id=%d, name=%s, num_pointer_devices=%d) was added/enabled !\n",
+ __FUNCTION__, id, info->name, e_devicemgr.num_pointer_devices);
+ if (strcasestr(info->name, E_VIRTUAL_TOUCHPAD_NAME))
+ {
+ e_devicemgr.virtual_touchpad_id = id;
+ _e_devicemgr_virtual_touchpad_helper_enable(EINA_TRUE);
+ }
+ }
+ break;
+
+ case XISlaveKeyboard:
+ if (strcasestr(info->name, "XTEST")) goto out;
+handle_keyboard:
+ data = malloc(sizeof(DeviceMgr_Device_Info));
+
+ if (!data)
+ {
+ fprintf(stderr, "[e_devicemgr][%s] Failed to allocate memory for device info !\n", __FUNCTION__);
+ goto out;
+ }
+
+ if (strcasestr(info->name, "keyboard"))//keyboard
+ {
+ //Now we have a keyboard device.
+ data->id = id;
+ data->name = eina_stringshare_add(info->name);
+ data->type = E_DEVICEMGR_KEYBOARD;
+
+ e_devicemgr.device_list = eina_list_append(e_devicemgr.device_list, data);
+ e_devicemgr.num_keyboard_devices++;
+
+ if (e_devicemgr.num_keyboard_devices >= 1)
+ _e_devicemgr_set_keyboard_exist((unsigned int)e_devicemgr.num_keyboard_devices, 1);
+
+ fprintf(stderr, "[e_devicemgr][%s] Slave keyboard device (id=%d, name=%s, num_keyboard_devices=%d) was added/enabled !\n",
+ __FUNCTION__, id, info->name, e_devicemgr.num_keyboard_devices);
+ }
+ else//HW key
+ {
+ data->type = E_DEVICEMGR_HWKEY;
+ data->id = id;
+ data->name = eina_stringshare_add(info->name);
+
+ e_devicemgr.device_list = eina_list_append(e_devicemgr.device_list, data);
+ e_devicemgr.num_hwkey_devices++;
+ }
+
+ _e_devicemgr_lockmodifier_set();
+ break;
+
+ case XIFloatingSlave:
+ if (1 == _e_devicemgr_check_device_type(id, E_DEVICEMGR_TOUCHSCREEN, info->name))
+ {
+ //Now we have a floating touchscreen device.
+ if (strcasestr(info->name, "virtual") && strcasestr(info->name, "multitouch"))
+ {
+ _e_devicemgr_virtual_multitouch_helper_init(id);
+ }
+ fprintf(stderr, "[e_devicemgr][%s] FloatingSlave touchscreen device (id=%d, name=%s) was added/enabled !\n",
+ __FUNCTION__, id, info->name);
+ }
+ break;
+ }
+
+out:
+ if (info) XIFreeDeviceInfo(info);
+}
+
+static void
+_e_devicemgr_device_disabled(int id, int type)
+{
+ Eina_List* l;
+ DeviceMgr_Device_Info *data;
+
+ if (!e_devicemgr.device_list)
+ {
+ fprintf(stderr, "[e_devicemgr][%s] device list is empty ! something's wrong ! (id=%d, type=%d)\n", __FUNCTION__, id, type);
+ goto out;
+ }
+
+ EINA_LIST_FOREACH(e_devicemgr.device_list, l, data)
+ {
+ if (data && data->id == id)
+ {
+ switch( data->type )
+ {
+ case E_DEVICEMGR_HWKEY:
+ e_devicemgr.num_hwkey_devices--;
+ fprintf(stderr, "[e_devicemgr][%s] Slave H/W key device (id=%d, name=%s, type=%d) was removed/disabled !\n",
+ __FUNCTION__, id, data->name, type);
+
+ e_devicemgr.device_list = eina_list_remove(e_devicemgr.device_list, data);
+ free(data);
+ goto out;
+
+ case E_DEVICEMGR_KEYBOARD:
+ e_devicemgr.num_keyboard_devices--;
+
+ if (e_devicemgr.num_keyboard_devices <= 0)
+ {
+ e_devicemgr.num_keyboard_devices = 0;
+ _e_devicemgr_set_keyboard_exist(0, 0);
+ }
+
+ fprintf(stderr, "[e_devicemgr][%s] Slave keyboard device (id=%d, name=%s, type=%d, num_keyboard_devices=%d) was removed/disabled !\n",
+ __FUNCTION__, id, data->name, type, e_devicemgr.num_keyboard_devices);
+
+ e_devicemgr.device_list = eina_list_remove(e_devicemgr.device_list, data);
+ free(data);
+ goto out;
+
+ case E_DEVICEMGR_MOUSE:
+ e_devicemgr.num_pointer_devices--;
+
+ if (e_devicemgr.num_pointer_devices <= 0)
+ {
+ e_devicemgr.num_pointer_devices = 0;
+ _e_devicemgr_set_mouse_exist(0, 1);
+ }
+
+ fprintf(stderr, "[e_devicemgr][%s] Slave pointer device (id=%d, name=%s, type=%d, num_pointer_devices=%d) was removed/disabled !\n",
+ __FUNCTION__, id, data->name, type, e_devicemgr.num_pointer_devices);
+ if (e_devicemgr.virtual_touchpad_id == id)
+ {
+ e_devicemgr.virtual_touchpad_id = -1;
+ _e_devicemgr_virtual_touchpad_helper_enable(EINA_FALSE);
+ }
+ e_devicemgr.device_list = eina_list_remove(e_devicemgr.device_list, data);
+ free(data);
+ goto out;
+
+ case E_DEVICEMGR_TOUCHSCREEN:
+ if (strcasestr(data->name, "virtual") && strcasestr(data->name, "multitouch"))
+ _e_devicemgr_virtual_multitouch_helper_fini();
+ e_devicemgr.num_touchscreen_devices--;
+ fprintf(stderr, "[e_devicemgr][%s] Slave touchscreen device (id=%d, name=%s, type=%d, num_touchscreen_devices=%d) was removed/disabled !\n",
+ __FUNCTION__, id, data->name, type, e_devicemgr.num_touchscreen_devices);
+
+ e_devicemgr.device_list = eina_list_remove(e_devicemgr.device_list, data);
+ free(data);
+ goto out;
+
+ default:
+ fprintf(stderr, "[e_devicemgr][%s] Unknown type of device ! (id=%d, type=%d, name=%s, device type=%d)\n",
+ __FUNCTION__, data->id, type, data->name, data->type);
+ e_devicemgr.device_list = eina_list_remove(e_devicemgr.device_list, data);
+ free(data);
+ goto out;
+ }
+ }
+ }
+
+out:
+ return;
+}
+
+static void
+_e_devicemgr_master_pointer_added(int id)
+{
+ int ndevices;
+ XIDeviceInfo *info = NULL;
+
+ info = XIQueryDevice(e_devicemgr.disp, id, &ndevices);
+
+ if (!info || ndevices <= 0)
+ {
+ fprintf(stderr, "[e_devicemgr][master_pointer_added] There is no queried XI device. (device id=%d)\n", id);
+ goto out;
+ }
+
+ if (info->use != XIMasterPointer) goto out;
+
+ //Now we have a MasterPointer.
+ if (strcasestr(E_NEW_MASTER_NAME" pointer", info->name))
+ {
+ //fprintf(stderr, "[e_devicemgr][master_pointer_added] XIMasterPointer is added !(id=%d, name=%s)\n", info->deviceid, info->name);
+ e_devicemgr.new_master_pointer_id = info->deviceid;
+
+ Eina_List *l;
+ Eina_List *l2;
+ int touchscreen_id = -1;
+ DeviceMgr_Device_Info *devinfo;
+
+ EINA_LIST_FOREACH_SAFE(e_devicemgr.device_list, l, l2, devinfo)
+ {
+ if (!devinfo) continue;
+ if (devinfo->type == E_DEVICEMGR_TOUCHSCREEN)
+ {
+ touchscreen_id = devinfo->id;
+ break;
+ }
+ }
+
+ if (touchscreen_id != -1)
+ _e_devicemgr_reattach_slave
+ (touchscreen_id, e_devicemgr.new_master_pointer_id);
+ }
+
+out:
+ if (info) XIFreeDeviceInfo(info);
+}
+
+static void
+_e_devicemgr_master_pointer_removed(int id)
+{
+ if (e_devicemgr.new_master_pointer_id == id)
+ {
+ //fprintf(stderr, "[e_devicemgr][master_pointer_removed] XIMasterPointer was removed ! (id=%d, name=%s)\n",
+ // id, E_NEW_MASTER_NAME" pointer");
+ e_devicemgr.new_master_pointer_id = -1;
+
+ Eina_List *l;
+ Eina_List *l2;
+ int touchscreen_id = -1;
+ DeviceMgr_Device_Info *devinfo;
+
+ EINA_LIST_FOREACH_SAFE(e_devicemgr.device_list, l, l2, devinfo)
+ {
+ if (!devinfo) continue;
+ if (devinfo->type == E_DEVICEMGR_TOUCHSCREEN)
+ {
+ touchscreen_id = devinfo->id;
+ break;
+ }
+ }
+
+ if (touchscreen_id != -1)
+ _e_devicemgr_reattach_slave
+ (touchscreen_id, e_devicemgr.vcp_id);
+ }
+}
+
+static void
+_e_devicemgr_slave_switched(int deviceid, int sourceid)
+{
+ unsigned int val;
+ Eina_List *l;
+ DeviceMgr_Device_Info *device_info;
+
+ if ((deviceid == e_devicemgr.vck_id) && (sourceid != e_devicemgr.vck_xtest_keyboard_id))
+ {
+ val = 1;
+ ecore_x_window_prop_card32_set(e_devicemgr.rootWin, e_devicemgr.atomHWKbdInputStarted, &val, 1);
+ return;
+ }
+
+ EINA_LIST_FOREACH(e_devicemgr.device_list, l, device_info)
+ {
+ if (!device_info || device_info->id!=sourceid) continue;
+ if (device_info->type==E_DEVICEMGR_TOUCHSCREEN)
+ {
+ val = 1;
+ ecore_x_window_prop_card32_set(e_devicemgr.rootWin, e_devicemgr.atomTouchInput, &val, 1);
+ }
+ else if (device_info->type==E_DEVICEMGR_MOUSE)
+ {
+ val = 0;
+ ecore_x_window_prop_card32_set(e_devicemgr.rootWin, e_devicemgr.atomTouchInput, &val, 1);
+ }
+ }
+}
+
+static void
+_e_devicemgr_device_changed(int deviceid, int sourceid)
+{
+ //fprintf(stderr, "[e_devicemgr][device_change_handler] deviceid:%d, sourceid:%d\n", deviceid, sourceid);
+}
+
+static void _e_devicemgr_enable_mouse_cursor(unsigned int val)
+{
+ if (!val)
+ {
+ e_devicemgr.num_pointer_devices--;
+ if (e_devicemgr.num_pointer_devices <= 0)
+ {
+ e_devicemgr.num_pointer_devices = 0;
+ _e_devicemgr_set_mouse_exist(0, 0);
+ }
+ }
+ else if (1 == val)
+ {
+ e_devicemgr.num_pointer_devices++;
+ if (1==e_devicemgr.num_pointer_devices) _e_devicemgr_set_mouse_exist(1, 0);
+ }
+}
+
+static void
+_e_devicemgr_set_confine_information(int deviceid, E_Zone *zone, Eina_Bool isset, int region[4], Eina_Bool pointer_warp, Eina_Bool confine)
+{
+ int confine_region[6];
+
+ if (isset && !zone && !region)
+ {
+ fprintf(stderr, "[e_devicemgr][set_confine_information] zone or region is needed for setting confine information !\n");
+ return;
+ }
+
+ if (isset)
+ {
+ if (zone)
+ {
+ confine_region[0] = zone->x;
+ confine_region[1] = zone->y;
+ confine_region[2] = zone->x + zone->w;
+ confine_region[3] = zone->y + zone->h;
+ //fprintf(stderr, "[e_devicemgr][set_confine_information][zone] x=%d, y=%d, w=%d, h=%d\n", confine_region[0], confine_region[1], confine_region[2], confine_region[3]);
+ }
+ else
+ {
+ confine_region[0] = region[0];
+ confine_region[1] = region[1];
+ confine_region[2] = region[2];
+ confine_region[3] = region[3];
+ //fprintf(stderr, "[e_devicemgr][set_confine_information][region] x=%d, y=%d, w=%d, h=%d\n", confine_region[0], confine_region[1], confine_region[2], confine_region[3]);
+ }
+ if (pointer_warp) confine_region[4] = 1;
+ else confine_region[4] = 0;
+ if (confine) confine_region[5] = 1;
+ else confine_region[5] = 0;
+ XIChangeProperty(e_devicemgr.disp, deviceid, e_devicemgr.atomVirtualTouchpadConfineRegion,
+ XA_INTEGER, 32, PropModeReplace, (unsigned char*)&confine_region[0], 6);
+ XFlush(e_devicemgr.disp);
+ XSync(e_devicemgr.disp, False);
+ }
+ else
+ {
+ confine_region[0] = 0;
+ XIChangeProperty(e_devicemgr.disp, deviceid, e_devicemgr.atomVirtualTouchpadConfineRegion,
+ XA_INTEGER, 32, PropModeReplace, (unsigned char*)&confine_region[0], 1);
+ XFlush(e_devicemgr.disp);
+ XSync(e_devicemgr.disp, False);
+ }
+}
+
+static void
+_e_devicemgr_set_mouse_exist(unsigned int val, int propset)
+{
+ if (!val)
+ {
+ char* cmds[] = {"e_devicemgr", "cursor_enable", "0", NULL };
+ e_devicemgr.rroutput_buf_len = _e_devicemgr_marshalize_string (e_devicemgr.rroutput_buf,3, cmds);
+
+ XRRChangeOutputProperty(e_devicemgr.disp, e_devicemgr.output, e_devicemgr.atomRROutput, XA_CARDINAL, 8, PropModeReplace, (unsigned char *)e_devicemgr.rroutput_buf, e_devicemgr.rroutput_buf_len);
+ XSync(e_devicemgr.disp, False);
+
+ if (propset) ecore_x_window_prop_card32_set(e_devicemgr.rootWin, e_devicemgr.atomXMouseExist, &val, 1);
+ }
+ else if (1 == val)
+ {
+ char* cmds[] = {"e_devicemgr", "cursor_enable", "1", NULL };
+ e_devicemgr.rroutput_buf_len = _e_devicemgr_marshalize_string (e_devicemgr.rroutput_buf,3, cmds);
+
+ XRRChangeOutputProperty(e_devicemgr.disp, e_devicemgr.output, e_devicemgr.atomRROutput, XA_CARDINAL, 8, PropModeReplace, (unsigned char *)e_devicemgr.rroutput_buf, e_devicemgr.rroutput_buf_len);
+ XSync(e_devicemgr.disp, False);
+
+ if (propset) ecore_x_window_prop_card32_set(e_devicemgr.rootWin, e_devicemgr.atomXMouseExist, &val, 1);
+ }
+ else
+ {
+ fprintf(stderr, "[e_devicemgr][%s] Invalid value for enabling cursor !(val=%d)\n", __FUNCTION__, val);
+ }
+}
+
+static void
+_e_devicemgr_set_keyboard_exist(unsigned int val, int is_connected)
+{
+ ecore_x_window_prop_card32_set(e_devicemgr.rootWin, e_devicemgr.atomXExtKeyboardExist, &val, 1);
+}
+
+static int
+_e_devicemgr_get_lockmodifier_mask(void)
+{
+ Window dummy1, dummy2;
+ int dummy3, dummy4, dummy5, dummy6;
+ unsigned int mask;
+
+ XQueryPointer(e_devicemgr.disp, DefaultRootWindow(e_devicemgr.disp), &dummy1, &dummy2,
+ &dummy3, &dummy4, &dummy5, &dummy6, &mask);
+ return (mask & (NumLockMask | CapsLockMask));
+}
+
+static int
+_e_devicemgr_xkb_set_on(unsigned int mask)
+{
+ if (!mask) return 0;
+
+ XkbLockModifiers(e_devicemgr.disp, XkbUseCoreKbd, mask, mask);
+ return 1;
+}
+
+static int
+_e_devicemgr_lockmodifier_set(void)
+{
+ unsigned int mask;
+
+ if (e_devicemgr.xkb_available != EINA_TRUE) return -1;
+
+ //Get current numlock/capslock status from Xserver
+ mask = _e_devicemgr_get_lockmodifier_mask();
+ fprintf(stderr, "[e_devicemgr][lockmodifier_set] NumLock mask=%d, CapsLock mask=%d\n",
+ NumLockMask & mask, CapsLockMask & mask);
+
+ //If one of lockmodiers is set, try to turn it on for all keyboard devices.
+ if (mask && _e_devicemgr_xkb_set_on(mask)) return 1;
+
+ return 0;
+}
+
+static Eina_Bool
+_e_devicemgr_create_master_device(char* master_name)
+{
+ int ret;
+ XIAddMasterInfo c;
+
+ if (!master_name)
+ {
+ fprintf(stderr, "[e_devicemgr][create_master_device] name of master device is needed !\n");
+ return EINA_FALSE;
+ }
+
+ c.type = XIAddMaster;
+ c.name = master_name;
+ c.send_core = 1;
+ c.enable = 1;
+
+ ret = XIChangeHierarchy(e_devicemgr.disp, (XIAnyHierarchyChangeInfo*)&c, 1);
+ XFlush(e_devicemgr.disp);
+ XSync(e_devicemgr.disp, False);
+
+ if (ret!=Success) return EINA_FALSE;
+
+ fprintf(stderr, "[e_devicemgr][create_master_device] new master (%s) was created !\n", E_NEW_MASTER_NAME);
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_devicemgr_remove_master_device(int master_id)
+{
+ int ret;
+ XIRemoveMasterInfo r;
+
+ if (master_id < 0)
+ {
+ fprintf(stderr, "[e_devicemgr][remove_master_device] master_id(%d) is invalid !\n", master_id);
+ return EINA_FALSE;
+ }
+
+ r.type = XIRemoveMaster;
+ r.deviceid = master_id;
+ r.return_mode = XIFloating;
+
+ ret = XIChangeHierarchy(e_devicemgr.disp, (XIAnyHierarchyChangeInfo*)&r, 1);
+ XFlush(e_devicemgr.disp);
+ XSync(e_devicemgr.disp, False);
+
+ if (ret!=Success) return EINA_FALSE;
+
+ fprintf(stderr, "[e_devicemgr][remove_master_device] new master (%s) was removed !\n", E_NEW_MASTER_NAME);
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_devicemgr_detach_slave(int slave_id)
+{
+ int ret;
+ XIDetachSlaveInfo detach;
+ detach.type = XIDetachSlave;
+ detach.deviceid = slave_id;
+
+ ret = XIChangeHierarchy(e_devicemgr.disp, (XIAnyHierarchyChangeInfo*)&detach, 1);
+ XFlush(e_devicemgr.disp);
+ XSync(e_devicemgr.disp, False);
+
+ if (ret!=Success) return EINA_FALSE;
+
+ fprintf(stderr, "[e_devicemgr][detach_slave] slave (id=%d) was removed !\n", slave_id);
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_devicemgr_reattach_slave(int slave_id, int master_id)
+{
+ int ret;
+ XIAttachSlaveInfo attach;
+
+ attach.type = XIAttachSlave;
+ attach.deviceid = slave_id;
+ attach.new_master = master_id;
+
+ ret = XIChangeHierarchy(e_devicemgr.disp, (XIAnyHierarchyChangeInfo*)&attach, 1);
+ XFlush(e_devicemgr.disp);
+ XSync(e_devicemgr.disp, False);
+
+ if (ret!=Success) return EINA_FALSE;
+
+ fprintf(stderr, "[e_devicemgr][reattach_slave] slave (id=%d) was reattached to master (id:%d) !\n", slave_id, master_id);
+
+ return EINA_TRUE;
+}
+
+static void
+_e_devicemgr_show_device_list(unsigned int val)
+{
+ fprintf(stderr, "\n[e_devicemgr] - Device List = Start =====================\n");
+
+ if (e_devicemgr.device_list)
+ {
+ Eina_List* l;
+ DeviceMgr_Device_Info *data;
+
+ EINA_LIST_FOREACH(e_devicemgr.device_list, l, data)
+ {
+ if (data)
+ {
+ fprintf(stderr, "Device id : %d Name : %s\n", data->id, data->name);
+ switch (data->type)
+ {
+ case E_DEVICEMGR_HWKEY:
+ fprintf(stderr, " : type : H/W Key\n");
+ break;
+
+ case E_DEVICEMGR_KEYBOARD:
+ fprintf(stderr, " : type : Keyboard\n");
+ break;
+
+ case E_DEVICEMGR_MOUSE:
+ fprintf(stderr, " : type : Mouse\n");
+ break;
+
+ case E_DEVICEMGR_TOUCHSCREEN:
+ fprintf(stderr, " : type : Touchscreen\n");
+ break;
+
+ default:
+ fprintf(stderr, " : type : Unknown\n");
+ }
+ }
+ }
+ }
+ else
+ {
+ fprintf(stderr, "No input devices...\n");
+ }
+
+ fprintf(stderr, "\n[e_devicemgr] - Device List = End =====================\n");
+}
+
+static Eina_Bool
+_e_devicemgr_virtual_touchpad_helper_enable(Eina_Bool is_enable)
+{
+ Eina_Bool result;
+
+ if (is_enable)
+ {
+ if (e_devicemgr.num_zones < 2) return EINA_FALSE;
+ result = _e_devicemgr_create_master_device(E_NEW_MASTER_NAME);
+ if (EINA_FALSE==result)
+ {
+ fprintf(stderr, "[e_devicemgr][virtual_touchpad_helper_enable] Failed to create master device ! (name=%s)\n",
+ E_NEW_MASTER_NAME);
+ return EINA_FALSE;
+ }
+ _e_devicemgr_set_confine_information(e_devicemgr.virtual_touchpad_id, _e_devicemgr_get_nth_zone(2), EINA_TRUE, NULL, EINA_TRUE, EINA_FALSE);
+ }
+ else
+ {
+ result = _e_devicemgr_remove_master_device(e_devicemgr.new_master_pointer_id);
+ if (EINA_FALSE==result)
+ {
+ fprintf(stderr, "[e_devicemgr][virtual_touchpad_helper_enable] Failed to remove master device ! (id=%d)\n",
+ e_devicemgr.new_master_pointer_id);
+ return EINA_FALSE;
+ }
+ //_e_devicemgr_set_confine_information(e_devicemgr.virtual_touchpad_id, NULL, EINA_FALSE, NULL, EINA_FALSE);
+ }
+
+ return EINA_TRUE;
+}
+
+static E_Zone*
+_e_devicemgr_get_nth_zone(int index)
+{
+ Eina_List *l;
+ E_Zone *zone;
+ int count = 0;
+
+ if (e_devicemgr.num_zones < index)
+ {
+ fprintf(stderr, "[e_devicemgr][get_nth_zone] %d th zone doesn't exist ! (num_zones=%d)\n",
+ index, e_devicemgr.num_zones);
+ return NULL;
+ }
+
+ EINA_LIST_FOREACH(e_devicemgr.zones, l, zone)
+ {
+ if (zone)
+ {
+ if (count==(index-1)) return zone;
+ else count++;
+ }
+ }
+
+ return NULL;
+}
+
+static int
+_e_devicemgr_get_configuration (void)
+{
+ if (!e_mod_devicemgr_config_init())
+ {
+ fprintf(stderr, "[e_devicemgr][get_configuration] Failed @ e_mod_devicemgr_config_init()..!\n");
+ return 0;
+ }
+
+ e_devicemgr.scrnconf_enable = _e_devicemgr_cfg->ScrnConf.enable;
+ e_devicemgr.default_dispmode = _e_devicemgr_cfg->ScrnConf.default_dispmode;
+ e_devicemgr.isPopUpEnabled = _e_devicemgr_cfg->ScrnConf.isPopUpEnabled;
+
+ return 1;
+}
+
+static int
+_e_devicemgr_update_configuration (void)
+{
+ e_mod_devicemgr_config_save();
+
+ return 1;
+}
+
+static void
+_e_devicemgr_virtual_multitouch_helper_init(int deviceid)
+{
+ int i;
+
+ for ( i=0 ; i < MAX_TOUCH ; i++ )
+ {
+ if (e_devicemgr.virtual_multitouch_id[i] < 0)
+ {
+ e_devicemgr.virtual_multitouch_id[i] = deviceid;
+ break;
+ }
+ }
+
+ if (i < MAX_TOUCH-1) return;
+
+ fprintf(stderr, "[e_devicemgr][virtual_multitouch_helper_init] virtual touchscreen device were attached !\n");
+
+ e_devicemgr.mouse_in_handler = ecore_event_handler_add(ECORE_X_EVENT_MOUSE_IN, (Ecore_Event_Handler_Cb)_e_devicemgr_cb_mouse_in, NULL);
+ e_devicemgr.border_move_end_hook = e_border_hook_add(E_BORDER_HOOK_MOVE_END, _e_devicemgr_hook_border_move_end, NULL);
+ e_devicemgr.border_resize_end_hook = e_border_hook_add(E_BORDER_HOOK_RESIZE_END, _e_devicemgr_hook_border_resize_end, NULL);
+
+ if (!e_devicemgr.mouse_in_handler) printf ("[e_devicemgr][%s] Failed to add ECORE_X_EVENT_MOUSE_IN handler\n", __FUNCTION__);
+ if (!e_devicemgr.border_move_end_hook) printf ("[e_devicemgr][%s] Failed to add E_BORDER_HOOK_MOVE_END hook\n", __FUNCTION__);
+ if (!e_devicemgr.border_resize_end_hook) printf ("[e_devicemgr][%s] Failed to add E_BORDER_HOOK_RESIZE_END hook\n", __FUNCTION__);
+}
+
+static void
+_e_devicemgr_virtual_multitouch_helper_fini(void)
+{
+ fprintf(stderr, "[e_devicemgr][virtual_multitouch_helper_init] virtual touchscreen device(s) were removed !\n");
+ memset(&e_devicemgr.virtual_multitouch_id, -1, sizeof(e_devicemgr.virtual_multitouch_id));
+
+ if (e_devicemgr.mouse_in_handler) ecore_event_handler_del(e_devicemgr.mouse_in_handler);
+ if (e_devicemgr.border_move_end_hook) e_border_hook_del(e_devicemgr.border_move_end_hook);
+ if (e_devicemgr.border_resize_end_hook) e_border_hook_del(e_devicemgr.border_resize_end_hook);
+
+ e_devicemgr.mouse_in_handler = NULL;
+ e_devicemgr.border_move_end_hook = NULL;
+ e_devicemgr.border_resize_end_hook = NULL;
+}
+
+static void
+_e_devicemgr_update_input_transform_matrix(Eina_Bool reset)
+{
+ int i;
+
+ static float identity_matrix[] = { 1.0f, 0, 0, 0, 1.0f, 0, 0, 0, 1.0f };
+
+ if (0 > e_devicemgr.virtual_multitouch_id[0])
+ {
+ fprintf(stderr, "[e_devicemgr][update_input_transform_matrix] e_devicemgr.virtual_multitouch_id is invalid !\n");
+ return;
+ }
+
+ for( i = 0 ; i < 3 ; i++ )
+ {
+ if (reset)
+ XIChangeProperty(e_devicemgr.disp, e_devicemgr.virtual_multitouch_id[i], e_devicemgr.atomInputTransform,
+ e_devicemgr.atomFloat, 32, PropModeReplace, (unsigned char*)&identity_matrix, 9);
+ else
+ XIChangeProperty(e_devicemgr.disp, e_devicemgr.virtual_multitouch_id[i], e_devicemgr.atomInputTransform,
+ e_devicemgr.atomFloat, 32, PropModeReplace, (unsigned char*)&e_devicemgr.tmatrix[0], 9);
+ }
+
+ XFlush(e_devicemgr.disp);
+ XSync(e_devicemgr.disp, False);
+
+ if (reset) fprintf(stderr, "[e_devicemgr][update_input_transform_matrix] transform matrix was reset to identity_matrix !\n");
+ else fprintf(stderr, "[e_devicemgr][update_input_transform_matrix] transform matrix was updated !\n");
+}
+
--- /dev/null
+#ifndef __E_MOD_MAIN_H__
+#define __E_MOD_MAIN_H__
+
+#include "e.h"
+#include "e_randr.h"
+
+#include <X11/Xlib.h>
+#include <X11/Xatom.h>
+#include <X11/extensions/XInput2.h>
+#include <X11/extensions/XI2.h>
+#include <X11/extensions/XIproto.h>
+#include <X11/extensions/Xrandr.h>
+#include <X11/extensions/XKB.h>
+
+#include "scrnconf_devicemgr.h"
+#include "virt_monitor_devicemgr.h"
+#include "hib_devicemgr.h"
+#include "e_mod_scrnconf.h"
+#include "e_mod_drv.h"
+
+#ifndef LockMask
+#define LockMask (1<<1)
+#define Mod2Mask (1<<4)
+#endif
+#define CapsLockMask LockMask
+#define NumLockMask Mod2Mask
+
+#ifndef ECORE_X_RANDR_1_2
+#define ECORE_X_RANDR_1_2 ((1 << 16) | 2)
+#endif
+#ifndef ECORE_X_RANDR_1_3
+#define ECORE_X_RANDR_1_3 ((1 << 16) | 3)
+#endif
+
+#ifndef E_RANDR_NO_12
+#define E_RANDR_NO_12 (!e_randr_screen_info || (e_randr_screen_info->randr_version < ECORE_X_RANDR_1_2) || !e_randr_screen_info->rrvd_info.randr_info_12)
+#endif
+
+#ifndef MAX_TOUCH
+#define MAX_TOUCH 3
+#endif
+
+#define INSIDE(x, y, x1, y1, x2, y2) (x1 <= x && x <= x2 && y1 <= y && y <= y2)
+
+#define E_PROP_DEVICE_LIST "E_DEVICEMGR_DEVICE_LIST"
+
+#define E_PROP_DEVICE_NAME "Device"
+#define E_PROP_DEVICEMGR_INPUTWIN "DeviceMgr Input Window"
+#define E_PROP_VIRTUAL_TOUCHPAD_INT "Virtual Touchpad Interaction"
+#define E_PROP_X_MOUSE_CURSOR_ENABLE "X Mouse Cursor Enable"
+#define E_PROP_X_MOUSE_EXIST "X Mouse Exist"
+#define E_PROP_X_EXT_KEYBOARD_EXIST "X External Keyboard Exist"
+#define E_PROP_HW_KEY_INPUT_STARTED "HW Keyboard Input Started"
+#define E_PROP_X_EVDEV_AXIS_LABELS "Axis Labels"
+#define E_PROP_XRROUTPUT "X_RR_PROPERTY_REMOTE_CONTROLLER"
+#define E_PROP_VIRTUAL_TOUCHPAD "_X_Virtual_Touchpad_"
+#define E_PROP_TOUCH_INPUT "X_TouchInput"
+#define E_PROP_VIRTUAL_TOUCHPAD_CONFINE_REGION "Evdev Confine Region"
+#define E_NEW_MASTER_NAME "New Master"
+#define E_VIRTUAL_TOUCHPAD_NAME "Virtual Touchpad"
+#define EVDEVMULTITOUCH_PROP_TRANSFORM "EvdevMultitouch Transform Matrix"
+#define XATOM_FLOAT "FLOAT"
+
+#define DEVICEMGR_PREFIX "/usr/lib/enlightenment/modules/e17-extra-modules-devicemgr/"
+
+typedef enum _VirtualTouchpad_MsgType
+{
+ E_VIRTUAL_TOUCHPAD_NEED_TO_INIT,
+ E_VIRTUAL_TOUCHPAD_DO_INIT,
+ E_VIRTUAL_TOUCHPAD_AREA_INFO,
+ E_VIRTUAL_TOUCHPAD_POINTED_WINDOW,
+ E_VIRTUAL_TOUCHPAD_WINDOW,
+ E_VIRTUAL_TOUCHPAD_MT_BEGIN,
+ E_VIRTUAL_TOUCHPAD_MT_END,
+ E_VIRTUAL_TOUCHPAD_MT_MATRIX_SET_DONE,
+ E_VIRTUAL_TOUCHPAD_CONFINE_SET,
+ E_VIRTUAL_TOUCHPAD_CONFINE_UNSET,
+ E_VIRTUAL_TOUCHPAD_SHUTDOWN
+} VirtualTouchpad_MsgType;
+
+typedef enum
+{
+ E_DEVICEMGR_HWKEY= 1,
+ E_DEVICEMGR_KEYBOARD,
+ E_DEVICEMGR_MOUSE,
+ E_DEVICEMGR_TOUCHSCREEN
+} DeviceMgrDeviceType;
+
+typedef struct _DeviceMgr_Device_Info DeviceMgr_Device_Info;
+
+struct _DeviceMgr_Device_Info
+{
+ int id;
+ const char *name;
+ DeviceMgrDeviceType type;
+};
+
+typedef struct _DeviceMgr_
+{
+ Ecore_X_Display* disp;
+ Ecore_X_Window rootWin;
+ Ecore_X_Window input_window;
+ int num_zones;
+ Eina_List *zones;
+
+ /* scrn conf configuration */
+ Eina_Bool scrnconf_enable;
+ Utilx_Scrnconf_Dispmode default_dispmode;
+ Eina_Bool isPopUpEnabled;
+
+ Eina_Bool xkb_available;
+
+ /* scrn conf preferred size */
+ int hdmi_preferred_w;
+ int hdmi_preferred_h;
+ int virtual_preferred_w;
+ int virtual_preferred_h;
+
+ Ecore_X_Atom atomRROutput;
+ Ecore_X_Atom atomAxisLabels;
+ Ecore_X_Atom atomXMouseExist;
+ Ecore_X_Atom atomXMouseCursorEnable;
+ Ecore_X_Atom atomXExtKeyboardExist;
+ Ecore_X_Atom atomHWKbdInputStarted;
+ Ecore_X_Atom atomDeviceList;
+ Ecore_X_Atom atomDeviceName;
+ Ecore_X_Atom atomVirtualTouchpadConfineRegion;
+ Ecore_X_Atom atomVirtualTouchpad;
+ Ecore_X_Atom atomTouchInput;
+ Ecore_X_Atom atomInputTransform;
+ Ecore_X_Atom atomFloat;
+ Ecore_X_Atom atomVirtualTouchpadInt;
+ Ecore_X_Atom atomDeviceMgrInputWindow;
+
+ /* scrn conf atoms */
+ Ecore_X_Atom atomScrnConfDispModeSet;
+ Ecore_X_Atom atomVirtMonReq;
+ Ecore_X_Atom atomHibReq;
+
+ /* devicemgr config atom */
+ Ecore_X_Atom atomDevMgrCfg;
+
+ int num_touchscreen_devices;
+ int num_pointer_devices;
+ int num_keyboard_devices;
+ int num_hwkey_devices;
+ Eina_List *device_list;
+
+ Ecore_Event_Handler *window_property_handler;
+ Ecore_Event_Handler *event_generic_handler;
+ Ecore_Event_Handler *zone_add_handler;
+ Ecore_Event_Handler *zone_del_handler;
+ Ecore_Event_Handler *mouse_in_handler;
+ Ecore_Event_Handler *randr_crtc_handler;
+ Ecore_Event_Handler *randr_output_handler;
+ Ecore_Event_Handler *randr_output_property_handler;
+ Ecore_Event_Handler *client_message_handler;
+ E_Border_Hook *border_move_end_hook;
+ E_Border_Hook *border_resize_end_hook;
+
+ //variables to set XRROutputProperty
+ RROutput output;
+ char rroutput_buf[256];
+ int rroutput_buf_len;
+
+ //variables related to XI2
+ int xi2_opcode;
+ XIEventMask eventmask;
+
+ //XIMasterPointer id(s)
+ int vcp_id;
+ int vck_id;
+ int vcp_xtest_pointer_id;
+ int vck_xtest_keyboard_id;
+ int new_master_pointer_id;
+
+ int virtual_touchpad_id;
+ int virtual_multitouch_id[MAX_TOUCH];
+ int virtual_touchpad_area_info[4];
+ int virtual_touchpad_pointed_window_info[4];
+ int virtual_multitouch_done;
+ int virtual_touchpad_cursor_pos[2];
+
+ Ecore_X_Window virtual_touchpad_window;
+ Ecore_X_Window virtual_touchpad_pointed_window;
+
+ //input transform matrix
+ float tmatrix[9];
+} DeviceMgr;
+
+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_devicemgr_init(void);
+static void _e_devicemgr_fini(void);
+
+static int _e_devicemgr_xinput_init(void);
+
+static int _e_devicemgr_cb_window_property(void *data, int ev_type, void *ev);
+static int _e_devicemgr_cb_event_generic(void *data, int ev_type, void *event);
+static int _e_devicemgr_cb_zone_add(void *data, int ev_type, void *event);
+static int _e_devicemgr_cb_zone_del(void *data, int ev_type, void *event);
+static Eina_Bool _e_devicemgr_cb_mouse_in(void *data, int type, void *event);
+static void _e_devicemgr_hook_border_move_end(void *data, void *border);
+static void _e_devicemgr_hook_border_resize_end(void *data, void *border);
+static Eina_Bool _e_devicemgr_get_zones(void);
+static E_Zone* _e_devicemgr_get_nth_zone(int index);
+
+static void _e_devicemgr_update_input_transform_matrix(Eina_Bool reset);
+static void _e_devicemgr_init_transform_matrix(void);
+static void _e_devicemgr_init_output(void);
+static void _e_devicemgr_init_input(void);
+static int _e_devicemgr_marshalize_string (char* buf, int num, char* srcs[]);
+
+static int _e_devicemgr_check_device_type(int deviceid, DeviceMgrDeviceType type, const char* devname);
+static void _e_devicemgr_xi2_device_changed_handler(XIDeviceChangedEvent *event);
+static void _e_devicemgr_xi2_device_hierarchy_handler(XIHierarchyEvent *event);
+static void _e_devicemgr_device_enabled(int id, int type);
+static void _e_devicemgr_device_disabled(int id, int type);
+static void _e_devicemgr_master_pointer_added(int id);
+static void _e_devicemgr_master_pointer_removed(int id);
+static void _e_devicemgr_slave_switched(int deviceid, int sourceid);
+static void _e_devicemgr_device_changed(int deviceid, int sourceid);
+static void _e_devicemgr_enable_mouse_cursor(unsigned int val);
+static void _e_devicemgr_set_confine_information(int deviceid, E_Zone *zone, Eina_Bool isset, int region[4], Eina_Bool pointer_warp, Eina_Bool confine);
+static void _e_devicemgr_set_mouse_exist(unsigned int val, int propset);
+static void _e_devicemgr_set_keyboard_exist(unsigned int val, int is_connected);
+
+static int _e_devicemgr_xkb_init(void);
+static int _e_devicemgr_get_lockmodifier_mask(void);
+static int _e_devicemgr_xkb_set_on(unsigned int mask);
+static int _e_devicemgr_lockmodifier_set(void);
+
+static Eina_Bool _e_devicemgr_create_master_device(char* master_name);
+static Eina_Bool _e_devicemgr_remove_master_device(int master_id);
+static Eina_Bool _e_devicemgr_detach_slave(int slave_id);
+static Eina_Bool _e_devicemgr_reattach_slave(int slave_id, int master_id);
+static Eina_Bool _e_devicemgr_virtual_touchpad_helper_enable(Eina_Bool is_enable);
+static void _e_devicemgr_virtual_multitouch_helper_init(int deviceid);
+static void _e_devicemgr_virtual_multitouch_helper_fini(void);
+static void _e_devicemgr_show_device_list(unsigned int val);
+
+Eina_Bool e_mod_sf_rotation_init(void);
+Eina_Bool e_mod_sf_rotation_deinit(void);
+#endif//__E_MOD_MAIN_H__
--- /dev/null
+#include "e.h"
+#include "e_randr.h"
+#include "e_mod_main.h"
+#include "e_mod_scrnconf.h"
+#include "scrnconf_devicemgr.h"
+
+#ifdef _MAKE_ATOM
+# undef _MAKE_ATOM
+#endif
+
+#define _MAKE_ATOM(a, s) \
+ do { \
+ a = ecore_x_atom_get (s); \
+ if (!a) \
+ fprintf (stderr, \
+ "[E-devmgr] ##s creation failed.\n"); \
+ } while (0)
+
+#define STR_XRR_DISPLAY_MODE_PROPERTY "XRR_PROPERTY_DISPLAY_MODE"
+
+/* display mode */
+typedef enum
+{
+ XRR_OUTPUT_DISPLAY_MODE_NULL, /* null */
+ XRR_OUTPUT_DISPLAY_MODE_WB_CLONE, /* write-back */
+} XRROutputPropDisplayMode;
+
+/* screen conf dialog */
+static E_Dialog *g_dia = NULL;
+
+/* screen configuration info */
+static struct
+{
+ SC_EXT_OUTPUT sc_output;
+ Utilx_Scrnconf_Dispmode sc_dispmode;
+ Utilx_Scrnconf_Status sc_stat;
+ SC_EXT_RES sc_res;
+} sc_ext =
+{
+ SC_EXT_OUTPUT_NULL,
+ UTILX_SCRNCONF_DISPMODE_NULL,
+ UTILX_SCRNCONF_STATUS_NULL,
+ SC_EXT_RES_NULL,
+};
+
+/* mode info */
+static struct
+{
+ int sc_res;
+ double refresh;
+ Ecore_X_Randr_Mode_Info * mode_info;
+} sc_ext_mode [] =
+{
+ {SC_EXT_RES_1920X1080, 0.0, NULL},
+ {SC_EXT_RES_1280X720, 0.0, NULL},
+};
+
+static char *str_output[3] = {
+ "null",
+ "HDMI1",
+ "Virtual1",
+};
+
+static char *str_dispmode[3] = {
+ "null",
+ "CLONE",
+ "EXTENDED",
+};
+
+static char *str_stat[3] = {
+ "null",
+ "CONNECT",
+ "ACTIVE",
+};
+
+static char *str_resolution[3] = {
+ "null",
+ "1920x1080",
+ "1280x720",
+};
+
+/* Calculates the vertical refresh rate of a mode. */
+static double
+_cal_vrefresh(Ecore_X_Randr_Mode_Info *mode_info)
+{
+ double refresh = 0.0;
+ double dots = mode_info->hTotal * mode_info->vTotal;
+ if (!dots)
+ return 0;
+ refresh = (mode_info->dotClock + dots/2) / dots;
+
+ if (refresh > 0xffff)
+ refresh = 0xffff;
+
+ return refresh;
+}
+
+static char *
+_get_str_output(int output)
+{
+ char *str = NULL;
+
+ switch (output)
+ {
+ case SC_EXT_OUTPUT_HDMI:
+ str = str_output[1];
+ break;
+ case SC_EXT_OUTPUT_VIRTUAL:
+ str = str_output[2];
+ break;
+ default:
+ str = str_output[0];
+ break;
+ }
+
+ return str;
+}
+
+static char *
+_get_str_dispmode(int dispmode)
+{
+ char *str = NULL;
+
+ switch (dispmode)
+ {
+ case UTILX_SCRNCONF_DISPMODE_CLONE:
+ str = str_dispmode[1];
+ break;
+ case UTILX_SCRNCONF_DISPMODE_EXTENDED:
+ str = str_dispmode[2];
+ break;
+ default:
+ str = str_dispmode[0];
+ break;
+ }
+
+ return str;
+}
+static char *
+_get_str_stat(int stat)
+{
+ char *str = NULL;
+
+ switch (stat)
+ {
+ case UTILX_SCRNCONF_STATUS_CONNECT:
+ str = str_stat[1];
+ break;
+ case UTILX_SCRNCONF_STATUS_ACTIVE:
+ str = str_stat[2];
+ break;
+ case UTILX_SCRNCONF_STATUS_NULL:
+ str = str_stat[0];
+ break;
+ default:
+ str = str_stat[0];
+ break;
+ }
+
+ return str;
+}
+
+static char *
+_get_str_resolution(int resolution)
+{
+ char *str = NULL;
+
+ switch (resolution)
+ {
+ case SC_EXT_RES_1920X1080:
+ str = str_resolution[1];
+ break;
+ case SC_EXT_RES_1280X720:
+ str = str_resolution[2];
+ break;
+ default:
+ str = str_resolution[0];
+ break;
+ }
+
+ return str;
+}
+
+static int
+_get_resolution_str (char *res_name)
+{
+ int resolution = SC_EXT_RES_NULL;
+
+ if (!strcmp (res_name, str_resolution[1]))
+ resolution = SC_EXT_RES_1920X1080;
+ else if (!strcmp (res_name, str_resolution[2]))
+ resolution = SC_EXT_RES_1280X720;
+ else
+ resolution = SC_EXT_RES_NULL;
+
+ return resolution;
+}
+
+
+#if SCRN_CONF_DEBUG
+static void
+_debug_possible_crtc (E_Randr_Output_Info *output_info)
+{
+ E_Randr_Crtc_Info *crtc_info = NULL;
+ E_Randr_Output_Info *t_o = NULL;
+ Ecore_X_Randr_Mode_Info *t_m = NULL;
+ Eina_List *t_l, *l_crtc;
+
+ EINA_LIST_FOREACH (output_info->possible_crtcs, l_crtc, crtc_info)
+ {
+ if (crtc_info == NULL)
+ continue;
+
+ printf ("[DeviceMgr]: possible crtc = %d\n", crtc_info->xid);
+
+ EINA_LIST_FOREACH (crtc_info->outputs, t_l, t_o)
+ {
+ printf (" output : %s\n", t_o->name);
+ }
+
+ EINA_LIST_FOREACH (crtc_info->possible_outputs, t_l, t_o)
+ {
+ printf (" possible output : %s\n", t_o->name);
+ }
+
+ EINA_LIST_FOREACH (crtc_info->outputs_common_modes, t_l, t_m)
+ {
+ if (!t_m->name)
+ break;
+ printf (" outputs common modes : %s\n", t_m->name);
+ }
+
+ if (!crtc_info->current_mode)
+ {
+ printf (" no current mode \n");
+ crtc_xid = crtc_info->xid;
+ printf (" crtc_id : %d\n", crtc_info->xid);
+ }
+ else
+ {
+ printf (" current set mode : %s\n", crtc_info->current_mode->name);
+ printf (" crtc_id : %d\n", crtc_info->xid);
+ }
+ }
+}
+#endif
+
+static E_Randr_Output_Info *
+_scrnconf_external_get_output_info_from_output_xid (Ecore_X_Randr_Output output_xid)
+{
+ E_Randr_Output_Info *output_info = NULL;
+ Eina_List *iter;
+
+ EINA_LIST_FOREACH (e_randr_screen_info.rrvd_info.randr_info_12->outputs, iter, output_info)
+ {
+ if (output_info == NULL)
+ continue;
+
+ if (output_info->xid == output_xid)
+ return output_info;
+ }
+
+ return NULL;
+}
+
+static E_Randr_Output_Info *
+_scrnconf_external_get_output_info_from_output (int output)
+{
+ E_Randr_Output_Info *output_info = NULL;
+ Eina_List *iter;
+
+ EINA_LIST_FOREACH (e_randr_screen_info.rrvd_info.randr_info_12->outputs, iter, output_info)
+ {
+ if (output_info == NULL)
+ continue;
+
+ if (!strcmp(output_info->name, _get_str_output(output)))
+ return output_info;
+ }
+
+ return NULL;
+}
+
+static int
+_scrnconf_external_get_output (E_Randr_Output_Info *output_info)
+{
+ int output = SC_EXT_OUTPUT_NULL;
+
+ if (!strcmp (output_info->name, "HDMI1"))
+ output = SC_EXT_OUTPUT_HDMI;
+ else if (!strcmp (output_info->name, "Virtual1"))
+ output = SC_EXT_OUTPUT_VIRTUAL;
+ else
+ output = SC_EXT_OUTPUT_NULL;
+
+ return output;
+}
+
+static int
+_scrnconf_external_set_modes (int sc_output, int num_res, int *resolutions)
+{
+ E_Randr_Output_Info *output_info = NULL;
+ Ecore_X_Randr_Mode_Info *mode_info = NULL;
+ Eina_List *l_mode;
+ int res = SC_EXT_RES_NULL;
+ double refresh = 0.0;
+ int i;
+
+ output_info = _scrnconf_external_get_output_info_from_output (sc_output);
+ if (!output_info)
+ {
+ fprintf (stderr, "[DeviceMgr] : fail to find output_info from sc_output\n");
+ return 0;
+ }
+
+ EINA_LIST_FOREACH (output_info->monitor->modes, l_mode, mode_info)
+ {
+ if (mode_info == NULL)
+ continue;
+
+#if 0 //debug
+ printf("%s(%d): mode_info->name, %s, vrefresh, %f\n"
+ , __func__, __LINE__, mode_info->name, _cal_vrefresh(mode_info));
+#endif
+ res = _get_resolution_str (mode_info->name);
+ if (res == SC_EXT_RES_NULL)
+ continue;
+
+ for (i = 0; i < num_res; i++)
+ {
+ if (sc_ext_mode[i].sc_res == res)
+ {
+ refresh = _cal_vrefresh (mode_info);
+ if (refresh > sc_ext_mode[i].refresh)
+ {
+ sc_ext_mode[i].refresh = refresh;
+ sc_ext_mode[i].mode_info = mode_info;
+ }
+ }
+ }
+ }
+
+ for (i = 0; i < num_res; i++)
+ {
+ resolutions[i] = sc_ext_mode[i].sc_res;
+ }
+
+#if 0 // debug
+ for (i = 0; i < num_res; i++)
+ {
+ printf ("[DeviceMgr]: res info:: (%d): %s, %f, %p\n"
+ , i, _get_str_resolution(sc_ext_mode[i].sc_res), sc_ext_mode[i].refresh, sc_ext_mode[i].mode_info);
+
+ }
+#endif
+
+ return 1;
+}
+
+static int
+_scrnconf_external_get_setting_info (int output, int resolution, Ecore_X_Randr_Output *output_xid,
+ Ecore_X_Randr_Crtc *crtc_xid, Ecore_X_Randr_Mode *mode_xid, int *output_w, int *output_h)
+{
+ E_Randr_Output_Info *output_info = NULL;
+ E_Randr_Crtc_Info *crtc_info = NULL;
+ Ecore_X_Randr_Mode_Info *mode_info = NULL;
+ Eina_List *l_crtc;
+ Eina_Bool found_output = EINA_FALSE;
+ int num_res = 0;
+ int i;
+
+ output_info = _scrnconf_external_get_output_info_from_output (output);
+ if (output_info == NULL)
+ {
+ fprintf (stderr, "[DeviceMgr]: fail to get output_info from sc_output\n");
+ goto finish;
+ }
+
+ output_xid[0] = output_info->xid;
+
+ num_res = sizeof (sc_ext_mode) / sizeof (sc_ext_mode[0]);
+
+ /* find mode info */
+ for (i = 0; i < num_res; i++)
+ {
+ if (sc_ext_mode[i].sc_res == resolution)
+ {
+ mode_info = sc_ext_mode[i].mode_info;
+ break;
+ }
+ }
+
+ if (mode_info == NULL)
+ {
+ fprintf (stderr, "[DeviceMgr]: fail to get mode_info from sc_output\n");
+ goto finish;
+ }
+
+ *output_w = mode_info->width;
+ *output_h = mode_info->height;
+ *mode_xid = mode_info->xid;
+ found_output = EINA_TRUE;
+
+#if SCRN_CONF_DEBUG
+ _debug_possible_crtc (output_info);
+#endif
+
+ EINA_LIST_FOREACH (output_info->possible_crtcs, l_crtc, crtc_info)
+ {
+ if (crtc_info == NULL)
+ continue;
+
+ if (!crtc_info->current_mode)
+ {
+ *crtc_xid = crtc_info->xid;
+ }
+ }
+
+ if (!*crtc_xid)
+ *crtc_xid = output_info->crtc->xid;
+
+finish:
+
+ return found_output;
+}
+
+static int
+_scrnconf_external_set_extended (int output, int resolution)
+{
+ E_Randr_Output_Info *output_info = NULL;
+ Eina_List *l_output;
+ int lvds_x = 0, lvds_y = 0, lvds_w = 0, lvds_h = 0;
+ int output_x = 0, output_y = 0, output_w = 0, output_h = 0;
+ int resize_w = 0, resize_h = 0;
+ Ecore_X_Randr_Crtc crtc_xid = 0;
+ Ecore_X_Randr_Output output_xid[1] = {0};
+ Ecore_X_Randr_Mode mode_xid = 0;
+
+ /* get lvds information */
+ EINA_LIST_FOREACH (e_randr_screen_info.rrvd_info.randr_info_12->outputs, l_output, output_info)
+ {
+
+ if (output_info == NULL)
+ continue;
+
+ if (!strcmp (output_info->name, "LVDS1"))
+ {
+ lvds_x = output_info->crtc->geometry.x;
+ lvds_y = output_info->crtc->geometry.y;
+ lvds_w = output_info->crtc->current_mode->width;
+ lvds_h = output_info->crtc->current_mode->height;
+ break;
+ }
+ }
+
+ if (!_scrnconf_external_get_setting_info (output, resolution, output_xid, &crtc_xid, &mode_xid, &output_w, &output_h))
+ goto set_fail;
+
+
+ /* set the output is right-of lvds output */
+ output_x = lvds_w;
+ output_y = 0;
+ resize_w = lvds_w + output_w;
+
+ if (lvds_h > output_h)
+ resize_h = lvds_h;
+ else
+ resize_h = output_h;
+
+ ecore_x_grab ();
+
+ printf ("[DeviceMgr]: set screen resize (%d,%d)\n", resize_w, resize_h);
+ if (!ecore_x_randr_screen_current_size_set (e_randr_screen_info.root, resize_w, resize_h, 0, 0))
+ {
+ fprintf (stderr, "[DeviceMgr]: fail to resize the screen\n");
+ goto set_fail;
+ }
+
+ printf ("[DeviceMgr]: set crtc_id, %d output_id, %d mode_id, %d)!\n", crtc_xid, output_xid[0], mode_xid);
+ if (!ecore_x_randr_crtc_settings_set (e_randr_screen_info.root, crtc_xid, output_xid, 1, output_x,
+ output_y, mode_xid, ECORE_X_RANDR_ORIENTATION_ROT_0))
+ {
+ fprintf (stderr, "[DeviceMgr]: fail to set x=%d, y=%d, w=%d, h=%d mode_id=%d, crtc_id=%d\n",
+ output_x, output_y, output_w, output_h, mode_xid, crtc_xid);
+ goto set_fail;
+ }
+
+ e_mod_scrnconf_container_bg_canvas_visible_set(EINA_TRUE);
+
+ ecore_x_ungrab ();
+
+ return 1;
+
+set_fail:
+ fprintf (stderr, "[DeviceMgr]: %s fail to set the extended mode\n", _get_str_output(output));
+ ecore_x_ungrab ();
+
+ return 0;
+}
+
+static int
+_scrnconf_external_set_clone (int output, int resolution)
+{
+ E_Randr_Output_Info *output_info = NULL;
+ Eina_List *l_output;
+ int output_w = 0, output_h = 0;
+ int lvds_x = 0, lvds_y = 0, lvds_w = 0, lvds_h = 0;
+ int resize_w = 0, resize_h = 0;
+ Ecore_X_Randr_Crtc crtc_xid = 0;
+ Ecore_X_Randr_Output output_xid[1] = {0};
+ Ecore_X_Randr_Mode mode_xid = 0;
+ Ecore_X_Atom dispmode;
+ int value[2];
+
+ /* get lvds information */
+ EINA_LIST_FOREACH (e_randr_screen_info.rrvd_info.randr_info_12->outputs, l_output, output_info)
+ {
+
+ if (output_info == NULL)
+ continue;
+
+ if (!strcmp (output_info->name, "LVDS1"))
+ {
+ lvds_x = output_info->crtc->geometry.x;
+ lvds_y = output_info->crtc->geometry.y;
+ lvds_w = output_info->crtc->current_mode->width;
+ lvds_h = output_info->crtc->current_mode->height;
+ break;
+ }
+ }
+
+ resize_w = lvds_w;
+ resize_h = lvds_h;
+
+ if (!_scrnconf_external_get_setting_info (output, resolution, output_xid, &crtc_xid, &mode_xid, &output_w, &output_h))
+ goto set_fail;
+
+ ecore_x_grab ();
+
+ printf ("[DeviceMgr]: set screen resize (%d,%d)\n", resize_w, resize_h);
+ if (!ecore_x_randr_screen_current_size_set (e_randr_screen_info.root, resize_w, resize_h, 0, 0))
+ {
+ fprintf (stderr, "[DeviceMgr]: fail to resize the screen\n");
+ goto set_fail;
+ }
+
+ _MAKE_ATOM (dispmode, STR_XRR_DISPLAY_MODE_PROPERTY);
+
+ value[0] = XRR_OUTPUT_DISPLAY_MODE_WB_CLONE;
+ value[1] = mode_xid;
+
+ /* no ecore x API for XRRChangeOutputProperty */
+ XRRChangeOutputProperty (ecore_x_display_get (), output_xid[0], dispmode, XA_INTEGER, 32,
+ PropModeReplace, (unsigned char *)&value, 2);
+
+ e_mod_scrnconf_container_bg_canvas_visible_set(EINA_FALSE);
+
+ ecore_x_sync ();
+
+ ecore_x_ungrab ();
+
+ return 1;
+
+set_fail:
+ fprintf (stderr, "[DeviceMgr]: %s fail to set the clone mode\n", _get_str_output(output));
+ ecore_x_ungrab ();
+
+ return 0;
+}
+
+static void
+_dialog_extended_btn_cb (void *data, E_Dialog *g_dia)
+{
+ E_Randr_Output_Info *output_info = (E_Randr_Output_Info *)data;
+ int sc_output = SC_EXT_OUTPUT_NULL;
+ int sc_res = SC_EXT_RES_NULL;
+ int num_res = 0;
+ int *resolutions = NULL;
+
+ sc_output = _scrnconf_external_get_output (output_info);
+ if (sc_output == SC_EXT_OUTPUT_NULL)
+ {
+ fprintf (stderr, "[DeviceMgr] : fail to find sc_output from output_info\n");
+ goto set_fail;
+ }
+
+ num_res = sizeof (sc_ext_mode) / sizeof (sc_ext_mode[0]);
+
+ resolutions = calloc (num_res, sizeof (int));
+ if (!resolutions)
+ {
+ fprintf (stderr, "[DeviceMgr] : fail to allocate resolutions\n");
+ goto set_fail;
+ }
+
+ if (!_scrnconf_external_set_modes (sc_output, num_res, resolutions))
+ {
+ fprintf (stderr, "[DeviceMgr] : fail to set modes\n");
+ goto set_fail;
+ }
+
+ sc_res = resolutions[0];
+
+ if (!_scrnconf_external_set_extended (sc_output, sc_res))
+ {
+ fprintf (stderr, "[DeviceMgr] : fail to set modes\n");
+ goto set_fail;
+ }
+
+ /* set display mode */
+ sc_ext.sc_dispmode = UTILX_SCRNCONF_DISPMODE_EXTENDED;
+
+ e_mod_scrnconf_external_send_current_status ();
+
+ if (resolutions)
+ free (resolutions);
+
+ /* destroy dialog */
+ e_mod_scrnconf_external_dialog_free ();
+ return;
+
+set_fail:
+ if (resolutions)
+ free (resolutions);
+
+ /* destroy dialog */
+ e_mod_scrnconf_external_dialog_free ();
+}
+
+static void
+_dialog_clone_btn_cb (void *data, E_Dialog *g_dia)
+{
+ E_Randr_Output_Info *output_info = (E_Randr_Output_Info *)data;
+ int sc_output = SC_EXT_OUTPUT_NULL;
+ int sc_res = SC_EXT_RES_NULL;
+ int num_res = 0;
+ int *resolutions = NULL;
+
+ sc_output = _scrnconf_external_get_output (output_info);
+ if (sc_output == SC_EXT_OUTPUT_NULL)
+ {
+ fprintf (stderr, "[DeviceMgr] : fail to find sc_output from output_info\n");
+ goto set_fail;
+ }
+
+ num_res = sizeof (sc_ext_mode) / sizeof (sc_ext_mode[0]);
+
+ resolutions = calloc (num_res, sizeof (int));
+ if (!resolutions)
+ {
+ fprintf (stderr, "[DeviceMgr] : fail to allocate resolutions\n");
+ goto set_fail;
+ }
+
+ if (!_scrnconf_external_set_modes (sc_output, num_res, resolutions))
+ {
+ fprintf (stderr, "[DeviceMgr] : fail to set modes\n");
+ goto set_fail;
+ }
+
+ sc_res = resolutions[0];
+
+ if (!_scrnconf_external_set_clone (sc_output, sc_res))
+ {
+ fprintf (stderr, "[DeviceMgr] : fail to set clone\n");
+ goto set_fail;
+ }
+
+ /* set display mode */
+ sc_ext.sc_dispmode = UTILX_SCRNCONF_DISPMODE_EXTENDED;
+
+ e_mod_scrnconf_external_send_current_status ();
+
+ if (resolutions)
+ free (resolutions);
+
+ /* destroy dialog */
+ e_mod_scrnconf_external_dialog_free ();
+ return;
+
+set_fail:
+ if (resolutions)
+ free (resolutions);
+
+ /* destroy dialog */
+ e_mod_scrnconf_external_dialog_free ();
+}
+
+static void
+_dialog_cancle_btn_cb (void *data, E_Dialog *g_dia)
+{
+ /* destroy dialog */
+ e_mod_scrnconf_external_dialog_free ();
+}
+
+void
+e_mod_scrnconf_external_init ()
+{
+ /* init scrn conf get property */
+ scrnconf_ext_update_get_perperty(ecore_x_display_get (), "null", "null", "null", "null");
+}
+
+void
+e_mod_scrnconf_external_deinit ()
+{}
+
+
+void
+e_mod_scrnconf_external_dialog_new (int output)
+{
+ E_Manager *man;
+ E_Container *con;
+ E_Randr_Output_Info *output_info = NULL;
+
+ if (output == SC_EXT_OUTPUT_NULL)
+ {
+ fprintf (stderr, "[DeviceMgr] : Unknown output is not supported \n");
+ return;
+ }
+
+ output_info = _scrnconf_external_get_output_info_from_output (output);
+ if (!output_info)
+ {
+ fprintf (stderr, "[DeviceMgr] : fail to get output from xid\n");
+ return;
+ }
+
+ /* set to be null, if dialog already exists */
+ if (g_dia != NULL)
+ e_mod_scrnconf_external_dialog_free ();
+
+ man = e_manager_current_get ();
+ con = e_container_current_get (man);
+
+ if (output == SC_EXT_OUTPUT_HDMI)
+ {
+ g_dia = e_dialog_new (con, "E", "hdmi mode");
+ e_dialog_title_set (g_dia, "\nHDMI Connected !!\n");
+ e_dialog_text_set (g_dia, "<hilight>HDMI Connected<hilight><br>Select the screen configuration mode<br>");
+ }
+ else if (output == SC_EXT_OUTPUT_VIRTUAL)
+ {
+ g_dia = e_dialog_new (con, "E", "virtual mode");
+ e_dialog_title_set (g_dia, "\nVirtual Connected !!\n");
+ e_dialog_text_set (g_dia, "<hilight>Virtual Connected<hilight><br>Select the screen configuration mode<br>");
+ }
+
+ e_dialog_button_add (g_dia, "CLONE", NULL, _dialog_clone_btn_cb, (void *)output_info);
+ e_dialog_button_add (g_dia, "EXTENDED", NULL, _dialog_extended_btn_cb, (void *)output_info);
+ e_dialog_button_add (g_dia, "CANCLE", NULL, _dialog_cancle_btn_cb, (void *)output_info);
+
+ e_dialog_resizable_set (g_dia, 1);
+ e_win_centered_set (g_dia->win, 1);
+ e_dialog_show (g_dia);
+
+ ecore_x_sync ();
+}
+
+void
+e_mod_scrnconf_external_dialog_free ()
+{
+ if (g_dia != NULL)
+ {
+ e_util_defer_object_del (E_OBJECT (g_dia));
+ g_dia = NULL;
+ }
+
+ ecore_x_sync ();
+}
+
+int
+e_mod_scrnconf_external_get_output_from_xid (Ecore_X_Randr_Output output_xid)
+{
+ E_Randr_Output_Info *output_info = NULL;
+ int output = SC_EXT_OUTPUT_NULL;
+
+ output_info = _scrnconf_external_get_output_info_from_output_xid (output_xid);
+ if (!output_info)
+ {
+ fprintf (stderr, "[DeviceMgr] : fail to get output from xid\n");
+ return SC_EXT_OUTPUT_NULL;
+ }
+
+ output = _scrnconf_external_get_output (output_info);
+ if (output == SC_EXT_OUTPUT_NULL)
+ {
+ fprintf (stderr, "[DeviceMgr] : Unknown output is not supported \n");
+ return SC_EXT_OUTPUT_NULL;
+ }
+
+ return output;
+}
+
+int
+e_mod_scrnconf_external_get_default_res (int sc_output, int preferred_w, int preferred_h)
+{
+ int sc_res = SC_EXT_RES_NULL;
+ int num_res = 0;
+ int *resolutions = NULL;
+ Ecore_X_Randr_Mode_Info * mode_info = NULL;
+ int i;
+
+ if (sc_output == SC_EXT_OUTPUT_NULL)
+ {
+ fprintf (stderr, "[DeviceMgr] : sc_output is unknown\n");
+ return 0;
+ }
+
+ num_res = sizeof (sc_ext_mode) / sizeof (sc_ext_mode[0]);
+
+ resolutions = calloc (num_res, sizeof (int));
+ if (!resolutions)
+ {
+ fprintf (stderr, "[DeviceMgr] : fail to allocate resolutions\n");
+ goto get_fail;
+ }
+
+ if (!_scrnconf_external_set_modes (sc_output, num_res, resolutions))
+ {
+ fprintf (stderr, "[DeviceMgr] : fail to set modes\n");
+ goto get_fail;
+ }
+
+ /* find the preferred resolution of the virtual output */
+ if (preferred_w > 0 && preferred_h > 0)
+ {
+ for (i = 0; i < num_res; i++)
+ {
+ mode_info = sc_ext_mode[i].mode_info;
+
+ if (!mode_info)
+ continue;
+
+ if (sc_ext_mode[i].mode_info->width == preferred_w &&
+ sc_ext_mode[i].mode_info->height == preferred_h)
+ {
+ sc_res = sc_ext_mode[i].sc_res;
+ break;
+ }
+ }
+ }
+ else
+ {
+ for (i = 0; i < num_res; i++)
+ {
+ mode_info = sc_ext_mode[i].mode_info;
+
+ if (!mode_info)
+ continue;
+
+ sc_res = sc_ext_mode[i].sc_res;
+ break;
+ }
+ }
+
+ free (resolutions);
+
+ if (sc_res == SC_EXT_RES_NULL)
+ fprintf (stderr, "[DeviceMgr] : default resolution is NULL\n");
+
+
+ if (sc_output == SC_EXT_OUTPUT_VIRTUAL)
+ sc_res = SC_EXT_RES_1280X720;
+
+ return sc_res;
+
+get_fail:
+ if (resolutions)
+ free (resolutions);
+
+ return SC_EXT_RES_NULL;
+}
+
+int
+e_mod_scrnconf_external_get_output (void)
+{
+ return sc_ext.sc_output;
+}
+
+int
+e_mod_scrnconf_external_set_output (int sc_output)
+{
+ sc_ext.sc_output = sc_output;
+
+ return 1;
+}
+
+int
+e_mod_scrnconf_external_get_res (void)
+{
+ return sc_ext.sc_res;
+}
+
+int
+e_mod_scrnconf_external_set_res (int sc_res)
+{
+ sc_ext.sc_res = sc_res;
+
+ return 1;
+}
+
+int
+e_mod_scrnconf_external_get_status (void)
+{
+ return sc_ext.sc_stat;
+}
+
+int
+e_mod_scrnconf_external_set_status (int sc_stat)
+{
+ sc_ext.sc_stat = sc_stat;
+
+ return 1;
+}
+
+int
+e_mod_scrnconf_external_set_dispmode (int sc_output, int sc_dispmode, int sc_res)
+{
+ /* set display mode */
+ switch (sc_dispmode)
+ {
+ case UTILX_SCRNCONF_DISPMODE_CLONE:
+ if (!_scrnconf_external_set_clone (sc_output, sc_res))
+ goto set_fail;
+ sc_ext.sc_dispmode = UTILX_SCRNCONF_DISPMODE_CLONE;
+ break;
+ case UTILX_SCRNCONF_DISPMODE_EXTENDED:
+ if (!_scrnconf_external_set_extended (sc_output, sc_res))
+ goto set_fail;
+ sc_ext.sc_dispmode = UTILX_SCRNCONF_DISPMODE_EXTENDED;
+ break;
+ default:
+ break;
+ }
+
+ return 1;
+
+set_fail:
+ fprintf (stderr, "[DeviceMgr] : fail to set display mode (%d)\n", sc_dispmode);
+ return 0;
+}
+
+int
+e_mod_scrnconf_external_get_dispmode (void)
+{
+ return sc_ext.sc_dispmode;
+}
+
+int
+e_mod_scrnconf_external_send_current_status (void)
+{
+ char * str_output = _get_str_output (sc_ext.sc_output);
+ char * str_stat = _get_str_stat (sc_ext.sc_stat);
+ char * str_res = _get_str_resolution (sc_ext.sc_res);
+ char * str_dispmode = _get_str_dispmode (sc_ext.sc_dispmode);
+
+ if (!scrnconf_ext_update_get_perperty(ecore_x_display_get (), str_output, str_stat, str_res, str_dispmode))
+ {
+ fprintf (stderr, "[DeviceMgr] : fail to update get property \n");
+ return 0;
+ }
+
+ if (!scrnconf_ext_send_status (ecore_x_display_get (), sc_ext.sc_stat, sc_ext.sc_dispmode))
+ {
+ fprintf (stderr, "[DeviceMgr] : fail to send current status \n");
+ return 0;
+ }
+
+ return 1;
+}
+
+int
+e_mod_scrnconf_external_reset (int sc_output)
+{
+ int i;
+ int num_res = 0;
+
+ if (sc_output != sc_ext.sc_output ||
+ sc_ext.sc_output == SC_EXT_OUTPUT_NULL)
+ return 1;
+
+ /* reset scrn conf of a external monitor */
+ sc_ext.sc_output = SC_EXT_OUTPUT_NULL;
+ sc_ext.sc_dispmode = UTILX_SCRNCONF_DISPMODE_NULL;
+ sc_ext.sc_stat = UTILX_SCRNCONF_STATUS_NULL;
+ sc_ext.sc_res = SC_EXT_RES_NULL;
+
+ num_res = sizeof (sc_ext_mode) / sizeof (sc_ext_mode[0]);
+
+ /* reset mode list of a external monitor */
+ for (i = 0; i < num_res; i++)
+ {
+ sc_ext_mode[i].refresh = 0.0;
+ sc_ext_mode[i].mode_info = NULL;
+ }
+ return 1;
+}
+
+void
+e_mod_scrnconf_container_bg_canvas_visible_set(Eina_Bool visible)
+{
+ E_Manager *man = NULL;
+ E_Container *con = NULL;
+ Eina_List *m, *c;
+
+ EINA_LIST_FOREACH(e_manager_list(), m, man)
+ {
+ EINA_LIST_FOREACH(man->containers, c, con)
+ {
+ if (visible)
+ ecore_evas_show(con->bg_ecore_evas);
+ else
+ ecore_evas_hide(con->bg_ecore_evas);
+ }
+ }
+}
--- /dev/null
+
+#ifndef E_MOD_SCRNCONF_H
+#define E_MOD_SCRNCONF_H
+
+void e_mod_scrnconf_external_init ();
+void e_mod_scrnconf_external_deinit ();
+
+void e_mod_scrnconf_external_dialog_new (int sc_output);
+void e_mod_scrnconf_external_dialog_free (void);
+
+int e_mod_scrnconf_external_get_output_from_xid (Ecore_X_Randr_Output output_xid);
+int e_mod_scrnconf_external_get_default_res (int sc_output, int preferred_w, int preferred_h);
+
+int e_mod_scrnconf_external_get_output (void);
+int e_mod_scrnconf_external_set_output (int sc_output);
+
+int e_mod_scrnconf_external_get_res (void);
+int e_mod_scrnconf_external_set_res (int sc_res);
+
+int e_mod_scrnconf_external_get_status (void);
+int e_mod_scrnconf_external_set_status (int sc_stat);
+
+int e_mod_scrnconf_external_set_dispmode (int sc_output, int sc_dispmode, int sc_res);
+int e_mod_scrnconf_external_get_dispmode (void);
+
+int e_mod_scrnconf_external_send_current_status (void);
+
+int e_mod_scrnconf_external_reset (int sc_output);
+
+void e_mod_scrnconf_container_bg_canvas_visible_set(Eina_Bool visible);
+
+#endif // E_MOD_SCRNCONF_H
+
--- /dev/null
+#include <stdio.h>
+#include <stdlib.h>
+#include <X11/Xlib.h>
+#include "hib_set.h"
+
+#define HIB_CHK(cond) {if (!(cond)) { fprintf (stderr, "[%s] : '%s' failed.\n", __func__, #cond); return; }}
+
+void
+hibernation_set (Display *dpy)
+{
+ HIB_CHK (dpy);
+
+ Window win = DefaultRootWindow(dpy);
+ XEvent xev;
+ Atom hib_atom = None;
+
+ hib_atom = XInternAtom (dpy, STR_ATOM_HIB_SET, False);
+
+ xev.xclient.window = win;
+ xev.xclient.type = ClientMessage;
+ xev.xclient.message_type = hib_atom;
+ xev.xclient.format = 32;
+ xev.xclient.data.s[0] = HIB_CMD_SET;
+ xev.xclient.data.s[1] = 0;
+ xev.xclient.data.s[2] = 0;
+ xev.xclient.data.s[3] = 0;
+ xev.xclient.data.s[4] = 0;
+
+ XSendEvent(dpy, win, False, StructureNotifyMask, &xev);
+ XSync(dpy, False);
+}
+
+void
+hibernation_unset (Display *dpy)
+{
+ HIB_CHK (dpy);
+
+ Window win = DefaultRootWindow(dpy);
+ XEvent xev;
+ Atom hib_atom = None;
+
+ hib_atom = XInternAtom (dpy, STR_ATOM_HIB_SET, False);
+
+ xev.xclient.window = win;
+ xev.xclient.type = ClientMessage;
+ xev.xclient.message_type = hib_atom;
+ xev.xclient.format = 32;
+ xev.xclient.data.s[0] = HIB_CMD_UNSET;
+ xev.xclient.data.s[1] = 0;
+ xev.xclient.data.s[2] = 0;
+ xev.xclient.data.s[3] = 0;
+ xev.xclient.data.s[4] = 0;
+
+ XSendEvent(dpy, win, False, StructureNotifyMask, &xev);
+ XSync(dpy, False);
+}
+
--- /dev/null
+#ifndef HIB_DEVICEMGR_H
+#define HIB_DEVICEMGR_H
+
+/* atom string */
+#define STR_ATOM_HIB_REQUEST "_HIB_REQUEST"
+
+/* hibernation command */
+typedef enum
+{
+ HIB_REQ_NULL, /* null */
+ HIB_REQ_SET, /* set hibernation */
+ HIB_REQ_UNSET, /* unset hibernation */
+} HIB_REQ;
+
+#endif // HIB_DEVICEMGR_H
+
--- /dev/null
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include <X11/Xatom.h>
+#include "scrnconf_devicemgr.h"
+
+#define SCRNCONF_CHK(cond, val) {if (!(cond)) { fprintf (stderr, "[%s] : '%s' failed.\n", __func__, #cond); return val; }}
+
+int
+scrnconf_ext_send_status (Display *dpy, Utilx_Scrnconf_Status sc_stat, Utilx_Scrnconf_Dispmode sc_dispmode)
+{
+ SCRNCONF_CHK (dpy, 0);
+
+ Window win = DefaultRootWindow(dpy);
+ XEvent xev;
+ Atom scrnconf_atom = None;
+
+ scrnconf_atom = XInternAtom (dpy, STR_ATOM_SCRNCONF_STATUS, False);
+
+ xev.xclient.window = win;
+ xev.xclient.type = ClientMessage;
+ xev.xclient.message_type = scrnconf_atom;
+ xev.xclient.format = 32;
+ xev.xclient.data.s[0] = sc_stat;
+ xev.xclient.data.s[1] = sc_dispmode;
+
+ XSendEvent(dpy, win, False, StructureNotifyMask, &xev);
+ XSync(dpy, False);
+
+ return 1;
+}
+
+int
+scrnconf_ext_update_get_perperty (Display *dpy, char *str_output, char *str_stat, char *str_res, char *str_dispmode)
+{
+ SCRNCONF_CHK (dpy, 0);
+
+ Window win = DefaultRootWindow(dpy);
+ XTextProperty xtp;
+ Atom scrnconf_atom = None;
+ char * str = NULL;
+ int size = 0;
+
+ scrnconf_atom = XInternAtom (dpy, STR_ATOM_SCRNCONF_INFO, False);
+
+ size = strlen(str_output) + strlen(str_stat) + strlen(str_res) + strlen(str_dispmode) + 4;
+
+ str = calloc (size, sizeof(char));
+ snprintf (str, size, "%s,%s,%s,%s", str_output, str_stat, str_res, str_dispmode);
+
+ xtp.value = (unsigned char *)str;
+ xtp.format = 8;
+ xtp.encoding = XA_STRING;
+ xtp.nitems = size;
+ XSetTextProperty (dpy, win, &xtp, scrnconf_atom);
+
+ free (str);
+
+ return 1;
+}
--- /dev/null
+#ifndef SCRNCONF_DEVICEMGR_H
+#define SCRNCONF_DEVICEMGR_H
+
+#include <X11/Xlib.h>
+#include <utilX.h>
+
+#define STR_ATOM_SCRNCONF_DISPMODE_SET "_SCRNCONF_DISPMODE_SET"
+#define STR_ATOM_SCRNCONF_INFO "_SCRNCONF_INFO"
+
+/* scrn conf output */
+typedef enum
+{
+ SC_EXT_OUTPUT_NULL, /* null */
+ SC_EXT_OUTPUT_HDMI, /* hdmi output */
+ SC_EXT_OUTPUT_VIRTUAL, /* virtual output */
+} SC_EXT_OUTPUT;
+
+/* scrn conf resolution */
+typedef enum
+{
+ SC_EXT_RES_NULL, /* null */
+ SC_EXT_RES_1920X1080, /* 1920 x 1080 */
+ SC_EXT_RES_1280X720, /* 1280 x 720 */
+} SC_EXT_RES;
+
+/* send status */
+int scrnconf_ext_send_status (Display *dpy, Utilx_Scrnconf_Status sc_stat, Utilx_Scrnconf_Dispmode sc_dispmode);
+
+/* update screen configuration of a external monitor */
+int scrnconf_ext_update_get_perperty (Display *dpy, char *str_output, char *str_stat, char *str_res, char *str_dispmode);
+
+#endif // SCRNCONF_DEVICEMGR_H
+
--- /dev/null
+/*
+ * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * This file is a modified version of BSD licensed file and
+ * licensed under the Flora License, Version 1.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Please, see the COPYING file for the original copyright owner and
+ * license.
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include <e.h>
+#include <sensor.h>
+#include <vconf.h>
+#include <X11/Xlib.h>
+#include "sf_rotation_devicemgr.h"
+
+typedef struct _E_DM_Sensor_Rotation E_DM_Sensor_Rotation;
+
+struct _E_DM_Sensor_Rotation
+{
+ int handle;
+ Eina_Bool started;
+ enum accelerometer_rotate_state state;
+ Ecore_Timer *retry_timer;
+ int retry_count;
+ Eina_Bool lock;
+};
+
+/* static global variables */
+static E_DM_Sensor_Rotation rot;
+static Ecore_X_Atom ATOM_DEVICE_ROTATION_ANGLE = 0;
+
+/* local subsystem functions */
+static void _sensor_connect(void);
+static void _sensor_disconnect(void);
+static Eina_Bool _sensor_connect_retry_timeout(void *data);
+static void _sensor_rotation_changed_cb(unsigned int event_type, sensor_event_data_t *event, void *data);
+static void _vconf_cb_lock_change(keynode_t *node, void *data);
+static void _sensor_rotation_set(int ang);
+static int _ang_get(enum accelerometer_rotate_state state);
+
+/* externally accessible functions */
+Eina_Bool
+e_mod_sf_rotation_init(void)
+{
+ rot.retry_count = 0;
+ _sensor_connect();
+ _sensor_rotation_set(0);
+ return EINA_TRUE;
+}
+
+Eina_Bool
+e_mod_sf_rotation_deinit(void)
+{
+ _sensor_disconnect();
+ return EINA_TRUE;
+}
+
+/* local subsystem functions */
+static void
+_sensor_connect(void)
+{
+ int h, r, lock = 0;
+
+ if (rot.retry_timer)
+ {
+ ecore_timer_del(rot.retry_timer);
+ rot.retry_timer = NULL;
+ }
+
+ rot.handle = -1;
+ rot.started = EINA_FALSE;
+
+ h = sf_connect(ACCELEROMETER_SENSOR);
+ if (h < 0)
+ {
+ ELB(ELBT_ROT, "ERR! sf_connect failed", h);
+ goto error;
+ }
+
+ r = sf_register_event(h, ACCELEROMETER_EVENT_ROTATION_CHECK,
+ NULL, _sensor_rotation_changed_cb, NULL);
+ if (r < 0)
+ {
+ ELB(ELBT_ROT, "ERR! sf_register_event failed", r);
+ sf_disconnect(h);
+ goto error;
+ }
+
+ r = sf_start(h, 0);
+ if (r < 0)
+ {
+ ELB(ELBT_ROT, "ERR! sf_start failed", r);
+ sf_unregister_event(h, ACCELEROMETER_EVENT_ROTATION_CHECK);
+ sf_disconnect(h);
+ goto error;
+ }
+
+ rot.handle = h;
+ rot.started = EINA_TRUE;
+ rot.retry_count = 0;
+ rot.lock = EINA_FALSE;
+
+ ELB(ELBT_ROT, "sf_connect succeeded", h);
+
+ r = vconf_get_bool(VCONFKEY_SETAPPL_AUTO_ROTATE_SCREEN_BOOL, &lock);
+ if (r)
+ {
+ ELBF(ELBT_ROT, 0, 0,
+ "ERR! AUTO_ROTATE_SCREEN_BOOL get failed. "
+ "r:%d lock:%d", r, lock);
+ }
+ else
+ {
+ rot.lock = !lock;
+ vconf_notify_key_changed(VCONFKEY_SETAPPL_AUTO_ROTATE_SCREEN_BOOL,
+ _vconf_cb_lock_change,
+ NULL);
+ ELBF(ELBT_ROT, 0, 0,
+ "AUTO_ROTATE_SCREEN_BOOL get succeeded. "
+ "lock:%d rot.locK%d", lock, rot.lock);
+ }
+ return;
+
+error:
+ if (rot.retry_count <= 20)
+ {
+ rot.retry_timer = ecore_timer_add(10.0f,
+ _sensor_connect_retry_timeout,
+ NULL);
+ }
+ return;
+}
+
+static void
+_sensor_disconnect(void)
+{
+ int r;
+
+ vconf_ignore_key_changed(VCONFKEY_SETAPPL_AUTO_ROTATE_SCREEN_BOOL, _vconf_cb_lock_change);
+ rot.lock = EINA_FALSE;
+
+ if (rot.retry_timer)
+ {
+ ecore_timer_del(rot.retry_timer);
+ rot.retry_timer = NULL;
+ }
+
+ rot.retry_count = 0;
+
+ if (rot.handle < 0)
+ {
+ ELB(ELBT_ROT, "ERR! invalid handle", rot.handle);
+ return;
+ }
+
+ if (rot.started)
+ {
+ r = sf_unregister_event(rot.handle,
+ ACCELEROMETER_EVENT_ROTATION_CHECK);
+ if (r < 0)
+ {
+ ELB(ELBT_ROT, "ERR! sf_unregister_event failed", r);
+ return;
+ }
+ r = sf_stop(rot.handle);
+ if (r < 0)
+ {
+ ELB(ELBT_ROT, "ERR! sf_stop failed", r);
+ return;
+ }
+ rot.started = EINA_TRUE;
+ }
+
+ r = sf_disconnect(rot.handle);
+ if (r < 0)
+ {
+ ELB(ELBT_ROT, "ERR! sf_disconnect failed", r);
+ return;
+ }
+
+ rot.handle = -1;
+}
+
+static Eina_Bool
+_sensor_connect_retry_timeout(void *data)
+{
+ if (rot.retry_timer)
+ {
+ ecore_timer_del(rot.retry_timer);
+ rot.retry_timer = NULL;
+ }
+ rot.retry_count++;
+ ELB(ELBT_ROT, "retrying to connect sensor", rot.retry_count);
+ _sensor_connect();
+ return ECORE_CALLBACK_CANCEL;
+}
+
+static int
+_ang_get(enum accelerometer_rotate_state state)
+{
+ int ang = -1;
+
+ /* change CW (SensorFW) to CCW(EFL) */
+ switch (state)
+ {
+ case ROTATION_EVENT_0: ang = 0; break;
+ case ROTATION_EVENT_90: ang = 270; break;
+ case ROTATION_EVENT_180: ang = 180; break;
+ case ROTATION_EVENT_270: ang = 90; break;
+ default:
+ ELB(ELBT_ROT, "ERR! unknown state", state);
+ break;
+ }
+
+ return ang;
+}
+
+static void
+_sensor_rotation_changed_cb(unsigned int event_type,
+ sensor_event_data_t *event,
+ void *data)
+{
+ enum accelerometer_rotate_state state;
+ E_Manager *m = e_manager_current_get();
+ E_Zone *zone = e_util_zone_current_get(m);
+ int ang = 0;
+
+ if (rot.lock) return;
+ if (!zone) return;
+ if (event_type != ACCELEROMETER_EVENT_ROTATION_CHECK) return;
+ if (!event) return;
+
+ state = *((enum accelerometer_rotate_state*)(event->event_data));
+
+ ang = _ang_get(state);
+
+ ELBF(ELBT_ROT, 0, 0, "ROT_EV state:%d angle:%d", state, ang);
+
+ e_zone_rotation_set(zone, ang);
+ rot.state = state;
+
+ _sensor_rotation_set(ang);
+}
+
+static void
+_vconf_cb_lock_change(keynode_t *node,
+ void *data)
+{
+ E_Manager *m = NULL;
+ E_Zone *zone = NULL;
+ int lock = 0, z_ang = -1, ang = -1;
+ if (!node)
+ {
+ ELB(ELBT_ROT, "ERR! node is NULL", 0);
+ return;
+ }
+
+ m = e_manager_current_get();
+ if (m) zone = e_util_zone_current_get(m);
+
+ lock = !vconf_keynode_get_bool(node);
+ ELBF(ELBT_ROT, 0, 0, "ROT LOCK: %d->%d", rot.lock, lock);
+
+ if (lock)
+ {
+ if (zone) e_zone_rotation_set(zone, 0);
+ rot.state = ROTATION_EVENT_0;
+ }
+ else
+ {
+ enum accelerometer_rotate_state state;
+ if (sf_check_rotation(&state) < 0)
+ {
+ ELB(ELBT_ROT, "ERR! getting rotation failed", state);
+ }
+ else
+ {
+ ang = _ang_get(state);
+ if (zone) z_ang = e_zone_rotation_get(zone);
+ if ((ang != -1) && (ang != z_ang))
+ {
+ if (zone) e_zone_rotation_set(zone, ang);
+ rot.state = state;
+ _sensor_rotation_set(ang);
+ }
+ }
+ }
+
+ rot.lock = lock;
+}
+
+static void
+_sensor_rotation_set(int ang)
+{
+ Ecore_X_Window root = ecore_x_window_root_first_get();
+ unsigned int val = (unsigned int)ang;
+
+ if (!ATOM_DEVICE_ROTATION_ANGLE)
+ ATOM_DEVICE_ROTATION_ANGLE = ecore_x_atom_get("_E_DEVICE_ROTATION_ANGLE");
+
+ ecore_x_window_prop_card32_set(root,
+ ATOM_DEVICE_ROTATION_ANGLE,
+ &val, 1);
+}
--- /dev/null
+#ifndef SF_ROTATION_DEVICEMGR_H
+#define SF_ROTATION_DEVICEMGR_H
+
+/*TODO*/
+
+#endif // SF_ROTATION_DEVICEMGR_H
+
--- /dev/null
+#include <stdio.h>
+#include <stdlib.h>
+#include <X11/Xlib.h>
+#include "virt_mon_set.h"
+
+#define VIRT_MON_CHK(cond) {if (!(cond)) { fprintf (stderr, "[%s] : '%s' failed.\n", __func__, #cond); return; }}
+
+/* set the virtual monitor to connect */
+void
+virtual_monitor_set_connect (Display *dpy)
+{
+ VIRT_MON_CHK (dpy);
+
+ Window win = DefaultRootWindow(dpy);
+ XEvent xev;
+ Atom virt_mon_atom = None;
+
+ virt_mon_atom = XInternAtom (dpy, STR_ATOM_VIRT_MON_SET, False);
+
+ xev.xclient.window = win;
+ xev.xclient.type = ClientMessage;
+ xev.xclient.message_type = virt_mon_atom;
+ xev.xclient.format = 32;
+ xev.xclient.data.s[0] = VM_CMD_SET;
+ xev.xclient.data.s[1] = 0;
+ xev.xclient.data.s[2] = 0;
+ xev.xclient.data.s[3] = 0;
+ xev.xclient.data.s[4] = 0;
+
+ XSendEvent(dpy, win, False, StructureNotifyMask, &xev);
+ XSync(dpy, False);
+}
+
+/* set the virtual monitor to disconnect */
+void
+virtual_monitor_set_disconnect (Display *dpy)
+{
+ VIRT_MON_CHK (dpy);
+
+ Window win = DefaultRootWindow(dpy);
+ XEvent xev;
+ Atom virt_mon_atom = None;
+
+ virt_mon_atom = XInternAtom (dpy, STR_ATOM_VIRT_MON_SET, False);
+
+ xev.xclient.window = win;
+ xev.xclient.type = ClientMessage;
+ xev.xclient.message_type = virt_mon_atom;
+ xev.xclient.format = 32;
+ xev.xclient.data.s[0] = VM_CMD_UNSET;
+ xev.xclient.data.s[1] = 0;
+ xev.xclient.data.s[2] = 0;
+ xev.xclient.data.s[3] = 0;
+ xev.xclient.data.s[4] = 0;
+
+ XSendEvent(dpy, win, False, StructureNotifyMask, &xev);
+ XSync(dpy, False);
+}
+
+
--- /dev/null
+#ifndef VIRT_MONITOR_DEVICEMGR_H
+#define VIRT_MONITOR_DEVICEMGR_H
+
+/* atom string */
+#define STR_ATOM_VIRT_MONITOR_REQUEST "_VIRT_MONITOR_REQUEST"
+
+/* virtual monitor command */
+typedef enum
+{
+ VM_REQ_NULL, /* null */
+ VM_REQ_PLUG, /* virtual monitor plugged */
+ VM_REQ_UNPLUG, /* virtual monitor unplugged */
+} VM_REQ;
+
+#endif // VIRT_MONITOR_DEVICEMGR_H
+
--- /dev/null
+<manifest>
+ <request>
+ <domain name="_" />
+ </request>
+ <assign>
+ <filesystem path="/usr/bin/extndialog" label="e17" exec_label="e17" />
+ </assign>
+</manifest>
--- /dev/null
+The Rasterman (Carsten Haitzler) <raster@rasterman.com>
+Ibukun Olumuyiwa <ibukun@computer.org>
+Sebastian Dransfeld <sd@tango.flipp.net>
+HandyAndE (Andrew Williams) <andy@handyande.co.uk>
+CodeWarrior (Hisham Mardam Bey) <hisham@hisham.cc>
+dj2 (Dan Sinclair) <dj2@everburning.com>
+Tilman Sauerbeck <tilman@code-monkey.de>
+Aleksej Struk <astruk@gmail.com>
+Brian Mattern <rephorm@rephorm.com>
+devilhorns (Christopher Michael) <devilhorns@comcast.net>
+/dev/urandom (Viktor Kojouharov) <vkojouharov@gmail.com>
+ilLogict (Chidambar Zinnoury) <illogict@online.fr>
+Stafford Horne <shorne@softhome.net>
+Cedric Bail <cedric.bail@free.fr>
+onefang (David Seikel) <onefang@gmail.com>
+okra (Stephen Houston) <smhouston88@gmail.com>
+Byron Hillis <metrics@score5.org>
+Ravenlock (Eric Schuele) <e.schuele@computer.org>
+ManoWarrior (Luchezar Petkov) <luchezar.petkov@gmail.com>
+morlenxus (Brian Miculcy) <morlenxus@gmx.net>
+Toma- (Tom Haste) <tomhaste@gmail.com>
+k-s (Gustavo Sverzut Barbieri) <barbieri@profusion.mobi>
+Peter van de Werken <pwerken-e@a-eskwadraat.nl>
+Florian Hackenberger <florian@hackenberger.at>
+Hannes Janetzek <hannes.janetzek@gmail.com>
+Mike Blumenkrantz (discomfitor/zmike) <mike@zentific.com>
+Leif Middelschulte <leif.middelschulte@gmail.com>
+yoz (Michael Bouchaud) <michael.bouchaud@gmail.com>
+Gwanglim Lee <gl77.lee@samsung.com>
+Doyoun Kang <doyoun.kang@samsung.com>
+Sangjin Lee <lsj119@samsung.com>
--- /dev/null
+Copyright notice for Enlightenment:
+
+Copyright (C) 2000-2012 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.
--- /dev/null
+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 `<wchar.h>' 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.
+
--- /dev/null
+SUBDIRS = src
+
+MAINTAINERCLEANFILES = \
+ Makefile.in
+
+EXTRA_DIST = README AUTHORS COPYING autogen.sh
--- /dev/null
+#!/bin/sh
+# Run this to generate all the initial makefiles, etc.
+
+rm -rf autom4te.cache
+rm -f aclocal.m4 ltmain.sh
+
+echo "Running autoreconf..." ; autoreconf -v --install || exit 1
+echo "Running configure..." ; ./configure --enable-maintainer-mode
--- /dev/null
+# Process this file with autoconf to produce a configure script.
+dnl Process this file with autoconf to produce a configure script.
+
+# get rid of that stupid cache mechanism
+rm -f config.cache
+
+AC_INIT([extndialog], [0.1.0], [enlightenment-devel@lists.sourceforge.net])
+AC_PREREQ([2.52])
+AC_CONFIG_SRCDIR([configure.ac])
+
+AM_CONFIG_HEADER([config.h])
+
+AM_INIT_AUTOMAKE([1.8])
+
+AC_USE_SYSTEM_EXTENSIONS
+AM_PROG_CC_STDC
+AM_PROG_CC_C_O
+
+requirements="\
+ elementary \
+ "
+
+PKG_CHECK_MODULES(EXTNDIALOG, [${requirements}])
+
+AC_CONFIG_FILES([
+Makefile
+src/Makefile
+])
+
+AC_OUTPUT
--- /dev/null
+bin_PROGRAMS = extndialog
+
+extndialog_CPPFLAGS = \
+-I. \
+@EXTNDIALOG_CFLAGS@
+
+extndialog_LDADD = \
+@EXTNDIALOG_LIBS@
+
+extndialog_SOURCES = \
+extndialog.c
+
+MAINTAINERCLEANFILES = \
+Makefile.in
--- /dev/null
+#include <Elementary.h>
+
+static void
+win_del(void *data, Evas_Object *obj, void *event_info)
+{
+ elm_exit();
+}
+
+static void
+close_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ evas_object_del(data);
+ win_del(NULL, NULL, NULL);
+}
+
+#define _STRING_INIT(i, s) { \
+ if (argc >= i) s = eina_stringshare_add(argv[i-1]); \
+ else s = eina_stringshare_add("Not specified"); \
+}
+
+int
+elm_main(int argc, char **argv)
+{
+ const char *name, *clas, *title, *contents;
+ const char *profile = "mobile";
+ Evas_Object *win, *pop, *bt;
+
+ _STRING_INIT(2, name);
+ _STRING_INIT(3, clas);
+ _STRING_INIT(4, title);
+ _STRING_INIT(5, contents);
+
+ win = elm_win_add(NULL, name, ELM_WIN_NOTIFICATION);
+ if (!win) return 0;
+
+ elm_win_title_set(win, clas);
+ evas_object_smart_callback_add(win, "delete,request", win_del, NULL);
+ elm_win_alpha_set(win, EINA_TRUE);
+ elm_win_profiles_set(win, &profile, 1);
+
+ pop = elm_popup_add(win);
+ elm_object_part_text_set(pop, "title,text", title);
+ elm_object_text_set(pop, contents);
+
+ bt = elm_button_add(pop);
+ elm_object_text_set(bt, "Close");
+ elm_object_part_content_set(pop, "button1", bt);
+ evas_object_smart_callback_add(bt, "clicked", close_cb, win);
+
+ evas_object_show(bt);
+ evas_object_show(pop);
+ evas_object_show(win);
+
+ elm_run();
+
+finish:
+ elm_shutdown();
+ return 0;
+}
+ELM_MAIN()
--- /dev/null
+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.
+
--- /dev/null
+The Rasterman (Carsten Haitzler) <raster@rasterman.com>
+Ibukun Olumuyiwa <ibukun@computer.org>
+Sebastian Dransfeld <sd@tango.flipp.net>
+HandyAndE (Andrew Williams) <andy@handyande.co.uk>
+CodeWarrior (Hisham Mardam Bey) <hisham@hisham.cc>
+dj2 (Dan Sinclair) <dj2@everburning.com>
+Tilman Sauerbeck <tilman@code-monkey.de>
+Aleksej Struk <astruk@gmail.com>
+Brian Mattern <rephorm@rephorm.com>
+devilhorns (Christopher Michael) <devilhorns@comcast.net>
+/dev/urandom (Viktor Kojouharov) <vkojouharov@gmail.com>
+ilLogict (Chidambar Zinnoury) <illogict@online.fr>
+Stafford Horne <shorne@softhome.net>
+Cedric Bail <cedric.bail@free.fr>
+onefang (David Seikel) <onefang@gmail.com>
+okra (Stephen Houston) <smhouston88@gmail.com>
+Byron Hillis <metrics@score5.org>
+Ravenlock (Eric Schuele) <e.schuele@computer.org>
+ManoWarrior (Luchezar Petkov) <luchezar.petkov@gmail.com>
+morlenxus (Brian Miculcy) <morlenxus@gmx.net>
+Toma- (Tom Haste) <tomhaste@gmail.com>
+k-s (Gustavo Sverzut Barbieri) <barbieri@profusion.mobi>
+Peter van de Werken <pwerken-e@a-eskwadraat.nl>
+Florian Hackenberger <florian@hackenberger.at>
+Hannes Janetzek <hannes.janetzek@gmail.com>
+Mike Blumenkrantz (discomfitor/zmike) <mike@zentific.com>
+Leif Middelschulte <leif.middelschulte@gmail.com>
+yoz (Michael Bouchaud) <michael.bouchaud@gmail.com>
+Doyoun Kang <doyoun.kang@samsung.com>
+Gwanglim Lee <gl77.lee@samsung.com>
+Sangjin Lee <lsj119@samsung.com>
--- /dev/null
+Copyright notice for Enlightenment:
+
+Copyright (C) 2000-2012 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.
--- /dev/null
+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 `<wchar.h>' 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.
+
--- /dev/null
+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)
+
--- /dev/null
+#!/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
+
+
--- /dev/null
+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-tizen, 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
+
--- /dev/null
+dnl Copyright (C) 2004-2008 Kim Woelders
+dnl Copyright (C) 2008 Vincent Torri <vtorri at univ-evry dot fr>
+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 <stdlib.h>
+
+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
--- /dev/null
+# 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:
+#
+# <var>='`$ECHO "X$<var>" | $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 <bug-libtool@gnu.org>."
+
+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 <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#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<name>.so
+ # instead of lib<name>.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 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break
+ ;;
+ *)
+ test "$with_gnu_ld" != yes && break
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+else
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+ AC_MSG_RESULT($LD)
+else
+ AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+_LT_PATH_LD_GNU
+AC_SUBST([LD])
+
+_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
+])# LT_PATH_LD
+
+# Old names:
+AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
+AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_LD], [])
+dnl AC_DEFUN([AC_PROG_LD], [])
+
+
+# _LT_PATH_LD_GNU
+#- --------------
+m4_defun([_LT_PATH_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac])
+with_gnu_ld=$lt_cv_prog_gnu_ld
+])# _LT_PATH_LD_GNU
+
+
+# _LT_CMD_RELOAD
+# --------------
+# find reload flag for linker
+# -- PORTME Some linkers may need a different reload flag.
+m4_defun([_LT_CMD_RELOAD],
+[AC_CACHE_CHECK([for $LD option to reload object files],
+ lt_cv_ld_reload_flag,
+ [lt_cv_ld_reload_flag='-r'])
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+ darwin*)
+ if test "$GCC" = yes; then
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+ else
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ fi
+ ;;
+esac
+_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
+_LT_DECL([], [reload_cmds], [2])dnl
+])# _LT_CMD_RELOAD
+
+
+# _LT_CHECK_MAGIC_METHOD
+# ----------------------
+# how to check for library dependencies
+# -- PORTME fill in with the dynamic library characteristics
+m4_defun([_LT_CHECK_MAGIC_METHOD],
+[m4_require([_LT_DECL_EGREP])
+AC_CACHE_CHECK([how to recognize dependent libraries],
+lt_cv_deplibs_check_method,
+[lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix[[4-9]]*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+beos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+bsdi[[45]]*)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ ;;
+
+cygwin*)
+ # func_win32_libid is a shell function defined in ltmain.sh
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ ;;
+
+mingw* | pw32*)
+ # Base MSYS/MinGW do not provide the 'file' command needed by
+ # func_win32_libid shell function, so use a weaker test based on 'objdump',
+ # unless we find 'file', for example because we are cross-compiling.
+ if ( file / ) >/dev/null 2>&1; then
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ else
+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ fi
+ ;;
+
+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 <jrb3@best.com> 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 <jrb3@best.com> 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
+])
--- /dev/null
+# 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])])
--- /dev/null
+# 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
+])
--- /dev/null
+# 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)
+])
--- /dev/null
+# 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])])
--- /dev/null
+[Desktop Entry]
+Type=Link
+Name=Illume2-tizen
+Icon=e-module-illume2-tizen
+X-Enlightenment-ModuleType=system
+Comment=
+Comment[fr]=
+Comment[it]=
--- /dev/null
+MAINTAINERCLEANFILES = Makefile.in
+MODULE = illume2-tizen
+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_floating_window.h \
+ e_mod_floating_window.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 \
+ e_illume_log.h \
+ e_mod_log.h \
+ e_mod_log.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
--- /dev/null
+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";
+ }
+ }
+ }
+ }
+}
--- /dev/null
+#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;
+}
+
+EAPI Eina_Bool
+e_illume_border_is_keyboard_sub(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_FALSE;
+
+ /* check if we are matching on class */
+ if ((bd->client.icccm.class) &&
+ (!strcmp(bd->client.icccm.class,
+ "ISF")))
+ 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 splash type window.
+ *
+ * @param bd The border to check.
+ * @return EINA_TRUE if it is a splash, 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_splash(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_SPLASH) return EINA_TRUE;
+
+ /* 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; i<bd->client.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; i<bd->client.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_clipboard(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 the maximum 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_max_get(E_Border *bd, int *w, int *h)
+{
+ if (w) *w = 0;
+ if (h) *h = 0;
+ if (!bd) return;
+
+ if (w)
+ *w = bd->client.icccm.max_w;
+ if (h)
+ *h = bd->client.icccm.max_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);
+}
+
+EAPI Eina_Bool
+e_illume_border_is_quickpanel_popup(E_Border *bd)
+{
+ /* make sure we have a border */
+ if (!bd) return EINA_FALSE;
+
+ /* check if we are matching on class */
+ if ((bd->client.icccm.class) &&
+ (!strcmp(bd->client.icccm.class,
+ "QUICKPANEL_BASE")))
+ return EINA_TRUE;
+
+ /* return a fallback */
+ return EINA_FALSE;
+}
+
+EAPI Eina_Bool
+e_illume_border_is_app_tray(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,"APP_TRAY",strlen("APP_TRAY"))!= 0) return EINA_FALSE;
+ if (name == NULL) return EINA_FALSE;
+ if (strncmp(name,"APP_TRAY",strlen("APP_TRAY"))!= 0) return EINA_FALSE;
+
+ return EINA_TRUE;
+}
+
+EAPI Eina_Bool
+e_illume_border_is_miniapp_tray(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,"MINIAPP_TRAY",strlen("MINIAPP_TRAY"))!= 0) return EINA_FALSE;
+ if (name == NULL) return EINA_FALSE;
+ if (strncmp(name,"MINIAPP_TRAY",strlen("MINIAPP_TRAY"))!= 0) return EINA_FALSE;
+
+ return EINA_TRUE;
+}
+
+EAPI Eina_Bool
+e_illume_border_is_fixed(E_Border *bd)
+{
+ int min_w = 0, min_h = 0;
+ int max_w = 0, max_h = 0;
+ int ret = EINA_FALSE;
+
+ e_illume_border_min_get(bd, &min_w, &min_h);
+ e_illume_border_max_get(bd, &max_w, &max_h);
+
+ if ((min_w == max_w) &&
+ (min_h == max_h))
+ ret = EINA_TRUE;
+
+ return ret;
+}
--- /dev/null
+#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 (*border_move) (E_Border *bd);
+
+ 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_zone_set) (E_Event_Border_Zone_Set *event);
+
+ void (*border_post_new_border) (E_Border *bd);
+
+ void (*border_pre_fetch) (E_Border *bd);
+ void (*border_new_border) (E_Border *bd);
+#ifdef _F_BORDER_HOOK_PATCH_
+ void (*border_del_border) (E_Border *bd);
+#endif
+ void (*window_configure_request) (Ecore_X_Event_Window_Configure_Request *event);
+
+ void (*border_iconify_cb) (E_Border *bd);
+ void (*border_uniconify_cb) (E_Border *bd);
+
+ /* 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);
+
+ /* for popsync feature */
+ void (*window_desk_set) (Ecore_X_Event_Client_Message *event);
+
+ void (*window_move_resize_request) (Ecore_X_Event_Window_Move_Resize_Request *event);
+ void (*window_state_request) (Ecore_X_Event_Window_State_Request *event);
+
+ void (*module_update) (E_Event_Module_Update *event);
+
+ void (*idle_enterer) (void);
+
+ void (*illume_win_state_change_request) (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;
+
+ struct
+ {
+ const char *mobile;
+ /**< the name of the type of window to be located mobile. */
+ const char *desktop;
+ /**< the name of the type of window to be located desktop. */
+ const char *popsync;
+ /**< the name of the type of window to be located popsync. */
+ } display_name;
+
+ Eina_Bool use_mem_trim;
+ Eina_Bool use_indicator_widget;
+ Eina_Bool use_force_iconify;
+ int floating_control_threshold;
+};
+
+/**
+ * @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;
+ 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 */
+ E_Border *bd;
+ /**< the border of this quickpanel */
+ 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_Win *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;
+
+ struct
+ {
+ unsigned char layer :1;
+ } changes;
+ unsigned char changed :1;
+
+ unsigned int layer;
+};
+
+
+/* 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_keyboard_sub(E_Border *bd);
+EAPI Eina_Bool e_illume_border_is_dialog(E_Border *bd);
+EAPI Eina_Bool e_illume_border_is_splash(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_clipboard(E_Border *bd);
+
+EAPI void e_illume_border_min_get(E_Border *bd, int *w, int *h);
+EAPI void e_illume_border_max_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);
+EAPI Eina_Bool e_illume_border_is_fixed(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);
+EAPI Eina_Bool e_illume_border_is_quickpanel_popup(E_Border *bd);
+
+/* app tray functions */
+EAPI Eina_Bool e_illume_border_is_app_tray(E_Border *bd);
+EAPI Eina_Bool e_illume_border_is_miniapp_tray(E_Border *bd);
+#endif
--- /dev/null
+#ifndef E_ILLUME_LOG_H
+#define E_ILLUME_LOG_H
+
+/* for logger */
+#define ILLUME_LOGGER_BUILD_ENABLE 1
+
+/* print type */
+#define PT_NOTHING 0x0000
+#define PT_STACK 0x0001
+#define PT_VISIBILITY 0x0002
+#define PT_ALL 0xFFFF
+
+/* log type */
+#define LT_NOTHING 0x0000
+#define LT_STACK 0x0001
+#define LT_NOTIFICATION 0x0002
+#define LT_NOTIFICATION_LEVEL 0x0004
+#define LT_VISIBILITY 0x0008
+#define LT_LOCK_SCREEN 0x0010
+#define LT_XWIN 0x0020
+#define LT_ANGLE 0x0040
+#define LT_TRANSIENT_FOR 0x0080
+#define LT_QUICKPANEL 0x0100
+#define LT_KEYBOARD 0x0200
+#define LT_ICONIFY 0x0400
+#define LT_DUAL_DISPLAY 0x0800
+#define LT_AIA 0x1000
+#define LT_INDICATOR 0x2000
+#define LT_VISIBILITY_DETAIL 0x4000
+#define LT_FLOATING 0x8000
+#define LT_ALL 0xFFFF
+
+#if ILLUME_LOGGER_BUILD_ENABLE
+extern int _e_illume_logger_type;
+#include <stdarg.h>
+#define L( type, fmt, args... ) { \
+ if( _e_illume_logger_type & type ) printf( fmt, ##args ); \
+}
+#else
+#define L( ... ) { ; }
+#endif /* ILLUME_LOGGER_BUILD_ENABLE */
+
+#endif
--- /dev/null
+#ifndef E_ILLUME_PRIVATE_H
+# define E_ILLUME_PRIVATE_H
+
+# include "e_illume.h"
+# include "e_illume_log.h"
+
+/* define policy object type */
+# define E_ILLUME_POLICY_TYPE 0xE0b200b
+
+# define POL_NUM_OF_LAYER 10
+
+/* define layer values here so we don't have to grep through code to change */
+/* layer level 10 (450~) */
+
+/* layer level 9 (400~449) */
+# define POL_NOTIFICATION_LAYER_HIGH 400
+
+/* layer level 8 (350~399) */
+# define POL_NOTIFICATION_LAYER_NORMAL 350
+
+/* layer level 7 (300~349) */
+# define POL_QUICKPANEL_LAYER 300
+# define POL_NOTIFICATION_LAYER 300
+# define POL_INDICATOR_LAYER 300
+# define POL_NOTIFICATION_LAYER_LOW 300
+
+/* layer level 6 (250~299) */
+# define POL_FULLSCREEN_LAYER 250
+
+/* layer level 5 (200~249) */
+
+/* layer level 4 (150~199) */
+# define POL_STATE_ABOVE_LAYER 150
+# define POL_ACTIVATE_LAYER 150
+# define POL_DIALOG_LAYER 150
+# define POL_SPLASH_LAYER 150
+# define POL_SOFTKEY_LAYER 150
+
+/* layer level 3 (100~149) */
+# define POL_CLIPBOARD_LAYER 100
+# define POL_KEYBOARD_LAYER 100
+# define POL_CONFORMANT_LAYER 100
+# define POL_APP_LAYER 100
+# define POL_HOME_LAYER 100
+
+/* layer level 2 (50~99) */
+# define POL_STATE_BELOW_LAYER 50
+
+/* layer level 1 (0~49) */
+
+/* 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
--- /dev/null
+#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);
+ E_CONFIG_VAL(D, T, display_name.mobile, STR);
+ E_CONFIG_VAL(D, T, display_name.popsync, STR);
+ E_CONFIG_VAL(D, T, display_name.desktop, STR);
+ E_CONFIG_VAL(D, T, use_indicator_widget, UCHAR);
+ E_CONFIG_VAL(D, T, use_force_iconify, UCHAR);
+ E_CONFIG_VAL(D, T, floating_control_threshold, INT);
+
+ /* attempt to load existing configuration */
+ _e_illume_cfg = e_config_domain_load("module.illume2-tizen", _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-tizen", _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;
+
+ if (_e_illume_cfg->display_name.mobile)
+ eina_stringshare_del(_e_illume_cfg->display_name.mobile);
+ _e_illume_cfg->display_name.mobile = NULL;
+ if (_e_illume_cfg->display_name.popsync)
+ eina_stringshare_del(_e_illume_cfg->display_name.popsync);
+ _e_illume_cfg->display_name.popsync = NULL;
+ if (_e_illume_cfg->display_name.desktop)
+ eina_stringshare_del(_e_illume_cfg->display_name.desktop);
+ _e_illume_cfg->display_name.desktop = 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;
+
+ _e_illume_cfg->display_name.mobile = eina_stringshare_add("mobile");
+ _e_illume_cfg->display_name.popsync = eina_stringshare_add("popsync");
+ _e_illume_cfg->display_name.desktop = eina_stringshare_add("desktop");
+ _e_illume_cfg->use_indicator_widget = EINA_FALSE;
+ _e_illume_cfg->floating_control_threshold = 20;
+
+ /* 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);
+}
--- /dev/null
+#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
--- /dev/null
+#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;
+}
--- /dev/null
+#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
--- /dev/null
+#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);
+}
--- /dev/null
+#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
--- /dev/null
+#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);
+}
--- /dev/null
+#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
--- /dev/null
+#include "e_illume_private.h"
+#include "e_mod_floating_window.h"
+
+/* global event callback function */
+static Eina_Bool _e_mod_floating_cb_idle_enterer(void *data __UNUSED__);
+static Eina_Bool _e_mod_floating_cb_border_add(void *data __UNUSED__,
+ int type __UNUSED__,
+ void *event);
+static Eina_Bool _e_mod_floating_cb_border_del(void *data __UNUSED__,
+ int type __UNUSED__,
+ void *event);
+
+static Eina_Bool _e_mod_floating_cb_move_resize_request(void *data __UNUSED__,
+ int type __UNUSED__,
+ void *event);
+static Eina_Bool _e_mod_floating_cb_client_message(void *data,
+ int type,
+ void *event);
+static Eina_Bool _e_mod_floating_cb_window_property(void *data,
+ int type,
+ void *event);
+
+/* border event callback function */
+static Eina_Bool _e_mod_floating_cb_mouse_up(void *data,
+ int type __UNUSED__,
+ void *event);
+static Eina_Bool _e_mod_floating_cb_mouse_move(void *data,
+ int type __UNUSED__,
+ void *event);
+
+// E Border hook
+static void _e_mod_floating_cb_hook_resize_begin(void *data __UNUSED__,
+ void *data2);
+
+/* general function */
+static int _e_mod_floating_atom_init(void);
+static void _e_mod_floating_border_list_add(E_Border *bd);
+static void _e_mod_floating_border_list_del(E_Border *bd);
+static void _e_mod_floating_border_handler_remove(E_Illume_Floating_Border *ft_bd);
+static void _e_mod_hints_floating_list_set(void);
+static E_Illume_Floating_Border* _e_mod_floating_get_floating_border(Ecore_X_Window win);
+static void _e_mod_floating_window_state_change(Ecore_X_Event_Window_Property *ev);
+
+/* for close the floating windows */
+static void _e_mod_floating_close_all(void);
+
+/* for iconify the floating windows */
+static void _e_mod_floating_iconify(E_Illume_Floating_Border *ft_bd,
+ Eina_Bool iconify);
+static void _e_mod_floating_iconify_all(Eina_Bool iconify);
+
+/* for automatically align the floating windows */
+static void _e_mod_floating_smart_cleanup(Ecore_X_Event_Client_Message *event);
+
+/* for top or bottom maximize */
+static void _e_mod_floating_maximize_coords_handle(E_Illume_Floating_Border *ft_bd,
+ int x,
+ int y);
+static void _e_mod_floating_maximize(E_Border *bd, E_Illume_Maximize max);
+static void _e_mod_floating_maximize_internal(E_Border *bd, E_Illume_Maximize max);
+
+/* for controlling app-in-app window */
+static Ecore_X_Atom E_ILLUME_ATOM_FLOATING_WINDOW_ALIGN;
+static Ecore_X_Atom E_ILLUME_ATOM_FLOATING_WINDOW_CHANGE_VISIBLE;
+static Ecore_X_Atom E_ILLUME_ATOM_FLOATING_WINDOW_CLOSE_ALL;
+static Ecore_X_Atom E_ILLUME_ATOM_FLOATING_WINDOW_LIST;
+
+static Eina_List *_fw_hdls;
+static Eina_List *_fw_hooks;
+static Ecore_Idle_Enterer *_idle_enterer;
+
+static Eina_Hash *floating_wins_hash;
+static Eina_List *floating_wins;
+
+int
+e_mod_floating_init(void)
+{
+ Eina_Bool ret = EINA_FALSE;
+
+ _fw_hdls =
+ eina_list_append(_fw_hdls,
+ ecore_event_handler_add(E_EVENT_BORDER_ADD,
+ _e_mod_floating_cb_border_add,
+ NULL));
+ _fw_hdls =
+ eina_list_append(_fw_hdls,
+ ecore_event_handler_add(E_EVENT_BORDER_REMOVE,
+ _e_mod_floating_cb_border_del,
+ NULL));
+ _fw_hdls =
+ eina_list_append(_fw_hdls,
+ ecore_event_handler_add(ECORE_X_EVENT_WINDOW_MOVE_RESIZE_REQUEST,
+ _e_mod_floating_cb_move_resize_request,
+ NULL));
+ _fw_hdls =
+ eina_list_append(_fw_hdls,
+ ecore_event_handler_add(ECORE_X_EVENT_CLIENT_MESSAGE,
+ _e_mod_floating_cb_client_message,
+ NULL));
+ _fw_hdls =
+ eina_list_append(_fw_hdls,
+ ecore_event_handler_add(ECORE_X_EVENT_WINDOW_PROPERTY,
+ _e_mod_floating_cb_window_property,
+ NULL));
+
+ _fw_hooks =
+ eina_list_append(_fw_hooks,
+ e_border_hook_add(E_BORDER_HOOK_RESIZE_BEGIN,
+ _e_mod_floating_cb_hook_resize_begin,
+ NULL));
+
+ _idle_enterer = ecore_idle_enterer_add(_e_mod_floating_cb_idle_enterer, NULL);
+
+ ret = _e_mod_floating_atom_init();
+ if (!ret)
+ L(LT_FLOATING, "%s(%d) Failed initializing atoms\n", __func__, __LINE__);
+
+ if (!floating_wins_hash)
+ floating_wins_hash = eina_hash_string_superfast_new(NULL);
+
+ return ret;
+}
+
+int
+e_mod_floating_shutdown(void)
+{
+ E_FREE_LIST(_fw_hdls, ecore_event_handler_del);
+ E_FREE_LIST(_fw_hooks, e_border_hook_del);
+
+ if (_idle_enterer) ecore_idle_enterer_del(_idle_enterer);
+ _idle_enterer = NULL;
+
+ if (floating_wins_hash) eina_hash_free(floating_wins_hash);
+ floating_wins_hash = NULL;
+
+ if (floating_wins) eina_list_free(floating_wins);
+ floating_wins = NULL;
+
+ return 1;
+}
+
+EINTERN Eina_Bool
+e_mod_floating_border_is_floating(E_Border *bd)
+{
+ unsigned int state = bd->client.illume.win_state.state;
+ Eina_Bool ret = EINA_FALSE;
+
+ if (state == ECORE_X_ILLUME_WINDOW_STATE_FLOATING)
+ ret = EINA_TRUE;
+
+ return ret;
+}
+
+EINTERN Eina_List*
+e_mod_floating_get_window_list(void)
+{
+ return floating_wins;
+}
+
+static int
+_e_mod_floating_atom_init(void)
+{
+ E_ILLUME_ATOM_FLOATING_WINDOW_ALIGN =
+ ecore_x_atom_get("_E_ILLUME_ATOM_FLOATING_WINDOW_ALIGN");
+ if (!E_ILLUME_ATOM_FLOATING_WINDOW_ALIGN)
+ {
+ fprintf (stderr, "[ILLUME2] Critical Error!!!"
+ "Cannot create _E_ILLUME_ATOM_FLOATING_WINDOW_ALIGN Atom...\n");
+ return 0;
+ }
+
+ E_ILLUME_ATOM_FLOATING_WINDOW_CHANGE_VISIBLE =
+ ecore_x_atom_get("_E_ILLUME_ATOM_FLOATING_WINDOW_CHANGE_VISIBLE");
+ if (!E_ILLUME_ATOM_FLOATING_WINDOW_CHANGE_VISIBLE)
+ {
+ fprintf (stderr, "[ILLUME2] Critical Error!!!"
+ "Cannot create _E_ILLUME_ATOM_FLOATING_WINDOW_CHANGE_VISIBLE Atom...\n");
+ return 0;
+ }
+
+ E_ILLUME_ATOM_FLOATING_WINDOW_CLOSE_ALL =
+ ecore_x_atom_get("_E_ILLUME_ATOM_FLOATING_WINDOW_CLOSE_ALL");
+ if (!E_ILLUME_ATOM_FLOATING_WINDOW_CLOSE_ALL)
+ {
+ fprintf (stderr, "[ILLUME2] Critical Error!!!"
+ "Cannot create _E_ILLUME_ATOM_FLOATING_WINDOW_CLOSE_ALL Atom...\n");
+ return 0;
+ }
+
+ E_ILLUME_ATOM_FLOATING_WINDOW_LIST =
+ ecore_x_atom_get("_E_ILLUME_ATOM_FLOATING_WINDOW_LIST");
+ if (!E_ILLUME_ATOM_FLOATING_WINDOW_LIST)
+ {
+ fprintf (stderr, "[ILLUME2] Critical Error!!!"
+ "Cannot create _E_ILLUME_ATOM_FLOATING_WINDOW_LIST Atom...\n");
+ return 0;
+ }
+
+ return 1;
+}
+
+static void
+_e_mod_floating_window_state_change(Ecore_X_Event_Window_Property *ev)
+{
+ E_Border *bd = NULL;
+ unsigned int state = 0;
+
+ if (!(bd = e_border_find_by_client_window(ev->win))) return;
+
+ state = ecore_x_e_illume_window_state_get(ev->win);
+ switch(state)
+ {
+ case ECORE_X_ILLUME_WINDOW_STATE_FLOATING:
+ L(LT_FLOATING, "%s(%d) State of window is changed to floating, win: 0x%08x\n",
+ __func__, __LINE__, ev->win);
+ _e_mod_floating_border_list_add(bd);
+ break;
+ case ECORE_X_ILLUME_WINDOW_STATE_NORMAL:
+ L(LT_FLOATING, "%s(%d) State of window is changed to normal, win: 0x%08x\n",
+ __func__, __LINE__, ev->win);
+ _e_mod_floating_border_list_del(bd);
+ break;
+ }
+}
+
+static E_Illume_Floating_Border*
+_e_mod_floating_get_floating_border(Ecore_X_Window win)
+{
+ return eina_hash_find(floating_wins_hash, e_util_winid_str_get(win));
+}
+
+static void
+_e_mod_floating_border_list_add(E_Border *bd)
+{
+ E_Illume_Floating_Border *ft_bd = NULL, *tmp_ft_bd = NULL;
+
+ EINA_SAFETY_ON_NULL_RETURN(bd);
+ if (!e_mod_floating_border_is_floating(bd)) return;
+
+ L(LT_FLOATING, "%s(%d) Foating window is added in list, win: 0x%08x\n",
+ __func__, __LINE__, bd->client.win);
+
+ ft_bd = E_NEW(E_Illume_Floating_Border, 1);
+ EINA_SAFETY_ON_NULL_RETURN(ft_bd);
+
+ memset(ft_bd, 0, sizeof(E_Illume_Floating_Border));
+ ft_bd->bd = bd;
+
+ floating_wins = eina_list_append(floating_wins, ft_bd);
+ tmp_ft_bd = eina_hash_find(floating_wins_hash, e_util_winid_str_get(bd->client.win));
+ if (tmp_ft_bd)
+ {
+ E_Border *bd2 = tmp_ft_bd->bd;
+
+ L(LT_FLOATING, "%s(%d) Something worng!!\n", __func__, __LINE__);
+ eina_hash_del(floating_wins_hash,
+ e_util_winid_str_get(bd2->client.win), tmp_ft_bd);
+ eina_hash_del(floating_wins_hash,
+ e_util_winid_str_get(bd2->bg_win), tmp_ft_bd);
+ eina_hash_del(floating_wins_hash,
+ e_util_winid_str_get(bd2->win), tmp_ft_bd);
+ }
+ eina_hash_add(floating_wins_hash, e_util_winid_str_get(bd->client.win), ft_bd);
+ eina_hash_add(floating_wins_hash, e_util_winid_str_get(bd->bg_win), ft_bd);
+ eina_hash_add(floating_wins_hash, e_util_winid_str_get(bd->win), ft_bd);
+
+ _e_mod_hints_floating_list_set();
+}
+
+static void
+_e_mod_floating_border_list_del(E_Border *bd)
+{
+ E_Illume_Floating_Border *ft_bd = NULL;
+
+ ft_bd = _e_mod_floating_get_floating_border(bd->win);
+ if (!ft_bd)
+ {
+ L(LT_FLOATING, "%s(%d) There is no border in list", __func__, __LINE__);
+ return;
+ }
+
+ _e_mod_floating_border_handler_remove(ft_bd);
+
+ L(LT_FLOATING, "%s(%d) Floating window is removed in list, win:0x%08x\n",
+ __func__, __LINE__, bd->win);
+
+ floating_wins = eina_list_remove(floating_wins, ft_bd);
+ eina_hash_del(floating_wins_hash, e_util_winid_str_get(bd->client.win), ft_bd);
+ eina_hash_del(floating_wins_hash, e_util_winid_str_get(bd->bg_win), ft_bd);
+ eina_hash_del(floating_wins_hash, e_util_winid_str_get(bd->win), ft_bd);
+
+ memset(ft_bd, 0, sizeof(E_Illume_Floating_Border));
+ E_FREE(ft_bd);
+
+ _e_mod_hints_floating_list_set();
+}
+
+static void
+_e_mod_floating_border_handler_remove(E_Illume_Floating_Border *ft_bd)
+{
+ EINA_SAFETY_ON_NULL_RETURN(ft_bd);
+ EINA_SAFETY_ON_NULL_RETURN(ft_bd->handlers);
+
+ L(LT_FLOATING, "%s(%d) Mouse event handler is removed, win: 0x%08x\n",
+ __func__, __LINE__, ft_bd->bd->client.win);
+
+ E_FREE_LIST(ft_bd->handlers, ecore_event_handler_del);
+}
+
+static void
+_e_mod_hints_floating_list_set(void)
+{
+ Eina_List *ml = NULL, *cl = NULL;
+ E_Manager *m;
+ E_Container *c;
+ E_Border_List *bl;
+ E_Border *b;
+ E_Illume_Floating_Border *ft_bd = NULL;
+ Ecore_X_Window *clients = NULL;
+ int num = 0, i = 0;
+
+ num = floating_wins ? floating_wins->accounting->count : 0;
+
+ L(LT_FLOATING, "%s(%d) Floating window list has being updated\n",
+ __func__, __LINE__);
+
+ if (num > 0)
+ {
+ clients = calloc(num, sizeof(Ecore_X_Window));
+ EINA_SAFETY_ON_NULL_RETURN(clients);
+
+ EINA_LIST_FOREACH(e_manager_list(), ml, m)
+ {
+ EINA_LIST_FOREACH(m->containers, cl, c)
+ {
+ bl = e_container_border_list_first(c);
+ while ((b = e_container_border_list_next(bl)))
+ {
+ ft_bd = _e_mod_floating_get_floating_border(b->client.win);
+ if (!ft_bd) continue;
+
+ clients[i++] = b->client.win;
+ }
+ e_container_border_list_free(bl);
+ }
+ if (i > 0)
+ ecore_x_window_prop_window_set(m->root,
+ E_ILLUME_ATOM_FLOATING_WINDOW_LIST,
+ clients, i);
+ else
+ ecore_x_window_prop_window_set(m->root,
+ E_ILLUME_ATOM_FLOATING_WINDOW_LIST,
+ NULL, 0);
+ }
+ E_FREE(clients);
+ }
+ else
+ {
+ EINA_LIST_FOREACH(e_manager_list(), ml, m)
+ {
+ L(LT_FLOATING, "%s(%d) There is no floating window\n",
+ __func__, __LINE__);
+ ecore_x_window_prop_window_set(m->root,
+ E_ILLUME_ATOM_FLOATING_WINDOW_LIST,
+ NULL, 0);
+ }
+ }
+}
+
+static Eina_Bool
+_e_mod_floating_cb_border_add(void *data __UNUSED__,
+ int type __UNUSED__,
+ void *event)
+{
+ E_Event_Border_Add *ev = event;
+ E_Border *bd = NULL;
+
+ bd = ev->border;
+ EINA_SAFETY_ON_NULL_GOTO(bd, end);
+ if (!e_mod_floating_border_is_floating(bd)) goto end;
+
+ _e_mod_floating_border_list_add(bd);
+
+end:
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+static Eina_Bool
+_e_mod_floating_cb_border_del(void *data __UNUSED__,
+ int type __UNUSED__,
+ void *event)
+{
+ E_Event_Border_Remove *ev = event;
+ E_Border *bd = NULL;
+
+ bd = ev->border;
+ EINA_SAFETY_ON_NULL_GOTO(bd, end);
+
+ _e_mod_floating_border_list_del(bd);
+
+end:
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+static Eina_Bool
+_e_mod_floating_cb_move_resize_request(void *data __UNUSED__,
+ int type __UNUSED__,
+ void *event)
+{
+ Ecore_X_Event_Window_Move_Resize_Request *e;
+ E_Illume_Floating_Border *ft_bd = NULL;
+
+ e = event;
+ ft_bd = _e_mod_floating_get_floating_border(e->win);
+ if (!ft_bd)
+ {
+ L(LT_FLOATING, "%s(%d) No window in floating list, win: 0x%08x\n",
+ __func__, __LINE__, e->win);
+ goto end;
+ }
+
+ if (ft_bd->handlers == NULL)
+ {
+ L(LT_FLOATING, "%s(%d) Mouse event handler is added, win: 0x%08x\n",
+ __func__, __LINE__, e->win);
+ ft_bd->handlers = eina_list_append(ft_bd->handlers,
+ ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_UP,
+ _e_mod_floating_cb_mouse_up,
+ ft_bd));
+ ft_bd->handlers = eina_list_append(ft_bd->handlers,
+ ecore_event_handler_add(ECORE_EVENT_MOUSE_MOVE,
+ _e_mod_floating_cb_mouse_move,
+ ft_bd));
+ }
+
+end:
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+static Eina_Bool
+_e_mod_floating_cb_client_message(void *data __UNUSED__,
+ int type __UNUSED__,
+ void *event)
+{
+ Ecore_X_Event_Client_Message *ev = event;
+ Eina_Bool iconify = EINA_FALSE;
+
+ if (ev->message_type == E_ILLUME_ATOM_FLOATING_WINDOW_CLOSE_ALL)
+ {
+ L(LT_FLOATING,
+ "%s(%d) Received message, E_ILLUME_ATOM_FLOATING_WINDOW_CLOSE_ALL\n",
+ __func__, __LINE__);
+
+ _e_mod_floating_close_all();
+ }
+ else if (ev->message_type == E_ILLUME_ATOM_FLOATING_WINDOW_CHANGE_VISIBLE)
+ {
+ L(LT_FLOATING,
+ "%s(%d) Received message, E_ILLUME_ATOM_FLOATING_WINDOW_CHANGE_VISIBLE\n",
+ __func__, __LINE__);
+
+ iconify = ev->data.b[0];
+ _e_mod_floating_iconify_all(iconify);
+ }
+ else if (ev->message_type == E_ILLUME_ATOM_FLOATING_WINDOW_ALIGN)
+ {
+ L(LT_FLOATING,
+ "%s(%d) Received message, E_ILLUME_ATOM_FLOATING_WINDOW_ALIGN\n",
+ __func__, __LINE__);
+
+ _e_mod_floating_smart_cleanup(ev);
+ }
+
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+static Eina_Bool
+_e_mod_floating_cb_window_property(void *data __UNUSED__,
+ int type __UNUSED__,
+ void *event)
+{
+ Ecore_X_Event_Window_Property *ev = event;
+
+ if (ev->atom == ECORE_X_ATOM_E_ILLUME_WINDOW_STATE)
+ {
+ _e_mod_floating_window_state_change(ev);
+ }
+
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+static Eina_Bool
+_e_mod_floating_cb_mouse_up(void *data,
+ int type __UNUSED__,
+ void *event)
+{
+ Ecore_Event_Mouse_Button *ev;
+ E_Illume_Floating_Border *ft_bd = NULL;
+ E_Border *bd = NULL;
+
+ EINA_SAFETY_ON_NULL_GOTO(event, end);
+ EINA_SAFETY_ON_NULL_GOTO(data, end);
+
+ ev = event;
+ ft_bd = data;
+ bd = ft_bd->bd;
+ EINA_SAFETY_ON_NULL_GOTO(bd, end);
+
+ if ((ev->event_window != bd->win) &&
+ (ev->event_window != bd->event_win) &&
+ (ev->window != bd->event_win))
+ goto end;
+
+ L(LT_FLOATING, "%s(%d) mouse up state, border: 0x%08x\n",
+ __func__, __LINE__, ev->window);
+
+ if (!ft_bd->moving) goto end;
+ ft_bd->moving = 0;
+
+ if (e_illume_border_is_fixed(bd)) goto end;
+
+ _e_mod_floating_maximize_coords_handle(ft_bd, ev->root.x, ev->root.y);
+ _e_mod_floating_border_handler_remove(ft_bd);
+
+end:
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+static Eina_Bool
+_e_mod_floating_cb_mouse_move(void *data,
+ int type __UNUSED__,
+ void *event)
+{
+ Ecore_Event_Mouse_Move *ev;
+ E_Illume_Floating_Border *ft_bd = NULL;
+ E_Border *bd = NULL;
+ int new_x = 0, new_y = 0;
+ int threshold = _e_illume_cfg->floating_control_threshold;
+
+ EINA_SAFETY_ON_NULL_GOTO(event, end);
+ EINA_SAFETY_ON_NULL_GOTO(data, end);
+
+ ev = event;
+ ft_bd = data;
+ bd = ft_bd->bd;
+ EINA_SAFETY_ON_NULL_GOTO(bd, end);
+
+ if ((ev->event_window != bd->win) &&
+ (ev->event_window != bd->event_win) &&
+ (ev->window != bd->event_win))
+ goto end;
+
+ if (!bd->moving) goto end;
+ ft_bd->moving = 1;
+
+ L(LT_FLOATING, "%s(%d) mouse move state, border: 0x%08x\n",
+ __func__, __LINE__, ev->window);
+
+ if (e_illume_border_is_fixed(bd)) goto end;
+
+ if (ft_bd->state.maximize_by_illume == 0) goto end;
+ ft_bd->state.maximize_by_illume = 0;
+
+ e_border_unmaximize(bd, E_ILLUME_MAXIMIZE_BOTH);
+
+ new_x = ev->root.x - (bd->w / 2);
+ new_y = ev->root.y - threshold;
+
+ if ((bd->moveinfo.down.button >= 1) && (bd->moveinfo.down.button <= 3))
+ {
+ bd->mouse.last_down[bd->moveinfo.down.button - 1].x = new_x;
+ bd->mouse.last_down[bd->moveinfo.down.button - 1].y = new_y;
+ }
+
+ e_border_move(bd, new_x, new_y);
+
+end:
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+/* if user resize the window in maximized by gesture,
+ * change this window back into un-maximize state.
+ */
+static void
+_e_mod_floating_cb_hook_resize_begin(void *data __UNUSED__,
+ void *data2)
+{
+ E_Illume_Floating_Border *ft_bd = NULL;
+ E_Border *bd = NULL;
+
+ EINA_SAFETY_ON_NULL_RETURN(data2);
+ bd = data2;
+ ft_bd = _e_mod_floating_get_floating_border(bd->win);
+ EINA_SAFETY_ON_NULL_RETURN(ft_bd);
+
+ if (ft_bd->state.maximize_by_illume)
+ {
+ ft_bd->state.maximize_by_illume = 0;
+ bd->maximized = 0;
+ }
+}
+
+static Eina_Bool
+_e_mod_floating_cb_idle_enterer(void *data __UNUSED__)
+{
+ E_Illume_Floating_Border *ft_bd = NULL;
+ E_Border *bd = NULL;
+ Eina_List *l;
+
+ if (!floating_wins) return ECORE_CALLBACK_RENEW;
+
+ EINA_LIST_FOREACH(floating_wins, l, ft_bd)
+ {
+ if (!ft_bd) continue;
+ if (!ft_bd->changed) continue;
+ ft_bd->changed = 0;
+
+ bd = ft_bd->bd;
+ if (!bd) continue;
+
+ L(LT_FLOATING, "%s(%d) idle state, win: 0x%08x\n",
+ __func__, __LINE__, bd->client.win);
+
+ if (ft_bd->defer.maximize_top)
+ {
+ _e_mod_floating_maximize(bd,
+ E_MAXIMIZE_FULLSCREEN |
+ E_ILLUME_MAXIMIZE_TOP);
+ ft_bd->state.maximize_by_illume = 1;
+ ft_bd->defer.maximize_top = 0;
+ }
+ else if (ft_bd->defer.maximize_bottom)
+ {
+ _e_mod_floating_maximize(bd,
+ E_MAXIMIZE_FULLSCREEN |
+ E_ILLUME_MAXIMIZE_BOTTOM);
+ ft_bd->state.maximize_by_illume = 1;
+ ft_bd->defer.maximize_bottom = 0;
+ }
+
+ if (ft_bd->defer.close)
+ {
+ e_border_act_close_begin(ft_bd->bd);
+ ft_bd->defer.close = 0;
+ }
+ }
+
+ return ECORE_CALLBACK_RENEW;
+}
+
+static void
+_e_mod_floating_close_all(void)
+{
+ E_Illume_Floating_Border *ft_bd = NULL;
+ Eina_List *l;
+
+ EINA_LIST_FOREACH(floating_wins, l, ft_bd)
+ {
+ _e_mod_floating_iconify(ft_bd, 1);
+
+ ft_bd->defer.close = 1;
+ ft_bd->changed = 1;
+ }
+}
+
+static void
+_e_mod_floating_iconify(E_Illume_Floating_Border *ft_bd,
+ Eina_Bool iconify)
+{
+ E_Border *bd = NULL;
+
+ EINA_SAFETY_ON_NULL_RETURN(ft_bd);
+ bd = ft_bd->bd;
+ EINA_SAFETY_ON_NULL_RETURN(bd);
+
+ if (iconify)
+ {
+ if (!bd->iconic)
+ e_border_iconify(bd);
+ }
+ else
+ {
+ if (bd->iconic)
+ e_border_uniconify(bd);
+ }
+}
+
+static void
+_e_mod_floating_iconify_all(Eina_Bool iconify)
+{
+ Eina_List *l;
+ E_Illume_Floating_Border *ft_bd = NULL;
+
+ EINA_LIST_FOREACH(floating_wins, l, ft_bd)
+ {
+ _e_mod_floating_iconify(ft_bd, iconify);
+ }
+}
+
+static void
+_e_mod_floating_smart_cleanup(Ecore_X_Event_Client_Message *event __UNUSED__)
+{
+ Eina_List *borders = NULL, *l;
+ E_Illume_Floating_Border *ft_bd = NULL;
+ E_Border *border = NULL;
+
+ EINA_LIST_FOREACH(floating_wins, l, ft_bd)
+ {
+ border = ft_bd->bd;
+ if (!border) continue;
+ /* Build a list of windows not iconified. */
+ if ((!border->iconic) && (!border->lock_user_location))
+ {
+ int area;
+ Eina_List *ll;
+ E_Border *bd;
+
+ /* Ordering windows largest to smallest gives better results */
+ area = border->w * border->h;
+ EINA_LIST_FOREACH(borders, ll, bd)
+ {
+ int testarea;
+
+ testarea = bd->w * bd->h;
+ /* Insert the border if larger than the current border */
+ if (area >= testarea)
+ {
+ borders = eina_list_prepend_relative(borders, border, bd);
+ break;
+ }
+ }
+ /* Looped over all borders without placing, so place at end */
+ if (!ll) borders = eina_list_append(borders, border);
+ }
+ }
+
+ /* Loop over the borders moving each one using the smart placement */
+ EINA_LIST_FREE(borders, border)
+ {
+ int new_x, new_y;
+
+ e_place_zone_region_smart(border->zone, borders, border->x, border->y,
+ border->w, border->h, &new_x, &new_y);
+ e_border_move(border, new_x, new_y);
+ }
+
+ return;
+}
+
+static void
+_e_mod_floating_maximize_coords_handle(E_Illume_Floating_Border *ft_bd,
+ int x,
+ int y)
+{
+ E_Border *bd = NULL;
+ const int margin = _e_illume_cfg->floating_control_threshold;
+
+ EINA_SAFETY_ON_NULL_RETURN(ft_bd);
+ EINA_SAFETY_ON_NULL_RETURN(ft_bd->bd);
+ bd = ft_bd->bd;
+
+ if ((y >= 0) && (y <= margin))
+ {
+ ft_bd->defer.maximize_top = 1;
+ ft_bd->changed = 1;
+ }
+ else if ((y >= (bd->zone->h - margin)) && (y <= (bd->zone->h -1)))
+ {
+ ft_bd->defer.maximize_bottom = 1;
+ ft_bd->changed = 1;
+ }
+}
+
+static void
+_e_mod_floating_maximize(E_Border *bd, E_Illume_Maximize max)
+{
+ E_OBJECT_CHECK(bd);
+ E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE);
+
+ if (!(max & E_ILLUME_MAXIMIZE_DIRECTION)) max |= E_ILLUME_MAXIMIZE_BOTH;
+
+ if ((bd->shaded) || (bd->shading)) return;
+ ecore_x_window_shadow_tree_flush();
+ if (bd->fullscreen)
+ e_border_unfullscreen(bd);
+ if (((bd->maximized & E_ILLUME_MAXIMIZE_DIRECTION) ==
+ (max & E_MAXIMIZE_DIRECTION)) ||
+ ((bd->maximized & E_ILLUME_MAXIMIZE_DIRECTION) ==
+ E_ILLUME_MAXIMIZE_BOTH)) return;
+ if (bd->new_client)
+ {
+ bd->need_maximize = 1;
+ bd->maximized &= ~E_ILLUME_MAXIMIZE_TYPE;
+ bd->maximized |= max;
+ return;
+ }
+
+ bd->pre_res_change.valid = 0;
+ if (!(bd->maximized & E_ILLUME_MAXIMIZE_HORIZONTAL))
+ {
+ bd->saved.x = bd->x - bd->zone->x;
+ bd->saved.w = bd->w;
+ }
+ if (!(bd->maximized & E_ILLUME_MAXIMIZE_VERTICAL))
+ {
+ bd->saved.y = bd->y - bd->zone->y;
+ bd->saved.h = bd->h;
+ }
+
+ bd->saved.zone = bd->zone->num;
+ e_hints_window_size_set(bd);
+
+ e_border_raise(bd);
+
+ _e_mod_floating_maximize_internal(bd, max);
+
+ bd->maximized &= ~E_ILLUME_MAXIMIZE_TYPE;
+ bd->maximized |= max;
+
+ e_hints_window_maximized_set(bd, bd->maximized & E_ILLUME_MAXIMIZE_HORIZONTAL,
+ bd->maximized & E_ILLUME_MAXIMIZE_VERTICAL);
+ e_remember_update(bd);
+}
+
+static void
+_e_mod_floating_maximize_internal(E_Border *bd, E_Illume_Maximize max)
+{
+ int x1, yy1;
+ int w, h;
+
+ switch (max & E_ILLUME_MAXIMIZE_TYPE)
+ {
+ case E_ILLUME_MAXIMIZE_FULLSCREEN:
+ w = bd->zone->w;
+ h = bd->zone->h;
+
+ e_border_resize_limit(bd, &w, &h);
+ x1 = bd->zone->x + (bd->zone->w - w) / 2;
+ yy1 = bd->zone->y + (bd->zone->h - h) / 2;
+
+ switch (max & E_ILLUME_MAXIMIZE_DIRECTION)
+ {
+ case E_ILLUME_MAXIMIZE_BOTH:
+ e_border_move_resize(bd, x1, yy1, w, h);
+ break;
+
+ case E_ILLUME_MAXIMIZE_VERTICAL:
+ e_border_move_resize(bd, bd->x, yy1, bd->w, h);
+ break;
+
+ case E_ILLUME_MAXIMIZE_HORIZONTAL:
+ e_border_move_resize(bd, x1, bd->y, w, bd->h);
+ break;
+
+ case E_ILLUME_MAXIMIZE_BOTTOM:
+ e_border_move_resize(bd, bd->zone->x, bd->zone->h / 2, w, h / 2);
+ break;
+
+ case E_ILLUME_MAXIMIZE_TOP:
+ e_border_move_resize(bd, bd->zone->x, bd->zone->y, w, h / 2);
+ break;
+ }
+ break;
+ }
+}
--- /dev/null
+#ifndef _E_MOD_FLOATING_WINDOWS_H
+# define _E_MOD_FLOATING_WINDOWS_H
+
+typedef struct _E_Illume_Floating_Border E_Illume_Floating_Border;
+
+typedef enum _E_Illume_Maximize
+{
+ E_ILLUME_MAXIMIZE_NONE = 0x00000000,
+ E_ILLUME_MAXIMIZE_FULLSCREEN = 0x00000001,
+ E_ILLUME_MAXIMIZE_SMART = 0x00000002,
+ E_ILLUME_MAXIMIZE_EXPAND = 0x00000003,
+ E_ILLUME_MAXIMIZE_FILL = 0x00000004,
+ E_ILLUME_MAXIMIZE_TYPE = 0x0000000f,
+ E_ILLUME_MAXIMIZE_VERTICAL = 0x00000010,
+ E_ILLUME_MAXIMIZE_HORIZONTAL = 0x00000020,
+ E_ILLUME_MAXIMIZE_BOTH = 0x00000030,
+ E_ILLUME_MAXIMIZE_BOTTOM = 0x00000070,
+ E_ILLUME_MAXIMIZE_TOP = 0x000000b0,
+ E_ILLUME_MAXIMIZE_DIRECTION = 0x000000f0
+} E_Illume_Maximize;
+
+struct _E_Illume_Floating_Border
+{
+ E_Border *bd;
+ Eina_List *handlers;
+
+ unsigned char moving :1;
+
+ struct{
+ unsigned char maximize_top :1;
+ unsigned char maximize_bottom :1;
+ unsigned char close :1;
+ } defer;
+ unsigned char changed :1;
+
+ struct{
+ unsigned char maximize_by_illume :1;
+ } state;
+};
+
+int e_mod_floating_init(void);
+int e_mod_floating_shutdown(void);
+EINTERN Eina_Bool e_mod_floating_border_is_floating(E_Border *bd);
+EINTERN Eina_List* e_mod_floating_get_window_list(void);
+
+#endif
--- /dev/null
+#include "e_illume_private.h"
+#include "e_mod_log.h"
+
+/* local function prototypes */
+static int _e_mod_log_init_atom(void);
+static void _e_mod_log_handlers_add(void);
+static void _e_mod_log_handlers_del(void);
+static Eina_Bool _e_mod_log_cb_window_property(void *data __UNUSED__, int type __UNUSED__, void *event);
+static Eina_Bool _e_mod_log_property_log_change(Ecore_X_Event_Window_Property *ev);
+
+/* local variables */
+static Ecore_X_Atom E_ILLUME_ATOM_ILLUME_LOG;
+static Eina_List *_log_hdls = NULL;
+
+/* external variables */
+int _e_illume_logger_type = LT_NOTHING;
+
+
+int
+e_mod_log_init(void)
+{
+ if (!_e_mod_log_init_atom())
+ {
+ /* creating atom failed, bail out */
+ printf ("Cannot create atom\n");
+ return 0;
+ }
+
+ /* add our event handlers */
+ _e_mod_log_handlers_add();
+
+ return 1;
+}
+
+int
+e_mod_log_shutdown(void)
+{
+ /* remove our event handlers */
+ _e_mod_log_handlers_del();
+
+ return 1;
+}
+
+static int
+_e_mod_log_init_atom(void)
+{
+ 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;
+ }
+
+ return 1;
+}
+
+static void
+_e_mod_log_handlers_add(void)
+{
+ _log_hdls =
+ eina_list_append(_log_hdls,
+ ecore_event_handler_add(ECORE_X_EVENT_WINDOW_PROPERTY,
+ _e_mod_log_cb_window_property,
+ NULL));
+}
+
+static void
+_e_mod_log_handlers_del(void)
+{
+ Ecore_Event_Handler *hdl;
+
+ /* remove the ecore event handlers */
+ EINA_LIST_FREE(_log_hdls, hdl)
+ ecore_event_handler_del(hdl);
+}
+
+static Eina_Bool
+_e_mod_log_cb_window_property(void *data __UNUSED__,
+ int type __UNUSED__,
+ void *event)
+{
+ Ecore_X_Event_Window_Property *ev;
+ ev = event;
+
+ if (ev->atom == E_ILLUME_ATOM_ILLUME_LOG)
+ {
+ _e_mod_log_property_log_change(ev);
+ }
+
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+static Eina_Bool
+_e_mod_log_property_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) _e_illume_logger_type: ", __func__, __LINE__);
+
+ if (_e_illume_logger_type == LT_NOTHING) fprintf(stdout, "LT_NOTHING ");
+ else if (_e_illume_logger_type == LT_ALL ) fprintf(stdout, "LT_ALL " );
+ else
+ {
+ if ((_e_illume_logger_type & LT_STACK) == LT_STACK) fprintf(stdout, "LT_STACK, ");
+ if ((_e_illume_logger_type & LT_NOTIFICATION) == LT_NOTIFICATION) fprintf(stdout, "LT_NOTIFICATION, ");
+ if ((_e_illume_logger_type & LT_NOTIFICATION_LEVEL) == LT_NOTIFICATION_LEVEL) fprintf(stdout, "LT_NOTIFICATION_LEVEL, ");
+ if ((_e_illume_logger_type & LT_VISIBILITY) == LT_VISIBILITY) fprintf(stdout, "LT_VISIBILITY, ");
+ if ((_e_illume_logger_type & LT_LOCK_SCREEN) == LT_LOCK_SCREEN) fprintf(stdout, "LT_LOCK_SCREEN, ");
+ if ((_e_illume_logger_type & LT_ANGLE) == LT_ANGLE) fprintf(stdout, "LT_ANGLE, ");
+ if ((_e_illume_logger_type & LT_TRANSIENT_FOR) == LT_TRANSIENT_FOR) fprintf(stdout, "LT_TRANSIENT_FOR, ");
+ if ((_e_illume_logger_type & LT_QUICKPANEL) == LT_QUICKPANEL) fprintf(stdout, "LT_QUICKPANEL, ");
+ if ((_e_illume_logger_type & LT_KEYBOARD) == LT_KEYBOARD) fprintf(stdout, "LT_KEYBOARD, ");
+ if ((_e_illume_logger_type & LT_ICONIFY) == LT_ICONIFY) fprintf(stdout, "LT_ICONIFY, ");
+ if ((_e_illume_logger_type & LT_DUAL_DISPLAY) == LT_DUAL_DISPLAY) fprintf(stdout, "LT_DUAL_DISPLAY, ");
+ if ((_e_illume_logger_type & LT_AIA) == LT_AIA) fprintf(stdout, "LT_AIA, ");
+ if ((_e_illume_logger_type & LT_INDICATOR) == LT_INDICATOR) fprintf(stdout, "LT_INDICATOR, ");
+ if ((_e_illume_logger_type & LT_FLOATING) == LT_FLOATING) fprintf(stdout, "LT_FLOATING, ");
+ }
+
+ fprintf(stdout, "-> ");
+
+ memcpy(&_e_illume_logger_type, prop_data, sizeof(unsigned int));
+
+ if (_e_illume_logger_type == LT_NOTHING ) fprintf(stdout, "LT_NOTHING\n");
+ else if (_e_illume_logger_type == LT_ALL ) fprintf(stdout, "LT_ALL\n" );
+ else
+ {
+ if ((_e_illume_logger_type & LT_STACK) == LT_STACK)fprintf (stdout, "LT_STACK, ");
+ if ((_e_illume_logger_type & LT_NOTIFICATION) == LT_NOTIFICATION)fprintf (stdout, "LT_NOTIFICATION, ");
+ if ((_e_illume_logger_type & LT_NOTIFICATION_LEVEL) == LT_NOTIFICATION_LEVEL) fprintf(stdout, "LT_NOTIFICATION_LEVEL, ");
+ if ((_e_illume_logger_type & LT_VISIBILITY) == LT_VISIBILITY) fprintf(stdout, "LT_VISIBILITY, ");
+ if ((_e_illume_logger_type & LT_LOCK_SCREEN) == LT_LOCK_SCREEN) fprintf(stdout, "LT_LOCK_SCREEN, ");
+ if ((_e_illume_logger_type & LT_ANGLE) == LT_ANGLE) fprintf(stdout, "LT_ANGLE, ");
+ if ((_e_illume_logger_type & LT_TRANSIENT_FOR) == LT_TRANSIENT_FOR) fprintf(stdout, "LT_TRANSIENT_FOR, ");
+ if ((_e_illume_logger_type & LT_QUICKPANEL) == LT_QUICKPANEL) fprintf(stdout, "LT_QUICKPANEL, ");
+ if ((_e_illume_logger_type & LT_KEYBOARD) == LT_KEYBOARD) fprintf(stdout, "LT_KEYBOARD, ");
+ if ((_e_illume_logger_type & LT_ICONIFY) == LT_ICONIFY) fprintf(stdout, "LT_ICONIFY, ");
+ if ((_e_illume_logger_type & LT_DUAL_DISPLAY) == LT_DUAL_DISPLAY) fprintf(stdout, "LT_DUAL_DISPLAY, ");
+ if ((_e_illume_logger_type & LT_AIA) == LT_AIA) fprintf(stdout, "LT_AIA, ");
+ if ((_e_illume_logger_type & LT_INDICATOR) == LT_INDICATOR) fprintf(stdout, "LT_INDICATOR, ");
+ if ((_e_illume_logger_type & LT_FLOATING) == LT_FLOATING) fprintf(stdout, "LT_FLOATING, ");
+
+ fprintf(stdout, "\n");
+ }
+ }
+
+ if (prop_data) free(prop_data);
+
+ return EINA_TRUE;
+}
+
--- /dev/null
+#ifndef E_MOD_LOG_H
+# define E_MOD_LOG_H
+
+int e_mod_log_init(void);
+int e_mod_log_shutdown(void);
+
+#endif
--- /dev/null
+#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"
+#include "e_mod_log.h"
+#include "e_mod_floating_window.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;
+ }
+
+#if ILLUME_LOGGER_BUILD_ENABLE
+ if (!e_mod_log_init())
+ {
+ /* 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 NULL;
+ }
+#endif /* ILLUME_LOGGER_BUILD_ENABLE */
+
+ /* initialize the quickpanel subsystem */
+ e_mod_quickpanel_init();
+ e_mod_floating_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();
+
+#if ILLUME_LOGGER_BUILD_ENABLE
+ /* shutdown the log subsystem */
+ e_mod_log_shutdown();
+#endif /* ILLUME_LOGGER_BUILD_ENABLE */
+
+ /* 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();
+
+ e_mod_floating_shutdown();
+
+#if ILLUME_LOGGER_BUILD_ENABLE
+ /* shutdown the log subsystem */
+ e_mod_log_shutdown();
+#endif /* ILLUME_LOGGER_BUILD_ENABLE */
+
+ /* 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();
+}
--- /dev/null
+#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
--- /dev/null
+#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_border_move(void *data __UNUSED__, int type __UNUSED__, void *event);
+static Eina_Bool _e_mod_policy_cb_border_iconify(void *data __UNUSED__, int type __UNUSED__, void *event);
+static Eina_Bool _e_mod_policy_cb_border_uniconify(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 Eina_Bool _e_mod_policy_cb_window_move_resize_request(void *data __UNUSED__, int type __UNUSED__, void *event);
+static Eina_Bool _e_mod_policy_cb_window_state_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 void _e_mod_policy_cb_hook_new_border(void *data __UNUSED__, void *data2);
+#ifdef _F_BORDER_HOOK_PATCH_
+static void _e_mod_policy_cb_hook_del_border(void *data __UNUSED__, void *data2);
+#endif
+
+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);
+static Eina_Bool _e_mod_policy_cb_border_zone_set(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);
+
+static Eina_Bool _e_mod_policy_zonelist_update(void);
+static Eina_Bool _e_mod_policy_cb_zone_add(void *data __UNUSED__, int type __UNUSED__, void *event);
+static Eina_Bool _e_mod_policy_cb_zone_del(void *data __UNUSED__, int type __UNUSED__, void *event);
+
+static Eina_Bool _e_mod_policy_cb_module_update(void *data __UNUSED__, int type __UNUSED__, void *event);
+
+static Eina_Bool _e_mod_policy_cb_idle_enterer(void *data __UNUSED__);
+
+/* 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;
+static Ecore_X_Atom E_ILLUME_USER_CREATED_WINDOW = 0;
+static Ecore_X_Atom E_ILLUME_PARENT_BORDER_WINDOW = 0;
+static Ecore_X_Atom E_ILLUME_ZONE_GEOMETRY = 0;
+
+static Ecore_X_Atom E_ILLUME_ATOM_DESK_TOP_WIN_DESK_CHANGE = 0;
+static Ecore_X_Atom E_ILLUME_ATOM_DESK_NEXT_SHOW = 0;
+
+static Ecore_Idle_Enterer *_idle_enterer = NULL;
+
+/* 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();
+
+ _idle_enterer = ecore_idle_enterer_add(_e_mod_policy_cb_idle_enterer, NULL);
+
+ /* 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);
+
+ if (_idle_enterer) ecore_idle_enterer_del(_idle_enterer);
+ _idle_enterer = NULL;
+
+ /* 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_MOVE,
+ _e_mod_policy_cb_border_move,
+ 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_BORDER_ZONE_SET,
+ _e_mod_policy_cb_border_zone_set, 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));
+ _policy_hdls =
+ eina_list_append(_policy_hdls,
+ ecore_event_handler_add(ECORE_X_EVENT_WINDOW_MOVE_RESIZE_REQUEST,
+ _e_mod_policy_cb_window_move_resize_request, NULL));
+ _policy_hdls =
+ eina_list_append(_policy_hdls,
+ ecore_event_handler_add(ECORE_X_EVENT_WINDOW_STATE_REQUEST,
+ _e_mod_policy_cb_window_state_request,
+ NULL));
+
+ _policy_hdls =
+ eina_list_append(_policy_hdls,
+ ecore_event_handler_add(E_EVENT_ZONE_ADD,
+ _e_mod_policy_cb_zone_add, NULL));
+ _policy_hdls =
+ eina_list_append(_policy_hdls,
+ ecore_event_handler_add(E_EVENT_ZONE_DEL,
+ _e_mod_policy_cb_zone_del, NULL));
+
+
+ _policy_hdls =
+ eina_list_append(_policy_hdls,
+ ecore_event_handler_add(E_EVENT_BORDER_ICONIFY,
+ _e_mod_policy_cb_border_iconify,
+ NULL));
+
+ _policy_hdls =
+ eina_list_append(_policy_hdls,
+ ecore_event_handler_add(E_EVENT_BORDER_UNICONIFY,
+ _e_mod_policy_cb_border_uniconify,
+ NULL));
+
+
+ _policy_hdls =
+ eina_list_append(_policy_hdls,
+ ecore_event_handler_add(E_EVENT_MODULE_UPDATE,
+ _e_mod_policy_cb_module_update,
+ 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));
+ _policy_hooks =
+ eina_list_append(_policy_hooks,
+ e_border_hook_add(E_BORDER_HOOK_NEW_BORDER,
+ _e_mod_policy_cb_hook_new_border, NULL));
+#ifdef _F_BORDER_HOOK_PATCH_
+ _policy_hooks =
+ eina_list_append(_policy_hooks,
+ e_border_hook_add(E_BORDER_HOOK_DEL_BORDER,
+ _e_mod_policy_cb_hook_del_border, NULL));
+#endif
+}
+
+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;
+
+ 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, E_ILLUME_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_border_move(void *data __UNUSED__, int type __UNUSED__, void *event)
+{
+ E_Event_Border_Move *ev;
+
+ ev = event;
+ if ((_policy) && (_policy->funcs.border_move))
+ _policy->funcs.border_move(ev->border);
+
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+static Eina_Bool
+_e_mod_policy_cb_border_iconify(void *data __UNUSED__, int type __UNUSED__, void *event)
+{
+ E_Event_Border_Iconify *ev;
+
+ ev = event;
+ if ((_policy) && (_policy->funcs.border_iconify_cb))
+ _policy->funcs.border_iconify_cb(ev->border);
+
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+static Eina_Bool
+_e_mod_policy_cb_border_uniconify(void *data __UNUSED__, int type __UNUSED__, void *event)
+{
+ E_Event_Border_Uniconify *ev;
+
+ ev = event;
+ if ((_policy) && (_policy->funcs.border_uniconify_cb))
+ _policy->funcs.border_uniconify_cb(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);
+ }
+ else if (ev->message_type == E_ILLUME_ATOM_DESK_TOP_WIN_DESK_CHANGE)
+ {
+ if ((_policy) && (_policy->funcs.window_desk_set))
+ _policy->funcs.window_desk_set(ev);
+ }
+ else if (ev->message_type == ECORE_X_ATOM_E_ILLUME_WINDOW_STATE)
+ {
+ if ((_policy) && (_policy->funcs.illume_win_state_change_request))
+ _policy->funcs.illume_win_state_change_request(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 void
+_e_mod_policy_cb_hook_new_border(void *data __UNUSED__, void *data2)
+{
+ E_Border *bd;
+
+ if (!(bd = data2)) return;
+
+ ecore_x_window_prop_window_set(bd->win, E_ILLUME_USER_CREATED_WINDOW, &(bd->client.win), 1);
+ ecore_x_window_prop_window_set(bd->client.win, E_ILLUME_PARENT_BORDER_WINDOW, &(bd->win), 1);
+
+ if ((_policy) && (_policy->funcs.border_new_border))
+ _policy->funcs.border_new_border(bd);
+}
+
+#ifdef _F_BORDER_HOOK_PATCH_
+static void
+_e_mod_policy_cb_hook_del_border(void *data __UNUSED__, void *data2)
+{
+ E_Border *bd;
+
+ if (!(bd = data2)) return;
+ if ((_policy) && (_policy->funcs.border_del_border))
+ _policy->funcs.border_del_border(bd);
+}
+
+#endif
+
+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;
+
+ if ((_policy) && (_policy->funcs.window_configure_request))
+ _policy->funcs.window_configure_request(ev);
+
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+static Eina_Bool
+_e_mod_policy_cb_window_move_resize_request(void *data __UNUSED__, int type __UNUSED__, void *event)
+{
+ Ecore_X_Event_Window_Move_Resize_Request *ev = event;
+
+ if ((_policy) && (_policy->funcs.window_move_resize_request))
+ _policy->funcs.window_move_resize_request(ev);
+
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+static Eina_Bool
+_e_mod_policy_cb_window_state_request(void *data __UNUSED__, int type __UNUSED__, void *event)
+{
+ Ecore_X_Event_Window_State_Request *ev = event;
+
+ if ((_policy) && (_policy->funcs.window_state_request))
+ _policy->funcs.window_state_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);
+ }
+ }
+
+ /* 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);
+ }
+}
+
+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;
+ }
+
+ E_ILLUME_USER_CREATED_WINDOW = ecore_x_atom_get("_E_USER_CREATED_WINDOW");
+ if (!E_ILLUME_USER_CREATED_WINDOW)
+ {
+ fprintf(stderr,
+ "[ILLUME2] cannot create _E_USER_CREATED_WINDOW atom.\n");
+ return 0;
+ }
+
+ E_ILLUME_PARENT_BORDER_WINDOW = ecore_x_atom_get("_E_PARENT_BORDER_WINDOW");
+ if (!E_ILLUME_PARENT_BORDER_WINDOW)
+ {
+ fprintf(stderr,
+ "[ILLUME2] cannot create _E_PARENT_BORDER_WINDOW atom.\n");
+ return 0;
+ }
+
+ E_ILLUME_ZONE_GEOMETRY = ecore_x_atom_get("_E_ILLUME_ZONE_GEOMETRY");
+ if (!E_ILLUME_ZONE_GEOMETRY)
+ {
+ fprintf(stderr,
+ "[ILLUME2] cannot create _E_ILLUME_ZONE_GEOMETRY atom.\n");
+ return 0;
+ }
+
+ E_ILLUME_ATOM_DESK_TOP_WIN_DESK_CHANGE =
+ ecore_x_atom_get ("_E_ILLUME_ATOM_DESK_TOP_WIN_DESK_CHANGE");
+ if(!E_ILLUME_ATOM_DESK_TOP_WIN_DESK_CHANGE)
+ {
+ fprintf (stderr, "[ILLUME2] Critical Error!!! Cannot create _E_COMP_ENABLE Atom...\n");
+ return 0;
+ }
+
+ E_ILLUME_ATOM_DESK_NEXT_SHOW =
+ ecore_x_atom_get ("_E_ILLUME_ATOM_DESK_NEXT_SHOW");
+ if(!E_ILLUME_ATOM_DESK_NEXT_SHOW)
+ {
+ fprintf (stderr, "[ILLUME2] Critical Error!!! Cannot create _E_COMP_ENABLE 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;
+}
+
+static Eina_Bool
+_e_mod_policy_cb_border_zone_set(void *data __UNUSED__, int type __UNUSED__, void *event)
+{
+ E_Event_Border_Zone_Set *ev;
+ ev = event;
+
+ if ((_policy) && (_policy->funcs.border_zone_set))
+ _policy->funcs.border_zone_set(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;
+}
+
+static Eina_Bool
+_e_mod_policy_zonelist_update(void)
+{
+ Eina_List *ml, *cl, *zl;
+ E_Manager *man;
+ E_Container *con;
+ E_Zone *zone;
+ Ecore_X_Window *zones;
+ int zcount = 0;
+
+ /* 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) return EINA_FALSE;
+
+ zcount = 0;
+
+ /* loop the zones and set zone list */
+ 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;
+
+ zones[zcount] = zone->black_win;
+ zcount++;
+ }
+ }
+
+ ecore_x_e_illume_zone_list_set(man->root, zones, zcount);
+ }
+
+ free(zones);
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_policy_cb_zone_add(void *data __UNUSED__, int type __UNUSED__, void *event)
+{
+ E_Event_Zone_Add *ev;
+ E_Zone *zone;
+ unsigned int geom[4];
+
+ ev = event;
+ zone = ev->zone;
+
+ geom[0] = zone->x;
+ geom[1] = zone->y;
+ geom[2] = zone->w;
+ geom[3] = zone->h;
+ ecore_x_window_prop_card32_set(zone->black_win, E_ILLUME_ZONE_GEOMETRY,
+ geom, 4);
+
+ _e_mod_policy_zonelist_update();
+
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+static Eina_Bool
+_e_mod_policy_cb_zone_del(void *data __UNUSED__, int type __UNUSED__, void *event)
+{
+ E_Event_Zone_Del *ev;
+ E_Zone *zone;
+
+ ev = event;
+ zone = ev->zone;
+
+ _e_mod_policy_zonelist_update();
+
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+static Eina_Bool
+_e_mod_policy_cb_module_update(void *data __UNUSED__, int type __UNUSED__, void *event)
+{
+ E_Event_Module_Update *ev;
+ ev = event;
+
+ if ((_policy) && (_policy->funcs.module_update))
+ _policy->funcs.module_update(ev);
+
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+static Eina_Bool
+_e_mod_policy_cb_idle_enterer(void *data __UNUSED__)
+{
+ if ((_policy) && (_policy->funcs.idle_enterer))
+ _policy->funcs.idle_enterer();
+
+ return ECORE_CALLBACK_RENEW;
+}
--- /dev/null
+#ifndef E_MOD_POLICY_H
+# define E_MOD_POLICY_H
+
+int e_mod_policy_init(void);
+int e_mod_policy_shutdown(void);
+
+#endif
--- /dev/null
+#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 Eina_Bool _e_mod_quickpanel_cb_border_show(void *data __UNUSED__, int type __UNUSED__, void *event);
+static Eina_Bool _e_mod_quickpanel_cb_border_zone_set(void *data __UNUSED__, int type __UNUSED__, void *event);
+EINTERN Eina_Bool _e_mod_quickpanel_cb_border_stack(void *data __UNUSED__, int type __UNUSED__, void *event);
+
+static void _e_mod_quickpanel_cb_post_fetch(void *data __UNUSED__, void *data2);
+EINTERN void _e_mod_quickpanel_cb_hook_layout(void *data __UNUSED__, void *data2);
+static void _e_mod_quickpanel_cb_free(E_Illume_Quickpanel *qp);
+
+static void _e_mod_quickpanel_position_update(E_Illume_Quickpanel *qp);
+
+static void _e_quickpanel_handle_input_region_set (Ecore_X_Window win, int x, int y, int w, int h);
+static void _e_quickpanel_layout_position_set (Ecore_X_Window win, int x, int y);
+
+static void _e_quickpanel_position_update(E_Illume_Quickpanel *qp);
+static int _e_quickpanel_priority_sort_cb (const void* d1, const void* d2);
+static int _e_mod_quickpanel_root_angle_get (E_Illume_Quickpanel* qp);
+
+static Ecore_X_Window _e_mod_quickpanel_active_window_get(Ecore_X_Window root);
+static void _e_mod_quickpanel_property_root_angle_change(Ecore_X_Event_Window_Property *event);
+static void _e_mod_quickpanel_property_active_win_change(Ecore_X_Event_Window_Property *event);
+
+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_send_message (E_Illume_Quickpanel *qp, Ecore_X_Illume_Quickpanel_State state);
+
+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 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);
+
+/* for changeable layer of quickpanel window */
+EINTERN Eina_Bool _e_mod_quickpanel_layer_fetch(E_Illume_Quickpanel *qp, E_Border *bd);
+EINTERN void _e_mod_quickpanel_layer_update(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;
+
+static Ecore_X_Atom quickpanel_layout_position_atom = 0;
+static Ecore_X_Atom quickpanel_handle_input_region_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));
+
+ _qp_hdls =
+ eina_list_append(_qp_hdls,
+ ecore_event_handler_add(E_EVENT_BORDER_SHOW,
+ _e_mod_quickpanel_cb_border_show,
+ NULL));
+ _qp_hdls =
+ eina_list_append(_qp_hdls,
+ ecore_event_handler_add(E_EVENT_BORDER_ZONE_SET,
+ _e_mod_quickpanel_cb_border_zone_set,
+ NULL));
+
+ _qp_hdls =
+ eina_list_append(_qp_hdls,
+ ecore_event_handler_add(E_EVENT_BORDER_STACK,
+ _e_mod_quickpanel_cb_border_stack,
+ 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);
+
+ _qp_hook = e_border_hook_add(E_BORDER_HOOK_CONTAINER_LAYOUT,
+ _e_mod_quickpanel_cb_hook_layout, 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;
+
+ /* 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;
+
+ qp->key_hdl = NULL;
+
+ return qp;
+}
+
+
+void e_mod_quickpanel_show(E_Illume_Quickpanel *qp, int isAni)
+{
+}
+
+
+void e_mod_quickpanel_hide(E_Illume_Quickpanel *qp, int isAni)
+{
+}
+
+/* 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;
+ }
+
+ quickpanel_layout_position_atom = ecore_x_atom_get ("_E_COMP_QUICKPANEL_LAYOUT_POSITION");
+ if( !quickpanel_layout_position_atom)
+ {
+ fprintf (stderr, "[ILLUME2][QP] Critical Error!!! Cannot create _E_COMP_QUICKPANEL_LAYOUT_POSITION Atom...\n");
+ return EINA_FALSE;
+ }
+
+ quickpanel_handle_input_region_atom = ecore_x_atom_get ("_E_COMP_WINDOW_INPUT_REGION");
+ if( !quickpanel_handle_input_region_atom)
+ {
+ fprintf (stderr, "[ILLUME2][QP] Critical Error!!! Cannot create _E_COMP_WINDOW_INPUT_REGION 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;
+
+ if (ev->message_type == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE)
+ {
+ // TODO: do something
+ }
+ else if (ev->message_type == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE_TOGGLE)
+ {
+ // TODO: do something
+ }
+ else if (ev->message_type == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_POSITION_UPDATE)
+ {
+ // TODO: do something
+ }
+ /* 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();
+ }
+
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+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;
+ E_Border *bd = NULL, *active_bd = NULL;
+ Ecore_X_Window root, active_win;
+
+ 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;
+ qp->vert.isize = qp->ind->h;
+ }
+ return ECORE_CALLBACK_PASS_ON;
+ }
+
+ if (e_illume_border_is_quickpanel_popup (ev->border))
+ {
+ L(LT_QUICKPANEL, "[ILLUME2][QP] %s(%d).. QUICKPANEL POPUP... win:%x\n", __func__, __LINE__, ev->border->client.win);
+ if ((qp = e_illume_quickpanel_by_zone_get(ev->border->zone)))
+ {
+ if (qp->borders)
+ {
+ E_Border* bd_last = NULL;
+ Eina_List *bd_list;
+
+ EINA_LIST_FOREACH(qp->borders, bd_list, panel)
+ {
+ if (!panel) continue;
+ bd_last = panel->bd;
+ }
+ L(LT_QUICKPANEL, "[ILLUME2][QP] %s(%d).. QUICKPANEL POPUP (win:%x) is placed under qp:%x\n", __func__, __LINE__, ev->border->client.win, bd_last ? bd_last->client.win:(unsigned int)NULL);
+ if (bd_last)
+ e_border_stack_below(ev->border, bd_last);
+ }
+ else if (qp->ind)
+ {
+ L(LT_QUICKPANEL, "[ILLUME2][QP] %s(%d).. QUICKPANEL POPUP (win:%x) is placed under indicator:%x\n", __func__, __LINE__, ev->border->client.win, qp->ind->client.win);
+ e_border_stack_below (ev->border, qp->ind);
+ }
+ }
+
+ 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;
+
+ // store the quickpanel's border window
+ // and fetch the layer
+ if (e_illume_border_is_quickpanel(ev->border))
+ {
+ qp->bd = ev->border;
+
+ root = ecore_x_window_root_get(qp->bd->win);
+ active_win = _e_mod_quickpanel_active_window_get(root);
+ if (active_win)
+ {
+ active_bd = e_border_find_by_client_window(active_win);
+ if (active_bd)
+ qp->changes.layer = _e_mod_quickpanel_layer_fetch(qp, active_bd);
+ else
+ {
+ qp->layer = POL_QUICKPANEL_LAYER;
+ qp->changes.layer = 1;
+ }
+
+ L(LT_QUICKPANEL, "[ILLUME2][QP] %s(%d).. Initializing QP layer: %d\n",
+ __func__, __LINE__, qp->layer);
+
+ if (qp->changes.layer) qp->changed = 1;
+ }
+ }
+
+ // 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->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);
+ 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);
+
+ _e_quickpanel_position_update(qp);
+
+ // set transient_for to base window
+ if (qp->popup)
+ {
+ L(LT_QUICKPANEL, "[ILLUME2][QP] %s(%d)... TRANSIENT_FOR.. win:%x, transient_win:%x\n", __func__, __LINE__, ev->border->client.win, qp->popup->evas_win);
+ ecore_x_icccm_transient_for_set (ev->border->client.win, qp->popup->evas_win);
+ }
+
+ 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;
+
+ // for changeable quickpanel layer
+ qp->bd = NULL;
+ qp->layer = 0;
+ qp->changes.layer = 0;
+ qp->changed = 0;
+
+ 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);
+
+ // set transient_for to base window
+ if (qp->popup && new_panel->bd)
+ {
+ L(LT_QUICKPANEL, "[ILLUME2][QP] %s(%d)... TRANSIENT_FOR.. win:%x, transient_win:%x\n", __func__, __LINE__, ev->border->client.win, qp->popup->evas_win);
+ ecore_x_icccm_transient_for_set (new_panel->bd->client.win, qp->popup->evas_win);
+ }
+ }
+ 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_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_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 Ecore_X_Window
+_e_mod_quickpanel_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 void
+_e_mod_quickpanel_property_root_angle_change(Ecore_X_Event_Window_Property *event)
+{
+ 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)
+ {
+ old_angle = qp->angle;
+ qp->angle = _e_mod_quickpanel_root_angle_get (qp);
+
+ if (qp->angle != old_angle)
+ {
+ L(LT_QUICKPANEL, "[ILLUME2][QP] %s(%d)... angle:%d\n", __func__, __LINE__, qp->angle);
+ _e_quickpanel_position_update(qp);
+ }
+ }
+ }
+}
+
+static void
+_e_mod_quickpanel_property_active_win_change(Ecore_X_Event_Window_Property *event)
+{
+ Ecore_X_Window active_win;
+ E_Border* active_bd;
+ E_Illume_Quickpanel *qp;
+
+ active_win = _e_mod_quickpanel_active_window_get(event->win);
+ if (!active_win) return;
+
+ active_bd = e_border_find_by_client_window(active_win);
+ if (!active_bd) return;
+
+ if (!(qp = e_illume_quickpanel_by_zone_get(active_bd->zone)))
+ return;
+
+ // Updating quickpanel's layer by active window
+ if (e_illume_border_is_quickpanel(active_bd) == EINA_FALSE)
+ {
+ qp->changes.layer = _e_mod_quickpanel_layer_fetch(qp, active_bd);
+ if (qp->changes.layer)
+ {
+ L(LT_QUICKPANEL, "[ILLUME2][QP] %s(%d).. Fetch QP layer: %d\n",
+ __func__, __LINE__, qp->layer);
+ qp->changed = 1;
+ }
+ }
+
+ if (e_illume_border_is_lock_screen(active_bd))
+ {
+ if (!qp->is_lock)
+ {
+ L(LT_QUICKPANEL, "[ILLUME2][QP] line:%d.. LOCK SCREEN....\n", __LINE__);
+ qp->is_lock = EINA_TRUE;
+ _e_quickpanel_position_update(qp);
+ }
+ }
+ else
+ {
+ if (qp->is_lock)
+ {
+ L(LT_QUICKPANEL, "[ILLUME2][QP] line:%d.. UNLOCK SCREEN....\n", __LINE__);
+ qp->is_lock = EINA_FALSE;
+ _e_quickpanel_position_update(qp);
+ }
+ }
+}
+
+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_mod_quickpanel_property_root_angle_change(ev);
+ }
+ else if (ev->atom == ECORE_X_ATOM_NET_ACTIVE_WINDOW)
+ {
+ _e_mod_quickpanel_property_active_win_change(ev);
+ }
+
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+static Eina_Bool _e_mod_quickpanel_cb_border_show(void *data __UNUSED__, int type __UNUSED__, void *event)
+{
+ E_Event_Border_Show *ev;
+
+ ev = event;
+ if (ev->border->client.illume.quickpanel.quickpanel ||
+ e_illume_border_is_quickpanel_popup (ev->border))
+ {
+ e_border_move (ev->border, -ev->border->zone->w, -ev->border->zone->h);
+ }
+
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+static Eina_Bool _e_mod_quickpanel_cb_border_zone_set(void *data __UNUSED__, int type __UNUSED__, void *event)
+{
+ E_Event_Border_Zone_Set *ev;
+
+ ev = event;
+ if (ev->border->client.illume.quickpanel.quickpanel ||
+ e_illume_border_is_quickpanel_popup(ev->border))
+ {
+ e_border_move(ev->border, -ev->border->zone->w, -ev->border->zone->h);
+ }
+
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+EINTERN Eina_Bool
+_e_mod_quickpanel_cb_border_stack(void *data __UNUSED__, int type __UNUSED__, void *event)
+{
+ E_Event_Border_Stack *ev = event;
+ E_Illume_Quickpanel *qp = NULL;
+ Ecore_X_Window root, active_win;
+
+ if (!ev) return ECORE_CALLBACK_PASS_ON;
+ if (e_illume_border_is_quickpanel(ev->border)) return ECORE_CALLBACK_PASS_ON;
+
+ root = ecore_x_window_root_get(ev->border->win);
+ active_win = _e_mod_quickpanel_active_window_get(root);
+ if (!active_win) return ECORE_CALLBACK_PASS_ON;
+
+ // fetching quickpanel's layer
+ if (ev->border->client.win == active_win)
+ {
+ qp = e_illume_quickpanel_by_zone_get(ev->border->zone);
+ if (qp)
+ {
+ qp->changes.layer = _e_mod_quickpanel_layer_fetch(qp, ev->border);
+ if (qp->changes.layer)
+ {
+ L(LT_QUICKPANEL, "[ILLUME2][QP] %s(%d).. Fetch QP layer: %d\n",
+ __func__, __LINE__, qp->layer);
+ qp->changed = 1;
+ }
+ }
+ }
+
+ 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 ||
+ e_illume_border_is_quickpanel_popup (bd))
+ {
+ bd->stolen = 1;
+ }
+
+}
+
+EINTERN void
+_e_mod_quickpanel_cb_hook_layout(void *data __UNUSED__, void *data2)
+{
+ Eina_List *zl;
+ E_Container *con;
+ E_Zone *zone;
+ E_Illume_Quickpanel *qp = NULL;
+
+ con = (E_Container *)data2;
+ if (!con) return;
+
+ EINA_LIST_FOREACH(con->zones, zl, zone)
+ {
+ qp = e_illume_quickpanel_by_zone_get(zone);
+
+ if (!qp) continue;
+ if (!qp->bd) continue;
+ if (!qp->changed) continue;
+ qp->changed = 0;
+
+ if (qp->changes.layer)
+ {
+ _e_mod_quickpanel_layer_update(qp);
+ qp->changes.layer = 0;
+ }
+ }
+}
+
+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_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 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)
+{
+ if (!qp) return -1;
+
+ 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-tizen/quickpanel/base");
+ evas_object_resize(qp->ly_base, qp->zone->w, qp->zone->h);
+
+ evas_object_show(qp->ly_base);
+ return 0;
+}
+
+
+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 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);
+
+ qp->popup = e_win_new (qp->zone->container);
+ if (!qp->popup) return EINA_FALSE;
+
+ ecore_x_icccm_hints_set(qp->popup->evas_win, 0, 0, 0, 0, 0, 0, 0);
+ ecore_x_icccm_name_class_set(qp->popup->evas_win, "QUICKPANEL_BASE", "QUICKPANEL_BASE");
+ e_win_show(qp->popup);
+ e_win_move_resize (qp->popup, qp->zone->x, qp->zone->y - qp->zone->h,
+ qp->zone->w, qp->zone->h);
+
+ e_win_title_set (qp->popup, "quickpanel_base");
+
+ 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);
+
+ return EINA_TRUE;
+}
+
+static void _e_mod_quickpanel_popup_del (E_Illume_Quickpanel* qp)
+{
+ if (!qp) return;
+ if (!qp->popup) return;
+
+ _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;
+ int handle_x, handle_y, handle_w, handle_h;
+
+ 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)
+ {
+ handle_w = qp->zone->w;
+ handle_h = POPUP_HANDLER_SIZE * qp->scale;
+
+ if (qp->ind) extra_h = qp->ind->h + handle_h;
+ else extra_h = handle_h;
+
+ if (!qp->is_lock)
+ {
+ if (qp->angle == 0)
+ {
+ handle_x = qp->zone->x;
+ handle_y = qp->zone->h - handle_h;
+ }
+ else // qp->angle == 180
+ {
+ handle_x = qp->zone->x;
+ handle_y = qp->zone->y;
+ }
+
+ e_win_resize (qp->popup, w, h);
+ evas_object_resize (qp->ly_base, w, h);
+
+ _e_quickpanel_handle_input_region_set (qp->popup->evas_win, handle_x, handle_y, handle_w, handle_h);
+ }
+ else
+ {
+ if (qp->angle == 0)
+ {
+ tx = qp->zone->x;
+ ty = qp->zone->y;
+
+ handle_x = qp->zone->x;
+ handle_y = h + extra_h - handle_h;
+ }
+ else // qp->angle == 180
+ {
+ tx = qp->zone->x;
+ ty = qp->zone->h - (h + extra_h);
+
+ handle_x = qp->zone->x;
+ handle_y = qp->zone->h - (h+ extra_h);
+ }
+
+ e_win_resize(qp->popup, w, h + extra_h);
+ evas_object_resize (qp->ly_base, w, h + extra_h);
+
+ _e_quickpanel_handle_input_region_set (qp->popup->evas_win, handle_x, handle_y, handle_w, handle_h);
+ }
+ }
+ else
+ {
+ handle_w = POPUP_HANDLER_SIZE * qp->scale;
+ handle_h = qp->zone->h;
+
+ if (qp->ind) extra_h = qp->ind->w + handle_w;
+ else extra_h = handle_w;
+
+ if (!qp->is_lock)
+ {
+ if (qp->angle == 90)
+ {
+ handle_x = qp->zone->w - handle_w;
+ handle_y = qp->zone->y;
+ }
+ else // qp->angle == 270
+ {
+ handle_x = qp->zone->x;
+ handle_y = qp->zone->y;
+ }
+
+ e_win_resize (qp->popup, w, h);
+ evas_object_resize (qp->ly_base, h, w);
+
+ _e_quickpanel_handle_input_region_set (qp->popup->evas_win, handle_x, handle_y, handle_w, handle_h);
+ }
+ else
+ {
+ if (qp->angle == 90)
+ {
+ handle_x = w + extra_h - handle_w;
+ handle_y = qp->zone->y;
+ }
+ else // qp->angle == 270
+ {
+ handle_x = qp->zone->w - (w + extra_h);
+ handle_y = qp->zone->y;
+ }
+
+ e_win_resize(qp->popup, w + extra_h, h);
+ evas_object_resize( qp->ly_base, h, w + extra_h);
+
+ _e_quickpanel_handle_input_region_set (qp->popup->evas_win, handle_x, handle_y, handle_w, handle_h);
+ }
+ }
+ L(LT_QUICKPANEL, "[ILLUME2][QP] %s(%d)... angle:%d\n", __func__, __LINE__, qp->angle);
+ ecore_evas_rotation_with_resize_set(qp->popup->ecore_evas, qp->angle);
+
+ return EINA_TRUE;
+}
+
+
+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_handle_input_region_set(Ecore_X_Window win, int x, int y, int w, int h)
+{
+ unsigned int position_list[4];
+
+ position_list[0] = x;
+ position_list[1] = y;
+ position_list[2] = w;
+ position_list[3] = h;
+
+ L(LT_QUICKPANEL, "[ILLUME2][QP] Position SET... win:%x, x:%d, y:%d, w:%d, h:%d\n", win, x, y, w, h);
+
+ ecore_x_window_prop_card32_set(win,
+ quickpanel_handle_input_region_atom,
+ position_list,
+ 4);
+}
+
+static void
+_e_quickpanel_layout_position_set(Ecore_X_Window win, int x, int y)
+{
+ unsigned int position_list[2];
+
+ position_list[0] = x;
+ position_list[1] = y;
+
+ L(LT_QUICKPANEL, "[ILLUME2][QP] LAYOUT SET... win:%x, x:%d, y:%d\n", win, x, y);
+
+ ecore_x_window_prop_card32_set( win,
+ quickpanel_layout_position_atom,
+ position_list,
+ 2);
+}
+
+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)
+ {
+ ty = qp->vert.isize;
+ if (qp->vert.dir == 1) ty = 0;
+
+ EINA_LIST_FOREACH(qp->borders, l, panel)
+ {
+ if (!panel) continue;
+
+ if (qp->is_lock)
+ {
+ if (!panel->mini_controller)
+ {
+ _e_quickpanel_layout_position_set(panel->bd->client.win, -qp->zone->w, -qp->zone->h);
+ continue;
+ }
+ }
+
+ if (qp->angle == 0)
+ {
+ _e_quickpanel_layout_position_set (panel->bd->client.win, 0, ty);
+ ty += panel->bd->h;
+ }
+ else if (qp->angle == 180)
+ {
+ ty += panel->bd->h;
+ _e_quickpanel_layout_position_set (panel->bd->client.win, 0, qp->zone->h - ty);
+ }
+ else if (qp->angle == 90)
+ {
+ _e_quickpanel_layout_position_set (panel->bd->client.win, ty, 0);
+ ty += panel->bd->w;
+ }
+ else if (qp->angle == 270)
+ {
+ ty += panel->bd->w;
+ _e_quickpanel_layout_position_set (panel->bd->client.win, qp->zone->w - ty, 0);
+ }
+ }
+ _e_mod_quickpanel_popup_update (qp);
+ }
+}
+
+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);
+}
+
+/* for changeable layer of quickpanel, it will be updated by idle_enterer in policy.
+ NB: The layer of quickpanel will be set above the POL_QUICKPANEL_LAYER,
+ even if given border's layer is under the POL_QUICKPANEL_LAYER. */
+EINTERN Eina_Bool
+_e_mod_quickpanel_layer_fetch(E_Illume_Quickpanel *qp, E_Border *bd)
+{
+ Eina_Bool ret = EINA_FALSE;
+
+ if (!qp) return EINA_FALSE;
+ if (!bd) return EINA_FALSE;
+
+ if (qp->layer == POL_QUICKPANEL_LAYER)
+ {
+ if (bd->layer >= POL_QUICKPANEL_LAYER)
+ {
+ qp->layer = bd->layer;
+ ret = EINA_TRUE;
+ }
+ }
+ else
+ {
+ if (bd->layer <= POL_QUICKPANEL_LAYER)
+ qp->layer = POL_QUICKPANEL_LAYER;
+ else
+ qp->layer = bd->layer;
+
+ ret = EINA_TRUE;
+ }
+
+ if (qp->changes.layer) ret = EINA_TRUE;
+
+ return ret;
+}
+
+EINTERN void
+_e_mod_quickpanel_layer_update(E_Illume_Quickpanel *qp)
+{
+ if (!qp) return;
+
+ if (qp->layer < POL_QUICKPANEL_LAYER)
+ qp->layer = POL_QUICKPANEL_LAYER;
+
+ L(LT_QUICKPANEL, "[ILLUME2][QP] %s(%d).. Updating QP layer: %d\n",
+ __func__, __LINE__, qp->layer);
+ e_border_layer_set(qp->bd, qp->layer);
+}
--- /dev/null
+#ifndef E_MOD_QUICKPANEL_H
+# define E_MOD_QUICKPANEL_H
+
+# define E_ILLUME_QP_TYPE 0xE1b0990
+
+#define ILLUME_PREFIX "/usr/lib/enlightenment/modules/illume2-tizen/"
+#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
--- /dev/null
+#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;
+}
--- /dev/null
+#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
--- /dev/null
+MAINTAINERCLEANFILES = Makefile.in
+
+EXTRA_DIST = module_icon.png split-h.png
--- /dev/null
+MAINTAINERCLEANFILES = Makefile.in
+SUBDIRS = illume
--- /dev/null
+MAINTAINERCLEANFILES = Makefile.in
+MODULE = illume2-tizen
+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
+
--- /dev/null
+#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.border_move = _policy_border_cb_move;
+ 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_zone_set = _policy_border_zone_set;
+
+ p->funcs.border_post_new_border = _policy_border_post_new_border;
+ p->funcs.border_pre_fetch = _policy_border_pre_fetch;
+ p->funcs.border_new_border = _policy_border_new_border;
+#ifdef _F_BORDER_HOOK_PATCH_
+ p->funcs.border_del_border = _policy_border_del_border;
+#endif
+
+ p->funcs.window_configure_request = _policy_window_configure_request;
+
+ p->funcs.border_iconify_cb = _policy_border_iconify_cb;
+ p->funcs.border_uniconify_cb = _policy_border_uniconify_cb;
+
+ /* 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;
+
+ p->funcs.window_desk_set = _policy_window_desk_set;
+
+ p->funcs.window_move_resize_request = _policy_window_move_resize_request;
+ p->funcs.window_state_request = _policy_window_state_request;
+
+ p->funcs.module_update = _policy_module_update;
+
+ p->funcs.idle_enterer = _policy_idle_enterer;
+
+ p->funcs.illume_win_state_change_request = _policy_illume_win_state_change_request;
+
+ 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.border_move = 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_zone_set = NULL;
+
+ p->funcs.border_post_new_border = NULL;
+ p->funcs.border_pre_fetch = NULL;
+ p->funcs.border_new_border = NULL;
+#ifdef _F_BORDER_HOOK_PATCH_
+ p->funcs.border_del_border = NULL;
+#endif
+ p->funcs.window_configure_request = NULL;
+
+ p->funcs.border_iconify_cb = NULL;
+ p->funcs.border_uniconify_cb = 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;
+
+ p->funcs.window_desk_set = NULL;
+
+ p->funcs.window_move_resize_request = NULL;
+ p->funcs.window_state_request = NULL;
+
+ p->funcs.module_update = NULL;
+
+ p->funcs.idle_enterer = NULL;
+
+ p->funcs.illume_win_state_change_request = NULL;
+
+ _policy_fin();
+ return 1;
+}
--- /dev/null
+#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
--- /dev/null
+#include "e_illume_private.h"
+#include "policy_util.h"
+#include "policy.h"
+
+#if 1 // for visibility
+#include <X11/Xlib.h>
+#endif
+
+#ifdef USE_DLOG
+#include "dlog.h"
+#undef LOG_TAG
+#define LOG_TAG "E17_EXTRA_MODULES"
+#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 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_quickpanel_popup(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_splash(E_Border *bd, E_Illume_Config_Zone *cz);
+static void _policy_zone_layout_clipboard(E_Border *bd, E_Illume_Config_Zone *cz);
+static void _policy_zone_layout_apptray(E_Border *bd);
+
+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 int _policy_notification_level_map(int level);
+
+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, E_Border *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_clipboard_geometry_change (Ecore_X_Event_Window_Property *event);
+static void _policy_property_clipboard_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_indicator_opacity_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 void _policy_property_illume_window_state_change(Ecore_X_Event_Window_Property *event);
+
+static void _policy_border_illume_window_state_change(E_Border *bd, unsigned int state);
+
+static Eina_Bool _policy_border_cb_mouse_down(void *data, int type __UNUSED__, void *event);
+static Eina_Bool _policy_border_cb_mouse_up(void *data, int type __UNUSED__, void *event);
+static Eina_Bool _policy_border_cb_mouse_move(void *data, int type __UNUSED__, void *event);
+
+static int _policy_property_window_opaque_get (Ecore_X_Window win);
+
+static void _policy_border_focus_top_stack_set(E_Border *bd);
+
+/* for debugging */
+void _policy_border_list_print (Ecore_X_Window win);
+
+#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 (void);
+#endif // visibility
+
+static Eina_Bool _policy_root_angle_set(E_Border *bd);
+static void _policy_change_root_angle_by_border_angle (E_Border* bd);
+static void _policy_indicator_angle_change (E_Border* indi_bd, int angle);
+
+static void _policy_border_transient_for_group_make(E_Border *bd, Eina_List** list);
+static E_Border* _policy_border_transient_for_border_top_get(E_Border *bd);
+static void _policy_border_transient_for_layer_set(E_Border *bd, E_Border *parent_bd, int layer);
+
+/* for desktop mode */
+static void _policy_zone_layout_app_single_monitor(E_Illume_Border_Info *bd_info, E_Illume_Config_Zone *cz);
+
+/* for controling indicator */
+static void _policy_border_indicator_control(E_Border *indi_bd);
+static Eina_Bool _policy_border_indicator_state_change(E_Border *indi_bd, E_Border *bd);
+
+static void _policy_resize_start(E_Illume_Border_Info *bd_info);
+static void _policy_resize_end(E_Illume_Border_Info *bd_info);
+static void _policy_border_illume_handlers_add(E_Illume_Border_Info *bd_info);
+static void _policy_border_illume_handlers_remove(E_Illume_Border_Info *bd_info);
+
+static void _policy_border_root_angle_control(E_Zone *zone);
+static int _policy_border_layer_map(int layer);
+
+/* for visibility */
+static void _policy_msg_handler(void *data, const char *name, const char *info, int val, E_Object *obj, void *msgdata);
+
+/* for iconify */
+static void _policy_border_force_iconify(E_Border *bd);
+static void _policy_border_force_uniconify(E_Border *bd);
+static void _policy_border_iconify_by_illume(E_Illume_XWin_Info *xwin_info);
+static void _policy_border_uniconify_below_borders_by_illume(E_Illume_XWin_Info *xwin_info);
+static E_Border* _policy_border_find_below(E_Border *bd);
+static void _policy_border_uniconify_below_borders(E_Border *bd);
+static void _policy_border_uniconify_top_border(E_Border *bd);
+
+/*******************/
+/* 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 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 indicator */
+static Ecore_X_Window g_indi_control_win;
+
+ #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
+
+/* for visibility */
+static E_Msg_Handler *_e_illume_msg_handler = NULL;
+static Eina_Bool _e_use_comp = EINA_FALSE;
+static Eina_Bool _g_visibility_changed = EINA_FALSE;
+
+/* 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;
+
+ 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 */
+ pos = _policy_border_layer_map(bd->layer);
+
+ /* 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_keyboard_sub(b)) continue;
+ if (e_illume_border_is_quickpanel(b)) continue;
+ if (e_illume_border_is_quickpanel_popup(b)) continue;
+ if (e_illume_border_is_clipboard(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_keyboard_sub(bd)) continue;
+ if (e_illume_border_is_quickpanel(bd)) continue;
+ if (e_illume_border_is_quickpanel_popup(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 = 0x%07x\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;
+
+ if (E_ILLUME_BORDER_IS_IN_MOBILE(bd))
+ {
+ if ((bd->w != bd->zone->w) || (bd->h != bd->zone->h))
+ _policy_border_resize(bd, bd->zone->w, bd->zone->h);
+ }
+
+/*
+ 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_quickpanel_popup(E_Border *bd)
+{
+ if (!bd) return;
+
+ // Do something
+}
+
+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_splash(E_Border *bd, E_Illume_Config_Zone *cz)
+{
+ int mw, mh, nx, ny;
+
+ if ((!bd) || (!cz)) return;
+
+ /* no point in adjusting size or position if it's not visible */
+ if ((!bd->new_client) && (!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;
+
+ nx = (bd->zone->x + ((bd->zone->w - mw) / 2));
+ ny = (bd->zone->y + ((bd->zone->h - mh) / 2));
+
+ if ((bd->w != mw) || (bd->h != mh))
+ _policy_border_resize(bd, mw, mh);
+
+ if ((bd->x != nx) || (bd->y != ny))
+ _policy_border_move(bd, nx, ny);
+}
+
+static void
+_policy_zone_layout_clipboard(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_CLIPBOARD_LAYER)
+ e_border_layer_set(bd, POL_CLIPBOARD_LAYER);
+}
+
+static void
+_policy_zone_layout_apptray(E_Border *bd)
+{
+ if (!bd) return;
+
+ if (E_ILLUME_BORDER_IS_IN_MOBILE(bd))
+ {
+ if ((bd->w != bd->zone->w) || (bd->h != bd->zone->h))
+ _policy_border_resize(bd, bd->zone->w, bd->zone->h);
+ }
+}
+
+static void
+_policy_zone_layout_miniapptray(E_Border *bd)
+{
+ if (!bd) return;
+
+ if (E_ILLUME_BORDER_IS_IN_MOBILE(bd))
+ {
+ if ((bd->w != bd->zone->w) || (bd->h != bd->zone->h))
+ _policy_border_resize(bd, bd->zone->w, bd->zone->h);
+ }
+}
+
+/* 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 = 0x%07x\n", __func__, __LINE__, bd->client.win);
+
+ /* ignore stolen borders. These are typically quickpanel or keyboards */
+ if (bd->stolen)
+ {
+ if (e_illume_border_is_quickpanel(bd) ||
+ e_illume_border_is_quickpanel_popup(bd))
+ {
+ E_Border* indi_bd;
+ E_Illume_Border_Info* bd_info = NULL;
+ 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 = _policy_get_border_info(bd)))
+ 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 = 0x%07x, Save indicator's size = %d!!!\n", bd->client.win, bd->h);
+ cz->indicator.size = bd->h;
+ }
+
+ if (_e_illume_cfg->use_indicator_widget)
+ {
+ L(LT_ANGLE, "[ILLUME2][ANGLE] %s(%d)... Control Root Angle.\n", __func__, __LINE__);
+ _policy_border_root_angle_control(bd->zone);
+ }
+ else
+ {
+ L(LT_INDICATOR, "[ILLUME2][INDICATOR] %s(%d)... win = 0x%07x.. Control Indicator.\n", __func__, __LINE__, bd->client.win);
+ _policy_border_indicator_control(bd);
+ }
+ }
+}
+
+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)
+ {
+ L(LT_INDICATOR, "[ILLUME2][INDICATOR] %s(%d)... Show Indicator (by win: 0x%07x)\n", __func__, __LINE__, bd->client.win);
+ e_illume_border_show(indi_bd);
+ }
+ }
+ }
+
+ if (e_illume_border_is_clipboard(bd))
+ {
+ ecore_x_e_illume_clipboard_state_set(bd->zone->black_win, ECORE_X_ILLUME_CLIPBOARD_STATE_OFF);
+ }
+
+ /* 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 (_e_illume_cfg->use_force_iconify)
+ {
+ L(LT_ICONIFY, "[ILLUME2][ICONIFY] %s(%d)... DELETE win:0x%07x\n", __func__, __LINE__, bd->client.win);
+ if (!(e_illume_border_is_indicator(bd) ||
+ e_illume_border_is_keyboard(bd) ||
+ e_illume_border_is_keyboard_sub(bd) ||
+ e_illume_border_is_quickpanel(bd) ||
+ e_illume_border_is_quickpanel_popup(bd) ||
+ e_illume_border_is_clipboard(bd) ||
+ e_illume_border_is_app_tray(bd) ||
+ e_illume_border_is_miniapp_tray(bd)))
+ {
+ _policy_border_uniconify_below_borders_by_illume(xwin_info);
+ }
+ }
+
+ if (xwin_info->visibility != E_ILLUME_VISIBILITY_FULLY_OBSCURED)
+ {
+ if (_e_illume_cfg->use_indicator_widget)
+ {
+ if ((bd->w == bd->zone->w) && (bd->h == bd->zone->h))
+ {
+ L(LT_ANGLE, "[ILLUME2][ANGLE] %s(%d)... Deleted win:0x%07x. Control Root Angle.\n", __func__, __LINE__, bd->client.win);
+ _policy_border_root_angle_control(bd->zone);
+ }
+ }
+ else
+ {
+ E_Border *indi_bd;
+ indi_bd = e_illume_border_indicator_get(bd->zone);
+ if (indi_bd)
+ {
+ L(LT_INDICATOR, "[ILLUME2][INDICATOR] %s(%d)... win = 0x%07x.. Control Indicator.\n", __func__, __LINE__, bd->client.win);
+ _policy_border_indicator_control(indi_bd);
+ }
+ }
+ }
+ xwin_info->bd_info = NULL;
+ xwin_info->attr.visible = 0;
+ xwin_info->is_drawed = EINA_FALSE;
+ }
+
+ _policy_delete_border_info_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);
+ 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 = 0x%07x\n", __LINE__, bd->client.win);
+
+ /* 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
+ /* for desktop mode */
+ if (E_ILLUME_BORDER_IS_IN_MOBILE(bd))
+ bd->borderless = 1;
+ else if (E_ILLUME_BORDER_IS_IN_DESKTOP(bd))
+ {
+ if (!bd->client.illume.win_state.state)
+ {
+ bd->borderless = 0;
+ }
+ }
+#endif
+
+ /* tell E the border has changed */
+ bd->client.border.changed = 1;
+}
+
+
+void
+_policy_border_post_new_border(E_Border *bd)
+{
+ int layer = 0;
+ E_Illume_Border_Info* bd_info = NULL;
+
+ if (bd->new_client)
+ {
+ bd_info = _policy_get_border_info(bd);
+ if (!bd_info) return;
+
+ bd_info->win_type = bd->client.netwm.type;
+
+ if (e_illume_border_is_notification(bd))
+ {
+ bd_info->level = _policy_border_get_notification_level(bd->client.win);
+ layer = _policy_notification_level_map(bd_info->level);
+ e_border_layer_set(bd, layer);
+ L (LT_NOTIFICATION, "[ILLUME2][NOTIFICATION] %s(%d)... win (0x%07x) is notification window... level = %d\n",
+ __func__, __LINE__, bd->client.win, bd_info->level);
+ }
+ }
+}
+
+
+void
+_policy_border_pre_fetch(E_Border *bd)
+{
+ if (!bd) return;
+
+ if (bd->new_client)
+ {
+ unsigned int state;
+ state = ecore_x_e_illume_window_state_get(bd->client.win);
+ _policy_border_illume_window_state_change(bd, state);
+ }
+
+ /* 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;
+ E_Illume_XWin_Info *xwin_info = NULL;
+
+ if (_e_illume_cfg->use_force_iconify)
+ xwin_info = _policy_xwin_info_find(bd->win);
+
+ 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;
+ }
+
+ L(LT_TRANSIENT_FOR, "[ILLUME2][TRANSIENT_FOR] %s(%d)... win:0x%07x, parent:0x%07x\n", __func__, __LINE__, bd->client.win, bd->client.icccm.transient_for);
+ if (bd_parent)
+ {
+ L(LT_ICONIFY, "[ILLUME2][ICONIFY] %s(%d).. win:0x%07x(iconic:%d, by_wm:%d), parent:0x%07x(iconic:%d)\n", __func__, __LINE__, bd->client.win, bd->iconic, xwin_info ? xwin_info->iconify_by_wm : -100, bd_parent->client.win, bd_parent->iconic);
+ if (_e_illume_cfg->use_force_iconify)
+ {
+ if (xwin_info && xwin_info->iconify_by_wm)
+ {
+ if (bd->iconic)
+ {
+ L(LT_ICONIFY, "[ILLUME2][ICONIFY] %s(%d).. FORCE UNICONIFY... win:0x%07x\n", __func__, __LINE__, bd->client.win);
+ _policy_border_force_uniconify(bd);
+ }
+ }
+ }
+
+ if (bd_parent != bd)
+ {
+ bd->parent = bd_parent;
+ _policy_border_transient_for_layer_set(bd, bd->parent, bd->parent->layer);
+ bd_parent->transients = eina_list_append(bd_parent->transients, bd);
+
+ 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;
+ }
+ }
+ bd->client.icccm.fetch.transient_for = 0;
+ }
+}
+
+void
+_policy_border_new_border(E_Border *bd)
+{
+ if (!bd) return;
+
+ if (bd->zone)
+ ecore_x_e_illume_zone_set(bd->client.win, bd->zone->black_win);
+
+ _policy_add_border_info_list(bd);
+}
+
+#ifdef _F_BORDER_HOOK_PATCH_
+void
+_policy_border_del_border(E_Border *bd)
+{
+ if (!bd) return;
+
+ if (bd->new_client)
+ {
+ _policy_border_del(bd);
+ }
+}
+#endif
+
+void
+_policy_border_post_assign(E_Border *bd)
+{
+ // printf("Border post assign\n");
+
+ if (!bd) return;
+ if (!bd->new_client) return;
+
+ bd->internal_no_remember = 1;
+
+ /* do not allow client to change these properties */
+ bd->lock_client_shade = 1;
+
+ if (e_illume_border_is_utility (bd))
+ {
+ ILLUME2_TRACE ("[ILLUME2-NEW] %s(%d)... win(0x%07x) is UTILITY type.. SET REQUEST_POS!!!\n", __func__, __LINE__, bd->client.win);
+ bd->client.icccm.request_pos = 1;
+ }
+
+ /* do not allow the user to change these properties */
+ /* for desktop mode */
+ if (E_ILLUME_BORDER_IS_IN_MOBILE(bd))
+ {
+ if (bd->client.illume.win_state.state)
+ {
+ bd->lock_user_location = 0;
+ bd->lock_user_size = 0;
+ }
+ else
+ {
+ bd->lock_user_location = 1;
+ bd->lock_user_size = 1;
+ }
+ bd->lock_user_shade = 1;
+ if (bd->client.icccm.request_pos == 0)
+ {
+ bd->placed = 1;
+ bd->changes.pos = 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;
+}
+
+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_quickpanel_popup(bd)) return;
+
+ if (e_illume_border_is_keyboard(bd))
+ {
+ int angle;
+ angle = _policy_window_rotation_angle_get(bd->client.win);
+ if (angle != -1)
+ {
+ if (angle != g_root_angle)
+ {
+ L(LT_ANGLE, "[ILLUME2][ANGLE] %s(%d)... win = 0x%07x.. SEND client Event with angle = %d\n", __func__, __LINE__, bd->client.win, g_root_angle);
+ ecore_x_client_message32_send(bd->client.win, ECORE_X_ATOM_E_ILLUME_ROTATE_ROOT_ANGLE,
+ ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, g_root_angle, g_active_win, 0, 0, 0);
+ }
+ }
+
+ return;
+ }
+
+ if (e_illume_border_is_clipboard(bd))
+ {
+ ecore_x_e_illume_clipboard_state_set(bd->zone->black_win, ECORE_X_ILLUME_CLIPBOARD_STATE_ON);
+ ecore_x_e_illume_clipboard_geometry_set(bd->zone->black_win, bd->x, bd->y, bd->w, bd->h);
+ return;
+ }
+}
+
+void
+_policy_border_cb_move(E_Border *bd)
+{
+ if (!bd) return;
+
+ if (e_illume_border_is_app_tray(bd) ||
+ e_illume_border_is_miniapp_tray(bd))
+ {
+ _policy_border_focus_top_stack_set(bd);
+ }
+
+ 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);
+
+ else if (e_illume_border_is_quickpanel_popup(bd))
+ _policy_zone_layout_quickpanel_popup(bd);
+
+ /* are we laying out a keyboard ? */
+ else if (e_illume_border_is_keyboard(bd))
+ _policy_zone_layout_keyboard(bd, cz);
+
+ else if (e_illume_border_is_keyboard_sub(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_splash(bd))
+ _policy_zone_layout_splash(bd, cz);
+
+ else if (e_illume_border_is_clipboard(bd))
+ _policy_zone_layout_clipboard(bd, cz);
+
+ else if (e_illume_border_is_app_tray(bd))
+ _policy_zone_layout_apptray(bd);
+
+ else if (e_illume_border_is_miniapp_tray(bd))
+ _policy_zone_layout_miniapptray(bd);
+
+ /* must be an app */
+ else
+ {
+ /* are we in single mode ? */
+ if (!cz->mode.dual)
+ {
+ /* for desktop mode */
+ if (E_ILLUME_BORDER_IS_IN_MOBILE(bd))
+ _policy_zone_layout_app_single_new(bd_info, cz);
+ else if (E_ILLUME_BORDER_IS_IN_DESKTOP(bd))
+ _policy_zone_layout_app_single_monitor(bd_info, cz);
+ else
+ _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;
+
+ ecore_x_window_size_get (zone->container->manager->root, &_g_root_width, &_g_root_height);
+
+ 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;
+
+ if (!bd->visible) 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);
+}
+
+static void
+_policy_resize_start(E_Illume_Border_Info *bd_info)
+{
+ E_Manager *m;
+ Evas *canvas;
+ Evas_Object *o;
+ E_Border *bd;
+ int nx, ny;
+
+ bd = bd_info->border;
+
+ if (!bd) return;
+ if (bd->stolen) return;
+ if (!bd->client.illume.win_state.state) return;
+ if (!bd_info->resize_req.mouse.down) return;
+
+ bd_info->resize_req.need_change = 0;
+ bd_info->resize_req.mouse.locked = 1;
+ bd_info->resize_req.mouse.resize = 1;
+ int ang = _policy_window_rotation_angle_get(bd->client.win);
+ if (ang == -1) ang = 0;
+ bd_info->resize_req.angle = ang;
+
+ m = e_manager_current_get();
+ if (!m) return;
+ canvas = e_manager_comp_evas_get(m);
+ if (!canvas) return;
+
+ o = evas_object_rectangle_add(canvas);
+ evas_object_color_set(o, 100, 100, 100, 100);
+
+ nx = bd->x - bd->zone->x;
+ ny = bd->y - bd->zone->y;
+ evas_object_move(o, nx, ny);
+ evas_object_resize(o, bd->w, bd->h);
+ e_object_data_set(E_OBJECT(bd), o);
+ evas_object_show(o);
+}
+
+static void
+_policy_resize_end(E_Illume_Border_Info *bd_info)
+{
+ E_Border *bd;
+ bd = bd_info->border;
+
+ if (!bd) return;
+
+ Evas_Object *o = (Evas_Object *)e_object_data_get(E_OBJECT(bd));
+ if (o) evas_object_del(o);
+
+ if (bd->stolen) return;
+ if (!bd->client.illume.win_state.state) return;
+ if (!bd_info->resize_req.mouse.down) return;
+
+ bd_info->resize_req.mouse.locked = 0;
+ bd_info->resize_req.mouse.resize = 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-tizen] %s(%d) enable: %s ", __func__, __LINE__, enable ? "true" : "false" );
+
+ comp = e_module_find ("comp-tizen");
+ 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-tizen) " );
+ e_module_disable(comp);
+ }
+ else if( !current_enabled && enable )
+ {
+ fprintf( stdout, "e_module_enable(comp-tizen) " );
+ e_module_enable(comp);
+ }
+ else
+ {
+ fprintf( stdout, "skip... " );
+ }
+
+ fprintf( stdout, "\n" );
+ }
+ else
+ {
+ fprintf( stderr, "\n[E17-illume2-tizen] %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)
+ {
+ L(LT_INDICATOR, "[ILLUME2][INDICATOR] %s(%d)... Hide Indicator (by win: 0x%07x)\n", __func__, __LINE__, bd->client.win);
+ e_border_hide(indi_bd, 2);
+ }
+ }
+ else
+ {
+ int indi_show = _policy_border_indicator_state_get(bd);
+ if (indi_show == 1)
+ {
+ if (!indi_bd->visible)
+ {
+ L(LT_INDICATOR, "[ILLUME2][INDICATOR] %s(%d)... Show Indicator (by win: 0x%07x)\n", __func__, __LINE__, bd->client.win);
+ 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_clipboard_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_clipboard_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_keyboard_sub(bd)) continue;
+ if (e_illume_border_is_quickpanel(bd)) continue;
+ if (e_illume_border_is_quickpanel_popup(bd)) continue;
+
+#ifdef USE_DLOG
+ LOGD("[WM] Clipboard geometry set. win:0x%07x, geo(%d,%d,%d,%d)", bd->client.win, x, y, w, h);
+#endif
+ ecore_x_e_illume_clipboard_geometry_set(bd->client.win, x, y, w, h);
+ }
+}
+
+static void _policy_property_clipboard_state_change (Ecore_X_Event_Window_Property *event)
+{
+ Eina_List *l;
+ E_Zone *zone;
+ E_Border *bd;
+ Ecore_X_Illume_Clipboard_State state;
+
+ /* make sure this property changed on a zone */
+ if (!(zone = e_util_zone_window_find(event->win))) return;
+
+ state = ecore_x_e_illume_clipboard_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_keyboard_sub(bd)) continue;
+ if (e_illume_border_is_quickpanel(bd)) continue;
+ if (e_illume_border_is_quickpanel_popup(bd)) continue;
+
+#ifdef USE_DLOG
+ LOGD("[WM] Clipboard state set. win:0x%07x, state:%d", bd->client.win, state);
+#endif
+ ecore_x_e_illume_clipboard_state_set(bd->client.win, state);
+ }
+}
+
+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:0x%07x\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:0x%07x\n", __func__, __LINE__, bd->client.win);
+ _policy_change_root_angle_by_border_angle (bd);
+ }
+ }
+
+ bd->changes.pos = 1;
+ bd->changed = 1;
+}
+
+static void _policy_property_indicator_state_change (Ecore_X_Event_Window_Property *event)
+{
+ E_Border *bd, *indi_bd;
+
+ if (!(bd = e_border_find_by_client_window(event->win))) return;
+
+ indi_bd = e_illume_border_indicator_get(bd->zone);
+ if (!indi_bd) return;
+
+ L(LT_INDICATOR, "[ILLUME2][INDICATOR] %s(%d)... win = 0x%07x.. Control Indicator.\n", __func__, __LINE__, bd->client.win);
+ _policy_border_indicator_control(indi_bd);
+}
+
+static void _policy_property_indicator_opacity_change(Ecore_X_Event_Window_Property *event)
+{
+ E_Border *bd, *indi_bd;
+ Ecore_X_Window active_win;
+ Ecore_X_Illume_Indicator_Opacity_Mode mode;
+
+ 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)
+ {
+ mode = ecore_x_e_illume_indicator_opacity_get(bd->client.win);
+ ecore_x_e_illume_indicator_opacity_send(indi_bd->client.win, mode);
+ }
+}
+
+static void _policy_active_win_change(E_Illume_XWin_Info *xwin_info, Ecore_X_Window active_win)
+{
+ E_Border *active_bd = NULL;
+ int active_pid;
+
+ if (!xwin_info) return;
+ if (!xwin_info->comp_vis) return;
+
+ active_bd = e_border_find_by_client_window(active_win);
+
+ /* for active/deactive message */
+ if (active_win != g_active_win)
+ {
+ if (active_bd)
+ active_pid = active_bd->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_bd)
+ {
+ printf ("[WM] Active window is changed. OLD(win:0x%07x,pid:%d) --> NEW(win:0x%07x,pid:%d,name:%s)\n", g_active_win, g_active_pid, active_win, active_pid, active_bd->client.netwm.name);
+#ifdef USE_DLOG
+ LOGD("[WM] Active window is changed. OLD(win:0x%07x,pid:%d) --> NEW(win:0x%07x,pid:%d,name:%s)", g_active_win, g_active_pid, active_win, active_pid, active_bd->client.netwm.name);
+#endif
+ if ((E_ILLUME_BORDER_IS_IN_DESKTOP(active_bd)) ||
+ (active_bd->client.illume.win_state.state == ECORE_X_ILLUME_WINDOW_STATE_FLOATING))
+ {
+ e_border_raise(active_bd);
+ }
+ }
+ else
+ {
+ printf ("[WM] Active window is changed. OLD(win:0x%07x,pid:%d) --> NEW(win:0x%07x,pid:%d,name:NULL)\n", g_active_win, g_active_pid, active_win, active_pid);
+#ifdef USE_DLOG
+ LOGD("[WM] Active window is changed. OLD(win:0x%07x,pid:%d) --> NEW(win:0x%07x,pid:%d,name:NULL)", g_active_win, g_active_pid, active_win, active_pid);
+#endif
+ }
+ printf ("=========================================================================================\n\n");
+ g_active_win = active_win;
+ g_active_pid = active_pid;
+ }
+
+ if (active_bd)
+ {
+ if (_e_illume_cfg->use_indicator_widget)
+ {
+ L(LT_ANGLE, "[ILLUME2][ANGLE] %s(%d)... Control Root Angle.\n", __func__, __LINE__);
+ _policy_border_root_angle_control(active_bd->zone);
+ }
+ else
+ {
+ E_Border *indi_bd;
+ indi_bd = e_illume_border_indicator_get(active_bd->zone);
+ if (indi_bd)
+ {
+ L(LT_INDICATOR, "[ILLUME2][INDICATOR] %s(%d)... win = 0x%07x.. Control Indicator.\n", __func__, __LINE__, active_bd->client.win);
+ _policy_border_indicator_control(indi_bd);
+ }
+ }
+
+ ILLUME2_TRACE ("[ILLUME2] ACTIVE WINDOW... (%d) active win = 0x%07x HIDE quickpanel\n", __LINE__, active_win);
+ e_illume_quickpanel_hide(active_bd->zone, 0);
+ }
+}
+
+static void _policy_property_active_win_change (Ecore_X_Event_Window_Property *event)
+{
+ Ecore_X_Window active_win;
+ E_Border* active_bd;
+ E_Illume_XWin_Info *xwin_info;
+
+ active_win = _policy_active_window_get(event->win);
+ active_bd = e_border_find_by_client_window(active_win);
+ if (active_bd)
+ {
+ xwin_info = _policy_xwin_info_find(active_bd->win);
+ }
+ else
+ {
+ xwin_info = _policy_xwin_info_find(active_win);
+ }
+
+ _policy_active_win_change(xwin_info, active_win);
+}
+
+static void _policy_property_win_type_change (Ecore_X_Event_Window_Property *event)
+{
+ E_Border *bd;
+ E_Border *indi_bd;
+ E_Illume_Border_Info* bd_info = NULL;
+ int layer = 0;
+
+ if (!(bd = e_border_find_by_client_window(event->win))) return;
+
+ bd_info = _policy_get_border_info(bd);
+ if (!bd_info) return;
+
+ e_hints_window_type_get (bd);
+
+ if (bd_info->win_type == bd->client.netwm.type) return;
+ bd_info->win_type = bd->client.netwm.type;
+
+ if (bd->client.netwm.type == ECORE_X_WINDOW_TYPE_NOTIFICATION)
+ {
+ ILLUME2_TRACE ("[ILLUME2-NEW] %s(%d)... WINDOW TYPE is CHANGED to NOTIFICATION!!!!! win = 0x%07x\n", __func__, __LINE__, bd->client.win);
+ bd_info->level = _policy_border_get_notification_level(bd->client.win);
+ layer = _policy_notification_level_map(bd_info->level);
+ e_border_layer_set(bd, layer);
+
+ L (LT_NOTIFICATION, "[ILLUME2][NOTIFICATION] %s(%d)... win (0x%07x) is notification window... level = %d\n", __func__, __LINE__, bd->client.win, bd_info->level);
+
+ indi_bd = e_illume_border_indicator_get(bd->zone);
+ if (indi_bd)
+ {
+ L(LT_INDICATOR, "[ILLUME2][INDICATOR] %s(%d)... win = 0x%07x.. Control Indicator.\n", __func__, __LINE__, bd->client.win);
+ _policy_border_indicator_control(indi_bd);
+ }
+
+ L(LT_ICONIFY, "[ILLUME2][ICONIFY] %s(%d).. ICONIFY win:0x%07x And UN-ICONIFY Top win...\n", __func__, __LINE__, bd->client.win);
+ _policy_border_uniconify_top_border(bd);
+ }
+ else if (bd->client.netwm.type == ECORE_X_WINDOW_TYPE_NORMAL)
+ {
+ ILLUME2_TRACE ("[ILLUME2-NEW] %s(%d)... WINDOW TYPE is CHANGED to NORMAL!!!!! win = 0x%07x\n", __func__, __LINE__, bd->client.win);
+ if (bd->layer != POL_APP_LAYER)
+ {
+ if ( (!e_illume_border_is_quickpanel(bd)) &&
+ (!e_illume_border_is_quickpanel_popup(bd)) &&
+ (!e_illume_border_is_keyboard(bd)) &&
+ (!e_illume_border_is_keyboard_sub(bd)))
+ {
+ e_border_layer_set(bd, POL_APP_LAYER);
+ }
+ }
+
+ indi_bd = e_illume_border_indicator_get(bd->zone);
+ if (indi_bd)
+ {
+ L(LT_INDICATOR, "[ILLUME2][INDICATOR] %s(%d)... win = 0x%07x.. Control Indicator.\n", __func__, __LINE__, bd->client.win);
+ _policy_border_indicator_control(indi_bd);
+ }
+
+ L(LT_ICONIFY, "[ILLUME2][ICONIFY] %s(%d).. ICONIFY win:0x%07x And UN-ICONIFY Top win...\n", __func__, __LINE__, bd->client.win);
+ _policy_border_uniconify_top_border(bd);
+ }
+ 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. control_win:0x%07x\n", __func__, __LINE__, angle, g_indi_control_win);
+ bd = e_border_find_by_client_window(g_indi_control_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 && !bd_temp->iconic)
+ {
+ if (!e_illume_border_is_keyboard(bd_temp))
+ continue;
+ }
+
+ L (LT_ANGLE, "[ILLUME2][ANGLE] %s(%d)... win = 0x%07x.. 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_indi_control_win, 0, 0, 0);
+ }
+
+ if (_e_illume_cfg->use_indicator_widget)
+ {
+ E_Illume_Quickpanel *qp;
+ qp = e_illume_quickpanel_by_zone_get(zone);
+ if (qp)
+ _policy_layout_quickpanel_rotate(qp, angle);
+ }
+
+ 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 = 0x%07x\n", __func__, __LINE__, event->win);
+
+ E_Border* bd;
+ E_Border *indi_bd;
+ E_Illume_Border_Info *bd_info = NULL;
+ int layer = 0;
+
+ // 0.
+ if (!(bd = e_border_find_by_client_window(event->win)))
+ {
+ L (LT_NOTIFICATION, "[ILLUME2][NOTIFICATION] %s(%d)... Win (0x%07x) doesn't have border... So return..\n", __func__, __LINE__, event->win);
+ return;
+ }
+
+ bd_info = _policy_get_border_info(bd);
+ if (!bd_info) return;
+
+ // 1.
+ if (!e_illume_border_is_notification (bd))
+ {
+ L (LT_NOTIFICATION, "[ILLUME2][NOTIFICATION] %s(%d)... Win (0x%07x) gets NOTIFICATION_LEVEL notifiy... But this is NOT notification window... IGNORE!!!!!\n", __func__, __LINE__, bd->client.win);
+ return;
+ }
+
+ // 2.
+ bd_info->level = _policy_border_get_notification_level(bd->client.win);
+ layer = _policy_notification_level_map(bd_info->level);
+
+ // 3.
+ e_border_layer_set(bd, layer);
+ L (LT_NOTIFICATION, "[ILLUME2][NOTIFICATION] %s(%d)... win (0x%07x) is notification window... level = %d\n",
+ __func__, __LINE__, bd->client.win, bd_info->level);
+
+ // 4.
+ indi_bd = e_illume_border_indicator_get(bd->zone);
+ if (indi_bd)
+ {
+ L(LT_INDICATOR, "[ILLUME2][INDICATOR] %s(%d)... win = 0x%07x.. Control Indicator.\n", __func__, __LINE__, bd->client.win);
+ _policy_border_indicator_control(indi_bd);
+ }
+
+ L(LT_ICONIFY, "[ILLUME2][ICONIFY] %s(%d).. ICONIFY win:0x%07x And UN-ICONIFY Top win...\n", __func__, __LINE__, bd->client.win);
+ _policy_border_uniconify_top_border(bd);
+}
+
+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:0x%07x\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);
+
+ // visibility is changed
+ L(LT_VISIBILITY, "[ILLUME2][VISIBILITY] %s(%d).. visibility is changed... win:0x%07x\n", __func__, __LINE__, event->win);
+ _g_visibility_changed = EINA_TRUE;
+}
+
+static void
+_policy_property_illume_window_state_change(Ecore_X_Event_Window_Property *event)
+{
+ E_Border *bd;
+
+ if (!(bd = e_border_find_by_client_window(event->win))) return;
+ if (bd->stolen) return;
+
+ unsigned int state = ecore_x_e_illume_window_state_get(event->win);
+ _policy_border_illume_window_state_change(bd, state);
+}
+
+static void
+_policy_border_illume_window_state_change(E_Border *bd, unsigned int state)
+{
+ E_Border* indi_bd;
+
+ if (!bd) return;
+ if (bd->client.illume.win_state.state == state) return;
+
+ ELBF(ELBT_ILLUME, 0, bd->client.win, "SET WIN_STATE %d->%d",
+ bd->client.illume.win_state.state, state);
+
+ bd->client.illume.win_state.state = state;
+ switch (state)
+ {
+ case ECORE_X_ILLUME_WINDOW_STATE_FLOATING:
+ e_hints_window_state_update(bd, ECORE_X_WINDOW_STATE_ABOVE, ECORE_X_WINDOW_STATE_ACTION_ADD);
+
+ if (_e_illume_cfg->use_force_iconify)
+ _policy_border_uniconify_below_borders(bd);
+
+ bd->client.icccm.request_pos = EINA_TRUE;
+ bd->lock_user_size = 0;
+ bd->lock_user_location = 0;
+ bd->borderless = 0;
+
+ if (bd->maximized)
+ e_border_unmaximize(bd, E_MAXIMIZE_BOTH);
+
+ indi_bd = e_illume_border_indicator_get(bd->zone);
+ if (indi_bd)
+ {
+ L(LT_INDICATOR, "[ILLUME2][INDICATOR] %s(%d)... win = 0x%07x.. Control Indicator.\n", __func__, __LINE__, bd->client.win);
+ _policy_border_indicator_control(indi_bd);
+ }
+
+ break;
+
+ case ECORE_X_ILLUME_WINDOW_STATE_NORMAL:
+ e_hints_window_state_update(bd, ECORE_X_WINDOW_STATE_ABOVE, ECORE_X_WINDOW_STATE_ACTION_REMOVE);
+
+ if (E_ILLUME_BORDER_IS_IN_MOBILE(bd))
+ {
+ bd->lock_user_size = 1;
+ bd->lock_user_location = 1;
+ }
+ else if (E_ILLUME_BORDER_IS_IN_DESKTOP(bd))
+ {
+ bd->borderless = 0;
+ }
+
+ bd->client.icccm.request_pos = EINA_FALSE;
+
+ indi_bd = e_illume_border_indicator_get(bd->zone);
+ if (indi_bd)
+ {
+ L(LT_INDICATOR, "[ILLUME2][INDICATOR] %s(%d)... win = 0x%07x.. Control Indicator.\n", __func__, __LINE__, bd->client.win);
+ _policy_border_indicator_control(indi_bd);
+ }
+
+ break;
+ }
+ bd->changes.size = 1;
+ bd->changes.pos = 1;
+ bd->changed = 1;
+}
+
+static void
+_policy_border_illume_handlers_add(E_Illume_Border_Info *bd_info)
+{
+ if (!bd_info) return;
+ if (bd_info->handlers) return;
+
+ bd_info->handlers = eina_list_append(bd_info->handlers,
+ ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_UP,
+ _policy_border_cb_mouse_up, bd_info));
+ bd_info->handlers = eina_list_append(bd_info->handlers,
+ ecore_event_handler_add(ECORE_EVENT_MOUSE_MOVE,
+ _policy_border_cb_mouse_move, bd_info));
+}
+
+static void
+_policy_border_illume_handlers_remove(E_Illume_Border_Info *bd_info)
+{
+ Ecore_Event_Handler *hdl;
+
+ if (!bd_info) return;
+ if (!bd_info->handlers) return;
+
+ EINA_LIST_FREE(bd_info->handlers, hdl)
+ ecore_event_handler_del(hdl);
+}
+
+static Eina_Bool
+_policy_border_cb_mouse_down(void *data,
+ int type __UNUSED__,
+ void *event)
+{
+ Ecore_Event_Mouse_Button *ev;
+ E_Illume_Border_Info *bd_info;
+ E_Border *bd;
+
+ L(LT_AIA, "[ILLUME2][AIA] %s(%d)... \n", __func__, __LINE__);
+ ev = event;
+ bd_info = data;
+ bd = bd_info->border;
+
+ if (ev->window != bd->event_win &&
+ ev->event_window != bd->event_win)
+ return ECORE_CALLBACK_PASS_ON;
+
+ if (bd_info->resize_req.mouse.down)
+ return ECORE_CALLBACK_PASS_ON;
+
+ bd_info->resize_req.mouse.down = 1;
+
+ bd_info->resize_req.mouse.dx = bd->x - ev->root.x;
+ bd_info->resize_req.mouse.dy = bd->y - ev->root.y;
+
+ bd_info->resize_req.mouse.x = bd->x;
+ bd_info->resize_req.mouse.y = bd->y;
+
+ e_border_raise(bd);
+ ecore_x_mouse_down_send(bd->client.win, ev->x, ev->y, ev->buttons);
+
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+static void
+_resize_rect_geometry_get(E_Illume_Border_Info *bd_info,
+ Evas_Coord_Rectangle *r,
+ int ev_x,
+ int ev_y,
+ int direction)
+{
+ E_Border *bd;
+ int x = 0, y = 0, w = 0, h = 0;
+ int mw = 0, mh = 0;
+ int cx = 0, cy = 0;
+ int max_size = 0;
+
+ bd = bd_info->border;
+
+ e_illume_border_min_get(bd, &mw, &mh);
+
+ if (direction == ECORE_X_NETWM_DIRECTION_SIZE_BR)
+ {
+ switch (bd_info->resize_req.angle)
+ {
+ case 0:
+ cx = bd->x; cy = bd->y;
+ x = bd->x; y = bd->y;
+ w = ev_x - bd->x; h = ev_y - bd->y;
+ break;
+ case 90:
+ cx = bd->x; cy = bd->y + bd->h;
+ x = bd->x; y = ev_y;
+ w = ev_x - x; h = (bd->y + bd->h) - y;
+ break;
+ case 180:
+ cx = bd->x + bd->w; cy = bd->y + bd->h;
+ x = ev_x; y = ev_y;
+ w = (bd->x + bd->w) - x; h = (bd->y + bd->h) - y;
+ break;
+ case 270:
+ cx = bd->x + bd->w; cy = bd->y;
+ x = ev_x; y = bd->y;
+ w = (bd->x + bd->w) - x; h = ev_y - y;
+ break;
+ default:
+ break;
+ }
+ }
+ else if (direction == ECORE_X_NETWM_DIRECTION_SIZE_TL)
+ {
+ switch (bd_info->resize_req.angle)
+ {
+ case 0:
+ cx = bd->x + bd->w; cy = bd->y + bd->h;
+ x = ev_x; y = ev_y;
+ w = (bd->x + bd->w) - x; h = (bd->y + bd->h) - y;
+ break;
+ case 90:
+ cx = bd->x + bd->w; cy = bd->y;
+ x = ev_x; y = bd->y;
+ w = (bd->x + bd->w) - x; h = ev_y - y;
+ break;
+ case 180:
+ cx = bd->x; cy = bd->y;
+ x = bd->x; y = bd->y;
+ w = ev_x - bd->x; h = ev_y - bd->y;
+ break;
+ case 270:
+ cx = bd->x; cy = bd->y + bd->h;
+ x = bd->x; y = ev_y;
+ w = ev_x - x; h = (bd->y + bd->h) - y;
+ break;
+ default:
+ break;
+ }
+ }
+ else if (direction == ECORE_X_NETWM_DIRECTION_SIZE_TR)
+ {
+ switch (bd_info->resize_req.angle)
+ {
+ case 0:
+ cx = bd->x; cy = bd->y + bd->h;
+ x = bd->x; y = ev_y;
+ w = ev_x - x; h = (bd->y + bd->h) - y;
+ break;
+ case 90:
+ cx = bd->x + bd->w; cy = bd->y + bd->h;
+ x = ev_x; y = ev_y;
+ w = (bd->x + bd->w) - x; h = (bd->y + bd->h) - y;
+ break;
+ case 180:
+ cx = bd->x + bd->w; cy = bd->y;
+ x = ev_x; y = bd->y;
+ w = (bd->x + bd->w) - x; h = ev_y - y;
+ break;
+ case 270:
+ cx = bd->x; cy = bd->y;
+ x = bd->x; y = bd->y;
+ w = ev_x - bd->x; h = ev_y - bd->y;
+ break;
+ default:
+ break;
+ }
+ }
+ else if (direction == ECORE_X_NETWM_DIRECTION_SIZE_BL)
+ {
+ switch (bd_info->resize_req.angle)
+ {
+ case 0:
+ cx = bd->x + bd->w; cy = bd->y;
+ x = ev_x; y = bd->y;
+ w = (bd->x + bd->w) - x; h = ev_y - y;
+ break;
+ case 90:
+ cx = bd->x; cy = bd->y;
+ x = bd->x; y = bd->y;
+ w = ev_x - bd->x; h = ev_y - bd->y;
+ break;
+ case 180:
+ cx = bd->x; cy = bd->y + bd->h;
+ x = bd->x; y = ev_y;
+ w = ev_x - x; h = (bd->y + bd->h) - y;
+ break;
+ case 270:
+ cx = bd->x + bd->w; cy = bd->y + bd->h;
+ x = ev_x; y = ev_y;
+ w = (bd->x + bd->w) - x; h = (bd->y + bd->h) - y;
+ break;
+ default:
+ break;
+ }
+ }
+ else if (direction == ECORE_X_NETWM_DIRECTION_SIZE_R)
+ {
+ switch (bd_info->resize_req.angle)
+ {
+ case 0:
+ cx = bd->x; cy = bd->y;
+ x = bd->x; y = bd->y;
+ w = ev_x - bd->x; h = bd->h;
+ break;
+ case 90:
+ cx = bd->x; cy = bd->y + bd->h;
+ x = bd->x; y = ev_y;
+ w = bd->w; h = (bd->y + bd->h) - y;
+ break;
+ case 180:
+ cx = bd->x + bd->w; cy = bd->y + bd->h;
+ x = ev_x; y = ev_y;
+ w = (bd->x + bd->w) - x; h = bd->h;
+ break;
+ case 270:
+ cx = bd->x + bd->w; cy = bd->y;
+ x = ev_x; y = bd->y;
+ w = bd->w; h = ev_y - y;
+ break;
+ default:
+ break;
+ }
+ }
+ else if (direction == ECORE_X_NETWM_DIRECTION_SIZE_L)
+ {
+ switch (bd_info->resize_req.angle)
+ {
+ case 0:
+ cx = bd->x + bd->w; cy = bd->y + bd->h;
+ x = ev_x; y = bd->y;
+ w = (bd->x + bd->w) - x; h = bd->h;
+ break;
+ case 90:
+ cx = bd->x + bd->w; cy = bd->y;
+ x = ev_x; y = bd->y;
+ w = bd->w; h = ev_y - y;
+ break;
+ case 180:
+ cx = bd->x; cy = bd->y;
+ x = bd->x; y = bd->y;
+ w = ev_x - bd->x; h = bd->h;
+ break;
+ case 270:
+ cx = bd->x; cy = bd->y + bd->h;
+ x = bd->x; y = ev_y;
+ w = bd->w; h = (bd->y + bd->h) - y;
+ break;
+ default:
+ break;
+ }
+ }
+ else if (direction == ECORE_X_NETWM_DIRECTION_SIZE_T)
+ {
+ switch (bd_info->resize_req.angle)
+ {
+ case 0:
+ cx = bd->x + bd->w; cy = bd->y + bd->h;
+ x = bd->x; y = ev_y;
+ w = bd->w; h = (bd->y + bd->h) - y;
+ break;
+ case 90:
+ cx = bd->x + bd->w; cy = bd->y;
+ x = ev_x; y = bd->y;
+ w = (bd->x + bd->w) - x; h = bd->h;
+ break;
+ case 180:
+ cx = bd->x; cy = bd->y;
+ x = bd->x; y = bd->y;
+ w = bd->w; h = ev_y - bd->y;
+ break;
+ case 270:
+ cx = bd->x + bd->w; cy = bd->y;
+ x = bd->x; y = bd->y;
+ w = ev_x - bd->x; h = bd->h;
+ break;
+ default:
+ break;
+ }
+ }
+ else if (direction == ECORE_X_NETWM_DIRECTION_SIZE_B)
+ {
+ switch (bd_info->resize_req.angle)
+ {
+ case 0:
+ cx = bd->x; cy = bd->y;
+ x = bd->x; y = bd->y;
+ w = bd->w; h = ev_y - bd->y;
+ break;
+ case 90:
+ cx = bd->x + bd->w; cy = bd->y;
+ x = bd->x; y = bd->y;
+ w = ev_x - bd->x; h = bd->h;
+ break;
+ case 180:
+ cx = bd->x + bd->w; cy = bd->y + bd->h;
+ x = bd->x; y = ev_y;
+ w = bd->w; h = (bd->y + bd->h) - y;
+ break;
+ case 270:
+ cx = bd->x + bd->w; cy = bd->y;
+ x = ev_x; y = bd->y;
+ w = (bd->x + bd->w) - x; h = bd->h;
+ break;
+ default:
+ break;
+ }
+ }
+ else
+ {
+ //error
+ L(LT_AIA, "[ILLUME2][AIA] %s(%d)... ERROR... direction(%d) is not defined!!!\n", __func__, __LINE__, direction);
+ return;
+ }
+
+ if (bd->zone->w > bd->zone->h)
+ max_size = bd->zone->h;
+ else
+ max_size = bd->zone->w;
+
+ if (w < mw) w = mw;
+ if (h < mh) h = mh;
+ if (w > max_size) w = max_size;
+ if (h > max_size) h = max_size;
+
+ if ((x + w) > (bd->x + w)) x = cx - w;
+ if ((y + h) > (bd->y + h)) y = cy - h;
+
+ if ((cx - x) > max_size)
+ x = cx - max_size;
+ if ((cy - y) > max_size)
+ y = cy - max_size;
+
+ x = x - bd->zone->x;
+ y = y - bd->zone->y;
+
+ r->x = x;
+ r->y = y;
+ r->w = w;
+ r->h = h;
+}
+
+static Eina_Bool
+_policy_border_cb_mouse_up(void *data,
+ int type __UNUSED__,
+ void *event)
+{
+ Ecore_Event_Mouse_Button *ev;
+ E_Illume_Border_Info *bd_info;
+ E_Border *bd;
+
+ L(LT_AIA, "[ILLUME2][AIA] %s(%d)... \n", __func__, __LINE__);
+ ev = event;
+ bd_info = data;
+ bd = bd_info->border;
+
+ if (ev->window != bd->event_win &&
+ ev->event_window != bd->event_win)
+ return ECORE_CALLBACK_PASS_ON;
+
+ if (!bd_info->resize_req.mouse.down)
+ return ECORE_CALLBACK_PASS_ON;
+
+ bd->lock_user_location = 0;
+ e_grabinput_release(bd->event_win, bd->event_win);
+
+ if (bd_info->resize_req.mouse.resize)
+ {
+ L(LT_AIA, "[ILLUME2][AIA] %s(%d)... \n", __func__, __LINE__);
+ Evas_Coord_Rectangle r;
+ _resize_rect_geometry_get(bd_info, &r, ev->root.x, ev->root.y, bd_info->resize_req.direction);
+
+ bd_info->resize_req.direction = ECORE_X_NETWM_DIRECTION_CANCEL;
+ bd_info->resize_req.mouse.x = r.x + bd->zone->x;
+ bd_info->resize_req.mouse.y = r.y + bd->zone->y;
+ bd_info->resize_req.mouse.w = r.w;
+ bd_info->resize_req.mouse.h = r.h;
+ bd_info->resize_req.need_change = 1;
+ bd->changes.pos = 1;
+ bd->changes.size = 1;
+ bd->changed = 1;
+ Evas_Object *o = (Evas_Object *)e_object_data_get(E_OBJECT(bd));
+ if (o)
+ {
+ evas_object_del(o);
+ printf("[IL2] DEL OBJ in UP\n");
+ }
+ }
+ else
+ {
+ L(LT_AIA, "[ILLUME2][AIA] %s(%d)... \n", __func__, __LINE__);
+ bd_info->resize_req.mouse.x = ev->root.x + bd_info->resize_req.mouse.dx;
+ bd_info->resize_req.mouse.y = ev->root.y + bd_info->resize_req.mouse.dy;
+ }
+
+ bd_info->resize_req.mouse.down = 0;
+ bd_info->resize_req.mouse.resize = 0;
+ bd_info->resize_req.mouse.locked = 0;
+
+ /* 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);
+
+ ecore_x_window_raise(bd->client.shell_win);
+ _policy_border_illume_handlers_remove(bd_info);
+
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+static Eina_Bool
+_policy_border_cb_mouse_move(void *data,
+ int type __UNUSED__,
+ void *event)
+{
+ Ecore_Event_Mouse_Move *ev;
+ E_Illume_Border_Info *bd_info;
+ E_Border *bd;
+
+ L(LT_AIA, "[ILLUME2][AIA] %s(%d)... \n", __func__, __LINE__);
+ ev = event;
+ bd_info = data;
+ bd = bd_info->border;
+
+ if (ev->window != bd->event_win &&
+ ev->event_window != bd->event_win)
+ return ECORE_CALLBACK_PASS_ON;
+
+ if (!bd_info->resize_req.mouse.down)
+ return ECORE_CALLBACK_PASS_ON;
+
+ if (bd_info->resize_req.mouse.resize)
+ {
+ L(LT_AIA, "[ILLUME2][AIA] %s(%d)... event (x:%d, y:%d, root_x:%d, root_y:%d)\n", __func__, __LINE__, ev->x, ev->y, ev->root.x, ev->root.y);
+ Evas_Object *o = (Evas_Object *)e_object_data_get(E_OBJECT(bd));
+ if (!o) return ECORE_CALLBACK_PASS_ON;
+
+ Evas_Coord_Rectangle r;
+ _resize_rect_geometry_get(bd_info, &r, ev->root.x, ev->root.y, bd_info->resize_req.direction);
+
+ L(LT_AIA, "[ILLUME2][AIA] %s(%d)... x:%d, y:%d, w:%d, h:%d\n", __func__, __LINE__, r.x, r.y, r.w, r.h);
+ evas_object_move(o, r.x, r.y);
+ evas_object_resize(o, r.w, r.h);
+ }
+ else
+ {
+ L(LT_AIA, "[ILLUME2][AIA] %s(%d)... \n", __func__, __LINE__);
+ bd_info->resize_req.mouse.x = ev->root.x + bd_info->resize_req.mouse.dx;
+ bd_info->resize_req.mouse.y = ev->root.y + bd_info->resize_req.mouse.dy;
+ bd->changes.pos = 1;
+ bd->changed = EINA_TRUE;
+ }
+
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+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_CLIPBOARD_GEOMETRY)
+ {
+ _policy_property_clipboard_geometry_change (event);
+ }
+ else if (event->atom == ECORE_X_ATOM_E_ILLUME_CLIPBOARD_STATE)
+ {
+ _policy_property_clipboard_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_E_ILLUME_INDICATOR_OPACITY_MODE)
+ {
+ _policy_property_indicator_opacity_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);
+ }
+ else if (event->atom == ECORE_X_ATOM_E_ILLUME_WINDOW_STATE)
+ {
+ _policy_property_illume_window_state_change(event);
+ }
+ /* 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 %6i %6i %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 desk WinName\n" );
+ fprintf (out, "--------------------------------------------------------------------------------------------------------------------\n" );
+
+ EINA_LIST_FOREACH(e_border_info_list, l, bd_info)
+ {
+ E_Zone *zone;
+ E_Border *bd;
+ int x, y;
+ int desk_x=0, desk_y=0;
+ if (!bd_info) continue;
+
+ bd = bd_info->border;
+ zone = bd->zone;
+
+ for (x = 0; x < zone->desk_x_count; x++)
+ {
+ for (y = 0; y < zone->desk_y_count; y++)
+ {
+ if (bd->desk == zone->desks[x + zone->desk_x_count * y])
+ {
+ desk_x = x;
+ desk_y = y;
+ break;
+ }
+ }
+ }
+ fprintf (out, "%3i 0x%07x 0x%07x %4i %4i %6i %6i %3i %5i %5i (%d,%d) %-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, desk_x, desk_y, bd_info->border->client.netwm.name);
+ }
+ fprintf (out, "--------------------------------------------------------------------------------------------------------------------\n" );
+ }
+ ecore_x_flush();
+
+ if (temp_bd == NULL) goto finish;
+
+ E_Border_List *bl;
+
+ fprintf (out, "-------------------------------- 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 %6i %6i %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 comp_vis iconify by_wm 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 %6i %6i %5i %5i %5i %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->comp_vis, xwin_info->bd_info->border->iconic, xwin_info->iconify_by_wm, xwin_info->bd_info->border->client.win);
+ }
+ else
+ {
+ fprintf (out, "%3i 0x%07x %4i %4i %6i %6i %5i %5i %5i %5i 0 %3i 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, xwin_info->comp_vis, xwin_info->iconify_by_wm);
+ }
+ }
+ else
+ {
+ fprintf (out, "%3i 0x%07x %4i %4i %6i %6i %5i %5i %5i %5i 0 %3i 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, xwin_info->comp_vis, xwin_info->iconify_by_wm);
+ }
+ }
+ fprintf (out, "---------------------------------------------------------------------------------------------\n" );
+ }
+
+ ecore_x_flush();
+ }
+
+finish:
+
+ fprintf (out, "--------------------------------GLOBAL INFO--------------------------------------------------\n" );
+ fprintf (out, "g_rotated_win:0x%07x (g_root_angle:%d)\n", g_rotated_win, g_root_angle);
+ fprintf (out, "g_active_win:0x%07x (pid:%d, angle:%d)\n", g_active_win, g_active_pid, _policy_window_rotation_angle_get(g_active_win));
+ fprintf (out, "g_indi_control_win:0x%07x\n", g_indi_control_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 == ECORE_X_ERROR_CODE_SUCCESS)
+ {
+ if (prop_ret && num_ret)
+ {
+ angle = ((int *)prop_ret)[0];
+ if (angle % 90) angle = -1;
+ }
+ 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)
+{
+ Ecore_X_Illume_Indicator_State state;
+ int show;
+
+ state = ecore_x_e_illume_indicator_state_get(bd->client.win);
+ if (state == ECORE_X_ILLUME_INDICATOR_STATE_ON)
+ show = 1;
+ else if (state == ECORE_X_ILLUME_INDICATOR_STATE_OFF)
+ show = 0;
+ else
+ show = -1;
+
+ 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 = 0x%07x 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 = 0x%07x.. 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 = 0x%07x 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 = 0x%07x.. 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:0x%07x, 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 = 0x%07x\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 = 0x%07x, sibling = 0x%07x, 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 = 0x%07x (layer = %d), sibling = 0x%07x (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 = 0x%07x, sibling = 0x%07x, 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:0x%07x, above_win:0x%07x\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:0x%07x, below_win:0x%07x\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
+
+ return 1;
+}
+
+
+int _policy_init (void)
+{
+ Eina_List *ml;
+ E_Manager *man;
+
+ /* 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);
+ return 0;
+ }
+
+ /* for visibility */
+ _e_illume_msg_handler = e_msg_handler_add(_policy_msg_handler, NULL);
+
+ return 1;
+}
+
+
+void _policy_fin (void)
+{
+ /* for visibility */
+ if (_e_illume_msg_handler) e_msg_handler_del(_e_illume_msg_handler);
+ eina_hash_free (_e_illume_xwin_info_hash);
+}
+
+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 = 0x%07x\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 = 0x%07x\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*) calloc (1, sizeof (E_Illume_Border_Info));
+ if (!bd_info)
+ {
+ fprintf (stderr, "[ILLUME2] 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;
+ // set opaque
+ bd_info->opaque = _policy_property_window_opaque_get(bd->client.win);
+
+ // 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:0x%07x) -> other(win:0x%07x) ]\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:0x%07x) ]\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 = 0x%07x\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 = 0x%07x\n", __func__, __LINE__, bd, bd->client.win);
+ return;
+ }
+
+ _policy_border_illume_handlers_remove(bd_info);
+
+ e_border_info_list = eina_list_remove (e_border_info_list, bd_info);
+ L (LT_STACK, "[ILLUME2][STACK] %s(%d)... remove bd(win:0x%07x)\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;
+ E_Illume_Border_Info *bd_info;
+ int num, i, layer;
+
+ if (!bd) return POL_APP_LAYER;
+
+ bd_info = _policy_get_border_info(bd);
+ if (!bd_info) 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 = _policy_notification_level_map(bd_info->level);
+ }
+
+ free (types);
+ }
+
+ if (bd->client.netwm.state.stacking == E_STACKING_BELOW)
+ {
+ ILLUME2_TRACE ("[ILLUME2-NEW] %s(%d)... WIN:0x%07x 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:0x%07x 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 = 0x%07x\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->moving && !bd->client.illume.win_state.state)
+ {
+ L(LT_AIA, "[ILLUME2][AIA] %s(%d)... Cancel moving... win:0x%07x, bd->moving:%d\n", __func__, __LINE__, bd->client.win, bd->moving);
+ e_border_move_cancel();
+ }
+
+ 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)
+ {
+ if (bd->client.illume.win_state.state)
+ {
+ if (bd_info->resize_req.need_change)
+ {
+ if ((bd->x != bd_info->resize_req.mouse.x) ||
+ (bd->y != bd_info->resize_req.mouse.y))
+ _policy_border_move(bd,
+ bd_info->resize_req.mouse.x,
+ bd_info->resize_req.mouse.y);
+
+ if ((bd->w != bd_info->resize_req.mouse.w) ||
+ (bd->h != bd_info->resize_req.mouse.h))
+ _policy_border_resize(bd,
+ bd_info->resize_req.mouse.w,
+ bd_info->resize_req.mouse.h);
+
+ bd_info->resize_req.need_change = 0;
+ L(LT_AIA, "[ILLUME2][AIA] %s(%d)... bd move resize... (%d, %d, %d, %d)\n", __func__, __LINE__, bd->x, bd->y, bd->w, bd->h);
+ }
+
+ if (bd_info->resize_req.mouse.down &&
+ bd_info->resize_req.mouse.locked)
+ {
+ if ((bd->x != bd_info->resize_req.mouse.x) ||
+ (bd->y != bd_info->resize_req.mouse.y))
+ _policy_border_move(bd,
+ bd_info->resize_req.mouse.x,
+ bd_info->resize_req.mouse.y);
+ L(LT_AIA, "[ILLUME2][AIA] %s(%d)... bd move resize... (%d, %d, %d, %d)\n", __func__, __LINE__, bd->x, bd->y, bd->w, bd->h);
+ }
+ }
+
+ _policy_zone_layout_app_layer_set (bd, layer);
+ return;
+ }
+
+ /* resize & move if needed */
+ if (bd->client.illume.win_state.state)
+ {
+ if (bd_info->resize_req.need_change)
+ {
+ if ((bd->x != bd_info->resize_req.mouse.x) ||
+ (bd->y != bd_info->resize_req.mouse.y))
+ _policy_border_move(bd,
+ bd_info->resize_req.mouse.x,
+ bd_info->resize_req.mouse.y);
+
+ if ((bd->w != bd_info->resize_req.mouse.w) ||
+ (bd->h != bd_info->resize_req.mouse.h))
+ _policy_border_resize(bd,
+ bd_info->resize_req.mouse.w,
+ bd_info->resize_req.mouse.h);
+ L(LT_AIA, "[ILLUME2][AIA] %s(%d)... bd move resize... (%d, %d, %d, %d)\n", __func__, __LINE__, bd->x, bd->y, bd->w, bd->h);
+ bd_info->resize_req.need_change = 0;
+ }
+
+ if (bd_info->resize_req.mouse.down &&
+ bd_info->resize_req.mouse.locked)
+ {
+ if ((bd->x != bd_info->resize_req.mouse.x) ||
+ (bd->y != bd_info->resize_req.mouse.y))
+ _policy_border_move(bd,
+ bd_info->resize_req.mouse.x,
+ bd_info->resize_req.mouse.y);
+ L(LT_AIA, "[ILLUME2][AIA] %s(%d)... bd move resize... (%d, %d, %d, %d)\n", __func__, __LINE__, bd->x, bd->y, bd->w, bd->h);
+ }
+ }
+ else
+ {
+ 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 = 0x%07x\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 = 0x%07x\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 = 0x%07x\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 int
+_policy_notification_level_map(int level)
+{
+ switch (level)
+ {
+ case E_ILLUME_NOTIFICATION_LEVEL_LOW: return POL_NOTIFICATION_LAYER_LOW;
+ case E_ILLUME_NOTIFICATION_LEVEL_NORMAL: return POL_NOTIFICATION_LAYER_NORMAL;
+ case E_ILLUME_NOTIFICATION_LEVEL_HIGH: return POL_NOTIFICATION_LAYER_HIGH;
+ default: return POL_NOTIFICATION_LAYER_LOW;
+ }
+}
+
+/* find new focus window */
+static void
+_policy_border_focus_top_stack_set (E_Border* bd)
+{
+ E_Border *temp_bd;
+ E_Border *cur_focus;
+ E_Border_List *bl;
+ int root_w, root_h;
+
+ root_w = bd->zone->w;
+ root_h = bd->zone->h;
+
+ cur_focus = e_border_focused_get();
+
+ bl = e_container_border_list_last(bd->zone->container);
+ while ((temp_bd = e_container_border_list_prev(bl)))
+ {
+ if (temp_bd == cur_focus) break;
+
+ 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 != bd) &&
+ (temp_bd->client.illume.win_state.state == ECORE_X_ILLUME_WINDOW_STATE_FLOATING)) 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);
+}
+
+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:0x%07x), stack(win:0x%07x), 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) 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:0x%07x) -> stack(win:0x%07x) ]\n", __func__, __LINE__, ev->border->client.win, ev->stack->client.win);
+ }
+ 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:0x%07x) -> other(win:0x%07x).. No stack(win:0x%07x) 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:0x%07x) ]\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:0x%07x) -> bd(win:0x%07x) ]\n", __func__, __LINE__, ev->stack->client.win, ev->border->client.win);
+ }
+ 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:0x%07x) -> other(win:0x%07x).. No stack(win:0x%07x) 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:0x%07x) ---> ]\n", __func__, __LINE__, ev->border->client.win);
+ }
+ }
+ else
+ {
+ ILLUME2_TRACE ("[ILLUME2-NEW] %s(%d)... Unknown type... border (0x%07x), win (0x%07x), 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) &&
+ (ev->border->layer == POL_NOTIFICATION_LAYER))
+ {
+ E_Border* indi_bd;
+ indi_bd = e_illume_border_indicator_get(ev->border->zone);
+ if (indi_bd)
+ {
+ L(LT_INDICATOR, "[ILLUME2][INDICATOR] %s(%d)... win = 0x%07x.. Control Indicator.\n", __func__, __LINE__, ev->border->client.win);
+ _policy_border_indicator_control(indi_bd);
+ }
+ }
+
+ ev->border->changes.pos = 1;
+ ev->border->changed = 1;
+
+ return;
+}
+
+void _policy_border_zone_set(E_Event_Border_Zone_Set *event)
+{
+ E_Event_Border_Zone_Set* ev;
+ E_Border *bd;
+
+ ev = event;
+
+ bd = event->border;
+ if (!bd) return;
+
+ ecore_x_e_illume_zone_set(bd->client.win, bd->zone->black_win);
+}
+
+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;
+
+ if (qp->popup)
+ {
+ bd_info = _policy_get_border_info(qp->popup->border);
+ if (bd_info)
+ {
+ bd_info->level = level;
+ e_border_stack_below (qp->popup->border, 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);
+ }
+ }
+
+ 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);
+ }
+ }
+}
+
+static void _policy_change_indicator_layer(E_Border *indi_bd, E_Border *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;
+ int new_noti_layer = 0;
+
+ indi_bd_info = _policy_get_border_info(indi_bd);
+ if (indi_bd_info)
+ {
+ indi_bd_info->level = level;
+ }
+
+ if (layer == POL_NOTIFICATION_LAYER)
+ {
+ new_noti_layer = _policy_notification_level_map(level);
+
+ if (indi_bd->layer != new_noti_layer)
+ e_border_layer_set(indi_bd, new_noti_layer);
+ }
+ else if (indi_bd->layer != layer)
+ e_border_layer_set(indi_bd, layer);
+
+ if (bd)
+ {
+ E_Border *top_bd;
+ E_Illume_Border_Info *top_bd_info;
+
+ // check transient_for window
+ top_bd = _policy_border_transient_for_border_top_get(bd);
+ if (!top_bd) top_bd = bd;
+
+ top_bd_info = _policy_get_border_info(top_bd);
+ if (!top_bd_info)
+ {
+ if ((qp = e_illume_quickpanel_by_zone_get(indi_bd->zone)))
+ {
+ _policy_change_quickpanel_layer(qp, indi_bd, layer, level);
+ }
+ return;
+ }
+
+ L (LT_INDICATOR, "[ILLUME2][INDICATOR] %s(%d)... indicator's below win:0x%07x\n", __func__, __LINE__, top_bd->client.win);
+ _policy_border_stack_change(indi_bd, top_bd, E_ILLUME_STACK_ABOVE);
+
+ e_border_info_list = eina_list_remove(e_border_info_list, indi_bd_info);
+ e_border_info_list = eina_list_prepend_relative(e_border_info_list, indi_bd_info, top_bd_info);
+ L (LT_STACK, "[ILLUME2][STACK] %s(%d)... changed to [ bd(win:0x%07x) -> other(win:0x%07x) ]\n", __func__, __LINE__, indi_bd->client.win, top_bd->client.win);
+ }
+
+ if ((qp = e_illume_quickpanel_by_zone_get(indi_bd->zone)))
+ {
+ _policy_change_quickpanel_layer(qp, indi_bd, layer, level);
+ }
+}
+
+static Eina_Bool _policy_border_indicator_state_change(E_Border *indi_bd, E_Border *bd)
+{
+ E_Illume_Border_Info *bd_info;
+ int indi_show;
+ int level;
+
+ if (!indi_bd || !bd) return EINA_FALSE;
+
+ indi_show = _policy_border_indicator_state_get(bd);
+ if (indi_show == 1)
+ {
+ L(LT_INDICATOR, "[ILLUME2][INDICATOR] %s(%d)... Show Indicator (by win: 0x%07x)\n", __func__, __LINE__, bd->client.win);
+ e_border_show(indi_bd);
+
+ if ((e_illume_border_is_notification(bd)) ||
+ (bd->layer == POL_NOTIFICATION_LAYER))
+ {
+ bd_info = _policy_get_border_info(bd);
+ if (bd_info)
+ level = bd_info->level;
+ else
+ level = 150;
+
+ L(LT_NOTIFICATION, "[ILLUME2][NOTIFICATION] %s(%d)... Notification Win:0x%07x, Update Indicator's layer to NOTIFICATION.. level = %d\n", __func__, __LINE__, bd->client.win, level);
+ _policy_change_indicator_layer(indi_bd, bd, POL_NOTIFICATION_LAYER, level);
+ }
+ else
+ {
+ _policy_change_indicator_layer(indi_bd, NULL, POL_NOTIFICATION_LAYER, 50);
+ }
+
+ return EINA_TRUE;
+ }
+ else if (indi_show == 0)
+ {
+ L(LT_INDICATOR, "[ILLUME2][INDICATOR] %s(%d)... Hide Indicator (by win: 0x%07x)\n", __func__, __LINE__, bd->client.win);
+ e_border_hide(indi_bd, 2);
+ return EINA_TRUE;
+ }
+ else
+ {
+ return EINA_FALSE;
+ }
+}
+
+static void
+_policy_border_indicator_control(E_Border *indi_bd)
+{
+ Eina_Inlist *xwin_info_list;
+ E_Illume_XWin_Info *xwin_info;
+ E_Border *bd;
+ Ecore_X_Illume_Indicator_Opacity_Mode mode;
+
+ if (!indi_bd) return;
+
+ xwin_info = NULL;
+ xwin_info_list = _e_illume_xwin_info_list;
+
+ if (xwin_info_list)
+ {
+ EINA_INLIST_REVERSE_FOREACH (xwin_info_list, xwin_info)
+ {
+ if (xwin_info->visibility != E_ILLUME_VISIBILITY_FULLY_OBSCURED)
+ {
+ if (xwin_info->bd_info)
+ {
+ bd = xwin_info->bd_info->border;
+
+ if (!bd) continue;
+ if (!bd->visible) continue;
+ if (indi_bd == bd) continue;
+ if (indi_bd->zone != bd->zone) continue;
+ if (e_illume_border_is_indicator(bd)) continue;
+ if (e_illume_border_is_keyboard(bd)) continue;
+ if (e_illume_border_is_keyboard_sub(bd)) continue;
+ if (bd->client.illume.win_state.state == ECORE_X_ILLUME_WINDOW_STATE_FLOATING) continue;
+
+ if (!_policy_border_indicator_state_change(indi_bd, bd))
+ continue;
+
+ mode = ecore_x_e_illume_indicator_opacity_get(bd->client.win);
+ ecore_x_e_illume_indicator_opacity_send(indi_bd->client.win, mode);
+
+ _policy_root_angle_set(bd);
+
+ L(LT_INDICATOR, "[ILLUME2][INDICATOR] %s(%d)... indicator_control_win = 0x%07x...\n", __func__, __LINE__, bd->client.win);
+ g_indi_control_win = bd->client.win;
+ break;
+ }
+ }
+ }
+ }
+}
+
+/* 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 Eina_Bool
+_policy_check_transient_child_visible(E_Border *bd)
+{
+ Eina_Bool ret = EINA_FALSE;
+ E_Illume_XWin_Info *child_xwin_info = NULL;
+ E_Border *l, *child = NULL;
+
+ EINA_LIST_FOREACH(bd->transients, l, child)
+ {
+ if (!child) continue;
+ if (ret) return ret;
+
+ child_xwin_info = _policy_xwin_info_find(child->win);
+ if ((child_xwin_info) &&
+ (child_xwin_info->visibility == E_ILLUME_VISIBILITY_UNOBSCURED))
+ {
+ return EINA_TRUE;
+ }
+
+ ret = _policy_check_transient_child_visible(child);
+ }
+
+ return ret;
+}
+
+static void
+_policy_calculate_visibility(void)
+{
+ // 1. CALCULATES window's region and decide it's visibility.
+ // 2. DO (UN)ICONIFY if it's needed.
+ // 3. SEND notify about visibility.
+ //
+ E_Zone *zone = NULL;
+ E_Border *bd = NULL, *indi_bd = NULL;
+ Eina_Inlist *xwin_info_list = NULL;
+ E_Illume_XWin_Info *xwin_info = NULL;
+ E_Illume_Border_Info *bd_info = NULL;
+ Ecore_X_XRegion *visible_region = NULL;
+ Ecore_X_XRegion *win_region = NULL;
+ Ecore_X_Rectangle visible_rect, win_rect;
+ Eina_Bool is_fully_obscured = EINA_FALSE;
+ Eina_Bool obscured_by_special_bd = EINA_FALSE;
+ Eina_Bool is_opaque_win = EINA_FALSE;
+ Eina_Bool do_not_iconify = EINA_FALSE;
+ int old_vis = 0;
+ int set_root_angle = 0;
+ int control_indi = 0;
+
+ if (!_g_visibility_changed) return;
+ _g_visibility_changed = EINA_FALSE;
+
+ L(LT_VISIBILITY, "[ILLUME2][VISIBILITY] %s(%d).. BEGIN calculate visibility ...\n", __func__, __LINE__);
+ xwin_info_list = _e_illume_xwin_info_list;
+ if (!xwin_info_list) return;
+
+ // set the entire visible region as a root geometry
+ visible_rect.x = 0;
+ visible_rect.y = 0;
+ visible_rect.width = _g_root_width;
+ visible_rect.height = _g_root_height;
+
+ visible_region = ecore_x_xregion_new();
+ if (!visible_region)
+ {
+ L (LT_VISIBILITY_DETAIL,
+ "[ILLUME2][VISIBILITY] BAD.... Creating visible region is failed.\n");
+ return;
+ }
+
+ ecore_x_xregion_union_rect(visible_region, visible_region, &visible_rect);
+
+ EINA_INLIST_REVERSE_FOREACH (xwin_info_list, xwin_info)
+ {
+ // skip "input only" window
+ if (xwin_info->attr.input_only) continue;
+
+ // skip "unmap" window
+ if ((xwin_info->attr.visible == 0) &&
+ (xwin_info->iconify_by_wm == 0)) continue;
+
+ if (!xwin_info->is_drawed) continue;
+
+ // initializing variable
+ bd_info = NULL;
+ bd = NULL;
+ is_opaque_win = EINA_TRUE;
+ do_not_iconify = EINA_FALSE;
+ old_vis = xwin_info->visibility;
+
+ bd_info = xwin_info->bd_info;
+ if (bd_info) bd = bd_info->border;
+
+ // 1. calculates window's region and decide it's visibility.
+ if (is_fully_obscured == EINA_FALSE)
+ {
+ win_rect.x = xwin_info->attr.x;
+ win_rect.y = xwin_info->attr.y;
+ win_rect.width = xwin_info->attr.w;
+ win_rect.height = xwin_info->attr.h;
+
+ // if it stick out or is bigger than the entire visible region,
+ // clip it by the entire visible's geometry.
+ E_RECTS_CLIP_TO_RECT(win_rect.x, win_rect.y,
+ win_rect.width, win_rect.height,
+ visible_rect.x, visible_rect.y,
+ (int)(visible_rect.width), (int)(visible_rect.height));
+
+ if (ecore_x_xregion_rect_contain(visible_region, &win_rect))
+ {
+ xwin_info->visibility = obscured_by_special_bd ?
+ E_ILLUME_VISIBILITY_FULLY_OBSCURED :
+ E_ILLUME_VISIBILITY_UNOBSCURED;
+
+ if (bd)
+ {
+ if (e_illume_border_is_lock_screen(bd))
+ {
+ obscured_by_special_bd = EINA_TRUE;
+ is_opaque_win = EINA_FALSE;
+ }
+ else if ((bd->client.illume.win_state.state ==
+ ECORE_X_ILLUME_WINDOW_STATE_FLOATING) ||
+ ((bd_info->opaque == 0) && (bd->client.argb)))
+ is_opaque_win = EINA_FALSE;
+ }
+ else
+ {
+ if (xwin_info->argb)
+ is_opaque_win = EINA_FALSE;
+ }
+
+ if (is_opaque_win)
+ {
+ win_region = ecore_x_xregion_new();
+ if (win_region)
+ {
+ ecore_x_xregion_union_rect(win_region, win_region, &win_rect);
+ ecore_x_xregion_subtract(visible_region, visible_region, win_region);
+ ecore_x_xregion_free(win_region);
+ win_region = NULL;
+
+ if (ecore_x_xregion_is_empty(visible_region))
+ {
+ is_fully_obscured = EINA_TRUE;
+ }
+ }
+ }
+ }
+ else
+ {
+ xwin_info->visibility = E_ILLUME_VISIBILITY_FULLY_OBSCURED;
+ }
+ }
+ else
+ {
+ xwin_info->visibility = E_ILLUME_VISIBILITY_FULLY_OBSCURED;
+ obscured_by_special_bd = EINA_FALSE;
+ }
+
+ if (!bd) continue;
+ if (!E_ILLUME_BORDER_IS_IN_MOBILE(bd)) continue;
+
+ // decide if it's the border that DO NOT iconify.
+ if (obscured_by_special_bd)
+ {
+ do_not_iconify = EINA_TRUE;
+ }
+ // when this border has transient windows,
+ // check out this child's visibility.
+ // if there is any child window that is UNOBSCURED,
+ // DO NOT iconify this border.
+ else if (bd->transients)
+ {
+ do_not_iconify = _policy_check_transient_child_visible(bd);
+ }
+
+ // 2. DO (UN)ICONIFY and send visibility notify if it's needed.
+ if (old_vis != xwin_info->visibility)
+ {
+#ifdef USE_DLOG
+ LOGD("[WM] SEND VISIBILITY. win:0x%07x (old:%d -> new:%d)", xwin_info->bd_info->border->client.win, old_vis, xwin_info->visibility);
+#endif
+ _policy_send_visibility_notify(bd->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_b y_border_angle!!! win:0x%07x\n", __func__, __LINE__, xwin_info->bd_info->border->client.win);
+ set_root_angle = 1;
+
+ if (_e_illume_cfg->use_force_iconify)
+ {
+ if (bd->iconic)
+ {
+ L(LT_ICONIFY, "[ILLUME2][ICONIFY] %s(%d).. Uniconify by illume.. win:0x%07x (parent:0x%07x)\n", __func__, __LINE__, xwin_info->bd_info->border->client.win, xwin_info->bd_info->border->parent ? xwin_info->bd_info->border->parent->client.win:(unsigned int)NULL);
+ _policy_border_force_uniconify(bd);
+ }
+ }
+ }
+ else if (xwin_info->visibility == E_ILLUME_VISIBILITY_FULLY_OBSCURED)
+ {
+ if (bd->client.win == g_rotated_win)
+ {
+ L(LT_ANGLE, "[ILLUME2][ANGLE] %s(%d).. g_rotated_win(0x%07x) is obscured.\n", __func__, __LINE__, xwin_info->bd_info->border->client.win);
+ set_root_angle = 1;
+ }
+
+ if (_e_illume_cfg->use_force_iconify)
+ {
+ if ((!bd->iconic) && (!do_not_iconify))
+ {
+ L(LT_ICONIFY, "[ILLUME2][ICONIFY] %s(%d).. Iconify by illume.. win:0x%07x (parent:0x%07x)\n", __func__, __LINE__, xwin_info->bd_info->border->client.win, xwin_info->bd_info->border->parent ? xwin_info->bd_info->border->parent->client.win:(unsigned int)NULL);
+ _policy_border_iconify_by_illume(xwin_info);
+ }
+ }
+ }
+
+ control_indi = 1;
+ zone = xwin_info->bd_info->border->zone;
+ }
+ }
+
+ if (control_indi)
+ {
+ if (_e_illume_cfg->use_indicator_widget)
+ {
+ L(LT_ANGLE, "[ILLUME2][ANGLE] %s(%d)... Control Root Angle.\n", __func__, __LINE__);
+ _policy_border_root_angle_control(zone);
+ }
+ else
+ {
+ indi_bd = e_illume_border_indicator_get(zone);
+ if (indi_bd)
+ {
+ L(LT_INDICATOR, "[ILLUME2][INDICATOR] %s(%d)... Control Indicator.\n", __func__, __LINE__);
+ _policy_border_indicator_control(indi_bd);
+ }
+ }
+ }
+
+ L(LT_VISIBILITY, "[ILLUME2][VISIBILITY] %s(%d).. END calculate visibility ...\n", __func__, __LINE__);
+
+ if (visible_region) ecore_x_xregion_free(visible_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:0x%07x EXIST in the list...\n", __func__, __LINE__, win);
+ return EINA_FALSE;
+ }
+
+ xwin_info = (E_Illume_XWin_Info*) calloc (1, 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);
+
+ if (_e_use_comp) xwin_info->comp_vis = 0;
+ else xwin_info->comp_vis = 1;
+
+ 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:0x%07x 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)
+{
+ Ecore_X_Window parent;
+
+ parent = ecore_x_window_parent_get(event->win);
+ if (parent != ecore_x_window_root_get(event->win))
+ return;
+
+ L (LT_XWIN, "[ILLUME2][XWIN] %s(%d).. win:0x%07x...\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:0x%07x...\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:0x%07x...\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:0x%07x...\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:0x%07x in the list...\n", __func__, __LINE__, event->win);
+ return ;
+ }
+
+ xwin_info->attr.visible = 1;
+
+ if (xwin_info->comp_vis)
+ {
+ L(LT_VISIBILITY, "[ILLUME2][VISIBILITY] %s(%d).. visibility is changed... win:0x%07x\n", __func__, __LINE__, event->win);
+ _g_visibility_changed = EINA_TRUE;
+ }
+}
+
+
+void _policy_window_hide (Ecore_X_Event_Window_Hide *event)
+{
+ L (LT_XWIN, "[ILLUME2][XWIN] %s(%d).. win:0x%07x...\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:0x%07x in the list...\n", __func__, __LINE__, event->win);
+ return;
+ }
+
+ xwin_info->attr.visible = 0;
+
+ L(LT_VISIBILITY, "[ILLUME2][VISIBILITY] %s(%d).. visibility is changed... win:0x%07x\n", __func__, __LINE__, event->win);
+ _g_visibility_changed = EINA_TRUE;
+}
+
+
+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;
+ E_Illume_XWin_Info* target_xwin_info;
+ int check_visibility;
+ Ecore_X_Window target_win;
+
+ L (LT_XWIN, "[ILLUME2][XWIN] %s(%d).. win:0x%07x...\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:0x%07x in the list...\n", __func__, __LINE__, event->win);
+ return;
+ }
+ target_xwin_info = xwin_info;
+
+ 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;
+ target_xwin_info = old_above_xwin_info;
+ 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)
+ {
+ if (target_xwin_info->attr.visible)
+ {
+ if (target_xwin_info->comp_vis)
+ {
+ L(LT_VISIBILITY, "[ILLUME2][VISIBILITY] %s(%d).. visibility is changed... win:0x%07x\n", __func__, __LINE__, event->win);
+ _g_visibility_changed = EINA_TRUE;
+ }
+ }
+ }
+}
+
+
+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 (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 (_e_illume_cfg->use_force_iconify)
+ {
+ if (e->detail == ECORE_X_WINDOW_STACK_BELOW && !e->abovewin)
+ {
+ L(LT_ICONIFY, "[ILLUME2][ICONIFY] %s(%d).. Request Lower window... win:0x%07x\n", __func__, __LINE__, e->win);
+ E_Illume_XWin_Info *xwin_info = _policy_xwin_info_find(bd->win);
+ if (xwin_info)
+ {
+ L(LT_ICONIFY, "[ILLUME2][ICONIFY] %s(%d).. ICONIFY win:0x%07x And UN-ICONIFY Top win...\n", __func__, __LINE__, bd->client.win);
+ _policy_border_uniconify_top_border(bd);
+ }
+ }
+ }
+
+ 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);
+ }
+ }
+ }
+}
+
+void _policy_window_sync_draw_done (Ecore_X_Event_Client_Message* event)
+{
+ E_Border* bd;
+}
+
+/* Setting window mode requires window stack change and window geometry
+ * change. But now, the WM can't control these sequential operations
+ * using x property set API which whould be able to overwrite previous
+ * value before getting x property by the WM.
+ * So we changed ecore_x_e_illume_window_state_set function to use x send
+ * message and x sync counter. When the WM receives this message,
+ * the WM sets window mode and then increases x sync counter.
+ *
+ * TODO: We need to make a new protocol to set the window mode!!
+ */
+void _policy_illume_win_state_change_request (Ecore_X_Event_Client_Message *event)
+{
+ E_Border *bd = NULL;
+ Ecore_X_Atom atom = 0, set = 0;
+ unsigned int state = 0;
+ Ecore_X_Sync_Counter counter = 0;
+ long val = 0;
+
+ if (!event) return;
+
+ bd = e_border_find_by_client_window(event->win);
+ atom = event->data.l[0];
+ counter = event->data.l[1];
+ val = event->data.l[2];
+
+ if (atom == ECORE_X_ATOM_E_ILLUME_WINDOW_STATE_NORMAL)
+ {
+ state = ECORE_X_ILLUME_WINDOW_STATE_NORMAL;
+ set = atom;
+ }
+ else if (atom == ECORE_X_ATOM_E_ILLUME_WINDOW_STATE_FLOATING)
+ {
+ state = ECORE_X_ILLUME_WINDOW_STATE_FLOATING;
+ set = atom;
+ }
+
+ ELBF(ELBT_ILLUME, 0, event->win,
+ "GET WIN_STATE_CHANGE_REQ bd:0x%08x(%d->%d) counter:0x%08x val:%d",
+ bd ? bd->client.win : NULL,
+ bd ? bd->client.illume.win_state.state : 0,
+ state,
+ counter, val);
+
+ if (bd)
+ _policy_border_illume_window_state_change(bd, state);
+
+ if (set != 0)
+ {
+ ecore_x_window_prop_atom_set(event->win, ECORE_X_ATOM_E_ILLUME_WINDOW_STATE,
+ &set, 1);
+ ELB(ELBT_ILLUME, "SET WIN_STATE", event->win);
+ }
+
+ if (counter) ecore_x_sync_counter_inc(counter, 1);
+}
+
+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_root_angle_set(E_Border *bd)
+{
+ int angle;
+ Ecore_X_Window root;
+
+ if (bd)
+ {
+ angle = _policy_window_rotation_angle_get(bd->client.win);
+ if (angle == -1) return EINA_FALSE;
+ if (!(((bd->w == bd->zone->w) && (bd->h == bd->zone->h)) ||
+ ((bd->w == bd->zone->h) && (bd->h == bd->zone->w))))
+ return EINA_FALSE;
+
+ g_rotated_win = bd->client.win;
+ root = bd->zone->container->manager->root;
+ }
+ else
+ {
+ angle = g_root_angle;
+ g_rotated_win = 0;
+ root = 0;
+ }
+
+ if (_e_illume_cfg->use_indicator_widget)
+ {
+ L(LT_INDICATOR, "[ILLUME2][INDICATOR] %s(%d)... indicator_control_win = 0x%07x...\n", __func__, __LINE__, g_rotated_win);
+ g_indi_control_win = g_rotated_win;
+ }
+
+ L (LT_ANGLE, "[ILLUME2][ANGLE] %s(%d).. new_win:0x%07x, old angle:%d -> new_angle:%d\n", __func__, __LINE__, g_rotated_win, g_root_angle, angle);
+ 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);
+
+ return EINA_TRUE;
+}
+
+static void
+_policy_change_root_angle_by_border_angle (E_Border* bd)
+{
+ L (LT_ANGLE, "[ILLUME2][ANGLE] %s(%d)... win:0x%07x\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_keyboard_sub(bd)) return;
+ if (e_illume_border_is_quickpanel(bd)) return;
+ if (e_illume_border_is_quickpanel_popup(bd)) return;
+
+ L (LT_ANGLE, "[ILLUME2][ANGLE] %s(%d)... CALL _policy_root_angle_set.. win:0x%07x\n", __func__, __LINE__, bd->client.win);
+ _policy_root_angle_set(bd);
+}
+
+static void
+_policy_indicator_angle_change (E_Border* indi_bd, int angle)
+{
+ L (LT_ANGLE, "[ILLUME2][ANGLE] %s(%d)... indicator:0x%07x\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)
+ {
+ _policy_layout_quickpanel_rotate (qp, angle);
+ }
+ }
+}
+
+static void
+_policy_border_transient_for_group_make(E_Border *bd,
+ Eina_List **list)
+{
+ E_Border *child;
+ Eina_List *l;
+
+ if (!bd) return;
+
+ E_OBJECT_CHECK(bd);
+ E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE);
+
+ if (e_config->transient.raise)
+ {
+ EINA_LIST_FOREACH(bd->transients, l, child)
+ {
+ if (!child) continue;
+ if (!child->iconic)
+ {
+ *list = eina_list_prepend(*list, child);
+ _policy_border_transient_for_group_make(child, list);
+ }
+ }
+ }
+}
+
+static E_Border *
+_policy_border_transient_for_border_top_get(E_Border *bd)
+{
+ E_Border *top_border = NULL;
+ Eina_List *transient_list = NULL;
+
+ _policy_border_transient_for_group_make(bd, &transient_list);
+
+ if (transient_list)
+ {
+ Eina_List *l = NULL;
+ E_Border *temp_bd;
+ E_Border *temp_bd2;
+ E_Border_List *bl;
+
+ bl = e_container_border_list_last(bd->zone->container);
+ while ((temp_bd = e_container_border_list_prev(bl)))
+ {
+ if (top_border) break;
+ if (temp_bd == bd) break;
+
+ EINA_LIST_FOREACH(transient_list, l, temp_bd2)
+ {
+ if (temp_bd == temp_bd2)
+ {
+ top_border = temp_bd2;
+ break;
+ }
+ }
+ }
+ e_container_border_list_free(bl);
+ }
+
+ L (LT_TRANSIENT_FOR, "[ILLUME2][TRANSIENT] %s(%d).. win:0x%07x, transient_for_top_win:0x%07x\n", __func__, __LINE__, bd->client.win, top_border ? (unsigned int)top_border->client.win:(unsigned int)NULL);
+
+ eina_list_free(transient_list);
+
+ return top_border;
+}
+
+static void
+_policy_border_transient_for_layer_set(E_Border *bd,
+ E_Border *parent_bd,
+ int layer)
+{
+ int raise;
+ E_Border *top_border;
+
+ E_OBJECT_CHECK(bd);
+ E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE);
+
+ L (LT_TRANSIENT_FOR, "[ILLUME2][TRANSIENT] %s(%d).. win:0x%07x, transient_for:0x%07x, layer:%d\n", __func__, __LINE__, bd->client.win, parent_bd ? (unsigned int)parent_bd->client.win:(unsigned int)NULL, layer);
+
+ ecore_x_window_shadow_tree_flush();
+
+ raise = e_config->transient.raise;
+
+ bd->saved.layer = bd->layer;
+ bd->layer = layer;
+ if (e_config->transient.layer)
+ {
+ Eina_List *l;
+ E_Border *child;
+
+ /* We need to set raise to one, else the child wont
+ * follow to the new layer. It should be like this,
+ * even if the user usually doesn't want to raise
+ * the transients.
+ */
+ e_config->transient.raise = 1;
+ EINA_LIST_FOREACH(bd->transients, l, child)
+ {
+ if (!child) continue;
+ child->layer = layer;
+ }
+ }
+
+ top_border = _policy_border_transient_for_border_top_get(parent_bd);
+ if (top_border)
+ {
+ if (top_border != bd)
+ {
+ L (LT_STACK, "[ILLUME2][STACK] %s(%d)... STACK CHANGE with ABOVE... win:0x%07x, above_win:0x%07x\n", __func__, __LINE__, bd->client.win, top_border->client.win);
+ e_border_stack_above(bd, top_border);
+ }
+ }
+ else
+ {
+ L (LT_STACK, "[ILLUME2][STACK] %s(%d)... STACK CHANGE with ABOVE... win:0x%07x, above_win:0x%07x\n", __func__, __LINE__, bd->client.win, parent_bd->client.win);
+ e_border_stack_above(bd, parent_bd);
+ }
+
+ e_config->transient.raise = raise;
+}
+
+/* for desktop mode */
+static void
+_policy_zone_layout_app_single_monitor(E_Illume_Border_Info* bd_info, E_Illume_Config_Zone *cz)
+{
+ E_Border* bd;
+ int layer;
+
+ 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);
+
+ if (bd->new_client)
+ {
+ int zx = 0, zy = 0, zw = 0, zh = 0;
+ int new_x, new_y, new_w, new_h;
+
+ if (!bd->client.icccm.request_pos)
+ {
+ double delta;
+ Eina_List *skiplist = NULL;
+
+ if (bd->zone)
+ e_zone_useful_geometry_get(bd->zone, &zx, &zy, &zw, &zh);
+
+ // calculate width & height
+ if (zw > zh)
+ delta = zh / 16.0;
+ else
+ delta = zw / 16.0;
+
+ delta = delta * 0.66;
+
+ new_w = delta * 9.0;
+ new_h = delta * 16.0;
+
+ if (zw > new_w)
+ new_x = zx + (rand() % (zw - new_w));
+ else
+ new_x = zx;
+ if (zh > new_h)
+ new_y = zy + (rand() % (zh - new_h));
+ else
+ new_y = zy;
+
+ skiplist = eina_list_append(skiplist, bd);
+
+ e_place_zone_region_smart(bd->zone, skiplist,
+ bd->x, bd->y, new_w, new_h,
+ &new_x, &new_y);
+
+ eina_list_free(skiplist);
+ }
+ else
+ {
+ if (bd->zone)
+ e_zone_useful_geometry_get(bd->zone, &zx, &zy, &zw, &zh);
+
+ if (zx > bd->x) new_x = zx;
+ else new_x = bd->x;
+
+ if (zy > bd->y) new_y = zy;
+ else new_y = bd->y;
+
+ if (zw < bd->w) new_w = zw;
+ else new_w = bd->w;
+
+ if (zh < bd->h) new_h = zh;
+ else new_h = bd->h;
+ }
+
+ if ((bd->x != new_x) || (bd->y != new_y))
+ _policy_border_move(bd, new_x, new_y);
+
+ if ((bd->w != new_w) || (bd->h != new_h))
+ _policy_border_resize(bd, new_w, new_h);
+ }
+ else
+ {
+ /* check if user defined position */
+ if (bd->client.icccm.request_pos)
+ {
+ if (bd->client.illume.win_state.state)
+ {
+ if (bd_info->resize_req.need_change)
+ {
+ if ((bd->x != bd_info->resize_req.mouse.x) ||
+ (bd->y != bd_info->resize_req.mouse.y))
+ _policy_border_move(bd,
+ bd_info->resize_req.mouse.x,
+ bd_info->resize_req.mouse.y);
+
+ if ((bd->w != bd_info->resize_req.mouse.w) ||
+ (bd->h != bd_info->resize_req.mouse.h))
+ _policy_border_resize(bd,
+ bd_info->resize_req.mouse.w,
+ bd_info->resize_req.mouse.h);
+
+ bd_info->resize_req.need_change = 0;
+ L(LT_AIA, "[ILLUME2][AIA] %s(%d)... bd move resize... (%d, %d, %d, %d)\n", __func__, __LINE__, bd->x, bd->y, bd->w, bd->h);
+ }
+
+ if (bd_info->resize_req.mouse.down &&
+ bd_info->resize_req.mouse.locked)
+ {
+ if ((bd->x != bd_info->resize_req.mouse.x) ||
+ (bd->y != bd_info->resize_req.mouse.y))
+ _policy_border_move(bd,
+ bd_info->resize_req.mouse.x,
+ bd_info->resize_req.mouse.y);
+ L(LT_AIA, "[ILLUME2][AIA] %s(%d)... bd move resize... (%d, %d, %d, %d)\n", __func__, __LINE__, bd->x, bd->y, bd->w, bd->h);
+ }
+ }
+ _policy_zone_layout_app_layer_set(bd, layer);
+ return;
+ }
+
+ /* resize & move if needed */
+ if (bd->client.illume.win_state.state)
+ {
+ if (bd_info->resize_req.need_change)
+ {
+ if ((bd->x != bd_info->resize_req.mouse.x) ||
+ (bd->y != bd_info->resize_req.mouse.y))
+ _policy_border_move(bd,
+ bd_info->resize_req.mouse.x,
+ bd_info->resize_req.mouse.y);
+
+ if ((bd->w != bd_info->resize_req.mouse.w) ||
+ (bd->h != bd_info->resize_req.mouse.h))
+ _policy_border_resize(bd,
+ bd_info->resize_req.mouse.w,
+ bd_info->resize_req.mouse.h);
+ L(LT_AIA, "[ILLUME2][AIA] %s(%d)... bd move resize... (%d, %d, %d, %d)\n", __func__, __LINE__, bd->x, bd->y, bd->w, bd->h);
+ bd_info->resize_req.need_change = 0;
+ }
+
+ if (bd_info->resize_req.mouse.down &&
+ bd_info->resize_req.mouse.locked)
+ {
+ if ((bd->x != bd_info->resize_req.mouse.x) ||
+ (bd->y != bd_info->resize_req.mouse.y))
+ _policy_border_move(bd,
+ bd_info->resize_req.mouse.x,
+ bd_info->resize_req.mouse.y);
+ L(LT_AIA, "[ILLUME2][AIA] %s(%d)... bd move resize... (%d, %d, %d, %d)\n", __func__, __LINE__, bd->x, bd->y, bd->w, bd->h);
+ }
+ }
+ }
+
+ /* set layer if needed */
+ _policy_zone_layout_app_layer_set(bd, layer);
+}
+
+void _policy_window_move_resize_request(Ecore_X_Event_Window_Move_Resize_Request *event)
+{
+ E_Border *bd;
+ E_Illume_Border_Info *bd_info;
+ Ecore_X_Event_Window_Move_Resize_Request *e;
+
+ e = event;
+ bd = e_border_find_by_client_window(e->win);
+
+ L(LT_AIA, "[ILLUME2][AIA] %s(%d)... win:0x%07x, x:%d, y:%d, direction:%d, button:%d, source:%d\n", __func__, __LINE__, e->win, e->x, e->y, e->direction, e->button, e->source);
+ if (!bd) return;
+ if (e->direction == ECORE_X_NETWM_DIRECTION_MOVE ||
+ e->direction == ECORE_X_NETWM_DIRECTION_CANCEL)
+ return;
+
+ if (bd->client.illume.win_state.state != ECORE_X_ILLUME_WINDOW_STATE_FLOATING)
+ return;
+
+ bd_info = _policy_get_border_info(bd);
+ if (!bd_info) return;
+
+ e_border_resize_cancel();
+
+ if (bd_info->resize_req.mouse.down)
+ return;
+
+ L(LT_AIA, "[ILLUME2][AIA] %s(%d)... \n", __func__, __LINE__);
+
+ bd_info->resize_req.mouse.down = 1;
+ bd_info->resize_req.mouse.dx = bd->x - e->x;
+ bd_info->resize_req.mouse.dy = bd->y - e->y;
+ bd_info->resize_req.mouse.x = bd->x;
+ bd_info->resize_req.mouse.y = bd->y;
+
+ bd->lock_user_location = 1;
+
+ _policy_border_illume_handlers_add(bd_info);
+ ecore_x_window_raise(bd->event_win);
+ e_grabinput_get(bd->event_win, 0, bd->event_win);
+
+ bd_info->resize_req.direction = e->direction;
+ _policy_resize_start(bd_info);
+}
+
+void _policy_window_state_request(Ecore_X_Event_Window_State_Request *event)
+{
+ E_Border *bd;
+ Ecore_X_Event_Window_State_Request *e;
+ int i;
+ E_Maximize maximize = 0;
+
+ e = event;
+ bd = e_border_find_by_client_window(e->win);
+ if (!bd) return;
+
+ for (i = 0; i < 2; i++)
+ {
+ switch (e->state[i])
+ {
+ case ECORE_X_WINDOW_STATE_MAXIMIZED_VERT:
+ if (bd->lock_client_maximize) break;
+ maximize |= E_MAXIMIZE_VERTICAL;
+ break;
+
+ case ECORE_X_WINDOW_STATE_MAXIMIZED_HORZ:
+ if (bd->lock_client_maximize) break;
+ maximize |= E_MAXIMIZE_HORIZONTAL;
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ if (maximize &= E_MAXIMIZE_BOTH)
+ {
+ if (e->action == ECORE_X_WINDOW_STATE_ACTION_ADD)
+ {
+ if (bd->pointer && bd->pointer->type)
+ e_pointer_type_pop(bd->pointer, bd, bd->pointer->type);
+ }
+ }
+}
+
+static void _policy_border_root_angle_control(E_Zone *zone)
+{
+ Eina_Inlist *xwin_info_list;
+ E_Illume_XWin_Info *xwin_info;
+ E_Border *bd;
+
+ xwin_info = NULL;
+ xwin_info_list = _e_illume_xwin_info_list;
+
+ if (xwin_info_list)
+ {
+ EINA_INLIST_REVERSE_FOREACH (xwin_info_list, xwin_info)
+ {
+ if (xwin_info->visibility != E_ILLUME_VISIBILITY_FULLY_OBSCURED)
+ {
+ if (xwin_info->bd_info)
+ {
+ bd = xwin_info->bd_info->border;
+
+ if (!bd) continue;
+ if (!bd->visible) 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_keyboard_sub(bd)) continue;
+ if (e_illume_border_is_quickpanel(bd)) continue;
+ if (e_illume_border_is_quickpanel_popup(bd)) continue;
+ if (bd->client.illume.win_state.state == ECORE_X_ILLUME_WINDOW_STATE_FLOATING) continue;
+
+ if (_policy_root_angle_set(bd)) break;
+ }
+ }
+ }
+ }
+}
+
+static int _policy_border_layer_map(int layer)
+{
+ int pos = 0;
+
+ if (layer < 0) layer = 0;
+ pos = 1 + (layer / 50);
+ if (pos > POL_NUM_OF_LAYER) pos = POL_NUM_OF_LAYER;
+ return pos;
+}
+
+static void
+_policy_msg_handler(void *data, const char *name, const char *info, int val, E_Object *obj, void *msgdata)
+{
+ E_Manager *man = (E_Manager *)obj;
+ E_Manager_Comp_Source *src = (E_Manager_Comp_Source *)msgdata;
+
+ // handle only comp.manager msg
+ if (strncmp(name, "comp.manager", sizeof("comp.manager"))) return;
+
+ if (!strncmp(info, "visibility.src", sizeof("visibility.src")))
+ {
+ E_Illume_XWin_Info *xwin_info;
+ Ecore_X_Window win;
+ Ecore_X_Window active_win;
+ Ecore_X_Window client_win;
+ Eina_Bool visible;
+
+ win = e_manager_comp_src_window_get(man, src);
+
+ xwin_info = _policy_xwin_info_find(win);
+ if (!xwin_info) return;
+
+ visible = e_manager_comp_src_visible_get(man, src);
+ if (visible)
+ {
+ xwin_info->is_drawed = EINA_TRUE;
+ xwin_info->comp_vis = 1;
+ L(LT_VISIBILITY, "[ILLUME2][VISIBILITY] %s(%d).. visibility is changed... win:0x%07x\n", __func__, __LINE__, win);
+ _g_visibility_changed = EINA_TRUE;
+
+ if (xwin_info->bd_info && xwin_info->bd_info->border)
+ client_win = xwin_info->bd_info->border->client.win;
+ else
+ client_win = win;
+
+ active_win = _policy_active_window_get(ecore_x_window_root_get(win));
+ if (active_win == client_win)
+ {
+ _policy_active_win_change(xwin_info, active_win);
+ }
+ }
+ else
+ {
+ xwin_info->comp_vis = 0;
+ }
+ }
+}
+
+void _policy_module_update(E_Event_Module_Update *event)
+{
+ if ((!strncmp(event->name, "comp-tizen", sizeof("comp-tizen"))) ||
+ (!strncmp(event->name, "comp", sizeof("comp"))))
+ {
+ if (event->enabled)
+ {
+ // set variable
+ _e_use_comp = EINA_TRUE;
+ }
+ else
+ {
+ // unset variable
+ _e_use_comp = EINA_FALSE;
+
+ // change all variable to 1
+ Eina_Inlist* xwin_info_list;
+ E_Illume_XWin_Info *xwin_info;
+
+ xwin_info_list = _e_illume_xwin_info_list;
+ if (xwin_info_list)
+ {
+ EINA_INLIST_REVERSE_FOREACH (xwin_info_list, xwin_info)
+ {
+ xwin_info->comp_vis = EINA_TRUE;
+ }
+ }
+ }
+ }
+}
+
+void _policy_border_iconify_cb(E_Border *bd)
+{
+ if (!_e_illume_cfg->use_force_iconify) return;
+
+ if (!bd) return;
+ if (e_object_is_del(E_OBJECT(bd))) return;
+
+ E_Illume_XWin_Info* xwin_info = _policy_xwin_info_find(bd->win);
+ if (xwin_info == NULL) return;
+
+ _policy_border_uniconify_below_borders_by_illume(xwin_info);
+
+ if (xwin_info->visibility != E_ILLUME_VISIBILITY_FULLY_OBSCURED)
+ {
+ int old_vis = xwin_info->visibility;
+ xwin_info->visibility = E_ILLUME_VISIBILITY_FULLY_OBSCURED;
+ L (LT_VISIBILITY, "[ILLUME2][VISIBILITY] SEND VISIBILITY NOTIFY (Line:%d)... win:0x%07x (old:%d -> new:%d)\n", __LINE__, xwin_info->bd_info->border->client.win, old_vis, xwin_info->visibility);
+#ifdef USE_DLOG
+ LOGD("[WM] SEND VISIBILITY. win:0x%07x (old:%d -> new:%d)", xwin_info->bd_info->border->client.win, old_vis, xwin_info->visibility);
+#endif
+ _policy_send_visibility_notify (xwin_info->bd_info->border->client.win, xwin_info->visibility);
+ }
+
+ L(LT_ICONIFY, "[ILLUME2][ICONIFY] %s(%d)... ICONFIY win:0x%07x (iconify_by_wm:%d)\n", __func__, __LINE__, bd->client.win, xwin_info->iconify_by_wm);
+ L(LT_VISIBILITY, "[ILLUME2][VISIBILITY] %s(%d).. visibility is changed... win:0x%07x\n", __func__, __LINE__, bd->client.win);
+ _g_visibility_changed = EINA_TRUE;
+
+ xwin_info->attr.visible = 0;
+
+ _policy_border_focus_top_stack_set(bd);
+}
+
+void _policy_border_uniconify_cb(E_Border *bd)
+{
+ if (!_e_illume_cfg->use_force_iconify) return;
+
+ if (!bd) return;
+ if (e_object_is_del(E_OBJECT(bd))) return;
+
+ E_Illume_XWin_Info* xwin_info = _policy_xwin_info_find(bd->win);
+ if (xwin_info == NULL) return;
+
+ L(LT_ICONIFY, "[ILLUME2][ICONIFY] %s(%d)... UNICONIFY win:0x%07x (iconify_by_wm:%d)\n", __func__, __LINE__, bd->client.win, xwin_info->iconify_by_wm);
+
+ xwin_info->iconify_by_wm = 0;
+ xwin_info->attr.visible = 1;
+
+ L(LT_VISIBILITY, "[ILLUME2][VISIBILITY] %s(%d).. visibility is changed... win:0x%07x\n", __func__, __LINE__, bd->client.win);
+ _g_visibility_changed = EINA_TRUE;
+
+ _policy_border_focus_top_stack_set(bd);
+}
+
+static void
+_policy_border_event_border_iconify_free(void *data __UNUSED__,
+ void *ev)
+{
+ E_Event_Border_Iconify *e;
+
+ e = ev;
+ // e_object_breadcrumb_del(E_OBJECT(e->border), "border_iconify_event");
+ e_object_unref(E_OBJECT(e->border));
+ E_FREE(e);
+}
+
+
+static void
+_policy_border_force_iconify(E_Border *bd)
+{
+ E_Event_Border_Iconify *ev;
+ unsigned int iconic;
+ E_Illume_XWin_Info* xwin_info;
+
+ E_OBJECT_CHECK(bd);
+ E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE);
+ if (bd->shading) return;
+ ecore_x_window_shadow_tree_flush();
+ if (!bd->iconic)
+ {
+ bd->iconic = 1;
+ e_border_hide(bd, 0);
+ if (bd->fullscreen) bd->desk->fullscreen_borders--;
+ edje_object_signal_emit(bd->bg_object, "e,action,iconify", "e");
+ }
+ iconic = 1;
+ e_hints_window_iconic_set(bd);
+ ecore_x_window_prop_card32_set(bd->client.win, E_ATOM_MAPPED, &iconic, 1);
+
+ ev = E_NEW(E_Event_Border_Iconify, 1);
+ ev->border = bd;
+ e_object_ref(E_OBJECT(bd));
+ // e_object_breadcrumb_add(E_OBJECT(bd), "border_iconify_event");
+ ecore_event_add(E_EVENT_BORDER_ICONIFY, ev, _policy_border_event_border_iconify_free, NULL);
+
+ xwin_info = _policy_xwin_info_find(bd->win);
+ if (xwin_info)
+ {
+ xwin_info->iconify_by_wm = 1;
+ }
+
+ if (e_config->transient.iconify)
+ {
+ Eina_List *l;
+ E_Border *child;
+ E_Illume_XWin_Info* child_xwin_info;
+
+ EINA_LIST_FOREACH(bd->transients, l, child)
+ {
+ if (!e_object_is_del(E_OBJECT(child)))
+ {
+ if (!child->iconic)
+ {
+ L(LT_ICONIFY, "[ILLUME2][ICONIFY] %s(%d)... Iconify by illume.. child:0x%07x\n", __func__, __LINE__, child->client.win);
+ child_xwin_info = _policy_xwin_info_find(child->win);
+ if (child_xwin_info)
+ {
+ _policy_border_iconify_by_illume(child_xwin_info);
+ }
+ }
+ }
+ }
+ }
+ e_remember_update(bd);
+}
+
+static void
+_policy_border_iconify_by_illume(E_Illume_XWin_Info *xwin_info)
+{
+ E_Border *bd;
+
+ if (!xwin_info) return;
+ if (!xwin_info->bd_info) return;
+ if (!xwin_info->bd_info->border) return;
+
+ bd = xwin_info->bd_info->border;
+ if (!E_ILLUME_BORDER_IS_IN_MOBILE(bd)) return;
+ if (e_object_is_del(E_OBJECT(bd))) return;
+
+ if (bd->parent && (!bd->parent->iconic)) return;
+
+ if (e_illume_border_is_indicator(bd)) return;
+ if (e_illume_border_is_keyboard(bd)) return;
+ if (e_illume_border_is_keyboard_sub(bd)) return;
+ if (e_illume_border_is_quickpanel(bd)) return;
+ if (e_illume_border_is_quickpanel_popup(bd)) return;
+ if (e_illume_border_is_clipboard(bd)) return;
+ if (e_illume_border_is_app_tray(bd)) return;
+ if (e_illume_border_is_miniapp_tray(bd)) return;
+ if (bd->client.illume.win_state.state == ECORE_X_ILLUME_WINDOW_STATE_FLOATING) return;
+
+ xwin_info->iconify_by_wm = 1;
+
+ if (!bd->iconic)
+ {
+ L(LT_ICONIFY, "[ILLUME2][ICONIFY] %s(%d)... FORCE_ICONIFY win:0x%07x\n", __func__, __LINE__, bd->client.win);
+ _policy_border_force_iconify(bd);
+ }
+}
+
+static void
+_policy_border_event_border_uniconify_free(void *data, void *ev)
+{
+ E_Event_Border_Uniconify *e;
+
+ e = ev;
+ // e_object_breadcrumb_del(E_OBJECT(e->border), "border_uniconify_event");
+ e_object_unref(E_OBJECT(e->border));
+ E_FREE(e);
+}
+
+static void _policy_border_force_uniconify(E_Border *bd)
+{
+ E_Desk *desk;
+ E_Event_Border_Uniconify *ev;
+ unsigned int iconic;
+ E_Illume_XWin_Info* xwin_info;
+
+ E_OBJECT_CHECK(bd);
+ E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE);
+
+ xwin_info = _policy_xwin_info_find(bd->win);
+ if (!(xwin_info && xwin_info->iconify_by_wm)) return;
+
+ if (bd->shading) return;
+ ecore_x_window_shadow_tree_flush();
+ e_border_show(bd);
+ if (bd->iconic)
+ {
+ bd->iconic = 0;
+ if (bd->fullscreen) bd->desk->fullscreen_borders++;
+ if (e_manager_comp_evas_get(bd->zone->container->manager))
+ {
+ if (bd->await_hide_event > 0)
+ bd->await_hide_event--;
+ }
+ desk = e_desk_current_get(bd->desk->zone);
+ e_border_desk_set(bd, desk);
+ edje_object_signal_emit(bd->bg_object, "e,action,uniconify", "e");
+ }
+ iconic = 0;
+ ecore_x_window_prop_card32_set(bd->client.win, E_ATOM_MAPPED, &iconic, 1);
+
+ ev = E_NEW(E_Event_Border_Uniconify, 1);
+ ev->border = bd;
+ e_object_ref(E_OBJECT(bd));
+ // e_object_breadcrumb_add(E_OBJECT(bd), "border_uniconify_event");
+ ecore_event_add(E_EVENT_BORDER_UNICONIFY, ev, _policy_border_event_border_uniconify_free, NULL);
+
+ if (e_config->transient.iconify)
+ {
+ Eina_List *l;
+ E_Border *child;
+ E_Illume_XWin_Info* child_xwin_info;
+
+ EINA_LIST_FOREACH(bd->transients, l, child)
+ {
+ if (!e_object_is_del(E_OBJECT(child)))
+ {
+ if (child->iconic)
+ {
+ child_xwin_info = _policy_xwin_info_find(child->win);
+ if (child_xwin_info) child_xwin_info->iconify_by_wm = 1;
+
+ L(LT_ICONIFY, "[ILLUME2][ICONIFY] %s(%d).. FORCE UNICONIFY... win:0x%07x\n", __func__, __LINE__, child->client.win);
+ _policy_border_force_uniconify(child);
+ }
+ }
+ }
+ }
+ e_remember_update(bd);
+}
+
+static void
+_policy_border_uniconify_below_borders_by_illume(E_Illume_XWin_Info *xwin_info)
+{
+ E_Border *bd;
+
+ if (!xwin_info) return;
+ if (!xwin_info->bd_info) return;
+
+ bd = xwin_info->bd_info->border;
+
+ // 1. check if iconify is caused by visibility change or not
+ if (xwin_info->iconify_by_wm) return;
+
+ // 2. check if current bd's visibility is fully-obscured or not
+ if (xwin_info->visibility == E_ILLUME_VISIBILITY_FULLY_OBSCURED) return;
+
+ // 3-1. find bd's below window and un-iconify it
+ L(LT_ICONIFY, "[ILLUME2][ICONIFY] %s(%d)... UNICONIFY Below Windows of win:0x%07x\n", __func__, __LINE__, bd->client.win);
+ _policy_border_uniconify_below_borders(bd);
+
+ if (!e_object_is_del(E_OBJECT(bd)))
+ {
+ e_border_lower(bd);
+ }
+}
+
+static E_Border* _policy_border_find_below(E_Border *bd)
+{
+ Eina_List *l;
+ int i, pos;
+ Eina_Bool passed;
+ E_Illume_XWin_Info* xwin_info;
+
+ passed = EINA_FALSE;
+
+ /* determine layering position */
+ pos = _policy_border_layer_map(bd->layer);
+
+ /* 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)
+ {
+ passed = EINA_TRUE;
+ continue;
+ }
+
+ if ((b->x == b->zone->x) &&
+ (b->y == b->zone->y) &&
+ (b->w == b->zone->w) &&
+ (b->h == b->zone->h) &&
+ (b->h == b->zone->h) &&
+ (b->client.illume.win_state.state != ECORE_X_ILLUME_WINDOW_STATE_FLOATING) &&
+ (b->visible))
+ {
+ xwin_info = _policy_xwin_info_find(b->win);
+ if (xwin_info)
+ {
+ if ((!xwin_info->argb) ||
+ (xwin_info->argb && xwin_info->bd_info->opaque))
+ {
+ L(LT_ICONIFY, "[ILLUME2][ICONIFY] %s(%d)... ALREADY FULLY-OBSCURED... by win:0x%07x visible:%d (visibility:%d)\n", __func__, __LINE__, b->client.win, b->visible, xwin_info->visibility);
+ break;
+ }
+ }
+ }
+
+ if (!passed) 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_keyboard_sub(bd)) continue;
+ if (e_illume_border_is_quickpanel(b)) continue;
+ if (e_illume_border_is_quickpanel_popup(b)) continue;
+ if (e_illume_border_is_clipboard(b)) continue;
+ if (e_illume_border_is_app_tray(b)) continue;
+ if (e_illume_border_is_miniapp_tray(b)) continue;
+
+ return b;
+ }
+ }
+
+ return NULL;
+}
+
+static void _policy_border_uniconify_below_borders(E_Border *bd)
+{
+ E_Border *below_bd;
+
+ below_bd = _policy_border_find_below(bd);
+ if (!below_bd) return;
+
+ E_Illume_XWin_Info* below_xwin_info = _policy_xwin_info_find(below_bd->win);
+ if (below_xwin_info == NULL) return;
+
+ if ((below_bd->w != below_bd->zone->w) ||
+ (below_bd->h != below_bd->zone->h) ||
+ (below_xwin_info->argb))
+ {
+ if (!(below_xwin_info->bd_info && below_xwin_info->bd_info->opaque))
+ _policy_border_uniconify_below_borders(below_bd);
+ }
+
+ // 3-2.
+ if (below_bd->iconic)
+ {
+ L(LT_ICONIFY, "[ILLUME2][ICONIFY] %s(%d).. FORCE UNICONIFY... win:0x%07x\n", __func__, __LINE__, below_bd->client.win);
+ _policy_border_force_uniconify(below_bd);
+ }
+}
+
+static void _policy_border_uniconify_top_border(E_Border *bd)
+{
+ Eina_List *l;
+ int i;
+ int zone_w, zone_h;
+ E_Illume_XWin_Info* xwin_info;
+
+ if (!_e_illume_cfg->use_force_iconify) return;
+
+ zone_w = bd->zone->w;
+ zone_h = bd->zone->h;
+ /* determine layering position */
+
+ /* Find the windows below this one */
+ for (i = POL_NUM_OF_LAYER; i >= 2; i--)
+ {
+ E_Border *b;
+
+ EINA_LIST_REVERSE_FOREACH(bd->zone->container->layers[i].clients, l, b)
+ {
+ if (!b) continue;
+
+ if ((b->x >= zone_w) || (b->y >= zone_h)) continue;
+ if (((b->x + b->w) <= 0) || ((b->y + b->h) <= 0)) 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_keyboard_sub(bd)) continue;
+ if (e_illume_border_is_quickpanel(b)) continue;
+ if (e_illume_border_is_quickpanel_popup(b)) continue;
+ if (e_illume_border_is_clipboard(b)) continue;
+ if (e_illume_border_is_app_tray(b)) continue;
+ if (e_illume_border_is_miniapp_tray(b)) continue;
+
+ if (b->iconic)
+ {
+ L(LT_ICONIFY, "[ILLUME2][ICONIFY] %s(%d).. FORCE UNICONIFY... win:0x%07x\n", __func__, __LINE__, b->client.win);
+ _policy_border_force_uniconify(b);
+ }
+
+ if ((b->x == b->zone->x) &&
+ (b->y == b->zone->y) &&
+ (b->w == b->zone->w) &&
+ (b->h == b->zone->h))
+ {
+ xwin_info = _policy_xwin_info_find(b->win);
+ if (xwin_info)
+ {
+ if (xwin_info->argb && !xwin_info->bd_info->opaque)
+ {
+ continue;
+ }
+ else
+ break;
+ }
+ else
+ break;
+ }
+ }
+ }
+ return;
+}
+
+/* change the desk of window for popsync.
+ * if there is no window in data read from ev->l[0],
+ * window that is latest above stack will be changed.
+ * - event->data.l[0] : window ID
+ * - event->data.l[1]
+ * 1(default): mobile
+ * 2: popsync
+ */
+void
+_policy_window_desk_set(Ecore_X_Event_Client_Message *event)
+{
+ Ecore_X_Event_Client_Message *ev = event;
+ Ecore_X_Window win;
+ E_Container *con;
+ E_Zone *zone;
+ E_Desk *desk = NULL;
+ E_Border_List *bl;
+ E_Border *bd;
+ Eina_Bool one_time = EINA_FALSE;
+ char *profile = NULL, *new_profile = NULL;
+ unsigned int desk_num;
+ int x, y;
+ int err_tracer = 0;
+
+ EINA_SAFETY_ON_NULL_RETURN(ev);
+
+ win = ev->data.l[0];
+ desk_num = ev->data.l[1];
+ if (win) one_time = EINA_TRUE;
+
+ // decide new desk's profile from received data.
+ switch (desk_num)
+ {
+ case 2:
+ new_profile = _e_illume_cfg->display_name.popsync;
+ break;
+ case 1:
+ default:
+ new_profile = _e_illume_cfg->display_name.mobile;
+ break;
+ }
+
+ con = e_container_current_get(e_manager_current_get());
+ bl = e_container_border_list_last(con);
+
+ // if there exists a ID of window read from data ev->data.l[0],
+ // find and set this window's border window, or set latest above border.
+ bd = win ? e_border_find_by_client_window(win) :
+ e_container_border_list_prev(bl);
+ if (!bd) bd = e_border_find_by_window(win);
+ if (!bd) goto fin;
+ err_tracer++;
+
+ do {
+ // skip special window.
+ if ((e_illume_border_is_indicator(bd)) ||
+ (e_illume_border_is_keyboard(bd)) ||
+ (e_illume_border_is_keyboard_sub(bd)) ||
+ (e_illume_border_is_quickpanel(bd)) ||
+ (e_illume_border_is_quickpanel_popup(bd)) ||
+ (e_illume_border_is_clipboard(bd)))
+ {
+ if (one_time) goto fin;
+ continue;
+ }
+
+ if ((bd->client.icccm.accepts_focus || bd->client.icccm.take_focus) &&
+ (bd->client.netwm.type != ECORE_X_WINDOW_TYPE_DOCK) &&
+ (bd->client.netwm.type != ECORE_X_WINDOW_TYPE_TOOLBAR) &&
+ (bd->client.netwm.type != ECORE_X_WINDOW_TYPE_MENU) &&
+ (bd->client.netwm.type != ECORE_X_WINDOW_TYPE_SPLASH) &&
+ (bd->client.netwm.type != ECORE_X_WINDOW_TYPE_DESKTOP) &&
+ (bd->client.netwm.type != ECORE_X_WINDOW_TYPE_NOTIFICATION))
+ {
+ err_tracer++;
+ zone = bd->zone;
+
+ // terminated this function if there is only one desk.
+ if ((zone->desk_x_count < 2) && (zone->desk_y_count < 2))
+ goto fin;
+ err_tracer++;
+
+ // find the corresponsive desk.
+ for (x = 0; x < zone->desk_x_count; x++)
+ {
+ for (y = 0; y < zone->desk_y_count; y++)
+ {
+ int index = x + (y * zone->desk_x_count);
+ profile = zone->desks[index]->window_profile;
+
+ if (!strcmp(new_profile, profile))
+ desk = zone->desks[index];
+ }
+ }
+
+ if (!desk) goto fin;
+
+ e_border_desk_set(bd, desk);
+
+ // we have to receive the DAMAGE notify from this window.
+ // for this, the window has to have visible state as a its property.
+ // if not, can not receive DAMAGE notify.
+ e_hints_window_visible_set(bd);
+ e_hints_window_desktop_set(bd);
+ _policy_border_uniconify_below_borders(bd);
+ break;
+ }
+ } while((!one_time) && (bd = e_container_border_list_prev(bl)));
+
+fin:
+ e_container_border_list_free(bl);
+ if (err_tracer)
+ {
+ fprintf(stderr,
+ "[POPSYNC] ERROR: ");
+ switch (err_tracer)
+ {
+ case 0:
+ fprintf(stderr, "Couldn't find border.\n");
+ break;
+ case 1:
+ fprintf(stderr, "Couldn't change desk. No border, or special window.\n");
+ break;
+ case 2:
+ fprintf(stderr, "NO desk to change \n");
+ break;
+ case 3:
+ fprintf(stderr, "Couldn't find desk such a profile.\n");
+ break;
+ default:
+ fprintf(stderr, "Non-defined error\n");
+ }
+ }
+ return;
+}
+
+void
+_policy_idle_enterer(void)
+{
+ _policy_calculate_visibility();
+}
--- /dev/null
+#ifndef _POLICY_H
+# define _POLICY_H
+
+/* for desktop mode
+ for decision of border's location among display devices*/
+# define E_ILLUME_BORDER_IS_IN_MOBILE(border) \
+ ((_e_illume_cfg->display_name.mobile) && \
+ (!strncmp((border)->desk->window_profile, \
+ _e_illume_cfg->display_name.mobile, \
+ strlen(_e_illume_cfg->display_name.mobile))))
+# define E_ILLUME_BORDER_IS_IN_DESKTOP(border) \
+ ((_e_illume_cfg->display_name.desktop) && \
+ (!strncmp((border)->desk->window_profile, \
+ _e_illume_cfg->display_name.desktop, \
+ strlen(_e_illume_cfg->display_name.desktop))))
+# define E_ILLUME_BORDER_IS_IN_POPSYNC(border) \
+ ((_e_illume_cfg->display_name.popsync) && \
+ (!strncmp((border)->desk->window_profile, \
+ _e_illume_cfg->display_name.popsync, \
+ strlen(_e_illume_cfg->display_name.popsync))))
+
+
+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 notification level */
+typedef enum _E_Illume_Notification_Level
+{
+ E_ILLUME_NOTIFICATION_LEVEL_LOW = 50,
+ E_ILLUME_NOTIFICATION_LEVEL_NORMAL = 100,
+ E_ILLUME_NOTIFICATION_LEVEL_HIGH = 150,
+} E_Illume_Notification_Level;
+
+/* for border information */
+struct _E_Illume_Border_Info
+{
+ int pid;
+ int level;
+ int opaque;
+ Ecore_X_Window_Type win_type;
+ struct
+ {
+ unsigned int need_change : 1;
+ int angle;
+ int direction;
+ struct
+ {
+ unsigned char down : 1;
+ unsigned char locked : 1;
+ unsigned char resize : 1;
+ int x, y, dx, dy;
+ int w, h;
+ } mouse;
+ } resize_req;
+ Eina_List *handlers;
+ 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;
+ Eina_Bool iconify_by_wm;
+ Eina_Bool comp_vis;
+ Eina_Bool is_drawed;
+ 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_border_cb_move(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_zone_set(E_Event_Border_Zone_Set *event);
+
+void _policy_border_post_new_border(E_Border *bd);
+void _policy_border_pre_fetch(E_Border *bd);
+void _policy_border_new_border(E_Border *bd);
+#ifdef _F_BORDER_HOOK_PATCH_
+void _policy_border_del_border(E_Border *bd);
+#endif
+
+void _policy_window_configure_request (Ecore_X_Event_Window_Configure_Request *event);
+
+void _policy_border_iconify_cb(E_Border *bd);
+void _policy_border_uniconify_cb(E_Border *bd);
+
+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);
+
+void _policy_window_desk_set(Ecore_X_Event_Client_Message *event);
+
+void _policy_window_move_resize_request(Ecore_X_Event_Window_Move_Resize_Request *event);
+void _policy_window_state_request(Ecore_X_Event_Window_State_Request *event);
+
+void _policy_module_update(E_Event_Module_Update *event);
+
+void _policy_idle_enterer(void);
+
+void _policy_illume_win_state_change_request(Ecore_X_Event_Client_Message *event);
+#endif
--- /dev/null
+#include "e_illume_private.h"
+#include "policy_util.h"
+
+/* for malloc trim and stack trim */
+#include <stdio.h>
+#include <string.h>
+#include <sys/mman.h>
+#include <malloc.h>
+
+#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 <X11/Xlib.h>
+#include <X11/Xatom.h>
+#include <X11/extensions/Xrandr.h>
+
+#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; i<res->noutput; 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<num; i++)
+ {
+ p += snprintf (p, HDMI_BUF_SIZE-1, srcs[i]);
+ *p = '\0';
+ p++;
+ }
+
+ *p = '\0';
+ p++;
+
+ return (p - buf);
+}
+
--- /dev/null
+#ifndef _POLICY_UTIL_H
+#define _POLICY_UTIL_H
+
+/* for malloc trim and stack trim */
+void e_illume_util_mem_trim (void);
+
+/* for HDMI rotation */
+void e_illume_util_hdmi_rotation (Ecore_X_Window root, int angle);
+
+#endif // _POLICY_UTIL_H
--- /dev/null
+#define WIDTH 720\r
+#define HEIGHT 1280\r
+\r
+/* Default colors */\r
+#define BLACK_COLOR 0 0 0 255\r
+#define TRANSPARENT 0 0 0 0\r
+\r
+images {\r
+ image: "RQ02_IMG_Handler.png" COMP;\r
+ image: "RQ02_IMG_Handler_arrow.png" COMP;\r
+}\r
+\r
+collections {\r
+ group { name, "e/modules/illume2-tizen/quickpanel/base";\r
+ parts {\r
+ part {\r
+ name, "base";\r
+ type, RECT;\r
+ mouse_events, 0;\r
+ description {\r
+ state, "default" 0.0;\r
+ color, BLACK_COLOR;\r
+ }\r
+ }\r
+ part {\r
+ name, "quickpanel_bg";\r
+ type, RECT;\r
+ mouse_events, 0;\r
+ description {\r
+ state, "default" 0.0;\r
+ rel1 { relative, 0.0 0.0; to, "base"; }\r
+ rel2 { relative, 1.0 1.0; to, "base"; }\r
+ color, 25 25 25 255;\r
+ }\r
+ }\r
+\r
+ part {\r
+ name, "top_padding";\r
+ type, RECT;\r
+ mouse_events, 0;\r
+ scale, 1;\r
+ description {\r
+ state, "default" 0.0;\r
+ min, 0 50;\r
+ fixed, 0 1;\r
+ align, 0.5 0.0;\r
+ rel1 { relative, 0.0 0.0; to, "base"; }\r
+ rel2 { relative, 1.0 0.0; to, "base"; }\r
+ color, TRANSPARENT;\r
+ }\r
+ }\r
+\r
+ part {\r
+ name, "contents";\r
+ type, SWALLOW;\r
+ mouse_events, 1;\r
+ description {\r
+ state, "default" 0.0;\r
+ rel1 { relative, 0.0 1.0; to, "top_padding"; }\r
+ rel2 { relative, 1.0 0.0; to, "bottom_padding"; }\r
+ }\r
+ }\r
+\r
+ part {\r
+ name, "bottom_padding";\r
+ type, RECT;\r
+ mouse_events, 0;\r
+ scale, 1;\r
+ description {\r
+ state, "default" 0.0;\r
+ min, 0 50;\r
+ fixed, 0 1;\r
+ align, 0.5 1.0;\r
+ rel1 { relative, 0.0 1.0; to, "base"; }\r
+ rel2 { relative, 1.0 1.0; to, "base"; }\r
+ color, TRANSPARENT;\r
+ }\r
+ }\r
+\r
+ part {\r
+ name, "quickpanel_handle";\r
+ type, IMAGE;\r
+ mouse_events, 0;\r
+ description {\r
+ state, "default" 0.0;\r
+ rel1.to, "bottom_padding";\r
+ rel2.to, "bottom_padding";\r
+ image {\r
+ normal: "RQ02_IMG_Handler.png";\r
+ }\r
+ }\r
+ }\r
+\r
+ part {\r
+ name, "quickpanel_handle_arrow_bottom";\r
+ type, IMAGE;\r
+ mouse_events, 0;\r
+ scale, 1;\r
+ description {\r
+ state, "default" 0.0;\r
+ min, 0 19;\r
+ fixed, 0 1;\r
+ align, 0.5 1.0;\r
+ rel1 { relative, 0.0 1.0; to, "base"; }\r
+ rel2 { relative, 1.0 1.0; to, "base"; }\r
+ color, TRANSPARENT;\r
+ }\r
+ }\r
+\r
+ part {\r
+ name, "quickpanel_handle_arrow";\r
+ type, IMAGE;\r
+ mouse_events, 0;\r
+ scale, 1;\r
+ description {\r
+ state, "default" 0.0;\r
+ min: 45 13;\r
+ fixed: 1 1;\r
+ align, 0.5 1.0;\r
+ rel1 { relative: 0.5 0.0; to, "quickpanel_handle_arrow_bottom"; }\r
+ rel2 { relative: 0.5 0.0; to, "quickpanel_handle_arrow_bottom"; }\r
+ image {\r
+ normal: "RQ02_IMG_Handler_arrow.png";\r
+ }\r
+ }\r
+ }\r
+\r
+ part {\r
+ name, "quickpanel_handle_event";\r
+ type, RECT;\r
+ mouse_events, 1;\r
+ description {\r
+ state, "default" 0.0;\r
+ rel1.to, "bottom_padding";\r
+ rel2.to, "bottom_padding";\r
+ color, TRANSPARENT;\r
+ }\r
+ }\r
+ }\r
+}\r
--- /dev/null
+Sung-Jin Park <sj76.park@samsung.com>
+Sangjin Lee <lsj119@samsung.com>
--- /dev/null
+Copyright notice for Enlightenment:
+
+Copyright (C) 2000-2012 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.
--- /dev/null
+# 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)
+
+
--- /dev/null
+#!/bin/sh
+# Run this to generate all the initial makefiles, etc.
+
+set -x
+aclocal
+autoconf
+libtoolize --copy --force
+autoheader
+automake --foreign --add-missing --copy
+
--- /dev/null
+#
+# 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
+
--- /dev/null
+[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=<title>Keyrouter</title><br>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]=
--- /dev/null
+#!/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
--- /dev/null
+#!/bin/sh
+
+if [ "$1" != "-id" ]; then
+ echo "Usage> set_keygrab -id <window_id> <key_name> <grab_mode>"
+ 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 =="
--- /dev/null
+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)
--- /dev/null
+#include "e.h"
+#include "e_mod_main.h"
+#include <string.h>
+
+/* 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);
+ keyrouter.e_client_message_handler = ecore_event_handler_add(ECORE_X_EVENT_CLIENT_MESSAGE, (Ecore_Event_Handler_Cb)_e_keyrouter_cb_client_message, 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_HierarchyChanged);
+#ifdef _F_ENABLE_MOUSE_POPUP
+ XISetMask(keyrouter.eventmask_all.mask, XI_ButtonPress);
+ XISetMask(keyrouter.eventmask_all.mask, XI_ButtonRelease);
+#endif//_F_ENABLE_MOUSE_POPUP
+
+ /* Events we want to listen for a part */
+ XISetMask(keyrouter.eventmask_part.mask, XI_HierarchyChanged);
+
+ /* 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;
+ }
+#ifdef _F_ENABLE_MOUSE_POPUP
+ 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;
+ }
+#endif//_F_ENABLE_MOUSE_POPUP
+ else
+ return 1;
+
+ ev->xany.display = keyrouter.disp;
+ ev->xkey.keycode = xdevkey->keycode;
+ ev->xkey.time = xdevkey->time;
+
+#ifdef __DEBUG__
+ fprintf(stderr, "[keyrouter][%s] called !\n", __FUNCTION__);
+ fprintf(stderr, "[keyrouter][%s] keycode=%d, type=%s\n", __FUNCTION__, ev->xkey.keycode, (ev->type==KeyPress) ? "KeyPress" : "KeyRelease");
+#endif
+
+ if(!_e_keyrouter_is_waiting_key_list_empty(ev))
+ return 1;
+
+ if(_e_keyrouter_is_key_in_ignored_list(ev))
+ return 1;
+
+ _e_keyrouter_hwkey_event_handler(ev);
+
+ 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));
+
+ fprintf(stderr, "[keyrouter][%s] called !\n", __FUNCTION__);
+
+#if 1//def __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 void
+_e_keyrouter_hwkey_event_handler(XEvent *ev)
+{
+ int i;
+ key_event_info* key_data;
+
+ //KeyRelease handling for key composition
+ if( ev->type == KeyRelease )
+ {
+ //deliver the key
+ DeliverDeviceKeyEvents(ev, 0);
+
+ ResetModKeyInfo();
+ return;
+ }
+ else if( ev->type == KeyPress ) //KeyPress handling for key composition
+ {
+#if 1//def __DEBUG__
+ fprintf(stderr, "\n\e[31m[keyrouter][%s] KeyPress (keycode:%d)\e[0m\n", __FUNCTION__, ev->xkey.keycode);
+#endif//__DEBUG__
+
+ if(!keyrouter.modkey_set)
+ {
+ for(i=0 ; i < NUM_KEY_COMPOSITION_ACTIONS ; i++)
+ {
+ if(!keyrouter.modkey[i].set)
+ {
+ //check modifier key
+ keyrouter.modkey[i].idx_mod = IsModKey(ev, i);
+
+ if(keyrouter.modkey[i].idx_mod)
+ {
+ fprintf(stderr, "\n\e[35m[keyrouter][%s][%d] Modifier Key ! (keycode=%d)\e[0m\n", __FUNCTION__, i, ev->xkey.keycode);
+ keyrouter.modkey[i].set = 1;
+ keyrouter.modkey_set = 1;
+ keyrouter.modkey[i].time = ev->xkey.time;
+ }
+ }
+ }
+
+ //deliver the key
+ DeliverDeviceKeyEvents(ev, 0);
+ return;
+ }
+ else
+ {
+ for(i=0 ; i < NUM_KEY_COMPOSITION_ACTIONS ; i++)
+ {
+ keyrouter.modkey[i].composited = IsKeyComposited(ev, i);
+
+ if(keyrouter.modkey[i].composited)
+ {
+ fprintf(stderr, "\n\e[35m[keyrouter][%s][%d] Composition Key ! (keycode=%d)\e[0m\n", __FUNCTION__, i, ev->xkey.keycode);
+
+ //Cancel Press : Send cancel key press to Modifier Key-grabbed window(s)
+ ev->xkey.keycode = keyrouter.modkey[i].keys[keyrouter.modkey[i].idx_mod-1].keycode;
+ DeliverDeviceKeyEvents(ev, keyrouter.cancel_key.keycode);
+ //Modifier Release : Send Modifier key release and cancel key release to Modifier Key-grabbed window(s)
+ ev->type = KeyRelease;
+ ev->xkey.keycode = keyrouter.modkey[i].keys[keyrouter.modkey[i].idx_mod-1].keycode;
+ DeliverDeviceKeyEvents(ev, 0);
+ //Cancel Release : Send cancel key release to Modifier Key-grabbed window(s)
+ ev->type = KeyRelease;
+ ev->xkey.keycode = keyrouter.modkey[i].keys[keyrouter.modkey[i].idx_mod-1].keycode;
+ DeliverDeviceKeyEvents(ev, keyrouter.cancel_key.keycode);
+
+ //Do Action : ex> send ClientMessage to root window
+ DoKeyCompositionAction(i, 1);
+
+ if(keyrouter.modkey[i].press_only)
+ {
+ //Put Modifier/composited keys' release in ignored_key_list to ignore them
+ key_data = malloc(sizeof(key_event_info));
+ key_data->ev_type = KeyRelease;
+ key_data->keycode = keyrouter.modkey[i].keys[0].keycode;
+ keyrouter.ignored_key_list = eina_list_append(keyrouter.ignored_key_list, key_data);
+ fprintf(stderr, "[keyrouter][%s] ignored key added (keycode=%d, type=%d)\n", __FUNCTION__, key_data->keycode, key_data->ev_type);
+
+ key_data = malloc(sizeof(key_event_info));
+ key_data->ev_type = KeyRelease;
+ key_data->keycode = keyrouter.modkey[i].keys[1].keycode;
+ keyrouter.ignored_key_list = eina_list_append(keyrouter.ignored_key_list, key_data);
+ fprintf(stderr, "[keyrouter][%s] ignored key added (keycode=%d, type=%d)\n", __FUNCTION__, key_data->keycode, key_data->ev_type);
+ }
+ else//need to be waited for keys
+ {
+ //Put Modifier/composited keys' release in waiting_key_list to check them
+ key_data = malloc(sizeof(key_event_info));
+ key_data->ev_type = KeyRelease;
+ key_data->keycode = keyrouter.modkey[i].keys[0].keycode;
+ key_data->modkey_index = i;
+ keyrouter.waiting_key_list = eina_list_append(keyrouter.waiting_key_list, key_data);
+ fprintf(stderr, "[keyrouter][%s] waiting key added (keycode=%d, type=%d)\n", __FUNCTION__, key_data->keycode, key_data->ev_type);
+
+ key_data = malloc(sizeof(key_event_info));
+ key_data->ev_type = KeyRelease;
+ key_data->keycode = keyrouter.modkey[i].keys[1].keycode;
+ key_data->modkey_index = i;
+ keyrouter.waiting_key_list = eina_list_append(keyrouter.waiting_key_list, key_data);
+ fprintf(stderr, "[keyrouter][%s] waiting key added (keycode=%d, type=%d)\n", __FUNCTION__, key_data->keycode, key_data->ev_type);
+ }
+
+ ResetModKeyInfo();
+ return;
+ }
+ }
+
+ //deliver the key
+ DeliverDeviceKeyEvents(ev, 0);
+
+ ResetModKeyInfo();
+ return;
+ }
+ }
+}
+
+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);
+ XEvent xev;
+
+ 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_KeyPress:
+ case XI_KeyRelease:
+ xev.type = e->evtype;
+ xev.xkey.keycode = evData->detail;
+ xev.xany.display = keyrouter.disp;
+ xev.xkey.time = evData->time;
+
+#ifdef __DEBUG__
+ fprintf(stderr, "[keyrouter][%s] keycode=%d, type=%s\n", __FUNCTION__, xev.xkey.keycode, (xev.type==XI_KeyPress) ? "XI_KeyPress" : "XI_KeyRelease");
+#endif
+
+ if(!_e_keyrouter_is_waiting_key_list_empty(&xev))
+ return 1;
+
+ if(_e_keyrouter_is_key_in_ignored_list(&xev))
+ return 1;
+
+ _e_keyrouter_hwkey_event_handler(&xev);
+ break;
+
+#ifdef _F_ENABLE_MOUSE_POPUP
+ 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;
+#endif//_F_ENABLE_MOUSE_POPUP
+ }
+
+ 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
+
+ _e_keyrouter_update_key_delivery_list(e->win, keycode, grab_mode, 1);
+ }
+
+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;
+
+#ifdef _F_ENABLE_MOUSE_POPUP
+ //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;
+ }
+#endif // _F_ENABLE_MOUSE_POPUP
+
+ 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;
+ 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
+
+ _e_keyrouter_update_key_delivery_list(e->win, keycode, grab_mode, 1);
+ }
+
+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_client_message (void* data, int type, void* event)
+{
+ int event_type = 0;
+ int keycode;
+ int cancel = 0;
+ Ecore_X_Event_Client_Message* ev;
+
+ ev = event;
+ if(ev->message_type != keyrouter.atomHWKeyEmulation) return 1;
+ if(ev->format != 8) return 1;
+
+ if( ev->data.b[0] == 'P' )
+ event_type = KeyPress;
+ else if( ev->data.b[0] == 'R' )
+ event_type = KeyRelease;
+
+ if( ev->data.b[1] == 'C' )
+ cancel = 1;
+
+ switch(event_type)
+ {
+ case KeyPress:
+ case KeyRelease:
+ keycode = XKeysymToKeycode(keyrouter.disp, XStringToKeysym(&ev->data.b[2]));
+ _e_keyrouter_do_hardkey_emulation(NULL, event_type, 0, keycode, cancel);
+ break;
+
+ default:
+ fprintf(stderr, "[keyrouter][cb_client_message] Unknown event type ! (type=%d)\n", event_type);
+ }
+
+ 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 )
+ {
+ free(ev);
+ 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 if( xev->type == KeyRelease )
+ e_bindings_key_up_event_handle(keyrouter.HardKeys[keycode].bind->ctxt, NULL, ev);
+
+ free(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 Eina_Bool _e_keyrouter_is_waiting_key_list_empty(XEvent *ev)
+{
+ int modkey_index;
+ Eina_List* l;
+ key_event_info* data;
+ key_event_info* key_data;
+
+ if( !keyrouter.waiting_key_list )
+ {
+ return EINA_TRUE;
+ }
+
+ fprintf(stderr, "[keyrouter][%s] waiting_key_list is NOT empty !\n", __FUNCTION__);
+ fprintf(stderr, "[keyrouter][%s] type=%s, keycode=%d", __FUNCTION__, (ev->xkey.type==KeyPress) ? "KeyPress" : "KeyRelease", ev->xkey.keycode);
+
+ EINA_LIST_FOREACH(keyrouter.waiting_key_list, l, data)
+ {
+ if( data && ev->type == data->ev_type && ev->xkey.keycode == data->keycode )
+ {
+ //found !!!
+ fprintf(stderr, "[keyrouter][%s] found !!! (keycode:%d, type=%d)\n", __FUNCTION__, data->keycode, data->ev_type);
+ goto found;
+ }
+ }
+
+ fprintf(stderr, "[keyrouter][%s] not found !!! (keycode:%d, type=%d)\n", __FUNCTION__, ev->xkey.keycode, ev->type);
+
+ //If a key press is coming before the waiting_key_list is cleared,
+ //put its release into ignored_list.
+ if(ev->type == KeyPress)
+ {
+ key_data = malloc(sizeof(key_event_info));
+ key_data->ev_type = KeyRelease;
+ key_data->keycode = ev->xkey.keycode;
+ keyrouter.ignored_key_list = eina_list_append(keyrouter.ignored_key_list, key_data);
+ fprintf(stderr, "[keyrouter][%s] ignored key added (keycode=%d, type=%d)\n", __FUNCTION__, key_data->keycode, key_data->ev_type);
+ }
+ else if(ev->type == KeyRelease)
+ {
+ //If a key release which is contained in ignored_key_list is coming,
+ //remove it from ignored_key_list.
+ fprintf(stderr, "[keyrouter][%s] check a key is exiting in ignored key list (keycode=%d, type=%d)\n", __FUNCTION__, ev->xkey.keycode, ev->type);
+ _e_keyrouter_is_key_in_ignored_list(ev);
+ }
+
+ return EINA_FALSE;
+
+found:
+ modkey_index = data->modkey_index;
+ keyrouter.waiting_key_list = eina_list_remove(keyrouter.waiting_key_list, data);
+ fprintf(stderr, "[keyrouter][%s][%d] key was remove from waiting_key_list !(keycode:%d, type:%d)\n",
+ __FUNCTION__, modkey_index, ev->xkey.keycode, ev->type);
+
+ if(!keyrouter.waiting_key_list)
+ {
+ fprintf(stderr, "[keyrouter][%s] Waiting conditions are satified !\n", __FUNCTION__);
+
+ //Do Action : ex> send ClientMessage to root window
+ DoKeyCompositionAction(modkey_index, 0);
+ }
+
+ return EINA_FALSE;
+}
+
+
+static Eina_Bool _e_keyrouter_is_key_in_ignored_list(XEvent *ev)
+{
+ Eina_List* l;
+ key_event_info* data;
+
+ if( !keyrouter.ignored_key_list )
+ {
+ return EINA_FALSE;
+ }
+
+ fprintf(stderr, "[keyrouter][%s] ignored_key_list is NOT empty !\n", __FUNCTION__);
+
+ EINA_LIST_FOREACH(keyrouter.ignored_key_list, l, data)
+ {
+ if( data && ev->type == data->ev_type && ev->xkey.keycode == data->keycode )
+ {
+ //found !!!
+ fprintf(stderr, "[keyrouter][%s] found !!! (keycode:%d, type=%d)\n", __FUNCTION__, data->keycode, data->ev_type);
+ goto found;
+ }
+ }
+
+ fprintf(stderr, "[keyrouter][%s] not found !!! (keycode:%d, type=%d)\n", __FUNCTION__, ev->xkey.keycode, ev->type);
+
+ return EINA_FALSE;
+
+found:
+ keyrouter.ignored_key_list = eina_list_remove(keyrouter.ignored_key_list, data);
+ fprintf(stderr, "[keyrouter][%s] key was remove from ignored_list !(keycode:%d, type:%d)\n", __FUNCTION__, ev->xkey.keycode, ev->type);
+
+ return EINA_TRUE;
+}
+
+static void _e_keyrouter_device_add(int id, int type)
+{
+ int ndevices;
+ Eina_List* l;
+ XIDeviceInfo *info = NULL;
+ KeyrouterDeviceType kdtype;
+ E_Keyrouter_Device_Info *kdi = NULL;
+
+ EINA_LIST_FOREACH(keyrouter.device_list, l, kdi)
+ {
+ if( (kdi) && (kdi->type==E_KEYROUTER_HWKEY) && (kdi->id == id) )
+ {
+ fprintf(stderr, "[keyrouter][%s] Slave key device (id=%d, name=%s) was added !\n", __FUNCTION__, id, kdi->name);
+ detachSlave(id);
+ return;
+ }
+ }
+
+ 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;
+ }
+
+ if( strcasestr(info->name, "XTEST" ) )
+ goto out;
+
+ if( strcasestr(info->name, "keyboard" ) )
+ kdtype = E_KEYROUTER_KEYBOARD;
+ else
+ kdtype = E_KEYROUTER_HOTPLUGGED;
+
+ 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->type = kdtype;
+ data->id = id;
+ data->name = eina_stringshare_add(info->name);
+ keyrouter.device_list = eina_list_append(keyrouter.device_list, data);
+
+ _e_keyrouter_grab_hwkeys(id);
+ }
+
+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:
+ break;
+
+ case E_KEYROUTER_HOTPLUGGED:
+ case E_KEYROUTER_KEYBOARD:
+ fprintf(stderr, "[keyrouter][%s] Slave hotplugged key|keyboard 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;
+
+ 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 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;
+
+ _e_keyrouter_structure_init();
+ keyrouter.disp = NULL;
+ keyrouter.disp = ecore_x_display_get();
+
+ if( !keyrouter.disp )
+ {
+ fprintf(stderr, "\e[32m[keyrouter] Failed to open display..!\e[0m\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.atomHWKeyEmulation = ecore_x_atom_get(PROP_HWKEY_EMULATION);
+
+ keyrouter.input_window = ecore_x_window_input_new(keyrouter.rootWin, -1, -1, 1, 1);
+
+ if(!keyrouter.input_window)
+ {
+ fprintf(stderr, "[keyrouter] Failed to create input_window !\n");
+ }
+ else
+ {
+ ecore_x_window_prop_property_set(keyrouter.rootWin, keyrouter.atomHWKeyEmulation, ECORE_X_ATOM_WINDOW, 32, &keyrouter.input_window, 1);
+ }
+
+ keyrouter.zone = _e_keyrouter_get_zone();
+ if( !keyrouter.zone )
+ {
+ fprintf(stderr, "[keyrouter] Failed to get zone !\n");
+ ret = 0;
+ goto out;
+ }
+
+#ifdef _F_ENABLE_MOUSE_POPUP
+ 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);
+#endif//_F_ENABLE_MOUSE_POPUP
+
+#ifndef _F_USE_XI_GRABDEVICE_
+ grab_result = GrabKeyDevices(keyrouter.rootWin);
+
+ if( !grab_result )
+ {
+ fprintf(stderr, "\e[32m[keyrouter] Failed to GrabDevices() !\e[0m\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, "\e[32m[keyrouter] Failed to GrabXIKeyDevices() !\e[0m\n");
+ ret = 0;
+ goto out;
+ }
+#endif//_F_USE_XI_GRABDEVICE_
+
+ keyrouter.modkey = calloc(2, sizeof(ModifierKey));
+
+ if(!keyrouter.modkey)
+ {
+ fprintf(stderr, "\e[32m[keyrouter] Failed to allocate memory for key composition !\e[0m\n");
+ ret = 0;
+ goto out;
+ }
+
+ InitModKeys();
+#ifdef _F_ENABLE_MOUSE_POPUP
+ InitHardKeyCodes();
+#endif//_F_ENABLE_MOUSE_POPUP
+ 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.prev_sent_keycode = 0;
+ keyrouter.resTopVisibleCheck = 0;
+#ifdef _F_ENABLE_MOUSE_POPUP
+ keyrouter.popup_angle = 0;
+ keyrouter.toggle = 0;
+#endif//_F_ENABLE_MOUSE_POPUP
+ keyrouter.device_list = NULL;
+ keyrouter.ignored_key_list = NULL;
+ keyrouter.waiting_key_list = NULL;
+ keyrouter.hwkeymap_info_list = NULL;
+ keyrouter.num_hwkey_devices = 0;
+
+ keyrouter.atomGrabKey = None;
+ keyrouter.atomDeviceStatus = None;
+ keyrouter.atomGrabStatus = None;
+ keyrouter.atomGrabExclWin = None;
+ keyrouter.atomGrabORExclWin = None;
+}
+
+static void _e_keyrouter_grab_hwkeys(int devid)
+{
+ int i, j, k;
+ int result;
+ int keycode;
+ KeySym ksym;
+
+ int min_keycode, max_keycode, keysyms_per_keycode;
+ KeySym *keymap = NULL, *origkeymap = NULL;
+
+ XIGrabModifiers modifiers[] = {{XIAnyModifier, 0}};
+ int nmods = sizeof(modifiers)/sizeof(modifiers[0]);
+ XIEventMask mask;
+
+ if(!keyrouter.hwkeymap_info_list)
+ {
+ XDisplayKeycodes (keyrouter.disp, &min_keycode, &max_keycode);
+ origkeymap = XGetKeyboardMapping (keyrouter.disp, min_keycode,
+ (max_keycode - min_keycode + 1),
+ &keysyms_per_keycode);
+
+ if(!origkeymap)
+ {
+ fprintf(stderr, "[keyrouter] Failed to get keyboard mapping from X \n");
+ return;
+ }
+
+ for( i = 0 ; i < NUM_HWKEYS ; i++ )
+ {
+ if(!HWKeys[i])
+ break;
+
+ Eina_Inlist *l = keyrouter.hwkeymap_info_list;
+
+ ksym = XStringToKeysym(HWKeys[i]);
+
+ if((ksym == NoSymbol) ||(ksym == keyrouter.cancel_key.keysym))
+ continue;
+
+ hwkeymap_info *hki = NULL;
+
+ hki = calloc(1, sizeof(hwkeymap_info));
+
+ if(!hki)
+ {
+ fprintf(stderr, "[keyrouter] Failed to allocate memory for HW keymap information !\n");
+ XFree(origkeymap);
+ return;
+ }
+
+ hki->key_name = HWKeys[i];
+ hki->key_sym = ksym;
+ hki->keycodes = NULL;
+
+ keymap = origkeymap;
+ k = 0;
+ for (j = min_keycode; j <= max_keycode; j++)
+ {
+ if(ksym == keymap[0])
+ k++;
+ keymap += keysyms_per_keycode;
+ }
+
+ hki->num_keycodes = k;
+
+ int *keycodes = calloc(1, sizeof(int)*(hki->num_keycodes));
+
+ if(!keycodes)
+ {
+ fprintf(stderr, "[keyrouter] Failed to allocate memory for keycode array !\n");
+ XFree(origkeymap);
+ free(hki);
+ return;
+ }
+
+ keymap = origkeymap;
+ k = 0;
+ for (j = min_keycode; j <= max_keycode; j++)
+ {
+ if(ksym == keymap[0])
+ {
+ keycodes[k] = j;
+ k++;
+ }
+ keymap += keysyms_per_keycode;
+ }
+
+ hki->keycodes = keycodes;
+ l = eina_inlist_append(l, (Eina_Inlist *)hki);
+ keyrouter.hwkeymap_info_list = l;
+ }
+
+ if(origkeymap)
+ XFree(origkeymap);
+ }
+
+ hwkeymap_info *hkinfo = NULL;
+ Eina_Inlist *lst = keyrouter.hwkeymap_info_list;
+
+ if(devid)
+ {
+ mask.deviceid = devid;
+ mask.mask_len = XIMaskLen(XI_LASTEVENT);
+ mask.mask = calloc(mask.mask_len, sizeof(char));
+ XISetMask(mask.mask, XI_KeyPress);
+ XISetMask(mask.mask, XI_KeyRelease);
+ }
+
+ EINA_INLIST_FOREACH(lst, hkinfo)
+ {
+ if(!hkinfo->keycodes)
+ continue;
+
+ for(k = 0 ; k < hkinfo->num_keycodes ; k++)
+ {
+ if(devid)
+ {
+ result = XIGrabKeycode(keyrouter.disp, devid, hkinfo->keycodes[k], keyrouter.rootWin, GrabModeAsync, GrabModeAsync, False, &mask, nmods, modifiers);
+#ifdef __DEBUG__
+ fprintf(stderr, "[keyrouter][grab_hwkeys][k=%d] %s (keycode:%d) was grabbed (result=%d)!!\n", k, hkinfo->key_name, hkinfo->keycodes[k], result);
+#endif /* #ifdef __DEBUG__ */
+
+ if(result < 0)
+ {
+ fprintf(stderr, "[keyrouter][grab_hwkeys] Failed to grab keycode (=%d) !\n", hkinfo->keycodes[k]);
+ continue;
+ }
+ }
+
+ //disable repeat for a key
+ _e_keyrouter_set_key_repeat(hkinfo->keycodes[k], 0);//OFF
+ }
+ }
+}
+
+static void
+_e_keyrouter_set_key_repeat(int key, int auto_repeat_mode)
+{
+ XKeyboardControl values;
+
+ values.auto_repeat_mode = auto_repeat_mode;
+
+ if (key != -1)
+ {
+ values.key = key;
+ XChangeKeyboardControl(keyrouter.disp, KBKey | KBAutoRepeatMode, &values);
+ }
+ else
+ {
+ XChangeKeyboardControl(keyrouter.disp, KBAutoRepeatMode, &values);
+ }
+}
+
+
+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 void
+_e_keyrouter_update_key_delivery_list(Ecore_X_Window win, int keycode, const int grab_mode, const int IsOnTop)
+{
+ int c=0;
+ int result = 0;
+ Eina_Bool found = EINA_FALSE;
+ hwkeymap_info *hkinfo = NULL;
+ Eina_Inlist *lst;
+
+ if(!keyrouter.hwkeymap_info_list)
+ goto grab_a_keycode_only;
+
+ lst = keyrouter.hwkeymap_info_list;
+ EINA_INLIST_FOREACH(lst, hkinfo)
+ {
+ if(hkinfo && hkinfo->keycodes)
+ {
+ for(c = 0 ; c < hkinfo->num_keycodes ; c++)
+ {
+ if(hkinfo->keycodes[c] == keycode)
+ {
+ found = EINA_TRUE;
+ break;
+ }
+ }
+
+ if(!found) continue;
+
+ for(c = 0 ; c < hkinfo->num_keycodes ; c++)
+ {
+#ifdef __DEBUG__
+ PrintKeyDeliveryList();
+#endif
+ result = AddWindowToDeliveryList(win, hkinfo->keycodes[c], grab_mode, 1);
+
+ if( result )
+ fprintf(stderr, "\e[32m[keyrouter][%s] Failed to add window (0x%x) to delivery list ! keycode=%x, grab_mode=0x%X\e[0m\n", __FUNCTION__, win, hkinfo->keycodes[c], grab_mode);
+#ifdef __DEBUG__
+ PrintKeyDeliveryList();
+#endif
+
+ }
+
+ return;
+ }
+ }
+
+ return;
+
+grab_a_keycode_only:
+
+#ifdef __DEBUG__
+ PrintKeyDeliveryList();
+#endif
+ result = AddWindowToDeliveryList(win, keycode, grab_mode, 1);
+
+ if( result )
+ fprintf(stderr, "\e[32m[keyrouter][%s] Failed to add window (0x%x) to delivery list ! keycode=%x, grab_mode=0x%X\e[0m\n", __FUNCTION__, win, keycode, grab_mode);
+
+#ifdef __DEBUG__
+ PrintKeyDeliveryList();
+#endif
+}
+
+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;
+ int res;
+
+ XGrabServer(keyrouter.disp);
+ res = XQueryTree(keyrouter.disp, root, &tmp, &tmp, &childwins, &num_children);
+ XUngrabServer(keyrouter.disp);
+ if (0 == res) return;
+
+ 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
+ _e_keyrouter_update_key_delivery_list(childwins[i], keycode, grab_mode, 1);
+ }
+ }
+ }
+
+ if( key_list ) XFree(key_list);
+ if( childwins ) 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;
+ KeyrouterDeviceType kdtype;
+
+ 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];
+ kdtype = E_KEYROUTER_HWKEY;
+
+ if( XISlaveKeyboard == dev->use )
+ {
+
+ if( strcasestr(dev->name, "XTEST" ) )
+ continue;
+
+ if( strcasestr(dev->name, "keyboard") )
+ kdtype = E_KEYROUTER_KEYBOARD;
+
+ if( kdtype == E_KEYROUTER_HWKEY )
+ {
+ result = GrabKeyDevice(win, dev->name, dev->deviceid);
+ if(!result)
+ {
+ fprintf(stderr, "[keyrouter][%s] Failed to grab key device(name=%s, result=%d)\n", dev->name, result);
+ continue;
+ }
+
+ _e_keyrouter_grab_hwkeys(0);
+ }
+ else
+ {
+ _e_keyrouter_grab_hwkeys(dev->deviceid);
+ }
+
+ 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 = kdtype;
+ keyrouter.device_list = eina_list_append(keyrouter.device_list, data);
+ }
+
+ if( kdtype == E_KEYROUTER_HWKEY )
+ {
+ detachSlave(dev->deviceid);
+ keyrouter.num_hwkey_devices++;
+ }
+ }
+ }
+
+ 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") || 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") || 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;
+
+#ifdef __DEBUG__
+ printf("[keyrouter][%s] ============ start =================\n", __FUNCTION__);
+#endif
+
+ for( index=0 ; index < MAX_HARDKEYS ; index++ )
+ {
+ const char *keyname;
+
+ 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_MEDIA, LEN_KEY_MEDIA) )
+ fprintf(keyrouter.fplog, "[ KEY_MEDIA : %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 if( !strncmp(keyname, KEY_PLAYPAUSE, LEN_KEY_PLAYPAUSE) )
+ fprintf(keyrouter.fplog, "[ KEY_PLAYPAUSE : %s : %d ]\n", keyname, index);
+ else if( !strncmp(keyname, KEY_MUTE, LEN_KEY_MUTE) )
+ fprintf(keyrouter.fplog, "[ KEY_MUTE : %s : %d ]\n", keyname, index);
+ else if( !strncmp(keyname, KEY_HOMEPAGE, LEN_KEY_HOMEPAGE) )
+ fprintf(keyrouter.fplog, "[ KEY_HOMEPAGE : %s : %d ]\n", keyname, index);
+ else if( !strncmp(keyname, KEY_WEBPAGE, LEN_KEY_WEBPAGE) )
+ fprintf(keyrouter.fplog, "[ KEY_WEBPAGE : %s : %d ]\n", keyname, index);
+ else if( !strncmp(keyname, KEY_MAIL, LEN_KEY_MAIL) )
+ fprintf(keyrouter.fplog, "[ KEY_MAIL : %s : %d ]\n", keyname, index);
+ else if( !strncmp(keyname, KEY_SCREENSAVER, LEN_KEY_SCREENSAVER) )
+ fprintf(keyrouter.fplog, "[ KEY_SCREENSAVER : %s : %d ]\n", keyname, index);
+ else if( !strncmp(keyname, KEY_BRIGHTNESSUP, LEN_KEY_BRIGHTNESSUP) )
+ fprintf(keyrouter.fplog, "[ KEY_BRIGHTNESSUP : %s : %d ]\n", keyname, index);
+ else if( !strncmp(keyname, KEY_BRIGHTNESSDOWN, LEN_KEY_BRIGHTNESSDOWN) )
+ fprintf(keyrouter.fplog, "[ KEY_BRIGHTNESSDOWN : %s : %d ]\n", keyname, index);
+ else if( !strncmp(keyname, KEY_SOFTKBD, LEN_KEY_SOFTKBD) )
+ fprintf(keyrouter.fplog, "[ KEY_SOFTKBD : %s : %d ]\n", keyname, index);
+ else if( !strncmp(keyname, KEY_QUICKPANEL, LEN_KEY_QUICKPANEL) )
+ fprintf(keyrouter.fplog, "[ KEY_QUICKPANEL : %s : %d ]\n", keyname, index);
+ else if( !strncmp(keyname, KEY_TASKSWITCH, LEN_KEY_TASKSWITCH) )
+ fprintf(keyrouter.fplog, "[ KEY_TASKSWITCH : %s : %d ]\n", keyname, index);
+ else if( !strncmp(keyname, KEY_APPS, LEN_KEY_APPS) )
+ fprintf(keyrouter.fplog, "[ KEY_APPS : %s : %d ]\n", keyname, index);
+ else if( !strncmp(keyname, KEY_SEARCH, LEN_KEY_SEARCH) )
+ fprintf(keyrouter.fplog, "[ KEY_SEARCH : %s : %d ]\n", keyname, index);
+ else if( !strncmp(keyname, KEY_VOICE, LEN_KEY_VOICE) )
+ fprintf(keyrouter.fplog, "[ KEY_VOICE : %s : %d ]\n", keyname, index);
+ else if( !strncmp(keyname, KEY_LANGUAGE, LEN_KEY_LANGUAGE) )
+ fprintf(keyrouter.fplog, "[ KEY_LANGUAGE : %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, "\e[32m== EXCLUSIVE : Window(0x%X)\e[0m\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, "\e[32m== OR_EXCLUSIVE : Window(0x%X)\e[0m\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, "\e[32m== 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\e[0m\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, "\e[32m== 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\e[0m\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;
+
+ if( !current ) continue;
+
+ 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;
+
+ if( !current )
+ goto null_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;
+ }
+ }
+
+null_top_ptr:
+ //Check & Delete SHARED mode of grab
+ if( NULL != keyrouter.HardKeys[index].shared_ptr )
+ {
+ int flags = 0;
+ keylist_node* current = NULL;
+ keylist_node* next_current = NULL;
+
+ current = keyrouter.HardKeys[index].shared_ptr;
+ if (current)
+ {
+ 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);
+ current = NULL;
+ }
+ 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);
+ next_current = NULL;
+ }
+ 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 (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, "\e[32m[keyrouter][%s] keycode = %d\e[0m\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, "\e[32m[keyrouter][%s] Fail to allocation memory for new_key_list ! \e[0m\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];
+ }
+
+ XChangeProperty(keyrouter.disp, keyrouter.rootWin, ex_grabwin, XA_CARDINAL, 32,
+ PropModeReplace, (unsigned char *)new_key_list, cnt);
+ 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);
+ _e_keyrouter_update_key_delivery_list(win, keycode, TOP_POSITION_GRAB, IsOnTop);
+ }
+
+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 = NULL;
+
+ int i;
+ XWindowAttributes win_attributes;
+ E_Border *bd;
+
+ if( !XQueryTree(keyrouter.disp, keyrouter.rootWin, &root_win, &parent_win, &child_list, &num_children) )
+ {
+ fprintf(stderr, "\e[32m[keyrouter][%s] Failed to query window tree !\e[0m\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, "\e[32m[keyrouter][%s] bd is NOT NULL!(child_list[%d]=0x%x, bd->win=0x%x, bd->client.win=0x%x, win=0x%x)\e[0m\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, "\e[32m[keyrouter][%s][CLIENTWIN] Target win(0x%x) is above focus win(0x%x)\e[0m\n", __FUNCTION__, (unsigned int)win, (unsigned int)focus);
+#endif
+ XFree(child_list);
+ return 1;
+ }
+
+ if( bd->client.win == focus )
+ {
+#ifdef __DEBUG__
+ fprintf(stderr, "\e[32m[keyrouter][%s][CLIENTWIN] Target win(0x%x) is below focus win(0x%x)\e[0m\n", __FUNCTION__, (unsigned int)win, (unsigned int)focus);
+#endif
+ XFree(child_list);
+ 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, "\e[32m[keyrouter][%s] bd is NULL!(child_list[%d]=0x%x, win=0x%x)\e[0m\n",
+ __FUNCTION__, i, (unsigned int)child_list[i], (unsigned int)win);
+#endif
+
+ if( child_list[i] == win )
+ {
+#ifdef __DEBUG__
+ fprintf(stderr, "\e[32m[keyrouter][%s][WIN] Target win(0x%x) is above focus win(0x%x)\e[0m\n", __FUNCTION__, (unsigned int)win, (unsigned int)focus);
+#endif
+ XFree(child_list);
+ return 1;
+ }
+
+ if( child_list[i] == focus )
+ {
+#ifdef __DEBUG__
+ fprintf(stderr, "\e[32m[keyrouter][%s][WIN] Target win(0x%x) is below focus win(0x%x)\e[0m\n", __FUNCTION__, (unsigned int)win, (unsigned int)focus);
+#endif
+ XFree(child_list);
+ return 0;
+ }
+ }
+ }
+
+ XFree(child_list);
+ 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, "\e[32m[keyrouter][%s] Non-grabbed key! Deliver KeyRelease/XI_KeyRelease (keycode:%d) to %s window (0x%x) !\e[0m\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, "\e[32m[keyrouter][%s] EXCLUSIVE mode of grab ! Deliver KeyRelease/XI_KeyRelease (keycode:%d) to window (0x%x) !\e[0m\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, "\e[32m[keyrouter][%s] OR_EXCLUSIVE mode of grab ! Deliver KeyRelease/XI_KeyRelease (keycode:%d) to window (0x%x) !\e[0m\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, "\e[32m[keyrouter][%s] TOP_POSITION mode of grab ! Deliver KeyRelease/XI_KeyRelease (keycode:%d) to window (0x%x) !\e[0m\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, "\e[32m[keyrouter][%s] Non-grabbed or SHARED mode of grab ! Deliver KeyRelease/XI_KeyRelease (keycode:%d) to window (0x%x) !\e[0m\n", __FUNCTION__, xev->xkey.keycode, (int)xev->xkey.window);
+ }
+ break;
+
+ default:
+ fprintf(stderr, "[\e[32m[keyrouter][%s] Unknown case (keycode:%d)!\e[0m\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, "\e[32m[keyrouter][%s] Non-grabbed key! Deliver KeyPress/XI_KeyPress (keycode:%d) to focus window (0x%x) !\e[0m\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, "\e[32m[keyrouter][%s] EXCLUSIVE mode of grab ! Deliver KeyPress/XI_KeyPress (keycode:%d) to window (0x%x) !\e[0m\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, "\e[32m[keyrouter][%s] OR_EXCLUSIVE mode of grab ! Deliver KeyPress/XI_KeyPress (keycode:%d) to window (0x%x) !\e[0m\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, "\e[32m[keyrouter][%s] isWindowStackChanged = %d\e[0m\n", __FUNCTION__, isWindowStackChanged);
+#endif
+ if( keyrouter.isWindowStackChanged || (keyrouter.prev_sent_keycode != xev->xkey.keycode) )
+ keyrouter.resTopVisibleCheck = IsWindowTopVisibleWithoutInputFocus(keyrouter.HardKeys[index].top_ptr->wid, focus_window);
+
+ keyrouter.prev_sent_keycode = xev->xkey.keycode;
+
+ if( !keyrouter.resTopVisibleCheck )
+ goto shared_delivery;
+
+ if( keyrouter.isWindowStackChanged )
+ keyrouter.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, "\e[32m[keyrouter][%s] TOP_POSITION mode of grab ! Deliver KeyPress/XI_KeyPress (keycode:%d) to window (0x%x) !\e[0m\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, "\e[32m[keyrouter][%s] SHARED mode of grab ! Deliver KeyPress/XI_KeyPress (keycode:%d) to window (0x%x) !\e[0m\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( keyrouter.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, "\e[32m[keyrouter][%s] Deliver KeyPress/XI_KeyPress (keycode:%d) to focus window (0x%x)!\e[0m\n", __FUNCTION__, xev->xkey.keycode, xev->xkey.window);
+ }
+ }
+ else
+ if( keyrouter.isWindowStackChanged )
+ BackedupSharedWins(index, None);
+
+ if( keyrouter.isWindowStackChanged )
+ keyrouter.isWindowStackChanged = 0;
+ break;
+
+ default:
+ fprintf(stderr, "\e[32m[keyrouter][%s] Unknown mode of grab (mode = %d, index = %d, keycode = %d)\e[0m\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, "\e[32m[keyrouter][%s] Non-grabbed key! Deliver %s (keycode:%d) to focus window (0x%x) !\e[0m\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, "\e[32m[keyrouter][%s] EXCLUSIVE mode of grab ! Deliver %s (keycode:%d) to window (0x%x) !\e[0m\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, "\e[32m[keyrouter][%s] OR_EXCLUSIVE mode of grab ! Deliver %s (keycode:%d) to window (0x%x) !\e[0m\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, "\e[32m[keyrouter][%s] isWindowStackChanged = %d\e[0m\n", __FUNCTION__, keyrouter.isWindowStackChanged);
+#endif
+ if( keyrouter.isWindowStackChanged || (keyrouter.prev_sent_keycode != xev->xkey.keycode) )
+ keyrouter.resTopVisibleCheck = IsWindowTopVisibleWithoutInputFocus(keyrouter.HardKeys[index].top_ptr->wid, focus_window);
+
+ keyrouter.prev_sent_keycode = xev->xkey.keycode;
+
+ 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, "\e[32m[keyrouter][%s] TOP_POSITION mode of grab ! Deliver %s (keycode:%d) to window (0x%x) !\e[0m\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, "\e[32m[keyrouter][%s] Deliver %s (keycode:%d) to focus window (0x%x)!\e[0m\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, "\e[32m[keyrouter][%s] SHARED mode of grab ! Deliver %s (keycode:%d) to window (0x%x) !\e[0m\n", __FUNCTION__, (xev->type == KeyPress) ? "KeyPress" : "KeyRelease", xev->xkey.keycode, (int)xev->xkey.window);
+ }
+ break;
+
+ default:
+ fprintf(stderr, "\e[32m[keyrouter][%s] Unknown mode of grab (mode = %d, index = %d, keycode = %d)\e[0m\n", __FUNCTION__, grab_mode, index, xev->xkey.keycode);
+ break;
+ }
+}
+#endif//_F_USE_XI_GRABDEVICE_
+
+#ifdef _F_ENABLE_MOUSE_POPUP
+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, 0, 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, 0, 0);
+}
+#endif//_F_ENABLE_MOUSE_POPUP
+
+static void _e_keyrouter_do_hardkey_emulation(const char *label, unsigned int key_event, unsigned int on_release, int keycode, int cancel)
+{
+#ifdef _F_ENABLE_MOUSE_POPUP
+ int i;
+ char buf[128];
+#endif//_F_ENABLE_MOUSE_POPUP
+ XEvent xev;
+
+ if( !label )
+ goto normal_hardkey_handler;
+ else
+ goto reserved_hardkey_handler;
+
+normal_hardkey_handler:
+ xev.xkey.display = keyrouter.disp;
+ xev.xkey.root = keyrouter.rootWin;
+ xev.xkey.keycode = keycode;
+ xev.xkey.time = CurrentTime;
+ xev.xkey.type = key_event;
+
+ if( cancel )
+ {
+ DeliverDeviceKeyEvents(&xev, keyrouter.cancel_key.keycode);
+ xev.xkey.keycode = keycode;
+ xev.xkey.time = CurrentTime;
+ xev.xkey.type = KeyRelease;
+ DeliverDeviceKeyEvents(&xev, 0);
+ xev.xkey.keycode = keycode;
+ xev.xkey.time = CurrentTime;
+ xev.xkey.type = KeyRelease;
+ DeliverDeviceKeyEvents(&xev, keyrouter.cancel_key.keycode);
+ fprintf(stderr, "[keyrouter][do_hardkey_emulation] HWKeyEmulation Done !\n");
+ fprintf(stderr, "...( Cancel KeyPress + KeyRelease(keycode:%d) + Cancel KeyRelease )\n", xev.xkey.keycode);
+ }
+ else
+ {
+ DeliverDeviceKeyEvents(&xev, 0);
+ fprintf(stderr, "[keyrouter][do_hardkey_emulation] HWKeyEmulation Done !\n");
+ fprintf(stderr, "...( %s(keycode=%d )\n", (xev.xkey.type==KeyPress) ? "KeyPress" : "KeyRelease", xev.xkey.keycode);
+ }
+
+ return;
+
+reserved_hardkey_handler:
+#ifdef _F_ENABLE_MOUSE_POPUP
+ 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);
+ }
+#endif//_F_ENABLE_MOUSE_POPUP
+
+out:
+ return;
+}
+
+#ifdef _F_ENABLE_MOUSE_POPUP
+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, 400);
+
+ 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;
+}
+#endif//_F_ENABLE_MOUSE_POPUP
+
+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 Device\n");
+ break;
+
+ case E_KEYROUTER_HOTPLUGGED:
+ fprintf(keyrouter.fplog, "¦¦Device type : Hotplugged Key Device\n");
+ break;
+
+ case E_KEYROUTER_KEYBOARD:
+ fprintf(keyrouter.fplog, "¦¦Device type : Hotplugged Keyboard Device\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 )
+ {
+ 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()
+{
+ int i = 0;
+
+ if(!keyrouter.modkey)
+ return;
+
+ keyrouter.modkey[i].keys[0].keysym = XStringToKeysym(KEY_POWER);
+ keyrouter.modkey[i].keys[0].keycode = XKeysymToKeycode(keyrouter.disp, keyrouter.modkey[i].keys[0].keysym);
+ keyrouter.modkey[i].keys[1].keysym = XStringToKeysym(KEY_VOLUMEDOWN);
+ keyrouter.modkey[i].keys[1].keycode = XKeysymToKeycode(keyrouter.disp, keyrouter.modkey[i].keys[1].keysym);
+ keyrouter.modkey[i].press_only = EINA_TRUE;
+
+ keyrouter.cancel_key.keysym = XStringToKeysym(KEY_CANCEL);
+ keyrouter.cancel_key.keycode = XKeysymToKeycode(keyrouter.disp, keyrouter.cancel_key.keysym);
+
+ fprintf(stderr, "[keyrouter][%s][%d] Modifier Key=%s (keycode:%d)\n", __FUNCTION__, i, KEY_POWER, keyrouter.modkey[i].keys[0].keycode);
+ fprintf(stderr, "[keyrouter][%s][%d] Composited Key=%s (keycode:%d)\n", __FUNCTION__, i, KEY_VOLUMEDOWN, keyrouter.modkey[i].keys[1].keycode);
+ fprintf(stderr, "[keyrouter][%s][%d] Cancel Key=%s (keycode:%d)\n", __FUNCTION__, i, KEY_CANCEL, keyrouter.cancel_key.keycode);
+#ifdef __DEBUG__
+ fprintf(stderr, "[keyrouter][%s][%d] modkey.composited=%d, modkey.set=%d, modkey.time=%d\n", __FUNCTION__, i, keyrouter.modkey[i].composited, keyrouter.modkey[i].set, (int)keyrouter.modkey[i].time);
+ fprintf(stderr, "[keyrouter][%s][%d] modkey.idx_mod=%d, modkey.idx_comp=%d, press_only=%d\n", __FUNCTION__, i, keyrouter.modkey[i].idx_mod, keyrouter.modkey[i].idx_comp, keyrouter.modkey[i].press_only);
+#endif//__DEBUG__
+ i++;
+ keyrouter.modkey[i].keys[0].keysym = XStringToKeysym(KEY_VOLUMEUP);
+ keyrouter.modkey[i].keys[0].keycode = XKeysymToKeycode(keyrouter.disp, keyrouter.modkey[i].keys[0].keysym);
+ keyrouter.modkey[i].keys[1].keysym = XStringToKeysym(KEY_VOLUMEDOWN);
+ keyrouter.modkey[i].keys[1].keycode = XKeysymToKeycode(keyrouter.disp, keyrouter.modkey[i].keys[1].keysym);
+ keyrouter.modkey[i].press_only = EINA_FALSE;
+
+ fprintf(stderr, "[keyrouter][%s][%d] Modifier Key=%s (keycode:%d)\n", __FUNCTION__, i, KEY_VOLUMEUP, keyrouter.modkey[i].keys[0].keycode);
+ fprintf(stderr, "[keyrouter][%s][%d] Composited Key=%s (keycode:%d)\n", __FUNCTION__, i, KEY_VOLUMEDOWN, keyrouter.modkey[i].keys[1].keycode);
+ fprintf(stderr, "[keyrouter][%s][%d] Cancel Key=%s (keycode:%d)\n", __FUNCTION__, i, KEY_CANCEL, keyrouter.cancel_key.keycode);
+#ifdef __DEBUG__
+ fprintf(stderr, "[keyrouter][%s][%d] modkey.composited=%d, modkey.set=%d, modkey.time=%d\n", __FUNCTION__, i, keyrouter.modkey[i].composited, keyrouter.modkey[i].set, (int)keyrouter.modkey[i].time);
+ fprintf(stderr, "[keyrouter][%s][%d] modkey.idx_mod=%d, modkey.idx_comp=%d, press_only=%d\n", __FUNCTION__, i, keyrouter.modkey[i].idx_mod, keyrouter.modkey[i].idx_comp, keyrouter.modkey[i].press_only);
+#endif//__DEBUG__
+
+}
+
+static void ResetModKeyInfo()
+{
+ int i;
+
+ for(i=0 ; i < NUM_KEY_COMPOSITION_ACTIONS ; i++)
+ {
+#ifdef __DEBUG__
+ fprintf(stderr, "[keyrouter][%s][%d] Current Mod Key Info\n", __FUNCTION__, i);
+ fprintf(stderr, "[keyrouter][%s][%d] modkey.set=%d, modkey.composited=%d, modkey.time=%d, modkey.idx_mod=%d, modkey.idx_comp=%d\n",
+ __FUNCTION__, i, keyrouter.modkey[i].set, keyrouter.modkey[i].composited, (int)keyrouter.modkey[i].time, keyrouter.modkey[i].idx_mod, keyrouter.modkey[i].idx_comp);
+#endif
+ keyrouter.modkey[i].set = keyrouter.modkey[i].composited = keyrouter.modkey[i].time = keyrouter.modkey[i].idx_mod = keyrouter.modkey[i].idx_comp = 0;
+#ifdef __DEBUG__
+ fprintf(stderr, "[keyrouter][%s][%d] Reset Mod Key Info\n", __FUNCTION__, i);
+#endif
+ }
+
+ keyrouter.modkey_set = 0;
+ fprintf(stderr, "[keyrouter][%s][%d] modkey_set=%d\n", __FUNCTION__, i, keyrouter.modkey_set);
+}
+
+static int IsModKey(XEvent *ev, int index)
+{
+ int i, j = index;
+
+ for( i = 0 ; i < NUM_COMPOSITION_KEY ; i++ )
+ if( ev->xkey.keycode == keyrouter.modkey[j].keys[i].keycode )
+ return (i+1);
+
+ return 0;
+}
+
+static int IsCompKey(XEvent *ev, int index)
+{
+ int i = index;
+
+ if( ev->xkey.keycode == keyrouter.modkey[i].keys[keyrouter.modkey[i].idx_mod%NUM_COMPOSITION_KEY].keycode )
+ return 4;
+
+ return 0;
+}
+
+static int IsKeyComposited(XEvent *ev, int index)
+{
+ int i = index;
+
+ if( (ev->xkey.keycode == keyrouter.modkey[i].keys[keyrouter.modkey[i].idx_mod%NUM_COMPOSITION_KEY].keycode)
+ && (ev->xkey.time <= (keyrouter.modkey[i].time + KEY_COMPOSITION_TIME)) )
+ return 3;
+
+ return 0;
+}
+
+static void DoKeyCompositionAction(int index, int press)
+{
+ XEvent xev;
+ Atom xkey_composition_atom = None;
+
+ int revert_to;
+ int i = index;
+
+ xkey_composition_atom = XInternAtom (keyrouter.disp, STR_ATOM_XKEY_COMPOSITION, False);
+
+ 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[i].keys[0].keycode;
+ xev.xclient.data.l[1] = keyrouter.modkey[i].keys[1].keycode;
+ xev.xclient.data.l[2] = press;
+ xev.xclient.data.l[3] = 0;
+ xev.xclient.data.l[4] = 0;
+
+ XSendEvent(keyrouter.disp, keyrouter.rootWin, False, StructureNotifyMask | SubstructureNotifyMask, &xev);
+ XSync(keyrouter.disp, False);
+
+ fprintf(stderr, "\n[keyrouter][%s][%d] Do Key Composition Action : ClientMessage to RootWindow(0x%x)!: %s\n", __FUNCTION__, i, keyrouter.rootWin, press ? "Press" : "Release");
+}
+
+// End of a file
+
--- /dev/null
+#ifndef __E_MOD_MAIN_H__
+#define __E_MOD_MAIN_H__
+
+#include <X11/Xlib.h>
+#include <X11/Xatom.h>
+#include <X11/extensions/XInput.h>
+#include <X11/extensions/XInput2.h>
+#include <X11/extensions/XI2.h>
+#include <X11/extensions/XIproto.h>
+#include <X11/extensions/XTest.h>
+#include <X11/extensions/Xrandr.h>
+#include <utilX.h>
+
+//maximum number of hardkeys
+#define MAX_HARDKEYS 255
+
+#ifdef _F_ENABLE_MOUSE_POPUP
+#define POPUP_MENU_WIDTH 95
+#define POPUP_MENU_HEIGHT 120
+#endif//_F_ENABLE_MOUSE_POPUP
+
+//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_HWKEY_EMULATION "_HWKEY_EMULATION"
+
+//key composition for screen capture
+#define NUM_KEY_COMPOSITION_ACTIONS 2
+#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 _key_event_info
+{
+ int ev_type;
+ int keycode;
+ int modkey_index;
+} key_event_info;
+
+#if 0
+typedef struct _key_comp_action
+{
+ int type;//property, clientmessage or exec
+ union
+ {
+ struct {
+ Ecore_X_Atom atom;
+ Ecore_X_Window win;
+ } p;
+ struct {
+ Ecore_X_Atom atom;
+ Ecore_X_Window win;
+ } c;
+ struct {
+ char *cmd;
+ char *args;
+ } e;
+ } u;
+} key_comp_action;
+#endif
+
+typedef struct _ModifierKey
+{
+ int set;
+ int composited;
+ int idx_mod;
+ int idx_comp;
+ Time time;
+ Eina_Bool press_only;
+ //key_comp_action action;
+ kinfo keys[NUM_COMPOSITION_KEY];
+} ModifierKey;
+typedef struct ModifierKey *ModifierKeyPtr;
+
+#ifdef _F_ENABLE_MOUSE_POPUP
+const char *btns_label[] = {
+ "Volume Up",
+ "Volume Down",
+ "Go Home",
+ "Rotate"
+};
+#endif//_F_ENABLE_MOUSE_POPUP
+
+#define NUM_HWKEYS 33
+const char *HWKeys[] = {
+ KEY_VOLUMEUP,
+ KEY_VOLUMEDOWN,
+ KEY_CAMERA,
+ KEY_CONFIG,
+ KEY_POWER,
+ KEY_PAUSE,
+ KEY_CANCEL,
+ KEY_SEND,
+ KEY_SELECT,
+ KEY_END,
+ KEY_MEDIA,
+ KEY_PLAYCD,
+ KEY_STOPCD,
+ KEY_PAUSECD,
+ KEY_NEXTSONG,
+ KEY_PREVIOUSSONG,
+ KEY_REWIND,
+ KEY_FASTFORWARD,
+ KEY_PLAYPAUSE,
+ KEY_MUTE,
+ KEY_HOMEPAGE,
+ KEY_WEBPAGE,
+ KEY_MAIL,
+ KEY_SCREENSAVER,
+ KEY_BRIGHTNESSUP,
+ KEY_BRIGHTNESSDOWN,
+ KEY_SOFTKBD,
+ KEY_QUICKPANEL,
+ KEY_TASKSWITCH,
+ KEY_APPS,
+ KEY_SEARCH,
+ KEY_VOICE,
+ KEY_LANGUAGE
+};
+
+typedef enum
+{
+ E_KEYROUTER_HWKEY= 1,
+ E_KEYROUTER_HOTPLUGGED,
+ E_KEYROUTER_KEYBOARD,
+ E_KEYROUTER_NONE
+} KeyrouterDeviceType;
+
+typedef struct _E_Keyrouter_Device_Info E_Keyrouter_Device_Info;
+
+struct _E_Keyrouter_Device_Info
+{
+ int id;
+ const char *name;
+ KeyrouterDeviceType type;
+};
+
+typedef struct _hwkeymap_info
+{
+ EINA_INLIST;
+ const char* key_name;
+ KeySym key_sym;
+ int num_keycodes;
+ int *keycodes;
+} hwkeymap_info;
+
+//global variables will be the member variables of keyrouter structure
+typedef struct _tag_keyrouter
+{
+ Ecore_X_Display* disp;
+ Ecore_X_Window rootWin;
+ Ecore_X_Window input_window;
+
+ //screen capture related variables
+ kinfo cancel_key;
+ int modkey_set;
+ ModifierKey *modkey;
+
+ E_Zone *zone;
+
+#ifdef _F_ENABLE_MOUSE_POPUP
+ //mouse rbutton popup related variables
+ int toggle;
+ int rbutton_pressed_on_popup;
+ int popup_angle;
+ int popup_rootx;
+ int popup_rooty;
+
+ E_Popup *popup;
+ Evas_Object *popup_btns[4];
+ Evas_Object* popup_bg;
+ unsigned int btn_keys[3];
+#endif//_F_ENABLE_MOUSE_POPUP
+
+ //number of connected pointer and keyboard devices
+ int num_hwkey_devices;
+
+ Eina_List *device_list;
+ Eina_List *ignored_key_list;
+ Eina_List *waiting_key_list;
+ Eina_Inlist *hwkeymap_info_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;
+ int prev_sent_keycode;
+
+ struct FILE *fplog;
+
+ //atoms
+ Atom atomHWKeyEmulation;
+ 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_client_message_handler;
+ 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);
+static void _e_keyrouter_grab_hwkeys(int devid);
+static void _e_keyrouter_set_key_repeat(int key, int auto_repeat_mode);
+static void _e_keyrouter_hwkey_event_handler(XEvent *ev);
+
+//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 int _e_keyrouter_cb_client_message (void* data, int type, void* event);
+static void _e_keyrouter_xi2_device_hierarchy_handler(XIHierarchyEvent *event);
+static Eina_Bool _e_keyrouter_is_waiting_key_list_empty(XEvent *ev);
+static Eina_Bool _e_keyrouter_is_key_in_ignored_list(XEvent *ev);
+static void _e_keyrouter_device_add(int id, int type);
+static void _e_keyrouter_device_remove(int id, int type);
+static void _e_keyrouter_update_key_delivery_list(Ecore_X_Window win, int keycode, const int grab_mode, const int IsOnTop);
+
+//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 E_Zone* _e_keyrouter_get_zone();
+#ifdef _F_ENABLE_MOUSE_POPUP
+static void InitHardKeyCodes();
+static void popup_update();
+static void popup_show();
+static void popup_destroy();
+#endif//_F_ENABLE_MOUSE_POPUP
+static void _e_keyrouter_do_hardkey_emulation(const char *label, unsigned int key_event, unsigned int on_release, int keycode, int cancel);
+
+//functions related to key composition for screen capture
+static void InitModKeys();
+static void ResetModKeyInfo();
+static int IsModKey(XEvent *ev, int index);
+static int IsCompKey(XEvent *ev, int index);
+static int IsKeyComposited(XEvent *ev, int index);
+static void DoKeyCompositionAction(int index, int press);
+
+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__
+
--- /dev/null
+Gwangyeong Mun <kk.moon@samsung.com>
--- /dev/null
+Copyright notice for Enlightenment:
+
+Copyright (C) 2000-2012 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.
--- /dev/null
+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 `<wchar.h>' 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.
+
--- /dev/null
+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)
+
--- /dev/null
+#!/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
+
+
--- /dev/null
+dnl Process this file with autoconf to produce a configure script.
+
+# get rid of that stupid cache mechanism
+rm -f config.cache
+
+AC_INIT(move-tizen, 0.1, kk.moon@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])
+AC_OUTPUT
+
--- /dev/null
+dnl Copyright (C) 2004-2008 Kim Woelders
+dnl Copyright (C) 2008 Vincent Torri <vtorri at univ-evry dot fr>
+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 <stdlib.h>
+
+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
--- /dev/null
+# 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:
+#
+# <var>='`$ECHO "X$<var>" | $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 <bug-libtool@gnu.org>."
+
+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 <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#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<name>.so
+ # instead of lib<name>.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 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break
+ ;;
+ *)
+ test "$with_gnu_ld" != yes && break
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+else
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+ AC_MSG_RESULT($LD)
+else
+ AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+_LT_PATH_LD_GNU
+AC_SUBST([LD])
+
+_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
+])# LT_PATH_LD
+
+# Old names:
+AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
+AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_LD], [])
+dnl AC_DEFUN([AC_PROG_LD], [])
+
+
+# _LT_PATH_LD_GNU
+#- --------------
+m4_defun([_LT_PATH_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac])
+with_gnu_ld=$lt_cv_prog_gnu_ld
+])# _LT_PATH_LD_GNU
+
+
+# _LT_CMD_RELOAD
+# --------------
+# find reload flag for linker
+# -- PORTME Some linkers may need a different reload flag.
+m4_defun([_LT_CMD_RELOAD],
+[AC_CACHE_CHECK([for $LD option to reload object files],
+ lt_cv_ld_reload_flag,
+ [lt_cv_ld_reload_flag='-r'])
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+ darwin*)
+ if test "$GCC" = yes; then
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+ else
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ fi
+ ;;
+esac
+_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
+_LT_DECL([], [reload_cmds], [2])dnl
+])# _LT_CMD_RELOAD
+
+
+# _LT_CHECK_MAGIC_METHOD
+# ----------------------
+# how to check for library dependencies
+# -- PORTME fill in with the dynamic library characteristics
+m4_defun([_LT_CHECK_MAGIC_METHOD],
+[m4_require([_LT_DECL_EGREP])
+AC_CACHE_CHECK([how to recognize dependent libraries],
+lt_cv_deplibs_check_method,
+[lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix[[4-9]]*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+beos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+bsdi[[45]]*)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ ;;
+
+cygwin*)
+ # func_win32_libid is a shell function defined in ltmain.sh
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ ;;
+
+mingw* | pw32*)
+ # Base MSYS/MinGW do not provide the 'file' command needed by
+ # func_win32_libid shell function, so use a weaker test based on 'objdump',
+ # unless we find 'file', for example because we are cross-compiling.
+ if ( file / ) >/dev/null 2>&1; then
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ else
+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ fi
+ ;;
+
+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 <jrb3@best.com> 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 <jrb3@best.com> 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
+])
--- /dev/null
+# 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])])
--- /dev/null
+# 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
+])
--- /dev/null
+# 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)
+])
--- /dev/null
+# 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])])
--- /dev/null
+[Desktop Entry]
+Type=Link
+Name=move-tizen
+Icon=e-module-move-tizen
+X-Enlightenment-ModuleType=system
+Comment=
+Comment[fr]=
+Comment[it]=
--- /dev/null
+MAINTAINERCLEANFILES = Makefile.in
+MODULE = move-tizen
+
+LDFLAGS +=
+
+pkgdir = $(libdir)/enlightenment/modules/$(MODULE)/$(MODULE_ARCH)
+pkg_LTLIBRARIES = module.la
+module_la_SOURCES = e_mod_main.c \
+ e_mod_main.h \
+ e_mod_move.c \
+ e_mod_move.h \
+ e_mod_move_atoms.c \
+ e_mod_move_atoms.h \
+ e_mod_move_border_shape_input.c \
+ e_mod_move_border_shape_input.h \
+ e_mod_move_border_contents.c \
+ e_mod_move_border_contents.h \
+ e_mod_move_border_type.c \
+ e_mod_move_border_type.h \
+ e_mod_move_canvas.c \
+ e_mod_move_canvas.h \
+ e_mod_move_cfdata.c \
+ e_mod_move_cfdata.h \
+ e_mod_move_debug.c \
+ e_mod_move_debug.h \
+ e_mod_move_event.c \
+ e_mod_move_event.h \
+ e_mod_move_object.c \
+ e_mod_move_object.h \
+ e_mod_move_control_object.c \
+ e_mod_move_control_object.h \
+ e_mod_move_dim_object.c \
+ e_mod_move_dim_object.h \
+ e_mod_move_evas_object.c \
+ e_mod_move_evas_object.h \
+ e_mod_move_shared_types.h \
+ e_mod_move_util.c \
+ e_mod_move_util.h \
+ e_mod_move_indicator.c \
+ e_mod_move_indicator.h \
+ e_mod_move_indicator_controller.c \
+ e_mod_move_indicator_controller.h \
+ e_mod_move_apptray.c \
+ e_mod_move_apptray.h \
+ e_mod_move_quickpanel.c \
+ e_mod_move_quickpanel.h \
+ e_mod_move_mini_apptray.c \
+ e_mod_move_mini_apptray.h \
+ e_mod_move_lockscreen.c \
+ e_mod_move_lockscreen.h \
+ e_mod_move_taskmanager.c \
+ e_mod_move_taskmanager.h \
+ e_mod_move_pwlock.c \
+ e_mod_move_pwlock.h \
+ e_mod_move_flick.c \
+ e_mod_move_flick.h \
+ e_mod_move_widget_object.c \
+ e_mod_move_widget_object.h \
+ e_mod_move_indicator_widget.c \
+ e_mod_move_indicator_widget.h \
+ e_mod_move_mini_apptray_widget.c \
+ e_mod_move_mini_apptray_widget.h
+module_la_LIBADD =
+module_la_CFLAGS = @ENLIGHTENMENT_CFLAGS@
+module_la_LDFLAGS = -module -avoid-version @ENLIGHTENMENT_LIBS@
+module_la_DEPENDENCIES = $(top_builddir)/config.h
--- /dev/null
+#include "e.h"
+#include "e_mod_main.h"
+#include "e_mod_move.h"
+
+/* module private routines */
+Mod *_move_mod = NULL;
+
+/* public module routines. all modules must have these */
+EAPI E_Module_Api e_modapi =
+{
+ E_MODULE_API_VERSION,
+ "Move E_Border"
+};
+
+/* local subsystem functions */
+static void _e_mod_config_new(E_Module *m);
+static void _e_mod_config_free(E_Module *m);
+
+/* externally accessible functions */
+EAPI void *
+e_modapi_init(E_Module *m)
+{
+ Mod *mod;
+
+ mod = calloc(1, sizeof(Mod));
+ m->data = mod;
+
+ mod->module = m;
+ e_mod_move_cfdata_edd_init(&(mod->conf_edd));
+ mod->conf = e_config_domain_load("module.move-tizen", mod->conf_edd);
+
+ if (!mod->conf) _e_mod_config_new(m);
+
+ _move_mod = mod;
+
+ if (!e_mod_move_init())
+ {
+ // FIXME: handle if move init fails
+ memset(mod, 0, sizeof(Mod));
+ free(mod);
+ mod = NULL;
+ fprintf(stderr,
+ "[E17-MOVE] %s(%d) Failed\n",
+ __func__, __LINE__);
+ }
+ return mod;
+}
+
+EAPI int
+e_modapi_shutdown(E_Module *m)
+{
+ Mod *mod = m->data;
+
+ if (mod == _move_mod) _move_mod = NULL;
+ e_mod_move_shutdown();
+ _e_mod_config_free(m);
+ E_CONFIG_DD_FREE(mod->conf_edd);
+
+ memset(mod, 0, sizeof(Mod));
+ free(mod);
+ mod = NULL;
+
+
+ return 1;
+}
+
+EAPI int
+e_modapi_save(E_Module *m __UNUSED__)
+{
+ Mod *mod = m->data;
+ e_config_domain_save("module.move-tizen", mod->conf_edd, mod->conf);
+ return 1;
+}
+
+/* local subsystem functions */
+static void
+_e_mod_config_new(E_Module *m)
+{
+ Mod *mod = m->data;
+ mod->conf = e_mod_move_cfdata_config_new();
+}
+
+static void
+_e_mod_config_free(E_Module *m)
+{
+ Mod *mod = m->data;
+
+ e_mod_move_cfdata_config_free(mod->conf);
+ mod->conf = NULL;
+}
--- /dev/null
+#ifndef E_MOD_MAIN_H
+#define E_MOD_MAIN_H
+
+#include "e_mod_move_cfdata.h"
+typedef struct _Mod Mod;
+
+struct _Mod
+{
+ E_Module *module;
+ E_Config_DD *conf_edd;
+ E_Config_DD *conf_match_edd;
+ Config *conf;
+ E_Config_Dialog *config_dialog;
+};
+
+extern Mod *_move_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);
+
+#endif//E_MOD_MAIN_H
+
--- /dev/null
+#include "e_mod_move.h"
+#include "e_mod_move_atoms.h"
+#include "e_mod_move_debug.h"
+
+typedef enum _E_Move_Stacking E_Move_Stacking;
+enum _E_Move_Stacking
+{
+ E_MOVE_STACKING_NONE = 0,
+ E_MOVE_STACKING_RAISE,
+ E_MOVE_STACKING_LOWER,
+ E_MOVE_STACKING_RAISE_ABOVE,
+ E_MOVE_STACKING_LOWER_BELOW
+};
+
+/* static global variables */
+static Eina_List *handlers = NULL;
+static Eina_List *moves = NULL;
+static Eina_Hash *border_clients = NULL;
+static Eina_Hash *borders = NULL;
+static Eina_List *e_border_hooks = NULL;
+static E_Msg_Handler *e_msg_handler = NULL;
+
+/* static functions */
+static E_Move *_e_mod_move_add(E_Manager *man);
+static void _e_mod_move_del(E_Move *m);
+static E_Move_Border *_e_mod_move_border_find(Ecore_X_Window win);
+static E_Move_Border *_e_mod_move_border_client_find(Ecore_X_Window win);
+static E_Move *_e_mod_move_find(Ecore_X_Window root);
+static Eina_Bool _e_mod_move_mouse_btn_dn(void *data, int type __UNUSED__, void *event);
+static Eina_Bool _e_mod_move_mouse_btn_up(void *data, int type __UNUSED__, void *event);
+static Eina_Bool _e_mod_move_property(void *data __UNUSED__, int type __UNUSED__, void *event __UNUSED__);
+static Eina_Bool _e_mod_move_message(void *data __UNUSED__, int type __UNUSED__, void *event);
+static Eina_Bool _e_mod_move_visibility_change(void *data __UNUSED__, int type __UNUSED__, void *event);
+static Eina_Bool _e_mod_move_bd_add(void *data __UNUSED__, int type __UNUSED__, void *event);
+static Eina_Bool _e_mod_move_bd_del(void *data __UNUSED__, int type __UNUSED__, void *event);
+static Eina_Bool _e_mod_move_bd_show(void *data __UNUSED__,int type __UNUSED__, void *event);
+static Eina_Bool _e_mod_move_bd_hide(void *data __UNUSED__,int type __UNUSED__, void *event);
+static Eina_Bool _e_mod_move_bd_move(void *data __UNUSED__,int type __UNUSED__, void *event);
+static Eina_Bool _e_mod_move_bd_resize(void *data __UNUSED__, int type __UNUSED__, void *event);
+static Eina_Bool _e_mod_move_bd_stack(void *data __UNUSED__, int type __UNUSED__, void *event);
+
+static E_Move_Border *_e_mod_move_bd_new_intern(E_Move *m, E_Border *bd);
+static void _e_mod_move_bd_add_intern(E_Move_Border *mb);
+static void _e_mod_move_bd_del_intern(E_Move_Border *mb);
+static void _e_mod_move_bd_show_intern(E_Move_Border *mb);
+static void _e_mod_move_bd_hide_intern(E_Move_Border *mb);
+static void _e_mod_move_bd_move_resize_intern(E_Move_Border *mb, int x, int y, int w, int h);
+static void _e_mod_move_bd_stack_intern(E_Move_Border *mb1, E_Move_Border *mb2, E_Move_Stacking type);
+static void _e_mod_move_object_del(void *data, void *obj);
+
+static void _e_mod_move_bd_obj_del(E_Move_Border *mb);
+static void _e_mod_move_ctl_obj_add(E_Move_Border *mb);
+static void _e_mod_move_ctl_obj_del(E_Move_Border *mb);
+static void _e_mod_move_ctl_obj_event_setup(E_Move_Border *mb, E_Move_Control_Object *mco);
+
+static void *_e_mod_move_bd_internal_data_add(E_Move_Border *mb);
+static Eina_Bool _e_mod_move_bd_internal_data_del(E_Move_Border *mb);
+static Eina_Bool _e_mod_move_bd_anim_data_del(E_Move_Border *mb);
+
+static Eina_Bool _e_mod_move_prop_window_input_region_get(Ecore_X_Window win, int *x, int *y, int *w, int *h);
+static Eina_Bool _e_mod_move_prop_window_contents_region_get(Ecore_X_Window win, int *x, int *y, int *w, int *h);
+static Eina_Bool _e_mod_move_prop_active_window_get(Ecore_X_Window *active_win);
+static Eina_Bool _e_mod_move_prop_indicator_state_get(Ecore_X_Window win, Eina_Bool *state);
+static Eina_Bool _e_mod_move_prop_mini_apptray_state_get(Ecore_X_Window win, E_Move_Mini_Apptray_State *state);
+static Eina_Bool _e_mod_move_prop_indicator_type_get(Ecore_X_Window win, E_Move_Indicator_Type *type);
+static Eina_Bool _e_mod_move_prop_fullscreen_indicator_show_state_get(Ecore_X_Window win, Eina_Bool *state);
+static Eina_Bool _e_mod_move_prop_indicator_geometry_get(Ecore_X_Window win, E_Move *m);
+
+static Eina_Bool _e_mod_move_prop_window_input_region(Ecore_X_Event_Window_Property *ev);
+static Eina_Bool _e_mod_move_prop_window_contents_region(Ecore_X_Event_Window_Property *ev);
+static Eina_Bool _e_mod_move_prop_active_window(Ecore_X_Event_Window_Property *ev);
+static Eina_Bool _e_mod_move_prop_indicator_state(Ecore_X_Event_Window_Property *ev);
+static Eina_Bool _e_mod_move_prop_mini_apptray_state(Ecore_X_Event_Window_Property *ev);
+static Eina_Bool _e_mod_move_prop_indicator_type(Ecore_X_Event_Window_Property *ev);
+static Eina_Bool _e_mod_move_prop_fullscreen_indicator_show_state(Ecore_X_Event_Window_Property *ev);
+static Eina_Bool _e_mod_move_prop_rotate_window_angle(Ecore_X_Event_Window_Property *ev);
+static Eina_Bool _e_mod_move_prop_rotate_root_angle(Ecore_X_Event_Window_Property *ev);
+static Eina_Bool _e_mod_move_prop_panel_scrollable_state(Ecore_X_Event_Window_Property *ev);
+static Eina_Bool _e_mod_move_prop_indicator_geometry(Ecore_X_Event_Window_Property *ev);
+
+static Eina_Bool _e_mod_move_msg_window_show(Ecore_X_Event_Client_Message *ev);
+static Eina_Bool _e_mod_move_msg_qp_state(Ecore_X_Event_Client_Message *ev);
+
+static Eina_Bool _e_mod_move_outside_zone_border_position_update(E_Move_Border *mb);
+static Eina_Bool _e_mod_move_prop_active_window_internal_quickpanel_move(E_Move_Border *mb, int x, int y);
+static Eina_Bool _e_mod_move_msg_window_show_internal_apptray_check(E_Move_Border *mb);
+static Eina_Bool _e_mod_move_msg_window_show_internal_quickpanel_check(E_Move_Border *mb);
+static Eina_Bool _e_mod_move_msg_window_show_internal_mini_apptray_check(E_Move_Border *mb);
+static Eina_Bool _e_mod_move_msg_qp_state_internal_quickpanel_check(E_Move_Border *mb);
+
+static void _e_mod_move_bd_new_hook(void *data __UNUSED__, void *data2);
+static void _e_mod_move_bd_del_hook(void *data __UNUSED__, void *data2);
+
+static void _e_mod_move_e_msg_handler(void *data, const char *name, const char *info, int val, E_Object *obj, void *msgdata);
+//////////////////////////////////////////////////////////////////////////
+
+static E_Move_Border *
+_e_mod_move_border_find(Ecore_X_Window win)
+{
+ return eina_hash_find(borders, e_util_winid_str_get(win));
+}
+
+static E_Move_Border *
+_e_mod_move_border_client_find(Ecore_X_Window win)
+{
+ return eina_hash_find(border_clients, e_util_winid_str_get(win));
+}
+
+static E_Move *
+_e_mod_move_find(Ecore_X_Window root)
+{
+ Eina_List *l;
+ E_Move *m;
+ EINA_LIST_FOREACH(moves, l, m)
+ {
+ if (!m) continue;
+ if (m->man->root == root) return m;
+ }
+ return NULL;
+}
+
+static Eina_Bool
+_e_mod_move_mouse_btn_dn(void *data,
+ int type __UNUSED__,
+ void *event)
+{
+ E_Move *m;
+ Ecore_Event_Mouse_Button *ev = (Ecore_Event_Mouse_Button *)event;
+ E_CHECK_RETURN(ev, ECORE_CALLBACK_PASS_ON);
+
+ m = e_mod_move_util_get();
+ if ((m) && (m->ev_log))
+ {
+ E_Move_Event_Log *log = NULL;
+
+ log = E_NEW(E_Move_Event_Log, 1);
+ if (log)
+ {
+ if (ev->multi.device == 0) // single mouse down
+ {
+ log->t = E_MOVE_EVENT_LOG_ECORE_SINGLE_MOUSE_DOWN;
+ log->d.ec_sm.win = ev->window;
+ log->d.ec_sm.x = ev->x;
+ log->d.ec_sm.y = ev->y;
+ log->d.ec_sm.btn = ev->buttons;
+ }
+ else if (ev->multi.device > 0) // multi mouse down
+ {
+ log->t = E_MOVE_EVENT_LOG_ECORE_MULTI_MOUSE_DOWN;
+ log->d.ec_mm.win = ev->window;
+ log->d.ec_mm.x = ev->multi.x;
+ log->d.ec_mm.y = ev->multi.y;
+ log->d.ec_mm.btn = ev->buttons;
+ log->d.ec_mm.dev = ev->multi.device;
+ }
+ else
+ {
+ log->t = E_MOVE_EVENT_LOG_UNKOWN;
+ }
+ // list check and append
+ if (eina_list_count(m->ev_logs) >= m->ev_log_cnt)
+ {
+ // if log list is full, delete first log
+ E_Move_Event_Log *first_log = (E_Move_Event_Log*)eina_list_nth(m->ev_logs, 0);
+ m->ev_logs = eina_list_remove(m->ev_logs, first_log);
+ }
+ m->ev_logs = eina_list_append(m->ev_logs, log);
+ }
+ }
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+static Eina_Bool
+_e_mod_move_mouse_btn_up(void *data,
+ int type __UNUSED__,
+ void *event)
+{
+ E_Move *m;
+ Ecore_Event_Mouse_Button *ev = (Ecore_Event_Mouse_Button *)event;
+ E_CHECK_RETURN(ev, ECORE_CALLBACK_PASS_ON);
+
+ m = e_mod_move_util_get();
+ if ((m) && (m->ev_log))
+ {
+ E_Move_Event_Log *log = NULL;
+
+ log = E_NEW(E_Move_Event_Log, 1);
+ if (log)
+ {
+ if (ev->multi.device == 0) // single mouse up
+ {
+ log->t = E_MOVE_EVENT_LOG_ECORE_SINGLE_MOUSE_UP;
+ log->d.ec_sm.win = ev->window;
+ log->d.ec_sm.x = ev->x;
+ log->d.ec_sm.y = ev->y;
+ log->d.ec_sm.btn = ev->buttons;
+ }
+ else if (ev->multi.device > 0) // multi mouse up
+ {
+ log->t = E_MOVE_EVENT_LOG_ECORE_MULTI_MOUSE_UP;
+ log->d.ec_mm.win = ev->window;
+ log->d.ec_mm.x = ev->multi.x;
+ log->d.ec_mm.y = ev->multi.y;
+ log->d.ec_mm.btn = ev->buttons;
+ log->d.ec_mm.dev = ev->multi.device;
+ }
+ else
+ {
+ log->t = E_MOVE_EVENT_LOG_UNKOWN;
+ }
+ // list check and append
+ if (eina_list_count(m->ev_logs) >= m->ev_log_cnt)
+ {
+ // if log list is full, delete first log
+ E_Move_Event_Log *first_log = (E_Move_Event_Log*)eina_list_nth(m->ev_logs, 0);
+ m->ev_logs = eina_list_remove(m->ev_logs, first_log);
+ }
+ m->ev_logs = eina_list_append(m->ev_logs, log);
+ }
+ }
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+static Eina_Bool
+_e_mod_move_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_move_atoms_name_get(ev->atom)) return ECORE_CALLBACK_PASS_ON;
+ a = ev->atom;
+
+ L(LT_EVENT_X,
+ "[MOVE] ev:%15.15s w:0x%08x atom:%s\n",
+ "X_PROPERTY", ev->win,
+ e_mod_move_atoms_name_get(a));
+
+ if (a == ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE )
+ _e_mod_move_prop_rotate_window_angle(ev);
+ else if (a == ATOM_CM_LOG )
+ e_mod_move_debug_prop_handle(ev);
+ else if (a == ATOM_CM_WINDOW_INPUT_REGION )
+ _e_mod_move_prop_window_input_region(ev);
+ else if (a == ATOM_CM_WINDOW_CONTENTS_REGION )
+ _e_mod_move_prop_window_contents_region(ev);
+ else if (a == ECORE_X_ATOM_NET_ACTIVE_WINDOW )
+ _e_mod_move_prop_active_window(ev);
+ else if (a == ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE )
+ _e_mod_move_prop_indicator_state(ev);
+ else if (a == ATOM_MV_FULLSCREEN_INDICATOR_SHOW )
+ _e_mod_move_prop_fullscreen_indicator_show_state(ev);
+ else if (a == ATOM_MV_PANEL_SCROLLABLE_STATE )
+ _e_mod_move_prop_panel_scrollable_state(ev);
+ else if (a == ECORE_X_ATOM_E_ILLUME_ROTATE_ROOT_ANGLE )
+ _e_mod_move_prop_rotate_root_angle(ev);
+ else if (a == ATOM_MV_INDICATOR_GEOMETRY )
+ _e_mod_move_prop_indicator_geometry(ev);
+ else if (a == ECORE_X_ATOM_E_ILLUME_INDICATOR_TYPE_MODE)
+ _e_mod_move_prop_indicator_type(ev);
+ else if (a == ATOM_MV_APPTRAY_STATE)
+ _e_mod_move_prop_mini_apptray_state(ev);
+
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+static Eina_Bool
+_e_mod_move_message(void *data __UNUSED__,
+ int type __UNUSED__,
+ void *event)
+{
+ Ecore_X_Event_Client_Message *ev;
+ Ecore_X_Atom t;
+ ev = (Ecore_X_Event_Client_Message *)event;
+
+ E_CHECK_RETURN(ev, ECORE_CALLBACK_PASS_ON);
+ E_CHECK_RETURN((ev->format == 32), ECORE_CALLBACK_PASS_ON);
+ E_CHECK_RETURN(e_mod_move_atoms_name_get(ev->message_type),
+ ECORE_CALLBACK_PASS_ON);
+
+ t = ev->message_type;
+
+ L(LT_EVENT_X,
+ "[MOVE] ev:%15.15s w:0x%08x atom:%s\n",
+ "X_CLIENT_MESSAGE", ev->win,
+ e_mod_move_atoms_name_get(t));
+
+
+ if (t == ATOM_WM_WINDOW_SHOW)
+ {
+ LOG(LOG_DEBUG,
+ "WM_WINDOW_SHOW", "[e17:X_CLIENT_MESSAGE] w:0x%08x atom:%s",
+ ev->win,e_mod_move_atoms_name_get(t));
+ _e_mod_move_msg_window_show(ev);
+ }
+ else if (t == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE) _e_mod_move_msg_qp_state(ev);
+
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+static Eina_Bool
+_e_mod_move_visibility_change(void *data __UNUSED__,
+ int type __UNUSED__,
+ void *event)
+{
+ Ecore_X_Window win;
+ Ecore_X_Window target_win;
+ E_Move_Border *mb = NULL;
+ int fully_obscured;
+ Ecore_X_Event_Window_Visibility_Change *ev;
+ ev = (Ecore_X_Event_Window_Visibility_Change *)event;
+
+ E_CHECK_RETURN(ev, ECORE_CALLBACK_PASS_ON);
+
+ L(LT_EVENT_X,
+ "[MOVE] ev:%15.15s w:0x%08x fully_obscured:%d\n",
+ "X_VISIBILITY_CHANGE", ev->win,
+ ev->fully_obscured);
+
+ win = ev->win;
+ fully_obscured = ev->fully_obscured;
+
+ mb = _e_mod_move_border_client_find(win);
+ E_CHECK_RETURN(mb, ECORE_CALLBACK_PASS_ON);
+
+ if (fully_obscured)
+ {
+ mb->visibility = E_MOVE_VISIBILITY_STATE_FULLY_OBSCURED;
+
+ if (e_mod_move_indicator_controller_unset_policy_check(mb))
+ e_mod_move_indicator_controller_unset(mb->m);
+
+ }
+ else
+ {
+ mb->visibility = E_MOVE_VISIBILITY_STATE_VISIBLE;
+
+ if (e_mod_move_indicator_controller_set_policy_check(mb))
+ {
+ if (e_mod_move_indicator_controller_state_get(mb->m, &target_win))
+ e_mod_move_indicator_controller_unset(mb->m);
+
+ e_mod_move_indicator_controller_set(mb);
+ }
+
+ }
+
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+static Eina_Bool
+_e_mod_move_bd_add(void *data __UNUSED__,
+ int type __UNUSED__,
+ void *event)
+{
+ E_Event_Border_Add *ev = event;
+ E_Move_Border *mb = NULL;
+ E_Move *m = e_mod_move_util_get();
+
+ E_CHECK_RETURN(ev, ECORE_CALLBACK_PASS_ON);
+ E_CHECK_RETURN(ev->border, ECORE_CALLBACK_PASS_ON);
+
+ L(LT_EVENT_BD,
+ "[MOVE] ev:%15.15s w:0x%08x c:0x%08x\n", "BD_ADD",
+ ev->border->win, ev->border->client.win);
+
+ E_CHECK_RETURN(m, ECORE_CALLBACK_PASS_ON);
+
+ mb = _e_mod_move_border_find(ev->border->win);
+ E_CHECK_RETURN(mb, ECORE_CALLBACK_PASS_ON);
+
+ _e_mod_move_bd_add_intern(mb);
+
+ _e_mod_move_bd_move_resize_intern(mb,
+ ev->border->x, ev->border->y,
+ ev->border->w, ev->border->h);
+
+ if (ev->border->internal && ev->border->visible)
+ _e_mod_move_bd_show_intern(mb);
+
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+static Eina_Bool
+_e_mod_move_bd_del(void *data __UNUSED__,
+ int type __UNUSED__,
+ void *event)
+{
+ E_Move *m = e_mod_move_util_get();
+ E_Move_Border *mb = NULL;
+ E_Event_Border_Remove *ev = event;
+
+ E_CHECK_RETURN(ev, ECORE_CALLBACK_PASS_ON);
+ E_CHECK_RETURN(ev->border, ECORE_CALLBACK_PASS_ON);
+
+ L(LT_EVENT_BD,
+ "[MOVE] ev:%15.15s w:0x%08x c:0x%08x\n", "BD_DEL",
+ ev->border->win, ev->border->client.win);
+
+ // func call flow.
+ // BD_DEL_HOOK -> BD_HIDE -> BD_DEL -> E_MSG_Handler ['comp.manager':'visibility.src']
+ //
+ // "e_msg config.src" event is received after "e_border del" event
+ // and move module's e_boder del handler delete E_Move_Boder structure. (_e_mod_move_object_del() )
+ // so implicit call widget apply fuctions ( indicator widget, mini_apptray widget)
+ E_CHECK_RETURN(m, ECORE_CALLBACK_PASS_ON);
+ if (m->elm_indicator_mode) e_mod_move_indicator_widget_apply();
+ e_mod_move_mini_apptray_widget_apply();
+
+ mb = _e_mod_move_border_find(ev->border->win);
+ E_CHECK_RETURN(mb, ECORE_CALLBACK_PASS_ON);
+ _e_mod_move_object_del(mb, ev->border);
+
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+static Eina_Bool
+_e_mod_move_bd_show(void *data __UNUSED__,
+ int type __UNUSED__,
+ void *event)
+{
+ E_Event_Border_Show *ev = event;
+ E_Move_Border *mb = NULL;
+
+ E_CHECK_RETURN(ev, ECORE_CALLBACK_PASS_ON);
+ E_CHECK_RETURN(ev->border, ECORE_CALLBACK_PASS_ON);
+ L(LT_EVENT_BD,
+ "[MOVE] ev:%15.15s w:0x%08x c:0x%08x\n", "BD_SHOW",
+ ev->border->win, ev->border->client.win);
+
+ mb = _e_mod_move_border_find(ev->border->win);
+ if (!mb) return ECORE_CALLBACK_PASS_ON;
+ if (mb->visible) return ECORE_CALLBACK_PASS_ON;
+ _e_mod_move_bd_show_intern(mb);
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+static Eina_Bool
+_e_mod_move_bd_hide(void *data __UNUSED__,
+ int type __UNUSED__,
+ void *event)
+{
+ E_Event_Border_Hide *ev = event;
+ E_Move_Border *mb = NULL;
+
+ E_CHECK_RETURN(ev, ECORE_CALLBACK_PASS_ON);
+ E_CHECK_RETURN(ev->border, ECORE_CALLBACK_PASS_ON);
+ L(LT_EVENT_BD,
+ "[MOVE] ev:%15.15s w:0x%08x c:0x%08x\n", "BD_HIDE",
+ ev->border->win, ev->border->client.win);
+
+ mb = _e_mod_move_border_find(ev->border->win);
+ if (!mb) return ECORE_CALLBACK_PASS_ON;
+ if (!mb->visible) return ECORE_CALLBACK_PASS_ON;
+ _e_mod_move_bd_hide_intern(mb);
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+static Eina_Bool
+_e_mod_move_bd_move(void *data __UNUSED__,
+ int type __UNUSED__,
+ void *event)
+{
+ E_Event_Border_Move *ev = event;
+ E_Move *m = e_mod_move_util_get();
+ E_Move_Border *mb = NULL;
+
+ E_CHECK_RETURN(ev, ECORE_CALLBACK_PASS_ON);
+ E_CHECK_RETURN(ev->border, ECORE_CALLBACK_PASS_ON);
+ mb = _e_mod_move_border_find(ev->border->win);
+ E_CHECK_RETURN(m, ECORE_CALLBACK_PASS_ON);
+ E_CHECK_RETURN(mb, ECORE_CALLBACK_PASS_ON);
+
+ L(LT_EVENT_BD,
+ "[MOVE] ev:%15.15s w:0x%08x c:0x%08x v:%d \
+ mb[%d,%d] -> ev[%d,%d]\n", "BD_MOVE",
+ ev->border->win, ev->border->client.win, mb->visible,
+ mb->x, mb->y, ev->border->x, ev->border->y);
+
+ if (!((mb->x == ev->border->x) &&
+ (mb->y == ev->border->y)))
+ {
+ _e_mod_move_bd_move_resize_intern
+ (mb, ev->border->x, ev->border->y,
+ mb->w, mb->h);
+ }
+
+ // if compositor send config.src "e_msg" event before BD_Move "E Event", then indicator widget could not apply correctly.
+ // so explicit function (indicator_widget_apply() )call is required on BD_RESIZE_Event Handler.
+ // if Move module's stack info equals to E_Stack info then following explicit call should remove.
+ if (m->elm_indicator_mode) e_mod_move_indicator_widget_apply();
+
+ e_mod_move_mini_apptray_widget_apply();
+
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+static Eina_Bool
+_e_mod_move_bd_resize(void *data __UNUSED__,
+ int type __UNUSED__,
+ void *event)
+{
+ E_Event_Border_Resize *ev = event;
+ E_Move_Border *mb = NULL;
+ E_Move *m = e_mod_move_util_get();
+
+ E_CHECK_RETURN(ev, ECORE_CALLBACK_PASS_ON);
+ E_CHECK_RETURN(ev->border, ECORE_CALLBACK_PASS_ON);
+ L(LT_EVENT_BD,
+ "[MOVE] ev:%15.15s w:0x%08x c:0x%08x ev:%4dx%4d\n",
+ "BD_RESIZE", ev->border->win, ev->border->client.win,
+ ev->border->w, ev->border->h);
+
+ mb = _e_mod_move_border_find(ev->border->win);
+ E_CHECK_RETURN(m, ECORE_CALLBACK_PASS_ON);
+ E_CHECK_RETURN(mb, ECORE_CALLBACK_PASS_ON);
+
+ if ((mb->w == ev->border->w) && (mb->h == ev->border->h))
+ return ECORE_CALLBACK_PASS_ON;
+ _e_mod_move_bd_move_resize_intern
+ (mb, mb->x, mb->y,
+ ev->border->w, ev->border->h);
+
+ // if compositor send config.src "e_msg" event before BD_RESIZE "E Event", then indicator widget could not apply correctly.
+ // so explicit function (indicator_widget_apply() )call is required on BD_RESIZE_Event Handler.
+ // if Move module's stack info equals to E_Stack info then following explicit call should remove.
+ if (m->elm_indicator_mode) e_mod_move_indicator_widget_apply();
+
+ e_mod_move_mini_apptray_widget_apply();
+
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+static Eina_Bool
+_e_mod_move_bd_stack(void *data __UNUSED__,
+ int type __UNUSED__,
+ void *event)
+{
+ E_Event_Border_Stack *ev = event;
+ E_Move_Border *mb1 = NULL;
+ E_Move_Border *mb2 = NULL;
+
+ E_CHECK_RETURN(ev, ECORE_CALLBACK_PASS_ON);
+ E_CHECK_RETURN(ev->border, ECORE_CALLBACK_PASS_ON);
+ if (ev->type == E_STACKING_ABOVE)
+ {
+ if (ev->stack)
+ {
+ L(LT_EVENT_BD,
+ "[MOVE] ev:%15.15s w1:0x%08x c1:0x%08x w2:0x%08x c2:0x%08x\n",
+ "BD_RAISE_ABOVE", ev->border->win, ev->border->client.win,
+ ev->stack->win, ev->stack->client.win);
+ }
+ else
+ {
+ L(LT_EVENT_BD,
+ "[MOVE] ev:%15.15s w:0x%08x c:0x%08x\n",
+ "BD_LOWER", ev->border->win, ev->border->client.win);
+ }
+ }
+ else if (ev->type == E_STACKING_BELOW)
+ {
+ if (ev->stack)
+ {
+ L(LT_EVENT_BD,
+ "[MOVE] ev:%15.15s w1:0x%08x c1:0x%08x w2:0x%08x c2:0x%08x\n",
+ "BD_LOWER_BELOW", ev->border->win, ev->border->client.win,
+ ev->stack->win, ev->stack->client.win);
+ }
+ else
+ {
+ L(LT_EVENT_BD,
+ "[MOVE] ev:%15.15s w:0x%08x c:0x%08x\n",
+ "BD_RAISE", ev->border->win, ev->border->client.win);
+ }
+ }
+
+ mb1 = _e_mod_move_border_find(ev->border->win);
+ if (!mb1) return ECORE_CALLBACK_PASS_ON;
+
+ if (ev->stack)
+ {
+ mb2 = _e_mod_move_border_find(ev->stack->win);
+ }
+
+ if (ev->type == E_STACKING_ABOVE )
+ {
+ if (mb2)
+ _e_mod_move_bd_stack_intern(mb1,mb2, E_MOVE_STACKING_RAISE_ABOVE);
+ else
+ _e_mod_move_bd_stack_intern(mb1,NULL, E_MOVE_STACKING_LOWER);
+ }
+ else if ( ev->type == E_STACKING_BELOW)
+ {
+ if (mb2)
+ _e_mod_move_bd_stack_intern(mb1,mb2, E_MOVE_STACKING_LOWER_BELOW);
+ else
+ _e_mod_move_bd_stack_intern(mb1,NULL, E_MOVE_STACKING_RAISE);
+ }
+
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+static void
+_e_mod_move_bd_new_hook(void *data __UNUSED__,
+ void *data2)
+{
+ // "e_border_add event" could follow after "e_border_stack evnet" (e17-core does not ensure e_border event order)
+ // but e_border_new hook handler is called before other e_border events. (e17-core ensures e_border_hook hander order)
+ E_Border *bd = data2;
+ E_Move *m = e_mod_move_util_get();
+
+ E_CHECK(bd);
+ E_CHECK(m);
+
+ L(LT_EVENT_BD,
+ "[MOVE] ev:%15.15s w:0x%08x c:0x%08x\n", "BD_NEW_HOOK",
+ bd->win, bd->client.win);
+
+ if (_e_mod_move_border_find(bd->win)) return;
+
+ _e_mod_move_bd_new_intern(m, bd);
+}
+
+static void
+_e_mod_move_bd_del_hook(void *data __UNUSED__,
+ void *data2)
+{
+ E_Border *bd = data2;
+ E_Move_Border *mb = NULL;
+ E_CHECK(bd);
+
+ L(LT_EVENT_BD,
+ "[MOVE] ev:%15.15s w:0x%08x c:0x%08x\n", "BD_DEL_HOOK",
+ bd->win, bd->client.win);
+
+ // border is not processed by _e_border_eval()
+ // - case: bd_new -> bd_del
+ // : this case "bd_del e_event" does not occure. e17 only calls bd_del hook.
+ // - general flow: bd_new() -> _e_border_eval() -> bd_del()
+ // : _e_border_eval() makes new_client flag to zero.
+ if (bd->new_client)
+ {
+ mb = _e_mod_move_border_find(bd->win);
+ E_CHECK(mb);
+ _e_mod_move_object_del(mb, bd);
+ }
+}
+
+static void
+_e_mod_move_e_msg_handler(void *data,
+ const char *name,
+ const char *info,
+ int val,
+ E_Object *obj,
+ void *msgdata)
+{
+ E_Move *m = e_mod_move_util_get();
+ E_Manager *man = (E_Manager *)obj;
+ E_Manager_Comp_Source *src = (E_Manager_Comp_Source *)msgdata;
+
+ L(LT_EVENT_X, "[MOVE] ev:E_MSG '%s':'%s'\n", name, info);
+ E_CHECK(m);
+
+ // handle only comp.manager msg
+ if (strncmp(name, "comp.manager", sizeof("comp.manager"))) return;
+
+ if (!strncmp(info, "resize.comp", sizeof("resize.comp")))
+ {
+ L(LT_EVENT_X,
+ "[MOVE] ev:E_MSG %15.15s w:0x%08x manager: %p, comp_src: %p\n",
+ info, e_manager_comp_src_window_get(man,src), man, src);
+ }
+ else if (!strncmp(info, "add.src", sizeof("add.src")))
+ {
+ L(LT_EVENT_X,
+ "[MOVE] ev:E_MSG %15.15s w:0x%08x manager: %p, comp_src: %p\n",
+ info, e_manager_comp_src_window_get(man,src), man, src);
+ }
+ else if (!strncmp(info, "del.src", sizeof("del.src")))
+ {
+ L(LT_EVENT_X,
+ "[MOVE] ev:E_MSG %15.15s w:0x%08x manager: %p, comp_src: %p\n",
+ info, e_manager_comp_src_window_get(man,src), man, src);
+ }
+ else if (!strncmp(info, "config.src", sizeof("config.src")))
+ {
+ L(LT_EVENT_X,
+ "[MOVE] ev:E_MSG %15.15s w:0x%08x manager: %p, comp_src: %p\n",
+ info, e_manager_comp_src_window_get(man,src), man, src);
+ // if Quickpanel is OnScreen then move quickpanel's below window with animation position.
+ if (e_mod_move_quickpanel_visible_check()
+ && !m->qp_scroll_with_clipping
+ && !e_mod_move_quickpanel_objs_animation_state_get(e_mod_move_quickpanel_find()))
+ {
+ e_mod_move_quickpanel_below_window_reset();
+ e_mod_move_quickpanel_objs_move(e_mod_move_quickpanel_find(), 0, 0);
+ }
+
+ // if indicator widget mode, then apply indicator widget visibility, position
+ if (m->elm_indicator_mode) e_mod_move_indicator_widget_apply();
+
+ e_mod_move_mini_apptray_widget_apply();
+ }
+ else if (!strncmp(info, "visibility.src", sizeof("visibility.src")))
+ {
+ L(LT_EVENT_X,
+ "[MOVE] ev:E_MSG %15.15s w:0x%08x manager: %p, comp_src: %p\n",
+ info, e_manager_comp_src_window_get(man,src), man, src);
+ // if Quickpanel is OnScreen then move quickpanel's below window with animation position.
+ if (e_mod_move_quickpanel_visible_check()
+ && !m->qp_scroll_with_clipping
+ && !e_mod_move_quickpanel_objs_animation_state_get(e_mod_move_quickpanel_find()))
+ {
+ e_mod_move_quickpanel_below_window_reset();
+ e_mod_move_quickpanel_objs_move(e_mod_move_quickpanel_find(), 0, 0);
+ }
+
+ // if indicator widget mode, then apply indicator widget visibility, position
+ if (m->elm_indicator_mode) e_mod_move_indicator_widget_apply();
+
+ e_mod_move_mini_apptray_widget_apply();
+ }
+}
+
+static E_Move_Border *
+_e_mod_move_bd_new_intern(E_Move *m,
+ E_Border *bd)
+{
+ E_Move_Border *mb;
+
+ E_CHECK_RETURN(m, 0);
+ E_CHECK_RETURN(bd, 0);
+
+ mb = E_NEW(E_Move_Border, 1);
+ E_CHECK_RETURN(mb, 0);
+
+ mb->bd = bd;
+ mb->m = m;
+ mb->client_win = bd->client.win;
+
+ eina_hash_add(border_clients, e_util_winid_str_get(mb->bd->client.win), mb);
+ mb->dfn = e_object_delfn_add(E_OBJECT(mb->bd), _e_mod_move_object_del, mb);
+
+ eina_hash_add(borders, e_util_winid_str_get(mb->bd->win), mb);
+ mb->inhash = 1;
+ m->borders = eina_inlist_append(m->borders, EINA_INLIST_GET(mb));
+
+ return mb;
+}
+
+static void
+_e_mod_move_bd_add_intern(E_Move_Border *mb)
+{
+ Ecore_X_Window win;
+ Eina_Bool indicator_state;
+ Eina_Bool fullscreen_indicator_show_state;
+ E_Move_Mini_Apptray_State mini_apptray_state = E_MOVE_MINI_APPTRAY_STATE_NONE;
+ int x = 0; int y = 0; int w = 0; int h = 0;
+ int angles[2];
+ E_Move *m = e_mod_move_util_get();
+
+ E_CHECK(mb);
+ E_CHECK(m);
+
+ e_mod_move_border_type_setup(mb);
+
+ // Add Move Control Object
+ _e_mod_move_ctl_obj_add(mb);
+ // Check Window's Input region property and Change Contol Object size with Input Region
+ win = e_mod_move_util_client_xid_get(mb);
+ if (_e_mod_move_prop_window_input_region_get(win, &x, &y, &w, &h))
+ {
+ if (e_mod_move_border_shape_input_new(mb))
+ {
+ e_mod_move_border_shape_input_rect_set(mb, x, y, w, h);
+ e_mod_move_bd_move_ctl_objs_resize(mb, w, h);
+ e_mod_move_bd_move_ctl_objs_move(mb, mb->x + x, mb->y + y);
+ }
+ }
+
+ // Check Window's Contents region property
+ if (_e_mod_move_prop_window_contents_region_get(win, &x, &y, &w, &h))
+ {
+ if (e_mod_move_border_contents_new(mb))
+ e_mod_move_border_contents_rect_set(mb, x, y, w, h);
+ }
+
+ // check client window's indicator state
+ if (_e_mod_move_prop_indicator_state_get(win, &indicator_state))
+ {
+ if (indicator_state)
+ mb->indicator_state = E_MOVE_INDICATOR_STATE_ON;
+ else
+ mb->indicator_state = E_MOVE_INDICATOR_STATE_OFF;
+ }
+ else
+ {
+ mb->indicator_state = E_MOVE_INDICATOR_STATE_NONE;
+ }
+
+ // check client window's indicator type
+ _e_mod_move_prop_indicator_type_get(win, &mb->indicator_type);
+
+ // check client window's fullscreen indicator show state
+ if (_e_mod_move_prop_fullscreen_indicator_show_state_get(win,
+ &fullscreen_indicator_show_state))
+ {
+ if (fullscreen_indicator_show_state)
+ mb->fullscreen_indicator_show_state = E_MOVE_FULLSCREEN_INDICATOR_SHOW_STATE_ON;
+ else
+ mb->fullscreen_indicator_show_state = E_MOVE_FULLSCREEN_INDICATOR_SHOW_STATE_OFF;
+ }
+ else
+ {
+ mb->fullscreen_indicator_show_state = E_MOVE_FULLSCREEN_INDICATOR_SHOW_STATE_NONE;
+ }
+
+ // Check Mini Apptray State
+ if (_e_mod_move_prop_mini_apptray_state_get(win, &mini_apptray_state))
+ {
+ mb->mini_apptray_state = mini_apptray_state;
+ }
+
+ // Check Window's Angle Property
+ if (e_mod_move_util_win_prop_angle_get(win, &angles[0], &angles[1]))
+ angles[0] %= 360;
+ else
+ angles[0] = 0;
+ mb->angle = angles[0];
+
+ // add visibility initial value
+ mb->visibility = E_MOVE_VISIBILITY_STATE_NONE;
+
+ // add internal data
+ mb->data = _e_mod_move_bd_internal_data_add(mb);
+
+ // panel scrollable init
+ e_mod_move_panel_scrollable_state_init(&(mb->panel_scrollable_state));
+ e_mod_move_panel_scrollable_state_get(win, &(mb->panel_scrollable_state));
+
+ // if current window is Indicator, then get indicator_geometry_property.
+ if (TYPE_INDICATOR_CHECK(mb))
+ _e_mod_move_prop_indicator_geometry_get(win, m);
+}
+
+static void
+_e_mod_move_bd_del_intern(E_Move_Border *mb)
+{
+ E_Move *m = NULL;
+ Ecore_X_Window target_win;
+ E_CHECK(mb);
+
+ m = e_mod_move_util_get();
+ E_CHECK(m);
+
+ if (mb->dfn)
+ {
+ if (mb->bd)
+ {
+ if (mb->inhash)
+ eina_hash_del(borders, e_util_winid_str_get(mb->bd->win), mb);
+ eina_hash_del(border_clients, e_util_winid_str_get(mb->bd->client.win), mb);
+ e_object_delfn_del(E_OBJECT(mb->bd), mb->dfn);
+ mb->dfn = NULL;
+ mb->bd = NULL;
+ }
+ }
+
+ if (!m->elm_indicator_mode)
+ {
+ // if indicator destroy and indicator controller is visible then destroy indicator controller
+ if (TYPE_INDICATOR_CHECK(mb))
+ {
+ if (e_mod_move_indicator_controller_state_get(mb->m, &target_win))
+ e_mod_move_indicator_controller_unset(mb->m);
+ }
+ }
+
+ // if indicator controller target win is destroy then destroy indicator controller
+ if (e_mod_move_indicator_controller_state_get(mb->m, &target_win))
+ {
+ if (mb->client_win == target_win)
+ e_mod_move_indicator_controller_unset(mb->m);
+ }
+
+ if (mb->shape_input) e_mod_move_border_shape_input_free(mb);
+ if (mb->contents) e_mod_move_border_contents_free(mb);
+ if (mb->anim_data) _e_mod_move_bd_anim_data_del(mb);
+ if (mb->data) _e_mod_move_bd_internal_data_del(mb);
+ if (mb->flick_data) e_mod_move_flick_data_free(mb);
+ _e_mod_move_bd_obj_del(mb);
+ _e_mod_move_ctl_obj_del(mb);
+ m->borders = eina_inlist_remove(m->borders, EINA_INLIST_GET(mb));
+ memset(mb, 0, sizeof(E_Move_Border));
+ free(mb);
+}
+
+static void
+_e_mod_move_bd_show_intern(E_Move_Border *mb)
+{
+ E_CHECK(mb);
+
+ if (mb->visible) return;
+ mb->visible = 1;
+
+ e_mod_move_bd_move_ctl_objs_show(mb);
+
+ // If Apptray is shown, then move out of screen.
+ if (TYPE_APPTRAY_CHECK(mb))
+ e_mod_move_apptray_e_border_move(mb, -10000, -10000);
+ // If MiniApptray is shown, then move out of screen.
+ if (TYPE_MINI_APPTRAY_CHECK(mb))
+ e_mod_move_mini_apptray_e_border_move(mb, -10000, -10000);
+ // If Indicator Window is shown by user application, then move out of screen.
+ // later indicator window is controlled by window manager
+ if (TYPE_INDICATOR_CHECK(mb))
+ e_mod_move_indicator_e_border_move(mb, -10000, -10000);
+ // If Quickpanel is shown, then move out of screen.
+ if (TYPE_QUICKPANEL_CHECK(mb))
+ e_mod_move_quickpanel_e_border_move(mb, -10000, -10000);
+}
+
+static void
+_e_mod_move_bd_hide_intern(E_Move_Border *mb)
+{
+ E_CHECK(mb);
+ if (!mb->visible) return;
+
+ mb->visible = 0;
+ e_mod_move_bd_move_ctl_objs_hide(mb);
+}
+
+static void
+_e_mod_move_bd_move_resize_intern(E_Move_Border *mb,
+ int x,
+ int y,
+ int w,
+ int h)
+{
+ E_Move *m = NULL;
+ int shape_input_x = 0; int shape_input_y = 0;
+ int shape_input_w = 0; int shape_input_h = 0;
+
+ E_CHECK(mb);
+
+ m = e_mod_move_util_get();
+ E_CHECK(m);
+
+ if (!((w == mb->w) && (h == mb->h)))
+ {
+ mb->w = w;
+ mb->h = h;
+
+ if (TYPE_INDICATOR_CHECK(mb) && (mb->shape_input != NULL))
+ e_mod_move_border_shape_input_rect_set(mb, 0, 0, mb->w, mb->h);
+
+ if (TYPE_INDICATOR_CHECK(mb))
+ e_mod_move_bd_move_ctl_objs_resize(mb, mb->w, mb->h);
+ }
+
+ if (!((x == mb->x) && (y == mb->y)))
+ {
+ mb->x = x;
+ mb->y = y;
+
+ if (e_mod_move_border_shape_input_rect_get(mb,
+ &shape_input_x,
+ &shape_input_y,
+ &shape_input_w,
+ &shape_input_h))
+ {
+ e_mod_move_bd_move_ctl_objs_move(mb,
+ mb->x + shape_input_x,
+ mb->y + shape_input_y);
+ }
+ }
+
+ if (!m->elm_indicator_mode)
+ {
+ // update indicator_contoller's evas_object size & shape mask region
+ if (TYPE_INDICATOR_CHECK(mb))
+ {
+ Ecore_X_Window target_win;
+ if (e_mod_move_indicator_controller_state_get(mb->m, &target_win))
+ e_mod_move_indicator_controller_update(mb->m);
+ }
+ }
+
+}
+
+static void
+_e_mod_move_bd_stack_intern(E_Move_Border *mb1,
+ E_Move_Border *mb2,
+ E_Move_Stacking type)
+{
+ E_CHECK(mb1);
+ switch (type)
+ {
+ case E_MOVE_STACKING_RAISE_ABOVE:
+ E_CHECK(mb2);
+ mb1->m->borders = eina_inlist_remove(mb1->m->borders,
+ EINA_INLIST_GET(mb1));
+ mb2->m->borders = eina_inlist_append_relative(mb2->m->borders,
+ EINA_INLIST_GET(mb1),
+ EINA_INLIST_GET(mb2));
+ break;
+ case E_MOVE_STACKING_LOWER_BELOW:
+ E_CHECK(mb2);
+ mb1->m->borders = eina_inlist_remove(mb1->m->borders,
+ EINA_INLIST_GET(mb1));
+ mb2->m->borders = eina_inlist_prepend_relative(mb2->m->borders,
+ EINA_INLIST_GET(mb1),
+ EINA_INLIST_GET(mb2));
+ break;
+ case E_MOVE_STACKING_RAISE:
+ mb1->m->borders = eina_inlist_remove(mb1->m->borders,
+ EINA_INLIST_GET(mb1));
+ mb1->m->borders = eina_inlist_append(mb1->m->borders,
+ EINA_INLIST_GET(mb1));
+ break;
+ case E_MOVE_STACKING_LOWER:
+ mb1->m->borders = eina_inlist_remove(mb1->m->borders,
+ EINA_INLIST_GET(mb1));
+ mb1->m->borders = eina_inlist_prepend(mb1->m->borders,
+ EINA_INLIST_GET(mb1));
+ break;
+ case E_MOVE_STACKING_NONE:
+ default:
+ break;
+ }
+
+ if (TYPE_APPTRAY_CHECK(mb1))
+ e_mod_move_apptray_restack_post_process(mb1);
+}
+
+static void
+_e_mod_move_object_del(void *data,
+ void *obj)
+{
+ E_Move_Border *mb = (E_Move_Border *)data;
+ E_CHECK(mb);
+ E_CHECK(mb->bd);
+
+ if (obj == mb->bd)
+ {
+ if (mb->inhash)
+ eina_hash_del(borders, e_util_winid_str_get(mb->bd->win), mb);
+ eina_hash_del(border_clients,
+ e_util_winid_str_get(mb->bd->client.win), mb);
+ e_mod_move_bd_move_objs_data_del(mb, "move_bd");
+ mb->bd = NULL;
+ }
+ if (mb->dfn)
+ {
+ e_object_delfn_del(obj, mb->dfn);
+ mb->dfn = NULL;
+ }
+
+ _e_mod_move_bd_del_intern(mb);
+}
+
+static void
+_e_mod_move_bd_obj_del(E_Move_Border *mb)
+{
+ E_CHECK(mb);
+ e_mod_move_bd_move_objs_del(mb, mb->objs);
+}
+
+static void
+_e_mod_move_ctl_obj_add(E_Move_Border *mb)
+{
+ E_CHECK(mb);
+ if (TYPE_INDICATOR_CHECK(mb)
+ || TYPE_APPTRAY_CHECK(mb)
+ || TYPE_QUICKPANEL_CHECK(mb)
+ || TYPE_MINI_APPTRAY_CHECK(mb))
+ {
+ E_Move_Control_Object *mco = NULL;
+ Eina_List *l;
+
+ mb->ctl_objs = e_mod_move_bd_move_ctl_objs_add(mb);
+
+ if (!mb->ctl_objs) return;
+
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco)
+ {
+ if (!mco) continue;
+ _e_mod_move_ctl_obj_event_setup(mb, mco);
+ }
+ }
+}
+
+static void
+_e_mod_move_ctl_obj_del(E_Move_Border *mb)
+{
+ E_CHECK(mb);
+ e_mod_move_bd_move_ctl_objs_del(mb, mb->ctl_objs);
+}
+
+static void
+_e_mod_move_ctl_obj_event_setup(E_Move_Border *mb,
+ E_Move_Control_Object *mco)
+{
+ E_CHECK(mb);
+ E_CHECK(mco);
+ /* ADD OBJ Event handler ( evas object move / down/ up event handler, with E_MOVE_EVENT ) */
+ if (TYPE_INDICATOR_CHECK(mb))
+ e_mod_move_indicator_ctl_obj_event_setup(mb, mco);
+ else if (TYPE_APPTRAY_CHECK(mb))
+ e_mod_move_apptray_ctl_obj_event_setup(mb, mco);
+ else if (TYPE_QUICKPANEL_CHECK(mb))
+ e_mod_move_quickpanel_ctl_obj_event_setup(mb, mco);
+ else if (TYPE_MINI_APPTRAY_CHECK(mb))
+ e_mod_move_mini_apptray_ctl_obj_event_setup(mb, mco);
+}
+
+static void*
+_e_mod_move_bd_internal_data_add(E_Move_Border *mb)
+{
+ void *ret = NULL;
+ E_CHECK_RETURN(mb, NULL);
+ if (TYPE_APPTRAY_CHECK(mb))
+ ret = e_mod_move_apptray_internal_data_add(mb);
+ else if (TYPE_QUICKPANEL_CHECK(mb))
+ ret = e_mod_move_quickpanel_internal_data_add(mb);
+ else if (TYPE_INDICATOR_CHECK(mb))
+ ret = e_mod_move_indicator_internal_data_add(mb);
+ else if (TYPE_MINI_APPTRAY_CHECK(mb))
+ ret = e_mod_move_mini_apptray_internal_data_add(mb);
+ return ret;
+}
+
+static Eina_Bool
+_e_mod_move_bd_internal_data_del(E_Move_Border *mb)
+{
+ Eina_Bool ret = EINA_FALSE;
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ if (TYPE_APPTRAY_CHECK(mb))
+ ret = e_mod_move_apptray_internal_data_del(mb);
+ else if (TYPE_QUICKPANEL_CHECK(mb))
+ ret = e_mod_move_quickpanel_internal_data_del(mb);
+ else if (TYPE_INDICATOR_CHECK(mb))
+ ret = e_mod_move_indicator_internal_data_del(mb);
+ else if (TYPE_MINI_APPTRAY_CHECK(mb))
+ ret = e_mod_move_mini_apptray_internal_data_del(mb);
+ return ret;
+}
+
+static Eina_Bool
+_e_mod_move_bd_anim_data_del(E_Move_Border *mb)
+{
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ if (TYPE_APPTRAY_CHECK(mb))
+ {
+ if (e_mod_move_apptray_objs_animation_state_get(mb))
+ {
+ e_mod_move_apptray_objs_animation_stop(mb);
+ e_mod_move_apptray_objs_animation_clear(mb);
+ }
+ }
+ else if (TYPE_QUICKPANEL_CHECK(mb))
+ {
+ if (e_mod_move_quickpanel_objs_animation_state_get(mb))
+ {
+ e_mod_move_quickpanel_objs_animation_stop(mb);
+ e_mod_move_quickpanel_objs_animation_clear(mb);
+ }
+ }
+ else if (TYPE_MINI_APPTRAY_CHECK(mb))
+ {
+ if (e_mod_move_mini_apptray_objs_animation_state_get(mb))
+ {
+ e_mod_move_mini_apptray_objs_animation_stop(mb);
+ e_mod_move_mini_apptray_objs_animation_clear(mb);
+ }
+ }
+ return EINA_TRUE;;
+}
+
+static Eina_Bool
+_e_mod_move_prop_window_input_region_get(Ecore_X_Window win,
+ int *x,
+ int *y,
+ int *w,
+ int *h)
+{
+ int ret = -1;
+ unsigned int val[4] = { 0, 0, 0, 0};
+
+ E_CHECK_RETURN(x, EINA_FALSE);
+ E_CHECK_RETURN(y, EINA_FALSE);
+ E_CHECK_RETURN(w, EINA_FALSE);
+ E_CHECK_RETURN(h, EINA_FALSE);
+
+ ret = ecore_x_window_prop_card32_get(win,
+ ATOM_CM_WINDOW_INPUT_REGION,
+ val, 4);
+ if (ret == -1) return EINA_FALSE;
+
+ *x = val[0];
+ *y = val[1];
+ *w = val[2];
+ *h = val[3];
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_prop_window_contents_region_get(Ecore_X_Window win,
+ int *x,
+ int *y,
+ int *w,
+ int *h)
+{
+ int ret = -1;
+ unsigned int val[4] = { 0, 0, 0, 0};
+
+ E_CHECK_RETURN(x, EINA_FALSE);
+ E_CHECK_RETURN(y, EINA_FALSE);
+ E_CHECK_RETURN(w, EINA_FALSE);
+ E_CHECK_RETURN(h, EINA_FALSE);
+
+ ret = ecore_x_window_prop_card32_get(win,
+ ATOM_CM_WINDOW_CONTENTS_REGION,
+ val, 4);
+ if (ret == -1) return EINA_FALSE;
+
+ *x = val[0];
+ *y = val[1];
+ *w = val[2];
+ *h = val[3];
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_prop_active_window_get(Ecore_X_Window *active_win)
+{
+ int ret = -1;
+ Ecore_X_Window win;
+ E_Move *m = NULL;
+
+ E_CHECK_RETURN(active_win, EINA_FALSE);
+
+ m = e_mod_move_util_get();
+ E_CHECK_RETURN(m, EINA_FALSE);
+
+ ret = ecore_x_window_prop_window_get(m->man->root,
+ ECORE_X_ATOM_NET_ACTIVE_WINDOW,
+ &win, 1);
+
+ if (ret == -1) return EINA_FALSE;
+
+ *active_win = win;
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_prop_indicator_state_get(Ecore_X_Window win,
+ Eina_Bool *state)
+{
+ Eina_Bool ret = EINA_FALSE;
+ Eina_Bool ret_state = EINA_FALSE;
+ Ecore_X_Illume_Indicator_State indicator_state;
+
+ E_CHECK_RETURN(state, EINA_FALSE);
+
+ indicator_state = ecore_x_e_illume_indicator_state_get(win);
+
+ if (indicator_state == ECORE_X_ILLUME_INDICATOR_STATE_ON)
+ {
+ ret_state = EINA_TRUE;
+ ret = EINA_TRUE;
+ }
+ else if (indicator_state == ECORE_X_ILLUME_INDICATOR_STATE_OFF)
+ {
+ ret_state = EINA_FALSE;
+ ret = EINA_TRUE;
+ }
+ else
+ ret = EINA_FALSE;
+
+ if (ret) *state = ret_state;
+
+ return ret;
+}
+
+static Eina_Bool
+_e_mod_move_prop_mini_apptray_state_get(Ecore_X_Window win,
+ E_Move_Mini_Apptray_State *state)
+{
+ int ret = -1;
+ unsigned int mini_apptray_state = 0;
+ Eina_Bool ret_val = EINA_FALSE;
+ E_Move_Mini_Apptray_State ret_state = E_MOVE_MINI_APPTRAY_STATE_NONE;
+
+ E_CHECK_RETURN(state, EINA_FALSE);
+
+ ret = ecore_x_window_prop_card32_get(win,
+ ATOM_MV_APPTRAY_STATE,
+ &mini_apptray_state,
+ 1);
+
+ if (ret == -1)
+ ret_val = EINA_FALSE;
+ else
+ {
+ ret_val = EINA_TRUE;
+ if (mini_apptray_state == 0)
+ ret_state = E_MOVE_MINI_APPTRAY_STATE_OFF;
+ else if (mini_apptray_state == 1)
+ ret_state = E_MOVE_MINI_APPTRAY_STATE_ON;
+ else
+ ret_state = E_MOVE_MINI_APPTRAY_STATE_NONE;
+ }
+
+ if (ret_val) *state = ret_state;
+
+ return ret_val;
+}
+
+static Eina_Bool
+_e_mod_move_prop_indicator_type_get(Ecore_X_Window win,
+ E_Move_Indicator_Type *type)
+{
+ Ecore_X_Illume_Indicator_Type_Mode indicator_type;
+ E_Move_Indicator_Type ret_type;
+
+ E_CHECK_RETURN(type, EINA_FALSE);
+
+ indicator_type = ecore_x_e_illume_indicator_type_get(win);
+
+ if (indicator_type == ECORE_X_ILLUME_INDICATOR_TYPE_1)
+ ret_type = E_MOVE_INDICATOR_TYPE_1;
+ else if (indicator_type == ECORE_X_ILLUME_INDICATOR_TYPE_2)
+ ret_type = E_MOVE_INDICATOR_TYPE_2;
+ else
+ ret_type = E_MOVE_INDICATOR_TYPE_NONE;
+
+ *type = ret_type;
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_prop_fullscreen_indicator_show_state_get(Ecore_X_Window win,
+ Eina_Bool *state)
+{
+ int ret = -1;
+ unsigned int fullscreen_indicator_show_state = 0;
+ Eina_Bool ret_state = EINA_FALSE;
+ Eina_Bool ret_val = EINA_FALSE;
+
+ E_CHECK_RETURN(state, EINA_FALSE);
+
+ ret = ecore_x_window_prop_card32_get(win,
+ ATOM_MV_FULLSCREEN_INDICATOR_SHOW,
+ &fullscreen_indicator_show_state,
+ 1);
+
+ if (ret == -1)
+ ret_val = EINA_FALSE;
+ else
+ {
+ ret_val = EINA_TRUE;
+ if (fullscreen_indicator_show_state > 0)
+ ret_state = EINA_TRUE;
+ else
+ ret_state = EINA_FALSE;
+ }
+
+ if (ret_val) *state = ret_state;
+
+ return ret_val;
+}
+
+static Eina_Bool
+_e_mod_move_prop_indicator_geometry_get(Ecore_X_Window win,
+ E_Move *m)
+{
+ int ret = -1;
+ unsigned int val[16] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+
+ E_CHECK_RETURN(m, EINA_FALSE);
+
+ ret = ecore_x_window_prop_card32_get(win,
+ ATOM_MV_INDICATOR_GEOMETRY,
+ val, 16);
+ if (ret == -1) return EINA_FALSE;
+
+ m->indicator_widget_geometry[E_MOVE_ANGLE_0 ].x = val[0];
+ m->indicator_widget_geometry[E_MOVE_ANGLE_0 ].y = val[1];
+ m->indicator_widget_geometry[E_MOVE_ANGLE_0 ].w = val[2];
+ m->indicator_widget_geometry[E_MOVE_ANGLE_0 ].h = val[3];
+ m->indicator_widget_geometry[E_MOVE_ANGLE_90 ].x = val[4];
+ m->indicator_widget_geometry[E_MOVE_ANGLE_90 ].y = val[5];
+ m->indicator_widget_geometry[E_MOVE_ANGLE_90 ].w = val[6];
+ m->indicator_widget_geometry[E_MOVE_ANGLE_90 ].h = val[7];
+ m->indicator_widget_geometry[E_MOVE_ANGLE_180].x = val[8];
+ m->indicator_widget_geometry[E_MOVE_ANGLE_180].y = val[9];
+ m->indicator_widget_geometry[E_MOVE_ANGLE_180].w = val[10];
+ m->indicator_widget_geometry[E_MOVE_ANGLE_180].h = val[11];
+ m->indicator_widget_geometry[E_MOVE_ANGLE_270].x = val[12];
+ m->indicator_widget_geometry[E_MOVE_ANGLE_270].y = val[13];
+ m->indicator_widget_geometry[E_MOVE_ANGLE_270].w = val[14];
+ m->indicator_widget_geometry[E_MOVE_ANGLE_270].h = val[15];
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_prop_window_input_region(Ecore_X_Event_Window_Property *ev)
+{
+ E_Move_Border *mb = NULL;
+ Ecore_X_Window win;
+ int x = 0; int y = 0; int w = 0; int h = 0;
+
+ mb = _e_mod_move_border_client_find(ev->win);
+ E_CHECK_RETURN(mb, EINA_FALSE);
+
+ if (!mb->shape_input) e_mod_move_border_shape_input_new(mb);
+ E_CHECK_RETURN(mb->shape_input, EINA_FALSE);
+
+ win = e_mod_move_util_client_xid_get(mb);
+
+ if (!_e_mod_move_prop_window_input_region_get(win, &x, &y, &w, &h))
+ return EINA_FALSE;
+
+ e_mod_move_border_shape_input_rect_set(mb, x, y, w, h);
+ if (e_mod_move_border_shape_input_rect_get(mb, &x, &y, &w, &h))
+ {
+ e_mod_move_bd_move_ctl_objs_resize(mb, w, h);
+ e_mod_move_bd_move_ctl_objs_move(mb, mb->x + x, mb->y + y);
+ }
+
+ if (TYPE_QUICKPANEL_CHECK(mb))
+ e_mod_move_quickpanel_window_input_region_change_post_job(mb);
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_prop_window_contents_region(Ecore_X_Event_Window_Property *ev)
+{
+ E_Move *m = NULL;
+ E_Move_Border *mb = NULL;
+ Ecore_X_Window win;
+ int x = 0; int y = 0; int w = 0; int h = 0;
+
+ mb = _e_mod_move_border_client_find(ev->win);
+ E_CHECK_RETURN(mb, EINA_FALSE);
+
+ if (!mb->contents) e_mod_move_border_contents_new(mb);
+ E_CHECK_RETURN(mb->contents, EINA_FALSE);
+
+ m = mb->m;
+ win = e_mod_move_util_client_xid_get(mb);
+
+ if (!_e_mod_move_prop_window_contents_region_get(win, &x, &y, &w, &h))
+ return EINA_FALSE;
+
+ e_mod_move_border_contents_rect_set(mb, x, y, w, h);
+
+ if ( TYPE_QUICKPANEL_CHECK(mb)
+ && REGION_INSIDE_ZONE(mb, mb->bd->zone)
+ && !m->qp_scroll_with_clipping
+ && (mb->visible))
+ {
+ e_mod_move_quickpanel_objs_move(mb, 0, 0);
+ }
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_prop_active_window_internal_quickpanel_move(E_Move_Border *mb,
+ int x,
+ int y)
+{
+ E_Move *m = NULL;
+ E_Zone *zone = NULL;
+ int angle = 0;
+ int ax = 0, ay = 0; // animation x, y
+
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_QUICKPANEL_CHECK(mb),EINA_FALSE);
+
+ m = mb->m;
+
+ if (e_mod_move_quickpanel_click_get()) // if apptray process event, do event clear
+ e_mod_move_quickpanel_event_clear();
+ if (e_mod_move_quickpanel_objs_animation_state_get(mb))
+ {
+ e_mod_move_quickpanel_objs_animation_stop(mb);
+ e_mod_move_quickpanel_objs_animation_clear(mb);
+ }
+ e_mod_move_quickpanel_objs_add(mb);
+ e_mod_move_quickpanel_e_border_move(mb, x, y);
+
+ if (m->qp_scroll_with_clipping)
+ {
+ zone = mb->bd->zone;
+ angle = mb->angle;
+
+ switch (angle)
+ {
+ case 0:
+ case 90:
+ default:
+ ax = zone->x; ay = zone->y;
+ break;
+ case 180:
+ case 270:
+ ax = zone->x + mb->w; ay = zone->y + mb->h;
+ break;
+ }
+ }
+ else
+ {
+ ax = x; ay = y;
+ }
+
+ e_mod_move_quickpanel_objs_animation_move(mb, ax, ay);
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_prop_active_window(Ecore_X_Event_Window_Property *ev)
+{
+ Ecore_X_Window active_win;
+ E_Move_Border *qp_mb = NULL;
+ E_Move_Border *active_mb = NULL;
+ int angles[2];
+ Ecore_X_Window win;
+ E_Zone *zone = NULL;
+ int x, y;
+ x = 0; y = 0;
+ L(LT_EVENT_X,
+ "[MOVE] ev:%15.15s w:0x%07x %s():%d\n",
+ "X_PROPERTY",ev->win, __func__, __LINE__);
+
+ if (_e_mod_move_prop_active_window_get(&active_win))
+ {
+ active_mb = _e_mod_move_border_client_find(active_win);
+ E_CHECK_RETURN(active_mb, EINA_FALSE);
+
+ if ((qp_mb = e_mod_move_quickpanel_find()))
+ {
+ if ( (qp_mb->visible) // quickpanel is vislble
+ && (REGION_INSIDE_ZONE(qp_mb, qp_mb->bd->zone)) //quickpanel is on screen
+ && (REGION_INSIDE_ZONE(active_mb, qp_mb->bd->zone))) // active_win is on quickpanel's zone
+ {
+ // do hide quickpanel
+ // if it is do animation, do stop animation and delete animation
+ win = e_mod_move_util_client_xid_get(qp_mb);
+ if (e_mod_move_util_win_prop_angle_get(win, &angles[0], &angles[1]))
+ angles[0] %= 360;
+ else
+ angles[0] = 0;
+ zone = qp_mb->bd->zone;
+
+ switch (angles[0])
+ {
+ case 0:
+ x = 0;
+ y = qp_mb->h * -1;
+ break;
+ case 90:
+ x = qp_mb->w * -1;
+ y = 0;
+ break;
+ case 180:
+ x = 0;
+ y = zone->h;
+ break;
+ case 270:
+ x = zone->w;
+ y = 0;
+ break;
+ default :
+ break;
+ }
+ _e_mod_move_prop_active_window_internal_quickpanel_move(qp_mb,
+ x,
+ y);
+ L(LT_EVENT_X,
+ "[MOVE] ev:%15.15s Apptray Hide %s():%d\n",
+ "X_PROPERTY", __func__, __LINE__);
+ }
+ }
+ }
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_prop_indicator_state(Ecore_X_Event_Window_Property *ev)
+{
+ Ecore_X_Window win;
+ Ecore_X_Window target_win;
+ Eina_Bool indicator_state;
+ E_Move_Border *mb = NULL;
+ E_Move *m = NULL;
+
+ E_CHECK_RETURN(ev, EINA_FALSE);
+ win = ev->win;
+
+ m = e_mod_move_util_get();
+ E_CHECK_RETURN(m, EINA_FALSE);
+
+ mb = _e_mod_move_border_client_find(ev->win);
+ E_CHECK_RETURN(mb, EINA_FALSE);
+
+ if (_e_mod_move_prop_indicator_state_get(ev->win, &indicator_state))
+ {
+ if (indicator_state)
+ {
+ mb->indicator_state = E_MOVE_INDICATOR_STATE_ON;
+
+ if ((!m->elm_indicator_mode)
+ && e_mod_move_indicator_controller_unset_policy_check(mb))
+ {
+ e_mod_move_indicator_controller_unset(mb->m);
+ }
+ }
+ else
+ {
+ mb->indicator_state = E_MOVE_INDICATOR_STATE_OFF;
+
+ if ((!m->elm_indicator_mode)
+ &&e_mod_move_indicator_controller_set_policy_check(mb))
+ {
+ if (e_mod_move_indicator_controller_state_get(mb->m, &target_win))
+ e_mod_move_indicator_controller_unset(mb->m);
+ e_mod_move_indicator_controller_set(mb);
+ }
+ }
+ // control indicator widget state.
+ if (m->elm_indicator_mode)
+ e_mod_move_indicator_widget_state_change(ev->win, indicator_state);
+ }
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_prop_mini_apptray_state(Ecore_X_Event_Window_Property *ev)
+{
+ Ecore_X_Window win;
+ E_Move_Mini_Apptray_State mini_apptray_state = E_MOVE_MINI_APPTRAY_STATE_NONE;
+ E_Move_Border *mb = NULL;
+ E_Move *m = NULL;
+
+ E_CHECK_RETURN(ev, EINA_FALSE);
+ win = ev->win;
+
+ m = e_mod_move_util_get();
+ E_CHECK_RETURN(m, EINA_FALSE);
+
+ mb = _e_mod_move_border_client_find(ev->win);
+ E_CHECK_RETURN(mb, EINA_FALSE);
+
+ if (_e_mod_move_prop_mini_apptray_state_get(ev->win, &mini_apptray_state))
+ {
+ if (mb->mini_apptray_state != mini_apptray_state)
+ {
+ mb->mini_apptray_state = mini_apptray_state;
+ e_mod_move_mini_apptray_widget_apply();
+ }
+ }
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_prop_indicator_type(Ecore_X_Event_Window_Property *ev)
+{
+ Ecore_X_Window win;
+ E_Move_Border *mb = NULL;
+ E_Move *m = NULL;
+ E_Move_Indicator_Type indicator_type = E_MOVE_INDICATOR_TYPE_NONE;
+
+ E_CHECK_RETURN(ev, EINA_FALSE);
+ win = ev->win;
+
+ m = e_mod_move_util_get();
+ E_CHECK_RETURN(m, EINA_FALSE);
+
+ mb = _e_mod_move_border_client_find(ev->win);
+ E_CHECK_RETURN(mb, EINA_FALSE);
+
+ if (_e_mod_move_prop_indicator_type_get(ev->win, &indicator_type))
+ {
+ mb->indicator_type = indicator_type;
+
+ // control indicator widget state
+ if (m->elm_indicator_mode)
+ e_mod_move_indicator_widget_type_change(ev->win, indicator_type);
+ }
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_prop_fullscreen_indicator_show_state(Ecore_X_Event_Window_Property *ev)
+{
+ Ecore_X_Window win;
+ Ecore_X_Window target_win;
+ Eina_Bool fullscreen_indicator_show_state;
+ E_Move_Border *mb = NULL;
+ E_Move *m = NULL;
+
+ E_CHECK_RETURN(ev, EINA_FALSE);
+ win = ev->win;
+
+ m = e_mod_move_util_get();
+ E_CHECK_RETURN(m, EINA_FALSE);
+
+ mb = _e_mod_move_border_client_find(ev->win);
+ E_CHECK_RETURN(mb, EINA_FALSE);
+
+ if (_e_mod_move_prop_fullscreen_indicator_show_state_get(ev->win,
+ &fullscreen_indicator_show_state))
+ {
+ if (fullscreen_indicator_show_state)
+ {
+ mb->fullscreen_indicator_show_state = E_MOVE_FULLSCREEN_INDICATOR_SHOW_STATE_ON;
+
+ if ((!m->elm_indicator_mode)
+ &&e_mod_move_indicator_controller_set_policy_check(mb))
+ {
+ if (e_mod_move_indicator_controller_state_get(mb->m, &target_win))
+ e_mod_move_indicator_controller_unset(mb->m);
+ e_mod_move_indicator_controller_set(mb);
+ }
+ }
+ else
+ {
+ mb->fullscreen_indicator_show_state = E_MOVE_FULLSCREEN_INDICATOR_SHOW_STATE_OFF;
+
+ if ((!m->elm_indicator_mode)
+ &&e_mod_move_indicator_controller_unset_policy_check(mb))
+ {
+ e_mod_move_indicator_controller_unset(mb->m);
+ }
+ }
+ }
+
+ return EINA_TRUE;
+
+}
+
+static Eina_Bool
+_e_mod_move_prop_rotate_window_angle(Ecore_X_Event_Window_Property *ev)
+{
+ E_Move *m = NULL;
+ E_Move_Border *mb = NULL;
+ Ecore_X_Window win;
+ int angles[2];
+
+ m = e_mod_move_util_get();
+ E_CHECK_RETURN(m, EINA_FALSE);
+
+ mb = _e_mod_move_border_client_find(ev->win);
+ E_CHECK_RETURN(mb, EINA_FALSE);
+
+ win = e_mod_move_util_client_xid_get(mb);
+ if (e_mod_move_util_win_prop_angle_get(win, &angles[0], &angles[1]))
+ angles[0] %= 360;
+ else
+ angles[0] = 0;
+
+ mb->angle = angles[0];
+
+ if (!m->elm_indicator_mode)
+ {
+ if (TYPE_INDICATOR_CHECK(mb))
+ _e_mod_move_outside_zone_border_position_update(mb);
+ }
+
+ // indicator widget angle change method
+ if (m->elm_indicator_mode)
+ {
+ e_mod_move_indicator_widget_angle_change(ev->win);
+ e_mod_move_indicator_widget_angle_change_post_job();
+ }
+
+ e_mod_move_mini_apptray_widget_angle_change(ev->win);
+ e_mod_move_mini_apptray_widget_angle_change_post_job();
+
+ if (TYPE_QUICKPANEL_CHECK(mb))
+ e_mod_move_quickpanel_angle_change_post_job(mb);
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_prop_rotate_root_angle(Ecore_X_Event_Window_Property *ev)
+{
+ E_Move *m = NULL;
+
+ m = e_mod_move_util_get();
+ E_CHECK_RETURN(m, EINA_FALSE);
+
+ // if mini_apptray exist, then apply global input region
+ E_CHECK_RETURN(e_mod_move_mini_apptray_find(), EINA_TRUE);
+ E_CHECK_RETURN(e_mod_move_mini_apptray_widget_get(), EINA_TRUE);
+
+ switch (e_mod_move_util_root_angle_get())
+ {
+ case 90:
+ case 180:
+ case 270:
+ // currently, support angle 0 only. because, application is not ready yet.
+ e_manager_comp_input_region_set(m->man, 0, 0, 0, 0);
+ break;
+ case 0:
+ default :
+ e_manager_comp_input_region_set(m->man,
+ m->mini_apptray_widget_geometry[E_MOVE_ANGLE_0].x,
+ m->mini_apptray_widget_geometry[E_MOVE_ANGLE_0].y,
+ m->mini_apptray_widget_geometry[E_MOVE_ANGLE_0].w,
+ m->mini_apptray_widget_geometry[E_MOVE_ANGLE_0].h);
+ break;
+ }
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_prop_panel_scrollable_state(Ecore_X_Event_Window_Property *ev)
+{
+ Ecore_X_Window win;
+ E_Move_Border *mb = NULL;
+
+ E_CHECK_RETURN(ev, EINA_FALSE);
+ win = ev->win;
+
+ mb = _e_mod_move_border_client_find(win);
+ E_CHECK_RETURN(mb, EINA_FALSE);
+
+ return e_mod_move_panel_scrollable_state_get(win, &(mb->panel_scrollable_state));
+}
+
+static Eina_Bool
+_e_mod_move_prop_indicator_geometry(Ecore_X_Event_Window_Property *ev)
+{
+ E_Move *m = NULL;
+ E_Move_Border *mb = NULL;
+ Ecore_X_Window win;
+
+ E_CHECK_RETURN(ev, EINA_FALSE);
+
+ m = e_mod_move_util_get();
+ E_CHECK_RETURN(m, EINA_FALSE);
+
+ mb = e_mod_move_border_client_find(ev->win);
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_INDICATOR_CHECK(mb), EINA_FALSE);
+
+ win = e_mod_move_util_client_xid_get(mb);
+
+ return _e_mod_move_prop_indicator_geometry_get(win, m);
+}
+
+static Eina_Bool
+_e_mod_move_msg_window_show_internal_quickpanel_check(E_Move_Border *mb)
+{
+ E_Move *m = e_mod_move_util_get();;
+ E_CHECK_RETURN(m, EINA_FALSE);
+
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_QUICKPANEL_CHECK(mb), EINA_FALSE);
+ if ((!m->elm_indicator_mode) && e_mod_move_indicator_click_get()) // if indicator process event, do event clear
+ e_mod_move_indicator_event_clear();
+ if ((m->elm_indicator_mode)
+ && e_mod_move_indicator_widget_click_get(e_mod_move_indicator_widget_get())) // if indicator widget process event, do event clear
+ {
+ e_mod_move_indicator_widget_event_clear(e_mod_move_indicator_widget_get());
+ }
+ if (e_mod_move_quickpanel_click_get()) // if quickpanel process event, do event clear
+ e_mod_move_quickpanel_event_clear();
+ if (e_mod_move_quickpanel_objs_animation_state_get(mb))
+ {
+ e_mod_move_quickpanel_objs_animation_stop(mb);
+ e_mod_move_quickpanel_objs_animation_clear(mb);
+ }
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_msg_window_show_internal_apptray_check(E_Move_Border *mb)
+{
+ E_Move *m = e_mod_move_util_get();;
+ E_CHECK_RETURN(m, EINA_FALSE);
+
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_APPTRAY_CHECK(mb), EINA_FALSE);
+ if ((!m->elm_indicator_mode) && e_mod_move_indicator_click_get()) // if indicator process event, do event clear
+ e_mod_move_indicator_event_clear();
+ if ((m->elm_indicator_mode)
+ && e_mod_move_indicator_widget_click_get(e_mod_move_indicator_widget_get())) // if indicator widget process event, do event clear
+ {
+ e_mod_move_indicator_widget_event_clear(e_mod_move_indicator_widget_get());
+ }
+ if (e_mod_move_apptray_click_get()) // if apptray process event, do event clear
+ e_mod_move_apptray_event_clear();
+ if (e_mod_move_apptray_objs_animation_state_get(mb))
+ {
+ e_mod_move_apptray_objs_animation_stop(mb);
+ e_mod_move_apptray_objs_animation_clear(mb);
+ }
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_msg_window_show_internal_mini_apptray_check(E_Move_Border *mb)
+{
+ E_Move *m = e_mod_move_util_get();;
+ E_CHECK_RETURN(m, EINA_FALSE);
+
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_MINI_APPTRAY_CHECK(mb), EINA_FALSE);
+
+ if (e_mod_move_mini_apptray_widget_click_get(e_mod_move_mini_apptray_widget_get())) // if mini_apptray widget process event, do event clear
+ {
+ e_mod_move_mini_apptray_widget_event_clear(e_mod_move_mini_apptray_widget_get());
+ }
+ if (e_mod_move_mini_apptray_click_get()) // if mini_apptray process event, do event clear
+ e_mod_move_mini_apptray_event_clear();
+ if (e_mod_move_mini_apptray_objs_animation_state_get(mb))
+ {
+ e_mod_move_mini_apptray_objs_animation_stop(mb);
+ e_mod_move_mini_apptray_objs_animation_clear(mb);
+ }
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_msg_window_show(Ecore_X_Event_Client_Message *ev)
+{
+ E_Move *m = NULL;
+ E_Move_Border *mb = NULL;
+ E_Move_Border *at_mb = NULL;
+ E_Move_Border *qp_mb = NULL;
+ E_Move_Border *mini_at_mb = NULL;
+ E_Move_Border *fullscr_mb = NULL;
+ Ecore_X_Window win;
+ E_Zone *zone = NULL;
+ Eina_Bool state;
+ Eina_Bool comp_obj_visible = EINA_FALSE;
+ int open, angles[2];
+ int x, y;
+ int mx = 0, my = 0, ax = 0, ay = 0; // move x / y , animation x / y
+ x = 0; y = 0;
+
+ E_CHECK_RETURN(ev, EINA_FALSE);
+
+ open = !(!(ev->data.l[1]));
+ mb = _e_mod_move_border_client_find(ev->data.l[0]);
+ E_CHECK_RETURN(mb, EINA_FALSE);
+
+ m = e_mod_move_util_get();
+ E_CHECK_RETURN(m, EINA_FALSE);
+
+ // if it is do animation, do stop animation and delete animation
+ // must do animation check, and delete animation
+
+ win = e_mod_move_util_client_xid_get(mb);
+ if (e_mod_move_util_win_prop_angle_get(win, &angles[0], &angles[1]))
+ angles[0] %= 360;
+ else
+ angles[0] = 0;
+
+ at_mb = e_mod_move_apptray_find();
+ qp_mb = e_mod_move_quickpanel_find();
+ mini_at_mb = e_mod_move_mini_apptray_find();
+ zone = mb->bd->zone;
+
+ comp_obj_visible = e_mod_move_util_compositor_object_visible_get(mb);
+
+ if (REGION_INSIDE_ZONE(mb, zone)) state = EINA_TRUE;
+ else state = EINA_FALSE;
+
+ if ((!m->elm_indicator_mode)
+ && e_mod_move_indicator_click_get())
+ {
+ L(LT_EVENT_X,
+ "[MOVE] ev:%15.15s _NET_WM_WINDOW_SHOW error. w:0x%07x(state:%d) request:%d, Indicator Is Scrolling\n",
+ "X_CLIENT_MESSAGE", win, state, open);
+ return EINA_FALSE;
+ }
+
+ if ((m->elm_indicator_mode)
+ && e_mod_move_indicator_widget_click_get(e_mod_move_indicator_widget_get()))
+ {
+ L(LT_EVENT_X,
+ "[MOVE] ev:%15.15s _NET_WM_WINDOW_SHOW error. w:0x%07x(state:%d) request:%d, Indicator Widget Is Scrolling\n",
+ "X_CLIENT_MESSAGE", win, state, open);
+ return EINA_FALSE;
+ }
+
+ if (e_mod_move_quickpanel_click_get())
+ {
+ L(LT_EVENT_X,
+ "[MOVE] ev:%15.15s _NET_WM_WINDOW_SHOW error. w:0x%07x(state:%d) request:%d, Quickpanel Is Scrolling\n",
+ "X_CLIENT_MESSAGE", win, state, open);
+ return EINA_FALSE;
+ }
+
+ if (e_mod_move_apptray_click_get())
+ {
+ L(LT_EVENT_X,
+ "[MOVE] ev:%15.15s _NET_WM_WINDOW_SHOW error. w:0x%07x(state:%d) request:%d, Apptray Is Scrolling\n",
+ "X_CLIENT_MESSAGE", win, state, open);
+ return EINA_FALSE;
+ }
+
+ if (e_mod_move_mini_apptray_click_get())
+ {
+ L(LT_EVENT_X,
+ "[MOVE] ev:%15.15s _NET_WM_WINDOW_SHOW error. w:0x%07x(state:%d) request:%d, MINI_Apptray Is Scrolling\n",
+ "X_CLIENT_MESSAGE", win, state, open);
+ return EINA_FALSE;
+ }
+
+ if ((open) && (!state) && (comp_obj_visible)) // Open Case
+ {
+ if (mb == qp_mb) // Quickpanel Case
+ {
+ if ((at_mb) && (REGION_INSIDE_ZONE(at_mb, mb->bd->zone)))
+ {
+ L(LT_EVENT_X,
+ "[MOVE] ev:%15.15s _NET_WM_WINDOW_SHOW error. w:0x%07x(state:%d) request:%d, Apptray in On Screen\n",
+ "X_CLIENT_MESSAGE", win, state, open);
+ return EINA_FALSE;
+ }
+
+ if ((fullscr_mb = e_mod_move_util_visible_fullscreen_window_find()))
+ {
+ E_CHECK_RETURN(e_mod_move_panel_scrollable_get(fullscr_mb, E_MOVE_PANEL_TYPE_QUICKPANEL), EINA_FALSE);
+ }
+
+ switch (angles[0])
+ {
+ case 90:
+ mx = 0; my = 0;
+ if (m->qp_scroll_with_clipping)
+ {
+ ax = zone->x + qp_mb->w;
+ ay = zone->y + qp_mb->h;
+ }
+ else
+ {
+ ax = mx; ay = my;
+ }
+ break;
+ case 180:
+ mx = 0; my = zone->h - qp_mb->h;
+ if (m->qp_scroll_with_clipping)
+ {
+ ax = zone->x; ay = zone->y;
+ }
+ else
+ {
+ ax = mx; ay = my;
+ }
+ break;
+ case 270:
+ mx = zone->w - qp_mb->w; my = 0;
+ if (m->qp_scroll_with_clipping)
+ {
+ ax = zone->x; ay = zone->y;
+ }
+ else
+ {
+ ax = mx; ay = my;
+ }
+ break;
+ case 0:
+ default :
+ mx = 0; my = 0;
+ if (m->qp_scroll_with_clipping)
+ {
+ ax = zone->x + qp_mb->w;
+ ay = zone->y + qp_mb->h;
+ }
+ else
+ {
+ ax = mx; ay = my;
+ }
+ break;
+ }
+ _e_mod_move_msg_window_show_internal_quickpanel_check(qp_mb);
+
+ if (!m->qp_scroll_with_clipping)
+ e_mod_move_quickpanel_dim_show(qp_mb);
+
+ // Set Composite Mode & Rotation Lock & Make below win's mirror object
+ e_mod_move_quickpanel_stage_init(qp_mb);
+
+ e_mod_move_quickpanel_objs_add(qp_mb);
+
+ // send quickpanel to "move start message".
+ e_mod_move_quickpanel_anim_state_send(qp_mb, EINA_TRUE);
+
+ e_mod_move_quickpanel_e_border_move(qp_mb, mx, my);
+ e_mod_move_quickpanel_objs_animation_start_position_set(qp_mb,
+ angles[0]);
+ e_mod_move_quickpanel_objs_animation_move(qp_mb, ax, ay);
+ L(LT_EVENT_X,
+ "[MOVE] ev:%15.15s Quickpanel Show %s():%d\n",
+ "X_CLIENT_MESSAGE", __func__, __LINE__);
+ }
+ else if (mb == at_mb) // Apptray Case
+ {
+ if ((qp_mb) && (REGION_INSIDE_ZONE(qp_mb, mb->bd->zone)))
+ {
+ L(LT_EVENT_X,
+ "[MOVE] ev:%15.15s _NET_WM_WINDOW_SHOW error. w:0x%07x(state:%d) request:%d, Quickpanel in On Screen\n",
+ "X_CLIENT_MESSAGE", win, state, open);
+ return EINA_FALSE;
+ }
+
+ if ((fullscr_mb = e_mod_move_util_visible_fullscreen_window_find()))
+ {
+ E_CHECK_RETURN(e_mod_move_panel_scrollable_get(fullscr_mb, E_MOVE_PANEL_TYPE_APPTRAY), EINA_FALSE);
+ }
+
+ switch (angles[0])
+ {
+ case 0:
+ x = 0;
+ y = 0;
+ break;
+ case 90:
+ x = 0;
+ y = 0;
+ break;
+ case 180:
+ x = 0;
+ y = zone->h - at_mb->h;
+ break;
+ case 270:
+ x = zone->w - at_mb->w;
+ y = 0;
+ break;
+ default :
+ x = 0;
+ y = 0;
+ break;
+ }
+ _e_mod_move_msg_window_show_internal_apptray_check(at_mb);
+ e_mod_move_apptray_dim_show(at_mb);
+ e_mod_move_apptray_objs_add(at_mb);
+ // apptray_objs_animation_layer_set
+ e_mod_move_apptray_objs_animation_layer_set(at_mb);
+
+ // send apptray to "move start message".
+ e_mod_move_apptray_anim_state_send(at_mb, EINA_TRUE);
+
+ e_mod_move_apptray_e_border_move(at_mb, x, y);
+ e_mod_move_apptray_objs_animation_start_position_set(at_mb,
+ angles[0]);
+ e_mod_move_apptray_objs_animation_move(at_mb, x, y);
+ L(LT_EVENT_X,
+ "[MOVE] ev:%15.15s Apptray Show %s():%d\n",
+ "X_CLIENT_MESSAGE", __func__, __LINE__);
+ }
+ else if (mb == mini_at_mb) // MINI_Apptray Case
+ {
+ if ((qp_mb) && (REGION_INSIDE_ZONE(qp_mb, mb->bd->zone)))
+ {
+ L(LT_EVENT_X,
+ "[MOVE] ev:%15.15s _NET_WM_WINDOW_SHOW error. w:0x%07x(state:%d) request:%d, Quickpanel in On Screen\n",
+ "X_CLIENT_MESSAGE", win, state, open);
+ return EINA_FALSE;
+ }
+
+ if ((at_mb) && (REGION_INSIDE_ZONE(at_mb, mb->bd->zone)))
+ {
+ L(LT_EVENT_X,
+ "[MOVE] ev:%15.15s _NET_WM_WINDOW_SHOW error. w:0x%07x(state:%d) request:%d, Apptray in On Screen\n",
+ "X_CLIENT_MESSAGE", win, state, open);
+ return EINA_FALSE;
+ }
+
+ switch (angles[0])
+ {
+ case 90:
+ x = zone->w - mini_at_mb->w;
+ y = 0;
+ break;
+ case 180:
+ x = 0;
+ y = 0;
+ break;
+ case 270:
+ x = 0;
+ y = 0;
+ break;
+ case 0:
+ default :
+ x = 0;
+ y = zone->h - mini_at_mb->h;
+ break;
+ }
+
+ _e_mod_move_msg_window_show_internal_mini_apptray_check(mini_at_mb);
+ e_mod_move_mini_apptray_dim_show(mini_at_mb);
+ e_mod_move_mini_apptray_objs_add(mini_at_mb);
+ // mini_apptray_objs_animation_layer_set
+ e_mod_move_mini_apptray_objs_animation_layer_set(mini_at_mb);
+
+ // send mini_apptray to "move start message".
+ LOG(LOG_DEBUG, "WM_WINDOW_SHOW", "[e17:X_CLIENT_MESSAGE:ApptrayShow:ANIMATION_START]");
+ e_mod_move_mini_apptray_anim_state_send(mini_at_mb, EINA_TRUE);
+
+ e_mod_move_mini_apptray_e_border_move(mini_at_mb, x, y);
+ e_mod_move_mini_apptray_objs_animation_start_position_set(mini_at_mb,
+ angles[0]);
+ e_mod_move_mini_apptray_objs_animation_move(mini_at_mb, x, y);
+ L(LT_EVENT_X,
+ "[MOVE] ev:%15.15s Mini_Apptray Show %s():%d\n",
+ "X_CLIENT_MESSAGE", __func__, __LINE__);
+ }
+ }
+ else if ((!open) && (state)) // Close Case
+ {
+ if (mb == qp_mb) // Quickpanel case
+ {
+ switch (angles[0])
+ {
+ case 90:
+ mx = qp_mb->w * -1; my = 0;
+ if (m->qp_scroll_with_clipping)
+ {
+ ax = zone->x; ay = zone->y;
+ }
+ else
+ {
+ ax = mx; ay = my;
+ }
+ break;
+ case 180:
+ mx = 0; my = zone->h;
+ if (m->qp_scroll_with_clipping)
+ {
+ ax = zone->x + qp_mb->w;
+ ay = zone->y + qp_mb->h;
+ }
+ else
+ {
+ ax = mx; ay = my;
+ }
+ break;
+ case 270:
+ mx = zone->w; my = 0;
+ if (m->qp_scroll_with_clipping)
+ {
+ ax = zone->x + qp_mb->w;
+ ay = zone->y + qp_mb->h;
+ }
+ else
+ {
+ ax = mx; ay = my;
+ }
+ break;
+ case 0:
+ default :
+ mx = 0; my = qp_mb->h * -1;
+ if (m->qp_scroll_with_clipping)
+ {
+ ax = zone->x; ay = zone->y;
+ }
+ else
+ {
+ ax = mx; ay = my;
+ }
+ break;
+ }
+ _e_mod_move_msg_window_show_internal_quickpanel_check(qp_mb);
+ e_mod_move_quickpanel_objs_add(qp_mb);
+
+ // send quickpanel to "move start message".
+ e_mod_move_quickpanel_anim_state_send(qp_mb, EINA_TRUE);
+
+ e_mod_move_quickpanel_e_border_move(qp_mb, mx, my);
+ e_mod_move_quickpanel_objs_animation_move(qp_mb, ax, ay);
+ L(LT_EVENT_X,
+ "[MOVE] ev:%15.15s Quickpanel Hide %s():%d\n",
+ "X_CLIENT_MESSAGE", __func__, __LINE__);
+ }
+ else if (mb == at_mb) // Apptray Case
+ {
+ switch (angles[0])
+ {
+ case 0:
+ x = 0;
+ y = at_mb->h * -1;
+ break;
+ case 90:
+ x = at_mb->w * -1;
+ y = 0;
+ break;
+ case 180:
+ x = 0;
+ y = zone->h;
+ break;
+ case 270:
+ x = zone->w;
+ y = 0;
+ break;
+ default :
+ x = 0;
+ y = at_mb->h * -1;
+ break;
+ }
+ _e_mod_move_msg_window_show_internal_apptray_check(at_mb);
+ e_mod_move_apptray_objs_add(at_mb);
+
+ // send apptray to "move start message".
+ e_mod_move_apptray_anim_state_send(at_mb, EINA_TRUE);
+
+ e_mod_move_apptray_e_border_move(at_mb, x, y);
+ LOG(LOG_DEBUG, "WM_WINDOW_SHOW", "[e17:X_CLIENT_MESSAGE:ApptrayHide:ANIMATION_START]");
+ e_mod_move_apptray_objs_animation_move(at_mb, x, y);
+ L(LT_EVENT_X,
+ "[MOVE] ev:%15.15s Apptray Hide %s():%d\n",
+ "X_CLIENT_MESSAGE", __func__, __LINE__);
+ }
+ else if (mb == mini_at_mb) // Mini_Apptray Case
+ {
+ switch (angles[0])
+ {
+ case 90:
+ x = zone->w;
+ y = 0;
+ break;
+ case 180:
+ x = 0;
+ y = mini_at_mb->h * -1;
+ break;
+ case 270:
+ x = mini_at_mb->w * -1;
+ y = 0;
+ break;
+ case 0:
+ default :
+ x = 0;
+ y = zone->h;
+ break;
+ }
+ _e_mod_move_msg_window_show_internal_mini_apptray_check(mini_at_mb);
+ e_mod_move_mini_apptray_objs_add(mini_at_mb);
+
+ // send apptray to "move start message".
+ e_mod_move_mini_apptray_anim_state_send(mini_at_mb, EINA_TRUE);
+
+ e_mod_move_mini_apptray_e_border_move(mini_at_mb, x, y);
+ e_mod_move_mini_apptray_objs_animation_move(mini_at_mb, x, y);
+ L(LT_EVENT_X,
+ "[MOVE] ev:%15.15s Nini_Apptray Hide %s():%d\n",
+ "X_CLIENT_MESSAGE", __func__, __LINE__);
+ }
+ }
+ else
+ {
+ fprintf(stderr,
+ "[MOVE_MODULE] _NET_WM_WINDOW_SHOW error."
+ " w:0x%07x(state:%d) request:%d\n",
+ win, state, open);
+ }
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_msg_qp_state_internal_quickpanel_check(E_Move_Border *mb)
+{
+ E_Move *m = e_mod_move_util_get();
+ E_CHECK_RETURN(m, EINA_FALSE);
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_APPTRAY_CHECK(mb), EINA_FALSE);
+ if ((!m->elm_indicator_mode) && e_mod_move_indicator_click_get()) // if indicator process event, do event clear
+ e_mod_move_indicator_event_clear();
+ if ((m->elm_indicator_mode)
+ && e_mod_move_indicator_widget_click_get(e_mod_move_indicator_widget_get())) // if indicator widget process event, do event clear
+ {
+ e_mod_move_indicator_widget_event_clear(e_mod_move_indicator_widget_get());
+ }
+ if (e_mod_move_quickpanel_click_get()) // if quickpanel process event, do event clear
+ e_mod_move_quickpanel_event_clear();
+ if (e_mod_move_quickpanel_objs_animation_state_get(mb))
+ {
+ e_mod_move_quickpanel_objs_animation_stop(mb);
+ e_mod_move_quickpanel_objs_animation_clear(mb);
+ }
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_msg_qp_state(Ecore_X_Event_Client_Message *ev)
+{
+ Ecore_X_Atom qp_state;
+ Ecore_X_Window zone_win;
+ E_Move *m = NULL;
+ E_Move_Border *qp_mb = NULL;
+ E_Move_Border *fullscr_mb = NULL;
+ Ecore_X_Window win;
+ Eina_Bool state;
+ Eina_Bool comp_obj_visible = EINA_FALSE;
+ E_Zone *zone;
+ int cx, cy, cw, ch;
+ int open, angles[2];
+ int ax = 0; // animation x
+ int ay = 0; // animation y
+ int mx = 0; // border move x
+ int my = 0; // border move y
+
+ m = e_mod_move_util_get();
+ E_CHECK_RETURN(m, EINA_FALSE);
+
+ qp_mb = e_mod_move_quickpanel_find();
+ E_CHECK_RETURN(qp_mb, EINA_FALSE);
+
+ zone_win = ev->win;
+ win = e_mod_move_util_client_xid_get(qp_mb);
+
+ if (zone_win != ecore_x_e_illume_zone_get(win)) return EINA_FALSE;
+
+ qp_state = ev->data.l[0];
+ if (qp_state == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_OFF) open = 0;
+ else open = 1;
+
+ if (e_mod_move_util_win_prop_angle_get(win, &angles[0], &angles[1]))
+ angles[0] %= 360;
+ else
+ angles[0] = 0;
+
+ if ((fullscr_mb = e_mod_move_util_visible_fullscreen_window_find()))
+ {
+ E_CHECK_RETURN(e_mod_move_panel_scrollable_get(fullscr_mb, E_MOVE_PANEL_TYPE_QUICKPANEL), EINA_FALSE);
+ }
+
+ comp_obj_visible = e_mod_move_util_compositor_object_visible_get(qp_mb);
+
+ zone = qp_mb->bd->zone;
+ if (REGION_INSIDE_ZONE(qp_mb, zone)) state = EINA_TRUE;
+ else state = EINA_FALSE;
+
+ if ((!m->elm_indicator_mode)
+ && e_mod_move_indicator_click_get())
+ {
+ L(LT_EVENT_X,
+ "[MOVE] ev:%15.15s [MOVE_MODULE] _E_ILLUME_QUICKPANEL_STATE error. w:0x%07x(state:%d) request:%d, Indicator Is Scrolling\n",
+ "X_CLIENT_MESSAGE", win, state, open);
+ return EINA_FALSE;
+ }
+
+ if ((m->elm_indicator_mode)
+ && e_mod_move_indicator_widget_click_get(e_mod_move_indicator_widget_get()))
+ {
+ L(LT_EVENT_X,
+ "[MOVE] ev:%15.15s [MOVE_MODULE] _E_ILLUME_QUICKPANEL_STATE error. w:0x%07x(state:%d) request:%d, Indicator Widget Is Scrolling\n",
+ "X_CLIENT_MESSAGE", win, state, open);
+ return EINA_FALSE;
+ }
+
+ if (e_mod_move_quickpanel_click_get())
+ {
+ L(LT_EVENT_X,
+ "[MOVE] ev:%15.15s [MOVE_MODULE] _E_ILLUME_QUICKPANEL_STATE error. w:0x%07x(state:%d) request:%d, Quickpanel Is Scrolling\n",
+ "X_CLIENT_MESSAGE", win, state, open);
+ return EINA_FALSE;
+ }
+
+ if ((open) && (!state) && (comp_obj_visible)) // Quickpanel Open
+ {
+ switch (angles[0])
+ {
+ case 90:
+ mx = 0;
+ my = 0;
+ if (m->qp_scroll_with_clipping)
+ {
+ ax = zone->x + qp_mb->w;
+ ay = zone->y + qp_mb->h;
+ }
+ else
+ {
+ ax = mx; ay = my;
+ }
+ break;
+ case 180:
+ mx = 0;
+ my = zone->h - qp_mb->h;
+ if (m->qp_scroll_with_clipping)
+ {
+ ax = zone->x; ay = zone->y;
+ }
+ else
+ {
+ ax = mx; ay = my;
+ }
+ break;
+ case 270:
+ mx = zone->w - qp_mb->w;
+ my = 0;
+ if (m->qp_scroll_with_clipping)
+ {
+ ax = zone->x; ay = zone->y;
+ }
+ else
+ {
+ ax = mx; ay = my;
+ }
+ break;
+ case 0:
+ default :
+ mx = 0;
+ my = 0;
+ if (m->qp_scroll_with_clipping)
+ {
+ ax = zone->x + qp_mb->w;
+ ay = zone->y + qp_mb->h;
+ }
+ else
+ {
+ ax = mx; ay = my;
+ }
+ break;
+ }
+ _e_mod_move_msg_qp_state_internal_quickpanel_check(qp_mb);
+
+ if (!m->qp_scroll_with_clipping)
+ e_mod_move_quickpanel_dim_show(qp_mb);
+
+ // Set Composite Mode & Rotation Lock & Make below win's mirror object
+ e_mod_move_quickpanel_stage_init(qp_mb);
+
+ e_mod_move_quickpanel_objs_add(qp_mb);
+ // send quickpanel to "move start message".
+ e_mod_move_quickpanel_anim_state_send(qp_mb, EINA_TRUE);
+
+ e_mod_move_quickpanel_e_border_move(qp_mb, mx, my);
+ e_mod_move_quickpanel_objs_animation_start_position_set(qp_mb,
+ angles[0]);
+ e_mod_move_quickpanel_objs_animation_move(qp_mb, ax, ay);
+ }
+ else if ((!open) && (state))// Quickpanel Close
+ {
+ switch (angles[0])
+ {
+ case 90:
+ if (m->qp_scroll_with_clipping)
+ {
+ mx = qp_mb->w * -1; my = 0;
+ ax = zone->x; ay = zone->y;
+ }
+ else
+ {
+ if (e_mod_move_border_contents_rect_get(qp_mb, &cx, &cy ,&cw, &ch))
+ {
+ ax = cw * -1;
+ ay = 0;
+ mx = qp_mb->w * -1;
+ my = 0;
+ }
+ else
+ {
+ ax = qp_mb->w * -1;
+ ay = 0;
+ mx = ax;
+ my = ay;
+ }
+ }
+ break;
+ case 180:
+ if (m->qp_scroll_with_clipping)
+ {
+ mx = 0; my = zone->h;
+ ax = zone->x + qp_mb->w;
+ ay = zone->y + qp_mb->h;
+ }
+ else
+ {
+ if (e_mod_move_border_contents_rect_get(qp_mb, &cx, &cy ,&cw, &ch))
+ {
+ ax = 0;
+ ay = ch;
+ mx = ax;
+ my = zone->h;
+ }
+ else
+ {
+ ax = 0;
+ ay = zone->h;
+ mx = ax;
+ my = ay;
+ }
+ }
+ break;
+ case 270:
+ if (m->qp_scroll_with_clipping)
+ {
+ mx = zone->w; my = 0;
+ ax = zone->x + qp_mb->w;
+ ay = zone->y + qp_mb->h;
+ }
+ else
+ {
+ if (e_mod_move_border_contents_rect_get(qp_mb, &cx, &cy ,&cw, &ch))
+ {
+ ax = cw;
+ ay = 0;
+ mx = zone->w;
+ my = ay;
+ }
+ else
+ {
+ ax = zone->w;
+ ay = 0;
+ mx = ax;
+ my = ay;
+ }
+ }
+ break;
+ case 0:
+ default :
+ if (m->qp_scroll_with_clipping)
+ {
+ mx = 0; my = qp_mb->h * -1;
+ ax = zone->x; ay = zone->y;
+ }
+ else
+ {
+ if (e_mod_move_border_contents_rect_get(qp_mb, &cx, &cy ,&cw, &ch))
+ {
+ ax = 0;
+ ay = ch * -1;
+ mx = 0;
+ my = qp_mb->h * -1;
+ }
+ else
+ {
+ ax = 0;
+ ay = qp_mb->h * -1;
+ mx = ax;
+ my = ay;
+ }
+ }
+ break;
+ }
+ _e_mod_move_msg_qp_state_internal_quickpanel_check(qp_mb);
+ e_mod_move_quickpanel_objs_add(qp_mb);
+
+ // send quickpanel to "move start message".
+ e_mod_move_quickpanel_anim_state_send(qp_mb, EINA_TRUE);
+
+ e_mod_move_quickpanel_e_border_move(qp_mb, mx, my);
+ e_mod_move_quickpanel_objs_animation_move(qp_mb, ax, ay);
+ }
+ else
+ {
+ fprintf(stderr,
+ "[MOVE_MODULE] _E_ILLUME_QUICKPANEL_STATE error."
+ " w:0x%07x(state:%d) request:%d\n",
+ win, state, open);
+ }
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_outside_zone_border_position_update(E_Move_Border *mb)
+{
+ E_Zone *zone = NULL;
+ E_Move_Border *at_mb = NULL;
+ E_Move_Border *qp_mb = NULL;
+ int angle;
+ int x, y;
+
+ E_CHECK_RETURN(TYPE_INDICATOR_CHECK(mb), EINA_FALSE);
+ angle = mb->angle;
+ zone = mb->bd->zone;
+ x = -10000;
+ y = -10000;
+ if ((at_mb = e_mod_move_apptray_find()))
+ {
+ if ((zone == at_mb->bd->zone)
+ && !REGION_INSIDE_ZONE(at_mb, zone))
+ {
+ e_mod_move_apptray_e_border_move(at_mb, x, y);
+ }
+ }
+ if ((qp_mb = e_mod_move_quickpanel_find()))
+ {
+ if ((zone == qp_mb->bd->zone)
+ && !REGION_INSIDE_ZONE(qp_mb, zone))
+ {
+ e_mod_move_quickpanel_e_border_move(qp_mb, x, y);
+ }
+ }
+ return EINA_TRUE;
+}
+
+static E_Move *
+_e_mod_move_add(E_Manager *man)
+{
+ E_Move *m;
+ Ecore_X_Window *wins;
+ int i, num;
+
+ E_Move_Canvas *canvas;
+ E_Border *bd;
+
+ m = E_NEW(E_Move, 1);
+ E_CHECK_RETURN(m, NULL);
+
+ m->man = man;
+
+ canvas = e_mod_move_canvas_add(m, NULL);
+ if (!canvas)
+ {
+ memset(m, 0, sizeof(E_Move));
+ E_FREE(m);
+ return NULL;
+ }
+
+ m->indicator_always_region_ratio.portrait = _move_mod->conf->indicator_always_portrait_region_ratio;
+ m->indicator_always_region_ratio.landscape = _move_mod->conf->indicator_always_landscape_region_ratio;
+ m->indicator_quickpanel_region_ratio.portrait = _move_mod->conf->indicator_quickpanel_portrait_region_ratio;
+ m->indicator_quickpanel_region_ratio.landscape = _move_mod->conf->indicator_quickpanel_landscape_region_ratio;
+ m->indicator_apptray_region_ratio.portrait = _move_mod->conf->indicator_apptray_portrait_region_ratio;
+ m->indicator_apptray_region_ratio.landscape = _move_mod->conf->indicator_apptray_landscape_region_ratio;
+ m->qp_scroll_with_visible_win = _move_mod->conf->qp_scroll_with_visible_win;
+ m->qp_scroll_with_clipping = _move_mod->conf->qp_scroll_with_clipping;
+ m->flick_speed_limit = _move_mod->conf->flick_speed_limit;
+ m->animation_duration = _move_mod->conf->animation_duration;
+ m->dim_max_opacity = _move_mod->conf->dim_max_opacity;
+ m->dim_min_opacity = _move_mod->conf->dim_min_opacity;
+ m->ev_log = _move_mod->conf->event_log;
+ m->ev_log_cnt = _move_mod->conf->event_log_count;
+ m->elm_indicator_mode = _move_mod->conf->elm_indicator_mode;
+ wins = ecore_x_window_children_get(m->man->root, &num);
+
+ // indicator widget gemometry setting
+ m->indicator_widget_geometry[E_MOVE_ANGLE_0].x
+ = _move_mod->conf->indicator_widget_geometry[E_MOVE_ANGLE_0].x;
+ m->indicator_widget_geometry[E_MOVE_ANGLE_0].y
+ = _move_mod->conf->indicator_widget_geometry[E_MOVE_ANGLE_0].y;
+ m->indicator_widget_geometry[E_MOVE_ANGLE_0].w
+ = _move_mod->conf->indicator_widget_geometry[E_MOVE_ANGLE_0].w;
+ m->indicator_widget_geometry[E_MOVE_ANGLE_0].h
+ = _move_mod->conf->indicator_widget_geometry[E_MOVE_ANGLE_0].h;
+ m->indicator_widget_geometry[E_MOVE_ANGLE_90].x
+ = _move_mod->conf->indicator_widget_geometry[E_MOVE_ANGLE_90].x;
+ m->indicator_widget_geometry[E_MOVE_ANGLE_90].y
+ = _move_mod->conf->indicator_widget_geometry[E_MOVE_ANGLE_90].y;
+ m->indicator_widget_geometry[E_MOVE_ANGLE_90].w
+ = _move_mod->conf->indicator_widget_geometry[E_MOVE_ANGLE_90].w;
+ m->indicator_widget_geometry[E_MOVE_ANGLE_90].h
+ = _move_mod->conf->indicator_widget_geometry[E_MOVE_ANGLE_90].h;
+ m->indicator_widget_geometry[E_MOVE_ANGLE_180].x
+ = _move_mod->conf->indicator_widget_geometry[E_MOVE_ANGLE_180].x;
+ m->indicator_widget_geometry[E_MOVE_ANGLE_180].y
+ = _move_mod->conf->indicator_widget_geometry[E_MOVE_ANGLE_180].y;
+ m->indicator_widget_geometry[E_MOVE_ANGLE_180].w
+ = _move_mod->conf->indicator_widget_geometry[E_MOVE_ANGLE_180].w;
+ m->indicator_widget_geometry[E_MOVE_ANGLE_180].h
+ = _move_mod->conf->indicator_widget_geometry[E_MOVE_ANGLE_180].h;
+ m->indicator_widget_geometry[E_MOVE_ANGLE_270].x
+ = _move_mod->conf->indicator_widget_geometry[E_MOVE_ANGLE_270].x;
+ m->indicator_widget_geometry[E_MOVE_ANGLE_270].y
+ = _move_mod->conf->indicator_widget_geometry[E_MOVE_ANGLE_270].y;
+ m->indicator_widget_geometry[E_MOVE_ANGLE_270].w
+ = _move_mod->conf->indicator_widget_geometry[E_MOVE_ANGLE_270].w;
+ m->indicator_widget_geometry[E_MOVE_ANGLE_270].h
+ = _move_mod->conf->indicator_widget_geometry[E_MOVE_ANGLE_270].h;
+
+ // miniapp_tray widget gemometry setting
+ m->mini_apptray_widget_geometry[E_MOVE_ANGLE_0].x
+ = _move_mod->conf->mini_apptray_widget_geometry[E_MOVE_ANGLE_0].x;
+ m->mini_apptray_widget_geometry[E_MOVE_ANGLE_0].y
+ = _move_mod->conf->mini_apptray_widget_geometry[E_MOVE_ANGLE_0].y;
+ m->mini_apptray_widget_geometry[E_MOVE_ANGLE_0].w
+ = _move_mod->conf->mini_apptray_widget_geometry[E_MOVE_ANGLE_0].w;
+ m->mini_apptray_widget_geometry[E_MOVE_ANGLE_0].h
+ = _move_mod->conf->mini_apptray_widget_geometry[E_MOVE_ANGLE_0].h;
+ m->mini_apptray_widget_geometry[E_MOVE_ANGLE_90].x
+ = _move_mod->conf->mini_apptray_widget_geometry[E_MOVE_ANGLE_90].x;
+ m->mini_apptray_widget_geometry[E_MOVE_ANGLE_90].y
+ = _move_mod->conf->mini_apptray_widget_geometry[E_MOVE_ANGLE_90].y;
+ m->mini_apptray_widget_geometry[E_MOVE_ANGLE_90].w
+ = _move_mod->conf->mini_apptray_widget_geometry[E_MOVE_ANGLE_90].w;
+ m->mini_apptray_widget_geometry[E_MOVE_ANGLE_90].h
+ = _move_mod->conf->mini_apptray_widget_geometry[E_MOVE_ANGLE_90].h;
+ m->mini_apptray_widget_geometry[E_MOVE_ANGLE_180].x
+ = _move_mod->conf->mini_apptray_widget_geometry[E_MOVE_ANGLE_180].x;
+ m->mini_apptray_widget_geometry[E_MOVE_ANGLE_180].y
+ = _move_mod->conf->mini_apptray_widget_geometry[E_MOVE_ANGLE_180].y;
+ m->mini_apptray_widget_geometry[E_MOVE_ANGLE_180].w
+ = _move_mod->conf->mini_apptray_widget_geometry[E_MOVE_ANGLE_180].w;
+ m->mini_apptray_widget_geometry[E_MOVE_ANGLE_180].h
+ = _move_mod->conf->mini_apptray_widget_geometry[E_MOVE_ANGLE_180].h;
+ m->mini_apptray_widget_geometry[E_MOVE_ANGLE_270].x
+ = _move_mod->conf->mini_apptray_widget_geometry[E_MOVE_ANGLE_270].x;
+ m->mini_apptray_widget_geometry[E_MOVE_ANGLE_270].y
+ = _move_mod->conf->mini_apptray_widget_geometry[E_MOVE_ANGLE_270].y;
+ m->mini_apptray_widget_geometry[E_MOVE_ANGLE_270].w
+ = _move_mod->conf->mini_apptray_widget_geometry[E_MOVE_ANGLE_270].w;
+ m->mini_apptray_widget_geometry[E_MOVE_ANGLE_270].h
+ = _move_mod->conf->mini_apptray_widget_geometry[E_MOVE_ANGLE_270].h;
+
+ if (wins)
+ {
+ for (i = 0; i < num; i++)
+ {
+ E_Move_Border *mb;
+ if ((bd = e_border_find_by_window(wins[i])))
+ {
+ mb = _e_mod_move_bd_new_intern(m, bd);
+ if (!mb) continue;
+
+ _e_mod_move_bd_add_intern(mb);
+ _e_mod_move_bd_move_resize_intern(mb, bd->x, bd->y, bd->w, bd->h);
+
+ if (bd->visible)
+ _e_mod_move_bd_show_intern(mb);
+ }
+ }
+ free(wins);
+ }
+
+ return m;
+}
+
+static void
+_e_mod_move_del(E_Move *m)
+{
+ Eina_List *l;
+ E_Move_Border *mb;
+ E_Move_Canvas *canvas;
+ E_Move_Event_Log *log;
+
+ E_CHECK(m);
+ while (m->borders)
+ {
+ mb = (E_Move_Border *)(m->borders);
+ _e_mod_move_bd_hide_intern(mb);
+ _e_mod_move_bd_del_intern(mb);
+ }
+
+ EINA_LIST_FREE(m->canvases, canvas) e_mod_move_canvas_del(canvas);
+ m->canvases = NULL;
+
+ EINA_LIST_FOREACH(m->ev_logs, l, log)
+ {
+ memset(log, 0, sizeof(E_Move_Event_Log));
+ E_FREE(log);
+ }
+ eina_list_free(m->ev_logs);
+
+ if (m->borders_list) eina_list_free(m->borders_list);
+
+ free(m);
+}
+
+/* wrapper function for external file */
+EINTERN E_Move_Border *
+e_mod_move_border_find(Ecore_X_Window win)
+{
+ return _e_mod_move_border_find(win);
+}
+
+EINTERN E_Move_Border *
+e_mod_move_border_client_find(Ecore_X_Window win)
+{
+ return _e_mod_move_border_client_find(win);
+}
+
+EINTERN E_Move *
+e_mod_move_find(Ecore_X_Window win)
+{
+ E_CHECK_RETURN(win, 0);
+ return _e_mod_move_find(win);
+}
+
+EINTERN void
+e_mod_move_border_del(E_Move_Border * mb)
+{
+ E_CHECK(mb);
+ _e_mod_move_object_del(mb, mb->bd);
+}
+
+Eina_Bool
+e_mod_move_init(void)
+{
+ Eina_List *l;
+ E_Manager *man;
+ int res = 0;
+
+ borders = eina_hash_string_superfast_new(NULL);
+ border_clients = eina_hash_string_superfast_new(NULL);
+
+ handlers = eina_list_append(handlers, ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, _e_mod_move_mouse_btn_dn, NULL));
+ handlers = eina_list_append(handlers, ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_UP, _e_mod_move_mouse_btn_up, NULL));
+ handlers = eina_list_append(handlers, ecore_event_handler_add(ECORE_X_EVENT_WINDOW_PROPERTY, _e_mod_move_property, NULL));
+ handlers = eina_list_append(handlers, ecore_event_handler_add(ECORE_X_EVENT_CLIENT_MESSAGE, _e_mod_move_message, NULL));
+ handlers = eina_list_append(handlers, ecore_event_handler_add(ECORE_X_EVENT_WINDOW_VISIBILITY_CHANGE, _e_mod_move_visibility_change, NULL));
+ handlers = eina_list_append(handlers, ecore_event_handler_add(E_EVENT_BORDER_ADD, _e_mod_move_bd_add, NULL));
+ handlers = eina_list_append(handlers, ecore_event_handler_add(E_EVENT_BORDER_REMOVE, _e_mod_move_bd_del, NULL));
+ handlers = eina_list_append(handlers, ecore_event_handler_add(E_EVENT_BORDER_SHOW, _e_mod_move_bd_show, NULL));
+ handlers = eina_list_append(handlers, ecore_event_handler_add(E_EVENT_BORDER_HIDE, _e_mod_move_bd_hide, NULL));
+ handlers = eina_list_append(handlers, ecore_event_handler_add(E_EVENT_BORDER_MOVE, _e_mod_move_bd_move, NULL));
+ handlers = eina_list_append(handlers, ecore_event_handler_add(E_EVENT_BORDER_RESIZE, _e_mod_move_bd_resize, NULL));
+ handlers = eina_list_append(handlers, ecore_event_handler_add(E_EVENT_BORDER_STACK, _e_mod_move_bd_stack, NULL));
+
+ e_border_hooks = eina_list_append(e_border_hooks, e_border_hook_add(E_BORDER_HOOK_NEW_BORDER, _e_mod_move_bd_new_hook, NULL));
+ e_border_hooks = eina_list_append(e_border_hooks, e_border_hook_add(E_BORDER_HOOK_DEL_BORDER, _e_mod_move_bd_del_hook, NULL));
+
+ e_msg_handler = e_msg_handler_add(_e_mod_move_e_msg_handler, NULL);
+
+ res = e_mod_move_atoms_init();
+ E_CHECK_RETURN(res, 0);
+
+ res = e_mod_move_border_type_init();
+ E_CHECK_RETURN(res, 0);
+
+ EINA_LIST_FOREACH(e_manager_list(), l, man)
+ {
+ E_Move *m;
+ if (!man) continue;
+ m = _e_mod_move_add(man);
+ if (m)
+ {
+ moves = eina_list_append(moves, m);
+ e_mod_move_util_set(m, man);
+ }
+ }
+ return 1;
+}
+
+void
+e_mod_move_shutdown(void)
+{
+ E_Move *m;
+
+ EINA_LIST_FREE(moves, m) _e_mod_move_del(m);
+
+ E_FREE_LIST(handlers, ecore_event_handler_del);
+
+ E_FREE_LIST(e_border_hooks, e_border_hook_del);
+
+ if (e_msg_handler) e_msg_handler_del(e_msg_handler);
+
+ if (borders) eina_hash_free(borders);
+ if (border_clients) eina_hash_free(border_clients);
+ borders = NULL;
+ border_clients = NULL;
+
+ e_mod_move_border_type_shutdown();
+ e_mod_move_atoms_shutdown();
+
+ e_mod_move_util_set(NULL, NULL);
+}
+
+/////////////////////////////////////////////////////////////////////////
--- /dev/null
+#ifdef E_TYPEDEFS
+#else
+#ifndef E_MOD_MOVE_H
+#define E_MOD_MOVE_H
+
+#include "e_mod_move_shared_types.h"
+
+EINTERN Eina_Bool e_mod_move_init(void);
+EINTERN void e_mod_move_shutdown(void);
+
+EINTERN E_Move_Border *e_mod_move_border_find(Ecore_X_Window win);
+EINTERN E_Move_Border *e_mod_move_border_client_find(Ecore_X_Window win);
+EINTERN E_Move *e_mod_move_find(Ecore_X_Window win);
+EINTERN void e_mod_move_border_del(E_Move_Border * mb);
+
+#endif
+#endif
--- /dev/null
+#include "e_mod_move_shared_types.h"
+#include "e_mod_move_debug.h"
+#include "e_mod_move_atoms.h"
+#include "e_mod_move.h"
+
+struct _E_Move_Apptray_Animation_Data
+{
+ Eina_Bool animating;
+ int sx;// start x
+ int sy;// start y
+ int ex;// end x
+ int ey;// end y
+ int dx;// distance x
+ int dy;// distance y
+ Ecore_Animator *animator;
+};
+
+/* local subsystem functions */
+static Eina_Bool _e_mod_move_apptray_cb_motion_start(void *data, void *event_info);
+static Eina_Bool _e_mod_move_apptray_cb_motion_move(void *data, void *event_info);
+static Eina_Bool _e_mod_move_apptray_cb_motion_end(void *data, void *event_info);
+static Eina_Bool _e_mod_move_apptray_objs_position_set(E_Move_Border *mb, int x, int y);
+static Eina_Bool _e_mod_move_apptray_objs_position_get(E_Move_Border *mb, int *x, int *y);
+static Eina_Bool _e_mod_move_apptray_objs_animation_frame(void *data, double pos);
+static Eina_Bool _e_mod_move_apptray_flick_process(E_Move_Border *mb, int angle, Eina_Bool state);
+static Eina_Bool _e_mod_move_apptray_dim_objs_apply(E_Move_Border *mb, int x, int y);
+static Eina_Bool _e_mod_move_apptray_cb_bg_touch_dn(void *data, int type __UNUSED__, void *event);
+static Eina_Bool _e_mod_move_apptray_cb_bg_touch_up(void *data, int type __UNUSED__, void *event);
+static void _e_mod_move_apptray_bg_touch_win_show(E_Move_Border *mb);
+static void _e_mod_move_apptray_bg_touch_win_hide(E_Move_Border *mb);
+static Ecore_X_Window _e_mod_move_apptray_bg_touch_win_get(E_Move_Border *mb);
+
+/* local subsystem functions */
+static Eina_Bool
+_e_mod_move_apptray_cb_motion_start(void *data,
+ void *event_info)
+{
+ E_Move_Border *mb = (E_Move_Border *)data;
+ E_Move_Event_Motion_Info *info;
+ E_Move_Control_Object *mco = NULL;
+ Evas_Event_Mouse_Down *mouse_down_event = NULL;
+ Eina_Bool clicked = EINA_FALSE;
+ Eina_List *l;
+ int angle = 0;
+
+ info = (E_Move_Event_Motion_Info *)event_info;
+ if (!mb || !info) return EINA_FALSE;
+
+ mouse_down_event = info->event_info;
+ E_CHECK_RETURN(mouse_down_event, EINA_FALSE);
+ if (mouse_down_event->button != 1)
+ return EINA_FALSE;
+
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco)
+ {
+ if (!mco) continue;
+ clicked = e_mod_move_event_click_get(mco->event);
+ }
+ if (clicked)
+ return EINA_FALSE;
+
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s w:0x%08x %s()\n",
+ "EVAS_OBJ", mb->bd->win, __func__);
+
+ if (e_mod_move_apptray_objs_animation_state_get(mb)) goto error_cleanup;
+
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco)
+ {
+ if (!mco) continue;
+ angle = e_mod_move_event_angle_get(mco->event);
+ }
+ mb->angle = angle;
+
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco)
+ {
+ if (!mco) continue;
+ e_mod_move_event_click_set(mco->event, EINA_TRUE);
+ }
+
+ E_CHECK_GOTO(mb->visible, error_cleanup);
+ if (!REGION_INSIDE_ZONE(mb, mb->bd->zone))
+ goto error_cleanup;
+
+ E_CHECK_GOTO(e_mod_move_flick_data_new(mb), error_cleanup);
+ e_mod_move_flick_data_init(mb, info->coord.x, info->coord.y);
+
+ e_mod_move_apptray_objs_add(mb);
+
+ // apptray_objs_animation_layer_set
+ e_mod_move_apptray_objs_animation_layer_set(mb);
+
+ // send apptray to "move start message".
+ e_mod_move_apptray_anim_state_send(mb, EINA_TRUE);
+ return EINA_TRUE;
+
+error_cleanup:
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco)
+ {
+ if (!mco) continue;
+ e_mod_move_event_click_set(mco->event, EINA_FALSE);
+ }
+ return EINA_FALSE;
+}
+
+static Eina_Bool
+_e_mod_move_apptray_cb_motion_move(void *data,
+ void *event_info)
+{
+ E_Move_Border *mb = (E_Move_Border *)data;
+ E_Move_Event_Motion_Info *info;
+ E_Move_Control_Object *mco = NULL;
+ Eina_List *l;
+ int angle = 0;
+ Eina_Bool click = EINA_FALSE;
+ E_Zone *zone = NULL;
+
+ info = (E_Move_Event_Motion_Info *)event_info;
+ if (!mb || !info) return EINA_FALSE;
+
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s w:0x%08x ,angle:%d, (%d,%d) %s()\n",
+ "EVAS_OBJ", mb->bd->win, mb->angle, info->coord.x, info->coord.y,
+ __func__);
+
+ angle = mb->angle;
+ zone = mb->bd->zone;
+
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco)
+ {
+ if (!mco) continue;
+ click = e_mod_move_event_click_get(mco->event);
+ }
+ E_CHECK_RETURN(click, EINA_FALSE);
+
+ switch (angle)
+ {
+ case 0:
+ if (info->coord.y < mb->h)
+ e_mod_move_apptray_objs_move(mb, 0, info->coord.y - mb->h);
+ break;
+ case 90:
+ if (info->coord.x < mb->w)
+ e_mod_move_apptray_objs_move(mb, info->coord.x - mb->w, 0);
+ break;
+ case 180:
+ if (info->coord.y > (zone->h - mb->h))
+ e_mod_move_apptray_objs_move(mb, 0, info->coord.y);
+ break;
+ case 270:
+ if (info->coord.x > (zone->w - mb->w))
+ e_mod_move_apptray_objs_move(mb, info->coord.x, 0);
+ break;
+ default :
+ break;
+ }
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_apptray_cb_motion_end(void *data,
+ void *event_info)
+{
+ E_Move_Border *mb = (E_Move_Border *)data;
+ E_Move_Event_Motion_Info *info;
+ E_Move_Control_Object *mco = NULL;
+ Eina_List *l;
+ int angle = 0;
+ E_Zone *zone = NULL;
+ Eina_Bool click = EINA_FALSE;
+ Eina_Bool flick_state = EINA_FALSE;
+ Evas_Event_Mouse_Up *mouse_up_event;
+ int check_w, check_h;
+
+ info = (E_Move_Event_Motion_Info *)event_info;
+ if (!mb || !info) return EINA_FALSE;
+
+ mouse_up_event = info->event_info;
+ E_CHECK_RETURN(mouse_up_event, EINA_FALSE);
+ if (mouse_up_event->button != 1)
+ return EINA_FALSE;
+
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s w:0x%08x ,angle:%d, (%d,%d) %s()\n",
+ "EVAS_OBJ", mb->bd->win, mb->angle, info->coord.x, info->coord.y,
+ __func__);
+
+ angle = mb->angle;
+ zone = mb->bd->zone;
+
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco)
+ {
+ if (!mco) continue;
+ click = e_mod_move_event_click_get(mco->event);
+ }
+ E_CHECK_GOTO(click, finish);
+
+ e_mod_move_flick_data_update(mb, info->coord.x, info->coord.y);
+ flick_state = e_mod_move_flick_state_get(mb, EINA_FALSE);
+ if (_e_mod_move_apptray_flick_process(mb, angle, flick_state))
+ {
+ return EINA_TRUE;
+ }
+
+ switch (angle)
+ {
+ case 0:
+ check_h = mb->y + mb->h;
+ if (check_h) check_h /= 2;
+ if (info->coord.y < check_h)
+ {
+ e_mod_move_apptray_e_border_move(mb, 0, mb->h * -1);
+ e_mod_move_apptray_objs_animation_move(mb, 0, mb->h * -1);
+ }
+ else
+ {
+ e_mod_move_apptray_objs_animation_move(mb, 0, 0);
+ }
+ break;
+ case 90:
+ check_w = mb->w;
+ if (check_w) check_w /= 2;
+ if (info->coord.x < check_w)
+ {
+ e_mod_move_apptray_e_border_move(mb, mb->w * -1, 0);
+ e_mod_move_apptray_objs_animation_move(mb, mb->w * -1, 0);
+ }
+ else
+ {
+ e_mod_move_apptray_objs_animation_move(mb, 0, 0);
+ }
+ break;
+ case 180:
+ check_h = mb->h;
+ if (check_h) check_h /= 2;
+ if (info->coord.y > (zone->h - check_h))
+ {
+ e_mod_move_apptray_e_border_move(mb, 0, zone->h);
+ e_mod_move_apptray_objs_animation_move(mb, 0, zone->h);
+ }
+ else
+ {
+ e_mod_move_apptray_objs_animation_move(mb, 0, (zone->h - mb->h));
+ }
+ break;
+ case 270:
+ check_w = mb->w;
+ if (check_w) check_w /= 2;
+ if (info->coord.x > (zone->w - check_w))
+ {
+ e_mod_move_apptray_e_border_move(mb, zone->w, 0);
+ e_mod_move_apptray_objs_animation_move(mb, zone->w, 0);
+ }
+ else
+ {
+ e_mod_move_apptray_objs_animation_move(mb, zone->w - mb->w, 0);
+ }
+ break;
+ default :
+ break;
+ }
+
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco)
+ {
+ if (!mco) continue;
+ e_mod_move_event_click_set(mco->event, EINA_FALSE);
+ }
+
+finish:
+ if (mb->flick_data) e_mod_move_flick_data_free(mb);
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_apptray_objs_position_set(E_Move_Border *mb,
+ int x,
+ int y)
+{
+ E_Move_Apptray_Data *at_data = NULL;
+ at_data = (E_Move_Apptray_Data *)mb->data;
+ if (!at_data)
+ at_data = (E_Move_Apptray_Data *)e_mod_move_apptray_internal_data_add(mb);
+ E_CHECK_RETURN(at_data, EINA_FALSE);
+
+ at_data->x = x;
+ at_data->y = y;
+ mb->data = at_data;
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_apptray_objs_position_get(E_Move_Border *mb,
+ int *x,
+ int *y)
+{
+ E_Move_Apptray_Data *at_data = NULL;
+ at_data = (E_Move_Apptray_Data *)mb->data;
+ E_CHECK_RETURN(at_data, EINA_FALSE);
+
+ *x = at_data->x;
+ *y = at_data->y;
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_apptray_objs_animation_frame(void *data,
+ double pos)
+{
+ E_Move_Apptray_Animation_Data *anim_data = NULL;
+ E_Move_Border *mb = NULL;
+ double frame = pos;
+ int x, y;
+
+ anim_data = (E_Move_Apptray_Animation_Data *)data;
+ E_CHECK_RETURN(anim_data, EINA_FALSE);
+
+ mb = e_mod_move_apptray_find();
+ E_CHECK_RETURN(mb, EINA_FALSE);
+
+ frame = ecore_animator_pos_map(pos, ECORE_POS_MAP_ACCELERATE, 0.0, 0.0);
+ x = anim_data->sx + anim_data->dx * frame;
+ y = anim_data->sy + anim_data->dy * frame;
+
+ e_mod_move_apptray_objs_move(mb, x, y);
+
+ if (pos >= 1.0)
+ {
+ // apptray_objs_animation_layer_unset
+ e_mod_move_apptray_objs_animation_layer_unset(mb);
+
+ if (!(REGION_INSIDE_ZONE(mb, mb->bd->zone)))
+ {
+ e_border_focus_set(mb->bd, 0, 0);
+ e_border_lower(mb->bd);
+ e_mod_move_apptray_dim_hide(mb);
+ }
+
+ // send apptray to "move end message".
+ LOG(LOG_DEBUG, "WM_WINDOW_SHOW", "[e17:X_CLIENT_MESSAGE:Apptray:ANIMATION_END]");
+ e_mod_move_apptray_anim_state_send(mb, EINA_FALSE);
+
+ e_mod_move_apptray_objs_del(mb);
+
+ memset(anim_data, 0, sizeof(E_Move_Apptray_Animation_Data));
+ E_FREE(anim_data);
+ mb->anim_data = NULL;
+ }
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_apptray_flick_process(E_Move_Border *mb,
+ int angle,
+ Eina_Bool state)
+{
+ E_Move_Control_Object *mco = NULL;
+ E_Zone *zone = NULL;
+ Eina_List *l;
+ int x, y;
+
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_APPTRAY_CHECK(mb), EINA_FALSE);
+ E_CHECK_RETURN(state, EINA_FALSE);
+
+ zone = mb->bd->zone;
+
+ /* apptray click unset */
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco)
+ {
+ if (!mco) continue;
+ e_mod_move_event_click_set(mco->event, EINA_FALSE);
+ }
+
+ e_mod_move_flick_data_free(mb);
+
+ switch (angle)
+ {
+ case 90: x = mb->w * -1; y = 0; break;
+ case 180: x = 0; y = zone->h; break;
+ case 270: x = zone->w; y = 0; break;
+ case 0:
+ default : x = 0; y = mb->h * -1; break;
+ }
+
+ e_mod_move_apptray_e_border_move(mb, x, y);
+ e_mod_move_apptray_objs_animation_move(mb, x, y);
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_apptray_dim_objs_apply(E_Move_Border *mb,
+ int x,
+ int y)
+{
+ int angle;
+ int mx, my;
+ int opacity;
+ E_Zone *zone = NULL;
+ int dim_max = 255;
+ E_Move_Apptray_Data *at_data = NULL;
+
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_APPTRAY_CHECK(mb), EINA_FALSE);
+ E_CHECK_RETURN(mb->data, EINA_FALSE);
+
+ at_data = (E_Move_Apptray_Data *)mb->data;
+ E_CHECK_RETURN(at_data->dim_objs, EINA_FALSE);
+
+ angle = mb->angle;
+ zone = mb->bd->zone;
+ dim_max = mb->m->dim_max_opacity;
+
+ switch (angle)
+ {
+ case 90:
+ mx = x + mb->w;
+ if (mb->w)
+ opacity = dim_max * mx / mb->w;
+ else
+ opacity = dim_max;
+ break;
+ case 180:
+ my = zone->h - y;
+ if (mb->h)
+ opacity = dim_max * my / mb->h;
+ else
+ opacity = dim_max;
+ break;
+ case 270:
+ mx = zone->w - x;
+ if (mb->w)
+ opacity = dim_max * mx / mb->w;
+ else
+ opacity = dim_max;
+ break;
+ case 0:
+ default :
+ my = y + mb->h;
+ if (mb->h)
+ opacity = dim_max * my / mb->h;
+ else
+ opacity = dim_max;
+ break;
+ }
+
+ e_mod_move_bd_move_dim_objs_opacity_set(at_data->dim_objs, opacity);
+ at_data->opacity = opacity;
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_apptray_cb_bg_touch_dn(void *data,
+ int type __UNUSED__,
+ void *event)
+{
+ Ecore_Event_Mouse_Button *ev = (Ecore_Event_Mouse_Button *)event;
+ E_Move_Apptray_Data *at_data = (E_Move_Apptray_Data *)data;
+
+ E_CHECK_RETURN(at_data, ECORE_CALLBACK_PASS_ON);
+ E_CHECK_RETURN(ev, ECORE_CALLBACK_PASS_ON);
+
+ if (ev->buttons != 1)
+ return ECORE_CALLBACK_PASS_ON;
+
+ if (ev->event_window != at_data->bg_touch.win)
+ return ECORE_CALLBACK_PASS_ON;
+
+ at_data->bg_touch.click = EINA_TRUE;
+
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+static Eina_Bool
+_e_mod_move_apptray_cb_bg_touch_up(void *data,
+ int type __UNUSED__,
+ void *event)
+{
+ Ecore_Event_Mouse_Button *ev = (Ecore_Event_Mouse_Button *)event;
+ E_Move_Apptray_Data *at_data = (E_Move_Apptray_Data *)data;
+ Eina_Bool state;
+ E_Move_Border *at_mb = NULL;
+ E_Zone *zone = NULL;
+ Ecore_X_Window at_win;
+ int angles[2];
+ int x, y;
+ x = 0; y = 0;
+
+ E_CHECK_RETURN(at_data, ECORE_CALLBACK_PASS_ON);
+ E_CHECK_RETURN(ev, ECORE_CALLBACK_PASS_ON);
+
+ if (ev->buttons != 1)
+ return ECORE_CALLBACK_PASS_ON;
+
+ if (ev->event_window != at_data->bg_touch.win)
+ return ECORE_CALLBACK_PASS_ON;
+
+ E_CHECK_RETURN(at_data->bg_touch.click, ECORE_CALLBACK_PASS_ON);
+
+ at_mb = e_mod_move_apptray_find();
+ E_CHECK_RETURN(at_mb, ECORE_CALLBACK_PASS_ON);
+
+ at_win = e_mod_move_util_client_xid_get(at_mb);
+ if (e_mod_move_util_win_prop_angle_get(at_win, &angles[0], &angles[1]))
+ angles[0] %= 360;
+ else
+ angles[0] = 0;
+
+ zone = at_mb->bd->zone;
+
+ if (REGION_INSIDE_ZONE(at_mb, zone)) state = EINA_TRUE;
+ else state = EINA_FALSE;
+
+ if (state && at_mb->visible)
+ {
+ switch (angles[0])
+ {
+ case 0:
+ x = 0;
+ y = at_mb->h * -1;
+ break;
+ case 90:
+ x = at_mb->w * -1;
+ y = 0;
+ break;
+ case 180:
+ x = 0;
+ y = zone->h;
+ break;
+ case 270:
+ x = zone->w;
+ y = 0;
+ break;
+ default :
+ x = 0;
+ y = at_mb->h * -1;
+ break;
+ }
+
+ if (e_mod_move_apptray_objs_animation_state_get(at_mb))
+ {
+ e_mod_move_apptray_objs_animation_stop(at_mb);
+ e_mod_move_apptray_objs_animation_clear(at_mb);
+ }
+ e_mod_move_apptray_objs_add(at_mb);
+
+ // send apptray to "move start message".
+ e_mod_move_apptray_anim_state_send(at_mb, EINA_TRUE);
+
+ // apptray_objs_animation_layer_set
+ e_mod_move_apptray_objs_animation_layer_set(at_mb);
+
+ e_mod_move_apptray_e_border_move(at_mb, x, y);
+ e_mod_move_apptray_objs_animation_move(at_mb, x, y);
+ }
+
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+static void
+_e_mod_move_apptray_bg_touch_win_show(E_Move_Border *mb)
+{
+ E_Move_Apptray_Data *at_data = NULL;
+ E_Border *bd = NULL;
+ E_Zone *zone = NULL;
+
+ E_CHECK(mb);
+ E_CHECK(TYPE_APPTRAY_CHECK(mb));
+ at_data = (E_Move_Apptray_Data *)mb->data;
+
+ bd = mb->bd;
+ zone = bd->zone;
+
+ E_CHECK(at_data);
+
+ if (at_data->bg_touch.win) return;
+
+ at_data->bg_touch.win = ecore_x_window_input_new(0, zone->x, zone->y,
+ zone->w, zone->h);
+ ecore_x_icccm_title_set(at_data->bg_touch.win, "E MOVE Apptray BG Touch");
+ ecore_x_window_show(at_data->bg_touch.win);
+
+ at_data->bg_touch.dn_h = ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_DOWN,
+ _e_mod_move_apptray_cb_bg_touch_dn,
+ (void*)at_data);
+ at_data->bg_touch.up_h = ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_UP,
+ _e_mod_move_apptray_cb_bg_touch_up,
+ (void*)at_data);
+
+ // Stack re-arrange
+ ecore_x_window_configure(at_data->bg_touch.win,
+ ECORE_X_WINDOW_CONFIGURE_MASK_SIBLING |
+ ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE,
+ zone->x, zone->y,
+ zone->w, zone->h, 0,
+ bd->win, ECORE_X_WINDOW_STACK_BELOW);
+}
+
+static void
+_e_mod_move_apptray_bg_touch_win_hide(E_Move_Border *mb)
+{
+ E_Move_Apptray_Data *at_data = NULL;
+
+ E_CHECK(mb);
+ E_CHECK(TYPE_APPTRAY_CHECK(mb));
+ at_data = (E_Move_Apptray_Data *)mb->data;
+
+ E_CHECK(at_data);
+
+ E_CHECK(at_data->bg_touch.win);
+
+ if (at_data->bg_touch.dn_h)
+ {
+ ecore_event_handler_del(at_data->bg_touch.dn_h);
+ at_data->bg_touch.dn_h = NULL;
+ }
+ if (at_data->bg_touch.up_h)
+ {
+ ecore_event_handler_del(at_data->bg_touch.up_h);
+ at_data->bg_touch.up_h = NULL;
+ }
+
+ ecore_x_window_hide(at_data->bg_touch.win);
+ ecore_x_window_free(at_data->bg_touch.win);
+ at_data->bg_touch.win = 0;
+}
+
+static Ecore_X_Window
+_e_mod_move_apptray_bg_touch_win_get(E_Move_Border *mb)
+{
+ E_Move_Apptray_Data *at_data = NULL;
+
+ E_CHECK_RETURN(mb, 0);
+ E_CHECK_RETURN(TYPE_APPTRAY_CHECK(mb), 0);
+ at_data = (E_Move_Apptray_Data *)mb->data;
+
+ E_CHECK_RETURN(at_data, 0);
+
+ E_CHECK_RETURN(at_data->bg_touch.win, 0);
+
+ return at_data->bg_touch.win;
+}
+
+/* externally accessible functions */
+EINTERN void
+e_mod_move_apptray_ctl_obj_event_setup(E_Move_Border *mb,
+ E_Move_Control_Object *mco)
+{
+ E_CHECK(mb);
+ E_CHECK(mco);
+ E_CHECK(TYPE_APPTRAY_CHECK(mb));
+
+ mco->event = e_mod_move_event_new(mb->bd->client.win, mco->obj);
+ E_CHECK(mco->event);
+
+ e_mod_move_event_data_type_set(mco->event, E_MOVE_EVENT_DATA_TYPE_BORDER);
+ e_mod_move_event_angle_cb_set(mco->event,
+ e_mod_move_util_win_prop_angle_get);
+ e_mod_move_event_cb_set(mco->event, E_MOVE_EVENT_TYPE_MOTION_START,
+ _e_mod_move_apptray_cb_motion_start, mb);
+ e_mod_move_event_cb_set(mco->event, E_MOVE_EVENT_TYPE_MOTION_MOVE,
+ _e_mod_move_apptray_cb_motion_move, mb);
+ e_mod_move_event_cb_set(mco->event, E_MOVE_EVENT_TYPE_MOTION_END,
+ _e_mod_move_apptray_cb_motion_end, mb);
+ e_mod_move_event_send_all_set(mco->event, EINA_TRUE);
+}
+
+EINTERN E_Move_Border *
+e_mod_move_apptray_find(void)
+{
+ E_Move *m;
+ E_Move_Border *mb;
+
+ m = e_mod_move_util_get();
+ E_CHECK_RETURN(m, 0);
+
+ EINA_INLIST_REVERSE_FOREACH(m->borders, mb)
+ {
+ if (TYPE_APPTRAY_CHECK(mb)) return mb;
+ }
+ return NULL;
+}
+
+EINTERN Eina_Bool
+e_mod_move_apptray_click_get(void)
+{
+ E_Move_Border *mb = NULL;
+ Eina_Bool click = EINA_FALSE;
+ E_Move_Control_Object *mco = NULL;
+ Eina_List *l;
+
+ mb = e_mod_move_apptray_find();
+ E_CHECK_RETURN(mb, EINA_FALSE);
+
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco)
+ {
+ if (!mco) continue;
+ click = e_mod_move_event_click_get(mco->event);
+ }
+
+ return click;
+}
+
+EINTERN Eina_Bool
+e_mod_move_apptray_event_clear(void)
+{
+ E_Move_Border *mb = NULL;
+ Eina_Bool click = EINA_FALSE;
+ E_Move_Control_Object *mco = NULL;
+ Eina_List *l;
+
+ mb = e_mod_move_apptray_find();
+ E_CHECK_RETURN(mb, EINA_FALSE);
+
+ click = e_mod_move_apptray_click_get();
+ E_CHECK_RETURN(click, EINA_FALSE);
+
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco)
+ {
+ if (!mco) continue;
+ e_mod_move_event_data_clear(mco->event);
+ e_mod_move_event_click_set(mco->event, EINA_FALSE);
+ }
+
+ if (mb->flick_data) e_mod_move_flick_data_free(mb);
+
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_apptray_objs_add(E_Move_Border *mb)
+{
+ Eina_Bool mirror = EINA_TRUE;
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_APPTRAY_CHECK(mb), EINA_FALSE);
+
+ if (!(mb->objs))
+ {
+ mb->objs = e_mod_move_bd_move_objs_add(mb, mirror);
+ e_mod_move_bd_move_objs_move(mb, mb->x, mb->y);
+ e_mod_move_bd_move_objs_resize(mb, mb->w, mb->h);
+ e_mod_move_bd_move_objs_show(mb);
+ }
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_apptray_objs_del(E_Move_Border *mb)
+{
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_APPTRAY_CHECK(mb), EINA_FALSE);
+ e_mod_move_bd_move_objs_del(mb, mb->objs);
+ mb->objs = NULL;
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_apptray_objs_move(E_Move_Border *mb,
+ int x,
+ int y)
+{
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_APPTRAY_CHECK(mb), EINA_FALSE);
+
+ e_mod_move_bd_move_objs_move(mb, x, y);
+ _e_mod_move_apptray_objs_position_set(mb, x, y);
+ _e_mod_move_apptray_dim_objs_apply(mb, x, y);
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_apptray_objs_raise(E_Move_Border *mb)
+{
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_APPTRAY_CHECK(mb), EINA_FALSE);
+ e_mod_move_bd_move_objs_raise(mb);
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_apptray_objs_animation_move(E_Move_Border *mb,
+ int x,
+ int y)
+{
+ E_Move_Apptray_Animation_Data *anim_data = NULL;
+ Ecore_Animator *animator = NULL;
+ int sx, sy; //start x, start y
+ double anim_time = 0.0;
+
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_APPTRAY_CHECK(mb), EINA_FALSE);
+ E_CHECK_RETURN(mb->m, EINA_FALSE);
+ anim_time = mb->m->animation_duration;
+
+ if (e_mod_move_apptray_objs_animation_state_get(mb))
+ {
+ e_mod_move_apptray_objs_animation_stop(mb);
+ e_mod_move_apptray_objs_animation_clear(mb);
+ }
+
+ anim_data = E_NEW(E_Move_Apptray_Animation_Data, 1);
+ E_CHECK_RETURN(anim_data, EINA_FALSE);
+
+ if (_e_mod_move_apptray_objs_position_get(mb, &sx, &sy))
+ {
+ anim_data->sx = sx;
+ anim_data->sy = sy;
+ }
+ else
+ {
+ anim_data->sx = mb->x;
+ anim_data->sy = mb->y;
+ _e_mod_move_apptray_objs_position_set(mb,
+ anim_data->sx,
+ anim_data->sy);
+ }
+
+ anim_data->ex = x;
+ anim_data->ey = y;
+ anim_data->dx = anim_data->ex - anim_data->sx;
+ anim_data->dy = anim_data->ey - anim_data->sy;
+ animator = ecore_animator_timeline_add(anim_time,
+ _e_mod_move_apptray_objs_animation_frame,
+ anim_data);
+ if (!animator)
+ {
+ memset(anim_data, 0, sizeof(E_Move_Apptray_Animation_Data));
+ E_FREE(anim_data);
+ return EINA_FALSE;
+ }
+
+ anim_data->animator = animator;
+ anim_data->animating = EINA_TRUE;
+ mb->anim_data = anim_data;
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_apptray_objs_animation_state_get(E_Move_Border *mb)
+{
+ E_Move_Apptray_Animation_Data *anim_data = NULL;
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_APPTRAY_CHECK(mb), EINA_FALSE);
+
+ E_CHECK_RETURN(mb->anim_data, EINA_FALSE);
+ anim_data = (E_Move_Apptray_Animation_Data *)mb->anim_data;
+ E_CHECK_RETURN(anim_data->animating, EINA_FALSE);
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_apptray_objs_animation_stop(E_Move_Border *mb)
+{
+ E_Move_Apptray_Animation_Data *anim_data = NULL;
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_APPTRAY_CHECK(mb), EINA_FALSE);
+
+ E_CHECK_RETURN(mb->anim_data, EINA_FALSE);
+ anim_data = (E_Move_Apptray_Animation_Data *)mb->anim_data;
+ ecore_animator_freeze(anim_data->animator);
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_apptray_objs_animation_clear(E_Move_Border *mb)
+{
+ E_Move_Apptray_Animation_Data *anim_data = NULL;
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_APPTRAY_CHECK(mb), EINA_FALSE);
+
+ E_CHECK_RETURN(mb->anim_data, EINA_FALSE);
+ anim_data = (E_Move_Apptray_Animation_Data *)mb->anim_data;
+ ecore_animator_del(anim_data->animator);
+ memset(anim_data, 0, sizeof(E_Move_Apptray_Animation_Data));
+ E_FREE(anim_data);
+ mb->anim_data = NULL;
+
+ return EINA_TRUE;
+}
+
+EINTERN void*
+e_mod_move_apptray_internal_data_add(E_Move_Border *mb)
+{
+ E_Move_Apptray_Data *at_data = NULL;
+ int dim_min = 0;
+ E_CHECK_RETURN(mb, NULL);
+ E_CHECK_RETURN(TYPE_APPTRAY_CHECK(mb), NULL);
+ E_CHECK_RETURN(mb->m, NULL);
+ at_data = (E_Move_Apptray_Data *)mb->data;
+ dim_min = mb->m->dim_min_opacity;
+ if (!at_data)
+ {
+ at_data = E_NEW(E_Move_Apptray_Data, 1);
+ E_CHECK_RETURN(at_data, NULL);
+ at_data->x = mb->x;
+ at_data->y = mb->y;
+ at_data->dim_objs = NULL;
+ at_data->opacity = dim_min;
+ mb->data = at_data;
+ }
+ return mb->data;
+}
+
+EINTERN Eina_Bool
+e_mod_move_apptray_internal_data_del(E_Move_Border *mb)
+{
+ E_Move_Apptray_Data *at_data = NULL;
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_APPTRAY_CHECK(mb), EINA_FALSE);
+ E_CHECK_RETURN(mb->data, EINA_FALSE);
+ at_data = (E_Move_Apptray_Data *)mb->data;
+ e_mod_move_apptray_dim_hide(mb);
+ E_FREE(at_data);
+ mb->data = NULL;
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_apptray_e_border_move(E_Move_Border *mb,
+ int x,
+ int y)
+{
+ E_Zone *zone;
+
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_APPTRAY_CHECK(mb), EINA_FALSE);
+ E_CHECK_RETURN(mb->bd, EINA_FALSE);
+
+ zone = mb->bd->zone;
+
+ /* check whether zone contains border */
+ if (E_CONTAINS(zone->x, zone->y,
+ zone->w, zone->h,
+ x, y, mb->w, mb->h))
+ {
+ e_border_raise(mb->bd);
+ e_border_focus_set(mb->bd, 1, 1);
+ }
+ else
+ {
+ e_border_focus_set(mb->bd, 0, 0);
+ }
+
+ e_border_move(mb->bd, x, y);
+
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_apptray_e_border_raise(E_Move_Border *mb)
+{
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_APPTRAY_CHECK(mb), EINA_FALSE);
+
+ e_border_raise(mb->bd);
+
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_apptray_e_border_lower(E_Move_Border *mb)
+{
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_APPTRAY_CHECK(mb), EINA_FALSE);
+
+ e_border_lower(mb->bd);
+
+ return EINA_TRUE;
+}
+
+EINTERN Eina_List*
+e_mod_move_apptray_dim_show(E_Move_Border *mb)
+{
+ int dim_min = 0;
+ E_Move_Apptray_Data *at_data = NULL;
+ E_CHECK_RETURN(mb, NULL);
+ E_CHECK_RETURN(TYPE_APPTRAY_CHECK(mb), NULL);
+ E_CHECK_RETURN(mb->m, NULL);
+ at_data = (E_Move_Apptray_Data *)mb->data;
+ dim_min = mb->m->dim_min_opacity;
+ if (!at_data)
+ {
+ at_data = E_NEW(E_Move_Apptray_Data, 1);
+ E_CHECK_RETURN(at_data, NULL);
+ // Composite mode set true
+ e_mod_move_util_compositor_composite_mode_set(mb->m, EINA_TRUE);
+
+ at_data->x = mb->x;
+ at_data->y = mb->y;
+ at_data->dim_objs = e_mod_move_bd_move_dim_objs_add(mb);
+ e_mod_move_bd_move_dim_objs_show(at_data->dim_objs);
+ at_data->opacity = dim_min;
+ mb->data = at_data;
+ e_mod_move_util_rotation_lock(mb->m);
+
+ // it is used for apptray input only window
+ _e_mod_move_apptray_bg_touch_win_show(mb);
+ }
+ else
+ {
+ if (!(at_data->dim_objs))
+ {
+ // Composite mode set true
+ e_mod_move_util_compositor_composite_mode_set(mb->m, EINA_TRUE);
+
+ at_data->dim_objs = e_mod_move_bd_move_dim_objs_add(mb);
+ if (at_data->dim_objs)
+ e_mod_move_util_rotation_lock(mb->m);
+ }
+ if (at_data->dim_objs)
+ {
+ e_mod_move_bd_move_dim_objs_show(at_data->dim_objs);
+ at_data->opacity = dim_min;
+ }
+
+ // it is used for apptray input only window
+ _e_mod_move_apptray_bg_touch_win_show(mb);
+ }
+
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s w:0x%08x %s()\n",
+ "EVAS_OBJ", mb->bd->win, __func__);
+
+ return at_data->dim_objs;
+}
+
+EINTERN Eina_Bool
+e_mod_move_apptray_dim_hide(E_Move_Border *mb)
+{
+ int dim_min = 0;
+ E_Move_Apptray_Data *at_data = NULL;
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_APPTRAY_CHECK(mb), EINA_FALSE);
+ E_CHECK_RETURN(mb->m, EINA_FALSE);
+ E_CHECK_RETURN(mb->data, EINA_FALSE);
+ at_data = (E_Move_Apptray_Data *)mb->data;
+ dim_min = mb->m->dim_min_opacity;
+ E_CHECK_RETURN(at_data->dim_objs, EINA_FALSE);
+ e_mod_move_bd_move_dim_objs_hide(at_data->dim_objs);
+ e_mod_move_bd_move_dim_objs_del(at_data->dim_objs);
+ at_data->dim_objs = NULL;
+ at_data->opacity = dim_min;
+
+ // it is used for apptray input only window
+ _e_mod_move_apptray_bg_touch_win_hide(mb);
+
+ e_mod_move_util_rotation_unlock(mb->m);
+
+ // Composite mode set false
+ e_mod_move_util_compositor_composite_mode_set(mb->m, EINA_FALSE);
+
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s w:0x%08x %s()\n",
+ "EVAS_OBJ", ((mb->bd) ? mb->bd->win : NULL), __func__);
+
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_apptray_restack_post_process(E_Move_Border *mb)
+{
+ Ecore_X_Window win;
+ E_Border *bd = NULL;
+ E_Zone *zone = NULL;
+
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_APPTRAY_CHECK(mb), EINA_FALSE);
+
+ bd = mb->bd;
+ E_CHECK_RETURN(bd, EINA_FALSE);
+ zone = bd->zone;
+ E_CHECK_RETURN(zone, EINA_FALSE);
+
+ if ((win = _e_mod_move_apptray_bg_touch_win_get(mb)))
+ {
+ // Stack re-arrange
+ ecore_x_window_configure(win,
+ ECORE_X_WINDOW_CONFIGURE_MASK_SIBLING |
+ ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE,
+ zone->x, zone->y,
+ zone->w, zone->h, 0,
+ bd->win, ECORE_X_WINDOW_STACK_BELOW);
+ }
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_apptray_objs_animation_start_position_set(E_Move_Border *mb,
+ int angle)
+{
+ E_Zone *zone;
+ int x, y;
+
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_APPTRAY_CHECK(mb), EINA_FALSE);
+
+ angle = ((angle % 360) / 90) * 90;
+ zone = mb->bd->zone;
+
+ switch (angle)
+ {
+ case 90: x = mb->w * -1; y = 0; break;
+ case 180: x = 0; y = zone->y + zone->h; break;
+ case 270: x = zone->x + zone->w; y = 0; break;
+ case 0:
+ default : x = 0; y = mb->h * -1; break;
+ }
+
+ _e_mod_move_apptray_objs_position_set(mb, x, y);
+
+ return EINA_TRUE;
+}
+
+EINTERN E_Move_Event_Cb
+e_mod_move_apptray_event_cb_get(E_Move_Event_Type type)
+{
+ if (type == E_MOVE_EVENT_TYPE_MOTION_START)
+ return _e_mod_move_apptray_cb_motion_start;
+ else if (type == E_MOVE_EVENT_TYPE_MOTION_MOVE)
+ return _e_mod_move_apptray_cb_motion_move;
+ else if (type == E_MOVE_EVENT_TYPE_MOTION_END)
+ return _e_mod_move_apptray_cb_motion_end;
+ else
+ return NULL;
+}
+
+EINTERN Eina_Bool
+e_mod_move_apptray_anim_state_send(E_Move_Border *mb,
+ Eina_Bool state)
+{
+ long d[5] = {0L, 0L, 0L, 0L, 0L};
+ Ecore_X_Window win;
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_APPTRAY_CHECK(mb), EINA_FALSE);
+
+ win = e_mod_move_util_client_xid_get(mb);
+ E_CHECK_RETURN(win, 0);
+
+ if (state) d[0] = 1L;
+ else d[0] = 0L;
+
+ ecore_x_client_message32_send
+ (win, ATOM_MV_APPTRAY_STATE,
+ ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
+ d[0], d[1], d[2], d[3], d[4]);
+
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_apptray_objs_animation_layer_set(E_Move_Border *mb)
+{
+ E_Move *m = e_mod_move_util_get();
+ E_Move_Border *find_mb = NULL;
+ E_Move_Border *indi_mb = NULL;
+ E_Move_Border *state_above_mb = NULL;
+ E_Zone *zone = NULL;
+ Ecore_X_Window win;
+ Eina_Bool found = EINA_FALSE;
+ E_Move_Apptray_Data *at_data = NULL;
+
+ E_CHECK_RETURN(m, EINA_FALSE);
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_APPTRAY_CHECK(mb), EINA_FALSE);
+
+ at_data = (E_Move_Apptray_Data *)mb->data;
+ E_CHECK_RETURN(at_data, EINA_FALSE);
+
+ at_data->animation_layer_info.indicator.layer_set = EINA_FALSE;
+ at_data->animation_layer_info.state_above.layer_set = EINA_FALSE;
+ at_data->animation_layer_info.state_above.win = 0;
+
+ EINA_INLIST_REVERSE_FOREACH(m->borders, find_mb)
+ {
+ if (find_mb->bd
+ && (find_mb->bd->layer == e_mod_move_util_layer_policy_get(E_MOVE_STATE_ABOVE_LAYER))
+ && (find_mb->visible))
+ {
+ win = find_mb->bd->client.win;
+ found = EINA_TRUE;
+ }
+
+ if (find_mb->bd
+ && (find_mb->bd->layer < e_mod_move_util_layer_policy_get(E_MOVE_STATE_ABOVE_LAYER)))
+ {
+ break;
+ }
+ }
+
+ if (found)
+ {
+ at_data->animation_layer_info.state_above.layer_set = EINA_TRUE;
+ at_data->animation_layer_info.state_above.win = win;
+ state_above_mb = e_mod_move_border_client_find(win);
+ if (state_above_mb
+ && !(state_above_mb->objs))
+ {
+ state_above_mb->objs = e_mod_move_bd_move_objs_add(state_above_mb, EINA_TRUE);
+ e_mod_move_bd_move_objs_move(state_above_mb, state_above_mb->x, state_above_mb->y);
+ e_mod_move_bd_move_objs_resize(state_above_mb, state_above_mb->w, state_above_mb->h);
+ e_mod_move_bd_move_objs_show(state_above_mb);
+ }
+
+ // apptray mirror object stack below to state_above object .
+ e_mod_move_bd_move_objs_stack_below(mb, state_above_mb); // mb : apptray move border
+
+ // indicator window mirror object stack control
+ indi_mb = e_mod_move_indicator_find();
+ zone = mb->bd->zone;
+ if ((indi_mb)
+ && (indi_mb->visible)
+ && (REGION_INSIDE_ZONE(indi_mb, zone))
+ && (!m->elm_indicator_mode))
+ {
+ at_data->animation_layer_info.indicator.layer_set = EINA_TRUE;
+ if (!(indi_mb->objs))
+ {
+ indi_mb->objs = e_mod_move_bd_move_objs_add(indi_mb, EINA_TRUE);
+ e_mod_move_bd_move_objs_move(indi_mb, indi_mb->x, indi_mb->y);
+ e_mod_move_bd_move_objs_resize(indi_mb, indi_mb->w, indi_mb->h);
+ e_mod_move_bd_move_objs_show(indi_mb);
+ }
+
+ // indicator mirror object stack below to apptray.
+ e_mod_move_bd_move_objs_stack_below(indi_mb, mb); // mb : apptray move border
+ }
+ }
+ else
+ {
+ e_mod_move_apptray_objs_raise(mb);
+ }
+
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_apptray_objs_animation_layer_unset(E_Move_Border *mb)
+{
+ E_Move_Border *indi_mb = NULL;
+ E_Move_Border *state_above_mb = NULL;
+ E_Move_Apptray_Data *at_data = NULL;
+ Ecore_X_Window win;
+
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_APPTRAY_CHECK(mb), EINA_FALSE);
+
+ at_data = (E_Move_Apptray_Data *)mb->data;
+ E_CHECK_RETURN(at_data, EINA_FALSE);
+
+ if (at_data->animation_layer_info.indicator.layer_set)
+ {
+ if ((indi_mb = e_mod_move_indicator_find())
+ && (!indi_mb->animate_move))
+ {
+ e_mod_move_bd_move_objs_del(indi_mb, indi_mb->objs);
+ indi_mb->objs = NULL;
+ }
+ }
+
+ if (at_data->animation_layer_info.state_above.layer_set)
+ {
+ win = at_data->animation_layer_info.state_above.win;
+ if ((state_above_mb = e_mod_move_border_client_find(win))
+ && (!state_above_mb->animate_move))
+ {
+ e_mod_move_bd_move_objs_del(state_above_mb, state_above_mb->objs);
+ state_above_mb->objs = NULL;
+ }
+ }
+
+ at_data->animation_layer_info.state_above.layer_set = EINA_FALSE;
+ at_data->animation_layer_info.indicator.layer_set = EINA_FALSE;
+ at_data->animation_layer_info.state_above.win = 0;
+
+ return EINA_TRUE;
+}
--- /dev/null
+#ifdef E_TYPEDEFS
+#else
+#ifndef E_MOD_MOVE_APPTRAY_H
+#define E_MOD_MOVE_APPTRAY_H
+
+struct _E_Move_Apptray_Data
+{
+ int x; // current move x position
+ int y; // current move y position
+ Eina_List *dim_objs; // dim evas_obj
+ int opacity; // current dim opacity
+
+ struct {
+ Ecore_X_Window win;
+ Eina_Bool click; // check for mouse down
+ Ecore_Event_Handler *dn_h; // mouse down event handler
+ Ecore_Event_Handler *up_h; // mouse uy event handler
+ } bg_touch;
+
+ struct {
+ struct {
+ Eina_Bool layer_set;
+ } indicator;
+ struct {
+ Eina_Bool layer_set;
+ Ecore_X_Window win; // multi window's lowest window id. mirror object is made by this window id. for apptay mirror object stack set.
+ } state_above; //if multi window exist, then state_above value set true.
+ } animation_layer_info;
+};
+
+typedef struct _E_Move_Apptray_Data E_Move_Apptray_Data;
+typedef struct _E_Move_Apptray_Animation_Data E_Move_Apptray_Animation_Data;
+
+EINTERN void e_mod_move_apptray_ctl_obj_event_setup(E_Move_Border *mb, E_Move_Control_Object *mco);
+EINTERN E_Move_Border *e_mod_move_apptray_find(void);
+EINTERN Eina_Bool e_mod_move_apptray_click_get(void);
+EINTERN Eina_Bool e_mod_move_apptray_event_clear(void);
+EINTERN Eina_Bool e_mod_move_apptray_objs_add(E_Move_Border *mb);
+EINTERN Eina_Bool e_mod_move_apptray_objs_del(E_Move_Border *mb);
+EINTERN Eina_Bool e_mod_move_apptray_objs_move(E_Move_Border *mb, int x, int y);
+EINTERN Eina_Bool e_mod_move_apptray_objs_raise(E_Move_Border *mb);
+EINTERN Eina_Bool e_mod_move_apptray_objs_animation_move(E_Move_Border *mb, int x, int y);
+EINTERN Eina_Bool e_mod_move_apptray_objs_animation_state_get(E_Move_Border *mb);
+EINTERN Eina_Bool e_mod_move_apptray_objs_animation_stop(E_Move_Border *mb);
+EINTERN Eina_Bool e_mod_move_apptray_objs_animation_clear(E_Move_Border *mb);
+EINTERN void* e_mod_move_apptray_internal_data_add(E_Move_Border *mb);
+EINTERN Eina_Bool e_mod_move_apptray_internal_data_del(E_Move_Border *mb);
+EINTERN Eina_Bool e_mod_move_apptray_e_border_move(E_Move_Border *mb, int x, int y);
+EINTERN Eina_Bool e_mod_move_apptray_e_border_raise(E_Move_Border *mb);
+EINTERN Eina_Bool e_mod_move_apptray_e_border_lower(E_Move_Border *mb);
+EINTERN Eina_List* e_mod_move_apptray_dim_show(E_Move_Border *mb);
+EINTERN Eina_Bool e_mod_move_apptray_dim_hide(E_Move_Border *mb);
+EINTERN Eina_Bool e_mod_move_apptray_restack_post_process(E_Move_Border *mb);
+EINTERN Eina_Bool e_mod_move_apptray_objs_animation_start_position_set(E_Move_Border *mb, int angle);
+EINTERN E_Move_Event_Cb e_mod_move_apptray_event_cb_get(E_Move_Event_Type type);
+EINTERN Eina_Bool e_mod_move_apptray_anim_state_send(E_Move_Border *mb, Eina_Bool state);
+EINTERN Eina_Bool e_mod_move_apptray_objs_animation_layer_set(E_Move_Border *mb);
+EINTERN Eina_Bool e_mod_move_apptray_objs_animation_layer_unset(E_Move_Border *mb);
+
+#endif
+#endif
--- /dev/null
+#include "e.h"
+#include "e_mod_move_atoms.h"
+#include "e_mod_move_debug.h"
+
+/* atoms */
+EINTERN Ecore_X_Atom ATOM_CM_LOG = 0;
+EINTERN Ecore_X_Atom ATOM_MV_LOG = 0;
+EINTERN Ecore_X_Atom ATOM_MV_LOG_DUMP_DONE = 0;
+EINTERN Ecore_X_Atom ATOM_EFFECT_ENABLE = 0;
+EINTERN Ecore_X_Atom ATOM_CM_WINDOW_INPUT_REGION = 0;
+EINTERN Ecore_X_Atom ATOM_CM_WINDOW_CONTENTS_REGION = 0;
+EINTERN Ecore_X_Atom ATOM_WM_WINDOW_SHOW = 0;
+EINTERN Ecore_X_Atom ATOM_ROTATION_LOCK = 0;
+EINTERN Ecore_X_Atom ATOM_MV_FULLSCREEN_INDICATOR_SHOW = 0;
+EINTERN Ecore_X_Atom ATOM_MV_APPTRAY_STATE = 0;
+EINTERN Ecore_X_Atom ATOM_MV_MINI_APPTRAY_STATE = 0;
+EINTERN Ecore_X_Atom ATOM_MV_QUICKPANEL_STATE = 0;
+EINTERN Ecore_X_Atom ATOM_CLIENT_PANEL = 0;
+EINTERN Ecore_X_Atom ATOM_MV_PANEL_SCROLLABLE_STATE = 0;
+EINTERN Ecore_X_Atom ATOM_MV_INDICATOR_GEOMETRY = 0;
+
+/* local subsystem globals */
+static Eina_Hash *atoms_hash = NULL;
+
+static const char *atom_names[] = {
+ "_E_COMP_LOG",
+ "_E_MOVE_LOG",
+ "_E_MOVE_LOG_DUMP_DONE",
+ "_NET_CM_EFFECT_ENABLE",
+ "_E_COMP_WINDOW_INPUT_REGION",
+ "_E_COMP_WINDOW_CONTENTS_REGION",
+ "_NET_WM_WINDOW_SHOW",
+ "_E_ROTATION_LOCK",
+ "_E_MOVE_FULLSCREEN_INDICATOR_SHOW",
+ "_E_MOVE_APPTRAY_STATE",
+ "_E_MOVE_MINI_APPTRAY_STATE",
+ "_E_MOVE_QUICKPANEL_STATE",
+ "_NET_CLIENT_PANEL",
+ "_E_MOVE_PANEL_SCROLLABLE_STATE",
+ "_E_MOVE_INDICATOR_GEOMETRY"
+};
+
+static const char *external_atom_names[] = {
+ "WIN_ROT_ANGLE",
+ "WM_CLASS",
+ "_NET_ACTIVE_WINDOW",
+ "_E_ILLUME_INDICATOR_STATE",
+ "_E_ILLUME_QUICKPANEL_STATE",
+ "ROOT_ROT_ANGLE",
+ "_E_ILLUME_INDICATOR_TYPE_MODE"
+};
+
+/* externally accessible functions */
+EINTERN int
+e_mod_move_atoms_init(void)
+{
+ Ecore_X_Atom *atoms = NULL;
+ int n = 0, i = 0, res = 0;
+
+ if (!atoms_hash) atoms_hash = eina_hash_string_superfast_new(NULL);
+ E_CHECK_RETURN(atoms_hash, 0);
+
+ n = (sizeof(atom_names) / sizeof(char *));
+
+ atoms = E_NEW(Ecore_X_Atom, n);
+ E_CHECK_GOTO(atoms, cleanup);
+
+ ecore_x_atoms_get(atom_names, n, atoms);
+
+ ATOM_CM_LOG = atoms[i++];
+ ATOM_MV_LOG = atoms[i++];
+ ATOM_MV_LOG_DUMP_DONE = atoms[i++];
+ ATOM_EFFECT_ENABLE = atoms[i++];
+ ATOM_CM_WINDOW_INPUT_REGION = atoms[i++];
+ ATOM_CM_WINDOW_CONTENTS_REGION = atoms[i++];
+ ATOM_WM_WINDOW_SHOW = atoms[i++];
+ ATOM_ROTATION_LOCK = atoms[i++];
+ ATOM_MV_FULLSCREEN_INDICATOR_SHOW = atoms[i++];
+ ATOM_MV_APPTRAY_STATE = atoms[i++];
+ ATOM_MV_MINI_APPTRAY_STATE = atoms[i++];
+ ATOM_MV_QUICKPANEL_STATE = atoms[i++];
+ ATOM_CLIENT_PANEL = atoms[i++];
+ ATOM_MV_PANEL_SCROLLABLE_STATE = atoms[i++];
+ ATOM_MV_INDICATOR_GEOMETRY = atoms[i++];
+
+ for (i = 0; i < n; i++)
+ {
+ E_CHECK_GOTO(atoms[i], cleanup);
+ eina_hash_add(atoms_hash,
+ e_util_winid_str_get(atoms[i]),
+ atom_names[i]);
+ }
+
+ i = 0;
+ eina_hash_add(atoms_hash, e_util_winid_str_get(ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE), external_atom_names[i++]);
+ eina_hash_add(atoms_hash, e_util_winid_str_get(ECORE_X_ATOM_WM_CLASS), external_atom_names[i++]);
+ eina_hash_add(atoms_hash, e_util_winid_str_get(ECORE_X_ATOM_NET_ACTIVE_WINDOW), external_atom_names[i++]);
+ eina_hash_add(atoms_hash, e_util_winid_str_get(ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE), external_atom_names[i++]);
+ eina_hash_add(atoms_hash, e_util_winid_str_get(ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE), external_atom_names[i++]);
+ eina_hash_add(atoms_hash, e_util_winid_str_get(ECORE_X_ATOM_E_ILLUME_ROTATE_ROOT_ANGLE), external_atom_names[i++]);
+ eina_hash_add(atoms_hash, e_util_winid_str_get(ECORE_X_ATOM_E_ILLUME_INDICATOR_TYPE_MODE), external_atom_names[i++]);
+
+ res = 1;
+
+cleanup:
+ if (atoms) E_FREE(atoms);
+ return res;
+}
+
+EINTERN int
+e_mod_move_atoms_shutdown(void)
+{
+ if (atoms_hash) eina_hash_free(atoms_hash);
+ atoms_hash = NULL;
+ return 1;
+}
+
+EINTERN const char *
+e_mod_move_atoms_name_get(Ecore_X_Atom a)
+{
+ E_CHECK_RETURN(a, NULL);
+ return eina_hash_find(atoms_hash,
+ e_util_winid_str_get(a));
+}
+
--- /dev/null
+#ifdef E_TYPEDEFS
+#else
+#ifndef E_MOD_MOVE_ATOMS_H
+#define E_MOD_MOVE_ATOMS_H
+
+extern EINTERN Ecore_X_Atom ATOM_CM_LOG;
+extern EINTERN Ecore_X_Atom ATOM_MV_LOG;
+extern EINTERN Ecore_X_Atom ATOM_MV_LOG_DUMP_DONE;
+extern EINTERN Ecore_X_Atom ATOM_EFFECT_ENABLE;
+extern EINTERN Ecore_X_Atom ATOM_CM_WINDOW_INPUT_REGION;
+extern EINTERN Ecore_X_Atom ATOM_CM_WINDOW_CONTENTS_REGION;
+extern EINTERN Ecore_X_Atom ATOM_WM_WINDOW_SHOW;
+extern EINTERN Ecore_X_Atom ATOM_ROTATION_LOCK;
+extern EINTERN Ecore_X_Atom ATOM_MV_FULLSCREEN_INDICATOR_SHOW;
+extern EINTERN Ecore_X_Atom ATOM_MV_APPTRAY_STATE;
+extern EINTERN Ecore_X_Atom ATOM_MV_MINI_APPTRAY_STATE;
+extern EINTERN Ecore_X_Atom ATOM_MV_QUICKPANEL_STATE;
+extern EINTERN Ecore_X_Atom ATOM_CLIENT_PANEL;
+extern EINTERN Ecore_X_Atom ATOM_MV_PANEL_SCROLLABLE_STATE;
+extern EINTERN Ecore_X_Atom ATOM_MV_INDICATOR_GEOMETRY;
+
+EINTERN int e_mod_move_atoms_init(void);
+EINTERN int e_mod_move_atoms_shutdown(void);
+EINTERN const char *e_mod_move_atoms_name_get(Ecore_X_Atom a);
+
+#endif
+#endif
--- /dev/null
+#include "e_mod_move_shared_types.h"
+#include "e_mod_move_debug.h"
+
+/* local subsystem functions */
+
+/* externally accessible functions */
+EINTERN E_Move_Border_Contents *
+e_mod_move_border_contents_new(E_Move_Border *mb)
+{
+ E_Move_Border_Contents *contents;
+ E_CHECK_RETURN(mb, 0);
+
+ if (mb->contents) return mb->contents;
+
+ contents = E_NEW(E_Move_Border_Contents, 1);
+ E_CHECK_RETURN(contents, 0);
+
+ mb->contents = contents;
+ return contents;
+}
+
+EINTERN void
+e_mod_move_border_contents_free(E_Move_Border *mb)
+{
+ E_CHECK(mb);
+ E_CHECK(mb->contents);
+ E_FREE(mb->contents);
+ mb->contents = NULL;
+}
+
+EINTERN Eina_Bool
+e_mod_move_border_contents_rect_set(E_Move_Border *mb,
+ int x,
+ int y,
+ int w,
+ int h)
+{
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(mb->contents, EINA_FALSE);
+
+ mb->contents->x = x; mb->contents->y = y;
+ mb->contents->w = w; mb->contents->h = h;
+
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_border_contents_rect_get(E_Move_Border *mb,
+ int *x,
+ int *y,
+ int *w,
+ int *h)
+{
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(mb->contents, EINA_FALSE);
+ E_CHECK_RETURN(x, EINA_FALSE);
+ E_CHECK_RETURN(y, EINA_FALSE);
+ E_CHECK_RETURN(w, EINA_FALSE);
+ E_CHECK_RETURN(h, EINA_FALSE);
+
+ *x = mb->contents->x; *y = mb->contents->y;
+ *w = mb->contents->w; *h = mb->contents->h;
+
+ return EINA_TRUE;
+}
--- /dev/null
+#ifdef E_TYPEDEFS
+#else
+#ifndef E_MOD_MOVE_BORDER_CONTENTS_H
+#define E_MOD_MOVE_BORDER_CONTENTS_H
+
+typedef struct _E_Move_Border_Contents E_Move_Border_Contents;
+
+struct _E_Move_Border_Contents
+{
+ int x, y, w, h;
+};
+
+/* window contents region functions */
+EINTERN E_Move_Border_Contents *e_mod_move_border_contents_new(E_Move_Border *mb);
+EINTERN void e_mod_move_border_contents_free(E_Move_Border *mb);
+EINTERN Eina_Bool e_mod_move_border_contents_rect_set(E_Move_Border *mb, int x, int y, int w, int h);
+EINTERN Eina_Bool e_mod_move_border_contents_rect_get(E_Move_Border *mb, int *x, int *y, int *w, int *h);
+
+#endif
+#endif
--- /dev/null
+#include "e_mod_move_shared_types.h"
+#include "e_mod_move_debug.h"
+#include <pixman.h>
+
+
+/* local subsystem functions */
+
+/* externally accessible functions */
+EINTERN E_Move_Border_Shape_Input *
+e_mod_move_border_shape_input_new(E_Move_Border *mb)
+{
+ E_Move_Border_Shape_Input *input;
+ E_CHECK_RETURN(mb, 0);
+
+ if (mb->shape_input) return mb->shape_input;
+
+ input = E_NEW(E_Move_Border_Shape_Input, 1);
+ E_CHECK_RETURN(input, 0);
+
+ mb->shape_input = input;
+ return input;
+}
+
+EINTERN void
+e_mod_move_border_shape_input_free(E_Move_Border *mb)
+{
+ E_Border *bd = NULL;
+ E_Manager_Comp_Source *comp_src = NULL;
+ E_CHECK(mb);
+ E_CHECK(mb->shape_input);
+ E_FREE(mb->shape_input);
+ mb->shape_input = NULL;
+
+ if ((bd = e_border_find_all_by_client_window(mb->client_win)))
+ {
+ comp_src = e_manager_comp_src_get(mb->m->man, bd->win);
+ if (comp_src)
+ {
+ e_manager_comp_src_input_region_set(mb->m->man,
+ comp_src,
+ 0, 0, 0, 0);
+ }
+ }
+}
+
+EINTERN Eina_Bool
+e_mod_move_border_shape_input_rect_set(E_Move_Border *mb,
+ int x,
+ int y,
+ int w,
+ int h)
+{
+ E_Manager_Comp_Source *comp_src = NULL;
+
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(mb->shape_input, EINA_FALSE);
+
+ E_CHECK_RETURN(mb->m, EINA_FALSE);
+ E_CHECK_RETURN(mb->bd, EINA_FALSE);
+
+ comp_src = e_manager_comp_src_get(mb->m->man, mb->bd->win);
+ E_CHECK_RETURN(comp_src, EINA_FALSE);
+
+ mb->shape_input->x = x; mb->shape_input->y = y;
+ mb->shape_input->w = w; mb->shape_input->h = h;
+
+ return e_manager_comp_src_input_region_set(mb->m->man, comp_src, x, y, w, h);
+}
+
+EINTERN Eina_Bool
+e_mod_move_border_shape_input_rect_get(E_Move_Border *mb,
+ int *x,
+ int *y,
+ int *w,
+ int *h)
+{
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(mb->shape_input, EINA_FALSE);
+ E_CHECK_RETURN(x, EINA_FALSE);
+ E_CHECK_RETURN(y, EINA_FALSE);
+ E_CHECK_RETURN(w, EINA_FALSE);
+ E_CHECK_RETURN(h, EINA_FALSE);
+
+ *x = mb->shape_input->x; *y = mb->shape_input->y;
+ *w = mb->shape_input->w; *h = mb->shape_input->h;
+
+ return EINA_TRUE;
+}
--- /dev/null
+#ifdef E_TYPEDEFS
+#else
+#ifndef E_MOD_MOVE_BORDER_SHAPE_INPUT_H
+#define E_MOD_MOVE_BORDER_SHAPE_INPUT_H
+
+typedef struct _E_Move_Border_Shape_Input E_Move_Border_Shape_Input;
+
+struct _E_Move_Border_Shape_Input
+{
+ int x, y, w, h;
+};
+
+/* shape input region functions */
+EINTERN E_Move_Border_Shape_Input *e_mod_move_border_shape_input_new(E_Move_Border *mb);
+EINTERN void e_mod_move_border_shape_input_free(E_Move_Border *mb);
+EINTERN Eina_Bool e_mod_move_border_shape_input_rect_set(E_Move_Border *mb, int x, int y, int w, int h);
+EINTERN Eina_Bool e_mod_move_border_shape_input_rect_get(E_Move_Border *mb, int *x, int *y, int *w, int *h);
+
+#endif
+#endif
--- /dev/null
+#include "e_mod_move_shared_types.h"
+#include "e_mod_move.h"
+#include "e_mod_move_debug.h"
+
+typedef enum _E_Move_Border_Class_Type
+{
+ E_MOVE_BORDER_CLASS_TYPE_UNKNOWN = 0,
+ E_MOVE_BORDER_CLASS_TYPE_NORMAL,
+ E_MOVE_BORDER_CLASS_TYPE_MENUSCREEN,
+ E_MOVE_BORDER_CLASS_TYPE_QUICKPANEL_BASE,
+ E_MOVE_BORDER_CLASS_TYPE_QUICKPANEL,
+ E_MOVE_BORDER_CLASS_TYPE_TASKMANAGER,
+ E_MOVE_BORDER_CLASS_TYPE_LIVEMAGAZINE,
+ E_MOVE_BORDER_CLASS_TYPE_LOCKSCREEN,
+ E_MOVE_BORDER_CLASS_TYPE_INDICATOR,
+ E_MOVE_BORDER_CLASS_TYPE_APPTRAY,
+ E_MOVE_BORDER_CLASS_TYPE_MINI_APPTRAY,
+ E_MOVE_BORDER_CLASS_TYPE_PWLOCK,
+ E_MOVE_BORDER_CLASS_TYPE_BACKGROUND,
+ E_MOVE_BORDER_CLASS_TYPE_ISF,
+} E_Move_Border_Class_Type;
+
+typedef enum _E_Move_Border_Name_Type
+{
+ E_MOVE_BORDER_NAME_TYPE_UNKNOWN = 0,
+ E_MOVE_BORDER_NAME_TYPE_NORMAL,
+ E_MOVE_BORDER_NAME_TYPE_MENUSCREEN,
+ E_MOVE_BORDER_NAME_TYPE_QUICKPANEL_BASE,
+ E_MOVE_BORDER_NAME_TYPE_QUICKPANEL,
+ E_MOVE_BORDER_NAME_TYPE_TASKMANAGER,
+ E_MOVE_BORDER_NAME_TYPE_LIVEMAGAZINE,
+ E_MOVE_BORDER_NAME_TYPE_LOCKSCREEN,
+ E_MOVE_BORDER_NAME_TYPE_INDICATOR,
+ E_MOVE_BORDER_NAME_TYPE_APPTRAY,
+ E_MOVE_BORDER_NAME_TYPE_MINI_APPTRAY,
+ E_MOVE_BORDER_NAME_TYPE_PWLOCK,
+ E_MOVE_BORDER_NAME_TYPE_BACKGROUND,
+ E_MOVE_BORDER_NAME_TYPE_ISF_KEYBOARD,
+ E_MOVE_BORDER_NAME_TYPE_ISF_SUB,
+} E_Move_Border_Name_Type;
+
+/* local subsystem functions */
+static E_Move_Border_Type _ecore_type_to_e_move_type(Ecore_X_Window_Type t);
+
+/* local subsystem globals */
+static const char *border_class[] =
+{
+ "NORMAL_WINDOW",
+ "MENU_SCREEN",
+ "QUICKPANEL_BASE",
+ "QUICKPANEL",
+ "TASK_MANAGER",
+ "LIVE_MAGAZINE",
+ "LOCK_SCREEN",
+ "INDICATOR",
+ "APP_TRAY",
+ "MINIAPP_TRAY",
+ //"PW_LOCK",
+ "pwlock",
+ "BACKGROUND",
+ "ISF",
+};
+
+static const char *border_name[] =
+{
+ "NORMAL_WINDOW",
+ "com.samsung.menu-screen",
+ "QUICKPANEL_BASE",
+ "QUICKPANEL",
+ "TASK_MANAGER",
+ "Live Magazine",
+ "LOCK_SCREEN",
+ "INDICATOR",
+ "APP_TRAY",
+ "MINIAPP_TRAY",
+ //"PW_LOCK",
+ "pwlock",
+ "BACKGROUND",
+ // E_COMP_WIN_NAME_TYPE_ISF_KEYBOARD
+ "Virtual Keyboard",
+ // E_COMP_WIN_NAME_TYPE_ISF_SUB
+ "Key Magnifier",
+ "Prediction Window",
+ "Setting Window",
+ "ISF Popup",
+};
+
+static const char *type_names[] =
+{
+ "E_MOVE_BORDER_TYPE_UNKNOWN",
+ "E_MOVE_BORDER_TYPE_DESKTOP",
+ "E_MOVE_BORDER_TYPE_DOCK",
+ "E_MOVE_BORDER_TYPE_TOOLBAR",
+ "E_MOVE_BORDER_TYPE_MENU",
+ "E_MOVE_BORDER_TYPE_UTILITY",
+ "E_MOVE_BORDER_TYPE_SPLASH",
+ "E_MOVE_BORDER_TYPE_DIALOG",
+ "E_MOVE_BORDER_TYPE_NORMAL",
+ "E_MOVE_BORDER_TYPE_DROPDOWN_MENU",
+ "E_MOVE_BORDER_TYPE_POPUP_MENU",
+ "E_MOVE_BORDER_TYPE_TOOLTIP",
+ "E_MOVE_BORDER_TYPE_NOTIFICATION",
+ "E_MOVE_BORDER_TYPE_COMBO",
+ "E_MOVE_BORDER_TYPE_DND",
+ "E_MOVE_BORDER_TYPE_MENUSCREEN",
+ "E_MOVE_BORDER_TYPE_QUICKPANEL_BASE",
+ "E_MOVE_BORDER_TYPE_QUICKPANEL",
+ "E_MOVE_BORDER_TYPE_TASKMANAGER",
+ "E_MOVE_BORDER_TYPE_LIVEMAGAZINE",
+ "E_MOVE_BORDER_TYPE_LOCKSCREEN",
+ "E_MOVE_BORDER_TYPE_INDICATOR",
+ "E_MOVE_BORDER_TYPE_APPTRAY",
+ "E_MOVE_BORDER_TYPE_MINI_APPTRAY",
+ "E_MOVE_BORDER_TYPE_PWLOCK",
+ "E_MOVE_BORDER_TYPE_BACKGROUND",
+ "E_MOVE_BORDER_TYPE_ISF_KEYBOARD",
+ "E_MOVE_BORDER_TYPE_ISF_SUB",
+};
+
+static E_Move_Border_Class_Type border_class_vals[] =
+{
+ E_MOVE_BORDER_CLASS_TYPE_NORMAL,
+ E_MOVE_BORDER_CLASS_TYPE_MENUSCREEN,
+ E_MOVE_BORDER_CLASS_TYPE_QUICKPANEL_BASE,
+ E_MOVE_BORDER_CLASS_TYPE_QUICKPANEL,
+ E_MOVE_BORDER_CLASS_TYPE_TASKMANAGER,
+ E_MOVE_BORDER_CLASS_TYPE_LIVEMAGAZINE,
+ E_MOVE_BORDER_CLASS_TYPE_LOCKSCREEN,
+ E_MOVE_BORDER_CLASS_TYPE_INDICATOR,
+ E_MOVE_BORDER_CLASS_TYPE_APPTRAY,
+ E_MOVE_BORDER_CLASS_TYPE_MINI_APPTRAY,
+ E_MOVE_BORDER_CLASS_TYPE_PWLOCK,
+ E_MOVE_BORDER_CLASS_TYPE_BACKGROUND,
+ E_MOVE_BORDER_CLASS_TYPE_ISF
+};
+
+static E_Move_Border_Class_Type border_name_vals[] =
+{
+ E_MOVE_BORDER_NAME_TYPE_NORMAL,
+ E_MOVE_BORDER_NAME_TYPE_MENUSCREEN,
+ E_MOVE_BORDER_NAME_TYPE_QUICKPANEL_BASE,
+ E_MOVE_BORDER_NAME_TYPE_QUICKPANEL,
+ E_MOVE_BORDER_NAME_TYPE_TASKMANAGER,
+ E_MOVE_BORDER_NAME_TYPE_LIVEMAGAZINE,
+ E_MOVE_BORDER_NAME_TYPE_LOCKSCREEN,
+ E_MOVE_BORDER_NAME_TYPE_INDICATOR,
+ E_MOVE_BORDER_NAME_TYPE_APPTRAY,
+ E_MOVE_BORDER_NAME_TYPE_MINI_APPTRAY,
+ E_MOVE_BORDER_NAME_TYPE_PWLOCK,
+ E_MOVE_BORDER_NAME_TYPE_BACKGROUND,
+ E_MOVE_BORDER_NAME_TYPE_ISF_KEYBOARD,
+ E_MOVE_BORDER_NAME_TYPE_ISF_SUB
+};
+
+static Eina_Hash *class_hash = NULL;
+static Eina_Hash *names_hash = NULL;
+static Eina_Hash *types_hash = NULL;
+
+/* local subsystem functions */
+static E_Move_Border_Type
+_ecore_type_to_e_move_type(Ecore_X_Window_Type t)
+{
+ E_Move_Border_Type r = E_MOVE_BORDER_TYPE_UNKNOWN;
+ switch (t)
+ {
+ case ECORE_X_WINDOW_TYPE_NORMAL: r = E_MOVE_BORDER_TYPE_NORMAL; break;
+ case ECORE_X_WINDOW_TYPE_TOOLTIP: r = E_MOVE_BORDER_TYPE_TOOLTIP; break;
+ case ECORE_X_WINDOW_TYPE_COMBO: r = E_MOVE_BORDER_TYPE_COMBO; break;
+ case ECORE_X_WINDOW_TYPE_DND: r = E_MOVE_BORDER_TYPE_DND; break;
+ case ECORE_X_WINDOW_TYPE_DESKTOP: r = E_MOVE_BORDER_TYPE_DESKTOP; break;
+ case ECORE_X_WINDOW_TYPE_TOOLBAR: r = E_MOVE_BORDER_TYPE_TOOLBAR; break;
+ case ECORE_X_WINDOW_TYPE_MENU: r = E_MOVE_BORDER_TYPE_MENU; break;
+ case ECORE_X_WINDOW_TYPE_SPLASH: r = E_MOVE_BORDER_TYPE_SPLASH; break;
+ case ECORE_X_WINDOW_TYPE_DROPDOWN_MENU: r = E_MOVE_BORDER_TYPE_DROPDOWN_MENU; break;
+ case ECORE_X_WINDOW_TYPE_NOTIFICATION: r = E_MOVE_BORDER_TYPE_NOTIFICATION; break;
+ case ECORE_X_WINDOW_TYPE_UTILITY: r = E_MOVE_BORDER_TYPE_UTILITY; break;
+ case ECORE_X_WINDOW_TYPE_POPUP_MENU: r = E_MOVE_BORDER_TYPE_POPUP_MENU; break;
+ case ECORE_X_WINDOW_TYPE_DIALOG: r = E_MOVE_BORDER_TYPE_DIALOG; break;
+ default:
+ r = E_MOVE_BORDER_TYPE_NORMAL;
+ break;
+ }
+ return r;
+}
+
+/* externally accessible functions */
+EINTERN int
+e_mod_move_border_type_init(void)
+{
+ int i, n;
+ char type_string[10];
+ if (!class_hash) class_hash = eina_hash_string_superfast_new(NULL);
+ if (!names_hash) names_hash = eina_hash_string_superfast_new(NULL);
+ if (!types_hash) types_hash = eina_hash_string_superfast_new(NULL);
+
+ n = (sizeof(border_class) / sizeof(char *));
+ for (i = 0; i < n; i++)
+ {
+ eina_hash_add
+ (class_hash, border_class[i],
+ &border_class_vals[i]);
+ }
+
+ n = (sizeof(border_name) / sizeof(char *));
+ for (i = 0; i < n; i++)
+ {
+ if (i >= E_MOVE_BORDER_NAME_TYPE_ISF_SUB)
+ {
+ eina_hash_add
+ (names_hash, border_name[i],
+ &border_name_vals[E_MOVE_BORDER_NAME_TYPE_ISF_SUB-1]);
+ }
+ else
+ {
+ eina_hash_add
+ (names_hash,
+ border_name[i], &border_name_vals[i]);
+ }
+ }
+
+ for (i = E_MOVE_BORDER_TYPE_UNKNOWN; i < E_MOVE_BORDER_TYPE_ISF_SUB; i++)
+ {
+ memset(type_string, 0, sizeof(type_string));
+ snprintf(type_string, sizeof(type_string), "%d", i);
+ eina_hash_add(types_hash,
+ type_string,
+ type_names[i]);
+ }
+
+ return 1;
+}
+
+EINTERN int
+e_mod_move_border_type_shutdown(void)
+{
+ if (class_hash) eina_hash_free(class_hash);
+ if (names_hash) eina_hash_free(names_hash);
+ if (types_hash) eina_hash_free(types_hash);
+
+ names_hash = NULL;
+ class_hash = NULL;
+ types_hash = NULL;
+
+ return 1;
+}
+
+EINTERN Eina_Bool
+e_mod_move_border_type_setup(E_Move_Border *mb)
+{
+ Ecore_X_Window_Type wtype = ECORE_X_WINDOW_TYPE_UNKNOWN;
+ E_Move_Border_Class_Type ctype = E_MOVE_BORDER_CLASS_TYPE_UNKNOWN;
+ E_Move_Border_Name_Type ntype = E_MOVE_BORDER_NAME_TYPE_UNKNOWN;
+ E_Move_Border_Type res = E_MOVE_BORDER_TYPE_UNKNOWN;
+ E_Move_Border_Class_Type *pctype = NULL;
+ E_Move_Border_Name_Type *pntype = NULL;
+ char *clas = NULL, *name = NULL;
+
+ E_CHECK_RETURN(mb, 0);
+ E_CHECK_RETURN(mb->bd, 0);
+
+ wtype = mb->bd->client.netwm.type;
+ if (mb->bd->internal)
+ ecore_x_icccm_name_class_get(mb->bd->client.win, &name, &clas);
+ else
+ {
+ clas = (char *)mb->bd->client.icccm.class;
+ name = (char *)mb->bd->client.icccm.name;
+ }
+
+ if (clas)
+ {
+ pctype = eina_hash_find(class_hash, clas);
+ if (pctype) ctype = *pctype;
+ }
+ if (name)
+ {
+ pntype = eina_hash_find(names_hash, name);
+ if (pntype) ntype = *pntype;
+ }
+
+ switch (ctype)
+ {
+ case E_MOVE_BORDER_CLASS_TYPE_MENUSCREEN:
+ res = E_MOVE_BORDER_TYPE_MENUSCREEN;
+ break;
+ case E_MOVE_BORDER_CLASS_TYPE_QUICKPANEL_BASE:
+ res = E_MOVE_BORDER_TYPE_QUICKPANEL_BASE;
+ break;
+ case E_MOVE_BORDER_CLASS_TYPE_QUICKPANEL:
+ res = E_MOVE_BORDER_TYPE_QUICKPANEL;
+ break;
+ case E_MOVE_BORDER_CLASS_TYPE_TASKMANAGER:
+ if (ntype == E_MOVE_BORDER_NAME_TYPE_TASKMANAGER)
+ res = E_MOVE_BORDER_TYPE_TASKMANAGER;
+ break;
+ case E_MOVE_BORDER_CLASS_TYPE_LIVEMAGAZINE:
+ if ((ntype == E_MOVE_BORDER_NAME_TYPE_LIVEMAGAZINE) &&
+ (wtype == ECORE_X_WINDOW_TYPE_NORMAL))
+ res = E_MOVE_BORDER_TYPE_LIVEMAGAZINE;
+ break;
+ case E_MOVE_BORDER_CLASS_TYPE_LOCKSCREEN:
+ if (ntype == E_MOVE_BORDER_NAME_TYPE_LOCKSCREEN)
+// if ((ntype == E_MOVE_BORDER_NAME_TYPE_LOCKSCREEN) &&
+// (wtype == ECORE_X_WINDOW_TYPE_NOTIFICATION)) // net wm window type is chaged later. so it will be fixed.
+ res = E_MOVE_BORDER_TYPE_LOCKSCREEN;
+ break;
+ case E_MOVE_BORDER_CLASS_TYPE_INDICATOR:
+ if ((ntype == E_MOVE_BORDER_NAME_TYPE_INDICATOR) &&
+ (wtype == ECORE_X_WINDOW_TYPE_DOCK))
+ res = E_MOVE_BORDER_TYPE_INDICATOR;
+ break;
+ case E_MOVE_BORDER_CLASS_TYPE_ISF:
+ if (wtype != ECORE_X_WINDOW_TYPE_NORMAL)
+ break;
+ else if (ntype == E_MOVE_BORDER_NAME_TYPE_ISF_KEYBOARD)
+ res = E_MOVE_BORDER_TYPE_ISF_KEYBOARD;
+ else if (ntype == E_MOVE_BORDER_NAME_TYPE_ISF_SUB)
+ res = E_MOVE_BORDER_TYPE_ISF_SUB;
+ break;
+ case E_MOVE_BORDER_CLASS_TYPE_NORMAL:
+ if ((wtype == ECORE_X_WINDOW_TYPE_NORMAL) ||
+ (wtype == ECORE_X_WINDOW_TYPE_UNKNOWN))
+ res = E_MOVE_BORDER_TYPE_NORMAL;
+ break;
+ case E_MOVE_BORDER_CLASS_TYPE_APPTRAY:
+ if (ntype == E_MOVE_BORDER_NAME_TYPE_APPTRAY)
+ res = E_MOVE_BORDER_TYPE_APPTRAY;
+ case E_MOVE_BORDER_CLASS_TYPE_MINI_APPTRAY:
+ if (ntype == E_MOVE_BORDER_NAME_TYPE_MINI_APPTRAY)
+ res = E_MOVE_BORDER_TYPE_MINI_APPTRAY;
+ case E_MOVE_BORDER_CLASS_TYPE_PWLOCK:
+ if (ntype == E_MOVE_BORDER_NAME_TYPE_PWLOCK)
+ res = E_MOVE_BORDER_TYPE_PWLOCK;
+ case E_MOVE_BORDER_CLASS_TYPE_BACKGROUND:
+ if (ntype == E_MOVE_BORDER_NAME_TYPE_BACKGROUND)
+ res = E_MOVE_BORDER_TYPE_BACKGROUND;
+ break;
+ default:
+ break;
+ }
+
+ if (res == E_MOVE_BORDER_TYPE_UNKNOWN)
+ res = _ecore_type_to_e_move_type(wtype);
+
+ if (mb->bd->internal)
+ {
+ if (name) E_FREE(name);
+ if (clas) E_FREE(clas);
+ }
+
+ mb->type = res;
+ return EINA_TRUE;
+}
+
+EINTERN E_Move_Border_Type
+e_mod_move_border_type_get(E_Move_Border *mb)
+{
+ E_CHECK_RETURN(mb, E_MOVE_BORDER_TYPE_UNKNOWN);
+ return mb->type;
+}
+
+EINTERN Eina_Bool
+e_mod_move_border_type_handler_prop(Ecore_X_Event_Window_Property *ev)
+{
+ E_Move_Border *mb;
+ E_CHECK_RETURN(ev, 0);
+ E_CHECK_RETURN(ev->win, 0);
+
+ L(LT_EVENT_X, "[MOVE] %31s\n", "PROP_WM_CLASS");
+
+ mb = e_mod_move_border_client_find(ev->win);
+ if (mb) return EINA_TRUE;
+
+ e_mod_move_border_type_setup(mb);
+ return EINA_TRUE;
+}
+
+EINTERN const char *
+e_mod_move_border_types_name_get(E_Move_Border_Type t)
+{
+ char type_string[10];
+ memset(type_string, 0, sizeof(type_string));
+ snprintf(type_string, sizeof(type_string), "%d",t);
+ return eina_hash_find(types_hash,
+ type_string);
+}
+
--- /dev/null
+#ifdef E_TYPEDEFS
+#else
+#ifndef E_MOD_MOVE_BORDER_TYPE_H
+#define E_MOD_MOVE_BORDER_TYPE_H
+
+#define TYPE_NORMAL_CHECK(a) \
+ ((a)->type == E_MOVE_BORDER_TYPE_NORMAL)
+
+// Check for Indicator Window
+#define TYPE_INDICATOR_CHECK(a) \
+ ((a)->type == E_MOVE_BORDER_TYPE_INDICATOR)
+
+#define TYPE_QUICKPANEL_BASE_CHECK(a) \
+ ((a)->type == E_MOVE_BORDER_TYPE_QUICKPANEL_BASE)
+
+#define TYPE_QUICKPANEL_CHECK(a) \
+ ((a)->type == E_MOVE_BORDER_TYPE_QUICKPANEL)
+
+#define TYPE_APPTRAY_CHECK(a) \
+ ((a)->type == E_MOVE_BORDER_TYPE_APPTRAY)
+
+#define TYPE_MINI_APPTRAY_CHECK(a) \
+ ((a)->type == E_MOVE_BORDER_TYPE_MINI_APPTRAY)
+
+#define TYPE_LOCKSCREEN_CHECK(a) \
+ ((a)->type == E_MOVE_BORDER_TYPE_LOCKSCREEN)
+
+#define TYPE_TASKMANAGER_CHECK(a) \
+ ((a)->type == E_MOVE_BORDER_TYPE_TASKMANAGER)
+
+#define TYPE_PWLOCK_CHECK(a) \
+ ((a)->type == E_MOVE_BORDER_TYPE_PWLOCK)
+
+typedef enum _E_Move_Border_Type
+{
+ E_MOVE_BORDER_TYPE_UNKNOWN = 0,
+ E_MOVE_BORDER_TYPE_DESKTOP,
+ E_MOVE_BORDER_TYPE_DOCK,
+ E_MOVE_BORDER_TYPE_TOOLBAR,
+ E_MOVE_BORDER_TYPE_MENU,
+ E_MOVE_BORDER_TYPE_UTILITY,
+ E_MOVE_BORDER_TYPE_SPLASH,
+ E_MOVE_BORDER_TYPE_DIALOG,
+ E_MOVE_BORDER_TYPE_NORMAL,
+ E_MOVE_BORDER_TYPE_DROPDOWN_MENU,
+ E_MOVE_BORDER_TYPE_POPUP_MENU,
+ E_MOVE_BORDER_TYPE_TOOLTIP,
+ E_MOVE_BORDER_TYPE_NOTIFICATION,
+ E_MOVE_BORDER_TYPE_COMBO,
+ E_MOVE_BORDER_TYPE_DND,
+ /* added type */
+ E_MOVE_BORDER_TYPE_MENUSCREEN,
+ E_MOVE_BORDER_TYPE_QUICKPANEL_BASE,
+ E_MOVE_BORDER_TYPE_QUICKPANEL,
+ E_MOVE_BORDER_TYPE_TASKMANAGER,
+ E_MOVE_BORDER_TYPE_LIVEMAGAZINE,
+ E_MOVE_BORDER_TYPE_LOCKSCREEN,
+ E_MOVE_BORDER_TYPE_INDICATOR,
+ E_MOVE_BORDER_TYPE_APPTRAY,
+ E_MOVE_BORDER_TYPE_MINI_APPTRAY,
+ E_MOVE_BORDER_TYPE_PWLOCK,
+ E_MOVE_BORDER_TYPE_BACKGROUND,
+ E_MOVE_BORDER_TYPE_ISF_KEYBOARD,
+ E_MOVE_BORDER_TYPE_ISF_SUB,
+} E_Move_Border_Type;
+
+/* move border type functions */
+EINTERN int e_mod_move_border_type_init(void);
+EINTERN int e_mod_move_border_type_shutdown(void);
+EINTERN Eina_Bool e_mod_move_border_type_setup(E_Move_Border *mb);
+EINTERN E_Move_Border_Type e_mod_move_border_type_get(E_Move_Border *mb);
+EINTERN Eina_Bool e_mod_move_border_type_handler_prop(Ecore_X_Event_Window_Property *ev);
+EINTERN const char *e_mod_move_border_types_name_get(E_Move_Border_Type t);
+
+#endif
+#endif
--- /dev/null
+#include "e_mod_move_shared_types.h"
+#include "e_mod_move_debug.h"
+#include "e_mod_move.h"
+
+/* static global variables */
+static int _canvas_num = 0;
+
+/* externally accessible functions */
+EINTERN E_Move_Canvas *
+e_mod_move_canvas_add(E_Move *m,
+ E_Zone *zone)
+{
+ E_Move_Canvas *canvas;
+ Eina_List *l;
+ int x, y, w, h;
+ E_CHECK_RETURN(m, 0);
+
+ canvas = E_NEW(E_Move_Canvas, 1);
+ E_CHECK_GOTO(canvas, error_cleanup);
+
+ canvas->evas = e_manager_comp_evas_get(m->man);
+ E_CHECK_GOTO(canvas->evas, error_cleanup);
+
+ if (zone)
+ {
+ x = zone->x;
+ y = zone->y;
+ w = zone->w;
+ h = zone->h;
+ }
+ else
+ {
+ x = 0;
+ y = 0;
+ w = m->man->w;
+ h = m->man->h;
+ }
+
+ canvas->x = x;
+ canvas->y = y;
+ canvas->w = w;
+ canvas->h = h;
+
+ canvas->move = m;
+ canvas->num = _canvas_num++;
+
+ canvas->zone = zone;
+
+ m->canvases = eina_list_append(m->canvases, canvas);
+
+ return canvas;
+
+error_cleanup:
+ if (canvas)
+ {
+ memset(canvas, 0, sizeof(E_Move_Canvas));
+ E_FREE(canvas);
+ canvas = NULL;
+ }
+
+ EINA_LIST_FOREACH(m->canvases, l, canvas)
+ {
+ memset(canvas, 0, sizeof(E_Move_Canvas));
+ E_FREE(canvas);
+ }
+ return NULL;
+}
+
+EINTERN void
+e_mod_move_canvas_del(E_Move_Canvas *canvas)
+{
+ memset(canvas, 0, sizeof(E_Move_Canvas));
+ E_FREE(canvas);
+}
--- /dev/null
+#ifdef E_TYPEDEFS
+#else
+#ifndef E_MOD_MOVE_CANVAS_H
+#define E_MOD_MOVE_CANVAS_H
+
+typedef struct _E_Move_Canvas E_Move_Canvas;
+
+struct _E_Move_Canvas
+{
+ E_Move *move;
+ E_Zone *zone;
+ Evas *evas;
+ int x, y, w, h; // geometry
+ int num;
+};
+
+EINTERN E_Move_Canvas *e_mod_move_canvas_add(E_Move *m, E_Zone *zone);
+EINTERN void e_mod_move_canvas_del(E_Move_Canvas *canvas);
+
+#endif
+#endif
--- /dev/null
+#include "e.h"
+#include "e_mod_main.h"
+#include "e_mod_move_cfdata.h"
+#include "e_mod_move_shared_types.h"
+
+EAPI void
+e_mod_move_cfdata_edd_init(E_Config_DD **conf_edd)
+{
+ *conf_edd = E_CONFIG_DD_NEW("Move_Config", Config);
+#undef T
+#undef D
+#define T Config
+#define D *conf_edd
+ E_CONFIG_VAL(D, T, indicator_always_portrait_region_ratio, DOUBLE);
+ E_CONFIG_VAL(D, T, indicator_always_landscape_region_ratio, DOUBLE);
+ E_CONFIG_VAL(D, T, indicator_quickpanel_portrait_region_ratio, DOUBLE);
+ E_CONFIG_VAL(D, T, indicator_quickpanel_landscape_region_ratio, DOUBLE);
+ E_CONFIG_VAL(D, T, indicator_apptray_portrait_region_ratio, DOUBLE);
+ E_CONFIG_VAL(D, T, indicator_apptray_landscape_region_ratio, DOUBLE);
+ E_CONFIG_VAL(D, T, qp_scroll_with_visible_win, UCHAR);
+ E_CONFIG_VAL(D, T, qp_scroll_with_clipping, UCHAR);
+ E_CONFIG_VAL(D, T, dim_max_opacity, INT);
+ E_CONFIG_VAL(D, T, dim_min_opacity, INT);
+ E_CONFIG_VAL(D, T, flick_speed_limit, DOUBLE);
+ E_CONFIG_VAL(D, T, animation_duration, DOUBLE);
+ E_CONFIG_VAL(D, T, event_log, UCHAR);
+ E_CONFIG_VAL(D, T, event_log_count, INT);
+ E_CONFIG_VAL(D, T, elm_indicator_mode, UCHAR);
+ // indicator widget gemometry setting
+ E_CONFIG_VAL(D, T, indicator_widget_geometry[E_MOVE_ANGLE_0].x, INT);
+ E_CONFIG_VAL(D, T, indicator_widget_geometry[E_MOVE_ANGLE_0].y, INT);
+ E_CONFIG_VAL(D, T, indicator_widget_geometry[E_MOVE_ANGLE_0].w, INT);
+ E_CONFIG_VAL(D, T, indicator_widget_geometry[E_MOVE_ANGLE_0].h, INT);
+ E_CONFIG_VAL(D, T, indicator_widget_geometry[E_MOVE_ANGLE_90].x, INT);
+ E_CONFIG_VAL(D, T, indicator_widget_geometry[E_MOVE_ANGLE_90].y, INT);
+ E_CONFIG_VAL(D, T, indicator_widget_geometry[E_MOVE_ANGLE_90].w, INT);
+ E_CONFIG_VAL(D, T, indicator_widget_geometry[E_MOVE_ANGLE_90].h, INT);
+ E_CONFIG_VAL(D, T, indicator_widget_geometry[E_MOVE_ANGLE_180].x, INT);
+ E_CONFIG_VAL(D, T, indicator_widget_geometry[E_MOVE_ANGLE_180].y, INT);
+ E_CONFIG_VAL(D, T, indicator_widget_geometry[E_MOVE_ANGLE_180].w, INT);
+ E_CONFIG_VAL(D, T, indicator_widget_geometry[E_MOVE_ANGLE_180].h, INT);
+ E_CONFIG_VAL(D, T, indicator_widget_geometry[E_MOVE_ANGLE_270].x, INT);
+ E_CONFIG_VAL(D, T, indicator_widget_geometry[E_MOVE_ANGLE_270].y, INT);
+ E_CONFIG_VAL(D, T, indicator_widget_geometry[E_MOVE_ANGLE_270].w, INT);
+ E_CONFIG_VAL(D, T, indicator_widget_geometry[E_MOVE_ANGLE_270].h, INT);
+ // miniapp_tray widget gemometry setting
+ E_CONFIG_VAL(D, T, mini_apptray_widget_geometry[E_MOVE_ANGLE_0].x, INT);
+ E_CONFIG_VAL(D, T, mini_apptray_widget_geometry[E_MOVE_ANGLE_0].y, INT);
+ E_CONFIG_VAL(D, T, mini_apptray_widget_geometry[E_MOVE_ANGLE_0].w, INT);
+ E_CONFIG_VAL(D, T, mini_apptray_widget_geometry[E_MOVE_ANGLE_0].h, INT);
+ E_CONFIG_VAL(D, T, mini_apptray_widget_geometry[E_MOVE_ANGLE_90].x, INT);
+ E_CONFIG_VAL(D, T, mini_apptray_widget_geometry[E_MOVE_ANGLE_90].y, INT);
+ E_CONFIG_VAL(D, T, mini_apptray_widget_geometry[E_MOVE_ANGLE_90].w, INT);
+ E_CONFIG_VAL(D, T, mini_apptray_widget_geometry[E_MOVE_ANGLE_90].h, INT);
+ E_CONFIG_VAL(D, T, mini_apptray_widget_geometry[E_MOVE_ANGLE_180].x, INT);
+ E_CONFIG_VAL(D, T, mini_apptray_widget_geometry[E_MOVE_ANGLE_180].y, INT);
+ E_CONFIG_VAL(D, T, mini_apptray_widget_geometry[E_MOVE_ANGLE_180].w, INT);
+ E_CONFIG_VAL(D, T, mini_apptray_widget_geometry[E_MOVE_ANGLE_180].h, INT);
+ E_CONFIG_VAL(D, T, mini_apptray_widget_geometry[E_MOVE_ANGLE_270].x, INT);
+ E_CONFIG_VAL(D, T, mini_apptray_widget_geometry[E_MOVE_ANGLE_270].y, INT);
+ E_CONFIG_VAL(D, T, mini_apptray_widget_geometry[E_MOVE_ANGLE_270].w, INT);
+ E_CONFIG_VAL(D, T, mini_apptray_widget_geometry[E_MOVE_ANGLE_270].h, INT);
+}
+
+EAPI Config *
+e_mod_move_cfdata_config_new(void)
+{
+ Config *cfg;
+
+ cfg = E_NEW(Config, 1);
+
+ cfg->indicator_always_portrait_region_ratio = 0.10833;
+ cfg->indicator_always_landscape_region_ratio = 0.0609;
+ cfg->indicator_quickpanel_portrait_region_ratio = 0.8917;
+ cfg->indicator_quickpanel_landscape_region_ratio = 0.9390;
+ cfg->indicator_apptray_portrait_region_ratio = 1.0;
+ cfg->indicator_apptray_landscape_region_ratio = 1.0;
+ cfg->qp_scroll_with_visible_win = 1;
+ cfg->qp_scroll_with_clipping = 1;
+ cfg->dim_max_opacity = 200;
+ cfg->dim_min_opacity = 0;
+ cfg->flick_speed_limit = 200.0;
+ cfg->animation_duration = 0.4;
+ cfg->event_log = 1;
+ cfg->event_log_count = 600;
+ cfg->elm_indicator_mode = 1;
+ // indicator widget gemometry setting
+ cfg->indicator_widget_geometry[E_MOVE_ANGLE_0].x = 0;
+ cfg->indicator_widget_geometry[E_MOVE_ANGLE_0].y = 0;
+ cfg->indicator_widget_geometry[E_MOVE_ANGLE_0].w = 720;
+ cfg->indicator_widget_geometry[E_MOVE_ANGLE_0].h = 50;
+ cfg->indicator_widget_geometry[E_MOVE_ANGLE_90].x = 0;
+ cfg->indicator_widget_geometry[E_MOVE_ANGLE_90].y = 0;
+ cfg->indicator_widget_geometry[E_MOVE_ANGLE_90].w = 50;
+ cfg->indicator_widget_geometry[E_MOVE_ANGLE_90].h = 1280;
+ cfg->indicator_widget_geometry[E_MOVE_ANGLE_180].x = 0;
+ cfg->indicator_widget_geometry[E_MOVE_ANGLE_180].y = 1230;
+ cfg->indicator_widget_geometry[E_MOVE_ANGLE_180].w = 720;
+ cfg->indicator_widget_geometry[E_MOVE_ANGLE_180].h = 50;
+ cfg->indicator_widget_geometry[E_MOVE_ANGLE_270].x = 670;
+ cfg->indicator_widget_geometry[E_MOVE_ANGLE_270].y = 0;
+ cfg->indicator_widget_geometry[E_MOVE_ANGLE_270].w = 50;
+ cfg->indicator_widget_geometry[E_MOVE_ANGLE_270].h = 1280;
+ // mini_apptray widget gemometry setting
+ cfg->mini_apptray_widget_geometry[E_MOVE_ANGLE_0].x = 0;
+ cfg->mini_apptray_widget_geometry[E_MOVE_ANGLE_0].y = 1230;
+ cfg->mini_apptray_widget_geometry[E_MOVE_ANGLE_0].w = 720;
+ cfg->mini_apptray_widget_geometry[E_MOVE_ANGLE_0].h = 50;
+ cfg->mini_apptray_widget_geometry[E_MOVE_ANGLE_90].x = 670;
+ cfg->mini_apptray_widget_geometry[E_MOVE_ANGLE_90].y = 0;
+ cfg->mini_apptray_widget_geometry[E_MOVE_ANGLE_90].w = 50;
+ cfg->mini_apptray_widget_geometry[E_MOVE_ANGLE_90].h = 1280;
+ cfg->mini_apptray_widget_geometry[E_MOVE_ANGLE_180].x = 0;
+ cfg->mini_apptray_widget_geometry[E_MOVE_ANGLE_180].y = 0;
+ cfg->mini_apptray_widget_geometry[E_MOVE_ANGLE_180].w = 720;
+ cfg->mini_apptray_widget_geometry[E_MOVE_ANGLE_180].h = 50;
+ cfg->mini_apptray_widget_geometry[E_MOVE_ANGLE_270].x = 0;
+ cfg->mini_apptray_widget_geometry[E_MOVE_ANGLE_270].y = 0;
+ cfg->mini_apptray_widget_geometry[E_MOVE_ANGLE_270].w = 50;
+ cfg->mini_apptray_widget_geometry[E_MOVE_ANGLE_270].h = 1280;
+
+ return cfg;
+}
+
+EAPI void
+e_mod_move_cfdata_config_free(Config *cfg)
+{
+ if (cfg)
+ {
+ memset(cfg, 0, sizeof(Config));
+ free(cfg);
+ cfg = NULL;
+ }
+}
--- /dev/null
+#ifndef E_MOD_MOVE_CFDATA_H
+#define E_MOD_MOVE_CFDATA_H
+
+typedef struct _Config Config;
+
+struct _Config
+{
+ double indicator_always_portrait_region_ratio; // indicator's portrait always region ratio
+ double indicator_always_landscape_region_ratio; // indicator's landscape always region ratio
+ double indicator_quickpanel_portrait_region_ratio; // indicator's portrait quickpanel region ratio
+ double indicator_quickpanel_landscape_region_ratio; // indicator's landscape quickpanel region ratio
+ double indicator_apptray_portrait_region_ratio; // indicator's portrait apptray region ratio
+ double indicator_apptray_landscape_region_ratio; // indicator's landscape apptray region ratio
+ unsigned char qp_scroll_with_visible_win; // 1: quickpanel scroll with visible window 0: qp scroll only
+ unsigned char qp_scroll_with_clipping; // 1: quickpanel scroll with clipping 0: qp scroll without clipping
+ int dim_max_opacity; // dim max opacity
+ int dim_min_opacity; // dim min opacity
+ double flick_speed_limit; // flick speed limitation
+ double animation_duration; // apptray / quickpanel move animation duration
+ unsigned char event_log; // 1 :ecore & evas_object debug event logging 0: do not log event
+ int event_log_count; // ecore & evas_object debug event logging count
+ unsigned char elm_indicator_mode; // 1: indicator widget mode / 0: indicator window mode
+
+ struct {
+ int x;
+ int y;
+ int w;
+ int h;
+ } indicator_widget_geometry[4]; //indicator widget's per angle geometry. [0]: angle 0, [1]: angle 90, [2]: angle 180, [3]: angle 270
+
+ struct {
+ int x;
+ int y;
+ int w;
+ int h;
+ } mini_apptray_widget_geometry[4]; //mini_apptray widget's per angle geometry. [0]: angle 0, [1]: angle 90, [2]: angle 180, [3]: angle 270
+};
+
+EAPI void e_mod_move_cfdata_edd_init(E_Config_DD **conf_edd);
+EAPI Config *e_mod_move_cfdata_config_new(void);
+EAPI void e_mod_move_cfdata_config_free(Config *cfg);
+
+#endif
--- /dev/null
+#include "e_mod_move_shared_types.h"
+#include "e_mod_move_debug.h"
+#include "e_mod_move.h"
+
+/* local subsystem functions */
+static void _e_mod_move_cb_control_object_del(void *data, Evas *e, Evas_Object *obj, void *event_info __UNUSED__);
+
+/* externally accessible functions */
+EINTERN E_Move_Control_Object *
+e_mod_move_ctl_obj_add(E_Move_Border *mb,
+ E_Move_Canvas *canvas)
+{
+ E_Move *m;
+ E_Move_Control_Object *mco;
+
+ E_CHECK_RETURN(mb, 0);
+ m = mb->m;
+ E_CHECK_RETURN(m, 0);
+
+ mco = E_NEW(E_Move_Control_Object, 1);
+ E_CHECK_RETURN(mco, 0);
+
+ mco->obj = evas_object_rectangle_add(canvas->evas);
+ E_CHECK_GOTO(mco->obj, error_cleanup);
+ evas_object_color_set(mco->obj, 0,0,0,0); // set color to fully transparency
+ evas_object_layer_set(mco->obj, EVAS_LAYER_MAX); // set layer to top. this object always on top layer.
+ evas_object_event_callback_add(mco->obj, EVAS_CALLBACK_DEL,
+ _e_mod_move_cb_control_object_del, mb);
+ evas_object_data_set(mco->obj,"move_ctl_obj", mco->obj);
+ mco->canvas = canvas;
+ mco->zone = canvas->zone;
+ return mco;
+
+error_cleanup:
+ memset(mco, 0, sizeof(E_Move_Control_Object));
+ E_FREE(mco);
+ return NULL;
+}
+
+EINTERN void
+e_mod_move_ctl_obj_del(E_Move_Control_Object *mco)
+{
+ E_CHECK(mco);
+
+ if (mco->event)
+ {
+ e_mod_move_event_free(mco->event);
+ mco->event = NULL;
+ }
+ if (mco->obj)
+ {
+ evas_object_event_callback_del(mco->obj, EVAS_CALLBACK_DEL,
+ _e_mod_move_cb_control_object_del);
+ evas_object_del(mco->obj);
+ }
+ memset(mco, 0, sizeof(E_Move_Control_Object));
+ E_FREE(mco);
+}
+
+EINTERN Eina_List *
+e_mod_move_bd_move_ctl_objs_add(E_Move_Border *mb)
+{
+ Eina_List *l, *ctl_objs = NULL;
+ E_Move_Canvas *canvas;
+ E_Move_Control_Object *mco;
+
+ E_CHECK_RETURN(mb, 0);
+ E_CHECK_RETURN(mb->m, 0);
+ E_CHECK_RETURN(mb->m->canvases, 0);
+
+ EINA_LIST_FOREACH(mb->m->canvases, l, canvas)
+ {
+ mco = e_mod_move_ctl_obj_add(mb, canvas);
+ if (!mco)
+ {
+ e_mod_move_bd_move_ctl_objs_del(mb, ctl_objs);
+ return NULL;
+ }
+ ctl_objs = eina_list_append(ctl_objs, mco);
+ }
+ return ctl_objs;
+}
+
+EINTERN void
+e_mod_move_bd_move_ctl_objs_del(E_Move_Border *mb,
+ Eina_List *ctl_objs)
+{
+ E_Move_Control_Object *mco;
+ E_CHECK(ctl_objs);
+ EINA_LIST_FREE(ctl_objs, mco)
+ {
+ e_mod_move_ctl_obj_del(mco);
+ }
+}
+
+EINTERN void
+e_mod_move_bd_move_ctl_objs_move(E_Move_Border *mb,
+ int x,
+ int y)
+{
+ Eina_List *l;
+ E_Move_Control_Object *mco;
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco)
+ {
+ int zx = 0, zy = 0;
+ if (!mco) continue;
+ if (!mco->obj) continue;
+ if (mco->zone)
+ {
+ zx = mco->zone->x;
+ zy = mco->zone->y;
+ }
+ evas_object_move(mco->obj, x - zx, y - zy);
+ }
+}
+
+EINTERN void
+e_mod_move_bd_move_ctl_objs_resize(E_Move_Border *mb,
+ int w,
+ int h)
+{
+ Eina_List *l;
+ E_Move_Control_Object *mco;
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco)
+ {
+ if (!mco) continue;
+ if (!mco->obj) continue;
+ evas_object_resize(mco->obj, w, h);
+ }
+}
+
+EINTERN void
+e_mod_move_bd_move_ctl_objs_data_del(E_Move_Border *mb,
+ const char *key)
+{
+ Eina_List *l;
+ E_Move_Control_Object *mco;
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco)
+ {
+ if (!mco) continue;
+ evas_object_data_del(mco->obj, key);
+ }
+}
+
+EINTERN void
+e_mod_move_bd_move_ctl_objs_data_set(E_Move_Border *mb,
+ const char *key,
+ const void *data)
+{
+ Eina_List *l;
+ E_Move_Control_Object *mco;
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco)
+ {
+ if (!mco) continue;
+ if (!mco->obj) continue;
+ evas_object_data_set(mco->obj, key, data);
+ }
+}
+
+EINTERN void
+e_mod_move_bd_move_ctl_objs_show(E_Move_Border *mb)
+{
+ Eina_List *l;
+ E_Move_Control_Object *mco;
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco)
+ {
+ if (!mco) continue;
+ if (!mco->obj) continue;
+ evas_object_show(mco->obj);
+ }
+}
+
+EINTERN void
+e_mod_move_bd_move_ctl_objs_hide(E_Move_Border *mb)
+{
+ Eina_List *l;
+ E_Move_Control_Object *mco;
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco)
+ {
+ if (!mco) continue;
+ if (!mco->obj) continue;
+ evas_object_hide(mco->obj);
+ }
+}
+
+EINTERN void
+e_mod_move_bd_move_ctl_objs_raise(E_Move_Border *mb)
+{
+ Eina_List *l;
+ E_Move_Control_Object *mco;
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco)
+ {
+ if (!mco) continue;
+ evas_object_raise(mco->obj);
+ }
+}
+
+EINTERN void
+e_mod_move_bd_move_ctl_objs_lower(E_Move_Border *mb)
+{
+ Eina_List *l;
+ E_Move_Control_Object *mco;
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco)
+ {
+ if (!mco) continue;
+ evas_object_lower(mco->obj);
+ }
+}
+
+EINTERN void
+e_mod_move_bd_move_ctl_objs_stack_above(E_Move_Border *mb,
+ E_Move_Border *mb2)
+{
+ Eina_List *l, *ll;
+ E_Move_Control_Object *mco, *mco2;
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco)
+ {
+ EINA_LIST_FOREACH(mb2->ctl_objs, ll, mco2)
+ {
+ if (mco->zone == mco2->zone)
+ evas_object_stack_above(mco->obj, mco2->obj);
+ }
+ }
+}
+
+EINTERN void
+e_mod_move_bd_move_ctl_objs_color_set(E_Move_Border *mb,
+ int r,
+ int g,
+ int b,
+ int a)
+{
+ Eina_List *l;
+ E_Move_Control_Object *mco;
+ if ( r > 255 ) r = 255;
+ if ( r < 0 ) r = 0;
+ if ( g > 255 ) g = 255;
+ if ( g < 0 ) g = 0;
+ if ( b > 255 ) b = 255;
+ if ( b < 0 ) b = 0;
+ if ( a > 255 ) a = 255;
+ if ( a < 0 ) a = 0;
+
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco)
+ {
+ if (!mco) continue;
+ if (!mco->obj) continue;
+ evas_object_color_set(mco->obj, r, g, b, a);
+ }
+}
+
+/* local subsystem functions */
+static void
+_e_mod_move_cb_control_object_del(void *data,
+ Evas *e,
+ Evas_Object *obj,
+ void *event_info __UNUSED__)
+{
+ E_Move_Border *mb = (E_Move_Border *)data;
+ E_Move_Control_Object *mco;
+ Eina_List *l;
+ E_CHECK(mb);
+
+ L(LT_EVENT_BD,
+ "[MOVE] ev:%15.15s w:0x%08x c:0x%08x\n", "CTL_OBJ_DEL",
+ mb->bd->win, mb->bd->client.win);
+
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco)
+ {
+ if (mco->obj == obj)
+ {
+ // remove Move_Object pointer from list;
+ mb->ctl_objs = eina_list_remove(mb->ctl_objs, mco);
+ // free data
+ memset(mco, 0, sizeof(E_Move_Control_Object));
+ E_FREE(mco);
+ break;
+ }
+ }
+}
--- /dev/null
+#ifdef E_TYPEDEFS
+#else
+#ifndef E_MOD_MOVE_CONTROL_OBJECT_H
+#define E_MOD_MOVE_CONTROL_OBJECT_H
+
+typedef struct _E_Move_Control_Object E_Move_Control_Object;
+
+struct _E_Move_Control_Object
+{
+ E_Move_Canvas *canvas;
+ E_Zone *zone;
+
+ Evas_Object *obj; // compositor's evas(window) object
+ E_Move_Event *event; // evas object's event handler object
+};
+
+EINTERN E_Move_Control_Object *e_mod_move_ctl_obj_add(E_Move_Border *mb, E_Move_Canvas *canvas);
+EINTERN void e_mod_move_ctl_obj_del(E_Move_Control_Object *mco);
+
+EINTERN Eina_List *e_mod_move_bd_move_ctl_objs_add(E_Move_Border *mb);
+EINTERN void e_mod_move_bd_move_ctl_objs_del(E_Move_Border *mb, Eina_List *ctl_objs);
+EINTERN void e_mod_move_bd_move_ctl_objs_move(E_Move_Border *mb, int x, int y);
+EINTERN void e_mod_move_bd_move_ctl_objs_resize(E_Move_Border *mb, int w, int h);
+EINTERN void e_mod_move_bd_move_ctl_objs_data_del(E_Move_Border *mb, const char *key);
+EINTERN void e_mod_move_bd_move_ctl_objs_data_set(E_Move_Border *mb, const char *key, const void *data);
+EINTERN void e_mod_move_bd_move_ctl_objs_show(E_Move_Border *mb);
+EINTERN void e_mod_move_bd_move_ctl_objs_hide(E_Move_Border *mb);
+EINTERN void e_mod_move_bd_move_ctl_objs_raise(E_Move_Border *mb);
+EINTERN void e_mod_move_bd_move_ctl_objs_lower(E_Move_Border *mb);
+EINTERN void e_mod_move_bd_move_ctl_objs_stack_above(E_Move_Border *mb, E_Move_Border *mb2);
+EINTERN void e_mod_move_bd_move_ctl_objs_color_set(E_Move_Border *mb, int r, int g, int b, int a);
+
+#endif
+#endif
--- /dev/null
+#include "e_mod_move_shared_types.h"
+#include "e_mod_move.h"
+#include "e_mod_move_atoms.h"
+#include "e_mod_move_debug.h"
+
+typedef struct _E_Mod_Move_Log_Info
+{
+ int type;
+ char file[256];
+} E_Mod_Move_Log_Info;
+
+/* local subsystem functions */
+static void _e_mod_move_debug_borders_info_dump(E_Move *m, FILE *fs);
+static void _e_mod_move_debug_borders_visibility_dump(E_Move *m, FILE *fs);
+static void _e_mod_move_debug_event_cb_dump(E_Move *m, FILE *fs);
+static void _e_mod_move_debug_control_objects_info_dump(E_Move *m, E_Move_Canvas *canvas, FILE *fs);
+static void _e_mod_move_debug_indicator_controller_info_dump(E_Move *m, E_Move_Canvas *canvas, FILE *fs);
+static void _e_mod_move_debug_canvas_info_dump(E_Move *m, E_Move_Canvas *canvas, FILE *fs);
+static void _e_mod_move_debug_evas_stack_dump(E_Move *m, E_Move_Canvas *canvas, FILE *fs);
+static void _e_mod_move_debug_dim_objects_info_dump(E_Move *m, E_Move_Canvas *canvas, FILE *fs);
+static void _e_mod_move_debug_event_logs_dump(E_Move *m, FILE *fs);
+static void _e_mod_move_debug_control_objects_visible_set(E_Move *m, E_Move_Canvas *canvas, Eina_Bool visi);
+static void _e_mod_move_debug_widget_objects_visible_set(E_Move *m, E_Move_Canvas *canvas, Eina_Bool visi);
+static void _e_mod_move_debug_indicator_controller_objects_visible_set(E_Move *m, E_Move_Canvas *canvas, Eina_Bool visi);
+static void _e_mod_move_debug_objects_visible_set(Eina_Bool visi);
+
+/* local subsystem functions */
+static void
+_e_mod_move_debug_borders_info_dump(E_Move *m,
+ FILE *fs)
+{
+ E_Move_Border *mb;
+ Ecore_X_Window bid = 0; // Border Window ID
+ Ecore_X_Window cid = 0; // Client Window ID
+ char *wname = NULL, *wclas = NULL;
+ int pid = 0, i = 0;
+ char buf[4096];
+ Eina_Bool res;
+
+ fprintf(fs, "\n\nB------------------------------------------------------------------------------------------------------------------------------------\n");
+ fprintf(fs, " <MOVE MODULE> BORDER STACK INFO \n");
+ fprintf(fs, "-------------------------------------------------------------------------------------------------------------------------------------\n");
+ fprintf(fs, " NO BORDER CLIENT_WIN V x y w h | SHAPE_INPUT (x, y, w, h) | CONTENTS ( x, y, w, h ) | PID WNAME / WCLASS\n");
+ fprintf(fs, "-------------------------------------------------------------------------------------------------------------------------------------\n");
+
+ EINA_INLIST_REVERSE_FOREACH(m->borders, mb)
+ {
+ cid = e_mod_move_util_client_xid_get(mb);
+ ecore_x_icccm_name_class_get(cid, &wname, &wclas);
+ res = ecore_x_netwm_pid_get(cid, &pid);
+ if (!res) pid = 0;
+
+ memset(buf, 0, sizeof(buf));
+
+ if (mb->bd)
+ {
+ bid = mb->bd->win;
+ snprintf(buf, sizeof(buf), "0x%07x", mb->bd->client.win);
+ }
+
+ fprintf(fs,
+ " %3d 0x%07x %9s %2s %5d %5d %4d %4d | (%4d,%4d,%4d,%4d ) | (%4d,%4d,%4d,%4d ) | %4d %s / %s\n",
+ i,
+ bid,
+ buf,
+ mb->visible ? "v" : " ",
+ mb->x, mb->y, mb->w, mb->h,
+ mb->shape_input ? mb->shape_input->x : 0,
+ mb->shape_input ? mb->shape_input->y : 0,
+ mb->shape_input ? mb->shape_input->w : 0,
+ mb->shape_input ? mb->shape_input->h : 0,
+ mb->contents ? mb->contents->x : 0,
+ mb->contents ? mb->contents->y : 0,
+ mb->contents ? mb->contents->w : 0,
+ mb->contents ? mb->contents->h : 0,
+ pid,
+ wname ? wname : "",
+ wclas ? wclas : "");
+
+ if (wname) free(wname);
+ if (wclas) free(wclas);
+ wname = wclas = NULL;
+ pid = cid = 0;
+ i++;
+ }
+ fprintf(fs, "E------------------------------------------------------------------------------------------------------------------------------------\n");
+}
+
+static void
+_e_mod_move_debug_borders_visibility_dump(E_Move *m,
+ FILE *fs)
+{
+ E_Move_Border *mb;
+ Ecore_X_Window cid = 0;
+ Ecore_X_Window bid = 0;
+ char *wname = NULL, *wclas = NULL;
+ int pid = 0, i = 0;
+ char buf[4096];
+ char buf2[4096];
+ Eina_Bool res;
+
+ fprintf(fs, "\n\nB----------------------------------------------------------------------------------------------------\n");
+ fprintf(fs, " <MOVE MODULE> VISIBILITY / INDICATOR_STATE / INDICATOR_TYPE Info\n");
+ fprintf(fs, "---------------------------------------------------------------------------------------------------------\n");
+ fprintf(fs, " NO BORDER CLIENT_WIN | V | VISIBILITY_STATE | INDICATOR_STATE | INDICATOR_TYPE | PID WNAME / WCLASS\n");
+ fprintf(fs, "---------------------------------------------------------------------------------------------------------\n");
+
+ EINA_INLIST_REVERSE_FOREACH(m->borders, mb)
+ {
+ cid = e_mod_move_util_client_xid_get(mb);
+ ecore_x_icccm_name_class_get(cid, &wname, &wclas);
+ res = ecore_x_netwm_pid_get(cid, &pid);
+ if (!res) pid = 0;
+
+ memset(buf, 0, sizeof(buf));
+ memset(buf2, 0, sizeof(buf));
+
+ if (mb->bd)
+ {
+ bid = mb->bd->win;
+ snprintf(buf, sizeof(buf), "0x%07x", mb->bd->client.win);
+ }
+
+ switch (mb->indicator_type)
+ {
+ case E_MOVE_INDICATOR_TYPE_NONE:
+ snprintf(buf2, sizeof(buf2), "%s", "NONE");
+ break;
+ case E_MOVE_INDICATOR_TYPE_1:
+ snprintf(buf2, sizeof(buf2), "%s", "TYPE_0");
+ break;
+ case E_MOVE_INDICATOR_TYPE_2:
+ snprintf(buf2, sizeof(buf2), "%s", "TYPE_1");
+ break;
+ default:
+ break;
+ }
+
+ fprintf(fs,
+ " %3d 0x%07x %9s | %2s | %16.16s | %15.15s | %14.14s | %4d %s / %s\n",
+ i,
+ bid,
+ buf,
+ mb->visible ? "v" : " ",
+ mb->visibility == E_MOVE_VISIBILITY_STATE_NONE ? ("None") : (mb->visibility == E_MOVE_VISIBILITY_STATE_VISIBLE ? "Visible" : "Fully Obscured"),
+ mb->indicator_state == E_MOVE_INDICATOR_STATE_NONE ? ("None") : (mb->indicator_state == E_MOVE_INDICATOR_STATE_ON ? "On" : "Off"),
+ buf2,
+ pid,
+ wname ? wname : "",
+ wclas ? wclas : "");
+
+ if (wname) free(wname);
+ if (wclas) free(wclas);
+ wname = wclas = NULL;
+ pid = cid = 0;
+ i++;
+ }
+ fprintf(fs, "E------------------------------------------------------------------------------------------------\n");
+}
+
+static void _e_mod_move_debug_event_cb_dump(E_Move *m,
+ FILE *fs)
+
+{
+ E_Move_Event_Cb motion_start_cb = NULL;
+ E_Move_Event_Cb motion_move_cb = NULL;
+ E_Move_Event_Cb motion_end_cb = NULL;
+
+ fprintf(fs, "\n\nB----------------------------------------------------------------------------------------------------------------------------------\n");
+ fprintf(fs, " <MOVE MODULE> EVENT_CallBack Pointer Dump \n");
+ fprintf(fs, "-----------------------------------------------------------------------------------------------------------------------------------\n");
+ motion_start_cb = e_mod_move_indicator_event_cb_get(E_MOVE_EVENT_TYPE_MOTION_START);
+ motion_move_cb = e_mod_move_indicator_event_cb_get(E_MOVE_EVENT_TYPE_MOTION_MOVE);
+ motion_end_cb = e_mod_move_indicator_event_cb_get(E_MOVE_EVENT_TYPE_MOTION_END);
+ fprintf(fs, "[INDICATOR ] Motion_Start: %p Motion_Move: %p Motion_End: %p\n", (void *)motion_start_cb, (void *)motion_move_cb, (void *)motion_end_cb);
+ motion_start_cb = e_mod_move_apptray_event_cb_get(E_MOVE_EVENT_TYPE_MOTION_START);
+ motion_move_cb = e_mod_move_apptray_event_cb_get(E_MOVE_EVENT_TYPE_MOTION_MOVE);
+ motion_end_cb = e_mod_move_apptray_event_cb_get(E_MOVE_EVENT_TYPE_MOTION_END);
+ fprintf(fs, "[ APPTRAY ] Motion_Start: %p Motion_Move: %p Motion_End: %p\n", (void *)motion_start_cb, (void *)motion_move_cb, (void *)motion_end_cb);
+ motion_start_cb = e_mod_move_quickpanel_event_cb_get(E_MOVE_EVENT_TYPE_MOTION_START);
+ motion_move_cb = e_mod_move_quickpanel_event_cb_get(E_MOVE_EVENT_TYPE_MOTION_MOVE);
+ motion_end_cb = e_mod_move_quickpanel_event_cb_get(E_MOVE_EVENT_TYPE_MOTION_END);
+ fprintf(fs, "[QUICKPANEL] Motion_Start: %p Motion_Move: %p Motion_End: %p\n", (void *)motion_start_cb, (void *)motion_move_cb, (void *)motion_end_cb);
+ fprintf(fs, "E-----------------------------------------------------------------------------------------------------------------------------------\n");
+}
+
+static void
+_e_mod_move_debug_control_objects_info_dump(E_Move *m,
+ E_Move_Canvas *canvas,
+ FILE *fs)
+{
+ Eina_List *l;
+ E_Move_Control_Object *mco, *_mco = NULL;
+ E_Move_Border *mb, *_mb = NULL;
+ int x, y, w, h, i = 1;
+ Ecore_X_Window cid = 0;
+ char *netwm_name = NULL;
+ E_Move_Event_Cb motion_start_cb = NULL;
+ E_Move_Event_Cb motion_move_cb = NULL;
+ E_Move_Event_Cb motion_end_cb = NULL;
+
+ _e_mod_move_debug_event_cb_dump(m, fs);
+
+ fprintf(fs, "\nB-------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n");
+ fprintf(fs, " <MOVE MODULE> Controller Object Info\n");
+ fprintf(fs, "----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n");
+ if (canvas->zone)
+ {
+ fprintf(fs, " canvas->zone:%p num:%d %d,%d %dx%d\n",
+ (void *)canvas->zone, canvas->zone->num,
+ canvas->zone->x, canvas->zone->y,
+ canvas->zone->w, canvas->zone->h);
+ }
+ fprintf(fs, "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n");
+
+ fprintf(fs, "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n");
+ fprintf(fs, " NO Border(WIN ID) ctl_obj found_o ex ey ew eh | V | Motion_Start_CB | Motion_Move_CB | Motion_End_CB | E_Move_Border_Type | NETWM_NAME| \n");
+ fprintf(fs, "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n");
+ Evas_Object *o = evas_object_top_get(canvas->evas);
+ Eina_Bool found = 0;
+ while (o)
+ {
+ EINA_INLIST_REVERSE_FOREACH(m->borders, mb)
+ {
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco)
+ {
+ if (!mco) continue;
+ if (mco->canvas != canvas) continue;
+ if (mco->obj == o)
+ {
+ found = 1;
+ _mco = mco;
+ _mb = mb;
+ break;
+ }
+ }
+ }
+
+ evas_object_geometry_get(o, &x, &y, &w, &h);
+ if (found && _mco && _mb && _mb->visible)
+ {
+ motion_start_cb = e_mod_move_event_cb_get(_mco->event,
+ E_MOVE_EVENT_TYPE_MOTION_START);
+ motion_move_cb = e_mod_move_event_cb_get(_mco->event,
+ E_MOVE_EVENT_TYPE_MOTION_MOVE);
+ motion_end_cb = e_mod_move_event_cb_get(_mco->event,
+ E_MOVE_EVENT_TYPE_MOTION_END);
+ cid = e_mod_move_util_client_xid_get(_mb);
+ ecore_x_netwm_name_get(cid, &netwm_name);
+ fprintf(fs,
+ " %2d 0x%07x %p %p %4d %4d %4d x %4d | %s | %p | %p | %p |%35.35s | %s\n",
+ i,
+ _mb->bd->win,
+ (void *)_mco->obj,
+ (void *)o,
+ x, y, w, h,
+ evas_object_visible_get(_mco->obj) ? "v" : "",
+ (void *)motion_start_cb,
+ (void *)motion_move_cb,
+ (void *)motion_end_cb,
+ e_mod_move_border_types_name_get(e_mod_move_border_type_get(_mb)),
+ netwm_name ? netwm_name : "");
+ }
+
+ o = evas_object_below_get(o);
+ found = 0;
+ _mco = NULL;
+ _mb = NULL;
+ motion_start_cb = NULL;
+ motion_move_cb = NULL;
+ motion_end_cb = NULL;
+ if (netwm_name) free(netwm_name);
+ netwm_name = NULL;
+ cid = 0;
+ i++;
+ }
+ fprintf(fs, "E----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n");
+}
+
+static void
+_e_mod_move_debug_indicator_controller_info_dump(E_Move *m,
+ E_Move_Canvas *canvas,
+ FILE *fs)
+{
+ Eina_List *l;
+ E_Move_Evas_Object *meo, *_meo = NULL;
+ int x, y, w, h, i = 1;
+ Ecore_X_Window cid = 0;
+ Ecore_X_Window target_win;
+ char *netwm_name = NULL;
+ E_Move_Indicator_Controller *mic = NULL;
+
+ fprintf(fs, "\n\nB----------------------------------------------------------------------------------------------\n");
+ fprintf(fs, " <MOVE MODULE> Indicator Controller Object Info ( It is used for FullScreen Window ) \n");
+ fprintf(fs, "-----------------------------------------------------------------------------------------------\n");
+ if (canvas->zone)
+ {
+ fprintf(fs, " canvas->zone:%p num:%d %d,%d %dx%d\n",
+ (void *)canvas->zone, canvas->zone->num,
+ canvas->zone->x, canvas->zone->y,
+ canvas->zone->w, canvas->zone->h);
+ }
+ fprintf(fs, "------------------------------------------------------------------------------------------------\n");
+
+ fprintf(fs, "------------------------------------------------------------------------------------------------\n");
+ fprintf(fs, " NO TARGET_WIN_ID indicator_control_obj found_o ex ey ew eh | V | NETWM_NAME\n");
+ fprintf(fs, "------------------------------------------------------------------------------------------------\n");
+ Evas_Object *o = evas_object_top_get(canvas->evas);
+ Eina_Bool found = 0;
+
+ if (e_mod_move_indicator_controller_state_get(m, &target_win))
+ {
+ mic = m->indicator_controller;
+ if (mic)
+ {
+ while (o)
+ {
+ EINA_LIST_FOREACH(mic->objs, l, meo)
+ {
+ if (!meo) continue;
+ if (meo->canvas != canvas) continue;
+ if (meo->obj == o)
+ {
+ found = 1;
+ _meo = meo;
+ break;
+ }
+ }
+
+ evas_object_geometry_get(o, &x, &y, &w, &h);
+ if (found && _meo)
+ {
+ cid = target_win;
+ ecore_x_netwm_name_get(cid, &netwm_name);
+ fprintf(fs,
+ " %2d 0x%07x %p %p %4d %4d %4d x %4d %s %s\n",
+ i,
+ target_win,
+ (void *)_meo->obj,
+ (void *)o,
+ x, y, w, h,
+ evas_object_visible_get(_meo->obj) ? "v" : "",
+ netwm_name ? netwm_name : "");
+ }
+
+ o = evas_object_below_get(o);
+ found = 0;
+ _meo = NULL;
+ if (netwm_name) free(netwm_name);
+ netwm_name = NULL;
+ cid = 0;
+ i++;
+ }
+ }
+ }
+ fprintf(fs, "E-----------------------------------------------------------------------------------------------\n");
+}
+
+static void
+_e_mod_move_debug_canvas_info_dump(E_Move *m,
+ E_Move_Canvas *canvas,
+ FILE *fs)
+{
+ Eina_List *l;
+ E_Move_Object *mo, *_mo = NULL;
+ E_Move_Border *mb, *_mb = NULL;
+ int x, y, w, h, i = 1;
+ Ecore_X_Window cid = 0;
+ char *netwm_name = NULL;
+
+ fprintf(fs, "\n\nB-------------------------------------------------------------------------------------\n");
+ fprintf(fs, " <MOVE MODULE> Mirror Object Info ( It is used for Move Scroll / Animation) \n");
+ fprintf(fs, "--------------------------------------------------------------------------------------\n");
+ if (canvas->zone)
+ {
+ fprintf(fs, " canvas->zone:%p num:%d %d,%d %dx%d\n",
+ (void *)canvas->zone, canvas->zone->num,
+ canvas->zone->x, canvas->zone->y,
+ canvas->zone->w, canvas->zone->h);
+ }
+ fprintf(fs, "--------------------------------------------------------------------------------------\n");
+
+ fprintf(fs, "--------------------------------------------------------------------------------------\n");
+ fprintf(fs, " NO Border(WIN ID) mirror_obj found_o ex ey ew eh | V | NETWM_NAME\n");
+ fprintf(fs, "--------------------------------------------------------------------------------------\n");
+ Evas_Object *o = evas_object_top_get(canvas->evas);
+ Eina_Bool found = 0;
+ while (o)
+ {
+ EINA_INLIST_REVERSE_FOREACH(m->borders, mb)
+ {
+ EINA_LIST_FOREACH(mb->objs, l, mo)
+ {
+ if (!mo) continue;
+ if (mo->canvas != canvas) continue;
+ if (mo->obj == o)
+ {
+ found = 1;
+ _mo = mo;
+ _mb = mb;
+ break;
+ }
+ }
+ }
+
+ evas_object_geometry_get(o, &x, &y, &w, &h);
+ if (found && _mo && _mb && _mb->visible)
+ {
+ cid = e_mod_move_util_client_xid_get(_mb);
+ ecore_x_netwm_name_get(cid, &netwm_name);
+ fprintf(fs,
+ " %2d 0x%07x %p %p %4d %4d %4d x %4d %s %s\n",
+ i,
+ _mb->bd->win,
+ (void *)_mo->obj,
+ (void *)o,
+ x, y, w, h,
+ evas_object_visible_get(_mo->obj) ? "v" : "",
+ netwm_name ? netwm_name : "");
+ }
+
+ o = evas_object_below_get(o);
+ found = 0;
+ _mo = NULL;
+ _mb = NULL;
+ if (netwm_name) free(netwm_name);
+ netwm_name = NULL;
+ cid = 0;
+ i++;
+ }
+ fprintf(fs, "E-------------------------------------------------------------------------------------\n");
+}
+
+static void
+_e_mod_move_debug_evas_stack_dump(E_Move *m,
+ E_Move_Canvas *canvas,
+ FILE *fs)
+{
+ int x, y, w, h, i = 1;
+ short layer;
+ char desc[50];
+
+ fprintf(fs, "\n\nB--------------------------------------------------------------------------------\n");
+ fprintf(fs, " < MOVE / COMP MODULE> Evas Object Stack Dump \n");
+ fprintf(fs, "---------------------------------------------------------------------------------\n");
+ if (canvas->zone)
+ {
+ fprintf(fs, " canvas->zone:%p num:%d %d,%d %dx%d\n",
+ (void *)canvas->zone, canvas->zone->num,
+ canvas->zone->x, canvas->zone->y,
+ canvas->zone->w, canvas->zone->h);
+ }
+ fprintf(fs, "----------------------------------------------------------------------------------\n");
+
+ fprintf(fs, "----------------------------------------------------------------------------------\n");
+ fprintf(fs, " NO obj | layer | ex ey ew eh | V | Description (Maker)\n");
+ fprintf(fs, "----------------------------------------------------------------------------------\n");
+
+ Evas_Object *o = evas_object_top_get(canvas->evas);
+
+ while (o)
+ {
+ memset(desc, 0, sizeof(desc));
+ if (evas_object_data_get(o, "win"))
+ {
+ if (evas_object_data_get(o, "src"))
+ strncpy(desc, "WINDOW (COMP)", strlen("WINDOW (COMP)"));
+ else
+ strncpy(desc, "NONE ( ? )", strlen("NONE ( ? )"));
+ }
+ else if (evas_object_data_get(o, "move_ctl_obj"))
+ strncpy(desc, "Control Obj (MOVE)", strlen("Control Obj (MOVE)"));
+ else if (evas_object_data_get(o, "move_widget_obj"))
+ strncpy(desc, "Widget Obj (MOVE)", strlen("Widget Obj (MOVE)"));
+ else if (evas_object_data_get(o, "move_dim_obj"))
+ strncpy(desc, "Dim Obj (MOVE)", strlen("Dim Obj (MOVE)"));
+ else if (evas_object_data_get(o, "move_evas_obj"))
+ strncpy(desc, "Move Evas Obj (MOVE)", strlen("Move Evas Obj (MOVE)"));
+ else if (evas_object_data_get(o, "move_evas_mirror_obj"))
+ strncpy(desc, "Move Evas Mirror Obj (MOVE)", strlen("Move Evas Mirror Obj (MOVE)"));
+ else if (evas_object_data_get(o, "move_mirror_obj"))
+ strncpy(desc, "Mirror Obj (MOVE)", strlen("Mirror Obj (MOVE)"));
+ else if (evas_object_data_get(o, "move_evas_clipper_obj"))
+ strncpy(desc, "Move Evas Clipper Obj (MOVE)", strlen("Move Evas Clipper Obj (MOVE)"));
+ else if (evas_object_data_get(o, "move_clipper_obj"))
+ strncpy(desc, "Move Clipper Obj (MOVE)", strlen("Move Clipper Obj (MOVE)"));
+ else
+ strncpy(desc, "NONE ( ? )", strlen("NONE ( ? )"));
+
+ evas_object_geometry_get(o, &x, &y, &w, &h);
+ layer = evas_object_layer_get(o);
+ fprintf(fs,
+ " %2d 0x%07x | %5d | %4d %4d %4d x %4d | %s | %s \n",
+ i,
+ (unsigned int)o,
+ layer,
+ x, y, w, h,
+ evas_object_visible_get(o) ? "v" : " ",
+ desc);
+
+ o = evas_object_below_get(o);
+ i++;
+ }
+ fprintf(fs, "E---------------------------------------------------------------------------------\n");
+}
+
+static void
+_e_mod_move_debug_dim_objects_info_dump(E_Move *m,
+ E_Move_Canvas *canvas,
+ FILE *fs)
+{
+ Eina_List *l;
+ E_Move_Dim_Object *mdo, *_mdo = NULL;
+ E_Move_Border *at_mb = NULL;
+ E_Move_Border *qp_mb = NULL;
+ E_Move_Apptray_Data *at_data = NULL;
+ E_Move_Quickpanel_Data *qp_data = NULL;
+ Eina_List *at_dim_objs = NULL;
+ Eina_List *qp_dim_objs = NULL;
+
+ int x, y, w, h, i = 1;
+
+ fprintf(fs, "\n\nB------------------------------------------------------------------\n");
+ fprintf(fs, " <MOVE MODULE> Dim Object Info \n");
+ fprintf(fs, "-------------------------------------------------------------------\n");
+ if (canvas->zone)
+ {
+ fprintf(fs, " canvas->zone:%p num:%d %d,%d %dx%d\n",
+ (void *)canvas->zone, canvas->zone->num,
+ canvas->zone->x, canvas->zone->y,
+ canvas->zone->w, canvas->zone->h);
+ }
+ fprintf(fs, "-------------------------------------------------------------------\n");
+
+ fprintf(fs, "-------------------------------------------------------------------\n");
+ fprintf(fs, " NO dim_obj found_o ex ey ew eh | V | DIM_INFO\n");
+ fprintf(fs, "-------------------------------------------------------------------\n");
+ Evas_Object *o = evas_object_top_get(canvas->evas);
+ Eina_Bool found = 0;
+
+ at_mb = e_mod_move_apptray_find();
+ qp_mb = e_mod_move_quickpanel_find();
+
+ if (at_mb) at_data = (E_Move_Apptray_Data *)(at_mb->data);
+ if (qp_mb) qp_data = (E_Move_Quickpanel_Data *)(qp_mb->data);
+
+ if (at_data) at_dim_objs = at_data->dim_objs;
+ if (qp_data) qp_dim_objs = qp_data->dim_objs;
+
+ while (o)
+ {
+ if (at_dim_objs)
+ EINA_LIST_FOREACH(at_dim_objs, l, mdo)
+ {
+ if (!mdo) continue;
+ if (mdo->canvas != canvas) continue;
+ if (mdo->obj == o)
+ {
+ found = 1;
+ _mdo = mdo;
+ break;
+ }
+ }
+
+ evas_object_geometry_get(o, &x, &y, &w, &h);
+ if (found && _mdo)
+ {
+ fprintf(fs,
+ " %2d %p %p %4d %4d %4d x %4d %s %s\n",
+ i,
+ (void *)_mdo->obj,
+ (void *)o,
+ x, y, w, h,
+ evas_object_visible_get(_mdo->obj) ? "v" : "",
+ "APPTRAY_DIM");
+ }
+
+ o = evas_object_below_get(o);
+ found = 0;
+ _mdo = NULL;
+ i++;
+ }
+
+ o = evas_object_top_get(canvas->evas);
+ found = 0;
+ i = 0;
+ while (o)
+ {
+ if (qp_dim_objs)
+ EINA_LIST_FOREACH(qp_dim_objs, l, mdo)
+ {
+ if (!mdo) continue;
+ if (mdo->canvas != canvas) continue;
+ if (mdo->obj == o)
+ {
+ found = 1;
+ _mdo = mdo;
+ break;
+ }
+ }
+
+ evas_object_geometry_get(o, &x, &y, &w, &h);
+ if (found && _mdo)
+ {
+ fprintf(fs,
+ " %2d %p %p %4d %4d %4d x %4d %s %s\n",
+ i,
+ (void *)_mdo->obj,
+ (void *)o,
+ x, y, w, h,
+ evas_object_visible_get(_mdo->obj) ? "v" : "",
+ "QUICKPANEL_DIM");
+ }
+
+ o = evas_object_below_get(o);
+ found = 0;
+ _mdo = NULL;
+ i++;
+ }
+
+ fprintf(fs, "E------------------------------------------------------------------\n");
+}
+
+static void
+_e_mod_move_debug_event_logs_dump(E_Move *m,
+ FILE *fs)
+{
+ Eina_List *l;
+ E_Move_Event_Log *log;
+ int i = 1;
+ char obj_type[20];
+
+ E_CHECK(m);
+ E_CHECK(m->ev_log);
+
+ fprintf(fs, "\n\nB----------------------------------------------------------------------------------------\n");
+ fprintf(fs, " <MOVE MODULE> EVENT LOG DUMP \n");
+ fprintf(fs, "-----------------------------------------------------------------------------------------\n");
+ fprintf(fs, "-----------------------------------------------------------------------------------------\n");
+ fprintf(fs, " NO EVENT_TYPE WID / OBJ ( x , y ) Button | Additional Data\n");
+ fprintf(fs, "-----------------------------------------------------------------------------------------\n");
+
+ EINA_LIST_FOREACH(m->ev_logs, l, log)
+ {
+ if ((log->t == E_MOVE_EVENT_LOG_EVAS_OBJECT_MOUSE_DOWN)
+ || (log->t == E_MOVE_EVENT_LOG_EVAS_OBJECT_MOUSE_UP))
+ {
+ memset(obj_type, 0, sizeof(obj_type));
+ switch (log->d.eo_m.t)
+ {
+ case E_MOVE_EVENT_LOG_EVAS_OBJECT_TYPE_QUICKPANEL:
+ strncpy(obj_type, "QUICKPANEL", sizeof("QUICKPANEL"));
+ break;
+ case E_MOVE_EVENT_LOG_EVAS_OBJECT_TYPE_APPTRAY:
+ strncpy(obj_type, "APPTRAY", sizeof("APPTRAY"));
+ break;
+ case E_MOVE_EVENT_LOG_EVAS_OBJECT_TYPE_INDICATOR:
+ strncpy(obj_type, "INDICATOR", sizeof("INDICATOR"));
+ break;
+ case E_MOVE_EVENT_LOG_EVAS_OBJECT_TYPE_UNKNOWN:
+ default:
+ strncpy(obj_type, "UNKNOWN", sizeof("UNKNOWN"));
+ break;
+ }
+ }
+
+ switch (log->t)
+ {
+ case E_MOVE_EVENT_LOG_ECORE_SINGLE_MOUSE_DOWN:
+ fprintf(fs,
+ " %2d %23s w:0x%08x (%4d ,%4d ) btn:%d\n",
+ i,
+ "ECORE_SINGLE_MOUSE_DOWN",
+ log->d.ec_sm.win,
+ log->d.ec_sm.x,
+ log->d.ec_sm.y,
+ log->d.ec_sm.btn);
+ break;
+ case E_MOVE_EVENT_LOG_ECORE_SINGLE_MOUSE_UP:
+ fprintf(fs,
+ " %2d %23s w:0x%08x (%4d ,%4d ) btn:%d\n",
+ i,
+ "ECORE_SINGLE_MOUSE_UP",
+ log->d.ec_sm.win,
+ log->d.ec_sm.x,
+ log->d.ec_sm.y,
+ log->d.ec_sm.btn);
+ break;
+ case E_MOVE_EVENT_LOG_ECORE_MULTI_MOUSE_DOWN:
+ fprintf(fs,
+ " %2d %23s w:0x%08x (%5.1f,%5.1f) btn:%d | dev:%d\n",
+ i,
+ "ECORE_MULTI_MOUSE_DOWN",
+ log->d.ec_mm.win,
+ log->d.ec_mm.x,
+ log->d.ec_mm.y,
+ log->d.ec_mm.btn,
+ log->d.ec_mm.dev);
+ break;
+ case E_MOVE_EVENT_LOG_ECORE_MULTI_MOUSE_UP:
+ fprintf(fs,
+ " %2d %23s w:0x%08x (%5.1f,%5.1f) btn:%d | dev:%d\n",
+ i,
+ "ECORE_MULTI_MOUSE_UP",
+ log->d.ec_mm.win,
+ log->d.ec_mm.x,
+ log->d.ec_mm.y,
+ log->d.ec_mm.btn,
+ log->d.ec_mm.dev);
+ break;
+ case E_MOVE_EVENT_LOG_EVAS_OBJECT_MOUSE_DOWN:
+ fprintf(fs,
+ " %2d %23s obj:%p (%4d ,%4d ) btn:%d | %10s eo_geo(%d,%d,%d,%d)\n",
+ i,
+ "EVAS_OBJECT_MOUSE_DOWN",
+ log->d.eo_m.obj,
+ log->d.eo_m.x,
+ log->d.eo_m.y,
+ log->d.eo_m.btn,
+ obj_type,
+ log->d.eo_m.ox,
+ log->d.eo_m.oy,
+ log->d.eo_m.ow,
+ log->d.eo_m.oh);
+ break;
+ case E_MOVE_EVENT_LOG_EVAS_OBJECT_MOUSE_UP:
+ fprintf(fs,
+ " %2d %23s obj:%p (%4d ,%4d ) btn:%d | %10s eo_geo(%d,%d,%d,%d)\n",
+ i,
+ "EVAS_OBJECT_MOUSE_UP",
+ log->d.eo_m.obj,
+ log->d.eo_m.x,
+ log->d.eo_m.y,
+ log->d.eo_m.btn,
+ obj_type,
+ log->d.eo_m.ox,
+ log->d.eo_m.oy,
+ log->d.eo_m.ow,
+ log->d.eo_m.oh);
+ break;
+ case E_MOVE_EVENT_LOG_UNKOWN:
+ default:
+ fprintf(fs,
+ " %2d %23s\n",
+ i,
+ "EVENT_LOG_UNKOWN");
+ break;
+ }
+ i++;
+ }
+ fprintf(fs, "E----------------------------------------------------------------------------------------\n");
+}
+
+static void
+_e_mod_move_debug_control_objects_visible_set(E_Move *m,
+ E_Move_Canvas *canvas,
+ Eina_Bool visi)
+{
+ Eina_List *l;
+ E_Move_Control_Object *mco, *_mco = NULL;
+ E_Move_Border *mb, *_mb = NULL;
+ Evas_Object *o = evas_object_top_get(canvas->evas);
+ Eina_Bool found = 0;
+
+ while (o)
+ {
+ EINA_INLIST_REVERSE_FOREACH(m->borders, mb)
+ {
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco)
+ {
+ if (!mco) continue;
+ if (mco->canvas != canvas) continue;
+ if (mco->obj == o)
+ {
+ found = 1;
+ _mco = mco;
+ _mb = mb;
+ break;
+ }
+ }
+ }
+
+ if (found && _mco && _mb && _mb->visible)
+ {
+ if (visi)
+ e_mod_move_bd_move_ctl_objs_color_set(_mb, 255, 0, 0, 100);
+ else
+ e_mod_move_bd_move_ctl_objs_color_set(_mb, 0, 0, 0, 0);
+ }
+
+ o = evas_object_below_get(o);
+ found = 0;
+ _mco = NULL;
+ _mb = NULL;
+ }
+}
+
+static void
+_e_mod_move_debug_widget_objects_visible_set(E_Move *m,
+ E_Move_Canvas *canvas,
+ Eina_Bool visi)
+{
+ Eina_List *l;
+ E_Move_Widget_Object *mwo, *_mwo = NULL;
+ Evas_Object *o = evas_object_top_get(canvas->evas);
+ Eina_Bool found = 0;
+ E_Move_Indicator_Widget *indi_widget = NULL;
+ E_Move_Mini_Apptray_Widget *mini_apptray_widget = NULL;
+
+ if ((indi_widget = e_mod_move_indicator_widget_get()))
+ {
+ while (o)
+ {
+ EINA_LIST_FOREACH(indi_widget->objs, l, mwo)
+ {
+ if (!mwo) continue;
+ if (mwo->canvas != canvas) continue;
+ if (mwo->obj == o)
+ {
+ found = 1;
+ _mwo = mwo;
+ break;
+ }
+ }
+
+ if (found && _mwo)
+ {
+ if (visi)
+ e_mod_move_evas_objs_color_set(indi_widget->objs,
+ 0, 0, 255, 100);
+ else
+ e_mod_move_evas_objs_color_set(indi_widget->objs,
+ 0, 0, 0, 0);
+ }
+
+ o = evas_object_below_get(o);
+ found = 0;
+ _mwo = NULL;
+ }
+ }
+
+ o = evas_object_top_get(canvas->evas);
+
+ if ((mini_apptray_widget = e_mod_move_mini_apptray_widget_get()))
+ {
+ while (o)
+ {
+ EINA_LIST_FOREACH(mini_apptray_widget->objs, l, mwo)
+ {
+ if (!mwo) continue;
+ if (mwo->canvas != canvas) continue;
+ if (mwo->obj == o)
+ {
+ found = 1;
+ _mwo = mwo;
+ break;
+ }
+ }
+
+ if (found && _mwo)
+ {
+ if (visi)
+ e_mod_move_evas_objs_color_set(mini_apptray_widget->objs,
+ 255, 255, 0, 100);
+ else
+ e_mod_move_evas_objs_color_set(mini_apptray_widget->objs,
+ 0, 0, 0, 0);
+ }
+
+ o = evas_object_below_get(o);
+ found = 0;
+ _mwo = NULL;
+ }
+ }
+}
+
+static void
+_e_mod_move_debug_indicator_controller_objects_visible_set(E_Move *m,
+ E_Move_Canvas *canvas,
+ Eina_Bool visi)
+{
+ Eina_List *l;
+ E_Move_Evas_Object *meo, *_meo = NULL;
+ Evas_Object *o = evas_object_top_get(canvas->evas);
+ Eina_Bool found = 0;
+ Ecore_X_Window target_win;
+ E_Move_Indicator_Controller *mic = NULL;
+
+ if (e_mod_move_indicator_controller_state_get(m, &target_win))
+ {
+ mic = m->indicator_controller;
+ while (o)
+ {
+ EINA_LIST_FOREACH(mic->objs, l, meo)
+ {
+ if (!meo) continue;
+ if (meo->canvas != canvas) continue;
+ if (meo->obj == o)
+ {
+ found = 1;
+ _meo = meo;
+ break;
+ }
+ }
+
+ if (found && _meo)
+ {
+ if (visi)
+ e_mod_move_evas_objs_color_set(mic->objs, 0, 255, 0, 100);
+ else
+ e_mod_move_evas_objs_color_set(mic->objs, 0, 0, 0, 0);
+ }
+
+ o = evas_object_below_get(o);
+ found = 0;
+ _meo = NULL;
+ }
+ }
+}
+
+static void
+_e_mod_move_debug_objects_visible_set(Eina_Bool visi)
+{
+ E_Move *m = NULL;
+ Eina_List *l = NULL;
+ E_Move_Canvas *canvas = NULL;
+
+ m = e_mod_move_util_get();
+ E_CHECK(m);
+
+ EINA_LIST_FOREACH(m->canvases, l, canvas)
+ {
+ if (!canvas) continue;
+ _e_mod_move_debug_control_objects_visible_set(m, canvas, visi);
+ _e_mod_move_debug_widget_objects_visible_set(m, canvas, visi);
+ _e_mod_move_debug_indicator_controller_objects_visible_set(m,
+ canvas,
+ visi);
+ }
+}
+
+/* externally accessible globals */
+EINTERN int logtype = LT_NOTHING;
+//EINTERN int logtype = LT_ALL;
+
+/* externally accessible functions */
+EINTERN Eina_Bool
+e_mod_move_debug_info_dump(Eina_Bool to_file,
+ const char *name)
+{
+ E_Move *m;
+ E_Move_Canvas *canvas;
+ Eina_List *l;
+ FILE *fs = stderr;
+ char *f_name = NULL;
+
+ m = e_mod_move_util_get();
+ E_CHECK_RETURN(m, 0);
+
+ if ((to_file) && (name))
+ {
+ f_name = E_NEW(char, strlen(name) + sizeof("_move") + 1);
+ memcpy(f_name, name, strlen(name));
+ strncat(f_name, "_move", sizeof("_move"));
+ if ((fs = fopen(f_name, "r+")) == NULL)
+ fs = fopen(f_name, "w+");
+ if (!fs)
+ {
+ fprintf(stderr, "can't open %s file.\n", f_name);
+ fs = stderr;
+ to_file = EINA_FALSE;
+ }
+ E_FREE(f_name);
+ }
+
+ _e_mod_move_debug_borders_info_dump(m, fs);
+ _e_mod_move_debug_borders_visibility_dump(m, fs);
+
+ EINA_LIST_FOREACH(m->canvases, l, canvas)
+ {
+ if (!canvas) continue;
+ _e_mod_move_debug_evas_stack_dump(m, canvas, fs);
+ _e_mod_move_debug_control_objects_info_dump(m, canvas, fs);
+ _e_mod_move_debug_canvas_info_dump(m, canvas, fs);
+ _e_mod_move_debug_dim_objects_info_dump(m, canvas, fs);
+ _e_mod_move_debug_indicator_controller_info_dump(m, canvas, fs);
+ }
+
+ _e_mod_move_debug_event_logs_dump(m, fs);
+
+ if (to_file)
+ {
+ fflush(fs);
+ fclose(fs);
+ }
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_debug_prop_handle(Ecore_X_Event_Window_Property *ev)
+{
+ Eina_Bool res = EINA_FALSE;
+ E_Mod_Move_Log_Info info = {LT_NOTHING, {0,}};
+ unsigned char* data = NULL;
+ int ret, n;
+
+ E_CHECK_RETURN(ev, 0);
+ E_CHECK_RETURN(ev->win, 0);
+
+ ret = ecore_x_window_prop_property_get
+ (ev->win, ATOM_CM_LOG, ECORE_X_ATOM_CARDINAL,
+ 32, &data, &n);
+ E_CHECK_GOTO((ret != -1), cleanup);
+ E_CHECK_GOTO(((ret > 0) && (data)), cleanup);
+
+ memcpy(&info, data, sizeof(E_Mod_Move_Log_Info));
+ logtype = info.type;
+
+ fprintf(stdout, "[MOVE] log-type:0x%08x\n", logtype);
+
+ if (logtype == LT_NOTHING)
+ {
+ _e_mod_move_debug_objects_visible_set(EINA_FALSE);
+ }
+ else if (logtype == (LT_CREATE | LT_INFO_SHOW))
+ {
+ e_mod_move_debug_info_dump(EINA_FALSE, NULL);
+ _e_mod_move_debug_objects_visible_set(EINA_TRUE);
+ }
+ else if ((logtype == LT_DUMP) &&
+ (strlen(info.file) > 0))
+ {
+ e_mod_move_debug_info_dump(EINA_TRUE, info.file);
+ ecore_x_client_message32_send
+ (ev->win, ATOM_MV_LOG_DUMP_DONE,
+ ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
+ 0, 0, 0, 0, 0);
+ }
+
+ if (logtype == LT_INFO)
+ logtype = LT_ALL;
+ else
+ logtype = LT_NOTHING;
+
+ res = EINA_TRUE;
+
+cleanup:
+ if (data) E_FREE(data);
+ return res;
+}
--- /dev/null
+#ifdef E_TYPEDEFS
+#else
+#ifndef E_MOD_MOVE_DEBUG_H
+#define E_MOD_MOVE_DEBUG_H
+
+#define E_CHECK(x) do {if (!(x)) return; } while(0)
+#define E_CHECK_RETURN(x, r) do {if (!(x)) return (r);} while(0)
+#define E_CHECK_GOTO(x, l) do {if (!(x)) goto l; } while(0)
+
+#define MOVE_LOG_BUILD_ENABLE 1
+#if MOVE_LOG_BUILD_ENABLE
+# define LT_NOTHING 0x0000
+# define LT_EVENT_X 0x0001
+# define LT_EVENT_BD 0x0002
+# define LT_CREATE 0x0004
+# define LT_EVENT_OBJ 0x0008
+# define LT_INFO 0x0010
+# define LT_INFO_SHOW 0x0080
+# define LT_DUMP 0x0100
+# define LT_ALL 0xFFFF
+
+extern EINTERN int logtype;
+
+# include <stdarg.h>
+# define L(t, f, x...) { \
+ if (logtype & t) \
+ printf(f, ##x); \
+}
+#else
+# define L(...) { ; }
+#endif /* MOVE_LOG_BUILD_ENABLE */
+
+typedef enum _E_Move_Event_Log_Type
+{
+ E_MOVE_EVENT_LOG_UNKOWN = 0,
+ E_MOVE_EVENT_LOG_ECORE_SINGLE_MOUSE_DOWN,
+ E_MOVE_EVENT_LOG_ECORE_SINGLE_MOUSE_UP,
+ E_MOVE_EVENT_LOG_ECORE_MULTI_MOUSE_DOWN,
+ E_MOVE_EVENT_LOG_ECORE_MULTI_MOUSE_UP,
+ E_MOVE_EVENT_LOG_EVAS_OBJECT_MOUSE_DOWN,
+ E_MOVE_EVENT_LOG_EVAS_OBJECT_MOUSE_UP,
+} E_Move_Event_Log_Type;
+
+typedef enum _E_Move_Event_Log_Evas_Object_Type
+{
+ E_MOVE_EVENT_LOG_EVAS_OBJECT_TYPE_UNKNOWN = 0,
+ E_MOVE_EVENT_LOG_EVAS_OBJECT_TYPE_QUICKPANEL,
+ E_MOVE_EVENT_LOG_EVAS_OBJECT_TYPE_INDICATOR,
+ E_MOVE_EVENT_LOG_EVAS_OBJECT_TYPE_APPTRAY
+} E_Move_Event_Log_Evas_Object_Type;
+
+typedef struct _E_Move_Event_Log
+{
+ E_Move_Event_Log_Type t; // type
+
+ union {
+ struct {
+ int x; // single touch x geomety position
+ int y; // single touch y geomety position
+ int btn; // Mouse button number
+ Ecore_X_Window win;
+ } ec_sm; // ecore sigle mouse data
+
+ struct {
+ double x; // multi touch x geomety position type is double
+ double y; // multi touch y geomety position type is double
+ int btn; // Mouse button number
+ int dev; // 0: normal mouse 1+: other mouse, multi touch
+ Ecore_X_Window win;
+ } ec_mm; // ecore multi mouse data
+
+ struct {
+ int x; // evas object mouse down x geomety position
+ int y; // evas object mouse down y geomety position
+ int btn; // Mouse button number
+ int ox; // evas object geometry x
+ int oy; // evas object geometry y
+ int ow; // evas object geometry w
+ int oh; // evas object geometry h
+ Evas_Object *obj;
+ E_Move_Event_Log_Evas_Object_Type t; // evas object type
+ } eo_m; // evas object mouse data
+ } d; // data
+} E_Move_Event_Log;
+
+EINTERN Eina_Bool e_mod_move_debug_info_dump(Eina_Bool to_file, const char *name);
+EINTERN Eina_Bool e_mod_move_debug_prop_handle(Ecore_X_Event_Window_Property *ev);
+
+#endif
+#endif
--- /dev/null
+#include "e_mod_move_shared_types.h"
+#include "e_mod_move_debug.h"
+#include "e_mod_move.h"
+
+/* local subsystem functions */
+static void _e_mod_move_cb_comp_object_restack(void *data, Evas *e, Evas_Object *obj, void *event_info);
+static void _e_mod_move_cb_comp_object_del(void *data, Evas *e, Evas_Object *obj, void *event_info);
+
+/* local subsystem functions */
+static void
+_e_mod_move_cb_comp_object_restack(void *data,
+ Evas *e,
+ Evas_Object *obj,
+ void *event_info)
+{
+ E_Move_Dim_Object *mdo = (E_Move_Dim_Object *)data;
+ E_CHECK(mdo);
+
+ E_CHECK(mdo->obj);
+ E_CHECK(obj);
+
+ evas_object_stack_below(mdo->obj, obj); // dim object below comp_obj.
+}
+
+static void _e_mod_move_cb_comp_object_del(void *data,
+ Evas *e,
+ Evas_Object *obj,
+ void *event_info)
+{
+ E_Move_Dim_Object *mdo = (E_Move_Dim_Object *)data;
+ E_CHECK(mdo);
+
+ E_CHECK(obj);
+
+ mdo->comp_obj = NULL;
+}
+
+/* externally accessible functions */
+EINTERN E_Move_Dim_Object *
+e_mod_move_dim_obj_add(E_Move_Border *mb,
+ E_Move_Canvas *canvas)
+{
+ E_Move *m;
+ E_Move_Dim_Object *mdo;
+ Evas *evas = NULL;
+ Evas_Object *comp_obj = NULL;
+ E_Manager_Comp_Source *comp_src = NULL;
+
+ E_CHECK_RETURN(mb, 0);
+ m = mb->m;
+ E_CHECK_RETURN(m, 0);
+ E_CHECK_RETURN(canvas, 0);
+
+ evas = canvas->evas;
+ E_CHECK_RETURN(evas, 0);
+
+ mdo = E_NEW(E_Move_Dim_Object, 1);
+ E_CHECK_RETURN(mdo, 0);
+
+ if (m->man->comp)
+ {
+ comp_src = e_manager_comp_src_get(m->man, mb->bd->win);
+ E_CHECK_GOTO(comp_src, error_cleanup);
+ comp_obj = e_manager_comp_src_shadow_get(m->man, comp_src);
+ E_CHECK_GOTO(comp_obj, error_cleanup);
+
+ mdo->obj = evas_object_rectangle_add(evas);
+ evas_object_color_set(mdo->obj, 0, 0, 0, m->dim_min_opacity);
+ evas_object_move(mdo->obj, canvas->x, canvas->y);
+ evas_object_resize(mdo->obj, canvas->w, canvas->h);
+
+ evas_object_stack_below(mdo->obj, comp_obj);
+
+ mdo->comp_obj = comp_obj;
+ mdo->canvas = canvas;
+ mdo->zone = canvas->zone;
+
+ evas_object_data_set(mdo->obj, "move_dim_obj", mdo->obj);
+
+ evas_object_event_callback_add(comp_obj, EVAS_CALLBACK_RESTACK,
+ _e_mod_move_cb_comp_object_restack,
+ mdo);
+ if (evas_alloc_error() != EVAS_ALLOC_ERROR_NONE)
+ {
+ fprintf(stderr,
+ "[MOVE] ERROR: Callback registering failed! Aborting. %s():%d\n",
+ __func__, __LINE__ );
+ }
+
+ evas_object_event_callback_add(comp_obj, EVAS_CALLBACK_DEL,
+ _e_mod_move_cb_comp_object_del, mdo);
+ if (evas_alloc_error() != EVAS_ALLOC_ERROR_NONE)
+ {
+ fprintf(stderr,
+ "[MOVE] ERROR: Callback registering failed! Aborting. %s():%d\n",
+ __func__, __LINE__ );
+ }
+
+ return mdo;
+ }
+
+error_cleanup:
+ memset(mdo, 0, sizeof(E_Move_Dim_Object));
+ E_FREE(mdo);
+ return NULL;
+}
+
+EINTERN void
+e_mod_move_dim_obj_del(E_Move_Dim_Object *mdo)
+{
+ E_CHECK(mdo);
+
+ if (mdo->comp_obj)
+ {
+ evas_object_event_callback_del(mdo->comp_obj,
+ EVAS_CALLBACK_RESTACK,
+ _e_mod_move_cb_comp_object_restack);
+ evas_object_event_callback_del(mdo->comp_obj,
+ EVAS_CALLBACK_DEL,
+ _e_mod_move_cb_comp_object_del);
+ }
+
+ if (mdo->obj)
+ evas_object_del(mdo->obj);
+ memset(mdo, 0, sizeof(E_Move_Dim_Object));
+ E_FREE(mdo);
+}
+
+EINTERN Eina_List *
+e_mod_move_bd_move_dim_objs_add(E_Move_Border *mb)
+{
+ Eina_List *l, *objs = NULL;
+ E_Move_Canvas *canvas;
+ E_Move_Dim_Object *mdo;
+
+ E_CHECK_RETURN(mb, 0);
+ E_CHECK_RETURN(mb->m, 0);
+ E_CHECK_RETURN(mb->m->canvases, 0);
+
+ EINA_LIST_FOREACH(mb->m->canvases, l, canvas)
+ {
+ mdo = e_mod_move_dim_obj_add(mb, canvas);
+ if (!mdo)
+ {
+ e_mod_move_bd_move_dim_objs_del(objs);
+ return NULL;
+ }
+ objs = eina_list_append(objs, mdo);
+ }
+ return objs;
+}
+
+EINTERN void
+e_mod_move_bd_move_dim_objs_del(Eina_List *objs)
+{
+ E_Move_Dim_Object *mdo;
+ EINA_LIST_FREE(objs, mdo)
+ {
+ e_mod_move_dim_obj_del(mdo);
+ }
+}
+
+EINTERN void
+e_mod_move_bd_move_dim_objs_opacity_set(Eina_List *objs,
+ int opacity)
+{
+ E_Move *m = NULL;
+ Eina_List *l;
+ E_Move_Dim_Object *mdo;
+ int r, g, b, a;
+ int max_opacity;
+ int min_opacity;
+
+ m = e_mod_move_util_get();
+ E_CHECK(m);
+
+ min_opacity = m->dim_min_opacity;
+ max_opacity = m->dim_max_opacity;
+
+ if (opacity < min_opacity) opacity = min_opacity;
+ if (opacity > max_opacity) opacity = max_opacity;
+
+ EINA_LIST_FOREACH(objs, l, mdo)
+ {
+ if (!mdo) continue;
+ if (!mdo->obj) continue;
+ evas_object_color_get(mdo->obj, &r, &g, &b, &a);
+ evas_object_color_set(mdo->obj, r, g, b, opacity);
+ }
+}
+
+EINTERN void
+e_mod_move_bd_move_dim_objs_show(Eina_List *objs)
+{
+ Eina_List *l;
+ E_Move_Dim_Object *mdo;
+ EINA_LIST_FOREACH(objs, l, mdo)
+ {
+ if (!mdo) continue;
+ if (!mdo->obj) continue;
+ evas_object_show(mdo->obj);
+ }
+}
+
+EINTERN void
+e_mod_move_bd_move_dim_objs_hide(Eina_List *objs)
+{
+ Eina_List *l;
+ E_Move_Dim_Object *mdo;
+ EINA_LIST_FOREACH(objs, l, mdo)
+ {
+ if (!mdo) continue;
+ if (!mdo->obj) continue;
+ evas_object_hide(mdo->obj);
+ }
+}
--- /dev/null
+#ifdef E_TYPEDEFS
+#else
+#ifndef E_MOD_MOVE_DIM_OBJECT_H
+#define E_MOD_MOVE_DIM_OBJECT_H
+
+typedef struct _E_Move_Dim_Object E_Move_Dim_Object;
+
+struct _E_Move_Dim_Object
+{
+ E_Move_Canvas *canvas;
+ E_Zone *zone;
+
+ Evas_Object *obj; // evas(dim) object
+ Evas_Object *comp_obj; // comp's window object, it is used for window stack change
+};
+
+EINTERN E_Move_Dim_Object *e_mod_move_dim_obj_add(E_Move_Border *mb, E_Move_Canvas *canvas);
+EINTERN void e_mod_move_dim_obj_del(E_Move_Dim_Object *mdo);
+
+EINTERN Eina_List *e_mod_move_bd_move_dim_objs_add(E_Move_Border *mb);
+EINTERN void e_mod_move_bd_move_dim_objs_del(Eina_List *objs);
+EINTERN void e_mod_move_bd_move_dim_objs_show(Eina_List *objs);
+EINTERN void e_mod_move_bd_move_dim_objs_hide(Eina_List *objs);
+EINTERN void e_mod_move_bd_move_dim_objs_opacity_set(Eina_List *objs, int opacity);
+
+#endif
+#endif
--- /dev/null
+#include "e_mod_move_shared_types.h"
+#include "e_mod_move_debug.h"
+#include "e_mod_move.h"
+
+/* local subsystem functions */
+
+static void
+_e_mod_move_evas_obj_del_cb(void *data,
+ Evas *e,
+ Evas_Object *obj,
+ void *event_info __UNUSED__)
+{
+ E_Move_Evas_Object *meo = (E_Move_Evas_Object *)data;
+ E_Move_Evas_Object *find_meo = NULL;
+ Eina_List *l;
+ Eina_List *objs;
+ Eina_List **objs_ptr;
+ E_CHECK(meo);
+
+ objs_ptr = (Eina_List**)evas_object_data_get(obj, "E_Move_Evas_Object_List_Pointer");
+ E_CHECK(objs_ptr);
+
+ objs = (Eina_List*)(*objs_ptr);
+ E_CHECK(objs);
+
+ EINA_LIST_FOREACH(objs, l, find_meo)
+ {
+ if (find_meo->obj == obj)
+ {
+ // if clipper exist, then delete clipper
+ if (find_meo->clipper)
+ {
+ evas_object_clip_unset(find_meo->obj);
+ evas_object_hide(find_meo->clipper);
+ evas_object_del(find_meo->clipper);
+ }
+ // remove Move_Evas_Object pointer from list;
+ *objs_ptr = eina_list_remove(objs, find_meo);
+ // free data
+ memset(find_meo, 0, sizeof(E_Move_Evas_Object));
+ E_FREE(find_meo);
+ break;
+ }
+ }
+}
+
+/* externally accessible functions */
+
+// bd NULL case : create rectangle object
+// bd indicates e_border case: create bd's mirror object from compositor
+EINTERN E_Move_Evas_Object *
+e_mod_move_evas_obj_add(E_Move *m,
+ E_Move_Canvas *canvas,
+ E_Border *bd)
+{
+ Evas *evas = NULL;
+ E_Move_Evas_Object *meo = NULL;
+ E_Manager_Comp_Source *comp_src = NULL;
+
+ E_CHECK_RETURN(m, NULL);
+ E_CHECK_RETURN(canvas, NULL);
+
+ evas = canvas->evas;
+ E_CHECK_RETURN(evas, NULL);
+
+ meo = E_NEW(E_Move_Evas_Object, 1);
+ E_CHECK_RETURN(meo, NULL);
+
+ if (bd) // move evas object create from compositor's mirror object
+ {
+ if (m->man->comp)
+ {
+ comp_src = e_manager_comp_src_get(m->man, bd->win);
+ E_CHECK_GOTO(comp_src, error_cleanup);
+ meo->obj = e_manager_comp_src_image_mirror_add(m->man, comp_src);
+ E_CHECK_GOTO(meo->obj, error_cleanup);
+ evas_object_data_set(meo->obj,"move_evas_mirror_obj", meo->obj);
+ }
+ else
+ goto error_cleanup;
+ }
+ else
+ {
+ meo->obj = evas_object_rectangle_add(evas);
+ evas_object_data_set(meo->obj, "move_evas_obj", meo->obj);
+ }
+
+ meo->canvas = canvas;
+ meo->zone = canvas->zone;
+ evas_object_data_set(meo->obj, "E_Move_Evas_Object", meo);
+ return meo;
+
+error_cleanup:
+ memset(meo, 0, sizeof(E_Move_Evas_Object));
+ E_FREE(meo);
+ return NULL;
+}
+
+EINTERN void
+e_mod_move_evas_obj_del(E_Move_Evas_Object *meo)
+{
+ E_CHECK(meo);
+
+ if (meo->event)
+ {
+ e_mod_move_event_free(meo->event);
+ meo->event = NULL;
+ }
+
+ if (meo->clipper) evas_object_del(meo->clipper);
+
+ if (meo->obj)
+ {
+ evas_object_event_callback_del(meo->obj, EVAS_CALLBACK_DEL,
+ _e_mod_move_evas_obj_del_cb);
+ evas_object_del(meo->obj);
+ }
+
+ memset(meo, 0, sizeof(E_Move_Evas_Object));
+ E_FREE(meo);
+}
+
+// bd NULL case : create rectangle object
+// bd indicates e_border case: create bd's mirror object from compositor
+EINTERN Eina_List *
+e_mod_move_evas_objs_add(E_Move *m,
+ E_Border *bd)
+{
+ Eina_List *l, *objs = NULL;
+ E_Move_Canvas *canvas;
+ E_Move_Evas_Object *meo;
+
+ E_CHECK_RETURN(m, 0);
+ E_CHECK_RETURN(m->canvases, 0);
+
+ EINA_LIST_FOREACH(m->canvases, l, canvas)
+ {
+ meo = e_mod_move_evas_obj_add(m, canvas, bd);
+ if (!meo)
+ {
+ e_mod_move_evas_objs_del(objs);
+ return NULL;
+ }
+ objs = eina_list_append(objs, meo);
+ }
+ return objs;
+}
+
+EINTERN void
+e_mod_move_evas_objs_del(Eina_List *objs)
+{
+ E_Move_Evas_Object *meo;
+ E_CHECK(objs);
+ EINA_LIST_FREE(objs, meo)
+ {
+ e_mod_move_evas_obj_del(meo);
+ }
+}
+
+EINTERN void
+e_mod_move_evas_objs_show(Eina_List *objs)
+{
+ Eina_List *l;
+ E_Move_Evas_Object *meo;
+ E_CHECK(objs);
+ EINA_LIST_FOREACH(objs, l, meo)
+ {
+ if (!meo) continue;
+ if (!meo->obj) continue;
+ evas_object_show(meo->obj);
+ }
+}
+
+EINTERN void
+e_mod_move_evas_objs_hide(Eina_List *objs)
+{
+ Eina_List *l;
+ E_Move_Evas_Object *meo;
+ E_CHECK(objs);
+ EINA_LIST_FOREACH(objs, l, meo)
+ {
+ if (!meo) continue;
+ if (!meo->obj) continue;
+ evas_object_hide(meo->obj);
+ }
+}
+
+EINTERN void
+e_mod_move_evas_objs_move(Eina_List *objs,
+ int x,
+ int y)
+{
+ Eina_List *l;
+ E_Move_Evas_Object *meo;
+ E_CHECK(objs);
+ EINA_LIST_FOREACH(objs, l, meo)
+ {
+ int zx = 0, zy = 0;
+ if (!meo) continue;
+ if (!meo->obj) continue;
+ if (meo->zone)
+ {
+ zx = meo->zone->x;
+ zy = meo->zone->y;
+ }
+ evas_object_move(meo->obj, x - zx, y - zy);
+ }
+}
+
+EINTERN void
+e_mod_move_evas_objs_resize(Eina_List *objs,
+ int w,
+ int h)
+{
+ Eina_List *l;
+ E_Move_Evas_Object *meo;
+ E_CHECK(objs);
+ EINA_LIST_FOREACH(objs, l, meo)
+ {
+ if (!meo) continue;
+ if (!meo->obj) continue;
+ evas_object_resize(meo->obj, w, h);
+ }
+}
+
+EINTERN void
+e_mod_move_evas_objs_data_del(Eina_List *objs,
+ const char *key)
+{
+ Eina_List *l;
+ E_Move_Evas_Object *meo;
+ E_CHECK(objs);
+ E_CHECK(key);
+ EINA_LIST_FOREACH(objs, l, meo)
+ {
+ if (!meo) continue;
+ if (!meo->obj) continue;
+ evas_object_data_del(meo->obj, key);
+ }
+}
+
+EINTERN void
+e_mod_move_evas_objs_data_set(Eina_List *objs,
+ const char *key,
+ const void *data)
+{
+ Eina_List *l;
+ E_Move_Evas_Object *meo;
+ E_CHECK(objs);
+ E_CHECK(key);
+ EINA_LIST_FOREACH(objs, l, meo)
+ {
+ if (!meo) continue;
+ if (!meo->obj) continue;
+ evas_object_data_set(meo->obj, key, data);
+ }
+}
+
+EINTERN void
+e_mod_move_evas_objs_raise(Eina_List *objs)
+{
+ Eina_List *l;
+ E_Move_Evas_Object *meo;
+ E_CHECK(objs);
+ EINA_LIST_FOREACH(objs, l, meo)
+ {
+ if (!meo) continue;
+ if (!meo->obj) continue;
+ evas_object_raise(meo->obj);
+ }
+}
+
+EINTERN void
+e_mod_move_evas_objs_lower(Eina_List *objs)
+{
+ Eina_List *l;
+ E_Move_Evas_Object *meo;
+ E_CHECK(objs);
+ EINA_LIST_FOREACH(objs, l, meo)
+ {
+ if (!meo) continue;
+ if (!meo->obj) continue;
+ evas_object_lower(meo->obj);
+ }
+}
+
+EINTERN void
+e_mod_move_evas_objs_stack_above(Eina_List *objs,
+ Eina_List *objs2)
+{
+ Eina_List *l, *ll;
+ E_Move_Evas_Object *meo, *meo2;
+ E_CHECK(objs);
+ E_CHECK(objs2);
+ EINA_LIST_FOREACH(objs, l, meo)
+ {
+ EINA_LIST_FOREACH(objs2, ll, meo2)
+ {
+ if (meo->zone == meo2->zone)
+ evas_object_stack_above(meo->obj, meo2->obj);
+ }
+ }
+}
+
+EINTERN void
+e_mod_move_evas_objs_layer_set(Eina_List *objs,
+ short layer)
+{
+ Eina_List *l;
+ E_Move_Evas_Object *meo;
+ E_CHECK(objs);
+ EINA_LIST_FOREACH(objs, l, meo)
+ {
+ if (!meo) continue;
+ if (!meo->obj) continue;
+ evas_object_layer_set(meo->obj, layer);
+ }
+}
+
+EINTERN void
+e_mod_move_evas_objs_color_set(Eina_List *objs,
+ int r,
+ int g,
+ int b,
+ int a)
+{
+ Eina_List *l;
+ E_Move_Evas_Object *meo;
+ E_CHECK(objs);
+
+ if (r < 0) r = 0;
+ if (r > 255) r = 255;
+ if (g < 0) g = 0;
+ if (g > 255) g = 255;
+ if (b < 0) b = 0;
+ if (b > 255) b = 255;
+ if (a < 0) a = 0;
+ if (a > 255) a = 255;
+
+ EINA_LIST_FOREACH(objs, l, meo)
+ {
+ if (!meo) continue;
+ if (!meo->obj) continue;
+ evas_object_color_set(meo->obj, r, g, b, a);
+ }
+}
+
+EINTERN void
+e_mod_move_evas_objs_del_cb_set(Eina_List **objs_ptr)
+{
+ Eina_List *l = NULL;
+ Eina_List *objs = NULL;
+ E_Move_Evas_Object *meo = NULL;
+
+ E_CHECK(objs_ptr);
+
+ objs = *objs_ptr;
+ E_CHECK(objs);
+
+ EINA_LIST_FOREACH(objs, l, meo)
+ {
+ if (!meo) continue;
+ if (!meo->obj) continue;
+
+ evas_object_data_set(meo->obj,
+ "E_Move_Evas_Object_List_Pointer",
+ objs_ptr);
+
+ evas_object_event_callback_add(meo->obj,
+ EVAS_CALLBACK_DEL,
+ _e_mod_move_evas_obj_del_cb,
+ meo);
+ }
+}
+
+EINTERN void
+e_mod_move_evas_objs_clipper_add(Eina_List *objs)
+{
+ Eina_List *l;
+ E_Move_Evas_Object *meo;
+ E_CHECK(objs);
+
+ EINA_LIST_FOREACH(objs, l, meo)
+ {
+ if (!meo) continue;
+ if (!meo->obj) continue;
+
+ if (meo->clipper) continue; // if clipper object exist, then do not create clipper object.
+ if (!meo->canvas) continue;
+ if (!meo->canvas->evas) continue;
+
+ meo->clipper = evas_object_rectangle_add(meo->canvas->evas);
+ if (meo->clipper)
+ {
+ evas_object_color_set(meo->clipper, 255,255,255,255);
+ evas_object_data_set(meo->clipper, "move_evas_clipper_obj", meo->clipper);
+ evas_object_clip_set(meo->obj, meo->clipper);
+ }
+ }
+}
+
+EINTERN void
+e_mod_move_evas_objs_clipper_del(Eina_List *objs)
+{
+ Eina_List *l;
+ E_Move_Evas_Object *meo;
+ E_CHECK(objs);
+
+ EINA_LIST_FOREACH(objs, l, meo)
+ {
+ if (!meo) continue;
+ if (!meo->obj) continue;
+ if (!meo->clipper) continue;
+
+ evas_object_clip_unset(meo->obj);
+ evas_object_del(meo->clipper);
+ meo->clipper = NULL;
+ }
+}
+
+EINTERN void
+e_mod_move_evas_objs_clipper_show(Eina_List *objs)
+{
+ Eina_List *l;
+ E_Move_Evas_Object *meo;
+ E_CHECK(objs);
+ EINA_LIST_FOREACH(objs, l, meo)
+ {
+ if (!meo) continue;
+ if (!meo->clipper) continue;
+
+ evas_object_show(meo->clipper);
+ }
+}
+
+EINTERN void
+e_mod_move_evas_objs_clipper_hide(Eina_List *objs)
+{
+ Eina_List *l;
+ E_Move_Evas_Object *meo;
+ E_CHECK(objs);
+ EINA_LIST_FOREACH(objs, l, meo)
+ {
+ if (!meo) continue;
+ if (!meo->clipper) continue;
+
+ evas_object_hide(meo->clipper);
+ }
+}
+
+EINTERN void
+e_mod_move_evas_objs_clipper_move(Eina_List *objs,
+ int x,
+ int y)
+{
+ Eina_List *l;
+ E_Move_Evas_Object *meo;
+ E_CHECK(objs);
+ EINA_LIST_FOREACH(objs, l, meo)
+ {
+ if (!meo) continue;
+ if (!meo->clipper) continue;
+
+ evas_object_move(meo->clipper, x, y);
+ }
+}
+
+EINTERN void
+e_mod_move_evas_objs_clipper_resize(Eina_List *objs,
+ int w,
+ int h)
+{
+ Eina_List *l;
+ E_Move_Evas_Object *meo;
+ E_CHECK(objs);
+ EINA_LIST_FOREACH(objs, l, meo)
+ {
+ if (!meo) continue;
+ if (!meo->clipper) continue;
+
+ evas_object_resize(meo->clipper, w, h);
+ }
+}
--- /dev/null
+#ifdef E_TYPEDEFS
+#else
+#ifndef E_MOD_MOVE_EVAS_OBJECT_H
+#define E_MOD_MOVE_EVAS_OBJECT_H
+
+typedef struct _E_Move_Evas_Object E_Move_Evas_Object;
+
+struct _E_Move_Evas_Object
+{
+ E_Move_Canvas *canvas;
+ E_Zone *zone;
+ Evas_Object *obj;
+ Evas_Object *clipper; // clipping evas object
+ E_Move_Event *event; // evas object's event handler object
+};
+
+EINTERN E_Move_Evas_Object *e_mod_move_evas_obj_add(E_Move *m, E_Move_Canvas *canvas, E_Border *bd);
+// bd NULL case : create rectangle object
+// bd indicates e_border case: create bd's mirror object from compositor
+
+EINTERN void e_mod_move_evas_obj_del(E_Move_Evas_Object *meo);
+
+EINTERN Eina_List *e_mod_move_evas_objs_add(E_Move *m, E_Border *bd);
+EINTERN void e_mod_move_evas_objs_del(Eina_List *objs);
+EINTERN void e_mod_move_evas_objs_show(Eina_List *objs);
+EINTERN void e_mod_move_evas_objs_hide(Eina_List *objs);
+EINTERN void e_mod_move_evas_objs_move(Eina_List *objs, int x, int y);
+EINTERN void e_mod_move_evas_objs_resize(Eina_List *objs, int w, int h);
+EINTERN void e_mod_move_evas_objs_data_del(Eina_List *objs, const char *key);
+EINTERN void e_mod_move_evas_objs_data_set(Eina_List *objs, const char *key, const void *data);
+EINTERN void e_mod_move_evas_objs_raise(Eina_List *objs);
+EINTERN void e_mod_move_evas_objs_lower(Eina_List *objs);
+EINTERN void e_mod_move_evas_objs_stack_above(Eina_List *objs, Eina_List *objs2);
+EINTERN void e_mod_move_evas_objs_layer_set(Eina_List *objs, short l);
+EINTERN void e_mod_move_evas_objs_color_set(Eina_List *objs, int r, int g, int b, int a);
+
+EINTERN void e_mod_move_evas_objs_del_cb_set(Eina_List **objs_ptr);
+EINTERN void e_mod_move_evas_objs_clipper_add(Eina_List *objs);
+EINTERN void e_mod_move_evas_objs_clipper_del(Eina_List *objs);
+EINTERN void e_mod_move_evas_objs_clipper_show(Eina_List *objs);
+EINTERN void e_mod_move_evas_objs_clipper_hide(Eina_List *objs);
+EINTERN void e_mod_move_evas_objs_clipper_move(Eina_List *objs, int x, int y);
+EINTERN void e_mod_move_evas_objs_clipper_resize(Eina_List *objs, int w, int h);
+#endif
+#endif
--- /dev/null
+#include "e_mod_move_shared_types.h"
+#include "e_mod_move_debug.h"
+#include "e_mod_move.h"
+#include "e_mod_move_event.h"
+
+struct _E_Move_Event
+{
+ E_Move_Event_State state;
+ Evas_Object *obj;
+ Eina_List *queue;
+ Eina_Bool send_all;
+ Eina_Bool find_redirect_win;
+ Eina_Bool click;
+ E_Move_Event_Data_Type data_type;
+
+ struct {
+ Ecore_X_Window id;
+ int angle;
+ E_Move_Event_Angle_Cb fn_angle_get;
+ } win;
+
+ struct {
+ E_Move_Event_Cb cb;
+ void *data;
+ } fn[E_MOVE_EVENT_TYPE_LAST];
+
+ struct {
+ E_Move_Event_Check_Cb cb;
+ void *data;
+ } ev_check;
+};
+
+/* local subsystem functions */
+static E_Move_Event_Motion_Info *_motion_info_new(void *event_info, Evas_Callback_Type type);
+static void _motion_info_free(E_Move_Event_Motion_Info *motion);
+static void _ev_cb_mouse_down(void *data, Evas *e, Evas_Object *obj, void *event_info);
+static void _ev_cb_mouse_move(void *data, Evas *e, Evas_Object *obj, void *event_info);
+static void _ev_cb_mouse_up(void *data, Evas *e, Evas_Object *obj, void *event_info);
+static Eina_Bool _ev_cb_call(E_Move_Event *ev, E_Move_Event_Motion_Info *motion);
+static void _event_pass(Ecore_X_Window id, Evas_Object *obj, void *event_info, Evas_Callback_Type type);
+
+/* local subsystem functions */
+#ifdef _EV_COPY
+# undef _EV_COPY
+#endif
+
+#define _EV_COPY(d, t, e) \
+ { \
+ d = (void *)E_NEW(t, 1); \
+ if (!d) { \
+ memset(motion, 0, sizeof(E_Move_Event_Motion_Info)); \
+ E_FREE(motion); \
+ return NULL; \
+ } \
+ memcpy(d, e, sizeof(t)); \
+ }
+
+static E_Move_Event_Motion_Info *
+_motion_info_new(void *event_info,
+ Evas_Callback_Type type)
+{
+ E_Move_Event_Motion_Info *motion = NULL;
+ void *data = NULL;
+ Evas_Event_Mouse_Down *down = NULL;
+ Evas_Event_Mouse_Up *up = NULL;
+ Evas_Event_Mouse_Move *move = NULL;
+
+ motion = E_NEW(E_Move_Event_Motion_Info, 1);
+ if (!motion) return NULL;
+
+ motion->cb_type = type;
+
+ switch (type)
+ {
+ case EVAS_CALLBACK_MOUSE_DOWN:
+ _EV_COPY(data, Evas_Event_Mouse_Down, event_info);
+ down = data;
+ motion->coord.x = down->output.x;
+ motion->coord.y = down->output.y;
+ motion->ev_type = E_MOVE_EVENT_TYPE_MOTION_START;
+ break;
+
+ case EVAS_CALLBACK_MOUSE_UP:
+ _EV_COPY(data, Evas_Event_Mouse_Up, event_info);
+ up = data;
+ motion->coord.x = up->output.x;
+ motion->coord.y = up->output.y;
+ motion->ev_type = E_MOVE_EVENT_TYPE_MOTION_END;
+ break;
+
+ case EVAS_CALLBACK_MOUSE_MOVE:
+ _EV_COPY(data, Evas_Event_Mouse_Move, event_info);
+ move = data;
+ motion->coord.x = move->cur.output.x;
+ motion->coord.y = move->cur.output.y;
+ motion->ev_type = E_MOVE_EVENT_TYPE_MOTION_MOVE;
+ break;
+
+ default:
+ break;
+ }
+
+ if (!data)
+ {
+ memset(motion, 0, sizeof(E_Move_Event_Motion_Info));
+ E_FREE(motion);
+ motion = NULL;
+ }
+ else
+ motion->event_info = data;
+
+ return motion;
+}
+
+static void
+_motion_info_free(E_Move_Event_Motion_Info *motion)
+{
+ if (!motion) return;
+ if (motion->event_info)
+ {
+ if (motion->ev_type == E_MOVE_EVENT_TYPE_MOTION_START)
+ memset(motion->event_info, 0, sizeof(Evas_Event_Mouse_Down));
+ else if (motion->ev_type == E_MOVE_EVENT_TYPE_MOTION_END)
+ memset(motion->event_info, 0, sizeof(Evas_Event_Mouse_Up));
+ else if (motion->ev_type == E_MOVE_EVENT_TYPE_MOTION_MOVE)
+ memset(motion->event_info, 0, sizeof(Evas_Event_Mouse_Move));
+
+ E_FREE(motion->event_info);
+ motion->event_info = NULL;
+ }
+ memset(motion, 0, sizeof(E_Move_Event_Motion_Info));
+ E_FREE(motion);
+ motion = NULL;
+}
+
+static void
+_ev_cb_mouse_down(void *data,
+ Evas *e __UNUSED__,
+ Evas_Object *obj __UNUSED__,
+ void *event_info)
+{
+ E_Move *m;
+ int ex, ey, ew, eh;
+ Evas_Event_Mouse_Down *dn_info = NULL;
+ E_Move_Event *ev;
+ E_Move_Event_Motion_Info *motion;
+
+ ev = (E_Move_Event *)data;
+ if (!event_info || !ev) return;
+
+ m = e_mod_move_util_get();
+ if ((m) && (m->ev_log))
+ {
+ E_Move_Event_Log *log = NULL;
+ E_Move_Border *mb = NULL;
+ if (ev->data_type == E_MOVE_EVENT_DATA_TYPE_BORDER)
+ mb = (E_Move_Border *)(ev->fn[E_MOVE_EVENT_TYPE_MOTION_START].data);
+
+ dn_info = (Evas_Event_Mouse_Down*)event_info;
+ ex = 0; ey = 0; ew = 0; eh = 0;
+ evas_object_geometry_get(obj, &ex, &ey, &ew, &eh);
+ log = E_NEW(E_Move_Event_Log, 1);
+ if (log)
+ {
+ log->t = E_MOVE_EVENT_LOG_EVAS_OBJECT_MOUSE_DOWN;
+ log->d.eo_m.x = dn_info->canvas.x;
+ log->d.eo_m.y = dn_info->canvas.y;
+ log->d.eo_m.btn = dn_info->button;
+ log->d.eo_m.ox = ex;
+ log->d.eo_m.oy = ey;
+ log->d.eo_m.ow = ew;
+ log->d.eo_m.oh = eh;
+ log->d.eo_m.obj = obj;
+
+ if (ev->data_type == E_MOVE_EVENT_DATA_TYPE_BORDER)
+ {
+ if (mb)
+ {
+ if (TYPE_APPTRAY_CHECK(mb))
+ log->d.eo_m.t = E_MOVE_EVENT_LOG_EVAS_OBJECT_TYPE_APPTRAY;
+ else if (TYPE_INDICATOR_CHECK(mb))
+ log->d.eo_m.t = E_MOVE_EVENT_LOG_EVAS_OBJECT_TYPE_INDICATOR;
+ else if (TYPE_QUICKPANEL_CHECK(mb))
+ log->d.eo_m.t = E_MOVE_EVENT_LOG_EVAS_OBJECT_TYPE_QUICKPANEL;
+ else
+ log->d.eo_m.t = E_MOVE_EVENT_LOG_EVAS_OBJECT_TYPE_UNKNOWN;
+ }
+ else
+ log->d.eo_m.t = E_MOVE_EVENT_LOG_EVAS_OBJECT_TYPE_UNKNOWN;
+ }
+ else if (ev->data_type == E_MOVE_EVENT_DATA_TYPE_WIDGET_INDICATOR)
+ {
+ log->d.eo_m.t = E_MOVE_EVENT_LOG_EVAS_OBJECT_TYPE_INDICATOR;
+ }
+ else
+ {
+ log->d.eo_m.t = E_MOVE_EVENT_LOG_EVAS_OBJECT_TYPE_UNKNOWN;
+ }
+ // list check and append
+ if (eina_list_count(m->ev_logs) >= m->ev_log_cnt)
+ {
+ // if log list is full, delete first log
+ E_Move_Event_Log *first_log = (E_Move_Event_Log*)eina_list_nth(m->ev_logs, 0);
+ m->ev_logs = eina_list_remove(m->ev_logs, first_log);
+ }
+ m->ev_logs = eina_list_append(m->ev_logs, log);
+ }
+ }
+
+#if MOVE_LOG_BUILD_ENABLE
+ if (logtype & LT_EVENT_OBJ)
+ {
+ dn_info = (Evas_Event_Mouse_Down*)event_info;
+ ex = 0; ey = 0; ew = 0; eh = 0;
+ evas_object_geometry_get(obj, &ex, &ey, &ew, &eh);
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s Evas_Object: %p eo_geo (x: %d, y: %d, w: %d, h: %d), \
+ ev_output_pos (%d,%d) ev_canvas_pos (%d,%d) %s()\n",
+ "EVAS_OBJ", obj, ex, ey, ew, eh, dn_info->output.x, dn_info->output.y,
+ dn_info->canvas.x, dn_info->canvas.y, __func__);
+ }
+#endif
+
+ e_mod_move_event_data_clear(ev);
+ ev->state = E_MOVE_EVENT_STATE_CHECK;
+
+ motion = _motion_info_new(event_info,
+ EVAS_CALLBACK_MOUSE_DOWN);
+ if (!motion) goto event_pass;
+
+ if (ev->find_redirect_win)
+ {
+ E_Border* find_bd = e_mod_move_util_border_find_by_pointer(motion->coord.x, motion->coord.y);
+ if (find_bd) ev->win.id = find_bd->client.win;
+ else ev->win.id = 0;
+ }
+
+ if (ev->win.fn_angle_get)
+ {
+ Eina_Bool res;
+ int angles[2];
+ res = ev->win.fn_angle_get(ev->win.id,
+ &angles[0],
+ &angles[1]);
+ if (res)
+ e_mod_move_event_angle_set(ev, angles[0]);
+ }
+
+ if (ev->send_all)
+ {
+ // ev->state = E_MOVE_EVENT_STATE_HOLD; // is it right?
+ _ev_cb_call(ev, motion);
+ _motion_info_free(motion);
+ motion = NULL;
+ goto event_pass;
+ }
+
+ if (!ev->ev_check.cb)
+ {
+ ev->state = E_MOVE_EVENT_STATE_HOLD;
+ _ev_cb_call(ev, motion);
+ _motion_info_free(motion);
+ motion = NULL;
+ }
+
+ if (motion)
+ ev->queue = eina_list_append(ev->queue, motion);
+
+ return;
+
+event_pass:
+ ev->state = E_MOVE_EVENT_STATE_PASS;
+ _event_pass(ev->win.id,
+ ev->obj,
+ event_info,
+ EVAS_CALLBACK_MOUSE_DOWN);
+}
+
+static void
+_ev_cb_mouse_move(void *data,
+ Evas *e __UNUSED__,
+ Evas_Object *obj __UNUSED__,
+ void *event_info)
+{
+ int ex, ey, ew, eh;
+ Evas_Event_Mouse_Move *mv_info = NULL;
+ E_Move_Event *ev;
+ E_Move_Event_Motion_Info *motion = NULL;
+
+ ev = (E_Move_Event *)data;
+ if (!event_info || !ev) return;
+
+#if MOVE_LOG_BUILD_ENABLE
+ if (logtype & LT_EVENT_OBJ)
+ {
+ mv_info = (Evas_Event_Mouse_Move*)event_info;
+ ex = 0; ey = 0; ew = 0; eh = 0;
+ evas_object_geometry_get(obj, &ex, &ey, &ew, &eh);
+
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s Evas_Object: %p eo_geo (x: %d, y: %d, w: %d, h: %d), \
+ ev_output_pos (%d,%d) ev_canvas_pos (%d,%d) %s()\n",
+ "EVAS_OBJ", obj, ex, ey, ew, eh,
+ mv_info->cur.output.x, mv_info->cur.output.y,
+ mv_info->cur.canvas.x, mv_info->cur.canvas.y, __func__);
+ }
+#endif
+
+ if (ev->send_all)
+ {
+ motion = _motion_info_new(event_info,
+ EVAS_CALLBACK_MOUSE_MOVE);
+ if (!motion) goto event_pass;
+ _ev_cb_call(ev, motion);
+ _motion_info_free(motion);
+ motion = NULL;
+ goto event_pass;
+ }
+
+ switch (ev->state)
+ {
+ case E_MOVE_EVENT_STATE_CHECK:
+ if (!ev->ev_check.cb) goto event_pass;
+ motion = _motion_info_new(event_info,
+ EVAS_CALLBACK_MOUSE_MOVE);
+ if (!motion) goto event_pass;
+
+ ev->queue = eina_list_append(ev->queue, motion);
+ ev->state = ev->ev_check.cb(ev, ev->ev_check.data);
+ if ((ev->state == E_MOVE_EVENT_STATE_PASS) ||
+ (ev->state == E_MOVE_EVENT_STATE_HOLD))
+ {
+ e_mod_move_event_data_clear(ev);
+ }
+ break;
+
+ case E_MOVE_EVENT_STATE_HOLD:
+ motion = _motion_info_new(event_info,
+ EVAS_CALLBACK_MOUSE_MOVE);
+ if (!motion) return;
+ _ev_cb_call(ev, motion);
+ _motion_info_free(motion);
+ motion = NULL;
+ break;
+
+ case E_MOVE_EVENT_STATE_PASS:
+ default:
+ _event_pass(ev->win.id,
+ ev->obj,
+ event_info,
+ EVAS_CALLBACK_MOUSE_MOVE);
+ break;
+ }
+
+ return;
+
+event_pass:
+ ev->state = E_MOVE_EVENT_STATE_PASS;
+ e_mod_move_event_data_clear(ev);
+ _event_pass(ev->win.id,
+ ev->obj,
+ event_info,
+ EVAS_CALLBACK_MOUSE_MOVE);
+}
+
+static void
+_ev_cb_mouse_up(void *data,
+ Evas *e __UNUSED__,
+ Evas_Object *obj __UNUSED__,
+ void *event_info)
+{
+ E_Move *m;
+ int ex, ey, ew, eh;
+ Evas_Event_Mouse_Up *up_info = NULL;
+ E_Move_Event *ev;
+ E_Move_Event_Motion_Info *motion = NULL;
+
+ ev = (E_Move_Event *)data;
+ if (!event_info || !ev) return;
+
+ m = e_mod_move_util_get();
+ if ((m) && (m->ev_log))
+ {
+ E_Move_Event_Log *log = NULL;
+
+ E_Move_Border *mb = NULL;
+ if (ev->data_type == E_MOVE_EVENT_DATA_TYPE_BORDER)
+ mb = (E_Move_Border *)(ev->fn[E_MOVE_EVENT_TYPE_MOTION_END].data);
+
+ up_info = (Evas_Event_Mouse_Up*)event_info;
+ ex = 0; ey = 0; ew = 0; eh = 0;
+ evas_object_geometry_get(obj, &ex, &ey, &ew, &eh);
+ log = E_NEW(E_Move_Event_Log, 1);
+ if (log)
+ {
+ log->t = E_MOVE_EVENT_LOG_EVAS_OBJECT_MOUSE_UP;
+ log->d.eo_m.x = up_info->canvas.x;
+ log->d.eo_m.y = up_info->canvas.y;
+ log->d.eo_m.btn = up_info->button;
+ log->d.eo_m.ox = ex;
+ log->d.eo_m.oy = ey;
+ log->d.eo_m.ow = ew;
+ log->d.eo_m.oh = eh;
+ log->d.eo_m.obj = obj;
+
+ if (ev->data_type == E_MOVE_EVENT_DATA_TYPE_BORDER)
+ {
+ if (mb)
+ {
+ if (TYPE_APPTRAY_CHECK(mb))
+ log->d.eo_m.t = E_MOVE_EVENT_LOG_EVAS_OBJECT_TYPE_APPTRAY;
+ else if (TYPE_INDICATOR_CHECK(mb))
+ log->d.eo_m.t = E_MOVE_EVENT_LOG_EVAS_OBJECT_TYPE_INDICATOR;
+ else if (TYPE_QUICKPANEL_CHECK(mb))
+ log->d.eo_m.t = E_MOVE_EVENT_LOG_EVAS_OBJECT_TYPE_QUICKPANEL;
+ else
+ log->d.eo_m.t = E_MOVE_EVENT_LOG_EVAS_OBJECT_TYPE_UNKNOWN;
+ }
+ else
+ log->d.eo_m.t = E_MOVE_EVENT_LOG_EVAS_OBJECT_TYPE_UNKNOWN;
+ }
+ else if (ev->data_type == E_MOVE_EVENT_DATA_TYPE_WIDGET_INDICATOR)
+ {
+ log->d.eo_m.t = E_MOVE_EVENT_LOG_EVAS_OBJECT_TYPE_INDICATOR;
+ }
+ else
+ {
+ log->d.eo_m.t = E_MOVE_EVENT_LOG_EVAS_OBJECT_TYPE_UNKNOWN;
+ }
+ // list check and append
+ if (eina_list_count(m->ev_logs) >= m->ev_log_cnt)
+ {
+ // if log list is full, delete first log
+ E_Move_Event_Log *first_log = (E_Move_Event_Log*)eina_list_nth(m->ev_logs, 0);
+ m->ev_logs = eina_list_remove(m->ev_logs, first_log);
+ }
+ m->ev_logs = eina_list_append(m->ev_logs, log);
+ }
+ }
+
+#if MOVE_LOG_BUILD_ENABLE
+ if (logtype & LT_EVENT_OBJ)
+ {
+ up_info = (Evas_Event_Mouse_Up*)event_info;
+ ex = 0; ey = 0; ew = 0; eh = 0;
+ evas_object_geometry_get(obj, &ex, &ey, &ew, &eh);
+
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s Evas_Object: %p eo_geo (x: %d, y: %d, w: %d, h: %d), \
+ ev_output_pos (%d,%d) ev_canvas_pos (%d,%d) %s()\n",
+ "EVAS_OBJ", obj, ex, ey, ew, eh, up_info->output.x, up_info->output.y,
+ up_info->canvas.x, up_info->canvas.y, __func__);
+ }
+#endif
+
+ if (ev->send_all)
+ {
+ motion = _motion_info_new(event_info,
+ EVAS_CALLBACK_MOUSE_UP);
+ if (!motion) goto event_pass;
+ _ev_cb_call(ev, motion);
+ _motion_info_free(motion);
+ motion = NULL;
+ goto event_pass;
+ }
+
+ switch (ev->state)
+ {
+ case E_MOVE_EVENT_STATE_CHECK:
+ ev->state = E_MOVE_EVENT_STATE_PASS;
+ e_mod_move_event_data_clear(ev);
+ _event_pass(ev->win.id,
+ ev->obj,
+ event_info,
+ EVAS_CALLBACK_MOUSE_UP);
+ break;
+
+ case E_MOVE_EVENT_STATE_HOLD:
+ motion = _motion_info_new(event_info,
+ EVAS_CALLBACK_MOUSE_UP);
+ if (!motion) return;
+ _ev_cb_call(ev, motion);
+ _motion_info_free(motion);
+ motion = NULL;
+ break;
+
+ case E_MOVE_EVENT_STATE_PASS:
+ default:
+ _event_pass(ev->win.id,
+ ev->obj,
+ event_info,
+ EVAS_CALLBACK_MOUSE_UP);
+ break;
+ }
+
+ ev->state = E_MOVE_EVENT_STATE_UNKOWN;
+ return;
+
+event_pass:
+ ev->state = E_MOVE_EVENT_STATE_PASS;
+ e_mod_move_event_data_clear(ev);
+ _event_pass(ev->win.id,
+ ev->obj,
+ event_info,
+ EVAS_CALLBACK_MOUSE_UP);
+ ev->state = E_MOVE_EVENT_STATE_UNKOWN;
+}
+
+static Eina_Bool
+_ev_cb_call(E_Move_Event *ev,
+ E_Move_Event_Motion_Info *motion)
+{
+ E_Move_Event_Type type = motion->ev_type;
+
+ if (!ev->fn[type].cb)
+ return EINA_FALSE;
+
+#if MOVE_LOG_BUILD_ENABLE
+ if (logtype & LT_EVENT_OBJ)
+ {
+ switch (type)
+ {
+ case E_MOVE_EVENT_TYPE_FIRST:
+ L(LT_EVENT_OBJ,"[MOVE] ev:%15.15s motion_ev_type: %s %s()\n",
+ "EVAS_OBJ", "E_MOVE_EVENT_TYPE_FIRST", __func__);
+ break;
+ case E_MOVE_EVENT_TYPE_MOTION_START:
+ L(LT_EVENT_OBJ,"[MOVE] ev:%15.15s motion_ev_type: %s %s()\n",
+ "EVAS_OBJ", "E_MOVE_EVENT_TYPE_MOTION_START", __func__);
+ break;
+ case E_MOVE_EVENT_TYPE_MOTION_MOVE:
+ L(LT_EVENT_OBJ,"[MOVE] ev:%15.15s motion_ev_type: %s %s()\n",
+ "EVAS_OBJ", "E_MOVE_EVENT_TYPE_MOTION_MOVE", __func__);
+ break;
+ case E_MOVE_EVENT_TYPE_MOTION_END:
+ L(LT_EVENT_OBJ,"[MOVE] ev:%15.15s motion_ev_type: %s %s()\n",
+ "EVAS_OBJ", "E_MOVE_EVENT_TYPE_MOTION_END", __func__);
+ break;
+ case E_MOVE_EVENT_TYPE_LAST:
+ L(LT_EVENT_OBJ,"[MOVE] ev:%15.15s motion_ev_type: %s EventType is Wrong. %s()\n",
+ "EVAS_OBJ", "E_MOVE_EVENT_TYPE_LAST", __func__);
+ // event TYPE_LAST is used for array boundary check. so error return.
+ return EINA_FALSE;
+ default:
+ L(LT_EVENT_OBJ,"[MOVE] ev:%15.15s motion_ev_type: %s %s()\n",
+ "EVAS_OBJ", "NONE", __func__);
+ break;
+ }
+ }
+#endif
+
+ return ev->fn[type].cb(ev->fn[type].data,
+ motion);
+}
+
+static void
+_event_pass(Ecore_X_Window id,
+ Evas_Object *obj,
+ void *event_info,
+ Evas_Callback_Type type)
+{
+ Evas_Event_Mouse_Down *down = NULL;
+ Evas_Event_Mouse_Up *up = NULL;
+ Evas_Event_Mouse_Move *move = NULL;
+ Evas_Coord x = 0, y =0, w, h;
+ E_Border *bd = NULL;
+
+ if (!id || !event_info) return;
+
+ bd = e_border_find_all_by_client_window(id);
+ if (bd)
+ {
+ x = bd->x;
+ y = bd->y;
+ w = bd->w;
+ h = bd->h;
+ }
+ else ecore_x_window_geometry_get(id, &x, &y, &w, &h);
+
+ switch (type)
+ {
+ case EVAS_CALLBACK_MOUSE_DOWN:
+ down = event_info;
+ ecore_x_mouse_down_send(id,
+ down->canvas.x -x,
+ down->canvas.y -y,
+ down->button);
+ break;
+
+ case EVAS_CALLBACK_MOUSE_UP:
+ up = event_info;
+ ecore_x_mouse_up_send(id,
+ up->canvas.x -x,
+ up->canvas.y -y,
+ up->button);
+ break;
+
+ case EVAS_CALLBACK_MOUSE_MOVE:
+ move = event_info;
+ ecore_x_mouse_move_send(id,
+ move->cur.output.x -x,
+ move->cur.output.y -y);
+ break;
+
+ default:
+ break;
+ }
+}
+
+/* externally accessible functions */
+EINTERN E_Move_Event *
+e_mod_move_event_new(Ecore_X_Window win,
+ Evas_Object *obj)
+{
+ E_Move_Event *ev;
+ if (!win || !obj) return NULL;
+
+ ev = E_NEW(E_Move_Event, 1);
+ if (!ev) return NULL;
+
+ ev->obj = obj;
+ ev->win.id = win;
+
+ evas_object_event_callback_add
+ (obj, EVAS_CALLBACK_MOUSE_DOWN, _ev_cb_mouse_down, ev);
+ if (evas_alloc_error() != EVAS_ALLOC_ERROR_NONE)
+ {
+ fprintf(stderr,
+ "[E17-MOVE-ERR] %20.20s(%04d) Callback registering failed! "
+ "w:0x%07x obj:%p EVAS_CALLBACK_MOUSE_DOWN\n",
+ __func__, __LINE__, win, obj);
+ memset(ev, 0, sizeof(E_Move_Event));
+ E_FREE(ev);
+ ev = NULL;
+ return NULL;
+ }
+
+ evas_object_event_callback_add
+ (obj, EVAS_CALLBACK_MOUSE_MOVE, _ev_cb_mouse_move, ev);
+ if (evas_alloc_error() != EVAS_ALLOC_ERROR_NONE)
+ {
+ evas_object_event_callback_del
+ (obj, EVAS_CALLBACK_MOUSE_DOWN, _ev_cb_mouse_down);
+ fprintf(stderr,
+ "[E17-MOVE-ERR] %20.20s(%04d) Callback registering failed! "
+ "w:0x%07x obj:%p EVAS_CALLBACK_MOUSE_MOVE\n",
+ __func__, __LINE__, win, obj);
+ memset(ev, 0, sizeof(E_Move_Event));
+ E_FREE(ev);
+ ev = NULL;
+ return NULL;
+ }
+
+ evas_object_event_callback_add
+ (obj, EVAS_CALLBACK_MOUSE_UP, _ev_cb_mouse_up, ev);
+ if (evas_alloc_error() != EVAS_ALLOC_ERROR_NONE)
+ {
+ evas_object_event_callback_del
+ (obj, EVAS_CALLBACK_MOUSE_DOWN, _ev_cb_mouse_down);
+ evas_object_event_callback_del
+ (obj, EVAS_CALLBACK_MOUSE_MOVE, _ev_cb_mouse_move);
+ fprintf(stderr,
+ "[E17-MOVE-ERR] %20.20s(%04d) Callback registering failed! "
+ "w:0x%07x obj:%p EVAS_CALLBACK_MOUSE_UP\n",
+ __func__, __LINE__, win, obj);
+ memset(ev, 0, sizeof(E_Move_Event));
+ E_FREE(ev);
+ ev = NULL;
+ return NULL;
+ }
+
+ return ev;
+}
+
+EINTERN void
+e_mod_move_event_free(E_Move_Event *ev)
+{
+ int i;
+ if (!ev) return;
+
+ e_mod_move_event_data_clear(ev);
+
+ if (ev->obj)
+ {
+ evas_object_event_callback_del
+ (ev->obj, EVAS_CALLBACK_MOUSE_DOWN,
+ _ev_cb_mouse_down);
+
+ evas_object_event_callback_del
+ (ev->obj, EVAS_CALLBACK_MOUSE_MOVE,
+ _ev_cb_mouse_move);
+
+ evas_object_event_callback_del
+ (ev->obj, EVAS_CALLBACK_MOUSE_UP,
+ _ev_cb_mouse_up);
+ }
+
+ for (i = 0; i < E_MOVE_EVENT_TYPE_LAST; i++)
+ {
+ ev->fn[i].cb = NULL;
+ ev->fn[i].data = NULL;
+ }
+
+ ev->state = E_MOVE_EVENT_STATE_UNKOWN;
+ ev->win.id = 0;
+ ev->win.angle = 0;
+ ev->win.fn_angle_get = NULL;
+ ev->ev_check.cb = NULL;
+ ev->ev_check.data = NULL;
+ ev->obj = NULL;
+
+ memset(ev, 0, sizeof(E_Move_Event));
+ E_FREE(ev);
+ ev = NULL;
+}
+
+EINTERN Eina_Bool
+e_mod_move_event_cb_set(E_Move_Event *ev,
+ E_Move_Event_Type type,
+ E_Move_Event_Cb cb,
+ void *data)
+{
+ if (!ev) return EINA_FALSE;
+ ev->fn[type].cb = cb;
+ ev->fn[type].data = data;
+ return EINA_TRUE;
+}
+
+EINTERN E_Move_Event_Cb
+e_mod_move_event_cb_get(E_Move_Event *ev,
+ E_Move_Event_Type type)
+{
+ E_CHECK_RETURN(ev, 0);
+ return ev->fn[type].cb;
+}
+
+EINTERN Eina_Bool
+e_mod_move_event_angle_cb_set(E_Move_Event *ev,
+ E_Move_Event_Angle_Cb cb)
+{
+ if (!ev) return EINA_FALSE;
+ ev->win.fn_angle_get = cb;
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_event_check_cb_set(E_Move_Event *ev,
+ E_Move_Event_Check_Cb cb,
+ void *data)
+{
+ if (!ev) return EINA_FALSE;
+ ev->ev_check.cb = cb;
+ ev->ev_check.data = data;
+ return EINA_TRUE;
+}
+
+EINTERN Eina_List *
+e_mod_move_event_ev_queue_get(E_Move_Event *ev)
+{
+ if (!ev) return NULL;
+ return ev->queue;
+}
+
+EINTERN E_Move_Event_State
+e_mod_move_event_state_get(E_Move_Event *ev)
+{
+ if (!ev) return E_MOVE_EVENT_STATE_PASS;
+ return ev->state;
+}
+
+EINTERN Eina_Bool
+e_mod_move_event_angle_set(E_Move_Event *ev,
+ int angle)
+{
+ if (!ev) return EINA_FALSE;
+ ev->win.angle = ((angle % 360) / 90) * 90;
+ return EINA_TRUE;
+}
+
+EINTERN int
+e_mod_move_event_angle_get(E_Move_Event *ev)
+{
+ if (!ev) return 0;
+ return ev->win.angle;
+}
+
+EINTERN Eina_Bool
+e_mod_move_event_click_set(E_Move_Event *ev,
+ Eina_Bool click)
+{
+ if (!ev) return EINA_FALSE;
+ ev->click = click;
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_event_click_get(E_Move_Event *ev)
+{
+ if (!ev) return 0;
+ return ev->click;
+}
+
+EINTERN Eina_Bool
+e_mod_move_event_data_clear(E_Move_Event *ev)
+{
+ if (!ev) return EINA_FALSE;
+ if (!ev->queue) return EINA_TRUE;
+
+ E_Move_Event_Motion_Info *info;
+ EINA_LIST_FREE(ev->queue, info)
+ {
+ if (!info) continue;
+ if (ev->state == E_MOVE_EVENT_STATE_PASS)
+ {
+ _event_pass(ev->win.id,
+ ev->obj,
+ info->event_info,
+ info->cb_type);
+ }
+ else if (ev->state == E_MOVE_EVENT_STATE_HOLD)
+ {
+ _ev_cb_call(ev, info);
+ }
+ _motion_info_free(info);
+ }
+
+ ev->queue = NULL;
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_event_send_all_set(E_Move_Event *ev,
+ Eina_Bool send_all)
+{
+ if (!ev) return EINA_FALSE;
+ ev->send_all = send_all;
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_event_data_type_set(E_Move_Event *ev,
+ E_Move_Event_Data_Type type)
+{
+ if (!ev) return EINA_FALSE;
+ ev->data_type = type;
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_event_find_redirect_win_set(E_Move_Event *ev,
+ Eina_Bool find_redirect_win)
+{
+ if (!ev) return EINA_FALSE;
+ ev->find_redirect_win = find_redirect_win;
+ return EINA_TRUE;
+}
--- /dev/null
+#ifdef E_TYPEDEFS
+#else
+#ifndef E_MOD_MOVE_EVENT_H
+#define E_MOD_MOVE_EVENT_H
+
+typedef struct _E_Move_Event E_Move_Event;
+typedef struct _E_Move_Event_Motion_Info E_Move_Event_Motion_Info;
+
+typedef enum _E_Move_Event_Type E_Move_Event_Type;
+typedef enum _E_Move_Event_State E_Move_Event_State;
+typedef enum _E_Move_Event_Data_Type E_Move_Event_Data_Type;
+
+typedef Eina_Bool (*E_Move_Event_Cb) (void *, void *);
+typedef Eina_Bool (*E_Move_Event_Angle_Cb) (Ecore_X_Window, int *, int *);
+typedef E_Move_Event_State (*E_Move_Event_Check_Cb) (E_Move_Event *, void *);
+
+enum _E_Move_Event_Type
+{
+ E_MOVE_EVENT_TYPE_FIRST = 0,
+ E_MOVE_EVENT_TYPE_MOTION_START,
+ E_MOVE_EVENT_TYPE_MOTION_MOVE,
+ E_MOVE_EVENT_TYPE_MOTION_END,
+ E_MOVE_EVENT_TYPE_LAST
+};
+
+enum _E_Move_Event_State
+{
+ E_MOVE_EVENT_STATE_UNKOWN = 0,
+ E_MOVE_EVENT_STATE_CHECK,
+ E_MOVE_EVENT_STATE_PASS,
+ E_MOVE_EVENT_STATE_HOLD
+};
+
+struct _E_Move_Event_Motion_Info
+{
+ Evas_Callback_Type cb_type;
+ E_Move_Event_Type ev_type;
+ void *event_info;
+ Evas_Point coord;
+};
+
+enum _E_Move_Event_Data_Type
+{
+ E_MOVE_EVENT_DATA_TYPE_NONE = 0,
+ E_MOVE_EVENT_DATA_TYPE_BORDER,
+ E_MOVE_EVENT_DATA_TYPE_WIDGET_INDICATOR
+};
+
+/* event management functions */
+EINTERN E_Move_Event *e_mod_move_event_new(Ecore_X_Window win, Evas_Object *obj);
+EINTERN void e_mod_move_event_free(E_Move_Event *ev);
+EINTERN Eina_Bool e_mod_move_event_cb_set(E_Move_Event *ev, E_Move_Event_Type type, E_Move_Event_Cb cb, void *data);
+EINTERN E_Move_Event_Cb e_mod_move_event_cb_get(E_Move_Event *ev, E_Move_Event_Type type);
+EINTERN Eina_Bool e_mod_move_event_angle_cb_set(E_Move_Event *ev, E_Move_Event_Angle_Cb cb);
+EINTERN Eina_Bool e_mod_move_event_check_cb_set(E_Move_Event *ev, E_Move_Event_Check_Cb cb, void *data);
+EINTERN Eina_List *e_mod_move_event_ev_queue_get(E_Move_Event *ev);
+EINTERN E_Move_Event_State e_mod_move_event_state_get(E_Move_Event *ev);
+EINTERN Eina_Bool e_mod_move_event_angle_set(E_Move_Event *ev, int angle);
+EINTERN int e_mod_move_event_angle_get(E_Move_Event *ev);
+EINTERN Eina_Bool e_mod_move_event_click_set(E_Move_Event *ev, Eina_Bool click);
+EINTERN Eina_Bool e_mod_move_event_click_get(E_Move_Event *ev);
+EINTERN Eina_Bool e_mod_move_event_data_clear(E_Move_Event *ev);
+EINTERN Eina_Bool e_mod_move_event_send_all_set(E_Move_Event *ev, Eina_Bool send_all);
+EINTERN Eina_Bool e_mod_move_event_data_type_set(E_Move_Event *ev, E_Move_Event_Data_Type type);
+EINTERN Eina_Bool e_mod_move_event_find_redirect_win_set(E_Move_Event *ev, Eina_Bool find_redirect_win);
+
+#endif
+#endif
--- /dev/null
+#include "e_mod_move_shared_types.h"
+#include "e_mod_move_debug.h"
+#include "e_mod_move.h"
+
+struct _E_Move_Flick_Data
+{
+ int sx; // start x
+ int sy; // start y
+ int ex; // end x
+ int ey; // end y
+ double st; // start time
+ double et; // end time
+};
+
+/* local subsystem functions */
+
+/* local subsystem functions */
+
+/* externally accessible functions */
+
+EINTERN E_Move_Flick_Data *
+e_mod_move_flick_data_new(E_Move_Border *mb)
+{
+ E_Move_Flick_Data *flick;
+ E_CHECK_RETURN(mb, 0);
+
+ if (mb->flick_data) return mb->flick_data;
+
+ flick = E_NEW(E_Move_Flick_Data, 1);
+ E_CHECK_RETURN(flick, 0);
+
+ mb->flick_data = flick;
+ return flick;
+}
+
+EINTERN void
+e_mod_move_flick_data_free(E_Move_Border *mb)
+{
+ E_CHECK(mb);
+ E_CHECK(mb->flick_data);
+ E_FREE(mb->flick_data);
+ mb->flick_data = NULL;
+}
+
+EINTERN Eina_Bool
+e_mod_move_flick_data_init(E_Move_Border *mb,
+ int x,
+ int y)
+{
+ E_Move_Flick_Data *flick;
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(mb->flick_data, EINA_FALSE);
+ flick = mb->flick_data;
+ flick->sx = x;
+ flick->sy = y;
+ flick->ex = x;
+ flick->ey = y;
+ flick->st = ecore_time_get();
+ flick->et = flick->st;
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_flick_data_update(E_Move_Border *mb,
+ int x,
+ int y)
+{
+ E_Move_Flick_Data *flick;
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(mb->flick_data, EINA_FALSE);
+ flick = mb->flick_data;
+ flick->ex = x;
+ flick->ey = y;
+ flick->et = ecore_time_get();
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_flick_state_get(E_Move_Border *mb,
+ Eina_Bool direction_check)
+{
+ E_Move_Flick_Data *flick;
+ double flick_speed = 0.0; // todo speed configuration
+ double speed = 0.0;
+ int dx, dy;
+ double dt;
+ Eina_Bool state = EINA_FALSE;
+
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(mb->m, EINA_FALSE);
+ E_CHECK_RETURN(mb->flick_data, EINA_FALSE);
+ flick = mb->flick_data;
+ flick_speed = mb->m->flick_speed_limit;
+
+ dx = flick->ex - flick->sx;
+ dy = flick->ey - flick->sy;
+ dt = flick->et - flick->st;
+
+ E_CHECK_RETURN(dt, EINA_FALSE);
+
+ if (direction_check)
+ {
+ switch(mb->angle)
+ {
+ case 90:
+ case 270:
+ if ((abs(dy)*3) > abs(dx)) return EINA_FALSE;
+ break;
+ case 0:
+ case 180:
+ default :
+ if ((abs(dx)*3) > abs(dy)) return EINA_FALSE;
+ break;
+ }
+ }
+
+ speed = sqrt((dx * dx) + (dy * dy)) / dt;
+
+ if (speed > flick_speed) state = EINA_TRUE;
+
+ return state;
+}
+
+EINTERN Eina_Bool
+e_mod_move_flick_data_get(E_Move_Border *mb,
+ int *sx,
+ int *sy,
+ int *ex,
+ int *ey,
+ double *st,
+ double *et)
+{
+ E_Move_Flick_Data *flick;
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(mb->flick_data, EINA_FALSE);
+ E_CHECK_RETURN(sx, EINA_FALSE);
+ E_CHECK_RETURN(sy, EINA_FALSE);
+ E_CHECK_RETURN(ex, EINA_FALSE);
+ E_CHECK_RETURN(ey, EINA_FALSE);
+ E_CHECK_RETURN(st, EINA_FALSE);
+ E_CHECK_RETURN(et, EINA_FALSE);
+
+ flick = mb->flick_data;
+
+ *sx = flick->sx;
+ *sy = flick->sy;
+ *ex = flick->ex;
+ *ey = flick->ey;
+ *st = flick->st;
+ *et = flick->et;
+
+ return EINA_TRUE;
+}
--- /dev/null
+#ifdef E_TYPEDEFS
+#else
+#ifndef E_MOD_MOVE_FLICK_H
+#define E_MOD_MOVE_FLICK_H
+
+typedef struct _E_Move_Flick_Data E_Move_Flick_Data;
+
+EINTERN E_Move_Flick_Data *e_mod_move_flick_data_new(E_Move_Border *mb);
+EINTERN Eina_Bool e_mod_move_flick_data_init(E_Move_Border *mb, int x, int y);
+EINTERN Eina_Bool e_mod_move_flick_data_update(E_Move_Border *mb, int x, int y);
+EINTERN Eina_Bool e_mod_move_flick_state_get(E_Move_Border *mb, Eina_Bool direction_check);
+EINTERN void e_mod_move_flick_data_free(E_Move_Border *mb);
+EINTERN Eina_Bool e_mod_move_flick_data_get(E_Move_Border *mb, int *sx, int *sy, int *ex, int *ey, double *st, double *et);
+
+#endif
+#endif
--- /dev/null
+#include "e_mod_move_shared_types.h"
+#include "e_mod_move_debug.h"
+#include "e_mod_move.h"
+
+struct _E_Move_Indicator_Data
+{
+ Eina_Bool quickpanel_move;
+ Eina_Bool apptray_move;
+};
+
+/* local subsystem functions */
+static E_Move_Event_State _e_mod_move_indicator_cb_motion_check(E_Move_Event *ev, void *data);
+static Eina_Bool _e_mod_move_indicator_cb_motion_start(void *data, void *event_info);
+static Eina_Bool _e_mod_move_indicator_cb_motion_move(void *data, void *event_info);
+static Eina_Bool _e_mod_move_indicator_cb_motion_end(void *data, void *event_info);
+static Eina_Bool _e_mod_move_indicator_quickpanel_flick_process(E_Move_Border *mb, E_Move_Border *mb2, int angle, Eina_Bool state);
+static Eina_Bool _e_mod_move_indicator_apptray_flick_process(E_Move_Border *mb, E_Move_Border *mb2, int angle, Eina_Bool state);
+static Eina_Bool _e_mod_move_indicator_cb_motion_start_internal_apptray_check(E_Move_Border *at_mb);
+static Eina_Bool _e_mod_move_indicator_cb_motion_start_internal_quickpanel_check(E_Move_Border *qp_mb);
+static Eina_Bool _e_mod_move_indicator_apptray_move_set(E_Move_Border *mb, Eina_Bool state);
+static Eina_Bool _e_mod_move_indicator_quickpanel_move_set(E_Move_Border *mb, Eina_Bool state);
+static Eina_Bool _e_mod_move_indicator_apptray_move_get(E_Move_Border *mb);
+static Eina_Bool _e_mod_move_indicator_quickpanel_move_get(E_Move_Border *mb);
+static Eina_Bool _e_mod_move_indicator_home_region_release_check(E_Move_Border *mb, Eina_Bool apptray_move, int angle, Evas_Point pos);
+
+/* local subsystem functions */
+static E_Move_Event_State
+_e_mod_move_indicator_cb_motion_check(E_Move_Event *ev,
+ void *data)
+{
+ E_Move_Border *mb = (E_Move_Border *)data;
+ Eina_List *l, *ll;
+ E_Move_Event_Motion_Info *m0, *m1;
+ unsigned int cnt = 0;
+ E_Move_Event_State res = E_MOVE_EVENT_STATE_PASS;
+ int w, h, angle, min_len, min_cnt = 2;
+
+ if (!ev || !mb) goto finish;
+
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s w:0x%08x %s()\n", "EVAS_OBJ", mb->bd->win, __func__);
+
+ res = e_mod_move_event_state_get(ev);
+ angle = e_mod_move_event_angle_get(ev);
+
+ l = e_mod_move_event_ev_queue_get(ev);
+ if (!l) goto finish;
+
+ cnt = eina_list_count(l);
+ if (cnt < min_cnt) goto finish;
+
+ m0 = eina_list_data_get(l);
+ if (!m0) goto finish;
+
+ ll = eina_list_last(l);
+ if (!ll) goto finish;
+
+ m1 = eina_list_data_get(ll);
+ if (!m1) goto finish;
+
+ if ((m1->cb_type == EVAS_CALLBACK_MOUSE_UP) &&
+ (res == E_MOVE_EVENT_STATE_CHECK))
+ {
+ return E_MOVE_EVENT_STATE_PASS;
+ }
+
+ w = abs(m1->coord.x - m0->coord.x);
+ h = abs(m1->coord.y - m0->coord.y);
+ min_len = (mb->w > mb->h) ? (mb->h * 2) : (mb->w * 2);
+
+ if ((w < min_len) && (h < min_len))
+ {
+ goto finish;
+ }
+
+ switch (angle)
+ {
+ case 90:
+ case 270:
+ if (w < h) res = E_MOVE_EVENT_STATE_PASS;
+ else res = E_MOVE_EVENT_STATE_HOLD;
+ break;
+ case 180:
+ case 0:
+ default :
+ if (w > h) res = E_MOVE_EVENT_STATE_PASS;
+ else res = E_MOVE_EVENT_STATE_HOLD;
+ break;
+ }
+
+finish:
+ return res;
+}
+
+static Eina_Bool
+_e_mod_move_indicator_cb_motion_start(void *data,
+ void *event_info)
+{
+ E_Move *m = NULL;
+ E_Move_Border *mb = (E_Move_Border *)data;
+ E_Move_Border *qp_mb = NULL;
+ E_Move_Border *at_mb = NULL;
+ E_Move_Event_Motion_Info *info;
+ E_Move_Control_Object *mco = NULL;
+ Eina_List *l;
+ int angle = 0;
+ E_Move_Scroll_Region_Indicator scroll_region = E_MOVE_SCROLL_REGION_NONE;
+
+ info = (E_Move_Event_Motion_Info *)event_info;
+ m = e_mod_move_util_get();
+
+ if (!m || !mb || !info) return EINA_FALSE;
+
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s w:0x%08x INDI_MOTION_START (%4d,%4d)\n",
+ "EVAS_OBJ", mb->bd->win,
+ info->coord.x, info->coord.y);
+
+ E_CHECK_RETURN(e_mod_move_indicator_scrollable_check(), EINA_FALSE);
+
+ _e_mod_move_indicator_apptray_move_set(mb, EINA_FALSE);
+ _e_mod_move_indicator_quickpanel_move_set(mb, EINA_FALSE);
+
+ /* check if apptray or quickpanel exists on the current zone */
+ at_mb = e_mod_move_apptray_find();
+ if ((at_mb) &&
+ (REGION_INSIDE_ZONE(at_mb, mb->bd->zone)))
+ {
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s w:0x%08x INDI_MOTION_START %s\n",
+ "EVAS_OBJ", mb->bd->win,
+ "apptray exists. return.");
+ return EINA_FALSE;
+ }
+
+ qp_mb = e_mod_move_quickpanel_find();
+ if ((qp_mb) &&
+ (REGION_INSIDE_ZONE(qp_mb, mb->bd->zone)))
+ {
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s w:0x%08x INDI_MOTION_START %s\n",
+ "EVAS_OBJ", mb->bd->win,
+ "quickpanel exists. return.");
+ return EINA_FALSE;
+ }
+
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco)
+ {
+ if (!mco) continue;
+ angle = e_mod_move_event_angle_get(mco->event);
+ }
+ mb->angle = angle;
+
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco)
+ {
+ if (!mco) continue;
+ e_mod_move_event_click_set(mco->event, EINA_TRUE);
+ }
+
+ E_CHECK_GOTO(e_mod_move_flick_data_new(mb), error_cleanup);
+ e_mod_move_flick_data_init(mb, info->coord.x, info->coord.y);
+
+ scroll_region = e_mod_move_indicator_region_scroll_check(mb->angle, info->coord);
+
+ if (scroll_region == E_MOVE_SCROLL_REGION_APPTRAY)
+ {
+ if (!_e_mod_move_indicator_cb_motion_start_internal_apptray_check(at_mb))
+ {
+ goto error_cleanup;
+ }
+
+ e_mod_move_apptray_e_border_raise(at_mb);
+ _e_mod_move_indicator_apptray_move_set(mb, EINA_TRUE);
+ e_mod_move_apptray_objs_animation_start_position_set(at_mb,
+ angle);
+ // send apptray to "move start message".
+ e_mod_move_apptray_anim_state_send(at_mb, EINA_TRUE);
+ }
+ else if (scroll_region == E_MOVE_SCROLL_REGION_QUICKPANEL)
+ {
+ if (!_e_mod_move_indicator_cb_motion_start_internal_quickpanel_check(qp_mb))
+ {
+ goto error_cleanup;
+ }
+ _e_mod_move_indicator_quickpanel_move_set(mb, EINA_TRUE);
+ e_mod_move_quickpanel_objs_animation_start_position_set(qp_mb,
+ angle);
+ // send quickpanel to "move start message".
+ e_mod_move_quickpanel_anim_state_send(qp_mb, EINA_TRUE);
+ }
+ else
+ {
+ goto error_cleanup;
+ }
+
+ return EINA_TRUE;
+
+error_cleanup:
+
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco)
+ {
+ if (!mco) continue;
+ e_mod_move_event_click_set(mco->event, EINA_FALSE);
+ }
+ _e_mod_move_indicator_apptray_move_set(mb, EINA_FALSE);
+ _e_mod_move_indicator_quickpanel_move_set(mb, EINA_FALSE);
+
+ return EINA_FALSE;
+}
+
+static Eina_Bool
+_e_mod_move_indicator_cb_motion_move(void *data,
+ void *event_info)
+{
+ E_Move *m = NULL;
+ E_Move_Border *mb = (E_Move_Border *)data;
+ E_Move_Border *qp_mb = NULL;
+ E_Move_Border *at_mb = NULL;
+ E_Move_Event_Motion_Info *info;
+ E_Move_Control_Object *mco = NULL;
+ E_Zone *zone = NULL;
+ Eina_List *l;
+ int angle = 0;
+ Eina_Bool click = EINA_FALSE;
+ Eina_Bool need_move = EINA_FALSE;
+ Eina_Bool contents = EINA_FALSE;
+ int cx, cy, cw, ch;
+ int x = 0, y = 0;
+
+ info = (E_Move_Event_Motion_Info *)event_info;
+ m = e_mod_move_util_get();
+
+ if (!m || !mb || !info) return EINA_FALSE;
+
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s w:0x%08x INDI_MOTION_MOVE a:%d (%4d,%4d)\n",
+ "EVAS_OBJ", mb->bd->win, mb->angle,
+ info->coord.x, info->coord.y);
+
+ angle = mb->angle;
+ zone = mb->bd->zone;
+
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco)
+ {
+ if (!mco) continue;
+ click = e_mod_move_event_click_get(mco->event);
+ }
+
+ E_CHECK_RETURN(click, EINA_FALSE);
+
+ if (_e_mod_move_indicator_quickpanel_move_get(mb))
+ {
+ qp_mb = e_mod_move_quickpanel_find();
+ E_CHECK_RETURN(qp_mb, EINA_FALSE);
+
+ contents = e_mod_move_border_contents_rect_get(qp_mb, &cx, &cy ,&cw, &ch);
+
+ switch (angle)
+ {
+ case 0:
+ if (info->coord.y < qp_mb->h)
+ {
+ if (contents)
+ {
+ if (info->coord.y < ch)
+ {
+ y = info->coord.y - ch;
+ need_move = EINA_TRUE;
+ }
+ }
+ else
+ {
+ y = info->coord.y - qp_mb->h;
+ need_move = EINA_TRUE;
+ }
+ }
+ break;
+ case 90:
+ if (info->coord.x < qp_mb->w)
+ {
+ if (contents)
+ {
+ if (info->coord.x < cw)
+ {
+ x = info->coord.x - cw;
+ need_move = EINA_TRUE;
+ }
+ }
+ else
+ {
+ x = info->coord.x - qp_mb->w;
+ need_move = EINA_TRUE;
+ }
+ }
+ break;
+ case 180:
+ if (info->coord.y > (zone->h - qp_mb->h))
+ {
+ if (contents)
+ {
+ if (info->coord.y > cy)
+ {
+ y = info->coord.y - cy;
+ need_move = EINA_TRUE;
+ }
+ }
+ else
+ {
+ y = info->coord.y;
+ need_move = EINA_TRUE;
+ }
+ }
+ break;
+ case 270:
+ if (info->coord.x > (zone->w - qp_mb->w))
+ {
+ if (contents)
+ {
+ if (info->coord.x > cx)
+ {
+ x = info->coord.x - cx;
+ need_move = EINA_TRUE;
+ }
+ }
+ else
+ {
+ x = info->coord.x;
+ need_move = EINA_TRUE;
+ }
+ }
+ break;
+ default :
+ break;
+ }
+
+ if (m->qp_scroll_with_clipping)
+ e_mod_move_quickpanel_objs_move(qp_mb,
+ info->coord.x,
+ info->coord.y);
+ else
+ {
+ if (need_move)
+ e_mod_move_quickpanel_objs_move(qp_mb, x, y);
+ }
+ }
+ else if (_e_mod_move_indicator_apptray_move_get(mb))
+ {
+ at_mb = e_mod_move_apptray_find();
+ E_CHECK_RETURN(at_mb, EINA_FALSE);
+
+ switch (angle)
+ {
+ case 0:
+ if (info->coord.y < at_mb->h)
+ {
+ y = info->coord.y - at_mb->h;
+ need_move = EINA_TRUE;
+ }
+ break;
+ case 90:
+ if (info->coord.x < at_mb->w)
+ {
+ x = info->coord.x - at_mb->w;
+ need_move = EINA_TRUE;
+ }
+ break;
+ case 180:
+ if (info->coord.y > (zone->h - at_mb->h))
+ {
+ y = info->coord.y;
+ need_move = EINA_TRUE;
+ }
+ break;
+ case 270:
+ if (info->coord.x > (zone->w - at_mb->w))
+ {
+ x = info->coord.x;
+ need_move = EINA_TRUE;
+ }
+ break;
+ default :
+ break;
+ }
+ if (need_move)
+ e_mod_move_apptray_objs_move(at_mb, x, y);
+ }
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_indicator_cb_motion_end(void *data,
+ void *event_info)
+{
+ E_Move *m = NULL;
+ E_Move_Border *mb = (E_Move_Border *)data;
+ E_Move_Border *qp_mb = NULL;
+ E_Move_Border *at_mb = NULL;
+ E_Move_Event_Motion_Info *info;
+ E_Move_Control_Object *mco = NULL;
+ Eina_List *l;
+ int angle = 0;
+ Eina_Bool click = EINA_FALSE;
+ Eina_Bool flick_state = EINA_FALSE;
+ E_Zone *zone;
+ int cx, cy, cw, ch;
+ int check_h, check_w;
+
+ info = (E_Move_Event_Motion_Info *)event_info;
+ m = e_mod_move_util_get();
+
+ if (!m || !mb || !info) return EINA_FALSE;
+
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s w:0x%08x ,angle:%d, (%d,%d) %s()\n",
+ "EVAS_OBJ", mb->bd->win, mb->angle, info->coord.x, info->coord.y,
+ __func__);
+
+ angle = mb->angle;
+ zone = mb->bd->zone;
+
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco)
+ {
+ if (!mco) continue;
+ click = e_mod_move_event_click_get(mco->event);
+ }
+
+ E_CHECK_GOTO(click, error_cleanup);
+
+ e_mod_move_flick_data_update(mb, info->coord.x, info->coord.y);
+ flick_state = e_mod_move_flick_state_get(mb, EINA_FALSE);
+
+ if (_e_mod_move_indicator_quickpanel_move_get(mb))
+ {
+ qp_mb = e_mod_move_quickpanel_find();
+ if (_e_mod_move_indicator_quickpanel_flick_process(mb, qp_mb,
+ angle, flick_state))
+ {
+ return EINA_TRUE;
+ }
+
+ }
+ if (_e_mod_move_indicator_apptray_move_get(mb))
+ {
+ at_mb = e_mod_move_apptray_find();
+
+ // if release position is on indicator's home button then, do not flick.
+ if (_e_mod_move_indicator_home_region_release_check(mb,
+ EINA_TRUE, /* upper if phrase check _e_mod_move_indicator_apptray_move_get(mb) value TURE or FALSE. */
+ angle,
+ info->coord))
+ {
+ flick_state = EINA_FALSE;
+ }
+
+ if (_e_mod_move_indicator_apptray_flick_process(mb, at_mb,
+ angle, flick_state))
+ {
+ return EINA_TRUE;
+ }
+ }
+
+ switch (angle)
+ {
+ case 0:
+ if (at_mb)
+ {
+ check_h = at_mb->h;
+ if (check_h) check_h /= 2;
+ if (info->coord.y < check_h)
+ {
+ e_mod_move_apptray_e_border_move(at_mb, 0, at_mb->h * -1);
+ e_mod_move_apptray_objs_animation_move(at_mb, 0, at_mb->h * -1);
+ }
+ else
+ {
+ e_mod_move_apptray_e_border_move(at_mb, 0, 0);
+ e_mod_move_apptray_objs_animation_move(at_mb, 0, 0);
+ }
+ }
+ if (qp_mb)
+ {
+ check_h = qp_mb->h;
+ if (check_h) check_h /= 2;
+ if (info->coord.y < check_h)
+ {
+ if (m->qp_scroll_with_clipping)
+ {
+ e_mod_move_quickpanel_e_border_move(qp_mb, 0, qp_mb->h * -1);
+ e_mod_move_quickpanel_objs_animation_move(qp_mb, zone->x, zone->y);
+ }
+ else
+ {
+ if (e_mod_move_border_contents_rect_get(qp_mb, &cx, &cy ,&cw, &ch))
+ {
+ check_h = ch;
+ if (check_h) check_h /= 2;
+ if (info->coord.y < check_h)
+ {
+ e_mod_move_quickpanel_e_border_move(qp_mb, 0, qp_mb->h * -1);
+ e_mod_move_quickpanel_objs_animation_move(qp_mb, 0, ch * -1);
+ }
+ else
+ {
+ e_mod_move_quickpanel_e_border_move(qp_mb, 0, 0);
+ e_mod_move_quickpanel_objs_animation_move(qp_mb, 0, 0);
+ }
+ }
+ }
+ }
+ else
+ {
+ e_mod_move_quickpanel_e_border_move(qp_mb, 0, 0);
+ if (m->qp_scroll_with_clipping)
+ {
+ e_mod_move_quickpanel_objs_animation_move(qp_mb,
+ zone->x + qp_mb->w,
+ zone->y + qp_mb->h);
+ }
+ else
+ {
+ e_mod_move_quickpanel_objs_animation_move(qp_mb, 0, 0);
+ }
+ }
+ }
+ break;
+ case 90:
+ if (at_mb)
+ {
+ check_w = at_mb->w;
+ if (check_w) check_w /= 2;
+ if (info->coord.x < check_w)
+ {
+ e_mod_move_apptray_e_border_move(at_mb, at_mb->w * -1, 0);
+ e_mod_move_apptray_objs_animation_move(at_mb, at_mb->w * -1, 0);
+ }
+ else
+ {
+ e_mod_move_apptray_e_border_move(at_mb, 0, 0);
+ e_mod_move_apptray_objs_animation_move(at_mb, 0, 0);
+ }
+ }
+ if (qp_mb)
+ {
+ check_w = qp_mb->w;
+ if (check_w) check_w /= 2;
+ if (info->coord.x < check_w)
+ {
+ if (m->qp_scroll_with_clipping)
+ {
+ e_mod_move_quickpanel_e_border_move(qp_mb, qp_mb->w * -1, 0);
+ e_mod_move_quickpanel_objs_animation_move(qp_mb, zone->x, zone->y);
+ }
+ else
+ {
+ if (e_mod_move_border_contents_rect_get(qp_mb, &cx, &cy ,&cw, &ch))
+ {
+ check_w = cw;
+ if (check_w) check_w /= 2;
+ if (info->coord.x < check_w)
+ {
+ e_mod_move_quickpanel_e_border_move(qp_mb, qp_mb->w * -1, 0);
+ e_mod_move_quickpanel_objs_animation_move(qp_mb, cw * -1, 0);
+ }
+ else
+ {
+ e_mod_move_quickpanel_e_border_move(qp_mb, 0, 0);
+ e_mod_move_quickpanel_objs_animation_move(qp_mb, 0, 0);
+ }
+ }
+ }
+ }
+ else
+ {
+ e_mod_move_quickpanel_e_border_move(qp_mb, 0, 0);
+ if (m->qp_scroll_with_clipping)
+ {
+ e_mod_move_quickpanel_objs_animation_move(qp_mb,
+ zone->x + qp_mb->w,
+ zone->y + qp_mb->h);
+ }
+ else
+ {
+ e_mod_move_quickpanel_objs_animation_move(qp_mb, 0, 0);
+ }
+ }
+ }
+ break;
+ case 180:
+ if (at_mb)
+ {
+ check_h = at_mb->h;
+ if (check_h) check_h /= 2;
+ if (info->coord.y > (zone->h - check_h))
+ {
+ e_mod_move_apptray_e_border_move(at_mb, 0, zone->h);
+ e_mod_move_apptray_objs_animation_move(at_mb, 0, zone->h);
+ }
+ else
+ {
+ e_mod_move_apptray_e_border_move(at_mb, 0, (zone->h - at_mb->h));
+ e_mod_move_apptray_objs_animation_move(at_mb, 0, (zone->h - at_mb->h));
+ }
+ }
+ if (qp_mb)
+ {
+ check_h = qp_mb->h;
+ if (check_h) check_h /= 2;
+ if (info->coord.y > (zone->h - check_h))
+ {
+ if (m->qp_scroll_with_clipping)
+ {
+ e_mod_move_quickpanel_e_border_move(qp_mb, 0, zone->h);
+ e_mod_move_quickpanel_objs_animation_move(qp_mb,
+ zone->x + qp_mb->w,
+ zone->y + qp_mb->h);
+ }
+ else
+ {
+ if (e_mod_move_border_contents_rect_get(qp_mb, &cx, &cy ,&cw, &ch))
+ {
+ check_h = ch;
+ if (check_h) check_h /= 2;
+ if (info->coord.y > (cy + check_h))
+ {
+ e_mod_move_quickpanel_e_border_move(qp_mb, 0, zone->h);
+ e_mod_move_quickpanel_objs_animation_move(qp_mb, 0, ch);
+ }
+ else
+ {
+ e_mod_move_quickpanel_e_border_move(qp_mb, 0, 0);
+ e_mod_move_quickpanel_objs_animation_move(qp_mb, 0, 0);
+ }
+ }
+ }
+ }
+ else
+ {
+ e_mod_move_quickpanel_e_border_move(qp_mb, 0, 0);
+ if (m->qp_scroll_with_clipping)
+ {
+ e_mod_move_quickpanel_objs_animation_move(qp_mb,
+ zone->x,
+ zone->y);
+ }
+ else
+ {
+ e_mod_move_quickpanel_objs_animation_move(qp_mb, 0, 0);
+ }
+ }
+ }
+ break;
+ case 270:
+ if (at_mb)
+ {
+ check_w = at_mb->w;
+ if (check_w) check_w /= 2;
+ if (info->coord.x > (zone->w - check_w))
+ {
+ e_mod_move_apptray_e_border_move(at_mb, zone->w, 0);
+ e_mod_move_apptray_objs_animation_move(at_mb, zone->w, 0);
+ }
+ else
+ {
+ e_mod_move_apptray_e_border_move(at_mb, zone->w - at_mb->w, 0);
+ e_mod_move_apptray_objs_animation_move(at_mb, zone->w - at_mb->w, 0);
+ }
+ }
+ if (qp_mb)
+ {
+ check_w = qp_mb->w;
+ if (check_w) check_w /= 2;
+ if (info->coord.x > (zone->w - check_w))
+ {
+ if (m->qp_scroll_with_clipping)
+ {
+ e_mod_move_quickpanel_e_border_move(qp_mb, zone->w, 0);
+ e_mod_move_quickpanel_objs_animation_move(qp_mb,
+ zone->x + qp_mb->w,
+ zone->y + qp_mb->h);
+ }
+ else
+ {
+ if (e_mod_move_border_contents_rect_get(qp_mb, &cx, &cy ,&cw, &ch))
+ {
+ check_w = cw;
+ if (check_w) check_w /= 2;
+ if (info->coord.x > (cx + check_w))
+ {
+ e_mod_move_quickpanel_e_border_move(qp_mb, zone->w, 0);
+ e_mod_move_quickpanel_objs_animation_move(qp_mb, cw, 0);
+ }
+ else
+ {
+ e_mod_move_quickpanel_e_border_move(qp_mb, 0, 0);
+ e_mod_move_quickpanel_objs_animation_move(qp_mb, 0, 0);
+ }
+ }
+ }
+ }
+ else
+ {
+ e_mod_move_quickpanel_e_border_move(qp_mb, 0, 0);
+ if (m->qp_scroll_with_clipping)
+ {
+ e_mod_move_quickpanel_objs_animation_move(qp_mb, zone->x, zone->y);
+ }
+ else
+ {
+ e_mod_move_quickpanel_objs_animation_move(qp_mb, 0, 0);
+ }
+ }
+ }
+ break;
+ default :
+ break;
+ }
+
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco)
+ {
+ if (!mco) continue;
+ e_mod_move_event_click_set(mco->event, EINA_FALSE);
+ }
+
+
+error_cleanup:
+ if (mb->flick_data) e_mod_move_flick_data_free(mb);
+ _e_mod_move_indicator_apptray_move_set(mb, EINA_FALSE);
+ _e_mod_move_indicator_quickpanel_move_set(mb, EINA_FALSE);
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_indicator_quickpanel_flick_process(E_Move_Border *mb, // mb: indicator
+ E_Move_Border *mb2, // mb2 : quickpanel
+ int angle,
+ Eina_Bool state)
+{
+ E_Move *m = NULL;
+ E_Move_Control_Object *mco = NULL;
+ Eina_List *l;
+ E_Zone *zone = NULL;
+ int mx = 0, my = 0, ax = 0, ay = 0;
+
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(mb2, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_INDICATOR_CHECK(mb), EINA_FALSE);
+ E_CHECK_RETURN(TYPE_QUICKPANEL_CHECK(mb2), EINA_FALSE);
+ E_CHECK_RETURN(state, EINA_FALSE);
+
+ m = mb->m;
+ zone = mb->bd->zone;
+
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco) // indicator click unset
+ {
+ if (!mco) continue;
+ e_mod_move_event_click_set(mco->event, EINA_FALSE);
+ }
+
+ _e_mod_move_indicator_apptray_move_set(mb, EINA_FALSE);
+ _e_mod_move_indicator_quickpanel_move_set(mb, EINA_FALSE);
+
+ // flick data free
+ if (mb->flick_data) e_mod_move_flick_data_free(mb);
+
+ switch (angle)
+ {
+ case 90:
+ mx = 0; my = 0;
+ if (m->qp_scroll_with_clipping)
+ {
+ ax = zone->x + mb2->w;
+ ay = zone->y + mb2->h;
+ }
+ else
+ {
+ ax = mx; ay = my;
+ }
+ break;
+ case 180:
+ mx = 0; my = zone->h - mb2->h;
+ if (m->qp_scroll_with_clipping)
+ {
+ ax = zone->x; ay = zone->y;
+ }
+ else
+ {
+ ax = mx; ay = my;
+ }
+ break;
+ case 270:
+ mx = zone->w - mb2->w; my = 0;
+ if (m->qp_scroll_with_clipping)
+ {
+ ax = zone->x; ay = zone->y;
+ }
+ else
+ {
+ ax = mx; ay = my;
+ }
+ break;
+ case 0:
+ default :
+ mx = 0; my = 0;
+ if (m->qp_scroll_with_clipping)
+ {
+ ax = zone->x + mb2->w;
+ ay = zone->y + mb2->h;
+ }
+ else
+ {
+ ax = mx; ay = my;
+ }
+ break;
+ }
+
+ e_mod_move_quickpanel_e_border_move(mb2, mx, my);
+ e_mod_move_quickpanel_objs_animation_move(mb2, ax, ay);
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_indicator_apptray_flick_process(E_Move_Border *mb, // mb: indicator
+ E_Move_Border *mb2, // mb2 : apptray
+ int angle,
+ Eina_Bool state)
+{
+ E_Move_Control_Object *mco = NULL;
+ Eina_List *l;
+ E_Zone *zone = NULL;
+ int x = 0;
+ int y = 0;
+
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(mb2, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_INDICATOR_CHECK(mb), EINA_FALSE);
+ E_CHECK_RETURN(TYPE_APPTRAY_CHECK(mb2), EINA_FALSE);
+ E_CHECK_RETURN(state, EINA_FALSE);
+
+ zone = mb->bd->zone;
+
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco) // indicator click unset
+ {
+ if (!mco) continue;
+ e_mod_move_event_click_set(mco->event, EINA_FALSE);
+ }
+
+ _e_mod_move_indicator_apptray_move_set(mb, EINA_FALSE);
+ _e_mod_move_indicator_quickpanel_move_set(mb, EINA_FALSE);
+
+ // flick data free
+ if (mb->flick_data) e_mod_move_flick_data_free(mb);
+
+ switch (angle)
+ {
+ case 90:
+ x = 0;
+ y = 0;
+ break;
+ case 180:
+ x = 0;
+ y = zone->h - mb2->h;
+ break;
+ case 270:
+ x = zone->w - mb2->w;
+ y = 0;
+ break;
+ case 0:
+ default :
+ x = 0;
+ y = 0;
+ break;
+ }
+
+ e_mod_move_apptray_e_border_move(mb2, x, y);
+ e_mod_move_apptray_objs_animation_move(mb2, x, y);
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_indicator_cb_motion_start_internal_apptray_check(E_Move_Border *at_mb)
+{
+ E_Move *m;
+ E_Move_Border *find_mb = NULL;
+ Eina_Bool found = EINA_FALSE;
+ m = e_mod_move_util_get();
+
+ E_CHECK_RETURN(m, EINA_FALSE);
+ E_CHECK_RETURN(at_mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_APPTRAY_CHECK(at_mb), EINA_FALSE);
+ E_CHECK_RETURN(at_mb->visible, EINA_FALSE);
+ E_CHECK_RETURN(e_mod_move_util_compositor_object_visible_get(at_mb),
+ EINA_FALSE);
+ if (e_mod_move_apptray_objs_animation_state_get(at_mb)) return EINA_FALSE;
+
+ // check if notification window is on-screen.
+ EINA_INLIST_REVERSE_FOREACH(m->borders, find_mb)
+ {
+ if (TYPE_INDICATOR_CHECK(find_mb)) continue;
+ if (find_mb->visible
+ && REGION_INTERSECTS_WITH_ZONE(find_mb, at_mb->bd->zone))
+ {
+ found = EINA_TRUE;
+ break;
+ }
+ }
+ if (found
+ && (find_mb->bd->client.netwm.type == ECORE_X_WINDOW_TYPE_NOTIFICATION))
+ {
+ return EINA_FALSE;
+ }
+ // check if notification window is on-screen.
+
+ e_mod_move_apptray_dim_show(at_mb);
+ e_mod_move_apptray_objs_add(at_mb);
+
+ // apptray_objs_animation_layer_set
+ e_mod_move_apptray_objs_animation_layer_set(at_mb);
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_indicator_cb_motion_start_internal_quickpanel_check(E_Move_Border *qp_mb)
+{
+ E_CHECK_RETURN(qp_mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_QUICKPANEL_CHECK(qp_mb), EINA_FALSE);
+ E_CHECK_RETURN(qp_mb->visible, EINA_FALSE);
+ E_CHECK_RETURN(e_mod_move_util_compositor_object_visible_get(qp_mb),
+ EINA_FALSE);
+
+ if (e_mod_move_quickpanel_objs_animation_state_get(qp_mb)) return EINA_FALSE;
+
+ if (!(qp_mb->m->qp_scroll_with_clipping))
+ e_mod_move_quickpanel_dim_show(qp_mb);
+
+ // Set Composite Mode & Rotation Lock & Make below win's mirror object
+ e_mod_move_quickpanel_stage_init(qp_mb);
+
+ e_mod_move_quickpanel_objs_add(qp_mb);
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_indicator_apptray_move_set(E_Move_Border *mb,
+ Eina_Bool state)
+{
+ E_Move_Indicator_Data *indi_data = NULL;
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_INDICATOR_CHECK(mb), EINA_FALSE);
+ indi_data = (E_Move_Indicator_Data *)mb->data;
+ if (!indi_data)
+ indi_data = (E_Move_Indicator_Data *)e_mod_move_indicator_internal_data_add(mb);
+ E_CHECK_RETURN(indi_data, EINA_FALSE);
+ indi_data->apptray_move = state;
+ mb->data = indi_data;
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_indicator_quickpanel_move_set(E_Move_Border *mb,
+ Eina_Bool state)
+{
+ E_Move_Indicator_Data *indi_data = NULL;
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_INDICATOR_CHECK(mb), EINA_FALSE);
+ indi_data = (E_Move_Indicator_Data *)mb->data;
+ if (!indi_data)
+ indi_data = (E_Move_Indicator_Data *)e_mod_move_indicator_internal_data_add(mb);
+ E_CHECK_RETURN(indi_data, EINA_FALSE);
+ indi_data->quickpanel_move = state;
+ mb->data = indi_data;
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_indicator_apptray_move_get(E_Move_Border *mb)
+{
+ E_Move_Indicator_Data *indi_data = NULL;
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_INDICATOR_CHECK(mb), EINA_FALSE);
+ indi_data = (E_Move_Indicator_Data *)mb->data;
+ E_CHECK_RETURN(indi_data, EINA_FALSE);
+ return indi_data->apptray_move;
+}
+
+static Eina_Bool
+_e_mod_move_indicator_quickpanel_move_get(E_Move_Border *mb)
+{
+ E_Move_Indicator_Data *indi_data = NULL;
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_INDICATOR_CHECK(mb), EINA_FALSE);
+ indi_data = (E_Move_Indicator_Data *)mb->data;
+ E_CHECK_RETURN(indi_data, EINA_FALSE);
+ return indi_data->quickpanel_move;
+}
+
+static Eina_Bool
+_e_mod_move_indicator_home_region_release_check(E_Move_Border *mb, /* indicator E_Move_Border */
+ Eina_Bool apptray_move /* if home button is pressd, then apptray_move set true */,
+ int angle,
+ Evas_Point pos /* mouse up position */)
+{
+ int region_check;
+ Eina_Bool ret = EINA_FALSE;
+ E_Zone *zone = NULL;
+
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_INDICATOR_CHECK(mb), EINA_FALSE);
+ E_CHECK_RETURN(apptray_move, EINA_FALSE);
+ E_CHECK_RETURN(mb->bd, EINA_FALSE);
+ zone = mb->bd->zone;
+ E_CHECK_RETURN(zone, EINA_FALSE);
+
+ switch (angle)
+ {
+ case 0:
+ region_check = mb->h;
+ if (pos.y < region_check) ret = EINA_TRUE;
+ break;
+ case 90:
+ region_check = mb->w;
+ if (pos.x < region_check) ret = EINA_TRUE;
+ break;
+ case 180:
+ region_check = zone->h - mb->h;
+ if (pos.y > region_check) ret = EINA_TRUE;
+ break;
+ case 270:
+ region_check = zone->w - mb->w;
+ if (pos.x > region_check) ret = EINA_TRUE;
+ break;
+ default :
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s , invalid angle:%d, (%d,%d) %s()\n",
+ "EVAS_OBJ", angle, pos.x, pos.y,
+ __func__)
+ break;
+ }
+ return ret;
+}
+
+/* externally accessible functions */
+EINTERN void
+e_mod_move_indicator_ctl_obj_event_setup(E_Move_Border *mb,
+ E_Move_Control_Object *mco)
+{
+ E_CHECK(mb);
+ E_CHECK(mco);
+ E_CHECK(TYPE_INDICATOR_CHECK(mb));
+
+ mco->event = e_mod_move_event_new(mb->bd->client.win, mco->obj);
+ E_CHECK(mco->event);
+
+ e_mod_move_event_data_type_set(mco->event, E_MOVE_EVENT_DATA_TYPE_BORDER);
+ e_mod_move_event_angle_cb_set(mco->event,
+ e_mod_move_util_win_prop_angle_get);
+ e_mod_move_event_check_cb_set(mco->event,
+ _e_mod_move_indicator_cb_motion_check, mb);
+ e_mod_move_event_cb_set(mco->event, E_MOVE_EVENT_TYPE_MOTION_START,
+ _e_mod_move_indicator_cb_motion_start, mb);
+ e_mod_move_event_cb_set(mco->event, E_MOVE_EVENT_TYPE_MOTION_MOVE,
+ _e_mod_move_indicator_cb_motion_move, mb);
+ e_mod_move_event_cb_set(mco->event, E_MOVE_EVENT_TYPE_MOTION_END,
+ _e_mod_move_indicator_cb_motion_end, mb);
+ e_mod_move_event_send_all_set(mco->event, EINA_TRUE);
+
+ if (e_mod_move_border_shape_input_new(mb))
+ e_mod_move_border_shape_input_rect_set(mb, mb->x, mb->y, mb->w, mb->h);
+}
+
+EINTERN E_Move_Border *
+e_mod_move_indicator_find(void)
+{
+ E_Move *m;
+ E_Move_Border *mb;
+
+ m = e_mod_move_util_get();
+ E_CHECK_RETURN(m, 0);
+
+ EINA_INLIST_REVERSE_FOREACH(m->borders, mb)
+ {
+ if (TYPE_INDICATOR_CHECK(mb)) return mb;
+ }
+ return NULL;
+}
+
+EINTERN Eina_Bool
+e_mod_move_indicator_click_get(void)
+{
+ E_Move_Border *mb = NULL;
+ Eina_Bool click = EINA_FALSE;
+ E_Move_Control_Object *mco = NULL;
+ Eina_List *l;
+
+ mb = e_mod_move_indicator_find();
+ E_CHECK_RETURN(mb, EINA_FALSE);
+
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco)
+ {
+ if (!mco) continue;
+ click = e_mod_move_event_click_get(mco->event);
+ }
+
+ return click;
+}
+
+EINTERN Eina_Bool
+e_mod_move_indicator_event_clear(void)
+{
+ E_Move_Border *mb = NULL;
+ Eina_Bool click = EINA_FALSE;
+ E_Move_Control_Object *mco = NULL;
+ Eina_List *l;
+
+ mb = e_mod_move_indicator_find();
+ E_CHECK_RETURN(mb, EINA_FALSE);
+
+ click = e_mod_move_indicator_click_get();
+ E_CHECK_RETURN(click, EINA_FALSE);
+
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco)
+ {
+ if (!mco) continue;
+ e_mod_move_event_data_clear(mco->event);
+ e_mod_move_event_click_set(mco->event, EINA_FALSE);
+ }
+
+ _e_mod_move_indicator_apptray_move_set(mb, EINA_FALSE);
+ _e_mod_move_indicator_quickpanel_move_set(mb, EINA_FALSE);
+ if (mb->flick_data) e_mod_move_flick_data_free(mb);
+ return EINA_TRUE;
+}
+
+EINTERN void*
+e_mod_move_indicator_internal_data_add(E_Move_Border *mb)
+{
+ E_Move_Indicator_Data *indi_data = NULL;
+ E_CHECK_RETURN(mb, NULL);
+ E_CHECK_RETURN(TYPE_INDICATOR_CHECK(mb), NULL);
+ indi_data = (E_Move_Indicator_Data *)mb->data;
+ if (!indi_data)
+ {
+ indi_data = E_NEW(E_Move_Indicator_Data, 1);
+ E_CHECK_RETURN(indi_data, NULL);
+ indi_data->quickpanel_move = EINA_FALSE;
+ indi_data->apptray_move = EINA_FALSE;
+ mb->data = indi_data;
+ }
+ return mb->data;
+}
+
+EINTERN Eina_Bool
+e_mod_move_indicator_internal_data_del(E_Move_Border *mb)
+{
+ E_Move *m = NULL;
+ E_Move_Border *at_mb = NULL;
+ E_Move_Border *qp_mb = NULL;
+ E_Zone *zone = NULL;
+ int angle;
+ int x = 0; int y = 0;
+ int mx = 0, my = 0, ax = 0, ay = 0;
+
+ E_Move_Indicator_Data *indi_data = NULL;
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_INDICATOR_CHECK(mb), EINA_FALSE);
+ E_CHECK_RETURN(mb->data, EINA_FALSE);
+ indi_data = (E_Move_Indicator_Data *)mb->data;
+
+ m = mb->m;
+ angle = mb->angle;
+ // if indicaor is crashed, then apptray or quickpanel's mirror object hide with animation
+ if (_e_mod_move_indicator_quickpanel_move_get(mb))
+ {
+ qp_mb = e_mod_move_quickpanel_find();
+ E_CHECK_GOTO(qp_mb, error_cleanup);
+ zone = qp_mb->bd->zone;
+
+ switch (angle)
+ {
+ case 90:
+ mx = qp_mb->w * -1; my = 0;
+ if (m->qp_scroll_with_clipping)
+ {
+ ax = zone->x; ay = zone->y;
+ }
+ else
+ {
+ ax = mx; ay = my;
+ }
+ break;
+ case 180:
+ mx = 0; my = zone->h;
+ if (m->qp_scroll_with_clipping)
+ {
+ ax = zone->x + qp_mb->w;
+ ay = zone->y + qp_mb->h;
+ }
+ else
+ {
+ ax = mx; ay = my;
+ }
+ break;
+ case 270:
+ mx = zone->w; my = 0;
+ if (m->qp_scroll_with_clipping)
+ {
+ ax = zone->x + qp_mb->w;
+ ay = zone->y + qp_mb->h;
+ }
+ else
+ {
+ ax = mx; ay = my;
+ }
+ break;
+ case 0:
+ default :
+ mx = 0; my = qp_mb->h * -1;
+ if (m->qp_scroll_with_clipping)
+ {
+ ax = zone->x; ay = zone->y;
+ }
+ else
+ {
+ ax = mx; ay = my;
+ }
+ break;
+ }
+
+ if (e_mod_move_quickpanel_objs_animation_state_get(qp_mb))
+ {
+ e_mod_move_quickpanel_objs_animation_stop(qp_mb);
+ e_mod_move_quickpanel_objs_animation_clear(qp_mb);
+ }
+ e_mod_move_quickpanel_objs_add(qp_mb);
+ e_mod_move_quickpanel_e_border_move(qp_mb, mx, my);
+ e_mod_move_quickpanel_objs_animation_move(qp_mb, ax, ay);
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s Indicator Crash: Hide QuickPanel %s():%d\n",
+ "EVAS_OBJ", __func__, __LINE__);
+ }
+
+ if (_e_mod_move_indicator_apptray_move_get(mb))
+ {
+ at_mb = e_mod_move_apptray_find();
+ E_CHECK_GOTO(at_mb, error_cleanup);
+ zone = at_mb->bd->zone;
+
+ switch (angle)
+ {
+ case 0:
+ x = 0;
+ y = at_mb->h * -1;
+ break;
+ case 90:
+ x = at_mb->w * -1;
+ y = 0;
+ break;
+ case 180:
+ x = 0;
+ y = zone->h;
+ break;
+ case 270:
+ x = zone->w;
+ y = 0;
+ break;
+ default :
+ x = 0;
+ y = at_mb->h * -1;
+ break;
+ }
+ if (e_mod_move_apptray_objs_animation_state_get(at_mb))
+ {
+ e_mod_move_apptray_objs_animation_stop(at_mb);
+ e_mod_move_apptray_objs_animation_clear(at_mb);
+ }
+ e_mod_move_apptray_objs_add(at_mb);
+
+ // apptray_objs_animation_layer_set
+ e_mod_move_apptray_objs_animation_layer_set(at_mb);
+
+ e_mod_move_apptray_e_border_move(at_mb, x, y);
+ e_mod_move_apptray_objs_animation_move(at_mb, x, y);
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s Indicator Crash: Hide Apptray %s():%d\n",
+ "EVAS_OBJ", __func__, __LINE__);
+ }
+
+error_cleanup:
+ E_FREE(indi_data);
+ mb->data = NULL;
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_indicator_scrollable_check(void)
+{
+ E_Move_Border *lockscr_mb = NULL;
+ E_Move_Border *taskmgr_mb = NULL;
+ E_Move_Border *pwlock_mb = NULL;
+
+ // if lockscreen is exist & visible, then do not show apptray & quickpanel
+ if ((lockscr_mb = e_mod_move_lockscreen_find()))
+ {
+ if (lockscr_mb->visibility == E_MOVE_VISIBILITY_STATE_VISIBLE)
+ {
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s %s %s()\n",
+ "EVAS_OBJ","Lockscreen is exist.", __func__);
+ return EINA_FALSE;
+ }
+ }
+
+ // if taskmanage is exist & visible, then do not show apptray & quickpanel
+ if ((taskmgr_mb = e_mod_move_taskmanager_find()))
+ {
+ if (taskmgr_mb->visibility == E_MOVE_VISIBILITY_STATE_VISIBLE)
+ {
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s %s %s()\n",
+ "EVAS_OBJ","TaskManager is exist.", __func__);
+ return EINA_FALSE;
+ }
+ }
+
+ // if pwlock is exist & visible, then do not show apptray & quickpanel
+ if ((pwlock_mb = e_mod_move_pwlock_find()))
+ {
+ if (pwlock_mb->visibility == E_MOVE_VISIBILITY_STATE_VISIBLE)
+ {
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s %s %s()\n",
+ "EVAS_OBJ","PWLOCK is exist.", __func__);
+ return EINA_FALSE;
+ }
+ }
+
+ return EINA_TRUE;
+}
+
+EINTERN E_Move_Event_Cb
+e_mod_move_indicator_event_cb_get(E_Move_Event_Type type)
+{
+ if (type == E_MOVE_EVENT_TYPE_MOTION_START)
+ return _e_mod_move_indicator_cb_motion_start;
+ else if (type == E_MOVE_EVENT_TYPE_MOTION_MOVE)
+ return _e_mod_move_indicator_cb_motion_move;
+ else if (type == E_MOVE_EVENT_TYPE_MOTION_END)
+ return _e_mod_move_indicator_cb_motion_end;
+ else
+ return NULL;
+}
+
+EINTERN Eina_Bool
+e_mod_move_indicator_e_border_move(E_Move_Border *mb,
+ int x,
+ int y)
+{
+ E_Border *bd = NULL;
+
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_INDICATOR_CHECK(mb), EINA_FALSE);
+ E_CHECK_RETURN(mb->bd, EINA_FALSE);
+
+ bd = mb->bd;
+
+ e_border_move(bd, x, y);
+
+ return EINA_TRUE;
+}
--- /dev/null
+#ifdef E_TYPEDEFS
+#else
+#ifndef E_MOD_MOVE_INDICATOR_H
+#define E_MOD_MOVE_INDICATOR_H
+
+typedef struct _E_Move_Indicator_Data E_Move_Indicator_Data;
+
+EINTERN void e_mod_move_indicator_ctl_obj_event_setup(E_Move_Border *mb, E_Move_Control_Object *mco);
+EINTERN E_Move_Border *e_mod_move_indicator_find(void);
+EINTERN Eina_Bool e_mod_move_indicator_click_get(void);
+EINTERN Eina_Bool e_mod_move_indicator_event_clear(void);
+EINTERN void *e_mod_move_indicator_internal_data_add(E_Move_Border *mb);
+EINTERN Eina_Bool e_mod_move_indicator_internal_data_del(E_Move_Border *mb);
+EINTERN Eina_Bool e_mod_move_indicator_scrollable_check(void);
+EINTERN E_Move_Event_Cb e_mod_move_indicator_event_cb_get(E_Move_Event_Type type);
+EINTERN Eina_Bool e_mod_move_indicator_e_border_move(E_Move_Border *mb, int x, int y);
+
+#endif
+#endif
--- /dev/null
+#include "e_mod_move_shared_types.h"
+#include "e_mod_move_debug.h"
+#include "e_mod_move.h"
+
+/* local subsystem functions */
+static Eina_Bool _e_mod_move_indi_ctl_event_clear(E_Move_Indicator_Controller *mic);
+static Eina_Bool _e_mod_move_indi_ctl_cb_motion_start(void *data, void *event_info);
+static Eina_Bool _e_mod_move_indi_ctl_cb_motion_move(void *data, void *event_info);
+static Eina_Bool _e_mod_move_indi_ctl_cb_motion_end(void *data, void *event_info);
+static void _e_mod_move_indi_ctl_obj_event_setup(E_Move_Indicator_Controller *mic, E_Move_Evas_Object *meo);
+
+/* local subsystem functions */
+static Eina_Bool
+_e_mod_move_indi_ctl_event_clear(E_Move_Indicator_Controller *mic)
+{
+ Eina_Bool click = EINA_FALSE;
+ E_Move_Evas_Object *meo = NULL;
+ Eina_List *l;
+
+ E_CHECK_RETURN(mic, EINA_FALSE);
+
+ EINA_LIST_FOREACH(mic->objs, l, meo)
+ {
+ if (!meo) continue;
+ click = e_mod_move_event_click_get(meo->event);
+ }
+ E_CHECK_RETURN(click, EINA_FALSE);
+
+ EINA_LIST_FOREACH(mic->objs, l, meo)
+ {
+ if (!meo) continue;
+ e_mod_move_event_data_clear(meo->event);
+ e_mod_move_event_click_set(meo->event, EINA_FALSE);
+ }
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_indi_ctl_cb_motion_start(void *data,
+ void *event_info)
+{
+ E_Move *m = NULL;
+ E_Move_Border *indi_mb = NULL;
+ E_Move_Border *target_mb = NULL;
+ E_Move_Indicator_Controller *mic = (E_Move_Indicator_Controller *)data;
+ E_Move_Event_Motion_Info *info;
+ E_Move_Evas_Object *meo = NULL;
+ Eina_List *l;
+
+ info = (E_Move_Event_Motion_Info *)event_info;
+ m = e_mod_move_util_get();
+ if (!mic || !info || !m) return EINA_FALSE;
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s (%d,%d) %s()\n", "EVAS_OBJ",
+ info->coord.x, info->coord.y, __func__);
+
+ // check indicator and if indicator does not exist, then destroy data, and hide
+ target_mb = e_mod_move_border_client_find(mic->target_win);
+ if (!target_mb)
+ {
+ // event clear
+ _e_mod_move_indi_ctl_event_clear(mic);
+ e_mod_move_evas_objs_del(mic->objs);
+ memset(mic, 0, sizeof(E_Move_Indicator_Controller));
+ E_FREE(mic);
+ m->indicator_controller = NULL;
+ return EINA_FALSE;
+ }
+
+ indi_mb = e_mod_move_indicator_find();
+ if (!indi_mb)
+ {
+ //e_mod_move_indicator_controller_unset(m);
+ return EINA_FALSE;
+ }
+
+ // position check & and if position is not at indicator then destroy data, and hide
+ if (!E_INSIDE(info->coord.x, info->coord.y,
+ indi_mb->x, indi_mb->y, indi_mb->w, indi_mb->h))
+ {
+ //e_mod_move_indicator_controller_unset(m);
+ if (indi_mb->visible)
+ {
+ e_border_hide(indi_mb->bd,2);
+
+ e_mod_move_evas_objs_move(mic->objs, indi_mb->x, indi_mb->y);
+ e_mod_move_evas_objs_resize(mic->objs, indi_mb->w, indi_mb->h);
+ e_mod_move_border_shape_input_rect_set(target_mb,
+ indi_mb->x,
+ indi_mb->y,
+ indi_mb->w,
+ indi_mb->h);
+ }
+ return EINA_FALSE;
+ }
+
+ EINA_LIST_FOREACH(mic->objs, l, meo)
+ {
+ if (!meo) continue;
+ e_mod_move_event_click_set(meo->event, EINA_TRUE);
+ }
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_indi_ctl_cb_motion_move(void *data,
+ void *event_info)
+{
+ E_Move *m = NULL;
+ E_Move_Indicator_Controller *mic = (E_Move_Indicator_Controller *)data;
+ E_Move_Event_Motion_Info *info;
+ E_Move_Evas_Object *meo = NULL;
+ E_Move_Border *indi_mb = NULL;
+ E_Move_Border *target_mb = NULL;
+ Eina_List *l;
+ Eina_Bool click = EINA_FALSE;
+ int angle = 0;
+ int d0, d1;
+ E_Zone *zone = NULL;
+
+ info = (E_Move_Event_Motion_Info *)event_info;
+ m = e_mod_move_util_get();
+ if (!mic || !info || !m) return EINA_FALSE;
+
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s (%d,%d) %s()\n", "EVAS_OBJ",
+ info->coord.x, info->coord.y, __func__);
+
+ EINA_LIST_FOREACH(mic->objs, l, meo)
+ {
+ if (!meo) continue;
+ click = e_mod_move_event_click_get(meo->event);
+ }
+ E_CHECK_RETURN(click, EINA_FALSE);
+
+ // check indicator and if indicator does not exist, then destroy data, and hide
+ target_mb = e_mod_move_border_client_find(mic->target_win);
+ if (!target_mb)
+ {
+ // event clear
+ _e_mod_move_indi_ctl_event_clear(mic);
+ e_mod_move_evas_objs_del(mic->objs);
+ memset(mic, 0, sizeof(E_Move_Indicator_Controller));
+ E_FREE(mic);
+ m->indicator_controller = NULL;
+ return EINA_FALSE;
+ }
+
+ indi_mb = e_mod_move_indicator_find();
+ if (!indi_mb)
+ {
+ return EINA_FALSE;
+ }
+
+ EINA_LIST_FOREACH(mic->objs, l, meo)
+ {
+ if (!meo) continue;
+ angle = e_mod_move_event_angle_get(meo->event);
+ }
+
+ zone = indi_mb->bd->zone;
+ d0 = d1 = 0;
+ switch (angle)
+ {
+ case 90:
+ d0 = info->coord.x;
+ d1 = indi_mb->w*2;
+ break;
+ case 180:
+ d0 = zone->h - (indi_mb->h*2);
+ d1 = info->coord.y;
+ break;
+ case 270:
+ d0 = zone->w - (indi_mb->w*2);
+ d1 = info->coord.x;
+ break;
+ case 0:
+ default :
+ d0 = info->coord.y;
+ d1 = indi_mb->h*2;
+ break;
+ }
+
+ if (d0 > d1)
+ {
+ e_border_show(indi_mb->bd);
+
+ e_mod_move_evas_objs_move(mic->objs, target_mb->x, target_mb->y);
+ e_mod_move_evas_objs_resize(mic->objs, target_mb->w, target_mb->h);
+ e_mod_move_border_shape_input_rect_set(target_mb,
+ 0,
+ 0,
+ target_mb->w,
+ target_mb->h);
+ }
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_indi_ctl_cb_motion_end(void *data,
+ void *event_info)
+{
+ E_Move *m = NULL;
+ E_Move_Indicator_Controller *mic = (E_Move_Indicator_Controller *)data;
+ E_Move_Event_Motion_Info *info;
+ E_Move_Evas_Object *meo = NULL;
+ E_Move_Border *indi_mb = NULL;
+ E_Move_Border *target_mb = NULL;
+ Eina_List *l;
+ Eina_Bool click = EINA_FALSE;
+ int angle = 0;
+ int d0, d1;
+ E_Zone *zone = NULL;
+ Eina_Bool ret = EINA_FALSE;
+
+ info = (E_Move_Event_Motion_Info *)event_info;
+ m = e_mod_move_util_get();
+ if (!mic || !info || !m) return EINA_FALSE;
+
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s (%d,%d) %s()\n", "EVAS_OBJ",
+ info->coord.x, info->coord.y, __func__);
+
+ EINA_LIST_FOREACH(mic->objs, l, meo)
+ {
+ if (!meo) continue;
+ click = e_mod_move_event_click_get(meo->event);
+ }
+ E_CHECK_RETURN(click, EINA_FALSE);
+
+ // check indicator and if indicator does not exist, then destroy data, and hide
+ target_mb = e_mod_move_border_client_find(mic->target_win);
+ if (!target_mb)
+ {
+ // event clear
+ _e_mod_move_indi_ctl_event_clear(mic);
+ e_mod_move_evas_objs_del(mic->objs);
+ memset(mic, 0, sizeof(E_Move_Indicator_Controller));
+ E_FREE(mic);
+ m->indicator_controller = NULL;
+ return EINA_FALSE;
+ }
+
+ indi_mb = e_mod_move_indicator_find();
+ E_CHECK_GOTO(indi_mb, finish);
+
+ EINA_LIST_FOREACH(mic->objs, l, meo)
+ {
+ if (!meo) continue;
+ angle = e_mod_move_event_angle_get(meo->event);
+ }
+
+ zone = indi_mb->bd->zone;
+ d0 = d1 = 0;
+ switch (angle)
+ {
+ case 90:
+ d0 = info->coord.x;
+ d1 = indi_mb->w*2;
+ break;
+ case 180:
+ d0 = zone->h - (indi_mb->h*2);
+ d1 = info->coord.y;
+ break;
+ case 270:
+ d0 = zone->w - (indi_mb->w*2);
+ d1 = info->coord.x;
+ break;
+ case 0:
+ default :
+ d0 = info->coord.y;
+ d1 = indi_mb->h*2;
+ break;
+ }
+
+ if (d0 > d1)
+ {
+ if (!indi_mb->visible)
+ {
+ e_border_show(indi_mb->bd);
+ e_mod_move_evas_objs_move(mic->objs, target_mb->x, target_mb->y);
+ e_mod_move_evas_objs_resize(mic->objs, target_mb->w, target_mb->h);
+ e_mod_move_border_shape_input_rect_set(target_mb,
+ 0,
+ 0,
+ target_mb->w,
+ target_mb->h);
+ ret = EINA_TRUE;
+ }
+ }
+ else
+ {
+ if (indi_mb->visible)
+ {
+ e_border_hide(indi_mb->bd,2);
+ //e_mod_move_indicator_controller_unset(m);
+ e_mod_move_evas_objs_move(mic->objs, indi_mb->x, indi_mb->y);
+ e_mod_move_evas_objs_resize(mic->objs, indi_mb->w, indi_mb->h);
+ e_mod_move_border_shape_input_rect_set(target_mb,
+ indi_mb->x,
+ indi_mb->y,
+ indi_mb->w,
+ indi_mb->h);
+ }
+ }
+
+finish:
+ EINA_LIST_FOREACH(mic->objs, l, meo)
+ {
+ if (!meo) continue;
+ e_mod_move_event_click_set(meo->event, EINA_FALSE);
+ }
+ return ret;
+}
+
+static void
+_e_mod_move_indi_ctl_obj_event_setup(E_Move_Indicator_Controller *mic,
+ E_Move_Evas_Object *meo)
+{
+ E_CHECK(mic);
+ E_CHECK(meo);
+
+ meo->event = e_mod_move_event_new(mic->target_win, meo->obj);
+ E_CHECK(meo->event);
+
+ e_mod_move_event_data_type_set(meo->event, E_MOVE_EVENT_DATA_TYPE_NONE);
+ e_mod_move_event_angle_cb_set(meo->event,
+ e_mod_move_util_win_prop_angle_get);
+ e_mod_move_event_cb_set(meo->event, E_MOVE_EVENT_TYPE_MOTION_START,
+ _e_mod_move_indi_ctl_cb_motion_start, mic);
+ e_mod_move_event_cb_set(meo->event, E_MOVE_EVENT_TYPE_MOTION_MOVE,
+ _e_mod_move_indi_ctl_cb_motion_move, mic);
+ e_mod_move_event_cb_set(meo->event, E_MOVE_EVENT_TYPE_MOTION_END,
+ _e_mod_move_indi_ctl_cb_motion_end, mic);
+ e_mod_move_event_send_all_set(meo->event, EINA_TRUE);
+}
+
+/* externally accessible functions */
+EINTERN Eina_Bool
+e_mod_move_indicator_controller_set(E_Move_Border *target_mb)
+{
+ E_Move *m = NULL;
+ E_Move_Border *indi_mb = NULL;
+ Ecore_X_Window win;
+ E_Move_Indicator_Controller *mic = NULL;
+ E_Move_Evas_Object *meo = NULL;
+ Eina_List *l;
+
+ E_CHECK_RETURN(target_mb, EINA_FALSE);
+ indi_mb = e_mod_move_indicator_find();
+ E_CHECK_RETURN(indi_mb, EINA_FALSE);
+ m = e_mod_move_util_get();
+ E_CHECK_RETURN(m, EINA_FALSE);
+
+ if (e_mod_move_indicator_controller_state_get(m, &win))
+ e_mod_move_indicator_controller_unset(m);
+
+ mic = E_NEW(E_Move_Indicator_Controller, 1);
+ E_CHECK_RETURN(mic, EINA_FALSE);
+
+ mic->target_win = target_mb->bd->client.win;
+ mic->objs = e_mod_move_evas_objs_add(m, NULL);
+ if (mic->objs)
+ {
+ e_mod_move_evas_objs_move(mic->objs, indi_mb->x, indi_mb->y);
+ e_mod_move_evas_objs_resize(mic->objs, indi_mb->w, indi_mb->h);
+ e_mod_move_evas_objs_layer_set(mic->objs, EVAS_LAYER_MAX - 1);
+ e_mod_move_evas_objs_color_set(mic->objs, 0, 0, 0, 0);
+ e_mod_move_evas_objs_show(mic->objs);
+ e_mod_move_evas_objs_raise(mic->objs);
+
+ // Set Input Shape Mask
+ if (e_mod_move_border_shape_input_new(target_mb))
+ {
+ e_mod_move_border_shape_input_rect_set(target_mb,
+ indi_mb->x,
+ indi_mb->y,
+ indi_mb->w,
+ indi_mb->h);
+ }
+
+ // Set Event Handler
+ EINA_LIST_FOREACH(mic->objs, l, meo)
+ {
+ if (!meo) continue;
+ _e_mod_move_indi_ctl_obj_event_setup(mic, meo);
+ }
+
+ m->indicator_controller = mic;
+ }
+ else
+ {
+ memset(mic, 0, sizeof(E_Move_Indicator_Controller));
+ E_FREE(mic);
+ return EINA_FALSE;
+ }
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_indicator_controller_unset(E_Move *m)
+{
+ Ecore_X_Window win;
+ E_Move_Indicator_Controller *mic = NULL;
+ E_Move_Border *target_mb = NULL;
+ E_CHECK_RETURN(m, EINA_FALSE);
+ E_CHECK_RETURN(e_mod_move_indicator_controller_state_get(m, &win),
+ EINA_FALSE);
+
+ mic = m->indicator_controller;
+ E_CHECK_RETURN(mic, EINA_FALSE);
+
+ _e_mod_move_indi_ctl_event_clear(mic);
+ e_mod_move_evas_objs_del(mic->objs);
+
+ // input shape mask clear
+ if ((target_mb = e_mod_move_border_client_find(mic->target_win)))
+ {
+ if (target_mb->shape_input)
+ {
+ e_mod_move_border_shape_input_rect_set(target_mb, 0, 0, 0, 0);
+ e_mod_move_border_shape_input_free(target_mb);
+ }
+ }
+
+ memset(mic, 0, sizeof(E_Move_Indicator_Controller));
+ E_FREE(mic);
+ m->indicator_controller = NULL;
+
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_indicator_controller_update(E_Move *m)
+{
+ Ecore_X_Window win;
+ E_Move_Indicator_Controller *mic = NULL;
+ E_Move_Border *indi_mb = NULL;
+ E_Move_Border *target_mb = NULL;
+ E_CHECK_RETURN(m, EINA_FALSE);
+ E_CHECK_RETURN(e_mod_move_indicator_controller_state_get(m, &win),
+ EINA_FALSE);
+
+ mic = m->indicator_controller;
+ E_CHECK_RETURN(mic, EINA_FALSE);
+
+ indi_mb = e_mod_move_indicator_find();
+ E_CHECK_RETURN(indi_mb, EINA_FALSE);
+ if (indi_mb->visible) return EINA_FALSE;
+
+ e_mod_move_evas_objs_move(mic->objs, indi_mb->x, indi_mb->y);
+ e_mod_move_evas_objs_resize(mic->objs, indi_mb->w, indi_mb->h);
+
+ if ((target_mb = e_mod_move_border_client_find(mic->target_win)))
+ {
+ e_mod_move_border_shape_input_rect_set(target_mb,
+ indi_mb->x,
+ indi_mb->y,
+ indi_mb->w,
+ indi_mb->h);
+ }
+ else
+ {
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s w:0x%08x %s %s()\n", "EVAS_OBJ",
+ mic->target_win,
+ "Indicator Controller Target Window doest not exist!!!!!",
+ __func__);
+ return EINA_FALSE;
+ }
+
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_indicator_controller_state_get(E_Move *m,
+ Ecore_X_Window *win)
+{
+ E_Move_Indicator_Controller *mic = NULL;
+ E_CHECK_RETURN(m, EINA_FALSE);
+ E_CHECK_RETURN(win, EINA_FALSE);
+
+ mic = m->indicator_controller;
+ E_CHECK_RETURN(mic, EINA_FALSE);
+
+ *win = mic->target_win;
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_indicator_controller_set_policy_check(E_Move_Border *target_mb)
+{
+ E_Move_Border *indi_mb = NULL;
+ E_Zone *zone = NULL;
+ E_CHECK_RETURN(target_mb, EINA_FALSE);
+ if (TYPE_QUICKPANEL_CHECK(target_mb)) return EINA_FALSE;
+ if (TYPE_APPTRAY_CHECK(target_mb)) return EINA_FALSE;
+ if (TYPE_INDICATOR_CHECK(target_mb)) return EINA_FALSE;
+
+ if (target_mb->visibility != E_MOVE_VISIBILITY_STATE_VISIBLE)
+ return EINA_FALSE;
+
+ indi_mb = e_mod_move_indicator_find();
+ E_CHECK_RETURN(indi_mb, EINA_FALSE);
+
+ //if (indi_mb->visible)
+ if (target_mb->indicator_state != E_MOVE_INDICATOR_STATE_OFF)
+ return EINA_FALSE;
+
+ // if full screen indicator show feature is disabled, do not show indicator controller
+ if (target_mb->fullscreen_indicator_show_state == E_MOVE_FULLSCREEN_INDICATOR_SHOW_STATE_OFF)
+ return EINA_FALSE;
+
+ zone = indi_mb->bd->zone;
+ if (target_mb->bd->zone != zone)
+ return EINA_FALSE;
+
+ if ( (zone->x != target_mb->x)
+ || (zone->y != target_mb->y)
+ || (zone->w != target_mb->w)
+ || (zone->h != target_mb->h))
+ return EINA_FALSE;
+
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_indicator_controller_unset_policy_check(E_Move_Border *target_mb)
+{
+ E_Move *m = NULL;
+ Ecore_X_Window win;
+ Eina_Bool ret = EINA_FALSE;
+ E_CHECK_RETURN(target_mb, EINA_FALSE);
+
+ m = e_mod_move_util_get();
+ E_CHECK_RETURN(m, EINA_FALSE);
+
+ if (e_mod_move_indicator_controller_state_get(m, &win))
+ {
+ if (win == target_mb->bd->client.win)
+ ret = EINA_TRUE;
+ }
+
+ return ret;
+}
--- /dev/null
+#ifdef E_TYPEDEFS
+#else
+#ifndef E_MOD_MOVE_INDICATOR_CONTROLLER_H
+#define E_MOD_MOVE_INDICATOR_CONTROLLER_H
+
+struct _E_Move_Indicator_Controller
+{
+ Ecore_X_Window target_win; // target client window id
+ Eina_List *objs; // list of E_Move_Evas_Object.
+};
+
+typedef struct _E_Move_Indicator_Controller E_Move_Indicator_Controller;
+
+EINTERN Eina_Bool e_mod_move_indicator_controller_set(E_Move_Border *target_mb);
+EINTERN Eina_Bool e_mod_move_indicator_controller_unset(E_Move *m);
+EINTERN Eina_Bool e_mod_move_indicator_controller_update(E_Move *m);
+EINTERN Eina_Bool e_mod_move_indicator_controller_state_get(E_Move *m, Ecore_X_Window *win);
+EINTERN Eina_Bool e_mod_move_indicator_controller_set_policy_check(E_Move_Border *target_mb);
+EINTERN Eina_Bool e_mod_move_indicator_controller_unset_policy_check(E_Move_Border *target_mb);
+
+#endif
+#endif
--- /dev/null
+#include "e_mod_move_shared_types.h"
+#include "e_mod_move_debug.h"
+#include "e_mod_move.h"
+
+/* local subsystem functions */
+static Eina_Bool _e_mod_move_indicator_widget_apptray_move_set(E_Move_Indicator_Widget *indi_widget, Eina_Bool state);
+static Eina_Bool _e_mod_move_indicator_widget_quickpanel_move_set(E_Move_Indicator_Widget *indi_widget, Eina_Bool state);
+static Eina_Bool _e_mod_move_indicator_widget_apptray_move_get(E_Move_Indicator_Widget *indi_widget);
+static Eina_Bool _e_mod_move_indicator_widget_quickpanel_move_get(E_Move_Indicator_Widget *indi_widget);
+static Eina_Bool _e_mod_move_indicator_widget_cb_motion_start_internal_apptray_check(E_Move_Border *at_mb);
+static Eina_Bool _e_mod_move_indicator_widget_cb_motion_start_internal_quickpanel_check(E_Move_Border *qp_mb);
+static Eina_Bool _e_mod_move_indicator_widget_quickpanel_flick_process(E_Move_Indicator_Widget *indi_widget, E_Move_Border *mb2, int angle, Eina_Bool state);
+static Eina_Bool _e_mod_move_indicator_widget_apptray_flick_process(E_Move_Indicator_Widget *indi_widget, E_Move_Border *mb2, int angle, Eina_Bool state);
+static Eina_Bool _e_mod_move_indicator_widget_home_region_release_check(E_Move_Indicator_Widget *indi_widget, Eina_Bool apptray_move, int angle, Evas_Point pos);
+static Eina_Bool _e_mod_move_indicator_widget_cb_motion_start(void *data, void *event_info);
+static Eina_Bool _e_mod_move_indicator_widget_cb_motion_move(void *data, void *event_info);
+static Eina_Bool _e_mod_move_indicator_widget_cb_motion_end(void *data, void *event_info);
+static void _e_mod_move_indicator_widget_obj_event_setup(E_Move_Indicator_Widget *indicator_widget, E_Move_Widget_Object *mwo);
+static Eina_Bool _e_mod_move_indicator_widget_scrollable_object_movable_check(E_Move_Border *mb, Evas_Point pos);
+
+/* local subsystem functions */
+static Eina_Bool
+_e_mod_move_indicator_widget_apptray_move_set(E_Move_Indicator_Widget *indi_widget,
+ Eina_Bool state)
+{
+ E_CHECK_RETURN(indi_widget, EINA_FALSE);
+ indi_widget->apptray_move = state;
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_indicator_widget_quickpanel_move_set(E_Move_Indicator_Widget *indi_widget,
+ Eina_Bool state)
+{
+ E_CHECK_RETURN(indi_widget, EINA_FALSE);
+ indi_widget->quickpanel_move = state;
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_indicator_widget_apptray_move_get(E_Move_Indicator_Widget *indi_widget)
+{
+ E_CHECK_RETURN(indi_widget, EINA_FALSE);
+ return indi_widget->apptray_move;
+}
+
+static Eina_Bool
+_e_mod_move_indicator_widget_quickpanel_move_get(E_Move_Indicator_Widget *indi_widget)
+{
+ E_CHECK_RETURN(indi_widget, EINA_FALSE);
+ return indi_widget->quickpanel_move;
+}
+
+static Eina_Bool
+_e_mod_move_indicator_widget_cb_motion_start_internal_apptray_check(E_Move_Border *at_mb)
+{
+ E_Move *m;
+ E_Move_Border *find_mb = NULL;
+ Eina_Bool found = EINA_FALSE;
+ m = e_mod_move_util_get();
+
+ E_CHECK_RETURN(m, EINA_FALSE);
+ E_CHECK_RETURN(at_mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_APPTRAY_CHECK(at_mb), EINA_FALSE);
+ E_CHECK_RETURN(at_mb->visible, EINA_FALSE);
+ E_CHECK_RETURN(e_mod_move_util_compositor_object_visible_get(at_mb),
+ EINA_FALSE);
+ if (e_mod_move_apptray_objs_animation_state_get(at_mb)) return EINA_FALSE;
+
+ // check if notification window is on-screen.
+ EINA_INLIST_REVERSE_FOREACH(m->borders, find_mb)
+ {
+ if (TYPE_INDICATOR_CHECK(find_mb)) continue;
+ if (find_mb->visible
+ && REGION_INTERSECTS_WITH_ZONE(find_mb, at_mb->bd->zone))
+ {
+ found = EINA_TRUE;
+ break;
+ }
+ }
+ if (found
+ && (find_mb->bd->client.netwm.type == ECORE_X_WINDOW_TYPE_NOTIFICATION))
+ {
+ return EINA_FALSE;
+ }
+ // check if notification window is on-screen.
+
+ e_mod_move_apptray_dim_show(at_mb);
+ e_mod_move_apptray_objs_add(at_mb);
+
+ // apptray_objs_animation_layer_set
+ e_mod_move_apptray_objs_animation_layer_set(at_mb);
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_indicator_widget_cb_motion_start_internal_quickpanel_check(E_Move_Border *qp_mb)
+{
+ E_CHECK_RETURN(qp_mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_QUICKPANEL_CHECK(qp_mb), EINA_FALSE);
+ E_CHECK_RETURN(qp_mb->visible, EINA_FALSE);
+ E_CHECK_RETURN(e_mod_move_util_compositor_object_visible_get(qp_mb),
+ EINA_FALSE);
+
+ if (e_mod_move_quickpanel_objs_animation_state_get(qp_mb)) return EINA_FALSE;
+
+ if (!(qp_mb->m->qp_scroll_with_clipping))
+ e_mod_move_quickpanel_dim_show(qp_mb);
+
+ // Set Composite Mode & Rotation Lock & Make below win's mirror object
+ e_mod_move_quickpanel_stage_init(qp_mb);
+
+ e_mod_move_quickpanel_objs_add(qp_mb);
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_indicator_widget_quickpanel_flick_process(E_Move_Indicator_Widget *indi_widget,
+ E_Move_Border *mb2, // mb2 : quickpanel
+ int angle,
+ Eina_Bool state)
+{
+ E_Move *m = NULL;
+ E_Move_Border *mb = NULL;
+ E_Move_Widget_Object *mwo = NULL;
+ Eina_List *l;
+ E_Zone *zone = NULL;
+ int mx = 0, my = 0, ax = 0, ay = 0;
+
+ E_CHECK_RETURN(indi_widget, EINA_FALSE);
+ mb = e_mod_move_border_client_find(indi_widget->win);
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(mb2, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_QUICKPANEL_CHECK(mb2), EINA_FALSE);
+ E_CHECK_RETURN(state, EINA_FALSE);
+
+ m = mb->m;
+ zone = mb->bd->zone;
+
+ EINA_LIST_FOREACH(indi_widget->objs, l, mwo) // indicator click unset
+ {
+ if (!mwo) continue;
+ e_mod_move_event_click_set(mwo->event, EINA_FALSE);
+ }
+
+ _e_mod_move_indicator_widget_apptray_move_set(indi_widget, EINA_FALSE);
+ _e_mod_move_indicator_widget_quickpanel_move_set(indi_widget, EINA_FALSE);
+
+ // flick data free
+ if (mb->flick_data) e_mod_move_flick_data_free(mb);
+
+ switch (angle)
+ {
+ case 90:
+ mx = 0; my = 0;
+ if (m->qp_scroll_with_clipping)
+ {
+ ax = zone->x + mb2->w;
+ ay = zone->y + mb2->h;
+ }
+ else
+ {
+ ax = mx; ay = my;
+ }
+ break;
+ case 180:
+ mx = 0; my = zone->h - mb2->h;
+ if (m->qp_scroll_with_clipping)
+ {
+ ax = zone->x; ay = zone->y;
+ }
+ else
+ {
+ ax = mx; ay = my;
+ }
+ break;
+ case 270:
+ mx = zone->w - mb2->w; my = 0;
+ if (m->qp_scroll_with_clipping)
+ {
+ ax = zone->x; ay = zone->y;
+ }
+ else
+ {
+ ax = mx; ay = my;
+ }
+ break;
+ case 0:
+ default :
+ mx = 0; my = 0;
+ if (m->qp_scroll_with_clipping)
+ {
+ ax = zone->x + mb2->w;
+ ay = zone->y + mb2->h;
+ }
+ else
+ {
+ ax = mx; ay = my;
+ }
+ break;
+ }
+
+ e_mod_move_quickpanel_e_border_move(mb2, mx, my);
+ e_mod_move_quickpanel_objs_animation_move(mb2, ax, ay);
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_indicator_widget_apptray_flick_process(E_Move_Indicator_Widget *indi_widget,
+ E_Move_Border *mb2, // mb2 : apptray
+ int angle,
+ Eina_Bool state)
+{
+ E_Move_Border *mb = NULL;
+ E_Move_Widget_Object *mwo = NULL;
+ Eina_List *l;
+ E_Zone *zone = NULL;
+ int x = 0;
+ int y = 0;
+
+ E_CHECK_RETURN(indi_widget, EINA_FALSE);
+ mb = e_mod_move_border_client_find(indi_widget->win);
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(mb2, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_APPTRAY_CHECK(mb2), EINA_FALSE);
+ E_CHECK_RETURN(state, EINA_FALSE);
+
+ zone = mb->bd->zone;
+
+ EINA_LIST_FOREACH(indi_widget->objs, l, mwo) // indicator click unset
+ {
+ if (!mwo) continue;
+ e_mod_move_event_click_set(mwo->event, EINA_FALSE);
+ }
+
+ _e_mod_move_indicator_widget_apptray_move_set(indi_widget, EINA_FALSE);
+ _e_mod_move_indicator_widget_quickpanel_move_set(indi_widget, EINA_FALSE);
+
+ // flick data free
+ if (mb->flick_data) e_mod_move_flick_data_free(mb);
+
+ switch (angle)
+ {
+ case 90:
+ x = 0;
+ y = 0;
+ break;
+ case 180:
+ x = 0;
+ y = zone->h - mb2->h;
+ break;
+ case 270:
+ x = zone->w - mb2->w;
+ y = 0;
+ break;
+ case 0:
+ default :
+ x = 0;
+ y = 0;
+ break;
+ }
+
+ e_mod_move_apptray_e_border_move(mb2, x, y);
+ e_mod_move_apptray_objs_animation_move(mb2, x, y);
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_indicator_widget_home_region_release_check(E_Move_Indicator_Widget *indi_widget,
+ Eina_Bool apptray_move /* if home button is pressd, then apptray_move set true */,
+ int angle,
+ Evas_Point pos /* mouse up position */)
+{
+ E_Move_Border *mb = NULL;
+ int region_check;
+ Eina_Bool ret = EINA_FALSE;
+ E_Zone *zone = NULL;
+ E_Move *m = NULL;
+
+ m = e_mod_move_util_get();
+ E_CHECK_RETURN(m, EINA_FALSE);
+ E_CHECK_RETURN(indi_widget, EINA_FALSE);
+ mb = e_mod_move_border_client_find(indi_widget->win);
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(apptray_move, EINA_FALSE);
+ E_CHECK_RETURN(mb->bd, EINA_FALSE);
+ zone = mb->bd->zone;
+ E_CHECK_RETURN(zone, EINA_FALSE);
+
+ switch (angle)
+ {
+ case 0:
+ region_check = m->indicator_widget_geometry[E_MOVE_ANGLE_0].h;
+ if (pos.y < region_check) ret = EINA_TRUE;
+ break;
+ case 90:
+ region_check = m->indicator_widget_geometry[E_MOVE_ANGLE_90].w;
+ if (pos.x < region_check) ret = EINA_TRUE;
+ break;
+ case 180:
+ region_check = zone->h - m->indicator_widget_geometry[E_MOVE_ANGLE_180].h;
+ if (pos.y > region_check) ret = EINA_TRUE;
+ break;
+ case 270:
+ region_check = zone->w - m->indicator_widget_geometry[E_MOVE_ANGLE_270].w;
+ if (pos.x > region_check) ret = EINA_TRUE;
+ break;
+ default :
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s , invalid angle:%d, (%d,%d) %s()\n",
+ "EVAS_OBJ", angle, pos.x, pos.y,
+ __func__)
+ break;
+ }
+ return ret;
+}
+
+static Eina_Bool
+_e_mod_move_indicator_widget_cb_motion_start(void *data,
+ void *event_info)
+{
+ E_Move *m = NULL;
+ E_Move_Indicator_Widget *indi_widget = (E_Move_Indicator_Widget *)data;
+
+ E_Move_Border *mb = NULL;
+ E_Move_Border *qp_mb = NULL;
+ E_Move_Border *at_mb = NULL;
+ E_Move_Event_Motion_Info *info;
+ E_Move_Widget_Object *mwo = NULL;
+ Evas_Event_Mouse_Down *mouse_down_event = NULL;
+ Eina_Bool clicked = EINA_FALSE;
+ Eina_List *l;
+ E_Move_Scroll_Region_Indicator scroll_region = E_MOVE_SCROLL_REGION_NONE;
+
+ info = (E_Move_Event_Motion_Info *)event_info;
+ m = e_mod_move_util_get();
+
+ E_CHECK_RETURN(indi_widget, EINA_FALSE);
+ mb = e_mod_move_border_client_find(indi_widget->win);
+
+ if (!m || !mb || !indi_widget || !info) return EINA_FALSE;
+
+ mouse_down_event = info->event_info;
+ E_CHECK_RETURN(mouse_down_event, EINA_FALSE);
+ if (mouse_down_event->button != 1)
+ return EINA_FALSE;
+
+ EINA_LIST_FOREACH(indi_widget->objs, l, mwo)
+ {
+ if (!mwo) continue;
+ clicked = e_mod_move_event_click_get(mwo->event);
+ }
+ if (clicked)
+ return EINA_FALSE;
+
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s w:0x%08x INDI_WIDGET_MOTION_START (%4d,%4d)\n",
+ "EVAS_OBJ", mb->bd->win,
+ info->coord.x, info->coord.y);
+
+ _e_mod_move_indicator_widget_apptray_move_set(indi_widget, EINA_FALSE);
+ _e_mod_move_indicator_widget_quickpanel_move_set(indi_widget, EINA_FALSE);
+
+ /* check if apptray or quickpanel exists on the current zone */
+ at_mb = e_mod_move_apptray_find();
+ if ((at_mb) &&
+ (REGION_INSIDE_ZONE(at_mb, mb->bd->zone)))
+ {
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s w:0x%08x INDI_WIDGET_MOTION_START %s\n",
+ "EVAS_OBJ", mb->bd->win,
+ "apptray exists. return.");
+ return EINA_FALSE;
+ }
+
+ qp_mb = e_mod_move_quickpanel_find();
+ if ((qp_mb) &&
+ (REGION_INSIDE_ZONE(qp_mb, mb->bd->zone)))
+ {
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s w:0x%08x INDI_WIDGET_MOTION_START %s\n",
+ "EVAS_OBJ", mb->bd->win,
+ "quickpanel exists. return.");
+ return EINA_FALSE;
+ }
+
+ EINA_LIST_FOREACH(indi_widget->objs, l, mwo)
+ {
+ if (!mwo) continue;
+ e_mod_move_event_click_set(mwo->event, EINA_TRUE);
+ }
+
+ E_CHECK_GOTO(e_mod_move_flick_data_new(mb), error_cleanup);
+ e_mod_move_flick_data_init(mb, info->coord.x, info->coord.y);
+
+ scroll_region = e_mod_move_indicator_region_scroll_check(mb->angle, info->coord);
+
+ if (scroll_region == E_MOVE_SCROLL_REGION_APPTRAY)
+ {
+ if (e_mod_move_panel_scrollable_get(mb, E_MOVE_PANEL_TYPE_APPTRAY))
+ {
+ if (_e_mod_move_indicator_widget_cb_motion_start_internal_apptray_check(at_mb))
+ {
+ e_mod_move_apptray_e_border_raise(at_mb);
+ _e_mod_move_indicator_widget_apptray_move_set(indi_widget, EINA_TRUE);
+ e_mod_move_apptray_objs_animation_start_position_set(at_mb,
+ mb->angle);
+ // send apptray to "move start message".
+ e_mod_move_apptray_anim_state_send(at_mb, EINA_TRUE);
+ }
+ }
+ }
+ else if (scroll_region == E_MOVE_SCROLL_REGION_QUICKPANEL)
+ {
+ if (e_mod_move_panel_scrollable_get(mb, E_MOVE_PANEL_TYPE_QUICKPANEL))
+ {
+ if (_e_mod_move_indicator_widget_cb_motion_start_internal_quickpanel_check(qp_mb))
+ {
+ _e_mod_move_indicator_widget_quickpanel_move_set(indi_widget, EINA_TRUE);
+ e_mod_move_quickpanel_objs_animation_start_position_set(qp_mb,
+ mb->angle);
+ // send quickpanel to "move start message".
+ e_mod_move_quickpanel_anim_state_send(qp_mb, EINA_TRUE);
+ }
+ }
+ }
+
+ indi_widget->pos = info->coord; // save mouse click position
+
+ return EINA_TRUE;
+
+error_cleanup:
+
+ EINA_LIST_FOREACH(indi_widget->objs, l, mwo)
+ {
+ if (!mwo) continue;
+ e_mod_move_event_click_set(mwo->event, EINA_FALSE);
+ }
+
+ _e_mod_move_indicator_widget_apptray_move_set(indi_widget, EINA_FALSE);
+ _e_mod_move_indicator_widget_quickpanel_move_set(indi_widget, EINA_FALSE);
+
+ return EINA_FALSE;
+}
+
+static Eina_Bool
+_e_mod_move_indicator_widget_cb_motion_move(void *data,
+ void *event_info)
+{
+ E_Move *m = NULL;
+ E_Move_Indicator_Widget *indi_widget = (E_Move_Indicator_Widget *)data;
+ E_Move_Border *mb = NULL;
+ E_Move_Border *qp_mb = NULL;
+ E_Move_Border *at_mb = NULL;
+ E_Move_Event_Motion_Info *info;
+ E_Move_Widget_Object *mwo = NULL;
+ E_Zone *zone = NULL;
+ Eina_List *l;
+ Eina_Bool click = EINA_FALSE;
+ Eina_Bool need_move = EINA_FALSE;
+ Eina_Bool contents = EINA_FALSE;
+
+ int cx, cy, cw, ch;
+ int x = 0, y = 0;
+ int angle;
+
+ info = (E_Move_Event_Motion_Info *)event_info;
+ m = e_mod_move_util_get();
+
+ E_CHECK_RETURN(indi_widget, EINA_FALSE);
+ mb = e_mod_move_border_client_find(indi_widget->win);
+
+ if (!m || !mb || !info) return EINA_FALSE;
+
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s w:0x%08x INDI_WIDGET_MOTION_MOVE a:%d (%4d,%4d)\n",
+ "EVAS_OBJ", mb->bd->win, mb->angle,
+ info->coord.x, info->coord.y);
+
+ angle = mb->angle;
+ zone = mb->bd->zone;
+
+ EINA_LIST_FOREACH(indi_widget->objs, l, mwo)
+ {
+ if (!mwo) continue;
+ click = e_mod_move_event_click_get(mwo->event);
+ }
+
+ E_CHECK_RETURN(click, EINA_FALSE);
+
+ if (_e_mod_move_indicator_widget_quickpanel_move_get(indi_widget))
+ {
+ qp_mb = e_mod_move_quickpanel_find();
+ E_CHECK_RETURN(qp_mb, EINA_FALSE);
+
+ contents = e_mod_move_border_contents_rect_get(qp_mb, &cx, &cy ,&cw, &ch);
+
+ switch (angle)
+ {
+ case 0:
+ if (info->coord.y < qp_mb->h)
+ {
+ if (contents)
+ {
+ if (info->coord.y < ch)
+ {
+ y = info->coord.y - ch;
+ need_move = EINA_TRUE;
+ }
+ }
+ else
+ {
+ y = info->coord.y - qp_mb->h;
+ need_move = EINA_TRUE;
+ }
+ }
+ break;
+ case 90:
+ if (info->coord.x < qp_mb->w)
+ {
+ if (contents)
+ {
+ if (info->coord.x < cw)
+ {
+ x = info->coord.x - cw;
+ need_move = EINA_TRUE;
+ }
+ }
+ else
+ {
+ x = info->coord.x - qp_mb->w;
+ need_move = EINA_TRUE;
+ }
+ }
+ break;
+ case 180:
+ if (info->coord.y > (zone->h - qp_mb->h))
+ {
+ if (contents)
+ {
+ if (info->coord.y > cy)
+ {
+ y = info->coord.y - cy;
+ need_move = EINA_TRUE;
+ }
+ }
+ else
+ {
+ y = info->coord.y;
+ need_move = EINA_TRUE;
+ }
+ }
+ break;
+ case 270:
+ if (info->coord.x > (zone->w - qp_mb->w))
+ {
+ if (contents)
+ {
+ if (info->coord.x > cx)
+ {
+ x = info->coord.x - cx;
+ need_move = EINA_TRUE;
+ }
+ }
+ else
+ {
+ x = info->coord.x;
+ need_move = EINA_TRUE;
+ }
+ }
+ break;
+ default :
+ break;
+ }
+
+ if (_e_mod_move_indicator_widget_scrollable_object_movable_check(mb, info->coord))
+ {
+ if (m->qp_scroll_with_clipping)
+ e_mod_move_quickpanel_objs_move(qp_mb,
+ info->coord.x,
+ info->coord.y);
+ else
+ {
+ if (need_move)
+ e_mod_move_quickpanel_objs_move(qp_mb, x, y);
+ }
+ }
+ }
+ else if (_e_mod_move_indicator_widget_apptray_move_get(indi_widget))
+ {
+ at_mb = e_mod_move_apptray_find();
+ E_CHECK_RETURN(at_mb, EINA_FALSE);
+
+ switch (angle)
+ {
+ case 0:
+ if (info->coord.y < at_mb->h)
+ {
+ y = info->coord.y - at_mb->h;
+ need_move = EINA_TRUE;
+ }
+ break;
+ case 90:
+ if (info->coord.x < at_mb->w)
+ {
+ x = info->coord.x - at_mb->w;
+ need_move = EINA_TRUE;
+ }
+ break;
+ case 180:
+ if (info->coord.y > (zone->h - at_mb->h))
+ {
+ y = info->coord.y;
+ need_move = EINA_TRUE;
+ }
+ break;
+ case 270:
+ if (info->coord.x > (zone->w - at_mb->w))
+ {
+ x = info->coord.x;
+ need_move = EINA_TRUE;
+ }
+ break;
+ default :
+ break;
+ }
+ if (need_move)
+ e_mod_move_apptray_objs_move(at_mb, x, y);
+ }
+
+ indi_widget->pos = info->coord; // save mouse move position
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_indicator_widget_cb_motion_end(void *data,
+ void *event_info)
+{
+ E_Move *m = NULL;
+ E_Move_Indicator_Widget *indi_widget = (E_Move_Indicator_Widget *)data;
+ E_Move_Border *mb = NULL;
+ E_Move_Border *qp_mb = NULL;
+ E_Move_Border *at_mb = NULL;
+ E_Move_Event_Motion_Info *info;
+ E_Move_Widget_Object *mwo = NULL;
+ Eina_List *l;
+ E_Zone *zone;
+ Evas_Event_Mouse_Up *mouse_up_event;
+ Eina_Bool click = EINA_FALSE;
+ Eina_Bool flick_state = EINA_FALSE;
+ Eina_Bool qp_mv_state = EINA_FALSE;
+ Eina_Bool at_mv_state = EINA_FALSE;
+
+ int cx, cy, cw, ch;
+ int check_h, check_w;
+ int angle = 0;
+ int mx = 0, my = 0, ax = 0, ay = 0;
+
+ info = (E_Move_Event_Motion_Info *)event_info;
+ m = e_mod_move_util_get();
+
+ E_CHECK_RETURN(indi_widget, EINA_FALSE);
+ mb = e_mod_move_border_client_find(indi_widget->win);
+
+ if (!m || !mb || !info) return EINA_FALSE;
+
+ mouse_up_event = info->event_info;
+ E_CHECK_RETURN(mouse_up_event, EINA_FALSE);
+ if (mouse_up_event->button != 1)
+ return EINA_FALSE;
+
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s w:0x%08x ,angle:%d, (%d,%d) %s()\n",
+ "EVAS_OBJ", mb->bd->win, mb->angle, info->coord.x, info->coord.y,
+ __func__);
+
+ angle = mb->angle;
+ zone = mb->bd->zone;
+
+ EINA_LIST_FOREACH(indi_widget->objs, l, mwo)
+ {
+ if (!mwo) continue;
+ click = e_mod_move_event_click_get(mwo->event);
+ }
+ E_CHECK_GOTO(click, error_cleanup);
+
+ qp_mv_state = _e_mod_move_indicator_widget_quickpanel_move_get(indi_widget);
+ at_mv_state = _e_mod_move_indicator_widget_apptray_move_get(indi_widget);
+ if (!qp_mv_state && !at_mv_state) goto finish;
+
+ e_mod_move_flick_data_update(mb, info->coord.x, info->coord.y);
+ flick_state = e_mod_move_flick_state_get(mb, EINA_FALSE);
+
+ if (qp_mv_state)
+ {
+ qp_mb = e_mod_move_quickpanel_find();
+ if (_e_mod_move_indicator_widget_quickpanel_flick_process(indi_widget, qp_mb,
+ angle, flick_state))
+ {
+ return EINA_TRUE;
+ }
+ }
+ if (at_mv_state)
+ {
+ at_mb = e_mod_move_apptray_find();
+
+ // if release position is on indicator's home button then, do not flick.
+ if (_e_mod_move_indicator_widget_home_region_release_check(indi_widget,
+ EINA_TRUE, /* upper if phrase check _e_mod_move_indicator_apptray_move_get(mb) value TURE or FALSE. */
+ angle,
+ info->coord))
+ {
+ flick_state = EINA_FALSE;
+ }
+
+ if (_e_mod_move_indicator_widget_apptray_flick_process(indi_widget, at_mb,
+ angle, flick_state))
+ {
+ return EINA_TRUE;
+ }
+ }
+
+ mx = zone->x;
+ my = zone->y;
+ ax = mx;
+ ay = my;
+
+ switch (angle)
+ {
+ case 0:
+ if (at_mb)
+ {
+ check_h = at_mb->h;
+ if (check_h) check_h /= 2;
+ if (info->coord.y < check_h)
+ {
+ my = at_mb->h * -1;
+ ay = my;
+ }
+ }
+ if (qp_mb)
+ {
+ check_h = qp_mb->h;
+ if (check_h) check_h /= 2;
+ if (info->coord.y < check_h)
+ {
+ if (m->qp_scroll_with_clipping)
+ {
+ my = qp_mb->h * -1;
+ }
+ else
+ {
+ if (e_mod_move_border_contents_rect_get(qp_mb, &cx, &cy ,&cw, &ch))
+ {
+ check_h = ch;
+ if (check_h) check_h /= 2;
+ if (info->coord.y < check_h)
+ {
+ my = qp_mb->h * -1;
+ ay = ch * -1;
+ }
+ }
+ }
+ }
+ else
+ {
+ if (m->qp_scroll_with_clipping)
+ {
+ ax = zone->x + qp_mb->w,
+ ay = zone->y + qp_mb->h;
+ }
+ }
+ }
+ break;
+ case 90:
+ if (at_mb)
+ {
+ check_w = at_mb->w;
+ if (check_w) check_w /= 2;
+ if (info->coord.x < check_w)
+ {
+ mx = at_mb->w * -1;
+ ax = mx;
+ }
+ }
+ if (qp_mb)
+ {
+ check_w = qp_mb->w;
+ if (check_w) check_w /= 2;
+ if (info->coord.x < check_w)
+ {
+ if (m->qp_scroll_with_clipping)
+ {
+ mx = qp_mb->w * -1;
+ }
+ else
+ {
+ if (e_mod_move_border_contents_rect_get(qp_mb, &cx, &cy ,&cw, &ch))
+ {
+ check_w = cw;
+ if (check_w) check_w /= 2;
+ if (info->coord.x < check_w)
+ {
+ mx = qp_mb->w * -1;
+ ax = cw * -1;
+ }
+ }
+ }
+ }
+ else
+ {
+ if (m->qp_scroll_with_clipping)
+ {
+ ax = zone->x + qp_mb->w;
+ ay = zone->y + qp_mb->h;
+ }
+ }
+ }
+ break;
+ case 180:
+ if (at_mb)
+ {
+ check_h = at_mb->h;
+ if (check_h) check_h /= 2;
+ if (info->coord.y > (zone->h - check_h))
+ {
+ my = zone->h;
+ ay = my;
+ }
+ else
+ {
+ my = zone->h - at_mb->h;
+ ay = my;
+ }
+ }
+ if (qp_mb)
+ {
+ check_h = qp_mb->h;
+ if (check_h) check_h /= 2;
+ if (info->coord.y > (zone->h - check_h))
+ {
+ if (m->qp_scroll_with_clipping)
+ {
+ my = zone->h;
+ ax = zone->x + qp_mb->w;
+ ay = zone->y + qp_mb->h;
+ }
+ else
+ {
+ if (e_mod_move_border_contents_rect_get(qp_mb, &cx, &cy ,&cw, &ch))
+ {
+ check_h = ch;
+ if (check_h) check_h /= 2;
+ if (info->coord.y > (cy + check_h))
+ {
+ my = zone->h;
+ ay = ch;
+ }
+ }
+ }
+ }
+ }
+ break;
+ case 270:
+ if (at_mb)
+ {
+ check_w = at_mb->w;
+ if (check_w) check_w /= 2;
+ if (info->coord.x > (zone->w - check_w))
+ {
+ mx = zone->w;
+ ax = mx;
+ }
+ else
+ {
+ mx = zone->w - at_mb->w;
+ ax = mx;
+ }
+ }
+ if (qp_mb)
+ {
+ check_w = qp_mb->w;
+ if (check_w) check_w /= 2;
+ if (info->coord.x > (zone->w - check_w))
+ {
+ if (m->qp_scroll_with_clipping)
+ {
+ mx = zone->w;
+ ax = zone->x + qp_mb->w;
+ ay = zone->y + qp_mb->h;
+ }
+ else
+ {
+ if (e_mod_move_border_contents_rect_get(qp_mb, &cx, &cy ,&cw, &ch))
+ {
+ check_w = cw;
+ if (check_w) check_w /= 2;
+ if (info->coord.x > (cx + check_w))
+ {
+ mx = zone->w;
+ ax = cw;
+ }
+ }
+ }
+ }
+ }
+ break;
+ default :
+ break;
+ }
+
+ if (at_mb)
+ {
+ e_mod_move_apptray_e_border_move(at_mb, mx, my);
+ e_mod_move_apptray_objs_animation_move(at_mb, ax, ay);
+ }
+ else if (qp_mb)
+ {
+ e_mod_move_quickpanel_e_border_move(qp_mb, mx, my);
+ if (_e_mod_move_indicator_widget_scrollable_object_movable_check(mb, info->coord))
+ e_mod_move_quickpanel_objs_animation_move(qp_mb, ax, ay);
+ else
+ e_mod_move_quickpanel_objs_animation_move_with_time(qp_mb, ax, ay, 0.0000001);
+ // time :0.0 calls animation_frame with pos : 0.0 calls once.
+ // so I use small time value, it makes animation_frame with pos: 1.0 call once
+ }
+
+finish:
+ indi_widget->pos = info->coord; // save mouse up position
+
+ EINA_LIST_FOREACH(indi_widget->objs, l, mwo)
+ {
+ if (!mwo) continue;
+ e_mod_move_event_click_set(mwo->event, EINA_FALSE);
+ }
+
+error_cleanup:
+ if (mb->flick_data) e_mod_move_flick_data_free(mb);
+ _e_mod_move_indicator_widget_apptray_move_set(indi_widget, EINA_FALSE);
+ _e_mod_move_indicator_widget_quickpanel_move_set(indi_widget, EINA_FALSE);
+
+ return EINA_TRUE;
+}
+
+static void
+_e_mod_move_indicator_widget_obj_event_setup(E_Move_Indicator_Widget *indicator_widget,
+ E_Move_Widget_Object *mwo)
+{
+ E_CHECK(indicator_widget);
+ E_CHECK(mwo);
+
+ mwo->event = e_mod_move_event_new(indicator_widget->win, mwo->obj);
+ E_CHECK(mwo->event);
+
+ e_mod_move_event_data_type_set(mwo->event, E_MOVE_EVENT_DATA_TYPE_WIDGET_INDICATOR);
+ e_mod_move_event_angle_cb_set(mwo->event,
+ e_mod_move_util_win_prop_angle_get);
+ e_mod_move_event_cb_set(mwo->event, E_MOVE_EVENT_TYPE_MOTION_START,
+ _e_mod_move_indicator_widget_cb_motion_start,
+ indicator_widget);
+ e_mod_move_event_cb_set(mwo->event, E_MOVE_EVENT_TYPE_MOTION_MOVE,
+ _e_mod_move_indicator_widget_cb_motion_move,
+ indicator_widget);
+ e_mod_move_event_cb_set(mwo->event, E_MOVE_EVENT_TYPE_MOTION_END,
+ _e_mod_move_indicator_widget_cb_motion_end,
+ indicator_widget);
+ e_mod_move_event_send_all_set(mwo->event, EINA_TRUE);
+}
+
+static Eina_Bool
+_e_mod_move_indicator_widget_scrollable_object_movable_check(E_Move_Border *mb, Evas_Point pos)
+{
+ E_Move *m = NULL;
+ int val1 = 0, val2 = 0;
+ double threshold = 0.2; // 20 %
+ Eina_Bool ret = EINA_FALSE;
+ int sx = 0, sy = 0, ex = 0, ey = 0;
+ double st = 0.0, et = 0.0;
+
+ m = e_mod_move_util_get();
+ E_CHECK_RETURN(m, EINA_FALSE);
+
+ if (!e_mod_move_flick_data_get(mb, &sx, &sy, &ex, &ey, &st, &et))
+ return EINA_FALSE;
+
+ switch (mb->angle)
+ {
+ case 90:
+ val1 = pos.x - sx;
+ val2 = m->indicator_widget_geometry[E_MOVE_ANGLE_90].w;
+ break;
+ case 180:
+ val1 = sy - pos.y;
+ val2 = m->indicator_widget_geometry[E_MOVE_ANGLE_180].h;
+ break;
+ case 270:
+ val1 = sx - pos.x;
+ val2 = m->indicator_widget_geometry[E_MOVE_ANGLE_270].w;
+ break;
+ case 0:
+ default:
+ val1 = pos.y - sy;
+ val2 = m->indicator_widget_geometry[E_MOVE_ANGLE_0].h;
+ break;
+ }
+
+ if ((val1 / val2) > threshold) ret = EINA_TRUE;
+
+ return ret;
+}
+
+/* externally accessible functions */
+
+/* set current indicator widget */
+EINTERN void
+e_mod_move_indicator_widget_set(E_Move_Indicator_Widget *indi_widget)
+{
+ E_Move *m = NULL;
+
+ m = e_mod_move_util_get();
+ E_CHECK(m);
+
+ if (m->indicator_widget)
+ {
+ e_mod_move_indicator_widget_del(m->indicator_widget);
+ }
+
+ m->indicator_widget = indi_widget;
+}
+
+/* get current indicator widget */
+EINTERN E_Move_Indicator_Widget *
+e_mod_move_indicator_widget_get(void)
+{
+ E_Move *m = NULL;
+ m = e_mod_move_util_get();
+ E_CHECK_RETURN(m, NULL);
+
+ return m->indicator_widget;
+}
+
+/* find indicator widget target window */
+EINTERN Eina_Bool
+e_mod_move_indicator_widget_target_window_find(Ecore_X_Window *win)
+{
+ E_Move *m = NULL;
+ E_Move_Border *find_mb = NULL;
+ Eina_Bool found = EINA_FALSE;
+ E_Zone *zone = NULL;
+ Eina_Bool ret = EINA_FALSE;
+
+ E_CHECK_RETURN(win, EINA_FALSE);
+ m = e_mod_move_util_get();
+ E_CHECK_RETURN(m, EINA_FALSE);
+
+ EINA_INLIST_REVERSE_FOREACH(m->borders, find_mb)
+ {
+ if (!find_mb->bd) continue;
+ // the first OnScreen & FullScreen Window
+ zone = find_mb->bd->zone;
+ if (find_mb->visible
+ && REGION_EQUAL_TO_ZONE(find_mb, zone) // check fullscreen
+ && (zone->id == 0)) // change zone->id comparing to bd's profile property (mobile)
+ {
+ found = EINA_TRUE;
+ break;
+ }
+ }
+
+ if (found
+ && (find_mb->indicator_state == E_MOVE_INDICATOR_STATE_ON)
+ && (find_mb->indicator_type == E_MOVE_INDICATOR_TYPE_1)
+ && !(TYPE_INDICATOR_CHECK(find_mb))
+ && !(TYPE_APPTRAY_CHECK(find_mb))
+ && !(TYPE_QUICKPANEL_CHECK(find_mb)))
+ {
+ *win = find_mb->bd->client.win;
+ ret = EINA_TRUE;
+ }
+
+ return ret;
+}
+
+/* find indicator widget's target window and apply indicator widget control */
+EINTERN void
+e_mod_move_indicator_widget_apply(void)
+{
+ E_Move *m = NULL;
+ Ecore_X_Window target_win;
+ E_Move_Indicator_Widget *indi_widget = NULL;
+
+ m = e_mod_move_util_get();
+ E_CHECK(m);
+
+ if (e_mod_move_indicator_widget_target_window_find(&target_win))
+ {
+ // if previous indicator widget is created
+ if ((indi_widget = e_mod_move_indicator_widget_get()))
+ {
+ // if current indicator widget's win is equal to finded win
+ // then just return.
+ if ((indi_widget->win == target_win)) return;
+ else
+ {
+ // if current indicator widget's win is not equal to finded win
+ // then del previous indicator_widget and add new indicator widget.
+ e_mod_move_indicator_widget_del(indi_widget);
+
+ e_mod_move_indicator_widget_set(e_mod_move_indicator_widget_add(target_win));
+ }
+ }
+ else
+ {
+ //if previous indicator widget is not creagted
+ //then add new indicator widget.
+ e_mod_move_indicator_widget_set(e_mod_move_indicator_widget_add(target_win));
+ }
+ }
+ else
+ {
+ // if current window does not require indicator widget
+ // and previous indicator widget is created,
+ // then del previous indicator_widget
+ if ((indi_widget = e_mod_move_indicator_widget_get()))
+ {
+ e_mod_move_indicator_widget_del(indi_widget);
+ e_mod_move_indicator_widget_set(NULL);
+ }
+ }
+}
+
+/* create E_Move_Border related Indicator_Widget */
+EINTERN E_Move_Indicator_Widget *
+e_mod_move_indicator_widget_add(Ecore_X_Window win)
+{
+ E_Move *m = NULL;
+ E_Move_Border *mb = NULL;
+ E_Move_Indicator_Widget *indi_widget = NULL;
+ E_Move_Widget_Object *mwo = NULL;
+ Eina_List *l;
+ int x;
+ int y;
+ int w;
+ int h;
+
+ m = e_mod_move_util_get();
+ E_CHECK_RETURN(m, EINA_FALSE);
+
+ mb = e_mod_move_border_client_find(win);
+ E_CHECK_RETURN(mb, NULL);
+
+ indi_widget = E_NEW(E_Move_Indicator_Widget, 1);
+ E_CHECK_RETURN(indi_widget, NULL);
+
+ indi_widget->win = win;
+ indi_widget->objs = e_mod_move_widget_objs_add(m);
+ if (indi_widget->objs)
+ {
+ switch (mb->angle)
+ {
+ case 90:
+ x = m->indicator_widget_geometry[E_MOVE_ANGLE_90].x;
+ y = m->indicator_widget_geometry[E_MOVE_ANGLE_90].y;
+ w = m->indicator_widget_geometry[E_MOVE_ANGLE_90].w;
+ h = m->indicator_widget_geometry[E_MOVE_ANGLE_90].h;
+ break;
+ case 180:
+ x = m->indicator_widget_geometry[E_MOVE_ANGLE_180].x;
+ y = m->indicator_widget_geometry[E_MOVE_ANGLE_180].y;
+ w = m->indicator_widget_geometry[E_MOVE_ANGLE_180].w;
+ h = m->indicator_widget_geometry[E_MOVE_ANGLE_180].h;
+ break;
+ case 270:
+ x = m->indicator_widget_geometry[E_MOVE_ANGLE_270].x;
+ y = m->indicator_widget_geometry[E_MOVE_ANGLE_270].y;
+ w = m->indicator_widget_geometry[E_MOVE_ANGLE_270].w;
+ h = m->indicator_widget_geometry[E_MOVE_ANGLE_270].h;
+ break;
+ case 0:
+ default:
+ x = m->indicator_widget_geometry[E_MOVE_ANGLE_0].x;
+ y = m->indicator_widget_geometry[E_MOVE_ANGLE_0].y;
+ w = m->indicator_widget_geometry[E_MOVE_ANGLE_0].w;
+ h = m->indicator_widget_geometry[E_MOVE_ANGLE_0].h;
+ break;
+ }
+ e_mod_move_widget_objs_move(indi_widget->objs, x, y);
+ e_mod_move_widget_objs_resize(indi_widget->objs, w, h);
+ e_mod_move_widget_objs_layer_set(indi_widget->objs, EVAS_LAYER_MAX);
+ e_mod_move_widget_objs_color_set(indi_widget->objs, 0, 0, 0, 0);
+ e_mod_move_widget_objs_show(indi_widget->objs);
+ e_mod_move_widget_objs_raise(indi_widget->objs);
+#if 0 // for debug
+ e_mod_move_widget_objs_color_set(indi_widget->objs, 0, 0, 255, 128);
+#endif
+
+ // Set Input Shape Mask
+ if (e_mod_move_border_shape_input_new(mb))
+ e_mod_move_border_shape_input_rect_set(mb, x, y, w, h);
+ else
+ goto error_cleanup;
+ }
+ else
+ {
+ goto error_cleanup;
+ }
+
+ // Set Event Handler
+ EINA_LIST_FOREACH(indi_widget->objs, l, mwo)
+ {
+ if (!mwo) continue;
+ _e_mod_move_indicator_widget_obj_event_setup(indi_widget, mwo);
+ }
+ return indi_widget;
+
+error_cleanup:
+ if (indi_widget->objs) e_mod_move_widget_objs_del(indi_widget->objs);
+ memset(indi_widget, 0, sizeof(E_Move_Indicator_Widget));
+ E_FREE(indi_widget);
+ return NULL;
+}
+
+/* delete indicator_widget */
+EINTERN void
+e_mod_move_indicator_widget_del(E_Move_Indicator_Widget *indi_widget)
+{
+ E_Move *m = NULL;
+ E_Move_Border *mb = NULL;
+ E_Move_Border *at_mb = NULL;
+ E_Move_Border *qp_mb = NULL;
+ E_Zone *zone = NULL;
+ int x = 0; int y = 0;
+ int mx = 0, my = 0, ax = 0, ay = 0;
+
+ E_CHECK(indi_widget);
+ m = e_mod_move_util_get();
+
+ if (e_mod_move_indicator_widget_click_get(indi_widget))
+ ecore_x_mouse_up_send(indi_widget->win,
+ indi_widget->pos.x,
+ indi_widget->pos.y,
+ 1);
+
+ if ((mb = e_mod_move_border_client_find(indi_widget->win)))
+ {
+ e_mod_move_border_shape_input_free(mb);
+
+ // if indicaor widget is deleted, then apptray or quickpanel's mirror object hide with animation
+ if (indi_widget->quickpanel_move)
+ {
+ qp_mb = e_mod_move_quickpanel_find();
+ E_CHECK_GOTO(qp_mb, error_cleanup);
+ zone = qp_mb->bd->zone;
+
+ switch (mb->angle)
+ {
+ case 90:
+ mx = qp_mb->w * -1; my = 0;
+ if (m->qp_scroll_with_clipping)
+ {
+ ax = zone->x; ay = zone->y;
+ }
+ else
+ {
+ ax = mx; ay = my;
+ }
+ break;
+ case 180:
+ mx = 0; my = zone->h;
+ if (m->qp_scroll_with_clipping)
+ {
+ ax = zone->x + qp_mb->w;
+ ay = zone->y + qp_mb->h;
+ }
+ else
+ {
+ ax = mx; ay = my;
+ }
+ break;
+ case 270:
+ mx = zone->w; my = 0;
+ if (m->qp_scroll_with_clipping)
+ {
+ ax = zone->x + qp_mb->w;
+ ay = zone->y + qp_mb->h;
+ }
+ else
+ {
+ ax = mx; ay = my;
+ }
+ break;
+ case 0:
+ default :
+ mx = 0; my = qp_mb->h * -1;
+ if (m->qp_scroll_with_clipping)
+ {
+ ax = zone->x; ay = zone->y;
+ }
+ else
+ {
+ ax = mx; ay = my;
+ }
+ break;
+ }
+
+ if (e_mod_move_quickpanel_objs_animation_state_get(qp_mb))
+ {
+ e_mod_move_quickpanel_objs_animation_stop(qp_mb);
+ e_mod_move_quickpanel_objs_animation_clear(qp_mb);
+ }
+ e_mod_move_quickpanel_objs_add(qp_mb);
+ e_mod_move_quickpanel_e_border_move(qp_mb, mx, my);
+ e_mod_move_quickpanel_objs_animation_move(qp_mb, ax, ay);
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s Indicator Widget Deleted: Hide QuickPanel %s():%d\n",
+ "EVAS_OBJ", __func__, __LINE__);
+ }
+
+ if (indi_widget->apptray_move)
+ {
+ at_mb = e_mod_move_apptray_find();
+ E_CHECK_GOTO(at_mb, error_cleanup);
+ zone = at_mb->bd->zone;
+
+ switch (mb->angle)
+ {
+ case 0:
+ x = 0;
+ y = at_mb->h * -1;
+ break;
+ case 90:
+ x = at_mb->w * -1;
+ y = 0;
+ break;
+ case 180:
+ x = 0;
+ y = zone->h;
+ break;
+ case 270:
+ x = zone->w;
+ y = 0;
+ break;
+ default :
+ x = 0;
+ y = at_mb->h * -1;
+ break;
+ }
+ if (e_mod_move_apptray_objs_animation_state_get(at_mb))
+ {
+ e_mod_move_apptray_objs_animation_stop(at_mb);
+ e_mod_move_apptray_objs_animation_clear(at_mb);
+ }
+ e_mod_move_apptray_objs_add(at_mb);
+
+ // apptray_objs_animation_layer_set
+ e_mod_move_apptray_objs_animation_layer_set(at_mb);
+
+ e_mod_move_apptray_e_border_move(at_mb, x, y);
+ e_mod_move_apptray_objs_animation_move(at_mb, x, y);
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s Indicator Widget Deleted: Hide Apptray %s():%d\n",
+ "EVAS_OBJ", __func__, __LINE__);
+ }
+ }
+
+error_cleanup:
+ if (indi_widget->objs) e_mod_move_widget_objs_del(indi_widget->objs);
+ memset(indi_widget, 0, sizeof(E_Move_Indicator_Widget));
+ E_FREE(indi_widget);
+ if (m) m->indicator_widget = NULL;
+}
+
+EINTERN Eina_Bool
+e_mod_move_indicator_widget_angle_change(Ecore_X_Window win)
+{
+ E_Move *m = NULL;
+ E_Move_Indicator_Widget *indi_widget = NULL;
+ Eina_Bool ret = EINA_FALSE;
+ E_Move_Border *mb = NULL;
+ int x;
+ int y;
+ int w;
+ int h;
+
+ m = e_mod_move_util_get();
+ E_CHECK_RETURN(m, EINA_FALSE);
+
+ indi_widget = e_mod_move_indicator_widget_get();
+ E_CHECK_RETURN(indi_widget, EINA_FALSE);
+
+ if ((indi_widget->win == win))
+ {
+ if ((mb = e_mod_move_border_client_find(win)))
+ {
+ switch (mb->angle)
+ {
+ case 90:
+ x = m->indicator_widget_geometry[E_MOVE_ANGLE_90].x;
+ y = m->indicator_widget_geometry[E_MOVE_ANGLE_90].y;
+ w = m->indicator_widget_geometry[E_MOVE_ANGLE_90].w;
+ h = m->indicator_widget_geometry[E_MOVE_ANGLE_90].h;
+ break;
+ case 180:
+ x = m->indicator_widget_geometry[E_MOVE_ANGLE_180].x;
+ y = m->indicator_widget_geometry[E_MOVE_ANGLE_180].y;
+ w = m->indicator_widget_geometry[E_MOVE_ANGLE_180].w;
+ h = m->indicator_widget_geometry[E_MOVE_ANGLE_180].h;
+ break;
+ case 270:
+ x = m->indicator_widget_geometry[E_MOVE_ANGLE_270].x;
+ y = m->indicator_widget_geometry[E_MOVE_ANGLE_270].y;
+ w = m->indicator_widget_geometry[E_MOVE_ANGLE_270].w;
+ h = m->indicator_widget_geometry[E_MOVE_ANGLE_270].h;
+ break;
+ case 0:
+ default:
+ x = m->indicator_widget_geometry[E_MOVE_ANGLE_0].x;
+ y = m->indicator_widget_geometry[E_MOVE_ANGLE_0].y;
+ w = m->indicator_widget_geometry[E_MOVE_ANGLE_0].w;
+ h = m->indicator_widget_geometry[E_MOVE_ANGLE_0].h;
+ break;
+ }
+ e_mod_move_widget_objs_move(indi_widget->objs, x, y);
+ e_mod_move_widget_objs_resize(indi_widget->objs, w, h);
+
+ //change Input Shape Mask
+ e_mod_move_border_shape_input_rect_set(mb, x, y, w, h);
+ ret = EINA_TRUE;
+ }
+ }
+ return ret;
+}
+
+EINTERN Eina_Bool
+e_mod_move_indicator_widget_scrollable_check(void)
+{
+ E_Move_Border *lockscr_mb = NULL;
+ E_Move_Border *taskmgr_mb = NULL;
+ E_Move_Border *pwlock_mb = NULL;
+
+ // if lockscreen is exist & visible, then do not show apptray & quickpanel
+ if ((lockscr_mb = e_mod_move_lockscreen_find()))
+ {
+ if (lockscr_mb->visibility == E_MOVE_VISIBILITY_STATE_VISIBLE)
+ {
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s %s %s()\n",
+ "EVAS_OBJ","Lockscreen is exist.", __func__);
+ return EINA_FALSE;
+ }
+ }
+ // if taskmanage is exist & visible, then do not show apptray & quickpanel
+ if ((taskmgr_mb = e_mod_move_taskmanager_find()))
+ {
+ if (taskmgr_mb->visibility == E_MOVE_VISIBILITY_STATE_VISIBLE)
+ {
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s %s %s()\n",
+ "EVAS_OBJ","TaskManager is exist.", __func__);
+ return EINA_FALSE;
+ }
+ }
+
+ // if pwlock is exist & visible, then do not show apptray & quickpanel
+ if ((pwlock_mb = e_mod_move_pwlock_find()))
+ {
+ if (pwlock_mb->visibility == E_MOVE_VISIBILITY_STATE_VISIBLE)
+ {
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s %s %s()\n",
+ "EVAS_OBJ","PWLOCK is exist.", __func__);
+ return EINA_FALSE;
+ }
+ }
+
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_indicator_widget_click_get(E_Move_Indicator_Widget* indi_widget)
+{
+ Eina_Bool click = EINA_FALSE;
+ E_Move_Widget_Object *mwo = NULL;
+ Eina_List *l;
+
+ E_CHECK_RETURN(indi_widget, EINA_FALSE);
+ E_CHECK_RETURN(indi_widget->objs, EINA_FALSE);
+
+ EINA_LIST_FOREACH(indi_widget->objs, l, mwo)
+ {
+ if (!mwo) continue;
+ click = e_mod_move_event_click_get(mwo->event);
+ }
+
+ return click;
+}
+
+EINTERN Eina_Bool
+e_mod_move_indicator_widget_event_clear(E_Move_Indicator_Widget* indi_widget)
+{
+ Eina_Bool click = EINA_FALSE;
+ E_Move_Widget_Object *mwo = NULL;
+ Eina_List *l;
+ E_Move_Border *mb = NULL;
+
+ E_CHECK_RETURN(indi_widget, EINA_FALSE);
+ E_CHECK_RETURN(indi_widget->objs, EINA_FALSE);
+
+ click = e_mod_move_indicator_widget_click_get(indi_widget);
+ E_CHECK_RETURN(click, EINA_FALSE);
+
+ EINA_LIST_FOREACH(indi_widget->objs, l, mwo)
+ {
+ if (!mwo) continue;
+ e_mod_move_event_data_clear(mwo->event);
+ e_mod_move_event_click_set(mwo->event, EINA_FALSE);
+ }
+
+ _e_mod_move_indicator_widget_apptray_move_set(indi_widget, EINA_FALSE);
+ _e_mod_move_indicator_widget_quickpanel_move_set(indi_widget, EINA_FALSE);
+
+ mb = e_mod_move_border_client_find(indi_widget->win);
+ if (mb && mb->flick_data) e_mod_move_flick_data_free(mb);
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_indicator_widget_state_change(Ecore_X_Window win, Eina_Bool state)
+{
+ E_Move_Indicator_Widget *indi_widget = NULL;
+ E_Move_Border *mb = NULL;
+
+ if ((indi_widget = e_mod_move_indicator_widget_get()))
+ {
+ if ((indi_widget->win == win)
+ && (!state))
+ {
+ // indicator state disable -> delete current indicator widget
+ e_mod_move_indicator_widget_del(indi_widget);
+ e_mod_move_indicator_widget_set(NULL);
+ }
+ }
+ else
+ {
+ mb = e_mod_move_border_client_find(win);
+ if ((mb)
+ && (mb->indicator_type == E_MOVE_INDICATOR_TYPE_1)
+ && (state))
+ e_mod_move_indicator_widget_apply();
+ }
+
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_indicator_widget_type_change(Ecore_X_Window win, E_Move_Indicator_Type type)
+{
+ E_Move_Indicator_Widget *indi_widget = NULL;
+ E_Move_Border *mb = NULL;
+
+ if ((indi_widget = e_mod_move_indicator_widget_get()))
+ {
+ if ((indi_widget->win == win)
+ && (type != E_MOVE_INDICATOR_TYPE_1))
+ {
+ // indicator type is not type_1 -> delete current indicator widget
+ e_mod_move_indicator_widget_del(indi_widget);
+ e_mod_move_indicator_widget_set(NULL);
+ }
+ }
+ else
+ {
+ mb = e_mod_move_border_client_find(win);
+ if ((mb)
+ && (mb->indicator_state == E_MOVE_INDICATOR_STATE_ON)
+ && (type == E_MOVE_INDICATOR_TYPE_1))
+ e_mod_move_indicator_widget_apply();
+ }
+
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_indicator_widget_angle_change_post_job(void)
+{
+ E_Move_Indicator_Widget *indi_widget = NULL;
+ E_Move_Border *mb = NULL;
+ E_Border *bd = NULL;
+ E_Zone *zone = NULL;
+ int angle = 0;
+ int x = 0, y = 0;
+
+ indi_widget = e_mod_move_indicator_widget_get();
+ E_CHECK_RETURN(indi_widget, EINA_FALSE);
+
+ mb = e_mod_move_border_client_find(indi_widget->win);
+ E_CHECK_RETURN(mb, EINA_FALSE);
+
+ bd = mb->bd;
+ E_CHECK_RETURN(bd, EINA_FALSE);
+
+ zone = bd->zone;
+ E_CHECK_RETURN(zone, EINA_FALSE);
+
+ angle = mb->angle;
+
+ if (e_mod_move_indicator_widget_click_get(indi_widget))
+ {
+ switch (angle)
+ {
+ case 0:
+ x = zone->x;
+ y = zone->y;
+ break;
+ case 90:
+ x = zone->x;
+ y = zone->y;
+ break;
+ case 180:
+ x = zone->x + zone->w;
+ y = zone->y + zone->h;
+ break;
+ case 270:
+ x = zone->x + zone->w;
+ y = zone->y + zone->h;
+ break;
+ default :
+ break;
+ }
+ }
+
+ if (mb->flick_data)
+ e_mod_move_flick_data_init(mb, x, y);
+
+ return EINA_TRUE;
+}
--- /dev/null
+#ifdef E_TYPEDEFS
+#else
+#ifndef E_MOD_MOVE_INDICATOR_WIDGET_H
+#define E_MOD_MOVE_INDICATOR_WIDGET_H
+
+struct _E_Move_Indicator_Widget
+{
+ Eina_List *objs; // list of E_Move_Widget_Object. E_Move_Widget_Object has E_Move_Event.
+ Ecore_X_Window win;
+ Eina_Bool quickpanel_move;
+ Eina_Bool apptray_move;
+ Evas_Point pos; // mouse position
+};
+
+typedef struct _E_Move_Indicator_Widget E_Move_Indicator_Widget;
+
+EINTERN void e_mod_move_indicator_widget_apply(void); // find indicator widget's target window and apply indicator widget control
+EINTERN void e_mod_move_indicator_widget_set(E_Move_Indicator_Widget *indi_widget); // set current indicator widget
+EINTERN E_Move_Indicator_Widget *e_mod_move_indicator_widget_get(void); // get current indicator widget
+EINTERN Eina_Bool e_mod_move_indicator_widget_target_window_find(Ecore_X_Window *win); // find indicator widget target window
+EINTERN E_Move_Indicator_Widget *e_mod_move_indicator_widget_add(Ecore_X_Window win); // create E_Move_Border related Indicator_Widget
+EINTERN void e_mod_move_indicator_widget_del(E_Move_Indicator_Widget *indi_widget); // delete indicator_widget
+EINTERN Eina_Bool e_mod_move_indicator_widget_angle_change(Ecore_X_Window win);
+EINTERN Eina_Bool e_mod_move_indicator_widget_state_change(Ecore_X_Window win, Eina_Bool state);
+EINTERN Eina_Bool e_mod_move_indicator_widget_type_change(Ecore_X_Window win, E_Move_Indicator_Type type);
+EINTERN Eina_Bool e_mod_move_indicator_widget_scrollable_check(void);
+EINTERN Eina_Bool e_mod_move_indicator_widget_click_get(E_Move_Indicator_Widget* indi_widget);
+EINTERN Eina_Bool e_mod_move_indicator_widget_event_clear(E_Move_Indicator_Widget* indi_widget);
+EINTERN Eina_Bool e_mod_move_indicator_widget_angle_change_post_job(void);
+#endif
+#endif
--- /dev/null
+#include "e_mod_move_shared_types.h"
+#include "e_mod_move_debug.h"
+#include "e_mod_move.h"
+
+/* externally accessible functions */
+EINTERN E_Move_Border *
+e_mod_move_lockscreen_find(void)
+{
+ E_Move *m;
+ E_Move_Border *mb;
+
+ m = e_mod_move_util_get();
+ E_CHECK_RETURN(m, 0);
+
+ EINA_INLIST_REVERSE_FOREACH(m->borders, mb)
+ {
+ if (TYPE_LOCKSCREEN_CHECK(mb)) return mb;
+ }
+ return NULL;
+}
+
--- /dev/null
+#ifdef E_TYPEDEFS
+#else
+#ifndef E_MOD_MOVE_LOCKSCREEN_H
+#define E_MOD_MOVE_LOCKSCREEN_H
+
+EINTERN E_Move_Border *e_mod_move_lockscreen_find(void);
+
+#endif
+#endif
--- /dev/null
+#include "e_mod_move_shared_types.h"
+#include "e_mod_move_debug.h"
+#include "e_mod_move_atoms.h"
+#include "e_mod_move.h"
+
+struct _E_Move_Mini_Apptray_Animation_Data
+{
+ Eina_Bool animating;
+ int sx;// start x
+ int sy;// start y
+ int ex;// end x
+ int ey;// end y
+ int dx;// distance x
+ int dy;// distance y
+ Ecore_Animator *animator;
+};
+
+/* local subsystem functions */
+static Eina_Bool _e_mod_move_mini_apptray_cb_motion_start(void *data, void *event_info);
+static Eina_Bool _e_mod_move_mini_apptray_cb_motion_move(void *data, void *event_info);
+static Eina_Bool _e_mod_move_mini_apptray_cb_motion_end(void *data, void *event_info);
+static Eina_Bool _e_mod_move_mini_apptray_objs_position_set(E_Move_Border *mb, int x, int y);
+static Eina_Bool _e_mod_move_mini_apptray_objs_position_get(E_Move_Border *mb, int *x, int *y);
+static Eina_Bool _e_mod_move_mini_apptray_objs_animation_frame(void *data, double pos);
+static Eina_Bool _e_mod_move_mini_apptray_flick_process(E_Move_Border *mb, int angle, Eina_Bool state);
+static Eina_Bool _e_mod_move_mini_apptray_dim_objs_apply(E_Move_Border *mb, int x, int y);
+
+/* local subsystem functions */
+static Eina_Bool
+_e_mod_move_mini_apptray_cb_motion_start(void *data,
+ void *event_info)
+{
+ E_Move_Border *mb = (E_Move_Border *)data;
+ E_Move_Event_Motion_Info *info;
+ E_Move_Control_Object *mco = NULL;
+ Evas_Event_Mouse_Down *mouse_down_event = NULL;
+ Eina_Bool clicked = EINA_FALSE;
+ Eina_List *l;
+ int angle = 0;
+
+ info = (E_Move_Event_Motion_Info *)event_info;
+ if (!mb || !info) return EINA_FALSE;
+
+ mouse_down_event = info->event_info;
+ E_CHECK_RETURN(mouse_down_event, EINA_FALSE);
+ if (mouse_down_event->button != 1)
+ return EINA_FALSE;
+
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco)
+ {
+ if (!mco) continue;
+ clicked = e_mod_move_event_click_get(mco->event);
+ }
+ if (clicked)
+ return EINA_FALSE;
+
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s w:0x%08x %s()\n",
+ "EVAS_OBJ", mb->bd->win, __func__);
+
+ if (e_mod_move_mini_apptray_objs_animation_state_get(mb)) goto error_cleanup;
+
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco)
+ {
+ if (!mco) continue;
+ angle = e_mod_move_event_angle_get(mco->event);
+ }
+ mb->angle = angle;
+
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco)
+ {
+ if (!mco) continue;
+ e_mod_move_event_click_set(mco->event, EINA_TRUE);
+ }
+
+ E_CHECK_GOTO(mb->visible, error_cleanup);
+ if (!REGION_INSIDE_ZONE(mb, mb->bd->zone))
+ goto error_cleanup;
+
+ E_CHECK_GOTO(e_mod_move_flick_data_new(mb), error_cleanup);
+ e_mod_move_flick_data_init(mb, info->coord.x, info->coord.y);
+
+ e_mod_move_mini_apptray_objs_add(mb);
+
+ // mini_apptray_objs_animation_layer_set
+ e_mod_move_mini_apptray_objs_animation_layer_set(mb);
+
+ // send mini_apptray to "move start message".
+ e_mod_move_mini_apptray_anim_state_send(mb, EINA_TRUE);
+ return EINA_TRUE;
+
+error_cleanup:
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco)
+ {
+ if (!mco) continue;
+ e_mod_move_event_click_set(mco->event, EINA_FALSE);
+ }
+ return EINA_FALSE;
+}
+
+static Eina_Bool
+_e_mod_move_mini_apptray_cb_motion_move(void *data,
+ void *event_info)
+{
+ E_Move_Border *mb = (E_Move_Border *)data;
+ E_Move_Event_Motion_Info *info;
+ E_Move_Control_Object *mco = NULL;
+ Eina_List *l;
+ int angle = 0;
+ Eina_Bool click = EINA_FALSE;
+ E_Zone *zone = NULL;
+
+ info = (E_Move_Event_Motion_Info *)event_info;
+ if (!mb || !info) return EINA_FALSE;
+
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s w:0x%08x ,angle:%d, (%d,%d) %s()\n",
+ "EVAS_OBJ", mb->bd->win, mb->angle, info->coord.x, info->coord.y,
+ __func__);
+
+ angle = mb->angle;
+ zone = mb->bd->zone;
+
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco)
+ {
+ if (!mco) continue;
+ click = e_mod_move_event_click_get(mco->event);
+ }
+ E_CHECK_RETURN(click, EINA_FALSE);
+/// change later?
+// todo flick-up
+ switch (angle)
+ {
+ case 0:
+ if (info->coord.y < mb->h)
+ e_mod_move_mini_apptray_objs_move(mb, 0, info->coord.y - mb->h);
+ break;
+ case 90:
+ if (info->coord.x < mb->w)
+ e_mod_move_mini_apptray_objs_move(mb, info->coord.x - mb->w, 0);
+ break;
+ case 180:
+ if (info->coord.y > (zone->h - mb->h))
+ e_mod_move_mini_apptray_objs_move(mb, 0, info->coord.y);
+ break;
+ case 270:
+ if (info->coord.x > (zone->w - mb->w))
+ e_mod_move_mini_apptray_objs_move(mb, info->coord.x, 0);
+ break;
+ default :
+ break;
+ }
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_mini_apptray_cb_motion_end(void *data,
+ void *event_info)
+{
+ E_Move_Border *mb = (E_Move_Border *)data;
+ E_Move_Event_Motion_Info *info;
+ E_Move_Control_Object *mco = NULL;
+ Eina_List *l;
+ int angle = 0;
+ E_Zone *zone = NULL;
+ Eina_Bool click = EINA_FALSE;
+ Eina_Bool flick_state = EINA_FALSE;
+ Evas_Event_Mouse_Up *mouse_up_event;
+ int check_w, check_h;
+
+ info = (E_Move_Event_Motion_Info *)event_info;
+ if (!mb || !info) return EINA_FALSE;
+
+ mouse_up_event = info->event_info;
+ E_CHECK_RETURN(mouse_up_event, EINA_FALSE);
+ if (mouse_up_event->button != 1)
+ return EINA_FALSE;
+
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s w:0x%08x ,angle:%d, (%d,%d) %s()\n",
+ "EVAS_OBJ", mb->bd->win, mb->angle, info->coord.x, info->coord.y,
+ __func__);
+
+ angle = mb->angle;
+ zone = mb->bd->zone;
+
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco)
+ {
+ if (!mco) continue;
+ click = e_mod_move_event_click_get(mco->event);
+ }
+ E_CHECK_GOTO(click, finish);
+
+ e_mod_move_flick_data_update(mb, info->coord.x, info->coord.y);
+ flick_state = e_mod_move_flick_state_get(mb, EINA_FALSE);
+ if (_e_mod_move_mini_apptray_flick_process(mb, angle, flick_state))
+ {
+ return EINA_TRUE;
+ }
+
+ switch (angle)
+ {
+ // change later
+ // todo flick-up
+ case 0:
+ check_h = mb->y + mb->h;
+ if (check_h) check_h /= 2;
+ if (info->coord.y < check_h)
+ {
+ e_mod_move_mini_apptray_e_border_move(mb, 0, mb->h * -1);
+ e_mod_move_mini_apptray_objs_animation_move(mb, 0, mb->h * -1);
+ }
+ else
+ {
+ e_mod_move_mini_apptray_objs_animation_move(mb, 0, 0);
+ }
+ break;
+ case 90:
+ check_w = mb->w;
+ if (check_w) check_w /= 2;
+ if (info->coord.x < check_w)
+ {
+ e_mod_move_mini_apptray_e_border_move(mb, mb->w * -1, 0);
+ e_mod_move_mini_apptray_objs_animation_move(mb, mb->w * -1, 0);
+ }
+ else
+ {
+ e_mod_move_mini_apptray_objs_animation_move(mb, 0, 0);
+ }
+ break;
+ case 180:
+ check_h = mb->h;
+ if (check_h) check_h /= 2;
+ if (info->coord.y > (zone->h - check_h))
+ {
+ e_mod_move_mini_apptray_e_border_move(mb, 0, zone->h);
+ e_mod_move_mini_apptray_objs_animation_move(mb, 0, zone->h);
+ }
+ else
+ {
+ e_mod_move_mini_apptray_objs_animation_move(mb, 0, (zone->h - mb->h));
+ }
+ break;
+ case 270:
+ check_w = mb->w;
+ if (check_w) check_w /= 2;
+ if (info->coord.x > (zone->w - check_w))
+ {
+ e_mod_move_mini_apptray_e_border_move(mb, zone->w, 0);
+ e_mod_move_mini_apptray_objs_animation_move(mb, zone->w, 0);
+ }
+ else
+ {
+ e_mod_move_mini_apptray_objs_animation_move(mb, zone->w - mb->w, 0);
+ }
+ break;
+ default :
+ break;
+ }
+
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco)
+ {
+ if (!mco) continue;
+ e_mod_move_event_click_set(mco->event, EINA_FALSE);
+ }
+
+finish:
+ if (mb->flick_data) e_mod_move_flick_data_free(mb);
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_mini_apptray_objs_position_set(E_Move_Border *mb,
+ int x,
+ int y)
+{
+ E_Move_Mini_Apptray_Data *mini_apptray_data = NULL;
+ mini_apptray_data = (E_Move_Mini_Apptray_Data *)mb->data;
+ if (!mini_apptray_data)
+ mini_apptray_data = (E_Move_Mini_Apptray_Data *)e_mod_move_mini_apptray_internal_data_add(mb);
+ E_CHECK_RETURN(mini_apptray_data, EINA_FALSE);
+
+ mini_apptray_data->x = x;
+ mini_apptray_data->y = y;
+ mb->data = mini_apptray_data;
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_mini_apptray_objs_position_get(E_Move_Border *mb,
+ int *x,
+ int *y)
+{
+ E_Move_Mini_Apptray_Data *mini_apptray_data = NULL;
+ mini_apptray_data = (E_Move_Mini_Apptray_Data *)mb->data;
+ E_CHECK_RETURN(mini_apptray_data, EINA_FALSE);
+
+ *x = mini_apptray_data->x;
+ *y = mini_apptray_data->y;
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_mini_apptray_objs_animation_frame(void *data,
+ double pos)
+{
+ E_Move_Mini_Apptray_Animation_Data *anim_data = NULL;
+ E_Move_Border *mb = NULL;
+ double frame = pos;
+ int x, y;
+
+ anim_data = (E_Move_Mini_Apptray_Animation_Data *)data;
+ E_CHECK_RETURN(anim_data, EINA_FALSE);
+
+ mb = e_mod_move_mini_apptray_find();
+ E_CHECK_RETURN(mb, EINA_FALSE);
+
+ frame = ecore_animator_pos_map(pos, ECORE_POS_MAP_ACCELERATE, 0.0, 0.0);
+ x = anim_data->sx + anim_data->dx * frame;
+ y = anim_data->sy + anim_data->dy * frame;
+
+ e_mod_move_mini_apptray_objs_move(mb, x, y);
+
+ if (pos >= 1.0)
+ {
+ // mini_apptray_objs_animation_layer_unset
+ e_mod_move_mini_apptray_objs_animation_layer_unset(mb);
+
+ if (!(REGION_INSIDE_ZONE(mb, mb->bd->zone)))
+ {
+ e_border_focus_set(mb->bd, 0, 0);
+ e_border_lower(mb->bd);
+ e_mod_move_mini_apptray_dim_hide(mb);
+ }
+
+ // send mini_apptray to "move end message".
+ e_mod_move_mini_apptray_anim_state_send(mb, EINA_FALSE);
+
+ e_mod_move_mini_apptray_objs_del(mb);
+
+ memset(anim_data, 0, sizeof(E_Move_Mini_Apptray_Animation_Data));
+ E_FREE(anim_data);
+ mb->anim_data = NULL;
+ }
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_mini_apptray_flick_process(E_Move_Border *mb,
+ int angle,
+ Eina_Bool state)
+{
+ E_Move_Control_Object *mco = NULL;
+ E_Zone *zone = NULL;
+ Eina_List *l;
+ int x, y;
+
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_MINI_APPTRAY_CHECK(mb), EINA_FALSE);
+ E_CHECK_RETURN(state, EINA_FALSE);
+
+ zone = mb->bd->zone;
+
+ /* mini_apptray click unset */
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco)
+ {
+ if (!mco) continue;
+ e_mod_move_event_click_set(mco->event, EINA_FALSE);
+ }
+
+ e_mod_move_flick_data_free(mb);
+// change later
+// doto flick-up
+ switch (angle)
+ {
+ case 90: x = mb->w * -1; y = 0; break;
+ case 180: x = 0; y = zone->h; break;
+ case 270: x = zone->w; y = 0; break;
+ case 0:
+ default : x = 0; y = mb->h * -1; break;
+ }
+
+ e_mod_move_mini_apptray_e_border_move(mb, x, y);
+ e_mod_move_mini_apptray_objs_animation_move(mb, x, y);
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_mini_apptray_dim_objs_apply(E_Move_Border *mb,
+ int x,
+ int y)
+{
+ int angle;
+ int mx, my;
+ int opacity;
+ E_Zone *zone = NULL;
+ int dim_max = 255;
+ E_Move_Mini_Apptray_Data *mini_apptray_data = NULL;
+
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_MINI_APPTRAY_CHECK(mb), EINA_FALSE);
+ E_CHECK_RETURN(mb->data, EINA_FALSE);
+
+ mini_apptray_data = (E_Move_Mini_Apptray_Data *)mb->data;
+ E_CHECK_RETURN(mini_apptray_data->dim_objs, EINA_FALSE);
+
+ angle = mb->angle;
+ zone = mb->bd->zone;
+ dim_max = mb->m->dim_max_opacity;
+
+ switch (angle)
+ {
+ case 90:
+ mx = zone->w - x;
+ if (mb->w)
+ opacity = dim_max * mx / mb->w;
+ else
+ opacity = dim_max;
+ break;
+ case 180:
+ my = y + mb->h;
+ if (mb->h)
+ opacity = dim_max * my / mb->h;
+ else
+ opacity = dim_max;
+ break;
+ case 270:
+ mx = x + mb->w;
+ if (mb->w)
+ opacity = dim_max * mx / mb->w;
+ else
+ opacity = dim_max;
+ break;
+ case 0:
+ default :
+ my = zone->h - y;
+ if (mb->h)
+ opacity = dim_max * my / mb->h;
+ else
+ opacity = dim_max;
+ break;
+ }
+
+ e_mod_move_bd_move_dim_objs_opacity_set(mini_apptray_data->dim_objs, opacity);
+ mini_apptray_data->opacity = opacity;
+ return EINA_TRUE;
+}
+
+/* externally accessible functions */
+EINTERN void
+e_mod_move_mini_apptray_ctl_obj_event_setup(E_Move_Border *mb,
+ E_Move_Control_Object *mco)
+{
+ E_CHECK(mb);
+ E_CHECK(mco);
+ E_CHECK(TYPE_MINI_APPTRAY_CHECK(mb));
+
+ mco->event = e_mod_move_event_new(mb->bd->client.win, mco->obj);
+ E_CHECK(mco->event);
+
+ e_mod_move_event_data_type_set(mco->event, E_MOVE_EVENT_DATA_TYPE_BORDER);
+ e_mod_move_event_angle_cb_set(mco->event,
+ e_mod_move_util_win_prop_angle_get);
+ e_mod_move_event_cb_set(mco->event, E_MOVE_EVENT_TYPE_MOTION_START,
+ _e_mod_move_mini_apptray_cb_motion_start, mb);
+ e_mod_move_event_cb_set(mco->event, E_MOVE_EVENT_TYPE_MOTION_MOVE,
+ _e_mod_move_mini_apptray_cb_motion_move, mb);
+ e_mod_move_event_cb_set(mco->event, E_MOVE_EVENT_TYPE_MOTION_END,
+ _e_mod_move_mini_apptray_cb_motion_end, mb);
+ e_mod_move_event_send_all_set(mco->event, EINA_TRUE);
+}
+
+EINTERN E_Move_Border *
+e_mod_move_mini_apptray_find(void)
+{
+ E_Move *m;
+ E_Move_Border *mb;
+
+ m = e_mod_move_util_get();
+ E_CHECK_RETURN(m, 0);
+
+ EINA_INLIST_REVERSE_FOREACH(m->borders, mb)
+ {
+ if (TYPE_MINI_APPTRAY_CHECK(mb)) return mb;
+ }
+ return NULL;
+}
+
+EINTERN Eina_Bool
+e_mod_move_mini_apptray_click_get(void)
+{
+ E_Move_Border *mb = NULL;
+ Eina_Bool click = EINA_FALSE;
+ E_Move_Control_Object *mco = NULL;
+ Eina_List *l;
+
+ mb = e_mod_move_mini_apptray_find();
+ E_CHECK_RETURN(mb, EINA_FALSE);
+
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco)
+ {
+ if (!mco) continue;
+ click = e_mod_move_event_click_get(mco->event);
+ }
+
+ return click;
+}
+
+EINTERN Eina_Bool
+e_mod_move_mini_apptray_event_clear(void)
+{
+ E_Move_Border *mb = NULL;
+ Eina_Bool click = EINA_FALSE;
+ E_Move_Control_Object *mco = NULL;
+ Eina_List *l;
+
+ mb = e_mod_move_mini_apptray_find();
+ E_CHECK_RETURN(mb, EINA_FALSE);
+
+ click = e_mod_move_mini_apptray_click_get();
+ E_CHECK_RETURN(click, EINA_FALSE);
+
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco)
+ {
+ if (!mco) continue;
+ e_mod_move_event_data_clear(mco->event);
+ e_mod_move_event_click_set(mco->event, EINA_FALSE);
+ }
+
+ if (mb->flick_data) e_mod_move_flick_data_free(mb);
+
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_mini_apptray_objs_add(E_Move_Border *mb)
+{
+ Eina_Bool mirror = EINA_TRUE;
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_MINI_APPTRAY_CHECK(mb), EINA_FALSE);
+
+ if (!(mb->objs))
+ {
+ mb->objs = e_mod_move_bd_move_objs_add(mb, mirror);
+ e_mod_move_bd_move_objs_move(mb, mb->x, mb->y);
+ e_mod_move_bd_move_objs_resize(mb, mb->w, mb->h);
+ e_mod_move_bd_move_objs_show(mb);
+ }
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_mini_apptray_objs_del(E_Move_Border *mb)
+{
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_MINI_APPTRAY_CHECK(mb), EINA_FALSE);
+ e_mod_move_bd_move_objs_del(mb, mb->objs);
+ mb->objs = NULL;
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_mini_apptray_objs_move(E_Move_Border *mb,
+ int x,
+ int y)
+{
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_MINI_APPTRAY_CHECK(mb), EINA_FALSE);
+
+ e_mod_move_bd_move_objs_move(mb, x, y);
+ _e_mod_move_mini_apptray_objs_position_set(mb, x, y);
+ _e_mod_move_mini_apptray_dim_objs_apply(mb, x, y);
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_mini_apptray_objs_raise(E_Move_Border *mb)
+{
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_MINI_APPTRAY_CHECK(mb), EINA_FALSE);
+ e_mod_move_bd_move_objs_raise(mb);
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_mini_apptray_objs_animation_move(E_Move_Border *mb,
+ int x,
+ int y)
+{
+ E_Move_Mini_Apptray_Animation_Data *anim_data = NULL;
+ Ecore_Animator *animator = NULL;
+ int sx, sy; //start x, start y
+ double anim_time = 0.0;
+
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_MINI_APPTRAY_CHECK(mb), EINA_FALSE);
+ E_CHECK_RETURN(mb->m, EINA_FALSE);
+ anim_time = mb->m->animation_duration;
+
+ if (e_mod_move_mini_apptray_objs_animation_state_get(mb))
+ {
+ e_mod_move_mini_apptray_objs_animation_stop(mb);
+ e_mod_move_mini_apptray_objs_animation_clear(mb);
+ }
+
+ anim_data = E_NEW(E_Move_Mini_Apptray_Animation_Data, 1);
+ E_CHECK_RETURN(anim_data, EINA_FALSE);
+
+ if (_e_mod_move_mini_apptray_objs_position_get(mb, &sx, &sy))
+ {
+ anim_data->sx = sx;
+ anim_data->sy = sy;
+ }
+ else
+ {
+ anim_data->sx = mb->x;
+ anim_data->sy = mb->y;
+ _e_mod_move_mini_apptray_objs_position_set(mb,
+ anim_data->sx,
+ anim_data->sy);
+ }
+
+ anim_data->ex = x;
+ anim_data->ey = y;
+ anim_data->dx = anim_data->ex - anim_data->sx;
+ anim_data->dy = anim_data->ey - anim_data->sy;
+ animator = ecore_animator_timeline_add(anim_time,
+ _e_mod_move_mini_apptray_objs_animation_frame,
+ anim_data);
+ if (!animator)
+ {
+ memset(anim_data, 0, sizeof(E_Move_Mini_Apptray_Animation_Data));
+ E_FREE(anim_data);
+ return EINA_FALSE;
+ }
+
+ anim_data->animator = animator;
+ anim_data->animating = EINA_TRUE;
+ mb->anim_data = anim_data;
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_mini_apptray_objs_animation_state_get(E_Move_Border *mb)
+{
+ E_Move_Mini_Apptray_Animation_Data *anim_data = NULL;
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_MINI_APPTRAY_CHECK(mb), EINA_FALSE);
+
+ E_CHECK_RETURN(mb->anim_data, EINA_FALSE);
+ anim_data = (E_Move_Mini_Apptray_Animation_Data *)mb->anim_data;
+ E_CHECK_RETURN(anim_data->animating, EINA_FALSE);
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_mini_apptray_objs_animation_stop(E_Move_Border *mb)
+{
+ E_Move_Mini_Apptray_Animation_Data *anim_data = NULL;
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_MINI_APPTRAY_CHECK(mb), EINA_FALSE);
+
+ E_CHECK_RETURN(mb->anim_data, EINA_FALSE);
+ anim_data = (E_Move_Mini_Apptray_Animation_Data *)mb->anim_data;
+ ecore_animator_freeze(anim_data->animator);
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_mini_apptray_objs_animation_clear(E_Move_Border *mb)
+{
+ E_Move_Mini_Apptray_Animation_Data *anim_data = NULL;
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_MINI_APPTRAY_CHECK(mb), EINA_FALSE);
+
+ E_CHECK_RETURN(mb->anim_data, EINA_FALSE);
+ anim_data = (E_Move_Mini_Apptray_Animation_Data *)mb->anim_data;
+ ecore_animator_del(anim_data->animator);
+ memset(anim_data, 0, sizeof(E_Move_Mini_Apptray_Animation_Data));
+ E_FREE(anim_data);
+ mb->anim_data = NULL;
+
+ return EINA_TRUE;
+}
+
+EINTERN void*
+e_mod_move_mini_apptray_internal_data_add(E_Move_Border *mb)
+{
+ E_Move_Mini_Apptray_Data *mini_apptray_data = NULL;
+ int dim_min = 0;
+ E_CHECK_RETURN(mb, NULL);
+ E_CHECK_RETURN(TYPE_MINI_APPTRAY_CHECK(mb), NULL);
+ E_CHECK_RETURN(mb->m, NULL);
+ mini_apptray_data = (E_Move_Mini_Apptray_Data *)mb->data;
+ dim_min = mb->m->dim_min_opacity;
+ if (!mini_apptray_data)
+ {
+ mini_apptray_data = E_NEW(E_Move_Mini_Apptray_Data, 1);
+ E_CHECK_RETURN(mini_apptray_data, NULL);
+ mini_apptray_data->x = mb->x;
+ mini_apptray_data->y = mb->y;
+ mini_apptray_data->dim_objs = NULL;
+ mini_apptray_data->opacity = dim_min;
+ mb->data = mini_apptray_data;
+ }
+ return mb->data;
+}
+
+EINTERN Eina_Bool
+e_mod_move_mini_apptray_internal_data_del(E_Move_Border *mb)
+{
+ E_Move_Mini_Apptray_Data *mini_apptray_data = NULL;
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_MINI_APPTRAY_CHECK(mb), EINA_FALSE);
+ E_CHECK_RETURN(mb->data, EINA_FALSE);
+ mini_apptray_data = (E_Move_Mini_Apptray_Data *)mb->data;
+ e_mod_move_mini_apptray_dim_hide(mb);
+ E_FREE(mini_apptray_data);
+ mb->data = NULL;
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_mini_apptray_e_border_move(E_Move_Border *mb,
+ int x,
+ int y)
+{
+ E_Zone *zone;
+
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_MINI_APPTRAY_CHECK(mb), EINA_FALSE);
+ E_CHECK_RETURN(mb->bd, EINA_FALSE);
+
+ zone = mb->bd->zone;
+
+ /* check whether zone contains border */
+ if (E_CONTAINS(zone->x, zone->y,
+ zone->w, zone->h,
+ x, y, mb->w, mb->h))
+ {
+ e_border_raise(mb->bd);
+ e_border_focus_set(mb->bd, 1, 1);
+ }
+ else
+ {
+ e_border_focus_set(mb->bd, 0, 0);
+ }
+
+ e_border_move(mb->bd, x, y);
+
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_mini_apptray_e_border_raise(E_Move_Border *mb)
+{
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_MINI_APPTRAY_CHECK(mb), EINA_FALSE);
+
+ e_border_raise(mb->bd);
+
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_mini_apptray_e_border_lower(E_Move_Border *mb)
+{
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_MINI_APPTRAY_CHECK(mb), EINA_FALSE);
+
+ e_border_lower(mb->bd);
+
+ return EINA_TRUE;
+}
+
+EINTERN Eina_List*
+e_mod_move_mini_apptray_dim_show(E_Move_Border *mb)
+{
+ int dim_min = 0;
+ E_Move_Mini_Apptray_Data *mini_apptray_data = NULL;
+ E_CHECK_RETURN(mb, NULL);
+ E_CHECK_RETURN(TYPE_MINI_APPTRAY_CHECK(mb), NULL);
+ E_CHECK_RETURN(mb->m, NULL);
+ mini_apptray_data = (E_Move_Mini_Apptray_Data *)mb->data;
+ dim_min = mb->m->dim_min_opacity;
+ if (!mini_apptray_data)
+ {
+ mini_apptray_data = E_NEW(E_Move_Mini_Apptray_Data, 1);
+ E_CHECK_RETURN(mini_apptray_data, NULL);
+ // Composite mode set true
+ e_mod_move_util_compositor_composite_mode_set(mb->m, EINA_TRUE);
+
+ mini_apptray_data->x = mb->x;
+ mini_apptray_data->y = mb->y;
+ mini_apptray_data->dim_objs = e_mod_move_bd_move_dim_objs_add(mb);
+ e_mod_move_bd_move_dim_objs_show(mini_apptray_data->dim_objs);
+ mini_apptray_data->opacity = dim_min;
+ mb->data = mini_apptray_data;
+ e_mod_move_util_rotation_lock(mb->m);
+ }
+ else
+ {
+ if (!(mini_apptray_data->dim_objs))
+ {
+ // Composite mode set true
+ e_mod_move_util_compositor_composite_mode_set(mb->m, EINA_TRUE);
+
+ mini_apptray_data->dim_objs = e_mod_move_bd_move_dim_objs_add(mb);
+ if (mini_apptray_data->dim_objs)
+ e_mod_move_util_rotation_lock(mb->m);
+ }
+ if (mini_apptray_data->dim_objs)
+ {
+ e_mod_move_bd_move_dim_objs_show(mini_apptray_data->dim_objs);
+ mini_apptray_data->opacity = dim_min;
+ }
+ }
+
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s w:0x%08x %s()\n",
+ "EVAS_OBJ", mb->bd->win, __func__);
+
+ return mini_apptray_data->dim_objs;
+}
+
+EINTERN Eina_Bool
+e_mod_move_mini_apptray_dim_hide(E_Move_Border *mb)
+{
+ int dim_min = 0;
+ E_Move_Mini_Apptray_Data *mini_apptray_data = NULL;
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_MINI_APPTRAY_CHECK(mb), EINA_FALSE);
+ E_CHECK_RETURN(mb->m, EINA_FALSE);
+ E_CHECK_RETURN(mb->data, EINA_FALSE);
+ mini_apptray_data = (E_Move_Mini_Apptray_Data *)mb->data;
+ dim_min = mb->m->dim_min_opacity;
+ E_CHECK_RETURN(mini_apptray_data->dim_objs, EINA_FALSE);
+ e_mod_move_bd_move_dim_objs_hide(mini_apptray_data->dim_objs);
+ e_mod_move_bd_move_dim_objs_del(mini_apptray_data->dim_objs);
+ mini_apptray_data->dim_objs = NULL;
+ mini_apptray_data->opacity = dim_min;
+
+ e_mod_move_util_rotation_unlock(mb->m);
+
+ // Composite mode set false
+ e_mod_move_util_compositor_composite_mode_set(mb->m, EINA_FALSE);
+
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s w:0x%08x %s()\n",
+ "EVAS_OBJ", ((mb->bd) ? mb->bd->win : NULL), __func__);
+
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_mini_apptray_objs_animation_start_position_set(E_Move_Border *mb,
+ int angle)
+{
+ E_Zone *zone;
+ int x, y;
+
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_MINI_APPTRAY_CHECK(mb), EINA_FALSE);
+
+ angle = ((angle % 360) / 90) * 90;
+ zone = mb->bd->zone;
+// change later
+// todo flick-up position
+ switch (angle)
+ {
+ case 90: x = zone->x + zone->w; y = 0; break;
+ case 180: x = 0; y = mb->h * -1; break;
+ case 270: x = mb->w * -1; y = 0; break;
+ case 0:
+ default : x = 0; y = zone->y + zone->h; break;
+ }
+
+ _e_mod_move_mini_apptray_objs_position_set(mb, x, y);
+
+ return EINA_TRUE;
+}
+
+EINTERN E_Move_Event_Cb
+e_mod_move_mini_apptray_event_cb_get(E_Move_Event_Type type)
+{
+ if (type == E_MOVE_EVENT_TYPE_MOTION_START)
+ return _e_mod_move_mini_apptray_cb_motion_start;
+ else if (type == E_MOVE_EVENT_TYPE_MOTION_MOVE)
+ return _e_mod_move_mini_apptray_cb_motion_move;
+ else if (type == E_MOVE_EVENT_TYPE_MOTION_END)
+ return _e_mod_move_mini_apptray_cb_motion_end;
+ else
+ return NULL;
+}
+
+EINTERN Eina_Bool
+e_mod_move_mini_apptray_anim_state_send(E_Move_Border *mb,
+ Eina_Bool state)
+{
+ long d[5] = {0L, 0L, 0L, 0L, 0L};
+ Ecore_X_Window win;
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_MINI_APPTRAY_CHECK(mb), EINA_FALSE);
+
+ win = e_mod_move_util_client_xid_get(mb);
+ E_CHECK_RETURN(win, 0);
+
+ if (state) d[0] = 1L;
+ else d[0] = 0L;
+
+ ecore_x_client_message32_send
+ (win, ATOM_MV_MINI_APPTRAY_STATE,
+ ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
+ d[0], d[1], d[2], d[3], d[4]);
+
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_mini_apptray_objs_animation_layer_set(E_Move_Border *mb)
+{
+ E_Move *m = e_mod_move_util_get();
+ E_Move_Border *find_mb = NULL;
+ E_Move_Border *state_above_mb = NULL;
+ Ecore_X_Window win;
+ Eina_Bool found = EINA_FALSE;
+ E_Move_Mini_Apptray_Data *mini_apptray_data = NULL;
+
+ E_CHECK_RETURN(m, EINA_FALSE);
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_MINI_APPTRAY_CHECK(mb), EINA_FALSE);
+
+ mini_apptray_data = (E_Move_Mini_Apptray_Data *)mb->data;
+ E_CHECK_RETURN(mini_apptray_data, EINA_FALSE);
+
+ mini_apptray_data->animation_layer_info.state_above.layer_set = EINA_FALSE;
+ mini_apptray_data->animation_layer_info.state_above.win = 0;
+
+ EINA_INLIST_REVERSE_FOREACH(m->borders, find_mb)
+ {
+ if (find_mb->bd
+ && (find_mb->bd->layer == e_mod_move_util_layer_policy_get(E_MOVE_STATE_ABOVE_LAYER))
+ && (find_mb->visible))
+ {
+ win = find_mb->bd->client.win;
+ found = EINA_TRUE;
+ }
+
+ if (find_mb->bd
+ && (find_mb->bd->layer < e_mod_move_util_layer_policy_get(E_MOVE_STATE_ABOVE_LAYER)))
+ {
+ break;
+ }
+ }
+
+ if (found)
+ {
+ mini_apptray_data->animation_layer_info.state_above.layer_set = EINA_TRUE;
+ mini_apptray_data->animation_layer_info.state_above.win = win;
+ state_above_mb = e_mod_move_border_client_find(win);
+ if (state_above_mb
+ && !(state_above_mb->objs))
+ {
+ state_above_mb->objs = e_mod_move_bd_move_objs_add(state_above_mb, EINA_TRUE);
+ e_mod_move_bd_move_objs_move(state_above_mb, state_above_mb->x, state_above_mb->y);
+ e_mod_move_bd_move_objs_resize(state_above_mb, state_above_mb->w, state_above_mb->h);
+ e_mod_move_bd_move_objs_show(state_above_mb);
+ }
+
+ // mini_apptray mirror object stack below to state_above object .
+ e_mod_move_bd_move_objs_stack_below(mb, state_above_mb); // mb : mini_apptray move border
+ }
+ else
+ {
+ e_mod_move_mini_apptray_objs_raise(mb);
+ }
+
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_mini_apptray_objs_animation_layer_unset(E_Move_Border *mb)
+{
+ E_Move_Border *state_above_mb = NULL;
+ E_Move_Mini_Apptray_Data *mini_apptray_data = NULL;
+ Ecore_X_Window win;
+
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_MINI_APPTRAY_CHECK(mb), EINA_FALSE);
+
+ mini_apptray_data = (E_Move_Mini_Apptray_Data *)mb->data;
+ E_CHECK_RETURN(mini_apptray_data, EINA_FALSE);
+
+ if (mini_apptray_data->animation_layer_info.state_above.layer_set)
+ {
+ win = mini_apptray_data->animation_layer_info.state_above.win;
+ if ((state_above_mb = e_mod_move_border_client_find(win))
+ && (!state_above_mb->animate_move))
+ {
+ e_mod_move_bd_move_objs_del(state_above_mb, state_above_mb->objs);
+ state_above_mb->objs = NULL;
+ }
+ }
+
+ mini_apptray_data->animation_layer_info.state_above.layer_set = EINA_FALSE;
+ mini_apptray_data->animation_layer_info.state_above.win = 0;
+
+ return EINA_TRUE;
+}
--- /dev/null
+#ifdef E_TYPEDEFS
+#else
+#ifndef E_MOD_MOVE_MINI_APPTRAY_H
+#define E_MOD_MOVE_MINI_APPTRAY_H
+
+struct _E_Move_Mini_Apptray_Data
+{
+ int x; // current move x position
+ int y; // current move y position
+ Eina_List *dim_objs; // dim evas_obj
+ int opacity; // current dim opacity
+
+ struct {
+ struct {
+ Eina_Bool layer_set;
+ } indicator;
+ struct {
+ Eina_Bool layer_set;
+ Ecore_X_Window win; // multi window's lowest window id. mirror object is made by this window id. for mini_apptay mirror object stack set.
+ } state_above; //if multi window exist, then state_above value set true.
+ } animation_layer_info;
+};
+
+typedef struct _E_Move_Mini_Apptray_Data E_Move_Mini_Apptray_Data;
+typedef struct _E_Move_Mini_Apptray_Animation_Data E_Move_Mini_Apptray_Animation_Data;
+
+EINTERN void e_mod_move_mini_apptray_ctl_obj_event_setup(E_Move_Border *mb, E_Move_Control_Object *mco);
+EINTERN E_Move_Border *e_mod_move_mini_apptray_find(void);
+EINTERN Eina_Bool e_mod_move_mini_apptray_click_get(void);
+EINTERN Eina_Bool e_mod_move_mini_apptray_event_clear(void);
+EINTERN Eina_Bool e_mod_move_mini_apptray_objs_add(E_Move_Border *mb);
+EINTERN Eina_Bool e_mod_move_mini_apptray_objs_del(E_Move_Border *mb);
+EINTERN Eina_Bool e_mod_move_mini_apptray_objs_move(E_Move_Border *mb, int x, int y);
+EINTERN Eina_Bool e_mod_move_mini_apptray_objs_raise(E_Move_Border *mb);
+EINTERN Eina_Bool e_mod_move_mini_apptray_objs_animation_move(E_Move_Border *mb, int x, int y);
+EINTERN Eina_Bool e_mod_move_mini_apptray_objs_animation_state_get(E_Move_Border *mb);
+EINTERN Eina_Bool e_mod_move_mini_apptray_objs_animation_stop(E_Move_Border *mb);
+EINTERN Eina_Bool e_mod_move_mini_apptray_objs_animation_clear(E_Move_Border *mb);
+EINTERN void* e_mod_move_mini_apptray_internal_data_add(E_Move_Border *mb);
+EINTERN Eina_Bool e_mod_move_mini_apptray_internal_data_del(E_Move_Border *mb);
+EINTERN Eina_Bool e_mod_move_mini_apptray_e_border_move(E_Move_Border *mb, int x, int y);
+EINTERN Eina_Bool e_mod_move_mini_apptray_e_border_raise(E_Move_Border *mb);
+EINTERN Eina_Bool e_mod_move_mini_apptray_e_border_lower(E_Move_Border *mb);
+EINTERN Eina_List* e_mod_move_mini_apptray_dim_show(E_Move_Border *mb);
+EINTERN Eina_Bool e_mod_move_mini_apptray_dim_hide(E_Move_Border *mb);
+EINTERN Eina_Bool e_mod_move_mini_apptray_objs_animation_start_position_set(E_Move_Border *mb, int angle);
+EINTERN E_Move_Event_Cb e_mod_move_mini_apptray_event_cb_get(E_Move_Event_Type type);
+EINTERN Eina_Bool e_mod_move_mini_apptray_anim_state_send(E_Move_Border *mb, Eina_Bool state);
+EINTERN Eina_Bool e_mod_move_mini_apptray_objs_animation_layer_set(E_Move_Border *mb);
+EINTERN Eina_Bool e_mod_move_mini_apptray_objs_animation_layer_unset(E_Move_Border *mb);
+
+#endif
+#endif
--- /dev/null
+#include "e_mod_move_shared_types.h"
+#include "e_mod_move_debug.h"
+#include "e_mod_move.h"
+
+/* local subsystem functions */
+static Eina_Bool _e_mod_move_mini_apptray_widget_mini_apptray_move_set(E_Move_Mini_Apptray_Widget *mini_apptray_widget, Eina_Bool state);
+static Eina_Bool _e_mod_move_mini_apptray_widget_mini_apptray_move_get(E_Move_Mini_Apptray_Widget *mini_apptray_widget);
+static Eina_Bool _e_mod_move_mini_apptray_widget_cb_motion_start_internal_mini_apptray_check(E_Move_Border *mini_apptray_mb);
+static Eina_Bool _e_mod_move_mini_apptray_widget_mini_apptray_flick_process(E_Move_Mini_Apptray_Widget *mini_apptray_widget, E_Move_Border *mb2, int angle, Eina_Bool state);
+static Eina_Bool _e_mod_move_mini_apptray_widget_cb_motion_start(void *data, void *event_info);
+static Eina_Bool _e_mod_move_mini_apptray_widget_cb_motion_move(void *data, void *event_info);
+static Eina_Bool _e_mod_move_mini_apptray_widget_cb_motion_end(void *data, void *event_info);
+static void _e_mod_move_mini_apptray_widget_obj_event_setup(E_Move_Mini_Apptray_Widget *mini_apptray_widget, E_Move_Widget_Object *mwo);
+
+/* local subsystem functions */
+static Eina_Bool
+_e_mod_move_mini_apptray_widget_mini_apptray_move_set(E_Move_Mini_Apptray_Widget *mini_apptray_widget,
+ Eina_Bool state)
+{
+ E_CHECK_RETURN(mini_apptray_widget, EINA_FALSE);
+ mini_apptray_widget->mini_apptray_move = state;
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_mini_apptray_widget_mini_apptray_move_get(E_Move_Mini_Apptray_Widget *mini_apptray_widget)
+{
+ E_CHECK_RETURN(mini_apptray_widget, EINA_FALSE);
+ return mini_apptray_widget->mini_apptray_move;
+}
+
+static Eina_Bool
+_e_mod_move_mini_apptray_widget_cb_motion_start_internal_mini_apptray_check(E_Move_Border *mini_apptray_mb)
+{
+ E_Move *m;
+ E_Move_Border *find_mb = NULL;
+ Eina_Bool found = EINA_FALSE;
+ m = e_mod_move_util_get();
+
+ E_CHECK_RETURN(m, EINA_FALSE);
+ E_CHECK_RETURN(mini_apptray_mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_MINI_APPTRAY_CHECK(mini_apptray_mb), EINA_FALSE);
+ E_CHECK_RETURN(mini_apptray_mb->visible, EINA_FALSE);
+ E_CHECK_RETURN(e_mod_move_util_compositor_object_visible_get(mini_apptray_mb),
+ EINA_FALSE);
+ if (e_mod_move_mini_apptray_objs_animation_state_get(mini_apptray_mb)) return EINA_FALSE;
+
+ // check if notification window is on-screen.
+ EINA_INLIST_REVERSE_FOREACH(m->borders, find_mb)
+ {
+ if (TYPE_INDICATOR_CHECK(find_mb)) continue;
+ if (find_mb->visible
+ && REGION_INTERSECTS_WITH_ZONE(find_mb, mini_apptray_mb->bd->zone))
+ {
+ found = EINA_TRUE;
+ break;
+ }
+ }
+ if (found
+ && (find_mb->bd->client.netwm.type == ECORE_X_WINDOW_TYPE_NOTIFICATION))
+ {
+ return EINA_FALSE;
+ }
+ // check if notification window is on-screen.
+
+ e_mod_move_mini_apptray_dim_show(mini_apptray_mb);
+ e_mod_move_mini_apptray_objs_add(mini_apptray_mb);
+
+ // mini_apptray_objs_animation_layer_set
+ e_mod_move_mini_apptray_objs_animation_layer_set(mini_apptray_mb);
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_mini_apptray_widget_mini_apptray_flick_process(E_Move_Mini_Apptray_Widget *mini_apptray_widget,
+ E_Move_Border *mb2, // mb2 : mini_apptray
+ int angle,
+ Eina_Bool state)
+{
+ E_Move_Border *mb = NULL;
+ E_Move_Widget_Object *mwo = NULL;
+ Eina_List *l;
+ E_Zone *zone = NULL;
+ int x = 0;
+ int y = 0;
+
+ E_CHECK_RETURN(mini_apptray_widget, EINA_FALSE);
+ mb = e_mod_move_border_client_find(mini_apptray_widget->win);
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(mb2, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_MINI_APPTRAY_CHECK(mb2), EINA_FALSE);
+ E_CHECK_RETURN(state, EINA_FALSE);
+
+ zone = mb->bd->zone;
+
+ EINA_LIST_FOREACH(mini_apptray_widget->objs, l, mwo) // widget click unset
+ {
+ if (!mwo) continue;
+ e_mod_move_event_click_set(mwo->event, EINA_FALSE);
+ }
+
+ _e_mod_move_mini_apptray_widget_mini_apptray_move_set(mini_apptray_widget, EINA_FALSE);
+
+ // flick data free
+ if (mb->flick_data) e_mod_move_flick_data_free(mb);
+
+ switch (angle)
+ {
+ case 90:
+ x = zone->w - mb2->w;
+ y = 0;
+ break;
+ case 180:
+ x = 0;
+ y = 0;
+ break;
+ case 270:
+ x = 0;
+ y = 0;
+ break;
+ case 0:
+ default :
+ x = 0;
+ y = zone->h - mb2->h;
+ break;
+ }
+
+ e_mod_move_mini_apptray_e_border_move(mb2, x, y);
+ e_mod_move_mini_apptray_objs_animation_move(mb2, x, y);
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_mini_apptray_widget_cb_motion_start(void *data,
+ void *event_info)
+{
+ E_Move *m = NULL;
+ E_Move_Mini_Apptray_Widget *mini_apptray_widget = (E_Move_Mini_Apptray_Widget *)data;
+
+ E_Move_Border *mb = NULL;
+ E_Move_Border *mini_apptray_mb = NULL;
+ E_Move_Event_Motion_Info *info;
+ E_Move_Widget_Object *mwo = NULL;
+ Evas_Event_Mouse_Down *mouse_down_event = NULL;
+ Eina_Bool clicked = EINA_FALSE;
+ Eina_List *l;
+
+ info = (E_Move_Event_Motion_Info *)event_info;
+ m = e_mod_move_util_get();
+
+ E_CHECK_RETURN(mini_apptray_widget, EINA_FALSE);
+ mb = e_mod_move_border_client_find(mini_apptray_widget->win);
+
+ if (!m || !mb || !mini_apptray_widget || !info) return EINA_FALSE;
+
+ mouse_down_event = info->event_info;
+ E_CHECK_RETURN(mouse_down_event, EINA_FALSE);
+ if (mouse_down_event->button != 1)
+ return EINA_FALSE;
+
+ EINA_LIST_FOREACH(mini_apptray_widget->objs, l, mwo)
+ {
+ if (!mwo) continue;
+ clicked = e_mod_move_event_click_get(mwo->event);
+ }
+ if (clicked)
+ return EINA_FALSE;
+
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s w:0x%08x MINI_APPTRAY_WIDGET_MOTION_START (%4d,%4d)\n",
+ "EVAS_OBJ", mb->bd->win,
+ info->coord.x, info->coord.y);
+
+ _e_mod_move_mini_apptray_widget_mini_apptray_move_set(mini_apptray_widget, EINA_FALSE);
+
+ /* check if apptray exists on the current zone */
+ mini_apptray_mb = e_mod_move_mini_apptray_find();
+ if ((mini_apptray_mb) &&
+ (REGION_INSIDE_ZONE(mini_apptray_mb, mb->bd->zone)))
+ {
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s w:0x%08x MINI_APPTRAY_WIDGET_MOTION_START %s\n",
+ "EVAS_OBJ", mb->bd->win,
+ "mini_apptray exists. return.");
+ return EINA_FALSE;
+ }
+
+ EINA_LIST_FOREACH(mini_apptray_widget->objs, l, mwo)
+ {
+ if (!mwo) continue;
+ e_mod_move_event_click_set(mwo->event, EINA_TRUE);
+ }
+
+ E_CHECK_GOTO(e_mod_move_flick_data_new(mb), error_cleanup);
+ e_mod_move_flick_data_init(mb, info->coord.x, info->coord.y);
+
+ if (!_e_mod_move_mini_apptray_widget_cb_motion_start_internal_mini_apptray_check(mini_apptray_mb))
+ {
+ goto error_cleanup;
+ }
+
+ e_mod_move_mini_apptray_e_border_raise(mini_apptray_mb);
+ _e_mod_move_mini_apptray_widget_mini_apptray_move_set(mini_apptray_widget, EINA_TRUE);
+ e_mod_move_mini_apptray_objs_animation_start_position_set(mini_apptray_mb,
+ mb->angle);
+ // send mini_apptray to "move start message".
+ e_mod_move_mini_apptray_anim_state_send(mini_apptray_mb, EINA_TRUE);
+
+ mini_apptray_widget->pos = info->coord; // save mouse click position
+
+ return EINA_TRUE;
+
+error_cleanup:
+
+ EINA_LIST_FOREACH(mini_apptray_widget->objs, l, mwo)
+ {
+ if (!mwo) continue;
+ e_mod_move_event_click_set(mwo->event, EINA_FALSE);
+ }
+
+ _e_mod_move_mini_apptray_widget_mini_apptray_move_set(mini_apptray_widget, EINA_FALSE);
+
+ return EINA_FALSE;
+
+}
+
+static Eina_Bool
+_e_mod_move_mini_apptray_widget_cb_motion_move(void *data,
+ void *event_info)
+{
+ E_Move *m = NULL;
+ E_Move_Mini_Apptray_Widget *mini_apptray_widget = (E_Move_Mini_Apptray_Widget *)data;
+ E_Move_Border *mb = NULL;
+ E_Move_Event_Motion_Info *info;
+ E_Move_Widget_Object *mwo = NULL;
+ E_Zone *zone = NULL;
+ Eina_List *l;
+ Eina_Bool click = EINA_FALSE;
+ int angle;
+
+ info = (E_Move_Event_Motion_Info *)event_info;
+ m = e_mod_move_util_get();
+
+ E_CHECK_RETURN(mini_apptray_widget, EINA_FALSE);
+ mb = e_mod_move_border_client_find(mini_apptray_widget->win);
+
+ if (!m || !mb || !info) return EINA_FALSE;
+
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s w:0x%08x MINI_APPTRAY_WIDGET_MOTION_MOVE a:%d (%4d,%4d)\n",
+ "EVAS_OBJ", mb->bd->win, mb->angle,
+ info->coord.x, info->coord.y);
+
+ angle = mb->angle;
+ zone = mb->bd->zone;
+
+ EINA_LIST_FOREACH(mini_apptray_widget->objs, l, mwo)
+ {
+ if (!mwo) continue;
+ click = e_mod_move_event_click_get(mwo->event);
+ }
+
+ E_CHECK_RETURN(click, EINA_FALSE);
+
+// do not work on moving just work on flick action
+#if 0
+ if (_e_mod_move_mini_apptray_widget_mini_apptray_move_get(mini_apptray_widget))
+ {
+ mini_apptray_mb = e_mod_move_mini_apptray_find();
+ E_CHECK_RETURN(mini_apptray_mb, EINA_FALSE);
+// change later for flick_up
+// todo flick up geometry
+ switch (angle)
+ {
+ case 0:
+ if (info->coord.y > (zone->h - mini_apptray_mb->h))
+ {
+ y = info->coord.y;
+ need_move = EINA_TRUE;
+ }
+ break;
+ case 90:
+ if (info->coord.x > (zone->w - mini_apptray_mb->w))
+ {
+ x = info->coord.x;
+ need_move = EINA_TRUE;
+ }
+ break;
+ case 180:
+ if (info->coord.y < mini_apptray_mb->h)
+ {
+ y = info->coord.y - mini_apptray_mb->h;
+ need_move = EINA_TRUE;
+ }
+ break;
+ case 270:
+ if (info->coord.x < mini_apptray_mb->w)
+ {
+ x = info->coord.x - mini_apptray_mb->w;
+ need_move = EINA_TRUE;
+ }
+ break;
+ default :
+ break;
+ }
+ if (need_move)
+ e_mod_move_mini_apptray_objs_move(mini_apptray_mb, x, y);
+ }
+#endif
+ mini_apptray_widget->pos = info->coord; // save mouse move position
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_mini_apptray_widget_cb_motion_end(void *data,
+ void *event_info)
+{
+ E_Move *m = NULL;
+ E_Move_Mini_Apptray_Widget *mini_apptray_widget = (E_Move_Mini_Apptray_Widget *)data;
+ E_Move_Border *mb = NULL;
+ E_Move_Border *mini_apptray_mb = NULL;
+ E_Move_Event_Motion_Info *info;
+ E_Move_Widget_Object *mwo = NULL;
+ Eina_List *l;
+ E_Zone *zone;
+ Evas_Event_Mouse_Up *mouse_up_event;
+ Eina_Bool click = EINA_FALSE;
+ Eina_Bool flick_state = EINA_FALSE;
+ int angle = 0;
+
+ info = (E_Move_Event_Motion_Info *)event_info;
+ m = e_mod_move_util_get();
+
+ E_CHECK_RETURN(mini_apptray_widget, EINA_FALSE);
+ mb = e_mod_move_border_client_find(mini_apptray_widget->win);
+
+ if (!m || !mb || !info) return EINA_FALSE;
+
+ mouse_up_event = info->event_info;
+ E_CHECK_RETURN(mouse_up_event, EINA_FALSE);
+ if (mouse_up_event->button != 1)
+ return EINA_FALSE;
+
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s w:0x%08x ,angle:%d, (%d,%d) %s()\n",
+ "EVAS_OBJ", mb->bd->win, mb->angle, info->coord.x, info->coord.y,
+ __func__);
+
+ angle = mb->angle;
+ zone = mb->bd->zone;
+
+ EINA_LIST_FOREACH(mini_apptray_widget->objs, l, mwo)
+ {
+ if (!mwo) continue;
+ click = e_mod_move_event_click_get(mwo->event);
+ }
+ E_CHECK_GOTO(click, error_cleanup);
+
+ e_mod_move_flick_data_update(mb, info->coord.x, info->coord.y);
+ flick_state = e_mod_move_flick_state_get(mb, EINA_TRUE);
+
+ if (_e_mod_move_mini_apptray_widget_mini_apptray_move_get(mini_apptray_widget))
+ {
+ mini_apptray_mb = e_mod_move_mini_apptray_find();
+
+ if (_e_mod_move_mini_apptray_widget_mini_apptray_flick_process(mini_apptray_widget,
+ mini_apptray_mb,
+ angle, flick_state))
+ {
+ return EINA_TRUE;
+ }
+ else
+ {
+ // if mini_apptray animation is not called, must destory datas explicit
+ if (mini_apptray_mb)
+ {
+ e_mod_move_mini_apptray_objs_animation_layer_unset(mini_apptray_mb);
+ e_border_focus_set(mini_apptray_mb ->bd, 0, 0);
+ e_border_lower(mini_apptray_mb ->bd);
+ e_mod_move_mini_apptray_dim_hide(mini_apptray_mb );
+ e_mod_move_mini_apptray_objs_del(mini_apptray_mb );
+ }
+ }
+ }
+// just work on flick action. so. currently block.
+#if 0
+ mx = zone->x;
+ my = zone->y;
+ ax = mx;
+ ay = my;
+ switch (angle)
+ {
+ case 0:
+ if (mini_apptray_mb)
+ {
+ check_h = mini_apptray_mb->h;
+ if (check_h) check_h /= 2;
+ if (info->coord.y > (zone->h - check_h))
+ {
+ my = zone->h;
+ ay = my;
+ }
+ else
+ {
+ my = zone->h - mini_apptray_mb->h;
+ ay = my;
+ }
+ }
+ break;
+ case 90:
+ if (mini_apptray_mb)
+ {
+ check_w = mini_apptray_mb->w;
+ if (check_w) check_w /= 2;
+ if (info->coord.x > (zone->w - check_w))
+ {
+ mx = zone->w;
+ ax = mx;
+ }
+ else
+ {
+ mx = zone->w - mini_apptray_mb->w;
+ ax = mx;
+ }
+ }
+ break;
+ case 180:
+ if (mini_apptray_mb)
+ {
+ check_h = mini_apptray_mb->h;
+ if (check_h) check_h /= 2;
+ if (info->coord.y < check_h)
+ {
+ my = mini_apptray_mb->h * -1;
+ ay = my;
+ }
+ }
+ break;
+ case 270:
+ if (mini_apptray_mb)
+ {
+ check_w = mini_apptray_mb->w;
+ if (check_w) check_w /= 2;
+ if (info->coord.x < check_w)
+ {
+ mx = mini_apptray_mb->w * -1;
+ ax = mx;
+ }
+ }
+ break;
+ default :
+ break;
+ }
+
+ if (mini_apptray_mb)
+ {
+ e_mod_move_mini_apptray_e_border_move(mini_apptray_mb, mx, my);
+ e_mod_move_mini_apptray_objs_animation_move(mini_apptray_mb, ax, ay);
+ }
+#endif
+
+ mini_apptray_widget->pos = info->coord; // save mouse up position
+
+ EINA_LIST_FOREACH(mini_apptray_widget->objs, l, mwo)
+ {
+ if (!mwo) continue;
+ e_mod_move_event_click_set(mwo->event, EINA_FALSE);
+ }
+
+error_cleanup:
+ if (mb->flick_data) e_mod_move_flick_data_free(mb);
+ _e_mod_move_mini_apptray_widget_mini_apptray_move_set(mini_apptray_widget, EINA_FALSE);
+
+ return EINA_TRUE;
+}
+
+static void
+_e_mod_move_mini_apptray_widget_obj_event_setup(E_Move_Mini_Apptray_Widget *mini_apptray_widget,
+ E_Move_Widget_Object *mwo)
+{
+ E_CHECK(mini_apptray_widget);
+ E_CHECK(mwo);
+
+ mwo->event = e_mod_move_event_new(mini_apptray_widget->win, mwo->obj);
+ E_CHECK(mwo->event);
+
+ // change later ... below function used for just log
+ e_mod_move_event_data_type_set(mwo->event, E_MOVE_EVENT_DATA_TYPE_WIDGET_INDICATOR);
+
+ e_mod_move_event_angle_cb_set(mwo->event,
+ e_mod_move_util_win_prop_angle_get);
+ e_mod_move_event_cb_set(mwo->event, E_MOVE_EVENT_TYPE_MOTION_START,
+ _e_mod_move_mini_apptray_widget_cb_motion_start,
+ mini_apptray_widget);
+ e_mod_move_event_cb_set(mwo->event, E_MOVE_EVENT_TYPE_MOTION_MOVE,
+ _e_mod_move_mini_apptray_widget_cb_motion_move,
+ mini_apptray_widget);
+ e_mod_move_event_cb_set(mwo->event, E_MOVE_EVENT_TYPE_MOTION_END,
+ _e_mod_move_mini_apptray_widget_cb_motion_end,
+ mini_apptray_widget);
+ e_mod_move_event_send_all_set(mwo->event, EINA_TRUE);
+ e_mod_move_event_find_redirect_win_set(mwo->event, EINA_TRUE);
+}
+
+/* externally accessible functions */
+
+/* set current mini apptray widget */
+EINTERN void
+e_mod_move_mini_apptray_widget_set(E_Move_Mini_Apptray_Widget *mini_apptray_widget)
+{
+ E_Move *m = NULL;
+
+ m = e_mod_move_util_get();
+ E_CHECK(m);
+
+ if (m->mini_apptray_widget)
+ {
+ e_mod_move_mini_apptray_widget_del(m->mini_apptray_widget);
+ }
+
+ m->mini_apptray_widget = mini_apptray_widget;
+}
+
+/* get current mini_apptray widget */
+EINTERN E_Move_Mini_Apptray_Widget *
+e_mod_move_mini_apptray_widget_get(void)
+{
+ E_Move *m = NULL;
+ m = e_mod_move_util_get();
+ E_CHECK_RETURN(m, NULL);
+
+ return m->mini_apptray_widget;
+}
+
+/* find mini_apptray widget target window */
+// must update/change this function ( for mini_apptray policy )
+EINTERN Eina_Bool
+e_mod_move_mini_apptray_widget_target_window_find(Ecore_X_Window *win)
+{
+ E_Move *m = NULL;
+ E_Move_Border *find_mb = NULL;
+ Eina_Bool found = EINA_FALSE;
+ E_Zone *zone = NULL;
+ Eina_Bool ret = EINA_FALSE;
+
+ E_CHECK_RETURN(win, EINA_FALSE);
+ m = e_mod_move_util_get();
+ E_CHECK_RETURN(m, EINA_FALSE);
+
+ EINA_INLIST_REVERSE_FOREACH(m->borders, find_mb)
+ {
+ if (!find_mb->bd) continue;
+ // the first OnScreen & FullScreen Window
+ zone = find_mb->bd->zone;
+ if (find_mb->visible
+ && REGION_EQUAL_TO_ZONE(find_mb, zone) // check fullscreen
+ && (zone->id == 0)) // change zone->id comparing to bd's profile property (mobile)
+ {
+ found = EINA_TRUE;
+ break;
+ }
+ }
+
+ if (found
+ && !(TYPE_INDICATOR_CHECK(find_mb))
+ && !(TYPE_APPTRAY_CHECK(find_mb))
+ && !(TYPE_MINI_APPTRAY_CHECK(find_mb))
+ && !(TYPE_QUICKPANEL_CHECK(find_mb))
+ && (find_mb->mini_apptray_state != E_MOVE_MINI_APPTRAY_STATE_OFF))
+ {
+ *win = find_mb->bd->client.win;
+ ret = EINA_TRUE;
+ }
+
+ return ret;
+}
+
+/* find mini_apptray widget's target window and apply mini_apptray widget control */
+EINTERN void
+e_mod_move_mini_apptray_widget_apply(void)
+{
+ E_Move *m = NULL;
+ Ecore_X_Window target_win;
+ E_Move_Mini_Apptray_Widget *mini_apptray_widget = NULL;
+
+ m = e_mod_move_util_get();
+ E_CHECK(m);
+
+ E_CHECK(e_mod_move_mini_apptray_find());
+
+ if (e_mod_move_mini_apptray_widget_target_window_find(&target_win))
+ {
+ // if previous mini_apptray_widget is created
+ if ((mini_apptray_widget = e_mod_move_mini_apptray_widget_get()))
+ {
+ // if current mini_apptray_widget's win is equal to finded win
+ // then just return.
+ if ((mini_apptray_widget->win == target_win)) return;
+ else
+ {
+ // if current mini_apptray_widget's win is not equal to finded win
+ // then del previous mini_apptray_widget and add new mini_apptray_widget.
+ e_mod_move_mini_apptray_widget_del(mini_apptray_widget);
+
+ e_mod_move_mini_apptray_widget_set(e_mod_move_mini_apptray_widget_add(target_win));
+ }
+ }
+ else
+ {
+ //if previous mini_apptray_widget is not creagted
+ //then add new mini_apptray_widget.
+ e_mod_move_mini_apptray_widget_set(e_mod_move_mini_apptray_widget_add(target_win));
+ }
+ }
+ else
+ {
+ // if current window does not require mini_apptray_widget
+ // and previous mini_apptray_widget is created,
+ // then del previous mini_apptray_widget
+ if ((mini_apptray_widget = e_mod_move_mini_apptray_widget_get()))
+ {
+ e_mod_move_mini_apptray_widget_del(mini_apptray_widget);
+ e_mod_move_mini_apptray_widget_set(NULL);
+ }
+ }
+}
+
+/* create E_Move_Border related Mini_Apptray_Widget */
+EINTERN E_Move_Mini_Apptray_Widget *
+e_mod_move_mini_apptray_widget_add(Ecore_X_Window win)
+{
+ E_Move *m = NULL;
+ E_Move_Border *mb = NULL;
+ E_Move_Mini_Apptray_Widget *mini_apptray_widget = NULL;
+ E_Move_Widget_Object *mwo = NULL;
+ Eina_List *l;
+ int x;
+ int y;
+ int w;
+ int h;
+
+ m = e_mod_move_util_get();
+ E_CHECK_RETURN(m, EINA_FALSE);
+
+ E_CHECK_RETURN(e_mod_move_mini_apptray_find(), EINA_FALSE);
+
+ mb = e_mod_move_border_client_find(win);
+ E_CHECK_RETURN(mb, NULL);
+
+ mini_apptray_widget = E_NEW(E_Move_Mini_Apptray_Widget, 1);
+ E_CHECK_RETURN(mini_apptray_widget, NULL);
+
+ mini_apptray_widget->win = win;
+ mini_apptray_widget->objs = e_mod_move_widget_objs_add(m);
+ if (mini_apptray_widget->objs)
+ {
+ switch (mb->angle)
+ {
+ case 90:
+ x = m->mini_apptray_widget_geometry[E_MOVE_ANGLE_90].x;
+ y = m->mini_apptray_widget_geometry[E_MOVE_ANGLE_90].y;
+ w = m->mini_apptray_widget_geometry[E_MOVE_ANGLE_90].w;
+ h = m->mini_apptray_widget_geometry[E_MOVE_ANGLE_90].h;
+ break;
+ case 180:
+ x = m->mini_apptray_widget_geometry[E_MOVE_ANGLE_180].x;
+ y = m->mini_apptray_widget_geometry[E_MOVE_ANGLE_180].y;
+ w = m->mini_apptray_widget_geometry[E_MOVE_ANGLE_180].w;
+ h = m->mini_apptray_widget_geometry[E_MOVE_ANGLE_180].h;
+ break;
+ case 270:
+ x = m->mini_apptray_widget_geometry[E_MOVE_ANGLE_270].x;
+ y = m->mini_apptray_widget_geometry[E_MOVE_ANGLE_270].y;
+ w = m->mini_apptray_widget_geometry[E_MOVE_ANGLE_270].w;
+ h = m->mini_apptray_widget_geometry[E_MOVE_ANGLE_270].h;
+ break;
+ case 0:
+ default:
+ x = m->mini_apptray_widget_geometry[E_MOVE_ANGLE_0].x;
+ y = m->mini_apptray_widget_geometry[E_MOVE_ANGLE_0].y;
+ w = m->mini_apptray_widget_geometry[E_MOVE_ANGLE_0].w;
+ h = m->mini_apptray_widget_geometry[E_MOVE_ANGLE_0].h;
+ break;
+ }
+ e_mod_move_widget_objs_move(mini_apptray_widget->objs, x, y);
+ e_mod_move_widget_objs_resize(mini_apptray_widget->objs, w, h);
+ e_mod_move_widget_objs_layer_set(mini_apptray_widget->objs, EVAS_LAYER_MAX);
+ e_mod_move_widget_objs_color_set(mini_apptray_widget->objs, 0, 0, 0, 0);
+ e_mod_move_widget_objs_show(mini_apptray_widget->objs);
+ e_mod_move_widget_objs_raise(mini_apptray_widget->objs);
+
+ // Set Input Shape Mask
+ switch (e_mod_move_util_root_angle_get())
+ {
+ case 90:
+ case 180:
+ case 270:
+ // currently, support angle 0 only. because, application is not ready yet.
+ break;
+ case 0:
+ default :
+ e_manager_comp_input_region_set(m->man,
+ m->mini_apptray_widget_geometry[E_MOVE_ANGLE_0].x,
+ m->mini_apptray_widget_geometry[E_MOVE_ANGLE_0].y,
+ m->mini_apptray_widget_geometry[E_MOVE_ANGLE_0].w,
+ m->mini_apptray_widget_geometry[E_MOVE_ANGLE_0].h);
+ break;
+ }
+ }
+ else
+ {
+ goto error_cleanup;
+ }
+
+ // Set Event Handler
+ EINA_LIST_FOREACH(mini_apptray_widget->objs, l, mwo)
+ {
+ if (!mwo) continue;
+ _e_mod_move_mini_apptray_widget_obj_event_setup(mini_apptray_widget, mwo);
+ }
+ return mini_apptray_widget;
+
+error_cleanup:
+ if (mini_apptray_widget->objs) e_mod_move_widget_objs_del(mini_apptray_widget->objs);
+ memset(mini_apptray_widget, 0, sizeof(E_Move_Mini_Apptray_Widget));
+ E_FREE(mini_apptray_widget);
+ return NULL;
+}
+
+/* delete mini_apptray_widget */
+EINTERN void
+e_mod_move_mini_apptray_widget_del(E_Move_Mini_Apptray_Widget *mini_apptray_widget)
+{
+ E_Move *m = NULL;
+ E_Move_Border *mb = NULL;
+ E_Move_Border *mini_apptray_mb = NULL;
+ E_Zone *zone = NULL;
+ int x = 0; int y = 0;
+
+ E_CHECK(mini_apptray_widget);
+ m = e_mod_move_util_get();
+
+ if (e_mod_move_mini_apptray_widget_click_get(mini_apptray_widget))
+ ecore_x_mouse_up_send(mini_apptray_widget->win,
+ mini_apptray_widget->pos.x,
+ mini_apptray_widget->pos.y,
+ 1);
+
+ if ((mb = e_mod_move_border_client_find(mini_apptray_widget->win)))
+ {
+ // compositor's input region free
+ e_manager_comp_input_region_set(m->man, 0, 0, 0, 0);
+
+ // if mini_apptray_widget is deleted, then mini_apptray's mirror object hide with animation
+ if (mini_apptray_widget->mini_apptray_move)
+ {
+ mini_apptray_mb = e_mod_move_mini_apptray_find();
+ E_CHECK_GOTO(mini_apptray_mb, error_cleanup);
+ zone = mini_apptray_mb->bd->zone;
+
+// following geometry will be changed. for flick-down effect
+ switch (mb->angle)
+ {
+ case 0:
+ x = 0;
+ y = mini_apptray_mb->h * -1;
+ break;
+ case 90:
+ x = mini_apptray_mb->w * -1;
+ y = 0;
+ break;
+ case 180:
+ x = 0;
+ y = zone->h;
+ break;
+ case 270:
+ x = zone->w;
+ y = 0;
+ break;
+ default :
+ x = 0;
+ y = mini_apptray_mb->h * -1;
+ break;
+ }
+ if (e_mod_move_mini_apptray_objs_animation_state_get(mini_apptray_mb))
+ {
+ e_mod_move_mini_apptray_objs_animation_stop(mini_apptray_mb);
+ e_mod_move_mini_apptray_objs_animation_clear(mini_apptray_mb);
+ }
+ e_mod_move_mini_apptray_objs_add(mini_apptray_mb);
+
+ // mini_apptray_objs_animation_layer_set
+ e_mod_move_mini_apptray_objs_animation_layer_set(mini_apptray_mb);
+
+ e_mod_move_mini_apptray_e_border_move(mini_apptray_mb, x, y);
+ e_mod_move_mini_apptray_objs_animation_move(mini_apptray_mb, x, y);
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s Mini_Apptray Widget Deleted: Hide Mini Apptray %s():%d\n",
+ "EVAS_OBJ", __func__, __LINE__);
+ }
+ }
+
+error_cleanup:
+ if (mini_apptray_widget->objs) e_mod_move_widget_objs_del(mini_apptray_widget->objs);
+ memset(mini_apptray_widget, 0, sizeof(E_Move_Mini_Apptray_Widget));
+ E_FREE(mini_apptray_widget);
+ if (m) m->mini_apptray_widget = NULL;
+}
+
+EINTERN Eina_Bool
+e_mod_move_mini_apptray_widget_angle_change(Ecore_X_Window win)
+{
+ E_Move *m = NULL;
+ E_Move_Mini_Apptray_Widget *mini_apptray_widget = NULL;
+ Eina_Bool ret = EINA_FALSE;
+ E_Move_Border *mb = NULL;
+ int x;
+ int y;
+ int w;
+ int h;
+
+ m = e_mod_move_util_get();
+ E_CHECK_RETURN(m, EINA_FALSE);
+
+ mini_apptray_widget = e_mod_move_mini_apptray_widget_get();
+ E_CHECK_RETURN(mini_apptray_widget, EINA_FALSE);
+
+ if ((mini_apptray_widget->win == win))
+ {
+ if ((mb = e_mod_move_border_client_find(win)))
+ {
+ switch (mb->angle)
+ {
+ case 90:
+ x = m->mini_apptray_widget_geometry[E_MOVE_ANGLE_90].x;
+ y = m->mini_apptray_widget_geometry[E_MOVE_ANGLE_90].y;
+ w = m->mini_apptray_widget_geometry[E_MOVE_ANGLE_90].w;
+ h = m->mini_apptray_widget_geometry[E_MOVE_ANGLE_90].h;
+ break;
+ case 180:
+ x = m->mini_apptray_widget_geometry[E_MOVE_ANGLE_180].x;
+ y = m->mini_apptray_widget_geometry[E_MOVE_ANGLE_180].y;
+ w = m->mini_apptray_widget_geometry[E_MOVE_ANGLE_180].w;
+ h = m->mini_apptray_widget_geometry[E_MOVE_ANGLE_180].h;
+ break;
+ case 270:
+ x = m->mini_apptray_widget_geometry[E_MOVE_ANGLE_270].x;
+ y = m->mini_apptray_widget_geometry[E_MOVE_ANGLE_270].y;
+ w = m->mini_apptray_widget_geometry[E_MOVE_ANGLE_270].w;
+ h = m->mini_apptray_widget_geometry[E_MOVE_ANGLE_270].h;
+ break;
+ case 0:
+ default:
+ x = m->mini_apptray_widget_geometry[E_MOVE_ANGLE_0].x;
+ y = m->mini_apptray_widget_geometry[E_MOVE_ANGLE_0].y;
+ w = m->mini_apptray_widget_geometry[E_MOVE_ANGLE_0].w;
+ h = m->mini_apptray_widget_geometry[E_MOVE_ANGLE_0].h;
+ break;
+ }
+ e_mod_move_widget_objs_move(mini_apptray_widget->objs, x, y);
+ e_mod_move_widget_objs_resize(mini_apptray_widget->objs, w, h);
+
+ // Set Input Shape Mask
+ switch (e_mod_move_util_root_angle_get())
+ {
+ case 90:
+ case 180:
+ case 270:
+ // currently, support angle 0 only. because, application is not ready yet.
+ break;
+ case 0:
+ default :
+ e_manager_comp_input_region_set(m->man,
+ m->mini_apptray_widget_geometry[E_MOVE_ANGLE_0].x,
+ m->mini_apptray_widget_geometry[E_MOVE_ANGLE_0].y,
+ m->mini_apptray_widget_geometry[E_MOVE_ANGLE_0].w,
+ m->mini_apptray_widget_geometry[E_MOVE_ANGLE_0].h);
+ break;
+ }
+
+ ret = EINA_TRUE;
+ }
+ }
+ return ret;
+}
+
+EINTERN Eina_Bool
+e_mod_move_mini_apptray_widget_scrollable_check(void)
+{
+ E_Move_Border *lockscr_mb = NULL;
+ E_Move_Border *taskmgr_mb = NULL;
+ E_Move_Border *pwlock_mb = NULL;
+
+ // if lockscreen is exist & visible, then do not show apptray
+ if ((lockscr_mb = e_mod_move_lockscreen_find()))
+ {
+ if (lockscr_mb->visibility == E_MOVE_VISIBILITY_STATE_VISIBLE)
+ {
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s %s %s()\n",
+ "EVAS_OBJ","Lockscreen is exist.", __func__);
+ return EINA_FALSE;
+ }
+ }
+ // if taskmanage is exist & visible, then do not show apptray
+ if ((taskmgr_mb = e_mod_move_taskmanager_find()))
+ {
+ if (taskmgr_mb->visibility == E_MOVE_VISIBILITY_STATE_VISIBLE)
+ {
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s %s %s()\n",
+ "EVAS_OBJ","TaskManager is exist.", __func__);
+ return EINA_FALSE;
+ }
+ }
+
+ // if pwlock is exist & visible, then do not show apptray
+ if ((pwlock_mb = e_mod_move_pwlock_find()))
+ {
+ if (pwlock_mb->visibility == E_MOVE_VISIBILITY_STATE_VISIBLE)
+ {
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s %s %s()\n",
+ "EVAS_OBJ","PWLOCK is exist.", __func__);
+ return EINA_FALSE;
+ }
+ }
+
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_mini_apptray_widget_click_get(E_Move_Mini_Apptray_Widget* mini_apptray_widget)
+{
+ Eina_Bool click = EINA_FALSE;
+ E_Move_Widget_Object *mwo = NULL;
+ Eina_List *l;
+
+ E_CHECK_RETURN(mini_apptray_widget, EINA_FALSE);
+ E_CHECK_RETURN(mini_apptray_widget->objs, EINA_FALSE);
+
+ EINA_LIST_FOREACH(mini_apptray_widget->objs, l, mwo)
+ {
+ if (!mwo) continue;
+ click = e_mod_move_event_click_get(mwo->event);
+ }
+
+ return click;
+}
+
+EINTERN Eina_Bool
+e_mod_move_mini_apptray_widget_event_clear(E_Move_Mini_Apptray_Widget* mini_apptray_widget)
+{
+ Eina_Bool click = EINA_FALSE;
+ E_Move_Widget_Object *mwo = NULL;
+ Eina_List *l;
+ E_Move_Border *mb = NULL;
+
+ E_CHECK_RETURN(mini_apptray_widget, EINA_FALSE);
+ E_CHECK_RETURN(mini_apptray_widget->objs, EINA_FALSE);
+
+ click = e_mod_move_mini_apptray_widget_click_get(mini_apptray_widget);
+ E_CHECK_RETURN(click, EINA_FALSE);
+
+ EINA_LIST_FOREACH(mini_apptray_widget->objs, l, mwo)
+ {
+ if (!mwo) continue;
+ e_mod_move_event_data_clear(mwo->event);
+ e_mod_move_event_click_set(mwo->event, EINA_FALSE);
+ }
+
+ _e_mod_move_mini_apptray_widget_mini_apptray_move_set(mini_apptray_widget, EINA_FALSE);
+
+ mb = e_mod_move_border_client_find(mini_apptray_widget->win);
+ if (mb && mb->flick_data) e_mod_move_flick_data_free(mb);
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_mini_apptray_widget_state_change(Ecore_X_Window win, Eina_Bool state)
+{
+ E_Move_Mini_Apptray_Widget *mini_apptray_widget = NULL;
+
+ if ((mini_apptray_widget = e_mod_move_mini_apptray_widget_get()))
+ {
+ if ((mini_apptray_widget->win == win)
+ && (!state))
+ {
+ // mini_apptray_state disable -> delete current mini_apptray_widget
+ e_mod_move_mini_apptray_widget_del(mini_apptray_widget);
+ e_mod_move_mini_apptray_widget_set(NULL);
+ }
+ }
+ else
+ {
+ if (state) e_mod_move_mini_apptray_widget_apply();
+ }
+
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_mini_apptray_widget_angle_change_post_job(void)
+{
+ E_Move_Mini_Apptray_Widget *mini_apptray_widget = NULL;
+ E_Move_Border *mb = NULL;
+ E_Border *bd = NULL;
+ E_Zone *zone = NULL;
+ int angle = 0;
+ int x = 0, y = 0;
+
+ mini_apptray_widget = e_mod_move_mini_apptray_widget_get();
+ E_CHECK_RETURN(mini_apptray_widget, EINA_FALSE);
+
+ mb = e_mod_move_border_client_find(mini_apptray_widget->win);
+ E_CHECK_RETURN(mb, EINA_FALSE);
+
+ bd = mb->bd;
+ E_CHECK_RETURN(bd, EINA_FALSE);
+
+ zone = bd->zone;
+ E_CHECK_RETURN(zone, EINA_FALSE);
+
+ angle = mb->angle;
+
+ if (e_mod_move_mini_apptray_widget_click_get(mini_apptray_widget))
+ {
+ switch (angle)
+ {
+ case 0:
+ x = zone->x + zone->w;
+ y = zone->y + zone->h;
+ break;
+ case 90:
+ x = zone->x + zone->w;
+ y = zone->y + zone->h;
+ break;
+ case 180:
+ x = zone->x;
+ y = zone->y;
+ break;
+ case 270:
+ x = zone->x;
+ y = zone->y;
+ break;
+ default :
+ break;
+ }
+ }
+
+ if (mb->flick_data)
+ e_mod_move_flick_data_init(mb, x, y);
+
+ return EINA_TRUE;
+}
--- /dev/null
+#ifdef E_TYPEDEFS
+#else
+#ifndef E_MOD_MOVE_MINI_APPTRAY_WIDGET_H
+#define E_MOD_MOVE_MINI_APPTRAY_WIDGET_H
+
+struct _E_Move_Mini_Apptray_Widget
+{
+ Eina_List *objs; // list of E_Move_Widget_Object. E_Move_Widget_Object has E_Move_Event.
+ Ecore_X_Window win;
+ Eina_Bool mini_apptray_move;
+ Evas_Point pos; // mouse position
+};
+
+typedef struct _E_Move_Mini_Apptray_Widget E_Move_Mini_Apptray_Widget;
+
+EINTERN void e_mod_move_mini_apptray_widget_apply(void); // find mini_apptray widget's target window and apply mini_apptray widget control
+EINTERN void e_mod_move_mini_apptray_widget_set(E_Move_Mini_Apptray_Widget *mini_apptray_widget); // set current mini_apptray widget
+EINTERN E_Move_Mini_Apptray_Widget *e_mod_move_mini_apptray_widget_get(void); // get current mini_apptray widget
+EINTERN Eina_Bool e_mod_move_mini_apptray_widget_target_window_find(Ecore_X_Window *win); // find mini_apptray widget target window
+EINTERN E_Move_Mini_Apptray_Widget *e_mod_move_mini_apptray_widget_add(Ecore_X_Window win); // create E_Move_Border related Mini_Apptray_Widget
+EINTERN void e_mod_move_mini_apptray_widget_del(E_Move_Mini_Apptray_Widget *mini_apptray_widget); // delete mini_apptray_widget
+EINTERN Eina_Bool e_mod_move_mini_apptray_widget_angle_change(Ecore_X_Window win);
+EINTERN Eina_Bool e_mod_move_mini_apptray_widget_state_change(Ecore_X_Window win, Eina_Bool state);
+EINTERN Eina_Bool e_mod_move_mini_apptray_widget_scrollable_check(void);
+EINTERN Eina_Bool e_mod_move_mini_apptray_widget_click_get(E_Move_Mini_Apptray_Widget* mini_apptray_widget);
+EINTERN Eina_Bool e_mod_move_mini_apptray_widget_event_clear(E_Move_Mini_Apptray_Widget* mini_apptray_widget);
+EINTERN Eina_Bool e_mod_move_mini_apptray_widget_angle_change_post_job(void);
+#endif
+#endif
--- /dev/null
+#include "e_mod_move_shared_types.h"
+#include "e_mod_move_debug.h"
+#include "e_mod_move.h"
+
+/* local subsystem functions */
+static void _e_mod_move_cb_comp_object_del(void *data, Evas *e, Evas_Object *obj, void *event_info __UNUSED__);
+static void _e_mod_move_cb_comp_mirror_object_del(void *data, Evas *e, Evas_Object *obj, void *event_info __UNUSED__);
+
+/* externally accessible functions */
+EINTERN E_Move_Object *
+e_mod_move_obj_add(E_Move_Border *mb,
+ E_Move_Canvas *canvas,
+ Eina_Bool mirror)
+{
+ // get Evas_Object from Compositor
+ E_Move *m;
+ E_Move_Object *mo;
+ E_Manager_Comp_Source *comp_src = NULL;
+
+ E_CHECK_RETURN(mb, 0);
+ m = mb->m;
+ E_CHECK_RETURN(m, 0);
+
+ mo = E_NEW(E_Move_Object, 1);
+ E_CHECK_RETURN(mo, 0);
+
+ if (m->man->comp)
+ {
+ comp_src = e_manager_comp_src_get(m->man, mb->bd->win);
+ E_CHECK_GOTO(comp_src, error_cleanup);
+
+ if (mirror)
+ {
+ mo->obj = e_manager_comp_src_image_mirror_add(m->man, comp_src);
+ E_CHECK_GOTO(mo->obj, error_cleanup);
+
+ evas_object_event_callback_add(mo->obj, EVAS_CALLBACK_DEL,
+ _e_mod_move_cb_comp_mirror_object_del,
+ mb);
+ mo->mirror = mirror;
+ evas_object_data_set(mo->obj,"move_mirror_obj", mo->obj);
+ e_mod_move_util_border_hidden_set(mb, EINA_TRUE);
+ }
+ else
+ {
+ mo->obj = e_manager_comp_src_shadow_get(m->man, comp_src);
+ E_CHECK_GOTO(mo->obj, error_cleanup);
+ evas_object_data_set(mo->obj,"comp_shadow_obj", mo->obj);
+
+ evas_object_event_callback_add(mo->obj, EVAS_CALLBACK_DEL,
+ _e_mod_move_cb_comp_object_del, mb);
+ }
+ mo->canvas = canvas;
+ mo->zone = canvas->zone;
+ return mo;
+ }
+
+error_cleanup:
+ memset(mo, 0, sizeof(E_Move_Object));
+ E_FREE(mo);
+ return NULL;
+}
+
+EINTERN void
+e_mod_move_obj_del(E_Move_Object *mo)
+{
+ E_CHECK(mo);
+
+ if (mo->obj)
+ {
+ if (mo->clipper)
+ {
+ evas_object_clip_unset(mo->obj);
+ evas_object_del(mo->clipper);
+ }
+
+ if (mo->mirror)
+ {
+ evas_object_event_callback_del(mo->obj, EVAS_CALLBACK_DEL,
+ _e_mod_move_cb_comp_mirror_object_del);
+ evas_object_del(mo->obj);
+ }
+ else
+ {
+ evas_object_event_callback_del(mo->obj, EVAS_CALLBACK_DEL,
+ _e_mod_move_cb_comp_object_del);
+ }
+
+ }
+ memset(mo, 0, sizeof(E_Move_Object));
+ E_FREE(mo);
+}
+
+EINTERN Eina_List *
+e_mod_move_bd_move_objs_add(E_Move_Border *mb,
+ Eina_Bool mirror)
+{
+ Eina_List *l, *objs = NULL;
+ E_Move_Canvas *canvas;
+ E_Move_Object *mo;
+
+ E_CHECK_RETURN(mb, 0);
+ E_CHECK_RETURN(mb->m, 0);
+ E_CHECK_RETURN(mb->m->canvases, 0);
+
+ EINA_LIST_FOREACH(mb->m->canvases, l, canvas)
+ {
+ mo = e_mod_move_obj_add(mb, canvas, mirror); //Third Value - EINA_TRUE: Get Mirror Object
+ //Third Value - EINA_FALSE: Get Shadow Object
+ if (!mo)
+ {
+ e_mod_move_bd_move_objs_del(mb, objs);
+ return NULL;
+ }
+ objs = eina_list_append(objs, mo);
+ }
+ return objs;
+}
+
+EINTERN void
+e_mod_move_bd_move_objs_del(E_Move_Border *mb,
+ Eina_List *objs)
+{
+ E_Move_Object *mo;
+ E_CHECK(mb);
+ E_CHECK(objs);
+ EINA_LIST_FREE(objs, mo)
+ {
+ if (mo->mirror) e_mod_move_util_border_hidden_set(mb, EINA_FALSE);
+ e_mod_move_obj_del(mo);
+ }
+}
+
+EINTERN void
+e_mod_move_bd_move_objs_move(E_Move_Border *mb,
+ int x,
+ int y)
+{
+ Eina_List *l;
+ E_Move_Object *mo;
+ E_CHECK(mb);
+ EINA_LIST_FOREACH(mb->objs, l, mo)
+ {
+ int zx = 0, zy = 0;
+ if (!mo) continue;
+ if (!mo->obj) continue;
+ if (mo->zone)
+ {
+ zx = mo->zone->x;
+ zy = mo->zone->y;
+ }
+ evas_object_move(mo->obj, x - zx, y - zy);
+ }
+}
+
+EINTERN void
+e_mod_move_bd_move_objs_resize(E_Move_Border *mb,
+ int w,
+ int h)
+{
+ Eina_List *l;
+ E_Move_Object *mo;
+ E_CHECK(mb);
+ EINA_LIST_FOREACH(mb->objs, l, mo)
+ {
+ if (!mo) continue;
+ if (!mo->obj) continue;
+ evas_object_resize(mo->obj, w, h);
+ }
+}
+
+EINTERN void
+e_mod_move_bd_move_objs_data_del(E_Move_Border *mb,
+ const char *key)
+{
+ Eina_List *l;
+ E_Move_Object *mo;
+ E_CHECK(mb);
+ E_CHECK(key);
+ EINA_LIST_FOREACH(mb->objs, l, mo)
+ {
+ if (!mo) continue;
+ evas_object_data_del(mo->obj, key);
+ }
+}
+
+EINTERN void
+e_mod_move_bd_move_objs_data_set(E_Move_Border *mb,
+ const char *key,
+ const void *data)
+{
+ Eina_List *l;
+ E_Move_Object *mo;
+ E_CHECK(mb);
+ E_CHECK(key);
+ EINA_LIST_FOREACH(mb->objs, l, mo)
+ {
+ if (!mo) continue;
+ if (!mo->obj) continue;
+ evas_object_data_set(mo->obj, key, data);
+ }
+}
+
+EINTERN void
+e_mod_move_bd_move_objs_show(E_Move_Border *mb)
+{
+ Eina_List *l;
+ E_Move_Object *mo;
+ E_CHECK(mb);
+ EINA_LIST_FOREACH(mb->objs, l, mo)
+ {
+ if (!mo) continue;
+ if (!mo->obj) continue;
+ evas_object_show(mo->obj);
+ }
+}
+
+EINTERN void
+e_mod_move_bd_move_objs_hide(E_Move_Border *mb)
+{
+ Eina_List *l;
+ E_Move_Object *mo;
+ E_CHECK(mb);
+ EINA_LIST_FOREACH(mb->objs, l, mo)
+ {
+ if (!mo) continue;
+ if (!mo->obj) continue;
+ evas_object_hide(mo->obj);
+ }
+}
+
+EINTERN void
+e_mod_move_bd_move_objs_raise(E_Move_Border *mb)
+{
+ Eina_List *l;
+ E_Move_Object *mo;
+ E_CHECK(mb);
+ EINA_LIST_FOREACH(mb->objs, l, mo)
+ {
+ if (!mo) continue;
+ evas_object_raise(mo->obj);
+ }
+}
+
+EINTERN void
+e_mod_move_bd_move_objs_lower(E_Move_Border *mb)
+{
+ Eina_List *l;
+ E_Move_Object *mo;
+ E_CHECK(mb);
+ EINA_LIST_FOREACH(mb->objs, l, mo)
+ {
+ if (!mo) continue;
+ evas_object_lower(mo->obj);
+ }
+}
+
+EINTERN void
+e_mod_move_bd_move_objs_stack_above(E_Move_Border *mb,
+ E_Move_Border *mb2)
+{
+ Eina_List *l, *ll;
+ E_Move_Object *mo, *mo2;
+ E_CHECK(mb);
+ E_CHECK(mb2);
+ EINA_LIST_FOREACH(mb->objs, l, mo)
+ {
+ EINA_LIST_FOREACH(mb2->objs, ll, mo2)
+ {
+ if (mo->zone == mo2->zone)
+ evas_object_stack_above(mo->obj, mo2->obj);
+ }
+ }
+}
+
+EINTERN void
+e_mod_move_bd_move_objs_stack_below(E_Move_Border *mb,
+ E_Move_Border *mb2)
+{
+ Eina_List *l, *ll;
+ E_Move_Object *mo, *mo2;
+ E_CHECK(mb);
+ E_CHECK(mb2);
+ EINA_LIST_FOREACH(mb->objs, l, mo)
+ {
+ EINA_LIST_FOREACH(mb2->objs, ll, mo2)
+ {
+ if (mo->zone == mo2->zone)
+ evas_object_stack_below(mo->obj, mo2->obj);
+ }
+ }
+}
+
+EINTERN void
+e_mod_move_bd_move_objs_clipper_add(E_Move_Border *mb)
+{
+ Eina_List *l = NULL;
+ E_Move_Object *mo = NULL;
+
+ E_CHECK(mb);
+
+ EINA_LIST_FOREACH(mb->objs, l, mo)
+ {
+ if (!mo) continue;
+ if (!mo->obj) continue;
+ if (mo->clipper) continue; // if clipper object exist, then do not create clipper object.
+ if (!mo->canvas) continue;
+ if (!mo->canvas->evas) continue;
+
+ mo->clipper = evas_object_rectangle_add(mo->canvas->evas);
+ if (mo->clipper)
+ {
+ evas_object_color_set(mo->clipper, 255,255,255,255);
+ evas_object_data_set(mo->clipper, "move_clipper_obj", mo->clipper);
+ evas_object_clip_set(mo->obj, mo->clipper);
+ }
+ }
+}
+
+EINTERN void
+e_mod_move_bd_move_objs_clipper_del(E_Move_Border *mb)
+{
+ Eina_List *l = NULL;
+ E_Move_Object *mo = NULL;
+
+ E_CHECK(mb);
+
+ EINA_LIST_FOREACH(mb->objs, l, mo)
+ {
+ if (!mo) continue;
+ if (!mo->obj) continue;
+ if (!mo->clipper) continue;
+
+ evas_object_clip_unset(mo->obj);
+ evas_object_del(mo->clipper);
+ mo->clipper = NULL;
+ }
+}
+
+EINTERN void
+e_mod_move_bd_move_objs_clipper_show(E_Move_Border *mb)
+{
+ Eina_List *l = NULL;
+ E_Move_Object *mo = NULL;
+
+ E_CHECK(mb);
+
+ EINA_LIST_FOREACH(mb->objs, l, mo)
+ {
+ if (!mo) continue;
+ if (!mo->clipper) continue;
+
+ evas_object_show(mo->clipper);
+ }
+}
+
+EINTERN void
+e_mod_move_bd_move_objs_clipper_hide(E_Move_Border *mb)
+{
+ Eina_List *l = NULL;
+ E_Move_Object *mo = NULL;
+
+ E_CHECK(mb);
+
+ EINA_LIST_FOREACH(mb->objs, l, mo)
+ {
+ if (!mo) continue;
+ if (!mo->clipper) continue;
+
+ evas_object_hide(mo->clipper);
+ }
+}
+
+EINTERN void
+e_mod_move_bd_move_objs_clipper_move(E_Move_Border *mb,
+ int x,
+ int y)
+{
+ Eina_List *l = NULL;
+ E_Move_Object *mo = NULL;
+
+ E_CHECK(mb);
+
+ EINA_LIST_FOREACH(mb->objs, l, mo)
+ {
+ if (!mo) continue;
+ if (!mo->clipper) continue;
+
+ evas_object_move(mo->clipper, x, y);
+ }
+}
+
+EINTERN void
+e_mod_move_bd_move_objs_clipper_resize(E_Move_Border *mb,
+ int w,
+ int h)
+{
+ Eina_List *l = NULL;
+ E_Move_Object *mo = NULL;
+
+ E_CHECK(mb);
+
+ EINA_LIST_FOREACH(mb->objs, l, mo)
+ {
+ if (!mo) continue;
+ if (!mo->clipper) continue;
+
+ evas_object_resize(mo->clipper, w, h);
+ }
+}
+
+/* local subsystem functions */
+static void
+_e_mod_move_cb_comp_object_del(void *data,
+ Evas *e,
+ Evas_Object *obj,
+ void *event_info __UNUSED__)
+{
+ E_Move_Border *mb = (E_Move_Border *)data;
+ E_Move_Object *mo;
+ Eina_List *l;
+ E_CHECK(mb);
+
+ L(LT_EVENT_BD,
+ "[MOVE] ev:%15.15s w:0x%08x c:0x%08x\n", "COMP_OBJ_DEL",
+ mb->bd->win, mb->bd->client.win);
+
+ EINA_LIST_FOREACH(mb->objs, l, mo)
+ {
+ if (mo->obj == obj)
+ {
+ // remove Move_Object pointer from list;
+ mb->objs = eina_list_remove(mb->objs, mo);
+ // free data
+ memset(mo, 0, sizeof(E_Move_Object));
+ E_FREE(mo);
+ break;
+ }
+ }
+
+ if (!mb->objs) e_mod_move_border_del(mb);
+}
+
+static void
+_e_mod_move_cb_comp_mirror_object_del(void *data,
+ Evas *e,
+ Evas_Object *obj,
+ void *event_info __UNUSED__)
+{
+ E_Move_Border *mb = (E_Move_Border *)data;
+ E_Move_Object *mo;
+ Eina_List *l;
+ E_CHECK(mb);
+
+ L(LT_EVENT_BD,
+ "[MOVE] ev:%15.15s w:0x%08x c:0x%08x\n", "COMP_MIRROR_OBJ_DEL",
+ mb->bd->win, mb->bd->client.win);
+
+ EINA_LIST_FOREACH(mb->objs, l, mo)
+ {
+ if (mo->obj == obj)
+ {
+ // if clipper exist, then delete clipper
+ if (mo->clipper) evas_object_del(mo->clipper);
+ // remove Move_Object pointer from list;
+ mb->objs = eina_list_remove(mb->objs, mo);
+ // free data
+ memset(mo, 0, sizeof(E_Move_Object));
+ E_FREE(mo);
+ break;
+ }
+ }
+
+ e_mod_move_util_border_hidden_set(mb, EINA_FALSE);
+}
--- /dev/null
+#ifdef E_TYPEDEFS
+#else
+#ifndef E_MOD_MOVE_OBJECT_H
+#define E_MOD_MOVE_OBJECT_H
+
+typedef struct _E_Move_Object E_Move_Object;
+
+struct _E_Move_Object
+{
+ E_Move_Canvas *canvas;
+ E_Zone *zone;
+
+ Evas_Object *obj; // compositor's evas(window) object
+ Eina_Bool mirror; // TRUE: use compositor's mirror_obj / FALSE: use compositor's shadow_obj
+ Evas_Object *clipper;// clipping evas object
+};
+
+EINTERN E_Move_Object *e_mod_move_obj_add(E_Move_Border *mb, E_Move_Canvas *canvas, Eina_Bool mirror);
+EINTERN void e_mod_move_obj_del(E_Move_Object *mo);
+
+EINTERN Eina_List *e_mod_move_bd_move_objs_add(E_Move_Border *mb, Eina_Bool mirror);
+EINTERN void e_mod_move_bd_move_objs_del(E_Move_Border *mb, Eina_List *objs);
+EINTERN void e_mod_move_bd_move_objs_move(E_Move_Border *mb, int x, int y);
+EINTERN void e_mod_move_bd_move_objs_resize(E_Move_Border *mb, int w, int h);
+EINTERN void e_mod_move_bd_move_objs_data_del(E_Move_Border *mb, const char *key);
+EINTERN void e_mod_move_bd_move_objs_data_set(E_Move_Border *mb, const char *key, const void *data);
+EINTERN void e_mod_move_bd_move_objs_show(E_Move_Border *mb);
+EINTERN void e_mod_move_bd_move_objs_hide(E_Move_Border *mb);
+EINTERN void e_mod_move_bd_move_objs_raise(E_Move_Border *mb);
+EINTERN void e_mod_move_bd_move_objs_lower(E_Move_Border *mb);
+EINTERN void e_mod_move_bd_move_objs_stack_above(E_Move_Border *mb, E_Move_Border *mb2);
+EINTERN void e_mod_move_bd_move_objs_stack_below(E_Move_Border *mb, E_Move_Border *mb2);
+EINTERN void e_mod_move_bd_move_objs_clipper_add(E_Move_Border *mb);
+EINTERN void e_mod_move_bd_move_objs_clipper_del(E_Move_Border *mb);
+EINTERN void e_mod_move_bd_move_objs_clipper_show(E_Move_Border *mb);
+EINTERN void e_mod_move_bd_move_objs_clipper_hide(E_Move_Border *mb);
+EINTERN void e_mod_move_bd_move_objs_clipper_move(E_Move_Border *mb, int x, int y);
+EINTERN void e_mod_move_bd_move_objs_clipper_resize(E_Move_Border *mb, int w, int h);
+
+#endif
+#endif
--- /dev/null
+#include "e_mod_move_shared_types.h"
+#include "e_mod_move_debug.h"
+#include "e_mod_move.h"
+
+/* externally accessible functions */
+EINTERN E_Move_Border *
+e_mod_move_pwlock_find(void)
+{
+ E_Move *m;
+ E_Move_Border *mb;
+
+ m = e_mod_move_util_get();
+ E_CHECK_RETURN(m, 0);
+
+ EINA_INLIST_REVERSE_FOREACH(m->borders, mb)
+ {
+ if (TYPE_PWLOCK_CHECK(mb)) return mb;
+ }
+ return NULL;
+}
+
--- /dev/null
+#ifdef E_TYPEDEFS
+#else
+#ifndef E_MOD_MOVE_PWLOCK_H
+#define E_MOD_MOVE_PWLOCK_H
+
+EINTERN E_Move_Border *e_mod_move_pwlock_find(void);
+
+#endif
+#endif
--- /dev/null
+#include "e_mod_move_shared_types.h"
+#include "e_mod_move_debug.h"
+#include "e_mod_move.h"
+#include "e_mod_move_atoms.h"
+
+struct _E_Move_Quickpanel_Animation_Data
+{
+ Eina_Bool animating;
+ int sx;// start x
+ int sy;// start y
+ int ex;// end x
+ int ey;// end y
+ int dx;// distance x
+ int dy;// distance y
+ Ecore_Animator *animator;
+};
+
+/* local subsystem functions */
+static Eina_Bool _e_mod_move_quickpanel_cb_motion_start(void *data, void *event_info);
+static Eina_Bool _e_mod_move_quickpanel_cb_motion_move(void *data, void *event_info);
+static Eina_Bool _e_mod_move_quickpanel_cb_motion_end(void *data, void *event_info);
+static Eina_Bool _e_mod_move_quickpanel_objs_position_set(E_Move_Border *mb, int x, int y);
+static Eina_Bool _e_mod_move_quickpanel_objs_position_get(E_Move_Border *mb, int *x, int *y);
+static Eina_Bool _e_mod_move_quickpanel_objs_moving_distance_rate_get(E_Move_Border *mb, int angle, double *rate);
+static Eina_Bool _e_mod_move_quickpanel_objs_animation_frame(void *data, double pos);
+static Eina_Bool _e_mod_move_quickpanel_flick_process(E_Move_Border *mb, int angle, Eina_Bool state);
+static Eina_Bool _e_mod_move_quickpanel_dim_objs_apply(E_Move_Border *mb, int x, int y);
+static Eina_Bool _e_mod_move_quickpanel_below_window_set(void);
+static void _e_mod_move_quickpanel_below_window_unset(void);
+static Eina_Bool _e_mod_move_quickpanel_below_window_objs_add(void);
+static Eina_Bool _e_mod_move_quickpanel_below_window_objs_del(void);
+static Eina_Bool _e_mod_move_quickpanel_below_window_objs_move(int x, int y);
+static Eina_Bool _e_mod_move_quickpanel_handle_objs_add(E_Move_Border *mb);
+static Eina_Bool _e_mod_move_quickpanel_handle_objs_del(E_Move_Border *mb);
+static Eina_Bool _e_mod_move_quickpanel_handle_objs_size_update(E_Move_Border *mb, int w, int h);
+static Eina_Bool _e_mod_move_quickpanel_handle_objs_move(E_Move_Border *mb, int x, int y);
+static Eina_Bool _e_mod_move_quickpanel_objs_check_on_screen(E_Move_Border *mb, int x, int y);
+static Eina_Bool _e_mod_move_quickpanel_objs_outside_movable_pos_get(E_Move_Border *mb, int *x, int *y);
+static Eina_Bool _e_mod_move_quickpanel_animation_change_with_angle(E_Move_Border *mb);
+static Eina_Bool _e_mod_move_quickpanel_fb_move_change_with_angle(E_Move_Border *mb);
+
+/* local subsystem functions */
+static Eina_Bool
+_e_mod_move_quickpanel_cb_motion_start(void *data,
+ void *event_info)
+{
+ E_Move_Border *mb = (E_Move_Border *)data;
+ E_Move_Event_Motion_Info *info;
+ E_Move_Control_Object *mco = NULL;
+ Evas_Event_Mouse_Down *mouse_down_event = NULL;
+ Eina_Bool clicked = EINA_FALSE;
+ Eina_List *l;
+ int angle = 0;
+
+ info = (E_Move_Event_Motion_Info *)event_info;
+ if (!mb || !info) return EINA_FALSE;
+
+ mouse_down_event = info->event_info;
+ E_CHECK_RETURN(mouse_down_event, EINA_FALSE);
+ if (mouse_down_event->button != 1)
+ return EINA_FALSE;
+
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco)
+ {
+ if (!mco) continue;
+ clicked = e_mod_move_event_click_get(mco->event);
+ }
+ if (clicked)
+ return EINA_FALSE;
+
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s w:0x%08x %s()\n", "EVAS_OBJ", mb->bd->win, __func__);
+
+ if (e_mod_move_quickpanel_objs_animation_state_get(mb)) goto error_cleanup;
+
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco)
+ {
+ if (!mco) continue;
+ angle = e_mod_move_event_angle_get(mco->event);
+ }
+ mb->angle = angle;
+
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco)
+ {
+ if (!mco) continue;
+ e_mod_move_event_click_set(mco->event, EINA_TRUE);
+ }
+
+ E_CHECK_GOTO(mb->visible, error_cleanup);
+ if (!(REGION_INTERSECTS_WITH_ZONE(mb, mb->bd->zone)))
+ goto error_cleanup;
+
+ E_CHECK_GOTO(e_mod_move_flick_data_new(mb), error_cleanup);
+ e_mod_move_flick_data_init(mb, info->coord.x, info->coord.y);
+
+ e_mod_move_quickpanel_objs_add(mb);
+
+ // send quickpanel to "move start message".
+ e_mod_move_quickpanel_anim_state_send(mb, EINA_TRUE);
+
+ return EINA_TRUE;
+
+error_cleanup:
+
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco)
+ {
+ if (!mco) continue;
+ e_mod_move_event_click_set(mco->event, EINA_FALSE);
+ }
+ return EINA_FALSE;
+}
+
+static Eina_Bool
+_e_mod_move_quickpanel_cb_motion_move(void *data,
+ void *event_info)
+{
+ E_Move *m = NULL;
+ E_Move_Border *mb = (E_Move_Border *)data;
+ E_Move_Event_Motion_Info *info;
+ E_Move_Control_Object *mco = NULL;
+ Eina_List *l;
+ int angle = 0;
+ E_Zone *zone = NULL;
+ Eina_Bool click = EINA_FALSE;
+ int cx, cy, cw, ch;
+
+ info = (E_Move_Event_Motion_Info *)event_info;
+ if (!mb || !info) return EINA_FALSE;
+
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s w:0x%08x ,angle:%d, (%d,%d) %s()\n",
+ "EVAS_OBJ", mb->bd->win, mb->angle, info->coord.x, info->coord.y,
+ __func__);
+
+ m = mb->m;
+ angle = mb->angle;
+ zone = mb->bd->zone;
+
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco)
+ {
+ if (!mco) continue;
+ click = e_mod_move_event_click_get(mco->event);
+ }
+ E_CHECK_RETURN(click, EINA_FALSE);
+
+ if (m->qp_scroll_with_clipping)
+ e_mod_move_quickpanel_objs_move(mb, info->coord.x, info->coord.y);
+ else
+ {
+ switch (angle)
+ {
+ case 0:
+ if (info->coord.y < mb->h)
+ {
+ if (e_mod_move_border_contents_rect_get(mb, &cx, &cy ,&cw, &ch))
+ {
+ if (info->coord.y < ch)
+ {
+ e_mod_move_quickpanel_objs_move(mb, 0,
+ info->coord.y - ch);
+ }
+ }
+ else
+ {
+ e_mod_move_quickpanel_objs_move(mb, 0,
+ info->coord.y - mb->h);
+ }
+ }
+ break;
+ case 90:
+ if (info->coord.x < mb->w)
+ {
+ if (e_mod_move_border_contents_rect_get(mb, &cx, &cy ,&cw, &ch))
+ {
+ if (info->coord.x < cw)
+ {
+ e_mod_move_quickpanel_objs_move(mb, info->coord.x - cw,
+ 0);
+ }
+ }
+ else
+ {
+ e_mod_move_quickpanel_objs_move(mb, info->coord.x - mb->w,
+ 0);
+ }
+ }
+ break;
+ case 180:
+ if (info->coord.y > (zone->h - mb->h))
+ {
+ if (e_mod_move_border_contents_rect_get(mb, &cx, &cy ,&cw, &ch))
+ {
+ if (info->coord.y > cy)
+ {
+ e_mod_move_quickpanel_objs_move(mb, 0,
+ info->coord.y - cy);
+ }
+ }
+ else
+ {
+ e_mod_move_quickpanel_objs_move(mb, 0, info->coord.y);
+ }
+ }
+ break;
+ case 270:
+ if (info->coord.x > (zone->w - mb->w))
+ {
+ if (e_mod_move_border_contents_rect_get(mb, &cx, &cy ,&cw, &ch))
+ {
+ if (info->coord.x > cx)
+ {
+ e_mod_move_quickpanel_objs_move(mb,
+ info->coord.x - cx,
+ 0);
+ }
+ }
+ else
+ {
+ e_mod_move_quickpanel_objs_move(mb, info->coord.x, 0);
+ }
+ }
+ break;
+ default :
+ break;
+ }
+ }
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_quickpanel_cb_motion_end(void *data,
+ void *event_info)
+{
+ E_Move *m = NULL;
+ E_Move_Border *mb = (E_Move_Border *)data;
+ E_Move_Event_Motion_Info *info;
+ E_Move_Control_Object *mco = NULL;
+ Evas_Event_Mouse_Up *mouse_up_event;
+ Eina_List *l;
+ int angle = 0;
+ E_Zone *zone = NULL;
+ Eina_Bool click = EINA_FALSE;
+ Eina_Bool flick_state = EINA_FALSE;
+ int cx, cy, cw, ch;
+ int check_w, check_h;
+
+ info = (E_Move_Event_Motion_Info *)event_info;
+ if (!mb || !info) return EINA_FALSE;
+
+ mouse_up_event = info->event_info;
+
+ E_CHECK_RETURN(mouse_up_event, EINA_FALSE);
+ if (mouse_up_event->button != 1)
+ return EINA_FALSE;
+
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s w:0x%08x ,angle:%d, (%d,%d) %s()\n",
+ "EVAS_OBJ", mb->bd->win, mb->angle, info->coord.x, info->coord.y,
+ __func__);
+
+ m = mb->m;
+ angle = mb->angle;
+ zone = mb->bd->zone;
+
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco)
+ {
+ if (!mco) continue;
+ click = e_mod_move_event_click_get(mco->event);
+ }
+ E_CHECK_GOTO(click, finish);
+
+ e_mod_move_flick_data_update(mb, info->coord.x, info->coord.y);
+ flick_state = e_mod_move_flick_state_get(mb, EINA_FALSE);
+ if (_e_mod_move_quickpanel_flick_process(mb, angle, flick_state))
+ {
+ return EINA_TRUE;
+ }
+
+ switch (angle)
+ {
+ case 0:
+ check_h = mb->h;
+ if (check_h) check_h /= 2;
+ if (info->coord.y < check_h)
+ {
+ if (m->qp_scroll_with_clipping)
+ {
+ e_mod_move_quickpanel_e_border_move(mb, 0, mb->h * -1);
+ e_mod_move_quickpanel_objs_animation_move(mb, zone->x, zone->y);
+ }
+ else
+ {
+ if (e_mod_move_border_contents_rect_get(mb, &cx, &cy ,&cw, &ch))
+ {
+ check_h = ch;
+ if (check_h) check_h /= 2;
+ if (info->coord.y < check_h)
+ {
+ e_mod_move_quickpanel_e_border_move(mb, 0, mb->h * -1);
+ e_mod_move_quickpanel_objs_animation_move(mb, 0, ch * -1);
+ }
+ else
+ {
+ e_mod_move_quickpanel_objs_animation_move(mb, 0, 0);
+ }
+ }
+ }
+ }
+ else
+ {
+ if (m->qp_scroll_with_clipping)
+ {
+ e_mod_move_quickpanel_objs_animation_move(mb,
+ zone->x + mb->w,
+ zone->y + mb->h);
+ }
+ else
+ {
+ e_mod_move_quickpanel_objs_animation_move(mb, 0, 0);
+ }
+ }
+ break;
+ case 90:
+ check_w = mb->w;
+ if (check_w) check_w /= 2;
+ if (info->coord.x < check_w)
+ {
+ if (m->qp_scroll_with_clipping)
+ {
+ e_mod_move_quickpanel_e_border_move(mb, mb->w * -1, 0);
+ e_mod_move_quickpanel_objs_animation_move(mb, zone->x, zone->y);
+ }
+ else
+ {
+ if (e_mod_move_border_contents_rect_get(mb, &cx, &cy ,&cw, &ch))
+ {
+ check_w = cw;
+ if (check_w) check_w /= 2;
+ if (info->coord.x < check_w)
+ {
+ e_mod_move_quickpanel_e_border_move(mb, mb->w * -1, 0);
+ e_mod_move_quickpanel_objs_animation_move(mb, cw * -1, 0);
+ }
+ else
+ {
+ e_mod_move_quickpanel_objs_animation_move(mb, 0, 0);
+ }
+ }
+ }
+ }
+ else
+ {
+ if (m->qp_scroll_with_clipping)
+ {
+ e_mod_move_quickpanel_objs_animation_move(mb,
+ zone->x + mb->w,
+ zone->y + mb->h);
+ }
+ else
+ {
+ e_mod_move_quickpanel_objs_animation_move(mb, 0, 0);
+ }
+ }
+ break;
+ case 180:
+ check_h = mb->h;
+ if (check_h) check_h /= 2;
+ if (info->coord.y > (zone->h - check_h))
+ {
+ if (m->qp_scroll_with_clipping)
+ {
+ e_mod_move_quickpanel_e_border_move(mb, 0, zone->h);
+ e_mod_move_quickpanel_objs_animation_move(mb,
+ zone->x + mb->w,
+ zone->y + mb->h);
+ }
+ else
+ {
+ if (e_mod_move_border_contents_rect_get(mb, &cx, &cy ,&cw, &ch))
+ {
+ check_h = ch;
+ if (check_h) check_h /= 2;
+ if (info->coord.y > (cy + check_h))
+ {
+ e_mod_move_quickpanel_e_border_move(mb, 0, zone->h);
+ e_mod_move_quickpanel_objs_animation_move(mb, 0, ch);
+ }
+ else
+ {
+ e_mod_move_quickpanel_objs_animation_move(mb, 0, 0);
+ }
+ }
+ }
+ }
+ else
+ {
+ e_mod_move_quickpanel_e_border_move(mb, 0, 0);
+ if (m->qp_scroll_with_clipping)
+ {
+ e_mod_move_quickpanel_objs_animation_move(mb,
+ zone->x,
+ zone->y);
+ }
+ else
+ {
+ e_mod_move_quickpanel_objs_animation_move(mb, 0, 0);
+ }
+ }
+ break;
+ case 270:
+ check_w = mb->w;
+ if (check_w) check_w /= 2;
+ if (info->coord.x > (zone->w - check_w))
+ {
+ if (m->qp_scroll_with_clipping)
+ {
+ e_mod_move_quickpanel_e_border_move(mb, zone->w, 0);
+ e_mod_move_quickpanel_objs_animation_move(mb,
+ zone->x + mb->w,
+ zone->y + mb->h);
+ }
+ else
+ {
+ if (e_mod_move_border_contents_rect_get(mb, &cx, &cy ,&cw, &ch))
+ {
+ check_w = cw;
+ if (check_w) check_w /= 2;
+ if (info->coord.x > (cx + check_w))
+ {
+ e_mod_move_quickpanel_e_border_move(mb, zone->w, 0);
+ e_mod_move_quickpanel_objs_animation_move(mb, cw, 0);
+ }
+ else
+ {
+ e_mod_move_quickpanel_objs_animation_move(mb, 0, 0);
+ }
+ }
+ }
+ }
+ else
+ {
+ e_mod_move_quickpanel_e_border_move(mb, 0, 0);
+ if (m->qp_scroll_with_clipping)
+ {
+ e_mod_move_quickpanel_objs_animation_move(mb, zone->x, zone->y);
+ }
+ else
+ {
+ e_mod_move_quickpanel_objs_animation_move(mb, 0, 0);
+ }
+ }
+ break;
+ default :
+ break;
+ }
+
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco)
+ {
+ if (!mco) continue;
+ e_mod_move_event_click_set(mco->event, EINA_FALSE);
+ }
+
+finish:
+ if (mb->flick_data) e_mod_move_flick_data_free(mb);
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_quickpanel_objs_position_set(E_Move_Border *mb,
+ int x,
+ int y)
+{
+ E_Move_Quickpanel_Data *qp_data = NULL;
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_QUICKPANEL_CHECK(mb), EINA_FALSE);
+ qp_data = (E_Move_Quickpanel_Data *)mb->data;
+ if (!qp_data)
+ qp_data = (E_Move_Quickpanel_Data *)e_mod_move_quickpanel_internal_data_add(mb);
+ E_CHECK_RETURN(qp_data, EINA_FALSE);
+ qp_data->x = x; qp_data->y = y;
+ mb->data = qp_data;
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_quickpanel_objs_position_get(E_Move_Border *mb,
+ int *x,
+ int *y)
+{
+ E_Move_Quickpanel_Data *qp_data = NULL;
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(x, EINA_FALSE);
+ E_CHECK_RETURN(y, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_QUICKPANEL_CHECK(mb), EINA_FALSE);
+ qp_data = (E_Move_Quickpanel_Data *)mb->data;
+ E_CHECK_RETURN(qp_data, EINA_FALSE);
+ *x = qp_data->x; *y = qp_data->y;
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_quickpanel_objs_moving_distance_rate_get(E_Move_Border *mb,
+ int angle,
+ double *rate)
+{
+ E_Move *m = NULL;
+ E_Border *bd = NULL;
+ E_Zone *zone = NULL;
+ E_Move_Quickpanel_Data *qp_data = NULL;
+ int x = 0, y = 0;
+ int cx = 0, cy = 0, cw = 0, ch = 0;
+ double dist_rate = 0.0;
+
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(rate, EINA_FALSE);
+ m = mb->m;
+ E_CHECK_RETURN(m, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_QUICKPANEL_CHECK(mb), EINA_FALSE);
+ qp_data = (E_Move_Quickpanel_Data *)mb->data;
+ E_CHECK_RETURN(qp_data, EINA_FALSE);
+ bd = mb->bd;
+ E_CHECK_RETURN(bd, EINA_FALSE);
+ zone = bd->zone;
+ E_CHECK_RETURN(zone, EINA_FALSE);
+
+ if (!_e_mod_move_quickpanel_objs_position_get(mb, &x, &y))
+ return EINA_FALSE;
+
+ switch (angle)
+ {
+ case 0:
+ if (m->qp_scroll_with_clipping)
+ dist_rate = (double)y / (zone->y + zone->h);
+ else
+ {
+ if (e_mod_move_border_contents_rect_get(mb, &cx, &cy ,&cw, &ch))
+ dist_rate = (double)(y + ch) / (zone->y + zone->h);
+ else
+ dist_rate = (double)(y + mb->h) / (zone->y + zone->h);
+ }
+ break;
+ case 90:
+ if (m->qp_scroll_with_clipping)
+ dist_rate = (double)x / (zone->x + zone->w);
+ else
+ {
+ if (e_mod_move_border_contents_rect_get(mb, &cx, &cy ,&cw, &ch))
+ dist_rate = (double)(x + cw) / (zone->x + zone->w);
+ else
+ dist_rate = (double)(x + mb->w) / (zone->x + zone->w);
+ }
+ break;
+ case 180:
+ if (m->qp_scroll_with_clipping)
+ dist_rate = 1.0 - ((double)y / (zone->y + zone->h));
+ else
+ {
+ if (e_mod_move_border_contents_rect_get(mb, &cx, &cy ,&cw, &ch))
+ dist_rate = 1.0 - ((double)(y + cy) / (zone->y + zone->h));
+ else
+ dist_rate = 1.0 - ((double)y / (zone->y + zone->h));
+ }
+ break;
+ case 270:
+ if (m->qp_scroll_with_clipping)
+ dist_rate = 1.0 - ((double)x / (zone->x + zone->w));
+ else
+ {
+ if (e_mod_move_border_contents_rect_get(mb, &cx, &cy ,&cw, &ch))
+ dist_rate = 1.0 - ((double)(x + cx) / (zone->x + zone->w));
+ else
+ dist_rate = 1.0 - ((double)x / (zone->x + zone->w));
+ }
+ break;
+ default :
+ return EINA_FALSE;
+ break;
+ }
+
+ *rate = dist_rate;
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_quickpanel_objs_animation_frame(void *data,
+ double pos)
+{
+ E_Move_Quickpanel_Animation_Data *anim_data = NULL;
+ E_Move_Border *mb = NULL;
+ E_Move_Border *find_mb = NULL;
+ E_Border *bd = NULL;
+ E_Zone *zone = NULL;
+ double frame = pos;
+ int x, y;
+ Ecore_X_Window win;
+ E_Move *m = NULL;
+ Eina_Bool mv_ret = EINA_FALSE;
+
+ anim_data = (E_Move_Quickpanel_Animation_Data *)data;
+ E_CHECK_RETURN(anim_data, EINA_FALSE);
+
+ mb = e_mod_move_quickpanel_find();
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ m = mb->m;
+
+ frame = ecore_animator_pos_map(pos, ECORE_POS_MAP_ACCELERATE, 0.0, 0.0);
+ x = anim_data->sx + anim_data->dx * frame;
+ y = anim_data->sy + anim_data->dy * frame;
+
+ // When Animation is ended, if new window is added or window stack changed, then apply new info
+ if (pos >= 1.0
+ && m->qp_scroll_with_clipping)
+ e_mod_move_quickpanel_below_window_reset();
+
+ e_mod_move_quickpanel_objs_move(mb, x, y);
+
+ if (pos >= 1.0)
+ {
+ bd = mb->bd;
+ zone = bd->zone;
+ mv_ret = e_mod_move_quickpanel_objs_move(mb, anim_data->ex, anim_data->ey);
+
+ if (!mv_ret) // objs move fail case
+ {
+ // while quickpanel is animating, if quickpanel angle changed, qp_objs move could fail. so qp_objs move again with changed angle.
+ if (!E_INTERSECTS(bd->x, bd->y, bd->w, bd->h,
+ zone->x, zone->y, zone->w, zone->h))
+ {
+ if (_e_mod_move_quickpanel_objs_outside_movable_pos_get(mb,
+ &x,
+ &y))
+ e_mod_move_quickpanel_objs_move(mb, x, y);
+ }
+ }
+
+ // send quickpanel to "move end message".
+ e_mod_move_quickpanel_anim_state_send(mb, EINA_FALSE);
+
+ e_mod_move_quickpanel_objs_del(mb);
+ if (!E_INTERSECTS(bd->x, bd->y, bd->w, bd->h,
+ zone->x, zone->y, zone->w, zone->h)) // it work when quickpanel is not equal to zone size
+ {
+ win = e_mod_move_util_client_xid_get(mb);
+
+ EINA_INLIST_REVERSE_FOREACH(m->borders, find_mb)
+ {
+ if (find_mb->visible)
+ {
+ if (find_mb->bd)
+ ecore_x_e_illume_quickpanel_state_send(find_mb->bd->client.win,
+ ECORE_X_ILLUME_QUICKPANEL_STATE_OFF);
+ }
+ else
+ {
+ if (find_mb->bd && find_mb->bd->iconic)
+ ecore_x_e_illume_quickpanel_state_send(find_mb->bd->client.win,
+ ECORE_X_ILLUME_QUICKPANEL_STATE_OFF);
+ }
+ }
+
+ if (!m->qp_scroll_with_clipping)
+ {
+ // if dim use case, hold below windows until dim is on screen
+ // dim hide calls deletion of below window mirror object
+ e_mod_move_quickpanel_dim_hide(mb);
+ }
+ // Set No Composite Mode & Rotation UnLock & Destroy below win's mirror object
+ e_mod_move_quickpanel_stage_deinit(mb);
+ }
+
+ // if scroll with clipping use case, hold below windows until only animation is working
+ if (m->qp_scroll_with_visible_win &&
+ m->qp_scroll_with_clipping)
+ {
+ _e_mod_move_quickpanel_below_window_objs_del();
+ _e_mod_move_quickpanel_below_window_unset();
+ }
+
+ memset(anim_data, 0, sizeof(E_Move_Quickpanel_Animation_Data));
+ E_FREE(anim_data);
+ mb->anim_data = NULL;
+ }
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_quickpanel_flick_process(E_Move_Border *mb,
+ int angle,
+ Eina_Bool state)
+{
+ E_Move *m = NULL;
+ E_Move_Control_Object *mco = NULL;
+ Eina_List *l;
+ int mx = 0, my = 0, ax = 0, ay = 0;
+ E_Zone *zone = NULL;
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_QUICKPANEL_CHECK(mb), EINA_FALSE);
+ E_CHECK_RETURN(state, EINA_FALSE);
+
+ m = mb->m;
+ zone = mb->bd->zone;
+
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco) // apptray click unset
+ {
+ if (!mco) continue;
+ e_mod_move_event_click_set(mco->event, EINA_FALSE);
+ }
+
+ e_mod_move_flick_data_free(mb);
+
+ switch (angle)
+ {
+ case 90:
+ mx = mb->w * -1; my = 0;
+ if (m->qp_scroll_with_clipping)
+ {
+ ax = zone->x; ay = zone->y;
+ }
+ else
+ {
+ ax = mx; ay = my;
+ }
+ break;
+ case 180:
+ mx = 0; my = zone->h;
+ if (m->qp_scroll_with_clipping)
+ {
+ ax = zone->x + mb->w;
+ ay = zone->y + mb->h;
+ }
+ else
+ {
+ ax = mx; ay = my;
+ }
+ break;
+ case 270:
+ mx = zone->w; my = 0;
+ if (m->qp_scroll_with_clipping)
+ {
+ ax = zone->x + mb->w;
+ ay = zone->y + mb->h;
+ }
+ else
+ {
+ ax = mx; ay = my;
+ }
+ break;
+ case 0:
+ default :
+ mx = 0; my = mb->h * -1;
+ if (m->qp_scroll_with_clipping)
+ {
+ ax = zone->x; ay = zone->y;
+ }
+ else
+ {
+ ax = mx; ay = my;
+ }
+ break;
+ }
+
+ e_mod_move_quickpanel_e_border_move(mb, mx, my);
+ e_mod_move_quickpanel_objs_animation_move(mb, ax, ay);
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_quickpanel_dim_objs_apply(E_Move_Border *mb,
+ int x,
+ int y)
+{
+ int angle;
+ int mx, my;
+ int opacity;
+ int dim_max;
+ E_Zone *zone = NULL;
+ E_Move_Quickpanel_Data *qp_data = NULL;
+ int cx, cy, cw, ch;
+
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_QUICKPANEL_CHECK(mb), EINA_FALSE);
+ E_CHECK_RETURN(mb->data, EINA_FALSE);
+
+ qp_data = (E_Move_Quickpanel_Data *)mb->data;
+ E_CHECK_RETURN(qp_data->dim_objs, EINA_FALSE);
+
+ angle = mb->angle;
+ zone = mb->bd->zone;
+ dim_max = mb->m->dim_max_opacity;
+
+ switch (angle)
+ {
+ case 90:
+ if (e_mod_move_border_contents_rect_get(mb, &cx, &cy ,&cw, &ch))
+ {
+ mx = x + cw;
+ if (cw)
+ opacity = dim_max * mx / cw;
+ else
+ opacity = dim_max;
+ }
+ else
+ {
+ mx = x + mb->w;
+ if (mb->w)
+ opacity = dim_max * mx / mb->w;
+ else
+ opacity = dim_max;
+ }
+ break;
+ case 180:
+ if (e_mod_move_border_contents_rect_get(mb, &cx, &cy ,&cw, &ch))
+ {
+ my = zone->h - (cy + y);
+ if (ch)
+ opacity = dim_max * my / ch;
+ else
+ opacity = dim_max;
+ }
+ else
+ {
+ my = zone->h - y;
+ if (zone->h)
+ opacity = dim_max * my / zone->h;
+ else
+ opacity = dim_max;
+ }
+ break;
+ case 270:
+ if (e_mod_move_border_contents_rect_get(mb, &cx, &cy ,&cw, &ch))
+ {
+ mx = zone->w - (cx + x);
+ if (cw)
+ opacity = dim_max * mx / cw;
+ else
+ opacity = dim_max;
+ }
+ else
+ {
+ mx = zone->w - x;
+ if (zone->w)
+ opacity = dim_max * mx / zone->w;
+ else
+ opacity = dim_max;
+ }
+ break;
+ case 0:
+ default :
+ if (e_mod_move_border_contents_rect_get(mb, &cx, &cy ,&cw, &ch))
+ {
+ my = y + ch;
+ if (ch)
+ opacity = dim_max * my / ch;
+ else
+ opacity = dim_max;
+ }
+ else
+ {
+ my = y + mb->h;
+ if (mb->h)
+ opacity = dim_max * my / mb->h;
+ else
+ opacity = dim_max;
+ }
+ break;
+ }
+
+ e_mod_move_bd_move_dim_objs_opacity_set(qp_data->dim_objs, opacity);
+ qp_data->opacity = opacity;
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_quickpanel_below_window_set(void)
+{
+ E_Move *m;
+ E_Move_Border *mb;
+ E_Zone *zone = NULL;
+ Eina_Bool found = EINA_FALSE;
+
+ m = e_mod_move_util_get();
+ E_CHECK_RETURN(m, EINA_FALSE);
+
+ EINA_INLIST_REVERSE_FOREACH(m->borders, mb)
+ {
+ if (!found && TYPE_QUICKPANEL_CHECK(mb))
+ {
+ found = EINA_TRUE;
+ zone = mb->bd->zone;
+ }
+
+ if (found)
+ {
+ if (!TYPE_QUICKPANEL_CHECK(mb)
+ && !TYPE_INDICATOR_CHECK(mb)
+ && !TYPE_APPTRAY_CHECK(mb)
+ && E_INTERSECTS(mb->x, mb->y, mb->w, mb->h,
+ zone->x, zone->y, zone->w, zone->h)
+ && (mb->visible))
+ {
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s w:0x%08x %s() \n", "EVAS_OBJ",
+ mb->bd->win, __func__);
+ mb->animate_move = EINA_TRUE;
+ }
+ }
+ }
+ return found;
+}
+
+static void
+_e_mod_move_quickpanel_below_window_unset(void)
+{
+ E_Move *m;
+ E_Move_Border *mb;
+
+ m = e_mod_move_util_get();
+ E_CHECK(m);
+
+ EINA_INLIST_REVERSE_FOREACH(m->borders, mb)
+ {
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s w:0x%08x %s() \n", "EVAS_OBJ",
+ mb->bd->win, __func__);
+ mb->animate_move = EINA_FALSE;
+ }
+}
+
+static Eina_Bool
+_e_mod_move_quickpanel_below_window_objs_add(void)
+{
+ E_Move *m;
+ E_Move_Border *mb;
+ Eina_Bool mirror = EINA_TRUE;
+ m = e_mod_move_util_get();
+ E_CHECK_RETURN(m, EINA_FALSE);
+
+ EINA_INLIST_REVERSE_FOREACH(m->borders, mb)
+ {
+ if (mb->animate_move)
+ {
+ if (!(mb->objs))
+ {
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s w:0x%08x %s() \n",
+ "EVAS_OBJ", mb->bd->win, __func__);
+ mb->objs = e_mod_move_bd_move_objs_add(mb, mirror);
+ e_mod_move_bd_move_objs_move(mb, mb->x, mb->y);
+ e_mod_move_bd_move_objs_resize(mb, mb->w, mb->h);
+ e_mod_move_bd_move_objs_show(mb);
+ }
+ }
+ }
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_quickpanel_below_window_objs_del(void)
+{
+ E_Move *m;
+ E_Move_Border *mb;
+ m = e_mod_move_util_get();
+ E_CHECK_RETURN(m, EINA_FALSE);
+
+ EINA_INLIST_REVERSE_FOREACH(m->borders, mb)
+ {
+ if (mb->animate_move)
+ {
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s w:0x%08x %s() \n",
+ "EVAS_OBJ", mb->bd->win, __func__);
+ e_mod_move_bd_move_objs_del(mb, mb->objs);
+ mb->objs = NULL;
+ }
+ }
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_quickpanel_below_window_objs_move(int x,
+ int y)
+{
+ E_Move *m;
+ E_Move_Border *mb, *qp_mb;
+ E_Zone *zone;
+ int angle;
+ int cx = 0, cy = 0, cw = 0, ch = 0;
+ int mx = 0, my = 0;
+ m = e_mod_move_util_get();
+ E_CHECK_RETURN(m, EINA_FALSE);
+ qp_mb = e_mod_move_quickpanel_find();
+ E_CHECK_RETURN(qp_mb, EINA_FALSE);
+
+ if (!m->qp_scroll_with_clipping
+ && !e_mod_move_border_contents_rect_get(qp_mb, &cx, &cy ,&cw, &ch))
+ return EINA_FALSE;
+
+ angle = qp_mb->angle;
+ zone = qp_mb->bd->zone;
+
+ EINA_INLIST_REVERSE_FOREACH(m->borders, mb)
+ {
+ if (mb->animate_move)
+ {
+ switch (angle)
+ {
+ case 0:
+ mx = mb->x;
+ if (m->qp_scroll_with_clipping)
+ my = y + mb->y;
+ else
+ my = y + ch + mb->y;
+ break;
+ case 90:
+ if (m->qp_scroll_with_clipping)
+ mx = x + mb->x;
+ else
+ mx = x + cw + mb->x;
+ my = mb->y;
+ break;
+ case 180:
+ mx = mb->x;
+ if (m->qp_scroll_with_clipping)
+ my = mb->y - (zone->h - y);
+ else
+ my = y - ch + mb->y;
+ break;
+ case 270:
+ if (m->qp_scroll_with_clipping)
+ mx = mb->x - (zone->w - x);
+ else
+ mx = x - cw + mb->x;
+ my = mb->y;
+ break;
+ default :
+ break;
+ }
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s w:0x%08x %s() (%d,%d)\n",
+ "EVAS_OBJ", mb->bd->win, __func__, mx, my);
+ e_mod_move_bd_move_objs_move(mb, mx, my);
+ }
+ }
+
+ // if qp_scroll_with_clipping case, make cw / ch data for e_mod_move_util_fb_move()
+ if (m->qp_scroll_with_clipping)
+ {
+ switch (angle)
+ {
+ case 180:
+ ch = zone->h;
+ break;
+ case 270:
+ cw = zone->w;
+ break;
+ default:
+ break;
+ }
+ }
+
+ e_mod_move_util_fb_move(angle, cw, ch, x, y);
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_quickpanel_handle_objs_add(E_Move_Border *mb)
+{
+ E_Move *m = NULL;
+ int hx = 0, hy = 0, hw = 0, hh = 0;
+ E_Move_Quickpanel_Data *qp_data = NULL;
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_QUICKPANEL_CHECK(mb), EINA_FALSE);
+
+ qp_data = (E_Move_Quickpanel_Data *)mb->data;
+ E_CHECK_RETURN(qp_data, EINA_FALSE);
+
+ if (!e_mod_move_border_shape_input_rect_get(mb, &hx, &hy, &hw, &hh))
+ return EINA_FALSE;
+
+ m = mb->m;
+ qp_data->handle_objs = e_mod_move_evas_objs_add(m, mb->bd);
+
+ E_CHECK_RETURN(qp_data->handle_objs, EINA_FALSE);
+
+ e_mod_move_evas_objs_raise(qp_data->handle_objs);
+ e_mod_move_evas_objs_move(qp_data->handle_objs, mb->x, mb->y);
+ e_mod_move_evas_objs_resize(qp_data->handle_objs, mb->w, mb->h);
+ e_mod_move_evas_objs_show(qp_data->handle_objs);
+
+ e_mod_move_evas_objs_clipper_add(qp_data->handle_objs);
+ e_mod_move_evas_objs_clipper_move(qp_data->handle_objs, mb->x + hx, mb->y + hy);
+ e_mod_move_evas_objs_clipper_resize(qp_data->handle_objs, hw, hh);
+ e_mod_move_evas_objs_clipper_show(qp_data->handle_objs);
+
+ e_mod_move_evas_objs_del_cb_set(&(qp_data->handle_objs));
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_quickpanel_handle_objs_del(E_Move_Border *mb)
+{
+ E_Move *m = NULL;
+ E_Move_Quickpanel_Data *qp_data = NULL;
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_QUICKPANEL_CHECK(mb), EINA_FALSE);
+
+ qp_data = (E_Move_Quickpanel_Data *)mb->data;
+ E_CHECK_RETURN(qp_data, EINA_FALSE);
+
+ m = mb->m;
+ E_CHECK_RETURN(qp_data->handle_objs,EINA_FALSE);
+
+ e_mod_move_evas_objs_clipper_hide(qp_data->handle_objs);
+ e_mod_move_evas_objs_clipper_del(qp_data->handle_objs);
+ e_mod_move_evas_objs_hide(qp_data->handle_objs);
+ e_mod_move_evas_objs_del(qp_data->handle_objs);
+
+ qp_data->handle_objs = NULL;
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_quickpanel_handle_objs_size_update(E_Move_Border *mb,
+ int w,
+ int h)
+{
+ E_Move_Quickpanel_Data *qp_data = NULL;
+
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_QUICKPANEL_CHECK(mb), EINA_FALSE);
+
+ qp_data = (E_Move_Quickpanel_Data *)mb->data;
+ E_CHECK_RETURN(qp_data, EINA_FALSE);
+
+ E_CHECK_RETURN(qp_data->handle_objs,EINA_FALSE);
+
+ e_mod_move_evas_objs_clipper_resize(qp_data->handle_objs, w, h);
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool _e_mod_move_quickpanel_handle_objs_move(E_Move_Border *mb,
+ int x,
+ int y)
+{
+ int hx = 0, hy = 0, hw = 0, hh = 0; // handle's x, y, w, h
+ E_Zone *zone = NULL;
+ E_Move *m = NULL;
+ E_Move_Quickpanel_Data *qp_data = NULL;
+ int angle =0;
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_QUICKPANEL_CHECK(mb), EINA_FALSE);
+
+ qp_data = (E_Move_Quickpanel_Data *)mb->data;
+ E_CHECK_RETURN(qp_data, EINA_FALSE);
+
+ m = mb->m;
+ E_CHECK_RETURN(qp_data->handle_objs,EINA_FALSE);
+
+ if (!e_mod_move_border_shape_input_rect_get(mb, &hx, &hy, &hw, &hh))
+ return EINA_FALSE;
+
+ angle = mb->angle;
+ zone = mb->bd->zone;
+ switch (angle)
+ {
+ case 90:
+ e_mod_move_evas_objs_move(qp_data->handle_objs, x - mb->w + hw, zone->y);
+ e_mod_move_evas_objs_clipper_move(qp_data->handle_objs, x, zone->y);
+ break;
+ case 180:
+ e_mod_move_evas_objs_move(qp_data->handle_objs, zone->x, y - hh);
+ e_mod_move_evas_objs_clipper_move(qp_data->handle_objs, zone->x, y - hh);
+ // y - hh 's -hh means overlaping app's indicator region
+ break;
+ case 270:
+ e_mod_move_evas_objs_move(qp_data->handle_objs, x - hw, zone->y);
+ e_mod_move_evas_objs_clipper_move(qp_data->handle_objs, x - hw, zone->y);
+ // x - hw 's -hw means overlaping app's indicator region
+ break;
+ case 0:
+ default:
+ e_mod_move_evas_objs_move(qp_data->handle_objs, zone->x, y - mb->h + hh);
+ e_mod_move_evas_objs_clipper_move(qp_data->handle_objs, zone->x, y);
+ break;
+ }
+
+ return EINA_TRUE;
+}
+
+// this function check moving objs go over screen or not
+static Eina_Bool
+_e_mod_move_quickpanel_objs_check_on_screen(E_Move_Border *mb,
+ int x,
+ int y)
+{
+ E_Zone *zone = NULL;
+ Eina_Bool ret = EINA_FALSE;
+ int hx = 0, hy = 0, hw = 0, hh = 0; // handle's x, y, w, h
+
+ E_CHECK_RETURN(mb, FALSE);
+ E_CHECK_RETURN(TYPE_QUICKPANEL_CHECK(mb), FALSE);
+
+ if (!e_mod_move_border_shape_input_rect_get(mb, &hx, &hy, &hw, &hh))
+ return EINA_FALSE;
+
+ zone = mb->bd->zone;
+ switch (mb->angle)
+ {
+ // don't go over screen
+ case 90:
+ if (x + hw <= zone->x + zone->w) ret = EINA_TRUE;
+ break;
+ case 180:
+ if (y - hh >= zone->y) ret = EINA_TRUE;
+ break;
+ case 270:
+ if (x - hw >= zone->x) ret = EINA_TRUE;
+ break;
+ case 0:
+ default:
+ if (y + hh <= zone->y + zone->h) ret = EINA_TRUE;
+ break;
+ }
+ return ret;
+}
+
+static Eina_Bool
+_e_mod_move_quickpanel_animation_change_with_angle(E_Move_Border *mb)
+{
+ E_Move *m = NULL;
+ E_Border *bd = NULL;
+ int ax = 0, ay = 0; // animation x, animation y
+ int px = 0, py = 0; // position x, position y
+ int cx = 0, cy = 0, cw = 0, ch = 0;
+ int curr_angle = 0, prev_angle = 0;
+ double dist_rate = 0.0;
+ E_Zone *zone = NULL;
+
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_QUICKPANEL_CHECK(mb), EINA_FALSE);
+
+ m = mb->m;
+ E_CHECK_RETURN(m, EINA_FALSE);
+ bd = mb->bd;
+ E_CHECK_RETURN(bd, EINA_FALSE);
+ zone = bd->zone;
+ E_CHECK_RETURN(zone, EINA_FALSE);
+
+ if (!e_mod_move_util_win_prop_angle_get(bd->client.win,
+ &curr_angle,
+ &prev_angle))
+ return EINA_FALSE;
+
+ if (!e_mod_move_quickpanel_objs_animation_state_get(mb))
+ return EINA_FALSE;
+
+ if (!_e_mod_move_quickpanel_objs_moving_distance_rate_get(mb, prev_angle, &dist_rate))
+ return EINA_FALSE;
+
+ // new_position set with distance rate
+ switch (curr_angle)
+ {
+ case 90:
+ if (m->qp_scroll_with_clipping)
+ px = (dist_rate * (zone->x + zone->w));
+ else
+ {
+ if (e_mod_move_border_contents_rect_get(mb, &cx, &cy ,&cw, &ch))
+ px = (dist_rate * (zone->x + zone->w)) - cw;
+ else
+ px = (dist_rate * (zone->x + zone->w)) - mb->w;
+ }
+ break;
+ case 180:
+ if (m->qp_scroll_with_clipping)
+ py = (1.0 - dist_rate) * (zone->y + zone->h);
+ else
+ {
+ if (e_mod_move_border_contents_rect_get(mb, &cx, &cy ,&cw, &ch))
+ py = (1.0 - dist_rate) * (zone->y + zone->h) - cy;
+ else
+ py = (1.0 - dist_rate) * (zone->y + zone->h);
+ }
+ break;
+ case 270:
+ if (m->qp_scroll_with_clipping)
+ px = (1.0 - dist_rate) * (zone->x + zone->w);
+ else
+ {
+ if (e_mod_move_border_contents_rect_get(mb, &cx, &cy ,&cw, &ch))
+ px = (1.0 - dist_rate) * (zone->x + zone->w) - ch;
+ else
+ px = (1.0 - dist_rate) * (zone->x + zone->w);
+ }
+ break;
+ case 0:
+ default :
+ if (m->qp_scroll_with_clipping)
+ py = (dist_rate * (zone->y + zone->h));
+ else
+ {
+ if (e_mod_move_border_contents_rect_get(mb, &cx, &cy ,&cw, &ch))
+ py = (dist_rate * (zone->y + zone->h)) - ch;
+ else
+ py = (dist_rate * (zone->y + zone->h)) - mb->h;
+ }
+ break;
+ }
+ _e_mod_move_quickpanel_objs_position_set(mb, px, py);
+
+ // set info for new animation
+ switch(e_mod_move_quickpanel_objs_animation_direction_get(mb))
+ {
+ case E_MOVE_ANIMATION_DIRECTION_INSIDE:
+ switch (curr_angle)
+ {
+ case 180:
+ case 270:
+ if (m->qp_scroll_with_clipping)
+ {
+ ax = zone->x;
+ ay = zone->y;
+ }
+ break;
+ case 0:
+ case 90:
+ default :
+ if (m->qp_scroll_with_clipping)
+ {
+ ax = zone->x + mb->w;
+ ay = zone->y + mb->h;
+ }
+ break;
+ }
+ break;
+ case E_MOVE_ANIMATION_DIRECTION_OUTSIDE:
+ {
+ switch (curr_angle)
+ {
+ case 90:
+ if (m->qp_scroll_with_clipping)
+ {
+ ax = zone->x; ay = zone->y;
+ }
+ else
+ {
+ ax = mb->w * -1;
+ }
+ break;
+ case 180:
+ if (m->qp_scroll_with_clipping)
+ {
+ ax = zone->x + mb->w;
+ ay = zone->y + mb->h;
+ }
+ else
+ {
+ ay = zone->h;
+ }
+ break;
+ case 270:
+ if (m->qp_scroll_with_clipping)
+ {
+ ax = zone->x + mb->w;
+ ay = zone->y + mb->h;
+ }
+ else
+ {
+ ax = zone->w;
+ }
+ break;
+ case 0:
+ default :
+ if (m->qp_scroll_with_clipping)
+ {
+ ax = zone->x; ay = zone->y;
+ }
+ else
+ {
+ ay = mb->h * -1;
+ }
+ break;
+ }
+ }
+ break;
+ case E_MOVE_ANIMATION_DIRECTION_NONE:
+ default:
+ return EINA_FALSE;
+ }
+
+ e_mod_move_quickpanel_objs_animation_stop(mb);
+ e_mod_move_quickpanel_objs_animation_clear(mb);
+ e_mod_move_quickpanel_objs_add(mb);
+
+ //prevent handler object flickering, if input region update, then show handler again.
+ _e_mod_move_quickpanel_handle_objs_size_update(mb, 0, 0);
+
+ e_mod_move_quickpanel_objs_animation_move(mb, ax, ay);
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_mod_move_quickpanel_fb_move_change_with_angle(E_Move_Border *mb)
+{
+ E_Move *m = NULL;
+ E_Border *bd = NULL;
+ int ax = 0, ay = 0;
+ int cx = 0, cy = 0, cw = 0, ch = 0;
+ int curr_angle = 0, prev_angle = 0;
+ E_Zone *zone = NULL;
+
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_QUICKPANEL_CHECK(mb), EINA_FALSE);
+
+ m = mb->m;
+ E_CHECK_RETURN(m, EINA_FALSE);
+ bd = mb->bd;
+ E_CHECK_RETURN(bd, EINA_FALSE);
+ zone = bd->zone;
+ E_CHECK_RETURN(zone, EINA_FALSE);
+
+ if (!e_mod_move_util_win_prop_angle_get(bd->client.win,
+ &curr_angle,
+ &prev_angle))
+ return EINA_FALSE;
+
+ if (e_mod_move_quickpanel_objs_animation_state_get(mb))
+ return EINA_FALSE;
+
+ if (!E_INTERSECTS(bd->x, bd->y, bd->w, bd->h,
+ zone->x, zone->y, zone->w, zone->h)) // it work when quickpanel exists inside zone
+ return EINA_FALSE;
+
+ // if none-clipping scroll and none-content-rect then return, because there are not scroll info
+ if (!m->qp_scroll_with_clipping
+ && !e_mod_move_border_contents_rect_get(mb, &cx, &cy ,&cw, &ch))
+ return EINA_FALSE;
+
+ switch (curr_angle)
+ {
+ case 90:
+ if (m->qp_scroll_with_clipping)
+ {
+ ax = zone->x + mb->w;
+ ay = zone->y + mb->h;
+ }
+ break;
+ case 180:
+ if (m->qp_scroll_with_clipping)
+ {
+ ax = zone->x; ay = zone->y;
+ }
+ else
+ {
+ ay = zone->h - mb->h;
+ }
+ break;
+ case 270:
+ if (m->qp_scroll_with_clipping)
+ {
+ ax = zone->x; ay = zone->y;
+ }
+ else
+ {
+ ax = zone->w - mb->w;
+ }
+ break;
+ case 0:
+ default :
+ if (m->qp_scroll_with_clipping)
+ {
+ ax = zone->x + mb->w;
+ ay = zone->y + mb->h;
+ }
+ break;
+ }
+
+ if (m->qp_scroll_with_clipping)
+ {
+ switch (curr_angle)
+ {
+ case 180:
+ ch = zone->h;
+ break;
+ case 270:
+ cw = zone->w;
+ break;
+ default:
+ break;
+ }
+ }
+
+ e_mod_move_util_fb_move(curr_angle, cw, ch, ax, ay);
+
+ return EINA_TRUE;
+}
+
+/* externally accessible functions */
+EINTERN void
+e_mod_move_quickpanel_ctl_obj_event_setup(E_Move_Border *mb,
+ E_Move_Control_Object *mco)
+{
+ E_CHECK(mb);
+ E_CHECK(mco);
+ E_CHECK(TYPE_QUICKPANEL_CHECK(mb));
+
+ mco->event = e_mod_move_event_new(mb->bd->client.win, mco->obj);
+ E_CHECK(mco->event);
+
+ e_mod_move_event_data_type_set(mco->event, E_MOVE_EVENT_DATA_TYPE_BORDER);
+ e_mod_move_event_angle_cb_set(mco->event,
+ e_mod_move_util_win_prop_angle_get);
+ e_mod_move_event_cb_set(mco->event, E_MOVE_EVENT_TYPE_MOTION_START,
+ _e_mod_move_quickpanel_cb_motion_start, mb);
+ e_mod_move_event_cb_set(mco->event, E_MOVE_EVENT_TYPE_MOTION_MOVE,
+ _e_mod_move_quickpanel_cb_motion_move, mb);
+ e_mod_move_event_cb_set(mco->event, E_MOVE_EVENT_TYPE_MOTION_END,
+ _e_mod_move_quickpanel_cb_motion_end, mb);
+ e_mod_move_event_send_all_set(mco->event, EINA_TRUE);
+}
+
+EINTERN E_Move_Border *
+e_mod_move_quickpanel_base_find(void)
+{
+ E_Move *m;
+ E_Move_Border *mb;
+
+ m = e_mod_move_util_get();
+ E_CHECK_RETURN(m, 0);
+
+ EINA_INLIST_REVERSE_FOREACH(m->borders, mb)
+ {
+ if (TYPE_QUICKPANEL_BASE_CHECK(mb)) return mb;
+ }
+ return NULL;
+}
+
+EINTERN E_Move_Border *
+e_mod_move_quickpanel_find(void)
+{
+ E_Move *m;
+ E_Move_Border *mb;
+
+ m = e_mod_move_util_get();
+ E_CHECK_RETURN(m, 0);
+
+ EINA_INLIST_REVERSE_FOREACH(m->borders, mb)
+ {
+ if (TYPE_QUICKPANEL_CHECK(mb)) return mb;
+ }
+ return NULL;
+}
+
+EINTERN Eina_Bool
+e_mod_move_quickpanel_click_get(void)
+{
+ E_Move_Border *mb = NULL;
+ Eina_Bool click = EINA_FALSE;
+ E_Move_Control_Object *mco = NULL;
+ Eina_List *l;
+
+ mb = e_mod_move_quickpanel_find();
+ E_CHECK_RETURN(mb, EINA_FALSE);
+
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco)
+ {
+ if (!mco) continue;
+ click = e_mod_move_event_click_get(mco->event);
+ }
+
+ return click;
+}
+
+EINTERN Eina_Bool
+e_mod_move_quickpanel_event_clear(void)
+{
+ E_Move_Border *mb = NULL;
+ Eina_Bool click = EINA_FALSE;
+ E_Move_Control_Object *mco = NULL;
+ Eina_List *l;
+
+ mb = e_mod_move_quickpanel_find();
+ E_CHECK_RETURN(mb, EINA_FALSE);
+
+ click = e_mod_move_quickpanel_click_get();
+ E_CHECK_RETURN(click, EINA_FALSE);
+
+ EINA_LIST_FOREACH(mb->ctl_objs, l, mco)
+ {
+ if (!mco) continue;
+ e_mod_move_event_data_clear(mco->event);
+ e_mod_move_event_click_set(mco->event, EINA_FALSE);
+ }
+
+ if (mb->flick_data) e_mod_move_flick_data_free(mb);
+
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_quickpanel_objs_add(E_Move_Border *mb)
+{
+ E_Move *m = NULL;
+ Eina_Bool mirror = EINA_TRUE;
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_QUICKPANEL_CHECK(mb), EINA_FALSE);
+
+ m = mb->m;
+
+ if (!(mb->objs))
+ {
+ mb->objs = e_mod_move_bd_move_objs_add(mb, mirror);
+ e_mod_move_bd_move_objs_move(mb, mb->x, mb->y);
+ e_mod_move_bd_move_objs_resize(mb, mb->w, mb->h);
+ e_mod_move_bd_move_objs_show(mb);
+
+ if (m->qp_scroll_with_clipping)
+ {
+ e_mod_move_quickpanel_objs_clipper_add(mb);
+ _e_mod_move_quickpanel_handle_objs_add(mb);
+
+ // make below window's mirror object for animation
+ if (m->qp_scroll_with_visible_win)
+ {
+ _e_mod_move_quickpanel_below_window_set();
+ _e_mod_move_quickpanel_below_window_objs_add();
+ }
+ }
+ }
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_quickpanel_objs_del(E_Move_Border *mb)
+{
+ E_Move *m = NULL;
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_QUICKPANEL_CHECK(mb), EINA_FALSE);
+ m = mb->m;
+
+ if (m->qp_scroll_with_clipping)
+ {
+ e_mod_move_quickpanel_objs_clipper_del(mb);
+ _e_mod_move_quickpanel_handle_objs_del(mb);
+ }
+
+ e_mod_move_bd_move_objs_del(mb, mb->objs);
+
+ mb->objs = NULL;
+
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_quickpanel_objs_move(E_Move_Border *mb,
+ int x,
+ int y)
+{
+ E_Move *m = NULL;
+ E_Zone *zone = NULL;
+ int cx = 0, cy = 0, cw = 0, ch = 0;
+
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_QUICKPANEL_CHECK(mb), EINA_FALSE);
+
+ m = mb->m;
+ zone = mb->bd->zone;
+
+ _e_mod_move_quickpanel_objs_position_set(mb, x, y);
+
+ // QP UX
+ if (m->qp_scroll_with_clipping)
+ {
+ e_mod_move_bd_move_objs_move(mb, zone->x, zone->y); // in general, zone->x:0, zone->y: 0
+ e_mod_move_quickpanel_objs_clipper_apply(mb, x, y); // move clipper
+
+ // check handle & below window don't go over screen
+ if (!_e_mod_move_quickpanel_objs_check_on_screen(mb, x , y))
+ return EINA_FALSE;
+
+ _e_mod_move_quickpanel_handle_objs_move(mb, x, y);; // move handle (mirror with clipper) object
+
+ if (m->qp_scroll_with_visible_win)
+ {
+ if (POINT_INSIDE_ZONE(x, y, zone))
+ _e_mod_move_quickpanel_below_window_objs_move(x, y);
+ }
+ }
+ else
+ {
+ e_mod_move_bd_move_objs_move(mb, x, y);
+ _e_mod_move_quickpanel_dim_objs_apply(mb, x, y);
+
+ if (m->qp_scroll_with_visible_win)
+ {
+ if (e_mod_move_border_contents_rect_get(mb, &cx, &cy ,&cw, &ch))
+ {
+ if (E_INTERSECTS(x+cx, y+cy, cw, ch, zone->x, zone->y, zone->w, zone->h))
+ _e_mod_move_quickpanel_below_window_objs_move(x, y);
+ }
+ }
+ }
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_quickpanel_objs_animation_move_with_time(E_Move_Border *mb,
+ int x,
+ int y,
+ double anim_time)
+{
+ E_Move_Quickpanel_Animation_Data *anim_data = NULL;
+ Ecore_Animator *animator = NULL;
+ int sx, sy; //start x, start y
+ int angle = 0;
+
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_QUICKPANEL_CHECK(mb), EINA_FALSE);
+ E_CHECK_RETURN(mb->m, EINA_FALSE);
+
+ if (e_mod_move_quickpanel_objs_animation_state_get(mb))
+ {
+ e_mod_move_quickpanel_objs_animation_stop(mb);
+ e_mod_move_quickpanel_objs_animation_clear(mb);
+ }
+
+ anim_data = E_NEW(E_Move_Quickpanel_Animation_Data, 1);
+ E_CHECK_RETURN(anim_data, EINA_FALSE);
+
+ if (_e_mod_move_quickpanel_objs_position_get(mb, &sx, &sy))
+ {
+ anim_data->sx = sx;
+ anim_data->sy = sy;
+ }
+ else
+ {
+ // below cases are quickpanel is on screen case, so set start position with quickpanel's screen position
+ if (mb->m->qp_scroll_with_clipping)
+ {
+ angle = mb->angle;
+ switch (angle)
+ {
+ case 0:
+ case 90:
+ default:
+ anim_data->sx = mb->x + mb->w;
+ anim_data->sy = mb->y + mb->h;
+ break;
+ case 180:
+ case 270:
+ anim_data->sx = mb->x;
+ anim_data->sy = mb->y;
+ break;
+ }
+ }
+ else
+ {
+ anim_data->sx = mb->x;
+ anim_data->sy = mb->y;
+ }
+ _e_mod_move_quickpanel_objs_position_set(mb,
+ anim_data->sx,
+ anim_data->sy);
+ }
+
+ anim_data->ex = x;
+ anim_data->ey = y;
+ anim_data->dx = anim_data->ex - anim_data->sx;
+ anim_data->dy = anim_data->ey - anim_data->sy;
+
+ animator = ecore_animator_timeline_add(anim_time,
+ _e_mod_move_quickpanel_objs_animation_frame,
+ anim_data);
+ if (!animator)
+ {
+ memset(anim_data, 0, sizeof(E_Move_Quickpanel_Animation_Data));
+ E_FREE(anim_data);
+ return EINA_FALSE;
+ }
+
+ anim_data->animator = animator;
+ anim_data->animating = EINA_TRUE;
+ mb->anim_data = anim_data;
+
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_quickpanel_objs_animation_move(E_Move_Border *mb,
+ int x,
+ int y)
+{
+ double anim_time = 0.0;
+
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_QUICKPANEL_CHECK(mb), EINA_FALSE);
+ E_CHECK_RETURN(mb->m, EINA_FALSE);
+ anim_time = mb->m->animation_duration;
+ return e_mod_move_quickpanel_objs_animation_move_with_time(mb, x, y, anim_time);
+}
+
+EINTERN Eina_Bool
+e_mod_move_quickpanel_objs_animation_state_get(E_Move_Border *mb)
+{
+ E_Move_Quickpanel_Animation_Data *anim_data = NULL;
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_QUICKPANEL_CHECK(mb), EINA_FALSE);
+
+ E_CHECK_RETURN(mb->anim_data, EINA_FALSE);
+ anim_data = (E_Move_Quickpanel_Animation_Data *)mb->anim_data;
+ E_CHECK_RETURN(anim_data->animating, EINA_FALSE);
+ return EINA_TRUE;
+}
+
+EINTERN E_Move_Animation_Direction
+e_mod_move_quickpanel_objs_animation_direction_get(E_Move_Border *mb)
+{
+ E_Border *bd = NULL;
+ E_Zone *zone = NULL;
+ E_Move_Quickpanel_Animation_Data *anim_data = NULL;
+ E_CHECK_RETURN(mb, E_MOVE_ANIMATION_DIRECTION_NONE);
+ E_CHECK_RETURN(TYPE_QUICKPANEL_CHECK(mb), E_MOVE_ANIMATION_DIRECTION_NONE);
+ bd= mb->bd;
+ E_CHECK_RETURN(bd, E_MOVE_ANIMATION_DIRECTION_NONE);
+ zone = bd->zone;
+ E_CHECK_RETURN(zone, E_MOVE_ANIMATION_DIRECTION_NONE);
+ E_CHECK_RETURN(mb->anim_data, E_MOVE_ANIMATION_DIRECTION_NONE);
+ anim_data = (E_Move_Quickpanel_Animation_Data *)mb->anim_data;
+
+ if (E_INTERSECTS(bd->x, bd->y, bd->w, bd->h,
+ zone->x, zone->y, zone->w, zone->h))
+ {
+ // animation's end position is inside zone.
+ return E_MOVE_ANIMATION_DIRECTION_INSIDE;
+ }
+ else
+ {
+ // animation's end position is outside zone.
+ return E_MOVE_ANIMATION_DIRECTION_OUTSIDE;
+ }
+}
+
+EINTERN Eina_Bool
+e_mod_move_quickpanel_objs_animation_stop(E_Move_Border *mb)
+{
+ E_Move_Quickpanel_Animation_Data *anim_data = NULL;
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_QUICKPANEL_CHECK(mb), EINA_FALSE);
+
+ E_CHECK_RETURN(mb->anim_data, EINA_FALSE);
+ anim_data = (E_Move_Quickpanel_Animation_Data *)mb->anim_data;
+ ecore_animator_freeze(anim_data->animator);
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_quickpanel_objs_animation_clear(E_Move_Border *mb)
+{
+ E_Move_Quickpanel_Animation_Data *anim_data = NULL;
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_QUICKPANEL_CHECK(mb), EINA_FALSE);
+
+ E_CHECK_RETURN(mb->anim_data, EINA_FALSE);
+ anim_data = (E_Move_Quickpanel_Animation_Data *)mb->anim_data;
+ ecore_animator_del(anim_data->animator);
+ memset(anim_data, 0, sizeof(E_Move_Quickpanel_Animation_Data));
+ E_FREE(anim_data);
+ mb->anim_data = NULL;
+
+ return EINA_TRUE;
+}
+
+EINTERN void*
+e_mod_move_quickpanel_internal_data_add(E_Move_Border *mb)
+{
+ int dim_min;
+ E_Move_Quickpanel_Data *qp_data = NULL;
+ E_CHECK_RETURN(mb, NULL);
+ E_CHECK_RETURN(TYPE_QUICKPANEL_CHECK(mb), NULL);
+ E_CHECK_RETURN(mb->m, NULL);
+ dim_min = mb->m->dim_min_opacity;
+ qp_data = (E_Move_Quickpanel_Data *)mb->data;
+ if (!qp_data)
+ {
+ qp_data = E_NEW(E_Move_Quickpanel_Data, 1);
+ E_CHECK_RETURN(qp_data, NULL);
+ qp_data->x = mb->x;
+ qp_data->y = mb->y;
+ qp_data->dim_objs = NULL;
+ qp_data->opacity = dim_min;
+ mb->data = qp_data;
+ }
+ return mb->data;
+}
+
+EINTERN Eina_Bool
+e_mod_move_quickpanel_internal_data_del(E_Move_Border *mb)
+{
+ E_Move_Quickpanel_Data *qp_data = NULL;
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_QUICKPANEL_CHECK(mb), EINA_FALSE);
+ E_CHECK_RETURN(mb->data, EINA_FALSE);
+ qp_data = (E_Move_Quickpanel_Data *)mb->data;
+
+ if (mb->m->qp_scroll_with_clipping) // "scroll with clipping" uses handle objs so delete here.
+ {
+ _e_mod_move_quickpanel_handle_objs_del(mb);
+ }
+ else // general quickpanel scroll uses dim objs so delete here.
+ {
+ e_mod_move_quickpanel_dim_hide(mb);
+ }
+
+ // Set No Composite Mode & Rotation UnLock & Destroy below win's mirror object
+ e_mod_move_quickpanel_stage_deinit(mb);
+
+ E_FREE(qp_data);
+ mb->data = NULL;
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_quickpanel_e_border_move(E_Move_Border *mb,
+ int x,
+ int y)
+{
+ E_Move *m = NULL;
+ E_Border *bd = NULL;
+ E_Zone *zone = NULL;
+ E_Move_Border *find_mb = NULL;
+ Ecore_X_Window win;
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_QUICKPANEL_CHECK(mb), EINA_FALSE);
+ E_CHECK_RETURN(mb->bd, EINA_FALSE);
+ m = mb->m;
+ bd = mb->bd;
+ zone = bd->zone;
+
+ if (E_CONTAINS(zone->x, zone->y, zone->w, zone->h, x, y, mb->w, mb->h))// On Screen Case, if zone contains border geometry?
+ {
+ win = e_mod_move_util_client_xid_get(mb);
+
+ EINA_INLIST_REVERSE_FOREACH(m->borders, find_mb)
+ {
+ if (find_mb->visible)
+ {
+ if (find_mb->bd)
+ ecore_x_e_illume_quickpanel_state_send(find_mb->bd->client.win,
+ ECORE_X_ILLUME_QUICKPANEL_STATE_ON);
+ }
+ else
+ {
+ if (find_mb->bd && find_mb->bd->iconic)
+ ecore_x_e_illume_quickpanel_state_send(find_mb->bd->client.win,
+ ECORE_X_ILLUME_QUICKPANEL_STATE_ON);
+ }
+ }
+ }
+
+ e_border_move(bd, x, y);
+
+ return EINA_TRUE;
+}
+
+EINTERN Eina_List*
+e_mod_move_quickpanel_dim_show(E_Move_Border *mb)
+{
+ int dim_min;
+ E_Move *m = NULL;
+ E_Move_Quickpanel_Data *qp_data = NULL;
+ E_CHECK_RETURN(mb, NULL);
+ E_CHECK_RETURN(TYPE_QUICKPANEL_CHECK(mb), NULL);
+ qp_data = (E_Move_Quickpanel_Data *)mb->data;
+ m = mb->m;
+ dim_min = m->dim_min_opacity;
+ if (!qp_data)
+ {
+ qp_data = E_NEW(E_Move_Quickpanel_Data, 1);
+ E_CHECK_RETURN(qp_data, NULL);
+
+ qp_data->x = mb->x;
+ qp_data->y = mb->y;
+ qp_data->dim_objs = e_mod_move_bd_move_dim_objs_add(mb);
+ e_mod_move_bd_move_dim_objs_show(qp_data->dim_objs);
+ qp_data->opacity = dim_min;
+ mb->data = qp_data;
+ }
+ else
+ {
+ if (!(qp_data->dim_objs))
+ qp_data->dim_objs = e_mod_move_bd_move_dim_objs_add(mb);
+
+ if (qp_data->dim_objs)
+ {
+ e_mod_move_bd_move_dim_objs_show(qp_data->dim_objs);
+ qp_data->opacity = dim_min;
+ }
+ }
+
+ //qp ux
+ if (m->qp_scroll_with_visible_win)
+ {
+ _e_mod_move_quickpanel_below_window_set();
+ _e_mod_move_quickpanel_below_window_objs_add();
+ }
+
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s w:0x%08x %s()\n",
+ "EVAS_OBJ", mb->bd->win, __func__);
+
+ return qp_data->dim_objs;
+}
+
+EINTERN Eina_Bool
+e_mod_move_quickpanel_dim_hide(E_Move_Border *mb)
+{
+ int dim_min;
+ E_Move *m = NULL;
+ E_Move_Quickpanel_Data *qp_data = NULL;
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_QUICKPANEL_CHECK(mb), EINA_FALSE);
+ E_CHECK_RETURN(mb->m, EINA_FALSE);
+ E_CHECK_RETURN(mb->data, EINA_FALSE);
+ dim_min = mb->m->dim_min_opacity;
+ qp_data = (E_Move_Quickpanel_Data *)mb->data;
+ E_CHECK_RETURN(qp_data->dim_objs, EINA_FALSE);
+ e_mod_move_bd_move_dim_objs_hide(qp_data->dim_objs);
+ e_mod_move_bd_move_dim_objs_del(qp_data->dim_objs);
+ qp_data->dim_objs = NULL;
+ qp_data->opacity = dim_min;
+ m = mb->m;
+
+ //qp ux
+ if (m->qp_scroll_with_visible_win)
+ {
+ _e_mod_move_quickpanel_below_window_objs_del();
+ _e_mod_move_quickpanel_below_window_unset();
+ }
+
+ L(LT_EVENT_OBJ,
+ "[MOVE] ev:%15.15s w:0x%08x %s()\n",
+ "EVAS_OBJ", ((mb->bd) ? mb->bd->win : NULL), __func__);
+
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_quickpanel_objs_animation_start_position_set(E_Move_Border *mb,
+ int angle)
+{
+ int x = 0; int y = 0;
+ int cx = 0; int cy = 0; int cw = 0; int ch = 0;
+ E_Zone *zone = NULL;
+ E_Move *m = NULL;
+ Eina_Bool contents;
+
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_QUICKPANEL_CHECK(mb), EINA_FALSE);
+
+ m = mb->m;
+ zone = mb->bd->zone;
+ angle = ((angle % 360) / 90) * 90;
+ contents = e_mod_move_border_contents_rect_get(mb, &cx, &cy ,&cw, &ch);
+
+ if (m->qp_scroll_with_clipping)
+ {
+ switch (angle)
+ {
+ case 0:
+ case 90:
+ default:
+ x = mb->x; y = mb->y;
+ break;
+ case 180:
+ case 270:
+ x = mb->x + mb->w; y = mb->y + mb->h;
+ break;
+ }
+ }
+ else
+ {
+ switch (angle)
+ {
+ case 90:
+ if (contents)
+ x = cw * -1;
+ else
+ x = mb->w * -1;
+ break;
+ case 180:
+ if (contents)
+ y = zone->y + zone->h - cy;
+ else
+ y = zone->y + zone->h;
+ break;
+ case 270:
+ if (contents)
+ x = zone->x + zone->w - cx;
+ else
+ x = zone->x + zone->w;
+ break;
+ case 0:
+ default :
+ if (contents)
+ y = ch * -1;
+ else
+ y = mb->h * -1;
+ break;
+ }
+ }
+
+ _e_mod_move_quickpanel_objs_position_set(mb, x, y);
+
+ return EINA_TRUE;
+}
+
+EINTERN E_Move_Event_Cb
+e_mod_move_quickpanel_event_cb_get(E_Move_Event_Type type)
+{
+ if (type == E_MOVE_EVENT_TYPE_MOTION_START)
+ return _e_mod_move_quickpanel_cb_motion_start;
+ else if (type == E_MOVE_EVENT_TYPE_MOTION_MOVE)
+ return _e_mod_move_quickpanel_cb_motion_move;
+ else if (type == E_MOVE_EVENT_TYPE_MOTION_END)
+ return _e_mod_move_quickpanel_cb_motion_end;
+ else
+ return NULL;
+}
+
+EINTERN Eina_Bool
+e_mod_move_quickpanel_visible_check(void)
+{
+ E_Move_Border *mb;
+ E_Zone *zone;
+ mb = e_mod_move_quickpanel_find();
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(mb->visible, EINA_FALSE);
+
+ zone = mb->bd->zone;
+ E_CHECK_RETURN(REGION_INSIDE_ZONE(mb, zone), EINA_FALSE);
+
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_quickpanel_below_window_reset(void)
+{
+ E_Move *m = e_mod_move_util_get();
+ E_CHECK_RETURN(m, EINA_FALSE);
+
+ if (m->qp_scroll_with_visible_win)
+ {
+ // remove below window objs & unset
+ _e_mod_move_quickpanel_below_window_objs_del();
+ _e_mod_move_quickpanel_below_window_unset();
+ // add below window set & objs
+ _e_mod_move_quickpanel_below_window_set();
+ _e_mod_move_quickpanel_below_window_objs_add();
+ }
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_quickpanel_objs_clipper_add(E_Move_Border *mb)
+{
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_QUICKPANEL_CHECK(mb), EINA_FALSE);
+
+ e_mod_move_bd_move_objs_clipper_add(mb);
+ e_mod_move_bd_move_objs_clipper_move(mb, mb->x, mb->y);
+ e_mod_move_bd_move_objs_clipper_resize(mb, mb->w, mb->h);
+ e_mod_move_bd_move_objs_clipper_show(mb);
+
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_quickpanel_objs_clipper_del(E_Move_Border *mb)
+{
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_QUICKPANEL_CHECK(mb), EINA_FALSE);
+
+ e_mod_move_bd_move_objs_clipper_hide(mb);
+ e_mod_move_bd_move_objs_clipper_del(mb);
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_quickpanel_objs_clipper_apply(E_Move_Border *mb, int x, int y)
+{
+ int cx = 0, cy = 0, cw = 0, ch = 0; // clip_x, clip_y, clip_w, clip_h
+ int angle = 0;
+ E_Zone *zone = NULL;
+
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_QUICKPANEL_CHECK(mb), EINA_FALSE);
+
+ zone = mb->bd->zone;
+ angle = mb->angle;
+
+ switch (angle)
+ {
+ case 90:
+ cw = x;
+ ch = mb->h;
+ break;
+
+ case 180:
+ cy = y;
+ cw = mb->w;
+ ch = zone->h - y;
+ break;
+
+ case 270:
+ cx = x;
+ cw = zone->w - x;
+ ch = mb->h;
+ break;
+
+ case 0:
+ default:
+ cw = mb->w;
+ ch = y;
+ break;
+ }
+ e_mod_move_bd_move_objs_clipper_move(mb, cx, cy);
+ e_mod_move_bd_move_objs_clipper_resize(mb, cw, ch);
+
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_quickpanel_stage_init(E_Move_Border *mb)
+{
+ E_Move *m = NULL;
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_QUICKPANEL_CHECK(mb), EINA_FALSE);
+
+ m = mb->m;
+
+ // Composite mode set true
+ e_mod_move_util_compositor_composite_mode_set(m, EINA_TRUE);
+ e_mod_move_util_rotation_lock(m);
+
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_quickpanel_stage_deinit(E_Move_Border *mb)
+{
+ E_Move *m = NULL;
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_QUICKPANEL_CHECK(mb), EINA_FALSE);
+
+ m = mb->m;
+
+ //qp ux
+ if (m->qp_scroll_with_visible_win)
+ {
+ _e_mod_move_quickpanel_below_window_objs_del();
+ _e_mod_move_quickpanel_below_window_unset();
+ }
+
+ e_mod_move_util_rotation_unlock(m);
+
+ // Composite mode set false
+ e_mod_move_util_compositor_composite_mode_set(m, EINA_FALSE);
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_quickpanel_angle_change_post_job(E_Move_Border *mb)
+{
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_QUICKPANEL_CHECK(mb), EINA_FALSE);
+
+ if (e_mod_move_quickpanel_objs_animation_state_get(mb))
+ return _e_mod_move_quickpanel_animation_change_with_angle(mb);
+ else
+ return _e_mod_move_quickpanel_fb_move_change_with_angle(mb);
+}
+
+static Eina_Bool
+_e_mod_move_quickpanel_objs_outside_movable_pos_get(E_Move_Border *mb,
+ int *x,
+ int *y)
+// while quickpanel is animating,
+// if quickpanel angle changed, qp_objs move could fail. so qp_objs move again with changed angle.
+{
+ E_Move *m = NULL;
+ int ax = 0, ay = 0;
+ int angle = 0;
+ E_Zone *zone = NULL;
+ E_Border *bd = NULL;
+ E_CHECK_RETURN(x, EINA_FALSE);
+ E_CHECK_RETURN(y, EINA_FALSE);
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_QUICKPANEL_CHECK(mb), EINA_FALSE);
+
+ m = mb->m;
+ E_CHECK_RETURN(m, EINA_FALSE);
+ bd = mb->bd;
+ E_CHECK_RETURN(bd, EINA_FALSE);
+ zone = bd->zone;
+ E_CHECK_RETURN(zone, EINA_FALSE);
+ angle = mb->angle;
+
+ switch (angle)
+ {
+ case 90:
+ if (m->qp_scroll_with_clipping)
+ {
+ ax = zone->x; ay = zone->y;
+ }
+ else
+ {
+ ax = mb->w * -1;
+ }
+ break;
+ case 180:
+ if (m->qp_scroll_with_clipping)
+ {
+ ax = zone->x + mb->w;
+ ay = zone->y + mb->h;
+ }
+ else
+ {
+ ay = zone->h;
+ }
+ break;
+ case 270:
+ if (m->qp_scroll_with_clipping)
+ {
+ ax = zone->x + mb->w;
+ ay = zone->y + mb->h;
+ }
+ else
+ {
+ ax = zone->w;
+ }
+ break;
+ case 0:
+ default :
+ if (m->qp_scroll_with_clipping)
+ {
+ ax = zone->x; ay = zone->y;
+ }
+ else
+ {
+ ay = mb->h * -1;;
+ }
+ break;
+ }
+ *x = ax;
+ *y = ay;
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_quickpanel_window_input_region_change_post_job(E_Move_Border *mb)
+{
+ E_Move *m = NULL;
+ int hx = 0, hy = 0, hw = 0, hh = 0; // handle's x, y, w, h
+
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_QUICKPANEL_CHECK(mb), EINA_FALSE);
+
+ m = mb->m;
+ E_CHECK_RETURN(m, EINA_FALSE);
+
+ if (m->qp_scroll_with_clipping)
+ {
+ if (e_mod_move_border_shape_input_rect_get(mb, &hx, &hy, &hw, &hh))
+ _e_mod_move_quickpanel_handle_objs_size_update(mb, hw, hh);
+ }
+
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_quickpanel_anim_state_send(E_Move_Border *mb,
+ Eina_Bool state)
+{
+ long d[5] = {0L, 0L, 0L, 0L, 0L};
+ Ecore_X_Window win;
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ E_CHECK_RETURN(TYPE_QUICKPANEL_CHECK(mb), EINA_FALSE);
+
+ win = e_mod_move_util_client_xid_get(mb);
+ E_CHECK_RETURN(win, 0);
+
+ if (state) d[0] = 1L;
+ else d[0] = 0L;
+
+ ecore_x_client_message32_send
+ (win, ATOM_MV_QUICKPANEL_STATE,
+ ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
+ d[0], d[1], d[2], d[3], d[4]);
+
+ return EINA_TRUE;
+}
--- /dev/null
+#ifdef E_TYPEDEFS
+#else
+#ifndef E_MOD_MOVE_QUICKPANEL_H
+#define E_MOD_MOVE_QUICKPANEL_H
+
+struct _E_Move_Quickpanel_Data
+{
+ int x; // current move x position
+ int y; // current move y position
+ Eina_List *dim_objs; // dim evas_obj
+ int opacity; // current dim opacity
+ Eina_List *handle_objs; // Clipping Scroller's Quickpanel Handle Move_Evas_Object.
+};
+
+typedef struct _E_Move_Quickpanel_Data E_Move_Quickpanel_Data;
+typedef struct _E_Move_Quickpanel_Animation_Data E_Move_Quickpanel_Animation_Data;
+
+EINTERN void e_mod_move_quickpanel_ctl_obj_event_setup(E_Move_Border *mb, E_Move_Control_Object *mco);
+EINTERN E_Move_Border *e_mod_move_quickpanel_base_find(void);
+EINTERN E_Move_Border *e_mod_move_quickpanel_find(void);
+EINTERN Eina_Bool e_mod_move_quickpanel_click_get(void);
+EINTERN Eina_Bool e_mod_move_quickpanel_event_clear(void);
+EINTERN Eina_Bool e_mod_move_quickpanel_objs_add(E_Move_Border *mb);
+EINTERN Eina_Bool e_mod_move_quickpanel_objs_del(E_Move_Border *mb);
+EINTERN Eina_Bool e_mod_move_quickpanel_objs_move(E_Move_Border *mb, int x, int y);
+EINTERN Eina_Bool e_mod_move_quickpanel_objs_animation_move_with_time(E_Move_Border *mb, int x, int y, double time);
+EINTERN Eina_Bool e_mod_move_quickpanel_objs_animation_move(E_Move_Border *mb, int x, int y);
+EINTERN Eina_Bool e_mod_move_quickpanel_objs_animation_state_get(E_Move_Border *mb);
+EINTERN E_Move_Animation_Direction e_mod_move_quickpanel_objs_animation_direction_get(E_Move_Border *mb);
+EINTERN Eina_Bool e_mod_move_quickpanel_objs_animation_stop(E_Move_Border *mb);
+EINTERN Eina_Bool e_mod_move_quickpanel_objs_animation_clear(E_Move_Border *mb);
+EINTERN void* e_mod_move_quickpanel_internal_data_add(E_Move_Border *mb);
+EINTERN Eina_Bool e_mod_move_quickpanel_internal_data_del(E_Move_Border *mb);
+EINTERN Eina_Bool e_mod_move_quickpanel_e_border_move(E_Move_Border *mb, int x, int y);
+EINTERN Eina_List* e_mod_move_quickpanel_dim_show(E_Move_Border *mb);
+EINTERN Eina_Bool e_mod_move_quickpanel_dim_hide(E_Move_Border *mb);
+EINTERN Eina_Bool e_mod_move_quickpanel_objs_animation_start_position_set(E_Move_Border *mb, int angle);
+EINTERN E_Move_Event_Cb e_mod_move_quickpanel_event_cb_get(E_Move_Event_Type type);
+EINTERN Eina_Bool e_mod_move_quickpanel_visible_check(void);
+EINTERN Eina_Bool e_mod_move_quickpanel_below_window_reset(void);
+EINTERN Eina_Bool e_mod_move_quickpanel_objs_clipper_add(E_Move_Border *mb);
+EINTERN Eina_Bool e_mod_move_quickpanel_objs_clipper_del(E_Move_Border *mb);
+EINTERN Eina_Bool e_mod_move_quickpanel_objs_clipper_apply(E_Move_Border *mb, int x, int y);
+EINTERN Eina_Bool e_mod_move_quickpanel_stage_init(E_Move_Border *mb);
+EINTERN Eina_Bool e_mod_move_quickpanel_stage_deinit(E_Move_Border *mb);
+EINTERN Eina_Bool e_mod_move_quickpanel_angle_change_post_job(E_Move_Border *mb);
+EINTERN Eina_Bool e_mod_move_quickpanel_window_input_region_change_post_job(E_Move_Border *mb);
+EINTERN Eina_Bool e_mod_move_quickpanel_anim_state_send(E_Move_Border *mb, Eina_Bool state);
+#endif
+#endif
+
--- /dev/null
+#ifdef E_TYPEDEFS
+#else
+#ifndef E_MOD_MOVE_SHARED_TYPES_H
+#define E_MOD_MOVE_SHARED_TYPES_H
+
+typedef struct _E_Move E_Move;
+typedef struct _E_Move_Border E_Move_Border;
+typedef enum _E_Move_Animation_Direction E_Move_Animation_Direction;
+typedef enum _E_Move_Visibility_State E_Move_Visibility_State;
+typedef enum _E_Move_Indicator_State E_Move_Indicator_State;
+typedef enum _E_Move_Indicator_Type E_Move_Indicator_Type;
+typedef enum _E_Move_Fullscreen_Indicator_Show_State E_Move_Fullscreen_Indicator_Show_State;
+typedef enum _E_Move_Angle E_Move_Angle;
+typedef enum _E_Move_Mini_Apptray_State E_Move_Mini_Apptray_State;
+
+#include "e.h"
+#include "e_mod_main.h"
+#include "e_mod_move_canvas.h"
+#include "e_mod_move_event.h"
+#include "e_mod_move_object.h"
+#include "e_mod_move_control_object.h"
+#include "e_mod_move_border_type.h"
+#include "e_mod_move_border_shape_input.h"
+#include "e_mod_move_border_contents.h"
+#include "e_mod_move_util.h"
+#include "e_mod_move_indicator.h"
+#include "e_mod_move_apptray.h"
+#include "e_mod_move_mini_apptray.h"
+#include "e_mod_move_quickpanel.h"
+#include "e_mod_move_lockscreen.h"
+#include "e_mod_move_taskmanager.h"
+#include "e_mod_move_pwlock.h"
+#include "e_mod_move_flick.h"
+#include "e_mod_move_dim_object.h"
+#include "e_mod_move_evas_object.h"
+#include "e_mod_move_indicator_controller.h"
+#include "e_mod_move_widget_object.h"
+#include "e_mod_move_indicator_widget.h"
+#include "e_mod_move_mini_apptray_widget.h"
+#include <dlog.h>
+
+enum _E_Move_Visibility_State
+{
+ E_MOVE_VISIBILITY_STATE_NONE = 0,
+ E_MOVE_VISIBILITY_STATE_VISIBLE,
+ E_MOVE_VISIBILITY_STATE_FULLY_OBSCURED
+};
+
+enum _E_Move_Indicator_State
+{
+ E_MOVE_INDICATOR_STATE_NONE = 0,
+ E_MOVE_INDICATOR_STATE_ON,
+ E_MOVE_INDICATOR_STATE_OFF
+};
+
+enum _E_Move_Indicator_Type
+{
+ E_MOVE_INDICATOR_TYPE_NONE = 0,
+ E_MOVE_INDICATOR_TYPE_1,
+ E_MOVE_INDICATOR_TYPE_2
+};
+
+enum _E_Move_Fullscreen_Indicator_Show_State
+{
+ E_MOVE_FULLSCREEN_INDICATOR_SHOW_STATE_NONE = 0,
+ E_MOVE_FULLSCREEN_INDICATOR_SHOW_STATE_ON,
+ E_MOVE_FULLSCREEN_INDICATOR_SHOW_STATE_OFF
+};
+
+enum _E_Move_Angle
+{
+ E_MOVE_ANGLE_0 = 0,
+ E_MOVE_ANGLE_90,
+ E_MOVE_ANGLE_180,
+ E_MOVE_ANGLE_270
+};
+
+enum _E_Move_Animation_Direction
+{
+ E_MOVE_ANIMATION_DIRECTION_NONE = 0,
+ E_MOVE_ANIMATION_DIRECTION_INSIDE,
+ E_MOVE_ANIMATION_DIRECTION_OUTSIDE
+};
+
+enum _E_Move_Mini_Apptray_State
+{
+ E_MOVE_MINI_APPTRAY_STATE_NONE = 0,
+ E_MOVE_MINI_APPTRAY_STATE_ON,
+ E_MOVE_MINI_APPTRAY_STATE_OFF
+};
+
+struct _E_Move
+{
+ E_Manager *man;
+ Eina_Inlist *borders;
+ Eina_List *borders_list;
+ Eina_Bool animating;
+ Eina_List *canvases; // list of E_Comp_Canvas
+
+ struct {
+ double portrait;
+ double landscape;
+ } indicator_always_region_ratio; // indicator's always region ratio
+
+ struct {
+ double portrait;
+ double landscape;
+ } indicator_quickpanel_region_ratio; // indicator's always region ratio
+
+ struct {
+ double portrait;
+ double landscape;
+ } indicator_apptray_region_ratio; // indicator's always region ratio
+
+ Eina_Bool qp_scroll_with_visible_win : 1;
+ Eina_Bool qp_scroll_with_clipping : 1;
+ double flick_speed_limit; // indicator / quickpanel / apptray flick speed limit check
+ double animation_duration; // apptray / quickpanel move animation duration
+ int dim_max_opacity; // dim max opacity
+ int dim_min_opacity; // dim min opacity
+ E_Move_Indicator_Controller *indicator_controller; // indicator_controller
+ Eina_Bool ev_log : 1; // 1 :ecore & evas_object debug event logging 0: do not log event
+ int ev_log_cnt; // ecore & evas_object debug event logging count
+ Eina_List *ev_logs; // debug_event_log list
+ Eina_Bool elm_indicator_mode : 1; // 1: indicator widget mode / 0: indicator window mode
+ E_Move_Indicator_Widget *indicator_widget; // indicator widget data ( it contains widget object, internal data)
+ E_Move_Mini_Apptray_Widget *mini_apptray_widget; // mini_apptray widget data ( it contains widget object, internal data)
+
+ struct {
+ int x;
+ int y;
+ int w;
+ int h;
+ } indicator_widget_geometry[4]; //indicator widget's per angle geometry. [0]: angle 0, [1]: angle 90, [2]: angle 180, [3]: angle 270
+
+ struct {
+ int x;
+ int y;
+ int w;
+ int h;
+ } mini_apptray_widget_geometry[4]; //mini_apptray widget's per angle geometry. [0]: angle 0, [1]: angle 90, [2]: angle 180, [3]: angle 270
+};
+
+struct _E_Move_Border
+{
+ EINA_INLIST;
+ E_Move *m; // parent move structure
+ E_Border *bd; // E17's Border
+ Ecore_X_Window client_win; // it represents border's client win, it is used when bd is destroyed.
+ int x, y, w, h; // geometry
+ Eina_List *objs; // list of E_Move_Object. ( it represts Compositor's Shadow Object or Mirror Object)
+ Eina_List *ctl_objs; // list of E_Move_Control_Object. E_Move_Control_Object has E_Move_Event.
+ Eina_Bool visible : 1; // is visible. if border is visible, Object could move.
+ E_Move_Border_Type type;
+ E_Move_Border_Shape_Input *shape_input; // it reprents window's input shape mask info
+ E_Move_Border_Contents *contents; // it reprents window's contents region info
+ int angle; // window's current angle property
+ void *data; // E_Move_Border's internal data ( it could be quickpanel, indicator apptray's internal data.)
+ void *anim_data; // E_Move_Border's internal animation data
+ E_Move_Flick_Data *flick_data; // E_Move_Object's flick related data
+ E_Object_Delfn *dfn; // delete function handle for objects being tracked
+ Eina_Bool inhash : 1; // is in the windows hash
+ Eina_Bool animate_move : 1; // Quickpanel UX related window check.
+ E_Move_Visibility_State visibility; // Client Window's Visibility
+ E_Move_Indicator_State indicator_state; // Client Window's Indicator Property State
+ E_Move_Indicator_Type indicator_type; // Client Window's Indicator Type Property
+ E_Move_Fullscreen_Indicator_Show_State fullscreen_indicator_show_state; // Client Window's Full Screen Indicator Show Property State
+ E_Move_Panel_Scrollable_State panel_scrollable_state; // panel (apptray / quickpanel / etc.) 's scrollable state
+ E_Move_Mini_Apptray_State mini_apptray_state; // Client Window's Mini Apptray Property State
+};
+
+#endif
+#endif
--- /dev/null
+#include "e_mod_move_shared_types.h"
+#include "e_mod_move_debug.h"
+#include "e_mod_move.h"
+
+/* externally accessible functions */
+EINTERN E_Move_Border *
+e_mod_move_taskmanager_find(void)
+{
+ E_Move *m;
+ E_Move_Border *mb;
+
+ m = e_mod_move_util_get();
+ E_CHECK_RETURN(m, 0);
+
+ EINA_INLIST_REVERSE_FOREACH(m->borders, mb)
+ {
+ if (TYPE_TASKMANAGER_CHECK(mb)) return mb;
+ }
+ return NULL;
+}
+
--- /dev/null
+#ifdef E_TYPEDEFS
+#else
+#ifndef E_MOD_MOVE_TASKMANAGER_H
+#define E_MOD_MOVE_TASKMANAGER_H
+
+EINTERN E_Move_Border *e_mod_move_taskmanager_find(void);
+
+#endif
+#endif
--- /dev/null
+#include <utilX.h>
+#include "e_mod_move_shared_types.h"
+#include "e_mod_move_debug.h"
+#include "e_mod_move_atoms.h"
+
+/* local subsystem globals */
+static E_Move *_m = NULL;
+
+/* externally accessible functions */
+EINTERN void
+e_mod_move_util_set(E_Move *m,
+ E_Manager *man __UNUSED__)
+{
+ _m = m;
+}
+
+EINTERN E_Move *
+e_mod_move_util_get(void)
+{
+ return _m;
+}
+
+EINTERN Eina_Bool
+e_mod_move_util_border_visible_get(E_Move_Border *mb)
+{
+ return EINA_TRUE;
+}
+
+EINTERN Ecore_X_Window
+e_mod_move_util_client_xid_get(E_Move_Border *mb)
+{
+ E_CHECK_RETURN(mb, 0);
+ if (mb->bd) return mb->bd->client.win;
+ else return 0;
+}
+
+#define _WND_REQUEST_ANGLE_IDX 0
+#define _WND_CURR_ANGLE_IDX 1
+
+EINTERN Eina_Bool
+e_mod_move_util_win_prop_angle_get(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;
+
+ return res;
+}
+
+EINTERN void
+e_mod_move_util_border_hidden_set(E_Move_Border *mb,
+ Eina_Bool hidden)
+{
+ E_Move *m = NULL;
+ E_Border *bd = NULL;
+ E_Manager_Comp_Source *comp_src = NULL;
+ Eina_Bool comp_hidden;
+
+ E_CHECK(mb);
+ m = mb->m;
+
+ if (m->man->comp)
+ {
+ bd = e_border_find_all_by_client_window(mb->client_win);
+ E_CHECK_GOTO(bd, error_cleanup);
+ comp_src = e_manager_comp_src_get(m->man, bd->win);
+ E_CHECK_GOTO(comp_src, error_cleanup);
+ comp_hidden = e_manager_comp_src_hidden_get(m->man, comp_src);
+
+ if (comp_hidden == hidden)
+ return;
+ else
+ e_manager_comp_src_hidden_set(m->man, comp_src, hidden);
+ }
+
+error_cleanup:
+ return;
+}
+
+EINTERN void
+e_mod_move_util_rotation_lock(E_Move *m)
+{
+ unsigned int val = 1;
+ E_CHECK(m);
+ ecore_x_window_prop_card32_set(m->man->root, ATOM_ROTATION_LOCK, &val, 1);
+}
+
+EINTERN void
+e_mod_move_util_rotation_unlock(E_Move *m)
+{
+ unsigned int val = 0;
+ E_CHECK(m);
+ ecore_x_window_prop_card32_set(m->man->root, ATOM_ROTATION_LOCK, &val, 1);
+}
+
+EINTERN Eina_Bool
+e_mod_move_util_compositor_object_visible_get(E_Move_Border *mb)
+{
+ // get Evas_Object from Compositor
+ E_Move *m = NULL;
+ E_Border *bd = NULL;
+ Evas_Object *comp_obj = NULL;
+ E_Manager_Comp_Source *comp_src = NULL;
+ Eina_Bool ret = EINA_FALSE;
+
+ E_CHECK_RETURN(mb, EINA_FALSE);
+ m = mb->m;
+ E_CHECK_RETURN(m, EINA_FALSE);
+
+ if (m->man->comp)
+ {
+ bd = e_border_find_all_by_client_window(mb->client_win);
+ E_CHECK_RETURN(bd, EINA_FALSE);
+
+ comp_src = e_manager_comp_src_get(m->man, bd->win);
+ E_CHECK_RETURN(comp_src, EINA_FALSE);
+
+ comp_obj = e_manager_comp_src_shadow_get(m->man, comp_src);
+ E_CHECK_RETURN(comp_obj, EINA_FALSE);
+ ret = evas_object_visible_get(comp_obj);
+ }
+
+ return ret;
+}
+
+EINTERN E_Move_Border *
+e_mod_move_util_visible_fullscreen_window_find(void)
+{
+ E_Move *m = NULL;
+ E_Move_Border *mb = NULL;
+ E_Move_Border *ret_mb = NULL;
+ E_Zone *zone = NULL;
+
+ m = e_mod_move_util_get();
+ E_CHECK_RETURN(m, 0);
+
+ EINA_INLIST_REVERSE_FOREACH(m->borders, mb)
+ {
+ zone = mb->bd->zone;
+ if ( (zone->x == mb->x)
+ && (zone->y == mb->y)
+ && (zone->w == mb->w)
+ && (zone->h == mb->h))
+ {
+ if (mb->visibility == E_MOVE_VISIBILITY_STATE_VISIBLE)
+ ret_mb = mb;
+ break;
+ }
+ }
+ return ret_mb;
+}
+
+EINTERN void
+e_mod_move_util_compositor_composite_mode_set(E_Move *m,
+ Eina_Bool set)
+{
+ E_Zone *zone = NULL;
+ E_Manager *man = NULL;
+ E_CHECK(m);
+ man = m->man;
+ E_CHECK(man);
+ E_CHECK(man->comp);
+
+ zone = e_util_zone_current_get(man);
+ E_CHECK(zone);
+ e_manager_comp_composite_mode_set(man, zone, set);
+}
+
+EINTERN void
+e_mod_move_util_fb_move(int angle,
+ int cw,
+ int ch,
+ int x,
+ int y)
+{
+ Ecore_X_Display *d = ecore_x_display_get();
+ int fb_x = 0, fb_y = 0;
+ E_CHECK(d);
+
+ switch (angle)
+ {
+ case 0: fb_x = 0; fb_y = y + ch; break;
+ case 90: fb_x = x + cw; fb_y = 0; break;
+ case 180: fb_x = 0; fb_y = y - ch; break;
+ case 270: fb_x = x - cw; fb_y = 0; break;
+ default :
+ break;
+ }
+
+ utilx_set_video_offset(d, fb_x, fb_y);
+}
+
+EINTERN int
+e_mod_move_util_layer_policy_get(E_Move_Layer_Policy layer)
+{
+ int ret = 100;
+ switch (layer)
+ {
+ case E_MOVE_QUICKPANEL_LAYER:
+ case E_MOVE_NOTIFICATION_LAYER:
+ case E_MOVE_INDICATOR_LAYER:
+ ret = 300; break;
+ case E_MOVE_FULLSCREEN_LAYER:
+ ret = 250; break;
+ case E_MOVE_STATE_ABOVE_LAYER:
+ case E_MOVE_ACTIVATE_LAYER:
+ case E_MOVE_DIALOG_LAYER:
+ case E_MOVE_SPLASH_LAYER:
+ case E_MOVE_SOFTKEY_LAYER:
+ ret = 150; break;
+ case E_MOVE_CLIPBOARD_LAYER:
+ case E_MOVE_KEYBOARD_LAYER:
+ case E_MOVE_CONFORMANT_LAYER:
+ case E_MOVE_APP_LAYER:
+ case E_MOVE_HOME_LAYER:
+ ret = 100; break;
+ case E_MOVE_STATE_BELOW_LAYER:
+ ret = 50; break;
+ default:
+ break;
+ }
+ return ret;
+}
+
+EINTERN E_Move_Scroll_Region_Indicator
+e_mod_move_indicator_region_scroll_check(int angle,
+ Evas_Point input)
+{
+ E_Move *m = NULL;
+ int w = 0, h = 0;
+ int region_always = 0;
+ int region_quickpanel = 0;
+ int region_apptray = 0;
+ E_Move_Border *indi_mb = NULL;
+ E_Move_Scroll_Region_Indicator ret = E_MOVE_SCROLL_REGION_NONE;
+
+ m = e_mod_move_util_get();
+ E_CHECK_RETURN(m, E_MOVE_SCROLL_REGION_NONE);
+
+ if (!m->elm_indicator_mode) // Indicator Window mode
+ {
+ indi_mb = e_mod_move_indicator_find();
+ E_CHECK_RETURN(indi_mb, E_MOVE_SCROLL_REGION_NONE);
+ w = indi_mb->w;
+ h = indi_mb->h;
+ }
+
+ switch (angle)
+ {
+ case 0:
+ if (m->elm_indicator_mode)
+ w = m->indicator_widget_geometry[E_MOVE_ANGLE_0].w;
+
+ region_always = (m->indicator_always_region_ratio.portrait * w);
+ region_quickpanel = (m->indicator_quickpanel_region_ratio.portrait * w);
+ region_apptray = (m->indicator_apptray_region_ratio.portrait * w);
+
+ if (input.x < region_always) ret = E_MOVE_SCROLL_REGION_NONE; // Always scroll region
+ else if ( input.x < region_quickpanel ) ret = E_MOVE_SCROLL_REGION_QUICKPANEL;
+ else ret = E_MOVE_SCROLL_REGION_NONE; // Apptray scroll region
+ break;
+ case 90:
+ if (m->elm_indicator_mode)
+ h = m->indicator_widget_geometry[E_MOVE_ANGLE_90].h;
+
+ region_always = (h - (m->indicator_always_region_ratio.landscape * h));
+ region_quickpanel = (h - (m->indicator_quickpanel_region_ratio.landscape * h));
+ region_apptray = (h - (m->indicator_apptray_region_ratio.landscape * h));
+
+ if (input.y > region_always) ret = E_MOVE_SCROLL_REGION_NONE; // Always scroll region
+ else if ( input.y > region_quickpanel ) ret = E_MOVE_SCROLL_REGION_QUICKPANEL;
+ else ret = E_MOVE_SCROLL_REGION_NONE; // Apptray scroll region
+ break;
+ case 180:
+ if (m->elm_indicator_mode)
+ w = m->indicator_widget_geometry[E_MOVE_ANGLE_180].w;
+
+ region_always = (w - (m->indicator_always_region_ratio.portrait * w));
+ region_quickpanel = (w - (m->indicator_quickpanel_region_ratio.portrait * w));
+ region_apptray = (w - (m->indicator_apptray_region_ratio.portrait * w));
+
+ if (input.x > region_always) ret = E_MOVE_SCROLL_REGION_NONE; // Always scroll region
+ else if ( input.x > region_quickpanel ) ret = E_MOVE_SCROLL_REGION_QUICKPANEL;
+ else ret = E_MOVE_SCROLL_REGION_NONE; // Apptray scroll region
+ break;
+ case 270:
+ if (m->elm_indicator_mode)
+ h = m->indicator_widget_geometry[E_MOVE_ANGLE_270].h;
+
+ region_always = (m->indicator_always_region_ratio.landscape * h);
+ region_quickpanel = (m->indicator_quickpanel_region_ratio.landscape * h);
+ region_apptray = (m->indicator_apptray_region_ratio.landscape * h);
+
+ if (input.y < region_always) ret = E_MOVE_SCROLL_REGION_NONE; // Always scroll region
+ else if ( input.y < region_quickpanel ) ret = E_MOVE_SCROLL_REGION_QUICKPANEL;
+ else ret = E_MOVE_SCROLL_REGION_NONE; // Apptray scroll region
+ break;
+ default:
+ break;
+ }
+ return ret;
+}
+
+EINTERN Eina_Bool
+e_mod_move_panel_scrollable_state_init(E_Move_Panel_Scrollable_State *panel_scrollable_state)
+{
+ E_CHECK_RETURN(panel_scrollable_state, EINA_FALSE);
+
+ panel_scrollable_state->always = EINA_TRUE;
+ panel_scrollable_state->quickpanel = EINA_TRUE;
+ panel_scrollable_state->apptray = EINA_TRUE;
+
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_mod_move_panel_scrollable_state_get(Ecore_X_Window win,
+ E_Move_Panel_Scrollable_State *panel_scrollable_state)
+{
+ unsigned int *vals = NULL;
+ Eina_Bool res = EINA_FALSE;
+ int num = 0;
+
+ E_CHECK_RETURN(panel_scrollable_state, EINA_FALSE);
+ E_CHECK_RETURN(win, EINA_FALSE);
+
+ num = ecore_x_window_prop_card32_list_get
+ (win, ATOM_MV_PANEL_SCROLLABLE_STATE, &vals);
+ E_CHECK_GOTO((num == 3), cleanup); // currently, we uses only 3 panel type
+ E_CHECK_GOTO(vals, cleanup);
+
+ panel_scrollable_state->always = (vals[0] ? EINA_TRUE : EINA_FALSE);
+ panel_scrollable_state->quickpanel = (vals[1] ? EINA_TRUE : EINA_FALSE);
+ panel_scrollable_state->apptray = (vals[2] ? EINA_TRUE : EINA_FALSE);
+ res = EINA_TRUE;
+
+cleanup:
+
+ if (vals) E_FREE(vals);
+ return res;
+}
+
+EINTERN Eina_Bool
+e_mod_move_panel_scrollable_get(E_Move_Border *mb, E_Move_Panel_Type type)
+{
+ Eina_Bool res = EINA_FALSE;
+
+ E_CHECK_RETURN(mb, EINA_FALSE);
+
+ switch (type)
+ {
+ case E_MOVE_PANEL_TYPE_ALWAYS:
+ res = mb->panel_scrollable_state.always;
+ break;
+ case E_MOVE_PANEL_TYPE_QUICKPANEL:
+ res = mb->panel_scrollable_state.quickpanel;
+ break;
+ case E_MOVE_PANEL_TYPE_APPTRAY:
+ res = mb->panel_scrollable_state.apptray;
+ break;
+ case E_MOVE_PANEL_TYPE_NONE:
+ default:
+ break;
+ }
+
+ return res;
+}
+
+EINTERN E_Border*
+e_mod_move_util_border_find_by_pointer(int x,
+ int y)
+{
+ E_Border_List *bl = NULL;
+ E_Border *temp_bd = NULL;
+ E_Border *find_bd = NULL;
+ E_Border *focused_bd = NULL;
+
+ focused_bd = e_border_focused_get();
+ E_CHECK_RETURN(focused_bd, NULL);
+
+ bl = e_container_border_list_last(focused_bd->zone->container);
+
+ while ((temp_bd = e_container_border_list_prev(bl)))
+ {
+ if (!temp_bd) continue;
+
+ if (!E_INSIDE(x, y, temp_bd->x, temp_bd->y, temp_bd->w, temp_bd->h))
+ continue;
+ if (!find_bd)
+ {
+ find_bd = temp_bd;
+ break;
+ }
+ }
+ e_container_border_list_free(bl);
+
+ return find_bd;
+}
+
+EINTERN int
+e_mod_move_util_root_angle_get(void)
+{
+ E_Move *m = NULL;
+ unsigned char *data = NULL;
+ int ret;
+ int cnt;
+ int angle = 0;
+
+ m = e_mod_move_util_get();
+ E_CHECK_RETURN(m, 0);
+
+ ret = ecore_x_window_prop_property_get(m->man->root,
+ ECORE_X_ATOM_E_ILLUME_ROTATE_ROOT_ANGLE,
+ ECORE_X_ATOM_CARDINAL,
+ 32,
+ &data,
+ &cnt);
+ if (ret && data) memcpy (&angle, data, sizeof(int));
+ if (data) free (data);
+ if (angle) angle %= 360;
+
+ return angle;
+}
--- /dev/null
+#ifdef E_TYPEDEFS
+#else
+#ifndef E_MOD_MOVE_UTIL_H
+#define E_MOD_MOVE_UTIL_H
+
+/* check whether region of given window is equal to root */
+#define REGION_EQUAL_TO_ROOT(a) \
+ (((a)->x == 0) && ((a)->y == 0) && \
+ (((a)->w) == ((a)->m->man->w)) && \
+ (((a)->h) == ((a)->m->man->h)))
+
+#define SIZE_EQUAL_TO_ROOT(a) \
+ ((((a)->w) == ((a)->m->man->w)) && \
+ (((a)->h) == ((a)->m->man->h)))
+
+#define REGION_EQUAL_TO_ZONE(a, z) \
+ ((((a)->x) == ((z)->x)) && \
+ (((a)->y) == ((z)->y)) && \
+ (((a)->w) == ((z)->w)) && \
+ (((a)->h) == ((z)->h)))
+
+#define REGION_INTERSECTS_WITH_ZONE(a, z) \
+ ((((a)->x) < (((z)->x) + ((z)->w))) && \
+ (((a)->y) < (((z)->y) + ((z)->h))) && \
+ ((((a)->x) + ((a)->w)) > ((z)->x)) && \
+ ((((a)->y) + ((a)->h)) > ((z)->y)))
+
+#define REGION_INSIDE_ZONE(a, z) \
+ ((((a)->x) >= ((z)->x)) && \
+ ((((z)->x) + ((z)->w)) >= (((a)->x) + ((a)->w))) && \
+ (((a)->y) >= ((z)->y)) && \
+ ((((z)->y) + ((z)->h)) >= (((a)->y) + ((a)->h))))
+
+# define POINT_INSIDE_ZONE(x, y, z) \
+ (((x) <= (((z)->x) + ((z)->w))) && \
+ ((y) <= (((z)->y) + ((z)->h))) && \
+ ((x) >= ((z)->x)) && \
+ ((y) >= ((z)->y)))
+
+typedef enum _E_Move_Layer_Policy
+{
+ E_MOVE_NOTIFICATION_LAYER = 0,
+ E_MOVE_INDICATOR_LAYER,
+ E_MOVE_QUICKPANEL_LAYER,
+ E_MOVE_STATE_ABOVE_LAYER,
+ E_MOVE_ACTIVATE_LAYER,
+ E_MOVE_FULLSCREEN_LAYER,
+ E_MOVE_DIALOG_LAYER,
+ E_MOVE_SPLASH_LAYER,
+ E_MOVE_SOFTKEY_LAYER,
+ E_MOVE_CLIPBOARD_LAYER,
+ E_MOVE_KEYBOARD_LAYER,
+ E_MOVE_CONFORMANT_LAYER,
+ E_MOVE_APP_LAYER,
+ E_MOVE_HOME_LAYER,
+ E_MOVE_STATE_BELOW_LAYER
+} E_Move_Layer_Policy;
+
+typedef enum _E_Move_Scroll_Region_Indicator
+{
+ E_MOVE_SCROLL_REGION_NONE = 0,
+ E_MOVE_SCROLL_REGION_ALWAYS, // Always Indicator Region
+ E_MOVE_SCROLL_REGION_QUICKPANEL, // Quickpanel Indicator Region
+ E_MOVE_SCROLL_REGION_APPTRAY
+} E_Move_Scroll_Region_Indicator;
+
+typedef struct _E_Move_Panel_Scrollable_State
+{
+ Eina_Bool always : 1;
+ Eina_Bool quickpanel : 1;
+ Eina_Bool apptray : 1;
+} E_Move_Panel_Scrollable_State;
+
+typedef enum _E_Move_Panel_Type
+{
+ E_MOVE_PANEL_TYPE_NONE = 0,
+ E_MOVE_PANEL_TYPE_ALWAYS,
+ E_MOVE_PANEL_TYPE_QUICKPANEL,
+ E_MOVE_PANEL_TYPE_APPTRAY
+} E_Move_Panel_Type;
+
+EINTERN void e_mod_move_util_set(E_Move *m, E_Manager *man);
+EINTERN E_Move *e_mod_move_util_get(void);
+EINTERN Eina_Bool e_mod_move_util_border_visible_get(E_Move_Border *mb);
+EINTERN Ecore_X_Window e_mod_move_util_client_xid_get(E_Move_Border *mb);
+EINTERN Eina_Bool e_mod_move_util_win_prop_angle_get(Ecore_X_Window win, int *req, int *curr);
+EINTERN void e_mod_move_util_border_hidden_set(E_Move_Border *mb, Eina_Bool hidden);
+EINTERN void e_mod_move_util_rotation_lock(E_Move *m);
+EINTERN void e_mod_move_util_rotation_unlock(E_Move *m);
+EINTERN Eina_Bool e_mod_move_util_compositor_object_visible_get(E_Move_Border *mb);
+EINTERN E_Move_Border *e_mod_move_util_visible_fullscreen_window_find(void);
+EINTERN void e_mod_move_util_compositor_composite_mode_set(E_Move *m, Eina_Bool set);
+EINTERN void e_mod_move_util_fb_move(int angle, int cw, int ch, int x, int y);
+EINTERN int e_mod_move_util_layer_policy_get(E_Move_Layer_Policy layer);
+EINTERN E_Border *e_mod_move_util_border_find_by_pointer(int x, int y);
+EINTERN int e_mod_move_util_root_angle_get(void);
+EINTERN E_Move_Scroll_Region_Indicator e_mod_move_indicator_region_scroll_check(int angle, Evas_Point input);
+EINTERN Eina_Bool e_mod_move_panel_scrollable_state_init(E_Move_Panel_Scrollable_State *panel_scrollable_state);
+EINTERN Eina_Bool e_mod_move_panel_scrollable_state_get(Ecore_X_Window win, E_Move_Panel_Scrollable_State *panel_scrollable_state);
+EINTERN Eina_Bool e_mod_move_panel_scrollable_get(E_Move_Border *mb, E_Move_Panel_Type type);
+
+#endif
+#endif
--- /dev/null
+#include "e_mod_move_shared_types.h"
+#include "e_mod_move_debug.h"
+#include "e_mod_move.h"
+
+/* local subsystem functions */
+
+/* externally accessible functions */
+EINTERN E_Move_Widget_Object *
+e_mod_move_widget_obj_add(E_Move *m,
+ E_Move_Canvas *canvas)
+{
+ Evas *evas = NULL;
+ E_Move_Widget_Object *mwo;
+
+ E_CHECK_RETURN(m, NULL);
+ E_CHECK_RETURN(canvas, NULL);
+
+ evas = canvas->evas;
+ E_CHECK_RETURN(evas, NULL);
+
+ mwo = E_NEW(E_Move_Widget_Object, 1);
+ E_CHECK_RETURN(mwo, NULL);
+
+ mwo->obj = evas_object_rectangle_add(evas);
+ mwo->canvas = canvas;
+ mwo->zone = canvas->zone;
+ evas_object_data_set(mwo->obj, "move_widget_obj", mwo->obj);
+
+ return mwo;
+}
+
+EINTERN void
+e_mod_move_widget_obj_del(E_Move_Widget_Object *mwo)
+{
+ E_CHECK(mwo);
+
+ if (mwo->event)
+ {
+ e_mod_move_event_free(mwo->event);
+ mwo->event = NULL;
+ }
+
+ if (mwo->obj)
+ evas_object_del(mwo->obj);
+ memset(mwo, 0, sizeof(E_Move_Widget_Object));
+ E_FREE(mwo);
+}
+
+EINTERN Eina_List *
+e_mod_move_widget_objs_add(E_Move *m)
+{
+ Eina_List *l, *objs = NULL;
+ E_Move_Canvas *canvas;
+ E_Move_Widget_Object *mwo;
+
+ E_CHECK_RETURN(m, 0);
+ E_CHECK_RETURN(m->canvases, 0);
+
+ EINA_LIST_FOREACH(m->canvases, l, canvas)
+ {
+ mwo = e_mod_move_widget_obj_add(m, canvas);
+ if (!mwo)
+ {
+ e_mod_move_widget_objs_del(objs);
+ return NULL;
+ }
+ objs = eina_list_append(objs, mwo);
+ }
+ return objs;
+}
+
+EINTERN void
+e_mod_move_widget_objs_del(Eina_List *objs)
+{
+ E_Move_Widget_Object *mwo;
+ E_CHECK(objs);
+ EINA_LIST_FREE(objs, mwo)
+ {
+ e_mod_move_widget_obj_del(mwo);
+ }
+}
+
+EINTERN void
+e_mod_move_widget_objs_show(Eina_List *objs)
+{
+ Eina_List *l;
+ E_Move_Widget_Object *mwo;
+ E_CHECK(objs);
+ EINA_LIST_FOREACH(objs, l, mwo)
+ {
+ if (!mwo) continue;
+ if (!mwo->obj) continue;
+ evas_object_show(mwo->obj);
+ }
+}
+
+EINTERN void
+e_mod_move_widget_objs_hide(Eina_List *objs)
+{
+ Eina_List *l;
+ E_Move_Widget_Object *mwo;
+ E_CHECK(objs);
+ EINA_LIST_FOREACH(objs, l, mwo)
+ {
+ if (!mwo) continue;
+ if (!mwo->obj) continue;
+ evas_object_hide(mwo->obj);
+ }
+}
+
+EINTERN void
+e_mod_move_widget_objs_move(Eina_List *objs,
+ int x,
+ int y)
+{
+ Eina_List *l;
+ E_Move_Widget_Object *mwo;
+ E_CHECK(objs);
+ EINA_LIST_FOREACH(objs, l, mwo)
+ {
+ int zx = 0, zy = 0;
+ if (!mwo) continue;
+ if (!mwo->obj) continue;
+ if (mwo->zone)
+ {
+ zx = mwo->zone->x;
+ zy = mwo->zone->y;
+ }
+ evas_object_move(mwo->obj, x - zx, y - zy);
+ }
+}
+
+EINTERN void
+e_mod_move_widget_objs_resize(Eina_List *objs,
+ int w,
+ int h)
+{
+ Eina_List *l;
+ E_Move_Evas_Object *meo;
+ E_CHECK(objs);
+ EINA_LIST_FOREACH(objs, l, meo)
+ {
+ if (!meo) continue;
+ if (!meo->obj) continue;
+ evas_object_resize(meo->obj, w, h);
+ }
+}
+
+EINTERN void
+e_mod_move_widget_objs_data_del(Eina_List *objs,
+ const char *key)
+{
+ Eina_List *l;
+ E_Move_Widget_Object *mwo;
+ E_CHECK(objs);
+ E_CHECK(key);
+ EINA_LIST_FOREACH(objs, l, mwo)
+ {
+ if (!mwo) continue;
+ if (!mwo->obj) continue;
+ evas_object_data_del(mwo->obj, key);
+ }
+}
+
+EINTERN void
+e_mod_move_widget_objs_data_set(Eina_List *objs,
+ const char *key,
+ const void *data)
+{
+ Eina_List *l;
+ E_Move_Widget_Object *mwo;
+ E_CHECK(objs);
+ E_CHECK(key);
+ EINA_LIST_FOREACH(objs, l, mwo)
+ {
+ if (!mwo) continue;
+ if (!mwo->obj) continue;
+ evas_object_data_set(mwo->obj, key, data);
+ }
+}
+
+EINTERN void
+e_mod_move_widget_objs_raise(Eina_List *objs)
+{
+ Eina_List *l;
+ E_Move_Widget_Object *mwo;
+ E_CHECK(objs);
+ EINA_LIST_FOREACH(objs, l, mwo)
+ {
+ if (!mwo) continue;
+ if (!mwo->obj) continue;
+ evas_object_raise(mwo->obj);
+ }
+}
+
+EINTERN void
+e_mod_move_widget_objs_lower(Eina_List *objs)
+{
+ Eina_List *l;
+ E_Move_Widget_Object *mwo;
+ E_CHECK(objs);
+ EINA_LIST_FOREACH(objs, l, mwo)
+ {
+ if (!mwo) continue;
+ if (!mwo->obj) continue;
+ evas_object_lower(mwo->obj);
+ }
+}
+
+EINTERN void
+e_mod_move_widget_objs_stack_above(Eina_List *objs,
+ Eina_List *objs2)
+{
+ Eina_List *l, *ll;
+ E_Move_Widget_Object *mwo, *mwo2;
+ E_CHECK(objs);
+ E_CHECK(objs2);
+ EINA_LIST_FOREACH(objs, l, mwo)
+ {
+ EINA_LIST_FOREACH(objs2, ll, mwo2)
+ {
+ if (mwo->zone == mwo2->zone)
+ evas_object_stack_above(mwo->obj, mwo2->obj);
+ }
+ }
+}
+
+EINTERN void
+e_mod_move_widget_objs_layer_set(Eina_List *objs,
+ short layer)
+{
+ Eina_List *l;
+ E_Move_Widget_Object *mwo;
+ E_CHECK(objs);
+ EINA_LIST_FOREACH(objs, l, mwo)
+ {
+ if (!mwo) continue;
+ if (!mwo->obj) continue;
+ evas_object_layer_set(mwo->obj, layer);
+ }
+}
+
+EINTERN void
+e_mod_move_widget_objs_color_set(Eina_List *objs,
+ int r,
+ int g,
+ int b,
+ int a)
+{
+ Eina_List *l;
+ E_Move_Widget_Object *mwo;
+ E_CHECK(objs);
+
+ if (r < 0) r = 0;
+ if (r > 255) r = 255;
+ if (g < 0) g = 0;
+ if (g > 255) g = 255;
+ if (b < 0) b = 0;
+ if (b > 255) b = 255;
+ if (a < 0) a = 0;
+ if (a > 255) a = 255;
+
+ EINA_LIST_FOREACH(objs, l, mwo)
+ {
+ if (!mwo) continue;
+ if (!mwo->obj) continue;
+ evas_object_color_set(mwo->obj, r, g, b, a);
+ }
+}
--- /dev/null
+#ifdef E_TYPEDEFS
+#else
+#ifndef E_MOD_MOVE_WIDGET_OBJECT_H
+#define E_MOD_MOVE_WIDGET_OBJECT_H
+
+typedef struct _E_Move_Widget_Object E_Move_Widget_Object;
+
+struct _E_Move_Widget_Object
+{
+ E_Move_Canvas *canvas;
+ E_Zone *zone;
+
+ Evas_Object *obj; // compositor's evas(window) object
+ E_Move_Event *event; // evas object's event handler object
+};
+
+EINTERN E_Move_Widget_Object *e_mod_move_widget_obj_add(E_Move *m, E_Move_Canvas *canvas);
+EINTERN void e_mod_move_widget_obj_del(E_Move_Widget_Object *mwo);
+
+EINTERN Eina_List *e_mod_move_widget_objs_add(E_Move *m);
+EINTERN void e_mod_move_widget_objs_del(Eina_List *objs);
+EINTERN void e_mod_move_widget_objs_show(Eina_List *objs);
+EINTERN void e_mod_move_widget_objs_hide(Eina_List *objs);
+EINTERN void e_mod_move_widget_objs_move(Eina_List *objs, int x, int y);
+EINTERN void e_mod_move_widget_objs_resize(Eina_List *objs, int w, int h);
+EINTERN void e_mod_move_widget_objs_data_del(Eina_List *objs, const char *key);
+EINTERN void e_mod_move_widget_objs_data_set(Eina_List *objs, const char *key, const void *data);
+EINTERN void e_mod_move_widget_objs_raise(Eina_List *objs);
+EINTERN void e_mod_move_widget_objs_lower(Eina_List *objs);
+EINTERN void e_mod_move_widget_objs_stack_above(Eina_List *objs, Eina_List *objs2);
+EINTERN void e_mod_move_widget_objs_layer_set(Eina_List *objs, short l);
+EINTERN void e_mod_move_widget_objs_color_set(Eina_List *objs, int r, int g, int b, int a);
+
+#endif
+#endif
--- /dev/null
+* Wed Nov 28 2012 Anas Nashif <anas.nashif@intel.com> accepted/trunk/20121113.042536@ff62a74
+- Use libX11 instead of libx11
--- /dev/null
+Name: e17-extra-modules
+Summary: The E17 Extra Modules The E17 extra modules consists of modules made by SAMSUNG
+Version: 0.10.6
+Release: 1
+Group: System/GUI/Other
+License: BSD
+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: pkgconfig(pixman-1)
+BuildRequires: pkgconfig(sensor)
+BuildRequires: pkgconfig(vconf)
+BuildRequires: edje-tools
+Requires: libX11
+Requires: sensor
+Requires: vconf
+
+%description
+The E17 Extra Modules The E17 extra modules consists of modules made by SAMSUNG.
+
+%prep
+%setup -q
+
+
+%build
+
+%define DEF_SUBDIRS comp-tizen illume2-tizen keyrouter wmready accessibility move-tizen devicemgr extndialog screen-reader
+
+export CFLAGS+=" -Wall -g -fPIC -rdynamic"
+export LDFLAGS+=" -Wl,--hash-style=both -Wl,--as-needed -Wl,--rpath=/usr/lib"
+# use dlog
+export CFLAGS+=" -DUSE_DLOG"
+
+%ifarch %{arm}
+export CFLAGS+=" -D_ENV_ARM"
+%endif
+
+
+for FILE in %{DEF_SUBDIRS}
+do
+ cd $FILE
+ %autogen
+ %configure --prefix=/usr
+ make
+ cd -
+done
+
+%install
+rm -rf %{buildroot}
+
+# for license notification
+mkdir -p %{buildroot}/usr/share/license
+cp -a %{_builddir}/%{buildsubdir}/COPYING %{buildroot}/usr/share/license/%{name}
+
+# for keyrouter
+mkdir -p %{buildroot}/usr/bin
+cp -af keyrouter/scripts/* %{buildroot}/usr/bin/
+
+for FILE in %{DEF_SUBDIRS}
+do
+ (cd $FILE && make install DESTDIR=%{buildroot} )
+done
+
+find %{buildroot}/usr/lib/enlightenment/modules -name *.la | xargs rm
+find %{buildroot}/usr/lib/enlightenment/modules -name *.a | xargs rm
+
+%files
+%manifest e17-extra-modules.manifest
+%defattr(-,root,root,-)
+%{_libdir}/enlightenment/modules/comp-tizen
+%{_libdir}/enlightenment/modules/e17-extra-module-accessibility
+%{_libdir}/enlightenment/modules/illume2-tizen
+%{_libdir}/enlightenment/modules/e17-extra-module-keyrouter
+%{_libdir}/enlightenment/modules/e17-extra-module-wmready
+%{_libdir}/enlightenment/modules/move-tizen
+%{_libdir}/enlightenment/modules/e17-extra-module-devicemgr
+%{_libdir}/enlightenment/modules/screen-reader
+%{_datadir}/enlightenment/data/*
+%{_bindir}/extndialog
+%{_bindir}/*
+/usr/share/license/%{name}
--- /dev/null
+Carsten Haitzler <raster@rasterman.com>
+Chidambar Zinnoury <illogict@online.fr>
+Christopher Michael <cpmichael1@comcast.net>
+Daniel Juyung Seo <seojuyung2@gmail.com>
+Lucas De Marchi <lucas.demarchi@profusion.mobi>
+Massimo Maiurana <maiurana@gmail.com>
+Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
+Shinwoo Kim <kimcinoo.efl@gmail.com> <cinoo.kim@samsung.com>
--- /dev/null
+Copyright notice for Enlightenment:
+
+Copyright (C) 2000-2012 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.
--- /dev/null
+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)
+
--- /dev/null
+#!/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
--- /dev/null
+dnl Process this file with autoconf to produce a configure script.
+
+# get rid of that stupid cache mechanism
+rm -f config.cache
+
+AC_INIT(screen-reader, 0.1, cinoo.kim@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,vconf,elementary])
+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])
+AC_OUTPUT
+
--- /dev/null
+dnl Copyright (C) 2004-2008 Kim Woelders
+dnl Copyright (C) 2008 Vincent Torri <vtorri at univ-evry dot fr>
+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 <stdlib.h>
+
+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
--- /dev/null
+# 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:
+#
+# <var>='`$ECHO "X$<var>" | $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 <bug-libtool@gnu.org>."
+
+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 <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#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<name>.so
+ # instead of lib<name>.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 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break
+ ;;
+ *)
+ test "$with_gnu_ld" != yes && break
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+else
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+ AC_MSG_RESULT($LD)
+else
+ AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+_LT_PATH_LD_GNU
+AC_SUBST([LD])
+
+_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
+])# LT_PATH_LD
+
+# Old names:
+AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
+AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_LD], [])
+dnl AC_DEFUN([AC_PROG_LD], [])
+
+
+# _LT_PATH_LD_GNU
+#- --------------
+m4_defun([_LT_PATH_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac])
+with_gnu_ld=$lt_cv_prog_gnu_ld
+])# _LT_PATH_LD_GNU
+
+
+# _LT_CMD_RELOAD
+# --------------
+# find reload flag for linker
+# -- PORTME Some linkers may need a different reload flag.
+m4_defun([_LT_CMD_RELOAD],
+[AC_CACHE_CHECK([for $LD option to reload object files],
+ lt_cv_ld_reload_flag,
+ [lt_cv_ld_reload_flag='-r'])
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+ darwin*)
+ if test "$GCC" = yes; then
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+ else
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ fi
+ ;;
+esac
+_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
+_LT_DECL([], [reload_cmds], [2])dnl
+])# _LT_CMD_RELOAD
+
+
+# _LT_CHECK_MAGIC_METHOD
+# ----------------------
+# how to check for library dependencies
+# -- PORTME fill in with the dynamic library characteristics
+m4_defun([_LT_CHECK_MAGIC_METHOD],
+[m4_require([_LT_DECL_EGREP])
+AC_CACHE_CHECK([how to recognize dependent libraries],
+lt_cv_deplibs_check_method,
+[lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix[[4-9]]*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+beos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+bsdi[[45]]*)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ ;;
+
+cygwin*)
+ # func_win32_libid is a shell function defined in ltmain.sh
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ ;;
+
+mingw* | pw32*)
+ # Base MSYS/MinGW do not provide the 'file' command needed by
+ # func_win32_libid shell function, so use a weaker test based on 'objdump',
+ # unless we find 'file', for example because we are cross-compiling.
+ if ( file / ) >/dev/null 2>&1; then
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ else
+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ fi
+ ;;
+
+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 <jrb3@best.com> 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 <jrb3@best.com> 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
+])
--- /dev/null
+# 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])])
--- /dev/null
+# 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
+])
--- /dev/null
+# 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)
+])
--- /dev/null
+# 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])])
--- /dev/null
+[Desktop Entry]
+Type=Link
+Name=screen-reader
+Icon=e-module-screen-reader
+X-Enlightenment-ModuleType=utils
+Comment=
+Comment[fr]=
+Comment[it]=
--- /dev/null
+MAINTAINERCLEANFILES = Makefile.in
+MODULE = screen-reader
+
+LDFLAGS +=
+
+# the module .so file
+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
+module_la_LIBADD =
+module_la_CFLAGS = @ENLIGHTENMENT_CFLAGS@
+module_la_LDFLAGS = -module -avoid-version @ENLIGHTENMENT_LIBS@
+module_la_DEPENDENCIES = $(top_builddir)/config.h
--- /dev/null
+#include "e.h"
+#include "e_mod_main.h"
+
+struct _E_Config_Dialog_Data
+{
+ int dummy;
+};
+
+/* local function prototypes */
+static void *_create_data (E_Config_Dialog *cfd);
+static void _fill_data (E_Config_Dialog_Data *cfdata);
+static void _free_data (E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata);
+static Evas_Object *_basic_create(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data *cfdata);
+static int _basic_apply (E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata);
+
+void
+_config_pager_module(void)
+{
+ E_Config_Dialog_View *v;
+ E_Container *con;
+
+ if (e_config_dialog_find("E", "_e_mod_access_config_dialog"))
+ return;
+ v = E_NEW(E_Config_Dialog_View, 1);
+ if (!v) return;
+
+ v->create_cfdata = _create_data;
+ v->free_cfdata = _free_data;
+ v->basic.create_widgets = _basic_create;
+ v->basic.apply_cfdata = _basic_apply;
+
+ con = e_container_current_get(e_manager_current_get());
+ e_config_dialog_new(con, "Screen Readers Settings", "E",
+ "_e_mod_access_config_dialog",
+ "preferences-desktop-access", 0, v, NULL);
+}
+
+/* local function prototypes */
+static void *
+_create_data(E_Config_Dialog *cfd __UNUSED__)
+{
+ E_Config_Dialog_Data *cfdata;
+
+ cfdata = E_NEW(E_Config_Dialog_Data, 1);
+ _fill_data(cfdata);
+ return cfdata;
+}
+
+static void
+_fill_data(E_Config_Dialog_Data *cfdata)
+{
+ cfdata->dummy = 1;
+}
+
+static void
+_free_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
+{
+ E_FREE(cfdata);
+}
+
+static Evas_Object *
+_basic_create(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data *cfdata __UNUSED__)
+{
+ Evas_Object *ol, *of;
+
+ ol = e_widget_list_add(evas, 0, 0);
+
+ of = e_widget_framelist_add(evas, "General", 0);
+ e_widget_list_object_append(ol, of, 1, 0, 0.5);
+
+ return ol;
+}
+
+static int
+_basic_apply(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata __UNUSED__)
+{
+ e_config_save_queue();
+ return 1;
+}
--- /dev/null
+#include <Elementary.h>
+#include <vconf.h>
+#include "e.h"
+#include "e_mod_main.h"
+#define HISTORY_MAX 8
+#define DEBUG_INFO 0
+
+#if DEBUG_INFO
+ #define INFO(cov, txt) \
+ evas_object_text_text_set(cov->text, txt); \
+ INF("%s", txt)
+#else
+ #define INFO(cov, txt) INF("%s", txt)
+#endif
+
+typedef struct
+{
+ E_Zone *zone;
+ Ecore_X_Window win;
+ Ecore_Timer *timer;
+ Ecore_Timer *double_down_timer;
+ Ecore_Timer *tap_timer;
+ Evas_Object *info;
+ Evas_Object *text;
+ int x, y, dx, dy, mx, my;
+ int mouse_history[HISTORY_MAX];
+ unsigned int dt;
+ Eina_Inarray *two_finger_move;
+ Eina_Inlist *history;
+
+ Ecore_X_Atom atom_control_panel_open;
+ Ecore_X_Atom atom_back;
+ Ecore_X_Atom atom_scroll;
+ Ecore_X_Atom atom_app_tray_open;
+
+ Eina_Bool longpressed : 1;
+ Eina_Bool two_finger_down : 1;
+ Eina_Bool three_finger_down : 1;
+ Eina_Bool mouse_double_down : 1;
+ Eina_Bool lock_screen : 1;
+} Cover;
+
+typedef struct
+{
+ EINA_INLIST;
+ int device;
+} Multi;
+
+static int g_enable = 0;
+static Ecore_X_Window target_win = 0;
+static Ecore_X_Window unfocused_win = 0;
+
+static Eina_List *covers = NULL;
+static Eina_List *handlers = NULL;
+static Ecore_Event_Handler *property_handler = NULL;
+static int multi_device[3];
+
+static void
+_mouse_in_win_get(Cover *cov, int x, int y)
+{
+ E_Border *bd;
+ Eina_List *l;
+ Ecore_X_Window *skip;
+ Ecore_X_Window win = 0;
+ Cover *cov2;
+ int i;
+
+ skip = alloca(sizeof(Ecore_X_Window) * eina_list_count(covers));
+ i = 0;
+ EINA_LIST_FOREACH(covers, l, cov2)
+ {
+ skip[i] = cov2->win;
+ i++;
+ }
+ win = ecore_x_window_shadow_tree_at_xy_with_skip_get
+ (cov->zone->container->manager->root, x, y, skip, i);
+
+ if (win != target_win)
+ {
+ target_win = win;
+
+ bd = e_border_focused_get();
+ if (bd && (bd->client.win != target_win))
+ unfocused_win = target_win;
+ else
+ unfocused_win = 0;
+ }
+}
+
+static unsigned int
+_win_angle_get(Ecore_X_Window win)
+{
+ Ecore_X_Window root;
+
+ if (!win) return 0;
+
+ int ret;
+ int count;
+ int angle = 0;
+ unsigned char *prop_data = NULL;
+
+ root = ecore_x_window_root_get(win);
+ ret = ecore_x_window_prop_property_get(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 void
+_target_window_find()
+{
+ Ecore_X_Window win;
+ E_Border *bd;
+ unsigned int val;
+ int ret;
+
+ /* find proper target window to send a meesage */
+ Eina_List *borders, *l;
+
+ win = 0;
+ borders = e_border_client_list();
+ EINA_LIST_REVERSE_FOREACH(borders, l, bd)
+ {
+ if (!bd->visible) continue;
+ if (bd->client.netwm.type == ECORE_X_WINDOW_TYPE_NORMAL) break;
+
+ ret = ecore_x_window_prop_card32_get
+ (bd->client.win, ECORE_X_ATOM_E_ILLUME_ACCESS_CONTROL, &val, 1);
+
+ if ((ret >= 0) && (val == 1))
+ {
+ win = bd->client.win;
+ break;
+ }
+ }
+
+ /* there would be an unfocused window which does not have 'val == 1'
+ such as an window of virtual keyboard. if the window is selected by
+ _mouse_in_win_get(); previously with the unfocused window, the target
+ window should be the unfocused window */
+ if (win) target_win = win;
+ else
+ {
+ if (unfocused_win) target_win = unfocused_win;
+ else
+ {
+ bd = e_border_focused_get();
+ if (bd) target_win = bd->client.win;
+ }
+ }
+}
+
+static void
+_lock_screen_check(Cover *cov)
+{
+ Ecore_X_Window win;
+ E_Border *bd;
+ const char *name = NULL;
+ const char *clas = NULL;
+
+ Eina_List *borders, *l;
+
+ cov->lock_screen = EINA_FALSE;
+ win = 0;
+ borders = e_border_client_list();
+ EINA_LIST_REVERSE_FOREACH(borders, l, bd)
+ {
+ if (!bd) continue;
+ if (!bd->visible) continue;
+
+ name = bd->client.icccm.name;
+ clas = bd->client.icccm.class;
+
+ if (clas == NULL || name == NULL) continue;
+ if (strncmp(clas,"LOCK_SCREEN",strlen("LOCK_SCREEN"))!= 0) continue;
+ if (strncmp(name,"LOCK_SCREEN",strlen("LOCK_SCREEN"))!= 0) continue;
+
+ INF("lock screen is detected");
+ cov->lock_screen = EINA_TRUE;
+
+ break;
+ }
+}
+
+static void
+_app_tray_open(Cover *cov)
+{
+ Ecore_X_Window win;
+ E_Border *bd;
+ const char *name = NULL;
+ const char *clas = NULL;
+
+ Eina_List *borders, *l;
+
+ win = 0;
+ borders = e_border_client_list();
+ EINA_LIST_REVERSE_FOREACH(borders, l, bd)
+ {
+ if (!bd) continue;
+ if (!bd->visible) continue;
+ if (bd->client.netwm.type != ECORE_X_WINDOW_TYPE_NORMAL) break;
+
+ name = bd->client.icccm.name;
+ clas = bd->client.icccm.class;
+
+ if (clas == NULL || name == NULL) continue;
+ if (strncmp(clas,"APP_TRAY",strlen("APP_TRAY"))!= 0) continue;
+ if (strncmp(name,"APP_TRAY",strlen("APP_TRAY"))!= 0) continue;
+
+ /* open mini app tray */
+ INF("open app tray");
+ ecore_x_client_message32_send(bd->client.win, ECORE_X_ATOM_E_ILLUME_ACCESS_CONTROL,
+ ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
+ bd->client.win,
+ cov->atom_app_tray_open,
+ 0, 0, 0);
+ break;
+ }
+}
+
+static void
+_quickpanel_open(void)
+{
+ Ecore_X_Window win;
+ E_Border *bd;
+ const char *name = NULL;
+ const char *clas = NULL;
+
+ Eina_List *borders, *l;
+
+ win = 0;
+ borders = e_border_client_list();
+ EINA_LIST_REVERSE_FOREACH(borders, l, bd)
+ {
+ if (!bd) continue;
+ if (!bd->visible) continue;
+ if (bd->client.netwm.type != ECORE_X_WINDOW_TYPE_NORMAL) break;
+
+ name = bd->client.icccm.name;
+ clas = bd->client.icccm.class;
+
+ if (clas == NULL || name == NULL) continue;
+ if (strncmp(clas,"QUICKPANEL",strlen("QUICKPANEL"))!= 0) continue;
+ if (strncmp(name,"QUICKPANEL",strlen("QUICKPANEL"))!= 0) continue;
+
+ /* open quickpanel */
+ INF("open quickpanel");
+ ecore_x_e_illume_quickpanel_state_send
+ (ecore_x_e_illume_zone_get(bd->client.win),
+ ECORE_X_ILLUME_QUICKPANEL_STATE_ON);
+ break;
+ }
+}
+
+static void
+_coordinate_calibrate(Ecore_X_Window win, int *x, int *y)
+{
+ int tx, ty, w, h;
+ unsigned int angle;
+
+ if (!x) return;
+ if (!y) return;
+
+ angle = _win_angle_get(win);
+ ecore_x_window_geometry_get(win, NULL, NULL, &w, &h);
+
+ tx = *x;
+ ty = *y;
+
+ switch (angle)
+ {
+ case 90:
+ *x = h - ty;
+ *y = tx;
+ break;
+
+ case 180:
+ *x = w - tx;
+ *y = h - ty;
+ break;
+
+ case 270:
+ *x = ty;
+ *y = w - tx;
+ break;
+
+ default:
+ break;
+ }
+}
+
+static void
+_mouse_win_fake_tap(Cover *cov, Ecore_Event_Mouse_Button *ev)
+{
+ int x, y;
+
+ /* find target window to send message */
+ _mouse_in_win_get(cov, ev->root.x, ev->root.y);
+
+ ecore_x_pointer_xy_get(target_win, &x, &y);
+ ecore_x_mouse_in_send(target_win, x, y);
+ ecore_x_mouse_move_send(target_win, x, y);
+ ecore_x_mouse_down_send(target_win, x, y, 1);
+ ecore_x_mouse_up_send(target_win, x, y, 1);
+ ecore_x_mouse_out_send(target_win, x, y);
+}
+
+static void
+_message_control_panel_open_send(Cover *cov)
+{
+ ecore_x_client_message32_send(target_win, ECORE_X_ATOM_E_ILLUME_ACCESS_CONTROL,
+ ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
+ target_win,
+ cov->atom_control_panel_open,
+ 0, 0, 0);
+}
+
+static void
+_message_back_send(Cover *cov)
+{
+ ecore_x_client_message32_send(target_win, ECORE_X_ATOM_E_ILLUME_ACCESS_CONTROL,
+ ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
+ target_win,
+ cov->atom_back,
+ 0, 0, 0);
+}
+
+static void
+_message_scroll_send(Cover *cov, int type)
+{
+ int x, y;
+
+ if (cov->lock_screen) type = type + 3;
+
+ ecore_x_pointer_xy_get(target_win, &x, &y);
+ _coordinate_calibrate(target_win, &x, &y);
+
+ ecore_x_client_message32_send(target_win, ECORE_X_ATOM_E_ILLUME_ACCESS_CONTROL,
+ ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
+ target_win,
+ cov->atom_scroll,
+ type, x, y);
+}
+
+static void
+_message_read_send(Cover *cov)
+{
+ int x, y;
+
+ /* find target window to send message */
+ _mouse_in_win_get(cov, cov->x, cov->y);
+
+ ecore_x_pointer_xy_get(target_win, &x, &y);
+ _coordinate_calibrate(target_win, &x, &y);
+
+ ecore_x_client_message32_send(target_win, ECORE_X_ATOM_E_ILLUME_ACCESS_CONTROL,
+ ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
+ target_win,
+ ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_READ,
+ x, y, 0);
+}
+
+static Eina_Bool
+_mouse_longpress(void *data)
+{
+ Cover *cov = data;
+ int distance = 40;
+ int dx, dy;
+ int x, y;
+
+ cov->timer = NULL;
+ dx = cov->x - cov->dx;
+ dy = cov->y - cov->dy;
+ if (((dx * dx) + (dy * dy)) < (distance * distance))
+ {
+ cov->longpressed = EINA_TRUE;
+ INFO(cov, "longpress");
+
+ if (!cov->mouse_double_down) _message_read_send(cov);
+ else
+ {
+ INFO(cov, "double down and longpress");
+ /* send message to start longpress */
+ ecore_x_pointer_xy_get(target_win, &x, &y);
+
+ ecore_x_mouse_in_send(target_win, x, y);
+ ecore_x_mouse_move_send(target_win, x, y);
+ ecore_x_mouse_down_send(target_win, x, y, 1);
+ }
+ }
+ return EINA_FALSE;
+}
+
+static Eina_Bool
+_mouse_double_down(void *data)
+{
+ Cover *cov = data;
+ ecore_timer_del(cov->double_down_timer);
+ cov->double_down_timer = NULL;
+ return EINA_FALSE;
+}
+
+static void
+_mouse_double_down_timeout(Cover *cov)
+{
+ double long_time = 0.5;
+ double short_time = 0.3;
+ int distance = 40;
+ int dx, dy;
+
+ dx = cov->x - cov->dx;
+ dy = cov->y - cov->dy;
+
+ if ((cov->double_down_timer) &&
+ (((dx * dx) + (dy * dy)) < (distance * distance)))
+ {
+ /* start double tap and move from here */
+ cov->mouse_double_down = EINA_TRUE;
+
+ if (cov->timer)
+ {
+ ecore_timer_del(cov->timer);
+ cov->timer = NULL;
+ }
+ /* check longpress after double down */
+ cov->timer = ecore_timer_add(long_time, _mouse_longpress, cov);
+ }
+
+ if (cov->double_down_timer)
+ {
+ ecore_timer_del(cov->double_down_timer);
+ cov->double_down_timer = NULL;
+ return;
+ }
+
+ cov->double_down_timer = ecore_timer_add(short_time, _mouse_double_down, cov);
+}
+
+static Eina_Bool
+_mouse_tap(void *data)
+{
+ Cover *cov = data;
+ cov->tap_timer = NULL;
+
+ _message_read_send(cov);
+
+ return EINA_FALSE;
+}
+
+static void
+_mouse_down(Cover *cov, Ecore_Event_Mouse_Button *ev)
+{
+ double longtime = 0.5;
+
+ cov->dx = ev->x;
+ cov->dy = ev->y;
+ cov->mx = ev->x;
+ cov->my = ev->y;
+ cov->x = ev->x;
+ cov->y = ev->y;
+ cov->dt = ev->timestamp;
+ cov->longpressed = EINA_FALSE;
+ cov->timer = ecore_timer_add(longtime, _mouse_longpress, cov);
+
+ if (cov->tap_timer)
+ {
+ ecore_timer_del(cov->tap_timer);
+ cov->tap_timer = NULL;
+ }
+
+ /* check mouse double down - not two fingers, refer to double click */
+ _mouse_double_down_timeout(cov);
+}
+
+static void
+_circle_draw_check(Cover *cov)
+{
+ Ecore_Event_Mouse_Move *ev, *t_ev, *b_ev, *l_ev, *r_ev;
+ Evas_Coord_Point m_tb, m_lr;
+ int count = 0;
+ int offset, i;
+ int min_x, min_y, max_x, max_y;
+ int left = 0, right = 0, top = 0, bottom = 0;
+ int distance;
+
+ count = eina_inarray_count(cov->two_finger_move);
+ if (count < 10 || count > 60) goto inarray_free;
+
+ offset = count / 8;
+
+ i = 0;
+ EINA_INARRAY_FOREACH(cov->two_finger_move, ev)
+ {
+ if (i == 0)
+ {
+ min_x = ev->x;
+ max_x = ev->x;
+ min_y = ev->y;
+ max_y = ev->y;
+ }
+
+ if (ev->x < min_x)
+ {
+ min_x = ev->x;
+ left = i;
+ }
+
+ if (ev->y < min_y)
+ {
+ min_y = ev->y;
+ bottom = i;
+ }
+
+ if (ev->x > max_x)
+ {
+ max_x = ev->x;
+ right = i;
+ }
+
+ if (ev->y > max_y)
+ {
+ max_y = ev->y;
+ top = i;
+ }
+
+ i++;
+ }
+
+ t_ev = eina_inarray_nth(cov->two_finger_move, top);
+ b_ev = eina_inarray_nth(cov->two_finger_move, bottom);
+ m_tb.x = (t_ev->x + b_ev->x) / 2;
+ m_tb.y = (t_ev->y + b_ev->y) / 2;
+
+
+ l_ev = eina_inarray_nth(cov->two_finger_move, left);
+ r_ev = eina_inarray_nth(cov->two_finger_move, right);
+ m_lr.x = (l_ev->x + r_ev->x) / 2;
+ m_lr.y = (l_ev->y + r_ev->y) / 2;
+
+ distance = (int) sqrt(((m_tb.x - m_lr.x) * (m_tb.x - m_lr.x)) + ((m_tb.y - m_lr.y) * (m_tb.y - m_lr.y)));
+
+ i = 0;
+ if (top > left) i++;
+ if (left > bottom) i++;
+ if (bottom > right) i++;
+ if (right > top) i++;
+
+ if ((i >= 3) && (distance < 60))
+ {
+ INFO(cov, "two finger circle draw");
+ _message_back_send(cov);
+ }
+
+inarray_free:
+ eina_inarray_free(cov->two_finger_move);
+}
+
+static void
+_mouse_up(Cover *cov, Ecore_Event_Mouse_Button *ev)
+{
+ double timeout = 0.15;
+ double double_tap_timeout = 0.25;
+ int distance = 40;
+ int dx, dy;
+ int x, y;
+ int angle = 0;
+
+ if (cov->three_finger_down)
+ {
+ cov->three_finger_down = EINA_FALSE;
+
+ dx = ev->x - cov->dx;
+ dy = ev->y - cov->dy;
+
+ if (((dx * dx) + (dy * dy)) > (4 * distance * distance)
+ && ((ev->timestamp - cov->dt) < (timeout * 1000)))
+ {
+ /* get root window rotation */
+ angle = _win_angle_get(target_win);
+
+ if (abs(dx) < abs(dy))
+ {
+ if (dy > 0) /* down */
+ {
+ INFO(cov, "three finger flick down");
+ switch (angle)
+ {
+ case 90:
+ case 180:
+ _app_tray_open(cov);
+ break;
+
+ case 270:
+ default:
+ _quickpanel_open();
+ break;
+ }
+ }
+ else /* up */
+ {
+ INFO(cov, "three finger flick up");
+ switch (angle)
+ {
+ case 90:
+ case 180:
+ _quickpanel_open();
+ break;
+
+ case 270:
+ default:
+ _app_tray_open(cov);
+ break;
+ }
+ }
+ }
+ }
+ goto end;
+ }
+
+ /* for two finger panning */
+ if (cov->two_finger_down)
+ {
+ cov->two_finger_down = EINA_FALSE;
+
+ _message_scroll_send(cov, 2);
+ cov->lock_screen = EINA_FALSE;
+
+ /* to check 2 finger mouse move */
+ if (cov->two_finger_move) _circle_draw_check(cov);
+
+ dx = ev->x - cov->dx;
+ dy = ev->y - cov->dy;
+
+ if (((dx * dx) + (dy * dy)) < (distance * distance))
+ {
+ if (ev->double_click)
+ {
+ INFO(cov, "two finger double click");
+ _message_control_panel_open_send(cov);
+ }
+ }
+ goto end;
+ }
+
+ if (cov->mouse_double_down)
+ {
+ /* reset double down and moving: action up/down */
+ cov->mouse_double_down = EINA_FALSE;
+
+ if (cov->longpressed)
+ {
+ INFO(cov, "mouse release after longpress");
+ ecore_x_pointer_xy_get(target_win, &x, &y);
+
+ ecore_x_mouse_up_send(target_win, x, y, 1);
+ ecore_x_mouse_out_send(target_win, x, y);
+ }
+ }
+
+ /* delete timer which is used for checking longpress */
+ if (cov->timer)
+ {
+ ecore_timer_del(cov->timer);
+ cov->timer = NULL;
+ }
+
+ if (cov->longpressed)
+ {
+ cov->longpressed = EINA_FALSE;
+ return;
+ }
+
+ dx = ev->x - cov->dx;
+ dy = ev->y - cov->dy;
+ if (((dx * dx) + (dy * dy)) < (distance * distance))
+ {
+ if (ev->double_click)
+ {
+ INFO(cov, "double_click");
+ ecore_x_e_illume_access_action_activate_send(target_win);
+ }
+ else
+ {
+ cov->tap_timer = ecore_timer_add(double_tap_timeout,
+ _mouse_tap, cov);
+ }
+ }
+ else if (((dx * dx) + (dy * dy)) > (4 * distance * distance)
+ && ((ev->timestamp - cov->dt) < (timeout * 1000)))
+ {
+ /* get root window rotation */
+ angle = _win_angle_get(target_win);
+
+ if (abs(dx) > abs(dy)) /* left or right */
+ {
+ if (dx > 0) /* right */
+ {
+ INFO(cov, "single flick right");
+ switch (angle)
+ {
+ case 180:
+ case 270:
+ ecore_x_e_illume_access_action_read_prev_send
+ (target_win);
+ break;
+
+ case 90:
+ default:
+ ecore_x_e_illume_access_action_read_next_send
+ (target_win);
+ break;
+ }
+
+ }
+ else /* left */
+ {
+ INFO(cov, "single flick left");
+ switch (angle)
+ {
+ case 180:
+ case 270:
+ ecore_x_e_illume_access_action_read_next_send
+ (target_win);
+ break;
+
+ case 90:
+ default:
+ ecore_x_e_illume_access_action_read_prev_send
+ (target_win);
+ break;
+ }
+ }
+ }
+ else /* up or down */
+ {
+ if (dy > 0) /* down */
+ {
+ INFO(cov, "single flick down");
+ switch (angle)
+ {
+ case 90:
+ case 180:
+ ecore_x_e_illume_access_action_up_send(target_win);
+ break;
+
+ case 270:
+ default:
+ ecore_x_e_illume_access_action_down_send(target_win);
+ break;
+ }
+ }
+ else /* up */
+ {
+ INFO(cov, "single flick up");
+ switch (angle)
+ {
+ case 90:
+ case 180:
+ ecore_x_e_illume_access_action_down_send(target_win);
+ break;
+
+ case 270:
+ default:
+ ecore_x_e_illume_access_action_up_send(target_win);
+ break;
+ }
+ }
+ }
+ }
+
+end:
+ cov->longpressed = EINA_FALSE;
+}
+
+static void
+_mouse_move(Cover *cov __UNUSED__, Ecore_Event_Mouse_Move *ev __UNUSED__)
+{
+ //FIXME: why here, after long press you cannot go below..
+ //if (!cov->down) return;
+
+ //FIXME: one finger cannot come here
+ //_record_mouse_history(cov, ev);
+ if (cov->two_finger_move) eina_inarray_push(cov->two_finger_move, ev);
+
+ _message_scroll_send(cov, 1);
+}
+
+static void
+_mouse_wheel(Cover *cov __UNUSED__, Ecore_Event_Mouse_Wheel *ev __UNUSED__)
+{
+ if (ev->z == -1) /* up */
+ {
+#if ECORE_VERSION_MAJOR >= 1
+# if ECORE_VERSION_MINOR >= 8
+ ecore_x_e_illume_access_action_up_send(target_win);
+# endif
+#endif
+ }
+ else if (ev->z == 1) /* down */
+ {
+#if ECORE_VERSION_MAJOR >= 1
+# if ECORE_VERSION_MINOR >= 8
+ ecore_x_e_illume_access_action_down_send(target_win);
+# endif
+#endif
+ }
+}
+
+static Eina_Bool
+_cb_mouse_down(void *data __UNUSED__,
+ int type __UNUSED__,
+ void *event)
+{
+ Ecore_Event_Mouse_Button *ev = event;
+ Eina_List *l;
+ Cover *cov;
+ int i = 0;
+
+ for (i = 0; i < 3; i++)
+ {
+ if (multi_device[i] == -1)
+ {
+ multi_device[i] = ev->multi.device;
+ break;
+ }
+ else if (multi_device[i] == ev->multi.device) break;
+ }
+
+ EINA_LIST_FOREACH(covers, l, cov)
+ {
+ if (ev->window == cov->win)
+ {
+ //XXX change specific number
+ if (ev->multi.device == multi_device[0])
+ {
+ _target_window_find();
+ _mouse_down(cov, ev);
+ }
+
+ if (ev->multi.device == multi_device[1] && !(cov->two_finger_down))
+ {
+ /* prevent longpress client message by two finger */
+ if (cov->timer)
+ {
+ ecore_timer_del(cov->timer);
+ cov->timer = NULL;
+ }
+
+ cov->two_finger_down = EINA_TRUE;
+
+ _lock_screen_check(cov);
+ _message_scroll_send(cov, 0);
+
+ /* to check 2 finger mouse move */
+ cov->two_finger_move = eina_inarray_new(sizeof(Ecore_Event_Mouse_Move), 0);
+ }
+
+ if (ev->multi.device == multi_device[2] && !(cov->three_finger_down))
+ {
+ cov->three_finger_down = EINA_TRUE;
+
+ if (cov->two_finger_down)
+ {
+ cov->two_finger_down = EINA_FALSE;
+
+ _message_scroll_send(cov, 2);
+ cov->lock_screen = EINA_FALSE;
+
+ eina_inarray_free(cov->two_finger_move);
+ }
+ }
+ return ECORE_CALLBACK_PASS_ON;
+ }
+ }
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+static Eina_Bool
+_cb_mouse_up(void *data __UNUSED__,
+ int type __UNUSED__,
+ void *event)
+{
+ Ecore_Event_Mouse_Button *ev = event;
+ Eina_List *l;
+ Cover *cov;
+
+ EINA_LIST_FOREACH(covers, l, cov)
+ {
+ if (ev->window == cov->win)
+ {
+ /* the first finger: 1, from the second finger: 0 */
+ if (ev->buttons == 1)
+ _mouse_up(cov, ev);
+ return ECORE_CALLBACK_PASS_ON;
+ }
+ }
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+static Eina_Bool
+_cb_mouse_move(void *data __UNUSED__,
+ int type __UNUSED__,
+ void *event)
+{
+ Ecore_Event_Mouse_Move *ev = event;
+ Eina_List *l;
+ Cover *cov;
+ int x, y;
+
+ EINA_LIST_FOREACH(covers, l, cov)
+ {
+ cov->x = ev->x;
+ cov->y = ev->y;
+
+ if (ev->window == cov->win)
+ {
+ //if (ev->multi.device == multi_device[0] || ev->multi.device == multi_device[1])
+ if (cov->two_finger_down && ev->multi.device == multi_device[1])
+ _mouse_move(cov, ev);
+ else if (cov->longpressed && /* client message for moving is available only after long press is detected */
+ !(cov->mouse_double_down) && /* mouse move after double down should not send read message */
+ !(cov->two_finger_down) && ev->multi.device == multi_device[0])
+ {
+ INFO(cov, "read");
+ _message_read_send(cov);
+ }
+ else if (cov->mouse_double_down && /* client message for moving is available only after long press is detected */
+ !(cov->two_finger_down) && ev->multi.device == multi_device[0])
+ {
+ if (cov->longpressed)
+ {
+ INFO(cov, "move after longpress");
+ /* send message to notify move after longpress */
+ ecore_x_pointer_xy_get(target_win, &x, &y);
+
+ ecore_x_mouse_move_send(target_win, x, y);
+ }
+ }
+
+ return ECORE_CALLBACK_PASS_ON;
+ }
+ }
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+static Eina_Bool
+_cb_mouse_wheel(void *data __UNUSED__,
+ int type __UNUSED__,
+ void *event)
+{
+ Ecore_Event_Mouse_Wheel *ev = event;
+ Eina_List *l;
+ Cover *cov;
+
+ EINA_LIST_FOREACH(covers, l, cov)
+ {
+ if (ev->window == cov->win)
+ {
+ _mouse_wheel(cov, ev);
+ return ECORE_CALLBACK_PASS_ON;
+ }
+ }
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+static Cover *
+_cover_new(E_Zone *zone)
+{
+ Cover *cov;
+
+ cov = E_NEW(Cover, 1);
+ if (!cov) return NULL;
+ cov->zone = zone;
+
+#if DEBUG_INFO
+ Ecore_Evas *ee;
+ ee = ecore_evas_new(NULL,
+ zone->container->x + zone->x,
+ zone->container->y + zone->y,
+ zone->w, zone->h,
+ NULL);
+ ecore_evas_alpha_set(ee, EINA_TRUE);
+ cov->win = (Ecore_X_Window)ecore_evas_window_get(ee);
+
+ /* create infomation */
+ Evas *e;
+ e = ecore_evas_get(ee);
+ cov->info = evas_object_rectangle_add(e);
+ evas_object_color_set(cov->info, 255, 255, 255, 100);
+ evas_object_move(cov->info, zone->container->x + zone->x, zone->container->y + zone->y);
+ evas_object_resize(cov->info, zone->w, 30);
+ evas_object_show(cov->info);
+
+ cov->text = evas_object_text_add(e);
+ evas_object_text_style_set(cov->text, EVAS_TEXT_STYLE_PLAIN);
+ evas_object_text_font_set(cov->text, "DejaVu", 14);
+ evas_object_text_text_set(cov->text, "screen-reader module");
+
+ evas_object_color_set(cov->text, 0, 0, 0, 255);
+ evas_object_resize(cov->text, (zone->w / 8), 20);
+ evas_object_move(cov->text, zone->container->x + zone->x + 5, zone->container->y + zone->y + 5);
+ evas_object_show(cov->text);
+
+#else
+ cov->win = ecore_x_window_input_new(zone->container->manager->root,
+ zone->container->x + zone->x,
+ zone->container->y + zone->y,
+ zone->w, zone->h);
+#endif
+
+ ecore_x_input_multi_select(cov->win);
+
+ ecore_x_icccm_title_set(cov->win, "screen-reader-input");
+ ecore_x_netwm_name_set(cov->win, "screen-reader-input");
+
+ ecore_x_window_ignore_set(cov->win, 1);
+ ecore_x_window_configure(cov->win,
+ ECORE_X_WINDOW_CONFIGURE_MASK_SIBLING |
+ ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE,
+ 0, 0, 0, 0, 0,
+ zone->container->layers[8].win,
+ ECORE_X_WINDOW_STACK_ABOVE);
+ ecore_x_window_show(cov->win);
+ ecore_x_window_raise(cov->win);
+
+ return cov;
+}
+
+static void
+_covers_init(void)
+{
+ Eina_List *l, *l2, *l3;
+ E_Manager *man;
+ int i = 0;
+
+ EINA_LIST_FOREACH(e_manager_list(), l, man)
+ {
+ E_Container *con;
+ EINA_LIST_FOREACH(man->containers, l2, con)
+ {
+ E_Zone *zone;
+ EINA_LIST_FOREACH(con->zones, l3, zone)
+ {
+ Cover *cov = _cover_new(zone);
+ if (cov)
+ {
+ covers = eina_list_append(covers, cov);
+ for (i = 0; i < HISTORY_MAX; i++) cov->mouse_history[i] = -1;
+
+ cov->atom_control_panel_open = ecore_x_atom_get("_E_MOD_SCREEN_READER_ACTION_CONTROL_PANEL_OPEN_");
+ cov->atom_back = ecore_x_atom_get("_E_MOD_SCREEN_READER_ACTION_BACK_");
+ cov->atom_scroll = ecore_x_atom_get("_E_MOD_SCREEN_READER_ACTION_SCROLL_");
+ cov->atom_app_tray_open = ecore_x_atom_get("_E_MOD_SCREEN_READER_ACTION_APP_TRAY_OPEN_");
+ }
+ }
+ }
+ }
+}
+
+static void
+_covers_shutdown(void)
+{
+ Cover *cov;
+
+ EINA_LIST_FREE(covers, cov)
+ {
+ ecore_x_window_ignore_set(cov->win, 0);
+ ecore_x_window_free(cov->win);
+ evas_object_del(cov->info);
+ evas_object_del(cov->text);
+
+ if (cov->timer)
+ {
+ ecore_timer_del(cov->timer);
+ cov->timer = NULL;
+ }
+
+ if (cov->double_down_timer)
+ {
+ ecore_timer_del(cov->double_down_timer);
+ cov->double_down_timer = NULL;
+ }
+
+ if (cov->tap_timer)
+ {
+ ecore_timer_del(cov->tap_timer);
+ cov->tap_timer = NULL;
+ }
+
+ free(cov);
+ }
+}
+
+static Eina_Bool
+_cb_zone_add(void *data __UNUSED__,
+ int type __UNUSED__,
+ void *event __UNUSED__)
+{
+ _covers_shutdown();
+ _covers_init();
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+static Eina_Bool
+_cb_zone_del(void *data __UNUSED__,
+ int type __UNUSED__,
+ void *event __UNUSED__)
+{
+ _covers_shutdown();
+ _covers_init();
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+static Eina_Bool
+_cb_zone_move_resize(void *data __UNUSED__,
+ int type __UNUSED__,
+ void *event __UNUSED__)
+{
+ _covers_shutdown();
+ _covers_init();
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+static void
+_events_init(void)
+{
+ int i = 0;
+
+ handlers = eina_list_append
+ (handlers, ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_DOWN,
+ _cb_mouse_down, NULL));
+ handlers = eina_list_append
+ (handlers, ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_UP,
+ _cb_mouse_up, NULL));
+ handlers = eina_list_append
+ (handlers, ecore_event_handler_add(ECORE_EVENT_MOUSE_MOVE,
+ _cb_mouse_move, NULL));
+ handlers = eina_list_append
+ (handlers, ecore_event_handler_add(ECORE_EVENT_MOUSE_WHEEL,
+ _cb_mouse_wheel, NULL));
+ handlers = eina_list_append
+ (handlers, ecore_event_handler_add(E_EVENT_ZONE_ADD,
+ _cb_zone_add, NULL));
+ handlers = eina_list_append
+ (handlers, ecore_event_handler_add(E_EVENT_ZONE_DEL,
+ _cb_zone_del, NULL));
+ handlers = eina_list_append
+ (handlers, ecore_event_handler_add(E_EVENT_ZONE_MOVE_RESIZE,
+ _cb_zone_move_resize, NULL));
+
+ for (i = 0; i < 3; i++) multi_device[i] = -1;
+}
+
+static void
+_events_shutdown(void)
+{
+ E_FREE_LIST(handlers, ecore_event_handler_del);
+}
+
+static Eina_Bool
+_cb_property_change(void *data __UNUSED__,
+ int type __UNUSED__,
+ void *ev)
+{
+ E_Border *bd;
+ Ecore_X_Event_Window_Property *event = ev;
+
+ if (event->atom == ECORE_X_ATOM_NET_ACTIVE_WINDOW)
+ {
+ bd = e_border_focused_get();
+ if (bd) target_win = bd->client.win;
+ }
+
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+static void
+_vconf_cb_accessibility_tts_change(keynode_t *node,
+ void *data)
+{
+ int enable = 0;
+
+ if (!node) return;
+
+ enable = vconf_keynode_get_bool(node);
+ if (g_enable == enable) return;
+
+ g_enable = enable;
+ if (enable)
+ {
+ INF("[screen reader module] module enable");
+ _covers_shutdown();
+ _covers_init();
+ _events_shutdown();
+ _events_init();
+ }
+ else
+ {
+ INF("[screen reader module] module disable");
+ _covers_shutdown();
+ _events_shutdown();
+ }
+
+ elm_config_access_set(enable);
+ elm_config_all_flush();
+ elm_config_save();
+}
+/***************************************************************************/
+/* module setup */
+EAPI E_Module_Api e_modapi =
+{
+ E_MODULE_API_VERSION, "Screen Reader"
+};
+
+EAPI void *
+e_modapi_init(E_Module *m)
+{
+ vconf_notify_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS,
+ _vconf_cb_accessibility_tts_change,
+ NULL);
+
+ ecore_x_event_mask_set(ecore_x_window_root_first_get(),
+ ECORE_X_EVENT_MASK_WINDOW_CONFIGURE);
+ ecore_x_event_mask_set(ecore_x_window_root_first_get(),
+ ECORE_X_EVENT_MASK_WINDOW_PROPERTY);
+ property_handler = ecore_event_handler_add
+ (ECORE_X_EVENT_WINDOW_PROPERTY, _cb_property_change, NULL);
+
+ if (vconf_get_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, &g_enable) != 0)
+ INF("vconf get failed\n");
+
+ if (g_enable)
+ {
+ _covers_shutdown();
+ _covers_init();
+ _events_shutdown();
+ _events_init();
+ }
+ else
+ {
+ _covers_shutdown();
+ _events_shutdown();
+ }
+
+ elm_config_access_set(g_enable);
+ elm_config_all_flush();
+ elm_config_save();
+
+ return m;
+}
+
+EAPI int
+e_modapi_shutdown(E_Module *m __UNUSED__)
+{
+ INF("[screen-reader module] module shutdown");
+ if (property_handler) ecore_event_handler_del(property_handler);
+
+ _covers_shutdown();
+ _events_shutdown();
+
+ return 1;
+}
+
+EAPI int
+e_modapi_save(E_Module *m __UNUSED__)
+{
+ return 1;
+}
--- /dev/null
+#ifndef E_MOD_MAIN_H
+#define E_MOD_MAIN_H
+
+typedef struct _Config Config;
+
+struct _Config
+{
+ /* saved * loaded config values */
+ Eina_Bool window;
+};
+
+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
--- /dev/null
+Doyoun Kang <doyoun.kang@samsung.com>
+Sangjin Lee <lsj119@samsung.com>
--- /dev/null
+Copyright notice for Enlightenment:
+
+Copyright (C) 2000-2012 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.
--- /dev/null
+# 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)
+
+
--- /dev/null
+#!/bin/sh
+# Run this to generate all the initial makefiles, etc.
+
+set -x
+aclocal
+autoconf
+libtoolize --copy --force
+autoheader
+automake --foreign --add-missing --copy
+
--- /dev/null
+# authored by Doyoun.kang <doyoun.kang@samsung.com>
+#
+# 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,
+ dlog])
+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
+
--- /dev/null
+[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=<title>WMready</title><br>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]=
--- /dev/null
+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)
--- /dev/null
+#include "e.h"
+#include "e_mod_main.h"
+
+#ifdef USE_DLOG
+#include "dlog.h"
+#undef LOG_TAG
+#define LOG_TAG "E17_EXTRA_MODULES"
+#endif
+
+static int _e_wmready_init(void);
+static void _e_wmready_fin(void);
+static void _e_wmready_configure_system(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_configure_system();
+ _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_configure_system(void)
+{
+ // block to save config files
+ e_config_save_block_set(1);
+
+ // change power save mode to immediately
+ e_powersave_mode_set(E_POWERSAVE_MODE_NONE);
+
+ _wmready_timer = ecore_timer_add(1.0, _e_wmready_cb_timer, NULL);
+}
+
+static Eina_Bool
+_e_wmready_cb_timer(void *data)
+{
+ Eina_Bool is_hib;
+
+ // unblock to save config files
+ e_config_save_block_set(0);
+
+ // set power save mode to LOW
+ e_powersave_mode_set(E_POWERSAVE_MODE_LOW);
+
+ is_hib = ecore_file_exists("/opt/etc/.hib_capturing");
+ if (is_hib == EINA_TRUE)
+ {
+ // set flag for hibernation
+ system("/usr/bin/vconftool set -t int \"memory/hibernation/xserver_ready\" 1 -i -f");
+ }
+
+ return ECORE_CALLBACK_CANCEL;
+}
+
+static void _e_wmready_set_ready_flag(void)
+{
+ system("/bin/touch /tmp/.wm_ready");
+
+ printf ("[WMREADY] WINDOW MANAGER is READY!!!\n");
+#ifdef USE_DLOG
+ LOGD("[WM] WINDOW MANAGER is READY!!!");
+#endif
+}
+
--- /dev/null
+#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__
+